jodit 4.15.2 → 4.15.3

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.
Files changed (52) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/es2015/jodit.css +1 -1
  3. package/es2015/jodit.fat.min.js +4 -4
  4. package/es2015/jodit.js +30 -6
  5. package/es2015/jodit.min.js +4 -4
  6. package/es2015/plugins/debug/debug.css +1 -1
  7. package/es2015/plugins/debug/debug.js +1 -1
  8. package/es2015/plugins/debug/debug.min.js +1 -1
  9. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  10. package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
  11. package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
  12. package/es2018/jodit.fat.min.js +4 -4
  13. package/es2018/jodit.min.js +4 -4
  14. package/es2018/plugins/debug/debug.min.js +1 -1
  15. package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
  16. package/es2021/jodit.css +1 -1
  17. package/es2021/jodit.fat.min.js +4 -4
  18. package/es2021/jodit.js +29 -6
  19. package/es2021/jodit.min.js +4 -4
  20. package/es2021/plugins/debug/debug.css +1 -1
  21. package/es2021/plugins/debug/debug.js +1 -1
  22. package/es2021/plugins/debug/debug.min.js +1 -1
  23. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  24. package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
  25. package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
  26. package/es2021.en/jodit.css +1 -1
  27. package/es2021.en/jodit.fat.min.js +4 -4
  28. package/es2021.en/jodit.js +29 -6
  29. package/es2021.en/jodit.min.js +4 -4
  30. package/es2021.en/plugins/debug/debug.css +1 -1
  31. package/es2021.en/plugins/debug/debug.js +1 -1
  32. package/es2021.en/plugins/debug/debug.min.js +1 -1
  33. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  34. package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
  35. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
  36. package/es5/jodit.css +2 -2
  37. package/es5/jodit.fat.min.js +2 -2
  38. package/es5/jodit.js +29 -5
  39. package/es5/jodit.min.css +2 -2
  40. package/es5/jodit.min.js +2 -2
  41. package/es5/plugins/debug/debug.css +1 -1
  42. package/es5/plugins/debug/debug.js +1 -1
  43. package/es5/plugins/debug/debug.min.js +1 -1
  44. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  45. package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
  46. package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
  47. package/es5/polyfills.fat.min.js +1 -1
  48. package/es5/polyfills.js +1 -1
  49. package/es5/polyfills.min.js +1 -1
  50. package/esm/core/constants.js +1 -1
  51. package/esm/plugins/resizer/resizer.js +28 -3
  52. package/package.json +1 -1
@@ -1,11 +1,11 @@
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.15.2
4
+ * Version: v4.15.3
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
8
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var i=t();for(var n in i)("object"==typeof exports?exports:e)[n]=i[n]}}(self,function(){return function(){var e,t,i={5266:function(e,t,i){"use strict";i.d(t,{Config:function(){return s}});var n=i(25045),o=i(81937);let r={};class s{static get defaultOptions(){return s.__defaultOptions||(s.__defaultOptions=new s),s.__defaultOptions}constructor(){(0,n._)(this,"cache",!0),(0,n._)(this,"defaultTimeout",100),(0,n._)(this,"namespace",""),(0,n._)(this,"safeMode",!1),(0,n._)(this,"width","auto"),(0,n._)(this,"height","auto"),(0,n._)(this,"safePluginsList",["about","enter","backspace","size","bold","hotkeys"]),(0,n._)(this,"commandToHotkeys",void 0),(0,n._)(this,"license",""),(0,n._)(this,"preset","custom"),(0,n._)(this,"presets",{inline:{inline:!0,toolbar:!1,toolbarInline:!0,toolbarInlineForSelection:!0,showXPathInStatusbar:!1,showCharsCounter:!1,showWordsCounter:!1,showPlaceholder:!1}}),(0,n._)(this,"ownerDocument",o.globalDocument),(0,n._)(this,"ownerWindow",o.globalWindow),(0,n._)(this,"shadowRoot",null),(0,n._)(this,"nonce",""),(0,n._)(this,"zIndex",0),(0,n._)(this,"readonly",!1),(0,n._)(this,"disabled",!1),(0,n._)(this,"activeButtonsInReadOnly",["source","fullsize","print","about","dots","selectall"]),(0,n._)(this,"allowCommandsInReadOnly",["selectall","preview","print"]),(0,n._)(this,"toolbarButtonSize","middle"),(0,n._)(this,"allowTabNavigation",!1),(0,n._)(this,"inline",!1),(0,n._)(this,"theme","default"),(0,n._)(this,"saveModeInStorage",!1),(0,n._)(this,"asyncStorage",{}),(0,n._)(this,"editorClassName",!1),(0,n._)(this,"className",!1),(0,n._)(this,"style",!1),(0,n._)(this,"containerStyle",!1),(0,n._)(this,"styleValues",{}),(0,n._)(this,"triggerChangeEvent",!0),(0,n._)(this,"direction",""),(0,n._)(this,"language","auto"),(0,n._)(this,"debugLanguage",!1),(0,n._)(this,"i18n",!1),(0,n._)(this,"tabIndex",-1),(0,n._)(this,"toolbar",!0),(0,n._)(this,"statusbar",!0),(0,n._)(this,"showTooltip",!0),(0,n._)(this,"showTooltipDelay",200),(0,n._)(this,"useNativeTooltip",!1),(0,n._)(this,"defaultActionOnPaste",o.INSERT_AS_HTML),(0,n._)(this,"enter",o.PARAGRAPH),(0,n._)(this,"iframe",!1),(0,n._)(this,"editHTMLDocumentMode",!1),(0,n._)(this,"enterBlock","br"!==this.enter?this.enter:o.PARAGRAPH),(0,n._)(this,"defaultMode",o.MODE_WYSIWYG),(0,n._)(this,"useSplitMode",!1),(0,n._)(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,n._)(this,"colorPickerDefaultTab","background"),(0,n._)(this,"imageDefaultWidth",300),(0,n._)(this,"removeButtons",[]),(0,n._)(this,"disablePlugins",[]),(0,n._)(this,"extraPlugins",[]),(0,n._)(this,"basePath",void 0),(0,n._)(this,"extraButtons",[]),(0,n._)(this,"extraIcons",{}),(0,n._)(this,"createAttributes",{table:{style:"border-collapse:collapse;width: 100%;"}}),(0,n._)(this,"sizeLG",900),(0,n._)(this,"sizeMD",700),(0,n._)(this,"sizeSM",400),(0,n._)(this,"buttons",[{group:"font-style",buttons:[]},{group:"list",buttons:[]},{group:"font",buttons:[]},"---",{group:"script",buttons:[]},{group:"media",buttons:[]},"\n",{group:"state",buttons:[]},{group:"clipboard",buttons:[]},{group:"insert",buttons:[]},{group:"indent",buttons:[]},{group:"color",buttons:[]},{group:"form",buttons:[]},"---",{group:"history",buttons:[]},{group:"search",buttons:[]},{group:"source",buttons:[]},{group:"other",buttons:[]},{group:"info",buttons:[]}]),(0,n._)(this,"controls",void 0),(0,n._)(this,"events",{}),(0,n._)(this,"textIcons",!1),(0,n._)(this,"popupRoot",null),(0,n._)(this,"showBrowserColorPicker",!0),Object.assign(this,r)}}(0,n._)(s,"__defaultOptions",void 0),r=s.prototype,s.prototype.controls={}},24735:function(e,t,i){"use strict";i.d(t,{Async:function(){return f}});var n=i(25045),o=i(81937),r=i(61077),s=i(72068),a=i(91565),l=i(72412),u=i(62101),c=i(52100),d=i(85932),h=i(18303),p=i(28712),m=i(14228);class f{delay(e){return this.promise(t=>this.setTimeout(t,e))}setTimeout(e,t,...i){if(this.isDestructed)return 0;let n={};(0,h.isVoid)(t)&&(t=0),(0,l.isNumber)(t)||(t=(n=t).timeout||0),n.label&&this.clearLabel(n.label);let o=(0,r.setTimeout)(e,t,...i),s=n.label||o;return this.timers.set(s,o),this.__callbacks.set(s,e),o}updateTimeout(e,t){if((0,p.assert)(e&&this.timers.has(e),"Label does not exist"),!e||!this.timers.has(e))return null;let i=this.__callbacks.get(e);return(0,p.assert)((0,a.isFunction)(i),"Callback is not a function"),this.setTimeout(i,{label:e,timeout:t})}clearLabel(e){e&&this.timers.has(e)&&((0,r.clearTimeout)(this.timers.get(e)),this.timers.delete(e),this.__callbacks.delete(e))}clearTimeout(e){if((0,d.isString)(e))return this.clearLabel(e);(0,r.clearTimeout)(e),this.timers.delete(e),this.__callbacks.delete(e)}debounce(e,t,i=!1){let n=0,o=!1,l=[],d=(...t)=>{if(!o){n=0;let i=e(...t);if(o=!0,l.length){let e=()=>{l.forEach(e=>e()),l.length=0};(0,c.isPromise)(i)?i.finally(e):e()}}},h=(...s)=>{o=!1,t?(!n&&i&&d(...s),(0,r.clearTimeout)(n),n=this.setTimeout(()=>d(...s),(0,a.isFunction)(t)?t():t),this.timers.set(e,n)):d(...s)};return(0,u.isPlainObject)(t)&&t.promisify?(...e)=>{let t=this.promise(e=>{l.push(e)}).catch(e=>{if((0,s.isAbortError)(e))return null;throw e});return h(...e),t}:h}microDebounce(e,t=!1){let i,n=!1,o=!0;return(...r)=>{if(i=r,n){o=!0;return}o=!0,t&&(o=!1,e(...i)),n=!0,this.__queueMicrotaskNative(()=>{n=!1,!this.isDestructed&&o&&e(...i)})}}throttle(e,t,i=!1){let n=null,o,r,s;return(...i)=>{(o=!0,s=i,t)?n||(r=()=>{o?(e(...s),o=!1,n=this.setTimeout(r,(0,a.isFunction)(t)?t():t),this.timers.set(r,n)):n=null})():e(...s)}}promise(e){let t=()=>{},i=new Promise((i,n)=>{t=()=>n((0,m.abort)("Abort async")),this.promisesRejections.add(t),e(i,n)});return!i.finally&&"u">typeof process&&!o.IS_ES_NEXT&&(i.finally=e=>(i.then(e).catch(e),i)),i.finally(()=>{this.promisesRejections.delete(t)}).catch(()=>null),i.rejectCallback=t,i}promiseState(e){if(e.status)return e.status;if(!Promise.race)return new Promise(t=>{e.then(e=>(t("fulfilled"),e),e=>{throw t("rejected"),e}),this.setTimeout(()=>{t("pending")},100)});let t={};return Promise.race([e,t]).then(e=>e===t?"pending":"fulfilled",()=>"rejected")}requestIdleCallback(e,t={timeout:100}){let i=this.__requestIdleCallbackNative(e,t);return this.__requestsIdle.add(i),i}requestIdlePromise(e){return this.promise(t=>{let i=this.requestIdleCallback(()=>t(i),e)})}schedulerPostTask(e,t={delay:0,priority:"user-visible"}){let i=new AbortController;if(t.signal&&t.signal.addEventListener("abort",()=>i.abort()),this.__controllers.add(i),void 0!==globalThis.scheduler){let n=globalThis.scheduler.postTask(e,{...t,signal:i.signal});return n.finally(()=>{this.__controllers.delete(i)}).catch(()=>null),n}return this.promise((n,o)=>{let r=this.setTimeout(()=>{try{n(e())}catch(e){o(e)}this.__controllers.delete(i)},t.delay||1);i.signal.addEventListener("abort",()=>{this.clearTimeout(r),this.__controllers.delete(i),o((0,m.abort)())})})}schedulerYield(){return this.schedulerPostTask(()=>{},{priority:"user-visible"})}cancelIdleCallback(e){return this.__requestsIdle.delete(e),this.__cancelIdleCallbackNative(e)}requestAnimationFrame(e){let t=requestAnimationFrame(e);return this.__requestsRaf.add(t),t}cancelAnimationFrame(e){this.__requestsRaf.delete(e),cancelAnimationFrame(e)}clear(){this.__requestsIdle.forEach(e=>this.cancelIdleCallback(e)),this.__requestsRaf.forEach(e=>this.cancelAnimationFrame(e)),this.__controllers.forEach(e=>e.abort()),this.timers.forEach(e=>(0,r.clearTimeout)(this.timers.get(e))),this.timers.clear(),this.promisesRejections.forEach(e=>e()),this.promisesRejections.clear()}destruct(){this.clear(),this.isDestructed=!0}constructor(){var e,t,i,o,r,s;(0,n._)(this,"timers",new Map),(0,n._)(this,"__callbacks",new Map),(0,n._)(this,"__queueMicrotaskNative",null!=(e=null==(o=queueMicrotask)?void 0:o.bind(window))?e:Promise.resolve().then.bind(Promise.resolve())),(0,n._)(this,"promisesRejections",new Set),(0,n._)(this,"__requestsIdle",new Set),(0,n._)(this,"__controllers",new Set),(0,n._)(this,"__requestsRaf",new Set),(0,n._)(this,"__requestIdleCallbackNative",null!=(t=null==(r=window.requestIdleCallback)?void 0:r.bind(window))?t:(e,t)=>{var i;let n=Date.now();return this.setTimeout(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-n))})},null!=(i=null==t?void 0:t.timeout)?i:1)}),(0,n._)(this,"__cancelIdleCallbackNative",null!=(i=null==(s=window.cancelIdleCallback)?void 0:s.bind(window))?i:e=>{this.clearTimeout(e)}),(0,n._)(this,"isDestructed",!1)}}},91231:function(e,t,i){"use strict";i.d(t,{Async:function(){return n.Async}});var n=i(24735)},80251:function(e,t,i){"use strict";i.d(t,{Component:function(){return u}});var n=i(25045),o=i(91231),r=i(69364),s=i(28077),a=i(65946);let l=new Map;class u{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(e,t,i){let n=[this.componentName];return e&&(e=e.replace(/[^a-z0-9-]/gi,"-"),n.push(`__${e}`)),t&&(n.push("_",t),n.push("_",(0,a.isVoid)(i)?"true":i.toString())),n.join("")}get ownerDocument(){return this.ow.document}get od(){return this.ownerDocument}get ow(){return this.ownerWindow}get(e,t){return(0,a.get)(e,t||this)}get isReady(){return this.componentStatus===r.STATUSES.ready}get isDestructed(){return this.componentStatus===r.STATUSES.destructed}get isInDestruct(){return r.STATUSES.beforeDestruct===this.componentStatus||r.STATUSES.destructed===this.componentStatus}bindDestruct(e){return e.hookStatus(r.STATUSES.beforeDestruct,()=>!this.isInDestruct&&this.destruct()),this}destruct(){this.setStatus(r.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(e){this.setStatus(e)}setStatus(e){return this.setStatusComponent(e,this)}setStatusComponent(e,t){if(e===this.__componentStatus)return;t===this&&(this.__componentStatus=e);let i=Object.getPrototypeOf(this);i&&(0,a.isFunction)(i.setStatusComponent)&&i.setStatusComponent(e,t);let n=l.get(this),o=null==n?void 0:n[e];o&&o.length&&o.forEach(e=>e(t))}hookStatus(e,t){let i=l.get(this);i||(i={},l.set(this,i)),i[e]||(i[e]=[]),i[e].push(t)}static isInstanceOf(e,t){return e instanceof t}constructor(){(0,n._)(this,"__componentName",void 0),(0,n._)(this,"async",new o.Async),(0,n._)(this,"uid",void 0),(0,n._)(this,"ownerWindow",window),(0,n._)(this,"__componentStatus",r.STATUSES.beforeInit),this.uid="jodit-uid-"+(0,s.uniqueUid)()}}(0,n._)(u,"STATUSES",r.STATUSES)},16964:function(e,t,i){"use strict";i.d(t,{Component:function(){return n.Component},STATUSES:function(){return o.STATUSES},ViewComponent:function(){return r.ViewComponent}});var n=i(80251),o=i(69364),r=i(59609)},69364:function(e,t,i){"use strict";i.d(t,["STATUSES",0,{beforeInit:"beforeInit",ready:"ready",beforeDestruct:"beforeDestruct",destructed:"destructed"}])},59609:function(e,t,i){"use strict";i.d(t,{ViewComponent:function(){return r}});var n=i(25045),o=i(80251);class r extends o.Component{get j(){return this.jodit}get defaultTimeout(){return this.j.defaultTimeout}i18n(e,...t){return this.j.i18n(e,...t)}setParentView(e){return this.jodit=e,e.ow&&(this.ownerWindow=e.ow),e.components.add(this),this}destruct(){return this.j.components.delete(this),super.destruct()}constructor(e){super(),(0,n._)(this,"jodit",void 0),this.setParentView(e)}}},81937:function(e,t,i){"use strict";i.r(t),i.d(t,{IS_TEST:function(){return n}});let n=!1,o="u">typeof window?window:void 0,r="u">typeof document?document:void 0,s=new Set(["ul","ol"]),a=["img","video","svg","iframe","script","input","textarea","link","jodit","jodit-media"],l=new Set([...a,"br","hr"]),u=new Set(a),c="Meta",d="Backspace",h="Enter",p="Escape",m="ArrowLeft",f="ArrowUp",g="ArrowRight",_="ArrowDown",v="Delete",b=[c,d,v,f,_,g,m,h,p,"F3","Tab"],y="u">typeof navigator&&(-1!==navigator.userAgent.indexOf("MSIE")||/rv:11.0/i.test(navigator.userAgent)),w=void 0!==o&&/Mac|iPod|iPhone|iPad/.test(o.navigator.platform),k=e=>{let t=e.split("/");return/\.js/.test(t[t.length-1])?{basePath:t.slice(0,t.length-1).join("/")+"/",isMin:!0}:{basePath:e,isMin:!0}},{basePath:S,isMin:C}=(()=>{if("u"<typeof document)return{basePath:"",isMin:!0};let e=r.currentScript;if(e)return k(e.src);let t=r.querySelectorAll("script[src]");return t&&t.length?k(t[t.length-1].src):k(o.location.href)})(),E=new Set(["touchstart","touchend","scroll","mousewheel","mousemove","touchmove"]);i.d(t,["ACCURACY",0,10,"APP_VERSION",0,"4.15.2","BASE_PATH",0,S,"BASE_PATH_IS_MIN",0,C,"BR",0,"br","CLIPBOARD_ID",0,"clipboard","COMMAND_KEYS",0,b,"EMULATE_DBLCLICK_TIMEOUT",0,300,"ES",0,"es2018","FAT_MODE",0,!0,"HOMEPAGE",0,"https://xdsoft.net/jodit/","INSEPARABLE_TAGS",0,l,"INSERT_AS_HTML",0,"insert_as_html","INSERT_AS_TEXT",0,"insert_as_text","INSERT_CLEAR_HTML",0,"insert_clear_html","INSERT_ONLY_TEXT",0,"insert_only_text","INVISIBLE_SPACE",0,"\uFEFF","INVISIBLE_SPACE_REG_EXP",0,()=>/[\uFEFF]/g,"INVISIBLE_SPACE_REG_EXP_END",0,()=>/[\uFEFF]+$/g,"INVISIBLE_SPACE_REG_EXP_START",0,()=>/^[\uFEFF]+/g,"IS_BLOCK",0,/^(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,"IS_ES_MODERN",0,!0,"IS_ES_NEXT",0,!1,"IS_IE",0,y,"IS_INLINE",0,/^(STRONG|SPAN|I|EM|B|SUP|SUB|A|U)$/i,"IS_MAC",0,w,"IS_PROD",0,!0,"KEY_ALIASES",0,{add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:w?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:"space",spacebar:"space",up:"arrowup",win:"meta",windows:"meta"},"KEY_ALT",0,"Alt","KEY_BACKSPACE",0,d,"KEY_DELETE",0,v,"KEY_DOWN",0,_,"KEY_ENTER",0,h,"KEY_ESC",0,p,"KEY_F3",0,"F3","KEY_LEFT",0,m,"KEY_META",0,c,"KEY_RIGHT",0,g,"KEY_SPACE",0,"Space","KEY_TAB",0,"Tab","KEY_UP",0,f,"LIST_TAGS",0,s,"MARKER_CLASS",0,"jodit-selection_marker","MODE_SOURCE",0,2,"MODE_SPLIT",0,3,"MODE_WYSIWYG",0,1,"NBSP_SPACE",0,"\xa0","NEARBY",0,5,"NO_EMPTY_TAGS",0,u,"PARAGRAPH",0,"p","PASSIVE_EVENTS",0,E,"SAFE_COUNT_CHANGE_CALL",0,10,"SET_TEST",0,()=>n=!0,"SOURCE_CONSUMER",0,"source-consumer","SPACE_REG_EXP",0,()=>/[\s\n\t\r\uFEFF\u200b]+/g,"SPACE_REG_EXP_END",0,()=>/[\s\n\t\r\uFEFF\u200b]+$/g,"SPACE_REG_EXP_START",0,()=>/^[\s\n\t\r\uFEFF\u200b]+/g,"TEMP_ATTR",0,"data-jodit-temp","TEXT_HTML",0,y?"html":"text/html","TEXT_PLAIN",0,y?"text":"text/plain","TEXT_RTF",0,y?"rtf":"text/rtf","TOKENS",0,{},"globalDocument",0,r,"globalWindow",0,o,"lang",0,{}])},76517:function(e,t,i){"use strict";i.d(t,{Create:function(){return l}});var n=i(25045),o=i(81937),r=i(23211),s=i(65946),a=i(28712);class l{get doc(){return(0,s.isFunction)(this.document)?this.document():this.document}element(e,t,i){let n=this.doc.createElement(e.toLowerCase());return this.applyCreateAttributes(n),t&&((0,s.isPlainObject)(t)?(0,s.attr)(n,t):i=t),i&&(0,s.asArray)(i).forEach(e=>r.Dom.append(n,(0,s.isString)(e)?this.fromHTML(e):e)),n}div(e,t,i){let n=this.element("div",t,i);return e&&(n.className=e),n}sandbox(){var e;let t=this.element("iframe",{sandbox:"allow-same-origin"});r.Dom.append(this.doc.body,t);let i=null==(e=t.contentWindow)?void 0:e.document;if((0,a.assert)(i,"iframe.contentWindow.document"),!i)throw Error("Iframe error");return i.open(),i.write("<!DOCTYPE html><html><head></head><body></body></html>"),i.close(),[i.body,t]}span(e,t,i){let n=this.element("span",t,i);return e&&(n.className=e),n}a(e,t,i){let n=this.element("a",t,i);return e&&(n.className=e),n}text(e){return this.doc.createTextNode(e)}fake(){return this.text(o.INVISIBLE_SPACE)}fragment(){return this.doc.createDocumentFragment()}fromHTML(e,t){let i=this.div();i.innerHTML=e.toString();let n=i.firstChild===i.lastChild&&i.firstChild?i.firstChild:i;if(r.Dom.safeRemove(n),t){let e=(0,s.refs)(n);Object.keys(t).forEach(i=>{let n=e[i];n&&!1===t[i]&&r.Dom.hide(n)})}return n}applyCreateAttributes(e){if(this.createAttributes){let t=this.createAttributes;if(t&&t[e.tagName.toLowerCase()]){let i=t[e.tagName.toLowerCase()];(0,s.isFunction)(i)?i(e):(0,s.isPlainObject)(i)&&(0,s.attr)(e,i)}}}constructor(e,t){(0,n._)(this,"document",void 0),(0,n._)(this,"createAttributes",void 0),this.document=e,this.createAttributes=t}}},79821:function(e,t,i){"use strict";i.d(t,{Create:function(){return n.Create}});var n=i(76517)},49574:function(e,t,i){"use strict";i.d(t,{autobind:function(){return o}});var n=i(91565);function o(e,t,i){if(!(0,n.isFunction)(i.value))throw TypeError(`@autobind can only be applied to methods, but "${t}" is not a function`);let o=i.value;return{configurable:!0,get(){let e=o.bind(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e}}}},51676:function(e,t,i){"use strict";i.d(t,{cache:function(){return l},cacheHTML:function(){return u},cached:function(){return a}});var n=i(69364),o=i(23211),r=i(28686),s=i(38027);function a(e,t){let i=Object.getOwnPropertyDescriptor(e,t);return!i||(0,r.isFunction)(i.get)?null:i.value}function l(e,t,i){let n=i.get;if(!n)throw(0,s.error)("Getter property descriptor expected");i.get=function(){let e=n.call(this);return e&&!0===e.noCache||Object.defineProperty(this,t,{configurable:i.configurable,enumerable:i.enumerable,writable:!1,value:e}),e}}function u(e,t,i){let a=i.value;if(!(0,r.isFunction)(a))throw(0,s.error)("Handler must be a Function");let l=!0,u=new WeakMap;i.value=function(...e){var t;let i,n=null!=(i=this.od)?i:document,r=u.get(n);if(l&&(null==r?void 0:r.has(this.constructor)))return null==(t=r.get(this.constructor))?void 0:t.cloneNode(!0);let s=a.apply(this,e);return l&&o.Dom.isElement(s)&&(r?r.set(this.constructor,s):u.set(n,new WeakMap([[this.constructor,s]]))),l?s.cloneNode(!0):s},e.hookStatus(n.STATUSES.ready,e=>{l=!!((0,r.isViewObject)(e)?e:e.jodit).options.cache})}},91672:function(e,t,i){"use strict";i.d(t,{component:function(){return s},getComponentClass:function(){return a}});var n=i(81937),o=i(421);let r=new Map;function s(e){class t extends e{constructor(...e){super(...e),this.constructor===t&&(this instanceof t||Object.setPrototypeOf(this,t.prototype),this.setStatus("ready"))}}let i=(0,o.getClassName)(e.prototype);if(r.has(i)&&!n.IS_PROD)throw Error(`Component with name "${i}" is already registered`);return r.set(i,t),t}function a(e){return r.get(e)}},55184:function(e,t,i){"use strict";i.d(t,{debounce:function(){return a},throttle:function(){return l}});var n=i(16964),o=i(28686),r=i(28712),s=i(33201);function a(e,t=!1,i="debounce"){return(a,l)=>{let u=a[l];if(!(0,o.isFunction)(u))throw(0,s.error)("Handler must be a Function");return a.hookStatus(n.STATUSES.ready,n=>{let{async:s}=n;(0,r.assert)(null!=s,`Component ${n.componentName||n.constructor.name} should have "async:IAsync" field`);let a=(0,o.isFunction)(e)?e(n):e,u=(0,o.isNumber)(a)||(0,o.isPlainObject)(a)?a:n.defaultTimeout;Object.defineProperty(n,l,{configurable:!0,value:s[i](n[l].bind(n),u,t)})}),{configurable:!0,get(){return u.bind(this)}}}}function l(e,t=!1){return a(e,t,"throttle")}},24968:function(e,t,i){"use strict";i.d(t,{derive:function(){return o}});var n=i(91565);function o(...e){return t=>{let i=t.prototype;for(let t=0;t<e.length;t++){let o=e[t],r=Object.getOwnPropertyNames(o.prototype);for(let e=0;e<r.length;e++){let t=r[e],s=Object.getOwnPropertyDescriptor(o.prototype,t);null!=s&&(0,n.isFunction)(s.value)&&!(0,n.isFunction)(i[t])&&Object.defineProperty(i,t,{enumerable:!0,configurable:!0,writable:!0,value:function(...e){return s.value.call(this,...e)}})}}}}},29200:function(e,t,i){"use strict";i.d(t,{hook:function(){return r}});var n=i(91565),o=i(33201);function r(e){return(t,i)=>{if(!(0,n.isFunction)(t[i]))throw(0,o.error)("Handler must be a Function");t.hookStatus(e,e=>{e[i].call(e)})}}},35718:function(e,t,i){"use strict";i.d(t,{idle:function(){return s}});var n=i(16964),o=i(91565),r=i(33201);function s(){return(e,t)=>{if(!(0,o.isFunction)(e[t]))throw(0,r.error)("Handler must be a Function");e.hookStatus(n.STATUSES.ready,e=>{let{async:i}=e,n=e[t];e[t]=(...t)=>i.requestIdleCallback(n.bind(e,...t))})}}},84839:function(e,t,i){"use strict";i.r(t),i.d(t,{autobind:function(){return n.autobind},cache:function(){return o.cache},cacheHTML:function(){return o.cacheHTML},cached:function(){return o.cached},component:function(){return r.component},debounce:function(){return s.debounce},derive:function(){return a.derive},getComponentClass:function(){return r.getComponentClass},hook:function(){return l.hook},idle:function(){return u.idle},nonenumerable:function(){return c.nonenumerable},persistent:function(){return d.persistent},throttle:function(){return s.throttle},wait:function(){return h.wait},watch:function(){return p.watch}});var n=i(49574),o=i(51676),r=i(91672),s=i(55184),a=i(24968),l=i(29200),u=i(35718),c=i(41360),d=i(77036),h=i(80840),p=i(68616)},41360:function(e,t,i){"use strict";i.d(t,["nonenumerable",0,(e,t)=>{!1!==(Object.getOwnPropertyDescriptor(e,t)||{}).enumerable&&Object.defineProperty(e,t,{enumerable:!1,set(e){Object.defineProperty(this,t,{enumerable:!1,writable:!0,value:e})}})}])},77036:function(e,t,i){"use strict";i.d(t,{persistent:function(){return r}});var n=i(69364),o=i(31534);function r(e,t){e.hookStatus(n.STATUSES.ready,e=>{let i=(0,o.isViewObject)(e)?e:e.jodit,n=`${i.options.namespace}${e.componentName}_prop_${t}`,r=e[t];Object.defineProperty(e,t,{get(){var e;return null!=(e=i.storage.get(n))?e:r},set(e){i.storage.set(n,e)}})})}},80840:function(e,t,i){"use strict";i.d(t,{wait:function(){return s}});var n=i(69364),o=i(91565),r=i(33201);function s(e){return(t,i)=>{let s=t[i];if(!(0,o.isFunction)(s))throw(0,r.error)("Handler must be a Function");t.hookStatus(n.STATUSES.ready,t=>{let{async:n}=t,o=t[i],r=0;Object.defineProperty(t,i,{configurable:!0,value:function i(...s){n.clearTimeout(r),e(t)?o.apply(t,s):r=n.setTimeout(()=>i(...s),10)}})})}}},68616:function(e,t,i){"use strict";i.d(t,{watch:function(){return d}});var n=i(69364),o=i(70535),r=i(32328),s=i(91565),a=i(62101),l=i(31534),u=i(33201),c=i(71125);function d(e,t){return(i,d)=>{var h;if(!(0,s.isFunction)(i[d]))throw(0,u.error)("Handler must be a Function");let p=null==(h=null==t?void 0:t.immediately)||h,m=null==t?void 0:t.context,f=t=>{let n=(0,l.isViewObject)(t)?t:t.jodit,u=(e,...i)=>{if(!t.isInDestruct)return t[d](e,...i)};p||(u=t.async.microDebounce(u,!0)),(0,r.splitArray)(e).forEach(e=>{if(/:/.test(e)){let[i,o]=e.split(":"),r=m;i.length&&(r=t.get(i)),(0,s.isFunction)(r)&&(r=r(t)),n.events.on(r||t,o,u),r||n.events.on(o,u),t.hookStatus("beforeDestruct",()=>{n.events.off(r||t,o,u).off(o,u)});return}let r=e.split("."),[l]=r,d=r.slice(1),h=t[l];(0,a.isPlainObject)(h)&&(0,o.observable)(h).on(`change.${d.join(".")}`,u);let p=(0,c.getPropertyDescriptor)(i,l);Object.defineProperty(t,l,{configurable:!0,set(e){let i=h;i!==e&&(h=e,p&&p.set&&p.set.call(t,e),(0,a.isPlainObject)(h)&&(h=(0,o.observable)(h)).on(`change.${d.join(".")}`,u),u(l,i,h))},get(){return p&&p.get?p.get.call(t):h}})})};(0,s.isFunction)(i.hookStatus)?i.hookStatus(n.STATUSES.ready,f):f(i)}}},23211:function(e,t,i){"use strict";i.d(t,{Dom:function(){return b}});var n=i(81937),o=i(88475),r=i(17312),s=i(91565),a=i(46248),l=i(3213),u=i(85932),c=i(18303),d=i(4040),h=i(28712),p=i(7909),m=i(80991),f=i(36400),g=i(33201),_=i(71125);let v=RegExp(`<([a-z]+)[^>]+${n.TEMP_ATTR}[^>]*>(.+?)</\\1>`,"gi");class b{static detach(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}static wrapNextInline(e,t,i){let n,o,r=e;i.s.save();do o=!1,(n=r.nextSibling)&&!b.isBlock(n)&&!b.isTag(n,"br")&&(o=!0,r=n);while(o);return b.__wrapElements(t,i,e,r)}static __wrapElements(e,t,i,n){let o=(0,u.isString)(e)?t.createInside.element(e):e;i.parentNode&&i.parentNode.insertBefore(o,i);let r=i;for(;r&&(r=i.nextSibling,o.appendChild(i),i!==n&&r);)i=r;return t.s.restore(),o}static wrapInline(e,t,i){let n,o,r=e,s=e;i.s.save();do o=!1,(n=r.previousSibling)&&!b.isBlock(n)&&(o=!0,r=n);while(o);do o=!1,(n=s.nextSibling)&&!b.isBlock(n)&&(o=!0,s=n);while(o);return b.__wrapElements(t,i,r,s)}static wrap(e,t,i){let n=(0,u.isString)(t)?i.element(t):t;if(b.isNode(e)){if(!e.parentNode)throw(0,g.error)("Element should be in DOM");e.parentNode.insertBefore(n,e),n.appendChild(e)}else{let t=e.extractContents();e.insertNode(n),n.appendChild(t)}return n}static unwrap(e){let t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);b.safeRemove(e)}}static between(e,t,i){let n=e;for(;n&&n!==t&&!(e!==n&&i(n));){let e=n.firstChild||n.nextSibling;if(!e){for(;n&&!n.nextSibling;)if((n=n.parentNode)===t)return;e=null==n?void 0:n.nextSibling}n=e}}static replace(e,t,i,n=!1,r=!1){let s;if((0,a.isHTML)(t)&&((0,h.assert)(i,"Need create instance for new tag"),t=i.fromHTML(t)),(0,u.isString)(t)?((0,h.assert)(i,"Need create instance for new tag"),s=i.element(t)):s=t,!r)for(;e.firstChild;)s.appendChild(e.firstChild);return n&&b.isElement(e)&&b.isElement(s)&&(0,o.toArray)(e.attributes).forEach(e=>{s.setAttribute(e.name,e.value)}),e.parentNode&&e.parentNode.replaceChild(s,e),s}static isEmptyTextNode(e){return b.isText(e)&&(!e.nodeValue||0===e.nodeValue.replace(n.INVISIBLE_SPACE_REG_EXP(),"").trim().length)}static isEmptyContent(e){return b.each(e,e=>b.isEmptyTextNode(e))}static isContentEditable(e,t){return b.isNode(e)&&!b.closest(e,e=>b.isElement(e)&&"false"===e.getAttribute("contenteditable"),t)}static isEmpty(e,t=n.NO_EMPTY_TAGS){let i;if(!e)return!0;i=(0,s.isFunction)(t)?t:e=>t.has(e.nodeName.toLowerCase());let o=e=>null==e.nodeValue||0===(0,d.trim)(e.nodeValue).length;return b.isText(e)?o(e):!(b.isElement(e)&&i(e))&&b.each(e,e=>{if(b.isText(e)&&!o(e)||b.isElement(e)&&i(e))return!1})}static isNode(e){return!!(e&&(0,u.isString)(e.nodeName)&&"number"==typeof e.nodeType&&e.childNodes&&(0,s.isFunction)(e.appendChild))}static isCell(e){return b.isNode(e)&&("TD"===e.nodeName||"TH"===e.nodeName)}static isList(e){return b.isTag(e,n.LIST_TAGS)}static isLeaf(e){return b.isTag(e,"li")}static isImage(e){return b.isNode(e)&&/^(img|svg|picture|canvas)$/i.test(e.nodeName)}static isBlock(e){return!(0,c.isVoid)(e)&&"object"==typeof e&&b.isNode(e)&&n.IS_BLOCK.test(e.nodeName)}static isText(e){return!!(e&&e.nodeType===Node.TEXT_NODE)}static isComment(e){return!!(e&&e.nodeType===Node.COMMENT_NODE)}static isElement(e){return!!b.isNode(e)&&e.nodeType===Node.ELEMENT_NODE}static isFragment(e){return!!b.isNode(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}static isHTMLElement(e){var t;if(!b.isNode(e))return!1;let i=null==(t=e.ownerDocument)?void 0:t.defaultView;return e instanceof(i?i.HTMLElement:HTMLElement)}static isInlineBlock(e){return b.isElement(e)&&!/^(BR|HR)$/i.test(e.tagName)&&-1!==["inline","inline-block"].indexOf((0,m.css)(e,"display").toString())}static canSplitBlock(e){return!(0,c.isVoid)(e)&&b.isHTMLElement(e)&&b.isBlock(e)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&void 0!==e.style&&!/^(fixed|absolute)/i.test(e.style.position)}static first(e,t){return b.__deepMost(e,t,!1)}static last(e,t){return b.__deepMost(e,t,!0)}static __deepMost(e,t,i){let n=i?"lastChild":"firstChild",o=i?"previousSibling":"nextSibling",r=null==e?void 0:e[n];if(!r)return null;do{if(t(r))return r;let i=r[n]||r[o];if(!i&&r.parentNode!==e){do r=r.parentNode;while(r&&!r[o]&&r.parentNode!==e);i=null==r?void 0:r[o]}r=i}while(r);return null}static prev(e,t,i,n=!0){return b.find(e,t,i,!1,n)}static next(e,t,i,n=!0){return b.find(e,t,i,!0,n)}static prevWithClass(e,t){return b.__siblingWithClass(e,t,!0)}static nextWithClass(e,t){return b.__siblingWithClass(e,t,!1)}static __siblingWithClass(e,t,i){let n=e=>b.isElement(e)&&e.classList.contains(t),o=e.parentNode;return i?b.prev(e,n,o):b.next(e,n,o)}static find(e,t,i,n=!0,o=!0){let r=this.nextGen(e,i,n,o),s=r.next();for(;!s.done;){if(t(s.value))return s.value;s=r.next()}return null}static*nextGen(e,t,i=!0,n=!0){let o=[],r=e;do{let t=i?r.nextSibling:r.previousSibling;for(;t;)o.push(t),t=i?t.nextSibling:t.previousSibling;o.reverse(),yield*this.runInStack(e,o,i,n),r=r.parentNode}while(r&&r!==t);return null}static each(e,t,i=!0){let n=this.eachGen(e,i),o=n.next();for(;!o.done;){if(!1===t(o.value))return!1;o=n.next()}return!0}static eachGen(e,t=!0){return this.runInStack(e,[e],t)}static*runInStack(e,t,i,n=!0){for(;t.length;){let o=t.pop();if(n){let e=i?o.lastChild:o.firstChild;for(;e;)t.push(e),e=i?e.previousSibling:e.nextSibling}e!==o&&(yield o)}}static findWithCurrent(e,t,i,n="nextSibling",o="firstChild"){let r=e;do{if(t(r))return r||null;if(o&&r&&r[o]){let e=b.findWithCurrent(r[o],t,r,n,o);if(e)return e}for(;r&&!r[n]&&r!==i;)r=r.parentNode;r&&r[n]&&r!==i&&(r=r[n])}while(r&&r!==i);return null}static findSibling(e,t=!0,i=e=>!b.isEmptyTextNode(e)){let n=b.sibling(e,t);for(;n&&!i(n);)n=b.sibling(n,t);return n&&i(n)?n:null}static findNotEmptySibling(e,t){return b.findSibling(e,t,e=>{var t;return!b.isEmptyTextNode(e)&&!!(!b.isText(e)||(null==(t=e.nodeValue)?void 0:t.length)&&(0,d.trim)(e.nodeValue))})}static findNotEmptyNeighbor(e,t,i){return(0,_.call)(t?b.prev:b.next,e,e=>!!(e&&(!(b.isText(e)||b.isComment(e))||(0,d.trim)((null==e?void 0:e.nodeValue)||"").length)),i)}static sibling(e,t){return t?e.previousSibling:e.nextSibling}static up(e,t,i,n=!1){let o=e;if(!o)return null;do{if(t(o))return o;if(o===i||!o.parentNode)break;o=o.parentNode}while(o&&o!==i);return o===i&&n&&t(o)?o:null}static closest(e,t,i){let n,o=e=>e.toLowerCase();if((0,s.isFunction)(t))n=t;else if((0,r.isArray)(t)||(0,l.isSet)(t)){let e=(0,l.isSet)(t)?t:new Set(t.map(o));n=t=>!!(t&&e.has(o(t.nodeName)))}else n=e=>!!(e&&o(t)===o(e.nodeName));return b.up(e,n,i)}static furthest(e,t,i){let n=null,o=null==e?void 0:e.parentElement;for(;o&&o!==i;)t(o)&&(n=o),o=null==o?void 0:o.parentElement;return n}static appendChildFirst(e,t){e.firstChild!==t&&b.prepend(e,t)}static after(e,t){var i;null==(i=e.parentNode)||i.insertBefore(t,e.nextSibling)}static before(e,t){var i;null==(i=e.parentNode)||i.insertBefore(t,e)}static prepend(e,t){e.insertBefore(t,e.firstChild)}static append(e,t){(0,r.isArray)(t)?t.forEach(t=>{this.append(e,t)}):e.appendChild(t)}static moveContent(e,t,i=!1,r=()=>!0){let s=(e.ownerDocument||n.globalDocument).createDocumentFragment();(0,o.toArray)(e.childNodes).filter(e=>!!r(e)||(b.safeRemove(e),!1)).forEach(e=>{s.appendChild(e)}),t.insertBefore(s,i?t.firstChild:null)}static isOrContains(e,t,i=!1){return e===t?!i:!!(t&&e&&this.up(t,t=>t===e,e,!0))}static safeRemove(...e){e.forEach(e=>b.isNode(e)&&e.parentNode&&e.parentNode.removeChild(e))}static safeInsertNode(e,t){e.collapsed||e.deleteContents();let i=b.isFragment(t)?t.lastChild:t;e.startContainer===e.endContainer&&e.collapsed&&b.isTag(e.startContainer,n.INSEPARABLE_TAGS)?b.after(e.startContainer,t):(e.insertNode(t),i&&e.setStartBefore(i)),e.collapse(!0),[t.nextSibling,t.previousSibling].forEach(e=>b.isText(e)&&!e.nodeValue&&b.safeRemove(e))}static hide(e){e&&((0,f.dataBind)(e,"__old_display",e.style.getPropertyValue("display")),e.style.setProperty("display","none"))}static show(e){if(!e)return;let t=(0,f.dataBind)(e,"__old_display");"none"===e.style.getPropertyValue("display")&&e.style.setProperty("display",t||null)}static isTag(e,t){if(Array.isArray(t))throw TypeError("Dom.isTag does not support array");if(!this.isElement(e))return!1;let i=e.tagName.toLowerCase();return t instanceof Set?t.has(i)||t.has(e.tagName.toUpperCase()):i===t||e.tagName.toUpperCase()===t}static markTemporary(e,t){return t&&(0,p.attr)(e,t),(0,p.attr)(e,n.TEMP_ATTR,!0),e}static isTemporary(e){return!!b.isElement(e)&&(b.isMarker(e)||"true"===(0,p.attr)(e,n.TEMP_ATTR))}static isMarker(e){return b.isNode(e)&&b.isTag(e,"span")&&e.hasAttribute("data-"+n.MARKER_CLASS)}static replaceTemporaryFromString(e){return e.replace(v,"$2")}static temporaryList(e){let t=[];return b.each(e,e=>{b.isHTMLElement(e)&&e.hasAttribute(n.TEMP_ATTR)&&t.push(e)}),t}constructor(){throw Error("Dom is static module")}}},27795:function(e,t,i){"use strict";i.d(t,{Dom:function(){return n.Dom},LazyWalker:function(){return o.LazyWalker}});var n=i(23211),o=i(1080)},1080:function(e,t,i){"use strict";i.d(t,{LazyWalker:function(){return l}});var n=i(25045),o=i(31635),r=i(49574),s=i(23211),a=i(60216);class l extends a.Eventify{setWork(e){return this.isWorked?this.break():this.stop(),this.workNodes=s.Dom.eachGen(e,!this.options.reverse),this.isFinished=!1,this.hadAffect=!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(e){this.isWorked&&(this.stop(),this.emit("break",e))}end(){this.isWorked&&(this.stop(),this.emit("end",this.hadAffect),this.hadAffect=!1)}stop(){var e;this.isWorked=!1,this.isFinished=!0,this.workNodes=null,null==(e=this.__schedulerController)||e.abort(),this.__schedulerController=null}destruct(){super.destruct(),this.stop()}__workPerform(){if(this.workNodes){var e;this.isWorked=!0;let t=0,i=null!=(e=this.options.timeoutChunkSize)?e:50;for(;!this.isFinished&&t<i;){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(e){var t;return!!e&&(void 0===this.options.whatToShow||e.nodeType===this.options.whatToShow)&&null!=(t=this.emit("visit",e))&&t}constructor(e,t={}){super(),(0,n._)(this,"async",void 0),(0,n._)(this,"options",void 0),(0,n._)(this,"workNodes",void 0),(0,n._)(this,"hadAffect",void 0),(0,n._)(this,"isWorked",void 0),(0,n._)(this,"isFinished",void 0),(0,n._)(this,"__schedulerController",void 0),this.async=e,this.options=t,this.workNodes=null,this.hadAffect=!1,this.isWorked=!1,this.isFinished=!1,this.__schedulerController=null}}(0,o.__decorate)([r.autobind],l.prototype,"__workPerform",null)},93747:function(e,t,i){"use strict";i.d(t,{EventEmitter:function(){return d}});var n=i(25045),o=i(81937),r=i(32328),s=i(17312),a=i(91565),l=i(85932),u=i(33201),c=i(18869);class d{mute(e){return this.__mutedEvents.add(null!=e?e:"*"),this}isMuted(e){return!!(e&&this.__mutedEvents.has(e))||this.__mutedEvents.has("*")}unmute(e){return this.__mutedEvents.delete(null!=e?e:"*"),this}__eachEvent(e,t){(0,r.splitArray)(e).map(e=>e.trim()).forEach(e=>{let i=e.split("."),n=i[1]||c.defaultNameSpace;t.call(this,i[0],n)})}__getStore(e){if(!e)throw(0,u.error)("Need subject");if(void 0===e[this.__key]){let t=new c.EventHandlersStore;Object.defineProperty(e,this.__key,{enumerable:!1,configurable:!0,writable:!0,value:t})}return e[this.__key]}__removeStoreFromSubject(e){void 0!==e[this.__key]&&delete e[this.__key]}__triggerNativeEvent(e,t){let i=this.__doc.createEvent("HTMLEvents");(0,l.isString)(t)?i.initEvent(t,!0,!0):(i.initEvent(t.type,t.bubbles,t.cancelable),["screenX","screenY","clientX","clientY","target","srcElement","currentTarget","timeStamp","which","keyCode"].forEach(e=>{Object.defineProperty(i,e,{value:t[e],enumerable:!0})}),Object.defineProperty(i,"originalEvent",{value:t,enumerable:!0})),e.dispatchEvent(i)}get current(){return this.currents[this.currents.length-1]}on(e,t,i,n){let r,c,d,p;if((0,l.isString)(e)||(0,l.isStringArray)(e)?(r=this,c=e,d=t,p=i):(r=e,c=t,d=i,p=n),!((0,l.isString)(c)||(0,l.isStringArray)(c))||0===c.length)throw(0,u.error)("Need events names");if(!(0,a.isFunction)(d))throw(0,u.error)("Need event handler");if((0,s.isArray)(r))return r.forEach(e=>{this.on(e,c,d,p)}),this;let m=r,f=this.__getStore(m),g=this,_=function(e,...t){if(!g.isMuted(e))return d&&d.call(this,...t)};return h(m)&&(_=function(e){if(!g.isMuted(e.type)&&(g.__prepareEvent(e),d&&!1===d.call(this,e)))return e.preventDefault(),e.stopImmediatePropagation(),!1}),this.__eachEvent(c,(e,t)=>{if(0===e.length)throw(0,u.error)("Need event name");if(!1===f.indexOf(e,t,d)){let r={event:e,originalCallback:d,syntheticCallback:_};if(f.set(e,t,r,null==p?void 0:p.top),h(m)){var i,n;let t=o.PASSIVE_EVENTS.has(e)?{passive:!0,capture:null!=(i=null==p?void 0:p.capture)&&i}:null!=(n=null==p?void 0:p.capture)&&n;_.options=t,m.addEventListener(e,_,t),this.__memoryDOMSubjectToHandler(m,_)}}}),this}__memoryDOMSubjectToHandler(e,t){let i=this.__domEventsMap.get(e)||new Set;i.add(t),this.__domEventsMap.set(e,i)}__unmemoryDOMSubjectToHandler(e,t){let i=this.__domEventsMap,n=i.get(e)||new Set;n.delete(t),n.size?i.set(e,n):i.delete(e)}one(e,t,i,n){let o,r,s,a;(0,l.isString)(e)||(0,l.isStringArray)(e)?(o=this,r=e,s=t,a=i):(o=e,r=t,s=i,a=n);let u=(...e)=>(this.off(o,r,u),s(...e));return this.on(o,r,u,a),this}off(e,t,i){let n,o,r;if((0,l.isString)(e)||(0,l.isStringArray)(e)?(n=this,o=e,r=t):(n=e,o=t,r=i),(0,s.isArray)(n))return n.forEach(e=>{this.off(e,o,r)}),this;let u=n,d=this.__getStore(u);if(!((0,l.isString)(o)||(0,l.isStringArray)(o))||0===o.length)return d.namespaces().forEach(e=>{this.off(u,"."+e)}),this.__removeStoreFromSubject(u),this;let p=e=>{if(h(u)){var t;u.removeEventListener(e.event,e.syntheticCallback,null!=(t=e.syntheticCallback.options)&&t),this.__unmemoryDOMSubjectToHandler(u,e.syntheticCallback)}},m=(e,t)=>{if(""===e)return void d.events(t).forEach(e=>{""!==e&&m(e,t)});let i=d.get(e,t);if(i&&i.length)if((0,a.isFunction)(r)){let n=d.indexOf(e,t,r);!1!==n&&(p(i[n]),i.splice(n,1),i.length||d.clearEvents(t,e))}else i.forEach(p),i.length=0,d.clearEvents(t,e)};return this.__eachEvent(o,(e,t)=>{t===c.defaultNameSpace?d.namespaces().forEach(t=>{m(e,t)}):m(e,t)}),d.isEmpty()&&this.__removeStoreFromSubject(u),this}stopPropagation(e,t){let i=(0,l.isString)(e)?this:e,n=(0,l.isString)(e)?e:t;if("string"!=typeof n)throw(0,u.error)("Need event names");let o=this.__getStore(i);this.__eachEvent(n,(e,t)=>{let n=o.get(e,t);n&&this.__stopped.push(n),t===c.defaultNameSpace&&o.namespaces(!0).forEach(t=>this.stopPropagation(i,e+"."+t))})}__removeStop(e){if(e){let t=this.__stopped.indexOf(e);-1!==t&&this.__stopped.splice(0,t+1)}}__isStopped(e){return void 0!==e&&-1!==this.__stopped.indexOf(e)}fire(e,t,...i){let n,o,r=(0,l.isString)(e)?this:e,s=(0,l.isString)(e)?e:t,a=(0,l.isString)(e)?[t,...i]:i;if(!h(r)&&!(0,l.isString)(s))throw(0,u.error)("Need events names");let d=this.__getStore(r);return!(0,l.isString)(s)&&h(r)?this.__triggerNativeEvent(r,t):this.__eachEvent(s,(e,t)=>{if(h(r))this.__triggerNativeEvent(r,e);else{let i=d.get(e,t);if(i)try{[...i].every(t=>!this.__isStopped(i)&&(this.currents.push(e),o=t.syntheticCallback.call(r,e,...a),this.currents.pop(),void 0!==o&&(n=o),!0))}finally{this.__removeStop(i)}t!==c.defaultNameSpace||h(r)||d.namespaces().filter(e=>e!==t).forEach(t=>{let i=this.fire.apply(this,[r,e+"."+t,...a]);void 0!==i&&(n=i)})}}),n}destruct(){this.__isDestructed||(this.__isDestructed=!0,this.__domEventsMap.forEach((e,t)=>{this.off(t)}),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(e){(0,n._)(this,"__domEventsMap",new Map),(0,n._)(this,"__mutedEvents",new Set),(0,n._)(this,"__key","__JoditEventEmitterNamespaces"),(0,n._)(this,"__doc",o.globalDocument),(0,n._)(this,"__prepareEvent",e=>{!e.cancelBubble&&(e.composed&&(0,a.isFunction)(e.composedPath)&&e.composedPath()[0]&&Object.defineProperty(e,"target",{value:e.composedPath()[0],configurable:!0,enumerable:!0}),e.type.match(/^touch/)&&e.changedTouches&&e.changedTouches.length&&["clientX","clientY","pageX","pageY"].forEach(t=>{Object.defineProperty(e,t,{value:e.changedTouches[0][t],configurable:!0,enumerable:!0})}),e.originalEvent||(e.originalEvent=e),"paste"===e.type&&void 0===e.clipboardData&&this.__doc.defaultView.clipboardData&&Object.defineProperty(e,"clipboardData",{get:()=>this.__doc.defaultView.clipboardData,configurable:!0,enumerable:!0}))}),(0,n._)(this,"currents",[]),(0,n._)(this,"__stopped",[]),(0,n._)(this,"__isDestructed",!1),e&&(this.__doc=e),this.__key+=new Date().getTime()}}function h(e){return e&&(0,a.isFunction)(e.addEventListener)}},60216:function(e,t,i){"use strict";i.d(t,{Eventify:function(){return o}});var n=i(25045);class o{on(e,t){var i;return this.__map.has(e)||this.__map.set(e,new Set),null==(i=this.__map.get(e))||i.add(t),this}off(e,t){if(this.__map.has(e)){var i;null==(i=this.__map.get(e))||i.delete(t)}return this}destruct(){this.__map.clear()}emit(e,...t){let i;if(this.__map.has(e)){var n;null==(n=this.__map.get(e))||n.forEach(e=>{i=e(...t)})}return i}constructor(){(0,n._)(this,"__map",new Map)}}},42689:function(e,t,i){"use strict";let n=new(i(93747)).EventEmitter;i.d(t,["eventEmitter",0,n])},1496:function(e,t,i){"use strict";i.d(t,{EventEmitter:function(){return n.EventEmitter},EventHandlersStore:function(){return s.EventHandlersStore},Eventify:function(){return o.Eventify},defaultNameSpace:function(){return s.defaultNameSpace},observable:function(){return r.observable}});var n=i(93747),o=i(60216),r=i(70535),s=i(18869)},70535:function(e,t,i){"use strict";i.d(t,{observable:function(){return u}});var n=i(17312),o=i(94013),r=i(62101),s=i(71125);let a=Symbol("observable-object");function l(e){return void 0!==e[a]}function u(e){if(l(e))return e;let t={},i={},u=(t,o)=>((0,n.isArray)(t)?t.map(e=>u(e,o)):(i[t]||(i[t]=[]),i[t].push(o)),e),c=(o,...r)=>{if((0,n.isArray)(o))return void o.map(e=>c(e,...r));try{!t[o]&&i[o]&&(t[o]=!0,i[o].forEach(t=>t.call(e,...r)))}finally{t[o]=!1}},d=(t,i=[])=>{let n={};l(t)||(Object.defineProperty(t,a,{enumerable:!1,value:!0}),Object.keys(t).forEach(a=>{let l=i.concat(a).filter(e=>e.length);n[a]=t[a];let u=(0,s.getPropertyDescriptor)(t,a);Object.defineProperty(t,a,{set:t=>{let i=n[a];if(!(0,o.isFastEqual)(n[a],t)){c(["beforeChange",`beforeChange.${l.join(".")}`],a,t),(0,r.isPlainObject)(t)&&d(t,l),u&&u.set?u.set.call(e,t):n[a]=t;let o=[];c(["change",...l.reduce((e,t)=>(o.push(t),e.push(`change.${o.join(".")}`),e),[])],l.join("."),i,(null==t?void 0:t.valueOf)?t.valueOf():t)}},get:()=>u&&u.get?u.get.call(e):n[a],enumerable:!0,configurable:!0}),(0,r.isPlainObject)(n[a])&&d(n[a],l)}),Object.defineProperty(e,"on",{value:u}))};return d(e),e}},18869:function(e,t,i){"use strict";i.d(t,{EventHandlersStore:function(){return a}});var n=i(25045),o=i(88475),r=i(28712);let s="JoditEventDefaultNamespace";class a{get(e,t){if(this.__store.has(t)){let i=this.__store.get(t);return(0,r.assert)(i,"-"),i[e]}}indexOf(e,t,i){let n=this.get(e,t);if(n){for(let e=0;e<n.length;e+=1)if(n[e].originalCallback===i)return e}return!1}namespaces(e=!1){let t=(0,o.toArray)(this.__store.keys());return e?t.filter(e=>e!==s):t}events(e){let t=this.__store.get(e);return t?Object.keys(t):[]}set(e,t,i,n=!1){let o=this.__store.get(t);o||(o={},this.__store.set(t,o)),void 0===o[e]&&(o[e]=[]),n?o[e].unshift(i):o[e].push(i)}clear(){this.__store.clear()}clearEvents(e,t){let i=this.__store.get(e);i&&i[t]&&(delete i[t],Object.keys(i).length||this.__store.delete(e))}isEmpty(){return 0===this.__store.size}constructor(){(0,n._)(this,"__store",new Map)}}i.d(t,["defaultNameSpace",0,s])},28077:function(e,t,i){"use strict";i.d(t,{getContainer:function(){return b},getPopupViewRoot:function(){return y},uniqueUid:function(){return g}});var n=i(24497),o=i(85932),r=i(31534),s=i(74264),a=i(7909),l=i(80991),u=i(421),c=i(85305),d=i(42689),h=i(81937),p=i(27795);let m=1,f=new Set;function g(){function e(){return Math.round(m+=10*(Math.random()+1)).toString(16)}let t=e();for(;f.has(t);)t=e();return f.add(t),t}let _=new c.PluginSystem({getContainer:b}),v=new WeakMap;function b(e,t,i="div",l=!1){let c,d=(0,o.isString)(t)?t:t?(0,u.getClassName)(t.prototype):"jodit-utils",h=v.get(e)||{},m=d+i,f=(0,r.isViewObject)(e)?e:e.j;if(!h[m]){let t=f.c;if(c=y(f.o,f.container,e.od.body),l&&(0,n.isJoditObject)(e)&&e.od!==e.ed){t=e.createInside;let o="style"===i?e.ed.head:e.ed.body;c=(0,n.isJoditObject)(e)&&e.o.shadowRoot?e.o.shadowRoot:o}let o=t.element(i,{className:`jodit jodit-${(0,s.kebabCase)(d)}-container jodit-box`});f.o.nonce&&("style"===i||"script"===i)&&(0,a.attr)(o,"nonce",f.o.nonce),o.classList.add(`jodit_theme_${f.o.theme||"default"}`),p.Dom.append(c,o),h[m]=o,e.hookStatus("beforeDestruct",()=>{f.events.off(o),p.Dom.safeRemove(o),delete h[m],Object.keys(h).length&&v.delete(e)}),v.set(e,h),f.events.fire("getContainer",o)}return h[m].classList.remove("jodit_theme_default","jodit_theme_dark"),h[m].classList.add(`jodit_theme_${f.o.theme||"default"}`),h[m]}function y(e,t,i){var n,o,r;return null!=(n=null!=(o=null!=(r=e.popupRoot)?r:e.shadowRoot)?o:p.Dom.closest(t,e=>p.Dom.isHTMLElement(e)&&(p.Dom.isTag(e,"dialog")||["fixed","absolute"].includes((0,l.css)(e,"position"))),i))?n:i}let w=d.eventEmitter;i.d(t,["eventEmitter",0,w,"extendLang",0,e=>{Object.keys(e).forEach(t=>{h.lang[t]?Object.assign(h.lang[t],e[t]):h.lang[t]=e[t]})},"instances",0,{},"modules",0,{},"pluginSystem",0,_])},78982:function(e,t,i){"use strict";var n=i(17312);i.d(t,["asArray",0,e=>(0,n.isArray)(e)?e:[e]])},45664:function(e,t,i){"use strict";i.d(t,{asArray:function(){return n.asArray},splitArray:function(){return o.splitArray},toArray:function(){return r.toArray}});var n=i(78982),o=i(32328),r=i(88475)},32328:function(e,t,i){"use strict";function n(e){return Array.isArray(e)?e:e.split(/[,\s]+/)}i.d(t,{splitArray:function(){return n}})},88475:function(e,t,i){"use strict";var n=i(23283),o=i(43379);i.d(t,["toArray",0,function(...e){var t;return((0,n.isNativeFunction)(Array.from)?Array.from:null!=(t=(0,o.reset)("Array.from"))?t:Array.from).apply(Array,e)}])},61077:function(e,t,i){"use strict";i.d(t,{clearTimeout:function(){return n.clearTimeout},setTimeout:function(){return n.setTimeout}});var n=i(79947)},79947:function(e,t,i){"use strict";i.d(t,{clearTimeout:function(){return r},setTimeout:function(){return o}});var n=i(81937);function o(e,t,...i){return t?n.globalWindow.setTimeout(e,t,...i):(e.call(null,...i),0)}function r(e){n.globalWindow.clearTimeout(e)}},98740:function(e,t,i){"use strict";i.d(t,{hasBrowserColorPicker:function(){return o}});var n=i(81937);function o(){let e;try{let t=n.globalDocument.createElement("input");t.type="color",t.value="!",e="color"===t.type&&"!"!==t.value}catch(t){e=!1}return e}},28686:function(e,t,i){"use strict";i.d(t,{hasBrowserColorPicker:function(){return n.hasBrowserColorPicker},hasContainer:function(){return d.hasContainer},isAbortError:function(){return o.isAbortError},isArray:function(){return r.isArray},isBoolean:function(){return s.isBoolean},isDestructable:function(){return d.isDestructable},isEqual:function(){return a.isEqual},isFastEqual:function(){return a.isFastEqual},isFunction:function(){return l.isFunction},isHTML:function(){return u.isHTML},isHtmlFromWord:function(){return c.isHtmlFromWord},isInitable:function(){return d.isInitable},isInt:function(){return h.isInt},isJoditObject:function(){return p.isJoditObject},isLicense:function(){return m.isLicense},isMarker:function(){return f.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 k.isString},isStringArray:function(){return k.isStringArray},isURL:function(){return S.isURL},isValidName:function(){return C.isValidName},isViewObject:function(){return E.isViewObject},isVoid:function(){return T.isVoid},isWindow:function(){return I.isWindow}});var n=i(98740),o=i(72068),r=i(17312),s=i(22289),a=i(94013),l=i(91565),u=i(46248),c=i(82166),d=i(52433),h=i(99732),p=i(24497),m=i(44998),f=i(23175),g=i(23283),_=i(72412),v=i(70222),b=i(62101),y=i(52100),w=i(3213),k=i(85932),S=i(91764),C=i(50083),E=i(31534),T=i(18303),I=i(3513)},72068:function(e,t,i){"use strict";function n(e){return!!e&&e instanceof DOMException&&"AbortError"===e.name}i.d(t,{isAbortError:function(){return n}})},17312:function(e,t,i){"use strict";function n(e){return Array.isArray(e)}i.d(t,{isArray:function(){return n}})},22289:function(e,t,i){"use strict";function n(e){return"boolean"==typeof e}i.d(t,{isBoolean:function(){return n}})},94013:function(e,t,i){"use strict";i.d(t,{isEqual:function(){return o},isFastEqual:function(){return r}});var n=i(3347);function o(e,t){return e===t||(0,n.stringify)(e)===(0,n.stringify)(t)}function r(e,t){return e===t}},91565:function(e,t,i){"use strict";function n(e){return"function"==typeof e}i.d(t,{isFunction:function(){return n}})},82166:function(e,t,i){"use strict";function n(e){return -1!==e.search(/<meta.*?Microsoft Excel\s[\d].*?>/)||-1!==e.search(/<meta.*?Microsoft Word\s[\d].*?>/)||-1!==e.search(/<meta[^>]*?ProgId[^>]*?(Word|Excel)\./i)||-1!==e.search(/<meta[^>]*?(LibreOffice|OpenOffice)/i)||-1!==e.search(/urn:schemas-microsoft-com:office:(word|excel)/)||-1!==e.search(/<\w[^>]*\sclass=("|')?Mso/)||-1!==e.search(/style='[^']*mso-/)||-1!==e.search(/style="[^"]*mso-/)&&-1!==e.search(/<font/)}i.d(t,{isHtmlFromWord:function(){return n}})},46248:function(e,t,i){"use strict";var n=i(85932);i.d(t,["isHTML",0,e=>(0,n.isString)(e)&&/<([A-Za-z][A-Za-z0-9]*)\b[^>]*>(.*?)<\/\1>/m.test(e.replace(/[\r\n]/g,""))])},52433:function(e,t,i){"use strict";i.d(t,{hasContainer:function(){return l},isDestructable:function(){return a},isInitable:function(){return s}});var n=i(23211),o=i(91565),r=i(18303);function s(e){return!(0,r.isVoid)(e)&&(0,o.isFunction)(e.init)}function a(e){return!(0,r.isVoid)(e)&&(0,o.isFunction)(e.destruct)}function l(e){return!(0,r.isVoid)(e)&&n.Dom.isElement(e.container)}},99732:function(e,t,i){"use strict";i.d(t,{isInt:function(){return r}});var n=i(70222),o=i(85932);function r(e){return(0,o.isString)(e)&&(0,n.isNumeric)(e)&&(e=parseFloat(e)),"number"==typeof e&&Number.isFinite(e)&&!(e%1)}},24497:function(e,t,i){"use strict";i.d(t,{isJoditObject:function(){return o}});var n=i(91565);function o(e){return!!(e&&e instanceof Object&&(0,n.isFunction)(e.constructor)&&("u">typeof Jodit&&e instanceof Jodit||e.isJodit))}},44998:function(e,t,i){"use strict";var n=i(85932);i.d(t,["isLicense",0,e=>(0,n.isString)(e)&&23===e.length&&/^[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}$/i.test(e)])},23175:function(e,t,i){"use strict";i.d(t,{isMarker:function(){return o}});var n=i(23211);function o(e){return n.Dom.isMarker(e)}},23283:function(e,t,i){"use strict";function n(e){return!!e&&"function"===(typeof e).toLowerCase()&&(e===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(String(e)))}i.d(t,{isNativeFunction:function(){return n}})},72412:function(e,t,i){"use strict";function n(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}i.d(t,{isNumber:function(){return n}})},70222:function(e,t,i){"use strict";i.d(t,{isNumeric:function(){return o}});var n=i(85932);function o(e){if((0,n.isString)(e)){if(!e.match(/^([+-])?[0-9]+(\.?)([0-9]+)?(e[0-9]+)?$/))return!1;e=parseFloat(e)}return"number"==typeof e&&!isNaN(e)&&isFinite(e)}},62101:function(e,t,i){"use strict";i.d(t,{isPlainObject:function(){return o}});var n=i(3513);function o(e){return!(!e||"object"!=typeof e||e.nodeType||(0,n.isWindow)(e))&&!(e.constructor&&!({}).hasOwnProperty.call(e.constructor.prototype,"isPrototypeOf"))}},52100:function(e,t,i){"use strict";function n(e){return e&&"function"==typeof e.then}i.d(t,{isPromise:function(){return n}})},3213:function(e,t,i){"use strict";i.d(t,{isSet:function(){return o}});var n=i(91565);function o(e){return!!e&&(0,n.isFunction)(e.has)&&(0,n.isFunction)(e.add)&&(0,n.isFunction)(e.delete)}},85932:function(e,t,i){"use strict";i.d(t,{isString:function(){return o},isStringArray:function(){return r}});var n=i(17312);function o(e){return"string"==typeof e}function r(e){return(0,n.isArray)(e)&&o(e[0])}},91764:function(e,t,i){"use strict";i.d(t,{isURL:function(){return o}});var n=i(81937);function o(e){if(e.includes(" "))return!1;if("u">typeof URL)try{let t=new URL(e);return["https:","http:","ftp:","file:","rtmp:"].includes(t.protocol)}catch(e){return!1}let t=n.globalDocument.createElement("a");return t.href=e,!!t.hostname}},50083:function(e,t,i){"use strict";function n(e){return!!e.length&&!/[^0-9A-Za-zа-яА-ЯЁё\w\-_. ]/.test(e)&&e.trim().length>0}i.d(t,{isValidName:function(){return n}})},31534:function(e,t,i){"use strict";i.d(t,{isViewObject:function(){return o}});var n=i(91565);function o(e){return!!(e&&e instanceof Object&&(0,n.isFunction)(e.constructor)&&e.isView)}},18303:function(e,t,i){"use strict";function n(e){return null==e}i.d(t,{isVoid:function(){return n}})},3513:function(e,t,i){"use strict";function n(e){return null!=e&&e===e.window}i.d(t,{isWindow:function(){return n}})},93387:function(e,t,i){"use strict";i.d(t,["colorToHex",0,e=>{if("rgba(0, 0, 0, 0)"===e||""===e)return!1;if(!e)return"#000000";if("#"===e.substr(0,1))return e;let t=/([\s\n\t\r]*?)rgb\((\d+), (\d+), (\d+)\)/.exec(e)||/([\s\n\t\r]*?)rgba\((\d+), (\d+), (\d+), ([\d.]+)\)/.exec(e);if(!t)return"#000000";let i=parseInt(t[2],10),n=parseInt(t[3],10),o=(parseInt(t[4],10)|n<<8|i<<16).toString(16).toUpperCase();for(;o.length<6;)o="0"+o;return t[1]+"#"+o}])},30893:function(e,t,i){"use strict";i.d(t,{applyStyles:function(){return c}});var n=i(81937),o=i(23211),r=i(4040),s=i(7909),a=i(80991),l=i(28723);function u(e){return e.replace(/mso-[a-z-]+:[\s]*[^;]+;/gi,"").replace(/mso-[a-z-]+:[\s]*[^";']+$/gi,"").replace(/border[a-z-]*:[\s]*[^;]+;/gi,"").replace(/([0-9.]+)(pt|cm)/gi,(e,t,i)=>{switch(i.toLowerCase()){case"pt":return(1.328*parseFloat(t)).toFixed(0)+"px";case"cm":return(.02645833*parseFloat(t)).toFixed(0)+"px"}return e})}function c(e){let t=/<html(?:\s[^>]*)?>/i.exec(e);if(!t)return e;let i=(e=e.substring(t.index)).toLowerCase().lastIndexOf("</html>");-1!==i&&(e=e.substring(0,i+7));let c=n.globalDocument.createElement("iframe");(0,a.css)(c,"display","none"),o.Dom.append(n.globalDocument.body,c);let d="";try{let t=c.contentDocument||(c.contentWindow?c.contentWindow.document:null);if(t){t.open(),t.write(e),t.close(),o.Dom.each(t.body,e=>{o.Dom.isElement(e)&&/mso-list:\s*ignore/i.test((0,s.attr)(e,"style")||"")&&o.Dom.safeRemove(e)});try{for(let e=0;e<t.styleSheets.length;e+=1){let i=t.styleSheets[e].cssRules;for(let e=0;e<i.length;e+=1)""!==i[e].selectorText&&(0,l.$$)(i[e].selectorText,t.body).forEach(t=>{t.style.cssText=u(i[e].style.cssText+";"+t.style.cssText)})}}catch(e){if(!n.IS_PROD)throw e}o.Dom.each(t.body,e=>{if(o.Dom.isElement(e)){let t=(0,s.attr)(e,"style");t&&(e.style.cssText=u(t)),(0,s.attr)(e,"style")||(0,s.attr)(e,"style",null)}}),d=t.firstChild?(0,r.trim)(t.body.innerHTML):""}}catch(e){}finally{o.Dom.safeRemove(c)}return d&&(e=d),(0,r.trim)(e.replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(/<!--[^>]*>/g,""))}},1277:function(e,t,i){"use strict";i.d(t,{cleanFromWord:function(){return l}});var n=i(81937),o=i(23211),r=i(88475),s=i(4040),a=i(7909);function l(e){-1!==e.indexOf("<html ")&&(e=(e=e.substring(e.indexOf("<html "),e.length)).substring(0,e.lastIndexOf("</html>")+7));let t="";try{let i=n.globalDocument.createElement("div");i.innerHTML=e;let s=[];i.firstChild&&o.Dom.each(i,e=>{if(e)switch(e.nodeType){case Node.ELEMENT_NODE:switch(e.nodeName){case"STYLE":case"LINK":case"META":s.push(e);break;case"W:SDT":case"W:SDTPR":case"FONT":o.Dom.unwrap(e);break;default:if(/mso-list:\s*ignore/i.test((0,a.attr)(e,"style")||"")){s.push(e);break}(0,r.toArray)(e.attributes).forEach(t=>{-1===["src","href","rel","content"].indexOf(t.name.toLowerCase())&&(0,a.attrRaw)(e,t.name,null)})}break;case Node.TEXT_NODE:break;default:s.push(e)}}),o.Dom.safeRemove.apply(null,s),t=i.innerHTML}catch(e){}return t&&(e=t),(e=e.split(/(\n)/).filter(s.trim).join("\n")).replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(/<!--[^>]*>/g,"")}},6609:function(e,t,i){"use strict";i.d(t,{htmlspecialchars:function(){return o}});var n=i(81937);function o(e){let t=n.globalDocument.createElement("div");return t.textContent=e,t.innerHTML}},82658:function(e,t,i){"use strict";i.d(t,{applyStyles:function(){return n.applyStyles},cleanFromWord:function(){return o.cleanFromWord},htmlspecialchars:function(){return r.htmlspecialchars},nl2br:function(){return s.nl2br},safeHTML:function(){return a.safeHTML},sanitizeHTMLElement:function(){return a.sanitizeHTMLElement},stripTags:function(){return l.stripTags}});var n=i(30893),o=i(1277),r=i(6609),s=i(48838),a=i(48155),l=i(22852)},48838:function(e,t,i){"use strict";function n(e){return e.replace(/\r\n|\r|\n/g,"<br/>")}i.d(t,{nl2br:function(){return n}})},48155:function(e,t,i){"use strict";i.d(t,{safeHTML:function(){return l},sanitizeHTMLElement:function(){return h}});var n=i(23211),o=i(93640),r=i(7909);let s=new Set(["foreignobject","annotation-xml","desc","title"]),a=e=>!!(e&&/^(math|svg)$/i.test(e.nodeName));function l(e,t){var i;if(!n.Dom.isElement(e)&&!n.Dom.isFragment(e))return;let l=[];for(let t of(n.Dom.each(e,e=>{n.Dom.isElement(e)&&n.Dom.up(e.parentNode,a)&&l.push(e)}),l))n.Dom.isOrContains(e,t)&&function(e){if("http://www.w3.org/1999/xhtml"!==e.namespaceURI||null==n.Dom.up(e,a))return!1;for(let t=e.parentElement;t;t=t.parentElement){let e=t.nodeName.toLowerCase();if("math"===e||"svg"===e)break;if(s.has(e))return!1}return!0}(t)&&n.Dom.safeRemove(t);let u=null!=(i=t.removeEventAttributes)?i:t.removeOnError,c=e=>{if(n.Dom.isElement(e)&&(u&&function(e){if(!n.Dom.isElement(e))return;let t=[];for(let i=0;i<e.attributes.length;i++)e.attributes[i].name.toLowerCase().startsWith("on")&&t.push(e.attributes[i].name);for(let i of t)(0,r.attrRaw)(e,i,null)}(e),h(e,t),t.safeLinksTarget&&"A"===e.nodeName&&"_blank"===(0,o.attr)(e,"target"))){let t=((0,o.attr)(e,"rel")||"").split(/\s+/).filter(Boolean);t.includes("noopener")||t.push("noopener"),t.includes("noreferrer")||t.push("noreferrer"),(0,o.attr)(e,"rel",t.join(" "))}};c(e),n.Dom.each(e,c)}let u=["src","data","action","formaction","poster","background","xlink:href"],c=new Set(["iframe","frame","object","embed"]);function d(e,t){let i=e.replace(/[\u0000-\u0020]+/g,"").toLowerCase();return!!(/^(?:javascript|vbscript|livescript|mocha):/.test(i)||/^data:(?:text\/html|application\/xhtml)/.test(i))||/^data:image\/svg/.test(i)&&c.has(t)}function h(e,{safeJavaScriptLink:t,removeOnError:i}={safeJavaScriptLink:!0,removeOnError:!0}){if(!n.Dom.isElement(e))return!1;let s=!1;i&&e.hasAttribute("onerror")&&((0,o.attr)(e,"onerror",null),s=!0);let a=e.nodeName.toLowerCase(),l=(0,o.attr)(e,"href");if(t&&l&&d(l,a)){let t="u">typeof location?location.protocol:"http:";(0,o.attr)(e,"href",t+"//"+l),s=!0}if(t)for(let t of(e.hasAttribute("srcdoc")&&((0,o.attr)(e,"srcdoc",null),s=!0),u)){let i=(0,r.attrRaw)(e,t);i&&d(i,a)&&((0,o.attr)(e,t,null),s=!0)}return s}},22852:function(e,t,i){"use strict";i.d(t,{stripTags:function(){return function e(t,i=document,u=null,c=!1){let d=i.createElement("div");(0,o.isString)(t)?d.innerHTML=t:n.Dom.append(d,t);let h=[];return n.Dom.each(d,e=>{n.Dom.isElement(e)&&h.push(e)}),h.forEach(t=>{if(!t.parentNode)return;if(u&&n.Dom.isTag(t,u)){let o=t.nodeName.toLowerCase(),r=n.Dom.isTag(t,l)?`%%%jodit-single-${o}%%%`:`%%%jodit-${o}%%%${e(t.innerHTML,i,u,c)}%%%/jodit-${o}%%%`;n.Dom.before(t,i.createTextNode(r)),n.Dom.safeRemove(t);return}if(n.Dom.isTag(t,a))return void n.Dom.safeRemove(t);if(!n.Dom.isTag(t,s))return;let o=t.nextSibling;!(n.Dom.isText(o)&&/^\s/.test(o.nodeValue||""))&&o&&n.Dom.before(o,i.createTextNode(c?"%%%jodit-single-br%%%":" "))}),(0,r.trim)(d.innerText).replace(/%%%(\/)?jodit(-single)?-([\w\n]+)%%%/g,(e,t,i,n)=>`<${t?"/":""}${n}>`)}}});var n=i(23211),o=i(85932),r=i(4040);let s=new Set(["div","p","br","h1","h2","h3","h4","h5","h6","hr"]),a=new Set(["script","style"]),l=new Set(["br","hr","input"])},65946:function(e,t,i){"use strict";i.r(t),i.d(t,{CamelCaseToKebabCase:function(){return c.CamelCaseToKebabCase},NUMBER_FIELDS_REG:function(){return l.NUMBER_FIELDS_REG},applyStyles:function(){return a.applyStyles},asArray:function(){return n.asArray},camelCase:function(){return c.camelCase},cleanFromWord:function(){return a.cleanFromWord},clearTimeout:function(){return o.clearTimeout},colorToHex:function(){return s.colorToHex},fuzzySearchIndex:function(){return c.fuzzySearchIndex},getContentWidth:function(){return u.getContentWidth},getFixedPositionOffset:function(){return u.getFixedPositionOffset},getScrollParent:function(){return u.getScrollParent},hasBrowserColorPicker:function(){return r.hasBrowserColorPicker},hasContainer:function(){return r.hasContainer},htmlspecialchars:function(){return a.htmlspecialchars},i18n:function(){return c.i18n},innerWidth:function(){return u.innerWidth},isAbortError:function(){return r.isAbortError},isArray:function(){return r.isArray},isBoolean:function(){return r.isBoolean},isDestructable:function(){return r.isDestructable},isEqual:function(){return r.isEqual},isFastEqual:function(){return r.isFastEqual},isFunction:function(){return r.isFunction},isHTML:function(){return r.isHTML},isHtmlFromWord:function(){return r.isHtmlFromWord},isInitable:function(){return r.isInitable},isInt:function(){return r.isInt},isJoditObject:function(){return r.isJoditObject},isLicense:function(){return r.isLicense},isMarker:function(){return r.isMarker},isNativeFunction:function(){return r.isNativeFunction},isNumber:function(){return r.isNumber},isNumeric:function(){return r.isNumeric},isPlainObject:function(){return r.isPlainObject},isPromise:function(){return r.isPromise},isSet:function(){return r.isSet},isString:function(){return r.isString},isStringArray:function(){return r.isStringArray},isURL:function(){return r.isURL},isValidName:function(){return r.isValidName},isViewObject:function(){return r.isViewObject},isVoid:function(){return r.isVoid},isWindow:function(){return r.isWindow},kebabCase:function(){return c.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 u.offset},position:function(){return u.position},safeHTML:function(){return a.safeHTML},sanitizeHTMLElement:function(){return a.sanitizeHTMLElement},setTimeout:function(){return o.setTimeout},size:function(){return u.size},splitArray:function(){return n.splitArray},sprintf:function(){return c.sprintf},stringify:function(){return c.stringify},stripTags:function(){return a.stripTags},toArray:function(){return n.toArray},trim:function(){return c.trim},trimChars:function(){return c.trimChars},trimInv:function(){return c.trimInv},ucfirst:function(){return c.ucfirst}});var n=i(45664),o=i(61077),r=i(28686),s=i(93387),a=i(82658),l=i(97022),u=i(86878),c=i(97642),d=i(93640),h={};for(var p in d)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","getFixedPositionOffset","getScrollParent","innerWidth","offset","position","size","CamelCaseToKebabCase","camelCase","fuzzySearchIndex","i18n","kebabCase","sprintf","stringify","trim","trimChars","trimInv","ucfirst"].indexOf(p)&&(h[p]=(function(e){return d[e]}).bind(0,p));i.d(t,h)},97022:function(e,t,i){"use strict";i.d(t,{NUMBER_FIELDS_REG:function(){return o.NUMBER_FIELDS_REG},normalizeColor:function(){return n.normalizeColor},normalizeCssNumericValue:function(){return o.normalizeCssNumericValue},normalizeCssValue:function(){return o.normalizeCssValue},normalizeKeyAliases:function(){return r.normalizeKeyAliases},normalizeLicense:function(){return s.normalizeLicense},normalizePath:function(){return a.normalizePath},normalizeRelativePath:function(){return l.normalizeRelativePath},normalizeSize:function(){return u.normalizeSize},normalizeUrl:function(){return c.normalizeUrl}});var n=i(77367),o=i(19147),r=i(27978),s=i(49663),a=i(18377),l=i(96340),u=i(98831),c=i(48009)},77367:function(e,t,i){"use strict";var n=i(93387),o=i(4040);i.d(t,["normalizeColor",0,e=>{let t=["#"],i=(0,n.colorToHex)(e);if(!i)return!1;if(3===(i=(i=(0,o.trim)(i.toUpperCase())).substring(1)).length){for(let e=0;e<3;e+=1)t.push(i[e]),t.push(i[e]);return t.join("")}return i.length>6&&(i=i.slice(0,6)),"#"+i}])},19147:function(e,t,i){"use strict";i.d(t,{normalizeCssNumericValue:function(){return l},normalizeCssValue:function(){return u}});var n=i(70222),o=i(18303),r=i(93387),s=i(74264);let a=/^(left|top|bottom|right|width|min|max|height|margin|padding|fontsize|font-size)/i;function l(e,t){return!(0,o.isVoid)(t)&&a.test(e)&&(0,n.isNumeric)(t.toString())?parseInt(t.toString(),10)+"px":t}function u(e,t){if("font-weight"===(0,s.kebabCase)(e)){switch(t.toString().toLowerCase()){case"700":case"bold":return 700;case"400":case"normal":return 400;case"900":case"heavy":return 900}return(0,n.isNumeric)(t)?Number(t):t}return/color/i.test(e)&&/^rgb/i.test(t.toString())&&(0,r.colorToHex)(t.toString())||t}i.d(t,["NUMBER_FIELDS_REG",0,a])},27978:function(e,t,i){"use strict";i.d(t,{normalizeKeyAliases:function(){return r}});var n=i(81937),o=i(4040);function r(e){let t={},i={meta:1,ctrl:2,control:2,alt:3,shift:4,space:5};return e.replace(/\+\+/g,"+add").split(/[\s]*\+[\s]*/).map(e=>(0,o.trim)(e.toLowerCase())).map(e=>n.KEY_ALIASES[e]||e).sort((e,t)=>i[e]&&!i[t]?-1:!i[e]&&i[t]?1:i[e]&&i[t]?i[e]-i[t]:e>t?1:-1).filter(e=>!t[e]&&""!==e&&(t[e]=!0)).join("+")}},49663:function(e,t,i){"use strict";i.d(t,["normalizeLicense",0,(e,t=8)=>{let i=[];for(;e.length;)i.push(e.substr(0,t)),e=e.substr(t);return i[1]=i[1].replace(/./g,"*"),i[2]=i[2].replace(/./g,"*"),i.join("-")}])},18377:function(e,t,i){"use strict";var n=i(4040);i.d(t,["normalizePath",0,(...e)=>e.filter(e=>(0,n.trim)(e).length).map((t,i)=>(t=t.replace(/([^:])[\\/]+/g,"$1/"),i&&(t=t.replace(/^\//,"")),i!==e.length-1&&(t=t.replace(/\/$/,"")),t)).join("/")])},96340:function(e,t,i){"use strict";i.d(t,["normalizeRelativePath",0,e=>e.split("/").reduce((e,t)=>{switch(t){case"":case".":break;case"..":e.pop();break;default:e.push(t)}return e},[]).join("/")+(e.endsWith("/")?"/":"")])},98831:function(e,t,i){"use strict";i.d(t,["normalizeSize",0,(e,t)=>/^[0-9]+$/.test(e.toString())?e+t:e.toString()])},48009:function(e,t,i){"use strict";i.d(t,["normalizeUrl",0,(...e)=>e.filter(e=>e.length).map(e=>e.replace(/\/$/,"")).join("/").replace(/([^:])[\\/]+/g,"$1/")])},54447:function(e,t,i){"use strict";i.d(t,["getContentWidth",0,(e,t)=>{let i=t.getComputedStyle(e);return e.offsetWidth-parseInt(i.getPropertyValue("padding-left")||"0",10)-parseInt(i.getPropertyValue("padding-right")||"0",10)}])},2373:function(e,t,i){"use strict";function n(e){var t,i;let n=null==(t=e.ownerDocument)?void 0:t.defaultView,o=e.parentElement;for(;n&&o;){if(""!==(i=n.getComputedStyle(o)).transform&&"none"!==i.transform||""!==i.perspective&&"none"!==i.perspective||""!==i.filter&&"none"!==i.filter||"transform"===i.willChange||"perspective"===i.willChange||"filter"===i.willChange||"paint"===i.contain||"layout"===i.contain||"strict"===i.contain||"content"===i.contain){let e=o.getBoundingClientRect();return{x:e.left,y:e.top}}o=o.parentElement}return{x:0,y:0}}i.d(t,{getFixedPositionOffset:function(){return n}})},34027:function(e,t,i){"use strict";i.d(t,{getScrollParent:function(){return function e(t){if(!t)return null;let i=o.Dom.isHTMLElement(t),s=i&&(0,r.css)(t,"overflowY");return i&&"visible"!==s&&"hidden"!==s&&t.scrollHeight>=t.clientHeight?t:e(t.parentNode)||n.globalDocument.scrollingElement||n.globalDocument.body}}});var n=i(81937),o=i(23211),r=i(93640)},86878:function(e,t,i){"use strict";i.d(t,{getContentWidth:function(){return n.getContentWidth},getFixedPositionOffset:function(){return o.getFixedPositionOffset},getScrollParent:function(){return r.getScrollParent},innerWidth:function(){return s.innerWidth},offset:function(){return l.offset},position:function(){return u.position},size:function(){return a.size}});var n=i(54447),o=i(2373),r=i(34027),s=i(83215),a=i(18073),l=i(69143),u=i(23599)},83215:function(e,t,i){"use strict";i.d(t,["innerWidth",0,(e,t)=>{let i=t.getComputedStyle(e);return e.clientWidth-(parseFloat(i.paddingLeft||"0")+parseFloat(i.paddingRight||"0"))}])},18073:function(e,t,i){"use strict";i.d(t,{size:function(){return o}});var n=i(28686);function o(e){return(0,n.isString)(e)||(0,n.isArray)(e)?e.length:(0,n.isPlainObject)(e)?Object.keys(e).length:0}},69143:function(e,t,i){"use strict";let n=(e,t,i,o=!1)=>{let r,s,a;try{r=e.getBoundingClientRect()}catch(e){r={top:0,bottom:0,left:0,right:0,width:0,height:0}}let l=i.body,u=i.documentElement||{clientTop:0,clientLeft:0,scrollTop:0,scrollLeft:0},c=i.defaultView||i.parentWindow,d=c.pageYOffset||u.scrollTop||l.scrollTop,h=c.pageXOffset||u.scrollLeft||l.scrollLeft,p=u.clientTop||l.clientTop||0,m=u.clientLeft||l.clientLeft||0,f=t.iframe;if(!o&&t&&t.options&&t.o.iframe&&f){let{top:e,left:i}=n(f,t,t.od,!0);s=r.top+e,a=r.left+i}else s=r.top+d-p,a=r.left+h-m;return{top:Math.round(s),left:Math.round(a),width:r.width,height:r.height}};i.d(t,["offset",0,n])},23599:function(e,t,i){"use strict";i.d(t,{position:function(){return function e(t,i,o=!1){var r,s;let a=t.getBoundingClientRect(),l=a.left,u=a.top;if((0,n.isJoditObject)(i)&&i.iframe&&i.ed.body.contains(t)&&!o){let{left:t,top:n}=e(i.iframe,i,!0);l+=t,u+=n}return{left:Math.round(l),top:Math.round(u),width:Math.round(null!=(r=t.offsetWidth)?r:a.width),height:Math.round(null!=(s=t.offsetHeight)?s:a.height)}}}});var n=i(24497)},57821:function(e,t,i){"use strict";i.d(t,["camelCase",0,e=>e.replace(/([-_])(.)/g,(e,t,i)=>i.toUpperCase())])},57626:function(e,t,i){"use strict";i.d(t,{fuzzySearchIndex:function(){return o}});var n=i(81937);function o(e,t,i=0,r=1){let s=0,a,l=-1,u=0,c=0;for(a=i;s<e.length&&a<t.length;)e[s].toLowerCase()===t[a].toLowerCase()?(s++,u++,c=0,-1===l&&(l=a)):s>0&&(c>=r&&t[a]!==n.INVISIBLE_SPACE?(s=0,l=-1,u=0,c=0,a--):(c++,u++)),a++;return s===e.length?[l,u]:[-1,0]}},18080:function(e,t,i){"use strict";i.d(t,{i18n:function(){return u}});var n=i(81937),o=i(85932),r=i(99436),s=i(93640),a=i(5266);let l=(e,t)=>{if(!t||!t.length)return e;let i=/%([sd])/g,n=i.exec(e),o=e,r=0;for(;n&&void 0!==t[r];)o=o.replace(n[0],t[r].toString()),r+=1,n=i.exec(e);return o};function u(e,t,i){if(!(0,o.isString)(e))throw(0,s.error)("i18n: Need string in first argument");if(!e.length)return e;let u=!!(null==i?void 0:i.debugLanguage),c={},d=e=>t&&t.length?l(e,t):e,h=(0,s.defaultLanguage)(a.Config.defaultOptions.language,a.Config.defaultOptions.language),p=(0,s.defaultLanguage)(null==i?void 0:i.language,h),m=t=>{if(!t)return;if((0,o.isString)(t[e]))return d(t[e]);let i=e.toLowerCase();if((0,o.isString)(t[i]))return d(t[i]);let n=(0,r.ucfirst)(e);if((0,o.isString)(t[n]))return d(t[n])};void 0!==n.lang[p]?c=n.lang[p]:u||(c=void 0!==n.lang[h]?n.lang[h]:n.lang.en);let f=null==i?void 0:i.i18n;if(f&&f[p]){let e=m(f[p]);if(e)return e}return m(c)||(!u&&n.lang.en&&(0,o.isString)(n.lang.en[e])&&n.lang.en[e]?d(n.lang.en[e]):u?"{"+e+"}":(n.IS_PROD,d(e)))}i.d(t,["sprintf",0,l])},97642:function(e,t,i){"use strict";i.d(t,{CamelCaseToKebabCase:function(){return s.CamelCaseToKebabCase},camelCase:function(){return n.camelCase},fuzzySearchIndex:function(){return o.fuzzySearchIndex},i18n:function(){return r.i18n},kebabCase:function(){return s.kebabCase},sprintf:function(){return r.sprintf},stringify:function(){return a.stringify},trim:function(){return l.trim},trimChars:function(){return l.trimChars},trimInv:function(){return l.trimInv},ucfirst:function(){return u.ucfirst}});var n=i(57821),o=i(57626),r=i(18080),s=i(74264),a=i(3347),l=i(4040),u=i(99436)},74264:function(e,t,i){"use strict";i.d(t,["CamelCaseToKebabCase",0,e=>e.replace(/([A-Z])([A-Z])([a-z])/g,"$1-$2$3").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),"kebabCase",0,e=>e.replace(/([A-Z])([A-Z])([a-z])/g,"$1-$2$3").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()])},3347:function(e,t,i){"use strict";function n(e,t={}){if("object"!=typeof e)return String(e);let i=new Set(t.excludeKeys),o=new WeakMap;return JSON.stringify(e,(e,t)=>{if(!i.has(e)){if("object"==typeof t&&null!=t){if(o.get(t))return"[refObject]";o.set(t,!0)}return t}},t.prettify)}i.d(t,{stringify:function(){return n}})},4040:function(e,t,i){"use strict";i.d(t,{trim:function(){return o},trimChars:function(){return r},trimInv:function(){return s}});var n=i(81937);function o(e){return e.replace((0,n.SPACE_REG_EXP_END)(),"").replace((0,n.SPACE_REG_EXP_START)(),"")}function r(e,t){return e.replace(RegExp(`[${t}]+$`),"").replace(RegExp(`^[${t}]+`),"")}function s(e){return e.replace((0,n.INVISIBLE_SPACE_REG_EXP_END)(),"").replace((0,n.INVISIBLE_SPACE_REG_EXP_START)(),"")}},99436:function(e,t,i){"use strict";function n(e){return e.length?e[0].toUpperCase()+e.substring(1):""}i.d(t,{ucfirst:function(){return n}})},16849:function(e,t,i){"use strict";i.d(t,{alignElement:function(){return u},clearAlign:function(){return a},hAlignElement:function(){return s}});var n=i(27795),o=i(7909),r=i(80991);function s(e,t){t&&"normal"!==t?"center"!==t?((0,r.css)(e,"float",t),(0,r.clearCenterAlign)(e)):(0,r.css)(e,{float:"",display:"block",marginLeft:"auto",marginRight:"auto"}):((0,r.css)(e,"float")&&-1!==["right","left"].indexOf((0,r.css)(e,"float").toString().toLowerCase())&&(0,r.css)(e,"float",""),(0,r.clearCenterAlign)(e))}function a(e){n.Dom.each(e,e=>{n.Dom.isHTMLElement(e)&&(0,r.cssInline)(e,"textAlign")&&((0,r.css)(e,"textAlign",""),((0,o.attr)(e,"style")||"").trim().length||(0,o.attr)(e,"style",null))})}let l=new Map([["justifyfull","justify"],["justifyright","right"],["justifyleft","left"],["justifycenter","center"]]);function u(e,t){if(n.Dom.isNode(t)&&n.Dom.isElement(t)){a(t);let i=l.get(e.toLowerCase());i&&(0,r.css)(t,"textAlign",i)}}},47760:function(e,t,i){"use strict";i.d(t,{loadNext:function(){return function e(t,i,n=0){return(0,o.isString)(i[n])?u(t,i[n]).then(()=>e(t,i,n+1)):Promise.resolve()}},loadNextStyle:function(){return function e(t,i,n=0){return(0,o.isString)(i[n])?c(t,i[n]).then(()=>e(t,i,n+1)):Promise.resolve()}}});var n=i(23211),o=i(85932),r=i(7909),s=i(91321);let a=new Map,l=e=>(t,i)=>{if(a.has(i))return a.get(i);let n=e(t,i);return a.set(i,n),n},u=l((e,t)=>e.async.promise((i,o)=>{if(e.isInDestruct)return o();let a=e.c.element("script",{type:"text/javascript",crossorigin:"anonymous",referrerpolicy:"no-referrer",async:!0,src:(0,s.completeUrl)(t)});e.o.nonce&&(0,r.attr)(a,"nonce",e.o.nonce),e.e.one(a,"error",o).one(a,"load",i),n.Dom.append(e.od.body,a)})),c=l((e,t)=>e.async.promise((i,o)=>{if(e.isInDestruct)return o();let a=e.c.element("link",{rel:"stylesheet",media:"all",crossorigin:"anonymous"});e.o.nonce&&(0,r.attr)(a,"nonce",e.o.nonce),e.isInDestruct||e.e.on(a,"load",()=>i(a)).on(a,"error",o),(0,r.attr)(a,"href",(0,s.completeUrl)(t)),e.o.shadowRoot?n.Dom.append(e.o.shadowRoot,a):n.Dom.append(e.od.body,a)}));i.d(t,["alreadyLoadedList",0,a,"appendScriptAsync",0,u,"appendStyleAsync",0,c])},7909:function(e,t,i){"use strict";i.d(t,{attr:function(){return function e(t,i,l){if(!t||!(0,n.isFunction)(t.getAttribute))return null;if(!(0,r.isString)(i))return Object.keys(i).forEach(n=>{let r=i[n];(0,o.isPlainObject)(r)&&"style"===n?(0,a.css)(t,r):("className"===n&&(n="class"),e(t,n,r))}),null;let u=(0,s.CamelCaseToKebabCase)(i);if(/^-/.test(u)){let i=e(t,`data${u}`);if(i)return i;u=u.substr(1)}if(void 0!==l)if(null==l)t.hasAttribute(u)&&t.removeAttribute(u);else{let e=l.toString();return"IMG"===t.nodeName&&("width"===u||"height"===u)&&(e=e.replace("px","")),t.setAttribute(u,e),e}return t.getAttribute(u)}},attrRaw:function(){return l}});var n=i(91565),o=i(62101),r=i(85932),s=i(74264),a=i(80991);function l(e,t,i){if(void 0===i)return e.getAttribute(t);if(null==i){e.hasAttribute(t)&&e.removeAttribute(t);return}e.setAttribute(t,i)}},26136:function(e,t,i){"use strict";i.d(t,["browser",0,e=>{let t=navigator.userAgent.toLowerCase(),i=/(firefox)[\s/]([\w.]+)/.exec(t)||/(chrome)[\s/]([\w.]+)/.exec(t)||/(webkit)[\s/]([\w.]+)/.exec(t)||/(opera)(?:.*version)[\s/]([\w.]+)/.exec(t)||/(msie)[\s]([\w.]+)/.exec(t)||/(trident)\/([\w.]+)/.exec(t)||0>t.indexOf("compatible")||[];return"version"===e?i[2]:"webkit"===e?"chrome"===i[1]||"webkit"===i[1]:"ff"===e?"firefox"===i[1]:"msie"===e?"trident"===i[1]||"msie"===i[1]:i[1]===e}])},36833:function(e,t,i){"use strict";var n=i(62101);let o=(e,t)=>{let i=[],r=encodeURIComponent;for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s)){let a=t?t+"["+s+"]":s,l=e[s];i.push((0,n.isPlainObject)(l)?o(l,a):r(a)+"="+r(l))}return i.join("&")};i.d(t,["buildQuery",0,o])},91321:function(e,t,i){"use strict";var n=i(81937);i.d(t,["completeUrl",0,e=>("file:"===n.globalWindow.location.protocol&&/^\/\//.test(e)&&(e="https:"+e),e)])},77483:function(e,t,i){"use strict";i.d(t,{ConfigDeepFlatten:function(){return function e(t){return(0,c.keys)(t,!1).reduce((i,n)=>(i[n]=(0,o.isPlainObject)(t[n])?e(t[n]):t[n],i),{})}},ConfigFlatten:function(){return d},ConfigMerge:function(){return function e(t,i){Object.keys(i).forEach(n=>{if((0,u.isUnsafeProtoKey)(n))return;let r=i[n],s=t[n];(0,o.isPlainObject)(r)&&(0,o.isPlainObject)(s)&&!(0,l.isAtom)(r)?e(s,r):t[n]=r})}},ConfigProto:function(){return function e(t,i,c=0){if(Object.getPrototypeOf(t)!==Object.prototype)return t;let d=a.Config.defaultOptions;if((0,r.isString)(t.preset)){if(void 0!==d.presets[t.preset]){let e=d.presets[t.preset];Object.keys(e).forEach(i=>{(0,s.isVoid)(t[i])&&(t[i]=e[i])})}delete t.preset}let h={};return Object.keys(t).forEach(r=>{if((0,u.isUnsafeProtoKey)(r))return;let s=t[r],a=i?i[r]:null;if((0,o.isPlainObject)(s)&&(0,o.isPlainObject)(a)&&!(0,l.isAtom)(s)){h[r]=e(s,a,c+1);return}if(0!==c&&(0,n.isArray)(s)&&!(0,l.isAtom)(s)&&(0,n.isArray)(a)){h[r]=[...s,...a.slice(s.length)];return}h[r]=s}),Object.setPrototypeOf(h,i),h}}});var n=i(17312),o=i(62101),r=i(85932),s=i(18303),a=i(5266),l=i(54794),u=i(78048),c=i(71125);function d(e){return(0,c.keys)(e,!1).reduce((t,i)=>(t[i]=e[i],t),{})}},3856:function(e,t,i){"use strict";var n=i(81937),o=i(91764),r=i(36310);i.d(t,["convertMediaUrlToVideoEmbed",0,(e,{width:t=400,height:i=345}={})=>{if(!(0,o.isURL)(e))return e;let s=n.globalDocument.createElement("a");s.href=e,t||(t=400),i||(i=345);let a=s.protocol||"";switch(s.hostname){case"www.vimeo.com":case"vimeo.com":{let n=s.pathname.split("/").filter(Boolean),o=n.findIndex(e=>/^\d+$/.test(e));if(-1===o)return e;let r=n[o],l=n[o+1];return l&&0===o&&(r+="/"+l),'<iframe width="'+t+'" height="'+i+'" src="'+a+"//player.vimeo.com/video/"+r+'" frameborder="0" allowfullscreen></iframe>'}case"youtube.com":case"www.youtube.com":case"m.youtube.com":case"music.youtube.com":case"youtu.be":case"www.youtu.be":{let n=(s.search?(0,r.parseQuery)(s.search):{}).v||s.pathname.substring(1);return(n=n.replace(/^(watch|embed|shorts|live|v)\//,"").replace(/\/$/,""))?'<iframe width="'+t+'" height="'+i+'" src="'+a+"//www.youtube.com/embed/"+n+'" frameborder="0" allowfullscreen></iframe>':e}}return e}])},80991:function(e,t,i){"use strict";i.d(t,{css:function(){return l},cssInline:function(){return u}});var n=i(22289),o=i(62101),r=i(19147),s=i(57821),a=i(74264);function l(e,t,i,u=!1){if((0,n.isBoolean)(i)&&(u=i,i=void 0),(0,o.isPlainObject)(t)||void 0!==i){let n=(e,t,i)=>{void 0!==(i=(0,r.normalizeCssNumericValue)(t,i))&&(null==i||l(e,t,!0)!==(0,r.normalizeCssValue)(t,i))&&(e.style[t]=i)};if((0,o.isPlainObject)(t)){let i=Object.keys(t);for(let o=0;o<i.length;o+=1)n(e,(0,s.camelCase)(i[o]),t[i[o]])}else n(e,(0,s.camelCase)(t),i);return""}let c=(0,a.kebabCase)(t),d=e.ownerDocument||document,h=!!d&&(d.defaultView||d.parentWindow),p=e.style[t],m="";return void 0!==p&&""!==p?m=p:h&&!u&&(m=h.getComputedStyle(e).getPropertyValue(c)),r.NUMBER_FIELDS_REG.test(t)&&/^[-+]?[0-9.]+px$/.test(m.toString())&&(m=parseInt(m.toString(),10)),(0,r.normalizeCssValue)(t,m)}function u(e,t){return e.style.getPropertyValue((0,a.kebabCase)(t))}i.d(t,["clearCenterAlign",0,e=>{"block"===l(e,"display")&&l(e,"display","");let{style:t}=e;"auto"===t.marginLeft&&"auto"===t.marginRight&&(t.marginLeft="",t.marginRight="")}])},77213:function(e,t,i){"use strict";i.d(t,["ctrlKey",0,e=>{if("u">typeof navigator&&-1!==navigator.userAgent.indexOf("Mac OS X")){if(e.metaKey&&!e.altKey)return!0}else if(e.ctrlKey&&!e.altKey)return!0;return!1}])},36400:function(e,t,i){"use strict";var n=i(31534);let o=new WeakMap;i.d(t,["dataBind",0,(e,t,i)=>{let r=o.get(e);if(!r){r={},o.set(e,r);let t=null;(0,n.isViewObject)(e.j)&&(t=e.j.e),(0,n.isViewObject)(e)&&(t=e.e),t&&t.on("beforeDestruct",()=>{o.delete(e)})}return void 0===i?r[t]:(r[t]=i,i)}])},97228:function(e,t,i){"use strict";var n=i(81937),o=i(85932);i.d(t,["defaultLanguage",0,(e,t="en")=>"auto"!==e&&(0,o.isString)(e)?e:n.globalDocument.documentElement&&n.globalDocument.documentElement.lang?n.globalDocument.documentElement.lang:navigator.language?navigator.language.substring(0,2):t])},38027:function(e,t,i){"use strict";i.d(t,{connection:function(){return r},error:function(){return o},options:function(){return s}});var n=i(29953);function o(e){return TypeError(e)}function r(e){return new n.ConnectionError(e)}function s(e){return new n.OptionsError(e)}},14228:function(e,t,i){"use strict";function n(e="Aborted"){return new DOMException(e,"AbortError")}i.d(t,{abort:function(){return n}})},58250:function(e,t,i){"use strict";i.d(t,{ConnectionError:function(){return n}});class n extends Error{constructor(e){super(e),Object.setPrototypeOf(this,n.prototype)}}},29953:function(e,t,i){"use strict";i.d(t,{ConnectionError:function(){return o.ConnectionError},OptionsError:function(){return r.OptionsError},abort:function(){return n.abort}});var n=i(14228),o=i(58250),r=i(11080)},11080:function(e,t,i){"use strict";i.d(t,{OptionsError:function(){return n}});class n extends TypeError{constructor(e){super(e),Object.setPrototypeOf(this,n.prototype)}}},33201:function(e,t,i){"use strict";i.d(t,{ConnectionError:function(){return o.ConnectionError},OptionsError:function(){return o.OptionsError},abort:function(){return o.abort},connection:function(){return n.connection},error:function(){return n.error},options:function(){return n.options}});var n=i(38027),o=i(29953)},54794:function(e,t,i){"use strict";i.d(t,{fastClone:function(){return s},isAtom:function(){return o},markAsAtomic:function(){return r}});var n=i(3347);function o(e){return e&&e.isAtom}function r(e){return Object.defineProperty(e,"isAtom",{enumerable:!1,value:!0,configurable:!1}),e}function s(e){return JSON.parse((0,n.stringify)(e))}},421:function(e,t,i){"use strict";var n=i(91565);let o=new Map;i.d(t,["getClassName",0,e=>{var t;if((0,n.isFunction)(e.className))return e.className();let i=(null==(t=e.constructor)?void 0:t.originalConstructor)||e.constructor;if(o.has(i))return o.get(i);if(i.name)return i.name;let r=new RegExp(/^\s*function\s*(\S*)\s*\(/),s=i.toString().match(r);return s?s[1]:""},"keepNames",0,o])},89308:function(e,t,i){"use strict";i.d(t,{get:function(){return r}});var n=i(85932),o=i(18303);function r(e,t){if(!(0,n.isString)(e)||!e.length)return null;let i=e.split("."),r=t;try{for(let e of i){if((0,o.isVoid)(r[e]))return null;r=r[e]}}catch(e){return null}return(0,o.isVoid)(r)?null:r}},37427:function(e,t,i){"use strict";i.d(t,["humanSizeToBytes",0,e=>{if(/^[0-9.]+$/.test(e.toString()))return parseFloat(e);let t=e.substr(-2,2).toUpperCase(),i=["KB","MB","GB","TB"],n=parseFloat(e.substr(0,e.length-2));return -1!==i.indexOf(t)?n*Math.pow(1024,i.indexOf(t)+1):parseInt(e,10)}])},93640:function(e,t,i){"use strict";i.r(t),i.d(t,{$$:function(){return x.$$},ConfigDeepFlatten:function(){return h.ConfigDeepFlatten},ConfigFlatten:function(){return h.ConfigFlatten},ConfigMerge:function(){return h.ConfigMerge},ConfigProto:function(){return h.ConfigProto},ConnectionError:function(){return v.ConnectionError},LimitedStack:function(){return z.LimitedStack},OptionsError:function(){return v.OptionsError},UNSAFE_PROTO_KEYS:function(){return S.UNSAFE_PROTO_KEYS},abort:function(){return v.abort},alignElement:function(){return n.alignElement},alreadyLoadedList:function(){return o.alreadyLoadedList},appendScriptAsync:function(){return o.appendScriptAsync},appendStyleAsync:function(){return o.appendStyleAsync},attr:function(){return l.attr},attrRaw:function(){return l.attrRaw},browser:function(){return u.browser},buildQuery:function(){return c.buildQuery},call:function(){return L.call},callPromise:function(){return L.callPromise},callThis:function(){return L.callThis},clearAlign:function(){return n.clearAlign},clearCenterAlign:function(){return m.clearCenterAlign},cns:function(){return C.cns},completeUrl:function(){return d.completeUrl},connection:function(){return v.connection},convertMediaUrlToVideoEmbed:function(){return p.convertMediaUrlToVideoEmbed},css:function(){return m.css},cssInline:function(){return m.cssInline},cssPath:function(){return x.cssPath},ctrlKey:function(){return f.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 x.getXPathByElement},hAlignElement:function(){return n.hAlignElement},humanSizeToBytes:function(){return k.humanSizeToBytes},inView:function(){return D.inView},isAtom:function(){return b.isAtom},isUnsafeProtoKey:function(){return S.isUnsafeProtoKey},keepNames:function(){return w.keepNames},keys:function(){return L.keys},loadImage:function(){return L.loadImage},loadNext:function(){return o.loadNext},loadNextStyle:function(){return o.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 T.previewBox},refs:function(){return x.refs},reset:function(){return I.reset},resolveElement:function(){return x.resolveElement},scrollIntoViewIfNeeded:function(){return D.scrollIntoViewIfNeeded},set:function(){return j.set}});var n=i(16849),o=i(47760),r=i(28712),s={};for(var a in r)0>["default","alignElement","clearAlign","hAlignElement","alreadyLoadedList","appendScriptAsync","appendStyleAsync","loadNext","loadNextStyle"].indexOf(a)&&(s[a]=(function(e){return r[e]}).bind(0,a));i.d(t,s);var l=i(7909),u=i(26136),c=i(36833),d=i(91321),h=i(77483),p=i(3856),m=i(80991),f=i(77213),g=i(36400),_=i(97228),v=i(33201),b=i(54794),y=i(89308),w=i(421),k=i(37427),S=i(78048),C=i(49385),E=i(36310),T=i(57075),I=i(43379),D=i(60898),x=i(28723),j=i(52144),z=i(42820),L=i(71125)},78048:function(e,t,i){"use strict";i.d(t,{isUnsafeProtoKey:function(){return o}});let n=["__proto__","constructor","prototype"];function o(e){return -1!==n.indexOf(e)}i.d(t,["UNSAFE_PROTO_KEYS",0,n])},49385:function(e,t,i){"use strict";i.d(t,{markDeprecated:function(){return o}});let n=console;function o(e,t=[""],i=null){return(...o)=>(n.warn(`Method "${t[0]}" deprecated.`+(t[1]?` Use "${t[1]}" instead`:"")),e.call(i,...o))}i.d(t,["cns",0,n])},36310:function(e,t,i){"use strict";i.d(t,["parseQuery",0,e=>{let t={},i=e.substring(1).split("&");for(let e=0;e<i.length;e+=1){let n=i[e].split("=");t[decodeURIComponent(n[0])]=decodeURIComponent(n[1]||"")}return t}])},57075:function(e,t,i){"use strict";i.d(t,{previewBox:function(){return a}});var n=i(23211),o=i(85932),r=i(7909),s=i(80991);function a(e,t,i="px",l=null){let u=[],c=function(e,t){let i=[],o=[];n.Dom.each(e.editor,e=>{n.Dom.isTag(e,"img")&&o.push(e)});try{o.forEach(o=>{let s=[(0,r.attr)(o,"width"),(0,r.attr)(o,"height"),(0,r.attr)(o,"src")];(0,r.attr)(o,{width:o.offsetWidth+t,height:o.offsetHeight+t});let a=e.createInside.a();n.Dom.append(e.ed.body,a),(0,r.attr)(a,"href",(0,r.attr)(o,"src")||""),(0,r.attr)(o,"src",a.href),n.Dom.safeRemove(a),i.push(()=>{(0,r.attr)(o,{src:s[2],width:s[0]||null,height:s[1]||null})})})}catch(e){throw i.forEach(e=>e()),i.length=0,e}return i}(e,i);try{let a=e.e.fire("beforePreviewBox",t,i);if(null!=a)return a;let c=e.c.div("jodit__preview-box jodit-context");l&&n.Dom.append(l,c),(0,s.css)(c,{position:"relative",padding:16});let d=e.value||`<div style='position: absolute;left:50%;top:50%;transform: translateX(-50%) translateY(-50%);color:#ccc;'>${e.i18n("Empty")}</div>`;if(e.iframe){let t=e.create.element("iframe");(0,s.css)(t,{minWidth:800,minHeight:600,border:0}),n.Dom.append(c,t);let i=t.contentWindow;if(i&&(e.e.fire("generateDocumentStructure.iframe",i.document,e),c=i.document.body,"function"==typeof ResizeObserver)){let n=!1,o=i.document.body,r=new ResizeObserver(e.async.debounce(()=>{r.unobserve(o),(0,s.css)(t,"height",o.offsetHeight+20),e.async.requestAnimationFrame(()=>{n||r.observe(o)})},100)),a=()=>{n=!0,r.unobserve(o),r.disconnect(),e.e.off("beforeDestruct",a)};u.push(a),e.e.on("beforeDestruct",a)}}else(0,s.css)(c,{minWidth:1024,minHeight:600,border:0});let h=(t,i)=>{let s=(0,o.isString)(i)?e.c.div():i;(0,o.isString)(i)&&(s.innerHTML=i);for(let e=0;e<s.childNodes.length;e+=1){let i=s.childNodes[e];if(n.Dom.isElement(i)){let e=t.ownerDocument.createElement(i.nodeName);for(let t=0;t<i.attributes.length;t+=1)(0,r.attr)(e,i.attributes[t].name,i.attributes[t].value);0===i.childNodes.length||n.Dom.isTag(i,"table")?"SCRIPT"===i.nodeName?i.textContent&&(e.textContent=i.textContent):i.innerHTML&&(e.innerHTML=i.innerHTML):h(e,i);try{n.Dom.append(t,e)}catch(e){}}else try{n.Dom.append(t,i.cloneNode(!0))}catch(e){}}};return h(c,d),e.e.fire("afterPreviewBox",c),[c,()=>{u.forEach(e=>e())}]}finally{c.forEach(e=>e())}}},43379:function(e,t,i){"use strict";i.d(t,{reset:function(){return a}});var n=i(81937),o=i(91565),r=i(89308);let s={};function a(e){var t,i;if(!(e in s)){let t=n.globalDocument.createElement("iframe");try{if(t.src="about:blank",n.globalDocument.body.appendChild(t),!t.contentWindow)return null;let i=(0,r.get)(e,t.contentWindow),a=(0,r.get)(e.split(".").slice(0,-1).join("."),t.contentWindow);(0,o.isFunction)(i)&&(s[e]=i.bind(a))}catch(e){if(!n.IS_PROD)throw e}finally{null==(i=t.parentNode)||i.removeChild(t)}}return null!=(t=s[e])?t:null}},60898:function(e,t,i){"use strict";i.d(t,{inView:function(){return o},scrollIntoViewIfNeeded:function(){return r}});var n=i(23211);function o(e,t,i){let n=e.getBoundingClientRect(),o=e,r=n.top,s=n.height;for(;o&&o!==t&&o.parentNode;)if(r+s>(n=(o=o.parentNode).getBoundingClientRect()).bottom+1&&r>n.top||r+s<=n.top)return!1;return(r+s<=(i.documentElement&&i.documentElement.clientHeight||0)+1||r<=0)&&r+s>=0}function r(e,t,i){if(n.Dom.isHTMLElement(e)&&!o(e,t,i)){if(t.clientHeight!==t.scrollHeight){let i=e.offsetTop+e.offsetHeight-t.clientHeight;t.scrollTop=t.scrollTop<i?i:e.offsetTop}o(e,t,i)||e.scrollIntoView({block:"nearest"})}}},28723:function(e,t,i){"use strict";i.d(t,{$$:function(){return d},resolveElement:function(){return p}});var n=i(81937),o=i(23211),r=i(88475),s=i(85932),a=i(57821),l=i(7909),u=i(33201);let c=1;function d(e,t){let i;if(!n.IS_ES_NEXT&&/:scope/.test(e)&&n.IS_IE&&!(t&&t.nodeType===Node.DOCUMENT_NODE)){let n=t.id,o=n||"_selector_id_"+String(Math.random()).slice(2)+ ++c;e=e.replace(/:scope/g,"#"+o),n||t.setAttribute("id",o),i=t.parentNode.querySelectorAll(e),n||t.removeAttribute("id")}else i=t.querySelectorAll(e);return[].slice.call(i)}let h=(e,t)=>{if(!e||e.nodeType!==Node.ELEMENT_NODE||!e.parentNode||t===e)return"";if(e.id)return"//*[@id='"+e.id+"']";let i=[].filter.call(e.parentNode.childNodes,t=>t.nodeName===e.nodeName);return h(e.parentNode,t)+"/"+e.nodeName.toLowerCase()+(i.length>1?"["+((0,r.toArray)(i).indexOf(e)+1)+"]":"")};function p(e,t){let i=e;if((0,s.isString)(e))try{i=t.querySelector(e)}catch(t){throw(0,u.error)('String "'+e+'" should be valid HTML selector')}if(!i||"object"!=typeof i||!o.Dom.isElement(i)||!i.cloneNode)throw(0,u.error)('Element "'+e+'" should be string or HTMLElement instance');return i}i.d(t,["cssPath",0,e=>{if(!o.Dom.isElement(e))return null;let t=[],i=e;for(;i&&i.nodeType===Node.ELEMENT_NODE;){let e=i.nodeName.toLowerCase();if(i.id){e+="#"+i.id,t.unshift(e);break}{let t=i,n=1;do(t=t.previousElementSibling)&&t.nodeName.toLowerCase()===e&&n++;while(t);e+=":nth-of-type("+n+")"}t.unshift(e),i=i.parentNode}return t.join(" > ")},"getXPathByElement",0,h,"refs",0,e=>{"container"in e&&(e=e.container);let t={};return o.Dom.each(e,e=>{if(o.Dom.isElement(e)&&(e.hasAttribute("ref")||e.hasAttribute("data-ref"))){let i=(0,l.attr)(e,"-ref");i&&(0,s.isString)(i)&&(t[(0,a.camelCase)(i)]=e,t[i]=e)}}),t}])},52144:function(e,t,i){"use strict";i.d(t,{set:function(){return l}});var n=i(17312),o=i(70222),r=i(62101),s=i(85932),a=i(78048);function l(e,t,i){if(!(0,s.isString)(e)||!e.length)return;let l=e.split(".");if(l.some(a.isUnsafeProtoKey))return;let u=i;for(let e=0;e<l.length-1;e+=1){let t=l[e];(0,n.isArray)(u[t])||(0,r.isPlainObject)(u[t])||(u[t]=(0,o.isNumeric)(l[e+1])?[]:{}),u=u[t]}u&&(u[l[l.length-1]]=t)}},42820:function(e,t,i){"use strict";i.d(t,{LimitedStack:function(){return o}});var n=i(25045);class o{push(e){return this.stack.push(e),this.stack.length>this.limit&&this.stack.shift(),this}pop(){return this.stack.pop()}find(e){return this.stack.find(e)}constructor(e){(0,n._)(this,"limit",void 0),(0,n._)(this,"stack",void 0),this.limit=e,this.stack=[]}}},71125:function(e,t,i){"use strict";i.d(t,{call:function(){return a},callPromise:function(){return c},callThis:function(){return l},getPropertyDescriptor:function(){return d},markOwner:function(){return u}});var n=i(52100),o=i(18303),r=i(7909),s=i(36400);function a(e,...t){return e(...t)}function l(e,t,...i){return e.apply(t,i)}function u(e,t){(0,r.attr)(t,"data-editor_id",e.id),t.component||Object.defineProperty(t,"jodit",{value:e})}function c(e,t){return(0,n.isPromise)(e)?e.then(e=>e,()=>null).finally(t):null==t?void 0:t()}function d(e,t){let i;do i=Object.getOwnPropertyDescriptor(e,t),e=Object.getPrototypeOf(e);while(!i&&e);return i}i.d(t,["getDataTransfer",0,e=>{if(e.clipboardData)return e.clipboardData;try{return e.dataTransfer||new DataTransfer}catch(e){return null}},"keys",0,(e,t=!0)=>{if(t)return Object.keys(e);let i=[];for(let t in e)i.push(t);return i},"loadImage",0,(e,t)=>t.async.promise((i,n)=>{let o=new Image,r=()=>{t.e.off(o),null==n||n()},s=()=>{t.e.off(o),i(o)};t.e.one(o,"load",s).one(o,"error",r).one(o,"abort",r),o.src=e,o.complete&&s()}),"memorizeExec",0,(e,t,{control:i},n)=>{var r;let a=`button${i.command}`,l=null!=(r=i.args&&i.args[0])?r:(0,s.dataBind)(e,a);if((0,o.isVoid)(l))return!1;(0,s.dataBind)(e,a,l),n&&(l=n(l)),e.execCommand(i.command,!1,null!=l?l:void 0)}])},55810:function(e,t,i){"use strict";i.d(t,{init:function(){return s}});var n=i(81937),o=i(52433),r=i(3050);function s(e,t,i,s,a,l,u){if((0,o.isInitable)(s))try{s.init(e)}catch(e){if(!n.IS_PROD)throw e}a.set(t,s),l.delete(t),s.hasStyle&&(0,r.loadStyle)(e,t).catch(e=>{n.IS_PROD}),s.styles&&(u(e,t,"style").innerHTML=s.styles)}},3050:function(e,t,i){"use strict";i.d(t,{loadExtras:function(){return c},loadStyle:function(){return l}});var n=i(81937),o=i(74264),r=i(47760),s=i(86189);let a=new Set;async function l(e,t){let i=u(e,t,!1);if(!a.has(i))return a.add(i),(0,r.appendStyleAsync)(e,i)}function u(e,t,i){t=(0,o.kebabCase)(t);let n=e.minified?".min":"";return e.basePath+"plugins/"+t+"/"+t+n+"."+(i?"js":"css")}function c(e,t,i,o){try{let n=i.filter(t=>!e.has((0,s.normalizeName)(t.name)));n.length&&n.map(e=>{let i=e.url||u(t,e.name,!0);return(0,r.appendScriptAsync)(t,i).then(o).catch(()=>null)})}catch(e){if(!n.IS_PROD)throw e}}},25974:function(e,t,i){"use strict";i.d(t,{makeInstance:function(){return r}});var n=i(81937),o=i(91565);function r(e,t){try{try{return(0,o.isFunction)(t)?new t(e):t}catch(i){if((0,o.isFunction)(t)&&!t.prototype)return t(e)}}catch(e){if(!n.IS_PROD)throw e}return null}},86189:function(e,t,i){"use strict";i.d(t,{normalizeName:function(){return o}});var n=i(74264);function o(e){return(0,n.kebabCase)(e).toLowerCase()}},91206:function(e,t,i){"use strict";i.d(t,{Plugin:function(){return n.Plugin}});var n=i(18855);i(85305)},85305:function(e,t,i){"use strict";i.d(t,{PluginSystem:function(){return m}});var n=i(25045),o=i(81937),r=i(42689),s=i(32328),a=i(17312),l=i(52433),u=i(85932),c=i(55810),d=i(3050),h=i(25974),p=i(86189);class m{get size(){return this.__items.size}add(e,t){this.__items.set((0,p.normalizeName)(e),t),r.eventEmitter.fire(`plugin:${e}:ready`)}get(e){return this.__items.get((0,p.normalizeName)(e))}remove(e){this.__items.delete((0,p.normalizeName)(e))}__getFullPluginsList(e){let t=[];return this.__items.forEach((i,n)=>{(!e||e.has(n))&&t.push([n,i])}),t}__init(e){let{extraList:t,disableList:i,filter:n}={extraList:e.o.extraPlugins.map(e=>(0,u.isString)(e)?{name:e}:e),disableList:new Set((0,s.splitArray)(e.o.disablePlugins).map(p.normalizeName)),filter:e.o.safeMode?new Set(e.o.safePluginsList):null},r=new Map,m={},f=new Set;e.__plugins=m;let g=()=>{if(e.isInDestruct)return;let t=!1;this.__getFullPluginsList(n).forEach(([n,o])=>{if(i.has(n)||r.has(n))return;let s=null==o?void 0:o.requires;if(s&&(0,a.isArray)(s)&&s.length){if(s.some(e=>i.has(e)))return;if(!s.every(e=>r.has(e)))return void f.add(n)}t=!0;let l=(0,h.makeInstance)(e,o);if(!l){r.set(n,null),f.delete(n);return}(0,c.init)(e,n,o,l,r,f,this.opts.getContainer),m[n]=l}),t&&(e.e.fire("updatePlugins"),g())};t&&t.length&&(0,d.loadExtras)(this.__items,e,t,g),g(),e.e.on("beforeDestruct",()=>{Object.keys(m).forEach(t=>{let i=m[t];(0,l.isDestructable)(i)&&i.destruct(e),delete m[t]}),delete e.__plugins}),o.IS_PROD||f.size}wait(e){return new Promise(t=>{if(this.get(e))return t();let i=()=>{t(),r.eventEmitter.off(`plugin:${e}:ready`,i)};r.eventEmitter.on(`plugin:${e}:ready`,i)})}constructor(e){(0,n._)(this,"opts",void 0),(0,n._)(this,"__items",void 0),this.opts=e,this.__items=new Map}}},18855:function(e,t,i){"use strict";i.d(t,{Plugin:function(){return l}});var n=i(25045),o=i(31635),r=i(16964),s=i(84839),a=i(24497);class l extends r.ViewComponent{className(){return"Plugin"}__afterPluginSystemInit(){let{j:e,buttons:t}=this;t&&(0,a.isJoditObject)(e)&&t.forEach(t=>{e.registerButton(t)})}__afterInit(){this.__inited=!0,this.setStatus(r.STATUSES.ready),this.afterInit(this.jodit)}init(e){this.jodit.isReady&&(this.afterInit(this.jodit),this.__afterPluginSystemInit(),this.jodit.e.fire("rebuildToolbar"))}__beforeDestruct(){if(this.isInDestruct)return;let{j:e}=this;if(e.e.off("afterPluginSystemInit",this.__afterPluginSystemInit).off("afterInit",this.__afterInit).off("beforeDestruct",this.destruct),this.setStatus(r.STATUSES.beforeDestruct),!this.__inited)return super.destruct();if((0,a.isJoditObject)(e)){var t;null==(t=this.buttons)||t.forEach(t=>{null==e||e.unregisterButton(t)})}this.beforeDestruct(this.j),super.destruct()}constructor(e){super(e),(0,n._)(this,"buttons",[]),(0,n._)(this,"hasStyle",!1),(0,n._)(this,"styles",void 0),(0,n._)(this,"__inited",!1),e.e.on("afterPluginSystemInit",this.__afterPluginSystemInit).on("afterInit",this.__afterInit).on("beforeDestruct",this.__beforeDestruct)}}(0,n._)(l,"requires",[]),(0,o.__decorate)([s.autobind],l.prototype,"__afterPluginSystemInit",null),(0,o.__decorate)([s.autobind],l.prototype,"__afterInit",null),(0,o.__decorate)([s.autobind],l.prototype,"__beforeDestruct",null)},17338:function(e,t,i){"use strict";i.d(t,{Ajax:function(){return h}});var n=i(25045),o=i(31635),r=i(91231),s=i(81937),a=i(49574),l=i(65946),u=i(33201),c=i(5266);i(37102);var d=i(32855);class h{className(){return"Ajax"}__buildParams(e,t){return(0,l.isPlainObject)(e)&&this.options.contentType&&this.options.contentType.includes("application/json")?JSON.stringify(e):(0,l.isFunction)(this.o.queryBuild)?this.o.queryBuild.call(this,e,t):(0,l.isString)(e)||e instanceof s.globalWindow.FormData||"object"==typeof e&&null!=e&&(0,l.isFunction)(e.append)?e:(0,l.buildQuery)(e)}get o(){return this.options}abort(){if(this.__isFulfilled)return this;try{this.__isFulfilled=!0,this.xhr.abort()}catch(e){}return this}send(){this.__activated=!0;let{xhr:e,o:t}=this,i=this.prepareRequest();return this.__async.promise(async(n,o)=>{var r;let s=()=>{this.__isFulfilled=!0,o(u.connection("Connection error"))},a=()=>{this.__isFulfilled=!0,n(new d.Response(i,e.status,e.statusText,!e.responseType?e.responseText:e.response))};e.onload=a,e.onabort=()=>{this.__isFulfilled=!0,o(u.abort("Abort connection"))},e.onerror=s,e.ontimeout=s,t.responseType&&(e.responseType=t.responseType),e.onprogress=e=>{var t,i;let n=0;e.lengthComputable&&(n=e.loaded/e.total*100),null==(t=(i=this.options).onProgress)||t.call(i,n)},e.onreadystatechange=()=>{var i,n;null==(i=(n=this.options).onProgress)||i.call(n,10),e.readyState===XMLHttpRequest.DONE&&(t.successStatuses.includes(e.status)?a():e.statusText&&(this.__isFulfilled=!0,o(u.connection(e.statusText))))},e.withCredentials=null!=(r=t.withCredentials)&&r;let{url:c,data:h,method:p}=i;e.open(p,c,!0),t.contentType&&e.setRequestHeader&&e.setRequestHeader("Content-type",t.contentType);let{headers:m}=t;(0,l.isFunction)(m)&&(m=await m.call(this)),m&&e.setRequestHeader&&Object.keys(m).forEach(t=>{e.setRequestHeader(t,m[t])}),this.__async.setTimeout(()=>{e.send(h?this.__buildParams(h):void 0)},0)})}async *stream(){var e;this.__activated=!0;let{xhr:t,o:i}=this,n=this.prepareRequest(),o=0,r="",s=[],a=null,c=!1,d=null,h=()=>{if(a){let e=a;a=null,e()}},p=e=>{var i;let n=t.responseText;r+=n.substring(o),o=n.length;let a=r.split("\n\n");for(let t of(r=e?"":null!=(i=a.pop())?i:"",a)){let e=t.trim();if(!e)continue;let i=[];for(let t of e.split("\n"))t.startsWith("data: ")?i.push(t.slice(6)):t.startsWith("data:")&&i.push(t.slice(5));i.length&&s.push(i.join("\n"))}h()};t.onprogress=()=>p(!1),t.onload=()=>{p(!0),c=!0,this.__isFulfilled=!0,h()},t.onerror=()=>{d=u.connection("Connection error"),c=!0,this.__isFulfilled=!0,h()},t.onabort=()=>{d=u.abort("Abort connection"),c=!0,this.__isFulfilled=!0,h()},t.withCredentials=null!=(e=i.withCredentials)&&e;let{url:m,data:f,method:g}=n;t.open(g,m,!0),i.contentType&&t.setRequestHeader&&t.setRequestHeader("Content-type",i.contentType);let{headers:_}=i;(0,l.isFunction)(_)&&(_=await _.call(this)),_&&t.setRequestHeader&&Object.keys(_).forEach(e=>{t.setRequestHeader(e,_[e])}),t.send(f?this.__buildParams(f):void 0);try{for(;;)if(s.length>0)yield s.shift();else if(c)break;else await new Promise(e=>{a=e})}finally{this.__isFulfilled||this.abort()}if(d)throw d}prepareRequest(){if(!this.o.url)throw u.error("Need URL for AJAX request");let e=this.o.url,t=this.o.data,i=(this.o.method||"get").toLowerCase();if("get"===i&&t&&(0,l.isPlainObject)(t)){let i=e.indexOf("?");if(-1!==i){let n=(0,l.parseQuery)(e.substring(i));e=e.substring(0,i)+"?"+(0,l.buildQuery)({...n,...t})}else e+="?"+(0,l.buildQuery)(this.o.data)}let n={url:e,method:i,data:t};return h.log.splice(100),h.log.push(n),n}destruct(){this.__isDestructed||(this.__isDestructed=!0,this.__activated&&!this.__isFulfilled&&(this.abort(),this.__isFulfilled=!0),this.__async.destruct())}constructor(e,t=c.Config.prototype.defaultAjaxOptions){(0,n._)(this,"__async",new r.Async),(0,n._)(this,"xhr",void 0),(0,n._)(this,"options",void 0),(0,n._)(this,"__isFulfilled",!1),(0,n._)(this,"__activated",!1),(0,n._)(this,"__isDestructed",!1),this.options=(0,l.ConfigProto)(e||{},t),this.xhr=this.o.xhr?this.o.xhr():new XMLHttpRequest}}(0,n._)(h,"log",[]),(0,o.__decorate)([a.autobind],h.prototype,"destruct",null)},37102:function(e,t,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(){return new XMLHttpRequest}}},73714:function(e,t,i){"use strict";i.d(t,{Ajax:function(){return n.Ajax},Response:function(){return o.Response}});var n=i(17338),o=i(32855)},32855:function(e,t,i){"use strict";i.d(t,{Response:function(){return o}});var n=i(25045);class o{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(e,t,i,o){(0,n._)(this,"status",void 0),(0,n._)(this,"statusText",void 0),(0,n._)(this,"request",void 0),(0,n._)(this,"body",void 0),this.request=e,this.status=t,this.statusText=i,this.body=o}}},42259:function(e,t,i){"use strict";i.d(t,{cursorInTheEdgeOfString:function(){return s},findCorrectCurrentNode:function(){return a},moveNodeInsideStart:function(){return r.moveNodeInsideStart}});var n=i(81937),o=i(23211),r=i(89817);function s(e,t,i,o){var r;let s=(null==(r=e.nodeValue)?void 0:r.length)?e.nodeValue:"";if(o&&s.replace((0,n.INVISIBLE_SPACE_REG_EXP_END)(),"").length>t)return!0;let a=(0,n.INVISIBLE_SPACE_REG_EXP_START)().exec(s);return i&&(a&&a[0].length<t||!a&&t>0)}function a(e,t,i,n,r,s){if((e=t.startContainer.childNodes[t.startOffset])||(e=t.startContainer.childNodes[t.startOffset-1],i=!0),e&&n&&!o.Dom.isText(e)){if(!i&&o.Dom.isText(e.previousSibling))e=e.previousSibling;else if(r){let t=e=>i?e.lastChild:s(e),n=t(e);for(;n;){if(n&&o.Dom.isText(n)){e=n;break}n=t(n)}}}if(e&&!n&&!o.Dom.isText(e)){let t=e,i=e;do t=t.firstChild,i=i.lastChild;while(t&&i&&!o.Dom.isText(t));t===i&&t&&o.Dom.isText(t)&&(e=t)}return{node:e,rightMode:i}}i(7470)},89817:function(e,t,i){"use strict";i.d(t,{moveNodeInsideStart:function(){return r}});var n=i(81937),o=i(23211);function r(e,t,i){let r=o.Dom.findSibling(t,i),s=o.Dom.findSibling(t,!i);for(;o.Dom.isElement(r)&&!o.Dom.isTag(r,n.INSEPARABLE_TAGS)&&o.Dom.isContentEditable(r,e.editor)&&(!s||!o.Dom.closest(t,o.Dom.isElement,e.editor));)i||!r.firstChild?o.Dom.append(r,t):o.Dom.before(r.firstChild,t),r=o.Dom.sibling(t,i),s=o.Dom.sibling(t,!i)}},7470:function(e,t,i){"use strict";i.d(t,{moveTheNodeAlongTheEdgeOutward:function(){return o}});var n=i(23211);function o(e,t,i){let o=e;for(;o&&o!==i&&!(n.Dom.findSibling(o,t)||n.Dom.isBlock(o.parentElement));)(o=o.parentElement)&&o!==i&&(t?n.Dom.before(o,e):n.Dom.after(o,e))}},59841:function(e,t,i){"use strict";i.d(t,{CommitStyle:function(){return o.CommitStyle},Selection:function(){return n.Selection}});var n=i(98595),o=i(84578)},98595:function(e,t,i){"use strict";i.d(t,{Selection:function(){return m}});var n=i(25045),o=i(31635),r=i(81937),s=i(84839),a=i(23211),l=i(65946),u=i(28686),c=i(28712),d=i(7470),h=i(84578),p=i(42259);class m{get j(){return this.jodit}errorNode(e){if(!a.Dom.isNode(e))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,u.isFunction)(this.j.o.shadowRoot.getSelection)?this.j.o.shadowRoot.getSelection():this.win.getSelection()}get range(){let e=this.sel;return e&&e.rangeCount?e.getRangeAt(0):this.createRange()}get isInsideArea(){let{sel:e}=this;if(!(null==e?void 0:e.rangeCount))return!1;for(let t=0;t<e.rangeCount;t+=1)if(!a.Dom.isOrContains(this.area,e.getRangeAt(t).commonAncestorContainer))return!1;return!0}createRange(e=!1){let t=this.doc.createRange();return e&&this.selectRange(t),t}remove(){let e=this.sel,t=this.current();if(e&&t)for(let t=0;t<e.rangeCount;t+=1){let i=e.getRangeAt(t);a.Dom.isOrContains(this.area,i.commonAncestorContainer)&&(i.deleteContents(),i.collapse(!0))}}clear(){var e,t;(null==(e=this.sel)?void 0:e.rangeCount)&&(null==(t=this.sel)||t.removeAllRanges())}removeNode(e){if(!a.Dom.isOrContains(this.j.editor,e,!0))throw(0,l.error)("Selection.removeNode can remove only editor's children");a.Dom.safeRemove(e),this.j.e.fire("afterRemoveNode",e)}insertCursorAtPoint(e,t){try{var i,n,o,r;let s=this.createRange(),l=null==(i=(n=this.doc).caretPositionFromPoint)?void 0:i.call(n,e,t),u=l?null:null==(o=(r=this.doc).caretRangeFromPoint)?void 0:o.call(r,e,t);if(l)s.setStart(l.offsetNode,l.offset);else{if(!u)return!1;s.setStart(u.startContainer,u.startOffset)}if(!a.Dom.isOrContains(this.area,s.startContainer))return!1;return s.collapse(!0),this.removeMarkers(),this.selectRange(s),!0}catch(e){}return!1}get hasMarkers(){return!!this.markers.length}get markers(){return(0,l.$$)("span[data-"+r.MARKER_CLASS+"]",this.area)}removeMarkers(){a.Dom.safeRemove(...this.markers)}marker(e=!1,t){let i=null;t&&(i=t.cloneRange()).collapse(e);let n=this.j.createInside.span();return n.id=r.MARKER_CLASS+"_"+Number(new Date)+"_"+String(Math.random()).slice(2),(0,l.css)(n,{lineHeight:"0",display:"none"}),a.Dom.markTemporary(n),(0,l.attr)(n,"data-"+r.MARKER_CLASS,e?"start":"end"),a.Dom.append(n,this.j.createInside.text(r.INVISIBLE_SPACE)),i&&a.Dom.isOrContains(this.area,e?i.startContainer:i.endContainer)&&i.insertNode(n),n}restore(){let e=this.markers,t=new Map(e.map(e=>[e.id,e])),i=[],n=!1;for(let u=0;u<e.length;u+=1){let c=e[u];if("start"!==(0,l.attr)(c,"data-"+r.MARKER_CLASS))continue;n||(n="true"===(0,l.attr)(c,"data-selection-backward"));let d=(0,l.attr)(c,"data-selection-end"),h=d?t.get(d):void 0;!d&&e[u+1]&&"end"===(0,l.attr)(e[u+1],"data-"+r.MARKER_CLASS)&&(h=e[u+1]);let p=this.createRange();if(h)p.setStartAfter(c),p.setEndBefore(h);else{let e=c.previousSibling;if(a.Dom.isText(e)){var o,s;p.setStart(e,null!=(o=null==(s=e.nodeValue)?void 0:s.length)?o:0)}else p.setStartBefore(c);p.collapse(!0)}i.push(p)}a.Dom.safeRemove(...e),i.length&&this.__selectRanges(i,n)}__isBackward(){let e=this.sel;return!!(e&&1===e.rangeCount&&!e.isCollapsed&&e.anchorNode===e.getRangeAt(0).endContainer&&e.anchorOffset===e.getRangeAt(0).endOffset)}__ranges(){let e=this.sel;return e?Array.from({length:e.rangeCount},(t,i)=>e.getRangeAt(i).cloneRange()):[]}fakes(){if(!this.isInsideArea)return[];let e=this.__isBackward(),t=this.__ranges(),i=t.map(e=>{let t=e.collapsed,i=e.cloneRange();i.collapse(!0);let n=this.j.createInside.fake();a.Dom.safeInsertNode(i,n),e.setStartBefore(n);let o=[n];if(t)e.collapse(!0);else{let t=e.cloneRange();t.collapse(!1);let i=this.j.createInside.fake();a.Dom.safeInsertNode(t,i),e.setEndAfter(i),o.push(i)}return o});return this.__fakeSelections.set(i[0][0],{pairs:i,backward:e}),this.__selectRanges(t,e),i[0]}restoreFakes(e){var t,i,n;if(!e.length)return;let o=this.__fakeSelections.get(e[0]);if(this.__fakeSelections.delete(e[0]),this.j.isInDestruct)return;let r=[];for(let s of null!=(t=null==o?void 0:o.pairs)?t:[e]){let e=s.filter(e=>e.isConnected&&a.Dom.isOrContains(this.area,e,!0));if(!e.length)continue;let[t,o]=e,l=this.createRange();for(let r of(l.setStartAfter(t),o?l.setEndBefore(o):l.collapse(!0),e))(null==(i=r.parentNode)?void 0:i.firstChild)!==(null==(n=r.parentNode)?void 0:n.lastChild)&&a.Dom.safeRemove(r);r.push(l)}r.length&&this.__selectRanges(r,null==o?void 0:o.backward)}save(e=!1){if(this.hasMarkers)return[];let t=this.sel;if(!t||!t.rangeCount)return[];let i=this.__isBackward(),n=[],o=t.rangeCount,r=[];for(let e=0;o>e;e+=1)if(r[e]=t.getRangeAt(e),!a.Dom.isOrContains(this.area,r[e].commonAncestorContainer))return[];for(let e=0;o>e;e+=1)if(r[e].collapsed){let t=this.marker(!0,r[e]);n[e]={startId:t.id,collapsed:!0,startMarker:t.outerHTML}}else{let t=this.marker(!0,r[e]),s=this.marker(!1,r[e]);o>1&&(0,l.attr)(t,"data-selection-end",s.id),i&&(0,l.attr)(t,"data-selection-backward","true"),n[e]={startId:t.id,endId:s.id,collapsed:!1,startMarker:t.outerHTML,endMarker:s.outerHTML}}if(!e){t.removeAllRanges();for(let e=o-1;e>=0;--e){let i=this.area.querySelector("#"+n[e].startId);if(i){if(n[e].collapsed)r[e].setStartAfter(i),r[e].collapse(!0);else if(r[e].setStartBefore(i),n[e].endId){let t=this.area.querySelector("#"+n[e].endId);t&&r[e].setEndAfter(t)}try{t.addRange(r[e].cloneRange())}catch(e){}}}}return n}focus(e={preventScroll:!0}){if(!this.isFocused()){let n=(0,l.getScrollParent)(this.j.container),o=null==n?void 0:n.scrollTop;this.j.iframe&&"complete"===this.doc.readyState&&this.j.iframe.focus(e),this.win.focus(),this.area.focus(e),o&&(null==n?void 0:n.scrollTo)&&n.scrollTo(0,o);let r=this.sel,s=(null==r?void 0:r.rangeCount)?null==r?void 0:r.getRangeAt(0):null;if(!s||!a.Dom.isOrContains(this.area,s.startContainer)){let e=this.createRange();e.setStart(this.area,0),e.collapse(!0),this.selectRange(e,!1)}if(!this.j.editorIsActive){var t,i;null==(i=this.j)||null==(t=i.events)||t.fire("focus")}return!0}return!1}isCollapsed(){let e=this.sel;for(let t=0;e&&t<e.rangeCount;t+=1)if(!e.getRangeAt(t).collapsed)return!1;return!0}isFocused(){return this.doc.hasFocus&&this.doc.hasFocus()&&this.area===this.doc.activeElement}current(e=!0){if(this.j.getRealMode()!==r.MODE_WYSIWYG)return null;let t=this.sel;if(!t||0===t.rangeCount)return null;let i=t.getRangeAt(0),n=i.startContainer,o=!1;if(!a.Dom.isOrContains(this.area,n))return null;if(a.Dom.isTag(n,"br")&&t.isCollapsed)return n;if(!a.Dom.isText(n)){let r=(0,p.findCorrectCurrentNode)(n,i,o,t.isCollapsed,e,e=>o?e.lastChild:e.firstChild);n=r.node,o=r.rightMode}return n&&a.Dom.isOrContains(this.area,n)?n:null}insertNode(e,t=!0,i=!0){this.errorNode(e),this.j.e.fire("safeHTML",e);let n=a.Dom.isFragment(e)?e.lastChild:e;if(!n||this.j.isInDestruct)return;!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore());let o=this.sel;this.j.history.snapshot.transaction(()=>{if(this.isCollapsed()||this.j.execCommand("Delete"),this.j.e.fire("beforeInsertNode",e),!(n=a.Dom.isFragment(e)?e.lastChild:e)||this.j.isInDestruct)return;if(o&&o.rangeCount){let t=o.getRangeAt(0),{firstChild:i}=e;a.Dom.isOrContains(this.area,t.commonAncestorContainer)?a.Dom.safeInsertNode(t,e):a.Dom.append(this.area,e),[()=>null==i?void 0:i.previousSibling,()=>null==i?void 0:i.previousSibling,()=>{var e;return null==i||null==(e=i.previousSibling)?void 0:e.lastChild}].forEach(e=>{let t=e();t&&a.Dom.isEmptyTextNode(t)&&a.Dom.safeRemove(t)})}else a.Dom.append(this.area,e);let i=e=>{if(a.Dom.isBlock(e)){let t=e.lastChild;if(t)return i(t)}this.setCursorAfter(e)};t&&(a.Dom.isFragment(e)?n&&i(n):i(e)),this.j.o.scrollToPastedContent&&(0,l.scrollIntoViewIfNeeded)(null!=n?n:e,this.j.editor,this.doc)}),i&&this.j.events&&this.j.__imdSynchronizeValues(),this.j.events&&this.j.e.fire("afterInsertNode",a.Dom.isFragment(e)?n:e)}insertHTML(e,t=!0){if(""===e)return;let i=this.j.createInside.div(),n=this.j.createInside.fragment();!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore()),a.Dom.isNode(e)?a.Dom.append(i,e):i.innerHTML=e.toString(),!this.j.isEditorMode()&&!1===this.j.e.fire("insertHTML",i.innerHTML)||i.lastChild&&(a.Dom.moveContent(i,n),this.insertNode(n,t,!1),this.j.__imdSynchronizeValues())}insertImage(e,t=null,i=null){let n=(0,u.isString)(e)?this.j.createInside.element("img"):e;if((0,u.isString)(e)&&(0,l.attr)(n,"src",e),null!=i){let e=i.toString();e&&"auto"!==e&&0>String(e).indexOf("px")&&0>String(e).indexOf("%")&&(e+="px"),(0,l.attr)(n,"width",e)}t&&"object"==typeof t&&(0,l.css)(n,t);let o=()=>{(n.naturalHeight<n.offsetHeight||n.naturalWidth<n.offsetWidth)&&(0,l.css)(n,{width:"",height:""}),n.removeEventListener("load",o)};this.j.e.on(n,"load",o),n.complete&&o(),this.insertNode(n),this.j.e.fire("afterInsertImage",n)}eachSelection(e){let t=new Set;for(let i of this.__ranges())a.Dom.isOrContains(this.area,i.commonAncestorContainer)&&this.__eachRange(i,i=>{t.has(i)||(t.add(i),e(i))})}__eachRange(e,t){var i;let n=e.commonAncestorContainer;a.Dom.isHTMLElement(n)||(n=n.parentElement);let o=[],s=e.startOffset,c=n.childNodes.length,d=e.startContainer===this.area?n.childNodes[s<c?s:c-1]:e.startContainer,h=e.endContainer===this.area?n.childNodes[e.endOffset-1]:e.endContainer;a.Dom.isText(d)&&d===e.startContainer&&e.startOffset===(null==(i=d.nodeValue)?void 0:i.length)&&d.nextSibling&&(d=d.nextSibling),a.Dom.isText(h)&&h===e.endContainer&&0===e.endOffset&&h.previousSibling&&(h=h.previousSibling);let p=e=>{!e||e===n||a.Dom.isEmptyTextNode(e)||(0,u.isMarker)(e)||o.push(e)};p(d),d!==h&&a.Dom.isOrContains(n,d,!0)&&a.Dom.find(d,e=>(p(e),e===h||e&&e.contains&&e.contains(h)),n,!0,!1);let m=e=>{if(a.Dom.isOrContains(this.j.editor,e,!0)){if(e.nodeName.match(/^(UL|OL)$/))return(0,l.toArray)(e.childNodes).forEach(m);if(a.Dom.isTag(e,"li"))if(e.firstChild)e=e.firstChild;else{let t=this.j.createInside.text(r.INVISIBLE_SPACE);a.Dom.append(e,t),e=t}t(e)}};0===o.length&&(a.Dom.isEmptyTextNode(d)&&o.push(d),(null==d?void 0:d.firstChild)&&o.push(d.firstChild)),o.forEach(m)}cursorInTheEdge(e,t,i=null){let n=!e,o=this.sel,r=(null==o?void 0:o.rangeCount)?o.getRangeAt(0):null;if(!r)return null;let s=e?r.startContainer:r.endContainer,l=e?r.startOffset:r.endOffset;if(null!=i||(i=s),!a.Dom.isOrContains(t,s)||!a.Dom.isOrContains(t,i))return null;let u=e=>!!(e&&!a.Dom.isTag(e,"br")&&!a.Dom.isEmptyTextNode(e)&&!a.Dom.isTemporary(e)&&!(a.Dom.isElement(e)&&!0===this.j.e.fire("isInvisibleForCursor",e)));if(a.Dom.isText(s)){if((0,p.cursorInTheEdgeOfString)(s,l,e,n))return!1}else{let e=s.childNodes,t=n?e.length:l;for(let i=n?l:0;t>i;i+=1)if(u(e[i]))return!1}let c=i;for(;c&&c!==t;){let t=a.Dom.sibling(c,e);if(!t){c=c.parentNode;continue}if(u(c=t))return!1}return!0}cursorOnTheLeft(e,t){return this.cursorInTheEdge(!0,e,t)}cursorOnTheRight(e,t){return this.cursorInTheEdge(!1,e,t)}setCursorAfter(e){return this.setCursorNearWith(e,!1)}setCursorBefore(e){return this.setCursorNearWith(e,!0)}setCursorNearWith(e,t){if(this.errorNode(e),!a.Dom.isOrContains(this.area,e,!0))throw(0,l.error)("Node element must be in editor");let i=this.createRange(),n=null;if(a.Dom.isText(e))if(t)i.setStart(e,0);else{var o,r;i.setEnd(e,null!=(o=null==(r=e.nodeValue)?void 0:r.length)?o:0)}else n=this.j.createInside.fake(),t?i.setStartBefore(e):i.setEndAfter(e),i.collapse(t),a.Dom.safeInsertNode(i,n),i.selectNode(n);return i.collapse(t),this.selectRange(i),n}setCursorIn(e,t=!1){if(this.errorNode(e),!a.Dom.up(e,e=>e===this.area||e&&e.parentNode===this.area,this.area))throw(0,l.error)("Node element must be in editor");let i=this.createRange(),n=e,o=e;do{if(a.Dom.isText(n)||a.Dom.isTag(n,r.INSEPARABLE_TAGS))break;o=n,n=t?n.firstChild:n.lastChild}while(n);if(!n){let e=this.j.createInside.text(r.INVISIBLE_SPACE);a.Dom.isTag(o,r.INSEPARABLE_TAGS)?n=o:(a.Dom.append(o,e),o=e)}let s=n||o;return a.Dom.isTag(s,r.INSEPARABLE_TAGS)?t||a.Dom.isTag(s,"br")?i.setStartBefore(s):i.setEndAfter(s):i.selectNodeContents(s),i.collapse(t),this.selectRange(i),o}selectRange(e,t=!0){return this.__selectRanges([e],!1,t)}__selectRanges(e,t=!1,i=!0){let n=this.sel;if(i&&!this.isFocused()&&"focus"!==this.j.e.current&&this.focus(),n&&(n.removeAllRanges(),e.forEach(e=>n.addRange(e)),t&&1===e.length)){let t=e[0];n.setBaseAndExtent(t.endContainer,t.endOffset,t.startContainer,t.startOffset)}return this.j.e.fire("changeSelection"),this}select(e,t=!1){if(this.errorNode(e),!a.Dom.up(e,e=>e===this.area||e&&e.parentNode===this.area,this.area))throw(0,l.error)("Node element must be in editor");let i=this.createRange();return i[t||e===this.area?"selectNodeContents":"selectNode"](e),this.selectRange(i)}get html(){let e=this.sel;if(e&&e.rangeCount>0){let e=this.j.createInside.div();return this.__ranges().forEach(t=>a.Dom.append(e,t.cloneContents())),e.innerHTML}return""}__wrapSelectionFragments(e){this.__splitSelectionBoundaries(e);let t=e.commonAncestorContainer;return(a.Dom.isText(t)&&(t=t.parentNode),t)?this.__wrapSelectionRuns(this.__collectContainedNodes(t,e)):[]}__splitSelectionBoundaries(e){var t,i,n,o;let{endContainer:r,endOffset:s}=e;a.Dom.isText(r)&&s>0&&s<(null!=(t=null==(n=r.nodeValue)?void 0:n.length)?t:0)&&r.splitText(s);let{startContainer:l,startOffset:u}=e;if(a.Dom.isText(l)&&u>0&&u<(null!=(i=null==(o=l.nodeValue)?void 0:o.length)?i:0)){let t=l.splitText(u);e.setStart(t,0)}this.__normalizeRangeBoundary(e,!0),this.__normalizeRangeBoundary(e,!1)}__normalizeRangeBoundary(e,t){var i,n;let o=t?e.startContainer:e.endContainer;if(!a.Dom.isText(o))return;let r=t?e.startOffset:e.endOffset,s=null!=(i=null==(n=o.nodeValue)?void 0:n.length)?i:0;0===r?t?e.setStartBefore(o):e.setEndBefore(o):r>=s&&(t?e.setStartAfter(o):e.setEndAfter(o))}__collectContainedNodes(e,t,i=this.createRange()){let n=[];return(0,l.toArray)(e.childNodes).forEach(e=>{this.__isFullyContained(t,e,i)?n.push(e):e.childNodes.length&&t.intersectsNode(e)&&n.push(...this.__collectContainedNodes(e,t,i))}),n}__isFullyContained(e,t,i){return i.selectNode(t),0>=e.compareBoundaryPoints(Range.START_TO_START,i)&&e.compareBoundaryPoints(Range.END_TO_END,i)>=0}__wrapSelectionRuns(e){let t=[],i=[],n=()=>{i.length&&(t.push(this.__wrapRunInFont(i)),i=[])};return e.forEach(e=>{a.Dom.isElement(e)&&this.__isOrContainsBlock(e)?(n(),t.push(...this.__wrapSelectionRuns((0,l.toArray)(e.childNodes)))):(i.length&&i[i.length-1].parentNode!==e.parentNode&&n(),i.push(e))}),n(),t}__isOrContainsBlock(e){return!!a.Dom.isBlock(e)||(0,l.toArray)(e.childNodes).some(e=>this.__isOrContainsBlock(e))}__wrapRunInFont(e){let t=this.j.createInside.element("font"),[i]=e;return a.Dom.before(i,t),e.forEach(e=>a.Dom.append(t,e)),t}*wrapInTagGen(e){var t;if((null==(t=this.sel)?void 0:t.rangeCount)&&!this.isInsideArea)return;if(this.isCollapsed()){let t=this.jodit.createInside.element("font",r.INVISIBLE_SPACE);this.insertNode(t,!1,!1),e&&e[0]&&a.Dom.append(t,e[0]);try{yield t}finally{a.Dom.unwrap(t)}return}let i=this.__ranges().flatMap(e=>this.__wrapSelectionFragments(e));try{for(let e of i){if(this.j.isInDestruct||!a.Dom.isOrContains(this.area,e,!0))continue;let{firstChild:t,lastChild:i}=e;if(t&&t===i&&(0,u.isMarker)(t)){a.Dom.unwrap(e);continue}t&&(0,u.isMarker)(t)&&a.Dom.before(e,t),i&&(0,u.isMarker)(i)&&a.Dom.after(e,i),yield e,a.Dom.unwrap(e)}}finally{i.forEach(e=>a.Dom.unwrap(e))}}wrapInTag(e){let t=[];for(let i of this.wrapInTagGen())try{if(i.firstChild&&i.firstChild===i.lastChild&&(0,u.isMarker)(i.firstChild))continue;(0,u.isFunction)(e)?e(i):t.push(a.Dom.replace(i,e,this.j.createInside))}finally{let e=i.parentNode;e&&(a.Dom.unwrap(i),a.Dom.isEmpty(e)&&a.Dom.unwrap(e))}return t}commitStyle(e){(0,c.assert)((0,l.size)(e)>0,"Need to pass at least one option"),new h.CommitStyle(e).apply(this.j)}splitSelection(e,t){if(!this.isCollapsed()||!this.isInsideArea||!a.Dom.isOrContains(this.area,e,!0)||!a.Dom.isOrContains(e,this.range.startContainer)||t&&!a.Dom.isOrContains(e,t,!0))return null;let i=this.createRange(),n=this.range;i.setStartBefore(e);let o=this.cursorOnTheRight(e,t),s=this.cursorOnTheLeft(e,t),l=this.j.createInside.element("br"),u=this.j.createInside.fake(),d=u.cloneNode();try{if(o||s){t?a.Dom.before(t,l):a.Dom.safeInsertNode(n,l);let e=(e,t)=>{let i=t(e);for(;i;){let e=t(i);if(i&&(a.Dom.isTag(i,"br")||a.Dom.isEmptyTextNode(i)))a.Dom.safeRemove(i);else break;i=e}};e(l,e=>e.nextSibling),e(l,e=>e.previousSibling),a.Dom.after(l,d),a.Dom.before(l,u),o?(i.setEndBefore(l),n.setEndBefore(l)):(i.setEndAfter(l),n.setEndAfter(l))}else i.setEnd(n.startContainer,n.startOffset);let h=i.extractContents(),p=e=>a.Dom.each(e,e=>a.Dom.isEmptyTextNode(e)&&a.Dom.safeRemove(e));(0,c.assert)(e.parentNode,"Splitting fails");try{if(p(h),p(e),a.Dom.before(e,h),!t&&o&&(null==l?void 0:l.parentNode)){let e=this.createRange();e.setStartBefore(l),this.selectRange(e)}}catch(e){if(!r.IS_PROD)throw e}let m=e=>{let t=null==e?void 0:e.parentNode;t&&t.firstChild===t.lastChild&&a.Dom.append(t,l.cloneNode())};m(u),m(d)}finally{a.Dom.safeRemove(u),a.Dom.safeRemove(d)}return e.previousElementSibling}expandSelection(){if(this.isCollapsed()||!this.isInsideArea)return this;let e=this.__isBackward(),t=this.__ranges().map(e=>this.__expandRange(e));return this.__selectRanges(t,e),this}__expandRange(e){let t=e.cloneRange();if(!a.Dom.isOrContains(this.j.editor,e.commonAncestorContainer,!0))return e;let i=t=>{let i=this.j.createInside.fake(),n=e.cloneRange();return n.collapse(t),a.Dom.safeInsertNode(n,i),(0,d.moveTheNodeAlongTheEdgeOutward)(i,t,this.j.editor),i},n=i(!0),o=i(!1);t.setStartAfter(n),t.setEndBefore(o);let r=a.Dom.findSibling(n,!1),s=a.Dom.findSibling(o,!0);if(r!==s){let e=a.Dom.isElement(r)&&a.Dom.isOrContains(r,o),i=!e&&a.Dom.isElement(s)&&a.Dom.isOrContains(s,n);if(e||i){let i=e?r:s,l=i;for(;a.Dom.isElement(i);)(i=e?i.firstElementChild:i.lastElementChild)&&(e?a.Dom.isOrContains(i,o):a.Dom.isOrContains(i,n))&&(l=i);e?t.setStart(l,0):t.setEnd(l,l.childNodes.length)}}if(a.Dom.safeRemove(n,o),t.collapsed)throw(0,l.error)("Selection is collapsed");return t}constructor(e){(0,n._)(this,"jodit",void 0),(0,n._)(this,"__fakeSelections",void 0),this.jodit=e,this.__fakeSelections=new WeakMap,e.e.on("removeMarkers",()=>{this.removeMarkers()})}}(0,o.__decorate)([s.autobind],m.prototype,"createRange",null),(0,o.__decorate)([s.autobind],m.prototype,"focus",null),(0,o.__decorate)([s.autobind],m.prototype,"setCursorAfter",null),(0,o.__decorate)([s.autobind],m.prototype,"setCursorBefore",null),(0,o.__decorate)([s.autobind],m.prototype,"setCursorIn",null)},17481:function(e,t,i){"use strict";i.d(t,{extractSelectedPart:function(){return s}});var n=i(23211),o=i(23175),r=i(71125);function s(e,t,i){let n=i.s.createRange(),r=(0,o.isMarker)(t.previousSibling)?t.previousSibling:t;n.setStartBefore(e),n.setEndBefore(r),a(e,n,!0);let s=(0,o.isMarker)(t.nextSibling)?t.nextSibling:t;n.setStartAfter(s),n.setEndAfter(e),a(e,n,!1)}function a(e,t,i){let o=t.extractContents();n.Dom.isEmpty(o)&&o.firstChild&&n.Dom.unwrap(o.firstChild),e.parentNode&&(0,r.call)(i?n.Dom.before:n.Dom.after,e,o)}},48729:function(e,t,i){"use strict";i.d(t,{FiniteStateMachine:function(){return a}});var n=i(25045),o=i(81937),r=i(85932),s=i(28712);class a{setState(e){(0,s.assert)(!this.__previewsStates.has(e),"Circled states"),this.__previewsStates.add(e),this.__state=e}getState(){return this.__state}disableSilent(){this.silent=!1}dispatch(e,t){let i=this.transitions[this.getState()][e];if(i){let e=i.call(this,t);return(0,s.assert)(e&&e!==t,"Action should return new value"),(0,s.assert)((0,r.isString)(e.next),"Value should contain the next state"),(0,s.assert)(e.next!==this.getState(),"The new state should not be equal to the old one."),this.setState(e.next),o.IS_PROD||this.silent,e}throw Error(`invalid action: ${this.getState()}.${e.toString()}`)}constructor(e,t){(0,n._)(this,"transitions",void 0),(0,n._)(this,"__state",void 0),(0,n._)(this,"silent",void 0),(0,n._)(this,"__previewsStates",void 0),this.transitions=t,this.silent=!0,this.__previewsStates=new Set,this.setState(e)}}},10171:function(e,t,i){"use strict";i.d(t,{getSuitChild:function(){return s}});var n=i(23211),o=i(83653),r=i(73019);function s(e,t){let{firstChild:i}=t;for(;i&&!(0,o.isNormalNode)(i);)if(!(i=i.nextSibling))return null;return i&&!n.Dom.next(i,o.isNormalNode,t)&&(0,r.isSuitElement)(e,i,!1)?i:null}},19549:function(e,t,i){"use strict";i.d(t,{getSuitParent:function(){return function e(t,i,s){var a;let{parentNode:l}=i;return l===s||!n.Dom.isHTMLElement(l)||n.Dom.next(i,o.isNormalNode,l)||n.Dom.prev(i,o.isNormalNode,l)?null:t.isElementCommit&&t.elementIsBlock&&!n.Dom.isBlock(l)?e(t,l,s):n.Dom.isTag(l,"li")&&!t.isElementCommit&&(null==(a=t.options.attributes)?void 0:a.style)||(0,r.isSuitElement)(t,l,!1)&&(!n.Dom.isBlock(l)||t.elementIsBlock)?l:t.isElementCommit&&!n.Dom.isBlock(l)?e(t,l,s):null}}});var n=i(23211),o=i(83653),r=i(73019)},9703:function(e,t,i){"use strict";i.d(t,{hasSameStyle:function(){return u},hasSameStyleKeys:function(){return c}});var n=i(81937),o=i(23211),r=i(18303),s=i(19147),a=i(28712),l=i(80991);function u(e,t){return!!(!o.Dom.isTag(e,"font")&&o.Dom.isHTMLElement(e)&&Object.keys(t).every(i=>{let n=(0,l.css)(e,i,!0);return""===n&&(""===t[i]||null==t[i])||!(0,r.isVoid)(n)&&""!==n&&!(0,r.isVoid)(t[i])&&(0,s.normalizeCssValue)(i,t[i]).toString().toLowerCase()===n.toString().toLowerCase()}))}if(n.globalDocument){let e=n.globalDocument.createElement("div");e.style.color="red",(0,a.assert)(u(e,{color:"red"}),"Style test"),(0,a.assert)(u(e,{fontSize:null}),"Style test"),(0,a.assert)(u(e,{fontSize:""}),"Style test")}function c(e,t){return!!(!o.Dom.isTag(e,"font")&&o.Dom.isHTMLElement(e)&&Object.keys(t).every(t=>""!==(0,l.css)(e,t,!0)))}if(n.globalDocument){let e=n.globalDocument.createElement("div");e.style.color="red",(0,a.assert)(c(e,{color:"red"}),"Style test"),(0,a.assert)(!c(e,{font:"Arial",color:"red"}),"Style test"),(0,a.assert)(!c(e,{border:"1px solid #ccc"}),"Style test")}},51640:function(e,t,i){"use strict";i.d(t,{FiniteStateMachine:function(){return o.FiniteStateMachine},WRAP_NODES:function(){return h.WRAP_NODES},extractSelectedPart:function(){return n.extractSelectedPart},getSuitChild:function(){return r.getSuitChild},getSuitParent:function(){return s.getSuitParent},isInsideInvisibleElement:function(){return a.isInsideInvisibleElement},suitableClosest:function(){return l.suitableClosest},toggleAttributes:function(){return c.toggleAttributes},toggleOrderedList:function(){return u.toggleOrderedList},unwrapChildren:function(){return d.unwrapChildren},wrap:function(){return h.wrap}});var n=i(17481),o=i(48729),r=i(10171),s=i(19549);i(9703);var a=i(39608);i(83653),i(95971);var l=i(73019),u=i(34582);i(97110);var c=i(82794),d=i(89081),h=i(73154);i(83335)},39608:function(e,t,i){"use strict";i.d(t,{isInsideInvisibleElement:function(){return o}});var n=i(23211);function o(e,t){return!!n.Dom.closest(e,["style","script"],t)}},83653:function(e,t,i){"use strict";i.d(t,{isNormalNode:function(){return r}});var n=i(23211),o=i(23175);function r(e){return!!(e&&!n.Dom.isEmptyTextNode(e)&&!n.Dom.isTemporary(e)&&!(0,o.isMarker)(e))}},95971:function(e,t,i){"use strict";i.d(t,{elementsEqualAttributes:function(){return u},isSameAttributes:function(){return l}});var n=i(18073),o=i(93640),r=i(28712),s=i(7909),a=i(9703);function l(e,t){return!(0,n.size)(t)||((0,r.assert)(t,"Attrs must be a non-empty object"),Object.keys(t).every(i=>{if("class"===i||"className"===i){var n;return(null!=(n=String(t[i]).match(/[^\t\n\f\r ]+/g))?n:[]).every(t=>e.classList.contains(t))}if("style"===i)return(0,a.hasSameStyle)(e,t[i]);let r=t[i];return(0,o.attr)(e,i)===(null==r?r:String(r))}))}function u(e,t){return e.attributes.length===t.attributes.length&&Array.from(e.attributes).every(e=>(0,s.attrRaw)(t,e.name)===e.value)}},73019:function(e,t,i){"use strict";i.d(t,{isSuitElement:function(){return s},suitableClosest:function(){return a}});var n=i(23211),o=i(9703),r=i(83653);function s(e,t,i,a=!0){var l;if(!t||!(0,r.isNormalNode)(t))return!1;let{element:u,elementIsDefault:c,options:d}=e;if(n.Dom.isList(t)&&e.elementIsList)return!0;let h=n.Dom.isTag(t,u);return!!(h&&!(c&&i)||(null==(l=d.attributes)?void 0:l.style)&&(a?(0,o.hasSameStyle)(t,d.attributes.style):(0,o.hasSameStyleKeys)(t,d.attributes.style))&&!e.elementIsList)||!h&&!i&&c&&n.Dom.isInlineBlock(t)}function a(e,t,i){return n.Dom.closest(t,t=>s(e,t,!0,!1),i)}},34582:function(e,t,i){"use strict";i.d(t,{toggleOrderedList:function(){return u}});var n=i(23211),o=i(28712),r=i(17481),s=i(82794),a=i(98394),l=i(97110);function u(e,t,i,n){if(!t)return n;let o=t.parentElement;if(!o)return n;let r=i.e.fire(`${a._PREFIX}BeforeToggleList`,n,e,o);if(void 0!==r)return r;let u=i.e.fire.bind(i.e,`${a._PREFIX}AfterToggleList`);if("unwrap"!==n){let r="change"===(0,s.toggleAttributes)(e,t.parentElement,i,a.INITIAL,!0);if(n===a.REPLACE||r||o.tagName.toLowerCase()!==e.element){let n=c(a.REPLACE,o,t,i,e),r=(0,l.wrapList)(e,n,i);return u(a.REPLACE,r,e),a.REPLACE}}return u("unwrap",c("unwrap",o,t,i,e),e),"unwrap"}function c(e,t,i,s,l){let u=s.e.fire(`${a._PREFIX}BeforeUnwrapList`,e,t,l);return u?((0,o.assert)(n.Dom.isHTMLElement(u),`${a._PREFIX}BeforeUnwrapList hook must return HTMLElement`),u):((0,r.extractSelectedPart)(t,i,s),(0,o.assert)(n.Dom.isHTMLElement(i.parentElement),"Element should be inside the list"),n.Dom.unwrap(i.parentElement),e===a.REPLACE)?i:n.Dom.replace(i,"br"!==s.o.enter.toLowerCase()?s.o.enter:s.createInside.fragment(),s.createInside)}},97110:function(e,t,i){"use strict";i.d(t,{wrapList:function(){return a}});var n=i(23211),o=i(95971),r=i(82794),s=i(98394);function a(e,t,i){let a=i.e.fire(`${s._PREFIX}BeforeWrapList`,s.REPLACE,t,e),l=null!=a?a:n.Dom.replace(t,"li",i.createInside),u=l.previousElementSibling,c=l.nextElementSibling,d=n.Dom.isTag(u,e.element)?u:null;return null!=d||(d=n.Dom.isTag(c,e.element)?c:null),n.Dom.isList(d)&&(0,o.isSameAttributes)(d,e.options.attributes)||(d=i.createInside.element(e.element),(0,r.toggleAttributes)(e,d,i,s.INITIAL),n.Dom.before(l,d)),u===d?n.Dom.append(d,l):n.Dom.prepend(d,l),n.Dom.isTag(d.nextElementSibling,e.element)&&(0,o.elementsEqualAttributes)(d,d.nextElementSibling)&&(n.Dom.append(d,Array.from(d.nextElementSibling.childNodes)),n.Dom.safeRemove(d.nextElementSibling)),i.e.fire(`${s._PREFIX}AfterWrapList`,"wrap",d,e),d}},82794:function(e,t,i){"use strict";i.d(t,{toggleAttributes:function(){return m}});var n=i(81937),o=i(23211),r=i(28077),s=i(28686),a=i(19147),l=i(18073),u=i(93640),c=i(80991),d=i(36400),h=i(98394);let p="toggleAttributes";function m(e,t,i,f,g=!1){var _;if(!g&&e.isApplied(t,p))return f;g||e.setApplied(t,p);let{attributes:v}=e.options;return v&&(0,l.size)(v)>0&&Object.keys(v).forEach(e=>{var p,m;let _=v[e];switch(e){case"style":p=f,(0,u.assert)((0,s.isPlainObject)(_)&&(0,l.size)(_),"Style must be an object"),Object.keys(_).forEach(e=>{let s=(0,c.cssInline)(t,e),l=_[e];if(""!==s||null!=l){let h,m,f,_;if(null==l||""===l){s&&(g||(0,c.css)(t,e,null),p="change");return}if(h=function(e){var t;if(void 0!==(0,d.dataBind)(e,"shadowRoot"))return(0,d.dataBind)(e,"shadowRoot");let i=(0,r.getContainer)(e),s=n.globalDocument.createElement("iframe");(0,c.css)(s,{width:0,height:0,position:"absolute",border:0}),(0,u.attr)(s,"src","about:blank"),o.Dom.append(i,s);let a=null==(t=s.contentWindow)?void 0:t.document,l=a?a.body:e.od.body;return(0,d.dataBind)(e,"shadowRoot",l),l}(i),m=i.create.element("div"),(0,c.css)(m,"color",(0,c.css)(i.editor,"color")),f=i.create.element(t.tagName.toLowerCase()),(0,u.attr)(f,"style",(0,u.attr)(t,"style")),o.Dom.append(m,f),o.Dom.append(h,m),_=(0,c.css)(f,e),o.Dom.safeRemove(m),_===(0,a.normalizeCssValue)(e,l)){if(!s)return;g||(0,c.css)(t,e,null),p="unset";return}p="change",g||(0,c.css)(t,e,l)}}),f=p;break;case"className":case"class":f=function(e,t,i,n,o){var r;(0,u.assert)((0,s.isString)(t),"Class name must be a string");let a=null!=(r=t.match(/[^\t\n\f\r ]+/g))?r:[];if(!a.length)return n;let l=e.e.fire.bind(e.e,`${h._PREFIX}AfterToggleAttribute`);return a.every(e=>i.classList.contains(e))?(n="unset",o||(i.classList.remove(...a),0===i.classList.length&&(0,u.attr)(i,"class",null),l(n,i,"class",(0,u.attr)(i,"class")))):(n="change",o||(i.classList.add(...a),l(n,i,"class",t))),n}(i,_,t,f,g);break;default:let b;m=f,(0,u.assert)((0,s.isString)(_)||(0,s.isNumber)(_)||(0,s.isBoolean)(_)||null==_,"Attribute value must be a string or number or boolean or null"),b=i.e.fire.bind(i.e,`${h._PREFIX}AfterToggleAttribute`),(0,u.attr)(t,e)===(null==_?_:String(_))?(g||(0,u.attr)(t,e,null),m="unset",g||b(m,t,e,_)):(m="change",g||((0,u.attr)(t,e,_),b(m,t,e,_))),f=m}}),!g&&(null==v?void 0:v.style)?(_=f,!(0,u.attr)(t,"style")&&((0,u.attr)(t,"style",null),t.attributes.length||t.tagName.toLowerCase()!==e.defaultTag||(o.Dom.unwrap(t),_="unwrap")),_):f}},89081:function(e,t,i){"use strict";i.d(t,{unwrapChildren:function(){return a}});var n=i(23211),o=i(93640),r=i(9703),s=i(73019);function a(e,t){var i;let a,l=[],u=[],c=null==(i=e.options.attributes)?void 0:i.style,d=Object.keys(null!=c?c:{}),h={};d.forEach(e=>{h[e]=null});let p=t=>{(0,o.css)(t,h),(0,o.attr)(t,"style")||(0,o.attr)(t,"style",null),!t.attributes.length&&n.Dom.isTag(t,e.element)&&l.push(t)};for(let i of n.Dom.eachGen(t))n.Dom.isContentEditable(i,t)&&((0,s.isSuitElement)(e,i,!0)&&(!c||(0,r.hasSameStyleKeys)(i,c))?(void 0===a&&(a=!0),c?u.push(()=>p(i)):l.push(i)):c&&n.Dom.isHTMLElement(i)&&d.some(e=>""!==(0,o.css)(i,e,!0))?(void 0===a&&(a=!1),u.push(()=>p(i))):n.Dom.isEmptyTextNode(i)||void 0!==a||(a=!1));return u.forEach(e=>e()),l.forEach(n.Dom.unwrap),!!a}},83335:function(e,t,i){"use strict";i.d(t,{wrapUnwrappedText:function(){return r}});var n=i(23211),o=i(23175);function r(e,t,i){let r=i.editor,s=i.createInside,a=(e,t="previousSibling")=>{let s=e,a=e;for(;a&&!(0,o.isMarker)(a)&&!n.Dom.isTag(a,i.o.enter)&&(s=a,a=a[t]?a[t]:a.parentNode&&!n.Dom.isBlock(a.parentNode)&&a.parentNode!==r?a.parentNode:null,!n.Dom.isBlock(a)););return s},l=a(t),u=a(t,"nextSibling"),c=i.s.createRange();c.setStartBefore(l),c.setEndAfter(u);let d=c.extractContents(),h=s.element(e.element);return n.Dom.append(h,d),n.Dom.safeInsertNode(c,h),e.elementIsBlock&&n.Dom.isEmpty(h)&&!n.Dom.isTag(h.firstElementChild,"br")&&n.Dom.append(h,s.element("br")),h}},73154:function(e,t,i){"use strict";i.d(t,{wrap:function(){return l}});var n=i(27795),o=i(7909),r=i(80991),s=i(97110),a=i(83335);function l(e,t,i){var l,c,d;let h=(l=e,c=t,d=i,l.elementIsBlock?n.Dom.up(c,e=>n.Dom.isBlock(e)&&!n.Dom.isTag(e,u)&&!Array.from(e.childNodes).some(e=>n.Dom.isBlock(e)),d.editor)||(0,a.wrapUnwrappedText)(l,c,d):((0,o.attr)(c,"size",null),c));if(e.elementIsList)return(0,s.wrapList)(e,h,i);let p=n.Dom.replace(h,e.element,i.createInside,!0);return e.elementIsBlock&&((0,r.css)(p,"fontSize",null),(0,r.css)(p,"fontWeight",null),(0,o.attr)(p,"style")||(0,o.attr)(p,"style",null)),p}let u=new Set(["td","th","tr","tbody","table","li","ul","ol"]);i.d(t,["WRAP_NODES",0,u])},96127:function(e,t,i){"use strict";i.d(t,{ApplyStyle:function(){return s}});var n=i(51640),o=i(98394),r=i(78462);function s(e,t){var i;let{s:s,editor:a}=e;null==(i=a.firstChild)||i.normalize();let l=s.fakes(),u=s.isCollapsed(),c=o.INITIAL;try{for(let i of s.wrapInTagGen(l)){let o={collapsed:u,mode:c,element:i,next:r.states.START,jodit:e,style:t},s=new n.FiniteStateMachine(r.states.START,r.transactions);for(;!e.isInDestruct&&s.getState()!==r.states.END;)o=s.dispatch("exec",o);c=o.mode}}finally{s.restoreFakes(l)}}},84578:function(e,t,i){"use strict";i.d(t,{CommitStyle:function(){return l}});var n=i(25045),o=i(81937),r=i(57821),s=i(98394),a=i(96127);class l{isApplied(e,t){let i=this.__applyMap.get(e);return!!i&&!!i[t]}setApplied(e,t){var i;let n=null!=(i=this.__applyMap.get(e))?i:{};n[t]=!0,this.__applyMap.set(e,n)}get elementIsList(){return!!(this.options.element&&o.LIST_TAGS.has(this.options.element))}get element(){return this.options.element||this.defaultTag}get elementIsBlock(){return!!(this.options.element&&o.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(e){let{hooks:t}=this.options,i=t?Object.keys(t):[];try{i.forEach(i=>{e.e.on((0,r.camelCase)(s._PREFIX+"_"+i),t[i])}),(0,a.ApplyStyle)(e,this)}finally{i.forEach(i=>{e.e.off((0,r.camelCase)(s._PREFIX+"_"+i),t[i])}),this.__applyMap=new WeakMap}e.isInDestruct||(e.synchronizeValues(),e.e.fire("afterCommitStyle",this))}constructor(e){(0,n._)(this,"options",void 0),(0,n._)(this,"__applyMap",void 0),this.options=e,this.__applyMap=new WeakMap}}},98394:function(e,t,i){"use strict";i.d(t,["INITIAL",0,"initial","REPLACE",0,"replace","_PREFIX",0,"commitStyle"])},78462:function(e,t,i){"use strict";var n=i(81937),o=i(23211),r=i(28712),s=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"},u={[l.START]:{exec(e){let{element:t,jodit:i,style:n,mode:r,collapsed:a}=e;if(!o.Dom.isContentEditable(t,i.editor)||(0,s.isInsideInvisibleElement)(t,i.editor)||!a&&o.Dom.isEmptyContent(t))return{...e,next:l.END};let u=(0,s.getSuitParent)(n,t,i.editor)||(0,s.getSuitChild)(n,t);if(u)return{...e,next:l.ELEMENT,element:u};let c=(0,s.suitableClosest)(n,t,i.editor);return n.elementIsList&&o.Dom.isList(c)?{...e,next:l.LIST}:c?{...e,next:l.EXTRACT}:{...e,next:"unwrap"!==r?l.UNWRAP_CHILDREN:l.END}}},[l.LIST]:{exec(e){let{element:t,jodit:i,mode:r}=e;if(r!==a.INITIAL&&"unwrap"!==r&&r!==a.REPLACE)return{...e,next:l.END};let s=o.Dom.closest(t,"li",i.editor);return s&&o.Dom.closest(t,n.LIST_TAGS,i.editor)?{...e,element:s,next:l.TOGGLE_LIST}:{...e,next:l.END}}},[l.TOGGLE_LIST]:{exec(e){return{...e,mode:(0,s.toggleOrderedList)(e.style,e.element,e.jodit,e.mode),next:l.END}}},[l.EXTRACT]:{exec(e){var t;let{element:i,jodit:n,style:a}=e,u=(0,s.suitableClosest)(a,i,n.editor);return((0,r.assert)(u,"This place should have an element"),!a.elementIsBlock&&(null==(t=a.options.attributes)?void 0:t.style)&&o.Dom.isBlock(u))?{...e,next:l.WRAP}:(a.elementIsBlock||(0,s.extractSelectedPart)(u,i,n),{...e,element:u,next:l.ELEMENT})}},[l.UNWRAP_CHILDREN]:{exec(e){let{element:t,style:i}=e;return(0,s.unwrapChildren)(i,t)?{...e,mode:"unwrap",next:l.END}:{...e,next:l.WRAP}}},[l.WRAP]:{exec(e){let{element:t,jodit:i,style:n}=e,o=(0,s.wrap)(n,t,i);return{...e,next:n.elementIsList?l.END:l.CHANGE,mode:"wrap",element:o}}},[l.ELEMENT]:{exec(e){let{style:t,element:i,jodit:n}=e;return(0,s.toggleAttributes)(t,i,n,a.INITIAL,!0)!==a.INITIAL?{...e,next:l.CHANGE}:o.Dom.isTag(i,t.element)?{...e,next:l.UNWRAP}:{...e,next:l.END}}},[l.CHANGE]:{exec(e){let{style:t,element:i,jodit:n,mode:r}=e,a=(0,s.toggleAttributes)(t,i,n,e.mode);return"wrap"!==r&&"unset"===a&&!i.attributes.length&&o.Dom.isTag(i,t.element)?{...e,next:l.UNWRAP}:{...e,mode:a,next:l.END}}},[l.UNWRAP]:{exec(e){let{element:t,style:i,jodit:n}=e;if(t.attributes.length&&o.Dom.isTag(t,i.element))return{...e,next:l.REPLACE_DEFAULT};let r=t.parentElement;return i.elementIsBlock&&!i.elementIsDefault&&r&&r!==n.editor&&o.Dom.isBlock(r)&&!o.Dom.isTag(r,s.WRAP_NODES)?{...e,next:l.REPLACE_DEFAULT}:(o.Dom.unwrap(t),{...e,mode:"unwrap",next:l.END})}},[l.REPLACE_DEFAULT]:{exec(e){return o.Dom.replace(e.element,e.style.defaultTag,e.jodit.createInside,!0),{...e,mode:a.REPLACE,next:l.END}}},[l.END]:{exec(e){return e}}};i.d(t,["states",0,l,"transactions",0,u])},8006:function(e,t,i){"use strict";i.d(t,{AsyncStorage:function(){return l}});var n=i(25045),o=i(57821),r=i(91162),s=i(59807),a=i(9505);class l{async set(e,t){let i=await this.provider;return await i.set((0,o.camelCase)(this.prefix+e),t),this}async delete(e){let t=await this.provider;return await t.delete((0,o.camelCase)(this.prefix+e)),this}async get(e){return(await this.provider).get((0,o.camelCase)(this.prefix+e))}async exists(e){return(await this.provider).exists((0,o.camelCase)(this.prefix+e))}async clear(){let e=await this.provider;return await e.clear(),this}async close(){let e=await this.provider;"close"in e&&"function"==typeof e.close&&await e.close()}static makeStorage(e=!1,t,i){let n,o=null==i?void 0:i.defaultProvider;return null!=o?new l(Promise.resolve(n="local"===o?(0,s.canUsePersistentStorage)("localStorage")?new s.LocalStorageProvider("Jodit_"+(t||"")):new a.MemoryStorageProvider:"memory"===o?new a.MemoryStorageProvider:o),t):("localStorage"===e||"sessionStorage"===e?(0,s.canUsePersistentStorage)(e)&&(n=new s.LocalStorageProvider("Jodit_"+(t||""),e)):("indexedDB"===e||!0===e)&&(n=(0,r.canUseIndexedDB)().then(e=>e?new r.IndexedDBProvider("Jodit_"+(t||""),"keyValueStore"):new a.MemoryStorageProvider)),n||(n=new a.MemoryStorageProvider),new l(Promise.resolve(n),t))}constructor(e,t){(0,n._)(this,"provider",void 0),(0,n._)(this,"prefix",void 0),this.provider=e,this.prefix="Jodit_",t&&(this.prefix+=t)}}},91162:function(e,t,i){"use strict";i.d(t,{IndexedDBProvider:function(){return r},canUseIndexedDB:function(){return l},clearUseIndexedDBCache:function(){return a}});var n=i(25045),o=i(81937);class r{getDB(){return this.dbPromise||(this.dbPromise=new Promise((e,t)=>{let i=indexedDB.open(this.dbName,this.DB_VERSION);i.onerror=()=>{t(i.error)},i.onsuccess=()=>{e(i.result)},i.onupgradeneeded=e=>{let t=e.target.result;t.objectStoreNames.contains(this.storeName)||t.createObjectStore(this.storeName)}})),this.dbPromise}async performTransaction(e,t){try{let i=(await this.getDB()).transaction([this.storeName],e).objectStore(this.storeName),n=t(i);return new Promise((e,t)=>{n.onsuccess=()=>{e(n.result)},n.onerror=()=>{t(n.error)}})}catch(e){return Promise.reject(e)}}async set(e,t){try{await this.performTransaction("readwrite",i=>i.put(t,e))}catch(e){o.IS_PROD}return this}async delete(e){try{await this.performTransaction("readwrite",t=>t.delete(e))}catch(e){}return this}async get(e){try{return await this.performTransaction("readonly",t=>t.get(e))}catch(e){return}}async exists(e){try{let t=await this.performTransaction("readonly",t=>t.get(e));return void 0!==t}catch(e){return!1}}async clear(){try{await this.performTransaction("readwrite",e=>e.clear())}catch(e){}return this}async close(){if(this.dbPromise){try{(await this.dbPromise).close()}catch(e){}this.dbPromise=null}}async keys(){try{let e=await this.performTransaction("readonly",e=>e.getAllKeys());return e&&"object"==typeof e&&"then"in e&&(e=await e),e.map(e=>String(e))}catch(e){return[]}}async values(){try{let e=await this.performTransaction("readonly",e=>e.getAll());return e&&"object"==typeof e&&"then"in e&&(e=await e),e}catch(e){return[]}}async entries(){try{let[e,t]=await Promise.all([this.keys(),this.values()]);return e.map((e,i)=>[e,t[i]])}catch(e){return[]}}constructor(e="JoditDB",t="keyValueStore"){(0,n._)(this,"dbName",void 0),(0,n._)(this,"dbPromise",void 0),(0,n._)(this,"DB_VERSION",void 0),(0,n._)(this,"storeName",void 0),this.dbName=e,this.dbPromise=null,this.DB_VERSION=1,this.storeName=t}}let s=null;function a(){s=null}async function l(){if(null!=s)return s;try{if("u"<typeof indexedDB)return s=!1,!1;let e="___Jodit___"+Math.random().toString(),t=indexedDB.open(e);return s=await new Promise(i=>{t.onerror=()=>{i(!1)},t.onsuccess=()=>{indexedDB.deleteDatabase(e),i(!0)}})}catch(e){return s=!1,!1}}},59807:function(e,t,i){"use strict";i.d(t,{LocalStorageProvider:function(){return o}});var n=i(25045);class o{get storage(){return"sessionStorage"===this.strategy?sessionStorage:localStorage}set(e,t){try{let i=this.storage.getItem(this.rootKey),n=i?JSON.parse(i):{};n[e]=t,this.storage.setItem(this.rootKey,JSON.stringify(n))}catch(e){}return this}delete(e){try{let t=this.storage.getItem(this.rootKey);if(t){let i=JSON.parse(t);delete i[e],this.storage.setItem(this.rootKey,JSON.stringify(i))}}catch(e){}return this}get(e){try{let t=this.storage.getItem(this.rootKey),i=t?JSON.parse(t):{};return void 0!==i[e]?i[e]:void 0}catch(e){}}exists(e){return null!=this.get(e)}clear(){try{this.storage.removeItem(this.rootKey)}catch(e){}return this}constructor(e,t="localStorage"){(0,n._)(this,"rootKey",void 0),(0,n._)(this,"strategy",void 0),this.rootKey=e,this.strategy=t}}i.d(t,["canUsePersistentStorage",0,(e="localStorage")=>{let t=new Map;if(t.has(e))return t.get(e);let i="___Jodit___"+Math.random().toString(),n="sessionStorage"===e?sessionStorage:localStorage;try{n.setItem(i,"1");let o="1"===n.getItem(i);return n.removeItem(i),t.set(e,o),o}catch(e){}return t.set(e,!1),!1}])},9505:function(e,t,i){"use strict";i.d(t,{MemoryStorageProvider:function(){return o}});var n=i(25045);class o{set(e,t){return this.data.set(e,t),this}delete(e){return this.data.delete(e),this}get(e){return this.data.get(e)}exists(e){return this.data.has(e)}clear(){return this.data.clear(),this}constructor(){(0,n._)(this,"data",new Map)}}},25222:function(e,t,i){"use strict";i.d(t,{AsyncStorage:function(){return n.AsyncStorage},IndexedDBProvider:function(){return o.IndexedDBProvider},LocalStorageProvider:function(){return r.LocalStorageProvider},MemoryStorageProvider:function(){return s.MemoryStorageProvider},Storage:function(){return a.Storage},StorageKey:function(){return"Jodit_"},canUseIndexedDB:function(){return o.canUseIndexedDB},canUsePersistentStorage:function(){return r.canUsePersistentStorage},clearUseIndexedDBCache:function(){return o.clearUseIndexedDBCache}});var n=i(8006),o=i(91162),r=i(59807),s=i(9505),a=i(24475)},24475:function(e,t,i){"use strict";i.d(t,{Storage:function(){return l}});var n=i(25045),o=i(57821),r=i(59807),s=i(9505);let a="Jodit_";class l{set(e,t){return this.provider.set((0,o.camelCase)(this.prefix+e),t),this}delete(e){return this.provider.delete((0,o.camelCase)(this.prefix+e)),this}get(e){return this.provider.get((0,o.camelCase)(this.prefix+e))}exists(e){return this.provider.exists((0,o.camelCase)(this.prefix+e))}clear(){return this.provider.clear(),this}static makeStorage(e=!1,t){let i;return"localStorage"===e||"sessionStorage"===e?(0,r.canUsePersistentStorage)(e)&&(i=new r.LocalStorageProvider(a+(t||""),e)):!0===e&&(0,r.canUsePersistentStorage)("localStorage")&&(i=new r.LocalStorageProvider(a+(t||""))),i||(i=new s.MemoryStorageProvider),new l(i,t)}constructor(e,t){(0,n._)(this,"provider",void 0),(0,n._)(this,"prefix",void 0),this.provider=e,this.prefix=a,t&&(this.prefix+=t)}}},80512:function(e,t,i){"use strict";i.d(t,{Dlgs:function(){return a}});var n=i(28077),o=i(28686),r=i(71125),s=i(37333);class a{dlg(e){let t=(0,n.getPopupViewRoot)(this.o,this.container,this.od.body),i=new s.Dialog({language:this.o.language,shadowRoot:this.o.shadowRoot,popupRoot:t,ownerWindow:this.o.ownerWindow,defaultTimeout:this.o.defaultTimeout,direction:this.o.direction,theme:this.o.theme,globalFullSize:this.o.globalFullSize,...e});return(0,r.markOwner)(this,i.container),i.parent=this,i.bindDestruct(this)}confirm(e,t,i){return e=l(e,this),t=l(t,this),s.Confirm.call(this.dlg({closeOnClickOverlay:!0}),e,t,i)}prompt(e,t,i,n,o){return e=l(e,this),t=l(t,this),n=l(n,this),s.Prompt.call(this.dlg({closeOnClickOverlay:!0}),e,t,i,n,o)}alert(e,t,i,n){return e=l(e,this),t=l(t,this),s.Alert.call(this.dlg({closeOnClickOverlay:!0}),e,t,i,n)}}function l(e,t){return(0,o.isString)(e)&&!(0,o.isHTML)(e)&&(e=t.i18n(e)),e}},23183:function(e,t,i){"use strict";i.d(t,{Elms:function(){return o}});var n=i(23211);class o{getElm(e){let t=this.getFullElName(e);return n.Dom.first(this.container,e=>n.Dom.isHTMLElement(e)&&e.classList.contains(t))}getElms(e){let t=this.getFullElName(e),i=[];return n.Dom.each(this.container,e=>{n.Dom.isHTMLElement(e)&&e.classList.contains(t)&&i.push(e)}),i}}},81987:function(e,t,i){"use strict";i.d(t,{Mods:function(){return o}});var n=i(18303);class o{afterSetMod(e,t){}setMod(e,t,i){e=e.toLowerCase();let o=this.mods[e];if(o===t)return this;let r=`${this.componentName}_${e}_`,s=(i||this.container).classList;return null!=o&&s.remove(`${r}${o.toString().toLowerCase()}`),(0,n.isVoid)(t)||""===t||s.add(`${r}${t.toString().toLowerCase()}`),this.mods[e]=t,this.afterSetMod(e,t),this}getMod(e){var t;return null!=(t=this.mods[e])?t:null}}},53681:function(e,t,i){"use strict";i.d(t,{Button:function(){return v},UIButton:function(){return _}});var n=i(25045),o=i(31635),r=i(69364),s=i(51676),a=i(91672),l=i(68616),u=i(23211),c=i(91565),d=i(85932),h=i(28712),p=i(7909),m=i(96007),f=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 m.UIElement{className(){return"UIButton"}setState(e){return Object.assign(this.state,e),this}get text(){let e=this.getElm("text");return(0,h.assert)(e,"Text element not found"),e}get icon(){let e=this.getElm("icon");return(0,h.assert)(e,"Icon element not found"),e}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 e=(0,a.getComponentClass)("UIList"),t=this.closest(e);if(t){this.state.size=t.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 e=this.state.tooltip?this.jodit.i18n(this.state.tooltip):null;this.get("j.o.useNativeTooltip")&&(0,p.attr)(this.container,"title",e),(0,p.attr)(this.container,"aria-label",e),this.updateAriaLabel()}updateAriaLabel(){let e=this.state.text.trim().length>0,t=this.state.tooltip?this.jodit.i18n(this.state.tooltip):null;(0,p.attr)(this.container,"aria-label",t),(0,p.attr)(this.button,"aria-label",e?null:t)}onChangeTabIndex(){(0,p.attr)(this.container,"tabindex",this.state.tabIndex)}onChangeIcon(){let e=this.get("j.o.textIcons");if(!0===e||(0,c.isFunction)(e)&&e(this.state.name))return;u.Dom.detach(this.icon);let t=f.Icon.makeIcon(this.j,this.state.icon);t&&u.Dom.append(this.icon,t)}focus(){this.container.focus()}isFocused(){let{activeElement:e}=this.od;return!!(e&&u.Dom.isOrContains(this.container,e))}createContainer(){let e=this.componentName,t=this.j.c.element("button",{class:e,type:"button",role:"button",ariaPressed:!1}),i=this.j.c.span(e+"__icon"),n=this.j.c.span(e+"__text");return u.Dom.append(t,i),u.Dom.append(t,n),t}destruct(){return this.j.e.off(this),this.j.e.off(this.container),super.destruct()}onAction(e){return this.actionHandlers.push(e),this}__onActionFire(e){e.buffer={actionTrigger:this},this.actionHandlers.forEach(t=>t.call(this,e)),this.j.e.fire(this,"click",e)}constructor(e,t){super(e),(0,n._)(this,"isButton",!0),(0,n._)(this,"state",g()),(0,n._)(this,"button",void 0),(0,n._)(this,"actionHandlers",[]),this.button=this.container,this.updateSize(),this.onChangeSize(),this.onChangeStatus(),t&&this.hookStatus(r.STATUSES.ready,()=>{this.setState(t)})}}function v(e,t,i,n){let o=new _(e);return o.state.tabIndex=e.o.allowTabNavigation?0:-1,(0,d.isString)(t)?(o.state.icon.name=t,o.state.name=t,n&&(o.state.variant=n),i&&(o.state.text=i)):o.setState(t),o}(0,o.__decorate)([s.cache],_.prototype,"text",null),(0,o.__decorate)([s.cache],_.prototype,"icon",null),(0,o.__decorate)([(0,l.watch)("state.size",{immediately:!1})],_.prototype,"onChangeSize",null),(0,o.__decorate)([(0,l.watch)("state.type",{immediately:!1})],_.prototype,"onChangeType",null),(0,o.__decorate)([(0,l.watch)("state.role",{immediately:!1})],_.prototype,"onChangeRole",null),(0,o.__decorate)([(0,l.watch)("parentElement")],_.prototype,"updateSize",null),(0,o.__decorate)([(0,l.watch)("state.variant",{immediately:!1})],_.prototype,"onChangeStatus",null),(0,o.__decorate)([(0,l.watch)("state.text",{immediately:!1})],_.prototype,"onChangeText",null),(0,o.__decorate)([(0,l.watch)("state.text",{immediately:!1})],_.prototype,"onChangeTextSetMode",null),(0,o.__decorate)([(0,l.watch)("state.disabled")],_.prototype,"onChangeDisabled",null),(0,o.__decorate)([(0,l.watch)("state.activated")],_.prototype,"onChangeActivated",null),(0,o.__decorate)([(0,l.watch)("state.name",{immediately:!1})],_.prototype,"onChangeName",null),(0,o.__decorate)([(0,l.watch)("state.tooltip",{immediately:!1})],_.prototype,"onChangeTooltip",null),(0,o.__decorate)([(0,l.watch)("state.tabIndex",{immediately:!1})],_.prototype,"onChangeTabIndex",null),(0,o.__decorate)([(0,l.watch)("state.icon",{immediately:!1})],_.prototype,"onChangeIcon",null),(0,o.__decorate)([s.cacheHTML],_.prototype,"createContainer",null),(0,o.__decorate)([(0,l.watch)("button:click")],_.prototype,"__onActionFire",null),_=(0,o.__decorate)([a.component],_),i.d(t,["UIButtonState",0,g])},15367:function(e,t,i){"use strict";i.d(t,{UIButtonGroup:function(){return c}});var n=i(25045),o=i(31635),r=i(91672),s=i(23211),a=i(28712),l=i(53681),u=i(63468);class c extends u.UIGroup{className(){return"UIButtonGroup"}render(e){return`<div>
8
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var i=t();for(var n in i)("object"==typeof exports?exports:e)[n]=i[n]}}(self,function(){return function(){var e,t,i={5266:function(e,t,i){"use strict";i.d(t,{Config:function(){return s}});var n=i(25045),o=i(81937);let r={};class s{static get defaultOptions(){return s.__defaultOptions||(s.__defaultOptions=new s),s.__defaultOptions}constructor(){(0,n._)(this,"cache",!0),(0,n._)(this,"defaultTimeout",100),(0,n._)(this,"namespace",""),(0,n._)(this,"safeMode",!1),(0,n._)(this,"width","auto"),(0,n._)(this,"height","auto"),(0,n._)(this,"safePluginsList",["about","enter","backspace","size","bold","hotkeys"]),(0,n._)(this,"commandToHotkeys",void 0),(0,n._)(this,"license",""),(0,n._)(this,"preset","custom"),(0,n._)(this,"presets",{inline:{inline:!0,toolbar:!1,toolbarInline:!0,toolbarInlineForSelection:!0,showXPathInStatusbar:!1,showCharsCounter:!1,showWordsCounter:!1,showPlaceholder:!1}}),(0,n._)(this,"ownerDocument",o.globalDocument),(0,n._)(this,"ownerWindow",o.globalWindow),(0,n._)(this,"shadowRoot",null),(0,n._)(this,"nonce",""),(0,n._)(this,"zIndex",0),(0,n._)(this,"readonly",!1),(0,n._)(this,"disabled",!1),(0,n._)(this,"activeButtonsInReadOnly",["source","fullsize","print","about","dots","selectall"]),(0,n._)(this,"allowCommandsInReadOnly",["selectall","preview","print"]),(0,n._)(this,"toolbarButtonSize","middle"),(0,n._)(this,"allowTabNavigation",!1),(0,n._)(this,"inline",!1),(0,n._)(this,"theme","default"),(0,n._)(this,"saveModeInStorage",!1),(0,n._)(this,"asyncStorage",{}),(0,n._)(this,"editorClassName",!1),(0,n._)(this,"className",!1),(0,n._)(this,"style",!1),(0,n._)(this,"containerStyle",!1),(0,n._)(this,"styleValues",{}),(0,n._)(this,"triggerChangeEvent",!0),(0,n._)(this,"direction",""),(0,n._)(this,"language","auto"),(0,n._)(this,"debugLanguage",!1),(0,n._)(this,"i18n",!1),(0,n._)(this,"tabIndex",-1),(0,n._)(this,"toolbar",!0),(0,n._)(this,"statusbar",!0),(0,n._)(this,"showTooltip",!0),(0,n._)(this,"showTooltipDelay",200),(0,n._)(this,"useNativeTooltip",!1),(0,n._)(this,"defaultActionOnPaste",o.INSERT_AS_HTML),(0,n._)(this,"enter",o.PARAGRAPH),(0,n._)(this,"iframe",!1),(0,n._)(this,"editHTMLDocumentMode",!1),(0,n._)(this,"enterBlock","br"!==this.enter?this.enter:o.PARAGRAPH),(0,n._)(this,"defaultMode",o.MODE_WYSIWYG),(0,n._)(this,"useSplitMode",!1),(0,n._)(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,n._)(this,"colorPickerDefaultTab","background"),(0,n._)(this,"imageDefaultWidth",300),(0,n._)(this,"removeButtons",[]),(0,n._)(this,"disablePlugins",[]),(0,n._)(this,"extraPlugins",[]),(0,n._)(this,"basePath",void 0),(0,n._)(this,"extraButtons",[]),(0,n._)(this,"extraIcons",{}),(0,n._)(this,"createAttributes",{table:{style:"border-collapse:collapse;width: 100%;"}}),(0,n._)(this,"sizeLG",900),(0,n._)(this,"sizeMD",700),(0,n._)(this,"sizeSM",400),(0,n._)(this,"buttons",[{group:"font-style",buttons:[]},{group:"list",buttons:[]},{group:"font",buttons:[]},"---",{group:"script",buttons:[]},{group:"media",buttons:[]},"\n",{group:"state",buttons:[]},{group:"clipboard",buttons:[]},{group:"insert",buttons:[]},{group:"indent",buttons:[]},{group:"color",buttons:[]},{group:"form",buttons:[]},"---",{group:"history",buttons:[]},{group:"search",buttons:[]},{group:"source",buttons:[]},{group:"other",buttons:[]},{group:"info",buttons:[]}]),(0,n._)(this,"controls",void 0),(0,n._)(this,"events",{}),(0,n._)(this,"textIcons",!1),(0,n._)(this,"popupRoot",null),(0,n._)(this,"showBrowserColorPicker",!0),Object.assign(this,r)}}(0,n._)(s,"__defaultOptions",void 0),r=s.prototype,s.prototype.controls={}},24735:function(e,t,i){"use strict";i.d(t,{Async:function(){return f}});var n=i(25045),o=i(81937),r=i(61077),s=i(72068),a=i(91565),l=i(72412),u=i(62101),c=i(52100),d=i(85932),h=i(18303),p=i(28712),m=i(14228);class f{delay(e){return this.promise(t=>this.setTimeout(t,e))}setTimeout(e,t,...i){if(this.isDestructed)return 0;let n={};(0,h.isVoid)(t)&&(t=0),(0,l.isNumber)(t)||(t=(n=t).timeout||0),n.label&&this.clearLabel(n.label);let o=(0,r.setTimeout)(e,t,...i),s=n.label||o;return this.timers.set(s,o),this.__callbacks.set(s,e),o}updateTimeout(e,t){if((0,p.assert)(e&&this.timers.has(e),"Label does not exist"),!e||!this.timers.has(e))return null;let i=this.__callbacks.get(e);return(0,p.assert)((0,a.isFunction)(i),"Callback is not a function"),this.setTimeout(i,{label:e,timeout:t})}clearLabel(e){e&&this.timers.has(e)&&((0,r.clearTimeout)(this.timers.get(e)),this.timers.delete(e),this.__callbacks.delete(e))}clearTimeout(e){if((0,d.isString)(e))return this.clearLabel(e);(0,r.clearTimeout)(e),this.timers.delete(e),this.__callbacks.delete(e)}debounce(e,t,i=!1){let n=0,o=!1,l=[],d=(...t)=>{if(!o){n=0;let i=e(...t);if(o=!0,l.length){let e=()=>{l.forEach(e=>e()),l.length=0};(0,c.isPromise)(i)?i.finally(e):e()}}},h=(...s)=>{o=!1,t?(!n&&i&&d(...s),(0,r.clearTimeout)(n),n=this.setTimeout(()=>d(...s),(0,a.isFunction)(t)?t():t),this.timers.set(e,n)):d(...s)};return(0,u.isPlainObject)(t)&&t.promisify?(...e)=>{let t=this.promise(e=>{l.push(e)}).catch(e=>{if((0,s.isAbortError)(e))return null;throw e});return h(...e),t}:h}microDebounce(e,t=!1){let i,n=!1,o=!0;return(...r)=>{if(i=r,n){o=!0;return}o=!0,t&&(o=!1,e(...i)),n=!0,this.__queueMicrotaskNative(()=>{n=!1,!this.isDestructed&&o&&e(...i)})}}throttle(e,t,i=!1){let n=null,o,r,s;return(...i)=>{(o=!0,s=i,t)?n||(r=()=>{o?(e(...s),o=!1,n=this.setTimeout(r,(0,a.isFunction)(t)?t():t),this.timers.set(r,n)):n=null})():e(...s)}}promise(e){let t=()=>{},i=new Promise((i,n)=>{t=()=>n((0,m.abort)("Abort async")),this.promisesRejections.add(t),e(i,n)});return!i.finally&&"u">typeof process&&!o.IS_ES_NEXT&&(i.finally=e=>(i.then(e).catch(e),i)),i.finally(()=>{this.promisesRejections.delete(t)}).catch(()=>null),i.rejectCallback=t,i}promiseState(e){if(e.status)return e.status;if(!Promise.race)return new Promise(t=>{e.then(e=>(t("fulfilled"),e),e=>{throw t("rejected"),e}),this.setTimeout(()=>{t("pending")},100)});let t={};return Promise.race([e,t]).then(e=>e===t?"pending":"fulfilled",()=>"rejected")}requestIdleCallback(e,t={timeout:100}){let i=this.__requestIdleCallbackNative(e,t);return this.__requestsIdle.add(i),i}requestIdlePromise(e){return this.promise(t=>{let i=this.requestIdleCallback(()=>t(i),e)})}schedulerPostTask(e,t={delay:0,priority:"user-visible"}){let i=new AbortController;if(t.signal&&t.signal.addEventListener("abort",()=>i.abort()),this.__controllers.add(i),void 0!==globalThis.scheduler){let n=globalThis.scheduler.postTask(e,{...t,signal:i.signal});return n.finally(()=>{this.__controllers.delete(i)}).catch(()=>null),n}return this.promise((n,o)=>{let r=this.setTimeout(()=>{try{n(e())}catch(e){o(e)}this.__controllers.delete(i)},t.delay||1);i.signal.addEventListener("abort",()=>{this.clearTimeout(r),this.__controllers.delete(i),o((0,m.abort)())})})}schedulerYield(){return this.schedulerPostTask(()=>{},{priority:"user-visible"})}cancelIdleCallback(e){return this.__requestsIdle.delete(e),this.__cancelIdleCallbackNative(e)}requestAnimationFrame(e){let t=requestAnimationFrame(e);return this.__requestsRaf.add(t),t}cancelAnimationFrame(e){this.__requestsRaf.delete(e),cancelAnimationFrame(e)}clear(){this.__requestsIdle.forEach(e=>this.cancelIdleCallback(e)),this.__requestsRaf.forEach(e=>this.cancelAnimationFrame(e)),this.__controllers.forEach(e=>e.abort()),this.timers.forEach(e=>(0,r.clearTimeout)(this.timers.get(e))),this.timers.clear(),this.promisesRejections.forEach(e=>e()),this.promisesRejections.clear()}destruct(){this.clear(),this.isDestructed=!0}constructor(){var e,t,i,o,r,s;(0,n._)(this,"timers",new Map),(0,n._)(this,"__callbacks",new Map),(0,n._)(this,"__queueMicrotaskNative",null!=(e=null==(o=queueMicrotask)?void 0:o.bind(window))?e:Promise.resolve().then.bind(Promise.resolve())),(0,n._)(this,"promisesRejections",new Set),(0,n._)(this,"__requestsIdle",new Set),(0,n._)(this,"__controllers",new Set),(0,n._)(this,"__requestsRaf",new Set),(0,n._)(this,"__requestIdleCallbackNative",null!=(t=null==(r=window.requestIdleCallback)?void 0:r.bind(window))?t:(e,t)=>{var i;let n=Date.now();return this.setTimeout(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-n))})},null!=(i=null==t?void 0:t.timeout)?i:1)}),(0,n._)(this,"__cancelIdleCallbackNative",null!=(i=null==(s=window.cancelIdleCallback)?void 0:s.bind(window))?i:e=>{this.clearTimeout(e)}),(0,n._)(this,"isDestructed",!1)}}},91231:function(e,t,i){"use strict";i.d(t,{Async:function(){return n.Async}});var n=i(24735)},80251:function(e,t,i){"use strict";i.d(t,{Component:function(){return u}});var n=i(25045),o=i(91231),r=i(69364),s=i(28077),a=i(65946);let l=new Map;class u{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(e,t,i){let n=[this.componentName];return e&&(e=e.replace(/[^a-z0-9-]/gi,"-"),n.push(`__${e}`)),t&&(n.push("_",t),n.push("_",(0,a.isVoid)(i)?"true":i.toString())),n.join("")}get ownerDocument(){return this.ow.document}get od(){return this.ownerDocument}get ow(){return this.ownerWindow}get(e,t){return(0,a.get)(e,t||this)}get isReady(){return this.componentStatus===r.STATUSES.ready}get isDestructed(){return this.componentStatus===r.STATUSES.destructed}get isInDestruct(){return r.STATUSES.beforeDestruct===this.componentStatus||r.STATUSES.destructed===this.componentStatus}bindDestruct(e){return e.hookStatus(r.STATUSES.beforeDestruct,()=>!this.isInDestruct&&this.destruct()),this}destruct(){this.setStatus(r.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(e){this.setStatus(e)}setStatus(e){return this.setStatusComponent(e,this)}setStatusComponent(e,t){if(e===this.__componentStatus)return;t===this&&(this.__componentStatus=e);let i=Object.getPrototypeOf(this);i&&(0,a.isFunction)(i.setStatusComponent)&&i.setStatusComponent(e,t);let n=l.get(this),o=null==n?void 0:n[e];o&&o.length&&o.forEach(e=>e(t))}hookStatus(e,t){let i=l.get(this);i||(i={},l.set(this,i)),i[e]||(i[e]=[]),i[e].push(t)}static isInstanceOf(e,t){return e instanceof t}constructor(){(0,n._)(this,"__componentName",void 0),(0,n._)(this,"async",new o.Async),(0,n._)(this,"uid",void 0),(0,n._)(this,"ownerWindow",window),(0,n._)(this,"__componentStatus",r.STATUSES.beforeInit),this.uid="jodit-uid-"+(0,s.uniqueUid)()}}(0,n._)(u,"STATUSES",r.STATUSES)},16964:function(e,t,i){"use strict";i.d(t,{Component:function(){return n.Component},STATUSES:function(){return o.STATUSES},ViewComponent:function(){return r.ViewComponent}});var n=i(80251),o=i(69364),r=i(59609)},69364:function(e,t,i){"use strict";i.d(t,["STATUSES",0,{beforeInit:"beforeInit",ready:"ready",beforeDestruct:"beforeDestruct",destructed:"destructed"}])},59609:function(e,t,i){"use strict";i.d(t,{ViewComponent:function(){return r}});var n=i(25045),o=i(80251);class r extends o.Component{get j(){return this.jodit}get defaultTimeout(){return this.j.defaultTimeout}i18n(e,...t){return this.j.i18n(e,...t)}setParentView(e){return this.jodit=e,e.ow&&(this.ownerWindow=e.ow),e.components.add(this),this}destruct(){return this.j.components.delete(this),super.destruct()}constructor(e){super(),(0,n._)(this,"jodit",void 0),this.setParentView(e)}}},81937:function(e,t,i){"use strict";i.r(t),i.d(t,{IS_TEST:function(){return n}});let n=!1,o="u">typeof window?window:void 0,r="u">typeof document?document:void 0,s=new Set(["ul","ol"]),a=["img","video","svg","iframe","script","input","textarea","link","jodit","jodit-media"],l=new Set([...a,"br","hr"]),u=new Set(a),c="Meta",d="Backspace",h="Enter",p="Escape",m="ArrowLeft",f="ArrowUp",g="ArrowRight",_="ArrowDown",v="Delete",b=[c,d,v,f,_,g,m,h,p,"F3","Tab"],y="u">typeof navigator&&(-1!==navigator.userAgent.indexOf("MSIE")||/rv:11.0/i.test(navigator.userAgent)),w=void 0!==o&&/Mac|iPod|iPhone|iPad/.test(o.navigator.platform),k=e=>{let t=e.split("/");return/\.js/.test(t[t.length-1])?{basePath:t.slice(0,t.length-1).join("/")+"/",isMin:!0}:{basePath:e,isMin:!0}},{basePath:S,isMin:C}=(()=>{if("u"<typeof document)return{basePath:"",isMin:!0};let e=r.currentScript;if(e)return k(e.src);let t=r.querySelectorAll("script[src]");return t&&t.length?k(t[t.length-1].src):k(o.location.href)})(),E=new Set(["touchstart","touchend","scroll","mousewheel","mousemove","touchmove"]);i.d(t,["ACCURACY",0,10,"APP_VERSION",0,"4.15.3","BASE_PATH",0,S,"BASE_PATH_IS_MIN",0,C,"BR",0,"br","CLIPBOARD_ID",0,"clipboard","COMMAND_KEYS",0,b,"EMULATE_DBLCLICK_TIMEOUT",0,300,"ES",0,"es2018","FAT_MODE",0,!0,"HOMEPAGE",0,"https://xdsoft.net/jodit/","INSEPARABLE_TAGS",0,l,"INSERT_AS_HTML",0,"insert_as_html","INSERT_AS_TEXT",0,"insert_as_text","INSERT_CLEAR_HTML",0,"insert_clear_html","INSERT_ONLY_TEXT",0,"insert_only_text","INVISIBLE_SPACE",0,"\uFEFF","INVISIBLE_SPACE_REG_EXP",0,()=>/[\uFEFF]/g,"INVISIBLE_SPACE_REG_EXP_END",0,()=>/[\uFEFF]+$/g,"INVISIBLE_SPACE_REG_EXP_START",0,()=>/^[\uFEFF]+/g,"IS_BLOCK",0,/^(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,"IS_ES_MODERN",0,!0,"IS_ES_NEXT",0,!1,"IS_IE",0,y,"IS_INLINE",0,/^(STRONG|SPAN|I|EM|B|SUP|SUB|A|U)$/i,"IS_MAC",0,w,"IS_PROD",0,!0,"KEY_ALIASES",0,{add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:w?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:"space",spacebar:"space",up:"arrowup",win:"meta",windows:"meta"},"KEY_ALT",0,"Alt","KEY_BACKSPACE",0,d,"KEY_DELETE",0,v,"KEY_DOWN",0,_,"KEY_ENTER",0,h,"KEY_ESC",0,p,"KEY_F3",0,"F3","KEY_LEFT",0,m,"KEY_META",0,c,"KEY_RIGHT",0,g,"KEY_SPACE",0,"Space","KEY_TAB",0,"Tab","KEY_UP",0,f,"LIST_TAGS",0,s,"MARKER_CLASS",0,"jodit-selection_marker","MODE_SOURCE",0,2,"MODE_SPLIT",0,3,"MODE_WYSIWYG",0,1,"NBSP_SPACE",0,"\xa0","NEARBY",0,5,"NO_EMPTY_TAGS",0,u,"PARAGRAPH",0,"p","PASSIVE_EVENTS",0,E,"SAFE_COUNT_CHANGE_CALL",0,10,"SET_TEST",0,()=>n=!0,"SOURCE_CONSUMER",0,"source-consumer","SPACE_REG_EXP",0,()=>/[\s\n\t\r\uFEFF\u200b]+/g,"SPACE_REG_EXP_END",0,()=>/[\s\n\t\r\uFEFF\u200b]+$/g,"SPACE_REG_EXP_START",0,()=>/^[\s\n\t\r\uFEFF\u200b]+/g,"TEMP_ATTR",0,"data-jodit-temp","TEXT_HTML",0,y?"html":"text/html","TEXT_PLAIN",0,y?"text":"text/plain","TEXT_RTF",0,y?"rtf":"text/rtf","TOKENS",0,{},"globalDocument",0,r,"globalWindow",0,o,"lang",0,{}])},76517:function(e,t,i){"use strict";i.d(t,{Create:function(){return l}});var n=i(25045),o=i(81937),r=i(23211),s=i(65946),a=i(28712);class l{get doc(){return(0,s.isFunction)(this.document)?this.document():this.document}element(e,t,i){let n=this.doc.createElement(e.toLowerCase());return this.applyCreateAttributes(n),t&&((0,s.isPlainObject)(t)?(0,s.attr)(n,t):i=t),i&&(0,s.asArray)(i).forEach(e=>r.Dom.append(n,(0,s.isString)(e)?this.fromHTML(e):e)),n}div(e,t,i){let n=this.element("div",t,i);return e&&(n.className=e),n}sandbox(){var e;let t=this.element("iframe",{sandbox:"allow-same-origin"});r.Dom.append(this.doc.body,t);let i=null==(e=t.contentWindow)?void 0:e.document;if((0,a.assert)(i,"iframe.contentWindow.document"),!i)throw Error("Iframe error");return i.open(),i.write("<!DOCTYPE html><html><head></head><body></body></html>"),i.close(),[i.body,t]}span(e,t,i){let n=this.element("span",t,i);return e&&(n.className=e),n}a(e,t,i){let n=this.element("a",t,i);return e&&(n.className=e),n}text(e){return this.doc.createTextNode(e)}fake(){return this.text(o.INVISIBLE_SPACE)}fragment(){return this.doc.createDocumentFragment()}fromHTML(e,t){let i=this.div();i.innerHTML=e.toString();let n=i.firstChild===i.lastChild&&i.firstChild?i.firstChild:i;if(r.Dom.safeRemove(n),t){let e=(0,s.refs)(n);Object.keys(t).forEach(i=>{let n=e[i];n&&!1===t[i]&&r.Dom.hide(n)})}return n}applyCreateAttributes(e){if(this.createAttributes){let t=this.createAttributes;if(t&&t[e.tagName.toLowerCase()]){let i=t[e.tagName.toLowerCase()];(0,s.isFunction)(i)?i(e):(0,s.isPlainObject)(i)&&(0,s.attr)(e,i)}}}constructor(e,t){(0,n._)(this,"document",void 0),(0,n._)(this,"createAttributes",void 0),this.document=e,this.createAttributes=t}}},79821:function(e,t,i){"use strict";i.d(t,{Create:function(){return n.Create}});var n=i(76517)},49574:function(e,t,i){"use strict";i.d(t,{autobind:function(){return o}});var n=i(91565);function o(e,t,i){if(!(0,n.isFunction)(i.value))throw TypeError(`@autobind can only be applied to methods, but "${t}" is not a function`);let o=i.value;return{configurable:!0,get(){let e=o.bind(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e}}}},51676:function(e,t,i){"use strict";i.d(t,{cache:function(){return l},cacheHTML:function(){return u},cached:function(){return a}});var n=i(69364),o=i(23211),r=i(28686),s=i(38027);function a(e,t){let i=Object.getOwnPropertyDescriptor(e,t);return!i||(0,r.isFunction)(i.get)?null:i.value}function l(e,t,i){let n=i.get;if(!n)throw(0,s.error)("Getter property descriptor expected");i.get=function(){let e=n.call(this);return e&&!0===e.noCache||Object.defineProperty(this,t,{configurable:i.configurable,enumerable:i.enumerable,writable:!1,value:e}),e}}function u(e,t,i){let a=i.value;if(!(0,r.isFunction)(a))throw(0,s.error)("Handler must be a Function");let l=!0,u=new WeakMap;i.value=function(...e){var t;let i,n=null!=(i=this.od)?i:document,r=u.get(n);if(l&&(null==r?void 0:r.has(this.constructor)))return null==(t=r.get(this.constructor))?void 0:t.cloneNode(!0);let s=a.apply(this,e);return l&&o.Dom.isElement(s)&&(r?r.set(this.constructor,s):u.set(n,new WeakMap([[this.constructor,s]]))),l?s.cloneNode(!0):s},e.hookStatus(n.STATUSES.ready,e=>{l=!!((0,r.isViewObject)(e)?e:e.jodit).options.cache})}},91672:function(e,t,i){"use strict";i.d(t,{component:function(){return s},getComponentClass:function(){return a}});var n=i(81937),o=i(421);let r=new Map;function s(e){class t extends e{constructor(...e){super(...e),this.constructor===t&&(this instanceof t||Object.setPrototypeOf(this,t.prototype),this.setStatus("ready"))}}let i=(0,o.getClassName)(e.prototype);if(r.has(i)&&!n.IS_PROD)throw Error(`Component with name "${i}" is already registered`);return r.set(i,t),t}function a(e){return r.get(e)}},55184:function(e,t,i){"use strict";i.d(t,{debounce:function(){return a},throttle:function(){return l}});var n=i(16964),o=i(28686),r=i(28712),s=i(33201);function a(e,t=!1,i="debounce"){return(a,l)=>{let u=a[l];if(!(0,o.isFunction)(u))throw(0,s.error)("Handler must be a Function");return a.hookStatus(n.STATUSES.ready,n=>{let{async:s}=n;(0,r.assert)(null!=s,`Component ${n.componentName||n.constructor.name} should have "async:IAsync" field`);let a=(0,o.isFunction)(e)?e(n):e,u=(0,o.isNumber)(a)||(0,o.isPlainObject)(a)?a:n.defaultTimeout;Object.defineProperty(n,l,{configurable:!0,value:s[i](n[l].bind(n),u,t)})}),{configurable:!0,get(){return u.bind(this)}}}}function l(e,t=!1){return a(e,t,"throttle")}},24968:function(e,t,i){"use strict";i.d(t,{derive:function(){return o}});var n=i(91565);function o(...e){return t=>{let i=t.prototype;for(let t=0;t<e.length;t++){let o=e[t],r=Object.getOwnPropertyNames(o.prototype);for(let e=0;e<r.length;e++){let t=r[e],s=Object.getOwnPropertyDescriptor(o.prototype,t);null!=s&&(0,n.isFunction)(s.value)&&!(0,n.isFunction)(i[t])&&Object.defineProperty(i,t,{enumerable:!0,configurable:!0,writable:!0,value:function(...e){return s.value.call(this,...e)}})}}}}},29200:function(e,t,i){"use strict";i.d(t,{hook:function(){return r}});var n=i(91565),o=i(33201);function r(e){return(t,i)=>{if(!(0,n.isFunction)(t[i]))throw(0,o.error)("Handler must be a Function");t.hookStatus(e,e=>{e[i].call(e)})}}},35718:function(e,t,i){"use strict";i.d(t,{idle:function(){return s}});var n=i(16964),o=i(91565),r=i(33201);function s(){return(e,t)=>{if(!(0,o.isFunction)(e[t]))throw(0,r.error)("Handler must be a Function");e.hookStatus(n.STATUSES.ready,e=>{let{async:i}=e,n=e[t];e[t]=(...t)=>i.requestIdleCallback(n.bind(e,...t))})}}},84839:function(e,t,i){"use strict";i.r(t),i.d(t,{autobind:function(){return n.autobind},cache:function(){return o.cache},cacheHTML:function(){return o.cacheHTML},cached:function(){return o.cached},component:function(){return r.component},debounce:function(){return s.debounce},derive:function(){return a.derive},getComponentClass:function(){return r.getComponentClass},hook:function(){return l.hook},idle:function(){return u.idle},nonenumerable:function(){return c.nonenumerable},persistent:function(){return d.persistent},throttle:function(){return s.throttle},wait:function(){return h.wait},watch:function(){return p.watch}});var n=i(49574),o=i(51676),r=i(91672),s=i(55184),a=i(24968),l=i(29200),u=i(35718),c=i(41360),d=i(77036),h=i(80840),p=i(68616)},41360:function(e,t,i){"use strict";i.d(t,["nonenumerable",0,(e,t)=>{!1!==(Object.getOwnPropertyDescriptor(e,t)||{}).enumerable&&Object.defineProperty(e,t,{enumerable:!1,set(e){Object.defineProperty(this,t,{enumerable:!1,writable:!0,value:e})}})}])},77036:function(e,t,i){"use strict";i.d(t,{persistent:function(){return r}});var n=i(69364),o=i(31534);function r(e,t){e.hookStatus(n.STATUSES.ready,e=>{let i=(0,o.isViewObject)(e)?e:e.jodit,n=`${i.options.namespace}${e.componentName}_prop_${t}`,r=e[t];Object.defineProperty(e,t,{get(){var e;return null!=(e=i.storage.get(n))?e:r},set(e){i.storage.set(n,e)}})})}},80840:function(e,t,i){"use strict";i.d(t,{wait:function(){return s}});var n=i(69364),o=i(91565),r=i(33201);function s(e){return(t,i)=>{let s=t[i];if(!(0,o.isFunction)(s))throw(0,r.error)("Handler must be a Function");t.hookStatus(n.STATUSES.ready,t=>{let{async:n}=t,o=t[i],r=0;Object.defineProperty(t,i,{configurable:!0,value:function i(...s){n.clearTimeout(r),e(t)?o.apply(t,s):r=n.setTimeout(()=>i(...s),10)}})})}}},68616:function(e,t,i){"use strict";i.d(t,{watch:function(){return d}});var n=i(69364),o=i(70535),r=i(32328),s=i(91565),a=i(62101),l=i(31534),u=i(33201),c=i(71125);function d(e,t){return(i,d)=>{var h;if(!(0,s.isFunction)(i[d]))throw(0,u.error)("Handler must be a Function");let p=null==(h=null==t?void 0:t.immediately)||h,m=null==t?void 0:t.context,f=t=>{let n=(0,l.isViewObject)(t)?t:t.jodit,u=(e,...i)=>{if(!t.isInDestruct)return t[d](e,...i)};p||(u=t.async.microDebounce(u,!0)),(0,r.splitArray)(e).forEach(e=>{if(/:/.test(e)){let[i,o]=e.split(":"),r=m;i.length&&(r=t.get(i)),(0,s.isFunction)(r)&&(r=r(t)),n.events.on(r||t,o,u),r||n.events.on(o,u),t.hookStatus("beforeDestruct",()=>{n.events.off(r||t,o,u).off(o,u)});return}let r=e.split("."),[l]=r,d=r.slice(1),h=t[l];(0,a.isPlainObject)(h)&&(0,o.observable)(h).on(`change.${d.join(".")}`,u);let p=(0,c.getPropertyDescriptor)(i,l);Object.defineProperty(t,l,{configurable:!0,set(e){let i=h;i!==e&&(h=e,p&&p.set&&p.set.call(t,e),(0,a.isPlainObject)(h)&&(h=(0,o.observable)(h)).on(`change.${d.join(".")}`,u),u(l,i,h))},get(){return p&&p.get?p.get.call(t):h}})})};(0,s.isFunction)(i.hookStatus)?i.hookStatus(n.STATUSES.ready,f):f(i)}}},23211:function(e,t,i){"use strict";i.d(t,{Dom:function(){return b}});var n=i(81937),o=i(88475),r=i(17312),s=i(91565),a=i(46248),l=i(3213),u=i(85932),c=i(18303),d=i(4040),h=i(28712),p=i(7909),m=i(80991),f=i(36400),g=i(33201),_=i(71125);let v=RegExp(`<([a-z]+)[^>]+${n.TEMP_ATTR}[^>]*>(.+?)</\\1>`,"gi");class b{static detach(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}static wrapNextInline(e,t,i){let n,o,r=e;i.s.save();do o=!1,(n=r.nextSibling)&&!b.isBlock(n)&&!b.isTag(n,"br")&&(o=!0,r=n);while(o);return b.__wrapElements(t,i,e,r)}static __wrapElements(e,t,i,n){let o=(0,u.isString)(e)?t.createInside.element(e):e;i.parentNode&&i.parentNode.insertBefore(o,i);let r=i;for(;r&&(r=i.nextSibling,o.appendChild(i),i!==n&&r);)i=r;return t.s.restore(),o}static wrapInline(e,t,i){let n,o,r=e,s=e;i.s.save();do o=!1,(n=r.previousSibling)&&!b.isBlock(n)&&(o=!0,r=n);while(o);do o=!1,(n=s.nextSibling)&&!b.isBlock(n)&&(o=!0,s=n);while(o);return b.__wrapElements(t,i,r,s)}static wrap(e,t,i){let n=(0,u.isString)(t)?i.element(t):t;if(b.isNode(e)){if(!e.parentNode)throw(0,g.error)("Element should be in DOM");e.parentNode.insertBefore(n,e),n.appendChild(e)}else{let t=e.extractContents();e.insertNode(n),n.appendChild(t)}return n}static unwrap(e){let t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);b.safeRemove(e)}}static between(e,t,i){let n=e;for(;n&&n!==t&&!(e!==n&&i(n));){let e=n.firstChild||n.nextSibling;if(!e){for(;n&&!n.nextSibling;)if((n=n.parentNode)===t)return;e=null==n?void 0:n.nextSibling}n=e}}static replace(e,t,i,n=!1,r=!1){let s;if((0,a.isHTML)(t)&&((0,h.assert)(i,"Need create instance for new tag"),t=i.fromHTML(t)),(0,u.isString)(t)?((0,h.assert)(i,"Need create instance for new tag"),s=i.element(t)):s=t,!r)for(;e.firstChild;)s.appendChild(e.firstChild);return n&&b.isElement(e)&&b.isElement(s)&&(0,o.toArray)(e.attributes).forEach(e=>{s.setAttribute(e.name,e.value)}),e.parentNode&&e.parentNode.replaceChild(s,e),s}static isEmptyTextNode(e){return b.isText(e)&&(!e.nodeValue||0===e.nodeValue.replace(n.INVISIBLE_SPACE_REG_EXP(),"").trim().length)}static isEmptyContent(e){return b.each(e,e=>b.isEmptyTextNode(e))}static isContentEditable(e,t){return b.isNode(e)&&!b.closest(e,e=>b.isElement(e)&&"false"===e.getAttribute("contenteditable"),t)}static isEmpty(e,t=n.NO_EMPTY_TAGS){let i;if(!e)return!0;i=(0,s.isFunction)(t)?t:e=>t.has(e.nodeName.toLowerCase());let o=e=>null==e.nodeValue||0===(0,d.trim)(e.nodeValue).length;return b.isText(e)?o(e):!(b.isElement(e)&&i(e))&&b.each(e,e=>{if(b.isText(e)&&!o(e)||b.isElement(e)&&i(e))return!1})}static isNode(e){return!!(e&&(0,u.isString)(e.nodeName)&&"number"==typeof e.nodeType&&e.childNodes&&(0,s.isFunction)(e.appendChild))}static isCell(e){return b.isNode(e)&&("TD"===e.nodeName||"TH"===e.nodeName)}static isList(e){return b.isTag(e,n.LIST_TAGS)}static isLeaf(e){return b.isTag(e,"li")}static isImage(e){return b.isNode(e)&&/^(img|svg|picture|canvas)$/i.test(e.nodeName)}static isBlock(e){return!(0,c.isVoid)(e)&&"object"==typeof e&&b.isNode(e)&&n.IS_BLOCK.test(e.nodeName)}static isText(e){return!!(e&&e.nodeType===Node.TEXT_NODE)}static isComment(e){return!!(e&&e.nodeType===Node.COMMENT_NODE)}static isElement(e){return!!b.isNode(e)&&e.nodeType===Node.ELEMENT_NODE}static isFragment(e){return!!b.isNode(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}static isHTMLElement(e){var t;if(!b.isNode(e))return!1;let i=null==(t=e.ownerDocument)?void 0:t.defaultView;return e instanceof(i?i.HTMLElement:HTMLElement)}static isInlineBlock(e){return b.isElement(e)&&!/^(BR|HR)$/i.test(e.tagName)&&-1!==["inline","inline-block"].indexOf((0,m.css)(e,"display").toString())}static canSplitBlock(e){return!(0,c.isVoid)(e)&&b.isHTMLElement(e)&&b.isBlock(e)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&void 0!==e.style&&!/^(fixed|absolute)/i.test(e.style.position)}static first(e,t){return b.__deepMost(e,t,!1)}static last(e,t){return b.__deepMost(e,t,!0)}static __deepMost(e,t,i){let n=i?"lastChild":"firstChild",o=i?"previousSibling":"nextSibling",r=null==e?void 0:e[n];if(!r)return null;do{if(t(r))return r;let i=r[n]||r[o];if(!i&&r.parentNode!==e){do r=r.parentNode;while(r&&!r[o]&&r.parentNode!==e);i=null==r?void 0:r[o]}r=i}while(r);return null}static prev(e,t,i,n=!0){return b.find(e,t,i,!1,n)}static next(e,t,i,n=!0){return b.find(e,t,i,!0,n)}static prevWithClass(e,t){return b.__siblingWithClass(e,t,!0)}static nextWithClass(e,t){return b.__siblingWithClass(e,t,!1)}static __siblingWithClass(e,t,i){let n=e=>b.isElement(e)&&e.classList.contains(t),o=e.parentNode;return i?b.prev(e,n,o):b.next(e,n,o)}static find(e,t,i,n=!0,o=!0){let r=this.nextGen(e,i,n,o),s=r.next();for(;!s.done;){if(t(s.value))return s.value;s=r.next()}return null}static*nextGen(e,t,i=!0,n=!0){let o=[],r=e;do{let t=i?r.nextSibling:r.previousSibling;for(;t;)o.push(t),t=i?t.nextSibling:t.previousSibling;o.reverse(),yield*this.runInStack(e,o,i,n),r=r.parentNode}while(r&&r!==t);return null}static each(e,t,i=!0){let n=this.eachGen(e,i),o=n.next();for(;!o.done;){if(!1===t(o.value))return!1;o=n.next()}return!0}static eachGen(e,t=!0){return this.runInStack(e,[e],t)}static*runInStack(e,t,i,n=!0){for(;t.length;){let o=t.pop();if(n){let e=i?o.lastChild:o.firstChild;for(;e;)t.push(e),e=i?e.previousSibling:e.nextSibling}e!==o&&(yield o)}}static findWithCurrent(e,t,i,n="nextSibling",o="firstChild"){let r=e;do{if(t(r))return r||null;if(o&&r&&r[o]){let e=b.findWithCurrent(r[o],t,r,n,o);if(e)return e}for(;r&&!r[n]&&r!==i;)r=r.parentNode;r&&r[n]&&r!==i&&(r=r[n])}while(r&&r!==i);return null}static findSibling(e,t=!0,i=e=>!b.isEmptyTextNode(e)){let n=b.sibling(e,t);for(;n&&!i(n);)n=b.sibling(n,t);return n&&i(n)?n:null}static findNotEmptySibling(e,t){return b.findSibling(e,t,e=>{var t;return!b.isEmptyTextNode(e)&&!!(!b.isText(e)||(null==(t=e.nodeValue)?void 0:t.length)&&(0,d.trim)(e.nodeValue))})}static findNotEmptyNeighbor(e,t,i){return(0,_.call)(t?b.prev:b.next,e,e=>!!(e&&(!(b.isText(e)||b.isComment(e))||(0,d.trim)((null==e?void 0:e.nodeValue)||"").length)),i)}static sibling(e,t){return t?e.previousSibling:e.nextSibling}static up(e,t,i,n=!1){let o=e;if(!o)return null;do{if(t(o))return o;if(o===i||!o.parentNode)break;o=o.parentNode}while(o&&o!==i);return o===i&&n&&t(o)?o:null}static closest(e,t,i){let n,o=e=>e.toLowerCase();if((0,s.isFunction)(t))n=t;else if((0,r.isArray)(t)||(0,l.isSet)(t)){let e=(0,l.isSet)(t)?t:new Set(t.map(o));n=t=>!!(t&&e.has(o(t.nodeName)))}else n=e=>!!(e&&o(t)===o(e.nodeName));return b.up(e,n,i)}static furthest(e,t,i){let n=null,o=null==e?void 0:e.parentElement;for(;o&&o!==i;)t(o)&&(n=o),o=null==o?void 0:o.parentElement;return n}static appendChildFirst(e,t){e.firstChild!==t&&b.prepend(e,t)}static after(e,t){var i;null==(i=e.parentNode)||i.insertBefore(t,e.nextSibling)}static before(e,t){var i;null==(i=e.parentNode)||i.insertBefore(t,e)}static prepend(e,t){e.insertBefore(t,e.firstChild)}static append(e,t){(0,r.isArray)(t)?t.forEach(t=>{this.append(e,t)}):e.appendChild(t)}static moveContent(e,t,i=!1,r=()=>!0){let s=(e.ownerDocument||n.globalDocument).createDocumentFragment();(0,o.toArray)(e.childNodes).filter(e=>!!r(e)||(b.safeRemove(e),!1)).forEach(e=>{s.appendChild(e)}),t.insertBefore(s,i?t.firstChild:null)}static isOrContains(e,t,i=!1){return e===t?!i:!!(t&&e&&this.up(t,t=>t===e,e,!0))}static safeRemove(...e){e.forEach(e=>b.isNode(e)&&e.parentNode&&e.parentNode.removeChild(e))}static safeInsertNode(e,t){e.collapsed||e.deleteContents();let i=b.isFragment(t)?t.lastChild:t;e.startContainer===e.endContainer&&e.collapsed&&b.isTag(e.startContainer,n.INSEPARABLE_TAGS)?b.after(e.startContainer,t):(e.insertNode(t),i&&e.setStartBefore(i)),e.collapse(!0),[t.nextSibling,t.previousSibling].forEach(e=>b.isText(e)&&!e.nodeValue&&b.safeRemove(e))}static hide(e){e&&((0,f.dataBind)(e,"__old_display",e.style.getPropertyValue("display")),e.style.setProperty("display","none"))}static show(e){if(!e)return;let t=(0,f.dataBind)(e,"__old_display");"none"===e.style.getPropertyValue("display")&&e.style.setProperty("display",t||null)}static isTag(e,t){if(Array.isArray(t))throw TypeError("Dom.isTag does not support array");if(!this.isElement(e))return!1;let i=e.tagName.toLowerCase();return t instanceof Set?t.has(i)||t.has(e.tagName.toUpperCase()):i===t||e.tagName.toUpperCase()===t}static markTemporary(e,t){return t&&(0,p.attr)(e,t),(0,p.attr)(e,n.TEMP_ATTR,!0),e}static isTemporary(e){return!!b.isElement(e)&&(b.isMarker(e)||"true"===(0,p.attr)(e,n.TEMP_ATTR))}static isMarker(e){return b.isNode(e)&&b.isTag(e,"span")&&e.hasAttribute("data-"+n.MARKER_CLASS)}static replaceTemporaryFromString(e){return e.replace(v,"$2")}static temporaryList(e){let t=[];return b.each(e,e=>{b.isHTMLElement(e)&&e.hasAttribute(n.TEMP_ATTR)&&t.push(e)}),t}constructor(){throw Error("Dom is static module")}}},27795:function(e,t,i){"use strict";i.d(t,{Dom:function(){return n.Dom},LazyWalker:function(){return o.LazyWalker}});var n=i(23211),o=i(1080)},1080:function(e,t,i){"use strict";i.d(t,{LazyWalker:function(){return l}});var n=i(25045),o=i(31635),r=i(49574),s=i(23211),a=i(60216);class l extends a.Eventify{setWork(e){return this.isWorked?this.break():this.stop(),this.workNodes=s.Dom.eachGen(e,!this.options.reverse),this.isFinished=!1,this.hadAffect=!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(e){this.isWorked&&(this.stop(),this.emit("break",e))}end(){this.isWorked&&(this.stop(),this.emit("end",this.hadAffect),this.hadAffect=!1)}stop(){var e;this.isWorked=!1,this.isFinished=!0,this.workNodes=null,null==(e=this.__schedulerController)||e.abort(),this.__schedulerController=null}destruct(){super.destruct(),this.stop()}__workPerform(){if(this.workNodes){var e;this.isWorked=!0;let t=0,i=null!=(e=this.options.timeoutChunkSize)?e:50;for(;!this.isFinished&&t<i;){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(e){var t;return!!e&&(void 0===this.options.whatToShow||e.nodeType===this.options.whatToShow)&&null!=(t=this.emit("visit",e))&&t}constructor(e,t={}){super(),(0,n._)(this,"async",void 0),(0,n._)(this,"options",void 0),(0,n._)(this,"workNodes",void 0),(0,n._)(this,"hadAffect",void 0),(0,n._)(this,"isWorked",void 0),(0,n._)(this,"isFinished",void 0),(0,n._)(this,"__schedulerController",void 0),this.async=e,this.options=t,this.workNodes=null,this.hadAffect=!1,this.isWorked=!1,this.isFinished=!1,this.__schedulerController=null}}(0,o.__decorate)([r.autobind],l.prototype,"__workPerform",null)},93747:function(e,t,i){"use strict";i.d(t,{EventEmitter:function(){return d}});var n=i(25045),o=i(81937),r=i(32328),s=i(17312),a=i(91565),l=i(85932),u=i(33201),c=i(18869);class d{mute(e){return this.__mutedEvents.add(null!=e?e:"*"),this}isMuted(e){return!!(e&&this.__mutedEvents.has(e))||this.__mutedEvents.has("*")}unmute(e){return this.__mutedEvents.delete(null!=e?e:"*"),this}__eachEvent(e,t){(0,r.splitArray)(e).map(e=>e.trim()).forEach(e=>{let i=e.split("."),n=i[1]||c.defaultNameSpace;t.call(this,i[0],n)})}__getStore(e){if(!e)throw(0,u.error)("Need subject");if(void 0===e[this.__key]){let t=new c.EventHandlersStore;Object.defineProperty(e,this.__key,{enumerable:!1,configurable:!0,writable:!0,value:t})}return e[this.__key]}__removeStoreFromSubject(e){void 0!==e[this.__key]&&delete e[this.__key]}__triggerNativeEvent(e,t){let i=this.__doc.createEvent("HTMLEvents");(0,l.isString)(t)?i.initEvent(t,!0,!0):(i.initEvent(t.type,t.bubbles,t.cancelable),["screenX","screenY","clientX","clientY","target","srcElement","currentTarget","timeStamp","which","keyCode"].forEach(e=>{Object.defineProperty(i,e,{value:t[e],enumerable:!0})}),Object.defineProperty(i,"originalEvent",{value:t,enumerable:!0})),e.dispatchEvent(i)}get current(){return this.currents[this.currents.length-1]}on(e,t,i,n){let r,c,d,p;if((0,l.isString)(e)||(0,l.isStringArray)(e)?(r=this,c=e,d=t,p=i):(r=e,c=t,d=i,p=n),!((0,l.isString)(c)||(0,l.isStringArray)(c))||0===c.length)throw(0,u.error)("Need events names");if(!(0,a.isFunction)(d))throw(0,u.error)("Need event handler");if((0,s.isArray)(r))return r.forEach(e=>{this.on(e,c,d,p)}),this;let m=r,f=this.__getStore(m),g=this,_=function(e,...t){if(!g.isMuted(e))return d&&d.call(this,...t)};return h(m)&&(_=function(e){if(!g.isMuted(e.type)&&(g.__prepareEvent(e),d&&!1===d.call(this,e)))return e.preventDefault(),e.stopImmediatePropagation(),!1}),this.__eachEvent(c,(e,t)=>{if(0===e.length)throw(0,u.error)("Need event name");if(!1===f.indexOf(e,t,d)){let r={event:e,originalCallback:d,syntheticCallback:_};if(f.set(e,t,r,null==p?void 0:p.top),h(m)){var i,n;let t=o.PASSIVE_EVENTS.has(e)?{passive:!0,capture:null!=(i=null==p?void 0:p.capture)&&i}:null!=(n=null==p?void 0:p.capture)&&n;_.options=t,m.addEventListener(e,_,t),this.__memoryDOMSubjectToHandler(m,_)}}}),this}__memoryDOMSubjectToHandler(e,t){let i=this.__domEventsMap.get(e)||new Set;i.add(t),this.__domEventsMap.set(e,i)}__unmemoryDOMSubjectToHandler(e,t){let i=this.__domEventsMap,n=i.get(e)||new Set;n.delete(t),n.size?i.set(e,n):i.delete(e)}one(e,t,i,n){let o,r,s,a;(0,l.isString)(e)||(0,l.isStringArray)(e)?(o=this,r=e,s=t,a=i):(o=e,r=t,s=i,a=n);let u=(...e)=>(this.off(o,r,u),s(...e));return this.on(o,r,u,a),this}off(e,t,i){let n,o,r;if((0,l.isString)(e)||(0,l.isStringArray)(e)?(n=this,o=e,r=t):(n=e,o=t,r=i),(0,s.isArray)(n))return n.forEach(e=>{this.off(e,o,r)}),this;let u=n,d=this.__getStore(u);if(!((0,l.isString)(o)||(0,l.isStringArray)(o))||0===o.length)return d.namespaces().forEach(e=>{this.off(u,"."+e)}),this.__removeStoreFromSubject(u),this;let p=e=>{if(h(u)){var t;u.removeEventListener(e.event,e.syntheticCallback,null!=(t=e.syntheticCallback.options)&&t),this.__unmemoryDOMSubjectToHandler(u,e.syntheticCallback)}},m=(e,t)=>{if(""===e)return void d.events(t).forEach(e=>{""!==e&&m(e,t)});let i=d.get(e,t);if(i&&i.length)if((0,a.isFunction)(r)){let n=d.indexOf(e,t,r);!1!==n&&(p(i[n]),i.splice(n,1),i.length||d.clearEvents(t,e))}else i.forEach(p),i.length=0,d.clearEvents(t,e)};return this.__eachEvent(o,(e,t)=>{t===c.defaultNameSpace?d.namespaces().forEach(t=>{m(e,t)}):m(e,t)}),d.isEmpty()&&this.__removeStoreFromSubject(u),this}stopPropagation(e,t){let i=(0,l.isString)(e)?this:e,n=(0,l.isString)(e)?e:t;if("string"!=typeof n)throw(0,u.error)("Need event names");let o=this.__getStore(i);this.__eachEvent(n,(e,t)=>{let n=o.get(e,t);n&&this.__stopped.push(n),t===c.defaultNameSpace&&o.namespaces(!0).forEach(t=>this.stopPropagation(i,e+"."+t))})}__removeStop(e){if(e){let t=this.__stopped.indexOf(e);-1!==t&&this.__stopped.splice(0,t+1)}}__isStopped(e){return void 0!==e&&-1!==this.__stopped.indexOf(e)}fire(e,t,...i){let n,o,r=(0,l.isString)(e)?this:e,s=(0,l.isString)(e)?e:t,a=(0,l.isString)(e)?[t,...i]:i;if(!h(r)&&!(0,l.isString)(s))throw(0,u.error)("Need events names");let d=this.__getStore(r);return!(0,l.isString)(s)&&h(r)?this.__triggerNativeEvent(r,t):this.__eachEvent(s,(e,t)=>{if(h(r))this.__triggerNativeEvent(r,e);else{let i=d.get(e,t);if(i)try{[...i].every(t=>!this.__isStopped(i)&&(this.currents.push(e),o=t.syntheticCallback.call(r,e,...a),this.currents.pop(),void 0!==o&&(n=o),!0))}finally{this.__removeStop(i)}t!==c.defaultNameSpace||h(r)||d.namespaces().filter(e=>e!==t).forEach(t=>{let i=this.fire.apply(this,[r,e+"."+t,...a]);void 0!==i&&(n=i)})}}),n}destruct(){this.__isDestructed||(this.__isDestructed=!0,this.__domEventsMap.forEach((e,t)=>{this.off(t)}),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(e){(0,n._)(this,"__domEventsMap",new Map),(0,n._)(this,"__mutedEvents",new Set),(0,n._)(this,"__key","__JoditEventEmitterNamespaces"),(0,n._)(this,"__doc",o.globalDocument),(0,n._)(this,"__prepareEvent",e=>{!e.cancelBubble&&(e.composed&&(0,a.isFunction)(e.composedPath)&&e.composedPath()[0]&&Object.defineProperty(e,"target",{value:e.composedPath()[0],configurable:!0,enumerable:!0}),e.type.match(/^touch/)&&e.changedTouches&&e.changedTouches.length&&["clientX","clientY","pageX","pageY"].forEach(t=>{Object.defineProperty(e,t,{value:e.changedTouches[0][t],configurable:!0,enumerable:!0})}),e.originalEvent||(e.originalEvent=e),"paste"===e.type&&void 0===e.clipboardData&&this.__doc.defaultView.clipboardData&&Object.defineProperty(e,"clipboardData",{get:()=>this.__doc.defaultView.clipboardData,configurable:!0,enumerable:!0}))}),(0,n._)(this,"currents",[]),(0,n._)(this,"__stopped",[]),(0,n._)(this,"__isDestructed",!1),e&&(this.__doc=e),this.__key+=new Date().getTime()}}function h(e){return e&&(0,a.isFunction)(e.addEventListener)}},60216:function(e,t,i){"use strict";i.d(t,{Eventify:function(){return o}});var n=i(25045);class o{on(e,t){var i;return this.__map.has(e)||this.__map.set(e,new Set),null==(i=this.__map.get(e))||i.add(t),this}off(e,t){if(this.__map.has(e)){var i;null==(i=this.__map.get(e))||i.delete(t)}return this}destruct(){this.__map.clear()}emit(e,...t){let i;if(this.__map.has(e)){var n;null==(n=this.__map.get(e))||n.forEach(e=>{i=e(...t)})}return i}constructor(){(0,n._)(this,"__map",new Map)}}},42689:function(e,t,i){"use strict";let n=new(i(93747)).EventEmitter;i.d(t,["eventEmitter",0,n])},1496:function(e,t,i){"use strict";i.d(t,{EventEmitter:function(){return n.EventEmitter},EventHandlersStore:function(){return s.EventHandlersStore},Eventify:function(){return o.Eventify},defaultNameSpace:function(){return s.defaultNameSpace},observable:function(){return r.observable}});var n=i(93747),o=i(60216),r=i(70535),s=i(18869)},70535:function(e,t,i){"use strict";i.d(t,{observable:function(){return u}});var n=i(17312),o=i(94013),r=i(62101),s=i(71125);let a=Symbol("observable-object");function l(e){return void 0!==e[a]}function u(e){if(l(e))return e;let t={},i={},u=(t,o)=>((0,n.isArray)(t)?t.map(e=>u(e,o)):(i[t]||(i[t]=[]),i[t].push(o)),e),c=(o,...r)=>{if((0,n.isArray)(o))return void o.map(e=>c(e,...r));try{!t[o]&&i[o]&&(t[o]=!0,i[o].forEach(t=>t.call(e,...r)))}finally{t[o]=!1}},d=(t,i=[])=>{let n={};l(t)||(Object.defineProperty(t,a,{enumerable:!1,value:!0}),Object.keys(t).forEach(a=>{let l=i.concat(a).filter(e=>e.length);n[a]=t[a];let u=(0,s.getPropertyDescriptor)(t,a);Object.defineProperty(t,a,{set:t=>{let i=n[a];if(!(0,o.isFastEqual)(n[a],t)){c(["beforeChange",`beforeChange.${l.join(".")}`],a,t),(0,r.isPlainObject)(t)&&d(t,l),u&&u.set?u.set.call(e,t):n[a]=t;let o=[];c(["change",...l.reduce((e,t)=>(o.push(t),e.push(`change.${o.join(".")}`),e),[])],l.join("."),i,(null==t?void 0:t.valueOf)?t.valueOf():t)}},get:()=>u&&u.get?u.get.call(e):n[a],enumerable:!0,configurable:!0}),(0,r.isPlainObject)(n[a])&&d(n[a],l)}),Object.defineProperty(e,"on",{value:u}))};return d(e),e}},18869:function(e,t,i){"use strict";i.d(t,{EventHandlersStore:function(){return a}});var n=i(25045),o=i(88475),r=i(28712);let s="JoditEventDefaultNamespace";class a{get(e,t){if(this.__store.has(t)){let i=this.__store.get(t);return(0,r.assert)(i,"-"),i[e]}}indexOf(e,t,i){let n=this.get(e,t);if(n){for(let e=0;e<n.length;e+=1)if(n[e].originalCallback===i)return e}return!1}namespaces(e=!1){let t=(0,o.toArray)(this.__store.keys());return e?t.filter(e=>e!==s):t}events(e){let t=this.__store.get(e);return t?Object.keys(t):[]}set(e,t,i,n=!1){let o=this.__store.get(t);o||(o={},this.__store.set(t,o)),void 0===o[e]&&(o[e]=[]),n?o[e].unshift(i):o[e].push(i)}clear(){this.__store.clear()}clearEvents(e,t){let i=this.__store.get(e);i&&i[t]&&(delete i[t],Object.keys(i).length||this.__store.delete(e))}isEmpty(){return 0===this.__store.size}constructor(){(0,n._)(this,"__store",new Map)}}i.d(t,["defaultNameSpace",0,s])},28077:function(e,t,i){"use strict";i.d(t,{getContainer:function(){return b},getPopupViewRoot:function(){return y},uniqueUid:function(){return g}});var n=i(24497),o=i(85932),r=i(31534),s=i(74264),a=i(7909),l=i(80991),u=i(421),c=i(85305),d=i(42689),h=i(81937),p=i(27795);let m=1,f=new Set;function g(){function e(){return Math.round(m+=10*(Math.random()+1)).toString(16)}let t=e();for(;f.has(t);)t=e();return f.add(t),t}let _=new c.PluginSystem({getContainer:b}),v=new WeakMap;function b(e,t,i="div",l=!1){let c,d=(0,o.isString)(t)?t:t?(0,u.getClassName)(t.prototype):"jodit-utils",h=v.get(e)||{},m=d+i,f=(0,r.isViewObject)(e)?e:e.j;if(!h[m]){let t=f.c;if(c=y(f.o,f.container,e.od.body),l&&(0,n.isJoditObject)(e)&&e.od!==e.ed){t=e.createInside;let o="style"===i?e.ed.head:e.ed.body;c=(0,n.isJoditObject)(e)&&e.o.shadowRoot?e.o.shadowRoot:o}let o=t.element(i,{className:`jodit jodit-${(0,s.kebabCase)(d)}-container jodit-box`});f.o.nonce&&("style"===i||"script"===i)&&(0,a.attr)(o,"nonce",f.o.nonce),o.classList.add(`jodit_theme_${f.o.theme||"default"}`),p.Dom.append(c,o),h[m]=o,e.hookStatus("beforeDestruct",()=>{f.events.off(o),p.Dom.safeRemove(o),delete h[m],Object.keys(h).length&&v.delete(e)}),v.set(e,h),f.events.fire("getContainer",o)}return h[m].classList.remove("jodit_theme_default","jodit_theme_dark"),h[m].classList.add(`jodit_theme_${f.o.theme||"default"}`),h[m]}function y(e,t,i){var n,o,r;return null!=(n=null!=(o=null!=(r=e.popupRoot)?r:e.shadowRoot)?o:p.Dom.closest(t,e=>p.Dom.isHTMLElement(e)&&(p.Dom.isTag(e,"dialog")||["fixed","absolute"].includes((0,l.css)(e,"position"))),i))?n:i}let w=d.eventEmitter;i.d(t,["eventEmitter",0,w,"extendLang",0,e=>{Object.keys(e).forEach(t=>{h.lang[t]?Object.assign(h.lang[t],e[t]):h.lang[t]=e[t]})},"instances",0,{},"modules",0,{},"pluginSystem",0,_])},78982:function(e,t,i){"use strict";var n=i(17312);i.d(t,["asArray",0,e=>(0,n.isArray)(e)?e:[e]])},45664:function(e,t,i){"use strict";i.d(t,{asArray:function(){return n.asArray},splitArray:function(){return o.splitArray},toArray:function(){return r.toArray}});var n=i(78982),o=i(32328),r=i(88475)},32328:function(e,t,i){"use strict";function n(e){return Array.isArray(e)?e:e.split(/[,\s]+/)}i.d(t,{splitArray:function(){return n}})},88475:function(e,t,i){"use strict";var n=i(23283),o=i(43379);i.d(t,["toArray",0,function(...e){var t;return((0,n.isNativeFunction)(Array.from)?Array.from:null!=(t=(0,o.reset)("Array.from"))?t:Array.from).apply(Array,e)}])},61077:function(e,t,i){"use strict";i.d(t,{clearTimeout:function(){return n.clearTimeout},setTimeout:function(){return n.setTimeout}});var n=i(79947)},79947:function(e,t,i){"use strict";i.d(t,{clearTimeout:function(){return r},setTimeout:function(){return o}});var n=i(81937);function o(e,t,...i){return t?n.globalWindow.setTimeout(e,t,...i):(e.call(null,...i),0)}function r(e){n.globalWindow.clearTimeout(e)}},98740:function(e,t,i){"use strict";i.d(t,{hasBrowserColorPicker:function(){return o}});var n=i(81937);function o(){let e;try{let t=n.globalDocument.createElement("input");t.type="color",t.value="!",e="color"===t.type&&"!"!==t.value}catch(t){e=!1}return e}},28686:function(e,t,i){"use strict";i.d(t,{hasBrowserColorPicker:function(){return n.hasBrowserColorPicker},hasContainer:function(){return d.hasContainer},isAbortError:function(){return o.isAbortError},isArray:function(){return r.isArray},isBoolean:function(){return s.isBoolean},isDestructable:function(){return d.isDestructable},isEqual:function(){return a.isEqual},isFastEqual:function(){return a.isFastEqual},isFunction:function(){return l.isFunction},isHTML:function(){return u.isHTML},isHtmlFromWord:function(){return c.isHtmlFromWord},isInitable:function(){return d.isInitable},isInt:function(){return h.isInt},isJoditObject:function(){return p.isJoditObject},isLicense:function(){return m.isLicense},isMarker:function(){return f.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 k.isString},isStringArray:function(){return k.isStringArray},isURL:function(){return S.isURL},isValidName:function(){return C.isValidName},isViewObject:function(){return E.isViewObject},isVoid:function(){return T.isVoid},isWindow:function(){return I.isWindow}});var n=i(98740),o=i(72068),r=i(17312),s=i(22289),a=i(94013),l=i(91565),u=i(46248),c=i(82166),d=i(52433),h=i(99732),p=i(24497),m=i(44998),f=i(23175),g=i(23283),_=i(72412),v=i(70222),b=i(62101),y=i(52100),w=i(3213),k=i(85932),S=i(91764),C=i(50083),E=i(31534),T=i(18303),I=i(3513)},72068:function(e,t,i){"use strict";function n(e){return!!e&&e instanceof DOMException&&"AbortError"===e.name}i.d(t,{isAbortError:function(){return n}})},17312:function(e,t,i){"use strict";function n(e){return Array.isArray(e)}i.d(t,{isArray:function(){return n}})},22289:function(e,t,i){"use strict";function n(e){return"boolean"==typeof e}i.d(t,{isBoolean:function(){return n}})},94013:function(e,t,i){"use strict";i.d(t,{isEqual:function(){return o},isFastEqual:function(){return r}});var n=i(3347);function o(e,t){return e===t||(0,n.stringify)(e)===(0,n.stringify)(t)}function r(e,t){return e===t}},91565:function(e,t,i){"use strict";function n(e){return"function"==typeof e}i.d(t,{isFunction:function(){return n}})},82166:function(e,t,i){"use strict";function n(e){return -1!==e.search(/<meta.*?Microsoft Excel\s[\d].*?>/)||-1!==e.search(/<meta.*?Microsoft Word\s[\d].*?>/)||-1!==e.search(/<meta[^>]*?ProgId[^>]*?(Word|Excel)\./i)||-1!==e.search(/<meta[^>]*?(LibreOffice|OpenOffice)/i)||-1!==e.search(/urn:schemas-microsoft-com:office:(word|excel)/)||-1!==e.search(/<\w[^>]*\sclass=("|')?Mso/)||-1!==e.search(/style='[^']*mso-/)||-1!==e.search(/style="[^"]*mso-/)&&-1!==e.search(/<font/)}i.d(t,{isHtmlFromWord:function(){return n}})},46248:function(e,t,i){"use strict";var n=i(85932);i.d(t,["isHTML",0,e=>(0,n.isString)(e)&&/<([A-Za-z][A-Za-z0-9]*)\b[^>]*>(.*?)<\/\1>/m.test(e.replace(/[\r\n]/g,""))])},52433:function(e,t,i){"use strict";i.d(t,{hasContainer:function(){return l},isDestructable:function(){return a},isInitable:function(){return s}});var n=i(23211),o=i(91565),r=i(18303);function s(e){return!(0,r.isVoid)(e)&&(0,o.isFunction)(e.init)}function a(e){return!(0,r.isVoid)(e)&&(0,o.isFunction)(e.destruct)}function l(e){return!(0,r.isVoid)(e)&&n.Dom.isElement(e.container)}},99732:function(e,t,i){"use strict";i.d(t,{isInt:function(){return r}});var n=i(70222),o=i(85932);function r(e){return(0,o.isString)(e)&&(0,n.isNumeric)(e)&&(e=parseFloat(e)),"number"==typeof e&&Number.isFinite(e)&&!(e%1)}},24497:function(e,t,i){"use strict";i.d(t,{isJoditObject:function(){return o}});var n=i(91565);function o(e){return!!(e&&e instanceof Object&&(0,n.isFunction)(e.constructor)&&("u">typeof Jodit&&e instanceof Jodit||e.isJodit))}},44998:function(e,t,i){"use strict";var n=i(85932);i.d(t,["isLicense",0,e=>(0,n.isString)(e)&&23===e.length&&/^[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}$/i.test(e)])},23175:function(e,t,i){"use strict";i.d(t,{isMarker:function(){return o}});var n=i(23211);function o(e){return n.Dom.isMarker(e)}},23283:function(e,t,i){"use strict";function n(e){return!!e&&"function"===(typeof e).toLowerCase()&&(e===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(String(e)))}i.d(t,{isNativeFunction:function(){return n}})},72412:function(e,t,i){"use strict";function n(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}i.d(t,{isNumber:function(){return n}})},70222:function(e,t,i){"use strict";i.d(t,{isNumeric:function(){return o}});var n=i(85932);function o(e){if((0,n.isString)(e)){if(!e.match(/^([+-])?[0-9]+(\.?)([0-9]+)?(e[0-9]+)?$/))return!1;e=parseFloat(e)}return"number"==typeof e&&!isNaN(e)&&isFinite(e)}},62101:function(e,t,i){"use strict";i.d(t,{isPlainObject:function(){return o}});var n=i(3513);function o(e){return!(!e||"object"!=typeof e||e.nodeType||(0,n.isWindow)(e))&&!(e.constructor&&!({}).hasOwnProperty.call(e.constructor.prototype,"isPrototypeOf"))}},52100:function(e,t,i){"use strict";function n(e){return e&&"function"==typeof e.then}i.d(t,{isPromise:function(){return n}})},3213:function(e,t,i){"use strict";i.d(t,{isSet:function(){return o}});var n=i(91565);function o(e){return!!e&&(0,n.isFunction)(e.has)&&(0,n.isFunction)(e.add)&&(0,n.isFunction)(e.delete)}},85932:function(e,t,i){"use strict";i.d(t,{isString:function(){return o},isStringArray:function(){return r}});var n=i(17312);function o(e){return"string"==typeof e}function r(e){return(0,n.isArray)(e)&&o(e[0])}},91764:function(e,t,i){"use strict";i.d(t,{isURL:function(){return o}});var n=i(81937);function o(e){if(e.includes(" "))return!1;if("u">typeof URL)try{let t=new URL(e);return["https:","http:","ftp:","file:","rtmp:"].includes(t.protocol)}catch(e){return!1}let t=n.globalDocument.createElement("a");return t.href=e,!!t.hostname}},50083:function(e,t,i){"use strict";function n(e){return!!e.length&&!/[^0-9A-Za-zа-яА-ЯЁё\w\-_. ]/.test(e)&&e.trim().length>0}i.d(t,{isValidName:function(){return n}})},31534:function(e,t,i){"use strict";i.d(t,{isViewObject:function(){return o}});var n=i(91565);function o(e){return!!(e&&e instanceof Object&&(0,n.isFunction)(e.constructor)&&e.isView)}},18303:function(e,t,i){"use strict";function n(e){return null==e}i.d(t,{isVoid:function(){return n}})},3513:function(e,t,i){"use strict";function n(e){return null!=e&&e===e.window}i.d(t,{isWindow:function(){return n}})},93387:function(e,t,i){"use strict";i.d(t,["colorToHex",0,e=>{if("rgba(0, 0, 0, 0)"===e||""===e)return!1;if(!e)return"#000000";if("#"===e.substr(0,1))return e;let t=/([\s\n\t\r]*?)rgb\((\d+), (\d+), (\d+)\)/.exec(e)||/([\s\n\t\r]*?)rgba\((\d+), (\d+), (\d+), ([\d.]+)\)/.exec(e);if(!t)return"#000000";let i=parseInt(t[2],10),n=parseInt(t[3],10),o=(parseInt(t[4],10)|n<<8|i<<16).toString(16).toUpperCase();for(;o.length<6;)o="0"+o;return t[1]+"#"+o}])},30893:function(e,t,i){"use strict";i.d(t,{applyStyles:function(){return c}});var n=i(81937),o=i(23211),r=i(4040),s=i(7909),a=i(80991),l=i(28723);function u(e){return e.replace(/mso-[a-z-]+:[\s]*[^;]+;/gi,"").replace(/mso-[a-z-]+:[\s]*[^";']+$/gi,"").replace(/border[a-z-]*:[\s]*[^;]+;/gi,"").replace(/([0-9.]+)(pt|cm)/gi,(e,t,i)=>{switch(i.toLowerCase()){case"pt":return(1.328*parseFloat(t)).toFixed(0)+"px";case"cm":return(.02645833*parseFloat(t)).toFixed(0)+"px"}return e})}function c(e){let t=/<html(?:\s[^>]*)?>/i.exec(e);if(!t)return e;let i=(e=e.substring(t.index)).toLowerCase().lastIndexOf("</html>");-1!==i&&(e=e.substring(0,i+7));let c=n.globalDocument.createElement("iframe");(0,a.css)(c,"display","none"),o.Dom.append(n.globalDocument.body,c);let d="";try{let t=c.contentDocument||(c.contentWindow?c.contentWindow.document:null);if(t){t.open(),t.write(e),t.close(),o.Dom.each(t.body,e=>{o.Dom.isElement(e)&&/mso-list:\s*ignore/i.test((0,s.attr)(e,"style")||"")&&o.Dom.safeRemove(e)});try{for(let e=0;e<t.styleSheets.length;e+=1){let i=t.styleSheets[e].cssRules;for(let e=0;e<i.length;e+=1)""!==i[e].selectorText&&(0,l.$$)(i[e].selectorText,t.body).forEach(t=>{t.style.cssText=u(i[e].style.cssText+";"+t.style.cssText)})}}catch(e){if(!n.IS_PROD)throw e}o.Dom.each(t.body,e=>{if(o.Dom.isElement(e)){let t=(0,s.attr)(e,"style");t&&(e.style.cssText=u(t)),(0,s.attr)(e,"style")||(0,s.attr)(e,"style",null)}}),d=t.firstChild?(0,r.trim)(t.body.innerHTML):""}}catch(e){}finally{o.Dom.safeRemove(c)}return d&&(e=d),(0,r.trim)(e.replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(/<!--[^>]*>/g,""))}},1277:function(e,t,i){"use strict";i.d(t,{cleanFromWord:function(){return l}});var n=i(81937),o=i(23211),r=i(88475),s=i(4040),a=i(7909);function l(e){-1!==e.indexOf("<html ")&&(e=(e=e.substring(e.indexOf("<html "),e.length)).substring(0,e.lastIndexOf("</html>")+7));let t="";try{let i=n.globalDocument.createElement("div");i.innerHTML=e;let s=[];i.firstChild&&o.Dom.each(i,e=>{if(e)switch(e.nodeType){case Node.ELEMENT_NODE:switch(e.nodeName){case"STYLE":case"LINK":case"META":s.push(e);break;case"W:SDT":case"W:SDTPR":case"FONT":o.Dom.unwrap(e);break;default:if(/mso-list:\s*ignore/i.test((0,a.attr)(e,"style")||"")){s.push(e);break}(0,r.toArray)(e.attributes).forEach(t=>{-1===["src","href","rel","content"].indexOf(t.name.toLowerCase())&&(0,a.attrRaw)(e,t.name,null)})}break;case Node.TEXT_NODE:break;default:s.push(e)}}),o.Dom.safeRemove.apply(null,s),t=i.innerHTML}catch(e){}return t&&(e=t),(e=e.split(/(\n)/).filter(s.trim).join("\n")).replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(/<!--[^>]*>/g,"")}},6609:function(e,t,i){"use strict";i.d(t,{htmlspecialchars:function(){return o}});var n=i(81937);function o(e){let t=n.globalDocument.createElement("div");return t.textContent=e,t.innerHTML}},82658:function(e,t,i){"use strict";i.d(t,{applyStyles:function(){return n.applyStyles},cleanFromWord:function(){return o.cleanFromWord},htmlspecialchars:function(){return r.htmlspecialchars},nl2br:function(){return s.nl2br},safeHTML:function(){return a.safeHTML},sanitizeHTMLElement:function(){return a.sanitizeHTMLElement},stripTags:function(){return l.stripTags}});var n=i(30893),o=i(1277),r=i(6609),s=i(48838),a=i(48155),l=i(22852)},48838:function(e,t,i){"use strict";function n(e){return e.replace(/\r\n|\r|\n/g,"<br/>")}i.d(t,{nl2br:function(){return n}})},48155:function(e,t,i){"use strict";i.d(t,{safeHTML:function(){return l},sanitizeHTMLElement:function(){return h}});var n=i(23211),o=i(93640),r=i(7909);let s=new Set(["foreignobject","annotation-xml","desc","title"]),a=e=>!!(e&&/^(math|svg)$/i.test(e.nodeName));function l(e,t){var i;if(!n.Dom.isElement(e)&&!n.Dom.isFragment(e))return;let l=[];for(let t of(n.Dom.each(e,e=>{n.Dom.isElement(e)&&n.Dom.up(e.parentNode,a)&&l.push(e)}),l))n.Dom.isOrContains(e,t)&&function(e){if("http://www.w3.org/1999/xhtml"!==e.namespaceURI||null==n.Dom.up(e,a))return!1;for(let t=e.parentElement;t;t=t.parentElement){let e=t.nodeName.toLowerCase();if("math"===e||"svg"===e)break;if(s.has(e))return!1}return!0}(t)&&n.Dom.safeRemove(t);let u=null!=(i=t.removeEventAttributes)?i:t.removeOnError,c=e=>{if(n.Dom.isElement(e)&&(u&&function(e){if(!n.Dom.isElement(e))return;let t=[];for(let i=0;i<e.attributes.length;i++)e.attributes[i].name.toLowerCase().startsWith("on")&&t.push(e.attributes[i].name);for(let i of t)(0,r.attrRaw)(e,i,null)}(e),h(e,t),t.safeLinksTarget&&"A"===e.nodeName&&"_blank"===(0,o.attr)(e,"target"))){let t=((0,o.attr)(e,"rel")||"").split(/\s+/).filter(Boolean);t.includes("noopener")||t.push("noopener"),t.includes("noreferrer")||t.push("noreferrer"),(0,o.attr)(e,"rel",t.join(" "))}};c(e),n.Dom.each(e,c)}let u=["src","data","action","formaction","poster","background","xlink:href"],c=new Set(["iframe","frame","object","embed"]);function d(e,t){let i=e.replace(/[\u0000-\u0020]+/g,"").toLowerCase();return!!(/^(?:javascript|vbscript|livescript|mocha):/.test(i)||/^data:(?:text\/html|application\/xhtml)/.test(i))||/^data:image\/svg/.test(i)&&c.has(t)}function h(e,{safeJavaScriptLink:t,removeOnError:i}={safeJavaScriptLink:!0,removeOnError:!0}){if(!n.Dom.isElement(e))return!1;let s=!1;i&&e.hasAttribute("onerror")&&((0,o.attr)(e,"onerror",null),s=!0);let a=e.nodeName.toLowerCase(),l=(0,o.attr)(e,"href");if(t&&l&&d(l,a)){let t="u">typeof location?location.protocol:"http:";(0,o.attr)(e,"href",t+"//"+l),s=!0}if(t)for(let t of(e.hasAttribute("srcdoc")&&((0,o.attr)(e,"srcdoc",null),s=!0),u)){let i=(0,r.attrRaw)(e,t);i&&d(i,a)&&((0,o.attr)(e,t,null),s=!0)}return s}},22852:function(e,t,i){"use strict";i.d(t,{stripTags:function(){return function e(t,i=document,u=null,c=!1){let d=i.createElement("div");(0,o.isString)(t)?d.innerHTML=t:n.Dom.append(d,t);let h=[];return n.Dom.each(d,e=>{n.Dom.isElement(e)&&h.push(e)}),h.forEach(t=>{if(!t.parentNode)return;if(u&&n.Dom.isTag(t,u)){let o=t.nodeName.toLowerCase(),r=n.Dom.isTag(t,l)?`%%%jodit-single-${o}%%%`:`%%%jodit-${o}%%%${e(t.innerHTML,i,u,c)}%%%/jodit-${o}%%%`;n.Dom.before(t,i.createTextNode(r)),n.Dom.safeRemove(t);return}if(n.Dom.isTag(t,a))return void n.Dom.safeRemove(t);if(!n.Dom.isTag(t,s))return;let o=t.nextSibling;!(n.Dom.isText(o)&&/^\s/.test(o.nodeValue||""))&&o&&n.Dom.before(o,i.createTextNode(c?"%%%jodit-single-br%%%":" "))}),(0,r.trim)(d.innerText).replace(/%%%(\/)?jodit(-single)?-([\w\n]+)%%%/g,(e,t,i,n)=>`<${t?"/":""}${n}>`)}}});var n=i(23211),o=i(85932),r=i(4040);let s=new Set(["div","p","br","h1","h2","h3","h4","h5","h6","hr"]),a=new Set(["script","style"]),l=new Set(["br","hr","input"])},65946:function(e,t,i){"use strict";i.r(t),i.d(t,{CamelCaseToKebabCase:function(){return c.CamelCaseToKebabCase},NUMBER_FIELDS_REG:function(){return l.NUMBER_FIELDS_REG},applyStyles:function(){return a.applyStyles},asArray:function(){return n.asArray},camelCase:function(){return c.camelCase},cleanFromWord:function(){return a.cleanFromWord},clearTimeout:function(){return o.clearTimeout},colorToHex:function(){return s.colorToHex},fuzzySearchIndex:function(){return c.fuzzySearchIndex},getContentWidth:function(){return u.getContentWidth},getFixedPositionOffset:function(){return u.getFixedPositionOffset},getScrollParent:function(){return u.getScrollParent},hasBrowserColorPicker:function(){return r.hasBrowserColorPicker},hasContainer:function(){return r.hasContainer},htmlspecialchars:function(){return a.htmlspecialchars},i18n:function(){return c.i18n},innerWidth:function(){return u.innerWidth},isAbortError:function(){return r.isAbortError},isArray:function(){return r.isArray},isBoolean:function(){return r.isBoolean},isDestructable:function(){return r.isDestructable},isEqual:function(){return r.isEqual},isFastEqual:function(){return r.isFastEqual},isFunction:function(){return r.isFunction},isHTML:function(){return r.isHTML},isHtmlFromWord:function(){return r.isHtmlFromWord},isInitable:function(){return r.isInitable},isInt:function(){return r.isInt},isJoditObject:function(){return r.isJoditObject},isLicense:function(){return r.isLicense},isMarker:function(){return r.isMarker},isNativeFunction:function(){return r.isNativeFunction},isNumber:function(){return r.isNumber},isNumeric:function(){return r.isNumeric},isPlainObject:function(){return r.isPlainObject},isPromise:function(){return r.isPromise},isSet:function(){return r.isSet},isString:function(){return r.isString},isStringArray:function(){return r.isStringArray},isURL:function(){return r.isURL},isValidName:function(){return r.isValidName},isViewObject:function(){return r.isViewObject},isVoid:function(){return r.isVoid},isWindow:function(){return r.isWindow},kebabCase:function(){return c.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 u.offset},position:function(){return u.position},safeHTML:function(){return a.safeHTML},sanitizeHTMLElement:function(){return a.sanitizeHTMLElement},setTimeout:function(){return o.setTimeout},size:function(){return u.size},splitArray:function(){return n.splitArray},sprintf:function(){return c.sprintf},stringify:function(){return c.stringify},stripTags:function(){return a.stripTags},toArray:function(){return n.toArray},trim:function(){return c.trim},trimChars:function(){return c.trimChars},trimInv:function(){return c.trimInv},ucfirst:function(){return c.ucfirst}});var n=i(45664),o=i(61077),r=i(28686),s=i(93387),a=i(82658),l=i(97022),u=i(86878),c=i(97642),d=i(93640),h={};for(var p in d)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","getFixedPositionOffset","getScrollParent","innerWidth","offset","position","size","CamelCaseToKebabCase","camelCase","fuzzySearchIndex","i18n","kebabCase","sprintf","stringify","trim","trimChars","trimInv","ucfirst"].indexOf(p)&&(h[p]=(function(e){return d[e]}).bind(0,p));i.d(t,h)},97022:function(e,t,i){"use strict";i.d(t,{NUMBER_FIELDS_REG:function(){return o.NUMBER_FIELDS_REG},normalizeColor:function(){return n.normalizeColor},normalizeCssNumericValue:function(){return o.normalizeCssNumericValue},normalizeCssValue:function(){return o.normalizeCssValue},normalizeKeyAliases:function(){return r.normalizeKeyAliases},normalizeLicense:function(){return s.normalizeLicense},normalizePath:function(){return a.normalizePath},normalizeRelativePath:function(){return l.normalizeRelativePath},normalizeSize:function(){return u.normalizeSize},normalizeUrl:function(){return c.normalizeUrl}});var n=i(77367),o=i(19147),r=i(27978),s=i(49663),a=i(18377),l=i(96340),u=i(98831),c=i(48009)},77367:function(e,t,i){"use strict";var n=i(93387),o=i(4040);i.d(t,["normalizeColor",0,e=>{let t=["#"],i=(0,n.colorToHex)(e);if(!i)return!1;if(3===(i=(i=(0,o.trim)(i.toUpperCase())).substring(1)).length){for(let e=0;e<3;e+=1)t.push(i[e]),t.push(i[e]);return t.join("")}return i.length>6&&(i=i.slice(0,6)),"#"+i}])},19147:function(e,t,i){"use strict";i.d(t,{normalizeCssNumericValue:function(){return l},normalizeCssValue:function(){return u}});var n=i(70222),o=i(18303),r=i(93387),s=i(74264);let a=/^(left|top|bottom|right|width|min|max|height|margin|padding|fontsize|font-size)/i;function l(e,t){return!(0,o.isVoid)(t)&&a.test(e)&&(0,n.isNumeric)(t.toString())?parseInt(t.toString(),10)+"px":t}function u(e,t){if("font-weight"===(0,s.kebabCase)(e)){switch(t.toString().toLowerCase()){case"700":case"bold":return 700;case"400":case"normal":return 400;case"900":case"heavy":return 900}return(0,n.isNumeric)(t)?Number(t):t}return/color/i.test(e)&&/^rgb/i.test(t.toString())&&(0,r.colorToHex)(t.toString())||t}i.d(t,["NUMBER_FIELDS_REG",0,a])},27978:function(e,t,i){"use strict";i.d(t,{normalizeKeyAliases:function(){return r}});var n=i(81937),o=i(4040);function r(e){let t={},i={meta:1,ctrl:2,control:2,alt:3,shift:4,space:5};return e.replace(/\+\+/g,"+add").split(/[\s]*\+[\s]*/).map(e=>(0,o.trim)(e.toLowerCase())).map(e=>n.KEY_ALIASES[e]||e).sort((e,t)=>i[e]&&!i[t]?-1:!i[e]&&i[t]?1:i[e]&&i[t]?i[e]-i[t]:e>t?1:-1).filter(e=>!t[e]&&""!==e&&(t[e]=!0)).join("+")}},49663:function(e,t,i){"use strict";i.d(t,["normalizeLicense",0,(e,t=8)=>{let i=[];for(;e.length;)i.push(e.substr(0,t)),e=e.substr(t);return i[1]=i[1].replace(/./g,"*"),i[2]=i[2].replace(/./g,"*"),i.join("-")}])},18377:function(e,t,i){"use strict";var n=i(4040);i.d(t,["normalizePath",0,(...e)=>e.filter(e=>(0,n.trim)(e).length).map((t,i)=>(t=t.replace(/([^:])[\\/]+/g,"$1/"),i&&(t=t.replace(/^\//,"")),i!==e.length-1&&(t=t.replace(/\/$/,"")),t)).join("/")])},96340:function(e,t,i){"use strict";i.d(t,["normalizeRelativePath",0,e=>e.split("/").reduce((e,t)=>{switch(t){case"":case".":break;case"..":e.pop();break;default:e.push(t)}return e},[]).join("/")+(e.endsWith("/")?"/":"")])},98831:function(e,t,i){"use strict";i.d(t,["normalizeSize",0,(e,t)=>/^[0-9]+$/.test(e.toString())?e+t:e.toString()])},48009:function(e,t,i){"use strict";i.d(t,["normalizeUrl",0,(...e)=>e.filter(e=>e.length).map(e=>e.replace(/\/$/,"")).join("/").replace(/([^:])[\\/]+/g,"$1/")])},54447:function(e,t,i){"use strict";i.d(t,["getContentWidth",0,(e,t)=>{let i=t.getComputedStyle(e);return e.offsetWidth-parseInt(i.getPropertyValue("padding-left")||"0",10)-parseInt(i.getPropertyValue("padding-right")||"0",10)}])},2373:function(e,t,i){"use strict";function n(e){var t,i;let n=null==(t=e.ownerDocument)?void 0:t.defaultView,o=e.parentElement;for(;n&&o;){if(""!==(i=n.getComputedStyle(o)).transform&&"none"!==i.transform||""!==i.perspective&&"none"!==i.perspective||""!==i.filter&&"none"!==i.filter||"transform"===i.willChange||"perspective"===i.willChange||"filter"===i.willChange||"paint"===i.contain||"layout"===i.contain||"strict"===i.contain||"content"===i.contain){let e=o.getBoundingClientRect();return{x:e.left,y:e.top}}o=o.parentElement}return{x:0,y:0}}i.d(t,{getFixedPositionOffset:function(){return n}})},34027:function(e,t,i){"use strict";i.d(t,{getScrollParent:function(){return function e(t){if(!t)return null;let i=o.Dom.isHTMLElement(t),s=i&&(0,r.css)(t,"overflowY");return i&&"visible"!==s&&"hidden"!==s&&t.scrollHeight>=t.clientHeight?t:e(t.parentNode)||n.globalDocument.scrollingElement||n.globalDocument.body}}});var n=i(81937),o=i(23211),r=i(93640)},86878:function(e,t,i){"use strict";i.d(t,{getContentWidth:function(){return n.getContentWidth},getFixedPositionOffset:function(){return o.getFixedPositionOffset},getScrollParent:function(){return r.getScrollParent},innerWidth:function(){return s.innerWidth},offset:function(){return l.offset},position:function(){return u.position},size:function(){return a.size}});var n=i(54447),o=i(2373),r=i(34027),s=i(83215),a=i(18073),l=i(69143),u=i(23599)},83215:function(e,t,i){"use strict";i.d(t,["innerWidth",0,(e,t)=>{let i=t.getComputedStyle(e);return e.clientWidth-(parseFloat(i.paddingLeft||"0")+parseFloat(i.paddingRight||"0"))}])},18073:function(e,t,i){"use strict";i.d(t,{size:function(){return o}});var n=i(28686);function o(e){return(0,n.isString)(e)||(0,n.isArray)(e)?e.length:(0,n.isPlainObject)(e)?Object.keys(e).length:0}},69143:function(e,t,i){"use strict";let n=(e,t,i,o=!1)=>{let r,s,a;try{r=e.getBoundingClientRect()}catch(e){r={top:0,bottom:0,left:0,right:0,width:0,height:0}}let l=i.body,u=i.documentElement||{clientTop:0,clientLeft:0,scrollTop:0,scrollLeft:0},c=i.defaultView||i.parentWindow,d=c.pageYOffset||u.scrollTop||l.scrollTop,h=c.pageXOffset||u.scrollLeft||l.scrollLeft,p=u.clientTop||l.clientTop||0,m=u.clientLeft||l.clientLeft||0,f=t.iframe;if(!o&&t&&t.options&&t.o.iframe&&f){let{top:e,left:i}=n(f,t,t.od,!0);s=r.top+e,a=r.left+i}else s=r.top+d-p,a=r.left+h-m;return{top:Math.round(s),left:Math.round(a),width:r.width,height:r.height}};i.d(t,["offset",0,n])},23599:function(e,t,i){"use strict";i.d(t,{position:function(){return function e(t,i,o=!1){var r,s;let a=t.getBoundingClientRect(),l=a.left,u=a.top;if((0,n.isJoditObject)(i)&&i.iframe&&i.ed.body.contains(t)&&!o){let{left:t,top:n}=e(i.iframe,i,!0);l+=t,u+=n}return{left:Math.round(l),top:Math.round(u),width:Math.round(null!=(r=t.offsetWidth)?r:a.width),height:Math.round(null!=(s=t.offsetHeight)?s:a.height)}}}});var n=i(24497)},57821:function(e,t,i){"use strict";i.d(t,["camelCase",0,e=>e.replace(/([-_])(.)/g,(e,t,i)=>i.toUpperCase())])},57626:function(e,t,i){"use strict";i.d(t,{fuzzySearchIndex:function(){return o}});var n=i(81937);function o(e,t,i=0,r=1){let s=0,a,l=-1,u=0,c=0;for(a=i;s<e.length&&a<t.length;)e[s].toLowerCase()===t[a].toLowerCase()?(s++,u++,c=0,-1===l&&(l=a)):s>0&&(c>=r&&t[a]!==n.INVISIBLE_SPACE?(s=0,l=-1,u=0,c=0,a--):(c++,u++)),a++;return s===e.length?[l,u]:[-1,0]}},18080:function(e,t,i){"use strict";i.d(t,{i18n:function(){return u}});var n=i(81937),o=i(85932),r=i(99436),s=i(93640),a=i(5266);let l=(e,t)=>{if(!t||!t.length)return e;let i=/%([sd])/g,n=i.exec(e),o=e,r=0;for(;n&&void 0!==t[r];)o=o.replace(n[0],t[r].toString()),r+=1,n=i.exec(e);return o};function u(e,t,i){if(!(0,o.isString)(e))throw(0,s.error)("i18n: Need string in first argument");if(!e.length)return e;let u=!!(null==i?void 0:i.debugLanguage),c={},d=e=>t&&t.length?l(e,t):e,h=(0,s.defaultLanguage)(a.Config.defaultOptions.language,a.Config.defaultOptions.language),p=(0,s.defaultLanguage)(null==i?void 0:i.language,h),m=t=>{if(!t)return;if((0,o.isString)(t[e]))return d(t[e]);let i=e.toLowerCase();if((0,o.isString)(t[i]))return d(t[i]);let n=(0,r.ucfirst)(e);if((0,o.isString)(t[n]))return d(t[n])};void 0!==n.lang[p]?c=n.lang[p]:u||(c=void 0!==n.lang[h]?n.lang[h]:n.lang.en);let f=null==i?void 0:i.i18n;if(f&&f[p]){let e=m(f[p]);if(e)return e}return m(c)||(!u&&n.lang.en&&(0,o.isString)(n.lang.en[e])&&n.lang.en[e]?d(n.lang.en[e]):u?"{"+e+"}":(n.IS_PROD,d(e)))}i.d(t,["sprintf",0,l])},97642:function(e,t,i){"use strict";i.d(t,{CamelCaseToKebabCase:function(){return s.CamelCaseToKebabCase},camelCase:function(){return n.camelCase},fuzzySearchIndex:function(){return o.fuzzySearchIndex},i18n:function(){return r.i18n},kebabCase:function(){return s.kebabCase},sprintf:function(){return r.sprintf},stringify:function(){return a.stringify},trim:function(){return l.trim},trimChars:function(){return l.trimChars},trimInv:function(){return l.trimInv},ucfirst:function(){return u.ucfirst}});var n=i(57821),o=i(57626),r=i(18080),s=i(74264),a=i(3347),l=i(4040),u=i(99436)},74264:function(e,t,i){"use strict";i.d(t,["CamelCaseToKebabCase",0,e=>e.replace(/([A-Z])([A-Z])([a-z])/g,"$1-$2$3").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),"kebabCase",0,e=>e.replace(/([A-Z])([A-Z])([a-z])/g,"$1-$2$3").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()])},3347:function(e,t,i){"use strict";function n(e,t={}){if("object"!=typeof e)return String(e);let i=new Set(t.excludeKeys),o=new WeakMap;return JSON.stringify(e,(e,t)=>{if(!i.has(e)){if("object"==typeof t&&null!=t){if(o.get(t))return"[refObject]";o.set(t,!0)}return t}},t.prettify)}i.d(t,{stringify:function(){return n}})},4040:function(e,t,i){"use strict";i.d(t,{trim:function(){return o},trimChars:function(){return r},trimInv:function(){return s}});var n=i(81937);function o(e){return e.replace((0,n.SPACE_REG_EXP_END)(),"").replace((0,n.SPACE_REG_EXP_START)(),"")}function r(e,t){return e.replace(RegExp(`[${t}]+$`),"").replace(RegExp(`^[${t}]+`),"")}function s(e){return e.replace((0,n.INVISIBLE_SPACE_REG_EXP_END)(),"").replace((0,n.INVISIBLE_SPACE_REG_EXP_START)(),"")}},99436:function(e,t,i){"use strict";function n(e){return e.length?e[0].toUpperCase()+e.substring(1):""}i.d(t,{ucfirst:function(){return n}})},16849:function(e,t,i){"use strict";i.d(t,{alignElement:function(){return u},clearAlign:function(){return a},hAlignElement:function(){return s}});var n=i(27795),o=i(7909),r=i(80991);function s(e,t){t&&"normal"!==t?"center"!==t?((0,r.css)(e,"float",t),(0,r.clearCenterAlign)(e)):(0,r.css)(e,{float:"",display:"block",marginLeft:"auto",marginRight:"auto"}):((0,r.css)(e,"float")&&-1!==["right","left"].indexOf((0,r.css)(e,"float").toString().toLowerCase())&&(0,r.css)(e,"float",""),(0,r.clearCenterAlign)(e))}function a(e){n.Dom.each(e,e=>{n.Dom.isHTMLElement(e)&&(0,r.cssInline)(e,"textAlign")&&((0,r.css)(e,"textAlign",""),((0,o.attr)(e,"style")||"").trim().length||(0,o.attr)(e,"style",null))})}let l=new Map([["justifyfull","justify"],["justifyright","right"],["justifyleft","left"],["justifycenter","center"]]);function u(e,t){if(n.Dom.isNode(t)&&n.Dom.isElement(t)){a(t);let i=l.get(e.toLowerCase());i&&(0,r.css)(t,"textAlign",i)}}},47760:function(e,t,i){"use strict";i.d(t,{loadNext:function(){return function e(t,i,n=0){return(0,o.isString)(i[n])?u(t,i[n]).then(()=>e(t,i,n+1)):Promise.resolve()}},loadNextStyle:function(){return function e(t,i,n=0){return(0,o.isString)(i[n])?c(t,i[n]).then(()=>e(t,i,n+1)):Promise.resolve()}}});var n=i(23211),o=i(85932),r=i(7909),s=i(91321);let a=new Map,l=e=>(t,i)=>{if(a.has(i))return a.get(i);let n=e(t,i);return a.set(i,n),n},u=l((e,t)=>e.async.promise((i,o)=>{if(e.isInDestruct)return o();let a=e.c.element("script",{type:"text/javascript",crossorigin:"anonymous",referrerpolicy:"no-referrer",async:!0,src:(0,s.completeUrl)(t)});e.o.nonce&&(0,r.attr)(a,"nonce",e.o.nonce),e.e.one(a,"error",o).one(a,"load",i),n.Dom.append(e.od.body,a)})),c=l((e,t)=>e.async.promise((i,o)=>{if(e.isInDestruct)return o();let a=e.c.element("link",{rel:"stylesheet",media:"all",crossorigin:"anonymous"});e.o.nonce&&(0,r.attr)(a,"nonce",e.o.nonce),e.isInDestruct||e.e.on(a,"load",()=>i(a)).on(a,"error",o),(0,r.attr)(a,"href",(0,s.completeUrl)(t)),e.o.shadowRoot?n.Dom.append(e.o.shadowRoot,a):n.Dom.append(e.od.body,a)}));i.d(t,["alreadyLoadedList",0,a,"appendScriptAsync",0,u,"appendStyleAsync",0,c])},7909:function(e,t,i){"use strict";i.d(t,{attr:function(){return function e(t,i,l){if(!t||!(0,n.isFunction)(t.getAttribute))return null;if(!(0,r.isString)(i))return Object.keys(i).forEach(n=>{let r=i[n];(0,o.isPlainObject)(r)&&"style"===n?(0,a.css)(t,r):("className"===n&&(n="class"),e(t,n,r))}),null;let u=(0,s.CamelCaseToKebabCase)(i);if(/^-/.test(u)){let i=e(t,`data${u}`);if(i)return i;u=u.substr(1)}if(void 0!==l)if(null==l)t.hasAttribute(u)&&t.removeAttribute(u);else{let e=l.toString();return"IMG"===t.nodeName&&("width"===u||"height"===u)&&(e=e.replace("px","")),t.setAttribute(u,e),e}return t.getAttribute(u)}},attrRaw:function(){return l}});var n=i(91565),o=i(62101),r=i(85932),s=i(74264),a=i(80991);function l(e,t,i){if(void 0===i)return e.getAttribute(t);if(null==i){e.hasAttribute(t)&&e.removeAttribute(t);return}e.setAttribute(t,i)}},26136:function(e,t,i){"use strict";i.d(t,["browser",0,e=>{let t=navigator.userAgent.toLowerCase(),i=/(firefox)[\s/]([\w.]+)/.exec(t)||/(chrome)[\s/]([\w.]+)/.exec(t)||/(webkit)[\s/]([\w.]+)/.exec(t)||/(opera)(?:.*version)[\s/]([\w.]+)/.exec(t)||/(msie)[\s]([\w.]+)/.exec(t)||/(trident)\/([\w.]+)/.exec(t)||0>t.indexOf("compatible")||[];return"version"===e?i[2]:"webkit"===e?"chrome"===i[1]||"webkit"===i[1]:"ff"===e?"firefox"===i[1]:"msie"===e?"trident"===i[1]||"msie"===i[1]:i[1]===e}])},36833:function(e,t,i){"use strict";var n=i(62101);let o=(e,t)=>{let i=[],r=encodeURIComponent;for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s)){let a=t?t+"["+s+"]":s,l=e[s];i.push((0,n.isPlainObject)(l)?o(l,a):r(a)+"="+r(l))}return i.join("&")};i.d(t,["buildQuery",0,o])},91321:function(e,t,i){"use strict";var n=i(81937);i.d(t,["completeUrl",0,e=>("file:"===n.globalWindow.location.protocol&&/^\/\//.test(e)&&(e="https:"+e),e)])},77483:function(e,t,i){"use strict";i.d(t,{ConfigDeepFlatten:function(){return function e(t){return(0,c.keys)(t,!1).reduce((i,n)=>(i[n]=(0,o.isPlainObject)(t[n])?e(t[n]):t[n],i),{})}},ConfigFlatten:function(){return d},ConfigMerge:function(){return function e(t,i){Object.keys(i).forEach(n=>{if((0,u.isUnsafeProtoKey)(n))return;let r=i[n],s=t[n];(0,o.isPlainObject)(r)&&(0,o.isPlainObject)(s)&&!(0,l.isAtom)(r)?e(s,r):t[n]=r})}},ConfigProto:function(){return function e(t,i,c=0){if(Object.getPrototypeOf(t)!==Object.prototype)return t;let d=a.Config.defaultOptions;if((0,r.isString)(t.preset)){if(void 0!==d.presets[t.preset]){let e=d.presets[t.preset];Object.keys(e).forEach(i=>{(0,s.isVoid)(t[i])&&(t[i]=e[i])})}delete t.preset}let h={};return Object.keys(t).forEach(r=>{if((0,u.isUnsafeProtoKey)(r))return;let s=t[r],a=i?i[r]:null;if((0,o.isPlainObject)(s)&&(0,o.isPlainObject)(a)&&!(0,l.isAtom)(s)){h[r]=e(s,a,c+1);return}if(0!==c&&(0,n.isArray)(s)&&!(0,l.isAtom)(s)&&(0,n.isArray)(a)){h[r]=[...s,...a.slice(s.length)];return}h[r]=s}),Object.setPrototypeOf(h,i),h}}});var n=i(17312),o=i(62101),r=i(85932),s=i(18303),a=i(5266),l=i(54794),u=i(78048),c=i(71125);function d(e){return(0,c.keys)(e,!1).reduce((t,i)=>(t[i]=e[i],t),{})}},3856:function(e,t,i){"use strict";var n=i(81937),o=i(91764),r=i(36310);i.d(t,["convertMediaUrlToVideoEmbed",0,(e,{width:t=400,height:i=345}={})=>{if(!(0,o.isURL)(e))return e;let s=n.globalDocument.createElement("a");s.href=e,t||(t=400),i||(i=345);let a=s.protocol||"";switch(s.hostname){case"www.vimeo.com":case"vimeo.com":{let n=s.pathname.split("/").filter(Boolean),o=n.findIndex(e=>/^\d+$/.test(e));if(-1===o)return e;let r=n[o],l=n[o+1];return l&&0===o&&(r+="/"+l),'<iframe width="'+t+'" height="'+i+'" src="'+a+"//player.vimeo.com/video/"+r+'" frameborder="0" allowfullscreen></iframe>'}case"youtube.com":case"www.youtube.com":case"m.youtube.com":case"music.youtube.com":case"youtu.be":case"www.youtu.be":{let n=(s.search?(0,r.parseQuery)(s.search):{}).v||s.pathname.substring(1);return(n=n.replace(/^(watch|embed|shorts|live|v)\//,"").replace(/\/$/,""))?'<iframe width="'+t+'" height="'+i+'" src="'+a+"//www.youtube.com/embed/"+n+'" frameborder="0" allowfullscreen></iframe>':e}}return e}])},80991:function(e,t,i){"use strict";i.d(t,{css:function(){return l},cssInline:function(){return u}});var n=i(22289),o=i(62101),r=i(19147),s=i(57821),a=i(74264);function l(e,t,i,u=!1){if((0,n.isBoolean)(i)&&(u=i,i=void 0),(0,o.isPlainObject)(t)||void 0!==i){let n=(e,t,i)=>{void 0!==(i=(0,r.normalizeCssNumericValue)(t,i))&&(null==i||l(e,t,!0)!==(0,r.normalizeCssValue)(t,i))&&(e.style[t]=i)};if((0,o.isPlainObject)(t)){let i=Object.keys(t);for(let o=0;o<i.length;o+=1)n(e,(0,s.camelCase)(i[o]),t[i[o]])}else n(e,(0,s.camelCase)(t),i);return""}let c=(0,a.kebabCase)(t),d=e.ownerDocument||document,h=!!d&&(d.defaultView||d.parentWindow),p=e.style[t],m="";return void 0!==p&&""!==p?m=p:h&&!u&&(m=h.getComputedStyle(e).getPropertyValue(c)),r.NUMBER_FIELDS_REG.test(t)&&/^[-+]?[0-9.]+px$/.test(m.toString())&&(m=parseInt(m.toString(),10)),(0,r.normalizeCssValue)(t,m)}function u(e,t){return e.style.getPropertyValue((0,a.kebabCase)(t))}i.d(t,["clearCenterAlign",0,e=>{"block"===l(e,"display")&&l(e,"display","");let{style:t}=e;"auto"===t.marginLeft&&"auto"===t.marginRight&&(t.marginLeft="",t.marginRight="")}])},77213:function(e,t,i){"use strict";i.d(t,["ctrlKey",0,e=>{if("u">typeof navigator&&-1!==navigator.userAgent.indexOf("Mac OS X")){if(e.metaKey&&!e.altKey)return!0}else if(e.ctrlKey&&!e.altKey)return!0;return!1}])},36400:function(e,t,i){"use strict";var n=i(31534);let o=new WeakMap;i.d(t,["dataBind",0,(e,t,i)=>{let r=o.get(e);if(!r){r={},o.set(e,r);let t=null;(0,n.isViewObject)(e.j)&&(t=e.j.e),(0,n.isViewObject)(e)&&(t=e.e),t&&t.on("beforeDestruct",()=>{o.delete(e)})}return void 0===i?r[t]:(r[t]=i,i)}])},97228:function(e,t,i){"use strict";var n=i(81937),o=i(85932);i.d(t,["defaultLanguage",0,(e,t="en")=>"auto"!==e&&(0,o.isString)(e)?e:n.globalDocument.documentElement&&n.globalDocument.documentElement.lang?n.globalDocument.documentElement.lang:navigator.language?navigator.language.substring(0,2):t])},38027:function(e,t,i){"use strict";i.d(t,{connection:function(){return r},error:function(){return o},options:function(){return s}});var n=i(29953);function o(e){return TypeError(e)}function r(e){return new n.ConnectionError(e)}function s(e){return new n.OptionsError(e)}},14228:function(e,t,i){"use strict";function n(e="Aborted"){return new DOMException(e,"AbortError")}i.d(t,{abort:function(){return n}})},58250:function(e,t,i){"use strict";i.d(t,{ConnectionError:function(){return n}});class n extends Error{constructor(e){super(e),Object.setPrototypeOf(this,n.prototype)}}},29953:function(e,t,i){"use strict";i.d(t,{ConnectionError:function(){return o.ConnectionError},OptionsError:function(){return r.OptionsError},abort:function(){return n.abort}});var n=i(14228),o=i(58250),r=i(11080)},11080:function(e,t,i){"use strict";i.d(t,{OptionsError:function(){return n}});class n extends TypeError{constructor(e){super(e),Object.setPrototypeOf(this,n.prototype)}}},33201:function(e,t,i){"use strict";i.d(t,{ConnectionError:function(){return o.ConnectionError},OptionsError:function(){return o.OptionsError},abort:function(){return o.abort},connection:function(){return n.connection},error:function(){return n.error},options:function(){return n.options}});var n=i(38027),o=i(29953)},54794:function(e,t,i){"use strict";i.d(t,{fastClone:function(){return s},isAtom:function(){return o},markAsAtomic:function(){return r}});var n=i(3347);function o(e){return e&&e.isAtom}function r(e){return Object.defineProperty(e,"isAtom",{enumerable:!1,value:!0,configurable:!1}),e}function s(e){return JSON.parse((0,n.stringify)(e))}},421:function(e,t,i){"use strict";var n=i(91565);let o=new Map;i.d(t,["getClassName",0,e=>{var t;if((0,n.isFunction)(e.className))return e.className();let i=(null==(t=e.constructor)?void 0:t.originalConstructor)||e.constructor;if(o.has(i))return o.get(i);if(i.name)return i.name;let r=new RegExp(/^\s*function\s*(\S*)\s*\(/),s=i.toString().match(r);return s?s[1]:""},"keepNames",0,o])},89308:function(e,t,i){"use strict";i.d(t,{get:function(){return r}});var n=i(85932),o=i(18303);function r(e,t){if(!(0,n.isString)(e)||!e.length)return null;let i=e.split("."),r=t;try{for(let e of i){if((0,o.isVoid)(r[e]))return null;r=r[e]}}catch(e){return null}return(0,o.isVoid)(r)?null:r}},37427:function(e,t,i){"use strict";i.d(t,["humanSizeToBytes",0,e=>{if(/^[0-9.]+$/.test(e.toString()))return parseFloat(e);let t=e.substr(-2,2).toUpperCase(),i=["KB","MB","GB","TB"],n=parseFloat(e.substr(0,e.length-2));return -1!==i.indexOf(t)?n*Math.pow(1024,i.indexOf(t)+1):parseInt(e,10)}])},93640:function(e,t,i){"use strict";i.r(t),i.d(t,{$$:function(){return x.$$},ConfigDeepFlatten:function(){return h.ConfigDeepFlatten},ConfigFlatten:function(){return h.ConfigFlatten},ConfigMerge:function(){return h.ConfigMerge},ConfigProto:function(){return h.ConfigProto},ConnectionError:function(){return v.ConnectionError},LimitedStack:function(){return z.LimitedStack},OptionsError:function(){return v.OptionsError},UNSAFE_PROTO_KEYS:function(){return S.UNSAFE_PROTO_KEYS},abort:function(){return v.abort},alignElement:function(){return n.alignElement},alreadyLoadedList:function(){return o.alreadyLoadedList},appendScriptAsync:function(){return o.appendScriptAsync},appendStyleAsync:function(){return o.appendStyleAsync},attr:function(){return l.attr},attrRaw:function(){return l.attrRaw},browser:function(){return u.browser},buildQuery:function(){return c.buildQuery},call:function(){return L.call},callPromise:function(){return L.callPromise},callThis:function(){return L.callThis},clearAlign:function(){return n.clearAlign},clearCenterAlign:function(){return m.clearCenterAlign},cns:function(){return C.cns},completeUrl:function(){return d.completeUrl},connection:function(){return v.connection},convertMediaUrlToVideoEmbed:function(){return p.convertMediaUrlToVideoEmbed},css:function(){return m.css},cssInline:function(){return m.cssInline},cssPath:function(){return x.cssPath},ctrlKey:function(){return f.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 x.getXPathByElement},hAlignElement:function(){return n.hAlignElement},humanSizeToBytes:function(){return k.humanSizeToBytes},inView:function(){return D.inView},isAtom:function(){return b.isAtom},isUnsafeProtoKey:function(){return S.isUnsafeProtoKey},keepNames:function(){return w.keepNames},keys:function(){return L.keys},loadImage:function(){return L.loadImage},loadNext:function(){return o.loadNext},loadNextStyle:function(){return o.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 T.previewBox},refs:function(){return x.refs},reset:function(){return I.reset},resolveElement:function(){return x.resolveElement},scrollIntoViewIfNeeded:function(){return D.scrollIntoViewIfNeeded},set:function(){return j.set}});var n=i(16849),o=i(47760),r=i(28712),s={};for(var a in r)0>["default","alignElement","clearAlign","hAlignElement","alreadyLoadedList","appendScriptAsync","appendStyleAsync","loadNext","loadNextStyle"].indexOf(a)&&(s[a]=(function(e){return r[e]}).bind(0,a));i.d(t,s);var l=i(7909),u=i(26136),c=i(36833),d=i(91321),h=i(77483),p=i(3856),m=i(80991),f=i(77213),g=i(36400),_=i(97228),v=i(33201),b=i(54794),y=i(89308),w=i(421),k=i(37427),S=i(78048),C=i(49385),E=i(36310),T=i(57075),I=i(43379),D=i(60898),x=i(28723),j=i(52144),z=i(42820),L=i(71125)},78048:function(e,t,i){"use strict";i.d(t,{isUnsafeProtoKey:function(){return o}});let n=["__proto__","constructor","prototype"];function o(e){return -1!==n.indexOf(e)}i.d(t,["UNSAFE_PROTO_KEYS",0,n])},49385:function(e,t,i){"use strict";i.d(t,{markDeprecated:function(){return o}});let n=console;function o(e,t=[""],i=null){return(...o)=>(n.warn(`Method "${t[0]}" deprecated.`+(t[1]?` Use "${t[1]}" instead`:"")),e.call(i,...o))}i.d(t,["cns",0,n])},36310:function(e,t,i){"use strict";i.d(t,["parseQuery",0,e=>{let t={},i=e.substring(1).split("&");for(let e=0;e<i.length;e+=1){let n=i[e].split("=");t[decodeURIComponent(n[0])]=decodeURIComponent(n[1]||"")}return t}])},57075:function(e,t,i){"use strict";i.d(t,{previewBox:function(){return a}});var n=i(23211),o=i(85932),r=i(7909),s=i(80991);function a(e,t,i="px",l=null){let u=[],c=function(e,t){let i=[],o=[];n.Dom.each(e.editor,e=>{n.Dom.isTag(e,"img")&&o.push(e)});try{o.forEach(o=>{let s=[(0,r.attr)(o,"width"),(0,r.attr)(o,"height"),(0,r.attr)(o,"src")];(0,r.attr)(o,{width:o.offsetWidth+t,height:o.offsetHeight+t});let a=e.createInside.a();n.Dom.append(e.ed.body,a),(0,r.attr)(a,"href",(0,r.attr)(o,"src")||""),(0,r.attr)(o,"src",a.href),n.Dom.safeRemove(a),i.push(()=>{(0,r.attr)(o,{src:s[2],width:s[0]||null,height:s[1]||null})})})}catch(e){throw i.forEach(e=>e()),i.length=0,e}return i}(e,i);try{let a=e.e.fire("beforePreviewBox",t,i);if(null!=a)return a;let c=e.c.div("jodit__preview-box jodit-context");l&&n.Dom.append(l,c),(0,s.css)(c,{position:"relative",padding:16});let d=e.value||`<div style='position: absolute;left:50%;top:50%;transform: translateX(-50%) translateY(-50%);color:#ccc;'>${e.i18n("Empty")}</div>`;if(e.iframe){let t=e.create.element("iframe");(0,s.css)(t,{minWidth:800,minHeight:600,border:0}),n.Dom.append(c,t);let i=t.contentWindow;if(i&&(e.e.fire("generateDocumentStructure.iframe",i.document,e),c=i.document.body,"function"==typeof ResizeObserver)){let n=!1,o=i.document.body,r=new ResizeObserver(e.async.debounce(()=>{r.unobserve(o),(0,s.css)(t,"height",o.offsetHeight+20),e.async.requestAnimationFrame(()=>{n||r.observe(o)})},100)),a=()=>{n=!0,r.unobserve(o),r.disconnect(),e.e.off("beforeDestruct",a)};u.push(a),e.e.on("beforeDestruct",a)}}else(0,s.css)(c,{minWidth:1024,minHeight:600,border:0});let h=(t,i)=>{let s=(0,o.isString)(i)?e.c.div():i;(0,o.isString)(i)&&(s.innerHTML=i);for(let e=0;e<s.childNodes.length;e+=1){let i=s.childNodes[e];if(n.Dom.isElement(i)){let e=t.ownerDocument.createElement(i.nodeName);for(let t=0;t<i.attributes.length;t+=1)(0,r.attr)(e,i.attributes[t].name,i.attributes[t].value);0===i.childNodes.length||n.Dom.isTag(i,"table")?"SCRIPT"===i.nodeName?i.textContent&&(e.textContent=i.textContent):i.innerHTML&&(e.innerHTML=i.innerHTML):h(e,i);try{n.Dom.append(t,e)}catch(e){}}else try{n.Dom.append(t,i.cloneNode(!0))}catch(e){}}};return h(c,d),e.e.fire("afterPreviewBox",c),[c,()=>{u.forEach(e=>e())}]}finally{c.forEach(e=>e())}}},43379:function(e,t,i){"use strict";i.d(t,{reset:function(){return a}});var n=i(81937),o=i(91565),r=i(89308);let s={};function a(e){var t,i;if(!(e in s)){let t=n.globalDocument.createElement("iframe");try{if(t.src="about:blank",n.globalDocument.body.appendChild(t),!t.contentWindow)return null;let i=(0,r.get)(e,t.contentWindow),a=(0,r.get)(e.split(".").slice(0,-1).join("."),t.contentWindow);(0,o.isFunction)(i)&&(s[e]=i.bind(a))}catch(e){if(!n.IS_PROD)throw e}finally{null==(i=t.parentNode)||i.removeChild(t)}}return null!=(t=s[e])?t:null}},60898:function(e,t,i){"use strict";i.d(t,{inView:function(){return o},scrollIntoViewIfNeeded:function(){return r}});var n=i(23211);function o(e,t,i){let n=e.getBoundingClientRect(),o=e,r=n.top,s=n.height;for(;o&&o!==t&&o.parentNode;)if(r+s>(n=(o=o.parentNode).getBoundingClientRect()).bottom+1&&r>n.top||r+s<=n.top)return!1;return(r+s<=(i.documentElement&&i.documentElement.clientHeight||0)+1||r<=0)&&r+s>=0}function r(e,t,i){if(n.Dom.isHTMLElement(e)&&!o(e,t,i)){if(t.clientHeight!==t.scrollHeight){let i=e.offsetTop+e.offsetHeight-t.clientHeight;t.scrollTop=t.scrollTop<i?i:e.offsetTop}o(e,t,i)||e.scrollIntoView({block:"nearest"})}}},28723:function(e,t,i){"use strict";i.d(t,{$$:function(){return d},resolveElement:function(){return p}});var n=i(81937),o=i(23211),r=i(88475),s=i(85932),a=i(57821),l=i(7909),u=i(33201);let c=1;function d(e,t){let i;if(!n.IS_ES_NEXT&&/:scope/.test(e)&&n.IS_IE&&!(t&&t.nodeType===Node.DOCUMENT_NODE)){let n=t.id,o=n||"_selector_id_"+String(Math.random()).slice(2)+ ++c;e=e.replace(/:scope/g,"#"+o),n||t.setAttribute("id",o),i=t.parentNode.querySelectorAll(e),n||t.removeAttribute("id")}else i=t.querySelectorAll(e);return[].slice.call(i)}let h=(e,t)=>{if(!e||e.nodeType!==Node.ELEMENT_NODE||!e.parentNode||t===e)return"";if(e.id)return"//*[@id='"+e.id+"']";let i=[].filter.call(e.parentNode.childNodes,t=>t.nodeName===e.nodeName);return h(e.parentNode,t)+"/"+e.nodeName.toLowerCase()+(i.length>1?"["+((0,r.toArray)(i).indexOf(e)+1)+"]":"")};function p(e,t){let i=e;if((0,s.isString)(e))try{i=t.querySelector(e)}catch(t){throw(0,u.error)('String "'+e+'" should be valid HTML selector')}if(!i||"object"!=typeof i||!o.Dom.isElement(i)||!i.cloneNode)throw(0,u.error)('Element "'+e+'" should be string or HTMLElement instance');return i}i.d(t,["cssPath",0,e=>{if(!o.Dom.isElement(e))return null;let t=[],i=e;for(;i&&i.nodeType===Node.ELEMENT_NODE;){let e=i.nodeName.toLowerCase();if(i.id){e+="#"+i.id,t.unshift(e);break}{let t=i,n=1;do(t=t.previousElementSibling)&&t.nodeName.toLowerCase()===e&&n++;while(t);e+=":nth-of-type("+n+")"}t.unshift(e),i=i.parentNode}return t.join(" > ")},"getXPathByElement",0,h,"refs",0,e=>{"container"in e&&(e=e.container);let t={};return o.Dom.each(e,e=>{if(o.Dom.isElement(e)&&(e.hasAttribute("ref")||e.hasAttribute("data-ref"))){let i=(0,l.attr)(e,"-ref");i&&(0,s.isString)(i)&&(t[(0,a.camelCase)(i)]=e,t[i]=e)}}),t}])},52144:function(e,t,i){"use strict";i.d(t,{set:function(){return l}});var n=i(17312),o=i(70222),r=i(62101),s=i(85932),a=i(78048);function l(e,t,i){if(!(0,s.isString)(e)||!e.length)return;let l=e.split(".");if(l.some(a.isUnsafeProtoKey))return;let u=i;for(let e=0;e<l.length-1;e+=1){let t=l[e];(0,n.isArray)(u[t])||(0,r.isPlainObject)(u[t])||(u[t]=(0,o.isNumeric)(l[e+1])?[]:{}),u=u[t]}u&&(u[l[l.length-1]]=t)}},42820:function(e,t,i){"use strict";i.d(t,{LimitedStack:function(){return o}});var n=i(25045);class o{push(e){return this.stack.push(e),this.stack.length>this.limit&&this.stack.shift(),this}pop(){return this.stack.pop()}find(e){return this.stack.find(e)}constructor(e){(0,n._)(this,"limit",void 0),(0,n._)(this,"stack",void 0),this.limit=e,this.stack=[]}}},71125:function(e,t,i){"use strict";i.d(t,{call:function(){return a},callPromise:function(){return c},callThis:function(){return l},getPropertyDescriptor:function(){return d},markOwner:function(){return u}});var n=i(52100),o=i(18303),r=i(7909),s=i(36400);function a(e,...t){return e(...t)}function l(e,t,...i){return e.apply(t,i)}function u(e,t){(0,r.attr)(t,"data-editor_id",e.id),t.component||Object.defineProperty(t,"jodit",{value:e})}function c(e,t){return(0,n.isPromise)(e)?e.then(e=>e,()=>null).finally(t):null==t?void 0:t()}function d(e,t){let i;do i=Object.getOwnPropertyDescriptor(e,t),e=Object.getPrototypeOf(e);while(!i&&e);return i}i.d(t,["getDataTransfer",0,e=>{if(e.clipboardData)return e.clipboardData;try{return e.dataTransfer||new DataTransfer}catch(e){return null}},"keys",0,(e,t=!0)=>{if(t)return Object.keys(e);let i=[];for(let t in e)i.push(t);return i},"loadImage",0,(e,t)=>t.async.promise((i,n)=>{let o=new Image,r=()=>{t.e.off(o),null==n||n()},s=()=>{t.e.off(o),i(o)};t.e.one(o,"load",s).one(o,"error",r).one(o,"abort",r),o.src=e,o.complete&&s()}),"memorizeExec",0,(e,t,{control:i},n)=>{var r;let a=`button${i.command}`,l=null!=(r=i.args&&i.args[0])?r:(0,s.dataBind)(e,a);if((0,o.isVoid)(l))return!1;(0,s.dataBind)(e,a,l),n&&(l=n(l)),e.execCommand(i.command,!1,null!=l?l:void 0)}])},55810:function(e,t,i){"use strict";i.d(t,{init:function(){return s}});var n=i(81937),o=i(52433),r=i(3050);function s(e,t,i,s,a,l,u){if((0,o.isInitable)(s))try{s.init(e)}catch(e){if(!n.IS_PROD)throw e}a.set(t,s),l.delete(t),s.hasStyle&&(0,r.loadStyle)(e,t).catch(e=>{n.IS_PROD}),s.styles&&(u(e,t,"style").innerHTML=s.styles)}},3050:function(e,t,i){"use strict";i.d(t,{loadExtras:function(){return c},loadStyle:function(){return l}});var n=i(81937),o=i(74264),r=i(47760),s=i(86189);let a=new Set;async function l(e,t){let i=u(e,t,!1);if(!a.has(i))return a.add(i),(0,r.appendStyleAsync)(e,i)}function u(e,t,i){t=(0,o.kebabCase)(t);let n=e.minified?".min":"";return e.basePath+"plugins/"+t+"/"+t+n+"."+(i?"js":"css")}function c(e,t,i,o){try{let n=i.filter(t=>!e.has((0,s.normalizeName)(t.name)));n.length&&n.map(e=>{let i=e.url||u(t,e.name,!0);return(0,r.appendScriptAsync)(t,i).then(o).catch(()=>null)})}catch(e){if(!n.IS_PROD)throw e}}},25974:function(e,t,i){"use strict";i.d(t,{makeInstance:function(){return r}});var n=i(81937),o=i(91565);function r(e,t){try{try{return(0,o.isFunction)(t)?new t(e):t}catch(i){if((0,o.isFunction)(t)&&!t.prototype)return t(e)}}catch(e){if(!n.IS_PROD)throw e}return null}},86189:function(e,t,i){"use strict";i.d(t,{normalizeName:function(){return o}});var n=i(74264);function o(e){return(0,n.kebabCase)(e).toLowerCase()}},91206:function(e,t,i){"use strict";i.d(t,{Plugin:function(){return n.Plugin}});var n=i(18855);i(85305)},85305:function(e,t,i){"use strict";i.d(t,{PluginSystem:function(){return m}});var n=i(25045),o=i(81937),r=i(42689),s=i(32328),a=i(17312),l=i(52433),u=i(85932),c=i(55810),d=i(3050),h=i(25974),p=i(86189);class m{get size(){return this.__items.size}add(e,t){this.__items.set((0,p.normalizeName)(e),t),r.eventEmitter.fire(`plugin:${e}:ready`)}get(e){return this.__items.get((0,p.normalizeName)(e))}remove(e){this.__items.delete((0,p.normalizeName)(e))}__getFullPluginsList(e){let t=[];return this.__items.forEach((i,n)=>{(!e||e.has(n))&&t.push([n,i])}),t}__init(e){let{extraList:t,disableList:i,filter:n}={extraList:e.o.extraPlugins.map(e=>(0,u.isString)(e)?{name:e}:e),disableList:new Set((0,s.splitArray)(e.o.disablePlugins).map(p.normalizeName)),filter:e.o.safeMode?new Set(e.o.safePluginsList):null},r=new Map,m={},f=new Set;e.__plugins=m;let g=()=>{if(e.isInDestruct)return;let t=!1;this.__getFullPluginsList(n).forEach(([n,o])=>{if(i.has(n)||r.has(n))return;let s=null==o?void 0:o.requires;if(s&&(0,a.isArray)(s)&&s.length){if(s.some(e=>i.has(e)))return;if(!s.every(e=>r.has(e)))return void f.add(n)}t=!0;let l=(0,h.makeInstance)(e,o);if(!l){r.set(n,null),f.delete(n);return}(0,c.init)(e,n,o,l,r,f,this.opts.getContainer),m[n]=l}),t&&(e.e.fire("updatePlugins"),g())};t&&t.length&&(0,d.loadExtras)(this.__items,e,t,g),g(),e.e.on("beforeDestruct",()=>{Object.keys(m).forEach(t=>{let i=m[t];(0,l.isDestructable)(i)&&i.destruct(e),delete m[t]}),delete e.__plugins}),o.IS_PROD||f.size}wait(e){return new Promise(t=>{if(this.get(e))return t();let i=()=>{t(),r.eventEmitter.off(`plugin:${e}:ready`,i)};r.eventEmitter.on(`plugin:${e}:ready`,i)})}constructor(e){(0,n._)(this,"opts",void 0),(0,n._)(this,"__items",void 0),this.opts=e,this.__items=new Map}}},18855:function(e,t,i){"use strict";i.d(t,{Plugin:function(){return l}});var n=i(25045),o=i(31635),r=i(16964),s=i(84839),a=i(24497);class l extends r.ViewComponent{className(){return"Plugin"}__afterPluginSystemInit(){let{j:e,buttons:t}=this;t&&(0,a.isJoditObject)(e)&&t.forEach(t=>{e.registerButton(t)})}__afterInit(){this.__inited=!0,this.setStatus(r.STATUSES.ready),this.afterInit(this.jodit)}init(e){this.jodit.isReady&&(this.afterInit(this.jodit),this.__afterPluginSystemInit(),this.jodit.e.fire("rebuildToolbar"))}__beforeDestruct(){if(this.isInDestruct)return;let{j:e}=this;if(e.e.off("afterPluginSystemInit",this.__afterPluginSystemInit).off("afterInit",this.__afterInit).off("beforeDestruct",this.destruct),this.setStatus(r.STATUSES.beforeDestruct),!this.__inited)return super.destruct();if((0,a.isJoditObject)(e)){var t;null==(t=this.buttons)||t.forEach(t=>{null==e||e.unregisterButton(t)})}this.beforeDestruct(this.j),super.destruct()}constructor(e){super(e),(0,n._)(this,"buttons",[]),(0,n._)(this,"hasStyle",!1),(0,n._)(this,"styles",void 0),(0,n._)(this,"__inited",!1),e.e.on("afterPluginSystemInit",this.__afterPluginSystemInit).on("afterInit",this.__afterInit).on("beforeDestruct",this.__beforeDestruct)}}(0,n._)(l,"requires",[]),(0,o.__decorate)([s.autobind],l.prototype,"__afterPluginSystemInit",null),(0,o.__decorate)([s.autobind],l.prototype,"__afterInit",null),(0,o.__decorate)([s.autobind],l.prototype,"__beforeDestruct",null)},17338:function(e,t,i){"use strict";i.d(t,{Ajax:function(){return h}});var n=i(25045),o=i(31635),r=i(91231),s=i(81937),a=i(49574),l=i(65946),u=i(33201),c=i(5266);i(37102);var d=i(32855);class h{className(){return"Ajax"}__buildParams(e,t){return(0,l.isPlainObject)(e)&&this.options.contentType&&this.options.contentType.includes("application/json")?JSON.stringify(e):(0,l.isFunction)(this.o.queryBuild)?this.o.queryBuild.call(this,e,t):(0,l.isString)(e)||e instanceof s.globalWindow.FormData||"object"==typeof e&&null!=e&&(0,l.isFunction)(e.append)?e:(0,l.buildQuery)(e)}get o(){return this.options}abort(){if(this.__isFulfilled)return this;try{this.__isFulfilled=!0,this.xhr.abort()}catch(e){}return this}send(){this.__activated=!0;let{xhr:e,o:t}=this,i=this.prepareRequest();return this.__async.promise(async(n,o)=>{var r;let s=()=>{this.__isFulfilled=!0,o(u.connection("Connection error"))},a=()=>{this.__isFulfilled=!0,n(new d.Response(i,e.status,e.statusText,!e.responseType?e.responseText:e.response))};e.onload=a,e.onabort=()=>{this.__isFulfilled=!0,o(u.abort("Abort connection"))},e.onerror=s,e.ontimeout=s,t.responseType&&(e.responseType=t.responseType),e.onprogress=e=>{var t,i;let n=0;e.lengthComputable&&(n=e.loaded/e.total*100),null==(t=(i=this.options).onProgress)||t.call(i,n)},e.onreadystatechange=()=>{var i,n;null==(i=(n=this.options).onProgress)||i.call(n,10),e.readyState===XMLHttpRequest.DONE&&(t.successStatuses.includes(e.status)?a():e.statusText&&(this.__isFulfilled=!0,o(u.connection(e.statusText))))},e.withCredentials=null!=(r=t.withCredentials)&&r;let{url:c,data:h,method:p}=i;e.open(p,c,!0),t.contentType&&e.setRequestHeader&&e.setRequestHeader("Content-type",t.contentType);let{headers:m}=t;(0,l.isFunction)(m)&&(m=await m.call(this)),m&&e.setRequestHeader&&Object.keys(m).forEach(t=>{e.setRequestHeader(t,m[t])}),this.__async.setTimeout(()=>{e.send(h?this.__buildParams(h):void 0)},0)})}async *stream(){var e;this.__activated=!0;let{xhr:t,o:i}=this,n=this.prepareRequest(),o=0,r="",s=[],a=null,c=!1,d=null,h=()=>{if(a){let e=a;a=null,e()}},p=e=>{var i;let n=t.responseText;r+=n.substring(o),o=n.length;let a=r.split("\n\n");for(let t of(r=e?"":null!=(i=a.pop())?i:"",a)){let e=t.trim();if(!e)continue;let i=[];for(let t of e.split("\n"))t.startsWith("data: ")?i.push(t.slice(6)):t.startsWith("data:")&&i.push(t.slice(5));i.length&&s.push(i.join("\n"))}h()};t.onprogress=()=>p(!1),t.onload=()=>{p(!0),c=!0,this.__isFulfilled=!0,h()},t.onerror=()=>{d=u.connection("Connection error"),c=!0,this.__isFulfilled=!0,h()},t.onabort=()=>{d=u.abort("Abort connection"),c=!0,this.__isFulfilled=!0,h()},t.withCredentials=null!=(e=i.withCredentials)&&e;let{url:m,data:f,method:g}=n;t.open(g,m,!0),i.contentType&&t.setRequestHeader&&t.setRequestHeader("Content-type",i.contentType);let{headers:_}=i;(0,l.isFunction)(_)&&(_=await _.call(this)),_&&t.setRequestHeader&&Object.keys(_).forEach(e=>{t.setRequestHeader(e,_[e])}),t.send(f?this.__buildParams(f):void 0);try{for(;;)if(s.length>0)yield s.shift();else if(c)break;else await new Promise(e=>{a=e})}finally{this.__isFulfilled||this.abort()}if(d)throw d}prepareRequest(){if(!this.o.url)throw u.error("Need URL for AJAX request");let e=this.o.url,t=this.o.data,i=(this.o.method||"get").toLowerCase();if("get"===i&&t&&(0,l.isPlainObject)(t)){let i=e.indexOf("?");if(-1!==i){let n=(0,l.parseQuery)(e.substring(i));e=e.substring(0,i)+"?"+(0,l.buildQuery)({...n,...t})}else e+="?"+(0,l.buildQuery)(this.o.data)}let n={url:e,method:i,data:t};return h.log.splice(100),h.log.push(n),n}destruct(){this.__isDestructed||(this.__isDestructed=!0,this.__activated&&!this.__isFulfilled&&(this.abort(),this.__isFulfilled=!0),this.__async.destruct())}constructor(e,t=c.Config.prototype.defaultAjaxOptions){(0,n._)(this,"__async",new r.Async),(0,n._)(this,"xhr",void 0),(0,n._)(this,"options",void 0),(0,n._)(this,"__isFulfilled",!1),(0,n._)(this,"__activated",!1),(0,n._)(this,"__isDestructed",!1),this.options=(0,l.ConfigProto)(e||{},t),this.xhr=this.o.xhr?this.o.xhr():new XMLHttpRequest}}(0,n._)(h,"log",[]),(0,o.__decorate)([a.autobind],h.prototype,"destruct",null)},37102:function(e,t,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(){return new XMLHttpRequest}}},73714:function(e,t,i){"use strict";i.d(t,{Ajax:function(){return n.Ajax},Response:function(){return o.Response}});var n=i(17338),o=i(32855)},32855:function(e,t,i){"use strict";i.d(t,{Response:function(){return o}});var n=i(25045);class o{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(e,t,i,o){(0,n._)(this,"status",void 0),(0,n._)(this,"statusText",void 0),(0,n._)(this,"request",void 0),(0,n._)(this,"body",void 0),this.request=e,this.status=t,this.statusText=i,this.body=o}}},42259:function(e,t,i){"use strict";i.d(t,{cursorInTheEdgeOfString:function(){return s},findCorrectCurrentNode:function(){return a},moveNodeInsideStart:function(){return r.moveNodeInsideStart}});var n=i(81937),o=i(23211),r=i(89817);function s(e,t,i,o){var r;let s=(null==(r=e.nodeValue)?void 0:r.length)?e.nodeValue:"";if(o&&s.replace((0,n.INVISIBLE_SPACE_REG_EXP_END)(),"").length>t)return!0;let a=(0,n.INVISIBLE_SPACE_REG_EXP_START)().exec(s);return i&&(a&&a[0].length<t||!a&&t>0)}function a(e,t,i,n,r,s){if((e=t.startContainer.childNodes[t.startOffset])||(e=t.startContainer.childNodes[t.startOffset-1],i=!0),e&&n&&!o.Dom.isText(e)){if(!i&&o.Dom.isText(e.previousSibling))e=e.previousSibling;else if(r){let t=e=>i?e.lastChild:s(e),n=t(e);for(;n;){if(n&&o.Dom.isText(n)){e=n;break}n=t(n)}}}if(e&&!n&&!o.Dom.isText(e)){let t=e,i=e;do t=t.firstChild,i=i.lastChild;while(t&&i&&!o.Dom.isText(t));t===i&&t&&o.Dom.isText(t)&&(e=t)}return{node:e,rightMode:i}}i(7470)},89817:function(e,t,i){"use strict";i.d(t,{moveNodeInsideStart:function(){return r}});var n=i(81937),o=i(23211);function r(e,t,i){let r=o.Dom.findSibling(t,i),s=o.Dom.findSibling(t,!i);for(;o.Dom.isElement(r)&&!o.Dom.isTag(r,n.INSEPARABLE_TAGS)&&o.Dom.isContentEditable(r,e.editor)&&(!s||!o.Dom.closest(t,o.Dom.isElement,e.editor));)i||!r.firstChild?o.Dom.append(r,t):o.Dom.before(r.firstChild,t),r=o.Dom.sibling(t,i),s=o.Dom.sibling(t,!i)}},7470:function(e,t,i){"use strict";i.d(t,{moveTheNodeAlongTheEdgeOutward:function(){return o}});var n=i(23211);function o(e,t,i){let o=e;for(;o&&o!==i&&!(n.Dom.findSibling(o,t)||n.Dom.isBlock(o.parentElement));)(o=o.parentElement)&&o!==i&&(t?n.Dom.before(o,e):n.Dom.after(o,e))}},59841:function(e,t,i){"use strict";i.d(t,{CommitStyle:function(){return o.CommitStyle},Selection:function(){return n.Selection}});var n=i(98595),o=i(84578)},98595:function(e,t,i){"use strict";i.d(t,{Selection:function(){return m}});var n=i(25045),o=i(31635),r=i(81937),s=i(84839),a=i(23211),l=i(65946),u=i(28686),c=i(28712),d=i(7470),h=i(84578),p=i(42259);class m{get j(){return this.jodit}errorNode(e){if(!a.Dom.isNode(e))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,u.isFunction)(this.j.o.shadowRoot.getSelection)?this.j.o.shadowRoot.getSelection():this.win.getSelection()}get range(){let e=this.sel;return e&&e.rangeCount?e.getRangeAt(0):this.createRange()}get isInsideArea(){let{sel:e}=this;if(!(null==e?void 0:e.rangeCount))return!1;for(let t=0;t<e.rangeCount;t+=1)if(!a.Dom.isOrContains(this.area,e.getRangeAt(t).commonAncestorContainer))return!1;return!0}createRange(e=!1){let t=this.doc.createRange();return e&&this.selectRange(t),t}remove(){let e=this.sel,t=this.current();if(e&&t)for(let t=0;t<e.rangeCount;t+=1){let i=e.getRangeAt(t);a.Dom.isOrContains(this.area,i.commonAncestorContainer)&&(i.deleteContents(),i.collapse(!0))}}clear(){var e,t;(null==(e=this.sel)?void 0:e.rangeCount)&&(null==(t=this.sel)||t.removeAllRanges())}removeNode(e){if(!a.Dom.isOrContains(this.j.editor,e,!0))throw(0,l.error)("Selection.removeNode can remove only editor's children");a.Dom.safeRemove(e),this.j.e.fire("afterRemoveNode",e)}insertCursorAtPoint(e,t){try{var i,n,o,r;let s=this.createRange(),l=null==(i=(n=this.doc).caretPositionFromPoint)?void 0:i.call(n,e,t),u=l?null:null==(o=(r=this.doc).caretRangeFromPoint)?void 0:o.call(r,e,t);if(l)s.setStart(l.offsetNode,l.offset);else{if(!u)return!1;s.setStart(u.startContainer,u.startOffset)}if(!a.Dom.isOrContains(this.area,s.startContainer))return!1;return s.collapse(!0),this.removeMarkers(),this.selectRange(s),!0}catch(e){}return!1}get hasMarkers(){return!!this.markers.length}get markers(){return(0,l.$$)("span[data-"+r.MARKER_CLASS+"]",this.area)}removeMarkers(){a.Dom.safeRemove(...this.markers)}marker(e=!1,t){let i=null;t&&(i=t.cloneRange()).collapse(e);let n=this.j.createInside.span();return n.id=r.MARKER_CLASS+"_"+Number(new Date)+"_"+String(Math.random()).slice(2),(0,l.css)(n,{lineHeight:"0",display:"none"}),a.Dom.markTemporary(n),(0,l.attr)(n,"data-"+r.MARKER_CLASS,e?"start":"end"),a.Dom.append(n,this.j.createInside.text(r.INVISIBLE_SPACE)),i&&a.Dom.isOrContains(this.area,e?i.startContainer:i.endContainer)&&i.insertNode(n),n}restore(){let e=this.markers,t=new Map(e.map(e=>[e.id,e])),i=[],n=!1;for(let u=0;u<e.length;u+=1){let c=e[u];if("start"!==(0,l.attr)(c,"data-"+r.MARKER_CLASS))continue;n||(n="true"===(0,l.attr)(c,"data-selection-backward"));let d=(0,l.attr)(c,"data-selection-end"),h=d?t.get(d):void 0;!d&&e[u+1]&&"end"===(0,l.attr)(e[u+1],"data-"+r.MARKER_CLASS)&&(h=e[u+1]);let p=this.createRange();if(h)p.setStartAfter(c),p.setEndBefore(h);else{let e=c.previousSibling;if(a.Dom.isText(e)){var o,s;p.setStart(e,null!=(o=null==(s=e.nodeValue)?void 0:s.length)?o:0)}else p.setStartBefore(c);p.collapse(!0)}i.push(p)}a.Dom.safeRemove(...e),i.length&&this.__selectRanges(i,n)}__isBackward(){let e=this.sel;return!!(e&&1===e.rangeCount&&!e.isCollapsed&&e.anchorNode===e.getRangeAt(0).endContainer&&e.anchorOffset===e.getRangeAt(0).endOffset)}__ranges(){let e=this.sel;return e?Array.from({length:e.rangeCount},(t,i)=>e.getRangeAt(i).cloneRange()):[]}fakes(){if(!this.isInsideArea)return[];let e=this.__isBackward(),t=this.__ranges(),i=t.map(e=>{let t=e.collapsed,i=e.cloneRange();i.collapse(!0);let n=this.j.createInside.fake();a.Dom.safeInsertNode(i,n),e.setStartBefore(n);let o=[n];if(t)e.collapse(!0);else{let t=e.cloneRange();t.collapse(!1);let i=this.j.createInside.fake();a.Dom.safeInsertNode(t,i),e.setEndAfter(i),o.push(i)}return o});return this.__fakeSelections.set(i[0][0],{pairs:i,backward:e}),this.__selectRanges(t,e),i[0]}restoreFakes(e){var t,i,n;if(!e.length)return;let o=this.__fakeSelections.get(e[0]);if(this.__fakeSelections.delete(e[0]),this.j.isInDestruct)return;let r=[];for(let s of null!=(t=null==o?void 0:o.pairs)?t:[e]){let e=s.filter(e=>e.isConnected&&a.Dom.isOrContains(this.area,e,!0));if(!e.length)continue;let[t,o]=e,l=this.createRange();for(let r of(l.setStartAfter(t),o?l.setEndBefore(o):l.collapse(!0),e))(null==(i=r.parentNode)?void 0:i.firstChild)!==(null==(n=r.parentNode)?void 0:n.lastChild)&&a.Dom.safeRemove(r);r.push(l)}r.length&&this.__selectRanges(r,null==o?void 0:o.backward)}save(e=!1){if(this.hasMarkers)return[];let t=this.sel;if(!t||!t.rangeCount)return[];let i=this.__isBackward(),n=[],o=t.rangeCount,r=[];for(let e=0;o>e;e+=1)if(r[e]=t.getRangeAt(e),!a.Dom.isOrContains(this.area,r[e].commonAncestorContainer))return[];for(let e=0;o>e;e+=1)if(r[e].collapsed){let t=this.marker(!0,r[e]);n[e]={startId:t.id,collapsed:!0,startMarker:t.outerHTML}}else{let t=this.marker(!0,r[e]),s=this.marker(!1,r[e]);o>1&&(0,l.attr)(t,"data-selection-end",s.id),i&&(0,l.attr)(t,"data-selection-backward","true"),n[e]={startId:t.id,endId:s.id,collapsed:!1,startMarker:t.outerHTML,endMarker:s.outerHTML}}if(!e){t.removeAllRanges();for(let e=o-1;e>=0;--e){let i=this.area.querySelector("#"+n[e].startId);if(i){if(n[e].collapsed)r[e].setStartAfter(i),r[e].collapse(!0);else if(r[e].setStartBefore(i),n[e].endId){let t=this.area.querySelector("#"+n[e].endId);t&&r[e].setEndAfter(t)}try{t.addRange(r[e].cloneRange())}catch(e){}}}}return n}focus(e={preventScroll:!0}){if(!this.isFocused()){let n=(0,l.getScrollParent)(this.j.container),o=null==n?void 0:n.scrollTop;this.j.iframe&&"complete"===this.doc.readyState&&this.j.iframe.focus(e),this.win.focus(),this.area.focus(e),o&&(null==n?void 0:n.scrollTo)&&n.scrollTo(0,o);let r=this.sel,s=(null==r?void 0:r.rangeCount)?null==r?void 0:r.getRangeAt(0):null;if(!s||!a.Dom.isOrContains(this.area,s.startContainer)){let e=this.createRange();e.setStart(this.area,0),e.collapse(!0),this.selectRange(e,!1)}if(!this.j.editorIsActive){var t,i;null==(i=this.j)||null==(t=i.events)||t.fire("focus")}return!0}return!1}isCollapsed(){let e=this.sel;for(let t=0;e&&t<e.rangeCount;t+=1)if(!e.getRangeAt(t).collapsed)return!1;return!0}isFocused(){return this.doc.hasFocus&&this.doc.hasFocus()&&this.area===this.doc.activeElement}current(e=!0){if(this.j.getRealMode()!==r.MODE_WYSIWYG)return null;let t=this.sel;if(!t||0===t.rangeCount)return null;let i=t.getRangeAt(0),n=i.startContainer,o=!1;if(!a.Dom.isOrContains(this.area,n))return null;if(a.Dom.isTag(n,"br")&&t.isCollapsed)return n;if(!a.Dom.isText(n)){let r=(0,p.findCorrectCurrentNode)(n,i,o,t.isCollapsed,e,e=>o?e.lastChild:e.firstChild);n=r.node,o=r.rightMode}return n&&a.Dom.isOrContains(this.area,n)?n:null}insertNode(e,t=!0,i=!0){this.errorNode(e),this.j.e.fire("safeHTML",e);let n=a.Dom.isFragment(e)?e.lastChild:e;if(!n||this.j.isInDestruct)return;!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore());let o=this.sel;this.j.history.snapshot.transaction(()=>{if(this.isCollapsed()||this.j.execCommand("Delete"),this.j.e.fire("beforeInsertNode",e),!(n=a.Dom.isFragment(e)?e.lastChild:e)||this.j.isInDestruct)return;if(o&&o.rangeCount){let t=o.getRangeAt(0),{firstChild:i}=e;a.Dom.isOrContains(this.area,t.commonAncestorContainer)?a.Dom.safeInsertNode(t,e):a.Dom.append(this.area,e),[()=>null==i?void 0:i.previousSibling,()=>null==i?void 0:i.previousSibling,()=>{var e;return null==i||null==(e=i.previousSibling)?void 0:e.lastChild}].forEach(e=>{let t=e();t&&a.Dom.isEmptyTextNode(t)&&a.Dom.safeRemove(t)})}else a.Dom.append(this.area,e);let i=e=>{if(a.Dom.isBlock(e)){let t=e.lastChild;if(t)return i(t)}this.setCursorAfter(e)};t&&(a.Dom.isFragment(e)?n&&i(n):i(e)),this.j.o.scrollToPastedContent&&(0,l.scrollIntoViewIfNeeded)(null!=n?n:e,this.j.editor,this.doc)}),i&&this.j.events&&this.j.__imdSynchronizeValues(),this.j.events&&this.j.e.fire("afterInsertNode",a.Dom.isFragment(e)?n:e)}insertHTML(e,t=!0){if(""===e)return;let i=this.j.createInside.div(),n=this.j.createInside.fragment();!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore()),a.Dom.isNode(e)?a.Dom.append(i,e):i.innerHTML=e.toString(),!this.j.isEditorMode()&&!1===this.j.e.fire("insertHTML",i.innerHTML)||i.lastChild&&(a.Dom.moveContent(i,n),this.insertNode(n,t,!1),this.j.__imdSynchronizeValues())}insertImage(e,t=null,i=null){let n=(0,u.isString)(e)?this.j.createInside.element("img"):e;if((0,u.isString)(e)&&(0,l.attr)(n,"src",e),null!=i){let e=i.toString();e&&"auto"!==e&&0>String(e).indexOf("px")&&0>String(e).indexOf("%")&&(e+="px"),(0,l.attr)(n,"width",e)}t&&"object"==typeof t&&(0,l.css)(n,t);let o=()=>{(n.naturalHeight<n.offsetHeight||n.naturalWidth<n.offsetWidth)&&(0,l.css)(n,{width:"",height:""}),n.removeEventListener("load",o)};this.j.e.on(n,"load",o),n.complete&&o(),this.insertNode(n),this.j.e.fire("afterInsertImage",n)}eachSelection(e){let t=new Set;for(let i of this.__ranges())a.Dom.isOrContains(this.area,i.commonAncestorContainer)&&this.__eachRange(i,i=>{t.has(i)||(t.add(i),e(i))})}__eachRange(e,t){var i;let n=e.commonAncestorContainer;a.Dom.isHTMLElement(n)||(n=n.parentElement);let o=[],s=e.startOffset,c=n.childNodes.length,d=e.startContainer===this.area?n.childNodes[s<c?s:c-1]:e.startContainer,h=e.endContainer===this.area?n.childNodes[e.endOffset-1]:e.endContainer;a.Dom.isText(d)&&d===e.startContainer&&e.startOffset===(null==(i=d.nodeValue)?void 0:i.length)&&d.nextSibling&&(d=d.nextSibling),a.Dom.isText(h)&&h===e.endContainer&&0===e.endOffset&&h.previousSibling&&(h=h.previousSibling);let p=e=>{!e||e===n||a.Dom.isEmptyTextNode(e)||(0,u.isMarker)(e)||o.push(e)};p(d),d!==h&&a.Dom.isOrContains(n,d,!0)&&a.Dom.find(d,e=>(p(e),e===h||e&&e.contains&&e.contains(h)),n,!0,!1);let m=e=>{if(a.Dom.isOrContains(this.j.editor,e,!0)){if(e.nodeName.match(/^(UL|OL)$/))return(0,l.toArray)(e.childNodes).forEach(m);if(a.Dom.isTag(e,"li"))if(e.firstChild)e=e.firstChild;else{let t=this.j.createInside.text(r.INVISIBLE_SPACE);a.Dom.append(e,t),e=t}t(e)}};0===o.length&&(a.Dom.isEmptyTextNode(d)&&o.push(d),(null==d?void 0:d.firstChild)&&o.push(d.firstChild)),o.forEach(m)}cursorInTheEdge(e,t,i=null){let n=!e,o=this.sel,r=(null==o?void 0:o.rangeCount)?o.getRangeAt(0):null;if(!r)return null;let s=e?r.startContainer:r.endContainer,l=e?r.startOffset:r.endOffset;if(null!=i||(i=s),!a.Dom.isOrContains(t,s)||!a.Dom.isOrContains(t,i))return null;let u=e=>!!(e&&!a.Dom.isTag(e,"br")&&!a.Dom.isEmptyTextNode(e)&&!a.Dom.isTemporary(e)&&!(a.Dom.isElement(e)&&!0===this.j.e.fire("isInvisibleForCursor",e)));if(a.Dom.isText(s)){if((0,p.cursorInTheEdgeOfString)(s,l,e,n))return!1}else{let e=s.childNodes,t=n?e.length:l;for(let i=n?l:0;t>i;i+=1)if(u(e[i]))return!1}let c=i;for(;c&&c!==t;){let t=a.Dom.sibling(c,e);if(!t){c=c.parentNode;continue}if(u(c=t))return!1}return!0}cursorOnTheLeft(e,t){return this.cursorInTheEdge(!0,e,t)}cursorOnTheRight(e,t){return this.cursorInTheEdge(!1,e,t)}setCursorAfter(e){return this.setCursorNearWith(e,!1)}setCursorBefore(e){return this.setCursorNearWith(e,!0)}setCursorNearWith(e,t){if(this.errorNode(e),!a.Dom.isOrContains(this.area,e,!0))throw(0,l.error)("Node element must be in editor");let i=this.createRange(),n=null;if(a.Dom.isText(e))if(t)i.setStart(e,0);else{var o,r;i.setEnd(e,null!=(o=null==(r=e.nodeValue)?void 0:r.length)?o:0)}else n=this.j.createInside.fake(),t?i.setStartBefore(e):i.setEndAfter(e),i.collapse(t),a.Dom.safeInsertNode(i,n),i.selectNode(n);return i.collapse(t),this.selectRange(i),n}setCursorIn(e,t=!1){if(this.errorNode(e),!a.Dom.up(e,e=>e===this.area||e&&e.parentNode===this.area,this.area))throw(0,l.error)("Node element must be in editor");let i=this.createRange(),n=e,o=e;do{if(a.Dom.isText(n)||a.Dom.isTag(n,r.INSEPARABLE_TAGS))break;o=n,n=t?n.firstChild:n.lastChild}while(n);if(!n){let e=this.j.createInside.text(r.INVISIBLE_SPACE);a.Dom.isTag(o,r.INSEPARABLE_TAGS)?n=o:(a.Dom.append(o,e),o=e)}let s=n||o;return a.Dom.isTag(s,r.INSEPARABLE_TAGS)?t||a.Dom.isTag(s,"br")?i.setStartBefore(s):i.setEndAfter(s):i.selectNodeContents(s),i.collapse(t),this.selectRange(i),o}selectRange(e,t=!0){return this.__selectRanges([e],!1,t)}__selectRanges(e,t=!1,i=!0){let n=this.sel;if(i&&!this.isFocused()&&"focus"!==this.j.e.current&&this.focus(),n&&(n.removeAllRanges(),e.forEach(e=>n.addRange(e)),t&&1===e.length)){let t=e[0];n.setBaseAndExtent(t.endContainer,t.endOffset,t.startContainer,t.startOffset)}return this.j.e.fire("changeSelection"),this}select(e,t=!1){if(this.errorNode(e),!a.Dom.up(e,e=>e===this.area||e&&e.parentNode===this.area,this.area))throw(0,l.error)("Node element must be in editor");let i=this.createRange();return i[t||e===this.area?"selectNodeContents":"selectNode"](e),this.selectRange(i)}get html(){let e=this.sel;if(e&&e.rangeCount>0){let e=this.j.createInside.div();return this.__ranges().forEach(t=>a.Dom.append(e,t.cloneContents())),e.innerHTML}return""}__wrapSelectionFragments(e){this.__splitSelectionBoundaries(e);let t=e.commonAncestorContainer;return(a.Dom.isText(t)&&(t=t.parentNode),t)?this.__wrapSelectionRuns(this.__collectContainedNodes(t,e)):[]}__splitSelectionBoundaries(e){var t,i,n,o;let{endContainer:r,endOffset:s}=e;a.Dom.isText(r)&&s>0&&s<(null!=(t=null==(n=r.nodeValue)?void 0:n.length)?t:0)&&r.splitText(s);let{startContainer:l,startOffset:u}=e;if(a.Dom.isText(l)&&u>0&&u<(null!=(i=null==(o=l.nodeValue)?void 0:o.length)?i:0)){let t=l.splitText(u);e.setStart(t,0)}this.__normalizeRangeBoundary(e,!0),this.__normalizeRangeBoundary(e,!1)}__normalizeRangeBoundary(e,t){var i,n;let o=t?e.startContainer:e.endContainer;if(!a.Dom.isText(o))return;let r=t?e.startOffset:e.endOffset,s=null!=(i=null==(n=o.nodeValue)?void 0:n.length)?i:0;0===r?t?e.setStartBefore(o):e.setEndBefore(o):r>=s&&(t?e.setStartAfter(o):e.setEndAfter(o))}__collectContainedNodes(e,t,i=this.createRange()){let n=[];return(0,l.toArray)(e.childNodes).forEach(e=>{this.__isFullyContained(t,e,i)?n.push(e):e.childNodes.length&&t.intersectsNode(e)&&n.push(...this.__collectContainedNodes(e,t,i))}),n}__isFullyContained(e,t,i){return i.selectNode(t),0>=e.compareBoundaryPoints(Range.START_TO_START,i)&&e.compareBoundaryPoints(Range.END_TO_END,i)>=0}__wrapSelectionRuns(e){let t=[],i=[],n=()=>{i.length&&(t.push(this.__wrapRunInFont(i)),i=[])};return e.forEach(e=>{a.Dom.isElement(e)&&this.__isOrContainsBlock(e)?(n(),t.push(...this.__wrapSelectionRuns((0,l.toArray)(e.childNodes)))):(i.length&&i[i.length-1].parentNode!==e.parentNode&&n(),i.push(e))}),n(),t}__isOrContainsBlock(e){return!!a.Dom.isBlock(e)||(0,l.toArray)(e.childNodes).some(e=>this.__isOrContainsBlock(e))}__wrapRunInFont(e){let t=this.j.createInside.element("font"),[i]=e;return a.Dom.before(i,t),e.forEach(e=>a.Dom.append(t,e)),t}*wrapInTagGen(e){var t;if((null==(t=this.sel)?void 0:t.rangeCount)&&!this.isInsideArea)return;if(this.isCollapsed()){let t=this.jodit.createInside.element("font",r.INVISIBLE_SPACE);this.insertNode(t,!1,!1),e&&e[0]&&a.Dom.append(t,e[0]);try{yield t}finally{a.Dom.unwrap(t)}return}let i=this.__ranges().flatMap(e=>this.__wrapSelectionFragments(e));try{for(let e of i){if(this.j.isInDestruct||!a.Dom.isOrContains(this.area,e,!0))continue;let{firstChild:t,lastChild:i}=e;if(t&&t===i&&(0,u.isMarker)(t)){a.Dom.unwrap(e);continue}t&&(0,u.isMarker)(t)&&a.Dom.before(e,t),i&&(0,u.isMarker)(i)&&a.Dom.after(e,i),yield e,a.Dom.unwrap(e)}}finally{i.forEach(e=>a.Dom.unwrap(e))}}wrapInTag(e){let t=[];for(let i of this.wrapInTagGen())try{if(i.firstChild&&i.firstChild===i.lastChild&&(0,u.isMarker)(i.firstChild))continue;(0,u.isFunction)(e)?e(i):t.push(a.Dom.replace(i,e,this.j.createInside))}finally{let e=i.parentNode;e&&(a.Dom.unwrap(i),a.Dom.isEmpty(e)&&a.Dom.unwrap(e))}return t}commitStyle(e){(0,c.assert)((0,l.size)(e)>0,"Need to pass at least one option"),new h.CommitStyle(e).apply(this.j)}splitSelection(e,t){if(!this.isCollapsed()||!this.isInsideArea||!a.Dom.isOrContains(this.area,e,!0)||!a.Dom.isOrContains(e,this.range.startContainer)||t&&!a.Dom.isOrContains(e,t,!0))return null;let i=this.createRange(),n=this.range;i.setStartBefore(e);let o=this.cursorOnTheRight(e,t),s=this.cursorOnTheLeft(e,t),l=this.j.createInside.element("br"),u=this.j.createInside.fake(),d=u.cloneNode();try{if(o||s){t?a.Dom.before(t,l):a.Dom.safeInsertNode(n,l);let e=(e,t)=>{let i=t(e);for(;i;){let e=t(i);if(i&&(a.Dom.isTag(i,"br")||a.Dom.isEmptyTextNode(i)))a.Dom.safeRemove(i);else break;i=e}};e(l,e=>e.nextSibling),e(l,e=>e.previousSibling),a.Dom.after(l,d),a.Dom.before(l,u),o?(i.setEndBefore(l),n.setEndBefore(l)):(i.setEndAfter(l),n.setEndAfter(l))}else i.setEnd(n.startContainer,n.startOffset);let h=i.extractContents(),p=e=>a.Dom.each(e,e=>a.Dom.isEmptyTextNode(e)&&a.Dom.safeRemove(e));(0,c.assert)(e.parentNode,"Splitting fails");try{if(p(h),p(e),a.Dom.before(e,h),!t&&o&&(null==l?void 0:l.parentNode)){let e=this.createRange();e.setStartBefore(l),this.selectRange(e)}}catch(e){if(!r.IS_PROD)throw e}let m=e=>{let t=null==e?void 0:e.parentNode;t&&t.firstChild===t.lastChild&&a.Dom.append(t,l.cloneNode())};m(u),m(d)}finally{a.Dom.safeRemove(u),a.Dom.safeRemove(d)}return e.previousElementSibling}expandSelection(){if(this.isCollapsed()||!this.isInsideArea)return this;let e=this.__isBackward(),t=this.__ranges().map(e=>this.__expandRange(e));return this.__selectRanges(t,e),this}__expandRange(e){let t=e.cloneRange();if(!a.Dom.isOrContains(this.j.editor,e.commonAncestorContainer,!0))return e;let i=t=>{let i=this.j.createInside.fake(),n=e.cloneRange();return n.collapse(t),a.Dom.safeInsertNode(n,i),(0,d.moveTheNodeAlongTheEdgeOutward)(i,t,this.j.editor),i},n=i(!0),o=i(!1);t.setStartAfter(n),t.setEndBefore(o);let r=a.Dom.findSibling(n,!1),s=a.Dom.findSibling(o,!0);if(r!==s){let e=a.Dom.isElement(r)&&a.Dom.isOrContains(r,o),i=!e&&a.Dom.isElement(s)&&a.Dom.isOrContains(s,n);if(e||i){let i=e?r:s,l=i;for(;a.Dom.isElement(i);)(i=e?i.firstElementChild:i.lastElementChild)&&(e?a.Dom.isOrContains(i,o):a.Dom.isOrContains(i,n))&&(l=i);e?t.setStart(l,0):t.setEnd(l,l.childNodes.length)}}if(a.Dom.safeRemove(n,o),t.collapsed)throw(0,l.error)("Selection is collapsed");return t}constructor(e){(0,n._)(this,"jodit",void 0),(0,n._)(this,"__fakeSelections",void 0),this.jodit=e,this.__fakeSelections=new WeakMap,e.e.on("removeMarkers",()=>{this.removeMarkers()})}}(0,o.__decorate)([s.autobind],m.prototype,"createRange",null),(0,o.__decorate)([s.autobind],m.prototype,"focus",null),(0,o.__decorate)([s.autobind],m.prototype,"setCursorAfter",null),(0,o.__decorate)([s.autobind],m.prototype,"setCursorBefore",null),(0,o.__decorate)([s.autobind],m.prototype,"setCursorIn",null)},17481:function(e,t,i){"use strict";i.d(t,{extractSelectedPart:function(){return s}});var n=i(23211),o=i(23175),r=i(71125);function s(e,t,i){let n=i.s.createRange(),r=(0,o.isMarker)(t.previousSibling)?t.previousSibling:t;n.setStartBefore(e),n.setEndBefore(r),a(e,n,!0);let s=(0,o.isMarker)(t.nextSibling)?t.nextSibling:t;n.setStartAfter(s),n.setEndAfter(e),a(e,n,!1)}function a(e,t,i){let o=t.extractContents();n.Dom.isEmpty(o)&&o.firstChild&&n.Dom.unwrap(o.firstChild),e.parentNode&&(0,r.call)(i?n.Dom.before:n.Dom.after,e,o)}},48729:function(e,t,i){"use strict";i.d(t,{FiniteStateMachine:function(){return a}});var n=i(25045),o=i(81937),r=i(85932),s=i(28712);class a{setState(e){(0,s.assert)(!this.__previewsStates.has(e),"Circled states"),this.__previewsStates.add(e),this.__state=e}getState(){return this.__state}disableSilent(){this.silent=!1}dispatch(e,t){let i=this.transitions[this.getState()][e];if(i){let e=i.call(this,t);return(0,s.assert)(e&&e!==t,"Action should return new value"),(0,s.assert)((0,r.isString)(e.next),"Value should contain the next state"),(0,s.assert)(e.next!==this.getState(),"The new state should not be equal to the old one."),this.setState(e.next),o.IS_PROD||this.silent,e}throw Error(`invalid action: ${this.getState()}.${e.toString()}`)}constructor(e,t){(0,n._)(this,"transitions",void 0),(0,n._)(this,"__state",void 0),(0,n._)(this,"silent",void 0),(0,n._)(this,"__previewsStates",void 0),this.transitions=t,this.silent=!0,this.__previewsStates=new Set,this.setState(e)}}},10171:function(e,t,i){"use strict";i.d(t,{getSuitChild:function(){return s}});var n=i(23211),o=i(83653),r=i(73019);function s(e,t){let{firstChild:i}=t;for(;i&&!(0,o.isNormalNode)(i);)if(!(i=i.nextSibling))return null;return i&&!n.Dom.next(i,o.isNormalNode,t)&&(0,r.isSuitElement)(e,i,!1)?i:null}},19549:function(e,t,i){"use strict";i.d(t,{getSuitParent:function(){return function e(t,i,s){var a;let{parentNode:l}=i;return l===s||!n.Dom.isHTMLElement(l)||n.Dom.next(i,o.isNormalNode,l)||n.Dom.prev(i,o.isNormalNode,l)?null:t.isElementCommit&&t.elementIsBlock&&!n.Dom.isBlock(l)?e(t,l,s):n.Dom.isTag(l,"li")&&!t.isElementCommit&&(null==(a=t.options.attributes)?void 0:a.style)||(0,r.isSuitElement)(t,l,!1)&&(!n.Dom.isBlock(l)||t.elementIsBlock)?l:t.isElementCommit&&!n.Dom.isBlock(l)?e(t,l,s):null}}});var n=i(23211),o=i(83653),r=i(73019)},9703:function(e,t,i){"use strict";i.d(t,{hasSameStyle:function(){return u},hasSameStyleKeys:function(){return c}});var n=i(81937),o=i(23211),r=i(18303),s=i(19147),a=i(28712),l=i(80991);function u(e,t){return!!(!o.Dom.isTag(e,"font")&&o.Dom.isHTMLElement(e)&&Object.keys(t).every(i=>{let n=(0,l.css)(e,i,!0);return""===n&&(""===t[i]||null==t[i])||!(0,r.isVoid)(n)&&""!==n&&!(0,r.isVoid)(t[i])&&(0,s.normalizeCssValue)(i,t[i]).toString().toLowerCase()===n.toString().toLowerCase()}))}if(n.globalDocument){let e=n.globalDocument.createElement("div");e.style.color="red",(0,a.assert)(u(e,{color:"red"}),"Style test"),(0,a.assert)(u(e,{fontSize:null}),"Style test"),(0,a.assert)(u(e,{fontSize:""}),"Style test")}function c(e,t){return!!(!o.Dom.isTag(e,"font")&&o.Dom.isHTMLElement(e)&&Object.keys(t).every(t=>""!==(0,l.css)(e,t,!0)))}if(n.globalDocument){let e=n.globalDocument.createElement("div");e.style.color="red",(0,a.assert)(c(e,{color:"red"}),"Style test"),(0,a.assert)(!c(e,{font:"Arial",color:"red"}),"Style test"),(0,a.assert)(!c(e,{border:"1px solid #ccc"}),"Style test")}},51640:function(e,t,i){"use strict";i.d(t,{FiniteStateMachine:function(){return o.FiniteStateMachine},WRAP_NODES:function(){return h.WRAP_NODES},extractSelectedPart:function(){return n.extractSelectedPart},getSuitChild:function(){return r.getSuitChild},getSuitParent:function(){return s.getSuitParent},isInsideInvisibleElement:function(){return a.isInsideInvisibleElement},suitableClosest:function(){return l.suitableClosest},toggleAttributes:function(){return c.toggleAttributes},toggleOrderedList:function(){return u.toggleOrderedList},unwrapChildren:function(){return d.unwrapChildren},wrap:function(){return h.wrap}});var n=i(17481),o=i(48729),r=i(10171),s=i(19549);i(9703);var a=i(39608);i(83653),i(95971);var l=i(73019),u=i(34582);i(97110);var c=i(82794),d=i(89081),h=i(73154);i(83335)},39608:function(e,t,i){"use strict";i.d(t,{isInsideInvisibleElement:function(){return o}});var n=i(23211);function o(e,t){return!!n.Dom.closest(e,["style","script"],t)}},83653:function(e,t,i){"use strict";i.d(t,{isNormalNode:function(){return r}});var n=i(23211),o=i(23175);function r(e){return!!(e&&!n.Dom.isEmptyTextNode(e)&&!n.Dom.isTemporary(e)&&!(0,o.isMarker)(e))}},95971:function(e,t,i){"use strict";i.d(t,{elementsEqualAttributes:function(){return u},isSameAttributes:function(){return l}});var n=i(18073),o=i(93640),r=i(28712),s=i(7909),a=i(9703);function l(e,t){return!(0,n.size)(t)||((0,r.assert)(t,"Attrs must be a non-empty object"),Object.keys(t).every(i=>{if("class"===i||"className"===i){var n;return(null!=(n=String(t[i]).match(/[^\t\n\f\r ]+/g))?n:[]).every(t=>e.classList.contains(t))}if("style"===i)return(0,a.hasSameStyle)(e,t[i]);let r=t[i];return(0,o.attr)(e,i)===(null==r?r:String(r))}))}function u(e,t){return e.attributes.length===t.attributes.length&&Array.from(e.attributes).every(e=>(0,s.attrRaw)(t,e.name)===e.value)}},73019:function(e,t,i){"use strict";i.d(t,{isSuitElement:function(){return s},suitableClosest:function(){return a}});var n=i(23211),o=i(9703),r=i(83653);function s(e,t,i,a=!0){var l;if(!t||!(0,r.isNormalNode)(t))return!1;let{element:u,elementIsDefault:c,options:d}=e;if(n.Dom.isList(t)&&e.elementIsList)return!0;let h=n.Dom.isTag(t,u);return!!(h&&!(c&&i)||(null==(l=d.attributes)?void 0:l.style)&&(a?(0,o.hasSameStyle)(t,d.attributes.style):(0,o.hasSameStyleKeys)(t,d.attributes.style))&&!e.elementIsList)||!h&&!i&&c&&n.Dom.isInlineBlock(t)}function a(e,t,i){return n.Dom.closest(t,t=>s(e,t,!0,!1),i)}},34582:function(e,t,i){"use strict";i.d(t,{toggleOrderedList:function(){return u}});var n=i(23211),o=i(28712),r=i(17481),s=i(82794),a=i(98394),l=i(97110);function u(e,t,i,n){if(!t)return n;let o=t.parentElement;if(!o)return n;let r=i.e.fire(`${a._PREFIX}BeforeToggleList`,n,e,o);if(void 0!==r)return r;let u=i.e.fire.bind(i.e,`${a._PREFIX}AfterToggleList`);if("unwrap"!==n){let r="change"===(0,s.toggleAttributes)(e,t.parentElement,i,a.INITIAL,!0);if(n===a.REPLACE||r||o.tagName.toLowerCase()!==e.element){let n=c(a.REPLACE,o,t,i,e),r=(0,l.wrapList)(e,n,i);return u(a.REPLACE,r,e),a.REPLACE}}return u("unwrap",c("unwrap",o,t,i,e),e),"unwrap"}function c(e,t,i,s,l){let u=s.e.fire(`${a._PREFIX}BeforeUnwrapList`,e,t,l);return u?((0,o.assert)(n.Dom.isHTMLElement(u),`${a._PREFIX}BeforeUnwrapList hook must return HTMLElement`),u):((0,r.extractSelectedPart)(t,i,s),(0,o.assert)(n.Dom.isHTMLElement(i.parentElement),"Element should be inside the list"),n.Dom.unwrap(i.parentElement),e===a.REPLACE)?i:n.Dom.replace(i,"br"!==s.o.enter.toLowerCase()?s.o.enter:s.createInside.fragment(),s.createInside)}},97110:function(e,t,i){"use strict";i.d(t,{wrapList:function(){return a}});var n=i(23211),o=i(95971),r=i(82794),s=i(98394);function a(e,t,i){let a=i.e.fire(`${s._PREFIX}BeforeWrapList`,s.REPLACE,t,e),l=null!=a?a:n.Dom.replace(t,"li",i.createInside),u=l.previousElementSibling,c=l.nextElementSibling,d=n.Dom.isTag(u,e.element)?u:null;return null!=d||(d=n.Dom.isTag(c,e.element)?c:null),n.Dom.isList(d)&&(0,o.isSameAttributes)(d,e.options.attributes)||(d=i.createInside.element(e.element),(0,r.toggleAttributes)(e,d,i,s.INITIAL),n.Dom.before(l,d)),u===d?n.Dom.append(d,l):n.Dom.prepend(d,l),n.Dom.isTag(d.nextElementSibling,e.element)&&(0,o.elementsEqualAttributes)(d,d.nextElementSibling)&&(n.Dom.append(d,Array.from(d.nextElementSibling.childNodes)),n.Dom.safeRemove(d.nextElementSibling)),i.e.fire(`${s._PREFIX}AfterWrapList`,"wrap",d,e),d}},82794:function(e,t,i){"use strict";i.d(t,{toggleAttributes:function(){return m}});var n=i(81937),o=i(23211),r=i(28077),s=i(28686),a=i(19147),l=i(18073),u=i(93640),c=i(80991),d=i(36400),h=i(98394);let p="toggleAttributes";function m(e,t,i,f,g=!1){var _;if(!g&&e.isApplied(t,p))return f;g||e.setApplied(t,p);let{attributes:v}=e.options;return v&&(0,l.size)(v)>0&&Object.keys(v).forEach(e=>{var p,m;let _=v[e];switch(e){case"style":p=f,(0,u.assert)((0,s.isPlainObject)(_)&&(0,l.size)(_),"Style must be an object"),Object.keys(_).forEach(e=>{let s=(0,c.cssInline)(t,e),l=_[e];if(""!==s||null!=l){let h,m,f,_;if(null==l||""===l){s&&(g||(0,c.css)(t,e,null),p="change");return}if(h=function(e){var t;if(void 0!==(0,d.dataBind)(e,"shadowRoot"))return(0,d.dataBind)(e,"shadowRoot");let i=(0,r.getContainer)(e),s=n.globalDocument.createElement("iframe");(0,c.css)(s,{width:0,height:0,position:"absolute",border:0}),(0,u.attr)(s,"src","about:blank"),o.Dom.append(i,s);let a=null==(t=s.contentWindow)?void 0:t.document,l=a?a.body:e.od.body;return(0,d.dataBind)(e,"shadowRoot",l),l}(i),m=i.create.element("div"),(0,c.css)(m,"color",(0,c.css)(i.editor,"color")),f=i.create.element(t.tagName.toLowerCase()),(0,u.attr)(f,"style",(0,u.attr)(t,"style")),o.Dom.append(m,f),o.Dom.append(h,m),_=(0,c.css)(f,e),o.Dom.safeRemove(m),_===(0,a.normalizeCssValue)(e,l)){if(!s)return;g||(0,c.css)(t,e,null),p="unset";return}p="change",g||(0,c.css)(t,e,l)}}),f=p;break;case"className":case"class":f=function(e,t,i,n,o){var r;(0,u.assert)((0,s.isString)(t),"Class name must be a string");let a=null!=(r=t.match(/[^\t\n\f\r ]+/g))?r:[];if(!a.length)return n;let l=e.e.fire.bind(e.e,`${h._PREFIX}AfterToggleAttribute`);return a.every(e=>i.classList.contains(e))?(n="unset",o||(i.classList.remove(...a),0===i.classList.length&&(0,u.attr)(i,"class",null),l(n,i,"class",(0,u.attr)(i,"class")))):(n="change",o||(i.classList.add(...a),l(n,i,"class",t))),n}(i,_,t,f,g);break;default:let b;m=f,(0,u.assert)((0,s.isString)(_)||(0,s.isNumber)(_)||(0,s.isBoolean)(_)||null==_,"Attribute value must be a string or number or boolean or null"),b=i.e.fire.bind(i.e,`${h._PREFIX}AfterToggleAttribute`),(0,u.attr)(t,e)===(null==_?_:String(_))?(g||(0,u.attr)(t,e,null),m="unset",g||b(m,t,e,_)):(m="change",g||((0,u.attr)(t,e,_),b(m,t,e,_))),f=m}}),!g&&(null==v?void 0:v.style)?(_=f,!(0,u.attr)(t,"style")&&((0,u.attr)(t,"style",null),t.attributes.length||t.tagName.toLowerCase()!==e.defaultTag||(o.Dom.unwrap(t),_="unwrap")),_):f}},89081:function(e,t,i){"use strict";i.d(t,{unwrapChildren:function(){return a}});var n=i(23211),o=i(93640),r=i(9703),s=i(73019);function a(e,t){var i;let a,l=[],u=[],c=null==(i=e.options.attributes)?void 0:i.style,d=Object.keys(null!=c?c:{}),h={};d.forEach(e=>{h[e]=null});let p=t=>{(0,o.css)(t,h),(0,o.attr)(t,"style")||(0,o.attr)(t,"style",null),!t.attributes.length&&n.Dom.isTag(t,e.element)&&l.push(t)};for(let i of n.Dom.eachGen(t))n.Dom.isContentEditable(i,t)&&((0,s.isSuitElement)(e,i,!0)&&(!c||(0,r.hasSameStyleKeys)(i,c))?(void 0===a&&(a=!0),c?u.push(()=>p(i)):l.push(i)):c&&n.Dom.isHTMLElement(i)&&d.some(e=>""!==(0,o.css)(i,e,!0))?(void 0===a&&(a=!1),u.push(()=>p(i))):n.Dom.isEmptyTextNode(i)||void 0!==a||(a=!1));return u.forEach(e=>e()),l.forEach(n.Dom.unwrap),!!a}},83335:function(e,t,i){"use strict";i.d(t,{wrapUnwrappedText:function(){return r}});var n=i(23211),o=i(23175);function r(e,t,i){let r=i.editor,s=i.createInside,a=(e,t="previousSibling")=>{let s=e,a=e;for(;a&&!(0,o.isMarker)(a)&&!n.Dom.isTag(a,i.o.enter)&&(s=a,a=a[t]?a[t]:a.parentNode&&!n.Dom.isBlock(a.parentNode)&&a.parentNode!==r?a.parentNode:null,!n.Dom.isBlock(a)););return s},l=a(t),u=a(t,"nextSibling"),c=i.s.createRange();c.setStartBefore(l),c.setEndAfter(u);let d=c.extractContents(),h=s.element(e.element);return n.Dom.append(h,d),n.Dom.safeInsertNode(c,h),e.elementIsBlock&&n.Dom.isEmpty(h)&&!n.Dom.isTag(h.firstElementChild,"br")&&n.Dom.append(h,s.element("br")),h}},73154:function(e,t,i){"use strict";i.d(t,{wrap:function(){return l}});var n=i(27795),o=i(7909),r=i(80991),s=i(97110),a=i(83335);function l(e,t,i){var l,c,d;let h=(l=e,c=t,d=i,l.elementIsBlock?n.Dom.up(c,e=>n.Dom.isBlock(e)&&!n.Dom.isTag(e,u)&&!Array.from(e.childNodes).some(e=>n.Dom.isBlock(e)),d.editor)||(0,a.wrapUnwrappedText)(l,c,d):((0,o.attr)(c,"size",null),c));if(e.elementIsList)return(0,s.wrapList)(e,h,i);let p=n.Dom.replace(h,e.element,i.createInside,!0);return e.elementIsBlock&&((0,r.css)(p,"fontSize",null),(0,r.css)(p,"fontWeight",null),(0,o.attr)(p,"style")||(0,o.attr)(p,"style",null)),p}let u=new Set(["td","th","tr","tbody","table","li","ul","ol"]);i.d(t,["WRAP_NODES",0,u])},96127:function(e,t,i){"use strict";i.d(t,{ApplyStyle:function(){return s}});var n=i(51640),o=i(98394),r=i(78462);function s(e,t){var i;let{s:s,editor:a}=e;null==(i=a.firstChild)||i.normalize();let l=s.fakes(),u=s.isCollapsed(),c=o.INITIAL;try{for(let i of s.wrapInTagGen(l)){let o={collapsed:u,mode:c,element:i,next:r.states.START,jodit:e,style:t},s=new n.FiniteStateMachine(r.states.START,r.transactions);for(;!e.isInDestruct&&s.getState()!==r.states.END;)o=s.dispatch("exec",o);c=o.mode}}finally{s.restoreFakes(l)}}},84578:function(e,t,i){"use strict";i.d(t,{CommitStyle:function(){return l}});var n=i(25045),o=i(81937),r=i(57821),s=i(98394),a=i(96127);class l{isApplied(e,t){let i=this.__applyMap.get(e);return!!i&&!!i[t]}setApplied(e,t){var i;let n=null!=(i=this.__applyMap.get(e))?i:{};n[t]=!0,this.__applyMap.set(e,n)}get elementIsList(){return!!(this.options.element&&o.LIST_TAGS.has(this.options.element))}get element(){return this.options.element||this.defaultTag}get elementIsBlock(){return!!(this.options.element&&o.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(e){let{hooks:t}=this.options,i=t?Object.keys(t):[];try{i.forEach(i=>{e.e.on((0,r.camelCase)(s._PREFIX+"_"+i),t[i])}),(0,a.ApplyStyle)(e,this)}finally{i.forEach(i=>{e.e.off((0,r.camelCase)(s._PREFIX+"_"+i),t[i])}),this.__applyMap=new WeakMap}e.isInDestruct||(e.synchronizeValues(),e.e.fire("afterCommitStyle",this))}constructor(e){(0,n._)(this,"options",void 0),(0,n._)(this,"__applyMap",void 0),this.options=e,this.__applyMap=new WeakMap}}},98394:function(e,t,i){"use strict";i.d(t,["INITIAL",0,"initial","REPLACE",0,"replace","_PREFIX",0,"commitStyle"])},78462:function(e,t,i){"use strict";var n=i(81937),o=i(23211),r=i(28712),s=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"},u={[l.START]:{exec(e){let{element:t,jodit:i,style:n,mode:r,collapsed:a}=e;if(!o.Dom.isContentEditable(t,i.editor)||(0,s.isInsideInvisibleElement)(t,i.editor)||!a&&o.Dom.isEmptyContent(t))return{...e,next:l.END};let u=(0,s.getSuitParent)(n,t,i.editor)||(0,s.getSuitChild)(n,t);if(u)return{...e,next:l.ELEMENT,element:u};let c=(0,s.suitableClosest)(n,t,i.editor);return n.elementIsList&&o.Dom.isList(c)?{...e,next:l.LIST}:c?{...e,next:l.EXTRACT}:{...e,next:"unwrap"!==r?l.UNWRAP_CHILDREN:l.END}}},[l.LIST]:{exec(e){let{element:t,jodit:i,mode:r}=e;if(r!==a.INITIAL&&"unwrap"!==r&&r!==a.REPLACE)return{...e,next:l.END};let s=o.Dom.closest(t,"li",i.editor);return s&&o.Dom.closest(t,n.LIST_TAGS,i.editor)?{...e,element:s,next:l.TOGGLE_LIST}:{...e,next:l.END}}},[l.TOGGLE_LIST]:{exec(e){return{...e,mode:(0,s.toggleOrderedList)(e.style,e.element,e.jodit,e.mode),next:l.END}}},[l.EXTRACT]:{exec(e){var t;let{element:i,jodit:n,style:a}=e,u=(0,s.suitableClosest)(a,i,n.editor);return((0,r.assert)(u,"This place should have an element"),!a.elementIsBlock&&(null==(t=a.options.attributes)?void 0:t.style)&&o.Dom.isBlock(u))?{...e,next:l.WRAP}:(a.elementIsBlock||(0,s.extractSelectedPart)(u,i,n),{...e,element:u,next:l.ELEMENT})}},[l.UNWRAP_CHILDREN]:{exec(e){let{element:t,style:i}=e;return(0,s.unwrapChildren)(i,t)?{...e,mode:"unwrap",next:l.END}:{...e,next:l.WRAP}}},[l.WRAP]:{exec(e){let{element:t,jodit:i,style:n}=e,o=(0,s.wrap)(n,t,i);return{...e,next:n.elementIsList?l.END:l.CHANGE,mode:"wrap",element:o}}},[l.ELEMENT]:{exec(e){let{style:t,element:i,jodit:n}=e;return(0,s.toggleAttributes)(t,i,n,a.INITIAL,!0)!==a.INITIAL?{...e,next:l.CHANGE}:o.Dom.isTag(i,t.element)?{...e,next:l.UNWRAP}:{...e,next:l.END}}},[l.CHANGE]:{exec(e){let{style:t,element:i,jodit:n,mode:r}=e,a=(0,s.toggleAttributes)(t,i,n,e.mode);return"wrap"!==r&&"unset"===a&&!i.attributes.length&&o.Dom.isTag(i,t.element)?{...e,next:l.UNWRAP}:{...e,mode:a,next:l.END}}},[l.UNWRAP]:{exec(e){let{element:t,style:i,jodit:n}=e;if(t.attributes.length&&o.Dom.isTag(t,i.element))return{...e,next:l.REPLACE_DEFAULT};let r=t.parentElement;return i.elementIsBlock&&!i.elementIsDefault&&r&&r!==n.editor&&o.Dom.isBlock(r)&&!o.Dom.isTag(r,s.WRAP_NODES)?{...e,next:l.REPLACE_DEFAULT}:(o.Dom.unwrap(t),{...e,mode:"unwrap",next:l.END})}},[l.REPLACE_DEFAULT]:{exec(e){return o.Dom.replace(e.element,e.style.defaultTag,e.jodit.createInside,!0),{...e,mode:a.REPLACE,next:l.END}}},[l.END]:{exec(e){return e}}};i.d(t,["states",0,l,"transactions",0,u])},8006:function(e,t,i){"use strict";i.d(t,{AsyncStorage:function(){return l}});var n=i(25045),o=i(57821),r=i(91162),s=i(59807),a=i(9505);class l{async set(e,t){let i=await this.provider;return await i.set((0,o.camelCase)(this.prefix+e),t),this}async delete(e){let t=await this.provider;return await t.delete((0,o.camelCase)(this.prefix+e)),this}async get(e){return(await this.provider).get((0,o.camelCase)(this.prefix+e))}async exists(e){return(await this.provider).exists((0,o.camelCase)(this.prefix+e))}async clear(){let e=await this.provider;return await e.clear(),this}async close(){let e=await this.provider;"close"in e&&"function"==typeof e.close&&await e.close()}static makeStorage(e=!1,t,i){let n,o=null==i?void 0:i.defaultProvider;return null!=o?new l(Promise.resolve(n="local"===o?(0,s.canUsePersistentStorage)("localStorage")?new s.LocalStorageProvider("Jodit_"+(t||"")):new a.MemoryStorageProvider:"memory"===o?new a.MemoryStorageProvider:o),t):("localStorage"===e||"sessionStorage"===e?(0,s.canUsePersistentStorage)(e)&&(n=new s.LocalStorageProvider("Jodit_"+(t||""),e)):("indexedDB"===e||!0===e)&&(n=(0,r.canUseIndexedDB)().then(e=>e?new r.IndexedDBProvider("Jodit_"+(t||""),"keyValueStore"):new a.MemoryStorageProvider)),n||(n=new a.MemoryStorageProvider),new l(Promise.resolve(n),t))}constructor(e,t){(0,n._)(this,"provider",void 0),(0,n._)(this,"prefix",void 0),this.provider=e,this.prefix="Jodit_",t&&(this.prefix+=t)}}},91162:function(e,t,i){"use strict";i.d(t,{IndexedDBProvider:function(){return r},canUseIndexedDB:function(){return l},clearUseIndexedDBCache:function(){return a}});var n=i(25045),o=i(81937);class r{getDB(){return this.dbPromise||(this.dbPromise=new Promise((e,t)=>{let i=indexedDB.open(this.dbName,this.DB_VERSION);i.onerror=()=>{t(i.error)},i.onsuccess=()=>{e(i.result)},i.onupgradeneeded=e=>{let t=e.target.result;t.objectStoreNames.contains(this.storeName)||t.createObjectStore(this.storeName)}})),this.dbPromise}async performTransaction(e,t){try{let i=(await this.getDB()).transaction([this.storeName],e).objectStore(this.storeName),n=t(i);return new Promise((e,t)=>{n.onsuccess=()=>{e(n.result)},n.onerror=()=>{t(n.error)}})}catch(e){return Promise.reject(e)}}async set(e,t){try{await this.performTransaction("readwrite",i=>i.put(t,e))}catch(e){o.IS_PROD}return this}async delete(e){try{await this.performTransaction("readwrite",t=>t.delete(e))}catch(e){}return this}async get(e){try{return await this.performTransaction("readonly",t=>t.get(e))}catch(e){return}}async exists(e){try{let t=await this.performTransaction("readonly",t=>t.get(e));return void 0!==t}catch(e){return!1}}async clear(){try{await this.performTransaction("readwrite",e=>e.clear())}catch(e){}return this}async close(){if(this.dbPromise){try{(await this.dbPromise).close()}catch(e){}this.dbPromise=null}}async keys(){try{let e=await this.performTransaction("readonly",e=>e.getAllKeys());return e&&"object"==typeof e&&"then"in e&&(e=await e),e.map(e=>String(e))}catch(e){return[]}}async values(){try{let e=await this.performTransaction("readonly",e=>e.getAll());return e&&"object"==typeof e&&"then"in e&&(e=await e),e}catch(e){return[]}}async entries(){try{let[e,t]=await Promise.all([this.keys(),this.values()]);return e.map((e,i)=>[e,t[i]])}catch(e){return[]}}constructor(e="JoditDB",t="keyValueStore"){(0,n._)(this,"dbName",void 0),(0,n._)(this,"dbPromise",void 0),(0,n._)(this,"DB_VERSION",void 0),(0,n._)(this,"storeName",void 0),this.dbName=e,this.dbPromise=null,this.DB_VERSION=1,this.storeName=t}}let s=null;function a(){s=null}async function l(){if(null!=s)return s;try{if("u"<typeof indexedDB)return s=!1,!1;let e="___Jodit___"+Math.random().toString(),t=indexedDB.open(e);return s=await new Promise(i=>{t.onerror=()=>{i(!1)},t.onsuccess=()=>{indexedDB.deleteDatabase(e),i(!0)}})}catch(e){return s=!1,!1}}},59807:function(e,t,i){"use strict";i.d(t,{LocalStorageProvider:function(){return o}});var n=i(25045);class o{get storage(){return"sessionStorage"===this.strategy?sessionStorage:localStorage}set(e,t){try{let i=this.storage.getItem(this.rootKey),n=i?JSON.parse(i):{};n[e]=t,this.storage.setItem(this.rootKey,JSON.stringify(n))}catch(e){}return this}delete(e){try{let t=this.storage.getItem(this.rootKey);if(t){let i=JSON.parse(t);delete i[e],this.storage.setItem(this.rootKey,JSON.stringify(i))}}catch(e){}return this}get(e){try{let t=this.storage.getItem(this.rootKey),i=t?JSON.parse(t):{};return void 0!==i[e]?i[e]:void 0}catch(e){}}exists(e){return null!=this.get(e)}clear(){try{this.storage.removeItem(this.rootKey)}catch(e){}return this}constructor(e,t="localStorage"){(0,n._)(this,"rootKey",void 0),(0,n._)(this,"strategy",void 0),this.rootKey=e,this.strategy=t}}i.d(t,["canUsePersistentStorage",0,(e="localStorage")=>{let t=new Map;if(t.has(e))return t.get(e);let i="___Jodit___"+Math.random().toString(),n="sessionStorage"===e?sessionStorage:localStorage;try{n.setItem(i,"1");let o="1"===n.getItem(i);return n.removeItem(i),t.set(e,o),o}catch(e){}return t.set(e,!1),!1}])},9505:function(e,t,i){"use strict";i.d(t,{MemoryStorageProvider:function(){return o}});var n=i(25045);class o{set(e,t){return this.data.set(e,t),this}delete(e){return this.data.delete(e),this}get(e){return this.data.get(e)}exists(e){return this.data.has(e)}clear(){return this.data.clear(),this}constructor(){(0,n._)(this,"data",new Map)}}},25222:function(e,t,i){"use strict";i.d(t,{AsyncStorage:function(){return n.AsyncStorage},IndexedDBProvider:function(){return o.IndexedDBProvider},LocalStorageProvider:function(){return r.LocalStorageProvider},MemoryStorageProvider:function(){return s.MemoryStorageProvider},Storage:function(){return a.Storage},StorageKey:function(){return"Jodit_"},canUseIndexedDB:function(){return o.canUseIndexedDB},canUsePersistentStorage:function(){return r.canUsePersistentStorage},clearUseIndexedDBCache:function(){return o.clearUseIndexedDBCache}});var n=i(8006),o=i(91162),r=i(59807),s=i(9505),a=i(24475)},24475:function(e,t,i){"use strict";i.d(t,{Storage:function(){return l}});var n=i(25045),o=i(57821),r=i(59807),s=i(9505);let a="Jodit_";class l{set(e,t){return this.provider.set((0,o.camelCase)(this.prefix+e),t),this}delete(e){return this.provider.delete((0,o.camelCase)(this.prefix+e)),this}get(e){return this.provider.get((0,o.camelCase)(this.prefix+e))}exists(e){return this.provider.exists((0,o.camelCase)(this.prefix+e))}clear(){return this.provider.clear(),this}static makeStorage(e=!1,t){let i;return"localStorage"===e||"sessionStorage"===e?(0,r.canUsePersistentStorage)(e)&&(i=new r.LocalStorageProvider(a+(t||""),e)):!0===e&&(0,r.canUsePersistentStorage)("localStorage")&&(i=new r.LocalStorageProvider(a+(t||""))),i||(i=new s.MemoryStorageProvider),new l(i,t)}constructor(e,t){(0,n._)(this,"provider",void 0),(0,n._)(this,"prefix",void 0),this.provider=e,this.prefix=a,t&&(this.prefix+=t)}}},80512:function(e,t,i){"use strict";i.d(t,{Dlgs:function(){return a}});var n=i(28077),o=i(28686),r=i(71125),s=i(37333);class a{dlg(e){let t=(0,n.getPopupViewRoot)(this.o,this.container,this.od.body),i=new s.Dialog({language:this.o.language,shadowRoot:this.o.shadowRoot,popupRoot:t,ownerWindow:this.o.ownerWindow,defaultTimeout:this.o.defaultTimeout,direction:this.o.direction,theme:this.o.theme,globalFullSize:this.o.globalFullSize,...e});return(0,r.markOwner)(this,i.container),i.parent=this,i.bindDestruct(this)}confirm(e,t,i){return e=l(e,this),t=l(t,this),s.Confirm.call(this.dlg({closeOnClickOverlay:!0}),e,t,i)}prompt(e,t,i,n,o){return e=l(e,this),t=l(t,this),n=l(n,this),s.Prompt.call(this.dlg({closeOnClickOverlay:!0}),e,t,i,n,o)}alert(e,t,i,n){return e=l(e,this),t=l(t,this),s.Alert.call(this.dlg({closeOnClickOverlay:!0}),e,t,i,n)}}function l(e,t){return(0,o.isString)(e)&&!(0,o.isHTML)(e)&&(e=t.i18n(e)),e}},23183:function(e,t,i){"use strict";i.d(t,{Elms:function(){return o}});var n=i(23211);class o{getElm(e){let t=this.getFullElName(e);return n.Dom.first(this.container,e=>n.Dom.isHTMLElement(e)&&e.classList.contains(t))}getElms(e){let t=this.getFullElName(e),i=[];return n.Dom.each(this.container,e=>{n.Dom.isHTMLElement(e)&&e.classList.contains(t)&&i.push(e)}),i}}},81987:function(e,t,i){"use strict";i.d(t,{Mods:function(){return o}});var n=i(18303);class o{afterSetMod(e,t){}setMod(e,t,i){e=e.toLowerCase();let o=this.mods[e];if(o===t)return this;let r=`${this.componentName}_${e}_`,s=(i||this.container).classList;return null!=o&&s.remove(`${r}${o.toString().toLowerCase()}`),(0,n.isVoid)(t)||""===t||s.add(`${r}${t.toString().toLowerCase()}`),this.mods[e]=t,this.afterSetMod(e,t),this}getMod(e){var t;return null!=(t=this.mods[e])?t:null}}},53681:function(e,t,i){"use strict";i.d(t,{Button:function(){return v},UIButton:function(){return _}});var n=i(25045),o=i(31635),r=i(69364),s=i(51676),a=i(91672),l=i(68616),u=i(23211),c=i(91565),d=i(85932),h=i(28712),p=i(7909),m=i(96007),f=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 m.UIElement{className(){return"UIButton"}setState(e){return Object.assign(this.state,e),this}get text(){let e=this.getElm("text");return(0,h.assert)(e,"Text element not found"),e}get icon(){let e=this.getElm("icon");return(0,h.assert)(e,"Icon element not found"),e}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 e=(0,a.getComponentClass)("UIList"),t=this.closest(e);if(t){this.state.size=t.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 e=this.state.tooltip?this.jodit.i18n(this.state.tooltip):null;this.get("j.o.useNativeTooltip")&&(0,p.attr)(this.container,"title",e),(0,p.attr)(this.container,"aria-label",e),this.updateAriaLabel()}updateAriaLabel(){let e=this.state.text.trim().length>0,t=this.state.tooltip?this.jodit.i18n(this.state.tooltip):null;(0,p.attr)(this.container,"aria-label",t),(0,p.attr)(this.button,"aria-label",e?null:t)}onChangeTabIndex(){(0,p.attr)(this.container,"tabindex",this.state.tabIndex)}onChangeIcon(){let e=this.get("j.o.textIcons");if(!0===e||(0,c.isFunction)(e)&&e(this.state.name))return;u.Dom.detach(this.icon);let t=f.Icon.makeIcon(this.j,this.state.icon);t&&u.Dom.append(this.icon,t)}focus(){this.container.focus()}isFocused(){let{activeElement:e}=this.od;return!!(e&&u.Dom.isOrContains(this.container,e))}createContainer(){let e=this.componentName,t=this.j.c.element("button",{class:e,type:"button",role:"button",ariaPressed:!1}),i=this.j.c.span(e+"__icon"),n=this.j.c.span(e+"__text");return u.Dom.append(t,i),u.Dom.append(t,n),t}destruct(){return this.j.e.off(this),this.j.e.off(this.container),super.destruct()}onAction(e){return this.actionHandlers.push(e),this}__onActionFire(e){e.buffer={actionTrigger:this},this.actionHandlers.forEach(t=>t.call(this,e)),this.j.e.fire(this,"click",e)}constructor(e,t){super(e),(0,n._)(this,"isButton",!0),(0,n._)(this,"state",g()),(0,n._)(this,"button",void 0),(0,n._)(this,"actionHandlers",[]),this.button=this.container,this.updateSize(),this.onChangeSize(),this.onChangeStatus(),t&&this.hookStatus(r.STATUSES.ready,()=>{this.setState(t)})}}function v(e,t,i,n){let o=new _(e);return o.state.tabIndex=e.o.allowTabNavigation?0:-1,(0,d.isString)(t)?(o.state.icon.name=t,o.state.name=t,n&&(o.state.variant=n),i&&(o.state.text=i)):o.setState(t),o}(0,o.__decorate)([s.cache],_.prototype,"text",null),(0,o.__decorate)([s.cache],_.prototype,"icon",null),(0,o.__decorate)([(0,l.watch)("state.size",{immediately:!1})],_.prototype,"onChangeSize",null),(0,o.__decorate)([(0,l.watch)("state.type",{immediately:!1})],_.prototype,"onChangeType",null),(0,o.__decorate)([(0,l.watch)("state.role",{immediately:!1})],_.prototype,"onChangeRole",null),(0,o.__decorate)([(0,l.watch)("parentElement")],_.prototype,"updateSize",null),(0,o.__decorate)([(0,l.watch)("state.variant",{immediately:!1})],_.prototype,"onChangeStatus",null),(0,o.__decorate)([(0,l.watch)("state.text",{immediately:!1})],_.prototype,"onChangeText",null),(0,o.__decorate)([(0,l.watch)("state.text",{immediately:!1})],_.prototype,"onChangeTextSetMode",null),(0,o.__decorate)([(0,l.watch)("state.disabled")],_.prototype,"onChangeDisabled",null),(0,o.__decorate)([(0,l.watch)("state.activated")],_.prototype,"onChangeActivated",null),(0,o.__decorate)([(0,l.watch)("state.name",{immediately:!1})],_.prototype,"onChangeName",null),(0,o.__decorate)([(0,l.watch)("state.tooltip",{immediately:!1})],_.prototype,"onChangeTooltip",null),(0,o.__decorate)([(0,l.watch)("state.tabIndex",{immediately:!1})],_.prototype,"onChangeTabIndex",null),(0,o.__decorate)([(0,l.watch)("state.icon",{immediately:!1})],_.prototype,"onChangeIcon",null),(0,o.__decorate)([s.cacheHTML],_.prototype,"createContainer",null),(0,o.__decorate)([(0,l.watch)("button:click")],_.prototype,"__onActionFire",null),_=(0,o.__decorate)([a.component],_),i.d(t,["UIButtonState",0,g])},15367:function(e,t,i){"use strict";i.d(t,{UIButtonGroup:function(){return c}});var n=i(25045),o=i(31635),r=i(91672),s=i(23211),a=i(28712),l=i(53681),u=i(63468);class c extends u.UIGroup{className(){return"UIButtonGroup"}render(e){return`<div>
9
9
  <div class="&__label">~${e.label}~</div>
10
10
  <div class="&__options"></div>
11
11
  </div>`}appendChildToContainer(e){let t=this.getElm("options");(0,a.assert)(null!=t,"Options does not exist"),s.Dom.append(t,e)}select(e){var t,i;this.elements.forEach((t,i)=>{i===e||t.state.value===e?t.state.activated=!0:this.options.radio&&(t.state.activated=!1)});let n=this.elements.filter(e=>e.state.activated).map(e=>({text:e.state.text,value:e.state.value}));this.jodit.e.fire(this,"select",n),null==(t=(i=this.options).onChange)||t.call(i,n)}constructor(e,t={radio:!0}){var i,o;super(e,null==(o=t.options)?void 0:o.map(t=>{let i=new l.UIButton(e,{text:t.text,value:t.value,variant:"primary"});return i.onAction(()=>{this.select(t.value)}),i}),t),(0,n._)(this,"options",void 0),this.options=t,this.select(null!=(i=t.value)?i:0)}}c=(0,o.__decorate)([r.component],c)},59400:function(e,t,i){"use strict";i.d(t,{Button:function(){return n.Button},UIButton:function(){return n.UIButton},UIButtonGroup:function(){return o.UIButtonGroup},UIButtonState:function(){return n.UIButtonState},UITooltip:function(){return r.UITooltip}});var n=i(53681),o=i(15367),r=i(95399)},95399:function(e,t,i){"use strict";i.d(t,{UITooltip:function(){return f}});var n=i(25045),o=i(31635),r=i(16964),s=i(84839),a=i(27795),l=i(28077),u=i(2373),c=i(23599),d=i(93640),h=i(96007);let p=["scroll.tooltip","joditCloseDialog","mouseleave.tooltip"],m=["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(e){a.Dom.append((0,l.getContainer)(this.j,f),this.container),this.__attachedContainers.add(e),this.__attachedContainers.add(this.j.container),this.j.e.on(e,"mouseenter.tooltip",this.__onMouseEnter,{capture:!0}).on(e,"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 e=this.j;e.e.on(e.ow,p,this.__hide).on(m,this.__hide)}__removeListenersOnLeave(){if(!this.__listenClose)return;this.__listenClose=!1;let e=this.j;e.e.off(e.ow,p,this.__hide).off(m,this.__hide)}__onMouseLeave(e){this.__currentTarget===e.target&&(this.__hideDelay(),this.__currentTarget=null)}__onMouseEnter(e){if(!a.Dom.isHTMLElement(e.target))return;let t=(0,d.attr)(e.target,"aria-label");if(!t||(0,d.attr)(e.target,"disabled")||!e.target.className.includes("jodit"))return;this.__currentTarget=e.target;let i=e.target;this.__open(()=>{let e=(0,c.position)(i);return{x:e.left+e.width/2,y:e.top+e.height}},t)}__open(e,t){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(e,t),i):this.__show(e,t)}__show(e,t){this.setMod("visible",!0),this.setMod("above",!1),this.getElm("content").innerHTML=t;let i=e(),n=(0,u.getFixedPositionOffset)(this.container);(0,d.css)(this.container,{left:i.x-n.x,top:i.y-n.y});let o=(0,c.position)(this.container),r=this.j.ow.innerHeight;if(o.top+o.height>r){let e=(0,c.position)(this.__currentTarget);this.setMod("above",!0),(0,d.css)(this.container,{top:e.top-o.height-n.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),a.Dom.detach(this.getElm("content")),(0,d.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(e=>{this.j.e.off(e,"mouseenter.tooltip",this.__onMouseEnter).off(e,"mouseleave.tooltip",this.__onMouseLeave)}),this.__hide(),super.destruct()}constructor(e){super(e),(0,n._)(this,"__isOpened",!1),(0,n._)(this,"__attachedContainers",new Set),(0,n._)(this,"__listenClose",!1),(0,n._)(this,"__currentTarget",null),(0,n._)(this,"__delayShowTimeout",0),(0,n._)(this,"__hideTimeout",0),e.o.textIcons||!e.o.showTooltip||e.o.useNativeTooltip||(this.j.e.on("getContainer",e=>{this.__onAttach(e)}),e.hookStatus(r.STATUSES.ready,()=>{this.__onAttach(this.j.container)}))}}(0,o.__decorate)([s.autobind],f.prototype,"__onMouseLeave",null),(0,o.__decorate)([s.autobind],f.prototype,"__onMouseEnter",null),(0,o.__decorate)([s.autobind],f.prototype,"__hide",null),(0,o.__decorate)([s.autobind],f.prototype,"__hideDelay",null),f=(0,o.__decorate)([s.component],f)},96007:function(e,t,i){"use strict";i.d(t,{UIElement:function(){return p}});var n=i(25045),o=i(31635),r=i(16964),s=i(24968),a=i(23211),l=i(85932),u=i(7909),c=i(23183),d=i(81987),h=i(29434);class p extends r.ViewComponent{getRole(){var e;return(null==(e=this.options)?void 0:e.role)||""}get parentElement(){return this.__parentElement}set parentElement(e){this.__parentElement=e,e&&e.hookStatus("beforeDestruct",()=>this.destruct()),this.updateParentElement(this)}bubble(e){let t=this.parentElement;for(;t;)e(t),t=t.parentElement;return this}updateParentElement(e){var t;return null==(t=this.__parentElement)||t.updateParentElement(e),this}get(e,t){return super.get(e,t)||this.getElm(e)}closest(e){let t="object"==typeof e?t=>t===e:t=>r.Component.isInstanceOf(t,e),i=this.__parentElement;for(;i;){if(t(i))return i;i=!i.parentElement&&i.container.parentElement?p.closestElement(i.container.parentElement,p):i.parentElement}return null}static closestElement(e,t){let i=a.Dom.up(e,e=>{if(e){let{component:i}=e;return i&&r.Component.isInstanceOf(i,t)}return!1});return i?null==i?void 0:i.component:null}update(){}appendTo(e){return a.Dom.append(e,this.container),this}clearName(e){return e.replace(/[^a-zA-Z0-9]/g,"_")}render(e){return this.j.c.div(this.componentName)}createContainer(e){let t=this.render(e);if((0,l.isString)(t)){let e=this.parseTemplate(t);return e.classList.add(this.componentName),e}return t}parseTemplate(e){return this.j.c.fromHTML(e.replace(/\*([^*]+?)\*/g,(e,t)=>h.Icon.get(t)||"").replace(/&_/g,this.componentName+"_").replace(/~([^~]+?)~/g,(e,t)=>this.i18n(t)))}destruct(){return a.Dom.safeRemove(this.container),this.parentElement=null,super.destruct()}constructor(e,t){super(e),(0,n._)(this,"container",void 0),(0,n._)(this,"name",""),(0,n._)(this,"options",void 0),(0,n._)(this,"__parentElement",null),(0,n._)(this,"mods",{}),this.options=t,this.container=this.createContainer(t);let i=this.getRole();i&&(0,u.attr)(this.container,"role",i),Object.defineProperty(this.container,"component",{value:this,configurable:!0})}}p=(0,o.__decorate)([(0,s.derive)(d.Mods,c.Elms)],p)},4561:function(e,t,i){"use strict";i.d(t,{UIBlock:function(){return l}});var n=i(25045),o=i(31635),r=i(91672),s=i(93640),a=i(63468);class l extends a.UIGroup{className(){return"UIBlock"}constructor(e,t,i={align:"left"}){super(e,t),(0,n._)(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,s.attr)(this.container,"data-ref",i.ref),(0,s.attr)(this.container,"ref",i.ref)}}l=(0,o.__decorate)([r.component],l)},98838:function(e,t,i){"use strict";i.d(t,{UIForm:function(){return c}});var n=i(31635),o=i(80251),r=i(91672),s=i(93640),a=i(65273),l=i(49999),u=i(63468);class c extends u.UIGroup{className(){return"UIForm"}submit(){this.j.e.fire(this.container,"submit")}validate(){for(let e of this.allChildren.filter(e=>o.Component.isInstanceOf(e,a.UIInput)))if(!e.validate())return!1;for(let e of this.allChildren.filter(e=>o.Component.isInstanceOf(e,l.UISelect)))if(!e.validate())return!1;return!0}onSubmit(e){return this.j.e.on(this.container,"submit",()=>{let t=this.allChildren.filter(e=>o.Component.isInstanceOf(e,a.UIInput));return!!this.validate()&&(e(t.reduce((e,t)=>(e[t.state.name]=t.value,e),{})),!1)}),this}createContainer(){let e=this.j.c.element("form");return e.classList.add(this.componentName),(0,s.attr)(e,"dir",this.j.o.direction||"auto"),(0,s.attr)(e,"novalidate",""),e}constructor(...e){var t,i;super(...e),(null==(t=this.options)?void 0:t.className)&&this.container.classList.add(null==(i=this.options)?void 0:i.className)}}c=(0,n.__decorate)([r.component],c)},5658:function(e,t,i){"use strict";i.d(t,{UIBlock:function(){return n.UIBlock},UICheckbox:function(){return r.UICheckbox},UIFileInput:function(){return r.UIFileInput},UIForm:function(){return o.UIForm},UIInput:function(){return r.UIInput},UISelect:function(){return r.UISelect},UITextArea:function(){return r.UITextArea}});var n=i(4561),o=i(98838),r=i(2602)},87329:function(e,t,i){"use strict";i.d(t,{UITextArea:function(){return u}});var n=i(25045),o=i(31635),r=i(84839),s=i(91672),a=i(80991),l=i(65273);class u extends l.UIInput{className(){return"UITextArea"}createNativeInput(e){return this.j.create.element("textarea")}onChangeStateSize(){let{size:e,resizable:t}=this.state;(0,a.css)(this.nativeInput,"resize",t?"auto":"none"),this.nativeInput.rows=null!=e?e:5}constructor(e,t){super(e,t),(0,n._)(this,"state",{...u.defaultState}),Object.assign(this.state,t),!1===this.state.resizable&&(0,a.css)(this.nativeInput,"resize","none")}}(0,n._)(u,"defaultState",{...l.UIInput.defaultState,size:5,resizable:!0}),(0,o.__decorate)([(0,r.watch)(["state.size","state.resizable"])],u.prototype,"onChangeStateSize",null),u=(0,o.__decorate)([s.component],u)},24641:function(e,t,i){"use strict";i.d(t,{UICheckbox:function(){return l}});var n=i(25045),o=i(31635),r=i(84839),s=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 e=this.getElm("switch-slider");this.state.switch?(e||(e=this.j.c.div(this.getFullElName("switch-slider"))),s.Dom.after(this.nativeInput,e)):s.Dom.safeRemove(e)}constructor(e,t){super(e,{...t,type:"checkbox"}),(0,n._)(this,"state",{...l.defaultState}),Object.assign(this.state,t)}}(0,n._)(l,"defaultState",{...a.UIInput.defaultState,checked:!1,switch:!1}),(0,o.__decorate)([(0,r.watch)("state.checked"),(0,r.hook)("ready")],l.prototype,"onChangeChecked",null),(0,o.__decorate)([(0,r.watch)("nativeInput:change")],l.prototype,"onChangeNativeCheckBox",null),(0,o.__decorate)([(0,r.watch)("state.switch"),(0,r.hook)("ready")],l.prototype,"onChangeSwitch",null),l=(0,o.__decorate)([r.component],l)},75587:function(e,t,i){"use strict";i.d(t,{UIFileInput:function(){return u}});var n=i(25045),o=i(31635),r=i(91672),s=i(23211),a=i(53681),l=i(65273);class u extends l.UIInput{className(){return"UIFileInput"}createContainer(e){this.button=new a.UIButton(this.j,{tooltip:e.tooltip,icon:{name:"plus"}});let{container:t}=this.button;this.nativeInput||(this.nativeInput=this.createNativeInput(e));let{nativeInput:i}=this;return i.classList.add(this.getFullElName("input")),t.classList.add(this.componentName),s.Dom.append(t,i),t}createNativeInput(e){return this.j.create.fromHTML(`<input
@@ -215,13 +215,13 @@
215
215
  body {
216
216
  -webkit-print-color-adjust: exact;
217
217
  }
218
- }`,o.Dom.append(n.document.head,t),n.focus(),n.print()}},mode:n.MODE_SOURCE+n.MODE_WYSIWYG,tooltip:"Print"},r.pluginSystem.add("print",function(e){e.registerButton({name:"print"})})},59758:function(e,t,i){"use strict";var n=i(25045),o=i(81937),r=i(28077),s=i(18855),a=i(29434),l=i(5266),u=i(34045),c=i.n(u),d=i(39199),h=i.n(d);a.Icon.set("redo",c()).set("undo",h()),l.Config.prototype.controls.redo={mode:o.MODE_SPLIT,isDisabled:e=>!e.history.canRedo(),tooltip:"Redo"},l.Config.prototype.controls.undo={mode:o.MODE_SPLIT,isDisabled:e=>!e.history.canUndo(),tooltip:"Undo"};class p extends s.Plugin{beforeDestruct(){}afterInit(e){let t=t=>(e.history[t](),!1);e.registerCommand("redo",{exec:t,hotkeys:["ctrl+y","ctrl+shift+z","cmd+y","cmd+shift+z"]}),e.registerCommand("undo",{exec:t,hotkeys:["ctrl+z","cmd+z"]})}constructor(...e){super(...e),(0,n._)(this,"buttons",[{name:"undo",group:"history"},{name:"redo",group:"history"}])}}r.pluginSystem.add("redoUndo",p)},51822:function(e,t,i){"use strict";i(5266).Config.prototype.tableAllowCellResize=!0},14248:function(e,t,i){"use strict";var n=i(25045),o=i(31635),r=i(81937),s=i(84839),a=i(23211),l=i(28077),u=i(65946),c=i(80991),d=i(60936);i(51822);let h="table_processor_observer-resize";class p extends d.Plugin{get module(){return this.j.getInstance("Table",this.j.o)}get isRTL(){return"rtl"===this.j.o.direction}showResizeHandle(){this.j.async.clearTimeout(this.hideTimeout),a.Dom.append(this.j.workplace,this.resizeHandler)}hideResizeHandle(){this.hideTimeout=this.j.async.setTimeout(()=>{a.Dom.safeRemove(this.resizeHandler)},{timeout:this.j.defaultTimeout,label:"hideResizer"})}onHandleMouseDown(e){let t;if(!this.j.isLocked){if(this.drag=!0,this.j.e.on(this.j.ow,"mouseup.resize-cells touchend.resize-cells",this.onMouseUp).on(this.j.ew,"mousemove.table touchmove.table",this.onMouseMove),this.startX=e.clientX,this.j.lock(h),this.resizeHandler.classList.add("jodit-table-resizer_moved"),this.minX=0,this.maxX=1e6,null!=this.wholeTable){let e=this.workTable.parentNode.getBoundingClientRect();this.minX=e.left,this.maxX=this.minX+e.width}else{let e=this.module.formalCoordinate(this.workTable,this.workCell,!0);this.module.formalMatrix(this.workTable,(i,n,o)=>{e[1]===o&&(t=i.getBoundingClientRect(),this.minX=Math.max(t.left+r.NEARBY/2,this.minX)),e[1]+(this.isRTL?-1:1)===o&&(t=i.getBoundingClientRect(),this.maxX=Math.min(t.left+t.width-r.NEARBY/2,this.maxX))})}return!1}}onMouseMove(e){if(!this.drag)return;this.j.e.fire("closeAllPopups");let t=e.clientX,i=(0,u.offset)(this.resizeHandler.parentNode||this.j.od.documentElement,this.j,this.j.od,!0);t<this.minX&&(t=this.minX),t>this.maxX&&(t=this.maxX),this.resizeDelta=t-this.startX+(this.j.o.iframe?i.left:0),(0,c.css)(this.resizeHandler,"left",t-(this.j.o.iframe?0:i.left)+"px");let n=this.j.s.sel;n&&n.removeAllRanges()}onMouseUp(e){(this.selectMode||this.drag)&&(this.selectMode=!1,this.j.unlock()),this.resizeHandler&&this.drag&&(this.drag=!1,this.j.e.off(this.j.ew,"mousemove.table touchmove.table",this.onMouseMove),this.resizeHandler.classList.remove("jodit-table-resizer_moved"),this.startX!==e.clientX&&(null==this.wholeTable?this.resizeColumns():this.resizeTable()),this.j.synchronizeValues(),this.j.s.focus())}resizeColumns(){let e=this.resizeDelta,t=[],i=this.module;i.setColumnWidthByDelta(this.workTable,i.formalCoordinate(this.workTable,this.workCell,!0)[1],e,!0,t);let n=(0,u.call)(this.isRTL?a.Dom.prev:a.Dom.next,this.workCell,a.Dom.isCell,this.workCell.parentNode);i.setColumnWidthByDelta(this.workTable,i.formalCoordinate(this.workTable,n)[1],-e,!1,t)}resizeTable(){let e=this.resizeDelta*(this.isRTL?-1:1),t=this.workTable.offsetWidth,i=(0,u.getContentWidth)(this.workTable.parentNode,this.j.ew),n=!this.wholeTable;if(this.isRTL?!n:n)(0,c.css)(this.workTable,"width",(t+e)/i*100+"%");else{let n=this.isRTL?"marginRight":"marginLeft",o=parseInt(this.j.ew.getComputedStyle(this.workTable)[n]||"0",10);(0,c.css)(this.workTable,{width:(t-e)/i*100+"%",[n]:(o+e)/i*100+"%"})}}setWorkCell(e,t=null){this.wholeTable=t,this.workCell=e,this.workTable=a.Dom.up(e,e=>a.Dom.isTag(e,"table"),this.j.editor)}calcHandlePosition(e,t,i=0,n=0){let o=(0,u.offset)(t,this.j,this.j.ed);if(i>r.NEARBY&&i<o.width-r.NEARBY)return void this.hideResizeHandle();let s=(0,u.offset)(this.j.workplace,this.j,this.j.od,!0),l=(0,u.offset)(e,this.j,this.j.ed);if((0,c.css)(this.resizeHandler,"left",(i<=r.NEARBY?o.left:o.left+o.width)-s.left+n+"px"),Object.assign(this.resizeHandler.style,{height:l.height+"px",top:l.top-s.top+"px"}),this.showResizeHandle(),i<=r.NEARBY){let e=(0,u.call)(this.isRTL?a.Dom.next:a.Dom.prev,t,a.Dom.isCell,t.parentNode);this.setWorkCell(e||t,!e||null)}else{let e=(0,u.call)(this.isRTL?a.Dom.prev:a.Dom.next,t,a.Dom.isCell,t.parentNode);this.setWorkCell(t,!!e&&null)}}afterInit(e){e.o.tableAllowCellResize&&e.e.off(this.j.ow,".resize-cells").off(".resize-cells").on("change.resize-cells afterCommand.resize-cells afterSetMode.resize-cells",()=>{(0,u.$$)("table",e.editor).forEach(this.observe)}).on(this.j.ow,"scroll.resize-cells",()=>{if(!this.drag)return;let t=a.Dom.up(this.workCell,e=>a.Dom.isTag(e,"table"),e.editor);if(t){let e=t.getBoundingClientRect();(0,c.css)(this.resizeHandler,"top",e.top+"px")}}).on("beforeSetMode.resize-cells",()=>{let t=this.module;t.getAllSelectedCells().forEach(i=>{t.removeSelection(i),t.normalizeTable(a.Dom.closest(i,"table",e.editor))})})}observe(e){(0,u.dataBind)(e,h)||((0,u.dataBind)(e,h,!0),this.j.e.on(e,"mouseleave.resize-cells",e=>{this.resizeHandler&&this.resizeHandler!==e.relatedTarget&&this.hideResizeHandle()}).on(e,"mousemove.resize-cells touchmove.resize-cells",this.j.async.throttle(t=>{if(this.j.isLocked)return;let i=a.Dom.up(t.target,a.Dom.isCell,e);i&&this.calcHandlePosition(e,i,t.offsetX)},{timeout:this.j.defaultTimeout})),this.createResizeHandle())}beforeDestruct(e){e.events&&(e.e.off(this.j.ow,".resize-cells"),e.e.off(".resize-cells"))}constructor(...e){super(...e),(0,n._)(this,"selectMode",!1),(0,n._)(this,"resizeDelta",0),(0,n._)(this,"resizeHandler",void 0),(0,n._)(this,"createResizeHandle",()=>{this.resizeHandler||(this.resizeHandler=this.j.c.div("jodit-table-resizer"),this.j.e.on(this.resizeHandler,"mousedown.table touchstart.table",this.onHandleMouseDown).on(this.resizeHandler,"mouseenter.table",()=>{this.j.async.clearTimeout(this.hideTimeout)}))}),(0,n._)(this,"hideTimeout",0),(0,n._)(this,"drag",!1),(0,n._)(this,"wholeTable",void 0),(0,n._)(this,"workCell",void 0),(0,n._)(this,"workTable",void 0),(0,n._)(this,"minX",0),(0,n._)(this,"maxX",0),(0,n._)(this,"startX",0)}}(0,o.__decorate)([s.autobind],p.prototype,"onHandleMouseDown",null),(0,o.__decorate)([s.autobind],p.prototype,"onMouseMove",null),(0,o.__decorate)([s.autobind],p.prototype,"onMouseUp",null),(0,o.__decorate)([s.autobind],p.prototype,"observe",null),l.pluginSystem.add("resizeCells",p)},58293:function(e,t,i){"use strict";var n=i(5266);n.Config.prototype.allowResizeX=!1,n.Config.prototype.allowResizeY=!0},72214:function(e,t,i){"use strict";var n=i(25045),o=i(31635),r=i(84839),s=i(27795),a=i(28077),l=i(65946),u=i(80991),c=i(91206),d=i(4099);i(58293);class h extends c.Plugin{afterInit(e){let{height:t,width:i,allowResizeX:n}=e.o,{allowResizeY:o}=e.o;"auto"===t&&"auto"!==i&&(o=!1),("auto"!==t||"auto"!==i)&&(n||o)&&(e.statusbar.setMod("resize-handle",!0),e.statusbar.show(),e.e.on("toggleFullSize.resizeHandler",()=>{(0,u.css)(this.handle,"display",e.isFullSize?"none":"block")}).on(this.handle,"mousedown touchstart",this.onHandleResizeStart).on(e.ow,"mouseup touchend",this.onHandleResizeEnd),s.Dom.append(e.container,this.handle))}onHandleResizeStart(e){this.isResized=!0,this.start.x=e.clientX,this.start.y=e.clientY,this.start.w=this.j.container.offsetWidth,this.start.h=this.j.container.offsetHeight,this.j.lock(),this.j.e.on(this.j.ow,"mousemove touchmove",this.onHandleResize),e.preventDefault()}onHandleResize(e){if(!this.isResized)return;let{clientX:t,clientY:i}=e;if(e.view===this.j.ew&&this.j.ew!==this.j.ow){let e=(0,l.offset)(this.j.workplace,this.j,this.j.od,!0);t+=e.left,i+=e.top}this.j.o.allowResizeY&&this.j.e.fire("setHeight",this.start.h+i-this.start.y),this.j.o.allowResizeX&&this.j.e.fire("setWidth",this.start.w+t-this.start.x),this.j.e.fire("resize")}onHandleResizeEnd(){this.isResized&&(this.isResized=!1,this.j.e.off(this.j.ow,"mousemove touchmove",this.onHandleResize),this.j.unlock())}beforeDestruct(){s.Dom.safeRemove(this.handle),this.j.e.off(this.j.ow,"mouseup touchsend",this.onHandleResizeEnd)}constructor(...e){super(...e),(0,n._)(this,"isResized",!1),(0,n._)(this,"start",{x:0,y:0,w:0,h:0}),(0,n._)(this,"handle",this.j.c.div("jodit-editor__resize",d.Icon.get("resize_handler")))}}(0,n._)(h,"requires",["size"]),(0,o.__decorate)([r.autobind],h.prototype,"onHandleResizeStart",null),(0,o.__decorate)([r.autobind],h.prototype,"onHandleResize",null),(0,o.__decorate)([r.autobind],h.prototype,"onHandleResizeEnd",null),a.pluginSystem.add("resizeHandler",h)},96608:function(e,t,i){"use strict";var n=i(5266);n.Config.prototype.allowResizeTags=new Set(["img","iframe","table","jodit"]),n.Config.prototype.resizer={showSize:!0,hideSizeTimeout:1e3,forImageChangeAttributes:!0,min_width:10,min_height:10,useAspectRatio:new Set(["img"])}},74522:function(e,t,i){"use strict";var n=i(25045),o=i(31635),r=i(81937),s=i(84839),a=i(23211),l=i(28077),u=i(65946),c=i(80991),d=i(18855);i(96608);let h="__jodit-resizer_binded";class p extends d.Plugin{afterInit(e){(0,u.$$)("div",this.rect).forEach(t=>{e.e.on(t,"mousedown.resizer touchstart.resizer",this.onStartResizing.bind(this,t))}),l.eventEmitter.on("hideHelpers",this.hide),e.e.on("readonly",e=>{e&&this.hide()}).on("afterInit changePlace",this.addEventListeners.bind(this)).on("afterGetValueFromEditor.resizer",e=>{let t=/<jodit[^>]+data-jodit_iframe_wrapper[^>]+>(.*?<iframe[^>]*>.*?<\/iframe>.*?)<\/jodit>/gi;t.test(e.value)&&(e.value=e.value.replace(t,"$1"))}),this.addEventListeners(),this.__onChangeEditor()}onEditorClick(e){let t=e.target,{editor:i,options:{allowResizeTags:n}}=this.j;for(;t&&t!==i;){if(a.Dom.isTag(t,n)){this.__bind(t),this.onClickElement(t);return}t=t.parentNode}}__afterInsertImage(e){if(this.j.o.resizer.forImageChangeAttributes)return;let t=(0,u.attr)(e,"width");t&&!(0,c.cssInline)(e,"width")&&((0,u.css)(e,"width",t),(0,u.attr)(e,"width",null))}addEventListeners(){let e=this.j;e.e.off(e.editor,".resizer").off(e.ow,".resizer").on(e.editor,"keydown.resizer",e=>{this.isShown&&e.key===r.KEY_DELETE&&this.element&&!a.Dom.isTag(this.element,"table")&&this.onDelete(e)}).on(e.ow,"resize.resizer",this.updateSize).on("resize.resizer",this.updateSize).on([e.ow,e.editor],"scroll.resizer",()=>{this.isShown&&!this.isResizeMode&&this.hide()}).on(e.ow,"keydown.resizer",this.onKeyDown).on(e.ow,"keyup.resizer",this.onKeyUp).on(e.ow,"mouseup.resizer touchend.resizer",this.onClickOutside)}onStartResizing(e,t){if(!this.element||!this.element.parentNode)return this.hide(),!1;this.handle=e,t.cancelable&&t.preventDefault(),t.stopImmediatePropagation(),this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,this.ratio=this.width/this.height,this.isResizeMode=!0,this.startX=t.clientX,this.startY=t.clientY,this.pointerX=t.clientX,this.pointerY=t.clientY;let{j:i}=this;i.e.fire("hidePopup"),i.lock(this.LOCK_KEY),i.e.on(i.ow,"mousemove.resizer touchmove.resizer",this.onResize)}onEndResizing(){let{j:e}=this;e.unlock(),this.isResizeMode=!1,this.isAltMode=!1,e.synchronizeValues(),e.e.off(e.ow,"mousemove.resizer touchmove.resizer",this.onResize)}onResize(e){if(this.isResizeMode){let t,i,n,o;if(!this.element)return;if(this.pointerX=e.clientX,this.pointerY=e.clientY,this.j.options.iframe&&e.view===this.j.ew){let n=this.getWorkplacePosition();t=e.clientX+n.left-this.startX,i=e.clientY+n.top-this.startY}else t=this.pointerX-this.startX,i=this.pointerY-this.startY;let r=this.handle.className,s=this.j.o.resizer.useAspectRatio;!this.isAltMode&&(!0===s||s&&a.Dom.isTag(this.element,s))?(t?o=Math.round((n=this.width+(r.match(/left/)?-1:1)*t)/this.ratio):n=Math.round((o=this.height+(r.match(/top/)?-1:1)*i)*this.ratio),n>(0,u.innerWidth)(this.j.editor,this.j.ow)&&(o=Math.round((n=(0,u.innerWidth)(this.j.editor,this.j.ow))/this.ratio))):(n=this.width+(r.match(/left/)?-1:1)*t,o=this.height+(r.match(/top/)?-1:1)*i),n>this.j.o.resizer.min_width&&(n<this.rect.parentNode.offsetWidth?this.applySize(this.element,"width",n):this.applySize(this.element,"width","100%")),o>this.j.o.resizer.min_height&&this.applySize(this.element,"height",o),this.updateSize(),this.showSizeViewer(this.element.offsetWidth,this.element.offsetHeight),e.stopImmediatePropagation()}}onKeyDown(e){this.isAltMode=e.key===r.KEY_ALT,!this.isAltMode&&this.isResizeMode&&this.onEndResizing()}onKeyUp(){this.isAltMode&&this.isResizeMode&&this.element&&(this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,this.ratio=this.width/this.height,this.startX=this.pointerX,this.startY=this.pointerY),this.isAltMode=!1}onClickOutside(e){if(this.isShown){if(!this.isResizeMode)return this.hide();e.stopImmediatePropagation(),this.onEndResizing()}}getWorkplacePosition(){return(0,u.offset)(this.rect.parentNode||this.j.od.documentElement,this.j,this.j.od,!0)}applySize(e,t,i){let n=a.Dom.isImage(e)&&this.j.o.resizer.forImageChangeAttributes;n&&(0,u.attr)(e,t,i),(!n||(0,c.cssInline)(e,t))&&(0,u.css)(e,t,i)}onDelete(e){this.element&&("JODIT"!==this.element.tagName?this.j.s.select(this.element):(a.Dom.safeRemove(this.element),this.hide(),e.preventDefault()))}__onChangeEditor(){this.isShown&&(this.element&&this.element.parentNode?this.updateSize():this.hide()),(0,u.$$)("iframe",this.j.editor).forEach(this.__bind)}__bind(e){let t;if(!(!a.Dom.isHTMLElement(e)||!this.j.o.allowResizeTags.has(e.tagName.toLowerCase())||(0,u.dataBind)(e,h))){if((0,u.dataBind)(e,h,!0),a.Dom.isTag(e,"iframe")){let i=e;a.Dom.isHTMLElement(e.parentNode)&&(0,u.attr)(e.parentNode,"-jodit_iframe_wrapper")?e=e.parentNode:(t=this.j.createInside.element("jodit",{"data-jodit-temp":1,contenteditable:!1,draggable:!0,"data-jodit_iframe_wrapper":1}),(0,u.attr)(t,"style",(0,u.attr)(e,"style")),(0,u.css)(t,{display:"inline-block"===(0,c.cssInline)(e,"display")?"inline-block":"block",width:e.offsetWidth,height:e.offsetHeight}),e.parentNode&&a.Dom.before(e,t),a.Dom.append(t,e),this.j.e.on(t,"click",()=>{(0,u.attr)(t,"data-jodit-wrapper_active",!0)}),e=t),this.j.e.off(e,"mousedown.select touchstart.select").on(e,"mousedown.select touchstart.select",()=>{this.j.s.select(e)}).off(e,"changesize").on(e,"changesize",()=>{(0,u.attr)(i,"width",e.offsetWidth+"px"),(0,u.attr)(i,"height",e.offsetHeight+"px")})}this.j.e.on(e,"dragstart",this.hide),!r.IS_ES_NEXT&&r.IS_IE&&this.j.e.on(e,"mousedown",t=>{a.Dom.isTag(e,"img")&&t.preventDefault()})}}showSizeViewer(e,t){if(this.j.o.resizer.showSize){if(e<this.sizeViewer.offsetWidth||t<this.sizeViewer.offsetHeight)return void this.hideSizeViewer();(0,u.css)(this.sizeViewer,"opacity","1"),this.sizeViewer.textContent=`${e} x ${t}`,this.j.async.setTimeout(this.hideSizeViewer,{timeout:this.j.o.resizer.hideSizeTimeout,label:"hideSizeViewer"})}}show(){this.j.o.readonly||this.isShown||(this.isShown=!0,this.rect.parentNode||((0,u.markOwner)(this.j,this.rect),a.Dom.append(this.j.workplace,this.rect)),this.j.isFullSize&&(0,u.css)(this.rect,"zIndex",(0,u.css)(this.j.container,"zIndex").toString()),this.updateSize())}hide(){this.isResizeMode||(this.isResizeMode=!1,this.isShown=!1,this.element=null,a.Dom.safeRemove(this.rect),(0,u.$$)("[data-jodit-wrapper_active='true']",this.j.editor).forEach(e=>(0,u.attr)(e,"data-jodit-wrapper_active",!1)))}beforeDestruct(e){this.hide(),l.eventEmitter.off("hideHelpers",this.hide),e.e.off(this.j.ow,".resizer").off(".resizer")}constructor(...e){super(...e),(0,n._)(this,"LOCK_KEY","resizer"),(0,n._)(this,"handle",void 0),(0,n._)(this,"element",null),(0,n._)(this,"isResizeMode",!1),(0,n._)(this,"isShown",!1),(0,n._)(this,"startX",0),(0,n._)(this,"startY",0),(0,n._)(this,"width",0),(0,n._)(this,"height",0),(0,n._)(this,"ratio",0),(0,n._)(this,"rect",this.j.c.fromHTML(`<div title="${this.j.i18n("Press Alt for custom resizing")}" class="jodit-resizer">
218
+ }`,o.Dom.append(n.document.head,t),n.focus(),n.print()}},mode:n.MODE_SOURCE+n.MODE_WYSIWYG,tooltip:"Print"},r.pluginSystem.add("print",function(e){e.registerButton({name:"print"})})},59758:function(e,t,i){"use strict";var n=i(25045),o=i(81937),r=i(28077),s=i(18855),a=i(29434),l=i(5266),u=i(34045),c=i.n(u),d=i(39199),h=i.n(d);a.Icon.set("redo",c()).set("undo",h()),l.Config.prototype.controls.redo={mode:o.MODE_SPLIT,isDisabled:e=>!e.history.canRedo(),tooltip:"Redo"},l.Config.prototype.controls.undo={mode:o.MODE_SPLIT,isDisabled:e=>!e.history.canUndo(),tooltip:"Undo"};class p extends s.Plugin{beforeDestruct(){}afterInit(e){let t=t=>(e.history[t](),!1);e.registerCommand("redo",{exec:t,hotkeys:["ctrl+y","ctrl+shift+z","cmd+y","cmd+shift+z"]}),e.registerCommand("undo",{exec:t,hotkeys:["ctrl+z","cmd+z"]})}constructor(...e){super(...e),(0,n._)(this,"buttons",[{name:"undo",group:"history"},{name:"redo",group:"history"}])}}r.pluginSystem.add("redoUndo",p)},51822:function(e,t,i){"use strict";i(5266).Config.prototype.tableAllowCellResize=!0},14248:function(e,t,i){"use strict";var n=i(25045),o=i(31635),r=i(81937),s=i(84839),a=i(23211),l=i(28077),u=i(65946),c=i(80991),d=i(60936);i(51822);let h="table_processor_observer-resize";class p extends d.Plugin{get module(){return this.j.getInstance("Table",this.j.o)}get isRTL(){return"rtl"===this.j.o.direction}showResizeHandle(){this.j.async.clearTimeout(this.hideTimeout),a.Dom.append(this.j.workplace,this.resizeHandler)}hideResizeHandle(){this.hideTimeout=this.j.async.setTimeout(()=>{a.Dom.safeRemove(this.resizeHandler)},{timeout:this.j.defaultTimeout,label:"hideResizer"})}onHandleMouseDown(e){let t;if(!this.j.isLocked){if(this.drag=!0,this.j.e.on(this.j.ow,"mouseup.resize-cells touchend.resize-cells",this.onMouseUp).on(this.j.ew,"mousemove.table touchmove.table",this.onMouseMove),this.startX=e.clientX,this.j.lock(h),this.resizeHandler.classList.add("jodit-table-resizer_moved"),this.minX=0,this.maxX=1e6,null!=this.wholeTable){let e=this.workTable.parentNode.getBoundingClientRect();this.minX=e.left,this.maxX=this.minX+e.width}else{let e=this.module.formalCoordinate(this.workTable,this.workCell,!0);this.module.formalMatrix(this.workTable,(i,n,o)=>{e[1]===o&&(t=i.getBoundingClientRect(),this.minX=Math.max(t.left+r.NEARBY/2,this.minX)),e[1]+(this.isRTL?-1:1)===o&&(t=i.getBoundingClientRect(),this.maxX=Math.min(t.left+t.width-r.NEARBY/2,this.maxX))})}return!1}}onMouseMove(e){if(!this.drag)return;this.j.e.fire("closeAllPopups");let t=e.clientX,i=(0,u.offset)(this.resizeHandler.parentNode||this.j.od.documentElement,this.j,this.j.od,!0);t<this.minX&&(t=this.minX),t>this.maxX&&(t=this.maxX),this.resizeDelta=t-this.startX+(this.j.o.iframe?i.left:0),(0,c.css)(this.resizeHandler,"left",t-(this.j.o.iframe?0:i.left)+"px");let n=this.j.s.sel;n&&n.removeAllRanges()}onMouseUp(e){(this.selectMode||this.drag)&&(this.selectMode=!1,this.j.unlock()),this.resizeHandler&&this.drag&&(this.drag=!1,this.j.e.off(this.j.ew,"mousemove.table touchmove.table",this.onMouseMove),this.resizeHandler.classList.remove("jodit-table-resizer_moved"),this.startX!==e.clientX&&(null==this.wholeTable?this.resizeColumns():this.resizeTable()),this.j.synchronizeValues(),this.j.s.focus())}resizeColumns(){let e=this.resizeDelta,t=[],i=this.module;i.setColumnWidthByDelta(this.workTable,i.formalCoordinate(this.workTable,this.workCell,!0)[1],e,!0,t);let n=(0,u.call)(this.isRTL?a.Dom.prev:a.Dom.next,this.workCell,a.Dom.isCell,this.workCell.parentNode);i.setColumnWidthByDelta(this.workTable,i.formalCoordinate(this.workTable,n)[1],-e,!1,t)}resizeTable(){let e=this.resizeDelta*(this.isRTL?-1:1),t=this.workTable.offsetWidth,i=(0,u.getContentWidth)(this.workTable.parentNode,this.j.ew),n=!this.wholeTable;if(this.isRTL?!n:n)(0,c.css)(this.workTable,"width",(t+e)/i*100+"%");else{let n=this.isRTL?"marginRight":"marginLeft",o=parseInt(this.j.ew.getComputedStyle(this.workTable)[n]||"0",10);(0,c.css)(this.workTable,{width:(t-e)/i*100+"%",[n]:(o+e)/i*100+"%"})}}setWorkCell(e,t=null){this.wholeTable=t,this.workCell=e,this.workTable=a.Dom.up(e,e=>a.Dom.isTag(e,"table"),this.j.editor)}calcHandlePosition(e,t,i=0,n=0){let o=(0,u.offset)(t,this.j,this.j.ed);if(i>r.NEARBY&&i<o.width-r.NEARBY)return void this.hideResizeHandle();let s=(0,u.offset)(this.j.workplace,this.j,this.j.od,!0),l=(0,u.offset)(e,this.j,this.j.ed);if((0,c.css)(this.resizeHandler,"left",(i<=r.NEARBY?o.left:o.left+o.width)-s.left+n+"px"),Object.assign(this.resizeHandler.style,{height:l.height+"px",top:l.top-s.top+"px"}),this.showResizeHandle(),i<=r.NEARBY){let e=(0,u.call)(this.isRTL?a.Dom.next:a.Dom.prev,t,a.Dom.isCell,t.parentNode);this.setWorkCell(e||t,!e||null)}else{let e=(0,u.call)(this.isRTL?a.Dom.prev:a.Dom.next,t,a.Dom.isCell,t.parentNode);this.setWorkCell(t,!!e&&null)}}afterInit(e){e.o.tableAllowCellResize&&e.e.off(this.j.ow,".resize-cells").off(".resize-cells").on("change.resize-cells afterCommand.resize-cells afterSetMode.resize-cells",()=>{(0,u.$$)("table",e.editor).forEach(this.observe)}).on(this.j.ow,"scroll.resize-cells",()=>{if(!this.drag)return;let t=a.Dom.up(this.workCell,e=>a.Dom.isTag(e,"table"),e.editor);if(t){let e=t.getBoundingClientRect();(0,c.css)(this.resizeHandler,"top",e.top+"px")}}).on("beforeSetMode.resize-cells",()=>{let t=this.module;t.getAllSelectedCells().forEach(i=>{t.removeSelection(i),t.normalizeTable(a.Dom.closest(i,"table",e.editor))})})}observe(e){(0,u.dataBind)(e,h)||((0,u.dataBind)(e,h,!0),this.j.e.on(e,"mouseleave.resize-cells",e=>{this.resizeHandler&&this.resizeHandler!==e.relatedTarget&&this.hideResizeHandle()}).on(e,"mousemove.resize-cells touchmove.resize-cells",this.j.async.throttle(t=>{if(this.j.isLocked)return;let i=a.Dom.up(t.target,a.Dom.isCell,e);i&&this.calcHandlePosition(e,i,t.offsetX)},{timeout:this.j.defaultTimeout})),this.createResizeHandle())}beforeDestruct(e){e.events&&(e.e.off(this.j.ow,".resize-cells"),e.e.off(".resize-cells"))}constructor(...e){super(...e),(0,n._)(this,"selectMode",!1),(0,n._)(this,"resizeDelta",0),(0,n._)(this,"resizeHandler",void 0),(0,n._)(this,"createResizeHandle",()=>{this.resizeHandler||(this.resizeHandler=this.j.c.div("jodit-table-resizer"),this.j.e.on(this.resizeHandler,"mousedown.table touchstart.table",this.onHandleMouseDown).on(this.resizeHandler,"mouseenter.table",()=>{this.j.async.clearTimeout(this.hideTimeout)}))}),(0,n._)(this,"hideTimeout",0),(0,n._)(this,"drag",!1),(0,n._)(this,"wholeTable",void 0),(0,n._)(this,"workCell",void 0),(0,n._)(this,"workTable",void 0),(0,n._)(this,"minX",0),(0,n._)(this,"maxX",0),(0,n._)(this,"startX",0)}}(0,o.__decorate)([s.autobind],p.prototype,"onHandleMouseDown",null),(0,o.__decorate)([s.autobind],p.prototype,"onMouseMove",null),(0,o.__decorate)([s.autobind],p.prototype,"onMouseUp",null),(0,o.__decorate)([s.autobind],p.prototype,"observe",null),l.pluginSystem.add("resizeCells",p)},58293:function(e,t,i){"use strict";var n=i(5266);n.Config.prototype.allowResizeX=!1,n.Config.prototype.allowResizeY=!0},72214:function(e,t,i){"use strict";var n=i(25045),o=i(31635),r=i(84839),s=i(27795),a=i(28077),l=i(65946),u=i(80991),c=i(91206),d=i(4099);i(58293);class h extends c.Plugin{afterInit(e){let{height:t,width:i,allowResizeX:n}=e.o,{allowResizeY:o}=e.o;"auto"===t&&"auto"!==i&&(o=!1),("auto"!==t||"auto"!==i)&&(n||o)&&(e.statusbar.setMod("resize-handle",!0),e.statusbar.show(),e.e.on("toggleFullSize.resizeHandler",()=>{(0,u.css)(this.handle,"display",e.isFullSize?"none":"block")}).on(this.handle,"mousedown touchstart",this.onHandleResizeStart).on(e.ow,"mouseup touchend",this.onHandleResizeEnd),s.Dom.append(e.container,this.handle))}onHandleResizeStart(e){this.isResized=!0,this.start.x=e.clientX,this.start.y=e.clientY,this.start.w=this.j.container.offsetWidth,this.start.h=this.j.container.offsetHeight,this.j.lock(),this.j.e.on(this.j.ow,"mousemove touchmove",this.onHandleResize),e.preventDefault()}onHandleResize(e){if(!this.isResized)return;let{clientX:t,clientY:i}=e;if(e.view===this.j.ew&&this.j.ew!==this.j.ow){let e=(0,l.offset)(this.j.workplace,this.j,this.j.od,!0);t+=e.left,i+=e.top}this.j.o.allowResizeY&&this.j.e.fire("setHeight",this.start.h+i-this.start.y),this.j.o.allowResizeX&&this.j.e.fire("setWidth",this.start.w+t-this.start.x),this.j.e.fire("resize")}onHandleResizeEnd(){this.isResized&&(this.isResized=!1,this.j.e.off(this.j.ow,"mousemove touchmove",this.onHandleResize),this.j.unlock())}beforeDestruct(){s.Dom.safeRemove(this.handle),this.j.e.off(this.j.ow,"mouseup touchsend",this.onHandleResizeEnd)}constructor(...e){super(...e),(0,n._)(this,"isResized",!1),(0,n._)(this,"start",{x:0,y:0,w:0,h:0}),(0,n._)(this,"handle",this.j.c.div("jodit-editor__resize",d.Icon.get("resize_handler")))}}(0,n._)(h,"requires",["size"]),(0,o.__decorate)([r.autobind],h.prototype,"onHandleResizeStart",null),(0,o.__decorate)([r.autobind],h.prototype,"onHandleResize",null),(0,o.__decorate)([r.autobind],h.prototype,"onHandleResizeEnd",null),a.pluginSystem.add("resizeHandler",h)},96608:function(e,t,i){"use strict";var n=i(5266);n.Config.prototype.allowResizeTags=new Set(["img","iframe","table","jodit"]),n.Config.prototype.resizer={showSize:!0,hideSizeTimeout:1e3,forImageChangeAttributes:!0,min_width:10,min_height:10,useAspectRatio:new Set(["img"])}},74522:function(e,t,i){"use strict";var n=i(25045),o=i(31635),r=i(81937),s=i(84839),a=i(23211),l=i(28077),u=i(65946),c=i(80991),d=i(18855);i(96608);let h="__jodit-resizer_binded";function p(e,t){var i;let n=null==(i=(0,u.attr)(e,t))?void 0:i.trim();return n&&/^\d+(\.\d+)?(px)?$/i.test(n)?parseFloat(n):0}class m extends d.Plugin{afterInit(e){(0,u.$$)("div",this.rect).forEach(t=>{e.e.on(t,"mousedown.resizer touchstart.resizer",this.onStartResizing.bind(this,t))}),l.eventEmitter.on("hideHelpers",this.hide),e.e.on("readonly",e=>{e&&this.hide()}).on("afterInit changePlace",this.addEventListeners.bind(this)).on("afterGetValueFromEditor.resizer",e=>{let t=/<jodit[^>]+data-jodit_iframe_wrapper[^>]+>(.*?<iframe[^>]*>.*?<\/iframe>.*?)<\/jodit>/gi;t.test(e.value)&&(e.value=e.value.replace(t,"$1"))}),this.addEventListeners(),this.__onChangeEditor()}onEditorClick(e){let t=e.target,{editor:i,options:{allowResizeTags:n}}=this.j;for(;t&&t!==i;){if(a.Dom.isTag(t,n)){this.__bind(t),this.onClickElement(t);return}t=t.parentNode}}__afterInsertImage(e){if(this.j.o.resizer.forImageChangeAttributes)return;let t=(0,u.attr)(e,"width");t&&!(0,c.cssInline)(e,"width")&&((0,u.css)(e,"width",t),(0,u.attr)(e,"width",null))}addEventListeners(){let e=this.j;e.e.off(e.editor,".resizer").off(e.ow,".resizer").on(e.editor,"keydown.resizer",e=>{this.isShown&&e.key===r.KEY_DELETE&&this.element&&!a.Dom.isTag(this.element,"table")&&this.onDelete(e)}).on(e.ow,"resize.resizer",this.updateSize).on("resize.resizer",this.updateSize).on([e.ow,e.editor],"scroll.resizer",()=>{this.isShown&&!this.isResizeMode&&this.hide()}).on(e.ow,"keydown.resizer",this.onKeyDown).on(e.ow,"keyup.resizer",this.onKeyUp).on(e.ow,"mouseup.resizer touchend.resizer",this.onClickOutside)}onStartResizing(e,t){if(!this.element||!this.element.parentNode)return this.hide(),!1;this.handle=e,t.cancelable&&t.preventDefault(),t.stopImmediatePropagation(),this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,this.ratio=this.width/this.height,this.isResizeMode=!0,this.startX=t.clientX,this.startY=t.clientY,this.pointerX=t.clientX,this.pointerY=t.clientY;let{j:i}=this;i.e.fire("hidePopup"),i.lock(this.LOCK_KEY),i.e.on(i.ow,"mousemove.resizer touchmove.resizer",this.onResize)}onEndResizing(){let{j:e}=this;e.unlock(),this.isResizeMode=!1,this.isAltMode=!1,e.synchronizeValues(),e.e.off(e.ow,"mousemove.resizer touchmove.resizer",this.onResize)}onResize(e){if(this.isResizeMode){let t,i,n,o;if(!this.element)return;if(this.pointerX=e.clientX,this.pointerY=e.clientY,this.j.options.iframe&&e.view===this.j.ew){let n=this.getWorkplacePosition();t=e.clientX+n.left-this.startX,i=e.clientY+n.top-this.startY}else t=this.pointerX-this.startX,i=this.pointerY-this.startY;let r=this.handle.className,s=this.j.o.resizer.useAspectRatio;!this.isAltMode&&(!0===s||s&&a.Dom.isTag(this.element,s))?(t?o=Math.round((n=this.width+(r.match(/left/)?-1:1)*t)/this.ratio):n=Math.round((o=this.height+(r.match(/top/)?-1:1)*i)*this.ratio),n>(0,u.innerWidth)(this.j.editor,this.j.ow)&&(o=Math.round((n=(0,u.innerWidth)(this.j.editor,this.j.ow))/this.ratio))):(n=this.width+(r.match(/left/)?-1:1)*t,o=this.height+(r.match(/top/)?-1:1)*i),n>this.j.o.resizer.min_width&&(n<this.rect.parentNode.offsetWidth?this.applySize(this.element,"width",n):this.applySize(this.element,"width","100%")),o>this.j.o.resizer.min_height&&this.applySize(this.element,"height",o),this.updateSize(),this.showSizeViewer(this.element.offsetWidth,this.element.offsetHeight),e.stopImmediatePropagation()}}onKeyDown(e){this.isAltMode=e.key===r.KEY_ALT,!this.isAltMode&&this.isResizeMode&&this.onEndResizing()}onKeyUp(){this.isAltMode&&this.isResizeMode&&this.element&&(this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,this.ratio=this.width/this.height,this.startX=this.pointerX,this.startY=this.pointerY),this.isAltMode=!1}onClickOutside(e){if(this.isShown){if(!this.isResizeMode)return this.hide();e.stopImmediatePropagation(),this.onEndResizing()}}getWorkplacePosition(){return(0,u.offset)(this.rect.parentNode||this.j.od.documentElement,this.j,this.j.od,!0)}applySize(e,t,i){let n=a.Dom.isImage(e)&&this.j.o.resizer.forImageChangeAttributes;n&&(0,u.attr)(e,t,i),(!n||(0,c.cssInline)(e,t))&&(0,u.css)(e,t,i)}onDelete(e){this.element&&("JODIT"!==this.element.tagName?this.j.s.select(this.element):(a.Dom.safeRemove(this.element),this.hide(),e.preventDefault()))}__onChangeEditor(){this.isShown&&(this.element&&this.element.parentNode?this.updateSize():this.hide()),(0,u.$$)("iframe",this.j.editor).forEach(this.__bind)}__bind(e){let t;if(!(!a.Dom.isHTMLElement(e)||!this.j.o.allowResizeTags.has(e.tagName.toLowerCase())||(0,u.dataBind)(e,h))){if((0,u.dataBind)(e,h,!0),a.Dom.isTag(e,"iframe")){let i=e;if(a.Dom.isHTMLElement(e.parentNode)&&(0,u.attr)(e.parentNode,"-jodit_iframe_wrapper"))e=e.parentNode;else{t=this.j.createInside.element("jodit",{"data-jodit-temp":1,contenteditable:!1,draggable:!0,"data-jodit_iframe_wrapper":1}),(0,u.attr)(t,"style",(0,u.attr)(e,"style"));let i=e.offsetWidth||p(e,"width"),n=e.offsetHeight||p(e,"height");(0,u.css)(t,{display:"inline-block"===(0,c.cssInline)(e,"display")?"inline-block":"block"}),i&&(0,u.css)(t,"width",i),n&&(0,u.css)(t,"height",n),e.parentNode&&a.Dom.before(e,t),a.Dom.append(t,e),this.j.e.on(t,"click",()=>{(0,u.attr)(t,"data-jodit-wrapper_active",!0)}),e=t}this.j.e.off(e,"mousedown.select touchstart.select").on(e,"mousedown.select touchstart.select",()=>{this.j.s.select(e)}).off(e,"changesize").on(e,"changesize",()=>{(0,u.attr)(i,"width",e.offsetWidth+"px"),(0,u.attr)(i,"height",e.offsetHeight+"px")})}this.j.e.on(e,"dragstart",this.hide),!r.IS_ES_NEXT&&r.IS_IE&&this.j.e.on(e,"mousedown",t=>{a.Dom.isTag(e,"img")&&t.preventDefault()})}}showSizeViewer(e,t){if(this.j.o.resizer.showSize){if(e<this.sizeViewer.offsetWidth||t<this.sizeViewer.offsetHeight)return void this.hideSizeViewer();(0,u.css)(this.sizeViewer,"opacity","1"),this.sizeViewer.textContent=`${e} x ${t}`,this.j.async.setTimeout(this.hideSizeViewer,{timeout:this.j.o.resizer.hideSizeTimeout,label:"hideSizeViewer"})}}show(){this.j.o.readonly||this.isShown||(this.isShown=!0,this.rect.parentNode||((0,u.markOwner)(this.j,this.rect),a.Dom.append(this.j.workplace,this.rect)),this.j.isFullSize&&(0,u.css)(this.rect,"zIndex",(0,u.css)(this.j.container,"zIndex").toString()),this.updateSize())}hide(){this.isResizeMode||(this.isResizeMode=!1,this.isShown=!1,this.element=null,a.Dom.safeRemove(this.rect),(0,u.$$)("[data-jodit-wrapper_active='true']",this.j.editor).forEach(e=>(0,u.attr)(e,"data-jodit-wrapper_active",!1)))}beforeDestruct(e){this.hide(),l.eventEmitter.off("hideHelpers",this.hide),e.e.off(this.j.ow,".resizer").off(".resizer")}constructor(...e){super(...e),(0,n._)(this,"LOCK_KEY","resizer"),(0,n._)(this,"handle",void 0),(0,n._)(this,"element",null),(0,n._)(this,"isResizeMode",!1),(0,n._)(this,"isShown",!1),(0,n._)(this,"startX",0),(0,n._)(this,"startY",0),(0,n._)(this,"width",0),(0,n._)(this,"height",0),(0,n._)(this,"ratio",0),(0,n._)(this,"rect",this.j.c.fromHTML(`<div title="${this.j.i18n("Press Alt for custom resizing")}" class="jodit-resizer">
219
219
  <div class="jodit-resizer__top-left"></div>
220
220
  <div class="jodit-resizer__top-right"></div>
221
221
  <div class="jodit-resizer__bottom-right"></div>
222
222
  <div class="jodit-resizer__bottom-left"></div>
223
223
  <span>100x100</span>
224
- </div>`)),(0,n._)(this,"sizeViewer",this.rect.getElementsByTagName("span")[0]),(0,n._)(this,"pointerX",0),(0,n._)(this,"pointerY",0),(0,n._)(this,"isAltMode",!1),(0,n._)(this,"onClickElement",e=>{!this.isResizeMode&&(this.element===e&&this.isShown||(this.element=e,this.show(),a.Dom.isTag(this.element,"img")&&!this.element.complete&&this.j.e.one(this.element,"load",this.updateSize)))}),(0,n._)(this,"updateSize",()=>{if(!this.isInDestruct&&this.isShown&&this.element&&this.rect){let e=this.getWorkplacePosition(),t=(0,u.offset)(this.element,this.j,this.j.ed),i=parseInt((0,c.cssInline)(this.rect,"left")||"0",10),n=parseInt((0,c.cssInline)(this.rect,"top")||"0",10),o=this.rect.offsetWidth,r=this.rect.offsetHeight,s=t.top-e.top,a=t.left-e.left;(n!==s||i!==a||o!==this.element.offsetWidth||r!==this.element.offsetHeight)&&((0,u.css)(this.rect,{top:s,left:a,width:this.element.offsetWidth,height:this.element.offsetHeight}),this.j.events&&(this.j.e.fire(this.element,"changesize"),isNaN(i)||this.j.e.fire("resize")))}}),(0,n._)(this,"hideSizeViewer",()=>{(0,u.css)(this.sizeViewer,"opacity","0")})}}(0,o.__decorate)([(0,s.watch)(":click")],p.prototype,"onEditorClick",null),(0,o.__decorate)([(0,s.watch)(":afterInsertImage")],p.prototype,"__afterInsertImage",null),(0,o.__decorate)([s.autobind],p.prototype,"onStartResizing",null),(0,o.__decorate)([s.autobind],p.prototype,"onEndResizing",null),(0,o.__decorate)([s.autobind],p.prototype,"onResize",null),(0,o.__decorate)([s.autobind],p.prototype,"onKeyDown",null),(0,o.__decorate)([s.autobind],p.prototype,"onKeyUp",null),(0,o.__decorate)([s.autobind],p.prototype,"onClickOutside",null),(0,o.__decorate)([(0,s.watch)(":change")],p.prototype,"__onChangeEditor",null),(0,o.__decorate)([s.autobind],p.prototype,"__bind",null),(0,o.__decorate)([s.autobind,(0,s.watch)(":hideResizer")],p.prototype,"hide",null),l.pluginSystem.add("resizer",p)},12266:function(e,t,i){"use strict";var n=i(81937),o=i(29434),r=i(5266),s=i(21917),a=i.n(s);r.Config.prototype.useSearch=!0,r.Config.prototype.search={lazyIdleTimeout:0,useCustomHighlightAPI:n.globalWindow&&void 0!==n.globalWindow.Highlight},o.Icon.set("search",a()),r.Config.prototype.controls.find={tooltip:"Find",icon:"search",exec(e,t,{control:i}){switch(i.args&&i.args[0]){case"findPrevious":e.e.fire("searchPrevious");break;case"findNext":e.e.fire("searchNext");break;case"replace":e.execCommand("openReplaceDialog");break;default:e.execCommand("openSearchDialog")}},list:{search:"Find",findNext:"Find Next",findPrevious:"Find Previous",replace:"Replace"},childTemplate:(e,t,i)=>i}},19213:function(e,t,i){"use strict";i.d(t,{clearSelectionWrappers:function(){return h},clearSelectionWrappersFromHTML:function(){return p},getSelectionWrappers:function(){return d},highlightTextRanges:function(){return c}});var n=i(81937),o=i(23211),r=i(28723);let s="jd-tmp-selection",a="background-color: var(--jd-color-background-selection); color: var(--jd-color-text-selection);",l=new WeakSet;function u(e,t){if(l.has(e))return;l.add(e);let i=t?`::highlight(jodit-search-result) { ${a} }`:`[${s}] { ${a} }`;try{let t=new CSSStyleSheet;t.insertRule(i),e.adoptedStyleSheets=[...e.adoptedStyleSheets,t]}catch(n){let t=e.createElement("style");t.textContent=i,o.Dom.append(e.head,t)}}function c(e,t,i,r,a){if(null==t.startContainer.nodeValue||null==t.endContainer.nodeValue||function(e,t,i){if(e.o.search.useCustomHighlightAPI&&n.globalWindow&&void 0!==n.globalWindow.Highlight){let n=[t,...i].map(t=>{let i=e.selection.createRange();return i.setStart(t.startContainer,t.startOffset),i.setEnd(t.endContainer,t.endOffset),i});u(e.ed,!0);let o=new Highlight(...n);return CSS.highlights.clear(),CSS.highlights.set("jodit-search-result",o),i.length=0,!0}return!1}(e,t,i))return;u(e.ed,!1);let l=r.element("span",{[s]:!0});o.Dom.markTemporary(l),function(e,t,i){let n=e.startContainer.nodeValue,r=0;if(0!==e.startOffset){let t=i.text(n.substring(0,e.startOffset));e.startContainer.nodeValue=n.substring(e.startOffset),o.Dom.before(e.startContainer,t),e.startContainer===e.endContainer&&(r=e.startOffset,e.endOffset-=r),e.startOffset=0}let s=e.endContainer.nodeValue;if(e.endOffset!==s.length){let n=i.text(s.substring(e.endOffset));for(let i of(e.endContainer.nodeValue=s.substring(0,e.endOffset),o.Dom.after(e.endContainer,n),t))if(i.startContainer===e.endContainer)i.startContainer=n,i.startOffset=i.startOffset-e.endOffset-r,i.endContainer===e.endContainer&&(i.endContainer=n,i.endOffset=i.endOffset-e.endOffset-r);else break;e.endOffset=e.endContainer.nodeValue.length}}(t,i,r);let c=t.startContainer;do{var d;if(!c||(o.Dom.isText(c)&&(d=c.parentNode,!(o.Dom.isElement(d)&&d.hasAttribute(s)))&&o.Dom.wrap(c,l.cloneNode(),r),c===t.endContainer))break;let e=c.firstChild||c.nextSibling;if(!e){for(;c&&!c.nextSibling&&c!==a;)c=c.parentNode;e=null==c?void 0:c.nextSibling}c=e}while(c&&c!==a)}function d(e){return(0,r.$$)(`[${s}]`,e)}function h(e){d(e.editor).forEach(e=>o.Dom.unwrap(e)),e.o.search.useCustomHighlightAPI&&n.globalWindow&&void 0!==n.globalWindow.Highlight&&CSS.highlights.clear()}function p(e){return e.replace(RegExp(`<span[^>]+${s}[^>]+>(.*?)</span>`,"g"),"$1")}},87624:function(e,t,i){"use strict";i.d(t,{SentenceFinder:function(){return o.SentenceFinder},clearSelectionWrappers:function(){return n.clearSelectionWrappers},clearSelectionWrappersFromHTML:function(){return n.clearSelectionWrappersFromHTML},getSelectionWrappers:function(){return n.getSelectionWrappers},highlightTextRanges:function(){return n.highlightTextRanges}});var n=i(19213),o=i(59276)},59276:function(e,t,i){"use strict";i.d(t,{SentenceFinder:function(){return r}});var n=i(25045),o=i(57626);class r{add(e){var t;let i=(null!=(t=e.nodeValue)?t:"").toLowerCase();if(!i.length)return;let n=this.value.length;this.queue.push({startIndex:n,endIndex:n+i.length,node:e}),this.value+=i}ranges(e,t=0){let i=[],n=t,o,r=0;do if([n,o]=this.searchIndex(e,this.value,n),-1!==n){let e,t=0,s,a=0;for(let i=r;i<this.queue.length;i+=1)if(!e&&this.queue[i].endIndex>n&&(e=this.queue[i].node,t=n-this.queue[i].startIndex),e&&this.queue[i].endIndex>=n+o){s=this.queue[i].node,a=n+o-this.queue[i].startIndex,r=i;break}e&&s&&i.push({startContainer:e,startOffset:t,endContainer:s,endOffset:a}),n+=o}while(-1!==n);return 0===i.length?null:i}constructor(e=o.fuzzySearchIndex){(0,n._)(this,"searchIndex",void 0),(0,n._)(this,"queue",void 0),(0,n._)(this,"value",void 0),this.searchIndex=e,this.queue=[],this.value=""}}},30500:function(e,t,i){"use strict";var n=i(25045),o=i(31635),r=i(81937),s=i(84839),a=i(27795),l=i(28077),u=i(65946),c=i(91206);i(12266);var d=i(87624),h=i(58317);class p extends c.Plugin{get ui(){return new h.UISearch(this.j)}async updateCounters(){this.ui.isOpened&&(this.ui.count=await this.calcCounts(this.ui.query))}onPressReplaceButton(){this.findAndReplace(this.ui.query),this.updateCounters()}tryScrollToElement(e){let t=a.Dom.closest(e,a.Dom.isElement,this.j.editor);t||(t=a.Dom.prev(e,a.Dom.isElement,this.j.editor)),t&&t!==this.j.editor&&(0,u.scrollIntoViewIfNeeded)(t,this.j.editor,this.j.ed)}async calcCounts(e){return(await this.findQueryBounds(e,"walkerCount")).length}async findQueryBounds(e,t){let i=this[t];return i&&i.break(),i=new a.LazyWalker(this.j.async,{timeout:this.j.o.search.lazyIdleTimeout}),this[t]=i,this.find(i,e).catch(e=>(r.IS_PROD,[]))}async findAndReplace(e){let t=await this.findQueryBounds(e,"walker");if(!t.length)return!1;let i=this.findCurrentIndexInRanges(t,this.j.s.range);-1===i&&(i=0);let n=t[i];if(n){try{let t=this.j.ed.createRange();t.setStart(n.startContainer,n.startOffset),t.setEnd(n.endContainer,n.endOffset),t.deleteContents();let o=this.j.createInside.text(this.ui.replace);a.Dom.safeInsertNode(t,o),(0,d.clearSelectionWrappers)(this.j),this.j.s.setCursorAfter(o),this.tryScrollToElement(o),this.cache={},this.ui.currentIndex=i,await this.findAndSelect(e,!0).catch(e=>(r.IS_PROD,null))}finally{this.j.synchronizeValues()}return this.j.e.fire("afterFindAndReplace"),!0}return!1}async findAndSelect(e,t){let i=await this.findQueryBounds(e,"walker");if(!i.length)return!1;if(this.previousQuery!==e||!(0,d.getSelectionWrappers)(this.j.editor).length){var n;null==(n=this.drawPromise)||n.rejectCallback(),this.j.async.cancelAnimationFrame(this.wrapFrameRequest),(0,d.clearSelectionWrappers)(this.j),this.drawPromise=this.__drawSelectionRanges(i)}this.previousQuery=e;let o=this.ui.currentIndex-1;o=-1===o?0:t?o===i.length-1?0:o+1:0===o?i.length-1:o-1,this.ui.currentIndex=o+1;let s=i[o];if(s){let e=this.j.ed.createRange();try{e.setStart(s.startContainer,s.startOffset),e.setEnd(s.endContainer,s.endOffset),this.j.s.selectRange(e)}catch(e){r.IS_PROD}return this.tryScrollToElement(s.startContainer),await this.updateCounters(),await this.drawPromise,this.j.e.fire("afterFindAndSelect"),!0}return!1}findCurrentIndexInRanges(e,t){return e.findIndex(e=>e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.startContainer&&e.endOffset===t.endOffset)}async isValidCache(e){return(await e).every(e=>{var t,i,n,o;return e.startContainer.isConnected&&e.startOffset<=(null!=(t=null==(n=e.startContainer.nodeValue)?void 0:n.length)?t:0)&&e.endContainer.isConnected&&e.endOffset<=(null!=(i=null==(o=e.endContainer.nodeValue)?void 0:o.length)?i:0)})}async find(e,t){if(!t.length)return[];let i=this.cache[t];return i&&await this.isValidCache(i)?i:(this.cache[t]=this.j.async.promise(i=>{let n=new d.SentenceFinder(this.j.o.search.fuzzySearch);e.on("break",()=>{i([])}).on("visit",e=>(a.Dom.isText(e)&&n.add(e),!1)).on("end",()=>{var e;i(null!=(e=n.ranges(t))?e:[])}).setWork(this.j.editor)}),this.cache[t])}__drawSelectionRanges(e){let{async:t,createInside:i,editor:n}=this.j;t.cancelAnimationFrame(this.wrapFrameRequest);let o=[...e],r,s=0;return t.promise(e=>{let a=()=>{do(r=o.shift())&&(0,d.highlightTextRanges)(this.j,r,o,i,n),s+=1;while(r&&s<=5);o.length?this.wrapFrameRequest=t.requestAnimationFrame(a):e()};a()})}onAfterGetValueFromEditor(e){e.value=(0,d.clearSelectionWrappersFromHTML)(e.value)}afterInit(e){if(e.o.useSearch){let t=this;e.e.on("beforeSetMode.search",()=>{this.ui.close()}).on(this.ui,"afterClose",()=>{(0,d.clearSelectionWrappers)(e),this.ui.currentIndex=0,this.ui.count=0,this.cache={},e.focus()}).on("click",()=>{this.ui.currentIndex=0,(0,d.clearSelectionWrappers)(e)}).on("change.search",()=>{this.cache={}}).on("keydown.search mousedown.search",e.async.debounce(()=>{this.ui.selInfo&&(e.s.removeMarkers(),this.ui.selInfo=null),this.ui.isOpened&&this.updateCounters()},e.defaultTimeout)).on("searchNext.search searchPrevious.search",()=>(this.ui.isOpened||this.ui.open(),t.findAndSelect(t.ui.query,"searchNext"===e.e.current).catch(e=>{r.IS_PROD}))).on("search.search",(e,i=!0)=>(this.ui.currentIndex=0,t.findAndSelect(e||"",i).catch(e=>{r.IS_PROD}))),e.registerCommand("search",{exec:(e,i,n=!0)=>(i&&t.findAndSelect(i,n).catch(e=>{r.IS_PROD}),!1)}).registerCommand("openSearchDialog",{exec:(e,i)=>(t.ui.open(i),!1),hotkeys:["ctrl+f","cmd+f"]}).registerCommand("openReplaceDialog",{exec:(i,n,o)=>(e.o.readonly||t.ui.open(n,o,!0),!1),hotkeys:["ctrl+h","cmd+h"]})}}beforeDestruct(e){var t;null==(t=(0,s.cached)(this,"ui"))||t.destruct(),e.e.off(".search")}constructor(...e){super(...e),(0,n._)(this,"buttons",[{name:"find",group:"search"}]),(0,n._)(this,"previousQuery",""),(0,n._)(this,"drawPromise",null),(0,n._)(this,"walker",null),(0,n._)(this,"walkerCount",null),(0,n._)(this,"cache",{}),(0,n._)(this,"wrapFrameRequest",0)}}(0,o.__decorate)([s.cache],p.prototype,"ui",null),(0,o.__decorate)([(0,s.watch)("ui:needUpdateCounters")],p.prototype,"updateCounters",null),(0,o.__decorate)([(0,s.watch)("ui:pressReplaceButton")],p.prototype,"onPressReplaceButton",null),(0,o.__decorate)([s.autobind],p.prototype,"findQueryBounds",null),(0,o.__decorate)([s.autobind],p.prototype,"findAndReplace",null),(0,o.__decorate)([s.autobind],p.prototype,"findAndSelect",null),(0,o.__decorate)([s.autobind],p.prototype,"find",null),(0,o.__decorate)([(0,s.watch)(":afterGetValueFromEditor")],p.prototype,"onAfterGetValueFromEditor",null),l.pluginSystem.add("search",p)},58317:function(e,t,i){"use strict";i.d(t,{UISearch:function(){return c}});var n=i(25045),o=i(31635),r=i(81937),s=i(84839),a=i(27795),l=i(65946),u=i(4099);class c extends u.UIElement{className(){return"UISearch"}render(){return`<div>
224
+ </div>`)),(0,n._)(this,"sizeViewer",this.rect.getElementsByTagName("span")[0]),(0,n._)(this,"pointerX",0),(0,n._)(this,"pointerY",0),(0,n._)(this,"isAltMode",!1),(0,n._)(this,"onClickElement",e=>{!this.isResizeMode&&(this.element===e&&this.isShown||(this.element=e,this.show(),a.Dom.isTag(this.element,"img")&&!this.element.complete&&this.j.e.one(this.element,"load",this.updateSize)))}),(0,n._)(this,"updateSize",()=>{if(!this.isInDestruct&&this.isShown&&this.element&&this.rect){let e=this.getWorkplacePosition(),t=(0,u.offset)(this.element,this.j,this.j.ed),i=parseInt((0,c.cssInline)(this.rect,"left")||"0",10),n=parseInt((0,c.cssInline)(this.rect,"top")||"0",10),o=this.rect.offsetWidth,r=this.rect.offsetHeight,s=t.top-e.top,a=t.left-e.left;(n!==s||i!==a||o!==this.element.offsetWidth||r!==this.element.offsetHeight)&&((0,u.css)(this.rect,{top:s,left:a,width:this.element.offsetWidth,height:this.element.offsetHeight}),this.j.events&&(this.j.e.fire(this.element,"changesize"),isNaN(i)||this.j.e.fire("resize")))}}),(0,n._)(this,"hideSizeViewer",()=>{(0,u.css)(this.sizeViewer,"opacity","0")})}}(0,o.__decorate)([(0,s.watch)(":click")],m.prototype,"onEditorClick",null),(0,o.__decorate)([(0,s.watch)(":afterInsertImage")],m.prototype,"__afterInsertImage",null),(0,o.__decorate)([s.autobind],m.prototype,"onStartResizing",null),(0,o.__decorate)([s.autobind],m.prototype,"onEndResizing",null),(0,o.__decorate)([s.autobind],m.prototype,"onResize",null),(0,o.__decorate)([s.autobind],m.prototype,"onKeyDown",null),(0,o.__decorate)([s.autobind],m.prototype,"onKeyUp",null),(0,o.__decorate)([s.autobind],m.prototype,"onClickOutside",null),(0,o.__decorate)([(0,s.watch)(":change")],m.prototype,"__onChangeEditor",null),(0,o.__decorate)([s.autobind],m.prototype,"__bind",null),(0,o.__decorate)([s.autobind,(0,s.watch)(":hideResizer")],m.prototype,"hide",null),l.pluginSystem.add("resizer",m)},12266:function(e,t,i){"use strict";var n=i(81937),o=i(29434),r=i(5266),s=i(21917),a=i.n(s);r.Config.prototype.useSearch=!0,r.Config.prototype.search={lazyIdleTimeout:0,useCustomHighlightAPI:n.globalWindow&&void 0!==n.globalWindow.Highlight},o.Icon.set("search",a()),r.Config.prototype.controls.find={tooltip:"Find",icon:"search",exec(e,t,{control:i}){switch(i.args&&i.args[0]){case"findPrevious":e.e.fire("searchPrevious");break;case"findNext":e.e.fire("searchNext");break;case"replace":e.execCommand("openReplaceDialog");break;default:e.execCommand("openSearchDialog")}},list:{search:"Find",findNext:"Find Next",findPrevious:"Find Previous",replace:"Replace"},childTemplate:(e,t,i)=>i}},19213:function(e,t,i){"use strict";i.d(t,{clearSelectionWrappers:function(){return h},clearSelectionWrappersFromHTML:function(){return p},getSelectionWrappers:function(){return d},highlightTextRanges:function(){return c}});var n=i(81937),o=i(23211),r=i(28723);let s="jd-tmp-selection",a="background-color: var(--jd-color-background-selection); color: var(--jd-color-text-selection);",l=new WeakSet;function u(e,t){if(l.has(e))return;l.add(e);let i=t?`::highlight(jodit-search-result) { ${a} }`:`[${s}] { ${a} }`;try{let t=new CSSStyleSheet;t.insertRule(i),e.adoptedStyleSheets=[...e.adoptedStyleSheets,t]}catch(n){let t=e.createElement("style");t.textContent=i,o.Dom.append(e.head,t)}}function c(e,t,i,r,a){if(null==t.startContainer.nodeValue||null==t.endContainer.nodeValue||function(e,t,i){if(e.o.search.useCustomHighlightAPI&&n.globalWindow&&void 0!==n.globalWindow.Highlight){let n=[t,...i].map(t=>{let i=e.selection.createRange();return i.setStart(t.startContainer,t.startOffset),i.setEnd(t.endContainer,t.endOffset),i});u(e.ed,!0);let o=new Highlight(...n);return CSS.highlights.clear(),CSS.highlights.set("jodit-search-result",o),i.length=0,!0}return!1}(e,t,i))return;u(e.ed,!1);let l=r.element("span",{[s]:!0});o.Dom.markTemporary(l),function(e,t,i){let n=e.startContainer.nodeValue,r=0;if(0!==e.startOffset){let t=i.text(n.substring(0,e.startOffset));e.startContainer.nodeValue=n.substring(e.startOffset),o.Dom.before(e.startContainer,t),e.startContainer===e.endContainer&&(r=e.startOffset,e.endOffset-=r),e.startOffset=0}let s=e.endContainer.nodeValue;if(e.endOffset!==s.length){let n=i.text(s.substring(e.endOffset));for(let i of(e.endContainer.nodeValue=s.substring(0,e.endOffset),o.Dom.after(e.endContainer,n),t))if(i.startContainer===e.endContainer)i.startContainer=n,i.startOffset=i.startOffset-e.endOffset-r,i.endContainer===e.endContainer&&(i.endContainer=n,i.endOffset=i.endOffset-e.endOffset-r);else break;e.endOffset=e.endContainer.nodeValue.length}}(t,i,r);let c=t.startContainer;do{var d;if(!c||(o.Dom.isText(c)&&(d=c.parentNode,!(o.Dom.isElement(d)&&d.hasAttribute(s)))&&o.Dom.wrap(c,l.cloneNode(),r),c===t.endContainer))break;let e=c.firstChild||c.nextSibling;if(!e){for(;c&&!c.nextSibling&&c!==a;)c=c.parentNode;e=null==c?void 0:c.nextSibling}c=e}while(c&&c!==a)}function d(e){return(0,r.$$)(`[${s}]`,e)}function h(e){d(e.editor).forEach(e=>o.Dom.unwrap(e)),e.o.search.useCustomHighlightAPI&&n.globalWindow&&void 0!==n.globalWindow.Highlight&&CSS.highlights.clear()}function p(e){return e.replace(RegExp(`<span[^>]+${s}[^>]+>(.*?)</span>`,"g"),"$1")}},87624:function(e,t,i){"use strict";i.d(t,{SentenceFinder:function(){return o.SentenceFinder},clearSelectionWrappers:function(){return n.clearSelectionWrappers},clearSelectionWrappersFromHTML:function(){return n.clearSelectionWrappersFromHTML},getSelectionWrappers:function(){return n.getSelectionWrappers},highlightTextRanges:function(){return n.highlightTextRanges}});var n=i(19213),o=i(59276)},59276:function(e,t,i){"use strict";i.d(t,{SentenceFinder:function(){return r}});var n=i(25045),o=i(57626);class r{add(e){var t;let i=(null!=(t=e.nodeValue)?t:"").toLowerCase();if(!i.length)return;let n=this.value.length;this.queue.push({startIndex:n,endIndex:n+i.length,node:e}),this.value+=i}ranges(e,t=0){let i=[],n=t,o,r=0;do if([n,o]=this.searchIndex(e,this.value,n),-1!==n){let e,t=0,s,a=0;for(let i=r;i<this.queue.length;i+=1)if(!e&&this.queue[i].endIndex>n&&(e=this.queue[i].node,t=n-this.queue[i].startIndex),e&&this.queue[i].endIndex>=n+o){s=this.queue[i].node,a=n+o-this.queue[i].startIndex,r=i;break}e&&s&&i.push({startContainer:e,startOffset:t,endContainer:s,endOffset:a}),n+=o}while(-1!==n);return 0===i.length?null:i}constructor(e=o.fuzzySearchIndex){(0,n._)(this,"searchIndex",void 0),(0,n._)(this,"queue",void 0),(0,n._)(this,"value",void 0),this.searchIndex=e,this.queue=[],this.value=""}}},30500:function(e,t,i){"use strict";var n=i(25045),o=i(31635),r=i(81937),s=i(84839),a=i(27795),l=i(28077),u=i(65946),c=i(91206);i(12266);var d=i(87624),h=i(58317);class p extends c.Plugin{get ui(){return new h.UISearch(this.j)}async updateCounters(){this.ui.isOpened&&(this.ui.count=await this.calcCounts(this.ui.query))}onPressReplaceButton(){this.findAndReplace(this.ui.query),this.updateCounters()}tryScrollToElement(e){let t=a.Dom.closest(e,a.Dom.isElement,this.j.editor);t||(t=a.Dom.prev(e,a.Dom.isElement,this.j.editor)),t&&t!==this.j.editor&&(0,u.scrollIntoViewIfNeeded)(t,this.j.editor,this.j.ed)}async calcCounts(e){return(await this.findQueryBounds(e,"walkerCount")).length}async findQueryBounds(e,t){let i=this[t];return i&&i.break(),i=new a.LazyWalker(this.j.async,{timeout:this.j.o.search.lazyIdleTimeout}),this[t]=i,this.find(i,e).catch(e=>(r.IS_PROD,[]))}async findAndReplace(e){let t=await this.findQueryBounds(e,"walker");if(!t.length)return!1;let i=this.findCurrentIndexInRanges(t,this.j.s.range);-1===i&&(i=0);let n=t[i];if(n){try{let t=this.j.ed.createRange();t.setStart(n.startContainer,n.startOffset),t.setEnd(n.endContainer,n.endOffset),t.deleteContents();let o=this.j.createInside.text(this.ui.replace);a.Dom.safeInsertNode(t,o),(0,d.clearSelectionWrappers)(this.j),this.j.s.setCursorAfter(o),this.tryScrollToElement(o),this.cache={},this.ui.currentIndex=i,await this.findAndSelect(e,!0).catch(e=>(r.IS_PROD,null))}finally{this.j.synchronizeValues()}return this.j.e.fire("afterFindAndReplace"),!0}return!1}async findAndSelect(e,t){let i=await this.findQueryBounds(e,"walker");if(!i.length)return!1;if(this.previousQuery!==e||!(0,d.getSelectionWrappers)(this.j.editor).length){var n;null==(n=this.drawPromise)||n.rejectCallback(),this.j.async.cancelAnimationFrame(this.wrapFrameRequest),(0,d.clearSelectionWrappers)(this.j),this.drawPromise=this.__drawSelectionRanges(i)}this.previousQuery=e;let o=this.ui.currentIndex-1;o=-1===o?0:t?o===i.length-1?0:o+1:0===o?i.length-1:o-1,this.ui.currentIndex=o+1;let s=i[o];if(s){let e=this.j.ed.createRange();try{e.setStart(s.startContainer,s.startOffset),e.setEnd(s.endContainer,s.endOffset),this.j.s.selectRange(e)}catch(e){r.IS_PROD}return this.tryScrollToElement(s.startContainer),await this.updateCounters(),await this.drawPromise,this.j.e.fire("afterFindAndSelect"),!0}return!1}findCurrentIndexInRanges(e,t){return e.findIndex(e=>e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.startContainer&&e.endOffset===t.endOffset)}async isValidCache(e){return(await e).every(e=>{var t,i,n,o;return e.startContainer.isConnected&&e.startOffset<=(null!=(t=null==(n=e.startContainer.nodeValue)?void 0:n.length)?t:0)&&e.endContainer.isConnected&&e.endOffset<=(null!=(i=null==(o=e.endContainer.nodeValue)?void 0:o.length)?i:0)})}async find(e,t){if(!t.length)return[];let i=this.cache[t];return i&&await this.isValidCache(i)?i:(this.cache[t]=this.j.async.promise(i=>{let n=new d.SentenceFinder(this.j.o.search.fuzzySearch);e.on("break",()=>{i([])}).on("visit",e=>(a.Dom.isText(e)&&n.add(e),!1)).on("end",()=>{var e;i(null!=(e=n.ranges(t))?e:[])}).setWork(this.j.editor)}),this.cache[t])}__drawSelectionRanges(e){let{async:t,createInside:i,editor:n}=this.j;t.cancelAnimationFrame(this.wrapFrameRequest);let o=[...e],r,s=0;return t.promise(e=>{let a=()=>{do(r=o.shift())&&(0,d.highlightTextRanges)(this.j,r,o,i,n),s+=1;while(r&&s<=5);o.length?this.wrapFrameRequest=t.requestAnimationFrame(a):e()};a()})}onAfterGetValueFromEditor(e){e.value=(0,d.clearSelectionWrappersFromHTML)(e.value)}afterInit(e){if(e.o.useSearch){let t=this;e.e.on("beforeSetMode.search",()=>{this.ui.close()}).on(this.ui,"afterClose",()=>{(0,d.clearSelectionWrappers)(e),this.ui.currentIndex=0,this.ui.count=0,this.cache={},e.focus()}).on("click",()=>{this.ui.currentIndex=0,(0,d.clearSelectionWrappers)(e)}).on("change.search",()=>{this.cache={}}).on("keydown.search mousedown.search",e.async.debounce(()=>{this.ui.selInfo&&(e.s.removeMarkers(),this.ui.selInfo=null),this.ui.isOpened&&this.updateCounters()},e.defaultTimeout)).on("searchNext.search searchPrevious.search",()=>(this.ui.isOpened||this.ui.open(),t.findAndSelect(t.ui.query,"searchNext"===e.e.current).catch(e=>{r.IS_PROD}))).on("search.search",(e,i=!0)=>(this.ui.currentIndex=0,t.findAndSelect(e||"",i).catch(e=>{r.IS_PROD}))),e.registerCommand("search",{exec:(e,i,n=!0)=>(i&&t.findAndSelect(i,n).catch(e=>{r.IS_PROD}),!1)}).registerCommand("openSearchDialog",{exec:(e,i)=>(t.ui.open(i),!1),hotkeys:["ctrl+f","cmd+f"]}).registerCommand("openReplaceDialog",{exec:(i,n,o)=>(e.o.readonly||t.ui.open(n,o,!0),!1),hotkeys:["ctrl+h","cmd+h"]})}}beforeDestruct(e){var t;null==(t=(0,s.cached)(this,"ui"))||t.destruct(),e.e.off(".search")}constructor(...e){super(...e),(0,n._)(this,"buttons",[{name:"find",group:"search"}]),(0,n._)(this,"previousQuery",""),(0,n._)(this,"drawPromise",null),(0,n._)(this,"walker",null),(0,n._)(this,"walkerCount",null),(0,n._)(this,"cache",{}),(0,n._)(this,"wrapFrameRequest",0)}}(0,o.__decorate)([s.cache],p.prototype,"ui",null),(0,o.__decorate)([(0,s.watch)("ui:needUpdateCounters")],p.prototype,"updateCounters",null),(0,o.__decorate)([(0,s.watch)("ui:pressReplaceButton")],p.prototype,"onPressReplaceButton",null),(0,o.__decorate)([s.autobind],p.prototype,"findQueryBounds",null),(0,o.__decorate)([s.autobind],p.prototype,"findAndReplace",null),(0,o.__decorate)([s.autobind],p.prototype,"findAndSelect",null),(0,o.__decorate)([s.autobind],p.prototype,"find",null),(0,o.__decorate)([(0,s.watch)(":afterGetValueFromEditor")],p.prototype,"onAfterGetValueFromEditor",null),l.pluginSystem.add("search",p)},58317:function(e,t,i){"use strict";i.d(t,{UISearch:function(){return c}});var n=i(25045),o=i(31635),r=i(81937),s=i(84839),a=i(27795),l=i(65946),u=i(4099);class c extends u.UIElement{className(){return"UISearch"}render(){return`<div>
225
225
  <div class="&__box">
226
226
  <div class="&__inputs">
227
227
  <input data-ref="query" tabindex="0" placeholder="~Search for~" type="text"/>