jodit 4.11.2 → 4.11.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -0
- package/es2015/jodit.css +5 -2
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +6 -6
- package/es2015/jodit.js +35 -18
- package/es2015/jodit.min.css +1 -1
- package/es2015/jodit.min.js +4 -4
- package/es2015/plugins/debug/debug.css +1 -1
- package/es2015/plugins/debug/debug.js +1 -1
- package/es2015/plugins/debug/debug.min.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2018/jodit.fat.min.css +1 -1
- package/es2018/jodit.fat.min.js +6 -6
- package/es2018/jodit.min.css +1 -1
- package/es2018/jodit.min.js +4 -4
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021/jodit.css +5 -2
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +7 -7
- package/es2021/jodit.js +34 -17
- package/es2021/jodit.min.css +1 -1
- package/es2021/jodit.min.js +5 -5
- package/es2021/plugins/debug/debug.css +1 -1
- package/es2021/plugins/debug/debug.js +1 -1
- package/es2021/plugins/debug/debug.min.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021.en/jodit.css +5 -2
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +5 -5
- package/es2021.en/jodit.js +34 -17
- package/es2021.en/jodit.min.css +1 -1
- package/es2021.en/jodit.min.js +5 -5
- package/es2021.en/plugins/debug/debug.css +1 -1
- package/es2021.en/plugins/debug/debug.js +1 -1
- package/es2021.en/plugins/debug/debug.min.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es5/jodit.css +8 -5
- package/es5/jodit.fat.min.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +38 -18
- package/es5/jodit.min.css +3 -3
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/debug/debug.css +1 -1
- package/es5/plugins/debug/debug.js +1 -1
- package/es5/plugins/debug/debug.min.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/esm/core/constants.js +1 -1
- package/esm/core/ui/button/button/button.js +2 -1
- package/esm/core/ui/icon.js +5 -2
- package/esm/modules/toolbar/button/button.d.ts +1 -0
- package/esm/modules/toolbar/button/button.js +29 -19
- package/esm/types/toolbar.d.ts +2 -2
- package/esm/types/ui.d.ts +1 -0
- package/package.json +1 -1
- package/types/modules/toolbar/button/button.d.ts +1 -0
- package/types/types/toolbar.d.ts +2 -2
- package/types/types/ui.d.ts +1 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
|
|
3
3
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
|
|
4
|
-
* Version: v4.11.
|
|
4
|
+
* Version: v4.11.4
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
8
8
|
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("{}"));else if("function"==typeof define&&define.amd)define(["{}"],e);else{var i="object"==typeof exports?e(require("{}")):e(t["{}"]);for(var o in i)("object"==typeof exports?exports:t)[o]=i[o]}}(self,function(t){var e={5266:function(t,e,i){"use strict";i.d(e,{Config:function(){return r}});var o=i(25045),n=i(81937);let s={};class r{static get defaultOptions(){return r.__defaultOptions||(r.__defaultOptions=new r),r.__defaultOptions}constructor(){(0,o._)(this,"cache",!0),(0,o._)(this,"defaultTimeout",100),(0,o._)(this,"namespace",""),(0,o._)(this,"safeMode",!1),(0,o._)(this,"width","auto"),(0,o._)(this,"height","auto"),(0,o._)(this,"safePluginsList",["about","enter","backspace","size","bold","hotkeys"]),(0,o._)(this,"commandToHotkeys",void 0),(0,o._)(this,"license",""),(0,o._)(this,"preset","custom"),(0,o._)(this,"presets",{inline:{inline:!0,toolbar:!1,toolbarInline:!0,toolbarInlineForSelection:!0,showXPathInStatusbar:!1,showCharsCounter:!1,showWordsCounter:!1,showPlaceholder:!1}}),(0,o._)(this,"ownerDocument",n.globalDocument),(0,o._)(this,"ownerWindow",n.globalWindow),(0,o._)(this,"shadowRoot",null),(0,o._)(this,"zIndex",0),(0,o._)(this,"readonly",!1),(0,o._)(this,"disabled",!1),(0,o._)(this,"activeButtonsInReadOnly",["source","fullsize","print","about","dots","selectall"]),(0,o._)(this,"allowCommandsInReadOnly",["selectall","preview","print"]),(0,o._)(this,"toolbarButtonSize","middle"),(0,o._)(this,"allowTabNavigation",!1),(0,o._)(this,"inline",!1),(0,o._)(this,"theme","default"),(0,o._)(this,"saveModeInStorage",!1),(0,o._)(this,"editorClassName",!1),(0,o._)(this,"className",!1),(0,o._)(this,"style",!1),(0,o._)(this,"containerStyle",!1),(0,o._)(this,"styleValues",{}),(0,o._)(this,"triggerChangeEvent",!0),(0,o._)(this,"direction",""),(0,o._)(this,"language","auto"),(0,o._)(this,"debugLanguage",!1),(0,o._)(this,"i18n",!1),(0,o._)(this,"tabIndex",-1),(0,o._)(this,"toolbar",!0),(0,o._)(this,"statusbar",!0),(0,o._)(this,"showTooltip",!0),(0,o._)(this,"showTooltipDelay",200),(0,o._)(this,"useNativeTooltip",!1),(0,o._)(this,"defaultActionOnPaste",n.INSERT_AS_HTML),(0,o._)(this,"enter",n.PARAGRAPH),(0,o._)(this,"iframe",!1),(0,o._)(this,"editHTMLDocumentMode",!1),(0,o._)(this,"enterBlock","br"!==this.enter?this.enter:n.PARAGRAPH),(0,o._)(this,"defaultMode",n.MODE_WYSIWYG),(0,o._)(this,"useSplitMode",!1),(0,o._)(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,o._)(this,"colorPickerDefaultTab","background"),(0,o._)(this,"imageDefaultWidth",300),(0,o._)(this,"removeButtons",[]),(0,o._)(this,"disablePlugins",[]),(0,o._)(this,"extraPlugins",[]),(0,o._)(this,"basePath",void 0),(0,o._)(this,"extraButtons",[]),(0,o._)(this,"extraIcons",{}),(0,o._)(this,"createAttributes",{table:{style:"border-collapse:collapse;width: 100%;"}}),(0,o._)(this,"sizeLG",900),(0,o._)(this,"sizeMD",700),(0,o._)(this,"sizeSM",400),(0,o._)(this,"buttons",[{group:"font-style",buttons:[]},{group:"list",buttons:[]},{group:"font",buttons:[]},"---",{group:"script",buttons:[]},{group:"media",buttons:[]},`
|
|
9
|
-
`,{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,o._)(this,"controls",void 0),(0,o._)(this,"events",{}),(0,o._)(this,"textIcons",!1),(0,o._)(this,"popupRoot",null),(0,o._)(this,"showBrowserColorPicker",!0),Object.assign(this,s)}}(0,o._)(r,"__defaultOptions",void 0),s=r.prototype,r.prototype.controls={}},24735:function(t,e,i){"use strict";i.d(e,{Async:function(){return m}});var o=i(25045),n=i(81937),s=i(61077),r=i(72068),a=i(91565),l=i(72412),c=i(62101),u=i(52100),h=i(85932),d=i(18303),p=i(28712),f=i(14228);class m{delay(t){return this.promise(e=>this.setTimeout(e,t))}setTimeout(t,e,...i){if(this.isDestructed)return 0;let o={};(0,d.isVoid)(e)&&(e=0),(0,l.isNumber)(e)||(e=(o=e).timeout||0),o.label&&this.clearLabel(o.label);let n=(0,s.setTimeout)(t,e,...i),r=o.label||n;return this.timers.set(r,n),this.__callbacks.set(r,t),n}updateTimeout(t,e){if((0,p.assert)(t&&this.timers.has(t),"Label does not exist"),!t||!this.timers.has(t))return null;let i=this.__callbacks.get(t);return(0,p.assert)((0,a.isFunction)(i),"Callback is not a function"),this.setTimeout(i,{label:t,timeout:e})}clearLabel(t){t&&this.timers.has(t)&&((0,s.clearTimeout)(this.timers.get(t)),this.timers.delete(t),this.__callbacks.delete(t))}clearTimeout(t){if((0,h.isString)(t))return this.clearLabel(t);(0,s.clearTimeout)(t),this.timers.delete(t),this.__callbacks.delete(t)}debounce(t,e,i=!1){let o=0,n=!1,l=[],h=(...e)=>{if(!n){o=0;let i=t(...e);if(n=!0,l.length){let t=()=>{l.forEach(t=>t()),l.length=0};(0,u.isPromise)(i)?i.finally(t):t()}}},d=(...r)=>{n=!1,e?(!o&&i&&h(...r),(0,s.clearTimeout)(o),o=this.setTimeout(()=>h(...r),(0,a.isFunction)(e)?e():e),this.timers.set(t,o)):h(...r)};return(0,c.isPlainObject)(e)&&e.promisify?(...t)=>{let e=this.promise(t=>{l.push(t)}).catch(t=>{if((0,r.isAbortError)(t))return null;throw t});return d(...t),e}:d}microDebounce(t,e=!1){let i,o=!1,n=!0;return(...s)=>{if(i=s,o){n=!0;return}n=!0,e&&(n=!1,t(...i)),o=!0,this.__queueMicrotaskNative(()=>{o=!1,!this.isDestructed&&n&&t(...i)})}}throttle(t,e,i=!1){let o=null,n,s,r;return(...i)=>{(n=!0,r=i,e)?o||(s=()=>{n?(t(...r),n=!1,o=this.setTimeout(s,(0,a.isFunction)(e)?e():e),this.timers.set(s,o)):o=null})():t(...r)}}promise(t){let e=()=>{},i=new Promise((i,o)=>{e=()=>o((0,f.abort)("Abort async")),this.promisesRejections.add(e),t(i,o)});return!i.finally&&"u">typeof process&&!n.IS_ES_NEXT&&(i.finally=t=>(i.then(t).catch(t),i)),i.finally(()=>{this.promisesRejections.delete(e)}).catch(()=>null),i.rejectCallback=e,i}promiseState(t){if(t.status)return t.status;if(!Promise.race)return new Promise(e=>{t.then(t=>(e("fulfilled"),t),t=>{throw e("rejected"),t}),this.setTimeout(()=>{e("pending")},100)});let e={};return Promise.race([t,e]).then(t=>t===e?"pending":"fulfilled",()=>"rejected")}requestIdleCallback(t,e={timeout:100}){let i=this.__requestIdleCallbackNative(t,e);return this.__requestsIdle.add(i),i}requestIdlePromise(t){return this.promise(e=>{let i=this.requestIdleCallback(()=>e(i),t)})}schedulerPostTask(t,e={delay:0,priority:"user-visible"}){let i=new AbortController;if(e.signal&&e.signal.addEventListener("abort",()=>i.abort()),this.__controllers.add(i),void 0!==globalThis.scheduler){let o=globalThis.scheduler.postTask(t,{...e,signal:i.signal});return o.finally(()=>{this.__controllers.delete(i)}).catch(()=>null),o}return this.promise((o,n)=>{let s=this.setTimeout(()=>{try{o(t())}catch(t){n(t)}this.__controllers.delete(i)},e.delay||1);i.signal.addEventListener("abort",()=>{this.clearTimeout(s),this.__controllers.delete(i),n((0,f.abort)())})})}schedulerYield(){return this.schedulerPostTask(()=>{},{priority:"user-visible"})}cancelIdleCallback(t){return this.__requestsIdle.delete(t),this.__cancelIdleCallbackNative(t)}requestAnimationFrame(t){let e=requestAnimationFrame(t);return this.__requestsRaf.add(e),e}cancelAnimationFrame(t){this.__requestsRaf.delete(t),cancelAnimationFrame(t)}clear(){this.__requestsIdle.forEach(t=>this.cancelIdleCallback(t)),this.__requestsRaf.forEach(t=>this.cancelAnimationFrame(t)),this.__controllers.forEach(t=>t.abort()),this.timers.forEach(t=>(0,s.clearTimeout)(this.timers.get(t))),this.timers.clear(),this.promisesRejections.forEach(t=>t()),this.promisesRejections.clear()}destruct(){this.clear(),this.isDestructed=!0}constructor(){(0,o._)(this,"timers",new Map),(0,o._)(this,"__callbacks",new Map),(0,o._)(this,"__queueMicrotaskNative",queueMicrotask?.bind(window)??Promise.resolve().then.bind(Promise.resolve())),(0,o._)(this,"promisesRejections",new Set),(0,o._)(this,"__requestsIdle",new Set),(0,o._)(this,"__controllers",new Set),(0,o._)(this,"__requestsRaf",new Set),(0,o._)(this,"__requestIdleCallbackNative",window.requestIdleCallback?.bind(window)??((t,e)=>{let i=Date.now();return this.setTimeout(()=>{t({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-i))})},e?.timeout??1)})),(0,o._)(this,"__cancelIdleCallbackNative",window.cancelIdleCallback?.bind(window)??(t=>{this.clearTimeout(t)})),(0,o._)(this,"isDestructed",!1)}}},91231:function(t,e,i){"use strict";i.d(e,{Async:function(){return o.Async}});var o=i(24735)},80251:function(t,e,i){"use strict";i.d(e,{Component:function(){return c}});var o=i(25045),n=i(91231),s=i(69364),r=i(28077),a=i(65946);let l=new Map;class c{get componentName(){return this.__componentName||(this.__componentName="jodit-"+(0,a.kebabCase)(((0,a.isFunction)(this.className)?this.className():"")||(0,a.getClassName)(this))),this.__componentName}getFullElName(t,e,i){let o=[this.componentName];return t&&o.push("__"+(t=t.replace(/[^a-z0-9-]/gi,"-"))),e&&(o.push("_",e),o.push("_",(0,a.isVoid)(i)?"true":i.toString())),o.join("")}get ownerDocument(){return this.ow.document}get od(){return this.ownerDocument}get ow(){return this.ownerWindow}get(t,e){return(0,a.get)(t,e||this)}get isReady(){return this.componentStatus===s.STATUSES.ready}get isDestructed(){return this.componentStatus===s.STATUSES.destructed}get isInDestruct(){return s.STATUSES.beforeDestruct===this.componentStatus||s.STATUSES.destructed===this.componentStatus}bindDestruct(t){return t.hookStatus(s.STATUSES.beforeDestruct,()=>!this.isInDestruct&&this.destruct()),this}destruct(){this.setStatus(s.STATUSES.destructed),this.async&&(this.async.destruct(),this.async=void 0),l.get(this)&&l.delete(this),this.ownerWindow=void 0}get componentStatus(){return this.__componentStatus}set componentStatus(t){this.setStatus(t)}setStatus(t){return this.setStatusComponent(t,this)}setStatusComponent(t,e){if(t===this.__componentStatus)return;e===this&&(this.__componentStatus=t);let i=Object.getPrototypeOf(this);i&&(0,a.isFunction)(i.setStatusComponent)&&i.setStatusComponent(t,e);let o=l.get(this),n=o?.[t];n&&n.length&&n.forEach(t=>t(e))}hookStatus(t,e){let i=l.get(this);i||(i={},l.set(this,i)),i[t]||(i[t]=[]),i[t].push(e)}static isInstanceOf(t,e){return t instanceof e}constructor(){(0,o._)(this,"__componentName",void 0),(0,o._)(this,"async",new n.Async),(0,o._)(this,"uid",void 0),(0,o._)(this,"ownerWindow",window),(0,o._)(this,"__componentStatus",s.STATUSES.beforeInit),this.uid="jodit-uid-"+(0,r.uniqueUid)()}}(0,o._)(c,"STATUSES",s.STATUSES)},16964:function(t,e,i){"use strict";i.d(e,{Component:function(){return o.Component},STATUSES:function(){return n.STATUSES},ViewComponent:function(){return s.ViewComponent}});var o=i(80251),n=i(69364),s=i(59609)},69364:function(t,e,i){"use strict";i.d(e,{STATUSES:function(){return o}});let o={beforeInit:"beforeInit",ready:"ready",beforeDestruct:"beforeDestruct",destructed:"destructed"}},59609:function(t,e,i){"use strict";i.d(e,{ViewComponent:function(){return s}});var o=i(25045),n=i(80251);class s extends n.Component{get j(){return this.jodit}get defaultTimeout(){return this.j.defaultTimeout}i18n(t,...e){return this.j.i18n(t,...e)}setParentView(t){return this.jodit=t,t.components.add(this),this}destruct(){return this.j.components.delete(this),super.destruct()}constructor(t){super(),(0,o._)(this,"jodit",void 0),this.setParentView(t)}}},81937:function(t,e,i){"use strict";i.r(e),i.d(e,{ACCURACY:function(){return U},APP_VERSION:function(){return o},BASE_PATH:function(){return td},BASE_PATH_IS_MIN:function(){return tp},BR:function(){return V},CLIPBOARD_ID:function(){return tg},COMMAND_KEYS:function(){return W},EMULATE_DBLCLICK_TIMEOUT:function(){return te},ES:function(){return n},FAT_MODE:function(){return c},HOMEPAGE:function(){return u},INSEPARABLE_TAGS:function(){return x},INSERT_AS_HTML:function(){return ti},INSERT_AS_TEXT:function(){return tn},INSERT_CLEAR_HTML:function(){return to},INSERT_ONLY_TEXT:function(){return ts},INVISIBLE_SPACE:function(){return p},INVISIBLE_SPACE_REG_EXP:function(){return m},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 s},IS_ES_NEXT:function(){return r},IS_IE:function(){return X},IS_INLINE:function(){return E},IS_MAC:function(){return ta},IS_PROD:function(){return a},IS_TEST:function(){return l},KEY_ALIASES:function(){return tl},KEY_ALT:function(){return M},KEY_BACKSPACE:function(){return j},KEY_DELETE:function(){return q},KEY_DOWN:function(){return B},KEY_ENTER:function(){return P},KEY_ESC:function(){return A},KEY_F3:function(){return F},KEY_LEFT:function(){return N},KEY_META:function(){return k},KEY_RIGHT:function(){return R},KEY_SPACE:function(){return O},KEY_TAB:function(){return L},KEY_UP:function(){return z},LIST_TAGS:function(){return I},MARKER_CLASS:function(){return tt},MODE_SOURCE:function(){return G},MODE_SPLIT:function(){return K},MODE_WYSIWYG:function(){return Y},NBSP_SPACE:function(){return f},NEARBY:function(){return H},NO_EMPTY_TAGS:function(){return D},PARAGRAPH:function(){return $},PASSIVE_EVENTS:function(){return tv},SAFE_COUNT_CHANGE_CALL:function(){return tr},SET_TEST:function(){return h},SOURCE_CONSUMER:function(){return t_},SPACE_REG_EXP:function(){return v},SPACE_REG_EXP_END:function(){return y},SPACE_REG_EXP_START:function(){return b},TEMP_ATTR:function(){return tf},TEXT_HTML:function(){return Z},TEXT_PLAIN:function(){return J},TEXT_RTF:function(){return Q},TOKENS:function(){return d},globalDocument:function(){return S},globalWindow:function(){return w},lang:function(){return tm}});let o="4.11.2",n="es2021",s=!0,r=!0,a=!0,l=!1,c=!0,u="https://xdsoft.net/jodit/",h=()=>l=!0,d={},p="\uFEFF",f=" ",m=()=>/[\uFEFF]/g,g=()=>/[\uFEFF]+$/g,_=()=>/^[\uFEFF]+/g,v=()=>/[\s\n\t\r\uFEFF\u200b]+/g,b=()=>/^[\s\n\t\r\uFEFF\u200b]+/g,y=()=>/[\s\n\t\r\uFEFF\u200b]+$/g,w="u">typeof window?window:void 0,S="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([...T,"br","hr"]),D=new Set(T),k="Meta",j="Backspace",L="Tab",P="Enter",A="Escape",M="Alt",N="ArrowLeft",z="ArrowUp",R="ArrowRight",B="ArrowDown",O="Space",q="Delete",F="F3",H=5,U=10,W=[k,j,q,z,B,R,N,P,A,F,L],V="br",$="p",Y=1,G=2,K=3,X="u">typeof navigator&&(-1!==navigator.userAgent.indexOf("MSIE")||/rv:11.0/i.test(navigator.userAgent)),J=X?"text":"text/plain",Z=X?"html":"text/html",Q=X?"rtf":"text/rtf",tt="jodit-selection_marker",te=300,ti="insert_as_html",to="insert_clear_html",tn="insert_as_text",ts="insert_only_text",tr=10,ta=void 0!==w&&/Mac|iPod|iPhone|iPad/.test(w.navigator.platform),tl={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:ta?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:"space",spacebar:"space",up:"arrowup",win:"meta",windows:"meta"},tc=t=>{let e=t.split("/");return/\.js/.test(e[e.length-1])?{basePath:e.slice(0,e.length-1).join("/")+"/",isMin:!0}:{basePath:t,isMin:!0}},{basePath:tu,isMin:th}=(()=>{if("u"<typeof document)return{basePath:"",isMin:!0};let t=S.currentScript;if(t)return tc(t.src);let e=S.querySelectorAll("script[src]");return e&&e.length?tc(e[e.length-1].src):tc(w.location.href)})(),td=tu,tp=th,tf="data-jodit-temp",tm={},tg="clipboard",t_="source-consumer",tv=new Set(["touchstart","touchend","scroll","mousewheel","mousemove","touchmove"])},76517:function(t,e,i){"use strict";i.d(e,{Create:function(){return l}});var o=i(25045),n=i(81937),s=i(23211),r=i(65946),a=i(28712);class l{get doc(){return(0,r.isFunction)(this.document)?this.document():this.document}element(t,e,i){let o=this.doc.createElement(t.toLowerCase());return this.applyCreateAttributes(o),e&&((0,r.isPlainObject)(e)?(0,r.attr)(o,e):i=e),i&&(0,r.asArray)(i).forEach(t=>o.appendChild((0,r.isString)(t)?this.fromHTML(t):t)),o}div(t,e,i){let o=this.element("div",e,i);return t&&(o.className=t),o}sandbox(){let t=this.element("iframe",{sandbox:"allow-same-origin"});this.doc.body.appendChild(t);let e=t.contentWindow?.document;if((0,a.assert)(e,"iframe.contentWindow.document"),!e)throw Error("Iframe error");return e.open(),e.write("<!DOCTYPE html><html><head></head><body></body></html>"),e.close(),[e.body,t]}span(t,e,i){let o=this.element("span",e,i);return t&&(o.className=t),o}a(t,e,i){let o=this.element("a",e,i);return t&&(o.className=t),o}text(t){return this.doc.createTextNode(t)}fake(){return this.text(n.INVISIBLE_SPACE)}fragment(){return this.doc.createDocumentFragment()}fromHTML(t,e){let i=this.div();i.innerHTML=t.toString();let o=i.firstChild===i.lastChild&&i.firstChild?i.firstChild:i;if(s.Dom.safeRemove(o),e){let t=(0,r.refs)(o);Object.keys(e).forEach(i=>{let o=t[i];o&&!1===e[i]&&s.Dom.hide(o)})}return o}applyCreateAttributes(t){if(this.createAttributes){let e=this.createAttributes;if(e&&e[t.tagName.toLowerCase()]){let i=e[t.tagName.toLowerCase()];(0,r.isFunction)(i)?i(t):(0,r.isPlainObject)(i)&&(0,r.attr)(t,i)}}}constructor(t,e){(0,o._)(this,"document",void 0),(0,o._)(this,"createAttributes",void 0),this.document=t,this.createAttributes=e}}},79821:function(t,e,i){"use strict";i.d(e,{Create:function(){return o.Create}});var o=i(76517)},49574:function(t,e,i){"use strict";i.d(e,{autobind:function(){return n}});var o=i(91565);function n(t,e,i){if(!(0,o.isFunction)(i.value))throw TypeError(`@autobind can only be applied to methods, but "${e}" is not a function`);let n=i.value;return{configurable:!0,get(){let t=n.bind(this);return Object.defineProperty(this,e,{value:t,configurable:!0,writable:!0}),t}}}},51676:function(t,e,i){"use strict";i.d(e,{cache:function(){return l},cacheHTML:function(){return c},cached:function(){return a}});var o=i(69364),n=i(23211),s=i(28686),r=i(38027);function a(t,e){let i=Object.getOwnPropertyDescriptor(t,e);return!i||(0,s.isFunction)(i.get)?null:i.value}function l(t,e,i){let o=i.get;if(!o)throw(0,r.error)("Getter property descriptor expected");i.get=function(){let t=o.call(this);return t&&!0===t.noCache||Object.defineProperty(this,e,{configurable:i.configurable,enumerable:i.enumerable,writable:!1,value:t}),t}}function c(t,e,i){let a=i.value;if(!(0,s.isFunction)(a))throw(0,r.error)("Handler must be a Function");let l=!0,c=new WeakMap;i.value=function(...t){if(l&&c.has(this.constructor))return c.get(this.constructor)?.cloneNode(!0);let e=a.apply(this,t);return l&&n.Dom.isElement(e)&&c.set(this.constructor,e),l?e.cloneNode(!0):e},t.hookStatus(o.STATUSES.ready,t=>{l=!!((0,s.isViewObject)(t)?t:t.jodit).options.cache})}},91672:function(t,e,i){"use strict";i.d(e,{component:function(){return r},getComponentClass:function(){return a}});var o=i(81937),n=i(421);let s=new Map;function r(t){class e extends t{constructor(...t){super(...t),this.constructor===e&&(this instanceof e||Object.setPrototypeOf(this,e.prototype),this.setStatus("ready"))}}let i=(0,n.getClassName)(t.prototype);if(s.has(i)&&!o.IS_PROD)throw Error(`Component with name "${i}" is already registered`);return s.set(i,e),e}function a(t){return s.get(t)}},55184:function(t,e,i){"use strict";i.d(e,{debounce:function(){return a},throttle:function(){return l}});var o=i(16964),n=i(28686),s=i(28712),r=i(33201);function a(t,e=!1,i="debounce"){return(a,l)=>{let c=a[l];if(!(0,n.isFunction)(c))throw(0,r.error)("Handler must be a Function");return a.hookStatus(o.STATUSES.ready,o=>{let{async:r}=o;(0,s.assert)(null!=r,`Component ${o.componentName||o.constructor.name} should have "async:IAsync" field`);let a=(0,n.isFunction)(t)?t(o):t,c=(0,n.isNumber)(a)||(0,n.isPlainObject)(a)?a:o.defaultTimeout;Object.defineProperty(o,l,{configurable:!0,value:r[i](o[l].bind(o),c,e)})}),{configurable:!0,get(){return c.bind(this)}}}}function l(t,e=!1){return a(t,e,"throttle")}},24968:function(t,e,i){"use strict";i.d(e,{derive:function(){return n}});var o=i(91565);function n(...t){return e=>{let i=e.prototype;for(let e=0;e<t.length;e++){let n=t[e],s=Object.getOwnPropertyNames(n.prototype);for(let t=0;t<s.length;t++){let e=s[t],r=Object.getOwnPropertyDescriptor(n.prototype,e);null!=r&&(0,o.isFunction)(r.value)&&!(0,o.isFunction)(i[e])&&Object.defineProperty(i,e,{enumerable:!0,configurable:!0,writable:!0,value:function(...t){return r.value.call(this,...t)}})}}}}},29200:function(t,e,i){"use strict";i.d(e,{hook:function(){return s}});var o=i(91565),n=i(33201);function s(t){return(e,i)=>{if(!(0,o.isFunction)(e[i]))throw(0,n.error)("Handler must be a Function");e.hookStatus(t,t=>{t[i].call(t)})}}},35718:function(t,e,i){"use strict";i.d(e,{idle:function(){return r}});var o=i(16964),n=i(91565),s=i(33201);function r(){return(t,e)=>{if(!(0,n.isFunction)(t[e]))throw(0,s.error)("Handler must be a Function");t.hookStatus(o.STATUSES.ready,t=>{let{async:i}=t,o=t[e];t[e]=(...e)=>i.requestIdleCallback(o.bind(t,...e))})}}},84839:function(t,e,i){"use strict";i.r(e),i.d(e,{autobind:function(){return o.autobind},cache:function(){return n.cache},cacheHTML:function(){return n.cacheHTML},cached:function(){return n.cached},component:function(){return s.component},debounce:function(){return r.debounce},derive:function(){return a.derive},getComponentClass:function(){return s.getComponentClass},hook:function(){return l.hook},idle:function(){return c.idle},nonenumerable:function(){return u.nonenumerable},persistent:function(){return h.persistent},throttle:function(){return r.throttle},wait:function(){return d.wait},watch:function(){return p.watch}});var o=i(49574),n=i(51676),s=i(91672),r=i(55184),a=i(24968),l=i(29200),c=i(35718),u=i(41360),h=i(77036),d=i(80840),p=i(68616)},41360:function(t,e,i){"use strict";i.d(e,{nonenumerable:function(){return o}});let o=(t,e)=>{!1!==(Object.getOwnPropertyDescriptor(t,e)||{}).enumerable&&Object.defineProperty(t,e,{enumerable:!1,set(t){Object.defineProperty(this,e,{enumerable:!1,writable:!0,value:t})}})}},77036:function(t,e,i){"use strict";i.d(e,{persistent:function(){return s}});var o=i(69364),n=i(31534);function s(t,e){t.hookStatus(o.STATUSES.ready,t=>{let i=(0,n.isViewObject)(t)?t:t.jodit,o=`${i.options.namespace}${t.componentName}_prop_${e}`,s=t[e];Object.defineProperty(t,e,{get:()=>i.storage.get(o)??s,set(t){i.storage.set(o,t)}})})}},80840:function(t,e,i){"use strict";i.d(e,{wait:function(){return r}});var o=i(69364),n=i(91565),s=i(33201);function r(t){return(e,i)=>{let r=e[i];if(!(0,n.isFunction)(r))throw(0,s.error)("Handler must be a Function");e.hookStatus(o.STATUSES.ready,e=>{let{async:o}=e,n=e[i],s=0;Object.defineProperty(e,i,{configurable:!0,value:function i(...r){o.clearTimeout(s),t(e)?n.apply(e,r):s=o.setTimeout(()=>i(...r),10)}})})}}},68616:function(t,e,i){"use strict";i.d(e,{watch:function(){return h}});var o=i(69364),n=i(70535),s=i(32328),r=i(91565),a=i(62101),l=i(31534),c=i(33201),u=i(71125);function h(t,e){return(i,h)=>{if(!(0,r.isFunction)(i[h]))throw(0,c.error)("Handler must be a Function");let d=e?.immediately??!0,p=e?.context,f=e=>{let o=(0,l.isViewObject)(e)?e:e.jodit,c=(t,...i)=>{if(!e.isInDestruct)return e[h](t,...i)};d||(c=e.async.microDebounce(c,!0)),(0,s.splitArray)(t).forEach(t=>{if(/:/.test(t)){let[i,n]=t.split(":"),s=p;i.length&&(s=e.get(i)),(0,r.isFunction)(s)&&(s=s(e)),o.events.on(s||e,n,c),s||o.events.on(n,c),e.hookStatus("beforeDestruct",()=>{o.events.off(s||e,n,c).off(n,c)});return}let s=t.split("."),[l]=s,h=s.slice(1),d=e[l];(0,a.isPlainObject)(d)&&(0,n.observable)(d).on("change."+h.join("."),c);let f=(0,u.getPropertyDescriptor)(i,l);Object.defineProperty(e,l,{configurable:!0,set(t){let i=d;i!==t&&(d=t,f&&f.set&&f.set.call(e,t),(0,a.isPlainObject)(d)&&(d=(0,n.observable)(d)).on("change."+h.join("."),c),c(l,i,d))},get:()=>f&&f.get?f.get.call(e):d})})};(0,r.isFunction)(i.hookStatus)?i.hookStatus(o.STATUSES.ready,f):f(i)}}},23211:function(t,e,i){"use strict";i.d(e,{Dom:function(){return v}});var o=i(81937),n=i(88475),s=i(17312),r=i(91565),a=i(46248),l=i(3213),c=i(85932),u=i(18303),h=i(4040),d=i(28712),p=i(7909),f=i(80991),m=i(36400),g=i(33201),_=i(71125);class v{static detach(t){for(;t&&t.firstChild;)t.removeChild(t.firstChild)}static wrapNextInline(t,e,i){let o,n=t;i.s.save();let s=!1;do s=!1,(o=n.nextSibling)&&!v.isBlock(o)&&!v.isTag(o,"br")&&(s=!0,n=o);while(s)return v.__wrapElements(e,i,t,n)}static __wrapElements(t,e,i,o){let n=(0,c.isString)(t)?e.createInside.element(t):t;i.parentNode&&i.parentNode.insertBefore(n,i);let s=i;for(;s&&(s=i.nextSibling,n.appendChild(i),i!==o&&s);)i=s;return e.s.restore(),n}static wrapInline(t,e,i){let o,n=t,s=t;i.s.save();let r=!1;do r=!1,(o=n.previousSibling)&&!v.isBlock(o)&&(r=!0,n=o);while(r)do r=!1,(o=s.nextSibling)&&!v.isBlock(o)&&(r=!0,s=o);while(r)return v.__wrapElements(e,i,n,s)}static wrap(t,e,i){let o=(0,c.isString)(e)?i.element(e):e;if(v.isNode(t)){if(!t.parentNode)throw(0,g.error)("Element should be in DOM");t.parentNode.insertBefore(o,t),o.appendChild(t)}else{let e=t.extractContents();t.insertNode(o),o.appendChild(e)}return o}static unwrap(t){let e=t.parentNode;if(e){for(;t.firstChild;)e.insertBefore(t.firstChild,t);v.safeRemove(t)}}static between(t,e,i){let o=t;for(;o&&o!==e&&!(t!==o&&i(o));){let t=o.firstChild||o.nextSibling;if(!t){for(;o&&!o.nextSibling;)o=o.parentNode;t=o?.nextSibling}o=t}}static replace(t,e,i,o=!1,s=!1){let r;if((0,a.isHTML)(e)&&((0,d.assert)(i,"Need create instance for new tag"),e=i.fromHTML(e)),(0,c.isString)(e)?((0,d.assert)(i,"Need create instance for new tag"),r=i.element(e)):r=e,!s)for(;t.firstChild;)r.appendChild(t.firstChild);return o&&v.isElement(t)&&v.isElement(r)&&(0,n.toArray)(t.attributes).forEach(t=>{r.setAttribute(t.name,t.value)}),t.parentNode&&t.parentNode.replaceChild(r,t),r}static isEmptyTextNode(t){return v.isText(t)&&(!t.nodeValue||0===t.nodeValue.replace(o.INVISIBLE_SPACE_REG_EXP(),"").trim().length)}static isEmptyContent(t){return v.each(t,t=>v.isEmptyTextNode(t))}static isContentEditable(t,e){return v.isNode(t)&&!v.closest(t,t=>v.isElement(t)&&"false"===t.getAttribute("contenteditable"),e)}static isEmpty(t,e=o.NO_EMPTY_TAGS){let i;if(!t)return!0;i=(0,r.isFunction)(e)?e:t=>e.has(t.nodeName.toLowerCase());let n=t=>null==t.nodeValue||0===(0,h.trim)(t.nodeValue).length;return v.isText(t)?n(t):!(v.isElement(t)&&i(t))&&v.each(t,t=>{if(v.isText(t)&&!n(t)||v.isElement(t)&&i(t))return!1})}static isNode(t){return!!(t&&(0,c.isString)(t.nodeName)&&"number"==typeof t.nodeType&&t.childNodes&&(0,r.isFunction)(t.appendChild))}static isCell(t){return v.isNode(t)&&("TD"===t.nodeName||"TH"===t.nodeName)}static isList(t){return v.isTag(t,o.LIST_TAGS)}static isLeaf(t){return v.isTag(t,"li")}static isImage(t){return v.isNode(t)&&/^(img|svg|picture|canvas)$/i.test(t.nodeName)}static isBlock(t){return!(0,u.isVoid)(t)&&"object"==typeof t&&v.isNode(t)&&o.IS_BLOCK.test(t.nodeName)}static isText(t){return!!(t&&t.nodeType===Node.TEXT_NODE)}static isComment(t){return!!(t&&t.nodeType===Node.COMMENT_NODE)}static isElement(t){return!!v.isNode(t)&&!!(t.ownerDocument?.defaultView&&t.nodeType===Node.ELEMENT_NODE)}static isFragment(t){return!!v.isNode(t)&&!!(t.ownerDocument?.defaultView&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE)}static isHTMLElement(t){if(!v.isNode(t))return!1;let e=t.ownerDocument?.defaultView;return!!(e&&t instanceof e.HTMLElement)}static isInlineBlock(t){return v.isElement(t)&&!/^(BR|HR)$/i.test(t.tagName)&&-1!==["inline","inline-block"].indexOf((0,f.css)(t,"display").toString())}static canSplitBlock(t){return!(0,u.isVoid)(t)&&v.isHTMLElement(t)&&v.isBlock(t)&&!/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName)&&void 0!==t.style&&!/^(fixed|absolute)/i.test(t.style.position)}static last(t,e){let i=t?.lastChild;if(!i)return null;do{if(e(i))return i;let o=i.lastChild;if(o||(o=i.previousSibling),!o&&i.parentNode!==t){do i=i.parentNode;while(i&&!i?.previousSibling&&i.parentNode!==t)o=i?.previousSibling}i=o}while(i)return null}static prev(t,e,i,o=!0){return v.find(t,e,i,!1,o)}static next(t,e,i,o=!0){return v.find(t,e,i,!0,o)}static prevWithClass(t,e){return v.prev(t,t=>v.isElement(t)&&t.classList.contains(e),t.parentNode)}static nextWithClass(t,e){return v.next(t,t=>v.isElement(t)&&t.classList.contains(e),t.parentNode)}static find(t,e,i,o=!0,n=!0){let s=this.nextGen(t,i,o,n),r=s.next();for(;!r.done;){if(e(r.value))return r.value;r=s.next()}return null}static*nextGen(t,e,i=!0,o=!0){let n=[],s=t;do{let e=i?s.nextSibling:s.previousSibling;for(;e;)n.unshift(e),e=i?e.nextSibling:e.previousSibling;yield*this.runInStack(t,n,i,o),s=s.parentNode}while(s&&s!==e)return null}static each(t,e,i=!0){let o=this.eachGen(t,i),n=o.next();for(;!n.done;){if(!1===e(n.value))return!1;n=o.next()}return!0}static eachGen(t,e=!0){return this.runInStack(t,[t],e)}static*runInStack(t,e,i,o=!0){for(;e.length;){let n=e.pop();if(o){let t=i?n.lastChild:n.firstChild;for(;t;)e.push(t),t=i?t.previousSibling:t.nextSibling}t!==n&&(yield n)}}static findWithCurrent(t,e,i,o="nextSibling",n="firstChild"){let s=t;do{if(e(s))return s||null;if(n&&s&&s[n]){let t=v.findWithCurrent(s[n],e,s,o,n);if(t)return t}for(;s&&!s[o]&&s!==i;)s=s.parentNode;s&&s[o]&&s!==i&&(s=s[o])}while(s&&s!==i)return null}static findSibling(t,e=!0,i=t=>!v.isEmptyTextNode(t)){let o=v.sibling(t,e);for(;o&&!i(o);)o=v.sibling(o,e);return o&&i(o)?o:null}static findNotEmptySibling(t,e){return v.findSibling(t,e,t=>!v.isEmptyTextNode(t)&&!!(!v.isText(t)||t.nodeValue?.length&&(0,h.trim)(t.nodeValue)))}static findNotEmptyNeighbor(t,e,i){return(0,_.call)(e?v.prev:v.next,t,t=>!!(t&&(!(v.isText(t)||v.isComment(t))||(0,h.trim)(t?.nodeValue||"").length)),i)}static sibling(t,e){return e?t.previousSibling:t.nextSibling}static up(t,e,i,o=!1){let n=t;if(!n)return null;do{if(e(n))return n;if(n===i||!n.parentNode)break;n=n.parentNode}while(n&&n!==i)return n===i&&o&&e(n)?n:null}static closest(t,e,i){let o,n=t=>t.toLowerCase();if((0,r.isFunction)(e))o=e;else if((0,s.isArray)(e)||(0,l.isSet)(e)){let t=(0,l.isSet)(e)?e:new Set(e.map(n));o=e=>!!(e&&t.has(n(e.nodeName)))}else o=t=>!!(t&&n(e)===n(t.nodeName));return v.up(t,o,i)}static furthest(t,e,i){let o=null,n=t?.parentElement;for(;n&&n!==i;)e(n)&&(o=n),n=n?.parentElement;return o}static appendChildFirst(t,e){let i=t.firstChild;i?i!==e&&t.insertBefore(e,i):t.appendChild(e)}static after(t,e){let{parentNode:i}=t;i&&(i.lastChild===t?i.appendChild(e):i.insertBefore(e,t.nextSibling))}static before(t,e){let{parentNode:i}=t;i&&i.insertBefore(e,t)}static prepend(t,e){t.insertBefore(e,t.firstChild)}static append(t,e){(0,s.isArray)(e)?e.forEach(e=>{this.append(t,e)}):t.appendChild(e)}static moveContent(t,e,i=!1,s=()=>!0){let r=(t.ownerDocument||o.globalDocument).createDocumentFragment();(0,n.toArray)(t.childNodes).filter(t=>!!s(t)||(v.safeRemove(t),!1)).forEach(t=>{r.appendChild(t)}),i&&e.firstChild?e.insertBefore(r,e.firstChild):e.appendChild(r)}static isOrContains(t,e,i=!1){return t===e?!i:!!(e&&t&&this.up(e,e=>e===t,t,!0))}static safeRemove(...t){t.forEach(t=>v.isNode(t)&&t.parentNode&&t.parentNode.removeChild(t))}static safeInsertNode(t,e){t.collapsed||t.deleteContents();let i=v.isFragment(e)?e.lastChild:e;t.startContainer===t.endContainer&&t.collapsed&&v.isTag(t.startContainer,o.INSEPARABLE_TAGS)?v.after(t.startContainer,e):(t.insertNode(e),i&&t.setStartBefore(i)),t.collapse(!0),[e.nextSibling,e.previousSibling].forEach(t=>v.isText(t)&&!t.nodeValue&&v.safeRemove(t))}static hide(t){t&&((0,m.dataBind)(t,"__old_display",t.style.display),t.style.display="none")}static show(t){if(!t)return;let e=(0,m.dataBind)(t,"__old_display");"none"===t.style.display&&(t.style.display=e||"")}static isTag(t,e){if(!this.isElement(t))return!1;let i=t.tagName.toLowerCase(),o=t.tagName.toUpperCase();if(e instanceof Set)return e.has(i)||e.has(o);if(Array.isArray(e))throw TypeError("Dom.isTag does not support array");return i===e||o===e}static markTemporary(t,e){return e&&(0,p.attr)(t,e),(0,p.attr)(t,o.TEMP_ATTR,!0),t}static isTemporary(t){return!!v.isElement(t)&&(v.isMarker(t)||"true"===(0,p.attr)(t,o.TEMP_ATTR))}static isMarker(t){return v.isNode(t)&&v.isTag(t,"span")&&t.hasAttribute("data-"+o.MARKER_CLASS)}static replaceTemporaryFromString(t){return t.replace(/<([a-z]+)[^>]+data-jodit-temp[^>]+>(.+?)<\/\1>/gi,"$2")}static temporaryList(t){return(0,n.toArray)(t.querySelectorAll(`[${o.TEMP_ATTR}]`))}constructor(){throw Error("Dom is static module")}}},27795:function(t,e,i){"use strict";i.d(e,{Dom:function(){return o.Dom},LazyWalker:function(){return n.LazyWalker}});var o=i(23211),n=i(1080)},1080:function(t,e,i){"use strict";i.d(e,{LazyWalker:function(){return l}});var o=i(25045),n=i(31635),s=i(49574),r=i(23211),a=i(60216);class l extends a.Eventify{setWork(t){return this.isWorked&&this.break(),this.workNodes=r.Dom.eachGen(t,!this.options.reverse),this.isFinished=!1,this._requestStarting(),this}_requestStarting(){this.__schedulerController=new AbortController,this.async.schedulerPostTask(this.__workPerform,{delay:this.options.timeout,signal:this.__schedulerController.signal}).catch(()=>null)}break(t){this.isWorked&&(this.stop(),this.emit("break",t))}end(){this.isWorked&&(this.stop(),this.emit("end",this.hadAffect),this.hadAffect=!1)}stop(){this.isWorked=!1,this.isFinished=!0,this.workNodes=null,this.async.cancelIdleCallback(this.idleId)}destruct(){super.destruct(),this.stop()}__workPerform(){if(this.workNodes){this.isWorked=!0;let t=0,e=this.options.timeoutChunkSize??50;for(;!this.isFinished&&t<=e;){let e=this.workNodes.next();if(t+=1,this.visitNode(e.value)&&(this.hadAffect=!0),e.done)return void this.end()}}else this.end();this.isFinished||this._requestStarting()}visitNode(t){return!!t&&(void 0===this.options.whatToShow||t.nodeType===this.options.whatToShow)&&(this.emit("visit",t)??!1)}constructor(t,e={}){super(),(0,o._)(this,"async",void 0),(0,o._)(this,"options",void 0),(0,o._)(this,"workNodes",void 0),(0,o._)(this,"hadAffect",void 0),(0,o._)(this,"isWorked",void 0),(0,o._)(this,"isFinished",void 0),(0,o._)(this,"idleId",void 0),(0,o._)(this,"__schedulerController",void 0),this.async=t,this.options=e,this.workNodes=null,this.hadAffect=!1,this.isWorked=!1,this.isFinished=!1,this.idleId=0,this.__schedulerController=null}}(0,n.__decorate)([s.autobind],l.prototype,"__workPerform",null)},93747:function(t,e,i){"use strict";i.d(e,{EventEmitter:function(){return h}});var o=i(25045),n=i(81937),s=i(32328),r=i(17312),a=i(91565),l=i(85932),c=i(33201),u=i(18869);class h{mute(t){return this.__mutedEvents.add(t??"*"),this}isMuted(t){return!!(t&&this.__mutedEvents.has(t))||this.__mutedEvents.has("*")}unmute(t){return this.__mutedEvents.delete(t??"*"),this}__eachEvent(t,e){(0,s.splitArray)(t).map(t=>t.trim()).forEach(t=>{let i=t.split("."),o=i[1]||u.defaultNameSpace;e.call(this,i[0],o)})}__getStore(t){if(!t)throw(0,c.error)("Need subject");if(void 0===t[this.__key]){let e=new u.EventHandlersStore;Object.defineProperty(t,this.__key,{enumerable:!1,configurable:!0,writable:!0,value:e})}return t[this.__key]}__removeStoreFromSubject(t){void 0!==t[this.__key]&&Object.defineProperty(t,this.__key,{enumerable:!1,configurable:!0,writable:!0,value:void 0})}__triggerNativeEvent(t,e){let i=this.__doc.createEvent("HTMLEvents");(0,l.isString)(e)?i.initEvent(e,!0,!0):(i.initEvent(e.type,e.bubbles,e.cancelable),["screenX","screenY","clientX","clientY","target","srcElement","currentTarget","timeStamp","which","keyCode"].forEach(t=>{Object.defineProperty(i,t,{value:e[t],enumerable:!0})}),Object.defineProperty(i,"originalEvent",{value:e,enumerable:!0})),t.dispatchEvent(i)}get current(){return this.currents[this.currents.length-1]}on(t,e,i,o){let s,u,h,p;if((0,l.isString)(t)||(0,l.isStringArray)(t)?(s=this,u=t,h=e,p=i):(s=t,u=e,h=i,p=o),!((0,l.isString)(u)||(0,l.isStringArray)(u))||0===u.length)throw(0,c.error)("Need events names");if(!(0,a.isFunction)(h))throw(0,c.error)("Need event handler");if((0,r.isArray)(s))return s.forEach(t=>{this.on(t,u,h,p)}),this;let f=s,m=this.__getStore(f),g=this,_=function(t,...e){if(!g.isMuted(t))return h&&h.call(this,...e)};return d(f)&&(_=function(t){if(!g.isMuted(t.type)&&(g.__prepareEvent(t),h&&!1===h.call(this,t)))return t.preventDefault(),t.stopImmediatePropagation(),!1}),this.__eachEvent(u,(t,e)=>{if(0===t.length)throw(0,c.error)("Need event name");if(!1===m.indexOf(t,e,h)){let i={event:t,originalCallback:h,syntheticCallback:_};if(m.set(t,e,i,p?.top),d(f)){let e=n.PASSIVE_EVENTS.has(t)?{passive:!0,capture:p?.capture??!1}:p?.capture??!1;_.options=e,f.addEventListener(t,_,e),this.__memoryDOMSubjectToHandler(f,_)}}}),this}__memoryDOMSubjectToHandler(t,e){let i=this.__domEventsMap.get(t)||new Set;i.add(e),this.__domEventsMap.set(t,i)}__unmemoryDOMSubjectToHandler(t,e){let i=this.__domEventsMap,o=i.get(t)||new Set;o.delete(e),o.size?i.set(t,o):i.delete(t)}one(t,e,i,o){let n,s,r,a;(0,l.isString)(t)||(0,l.isStringArray)(t)?(n=this,s=t,r=e,a=i):(n=t,s=e,r=i,a=o);let c=(...t)=>(this.off(n,s,c),r(...t));return this.on(n,s,c,a),this}off(t,e,i){let o,n,s;if((0,l.isString)(t)||(0,l.isStringArray)(t)?(o=this,n=t,s=e):(o=t,n=e,s=i),(0,r.isArray)(o))return o.forEach(t=>{this.off(t,n,s)}),this;let c=o,h=this.__getStore(c);if(!((0,l.isString)(n)||(0,l.isStringArray)(n))||0===n.length)return h.namespaces().forEach(t=>{this.off(c,"."+t)}),this.__removeStoreFromSubject(c),this;let p=t=>{d(c)&&(c.removeEventListener(t.event,t.syntheticCallback,t.syntheticCallback.options??!1),this.__unmemoryDOMSubjectToHandler(c,t.syntheticCallback))},f=(t,e)=>{if(""===t)return void h.events(e).forEach(t=>{""!==t&&f(t,e)});let i=h.get(t,e);if(i&&i.length)if((0,a.isFunction)(s)){let o=h.indexOf(t,e,s);!1!==o&&(p(i[o]),i.splice(o,1),i.length||h.clearEvents(e,t))}else i.forEach(p),i.length=0,h.clearEvents(e,t)};return this.__eachEvent(n,(t,e)=>{e===u.defaultNameSpace?h.namespaces().forEach(e=>{f(t,e)}):f(t,e)}),h.isEmpty()&&this.__removeStoreFromSubject(c),this}stopPropagation(t,e){let i=(0,l.isString)(t)?this:t,o=(0,l.isString)(t)?t:e;if("string"!=typeof o)throw(0,c.error)("Need event names");let n=this.__getStore(i);this.__eachEvent(o,(t,e)=>{let o=n.get(t,e);o&&this.__stopped.push(o),e===u.defaultNameSpace&&n.namespaces(!0).forEach(e=>this.stopPropagation(i,t+"."+e))})}__removeStop(t){if(t){let e=this.__stopped.indexOf(t);-1!==e&&this.__stopped.splice(0,e+1)}}__isStopped(t){return void 0!==t&&-1!==this.__stopped.indexOf(t)}fire(t,e,...i){let o,n,s=(0,l.isString)(t)?this:t,r=(0,l.isString)(t)?t:e,a=(0,l.isString)(t)?[e,...i]:i;if(!d(s)&&!(0,l.isString)(r))throw(0,c.error)("Need events names");let h=this.__getStore(s);return!(0,l.isString)(r)&&d(s)?this.__triggerNativeEvent(s,e):this.__eachEvent(r,(t,e)=>{if(d(s))this.__triggerNativeEvent(s,t);else{let i=h.get(t,e);if(i)try{[...i].every(e=>!this.__isStopped(i)&&(this.currents.push(t),n=e.syntheticCallback.call(s,t,...a),this.currents.pop(),void 0!==n&&(o=n),!0))}finally{this.__removeStop(i)}e!==u.defaultNameSpace||d(s)||h.namespaces().filter(t=>t!==e).forEach(e=>{let i=this.fire.apply(this,[s,t+"."+e,...a]);void 0!==i&&(o=i)})}}),o}destruct(){this.__isDestructed||(this.__isDestructed=!0,this.__domEventsMap.forEach((t,e)=>{this.off(e)}),this.__domEventsMap.clear(),this.__mutedEvents.clear(),this.currents.length=0,this.__stopped.length=0,this.off(this),this.__getStore(this).clear(),this.__removeStoreFromSubject(this))}constructor(t){(0,o._)(this,"__domEventsMap",new Map),(0,o._)(this,"__mutedEvents",new Set),(0,o._)(this,"__key","__JoditEventEmitterNamespaces"),(0,o._)(this,"__doc",n.globalDocument),(0,o._)(this,"__prepareEvent",t=>{!t.cancelBubble&&(t.composed&&(0,a.isFunction)(t.composedPath)&&t.composedPath()[0]&&Object.defineProperty(t,"target",{value:t.composedPath()[0],configurable:!0,enumerable:!0}),t.type.match(/^touch/)&&t.changedTouches&&t.changedTouches.length&&["clientX","clientY","pageX","pageY"].forEach(e=>{Object.defineProperty(t,e,{value:t.changedTouches[0][e],configurable:!0,enumerable:!0})}),t.originalEvent||(t.originalEvent=t),"paste"===t.type&&void 0===t.clipboardData&&this.__doc.defaultView.clipboardData&&Object.defineProperty(t,"clipboardData",{get:()=>this.__doc.defaultView.clipboardData,configurable:!0,enumerable:!0}))}),(0,o._)(this,"currents",[]),(0,o._)(this,"__stopped",[]),(0,o._)(this,"__isDestructed",!1),t&&(this.__doc=t),this.__key+=new Date().getTime()}}function d(t){return(0,a.isFunction)(t.addEventListener)}},60216:function(t,e,i){"use strict";i.d(e,{Eventify:function(){return n}});var o=i(25045);class n{on(t,e){return this.__map.has(t)||this.__map.set(t,new Set),this.__map.get(t)?.add(e),this}off(t,e){return this.__map.has(t)&&this.__map.get(t)?.delete(e),this}destruct(){this.__map.clear()}emit(t,...e){let i;return this.__map.has(t)&&this.__map.get(t)?.forEach(t=>{i=t(...e)}),i}constructor(){(0,o._)(this,"__map",new Map)}}},42689:function(t,e,i){"use strict";i.d(e,{eventEmitter:function(){return o}});let o=new(i(93747)).EventEmitter},1496:function(t,e,i){"use strict";i.d(e,{EventEmitter:function(){return o.EventEmitter},EventHandlersStore:function(){return r.EventHandlersStore},Eventify:function(){return n.Eventify},defaultNameSpace:function(){return r.defaultNameSpace},observable:function(){return s.observable}});var o=i(93747),n=i(60216),s=i(70535),r=i(18869)},70535:function(t,e,i){"use strict";i.d(e,{observable:function(){return c}});var o=i(17312),n=i(94013),s=i(62101),r=i(71125);let a=Symbol("observable-object");function l(t){return void 0!==t[a]}function c(t){if(l(t))return t;let e={},i={},c=(e,n)=>((0,o.isArray)(e)?e.map(t=>c(t,n)):(i[e]||(i[e]=[]),i[e].push(n)),t),u=(n,...s)=>{if((0,o.isArray)(n))return void n.map(t=>u(t,...s));try{!e[n]&&i[n]&&(e[n]=!0,i[n].forEach(e=>e.call(t,...s)))}finally{e[n]=!1}},h=(e,i=[])=>{let o={};l(e)||(Object.defineProperty(e,a,{enumerable:!1,value:!0}),Object.keys(e).forEach(a=>{let l=i.concat(a).filter(t=>t.length);o[a]=e[a];let c=(0,r.getPropertyDescriptor)(e,a);Object.defineProperty(e,a,{set(e){let i=o[a];if(!(0,n.isFastEqual)(o[a],e)){u(["beforeChange","beforeChange."+l.join(".")],a,e),(0,s.isPlainObject)(e)&&h(e,l),c&&c.set?c.set.call(t,e):o[a]=e;let n=[];u(["change",...l.reduce((t,e)=>(n.push(e),t.push("change."+n.join(".")),t),[])],l.join("."),i,e?.valueOf?e.valueOf():e)}},get:()=>c&&c.get?c.get.call(t):o[a],enumerable:!0,configurable:!0}),(0,s.isPlainObject)(o[a])&&h(o[a],l)}),Object.defineProperty(t,"on",{value:c}))};return h(t),t}},18869:function(t,e,i){"use strict";i.d(e,{EventHandlersStore:function(){return a},defaultNameSpace:function(){return r}});var o=i(25045),n=i(88475),s=i(28712);let r="JoditEventDefaultNamespace";class a{get(t,e){if(this.__store.has(e)){let i=this.__store.get(e);return(0,s.assert)(i,"-"),i[t]}}indexOf(t,e,i){let o=this.get(t,e);if(o){for(let t=0;t<o.length;t+=1)if(o[t].originalCallback===i)return t}return!1}namespaces(t=!1){let e=(0,n.toArray)(this.__store.keys());return t?e.filter(t=>t!==r):e}events(t){let e=this.__store.get(t);return e?Object.keys(e):[]}set(t,e,i,o=!1){let n=this.__store.get(e);n||(n={},this.__store.set(e,n)),void 0===n[t]&&(n[t]=[]),o?n[t].unshift(i):n[t].push(i)}clear(){this.__store.clear()}clearEvents(t,e){let i=this.__store.get(t);i&&i[e]&&(delete i[e],Object.keys(i).length||this.__store.delete(t))}isEmpty(){return 0===this.__store.size}constructor(){(0,o._)(this,"__store",new Map)}}},28077:function(t,e,i){"use strict";i.d(e,{eventEmitter:function(){return C},extendLang:function(){return b},getContainer:function(){return w},getPopupViewRoot:function(){return S},instances:function(){return p},modules:function(){return v},pluginSystem:function(){return _},uniqueUid:function(){return g}});var o=i(24497),n=i(85932),s=i(31534),r=i(74264),a=i(80991),l=i(421),c=i(85305),u=i(42689),h=i(81937),d=i(27795);let p={},f=1,m=new Set;function g(){function t(){return Math.round(f+=10*(Math.random()+1)).toString(16)}let e=t();for(;m.has(e);)e=t();return m.add(e),e}let _=new c.PluginSystem({getContainer:w}),v={},b=t=>{Object.keys(t).forEach(e=>{h.lang[e]?Object.assign(h.lang[e],t[e]):h.lang[e]=t[e]})},y=new WeakMap;function w(t,e,i="div",a=!1){let c=(0,n.isString)(e)?e:e?(0,l.getClassName)(e.prototype):"jodit-utils",u=y.get(t)||{},h=c+i,p=(0,s.isViewObject)(t)?t:t.j,f=null;if(!u[h]){let e=p.c;if(f=S(p.o,p.container,t.od.body),a&&(0,o.isJoditObject)(t)&&t.od!==t.ed){e=t.createInside;let n="style"===i?t.ed.head:t.ed.body;f=(0,o.isJoditObject)(t)&&t.o.shadowRoot?t.o.shadowRoot:n}let n=e.element(i,{className:`jodit jodit-${(0,r.kebabCase)(c)}-container jodit-box`});n.classList.add("jodit_theme_"+(p.o.theme||"default")),f.appendChild(n),u[h]=n,t.hookStatus("beforeDestruct",()=>{p.events.off(n),d.Dom.safeRemove(n),delete u[h],Object.keys(u).length&&y.delete(t)}),y.set(t,u),p.events.fire("getContainer",n)}return u[h].classList.remove("jodit_theme_default","jodit_theme_dark"),u[h].classList.add("jodit_theme_"+(p.o.theme||"default")),u[h]}function S(t,e,i){return t.popupRoot??t.shadowRoot??d.Dom.closest(e,t=>d.Dom.isHTMLElement(t)&&(d.Dom.isTag(t,"dialog")||["fixed","absolute"].includes((0,a.css)(t,"position"))),i)??i}let C=u.eventEmitter},78982:function(t,e,i){"use strict";i.d(e,{asArray:function(){return n}});var o=i(17312);let n=t=>(0,o.isArray)(t)?t:[t]},45664:function(t,e,i){"use strict";i.d(e,{asArray:function(){return o.asArray},splitArray:function(){return n.splitArray},toArray:function(){return s.toArray}});var o=i(78982),n=i(32328),s=i(88475)},32328:function(t,e,i){"use strict";function o(t){return Array.isArray(t)?t:t.split(/[,\s]+/)}i.d(e,{splitArray:function(){return o}})},88475:function(t,e,i){"use strict";i.d(e,{toArray:function(){return s}});var o=i(23283),n=i(43379);let s=function(...t){return((0,o.isNativeFunction)(Array.from)?Array.from:(0,n.reset)("Array.from")??Array.from).apply(Array,t)}},61077:function(t,e,i){"use strict";i.d(e,{clearTimeout:function(){return o.clearTimeout},setTimeout:function(){return o.setTimeout}});var o=i(79947)},79947:function(t,e,i){"use strict";i.d(e,{clearTimeout:function(){return s},setTimeout:function(){return n}});var o=i(81937);function n(t,e,...i){return e?o.globalWindow.setTimeout(t,e,...i):(t.call(null,...i),0)}function s(t){o.globalWindow.clearTimeout(t)}},98740:function(t,e,i){"use strict";i.d(e,{hasBrowserColorPicker:function(){return n}});var o=i(81937);function n(){let t=!0;try{let e=o.globalDocument.createElement("input");e.type="color",e.value="!",t="color"===e.type&&"!"!==e.value}catch(e){t=!1}return t}},28686:function(t,e,i){"use strict";i.d(e,{hasBrowserColorPicker:function(){return o.hasBrowserColorPicker},hasContainer:function(){return h.hasContainer},isAbortError:function(){return n.isAbortError},isArray:function(){return s.isArray},isBoolean:function(){return r.isBoolean},isDestructable:function(){return h.isDestructable},isEqual:function(){return a.isEqual},isFastEqual:function(){return a.isFastEqual},isFunction:function(){return l.isFunction},isHTML:function(){return c.isHTML},isHtmlFromWord:function(){return u.isHtmlFromWord},isInitable:function(){return h.isInitable},isInt:function(){return d.isInt},isJoditObject:function(){return p.isJoditObject},isLicense:function(){return f.isLicense},isMarker:function(){return m.isMarker},isNativeFunction:function(){return g.isNativeFunction},isNumber:function(){return _.isNumber},isNumeric:function(){return v.isNumeric},isPlainObject:function(){return b.isPlainObject},isPromise:function(){return y.isPromise},isSet:function(){return w.isSet},isString:function(){return S.isString},isStringArray:function(){return S.isStringArray},isURL:function(){return C.isURL},isValidName:function(){return E.isValidName},isViewObject:function(){return I.isViewObject},isVoid:function(){return T.isVoid},isWindow:function(){return x.isWindow}});var o=i(98740),n=i(72068),s=i(17312),r=i(22289),a=i(94013),l=i(91565),c=i(46248),u=i(82166),h=i(52433),d=i(99732),p=i(24497),f=i(44998),m=i(23175),g=i(23283),_=i(72412),v=i(70222),b=i(62101),y=i(52100),w=i(3213),S=i(85932),C=i(91764),E=i(50083),I=i(31534),T=i(18303),x=i(3513)},72068:function(t,e,i){"use strict";function o(t){return!!t&&t instanceof DOMException&&"AbortError"===t.name}i.d(e,{isAbortError:function(){return o}})},17312:function(t,e,i){"use strict";function o(t){return Array.isArray(t)}i.d(e,{isArray:function(){return o}})},22289:function(t,e,i){"use strict";function o(t){return"boolean"==typeof t}i.d(e,{isBoolean:function(){return o}})},94013:function(t,e,i){"use strict";i.d(e,{isEqual:function(){return n},isFastEqual:function(){return s}});var o=i(3347);function n(t,e){return t===e||(0,o.stringify)(t)===(0,o.stringify)(e)}function s(t,e){return t===e}},91565:function(t,e,i){"use strict";function o(t){return"function"==typeof t}i.d(e,{isFunction:function(){return o}})},82166:function(t,e,i){"use strict";function o(t){return -1!==t.search(/<meta.*?Microsoft Excel\s[\d].*?>/)||-1!==t.search(/<meta.*?Microsoft Word\s[\d].*?>/)||-1!==t.search(/style="[^"]*mso-/)&&-1!==t.search(/<font/)}i.d(e,{isHtmlFromWord:function(){return o}})},46248:function(t,e,i){"use strict";i.d(e,{isHTML:function(){return n}});var o=i(85932);let n=t=>(0,o.isString)(t)&&/<([A-Za-z][A-Za-z0-9]*)\b[^>]*>(.*?)<\/\1>/m.test(t.replace(/[\r\n]/g,""))},52433:function(t,e,i){"use strict";i.d(e,{hasContainer:function(){return l},isDestructable:function(){return a},isInitable:function(){return r}});var o=i(23211),n=i(91565),s=i(18303);function r(t){return!(0,s.isVoid)(t)&&(0,n.isFunction)(t.init)}function a(t){return!(0,s.isVoid)(t)&&(0,n.isFunction)(t.destruct)}function l(t){return!(0,s.isVoid)(t)&&o.Dom.isElement(t.container)}},99732:function(t,e,i){"use strict";i.d(e,{isInt:function(){return s}});var o=i(70222),n=i(85932);function s(t){return(0,n.isString)(t)&&(0,o.isNumeric)(t)&&(t=parseFloat(t)),"number"==typeof t&&Number.isFinite(t)&&!(t%1)}},24497:function(t,e,i){"use strict";i.d(e,{isJoditObject:function(){return n}});var o=i(91565);function n(t){return!!(t&&t instanceof Object&&(0,o.isFunction)(t.constructor)&&("u">typeof Jodit&&t instanceof Jodit||t.isJodit))}},44998:function(t,e,i){"use strict";i.d(e,{isLicense:function(){return n}});var o=i(85932);let n=t=>(0,o.isString)(t)&&23===t.length&&/^[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}$/i.test(t)},23175:function(t,e,i){"use strict";i.d(e,{isMarker:function(){return n}});var o=i(23211);function n(t){return o.Dom.isMarker(t)}},23283:function(t,e,i){"use strict";function o(t){return!!t&&"function"===(typeof t).toLowerCase()&&(t===Function.prototype||/^\s*function\s*(\b[a-z$_][a-z0-9$_]*\b)*\s*\((|([a-z$_][a-z0-9$_]*)(\s*,[a-z$_][a-z0-9$_]*)*)\)\s*{\s*\[native code]\s*}\s*$/i.test(t+""))}i.d(e,{isNativeFunction:function(){return o}})},72412:function(t,e,i){"use strict";function o(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}i.d(e,{isNumber:function(){return o}})},70222:function(t,e,i){"use strict";i.d(e,{isNumeric:function(){return n}});var o=i(85932);function n(t){if((0,o.isString)(t)){if(!t.match(/^([+-])?[0-9]+(\.?)([0-9]+)?(e[0-9]+)?$/))return!1;t=parseFloat(t)}return"number"==typeof t&&!isNaN(t)&&isFinite(t)}},62101:function(t,e,i){"use strict";i.d(e,{isPlainObject:function(){return n}});var o=i(3513);function n(t){return!(!t||"object"!=typeof t||t.nodeType||(0,o.isWindow)(t))&&!(t.constructor&&!({}).hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))}},52100:function(t,e,i){"use strict";function o(t){return t&&"function"==typeof t.then}i.d(e,{isPromise:function(){return o}})},3213:function(t,e,i){"use strict";i.d(e,{isSet:function(){return n}});var o=i(91565);function n(t){return!!t&&(0,o.isFunction)(t.has)&&(0,o.isFunction)(t.add)&&(0,o.isFunction)(t.delete)}},85932:function(t,e,i){"use strict";i.d(e,{isString:function(){return n},isStringArray:function(){return s}});var o=i(17312);function n(t){return"string"==typeof t}function s(t){return(0,o.isArray)(t)&&n(t[0])}},91764:function(t,e,i){"use strict";i.d(e,{isURL:function(){return n}});var o=i(81937);function n(t){if(t.includes(" "))return!1;if("u">typeof URL)try{let e=new URL(t);return["https:","http:","ftp:","file:","rtmp:"].includes(e.protocol)}catch(t){return!1}let e=o.globalDocument.createElement("a");return e.href=t,!!e.hostname}},50083:function(t,e,i){"use strict";function o(t){return!!t.length&&!/[^0-9A-Za-zа-яА-ЯЁё\w\-_. ]/.test(t)&&t.trim().length>0}i.d(e,{isValidName:function(){return o}})},31534:function(t,e,i){"use strict";i.d(e,{isViewObject:function(){return n}});var o=i(91565);function n(t){return!!(t&&t instanceof Object&&(0,o.isFunction)(t.constructor)&&t.isView)}},18303:function(t,e,i){"use strict";function o(t){return null==t}i.d(e,{isVoid:function(){return o}})},3513:function(t,e,i){"use strict";function o(t){return null!=t&&t===t.window}i.d(e,{isWindow:function(){return o}})},93387:function(t,e,i){"use strict";i.d(e,{colorToHex:function(){return o}});let o=t=>{if("rgba(0, 0, 0, 0)"===t||""===t)return!1;if(!t)return"#000000";if("#"===t.substr(0,1))return t;let e=/([\s\n\t\r]*?)rgb\((\d+), (\d+), (\d+)\)/.exec(t)||/([\s\n\t\r]*?)rgba\((\d+), (\d+), (\d+), ([\d.]+)\)/.exec(t);if(!e)return"#000000";let i=parseInt(e[2],10),o=parseInt(e[3],10),n=(parseInt(e[4],10)|o<<8|i<<16).toString(16).toUpperCase();for(;n.length<6;)n="0"+n;return e[1]+"#"+n}},7018:function(t,e,i){"use strict";i.d(e,{colorToHex:function(){return o.colorToHex}});var o=i(93387)},30893:function(t,e,i){"use strict";i.d(e,{applyStyles:function(){return l}});var o=i(81937),n=i(23211),s=i(4040),r=i(28723);function a(t){return t.replace(/mso-[a-z-]+:[\s]*[^;]+;/gi,"").replace(/mso-[a-z-]+:[\s]*[^";']+$/gi,"").replace(/border[a-z-]*:[\s]*[^;]+;/gi,"").replace(/([0-9.]+)(pt|cm)/gi,(t,e,i)=>{switch(i.toLowerCase()){case"pt":return(1.328*parseFloat(e)).toFixed(0)+"px";case"cm":return(.02645833*parseFloat(e)).toFixed(0)+"px"}return t})}function l(t){if(-1===t.indexOf("<html "))return t;t=(t=t.substring(t.indexOf("<html "),t.length)).substring(0,t.lastIndexOf("</html>")+7);let e=o.globalDocument.createElement("iframe");e.style.display="none",o.globalDocument.body.appendChild(e);let i="";try{let l=e.contentDocument||(e.contentWindow?e.contentWindow.document:null);if(l){l.open(),l.write(t),l.close();try{for(let t=0;t<l.styleSheets.length;t+=1){let e=l.styleSheets[t].cssRules;for(let t=0;t<e.length;t+=1)""!==e[t].selectorText&&(0,r.$$)(e[t].selectorText,l.body).forEach(i=>{i.style.cssText=a(e[t].style.cssText+";"+i.style.cssText)})}}catch(t){if(!o.IS_PROD)throw t}n.Dom.each(l.body,t=>{if(n.Dom.isElement(t)){let e=t.getAttribute("style");e&&(t.style.cssText=a(e)),t.hasAttribute("style")&&!t.getAttribute("style")&&t.removeAttribute("style")}}),i=l.firstChild?(0,s.trim)(l.body.innerHTML):""}}catch{}finally{n.Dom.safeRemove(e)}return i&&(t=i),(0,s.trim)(t.replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(/<!--[^>]*>/g,""))}},1277:function(t,e,i){"use strict";i.d(e,{cleanFromWord:function(){return a}});var o=i(81937),n=i(23211),s=i(88475),r=i(4040);function a(t){-1!==t.indexOf("<html ")&&(t=(t=t.substring(t.indexOf("<html "),t.length)).substring(0,t.lastIndexOf("</html>")+7));let e="";try{let i=o.globalDocument.createElement("div");i.innerHTML=t;let r=[];i.firstChild&&n.Dom.each(i,t=>{if(t)switch(t.nodeType){case Node.ELEMENT_NODE:switch(t.nodeName){case"STYLE":case"LINK":case"META":r.push(t);break;case"W:SDT":case"W:SDTPR":case"FONT":n.Dom.unwrap(t);break;default:(0,s.toArray)(t.attributes).forEach(e=>{-1===["src","href","rel","content"].indexOf(e.name.toLowerCase())&&t.removeAttribute(e.name)})}break;case Node.TEXT_NODE:break;default:r.push(t)}}),n.Dom.safeRemove.apply(null,r),e=i.innerHTML}catch(t){}return e&&(t=e),(t=t.split(/(\n)/).filter(r.trim).join(`
|
|
10
|
-
`)).replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(/<!--[^>]*>/g,"")}},6609:function(t,e,i){"use strict";i.d(e,{htmlspecialchars:function(){return n}});var o=i(81937);function n(t){let e=o.globalDocument.createElement("div");return e.textContent=t,e.innerHTML}},82658:function(t,e,i){"use strict";i.d(e,{applyStyles:function(){return o.applyStyles},cleanFromWord:function(){return n.cleanFromWord},htmlspecialchars:function(){return s.htmlspecialchars},nl2br:function(){return r.nl2br},safeHTML:function(){return a.safeHTML},sanitizeHTMLElement:function(){return a.sanitizeHTMLElement},stripTags:function(){return l.stripTags}});var o=i(30893),n=i(1277),s=i(6609),r=i(48838),a=i(48155),l=i(22852)},48838:function(t,e,i){"use strict";function o(t){return t.replace(/\r\n|\r|\n/g,"<br/>")}i.d(e,{nl2br:function(){return o}})},48155:function(t,e,i){"use strict";i.d(e,{safeHTML:function(){return s},sanitizeHTMLElement:function(){return a}});var o=i(23211),n=i(93640);function s(t,e){(o.Dom.isElement(t)||o.Dom.isFragment(t))&&(e.removeEventAttributes??e.removeOnError?(r(t),(0,n.$$)("*",t).forEach(t=>r(t))):e.removeOnError&&(a(t,e),(0,n.$$)("[onerror]",t).forEach(t=>a(t,e))),e.safeJavaScriptLink&&(a(t,e),(0,n.$$)('a[href^="javascript"]',t).forEach(t=>a(t,e))),e.safeLinksTarget&&(0,n.$$)('a[target="_blank"]',t).forEach(t=>{let e=(t.getAttribute("rel")||"").split(/\s+/).filter(Boolean);e.includes("noopener")||e.push("noopener"),e.includes("noreferrer")||e.push("noreferrer"),(0,n.attr)(t,"rel",e.join(" "))}))}function r(t){if(!o.Dom.isElement(t))return!1;let e=!1,i=[];for(let e=0;e<t.attributes.length;e++)t.attributes[e].name.toLowerCase().startsWith("on")&&i.push(t.attributes[e].name);for(let o of i)t.removeAttribute(o),e=!0;return e}function a(t,{safeJavaScriptLink:e,removeOnError:i}={safeJavaScriptLink:!0,removeOnError:!0}){if(!o.Dom.isElement(t))return!1;let s=!1;i&&t.hasAttribute("onerror")&&((0,n.attr)(t,"onerror",null),s=!0);let r=t.getAttribute("href");return e&&r&&0===r.trim().indexOf("javascript")&&((0,n.attr)(t,"href",location.protocol+"//"+r),s=!0),s}},22852:function(t,e,i){"use strict";i.d(e,{stripTags:function(){return function t(e,i=document,u=null){let h=i.createElement("div");return(0,n.isString)(e)?h.innerHTML=e:h.appendChild(e),(0,r.$$)("*",h).forEach(e=>{let n=e.parentNode;if(!n)return;if(u&&o.Dom.isTag(e,u)){let n=e.nodeName.toLowerCase(),s=o.Dom.isTag(e,c)?`%%%jodit-single-${n}%%%`:`%%%jodit-${n}%%%${t(e.innerHTML,i,u)}%%%/jodit-${n}%%%`;o.Dom.before(e,i.createTextNode(s)),o.Dom.safeRemove(e);return}if(o.Dom.isTag(e,l))return void o.Dom.safeRemove(e);if(!o.Dom.isTag(e,a))return;let s=e.nextSibling;!(o.Dom.isText(s)&&/^\s/.test(s.nodeValue||""))&&s&&n.insertBefore(i.createTextNode(" "),s)}),(0,s.trim)(h.innerText).replace(/%%%(\/)?jodit(-single)?-([\w\n]+)%%%/g,(t,e,i,o)=>`<${e?"/":""}${o}>`)}}});var o=i(23211),n=i(85932),s=i(4040),r=i(93640);let a=new Set(["div","p","br","h1","h2","h3","h4","h5","h6","hr"]),l=new Set(["script","style"]),c=new Set(["br","hr","input"])},65946:function(t,e,i){"use strict";i.r(e),i.d(e,{CamelCaseToKebabCase:function(){return u.CamelCaseToKebabCase},NUMBER_FIELDS_REG:function(){return l.NUMBER_FIELDS_REG},applyStyles:function(){return a.applyStyles},asArray:function(){return o.asArray},camelCase:function(){return u.camelCase},cleanFromWord:function(){return a.cleanFromWord},clearTimeout:function(){return n.clearTimeout},colorToHex:function(){return r.colorToHex},fuzzySearchIndex:function(){return u.fuzzySearchIndex},getContentWidth:function(){return c.getContentWidth},getScrollParent:function(){return c.getScrollParent},hasBrowserColorPicker:function(){return s.hasBrowserColorPicker},hasContainer:function(){return s.hasContainer},htmlspecialchars:function(){return a.htmlspecialchars},i18n:function(){return u.i18n},innerWidth:function(){return c.innerWidth},isAbortError:function(){return s.isAbortError},isArray:function(){return s.isArray},isBoolean:function(){return s.isBoolean},isDestructable:function(){return s.isDestructable},isEqual:function(){return s.isEqual},isFastEqual:function(){return s.isFastEqual},isFunction:function(){return s.isFunction},isHTML:function(){return s.isHTML},isHtmlFromWord:function(){return s.isHtmlFromWord},isInitable:function(){return s.isInitable},isInt:function(){return s.isInt},isJoditObject:function(){return s.isJoditObject},isLicense:function(){return s.isLicense},isMarker:function(){return s.isMarker},isNativeFunction:function(){return s.isNativeFunction},isNumber:function(){return s.isNumber},isNumeric:function(){return s.isNumeric},isPlainObject:function(){return s.isPlainObject},isPromise:function(){return s.isPromise},isSet:function(){return s.isSet},isString:function(){return s.isString},isStringArray:function(){return s.isStringArray},isURL:function(){return s.isURL},isValidName:function(){return s.isValidName},isViewObject:function(){return s.isViewObject},isVoid:function(){return s.isVoid},isWindow:function(){return s.isWindow},kebabCase:function(){return u.kebabCase},nl2br:function(){return a.nl2br},normalizeColor:function(){return l.normalizeColor},normalizeCssNumericValue:function(){return l.normalizeCssNumericValue},normalizeCssValue:function(){return l.normalizeCssValue},normalizeKeyAliases:function(){return l.normalizeKeyAliases},normalizeLicense:function(){return l.normalizeLicense},normalizePath:function(){return l.normalizePath},normalizeRelativePath:function(){return l.normalizeRelativePath},normalizeSize:function(){return l.normalizeSize},normalizeUrl:function(){return l.normalizeUrl},offset:function(){return c.offset},position:function(){return c.position},safeHTML:function(){return a.safeHTML},sanitizeHTMLElement:function(){return a.sanitizeHTMLElement},setTimeout:function(){return n.setTimeout},size:function(){return c.size},splitArray:function(){return o.splitArray},sprintf:function(){return u.sprintf},stringify:function(){return u.stringify},stripTags:function(){return a.stripTags},toArray:function(){return o.toArray},trim:function(){return u.trim},trimChars:function(){return u.trimChars},trimInv:function(){return u.trimInv},ucfirst:function(){return u.ucfirst}});var o=i(45664),n=i(61077),s=i(28686),r=i(7018),a=i(82658),l=i(97022),c=i(86878),u=i(97642),h=i(93640),d={};for(var p in h)0>["default","asArray","splitArray","toArray","clearTimeout","setTimeout","hasBrowserColorPicker","hasContainer","isAbortError","isArray","isBoolean","isDestructable","isEqual","isFastEqual","isFunction","isHTML","isHtmlFromWord","isInitable","isInt","isJoditObject","isLicense","isMarker","isNativeFunction","isNumber","isNumeric","isPlainObject","isPromise","isSet","isString","isStringArray","isURL","isValidName","isViewObject","isVoid","isWindow","colorToHex","applyStyles","cleanFromWord","htmlspecialchars","nl2br","safeHTML","sanitizeHTMLElement","stripTags","NUMBER_FIELDS_REG","normalizeColor","normalizeCssNumericValue","normalizeCssValue","normalizeKeyAliases","normalizeLicense","normalizePath","normalizeRelativePath","normalizeSize","normalizeUrl","getContentWidth","getScrollParent","innerWidth","offset","position","size","CamelCaseToKebabCase","camelCase","fuzzySearchIndex","i18n","kebabCase","sprintf","stringify","trim","trimChars","trimInv","ucfirst"].indexOf(p)&&(d[p]=(function(t){return h[t]}).bind(0,p));i.d(e,d)},97022:function(t,e,i){"use strict";i.d(e,{NUMBER_FIELDS_REG:function(){return n.NUMBER_FIELDS_REG},normalizeColor:function(){return o.normalizeColor},normalizeCssNumericValue:function(){return n.normalizeCssNumericValue},normalizeCssValue:function(){return n.normalizeCssValue},normalizeKeyAliases:function(){return s.normalizeKeyAliases},normalizeLicense:function(){return r.normalizeLicense},normalizePath:function(){return a.normalizePath},normalizeRelativePath:function(){return l.normalizeRelativePath},normalizeSize:function(){return c.normalizeSize},normalizeUrl:function(){return u.normalizeUrl}});var o=i(77367),n=i(19147),s=i(27978),r=i(49663),a=i(18377),l=i(96340),c=i(98831),u=i(48009)},77367:function(t,e,i){"use strict";i.d(e,{normalizeColor:function(){return s}});var o=i(93387),n=i(4040);let s=t=>{let e=["#"],i=(0,o.colorToHex)(t);if(!i)return!1;if(3===(i=(i=(0,n.trim)(i.toUpperCase())).substring(1)).length){for(let t=0;t<3;t+=1)e.push(i[t]),e.push(i[t]);return e.join("")}return i.length>6&&(i=i.slice(0,6)),"#"+i}},19147:function(t,e,i){"use strict";i.d(e,{NUMBER_FIELDS_REG:function(){return a},normalizeCssNumericValue:function(){return l},normalizeCssValue:function(){return c}});var o=i(70222),n=i(18303),s=i(93387),r=i(74264);let a=/^(left|top|bottom|right|width|min|max|height|margin|padding|fontsize|font-size)/i;function l(t,e){return!(0,n.isVoid)(e)&&a.test(t)&&(0,o.isNumeric)(e.toString())?parseInt(e.toString(),10)+"px":e}function c(t,e){if("font-weight"===(0,r.kebabCase)(t)){switch(e.toString().toLowerCase()){case"700":case"bold":return 700;case"400":case"normal":return 400;case"900":case"heavy":return 900}return(0,o.isNumeric)(e)?Number(e):e}return/color/i.test(t)&&/^rgb/i.test(e.toString())&&(0,s.colorToHex)(e.toString())||e}},27978:function(t,e,i){"use strict";i.d(e,{normalizeKeyAliases:function(){return s}});var o=i(81937),n=i(4040);function s(t){let e={},i={meta:1,ctrl:2,control:2,alt:3,shift:4,space:5};return t.replace(/\+\+/g,"+add").split(/[\s]*\+[\s]*/).map(t=>(0,n.trim)(t.toLowerCase())).map(t=>o.KEY_ALIASES[t]||t).sort((t,e)=>i[t]&&!i[e]?-1:!i[t]&&i[e]?1:i[t]&&i[e]?i[t]-i[e]:t>e?1:-1).filter(t=>!e[t]&&""!==t&&(e[t]=!0)).join("+")}},49663:function(t,e,i){"use strict";i.d(e,{normalizeLicense:function(){return o}});let o=(t,e=8)=>{let i=[];for(;t.length;)i.push(t.substr(0,e)),t=t.substr(e);return i[1]=i[1].replace(/./g,"*"),i[2]=i[2].replace(/./g,"*"),i.join("-")}},18377:function(t,e,i){"use strict";i.d(e,{normalizePath:function(){return n}});var o=i(4040);let n=(...t)=>t.filter(t=>(0,o.trim)(t).length).map((e,i)=>(e=e.replace(/([^:])[\\/]+/g,"$1/"),i&&(e=e.replace(/^\//,"")),i!==t.length-1&&(e=e.replace(/\/$/,"")),e)).join("/")},96340:function(t,e,i){"use strict";i.d(e,{normalizeRelativePath:function(){return o}});let o=t=>t.split("/").reduce((t,e)=>{switch(e){case"":case".":break;case"..":t.pop();break;default:t.push(e)}return t},[]).join("/")+(t.endsWith("/")?"/":"")},98831:function(t,e,i){"use strict";i.d(e,{normalizeSize:function(){return o}});let o=(t,e)=>/^[0-9]+$/.test(t.toString())?t+e:t.toString()},48009:function(t,e,i){"use strict";i.d(e,{normalizeUrl:function(){return o}});let o=(...t)=>t.filter(t=>t.length).map(t=>t.replace(/\/$/,"")).join("/").replace(/([^:])[\\/]+/g,"$1/")},54447:function(t,e,i){"use strict";i.d(e,{getContentWidth:function(){return o}});let o=(t,e)=>{let i=e.getComputedStyle(t);return t.offsetWidth-parseInt(i.getPropertyValue("padding-left")||"0",10)-parseInt(i.getPropertyValue("padding-right")||"0",10)}},34027:function(t,e,i){"use strict";i.d(e,{getScrollParent:function(){return function t(e){if(!e)return null;let i=n.Dom.isHTMLElement(e),r=i&&(0,s.css)(e,"overflowY");return i&&"visible"!==r&&"hidden"!==r&&e.scrollHeight>=e.clientHeight?e:t(e.parentNode)||o.globalDocument.scrollingElement||o.globalDocument.body}}});var o=i(81937),n=i(23211),s=i(93640)},86878:function(t,e,i){"use strict";i.d(e,{getContentWidth:function(){return o.getContentWidth},getScrollParent:function(){return n.getScrollParent},innerWidth:function(){return s.innerWidth},offset:function(){return a.offset},position:function(){return l.position},size:function(){return r.size}});var o=i(54447),n=i(34027),s=i(83215),r=i(18073),a=i(69143),l=i(23599)},83215:function(t,e,i){"use strict";i.d(e,{innerWidth:function(){return o}});let o=(t,e)=>{let i=e.getComputedStyle(t);return t.clientWidth-(parseFloat(i.paddingLeft||"0")+parseFloat(i.paddingRight||"0"))}},18073:function(t,e,i){"use strict";i.d(e,{size:function(){return n}});var o=i(28686);function n(t){return(0,o.isString)(t)||(0,o.isArray)(t)?t.length:(0,o.isPlainObject)(t)?Object.keys(t).length:0}},69143:function(t,e,i){"use strict";i.d(e,{offset:function(){return o}});let o=(t,e,i,n=!1)=>{let s,r,a;try{s=t.getBoundingClientRect()}catch(t){s={top:0,bottom:0,left:0,right:0,width:0,height:0}}let l=i.body,c=i.documentElement||{clientTop:0,clientLeft:0,scrollTop:0,scrollLeft:0},u=i.defaultView||i.parentWindow,h=u.pageYOffset||c.scrollTop||l.scrollTop,d=u.pageXOffset||c.scrollLeft||l.scrollLeft,p=c.clientTop||l.clientTop||0,f=c.clientLeft||l.clientLeft||0,m=e.iframe;if(!n&&e&&e.options&&e.o.iframe&&m){let{top:t,left:i}=o(m,e,e.od,!0);r=s.top+t,a=s.left+i}else r=s.top+h-p,a=s.left+d-f;return{top:Math.round(r),left:Math.round(a),width:s.width,height:s.height}}},23599:function(t,e,i){"use strict";i.d(e,{position:function(){return function t(e,i,n=!1){let s=e.getBoundingClientRect(),r=s.left,a=s.top;if((0,o.isJoditObject)(i)&&i.iframe&&i.ed.body.contains(e)&&!n){let{left:e,top:o}=t(i.iframe,i,!0);r+=e,a+=o}return{left:Math.round(r),top:Math.round(a),width:Math.round(e.offsetWidth??s.width),height:Math.round(e.offsetHeight??s.height)}}}});var o=i(24497)},57821:function(t,e,i){"use strict";i.d(e,{camelCase:function(){return o}});let o=t=>t.replace(/([-_])(.)/g,(t,e,i)=>i.toUpperCase())},57626:function(t,e,i){"use strict";i.d(e,{fuzzySearchIndex:function(){return n}});var o=i(81937);function n(t,e,i=0,s=1){let r=0,a=0,l=-1,c=0,u=0;for(a=i;r<t.length&&a<e.length;)t[r].toLowerCase()===e[a].toLowerCase()?(r++,c++,u=0,-1===l&&(l=a)):r>0&&(u>=s&&e[a]!==o.INVISIBLE_SPACE?(r=0,l=-1,c=0,u=0,a--):(u++,c++)),a++;return r===t.length?[l,c]:[-1,0]}},18080:function(t,e,i){"use strict";i.d(e,{i18n:function(){return c},sprintf:function(){return l}});var o=i(81937),n=i(85932),s=i(99436),r=i(93640),a=i(5266);let l=(t,e)=>{if(!e||!e.length)return t;let i=/%([sd])/g,o=i.exec(t),n=t,s=0;for(;o&&void 0!==e[s];)n=n.replace(o[0],e[s].toString()),s+=1,o=i.exec(t);return n};function c(t,e,i){if(!(0,n.isString)(t))throw(0,r.error)("i18n: Need string in first argument");if(!t.length)return t;let c=!!i?.debugLanguage,u={},h=t=>e&&e.length?l(t,e):t,d=(0,r.defaultLanguage)(a.Config.defaultOptions.language,a.Config.defaultOptions.language),p=(0,r.defaultLanguage)(i?.language,d),f=e=>{if(!e)return;if((0,n.isString)(e[t]))return h(e[t]);let i=t.toLowerCase();if((0,n.isString)(e[i]))return h(e[i]);let o=(0,s.ucfirst)(t);if((0,n.isString)(e[o]))return h(e[o])};void 0!==o.lang[p]?u=o.lang[p]:c||(u=void 0!==o.lang[d]?o.lang[d]:o.lang.en);let m=i?.i18n;if(m&&m[p]){let t=f(m[p]);if(t)return t}return f(u)||(!c&&o.lang.en&&(0,n.isString)(o.lang.en[t])&&o.lang.en[t]?h(o.lang.en[t]):c?"{"+t+"}":(o.IS_PROD,h(t)))}},97642:function(t,e,i){"use strict";i.d(e,{CamelCaseToKebabCase:function(){return r.CamelCaseToKebabCase},camelCase:function(){return o.camelCase},fuzzySearchIndex:function(){return n.fuzzySearchIndex},i18n:function(){return s.i18n},kebabCase:function(){return r.kebabCase},sprintf:function(){return s.sprintf},stringify:function(){return a.stringify},trim:function(){return l.trim},trimChars:function(){return l.trimChars},trimInv:function(){return l.trimInv},ucfirst:function(){return c.ucfirst}});var o=i(57821),n=i(57626),s=i(18080),r=i(74264),a=i(3347),l=i(4040),c=i(99436)},74264:function(t,e,i){"use strict";i.d(e,{CamelCaseToKebabCase:function(){return n},kebabCase:function(){return o}});let o=t=>t.replace(/([A-Z])([A-Z])([a-z])/g,"$1-$2$3").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),n=t=>t.replace(/([A-Z])([A-Z])([a-z])/g,"$1-$2$3").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()},3347:function(t,e,i){"use strict";function o(t,e={}){if("object"!=typeof t)return t+"";let i=new Set(e.excludeKeys),n=new WeakMap;return JSON.stringify(t,(t,e)=>{if(!i.has(t)){if("object"==typeof e&&null!=e){if(n.get(e))return"[refObject]";n.set(e,!0)}return e}},e.prettify)}i.d(e,{stringify:function(){return o}})},4040:function(t,e,i){"use strict";i.d(e,{trim:function(){return n},trimChars:function(){return s},trimInv:function(){return r}});var o=i(81937);function n(t){return t.replace((0,o.SPACE_REG_EXP_END)(),"").replace((0,o.SPACE_REG_EXP_START)(),"")}function s(t,e){return t.replace(RegExp(`[${e}]+$`),"").replace(RegExp(`^[${e}]+`),"")}function r(t){return t.replace((0,o.INVISIBLE_SPACE_REG_EXP_END)(),"").replace((0,o.INVISIBLE_SPACE_REG_EXP_START)(),"")}},99436:function(t,e,i){"use strict";function o(t){return t.length?t[0].toUpperCase()+t.substring(1):""}i.d(e,{ucfirst:function(){return o}})},16849:function(t,e,i){"use strict";i.d(e,{alignElement:function(){return a},clearAlign:function(){return r},hAlignElement:function(){return s}});var o=i(27795),n=i(80991);function s(t,e){e&&"normal"!==e?"center"!==e?((0,n.css)(t,"float",e),(0,n.clearCenterAlign)(t)):(0,n.css)(t,{float:"",display:"block",marginLeft:"auto",marginRight:"auto"}):((0,n.css)(t,"float")&&-1!==["right","left"].indexOf((0,n.css)(t,"float").toString().toLowerCase())&&(0,n.css)(t,"float",""),(0,n.clearCenterAlign)(t))}function r(t){o.Dom.each(t,t=>{o.Dom.isHTMLElement(t)&&t.style.textAlign&&(t.style.textAlign="",t.style.cssText.trim().length||t.removeAttribute("style"))})}function a(t,e){if(o.Dom.isNode(e)&&o.Dom.isElement(e))switch(r(e),t.toLowerCase()){case"justifyfull":e.style.textAlign="justify";break;case"justifyright":e.style.textAlign="right";break;case"justifyleft":e.style.textAlign="left";break;case"justifycenter":e.style.textAlign="center"}}},47760:function(t,e,i){"use strict";i.d(e,{alreadyLoadedList:function(){return s},appendScriptAsync:function(){return a},appendStyleAsync:function(){return l},loadNext:function(){return function t(e,i,n=0){return(0,o.isString)(i[n])?a(e,i[n]).then(()=>t(e,i,n+1)):Promise.resolve()}},loadNextStyle:function(){return function t(e,i,n=0){return(0,o.isString)(i[n])?l(e,i[n]).then(()=>t(e,i,n+1)):Promise.resolve()}}});var o=i(85932),n=i(91321);let s=new Map,r=t=>(e,i)=>{if(s.has(i))return s.get(i);let o=t(e,i);return s.set(i,o),o},a=r((t,e)=>t.async.promise((i,o)=>{if(t.isInDestruct)return o();let s=t.c.element("script",{type:"text/javascript",crossorigin:"anonymous",referrerpolicy:"no-referrer",async:!0,src:(0,n.completeUrl)(e)});t.e.one(s,"error",o).one(s,"load",i),t.od.body.appendChild(s)})),l=r((t,e)=>t.async.promise((i,o)=>{if(t.isInDestruct)return o();let s=t.c.element("link");s.rel="stylesheet",s.media="all",s.crossOrigin="anonymous",t.isInDestruct||t.e.on(s,"load",()=>i(s)).on(s,"error",o),s.href=(0,n.completeUrl)(e),t.o.shadowRoot?t.o.shadowRoot.appendChild(s):t.od.body.appendChild(s)}))},7909:function(t,e,i){"use strict";i.d(e,{attr:function(){return function t(e,i,l){if(!e||!(0,o.isFunction)(e.getAttribute))return null;if(!(0,s.isString)(i))return Object.keys(i).forEach(o=>{let s=i[o];(0,n.isPlainObject)(s)&&"style"===o?(0,a.css)(e,s):("className"===o&&(o="class"),t(e,o,s))}),null;let c=(0,r.CamelCaseToKebabCase)(i);if(/^-/.test(c)){let i=t(e,"data"+c);if(i)return i;c=c.substr(1)}if(void 0!==l)if(null==l)e.hasAttribute(c)&&e.removeAttribute(c);else{let t=l.toString();return"IMG"===e.nodeName&&("width"===c||"height"===c)&&(t=t.replace("px","")),e.setAttribute(c,t),t}return e.getAttribute(c)}}});var o=i(91565),n=i(62101),s=i(85932),r=i(74264),a=i(80991)},26136:function(t,e,i){"use strict";i.d(e,{browser:function(){return o}});let o=t=>{let e=navigator.userAgent.toLowerCase(),i=/(firefox)[\s/]([\w.]+)/.exec(e)||/(chrome)[\s/]([\w.]+)/.exec(e)||/(webkit)[\s/]([\w.]+)/.exec(e)||/(opera)(?:.*version)[\s/]([\w.]+)/.exec(e)||/(msie)[\s]([\w.]+)/.exec(e)||/(trident)\/([\w.]+)/.exec(e)||0>e.indexOf("compatible")||[];return"version"===t?i[2]:"webkit"===t?"chrome"===i[1]||"webkit"===i[1]:"ff"===t?"firefox"===i[1]:"msie"===t?"trident"===i[1]||"msie"===i[1]:i[1]===t}},36833:function(t,e,i){"use strict";i.d(e,{buildQuery:function(){return n}});var o=i(62101);let n=(t,e)=>{let i=[],s=encodeURIComponent;for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)){let a=e?e+"["+r+"]":r,l=t[r];i.push((0,o.isPlainObject)(l)?n(l,a):s(a)+"="+s(l))}return i.join("&")}},91321:function(t,e,i){"use strict";i.d(e,{completeUrl:function(){return n}});var o=i(81937);let n=t=>("file:"===o.globalWindow.location.protocol&&/^\/\//.test(t)&&(t="https:"+t),t)},77483:function(t,e,i){"use strict";i.d(e,{ConfigDeepFlatten:function(){return function t(e){return(0,c.keys)(e,!1).reduce((i,o)=>(i[o]=(0,n.isPlainObject)(e[o])?t(e[o]):e[o],i),{})}},ConfigFlatten:function(){return u},ConfigProto:function(){return function t(e,i,c=0){if(Object.getPrototypeOf(e)!==Object.prototype)return e;let u=a.Config.defaultOptions;if((0,s.isString)(e.preset)){if(void 0!==u.presets[e.preset]){let t=u.presets[e.preset];Object.keys(t).forEach(i=>{(0,r.isVoid)(e[i])&&(e[i]=t[i])})}delete e.preset}let h={};return Object.keys(e).forEach(s=>{let r=e[s],a=i?i[s]:null;if((0,n.isPlainObject)(r)&&(0,n.isPlainObject)(a)&&!(0,l.isAtom)(r)){h[s]=t(r,a,c+1);return}if(0!==c&&(0,o.isArray)(r)&&!(0,l.isAtom)(r)&&(0,o.isArray)(a)){h[s]=[...r,...a.slice(r.length)];return}h[s]=r}),Object.setPrototypeOf(h,i),h}}});var o=i(17312),n=i(62101),s=i(85932),r=i(18303),a=i(5266),l=i(54794),c=i(71125);function u(t){return(0,c.keys)(t,!1).reduce((e,i)=>(e[i]=t[i],e),{})}},3856:function(t,e,i){"use strict";i.d(e,{convertMediaUrlToVideoEmbed:function(){return r}});var o=i(81937),n=i(91764),s=i(36310);let r=(t,{width:e=400,height:i=345}={})=>{if(!(0,n.isURL)(t))return t;let r=o.globalDocument.createElement("a"),a=/(?:http?s?:\/\/)?(?:www\.)?(?:vimeo\.com)\/?(.+)/g;r.href=t,e||(e=400),i||(i=345);let l=r.protocol||"";switch(r.hostname){case"www.vimeo.com":case"vimeo.com":return a.test(t)?t.replace(a,'<iframe width="'+e+'" height="'+i+'" src="'+l+'//player.vimeo.com/video/$1" frameborder="0" allowfullscreen></iframe>'):t;case"youtube.com":case"www.youtube.com":case"youtu.be":case"www.youtu.be":{let o=r.search?(0,s.parseQuery)(r.search):{v:r.pathname.substring(1)};return/^embed\/.*/.test(o.v)&&(o.v=o.v.substring(6)),o.v?'<iframe width="'+e+'" height="'+i+'" src="'+l+"//www.youtube.com/embed/"+o.v+'" frameborder="0" allowfullscreen></iframe>':t}}return t}},80991:function(t,e,i){"use strict";i.d(e,{clearCenterAlign:function(){return c},css:function(){return l}});var o=i(22289),n=i(62101),s=i(19147),r=i(57821),a=i(74264);function l(t,e,i,c=!1){if((0,o.isBoolean)(i)&&(c=i,i=void 0),(0,n.isPlainObject)(e)||void 0!==i){let o=(t,e,i)=>{void 0!==(i=(0,s.normalizeCssNumericValue)(e,i))&&(null==i||l(t,e,!0)!==(0,s.normalizeCssValue)(e,i))&&(t.style[e]=i)};if((0,n.isPlainObject)(e)){let i=Object.keys(e);for(let n=0;n<i.length;n+=1)o(t,(0,r.camelCase)(i[n]),e[i[n]])}else o(t,(0,r.camelCase)(e),i);return""}let u=(0,a.kebabCase)(e),h=t.ownerDocument||document,d=!!h&&(h.defaultView||h.parentWindow),p=t.style[e],f="";return void 0!==p&&""!==p?f=p:d&&!c&&(f=d.getComputedStyle(t).getPropertyValue(u)),s.NUMBER_FIELDS_REG.test(e)&&/^[-+]?[0-9.]+px$/.test(f.toString())&&(f=parseInt(f.toString(),10)),(0,s.normalizeCssValue)(e,f)}let c=t=>{"block"===l(t,"display")&&l(t,"display","");let{style:e}=t;"auto"===e.marginLeft&&"auto"===e.marginRight&&(e.marginLeft="",e.marginRight="")}},77213:function(t,e,i){"use strict";i.d(e,{ctrlKey:function(){return o}});let o=t=>{if("u">typeof navigator&&-1!==navigator.userAgent.indexOf("Mac OS X")){if(t.metaKey&&!t.altKey)return!0}else if(t.ctrlKey&&!t.altKey)return!0;return!1}},36400:function(t,e,i){"use strict";i.d(e,{dataBind:function(){return s}});var o=i(31534);let n=new WeakMap,s=(t,e,i)=>{let s=n.get(t);if(!s){s={},n.set(t,s);let e=null;(0,o.isViewObject)(t.j)&&(e=t.j.e),(0,o.isViewObject)(t)&&(e=t.e),e&&e.on("beforeDestruct",()=>{n.delete(t)})}return void 0===i?s[e]:(s[e]=i,i)}},97228:function(t,e,i){"use strict";i.d(e,{defaultLanguage:function(){return s}});var o=i(81937),n=i(85932);let s=(t,e="en")=>"auto"!==t&&(0,n.isString)(t)?t:o.globalDocument.documentElement&&o.globalDocument.documentElement.lang?o.globalDocument.documentElement.lang:navigator.language?navigator.language.substring(0,2):e},38027:function(t,e,i){"use strict";i.d(e,{connection:function(){return s},error:function(){return n},options:function(){return r}});var o=i(29953);function n(t){return TypeError(t)}function s(t){return new o.ConnectionError(t)}function r(t){return new o.OptionsError(t)}},14228:function(t,e,i){"use strict";function o(t="Aborted"){return new DOMException(t,"AbortError")}i.d(e,{abort:function(){return o}})},58250:function(t,e,i){"use strict";i.d(e,{ConnectionError:function(){return o}});class o extends Error{constructor(t){super(t),Object.setPrototypeOf(this,o.prototype)}}},29953:function(t,e,i){"use strict";i.d(e,{ConnectionError:function(){return n.ConnectionError},OptionsError:function(){return s.OptionsError},abort:function(){return o.abort}});var o=i(14228),n=i(58250),s=i(11080)},11080:function(t,e,i){"use strict";i.d(e,{OptionsError:function(){return o}});class o extends TypeError{constructor(t){super(t),Object.setPrototypeOf(this,o.prototype)}}},33201:function(t,e,i){"use strict";i.d(e,{ConnectionError:function(){return n.ConnectionError},OptionsError:function(){return n.OptionsError},abort:function(){return n.abort},connection:function(){return o.connection},error:function(){return o.error},options:function(){return o.options}});var o=i(38027),n=i(29953)},54794:function(t,e,i){"use strict";i.d(e,{fastClone:function(){return r},isAtom:function(){return n},markAsAtomic:function(){return s}});var o=i(3347);function n(t){return t&&t.isAtom}function s(t){return Object.defineProperty(t,"isAtom",{enumerable:!1,value:!0,configurable:!1}),t}function r(t){return JSON.parse((0,o.stringify)(t))}},421:function(t,e,i){"use strict";i.d(e,{getClassName:function(){return s},keepNames:function(){return n}});var o=i(91565);let n=new Map,s=t=>{if((0,o.isFunction)(t.className))return t.className();let e=t.constructor?.originalConstructor||t.constructor;if(n.has(e))return n.get(e);if(e.name)return e.name;let i=new RegExp(/^\s*function\s*(\S*)\s*\(/),s=e.toString().match(i);return s?s[1]:""}},89308:function(t,e,i){"use strict";i.d(e,{get:function(){return s}});var o=i(85932),n=i(18303);function s(t,e){if(!(0,o.isString)(t)||!t.length)return null;let i=t.split("."),s=e;try{for(let t of i){if((0,n.isVoid)(s[t]))return null;s=s[t]}}catch{return null}return(0,n.isVoid)(s)?null:s}},37427:function(t,e,i){"use strict";i.d(e,{humanSizeToBytes:function(){return o}});let o=t=>{if(/^[0-9.]+$/.test(t.toString()))return parseFloat(t);let e=t.substr(-2,2).toUpperCase(),i=["KB","MB","GB","TB"],o=parseFloat(t.substr(0,t.length-2));return -1!==i.indexOf(e)?o*Math.pow(1024,i.indexOf(e)+1):parseInt(t,10)}},93640:function(t,e,i){"use strict";i.r(e),i.d(e,{$$:function(){return D.$$},ConfigDeepFlatten:function(){return d.ConfigDeepFlatten},ConfigFlatten:function(){return d.ConfigFlatten},ConfigProto:function(){return d.ConfigProto},ConnectionError:function(){return v.ConnectionError},LimitedStack:function(){return j.LimitedStack},OptionsError:function(){return v.OptionsError},abort:function(){return v.abort},alignElement:function(){return o.alignElement},alreadyLoadedList:function(){return n.alreadyLoadedList},appendScriptAsync:function(){return n.appendScriptAsync},appendStyleAsync:function(){return n.appendStyleAsync},attr:function(){return l.attr},browser:function(){return c.browser},buildQuery:function(){return u.buildQuery},call:function(){return L.call},callPromise:function(){return L.callPromise},callThis:function(){return L.callThis},clearAlign:function(){return o.clearAlign},clearCenterAlign:function(){return f.clearCenterAlign},cns:function(){return C.cns},completeUrl:function(){return h.completeUrl},connection:function(){return v.connection},convertMediaUrlToVideoEmbed:function(){return p.convertMediaUrlToVideoEmbed},css:function(){return f.css},cssPath:function(){return D.cssPath},ctrlKey:function(){return m.ctrlKey},dataBind:function(){return g.dataBind},defaultLanguage:function(){return _.defaultLanguage},error:function(){return v.error},fastClone:function(){return b.fastClone},get:function(){return y.get},getClassName:function(){return w.getClassName},getDataTransfer:function(){return L.getDataTransfer},getPropertyDescriptor:function(){return L.getPropertyDescriptor},getXPathByElement:function(){return D.getXPathByElement},hAlignElement:function(){return o.hAlignElement},humanSizeToBytes:function(){return S.humanSizeToBytes},inView:function(){return x.inView},isAtom:function(){return b.isAtom},keepNames:function(){return w.keepNames},keys:function(){return L.keys},loadImage:function(){return L.loadImage},loadNext:function(){return n.loadNext},loadNextStyle:function(){return n.loadNextStyle},markAsAtomic:function(){return b.markAsAtomic},markDeprecated:function(){return C.markDeprecated},markOwner:function(){return L.markOwner},memorizeExec:function(){return L.memorizeExec},options:function(){return v.options},parseQuery:function(){return E.parseQuery},previewBox:function(){return I.previewBox},refs:function(){return D.refs},reset:function(){return T.reset},resolveElement:function(){return D.resolveElement},scrollIntoViewIfNeeded:function(){return x.scrollIntoViewIfNeeded},set:function(){return k.set}});var o=i(16849),n=i(47760),s=i(28712),r={};for(var a in s)0>["default","alignElement","clearAlign","hAlignElement","alreadyLoadedList","appendScriptAsync","appendStyleAsync","loadNext","loadNextStyle"].indexOf(a)&&(r[a]=(function(t){return s[t]}).bind(0,a));i.d(e,r);var l=i(7909),c=i(26136),u=i(36833),h=i(91321),d=i(77483),p=i(3856),f=i(80991),m=i(77213),g=i(36400),_=i(97228),v=i(33201),b=i(54794),y=i(89308),w=i(421),S=i(37427),C=i(49385),E=i(36310),I=i(57075),T=i(43379),x=i(60898),D=i(28723),k=i(52144),j=i(42820),L=i(71125)},49385:function(t,e,i){"use strict";i.d(e,{cns:function(){return o},markDeprecated:function(){return n}});let o=console;function n(t,e=[""],i=null){return(...n)=>(o.warn(`Method "${e[0]}" deprecated.`+(e[1]?` Use "${e[1]}" instead`:"")),t.call(i,...n))}},36310:function(t,e,i){"use strict";i.d(e,{parseQuery:function(){return o}});let o=t=>{let e={},i=t.substring(1).split("&");for(let t=0;t<i.length;t+=1){let o=i[t].split("=");e[decodeURIComponent(o[0])]=decodeURIComponent(o[1]||"")}return e}},57075:function(t,e,i){"use strict";i.d(e,{previewBox:function(){return l}});var o=i(23211),n=i(85932),s=i(7909),r=i(80991),a=i(28723);function l(t,e,i="px",c=null){let u=[],h=function(t,e){let i=[];try{(0,a.$$)("img",t.editor).forEach(n=>{let r=[(0,s.attr)(n,"width"),(0,s.attr)(n,"height"),n.src];(0,s.attr)(n,{width:n.offsetWidth+e,height:n.offsetHeight+e});let a=t.createInside.a();t.ed.body.appendChild(a),a.href=n.src,n.src=a.href,o.Dom.safeRemove(a),i.push(()=>{n.src=r[2]??"",(0,s.attr)(n,{width:r[0]||null,height:r[1]||null})})})}catch(t){throw i.forEach(t=>t()),i.length=0,t}return i}(t,i);try{let a=t.e.fire("beforePreviewBox",e,i);if(null!=a)return a;let l=t.c.div("jodit__preview-box jodit-context");c&&c.appendChild(l),(0,r.css)(l,{position:"relative",padding:16});let h=t.value||`<div style='position: absolute;left:50%;top:50%;transform: translateX(-50%) translateY(-50%);color:#ccc;'>${t.i18n("Empty")}</div>`;if(t.iframe){let e=t.create.element("iframe");(0,r.css)(e,{minWidth:800,minHeight:600,border:0}),l.appendChild(e);let i=e.contentWindow;if(i&&(t.e.fire("generateDocumentStructure.iframe",i.document,t),l=i.document.body,"function"==typeof ResizeObserver)){let o=!1,n=i.document.body,s=new ResizeObserver(t.async.debounce(()=>{s.unobserve(n),e.style.height=`${n.offsetHeight+20}px`,t.async.requestAnimationFrame(()=>{o||s.observe(n)})},100)),r=()=>{o=!0,s.unobserve(n),s.disconnect(),t.e.off("beforeDestruct",r)};u.push(r),t.e.on("beforeDestruct",r)}}else(0,r.css)(l,{minWidth:1024,minHeight:600,border:0});let d=(e,i)=>{let r=(0,n.isString)(i)?t.c.div():i;(0,n.isString)(i)&&(r.innerHTML=i);for(let t=0;t<r.childNodes.length;t+=1){let i=r.childNodes[t];if(o.Dom.isElement(i)){let t=e.ownerDocument.createElement(i.nodeName);for(let e=0;e<i.attributes.length;e+=1)(0,s.attr)(t,i.attributes[e].nodeName,i.attributes[e].nodeValue);0===i.childNodes.length||o.Dom.isTag(i,"table")?"SCRIPT"===i.nodeName?i.textContent&&(t.textContent=i.textContent):i.innerHTML&&(t.innerHTML=i.innerHTML):d(t,i);try{e.appendChild(t)}catch{}}else try{e.appendChild(i.cloneNode(!0))}catch{}}};return d(l,h),t.e.fire("afterPreviewBox",l),[l,()=>{u.forEach(t=>t())}]}finally{h.forEach(t=>t())}}},43379:function(t,e,i){"use strict";i.d(e,{reset:function(){return a}});var o=i(81937),n=i(91565),s=i(89308);let r={};function a(t){if(!(t in r)){let e=o.globalDocument.createElement("iframe");try{if(e.src="about:blank",o.globalDocument.body.appendChild(e),!e.contentWindow)return null;let i=(0,s.get)(t,e.contentWindow),a=(0,s.get)(t.split(".").slice(0,-1).join("."),e.contentWindow);(0,n.isFunction)(i)&&(r[t]=i.bind(a))}catch(t){if(!o.IS_PROD)throw t}finally{e.parentNode?.removeChild(e)}}return r[t]??null}},60898:function(t,e,i){"use strict";i.d(e,{inView:function(){return n},scrollIntoViewIfNeeded:function(){return s}});var o=i(23211);function n(t,e,i){let o=t.getBoundingClientRect(),n=t,s=o.top,r=o.height;for(;n&&n!==e&&n.parentNode;)if(!(s<=(o=(n=n.parentNode).getBoundingClientRect()).bottom)||s+r<=o.top)return!1;return s<=(i.documentElement&&i.documentElement.clientHeight||0)}function s(t,e,i){o.Dom.isHTMLElement(t)&&!n(t,e,i)&&(e.clientHeight!==e.scrollHeight&&(e.scrollTop=t.offsetTop),n(t,e,i)||t.scrollIntoView())}},28723:function(t,e,i){"use strict";i.d(e,{$$:function(){return h},cssPath:function(){return f},getXPathByElement:function(){return d},refs:function(){return p},resolveElement:function(){return m}});var o=i(81937),n=i(23211),s=i(88475),r=i(85932),a=i(57821),l=i(7909),c=i(33201);let u=1;function h(t,e){let i;if(!o.IS_ES_NEXT&&/:scope/.test(t)&&o.IS_IE&&!(e&&e.nodeType===Node.DOCUMENT_NODE)){let o=e.id,n=o||"_selector_id_"+(Math.random()+"").slice(2)+ ++u;t=t.replace(/:scope/g,"#"+n),o||e.setAttribute("id",n),i=e.parentNode.querySelectorAll(t),o||e.removeAttribute("id")}else i=e.querySelectorAll(t);return[].slice.call(i)}let d=(t,e)=>{if(!t||t.nodeType!==Node.ELEMENT_NODE||!t.parentNode||e===t)return"";if(t.id)return"//*[@id='"+t.id+"']";let i=[].filter.call(t.parentNode.childNodes,e=>e.nodeName===t.nodeName);return d(t.parentNode,e)+"/"+t.nodeName.toLowerCase()+(i.length>1?"["+((0,s.toArray)(i).indexOf(t)+1)+"]":"")},p=t=>("container"in t&&(t=t.container),h("[ref],[data-ref]",t).reduce((t,e)=>{let i=(0,l.attr)(e,"-ref");return i&&(0,r.isString)(i)&&(t[(0,a.camelCase)(i)]=e,t[i]=e),t},{})),f=t=>{if(!n.Dom.isElement(t))return null;let e=[],i=t;for(;i&&i.nodeType===Node.ELEMENT_NODE;){let t=i.nodeName.toLowerCase();if(i.id){t+="#"+i.id,e.unshift(t);break}{let e=i,o=1;do(e=e.previousElementSibling)&&e.nodeName.toLowerCase()===t&&o++;while(e)t+=":nth-of-type("+o+")"}e.unshift(t),i=i.parentNode}return e.join(" > ")};function m(t,e){let i=t;if((0,r.isString)(t))try{i=e.querySelector(t)}catch{throw(0,c.error)('String "'+t+'" should be valid HTML selector')}if(!i||"object"!=typeof i||!n.Dom.isElement(i)||!i.cloneNode)throw(0,c.error)('Element "'+t+'" should be string or HTMLElement instance');return i}},52144:function(t,e,i){"use strict";i.d(e,{set:function(){return a}});var o=i(17312),n=i(70222),s=i(62101),r=i(85932);function a(t,e,i){if(!(0,r.isString)(t)||!t.length)return;let a=t.split("."),l=i,c=a[0];for(let t=0;t<a.length-1;t+=1)c=a[t],(0,o.isArray)(l[c])||(0,s.isPlainObject)(l[c])||(l[c]=(0,n.isNumeric)(a[t+1])?[]:{}),l=l[c];l&&(l[a[a.length-1]]=e)}},42820:function(t,e,i){"use strict";i.d(e,{LimitedStack:function(){return n}});var o=i(25045);class n{push(t){return this.stack.push(t),this.stack.length>this.limit&&this.stack.shift(),this}pop(){return this.stack.pop()}find(t){return this.stack.find(t)}constructor(t){(0,o._)(this,"limit",void 0),(0,o._)(this,"stack",void 0),this.limit=t,this.stack=[]}}},71125:function(t,e,i){"use strict";i.d(e,{call:function(){return a},callPromise:function(){return u},callThis:function(){return l},getDataTransfer:function(){return f},getPropertyDescriptor:function(){return m},keys:function(){return d},loadImage:function(){return h},markOwner:function(){return c},memorizeExec:function(){return p}});var o=i(52100),n=i(18303),s=i(7909),r=i(36400);function a(t,...e){return t(...e)}function l(t,e,...i){return t.apply(e,i)}function c(t,e){(0,s.attr)(e,"data-editor_id",t.id),e.component||Object.defineProperty(e,"jodit",{value:t})}function u(t,e){return(0,o.isPromise)(t)?t.then(t=>t,()=>null).finally(e):e?.()}let h=(t,e)=>e.async.promise((i,o)=>{let n=new Image,s=()=>{e.e.off(n),o?.()},r=()=>{e.e.off(n),i(n)};e.e.one(n,"load",r).one(n,"error",s).one(n,"abort",s),n.src=t,n.complete&&r()}),d=(t,e=!0)=>{if(e)return Object.keys(t);let i=[];for(let e in t)i.push(e);return i},p=(t,e,{control:i},o)=>{let s="button"+i.command,a=(i.args&&i.args[0])??(0,r.dataBind)(t,s);if((0,n.isVoid)(a))return!1;(0,r.dataBind)(t,s,a),o&&(a=o(a)),t.execCommand(i.command,!1,a??void 0)},f=t=>{if(t.clipboardData)return t.clipboardData;try{return t.dataTransfer||new DataTransfer}catch{return null}};function m(t,e){let i;do i=Object.getOwnPropertyDescriptor(t,e),t=Object.getPrototypeOf(t);while(!i&&t)return i}},55810:function(t,e,i){"use strict";i.d(e,{init:function(){return r}});var o=i(81937),n=i(52433),s=i(3050);function r(t,e,i,r,a,l,c){if((0,n.isInitable)(r))try{r.init(t)}catch(t){if(!o.IS_PROD)throw t}a.set(e,r),l.delete(e),r.hasStyle&&(0,s.loadStyle)(t,e).catch(t=>{o.IS_PROD}),r.styles&&(c(t,e,"style").innerHTML=r.styles)}},3050:function(t,e,i){"use strict";i.d(e,{loadExtras:function(){return u},loadStyle:function(){return l}});var o=i(81937),n=i(74264),s=i(47760),r=i(86189);let a=new Set;async function l(t,e){let i=c(t,e,!1);if(!a.has(i))return a.add(i),(0,s.appendStyleAsync)(t,i)}function c(t,e,i){e=(0,n.kebabCase)(e);let o=t.minified?".min":"";return t.basePath+"plugins/"+e+"/"+e+o+"."+(i?"js":"css")}function u(t,e,i,n){try{let o=i.filter(e=>!t.has((0,r.normalizeName)(e.name)));o.length&&o.map(t=>{let i=t.url||c(e,t.name,!0);return(0,s.appendScriptAsync)(e,i).then(n).catch(()=>null)})}catch(t){if(!o.IS_PROD)throw t}}},25974:function(t,e,i){"use strict";i.d(e,{makeInstance:function(){return s}});var o=i(81937),n=i(91565);function s(t,e){try{try{return(0,n.isFunction)(e)?new e(t):e}catch(i){if((0,n.isFunction)(e)&&!e.prototype)return e(t)}}catch(t){if(!o.IS_PROD)throw t}return null}},86189:function(t,e,i){"use strict";i.d(e,{normalizeName:function(){return n}});var o=i(74264);function n(t){return(0,o.kebabCase)(t).toLowerCase()}},91206:function(t,e,i){"use strict";i.d(e,{Plugin:function(){return o.Plugin}});var o=i(18855);i(85305)},85305:function(t,e,i){"use strict";i.d(e,{PluginSystem:function(){return f}});var o=i(25045),n=i(81937),s=i(42689),r=i(32328),a=i(17312),l=i(52433),c=i(85932),u=i(55810),h=i(3050),d=i(25974),p=i(86189);class f{get size(){return this.__items.size}add(t,e){this.__items.set((0,p.normalizeName)(t),e),s.eventEmitter.fire(`plugin:${t}:ready`)}get(t){return this.__items.get((0,p.normalizeName)(t))}remove(t){this.__items.delete((0,p.normalizeName)(t))}__getFullPluginsList(t){let e=[];return this.__items.forEach((i,o)=>{(!t||t.has(o))&&e.push([o,i])}),e}__init(t){let{extraList:e,disableList:i,filter:o}={extraList:t.o.extraPlugins.map(t=>(0,c.isString)(t)?{name:t}:t),disableList:new Set((0,r.splitArray)(t.o.disablePlugins).map(p.normalizeName)),filter:t.o.safeMode?new Set(t.o.safePluginsList):null},s=new Map,f={},m=new Set;t.__plugins=f;let g=()=>{if(t.isInDestruct)return;let e=!1;this.__getFullPluginsList(o).forEach(([o,n])=>{if(i.has(o)||s.has(o))return;let r=n?.requires;if(r&&(0,a.isArray)(r)&&r.length){if(r.some(t=>i.has(t)))return;if(!r.every(t=>s.has(t)))return void m.add(o)}e=!0;let l=(0,d.makeInstance)(t,n);if(!l){s.set(o,null),m.delete(o);return}(0,u.init)(t,o,n,l,s,m,this.opts.getContainer),f[o]=l}),e&&(t.e.fire("updatePlugins"),g())};e&&e.length&&(0,h.loadExtras)(this.__items,t,e,g),g(),t.e.on("beforeDestruct",()=>{Object.keys(f).forEach(e=>{let i=f[e];(0,l.isDestructable)(i)&&i.destruct(t),delete f[e]}),delete t.__plugins}),n.IS_PROD||m.size}wait(t){return new Promise(e=>{if(this.get(t))return e();let i=()=>{e(),s.eventEmitter.off(`plugin:${t}:ready`,i)};s.eventEmitter.on(`plugin:${t}:ready`,i)})}constructor(t){(0,o._)(this,"opts",void 0),(0,o._)(this,"__items",void 0),this.opts=t,this.__items=new Map}}},18855:function(t,e,i){"use strict";i.d(e,{Plugin:function(){return l}});var o=i(25045),n=i(31635),s=i(16964),r=i(84839),a=i(24497);class l extends s.ViewComponent{className(){return"Plugin"}__afterPluginSystemInit(){let{j:t,buttons:e}=this;e&&(0,a.isJoditObject)(t)&&e.forEach(e=>{t.registerButton(e)})}__afterInit(){this.__inited=!0,this.setStatus(s.STATUSES.ready),this.afterInit(this.jodit)}init(t){this.jodit.isReady&&(this.afterInit(this.jodit),this.__afterPluginSystemInit(),this.jodit.e.fire("rebuildToolbar"))}__beforeDestruct(){if(this.isInDestruct)return;let{j:t}=this;if(t.e.off("afterPluginSystemInit",this.__afterPluginSystemInit).off("afterInit",this.__afterInit).off("beforeDestruct",this.destruct),this.setStatus(s.STATUSES.beforeDestruct),!this.__inited)return super.destruct();(0,a.isJoditObject)(t)&&this.buttons?.forEach(e=>{t?.unregisterButton(e)}),this.beforeDestruct(this.j),super.destruct()}constructor(t){super(t),(0,o._)(this,"buttons",[]),(0,o._)(this,"hasStyle",!1),(0,o._)(this,"styles",void 0),(0,o._)(this,"__inited",!1),t.e.on("afterPluginSystemInit",this.__afterPluginSystemInit).on("afterInit",this.__afterInit).on("beforeDestruct",this.__beforeDestruct)}}(0,o._)(l,"requires",[]),(0,n.__decorate)([r.autobind],l.prototype,"__afterPluginSystemInit",null),(0,n.__decorate)([r.autobind],l.prototype,"__afterInit",null),(0,n.__decorate)([r.autobind],l.prototype,"__beforeDestruct",null)},17338:function(t,e,i){"use strict";i.d(e,{Ajax:function(){return d}});var o=i(25045),n=i(31635),s=i(91231),r=i(81937),a=i(49574),l=i(65946),c=i(33201),u=i(5266);i(37102);var h=i(32855);class d{className(){return"Ajax"}__buildParams(t,e){return(0,l.isPlainObject)(t)&&this.options.contentType&&this.options.contentType.includes("application/json")?JSON.stringify(t):(0,l.isFunction)(this.o.queryBuild)?this.o.queryBuild.call(this,t,e):(0,l.isString)(t)||t instanceof r.globalWindow.FormData||"object"==typeof t&&null!=t&&(0,l.isFunction)(t.append)?t:(0,l.buildQuery)(t)}get o(){return this.options}abort(){if(this.__isFulfilled)return this;try{this.__isFulfilled=!0,this.xhr.abort()}catch{}return this}send(){this.__activated=!0;let{xhr:t,o:e}=this,i=this.prepareRequest();return this.__async.promise(async(o,n)=>{let s=()=>{this.__isFulfilled=!0,n(c.connection("Connection error"))},r=()=>{this.__isFulfilled=!0,o(new h.Response(i,t.status,t.statusText,!t.responseType?t.responseText:t.response))};t.onload=r,t.onabort=()=>{this.__isFulfilled=!0,n(c.abort("Abort connection"))},t.onerror=s,t.ontimeout=s,e.responseType&&(t.responseType=e.responseType),t.onprogress=t=>{let e=0;t.lengthComputable&&(e=t.loaded/t.total*100),this.options.onProgress?.(e)},t.onreadystatechange=()=>{this.options.onProgress?.(10),t.readyState===XMLHttpRequest.DONE&&(e.successStatuses.includes(t.status)?r():t.statusText&&(this.__isFulfilled=!0,n(c.connection(t.statusText))))},t.withCredentials=e.withCredentials??!1;let{url:a,data:u,method:d}=i;t.open(d,a,!0),e.contentType&&t.setRequestHeader&&t.setRequestHeader("Content-type",e.contentType);let{headers:p}=e;(0,l.isFunction)(p)&&(p=await p.call(this)),p&&t.setRequestHeader&&Object.keys(p).forEach(e=>{t.setRequestHeader(e,p[e])}),this.__async.setTimeout(()=>{t.send(u?this.__buildParams(u):void 0)},0)})}prepareRequest(){if(!this.o.url)throw c.error("Need URL for AJAX request");let t=this.o.url,e=this.o.data,i=(this.o.method||"get").toLowerCase();if("get"===i&&e&&(0,l.isPlainObject)(e)){let i=t.indexOf("?");if(-1!==i){let o=(0,l.parseQuery)(t);t=t.substring(0,i)+"?"+(0,l.buildQuery)({...o,...e})}else t+="?"+(0,l.buildQuery)(this.o.data)}let o={url:t,method:i,data:e};return d.log.splice(100),d.log.push(o),o}destruct(){this.__isDestructed||(this.__isDestructed=!0,this.__activated&&!this.__isFulfilled&&(this.abort(),this.__isFulfilled=!0),this.__async.destruct())}constructor(t,e=u.Config.prototype.defaultAjaxOptions){(0,o._)(this,"__async",new s.Async),(0,o._)(this,"xhr",void 0),(0,o._)(this,"options",void 0),(0,o._)(this,"__isFulfilled",!1),(0,o._)(this,"__activated",!1),(0,o._)(this,"__isDestructed",!1),this.options=(0,l.ConfigProto)(t||{},e),this.xhr=this.o.xhr?this.o.xhr():new XMLHttpRequest}}(0,o._)(d,"log",[]),(0,n.__decorate)([a.autobind],d.prototype,"destruct",null)},37102:function(t,e,i){"use strict";i(5266).Config.prototype.defaultAjaxOptions={successStatuses:[200,201,202],method:"GET",url:"",data:null,contentType:"application/x-www-form-urlencoded; charset=UTF-8",headers:{"X-REQUESTED-WITH":"XMLHttpRequest"},withCredentials:!1,xhr:()=>new XMLHttpRequest}},73714:function(t,e,i){"use strict";i.d(e,{Ajax:function(){return o.Ajax},Response:function(){return n.Response}});var o=i(17338),n=i(32855)},32855:function(t,e,i){"use strict";i.d(e,{Response:function(){return n}});var o=i(25045);class n{get url(){return this.request.url}async json(){return JSON.parse(this.body)}text(){return Promise.resolve(this.body)}async blob(){return this.body}constructor(t,e,i,n){(0,o._)(this,"status",void 0),(0,o._)(this,"statusText",void 0),(0,o._)(this,"request",void 0),(0,o._)(this,"body",void 0),this.request=t,this.status=e,this.statusText=i,this.body=n}}},42259:function(t,e,i){"use strict";i.d(e,{cursorInTheEdgeOfString:function(){return r},findCorrectCurrentNode:function(){return a},moveNodeInsideStart:function(){return s.moveNodeInsideStart}});var o=i(81937),n=i(23211),s=i(89817);function r(t,e,i,n){let s=t.nodeValue?.length?t.nodeValue:"";if(n&&s.replace((0,o.INVISIBLE_SPACE_REG_EXP_END)(),"").length>e)return!0;let r=(0,o.INVISIBLE_SPACE_REG_EXP_START)().exec(s);return i&&(r&&r[0].length<e||!r&&e>0)}function a(t,e,i,o,s,r){if((t=e.startContainer.childNodes[e.startOffset])||(t=e.startContainer.childNodes[e.startOffset-1],i=!0),t&&o&&!n.Dom.isText(t)){if(!i&&n.Dom.isText(t.previousSibling))t=t.previousSibling;else if(s){let e=r(t);for(;e;){if(e&&n.Dom.isText(e)){t=e;break}e=r(e)}}}if(t&&!o&&!n.Dom.isText(t)){let e=t,i=t;do e=e.firstChild,i=i.lastChild;while(e&&i&&!n.Dom.isText(e))e===i&&e&&n.Dom.isText(e)&&(t=e)}return{node:t,rightMode:i}}i(7470)},89817:function(t,e,i){"use strict";i.d(e,{moveNodeInsideStart:function(){return s}});var o=i(81937),n=i(23211);function s(t,e,i){let s=n.Dom.findSibling(e,i),r=n.Dom.findSibling(e,!i);for(;n.Dom.isElement(s)&&!n.Dom.isTag(s,o.INSEPARABLE_TAGS)&&n.Dom.isContentEditable(s,t.editor)&&(!r||!n.Dom.closest(e,n.Dom.isElement,t.editor));)i||!s.firstChild?s.appendChild(e):n.Dom.before(s.firstChild,e),s=n.Dom.sibling(e,i),r=n.Dom.sibling(e,!i)}},7470:function(t,e,i){"use strict";i.d(e,{moveTheNodeAlongTheEdgeOutward:function(){return n}});var o=i(23211);function n(t,e,i){let n=t;for(;n&&n!==i&&!(o.Dom.findSibling(n,e)||o.Dom.isBlock(n.parentElement));)(n=n.parentElement)&&n!==i&&(e?o.Dom.before(n,t):o.Dom.after(n,t))}},59841:function(t,e,i){"use strict";i.d(e,{CommitStyle:function(){return n.CommitStyle},Selection:function(){return o.Selection}});var o=i(98595),n=i(84578)},98595:function(t,e,i){"use strict";i.d(e,{Selection:function(){return f}});var o=i(25045),n=i(31635),s=i(81937),r=i(84839),a=i(23211),l=i(65946),c=i(28686),u=i(28712),h=i(7470),d=i(84578),p=i(42259);class f{get j(){return this.jodit}errorNode(t){if(!a.Dom.isNode(t))throw(0,l.error)("Parameter node must be instance of Node")}get area(){return this.j.editor}get win(){return this.j.ew}get doc(){return this.j.ed}get sel(){return this.j.o.shadowRoot&&(0,c.isFunction)(this.j.o.shadowRoot.getSelection)?this.j.o.shadowRoot.getSelection():this.win.getSelection()}get range(){let t=this.sel;return t&&t.rangeCount?t.getRangeAt(0):this.createRange()}get isInsideArea(){let{sel:t}=this,e=t?.rangeCount?t.getRangeAt(0):null;return!(!e||!a.Dom.isOrContains(this.area,e.startContainer))}createRange(t=!1){let e=this.doc.createRange();return t&&this.selectRange(e),e}remove(){let t=this.sel,e=this.current();if(t&&e)for(let e=0;e<t.rangeCount;e+=1)t.getRangeAt(e).deleteContents(),t.getRangeAt(e).collapse(!0)}clear(){this.sel?.rangeCount&&this.sel?.removeAllRanges()}removeNode(t){if(!a.Dom.isOrContains(this.j.editor,t,!0))throw(0,l.error)("Selection.removeNode can remove only editor's children");a.Dom.safeRemove(t),this.j.e.fire("afterRemoveNode",t)}insertCursorAtPoint(t,e){this.removeMarkers();try{let i=this.createRange();return(()=>{if(this.doc.caretPositionFromPoint){let o=this.doc.caretPositionFromPoint(t,e);if(o)return i.setStart(o.offsetNode,o.offset)}if(this.doc.caretRangeFromPoint){let o=this.doc.caretRangeFromPoint(t,e);(0,u.assert)(o,"Incorrect caretRangeFromPoint behaviour"),i.setStart(o.startContainer,o.startOffset)}})(),i.collapse(!0),this.selectRange(i),!0}catch{}return!1}get hasMarkers(){return!!this.markers.length}get markers(){return(0,l.$$)("span[data-"+s.MARKER_CLASS+"]",this.area)}removeMarkers(){a.Dom.safeRemove.apply(null,this.markers)}marker(t=!1,e){let i=null;e&&(i=e.cloneRange()).collapse(t);let o=this.j.createInside.span();return o.id=s.MARKER_CLASS+"_"+Number(new Date)+"_"+(Math.random()+"").slice(2),o.style.lineHeight="0",o.style.display="none",a.Dom.markTemporary(o),(0,l.attr)(o,"data-"+s.MARKER_CLASS,t?"start":"end"),o.appendChild(this.j.createInside.text(s.INVISIBLE_SPACE)),i&&a.Dom.isOrContains(this.area,t?i.startContainer:i.endContainer)&&i.insertNode(o),o}restore(){let t=!1,e=t=>`span[data-${s.MARKER_CLASS}=${t?"start":"end"}]`,i=this.area.querySelector(e(!0)),o=this.area.querySelector(e(!1));if(i){if(t=this.createRange(),o)t.setStartAfter(i),a.Dom.safeRemove(i),t.setEndBefore(o),a.Dom.safeRemove(o);else{let e=i.previousSibling;a.Dom.isText(e)?t.setStart(e,e.nodeValue?e.nodeValue.length:0):t.setStartBefore(i),a.Dom.safeRemove(i),t.collapse(!0)}t&&this.selectRange(t)}}fakes(){let t=this.sel;if(!t||!t.rangeCount)return[];let e=t.getRangeAt(0);(0,u.assert)(e,"Range is null");let i=e.cloneRange();i.collapse(!0);let o=this.j.createInside.fake();a.Dom.safeInsertNode(i,o),e.setStartBefore(o);let n=[o];if(!e.collapsed){let t=e.cloneRange();t.collapse(!1);let i=this.j.createInside.fake();a.Dom.safeInsertNode(t,i),e.setEndAfter(i),n.push(i)}return this.selectRange(e),n}restoreFakes(t){let e=t.filter(t=>t.isConnected);if(!e.length)return;let[i,o]=e,n=this.createRange();n.setStartAfter(i),o&&n.setEndBefore(o),this.selectRange(n),i.parentNode?.firstChild!==i.parentNode?.lastChild&&a.Dom.safeRemove(i),o?.parentNode?.firstChild!==o?.parentNode?.lastChild&&a.Dom.safeRemove(o)}save(t=!1){if(this.hasMarkers)return[];let e=this.sel;if(!e||!e.rangeCount)return[];let i=[],o=e.rangeCount,n=[];for(let t=0;o>t;t+=1)if(n[t]=e.getRangeAt(t),n[t].collapsed){let e=this.marker(!0,n[t]);i[t]={startId:e.id,collapsed:!0,startMarker:e.outerHTML}}else{let e=this.marker(!0,n[t]),o=this.marker(!1,n[t]);i[t]={startId:e.id,endId:o.id,collapsed:!1,startMarker:e.outerHTML,endMarker:o.outerHTML}}if(!t){e.removeAllRanges();for(let t=o-1;t>=0;--t){let o=this.doc.getElementById(i[t].startId);if(o){if(i[t].collapsed)n[t].setStartAfter(o),n[t].collapse(!0);else if(n[t].setStartBefore(o),i[t].endId){let e=this.doc.getElementById(i[t].endId);e&&n[t].setEndAfter(e)}try{e.addRange(n[t].cloneRange())}catch{}}}}return i}focus(t={preventScroll:!0}){if(!this.isFocused()){let e=(0,l.getScrollParent)(this.j.container),i=e?.scrollTop;this.j.iframe&&"complete"===this.doc.readyState&&this.j.iframe.focus(t),this.win.focus(),this.area.focus(t),i&&e?.scrollTo&&e.scrollTo(0,i);let o=this.sel,n=o?.rangeCount?o?.getRangeAt(0):null;if(!n||!a.Dom.isOrContains(this.area,n.startContainer)){let t=this.createRange();t.setStart(this.area,0),t.collapse(!0),this.selectRange(t,!1)}return this.j.editorIsActive||this.j?.events?.fire("focus"),!0}return!1}isCollapsed(){let t=this.sel;for(let e=0;t&&e<t.rangeCount;e+=1)if(!t.getRangeAt(e).collapsed)return!1;return!0}isFocused(){return this.doc.hasFocus&&this.doc.hasFocus()&&this.area===this.doc.activeElement}current(t=!0){if(this.j.getRealMode()!==s.MODE_WYSIWYG)return null;let e=this.sel;if(!e||0===e.rangeCount)return null;let i=e.getRangeAt(0),o=i.startContainer,n=!1;if(a.Dom.isTag(o,"br")&&e.isCollapsed)return o;if(!a.Dom.isText(o)){let s=(0,p.findCorrectCurrentNode)(o,i,n,e.isCollapsed,t,t=>n?t.lastChild:t.firstChild);o=s.node,n=s.rightMode}return o&&a.Dom.isOrContains(this.area,o)?o:null}insertNode(t,e=!0,i=!0){this.errorNode(t);let o=a.Dom.isFragment(t)?t.lastChild:t;this.j.e.fire("safeHTML",t),!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore());let n=this.sel;this.j.history.snapshot.transaction(()=>{if(this.isCollapsed()||this.j.execCommand("Delete"),this.j.e.fire("beforeInsertNode",t),n&&n.rangeCount){let e=n.getRangeAt(0),{firstChild:i}=t;a.Dom.isOrContains(this.area,e.commonAncestorContainer)?a.Dom.safeInsertNode(e,t):this.area.appendChild(t),[()=>i?.previousSibling,()=>i?.previousSibling,()=>i?.previousSibling?.lastChild].forEach(t=>{let e=t();e&&a.Dom.isEmptyTextNode(e)&&a.Dom.safeRemove(e)})}else this.area.appendChild(t);let i=t=>{if(a.Dom.isBlock(t)){let e=t.lastChild;if(e)return i(e)}this.setCursorAfter(t)};e&&(a.Dom.isFragment(t)?o&&i(o):i(t)),this.j.o.scrollToPastedContent&&(0,l.scrollIntoViewIfNeeded)(o??t,this.j.editor,this.doc)}),i&&this.j.events&&this.j.__imdSynchronizeValues(),this.j.events&&this.j.e.fire("afterInsertNode",a.Dom.isFragment(t)?o:t)}insertHTML(t,e=!0){if(""===t)return;let i=this.j.createInside.div(),o=this.j.createInside.fragment();if(!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore()),a.Dom.isNode(t)?i.appendChild(t):i.innerHTML=t.toString(),(this.j.isEditorMode()||!1!==this.j.e.fire("insertHTML",i.innerHTML))&&i.lastChild){for(;i.firstChild;)i.firstChild,o.appendChild(i.firstChild);this.insertNode(o,e,!1),this.j.__imdSynchronizeValues()}}insertImage(t,e=null,i=null){let o=(0,c.isString)(t)?this.j.createInside.element("img"):t;if((0,c.isString)(t)&&o.setAttribute("src",t),null!=i){let t=i.toString();t&&"auto"!==t&&0>(t+"").indexOf("px")&&0>(t+"").indexOf("%")&&(t+="px"),(0,l.attr)(o,"width",t)}e&&"object"==typeof e&&(0,l.css)(o,e);let n=()=>{(o.naturalHeight<o.offsetHeight||o.naturalWidth<o.offsetWidth)&&(o.style.width="",o.style.height=""),o.removeEventListener("load",n)};this.j.e.on(o,"load",n),o.complete&&n(),this.insertNode(o),this.j.e.fire("afterInsertImage",o)}eachSelection(t){let e=this.sel;if(!e||!e.rangeCount)return;let i=e.getRangeAt(0),o=i.commonAncestorContainer;a.Dom.isHTMLElement(o)||(o=o.parentElement);let n=[],r=i.startOffset,u=o.childNodes.length,h=i.startContainer===this.area?o.childNodes[r<u?r:u-1]:i.startContainer,d=i.endContainer===this.area?o.childNodes[i.endOffset-1]:i.endContainer;a.Dom.isText(h)&&h===i.startContainer&&i.startOffset===h.nodeValue?.length&&h.nextSibling&&(h=h.nextSibling),a.Dom.isText(d)&&d===i.endContainer&&0===i.endOffset&&d.previousSibling&&(d=d.previousSibling);let p=t=>{!t||t===o||a.Dom.isEmptyTextNode(t)||(0,c.isMarker)(t)||n.push(t)};p(h),h!==d&&a.Dom.isOrContains(o,h,!0)&&a.Dom.find(h,t=>(p(t),t===d||t&&t.contains&&t.contains(d)),o,!0,!1);let f=e=>{if(a.Dom.isOrContains(this.j.editor,e,!0)){if(e.nodeName.match(/^(UL|OL)$/))return(0,l.toArray)(e.childNodes).forEach(f);if(a.Dom.isTag(e,"li"))if(e.firstChild)e=e.firstChild;else{let t=this.j.createInside.text(s.INVISIBLE_SPACE);e.appendChild(t),e=t}t(e)}};0===n.length&&(a.Dom.isEmptyTextNode(h)&&n.push(h),h.firstChild&&n.push(h.firstChild)),n.forEach(f)}cursorInTheEdge(t,e,i=null){let o=!t,n=this.sel?.getRangeAt(0);if(i??=this.current(!1),!n||!i||!a.Dom.isOrContains(e,i,!0))return null;let s=t?n.startContainer:n.endContainer,r=t?n.startOffset:n.endOffset,c=t=>!!(t&&!a.Dom.isTag(t,"br")&&!a.Dom.isEmptyTextNode(t)&&!a.Dom.isTemporary(t)&&!(a.Dom.isElement(t)&&!0===this.j.e.fire("isInvisibleForCursor",t)));if(a.Dom.isText(s)){if((0,p.cursorInTheEdgeOfString)(s,r,t,o))return!1}else{let t=(0,l.toArray)(s.childNodes);if(o){if(t.slice(r).some(c))return!1}else if(t.slice(0,r).some(c))return!1}let u=i;for(;u&&u!==e;){let e=a.Dom.sibling(u,t);if(!e){u=u.parentNode;continue}if((u=e)&&c(u))return!1}return!0}cursorOnTheLeft(t,e){return this.cursorInTheEdge(!0,t,e)}cursorOnTheRight(t,e){return this.cursorInTheEdge(!1,t,e)}setCursorAfter(t){return this.setCursorNearWith(t,!1)}setCursorBefore(t){return this.setCursorNearWith(t,!0)}setCursorNearWith(t,e){if(this.errorNode(t),!a.Dom.up(t,t=>t===this.area||t&&t.parentNode===this.area,this.area))throw(0,l.error)("Node element must be in editor");let i=this.createRange(),o=null;return a.Dom.isText(t)?e?i.setStart(t,0):i.setEnd(t,t.nodeValue?.length??0):(o=this.j.createInside.fake(),e?i.setStartBefore(t):i.setEndAfter(t),i.collapse(e),a.Dom.safeInsertNode(i,o),i.selectNode(o)),i.collapse(e),this.selectRange(i),o}setCursorIn(t,e=!1){if(this.errorNode(t),!a.Dom.up(t,t=>t===this.area||t&&t.parentNode===this.area,this.area))throw(0,l.error)("Node element must be in editor");let i=this.createRange(),o=t,n=t;do{if(a.Dom.isText(o)||a.Dom.isTag(o,s.INSEPARABLE_TAGS))break;n=o,o=e?o.firstChild:o.lastChild}while(o)if(!o){let t=this.j.createInside.text(s.INVISIBLE_SPACE);a.Dom.isTag(n,s.INSEPARABLE_TAGS)?o=n:(n.appendChild(t),n=t)}let r=o||n;return a.Dom.isTag(r,s.INSEPARABLE_TAGS)?e||a.Dom.isTag(r,"br")?i.setStartBefore(r):i.setEndAfter(r):i.selectNodeContents(r),i.collapse(e),this.selectRange(i),n}selectRange(t,e=!0){let i=this.sel;return e&&!this.isFocused()&&this.focus(),i&&(i.removeAllRanges(),i.addRange(t)),this.j.e.fire("changeSelection"),this}select(t,e=!1){if(this.errorNode(t),!a.Dom.up(t,t=>t===this.area||t&&t.parentNode===this.area,this.area))throw(0,l.error)("Node element must be in editor");let i=this.createRange();return i[e?"selectNodeContents":"selectNode"](t),this.selectRange(i)}get html(){let t=this.sel;if(t&&t.rangeCount>0){let e=t.getRangeAt(0).cloneContents(),i=this.j.createInside.div();return i.appendChild(e),i.innerHTML}return""}*wrapInTagGen(t){if(this.isCollapsed()){let e=this.jodit.createInside.element("font",s.INVISIBLE_SPACE);this.insertNode(e,!1,!1),t&&t[0]&&e.appendChild(t[0]),yield e,a.Dom.unwrap(e);return}for(let t of((0,l.$$)("*[style*=font-size]",this.area).forEach(t=>{(0,l.attr)(t,"data-font-size",t.style.fontSize.toString()),t.style.removeProperty("font-size")}),this.j.nativeExecCommand("fontsize",!1,"7"),(0,l.$$)("*[data-font-size]",this.area).forEach(t=>{let e=(0,l.attr)(t,"data-font-size");e&&(t.style.fontSize=e,(0,l.attr)(t,"data-font-size",null))}),(0,l.$$)('font[size="7"]',this.area))){let{firstChild:e,lastChild:i}=t;if(e&&e===i&&(0,c.isMarker)(e)){a.Dom.unwrap(t);continue}e&&(0,c.isMarker)(e)&&a.Dom.before(t,e),i&&(0,c.isMarker)(i)&&a.Dom.after(t,i),yield t,a.Dom.unwrap(t)}}wrapInTag(t){let e=[];for(let i of this.wrapInTagGen())try{if(i.firstChild&&i.firstChild===i.lastChild&&(0,c.isMarker)(i.firstChild))continue;(0,c.isFunction)(t)?t(i):e.push(a.Dom.replace(i,t,this.j.createInside))}finally{let t=i.parentNode;t&&(a.Dom.unwrap(i),a.Dom.isEmpty(t)&&a.Dom.unwrap(t))}return e}commitStyle(t){(0,u.assert)((0,l.size)(t)>0,"Need to pass at least one option"),new d.CommitStyle(t).apply(this.j)}splitSelection(t,e){if(!this.isCollapsed())return null;let i=this.createRange(),o=this.range;i.setStartBefore(t);let n=this.cursorOnTheRight(t,e),r=this.cursorOnTheLeft(t,e),l=this.j.createInside.element("br"),c=this.j.createInside.fake(),h=c.cloneNode();try{if(n||r){e?a.Dom.before(e,l):a.Dom.safeInsertNode(o,l);let t=(t,e)=>{let i=e(t);for(;i;){let t=e(i);if(i&&(a.Dom.isTag(i,"br")||a.Dom.isEmptyTextNode(i)))a.Dom.safeRemove(i);else break;i=t}};t(l,t=>t.nextSibling),t(l,t=>t.previousSibling),a.Dom.after(l,h),a.Dom.before(l,c),n?(i.setEndBefore(l),o.setEndBefore(l)):(i.setEndAfter(l),o.setEndAfter(l))}else i.setEnd(o.startContainer,o.startOffset);let d=i.extractContents(),p=t=>a.Dom.each(t,t=>a.Dom.isEmptyTextNode(t)&&a.Dom.safeRemove(t));(0,u.assert)(t.parentNode,"Splitting fails");try{if(p(d),p(t),t.parentNode.insertBefore(d,t),!e&&n&&l?.parentNode){let t=this.createRange();t.setStartBefore(l),this.selectRange(t)}}catch(t){if(!s.IS_PROD)throw t}let f=t=>{t?.parentNode?.firstChild===t?.parentNode?.lastChild&&t?.parentNode?.appendChild(l.cloneNode())};f(c),f(h)}finally{a.Dom.safeRemove(c),a.Dom.safeRemove(h)}return t.previousElementSibling}expandSelection(){if(this.isCollapsed())return this;let{range:t}=this,e=t.cloneRange();if(!a.Dom.isOrContains(this.j.editor,t.commonAncestorContainer,!0))return this;let i=e=>{let i=this.j.createInside.fake(),o=t.cloneRange();return o.collapse(e),a.Dom.safeInsertNode(o,i),(0,h.moveTheNodeAlongTheEdgeOutward)(i,e,this.j.editor),i},o=i(!0),n=i(!1);e.setStartAfter(o),e.setEndBefore(n);let s=a.Dom.findSibling(o,!1),r=a.Dom.findSibling(n,!0);if(s!==r){let t=a.Dom.isElement(s)&&a.Dom.isOrContains(s,n),i=!t&&a.Dom.isElement(r)&&a.Dom.isOrContains(r,o);if(t||i){let i=t?s:r,l=i;for(;a.Dom.isElement(i);)(i=t?i.firstElementChild:i.lastElementChild)&&(t?a.Dom.isOrContains(i,n):a.Dom.isOrContains(i,o))&&(l=i);t?e.setStart(l,0):e.setEnd(l,l.childNodes.length)}}if(this.selectRange(e),a.Dom.safeRemove(o,n),this.isCollapsed())throw(0,l.error)("Selection is collapsed");return this}constructor(t){(0,o._)(this,"jodit",void 0),this.jodit=t,t.e.on("removeMarkers",()=>{this.removeMarkers()})}}(0,n.__decorate)([r.autobind],f.prototype,"createRange",null),(0,n.__decorate)([r.autobind],f.prototype,"focus",null),(0,n.__decorate)([r.autobind],f.prototype,"setCursorAfter",null),(0,n.__decorate)([r.autobind],f.prototype,"setCursorBefore",null),(0,n.__decorate)([r.autobind],f.prototype,"setCursorIn",null)},17481:function(t,e,i){"use strict";i.d(e,{extractSelectedPart:function(){return a}});var o=i(23211),n=i(23175),s=i(4040),r=i(71125);function a(t,e,i){let o=i.s.createRange(),s=(0,n.isMarker)(e.previousSibling)?e.previousSibling:e;o.setStartBefore(t),o.setEndBefore(s),l(t,o,!0);let r=(0,n.isMarker)(e.nextSibling)?e.nextSibling:e;o.setStartAfter(r),o.setEndAfter(t),l(t,o,!1)}function l(t,e,i){let n=e.extractContents();n.textContent&&(0,s.trim)(n.textContent).length||!n.firstChild||o.Dom.unwrap(n.firstChild),t.parentNode&&(0,r.call)(i?o.Dom.before:o.Dom.after,t,n)}},48729:function(t,e,i){"use strict";i.d(e,{FiniteStateMachine:function(){return a}});var o=i(25045),n=i(81937),s=i(85932),r=i(28712);class a{setState(t){(0,r.assert)(!this.__previewsStates.has(t),"Circled states"),this.__previewsStates.add(t),this.__state=t}getState(){return this.__state}disableSilent(){this.silent=!1}dispatch(t,e){let i=this.transitions[this.getState()][t];if(i){let t=i.call(this,e);return(0,r.assert)(t&&t!==e,"Action should return new value"),(0,r.assert)((0,s.isString)(t.next),"Value should contain the next state"),(0,r.assert)(t.next!==this.getState(),"The new state should not be equal to the old one."),this.setState(t.next),n.IS_PROD||this.silent,t}throw Error(`invalid action: ${this.getState()}.${t.toString()}`)}constructor(t,e){(0,o._)(this,"transitions",void 0),(0,o._)(this,"__state",void 0),(0,o._)(this,"silent",void 0),(0,o._)(this,"__previewsStates",void 0),this.transitions=e,this.silent=!0,this.__previewsStates=new Set,this.setState(t)}}},10171:function(t,e,i){"use strict";i.d(e,{getSuitChild:function(){return r}});var o=i(23211),n=i(83653),s=i(73019);function r(t,e){let{firstChild:i}=e;for(;i&&!(0,n.isNormalNode)(i);)if(!(i=i.nextSibling))return null;return i&&!o.Dom.next(i,n.isNormalNode,e)&&(0,s.isSuitElement)(t,i,!1)?i:null}},19549:function(t,e,i){"use strict";i.d(e,{getSuitParent:function(){return function t(e,i,r){let{parentNode:a}=i;return a===r||!o.Dom.isHTMLElement(a)||o.Dom.next(i,n.isNormalNode,a)||o.Dom.prev(i,n.isNormalNode,a)?null:e.isElementCommit&&e.elementIsBlock&&!o.Dom.isBlock(a)?t(e,a,r):(0,s.isSuitElement)(e,a,!1)&&(!o.Dom.isBlock(a)||e.elementIsBlock)?a:e.isElementCommit&&!o.Dom.isBlock(a)?t(e,a,r):null}}});var o=i(23211),n=i(83653),s=i(73019)},9703:function(t,e,i){"use strict";i.d(e,{hasSameStyle:function(){return c},hasSameStyleKeys:function(){return u}});var o=i(81937),n=i(23211),s=i(18303),r=i(19147),a=i(28712),l=i(80991);function c(t,e){return!!(!n.Dom.isTag(t,"font")&&n.Dom.isHTMLElement(t)&&Object.keys(e).every(i=>{let o=(0,l.css)(t,i,!0);return""===o&&(""===e[i]||null==e[i])||!(0,s.isVoid)(o)&&""!==o&&!(0,s.isVoid)(e[i])&&(0,r.normalizeCssValue)(i,e[i]).toString().toLowerCase()===o.toString().toLowerCase()}))}if(o.globalDocument){let t=o.globalDocument.createElement("div");t.style.color="red",(0,a.assert)(c(t,{color:"red"}),"Style test"),(0,a.assert)(c(t,{fontSize:null}),"Style test"),(0,a.assert)(c(t,{fontSize:""}),"Style test")}function u(t,e){return!!(!n.Dom.isTag(t,"font")&&n.Dom.isHTMLElement(t)&&Object.keys(e).every(e=>""!==(0,l.css)(t,e,!0)))}if(o.globalDocument){let t=o.globalDocument.createElement("div");t.style.color="red",(0,a.assert)(u(t,{color:"red"}),"Style test"),(0,a.assert)(!u(t,{font:"Arial",color:"red"}),"Style test"),(0,a.assert)(!u(t,{border:"1px solid #ccc"}),"Style test")}},51640:function(t,e,i){"use strict";i.d(e,{FiniteStateMachine:function(){return n.FiniteStateMachine},extractSelectedPart:function(){return o.extractSelectedPart},getSuitChild:function(){return s.getSuitChild},getSuitParent:function(){return r.getSuitParent},isInsideInvisibleElement:function(){return a.isInsideInvisibleElement},suitableClosest:function(){return l.suitableClosest},toggleAttributes:function(){return u.toggleAttributes},toggleOrderedList:function(){return c.toggleOrderedList},unwrapChildren:function(){return h.unwrapChildren},wrap:function(){return d.wrap}});var o=i(17481),n=i(48729),s=i(10171),r=i(19549);i(9703);var a=i(39608);i(83653),i(95971);var l=i(73019),c=i(34582);i(97110);var u=i(82794),h=i(89081),d=i(73154);i(83335)},39608:function(t,e,i){"use strict";i.d(e,{isInsideInvisibleElement:function(){return n}});var o=i(23211);function n(t,e){return!!o.Dom.closest(t,["style","script"],e)}},83653:function(t,e,i){"use strict";i.d(e,{isNormalNode:function(){return s}});var o=i(23211),n=i(23175);function s(t){return!!(t&&!o.Dom.isEmptyTextNode(t)&&!o.Dom.isTemporary(t)&&!(0,n.isMarker)(t))}},95971:function(t,e,i){"use strict";i.d(e,{elementsEqualAttributes:function(){return l},isSameAttributes:function(){return a}});var o=i(18073),n=i(93640),s=i(28712),r=i(9703);function a(t,e){return!((t.attributes.length||(0,o.size)(e))&&(0,o.size)(e))||((0,s.assert)(e,"Attrs must be a non-empty object"),Object.keys(e).every(i=>"class"===i||"className"===i?t.classList.contains(e[i]):"style"===i?(0,r.hasSameStyle)(t,e[i]):(0,n.attr)(t,i)===e[i]))}function l(t,e){return t.attributes.length===e.attributes.length&&Array.from(t.attributes).every(t=>e.hasAttribute(t.name)&&e.getAttribute(t.name)===t.value)}},73019:function(t,e,i){"use strict";i.d(e,{isSameStyleChild:function(){return l},isSuitElement:function(){return r},suitableClosest:function(){return a}});var o=i(23211),n=i(9703),s=i(83653);function r(t,e,i,a=!0){if(!e||!(0,s.isNormalNode)(e))return!1;let{element:l,elementIsDefault:c,options:u}=t;if(o.Dom.isList(e)&&t.elementIsList)return!0;let h=o.Dom.isTag(e,l);return!!(h&&!(c&&i)||u.attributes?.style&&(a?(0,n.hasSameStyle)(e,u.attributes.style):(0,n.hasSameStyleKeys)(e,u.attributes.style))&&!t.elementIsList)||!h&&!i&&c&&o.Dom.isInlineBlock(e)}function a(t,e,i){return o.Dom.closest(e,e=>r(t,e,!0,!1),i)}function l(t,e){let{element:i,options:o}=t;if(!e||!(0,s.isNormalNode)(e))return!1;let r=e.nodeName.toLowerCase()===i,a=!!(o.attributes?.style&&(0,n.hasSameStyleKeys)(e,o.attributes?.style));return r&&a}},34582:function(t,e,i){"use strict";i.d(e,{toggleOrderedList:function(){return c}});var o=i(23211),n=i(28712),s=i(17481),r=i(82794),a=i(98394),l=i(97110);function c(t,e,i,o){if(!e)return o;let n=e.parentElement;if(!n)return o;let s=i.e.fire(`${a._PREFIX}BeforeToggleList`,o,t,n);if(void 0!==s)return s;let c=i.e.fire.bind(i.e,`${a._PREFIX}AfterToggleList`);if(o!==a.UNWRAP){let s=(0,r.toggleAttributes)(t,e.parentElement,i,a.INITIAL,!0)===a.CHANGE;if(o===a.REPLACE||s||n.tagName.toLowerCase()!==t.element){let o=u(a.REPLACE,n,e,i,t),s=(0,l.wrapList)(t,o,i);return c(a.REPLACE,s,t),a.REPLACE}}let h=u(a.UNWRAP,n,e,i,t);return c(a.UNWRAP,h,t),a.UNWRAP}function u(t,e,i,r,l){let c=r.e.fire(`${a._PREFIX}BeforeUnwrapList`,t,e,l);return c?((0,n.assert)(o.Dom.isHTMLElement(c),`${a._PREFIX}BeforeUnwrapList hook must return HTMLElement`),c):((0,s.extractSelectedPart)(e,i,r),(0,n.assert)(o.Dom.isHTMLElement(i.parentElement),"Element should be inside the list"),o.Dom.unwrap(i.parentElement),o.Dom.replace(i,"br"!==r.o.enter.toLowerCase()?r.o.enter:r.createInside.fragment(),r.createInside))}},97110:function(t,e,i){"use strict";i.d(e,{wrapList:function(){return a}});var o=i(23211),n=i(95971),s=i(82794),r=i(98394);function a(t,e,i){let a=i.e.fire(`${r._PREFIX}BeforeWrapList`,r.REPLACE,e,t)??o.Dom.replace(e,"li",i.createInside),l=a.previousElementSibling,c=a.nextElementSibling,u=o.Dom.isTag(l,t.element)?l:null;return u??=o.Dom.isTag(c,t.element)?c:null,o.Dom.isList(u)&&(0,n.isSameAttributes)(u,t.options.attributes)||(u=i.createInside.element(t.element),(0,s.toggleAttributes)(t,u,i,r.INITIAL),o.Dom.before(a,u)),l===u?o.Dom.append(u,a):o.Dom.prepend(u,a),o.Dom.isTag(u.nextElementSibling,t.element)&&(0,n.elementsEqualAttributes)(u,u.nextElementSibling)&&(o.Dom.append(u,Array.from(u.nextElementSibling.childNodes)),o.Dom.safeRemove(u.nextElementSibling)),i.e.fire(`${r._PREFIX}AfterWrapList`,r.WRAP,u,t),u}},82794:function(t,e,i){"use strict";i.d(e,{toggleAttributes:function(){return m}});var o=i(81937),n=i(23211),s=i(28077),r=i(28686),a=i(19147),l=i(18073),c=i(74264),u=i(93640),h=i(80991),d=i(36400),p=i(98394);let f="toggleAttributes";function m(t,e,i,_,v=!1){if(!v&&t.isApplied(e,f))return _;v||t.setApplied(e,f);let{attributes:b}=t.options;return b&&(0,l.size)(b)>0&&Object.keys(b).forEach(f=>{var m,y,w;let S=b[f];switch(f){case"style":m=_,(0,u.assert)((0,r.isPlainObject)(S)&&(0,l.size)(S),"Style must be an object"),Object.keys(S).forEach(r=>{let l=e.style.getPropertyValue((0,c.kebabCase)(r)),u=S[r];if(""!==l||null!=u){let c,f;if((c=i.create.element(e.tagName.toLowerCase())).style.cssText=e.style.cssText,(function(t){if(void 0!==(0,d.dataBind)(t,"shadowRoot"))return(0,d.dataBind)(t,"shadowRoot");let e=(0,s.getContainer)(t),i=o.globalDocument.createElement("iframe");(0,h.css)(i,{width:0,height:0,position:"absolute",border:0}),i.src="about:blank",e.appendChild(i);let n=i.contentWindow?.document,r=n?n.body:t.od.body;return(0,d.dataBind)(t,"shadowRoot",r),r})(i).appendChild(c),f=(0,h.css)(c,r),n.Dom.safeRemove(c),f===(0,a.normalizeCssValue)(r,u)){if(!l)return;v||(0,h.css)(e,r,null),m=g(t,e,m=p.UNSET);return}m=p.CHANGE,v||((0,h.css)(e,r,u),m=g(t,e,m))}}),_=m;break;case"className":case"class":let C;y=_,(0,u.assert)((0,r.isString)(S),"Class name must be a string"),C=i.e.fire.bind(i.e,`${p._PREFIX}AfterToggleAttribute`),e.classList.contains(S.toString())?(y=p.UNSET,v||(e.classList.remove(S),0===e.classList.length&&((0,u.attr)(e,"class",null),C(y,e,"class",null)))):(y=p.CHANGE,v||(e.classList.add(S),C(y,e,"class",S))),_=y;break;default:let E;w=_,(0,u.assert)((0,r.isString)(S)||(0,r.isNumber)(S)||(0,r.isBoolean)(S)||null==S,"Attribute value must be a string or number or boolean or null"),E=i.e.fire.bind(i.e,`${p._PREFIX}AfterToggleAttribute`),(0,u.attr)(e,f)===S?(v||(0,u.attr)(e,f,null),w=p.UNSET,v||E(w,e,f,S)):(w=p.CHANGE,v||((0,u.attr)(e,f,S),E(w,e,f,S))),_=w}}),_}function g(t,e,i){return(0,u.attr)(e,"style")||((0,u.attr)(e,"style",null),e.tagName.toLowerCase()===t.defaultTag&&(n.Dom.unwrap(e),i=p.UNWRAP)),i}},89081:function(t,e,i){"use strict";i.d(e,{unwrapChildren:function(){return a}});var o=i(23211),n=i(93640),s=i(9703),r=i(73019);function a(t,e){let i,a=[],l=[],c=t.options.attributes?.style;if(e.firstChild){let u=o.Dom.eachGen(e),h=u.next();for(;!h.done;){let e=h.value;(0,r.isSuitElement)(t,e,!0)&&(!c||(0,s.hasSameStyleKeys)(e,c))?(void 0===i&&(i=!0),a.push(e)):c&&(0,r.isSameStyleChild)(t,e)?(void 0===i&&(i=!1),l.push(()=>{(0,n.css)(e,Object.keys(c).reduce((t,e)=>(t[e]=null,t),{})),(0,n.attr)(e,"style")||(0,n.attr)(e,"style",null),(0,n.attr)(e,"style")||e.nodeName.toLowerCase()!==t.element||a.push(e)})):o.Dom.isEmptyTextNode(e)||void 0!==i||(i=!1),h=u.next()}}return l.forEach(t=>t()),a.forEach(o.Dom.unwrap),!!i}},83335:function(t,e,i){"use strict";i.d(e,{wrapUnwrappedText:function(){return s}});var o=i(23211),n=i(23175);function s(t,e,i){let s=i.editor,r=i.createInside,a=(t,e="previousSibling")=>{let r=t,a=t;for(;a&&!(0,n.isMarker)(a)&&!o.Dom.isTag(a,i.o.enter)&&(r=a,a=a[e]?a[e]:a.parentNode&&!o.Dom.isBlock(a.parentNode)&&a.parentNode!==s?a.parentNode:null,!o.Dom.isBlock(a)););return r},l=a(e),c=a(e,"nextSibling"),u=i.s.createRange();u.setStartBefore(l),u.setEndAfter(c);let h=u.extractContents(),d=r.element(t.element);return d.appendChild(h),o.Dom.safeInsertNode(u,d),t.elementIsBlock&&o.Dom.isEmpty(d)&&!o.Dom.isTag(d.firstElementChild,"br")&&d.appendChild(r.element("br")),d}},73154:function(t,e,i){"use strict";i.d(e,{wrap:function(){return a}});var o=i(27795),n=i(7909),s=i(97110),r=i(83335);function a(t,e,i){var a,c,u;let h=(a=t,c=e,u=i,a.elementIsBlock?o.Dom.up(c,t=>o.Dom.isBlock(t)&&!o.Dom.isTag(t,l),u.editor)||(0,r.wrapUnwrappedText)(a,c,u):((0,n.attr)(c,"size",null),c));return t.elementIsList?(0,s.wrapList)(t,h,i):o.Dom.replace(h,t.element,i.createInside,!0)}let l=new Set(["td","th","tr","tbody","table","li","ul","ol"])},96127:function(t,e,i){"use strict";i.d(e,{ApplyStyle:function(){return r}});var o=i(51640),n=i(98394),s=i(78462);function r(t,e){let{s:i,editor:r}=t;r.firstChild?.normalize();let a=i.fakes(),l=t.s.wrapInTagGen(a),c=l.next();if(c.done)return;let u={collapsed:i.isCollapsed(),mode:n.INITIAL,element:c.value,next:s.states.START,jodit:t,style:e};for(;c&&!c.done;){let t=new o.FiniteStateMachine(s.states.START,s.transactions);for(u.element=c.value;t.getState()!==s.states.END;)u=t.dispatch("exec",u);c=l.next()}i.restoreFakes(a)}},84578:function(t,e,i){"use strict";i.d(e,{CommitStyle:function(){return l}});var o=i(25045),n=i(81937),s=i(57821),r=i(98394),a=i(96127);class l{isApplied(t,e){let i=this.__applyMap.get(t);return!!i&&i[e]}setApplied(t,e){let i=this.__applyMap.get(t)??{};i[e]=!0,this.__applyMap.set(t,i)}get elementIsList(){return!!(this.options.element&&n.LIST_TAGS.has(this.options.element))}get element(){return this.options.element||this.defaultTag}get elementIsBlock(){return!!(this.options.element&&n.IS_BLOCK.test(this.options.element))}get isElementCommit(){return!!(this.options.element&&this.options.element!==this.options.defaultTag)}get defaultTag(){return this.options.defaultTag?this.options.defaultTag:this.elementIsBlock?"p":"span"}get elementIsDefault(){return this.element===this.defaultTag}apply(t){let{hooks:e}=this.options,i=e?Object.keys(e):[];try{i.forEach(i=>{t.e.on((0,s.camelCase)(r._PREFIX+"_"+i),e[i])}),(0,a.ApplyStyle)(t,this)}finally{i.forEach(i=>{t.e.off((0,s.camelCase)(r._PREFIX+"_"+i),e[i])}),this.__applyMap=new WeakMap}t.synchronizeValues(),t.e.fire("afterCommitStyle",this)}constructor(t){(0,o._)(this,"options",void 0),(0,o._)(this,"__applyMap",void 0),this.options=t,this.__applyMap=new WeakMap}}},98394:function(t,e,i){"use strict";i.d(e,{CHANGE:function(){return s},INITIAL:function(){return a},REPLACE:function(){return l},UNSET:function(){return r},UNWRAP:function(){return n},WRAP:function(){return o},_PREFIX:function(){return c}});let o="wrap",n="unwrap",s="change",r="unset",a="initial",l="replace",c="commitStyle"},78462:function(t,e,i){"use strict";i.d(e,{states:function(){return l},transactions:function(){return c}});var o=i(81937),n=i(23211),s=i(28712),r=i(51640),a=i(98394);let l={START:"START",ELEMENT:"ELEMENT",UNWRAP:"UNWRAP",UNWRAP_CHILDREN:"UNWRAP_CHILDREN",CHANGE:"CHANGE",REPLACE_DEFAULT:"REPLACE_DEFAULT",LIST:"LIST",TOGGLE_LIST:"TOGGLE_LIST",WRAP:"WRAP",EXTRACT:"EXTRACT",END:"END"},c={[l.START]:{exec(t){let{element:e,jodit:i,style:o,mode:s,collapsed:c}=t;if((0,r.isInsideInvisibleElement)(e,i.editor)||!c&&n.Dom.isEmptyContent(e))return{...t,next:l.END};let u=(0,r.getSuitParent)(o,e,i.editor)||(0,r.getSuitChild)(o,e);if(u)return{...t,next:l.ELEMENT,element:u};let h=(0,r.suitableClosest)(o,e,i.editor);return o.elementIsList&&n.Dom.isList(h)?{...t,next:l.LIST}:h?{...t,next:l.EXTRACT}:{...t,next:s!==a.UNWRAP?l.UNWRAP_CHILDREN:l.END}}},[l.LIST]:{exec(t){let{element:e,jodit:i,mode:s}=t;if(s!==a.INITIAL&&s!==a.UNWRAP&&s!==a.REPLACE)return{...t,next:l.END};let r=n.Dom.closest(e,"li",i.editor);return r&&n.Dom.closest(e,o.LIST_TAGS,i.editor)?{...t,element:r,next:l.TOGGLE_LIST}:{...t,next:l.END}}},[l.TOGGLE_LIST]:{exec:t=>({...t,mode:(0,r.toggleOrderedList)(t.style,t.element,t.jodit,t.mode),next:l.END})},[l.EXTRACT]:{exec(t){let{element:e,jodit:i,style:o}=t,a=(0,r.suitableClosest)(o,e,i.editor);return((0,s.assert)(a,"This place should have an element"),!o.elementIsBlock&&o.options.attributes?.style&&n.Dom.isBlock(a))?{...t,next:l.WRAP}:(o.elementIsBlock||(0,r.extractSelectedPart)(a,e,i),{...t,element:a,next:l.ELEMENT})}},[l.UNWRAP_CHILDREN]:{exec(t){let{element:e,style:i}=t;return(0,r.unwrapChildren)(i,e)?{...t,mode:a.UNWRAP,next:l.END}:{...t,next:l.WRAP}}},[l.WRAP]:{exec(t){let{element:e,jodit:i,style:o}=t,n=(0,r.wrap)(o,e,i);return{...t,next:o.elementIsList?l.END:l.CHANGE,mode:a.WRAP,element:n}}},[l.ELEMENT]:{exec(t){let{style:e,element:i,jodit:o}=t;return(0,r.toggleAttributes)(e,i,o,a.INITIAL,!0)!==a.INITIAL?{...t,next:l.CHANGE}:n.Dom.isTag(i,e.element)?{...t,next:l.UNWRAP}:{...t,next:l.END}}},[l.CHANGE]:{exec(t){let{style:e,element:i,jodit:o,mode:s}=t,c=(0,r.toggleAttributes)(e,i,o,t.mode);return s!==a.WRAP&&c===a.UNSET&&!i.attributes.length&&n.Dom.isTag(i,e.element)?{...t,next:l.UNWRAP}:{...t,mode:c,next:l.END}}},[l.UNWRAP]:{exec:t=>t.element.attributes.length&&n.Dom.isTag(t.element,t.style.element)?{...t,next:l.REPLACE_DEFAULT}:(n.Dom.unwrap(t.element),{...t,mode:a.UNWRAP,next:l.END})},[l.REPLACE_DEFAULT]:{exec:t=>(n.Dom.replace(t.element,t.style.defaultTag,t.jodit.createInside,!0),{...t,mode:a.REPLACE,next:l.END})},[l.END]:{exec:t=>t}}},8006:function(t,e,i){"use strict";i.d(e,{AsyncStorage:function(){return c}});var o=i(25045),n=i(57821),s=i(91162),r=i(59807),a=i(9505),l=i(24475);class c{async set(t,e){let i=await this.provider;return await i.set((0,n.camelCase)(this.prefix+t),e),this}async delete(t){let e=await this.provider;return await e.delete((0,n.camelCase)(this.prefix+t)),this}async get(t){return(await this.provider).get((0,n.camelCase)(this.prefix+t))}async exists(t){return(await this.provider).exists((0,n.camelCase)(this.prefix+t))}async clear(){let t=await this.provider;return await t.clear(),this}async close(){let t=await this.provider;"close"in t&&"function"==typeof t.close&&await t.close()}static makeStorage(t=!1,e){let i;return"localStorage"===t||"sessionStorage"===t?(0,r.canUsePersistentStorage)(t)&&(i=new r.LocalStorageProvider(l.StorageKey+(e||""),t)):("indexedDB"===t||!0===t)&&(i=(0,s.canUseIndexedDB)().then(t=>t?new s.IndexedDBProvider(l.StorageKey+(e||""),"keyValueStore"):new a.MemoryStorageProvider)),i||(i=new a.MemoryStorageProvider),new c(Promise.resolve(i),e)}constructor(t,e){(0,o._)(this,"provider",void 0),(0,o._)(this,"prefix",void 0),this.provider=t,this.prefix=l.StorageKey,e&&(this.prefix+=e)}}},91162:function(t,e,i){"use strict";i.d(e,{IndexedDBProvider:function(){return s},canUseIndexedDB:function(){return l},clearUseIndexedDBCache:function(){return a}});var o=i(25045),n=i(81937);class s{getDB(){return this.dbPromise||(this.dbPromise=new Promise((t,e)=>{let i=indexedDB.open(this.dbName,this.DB_VERSION);i.onerror=()=>{e(i.error)},i.onsuccess=()=>{t(i.result)},i.onupgradeneeded=t=>{let e=t.target.result;e.objectStoreNames.contains(this.storeName)||e.createObjectStore(this.storeName)}})),this.dbPromise}async performTransaction(t,e){try{let i=(await this.getDB()).transaction([this.storeName],t).objectStore(this.storeName),o=e(i);return new Promise((t,e)=>{o.onsuccess=()=>{t(o.result)},o.onerror=()=>{e(o.error)}})}catch(t){return Promise.reject(t)}}async set(t,e){try{await this.performTransaction("readwrite",i=>i.put(e,t))}catch(t){n.IS_PROD}return this}async delete(t){try{await this.performTransaction("readwrite",e=>e.delete(t))}catch{}return this}async get(t){try{return await this.performTransaction("readonly",e=>e.get(t))}catch{return}}async exists(t){try{let e=await this.performTransaction("readonly",e=>e.get(t));return void 0!==e}catch{return!1}}async clear(){try{await this.performTransaction("readwrite",t=>t.clear())}catch{}return this}async close(){if(this.dbPromise){try{(await this.dbPromise).close()}catch{}this.dbPromise=null}}async keys(){try{let t=await this.performTransaction("readonly",t=>t.getAllKeys());return t&&"object"==typeof t&&"then"in t&&(t=await t),t.map(t=>t+"")}catch{return[]}}async values(){try{let t=await this.performTransaction("readonly",t=>t.getAll());return t&&"object"==typeof t&&"then"in t&&(t=await t),t}catch{return[]}}async entries(){try{let[t,e]=await Promise.all([this.keys(),this.values()]);return t.map((t,i)=>[t,e[i]])}catch{return[]}}constructor(t="JoditDB",e="keyValueStore"){(0,o._)(this,"dbName",void 0),(0,o._)(this,"dbPromise",void 0),(0,o._)(this,"DB_VERSION",void 0),(0,o._)(this,"storeName",void 0),this.dbName=t,this.dbPromise=null,this.DB_VERSION=1,this.storeName=e}}let r=null;function a(){r=null}async function l(){if(null!=r)return r;try{if("u"<typeof indexedDB)return r=!1,!1;let t="___Jodit___"+Math.random().toString(),e=indexedDB.open(t);return r=await new Promise(i=>{e.onerror=()=>{i(!1)},e.onsuccess=()=>{indexedDB.deleteDatabase(t),i(!0)}})}catch{return r=!1,!1}}},59807:function(t,e,i){"use strict";i.d(e,{LocalStorageProvider:function(){return s},canUsePersistentStorage:function(){return n}});var o=i(25045);let n=(t="localStorage")=>{let e=new Map;if(e.has(t))return e.get(t);let i="___Jodit___"+Math.random().toString(),o="sessionStorage"===t?sessionStorage:localStorage;try{o.setItem(i,"1");let n="1"===o.getItem(i);return o.removeItem(i),e.set(t,n),n}catch{}return e.set(t,!1),!1};class s{get storage(){return"sessionStorage"===this.strategy?sessionStorage:localStorage}set(t,e){try{let i=this.storage.getItem(this.rootKey),o=i?JSON.parse(i):{};o[t]=e,this.storage.setItem(this.rootKey,JSON.stringify(o))}catch{}return this}delete(t){try{this.storage.removeItem(this.rootKey)}catch{}return this}get(t){try{let e=this.storage.getItem(this.rootKey),i=e?JSON.parse(e):{};return void 0!==i[t]?i[t]:void 0}catch{}}exists(t){return null!=this.get(t)}clear(){try{this.storage.removeItem(this.rootKey)}catch{}return this}constructor(t,e="localStorage"){(0,o._)(this,"rootKey",void 0),(0,o._)(this,"strategy",void 0),this.rootKey=t,this.strategy=e}}},9505:function(t,e,i){"use strict";i.d(e,{MemoryStorageProvider:function(){return n}});var o=i(25045);class n{set(t,e){return this.data.set(t,e),this}delete(t){return this.data.delete(t),this}get(t){return this.data.get(t)}exists(t){return this.data.has(t)}clear(){return this.data.clear(),this}constructor(){(0,o._)(this,"data",new Map)}}},25222:function(t,e,i){"use strict";i.d(e,{AsyncStorage:function(){return o.AsyncStorage},IndexedDBProvider:function(){return n.IndexedDBProvider},LocalStorageProvider:function(){return s.LocalStorageProvider},MemoryStorageProvider:function(){return r.MemoryStorageProvider},Storage:function(){return a.Storage},StorageKey:function(){return a.StorageKey},canUseIndexedDB:function(){return n.canUseIndexedDB},canUsePersistentStorage:function(){return s.canUsePersistentStorage},clearUseIndexedDBCache:function(){return n.clearUseIndexedDBCache}});var o=i(8006),n=i(91162),s=i(59807),r=i(9505),a=i(24475)},24475:function(t,e,i){"use strict";i.d(e,{Storage:function(){return l},StorageKey:function(){return a}});var o=i(25045),n=i(57821),s=i(59807),r=i(9505);let a="Jodit_";class l{set(t,e){return this.provider.set((0,n.camelCase)(this.prefix+t),e),this}delete(t){return this.provider.delete((0,n.camelCase)(this.prefix+t)),this}get(t){return this.provider.get((0,n.camelCase)(this.prefix+t))}exists(t){return this.provider.exists((0,n.camelCase)(this.prefix+t))}clear(){return this.provider.clear(),this}static makeStorage(t=!1,e){let i;return"localStorage"===t||"sessionStorage"===t?(0,s.canUsePersistentStorage)(t)&&(i=new s.LocalStorageProvider(a+(e||""),t)):!0===t&&(0,s.canUsePersistentStorage)("localStorage")&&(i=new s.LocalStorageProvider(a+(e||""))),i||(i=new r.MemoryStorageProvider),new l(i,e)}constructor(t,e){(0,o._)(this,"provider",void 0),(0,o._)(this,"prefix",void 0),this.provider=t,this.prefix=a,e&&(this.prefix+=e)}}},80512:function(t,e,i){"use strict";i.d(e,{Dlgs:function(){return a}});var o=i(28077),n=i(28686),s=i(71125),r=i(37333);class a{dlg(t){let e=(0,o.getPopupViewRoot)(this.o,this.container,this.od.body),i=new r.Dialog({language:this.o.language,shadowRoot:this.o.shadowRoot,popupRoot:e,ownerWindow:this.o.ownerWindow,defaultTimeout:this.o.defaultTimeout,direction:this.o.direction,theme:this.o.theme,globalFullSize:this.o.globalFullSize,...t});return(0,s.markOwner)(this,i.container),i.parent=this,i.bindDestruct(this)}confirm(t,e,i){return t=l(t,this),e=l(e,this),r.Confirm.call(this.dlg({closeOnClickOverlay:!0}),t,e,i)}prompt(t,e,i,o,n){return t=l(t,this),e=l(e,this),o=l(o,this),r.Prompt.call(this.dlg({closeOnClickOverlay:!0}),t,e,i,o,n)}alert(t,e,i,o){return t=l(t,this),e=l(e,this),r.Alert.call(this.dlg({closeOnClickOverlay:!0}),t,e,i,o)}}function l(t,e){return(0,n.isString)(t)&&!(0,n.isHTML)(t)&&(t=e.i18n(t)),t}},23183:function(t,e,i){"use strict";i.d(e,{Elms:function(){return n}});var o=i(88475);class n{getElm(t){return this.container.querySelector("."+this.getFullElName(t))}getElms(t){return(0,o.toArray)(this.container.querySelectorAll("."+this.getFullElName(t)))}}},81987:function(t,e,i){"use strict";i.d(e,{Mods:function(){return n}});var o=i(18303);class n{afterSetMod(t,e){}setMod(t,e,i){t=t.toLowerCase();let n=this.mods[t];if(n===e)return this;let s=`${this.componentName}_${t}_`,r=(i||this.container).classList;return null!=n&&r.remove(`${s}${n.toString().toLowerCase()}`),(0,o.isVoid)(e)||""===e||r.add(`${s}${e.toString().toLowerCase()}`),this.mods[t]=e,this.afterSetMod(t,e),this}getMod(t){return this.mods[t]??null}}},53681:function(t,e,i){"use strict";i.d(e,{Button:function(){return v},UIButton:function(){return _},UIButtonState:function(){return g}});var o=i(25045),n=i(31635),s=i(69364),r=i(51676),a=i(91672),l=i(68616),c=i(23211),u=i(91565),h=i(85932),d=i(28712),p=i(7909),f=i(96007),m=i(29434);let g=()=>({size:"middle",type:"button",role:"button",name:"",value:"",variant:"initial",disabled:!1,activated:!1,icon:{name:"empty",fill:"",iconURL:""},tooltip:"",text:"",tabIndex:void 0});class _ extends f.UIElement{className(){return"UIButton"}setState(t){return Object.assign(this.state,t),this}get text(){let t=this.getElm("text");return(0,d.assert)(t,"Text element not found"),t}get icon(){let t=this.getElm("icon");return(0,d.assert)(t,"Icon element not found"),t}onChangeSize(){this.setMod("size",this.state.size)}onChangeType(){(0,p.attr)(this.container,"type",this.state.type)}onChangeRole(){(0,p.attr)(this.container,"role",this.state.role)}updateSize(){let t=(0,a.getComponentClass)("UIList"),e=this.closest(t);if(e){this.state.size=e.buttonSize;return}}onChangeStatus(){this.setMod("variant",this.state.variant)}onChangeText(){this.text.textContent=this.jodit.i18n(this.state.text),this.updateAriaLabel()}onChangeTextSetMode(){this.setMod("text-icons",!!this.state.text.trim().length)}onChangeDisabled(){(0,p.attr)(this.container,"disabled",this.state.disabled||null)}onChangeActivated(){(0,p.attr)(this.container,"aria-pressed",this.state.activated)}onChangeName(){this.container.classList.add(`${this.componentName}_${this.clearName(this.state.name)}`),this.name=this.state.name,(0,p.attr)(this.container,"data-ref",this.state.name),(0,p.attr)(this.container,"ref",this.state.name)}onChangeTooltip(){let t=this.state.tooltip?this.jodit.i18n(this.state.tooltip):null;this.get("j.o.useNativeTooltip")&&(0,p.attr)(this.container,"title",t),(0,p.attr)(this.container,"aria-label",t),this.updateAriaLabel()}updateAriaLabel(){let t=this.state.text.trim().length>0,e=this.state.tooltip?this.jodit.i18n(this.state.tooltip):null;(0,p.attr)(this.container,"aria-label",e),(0,p.attr)(this.button,"aria-label",t?null:e)}onChangeTabIndex(){(0,p.attr)(this.container,"tabindex",this.state.tabIndex)}onChangeIcon(){let t=this.get("j.o.textIcons");if(!0===t||(0,u.isFunction)(t)&&t(this.state.name))return;c.Dom.detach(this.icon);let e=m.Icon.makeIcon(this.j,this.state.icon);e&&this.icon.appendChild(e)}focus(){this.container.focus()}isFocused(){let{activeElement:t}=this.od;return!!(t&&c.Dom.isOrContains(this.container,t))}createContainer(){let t=this.componentName,e=this.j.c.element("button",{class:t,type:"button",role:"button",ariaPressed:!1}),i=this.j.c.span(t+"__icon"),o=this.j.c.span(t+"__text");return e.appendChild(i),e.appendChild(o),e}destruct(){return this.j.e.off(this),this.j.e.off(this.container),super.destruct()}onAction(t){return this.actionHandlers.push(t),this}__onActionFire(t){t.buffer={actionTrigger:this},this.actionHandlers.forEach(e=>e.call(this,t)),this.j.e.fire(this,"click",t)}constructor(t,e){super(t),(0,o._)(this,"isButton",!0),(0,o._)(this,"state",g()),(0,o._)(this,"button",void 0),(0,o._)(this,"actionHandlers",[]),this.button=this.container,this.updateSize(),this.onChangeSize(),this.onChangeStatus(),e&&this.hookStatus(s.STATUSES.ready,()=>{this.setState(e)})}}function v(t,e,i,o){let n=new _(t);return n.state.tabIndex=t.o.allowTabNavigation?0:-1,(0,h.isString)(e)?(n.state.icon.name=e,n.state.name=e,o&&(n.state.variant=o),i&&(n.state.text=i)):n.setState(e),n}(0,n.__decorate)([r.cache],_.prototype,"text",null),(0,n.__decorate)([r.cache],_.prototype,"icon",null),(0,n.__decorate)([(0,l.watch)("state.size",{immediately:!1})],_.prototype,"onChangeSize",null),(0,n.__decorate)([(0,l.watch)("state.type",{immediately:!1})],_.prototype,"onChangeType",null),(0,n.__decorate)([(0,l.watch)("state.role",{immediately:!1})],_.prototype,"onChangeRole",null),(0,n.__decorate)([(0,l.watch)("parentElement")],_.prototype,"updateSize",null),(0,n.__decorate)([(0,l.watch)("state.variant",{immediately:!1})],_.prototype,"onChangeStatus",null),(0,n.__decorate)([(0,l.watch)("state.text",{immediately:!1})],_.prototype,"onChangeText",null),(0,n.__decorate)([(0,l.watch)("state.text",{immediately:!1})],_.prototype,"onChangeTextSetMode",null),(0,n.__decorate)([(0,l.watch)("state.disabled")],_.prototype,"onChangeDisabled",null),(0,n.__decorate)([(0,l.watch)("state.activated")],_.prototype,"onChangeActivated",null),(0,n.__decorate)([(0,l.watch)("state.name",{immediately:!1})],_.prototype,"onChangeName",null),(0,n.__decorate)([(0,l.watch)("state.tooltip",{immediately:!1})],_.prototype,"onChangeTooltip",null),(0,n.__decorate)([(0,l.watch)("state.tabIndex",{immediately:!1})],_.prototype,"onChangeTabIndex",null),(0,n.__decorate)([(0,l.watch)("state.icon",{immediately:!1})],_.prototype,"onChangeIcon",null),(0,n.__decorate)([r.cacheHTML],_.prototype,"createContainer",null),(0,n.__decorate)([(0,l.watch)("button:click")],_.prototype,"__onActionFire",null),_=(0,n.__decorate)([a.component],_)},15367:function(t,e,i){"use strict";i.d(e,{UIButtonGroup:function(){return c}});var o=i(25045),n=i(31635),s=i(91672),r=i(28712),a=i(53681),l=i(63468);class c extends l.UIGroup{className(){return"UIButtonGroup"}render(t){return`<div>
|
|
9
|
+
`,{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,o._)(this,"controls",void 0),(0,o._)(this,"events",{}),(0,o._)(this,"textIcons",!1),(0,o._)(this,"popupRoot",null),(0,o._)(this,"showBrowserColorPicker",!0),Object.assign(this,s)}}(0,o._)(r,"__defaultOptions",void 0),s=r.prototype,r.prototype.controls={}},24735:function(t,e,i){"use strict";i.d(e,{Async:function(){return m}});var o=i(25045),n=i(81937),s=i(61077),r=i(72068),a=i(91565),l=i(72412),c=i(62101),u=i(52100),h=i(85932),d=i(18303),p=i(28712),f=i(14228);class m{delay(t){return this.promise(e=>this.setTimeout(e,t))}setTimeout(t,e,...i){if(this.isDestructed)return 0;let o={};(0,d.isVoid)(e)&&(e=0),(0,l.isNumber)(e)||(e=(o=e).timeout||0),o.label&&this.clearLabel(o.label);let n=(0,s.setTimeout)(t,e,...i),r=o.label||n;return this.timers.set(r,n),this.__callbacks.set(r,t),n}updateTimeout(t,e){if((0,p.assert)(t&&this.timers.has(t),"Label does not exist"),!t||!this.timers.has(t))return null;let i=this.__callbacks.get(t);return(0,p.assert)((0,a.isFunction)(i),"Callback is not a function"),this.setTimeout(i,{label:t,timeout:e})}clearLabel(t){t&&this.timers.has(t)&&((0,s.clearTimeout)(this.timers.get(t)),this.timers.delete(t),this.__callbacks.delete(t))}clearTimeout(t){if((0,h.isString)(t))return this.clearLabel(t);(0,s.clearTimeout)(t),this.timers.delete(t),this.__callbacks.delete(t)}debounce(t,e,i=!1){let o=0,n=!1,l=[],h=(...e)=>{if(!n){o=0;let i=t(...e);if(n=!0,l.length){let t=()=>{l.forEach(t=>t()),l.length=0};(0,u.isPromise)(i)?i.finally(t):t()}}},d=(...r)=>{n=!1,e?(!o&&i&&h(...r),(0,s.clearTimeout)(o),o=this.setTimeout(()=>h(...r),(0,a.isFunction)(e)?e():e),this.timers.set(t,o)):h(...r)};return(0,c.isPlainObject)(e)&&e.promisify?(...t)=>{let e=this.promise(t=>{l.push(t)}).catch(t=>{if((0,r.isAbortError)(t))return null;throw t});return d(...t),e}:d}microDebounce(t,e=!1){let i,o=!1,n=!0;return(...s)=>{if(i=s,o){n=!0;return}n=!0,e&&(n=!1,t(...i)),o=!0,this.__queueMicrotaskNative(()=>{o=!1,!this.isDestructed&&n&&t(...i)})}}throttle(t,e,i=!1){let o=null,n,s,r;return(...i)=>{(n=!0,r=i,e)?o||(s=()=>{n?(t(...r),n=!1,o=this.setTimeout(s,(0,a.isFunction)(e)?e():e),this.timers.set(s,o)):o=null})():t(...r)}}promise(t){let e=()=>{},i=new Promise((i,o)=>{e=()=>o((0,f.abort)("Abort async")),this.promisesRejections.add(e),t(i,o)});return!i.finally&&"u">typeof process&&!n.IS_ES_NEXT&&(i.finally=t=>(i.then(t).catch(t),i)),i.finally(()=>{this.promisesRejections.delete(e)}).catch(()=>null),i.rejectCallback=e,i}promiseState(t){if(t.status)return t.status;if(!Promise.race)return new Promise(e=>{t.then(t=>(e("fulfilled"),t),t=>{throw e("rejected"),t}),this.setTimeout(()=>{e("pending")},100)});let e={};return Promise.race([t,e]).then(t=>t===e?"pending":"fulfilled",()=>"rejected")}requestIdleCallback(t,e={timeout:100}){let i=this.__requestIdleCallbackNative(t,e);return this.__requestsIdle.add(i),i}requestIdlePromise(t){return this.promise(e=>{let i=this.requestIdleCallback(()=>e(i),t)})}schedulerPostTask(t,e={delay:0,priority:"user-visible"}){let i=new AbortController;if(e.signal&&e.signal.addEventListener("abort",()=>i.abort()),this.__controllers.add(i),void 0!==globalThis.scheduler){let o=globalThis.scheduler.postTask(t,{...e,signal:i.signal});return o.finally(()=>{this.__controllers.delete(i)}).catch(()=>null),o}return this.promise((o,n)=>{let s=this.setTimeout(()=>{try{o(t())}catch(t){n(t)}this.__controllers.delete(i)},e.delay||1);i.signal.addEventListener("abort",()=>{this.clearTimeout(s),this.__controllers.delete(i),n((0,f.abort)())})})}schedulerYield(){return this.schedulerPostTask(()=>{},{priority:"user-visible"})}cancelIdleCallback(t){return this.__requestsIdle.delete(t),this.__cancelIdleCallbackNative(t)}requestAnimationFrame(t){let e=requestAnimationFrame(t);return this.__requestsRaf.add(e),e}cancelAnimationFrame(t){this.__requestsRaf.delete(t),cancelAnimationFrame(t)}clear(){this.__requestsIdle.forEach(t=>this.cancelIdleCallback(t)),this.__requestsRaf.forEach(t=>this.cancelAnimationFrame(t)),this.__controllers.forEach(t=>t.abort()),this.timers.forEach(t=>(0,s.clearTimeout)(this.timers.get(t))),this.timers.clear(),this.promisesRejections.forEach(t=>t()),this.promisesRejections.clear()}destruct(){this.clear(),this.isDestructed=!0}constructor(){(0,o._)(this,"timers",new Map),(0,o._)(this,"__callbacks",new Map),(0,o._)(this,"__queueMicrotaskNative",queueMicrotask?.bind(window)??Promise.resolve().then.bind(Promise.resolve())),(0,o._)(this,"promisesRejections",new Set),(0,o._)(this,"__requestsIdle",new Set),(0,o._)(this,"__controllers",new Set),(0,o._)(this,"__requestsRaf",new Set),(0,o._)(this,"__requestIdleCallbackNative",window.requestIdleCallback?.bind(window)??((t,e)=>{let i=Date.now();return this.setTimeout(()=>{t({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-i))})},e?.timeout??1)})),(0,o._)(this,"__cancelIdleCallbackNative",window.cancelIdleCallback?.bind(window)??(t=>{this.clearTimeout(t)})),(0,o._)(this,"isDestructed",!1)}}},91231:function(t,e,i){"use strict";i.d(e,{Async:function(){return o.Async}});var o=i(24735)},80251:function(t,e,i){"use strict";i.d(e,{Component:function(){return c}});var o=i(25045),n=i(91231),s=i(69364),r=i(28077),a=i(65946);let l=new Map;class c{get componentName(){return this.__componentName||(this.__componentName="jodit-"+(0,a.kebabCase)(((0,a.isFunction)(this.className)?this.className():"")||(0,a.getClassName)(this))),this.__componentName}getFullElName(t,e,i){let o=[this.componentName];return t&&o.push("__"+(t=t.replace(/[^a-z0-9-]/gi,"-"))),e&&(o.push("_",e),o.push("_",(0,a.isVoid)(i)?"true":i.toString())),o.join("")}get ownerDocument(){return this.ow.document}get od(){return this.ownerDocument}get ow(){return this.ownerWindow}get(t,e){return(0,a.get)(t,e||this)}get isReady(){return this.componentStatus===s.STATUSES.ready}get isDestructed(){return this.componentStatus===s.STATUSES.destructed}get isInDestruct(){return s.STATUSES.beforeDestruct===this.componentStatus||s.STATUSES.destructed===this.componentStatus}bindDestruct(t){return t.hookStatus(s.STATUSES.beforeDestruct,()=>!this.isInDestruct&&this.destruct()),this}destruct(){this.setStatus(s.STATUSES.destructed),this.async&&(this.async.destruct(),this.async=void 0),l.get(this)&&l.delete(this),this.ownerWindow=void 0}get componentStatus(){return this.__componentStatus}set componentStatus(t){this.setStatus(t)}setStatus(t){return this.setStatusComponent(t,this)}setStatusComponent(t,e){if(t===this.__componentStatus)return;e===this&&(this.__componentStatus=t);let i=Object.getPrototypeOf(this);i&&(0,a.isFunction)(i.setStatusComponent)&&i.setStatusComponent(t,e);let o=l.get(this),n=o?.[t];n&&n.length&&n.forEach(t=>t(e))}hookStatus(t,e){let i=l.get(this);i||(i={},l.set(this,i)),i[t]||(i[t]=[]),i[t].push(e)}static isInstanceOf(t,e){return t instanceof e}constructor(){(0,o._)(this,"__componentName",void 0),(0,o._)(this,"async",new n.Async),(0,o._)(this,"uid",void 0),(0,o._)(this,"ownerWindow",window),(0,o._)(this,"__componentStatus",s.STATUSES.beforeInit),this.uid="jodit-uid-"+(0,r.uniqueUid)()}}(0,o._)(c,"STATUSES",s.STATUSES)},16964:function(t,e,i){"use strict";i.d(e,{Component:function(){return o.Component},STATUSES:function(){return n.STATUSES},ViewComponent:function(){return s.ViewComponent}});var o=i(80251),n=i(69364),s=i(59609)},69364:function(t,e,i){"use strict";i.d(e,{STATUSES:function(){return o}});let o={beforeInit:"beforeInit",ready:"ready",beforeDestruct:"beforeDestruct",destructed:"destructed"}},59609:function(t,e,i){"use strict";i.d(e,{ViewComponent:function(){return s}});var o=i(25045),n=i(80251);class s extends n.Component{get j(){return this.jodit}get defaultTimeout(){return this.j.defaultTimeout}i18n(t,...e){return this.j.i18n(t,...e)}setParentView(t){return this.jodit=t,t.components.add(this),this}destruct(){return this.j.components.delete(this),super.destruct()}constructor(t){super(),(0,o._)(this,"jodit",void 0),this.setParentView(t)}}},81937:function(t,e,i){"use strict";i.r(e),i.d(e,{ACCURACY:function(){return U},APP_VERSION:function(){return o},BASE_PATH:function(){return td},BASE_PATH_IS_MIN:function(){return tp},BR:function(){return V},CLIPBOARD_ID:function(){return tg},COMMAND_KEYS:function(){return W},EMULATE_DBLCLICK_TIMEOUT:function(){return te},ES:function(){return n},FAT_MODE:function(){return c},HOMEPAGE:function(){return u},INSEPARABLE_TAGS:function(){return x},INSERT_AS_HTML:function(){return ti},INSERT_AS_TEXT:function(){return tn},INSERT_CLEAR_HTML:function(){return to},INSERT_ONLY_TEXT:function(){return ts},INVISIBLE_SPACE:function(){return p},INVISIBLE_SPACE_REG_EXP:function(){return m},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 s},IS_ES_NEXT:function(){return r},IS_IE:function(){return X},IS_INLINE:function(){return E},IS_MAC:function(){return ta},IS_PROD:function(){return a},IS_TEST:function(){return l},KEY_ALIASES:function(){return tl},KEY_ALT:function(){return M},KEY_BACKSPACE:function(){return j},KEY_DELETE:function(){return q},KEY_DOWN:function(){return B},KEY_ENTER:function(){return P},KEY_ESC:function(){return A},KEY_F3:function(){return F},KEY_LEFT:function(){return N},KEY_META:function(){return k},KEY_RIGHT:function(){return R},KEY_SPACE:function(){return O},KEY_TAB:function(){return L},KEY_UP:function(){return z},LIST_TAGS:function(){return I},MARKER_CLASS:function(){return tt},MODE_SOURCE:function(){return G},MODE_SPLIT:function(){return K},MODE_WYSIWYG:function(){return Y},NBSP_SPACE:function(){return f},NEARBY:function(){return H},NO_EMPTY_TAGS:function(){return D},PARAGRAPH:function(){return $},PASSIVE_EVENTS:function(){return tv},SAFE_COUNT_CHANGE_CALL:function(){return tr},SET_TEST:function(){return h},SOURCE_CONSUMER:function(){return t_},SPACE_REG_EXP:function(){return v},SPACE_REG_EXP_END:function(){return y},SPACE_REG_EXP_START:function(){return b},TEMP_ATTR:function(){return tf},TEXT_HTML:function(){return Z},TEXT_PLAIN:function(){return J},TEXT_RTF:function(){return Q},TOKENS:function(){return d},globalDocument:function(){return S},globalWindow:function(){return w},lang:function(){return tm}});let o="4.11.4",n="es2021",s=!0,r=!0,a=!0,l=!1,c=!0,u="https://xdsoft.net/jodit/",h=()=>l=!0,d={},p="\uFEFF",f=" ",m=()=>/[\uFEFF]/g,g=()=>/[\uFEFF]+$/g,_=()=>/^[\uFEFF]+/g,v=()=>/[\s\n\t\r\uFEFF\u200b]+/g,b=()=>/^[\s\n\t\r\uFEFF\u200b]+/g,y=()=>/[\s\n\t\r\uFEFF\u200b]+$/g,w="u">typeof window?window:void 0,S="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([...T,"br","hr"]),D=new Set(T),k="Meta",j="Backspace",L="Tab",P="Enter",A="Escape",M="Alt",N="ArrowLeft",z="ArrowUp",R="ArrowRight",B="ArrowDown",O="Space",q="Delete",F="F3",H=5,U=10,W=[k,j,q,z,B,R,N,P,A,F,L],V="br",$="p",Y=1,G=2,K=3,X="u">typeof navigator&&(-1!==navigator.userAgent.indexOf("MSIE")||/rv:11.0/i.test(navigator.userAgent)),J=X?"text":"text/plain",Z=X?"html":"text/html",Q=X?"rtf":"text/rtf",tt="jodit-selection_marker",te=300,ti="insert_as_html",to="insert_clear_html",tn="insert_as_text",ts="insert_only_text",tr=10,ta=void 0!==w&&/Mac|iPod|iPhone|iPad/.test(w.navigator.platform),tl={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:ta?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:"space",spacebar:"space",up:"arrowup",win:"meta",windows:"meta"},tc=t=>{let e=t.split("/");return/\.js/.test(e[e.length-1])?{basePath:e.slice(0,e.length-1).join("/")+"/",isMin:!0}:{basePath:t,isMin:!0}},{basePath:tu,isMin:th}=(()=>{if("u"<typeof document)return{basePath:"",isMin:!0};let t=S.currentScript;if(t)return tc(t.src);let e=S.querySelectorAll("script[src]");return e&&e.length?tc(e[e.length-1].src):tc(w.location.href)})(),td=tu,tp=th,tf="data-jodit-temp",tm={},tg="clipboard",t_="source-consumer",tv=new Set(["touchstart","touchend","scroll","mousewheel","mousemove","touchmove"])},76517:function(t,e,i){"use strict";i.d(e,{Create:function(){return l}});var o=i(25045),n=i(81937),s=i(23211),r=i(65946),a=i(28712);class l{get doc(){return(0,r.isFunction)(this.document)?this.document():this.document}element(t,e,i){let o=this.doc.createElement(t.toLowerCase());return this.applyCreateAttributes(o),e&&((0,r.isPlainObject)(e)?(0,r.attr)(o,e):i=e),i&&(0,r.asArray)(i).forEach(t=>o.appendChild((0,r.isString)(t)?this.fromHTML(t):t)),o}div(t,e,i){let o=this.element("div",e,i);return t&&(o.className=t),o}sandbox(){let t=this.element("iframe",{sandbox:"allow-same-origin"});this.doc.body.appendChild(t);let e=t.contentWindow?.document;if((0,a.assert)(e,"iframe.contentWindow.document"),!e)throw Error("Iframe error");return e.open(),e.write("<!DOCTYPE html><html><head></head><body></body></html>"),e.close(),[e.body,t]}span(t,e,i){let o=this.element("span",e,i);return t&&(o.className=t),o}a(t,e,i){let o=this.element("a",e,i);return t&&(o.className=t),o}text(t){return this.doc.createTextNode(t)}fake(){return this.text(n.INVISIBLE_SPACE)}fragment(){return this.doc.createDocumentFragment()}fromHTML(t,e){let i=this.div();i.innerHTML=t.toString();let o=i.firstChild===i.lastChild&&i.firstChild?i.firstChild:i;if(s.Dom.safeRemove(o),e){let t=(0,r.refs)(o);Object.keys(e).forEach(i=>{let o=t[i];o&&!1===e[i]&&s.Dom.hide(o)})}return o}applyCreateAttributes(t){if(this.createAttributes){let e=this.createAttributes;if(e&&e[t.tagName.toLowerCase()]){let i=e[t.tagName.toLowerCase()];(0,r.isFunction)(i)?i(t):(0,r.isPlainObject)(i)&&(0,r.attr)(t,i)}}}constructor(t,e){(0,o._)(this,"document",void 0),(0,o._)(this,"createAttributes",void 0),this.document=t,this.createAttributes=e}}},79821:function(t,e,i){"use strict";i.d(e,{Create:function(){return o.Create}});var o=i(76517)},49574:function(t,e,i){"use strict";i.d(e,{autobind:function(){return n}});var o=i(91565);function n(t,e,i){if(!(0,o.isFunction)(i.value))throw TypeError(`@autobind can only be applied to methods, but "${e}" is not a function`);let n=i.value;return{configurable:!0,get(){let t=n.bind(this);return Object.defineProperty(this,e,{value:t,configurable:!0,writable:!0}),t}}}},51676:function(t,e,i){"use strict";i.d(e,{cache:function(){return l},cacheHTML:function(){return c},cached:function(){return a}});var o=i(69364),n=i(23211),s=i(28686),r=i(38027);function a(t,e){let i=Object.getOwnPropertyDescriptor(t,e);return!i||(0,s.isFunction)(i.get)?null:i.value}function l(t,e,i){let o=i.get;if(!o)throw(0,r.error)("Getter property descriptor expected");i.get=function(){let t=o.call(this);return t&&!0===t.noCache||Object.defineProperty(this,e,{configurable:i.configurable,enumerable:i.enumerable,writable:!1,value:t}),t}}function c(t,e,i){let a=i.value;if(!(0,s.isFunction)(a))throw(0,r.error)("Handler must be a Function");let l=!0,c=new WeakMap;i.value=function(...t){if(l&&c.has(this.constructor))return c.get(this.constructor)?.cloneNode(!0);let e=a.apply(this,t);return l&&n.Dom.isElement(e)&&c.set(this.constructor,e),l?e.cloneNode(!0):e},t.hookStatus(o.STATUSES.ready,t=>{l=!!((0,s.isViewObject)(t)?t:t.jodit).options.cache})}},91672:function(t,e,i){"use strict";i.d(e,{component:function(){return r},getComponentClass:function(){return a}});var o=i(81937),n=i(421);let s=new Map;function r(t){class e extends t{constructor(...t){super(...t),this.constructor===e&&(this instanceof e||Object.setPrototypeOf(this,e.prototype),this.setStatus("ready"))}}let i=(0,n.getClassName)(t.prototype);if(s.has(i)&&!o.IS_PROD)throw Error(`Component with name "${i}" is already registered`);return s.set(i,e),e}function a(t){return s.get(t)}},55184:function(t,e,i){"use strict";i.d(e,{debounce:function(){return a},throttle:function(){return l}});var o=i(16964),n=i(28686),s=i(28712),r=i(33201);function a(t,e=!1,i="debounce"){return(a,l)=>{let c=a[l];if(!(0,n.isFunction)(c))throw(0,r.error)("Handler must be a Function");return a.hookStatus(o.STATUSES.ready,o=>{let{async:r}=o;(0,s.assert)(null!=r,`Component ${o.componentName||o.constructor.name} should have "async:IAsync" field`);let a=(0,n.isFunction)(t)?t(o):t,c=(0,n.isNumber)(a)||(0,n.isPlainObject)(a)?a:o.defaultTimeout;Object.defineProperty(o,l,{configurable:!0,value:r[i](o[l].bind(o),c,e)})}),{configurable:!0,get(){return c.bind(this)}}}}function l(t,e=!1){return a(t,e,"throttle")}},24968:function(t,e,i){"use strict";i.d(e,{derive:function(){return n}});var o=i(91565);function n(...t){return e=>{let i=e.prototype;for(let e=0;e<t.length;e++){let n=t[e],s=Object.getOwnPropertyNames(n.prototype);for(let t=0;t<s.length;t++){let e=s[t],r=Object.getOwnPropertyDescriptor(n.prototype,e);null!=r&&(0,o.isFunction)(r.value)&&!(0,o.isFunction)(i[e])&&Object.defineProperty(i,e,{enumerable:!0,configurable:!0,writable:!0,value:function(...t){return r.value.call(this,...t)}})}}}}},29200:function(t,e,i){"use strict";i.d(e,{hook:function(){return s}});var o=i(91565),n=i(33201);function s(t){return(e,i)=>{if(!(0,o.isFunction)(e[i]))throw(0,n.error)("Handler must be a Function");e.hookStatus(t,t=>{t[i].call(t)})}}},35718:function(t,e,i){"use strict";i.d(e,{idle:function(){return r}});var o=i(16964),n=i(91565),s=i(33201);function r(){return(t,e)=>{if(!(0,n.isFunction)(t[e]))throw(0,s.error)("Handler must be a Function");t.hookStatus(o.STATUSES.ready,t=>{let{async:i}=t,o=t[e];t[e]=(...e)=>i.requestIdleCallback(o.bind(t,...e))})}}},84839:function(t,e,i){"use strict";i.r(e),i.d(e,{autobind:function(){return o.autobind},cache:function(){return n.cache},cacheHTML:function(){return n.cacheHTML},cached:function(){return n.cached},component:function(){return s.component},debounce:function(){return r.debounce},derive:function(){return a.derive},getComponentClass:function(){return s.getComponentClass},hook:function(){return l.hook},idle:function(){return c.idle},nonenumerable:function(){return u.nonenumerable},persistent:function(){return h.persistent},throttle:function(){return r.throttle},wait:function(){return d.wait},watch:function(){return p.watch}});var o=i(49574),n=i(51676),s=i(91672),r=i(55184),a=i(24968),l=i(29200),c=i(35718),u=i(41360),h=i(77036),d=i(80840),p=i(68616)},41360:function(t,e,i){"use strict";i.d(e,{nonenumerable:function(){return o}});let o=(t,e)=>{!1!==(Object.getOwnPropertyDescriptor(t,e)||{}).enumerable&&Object.defineProperty(t,e,{enumerable:!1,set(t){Object.defineProperty(this,e,{enumerable:!1,writable:!0,value:t})}})}},77036:function(t,e,i){"use strict";i.d(e,{persistent:function(){return s}});var o=i(69364),n=i(31534);function s(t,e){t.hookStatus(o.STATUSES.ready,t=>{let i=(0,n.isViewObject)(t)?t:t.jodit,o=`${i.options.namespace}${t.componentName}_prop_${e}`,s=t[e];Object.defineProperty(t,e,{get:()=>i.storage.get(o)??s,set(t){i.storage.set(o,t)}})})}},80840:function(t,e,i){"use strict";i.d(e,{wait:function(){return r}});var o=i(69364),n=i(91565),s=i(33201);function r(t){return(e,i)=>{let r=e[i];if(!(0,n.isFunction)(r))throw(0,s.error)("Handler must be a Function");e.hookStatus(o.STATUSES.ready,e=>{let{async:o}=e,n=e[i],s=0;Object.defineProperty(e,i,{configurable:!0,value:function i(...r){o.clearTimeout(s),t(e)?n.apply(e,r):s=o.setTimeout(()=>i(...r),10)}})})}}},68616:function(t,e,i){"use strict";i.d(e,{watch:function(){return h}});var o=i(69364),n=i(70535),s=i(32328),r=i(91565),a=i(62101),l=i(31534),c=i(33201),u=i(71125);function h(t,e){return(i,h)=>{if(!(0,r.isFunction)(i[h]))throw(0,c.error)("Handler must be a Function");let d=e?.immediately??!0,p=e?.context,f=e=>{let o=(0,l.isViewObject)(e)?e:e.jodit,c=(t,...i)=>{if(!e.isInDestruct)return e[h](t,...i)};d||(c=e.async.microDebounce(c,!0)),(0,s.splitArray)(t).forEach(t=>{if(/:/.test(t)){let[i,n]=t.split(":"),s=p;i.length&&(s=e.get(i)),(0,r.isFunction)(s)&&(s=s(e)),o.events.on(s||e,n,c),s||o.events.on(n,c),e.hookStatus("beforeDestruct",()=>{o.events.off(s||e,n,c).off(n,c)});return}let s=t.split("."),[l]=s,h=s.slice(1),d=e[l];(0,a.isPlainObject)(d)&&(0,n.observable)(d).on("change."+h.join("."),c);let f=(0,u.getPropertyDescriptor)(i,l);Object.defineProperty(e,l,{configurable:!0,set(t){let i=d;i!==t&&(d=t,f&&f.set&&f.set.call(e,t),(0,a.isPlainObject)(d)&&(d=(0,n.observable)(d)).on("change."+h.join("."),c),c(l,i,d))},get:()=>f&&f.get?f.get.call(e):d})})};(0,r.isFunction)(i.hookStatus)?i.hookStatus(o.STATUSES.ready,f):f(i)}}},23211:function(t,e,i){"use strict";i.d(e,{Dom:function(){return v}});var o=i(81937),n=i(88475),s=i(17312),r=i(91565),a=i(46248),l=i(3213),c=i(85932),u=i(18303),h=i(4040),d=i(28712),p=i(7909),f=i(80991),m=i(36400),g=i(33201),_=i(71125);class v{static detach(t){for(;t&&t.firstChild;)t.removeChild(t.firstChild)}static wrapNextInline(t,e,i){let o,n=t;i.s.save();let s=!1;do s=!1,(o=n.nextSibling)&&!v.isBlock(o)&&!v.isTag(o,"br")&&(s=!0,n=o);while(s)return v.__wrapElements(e,i,t,n)}static __wrapElements(t,e,i,o){let n=(0,c.isString)(t)?e.createInside.element(t):t;i.parentNode&&i.parentNode.insertBefore(n,i);let s=i;for(;s&&(s=i.nextSibling,n.appendChild(i),i!==o&&s);)i=s;return e.s.restore(),n}static wrapInline(t,e,i){let o,n=t,s=t;i.s.save();let r=!1;do r=!1,(o=n.previousSibling)&&!v.isBlock(o)&&(r=!0,n=o);while(r)do r=!1,(o=s.nextSibling)&&!v.isBlock(o)&&(r=!0,s=o);while(r)return v.__wrapElements(e,i,n,s)}static wrap(t,e,i){let o=(0,c.isString)(e)?i.element(e):e;if(v.isNode(t)){if(!t.parentNode)throw(0,g.error)("Element should be in DOM");t.parentNode.insertBefore(o,t),o.appendChild(t)}else{let e=t.extractContents();t.insertNode(o),o.appendChild(e)}return o}static unwrap(t){let e=t.parentNode;if(e){for(;t.firstChild;)e.insertBefore(t.firstChild,t);v.safeRemove(t)}}static between(t,e,i){let o=t;for(;o&&o!==e&&!(t!==o&&i(o));){let t=o.firstChild||o.nextSibling;if(!t){for(;o&&!o.nextSibling;)o=o.parentNode;t=o?.nextSibling}o=t}}static replace(t,e,i,o=!1,s=!1){let r;if((0,a.isHTML)(e)&&((0,d.assert)(i,"Need create instance for new tag"),e=i.fromHTML(e)),(0,c.isString)(e)?((0,d.assert)(i,"Need create instance for new tag"),r=i.element(e)):r=e,!s)for(;t.firstChild;)r.appendChild(t.firstChild);return o&&v.isElement(t)&&v.isElement(r)&&(0,n.toArray)(t.attributes).forEach(t=>{r.setAttribute(t.name,t.value)}),t.parentNode&&t.parentNode.replaceChild(r,t),r}static isEmptyTextNode(t){return v.isText(t)&&(!t.nodeValue||0===t.nodeValue.replace(o.INVISIBLE_SPACE_REG_EXP(),"").trim().length)}static isEmptyContent(t){return v.each(t,t=>v.isEmptyTextNode(t))}static isContentEditable(t,e){return v.isNode(t)&&!v.closest(t,t=>v.isElement(t)&&"false"===t.getAttribute("contenteditable"),e)}static isEmpty(t,e=o.NO_EMPTY_TAGS){let i;if(!t)return!0;i=(0,r.isFunction)(e)?e:t=>e.has(t.nodeName.toLowerCase());let n=t=>null==t.nodeValue||0===(0,h.trim)(t.nodeValue).length;return v.isText(t)?n(t):!(v.isElement(t)&&i(t))&&v.each(t,t=>{if(v.isText(t)&&!n(t)||v.isElement(t)&&i(t))return!1})}static isNode(t){return!!(t&&(0,c.isString)(t.nodeName)&&"number"==typeof t.nodeType&&t.childNodes&&(0,r.isFunction)(t.appendChild))}static isCell(t){return v.isNode(t)&&("TD"===t.nodeName||"TH"===t.nodeName)}static isList(t){return v.isTag(t,o.LIST_TAGS)}static isLeaf(t){return v.isTag(t,"li")}static isImage(t){return v.isNode(t)&&/^(img|svg|picture|canvas)$/i.test(t.nodeName)}static isBlock(t){return!(0,u.isVoid)(t)&&"object"==typeof t&&v.isNode(t)&&o.IS_BLOCK.test(t.nodeName)}static isText(t){return!!(t&&t.nodeType===Node.TEXT_NODE)}static isComment(t){return!!(t&&t.nodeType===Node.COMMENT_NODE)}static isElement(t){return!!v.isNode(t)&&!!(t.ownerDocument?.defaultView&&t.nodeType===Node.ELEMENT_NODE)}static isFragment(t){return!!v.isNode(t)&&!!(t.ownerDocument?.defaultView&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE)}static isHTMLElement(t){if(!v.isNode(t))return!1;let e=t.ownerDocument?.defaultView;return!!(e&&t instanceof e.HTMLElement)}static isInlineBlock(t){return v.isElement(t)&&!/^(BR|HR)$/i.test(t.tagName)&&-1!==["inline","inline-block"].indexOf((0,f.css)(t,"display").toString())}static canSplitBlock(t){return!(0,u.isVoid)(t)&&v.isHTMLElement(t)&&v.isBlock(t)&&!/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName)&&void 0!==t.style&&!/^(fixed|absolute)/i.test(t.style.position)}static last(t,e){let i=t?.lastChild;if(!i)return null;do{if(e(i))return i;let o=i.lastChild;if(o||(o=i.previousSibling),!o&&i.parentNode!==t){do i=i.parentNode;while(i&&!i?.previousSibling&&i.parentNode!==t)o=i?.previousSibling}i=o}while(i)return null}static prev(t,e,i,o=!0){return v.find(t,e,i,!1,o)}static next(t,e,i,o=!0){return v.find(t,e,i,!0,o)}static prevWithClass(t,e){return v.prev(t,t=>v.isElement(t)&&t.classList.contains(e),t.parentNode)}static nextWithClass(t,e){return v.next(t,t=>v.isElement(t)&&t.classList.contains(e),t.parentNode)}static find(t,e,i,o=!0,n=!0){let s=this.nextGen(t,i,o,n),r=s.next();for(;!r.done;){if(e(r.value))return r.value;r=s.next()}return null}static*nextGen(t,e,i=!0,o=!0){let n=[],s=t;do{let e=i?s.nextSibling:s.previousSibling;for(;e;)n.unshift(e),e=i?e.nextSibling:e.previousSibling;yield*this.runInStack(t,n,i,o),s=s.parentNode}while(s&&s!==e)return null}static each(t,e,i=!0){let o=this.eachGen(t,i),n=o.next();for(;!n.done;){if(!1===e(n.value))return!1;n=o.next()}return!0}static eachGen(t,e=!0){return this.runInStack(t,[t],e)}static*runInStack(t,e,i,o=!0){for(;e.length;){let n=e.pop();if(o){let t=i?n.lastChild:n.firstChild;for(;t;)e.push(t),t=i?t.previousSibling:t.nextSibling}t!==n&&(yield n)}}static findWithCurrent(t,e,i,o="nextSibling",n="firstChild"){let s=t;do{if(e(s))return s||null;if(n&&s&&s[n]){let t=v.findWithCurrent(s[n],e,s,o,n);if(t)return t}for(;s&&!s[o]&&s!==i;)s=s.parentNode;s&&s[o]&&s!==i&&(s=s[o])}while(s&&s!==i)return null}static findSibling(t,e=!0,i=t=>!v.isEmptyTextNode(t)){let o=v.sibling(t,e);for(;o&&!i(o);)o=v.sibling(o,e);return o&&i(o)?o:null}static findNotEmptySibling(t,e){return v.findSibling(t,e,t=>!v.isEmptyTextNode(t)&&!!(!v.isText(t)||t.nodeValue?.length&&(0,h.trim)(t.nodeValue)))}static findNotEmptyNeighbor(t,e,i){return(0,_.call)(e?v.prev:v.next,t,t=>!!(t&&(!(v.isText(t)||v.isComment(t))||(0,h.trim)(t?.nodeValue||"").length)),i)}static sibling(t,e){return e?t.previousSibling:t.nextSibling}static up(t,e,i,o=!1){let n=t;if(!n)return null;do{if(e(n))return n;if(n===i||!n.parentNode)break;n=n.parentNode}while(n&&n!==i)return n===i&&o&&e(n)?n:null}static closest(t,e,i){let o,n=t=>t.toLowerCase();if((0,r.isFunction)(e))o=e;else if((0,s.isArray)(e)||(0,l.isSet)(e)){let t=(0,l.isSet)(e)?e:new Set(e.map(n));o=e=>!!(e&&t.has(n(e.nodeName)))}else o=t=>!!(t&&n(e)===n(t.nodeName));return v.up(t,o,i)}static furthest(t,e,i){let o=null,n=t?.parentElement;for(;n&&n!==i;)e(n)&&(o=n),n=n?.parentElement;return o}static appendChildFirst(t,e){let i=t.firstChild;i?i!==e&&t.insertBefore(e,i):t.appendChild(e)}static after(t,e){let{parentNode:i}=t;i&&(i.lastChild===t?i.appendChild(e):i.insertBefore(e,t.nextSibling))}static before(t,e){let{parentNode:i}=t;i&&i.insertBefore(e,t)}static prepend(t,e){t.insertBefore(e,t.firstChild)}static append(t,e){(0,s.isArray)(e)?e.forEach(e=>{this.append(t,e)}):t.appendChild(e)}static moveContent(t,e,i=!1,s=()=>!0){let r=(t.ownerDocument||o.globalDocument).createDocumentFragment();(0,n.toArray)(t.childNodes).filter(t=>!!s(t)||(v.safeRemove(t),!1)).forEach(t=>{r.appendChild(t)}),i&&e.firstChild?e.insertBefore(r,e.firstChild):e.appendChild(r)}static isOrContains(t,e,i=!1){return t===e?!i:!!(e&&t&&this.up(e,e=>e===t,t,!0))}static safeRemove(...t){t.forEach(t=>v.isNode(t)&&t.parentNode&&t.parentNode.removeChild(t))}static safeInsertNode(t,e){t.collapsed||t.deleteContents();let i=v.isFragment(e)?e.lastChild:e;t.startContainer===t.endContainer&&t.collapsed&&v.isTag(t.startContainer,o.INSEPARABLE_TAGS)?v.after(t.startContainer,e):(t.insertNode(e),i&&t.setStartBefore(i)),t.collapse(!0),[e.nextSibling,e.previousSibling].forEach(t=>v.isText(t)&&!t.nodeValue&&v.safeRemove(t))}static hide(t){t&&((0,m.dataBind)(t,"__old_display",t.style.display),t.style.display="none")}static show(t){if(!t)return;let e=(0,m.dataBind)(t,"__old_display");"none"===t.style.display&&(t.style.display=e||"")}static isTag(t,e){if(!this.isElement(t))return!1;let i=t.tagName.toLowerCase(),o=t.tagName.toUpperCase();if(e instanceof Set)return e.has(i)||e.has(o);if(Array.isArray(e))throw TypeError("Dom.isTag does not support array");return i===e||o===e}static markTemporary(t,e){return e&&(0,p.attr)(t,e),(0,p.attr)(t,o.TEMP_ATTR,!0),t}static isTemporary(t){return!!v.isElement(t)&&(v.isMarker(t)||"true"===(0,p.attr)(t,o.TEMP_ATTR))}static isMarker(t){return v.isNode(t)&&v.isTag(t,"span")&&t.hasAttribute("data-"+o.MARKER_CLASS)}static replaceTemporaryFromString(t){return t.replace(/<([a-z]+)[^>]+data-jodit-temp[^>]+>(.+?)<\/\1>/gi,"$2")}static temporaryList(t){return(0,n.toArray)(t.querySelectorAll(`[${o.TEMP_ATTR}]`))}constructor(){throw Error("Dom is static module")}}},27795:function(t,e,i){"use strict";i.d(e,{Dom:function(){return o.Dom},LazyWalker:function(){return n.LazyWalker}});var o=i(23211),n=i(1080)},1080:function(t,e,i){"use strict";i.d(e,{LazyWalker:function(){return l}});var o=i(25045),n=i(31635),s=i(49574),r=i(23211),a=i(60216);class l extends a.Eventify{setWork(t){return this.isWorked&&this.break(),this.workNodes=r.Dom.eachGen(t,!this.options.reverse),this.isFinished=!1,this._requestStarting(),this}_requestStarting(){this.__schedulerController=new AbortController,this.async.schedulerPostTask(this.__workPerform,{delay:this.options.timeout,signal:this.__schedulerController.signal}).catch(()=>null)}break(t){this.isWorked&&(this.stop(),this.emit("break",t))}end(){this.isWorked&&(this.stop(),this.emit("end",this.hadAffect),this.hadAffect=!1)}stop(){this.isWorked=!1,this.isFinished=!0,this.workNodes=null,this.async.cancelIdleCallback(this.idleId)}destruct(){super.destruct(),this.stop()}__workPerform(){if(this.workNodes){this.isWorked=!0;let t=0,e=this.options.timeoutChunkSize??50;for(;!this.isFinished&&t<=e;){let e=this.workNodes.next();if(t+=1,this.visitNode(e.value)&&(this.hadAffect=!0),e.done)return void this.end()}}else this.end();this.isFinished||this._requestStarting()}visitNode(t){return!!t&&(void 0===this.options.whatToShow||t.nodeType===this.options.whatToShow)&&(this.emit("visit",t)??!1)}constructor(t,e={}){super(),(0,o._)(this,"async",void 0),(0,o._)(this,"options",void 0),(0,o._)(this,"workNodes",void 0),(0,o._)(this,"hadAffect",void 0),(0,o._)(this,"isWorked",void 0),(0,o._)(this,"isFinished",void 0),(0,o._)(this,"idleId",void 0),(0,o._)(this,"__schedulerController",void 0),this.async=t,this.options=e,this.workNodes=null,this.hadAffect=!1,this.isWorked=!1,this.isFinished=!1,this.idleId=0,this.__schedulerController=null}}(0,n.__decorate)([s.autobind],l.prototype,"__workPerform",null)},93747:function(t,e,i){"use strict";i.d(e,{EventEmitter:function(){return h}});var o=i(25045),n=i(81937),s=i(32328),r=i(17312),a=i(91565),l=i(85932),c=i(33201),u=i(18869);class h{mute(t){return this.__mutedEvents.add(t??"*"),this}isMuted(t){return!!(t&&this.__mutedEvents.has(t))||this.__mutedEvents.has("*")}unmute(t){return this.__mutedEvents.delete(t??"*"),this}__eachEvent(t,e){(0,s.splitArray)(t).map(t=>t.trim()).forEach(t=>{let i=t.split("."),o=i[1]||u.defaultNameSpace;e.call(this,i[0],o)})}__getStore(t){if(!t)throw(0,c.error)("Need subject");if(void 0===t[this.__key]){let e=new u.EventHandlersStore;Object.defineProperty(t,this.__key,{enumerable:!1,configurable:!0,writable:!0,value:e})}return t[this.__key]}__removeStoreFromSubject(t){void 0!==t[this.__key]&&Object.defineProperty(t,this.__key,{enumerable:!1,configurable:!0,writable:!0,value:void 0})}__triggerNativeEvent(t,e){let i=this.__doc.createEvent("HTMLEvents");(0,l.isString)(e)?i.initEvent(e,!0,!0):(i.initEvent(e.type,e.bubbles,e.cancelable),["screenX","screenY","clientX","clientY","target","srcElement","currentTarget","timeStamp","which","keyCode"].forEach(t=>{Object.defineProperty(i,t,{value:e[t],enumerable:!0})}),Object.defineProperty(i,"originalEvent",{value:e,enumerable:!0})),t.dispatchEvent(i)}get current(){return this.currents[this.currents.length-1]}on(t,e,i,o){let s,u,h,p;if((0,l.isString)(t)||(0,l.isStringArray)(t)?(s=this,u=t,h=e,p=i):(s=t,u=e,h=i,p=o),!((0,l.isString)(u)||(0,l.isStringArray)(u))||0===u.length)throw(0,c.error)("Need events names");if(!(0,a.isFunction)(h))throw(0,c.error)("Need event handler");if((0,r.isArray)(s))return s.forEach(t=>{this.on(t,u,h,p)}),this;let f=s,m=this.__getStore(f),g=this,_=function(t,...e){if(!g.isMuted(t))return h&&h.call(this,...e)};return d(f)&&(_=function(t){if(!g.isMuted(t.type)&&(g.__prepareEvent(t),h&&!1===h.call(this,t)))return t.preventDefault(),t.stopImmediatePropagation(),!1}),this.__eachEvent(u,(t,e)=>{if(0===t.length)throw(0,c.error)("Need event name");if(!1===m.indexOf(t,e,h)){let i={event:t,originalCallback:h,syntheticCallback:_};if(m.set(t,e,i,p?.top),d(f)){let e=n.PASSIVE_EVENTS.has(t)?{passive:!0,capture:p?.capture??!1}:p?.capture??!1;_.options=e,f.addEventListener(t,_,e),this.__memoryDOMSubjectToHandler(f,_)}}}),this}__memoryDOMSubjectToHandler(t,e){let i=this.__domEventsMap.get(t)||new Set;i.add(e),this.__domEventsMap.set(t,i)}__unmemoryDOMSubjectToHandler(t,e){let i=this.__domEventsMap,o=i.get(t)||new Set;o.delete(e),o.size?i.set(t,o):i.delete(t)}one(t,e,i,o){let n,s,r,a;(0,l.isString)(t)||(0,l.isStringArray)(t)?(n=this,s=t,r=e,a=i):(n=t,s=e,r=i,a=o);let c=(...t)=>(this.off(n,s,c),r(...t));return this.on(n,s,c,a),this}off(t,e,i){let o,n,s;if((0,l.isString)(t)||(0,l.isStringArray)(t)?(o=this,n=t,s=e):(o=t,n=e,s=i),(0,r.isArray)(o))return o.forEach(t=>{this.off(t,n,s)}),this;let c=o,h=this.__getStore(c);if(!((0,l.isString)(n)||(0,l.isStringArray)(n))||0===n.length)return h.namespaces().forEach(t=>{this.off(c,"."+t)}),this.__removeStoreFromSubject(c),this;let p=t=>{d(c)&&(c.removeEventListener(t.event,t.syntheticCallback,t.syntheticCallback.options??!1),this.__unmemoryDOMSubjectToHandler(c,t.syntheticCallback))},f=(t,e)=>{if(""===t)return void h.events(e).forEach(t=>{""!==t&&f(t,e)});let i=h.get(t,e);if(i&&i.length)if((0,a.isFunction)(s)){let o=h.indexOf(t,e,s);!1!==o&&(p(i[o]),i.splice(o,1),i.length||h.clearEvents(e,t))}else i.forEach(p),i.length=0,h.clearEvents(e,t)};return this.__eachEvent(n,(t,e)=>{e===u.defaultNameSpace?h.namespaces().forEach(e=>{f(t,e)}):f(t,e)}),h.isEmpty()&&this.__removeStoreFromSubject(c),this}stopPropagation(t,e){let i=(0,l.isString)(t)?this:t,o=(0,l.isString)(t)?t:e;if("string"!=typeof o)throw(0,c.error)("Need event names");let n=this.__getStore(i);this.__eachEvent(o,(t,e)=>{let o=n.get(t,e);o&&this.__stopped.push(o),e===u.defaultNameSpace&&n.namespaces(!0).forEach(e=>this.stopPropagation(i,t+"."+e))})}__removeStop(t){if(t){let e=this.__stopped.indexOf(t);-1!==e&&this.__stopped.splice(0,e+1)}}__isStopped(t){return void 0!==t&&-1!==this.__stopped.indexOf(t)}fire(t,e,...i){let o,n,s=(0,l.isString)(t)?this:t,r=(0,l.isString)(t)?t:e,a=(0,l.isString)(t)?[e,...i]:i;if(!d(s)&&!(0,l.isString)(r))throw(0,c.error)("Need events names");let h=this.__getStore(s);return!(0,l.isString)(r)&&d(s)?this.__triggerNativeEvent(s,e):this.__eachEvent(r,(t,e)=>{if(d(s))this.__triggerNativeEvent(s,t);else{let i=h.get(t,e);if(i)try{[...i].every(e=>!this.__isStopped(i)&&(this.currents.push(t),n=e.syntheticCallback.call(s,t,...a),this.currents.pop(),void 0!==n&&(o=n),!0))}finally{this.__removeStop(i)}e!==u.defaultNameSpace||d(s)||h.namespaces().filter(t=>t!==e).forEach(e=>{let i=this.fire.apply(this,[s,t+"."+e,...a]);void 0!==i&&(o=i)})}}),o}destruct(){this.__isDestructed||(this.__isDestructed=!0,this.__domEventsMap.forEach((t,e)=>{this.off(e)}),this.__domEventsMap.clear(),this.__mutedEvents.clear(),this.currents.length=0,this.__stopped.length=0,this.off(this),this.__getStore(this).clear(),this.__removeStoreFromSubject(this))}constructor(t){(0,o._)(this,"__domEventsMap",new Map),(0,o._)(this,"__mutedEvents",new Set),(0,o._)(this,"__key","__JoditEventEmitterNamespaces"),(0,o._)(this,"__doc",n.globalDocument),(0,o._)(this,"__prepareEvent",t=>{!t.cancelBubble&&(t.composed&&(0,a.isFunction)(t.composedPath)&&t.composedPath()[0]&&Object.defineProperty(t,"target",{value:t.composedPath()[0],configurable:!0,enumerable:!0}),t.type.match(/^touch/)&&t.changedTouches&&t.changedTouches.length&&["clientX","clientY","pageX","pageY"].forEach(e=>{Object.defineProperty(t,e,{value:t.changedTouches[0][e],configurable:!0,enumerable:!0})}),t.originalEvent||(t.originalEvent=t),"paste"===t.type&&void 0===t.clipboardData&&this.__doc.defaultView.clipboardData&&Object.defineProperty(t,"clipboardData",{get:()=>this.__doc.defaultView.clipboardData,configurable:!0,enumerable:!0}))}),(0,o._)(this,"currents",[]),(0,o._)(this,"__stopped",[]),(0,o._)(this,"__isDestructed",!1),t&&(this.__doc=t),this.__key+=new Date().getTime()}}function d(t){return(0,a.isFunction)(t.addEventListener)}},60216:function(t,e,i){"use strict";i.d(e,{Eventify:function(){return n}});var o=i(25045);class n{on(t,e){return this.__map.has(t)||this.__map.set(t,new Set),this.__map.get(t)?.add(e),this}off(t,e){return this.__map.has(t)&&this.__map.get(t)?.delete(e),this}destruct(){this.__map.clear()}emit(t,...e){let i;return this.__map.has(t)&&this.__map.get(t)?.forEach(t=>{i=t(...e)}),i}constructor(){(0,o._)(this,"__map",new Map)}}},42689:function(t,e,i){"use strict";i.d(e,{eventEmitter:function(){return o}});let o=new(i(93747)).EventEmitter},1496:function(t,e,i){"use strict";i.d(e,{EventEmitter:function(){return o.EventEmitter},EventHandlersStore:function(){return r.EventHandlersStore},Eventify:function(){return n.Eventify},defaultNameSpace:function(){return r.defaultNameSpace},observable:function(){return s.observable}});var o=i(93747),n=i(60216),s=i(70535),r=i(18869)},70535:function(t,e,i){"use strict";i.d(e,{observable:function(){return c}});var o=i(17312),n=i(94013),s=i(62101),r=i(71125);let a=Symbol("observable-object");function l(t){return void 0!==t[a]}function c(t){if(l(t))return t;let e={},i={},c=(e,n)=>((0,o.isArray)(e)?e.map(t=>c(t,n)):(i[e]||(i[e]=[]),i[e].push(n)),t),u=(n,...s)=>{if((0,o.isArray)(n))return void n.map(t=>u(t,...s));try{!e[n]&&i[n]&&(e[n]=!0,i[n].forEach(e=>e.call(t,...s)))}finally{e[n]=!1}},h=(e,i=[])=>{let o={};l(e)||(Object.defineProperty(e,a,{enumerable:!1,value:!0}),Object.keys(e).forEach(a=>{let l=i.concat(a).filter(t=>t.length);o[a]=e[a];let c=(0,r.getPropertyDescriptor)(e,a);Object.defineProperty(e,a,{set(e){let i=o[a];if(!(0,n.isFastEqual)(o[a],e)){u(["beforeChange","beforeChange."+l.join(".")],a,e),(0,s.isPlainObject)(e)&&h(e,l),c&&c.set?c.set.call(t,e):o[a]=e;let n=[];u(["change",...l.reduce((t,e)=>(n.push(e),t.push("change."+n.join(".")),t),[])],l.join("."),i,e?.valueOf?e.valueOf():e)}},get:()=>c&&c.get?c.get.call(t):o[a],enumerable:!0,configurable:!0}),(0,s.isPlainObject)(o[a])&&h(o[a],l)}),Object.defineProperty(t,"on",{value:c}))};return h(t),t}},18869:function(t,e,i){"use strict";i.d(e,{EventHandlersStore:function(){return a},defaultNameSpace:function(){return r}});var o=i(25045),n=i(88475),s=i(28712);let r="JoditEventDefaultNamespace";class a{get(t,e){if(this.__store.has(e)){let i=this.__store.get(e);return(0,s.assert)(i,"-"),i[t]}}indexOf(t,e,i){let o=this.get(t,e);if(o){for(let t=0;t<o.length;t+=1)if(o[t].originalCallback===i)return t}return!1}namespaces(t=!1){let e=(0,n.toArray)(this.__store.keys());return t?e.filter(t=>t!==r):e}events(t){let e=this.__store.get(t);return e?Object.keys(e):[]}set(t,e,i,o=!1){let n=this.__store.get(e);n||(n={},this.__store.set(e,n)),void 0===n[t]&&(n[t]=[]),o?n[t].unshift(i):n[t].push(i)}clear(){this.__store.clear()}clearEvents(t,e){let i=this.__store.get(t);i&&i[e]&&(delete i[e],Object.keys(i).length||this.__store.delete(t))}isEmpty(){return 0===this.__store.size}constructor(){(0,o._)(this,"__store",new Map)}}},28077:function(t,e,i){"use strict";i.d(e,{eventEmitter:function(){return C},extendLang:function(){return b},getContainer:function(){return w},getPopupViewRoot:function(){return S},instances:function(){return p},modules:function(){return v},pluginSystem:function(){return _},uniqueUid:function(){return g}});var o=i(24497),n=i(85932),s=i(31534),r=i(74264),a=i(80991),l=i(421),c=i(85305),u=i(42689),h=i(81937),d=i(27795);let p={},f=1,m=new Set;function g(){function t(){return Math.round(f+=10*(Math.random()+1)).toString(16)}let e=t();for(;m.has(e);)e=t();return m.add(e),e}let _=new c.PluginSystem({getContainer:w}),v={},b=t=>{Object.keys(t).forEach(e=>{h.lang[e]?Object.assign(h.lang[e],t[e]):h.lang[e]=t[e]})},y=new WeakMap;function w(t,e,i="div",a=!1){let c=(0,n.isString)(e)?e:e?(0,l.getClassName)(e.prototype):"jodit-utils",u=y.get(t)||{},h=c+i,p=(0,s.isViewObject)(t)?t:t.j,f=null;if(!u[h]){let e=p.c;if(f=S(p.o,p.container,t.od.body),a&&(0,o.isJoditObject)(t)&&t.od!==t.ed){e=t.createInside;let n="style"===i?t.ed.head:t.ed.body;f=(0,o.isJoditObject)(t)&&t.o.shadowRoot?t.o.shadowRoot:n}let n=e.element(i,{className:`jodit jodit-${(0,r.kebabCase)(c)}-container jodit-box`});n.classList.add("jodit_theme_"+(p.o.theme||"default")),f.appendChild(n),u[h]=n,t.hookStatus("beforeDestruct",()=>{p.events.off(n),d.Dom.safeRemove(n),delete u[h],Object.keys(u).length&&y.delete(t)}),y.set(t,u),p.events.fire("getContainer",n)}return u[h].classList.remove("jodit_theme_default","jodit_theme_dark"),u[h].classList.add("jodit_theme_"+(p.o.theme||"default")),u[h]}function S(t,e,i){return t.popupRoot??t.shadowRoot??d.Dom.closest(e,t=>d.Dom.isHTMLElement(t)&&(d.Dom.isTag(t,"dialog")||["fixed","absolute"].includes((0,a.css)(t,"position"))),i)??i}let C=u.eventEmitter},78982:function(t,e,i){"use strict";i.d(e,{asArray:function(){return n}});var o=i(17312);let n=t=>(0,o.isArray)(t)?t:[t]},45664:function(t,e,i){"use strict";i.d(e,{asArray:function(){return o.asArray},splitArray:function(){return n.splitArray},toArray:function(){return s.toArray}});var o=i(78982),n=i(32328),s=i(88475)},32328:function(t,e,i){"use strict";function o(t){return Array.isArray(t)?t:t.split(/[,\s]+/)}i.d(e,{splitArray:function(){return o}})},88475:function(t,e,i){"use strict";i.d(e,{toArray:function(){return s}});var o=i(23283),n=i(43379);let s=function(...t){return((0,o.isNativeFunction)(Array.from)?Array.from:(0,n.reset)("Array.from")??Array.from).apply(Array,t)}},61077:function(t,e,i){"use strict";i.d(e,{clearTimeout:function(){return o.clearTimeout},setTimeout:function(){return o.setTimeout}});var o=i(79947)},79947:function(t,e,i){"use strict";i.d(e,{clearTimeout:function(){return s},setTimeout:function(){return n}});var o=i(81937);function n(t,e,...i){return e?o.globalWindow.setTimeout(t,e,...i):(t.call(null,...i),0)}function s(t){o.globalWindow.clearTimeout(t)}},98740:function(t,e,i){"use strict";i.d(e,{hasBrowserColorPicker:function(){return n}});var o=i(81937);function n(){let t=!0;try{let e=o.globalDocument.createElement("input");e.type="color",e.value="!",t="color"===e.type&&"!"!==e.value}catch(e){t=!1}return t}},28686:function(t,e,i){"use strict";i.d(e,{hasBrowserColorPicker:function(){return o.hasBrowserColorPicker},hasContainer:function(){return h.hasContainer},isAbortError:function(){return n.isAbortError},isArray:function(){return s.isArray},isBoolean:function(){return r.isBoolean},isDestructable:function(){return h.isDestructable},isEqual:function(){return a.isEqual},isFastEqual:function(){return a.isFastEqual},isFunction:function(){return l.isFunction},isHTML:function(){return c.isHTML},isHtmlFromWord:function(){return u.isHtmlFromWord},isInitable:function(){return h.isInitable},isInt:function(){return d.isInt},isJoditObject:function(){return p.isJoditObject},isLicense:function(){return f.isLicense},isMarker:function(){return m.isMarker},isNativeFunction:function(){return g.isNativeFunction},isNumber:function(){return _.isNumber},isNumeric:function(){return v.isNumeric},isPlainObject:function(){return b.isPlainObject},isPromise:function(){return y.isPromise},isSet:function(){return w.isSet},isString:function(){return S.isString},isStringArray:function(){return S.isStringArray},isURL:function(){return C.isURL},isValidName:function(){return E.isValidName},isViewObject:function(){return I.isViewObject},isVoid:function(){return T.isVoid},isWindow:function(){return x.isWindow}});var o=i(98740),n=i(72068),s=i(17312),r=i(22289),a=i(94013),l=i(91565),c=i(46248),u=i(82166),h=i(52433),d=i(99732),p=i(24497),f=i(44998),m=i(23175),g=i(23283),_=i(72412),v=i(70222),b=i(62101),y=i(52100),w=i(3213),S=i(85932),C=i(91764),E=i(50083),I=i(31534),T=i(18303),x=i(3513)},72068:function(t,e,i){"use strict";function o(t){return!!t&&t instanceof DOMException&&"AbortError"===t.name}i.d(e,{isAbortError:function(){return o}})},17312:function(t,e,i){"use strict";function o(t){return Array.isArray(t)}i.d(e,{isArray:function(){return o}})},22289:function(t,e,i){"use strict";function o(t){return"boolean"==typeof t}i.d(e,{isBoolean:function(){return o}})},94013:function(t,e,i){"use strict";i.d(e,{isEqual:function(){return n},isFastEqual:function(){return s}});var o=i(3347);function n(t,e){return t===e||(0,o.stringify)(t)===(0,o.stringify)(e)}function s(t,e){return t===e}},91565:function(t,e,i){"use strict";function o(t){return"function"==typeof t}i.d(e,{isFunction:function(){return o}})},82166:function(t,e,i){"use strict";function o(t){return -1!==t.search(/<meta.*?Microsoft Excel\s[\d].*?>/)||-1!==t.search(/<meta.*?Microsoft Word\s[\d].*?>/)||-1!==t.search(/style="[^"]*mso-/)&&-1!==t.search(/<font/)}i.d(e,{isHtmlFromWord:function(){return o}})},46248:function(t,e,i){"use strict";i.d(e,{isHTML:function(){return n}});var o=i(85932);let n=t=>(0,o.isString)(t)&&/<([A-Za-z][A-Za-z0-9]*)\b[^>]*>(.*?)<\/\1>/m.test(t.replace(/[\r\n]/g,""))},52433:function(t,e,i){"use strict";i.d(e,{hasContainer:function(){return l},isDestructable:function(){return a},isInitable:function(){return r}});var o=i(23211),n=i(91565),s=i(18303);function r(t){return!(0,s.isVoid)(t)&&(0,n.isFunction)(t.init)}function a(t){return!(0,s.isVoid)(t)&&(0,n.isFunction)(t.destruct)}function l(t){return!(0,s.isVoid)(t)&&o.Dom.isElement(t.container)}},99732:function(t,e,i){"use strict";i.d(e,{isInt:function(){return s}});var o=i(70222),n=i(85932);function s(t){return(0,n.isString)(t)&&(0,o.isNumeric)(t)&&(t=parseFloat(t)),"number"==typeof t&&Number.isFinite(t)&&!(t%1)}},24497:function(t,e,i){"use strict";i.d(e,{isJoditObject:function(){return n}});var o=i(91565);function n(t){return!!(t&&t instanceof Object&&(0,o.isFunction)(t.constructor)&&("u">typeof Jodit&&t instanceof Jodit||t.isJodit))}},44998:function(t,e,i){"use strict";i.d(e,{isLicense:function(){return n}});var o=i(85932);let n=t=>(0,o.isString)(t)&&23===t.length&&/^[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}$/i.test(t)},23175:function(t,e,i){"use strict";i.d(e,{isMarker:function(){return n}});var o=i(23211);function n(t){return o.Dom.isMarker(t)}},23283:function(t,e,i){"use strict";function o(t){return!!t&&"function"===(typeof t).toLowerCase()&&(t===Function.prototype||/^\s*function\s*(\b[a-z$_][a-z0-9$_]*\b)*\s*\((|([a-z$_][a-z0-9$_]*)(\s*,[a-z$_][a-z0-9$_]*)*)\)\s*{\s*\[native code]\s*}\s*$/i.test(t+""))}i.d(e,{isNativeFunction:function(){return o}})},72412:function(t,e,i){"use strict";function o(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}i.d(e,{isNumber:function(){return o}})},70222:function(t,e,i){"use strict";i.d(e,{isNumeric:function(){return n}});var o=i(85932);function n(t){if((0,o.isString)(t)){if(!t.match(/^([+-])?[0-9]+(\.?)([0-9]+)?(e[0-9]+)?$/))return!1;t=parseFloat(t)}return"number"==typeof t&&!isNaN(t)&&isFinite(t)}},62101:function(t,e,i){"use strict";i.d(e,{isPlainObject:function(){return n}});var o=i(3513);function n(t){return!(!t||"object"!=typeof t||t.nodeType||(0,o.isWindow)(t))&&!(t.constructor&&!({}).hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))}},52100:function(t,e,i){"use strict";function o(t){return t&&"function"==typeof t.then}i.d(e,{isPromise:function(){return o}})},3213:function(t,e,i){"use strict";i.d(e,{isSet:function(){return n}});var o=i(91565);function n(t){return!!t&&(0,o.isFunction)(t.has)&&(0,o.isFunction)(t.add)&&(0,o.isFunction)(t.delete)}},85932:function(t,e,i){"use strict";i.d(e,{isString:function(){return n},isStringArray:function(){return s}});var o=i(17312);function n(t){return"string"==typeof t}function s(t){return(0,o.isArray)(t)&&n(t[0])}},91764:function(t,e,i){"use strict";i.d(e,{isURL:function(){return n}});var o=i(81937);function n(t){if(t.includes(" "))return!1;if("u">typeof URL)try{let e=new URL(t);return["https:","http:","ftp:","file:","rtmp:"].includes(e.protocol)}catch(t){return!1}let e=o.globalDocument.createElement("a");return e.href=t,!!e.hostname}},50083:function(t,e,i){"use strict";function o(t){return!!t.length&&!/[^0-9A-Za-zа-яА-ЯЁё\w\-_. ]/.test(t)&&t.trim().length>0}i.d(e,{isValidName:function(){return o}})},31534:function(t,e,i){"use strict";i.d(e,{isViewObject:function(){return n}});var o=i(91565);function n(t){return!!(t&&t instanceof Object&&(0,o.isFunction)(t.constructor)&&t.isView)}},18303:function(t,e,i){"use strict";function o(t){return null==t}i.d(e,{isVoid:function(){return o}})},3513:function(t,e,i){"use strict";function o(t){return null!=t&&t===t.window}i.d(e,{isWindow:function(){return o}})},93387:function(t,e,i){"use strict";i.d(e,{colorToHex:function(){return o}});let o=t=>{if("rgba(0, 0, 0, 0)"===t||""===t)return!1;if(!t)return"#000000";if("#"===t.substr(0,1))return t;let e=/([\s\n\t\r]*?)rgb\((\d+), (\d+), (\d+)\)/.exec(t)||/([\s\n\t\r]*?)rgba\((\d+), (\d+), (\d+), ([\d.]+)\)/.exec(t);if(!e)return"#000000";let i=parseInt(e[2],10),o=parseInt(e[3],10),n=(parseInt(e[4],10)|o<<8|i<<16).toString(16).toUpperCase();for(;n.length<6;)n="0"+n;return e[1]+"#"+n}},7018:function(t,e,i){"use strict";i.d(e,{colorToHex:function(){return o.colorToHex}});var o=i(93387)},30893:function(t,e,i){"use strict";i.d(e,{applyStyles:function(){return l}});var o=i(81937),n=i(23211),s=i(4040),r=i(28723);function a(t){return t.replace(/mso-[a-z-]+:[\s]*[^;]+;/gi,"").replace(/mso-[a-z-]+:[\s]*[^";']+$/gi,"").replace(/border[a-z-]*:[\s]*[^;]+;/gi,"").replace(/([0-9.]+)(pt|cm)/gi,(t,e,i)=>{switch(i.toLowerCase()){case"pt":return(1.328*parseFloat(e)).toFixed(0)+"px";case"cm":return(.02645833*parseFloat(e)).toFixed(0)+"px"}return t})}function l(t){if(-1===t.indexOf("<html "))return t;t=(t=t.substring(t.indexOf("<html "),t.length)).substring(0,t.lastIndexOf("</html>")+7);let e=o.globalDocument.createElement("iframe");e.style.display="none",o.globalDocument.body.appendChild(e);let i="";try{let l=e.contentDocument||(e.contentWindow?e.contentWindow.document:null);if(l){l.open(),l.write(t),l.close();try{for(let t=0;t<l.styleSheets.length;t+=1){let e=l.styleSheets[t].cssRules;for(let t=0;t<e.length;t+=1)""!==e[t].selectorText&&(0,r.$$)(e[t].selectorText,l.body).forEach(i=>{i.style.cssText=a(e[t].style.cssText+";"+i.style.cssText)})}}catch(t){if(!o.IS_PROD)throw t}n.Dom.each(l.body,t=>{if(n.Dom.isElement(t)){let e=t.getAttribute("style");e&&(t.style.cssText=a(e)),t.hasAttribute("style")&&!t.getAttribute("style")&&t.removeAttribute("style")}}),i=l.firstChild?(0,s.trim)(l.body.innerHTML):""}}catch{}finally{n.Dom.safeRemove(e)}return i&&(t=i),(0,s.trim)(t.replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(/<!--[^>]*>/g,""))}},1277:function(t,e,i){"use strict";i.d(e,{cleanFromWord:function(){return a}});var o=i(81937),n=i(23211),s=i(88475),r=i(4040);function a(t){-1!==t.indexOf("<html ")&&(t=(t=t.substring(t.indexOf("<html "),t.length)).substring(0,t.lastIndexOf("</html>")+7));let e="";try{let i=o.globalDocument.createElement("div");i.innerHTML=t;let r=[];i.firstChild&&n.Dom.each(i,t=>{if(t)switch(t.nodeType){case Node.ELEMENT_NODE:switch(t.nodeName){case"STYLE":case"LINK":case"META":r.push(t);break;case"W:SDT":case"W:SDTPR":case"FONT":n.Dom.unwrap(t);break;default:(0,s.toArray)(t.attributes).forEach(e=>{-1===["src","href","rel","content"].indexOf(e.name.toLowerCase())&&t.removeAttribute(e.name)})}break;case Node.TEXT_NODE:break;default:r.push(t)}}),n.Dom.safeRemove.apply(null,r),e=i.innerHTML}catch(t){}return e&&(t=e),(t=t.split(/(\n)/).filter(r.trim).join(`
|
|
10
|
+
`)).replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(/<!--[^>]*>/g,"")}},6609:function(t,e,i){"use strict";i.d(e,{htmlspecialchars:function(){return n}});var o=i(81937);function n(t){let e=o.globalDocument.createElement("div");return e.textContent=t,e.innerHTML}},82658:function(t,e,i){"use strict";i.d(e,{applyStyles:function(){return o.applyStyles},cleanFromWord:function(){return n.cleanFromWord},htmlspecialchars:function(){return s.htmlspecialchars},nl2br:function(){return r.nl2br},safeHTML:function(){return a.safeHTML},sanitizeHTMLElement:function(){return a.sanitizeHTMLElement},stripTags:function(){return l.stripTags}});var o=i(30893),n=i(1277),s=i(6609),r=i(48838),a=i(48155),l=i(22852)},48838:function(t,e,i){"use strict";function o(t){return t.replace(/\r\n|\r|\n/g,"<br/>")}i.d(e,{nl2br:function(){return o}})},48155:function(t,e,i){"use strict";i.d(e,{safeHTML:function(){return s},sanitizeHTMLElement:function(){return a}});var o=i(23211),n=i(93640);function s(t,e){(o.Dom.isElement(t)||o.Dom.isFragment(t))&&(e.removeEventAttributes??e.removeOnError?(r(t),(0,n.$$)("*",t).forEach(t=>r(t))):e.removeOnError&&(a(t,e),(0,n.$$)("[onerror]",t).forEach(t=>a(t,e))),e.safeJavaScriptLink&&(a(t,e),(0,n.$$)('a[href^="javascript"]',t).forEach(t=>a(t,e))),e.safeLinksTarget&&(0,n.$$)('a[target="_blank"]',t).forEach(t=>{let e=(t.getAttribute("rel")||"").split(/\s+/).filter(Boolean);e.includes("noopener")||e.push("noopener"),e.includes("noreferrer")||e.push("noreferrer"),(0,n.attr)(t,"rel",e.join(" "))}))}function r(t){if(!o.Dom.isElement(t))return!1;let e=!1,i=[];for(let e=0;e<t.attributes.length;e++)t.attributes[e].name.toLowerCase().startsWith("on")&&i.push(t.attributes[e].name);for(let o of i)t.removeAttribute(o),e=!0;return e}function a(t,{safeJavaScriptLink:e,removeOnError:i}={safeJavaScriptLink:!0,removeOnError:!0}){if(!o.Dom.isElement(t))return!1;let s=!1;i&&t.hasAttribute("onerror")&&((0,n.attr)(t,"onerror",null),s=!0);let r=t.getAttribute("href");return e&&r&&0===r.trim().indexOf("javascript")&&((0,n.attr)(t,"href",location.protocol+"//"+r),s=!0),s}},22852:function(t,e,i){"use strict";i.d(e,{stripTags:function(){return function t(e,i=document,u=null){let h=i.createElement("div");return(0,n.isString)(e)?h.innerHTML=e:h.appendChild(e),(0,r.$$)("*",h).forEach(e=>{let n=e.parentNode;if(!n)return;if(u&&o.Dom.isTag(e,u)){let n=e.nodeName.toLowerCase(),s=o.Dom.isTag(e,c)?`%%%jodit-single-${n}%%%`:`%%%jodit-${n}%%%${t(e.innerHTML,i,u)}%%%/jodit-${n}%%%`;o.Dom.before(e,i.createTextNode(s)),o.Dom.safeRemove(e);return}if(o.Dom.isTag(e,l))return void o.Dom.safeRemove(e);if(!o.Dom.isTag(e,a))return;let s=e.nextSibling;!(o.Dom.isText(s)&&/^\s/.test(s.nodeValue||""))&&s&&n.insertBefore(i.createTextNode(" "),s)}),(0,s.trim)(h.innerText).replace(/%%%(\/)?jodit(-single)?-([\w\n]+)%%%/g,(t,e,i,o)=>`<${e?"/":""}${o}>`)}}});var o=i(23211),n=i(85932),s=i(4040),r=i(93640);let a=new Set(["div","p","br","h1","h2","h3","h4","h5","h6","hr"]),l=new Set(["script","style"]),c=new Set(["br","hr","input"])},65946:function(t,e,i){"use strict";i.r(e),i.d(e,{CamelCaseToKebabCase:function(){return u.CamelCaseToKebabCase},NUMBER_FIELDS_REG:function(){return l.NUMBER_FIELDS_REG},applyStyles:function(){return a.applyStyles},asArray:function(){return o.asArray},camelCase:function(){return u.camelCase},cleanFromWord:function(){return a.cleanFromWord},clearTimeout:function(){return n.clearTimeout},colorToHex:function(){return r.colorToHex},fuzzySearchIndex:function(){return u.fuzzySearchIndex},getContentWidth:function(){return c.getContentWidth},getScrollParent:function(){return c.getScrollParent},hasBrowserColorPicker:function(){return s.hasBrowserColorPicker},hasContainer:function(){return s.hasContainer},htmlspecialchars:function(){return a.htmlspecialchars},i18n:function(){return u.i18n},innerWidth:function(){return c.innerWidth},isAbortError:function(){return s.isAbortError},isArray:function(){return s.isArray},isBoolean:function(){return s.isBoolean},isDestructable:function(){return s.isDestructable},isEqual:function(){return s.isEqual},isFastEqual:function(){return s.isFastEqual},isFunction:function(){return s.isFunction},isHTML:function(){return s.isHTML},isHtmlFromWord:function(){return s.isHtmlFromWord},isInitable:function(){return s.isInitable},isInt:function(){return s.isInt},isJoditObject:function(){return s.isJoditObject},isLicense:function(){return s.isLicense},isMarker:function(){return s.isMarker},isNativeFunction:function(){return s.isNativeFunction},isNumber:function(){return s.isNumber},isNumeric:function(){return s.isNumeric},isPlainObject:function(){return s.isPlainObject},isPromise:function(){return s.isPromise},isSet:function(){return s.isSet},isString:function(){return s.isString},isStringArray:function(){return s.isStringArray},isURL:function(){return s.isURL},isValidName:function(){return s.isValidName},isViewObject:function(){return s.isViewObject},isVoid:function(){return s.isVoid},isWindow:function(){return s.isWindow},kebabCase:function(){return u.kebabCase},nl2br:function(){return a.nl2br},normalizeColor:function(){return l.normalizeColor},normalizeCssNumericValue:function(){return l.normalizeCssNumericValue},normalizeCssValue:function(){return l.normalizeCssValue},normalizeKeyAliases:function(){return l.normalizeKeyAliases},normalizeLicense:function(){return l.normalizeLicense},normalizePath:function(){return l.normalizePath},normalizeRelativePath:function(){return l.normalizeRelativePath},normalizeSize:function(){return l.normalizeSize},normalizeUrl:function(){return l.normalizeUrl},offset:function(){return c.offset},position:function(){return c.position},safeHTML:function(){return a.safeHTML},sanitizeHTMLElement:function(){return a.sanitizeHTMLElement},setTimeout:function(){return n.setTimeout},size:function(){return c.size},splitArray:function(){return o.splitArray},sprintf:function(){return u.sprintf},stringify:function(){return u.stringify},stripTags:function(){return a.stripTags},toArray:function(){return o.toArray},trim:function(){return u.trim},trimChars:function(){return u.trimChars},trimInv:function(){return u.trimInv},ucfirst:function(){return u.ucfirst}});var o=i(45664),n=i(61077),s=i(28686),r=i(7018),a=i(82658),l=i(97022),c=i(86878),u=i(97642),h=i(93640),d={};for(var p in h)0>["default","asArray","splitArray","toArray","clearTimeout","setTimeout","hasBrowserColorPicker","hasContainer","isAbortError","isArray","isBoolean","isDestructable","isEqual","isFastEqual","isFunction","isHTML","isHtmlFromWord","isInitable","isInt","isJoditObject","isLicense","isMarker","isNativeFunction","isNumber","isNumeric","isPlainObject","isPromise","isSet","isString","isStringArray","isURL","isValidName","isViewObject","isVoid","isWindow","colorToHex","applyStyles","cleanFromWord","htmlspecialchars","nl2br","safeHTML","sanitizeHTMLElement","stripTags","NUMBER_FIELDS_REG","normalizeColor","normalizeCssNumericValue","normalizeCssValue","normalizeKeyAliases","normalizeLicense","normalizePath","normalizeRelativePath","normalizeSize","normalizeUrl","getContentWidth","getScrollParent","innerWidth","offset","position","size","CamelCaseToKebabCase","camelCase","fuzzySearchIndex","i18n","kebabCase","sprintf","stringify","trim","trimChars","trimInv","ucfirst"].indexOf(p)&&(d[p]=(function(t){return h[t]}).bind(0,p));i.d(e,d)},97022:function(t,e,i){"use strict";i.d(e,{NUMBER_FIELDS_REG:function(){return n.NUMBER_FIELDS_REG},normalizeColor:function(){return o.normalizeColor},normalizeCssNumericValue:function(){return n.normalizeCssNumericValue},normalizeCssValue:function(){return n.normalizeCssValue},normalizeKeyAliases:function(){return s.normalizeKeyAliases},normalizeLicense:function(){return r.normalizeLicense},normalizePath:function(){return a.normalizePath},normalizeRelativePath:function(){return l.normalizeRelativePath},normalizeSize:function(){return c.normalizeSize},normalizeUrl:function(){return u.normalizeUrl}});var o=i(77367),n=i(19147),s=i(27978),r=i(49663),a=i(18377),l=i(96340),c=i(98831),u=i(48009)},77367:function(t,e,i){"use strict";i.d(e,{normalizeColor:function(){return s}});var o=i(93387),n=i(4040);let s=t=>{let e=["#"],i=(0,o.colorToHex)(t);if(!i)return!1;if(3===(i=(i=(0,n.trim)(i.toUpperCase())).substring(1)).length){for(let t=0;t<3;t+=1)e.push(i[t]),e.push(i[t]);return e.join("")}return i.length>6&&(i=i.slice(0,6)),"#"+i}},19147:function(t,e,i){"use strict";i.d(e,{NUMBER_FIELDS_REG:function(){return a},normalizeCssNumericValue:function(){return l},normalizeCssValue:function(){return c}});var o=i(70222),n=i(18303),s=i(93387),r=i(74264);let a=/^(left|top|bottom|right|width|min|max|height|margin|padding|fontsize|font-size)/i;function l(t,e){return!(0,n.isVoid)(e)&&a.test(t)&&(0,o.isNumeric)(e.toString())?parseInt(e.toString(),10)+"px":e}function c(t,e){if("font-weight"===(0,r.kebabCase)(t)){switch(e.toString().toLowerCase()){case"700":case"bold":return 700;case"400":case"normal":return 400;case"900":case"heavy":return 900}return(0,o.isNumeric)(e)?Number(e):e}return/color/i.test(t)&&/^rgb/i.test(e.toString())&&(0,s.colorToHex)(e.toString())||e}},27978:function(t,e,i){"use strict";i.d(e,{normalizeKeyAliases:function(){return s}});var o=i(81937),n=i(4040);function s(t){let e={},i={meta:1,ctrl:2,control:2,alt:3,shift:4,space:5};return t.replace(/\+\+/g,"+add").split(/[\s]*\+[\s]*/).map(t=>(0,n.trim)(t.toLowerCase())).map(t=>o.KEY_ALIASES[t]||t).sort((t,e)=>i[t]&&!i[e]?-1:!i[t]&&i[e]?1:i[t]&&i[e]?i[t]-i[e]:t>e?1:-1).filter(t=>!e[t]&&""!==t&&(e[t]=!0)).join("+")}},49663:function(t,e,i){"use strict";i.d(e,{normalizeLicense:function(){return o}});let o=(t,e=8)=>{let i=[];for(;t.length;)i.push(t.substr(0,e)),t=t.substr(e);return i[1]=i[1].replace(/./g,"*"),i[2]=i[2].replace(/./g,"*"),i.join("-")}},18377:function(t,e,i){"use strict";i.d(e,{normalizePath:function(){return n}});var o=i(4040);let n=(...t)=>t.filter(t=>(0,o.trim)(t).length).map((e,i)=>(e=e.replace(/([^:])[\\/]+/g,"$1/"),i&&(e=e.replace(/^\//,"")),i!==t.length-1&&(e=e.replace(/\/$/,"")),e)).join("/")},96340:function(t,e,i){"use strict";i.d(e,{normalizeRelativePath:function(){return o}});let o=t=>t.split("/").reduce((t,e)=>{switch(e){case"":case".":break;case"..":t.pop();break;default:t.push(e)}return t},[]).join("/")+(t.endsWith("/")?"/":"")},98831:function(t,e,i){"use strict";i.d(e,{normalizeSize:function(){return o}});let o=(t,e)=>/^[0-9]+$/.test(t.toString())?t+e:t.toString()},48009:function(t,e,i){"use strict";i.d(e,{normalizeUrl:function(){return o}});let o=(...t)=>t.filter(t=>t.length).map(t=>t.replace(/\/$/,"")).join("/").replace(/([^:])[\\/]+/g,"$1/")},54447:function(t,e,i){"use strict";i.d(e,{getContentWidth:function(){return o}});let o=(t,e)=>{let i=e.getComputedStyle(t);return t.offsetWidth-parseInt(i.getPropertyValue("padding-left")||"0",10)-parseInt(i.getPropertyValue("padding-right")||"0",10)}},34027:function(t,e,i){"use strict";i.d(e,{getScrollParent:function(){return function t(e){if(!e)return null;let i=n.Dom.isHTMLElement(e),r=i&&(0,s.css)(e,"overflowY");return i&&"visible"!==r&&"hidden"!==r&&e.scrollHeight>=e.clientHeight?e:t(e.parentNode)||o.globalDocument.scrollingElement||o.globalDocument.body}}});var o=i(81937),n=i(23211),s=i(93640)},86878:function(t,e,i){"use strict";i.d(e,{getContentWidth:function(){return o.getContentWidth},getScrollParent:function(){return n.getScrollParent},innerWidth:function(){return s.innerWidth},offset:function(){return a.offset},position:function(){return l.position},size:function(){return r.size}});var o=i(54447),n=i(34027),s=i(83215),r=i(18073),a=i(69143),l=i(23599)},83215:function(t,e,i){"use strict";i.d(e,{innerWidth:function(){return o}});let o=(t,e)=>{let i=e.getComputedStyle(t);return t.clientWidth-(parseFloat(i.paddingLeft||"0")+parseFloat(i.paddingRight||"0"))}},18073:function(t,e,i){"use strict";i.d(e,{size:function(){return n}});var o=i(28686);function n(t){return(0,o.isString)(t)||(0,o.isArray)(t)?t.length:(0,o.isPlainObject)(t)?Object.keys(t).length:0}},69143:function(t,e,i){"use strict";i.d(e,{offset:function(){return o}});let o=(t,e,i,n=!1)=>{let s,r,a;try{s=t.getBoundingClientRect()}catch(t){s={top:0,bottom:0,left:0,right:0,width:0,height:0}}let l=i.body,c=i.documentElement||{clientTop:0,clientLeft:0,scrollTop:0,scrollLeft:0},u=i.defaultView||i.parentWindow,h=u.pageYOffset||c.scrollTop||l.scrollTop,d=u.pageXOffset||c.scrollLeft||l.scrollLeft,p=c.clientTop||l.clientTop||0,f=c.clientLeft||l.clientLeft||0,m=e.iframe;if(!n&&e&&e.options&&e.o.iframe&&m){let{top:t,left:i}=o(m,e,e.od,!0);r=s.top+t,a=s.left+i}else r=s.top+h-p,a=s.left+d-f;return{top:Math.round(r),left:Math.round(a),width:s.width,height:s.height}}},23599:function(t,e,i){"use strict";i.d(e,{position:function(){return function t(e,i,n=!1){let s=e.getBoundingClientRect(),r=s.left,a=s.top;if((0,o.isJoditObject)(i)&&i.iframe&&i.ed.body.contains(e)&&!n){let{left:e,top:o}=t(i.iframe,i,!0);r+=e,a+=o}return{left:Math.round(r),top:Math.round(a),width:Math.round(e.offsetWidth??s.width),height:Math.round(e.offsetHeight??s.height)}}}});var o=i(24497)},57821:function(t,e,i){"use strict";i.d(e,{camelCase:function(){return o}});let o=t=>t.replace(/([-_])(.)/g,(t,e,i)=>i.toUpperCase())},57626:function(t,e,i){"use strict";i.d(e,{fuzzySearchIndex:function(){return n}});var o=i(81937);function n(t,e,i=0,s=1){let r=0,a=0,l=-1,c=0,u=0;for(a=i;r<t.length&&a<e.length;)t[r].toLowerCase()===e[a].toLowerCase()?(r++,c++,u=0,-1===l&&(l=a)):r>0&&(u>=s&&e[a]!==o.INVISIBLE_SPACE?(r=0,l=-1,c=0,u=0,a--):(u++,c++)),a++;return r===t.length?[l,c]:[-1,0]}},18080:function(t,e,i){"use strict";i.d(e,{i18n:function(){return c},sprintf:function(){return l}});var o=i(81937),n=i(85932),s=i(99436),r=i(93640),a=i(5266);let l=(t,e)=>{if(!e||!e.length)return t;let i=/%([sd])/g,o=i.exec(t),n=t,s=0;for(;o&&void 0!==e[s];)n=n.replace(o[0],e[s].toString()),s+=1,o=i.exec(t);return n};function c(t,e,i){if(!(0,n.isString)(t))throw(0,r.error)("i18n: Need string in first argument");if(!t.length)return t;let c=!!i?.debugLanguage,u={},h=t=>e&&e.length?l(t,e):t,d=(0,r.defaultLanguage)(a.Config.defaultOptions.language,a.Config.defaultOptions.language),p=(0,r.defaultLanguage)(i?.language,d),f=e=>{if(!e)return;if((0,n.isString)(e[t]))return h(e[t]);let i=t.toLowerCase();if((0,n.isString)(e[i]))return h(e[i]);let o=(0,s.ucfirst)(t);if((0,n.isString)(e[o]))return h(e[o])};void 0!==o.lang[p]?u=o.lang[p]:c||(u=void 0!==o.lang[d]?o.lang[d]:o.lang.en);let m=i?.i18n;if(m&&m[p]){let t=f(m[p]);if(t)return t}return f(u)||(!c&&o.lang.en&&(0,n.isString)(o.lang.en[t])&&o.lang.en[t]?h(o.lang.en[t]):c?"{"+t+"}":(o.IS_PROD,h(t)))}},97642:function(t,e,i){"use strict";i.d(e,{CamelCaseToKebabCase:function(){return r.CamelCaseToKebabCase},camelCase:function(){return o.camelCase},fuzzySearchIndex:function(){return n.fuzzySearchIndex},i18n:function(){return s.i18n},kebabCase:function(){return r.kebabCase},sprintf:function(){return s.sprintf},stringify:function(){return a.stringify},trim:function(){return l.trim},trimChars:function(){return l.trimChars},trimInv:function(){return l.trimInv},ucfirst:function(){return c.ucfirst}});var o=i(57821),n=i(57626),s=i(18080),r=i(74264),a=i(3347),l=i(4040),c=i(99436)},74264:function(t,e,i){"use strict";i.d(e,{CamelCaseToKebabCase:function(){return n},kebabCase:function(){return o}});let o=t=>t.replace(/([A-Z])([A-Z])([a-z])/g,"$1-$2$3").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),n=t=>t.replace(/([A-Z])([A-Z])([a-z])/g,"$1-$2$3").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()},3347:function(t,e,i){"use strict";function o(t,e={}){if("object"!=typeof t)return t+"";let i=new Set(e.excludeKeys),n=new WeakMap;return JSON.stringify(t,(t,e)=>{if(!i.has(t)){if("object"==typeof e&&null!=e){if(n.get(e))return"[refObject]";n.set(e,!0)}return e}},e.prettify)}i.d(e,{stringify:function(){return o}})},4040:function(t,e,i){"use strict";i.d(e,{trim:function(){return n},trimChars:function(){return s},trimInv:function(){return r}});var o=i(81937);function n(t){return t.replace((0,o.SPACE_REG_EXP_END)(),"").replace((0,o.SPACE_REG_EXP_START)(),"")}function s(t,e){return t.replace(RegExp(`[${e}]+$`),"").replace(RegExp(`^[${e}]+`),"")}function r(t){return t.replace((0,o.INVISIBLE_SPACE_REG_EXP_END)(),"").replace((0,o.INVISIBLE_SPACE_REG_EXP_START)(),"")}},99436:function(t,e,i){"use strict";function o(t){return t.length?t[0].toUpperCase()+t.substring(1):""}i.d(e,{ucfirst:function(){return o}})},16849:function(t,e,i){"use strict";i.d(e,{alignElement:function(){return a},clearAlign:function(){return r},hAlignElement:function(){return s}});var o=i(27795),n=i(80991);function s(t,e){e&&"normal"!==e?"center"!==e?((0,n.css)(t,"float",e),(0,n.clearCenterAlign)(t)):(0,n.css)(t,{float:"",display:"block",marginLeft:"auto",marginRight:"auto"}):((0,n.css)(t,"float")&&-1!==["right","left"].indexOf((0,n.css)(t,"float").toString().toLowerCase())&&(0,n.css)(t,"float",""),(0,n.clearCenterAlign)(t))}function r(t){o.Dom.each(t,t=>{o.Dom.isHTMLElement(t)&&t.style.textAlign&&(t.style.textAlign="",t.style.cssText.trim().length||t.removeAttribute("style"))})}function a(t,e){if(o.Dom.isNode(e)&&o.Dom.isElement(e))switch(r(e),t.toLowerCase()){case"justifyfull":e.style.textAlign="justify";break;case"justifyright":e.style.textAlign="right";break;case"justifyleft":e.style.textAlign="left";break;case"justifycenter":e.style.textAlign="center"}}},47760:function(t,e,i){"use strict";i.d(e,{alreadyLoadedList:function(){return s},appendScriptAsync:function(){return a},appendStyleAsync:function(){return l},loadNext:function(){return function t(e,i,n=0){return(0,o.isString)(i[n])?a(e,i[n]).then(()=>t(e,i,n+1)):Promise.resolve()}},loadNextStyle:function(){return function t(e,i,n=0){return(0,o.isString)(i[n])?l(e,i[n]).then(()=>t(e,i,n+1)):Promise.resolve()}}});var o=i(85932),n=i(91321);let s=new Map,r=t=>(e,i)=>{if(s.has(i))return s.get(i);let o=t(e,i);return s.set(i,o),o},a=r((t,e)=>t.async.promise((i,o)=>{if(t.isInDestruct)return o();let s=t.c.element("script",{type:"text/javascript",crossorigin:"anonymous",referrerpolicy:"no-referrer",async:!0,src:(0,n.completeUrl)(e)});t.e.one(s,"error",o).one(s,"load",i),t.od.body.appendChild(s)})),l=r((t,e)=>t.async.promise((i,o)=>{if(t.isInDestruct)return o();let s=t.c.element("link");s.rel="stylesheet",s.media="all",s.crossOrigin="anonymous",t.isInDestruct||t.e.on(s,"load",()=>i(s)).on(s,"error",o),s.href=(0,n.completeUrl)(e),t.o.shadowRoot?t.o.shadowRoot.appendChild(s):t.od.body.appendChild(s)}))},7909:function(t,e,i){"use strict";i.d(e,{attr:function(){return function t(e,i,l){if(!e||!(0,o.isFunction)(e.getAttribute))return null;if(!(0,s.isString)(i))return Object.keys(i).forEach(o=>{let s=i[o];(0,n.isPlainObject)(s)&&"style"===o?(0,a.css)(e,s):("className"===o&&(o="class"),t(e,o,s))}),null;let c=(0,r.CamelCaseToKebabCase)(i);if(/^-/.test(c)){let i=t(e,"data"+c);if(i)return i;c=c.substr(1)}if(void 0!==l)if(null==l)e.hasAttribute(c)&&e.removeAttribute(c);else{let t=l.toString();return"IMG"===e.nodeName&&("width"===c||"height"===c)&&(t=t.replace("px","")),e.setAttribute(c,t),t}return e.getAttribute(c)}}});var o=i(91565),n=i(62101),s=i(85932),r=i(74264),a=i(80991)},26136:function(t,e,i){"use strict";i.d(e,{browser:function(){return o}});let o=t=>{let e=navigator.userAgent.toLowerCase(),i=/(firefox)[\s/]([\w.]+)/.exec(e)||/(chrome)[\s/]([\w.]+)/.exec(e)||/(webkit)[\s/]([\w.]+)/.exec(e)||/(opera)(?:.*version)[\s/]([\w.]+)/.exec(e)||/(msie)[\s]([\w.]+)/.exec(e)||/(trident)\/([\w.]+)/.exec(e)||0>e.indexOf("compatible")||[];return"version"===t?i[2]:"webkit"===t?"chrome"===i[1]||"webkit"===i[1]:"ff"===t?"firefox"===i[1]:"msie"===t?"trident"===i[1]||"msie"===i[1]:i[1]===t}},36833:function(t,e,i){"use strict";i.d(e,{buildQuery:function(){return n}});var o=i(62101);let n=(t,e)=>{let i=[],s=encodeURIComponent;for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)){let a=e?e+"["+r+"]":r,l=t[r];i.push((0,o.isPlainObject)(l)?n(l,a):s(a)+"="+s(l))}return i.join("&")}},91321:function(t,e,i){"use strict";i.d(e,{completeUrl:function(){return n}});var o=i(81937);let n=t=>("file:"===o.globalWindow.location.protocol&&/^\/\//.test(t)&&(t="https:"+t),t)},77483:function(t,e,i){"use strict";i.d(e,{ConfigDeepFlatten:function(){return function t(e){return(0,c.keys)(e,!1).reduce((i,o)=>(i[o]=(0,n.isPlainObject)(e[o])?t(e[o]):e[o],i),{})}},ConfigFlatten:function(){return u},ConfigProto:function(){return function t(e,i,c=0){if(Object.getPrototypeOf(e)!==Object.prototype)return e;let u=a.Config.defaultOptions;if((0,s.isString)(e.preset)){if(void 0!==u.presets[e.preset]){let t=u.presets[e.preset];Object.keys(t).forEach(i=>{(0,r.isVoid)(e[i])&&(e[i]=t[i])})}delete e.preset}let h={};return Object.keys(e).forEach(s=>{let r=e[s],a=i?i[s]:null;if((0,n.isPlainObject)(r)&&(0,n.isPlainObject)(a)&&!(0,l.isAtom)(r)){h[s]=t(r,a,c+1);return}if(0!==c&&(0,o.isArray)(r)&&!(0,l.isAtom)(r)&&(0,o.isArray)(a)){h[s]=[...r,...a.slice(r.length)];return}h[s]=r}),Object.setPrototypeOf(h,i),h}}});var o=i(17312),n=i(62101),s=i(85932),r=i(18303),a=i(5266),l=i(54794),c=i(71125);function u(t){return(0,c.keys)(t,!1).reduce((e,i)=>(e[i]=t[i],e),{})}},3856:function(t,e,i){"use strict";i.d(e,{convertMediaUrlToVideoEmbed:function(){return r}});var o=i(81937),n=i(91764),s=i(36310);let r=(t,{width:e=400,height:i=345}={})=>{if(!(0,n.isURL)(t))return t;let r=o.globalDocument.createElement("a"),a=/(?:http?s?:\/\/)?(?:www\.)?(?:vimeo\.com)\/?(.+)/g;r.href=t,e||(e=400),i||(i=345);let l=r.protocol||"";switch(r.hostname){case"www.vimeo.com":case"vimeo.com":return a.test(t)?t.replace(a,'<iframe width="'+e+'" height="'+i+'" src="'+l+'//player.vimeo.com/video/$1" frameborder="0" allowfullscreen></iframe>'):t;case"youtube.com":case"www.youtube.com":case"youtu.be":case"www.youtu.be":{let o=r.search?(0,s.parseQuery)(r.search):{v:r.pathname.substring(1)};return/^embed\/.*/.test(o.v)&&(o.v=o.v.substring(6)),o.v?'<iframe width="'+e+'" height="'+i+'" src="'+l+"//www.youtube.com/embed/"+o.v+'" frameborder="0" allowfullscreen></iframe>':t}}return t}},80991:function(t,e,i){"use strict";i.d(e,{clearCenterAlign:function(){return c},css:function(){return l}});var o=i(22289),n=i(62101),s=i(19147),r=i(57821),a=i(74264);function l(t,e,i,c=!1){if((0,o.isBoolean)(i)&&(c=i,i=void 0),(0,n.isPlainObject)(e)||void 0!==i){let o=(t,e,i)=>{void 0!==(i=(0,s.normalizeCssNumericValue)(e,i))&&(null==i||l(t,e,!0)!==(0,s.normalizeCssValue)(e,i))&&(t.style[e]=i)};if((0,n.isPlainObject)(e)){let i=Object.keys(e);for(let n=0;n<i.length;n+=1)o(t,(0,r.camelCase)(i[n]),e[i[n]])}else o(t,(0,r.camelCase)(e),i);return""}let u=(0,a.kebabCase)(e),h=t.ownerDocument||document,d=!!h&&(h.defaultView||h.parentWindow),p=t.style[e],f="";return void 0!==p&&""!==p?f=p:d&&!c&&(f=d.getComputedStyle(t).getPropertyValue(u)),s.NUMBER_FIELDS_REG.test(e)&&/^[-+]?[0-9.]+px$/.test(f.toString())&&(f=parseInt(f.toString(),10)),(0,s.normalizeCssValue)(e,f)}let c=t=>{"block"===l(t,"display")&&l(t,"display","");let{style:e}=t;"auto"===e.marginLeft&&"auto"===e.marginRight&&(e.marginLeft="",e.marginRight="")}},77213:function(t,e,i){"use strict";i.d(e,{ctrlKey:function(){return o}});let o=t=>{if("u">typeof navigator&&-1!==navigator.userAgent.indexOf("Mac OS X")){if(t.metaKey&&!t.altKey)return!0}else if(t.ctrlKey&&!t.altKey)return!0;return!1}},36400:function(t,e,i){"use strict";i.d(e,{dataBind:function(){return s}});var o=i(31534);let n=new WeakMap,s=(t,e,i)=>{let s=n.get(t);if(!s){s={},n.set(t,s);let e=null;(0,o.isViewObject)(t.j)&&(e=t.j.e),(0,o.isViewObject)(t)&&(e=t.e),e&&e.on("beforeDestruct",()=>{n.delete(t)})}return void 0===i?s[e]:(s[e]=i,i)}},97228:function(t,e,i){"use strict";i.d(e,{defaultLanguage:function(){return s}});var o=i(81937),n=i(85932);let s=(t,e="en")=>"auto"!==t&&(0,n.isString)(t)?t:o.globalDocument.documentElement&&o.globalDocument.documentElement.lang?o.globalDocument.documentElement.lang:navigator.language?navigator.language.substring(0,2):e},38027:function(t,e,i){"use strict";i.d(e,{connection:function(){return s},error:function(){return n},options:function(){return r}});var o=i(29953);function n(t){return TypeError(t)}function s(t){return new o.ConnectionError(t)}function r(t){return new o.OptionsError(t)}},14228:function(t,e,i){"use strict";function o(t="Aborted"){return new DOMException(t,"AbortError")}i.d(e,{abort:function(){return o}})},58250:function(t,e,i){"use strict";i.d(e,{ConnectionError:function(){return o}});class o extends Error{constructor(t){super(t),Object.setPrototypeOf(this,o.prototype)}}},29953:function(t,e,i){"use strict";i.d(e,{ConnectionError:function(){return n.ConnectionError},OptionsError:function(){return s.OptionsError},abort:function(){return o.abort}});var o=i(14228),n=i(58250),s=i(11080)},11080:function(t,e,i){"use strict";i.d(e,{OptionsError:function(){return o}});class o extends TypeError{constructor(t){super(t),Object.setPrototypeOf(this,o.prototype)}}},33201:function(t,e,i){"use strict";i.d(e,{ConnectionError:function(){return n.ConnectionError},OptionsError:function(){return n.OptionsError},abort:function(){return n.abort},connection:function(){return o.connection},error:function(){return o.error},options:function(){return o.options}});var o=i(38027),n=i(29953)},54794:function(t,e,i){"use strict";i.d(e,{fastClone:function(){return r},isAtom:function(){return n},markAsAtomic:function(){return s}});var o=i(3347);function n(t){return t&&t.isAtom}function s(t){return Object.defineProperty(t,"isAtom",{enumerable:!1,value:!0,configurable:!1}),t}function r(t){return JSON.parse((0,o.stringify)(t))}},421:function(t,e,i){"use strict";i.d(e,{getClassName:function(){return s},keepNames:function(){return n}});var o=i(91565);let n=new Map,s=t=>{if((0,o.isFunction)(t.className))return t.className();let e=t.constructor?.originalConstructor||t.constructor;if(n.has(e))return n.get(e);if(e.name)return e.name;let i=new RegExp(/^\s*function\s*(\S*)\s*\(/),s=e.toString().match(i);return s?s[1]:""}},89308:function(t,e,i){"use strict";i.d(e,{get:function(){return s}});var o=i(85932),n=i(18303);function s(t,e){if(!(0,o.isString)(t)||!t.length)return null;let i=t.split("."),s=e;try{for(let t of i){if((0,n.isVoid)(s[t]))return null;s=s[t]}}catch{return null}return(0,n.isVoid)(s)?null:s}},37427:function(t,e,i){"use strict";i.d(e,{humanSizeToBytes:function(){return o}});let o=t=>{if(/^[0-9.]+$/.test(t.toString()))return parseFloat(t);let e=t.substr(-2,2).toUpperCase(),i=["KB","MB","GB","TB"],o=parseFloat(t.substr(0,t.length-2));return -1!==i.indexOf(e)?o*Math.pow(1024,i.indexOf(e)+1):parseInt(t,10)}},93640:function(t,e,i){"use strict";i.r(e),i.d(e,{$$:function(){return D.$$},ConfigDeepFlatten:function(){return d.ConfigDeepFlatten},ConfigFlatten:function(){return d.ConfigFlatten},ConfigProto:function(){return d.ConfigProto},ConnectionError:function(){return v.ConnectionError},LimitedStack:function(){return j.LimitedStack},OptionsError:function(){return v.OptionsError},abort:function(){return v.abort},alignElement:function(){return o.alignElement},alreadyLoadedList:function(){return n.alreadyLoadedList},appendScriptAsync:function(){return n.appendScriptAsync},appendStyleAsync:function(){return n.appendStyleAsync},attr:function(){return l.attr},browser:function(){return c.browser},buildQuery:function(){return u.buildQuery},call:function(){return L.call},callPromise:function(){return L.callPromise},callThis:function(){return L.callThis},clearAlign:function(){return o.clearAlign},clearCenterAlign:function(){return f.clearCenterAlign},cns:function(){return C.cns},completeUrl:function(){return h.completeUrl},connection:function(){return v.connection},convertMediaUrlToVideoEmbed:function(){return p.convertMediaUrlToVideoEmbed},css:function(){return f.css},cssPath:function(){return D.cssPath},ctrlKey:function(){return m.ctrlKey},dataBind:function(){return g.dataBind},defaultLanguage:function(){return _.defaultLanguage},error:function(){return v.error},fastClone:function(){return b.fastClone},get:function(){return y.get},getClassName:function(){return w.getClassName},getDataTransfer:function(){return L.getDataTransfer},getPropertyDescriptor:function(){return L.getPropertyDescriptor},getXPathByElement:function(){return D.getXPathByElement},hAlignElement:function(){return o.hAlignElement},humanSizeToBytes:function(){return S.humanSizeToBytes},inView:function(){return x.inView},isAtom:function(){return b.isAtom},keepNames:function(){return w.keepNames},keys:function(){return L.keys},loadImage:function(){return L.loadImage},loadNext:function(){return n.loadNext},loadNextStyle:function(){return n.loadNextStyle},markAsAtomic:function(){return b.markAsAtomic},markDeprecated:function(){return C.markDeprecated},markOwner:function(){return L.markOwner},memorizeExec:function(){return L.memorizeExec},options:function(){return v.options},parseQuery:function(){return E.parseQuery},previewBox:function(){return I.previewBox},refs:function(){return D.refs},reset:function(){return T.reset},resolveElement:function(){return D.resolveElement},scrollIntoViewIfNeeded:function(){return x.scrollIntoViewIfNeeded},set:function(){return k.set}});var o=i(16849),n=i(47760),s=i(28712),r={};for(var a in s)0>["default","alignElement","clearAlign","hAlignElement","alreadyLoadedList","appendScriptAsync","appendStyleAsync","loadNext","loadNextStyle"].indexOf(a)&&(r[a]=(function(t){return s[t]}).bind(0,a));i.d(e,r);var l=i(7909),c=i(26136),u=i(36833),h=i(91321),d=i(77483),p=i(3856),f=i(80991),m=i(77213),g=i(36400),_=i(97228),v=i(33201),b=i(54794),y=i(89308),w=i(421),S=i(37427),C=i(49385),E=i(36310),I=i(57075),T=i(43379),x=i(60898),D=i(28723),k=i(52144),j=i(42820),L=i(71125)},49385:function(t,e,i){"use strict";i.d(e,{cns:function(){return o},markDeprecated:function(){return n}});let o=console;function n(t,e=[""],i=null){return(...n)=>(o.warn(`Method "${e[0]}" deprecated.`+(e[1]?` Use "${e[1]}" instead`:"")),t.call(i,...n))}},36310:function(t,e,i){"use strict";i.d(e,{parseQuery:function(){return o}});let o=t=>{let e={},i=t.substring(1).split("&");for(let t=0;t<i.length;t+=1){let o=i[t].split("=");e[decodeURIComponent(o[0])]=decodeURIComponent(o[1]||"")}return e}},57075:function(t,e,i){"use strict";i.d(e,{previewBox:function(){return l}});var o=i(23211),n=i(85932),s=i(7909),r=i(80991),a=i(28723);function l(t,e,i="px",c=null){let u=[],h=function(t,e){let i=[];try{(0,a.$$)("img",t.editor).forEach(n=>{let r=[(0,s.attr)(n,"width"),(0,s.attr)(n,"height"),n.src];(0,s.attr)(n,{width:n.offsetWidth+e,height:n.offsetHeight+e});let a=t.createInside.a();t.ed.body.appendChild(a),a.href=n.src,n.src=a.href,o.Dom.safeRemove(a),i.push(()=>{n.src=r[2]??"",(0,s.attr)(n,{width:r[0]||null,height:r[1]||null})})})}catch(t){throw i.forEach(t=>t()),i.length=0,t}return i}(t,i);try{let a=t.e.fire("beforePreviewBox",e,i);if(null!=a)return a;let l=t.c.div("jodit__preview-box jodit-context");c&&c.appendChild(l),(0,r.css)(l,{position:"relative",padding:16});let h=t.value||`<div style='position: absolute;left:50%;top:50%;transform: translateX(-50%) translateY(-50%);color:#ccc;'>${t.i18n("Empty")}</div>`;if(t.iframe){let e=t.create.element("iframe");(0,r.css)(e,{minWidth:800,minHeight:600,border:0}),l.appendChild(e);let i=e.contentWindow;if(i&&(t.e.fire("generateDocumentStructure.iframe",i.document,t),l=i.document.body,"function"==typeof ResizeObserver)){let o=!1,n=i.document.body,s=new ResizeObserver(t.async.debounce(()=>{s.unobserve(n),e.style.height=`${n.offsetHeight+20}px`,t.async.requestAnimationFrame(()=>{o||s.observe(n)})},100)),r=()=>{o=!0,s.unobserve(n),s.disconnect(),t.e.off("beforeDestruct",r)};u.push(r),t.e.on("beforeDestruct",r)}}else(0,r.css)(l,{minWidth:1024,minHeight:600,border:0});let d=(e,i)=>{let r=(0,n.isString)(i)?t.c.div():i;(0,n.isString)(i)&&(r.innerHTML=i);for(let t=0;t<r.childNodes.length;t+=1){let i=r.childNodes[t];if(o.Dom.isElement(i)){let t=e.ownerDocument.createElement(i.nodeName);for(let e=0;e<i.attributes.length;e+=1)(0,s.attr)(t,i.attributes[e].nodeName,i.attributes[e].nodeValue);0===i.childNodes.length||o.Dom.isTag(i,"table")?"SCRIPT"===i.nodeName?i.textContent&&(t.textContent=i.textContent):i.innerHTML&&(t.innerHTML=i.innerHTML):d(t,i);try{e.appendChild(t)}catch{}}else try{e.appendChild(i.cloneNode(!0))}catch{}}};return d(l,h),t.e.fire("afterPreviewBox",l),[l,()=>{u.forEach(t=>t())}]}finally{h.forEach(t=>t())}}},43379:function(t,e,i){"use strict";i.d(e,{reset:function(){return a}});var o=i(81937),n=i(91565),s=i(89308);let r={};function a(t){if(!(t in r)){let e=o.globalDocument.createElement("iframe");try{if(e.src="about:blank",o.globalDocument.body.appendChild(e),!e.contentWindow)return null;let i=(0,s.get)(t,e.contentWindow),a=(0,s.get)(t.split(".").slice(0,-1).join("."),e.contentWindow);(0,n.isFunction)(i)&&(r[t]=i.bind(a))}catch(t){if(!o.IS_PROD)throw t}finally{e.parentNode?.removeChild(e)}}return r[t]??null}},60898:function(t,e,i){"use strict";i.d(e,{inView:function(){return n},scrollIntoViewIfNeeded:function(){return s}});var o=i(23211);function n(t,e,i){let o=t.getBoundingClientRect(),n=t,s=o.top,r=o.height;for(;n&&n!==e&&n.parentNode;)if(!(s<=(o=(n=n.parentNode).getBoundingClientRect()).bottom)||s+r<=o.top)return!1;return s<=(i.documentElement&&i.documentElement.clientHeight||0)}function s(t,e,i){o.Dom.isHTMLElement(t)&&!n(t,e,i)&&(e.clientHeight!==e.scrollHeight&&(e.scrollTop=t.offsetTop),n(t,e,i)||t.scrollIntoView())}},28723:function(t,e,i){"use strict";i.d(e,{$$:function(){return h},cssPath:function(){return f},getXPathByElement:function(){return d},refs:function(){return p},resolveElement:function(){return m}});var o=i(81937),n=i(23211),s=i(88475),r=i(85932),a=i(57821),l=i(7909),c=i(33201);let u=1;function h(t,e){let i;if(!o.IS_ES_NEXT&&/:scope/.test(t)&&o.IS_IE&&!(e&&e.nodeType===Node.DOCUMENT_NODE)){let o=e.id,n=o||"_selector_id_"+(Math.random()+"").slice(2)+ ++u;t=t.replace(/:scope/g,"#"+n),o||e.setAttribute("id",n),i=e.parentNode.querySelectorAll(t),o||e.removeAttribute("id")}else i=e.querySelectorAll(t);return[].slice.call(i)}let d=(t,e)=>{if(!t||t.nodeType!==Node.ELEMENT_NODE||!t.parentNode||e===t)return"";if(t.id)return"//*[@id='"+t.id+"']";let i=[].filter.call(t.parentNode.childNodes,e=>e.nodeName===t.nodeName);return d(t.parentNode,e)+"/"+t.nodeName.toLowerCase()+(i.length>1?"["+((0,s.toArray)(i).indexOf(t)+1)+"]":"")},p=t=>("container"in t&&(t=t.container),h("[ref],[data-ref]",t).reduce((t,e)=>{let i=(0,l.attr)(e,"-ref");return i&&(0,r.isString)(i)&&(t[(0,a.camelCase)(i)]=e,t[i]=e),t},{})),f=t=>{if(!n.Dom.isElement(t))return null;let e=[],i=t;for(;i&&i.nodeType===Node.ELEMENT_NODE;){let t=i.nodeName.toLowerCase();if(i.id){t+="#"+i.id,e.unshift(t);break}{let e=i,o=1;do(e=e.previousElementSibling)&&e.nodeName.toLowerCase()===t&&o++;while(e)t+=":nth-of-type("+o+")"}e.unshift(t),i=i.parentNode}return e.join(" > ")};function m(t,e){let i=t;if((0,r.isString)(t))try{i=e.querySelector(t)}catch{throw(0,c.error)('String "'+t+'" should be valid HTML selector')}if(!i||"object"!=typeof i||!n.Dom.isElement(i)||!i.cloneNode)throw(0,c.error)('Element "'+t+'" should be string or HTMLElement instance');return i}},52144:function(t,e,i){"use strict";i.d(e,{set:function(){return a}});var o=i(17312),n=i(70222),s=i(62101),r=i(85932);function a(t,e,i){if(!(0,r.isString)(t)||!t.length)return;let a=t.split("."),l=i,c=a[0];for(let t=0;t<a.length-1;t+=1)c=a[t],(0,o.isArray)(l[c])||(0,s.isPlainObject)(l[c])||(l[c]=(0,n.isNumeric)(a[t+1])?[]:{}),l=l[c];l&&(l[a[a.length-1]]=e)}},42820:function(t,e,i){"use strict";i.d(e,{LimitedStack:function(){return n}});var o=i(25045);class n{push(t){return this.stack.push(t),this.stack.length>this.limit&&this.stack.shift(),this}pop(){return this.stack.pop()}find(t){return this.stack.find(t)}constructor(t){(0,o._)(this,"limit",void 0),(0,o._)(this,"stack",void 0),this.limit=t,this.stack=[]}}},71125:function(t,e,i){"use strict";i.d(e,{call:function(){return a},callPromise:function(){return u},callThis:function(){return l},getDataTransfer:function(){return f},getPropertyDescriptor:function(){return m},keys:function(){return d},loadImage:function(){return h},markOwner:function(){return c},memorizeExec:function(){return p}});var o=i(52100),n=i(18303),s=i(7909),r=i(36400);function a(t,...e){return t(...e)}function l(t,e,...i){return t.apply(e,i)}function c(t,e){(0,s.attr)(e,"data-editor_id",t.id),e.component||Object.defineProperty(e,"jodit",{value:t})}function u(t,e){return(0,o.isPromise)(t)?t.then(t=>t,()=>null).finally(e):e?.()}let h=(t,e)=>e.async.promise((i,o)=>{let n=new Image,s=()=>{e.e.off(n),o?.()},r=()=>{e.e.off(n),i(n)};e.e.one(n,"load",r).one(n,"error",s).one(n,"abort",s),n.src=t,n.complete&&r()}),d=(t,e=!0)=>{if(e)return Object.keys(t);let i=[];for(let e in t)i.push(e);return i},p=(t,e,{control:i},o)=>{let s="button"+i.command,a=(i.args&&i.args[0])??(0,r.dataBind)(t,s);if((0,n.isVoid)(a))return!1;(0,r.dataBind)(t,s,a),o&&(a=o(a)),t.execCommand(i.command,!1,a??void 0)},f=t=>{if(t.clipboardData)return t.clipboardData;try{return t.dataTransfer||new DataTransfer}catch{return null}};function m(t,e){let i;do i=Object.getOwnPropertyDescriptor(t,e),t=Object.getPrototypeOf(t);while(!i&&t)return i}},55810:function(t,e,i){"use strict";i.d(e,{init:function(){return r}});var o=i(81937),n=i(52433),s=i(3050);function r(t,e,i,r,a,l,c){if((0,n.isInitable)(r))try{r.init(t)}catch(t){if(!o.IS_PROD)throw t}a.set(e,r),l.delete(e),r.hasStyle&&(0,s.loadStyle)(t,e).catch(t=>{o.IS_PROD}),r.styles&&(c(t,e,"style").innerHTML=r.styles)}},3050:function(t,e,i){"use strict";i.d(e,{loadExtras:function(){return u},loadStyle:function(){return l}});var o=i(81937),n=i(74264),s=i(47760),r=i(86189);let a=new Set;async function l(t,e){let i=c(t,e,!1);if(!a.has(i))return a.add(i),(0,s.appendStyleAsync)(t,i)}function c(t,e,i){e=(0,n.kebabCase)(e);let o=t.minified?".min":"";return t.basePath+"plugins/"+e+"/"+e+o+"."+(i?"js":"css")}function u(t,e,i,n){try{let o=i.filter(e=>!t.has((0,r.normalizeName)(e.name)));o.length&&o.map(t=>{let i=t.url||c(e,t.name,!0);return(0,s.appendScriptAsync)(e,i).then(n).catch(()=>null)})}catch(t){if(!o.IS_PROD)throw t}}},25974:function(t,e,i){"use strict";i.d(e,{makeInstance:function(){return s}});var o=i(81937),n=i(91565);function s(t,e){try{try{return(0,n.isFunction)(e)?new e(t):e}catch(i){if((0,n.isFunction)(e)&&!e.prototype)return e(t)}}catch(t){if(!o.IS_PROD)throw t}return null}},86189:function(t,e,i){"use strict";i.d(e,{normalizeName:function(){return n}});var o=i(74264);function n(t){return(0,o.kebabCase)(t).toLowerCase()}},91206:function(t,e,i){"use strict";i.d(e,{Plugin:function(){return o.Plugin}});var o=i(18855);i(85305)},85305:function(t,e,i){"use strict";i.d(e,{PluginSystem:function(){return f}});var o=i(25045),n=i(81937),s=i(42689),r=i(32328),a=i(17312),l=i(52433),c=i(85932),u=i(55810),h=i(3050),d=i(25974),p=i(86189);class f{get size(){return this.__items.size}add(t,e){this.__items.set((0,p.normalizeName)(t),e),s.eventEmitter.fire(`plugin:${t}:ready`)}get(t){return this.__items.get((0,p.normalizeName)(t))}remove(t){this.__items.delete((0,p.normalizeName)(t))}__getFullPluginsList(t){let e=[];return this.__items.forEach((i,o)=>{(!t||t.has(o))&&e.push([o,i])}),e}__init(t){let{extraList:e,disableList:i,filter:o}={extraList:t.o.extraPlugins.map(t=>(0,c.isString)(t)?{name:t}:t),disableList:new Set((0,r.splitArray)(t.o.disablePlugins).map(p.normalizeName)),filter:t.o.safeMode?new Set(t.o.safePluginsList):null},s=new Map,f={},m=new Set;t.__plugins=f;let g=()=>{if(t.isInDestruct)return;let e=!1;this.__getFullPluginsList(o).forEach(([o,n])=>{if(i.has(o)||s.has(o))return;let r=n?.requires;if(r&&(0,a.isArray)(r)&&r.length){if(r.some(t=>i.has(t)))return;if(!r.every(t=>s.has(t)))return void m.add(o)}e=!0;let l=(0,d.makeInstance)(t,n);if(!l){s.set(o,null),m.delete(o);return}(0,u.init)(t,o,n,l,s,m,this.opts.getContainer),f[o]=l}),e&&(t.e.fire("updatePlugins"),g())};e&&e.length&&(0,h.loadExtras)(this.__items,t,e,g),g(),t.e.on("beforeDestruct",()=>{Object.keys(f).forEach(e=>{let i=f[e];(0,l.isDestructable)(i)&&i.destruct(t),delete f[e]}),delete t.__plugins}),n.IS_PROD||m.size}wait(t){return new Promise(e=>{if(this.get(t))return e();let i=()=>{e(),s.eventEmitter.off(`plugin:${t}:ready`,i)};s.eventEmitter.on(`plugin:${t}:ready`,i)})}constructor(t){(0,o._)(this,"opts",void 0),(0,o._)(this,"__items",void 0),this.opts=t,this.__items=new Map}}},18855:function(t,e,i){"use strict";i.d(e,{Plugin:function(){return l}});var o=i(25045),n=i(31635),s=i(16964),r=i(84839),a=i(24497);class l extends s.ViewComponent{className(){return"Plugin"}__afterPluginSystemInit(){let{j:t,buttons:e}=this;e&&(0,a.isJoditObject)(t)&&e.forEach(e=>{t.registerButton(e)})}__afterInit(){this.__inited=!0,this.setStatus(s.STATUSES.ready),this.afterInit(this.jodit)}init(t){this.jodit.isReady&&(this.afterInit(this.jodit),this.__afterPluginSystemInit(),this.jodit.e.fire("rebuildToolbar"))}__beforeDestruct(){if(this.isInDestruct)return;let{j:t}=this;if(t.e.off("afterPluginSystemInit",this.__afterPluginSystemInit).off("afterInit",this.__afterInit).off("beforeDestruct",this.destruct),this.setStatus(s.STATUSES.beforeDestruct),!this.__inited)return super.destruct();(0,a.isJoditObject)(t)&&this.buttons?.forEach(e=>{t?.unregisterButton(e)}),this.beforeDestruct(this.j),super.destruct()}constructor(t){super(t),(0,o._)(this,"buttons",[]),(0,o._)(this,"hasStyle",!1),(0,o._)(this,"styles",void 0),(0,o._)(this,"__inited",!1),t.e.on("afterPluginSystemInit",this.__afterPluginSystemInit).on("afterInit",this.__afterInit).on("beforeDestruct",this.__beforeDestruct)}}(0,o._)(l,"requires",[]),(0,n.__decorate)([r.autobind],l.prototype,"__afterPluginSystemInit",null),(0,n.__decorate)([r.autobind],l.prototype,"__afterInit",null),(0,n.__decorate)([r.autobind],l.prototype,"__beforeDestruct",null)},17338:function(t,e,i){"use strict";i.d(e,{Ajax:function(){return d}});var o=i(25045),n=i(31635),s=i(91231),r=i(81937),a=i(49574),l=i(65946),c=i(33201),u=i(5266);i(37102);var h=i(32855);class d{className(){return"Ajax"}__buildParams(t,e){return(0,l.isPlainObject)(t)&&this.options.contentType&&this.options.contentType.includes("application/json")?JSON.stringify(t):(0,l.isFunction)(this.o.queryBuild)?this.o.queryBuild.call(this,t,e):(0,l.isString)(t)||t instanceof r.globalWindow.FormData||"object"==typeof t&&null!=t&&(0,l.isFunction)(t.append)?t:(0,l.buildQuery)(t)}get o(){return this.options}abort(){if(this.__isFulfilled)return this;try{this.__isFulfilled=!0,this.xhr.abort()}catch{}return this}send(){this.__activated=!0;let{xhr:t,o:e}=this,i=this.prepareRequest();return this.__async.promise(async(o,n)=>{let s=()=>{this.__isFulfilled=!0,n(c.connection("Connection error"))},r=()=>{this.__isFulfilled=!0,o(new h.Response(i,t.status,t.statusText,!t.responseType?t.responseText:t.response))};t.onload=r,t.onabort=()=>{this.__isFulfilled=!0,n(c.abort("Abort connection"))},t.onerror=s,t.ontimeout=s,e.responseType&&(t.responseType=e.responseType),t.onprogress=t=>{let e=0;t.lengthComputable&&(e=t.loaded/t.total*100),this.options.onProgress?.(e)},t.onreadystatechange=()=>{this.options.onProgress?.(10),t.readyState===XMLHttpRequest.DONE&&(e.successStatuses.includes(t.status)?r():t.statusText&&(this.__isFulfilled=!0,n(c.connection(t.statusText))))},t.withCredentials=e.withCredentials??!1;let{url:a,data:u,method:d}=i;t.open(d,a,!0),e.contentType&&t.setRequestHeader&&t.setRequestHeader("Content-type",e.contentType);let{headers:p}=e;(0,l.isFunction)(p)&&(p=await p.call(this)),p&&t.setRequestHeader&&Object.keys(p).forEach(e=>{t.setRequestHeader(e,p[e])}),this.__async.setTimeout(()=>{t.send(u?this.__buildParams(u):void 0)},0)})}prepareRequest(){if(!this.o.url)throw c.error("Need URL for AJAX request");let t=this.o.url,e=this.o.data,i=(this.o.method||"get").toLowerCase();if("get"===i&&e&&(0,l.isPlainObject)(e)){let i=t.indexOf("?");if(-1!==i){let o=(0,l.parseQuery)(t);t=t.substring(0,i)+"?"+(0,l.buildQuery)({...o,...e})}else t+="?"+(0,l.buildQuery)(this.o.data)}let o={url:t,method:i,data:e};return d.log.splice(100),d.log.push(o),o}destruct(){this.__isDestructed||(this.__isDestructed=!0,this.__activated&&!this.__isFulfilled&&(this.abort(),this.__isFulfilled=!0),this.__async.destruct())}constructor(t,e=u.Config.prototype.defaultAjaxOptions){(0,o._)(this,"__async",new s.Async),(0,o._)(this,"xhr",void 0),(0,o._)(this,"options",void 0),(0,o._)(this,"__isFulfilled",!1),(0,o._)(this,"__activated",!1),(0,o._)(this,"__isDestructed",!1),this.options=(0,l.ConfigProto)(t||{},e),this.xhr=this.o.xhr?this.o.xhr():new XMLHttpRequest}}(0,o._)(d,"log",[]),(0,n.__decorate)([a.autobind],d.prototype,"destruct",null)},37102:function(t,e,i){"use strict";i(5266).Config.prototype.defaultAjaxOptions={successStatuses:[200,201,202],method:"GET",url:"",data:null,contentType:"application/x-www-form-urlencoded; charset=UTF-8",headers:{"X-REQUESTED-WITH":"XMLHttpRequest"},withCredentials:!1,xhr:()=>new XMLHttpRequest}},73714:function(t,e,i){"use strict";i.d(e,{Ajax:function(){return o.Ajax},Response:function(){return n.Response}});var o=i(17338),n=i(32855)},32855:function(t,e,i){"use strict";i.d(e,{Response:function(){return n}});var o=i(25045);class n{get url(){return this.request.url}async json(){return JSON.parse(this.body)}text(){return Promise.resolve(this.body)}async blob(){return this.body}constructor(t,e,i,n){(0,o._)(this,"status",void 0),(0,o._)(this,"statusText",void 0),(0,o._)(this,"request",void 0),(0,o._)(this,"body",void 0),this.request=t,this.status=e,this.statusText=i,this.body=n}}},42259:function(t,e,i){"use strict";i.d(e,{cursorInTheEdgeOfString:function(){return r},findCorrectCurrentNode:function(){return a},moveNodeInsideStart:function(){return s.moveNodeInsideStart}});var o=i(81937),n=i(23211),s=i(89817);function r(t,e,i,n){let s=t.nodeValue?.length?t.nodeValue:"";if(n&&s.replace((0,o.INVISIBLE_SPACE_REG_EXP_END)(),"").length>e)return!0;let r=(0,o.INVISIBLE_SPACE_REG_EXP_START)().exec(s);return i&&(r&&r[0].length<e||!r&&e>0)}function a(t,e,i,o,s,r){if((t=e.startContainer.childNodes[e.startOffset])||(t=e.startContainer.childNodes[e.startOffset-1],i=!0),t&&o&&!n.Dom.isText(t)){if(!i&&n.Dom.isText(t.previousSibling))t=t.previousSibling;else if(s){let e=r(t);for(;e;){if(e&&n.Dom.isText(e)){t=e;break}e=r(e)}}}if(t&&!o&&!n.Dom.isText(t)){let e=t,i=t;do e=e.firstChild,i=i.lastChild;while(e&&i&&!n.Dom.isText(e))e===i&&e&&n.Dom.isText(e)&&(t=e)}return{node:t,rightMode:i}}i(7470)},89817:function(t,e,i){"use strict";i.d(e,{moveNodeInsideStart:function(){return s}});var o=i(81937),n=i(23211);function s(t,e,i){let s=n.Dom.findSibling(e,i),r=n.Dom.findSibling(e,!i);for(;n.Dom.isElement(s)&&!n.Dom.isTag(s,o.INSEPARABLE_TAGS)&&n.Dom.isContentEditable(s,t.editor)&&(!r||!n.Dom.closest(e,n.Dom.isElement,t.editor));)i||!s.firstChild?s.appendChild(e):n.Dom.before(s.firstChild,e),s=n.Dom.sibling(e,i),r=n.Dom.sibling(e,!i)}},7470:function(t,e,i){"use strict";i.d(e,{moveTheNodeAlongTheEdgeOutward:function(){return n}});var o=i(23211);function n(t,e,i){let n=t;for(;n&&n!==i&&!(o.Dom.findSibling(n,e)||o.Dom.isBlock(n.parentElement));)(n=n.parentElement)&&n!==i&&(e?o.Dom.before(n,t):o.Dom.after(n,t))}},59841:function(t,e,i){"use strict";i.d(e,{CommitStyle:function(){return n.CommitStyle},Selection:function(){return o.Selection}});var o=i(98595),n=i(84578)},98595:function(t,e,i){"use strict";i.d(e,{Selection:function(){return f}});var o=i(25045),n=i(31635),s=i(81937),r=i(84839),a=i(23211),l=i(65946),c=i(28686),u=i(28712),h=i(7470),d=i(84578),p=i(42259);class f{get j(){return this.jodit}errorNode(t){if(!a.Dom.isNode(t))throw(0,l.error)("Parameter node must be instance of Node")}get area(){return this.j.editor}get win(){return this.j.ew}get doc(){return this.j.ed}get sel(){return this.j.o.shadowRoot&&(0,c.isFunction)(this.j.o.shadowRoot.getSelection)?this.j.o.shadowRoot.getSelection():this.win.getSelection()}get range(){let t=this.sel;return t&&t.rangeCount?t.getRangeAt(0):this.createRange()}get isInsideArea(){let{sel:t}=this,e=t?.rangeCount?t.getRangeAt(0):null;return!(!e||!a.Dom.isOrContains(this.area,e.startContainer))}createRange(t=!1){let e=this.doc.createRange();return t&&this.selectRange(e),e}remove(){let t=this.sel,e=this.current();if(t&&e)for(let e=0;e<t.rangeCount;e+=1)t.getRangeAt(e).deleteContents(),t.getRangeAt(e).collapse(!0)}clear(){this.sel?.rangeCount&&this.sel?.removeAllRanges()}removeNode(t){if(!a.Dom.isOrContains(this.j.editor,t,!0))throw(0,l.error)("Selection.removeNode can remove only editor's children");a.Dom.safeRemove(t),this.j.e.fire("afterRemoveNode",t)}insertCursorAtPoint(t,e){this.removeMarkers();try{let i=this.createRange();return(()=>{if(this.doc.caretPositionFromPoint){let o=this.doc.caretPositionFromPoint(t,e);if(o)return i.setStart(o.offsetNode,o.offset)}if(this.doc.caretRangeFromPoint){let o=this.doc.caretRangeFromPoint(t,e);(0,u.assert)(o,"Incorrect caretRangeFromPoint behaviour"),i.setStart(o.startContainer,o.startOffset)}})(),i.collapse(!0),this.selectRange(i),!0}catch{}return!1}get hasMarkers(){return!!this.markers.length}get markers(){return(0,l.$$)("span[data-"+s.MARKER_CLASS+"]",this.area)}removeMarkers(){a.Dom.safeRemove.apply(null,this.markers)}marker(t=!1,e){let i=null;e&&(i=e.cloneRange()).collapse(t);let o=this.j.createInside.span();return o.id=s.MARKER_CLASS+"_"+Number(new Date)+"_"+(Math.random()+"").slice(2),o.style.lineHeight="0",o.style.display="none",a.Dom.markTemporary(o),(0,l.attr)(o,"data-"+s.MARKER_CLASS,t?"start":"end"),o.appendChild(this.j.createInside.text(s.INVISIBLE_SPACE)),i&&a.Dom.isOrContains(this.area,t?i.startContainer:i.endContainer)&&i.insertNode(o),o}restore(){let t=!1,e=t=>`span[data-${s.MARKER_CLASS}=${t?"start":"end"}]`,i=this.area.querySelector(e(!0)),o=this.area.querySelector(e(!1));if(i){if(t=this.createRange(),o)t.setStartAfter(i),a.Dom.safeRemove(i),t.setEndBefore(o),a.Dom.safeRemove(o);else{let e=i.previousSibling;a.Dom.isText(e)?t.setStart(e,e.nodeValue?e.nodeValue.length:0):t.setStartBefore(i),a.Dom.safeRemove(i),t.collapse(!0)}t&&this.selectRange(t)}}fakes(){let t=this.sel;if(!t||!t.rangeCount)return[];let e=t.getRangeAt(0);(0,u.assert)(e,"Range is null");let i=e.cloneRange();i.collapse(!0);let o=this.j.createInside.fake();a.Dom.safeInsertNode(i,o),e.setStartBefore(o);let n=[o];if(!e.collapsed){let t=e.cloneRange();t.collapse(!1);let i=this.j.createInside.fake();a.Dom.safeInsertNode(t,i),e.setEndAfter(i),n.push(i)}return this.selectRange(e),n}restoreFakes(t){let e=t.filter(t=>t.isConnected);if(!e.length)return;let[i,o]=e,n=this.createRange();n.setStartAfter(i),o&&n.setEndBefore(o),this.selectRange(n),i.parentNode?.firstChild!==i.parentNode?.lastChild&&a.Dom.safeRemove(i),o?.parentNode?.firstChild!==o?.parentNode?.lastChild&&a.Dom.safeRemove(o)}save(t=!1){if(this.hasMarkers)return[];let e=this.sel;if(!e||!e.rangeCount)return[];let i=[],o=e.rangeCount,n=[];for(let t=0;o>t;t+=1)if(n[t]=e.getRangeAt(t),n[t].collapsed){let e=this.marker(!0,n[t]);i[t]={startId:e.id,collapsed:!0,startMarker:e.outerHTML}}else{let e=this.marker(!0,n[t]),o=this.marker(!1,n[t]);i[t]={startId:e.id,endId:o.id,collapsed:!1,startMarker:e.outerHTML,endMarker:o.outerHTML}}if(!t){e.removeAllRanges();for(let t=o-1;t>=0;--t){let o=this.doc.getElementById(i[t].startId);if(o){if(i[t].collapsed)n[t].setStartAfter(o),n[t].collapse(!0);else if(n[t].setStartBefore(o),i[t].endId){let e=this.doc.getElementById(i[t].endId);e&&n[t].setEndAfter(e)}try{e.addRange(n[t].cloneRange())}catch{}}}}return i}focus(t={preventScroll:!0}){if(!this.isFocused()){let e=(0,l.getScrollParent)(this.j.container),i=e?.scrollTop;this.j.iframe&&"complete"===this.doc.readyState&&this.j.iframe.focus(t),this.win.focus(),this.area.focus(t),i&&e?.scrollTo&&e.scrollTo(0,i);let o=this.sel,n=o?.rangeCount?o?.getRangeAt(0):null;if(!n||!a.Dom.isOrContains(this.area,n.startContainer)){let t=this.createRange();t.setStart(this.area,0),t.collapse(!0),this.selectRange(t,!1)}return this.j.editorIsActive||this.j?.events?.fire("focus"),!0}return!1}isCollapsed(){let t=this.sel;for(let e=0;t&&e<t.rangeCount;e+=1)if(!t.getRangeAt(e).collapsed)return!1;return!0}isFocused(){return this.doc.hasFocus&&this.doc.hasFocus()&&this.area===this.doc.activeElement}current(t=!0){if(this.j.getRealMode()!==s.MODE_WYSIWYG)return null;let e=this.sel;if(!e||0===e.rangeCount)return null;let i=e.getRangeAt(0),o=i.startContainer,n=!1;if(a.Dom.isTag(o,"br")&&e.isCollapsed)return o;if(!a.Dom.isText(o)){let s=(0,p.findCorrectCurrentNode)(o,i,n,e.isCollapsed,t,t=>n?t.lastChild:t.firstChild);o=s.node,n=s.rightMode}return o&&a.Dom.isOrContains(this.area,o)?o:null}insertNode(t,e=!0,i=!0){this.errorNode(t);let o=a.Dom.isFragment(t)?t.lastChild:t;this.j.e.fire("safeHTML",t),!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore());let n=this.sel;this.j.history.snapshot.transaction(()=>{if(this.isCollapsed()||this.j.execCommand("Delete"),this.j.e.fire("beforeInsertNode",t),n&&n.rangeCount){let e=n.getRangeAt(0),{firstChild:i}=t;a.Dom.isOrContains(this.area,e.commonAncestorContainer)?a.Dom.safeInsertNode(e,t):this.area.appendChild(t),[()=>i?.previousSibling,()=>i?.previousSibling,()=>i?.previousSibling?.lastChild].forEach(t=>{let e=t();e&&a.Dom.isEmptyTextNode(e)&&a.Dom.safeRemove(e)})}else this.area.appendChild(t);let i=t=>{if(a.Dom.isBlock(t)){let e=t.lastChild;if(e)return i(e)}this.setCursorAfter(t)};e&&(a.Dom.isFragment(t)?o&&i(o):i(t)),this.j.o.scrollToPastedContent&&(0,l.scrollIntoViewIfNeeded)(o??t,this.j.editor,this.doc)}),i&&this.j.events&&this.j.__imdSynchronizeValues(),this.j.events&&this.j.e.fire("afterInsertNode",a.Dom.isFragment(t)?o:t)}insertHTML(t,e=!0){if(""===t)return;let i=this.j.createInside.div(),o=this.j.createInside.fragment();if(!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore()),a.Dom.isNode(t)?i.appendChild(t):i.innerHTML=t.toString(),(this.j.isEditorMode()||!1!==this.j.e.fire("insertHTML",i.innerHTML))&&i.lastChild){for(;i.firstChild;)i.firstChild,o.appendChild(i.firstChild);this.insertNode(o,e,!1),this.j.__imdSynchronizeValues()}}insertImage(t,e=null,i=null){let o=(0,c.isString)(t)?this.j.createInside.element("img"):t;if((0,c.isString)(t)&&o.setAttribute("src",t),null!=i){let t=i.toString();t&&"auto"!==t&&0>(t+"").indexOf("px")&&0>(t+"").indexOf("%")&&(t+="px"),(0,l.attr)(o,"width",t)}e&&"object"==typeof e&&(0,l.css)(o,e);let n=()=>{(o.naturalHeight<o.offsetHeight||o.naturalWidth<o.offsetWidth)&&(o.style.width="",o.style.height=""),o.removeEventListener("load",n)};this.j.e.on(o,"load",n),o.complete&&n(),this.insertNode(o),this.j.e.fire("afterInsertImage",o)}eachSelection(t){let e=this.sel;if(!e||!e.rangeCount)return;let i=e.getRangeAt(0),o=i.commonAncestorContainer;a.Dom.isHTMLElement(o)||(o=o.parentElement);let n=[],r=i.startOffset,u=o.childNodes.length,h=i.startContainer===this.area?o.childNodes[r<u?r:u-1]:i.startContainer,d=i.endContainer===this.area?o.childNodes[i.endOffset-1]:i.endContainer;a.Dom.isText(h)&&h===i.startContainer&&i.startOffset===h.nodeValue?.length&&h.nextSibling&&(h=h.nextSibling),a.Dom.isText(d)&&d===i.endContainer&&0===i.endOffset&&d.previousSibling&&(d=d.previousSibling);let p=t=>{!t||t===o||a.Dom.isEmptyTextNode(t)||(0,c.isMarker)(t)||n.push(t)};p(h),h!==d&&a.Dom.isOrContains(o,h,!0)&&a.Dom.find(h,t=>(p(t),t===d||t&&t.contains&&t.contains(d)),o,!0,!1);let f=e=>{if(a.Dom.isOrContains(this.j.editor,e,!0)){if(e.nodeName.match(/^(UL|OL)$/))return(0,l.toArray)(e.childNodes).forEach(f);if(a.Dom.isTag(e,"li"))if(e.firstChild)e=e.firstChild;else{let t=this.j.createInside.text(s.INVISIBLE_SPACE);e.appendChild(t),e=t}t(e)}};0===n.length&&(a.Dom.isEmptyTextNode(h)&&n.push(h),h.firstChild&&n.push(h.firstChild)),n.forEach(f)}cursorInTheEdge(t,e,i=null){let o=!t,n=this.sel?.getRangeAt(0);if(i??=this.current(!1),!n||!i||!a.Dom.isOrContains(e,i,!0))return null;let s=t?n.startContainer:n.endContainer,r=t?n.startOffset:n.endOffset,c=t=>!!(t&&!a.Dom.isTag(t,"br")&&!a.Dom.isEmptyTextNode(t)&&!a.Dom.isTemporary(t)&&!(a.Dom.isElement(t)&&!0===this.j.e.fire("isInvisibleForCursor",t)));if(a.Dom.isText(s)){if((0,p.cursorInTheEdgeOfString)(s,r,t,o))return!1}else{let t=(0,l.toArray)(s.childNodes);if(o){if(t.slice(r).some(c))return!1}else if(t.slice(0,r).some(c))return!1}let u=i;for(;u&&u!==e;){let e=a.Dom.sibling(u,t);if(!e){u=u.parentNode;continue}if((u=e)&&c(u))return!1}return!0}cursorOnTheLeft(t,e){return this.cursorInTheEdge(!0,t,e)}cursorOnTheRight(t,e){return this.cursorInTheEdge(!1,t,e)}setCursorAfter(t){return this.setCursorNearWith(t,!1)}setCursorBefore(t){return this.setCursorNearWith(t,!0)}setCursorNearWith(t,e){if(this.errorNode(t),!a.Dom.up(t,t=>t===this.area||t&&t.parentNode===this.area,this.area))throw(0,l.error)("Node element must be in editor");let i=this.createRange(),o=null;return a.Dom.isText(t)?e?i.setStart(t,0):i.setEnd(t,t.nodeValue?.length??0):(o=this.j.createInside.fake(),e?i.setStartBefore(t):i.setEndAfter(t),i.collapse(e),a.Dom.safeInsertNode(i,o),i.selectNode(o)),i.collapse(e),this.selectRange(i),o}setCursorIn(t,e=!1){if(this.errorNode(t),!a.Dom.up(t,t=>t===this.area||t&&t.parentNode===this.area,this.area))throw(0,l.error)("Node element must be in editor");let i=this.createRange(),o=t,n=t;do{if(a.Dom.isText(o)||a.Dom.isTag(o,s.INSEPARABLE_TAGS))break;n=o,o=e?o.firstChild:o.lastChild}while(o)if(!o){let t=this.j.createInside.text(s.INVISIBLE_SPACE);a.Dom.isTag(n,s.INSEPARABLE_TAGS)?o=n:(n.appendChild(t),n=t)}let r=o||n;return a.Dom.isTag(r,s.INSEPARABLE_TAGS)?e||a.Dom.isTag(r,"br")?i.setStartBefore(r):i.setEndAfter(r):i.selectNodeContents(r),i.collapse(e),this.selectRange(i),n}selectRange(t,e=!0){let i=this.sel;return e&&!this.isFocused()&&this.focus(),i&&(i.removeAllRanges(),i.addRange(t)),this.j.e.fire("changeSelection"),this}select(t,e=!1){if(this.errorNode(t),!a.Dom.up(t,t=>t===this.area||t&&t.parentNode===this.area,this.area))throw(0,l.error)("Node element must be in editor");let i=this.createRange();return i[e?"selectNodeContents":"selectNode"](t),this.selectRange(i)}get html(){let t=this.sel;if(t&&t.rangeCount>0){let e=t.getRangeAt(0).cloneContents(),i=this.j.createInside.div();return i.appendChild(e),i.innerHTML}return""}*wrapInTagGen(t){if(this.isCollapsed()){let e=this.jodit.createInside.element("font",s.INVISIBLE_SPACE);this.insertNode(e,!1,!1),t&&t[0]&&e.appendChild(t[0]),yield e,a.Dom.unwrap(e);return}for(let t of((0,l.$$)("*[style*=font-size]",this.area).forEach(t=>{(0,l.attr)(t,"data-font-size",t.style.fontSize.toString()),t.style.removeProperty("font-size")}),this.j.nativeExecCommand("fontsize",!1,"7"),(0,l.$$)("*[data-font-size]",this.area).forEach(t=>{let e=(0,l.attr)(t,"data-font-size");e&&(t.style.fontSize=e,(0,l.attr)(t,"data-font-size",null))}),(0,l.$$)('font[size="7"]',this.area))){let{firstChild:e,lastChild:i}=t;if(e&&e===i&&(0,c.isMarker)(e)){a.Dom.unwrap(t);continue}e&&(0,c.isMarker)(e)&&a.Dom.before(t,e),i&&(0,c.isMarker)(i)&&a.Dom.after(t,i),yield t,a.Dom.unwrap(t)}}wrapInTag(t){let e=[];for(let i of this.wrapInTagGen())try{if(i.firstChild&&i.firstChild===i.lastChild&&(0,c.isMarker)(i.firstChild))continue;(0,c.isFunction)(t)?t(i):e.push(a.Dom.replace(i,t,this.j.createInside))}finally{let t=i.parentNode;t&&(a.Dom.unwrap(i),a.Dom.isEmpty(t)&&a.Dom.unwrap(t))}return e}commitStyle(t){(0,u.assert)((0,l.size)(t)>0,"Need to pass at least one option"),new d.CommitStyle(t).apply(this.j)}splitSelection(t,e){if(!this.isCollapsed())return null;let i=this.createRange(),o=this.range;i.setStartBefore(t);let n=this.cursorOnTheRight(t,e),r=this.cursorOnTheLeft(t,e),l=this.j.createInside.element("br"),c=this.j.createInside.fake(),h=c.cloneNode();try{if(n||r){e?a.Dom.before(e,l):a.Dom.safeInsertNode(o,l);let t=(t,e)=>{let i=e(t);for(;i;){let t=e(i);if(i&&(a.Dom.isTag(i,"br")||a.Dom.isEmptyTextNode(i)))a.Dom.safeRemove(i);else break;i=t}};t(l,t=>t.nextSibling),t(l,t=>t.previousSibling),a.Dom.after(l,h),a.Dom.before(l,c),n?(i.setEndBefore(l),o.setEndBefore(l)):(i.setEndAfter(l),o.setEndAfter(l))}else i.setEnd(o.startContainer,o.startOffset);let d=i.extractContents(),p=t=>a.Dom.each(t,t=>a.Dom.isEmptyTextNode(t)&&a.Dom.safeRemove(t));(0,u.assert)(t.parentNode,"Splitting fails");try{if(p(d),p(t),t.parentNode.insertBefore(d,t),!e&&n&&l?.parentNode){let t=this.createRange();t.setStartBefore(l),this.selectRange(t)}}catch(t){if(!s.IS_PROD)throw t}let f=t=>{t?.parentNode?.firstChild===t?.parentNode?.lastChild&&t?.parentNode?.appendChild(l.cloneNode())};f(c),f(h)}finally{a.Dom.safeRemove(c),a.Dom.safeRemove(h)}return t.previousElementSibling}expandSelection(){if(this.isCollapsed())return this;let{range:t}=this,e=t.cloneRange();if(!a.Dom.isOrContains(this.j.editor,t.commonAncestorContainer,!0))return this;let i=e=>{let i=this.j.createInside.fake(),o=t.cloneRange();return o.collapse(e),a.Dom.safeInsertNode(o,i),(0,h.moveTheNodeAlongTheEdgeOutward)(i,e,this.j.editor),i},o=i(!0),n=i(!1);e.setStartAfter(o),e.setEndBefore(n);let s=a.Dom.findSibling(o,!1),r=a.Dom.findSibling(n,!0);if(s!==r){let t=a.Dom.isElement(s)&&a.Dom.isOrContains(s,n),i=!t&&a.Dom.isElement(r)&&a.Dom.isOrContains(r,o);if(t||i){let i=t?s:r,l=i;for(;a.Dom.isElement(i);)(i=t?i.firstElementChild:i.lastElementChild)&&(t?a.Dom.isOrContains(i,n):a.Dom.isOrContains(i,o))&&(l=i);t?e.setStart(l,0):e.setEnd(l,l.childNodes.length)}}if(this.selectRange(e),a.Dom.safeRemove(o,n),this.isCollapsed())throw(0,l.error)("Selection is collapsed");return this}constructor(t){(0,o._)(this,"jodit",void 0),this.jodit=t,t.e.on("removeMarkers",()=>{this.removeMarkers()})}}(0,n.__decorate)([r.autobind],f.prototype,"createRange",null),(0,n.__decorate)([r.autobind],f.prototype,"focus",null),(0,n.__decorate)([r.autobind],f.prototype,"setCursorAfter",null),(0,n.__decorate)([r.autobind],f.prototype,"setCursorBefore",null),(0,n.__decorate)([r.autobind],f.prototype,"setCursorIn",null)},17481:function(t,e,i){"use strict";i.d(e,{extractSelectedPart:function(){return a}});var o=i(23211),n=i(23175),s=i(4040),r=i(71125);function a(t,e,i){let o=i.s.createRange(),s=(0,n.isMarker)(e.previousSibling)?e.previousSibling:e;o.setStartBefore(t),o.setEndBefore(s),l(t,o,!0);let r=(0,n.isMarker)(e.nextSibling)?e.nextSibling:e;o.setStartAfter(r),o.setEndAfter(t),l(t,o,!1)}function l(t,e,i){let n=e.extractContents();n.textContent&&(0,s.trim)(n.textContent).length||!n.firstChild||o.Dom.unwrap(n.firstChild),t.parentNode&&(0,r.call)(i?o.Dom.before:o.Dom.after,t,n)}},48729:function(t,e,i){"use strict";i.d(e,{FiniteStateMachine:function(){return a}});var o=i(25045),n=i(81937),s=i(85932),r=i(28712);class a{setState(t){(0,r.assert)(!this.__previewsStates.has(t),"Circled states"),this.__previewsStates.add(t),this.__state=t}getState(){return this.__state}disableSilent(){this.silent=!1}dispatch(t,e){let i=this.transitions[this.getState()][t];if(i){let t=i.call(this,e);return(0,r.assert)(t&&t!==e,"Action should return new value"),(0,r.assert)((0,s.isString)(t.next),"Value should contain the next state"),(0,r.assert)(t.next!==this.getState(),"The new state should not be equal to the old one."),this.setState(t.next),n.IS_PROD||this.silent,t}throw Error(`invalid action: ${this.getState()}.${t.toString()}`)}constructor(t,e){(0,o._)(this,"transitions",void 0),(0,o._)(this,"__state",void 0),(0,o._)(this,"silent",void 0),(0,o._)(this,"__previewsStates",void 0),this.transitions=e,this.silent=!0,this.__previewsStates=new Set,this.setState(t)}}},10171:function(t,e,i){"use strict";i.d(e,{getSuitChild:function(){return r}});var o=i(23211),n=i(83653),s=i(73019);function r(t,e){let{firstChild:i}=e;for(;i&&!(0,n.isNormalNode)(i);)if(!(i=i.nextSibling))return null;return i&&!o.Dom.next(i,n.isNormalNode,e)&&(0,s.isSuitElement)(t,i,!1)?i:null}},19549:function(t,e,i){"use strict";i.d(e,{getSuitParent:function(){return function t(e,i,r){let{parentNode:a}=i;return a===r||!o.Dom.isHTMLElement(a)||o.Dom.next(i,n.isNormalNode,a)||o.Dom.prev(i,n.isNormalNode,a)?null:e.isElementCommit&&e.elementIsBlock&&!o.Dom.isBlock(a)?t(e,a,r):(0,s.isSuitElement)(e,a,!1)&&(!o.Dom.isBlock(a)||e.elementIsBlock)?a:e.isElementCommit&&!o.Dom.isBlock(a)?t(e,a,r):null}}});var o=i(23211),n=i(83653),s=i(73019)},9703:function(t,e,i){"use strict";i.d(e,{hasSameStyle:function(){return c},hasSameStyleKeys:function(){return u}});var o=i(81937),n=i(23211),s=i(18303),r=i(19147),a=i(28712),l=i(80991);function c(t,e){return!!(!n.Dom.isTag(t,"font")&&n.Dom.isHTMLElement(t)&&Object.keys(e).every(i=>{let o=(0,l.css)(t,i,!0);return""===o&&(""===e[i]||null==e[i])||!(0,s.isVoid)(o)&&""!==o&&!(0,s.isVoid)(e[i])&&(0,r.normalizeCssValue)(i,e[i]).toString().toLowerCase()===o.toString().toLowerCase()}))}if(o.globalDocument){let t=o.globalDocument.createElement("div");t.style.color="red",(0,a.assert)(c(t,{color:"red"}),"Style test"),(0,a.assert)(c(t,{fontSize:null}),"Style test"),(0,a.assert)(c(t,{fontSize:""}),"Style test")}function u(t,e){return!!(!n.Dom.isTag(t,"font")&&n.Dom.isHTMLElement(t)&&Object.keys(e).every(e=>""!==(0,l.css)(t,e,!0)))}if(o.globalDocument){let t=o.globalDocument.createElement("div");t.style.color="red",(0,a.assert)(u(t,{color:"red"}),"Style test"),(0,a.assert)(!u(t,{font:"Arial",color:"red"}),"Style test"),(0,a.assert)(!u(t,{border:"1px solid #ccc"}),"Style test")}},51640:function(t,e,i){"use strict";i.d(e,{FiniteStateMachine:function(){return n.FiniteStateMachine},extractSelectedPart:function(){return o.extractSelectedPart},getSuitChild:function(){return s.getSuitChild},getSuitParent:function(){return r.getSuitParent},isInsideInvisibleElement:function(){return a.isInsideInvisibleElement},suitableClosest:function(){return l.suitableClosest},toggleAttributes:function(){return u.toggleAttributes},toggleOrderedList:function(){return c.toggleOrderedList},unwrapChildren:function(){return h.unwrapChildren},wrap:function(){return d.wrap}});var o=i(17481),n=i(48729),s=i(10171),r=i(19549);i(9703);var a=i(39608);i(83653),i(95971);var l=i(73019),c=i(34582);i(97110);var u=i(82794),h=i(89081),d=i(73154);i(83335)},39608:function(t,e,i){"use strict";i.d(e,{isInsideInvisibleElement:function(){return n}});var o=i(23211);function n(t,e){return!!o.Dom.closest(t,["style","script"],e)}},83653:function(t,e,i){"use strict";i.d(e,{isNormalNode:function(){return s}});var o=i(23211),n=i(23175);function s(t){return!!(t&&!o.Dom.isEmptyTextNode(t)&&!o.Dom.isTemporary(t)&&!(0,n.isMarker)(t))}},95971:function(t,e,i){"use strict";i.d(e,{elementsEqualAttributes:function(){return l},isSameAttributes:function(){return a}});var o=i(18073),n=i(93640),s=i(28712),r=i(9703);function a(t,e){return!((t.attributes.length||(0,o.size)(e))&&(0,o.size)(e))||((0,s.assert)(e,"Attrs must be a non-empty object"),Object.keys(e).every(i=>"class"===i||"className"===i?t.classList.contains(e[i]):"style"===i?(0,r.hasSameStyle)(t,e[i]):(0,n.attr)(t,i)===e[i]))}function l(t,e){return t.attributes.length===e.attributes.length&&Array.from(t.attributes).every(t=>e.hasAttribute(t.name)&&e.getAttribute(t.name)===t.value)}},73019:function(t,e,i){"use strict";i.d(e,{isSameStyleChild:function(){return l},isSuitElement:function(){return r},suitableClosest:function(){return a}});var o=i(23211),n=i(9703),s=i(83653);function r(t,e,i,a=!0){if(!e||!(0,s.isNormalNode)(e))return!1;let{element:l,elementIsDefault:c,options:u}=t;if(o.Dom.isList(e)&&t.elementIsList)return!0;let h=o.Dom.isTag(e,l);return!!(h&&!(c&&i)||u.attributes?.style&&(a?(0,n.hasSameStyle)(e,u.attributes.style):(0,n.hasSameStyleKeys)(e,u.attributes.style))&&!t.elementIsList)||!h&&!i&&c&&o.Dom.isInlineBlock(e)}function a(t,e,i){return o.Dom.closest(e,e=>r(t,e,!0,!1),i)}function l(t,e){let{element:i,options:o}=t;if(!e||!(0,s.isNormalNode)(e))return!1;let r=e.nodeName.toLowerCase()===i,a=!!(o.attributes?.style&&(0,n.hasSameStyleKeys)(e,o.attributes?.style));return r&&a}},34582:function(t,e,i){"use strict";i.d(e,{toggleOrderedList:function(){return c}});var o=i(23211),n=i(28712),s=i(17481),r=i(82794),a=i(98394),l=i(97110);function c(t,e,i,o){if(!e)return o;let n=e.parentElement;if(!n)return o;let s=i.e.fire(`${a._PREFIX}BeforeToggleList`,o,t,n);if(void 0!==s)return s;let c=i.e.fire.bind(i.e,`${a._PREFIX}AfterToggleList`);if(o!==a.UNWRAP){let s=(0,r.toggleAttributes)(t,e.parentElement,i,a.INITIAL,!0)===a.CHANGE;if(o===a.REPLACE||s||n.tagName.toLowerCase()!==t.element){let o=u(a.REPLACE,n,e,i,t),s=(0,l.wrapList)(t,o,i);return c(a.REPLACE,s,t),a.REPLACE}}let h=u(a.UNWRAP,n,e,i,t);return c(a.UNWRAP,h,t),a.UNWRAP}function u(t,e,i,r,l){let c=r.e.fire(`${a._PREFIX}BeforeUnwrapList`,t,e,l);return c?((0,n.assert)(o.Dom.isHTMLElement(c),`${a._PREFIX}BeforeUnwrapList hook must return HTMLElement`),c):((0,s.extractSelectedPart)(e,i,r),(0,n.assert)(o.Dom.isHTMLElement(i.parentElement),"Element should be inside the list"),o.Dom.unwrap(i.parentElement),o.Dom.replace(i,"br"!==r.o.enter.toLowerCase()?r.o.enter:r.createInside.fragment(),r.createInside))}},97110:function(t,e,i){"use strict";i.d(e,{wrapList:function(){return a}});var o=i(23211),n=i(95971),s=i(82794),r=i(98394);function a(t,e,i){let a=i.e.fire(`${r._PREFIX}BeforeWrapList`,r.REPLACE,e,t)??o.Dom.replace(e,"li",i.createInside),l=a.previousElementSibling,c=a.nextElementSibling,u=o.Dom.isTag(l,t.element)?l:null;return u??=o.Dom.isTag(c,t.element)?c:null,o.Dom.isList(u)&&(0,n.isSameAttributes)(u,t.options.attributes)||(u=i.createInside.element(t.element),(0,s.toggleAttributes)(t,u,i,r.INITIAL),o.Dom.before(a,u)),l===u?o.Dom.append(u,a):o.Dom.prepend(u,a),o.Dom.isTag(u.nextElementSibling,t.element)&&(0,n.elementsEqualAttributes)(u,u.nextElementSibling)&&(o.Dom.append(u,Array.from(u.nextElementSibling.childNodes)),o.Dom.safeRemove(u.nextElementSibling)),i.e.fire(`${r._PREFIX}AfterWrapList`,r.WRAP,u,t),u}},82794:function(t,e,i){"use strict";i.d(e,{toggleAttributes:function(){return m}});var o=i(81937),n=i(23211),s=i(28077),r=i(28686),a=i(19147),l=i(18073),c=i(74264),u=i(93640),h=i(80991),d=i(36400),p=i(98394);let f="toggleAttributes";function m(t,e,i,_,v=!1){if(!v&&t.isApplied(e,f))return _;v||t.setApplied(e,f);let{attributes:b}=t.options;return b&&(0,l.size)(b)>0&&Object.keys(b).forEach(f=>{var m,y,w;let S=b[f];switch(f){case"style":m=_,(0,u.assert)((0,r.isPlainObject)(S)&&(0,l.size)(S),"Style must be an object"),Object.keys(S).forEach(r=>{let l=e.style.getPropertyValue((0,c.kebabCase)(r)),u=S[r];if(""!==l||null!=u){let c,f;if((c=i.create.element(e.tagName.toLowerCase())).style.cssText=e.style.cssText,(function(t){if(void 0!==(0,d.dataBind)(t,"shadowRoot"))return(0,d.dataBind)(t,"shadowRoot");let e=(0,s.getContainer)(t),i=o.globalDocument.createElement("iframe");(0,h.css)(i,{width:0,height:0,position:"absolute",border:0}),i.src="about:blank",e.appendChild(i);let n=i.contentWindow?.document,r=n?n.body:t.od.body;return(0,d.dataBind)(t,"shadowRoot",r),r})(i).appendChild(c),f=(0,h.css)(c,r),n.Dom.safeRemove(c),f===(0,a.normalizeCssValue)(r,u)){if(!l)return;v||(0,h.css)(e,r,null),m=g(t,e,m=p.UNSET);return}m=p.CHANGE,v||((0,h.css)(e,r,u),m=g(t,e,m))}}),_=m;break;case"className":case"class":let C;y=_,(0,u.assert)((0,r.isString)(S),"Class name must be a string"),C=i.e.fire.bind(i.e,`${p._PREFIX}AfterToggleAttribute`),e.classList.contains(S.toString())?(y=p.UNSET,v||(e.classList.remove(S),0===e.classList.length&&((0,u.attr)(e,"class",null),C(y,e,"class",null)))):(y=p.CHANGE,v||(e.classList.add(S),C(y,e,"class",S))),_=y;break;default:let E;w=_,(0,u.assert)((0,r.isString)(S)||(0,r.isNumber)(S)||(0,r.isBoolean)(S)||null==S,"Attribute value must be a string or number or boolean or null"),E=i.e.fire.bind(i.e,`${p._PREFIX}AfterToggleAttribute`),(0,u.attr)(e,f)===S?(v||(0,u.attr)(e,f,null),w=p.UNSET,v||E(w,e,f,S)):(w=p.CHANGE,v||((0,u.attr)(e,f,S),E(w,e,f,S))),_=w}}),_}function g(t,e,i){return(0,u.attr)(e,"style")||((0,u.attr)(e,"style",null),e.tagName.toLowerCase()===t.defaultTag&&(n.Dom.unwrap(e),i=p.UNWRAP)),i}},89081:function(t,e,i){"use strict";i.d(e,{unwrapChildren:function(){return a}});var o=i(23211),n=i(93640),s=i(9703),r=i(73019);function a(t,e){let i,a=[],l=[],c=t.options.attributes?.style;if(e.firstChild){let u=o.Dom.eachGen(e),h=u.next();for(;!h.done;){let e=h.value;(0,r.isSuitElement)(t,e,!0)&&(!c||(0,s.hasSameStyleKeys)(e,c))?(void 0===i&&(i=!0),a.push(e)):c&&(0,r.isSameStyleChild)(t,e)?(void 0===i&&(i=!1),l.push(()=>{(0,n.css)(e,Object.keys(c).reduce((t,e)=>(t[e]=null,t),{})),(0,n.attr)(e,"style")||(0,n.attr)(e,"style",null),(0,n.attr)(e,"style")||e.nodeName.toLowerCase()!==t.element||a.push(e)})):o.Dom.isEmptyTextNode(e)||void 0!==i||(i=!1),h=u.next()}}return l.forEach(t=>t()),a.forEach(o.Dom.unwrap),!!i}},83335:function(t,e,i){"use strict";i.d(e,{wrapUnwrappedText:function(){return s}});var o=i(23211),n=i(23175);function s(t,e,i){let s=i.editor,r=i.createInside,a=(t,e="previousSibling")=>{let r=t,a=t;for(;a&&!(0,n.isMarker)(a)&&!o.Dom.isTag(a,i.o.enter)&&(r=a,a=a[e]?a[e]:a.parentNode&&!o.Dom.isBlock(a.parentNode)&&a.parentNode!==s?a.parentNode:null,!o.Dom.isBlock(a)););return r},l=a(e),c=a(e,"nextSibling"),u=i.s.createRange();u.setStartBefore(l),u.setEndAfter(c);let h=u.extractContents(),d=r.element(t.element);return d.appendChild(h),o.Dom.safeInsertNode(u,d),t.elementIsBlock&&o.Dom.isEmpty(d)&&!o.Dom.isTag(d.firstElementChild,"br")&&d.appendChild(r.element("br")),d}},73154:function(t,e,i){"use strict";i.d(e,{wrap:function(){return a}});var o=i(27795),n=i(7909),s=i(97110),r=i(83335);function a(t,e,i){var a,c,u;let h=(a=t,c=e,u=i,a.elementIsBlock?o.Dom.up(c,t=>o.Dom.isBlock(t)&&!o.Dom.isTag(t,l),u.editor)||(0,r.wrapUnwrappedText)(a,c,u):((0,n.attr)(c,"size",null),c));return t.elementIsList?(0,s.wrapList)(t,h,i):o.Dom.replace(h,t.element,i.createInside,!0)}let l=new Set(["td","th","tr","tbody","table","li","ul","ol"])},96127:function(t,e,i){"use strict";i.d(e,{ApplyStyle:function(){return r}});var o=i(51640),n=i(98394),s=i(78462);function r(t,e){let{s:i,editor:r}=t;r.firstChild?.normalize();let a=i.fakes(),l=t.s.wrapInTagGen(a),c=l.next();if(c.done)return;let u={collapsed:i.isCollapsed(),mode:n.INITIAL,element:c.value,next:s.states.START,jodit:t,style:e};for(;c&&!c.done;){let t=new o.FiniteStateMachine(s.states.START,s.transactions);for(u.element=c.value;t.getState()!==s.states.END;)u=t.dispatch("exec",u);c=l.next()}i.restoreFakes(a)}},84578:function(t,e,i){"use strict";i.d(e,{CommitStyle:function(){return l}});var o=i(25045),n=i(81937),s=i(57821),r=i(98394),a=i(96127);class l{isApplied(t,e){let i=this.__applyMap.get(t);return!!i&&i[e]}setApplied(t,e){let i=this.__applyMap.get(t)??{};i[e]=!0,this.__applyMap.set(t,i)}get elementIsList(){return!!(this.options.element&&n.LIST_TAGS.has(this.options.element))}get element(){return this.options.element||this.defaultTag}get elementIsBlock(){return!!(this.options.element&&n.IS_BLOCK.test(this.options.element))}get isElementCommit(){return!!(this.options.element&&this.options.element!==this.options.defaultTag)}get defaultTag(){return this.options.defaultTag?this.options.defaultTag:this.elementIsBlock?"p":"span"}get elementIsDefault(){return this.element===this.defaultTag}apply(t){let{hooks:e}=this.options,i=e?Object.keys(e):[];try{i.forEach(i=>{t.e.on((0,s.camelCase)(r._PREFIX+"_"+i),e[i])}),(0,a.ApplyStyle)(t,this)}finally{i.forEach(i=>{t.e.off((0,s.camelCase)(r._PREFIX+"_"+i),e[i])}),this.__applyMap=new WeakMap}t.synchronizeValues(),t.e.fire("afterCommitStyle",this)}constructor(t){(0,o._)(this,"options",void 0),(0,o._)(this,"__applyMap",void 0),this.options=t,this.__applyMap=new WeakMap}}},98394:function(t,e,i){"use strict";i.d(e,{CHANGE:function(){return s},INITIAL:function(){return a},REPLACE:function(){return l},UNSET:function(){return r},UNWRAP:function(){return n},WRAP:function(){return o},_PREFIX:function(){return c}});let o="wrap",n="unwrap",s="change",r="unset",a="initial",l="replace",c="commitStyle"},78462:function(t,e,i){"use strict";i.d(e,{states:function(){return l},transactions:function(){return c}});var o=i(81937),n=i(23211),s=i(28712),r=i(51640),a=i(98394);let l={START:"START",ELEMENT:"ELEMENT",UNWRAP:"UNWRAP",UNWRAP_CHILDREN:"UNWRAP_CHILDREN",CHANGE:"CHANGE",REPLACE_DEFAULT:"REPLACE_DEFAULT",LIST:"LIST",TOGGLE_LIST:"TOGGLE_LIST",WRAP:"WRAP",EXTRACT:"EXTRACT",END:"END"},c={[l.START]:{exec(t){let{element:e,jodit:i,style:o,mode:s,collapsed:c}=t;if((0,r.isInsideInvisibleElement)(e,i.editor)||!c&&n.Dom.isEmptyContent(e))return{...t,next:l.END};let u=(0,r.getSuitParent)(o,e,i.editor)||(0,r.getSuitChild)(o,e);if(u)return{...t,next:l.ELEMENT,element:u};let h=(0,r.suitableClosest)(o,e,i.editor);return o.elementIsList&&n.Dom.isList(h)?{...t,next:l.LIST}:h?{...t,next:l.EXTRACT}:{...t,next:s!==a.UNWRAP?l.UNWRAP_CHILDREN:l.END}}},[l.LIST]:{exec(t){let{element:e,jodit:i,mode:s}=t;if(s!==a.INITIAL&&s!==a.UNWRAP&&s!==a.REPLACE)return{...t,next:l.END};let r=n.Dom.closest(e,"li",i.editor);return r&&n.Dom.closest(e,o.LIST_TAGS,i.editor)?{...t,element:r,next:l.TOGGLE_LIST}:{...t,next:l.END}}},[l.TOGGLE_LIST]:{exec:t=>({...t,mode:(0,r.toggleOrderedList)(t.style,t.element,t.jodit,t.mode),next:l.END})},[l.EXTRACT]:{exec(t){let{element:e,jodit:i,style:o}=t,a=(0,r.suitableClosest)(o,e,i.editor);return((0,s.assert)(a,"This place should have an element"),!o.elementIsBlock&&o.options.attributes?.style&&n.Dom.isBlock(a))?{...t,next:l.WRAP}:(o.elementIsBlock||(0,r.extractSelectedPart)(a,e,i),{...t,element:a,next:l.ELEMENT})}},[l.UNWRAP_CHILDREN]:{exec(t){let{element:e,style:i}=t;return(0,r.unwrapChildren)(i,e)?{...t,mode:a.UNWRAP,next:l.END}:{...t,next:l.WRAP}}},[l.WRAP]:{exec(t){let{element:e,jodit:i,style:o}=t,n=(0,r.wrap)(o,e,i);return{...t,next:o.elementIsList?l.END:l.CHANGE,mode:a.WRAP,element:n}}},[l.ELEMENT]:{exec(t){let{style:e,element:i,jodit:o}=t;return(0,r.toggleAttributes)(e,i,o,a.INITIAL,!0)!==a.INITIAL?{...t,next:l.CHANGE}:n.Dom.isTag(i,e.element)?{...t,next:l.UNWRAP}:{...t,next:l.END}}},[l.CHANGE]:{exec(t){let{style:e,element:i,jodit:o,mode:s}=t,c=(0,r.toggleAttributes)(e,i,o,t.mode);return s!==a.WRAP&&c===a.UNSET&&!i.attributes.length&&n.Dom.isTag(i,e.element)?{...t,next:l.UNWRAP}:{...t,mode:c,next:l.END}}},[l.UNWRAP]:{exec:t=>t.element.attributes.length&&n.Dom.isTag(t.element,t.style.element)?{...t,next:l.REPLACE_DEFAULT}:(n.Dom.unwrap(t.element),{...t,mode:a.UNWRAP,next:l.END})},[l.REPLACE_DEFAULT]:{exec:t=>(n.Dom.replace(t.element,t.style.defaultTag,t.jodit.createInside,!0),{...t,mode:a.REPLACE,next:l.END})},[l.END]:{exec:t=>t}}},8006:function(t,e,i){"use strict";i.d(e,{AsyncStorage:function(){return c}});var o=i(25045),n=i(57821),s=i(91162),r=i(59807),a=i(9505),l=i(24475);class c{async set(t,e){let i=await this.provider;return await i.set((0,n.camelCase)(this.prefix+t),e),this}async delete(t){let e=await this.provider;return await e.delete((0,n.camelCase)(this.prefix+t)),this}async get(t){return(await this.provider).get((0,n.camelCase)(this.prefix+t))}async exists(t){return(await this.provider).exists((0,n.camelCase)(this.prefix+t))}async clear(){let t=await this.provider;return await t.clear(),this}async close(){let t=await this.provider;"close"in t&&"function"==typeof t.close&&await t.close()}static makeStorage(t=!1,e){let i;return"localStorage"===t||"sessionStorage"===t?(0,r.canUsePersistentStorage)(t)&&(i=new r.LocalStorageProvider(l.StorageKey+(e||""),t)):("indexedDB"===t||!0===t)&&(i=(0,s.canUseIndexedDB)().then(t=>t?new s.IndexedDBProvider(l.StorageKey+(e||""),"keyValueStore"):new a.MemoryStorageProvider)),i||(i=new a.MemoryStorageProvider),new c(Promise.resolve(i),e)}constructor(t,e){(0,o._)(this,"provider",void 0),(0,o._)(this,"prefix",void 0),this.provider=t,this.prefix=l.StorageKey,e&&(this.prefix+=e)}}},91162:function(t,e,i){"use strict";i.d(e,{IndexedDBProvider:function(){return s},canUseIndexedDB:function(){return l},clearUseIndexedDBCache:function(){return a}});var o=i(25045),n=i(81937);class s{getDB(){return this.dbPromise||(this.dbPromise=new Promise((t,e)=>{let i=indexedDB.open(this.dbName,this.DB_VERSION);i.onerror=()=>{e(i.error)},i.onsuccess=()=>{t(i.result)},i.onupgradeneeded=t=>{let e=t.target.result;e.objectStoreNames.contains(this.storeName)||e.createObjectStore(this.storeName)}})),this.dbPromise}async performTransaction(t,e){try{let i=(await this.getDB()).transaction([this.storeName],t).objectStore(this.storeName),o=e(i);return new Promise((t,e)=>{o.onsuccess=()=>{t(o.result)},o.onerror=()=>{e(o.error)}})}catch(t){return Promise.reject(t)}}async set(t,e){try{await this.performTransaction("readwrite",i=>i.put(e,t))}catch(t){n.IS_PROD}return this}async delete(t){try{await this.performTransaction("readwrite",e=>e.delete(t))}catch{}return this}async get(t){try{return await this.performTransaction("readonly",e=>e.get(t))}catch{return}}async exists(t){try{let e=await this.performTransaction("readonly",e=>e.get(t));return void 0!==e}catch{return!1}}async clear(){try{await this.performTransaction("readwrite",t=>t.clear())}catch{}return this}async close(){if(this.dbPromise){try{(await this.dbPromise).close()}catch{}this.dbPromise=null}}async keys(){try{let t=await this.performTransaction("readonly",t=>t.getAllKeys());return t&&"object"==typeof t&&"then"in t&&(t=await t),t.map(t=>t+"")}catch{return[]}}async values(){try{let t=await this.performTransaction("readonly",t=>t.getAll());return t&&"object"==typeof t&&"then"in t&&(t=await t),t}catch{return[]}}async entries(){try{let[t,e]=await Promise.all([this.keys(),this.values()]);return t.map((t,i)=>[t,e[i]])}catch{return[]}}constructor(t="JoditDB",e="keyValueStore"){(0,o._)(this,"dbName",void 0),(0,o._)(this,"dbPromise",void 0),(0,o._)(this,"DB_VERSION",void 0),(0,o._)(this,"storeName",void 0),this.dbName=t,this.dbPromise=null,this.DB_VERSION=1,this.storeName=e}}let r=null;function a(){r=null}async function l(){if(null!=r)return r;try{if("u"<typeof indexedDB)return r=!1,!1;let t="___Jodit___"+Math.random().toString(),e=indexedDB.open(t);return r=await new Promise(i=>{e.onerror=()=>{i(!1)},e.onsuccess=()=>{indexedDB.deleteDatabase(t),i(!0)}})}catch{return r=!1,!1}}},59807:function(t,e,i){"use strict";i.d(e,{LocalStorageProvider:function(){return s},canUsePersistentStorage:function(){return n}});var o=i(25045);let n=(t="localStorage")=>{let e=new Map;if(e.has(t))return e.get(t);let i="___Jodit___"+Math.random().toString(),o="sessionStorage"===t?sessionStorage:localStorage;try{o.setItem(i,"1");let n="1"===o.getItem(i);return o.removeItem(i),e.set(t,n),n}catch{}return e.set(t,!1),!1};class s{get storage(){return"sessionStorage"===this.strategy?sessionStorage:localStorage}set(t,e){try{let i=this.storage.getItem(this.rootKey),o=i?JSON.parse(i):{};o[t]=e,this.storage.setItem(this.rootKey,JSON.stringify(o))}catch{}return this}delete(t){try{this.storage.removeItem(this.rootKey)}catch{}return this}get(t){try{let e=this.storage.getItem(this.rootKey),i=e?JSON.parse(e):{};return void 0!==i[t]?i[t]:void 0}catch{}}exists(t){return null!=this.get(t)}clear(){try{this.storage.removeItem(this.rootKey)}catch{}return this}constructor(t,e="localStorage"){(0,o._)(this,"rootKey",void 0),(0,o._)(this,"strategy",void 0),this.rootKey=t,this.strategy=e}}},9505:function(t,e,i){"use strict";i.d(e,{MemoryStorageProvider:function(){return n}});var o=i(25045);class n{set(t,e){return this.data.set(t,e),this}delete(t){return this.data.delete(t),this}get(t){return this.data.get(t)}exists(t){return this.data.has(t)}clear(){return this.data.clear(),this}constructor(){(0,o._)(this,"data",new Map)}}},25222:function(t,e,i){"use strict";i.d(e,{AsyncStorage:function(){return o.AsyncStorage},IndexedDBProvider:function(){return n.IndexedDBProvider},LocalStorageProvider:function(){return s.LocalStorageProvider},MemoryStorageProvider:function(){return r.MemoryStorageProvider},Storage:function(){return a.Storage},StorageKey:function(){return a.StorageKey},canUseIndexedDB:function(){return n.canUseIndexedDB},canUsePersistentStorage:function(){return s.canUsePersistentStorage},clearUseIndexedDBCache:function(){return n.clearUseIndexedDBCache}});var o=i(8006),n=i(91162),s=i(59807),r=i(9505),a=i(24475)},24475:function(t,e,i){"use strict";i.d(e,{Storage:function(){return l},StorageKey:function(){return a}});var o=i(25045),n=i(57821),s=i(59807),r=i(9505);let a="Jodit_";class l{set(t,e){return this.provider.set((0,n.camelCase)(this.prefix+t),e),this}delete(t){return this.provider.delete((0,n.camelCase)(this.prefix+t)),this}get(t){return this.provider.get((0,n.camelCase)(this.prefix+t))}exists(t){return this.provider.exists((0,n.camelCase)(this.prefix+t))}clear(){return this.provider.clear(),this}static makeStorage(t=!1,e){let i;return"localStorage"===t||"sessionStorage"===t?(0,s.canUsePersistentStorage)(t)&&(i=new s.LocalStorageProvider(a+(e||""),t)):!0===t&&(0,s.canUsePersistentStorage)("localStorage")&&(i=new s.LocalStorageProvider(a+(e||""))),i||(i=new r.MemoryStorageProvider),new l(i,e)}constructor(t,e){(0,o._)(this,"provider",void 0),(0,o._)(this,"prefix",void 0),this.provider=t,this.prefix=a,e&&(this.prefix+=e)}}},80512:function(t,e,i){"use strict";i.d(e,{Dlgs:function(){return a}});var o=i(28077),n=i(28686),s=i(71125),r=i(37333);class a{dlg(t){let e=(0,o.getPopupViewRoot)(this.o,this.container,this.od.body),i=new r.Dialog({language:this.o.language,shadowRoot:this.o.shadowRoot,popupRoot:e,ownerWindow:this.o.ownerWindow,defaultTimeout:this.o.defaultTimeout,direction:this.o.direction,theme:this.o.theme,globalFullSize:this.o.globalFullSize,...t});return(0,s.markOwner)(this,i.container),i.parent=this,i.bindDestruct(this)}confirm(t,e,i){return t=l(t,this),e=l(e,this),r.Confirm.call(this.dlg({closeOnClickOverlay:!0}),t,e,i)}prompt(t,e,i,o,n){return t=l(t,this),e=l(e,this),o=l(o,this),r.Prompt.call(this.dlg({closeOnClickOverlay:!0}),t,e,i,o,n)}alert(t,e,i,o){return t=l(t,this),e=l(e,this),r.Alert.call(this.dlg({closeOnClickOverlay:!0}),t,e,i,o)}}function l(t,e){return(0,n.isString)(t)&&!(0,n.isHTML)(t)&&(t=e.i18n(t)),t}},23183:function(t,e,i){"use strict";i.d(e,{Elms:function(){return n}});var o=i(88475);class n{getElm(t){return this.container.querySelector("."+this.getFullElName(t))}getElms(t){return(0,o.toArray)(this.container.querySelectorAll("."+this.getFullElName(t)))}}},81987:function(t,e,i){"use strict";i.d(e,{Mods:function(){return n}});var o=i(18303);class n{afterSetMod(t,e){}setMod(t,e,i){t=t.toLowerCase();let n=this.mods[t];if(n===e)return this;let s=`${this.componentName}_${t}_`,r=(i||this.container).classList;return null!=n&&r.remove(`${s}${n.toString().toLowerCase()}`),(0,o.isVoid)(e)||""===e||r.add(`${s}${e.toString().toLowerCase()}`),this.mods[t]=e,this.afterSetMod(t,e),this}getMod(t){return this.mods[t]??null}}},53681:function(t,e,i){"use strict";i.d(e,{Button:function(){return v},UIButton:function(){return _},UIButtonState:function(){return g}});var o=i(25045),n=i(31635),s=i(69364),r=i(51676),a=i(91672),l=i(68616),c=i(23211),u=i(91565),h=i(85932),d=i(28712),p=i(7909),f=i(96007),m=i(29434);let g=()=>({size:"middle",type:"button",role:"button",name:"",value:"",variant:"initial",disabled:!1,activated:!1,icon:{name:"empty",fill:"",iconURL:"",scale:void 0},tooltip:"",text:"",tabIndex:void 0});class _ extends f.UIElement{className(){return"UIButton"}setState(t){return Object.assign(this.state,t),this}get text(){let t=this.getElm("text");return(0,d.assert)(t,"Text element not found"),t}get icon(){let t=this.getElm("icon");return(0,d.assert)(t,"Icon element not found"),t}onChangeSize(){this.setMod("size",this.state.size)}onChangeType(){(0,p.attr)(this.container,"type",this.state.type)}onChangeRole(){(0,p.attr)(this.container,"role",this.state.role)}updateSize(){let t=(0,a.getComponentClass)("UIList"),e=this.closest(t);if(e){this.state.size=e.buttonSize;return}}onChangeStatus(){this.setMod("variant",this.state.variant)}onChangeText(){this.text.textContent=this.jodit.i18n(this.state.text),this.updateAriaLabel()}onChangeTextSetMode(){this.setMod("text-icons",!!this.state.text.trim().length)}onChangeDisabled(){(0,p.attr)(this.container,"disabled",this.state.disabled||null)}onChangeActivated(){(0,p.attr)(this.container,"aria-pressed",this.state.activated)}onChangeName(){this.container.classList.add(`${this.componentName}_${this.clearName(this.state.name)}`),this.name=this.state.name,(0,p.attr)(this.container,"data-ref",this.state.name),(0,p.attr)(this.container,"ref",this.state.name)}onChangeTooltip(){let t=this.state.tooltip?this.jodit.i18n(this.state.tooltip):null;this.get("j.o.useNativeTooltip")&&(0,p.attr)(this.container,"title",t),(0,p.attr)(this.container,"aria-label",t),this.updateAriaLabel()}updateAriaLabel(){let t=this.state.text.trim().length>0,e=this.state.tooltip?this.jodit.i18n(this.state.tooltip):null;(0,p.attr)(this.container,"aria-label",e),(0,p.attr)(this.button,"aria-label",t?null:e)}onChangeTabIndex(){(0,p.attr)(this.container,"tabindex",this.state.tabIndex)}onChangeIcon(){let t=this.get("j.o.textIcons");if(!0===t||(0,u.isFunction)(t)&&t(this.state.name))return;c.Dom.detach(this.icon);let e=m.Icon.makeIcon(this.j,this.state.icon);e&&this.icon.appendChild(e)}focus(){this.container.focus()}isFocused(){let{activeElement:t}=this.od;return!!(t&&c.Dom.isOrContains(this.container,t))}createContainer(){let t=this.componentName,e=this.j.c.element("button",{class:t,type:"button",role:"button",ariaPressed:!1}),i=this.j.c.span(t+"__icon"),o=this.j.c.span(t+"__text");return e.appendChild(i),e.appendChild(o),e}destruct(){return this.j.e.off(this),this.j.e.off(this.container),super.destruct()}onAction(t){return this.actionHandlers.push(t),this}__onActionFire(t){t.buffer={actionTrigger:this},this.actionHandlers.forEach(e=>e.call(this,t)),this.j.e.fire(this,"click",t)}constructor(t,e){super(t),(0,o._)(this,"isButton",!0),(0,o._)(this,"state",g()),(0,o._)(this,"button",void 0),(0,o._)(this,"actionHandlers",[]),this.button=this.container,this.updateSize(),this.onChangeSize(),this.onChangeStatus(),e&&this.hookStatus(s.STATUSES.ready,()=>{this.setState(e)})}}function v(t,e,i,o){let n=new _(t);return n.state.tabIndex=t.o.allowTabNavigation?0:-1,(0,h.isString)(e)?(n.state.icon.name=e,n.state.name=e,o&&(n.state.variant=o),i&&(n.state.text=i)):n.setState(e),n}(0,n.__decorate)([r.cache],_.prototype,"text",null),(0,n.__decorate)([r.cache],_.prototype,"icon",null),(0,n.__decorate)([(0,l.watch)("state.size",{immediately:!1})],_.prototype,"onChangeSize",null),(0,n.__decorate)([(0,l.watch)("state.type",{immediately:!1})],_.prototype,"onChangeType",null),(0,n.__decorate)([(0,l.watch)("state.role",{immediately:!1})],_.prototype,"onChangeRole",null),(0,n.__decorate)([(0,l.watch)("parentElement")],_.prototype,"updateSize",null),(0,n.__decorate)([(0,l.watch)("state.variant",{immediately:!1})],_.prototype,"onChangeStatus",null),(0,n.__decorate)([(0,l.watch)("state.text",{immediately:!1})],_.prototype,"onChangeText",null),(0,n.__decorate)([(0,l.watch)("state.text",{immediately:!1})],_.prototype,"onChangeTextSetMode",null),(0,n.__decorate)([(0,l.watch)("state.disabled")],_.prototype,"onChangeDisabled",null),(0,n.__decorate)([(0,l.watch)("state.activated")],_.prototype,"onChangeActivated",null),(0,n.__decorate)([(0,l.watch)("state.name",{immediately:!1})],_.prototype,"onChangeName",null),(0,n.__decorate)([(0,l.watch)("state.tooltip",{immediately:!1})],_.prototype,"onChangeTooltip",null),(0,n.__decorate)([(0,l.watch)("state.tabIndex",{immediately:!1})],_.prototype,"onChangeTabIndex",null),(0,n.__decorate)([(0,l.watch)("state.icon",{immediately:!1})],_.prototype,"onChangeIcon",null),(0,n.__decorate)([r.cacheHTML],_.prototype,"createContainer",null),(0,n.__decorate)([(0,l.watch)("button:click")],_.prototype,"__onActionFire",null),_=(0,n.__decorate)([a.component],_)},15367:function(t,e,i){"use strict";i.d(e,{UIButtonGroup:function(){return c}});var o=i(25045),n=i(31635),s=i(91672),r=i(28712),a=i(53681),l=i(63468);class c extends l.UIGroup{className(){return"UIButtonGroup"}render(t){return`<div>
|
|
11
11
|
<div class="&__label">~${t.label}~</div>
|
|
12
12
|
<div class="&__options"></div>
|
|
13
13
|
</div>`}appendChildToContainer(t){let e=this.getElm("options");(0,r.assert)(null!=e,"Options does not exist"),e.appendChild(t)}select(t){this.elements.forEach((e,i)=>{i===t||e.state.value===t?e.state.activated=!0:this.options.radio&&(e.state.activated=!1)});let e=this.elements.filter(t=>t.state.activated).map(t=>({text:t.state.text,value:t.state.value}));this.jodit.e.fire(this,"select",e),this.options.onChange?.(e)}constructor(t,e={radio:!0}){super(t,e.options?.map(e=>{let i=new a.UIButton(t,{text:e.text,value:e.value,variant:"primary"});return i.onAction(()=>{this.select(e.value)}),i}),e),(0,o._)(this,"options",void 0),this.options=e,this.select(e.value??0)}}c=(0,n.__decorate)([s.component],c)},59400:function(t,e,i){"use strict";i.d(e,{Button:function(){return o.Button},UIButton:function(){return o.UIButton},UIButtonGroup:function(){return n.UIButtonGroup},UIButtonState:function(){return o.UIButtonState},UITooltip:function(){return s.UITooltip}});var o=i(53681),n=i(15367),s=i(95399)},95399:function(t,e,i){"use strict";i.d(e,{UITooltip:function(){return f}});var o=i(25045),n=i(31635),s=i(16964),r=i(84839),a=i(27795),l=i(28077),c=i(23599),u=i(93640),h=i(96007);let d=["scroll.tooltip","joditCloseDialog","mouseleave.tooltip"],p=["escape.tooltip","change.tooltip","changePlace.tooltip","afterOpenPopup.tooltip","hidePopup.tooltip","beforePopupClose.tooltip","closeAllPopups.tooltip"];class f extends h.UIElement{className(){return"UITooltip"}render(){return'<div><div class="&__content"></div></div>'}__onAttach(t){(0,l.getContainer)(this.j,f).appendChild(this.container),this.__attachedContainers.add(t),this.__attachedContainers.add(this.j.container),this.j.e.on(t,"mouseenter.tooltip",this.__onMouseEnter,{capture:!0}).on(t,"mouseleave.tooltip",this.__onMouseLeave,{capture:!0}).on(this.j.container,"mouseleave.tooltip",this.__onMouseLeave,{capture:!0})}__addListenersOnEnter(){if(this.__listenClose)return;this.__listenClose=!0;let t=this.j;t.e.on(t.ow,d,this.__hide).on(p,this.__hide)}__removeListenersOnLeave(){if(!this.__listenClose)return;this.__listenClose=!1;let t=this.j;t.e.off(t.ow,d,this.__hide).off(p,this.__hide)}__onMouseLeave(t){this.__currentTarget===t.target&&(this.__hideDelay(),this.__currentTarget=null)}__onMouseEnter(t){if(!a.Dom.isHTMLElement(t.target))return;let e=(0,u.attr)(t.target,"aria-label");if(!e||(0,u.attr)(t.target,"disabled")||!t.target.className.includes("jodit"))return;this.__currentTarget=t.target;let i=t.target;this.__open(()=>{let t=(0,c.position)(i);return{x:t.left+t.width/2,y:t.top+t.height}},e)}__open(t,e){this.__addListenersOnEnter(),this.__isOpened=!0,this.j.async.clearTimeout(this.__hideTimeout),this.j.async.clearTimeout(this.__delayShowTimeout);let i=this.j.o.showTooltipDelay||this.j.defaultTimeout;i?this.__delayShowTimeout=this.j.async.setTimeout(()=>this.__show(t,e),i):this.__show(t,e)}__show(t,e){this.setMod("visible",!0),this.getElm("content").innerHTML=e;let i=t();(0,u.css)(this.container,{left:i.x,top:i.y})}__hide(){this.j.async.clearTimeout(this.__delayShowTimeout),this.j.async.clearTimeout(this.__hideTimeout),this.__removeListenersOnLeave(),this.__isOpened&&(this.__isOpened=!1,this.setMod("visible",!1),this.getElm("content").innerHTML="",(0,u.css)(this.container,{left:-5e3}))}__hideDelay(){this.j.async.clearTimeout(this.__delayShowTimeout),this.j.async.clearTimeout(this.__hideTimeout),this.__isOpened&&(this.__hideTimeout=this.async.setTimeout(this.__hide,this.j.defaultTimeout))}destruct(){this.__attachedContainers.forEach(t=>{this.j.e.off(t,"mouseenter.tooltip",this.__onMouseEnter).off(t,"mouseleave.tooltip",this.__onMouseLeave)}),this.__hide(),super.destruct()}constructor(t){super(t),(0,o._)(this,"__isOpened",!1),(0,o._)(this,"__attachedContainers",new Set),(0,o._)(this,"__listenClose",!1),(0,o._)(this,"__currentTarget",null),(0,o._)(this,"__delayShowTimeout",0),(0,o._)(this,"__hideTimeout",0),t.o.textIcons||!t.o.showTooltip||t.o.useNativeTooltip||(this.j.e.on("getContainer",t=>{this.__onAttach(t)}),t.hookStatus(s.STATUSES.ready,()=>{this.__onAttach(this.j.container)}))}}(0,n.__decorate)([r.autobind],f.prototype,"__onMouseLeave",null),(0,n.__decorate)([r.autobind],f.prototype,"__onMouseEnter",null),(0,n.__decorate)([r.autobind],f.prototype,"__hide",null),(0,n.__decorate)([r.autobind],f.prototype,"__hideDelay",null),f=(0,n.__decorate)([r.component],f)},96007:function(t,e,i){"use strict";i.d(e,{UIElement:function(){return p}});var o=i(25045),n=i(31635),s=i(16964),r=i(24968),a=i(23211),l=i(85932),c=i(7909),u=i(23183),h=i(81987),d=i(29434);class p extends s.ViewComponent{getRole(){return this.options?.role||""}get parentElement(){return this.__parentElement}set parentElement(t){this.__parentElement=t,t&&t.hookStatus("beforeDestruct",()=>this.destruct()),this.updateParentElement(this)}bubble(t){let e=this.parentElement;for(;e;)t(e),e=e.parentElement;return this}updateParentElement(t){return this.__parentElement?.updateParentElement(t),this}get(t,e){return super.get(t,e)||this.getElm(t)}closest(t){let e="object"==typeof t?e=>e===t:e=>s.Component.isInstanceOf(e,t),i=this.__parentElement;for(;i;){if(e(i))return i;i=!i.parentElement&&i.container.parentElement?p.closestElement(i.container.parentElement,p):i.parentElement}return null}static closestElement(t,e){let i=a.Dom.up(t,t=>{if(t){let{component:i}=t;return i&&s.Component.isInstanceOf(i,e)}return!1});return i?i?.component:null}update(){}appendTo(t){return t.appendChild(this.container),this}clearName(t){return t.replace(/[^a-zA-Z0-9]/g,"_")}render(t){return this.j.c.div(this.componentName)}createContainer(t){let e=this.render(t);if((0,l.isString)(e)){let t=this.parseTemplate(e);return t.classList.add(this.componentName),t}return e}parseTemplate(t){return this.j.c.fromHTML(t.replace(/\*([^*]+?)\*/g,(t,e)=>d.Icon.get(e)||"").replace(/&_/g,this.componentName+"_").replace(/~([^~]+?)~/g,(t,e)=>this.i18n(e)))}destruct(){return a.Dom.safeRemove(this.container),this.parentElement=null,super.destruct()}constructor(t,e){super(t),(0,o._)(this,"container",void 0),(0,o._)(this,"name",""),(0,o._)(this,"options",void 0),(0,o._)(this,"__parentElement",null),(0,o._)(this,"mods",{}),this.options=e,this.container=this.createContainer(e);const i=this.getRole();i&&(0,c.attr)(this.container,"role",i),Object.defineProperty(this.container,"component",{value:this,configurable:!0})}}p=(0,n.__decorate)([(0,r.derive)(h.Mods,u.Elms)],p)},4561:function(t,e,i){"use strict";i.d(e,{UIBlock:function(){return l}});var o=i(25045),n=i(31635),s=i(91672),r=i(93640),a=i(63468);class l extends a.UIGroup{className(){return"UIBlock"}constructor(t,e,i={align:"left"}){super(t,e),(0,o._)(this,"options",void 0),this.options=i,this.setMod("align",this.options.align||"left"),this.setMod("width",this.options.width||""),this.options.mod&&this.setMod(this.options.mod,!0),this.options.className&&this.container.classList.add(this.options.className),(0,r.attr)(this.container,"data-ref",i.ref),(0,r.attr)(this.container,"ref",i.ref)}}l=(0,n.__decorate)([s.component],l)},98838:function(t,e,i){"use strict";i.d(e,{UIForm:function(){return u}});var o=i(31635),n=i(80251),s=i(91672),r=i(93640),a=i(65273),l=i(49999),c=i(63468);class u extends c.UIGroup{className(){return"UIForm"}submit(){this.j.e.fire(this.container,"submit")}validate(){for(let t of this.allChildren.filter(t=>n.Component.isInstanceOf(t,a.UIInput)))if(!t.validate())return!1;for(let t of this.allChildren.filter(t=>n.Component.isInstanceOf(t,l.UISelect)))if(!t.validate())return!1;return!0}onSubmit(t){return this.j.e.on(this.container,"submit",()=>{let e=this.allChildren.filter(t=>n.Component.isInstanceOf(t,a.UIInput));return!!this.validate()&&(t(e.reduce((t,e)=>(t[e.state.name]=e.value,t),{})),!1)}),this}createContainer(){let t=this.j.c.element("form");return t.classList.add(this.componentName),(0,r.attr)(t,"dir",this.j.o.direction||"auto"),(0,r.attr)(t,"novalidate",""),t}constructor(...t){super(...t),this.options?.className&&this.container.classList.add(this.options?.className)}}u=(0,o.__decorate)([s.component],u)},5658:function(t,e,i){"use strict";i.d(e,{UIBlock:function(){return o.UIBlock},UICheckbox:function(){return s.UICheckbox},UIFileInput:function(){return s.UIFileInput},UIForm:function(){return n.UIForm},UIInput:function(){return s.UIInput},UISelect:function(){return s.UISelect},UITextArea:function(){return s.UITextArea}});var o=i(4561),n=i(98838),s=i(2602)},87329:function(t,e,i){"use strict";i.d(e,{UITextArea:function(){return l}});var o=i(25045),n=i(31635),s=i(84839),r=i(91672),a=i(65273);class l extends a.UIInput{className(){return"UITextArea"}createNativeInput(t){return this.j.create.element("textarea")}onChangeStateSize(){let{size:t,resizable:e}=this.state;this.nativeInput.style.resize=e?"auto":"none",this.nativeInput.rows=t??5}constructor(t,e){super(t,e),(0,o._)(this,"state",{...l.defaultState}),Object.assign(this.state,e),!1===this.state.resizable&&(this.nativeInput.style.resize="none")}}(0,o._)(l,"defaultState",{...a.UIInput.defaultState,size:5,resizable:!0}),(0,n.__decorate)([(0,s.watch)(["state.size","state.resizable"])],l.prototype,"onChangeStateSize",null),l=(0,n.__decorate)([r.component],l)},24641:function(t,e,i){"use strict";i.d(e,{UICheckbox:function(){return l}});var o=i(25045),n=i(31635),s=i(84839),r=i(23211),a=i(65273);class l extends a.UIInput{className(){return"UICheckbox"}render(){return this.j.c.element("label",{className:this.componentName})}onChangeChecked(){this.value=this.state.checked.toString(),this.nativeInput.checked=this.state.checked,this.setMod("checked",this.state.checked)}onChangeNativeCheckBox(){this.state.checked=this.nativeInput.checked}onChangeSwitch(){this.setMod("switch",this.state.switch);let t=this.getElm("switch-slider");this.state.switch?(t||(t=this.j.c.div(this.getFullElName("switch-slider"))),r.Dom.after(this.nativeInput,t)):r.Dom.safeRemove(t)}constructor(t,e){super(t,{...e,type:"checkbox"}),(0,o._)(this,"state",{...l.defaultState}),Object.assign(this.state,e)}}(0,o._)(l,"defaultState",{...a.UIInput.defaultState,checked:!1,switch:!1}),(0,n.__decorate)([(0,s.watch)("state.checked"),(0,s.hook)("ready")],l.prototype,"onChangeChecked",null),(0,n.__decorate)([(0,s.watch)("nativeInput:change")],l.prototype,"onChangeNativeCheckBox",null),(0,n.__decorate)([(0,s.watch)("state.switch"),(0,s.hook)("ready")],l.prototype,"onChangeSwitch",null),l=(0,n.__decorate)([s.component],l)},75587:function(t,e,i){"use strict";i.d(e,{UIFileInput:function(){return l}});var o=i(25045),n=i(31635),s=i(91672),r=i(53681),a=i(65273);class l extends a.UIInput{className(){return"UIFileInput"}createContainer(t){this.button=new r.UIButton(this.j,{tooltip:t.tooltip,icon:{name:"plus"}});let{container:e}=this.button;this.nativeInput||(this.nativeInput=this.createNativeInput(t));let{nativeInput:i}=this;return i.classList.add(this.getFullElName("input")),e.classList.add(this.componentName),e.appendChild(i),e}createNativeInput(t){return this.j.create.fromHTML(`<input
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
dir="auto"
|
|
18
18
|
multiple=""
|
|
19
19
|
/>`)}constructor(t,e){super(t,{type:"file",...e}),(0,o._)(this,"state",{...a.UIInput.defaultState,type:"file",onlyImages:!0})}}l=(0,n.__decorate)([s.component],l)},2602:function(t,e,i){"use strict";i.d(e,{UICheckbox:function(){return n.UICheckbox},UIFileInput:function(){return s.UIFileInput},UIInput:function(){return r.UIInput},UISelect:function(){return a.UISelect},UITextArea:function(){return o.UITextArea}});var o=i(87329),n=i(24641),s=i(75587),r=i(65273),a=i(49999)},65273:function(t,e,i){"use strict";i.d(e,{UIInput:function(){return d}});var o=i(25045),n=i(31635),s=i(84839),r=i(23211),a=i(88475),l=i(93640),c=i(96007),u=i(81488),h=i(29434);class d extends c.UIElement{className(){return"UIInput"}onChangeClear(){this.state.clearButton?r.Dom.after(this.nativeInput,this.clearButton):r.Dom.safeRemove(this.clearButton)}onChangeClassName(t,e){e&&this.container.classList.remove(e),this.state.className&&this.container.classList.add(this.state.className)}onChangeState(){this.name=this.state.name;let t=this.nativeInput,{name:e,icon:i,type:o,ref:n,required:s,placeholder:a,autocomplete:c,label:u}=this.state;(0,l.attr)(t,"name",e),(0,l.attr)(t,"type",o),(0,l.attr)(t,"data-ref",n||e),(0,l.attr)(t,"ref",n||e),(0,l.attr)(t,"required",s||null),(0,l.attr)(t,"autocomplete",c?null:"off"),(0,l.attr)(t,"placeholder",a?this.j.i18n(a):""),i&&h.Icon.exists(i)?(r.Dom.before(t,this.icon),this.icon.innerHTML=h.Icon.get(i)):r.Dom.safeRemove(this.icon),u?(r.Dom.before(this.wrapper,this.label),this.label.innerText=this.j.i18n(u)):r.Dom.safeRemove(this.label),this.updateValidators()}updateValidators(){this.validators.clear(),this.state.required&&this.validators.add(u.inputValidators.required),this.state.validators?.forEach(t=>{let e=u.inputValidators[t];e&&this.validators.add(e)})}set error(t){this.setMod("has-error",!!t),t?(this.__errorBox.innerText=this.j.i18n(t,this.j.i18n(this.state.label||"")),this.container.appendChild(this.__errorBox)):r.Dom.safeRemove(this.__errorBox)}get value(){return this.nativeInput.value}set value(t){this.value!==t&&(this.nativeInput.value=t,this.onChangeValue())}onChangeStateValue(){let t=this.state.value.toString();t!==this.value&&(this.value=t)}onChangeValue(){let{value:t}=this;this.state.value!==t&&(this.state.value=t,this.j.e.fire(this,"change",t),this.state.onChange?.(t))}validate(){this.error="";let t=(0,a.toArray)(this.validators).every(t=>t(this));return this.__markInputInvalid(),t}__markInputInvalid(){this.error?(this.nativeInput.setAttribute("aria-invalid","true"),this.nativeInput.setCustomValidity?.(this.error)):(this.nativeInput.removeAttribute("aria-invalid"),this.nativeInput.setCustomValidity?.(""))}createContainer(t){let e=super.createContainer();this.wrapper=this.j.c.div(this.getFullElName("wrapper")),this.nativeInput||(this.nativeInput=this.createNativeInput());let{nativeInput:i}=this;return i.classList.add(this.getFullElName("input")),this.wrapper.appendChild(i),e.appendChild(this.wrapper),(0,l.attr)(i,"dir",this.j.o.direction||"auto"),e}createNativeInput(t){return this.j.create.element("input")}focus(){this.nativeInput.focus()}get isFocused(){return this.nativeInput===this.j.od.activeElement}onChangeFocus(){this.setMod("focused",this.isFocused)}constructor(t,e){super(t,e),(0,o._)(this,"label",this.j.c.span(this.getFullElName("label"))),(0,o._)(this,"icon",this.j.c.span(this.getFullElName("icon"))),(0,o._)(this,"clearButton",this.j.c.span(this.getFullElName("clear"),h.Icon.get("cancel"))),(0,o._)(this,"state",{...d.defaultState}),(0,o._)(this,"__errorBox",this.j.c.span(this.getFullElName("error"))),(0,o._)(this,"validators",new Set([])),e?.value!==void 0&&(e.value=e.value.toString()),Object.assign(this.state,e),void 0!==this.state.clearButton&&(this.j.e.on(this.clearButton,"click",t=>{t.preventDefault(),this.nativeInput.value="",this.j.e.fire(this.nativeInput,"input"),this.focus()}).on(this.nativeInput,"input",()=>{this.state.clearButton=!!this.value.length}),this.state.clearButton=!!this.value.length),this.j.e.on(this.nativeInput,"focus blur",()=>{this.onChangeFocus()}).on(this.nativeInput,"input change",this.onChangeValue),this.onChangeState(),this.onChangeClassName(),this.onChangeStateValue()}}(0,o._)(d,"defaultState",{className:"",autocomplete:!0,name:"",value:"",icon:"",label:"",ref:"",type:"text",placeholder:"",required:!1,validators:[]}),(0,n.__decorate)([(0,s.watch)("state.clearButton")],d.prototype,"onChangeClear",null),(0,n.__decorate)([(0,s.watch)("state.className")],d.prototype,"onChangeClassName",null),(0,n.__decorate)([(0,s.watch)(["state.name","state.type","state.label","state.placeholder","state.autocomplete","state.icon"],{immediately:!1}),(0,s.debounce)()],d.prototype,"onChangeState",null),(0,n.__decorate)([(0,s.watch)("state.value")],d.prototype,"onChangeStateValue",null),(0,n.__decorate)([s.autobind],d.prototype,"onChangeValue",null),d=(0,n.__decorate)([s.component],d)},49999:function(t,e,i){"use strict";i.d(e,{UISelect:function(){return c}});var o=i(25045),n=i(31635),s=i(91672),r=i(7909),a=i(65273),l=i(81488);class c extends a.UIInput{className(){return"UISelect"}createContainer(t){let e=super.createContainer(t),{j:i}=this,{nativeInput:o}=this;if(void 0!==t.placeholder){let e=i.create.element("option");e.value="",e.text=i.i18n(t.placeholder),o.add(e)}return t.options?.forEach(t=>{let e=i.create.element("option");e.value=t.value.toString(),e.text=i.i18n(t.text),o.add(e)}),t.size&&t.size>0&&(0,r.attr)(o,"size",t.size),t.multiple&&(0,r.attr)(o,"multiple",""),e}createNativeInput(){return this.j.create.element("select")}updateValidators(){super.updateValidators(),this.state.required&&(this.validators.delete(l.inputValidators.required),this.validators.add(l.selectValidators.required))}constructor(t,e){super(t,e),(0,o._)(this,"state",{...c.defaultState}),Object.assign(this.state,e)}}(0,o._)(c,"defaultState",{...a.UIInput.defaultState,options:[],size:1,multiple:!1}),c=(0,n.__decorate)([s.component],c)},81488:function(t,e,i){"use strict";i.d(e,{inputValidators:function(){return o},selectValidators:function(){return n}});var o=i(48776),n=i(6490)},48776:function(t,e,i){"use strict";i.r(e),i.d(e,{required:function(){return s},url:function(){return r}});var o=i(91764),n=i(4040);let s=function(t){return!!(0,n.trim)(t.value).length||(t.error="Please fill out this field",!1)},r=function(t){return!!(0,o.isURL)((0,n.trim)(t.value))||(t.error="Please enter a web address",!1)}},6490:function(t,e,i){"use strict";i.d(e,{required:function(){return n}});var o=i(4040);let n=function(t){return!!(0,o.trim)(t.value).length||(t.error="Please fill out this field",!1)}},63468:function(t,e,i){"use strict";i.d(e,{UIGroup:function(){return u}});var o=i(25045),n=i(31635),s=i(80251),r=i(84839),a=i(23211),l=i(65946),c=i(96007);class u extends c.UIElement{className(){return"UIGroup"}getRole(){return this.options?.role||"list"}get allChildren(){let t=[],e=[...this.elements];for(;e.length;){let i=e.shift();(0,l.isArray)(i)?e.push(...i):s.Component.isInstanceOf(i,u)?e.push(...i.elements):i&&t.push(i)}return t}update(){this.elements.forEach(t=>t.update()),this.setMod("size",this.buttonSize)}append(t,e){let i;if((0,l.isArray)(t)){if("number"==typeof e)throw Error("You can not use index when append array of elements");return t.forEach(t=>this.append(t,e)),this}if("number"==typeof e?(i=Math.min(Math.max(0,e),this.elements.length),this.elements.splice(i,0,t)):this.elements.push(t),t.name&&t.container.classList.add(this.getFullElName(t.name)),e&&"string"==typeof e){let i=this.getElm(e);if(null==i)throw Error("Element does not exist");i.appendChild(t.container)}else this.appendChildToContainer(t.container,i);return t.parentElement=this,this}afterSetMod(t,e){this.syncMod&&this.elements.forEach(i=>i.setMod(t,e))}appendChildToContainer(t,e){void 0===e||e<0||e>this.elements.length-1||null==this.container.children[e]?this.container.appendChild(t):this.container.insertBefore(t,this.container.children[e])}remove(t){let e=this.elements.indexOf(t);return -1!==e&&(this.elements.splice(e,1),a.Dom.safeRemove(t.container),t.parentElement=null),this}clear(){return this.elements.forEach(t=>t.destruct()),this.elements.length=0,this}setParentView(t){return this.elements?.forEach(e=>e.setParentView(t)),super.setParentView(t)}destruct(){return this.clear(),super.destruct()}constructor(t,e,i){super(t,i),(0,o._)(this,"options",void 0),(0,o._)(this,"syncMod",void 0),(0,o._)(this,"elements",void 0),(0,o._)(this,"buttonSize",void 0),this.options=i,this.syncMod=!1,this.elements=[],this.buttonSize="middle",e?.forEach(t=>t&&this.append(t)),i?.name&&(this.name=i.name)}}(0,n.__decorate)([(0,r.watch)("buttonSize")],u.prototype,"update",null),u=(0,n.__decorate)([r.component],u)},64847:function(t,e,i){"use strict";i.d(e,{UIGroup:function(){return o.UIGroup},UIList:function(){return n.UIList},UISeparator:function(){return s.UISeparator},UISpacer:function(){return r.UISpacer}});var o=i(63468),n=i(97959),s=i(35676),r=i(27987)},97959:function(t,e,i){"use strict";i.d(e,{UIList:function(){return _}});var o=i(25045),n=i(31635),s=i(80251),r=i(91672),a=i(29200),l=i(68616),c=i(32328),u=i(53681),h=i(63468),d=i(35676),p=i(27987),f=i(2496),m=i(15982),g=i(40253);class _ extends h.UIGroup{className(){return"UIList"}getRole(){return"list"}__onChangeMode(){this.setMod("mode",this.mode)}makeGroup(t){return new h.UIGroup(this.jodit,[],t?{role:t}:void 0)}get buttons(){return this.allChildren.filter(t=>s.Component.isInstanceOf(t,u.UIButton))}getButtonsNames(){return this.buttons.map(t=>t instanceof u.UIButton&&t.state.name||"").filter(t=>""!==t)}setRemoveButtons(t){return this.removeButtons=t||[],this}build(t,e=null){let i;t=(0,c.splitArray)(t),this.clear();let o=!1,n=this.makeGroup("group");this.append(n),n.setMod("line",!0);let s=t=>{let s=null;switch(t.name){case`
|
|
20
|
-
`:(n=this.makeGroup("group")).setMod("line",!0),i=this.makeGroup(),n.append(i),this.append(n);break;case"|":o||(o=!0,s=new d.UISeparator(this.j));break;case"---":{i.setMod("before-spacer",!0);let t=new p.UISpacer(this.j);n.append(t),i=this.makeGroup(),n.append(i),o=!1;break}default:o=!1,s="select"===t.component?this.makeSelect(t,e):this.makeButton(t,e)}s&&(i||(i=this.makeGroup(),n.append(i)),i.append(s))},r=t=>!this.removeButtons.includes(t.name)&&(!t.isVisible||t.isVisible?.(this.j,t));return t.forEach(t=>{if((0,f.isButtonGroup)(t)){let e=t.buttons.filter(t=>t);e.length&&((i=this.makeGroup()).setMod("separated",!0).setMod("group",t.group),n.append(i),(0,g.getStrongControlTypes)(e,this.j.o.controls).filter(r).forEach(s))}else{i||(i=this.makeGroup(),n.append(i));let e=(0,m.getControlType)(t,this.j.o.controls);r(e)&&s(e)}}),this.update(),this}makeSelect(t,e){throw Error("Not implemented behaviour")}makeButton(t,e){return new u.UIButton(this.j,{name:t.name})}constructor(...t){super(...t),(0,o._)(this,"mode","horizontal"),(0,o._)(this,"removeButtons",[])}}(0,n.__decorate)([(0,l.watch)("mode"),(0,a.hook)("ready")],_.prototype,"__onChangeMode",null),_=(0,n.__decorate)([r.component],_)},35676:function(t,e,i){"use strict";i.d(e,{UISeparator:function(){return r}});var o=i(31635),n=i(91672),s=i(96007);class r extends s.UIElement{className(){return"UISeparator"}}r=(0,o.__decorate)([n.component],r)},27987:function(t,e,i){"use strict";i.d(e,{UISpacer:function(){return r}});var o=i(31635),n=i(91672),s=i(96007);class r extends s.UIElement{className(){return"UISpacer"}}r=(0,o.__decorate)([n.component],r)},2496:function(t,e,i){"use strict";i.d(e,{flatButtonsSet:function(){return s},isButtonGroup:function(){return n}});var o=i(17312);let n=t=>(0,o.isArray)(t.buttons);function s(t,e){let i=e.getRegisteredButtonGroups();return new Set(t.reduce((t,e)=>(n(e)?t=t.concat([...e.buttons,...i[e.group]??[]]):t.push(e),t),[]))}},15982:function(t,e,i){"use strict";i.d(e,{findControlType:function(){return r},getControlType:function(){return s}});var o=i(65946),n=i(5266);function s(t,e){let i;return e||(e=n.Config.defaultOptions.controls),(0,o.isString)(t)?i=r(t,e)||{name:t,command:t,tooltip:t}:void 0!==e[(i={name:"empty",...(0,o.ConfigFlatten)(t)}).name]&&(i={...(0,o.ConfigFlatten)(e[i.name]),...(0,o.ConfigFlatten)(i)}),i}function r(t,e){let[i,n]=t.split(/\./),s=e;return null!=n?void 0!==e[i]&&(s=e[i]):n=i,s[n]?{name:n,...(0,o.ConfigFlatten)(s[n])}:void 0}},40253:function(t,e,i){"use strict";i.d(e,{getStrongControlTypes:function(){return a}});var o=i(17312),n=i(93640),s=i(5266),r=i(15982);function a(t,e){return((0,o.isArray)(t)?t:(0,n.keys)(t,!1).map(e=>{let i=t[e]||{};return(0,n.ConfigProto)({name:e},i)})).map(t=>(0,r.getControlType)(t,e||s.Config.defaultOptions.controls))}},29434:function(t,e,i){"use strict";i.d(e,{Icon:function(){return a}});var o=i(25045),n=i(81937),s=i(65946),r=i(80991);class a{static getIcon(t){if(/<svg/i.test(t))return t;let e=a.icons[t]||a.icons[t.replace(/-/g,"_")]||a.icons[t.replace(/_/g,"-")]||a.icons[(0,s.camelCase)(t)]||a.icons[(0,s.kebabCase)(t)]||a.icons[t.toLowerCase()];return n.IS_PROD,e}static exists(t){return void 0!==this.getIcon(t)}static get(t,e="<span></span>"){return this.getIcon(t)||e}static set(t,e){return this.icons[t.replace("_","-")]=e,this}static makeIcon(t,e){let i,o;if(!e)return;let{name:n,iconURL:s,fill:l}=e,
|
|
20
|
+
`:(n=this.makeGroup("group")).setMod("line",!0),i=this.makeGroup(),n.append(i),this.append(n);break;case"|":o||(o=!0,s=new d.UISeparator(this.j));break;case"---":{i.setMod("before-spacer",!0);let t=new p.UISpacer(this.j);n.append(t),i=this.makeGroup(),n.append(i),o=!1;break}default:o=!1,s="select"===t.component?this.makeSelect(t,e):this.makeButton(t,e)}s&&(i||(i=this.makeGroup(),n.append(i)),i.append(s))},r=t=>!this.removeButtons.includes(t.name)&&(!t.isVisible||t.isVisible?.(this.j,t));return t.forEach(t=>{if((0,f.isButtonGroup)(t)){let e=t.buttons.filter(t=>t);e.length&&((i=this.makeGroup()).setMod("separated",!0).setMod("group",t.group),n.append(i),(0,g.getStrongControlTypes)(e,this.j.o.controls).filter(r).forEach(s))}else{i||(i=this.makeGroup(),n.append(i));let e=(0,m.getControlType)(t,this.j.o.controls);r(e)&&s(e)}}),this.update(),this}makeSelect(t,e){throw Error("Not implemented behaviour")}makeButton(t,e){return new u.UIButton(this.j,{name:t.name})}constructor(...t){super(...t),(0,o._)(this,"mode","horizontal"),(0,o._)(this,"removeButtons",[])}}(0,n.__decorate)([(0,l.watch)("mode"),(0,a.hook)("ready")],_.prototype,"__onChangeMode",null),_=(0,n.__decorate)([r.component],_)},35676:function(t,e,i){"use strict";i.d(e,{UISeparator:function(){return r}});var o=i(31635),n=i(91672),s=i(96007);class r extends s.UIElement{className(){return"UISeparator"}}r=(0,o.__decorate)([n.component],r)},27987:function(t,e,i){"use strict";i.d(e,{UISpacer:function(){return r}});var o=i(31635),n=i(91672),s=i(96007);class r extends s.UIElement{className(){return"UISpacer"}}r=(0,o.__decorate)([n.component],r)},2496:function(t,e,i){"use strict";i.d(e,{flatButtonsSet:function(){return s},isButtonGroup:function(){return n}});var o=i(17312);let n=t=>(0,o.isArray)(t.buttons);function s(t,e){let i=e.getRegisteredButtonGroups();return new Set(t.reduce((t,e)=>(n(e)?t=t.concat([...e.buttons,...i[e.group]??[]]):t.push(e),t),[]))}},15982:function(t,e,i){"use strict";i.d(e,{findControlType:function(){return r},getControlType:function(){return s}});var o=i(65946),n=i(5266);function s(t,e){let i;return e||(e=n.Config.defaultOptions.controls),(0,o.isString)(t)?i=r(t,e)||{name:t,command:t,tooltip:t}:void 0!==e[(i={name:"empty",...(0,o.ConfigFlatten)(t)}).name]&&(i={...(0,o.ConfigFlatten)(e[i.name]),...(0,o.ConfigFlatten)(i)}),i}function r(t,e){let[i,n]=t.split(/\./),s=e;return null!=n?void 0!==e[i]&&(s=e[i]):n=i,s[n]?{name:n,...(0,o.ConfigFlatten)(s[n])}:void 0}},40253:function(t,e,i){"use strict";i.d(e,{getStrongControlTypes:function(){return a}});var o=i(17312),n=i(93640),s=i(5266),r=i(15982);function a(t,e){return((0,o.isArray)(t)?t:(0,n.keys)(t,!1).map(e=>{let i=t[e]||{};return(0,n.ConfigProto)({name:e},i)})).map(t=>(0,r.getControlType)(t,e||s.Config.defaultOptions.controls))}},29434:function(t,e,i){"use strict";i.d(e,{Icon:function(){return a}});var o=i(25045),n=i(81937),s=i(65946),r=i(80991);class a{static getIcon(t){if(/<svg/i.test(t))return t;let e=a.icons[t]||a.icons[t.replace(/-/g,"_")]||a.icons[t.replace(/_/g,"-")]||a.icons[(0,s.camelCase)(t)]||a.icons[(0,s.kebabCase)(t)]||a.icons[t.toLowerCase()];return n.IS_PROD,e}static exists(t){return void 0!==this.getIcon(t)}static get(t,e="<span></span>"){return this.getIcon(t)||e}static set(t,e){return this.icons[t.replace("_","-")]=e,this}static makeIcon(t,e){let i,o;if(!e)return;let{name:n,iconURL:s,fill:l,scale:c}=e,u=n.replace(/[^a-zA-Z0-9]/g,"_");/<svg/.test(n)||(o=t.o.getIcon?.(n,u));let h=`${n}${s}${l}${c??""}${o??""}`;if(t.o.cache&&this.__cache.has(h))return this.__cache.get(h)?.cloneNode(!0);if(s)i=t.c.span(),(0,r.css)(i,"backgroundImage","url("+s.replace("{basePath}",t?.basePath||"")+")");else{let e=o||a.get(n,"")||t.o.extraIcons?.[n];e&&(i=t.c.fromHTML(e.trim()),/^<svg/i.test(n)||i.classList.add("jodit-icon_"+u))}return i&&(i.classList.add("jodit-icon"),i.style.fill=l,null!=c&&(i.style.transform=`scale(${c})`),t.o.cache&&this.__cache.set(h,i.cloneNode(!0))),i}}(0,o._)(a,"icons",{}),(0,o._)(a,"__cache",new Map)},4099:function(t,e,i){"use strict";i.d(e,{Button:function(){return o.Button},Icon:function(){return a.Icon},Popup:function(){return l.Popup},ProgressBar:function(){return c.ProgressBar},UIBlock:function(){return s.UIBlock},UIButton:function(){return o.UIButton},UIButtonGroup:function(){return o.UIButtonGroup},UIButtonState:function(){return o.UIButtonState},UICheckbox:function(){return s.UICheckbox},UIElement:function(){return n.UIElement},UIFileInput:function(){return s.UIFileInput},UIForm:function(){return s.UIForm},UIGroup:function(){return r.UIGroup},UIInput:function(){return s.UIInput},UIList:function(){return r.UIList},UISelect:function(){return s.UISelect},UISeparator:function(){return r.UISeparator},UISpacer:function(){return r.UISpacer},UITextArea:function(){return s.UITextArea},UITooltip:function(){return o.UITooltip}});var o=i(59400),n=i(96007),s=i(5658),r=i(64847),a=i(29434),l=i(56490),c=i(34396)},56490:function(t,e,i){"use strict";i.d(e,{Popup:function(){return o.Popup}});var o=i(51116)},51116:function(t,e,i){"use strict";i.d(e,{Popup:function(){return f}});var o=i(25045),n=i(31635),s=i(80251),r=i(84839),a=i(23211),l=i(28077),c=i(65946),u=i(28712),h=i(96007),d=i(63468);let p=["escape","cut","delete","backSpaceAfterDelete","beforeCommandDelete"];class f extends d.UIGroup{className(){return"Popup"}appendChildToContainer(t){let e=this.getElm("content");(0,u.assert)(e,"Content element should exist"),e.appendChild(t)}updateParentElement(t){return t!==this&&s.Component.isInstanceOf(t,f)&&(this.__childrenPopups.forEach(e=>{!t.closest(e)&&e.isOpened&&e.close()}),this.__childrenPopups.has(t)||this.j.e.on(t,"beforeClose",()=>{this.__childrenPopups.delete(t)}),this.__childrenPopups.add(t)),super.updateParentElement(t)}setContent(t){if(this.allChildren.length)throw Error("Remove children");if(s.Component.isInstanceOf(t,h.UIElement))this.append(t);else{let e=(0,c.isString)(t)?this.j.c.fromHTML(t):t;this.appendChildToContainer(e)}return this.updatePosition(),this}open(t,e=!1,i){if((0,c.markOwner)(this.jodit,this.container),this.container.classList.add("jodit_theme_"+this.jodit.o.theme),this.__calculateZIndex(),this.isOpened=!0,this.__addGlobalListeners(),this.__targetBound=e?this.getKeepBound(t):t,i)i.appendChild(this.container);else{let t=(0,l.getContainer)(this.jodit,f);i!==this.container.parentElement&&t.appendChild(this.container)}return this.updatePosition(),this.j.e.fire(this,"afterOpen"),this.j.e.fire("afterOpenPopup",this),this}__calculateZIndex(){if(this.container.style.zIndex)return;let t=t=>{let e=t.container.style.zIndex||t.o.zIndex;return!!e&&(this.setZIndex(1+parseInt(e.toString(),10)),!0)},{j:e}=this;if(t(e))return;let i=this.parentElement;for(;i;){if(t(i.j))return;if(i.container.style.zIndex)return void this.setZIndex(1+parseInt(i.container.style.zIndex.toString(),10));if(!i.parentElement&&i.container.parentElement){let t=h.UIElement.closestElement(i.container.parentElement,h.UIElement);if(t){i=t;continue}}i=i.parentElement}}getKeepBound(t){let e=t(),i=this.od.elementFromPoint(e.left,e.top);if(!i)return t;let o=a.Dom.isHTMLElement(i)?i:i.parentElement,n=(0,c.position)(o,this.j);return()=>{let e=t(),i=(0,c.position)(o,this.j);return{...e,top:e.top+(i.top-n.top),left:e.left+(i.left-n.left)}}}updatePosition(){if(!this.isOpened)return this;let[t,e]=this.__calculatePosition(this.__targetBound(),this.viewBound(),(0,c.position)(this.container,this.j));return this.setMod("strategy",e),(0,c.css)(this.container,{left:t.left,top:t.top}),this.__childrenPopups.forEach(t=>t.updatePosition()),this}__throttleUpdatePosition(){this.updatePosition()}__calculatePosition(t,e,i,o=this.strategy){let n={left:t.left,right:t.left-(i.width-t.width)},s={bottom:t.top+t.height,top:t.top-i.height},r=Object.keys(n).reduce((t,e)=>t.concat(Object.keys(s).map(t=>`${e}${(0,c.ucfirst)(t)}`)),[]),a=t=>{let[e,o]=(0,c.kebabCase)(t).split("-");return{left:n[e],top:s[o],width:i.width,height:i.height}},l=t=>f.boxInView(a(o),t)?o:r.find(e=>{if(f.boxInView(a(e),t))return e})||null,u=l((0,c.position)(this.j.container,this.j));return u&&f.boxInView(a(u),e)||(u=l(e)||u||o),[a(u),u]}static boxInView(t,e){return t.top-e.top>=-2&&t.left-e.left>=-2&&e.top+e.height-(t.top+t.height)>=-2&&e.left+e.width-(t.left+t.width)>=-2}close(){return this.isOpened&&(this.isOpened=!1,this.__childrenPopups.forEach(t=>t.close()),this.j.e.fire(this,"beforeClose"),this.j.e.fire("beforePopupClose",this),this.__removeGlobalListeners(),a.Dom.safeRemove(this.container)),this}__closeOnOutsideClick(t){!this.isOpened||this.isOwnClick(t)||this.close()}isOwnClick(t){if(!t.target)return!1;let e=h.UIElement.closestElement(t.target,f);return!!(e&&(this===e||e.closest(this)))}__addGlobalListeners(){let t=this.__throttleUpdatePosition,e=this.ow;l.eventEmitter.on("closeAllPopups",this.close),this.smart&&this.j.e.on(p,this.close).on("mousedown touchstart",this.__closeOnOutsideClick).on(e,"mousedown touchstart",this.__closeOnOutsideClick),this.j.e.on("closeAllPopups",this.close).on("resize",t).on(this.container,"scroll mousewheel",t).on(e,"scroll",t).on(e,"resize",t),a.Dom.up(this.j.container,e=>{e&&this.j.e.on(e,"scroll mousewheel",t)})}__removeGlobalListeners(){let t=this.__throttleUpdatePosition,e=this.ow;l.eventEmitter.off("closeAllPopups",this.close),this.smart&&this.j.e.off(p,this.close).off("mousedown touchstart",this.__closeOnOutsideClick).off(e,"mousedown touchstart",this.__closeOnOutsideClick),this.j.e.off("closeAllPopups",this.close).off("resize",t).off(this.container,"scroll mousewheel",t).off(e,"scroll",t).off(e,"resize",t),this.j.container.isConnected&&a.Dom.up(this.j.container,e=>{e&&this.j.e.off(e,"scroll mousewheel",t)})}setZIndex(t){this.container.style.zIndex=t.toString()}render(){return`<div>
|
|
21
21
|
<div class="&__content"></div>
|
|
22
22
|
</div>`}destruct(){return this.close(),super.destruct()}constructor(t,e=!0){super(t),(0,o._)(this,"smart",void 0),(0,o._)(this,"isOpened",void 0),(0,o._)(this,"strategy",void 0),(0,o._)(this,"viewBound",void 0),(0,o._)(this,"__targetBound",void 0),(0,o._)(this,"__childrenPopups",void 0),this.smart=e,this.isOpened=!1,this.strategy="leftBottom",this.viewBound=()=>({left:0,top:0,width:this.ow.innerWidth,height:this.ow.innerHeight}),this.__childrenPopups=new Set,(0,c.attr)(this.container,"role","popup")}}(0,n.__decorate)([r.autobind],f.prototype,"updatePosition",null),(0,n.__decorate)([(0,r.throttle)(10),r.autobind],f.prototype,"__throttleUpdatePosition",null),(0,n.__decorate)([r.autobind],f.prototype,"close",null),(0,n.__decorate)([r.autobind],f.prototype,"__closeOnOutsideClick",null)},34396:function(t,e,i){"use strict";i.d(e,{ProgressBar:function(){return s}});var o=i(23211),n=i(96007);class s extends n.UIElement{className(){return"ProgressBar"}render(){return"<div><div></div></div>"}show(){return(this.j.workplace||this.j.container).appendChild(this.container),this}hide(){return o.Dom.safeRemove(this.container),this}progress(t){return this.container.style.width=t.toFixed(2)+"%",this}destruct(){return this.hide(),super.destruct()}}},2222:function(t,e,i){"use strict";i.d(e,{ViewWithToolbar:function(){return g}});var o=i(25045),n=i(31635),s=i(69364),r=i(49574),a=i(68616),l=i(23211),c=i(45664),u=i(85932),h=i(28723),d=i(4099),p=i(2496),f=i(35099),m=i(4274);class g extends f.View{get toolbarContainer(){return!this.o.fullsize&&((0,u.isString)(this.o.toolbar)||l.Dom.isHTMLElement(this.o.toolbar))?(0,h.resolveElement)(this.o.toolbar,this.o.shadowRoot||this.od):(this.o.toolbar&&l.Dom.appendChildFirst(this.container,this.__defaultToolbarContainer),this.__defaultToolbarContainer)}setPanel(t){this.o.toolbar=t,this.buildToolbar()}buildToolbar(){if(!this.o.toolbar)return;let t=this.o.buttons?(0,c.splitArray)(this.o.buttons):[];this.toolbar?.setRemoveButtons(this.o.removeButtons).build(t.concat(this.o.extraButtons||[])).appendTo(this.toolbarContainer)}getRegisteredButtonGroups(){return this.groupToButtons}registerButton(t){this.registeredButtons.add(t);let e=t.group??"other";return this.groupToButtons[e]||(this.groupToButtons[e]=[]),null!=t.position?this.groupToButtons[e][t.position]=t.name:this.groupToButtons[e].push(t.name),this}unregisterButton(t){this.registeredButtons.delete(t);let e=t.group??"other",i=this.groupToButtons[e];if(i){let o=i.indexOf(t.name);-1!==o&&i.splice(o,1),0===i.length&&delete this.groupToButtons[e]}return this}beforeToolbarBuild(t){if(Object.keys(this.groupToButtons).length)return t.map(t=>(0,p.isButtonGroup)(t)&&t.group&&this.groupToButtons[t.group]?{group:t.group,buttons:[...t.buttons,...this.groupToButtons[t.group]]}:t)}destruct(){this.isDestructed||(this.setStatus(s.STATUSES.beforeDestruct),this.e.off("beforeToolbarBuild",this.beforeToolbarBuild),this.__tooltip.destruct(),this.toolbar.destruct(),this.toolbar=void 0,super.destruct())}constructor(t,e=!1){super(t,e),(0,o._)(this,"toolbar",(0,m.makeCollection)(this)),(0,o._)(this,"__defaultToolbarContainer",this.c.div("jodit-toolbar__box")),(0,o._)(this,"registeredButtons",new Set),(0,o._)(this,"groupToButtons",{}),(0,o._)(this,"isJodit",!1),(0,o._)(this,"__tooltip",new d.UITooltip(this)),this.isJodit=e,this.e.on("beforeToolbarBuild",this.beforeToolbarBuild)}}(0,n.__decorate)([(0,a.watch)(":rebuildToolbar")],g.prototype,"buildToolbar",null),(0,n.__decorate)([r.autobind],g.prototype,"beforeToolbarBuild",null)},35099:function(t,e,i){"use strict";i.d(e,{View:function(){return C}});var o=i(25045),n=i(31635),s=i(16964),r=i(80251),a=i(69364),l=i(81937),c=i(76517),u=i(51676),h=i(24968),d=i(29200),p=i(27795),f=i(1496),m=i(28077),g=i(65946),_=i(8006),v=i(24475),b=i(23183),y=i(81987),w=i(34396),S=i(10081);class C extends r.Component{get basePath(){return this.o.basePath?this.o.basePath:l.BASE_PATH}get minified(){return void 0!==this.o.minified?this.o.minified:l.BASE_PATH_IS_MIN}get defaultTimeout(){return(0,g.isVoid)(this.o.defaultTimeout)?100:this.o.defaultTimeout}get buffer(){return v.Storage.makeStorage()}get message(){return this.getMessageModule(this.container)}getMessageModule(t){return new S.UIMessages(this,t)}get storage(){return v.Storage.makeStorage(!0,this.id)}get asyncStorage(){return _.AsyncStorage.makeStorage(!0,this.id)}get c(){return this.create}get container(){return this.__container}set container(t){this.__container=t}get e(){return this.events}get progressbar(){return new w.ProgressBar(this)}get options(){return this.__options}set options(t){this.__options=t}get o(){return this.options}i18n(t,...e){return(0,g.i18n)(t,e,this.options)}toggleFullSize(t){void 0===t&&(t=!this.__isFullSize),t!==this.__isFullSize&&(this.__isFullSize=t,this.e.fire("toggleFullSize",t))}get isLocked(){return""!==this.__whoLocked}lock(t="any"){return!this.isLocked&&(this.__whoLocked=t,!0)}unlock(){return!!this.isLocked&&(this.__whoLocked="",!0)}get isFullSize(){return this.__isFullSize}getVersion(){return C.version}static getVersion(){return C.version}initOptions(t){this.options=(0,g.ConfigProto)(t||{},(0,g.ConfigProto)(this.options||{},C.defaultOptions))}initOwners(){this.ownerWindow=this.o.ownerWindow??window}attachEvents(t){if(!t)return;let e=t?.events;e&&Object.keys(e).forEach(t=>this.e.on(t,e[t]))}getInstance(t,e){let i=(0,g.isFunction)(t)?t.prototype.className():t,o=this.e.fire((0,g.camelCase)("getInstance_"+i),e);if(o)return o;let n=(0,g.isFunction)(t)?t:m.modules[i],r=this.__modulesInstances;if(!(0,g.isFunction)(n))throw(0,g.error)("Need real module name");if(!r.has(i)){let t=n.prototype instanceof s.ViewComponent?new n(this,e):new n(e);this.components.add(t),r.set(i,t)}return r.get(i)}addDisclaimer(t){this.container.appendChild(t)}beforeDestruct(){this.e.fire(a.STATUSES.beforeDestruct,this),this.components.forEach(t=>{(0,g.isDestructable)(t)&&!t.isInDestruct&&t.destruct()}),this.components.clear()}destruct(){this.isDestructed||((0,u.cached)(this,"progressbar")?.destruct(),(0,u.cached)(this,"message")?.destruct(),(0,u.cached)(this,"asyncStorage")?.close(),this.events&&(this.events.destruct(),this.events=void 0),(0,u.cached)(this,"buffer")?.clear(),p.Dom.safeRemove(this.container),super.destruct())}constructor(t,e=!1){super(),(0,o._)(this,"isJodit",void 0),(0,o._)(this,"isView",void 0),(0,o._)(this,"parent",void 0),(0,o._)(this,"mods",void 0),(0,o._)(this,"id",void 0),(0,o._)(this,"components",void 0),(0,o._)(this,"events",void 0),(0,o._)(this,"create",void 0),(0,o._)(this,"__container",void 0),(0,o._)(this,"OPTIONS",void 0),(0,o._)(this,"__options",void 0),(0,o._)(this,"__isFullSize",void 0),(0,o._)(this,"__whoLocked",void 0),(0,o._)(this,"isLockedNotBy",void 0),(0,o._)(this,"__modulesInstances",void 0),this.isJodit=e,this.isView=!0,this.parent=null,this.mods={},this.components=new Set,this.OPTIONS=C.defaultOptions,this.__isFullSize=!1,this.__whoLocked="",this.isLockedNotBy=t=>this.isLocked&&this.__whoLocked!==t,this.__modulesInstances=new Map,this.id=new Date().getTime().toString(),this.initOptions(t),this.initOwners(),this.events=t?.eventEmmiter??new f.EventEmitter(this.od),this.create=new c.Create(this.od),this.__container=this.c.div("jodit "+this.componentName)}}(0,o._)(C,"ES",l.ES),(0,o._)(C,"version",l.APP_VERSION),(0,o._)(C,"esNext",l.IS_ES_NEXT),(0,o._)(C,"esModern",l.IS_ES_MODERN),(0,o._)(C,"defaultOptions",void 0),(0,n.__decorate)([u.cache],C.prototype,"buffer",null),(0,n.__decorate)([u.cache],C.prototype,"message",null),(0,n.__decorate)([u.cache],C.prototype,"storage",null),(0,n.__decorate)([u.cache],C.prototype,"asyncStorage",null),(0,n.__decorate)([u.cache],C.prototype,"c",null),(0,n.__decorate)([u.cache],C.prototype,"e",null),(0,n.__decorate)([u.cache],C.prototype,"progressbar",null),(0,n.__decorate)([(0,d.hook)(a.STATUSES.beforeDestruct)],C.prototype,"beforeDestruct",null),(C=(0,n.__decorate)([(0,h.derive)(y.Mods,b.Elms)],C)).defaultOptions={extraButtons:[],cache:!0,textIcons:!1,namespace:"",removeButtons:[],zIndex:100002,defaultTimeout:100,fullsize:!1,showTooltip:!0,useNativeTooltip:!1,buttons:[],globalFullSize:!0,language:"auto"}},73302:function(t,e,i){"use strict";i.d(e,{Jodit:function(){return Jodit}});var o=i(25045),n=i(31635),s=i(81937),r=i(84839),a=i(28077),l=i(65946),c=i(73714),u=i(80512),h=i(5266),d=i(60936);let p="data-jodit-default-style-display",f="data-jodit-default-classes",m={contenteditable:!1};class Jodit extends d.ViewWithToolbar{className(){return"Jodit"}waitForReady(){return this.isReady?Promise.resolve(this):this.async.promise(t=>{this.hookStatus("ready",()=>t(this))})}static get ready(){return new Promise(t=>{a.eventEmitter.on("joditready",t)})}get text(){if(this.editor)return this.editor.innerText||"";let t=this.createInside.div();return t.innerHTML=this.getElementValue(),t.innerText||""}get defaultTimeout(){return(0,l.isNumber)(this.o.defaultTimeout)?this.o.defaultTimeout:h.Config.defaultOptions.defaultTimeout}static atom(t){return(0,l.markAsAtomic)(t)}static make(t,e){return new this(t,e)}static isJoditAssigned(t){return t&&(0,l.isJoditObject)(t.component)&&!t.component.isInDestruct}static get defaultOptions(){return h.Config.defaultOptions}get createInside(){return new d.Create(()=>this.ed,this.o.createAttributes)}__setPlaceField(t,e){this.currentPlace||(this.currentPlace={},this.places=[this.currentPlace]),this.currentPlace[t]=e}get element(){return this.currentPlace.element}get editor(){return this.currentPlace.editor}set editor(t){this.__setPlaceField("editor",t)}get container(){return this.currentPlace.container}set container(t){this.__setPlaceField("container",t)}get workplace(){return this.currentPlace.workplace}get message(){return this.getMessageModule(this.workplace)}get statusbar(){return this.currentPlace.statusbar}get iframe(){return this.currentPlace.iframe}set iframe(t){this.__setPlaceField("iframe",t)}get history(){return this.currentPlace.history}get editorWindow(){return this.currentPlace.editorWindow}set editorWindow(t){this.__setPlaceField("editorWindow",t)}get ew(){return this.editorWindow}get editorDocument(){return this.currentPlace.editorWindow.document}get ed(){return this.editorDocument}get options(){return this.currentPlace.options}set options(t){this.__options=t,this.__setPlaceField("options",t)}get s(){return this.selection}get uploader(){return this.getInstance("Uploader",this.o.uploader)}get filebrowser(){let t=this,e=(0,l.ConfigProto)({defaultTimeout:t.defaultTimeout,uploader:t.o.uploader,language:t.o.language,license:t.o.license,theme:t.o.theme,shadowRoot:t.o.shadowRoot,defaultCallback(e){e.files&&e.files.length&&e.files.forEach((i,o)=>{let n=e.baseurl+i;e.isImages&&e.isImages[o]?t.s.insertImage(n,null,t.o.imageDefaultWidth):t.s.insertNode(t.createInside.fromHTML(`<a href='${n}' title='${n}'>${n}</a>`))})}},this.o.filebrowser);return t.getInstance("FileBrowser",e)}get mode(){return this.__mode}set mode(t){this.setMode(t)}getNativeEditorValue(){let t=this.e.fire("beforeGetNativeEditorValue");return(0,l.isString)(t)?t:this.editor?this.editor.innerHTML:this.getElementValue()}setNativeEditorValue(t){let e={value:t};!this.e.fire("beforeSetNativeEditorValue",e)&&this.editor&&(this.editor.innerHTML=e.value)}get value(){return this.getEditorValue()}set value(t){this.setEditorValue(t),this.history.__processChanges()}synchronizeValues(){this.__imdSynchronizeValues()}__imdSynchronizeValues(){this.setEditorValue()}getEditorValue(t=!0,e){let i;if(void 0!==(i=this.e.fire("beforeGetValueFromEditor",e)))return i;i=this.getNativeEditorValue().replace(s.INVISIBLE_SPACE_REG_EXP(),""),t&&(i=i.replace(/<span[^>]+id="jodit-selection_marker_[^>]+><\/span>/g,"")),"<br>"===i&&(i="");let o={value:i};return this.e.fire("afterGetValueFromEditor",o,e),o.value}setEditorValue(t){let e=this.e.fire("beforeSetValueToEditor",t);if(!1===e)return;if((0,l.isString)(e)&&(t=e),!this.editor){void 0!==t&&this.__setElementValue(t);return}if(!(0,l.isString)(t)&&!(0,l.isVoid)(t))throw(0,l.error)("value must be string");(0,l.isVoid)(t)||this.getNativeEditorValue()===t||this.setNativeEditorValue(t),this.e.fire("postProcessSetEditorValue");let i=this.getElementValue(),o=this.getEditorValue();if(!this.__isSilentChange&&i!==o&&this.__callChangeCount<s.SAFE_COUNT_CHANGE_CALL){this.__setElementValue(o),this.__callChangeCount+=1,s.IS_PROD||this.__callChangeCount;try{this.history.__upTick(),this.e.fire("change",o,i),this.e.fire(this.history,"change",o,i)}finally{this.__callChangeCount=0}}}updateElementValue(){this.__setElementValue(this.getEditorValue())}getElementValue(){return void 0!==this.element.value?this.element.value:this.element.innerHTML}__setElementValue(t){if(!(0,l.isString)(t))throw(0,l.error)("value must be string");if(this.element!==this.container&&t!==this.getElementValue()){let e={value:t},i=this.e.fire("beforeSetElementValue",e);(0,l.callPromise)(i,()=>{void 0!==this.element.value?this.element.value=e.value:this.element.innerHTML=e.value,this.e.fire("afterSetElementValue",e)})}}registerCommand(t,e,i){let o=t.toLowerCase(),n=this.commands.get(o);if(void 0===n&&(n=[],this.commands.set(o,n)),n.push(e),!(0,l.isFunction)(e)){let n=this.o.commandToHotkeys[o]||this.o.commandToHotkeys[t]||e.hotkeys;n&&this.registerHotkeyToCommand(n,o,i?.stopPropagation)}return this}registerHotkeyToCommand(t,e,i=!0){let o=(0,l.asArray)(t).map(l.normalizeKeyAliases).map(t=>t+".hotkey").join(" ");this.e.off(o).on(o,(t,o)=>(o&&(o.shouldStop=i??!0),this.execCommand(e)))}execCommand(t,e,i,...o){let n;if(this.s.isFocused()||this.s.focus(),!this.o.readonly||this.o.allowCommandsInReadOnly.includes(t)){if(t=t.toLowerCase(),!1!==(n=this.e.fire("beforeCommand"+(0,l.ucfirst)(t),e,i,...o))&&(n=this.e.fire("beforeCommand",t,e,i,...o)),!1!==n&&(n=this.__execCustomCommands(t,e,i,...o)),!1!==n){this.s.focus();try{n=this.nativeExecCommand(t,e,i)}catch(t){if(!s.IS_PROD)throw t}}return this.e.fire("afterCommand",t,e,i),this.__imdSynchronizeValues(),n}}nativeExecCommand(t,e,i){this.__isSilentChange=!0;try{return this.ed.execCommand(t,e,i)}finally{this.__isSilentChange=!1}}__execCustomCommands(t,e,i,...o){t=t.toLowerCase();let n=this.commands.get(t);if(void 0!==n){let s;return n.forEach(n=>{let r=((0,l.isFunction)(n)?n:n.exec).call(this,t,e,i,...o);void 0!==r&&(s=r)}),s}}lock(t="any"){return!!super.lock(t)&&(this.__selectionLocked=this.s.save(),this.s.clear(),this.container.classList.add("jodit_lock"),this.e.fire("lock",!0),!0)}unlock(){return!!super.unlock()&&(this.container.classList.remove("jodit_lock"),this.__selectionLocked&&this.s.restore(),this.e.fire("lock",!1),!0)}getMode(){return this.mode}isEditorMode(){return this.getRealMode()===s.MODE_WYSIWYG}getRealMode(){if(this.getMode()!==s.MODE_SPLIT)return this.getMode();let t=this.od.activeElement;return t&&(t===this.iframe||d.Dom.isOrContains(this.editor,t)||d.Dom.isOrContains(this.toolbar.container,t))?s.MODE_WYSIWYG:s.MODE_SOURCE}setMode(t){let e=this.getMode(),i={mode:parseInt(t.toString(),10)},o=["jodit-wysiwyg_mode","jodit-source__mode","jodit_split_mode"];!1!==this.e.fire("beforeSetMode",i)&&(this.__mode=[s.MODE_SOURCE,s.MODE_WYSIWYG,s.MODE_SPLIT].includes(i.mode)?i.mode:s.MODE_WYSIWYG,this.o.saveModeInStorage&&this.storage.set("jodit_default_mode",this.mode),o.forEach(t=>{this.container.classList.remove(t)}),this.container.classList.add(o[this.mode-1]),e!==this.getMode()&&this.e.fire("afterSetMode"))}toggleMode(){let t=this.getMode();[s.MODE_SOURCE,s.MODE_WYSIWYG,this.o.useSplitMode?s.MODE_SPLIT:9].includes(t+1)?t+=1:t=s.MODE_WYSIWYG,this.setMode(t)}setDisabled(t){this.o.disabled=t;let e=this.__wasReadOnly;this.setReadOnly(t||e),this.__wasReadOnly=e,this.editor&&(this.editor.setAttribute("aria-disabled",t.toString()),this.container.classList.toggle("jodit_disabled",t),this.e.fire("disabled",t))}getDisabled(){return this.o.disabled}setReadOnly(t){this.__wasReadOnly!==t&&(this.__wasReadOnly=t,this.o.readonly=t,t?this.editor&&this.editor.removeAttribute("contenteditable"):this.editor&&this.editor.setAttribute("contenteditable","true"),this.e&&this.e.fire("readonly",t))}getReadOnly(){return this.o.readonly}focus(){this.getMode()!==s.MODE_SOURCE&&this.s.focus()}get isFocused(){return this.s.isFocused()}beforeInitHook(){}afterInitHook(){}initOptions(t){this.options=(0,l.ConfigProto)(t||{},h.Config.defaultOptions)}initOwners(){this.editorWindow=this.o.ownerWindow,this.ownerWindow=this.o.ownerWindow}addPlace(t,e){let i=(0,l.resolveElement)(t,this.o.shadowRoot||this.od);this.attachEvents(e),i.attributes&&(0,l.toArray)(i.attributes).forEach(t=>{let i=t.name,o=t.value;void 0===h.Config.defaultOptions[i]||e&&void 0!==e[i]||(-1!==["readonly","disabled"].indexOf(i)&&(o=""===o||"true"===o),/^[0-9]+(\.)?([0-9]+)?$/.test(o.toString())&&(o=Number(o)),this.options[i]=o)});let o=this.c.div("jodit-container");o.classList.add("jodit"),o.classList.add("jodit-container"),o.classList.add("jodit_theme_"+(this.o.theme||"default")),g(this.o.className,o),this.o.containerStyle&&(0,l.css)(o,this.o.containerStyle);let{styleValues:n}=this.o;Object.keys(n).forEach(t=>{let e=(0,l.kebabCase)(t);o.style.setProperty("--jd-"+e,n[t])}),o.setAttribute("contenteditable","false");let s=null;this.o.inline&&(-1===["TEXTAREA","INPUT"].indexOf(i.nodeName)&&(o=i,i.setAttribute(f,i.className.toString()),s=o.innerHTML,o.innerHTML=""),o.classList.add("jodit_inline"),o.classList.add("jodit-container")),i!==o&&(i.style.display&&i.setAttribute(p,i.style.display),i.style.display="none");let r="workplace-slot",a=this.c.div(this.getFullElName(r,"top"),m);o.appendChild(a);let c=this.c.div(this.getFullElName(r,"center"),m),u=this.c.div("jodit-workplace",m),_=this.c.div(this.getFullElName(r,"left"),m),v=this.c.div(this.getFullElName(r,"right"),m);c.appendChild(_),c.appendChild(u),c.appendChild(v),o.appendChild(c);let b=this.c.div(this.getFullElName(r,"bottom"),m);o.appendChild(b),i.parentNode&&i!==o&&i.parentNode.insertBefore(o,i),Object.defineProperty(i,"component",{enumerable:!1,configurable:!0,value:this});let y=this.c.div("jodit-wysiwyg",{contenteditable:!0,"aria-disabled":!1,tabindex:this.o.tabIndex});u.appendChild(y);let w={editor:y,element:i,container:o,workplace:u,slots:{top:a,bottom:b,center:c,left:_,right:v},statusbar:new d.StatusBar(this,o),options:this.isReady?(0,l.ConfigProto)(e||{},h.Config.defaultOptions):this.options,history:new d.History(this),editorWindow:this.ow};this.__elementToPlace.set(y,w),this.setCurrentPlace(w),this.places.push(w),this.setNativeEditorValue(this.getElementValue());let S=this.__initEditor(s),C=this.options,E=()=>{C.enableDragAndDropFileToEditor&&C.uploader&&(C.uploader.url||C.uploader.insertImageAsBase64URI)&&this.uploader.bind(this.editor),this.__elementToPlace.get(this.editor)||this.__elementToPlace.set(this.editor,w),this.e.fire("afterAddPlace",w)};return(0,l.callPromise)(S,E)}addDisclaimer(t){this.workplace.appendChild(t)}setCurrentPlace(t){this.currentPlace!==t&&(this.isEditorMode()||this.setMode(s.MODE_WYSIWYG),this.currentPlace=t,this.buildToolbar(),this.isReady&&this.e.fire("changePlace",t))}__initEditor(t){let e=this.__createEditor();return(0,l.callPromise)(e,()=>{if(this.isInDestruct)return;if(this.element!==this.container){let t=this.getElementValue();t!==this.getEditorValue()&&this.setEditorValue(t)}else null!=t&&this.setEditorValue(t);let e=this.o.defaultMode;if(this.o.saveModeInStorage){let t=this.storage.get("jodit_default_mode");"string"==typeof t&&(e=parseInt(t,10))}this.setMode(e),this.o.readonly&&(this.__wasReadOnly=!1,this.setReadOnly(!0)),this.o.disabled&&this.setDisabled(!0);try{this.ed.execCommand("defaultParagraphSeparator",!1,this.o.enter.toLowerCase())}catch{}})}__createEditor(){let t=this.editor,e=this.e.fire("createEditor",this);return(0,l.callPromise)(e,()=>{!this.isInDestruct&&((!1===e||(0,l.isPromise)(e))&&d.Dom.safeRemove(t),g(this.o.editorClassName,this.editor),this.o.style&&(0,l.css)(this.editor,this.o.style),this.e.on("synchro",()=>{this.setEditorValue()}).on("focus",()=>{this.editorIsActive=!0}).on("blur",()=>this.editorIsActive=!1),this.__prepareWYSIWYGEditor(),this.o.triggerChangeEvent&&this.e.on("change",this.async.debounce(()=>{this.e&&this.e.fire(this.element,"change")},this.defaultTimeout)))})}__prepareWYSIWYGEditor(){let{editor:t}=this;if(this.o.direction){let t="rtl"===this.o.direction.toLowerCase()?"rtl":"ltr";this.editor.style.direction=t,this.editor.setAttribute("dir",t),this.container.style.direction=t,this.container.setAttribute("dir",t),this.toolbar.setDirection(t)}this.e.on(t,"mousedown touchstart focus",()=>{let e=this.__elementToPlace.get(t);e&&this.setCurrentPlace(e)}).on(t,"compositionend",this.synchronizeValues).on(t,"selectionchange selectionstart keydown keyup input keypress dblclick mousedown mouseup click copy cut dragstart drop dragover paste resize touchstart touchend focus blur",t=>{if(!this.o.readonly&&!this.__isSilentChange&&(!(t instanceof this.ew.KeyboardEvent)||!t.isComposing)&&this.e&&this.e.fire){if(!1===this.e.fire(t.type,t))return!1;this.synchronizeValues()}})}fetch(t,e){let i=new c.Ajax({url:t,...e},this.o.defaultAjaxOptions),o=()=>{this.e.off("beforeDestruct",o),this.progressbar.progress(100).hide(),i.destruct()};this.e.one("beforeDestruct",o),this.progressbar.show().progress(30);let n=i.send();return n.finally(o).catch(()=>null),n}destruct(){if(this.isInDestruct)return;this.setStatus(d.STATUSES.beforeDestruct),this.__elementToPlace.clear(),(0,r.cached)(this,"storage")?.clear(),(0,r.cached)(this,"buffer")?.clear(),this.commands.clear(),this.__selectionLocked=null,this.e.off(this.ow,"resize"),this.e.off(this.ow),this.e.off(this.od),this.e.off(this.od.body);let t=this.editor?this.getEditorValue():"";this.places.forEach(({container:e,workplace:i,statusbar:o,element:n,iframe:s,editor:r,history:a})=>{if(n){if(n!==e)if(n.hasAttribute(p)){let t=(0,l.attr)(n,p);t&&(n.style.display=t,n.removeAttribute(p))}else n.style.display="";else n.hasAttribute(f)&&(n.className=(0,l.attr)(n,f)||"",n.removeAttribute(f));n.hasAttribute("style")&&!(0,l.attr)(n,"style")&&n.removeAttribute("style"),o.destruct(),this.e.off(e),this.e.off(n),this.e.off(r),d.Dom.safeRemove(i),d.Dom.safeRemove(r),e!==n&&d.Dom.safeRemove(e),Object.defineProperty(n,"component",{enumerable:!1,configurable:!0,value:null}),d.Dom.safeRemove(s),e===n&&(n.innerHTML=t),a.destruct()}}),this.places.length=0,this.currentPlace={},delete a.instances[this.id],super.destruct()}constructor(t,e){super(e,!0),(0,o._)(this,"isJodit",!0),(0,o._)(this,"commands",new Map),(0,o._)(this,"__selectionLocked",null),(0,o._)(this,"__wasReadOnly",!1),(0,o._)(this,"editorIsActive",!1),(0,o._)(this,"selection",void 0),(0,o._)(this,"__mode",s.MODE_WYSIWYG),(0,o._)(this,"__callChangeCount",0),(0,o._)(this,"__isSilentChange",!1),(0,o._)(this,"currentPlace",{options:this.__options,container:this.__container}),(0,o._)(this,"places",[]),(0,o._)(this,"__elementToPlace",new Map);try{const e=(0,l.resolveElement)(t,this.options.shadowRoot||this.od);if(Jodit.isJoditAssigned(e))return e.component}catch(t){if(!s.IS_PROD)throw t;throw this.destruct(),t}this.setStatus(d.STATUSES.beforeInit),this.id=(0,l.attr)((0,l.resolveElement)(t,this.o.shadowRoot||this.od),"id")||new Date().getTime().toString(),a.instances[this.id]=this,this.attachEvents(e),this.e.on(this.ow,"resize",()=>{this.e&&this.e.fire("resize")}),this.e.on("prepareWYSIWYGEditor",this.__prepareWYSIWYGEditor),this.selection=new d.Selection(this);const i=this.beforeInitHook();(0,l.callPromise)(i,()=>{if(this.isInDestruct)return;this.e.fire("beforeInit",this),a.pluginSystem.__init(this),this.e.fire("afterPluginSystemInit",this),this.e.on("changePlace",()=>{this.setReadOnly(this.o.readonly),this.setDisabled(this.o.disabled)}),this.places.length=0;let i=this.addPlace(t,e);a.instances[this.id]=this;let o=()=>{this.isInDestruct||(this.e&&this.e.fire("afterInit",this),(0,l.callPromise)(this.afterInitHook()),this.setStatus(d.STATUSES.ready),this.e.fire("afterConstructor",this))};(0,l.callPromise)(i,o)})}}function g(t,e){t&&t.split(/\s+/).forEach(t=>e.classList.add(t))}(0,o._)(Jodit,"fatMode",s.FAT_MODE),(0,o._)(Jodit,"plugins",a.pluginSystem),(0,o._)(Jodit,"modules",a.modules),(0,o._)(Jodit,"ns",a.modules),(0,o._)(Jodit,"decorators",{}),(0,o._)(Jodit,"constants",s),(0,o._)(Jodit,"instances",a.instances),(0,o._)(Jodit,"lang",s.lang),(0,o._)(Jodit,"core",{Plugin:d.Plugin}),(0,n.__decorate)([r.cache],Jodit.prototype,"createInside",null),(0,n.__decorate)([r.cache],Jodit.prototype,"message",null),(0,n.__decorate)([r.cache],Jodit.prototype,"s",null),(0,n.__decorate)([r.cache],Jodit.prototype,"uploader",null),(0,n.__decorate)([r.cache],Jodit.prototype,"filebrowser",null),(0,n.__decorate)([(0,r.throttle)()],Jodit.prototype,"synchronizeValues",null),(0,n.__decorate)([(0,r.watch)(":internalChange")],Jodit.prototype,"updateElementValue",null),(0,n.__decorate)([r.autobind],Jodit.prototype,"__prepareWYSIWYGEditor",null),Jodit=(0,n.__decorate)([(0,r.derive)(u.Dlgs)],Jodit)},89317:function(t,e,i){"use strict";var o=i(17312),n=i(41324),s=i.n(n),r=i(63837),a=i(53414);let l={};l={ar:s(),cs_cz:s(),de:s(),en:r,es:s(),fi:s(),fr:s(),he:s(),hu:s(),id:s(),it:s(),ja:s(),ko:s(),mn:s(),nl:s(),no:s(),pl:s(),pt_br:s(),ru:s(),tr:s(),ua:s(),zh_cn:s(),zh_tw:s()};let c=t=>t?t.default||t:{},u={};(0,o.isArray)(c(a))&&c(a).forEach((t,e)=>{u[e]=t}),Object.keys(l).forEach(t=>{let e=c(l[t]);(0,o.isArray)(e)?(l[t]={},e.forEach((e,i)=>{l[t][u[i]]=e})):l[t]=e}),e.default=l},67399:function(t,e,i){"use strict";i.d(e,{ContextMenu:function(){return l}});var o=i(31635),n=i(91672),s=i(17312),r=i(53681),a=i(51116);class l extends a.Popup{className(){return"ContextMenu"}show(t,e,i){let o=this;o.clear(),(0,s.isArray)(i)&&(i.forEach(t=>{if(!t)return;let e=(0,r.Button)(this.jodit,t.icon||"empty",t.title);this.jodit&&e.setParentView(this.jodit),e.setMod("context","menu"),e.onAction(e=>(t.exec?.call(o,e),o.clear(),o.close(),!1)),this.append(e)}),this.open(()=>({left:t,top:e,width:0,height:0}),!0))}}l=(0,o.__decorate)([n.component],l)},91535:function(t,e,i){"use strict";i.d(e,{Alert:function(){return l}});var o=i(23211),n=i(78982),s=i(91565),r=i(53681),a=i(76841);function l(t,e,i,c="jodit-dialog_alert"){(0,s.isFunction)(e)&&(i=e,e=void 0);let u=this instanceof a.Dialog?this:new a.Dialog({closeOnClickOverlay:!0}),h=u.c.div(c),d=(0,r.Button)(u,"ok","Ok");return(0,n.asArray)(t).forEach(t=>{h.appendChild(o.Dom.isNode(t)?t:u.c.fromHTML(t))}),d.onAction(()=>{i&&(0,s.isFunction)(i)&&!1===i(u)||u.close()}),u.setFooter([d]),u.open(h,e||" ",!0,!0),d.focus(),u}},88329:function(t,e,i){"use strict";i.d(e,{Confirm:function(){return r}});var o=i(91565),n=i(53681),s=i(76841);function r(t,e,i){let r=this instanceof s.Dialog?this:new s.Dialog({closeOnClickOverlay:!0}),a=r.c.fromHTML('<form class="jodit-dialog_prompt"></form>'),l=r.c.element("label");(0,o.isFunction)(e)&&(i=e,e=void 0),l.appendChild(r.c.fromHTML(t)),a.appendChild(l);let c=t=>()=>{i&&!1===i(t)||r.close()},u=(0,n.Button)(r,"cancel","Cancel"),h=(0,n.Button)(r,"ok","Yes");return u.onAction(c(!1)),h.onAction(c(!0)),r.e.on(a,"submit",()=>(c(!0)(),!1)),r.setFooter([h,u]),r.open(a,e||" ",!0,!0),h.focus(),r}},76841:function(t,e,i){"use strict";i.d(e,{Dialog:function(){return v}});var o=i(25045),n=i(31635),s=i(16964),r=i(81937),a=i(84839),l=i(23211),c=i(28077),u=i(45664),h=i(28686),d=i(93640),p=i(28712),f=i(4099),m=i(35099),g=i(2222),_=i(5266);_.Config.prototype.dialog={namespace:"",extraButtons:[],resizable:!0,draggable:!0,buttons:["dialog.close"],removeButtons:[],toolbarButtonSize:"middle",zIndex:"inherit"},_.Config.prototype.controls.dialog={close:{icon:"cancel",exec(t){t.close()}}};class v extends g.ViewWithToolbar{className(){return"Dialog"}get destination(){let{popupRoot:t,shadowRoot:e}=this.o;return t||e||this.od.body}setElements(t,e){let i=[];(0,u.asArray)(e).forEach(e=>{let o;if((0,h.isArray)(e)){let o=this.c.div(this.getFullElName("column"));return i.push(o),t.appendChild(o),this.setElements(o,e)}o=(0,h.isString)(e)?this.c.fromHTML(e):(0,h.hasContainer)(e)?e.container:e,i.push(o),o.parentNode!==t&&t.appendChild(o)}),(0,u.toArray)(t.childNodes).forEach(e=>{-1===i.indexOf(e)&&t.removeChild(e)})}__onMouseUp(){(this.draggable||this.resizable)&&(this.__removeGlobalResizeListeners(),this.draggable=!1,this.resizable=!1,this.unlockSelect(),this.e&&(this.__removeGlobalResizeListeners(),this.e.fire(this,"endResize endMove")))}__onHeaderMouseDown(t){let e=t.target;!(!this.o.draggable||e&&e.nodeName.match(/^(INPUT|SELECT)$/))&&(this.draggable=!0,this.startX=t.clientX,this.startY=t.clientY,this.startPoint.x=(0,d.css)(this.dialog,"left"),this.startPoint.y=(0,d.css)(this.dialog,"top"),this.setMaxZIndex(),t.cancelable&&t.preventDefault(),this.lockSelect(),this.__addGlobalResizeListeners(),this.e&&(this.e.fire(this,"startMove"),this.e.fire("closeAllPopups")))}__onMouseMove(t){this.draggable&&this.o.draggable&&(this.setPosition(this.startPoint.x+t.clientX-this.startX,this.startPoint.y+t.clientY-this.startY),this.e&&this.e.fire(this,"move",t.clientX-this.startX,t.clientY-this.startY),t.stopImmediatePropagation()),this.resizable&&this.o.resizable&&(this.setSize(this.startPoint.w+t.clientX-this.startX,this.startPoint.h+t.clientY-this.startY),this.e&&this.e.fire(this,"resizeDialog",t.clientX-this.startX,t.clientY-this.startY))}__onEsc(t){if(this.o.closeOnEsc&&this.isOpened&&t.key===r.KEY_ESC&&!0!==this.getMod("static")){let e=this.getMaxZIndexDialog();e?e.close():this.close(),t.stopImmediatePropagation()}}__onResizerMouseDown(t){this.resizable=!0,this.startX=t.clientX,this.startY=t.clientY,this.startPoint.w=this.dialog.offsetWidth,this.startPoint.h=this.dialog.offsetHeight,this.lockSelect(),this.__addGlobalResizeListeners(),this.e&&this.e.fire(this,"startResize")}__addGlobalResizeListeners(){this.e.on(this.ow,"pointermove touchmove",this.__onMouseMove).on(this.ow,"pointerup touchend",this.__onMouseUp)}__removeGlobalResizeListeners(){this.e.off(this.ow,"mousemove pointermove",this.__onMouseMove).off(this.ow,"mouseup pointerup",this.__onMouseUp)}setSize(t,e){return null==t&&(t=this.dialog.offsetWidth),null==e&&(e=this.dialog.offsetHeight),(0,d.css)(this.dialog,{width:t,height:e}),this}calcAutoSize(){return this.setSize("auto","auto"),this.setSize(),this}setPosition(t,e){let i=this.ow.innerWidth,o=this.ow.innerHeight,n=i/2-this.dialog.offsetWidth/2,s=o/2-this.dialog.offsetHeight/2;return n<0&&(n=0),s<0&&(s=0),void 0!==t&&void 0!==e&&(this.offsetX=t,this.offsetY=e,this.moved=Math.abs(t-n)>100||Math.abs(e-s)>100),this.dialog.style.left=(t||n)+"px",this.dialog.style.top=(e||s)+"px",this}setHeader(t){return this.setElements(this.dialogbox_header,t),this}setContent(t){return this.setElements(this.dialogbox_content,t),this}setFooter(t){return this.setElements(this.dialogbox_footer,t),this.setMod("footer",!!t),this}getZIndex(){return parseInt((0,d.css)(this.container,"zIndex"),10)||0}getMaxZIndexDialog(){let t=0,e,i,o=this;return(0,d.$$)(".jodit-dialog",this.destination).forEach(n=>{e=n.component,i=parseInt((0,d.css)(n,"zIndex"),10),e.isOpened&&!isNaN(i)&&i>t&&(o=e,t=i)}),o}setMaxZIndex(){if(this.getMod("static"))return;let t=0x1312d04,e=0;(0,d.$$)(".jodit-dialog",this.destination).forEach(i=>{t=Math.max(isNaN(e=parseInt((0,d.css)(i,"zIndex"),10))?0:e,t)}),this.container.style.zIndex=(t+1).toString()}toggleFullSize(t){(0,h.isVoid)(t)&&(t=!this.getMod("fullsize")),this.setMod("fullsize",t),super.toggleFullSize(t)}open(t,e,i,o){if(c.eventEmitter.fire("closeAllPopups hideHelpers"),!1===this.e.fire(this,"beforeOpen"))return this;(0,h.isBoolean)(t)&&(i=t),(0,h.isBoolean)(e)&&(o=e),this.destroyAfterClose=!0===i;let n=(0,h.isBoolean)(t)?void 0:t,s=(0,h.isBoolean)(e)?void 0:e;return void 0!==s&&this.setHeader(s),n&&this.setContent(n),this.setMod("active",!0),this.isOpened=!0,this.setModal(o),this.destination.appendChild(this.container),!0!==this.getMod("static")?(this.setPosition(this.offsetX,this.offsetY),this.setMaxZIndex()):this.container.style.removeProperty("z-index"),this.o.fullsize&&this.toggleFullSize(!0),this.e.fire("afterOpen",this),this}setModal(t){return this.isModal=!!t,this.setMod("modal",this.isModal),this}close(){if(this.isDestructed||!this.isOpened||!0===this.getMod("static"))return this;let{e:t}=this;return!1===t.fire(this,"beforeClose")||!1===t.fire("beforeClose",this)||(this.setMod("active",!1),this.isOpened=!1,this.isFullSize&&this.toggleFullSize(!1),l.Dom.safeRemove(this.container),this.__removeGlobalResizeListeners(),t.fire(this,"afterClose"),t.fire(this.ow,"joditCloseDialog"),this.destroyAfterClose&&this.destruct()),this}buildToolbar(){this.o.buttons&&this.toolbar.build((0,u.splitArray)(this.o.buttons)).setMod("mode","header").appendTo(this.dialogbox_toolbar)}destruct(){this.isInDestruct||(this.setStatus(s.STATUSES.beforeDestruct),this.isOpened&&this.close(),this.events&&(this.__removeGlobalResizeListeners(),this.events.off(this.container,"close_dialog",self.close).off(this.ow,"keydown",this.__onEsc).off(this.ow,"resize",this.__onResize)),super.destruct())}constructor(t={}){super(t),(0,o._)(this,"resizer",void 0),(0,o._)(this,"offsetX",void 0),(0,o._)(this,"offsetY",void 0),(0,o._)(this,"destroyAfterClose",!1),(0,o._)(this,"moved",!1),(0,o._)(this,"resizable",!1),(0,o._)(this,"draggable",!1),(0,o._)(this,"startX",0),(0,o._)(this,"startY",0),(0,o._)(this,"startPoint",{x:0,y:0,w:0,h:0}),(0,o._)(this,"lockSelect",()=>{this.setMod("moved",!0)}),(0,o._)(this,"unlockSelect",()=>{this.setMod("moved",!1)}),(0,o._)(this,"__onResize",()=>{this.options&&this.o.resizable&&!this.moved&&this.isOpened&&!this.offsetX&&!this.offsetY&&this.setPosition()}),(0,o._)(this,"dialog",void 0),(0,o._)(this,"workplace",void 0),(0,o._)(this,"dialogbox_header",void 0),(0,o._)(this,"dialogbox_content",void 0),(0,o._)(this,"dialogbox_footer",void 0),(0,o._)(this,"dialogbox_toolbar",void 0),(0,o._)(this,"isModal",!1),(0,o._)(this,"isOpened",!1),this.options=(0,d.ConfigProto)(t,(0,d.ConfigProto)(_.Config.prototype.dialog,v.defaultOptions)),l.Dom.safeRemove(this.container);const e=this.getFullElName.bind(this);this.container=this.c.fromHTML(`<div class="jodit jodit-dialog ${this.componentName}">
|
|
23
23
|
<div class="${e("overlay")}"></div>
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
</div>`:""}
|
|
109
109
|
</div>
|
|
110
110
|
</div>
|
|
111
|
-
</form>`)}},60936:function(t,e,i){"use strict";i.r(e),i.d(e,{Ajax:function(){return p.Ajax},Alert:function(){return r.Alert},Async:function(){return l.Async},AsyncStorage:function(){return k.AsyncStorage},Button:function(){return f.Button},CommitStyle:function(){return D.CommitStyle},Component:function(){return o.Component},Confirm:function(){return r.Confirm},ContextMenu:function(){return s.ContextMenu},Create:function(){return c.Create},Dialog:function(){return r.Dialog},Dom:function(){return u.Dom},EventEmitter:function(){return h.EventEmitter},EventHandlersStore:function(){return h.EventHandlersStore},Eventify:function(){return h.Eventify},FileBrowser:function(){return a.FileBrowser},Helpers:function(){return n},History:function(){return _.History},Icon:function(){return f.Icon},ImageEditor:function(){return b.ImageEditor},IndexedDBProvider:function(){return k.IndexedDBProvider},LazyWalker:function(){return u.LazyWalker},LocalStorageProvider:function(){return k.LocalStorageProvider},MemoryStorageProvider:function(){return k.MemoryStorageProvider},Plugin:function(){return d.Plugin},PluginSystem:function(){return x.PluginSystem},Popup:function(){return f.Popup},ProgressBar:function(){return f.ProgressBar},Prompt:function(){return r.Prompt},Response:function(){return p.Response},STATUSES:function(){return o.STATUSES},Selection:function(){return D.Selection},Snapshot:function(){return v.Snapshot},StatusBar:function(){return w.StatusBar},Storage:function(){return k.Storage},StorageKey:function(){return k.StorageKey},Table:function(){return S.Table},ToolbarButton:function(){return C.ToolbarButton},ToolbarCollection:function(){return E.ToolbarCollection},ToolbarContent:function(){return C.ToolbarContent},ToolbarEditorCollection:function(){return I.ToolbarEditorCollection},ToolbarSelect:function(){return C.ToolbarSelect},UIBlock:function(){return f.UIBlock},UIButton:function(){return f.UIButton},UIButtonGroup:function(){return f.UIButtonGroup},UIButtonState:function(){return f.UIButtonState},UICheckbox:function(){return f.UICheckbox},UIElement:function(){return f.UIElement},UIFileInput:function(){return f.UIFileInput},UIForm:function(){return f.UIForm},UIGroup:function(){return f.UIGroup},UIInput:function(){return f.UIInput},UIList:function(){return f.UIList},UIMessages:function(){return y.UIMessages},UISelect:function(){return f.UISelect},UISeparator:function(){return f.UISeparator},UISpacer:function(){return f.UISpacer},UITextArea:function(){return f.UITextArea},UITooltip:function(){return f.UITooltip},Uploader:function(){return T.Uploader},View:function(){return m.View},ViewComponent:function(){return o.ViewComponent},ViewWithToolbar:function(){return g.ViewWithToolbar},canUseIndexedDB:function(){return k.canUseIndexedDB},canUsePersistentStorage:function(){return k.canUsePersistentStorage},clearUseIndexedDBCache:function(){return k.clearUseIndexedDBCache},defaultNameSpace:function(){return h.defaultNameSpace},observable:function(){return h.observable}});var o=i(16964),n=i(65946),s=i(67399),r=i(37333),a=i(17610),l=i(91231),c=i(79821),u=i(27795),h=i(1496),d=i(91206),p=i(73714),f=i(4099),m=i(35099),g=i(2222),_=i(53855),v=i(46363),b=i(43271),y=i(10081),w=i(29433),S=i(98803),C=i(39709),E=i(42573),I=i(6209),T=i(94925),x=i(85305),D=i(59841),k=i(25222)},61466:function(t,e,i){"use strict";i.d(e,{UIMessage:function(){return r}});var o=i(31635),n=i(91672),s=i(4099);class r extends s.UIElement{className(){return"UIMessage"}constructor(t,e){super(t),this.setMod("active",!0),this.setMod("variant",e.variant),this.container.textContent=e.text}}r=(0,o.__decorate)([n.component],r)},10081:function(t,e,i){"use strict";i.d(e,{UIMessages:function(){return c}});var o=i(25045),n=i(31635),s=i(91672),r=i(80991),a=i(63468),l=i(61466);class c extends a.UIGroup{className(){return"UIMessages"}info(t,e){this.__message(t,"info",e)}success(t,e){this.__message(t,"success",e)}error(t,e){this.__message(t,"error",e)}message(t,e,i){this.__message(t,e,i)}__message(t,e="info",i){let o=t+":"+e;if(this.__messages.has(o))return void this.async.updateTimeout(o,i||this.options.defaultTimeout);if(!this.__box)throw Error("Container is not defined: "+o);this.__box.appendChild(this.container);let n=new l.UIMessage(this.j,{text:t,variant:e});this.append(n),this.__calcOffsets(),this.__messages.add(o);let s=this.__getRemoveCallback(n,o);this.j.e.on(n.container,"pointerdown",s),this.async.setTimeout(s,{label:o,timeout:i||this.options.defaultTimeout})}__getRemoveCallback(t,e){let i=o=>{o&&o.preventDefault(),t.isInDestruct||(this.async.clearTimeout(e),this.j.e.off(t.container,"pointerdown",i),this.__messages.delete(e),t.setMod("active",!1),this.async.setTimeout(()=>{this.remove(t),t.destruct(),this.__calcOffsets()},300))};return i}__calcOffsets(){let t=5;this.elements.forEach(e=>{(0,r.css)(e.container,"bottom",t+"px"),t+=e.container.offsetHeight+this.options.defaultOffset})}constructor(t,e,i={defaultTimeout:3e3,defaultOffset:5}){super(t),(0,o._)(this,"__box",void 0),(0,o._)(this,"options",void 0),(0,o._)(this,"__messages",void 0),this.__box=e,this.options=i,this.__messages=new Set}}c=(0,n.__decorate)([s.component],c)},29433:function(t,e,i){"use strict";i.d(e,{StatusBar:function(){return u}});var o=i(25045),n=i(31635),s=i(16964),r=i(84839),a=i(23211),l=i(23183),c=i(81987);class u extends s.ViewComponent{className(){return"StatusBar"}hide(){this.container.classList.add("jodit_hidden")}show(){this.container.classList.remove("jodit_hidden")}get isShown(){return!this.container.classList.contains("jodit_hidden")}getHeight(){return this.container?.offsetHeight??0}findEmpty(t=!1){let e=this.getElms(t?"item-right":"item");for(let t=0;t<e.length;t+=1)if(!e[t].innerHTML.trim().length)return e[t]}append(t,e=!1){let i=this.findEmpty(e)||this.j.c.div(this.getFullElName("item"));e&&i.classList.add(this.getFullElName("item-right")),i.appendChild(t),this.container?.appendChild(i),this.j.o.statusbar&&this.show(),this.j.e.fire("resize")}destruct(){this.isInDestruct||(this.setStatus(s.STATUSES.beforeDestruct),a.Dom.safeRemove(this.container),super.destruct())}constructor(t,e){super(t),(0,o._)(this,"target",void 0),(0,o._)(this,"container",void 0),(0,o._)(this,"mods",void 0),this.target=e,this.mods={},this.container=t.c.div("jodit-status-bar"),e.appendChild(this.container),this.hide()}}u=(0,n.__decorate)([r.component,(0,r.derive)(c.Mods,l.Elms)],u)},98803:function(t,e,i){"use strict";i.d(e,{Table:function(){return d}});var o=i(25045),n=i(31635),s=i(16964),r=i(81937),a=i(84839),l=i(27795),c=i(28077),u=i(65946);let h=new WeakMap;class d extends s.ViewComponent{className(){return"Table"}__recalculateStyles(){let t=(0,c.getContainer)(this.j,d,"style",!0),e=[];this.selected.forEach(t=>{let i=(0,u.cssPath)(t);i&&e.push(i)}),t.innerHTML=e.length?e.join(",")+`{${this.jodit.options.table.selectionCellStyle}}`:""}addSelection(t){this.selected.add(t),this.__recalculateStyles();let e=l.Dom.closest(t,"table",this.j.editor);if(e){let i=d.__selectedByTable.get(e)||new Set;i.add(t),d.__selectedByTable.set(e,i)}}removeSelection(t){this.selected.delete(t),this.__recalculateStyles();let e=l.Dom.closest(t,"table",this.j.editor);if(e){let i=d.__selectedByTable.get(e);i&&(i.delete(t),i.size||d.__selectedByTable.delete(e))}}getAllSelectedCells(){return(0,u.toArray)(this.selected)}static __getSelectedCellsByTable(t){let e=d.__selectedByTable.get(t);return e?(0,u.toArray)(e):[]}destruct(){return this.selected.clear(),super.destruct()}static __getRowsCount(t){return t.rows.length}getRowsCount(t){return d.__getRowsCount(t)}static __getColumnsCount(t){return d.__formalMatrix(t).reduce((t,e)=>Math.max(t,e.length),0)}getColumnsCount(t){return d.__getColumnsCount(t)}static __formalMatrix(t,e){let i=[[]],o=(0,u.toArray)(t.rows),n=(t,o)=>{void 0===i[o]&&(i[o]=[]);let n=t.colSpan,s=t.rowSpan,r,a,l=0;for(;i[o][l];)l+=1;for(a=0;s>a;a+=1)for(r=0;r<n;r+=1){if(void 0===i[o+a]&&(i[o+a]=[]),e&&!1===e(t,o+a,l+r,n,s))return!1;i[o+a][l+r]=t}};for(let t=0;t<o.length;t+=1){let e=(0,u.toArray)(o[t].cells);for(let o=0;o<e.length;o+=1)if(!1===n(e[o],t))return i}return i}formalMatrix(t,e){return d.__formalMatrix(t,e)}static __formalCoordinate(t,e,i=!1){let o=0,n=0,s=1,r=1;return d.__formalMatrix(t,(t,a,l,c,u)=>{if(e===t)return o=a,n=l,s=c||1,r=u||1,i&&(n+=(c||1)-1,o+=(u||1)-1),!1}),[o,n,s,r]}formalCoordinate(t,e,i=!1){return d.__formalCoordinate(t,e,i)}static __appendRow(t,e,i,o){let n;if(e)n=e.cloneNode(!0),(0,u.$$)("td,th",e).forEach(t=>{let e=(0,u.attr)(t,"rowspan");if(e&&parseInt(e,10)>1){let i=parseInt(e,10)-1;(0,u.attr)(t,"rowspan",i>1?i:null)}}),(0,u.$$)("td,th",n).forEach(t=>{t.innerHTML=""});else{let e=d.__getColumnsCount(t);n=o.element("tr");for(let t=0;t<e;t+=1)n.appendChild(o.element("td"))}i&&e&&e.nextSibling?e.parentNode&&e.parentNode.insertBefore(n,e.nextSibling):!i&&e?e.parentNode&&e.parentNode.insertBefore(n,e):(t.getElementsByTagName("tbody")?.[0]||t).appendChild(n)}appendRow(t,e,i){return d.__appendRow(t,e,i,this.j.createInside)}static __removeRow(t,e){let i,o=d.__formalMatrix(t),n=t.rows[e];o[e].forEach((s,r)=>{if(i=!1,e-1>=0&&o[e-1][r]===s)i=!0;else if(o[e+1]&&o[e+1][r]===s){if(s.parentNode===n&&s.parentNode.nextSibling){i=!0;let n=r+1;for(;o[e+1][n]===s;)n+=1;let a=l.Dom.next(s.parentNode,t=>l.Dom.isTag(t,"tr"),t);a&&(o[e+1][n]?a.insertBefore(s,o[e+1][n]):a.appendChild(s))}}else l.Dom.safeRemove(s);if(i&&(s.parentNode===n||s!==o[e][r-1])){let t=s.rowSpan;(0,u.attr)(s,"rowspan",t-1>1?t-1:null)}}),l.Dom.safeRemove(n)}removeRow(t,e){return d.__removeRow(t,e)}appendColumn(t,e,i=!0){let o=d.__formalMatrix(t);if(!i&&l.Dom.isCell(e.previousElementSibling))return this.appendColumn(t,e.previousElementSibling,!0);let[,n]=d.__formalCoordinate(t,e,i),s=i?n+1:n;for(let t=0;t<o.length;){let e=o[t];if(e[n]!==e[s]||n===s){let t=this.j.createInside.element("td");i?l.Dom.after(e[n],t):l.Dom.before(e[n],t),e[n].rowSpan>1&&(t.rowSpan=e[n].rowSpan)}else e[n].colSpan+=1;t+=e[n].rowSpan||1}}static __removeColumn(t,e){let i,o=d.__formalMatrix(t);o.forEach((t,n)=>{let s=t[e];if(i=!1,e-1>=0&&o[n][e-1]===s||e+1<t.length&&o[n][e+1]===s?i=!0:l.Dom.safeRemove(s),i&&(n-1<0||s!==o[n-1][e])){let t=s.colSpan;(0,u.attr)(s,"colspan",t-1>1?(t-1).toString():null)}})}removeColumn(t,e){return d.__removeColumn(t,e)}static __getSelectedBound(t,e){let i,o,n,s=[[1/0,1/0],[0,0]],r=d.__formalMatrix(t);for(i=0;i<r.length;i+=1)for(o=0;r[i]&&o<r[i].length;o+=1)e.includes(r[i][o])&&(s[0][0]=Math.min(i,s[0][0]),s[0][1]=Math.min(o,s[0][1]),s[1][0]=Math.max(i,s[1][0]),s[1][1]=Math.max(o,s[1][1]));for(i=s[0][0];i<=s[1][0];i+=1)for(n=1,o=s[0][1];o<=s[1][1];o+=1){for(;r[i]&&r[i][o-n]&&r[i][o]===r[i][o-n];)s[0][1]=Math.min(o-n,s[0][1]),s[1][1]=Math.max(o-n,s[1][1]),n+=1;for(n=1;r[i]&&r[i][o+n]&&r[i][o]===r[i][o+n];)s[0][1]=Math.min(o+n,s[0][1]),s[1][1]=Math.max(o+n,s[1][1]),n+=1;for(n=1;r[i-n]&&r[i][o]===r[i-n][o];)s[0][0]=Math.min(i-n,s[0][0]),s[1][0]=Math.max(i-n,s[1][0]),n+=1;for(n=1;r[i+n]&&r[i][o]===r[i+n][o];)s[0][0]=Math.min(i+n,s[0][0]),s[1][0]=Math.max(i+n,s[1][0]),n+=1}return s}getSelectedBound(t,e){return d.__getSelectedBound(t,e)}static __normalizeTable(t){let e=[],i=d.__formalMatrix(t);d.__removeExtraColspans(i,e),d.__removeExtraRowspans(i,e);for(let t=0;t<i.length;t+=1)for(let e=0;e<i[t].length;e+=1)void 0!==i[t][e]&&(i[t][e].hasAttribute("rowspan")&&1===i[t][e].rowSpan&&(0,u.attr)(i[t][e],"rowspan",null),i[t][e].hasAttribute("colspan")&&1===i[t][e].colSpan&&(0,u.attr)(i[t][e],"colspan",null),i[t][e].hasAttribute("class")&&!(0,u.attr)(i[t][e],"class")&&(0,u.attr)(i[t][e],"class",null));d.__unmark(e)}static __removeExtraColspans(t,e){for(let i=0;i<t[0].length;i+=1){let o=1e6,n=!1;for(let e=0;e<t.length;e+=1)if(void 0!==t[e][i]){if(t[e][i].colSpan<2){n=!0;break}o=Math.min(o,t[e][i].colSpan)}if(!n)for(let n=0;n<t.length;n+=1)void 0!==t[n][i]&&d.__mark(t[n][i],"colspan",t[n][i].colSpan-o+1,e)}}static __removeExtraRowspans(t,e){let i=0,o=0;for(i=0;i<t.length;i+=1){let n=1e6,s=!1;for(o=0;o<t[i].length;o+=1)if(void 0!==t[i][o]){if(t[i][o].rowSpan<2){s=!0;break}n=Math.min(n,t[i][o].rowSpan)}if(!s)for(o=0;o<t[i].length;o+=1)void 0!==t[i][o]&&d.__mark(t[i][o],"rowspan",t[i][o].rowSpan-n+1,e)}}normalizeTable(t){return d.__normalizeTable(t)}static __mergeSelected(t,e){let i=[],o=d.__getSelectedBound(t,d.__getSelectedCellsByTable(t)),n=0,s=null,a=0,c=0,h=0,f=new Set,m=[];o&&(o[0][0]-o[1][0]||o[0][1]-o[1][1])&&(d.__formalMatrix(t,(t,r,l,g,_)=>{r>=o[0][0]&&r<=o[1][0]&&l>=o[0][1]&&l<=o[1][1]&&(f.has(t)||(f.add(t),r===o[0][0]&&t.style.width&&(n+=t.offsetWidth),""!==(0,u.trim)(t.innerHTML.replace(/<br(\/)?>/g,""))&&i.push(t.innerHTML),g>1&&(c+=g-1),_>1&&(h+=_-1),s?(d.__mark(t,"remove",1,m),p(e).removeSelection(t)):(s=t,a=l)))}),c=o[1][1]-o[0][1]+1,h=o[1][0]-o[0][0]+1,s&&(c>1&&d.__mark(s,"colspan",c,m),h>1&&d.__mark(s,"rowspan",h,m),n&&(d.__mark(s,"width",(n/t.offsetWidth*100).toFixed(r.ACCURACY)+"%",m),a&&d.__setColumnWidthByDelta(t,a,0,!0,m)),s.innerHTML=i.join("<br/>"),p(e).addSelection(s),f.delete(s),d.__unmark(m),d.__normalizeTable(t),(0,u.toArray)(t.rows).forEach(t=>{t.cells.length||l.Dom.safeRemove(t)})))}mergeSelected(t){return d.__mergeSelected(t,this.j)}static __splitHorizontal(t,e){let i,o,n,s,r,a=[];d.__getSelectedCellsByTable(t).forEach(c=>{(o=e.createInside.element("td")).appendChild(e.createInside.element("br")),n=e.createInside.element("tr"),i=d.__formalCoordinate(t,c),c.rowSpan<2?(d.__formalMatrix(t,(t,e,o)=>{i[0]===e&&i[1]!==o&&t!==c&&d.__mark(t,"rowspan",t.rowSpan+1,a)}),l.Dom.after(l.Dom.closest(c,"tr",t),n),n.appendChild(o)):(d.__mark(c,"rowspan",c.rowSpan-1,a),d.__formalMatrix(t,(e,o,n)=>{o>i[0]&&o<i[0]+c.rowSpan&&i[1]>n&&e.parentNode.rowIndex===o&&(r=e),i[0]<o&&e===c&&(s=t.rows[o])}),r?l.Dom.after(r,o):s.insertBefore(o,s.firstChild)),c.colSpan>1&&d.__mark(o,"colspan",c.colSpan,a),d.__unmark(a),p(e).removeSelection(c)}),this.__normalizeTable(t)}splitHorizontal(t){return d.__splitHorizontal(t,this.j)}static __splitVertical(t,e){let i,o,n,s=[];d.__getSelectedCellsByTable(t).forEach(a=>{i=d.__formalCoordinate(t,a),a.colSpan<2?d.__formalMatrix(t,(t,e,o)=>{i[1]===o&&i[0]!==e&&t!==a&&d.__mark(t,"colspan",t.colSpan+1,s)}):d.__mark(a,"colspan",a.colSpan-1,s),(o=e.createInside.element("td")).appendChild(e.createInside.element("br")),a.rowSpan>1&&d.__mark(o,"rowspan",a.rowSpan,s);let c=a.offsetWidth;l.Dom.after(a,o),n=c/t.offsetWidth/2,d.__mark(a,"width",(100*n).toFixed(r.ACCURACY)+"%",s),d.__mark(o,"width",(100*n).toFixed(r.ACCURACY)+"%",s),d.__unmark(s),p(e).removeSelection(a)}),d.__normalizeTable(t)}splitVertical(t){return d.__splitVertical(t,this.j)}static __setColumnWidthByDelta(t,e,i,o,n){let s=d.__formalMatrix(t),a=0;for(let o=0;o<s.length;o+=1){let l=s[o][e];if(l.colSpan>1&&s.length>1)continue;let c=(l.offsetWidth+i)/t.offsetWidth*100;d.__mark(l,"width",c.toFixed(r.ACCURACY)+"%",n),a=o;break}for(let t=a+1;t<s.length;t+=1){let i=s[t][e];d.__mark(i,"width",null,n)}o||d.__unmark(n)}setColumnWidthByDelta(t,e,i,o,n){return d.__setColumnWidthByDelta(t,e,i,o,n)}static __mark(t,e,i,o){o.push(t);let n=h.get(t)??{};n[e]=void 0===i?1:i,h.set(t,n)}static __unmark(t){t.forEach(t=>{let e=h.get(t);e&&(Object.keys(e).forEach(i=>{let o=e[i];switch(i){case"remove":l.Dom.safeRemove(t);break;case"rowspan":(0,u.attr)(t,"rowspan",(0,u.isNumber)(o)&&o>1?o:null);break;case"colspan":(0,u.attr)(t,"colspan",(0,u.isNumber)(o)&&o>1?o:null);break;case"width":null==o?(t.style.removeProperty("width"),(0,u.attr)(t,"style")||(0,u.attr)(t,"style",null)):t.style.width=o.toString()}delete e[i]}),h.delete(t))})}constructor(...t){super(...t),(0,o._)(this,"selected",new Set)}}(0,o._)(d,"__selectedByTable",new WeakMap),(0,n.__decorate)([(0,a.debounce)()],d.prototype,"__recalculateStyles",null);let p=t=>t.getInstance("Table",t.o)},22533:function(t,e,i){"use strict";i.d(e,{ToolbarButton:function(){return T}});var o=i(25045),n=i(31635),s=i(69364),r=i(49574),a=i(51676),l=i(91672),c=i(68616),u=i(23211),h=i(17312),d=i(91565),p=i(24497),f=i(62101),m=i(85932),g=i(86878),_=i(57821),v=i(28712),b=i(7909),y=i(71125),w=i(59400),S=i(15982),C=i(29434),E=i(51116),I=i(4274);class T extends w.UIButton{className(){return"ToolbarButton"}getRole(){return"listitem"}updateAriaLabel(){if(super.updateAriaLabel(),this.trigger){let t=this.state.tooltip?this.jodit.i18n(this.state.tooltip):null;(0,b.attr)(this.trigger,"aria-label",t)}}get toolbar(){let t=(0,l.getComponentClass)("ToolbarCollection");return this.closest(t)}update(){let{control:t,state:e}=this,i=this.toolbar;if(!i)return;let o=t.value?.(i.jodit,this);void 0!==o&&(e.value=o),e.disabled=this.__calculateDisabledStatus(i),e.activated=this.__calculateActivatedStatus(i),t.update?.(i.jodit,this)}__calculateActivatedStatus(t){return(!(0,p.isJoditObject)(this.j)||!!this.j.editorIsActive)&&(!!this.control.isActive?.(this.j,this)||!!(t&&t.shouldBeActive(this)))}__calculateDisabledStatus(t){return!!(this.j.o.disabled||this.j.o.readonly&&(!this.j.o.activeButtonsInReadOnly||!this.j.o.activeButtonsInReadOnly.includes(this.control.name))||this.control.isDisabled?.(this.j,this))||!!(t&&t.shouldBeDisabled(this))}onChangeActivated(){(0,b.attr)(this.button,"aria-pressed",this.state.activated),super.onChangeActivated()}onChangeText(){(0,d.isFunction)(this.control.template)?this.text.innerHTML=this.control.template(this.j,this.control.name,this.j.i18n(this.state.text)):super.onChangeText(),this.setMod("text-icons",!!this.text.innerText.trim().length)}onChangeTabIndex(){(0,b.attr)(this.button,"tabindex",this.state.tabIndex)}createContainer(){let t=this.componentName,e=this.j.c.span(t),i=super.createContainer();i.classList.remove(t),i.classList.add(t+"__button"),Object.defineProperty(i,"component",{value:this}),e.appendChild(i);let o=this.j.c.fromHTML(`<span role="button" aria-haspopup="true" aria-expanded="false" class="${t}__trigger">${C.Icon.get("chevron")}</span>`);return i.appendChild(o),e}focus(){this.container.querySelector("button")?.focus()}onChangeHasTrigger(){this.state.hasTrigger?this.container.appendChild(this.trigger):u.Dom.safeRemove(this.trigger),this.setMod("with-trigger",this.state.hasTrigger||null)}onChangeDisabled(){let t=this.state.disabled?"disabled":null;(0,b.attr)(this.trigger,"disabled",t),(0,b.attr)(this.button,"disabled",t),(0,b.attr)(this.container,"disabled",t)}__initFromControl(){let{control:t,state:e}=this;this.updateSize(),e.name=t.name;let{textIcons:i}=this.j.o;if(!0===i||(0,d.isFunction)(i)&&i(t.name)||t.template)e.icon=(0,w.UIButtonState)().icon,e.text=t.text||t.name;else{if(t.iconURL)e.icon.iconURL=t.iconURL;else{let i=t.icon||t.name;e.icon.name=C.Icon.exists(i)||this.j.o.extraIcons?.[i]?i:""}t.iconURL||e.icon.name||(e.text=t.text||t.name)}t.tooltip&&(e.tooltip=(0,d.isFunction)(t.tooltip)?t.tooltip(this.j,t,this):t.tooltip),e.hasTrigger=!!(t.list||t.popup&&t.exec)}onTriggerClick(t){if(this.openedPopup)return void this.__closePopup();let{control:e}=this;if((0,b.attr)(this.trigger,"aria-expanded",!0),t.buffer={actionTrigger:this},e.list)return this.__openControlList(e);if((0,d.isFunction)(e.popup)){let t=this.openPopup();t.parentElement=this;try{if(!1!==this.j.e.fire((0,_.camelCase)(`before-${e.name}-open-popup`),this.target,e,t)){let i=this.toolbar?.getTarget(this)??this.target??null,o=e.popup(this.j,i,this.__closePopup,this);o?t.setContent((0,m.isString)(o)?this.j.c.fromHTML(o):o).open(()=>(0,g.position)(this.container),!1,this.j.o.allowTabNavigation?this.container:void 0):this.__closePopup()}}catch(t){throw this.__closePopup(),t}this.j.e.fire((0,_.camelCase)(`after-${e.name}-open-popup`),t.container)}}__openControlList(t){let e=this.jodit.options.controls??{},i=t=>(0,S.findControlType)(t,e),o=t.list,n=this.openPopup(),s=(0,I.makeCollection)(this.j);n.parentElement=this,s.parentElement=n,s.mode="vertical";let r=(e,o)=>{let n;if((0,m.isString)(o)&&i(o))return{name:o.toString(),...i(o)};if((0,m.isString)(e)&&i(e))return{name:e.toString(),...i(e),..."object"==typeof o?o:{}};n=e,(0,f.isPlainObject)(n)&&"title"in n&&"value"in n&&(o=e.value,e=e.title);let{childTemplate:s}=t,r={name:e.toString(),template:s&&((t,e,i)=>s(t,e,i,this)),exec:t.childExec?(e,i,o)=>t.childExec?.(e,i,{...o,parentControl:t}):t.exec,data:t.data,command:t.command,isActive:t.isChildActive,value:t.value,isDisabled:t.isChildDisabled,mode:t.mode,args:[...t.args?t.args:[],e,o]};return(0,m.isString)(o)&&(r.text=o),r};s.build((0,h.isArray)(o)?o.map(r):(0,y.keys)(o,!1).map(t=>r(t,o[t])),this.target),n.setContent(s).open(()=>(0,g.position)(this.container),!1,this.j.o.allowTabNavigation?this.container:void 0),this.state.activated=!0}onOutsideClick(t){this.openedPopup&&(t&&u.Dom.isNode(t.target)&&(u.Dom.isOrContains(this.container,t.target)||this.openedPopup.isOwnClick(t))||this.__closePopup())}openPopup(){return this.__closePopup(),this.openedPopup=new E.Popup(this.j,!1),this.j.e.on(this.ow,"mousedown touchstart",this.onOutsideClick).on("escape closeAllPopups",this.onOutsideClick),this.openedPopup}__closePopup(){this.openedPopup&&(this.j.e.off(this.ow,"mousedown touchstart",this.onOutsideClick).off("escape closeAllPopups",this.onOutsideClick),this.state.activated=!1,this.openedPopup.close(),this.openedPopup.destruct(),this.openedPopup=null,this.trigger&&(0,b.attr)(this.trigger,"aria-expanded",!1))}onClick(t){let{control:e}=this;if((0,d.isFunction)(e.exec)){let i=this.toolbar?.getTarget(this)??this.target??null,o=e.exec(this.j,i,{control:e,originalEvent:t,button:this});if(!1!==o&&!0!==o&&(this.j?.e?.fire("synchro"),this.parentElement&&this.parentElement.update(),this.j?.e?.fire("closeAllPopups afterExec")),!1!==o)return}return e.list?this.__openControlList(e):(0,d.isFunction)(e.popup)?this.onTriggerClick(t):void((e.command||e.name)&&((0,y.call)((0,p.isJoditObject)(this.j)?this.j.execCommand.bind(this.j):this.j.od.execCommand.bind(this.j.od),e.command||e.name,!1,e.args&&e.args[0]),this.j.e.fire("closeAllPopups")))}destruct(){return this.__closePopup(),super.destruct()}constructor(t,e,i=null){super(t),(0,o._)(this,"control",void 0),(0,o._)(this,"target",void 0),(0,o._)(this,"state",void 0),(0,o._)(this,"trigger",void 0),(0,o._)(this,"openedPopup",void 0),this.control=e,this.target=i,this.state={...(0,w.UIButtonState)(),theme:"toolbar",currentValue:"",hasTrigger:!1},this.openedPopup=null;const n=this.getElm("button");(0,v.assert)(n,"Element button should exists"),this.button=n,Object.defineProperty(n,"component",{value:this,configurable:!0});const r=this.getElm("trigger");(0,v.assert)(r,"Element trigger should exists"),this.trigger=r,r.remove(),t.e.on([this.button,this.trigger],"mousedown",t=>t.preventDefault()),this.onAction(this.onClick),this.hookStatus(s.STATUSES.ready,()=>{this.__initFromControl(),this.update()}),e.mods&&Object.keys(e.mods).forEach(t=>{e.mods&&this.setMod(t,e.mods[t])})}}(0,n.__decorate)([a.cacheHTML],T.prototype,"createContainer",null),(0,n.__decorate)([(0,c.watch)("state.hasTrigger",{immediately:!1})],T.prototype,"onChangeHasTrigger",null),(0,n.__decorate)([(0,c.watch)("trigger:click")],T.prototype,"onTriggerClick",null),(0,n.__decorate)([r.autobind],T.prototype,"onOutsideClick",null),(0,n.__decorate)([r.autobind],T.prototype,"__closePopup",null),T=(0,n.__decorate)([l.component],T)},5772:function(t,e,i){"use strict";i.d(e,{ToolbarContent:function(){return c}});var o=i(25045),n=i(31635),s=i(84839),r=i(27795),a=i(65946),l=i(59400);class c extends l.UIButton{className(){return"ToolbarContent"}update(){let t=this.control.getContent(this.j,this);((0,a.isString)(t)||t.parentNode!==this.container)&&(r.Dom.detach(this.container),this.container.appendChild((0,a.isString)(t)?this.j.create.fromHTML(t):t)),super.update()}createContainer(){return this.j.c.span(this.componentName)}constructor(t,e,i=null){super(t),(0,o._)(this,"control",void 0),(0,o._)(this,"target",void 0),this.control=e,this.target=i,this.container.classList.add(`${this.componentName}_${this.clearName(e.name)}`),(0,a.attr)(this.container,"role","content")}}c=(0,n.__decorate)([s.component],c)},39709:function(t,e,i){"use strict";i.d(e,{ToolbarButton:function(){return o.ToolbarButton},ToolbarContent:function(){return n.ToolbarContent},ToolbarSelect:function(){return s.ToolbarSelect}});var o=i(22533),n=i(5772),s=i(61764)},61764:function(t,e,i){"use strict";i.d(e,{ToolbarSelect:function(){return l}});var o=i(31635),n=i(84839),s=i(62101),r=i(85932),a=i(22533);class l extends a.ToolbarButton{className(){return"ToolbarSelect"}update(){super.update(),this.state.icon.name="";let{list:t,data:e}=this.control;if(t){let i=this.state.value||(e&&(0,r.isString)(e.currentValue)?e.currentValue:void 0);i||(i=Object.keys(t)[0]);let o=((0,s.isPlainObject)(t)&&t[i.toString()]||i).toString();this.state.text=this.control.textTemplate?.(this.jodit,o)??o}}}l=(0,o.__decorate)([n.component],l)},42573:function(t,e,i){"use strict";i.d(e,{ToolbarCollection:function(){return p}});var o=i(25045),n=i(31635),s=i(84839),r=i(49574),a=i(91672),l=i(29200),c=i(68616),u=i(38027),h=i(97959),d=i(4274);class p extends h.UIList{className(){return"ToolbarCollection"}getRole(){return"toolbar"}get firstButton(){let[t]=this.buttons;return t||null}makeButton(t,e=null){return(0,d.makeButton)(this.j,t,e)}makeSelect(t,e=null){return(0,d.makeSelect)(this.j,t,e)}shouldBeActive(t){}shouldBeDisabled(t){}getTarget(t){return t.target||null}__immediateUpdate(){this.isDestructed||this.j.isLocked||(super.update(),this.j.e.fire("afterUpdateToolbar",this))}update(){this.__immediateUpdate()}setDirection(t){this.container.style.direction=t,this.container.setAttribute("dir",t)}__initEvents(){this.j.e.on(this.__listenEvents,this.update).on("afterSetMode focus",this.__immediateUpdate)}hide(){this.container.remove()}show(){this.appendTo(this.j.toolbarContainer)}showInline(t){throw(0,u.error)("The method is not implemented for this class.")}build(t,e=null){let i=this.j.e.fire("beforeToolbarBuild",t);return i&&(t=i),super.build(t,e),this}destruct(){this.isDestructed||(this.j.e.off(this.__listenEvents,this.update).off("afterSetMode focus",this.__immediateUpdate),super.destruct())}constructor(t){super(t),(0,o._)(this,"__listenEvents","updatePlugins updateToolbar changeStack mousedown mouseup keydown change readonly afterResize selectionchange changeSelection focus afterSetMode touchstart focus blur")}}(0,n.__decorate)([(0,c.watch)(":afterInit"),r.autobind],p.prototype,"__immediateUpdate",null),(0,n.__decorate)([(0,s.debounce)(t=>t.j.defaultTimeout,!0)],p.prototype,"update",null),(0,n.__decorate)([(0,l.hook)("ready")],p.prototype,"__initEvents",null),p=(0,n.__decorate)([a.component],p)},6209:function(t,e,i){"use strict";i.d(e,{ToolbarEditorCollection:function(){return u}});var o=i(25045),n=i(31635),s=i(81937),r=i(84839),a=i(27795),l=i(65946),c=i(42573);class u extends c.ToolbarCollection{className(){return"ToolbarEditorCollection"}shouldBeDisabled(t){let e=super.shouldBeDisabled(t);if(void 0!==e)return e;let i=void 0===t.control.mode?s.MODE_WYSIWYG:t.control.mode;return i!==s.MODE_SPLIT&&i!==this.j.getRealMode()}shouldBeActive(t){let e,i=super.shouldBeActive(t);if(void 0!==i)return i;let o=this.j.selection?this.j.s.current():null;if(!o)return!1;if(t.control.tags){let i=t.control.tags;if(e=o,a.Dom.up(e,t=>{if(t&&-1!==i.indexOf(t.nodeName.toLowerCase()))return!0},this.j.editor))return!0}if(t.control.css){let i=t.control.css;if(e=o,a.Dom.up(e,t=>{if(t&&!a.Dom.isText(t)&&!a.Dom.isComment(t))return this.checkActiveStatus(i,t)},this.j.editor))return!0}return!1}getTarget(t){return t.target||this.j.s.current()||null}prependInvisibleInput(t){let e=this.j.create.element("input",{name:"jodit-toolbar-focus-helper_"+this.j.id,tabIndex:-1,disabled:!0,style:"width: 0; height:0; position: absolute; visibility: hidden;"});a.Dom.appendChildFirst(t,e)}showInline(t){this.jodit.e.fire("showInlineToolbar",t)}hide(){this.jodit.e.fire("hidePopup"),super.hide(),this.jodit.e.fire("toggleToolbar")}show(){super.show(),this.jodit.e.fire("toggleToolbar")}constructor(t){super(t),(0,o._)(this,"checkActiveStatus",(t,e)=>{let i=0,o=0;return Object.keys(t).forEach(n=>{let s=t[n];(0,l.isFunction)(s)?s(this.j,(0,l.css)(e,n).toString())&&(i+=1):-1!==s.indexOf((0,l.css)(e,n).toString())&&(i+=1),o+=1}),o===i}),this.prependInvisibleInput(this.container)}}u=(0,n.__decorate)([r.component],u)},4274:function(t,e,i){"use strict";i.d(e,{makeButton:function(){return a},makeCollection:function(){return r},makeSelect:function(){return l}});var o=i(91672),n=i(91565),s=i(24497);function r(t,e){let i=(0,o.getComponentClass)("ToolbarCollection"),n=(0,o.getComponentClass)("ToolbarEditorCollection"),r=(0,s.isJoditObject)(t)?new n(t):new i(t);return t.o.textIcons&&r.container.classList.add("jodit_text_icons"),e&&(r.parentElement=e),t.o.toolbarButtonSize&&(r.buttonSize=t.o.toolbarButtonSize),r}function a(t,e,i=null){if((0,n.isFunction)(e.getContent))return new((0,o.getComponentClass)("ToolbarContent"))(t,e,i);let s=new((0,o.getComponentClass)("ToolbarButton"))(t,e,i);return s.state.tabIndex=t.o.allowTabNavigation?0:-1,s}function l(t,e,i=null){return new((0,o.getComponentClass)("ToolbarSelect"))(t,e,i)}},40013:function(t,e,i){"use strict";var o=i(17312),n=i(24497),s=i(5266);s.Config.prototype.enableDragAndDropFileToEditor=!0,s.Config.prototype.uploader={url:"",insertImageAsBase64URI:!1,imagesExtensions:["jpg","png","jpeg","gif"],headers:null,data:null,filesVariableName:t=>`files[${t}]`,withCredentials:!1,pathVariableName:"path",format:"json",method:"POST",prepareData:t=>t,isSuccess:t=>t.success,getMessage:t=>void 0!==t.data.messages&&(0,o.isArray)(t.data.messages)?t.data.messages.join(" "):"",processFileName:(t,e,i)=>[t,e,i],process:t=>t.data,error(t){this.j.message.error(t.message,4e3)},getDisplayName:(t,e)=>t+e,defaultHandlerSuccess(t){let e=this.j||this;(0,n.isJoditObject)(e)&&t.files&&t.files.length&&t.files.forEach((i,o)=>{let[n,s]=t.isImages&&t.isImages[o]?["img","src"]:["a","href"],r=e.createInside.element(n);r.setAttribute(s,t.baseurl+i),"a"===n&&(r.textContent=e.o.uploader.getDisplayName.call(this,t.baseurl,i)),"img"===n?e.s.insertImage(r,null,e.o.imageDefaultWidth):e.s.insertNode(r)})},defaultHandlerError(t){this.j.message.error(t.message)},contentType(t){return(void 0===this.ow.FormData||"string"==typeof t)&&"application/x-www-form-urlencoded; charset=UTF-8"}}},89446:function(t,e,i){"use strict";i.d(e,{buildData:function(){return n}});var o=i(65946);function n(t,e){if((0,o.isFunction)(t.o.buildData))return t.o.buildData.call(t,e);let i=t.ow.FormData;if(void 0!==i){if(e instanceof i||(0,o.isString)(e))return e;let t=new i;return Object.keys(e).forEach(i=>{t.append(i,e[i])}),t}return e}},23112:function(t,e,i){"use strict";function o(t){let e=atob(t.split(",")[1]),i=t.split(",")[0].split(":")[1].split(";")[0],o=new Uint8Array(new ArrayBuffer(e.length));for(let t=0;t<e.length;t+=1)o[t]=e.charCodeAt(t);return new Blob([o.buffer],{type:i})}i.d(e,{dataURItoBlob:function(){return o}})},11981:function(t,e,i){"use strict";i.d(e,{ajaxInstances:function(){return n.ajaxInstances},hasFiles:function(){return r},hasItems:function(){return a},processOldBrowserDrag:function(){return o.processOldBrowserDrag},send:function(){return n.send},sendFiles:function(){return s.sendFiles}}),i(89446);var o=i(95436),n=i(77911),s=i(46533);function r(t){return!!(t&&t.files&&t.files.length>0)}function a(t){return!!(t&&t.items&&t.items.length>0)}},95436:function(t,e,i){"use strict";i.d(e,{processOldBrowserDrag:function(){return c}});var o=i(81937),n=i(27795),s=i(28077),r=i(65946),a=i(23112),l=i(46533);function c(t,e,i,c,u){if(e&&(!e.types.length||e.types[0]!==o.TEXT_PLAIN)){let e=t.j.c.div("",{tabindex:-1,style:"left: -9999px; top: 0; width: 0; height: 100%;line-height: 140%; overflow: hidden; position: fixed; z-index: 2147483647; word-break: break-all;",contenteditable:!0});(0,s.getContainer)(t.j,t.constructor).appendChild(e);let o=(0,r.isJoditObject)(t.j)?t.j.s.save():null;e.focus(),t.j.async.setTimeout(()=>{let s=e.firstChild;if(n.Dom.safeRemove(e),s&&s.hasAttribute("src")){let e=(0,r.attr)(s,"src")||"";o&&(0,r.isJoditObject)(t.j)&&t.j.s.restore(),(0,l.sendFiles)(t,[(0,a.dataURItoBlob)(e)],i,c).finally(u)}},t.j.defaultTimeout)}}},46533:function(t,e,i){"use strict";i.d(e,{sendFiles:function(){return s}});var o=i(65946),n=i(77911);function s(t,e,i,s,r){if(!e)return Promise.reject((0,o.error)("Need files"));let{o:a}=t,l=(0,o.toArray)(e);if(!l.length)return Promise.reject((0,o.error)("Need files"));let c=[];if(a.insertImageAsBase64URI&&function(t,e,i,n,s,r){let a,l;for(l=0;l<t.length;l+=1)if((a=t[l])&&a.type){let c=a.type.match(/\/([a-z0-9]+)/i),u=c[1]?c[1].toLowerCase():"";if(!e.includes(u))continue;let h=new FileReader;i.push(n.j.async.promise((t,e)=>{h.onerror=e,h.onloadend=()=>{let e={baseurl:"",files:[h.result],isImages:[!0]};((0,o.isFunction)(s)?s:r).call(n,e),t(e)},h.readAsDataURL(a)})),t[l]=null}}(l,a.imagesExtensions,c,t,i,a.defaultHandlerSuccess),(l=l.filter(t=>t)).length){let e,u=new FormData;u.append(a.pathVariableName,t.path),u.append("source",t.source);for(let i=0;i<l.length;i+=1)if(e=l[i]){let o=/\.\w+$/.test(e.name),n=e.type.match(/\/([a-z0-9]+)/i),s=n&&n[1]?n[1].toLowerCase():"",r=l[i].name||Math.random().toString().replace(".","");if(!o&&s){let t=s;["jpeg","jpg"].includes(t)&&(t="jpeg|jpg"),RegExp(".("+t+")$","i").test(r)||(r+="."+s)}let[c,h,d]=a.processFileName.call(t,a.filesVariableName(i),l[i],r);u.append(c,h,d)}r&&r(u),a.data&&(0,o.isPlainObject)(a.data)&&Object.keys(a.data).forEach(t=>{u.append(t,a.data[t])}),a.prepareData.call(t,u),c.push((0,n.send)(t,u).then(e=>(a.isSuccess.call(t,e)?((0,o.isFunction)(i)?i:a.defaultHandlerSuccess).call(t,a.process.call(t,e)):((0,o.isFunction)(s)?s:a.defaultHandlerError).call(t,(0,o.error)(a.getMessage.call(t,e))),e)).then(()=>{t.j.events&&t.j.e.fire("filesWereUploaded")}))}return Promise.all(c)}},77911:function(t,e,i){"use strict";i.d(e,{ajaxInstances:function(){return r},send:function(){return a}});var o=i(65946),n=i(73714),s=i(89446);let r=new WeakMap;function a(t,e){let i=(0,s.buildData)(t,e),a=e=>{t.j.progressbar.show().progress(e),e>=100&&t.j.progressbar.hide()},l=(e,i)=>{let s=new n.Ajax({xhr(){let e=new XMLHttpRequest;return void 0!==t.j.ow.FormData&&e.upload?(i(10),e.upload.addEventListener("progress",t=>{if(t.lengthComputable){let e=t.loaded/t.total;i(e*=100)}},!1)):i(100),e},method:t.o.method||"POST",data:e,url:(0,o.isFunction)(t.o.url)?t.o.url(e):t.o.url,headers:t.o.headers,queryBuild:t.o.queryBuild,contentType:t.o.contentType.call(t,e),withCredentials:t.o.withCredentials||!1}),a=r.get(t);return a||(a=new Set,r.set(t,a)),a.add(s),t.j.e.one("beforeDestruct",s.destruct),s.send().then(t=>t.json()).catch(t=>({success:!1,data:{messages:[t]}})).finally(()=>{s.destruct(),a?.delete(s)})};return((0,o.isFunction)(t.o.customUploadFunction)&&(l=t.o.customUploadFunction),(0,o.isPromise)(i))?i.then(t=>l(t,a)).catch(e=>{t.o.error.call(t,e)}):l(i,a)}},94925:function(t,e,i){"use strict";i.d(e,{Uploader:function(){return c}});var o=i(25045),n=i(16964),s=i(81937),r=i(65946),a=i(5266),l=i(11981);i(40013);class c extends n.ViewComponent{get j(){return this.jodit}className(){return"Uploader"}get o(){return this.options}setPath(t){return this.path=t,this}setSource(t){return this.source=t,this}bind(t,e,i){let o=()=>{t.classList.remove("jodit_drag_hover")},n=this,r=t=>{let r,a,c,u=t.clipboardData,h=t=>{a&&(t.append("extension",c),t.append("mimetype",a.type))};if(!s.IS_IE&&(0,l.hasFiles)(u))return(0,l.sendFiles)(n,u.files,e,i).finally(o),!1;if(s.IS_IE&&!s.IS_ES_NEXT)return(0,l.processOldBrowserDrag)(n,u,e,i,o);if((0,l.hasItems)(u)){let{items:s}=u;for(r=0;r<s.length;r+=1)if("file"===s[r].kind&&"image/png"===s[r].type){if(a=s[r].getAsFile()){let t=a.type.match(/\/([a-z0-9]+)/i);c=t[1]?t[1].toLowerCase():"",(0,l.sendFiles)(n,[a],e,i,h).finally(o)}t.preventDefault();break}}};n.j&&n.j.editor!==t?n.j.e.on(t,"paste",r):n.j.e.on("beforePaste",r),this.attachEvents(t,e,i,o)}attachEvents(t,e,i,o){let n=this;n.j.e.on(t,"dragend dragover dragenter dragleave drop",t=>{t.preventDefault()}).on(t,"dragover",e=>{((0,l.hasFiles)(e.dataTransfer)||(0,l.hasItems)(e.dataTransfer))&&(t.classList.add("jodit_drag_hover"),e.preventDefault())}).on(t,"dragend dragleave",e=>{t.classList.remove("jodit_drag_hover"),(0,l.hasFiles)(e.dataTransfer)&&e.preventDefault()}).on(t,"drop",s=>{t.classList.remove("jodit_drag_hover"),(0,l.hasFiles)(s.dataTransfer)&&(s.preventDefault(),s.stopImmediatePropagation(),(0,l.sendFiles)(n,s.dataTransfer.files,e,i).finally(o))});let s=t.querySelector("input[type=file]");s&&n.j.e.on(s,"change",()=>{(0,l.sendFiles)(n,s.files,e,i).then(()=>{s.value="",/safari/i.test(navigator.userAgent)||(s.type="",s.type="file")}).finally(o)})}uploadRemoteImage(t,e,i){let o=this,{o:n}=o,s=(0,r.isFunction)(i)?i:n.defaultHandlerError;(0,l.send)(o,{action:"fileUploadRemote",url:t}).then(t=>{n.isSuccess.call(o,t)?((0,r.isFunction)(e)?e:n.defaultHandlerSuccess).call(o,n.process.call(o,t)):s.call(o,(0,r.error)(n.getMessage.call(o,t)))}).catch(t=>s.call(o,t))}upload(t){return this.async.promise((e,i)=>{(0,l.sendFiles)(this,t,e,i)})}destruct(){this.setStatus(n.STATUSES.beforeDestruct);let t=l.ajaxInstances.get(this);t&&(t.forEach(t=>{try{t.destruct()}catch{}}),t.clear()),super.destruct()}constructor(t,e){super(t),(0,o._)(this,"path",""),(0,o._)(this,"source","default"),(0,o._)(this,"options",void 0),this.options=(0,r.ConfigProto)(e||{},(0,r.ConfigProto)(a.Config.defaultOptions.uploader,(0,r.isJoditObject)(t)?t.o.uploader:{}))}}},72348:function(t,e,i){"use strict";i.d(e,{ColorPickerWidget:function(){return l}});var o=i(27795),n=i(65946),s=i(4099),r=i(54522),a=i.n(r);s.Icon.set("palette",a());let l=(t,e,i)=>{let r="jodit-color-picker",a=(0,n.normalizeColor)(i),l=t.c.div(r),c=t.o.textIcons?`<span>${t.i18n("palette")}</span>`:s.Icon.get("palette"),u=t=>{let e=[];return(0,n.isPlainObject)(t)?Object.keys(t).forEach(i=>{e.push(`<div class="${r}__group ${r}__group-${i}">`),e.push(u(t[i])),e.push("</div>")}):(0,n.isArray)(t)&&t.forEach(t=>{e.push(`<span class='${r}__color-item ${a===t?r+"__color-item_active_true":""}' title="${t}" style="background-color:${t}" data-color="${t}"></span>`)}),e.join("")};l.appendChild(t.c.fromHTML(`<div class="${r}__groups">${u(t.o.colors)}</div>`)),l.appendChild(t.c.fromHTML(`<div data-ref="extra" class="${r}__extra"></div>`));let{extra:h}=(0,n.refs)(l);return t.o.showBrowserColorPicker&&(0,n.hasBrowserColorPicker)()&&(h.appendChild(t.c.fromHTML(`<div class="${r}__native">${c}<input type="color" value="#ffffff"/></div>`)),t.e.on(l,"change",t=>{t.stopPropagation();let i=t.target;if(!i||!i.tagName||!o.Dom.isTag(i,"input"))return;let s=i.value||"";(0,n.isFunction)(e)&&e(s),t.preventDefault()})),t.e.on(l,"mousedown touchend",i=>{i.stopPropagation(),i.preventDefault();let s=i.target;if((!s||!s.tagName||o.Dom.isTag(s,"svg")||o.Dom.isTag(s,"path"))&&s.parentNode&&(s=o.Dom.closest(s.parentNode,"span",t.editor)),!o.Dom.isTag(s,"span")||!s.classList.contains(r+"__color-item"))return;let a=(0,n.attr)(s,"-color")||"";e&&(0,n.isFunction)(e)&&e(a)}),t.e.fire("afterGenerateColorPicker",l,h,e,a),l}},18762:function(t,e,i){"use strict";i.d(e,{FileSelectorWidget:function(){return a}});var o=i(23211),n=i(65946),s=i(4099),r=i(89636);let a=(t,e,i,a,c=!0)=>{let u,h=[],d=t.o.uploader;if(e.upload&&(d.url||d.insertImageAsBase64URI||d.customUploadFunction)){let i=t.c.fromHTML(`<div class="jodit-drag-and-drop__file-box"><strong>${t.i18n(c?"Drop image":"Drop file")}</strong><span><br>${t.i18n("or click")}</span><input type="file" accept="${c?"image/*":"*"}" tabindex="-1" dir="auto" multiple=""/></div>`);t.uploader.bind(i,i=>{let o=(0,n.isFunction)(e.upload)?e.upload:d.defaultHandlerSuccess;(0,n.isFunction)(o)&&o.call(t,i),t.e.fire("closeAllPopups")},e=>{t.message.error(e.message),t.e.fire("closeAllPopups")}),h.push({icon:"upload",name:"Upload",content:i})}if(e.filebrowser&&(t.o.filebrowser.ajax.url||t.o.filebrowser.items.url)&&h.push({icon:"folder",name:"Browse",content(){a&&a(),e.filebrowser&&t.filebrowser.open(e.filebrowser,c)}}),e.url){let r=new s.UIButton(t,{type:"submit",variant:"primary",text:"Insert"}),a=new s.UIForm(t,[new s.UIInput(t,{required:!0,label:"URL",name:"url",type:"text",placeholder:"https://"}),new s.UIInput(t,{name:"text",label:"Alternative text"}),new s.UIBlock(t,[r])]);u=null,i&&!o.Dom.isText(i)&&!o.Dom.isComment(i)&&(o.Dom.isTag(i,"img")||(0,n.$$)("img",i).length)&&(u="IMG"===i.tagName?i:(0,n.$$)("img",i)[0],l(a.container,"input[name=url]",(0,n.attr)(u,"src")),l(a.container,"input[name=text]",(0,n.attr)(u,"alt")),r.state.text="Update"),i&&o.Dom.isTag(i,"a")&&(l(a.container,"input[name=url]",(0,n.attr)(i,"href")),l(a.container,"input[name=text]",(0,n.attr)(i,"title")),r.state.text="Update"),a.onSubmit(i=>{(0,n.isFunction)(e.url)&&e.url.call(t,i.url,i.text)}),h.push({icon:"link",name:"URL",content:a.container})}return(0,r.TabsWidget)(t,h)};function l(t,e,i){let o=t.querySelector(e);return o?(i&&(o.value=i),o.value):""}},15753:function(t,e,i){"use strict";i.d(e,{ColorPickerWidget:function(){return o.ColorPickerWidget},FileSelectorWidget:function(){return n.FileSelectorWidget},TabsWidget:function(){return s.TabsWidget}});var o=i(72348),n=i(18762),s=i(89636)},89636:function(t,e,i){"use strict";i.d(e,{TabsWidget:function(){return l}});var o=i(16964),n=i(23211),s=i(91565),r=i(7909),a=i(4099);let l=(t,e,i)=>{let l=t.c.div("jodit-tabs"),c=t.c.div("jodit-tabs__wrapper"),u=t.c.div("jodit-tabs__buttons");(0,r.attr)(u,{role:"tablist","aria-orientation":"horizontal"});let h={},d=[],p="";l.appendChild(u),l.appendChild(c);let f=t=>{h[t]&&(d.forEach(t=>{t.state.activated=!1}),Object.values(h).forEach(({tab:t})=>t.classList.remove("jodit-tab_active")),h[t].button.state.activated=!0,h[t].tab.classList.add("jodit-tab_active"))};if(e.forEach(({icon:l,name:m,content:g})=>{let _=t.c.div("jodit-tab");(0,r.attr)(_,{role:"tabpanel"});let v=(0,a.Button)(t,l||m,m);v.state.role="tab",t.e.on(v.container,"pointerdown",t=>t.preventDefault()),p||(p=m),u.appendChild(v.container),d.push(v),v.container.classList.add("jodit-tabs__button","jodit-tabs__button_columns_"+e.length),(0,s.isFunction)(g)?_.classList.add("jodit-tab_empty"):_.appendChild(o.Component.isInstanceOf(g,a.UIElement)?g.container:g),c.appendChild(_),v.onAction(()=>(f(m),(0,s.isFunction)(g)&&!n.Dom.isElement(g)&&g.call(t),i&&(i.activeTab=m),!1)),h[m]={button:v,tab:_}}),Object.values(h).forEach(({button:t})=>{t.container.style.width=(100/e.length).toFixed(10)+"%"}),f(i&&i.activeTab&&h[i.activeTab]?i.activeTab:p),i){let t=i.activeTab;Object.defineProperty(i,"activeTab",{configurable:!0,enumerable:!1,get:()=>t,set(e){t=e,f(e)}})}return l}},94358:function(t,e,i){"use strict";var o=i(81937),n=i(28077),s=i(65946),r=i(29434),a=i(5266),l=i(17995),c=i.n(l);a.Config.prototype.controls.about={exec(t){let e=t.dlg({closeOnClickOverlay:!0}),i=t.i18n.bind(t);e.setMod("theme",t.o.theme).setHeader(i("About Jodit")).setContent(`<div class="jodit-about">
|
|
111
|
+
</form>`)}},60936:function(t,e,i){"use strict";i.r(e),i.d(e,{Ajax:function(){return p.Ajax},Alert:function(){return r.Alert},Async:function(){return l.Async},AsyncStorage:function(){return k.AsyncStorage},Button:function(){return f.Button},CommitStyle:function(){return D.CommitStyle},Component:function(){return o.Component},Confirm:function(){return r.Confirm},ContextMenu:function(){return s.ContextMenu},Create:function(){return c.Create},Dialog:function(){return r.Dialog},Dom:function(){return u.Dom},EventEmitter:function(){return h.EventEmitter},EventHandlersStore:function(){return h.EventHandlersStore},Eventify:function(){return h.Eventify},FileBrowser:function(){return a.FileBrowser},Helpers:function(){return n},History:function(){return _.History},Icon:function(){return f.Icon},ImageEditor:function(){return b.ImageEditor},IndexedDBProvider:function(){return k.IndexedDBProvider},LazyWalker:function(){return u.LazyWalker},LocalStorageProvider:function(){return k.LocalStorageProvider},MemoryStorageProvider:function(){return k.MemoryStorageProvider},Plugin:function(){return d.Plugin},PluginSystem:function(){return x.PluginSystem},Popup:function(){return f.Popup},ProgressBar:function(){return f.ProgressBar},Prompt:function(){return r.Prompt},Response:function(){return p.Response},STATUSES:function(){return o.STATUSES},Selection:function(){return D.Selection},Snapshot:function(){return v.Snapshot},StatusBar:function(){return w.StatusBar},Storage:function(){return k.Storage},StorageKey:function(){return k.StorageKey},Table:function(){return S.Table},ToolbarButton:function(){return C.ToolbarButton},ToolbarCollection:function(){return E.ToolbarCollection},ToolbarContent:function(){return C.ToolbarContent},ToolbarEditorCollection:function(){return I.ToolbarEditorCollection},ToolbarSelect:function(){return C.ToolbarSelect},UIBlock:function(){return f.UIBlock},UIButton:function(){return f.UIButton},UIButtonGroup:function(){return f.UIButtonGroup},UIButtonState:function(){return f.UIButtonState},UICheckbox:function(){return f.UICheckbox},UIElement:function(){return f.UIElement},UIFileInput:function(){return f.UIFileInput},UIForm:function(){return f.UIForm},UIGroup:function(){return f.UIGroup},UIInput:function(){return f.UIInput},UIList:function(){return f.UIList},UIMessages:function(){return y.UIMessages},UISelect:function(){return f.UISelect},UISeparator:function(){return f.UISeparator},UISpacer:function(){return f.UISpacer},UITextArea:function(){return f.UITextArea},UITooltip:function(){return f.UITooltip},Uploader:function(){return T.Uploader},View:function(){return m.View},ViewComponent:function(){return o.ViewComponent},ViewWithToolbar:function(){return g.ViewWithToolbar},canUseIndexedDB:function(){return k.canUseIndexedDB},canUsePersistentStorage:function(){return k.canUsePersistentStorage},clearUseIndexedDBCache:function(){return k.clearUseIndexedDBCache},defaultNameSpace:function(){return h.defaultNameSpace},observable:function(){return h.observable}});var o=i(16964),n=i(65946),s=i(67399),r=i(37333),a=i(17610),l=i(91231),c=i(79821),u=i(27795),h=i(1496),d=i(91206),p=i(73714),f=i(4099),m=i(35099),g=i(2222),_=i(53855),v=i(46363),b=i(43271),y=i(10081),w=i(29433),S=i(98803),C=i(39709),E=i(42573),I=i(6209),T=i(94925),x=i(85305),D=i(59841),k=i(25222)},61466:function(t,e,i){"use strict";i.d(e,{UIMessage:function(){return r}});var o=i(31635),n=i(91672),s=i(4099);class r extends s.UIElement{className(){return"UIMessage"}constructor(t,e){super(t),this.setMod("active",!0),this.setMod("variant",e.variant),this.container.textContent=e.text}}r=(0,o.__decorate)([n.component],r)},10081:function(t,e,i){"use strict";i.d(e,{UIMessages:function(){return c}});var o=i(25045),n=i(31635),s=i(91672),r=i(80991),a=i(63468),l=i(61466);class c extends a.UIGroup{className(){return"UIMessages"}info(t,e){this.__message(t,"info",e)}success(t,e){this.__message(t,"success",e)}error(t,e){this.__message(t,"error",e)}message(t,e,i){this.__message(t,e,i)}__message(t,e="info",i){let o=t+":"+e;if(this.__messages.has(o))return void this.async.updateTimeout(o,i||this.options.defaultTimeout);if(!this.__box)throw Error("Container is not defined: "+o);this.__box.appendChild(this.container);let n=new l.UIMessage(this.j,{text:t,variant:e});this.append(n),this.__calcOffsets(),this.__messages.add(o);let s=this.__getRemoveCallback(n,o);this.j.e.on(n.container,"pointerdown",s),this.async.setTimeout(s,{label:o,timeout:i||this.options.defaultTimeout})}__getRemoveCallback(t,e){let i=o=>{o&&o.preventDefault(),t.isInDestruct||(this.async.clearTimeout(e),this.j.e.off(t.container,"pointerdown",i),this.__messages.delete(e),t.setMod("active",!1),this.async.setTimeout(()=>{this.remove(t),t.destruct(),this.__calcOffsets()},300))};return i}__calcOffsets(){let t=5;this.elements.forEach(e=>{(0,r.css)(e.container,"bottom",t+"px"),t+=e.container.offsetHeight+this.options.defaultOffset})}constructor(t,e,i={defaultTimeout:3e3,defaultOffset:5}){super(t),(0,o._)(this,"__box",void 0),(0,o._)(this,"options",void 0),(0,o._)(this,"__messages",void 0),this.__box=e,this.options=i,this.__messages=new Set}}c=(0,n.__decorate)([s.component],c)},29433:function(t,e,i){"use strict";i.d(e,{StatusBar:function(){return u}});var o=i(25045),n=i(31635),s=i(16964),r=i(84839),a=i(23211),l=i(23183),c=i(81987);class u extends s.ViewComponent{className(){return"StatusBar"}hide(){this.container.classList.add("jodit_hidden")}show(){this.container.classList.remove("jodit_hidden")}get isShown(){return!this.container.classList.contains("jodit_hidden")}getHeight(){return this.container?.offsetHeight??0}findEmpty(t=!1){let e=this.getElms(t?"item-right":"item");for(let t=0;t<e.length;t+=1)if(!e[t].innerHTML.trim().length)return e[t]}append(t,e=!1){let i=this.findEmpty(e)||this.j.c.div(this.getFullElName("item"));e&&i.classList.add(this.getFullElName("item-right")),i.appendChild(t),this.container?.appendChild(i),this.j.o.statusbar&&this.show(),this.j.e.fire("resize")}destruct(){this.isInDestruct||(this.setStatus(s.STATUSES.beforeDestruct),a.Dom.safeRemove(this.container),super.destruct())}constructor(t,e){super(t),(0,o._)(this,"target",void 0),(0,o._)(this,"container",void 0),(0,o._)(this,"mods",void 0),this.target=e,this.mods={},this.container=t.c.div("jodit-status-bar"),e.appendChild(this.container),this.hide()}}u=(0,n.__decorate)([r.component,(0,r.derive)(c.Mods,l.Elms)],u)},98803:function(t,e,i){"use strict";i.d(e,{Table:function(){return d}});var o=i(25045),n=i(31635),s=i(16964),r=i(81937),a=i(84839),l=i(27795),c=i(28077),u=i(65946);let h=new WeakMap;class d extends s.ViewComponent{className(){return"Table"}__recalculateStyles(){let t=(0,c.getContainer)(this.j,d,"style",!0),e=[];this.selected.forEach(t=>{let i=(0,u.cssPath)(t);i&&e.push(i)}),t.innerHTML=e.length?e.join(",")+`{${this.jodit.options.table.selectionCellStyle}}`:""}addSelection(t){this.selected.add(t),this.__recalculateStyles();let e=l.Dom.closest(t,"table",this.j.editor);if(e){let i=d.__selectedByTable.get(e)||new Set;i.add(t),d.__selectedByTable.set(e,i)}}removeSelection(t){this.selected.delete(t),this.__recalculateStyles();let e=l.Dom.closest(t,"table",this.j.editor);if(e){let i=d.__selectedByTable.get(e);i&&(i.delete(t),i.size||d.__selectedByTable.delete(e))}}getAllSelectedCells(){return(0,u.toArray)(this.selected)}static __getSelectedCellsByTable(t){let e=d.__selectedByTable.get(t);return e?(0,u.toArray)(e):[]}destruct(){return this.selected.clear(),super.destruct()}static __getRowsCount(t){return t.rows.length}getRowsCount(t){return d.__getRowsCount(t)}static __getColumnsCount(t){return d.__formalMatrix(t).reduce((t,e)=>Math.max(t,e.length),0)}getColumnsCount(t){return d.__getColumnsCount(t)}static __formalMatrix(t,e){let i=[[]],o=(0,u.toArray)(t.rows),n=(t,o)=>{void 0===i[o]&&(i[o]=[]);let n=t.colSpan,s=t.rowSpan,r,a,l=0;for(;i[o][l];)l+=1;for(a=0;s>a;a+=1)for(r=0;r<n;r+=1){if(void 0===i[o+a]&&(i[o+a]=[]),e&&!1===e(t,o+a,l+r,n,s))return!1;i[o+a][l+r]=t}};for(let t=0;t<o.length;t+=1){let e=(0,u.toArray)(o[t].cells);for(let o=0;o<e.length;o+=1)if(!1===n(e[o],t))return i}return i}formalMatrix(t,e){return d.__formalMatrix(t,e)}static __formalCoordinate(t,e,i=!1){let o=0,n=0,s=1,r=1;return d.__formalMatrix(t,(t,a,l,c,u)=>{if(e===t)return o=a,n=l,s=c||1,r=u||1,i&&(n+=(c||1)-1,o+=(u||1)-1),!1}),[o,n,s,r]}formalCoordinate(t,e,i=!1){return d.__formalCoordinate(t,e,i)}static __appendRow(t,e,i,o){let n;if(e)n=e.cloneNode(!0),(0,u.$$)("td,th",e).forEach(t=>{let e=(0,u.attr)(t,"rowspan");if(e&&parseInt(e,10)>1){let i=parseInt(e,10)-1;(0,u.attr)(t,"rowspan",i>1?i:null)}}),(0,u.$$)("td,th",n).forEach(t=>{t.innerHTML=""});else{let e=d.__getColumnsCount(t);n=o.element("tr");for(let t=0;t<e;t+=1)n.appendChild(o.element("td"))}i&&e&&e.nextSibling?e.parentNode&&e.parentNode.insertBefore(n,e.nextSibling):!i&&e?e.parentNode&&e.parentNode.insertBefore(n,e):(t.getElementsByTagName("tbody")?.[0]||t).appendChild(n)}appendRow(t,e,i){return d.__appendRow(t,e,i,this.j.createInside)}static __removeRow(t,e){let i,o=d.__formalMatrix(t),n=t.rows[e];o[e].forEach((s,r)=>{if(i=!1,e-1>=0&&o[e-1][r]===s)i=!0;else if(o[e+1]&&o[e+1][r]===s){if(s.parentNode===n&&s.parentNode.nextSibling){i=!0;let n=r+1;for(;o[e+1][n]===s;)n+=1;let a=l.Dom.next(s.parentNode,t=>l.Dom.isTag(t,"tr"),t);a&&(o[e+1][n]?a.insertBefore(s,o[e+1][n]):a.appendChild(s))}}else l.Dom.safeRemove(s);if(i&&(s.parentNode===n||s!==o[e][r-1])){let t=s.rowSpan;(0,u.attr)(s,"rowspan",t-1>1?t-1:null)}}),l.Dom.safeRemove(n)}removeRow(t,e){return d.__removeRow(t,e)}appendColumn(t,e,i=!0){let o=d.__formalMatrix(t);if(!i&&l.Dom.isCell(e.previousElementSibling))return this.appendColumn(t,e.previousElementSibling,!0);let[,n]=d.__formalCoordinate(t,e,i),s=i?n+1:n;for(let t=0;t<o.length;){let e=o[t];if(e[n]!==e[s]||n===s){let t=this.j.createInside.element("td");i?l.Dom.after(e[n],t):l.Dom.before(e[n],t),e[n].rowSpan>1&&(t.rowSpan=e[n].rowSpan)}else e[n].colSpan+=1;t+=e[n].rowSpan||1}}static __removeColumn(t,e){let i,o=d.__formalMatrix(t);o.forEach((t,n)=>{let s=t[e];if(i=!1,e-1>=0&&o[n][e-1]===s||e+1<t.length&&o[n][e+1]===s?i=!0:l.Dom.safeRemove(s),i&&(n-1<0||s!==o[n-1][e])){let t=s.colSpan;(0,u.attr)(s,"colspan",t-1>1?(t-1).toString():null)}})}removeColumn(t,e){return d.__removeColumn(t,e)}static __getSelectedBound(t,e){let i,o,n,s=[[1/0,1/0],[0,0]],r=d.__formalMatrix(t);for(i=0;i<r.length;i+=1)for(o=0;r[i]&&o<r[i].length;o+=1)e.includes(r[i][o])&&(s[0][0]=Math.min(i,s[0][0]),s[0][1]=Math.min(o,s[0][1]),s[1][0]=Math.max(i,s[1][0]),s[1][1]=Math.max(o,s[1][1]));for(i=s[0][0];i<=s[1][0];i+=1)for(n=1,o=s[0][1];o<=s[1][1];o+=1){for(;r[i]&&r[i][o-n]&&r[i][o]===r[i][o-n];)s[0][1]=Math.min(o-n,s[0][1]),s[1][1]=Math.max(o-n,s[1][1]),n+=1;for(n=1;r[i]&&r[i][o+n]&&r[i][o]===r[i][o+n];)s[0][1]=Math.min(o+n,s[0][1]),s[1][1]=Math.max(o+n,s[1][1]),n+=1;for(n=1;r[i-n]&&r[i][o]===r[i-n][o];)s[0][0]=Math.min(i-n,s[0][0]),s[1][0]=Math.max(i-n,s[1][0]),n+=1;for(n=1;r[i+n]&&r[i][o]===r[i+n][o];)s[0][0]=Math.min(i+n,s[0][0]),s[1][0]=Math.max(i+n,s[1][0]),n+=1}return s}getSelectedBound(t,e){return d.__getSelectedBound(t,e)}static __normalizeTable(t){let e=[],i=d.__formalMatrix(t);d.__removeExtraColspans(i,e),d.__removeExtraRowspans(i,e);for(let t=0;t<i.length;t+=1)for(let e=0;e<i[t].length;e+=1)void 0!==i[t][e]&&(i[t][e].hasAttribute("rowspan")&&1===i[t][e].rowSpan&&(0,u.attr)(i[t][e],"rowspan",null),i[t][e].hasAttribute("colspan")&&1===i[t][e].colSpan&&(0,u.attr)(i[t][e],"colspan",null),i[t][e].hasAttribute("class")&&!(0,u.attr)(i[t][e],"class")&&(0,u.attr)(i[t][e],"class",null));d.__unmark(e)}static __removeExtraColspans(t,e){for(let i=0;i<t[0].length;i+=1){let o=1e6,n=!1;for(let e=0;e<t.length;e+=1)if(void 0!==t[e][i]){if(t[e][i].colSpan<2){n=!0;break}o=Math.min(o,t[e][i].colSpan)}if(!n)for(let n=0;n<t.length;n+=1)void 0!==t[n][i]&&d.__mark(t[n][i],"colspan",t[n][i].colSpan-o+1,e)}}static __removeExtraRowspans(t,e){let i=0,o=0;for(i=0;i<t.length;i+=1){let n=1e6,s=!1;for(o=0;o<t[i].length;o+=1)if(void 0!==t[i][o]){if(t[i][o].rowSpan<2){s=!0;break}n=Math.min(n,t[i][o].rowSpan)}if(!s)for(o=0;o<t[i].length;o+=1)void 0!==t[i][o]&&d.__mark(t[i][o],"rowspan",t[i][o].rowSpan-n+1,e)}}normalizeTable(t){return d.__normalizeTable(t)}static __mergeSelected(t,e){let i=[],o=d.__getSelectedBound(t,d.__getSelectedCellsByTable(t)),n=0,s=null,a=0,c=0,h=0,f=new Set,m=[];o&&(o[0][0]-o[1][0]||o[0][1]-o[1][1])&&(d.__formalMatrix(t,(t,r,l,g,_)=>{r>=o[0][0]&&r<=o[1][0]&&l>=o[0][1]&&l<=o[1][1]&&(f.has(t)||(f.add(t),r===o[0][0]&&t.style.width&&(n+=t.offsetWidth),""!==(0,u.trim)(t.innerHTML.replace(/<br(\/)?>/g,""))&&i.push(t.innerHTML),g>1&&(c+=g-1),_>1&&(h+=_-1),s?(d.__mark(t,"remove",1,m),p(e).removeSelection(t)):(s=t,a=l)))}),c=o[1][1]-o[0][1]+1,h=o[1][0]-o[0][0]+1,s&&(c>1&&d.__mark(s,"colspan",c,m),h>1&&d.__mark(s,"rowspan",h,m),n&&(d.__mark(s,"width",(n/t.offsetWidth*100).toFixed(r.ACCURACY)+"%",m),a&&d.__setColumnWidthByDelta(t,a,0,!0,m)),s.innerHTML=i.join("<br/>"),p(e).addSelection(s),f.delete(s),d.__unmark(m),d.__normalizeTable(t),(0,u.toArray)(t.rows).forEach(t=>{t.cells.length||l.Dom.safeRemove(t)})))}mergeSelected(t){return d.__mergeSelected(t,this.j)}static __splitHorizontal(t,e){let i,o,n,s,r,a=[];d.__getSelectedCellsByTable(t).forEach(c=>{(o=e.createInside.element("td")).appendChild(e.createInside.element("br")),n=e.createInside.element("tr"),i=d.__formalCoordinate(t,c),c.rowSpan<2?(d.__formalMatrix(t,(t,e,o)=>{i[0]===e&&i[1]!==o&&t!==c&&d.__mark(t,"rowspan",t.rowSpan+1,a)}),l.Dom.after(l.Dom.closest(c,"tr",t),n),n.appendChild(o)):(d.__mark(c,"rowspan",c.rowSpan-1,a),d.__formalMatrix(t,(e,o,n)=>{o>i[0]&&o<i[0]+c.rowSpan&&i[1]>n&&e.parentNode.rowIndex===o&&(r=e),i[0]<o&&e===c&&(s=t.rows[o])}),r?l.Dom.after(r,o):s.insertBefore(o,s.firstChild)),c.colSpan>1&&d.__mark(o,"colspan",c.colSpan,a),d.__unmark(a),p(e).removeSelection(c)}),this.__normalizeTable(t)}splitHorizontal(t){return d.__splitHorizontal(t,this.j)}static __splitVertical(t,e){let i,o,n,s=[];d.__getSelectedCellsByTable(t).forEach(a=>{i=d.__formalCoordinate(t,a),a.colSpan<2?d.__formalMatrix(t,(t,e,o)=>{i[1]===o&&i[0]!==e&&t!==a&&d.__mark(t,"colspan",t.colSpan+1,s)}):d.__mark(a,"colspan",a.colSpan-1,s),(o=e.createInside.element("td")).appendChild(e.createInside.element("br")),a.rowSpan>1&&d.__mark(o,"rowspan",a.rowSpan,s);let c=a.offsetWidth;l.Dom.after(a,o),n=c/t.offsetWidth/2,d.__mark(a,"width",(100*n).toFixed(r.ACCURACY)+"%",s),d.__mark(o,"width",(100*n).toFixed(r.ACCURACY)+"%",s),d.__unmark(s),p(e).removeSelection(a)}),d.__normalizeTable(t)}splitVertical(t){return d.__splitVertical(t,this.j)}static __setColumnWidthByDelta(t,e,i,o,n){let s=d.__formalMatrix(t),a=0;for(let o=0;o<s.length;o+=1){let l=s[o][e];if(l.colSpan>1&&s.length>1)continue;let c=(l.offsetWidth+i)/t.offsetWidth*100;d.__mark(l,"width",c.toFixed(r.ACCURACY)+"%",n),a=o;break}for(let t=a+1;t<s.length;t+=1){let i=s[t][e];d.__mark(i,"width",null,n)}o||d.__unmark(n)}setColumnWidthByDelta(t,e,i,o,n){return d.__setColumnWidthByDelta(t,e,i,o,n)}static __mark(t,e,i,o){o.push(t);let n=h.get(t)??{};n[e]=void 0===i?1:i,h.set(t,n)}static __unmark(t){t.forEach(t=>{let e=h.get(t);e&&(Object.keys(e).forEach(i=>{let o=e[i];switch(i){case"remove":l.Dom.safeRemove(t);break;case"rowspan":(0,u.attr)(t,"rowspan",(0,u.isNumber)(o)&&o>1?o:null);break;case"colspan":(0,u.attr)(t,"colspan",(0,u.isNumber)(o)&&o>1?o:null);break;case"width":null==o?(t.style.removeProperty("width"),(0,u.attr)(t,"style")||(0,u.attr)(t,"style",null)):t.style.width=o.toString()}delete e[i]}),h.delete(t))})}constructor(...t){super(...t),(0,o._)(this,"selected",new Set)}}(0,o._)(d,"__selectedByTable",new WeakMap),(0,n.__decorate)([(0,a.debounce)()],d.prototype,"__recalculateStyles",null);let p=t=>t.getInstance("Table",t.o)},22533:function(t,e,i){"use strict";i.d(e,{ToolbarButton:function(){return T}});var o=i(25045),n=i(31635),s=i(69364),r=i(49574),a=i(51676),l=i(91672),c=i(68616),u=i(23211),h=i(17312),d=i(91565),p=i(24497),f=i(62101),m=i(85932),g=i(86878),_=i(57821),v=i(28712),b=i(7909),y=i(71125),w=i(59400),S=i(15982),C=i(29434),E=i(51116),I=i(4274);class T extends w.UIButton{className(){return"ToolbarButton"}getRole(){return"listitem"}updateAriaLabel(){if(super.updateAriaLabel(),this.trigger){let t=this.state.tooltip?this.jodit.i18n(this.state.tooltip):null;(0,b.attr)(this.trigger,"aria-label",t)}}get toolbar(){let t=(0,l.getComponentClass)("ToolbarCollection");return this.closest(t)}update(){let{control:t,state:e}=this,i=this.toolbar;if(!i)return;let o=t.value?.(i.jodit,this);void 0!==o&&(e.value=o),e.disabled=this.__calculateDisabledStatus(i),e.activated=this.__calculateActivatedStatus(i),t.update?.(i.jodit,this)}__calculateActivatedStatus(t){return(!(0,p.isJoditObject)(this.j)||!!this.j.editorIsActive)&&(!!this.control.isActive?.(this.j,this)||!!(t&&t.shouldBeActive(this)))}__calculateDisabledStatus(t){return!!(this.j.o.disabled||this.j.o.readonly&&(!this.j.o.activeButtonsInReadOnly||!this.j.o.activeButtonsInReadOnly.includes(this.control.name))||this.control.isDisabled?.(this.j,this))||!!(t&&t.shouldBeDisabled(this))}onChangeActivated(){(0,b.attr)(this.button,"aria-pressed",this.state.activated),super.onChangeActivated()}onChangeText(){(0,d.isFunction)(this.control.template)?this.text.innerHTML=this.control.template(this.j,this.control.name,this.j.i18n(this.state.text)):super.onChangeText(),this.setMod("text-icons",!!this.text.innerText.trim().length)}onChangeTabIndex(){(0,b.attr)(this.button,"tabindex",this.state.tabIndex)}createContainer(){let t=this.componentName,e=this.j.c.span(t),i=super.createContainer();i.classList.remove(t),i.classList.add(t+"__button"),Object.defineProperty(i,"component",{value:this}),e.appendChild(i);let o=this.j.c.fromHTML(`<span role="button" aria-haspopup="true" aria-expanded="false" class="${t}__trigger">${C.Icon.get("chevron")}</span>`);return i.appendChild(o),e}focus(){this.container.querySelector("button")?.focus()}onChangeHasTrigger(){this.state.hasTrigger?this.container.appendChild(this.trigger):u.Dom.safeRemove(this.trigger),this.setMod("with-trigger",this.state.hasTrigger||null)}onChangeDisabled(){let t=this.state.disabled?"disabled":null;(0,b.attr)(this.trigger,"disabled",t),(0,b.attr)(this.button,"disabled",t),(0,b.attr)(this.container,"disabled",t)}__initFromControl(){let{control:t,state:e}=this;this.updateSize(),e.name=t.name,this.__initIconFromControl(),t.tooltip&&(e.tooltip=(0,d.isFunction)(t.tooltip)?t.tooltip(this.j,t,this):t.tooltip),e.hasTrigger=!!(t.list||t.popup&&t.exec)}__initIconFromControl(){let{control:t,state:e}=this,{textIcons:i}=this.j.o;if(!0===i||(0,d.isFunction)(i)&&i(t.name)||t.template){e.icon=(0,w.UIButtonState)().icon,e.text=t.text||t.name;return}if(!(0,m.isString)(t.icon)&&null!=t.icon){e.icon={name:t.icon.name||t.name,iconURL:t.icon.iconURL||"",fill:t.icon.fill||"",scale:t.icon.scale};return}if(t.iconURL)e.icon.iconURL=t.iconURL;else{let i=t.icon||t.name;e.icon.name=C.Icon.exists(i)||this.j.o.extraIcons?.[i]?i:""}t.iconURL||e.icon.name||(e.text=t.text||t.name)}onTriggerClick(t){if(this.openedPopup)return void this.__closePopup();let{control:e}=this;if((0,b.attr)(this.trigger,"aria-expanded",!0),t.buffer={actionTrigger:this},e.list)return this.__openControlList(e);if((0,d.isFunction)(e.popup)){let t=this.openPopup();t.parentElement=this;try{if(!1!==this.j.e.fire((0,_.camelCase)(`before-${e.name}-open-popup`),this.target,e,t)){let i=this.toolbar?.getTarget(this)??this.target??null,o=e.popup(this.j,i,this.__closePopup,this);o?t.setContent((0,m.isString)(o)?this.j.c.fromHTML(o):o).open(()=>(0,g.position)(this.container),!1,this.j.o.allowTabNavigation?this.container:void 0):this.__closePopup()}}catch(t){throw this.__closePopup(),t}this.j.e.fire((0,_.camelCase)(`after-${e.name}-open-popup`),t.container)}}__openControlList(t){let e=this.jodit.options.controls??{},i=t=>(0,S.findControlType)(t,e),o=t.list,n=this.openPopup(),s=(0,I.makeCollection)(this.j);n.parentElement=this,s.parentElement=n,s.mode="vertical";let r=(e,o)=>{let n;if((0,m.isString)(o)&&i(o))return{name:o.toString(),...i(o)};if((0,m.isString)(e)&&i(e))return{name:e.toString(),...i(e),..."object"==typeof o?o:{}};n=e,(0,f.isPlainObject)(n)&&"title"in n&&"value"in n&&(o=e.value,e=e.title);let{childTemplate:s}=t,r={name:e.toString(),template:s&&((t,e,i)=>s(t,e,i,this)),exec:t.childExec?(e,i,o)=>t.childExec?.(e,i,{...o,parentControl:t}):t.exec,data:t.data,command:t.command,isActive:t.isChildActive,value:t.value,isDisabled:t.isChildDisabled,mode:t.mode,args:[...t.args?t.args:[],e,o]};return(0,m.isString)(o)&&(r.text=o),r};s.build((0,h.isArray)(o)?o.map(r):(0,y.keys)(o,!1).map(t=>r(t,o[t])),this.target),n.setContent(s).open(()=>(0,g.position)(this.container),!1,this.j.o.allowTabNavigation?this.container:void 0),this.state.activated=!0}onOutsideClick(t){this.openedPopup&&(t&&u.Dom.isNode(t.target)&&(u.Dom.isOrContains(this.container,t.target)||this.openedPopup.isOwnClick(t))||this.__closePopup())}openPopup(){return this.__closePopup(),this.openedPopup=new E.Popup(this.j,!1),this.j.e.on(this.ow,"mousedown touchstart",this.onOutsideClick).on("escape closeAllPopups",this.onOutsideClick),this.openedPopup}__closePopup(){this.openedPopup&&(this.j.e.off(this.ow,"mousedown touchstart",this.onOutsideClick).off("escape closeAllPopups",this.onOutsideClick),this.state.activated=!1,this.openedPopup.close(),this.openedPopup.destruct(),this.openedPopup=null,this.trigger&&(0,b.attr)(this.trigger,"aria-expanded",!1))}onClick(t){let{control:e}=this;if((0,d.isFunction)(e.exec)){let i=this.toolbar?.getTarget(this)??this.target??null,o=e.exec(this.j,i,{control:e,originalEvent:t,button:this});if(!1!==o&&!0!==o&&(this.j?.e?.fire("synchro"),this.parentElement&&this.parentElement.update(),this.j?.e?.fire("closeAllPopups afterExec")),!1!==o)return}return e.list?this.__openControlList(e):(0,d.isFunction)(e.popup)?this.onTriggerClick(t):void((e.command||e.name)&&((0,y.call)((0,p.isJoditObject)(this.j)?this.j.execCommand.bind(this.j):this.j.od.execCommand.bind(this.j.od),e.command||e.name,!1,e.args&&e.args[0]),this.j.e.fire("closeAllPopups")))}destruct(){return this.__closePopup(),super.destruct()}constructor(t,e,i=null){super(t),(0,o._)(this,"control",void 0),(0,o._)(this,"target",void 0),(0,o._)(this,"state",void 0),(0,o._)(this,"trigger",void 0),(0,o._)(this,"openedPopup",void 0),this.control=e,this.target=i,this.state={...(0,w.UIButtonState)(),theme:"toolbar",currentValue:"",hasTrigger:!1},this.openedPopup=null;const n=this.getElm("button");(0,v.assert)(n,"Element button should exists"),this.button=n,Object.defineProperty(n,"component",{value:this,configurable:!0});const r=this.getElm("trigger");(0,v.assert)(r,"Element trigger should exists"),this.trigger=r,r.remove(),t.e.on([this.button,this.trigger],"mousedown",t=>t.preventDefault()),this.onAction(this.onClick),this.hookStatus(s.STATUSES.ready,()=>{this.__initFromControl(),this.update()}),e.mods&&Object.keys(e.mods).forEach(t=>{e.mods&&this.setMod(t,e.mods[t])})}}(0,n.__decorate)([a.cacheHTML],T.prototype,"createContainer",null),(0,n.__decorate)([(0,c.watch)("state.hasTrigger",{immediately:!1})],T.prototype,"onChangeHasTrigger",null),(0,n.__decorate)([(0,c.watch)("trigger:click")],T.prototype,"onTriggerClick",null),(0,n.__decorate)([r.autobind],T.prototype,"onOutsideClick",null),(0,n.__decorate)([r.autobind],T.prototype,"__closePopup",null),T=(0,n.__decorate)([l.component],T)},5772:function(t,e,i){"use strict";i.d(e,{ToolbarContent:function(){return c}});var o=i(25045),n=i(31635),s=i(84839),r=i(27795),a=i(65946),l=i(59400);class c extends l.UIButton{className(){return"ToolbarContent"}update(){let t=this.control.getContent(this.j,this);((0,a.isString)(t)||t.parentNode!==this.container)&&(r.Dom.detach(this.container),this.container.appendChild((0,a.isString)(t)?this.j.create.fromHTML(t):t)),super.update()}createContainer(){return this.j.c.span(this.componentName)}constructor(t,e,i=null){super(t),(0,o._)(this,"control",void 0),(0,o._)(this,"target",void 0),this.control=e,this.target=i,this.container.classList.add(`${this.componentName}_${this.clearName(e.name)}`),(0,a.attr)(this.container,"role","content")}}c=(0,n.__decorate)([s.component],c)},39709:function(t,e,i){"use strict";i.d(e,{ToolbarButton:function(){return o.ToolbarButton},ToolbarContent:function(){return n.ToolbarContent},ToolbarSelect:function(){return s.ToolbarSelect}});var o=i(22533),n=i(5772),s=i(61764)},61764:function(t,e,i){"use strict";i.d(e,{ToolbarSelect:function(){return l}});var o=i(31635),n=i(84839),s=i(62101),r=i(85932),a=i(22533);class l extends a.ToolbarButton{className(){return"ToolbarSelect"}update(){super.update(),this.state.icon.name="";let{list:t,data:e}=this.control;if(t){let i=this.state.value||(e&&(0,r.isString)(e.currentValue)?e.currentValue:void 0);i||(i=Object.keys(t)[0]);let o=((0,s.isPlainObject)(t)&&t[i.toString()]||i).toString();this.state.text=this.control.textTemplate?.(this.jodit,o)??o}}}l=(0,o.__decorate)([n.component],l)},42573:function(t,e,i){"use strict";i.d(e,{ToolbarCollection:function(){return p}});var o=i(25045),n=i(31635),s=i(84839),r=i(49574),a=i(91672),l=i(29200),c=i(68616),u=i(38027),h=i(97959),d=i(4274);class p extends h.UIList{className(){return"ToolbarCollection"}getRole(){return"toolbar"}get firstButton(){let[t]=this.buttons;return t||null}makeButton(t,e=null){return(0,d.makeButton)(this.j,t,e)}makeSelect(t,e=null){return(0,d.makeSelect)(this.j,t,e)}shouldBeActive(t){}shouldBeDisabled(t){}getTarget(t){return t.target||null}__immediateUpdate(){this.isDestructed||this.j.isLocked||(super.update(),this.j.e.fire("afterUpdateToolbar",this))}update(){this.__immediateUpdate()}setDirection(t){this.container.style.direction=t,this.container.setAttribute("dir",t)}__initEvents(){this.j.e.on(this.__listenEvents,this.update).on("afterSetMode focus",this.__immediateUpdate)}hide(){this.container.remove()}show(){this.appendTo(this.j.toolbarContainer)}showInline(t){throw(0,u.error)("The method is not implemented for this class.")}build(t,e=null){let i=this.j.e.fire("beforeToolbarBuild",t);return i&&(t=i),super.build(t,e),this}destruct(){this.isDestructed||(this.j.e.off(this.__listenEvents,this.update).off("afterSetMode focus",this.__immediateUpdate),super.destruct())}constructor(t){super(t),(0,o._)(this,"__listenEvents","updatePlugins updateToolbar changeStack mousedown mouseup keydown change readonly afterResize selectionchange changeSelection focus afterSetMode touchstart focus blur")}}(0,n.__decorate)([(0,c.watch)(":afterInit"),r.autobind],p.prototype,"__immediateUpdate",null),(0,n.__decorate)([(0,s.debounce)(t=>t.j.defaultTimeout,!0)],p.prototype,"update",null),(0,n.__decorate)([(0,l.hook)("ready")],p.prototype,"__initEvents",null),p=(0,n.__decorate)([a.component],p)},6209:function(t,e,i){"use strict";i.d(e,{ToolbarEditorCollection:function(){return u}});var o=i(25045),n=i(31635),s=i(81937),r=i(84839),a=i(27795),l=i(65946),c=i(42573);class u extends c.ToolbarCollection{className(){return"ToolbarEditorCollection"}shouldBeDisabled(t){let e=super.shouldBeDisabled(t);if(void 0!==e)return e;let i=void 0===t.control.mode?s.MODE_WYSIWYG:t.control.mode;return i!==s.MODE_SPLIT&&i!==this.j.getRealMode()}shouldBeActive(t){let e,i=super.shouldBeActive(t);if(void 0!==i)return i;let o=this.j.selection?this.j.s.current():null;if(!o)return!1;if(t.control.tags){let i=t.control.tags;if(e=o,a.Dom.up(e,t=>{if(t&&-1!==i.indexOf(t.nodeName.toLowerCase()))return!0},this.j.editor))return!0}if(t.control.css){let i=t.control.css;if(e=o,a.Dom.up(e,t=>{if(t&&!a.Dom.isText(t)&&!a.Dom.isComment(t))return this.checkActiveStatus(i,t)},this.j.editor))return!0}return!1}getTarget(t){return t.target||this.j.s.current()||null}prependInvisibleInput(t){let e=this.j.create.element("input",{name:"jodit-toolbar-focus-helper_"+this.j.id,tabIndex:-1,disabled:!0,style:"width: 0; height:0; position: absolute; visibility: hidden;"});a.Dom.appendChildFirst(t,e)}showInline(t){this.jodit.e.fire("showInlineToolbar",t)}hide(){this.jodit.e.fire("hidePopup"),super.hide(),this.jodit.e.fire("toggleToolbar")}show(){super.show(),this.jodit.e.fire("toggleToolbar")}constructor(t){super(t),(0,o._)(this,"checkActiveStatus",(t,e)=>{let i=0,o=0;return Object.keys(t).forEach(n=>{let s=t[n];(0,l.isFunction)(s)?s(this.j,(0,l.css)(e,n).toString())&&(i+=1):-1!==s.indexOf((0,l.css)(e,n).toString())&&(i+=1),o+=1}),o===i}),this.prependInvisibleInput(this.container)}}u=(0,n.__decorate)([r.component],u)},4274:function(t,e,i){"use strict";i.d(e,{makeButton:function(){return a},makeCollection:function(){return r},makeSelect:function(){return l}});var o=i(91672),n=i(91565),s=i(24497);function r(t,e){let i=(0,o.getComponentClass)("ToolbarCollection"),n=(0,o.getComponentClass)("ToolbarEditorCollection"),r=(0,s.isJoditObject)(t)?new n(t):new i(t);return t.o.textIcons&&r.container.classList.add("jodit_text_icons"),e&&(r.parentElement=e),t.o.toolbarButtonSize&&(r.buttonSize=t.o.toolbarButtonSize),r}function a(t,e,i=null){if((0,n.isFunction)(e.getContent))return new((0,o.getComponentClass)("ToolbarContent"))(t,e,i);let s=new((0,o.getComponentClass)("ToolbarButton"))(t,e,i);return s.state.tabIndex=t.o.allowTabNavigation?0:-1,s}function l(t,e,i=null){return new((0,o.getComponentClass)("ToolbarSelect"))(t,e,i)}},40013:function(t,e,i){"use strict";var o=i(17312),n=i(24497),s=i(5266);s.Config.prototype.enableDragAndDropFileToEditor=!0,s.Config.prototype.uploader={url:"",insertImageAsBase64URI:!1,imagesExtensions:["jpg","png","jpeg","gif"],headers:null,data:null,filesVariableName:t=>`files[${t}]`,withCredentials:!1,pathVariableName:"path",format:"json",method:"POST",prepareData:t=>t,isSuccess:t=>t.success,getMessage:t=>void 0!==t.data.messages&&(0,o.isArray)(t.data.messages)?t.data.messages.join(" "):"",processFileName:(t,e,i)=>[t,e,i],process:t=>t.data,error(t){this.j.message.error(t.message,4e3)},getDisplayName:(t,e)=>t+e,defaultHandlerSuccess(t){let e=this.j||this;(0,n.isJoditObject)(e)&&t.files&&t.files.length&&t.files.forEach((i,o)=>{let[n,s]=t.isImages&&t.isImages[o]?["img","src"]:["a","href"],r=e.createInside.element(n);r.setAttribute(s,t.baseurl+i),"a"===n&&(r.textContent=e.o.uploader.getDisplayName.call(this,t.baseurl,i)),"img"===n?e.s.insertImage(r,null,e.o.imageDefaultWidth):e.s.insertNode(r)})},defaultHandlerError(t){this.j.message.error(t.message)},contentType(t){return(void 0===this.ow.FormData||"string"==typeof t)&&"application/x-www-form-urlencoded; charset=UTF-8"}}},89446:function(t,e,i){"use strict";i.d(e,{buildData:function(){return n}});var o=i(65946);function n(t,e){if((0,o.isFunction)(t.o.buildData))return t.o.buildData.call(t,e);let i=t.ow.FormData;if(void 0!==i){if(e instanceof i||(0,o.isString)(e))return e;let t=new i;return Object.keys(e).forEach(i=>{t.append(i,e[i])}),t}return e}},23112:function(t,e,i){"use strict";function o(t){let e=atob(t.split(",")[1]),i=t.split(",")[0].split(":")[1].split(";")[0],o=new Uint8Array(new ArrayBuffer(e.length));for(let t=0;t<e.length;t+=1)o[t]=e.charCodeAt(t);return new Blob([o.buffer],{type:i})}i.d(e,{dataURItoBlob:function(){return o}})},11981:function(t,e,i){"use strict";i.d(e,{ajaxInstances:function(){return n.ajaxInstances},hasFiles:function(){return r},hasItems:function(){return a},processOldBrowserDrag:function(){return o.processOldBrowserDrag},send:function(){return n.send},sendFiles:function(){return s.sendFiles}}),i(89446);var o=i(95436),n=i(77911),s=i(46533);function r(t){return!!(t&&t.files&&t.files.length>0)}function a(t){return!!(t&&t.items&&t.items.length>0)}},95436:function(t,e,i){"use strict";i.d(e,{processOldBrowserDrag:function(){return c}});var o=i(81937),n=i(27795),s=i(28077),r=i(65946),a=i(23112),l=i(46533);function c(t,e,i,c,u){if(e&&(!e.types.length||e.types[0]!==o.TEXT_PLAIN)){let e=t.j.c.div("",{tabindex:-1,style:"left: -9999px; top: 0; width: 0; height: 100%;line-height: 140%; overflow: hidden; position: fixed; z-index: 2147483647; word-break: break-all;",contenteditable:!0});(0,s.getContainer)(t.j,t.constructor).appendChild(e);let o=(0,r.isJoditObject)(t.j)?t.j.s.save():null;e.focus(),t.j.async.setTimeout(()=>{let s=e.firstChild;if(n.Dom.safeRemove(e),s&&s.hasAttribute("src")){let e=(0,r.attr)(s,"src")||"";o&&(0,r.isJoditObject)(t.j)&&t.j.s.restore(),(0,l.sendFiles)(t,[(0,a.dataURItoBlob)(e)],i,c).finally(u)}},t.j.defaultTimeout)}}},46533:function(t,e,i){"use strict";i.d(e,{sendFiles:function(){return s}});var o=i(65946),n=i(77911);function s(t,e,i,s,r){if(!e)return Promise.reject((0,o.error)("Need files"));let{o:a}=t,l=(0,o.toArray)(e);if(!l.length)return Promise.reject((0,o.error)("Need files"));let c=[];if(a.insertImageAsBase64URI&&function(t,e,i,n,s,r){let a,l;for(l=0;l<t.length;l+=1)if((a=t[l])&&a.type){let c=a.type.match(/\/([a-z0-9]+)/i),u=c[1]?c[1].toLowerCase():"";if(!e.includes(u))continue;let h=new FileReader;i.push(n.j.async.promise((t,e)=>{h.onerror=e,h.onloadend=()=>{let e={baseurl:"",files:[h.result],isImages:[!0]};((0,o.isFunction)(s)?s:r).call(n,e),t(e)},h.readAsDataURL(a)})),t[l]=null}}(l,a.imagesExtensions,c,t,i,a.defaultHandlerSuccess),(l=l.filter(t=>t)).length){let e,u=new FormData;u.append(a.pathVariableName,t.path),u.append("source",t.source);for(let i=0;i<l.length;i+=1)if(e=l[i]){let o=/\.\w+$/.test(e.name),n=e.type.match(/\/([a-z0-9]+)/i),s=n&&n[1]?n[1].toLowerCase():"",r=l[i].name||Math.random().toString().replace(".","");if(!o&&s){let t=s;["jpeg","jpg"].includes(t)&&(t="jpeg|jpg"),RegExp(".("+t+")$","i").test(r)||(r+="."+s)}let[c,h,d]=a.processFileName.call(t,a.filesVariableName(i),l[i],r);u.append(c,h,d)}r&&r(u),a.data&&(0,o.isPlainObject)(a.data)&&Object.keys(a.data).forEach(t=>{u.append(t,a.data[t])}),a.prepareData.call(t,u),c.push((0,n.send)(t,u).then(e=>(a.isSuccess.call(t,e)?((0,o.isFunction)(i)?i:a.defaultHandlerSuccess).call(t,a.process.call(t,e)):((0,o.isFunction)(s)?s:a.defaultHandlerError).call(t,(0,o.error)(a.getMessage.call(t,e))),e)).then(()=>{t.j.events&&t.j.e.fire("filesWereUploaded")}))}return Promise.all(c)}},77911:function(t,e,i){"use strict";i.d(e,{ajaxInstances:function(){return r},send:function(){return a}});var o=i(65946),n=i(73714),s=i(89446);let r=new WeakMap;function a(t,e){let i=(0,s.buildData)(t,e),a=e=>{t.j.progressbar.show().progress(e),e>=100&&t.j.progressbar.hide()},l=(e,i)=>{let s=new n.Ajax({xhr(){let e=new XMLHttpRequest;return void 0!==t.j.ow.FormData&&e.upload?(i(10),e.upload.addEventListener("progress",t=>{if(t.lengthComputable){let e=t.loaded/t.total;i(e*=100)}},!1)):i(100),e},method:t.o.method||"POST",data:e,url:(0,o.isFunction)(t.o.url)?t.o.url(e):t.o.url,headers:t.o.headers,queryBuild:t.o.queryBuild,contentType:t.o.contentType.call(t,e),withCredentials:t.o.withCredentials||!1}),a=r.get(t);return a||(a=new Set,r.set(t,a)),a.add(s),t.j.e.one("beforeDestruct",s.destruct),s.send().then(t=>t.json()).catch(t=>({success:!1,data:{messages:[t]}})).finally(()=>{s.destruct(),a?.delete(s)})};return((0,o.isFunction)(t.o.customUploadFunction)&&(l=t.o.customUploadFunction),(0,o.isPromise)(i))?i.then(t=>l(t,a)).catch(e=>{t.o.error.call(t,e)}):l(i,a)}},94925:function(t,e,i){"use strict";i.d(e,{Uploader:function(){return c}});var o=i(25045),n=i(16964),s=i(81937),r=i(65946),a=i(5266),l=i(11981);i(40013);class c extends n.ViewComponent{get j(){return this.jodit}className(){return"Uploader"}get o(){return this.options}setPath(t){return this.path=t,this}setSource(t){return this.source=t,this}bind(t,e,i){let o=()=>{t.classList.remove("jodit_drag_hover")},n=this,r=t=>{let r,a,c,u=t.clipboardData,h=t=>{a&&(t.append("extension",c),t.append("mimetype",a.type))};if(!s.IS_IE&&(0,l.hasFiles)(u))return(0,l.sendFiles)(n,u.files,e,i).finally(o),!1;if(s.IS_IE&&!s.IS_ES_NEXT)return(0,l.processOldBrowserDrag)(n,u,e,i,o);if((0,l.hasItems)(u)){let{items:s}=u;for(r=0;r<s.length;r+=1)if("file"===s[r].kind&&"image/png"===s[r].type){if(a=s[r].getAsFile()){let t=a.type.match(/\/([a-z0-9]+)/i);c=t[1]?t[1].toLowerCase():"",(0,l.sendFiles)(n,[a],e,i,h).finally(o)}t.preventDefault();break}}};n.j&&n.j.editor!==t?n.j.e.on(t,"paste",r):n.j.e.on("beforePaste",r),this.attachEvents(t,e,i,o)}attachEvents(t,e,i,o){let n=this;n.j.e.on(t,"dragend dragover dragenter dragleave drop",t=>{t.preventDefault()}).on(t,"dragover",e=>{((0,l.hasFiles)(e.dataTransfer)||(0,l.hasItems)(e.dataTransfer))&&(t.classList.add("jodit_drag_hover"),e.preventDefault())}).on(t,"dragend dragleave",e=>{t.classList.remove("jodit_drag_hover"),(0,l.hasFiles)(e.dataTransfer)&&e.preventDefault()}).on(t,"drop",s=>{t.classList.remove("jodit_drag_hover"),(0,l.hasFiles)(s.dataTransfer)&&(s.preventDefault(),s.stopImmediatePropagation(),(0,l.sendFiles)(n,s.dataTransfer.files,e,i).finally(o))});let s=t.querySelector("input[type=file]");s&&n.j.e.on(s,"change",()=>{(0,l.sendFiles)(n,s.files,e,i).then(()=>{s.value="",/safari/i.test(navigator.userAgent)||(s.type="",s.type="file")}).finally(o)})}uploadRemoteImage(t,e,i){let o=this,{o:n}=o,s=(0,r.isFunction)(i)?i:n.defaultHandlerError;(0,l.send)(o,{action:"fileUploadRemote",url:t}).then(t=>{n.isSuccess.call(o,t)?((0,r.isFunction)(e)?e:n.defaultHandlerSuccess).call(o,n.process.call(o,t)):s.call(o,(0,r.error)(n.getMessage.call(o,t)))}).catch(t=>s.call(o,t))}upload(t){return this.async.promise((e,i)=>{(0,l.sendFiles)(this,t,e,i)})}destruct(){this.setStatus(n.STATUSES.beforeDestruct);let t=l.ajaxInstances.get(this);t&&(t.forEach(t=>{try{t.destruct()}catch{}}),t.clear()),super.destruct()}constructor(t,e){super(t),(0,o._)(this,"path",""),(0,o._)(this,"source","default"),(0,o._)(this,"options",void 0),this.options=(0,r.ConfigProto)(e||{},(0,r.ConfigProto)(a.Config.defaultOptions.uploader,(0,r.isJoditObject)(t)?t.o.uploader:{}))}}},72348:function(t,e,i){"use strict";i.d(e,{ColorPickerWidget:function(){return l}});var o=i(27795),n=i(65946),s=i(4099),r=i(54522),a=i.n(r);s.Icon.set("palette",a());let l=(t,e,i)=>{let r="jodit-color-picker",a=(0,n.normalizeColor)(i),l=t.c.div(r),c=t.o.textIcons?`<span>${t.i18n("palette")}</span>`:s.Icon.get("palette"),u=t=>{let e=[];return(0,n.isPlainObject)(t)?Object.keys(t).forEach(i=>{e.push(`<div class="${r}__group ${r}__group-${i}">`),e.push(u(t[i])),e.push("</div>")}):(0,n.isArray)(t)&&t.forEach(t=>{e.push(`<span class='${r}__color-item ${a===t?r+"__color-item_active_true":""}' title="${t}" style="background-color:${t}" data-color="${t}"></span>`)}),e.join("")};l.appendChild(t.c.fromHTML(`<div class="${r}__groups">${u(t.o.colors)}</div>`)),l.appendChild(t.c.fromHTML(`<div data-ref="extra" class="${r}__extra"></div>`));let{extra:h}=(0,n.refs)(l);return t.o.showBrowserColorPicker&&(0,n.hasBrowserColorPicker)()&&(h.appendChild(t.c.fromHTML(`<div class="${r}__native">${c}<input type="color" value="#ffffff"/></div>`)),t.e.on(l,"change",t=>{t.stopPropagation();let i=t.target;if(!i||!i.tagName||!o.Dom.isTag(i,"input"))return;let s=i.value||"";(0,n.isFunction)(e)&&e(s),t.preventDefault()})),t.e.on(l,"mousedown touchend",i=>{i.stopPropagation(),i.preventDefault();let s=i.target;if((!s||!s.tagName||o.Dom.isTag(s,"svg")||o.Dom.isTag(s,"path"))&&s.parentNode&&(s=o.Dom.closest(s.parentNode,"span",t.editor)),!o.Dom.isTag(s,"span")||!s.classList.contains(r+"__color-item"))return;let a=(0,n.attr)(s,"-color")||"";e&&(0,n.isFunction)(e)&&e(a)}),t.e.fire("afterGenerateColorPicker",l,h,e,a),l}},18762:function(t,e,i){"use strict";i.d(e,{FileSelectorWidget:function(){return a}});var o=i(23211),n=i(65946),s=i(4099),r=i(89636);let a=(t,e,i,a,c=!0)=>{let u,h=[],d=t.o.uploader;if(e.upload&&(d.url||d.insertImageAsBase64URI||d.customUploadFunction)){let i=t.c.fromHTML(`<div class="jodit-drag-and-drop__file-box"><strong>${t.i18n(c?"Drop image":"Drop file")}</strong><span><br>${t.i18n("or click")}</span><input type="file" accept="${c?"image/*":"*"}" tabindex="-1" dir="auto" multiple=""/></div>`);t.uploader.bind(i,i=>{let o=(0,n.isFunction)(e.upload)?e.upload:d.defaultHandlerSuccess;(0,n.isFunction)(o)&&o.call(t,i),t.e.fire("closeAllPopups")},e=>{t.message.error(e.message),t.e.fire("closeAllPopups")}),h.push({icon:"upload",name:"Upload",content:i})}if(e.filebrowser&&(t.o.filebrowser.ajax.url||t.o.filebrowser.items.url)&&h.push({icon:"folder",name:"Browse",content(){a&&a(),e.filebrowser&&t.filebrowser.open(e.filebrowser,c)}}),e.url){let r=new s.UIButton(t,{type:"submit",variant:"primary",text:"Insert"}),a=new s.UIForm(t,[new s.UIInput(t,{required:!0,label:"URL",name:"url",type:"text",placeholder:"https://"}),new s.UIInput(t,{name:"text",label:"Alternative text"}),new s.UIBlock(t,[r])]);u=null,i&&!o.Dom.isText(i)&&!o.Dom.isComment(i)&&(o.Dom.isTag(i,"img")||(0,n.$$)("img",i).length)&&(u="IMG"===i.tagName?i:(0,n.$$)("img",i)[0],l(a.container,"input[name=url]",(0,n.attr)(u,"src")),l(a.container,"input[name=text]",(0,n.attr)(u,"alt")),r.state.text="Update"),i&&o.Dom.isTag(i,"a")&&(l(a.container,"input[name=url]",(0,n.attr)(i,"href")),l(a.container,"input[name=text]",(0,n.attr)(i,"title")),r.state.text="Update"),a.onSubmit(i=>{(0,n.isFunction)(e.url)&&e.url.call(t,i.url,i.text)}),h.push({icon:"link",name:"URL",content:a.container})}return(0,r.TabsWidget)(t,h)};function l(t,e,i){let o=t.querySelector(e);return o?(i&&(o.value=i),o.value):""}},15753:function(t,e,i){"use strict";i.d(e,{ColorPickerWidget:function(){return o.ColorPickerWidget},FileSelectorWidget:function(){return n.FileSelectorWidget},TabsWidget:function(){return s.TabsWidget}});var o=i(72348),n=i(18762),s=i(89636)},89636:function(t,e,i){"use strict";i.d(e,{TabsWidget:function(){return l}});var o=i(16964),n=i(23211),s=i(91565),r=i(7909),a=i(4099);let l=(t,e,i)=>{let l=t.c.div("jodit-tabs"),c=t.c.div("jodit-tabs__wrapper"),u=t.c.div("jodit-tabs__buttons");(0,r.attr)(u,{role:"tablist","aria-orientation":"horizontal"});let h={},d=[],p="";l.appendChild(u),l.appendChild(c);let f=t=>{h[t]&&(d.forEach(t=>{t.state.activated=!1}),Object.values(h).forEach(({tab:t})=>t.classList.remove("jodit-tab_active")),h[t].button.state.activated=!0,h[t].tab.classList.add("jodit-tab_active"))};if(e.forEach(({icon:l,name:m,content:g})=>{let _=t.c.div("jodit-tab");(0,r.attr)(_,{role:"tabpanel"});let v=(0,a.Button)(t,l||m,m);v.state.role="tab",t.e.on(v.container,"pointerdown",t=>t.preventDefault()),p||(p=m),u.appendChild(v.container),d.push(v),v.container.classList.add("jodit-tabs__button","jodit-tabs__button_columns_"+e.length),(0,s.isFunction)(g)?_.classList.add("jodit-tab_empty"):_.appendChild(o.Component.isInstanceOf(g,a.UIElement)?g.container:g),c.appendChild(_),v.onAction(()=>(f(m),(0,s.isFunction)(g)&&!n.Dom.isElement(g)&&g.call(t),i&&(i.activeTab=m),!1)),h[m]={button:v,tab:_}}),Object.values(h).forEach(({button:t})=>{t.container.style.width=(100/e.length).toFixed(10)+"%"}),f(i&&i.activeTab&&h[i.activeTab]?i.activeTab:p),i){let t=i.activeTab;Object.defineProperty(i,"activeTab",{configurable:!0,enumerable:!1,get:()=>t,set(e){t=e,f(e)}})}return l}},94358:function(t,e,i){"use strict";var o=i(81937),n=i(28077),s=i(65946),r=i(29434),a=i(5266),l=i(17995),c=i.n(l);a.Config.prototype.controls.about={exec(t){let e=t.dlg({closeOnClickOverlay:!0}),i=t.i18n.bind(t);e.setMod("theme",t.o.theme).setHeader(i("About Jodit")).setContent(`<div class="jodit-about">
|
|
112
112
|
<div>${i("Jodit Editor")} v.${t.getVersion()}</div>
|
|
113
113
|
<div>${i("License: %s",!(0,s.isLicense)(t.o.license)?t.o.license||"MIT":(0,s.normalizeLicense)(t.o.license))}</div>
|
|
114
114
|
<div>
|