jodit
Version:
Jodit is an awesome and useful wysiwyg editor with filebrowser
8 lines • 814 kB
JavaScript
/*!
* jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
* Version: v4.12.2
* Url: https://xdsoft.net/jodit/
* License(s): MIT
*/
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var i in n)("object"==typeof exports?exports:e)[i]=n[i]}}(self,function(){var e={5266:function(e,t,n){"use strict";n.d(t,{Config:function(){return l}});var i=n(73104),o=n(53429),r=n(25045),a=n(81937),s={},l=function(){function e(){(0,i._)(this,e),(0,r._)(this,"cache",!0),(0,r._)(this,"defaultTimeout",100),(0,r._)(this,"namespace",""),(0,r._)(this,"safeMode",!1),(0,r._)(this,"width","auto"),(0,r._)(this,"height","auto"),(0,r._)(this,"safePluginsList",["about","enter","backspace","size","bold","hotkeys"]),(0,r._)(this,"commandToHotkeys",void 0),(0,r._)(this,"license",""),(0,r._)(this,"preset","custom"),(0,r._)(this,"presets",{inline:{inline:!0,toolbar:!1,toolbarInline:!0,toolbarInlineForSelection:!0,showXPathInStatusbar:!1,showCharsCounter:!1,showWordsCounter:!1,showPlaceholder:!1}}),(0,r._)(this,"ownerDocument",a.globalDocument),(0,r._)(this,"ownerWindow",a.globalWindow),(0,r._)(this,"shadowRoot",null),(0,r._)(this,"zIndex",0),(0,r._)(this,"readonly",!1),(0,r._)(this,"disabled",!1),(0,r._)(this,"activeButtonsInReadOnly",["source","fullsize","print","about","dots","selectall"]),(0,r._)(this,"allowCommandsInReadOnly",["selectall","preview","print"]),(0,r._)(this,"toolbarButtonSize","middle"),(0,r._)(this,"allowTabNavigation",!1),(0,r._)(this,"inline",!1),(0,r._)(this,"theme","default"),(0,r._)(this,"saveModeInStorage",!1),(0,r._)(this,"editorClassName",!1),(0,r._)(this,"className",!1),(0,r._)(this,"style",!1),(0,r._)(this,"containerStyle",!1),(0,r._)(this,"styleValues",{}),(0,r._)(this,"triggerChangeEvent",!0),(0,r._)(this,"direction",""),(0,r._)(this,"language","auto"),(0,r._)(this,"debugLanguage",!1),(0,r._)(this,"i18n",!1),(0,r._)(this,"tabIndex",-1),(0,r._)(this,"toolbar",!0),(0,r._)(this,"statusbar",!0),(0,r._)(this,"showTooltip",!0),(0,r._)(this,"showTooltipDelay",200),(0,r._)(this,"useNativeTooltip",!1),(0,r._)(this,"defaultActionOnPaste",a.INSERT_AS_HTML),(0,r._)(this,"enter",a.PARAGRAPH),(0,r._)(this,"iframe",!1),(0,r._)(this,"editHTMLDocumentMode",!1),(0,r._)(this,"enterBlock","br"!==this.enter?this.enter:a.PARAGRAPH),(0,r._)(this,"defaultMode",a.MODE_WYSIWYG),(0,r._)(this,"useSplitMode",!1),(0,r._)(this,"colors",{greyscale:["#000000","#434343","#666666","#999999","#B7B7B7","#CCCCCC","#D9D9D9","#EFEFEF","#F3F3F3","#FFFFFF"],palette:["#980000","#FF0000","#FF9900","#FFFF00","#00F0F0","#00FFFF","#4A86E8","#0000FF","#9900FF","#FF00FF"],full:["#E6B8AF","#F4CCCC","#FCE5CD","#FFF2CC","#D9EAD3","#D0E0E3","#C9DAF8","#CFE2F3","#D9D2E9","#EAD1DC","#DD7E6B","#EA9999","#F9CB9C","#FFE599","#B6D7A8","#A2C4C9","#A4C2F4","#9FC5E8","#B4A7D6","#D5A6BD","#CC4125","#E06666","#F6B26B","#FFD966","#93C47D","#76A5AF","#6D9EEB","#6FA8DC","#8E7CC3","#C27BA0","#A61C00","#CC0000","#E69138","#F1C232","#6AA84F","#45818E","#3C78D8","#3D85C6","#674EA7","#A64D79","#85200C","#990000","#B45F06","#BF9000","#38761D","#134F5C","#1155CC","#0B5394","#351C75","#733554","#5B0F00","#660000","#783F04","#7F6000","#274E13","#0C343D","#1C4587","#073763","#20124D","#4C1130"]}),(0,r._)(this,"colorPickerDefaultTab","background"),(0,r._)(this,"imageDefaultWidth",300),(0,r._)(this,"removeButtons",[]),(0,r._)(this,"disablePlugins",[]),(0,r._)(this,"extraPlugins",[]),(0,r._)(this,"basePath",void 0),(0,r._)(this,"extraButtons",[]),(0,r._)(this,"extraIcons",{}),(0,r._)(this,"createAttributes",{table:{style:"border-collapse:collapse;width: 100%;"}}),(0,r._)(this,"sizeLG",900),(0,r._)(this,"sizeMD",700),(0,r._)(this,"sizeSM",400),(0,r._)(this,"buttons",[{group:"font-style",buttons:[]},{group:"list",buttons:[]},{group:"font",buttons:[]},"---",{group:"script",buttons:[]},{group:"media",buttons:[]},"\n",{group:"state",buttons:[]},{group:"clipboard",buttons:[]},{group:"insert",buttons:[]},{group:"indent",buttons:[]},{group:"color",buttons:[]},{group:"form",buttons:[]},"---",{group:"history",buttons:[]},{group:"search",buttons:[]},{group:"source",buttons:[]},{group:"other",buttons:[]},{group:"info",buttons:[]}]),(0,r._)(this,"controls",void 0),(0,r._)(this,"events",{}),(0,r._)(this,"textIcons",!1),(0,r._)(this,"popupRoot",null),(0,r._)(this,"showBrowserColorPicker",!0),Object.assign(this,s)}return(0,o._)(e,null,[{key:"defaultOptions",get:function(){return e.__defaultOptions||(e.__defaultOptions=new e),e.__defaultOptions}}]),e}();(0,r._)(l,"__defaultOptions",void 0),s=l.prototype,l.prototype.controls={}},24735:function(e,t,n){"use strict";n.d(t,{Async:function(){return b}});var i=n(73104),o=n(53429),r=n(25045),a=n(41411),s=n(15366),l=n(42395),u=n(81937),c=n(61077),d=n(72068),f=n(91565),h=n(72412),p=n(62101),m=n(52100),v=n(85932),g=n(18303),_=n(28712),y=n(14228),b=function(){function e(){var t,n,o,a,s,l,u=this;(0,i._)(this,e),(0,r._)(this,"timers",new Map),(0,r._)(this,"__callbacks",new Map),(0,r._)(this,"__queueMicrotaskNative",null!=(t=null==(a=queueMicrotask)?void 0:a.bind(window))?t:Promise.resolve().then.bind(Promise.resolve())),(0,r._)(this,"promisesRejections",new Set),(0,r._)(this,"__requestsIdle",new Set),(0,r._)(this,"__controllers",new Set),(0,r._)(this,"__requestsRaf",new Set),(0,r._)(this,"__requestIdleCallbackNative",null!=(n=null==(s=window.requestIdleCallback)?void 0:s.bind(window))?n:function(e,t){var n,i=Date.now();return u.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-i))}})},null!=(n=null==t?void 0:t.timeout)?n:1)}),(0,r._)(this,"__cancelIdleCallbackNative",null!=(o=null==(l=window.cancelIdleCallback)?void 0:l.bind(window))?o:function(e){u.clearTimeout(e)}),(0,r._)(this,"isDestructed",!1)}return(0,o._)(e,[{key:"delay",value:function(e){var t=this;return this.promise(function(n){return t.setTimeout(n,e)})}},{key:"setTimeout",value:function(e,t){for(var n=arguments.length,i=Array(n>2?n-2:0),o=2;n>o;o++)i[o-2]=arguments[o];if(this.isDestructed)return 0;var r={};(0,g.isVoid)(t)&&(t=0),(0,h.isNumber)(t)||(t=(r=t).timeout||0),r.label&&this.clearLabel(r.label);var a=c.setTimeout.apply(void 0,[e,t].concat((0,l._)(i))),s=r.label||a;return this.timers.set(s,a),this.__callbacks.set(s,e),a}},{key:"updateTimeout",value:function(e,t){if((0,_.assert)(e&&this.timers.has(e),"Label does not exist"),!e||!this.timers.has(e))return null;var n=this.__callbacks.get(e);return(0,_.assert)((0,f.isFunction)(n),"Callback is not a function"),this.setTimeout(n,{label:e,timeout:t})}},{key:"clearLabel",value:function(e){e&&this.timers.has(e)&&((0,c.clearTimeout)(this.timers.get(e)),this.timers.delete(e),this.__callbacks.delete(e))}},{key:"clearTimeout",value:function(e){if((0,v.isString)(e))return this.clearLabel(e);(0,c.clearTimeout)(e),this.timers.delete(e),this.__callbacks.delete(e)}},{key:"debounce",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=this,o=0,r=!1,a=[],s=function(){for(var t=arguments.length,n=Array(t),i=0;t>i;i++)n[i]=arguments[i];if(!r){o=0;var s=e.apply(void 0,(0,l._)(n));if(r=!0,a.length){var u=function(){a.forEach(function(e){return e()}),a.length=0};(0,m.isPromise)(s)?s.finally(u):u()}}},u=function(){for(var a=arguments.length,u=Array(a),d=0;a>d;d++)u[d]=arguments[d];r=!1,t?(!o&&n&&s.apply(void 0,(0,l._)(u)),(0,c.clearTimeout)(o),o=i.setTimeout(function(){return s.apply(void 0,(0,l._)(u))},(0,f.isFunction)(t)?t():t),i.timers.set(e,o)):s.apply(void 0,(0,l._)(u))};return(0,p.isPlainObject)(t)&&t.promisify?function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];var o=i.promise(function(e){a.push(e)}).catch(function(e){if((0,d.isAbortError)(e))return null;throw e});return u.apply(void 0,(0,l._)(t)),o}:u}},{key:"microDebounce",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this,o=!1,r=!0;return function(){for(var a=arguments.length,s=Array(a),u=0;a>u;u++)s[u]=arguments[u];if(t=s,o){r=!0;return}r=!0,n&&(r=!1,e.apply(void 0,(0,l._)(t))),o=!0,i.__queueMicrotaskNative(function(){o=!1,!i.isDestructed&&r&&e.apply(void 0,(0,l._)(t))})}}},{key:"throttle",value:function(e,t){arguments.length>2&&void 0!==arguments[2]&&arguments[2];var n,i,o,r=this,a=null;return function(){for(var s=arguments.length,u=Array(s),c=0;s>c;c++)u[c]=arguments[c];(n=!0,o=u,t)?a||(i=function(){n?(e.apply(void 0,(0,l._)(o)),n=!1,a=r.setTimeout(i,(0,f.isFunction)(t)?t():t),r.timers.set(i,a)):a=null})():e.apply(void 0,(0,l._)(o))}}},{key:"promise",value:function(e){var t=this,n=function(){},i=new Promise(function(i,o){n=function(){return o((0,y.abort)("Abort async"))},t.promisesRejections.add(n),e(i,o)});return!i.finally&&"u">typeof process&&!u.IS_ES_NEXT&&(i.finally=function(e){return i.then(e).catch(e),i}),i.finally(function(){t.promisesRejections.delete(n)}).catch(function(){return null}),i.rejectCallback=n,i}},{key:"promiseState",value:function(e){var t=this;if(e.status)return e.status;if(!Promise.race)return new Promise(function(n){e.then(function(e){return n("fulfilled"),e},function(e){throw n("rejected"),e}),t.setTimeout(function(){n("pending")},100)});var n={};return Promise.race([e,n]).then(function(e){return e===n?"pending":"fulfilled"},function(){return"rejected"})}},{key:"requestIdleCallback",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{timeout:100},n=this.__requestIdleCallbackNative(e,t);return this.__requestsIdle.add(n),n}},{key:"requestIdlePromise",value:function(e){var t=this;return this.promise(function(n){var i=t.requestIdleCallback(function(){return n(i)},e)})}},{key:"schedulerPostTask",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{delay:0,priority:"user-visible"},i=new AbortController;if(n.signal&&n.signal.addEventListener("abort",function(){return i.abort()}),this.__controllers.add(i),void 0!==globalThis.scheduler){var o=globalThis.scheduler.postTask(e,(0,s._)((0,a._)({},n),{signal:i.signal}));return o.finally(function(){t.__controllers.delete(i)}).catch(function(){return null}),o}return this.promise(function(o,r){var a=t.setTimeout(function(){try{o(e())}catch(e){r(e)}t.__controllers.delete(i)},n.delay||1);i.signal.addEventListener("abort",function(){t.clearTimeout(a),t.__controllers.delete(i),r((0,y.abort)())})})}},{key:"schedulerYield",value:function(){return this.schedulerPostTask(function(){},{priority:"user-visible"})}},{key:"cancelIdleCallback",value:function(e){return this.__requestsIdle.delete(e),this.__cancelIdleCallbackNative(e)}},{key:"requestAnimationFrame",value:function(e){var t=requestAnimationFrame(e);return this.__requestsRaf.add(t),t}},{key:"cancelAnimationFrame",value:function(e){this.__requestsRaf.delete(e),cancelAnimationFrame(e)}},{key:"clear",value:function(){var e=this;this.__requestsIdle.forEach(function(t){return e.cancelIdleCallback(t)}),this.__requestsRaf.forEach(function(t){return e.cancelAnimationFrame(t)}),this.__controllers.forEach(function(e){return e.abort()}),this.timers.forEach(function(t){return(0,c.clearTimeout)(e.timers.get(t))}),this.timers.clear(),this.promisesRejections.forEach(function(e){return e()}),this.promisesRejections.clear()}},{key:"destruct",value:function(){this.clear(),this.isDestructed=!0}}]),e}()},91231:function(e,t,n){"use strict";n.d(t,{Async:function(){return i.Async}});var i=n(24735)},80251:function(e,t,n){"use strict";n.d(t,{Component:function(){return f}});var i=n(73104),o=n(53429),r=n(25045),a=n(75980),s=n(91231),l=n(69364),u=n(28077),c=n(65946),d=new Map,f=function(){function e(){(0,i._)(this,e),(0,r._)(this,"__componentName",void 0),(0,r._)(this,"async",new s.Async),(0,r._)(this,"uid",void 0),(0,r._)(this,"ownerWindow",window),(0,r._)(this,"__componentStatus",l.STATUSES.beforeInit),this.uid="jodit-uid-"+(0,u.uniqueUid)()}return(0,o._)(e,[{key:"componentName",get:function(){return this.__componentName||(this.__componentName="jodit-"+(0,c.kebabCase)(((0,c.isFunction)(this.className)?this.className():"")||(0,c.getClassName)(this))),this.__componentName}},{key:"getFullElName",value:function(e,t,n){var i=[this.componentName];return e&&(e=e.replace(/[^a-z0-9-]/gi,"-"),i.push("__".concat(e))),t&&(i.push("_",t),i.push("_",(0,c.isVoid)(n)?"true":n.toString())),i.join("")}},{key:"ownerDocument",get:function(){return this.ow.document}},{key:"od",get:function(){return this.ownerDocument}},{key:"ow",get:function(){return this.ownerWindow}},{key:"get",value:function(e,t){return(0,c.get)(e,t||this)}},{key:"isReady",get:function(){return this.componentStatus===l.STATUSES.ready}},{key:"isDestructed",get:function(){return this.componentStatus===l.STATUSES.destructed}},{key:"isInDestruct",get:function(){return l.STATUSES.beforeDestruct===this.componentStatus||l.STATUSES.destructed===this.componentStatus}},{key:"bindDestruct",value:function(e){var t=this;return e.hookStatus(l.STATUSES.beforeDestruct,function(){return!t.isInDestruct&&t.destruct()}),this}},{key:"destruct",value:function(){this.setStatus(l.STATUSES.destructed),this.async&&(this.async.destruct(),this.async=void 0),d.get(this)&&d.delete(this),this.ownerWindow=void 0}},{key:"componentStatus",get:function(){return this.__componentStatus},set:function(e){this.setStatus(e)}},{key:"setStatus",value:function(e){return this.setStatusComponent(e,this)}},{key:"setStatusComponent",value:function(e,t){if(e!==this.__componentStatus){t===this&&(this.__componentStatus=e);var n=Object.getPrototypeOf(this);n&&(0,c.isFunction)(n.setStatusComponent)&&n.setStatusComponent(e,t);var i=d.get(this),o=null==i?void 0:i[e];o&&o.length&&o.forEach(function(e){return e(t)})}}},{key:"hookStatus",value:function(e,t){var n=d.get(this);n||(n={},d.set(this,n)),n[e]||(n[e]=[]),n[e].push(t)}}],[{key:"isInstanceOf",value:function(e,t){return(0,a._)(e,t)}}]),e}();(0,r._)(f,"STATUSES",l.STATUSES)},16964:function(e,t,n){"use strict";n.d(t,{Component:function(){return i.Component},STATUSES:function(){return o.STATUSES},ViewComponent:function(){return r.ViewComponent}});var i=n(80251),o=n(69364),r=n(59609)},69364:function(e,t,n){"use strict";n.d(t,{STATUSES:function(){return i}});var i={beforeInit:"beforeInit",ready:"ready",beforeDestruct:"beforeDestruct",destructed:"destructed"}},59609:function(e,t,n){"use strict";n.d(t,{ViewComponent:function(){return d}});var i=n(69262),o=n(73104),r=n(53429),a=n(25045),s=n(22248),l=n(66773),u=n(34918),c=n(42395),d=function(e){function t(e){var n;return(0,o._)(this,t),n=(0,i._)(this,t),(0,a._)(n,"jodit",void 0),n.setParentView(e),n}return(0,u._)(t,e),(0,r._)(t,[{key:"j",get:function(){return this.jodit}},{key:"defaultTimeout",get:function(){return this.j.defaultTimeout}},{key:"i18n",value:function(e){for(var t,n=arguments.length,i=Array(n>1?n-1:0),o=1;n>o;o++)i[o-1]=arguments[o];return(t=this.j).i18n.apply(t,[e].concat((0,c._)(i)))}},{key:"setParentView",value:function(e){return this.jodit=e,e.components.add(this),this}},{key:"destruct",value:function(){return this.j.components.delete(this),(0,s._)((0,l._)(t.prototype),"destruct",this).call(this)}}]),t}(n(80251).Component)},81937:function(e,t,n){"use strict";n.r(t),n.d(t,{ACCURACY:function(){return U},APP_VERSION:function(){return o},BASE_PATH:function(){return ep},BASE_PATH_IS_MIN:function(){return em},BR:function(){return Y},CLIPBOARD_ID:function(){return e_},COMMAND_KEYS:function(){return W},EMULATE_DBLCLICK_TIMEOUT:function(){return en},ES:function(){return r},FAT_MODE:function(){return c},HOMEPAGE:function(){return d},INSEPARABLE_TAGS:function(){return x},INSERT_AS_HTML:function(){return ei},INSERT_AS_TEXT:function(){return er},INSERT_CLEAR_HTML:function(){return eo},INSERT_ONLY_TEXT:function(){return ea},INVISIBLE_SPACE:function(){return p},INVISIBLE_SPACE_REG_EXP:function(){return v},INVISIBLE_SPACE_REG_EXP_END:function(){return g},INVISIBLE_SPACE_REG_EXP_START:function(){return _},IS_BLOCK:function(){return C},IS_ES_MODERN:function(){return a},IS_ES_NEXT:function(){return s},IS_IE:function(){return $},IS_INLINE:function(){return E},IS_MAC:function(){return el},IS_PROD:function(){return l},IS_TEST:function(){return u},KEY_ALIASES:function(){return eu},KEY_ALT:function(){return M},KEY_BACKSPACE:function(){return z},KEY_DELETE:function(){return q},KEY_DOWN:function(){return O},KEY_ENTER:function(){return A},KEY_ESC:function(){return P},KEY_F3:function(){return H},KEY_LEFT:function(){return R},KEY_META:function(){return j},KEY_RIGHT:function(){return B},KEY_SPACE:function(){return F},KEY_TAB:function(){return L},KEY_UP:function(){return N},LIST_TAGS:function(){return I},MARKER_CLASS:function(){return et},MODE_SOURCE:function(){return J},MODE_SPLIT:function(){return X},MODE_WYSIWYG:function(){return G},NBSP_SPACE:function(){return m},NEARBY:function(){return V},NO_EMPTY_TAGS:function(){return D},PARAGRAPH:function(){return K},PASSIVE_EVENTS:function(){return eb},SAFE_COUNT_CHANGE_CALL:function(){return es},SET_TEST:function(){return f},SOURCE_CONSUMER:function(){return ey},SPACE_REG_EXP:function(){return y},SPACE_REG_EXP_END:function(){return k},SPACE_REG_EXP_START:function(){return b},TEMP_ATTR:function(){return ev},TEXT_HTML:function(){return Q},TEXT_PLAIN:function(){return Z},TEXT_RTF:function(){return ee},TOKENS:function(){return h},globalDocument:function(){return w},globalWindow:function(){return S},lang:function(){return eg}});var i=n(42395),o="4.12.2",r="es5",a=!1,s=!1,l=!0,u=!1,c=!0,d="https://xdsoft.net/jodit/",f=function(){return u=!0},h={},p="\uFEFF",m="\xa0",v=function(){return/[\uFEFF]/g},g=function(){return/[\uFEFF]+$/g},_=function(){return/^[\uFEFF]+/g},y=function(){return/[\s\n\t\r\uFEFF\u200b]+/g},b=function(){return/^[\s\n\t\r\uFEFF\u200b]+/g},k=function(){return/[\s\n\t\r\uFEFF\u200b]+$/g},S="u">typeof window?window:void 0,w="u">typeof document?document:void 0,C=/^(ADDRESS|ARTICLE|ASIDE|BLOCKQUOTE|CANVAS|DD|DFN|DIV|DL|DT|FIELDSET|FIGCAPTION|FIGURE|FOOTER|FORM|H[1-6]|HEADER|HGROUP|HR|LI|MAIN|NAV|NOSCRIPT|OUTPUT|P|PRE|RUBY|SCRIPT|STYLE|OBJECT|OL|SECTION|IFRAME|JODIT|JODIT-MEDIA|UL|TR|TD|TH|TBODY|THEAD|TFOOT|TABLE|BODY|HTML|VIDEO)$/i,E=/^(STRONG|SPAN|I|EM|B|SUP|SUB|A|U)$/i,I=new Set(["ul","ol"]),T=["img","video","svg","iframe","script","input","textarea","link","jodit","jodit-media"],x=new Set((0,i._)(T).concat(["br","hr"])),D=new Set(T),j="Meta",z="Backspace",L="Tab",A="Enter",P="Escape",M="Alt",R="ArrowLeft",N="ArrowUp",B="ArrowRight",O="ArrowDown",F="Space",q="Delete",H="F3",V=5,U=10,W=[j,z,q,N,O,B,R,A,P,H,L],Y="br",K="p",G=1,J=2,X=3,$="u">typeof navigator&&(-1!==navigator.userAgent.indexOf("MSIE")||/rv:11.0/i.test(navigator.userAgent)),Z=$?"text":"text/plain",Q=$?"html":"text/html",ee=$?"rtf":"text/rtf",et="jodit-selection_marker",en=300,ei="insert_as_html",eo="insert_clear_html",er="insert_as_text",ea="insert_only_text",es=10,el=void 0!==S&&/Mac|iPod|iPhone|iPad/.test(S.navigator.platform),eu={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:el?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:"space",spacebar:"space",up:"arrowup",win:"meta",windows:"meta"},ec=function(e){var t=e.split("/");return/\.js/.test(t[t.length-1])?{basePath:t.slice(0,t.length-1).join("/")+"/",isMin:!0}:{basePath:e,isMin:!0}},ed=function(){if("u"<typeof document)return{basePath:"",isMin:!0};var e=w.currentScript;if(e)return ec(e.src);var t=w.querySelectorAll("script[src]");return t&&t.length?ec(t[t.length-1].src):ec(S.location.href)}(),ef=ed.basePath,eh=ed.isMin,ep=ef,em=eh,ev="data-jodit-temp",eg={},e_="clipboard",ey="source-consumer",eb=new Set(["touchstart","touchend","scroll","mousewheel","mousemove","touchmove"])},76517:function(e,t,n){"use strict";n.d(t,{Create:function(){return c}});var i=n(73104),o=n(53429),r=n(25045),a=n(81937),s=n(23211),l=n(65946),u=n(28712),c=function(){function e(t,n){(0,i._)(this,e),(0,r._)(this,"document",void 0),(0,r._)(this,"createAttributes",void 0),this.document=t,this.createAttributes=n}return(0,o._)(e,[{key:"doc",get:function(){return(0,l.isFunction)(this.document)?this.document():this.document}},{key:"element",value:function(e,t,n){var i=this,o=this.doc.createElement(e.toLowerCase());return this.applyCreateAttributes(o),t&&((0,l.isPlainObject)(t)?(0,l.attr)(o,t):n=t),n&&(0,l.asArray)(n).forEach(function(e){return o.appendChild((0,l.isString)(e)?i.fromHTML(e):e)}),o}},{key:"div",value:function(e,t,n){var i=this.element("div",t,n);return e&&(i.className=e),i}},{key:"sandbox",value:function(){var e,t=this.element("iframe",{sandbox:"allow-same-origin"});this.doc.body.appendChild(t);var n=null==(e=t.contentWindow)?void 0:e.document;if((0,u.assert)(n,"iframe.contentWindow.document"),!n)throw Error("Iframe error");return n.open(),n.write("<!DOCTYPE html><html><head></head><body></body></html>"),n.close(),[n.body,t]}},{key:"span",value:function(e,t,n){var i=this.element("span",t,n);return e&&(i.className=e),i}},{key:"a",value:function(e,t,n){var i=this.element("a",t,n);return e&&(i.className=e),i}},{key:"text",value:function(e){return this.doc.createTextNode(e)}},{key:"fake",value:function(){return this.text(a.INVISIBLE_SPACE)}},{key:"fragment",value:function(){return this.doc.createDocumentFragment()}},{key:"fromHTML",value:function(e,t){var n=this.div();n.innerHTML=e.toString();var i=n.firstChild===n.lastChild&&n.firstChild?n.firstChild:n;if(s.Dom.safeRemove(i),t){var o=(0,l.refs)(i);Object.keys(t).forEach(function(e){var n=o[e];n&&!1===t[e]&&s.Dom.hide(n)})}return i}},{key:"applyCreateAttributes",value:function(e){if(this.createAttributes){var t=this.createAttributes;if(t&&t[e.tagName.toLowerCase()]){var n=t[e.tagName.toLowerCase()];(0,l.isFunction)(n)?n(e):(0,l.isPlainObject)(n)&&(0,l.attr)(e,n)}}}}]),e}()},79821:function(e,t,n){"use strict";n.d(t,{Create:function(){return i.Create}});var i=n(76517)},49574:function(e,t,n){"use strict";n.d(t,{autobind:function(){return o}});var i=n(91565);function o(e,t,n){if(!(0,i.isFunction)(n.value))throw TypeError('@autobind can only be applied to methods, but "'.concat(t,'" is not a function'));var o=n.value;return{configurable:!0,get:function(){var e=o.bind(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e}}}},51676:function(e,t,n){"use strict";n.d(t,{cache:function(){return l},cacheHTML:function(){return u},cached:function(){return s}});var i=n(69364),o=n(23211),r=n(28686),a=n(38027);function s(e,t){var n=Object.getOwnPropertyDescriptor(e,t);return!n||(0,r.isFunction)(n.get)?null:n.value}function l(e,t,n){var i=n.get;if(!i)throw(0,a.error)("Getter property descriptor expected");n.get=function(){var e=i.call(this);return e&&!0===e.noCache||Object.defineProperty(this,t,{configurable:n.configurable,enumerable:n.enumerable,writable:!1,value:e}),e}}function u(e,t,n){var s=n.value;if(!(0,r.isFunction)(s))throw(0,a.error)("Handler must be a Function");var l=!0,u=new WeakMap;n.value=function(){for(var e,t=arguments.length,n=Array(t),i=0;t>i;i++)n[i]=arguments[i];if(l&&u.has(this.constructor))return null==(e=u.get(this.constructor))?void 0:e.cloneNode(!0);var r=s.apply(this,n);return l&&o.Dom.isElement(r)&&u.set(this.constructor,r),l?r.cloneNode(!0):r},e.hookStatus(i.STATUSES.ready,function(e){l=!!((0,r.isViewObject)(e)?e:e.jodit).options.cache})}},91672:function(e,t,n){"use strict";n.d(t,{component:function(){return d},getComponentClass:function(){return f}});var i=n(69262),o=n(73104),r=n(34918),a=n(75980),s=n(42395),l=n(81937),u=n(421),c=new Map;function d(e){var t=function(e){function t(){for(var e,n=arguments.length,r=Array(n),l=0;n>l;l++)r[l]=arguments[l];return(0,o._)(this,t),(e=(0,i._)(this,t,(0,s._)(r))).constructor===t&&((0,a._)(e,t)||Object.setPrototypeOf(e,t.prototype),e.setStatus("ready")),e}return(0,r._)(t,e),t}(e),n=(0,u.getClassName)(e.prototype);if(c.has(n)&&!l.IS_PROD)throw Error('Component with name "'.concat(n,'" is already registered'));return c.set(n,t),t}function f(e){return c.get(e)}},55184:function(e,t,n){"use strict";n.d(t,{debounce:function(){return s},throttle:function(){return l}});var i=n(16964),o=n(28686),r=n(28712),a=n(33201);function s(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"debounce";return function(s,l){var u=s[l];if(!(0,o.isFunction)(u))throw(0,a.error)("Handler must be a Function");return s.hookStatus(i.STATUSES.ready,function(i){var a=i.async;(0,r.assert)(null!=a,"Component ".concat(i.componentName||i.constructor.name,' should have "async:IAsync" field'));var s=(0,o.isFunction)(e)?e(i):e,u=(0,o.isNumber)(s)||(0,o.isPlainObject)(s)?s:i.defaultTimeout;Object.defineProperty(i,l,{configurable:!0,value:a[n](i[l].bind(i),u,t)})}),{configurable:!0,get:function(){return u.bind(this)}}}}function l(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return s(e,t,"throttle")}},24968:function(e,t,n){"use strict";n.d(t,{derive:function(){return r}});var i=n(42395),o=n(91565);function r(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return function(e){for(var n=e.prototype,r=0;r<t.length;r++)for(var a=t[r],s=Object.getOwnPropertyNames(a.prototype),l=0;l<s.length;l++)!function(e){var t=s[e],r=Object.getOwnPropertyDescriptor(a.prototype,t);null!=r&&(0,o.isFunction)(r.value)&&!(0,o.isFunction)(n[t])&&Object.defineProperty(n,t,{enumerable:!0,configurable:!0,writable:!0,value:function(){for(var e,t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return(e=r.value).call.apply(e,[this].concat((0,i._)(n)))}})}(l)}}},29200:function(e,t,n){"use strict";n.d(t,{hook:function(){return r}});var i=n(91565),o=n(33201);function r(e){return function(t,n){if(!(0,i.isFunction)(t[n]))throw(0,o.error)("Handler must be a Function");t.hookStatus(e,function(e){e[n].call(e)})}}},35718:function(e,t,n){"use strict";n.d(t,{idle:function(){return s}});var i=n(42395),o=n(16964),r=n(91565),a=n(33201);function s(){return function(e,t){if(!(0,r.isFunction)(e[t]))throw(0,a.error)("Handler must be a Function");e.hookStatus(o.STATUSES.ready,function(e){var n,o=e.async,r=e[t];e[t]=function(){for(var t=arguments.length,a=Array(t),s=0;t>s;s++)a[s]=arguments[s];return o.requestIdleCallback((n=r).bind.apply(n,[e].concat((0,i._)(a))))}})}}},84839:function(e,t,n){"use strict";n.r(t),n.d(t,{autobind:function(){return i.autobind},cache:function(){return o.cache},cacheHTML:function(){return o.cacheHTML},cached:function(){return o.cached},component:function(){return r.component},debounce:function(){return a.debounce},derive:function(){return s.derive},getComponentClass:function(){return r.getComponentClass},hook:function(){return l.hook},idle:function(){return u.idle},nonenumerable:function(){return c.nonenumerable},persistent:function(){return d.persistent},throttle:function(){return a.throttle},wait:function(){return f.wait},watch:function(){return h.watch}});var i=n(49574),o=n(51676),r=n(91672),a=n(55184),s=n(24968),l=n(29200),u=n(35718),c=n(41360),d=n(77036),f=n(80840),h=n(68616)},41360:function(e,t,n){"use strict";n.d(t,{nonenumerable:function(){return i}});var i=function(e,t){!1!==(Object.getOwnPropertyDescriptor(e,t)||{}).enumerable&&Object.defineProperty(e,t,{enumerable:!1,set:function(e){Object.defineProperty(this,t,{enumerable:!1,writable:!0,value:e})}})}},77036:function(e,t,n){"use strict";n.d(t,{persistent:function(){return r}});var i=n(69364),o=n(31534);function r(e,t){e.hookStatus(i.STATUSES.ready,function(e){var n=(0,o.isViewObject)(e)?e:e.jodit,i="".concat(n.options.namespace).concat(e.componentName,"_prop_").concat(t),r=e[t];Object.defineProperty(e,t,{get:function(){var e;return null!=(e=n.storage.get(i))?e:r},set:function(e){n.storage.set(i,e)}})})}},80840:function(e,t,n){"use strict";n.d(t,{wait:function(){return s}});var i=n(42395),o=n(69364),r=n(91565),a=n(33201);function s(e){return function(t,n){var s=t[n];if(!(0,r.isFunction)(s))throw(0,a.error)("Handler must be a Function");t.hookStatus(o.STATUSES.ready,function(t){var o=t.async,r=t[n],a=0;Object.defineProperty(t,n,{configurable:!0,value:function n(){for(var s=arguments.length,l=Array(s),u=0;s>u;u++)l[u]=arguments[u];o.clearTimeout(a),e(t)?r.apply(t,l):a=o.setTimeout(function(){return n.apply(void 0,(0,i._)(l))},10)}})})}}},68616:function(e,t,n){"use strict";n.d(t,{watch:function(){return h}});var i=n(50684),o=n(42395),r=n(69364),a=n(70535),s=n(32328),l=n(91565),u=n(62101),c=n(31534),d=n(33201),f=n(71125);function h(e,t){return function(n,h){if(!(0,l.isFunction)(n[h]))throw(0,d.error)("Handler must be a Function");var p,m=null==(p=null==t?void 0:t.immediately)||p,v=null==t?void 0:t.context,g=function(t){var r=(0,c.isViewObject)(t)?t:t.jodit,d=function(e){for(var n=arguments.length,i=Array(n>1?n-1:0),r=1;n>r;r++)i[r-1]=arguments[r];if(!t.isInDestruct)return t[h].apply(t,[e].concat((0,o._)(i)))};m||(d=t.async.microDebounce(d,!0)),(0,s.splitArray)(e).forEach(function(e){if(/:/.test(e)){var o=(0,i._)(e.split(":"),2),s=o[0],c=o[1],h=v;s.length&&(h=t.get(s)),(0,l.isFunction)(h)&&(h=h(t)),r.events.on(h||t,c,d),h||r.events.on(c,d),t.hookStatus("beforeDestruct",function(){r.events.off(h||t,c,d).off(c,d)});return}var p=e.split("."),m=(0,i._)(p,1)[0],g=p.slice(1),_=t[m];(0,u.isPlainObject)(_)&&(0,a.observable)(_).on("change.".concat(g.join(".")),d);var y=(0,f.getPropertyDescriptor)(n,m);Object.defineProperty(t,m,{configurable:!0,set:function(e){var n=_;n!==e&&(_=e,y&&y.set&&y.set.call(t,e),(0,u.isPlainObject)(_)&&(_=(0,a.observable)(_)).on("change.".concat(g.join(".")),d),d(m,n,_))},get:function(){return y&&y.get?y.get.call(t):_}})})};(0,l.isFunction)(n.hookStatus)?n.hookStatus(r.STATUSES.ready,g):g(n)}}},23211:function(e,t,n){"use strict";n.d(t,{Dom:function(){return C}});var i=n(73104),o=n(53429),r=n(75980),a=n(77384),s=n(3233),l=n(31635),u=n(81937),c=n(88475),d=n(17312),f=n(91565),h=n(46248),p=n(3213),m=n(85932),v=n(18303),g=n(4040),_=n(28712),y=n(7909),b=n(80991),k=n(36400),S=n(33201),w=n(71125),C=function(){function e(){throw(0,i._)(this,e),Error("Dom is static module")}return(0,o._)(e,null,[{key:"detach",value:function(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}},{key:"wrapNextInline",value:function(t,n,i){var o,r=t;i.s.save();var a=!1;do a=!1,(o=r.nextSibling)&&!e.isBlock(o)&&!e.isTag(o,"br")&&(a=!0,r=o);while(a);return e.__wrapElements(n,i,t,r)}},{key:"__wrapElements",value:function(e,t,n,i){var o=(0,m.isString)(e)?t.createInside.element(e):e;n.parentNode&&n.parentNode.insertBefore(o,n);for(var r=n;r&&(r=n.nextSibling,o.appendChild(n),n!==i&&r);)n=r;return t.s.restore(),o}},{key:"wrapInline",value:function(t,n,i){var o,r=t,a=t;i.s.save();var s=!1;do s=!1,(o=r.previousSibling)&&!e.isBlock(o)&&(s=!0,r=o);while(s);do s=!1,(o=a.nextSibling)&&!e.isBlock(o)&&(s=!0,a=o);while(s);return e.__wrapElements(n,i,r,a)}},{key:"wrap",value:function(t,n,i){var o=(0,m.isString)(n)?i.element(n):n;if(e.isNode(t)){if(!t.parentNode)throw(0,S.error)("Element should be in DOM");t.parentNode.insertBefore(o,t),o.appendChild(t)}else{var r=t.extractContents();t.insertNode(o),o.appendChild(r)}return o}},{key:"unwrap",value:function(t){var n=t.parentNode;if(n){for(;t.firstChild;)n.insertBefore(t.firstChild,t);e.safeRemove(t)}}},{key:"between",value:function(e,t,n){for(var i=e;i&&i!==t&&!(e!==i&&n(i));){var o=i.firstChild||i.nextSibling;if(!o){for(;i&&!i.nextSibling;)i=i.parentNode;o=null==i?void 0:i.nextSibling}i=o}}},{key:"replace",value:function(t,n,i){var o,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if((0,h.isHTML)(n)&&((0,_.assert)(i,"Need create instance for new tag"),n=i.fromHTML(n)),(0,m.isString)(n)?((0,_.assert)(i,"Need create instance for new tag"),o=i.element(n)):o=n,!a)for(;t.firstChild;)o.appendChild(t.firstChild);return r&&e.isElement(t)&&e.isElement(o)&&(0,c.toArray)(t.attributes).forEach(function(e){o.setAttribute(e.name,e.value)}),t.parentNode&&t.parentNode.replaceChild(o,t),o}},{key:"isEmptyTextNode",value:function(t){return e.isText(t)&&(!t.nodeValue||0===t.nodeValue.replace(u.INVISIBLE_SPACE_REG_EXP(),"").trim().length)}},{key:"isEmptyContent",value:function(t){return e.each(t,function(t){return e.isEmptyTextNode(t)})}},{key:"isContentEditable",value:function(t,n){return e.isNode(t)&&!e.closest(t,function(t){return e.isElement(t)&&"false"===t.getAttribute("contenteditable")},n)}},{key:"isEmpty",value:function(t){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.NO_EMPTY_TAGS;if(!t)return!0;n=(0,f.isFunction)(i)?i:function(e){return i.has(e.nodeName.toLowerCase())};var o=function(e){return null==e.nodeValue||0===(0,g.trim)(e.nodeValue).length};return e.isText(t)?o(t):!(e.isElement(t)&&n(t))&&e.each(t,function(t){if(e.isText(t)&&!o(t)||e.isElement(t)&&n(t))return!1})}},{key:"isNode",value:function(e){return!!(e&&(0,m.isString)(e.nodeName)&&"number"==typeof e.nodeType&&e.childNodes&&(0,f.isFunction)(e.appendChild))}},{key:"isCell",value:function(t){return e.isNode(t)&&("TD"===t.nodeName||"TH"===t.nodeName)}},{key:"isList",value:function(t){return e.isTag(t,u.LIST_TAGS)}},{key:"isLeaf",value:function(t){return e.isTag(t,"li")}},{key:"isImage",value:function(t){return e.isNode(t)&&/^(img|svg|picture|canvas)$/i.test(t.nodeName)}},{key:"isBlock",value:function(t){return!(0,v.isVoid)(t)&&(void 0===t?"undefined":(0,a._)(t))==="object"&&e.isNode(t)&&u.IS_BLOCK.test(t.nodeName)}},{key:"isText",value:function(e){return!!(e&&e.nodeType===Node.TEXT_NODE)}},{key:"isComment",value:function(e){return!!(e&&e.nodeType===Node.COMMENT_NODE)}},{key:"isElement",value:function(t){var n;return!!e.isNode(t)&&!!((null==(n=t.ownerDocument)?void 0:n.defaultView)&&t.nodeType===Node.ELEMENT_NODE)}},{key:"isFragment",value:function(t){var n;return!!e.isNode(t)&&!!((null==(n=t.ownerDocument)?void 0:n.defaultView)&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE)}},{key:"isHTMLElement",value:function(t){if(!e.isNode(t))return!1;var n,i=null==(n=t.ownerDocument)?void 0:n.defaultView;return!!(i&&(0,r._)(t,i.HTMLElement))}},{key:"isInlineBlock",value:function(t){return e.isElement(t)&&!/^(BR|HR)$/i.test(t.tagName)&&-1!==["inline","inline-block"].indexOf((0,b.css)(t,"display").toString())}},{key:"canSplitBlock",value:function(t){return!(0,v.isVoid)(t)&&e.isHTMLElement(t)&&e.isBlock(t)&&!/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName)&&void 0!==t.style&&!/^(fixed|absolute)/i.test(t.style.position)}},{key:"first",value:function(e,t){var n=null==e?void 0:e.firstChild;if(!n)return null;do{if(t(n))return n;var i=n.firstChild;if(i||(i=n.nextSibling),!i&&n.parentNode!==e){do n=n.parentNode;while(n&&!(null==n?void 0:n.nextSibling)&&n.parentNode!==e);i=null==n?void 0:n.nextSibling}n=i}while(n);return null}},{key:"last",value:function(e,t){var n=null==e?void 0:e.lastChild;if(!n)return null;do{if(t(n))return n;var i=n.lastChild;if(i||(i=n.previousSibling),!i&&n.parentNode!==e){do n=n.parentNode;while(n&&!(null==n?void 0:n.previousSibling)&&n.parentNode!==e);i=null==n?void 0:n.previousSibling}n=i}while(n);return null}},{key:"prev",value:function(t,n,i){var o=!(arguments.length>3)||void 0===arguments[3]||arguments[3];return e.find(t,n,i,!1,o)}},{key:"next",value:function(t,n,i){var o=!(arguments.length>3)||void 0===arguments[3]||arguments[3];return e.find(t,n,i,!0,o)}},{key:"prevWithClass",value:function(t,n){return e.prev(t,function(t){return e.isElement(t)&&t.classList.contains(n)},t.parentNode)}},{key:"nextWithClass",value:function(t,n){return e.next(t,function(t){return e.isElement(t)&&t.classList.contains(n)},t.parentNode)}},{key:"find",value:function(e,t,n){for(var i=!(arguments.length>3)||void 0===arguments[3]||arguments[3],o=!(arguments.length>4)||void 0===arguments[4]||arguments[4],r=this.nextGen(e,n,i,o),a=r.next();!a.done;){if(t(a.value))return a.value;a=r.next()}return null}},{key:"nextGen",value:function(e,t){var n,i,o,r,a,u=arguments;return(0,s._)(this,function(s){switch(s.label){case 0:n=!(u.length>2)||void 0===u[2]||u[2],i=!(u.length>3)||void 0===u[3]||u[3],o=[],r=e,s.label=1;case 1:for(a=n?r.nextSibling:r.previousSibling;a;)o.unshift(a),a=n?a.nextSibling:a.previousSibling;return[5,(0,l.__values)(this.runInStack(e,o,n,i))];case 2:s.sent(),r=r.parentNode,s.label=3;case 3:if(r&&r!==t)return[3,1];s.label=4;case 4:return[2,null]}})}},{key:"each",value:function(e,t){for(var n=!(arguments.length>2)||void 0===arguments[2]||arguments[2],i=this.eachGen(e,n),o=i.next();!o.done;){if(!1===t(o.value))return!1;o=i.next()}return!0}},{key:"eachGen",value:function(e){var t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return this.runInStack(e,[e],t)}},{key:"runInStack",value:function(e,t,n){var i,o,r,a=arguments;return(0,s._)(this,function(s){switch(s.label){case 0:i=!(a.length>3)||void 0===a[3]||a[3],s.label=1;case 1:if(!t.length)return[3,4];if(o=t.pop(),i)for(r=n?o.lastChild:o.firstChild;r;)t.push(r),r=n?r.previousSibling:r.nextSibling;if(e===o)return[3,3];return[4,o];case 2:s.sent(),s.label=3;case 3:return[3,1];case 4:return[2]}})}},{key:"findWithCurrent",value:function(t,n,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"nextSibling",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"firstChild",a=t;do{if(n(a))return a||null;if(r&&a&&a[r]){var s=e.findWithCurrent(a[r],n,a,o,r);if(s)return s}for(;a&&!a[o]&&a!==i;)a=a.parentNode;a&&a[o]&&a!==i&&(a=a[o])}while(a&&a!==i);return null}},{key:"findSibling",value:function(t){for(var n=!(arguments.length>1)||void 0===arguments[1]||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(t){return!e.isEmptyTextNode(t)},o=e.sibling(t,n);o&&!i(o);)o=e.sibling(o,n);return o&&i(o)?o:null}},{key:"findNotEmptySibling",value:function(t,n){return e.findSibling(t,n,function(t){var n;return!e.isEmptyTextNode(t)&&!!(!e.isText(t)||(null==(n=t.nodeValue)?void 0:n.length)&&(0,g.trim)(t.nodeValue))})}},{key:"findNotEmptyNeighbor",value:function(t,n,i){return(0,w.call)(n?e.prev:e.next,t,function(t){return!!(t&&(!(e.isText(t)||e.isComment(t))||(0,g.trim)((null==t?void 0:t.nodeValue)||"").length))},i)}},{key:"sibling",value:function(e,t){return t?e.previousSibling:e.nextSibling}},{key:"up",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=e;if(!o)return null;do{if(t(o))return o;if(o===n||!o.parentNode)break;o=o.parentNode}while(o&&o!==n);return o===n&&i&&t(o)?o:null}},{key:"closest",value:function(t,n,i){var o,r=function(e){return e.toLowerCase()};if((0,f.isFunction)(n))o=n;else if((0,d.isArray)(n)||(0,p.isSet)(n)){var a=(0,p.isSet)(n)?n:new Set(n.map(r));o=function(e){return!!(e&&a.has(r(e.nodeName)))}}else o=function(e){return!!(e&&r(n)===r(e.nodeName))};return e.up(t,o,i)}},{key:"furthest",value:function(e,t,n){for(var i=null,o=null==e?void 0:e.parentElement;o&&o!==n;)t(o)&&(i=o),o=null==o?void 0:o.parentElement;return i}},{key:"appendChildFirst",value:function(e,t){var n=e.firstChild;n?n!==t&&e.insertBefore(t,n):e.appendChild(t)}},{key:"after",value:function(e,t){var n=e.parentNode;n&&(n.lastChild===e?n.appendChild(t):n.insertBefore(t,e.nextSibling))}},{key:"before",value:function(e,t){var n=e.parentNode;n&&n.insertBefore(t,e)}},{key:"prepend",value:function(e,t){e.insertBefore(t,e.firstChild)}},{key:"append",value:function(e,t){var n=this;(0,d.isArray)(t)?t.forEach(function(t){n.append(e,t)}):e.appendChild(t)}},{key:"moveContent",value:function(t,n){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){return!0},r=(t.ownerDocument||u.globalDocument).createDocumentFragment();(0,c.toArray)(t.childNodes).filter(function(t){return!!o(t)||(e.safeRemove(t),!1)}).forEach(function(e){r.appendChild(e)}),i&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r)}},{key:"isOrContains",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e===t?!n:!!(t&&e&&this.up(t,function(t){return t===e},e,!0))}},{key:"safeRemove",value:function(){for(var t=arguments.length,n=Array(t),i=0;t>i;i++)n[i]=arguments[i];n.forEach(function(t){return e.isNode(t)&&t.parentNode&&t.parentNode.removeChild(t)})}},{key:"safeInsertNode",value:function(t,n){t.collapsed||t.deleteContents();var i=e.isFragment(n)?n.lastChild:n;t.startContainer===t.endContainer&&t.collapsed&&e.isTag(t.startContainer,u.INSEPARABLE_TAGS)?e.after(t.startContainer,n):(t.insertNode(n),i&&t.setStartBefore(i)),t.collapse(!0),[n.nextSibling,n.previousSibling].forEach(function(t){return e.isText(t)&&!t.nodeValue&&e.safeRemove(t)})}},{key:"hide",value:function(e){e&&((0,k.dataBind)(e,"__old_display",e.style.display),e.style.display="none")}},{key:"show",value:function(e){if(e){var t=(0,k.dataBind)(e,"__old_display");"none"===e.style.display&&(e.style.display=t||"")}}},{key:"isTag",value:function(e,t){if(!this.isElement(e))return!1;var n=e.tagName.toLowerCase(),i=e.tagName.toUpperCase();if((0,r._)(t,Set))return t.has(n)||t.has(i);if(Array.isArray(t))throw TypeError("Dom.isTag does not support array");return n===t||i===t}},{key:"markTemporary",value:function(e,t){return t&&(0,y.attr)(e,t),(0,y.attr)(e,u.TEMP_ATTR,!0),e}},{key:"isTemporary",value:function(t){return!!e.isElement(t)&&(e.isMarker(t)||"true"===(0,y.attr)(t,u.TEMP_ATTR))}},{key:"isMarker",value:function(t){return e.isNode(t)&&e.isTag(t,"span")&&t.hasAttribute("data-"+u.MARKER_CLASS)}},{key:"replaceTemporaryFromString",value:function(e){return e.replace(/<([a-z]+)[^>]+data-jodit-temp[^>]+>(.+?)<\/\1>/gi,"$2")}},{key:"temporaryList",value:function(e){return(0,c.toArray)(e.querySelectorAll("[".concat(u.TEMP_ATTR,"]")))}}]),e}()},27795:function(e,t,n){"use strict";n.d(t,{Dom:function(){return i.Dom},LazyWalker:function(){return o.LazyWalker}});var i=n(23211),o=n(1080)},1080:function(e,t,n){"use strict";n.d(t,{LazyWalker:function(){return h}});var i=n(69262),o=n(73104),r=n(53429),a=n(25045),s=n(22248),l=n(66773),u=n(34918),c=n(31635),d=n(49574),f=n(23211),h=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,o._)(this,t),n=(0,i._)(this,t),(0,a._)(n,"async",void 0),(0,a._)(n,"options",void 0),(0,a._)(n,"workNodes",void 0),(0,a._)(n,"hadAffect",void 0),(0,a._)(n,"isWorked",void 0),(0,a._)(n,"isFinished",void 0),(0,a._)(n,"idleId",void 0),(0,a._)(n,"__schedulerController",void 0),n.async=e,n.options=r,n.workNodes=null,n.hadAffect=!1,n.isWorked=!1,n.isFinished=!1,n.idleId=0,n.__schedulerController=null,n}return(0,u._)(t,e),(0,r._)(t,[{key:"setWork",value:function(e){return this.isWorked&&this.break(),this.workNodes=f.Dom.eachGen(e,!this.options.reverse),this.isFinished=!1,this._requestStarting(),this}},{key:"_requestStarting",value:function(){this.__schedulerController=new AbortController,this.async.schedulerPostTask(this.__workPerform,{delay:this.options.timeout,signal:this.__schedulerController.signal}).catch(function(){return null})}},{key:"break",value:function(e){this.isWorked&&(this.stop(),this.emit("break",e))}},{key:"end",value:function(){this.isWorked&&(this.stop(),this.emit("end",this.hadAffect),this.hadAffect=!1)}},{key:"stop",value:function(){this.isWorked=!1,this.isFinished=!0,this.workNodes=null,this.async.cancelIdleCallback(this.idleId)}},{key:"destruct",value:function(){(0,s._)((0,l._)(t.prototype),"destruct",this).call(this),this.stop()}},{key:"__workPerform",value:function(){if(this.workNodes){this.isWorked=!0;for(var e,t=0,n=null!=(e=this.options.timeoutChunkSize)?e:50;!this.isFinished&&t<=n;){var i=this.workNodes.next();if(t+=1,this.visitNode(i.value)&&(this.hadAffect=!0),i.done)return void this.end()}}else this.end();this.isFinished||this._requestStarting()}},{key:"visitNode",value:function(e){var t;return!!e&&(void 0===this.options.whatToShow||e.nodeType===this.options.whatToShow)&&null!=(t=this.emit("visit",e))&&t}}]),t}(n(60216).Eventify);(0,c.__decorate)([d.autobind],h.prototype,"__workPerform",null)},93747:function(e,t,n){"use strict";n.d(t,{EventEmitter:function(){return p}});var i=n(73104),o=n(53429),r=n(25045),a=n(42395),s=n(81937),l=n(32328),u=n(17312),c=n(91565),d=n(85932),f=n(33201),h=n(18869),p=function(){function e(t){var n=this;(0,i._)(this,e),(0,r._)(this,"__domEventsMap",new Map),(0,r._)(this,"__mutedEvents",new Set),(0,r._)(this,"__key","__JoditEventEmitterNamespaces"),(0,r._)(this,"__doc",s.globalDocument),(0,r._)(this,"__prepareEvent",function(e){!e.cancelBubble&&(e.composed&&(0,c.isFunction)(e.composedPath)&&e.composedPath()[0]&&Object.defineProperty(e,"target",{value:e.composedPath()[0],configurable:!0,enumerable:!0}),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&&n.__doc.defaultView.clipboardData&&Object.defineProperty(e,"clipboardData",{get:function(){return n.__doc.defaultView.clipboardData},configurable:!0,enumerable:!0}))}),(0,r._)(this,"currents",[]),(0,r._)(this,"__stopped",[]),(0,r._)(this,"__isDestructed",!1),t&&(this.__doc=t),this.__key+=new Date().getTime()}return(0,o._)(e,[{key:"mute",value:function(e){return this.__mutedEvents.add(null!=e?e:"*"),this}},{key:"isMuted",value:function(e){return!!(e&&this.__mutedEvents.has(e))||this.__mutedEvents.has("*")}},{key:"unmute",value:function(e){return this.__mutedEvents.delete(null!=e?e:"*"),this}},{key:"__eachEvent",value:function(e,t){var n=this;(0,l.splitArray)(e).map(function(e){return e.trim()}).forEach(function(e){var i=e.split("."),o=i[1]||h.defaultNameSpace;t.call(n,i[0],o)})}},{key:"__getStore",value:function(e){if(!e)throw(0,f.error)("Need subject");if(void 0===e[this.__key]){var t=new h.EventHandlersStore;Object.defineProperty(e,this.__key,{enumerable:!1,configurable:!0,writable:!0,value:t})}return e[this.__key]}},{key:"__removeStoreFromSubject",value:function(e){void 0!==e[this.__key]&&Object.defineProperty(e,this.__key,{enumerable:!1,configurable:!0,writable:!0,value:void 0})}},{key:"__triggerNativeEvent",value:function(e,t){var n=this.__doc.createEvent("HTMLEvents");(0,d.isString)(t)?n.initEvent(t,!0,!0):(n.initEvent(t.type,t.bubbles,t.cancelable),["screenX","screenY","clientX","clientY","target","srcElement","currentTarget","timeStamp","which","keyCode"].forEach(function(e){Object.defineProperty(n,e,{value:t[e],enumerable:!0})}),Object.defineProperty(n,"originalEvent",{value:t,enumerable:!0})),e.dispatchEvent(n)}},{key:"current",get:function(){return this.currents[this.currents.length-1]}},{key:"on",value:function(e,t,n,i){var o,r,l,h,p=this;if((0,d.isString)(e)||(0,d.isStringArray)(e)?(o=this,r=e,l=t,h=n):(o=e,r=t,l=n,h=i),!((0,d.isString)(r)||(0,d.isStringArray)(r))||0===r.length)throw(0,f.error)("Need events names");if(!(0,c.isFunction)(l))throw(0,f.error)("Need event handler");if((0,u.isArray)(o))return o.forEach(function(e){p.on(e,r,l,h)}),this;var v=o,g=this.__getStore(v),_=this,y=function(e){for(var t,n=arguments.length,i=Array(n>1?n-1:0),o=1;n>o;o++)i[o-1]=arguments[o];if(!_.isMuted(e))return l&&(t=l).call.apply(t,[this].concat((0,a._)(i)))};return m(v)&&(y=function(e){if(!_.isMuted(e.type)&&(_.__prepareEvent(e),l&&!1===l.call(this,e)))return e.preventDefault(),e.stopImmediatePropagation(),!1}),this.__eachEvent(r,function(e,t){if(0===e.length)throw(0,f.error)("Need event name");if(!1===g.indexOf(e,t,l)){var n={event:e,originalCallback:l,syntheticCallback:y};if(g.set(e,t,n,null==h?void 0:h.top),m(v)){var i,o,r=s.PASSIVE_EVENTS.has(e)?{passive:!0,capture:null!=(i=null==h?void 0:h.capture)&&i}:null!=(o=null==h?void 0:h.capture)&&o;y.options=r,v.addEventListener(e,y,r),p.__memoryDOMSubjectToHandler(v,y)}}}),this}},{key:"__memoryDOMSubjectToHandler",value:function(e,t){var n=this.__domEventsMap.get(e)||new Set;n.add(t),this.__domEventsMap.set(e,n)}},{key:"__unmemoryDOMSubjectToHandler",value:function(e,t){var n=this.__domEventsMap,i=n.get(e)||new Set;i.delete(t),i.size?n.set(e,i):n.delete(e)}},{key:"one",value:function(e,t,n,i){var o,r,s,l,u=this;(0,d.isString)(e)||(0,d.isStringArray)(e)?(o=this,r=e,s=t,l=n):(o=e,r=t,s=n,l=i);var c=function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return u.off(o,r,c),s.apply(void 0,(0,a._)(t))};return this.on(o,r,c,l),this}},{key:"off",value:function(e,t,n){var i,o,r,a=this;if((0,d.isString)(e)||(0,d.isStringArray)(e)?(i=this,o=e,r=t):(i=e,o=t,r=n),(0,u.isArray)(i))return i.forEach(function(e){a.off(e,o,r)}),this;var s=i,l=this.__getStore(s);if(!((0,d.isString)(o)||(0,d.isStringArray)(o))||0===o.length)return l.namespaces().forEach(function(e){a.off(s,"."+e)}),this.__removeStoreFromSubject(s),this;var f=function(e){if(m(s)){var t;s.removeEventListener(e.event,e.syntheticCallback,null!=(t=e.syntheticCallback.options)&&t),a.__unmemoryDOMSubjectToHandler(s,e.syntheticCallback)}},p=function(e,t){if(""===e)return void l.events(t).forEach(function(e){""!==e&&p(e,t)});var n=l.get(e,t);if(n&&n.length)if((0,c.isFunction)(r)){var i=l.indexOf(e,t,r);!1!==i&&(f(n[i]),n.splice(i,1),n.length||l.clearEvents(t,e))}else n.forEach(f),n.length=0,l.clearEvents(t,e)};return this.__eachEvent(o,function(e,t){t===h.defaultNameSpace?l.namespaces().forEach(function(t){p(e,t)}):p(e,t)}),l.isEmpty()&&this.__removeStoreFromSubject(s),this}},{key:"stopPropagation",value:function(e,t){var n=this,i=(0,d.isString)(e)?this:e,o=(0,d.isString)(e)?e:t;if("string"!=typeof o)throw(0,f.error)("Need event names");var r=this.__getStore(i);this.__eachEvent(o,function(e,t){var o=r.get(e,t);o&&n.__stopped.push(o),t===h.defaultNameSpace&&r.namespaces(!0).forEach(function(t){return n.stopPropagation(i,e+"."+t)})})}},{key:"__removeStop",value:function(e){if(e){var t=this.__stopped.indexOf(e);-1!==t&&this.__stopped.splice(0,t+1)}}},{key:"__isStopped",value:function(e){return void 0!==e&&-1!==this.__stopped.indexOf(e)}},{key:"fire",value:function(e,t){for(var n,i,o=this,r=arguments.le