From 397539ff88688d5de6b645b5bf769a25f02bd8be Mon Sep 17 00:00:00 2001 From: Chupurnov Valeriy Date: Fri, 11 May 2018 23:50:58 +0500 Subject: [PATCH] New version 3.1.95. Read more https://github.com/xdan/jodit/releases/tag/3.1.95 --- build/jodit.min.css | 2 +- build/jodit.min.js | 4 ++-- package-lock.json | 2 +- package.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/jodit.min.css b/build/jodit.min.css index a35dd578c..51d077ad8 100644 --- a/build/jodit.min.css +++ b/build/jodit.min.css @@ -2,7 +2,7 @@ * * jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser * Author: Chupurnov (https://xdsoft.net/) - * Version: v3.1.94 + * Version: v3.1.95 * Url: https://xdsoft.net/jodit/ * License(s): GPL-2.0-or-later * diff --git a/build/jodit.min.js b/build/jodit.min.js index d7b4c3c17..9b236090c 100644 --- a/build/jodit.min.js +++ b/build/jodit.min.js @@ -2,9 +2,9 @@ * * jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser * Author: Chupurnov (https://xdsoft.net/) - * Version: v3.1.94 + * Version: v3.1.95 * Url: https://xdsoft.net/jodit/ * License(s): GPL-2.0-or-later * */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Jodit=t():e.Jodit=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(n){if(o[n])return o[n].exports;var i=o[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var o={};return t.m=e,t.c=o,t.d=function(e,o,n){t.o(e,o)||Object.defineProperty(e,o,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/build/",t(t.s=21)}([function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(2),i=o(3),r={},s=r.toString,a=r.hasOwnProperty;t.isIE=function(){return-1!=navigator.userAgent.indexOf("MSIE")||/rv:11.0/i.test(navigator.userAgent)};var l=1;t.$$=function(e,o){var n;if(!/:scope/.test(e)||!t.isIE()||"undefined"!=typeof HTMLDocument&&o instanceof HTMLDocument)n=o.querySelectorAll(e);else{var i=o.id,r=i||"_selector_id_"+(""+Math.random()).slice(2)+l++;e=e.replace(/:scope/g,"#"+r),!i&&o.setAttribute("id",r),n=o.parentNode.querySelectorAll(e),i||o.removeAttribute("id")}return[].slice.call(n)},t.isWindow=function(e){return null!==e&&e===e.window},t.type=function(e){return null===e?"null":"object"==typeof e||"function"==typeof e?r[s.call(e)]||"object":typeof e},t.each=function(e,t){var o,n,i;if(Array.isArray(e)){for(o=e.length,i=0;o>i;i+=1)if(!1===t.call(e[i],i,e[i]))return!1}else for(n=Object.keys(e),i=0;n.length>i;i+=1)if(!1===t.call(e[n[i]],n[i],e[n[i]]))return!1;return e},t.each(["Boolean","Number","String","Function","Array","Date","RegExp","Object","Error","Symbol","HTMLDocument","Window","HTMLElement","HTMLBodyElement","Text","DocumentFragment","DOMStringList"],function(e,t){r["[object "+t+"]"]=t.toLowerCase()}),t.inArray=function(e,t){return-1!==t.indexOf(e)},t.isPlainObject=function(e){return!("object"!=typeof e||e.nodeType||t.isWindow(e)||e.constructor&&!a.call(e.constructor.prototype,"isPrototypeOf"))},t.extend=function(){for(var e=[],o=0;arguments.length>o;o++)e[o]=arguments[o];var n,i,r,s,a,l,c,p,f=e[0]||{},h=1,m=e.length,v=!1;for("boolean"==typeof f&&(v=f,f=e[h]||{},h+=1),"object"!=typeof f&&"function"===t.type(f)&&(f={}),h===m&&(f=this,h+=1),h;m>h;h+=1)if(null!==(n=e[h])&&void 0!==n)for(p=Object.keys(n),c=0;p.length>c;c+=1)i=p[c],r=f[i],s=n[i],f!==s&&(v&&s&&(t.isPlainObject(s)&&!(s instanceof u)||Array.isArray(s)&&!(s instanceof d))?(a=Array.isArray(s),a?(a=!1,l=r&&Array.isArray(r)?r:[]):l=r&&t.isPlainObject(r)?r:{},f[i]=t.extend(v,l,s)):void 0!==s&&(f[i]=s));return f},t.trim=function(e){return e.replace(n.SPACE_REG_EXP_START,"").replace(n.SPACE_REG_EXP_END,"")},t.colorToHex=function(e){if("rgba(0, 0, 0, 0)"===e||""===e)return!1;if(!e)return"#000000";if("#"===e.substr(0,1))return e;var t,o,n,i,r,s=/([\s\n\t\r]*?)rgb\((\d+), (\d+), (\d+)\)/.exec(e)||/([\s\n\t\r]*?)rgba\((\d+), (\d+), (\d+), ([\d.]+)\)/.exec(e);if(!s)return"#000000";for(o=parseInt(s[2],10),n=parseInt(s[3],10),i=parseInt(s[4],10),r=i|n<<8|o<<16,t=r.toString(16).toUpperCase();6>t.length;)t="0"+t;return s[1]+"#"+t},t.normalizeColor=function(e){var o,n=["#"],i=t.colorToHex(e);if(!i)return!1;if(i=t.trim(i.toUpperCase()),i=i.substr(1),3===i.length){for(o=0;3>o;o+=1)n.push(i[o]),n.push(i[o]);return n.join("")}return i.length>6&&(i=i.substr(0,6)),"#"+i},t.normalizeSize=function(e){return/^[0-9]+$/.test(""+e)?e+"px":""+e},t.getContentWidth=function(e,t){var o=function(e){return parseInt(e,10)},n=t.getComputedStyle(e);return e.offsetWidth-o(n.getPropertyValue("padding-left")||"0")-o(n.getPropertyValue("padding-right")||"0")},t.ctrlKey=function(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};var c=function(e){return"file:"===window.location.protocol&&/^\/\//.test(e)&&(e="https:"+e),e};t.appendScript=function(e,t,o,n){void 0===o&&(o="");var i=n.createElement("script");i.className=o,i.type="text/javascript",i.charset="utf-8",void 0!==t&&i.addEventListener("load",t,!1),i.src=c(e),n.body.appendChild(i)},t.dom=function(e,t){if(e instanceof t.defaultView.HTMLElement)return e;var o=t.createElement("div");o.innerHTML=e;var n=o.firstChild===o.lastChild&&o.firstChild?o.firstChild:o;return n.parentNode&&n.parentNode.removeChild(n),n},t.hexToRgb=function(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,t,o,n){return t+t+o+o+n+n});var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},t.clear=function(e,o){return void 0===o&&(o=!1),e=t.trim(e).replace(n.INVISIBLE_SPACE_REG_EXP,"").replace(/[\s]*class=""/g,""),o&&(e=e.replace(/]*>[\s\n\r\t]*( |
|)?[\s\n\r\t]*<\/p>[\n\r]*/g,"")),e},t.isURL=function(e){return RegExp("^(https?:\\/\\/)((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.?)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(e)},t.pathNormalize=function(e){return e.replace(/([^:])[\\\/]+/g,"$1/")},t.urlNormalize=function(e){return e.replace(/([^:])[\\\/]+/g,"$1/")},t.isHTML=function(e){return/<([A-Za-z][A-Za-z0-9]*)\b[^>]*>(.*?)<\/\1>/m.test(e)},t.isHTMLFromWord=function(e){return-1!==e.search(//)||-1!==e.search(//)||-1!==e.search(/style="[^"]*mso-/)&&-1!==e.search(/t;t+=1)o=i[t].split("="),n[decodeURIComponent(o[0])]=decodeURIComponent(o[1]||"");return n},t.convertMediaURLToVideoEmbed=function(e,o,n){if(void 0===o&&(o=400),void 0===n&&(n=345),!t.isURL(e))return e;var i=document.createElement("a"),r=/(?:http?s?:\/\/)?(?:www\.)?(?:vimeo\.com)\/?(.+)/g;switch(i.href=e,o||(o=400),n||(n=345),i.hostname){case"www.vimeo.com":case"vimeo.com":return r.test(e)?e.replace(r,''):e;case"youtube.com":case"www.youtube.com":case"youtu.be":case"www.youtu.be":var s=i.search?t.parseQuery(i.search):{v:i.pathname.substr(1)};return s.v?'':e}return e},t.browser=function(e){var t=navigator.userAgent.toLowerCase(),o=/(firefox)[\s\/]([\w.]+)/.exec(t)||/(chrome)[\s\/]([\w.]+)/.exec(t)||/(webkit)[\s\/]([\w.]+)/.exec(t)||/(opera)(?:.*version)[\s\/]([\w.]+)/.exec(t)||/(msie)[\s]([\w.]+)/.exec(t)||/(trident)\/([\w.]+)/.exec(t)||0>t.indexOf("compatible")||[];return"version"===e?o[2]:"webkit"===e?"chrome"===o[1]||"webkit"===o[1]:"ff"===e?"firefox"===o[1]:"msie"===e?"trident"===o[1]||"msie"===o[1]:o[1]===e},t.offset=function(e,o,n,i){void 0===i&&(i=!1);var r,s,a=e.getBoundingClientRect(),l=n.body,c=n.documentElement,d=n.defaultView||n.parentWindow,u=d.pageYOffset||c.scrollTop||l.scrollTop,p=d.pageXOffset||c.scrollLeft||l.scrollLeft,f=c.clientTop||l.clientTop||0,h=c.clientLeft||l.clientLeft||0;if(!i&&o&&o.options&&o.options.iframe&&o.iframe){var m=t.offset(o.iframe,o,o.ownerDocument,!0),v=m.top,g=m.left;r=a.top+v,s=a.left+g}else r=a.top+u-f,s=a.left+p-h;return{top:Math.round(r),left:Math.round(s),width:a.width,height:a.height}},t.camelCase=function(e){return e.replace(/([-_])(.)/g,function(e,t,o){return o.toUpperCase()})},t.fromCamelCase=function(e){return e.replace(/([A-Z]+)/g,function(e,t){return"-"+t.toLowerCase()})},t.htmlspecialchars=function(e){var t=document.createElement("div");return t.innerText=e,t.innerHTML},t.debounce=function(e,t,o,n){3===arguments.length&&"boolean"!=typeof o&&(n=o,o=!1);var i=0;return function(){var r=arguments;n=n||this,(o&&!i||!t)&&e.apply(n,r),t&&(clearTimeout(i),i=window.setTimeout(function(){o||e.apply(n,r),i=0},t))}},t.throttle=function(e,t,o){var n,i,r,s=null;return function(){if(n=arguments,i=!0,o=o||this,!t)return void e.apply(o,n);s||(r=function(){i?(e.apply(o,n),i=!1,s=setTimeout(r,t)):s=null})()}},t.normilizeCSSValue=function(e,t){switch(e){case"font-weight":return"bold"===t?700:t}return t},t.css=function(e,o,n,i){void 0===i&&(i=!1);var r=/^left|top|bottom|right|width|min|max|height|margin|padding|font-size/i;if(t.isPlainObject(o)||void 0!==n){var s=function(e,o,n){void 0!==n&&null!==n&&r.test(o)&&/^[\-+]?[0-9.]+$/.test(""+n)&&(n=parseInt(""+n,10)+"px"),void 0!==n&&t.css(e,o,void 0,!0)!==t.normilizeCSSValue(o,n)&&(e.style[o]=n)};if(t.isPlainObject(o)){var a=Object.keys(o),l=void 0;for(l=0;a.length>l;l+=1)s(e,t.camelCase(a[l]),o[a[l]])}else s(e,t.camelCase(o),n);return""}var c=t.fromCamelCase(o),d=e.ownerDocument,u=!!d&&(d.defaultView||d.parentWindow),p=e.style[o],f=void 0!==p&&""!==p?p:u&&!i?u.getComputedStyle(e).getPropertyValue(c):"";return r.test(o)&&/^[\-+]?[0-9.]+px$/.test(""+f)&&(f=parseInt(f,10)),t.normilizeCSSValue(o,f)},t.asArray=function(e){return Array.isArray(e)?e:[e]},t.splitArray=function(e){return"string"==typeof e?e.split(/[,\s]+/):e},t.sprintf=function(){for(var e=[],t=0;arguments.length>t;t++)e[t]=arguments[t];var o=/%%|%(\d+\$)?([-+#0 ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([scboxXuidfegEG])/g,n=e,i=0,r=n[i++],s=function(e,t,o,n){var i=t>e.length?Array(1+t-e.length>>>0).join(o):"";return n?e+i:i+e},a=function(e,t,o,n,i){var r=n-e.length;return r>0&&(e=o||!i?s(e,n," ",o):e.slice(0,t.length)+s("",r,"0",!0)+e.slice(t.length)),e},l=function(e,t,o,n,i,r,l){var c=e>>>0;o=o&&c&&{2:"0b",8:"0",16:"0x"}[t]||"";var d=o+s(c.toString(t),r||0,"0",!1);return a(d,o,n,i,l)},c=function(e,t,o,n,i){return null!=n&&(e=e.slice(0,n)),a(e,"",t,o,i)};return r.replace(o,function(e,t,o,r,d,u,p){if("%%"==e)return"%";for(var f=!1,h="",m=!1,v=!1,g=0;o&&o.length>g;g++)switch(o.charAt(g)){case" ":h=" ";break;case"+":h="+";break;case"-":f=!0;break;case"0":m=!0;break;case"#":v=!0}if(r=r?"*"===r?+n[i++]:"*"===(""+r)[0]?+n[(""+r).slice(1,-1)]:+r:0,0>r&&(r=-r,f=!0),!isFinite(r))throw Error("sprintf: (minimum-)width must be finite");u=u?"*"===u?+n[i++]:"*"===u[0]?+n[u.slice(1,-1)]:+u:"fFeE".indexOf(p)>-1?6:"d"==p?0:void 0;var _=t?n[t.slice(0,-1)]:n[i++];switch(p){case"s":return c(_+"",f,r,u,m);case"c":return c(String.fromCharCode(+_),f,r,u,m);case"b":return l(_,2,v,f,r,u,m);case"o":return l(_,8,v,f,r,u,m);case"x":return l(_,16,v,f,r,u,m);case"X":return l(_,16,v,f,r,u,m).toUpperCase();case"u":return l(_,10,v,f,r,u,m);case"i":case"d":var b=parseInt(""+_,10),y=0>b?"-":h;return _=y+s(Math.abs(b)+"",u,"0",!1),a(_,y,f,r,m);case"e":case"E":case"f":case"F":case"g":case"G":var b=+_,y=0>b?"-":h,w=["toExponential","toFixed","toPrecision"]["efg".indexOf(p.toLowerCase())],C=["toString","toUpperCase"]["eEfFgG".indexOf(p)%2];return _=y+Math.abs(b)[w](u),a(_,y,f,r,m)[C]();default:return e}})},t.val=function(e,t,o){var n=e.querySelector(t);return n?(o&&(n.value=o),n.value):""},t.defaultLanguage=function(e){return"auto"===e||void 0===e?document.documentElement.lang||navigator.language&&navigator.language.substr(0,2)||!!navigator.browserLanguage&&navigator.browserLanguage.substr(0,2)||"en":e},t.normalizeNode=function(e){if(e){if(e.nodeType===Node.TEXT_NODE&&null!==e.nodeValue&&e.parentNode)for(;e.nextSibling&&e.nextSibling.nodeType===Node.TEXT_NODE;)null!==e.nextSibling.nodeValue&&(e.nodeValue+=e.nextSibling.nodeValue),e.nodeValue=e.nodeValue.replace(n.INVISIBLE_SPACE_REG_EXP,""),e.parentNode.removeChild(e.nextSibling);else t.normalizeNode(e.firstChild);t.normalizeNode(e.nextSibling)}},t.cleanFromWord=function(e){-1!==e.indexOf("")+7));var t="";try{var o=document.createElement("div");o.innerHTML=e;var n=[];o.firstChild&&i.Dom.all(o,function(e){switch(e.nodeType){case Node.ELEMENT_NODE:"FONT"===e.nodeName?i.Dom.unwrap(e):[].slice.call(e.attributes).forEach(function(t){-1===["src","href","rel","content"].indexOf(t.name.toLowerCase())&&e.removeAttribute(t.name)});break;case Node.TEXT_NODE:break;default:n.push(e)}}),n.forEach(function(e){return e.parentNode&&e.parentNode.removeChild(e)}),t=o.innerHTML}catch(e){}return t&&(e=t),e.replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(//i);-1!==t&&(e=e.substr(t+20));var o=e.search(//i);return-1!==o&&(e=e.substr(0,o)),e},d=function(e){return e.clipboardData?e.clipboardData:e.dataTransfer};e.events.on("copy cut",function(n){var i=e.selection.getHTML(),r=d(n)||d(e.editorWindow)||d(n.originalEvent);r.setData(a.TEXT_PLAIN,o(i)),r.setData(a.TEXT_HTML,i),t=i,"cut"===n.type&&(e.selection.remove(),e.selection.focus()),n.preventDefault(),e.events.fire("afterCopy",i)}).on("paste",function(o){if(!1===e.events.fire("beforePaste",o))return o.preventDefault(),!1;if(o&&d(o)){var n=void 0,i=d(o).types,l="",u="";if(Array.isArray(i)||"domstringlist"===r.type(i))for(n=0;i.length>n;n+=1)l+=i[n]+";";else l=i;/text\/html/i.test(l)?u=d(o).getData("text/html"):/text\/rtf/i.test(l)&&r.browser("safari")?u=d(o).getData("text/rtf"):/text\/plain/i.test(l)&&!r.browser("mozilla")?u=d(o).getData(a.TEXT_PLAIN):/text/i.test(l)&&r.isIE&&(u=d(o).getData(a.TEXT_PLAIN)),(u instanceof e.editorWindow.Node||""!==r.trim(u))&&(u=c(u),t!==u&&(u=e.events.fire("processPaste",o,u)),("string"==typeof u||u instanceof e.editorWindow.Node)&&("drop"===o.type&&e.selection.insertCursorAtPoint(o.clientX,o.clientY),s(u,e.options.defaultActionOnPaste)),o.preventDefault(),o.stopPropagation())}return!1!==e.events.fire("afterPaste",o)&&void 0}),e.options.askBeforePasteHTML&&e.events.on("beforePaste",function(e){if(e&&d(e).getData(a.TEXT_PLAIN)){var t=d(e).getData(a.TEXT_PLAIN);return l(t,e)}}),e.options.askBeforePasteFromWord&&e.events.on("beforePaste",function(i){if(i&&d(i).getData&&d(i).getData(a.TEXT_HTML)){var s=function(s){if(r.isHTML(s)&&t!==c(s))return r.isHTMLFromWord(s)?n(e.i18n("The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?"),e.i18n("Word Paste Detected"),function(t){!0===t&&(s=r.applyStyles(s),e.options.beautifyHTML&&e.ownerWindow.html_beautify&&(s=e.ownerWindow.html_beautify(s))),!1===t&&(s=r.cleanFromWord(s)),0===t&&(s=o(r.cleanFromWord(s))),e.selection.insertHTML(s),e.setEditorValue()}):l(s,i),!1};if(d(i).types&&-1!==[].slice.call(d(i).types).indexOf("text/html")){var u=d(i).getData(a.TEXT_HTML);return s(u)}if("drop"!==i.type){var p=r.dom('
',e.ownerDocument);e.container.appendChild(p);var f=e.selection.save();p.focus();var h=0,m=function(){p.parentNode&&p.parentNode.removeChild(p),e.selection.restore(f)},v=function(){if(h+=1,p.childNodes&&p.childNodes.length>0){var t=p.innerHTML;m(),!1!==s(t)&&e.selection.insertHTML(t)}else 5>h?setTimeout(function(){v()},20):m()};v()}}})}Object.defineProperty(t,"__esModule",{value:!0});var i=o(7),r=o(0),s=o(1),a=o(2);s.Config.prototype.askBeforePasteHTML=!0,s.Config.prototype.askBeforePasteFromWord=!0,s.Config.prototype.defaultActionOnPaste=a.INSERT_AS_HTML,s.Config.prototype.controls.cut={command:"cut",isDisable:function(e){var t=e.editorWindow.getSelection();return!t||t.isCollapsed},tooltip:"Cut selection"},t.paste=n},function(e,t,o){"use strict";function n(e){if(e.options.showPlaceholder){this.destruct=function(){i.parentNode&&i.parentNode.removeChild(i)};var t=function(){if(i.parentNode&&!e.options.readonly){var t=0,o=0,n=e.editorWindow.getComputedStyle(e.editor);if(e.editor.firstChild&&e.editor.firstChild.nodeType===Node.ELEMENT_NODE){var r=e.editorWindow.getComputedStyle(e.editor.firstChild);t=parseInt(r.getPropertyValue("margin-top"),10),o=parseInt(r.getPropertyValue("margin-left"),10),i.style.fontSize=parseInt(r.getPropertyValue("font-size"),10)+"px",i.style.lineHeight=r.getPropertyValue("line-height")}else i.style.fontSize=parseInt(n.getPropertyValue("font-size"),10)+"px",i.style.lineHeight=n.getPropertyValue("line-height");s.css(i,{display:"block",marginTop:Math.max(parseInt(n.getPropertyValue("margin-top"),10),t),marginLeft:Math.max(parseInt(n.getPropertyValue("margin-left"),10),o)})}},o=function(){i.parentNode&&(i.style.display="none")},n=s.debounce(function(){if(null!==i.parentNode&&e.editor){if(e.getRealMode()!==r.MODE_WYSIWYG)return o();var n=e.getEditorValue();n&&!/^<(p|div|h[1-6])><\/\1>$/.test(n)?o():t()}},e.defaultTimeout/10),i=s.dom('",e.ownerDocument);"rtl"===e.options.direction&&(i.style.right="0px",i.style.direction="rtl"),e.options.useInputsPlaceholder&&e.element.hasAttribute("placeholder")&&(i.innerHTML=e.element.getAttribute("placeholder")||""),e.events.on("readonly",function(e){e?o():n()}).on("afterInit",function(){e.workplace.appendChild(i),n(),e.events.fire("placeholder",i.innerHTML),e.events.on("change keyup mouseup keydown mousedown afterSetMode",n).on(window,"load",n)})}}Object.defineProperty(t,"__esModule",{value:!0});var i=o(1),r=o(2),s=o(0);i.Config.prototype.showPlaceholder=!0,i.Config.prototype.useInputsPlaceholder=!0,i.Config.prototype.placeholder="Type something",t.placeholder=n},function(e,t,o){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=o(2),r=o(1),s=o(4);r.Config.prototype.controls.redo={mode:i.MODE_SPLIT,isDisable:function(e){return!e.observer.stack.canRedo()},tooltip:"Redo"},r.Config.prototype.controls.undo={mode:i.MODE_SPLIT,isDisable:function(e){return!e.observer.stack.canUndo()},tooltip:"Undo"},t.redoundo=function(e){function t(t){var o=e.call(this,t)||this,n=function(e){return t.getRealMode()===i.MODE_WYSIWYG&&o.jodit.observer[e](),!1};return t.registerCommand("redo",{exec:n,hotkeys:"ctrl+y,ctrl+shift+z"}),t.registerCommand("undo",{exec:n,hotkeys:"ctrl+z"}),o}return n(t,e),t}(s.Component)},function(e,t,o){"use strict";function n(e){var t,o,n,i,a,l,c,d,u,p,f,h=!1,m=!1,v=!1,g=0,_=s.dom('',e.ownerDocument),b=_.getElementsByTagName("span")[0],y=function(){m=!1,v=!1,o=null,_.style.display="none"},w=function(t,o){e.options.resizer.showSize&&(b.style.opacity="1",b.innerHTML=t+" x "+o,window.clearTimeout(g),g=window.setTimeout(function(){b.style.opacity="0"},1e3))},C=function(){if(v&&o&&_){var t=s.offset(_.parentNode||e.ownerDocument.documentElement,e,e.ownerDocument,!0),n=s.offset(o,e,e.editorDocument),i=parseInt(_.style.left||"0",10),r=parseInt(_.style.top||"0",10),a=_.offsetWidth,l=_.offsetHeight,c=n.top-1-t.top,d=n.left-1-t.left;r===c&&i===d&&a===o.offsetWidth&&l===o.offsetHeight||(_.style.top=c+"px",_.style.left=d+"px",_.style.width=o.offsetWidth+"px",_.style.height=o.offsetHeight+"px",e.events&&(e.events.fire(o,"changesize"),isNaN(i)||e.events.fire("resize")))}},E=function(){e.options.readonly||(_.parentNode||e.workplace.appendChild(_),v=!0,_.style.display="block",e.isFullSize()&&(_.style.zIndex=""+s.css(e.container,"zIndex")),C())},j=function(t){var n;if("IFRAME"===t.tagName)if(t.parentNode&&t.parentNode.getAttribute("data-jodit_iframe_wrapper"))t=t.parentNode;else{n=s.dom('',e.editorDocument),n.style.display="inline-block"===t.style.display?"inline-block":"block",n.style.width=t.offsetWidth+"px",n.style.height=t.offsetHeight+"px",t.parentNode&&t.parentNode.insertBefore(n,t),n.appendChild(t);var i=t;e.events.on(n,"changesize",function(){i.setAttribute("width",n.offsetWidth+"px"),i.setAttribute("height",n.offsetHeight+"px")}),t=n}var r;e.events.on(t,"dragstart",y).on(t,"mousedown",function(e){s.isIE()&&"IMG"===t.nodeName&&e.preventDefault()}).on(t,"mousedown touchstart",function(){h||(h=!0,o=t,E(),"IMG"!==o.tagName||o.complete||o.addEventListener("load",function e(){C(),o&&o.removeEventListener("load",e)}),clearTimeout(r)),r=window.setTimeout(function(){h=!1},400)})};s.$$("i",_).forEach(function(r){e.events.on(r,"mousedown touchstart",function(s){if(!o||!o.parentNode)return y(),!1;t=r,s.preventDefault(),s.stopImmediatePropagation(),a=o.offsetWidth,l=o.offsetHeight,c=a/l,m=!0,n=s.clientX,i=s.clientY,e.events.fire("hidePopup"),e.lock("resizer")})}),e.events.on("readonly",function(e){e&&y()}).on("beforeDestruct",function(){_.parentNode&&_.parentNode.removeChild(_)}).on("afterInit",function(){e.events.on(e.editor,"keydown",function(t){v&&t.keyCode===r.KEY_DELETE&&o&&"table"!==o.tagName.toLowerCase()&&("JODIT"!==o.tagName?e.selection.select(o):(o.parentNode&&o.parentNode.removeChild(o),y(),t.preventDefault()))}).on(e.ownerWindow,"mousemove touchmove",function(r){if(m){if(p=r.clientX-n,f=r.clientY-i,!o)return;var h=t.className;"IMG"===o.tagName?(p?(u=a+(h.match(/left/)?-1:1)*p,d=Math.round(u/c)):(d=l+(h.match(/top/)?-1:1)*f,u=Math.round(d*c)),u>s.innerWidth(e.editor,e.ownerWindow)&&(u=s.innerWidth(e.editor,e.ownerWindow),d=Math.round(u/c))):(u=a+(h.match(/left/)?-1:1)*p,d=l+(h.match(/top/)?-1:1)*f),u>e.options.resizer.min_width&&(o.style.width=_.parentNode.offsetWidth>u?u+"px":"100%"),d>e.options.resizer.min_height&&(o.style.height=d+"px"),C(),w(o.offsetWidth,o.offsetHeight),r.stopImmediatePropagation()}}).on(e.ownerWindow,"resize",function(){v&&C()}).on(e.ownerWindow,"mouseup keydown touchend",function(t){v&&!h&&(m?(e.unlock(),m=!1,e.setEditorValue(),t.stopImmediatePropagation()):y())}).on([e.ownerWindow,e.editor],"scroll",function(){v&&!m&&y()})}).on("afterGetValueFromEditor",function(e){e.value=e.value.replace(/]+data-jodit_iframe_wrapper[^>]+>(.*?]+>[\s\n\r]*<\/iframe>.*?)<\/jodit>/gi,"$1")}).on("change afterInit afterSetMode",s.debounce(function(){v&&(o&&o.parentNode?C():y()),e.isDestructed||s.$$("img, table, iframe",e.editor).forEach(function(t){e.getMode()!==r.MODE_SOURCE&&!t.__jodit_resizer_binded&&("IFRAME"===t.tagName&&e.options.useIframeResizer||"IMG"===t.tagName&&e.options.useImageResizer||"TABLE"===t.tagName&&e.options.useTableResizer)&&(t.__jodit_resizer_binded=!0,j(t))})},e.defaultTimeout))}Object.defineProperty(t,"__esModule",{value:!0});var i=o(1),r=o(2),s=o(0);i.Config.prototype.useIframeResizer=!0,i.Config.prototype.useTableResizer=!0,i.Config.prototype.useImageResizer=!0,i.Config.prototype.resizer={showSize:!0,min_width:10,min_height:10},t.resizer=n},function(e,t,o){"use strict";function n(e){var t=function(t){i.css(e.container,"height",t),e.options.saveHeightInStorage&&e.storage.set("height",t)},o=function(t){return i.css(e.container,"width",t)},n=function(t){return i.css(e.workplace,"height",t)};if("auto"!==e.options.height&&(e.options.allowResizeX||e.options.allowResizeY)){var r=i.dom('
',e.ownerDocument),s={x:0,y:0,w:0,h:0},a=!1;e.events.on(r,"mousedown touchstart",function(t){a=!0,s.x=t.clientX,s.y=t.clientY,s.w=e.container.offsetWidth,s.h=e.container.offsetHeight,e.lock(),t.preventDefault()}).on(e.ownerWindow,"mousemove touchmove",i.throttle(function(n){a&&(t(e.options.allowResizeY?s.h+n.clientY-s.y:s.h),o(e.options.allowResizeX?s.w+n.clientX-s.x:s.w),d(),e.events.fire("resize"))},e.defaultTimeout/10)).on(e.ownerWindow,"mouseup touchsend",function(){a&&(a=!1,e.unlock())}).on("afterInit",function(){e.container.appendChild(r)}).on("toggleFullSize",function(e){r.style.display=e?"none":"block"})}var l=function(){return(e.options.toolbar?e.toolbar.container.offsetHeight:0)+(e.statusbar?e.statusbar.container.offsetHeight:0)},c=function(){if(e.container&&e.container.parentNode){var t=i.css(e.container,"minHeight")-l();[e.workplace,e.iframe,e.editor].map(function(o){var n=o===e.editor?t-2:t;o&&i.css(o,"minHeight",n),e.events.fire("setMinHeight",n)})}},d=function(){e.options.inline||(c(),e.container&&("auto"!==e.options.height||e.isFullSize())&&n(e.container.offsetHeight-l()))},u=i.debounce(d,e.defaultTimeout);e.events.on("toggleFullSize",function(t){t||"auto"!==e.options.height||(n("auto"),c())}).on("afterInit",function(){e.options.inline||(i.css(e.editor,{minHeight:"100%"}),i.css(e.container,{minHeight:e.options.minHeight,minWidth:e.options.minWidth,maxWidth:e.options.maxWidth}));var n=e.options.height;if(e.options.saveHeightInStorage&&"auto"!==n){var r=e.storage.get("height");r&&(n=r)}e.options.inline||(t(n),o(e.options.width)),d()},void 0,void 0,!0).on(window,"load",u).on("afterInit resize updateToolbar scroll afterResize",u)}Object.defineProperty(t,"__esModule",{value:!0});var i=o(0),r=o(1);r.Config.prototype.allowResizeX=!1,r.Config.prototype.allowResizeY=!0,t.size=n},function(e,t,o){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=o(1),r=o(2),s=o(0),a=o(4),l=o(2);i.Config.prototype.beautifyHTML=!0,i.Config.prototype.useAceEditor=!0,i.Config.prototype.sourceEditorNativeOptions={showGutter:!0,theme:"ace/theme/idle_fingers",mode:"ace/mode/html",wrap:!0,highlightActiveLine:!0},i.Config.prototype.sourceEditorCDNUrlsJS=["https://cdnjs.cloudflare.com/ajax/libs/ace/1.3.3/ace.js"],i.Config.prototype.beautifyHTMLCDNUrlsJS=["https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.7.5/beautify.min.js","https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.7.5/beautify-html.min.js"],i.Config.prototype.controls.source={mode:r.MODE_SPLIT,exec:function(e){e.toggleMode()},isActive:function(e){return e.getRealMode()===r.MODE_SOURCE},tooltip:"Change mode"},t.source=function(e){function t(t){var o=e.call(this,t)||this;return o.className="jodit_ace_editor",o.loadNext=function(e,t,n,i){if(void 0===n&&(n="aceReady"),void 0===i&&(i=o.className),n&&void 0===t[e]&&o.jodit&&o.jodit.events)return o.jodit.events&&o.jodit.events.fire(n),void(o.jodit.events&&o.jodit.events.fire(o.jodit.ownerWindow,n));void 0!==t[e]&&s.appendScript(t[e],function(){o.loadNext(e+1,t,n,i)},i,o.jodit.ownerDocument)},o.fromWYSIWYG=function(e){if(void 0===e&&(e=!1),!o.__lock||!0===e){o.__lock=!0;var t=o.jodit.getEditorValue(!1);t!==o.getMirrorValue()&&o.setMirrorValue(t),o.__lock=!1}},o.insertHTML=function(e){if(o.mirror.selectionStart||0===o.mirror.selectionStart){var t=o.mirror.selectionStart,n=o.mirror.selectionEnd;o.mirror.value=o.mirror.value.substring(0,t)+e+o.mirror.value.substring(n,o.mirror.value.length)}else o.mirror.value+=o.mirror;o.toWYSIWYG()},o.__lock=!1,o.toWYSIWYG=function(){o.__lock||(o.__lock=!0,o.jodit.setEditorValue(o.getMirrorValue()),o.__lock=!1)},o.autosize=s.debounce(function(){o.mirror.style.height="auto",o.mirror.style.height=o.mirror.scrollHeight+"px"},o.jodit.defaultTimeout),o.getNormalPosition=function(e,t){for(var o=e;o>0;){if(o--,"<"===t[o]&&void 0!==t[o+1]&&t[o+1].match(/[\w\/]+/i))return o;if(">"===t[o])return e}return e},o.tempMarkerStart="{start-jodit-selection}",o.tempMarkerStartReg=/{start-jodit-selection}/g,o.tempMarkerEnd="{end-jodit-selection}",o.tempMarkerEndReg=/{end-jodit-selection}/g,o.__clear=function(e){return e.replace(r.INVISIBLE_SPACE_REG_EXP,"")},o.selInfo=[],o.selectAll=function(){o.mirror.select()},o.onSelectAll=function(e){if("selectall"===e.toLowerCase()&&o.jodit.getRealMode()===l.MODE_SOURCE)return o.selectAll(),!1},o.getSelectionStart=function(){return o.mirror.selectionStart},o.getSelectionEnd=function(){return o.mirror.selectionEnd},o.setMirrorSelectionRange=function(e,t){o.mirror.setSelectionRange(e,t)},o.saveSelection=function(){if(o.jodit.getRealMode()===r.MODE_WYSIWYG)o.selInfo=o.jodit.selection.save()||[],o.jodit.setEditorValue(),o.fromWYSIWYG(!0);else{o.selInfo.length=0;var e=o.getMirrorValue();if(o.getSelectionStart()===o.getSelectionEnd()){var t=o.jodit.selection.marker(!0);o.selInfo[0]={startId:t.id,collapsed:!0,startMarker:t.outerHTML};var n=o.getNormalPosition(o.getSelectionStart(),o.getMirrorValue());o.setMirrorValue(e.substr(0,n)+o.__clear(o.selInfo[0].startMarker)+e.substr(n))}else{var i=o.jodit.selection.marker(!0),s=o.jodit.selection.marker(!1);o.selInfo[0]={startId:i.id,endId:s.id,collapsed:!1,startMarker:o.__clear(i.outerHTML),endMarker:o.__clear(s.outerHTML)};var n=o.getNormalPosition(o.getSelectionStart(),e),a=o.getNormalPosition(o.getSelectionEnd(),e);o.setMirrorValue(e.substr(0,n)+o.selInfo[0].startMarker+e.substr(n,a-n)+o.selInfo[0].endMarker+e.substr(a))}o.toWYSIWYG()}},o.restoreSelection=function(){if(o.selInfo.length){if(o.jodit.getRealMode()===r.MODE_WYSIWYG)return o.__lock=!0,o.jodit.selection.restore(o.selInfo),void(o.__lock=!1);var e=o.getMirrorValue(),t=0,n=0;try{o.selInfo[0].startMarker&&(e=e.replace(/]+data-jodit_selection_marker="start"[^>]*>[<>]*?<\/span>/gim,o.tempMarkerStart)),o.selInfo[0].endMarker&&(e=e.replace(/]+data-jodit_selection_marker="end"[^>]*>[<>]*?<\/span>/gim,o.tempMarkerEnd)),o.jodit.ownerWindow.html_beautify&&o.jodit.options.beautifyHTML&&(e=o.jodit.ownerWindow.html_beautify(e)),t=e.indexOf(o.tempMarkerStart),n=t,e=e.replace(o.tempMarkerStartReg,""),o.selInfo[0].collapsed&&-1!==t||(n=e.indexOf(o.tempMarkerEnd),-1===t&&(t=n)),e=e.replace(o.tempMarkerEndReg,"")}finally{e=e.replace(o.tempMarkerEndReg,"").replace(o.tempMarkerStartReg,"")}o.setMirrorValue(e),o.setMirrorSelectionRange(t,n),o.toWYSIWYG(),o.setFocusToMirror()}},o.mirrorContainer=s.dom('
',o.jodit.ownerDocument),o.mirror=s.dom('\n \n ",e.ownerDocument),l={},d=e.selection.save(),u=function(t){e.selection.restore(d),e.selection.insertHTML(t),n()};return e.options.textIcons?(l[e.i18n("Link")]=r,l[e.i18n("Code")]=s):(l[c.ToolbarIcon.getIcon("link")+" "+e.i18n("Link")]=r,l[c.ToolbarIcon.getIcon("source")+" "+e.i18n("Code")]=s),s.addEventListener("submit",function(e){return e.preventDefault(),i.trim(i.val(s,"textarea[name=code]"))?(u(i.val(s,"textarea[name=code]")),!1):(s.querySelector("textarea[name=code]").focus(),s.querySelector("textarea[name=code]").classList.add("jodit_error"),!1)}),r.addEventListener("submit",function(e){return e.preventDefault(),i.isURL(i.val(r,"input[name=code]"))?(u(i.convertMediaURLToVideoEmbed(i.val(r,"input[name=code]"))),!1):(r.querySelector("input[name=code]").focus(),r.querySelector("input[name=code]").classList.add("jodit_error"),!1)}),a(e,l)},tags:["iframe"],tooltip:"Insert youtube/vimeo video"}}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.INVISIBLE_SPACE="\ufeff",t.INVISIBLE_SPACE_REG_EXP=/[\uFEFF]/g,t.INVISIBLE_SPACE_REG_EXP_END=/[\uFEFF]+$/g,t.INVISIBLE_SPACE_REG_EXP_START=/^[\uFEFF]+/g,t.SPACE_REG_EXP=/[\s\n\t\r\uFEFF\u200b]+/g,t.SPACE_REG_EXP_START=/^[\s\n\t\r\uFEFF\u200b]+/g,t.SPACE_REG_EXP_END=/[\s\n\t\r\uFEFF\u200b]+$/g,t.IS_BLOCK=/^(PRE|DIV|P|LI|H[1-6]|BLOCKQUOTE|TD|TH|TABLE|BODY|HTML|FIGCAPTION|FIGURE)$/i,t.IS_INLINE=/^(STRONG|SPAN|I|EM|B|SUP|SUB)$/,t.KEY_BACKSPACE=8,t.KEY_TAB=9,t.KEY_ENTER=13,t.KEY_ESC=27,t.KEY_LEFT=37,t.KEY_UP=38,t.KEY_RIGHT=39,t.KEY_DOWN=40,t.KEY_DELETE=46,t.KEY_F=70,t.KEY_R=82,t.KEY_H=72,t.KEY_Y=89,t.KEY_V=86,t.KEY_Z=90,t.KEY_F3=114,t.NEARBY=5,t.ACCURACY=10,t.BR="br",t.PARAGRAPH="P",t.MODE_WYSIWYG=1,t.MODE_SOURCE=2,t.MODE_SPLIT=3,t.URL_LIST=-1!=navigator.userAgent.indexOf("MSIE")||/rv:11.0/i.test(navigator.userAgent)?"url":"text/uri-list",t.TEXT_PLAIN=-1!=navigator.userAgent.indexOf("MSIE")||/rv:11.0/i.test(navigator.userAgent)?"text":"text/plain",t.TEXT_HTML=-1!=navigator.userAgent.indexOf("MSIE")||/rv:11.0/i.test(navigator.userAgent)?"text":"text/html",t.MARKER_CLASS="jodit_selection_marker",t.EMULATE_DBLCLICK_TIMEOUT=300,t.JODIT_SELECTED_CELL_MARKER="data-jodit-selected-cell",t.INSERT_AS_HTML="insert_as_html",t.INSERT_CLEAR_HTML="insert_clear_html",t.INSERT_AS_TEXT="insert_as_text",t.INSERT_ONLY_TEXT="insert_only_text"},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(2),i=o(0);t.Dom=function(){function e(){}return e.detach=function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},e.unwrap=function(e){var t=e.parentNode,o=e;if(t){for(;o.firstChild;)t.insertBefore(o.firstChild,o);t.removeChild(o)}},e.each=function(t,o){var n=t.firstChild;if(n)for(;n;){if(!1===o.call(n,n)||!1===e.each(n,o))return!1;n=e.next(n,function(e){return!!e},t)}return!0},e.create=function(e,t,o){var n;return e=e.toLowerCase(),"text"===e?n=o.createTextNode("string"==typeof t?t:""):(n=o.createElement(e),void 0!==t&&(n.innerHTML=t)),n},e.replace=function(e,t,o,n,r){void 0===o&&(o=!1),void 0===n&&(n=!1);var s="string"==typeof t?r.createElement(t):t;if(!n)for(;e.firstChild;)s.appendChild(e.firstChild);return o&&i.each(e.attributes,function(e,t){s.setAttribute(t.name,t.nodeValue)}),e.parentNode&&e.parentNode.replaceChild(s,e),s},e.isCell=function(t,o){return e.isNode(t,o)&&/^(td|th)$/i.test(t.nodeName)},e.isImage=function(t,o){return e.isNode(t,o)&&/^(img|svg|picture|canvas)$/i.test(t.nodeName)},e.isBlock=function(e){return!!e&&"string"==typeof e.nodeName&&n.IS_BLOCK.test(e.nodeName)},e.isInlineBlock=function(e){return!!e&&e.nodeType===Node.ELEMENT_NODE&&-1!==["inline","inline-block"].indexOf(""+i.css(e,"display"))},e.canSplitBlock=function(e,t){return e&&e instanceof t.HTMLElement&&this.isBlock(e)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&void 0!==e.style&&!/^(fixed|absolute)/i.test(e.style.position)},e.prev=function(t,o,n,i){return void 0===i&&(i=!0),e.find(t,o,n,!1,"previousSibling",!!i&&"lastChild")},e.next=function(t,o,n,i){return void 0===i&&(i=!0),e.find(t,o,n,void 0,void 0,i?"firstChild":"")},e.find=function(t,o,n,i,r,s){if(void 0===i&&(i=!1),void 0===r&&(r="nextSibling"),void 0===s&&(s="firstChild"),i&&o(t))return t;var a,l=t;do{if(a=l[r],o(a))return a||!1;if(s&&a&&a[s]){var c=e.find(a[s],o,a,!0,r,s);if(c)return c}a||(a=l.parentNode),l=a}while(l&&l!==n);return!1},e.findWithCurrent=function(t,o,n,i,r){void 0===i&&(i="nextSibling"),void 0===r&&(r="firstChild");var s=t;do{if(o(s))return s||!1;if(r&&s&&s[r]){var a=e.findWithCurrent(s[r],o,s,i,r);if(a)return a}for(;s&&!s[i]&&s!==n;)s=s.parentNode;s&&s[i]&&s!==n&&(s=s[i])}while(s&&s!==n);return!1},e.isEmptyTextNode=function(e){return e&&e.nodeType===Node.TEXT_NODE&&(!e.nodeValue||0===e.nodeValue.replace(n.INVISIBLE_SPACE_REG_EXP,"").length)},e.isEmpty=function(t,o){return void 0===o&&(o=/^(img|svg|canvas|input|textarea|form)$/),!t||(t.nodeType===Node.TEXT_NODE?null===t.nodeValue||0===i.trim(t.nodeValue).length:!t.nodeName.toLowerCase().match(o)&&e.each(t,function(e){if(e&&e.nodeType===Node.TEXT_NODE&&null!==e.nodeValue&&0!==i.trim(e.nodeValue).length||e&&e.nodeType===Node.ELEMENT_NODE&&e.nodeName.toLowerCase().match(o))return!1}))},e.isNode=function(e,t){return"object"==typeof t?e instanceof t.Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},e.up=function(e,t,o){var n=e;if(!e)return!1;do{if(t(n))return n;if(n===o||!n.parentNode)break;n=n.parentNode}while(n&&n!==o);return!1},e.closest=function(t,o,n){var i;return i="function"==typeof o?o:o instanceof RegExp?function(e){return o.test(e.nodeName)}:function(e){return RegExp("^("+o+")$","i").test(e.nodeName)},e.up(t,i,n)},e.after=function(e,t){var o=e.parentNode;o&&(o.lastChild===e?o.appendChild(t):o.insertBefore(t,e.nextSibling))},e.moveContent=function(e,t,o){void 0===o&&(o=!1);var i=e.ownerDocument.createDocumentFragment();[].slice.call(e.childNodes).forEach(function(e){e.nodeType===Node.TEXT_NODE&&e.nodeValue===n.INVISIBLE_SPACE||i.appendChild(e)}),o&&t.firstChild?t.insertBefore(i,t.firstChild):t.appendChild(i)},e.all=function(t,o,n){void 0===n&&(n=!1);var i=t.childNodes?Array.prototype.slice.call(t.childNodes):[];if(o(t))return t;n&&(i=i.reverse()),i.forEach(function(t){e.all(t,o,n)})},e.wrapInline=function(t,o,n){var i,r=t,s=t,a=n.selection.save(),l=!1;do{l=!1,(i=r.previousSibling)&&!e.isBlock(i)&&(l=!0,r=i)}while(l);do{l=!1,(i=s.nextSibling)&&!e.isBlock(i)&&(l=!0,s=i)}while(l);var c="string"==typeof o?n.editorDocument.createElement(o):o;r.parentNode&&r.parentNode.insertBefore(c,r);for(var d=r;d&&(d=r.nextSibling,c.appendChild(r),r!==s&&d);)r=d;return n.selection.restore(a),c},e.wrap=function(e,t,o){var n=o.selection.save(),i="string"==typeof t?o.editorDocument.createElement(t):t;return e.parentNode?(e.parentNode.insertBefore(i,e),i.appendChild(e),o.selection.restore(n),i):null},e.findInline=function(t,o,n){var i=t,r=null;do{if(!i)break;if((r=o?i.previousSibling:i.nextSibling)||!i.parentNode||i.parentNode===n||!e.isInlineBlock(i.parentNode))break;i=i.parentNode}while(!r);for(;r&&e.isInlineBlock(r)&&(o?r.lastChild:r.firstChild);)r=o?r.lastChild:r.firstChild;return r},e.contains=function(e,t){for(;t.parentNode;){if(t.parentNode===e)return!0;t=t.parentNode}return!1},e.isOrContains=function(t,o,n){return void 0===n&&(n=!1),o&&t&&(t===o&&!n||e.contains(t,o))},e}()},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(6);t.Component=function(){function e(e){var t=this;this.__whoLocked="",this.isLocked=function(){return""!==t.__whoLocked},this.isLockedNotBy=function(e){return t.isLocked()&&t.__whoLocked!==e},this.__modulesInstances={},this.__isFullSize=!1,this.isFullSize=function(){return t.__isFullSize},e&&(this.jodit=e,e instanceof n.Jodit&&this.jodit.components&&this.jodit.components.push(this))}return e.prototype.destruct=function(){},e.prototype.getInstance=function(e,t){if(void 0===n.Jodit.modules[e])throw Error("Need real module name");return void 0===this.__modulesInstances[e]&&(this.__modulesInstances[e]=new n.Jodit.modules[e](this,t)),this.__modulesInstances[e]},e}()},function(e,t,o){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),i=this&&this.__assign||Object.assign||function(e){for(var t,o=1,n=arguments.length;n>o;o++){t=arguments[o];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e};Object.defineProperty(t,"__esModule",{value:!0});var r=o(4),s=o(0),a=o(2),l=o(3),c=function(e){function t(t,o,n){void 0===o&&(o="li"),void 0===n&&(n="jodit_toolbar_btn");var i=e.call(this,t)||this;return i.parentToolbar=null,i.container=i.jodit.ownerDocument.createElement(o),i.container.classList.add(n),i}return n(t,e),t.prototype.createIcon=function(e,t){var o=t?t.icon||t.name:e;if(!this.jodit.options.textIcons){var n=this.jodit.events.fire("getIcon",o,t,e),i=void 0;return t&&t.iconURL&&void 0===n?(i=s.dom("",this.jodit.ownerDocument),i.style.backgroundImage="url("+t.iconURL+")"):(void 0===n&&(n=v.getIcon(v.exists(o)?o:"empty")),i=s.dom(n,this.jodit.ownerDocument)),i.classList.add("jodit_icon","jodit_icon_"+e),i}return s.dom(''+this.jodit.i18n(t?t.name:e)+"",this.jodit.ownerDocument)},t}(r.Component),d=function(e){function t(o,n,i,r){void 0===r&&(r="jodit_toolbar_popup");var s=e.call(this,o,"div",r)||this;return s.target=n,s.current=i,s.className=r,s.isOpened=!1,s.close=function(e){s.isOpened&&(e&&l.Dom.isOrContains(s.container,e instanceof t?e.target:e)||(s.isOpened=!1,s.jodit.events.off("closeAllPopups",s.close),s.doClose(),s.container.parentNode&&s.container.parentNode.removeChild(s.container),s.jodit.selection&&s.jodit.selection.removeMarkers()))},s.container.setAttribute("data-editor_id",o.id),s.jodit.events.on(s.container,"mousedown touchstart",function(e){e.stopPropagation()}),s}return n(t,e),t.prototype.doOpen=function(e){e&&(l.Dom.detach(this.container),this.container.innerHTML='',this.container.appendChild(s.dom(e,this.jodit.ownerDocument)),this.container.style.display="block",this.container.style.marginLeft=null)},t.prototype.open=function(e,t,o){void 0===o&&(o=!1),this.jodit.events.fire("beforeOpenPopup closeAllPopups",this,e),o||this.jodit.events.on("closeAllPopups",this.close),this.container.classList.add(this.className+"-open"),this.doOpen(e),this.target.appendChild(this.container),void 0!==t&&this.container.classList.toggle("jodit_right",t),!o&&this.parentToolbar&&this.jodit.events.fire(this.parentToolbar,"afterOpenPopup",this.container),this.isOpened=!0},t.prototype.doClose=function(){},t}(c);t.ToolbarPopup=d;var u=function(e){function t(t,o,n,i){void 0===i&&(i="jodit_toolbar_list");var r=e.call(this,t,o,n,i)||this;return r.target=o,r.current=n,r.className=i,r.defaultControl={template:function(e,t,o){return r.jodit.i18n(o)}},r}return n(t,e),t.prototype.doClose=function(){this.toolbar&&this.toolbar.destruct()},t.prototype.doOpen=function(e){var t=this;this.toolbar=new g(this.jodit);var o="string"==typeof e.list?e.list.split(/[\s,]/):e.list;s.each(o,function(o,n){var r;if(void 0!==t.jodit.options.controls[n])r=new p(t.jodit,i({name:""+n},t.jodit.options.controls[n]),t.current);else if(void 0!==t.jodit.options.controls[o]&&"object"==typeof n)r=new p(t.jodit,i({name:""+o},t.jodit.options.controls[o],n),t.current);else{r=new p(t.jodit,{name:""+o,exec:e.exec,command:e.command,isActive:e.isActiveChild,isDisable:e.isDisableChild,args:[e.args&&e.args[0]||o,e.args&&e.args[1]||n]},t.current);var s=e.template||t.defaultControl.template;r.textBox.innerHTML=s(t.jodit,o,n)}t.toolbar.appendChild(r)}),this.container.appendChild(this.toolbar.container),this.container.style.marginLeft=null,this.toolbar.checkActiveButtons()},t}(d);t.ToolbarList=u;var p=function(e){function t(t,o,n){var i=e.call(this,t)||this;i.__disabled=!1,i.__actived=!1,i.checkActiveStatus=function(e,t){var o=0,n=0;return Object.keys(e).forEach(function(r){var a=e[r];"function"==typeof a?a(i.jodit,""+s.css(t,r))&&(o+=1):-1!==a.indexOf(""+s.css(t,r))&&(o+=1),n+=1}),n===o},i.onMouseDown=function(e){if(e.stopImmediatePropagation(),e.preventDefault(),i.disable)return!1;var t=i.control;if(t.list){var o=new u(i.jodit,i.container,i.target);o.parentToolbar=i.parentToolbar,o.open(t),i.jodit.events.fire("closeAllPopups",o.container)}else if(void 0!==t.exec&&"function"==typeof t.exec)t.exec(i.jodit,i.target||!!i.jodit.selection&&i.jodit.selection.current(),t,e,i.container),i.jodit.events.fire("synchro"),i.parentToolbar&&i.parentToolbar.immedateCheckActiveButtons(),i.jodit.events.fire("closeAllPopups afterExec");else if(void 0!==t.popup&&"function"==typeof t.popup){var n=new d(i.jodit,i.container,i.target);n.parentToolbar=i.parentToolbar,!1!==i.jodit.events.fire(s.camelCase("before-"+t.name+"-OpenPopup"),i.target||!!i.jodit.selection&&i.jodit.selection.current(),t,n)&&n.open(t.popup(i.jodit,i.target||!!i.jodit.selection&&i.jodit.selection.current(),t,n.close,i)),i.jodit.events.fire(s.camelCase("after-"+t.name+"-OpenPopup")+" closeAllPopups",n.container)}else(t.command||t.name)&&(i.jodit.execCommand(t.command||t.name,t.args&&t.args[0]||!1,t.args&&t.args[1]||null),i.jodit.events.fire("closeAllPopups"))},i.control=o,i.target=n,i.anchor=i.jodit.ownerDocument.createElement("a"),i.container.appendChild(i.anchor),t.options.showTooltip&&o.tooltip&&(t.options.useNativeTooltip?i.anchor.setAttribute("title",i.jodit.i18n(o.tooltip)+(o.hotkeys?"
"+s.asArray(o.hotkeys).join(" "):"")):i.tooltip=new f(i)),i.textBox=i.jodit.ownerDocument.createElement("span"),i.anchor.appendChild(i.textBox);var r=o.name.replace(/[^a-zA-Z0-9]/g,"_");if(o.getContent&&"function"==typeof o.getContent)l.Dom.detach(i.container),i.container.appendChild(s.dom(o.getContent(i.jodit,o,i),i.jodit.ownerDocument));else{if(o.list&&i.anchor){var a=i.jodit.ownerDocument.createElement("span");a.classList.add("jodit_with_dropdownlist-trigger"),i.container.classList.add("jodit_with_dropdownlist"),i.anchor.appendChild(a)}i.textBox.appendChild(i.createIcon(r,o))}return i.container.classList.add("jodit_toolbar_btn-"+r),o.isInput?i.container.classList.add("jodit_toolbar-input"):i.jodit.events.on(i.container,"mousedown touchend",i.onMouseDown),i}return n(t,e),Object.defineProperty(t.prototype,"disable",{get:function(){return this.__disabled},set:function(e){this.__disabled=e,this.container.classList.toggle("jodit_disabled",e),e?this.container.hasAttribute("disabled")||this.container.setAttribute("disabled","disabled"):this.container.hasAttribute("disabled")&&this.container.removeAttribute("disabled")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"active",{get:function(){return this.__actived},set:function(e){this.__actived=e,this.container.classList.toggle("jodit_active",e)},enumerable:!0,configurable:!0}),t.prototype.isDisable=function(){var e=void 0===this.control||void 0===this.control.mode?a.MODE_WYSIWYG:this.control.mode,t=e===a.MODE_SPLIT||e===this.jodit.getRealMode();return"function"==typeof this.control.isDisable&&(t=t&&!this.control.isDisable(this.jodit,this.control,this)),this.jodit.options.readonly&&-1===this.jodit.options.activeButtonsInReadOnly.indexOf(this.control.name)&&(t=!1),!t},t.prototype.isActive=function(){var e=this;if("function"==typeof this.control.isActive)return this.control.isActive(this.jodit,this.control,this);var t=!!this.jodit.selection&&this.jodit.selection.current();if(!t)return!1;var o,n,i;return!(!(this.control.tags||this.control.options&&this.control.options.tags)||(o=this.control.tags||this.control.options&&this.control.options.tags,n=t,!l.Dom.up(n,function(e){if(e&&-1!==o.indexOf(e.nodeName.toLowerCase()))return!0},this.jodit.editor)))||!(!(this.control.css||this.control.options&&this.control.options.css)||(i=this.control.css||this.control.options&&this.control.options.css,n=t,!l.Dom.up(n,function(t){if(t&&t.nodeType!==Node.TEXT_NODE)return e.checkActiveStatus(i,t)},this.jodit.editor)))},t.prototype.destruct=function(){this.jodit.events.off(this.container)},t}(c);t.ToolbarButton=p;var f=function(){function e(e){var t=this;this.button=e,this.timeout=0,this.show=function(){var e=function(){t.button.container.appendChild(t.container),t.container.style.marginLeft=-(t.container.offsetWidth-t.button.container.offsetWidth)/2+"px"},o=t.button.jodit.options.showTooltipDelay;t.button.jodit.events.fire("hideTooltip"),o?t.timeout=window.setTimeout(e,o):e()},this.hide=function(){window.clearTimeout(t.timeout),t.container.parentNode&&t.container.parentNode.removeChild(t.container)},e.control.tooltip&&(this.container=e.jodit.ownerDocument.createElement("div"),this.container.classList.add("jodit_tooltip"),this.container.innerHTML=e.jodit.i18n(e.control.tooltip)+(e.control.hotkeys?"
"+s.asArray(e.control.hotkeys).join(" "):""),e.jodit.events.on(e.anchor,"mouseenter",this.show).on(e.anchor,"mouseleave",this.hide).on("change updateToolbar scroll hidePopup closeAllPopups hideTooltip",this.hide))}return e}();t.Tooltip=f;var h=function(e){function t(t){var o=e.call(this,t)||this;return o.container.classList.add("jodit_toolbar_btn-break"),o}return n(t,e),t}(c);t.ToolbarBreak=h;var m=function(e){function t(t){var o=e.call(this,t)||this;return o.container.classList.add("jodit_toolbar_btn-separator"),o}return n(t,e),t}(c);t.ToolbarSeparator=m;var v=function(){function e(){}return e.exists=function(t){return void 0!==e.icons[t]},e.getIcon=function(t,o){return void 0===o&&(o=""),void 0!==e.icons[t]?e.icons[t]:o},e.icons={},e}();t.ToolbarIcon=v;var g=function(e){function t(t){var o=e.call(this,t,"ul","jodit_toolbar")||this;return o.__buttons=[],o.__getControlType=function(e){var t;if("string"!=typeof e)t=i({name:"empty"},e),void 0!==o.jodit.options.controls[t.name]&&(t=i({},o.jodit.options.controls[t.name],t));else{var n=e.split(/\./),r=o.jodit.options.controls;n.length>1&&void 0!==o.jodit.options.controls[n[0]]&&(r=o.jodit.options.controls[n[0]],e=n[1]),t=void 0!==r[e]?i({name:e},r[e]):{name:e,command:e,tooltip:e}}return t},o.immedateCheckActiveButtons=function(){o.jodit.isLocked()||(o.__buttons.filter(function(e){return e instanceof p}).forEach(function(e){e.disable=e.isDisable(),e.disable||(e.active=e.isActive()),"function"==typeof e.control.getLabel&&e.control.getLabel(o.jodit,e.control,e)}),o.jodit.events&&o.jodit.events.fire("updateToolbar"))},o.checkActiveButtons=s.debounce(o.immedateCheckActiveButtons,o.jodit.defaultTimeout),o.closeAll=function(){o.jodit.events.fire("closeAllPopups")},o.afterOpen=function(e){var t=s.offset(o.jodit.container,o.jodit,o.jodit.ownerDocument,!0),n=s.offset(e,o.jodit,o.jodit.ownerDocument,!0),i=s.css(e,"marginLeft"),r=0;if(n.left+n.width>t.left+t.width&&(r=-(n.left+n.width-(t.left+t.width)),s.css(e,{marginLeft:r+i}),n=s.offset(e,o.jodit,o.jodit.ownerDocument,!0)),t.left>n.left&&(n.left+n.width>t.left+t.width?s.css(e,{width:t.width}):(r=t.left-n.left,s.css(e,{marginLeft:r+i}))),r){var a=e.querySelector(".jodit_popup_triangle");a&&(a.style.marginLeft=-r+"px")}},o.listenEvents="changeStack mousedown mouseup keydown change afterInit readonly afterResize selectionchange changeSelection focus afterSetMode touchstart",o.initEvents=function(){o.jodit.events.on(o.jodit.ownerWindow,"mousedown touchend",o.closeAll).on(o,"afterOpenPopup",o.afterOpen).on(o.listenEvents,o.checkActiveButtons).on("afterSetMode focus",o.immedateCheckActiveButtons)},o.initEvents(),o}return n(t,e),t.prototype.getButtonsList=function(){return this.__buttons.map(function(e){return e instanceof p?e.control.name:""}).filter(function(e){return""!==e})},t.prototype.appendChild=function(e){this.__buttons.push(e),e.parentToolbar=this,this.container.appendChild(e.container)},t.prototype.removeChild=function(e){var t=this.__buttons.indexOf(e);-1!==t&&(this.__buttons.splice(t,1),e.container.parentNode===this.container&&this.container.removeChild(e.container)),e.parentToolbar=null},t.prototype.build=function(e,t,o){var n=this,i=!1;this.clear(),("string"==typeof e?e.split(/[,\s]+/):e).map(this.__getControlType).forEach(function(e){var t=null;if(-1===n.jodit.options.removeButtons.indexOf(e.name)){switch(e.name){case"\n":t=new h(n.jodit);break;case"|":i||(i=!0,t=new m(n.jodit));break;default:i=!1,t=new p(n.jodit,e,o)}t&&n.appendChild(t)}}),this.container.parentNode!==t&&t.appendChild(this.container),this.immedateCheckActiveButtons()},t.prototype.clear=function(){var e=this;this.__buttons.slice().forEach(function(t){e.removeChild(t),t.destruct()}),this.__buttons.length=0},t.prototype.destruct=function(){e.prototype.destruct.call(this),this.jodit.events.off(this.jodit.ownerWindow,"mousedown touchstart",this.closeAll).off(this,"afterOpenPopup",this.afterOpen).off(this.listenEvents,this.checkActiveButtons).off("afterSetMode focus",this.immedateCheckActiveButtons),this.clear()},t}(c);t.ToolbarCollection=g},function(e,t,o){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=o(4),r=o(13),s=o(9),a=o(3),l=o(11),c=o(2),d=o(0),u=o(0),p=o(1),f=o(5),h=o(28),m=o(16),v=o(17);t.Jodit=function(e){function t(o,n){var i=e.call(this)||this;if(i.version="3.1.95",i.components=[],i.storage=new m.Storage(new m.localStorageProvider),i.iframe=null,i.__plugins={},i.__defaultStyleDisplayKey="data-jodit-default-style-display",i.__defaultClassesKey="data-jodit-default-classes",i.isDestructed=!1,i.commands={},i.__selectionLocked=null,i.isLockedNotBy=function(e){return i.isLocked()&&i.__whoLocked!==e},i.mode=c.MODE_WYSIWYG,i.getVersion=function(){return i.version},i.buffer={},i.options=new p.OptionsDefault(n),i.editorDocument=i.options.ownerDocument,i.editorWindow=i.options.ownerWindow,i.ownerDocument=i.options.ownerDocument,i.ownerWindow=i.options.ownerWindow,i.events=new l.EventsNative(i.ownerDocument),"string"==typeof o)try{i.element=i.ownerDocument.querySelector(o)}catch(e){throw Error('String "'+o+'" should be valid HTML selector')}else i.element=o;if(!i.element||"object"!=typeof i.element||i.element.nodeType!==Node.ELEMENT_NODE||!i.element.cloneNode)throw Error('Element "'+o+'" should be string or HTMLElement instance');i.options.events&&Object.keys(i.options.events).forEach(function(e){i.events.on(e,i.options.events[e])}),i.selection=new r.Select(i),i.uploader=new s.Uploader(i),i.observer=new v.Observer(i),i.container=d.dom('
',i.ownerDocument);var a=null;i.options.inline&&(-1===["TEXTAREA","INPUT"].indexOf(i.element.nodeName)&&(i.container=i.element,i.element.setAttribute(i.__defaultClassesKey,""+i.element.className),a=i.container.innerHTML,i.container.innerHTML=""),i.container.classList.add("jodit_inline"),i.container.classList.add("jodit_container")),i.container.classList.add("jodit_"+(i.options.theme||"default")+"_theme"),i.options.zIndex&&(i.container.style.zIndex=""+parseInt(""+i.options.zIndex,10)),i.workplace=d.dom('
',i.ownerDocument),i.progress_bar=d.dom('
',i.ownerDocument),i.toolbar=new f.ToolbarCollection(i),i.options.toolbar&&i.toolbar.build(d.splitArray(i.options.buttons).concat(i.options.extraButtons),i.container),i.container.classList.add("jodit_toolbar_size-"+(-1!==["middle","large","small"].indexOf(i.options.toolbarButtonSize.toLowerCase())?i.options.toolbarButtonSize.toLowerCase():"middle")),i.options.textIcons&&i.container.classList.add("jodit_text_icons"),i.events.on(i.ownerWindow,"resize",function(){i.events&&i.events.fire("resize")}),i.container.appendChild(i.workplace),i.statusbar=new h.StatusBar(i,i.container),i.workplace.appendChild(i.progress_bar),i.element.parentNode&&i.element!==i.container&&i.element.parentNode.insertBefore(i.container,i.element),i.helper=u,i.id=i.element.getAttribute("id")||""+(new Date).getTime(),i.initPlugines(),i.__createEditor(),i.element!==i.container?i.setElementValue():null!==a&&i.setEditorValue(a),t.instances[i.id]=i;var g=i.options.defaultMode;if(i.options.saveModeInStorage){var _=i.storage.get("jodit_default_mode");null!==_&&(g=parseInt(_,10))}i.setMode(g),i.options.readonly&&i.setReadOnly(!0);try{i.editorDocument.execCommand("defaultParagraphSeparator",!1,i.options.enter.toLowerCase())}catch(e){}try{i.editorDocument.execCommand("enableObjectResizing",!1,!1)}catch(e){}try{i.editorDocument.execCommand("enableInlineTableEditing",!1,!1)}catch(e){}return i.events.fire("afterInit",i),i}return n(t,e),t.prototype.initPlugines=function(){var e=this,o=Array.isArray(this.options.disablePlugins)?this.options.disablePlugins.map(function(e){return e.toLowerCase()}):this.options.disablePlugins.toLowerCase().split(/[\s,]+/);Object.keys(t.plugins).forEach(function(n){-1===o.indexOf(n.toLowerCase())&&(e.__plugins[n]=new t.plugins[n](e))})},t.prototype.__createEditor=function(){var e=this;!1!==this.events.fire("createEditor")&&(this.editor=d.dom('
',this.ownerDocument),this.workplace.appendChild(this.editor)),this.options.editorCssClass&&this.editor.classList.add(this.options.editorCssClass),this.events.on("synchro",function(){e.setEditorValue()}).on(this.editor,"selectionchange selectionstart keydown keyup keypress mousedown mouseup mousepress click copy cut dragstart drop dragover paste resize touchstart touchend focus blur",function(t){if(!e.options.readonly&&e.events&&e.events.fire){if(!1===e.events.fire(t.type,t))return!1;e.setEditorValue()}}),this.options.spellcheck&&this.editor.setAttribute("spellcheck","true"),this.options.direction&&(this.editor.style.direction="rtl"===this.options.direction.toLowerCase()?"rtl":"ltr"),this.element!==this.container&&(this.element.style.display&&this.element.setAttribute(this.__defaultStyleDisplayKey,this.element.style.display),this.element.style.display="none"),this.options.triggerChangeEvent&&this.events.on("change",d.debounce(function(){e.events&&e.events.fire(e.element,"change")},this.defaultTimeout))},t.prototype.destruct=function(){var e=this;if(!this.isDestructed&&(this.isDestructed=!0,!1!==this.events.fire("beforeDestruct")&&this.editor)){var o=this.value;this.element!==this.container?this.element.hasAttribute(this.__defaultStyleDisplayKey)?(this.element.style.display=this.element.getAttribute(this.__defaultStyleDisplayKey),this.element.removeAttribute(this.__defaultStyleDisplayKey)):this.element.style.display="":this.element.hasAttribute(this.__defaultClassesKey)&&(this.element.className=this.element.getAttribute(this.__defaultClassesKey)||"",this.element.removeAttribute(this.__defaultClassesKey)),this.element.hasAttribute("style")&&!this.element.getAttribute("style")&&this.element.removeAttribute("style"),Object.keys(this.__plugins).forEach(function(t){void 0!==e.__plugins&&void 0!==e.__plugins[t]&&void 0!==e.__plugins[t].destruct&&"function"==typeof e.__plugins[t].destruct&&e.__plugins[t].destruct(),delete e.__plugins[t]}),this.components.forEach(function(e){void 0!==e.destruct&&"function"==typeof e.destruct&&e.destruct()}),delete this.selection,this.events.off(this.ownerWindow),this.events.off(this.ownerDocument),this.events.off(this.ownerDocument.body),this.events.off(this.element),this.events.off(this.editor),this.events.destruct(),delete this.events,this.workplace.parentNode&&this.workplace.parentNode.removeChild(this.workplace),this.editor.parentNode&&this.editor.parentNode.removeChild(this.editor),this.iframe&&this.iframe.parentNode&&this.iframe.parentNode.removeChild(this.iframe),this.container.parentNode&&this.container!==this.element&&this.container.parentNode.removeChild(this.container),delete this.editor,delete this.workplace,this.container===this.element&&(this.element.innerHTML=o),delete t.instances[this.id],delete this.container}},t.prototype.getElementValue=function(){return void 0!==this.element.value?this.element.value:this.element.innerHTML},t.prototype.getNativeEditorValue=function(){return this.editor?this.editor.innerHTML:this.getElementValue()},t.prototype.getEditorValue=function(e){void 0===e&&(e=!0);var t;if(void 0!==(t=this.events.fire("beforeGetValueFromEditor")))return t;t=this.getNativeEditorValue().replace(c.INVISIBLE_SPACE_REG_EXP,""),e&&(t=t.replace(/]+id="jodit_selection_marker_[^>]+><\/span>/g,"")),"
"===t&&(t="");var o={value:t};return this.events.fire("afterGetValueFromEditor",o),o.value},t.prototype.getEditorText=function(){if(this.editor)return this.editor.innerText;var e=this.ownerDocument.createElement("div");return e.innerHTML=this.getElementValue(),e.innerText},t.prototype.setElementValue=function(e){if("string"!=typeof e&&void 0!==e)throw Error("value must be string");void 0!==e?this.element!==this.container&&(void 0!==this.element.value?this.element.value=e:this.element.innerHTML=e):e=this.getElementValue(),e!==this.getEditorValue()&&this.setEditorValue(e)},t.prototype.setEditorValue=function(e){if(this.editor){if("string"!=typeof e&&void 0!==e)throw Error("value must be string");void 0!==e&&this.editor.innerHTML!==e&&(this.editor.innerHTML=e);var t=this.getElementValue(),o=this.getEditorValue();t!==o&&(this.setElementValue(o),this.events.fire("change",o,t))}},Object.defineProperty(t.prototype,"value",{get:function(){return this.getEditorValue()},set:function(e){this.setEditorValue(e)},enumerable:!0,configurable:!0}),t.prototype.execCustomCommands=function(e,t,o){var n=this;if(void 0===t&&(t=!1),void 0===o&&(o=null),e=e.toLowerCase(),void 0!==this.commands[e]){var i=void 0;return this.commands[e].forEach(function(r){var s;s="function"==typeof r?r:r.exec;var a=s.call(n,e,t,o);void 0!==a&&(i=a)}),i}},t.prototype.registerCommand=function(e,t){var o=this,n=e.toLowerCase();if(void 0===this.commands[n]&&(this.commands[n]=[]),this.commands[n].push(t),"function"!=typeof t){var i=this.options.commandToHotkeys[n]||this.options.commandToHotkeys[e]||t.hotkeys;i&&this.events.off(d.asArray(i).map(function(e){return e+".hotkey"}).join(" ")).on(d.asArray(i).map(function(e){return e+".hotkey"}).join(" "),function(){return o.execCommand(n)})}},t.prototype.execCommand=function(e,t,o){if(void 0===t&&(t=!1),void 0===o&&(o=null),!this.options.readonly||"selectall"===e){var n;if(e=e.toLowerCase(),n=this.events.fire("beforeCommand",e,t,o),!1!==n&&(n=this.execCustomCommands(e,t,o)),!1!==n)switch(this.selection.focus(),e){case"selectall":this.selection.select(this.editor,!0);break;default:try{n=this.editorDocument.execCommand(e,t,o)}catch(e){}}return this.events.fire("afterCommand",e,t,o),this.setEditorValue(),n}},t.prototype.lock=function(e){void 0===e&&(e="any"),this.isLocked()||(this.__whoLocked=e,this.__selectionLocked=this.selection.save(),this.editor.classList.add("jodit_disabled"))},t.prototype.unlock=function(){this.isLocked()&&(this.__whoLocked="",this.editor.classList.remove("jodit_disabled"),this.__selectionLocked&&this.selection.restore(this.__selectionLocked))},t.prototype.getMode=function(){return this.mode},t.prototype.isEditorMode=function(){return this.getRealMode()===c.MODE_WYSIWYG},t.prototype.getRealMode=function(){return this.getMode()!==c.MODE_SPLIT?this.getMode():a.Dom.isOrContains(this.editor,this.ownerDocument.activeElement)||a.Dom.isOrContains(this.toolbar.container,this.ownerDocument.activeElement)?c.MODE_WYSIWYG:c.MODE_SOURCE},t.prototype.setMode=function(e){var t=this,o=this.getMode(),n={mode:parseInt(""+e,10)},i=["jodit_wysiwyg_mode","jodit_source_mode","jodit_split_mode"];!1!==this.events.fire("beforeSetMode",n)&&(this.mode=d.inArray(n.mode,[c.MODE_SOURCE,c.MODE_WYSIWYG,c.MODE_SPLIT])?n.mode:c.MODE_WYSIWYG,this.options.saveModeInStorage&&this.storage.set("jodit_default_mode",this.mode),i.forEach(function(e){t.container.classList.remove(e)}),this.container.classList.add(i[this.mode-1]),o!==this.getMode()&&this.events.fire("afterSetMode"))},t.prototype.toggleMode=function(){var e=this.getMode();d.inArray(e+1,[c.MODE_SOURCE,c.MODE_WYSIWYG,this.options.useSplitMode?c.MODE_SPLIT:9])?e+=1:e=c.MODE_WYSIWYG,this.setMode(e)},t.prototype.i18n=function(e){for(var o=this,n=[],i=1;arguments.length>i;i++)n[i-1]=arguments[i];var r,s=void 0!==this.options&&this.options.debugLanguage,a=function(e){return n.length?d.sprintf.apply(o,[e].concat(n)):e},l="auto"===t.defaultOptions.language?d.defaultLanguage(t.defaultOptions.language):t.defaultOptions.language,c=d.defaultLanguage(this.options?this.options.language:l);return r=void 0!==this.options&&void 0!==t.lang[c]?t.lang[c]:void 0!==t.lang[l]?t.lang[l]:t.lang.en,void 0!==this.options&&void 0!==this.options.i18n[c]&&this.options.i18n[c][e]?a(this.options.i18n[c][e]):"string"==typeof r[e]&&r[e]?a(r[e]):s?"{"+e+"}":a("string"==typeof t.lang.en[e]&&t.lang.en[e]?t.lang.en[e]:e)},t.prototype.setReadOnly=function(e){this.options.readonly=e,e?this.editor&&this.editor.removeAttribute("contenteditable"):this.editor&&this.editor.setAttribute("contenteditable","true"),this.events&&this.events.fire("readonly",e)},t.prototype.getReadOnly=function(){return this.options.readonly},t.prototype.toggleFullSize=function(e){void 0===e&&(e=!this.__isFullSize),e!==this.__isFullSize&&(this.__isFullSize=e,this.events&&this.events.fire("toggleFullSize",e))},Object.defineProperty(t.prototype,"defaultTimeout",{get:function(){return this.options&&this.options.observer?this.options.observer.timeout:t.defaultOptions.observer.timeout},enumerable:!0,configurable:!0}),t.Array=function(e){return new d.JoditArray(e)},t.Object=function(e){return new d.JoditObject(e)},t.plugins={},t.modules={},t.instances={},t.lang={},t}(i.Component)},function(e,t,o){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),i=this&&this.__assign||Object.assign||function(e){for(var t,o=1,n=arguments.length;n>o;o++){t=arguments[o];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e};Object.defineProperty(t,"__esModule",{value:!0});var r=o(6),s=o(4),a=o(1),l=o(0),c=o(5),d=o(2),u=o(11);a.Config.prototype.dialog={zIndex:100002,resizable:!0,draggable:!0,fullsize:!1,fullsizeButton:!1};var p=function(e){function t(t,o){void 0===o&&(o={});var n=e.call(this,t)||this;n.lockSelect=function(){n.dialogbox.classList.add("jodit_dialog_box-moved")},n.unlockSelect=function(){n.dialogbox.classList.remove("jodit_dialog_box-moved")},n.destinition=document.body,n.document=document,n.window=window,n.destroyAfterClose=!1,n.moved=!1,n.iSetMaximization=!1,n.resizeble=!1,n.draggable=!1,n.startX=0,n.startY=0,n.startPoint={x:0,y:0,w:0,h:0},n.__isDestructed=!1,n.close=function(e){n.__isDestructed||(e&&(e.stopImmediatePropagation(),e.preventDefault()),n.jodit&&n.jodit.events&&n.jodit.events.fire(n,"beforeClose"),n.dialogbox.classList&&n.dialogbox.classList.remove("active"),n.iSetMaximization&&n.maximization(!1),n.destroyAfterClose&&n.destruct(),n.jodit&&n.jodit.events&&n.jodit.events.fire(n,"afterClose"))},t&&t instanceof r.Jodit&&(n.window=t.ownerWindow,n.document=t.ownerDocument,t.events.on("beforeDestruct",function(){n.destruct()})),n.events=t&&t.events?t.events:new u.EventsNative;var s=n;s.options=t&&t.options?t.options.dialog:a.Config.prototype.dialog,s.options=i({},s.options,o),s.dialogbox=l.dom('",n.document),t&&t.id&&s.dialogbox.setAttribute("data-editor_id",t.id),Object.defineProperty(s.dialogbox,"__jodit_dialog",{value:s}),s.dialog=s.dialogbox.querySelector(".jodit_dialog"),s.resizer=s.dialogbox.querySelector(".jodit_dialog_resizer"),s.jodit&&s.jodit.options&&s.jodit.options.textIcons&&s.dialogbox.classList.add("jodit_text_icons"),s.dialogbox_header=s.dialogbox.querySelector(".jodit_dialog_header>.jodit_dialog_header-title"),s.dialogbox_content=s.dialogbox.querySelector(".jodit_dialog_content"),s.dialogbox_footer=s.dialogbox.querySelector(".jodit_dialog_footer"),s.dialogbox_close=s.dialogbox.querySelector(".jodit_dialog_header>a.jodit_close"),s.dialogbox_fullsize=l.dom(''+c.ToolbarIcon.getIcon(o.fullsize?"shrink":"fullsize")+"",n.document),s.destinition.appendChild(s.dialogbox),s.dialogbox.addEventListener("close_dialog",s.close),s.dialogbox_close.addEventListener("mousedown",s.close),s.dialogbox_fullsize.addEventListener("click",function(){var e=s.maximization();s.dialogbox_fullsize.innerHTML=c.ToolbarIcon.getIcon(e?"shrink":"fullsize")}),s.events.on(n.window,"mousemove",s.onMouseMove.bind(s)).on(n.window,"mouseup",s.onMouseUp.bind(s)).on(n.window,"keydown",s.onKeyDown.bind(s)).on(n.window,"resize",s.onResize.bind(s));var d=s.dialogbox.querySelector(".jodit_dialog_header");return d&&d.addEventListener("mousedown",s.onHeaderMouseDown.bind(s)),s.options.resizable&&s.resizer.addEventListener("mousedown",s.onResizerMouseDown.bind(s)),n}return n(t,e),t.prototype.setSize=function(e,t){e&&l.css(this.dialog,"width",e),t&&l.css(this.dialog,"height",t)},t.prototype.setPosition=function(e,t){var o=this.window.innerWidth,n=this.window.innerHeight,i=o/2-this.dialog.offsetWidth/2,r=n/2-this.dialog.offsetHeight/2;void 0!==e&&void 0!==t&&(this.offsetX=e,this.offsetY=t,this.moved=Math.abs(e-i)>100||Math.abs(t-r)>100),this.dialog.style.left=(e||i)+"px",this.dialog.style.top=(t||r)+"px"},t.prototype.setElements=function(e,t){var o=this,n=[];l.asArray(t).forEach(function(t){var i=l.dom(t,o.document);n.push(i),i.parentNode!==e&&e.appendChild(i)}),[].slice.call(e.childNodes).forEach(function(t){-1===n.indexOf(t)&&e.removeChild(t)})},t.prototype.setTitle=function(e){this.setElements(this.dialogbox_header,e)},t.prototype.setContent=function(e){this.setElements(this.dialogbox_content,e)},t.prototype.setFooter=function(e){this.setElements(this.dialogbox_footer,e),this.dialog.classList.toggle("with_footer",!!e)},t.prototype.getZIndex=function(){return parseInt(this.dialogbox.style.zIndex||"0",10)},t.prototype.getMaxZIndexDialog=function(){var e,t,o=0,n=this;return l.$$(".jodit_dialog_box",this.destinition).forEach(function(i){e=i.__jodit_dialog,t=parseInt(l.css(i,"zIndex"),10),e.isOpened()&&!isNaN(t)&&t>o&&(n=e,o=t)}),n},t.prototype.setMaxZIndex=function(){var e=0,t=0;l.$$(".jodit_dialog_box",this.destinition).forEach(function(o){t=parseInt(l.css(o,"zIndex"),10),e=Math.max(isNaN(t)?0:t,e)}),this.dialogbox.style.zIndex=""+(e+1)},t.prototype.maximization=function(e){return"boolean"!=typeof e&&(e=!this.dialogbox.classList.contains("jodit_dialog_box-fullsize")),this.dialogbox.classList.toggle("jodit_dialog_box-fullsize",e),[this.destinition,this.destinition.parentNode].forEach(function(t){t&&t.classList&&t.classList.toggle("jodit_fullsize_box",e)}),this.iSetMaximization=e,e},t.prototype.open=function(e,t,o,n){this.jodit&&this.jodit.events&&!1===this.jodit.events.fire(this,"beforeOpen")||(this.destroyAfterClose=!0===o,this.options.fullsizeButton&&this.dialogbox_close.parentNode&&this.dialogbox_close.parentNode.appendChild(this.dialogbox_fullsize),void 0!==t&&this.setTitle(t),e&&this.setContent(e),this.dialogbox.classList.add("active"),n&&this.dialogbox.classList.add("jodit_modal"),this.setPosition(this.offsetX,this.offsetY),this.setMaxZIndex(),this.options.fullsize&&this.maximization(!0),this.jodit&&this.jodit.events&&this.jodit.events.fire(this,"afterOpen"))},t.prototype.isOpened=function(){return!this.__isDestructed&&this.dialogbox.classList.contains("active")},t.prototype.onMouseUp=function(){(this.draggable||this.resizeble)&&(this.draggable=!1,this.resizeble=!1,this.unlockSelect(),this.jodit&&this.jodit.events&&this.jodit.events.fire(this,"endResize endMove"))},t.prototype.onHeaderMouseDown=function(e){var t=e.target;!this.options.draggable||t&&t.nodeName.match(/^(INPUT|SELECT)$/)||(this.draggable=!0,this.startX=e.clientX,this.startY=e.clientY,this.startPoint.x=l.css(this.dialog,"left"),this.startPoint.y=l.css(this.dialog,"top"),this.setMaxZIndex(),e.preventDefault(),this.lockSelect(),this.jodit&&this.jodit.events&&this.jodit.events.fire(this,"startMove"))},t.prototype.onMouseMove=function(e){this.draggable&&this.options.draggable&&(this.setPosition(this.startPoint.x+e.clientX-this.startX,this.startPoint.y+e.clientY-this.startY),this.jodit&&this.jodit.events&&this.jodit.events.fire(this,"move",e.clientX-this.startX,e.clientY-this.startY),e.stopImmediatePropagation(),e.preventDefault()),this.resizeble&&this.options.resizable&&(this.setSize(this.startPoint.w+e.clientX-this.startX,this.startPoint.h+e.clientY-this.startY),this.jodit&&this.jodit.events&&this.jodit.events.fire(this,"resizeDialog",e.clientX-this.startX,e.clientY-this.startY),e.stopImmediatePropagation(),e.preventDefault())},t.prototype.onKeyDown=function(e){if(this.isOpened()&&e.which===d.KEY_ESC){var t=this.getMaxZIndexDialog();t?t.close():this.close(),e.stopImmediatePropagation()}},t.prototype.onResize=function(){!this.options.resizable||this.moved||!this.isOpened()||this.offsetX||this.offsetY||this.setPosition()},t.prototype.destruct=function(){this.__isDestructed||(this.dialogbox&&this.dialogbox.parentNode&&this.dialogbox.parentNode.removeChild(this.dialogbox),delete this.dialogbox,this.jodit&&this.jodit.events||this.events.destruct(),this.__isDestructed=!0)},t.prototype.onResizerMouseDown=function(e){this.resizeble=!0,this.startX=e.clientX,this.startY=e.clientY,this.startPoint.w=this.dialog.offsetWidth,this.startPoint.h=this.dialog.offsetHeight,this.lockSelect(),this.jodit.events&&this.jodit.events.fire(this,"startResize")},t}(s.Component);t.Dialog=p,t.Alert=function(e,t,o,n){void 0===n&&(n="jodit_alert"),"function"==typeof t&&(o=t,t=void 0);var i=new p,s=l.dom('
',i.document),a=l.dom(''+c.ToolbarIcon.getIcon("cancel")+""+r.Jodit.prototype.i18n("Ok")+"",i.document);return s.appendChild(l.dom(e,i.document)),a.addEventListener("click",function(){o&&"function"==typeof o&&!1===o(i)||i.close()}),i.setFooter([a]),i.open(s,t||" ",!0,!0),a.focus(),i},r.Jodit.Alert=t.Alert,t.Promt=function(e,t,o,n){var i=new p,s=l.dom(''+c.ToolbarIcon.getIcon("cancel")+""+r.Jodit.prototype.i18n("Cancel")+"",i.document),a=l.dom(''+c.ToolbarIcon.getIcon("check")+""+r.Jodit.prototype.i18n("Ok")+"",i.document),d=l.dom('
',i.document),u=l.dom("",i.document),f=l.dom("",i.document);"function"==typeof t&&(o=t,t=void 0),n&&u.setAttribute("placeholder",n),f.appendChild(l.dom(e,i.document)),d.appendChild(f),d.appendChild(u),s.addEventListener("click",i.close,!1);var h=function(){o&&"function"==typeof o&&!1===o(u.value)||i.close()};return a.addEventListener("click",h),d.addEventListener("submit",function(){return h(),!1}),i.setFooter([a,s]),i.open(d,t||" ",!0,!0),u.focus(),i},r.Jodit.Promt=t.Promt,t.Confirm=function(e,t,o){var n=new p,i=l.dom('
',n.document),s=l.dom("",n.document);"function"==typeof t&&(o=t,t=void 0),s.appendChild(l.dom(e,n.document)),i.appendChild(s);var a=l.dom(''+c.ToolbarIcon.getIcon("cancel")+""+r.Jodit.prototype.i18n("Cancel")+"",n.document);a.addEventListener("click",function(){o&&o(!1),n.close()});var d=function(){o&&o(!0),n.close()},u=l.dom(''+c.ToolbarIcon.getIcon("check")+""+r.Jodit.prototype.i18n("Yes")+"",n.document);return u.addEventListener("click",d),i.addEventListener("submit",function(){return d(),!1}),n.setFooter([u,a]),n.open(i,t||" ",!0,!0),u.focus(),n},r.Jodit.Confirm=t.Confirm},function(e,t,o){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=o(4);t.Plugin=function(e){function t(t){var o=e.call(this,t)||this;return t.events.on("afterInit",o.afterInit.bind(o,t)).on("beforeDestruct",o.beforeDestruct.bind(o,t)),o}return n(t,e),t.prototype.beforeDestruct=function(e){},t}(i.Component)},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(6),i=o(14),r=o(1),s=o(0),a=o(2),l=o(13);r.Config.prototype.enableDragAndDropFileToEditor=!0,r.Config.prototype.uploader={url:"",insertImageAsBase64URI:!1,imagesExtensions:["jpg","png","jpeg","gif"],headers:null,data:null,format:"json",prepareData:function(e){return e},isSuccess:function(e){return e.success},getMessage:function(e){return void 0!==e.data.messages&&Array.isArray(e.data.messages)?e.data.messages.join(" "):""},process:function(e){return e.data},error:function(e){this.jodit.events.fire("errorMessage",e.message,"error",4e3)},defaultHandlerSuccess:function(e){var t=this;e.files&&e.files.length&&e.files.forEach(function(o,n){var i=e.isImages&&e.isImages[n]?["img","src"]:["a","href"],r=i[0],s=i[1],a=t.jodit.editorDocument.createElement(r);a.setAttribute(s,e.baseurl+o),"a"===r&&(a.innerText=e.baseurl+o),"img"===r?t.selection.insertImage(a):t.selection.insertNode(a)})},defaultHandlerError:function(e){this.jodit.events.fire("errorMessage",e.message)},contentType:function(e){return(void 0===this.jodit.ownerWindow.FormData||"string"==typeof e)&&"application/x-www-form-urlencoded; charset=UTF-8"}},t.Uploader=function(){function e(e,t){var o=this;this.path="",this.source="default",this.jodit=e,this.selection=e instanceof n.Jodit?e.selection:new l.Select(e),this.options=s.extend(!0,{},r.Config.prototype.uploader,e instanceof n.Jodit?e.options.uploader:null,t),e instanceof n.Jodit&&e.options.enableDragAndDropFileToEditor&&e.options.uploader&&(e.options.uploader.url||e.options.uploader.insertImageAsBase64URI)&&e.events.on("afterInit",function(){o.bind(e.editor)})}return e.prototype.buildData=function(e){if(this.options.buildData&&"function"==typeof this.options.buildData)return this.options.buildData.call(this,e);if(void 0!==this.jodit.ownerWindow.FormData){if(e instanceof FormData)return e;if("string"==typeof e)return e;var t=new FormData;return Object.keys(e).forEach(function(o){t.append(o,e[o])}),t}return e},e.prototype.send=function(e,t){var o=this,n=this.buildData(e),r=function(e){return new i.Ajax(o.jodit||o,{xhr:function(){var e=new XMLHttpRequest;return void 0!==o.jodit.ownerWindow.FormData&&e.upload?e.upload.addEventListener("progress",function(e){if(e.lengthComputable){var t=e.loaded/e.total;t*=100,o.jodit.progress_bar.style.display="block",o.jodit.progress_bar.style.width=t+"%",100===t&&(o.jodit.progress_bar.style.display="none")}},!1):o.jodit.progress_bar.style.display="none",e},method:"POST",data:e,url:o.options.url,headers:o.options.headers,queryBuild:o.options.queryBuild,contentType:o.options.contentType.call(o,e),dataType:o.options.format||"json"}).send().then(t).catch(function(e){o.options.error.call(o,e)})};return n instanceof Promise?n.then(r).catch(function(e){o.options.error.call(o,e)}):r(n)},e.prototype.sendFiles=function(e,t,o,n){var i=this;if(!e)return Promise.reject(Error("Need files"));var r=this,a=[].slice.call(e);if(!a.length)return Promise.reject(Error("Need files"));var l=[];if(this.options.insertImageAsBase64URI){var c,d=void 0,u=this;for(d=0;a.length>d;d+=1)!function(){if((c=a[d])&&c.type){var e=c.type.match(/\/([a-z0-9]+)/i),o=e[1]?e[1].toLowerCase():"";if(-1!==u.options.imagesExtensions.indexOf(o)){var n=new FileReader;l.push(new Promise(function(e,o){n.onerror=o,n.onloadend=function(){var o={baseurl:"",files:[n.result],isImages:[!0]};"function"==typeof(t||r.options.defaultHandlerSuccess)&&(t||r.options.defaultHandlerSuccess).call(r,o),e(o)},n.readAsDataURL(c)})),a[d]=null}}}()}if(a=a.filter(function(e){return e}),a.length){var p=new FormData;p.append("path",r.path),p.append("source",r.source);for(var f=void 0,d=0;a.length>d;d+=1)if((f=a[d])&&f.type){var h=f.type.match(/\/([a-z0-9]+)/i),m=h[1]?h[1].toLowerCase():"";p.append("files["+d+"]",a[d],a[d].name||(""+Math.random()).replace(".","")+"."+m)}n&&n(p),r.options.data&&s.isPlainObject(r.options.data)&&Object.keys(r.options.data).forEach(function(e){p.append(e,r.options.data[e])}),r.options.prepareData.call(this,p),l.push(r.send(p,function(e){if(!i.options.isSuccess.call(r,e))return void(o||r.options.defaultHandlerError).call(r,Error(r.options.getMessage.call(r,e)));"function"==typeof(t||r.options.defaultHandlerSuccess)&&(t||r.options.defaultHandlerSuccess).call(r,r.options.process.call(r,e))}).then(function(){i.jodit.events&&i.jodit.events.fire("filesWereUploaded")}))}return Promise.all(l)},e.prototype.setPath=function(e){this.path=e},e.prototype.setSource=function(e){this.source=e},e.dataURItoBlob=function(e){var t,o=atob(e.split(",")[1]),n=e.split(",")[0].split(":")[1].split(";")[0],i=new ArrayBuffer(o.length),r=new Uint8Array(i);for(t=0;o.length>t;t+=1)r[t]=o.charCodeAt(t);return new Blob([r],{type:n})},e.prototype.bind=function(t,o,i){var r=this,l=this,c=function(t){var c,d,u,p=function(e){d&&(e.append("extension",u),e.append("mimetype",d.type))};if(t.clipboardData&&t.clipboardData.files&&t.clipboardData.files.length)return r.sendFiles(t.clipboardData.files,o,i),!1;if(s.browser("ff")||s.isIE()){if(t.clipboardData&&!t.clipboardData.types.length&&t.clipboardData.types[0]!==a.TEXT_PLAIN){var f=s.dom('
',r.jodit.ownerDocument);r.jodit.ownerDocument.body.appendChild(f);var h=r.jodit&&r.jodit instanceof n.Jodit?r.jodit.selection.save():null,m=function(){return h&&r.jodit&&r.jodit instanceof n.Jodit&&r.jodit.selection.restore(h)};f.focus(),setTimeout(function(){var t=f.firstChild;if(f.parentNode&&f.parentNode.removeChild(f),t&&t.hasAttribute("src")){var n=t.getAttribute("src")||"";m(),l.sendFiles([e.dataURItoBlob(n)],o,i)}},200)}}else if(t.clipboardData&&t.clipboardData.items&&t.clipboardData.items.length)for(c=0;t.clipboardData.items.length>c;c+=1)if("file"===t.clipboardData.items[c].kind&&"image/png"===t.clipboardData.items[c].type){if(d=t.clipboardData.items[c].getAsFile()){var v=d.type.match(/\/([a-z0-9]+)/i);u=v[1]?v[1].toLowerCase():"",r.sendFiles([d],o,i,p)}t.preventDefault();break}};this.jodit&&this.jodit.editor!==t?l.jodit.events.on(t,"paste",c):l.jodit.events.on("beforePaste",c);var d=function(e){return e.dataTransfer&&e.dataTransfer.files&&0!==e.dataTransfer.files.length};l.jodit.events.on(t,"dragend dragover dragenter dragleave drop",function(e){e.preventDefault()}).on(t,"dragover",function(e){d(e)&&(t.classList.contains("jodit_draghover")||t.classList.add("jodit_draghover"),e.preventDefault())}).on(t,"dragend",function(e){d(e)&&(t.classList.contains("jodit_draghover")&&t.classList.remove("jodit_draghover"),e.preventDefault())}).on(t,"drop",function(e){t.classList.remove("jodit_draghover"),d(e)&&(e.preventDefault(),e.stopImmediatePropagation(),r.sendFiles(e.dataTransfer.files,o,i))});var u=t.querySelector("input[type=file]");u&&l.jodit.events.on(u,"change",function(){l.sendFiles(this.files,o,i).then(function(){u.value="",/safari/i.test(navigator.userAgent)||(u.type="",u.type="file")})})},e.prototype.uploadRemoteImage=function(e,t,o){var n=this,i=this;i.send({action:"fileUploadRemote",url:e},function(e){if(i.options.isSuccess.call(i,e))"function"==typeof t?t.call(i,n.options.process.call(n,e)):n.options.defaultHandlerSuccess.call(i,n.options.process.call(n,e));else if("function"==typeof(o||i.options.defaultHandlerError))return void(o||n.options.defaultHandlerError).call(i,Error(i.options.getMessage.call(n,e)))})},e}()},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(6),i=o(0),r=o(3),s=o(9);!function(e){e.ColorPickerWidget=function(e,t,o){var s=i.normalizeColor(o),a=i.dom('
',e.ownerDocument),l=e.options.textIcons?"":n.Jodit.modules.ToolbarIcon.getIcon("eye"),c=e.options.textIcons?""+e.i18n("eraser")+"":n.Jodit.modules.ToolbarIcon.getIcon("eraser"),d=function(e){var t=[];return i.isPlainObject(e)?Object.keys(e).forEach(function(o){t.push('
'),t.push(d(e[o])),t.push("
")}):Array.isArray(e)&&e.forEach(function(e){t.push("'+(s===e?l:"")+"")}),t.join("")};return a.appendChild(i.dom("
"+d(e.options.colors)+"
",e.ownerDocument)),a.appendChild(i.dom("'+c+"",e.ownerDocument)),e.events.on(a,"mousedown touchend",function(o){o.stopPropagation();var s=o.target;if("SVG"!==s.tagName.toUpperCase()&&"PATH"!==s.tagName.toUpperCase()||!s.parentNode||(s=r.Dom.closest(s.parentNode,"A",e.editor)),"A"===s.tagName.toUpperCase()){var l=a.querySelector("a.active");l&&(l.classList.remove("active"),l.innerHTML="");var c=s.getAttribute("data-color")||"";if(c){s.innerHTML=n.Jodit.modules.ToolbarIcon.getIcon("eye"),s.classList.add("active");var d=i.hexToRgb(c);d&&(s.firstChild.style.fill="rgb("+(255-d.r)+","+(255-d.g)+","+(255-d.b)+")")}t&&"function"==typeof t&&t(c),o.preventDefault()}}),a},e.TabsWidget=function(e,t,o){var n=i.dom('
',e.ownerDocument),r=i.dom('
',e.ownerDocument),s=i.dom('
',e.ownerDocument),a={},l="",c=0;return n.appendChild(s),n.appendChild(r),i.each(t,function(t,n){var d=i.dom('
',e.ownerDocument),u=i.dom('',e.ownerDocument);l||(l=t),u.innerHTML=e.i18n(t),s.appendChild(u),d.appendChild("function"!=typeof n?i.dom(n,e.ownerDocument):i.dom('
',e.ownerDocument)),r.appendChild(d),e.events.on(u,"mousedown touchend",function(a){return i.$$("a",s).forEach(function(e){e.classList.remove("active")}),i.$$(".jodit_tab",r).forEach(function(e){e.classList.remove("active")}),u.classList.add("active"),d.classList.add("active"),"function"==typeof n&&n.call(e),a.stopPropagation(),o&&(o.__activeTab=t),!1}),a[t]={button:u,tab:d},c+=1}),c?(i.$$("a",s).forEach(function(e){e.style.width=(100/c).toFixed(10)+"%"}),o&&o.__activeTab&&a[o.__activeTab]?(a[o.__activeTab].button.classList.add("active"),a[o.__activeTab].tab.classList.add("active")):(a[l].button.classList.add("active"),a[l].tab.classList.add("active")),n):n},e.FileSelectorWidget=function(t,o,r,a,l){void 0===l&&(l=!0);var c,d={};if(o.upload&&t.options.uploader&&(t.options.uploader.url||t.options.uploader.insertImageAsBase64URI)){var u=i.dom('
'+t.i18n(l?"Drop image":"Drop file")+"
"+t.i18n("or click")+'
',t.ownerDocument);new s.Uploader(t).bind(u,function(e){"function"==typeof o.upload&&o.upload.call(t,{baseurl:e.baseurl,files:e.files})},function(e){t.events.fire("errorMessage",e.message)});var p=t.options.textIcons?"":n.Jodit.modules.ToolbarIcon.getIcon("upload");d[p+t.i18n("Upload")]=u}if(o.filebrowser&&(t.options.filebrowser.ajax.url||t.options.filebrowser.items.url)){var p=t.options.textIcons?"":n.Jodit.modules.ToolbarIcon.getIcon("folder");d[p+t.i18n("Browse")]=function(){a&&a(),o.filebrowser&&t.getInstance("FileBrowser").open(o.filebrowser,l)}}if(o.url){var f=i.dom('
",t.ownerDocument),h=f.querySelector("button"),m=f.querySelector("input[name=url]");c=null,r&&r.nodeType!==Node.TEXT_NODE&&("IMG"===r.tagName||i.$$("img",r).length)&&(c="IMG"===r.tagName?r:i.$$("img",r)[0],i.val(f,"input[name=url]",c.getAttribute("src")),i.val(f,"input[name=text]",c.getAttribute("alt")),h.innerText=t.i18n("Update")),r&&r.nodeType!==Node.TEXT_NODE&&"A"===r.nodeName&&(i.val(f,"input[name=url]",r.getAttribute("href")||""),i.val(f,"input[name=text]",r.getAttribute("title")||""),h.innerText=t.i18n("Update")),f.addEventListener("submit",function(e){return e.preventDefault(),e.stopPropagation(),i.val(f,"input[name=url]")?("function"==typeof o.url&&o.url.call(t,i.val(f,"input[name=url]"),i.val(f,"input[name=text]")),!1):(m.focus(),m.classList.add("jodit_error"),!1)},!1);var p=t.options.textIcons?"":n.Jodit.modules.ToolbarIcon.getIcon("link");d[p+" URL"]=f}return e.TabsWidget(t,d)}}(t.Widget||(t.Widget={}))},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.__store={}}return e.prototype.get=function(e,t){if(void 0!==this.__store[t])return this.__store[t][e]},e.prototype.indexOf=function(e,t,o){var n=this.get(e,t);if(n)for(var i=0;n.length>i;i+=1)if(n[i].originalCallback===o)return i;return!1},e.prototype.namespaces=function(){return Object.keys(this.__store)},e.prototype.events=function(e){return this.__store[e]?Object.keys(this.__store[e]):[]},e.prototype.set=function(e,t,o,n){void 0===n&&(n=!1),void 0===this.__store[t]&&(this.__store[t]={}),void 0===this.__store[t][e]&&(this.__store[t][e]=[]),n?this.__store[t][e].unshift(o):this.__store[t][e].push(o)},e}();t.EventsNative=function(){function e(e){var t=this;this.__defaultNameSpace="JoditEventDefaultNamespace",this.__key="__JoditEventsNativeNamespaces",this.current=[],this.doc=document,this.prepareEvent=function(e){e.cancelBubble||(e.type.match(/^touch/)&&e.changedTouches&&e.changedTouches.length&&["clientX","clientY","pageX","pageY"].forEach(function(t){Object.defineProperty(e,t,{value:e.changedTouches[0][t],configurable:!0,enumerable:!0})}),e.originalEvent||(e.originalEvent=e),"paste"===e.type&&void 0===e.clipboardData&&t.doc.defaultView.clipboardData&&Object.defineProperty(e,"clipboardData",{get:function(){return t.doc.defaultView.clipboardData},configurable:!0,enumerable:!0}))},this.__stopped=[],e&&(this.doc=e),this.__key+=(new Date).getTime()}return e.prototype.eachEvent=function(e,t){var o=this;e.split(/[\s,]+/).forEach(function(e){var n=e.split(".");t.call(o,n[0],n[1]||o.__defaultNameSpace)})},e.prototype.getStore=function(e){if(void 0===e[this.__key]){var t=new n;Object.defineProperty(e,this.__key,{enumerable:!1,configurable:!0,value:t})}return e[this.__key]},e.prototype.clearStore=function(e){void 0!==e[this.__key]&&delete e[this.__key]},e.prototype.on=function(e,t,o,n,i){var r=this;void 0===i&&(i=!1);var s="string"==typeof e?this:e,a="string"==typeof t?t:e,l=o;void 0===l&&"function"==typeof t&&(l=t);var c=this.getStore(s);if("string"!=typeof a||""===a)throw Error("Need events names");if("function"!=typeof l)throw Error("Need event handler");if(Array.isArray(s))return s.forEach(function(e){r.on(e,a,l,n)}),this;var d="function"==typeof s.addEventListener,u=this,p=function(){return l&&l.apply(this,arguments)};return d&&(p=function(e){if(u.prepareEvent(e),l&&!1===l.call(this,e))return e.preventDefault(),e.stopImmediatePropagation(),!1},n&&(p=function(e){u.prepareEvent(e);for(var t=e.target;t&&t!==this;){if(t.matches(n)){if(Object.defineProperty(e,"target",{value:t,configurable:!0,enumerable:!0}),l&&!1===l.call(t,e))return e.preventDefault(),!1;return}t=t.parentNode}})),this.eachEvent(a,function(e,t){if(""===e)throw Error("Need event name");if(!1===c.indexOf(e,t,l)){var o={event:e,originalCallback:l,syntheticCallback:p};c.set(e,t,o,i),t!==r.__defaultNameSpace&&c.set(e,r.__defaultNameSpace,o,i),d&&s.addEventListener(e,p,!1)}}),this},e.prototype.off=function(e,t,o){var n=this,i="string"==typeof e?this:e,r="string"==typeof t?t:e,s=this.getStore(i),a=o;if("string"!=typeof r||!r)return s.namespaces().forEach(function(e){n.off(i,"."+e)}),this.clearStore(i),this;void 0===a&&"function"==typeof t&&(a=t);var l="function"==typeof i.removeEventListener,c=function(e){l&&i.removeEventListener(e.event,e.syntheticCallback,!1)},d=function(e,t){if(""!==e){var o=s.get(e,t);if(o&&o.length){var i=!1;if("function"!=typeof a)o.forEach(c),o.length=0,i=!0;else{var r=s.indexOf(e,t,a);!1!==r&&(c(o[r]),o.splice(r,1),i=!0)}i&&t!==n.__defaultNameSpace&&d(e,n.__defaultNameSpace)}}else s.events(t).forEach(function(e){""!==e&&d(e,t)})};return this.eachEvent(r,function(e,t){t===n.__defaultNameSpace?s.namespaces().forEach(function(t){d(e,t)}):d(e,t)}),this},e.prototype.triggerNativeEvent=function(e,t){var o=this.doc.createEvent("HTMLEvents");"string"==typeof t?o.initEvent(t,!0,!0):(o.initEvent(t.type,t.bubbles,t.cancelable),["screenX","screenY","clientX","clientY","target","srcElement","currentTarget","timeStamp","which","keyCode"].forEach(function(e){Object.defineProperty(o,e,{value:t[e],enumerable:!0})}),Object.defineProperty(o,"originalEvent",{value:t,enumerable:!0})),e.dispatchEvent(o)},e.prototype.stopPropagation=function(e,t){var o=this,n="string"==typeof e?this:e,i="string"==typeof e?e:t;if("string"!=typeof i)throw Error("Need event names");var r=this.getStore(n);this.eachEvent(i,function(e,t){var n=r.get(e,t);n&&o.__stopped.push(n)})},e.prototype.removeStop=function(e){if(e){var t=this.__stopped.indexOf(e);-1!==t&&this.__stopped.splice(t,1)}},e.prototype.isStopped=function(e){return void 0!==e&&-1!==this.__stopped.indexOf(e)},e.prototype.fire=function(e,t){for(var o=this,n=[],i=2;arguments.length>i;i++)n[i-2]=arguments[i];var r,s=void 0,a="string"==typeof e?this:e,l="string"==typeof e?e:t,c="string"==typeof e?[t].concat(n):n,d="function"==typeof a.dispatchEvent;if(!d&&"string"!=typeof l)throw Error("Need events names");var u=this.getStore(a);return"string"!=typeof l&&d?this.triggerNativeEvent(a,t):this.eachEvent(l,function(e,t){if(d)o.triggerNativeEvent(a,e);else{var n=u.get(e,t);if(n)try{n.every(function(t){return!o.isStopped(n)&&(o.current.push(e),r=t.syntheticCallback.apply(a,c),o.current.pop(),void 0!==r&&(s=r),!0)})}finally{o.removeStop(n)}}}),s},e.prototype.destruct=function(){this.off(this)},e}()},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Component=o(4).Component,t.Ajax=o(14).Ajax,t.ContextMenu=o(15).ContextMenu,t.Cookie=o(60).Cookie;var n=o(7);t.Dialog=n.Dialog,t.Alert=n.Alert,t.Confirm=n.Confirm,t.Promt=n.Promt,t.Dom=o(3).Dom,t.EventsNative=o(11).EventsNative,t.FileBrowser=o(61).FileBrowser,t.Helpers=o(0),t.ImageEditor=o(62).ImageEditor,t.Observer=o(17).Observer,t.Select=o(13).Select,t.Snapshot=o(18).Snapshot,t.Table=o(20).Table;var i=o(5);t.ToolbarIcon=i.ToolbarIcon,t.ToolbarCollection=i.ToolbarCollection,t.ToolbarButton=i.ToolbarButton,t.Stack=o(19).Stack,t.Uploader=o(9).Uploader},function(e,t,o){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=o(2),r=o(4),s=o(0),a=o(3),l=o(2),c=o(2);t.Select=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isMarker=function(e){return a.Dom.isNode(e,t.jodit.editorWindow)&&e.nodeType===Node.ELEMENT_NODE&&"SPAN"===e.nodeName&&e.hasAttribute("data-"+i.MARKER_CLASS)},t.marker=function(e,o){void 0===e&&(e=!1);var n=null;o&&(n=o.cloneRange(),n.collapse(e));var r=t.jodit.editorDocument.createElement("span");return r.id=i.MARKER_CLASS+"_"+ +new Date+"_"+(""+Math.random()).slice(2),r.style.lineHeight="0",r.style.display="none",r.setAttribute("data-"+i.MARKER_CLASS,e?"start":"end"),r.appendChild(t.jodit.editorDocument.createTextNode(i.INVISIBLE_SPACE)),n&&a.Dom.isOrContains(t.jodit.editor,e?n.startContainer:n.endContainer)&&n.insertNode(r),r},t.focus=function(){var e=t.jodit;if(!t.isFocused()){if(e.options.iframe&&s.isIE())for(var o=0;1e5>o&&"complete"!==e.editorDocument.readyState;)o++;e.iframe&&e.iframe.focus(),e.editorWindow.focus(),e.editor.focus();var n=e.editorWindow.getSelection(),i=e.editorDocument.createRange();return n.rangeCount&&t.current()||(i.setStart(e.editor,0),i.collapse(!0),n.removeAllRanges(),n.addRange(i)),!0}return!1},t.eachSelection=function(e){var o=t.jodit.editorWindow.getSelection();if(o.rangeCount){var n=o.getRangeAt(0),i=[],r=n.startContainer===t.jodit.editor?t.jodit.editor.childNodes[n.startOffset]:n.startContainer,s=n.endContainer===t.jodit.editor?t.jodit.editor.childNodes[n.endOffset-1]:n.endContainer;a.Dom.find(r,function(e){return!e||e===t.jodit.editor||a.Dom.isEmptyTextNode(e)||t.isMarker(e)||i.push(e),e===s},t.jodit.editor,!0,"nextSibling",!1);var l=function(o){if(o.nodeName.match(/^(UL|OL)$/))return[].slice.call(o.childNodes).forEach(l);if("LI"===o.nodeName)if(o.firstChild)o=o.firstChild;else{var n=t.jodit.editorDocument.createTextNode(c.INVISIBLE_SPACE);o.appendChild(n),o=n}e(o)};0===i.length&&a.Dom.isEmptyTextNode(r)&&i.push(r),i.forEach(l)}},t.applyCSS=function(e,o,n){void 0===o&&(o="span");var r,l=function(e){return null!==e&&!a.Dom.isEmptyTextNode(e)&&!t.isMarker(e)},c=function(e){return"FONT"!==e.nodeName&&e.nodeType===Node.ELEMENT_NODE&&(s.isPlainObject(n)&&!1!==s.each(n,function(t,o){var n=s.css(e,t,void 0,!0);return null!==n&&""!==n&&-1!==o.indexOf((""+n).toLowerCase())})||"function"==typeof n&&n(t.jodit,e))},d=function(e){return(RegExp("^"+e.nodeName+"$","i").test(o)||!(!n||!c(e)))&&l(e)},u=function(t){d(t)&&("SPAN"===t.nodeName&&e&&Object.keys(e).forEach(function(o){0===r||s.css(t,o)==s.normilizeCSSValue(o,e[o])?(s.css(t,o,""),void 0===r&&(r=0)):(s.css(t,o,e[o]),void 0===r&&(r=1))}),a.Dom.isBlock(t)||t.getAttribute("style")&&"SPAN"===t.nodeName||(a.Dom.unwrap(t),void 0===r&&(r=0)))};if(t.isCollapsed()){var p=!1;if(t.current()&&a.Dom.closest(t.current(),o,t.jodit.editor)){p=!0;var f=a.Dom.closest(t.current(),o,t.jodit.editor);f&&t.setCursorAfter(f)}if("SPAN"===o.toUpperCase()||!p){var h=t.jodit.editorDocument.createElement(o);h.appendChild(t.jodit.editorDocument.createTextNode(i.INVISIBLE_SPACE)),t.insertNode(h,!1,!1),"SPAN"===o.toUpperCase()&&e&&s.css(h,e),t.setCursorIn(h)}}else{var m=t.save();s.normalizeNode(t.jodit.editor.firstChild),t.jodit.editorDocument.execCommand("fontsize",!1,7),s.$$('font[size="7"]',t.jodit.editor).forEach(function(n){if(a.Dom.next(n,l,n.parentNode)||a.Dom.prev(n,l,n.parentNode)||!d(n.parentNode)||n.parentNode===t.jodit.editor||a.Dom.isBlock(n.parentNode)&&!i.IS_BLOCK.test(o))if(n.firstChild&&!a.Dom.next(n.firstChild,l,n)&&!a.Dom.prev(n.firstChild,l,n)&&d(n.firstChild))u(n.firstChild);else if(a.Dom.closest(n,d,t.jodit.editor)){var c=t.jodit.editorDocument.createRange(),p=a.Dom.closest(n,d,t.jodit.editor);c.setStartBefore(p),c.setEndBefore(n);var f=c.extractContents();f.textContent&&s.trim(f.textContent).length||!f.firstChild||a.Dom.unwrap(f.firstChild),p.parentNode&&p.parentNode.insertBefore(f,p),c.setStartAfter(n),c.setEndAfter(p);var h=c.extractContents();h.textContent&&s.trim(h.textContent).length||!h.firstChild||a.Dom.unwrap(h.firstChild),a.Dom.after(p,h),u(p)}else{var m=[],v=void 0;n.firstChild&&a.Dom.find(n.firstChild,function(e){return e&&d(e)?(void 0===v&&(v=!0),m.push(e)):void 0===v&&(v=!1),!1},n,!0),m.forEach(a.Dom.unwrap),v||(void 0===r&&(r=1),1===r&&s.css(a.Dom.replace(n,o,!1,!1,t.jodit.editorDocument),e&&"SPAN"===o.toUpperCase()?e:{}))}else u(n.parentNode);n.parentNode&&a.Dom.unwrap(n)}),t.restore(m)}},t}return n(t,e),t.prototype.remove=function(){var e=this.jodit.editorWindow.getSelection();if(this.current())for(var t=0;e.rangeCount>t;t+=1)e.getRangeAt(t).deleteContents(),e.getRangeAt(t).collapse(!0)},t.prototype.insertCursorAtPoint=function(e,t){var o,n=this.jodit.editorDocument;this.removeMarkers();try{var i=null;if(n.caretPositionFromPoint?(o=n.caretPositionFromPoint(e,t),i=n.createRange(),i.setStart(o.offsetNode,o.offset)):n.caretRangeFromPoint&&(o=n.caretRangeFromPoint(e,t),i=n.createRange(),i.setStart(o.startContainer,o.startOffset)),i&&void 0!==this.jodit.editorWindow.getSelection){i.collapse(!0);var r=this.jodit.editorWindow.getSelection();r.removeAllRanges(),r.addRange(i)}else if(void 0!==n.body.createTextRange){var s=n.body.createTextRange();s.moveToPoint(e,t);var a=s.duplicate();a.moveToPoint(e,t),s.setEndPoint("EndToEnd",a),s.select()}return!0}catch(e){}return!1},t.prototype.removeMarkers=function(){s.$$("span[data-"+i.MARKER_CLASS+"]",this.jodit.editor).forEach(function(e){e.parentNode&&e.parentNode.removeChild(e)})},t.prototype.restore=function(e){var t=this;if(void 0===e&&(e=[]),Array.isArray(e)){var o=this.jodit.editorWindow.getSelection();o.removeAllRanges(),e.forEach(function(e){var n=t.jodit.editorDocument.createRange(),i=t.jodit.editor.querySelector("#"+e.endId),r=t.jodit.editor.querySelector("#"+e.startId);if(r){if(e.collapsed||!i){var s=r.previousSibling;s&&s.nodeType===Node.TEXT_NODE?n.setStart(s,s.nodeValue?s.nodeValue.length:0):n.setStartBefore(r),r.parentNode&&r.parentNode.removeChild(r),n.collapse(!0)}else n.setStartAfter(r),r.parentNode&&r.parentNode.removeChild(r),n.setEndBefore(i),i.parentNode&&i.parentNode.removeChild(i);o.addRange(n)}})}},t.prototype.save=function(){var e=this.jodit.editorWindow.getSelection();if(!e.rangeCount)return[];var t,o,n,i=[],r=e.rangeCount,s=[];for(t=0;r>t;t+=1)s[t]=e.getRangeAt(t),s[t].collapsed?(o=this.marker(!0,s[t]),i[t]={startId:o.id,collapsed:!0,startMarker:o.outerHTML}):(o=this.marker(!0,s[t]),n=this.marker(!1,s[t]),i[t]={startId:o.id,endId:n.id,collapsed:!1,startMarker:o.outerHTML,endMarker:n.outerHTML});for(e.removeAllRanges(),t=r-1;t>=0;--t){var a=this.jodit.editorDocument.getElementById(i[t].startId);if(a)if(i[t].collapsed)s[t].setStartAfter(a),s[t].collapse(!0);else if(s[t].setStartBefore(a),i[t].endId){var l=this.jodit.editorDocument.getElementById(i[t].endId);l&&s[t].setEndAfter(l)}try{e.addRange(s[t].cloneRange())}catch(e){}}return i},t.prototype.isCollapsed=function(){var e,t=this.jodit.editorWindow.getSelection();for(e=0;t.rangeCount>e;e+=1)if(!t.getRangeAt(e).collapsed)return!1;return!0},t.prototype.isFocused=function(){return this.jodit.editorDocument.hasFocus&&this.jodit.editorDocument.hasFocus()&&this.jodit.editor===this.jodit.editorDocument.activeElement},t.prototype.current=function(e){if(void 0===e&&(e=!0),this.jodit.getRealMode()===i.MODE_WYSIWYG&&void 0!==this.jodit.editorWindow.getSelection){var t=this.jodit.editorWindow.getSelection();if(t&&t.rangeCount>0){var o=t.getRangeAt(0),n=o.startContainer,r=!1,s=function(e){return r?e.lastChild:e.firstChild};if(n.nodeType!==Node.TEXT_NODE&&(n=o.startContainer.childNodes[o.startOffset],n||(n=o.startContainer.childNodes[o.startOffset-1],r=!0),n&&t.isCollapsed&&n.nodeType!==Node.TEXT_NODE))if(!r&&n.previousSibling&&n.previousSibling.nodeType===Node.TEXT_NODE)n=n.previousSibling;else if(e)for(var l=s(n);l;){if(l&&l.nodeType===Node.TEXT_NODE){n=l;break}l=s(l)}if(n&&a.Dom.isOrContains(this.jodit.editor,n))return n}}return!1},t.prototype.insertNode=function(e,t,o){if(void 0===t&&(t=!0),void 0===o&&(o=!0),!(e instanceof this.jodit.editorWindow.Node))throw Error("Parameter node most be instance of Node");if(this.focus(),!this.jodit.editorWindow.getSelection)throw Error("Jodit does'n support this browser");var n=this.jodit.editorWindow.getSelection();if(this.isCollapsed()||this.jodit.execCommand("Delete"),n.rangeCount){var i=n.getRangeAt(0);a.Dom.isOrContains(this.jodit.editor,i.commonAncestorContainer)?(i.deleteContents(),i.insertNode(e)):this.jodit.editor.appendChild(e)}else this.jodit.editor.appendChild(e);t&&this.setCursorAfter(e),o&&this.jodit.events&&this.jodit.events.fire("synchro"),this.jodit.events&&this.jodit.events.fire("afterInsertNode",e)},t.prototype.insertHTML=function(e){if(""!==e){var t,o,n=this.jodit.editorDocument.createElement("div"),i=this.jodit.editorDocument.createDocumentFragment();if(!this.isFocused()&&this.jodit.isEditorMode()&&this.focus(),e instanceof this.jodit.editorWindow.Node?a.Dom.isNode(e,this.jodit.editorWindow)&&n.appendChild(e):n.innerHTML=""+e,this.jodit.isEditorMode()||!1!==this.jodit.events.fire("insertHTML",n.innerHTML)){for(t=n.lastChild;n.firstChild;)t=n.firstChild,i.appendChild(n.firstChild);for(this.insertNode(i,!1),t?this.setCursorAfter(t):this.setCursorIn(i),o=this.jodit.editor.lastChild;o&&o.nodeType===Node.TEXT_NODE&&o.previousSibling&&o.nodeValue&&/^\s*$/.test(o.nodeValue);)o=o.previousSibling;t&&(o&&t===o&&t.nodeType===Node.ELEMENT_NODE&&this.jodit.editor.appendChild(this.jodit.editorDocument.createElement("br")),this.setCursorAfter(t))}}},t.prototype.insertImage=function(e,t){void 0===t&&(t={});var o="string"==typeof e?s.dom('',this.jodit.editorDocument):s.dom(e,this.jodit.editorDocument);"string"==typeof e&&o.setAttribute("src",e);var n=""+this.jodit.options.imageDefaultWidth;n&&"auto"!==n&&0>(n+"").indexOf("px")&&0>(n+"").indexOf("%")&&(n+="px"),t.width=n,t&&"object"==typeof t&&s.each(t,function(e,t){o.style[t]=e});var i=function(){(o.offsetHeight>o.naturalHeight||o.offsetWidth>o.naturalWidth)&&(o.style.width="",o.style.height=""),o.removeEventListener("load",i)};o.addEventListener("load",i),o.complete&&i(),this.insertNode(o),this.jodit.events.fire("afterInsertImage",o)},t.prototype.setCursorAfter=function(e){var t=this;if(!(e instanceof this.jodit.editorWindow.Node))throw Error("Parameter node most be instance of Node");if(!a.Dom.up(e,function(e){return e===t.jodit.editor||e&&e.parentNode===t.jodit.editor},this.jodit.editor))throw Error("Node element must be in editor");var o=this.jodit.editorDocument.createRange(),n=!1;return e.nodeType!==Node.TEXT_NODE?(n=this.jodit.editorDocument.createTextNode(i.INVISIBLE_SPACE),o.setStartAfter(e),o.insertNode(n),o.selectNode(n)):o.setEnd(e,null!==e.nodeValue?e.nodeValue.length:0),o.collapse(!1),this.selectRange(o),n},t.prototype.cursorInTheEdge=function(e,t){var o=this.jodit.editorWindow.getSelection(),n=o.rangeCount?o.getRangeAt(0):null;if(!n)return null;var i=e?n.startContainer:n.endContainer,r=function(o){return e?a.Dom.prev(o,function(e){return!!e},t):a.Dom.next(o,function(e){return!!e},t)},s=function(e){for(;e;)if((e=r(e))&&!a.Dom.isEmptyTextNode(e)&&"BR"!==e.nodeName)return!1};if(i.nodeType===Node.TEXT_NODE){var c=i.nodeValue||"";if(e&&n.startOffset>c.length-c.replace(l.INVISIBLE_SPACE_REG_EXP_START,"").length)return!1;if(!e&&n.startOffset0){var t=e.getRangeAt(0),o=t.cloneContents(),n=this.jodit.editorDocument.createElement("div");return n.appendChild(o),n.innerHTML}return""},t}(r.Component)},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(1),i=o(0);n.Config.prototype.defaultAjaxOptions={dataType:"json",method:"GET",url:"",data:null,contentType:"application/x-www-form-urlencoded; charset=UTF-8",headers:{"X-REQUESTED-WITH":"XMLHttpRequest"},withCredentials:!0,xhr:function(){return new("undefined"==typeof XDomainRequest?XMLHttpRequest:XDomainRequest)}},t.Ajax=function(){function e(e,t){var o=this;this.success_response_codes=[200,201,202],this.jodit=e,this.options=i.extend(!0,{},n.Config.prototype.defaultAjaxOptions,t),this.options.xhr&&(this.xhr=this.options.xhr()),e&&e.events&&e.events.on("beforeDestruct",function(){o.abort()})}return e.prototype.__buildParams=function(e,t){if(this.options.queryBuild&&"function"==typeof this.options.queryBuild)return this.options.queryBuild.call(this,e,t);if("string"==typeof e||this.jodit.ownerWindow.FormData&&e instanceof this.jodit.ownerWindow.FormData)return e;var o,n,i,r=[];for(o in e)e.hasOwnProperty(o)&&(n=t?t+"["+o+"]":o,i=e[o],r.push("object"==typeof i?this.__buildParams(i,n):encodeURIComponent(n)+"="+encodeURIComponent(i)));return r.join("&")},e.prototype.abort=function(){return this.xhr.abort(),this},e.prototype.send=function(){var e=this;return new Promise(function(t,o){var n=function(t){switch(e.options.dataType){case"json":try{t=JSON.parse(t)}catch(t){return void o.call(e.xhr,t)}}return t};if(e.xhr.onabort=function(){o(Error(e.xhr.statusText))},e.xhr.onerror=function(){o(Error(e.xhr.statusText))},e.xhr.ontimeout=function(){o(Error(e.xhr.statusText))},e.xhr.onload=function(){e.response=e.xhr.responseText,e.status=e.xhr.status,t.call(e.xhr,n(e.response))},e.xhr.onreadystatechange=function(){if(e.xhr.readyState===XMLHttpRequest.DONE){var i=e.xhr.responseText;e.response=i,e.status=e.xhr.status,e.success_response_codes.indexOf(e.xhr.status)>-1?t.call(e.xhr,n(i)):o.call(e.xhr,Error(e.xhr.statusText||e.jodit.i18n("Connection error!")))}},e.xhr.withCredentials=e.options.withCredentials||!1,!e.options.url)throw Error("Need URL for AJAX request");e.xhr.open(e.options.method||"get",e.options.url,!0),e.options.contentType&&e.xhr.setRequestHeader&&e.xhr.setRequestHeader("Content-type",e.options.contentType),e.options.headers&&e.xhr.setRequestHeader&&i.each(e.options.headers,function(t,o){e.xhr.setRequestHeader(t,o)}),setTimeout(function(){e.xhr.send(e.options.data?e.__buildParams(e.options.data):void 0)},0)})},e}()},function(e,t,o){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=o(4),r=o(0),s=o(5);t.ContextMenu=function(e){function t(t){var o=e.call(this,t)||this;return o.hide=function(){o.context.classList.remove("jodit_context_menu-show"),o.jodit.ownerWindow.removeEventListener("mouseup",o.hide)},o.context=r.dom('
',t.ownerDocument),t.ownerDocument.body.appendChild(o.context),o}return n(t,e),t.prototype.destruct=function(){this.context&&this.context.parentNode&&this.context.parentNode.removeChild(this.context)},t.prototype.show=function(e,t,o,n){var i=this,a=this;Array.isArray(o)&&(n&&(this.context.style.zIndex=""+n),this.context.innerHTML="",o.forEach(function(e){if(e){var t=r.dom(''+(e.icon?s.ToolbarIcon.getIcon(e.icon):"")+"",i.jodit.ownerDocument),o=t.querySelector("span");t.addEventListener("click",function(t){return e.exec&&e.exec.call(a,t),a.hide(),!1}),o.innerText=a.jodit.i18n(e.title||""),a.context.appendChild(t)}}),r.css(a.context,{left:e,top:t}),this.jodit.ownerWindow.addEventListener("mouseup",a.hide),this.context.classList.add("jodit_context_menu-show"))},t}(i.Component)},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(0);t.localStorageProvider=function(){function e(){}return e.prototype.set=function(e,t){localStorage.setItem(e,""+t)},e.prototype.get=function(e){return localStorage.getItem(e)},e}(),t.Storage=function(){function e(e){this.provider=e,this.prefix="Jodit_"}return e.prototype.set=function(e,t){this.provider.set(n.camelCase(this.prefix+e),t)},e.prototype.get=function(e){return this.provider.get(n.camelCase(this.prefix+e))},e}()},function(e,t,o){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=o(1),r=o(4),s=o(18),a=o(19),l=o(0);i.Config.prototype.observer={timeout:100};var c=function(){function e(e,t,o){this.observer=o,this.oldValue=e,this.newValue=t}return e.prototype.undo=function(){this.observer.snapshot.restore(this.oldValue)},e.prototype.redo=function(){this.observer.snapshot.restore(this.newValue)},e}();t.Command=c,t.Observer=function(e){function t(t){var o=e.call(this,t)||this;o.onChangeStack=function(){o.__newValue=o.snapshot.make(),s.Snapshot.equal(o.__newValue,o.__startValue)||(o.stack.push(new c(o.__startValue,o.__newValue,o)),o.__startValue=o.__newValue,o.changeStack())},o.stack=new a.Stack,o.snapshot=new s.Snapshot(t);var n=l.debounce(o.onChangeStack,t.defaultTimeout);return t.events.on("afterInit",function(){o.__startValue=o.snapshot.make(),t.events.on("changeSelection selectionstart selectionchange mousedown mouseup keydown keyup",function(){o.__startValue.html===o.jodit.getNativeEditorValue()&&(o.__startValue=o.snapshot.make())}).on("change",function(){o.snapshot.isBlocked||n()})}),o}return n(t,e),t.prototype.redo=function(){this.stack.redo()&&(this.__startValue=this.snapshot.make(),this.changeStack())},t.prototype.undo=function(){this.stack.undo()&&(this.__startValue=this.snapshot.make(),this.changeStack())},t.prototype.clear=function(){this.__startValue=this.snapshot.make(),this.stack.clear(),this.changeStack()},t.prototype.changeStack=function(){this.jodit&&this.jodit.events&&this.jodit.events.fire("changeStack")},t}(r.Component)},function(e,t,o){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=o(4),r=o(3);t.Snapshot=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isBlocked=!1,t}return n(t,e),t.countNodesBeforeInParent=function(e){if(!e.parentNode)return 0;var t,o=e.parentNode.childNodes,n=0,i=null;for(t=0;o.length>t;t+=1){if(!i||o[t].nodeType===Node.TEXT_NODE&&""===o[t].textContent||i.nodeType===Node.TEXT_NODE&&o[t].nodeType===Node.TEXT_NODE||(n+=1),o[t]===e)return n;i=o[t]}return 0},t.prototype.calcHierarchyLadder=function(e){var o=[];if(!e||!e.parentNode||!r.Dom.isOrContains(this.jodit.editor,e))return[];for(;e&&e!==this.jodit.editor;)e&&o.push(t.countNodesBeforeInParent(e)),e=e.parentNode;return o.reverse()},t.strokeOffset=function(e,t){for(;e&&e.nodeType===Node.TEXT_NODE;)(e=e.previousSibling)&&e.nodeType===Node.TEXT_NODE&&null!==e.textContent&&(t+=e.textContent.length);return t},t.prototype.make=function(){var e={html:"",range:{startContainer:[],startOffset:0,endContainer:[],endOffset:0}};e.html=this.jodit.getNativeEditorValue();var o=this.jodit.editorWindow.getSelection();if(o&&o.rangeCount){var n=o.getRangeAt(0),i=this.calcHierarchyLadder(n.startContainer),r=t.strokeOffset(n.startContainer,n.startOffset),s=this.calcHierarchyLadder(n.endContainer),a=t.strokeOffset(n.endContainer,n.endOffset);i.length||n.startContainer===this.jodit.editor||(r=0),s.length||n.endContainer===this.jodit.editor||(a=0),e.range={startContainer:i,startOffset:r,endContainer:s,endOffset:a}}return e},t.prototype.getElementByLadder=function(e){var t,o=this.jodit.editor;for(t=0;o&&e.length>t;t+=1)o=o.childNodes[e[t]];return o},t.equal=function(e,t){return e.html===t.html&&JSON.stringify(e.range)===JSON.stringify(t.range)},t.prototype.restore=function(e){this.isBlocked=!0,this.jodit.setEditorValue(e.html);try{if(e.range){var t=this.jodit.editorDocument.createRange();t.setStart(this.getElementByLadder(e.range.startContainer),e.range.startOffset),t.setEnd(this.getElementByLadder(e.range.endContainer),e.range.endOffset),this.jodit.selection.selectRange(t)}}catch(e){}this.isBlocked=!1},t}(i.Component)},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Stack=function(){function e(){this.commands=[],this.stackPosition=-1}return e.prototype.clearRedo=function(){this.commands.length=this.stackPosition+1},e.prototype.clear=function(){this.commands.length=0,this.stackPosition=-1},e.prototype.push=function(e){this.clearRedo(),this.commands.push(e),this.stackPosition+=1},e.prototype.undo=function(){return!!this.canUndo()&&(this.commands[this.stackPosition]&&this.commands[this.stackPosition].undo(),this.stackPosition-=1,!0)},e.prototype.redo=function(){return!!this.canRedo()&&(this.stackPosition+=1,this.commands[this.stackPosition]&&this.commands[this.stackPosition].redo(),!0)},e.prototype.canUndo=function(){return this.stackPosition>=0},e.prototype.canRedo=function(){return this.commands.length-1>this.stackPosition},e}()},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(0),i=o(2),r=o(3);t.Table=function(){function e(){}return e.addSelected=function(e){e.setAttribute(i.JODIT_SELECTED_CELL_MARKER,"1")},e.restoreSelection=function(e){e.removeAttribute(i.JODIT_SELECTED_CELL_MARKER)},e.getAllSelectedCells=function(e){return e?n.$$("td["+i.JODIT_SELECTED_CELL_MARKER+"],th["+i.JODIT_SELECTED_CELL_MARKER+"]",e):[]},e.getRowsCount=function(e){return e.rows.length},e.getColumnsCount=function(t){return e.formalMatrix(t).reduce(function(e,t){return Math.max(e,t.length)},0)},e.formalMatrix=function(e,t){for(var o=[[]],n=Array.prototype.slice.call(e.rows),i=0,r=void 0;n.length>i;i+=1){var s=Array.prototype.slice.call(n[i].cells);for(r=0;s.length>r;r+=1)if(!1===function(e,n){void 0===o[n]&&(o[n]=[]);for(var i,r,s=e.colSpan,a=e.rowSpan,l=0;o[n][l];)l+=1;for(r=0;a>r;r+=1)for(i=0;s>i;i+=1){if(void 0===o[n+r]&&(o[n+r]=[]),t&&!1===t(e,n+r,l+i,s,a))return!1;o[n+r][l+i]=e}}(s[r],i))return o}return o},e.formalCoordinate=function(t,o,n){void 0===n&&(n=!1);var i=0,r=0,s=1,a=1;return e.formalMatrix(t,function(e,t,l,c,d){if(o===e)return i=t,r=l,s=c||1,a=d||1,n&&(r+=(c||1)-1,i+=(d||1)-1),!1}),[i,r,s,a]},e.appendRow=function(t,o,i){void 0===o&&(o=!1),void 0===i&&(i=!0);var r,s=e.getColumnsCount(t),a=t.ownerDocument.createElement("tr");for(r=0;s>r;r+=1)a.appendChild(t.ownerDocument.createElement("td"));i&&o&&o.nextSibling?o.parentNode&&o.parentNode.insertBefore(a,o.nextSibling):!i&&o?o.parentNode&&o.parentNode.insertBefore(a,o):(n.$$(":scope>tbody",t)[0]||t).appendChild(a)},e.removeRow=function(t,o){var i,s=e.formalMatrix(t),a=t.rows[o];n.each(s[o],function(e,n){if(i=!1,0>o-1||s[o-1][e]!==n)if(s[o+1]&&s[o+1][e]===n){if(n.parentNode===a&&n.parentNode.nextSibling){i=!0;for(var l=e+1;s[o+1][l]===n;)l+=1;var c=r.Dom.next(n.parentNode,function(e){return e&&e.nodeType===Node.ELEMENT_NODE&&"TR"===e.nodeName},t);s[o+1][l]?c.insertBefore(n,s[o+1][l]):c.appendChild(n)}}else n.parentNode&&n.parentNode.removeChild(n);else i=!0;if(i&&(n.parentNode===a||n!==s[o][e-1])){var d=n.rowSpan;d-1>1?n.setAttribute("rowspan",""+(d-1)):n.removeAttribute("rowspan")}}),a&&a.parentNode&&a.parentNode.removeChild(a)},e.appendColumn=function(t,o,n){void 0===n&&(n=!0);var i,r=e.formalMatrix(t);for(void 0===o&&(o=e.getColumnsCount(t)-1),i=0;r.length>i;i+=1){var s=t.ownerDocument.createElement("td"),a=r[i][o],l=!1;n?(r[i]&&a&&o+1>=r[i].length||a!==r[i][o+1])&&(a.nextSibling?a.parentNode&&a.parentNode.insertBefore(s,a.nextSibling):a.parentNode&&a.parentNode.appendChild(s),l=!0):(0>o-1||r[i][o]!==r[i][o-1]&&r[i][o].parentNode)&&(a.parentNode&&a.parentNode.insertBefore(s,r[i][o]),l=!0),l||r[i][o].setAttribute("colspan",""+(parseInt(r[i][o].getAttribute("colspan")||"1",10)+1))}},e.removeColumn=function(t,o){var i,r=e.formalMatrix(t);n.each(r,function(e,t){var n=t[o];if(i=!1,0>o-1||r[e][o-1]!==n?t.length>o+1&&r[e][o+1]===n?i=!0:n.parentNode&&n.parentNode.removeChild(n):i=!0,i&&(0>e-1||n!==r[e-1][o])){var s=n.colSpan;s-1>1?n.setAttribute("colspan",""+(s-1)):n.removeAttribute("colspan")}})},e.getSelectedBound=function(t,o){var n,i,r,s=[[1/0,1/0],[0,0]],a=e.formalMatrix(t);for(n=0;a.length>n;n+=1)for(i=0;a[n].length>i;i+=1)-1!==o.indexOf(a[n][i])&&(s[0][0]=Math.min(n,s[0][0]),s[0][1]=Math.min(i,s[0][1]),s[1][0]=Math.max(n,s[1][0]),s[1][1]=Math.max(i,s[1][1]));for(n=s[0][0];s[1][0]>=n;n+=1)for(r=1,i=s[0][1];s[1][1]>=i;i+=1){for(;a[n][i-r]&&a[n][i]===a[n][i-r];)s[0][1]=Math.min(i-r,s[0][1]),s[1][1]=Math.max(i-r,s[1][1]),r+=1;for(r=1;a[n][i+r]&&a[n][i]===a[n][i+r];)s[0][1]=Math.min(i+r,s[0][1]),s[1][1]=Math.max(i+r,s[1][1]),r+=1;for(r=1;a[n-r]&&a[n][i]===a[n-r][i];)s[0][0]=Math.min(n-r,s[0][0]),s[1][0]=Math.max(n-r,s[1][0]),r+=1;for(r=1;a[n+r]&&a[n][i]===a[n+r][i];)s[0][0]=Math.min(n+r,s[0][0]),s[1][0]=Math.max(n+r,s[1][0]),r+=1}return s},e.normalizeTable=function(t){var o,n,i,r,s=[],a=e.formalMatrix(t);for(n=0;a[0].length>n;n+=1){for(i=1e6,r=!1,o=0;a.length>o;o+=1)if(void 0!==a[o][n]){if(2>a[o][n].colSpan){r=!0;break}i=Math.min(i,a[o][n].colSpan)}if(!r)for(o=0;a.length>o;o+=1)void 0!==a[o][n]&&e.__mark(a[o][n],"colspan",a[o][n].colSpan-i+1,s)}for(o=0;a.length>o;o+=1){for(i=1e6,r=!1,n=0;a[o].length>n;n+=1)if(void 0!==a[o][n]){if(2>a[o][n].rowSpan){r=!0;break}i=Math.min(i,a[o][n].rowSpan)}if(!r)for(n=0;a[o].length>n;n+=1)void 0!==a[o][n]&&e.__mark(a[o][n],"rowspan",a[o][n].rowSpan-i+1,s)}for(o=0;a.length>o;o+=1)for(n=0;a[o].length>n;n+=1)void 0!==a[o][n]&&(a[o][n].hasAttribute("rowspan")&&1===a[o][n].rowSpan&&a[o][n].removeAttribute("rowspan"),a[o][n].hasAttribute("colspan")&&1===a[o][n].colSpan&&a[o][n].removeAttribute("colspan"),a[o][n].hasAttribute("class")&&!a[o][n].getAttribute("class")&&a[o][n].removeAttribute("class"));e.__unmark(s)},e.mergeSelected=function(t){var o,r=e.getSelectedBound(t,e.getAllSelectedCells(t)),s=0,a=null,l=0,c=[],d=0,u=0,p=[];r&&(r[0][0]-r[1][0]||r[0][1]-r[1][1])&&(e.formalMatrix(t,function(t,i,f,h,m){if(!(r[0][0]>i||i>r[1][0]||r[0][1]>f||f>r[1][1])){if(o=t,o.__i_am_already_was)return;o.__i_am_already_was=!0,i===r[0][0]&&o.style.width&&(s+=o.offsetWidth),""!==n.trim(t.innerHTML.replace(//g,""))&&c.push(t.innerHTML),h>1&&(d+=h-1),m>1&&(u+=m-1),a?e.__mark(o,"remove",1,p):(a=t,l=f)}}),d=r[1][1]-r[0][1]+1,u=r[1][0]-r[0][0]+1,a&&(d>1&&e.__mark(a,"colspan",d,p),u>1&&e.__mark(a,"rowspan",u,p),s&&(e.__mark(a,"width",(s/t.offsetWidth*100).toFixed(i.ACCURACY)+"%",p),l&&e.setColumnWidthByDelta(t,l,0,!0,p)),a.innerHTML=c.join("
"),delete a.__i_am_already_was,e.__unmark(p),e.normalizeTable(t),n.each([].slice.call(t.rows),function(e,t){t.cells.length||t.parentNode.removeChild(t)})))},e.splitHorizontal=function(t){var o,n,i,s,a,l=[];e.getAllSelectedCells(t).forEach(function(c){n=t.ownerDocument.createElement("td"),n.appendChild(t.ownerDocument.createElement("br")),i=t.ownerDocument.createElement("tr"),o=e.formalCoordinate(t,c),2>c.rowSpan?(e.formalMatrix(t,function(t,n,i){o[0]===n&&o[1]!==i&&t!==c&&e.__mark(t,"rowspan",t.rowSpan+1,l)}),r.Dom.after(r.Dom.closest(c,"tr",t),i),i.appendChild(n)):(e.__mark(c,"rowspan",c.rowSpan-1,l),e.formalMatrix(t,function(e,n,i){n>o[0]&&o[0]+c.rowSpan>n&&o[1]>i&&e.parentNode.rowIndex===n&&(a=e),n>o[0]&&e===c&&(s=t.rows[n])}),a?r.Dom.after(a,n):s.insertBefore(n,s.firstChild)),c.colSpan>1&&e.__mark(n,"colspan",c.colSpan,l),e.__unmark(l),e.restoreSelection(c)}),this.normalizeTable(t)},e.splitVertical=function(t){var o,n,s,a=[];e.getAllSelectedCells(t).forEach(function(l){o=e.formalCoordinate(t,l),2>l.colSpan?e.formalMatrix(t,function(t,n,i){o[1]===i&&o[0]!==n&&t!==l&&e.__mark(t,"colspan",t.colSpan+1,a)}):e.__mark(l,"colspan",l.colSpan-1,a),n=t.ownerDocument.createElement("td"),n.appendChild(t.ownerDocument.createElement("br")),l.rowSpan>1&&e.__mark(n,"rowspan",l.rowSpan,a);var c=l.offsetWidth;r.Dom.after(l,n),s=c/t.offsetWidth/2,e.__mark(l,"width",(100*s).toFixed(i.ACCURACY)+"%",a),e.__mark(n,"width",(100*s).toFixed(i.ACCURACY)+"%",a),e.__unmark(a),e.restoreSelection(l)}),e.normalizeTable(t)},e.__mark=function(e,t,o,n){n.push(e),e.__marked_value||(e.__marked_value={}),e.__marked_value[t]=void 0===o?1:o},e.__unmark=function(e){e.forEach(function(e){e.__marked_value&&(n.each(e.__marked_value,function(t,o){switch(t){case"remove":e.parentNode&&e.parentNode.removeChild(e);break;case"rowspan":o>1?e.setAttribute("rowspan",o):e.removeAttribute("rowspan");break;case"colspan":o>1?e.setAttribute("colspan",o):e.removeAttribute("colspan");break;case"width":e.style.width=o}delete e.__marked_value[t]}),delete e.__marked_value)})},e.setColumnWidthByDelta=function(t,o,n,r,s){var a,l,c,d=e.formalMatrix(t);for(a=0;d.length>a;a+=1)l=d[a][o].offsetWidth,c=(l+n)/t.offsetWidth*100,e.__mark(d[a][o],"width",c.toFixed(i.ACCURACY)+"%",s);r||e.__unmark(s)},e}()},function(e,t,o){"use strict";this&&this.__assign||Object,o(22),o(23);var n=o(6),i=o(5),r=o(2),s=o(29),a=o(12),l=o(70),c=o(76),d=o(1);Object.keys(r).forEach(function(e){n.Jodit[e]=r[e]});var u=function(e){return"__esModule"!==e};Object.keys(c).filter(u).forEach(function(e){i.ToolbarIcon.icons[e.replace("_","-")]=c[e]}),Object.keys(a).filter(u).forEach(function(e){n.Jodit.modules[e]=a[e]}),Object.keys(s).filter(u).forEach(function(e){n.Jodit.plugins[e]=s[e]}),Object.keys(l).filter(u).forEach(function(e){n.Jodit.lang[e]=l[e]}),n.Jodit.defaultOptions=new d.Config,d.OptionsDefault.prototype=n.Jodit.defaultOptions,e.exports=n.Jodit},function(e,t){},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),o(24),o(25),function(e){e.matches||(e.matches=void 0!==e.matchesSelector?e.matchesSelector:function(e){var t=this.ownerDocument.querySelectorAll(e),o=this;return Array.prototype.some.call(t,function(e){return e===o})})}(Element.prototype)},function(e,t){"document"in window.self&&("classList"in document.createElement("_")&&(!document.createElementNS||"classList"in document.createElementNS("http://www.w3.org/2000/svg","g"))||function(e){"use strict";if("Element"in e){var t=e.Element.prototype,o=Object,n=String.prototype.trim||function(){return this.replace(/^\s+|\s+$/g,"")},i=Array.prototype.indexOf||function(e){for(var t=0,o=this.length;o>t;t++)if(t in this&&this[t]===e)return t;return-1},r=function(e,t){this.name=e,this.code=DOMException[e],this.message=t},s=function(e,t){if(""===t)throw new r("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(t))throw new r("INVALID_CHARACTER_ERR","String contains an invalid character");return i.call(e,t)},a=function(e){for(var t=n.call(e.getAttribute("class")||""),o=t?t.split(/\s+/):[],i=0,r=o.length;r>i;i++)this.push(o[i]);this._updateClassName=function(){e.setAttribute("class",""+this)}},l=a.prototype=[],c=function(){return new a(this)};if(r.prototype=Error.prototype,l.item=function(e){return this[e]||null},l.contains=function(e){return e+="",-1!==s(this,e)},l.add=function(){var e,t=arguments,o=0,n=t.length,i=!1;do{e=t[o]+"",-1===s(this,e)&&(this.push(e),i=!0)}while(++oo;o++)e=arguments[o],t.call(this,e)}};t("add"),t("remove")}if(e.classList.toggle("c3",!1),e.classList.contains("c3")){var o=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return 1 in arguments&&!this.contains(e)==!t?t:o.call(this,e)}}e=null}())},function(e,t,o){"use strict";e.exports=o(26).polyfill()},function(e,t,o){(function(t){!function(t,o){e.exports=function(){"use strict";function e(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}function o(e){return"function"==typeof e}function n(e){R=e}function i(e){H=e}function r(){return void 0!==B?function(){B(a)}:s()}function s(){var e=setTimeout;return function(){return e(a,1)}}function a(){for(var e=0;P>e;e+=2)(0,X[e])(X[e+1]),X[e]=void 0,X[e+1]=void 0;P=0}function l(e,t){var o=this,n=new this.constructor(d);void 0===n[G]&&q(n);var i=o._state;if(i){var r=arguments[i-1];H(function(){return x(i,n,r,o._result)})}else C(o,n,e,t);return n}function c(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var o=new t(d);return _(o,e),o}function d(){}function u(){return new TypeError("You cannot resolve a promise with itself")}function p(){return new TypeError("A promises callback cannot return that same promise.")}function f(e){try{return e.then}catch(e){return Q.error=e,Q}}function h(e,t,o,n){try{e.call(t,o,n)}catch(e){return e}}function m(e,t,o){H(function(e){var n=!1,i=h(o,t,function(o){n||(n=!0,t!==o?_(e,o):y(e,o))},function(t){n||(n=!0,w(e,t))},"Settle: "+(e._label||" unknown promise"));!n&&i&&(n=!0,w(e,i))},e)}function v(e,t){t._state===J?y(e,t._result):t._state===Z?w(e,t._result):C(t,void 0,function(t){return _(e,t)},function(t){return w(e,t)})}function g(e,t,n){t.constructor===e.constructor&&n===l&&t.constructor.resolve===c?v(e,t):n===Q?(w(e,Q.error),Q.error=null):void 0===n?y(e,t):o(n)?m(e,t,n):y(e,t)}function _(t,o){t===o?w(t,u()):e(o)?g(t,o,f(o)):y(t,o)}function b(e){e._onerror&&e._onerror(e._result),E(e)}function y(e,t){e._state===$&&(e._result=t,e._state=J,0!==e._subscribers.length&&H(E,e))}function w(e,t){e._state===$&&(e._state=Z,e._result=t,H(b,e))}function C(e,t,o,n){var i=e._subscribers,r=i.length;e._onerror=null,i[r]=t,i[r+J]=o,i[r+Z]=n,0===r&&e._state&&H(E,e)}function E(e){var t=e._subscribers,o=e._state;if(0!==t.length){for(var n=void 0,i=void 0,r=e._result,s=0;t.length>s;s+=3)n=t[s],i=t[s+o],n?x(o,n,i,r):i(r);e._subscribers.length=0}}function j(e,t){try{return e(t)}catch(e){return Q.error=e,Q}}function x(e,t,n,i){var r=o(n),s=void 0,a=void 0,l=void 0,c=void 0;if(r){if(s=j(n,i),s===Q?(c=!0,a=s.error,s.error=null):l=!0,t===s)return void w(t,p())}else s=i,l=!0;t._state!==$||(r&&l?_(t,s):c?w(t,a):e===J?y(t,s):e===Z&&w(t,s))}function T(e,t){try{t(function(t){_(e,t)},function(t){w(e,t)})}catch(t){w(e,t)}}function S(){return ee++}function q(e){e[G]=ee++,e._state=void 0,e._result=void 0,e._subscribers=[]}function D(){return Error("Array Methods must be provided an Array")}function N(e){return new te(this,e).promise}function L(e){var t=this;return new t(z(e)?function(o,n){for(var i=e.length,r=0;i>r;r++)t.resolve(e[r]).then(o,n)}:function(e,t){return t(new TypeError("You must pass an array to race."))})}function I(e){var t=this,o=new t(d);return w(o,e),o}function A(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function k(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function M(){var e=void 0;if(void 0!==t)e=t;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw Error("polyfill failed because global object is unavailable in this environment")}var o=e.Promise;if(o){var n=null;try{n=Object.prototype.toString.call(o.resolve())}catch(e){}if("[object Promise]"===n&&!o.cast)return}e.Promise=oe}var O=void 0;O=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var z=O,P=0,B=void 0,R=void 0,H=function(e,t){X[P]=e,X[P+1]=t,2===(P+=2)&&(R?R(a):K())},W="undefined"!=typeof window?window:void 0,F=W||{},V=F.MutationObserver||F.WebKitMutationObserver,Y="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),U="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,X=Array(1e3),K=void 0;K=Y?function(){return function(){return process.nextTick(a)}}():V?function(){var e=0,t=new V(a),o=document.createTextNode("");return t.observe(o,{characterData:!0}),function(){o.data=e=++e%2}}():U?function(){var e=new MessageChannel;return e.port1.onmessage=a,function(){return e.port2.postMessage(0)}}():void 0===W?function(){try{var e=Function("return this")().require("vertx");return B=e.runOnLoop||e.runOnContext,r()}catch(e){return s()}}():s();var G=Math.random().toString(36).substring(2),$=void 0,J=1,Z=2,Q={error:null},ee=0,te=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(d),this.promise[G]||q(this.promise),z(t)?(this.length=t.length,this._remaining=t.length,this._result=Array(this.length),0===this.length?y(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&y(this.promise,this._result))):w(this.promise,D())}return e.prototype._enumerate=function(e){for(var t=0;this._state===$&&e.length>t;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var o=this._instanceConstructor,n=o.resolve;if(n===c){var i=f(e);if(i===l&&e._state!==$)this._settledAt(e._state,t,e._result);else if("function"!=typeof i)this._remaining--,this._result[t]=e;else if(o===oe){var r=new o(d);g(r,e,i),this._willSettleAt(r,t)}else this._willSettleAt(new o(function(t){return t(e)}),t)}else this._willSettleAt(n(e),t)},e.prototype._settledAt=function(e,t,o){var n=this.promise;n._state===$&&(this._remaining--,e===Z?w(n,o):this._result[t]=o),0===this._remaining&&y(n,this._result)},e.prototype._willSettleAt=function(e,t){var o=this;C(e,void 0,function(e){return o._settledAt(J,t,e)},function(e){return o._settledAt(Z,t,e)})},e}(),oe=function(){function e(t){this[G]=S(),this._result=this._state=void 0,this._subscribers=[],d!==t&&("function"!=typeof t&&A(),this instanceof e?T(this,t):k())}return e.prototype.catch=function(e){return this.then(null,e)},e.prototype.finally=function(e){var t=this,o=t.constructor;return t.then(function(t){return o.resolve(e()).then(function(){return t})},function(t){return o.resolve(e()).then(function(){throw t})})},e}();return oe.prototype.then=l,oe.all=N,oe.race=L,oe.resolve=c,oe.reject=I,oe._setScheduler=n,oe._setAsap=i,oe._asap=H,oe.polyfill=M,oe.Promise=oe,oe}()}()}).call(t,o(27))},function(e,t){var o;o=function(){return this}();try{o=o||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(o=window)}e.exports=o},function(e,t,o){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=o(4);t.StatusBar=function(e){function t(t,o){var n=e.call(this,t)||this;return n.target=o,n.container=t.ownerDocument.createElement("div"),n.container.classList.add("jodit_statusbar"),o.appendChild(n.container),n.hide(),n}return n(t,e),t.prototype.hide=function(){this.container&&(this.container.style.display="none")},t.prototype.show=function(){this.container&&(this.container.style.display="block")},t.prototype.append=function(e,t){void 0===t&&(t=!1);var o=this.jodit.ownerDocument.createElement("div");o.classList.add("jodit_statusbar_item"),t&&o.classList.add("jodit_statusbar_item-right"),o.appendChild(e),this.container.appendChild(o),this.show(),this.jodit.events.fire("resize")},t.prototype.destruct=function(){e.prototype.destruct.call(this),this.container.parentNode&&this.container.parentNode.removeChild(this.container)},t}(i.Component)},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addNewLine=o(30).addNewLine,t.autofocus=o(31).autofocus,t.backspace=o(32).backspace,t.bold=o(33).bold,t.cleanHTML=o(34).cleanHTML,t.color=o(35).color,o(36),t.enter=o(37).enter,t.errorMessages=o(38).errorMessages,t.font=o(39).font,t.formatBlock=o(40).formatBlock,t.fullsize=o(41).fullsize,t.iframe=o(42).iframe,t.indent=o(43).indent,t.imageProcessor=o(44).imageProcessor,t.imageProperties=o(45).imageProperties,t.inlinePopup=o(46).inlinePopup,t.justify=o(47).justify,t.link=o(48).link,t.mobile=o(49).mobile,t.orderedlist=o(50).orderedlist,t.paste=o(51).paste,t.placeholder=o(52).placeholder,t.redoundo=o(53).redoundo,t.resizer=o(54).resizer,t.size=o(55).size,t.source=o(56).source,t.symbols=o(57).symbols,t.hotkeys=o(58).hotkeys,t.table=o(59).TableProcessor,t.tableKeyboardNavigation=o(63).tableKeyboardNavigation,t.search=o(64).search,t.sticky=o(65).sticky,t.stat=o(66).stat,t.xpath=o(67).xpath,t.DragAndDrop=o(68).DragAndDrop,t.pasteStorage=o(69).pasteStorage},function(e,t,o){"use strict";function n(e){if(e.options.addNewLine){var t,o,n=r.dom('
'+s.ToolbarIcon.getIcon("enter")+"
",e.ownerDocument),i=RegExp("^("+e.options.addNewLineTagsTriggers.join("|")+")$","i"),l=!1,c=!1,d=!1,u=function(){e.options.readonly||e.isLocked()||e.container.classList.contains("jodit_popup_active")||(clearTimeout(t),n.classList.toggle("jodit-add-new-line_after",!c),n.style.display="block",n.style.width=e.editor.clientWidth+"px",l=!1)},p=function(){clearTimeout(t),d=!1,n.style.display="none",l=!0},f=function(e){return null!==e&&a.Dom.isBlock(e)&&!/^(img|table|iframe|hr)$/i.test(e.nodeName)},h=function(){l||d||(clearTimeout(t),t=window.setTimeout(p,500))};e.events.on("beforeDestruct",function(){n.parentNode&&n.parentNode.removeChild(n)}).on("afterInit",function(){e.container.appendChild(n),e.events.on(n,"mousemove",function(e){e.stopPropagation()}).on(n,"mousedown touchstart",function(t){var n=e.editorDocument.createElement(e.options.enter);c&&o&&o.parentNode?o.parentNode.insertBefore(n,o):e.editor.appendChild(n),e.selection.setCursorIn(n),e.setEditorValue(),p(),t.preventDefault()})}).on("afterInit",function(){e.events.on(e.editor,"scroll",function(){p()}).on(e.container,"mouseleave",h).on(n,"mouseenter",function(){clearTimeout(t),d=!0}).on(n,"mouseleave",function(){d=!1}).on(e.editor,"dblclick",function(t){if(e.options.addNewLineOnDBLClick&&t.target===e.editor&&e.selection.isCollapsed()){var o=r.offset(e.editor,e,e.editorDocument),n=t.pageY-e.editorWindow.pageYOffset,i=e.editorDocument.createElement(e.options.enter);Math.abs(n-o.top)Math.abs(t.pageY-p.top)&&(m=p.top,20>m-d.top||(m-=15),c=!0),10>Math.abs(t.pageY-(p.top+p.height))&&(m=p.top+p.height,25>d.top+d.height-m||(m+=15),c=!1),!1!==m&&(c&&!a.Dom.prev(s,f,e.editor)||!c&&!a.Dom.next(s,f,e.editor))?(n.style.top=m+"px",o=s,u()):(o=!1,h())}},e.defaultTimeout))})}}Object.defineProperty(t,"__esModule",{value:!0});var i=o(1),r=o(0),s=o(5),a=o(3);i.Config.prototype.addNewLine=!0,i.Config.prototype.addNewLineOnDBLClick=!0,i.Config.prototype.addNewLineTagsTriggers=["table","iframe","img","hr","jodit"],t.addNewLine=n},function(e,t,o){"use strict";function n(e){var t;e.events.on("afterInit",function(){e.options.autofocus&&(e.defaultTimeout?t=window.setTimeout(e.selection.focus,300):e.selection.focus())}).on("mousedown",function(t){e.isEditorMode()&&t.target&&r.Dom.isBlock(t.target)&&!t.target.childNodes.length&&(e.editor===t.target?e.selection.focus():e.selection.setCursorIn(t.target))}).on("beforeDestruct",function(){clearTimeout(t)})}Object.defineProperty(t,"__esModule",{value:!0});var i=o(1),r=o(3);i.Config.prototype.autofocus=!1,t.autofocus=n},function(e,t,o){"use strict";function n(e){var t=function(t){var o,n=t;r.normalizeNode(t);do{var a=n.innerHTML.replace(i.INVISIBLE_SPACE_REG_EXP,"");if(a.length&&"
"!==a||s.Dom.isCell(n,e.editorWindow)||!n.parentNode||t===e.editor)break;o=n.parentNode,n.parentNode.removeChild(n),n=o}while(n&&n!==e.editor)},o=function(t,n,r){if(t.node&&t.node.nodeType===Node.TEXT_NODE&&"string"==typeof t.node.nodeValue){for(var a=n?t.node.nodeValue.length:0,l=a,c=t.node.nodeValue,d=n?-1:1;a>=0&&c.length>=a&&c[a+(n?-1:0)]===i.INVISIBLE_SPACE;)a+=d;a!==l&&(n?c=c.substr(0,a)+c.substr(l):(c=c.substr(0,l)+c.substr(a),a=l),t.node.nodeValue=c),r.setStart(t.node,a),r.collapse(!0),e.selection.selectRange(r);var u=s.Dom.findInline(t.node,n,e.editor);if(c.length){var p=!1;if(n?a&&(p=!0):c.length>a&&(p=!0),p)return!0}else r.setStartBefore(t.node),r.collapse(!0),e.selection.selectRange(r),t.node&&t.node.parentNode&&t.node.parentNode.removeChild(t.node),t.node=u;if(u&&(s.Dom.isInlineBlock(u)&&(u=n?u.lastChild:u.firstChild),u&&u.nodeType===Node.TEXT_NODE))return t.node=u,o(t,n,r)}},n=/^(IMG|BR|IFRAME|SCRIPT|INPUT|TEXTAREA|HR)$/,a=function(e){if(e&&n.test(e.nodeName))return e.parentNode&&e.parentNode.removeChild(e),!1},l=function(t,n,i){if(t.node){var r=t.node;if(void 0!==o(t,n,i))return!0;if(t.node||(t.node=r.parentNode),t.node===e.editor)return!1;var s=t.node;if(!1===a(s))return!1;for(s&&(s=n?s.previousSibling:s.nextSibling);s&&s.nodeType===Node.TEXT_NODE&&s.nodeValue&&s.nodeValue.match(/^[\n\r]+$/);)s=n?s.previousSibling:s.nextSibling;return a(s)}},c=function(e){return null===e.nodeName.match(/^(TD|TH|TR|TABLE|LI)$/)&&(!(!s.Dom.isEmpty(e)&&null===e.nodeName.match(n))||!(e.nodeType===Node.TEXT_NODE&&!s.Dom.isEmptyTextNode(e))&&(!e.childNodes.length||[].slice.call(e.childNodes).every(c)))};e.events.on("afterCommand",function(t){if("delete"===t){var o=e.selection.current();if(o&&o.firstChild&&"BR"===o.firstChild.nodeName&&o.removeChild(o.firstChild),!(r.trim(e.editor.innerText)||e.editor.querySelector("img")||o&&s.Dom.closest(o,"table",e.editor))){e.editor.innerHTML="";var n=e.selection.setCursorIn(e.editor);n.parentNode&&n.parentNode.removeChild(n)}}}).on("keydown",function(o){if(o.which===i.KEY_BACKSPACE||o.which===i.KEY_DELETE){var n=o.which===i.KEY_BACKSPACE;if(e.selection.isFocused()||e.selection.focus(),!e.selection.isCollapsed())return e.execCommand("Delete"),!1;var a=e.editorWindow.getSelection(),d=!!a.rangeCount&&a.getRangeAt(0);if(!d)return!1;var u=e.ownerDocument.createTextNode(i.INVISIBLE_SPACE),p=e.editorDocument.createElement("span");try{if(d.insertNode(u),!s.Dom.isOrContains(e.editor,u))return!1;var f=s.Dom.up(u,s.Dom.isBlock,e.editor),h=s.Dom.findInline(u,n,e.editor),m={node:h},v=void 0;if(h?v=l(m,n,d):u.parentNode&&(v=l({node:n?u.parentNode.previousSibling:u.parentNode.nextSibling},n,d)),void 0!==v)return!!v&&void 0;if(f&&f.nodeName.match(/^(TD)$/))return!1;var g=n?s.Dom.prev(m.node||u,s.Dom.isBlock,e.editor):s.Dom.next(m.node||u,s.Dom.isBlock,e.editor);if(!g&&f&&f.parentNode){g=e.editorDocument.createElement(e.options.enter);for(var _=f;_&&_.parentNode&&_.parentNode!==e.editor;)_=_.parentNode;_.parentNode&&_.parentNode.insertBefore(g,_)}else if(g&&c(g))return g.parentNode&&g.parentNode.removeChild(g),!1;if(g){var b=e.selection.setCursorIn(g,!n);e.selection.insertNode(p,!1,!1),b.nodeType===Node.TEXT_NODE&&b.nodeValue===i.INVISIBLE_SPACE&&b.parentNode&&b.parentNode.removeChild(b)}if(f){if(t(f),g&&f.parentNode&&(f.nodeName===g.nodeName&&f.parentNode&&g.parentNode&&f.parentNode!==e.editor&&g.parentNode!==e.editor&&f.parentNode!==g.parentNode&&f.parentNode.nodeName===g.parentNode.nodeName&&(f=f.parentNode,g=g.parentNode),s.Dom.moveContent(f,g,!n),r.normalizeNode(g)),g&&"LI"===g.nodeName){var y=s.Dom.closest(g,"Ul|OL",e.editor);if(y){var w=y.nextSibling;w&&w.nodeName===y.nodeName&&y!==w&&(s.Dom.moveContent(w,y,!n),w.parentNode&&w.parentNode.removeChild(w))}}return t(f),!1}}finally{if(u.parentNode&&u.nodeValue===i.INVISIBLE_SPACE&&u.parentNode.removeChild(u),p&&s.Dom.isOrContains(e.editor,p,!0)){var b=e.selection.setCursorBefore(p);p.parentNode&&p.parentNode.removeChild(p),b&&b.parentNode&&(s.Dom.findInline(b,!0,b.parentNode)||s.Dom.findInline(b,!0,b.parentNode))&&b.parentNode.removeChild(b)}e.setEditorValue()}return!1}})}Object.defineProperty(t,"__esModule",{value:!0});var i=o(2),r=o(0),s=o(3);t.backspace=n},function(e,t,o){"use strict";function n(e){var t=function(t){var o=r.Jodit.defaultOptions.controls[t],n=i({},o.css),s={};return Object.keys(n).forEach(function(e){s[e]=Array.isArray(n[e])?n[e][0]:n[e]}),e.selection.applyCSS(s,o.tags?o.tags[0]:void 0,o.css),e.setEditorValue(),!1};e.registerCommand("bold",{exec:t,hotkeys:"ctrl+b"}),e.registerCommand("italic",{exec:t,hotkeys:"ctrl+i"}),e.registerCommand("underline",{exec:t,hotkeys:"ctrl+u"}),e.registerCommand("strikethrough",{exec:t})}var i=this&&this.__assign||Object.assign||function(e){for(var t,o=1,n=arguments.length;n>o;o++){t=arguments[o];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e};Object.defineProperty(t,"__esModule",{value:!0});var r=o(6),s=o(1);s.Config.prototype.controls.bold={tagRegExp:/^(strong|b)$/i,tags:["strong","b"],css:{"font-weight":["bold","700"]},tooltip:"Bold"},s.Config.prototype.controls.italic={tagRegExp:/^(em|i)$/i,tags:["em","i"],css:{"font-style":"italic"},tooltip:"Italic"},s.Config.prototype.controls.underline={tagRegExp:/^(u)$/i,tags:["u"],css:{"text-decoration":"underline"},tooltip:"Underline"},s.Config.prototype.controls.strikethrough={tagRegExp:/^(s)$/i,tags:["s"],css:{"text-decoration":"line-through"},tooltip:"Strike through"},t.bold=n},function(e,t,o){"use strict";function n(e){e.options.cleanHTML.cleanOnPaste&&e.events.on("processPaste",function(e,t){return s.cleanFromWord(t)});var t,o=/([^\[]*)\[([^\]]+)]/,n=/[\s]*,[\s]*/,i=/^(.*)[\s]*=[\s]*(.*)$/,c=function(e){var t={};return"string"==typeof e?(e.split(n).map(function(e){e=s.trim(e);var r=o.exec(e),a={},l=function(e){e=s.trim(e);var t=i.exec(e);t?a[t[1]]=t[2]:a[e]=!0};if(r){var c=r[2].split(n);r[1]&&(c.forEach(l),t[r[1].toUpperCase()]=a)}else t[e.toUpperCase()]=!0}),t):!!e&&(Object.keys(e).forEach(function(o){t[o.toUpperCase()]=e[o]}),t)},d=c(e.options.cleanHTML.allowTags),u=c(e.options.cleanHTML.denyTags),p=function(e,t){void 0===t&&(t=!1);for(var o=t?e.nextSibling:e.previousSibling;o;){if(o.nodeType===Node.ELEMENT_NODE||!a.Dom.isEmptyTextNode(o))return!0;o=t?o.nextSibling:o.previousSibling}return!1},f=function(o){return!(o.nodeType===Node.TEXT_NODE||!(d&&!d[o.nodeName]||u&&u[o.nodeName]))||!(!t||"BR"!==o.nodeName||!p(o)||p(o,!0)||a.Dom.up(o,a.Dom.isBlock,e.editor)===a.Dom.up(t,a.Dom.isBlock,e.editor))||e.options.cleanHTML.removeEmptyElements&&!1!==t&&o.nodeType===Node.ELEMENT_NODE&&null!==o.nodeName.match(l.IS_INLINE)&&!e.selection.isMarker(o)&&0===s.trim(o.innerHTML).length&&!a.Dom.isOrContains(o,t)};e.events.on("change afterSetMode afterInit mousedown keydown",s.debounce(function(){if(!e.isDestructed&&e.isEditorMode()){t=e.selection.current();var o=null,n=[],i=!1,r=0,s=e.options.cleanHTML.replaceOldTags;if(s&&t){var l=Object.keys(s).join("|");if(e.selection.isCollapsed()){var c=a.Dom.closest(t,l,e.editor);if(c){var u=e.selection.save(),p=s[c.nodeName.toLowerCase()]||s[c.nodeName];a.Dom.replace(c,p,!0,!1,e.editorDocument),e.selection.restore(u)}}}var h=function(t){if(t){if(f(t))return n.push(t),h(t.nextSibling);if(e.options.cleanHTML.fillEmptyParagraph&&a.Dom.isBlock(t)&&a.Dom.isEmpty(t,/^(img|svg|canvas|input|textarea|form|br)$/)){var o=e.editorDocument.createElement("br");t.appendChild(o)}if(d&&!0!==d[t.nodeName]&&t.attributes&&t.attributes.length){var s=[];for(r=0;t.attributes.length>r;r+=1)(!d[t.nodeName][t.attributes[r].name]||!0!==d[t.nodeName][t.attributes[r].name]&&d[t.nodeName][t.attributes[r].name]!==t.attributes[r].value)&&s.push(t.attributes[r].name);s.length&&(i=!0),s.forEach(function(e){t.removeAttribute(e)})}h(t.firstChild),h(t.nextSibling)}};e.editor.firstChild&&(o=e.editor.firstChild),h(o),n.forEach(function(e){return e.parentNode&&e.parentNode.removeChild(e)}),(n.length||i)&&e.events&&e.events.fire("syncho")}},e.options.cleanHTML.timeout)).on("keyup",function(){if(!e.options.readonly){var t=e.selection.current();if(t){var o=a.Dom.up(t,a.Dom.isBlock,e.editor);o&&a.Dom.all(o,function(o){o.nodeType===Node.TEXT_NODE&&null!==o.nodeValue&&r.INVISIBLE_SPACE_REG_EXP.test(o.nodeValue)&&0!==o.nodeValue.replace(r.INVISIBLE_SPACE_REG_EXP,"").length&&(o.nodeValue=o.nodeValue.replace(r.INVISIBLE_SPACE_REG_EXP,""),o===t&&e.selection.isCollapsed()&&e.selection.setCursorAfter(o))})}}}).on("afterCommand",function(t){var o,n,i=e.selection;switch(t.toLowerCase()){case"inserthorizontalrule":(o=e.editor.querySelector("hr[id=null]"))&&(n=a.Dom.next(o,a.Dom.isBlock,e.editor,!1),n||(n=e.editorDocument.createElement(e.options.enter))&&a.Dom.after(o,n),i.setCursorIn(n));break;case"removeformat":n=i.current();var l=function(t){switch(t.nodeType){case Node.ELEMENT_NODE:a.Dom.each(t,l),"FONT"===t.nodeName?a.Dom.unwrap(t):([].slice.call(t.attributes).forEach(function(e){-1===["src","href","rel","content"].indexOf(e.name.toLowerCase())&&t.removeAttribute(e.name)}),s.normalizeNode(t));break;case Node.TEXT_NODE:e.options.cleanHTML.replaceNBSP&&t.nodeType===Node.TEXT_NODE&&null!==t.nodeValue&&t.nodeValue.match(r.SPACE_REG_EXP)&&(t.nodeValue=t.nodeValue.replace(r.SPACE_REG_EXP," "));break;default:t.parentNode&&t.parentNode.removeChild(t)}};if(i.isCollapsed())for(;n&&n.nodeType!==Node.ELEMENT_NODE&&n!==e.editor;)l(n),n&&(n=n.parentNode);else e.selection.eachSelection(function(e){l(e)})}})}Object.defineProperty(t,"__esModule",{value:!0});var i=o(1),r=o(2),s=o(0),a=o(3),l=o(2);i.Config.prototype.cleanHTML={timeout:300,removeEmptyElements:!0,fillEmptyParagraph:!0,replaceNBSP:!0,cleanOnPaste:!0,replaceOldTags:{i:"em",b:"strong"},allowTags:!1,denyTags:!1},i.Config.prototype.controls.eraser={command:"removeFormat",tooltip:"Clear Formatting"},t.cleanHTML=n},function(e,t,o){"use strict";function n(e){var t=function(t,o,n){var r=i.normalizeColor(n);switch(t){case"background":e.selection.applyCSS({backgroundColor:r||""});break;case"forecolor":e.selection.applyCSS({color:r||""})}return e.setEditorValue(),!1};e.registerCommand("forecolor",t),e.registerCommand("background",t)}Object.defineProperty(t,"__esModule",{value:!0});var i=o(0),r=o(1),s=o(10),a=s.Widget.TabsWidget,l=s.Widget.ColorPickerWidget,c=o(3);r.Config.prototype.controls.brush={isActive:function(e,t,o){var n=e.selection.current(),r=o.container.querySelector("svg");if(n){var s=c.Dom.closest(n,function(t){return c.Dom.isBlock(t)||c.Dom.isNode(t,e.editorWindow)&&t.nodeType===Node.ELEMENT_NODE},e.editor)||e.editor,a=""+i.css(s,"color"),l=""+i.css(s,"background-color");if(a!==""+i.css(e.editor,"color"))return r&&(r.style.fill=a),!0;if(l!==""+i.css(e.editor,"background-color"))return r&&(r.style.fill=l),!0}return r&&r.style.fill&&(r.style.fill=null),!1},popup:function(e,t,o,n){var r,s="",d="",u=null;t&&t!==e.editor&&c.Dom.isNode(t,e.editorWindow)&&t.nodeType===Node.ELEMENT_NODE&&(s=""+i.css(t,"color"),d=""+i.css(t,"background-color"),u=t);var p=l(e,function(t){u?u.style.backgroundColor=t:e.execCommand("background",!1,t),n()},d),f=l(e,function(t){u?u.style.color=t:e.execCommand("forecolor",!1,t),n()},s);return r="background"===e.options.colorPickerDefaultTab?{Background:p,Text:f}:{Text:f,Background:p},a(e,r,u)},tooltip:"Fill color or set the text color"},t.color=n},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(1),i=o(3),r=o(0),s=["fontWeight","fontStyle","fontSize","color","margin","padding","borderWidth","borderStyle","borderColor","borderRadius","backgroundColor","textDecorationLine","fontFamily"],a=function(e,t,o,n){var i=r.css(o,t);return i==n[t]&&(i=o.parentNode&&o!==e.editor&&o.parentNode!==e.editor?a(e,t,o.parentNode,n):void 0),i},l=function(e,t,o){var n={};return t&&s.forEach(function(i){n[i]=a(e,i,t,o),i.match(/border(Style|Color)/)&&!n.borderWidth&&(n[i]=void 0)}),n};n.Config.prototype.controls.copyformat={exec:function(e,t){if(t)if(e.buffer.copyformat)e.buffer.copyformat=!1,e.events.off(e.editor,"mouseup.copyformat");else{var o={},n=i.Dom.up(t,function(e){return e&&e.nodeType!==Node.TEXT_NODE},e.editor)||e.editor,a=e.editorDocument.createElement("span");e.editor.appendChild(a),s.forEach(function(e){o[e]=r.css(a,e)}),a!==e.editor&&a.parentNode&&a.parentNode.removeChild(a);var c=l(e,n,o),d=function(){e.buffer.copyformat=!1;var t=e.selection.current();t&&("IMG"===t.nodeName?r.css(t,c):e.selection.applyCSS(c)),e.events.off(e.editor,"mouseup.copyformat")};e.events.on(e.editor,"mouseup.copyformat",d),e.buffer.copyformat=!0}},isActive:function(e){return!!e.buffer.copyformat},tooltip:"Paint format"}},function(e,t,o){"use strict";function n(e){e.events.on("keydown",function(o){if(o.which===r.KEY_ENTER){var n=e.events.fire("beforeEnter",o);if(void 0!==n)return n;e.selection.isCollapsed()||e.execCommand("Delete"),e.selection.focus();var a=e.selection.current(!1),l=e.editorWindow.getSelection(),c=l.rangeCount?l.getRangeAt(0):e.editorDocument.createRange();a&&a!==e.editor||(e.selection.current(),a=e.editorDocument.createTextNode(r.INVISIBLE_SPACE),l.rangeCount?c.insertNode(a):e.editor.appendChild(a),c.selectNode(a),c.collapse(!1),l.removeAllRanges(),l.addRange(c));var d=!!a&&s.Dom.up(a,s.Dom.isBlock,e.editor);if(e.options.enter.toLowerCase()===r.BR.toLowerCase()||o.shiftKey||s.Dom.closest(a,"PRE|BLOCKQUOTE",e.editor)){var u=e.editorDocument.createElement("br");return e.selection.insertNode(u,!0),i.scrollIntoView(u,e.editor,e.editorDocument),!1}if(!d&&a&&!s.Dom.prev(a,function(t){return s.Dom.isBlock(t)||!!t&&s.Dom.isImage(t,e.ownerWindow)},e.editor)){var p=a;if(s.Dom.up(p,function(t){t&&t.hasChildNodes()&&t!==e.editor&&(p=t)},e.editor),d=s.Dom.wrapInline(p,e.options.enter,e),s.Dom.isEmpty(d)){var f=e.editorDocument.createElement("br");d.appendChild(f),e.selection.setCursorBefore(f)}c=l.rangeCount?l.getRangeAt(0):e.editorDocument.createRange()}var h=!1,m=!1,v=!1;if(d){if(!s.Dom.canSplitBlock(d,e.editorWindow)){var u=e.editorDocument.createElement("br");return e.selection.insertNode(u,!1),e.selection.setCursorAfter(u),!1}if((h="LI"===d.nodeName)&&s.Dom.isEmpty(d)){var g=!1,_=s.Dom.closest(d,"ol|ul",e.editor);if(s.Dom.prev(d,function(e){return e&&"LI"===e.nodeName},_))if(s.Dom.next(d,function(e){return e&&"LI"===e.nodeName},_)){var b=e.editorDocument.createRange();b.setStartBefore(_),b.setEndAfter(d);var y=b.extractContents();_.parentNode&&_.parentNode.insertBefore(y,_),g=e.selection.setCursorBefore(_)}else g=e.selection.setCursorAfter(_);else g=e.selection.setCursorBefore(_);return d.parentNode&&d.parentNode.removeChild(d),t.insertParagraph(e,g),!i.$$("li",_).length&&_.parentNode&&_.parentNode.removeChild(_),!1}if(e.selection.cursorInTheEdge(!0,d))return m=e.selection.setCursorBefore(d),t.insertParagraph(e,m,h?"li":e.options.enter,d.style),e.selection.setCursorIn(d,!0),!1;if(!1===e.selection.cursorInTheEdge(!1,d)){var b=e.editorDocument.createRange();b.setStartBefore(d),b.setEnd(c.startContainer,c.startOffset);var y=b.extractContents();d.parentNode&&d.parentNode.insertBefore(y,d),e.selection.setCursorIn(d,!0)}else m=e.selection.setCursorAfter(d)}else v=!0;return(v||m)&&t.insertParagraph(e,m,h?"li":e.options.enter,d?d.style:void 0),!1}})}Object.defineProperty(t,"__esModule",{value:!0});var i=o(0),r=o(2),s=o(3);t.insertParagraph=function(e,t,o,n){o||(o=e.options.enter.toLowerCase());var r=e.editorDocument.createElement(o),s=e.editorDocument.createElement("br");r.appendChild(s),n&&n.cssText&&r.setAttribute("style",n.cssText),e.selection.insertNode(r,!1,!1),e.selection.setCursorBefore(s);var a=e.editorDocument.createRange();return a.setStartBefore(s),a.collapse(!0),e.selection.selectRange(a),t&&t.parentNode&&t.parentNode.removeChild(t),i.scrollIntoView(r,e.editor,e.editorDocument),e.events&&e.events.fire("synchro"),r},t.enter=n},function(e,t,o){"use strict";function n(e){if(e.options.showMessageErrors){var t,o=r.dom('
',e.ownerDocument),n=function(){t=5,[].slice.call(o.childNodes).forEach(function(n){r.css(o,"bottom",t+"px"),t+=n.offsetWidth+e.options.showMessageErrorOffsetPx})};e.workplace.appendChild(o),e.events.on("errorMessage",function(t,i,s){var a=r.dom('
'+t+"
",e.ownerDocument);o.appendChild(a),n(),setTimeout(function(){a.classList.remove("active"),setTimeout(function(){o.removeChild(a),n()},300)},s||e.options.showMessageErrorTime)})}}Object.defineProperty(t,"__esModule",{value:!0});var i=o(1),r=o(0);i.Config.prototype.showMessageErrors=!0,i.Config.prototype.showMessageErrorTime=3e3,i.Config.prototype.showMessageErrorOffsetPx=3,t.errorMessages=n},function(e,t,o){"use strict";function n(e){var t=function(t,o,n){switch(t){case"fontsize":e.selection.applyCSS({fontSize:i.normalizeSize(n)});break;case"fontname":e.selection.applyCSS({fontFamily:n})}return e.setEditorValue(),!1};e.registerCommand("fontsize",t),e.registerCommand("fontname",t)}Object.defineProperty(t,"__esModule",{value:!0});var i=o(0),r=o(1),s=o(3);r.Config.prototype.controls.fontsize={command:"fontSize",list:["8","9","10","11","12","14","16","18","24","30","36","48","60","72","96"],template:function(e,t,o){return o},tooltip:"Font size",isActiveChild:function(e,t){var o=e.selection.current();if(o){var n=s.Dom.closest(o,function(t){return s.Dom.isBlock(t)||s.Dom.isNode(t,e.editorWindow)&&t.nodeType===Node.ELEMENT_NODE},e.editor)||e.editor,r=i.css(n,"font-size");return!(!r||!t.args||""+t.args[1]!=""+r)}return!1},isActive:function(e){var t=e.selection.current();if(t){var o=s.Dom.closest(t,function(t){return s.Dom.isBlock(t)||s.Dom.isNode(t,e.editorWindow)&&t.nodeType===Node.ELEMENT_NODE},e.editor)||e.editor;return""+i.css(o,"font-size")!=""+i.css(e.editor,"font-size")}return!1}},r.Config.prototype.controls.font={command:"fontname",exec:function(e,t,o){e.execCommand(o.command,!1,o.args?o.args[0]:void 0)},list:{"Helvetica,sans-serif":"Helvetica","Arial,Helvetica,sans-serif":"Arial","Georgia,serif":"Georgia","Impact,Charcoal,sans-serif":"Impact","Tahoma,Geneva,sans-serif":"Tahoma","'Times New Roman',Times,serif":"Times New Roman","Verdana,Geneva,sans-serif":"Verdana"},template:function(e,t,o){return''+o+""},isActiveChild:function(e,t){var o=e.selection.current(),n=function(e){return e.toLowerCase().replace(/['"]+/g,"").replace(/[^a-z0-9]+/g,",")};if(o){var r=s.Dom.closest(o,function(t){return s.Dom.isBlock(t)||s.Dom.isNode(t,e.editorWindow)&&t.nodeType===Node.ELEMENT_NODE},e.editor)||e.editor,a=""+i.css(r,"font-family");return!(!a||!t.args||n(""+t.args[0])!==n(a))}return!1},isActive:function(e){var t=e.selection.current();if(t){var o=s.Dom.closest(t,function(t){return s.Dom.isBlock(t)||s.Dom.isNode(t,e.editorWindow)&&t.nodeType===Node.ELEMENT_NODE},e.editor)||e.editor;return""+i.css(o,"font-family")!=""+i.css(e.editor,"font-family")}return!1},tooltip:"Font family"},t.font=n},function(e,t,o){"use strict";function n(e){e.registerCommand("formatblock",function(t,o,n){e.selection.focus();var s=!1;if(e.selection.eachSelection(function(t){var o=e.selection.save(),r=!!t&&i.Dom.up(t,i.Dom.isBlock,e.editor);if(r&&"LI"!==r.nodeName||!t||(r=i.Dom.wrapInline(t,e.options.enter,e)),!r)return e.selection.restore(o),!1;r.tagName.match(/TD|TH|TBODY|TABLE|THEAD/i)?e.selection.isCollapsed()?i.Dom.wrapInline(t,n,e):e.selection.applyCSS({},n):n===e.options.enter.toLowerCase()&&r.parentNode&&"LI"===r.parentNode.nodeName?i.Dom.unwrap(r):i.Dom.replace(r,n,!0,!1,e.editorDocument),s=!0,e.selection.restore(o)}),!s){var a=e.editorDocument.createElement(n);a.innerHTML=r.INVISIBLE_SPACE,e.selection.insertNode(a,!1),e.selection.setCursorIn(a)}return e.setEditorValue(),!1})}Object.defineProperty(t,"__esModule",{value:!0});var i=o(3),r=o(2);o(1).Config.prototype.controls.paragraph={command:"formatBlock",getLabel:function(e,t,o){var n=e.selection.current();if(n&&e.options.textIcons){var r=i.Dom.closest(n,i.Dom.isBlock,e.editor)||e.editor,s=r.nodeName.toLowerCase();t.data&&t.data.currentValue!==s&&t.list&&t.list[s]&&(o.textBox.innerHTML=""+t.list[s]+"",o.textBox.firstChild.classList.add("jodit_icon"),t.data.currentValue=s)}return!1},exec:function(e,t,o){e.execCommand(o.command,!1,o.args?o.args[0]:void 0)},data:{currentValue:"left"},list:{p:"Normal",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",blockquote:"Quote"},isActiveChild:function(e,t){var o=e.selection.current();if(o){var n=i.Dom.closest(o,i.Dom.isBlock,e.editor);return n&&n!==e.editor&&void 0!==t.args&&n.nodeName.toLowerCase()===t.args[0]}return!1},isActive:function(e,t){var o=e.selection.current();if(o){var n=i.Dom.closest(o,i.Dom.isBlock,e.editor);return n&&n!==e.editor&&void 0!==t.list&&"p"!==n.nodeName.toLowerCase()&&void 0!==t.list[n.nodeName.toLowerCase()]}return!1},template:function(e,t,o){return"<"+t+' class="jodit_list_element">'+e.i18n(o)+""},tooltip:"Insert format block"},t.formatBlock=n},function(e,t,o){"use strict";function n(e){var t=!1,o=0,n=0,i=!1,s=function(){e.events&&(t?(o=r.css(e.container,"height"),n=r.css(e.container,"width"),r.css(e.container,{height:e.ownerWindow.innerHeight,width:e.ownerWindow.innerWidth}),i=!0):i&&r.css(e.container,{height:o||"auto",width:n||"auto"}))},a=function(o){if(void 0===o&&(o=!e.container.classList.contains("jodit_fullsize")),e.options.fullsize=!!o,t=o,e.container.classList.toggle("jodit_fullsize",o),e.toolbar&&r.css(e.toolbar.container,"width","auto"),e.options.globalFullsize){for(var n=e.container.parentNode;n&&!(n instanceof Document);)n.classList.toggle("jodit_fullsize_box",o),n=n.parentNode;s()}e.events.fire("afterResize")};e.options.globalFullsize&&e.events.on(e.ownerWindow,"resize",s),e.events.on("afterInit",function(){e.toggleFullSize(e.options.fullsize)}).on("toggleFullSize",a).on("beforeDestruct",function(){a(!1)})}Object.defineProperty(t,"__esModule",{value:!0});var i=o(1),r=o(0),s=o(5),a=o(2);i.Config.prototype.fullsize=!1,i.Config.prototype.globalFullsize=!0,i.Config.prototype.controls.fullsize={exec:function(e){e.toggleFullSize()},isActive:function(e){return e.isFullSize()},getLabel:function(e,t,o){var n=e.isFullSize()?"shrink":"fullsize";o.textBox.innerHTML=e.options.textIcons?""+e.i18n(n)+"":s.ToolbarIcon.getIcon(n),o.textBox.firstChild.classList.add("jodit_icon")},tooltip:"Open editor in fullsize",mode:a.MODE_SOURCE+a.MODE_WYSIWYG},t.fullsize=n},function(e,t,o){"use strict";function n(e){e.events.on("afterSetMode",function(){e.isEditorMode()&&e.selection.focus()}).on("generateDocumentStructure.iframe",function(t){if(t.open(),t.write('\n \n \n '+(e.options.iframeBaseUrl?'':"")+'\n \n \n '),t.close(),e.options.iframeCSSLinks&&e.options.iframeCSSLinks.forEach(function(e){var o=r.dom('',t);t.head.appendChild(o)}),e.options.iframeStyle){var o=t.createElement("style");o.innerHTML=e.options.iframeStyle,t.head.appendChild(o)}}).on("createEditor",function(){if(e.options.iframe){e.iframe=e.ownerDocument.createElement("iframe"),e.iframe.style.display="block",e.iframe.src="about:blank",e.iframe.className="jodit_wysiwyg_iframe",e.iframe.frameBorder="0",e.iframe.setAttribute("allowtransparency","true"),e.iframe.setAttribute("tabindex","0"),e.iframe.setAttribute("frameborder","0"),e.workplace.appendChild(e.iframe);var t=e.iframe.contentWindow.document;if(e.events.fire("generateDocumentStructure.iframe",t),e.editorDocument=t,e.editorWindow=e.iframe.contentWindow,e.editor=t.body,"auto"===e.options.height){t.documentElement.style.overflowY="hidden";var o=r.throttle(function(){e.editor&&e.iframe&&"auto"===e.options.height&&r.css(e.iframe,"height",e.editor.offsetHeight)},e.defaultTimeout/2);e.events.on("change afterInit afterSetMode resize",o).on([e.iframe,e.editorWindow,t.documentElement],"load",o).on(t,"readystatechange DOMContentLoaded",o)}return function(e){e.matches||(e.matches=Element.prototype.matches)}(e.editorWindow.Element.prototype),e.events.on(e.editorDocument.documentElement,"mousedown touchend",function(){e.selection.isFocused()||(e.selection.focus(),e.selection.setCursorIn(e.editor))}).on(e.editorWindow,"mousedown touchstart keydown keyup touchend click mouseup mousemove scroll",function(t){e.events&&e.events.fire&&e.events.fire(window,t)}),!1}})}Object.defineProperty(t,"__esModule",{value:!0});var i=o(1),r=o(0);i.Config.prototype.iframe=!1,i.Config.prototype.iframeBaseUrl="",i.Config.prototype.iframeStyle='html{margin: 0px;min-height: 100%;}body{box-sizing: border-box;font-size: 13px; line-height: 1.6;padding:10px;background:transparent;color:#000;position:relative;z-index: 2;user-select:auto;margin:0px;overflow:auto;}table{width:100%;border: none;border-collapse:collapse;empty-cells: show;max-width: 100%;}th,td{padding: 2px 5px;border:1px solid #ccc;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}td[data-jodit-selected-cell],th[data-jodit-selected-cell]{border: 1px double #1e88e5}p{margin-top:0;}.jodit_editor .jodit_iframe_wrapper{display: block;clear: both;user-select: none;position: relative;}.jodit_editor .jodit_iframe_wrapper:after {position:absolute;content:"";z-index:1;top:0;left:0;right: 0;bottom: 0;cursor: pointer;display: block;background: rgba(0, 0, 0, 0);} .jodit_disabled{user-select: none;-o-user-select: none;-moz-user-select: none;-khtml-user-select: none;-webkit-user-select: none;-ms-user-select: none}',i.Config.prototype.iframeCSSLinks=[],t.iframe=n},function(e,t,o){"use strict";function n(e){var t=function(t){return e.selection.eachSelection(function(o){var n=e.selection.save(),i=!!o&&r.Dom.up(o,r.Dom.isBlock,e.editor);if(!i&&o&&(i=r.Dom.wrapInline(o,e.options.enter,e)),!i)return e.selection.restore(n),!1;if(i&&i.style){var s=i.style.marginLeft?parseInt(i.style.marginLeft,10):0;s+=e.options.indentMargin*("outdent"===t?-1:1),i.style.marginLeft=s>0?s+"px":"",i.getAttribute("style")||i.removeAttribute("style")}e.selection.restore(n)}),e.setEditorValue(),!1};e.registerCommand("indent",{exec:t,hotkeys:"ctrl+]"}),e.registerCommand("outdent",{exec:t,hotkeys:"ctrl+["})}Object.defineProperty(t,"__esModule",{value:!0});var i=o(1),r=o(3);i.Config.prototype.controls.indent={tooltip:"Increase Indent"},i.Config.prototype.controls.outdent={isDisable:function(e){var t=e.selection.current();if(t){var o=r.Dom.closest(t,r.Dom.isBlock,e.editor);if(o&&o.style&&o.style.marginLeft)return 0>=parseInt(o.style.marginLeft,10)}return!0},tooltip:"Decrease Indent"},i.Config.prototype.indentMargin=10,t.indent=n},function(e,t,o){"use strict";function n(e){e.events.on("change afterInit",i.debounce(function(){e.editor&&i.$$("img",e.editor).forEach(function(t){t[r]||(t[r]=!0,t.complete||t.addEventListener("load",function o(){e.events&&e.events.fire&&e.events.fire("resize"),t.removeEventListener("load",o)}),e.events.on(t,"mousedown touchstart",function(){e.selection.select(t)}))})},e.defaultTimeout))}Object.defineProperty(t,"__esModule",{value:!0});var i=o(0),r="__jodit_imageprocessor_binded";t.imageProcessor=n},function(e,t,o){"use strict";function n(e){var t=function(t){var o=this;if(!e.options.readonly){t&&t.stopImmediatePropagation();var n,r=this,d=new a.Dialog(e),f=s.dom(''+l.ToolbarIcon.getIcon("cancel")+""+e.i18n("Cancel")+"",e.ownerDocument),h=s.dom(''+l.ToolbarIcon.getIcon("check")+""+e.i18n("Ok")+"",e.ownerDocument),m={remove:s.dom(''+l.ToolbarIcon.getIcon("bin")+" "+e.i18n("Delete")+"",e.ownerDocument)},v=s.dom('
',e.ownerDocument),g=s.dom('
",e.ownerDocument),_=s.dom('
'+(e.options.filebrowser.ajax.url||e.options.uploader.url?'
'+(e.options.filebrowser.ajax.url||e.options.uploader.url?''+l.ToolbarIcon.getIcon("image")+"":"")+(e.options.image.useImageEditor&&void 0!==i.Jodit.modules.ImageEditor&&e.options.filebrowser.ajax.url?''+l.ToolbarIcon.getIcon("crop")+"":"")+"
":"")+'
'+e.i18n("Open link in new tab")+"
",e.ownerDocument),b=r.naturalWidth/r.naturalHeight||1,y=v.querySelector(".imageWidth"),w=v.querySelector(".imageHeight"),C=function(){r.style.cssFloat&&-1!==["left","right"].indexOf(r.style.cssFloat.toLowerCase())?s.val(v,".align",s.css(r,"float")):"block"===s.css(r,"display")&&"auto"===r.style.marginLeft&&"auto"===r.style.marginRight&&s.val(v,".align","center")},E=function(){s.val(v,".border_radius",""+(parseInt(r.style.borderRadius||"0",10)||"0"))},j=function(){s.val(v,".id",r.getAttribute("id")||"")},x=function(){s.val(v,".style",r.getAttribute("style")||"")},T=function(){s.val(v,".classes",(r.getAttribute("class")||"").replace(/jodit_focused_image[\s]*/,""))},S=function(){if(e.options.image.editMargins){var t=!1;s.$$(".margins",v).forEach(function(e){var o=e.getAttribute("data-id")||"",n=r.style[o];n&&(/^[0-9]+(px)?$/.test(n)&&(n=parseInt(n,10)),e.value=""+n||"",t||"marginTop"===o||e.value===s.val(v,".marginTop")||(t=!0))}),A=!t;var o=v.querySelector(".jodit_lock_margin");o&&(o.innerHTML=l.ToolbarIcon.getIcon(A?"lock":"unlock")),s.$$(".margins:not(.marginTop)",v).forEach(function(e){return A?e.setAttribute("disabled","true"):e.removeAttribute("disabled")})}},q=function(){y.value=""+r.offsetWidth,w.value=""+r.offsetHeight},D=function(){r.hasAttribute("title")&&s.val(v,".imageTitle",r.getAttribute("title")||""),r.hasAttribute("alt")&&s.val(v,".imageAlt",r.getAttribute("alt")||"");var t=c.Dom.closest(r,"a",e.editor);t&&(s.val(v,".imageLink",t.getAttribute("href")||""),v.querySelector(".imageLinkOpenInNewTab").checked="_blank"===t.getAttribute("target"))},N=function(){s.val(v,".imageSrc",r.getAttribute("src")||"");var e=v.querySelector(".imageViewSrc");e&&e.setAttribute("src",r.getAttribute("src")||"")},L=function(){N(),D(),q(),S(),T(),j(),E(),C(),x()},I=!0,A=!0,k={},M=v.querySelector(".tabsbox");k[e.i18n("Image")]=_,k[e.i18n("Advanced")]=g,M&&M.appendChild(u(e,k)),L(),e.events.on(d,"afterClose",function(){d.destruct(),r.parentNode&&e.options.image.selectImageAfterClose&&e.selection.select(r)}),m.remove.addEventListener("click",function(){r.parentNode&&r.parentNode.removeChild(r),d.close()}),e.options.image.useImageEditor&&s.$$(".jodit_use_image_editor",_).forEach(function(t){e.events.on(t,"mousedown touchstart",function(){var t=r.getAttribute("src")||"",o=e.ownerDocument.createElement("a"),n=function(){if(o.host!==location.host)return void a.Confirm(e.i18n("You can only edit your own images. Download this image on the host?"),function(t){t&&e.uploader&&e.uploader.uploadRemoteImage(""+o.href,function(t){a.Alert(e.i18n("The image has been successfully uploaded to the host!"),function(){"string"==typeof t.newfilename&&(r.setAttribute("src",t.baseurl+t.newfilename),N())})},function(t){a.Alert(e.i18n("There was an error loading %s",t.message))})})};o.href=t,e.getInstance("FileBrowser").getPathByUrl(""+o.href,function(n,i,s){e.getInstance("FileBrowser").openImageEditor(o.href,i,n,s,function(){var e=(new Date).getTime();r.setAttribute("src",t+(-1!==t.indexOf("?")?"":"?")+"&_tmp="+e),N()},function(e){a.Alert(e.message)})},function(e){a.Alert(e.message,n)})})}),s.$$(".jodit_rechange",_).forEach(function(t){t.addEventListener("mousedown",function(o){t.classList.toggle("active");var n=new l.ToolbarPopup(e,t);n.open(p(e,{upload:function(e){e.files&&e.files.length&&r.setAttribute("src",e.baseurl+e.files[0]),L(),n.close()},filebrowser:function(e){e&&e.files&&Array.isArray(e.files)&&e.files.length&&(r.setAttribute("src",e.files[0]),n.close(),L())}},r,n.close),!0),o.stopPropagation()})});var O=v.querySelector(".jodit_lock_helper.jodit_lock_size"),z=v.querySelector(".jodit_lock_helper.jodit_lock_margin");O&&O.addEventListener("click",function(){I=!I,this.innerHTML=l.ToolbarIcon.getIcon(I?"lock":"unlock"),e.events.fire(y,"change")}),z&&z.addEventListener("click",function(){A=!A,this.innerHTML=l.ToolbarIcon.getIcon(A?"lock":"unlock"),A?s.$$(".margins",v).forEach(function(e){e.matches(".marginTop")||e.setAttribute("disabled","true")}):s.$$(".margins",v).forEach(function(e){e.matches(".marginTop")||e.removeAttribute("disabled")})});var P=function(e){var t=parseInt(y.value,10),o=parseInt(w.value,10);e.target===y?w.value=""+Math.round(t/b):y.value=""+Math.round(o*b)};return e.events.on([y,w],"change keydown mousedown paste",function(t){I&&(e.defaultTimeout?(clearTimeout(n),n=window.setTimeout(P.bind(o,t),e.defaultTimeout)):P(t))}),d.setTitle([e.i18n("Image properties"),m.remove]),d.setContent(v),f.addEventListener("click",function(){d.close()}),h.addEventListener("click",function(){if(e.options.image.editStyle&&(s.val(v,".style")?r.setAttribute("style",s.val(v,".style")):r.removeAttribute("style")),!s.val(v,".imageSrc"))return r.parentNode&&r.parentNode.removeChild(r),void d.close();r.setAttribute("src",s.val(v,".imageSrc")),r.style.borderRadius="0"!==s.val(v,".border_radius")&&/^[0-9]+$/.test(s.val(v,".border_radius"))?s.val(v,".border_radius")+"px":"",s.val(v,".imageTitle")?r.setAttribute("title",s.val(v,".imageTitle")):r.removeAttribute("title"),s.val(v,".imageAlt")?r.setAttribute("alt",s.val(v,".imageAlt")):r.removeAttribute("alt");var t=c.Dom.closest(r,"a",e.editor);s.val(v,".imageLink")?(t||(t=c.Dom.wrap(r,"a",e)),t.setAttribute("href",s.val(v,".imageLink")),v.querySelector(".imageLinkOpenInNewTab").checked?t.setAttribute("target","_blank"):t.removeAttribute("target")):t&&t.parentNode&&t.parentNode.replaceChild(r,t);var o=function(e){return e=s.trim(e),/^[0-9]+$/.test(e)?e+"px":e};y.value===""+r.offsetWidth&&w.value===""+r.offsetHeight||s.css(r,{width:s.trim(y.value)?o(y.value):null,height:s.trim(w.value)?o(w.value):null}),e.options.image.editMargins&&(A?s.css(r,"margin",o(s.val(v,".marginTop"))):s.$$(".margins",v).forEach(function(e){var t=e.getAttribute("data-id")||"";s.css(r,t,o(e.value))})),e.options.image.editClass&&(s.val(v,".classes")?r.setAttribute("class",s.val(v,".classes")):r.removeAttribute("class")),e.options.image.editId&&(s.val(v,".id")?r.setAttribute("id",s.val(v,".id")):r.removeAttribute("id"));var n=function(){"block"===s.css(r,"display")&&s.css(r,"display",""),"auto"===r.style.marginLeft&&"auto"===r.style.marginRight&&(r.style.marginLeft="",r.style.marginRight="")};e.options.image.editAlign&&(s.val(v,".align")?-1!==["right","left"].indexOf(s.val(v,".align").toLowerCase())?(s.css(r,"float",s.val(v,".align")),n()):(s.css(r,"float",""),s.css(r,{display:"block","margin-left":"auto","margin-right":"auto"})):(s.css(r,"float")&&-1!==["right","left"].indexOf((""+s.css(r,"float")).toLowerCase())&&s.css(r,"float",""),n())),r.getAttribute("style")||r.removeAttribute("style"),e.setEditorValue(),d.close()}),d.setFooter([h,f]),d.setSize(500),d.open(),t&&t.preventDefault(),!1}};e.events.on("afterInit",function(){e.options.image.openOnDblClick?e.events.on(e.editor,"dblclick",t,"img"):e.events.on(e.editor,"dblclick",function(t){t.stopImmediatePropagation(),e.selection.select(this)},"img")}).on("openImageProperties",function(e){t.call(e)})}Object.defineProperty(t,"__esModule",{value:!0});var i=o(6),r=o(1),s=o(0),a=o(7),l=o(5),c=o(3),d=o(10),u=d.Widget.TabsWidget,p=d.Widget.FileSelectorWidget;r.Config.prototype.image={openOnDblClick:!0,editSrc:!0,useImageEditor:!0,editTitle:!0,editAlt:!0,editLink:!0,editSize:!0,editBorderRadius:!0,editMargins:!0,editClass:!0,editStyle:!0,editId:!0,editAlign:!0,showPreview:!0,selectImageAfterClose:!0},t.imageProperties=n},function(e,t,o){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=o(8),r=o(5),s=o(0),a=o(20),l=o(1),c=o(10),d=c.Widget.ColorPickerWidget,u=c.Widget.TabsWidget,p=o(3);l.Config.prototype.toolbarInline=!0,l.Config.prototype.toolbarInlineDisableFor=[],l.Config.prototype.popup={a:[{name:"eye",tooltip:"Open link",exec:function(e,t){var o=t.getAttribute("href");t&&o&&e.ownerWindow.open(o)}},{name:"link",tooltip:"Edit link",icon:"pencil"},"unlink","brush","file"],img:[{name:"bin",tooltip:"Delete",exec:function(e,t){t.parentNode&&(t.parentNode.removeChild(t),e.events.fire("hidePopup"))}},{name:"pencil",exec:function(e,t){"img"===t.tagName.toLowerCase()&&e.events.fire("openImageProperties",t)},tooltip:"Edit"},{name:"valign",list:["Top","Middle","Bottom"],tooltip:"Vertical align",exec:function(e,t,o){if("img"===t.tagName.toLowerCase()){var n=o.args&&"string"==typeof o.args[1]?o.args[1].toLowerCase():"";s.css(t,"vertical-align",n),e.events.fire("recalcPositionPopup")}}},{name:"left",list:["Left","Right","Center","Normal"],exec:function(e,t,o){if("img"===t.tagName.toLowerCase()){var n=function(){"block"===s.css(t,"display")&&s.css(t,"display",""),"auto"===t.style.marginLeft&&"auto"===t.style.marginRight&&(t.style.marginLeft="",t.style.marginRight="")},i=o.args&&"string"==typeof o.args[1]?o.args[1].toLowerCase():"";"normal"!==i?-1!==["right","left"].indexOf(i)?(s.css(t,"float",i),n()):(s.css(t,"float",""),s.css(t,{display:"block","margin-left":"auto","margin-right":"auto"})):(s.css(t,"float")&&-1!==["right","left"].indexOf(s.css(t,"float").toLowerCase())&&s.css(t,"float",""),n()),e.events.fire("recalcPositionPopup")}},tooltip:"Horizontal align"}],table:[{name:"brush",popup:function(e,t){var o,n,i,r,l,c,p=a.Table.getAllSelectedCells(t);return!!p.length&&(r=s.css(p[0],"color"),c=s.css(p[0],"background-color"),l=s.css(p[0],"border-color"),o=d(e,function(t){p.forEach(function(e){s.css(e,"background-color",t)}),e.setEditorValue()},c),n=d(e,function(t){p.forEach(function(e){s.css(e,"color",t)}),e.setEditorValue()},r),i=d(e,function(t){p.forEach(function(e){s.css(e,"border-color",t)}),e.setEditorValue()},l),u(e,{Background:o,Text:n,Border:i}))},tooltip:"Background"},{name:"valign",list:["Top","Middle","Bottom"],exec:function(e,t,o){var n=o.args&&"string"==typeof o.args[1]?o.args[1].toLowerCase():"";a.Table.getAllSelectedCells(t).forEach(function(e){s.css(e,"vertical-align",n)})},tooltip:"Vertical align"},{name:"splitv",list:{tablesplitv:"Split vertical",tablesplitg:"Split horizontal"},tooltip:"Split"},{name:"align",icon:"left"},"\n",{name:"merge",command:"tablemerge",tooltip:"Merge"},{name:"addcolumn",list:{tableaddcolumnbefore:"Insert column before",tableaddcolumnafter:"Insert column after"},exec:function(e,t,o){e.execCommand(o.args&&"string"==typeof o.args[0]?o.args[0].toLowerCase():"",!1,t)},tooltip:"Add column"},{name:"addrow",list:{tableaddrowbefore:"Insert row above",tableaddrowafter:"Insert row below"},exec:function(e,t,o){e.execCommand(o.args&&"string"==typeof o.args[0]?o.args[0].toLowerCase():"",!1,t)},tooltip:"Add row"},{name:"bin",list:{tablebin:"Delete table",tablebinrow:"Delete row",tablebincolumn:"Delete column",tableempty:"Empty cell"},exec:function(e,t,o){e.execCommand(o.args&&"string"==typeof o.args[0]?o.args[0].toLowerCase():"",!1,t)},tooltip:"Delete"}]},t.inlinePopup=function(e){function t(t){var o=e.call(this,t)||this;return o.isShown=!1,o.calcWindSizes=function(){var e=o.jodit.ownerWindow,t=o.jodit.ownerDocument.documentElement,n=o.jodit.ownerDocument.body,i=e.pageYOffset||t.scrollTop||n.scrollTop,r=t.clientTop||n.clientTop||0,s=e.pageXOffset||t.scrollLeft||n.scrollLeft,a=t.clientLeft||n.clientLeft||0;return{left:a,top:r,width:t.clientWidth+s-a,height:t.clientHeight+i-r}},o._hiddenClass="jodit_toolbar_popup-inline-target-hidden",o.calcPosition=function(e,t){o.popup.target.classList.remove(o._hiddenClass);var n=e.left+e.width/2,i=s.offset(o.jodit.workplace,o.jodit,o.jodit.ownerDocument,!0),r=e.top+e.height+10;o.target.style.left=n+"px",o.target.style.top=r+"px",o.jodit.isFullSize()&&(o.target.style.zIndex=""+s.css(o.jodit.container,"zIndex"));var a=o.container.offsetWidth/2,l=-a;o.popup.container.classList.remove("jodit_toolbar_popup-inline-top"),r+o.container.offsetHeight>t.height&&(r=e.top-o.container.offsetHeight-10,o.target.style.top=r+"px",o.popup.container.classList.add("jodit_toolbar_popup-inline-top")),0>n-a&&(l=-(e.width/2+e.left)),n+a>t.width&&(l=-(o.container.offsetWidth-(t.width-n))),o.container.style.marginLeft=l+"px",(i.top-r>50||r-(i.top+i.height)>50)&&o.popup.target.classList.add(o._hiddenClass)},o.reCalcPosition=function(){o.__getRect&&o.calcPosition(o.__getRect(),o.calcWindSizes())},o.showPopup=function(e,t,n){if(!o.jodit.options.toolbarInline||!o.jodit.options.popup[t.toLowerCase()])return!1;if(o.isExcludedTarget(t))return!0;o.isShown=!0,o.isTargetAction=!0;var i=o.calcWindSizes();return o.target.parentNode||o.jodit.ownerDocument.body.appendChild(o.target),o.toolbar.build(o.jodit.options.popup[t.toLowerCase()],o.container,n),o.popup.open(o.container,!1,!0),o.__getRect=e,o.calcPosition(e(),i),!0},o.hidePopup=function(e){e&&(e instanceof o.jodit.editorWindow.Node||e instanceof r.ToolbarPopup)&&p.Dom.isOrContains(o.target,e instanceof r.ToolbarPopup?e.target:e)||(o.isTargetAction=!1,o.isShown=!1,o.popup.close(),o.target.parentNode&&o.target.parentNode.removeChild(o.target))},o.isSelectionStarted=!1,o.onSelectionEnd=s.debounce(function(){o.jodit.isEditorMode()&&(o.isSelectionStarted&&(o.isTargetAction||o.onChangeSelection()),o.isSelectionStarted=!1,o.isTargetAction=!1)},o.jodit.defaultTimeout),o.isTargetAction=!1,o.isSelectionPopup=!1,o.onSelectionStart=function(e){if(o.jodit.isEditorMode()&&(o.isTargetAction=!1,o.isSelectionPopup=!1,!o.isSelectionStarted)){var t=Object.keys(o.jodit.options.popup).join("|"),n="IMG"===e.target.nodeName?e.target:p.Dom.closest(e.target,t,o.jodit.editor);n&&o.showPopup(function(){return s.offset(n,o.jodit,o.jodit.editorDocument)},n.nodeName,n)||(o.isSelectionStarted=!0)}},o.onChangeSelection=function(){if(o.jodit.options.toolbarInline&&o.jodit.isEditorMode()&&!o.hideIfCollapsed()&&void 0!==o.jodit.options.popup.selection){var e=o.jodit.editorWindow.getSelection();if(e.rangeCount){o.isSelectionPopup=!0;var t=e.getRangeAt(0);o.showPopup(function(){return s.offset(t,o.jodit,o.jodit.editorDocument)},"selection")}}},o.checkIsTargetEvent=function(){o.isTargetAction?o.isTargetAction=!1:o.hidePopup()},o.toolbar=new r.ToolbarCollection(t),o.target=t.ownerDocument.createElement("div"),o.container=t.ownerDocument.createElement("div"),o.target.classList.add("jodit_toolbar_popup-inline-target"),o.popup=new r.ToolbarPopup(t,o.target,void 0,"jodit_toolbar_popup-inline"),o}return n(t,e),t.prototype.isExcludedTarget=function(e){return-1!==s.splitArray(this.jodit.options.toolbarInlineDisableFor).map(function(e){return e.toLowerCase()}).indexOf(e.toLowerCase())},t.prototype.hideIfCollapsed=function(){return!!this.jodit.selection.isCollapsed()&&(this.hidePopup(),!0)},t.prototype.afterInit=function(e){var t=this;e.events.on(this.target,"mousedown keydown touchstart",function(e){e.stopPropagation()}).on("beforeOpenPopup hidePopup",this.hidePopup).on("recalcPositionPopup",this.reCalcPosition).on("getDiffButtons.mobile",function(o){if(t.toolbar===o)return s.splitArray(e.options.buttons).filter(function(e){return"|"!==e&&"\n"!==e}).filter(function(e){return 0>t.toolbar.getButtonsList().indexOf(e)})}).on("selectionchange",this.onChangeSelection).on("afterCommand afterExec",function(){t.isShown&&t.isSelectionPopup&&t.onChangeSelection()}).on("showPopup",function(e,o){var n=("string"==typeof e?e:e.nodeName).toLowerCase();t.isSelectionPopup=!1,t.showPopup(o,n,"string"==typeof e?void 0:e)}).on("mousedown keydown touchstart",this.onSelectionStart).on([e.ownerWindow,e.editor],"scroll resize",this.reCalcPosition).on([e.ownerWindow],"mouseup keyup touchend",this.onSelectionEnd).on([e.ownerWindow],"mousedown keydown touchstart",this.checkIsTargetEvent)},t.prototype.beforeDestruct=function(t){this.popup.destruct(),this.toolbar.destruct(),this.target.parentNode&&this.target.parentNode.removeChild(this.target),t.events.off([t.ownerWindow],"scroll resize",this.reCalcPosition).off([t.ownerWindow],"mouseup keyup touchend",this.onSelectionEnd).off([t.ownerWindow],"mousedown keydown touchstart",this.checkIsTargetEvent),e.prototype.destruct.call(this)},t}(i.Plugin)},function(e,t,o){"use strict";function n(e){var t=function(t){var o=function(o){if(o instanceof e.editorWindow.HTMLElement)switch(t.toLowerCase()){case"justifyfull":o.style.textAlign="justify";break;case"justifyright":o.style.textAlign="right";break;case"justifyleft":o.style.textAlign="left";break;case"justifycenter":o.style.textAlign="center"}};return e.selection.focus(),e.selection.eachSelection(function(t){if(!t&&e.editor.querySelector(".jodit_selected_cell"))return i.$$(".jodit_selected_cell",e.editor).forEach(o),!1;if(t instanceof e.editorWindow.Node){var n=!!t&&r.Dom.up(t,r.Dom.isBlock,e.editor);!n&&t&&(n=r.Dom.wrapInline(t,e.options.enter,e)),o(n)}}),!1};e.registerCommand("justifyfull",t),e.registerCommand("justifyright",t),e.registerCommand("justifyleft",t),e.registerCommand("justifycenter",t)}Object.defineProperty(t,"__esModule",{value:!0});var i=o(0),r=o(3),s=o(1),a=o(5);s.Config.prototype.controls.align={name:"left",tooltip:"Align",getLabel:function(e,t,o){var n=e.selection.current();if(n){var s=r.Dom.closest(n,r.Dom.isBlock,e.editor)||e.editor,l=""+i.css(s,"text-align");t.defaultValue&&-1!==t.defaultValue.indexOf(l)&&(l="left"),t.data&&t.data.currentValue!==l&&t.list&&-1!==t.list.indexOf(l)&&(o.textBox.innerHTML=e.options.textIcons?""+l+"":a.ToolbarIcon.getIcon(l,""),o.textBox.firstChild.classList.add("jodit_icon"),t.data.currentValue=l)}return!1},isActive:function(e,t){var o=e.selection.current();if(o&&t.defaultValue){var n=r.Dom.closest(o,r.Dom.isBlock,e.editor)||e.editor;return-1===t.defaultValue.indexOf(""+i.css(n,"text-align"))}return!1},defaultValue:["left","start","inherit"],data:{currentValue:"left"},list:["center","left","right","justify"]},s.Config.prototype.controls.center={command:"justifyCenter",tags:["center"],css:{"text-align":"center"},tooltip:"Align Center"},s.Config.prototype.controls.justify={command:"justifyFull",css:{"text-align":"justify"},tooltip:"Align Justify"},s.Config.prototype.controls.left={command:"justifyLeft",css:{"text-align":"left"},tooltip:"Align Left"},s.Config.prototype.controls.right={command:"justifyRight",css:{"text-align":"right"},tooltip:"Align Right"},t.justify=n},function(e,t,o){"use strict";function n(e){e.options.link.followOnDblClick&&e.events.on("afterInit",function(){e.events.on(e.editor,"dblclick",function(e){var t=this.getAttribute("href");t&&(location.href=t,e.preventDefault())},"a")}),e.options.link.processPastedLink&&e.events.on("processPaste",function(t,o){if(r.isURL(o)){var n=r.convertMediaURLToVideoEmbed(o);if(n!==o)return r.dom(n,e.editorDocument);var i=e.editorDocument.createElement("a");return i.setAttribute("href",o),i.innerText=o,e.options.link.openLinkDialogAfterPost&&setTimeout(function(){},100),i}}),e.options.link.removeLinkAfterFormat&&e.events.on("afterCommand",function(t){var o,n,i=e.selection;"removeFormat"===t&&(n=i.current(),n&&"A"!==n.nodeName&&(n=s.Dom.closest(n,"A",e.editor)),n&&"A"===n.nodeName&&(n.innerHTML===n.innerText?o=e.editorDocument.createTextNode(n.innerHTML):(o=e.editorDocument.createElement("span"),o.innerHTML=n.innerHTML),n.parentNode&&(n.parentNode.replaceChild(o,n),e.selection.setCursorIn(o,!0))))})}Object.defineProperty(t,"__esModule",{value:!0});var i=o(1),r=o(0),s=o(3);i.Config.prototype.link={followOnDblClick:!0,processVideoLink:!0,processPastedLink:!0,openLinkDialogAfterPost:!0,removeLinkAfterFormat:!0},i.Config.prototype.controls.unlink={exec:function(e,t){var o=s.Dom.closest(t,"A",e.editor);o&&s.Dom.unwrap(o),e.events.fire("hidePopup")}},i.Config.prototype.controls.link={isActive:function(e){var t=e.selection.current();return t&&!1!==s.Dom.closest(t,"a",e.editor)},popup:function(e,t,o,n){var i=e.editorWindow.getSelection(),a=r.dom('
  
',e.ownerDocument);t=!(!t||!s.Dom.closest(t,"A",e.editor))&&s.Dom.closest(t,"A",e.editor);var l=a.querySelector(".jodit_link_insert_button"),c=a.querySelector(".jodit_unlink_button");t?(r.val(a,"input[name=url]",t.getAttribute("href")||""),r.val(a,"input[name=text]",t.innerText),a.querySelector("input[name=target]").checked="_blank"===t.getAttribute("target"),a.querySelector("input[name=nofollow]").checked="nofollow"===t.getAttribute("rel"),l&&(l.innerHTML=e.i18n("Update"))):(c&&(c.style.display="none"),r.val(a,"input[name=text]",""+i),l&&(l.innerHTML=e.i18n("Insert")));var d=e.selection.save();return c&&c.addEventListener("mousedown",function(o){t&&s.Dom.unwrap(t),e.selection.restore(d),n(),o.preventDefault()}),a.addEventListener("submit",function(o){o.preventDefault(),e.selection.restore(d);var i=t||e.editorDocument.createElement("a");return r.val(a,"input[name=url]")?(i.setAttribute("href",r.val(a,"input[name=url]")),i.innerText=r.val(a,"input[name=text]"),a.querySelector("input[name=target]").checked?i.setAttribute("target","_blank"):i.removeAttribute("target"),a.querySelector("input[name=nofollow]").checked?i.setAttribute("rel","nofollow"):i.removeAttribute("rel"),t||e.selection.insertNode(i),n(),!1):(a.querySelector("input[name=url]").focus(),a.querySelector("input[name=url]").classList.add("jodit_error"),!1)}),a},tags:["a"],tooltip:"Insert link"},t.link=n},function(e,t,o){"use strict";function n(e){var t,o=0,n=a.splitArray(e.options.buttons);e.events.on("touchend",function(n){n.changedTouches.length&&(t=(new Date).getTime())-o>e.options.mobileTapTimeout&&(o=t,e.selection.insertCursorAtPoint(n.changedTouches[0].clientX,n.changedTouches[0].clientY))}).on("getDiffButtons.mobile",function(t){if(t===e.toolbar)return a.splitArray(e.options.buttons).filter(function(e){return 0>n.indexOf(e)})}),e.options.toolbarAdaptive&&e.events.on("resize afterInit",function(){if(e.options.toolbar){var t=e.container.offsetWidth,o=[];""+(o=a.splitArray(e.options.sizeLG>t?e.options.sizeMD>t?e.options.sizeSM>t?e.options.buttonsXS:e.options.buttonsSM:e.options.buttonsMD:e.options.buttons))!=""+n&&(n=o,e.toolbar.build(n.concat(e.options.extraButtons),e.container))}})}Object.defineProperty(t,"__esModule",{value:!0});var i=o(1),r=o(5),s=o(2),a=o(0);i.Config.prototype.mobileTapTimeout=300,i.Config.prototype.toolbarAdaptive=!0,i.Config.prototype.controls.dots={mode:s.MODE_SOURCE+s.MODE_WYSIWYG,popup:function(e,t,o,n,i){var s=o.data;return void 0===s&&(s={container:e.ownerDocument.createElement("div"),toolbar:new r.ToolbarCollection(e),rebuild:function(){var t=e.events.fire("getDiffButtons.mobile",i.parentToolbar);t&&s&&s.toolbar.build(a.splitArray(t),s.container)}},s.container.style.width="100px",o.data=s),s.rebuild(),s.container}},t.mobile=n},function(e,t,o){"use strict";function n(e){e.events.on("afterCommand",function(t){if(/insert(un)?orderedlist/i.test(t)){var o=i.Dom.up(e.selection.current(),function(e){return e&&/^UL|OL$/i.test(e.nodeName)},e.editor);if(o&&o.parentNode&&"P"===o.parentNode.nodeName){var n=e.selection.save();i.Dom.unwrap(o.parentNode),[].slice.call(o.childNodes).forEach(function(e){e.lastChild&&e.lastChild.nodeType===Node.ELEMENT_NODE&&"BR"===e.lastChild.nodeName&&e.removeChild(e.lastChild)}),e.selection.restore(n)}e.setEditorValue()}})}Object.defineProperty(t,"__esModule",{value:!0});var i=o(3),r=o(1);r.Config.prototype.controls.ul={command:"insertUnorderedList",controlName:"ul",tags:["ul"],tooltip:"Insert Unordered List"},r.Config.prototype.controls.ol={command:"insertOrderedList",controlName:"ol",tags:["ol"],tooltip:"Insert Ordered List"},t.orderedlist=n},function(e,t,o){"use strict";function n(e){var t="",o=function(e){var t=document.createElement("div");return t.innerHTML=e,t.innerText},n=function(t,o,n,s,a){if(void 0===s&&(s="Clean"),void 0===a&&(a="Insert only Text"),!e.events||!1!==e.events.fire("beforeOpenPasteDialog",t,o,n,s,a)){var l=i.Confirm('
'+t+"
",o,n);l.dialogbox.setAttribute("data-editor_id",e.id);var c=r.dom(''+e.i18n("Keep")+"",l.document),d=r.dom(''+e.i18n(s)+"",l.document),u=r.dom(''+e.i18n(a)+"",l.document),p=r.dom(''+e.i18n("Cancel")+"",l.document);return e.events.on(c,"click",function(){l.close(),n&&n(!0)}),e.events.on(d,"click",function(){l.close(),n&&n(!1)}),e.events.on(u,"click",function(){l.close(),n&&n(0)}),e.events.on(p,"click",function(){l.close()}),l.setFooter([c,d,a?u:"",p]),e.events&&e.events.fire("afterOpenPasteDialog",l,t,o,n,s,a),l}},s=function(t,n){switch(n){case a.INSERT_CLEAR_HTML:t=r.cleanFromWord(t);break;case a.INSERT_ONLY_TEXT:t=o(t);break;case a.INSERT_AS_TEXT:t=r.htmlspecialchars(t)}e.selection.insertHTML(t)},l=function(o,i){if(r.isHTML(o)&&t!==c(o))return e.events.stopPropagation("beforePaste"),o=c(o),n(e.i18n("Your code is similar to HTML. Keep as HTML?"),e.i18n("Paste as HTML"),function(t){var n=a.INSERT_AS_HTML;!1===t&&(n=a.INSERT_AS_TEXT),0===t&&(n=a.INSERT_ONLY_TEXT),"drop"===i.type&&e.selection.insertCursorAtPoint(i.clientX,i.clientY),s(o,n),e.setEditorValue()},"Insert as Text"),!1},c=function(e){var t=e.search(//i);-1!==t&&(e=e.substr(t+20));var o=e.search(//i);return-1!==o&&(e=e.substr(0,o)),e},d=function(e){return e.clipboardData?e.clipboardData:e.dataTransfer};e.events.on("copy cut",function(n){var i=e.selection.getHTML(),r=d(n)||d(e.editorWindow)||d(n.originalEvent);r.setData(a.TEXT_PLAIN,o(i)),r.setData(a.TEXT_HTML,i),t=i,"cut"===n.type&&(e.selection.remove(),e.selection.focus()),n.preventDefault(),e.events.fire("afterCopy",i)}).on("paste",function(o){if(!1===e.events.fire("beforePaste",o))return o.preventDefault(),!1;if(o&&d(o)){var n=void 0,i=d(o).types,l="",u="";if(Array.isArray(i)||"domstringlist"===r.type(i))for(n=0;i.length>n;n+=1)l+=i[n]+";";else l=i;/text\/html/i.test(l)?u=d(o).getData("text/html"):/text\/rtf/i.test(l)&&r.browser("safari")?u=d(o).getData("text/rtf"):/text\/plain/i.test(l)&&!r.browser("mozilla")?u=d(o).getData(a.TEXT_PLAIN):/text/i.test(l)&&r.isIE&&(u=d(o).getData(a.TEXT_PLAIN)),(u instanceof e.editorWindow.Node||""!==r.trim(u))&&(u=c(u),t!==u&&(u=e.events.fire("processPaste",o,u)),("string"==typeof u||u instanceof e.editorWindow.Node)&&("drop"===o.type&&e.selection.insertCursorAtPoint(o.clientX,o.clientY),s(u,e.options.defaultActionOnPaste)),o.preventDefault(),o.stopPropagation())}return!1!==e.events.fire("afterPaste",o)&&void 0}),e.options.askBeforePasteHTML&&e.events.on("beforePaste",function(e){if(e&&d(e).getData(a.TEXT_PLAIN)){var t=d(e).getData(a.TEXT_PLAIN);return l(t,e)}}),e.options.askBeforePasteFromWord&&e.events.on("beforePaste",function(i){if(i&&d(i).getData&&d(i).getData(a.TEXT_HTML)){var s=function(s){if(r.isHTML(s)&&t!==c(s))return r.isHTMLFromWord(s)?n(e.i18n("The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?"),e.i18n("Word Paste Detected"),function(t){!0===t&&(s=r.applyStyles(s),e.options.beautifyHTML&&e.ownerWindow.html_beautify&&(s=e.ownerWindow.html_beautify(s))),!1===t&&(s=r.cleanFromWord(s)),0===t&&(s=o(r.cleanFromWord(s))),e.selection.insertHTML(s),e.setEditorValue()}):l(s,i),!1};if(d(i).types&&-1!==[].slice.call(d(i).types).indexOf("text/html")){var u=d(i).getData(a.TEXT_HTML);return s(u)}if("drop"!==i.type){var p=r.dom('
',e.ownerDocument);e.container.appendChild(p);var f=e.selection.save();p.focus();var h=0,m=function(){p.parentNode&&p.parentNode.removeChild(p),e.selection.restore(f)},v=function(){if(h+=1,p.childNodes&&p.childNodes.length>0){var t=p.innerHTML;m(),!1!==s(t)&&e.selection.insertHTML(t)}else 5>h?setTimeout(function(){v()},20):m()};v()}}})}Object.defineProperty(t,"__esModule",{value:!0});var i=o(7),r=o(0),s=o(1),a=o(2);s.Config.prototype.askBeforePasteHTML=!0,s.Config.prototype.askBeforePasteFromWord=!0,s.Config.prototype.defaultActionOnPaste=a.INSERT_AS_HTML,s.Config.prototype.controls.cut={command:"cut",isDisable:function(e){var t=e.editorWindow.getSelection();return!t||t.isCollapsed},tooltip:"Cut selection"},t.paste=n},function(e,t,o){"use strict";function n(e){if(e.options.showPlaceholder){this.destruct=function(){i.parentNode&&i.parentNode.removeChild(i)};var t=function(){if(i.parentNode&&!e.options.readonly){var t=0,o=0,n=e.editorWindow.getComputedStyle(e.editor);if(e.editor.firstChild&&e.editor.firstChild.nodeType===Node.ELEMENT_NODE){var r=e.editorWindow.getComputedStyle(e.editor.firstChild);t=parseInt(r.getPropertyValue("margin-top"),10),o=parseInt(r.getPropertyValue("margin-left"),10),i.style.fontSize=parseInt(r.getPropertyValue("font-size"),10)+"px",i.style.lineHeight=r.getPropertyValue("line-height")}else i.style.fontSize=parseInt(n.getPropertyValue("font-size"),10)+"px",i.style.lineHeight=n.getPropertyValue("line-height");s.css(i,{display:"block",marginTop:Math.max(parseInt(n.getPropertyValue("margin-top"),10),t),marginLeft:Math.max(parseInt(n.getPropertyValue("margin-left"),10),o)})}},o=function(){i.parentNode&&(i.style.display="none")},n=s.debounce(function(){if(null!==i.parentNode&&e.editor){if(e.getRealMode()!==r.MODE_WYSIWYG)return o();var n=e.getEditorValue();n&&!/^<(p|div|h[1-6])><\/\1>$/.test(n)?o():t()}},e.defaultTimeout/10),i=s.dom('",e.ownerDocument);"rtl"===e.options.direction&&(i.style.right="0px",i.style.direction="rtl"),e.options.useInputsPlaceholder&&e.element.hasAttribute("placeholder")&&(i.innerHTML=e.element.getAttribute("placeholder")||""),e.events.on("readonly",function(e){e?o():n()}).on("afterInit",function(){e.workplace.appendChild(i),n(),e.events.fire("placeholder",i.innerHTML),e.events.on("change keyup mouseup keydown mousedown afterSetMode",n).on(window,"load",n)})}}Object.defineProperty(t,"__esModule",{value:!0});var i=o(1),r=o(2),s=o(0);i.Config.prototype.showPlaceholder=!0,i.Config.prototype.useInputsPlaceholder=!0,i.Config.prototype.placeholder="Type something",t.placeholder=n},function(e,t,o){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=o(2),r=o(1),s=o(4);r.Config.prototype.controls.redo={mode:i.MODE_SPLIT,isDisable:function(e){return!e.observer.stack.canRedo()},tooltip:"Redo"},r.Config.prototype.controls.undo={mode:i.MODE_SPLIT,isDisable:function(e){return!e.observer.stack.canUndo()},tooltip:"Undo"},t.redoundo=function(e){function t(t){var o=e.call(this,t)||this,n=function(e){return t.getRealMode()===i.MODE_WYSIWYG&&o.jodit.observer[e](),!1};return t.registerCommand("redo",{exec:n,hotkeys:"ctrl+y,ctrl+shift+z"}),t.registerCommand("undo",{exec:n,hotkeys:"ctrl+z"}),o}return n(t,e),t}(s.Component)},function(e,t,o){"use strict";function n(e){var t,o,n,i,a,l,c,d,u,p,f,h=!1,m=!1,v=!1,g=0,_=s.dom('',e.ownerDocument),b=_.getElementsByTagName("span")[0],y=function(){m=!1,v=!1,o=null,_.style.display="none"},w=function(t,o){e.options.resizer.showSize&&(b.style.opacity="1",b.innerHTML=t+" x "+o,window.clearTimeout(g),g=window.setTimeout(function(){b.style.opacity="0"},1e3))},C=function(){if(v&&o&&_){var t=s.offset(_.parentNode||e.ownerDocument.documentElement,e,e.ownerDocument,!0),n=s.offset(o,e,e.editorDocument),i=parseInt(_.style.left||"0",10),r=parseInt(_.style.top||"0",10),a=_.offsetWidth,l=_.offsetHeight,c=n.top-1-t.top,d=n.left-1-t.left;r===c&&i===d&&a===o.offsetWidth&&l===o.offsetHeight||(_.style.top=c+"px",_.style.left=d+"px",_.style.width=o.offsetWidth+"px",_.style.height=o.offsetHeight+"px",e.events&&(e.events.fire(o,"changesize"),isNaN(i)||e.events.fire("resize")))}},E=function(){e.options.readonly||(_.parentNode||e.workplace.appendChild(_),v=!0,_.style.display="block",e.isFullSize()&&(_.style.zIndex=""+s.css(e.container,"zIndex")),C())},j=function(t){var n;if("IFRAME"===t.tagName)if(t.parentNode&&t.parentNode.getAttribute("data-jodit_iframe_wrapper"))t=t.parentNode;else{n=s.dom('',e.editorDocument),n.style.display="inline-block"===t.style.display?"inline-block":"block",n.style.width=t.offsetWidth+"px",n.style.height=t.offsetHeight+"px",t.parentNode&&t.parentNode.insertBefore(n,t),n.appendChild(t);var i=t;e.events.on(n,"changesize",function(){i.setAttribute("width",n.offsetWidth+"px"),i.setAttribute("height",n.offsetHeight+"px")}),t=n}var r;e.events.on(t,"dragstart",y).on(t,"mousedown",function(e){s.isIE()&&"IMG"===t.nodeName&&e.preventDefault()}).on(t,"mousedown touchstart",function(){h||(h=!0,o=t,E(),"IMG"!==o.tagName||o.complete||o.addEventListener("load",function e(){C(),o&&o.removeEventListener("load",e)}),clearTimeout(r)),r=window.setTimeout(function(){h=!1},400)})};s.$$("i",_).forEach(function(r){e.events.on(r,"mousedown touchstart",function(s){if(!o||!o.parentNode)return y(),!1;t=r,s.preventDefault(),s.stopImmediatePropagation(),a=o.offsetWidth,l=o.offsetHeight,c=a/l,m=!0,n=s.clientX,i=s.clientY,e.events.fire("hidePopup"),e.lock("resizer")})}),e.events.on("readonly",function(e){e&&y()}).on("beforeDestruct",function(){_.parentNode&&_.parentNode.removeChild(_)}).on("afterInit",function(){e.events.on(e.editor,"keydown",function(t){v&&t.keyCode===r.KEY_DELETE&&o&&"table"!==o.tagName.toLowerCase()&&("JODIT"!==o.tagName?e.selection.select(o):(o.parentNode&&o.parentNode.removeChild(o),y(),t.preventDefault()))}).on(e.ownerWindow,"mousemove touchmove",function(r){if(m){if(p=r.clientX-n,f=r.clientY-i,!o)return;var h=t.className;"IMG"===o.tagName?(p?(u=a+(h.match(/left/)?-1:1)*p,d=Math.round(u/c)):(d=l+(h.match(/top/)?-1:1)*f,u=Math.round(d*c)),u>s.innerWidth(e.editor,e.ownerWindow)&&(u=s.innerWidth(e.editor,e.ownerWindow),d=Math.round(u/c))):(u=a+(h.match(/left/)?-1:1)*p,d=l+(h.match(/top/)?-1:1)*f),u>e.options.resizer.min_width&&(o.style.width=_.parentNode.offsetWidth>u?u+"px":"100%"),d>e.options.resizer.min_height&&(o.style.height=d+"px"),C(),w(o.offsetWidth,o.offsetHeight),r.stopImmediatePropagation()}}).on(e.ownerWindow,"resize",function(){v&&C()}).on(e.ownerWindow,"mouseup keydown touchend",function(t){v&&!h&&(m?(e.unlock(),m=!1,e.setEditorValue(),t.stopImmediatePropagation()):y())}).on([e.ownerWindow,e.editor],"scroll",function(){v&&!m&&y()})}).on("afterGetValueFromEditor",function(e){e.value=e.value.replace(/]+data-jodit_iframe_wrapper[^>]+>(.*?]+>[\s\n\r]*<\/iframe>.*?)<\/jodit>/gi,"$1")}).on("change afterInit afterSetMode",s.debounce(function(){v&&(o&&o.parentNode?C():y()),e.isDestructed||s.$$("img, table, iframe",e.editor).forEach(function(t){e.getMode()!==r.MODE_SOURCE&&!t.__jodit_resizer_binded&&("IFRAME"===t.tagName&&e.options.useIframeResizer||"IMG"===t.tagName&&e.options.useImageResizer||"TABLE"===t.tagName&&e.options.useTableResizer)&&(t.__jodit_resizer_binded=!0,j(t))})},e.defaultTimeout))}Object.defineProperty(t,"__esModule",{value:!0});var i=o(1),r=o(2),s=o(0);i.Config.prototype.useIframeResizer=!0,i.Config.prototype.useTableResizer=!0,i.Config.prototype.useImageResizer=!0,i.Config.prototype.resizer={showSize:!0,min_width:10,min_height:10},t.resizer=n},function(e,t,o){"use strict";function n(e){var t=function(t){i.css(e.container,"height",t),e.options.saveHeightInStorage&&e.storage.set("height",t)},o=function(t){return i.css(e.container,"width",t)},n=function(t){return i.css(e.workplace,"height",t)};if("auto"!==e.options.height&&(e.options.allowResizeX||e.options.allowResizeY)){var r=i.dom('
',e.ownerDocument),s={x:0,y:0,w:0,h:0},a=!1;e.events.on(r,"mousedown touchstart",function(t){a=!0,s.x=t.clientX,s.y=t.clientY,s.w=e.container.offsetWidth,s.h=e.container.offsetHeight,e.lock(),t.preventDefault()}).on(e.ownerWindow,"mousemove touchmove",i.throttle(function(n){a&&(t(e.options.allowResizeY?s.h+n.clientY-s.y:s.h),o(e.options.allowResizeX?s.w+n.clientX-s.x:s.w),d(),e.events.fire("resize"))},e.defaultTimeout/10)).on(e.ownerWindow,"mouseup touchsend",function(){a&&(a=!1,e.unlock())}).on("afterInit",function(){e.container.appendChild(r)}).on("toggleFullSize",function(e){r.style.display=e?"none":"block"})}var l=function(){return(e.options.toolbar?e.toolbar.container.offsetHeight:0)+(e.statusbar?e.statusbar.container.offsetHeight:0)},c=function(){if(e.container&&e.container.parentNode){var t=i.css(e.container,"minHeight")-l();[e.workplace,e.iframe,e.editor].map(function(o){var n=o===e.editor?t-2:t;o&&i.css(o,"minHeight",n),e.events.fire("setMinHeight",n)})}},d=function(){e.options.inline||(c(),e.container&&("auto"!==e.options.height||e.isFullSize())&&n(e.container.offsetHeight-l()))},u=i.debounce(d,e.defaultTimeout);e.events.on("toggleFullSize",function(t){t||"auto"!==e.options.height||(n("auto"),c())}).on("afterInit",function(){e.options.inline||(i.css(e.editor,{minHeight:"100%"}),i.css(e.container,{minHeight:e.options.minHeight,minWidth:e.options.minWidth,maxWidth:e.options.maxWidth}));var n=e.options.height;if(e.options.saveHeightInStorage&&"auto"!==n){var r=e.storage.get("height");r&&(n=r)}e.options.inline||(t(n),o(e.options.width)),d()},void 0,void 0,!0).on(window,"load",u).on("afterInit resize updateToolbar scroll afterResize",u)}Object.defineProperty(t,"__esModule",{value:!0});var i=o(0),r=o(1);r.Config.prototype.allowResizeX=!1,r.Config.prototype.allowResizeY=!0,t.size=n},function(e,t,o){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=o(1),r=o(2),s=o(0),a=o(4),l=o(2);i.Config.prototype.beautifyHTML=!0,i.Config.prototype.useAceEditor=!0,i.Config.prototype.sourceEditorNativeOptions={showGutter:!0,theme:"ace/theme/idle_fingers",mode:"ace/mode/html",wrap:!0,highlightActiveLine:!0},i.Config.prototype.sourceEditorCDNUrlsJS=["https://cdnjs.cloudflare.com/ajax/libs/ace/1.3.3/ace.js"],i.Config.prototype.beautifyHTMLCDNUrlsJS=["https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.7.5/beautify.min.js","https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.7.5/beautify-html.min.js"],i.Config.prototype.controls.source={mode:r.MODE_SPLIT,exec:function(e){e.toggleMode()},isActive:function(e){return e.getRealMode()===r.MODE_SOURCE},tooltip:"Change mode"},t.source=function(e){function t(t){var o=e.call(this,t)||this;return o.className="jodit_ace_editor",o.loadNext=function(e,t,n,i){if(void 0===n&&(n="aceReady"),void 0===i&&(i=o.className),n&&void 0===t[e]&&o.jodit&&o.jodit.events)return o.jodit.events&&o.jodit.events.fire(n),void(o.jodit.events&&o.jodit.events.fire(o.jodit.ownerWindow,n));void 0!==t[e]&&s.appendScript(t[e],function(){o.loadNext(e+1,t,n,i)},i,o.jodit.ownerDocument)},o.fromWYSIWYG=function(e){if(void 0===e&&(e=!1),!o.__lock||!0===e){o.__lock=!0;var t=o.jodit.getEditorValue(!1);t!==o.getMirrorValue()&&o.setMirrorValue(t),o.__lock=!1}},o.insertHTML=function(e){if(o.mirror.selectionStart||0===o.mirror.selectionStart){var t=o.mirror.selectionStart,n=o.mirror.selectionEnd;o.mirror.value=o.mirror.value.substring(0,t)+e+o.mirror.value.substring(n,o.mirror.value.length)}else o.mirror.value+=o.mirror;o.toWYSIWYG()},o.__lock=!1,o.toWYSIWYG=function(){o.__lock||(o.__lock=!0,o.jodit.setEditorValue(o.getMirrorValue()),o.__lock=!1)},o.autosize=s.debounce(function(){o.mirror.style.height="auto",o.mirror.style.height=o.mirror.scrollHeight+"px"},o.jodit.defaultTimeout),o.getNormalPosition=function(e,t){for(var o=e;o>0;){if(o--,"<"===t[o]&&void 0!==t[o+1]&&t[o+1].match(/[\w\/]+/i))return o;if(">"===t[o])return e}return e},o.tempMarkerStart="{start-jodit-selection}",o.tempMarkerStartReg=/{start-jodit-selection}/g,o.tempMarkerEnd="{end-jodit-selection}",o.tempMarkerEndReg=/{end-jodit-selection}/g,o.__clear=function(e){return e.replace(r.INVISIBLE_SPACE_REG_EXP,"")},o.selInfo=[],o.selectAll=function(){o.mirror.select()},o.onSelectAll=function(e){if("selectall"===e.toLowerCase()&&o.jodit.getRealMode()===l.MODE_SOURCE)return o.selectAll(),!1},o.getSelectionStart=function(){return o.mirror.selectionStart},o.getSelectionEnd=function(){return o.mirror.selectionEnd},o.setMirrorSelectionRange=function(e,t){o.mirror.setSelectionRange(e,t)},o.saveSelection=function(){if(o.jodit.getRealMode()===r.MODE_WYSIWYG)o.selInfo=o.jodit.selection.save()||[],o.jodit.setEditorValue(),o.fromWYSIWYG(!0);else{o.selInfo.length=0;var e=o.getMirrorValue();if(o.getSelectionStart()===o.getSelectionEnd()){var t=o.jodit.selection.marker(!0);o.selInfo[0]={startId:t.id,collapsed:!0,startMarker:t.outerHTML};var n=o.getNormalPosition(o.getSelectionStart(),o.getMirrorValue());o.setMirrorValue(e.substr(0,n)+o.__clear(o.selInfo[0].startMarker)+e.substr(n))}else{var i=o.jodit.selection.marker(!0),s=o.jodit.selection.marker(!1);o.selInfo[0]={startId:i.id,endId:s.id,collapsed:!1,startMarker:o.__clear(i.outerHTML),endMarker:o.__clear(s.outerHTML)};var n=o.getNormalPosition(o.getSelectionStart(),e),a=o.getNormalPosition(o.getSelectionEnd(),e);o.setMirrorValue(e.substr(0,n)+o.selInfo[0].startMarker+e.substr(n,a-n)+o.selInfo[0].endMarker+e.substr(a))}o.toWYSIWYG()}},o.restoreSelection=function(){if(o.selInfo.length){if(o.jodit.getRealMode()===r.MODE_WYSIWYG)return o.__lock=!0,o.jodit.selection.restore(o.selInfo),void(o.__lock=!1);var e=o.getMirrorValue(),t=0,n=0;try{o.selInfo[0].startMarker&&(e=e.replace(/]+data-jodit_selection_marker="start"[^>]*>[<>]*?<\/span>/gim,o.tempMarkerStart)),o.selInfo[0].endMarker&&(e=e.replace(/]+data-jodit_selection_marker="end"[^>]*>[<>]*?<\/span>/gim,o.tempMarkerEnd)),o.jodit.ownerWindow.html_beautify&&o.jodit.options.beautifyHTML&&(e=o.jodit.ownerWindow.html_beautify(e)),t=e.indexOf(o.tempMarkerStart),n=t,e=e.replace(o.tempMarkerStartReg,""),o.selInfo[0].collapsed&&-1!==t||(n=e.indexOf(o.tempMarkerEnd),-1===t&&(t=n)),e=e.replace(o.tempMarkerEndReg,"")}finally{e=e.replace(o.tempMarkerEndReg,"").replace(o.tempMarkerStartReg,"")}o.setMirrorValue(e),o.setMirrorSelectionRange(t,n),o.toWYSIWYG(),o.setFocusToMirror()}},o.mirrorContainer=s.dom('
',o.jodit.ownerDocument),o.mirror=s.dom('