UNPKG

jodit-pro

Version:

PRO Version of Jodit Editor

8 lines 1.45 MB
/*! * jodit-pro - PRO Version of Jodit Editor * Author: Chupurnov Valerii <chupurnov@gmail.com> * Version: v4.9.27 * Url: https://xdsoft.net/jodit/pro/ * License(s): SEE LICENSE IN LICENSE.md */ !function(t,i){if("object"==typeof exports&&"object"==typeof module)module.exports=i();else if("function"==typeof define&&define.amd)define([],i);else{var n=i();for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(self,function(){var t={117:function(t,i,n){"use strict";n.d(i,{askInsertTypeDialog:function(){return c},getAllTypes:function(){return u},pasteInsertHtml:function(){return l}});var r=n(82758),o=n(2748),s=n(27613),a=n(10830);function l(t,i,n){var r;let a,l;if(i.isInDestruct)return;t&&"drop"===t.type&&i.s.insertCursorAtPoint(t.clientX,t.clientY);let u=i.e.fire("beforePasteInsert",n);!(0,s.isVoid)(u)&&((0,s.isString)(u)||(0,s.isNumber)(u)||o.Dom.isNode(u))&&(n=u),(0,s.isString)(n)&&(-1!==(a=(r=(r=n).replace(/<meta[^>]+?>/g,"")).search(/<!--StartFragment-->/i))&&(r=r.substring(a+20)),-1!==(l=r.search(/<!--EndFragment-->/i))&&(r=r.substring(0,l)),n=r),i.s.insertHTML(n)}function u(t){let i=t.types,n="";if((0,s.isArray)(i)||"[object DOMStringList]"===({}).toString.call(i))for(let t=0;t<i.length;t+=1)n+=i[t]+";";else n=(i||r.TEXT_PLAIN).toString()+";";return n}function c(t,i,n,r,o){if(!1===t.e.fire("beforeOpenPasteDialog",i,n,r,o))return;let s=t.confirm(`<div style="word-break: normal; white-space: normal">${t.i18n(i)}</div>`,t.i18n(n)),l=o.map(({text:i,value:n})=>(0,a.Button)(t,{text:i,name:i.toLowerCase(),tabIndex:0}).onAction(()=>{s.close(),r(n)}));s.e.one(s,"afterClose",()=>{t.s.isFocused()||t.s.focus()});let u=(0,a.Button)(t,{text:"Cancel",tabIndex:0}).onAction(()=>{s.close()});return s.setFooter([...l,u]),l[0].focus(),l[0].state.variant="primary",t.e.fire("afterOpenPasteDialog",s,i,n,r,o),s}},159:function(t,i,n){"use strict";n.d(i,{FileBrowserItem:function(){return o}});var r=n(21537);class o{static create(t){return t instanceof o?t:new o(t)}get path(){return(0,r.normalizePath)(this.data.source.path?this.data.source.path+"/":"/")}get imageURL(){let t=this.time||new Date().getTime().toString(),{thumbIsAbsolute:i,source:n,thumb:o,file:s}=this.data,a=o||s;return i&&a?a:(0,r.normalizeUrl)(n.baseurl,n.path,a||"")+"?_tmst="+encodeURIComponent(t)}get fileURL(){let{name:t}=this.data,{file:i,fileIsAbsolute:n,source:o}=this.data;return void 0!==i&&(t=i),n&&t?t:(0,r.normalizeUrl)(o.baseurl,o.path,t||"")}get time(){let{changed:t}=this.data;return t&&("number"==typeof t?new Date(t).toLocaleString():t)||""}get uniqueHashKey(){let t=this.data;return[t.sourceName,t.name,t.file,this.time,t.thumb].join("_").toLowerCase().replace(/[^0-9a-z\-.]/g,"-")}toJSON(){return this.data}constructor(t){this.data=t,Object.keys(t).forEach(i=>{this[i]=t[i]})}}},302:function(t,i,n){"use strict";n.d(i,{getKey:function(){return o}});var r=n(2748);let o=(t,i)=>`${r.Dom.isCell(i)?"padding":"margin"}${"rtl"===t?"Right":"Left"}`},384:function(t,i,n){"use strict";n.d(i,{sanitizeAttributes:function(){return s}});var r=n(2748),o=n(21537);function s(t,i,n){return!!(r.Dom.isElement(i)&&(0,o.sanitizeHTMLElement)(i,{safeJavaScriptLink:t.options.cleanHTML.safeJavaScriptLink,removeOnError:t.options.cleanHTML.removeOnError}))||n}},445:function(t,i){"use strict";i.default='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1792 1344v128q0 26-19 45t-45 19h-1664q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1664q26 0 45 19t19 45zm0-384v128q0 26-19 45t-45 19h-1280q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1280q26 0 45 19t19 45zm0-384v128q0 26-19 45t-45 19h-1536q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1536q26 0 45 19t19 45zm0-384v128q0 26-19 45t-45 19h-1152q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1152q26 0 45 19t19 45z"/> </svg> '},473:function(t,i,n){"use strict";n.d(i,{handleBackToList:function(){return h},handleConversationSearch:function(){return p},handleConversationSelect:function(){return d},handleToolApproval:function(){return u},handleToolDenial:function(){return c}});var r=n(77688),o=n(56075),s=n(11886),a=n(79078),l=n(82758);function u(t,i,n,a,l){return(0,r._)(function*(){let r=n.getPendingToolCalls().find(i=>i.id===t);if(!r)return null;let u=a.grantPermission(r.name,i),c=n.getCurrentConversation();return c&&(c.permissions.push(u),yield l.save(c)),n.removePendingToolCall(t),(0,s._)((0,o._)({},r),{status:"approved"})})()}function c(t,i,n,l){return(0,r._)(function*(){let r=n.getPendingToolCalls().find(t=>t.id===i);if(!r)return;let u=n.getCurrentConversation();if(!u)return;let c=u.messages.findIndex(t=>{var n;return null==(n=t.toolCalls)?void 0:n.find(t=>t.id===i)});if(-1===c)return;let d=u.messages[c],h=(0,s._)((0,o._)({},r),{result:{error:"Tool call denied by user."},status:"denied"}),p=(0,a.updateToolCallInMessage)(d,h),f=[...u.messages];f[c]=p,u=(0,s._)((0,o._)({},u),{messages:f,updated:Date.now()}),n.setCurrentConversation(u),yield l.save(u),t.e.fire("toolCallDenied.ai-assistant-pro",r),n.removePendingToolCall(i)})()}function d(t,i,n){return(0,r._)(function*(){try{n.setLoading(!0);let r=yield i.get(t);if(!r)throw Error("Conversation not found: "+t);n.setCurrentConversation((0,o._)({},r))}catch(t){l.IS_PROD}finally{n.setLoading(!1)}})()}function h(t,i){return(0,r._)(function*(){i.setView("conversationList");try{i.setLoading(!0);let n=yield t.list().catch(()=>[]);i.setConversations(n)}finally{i.setLoading(!1)}})()}function p(t,i,n){return(0,r._)(function*(){n.setLoading(!0);try{let r=yield i.list(t||void 0);n.setConversations(r),n.setView("conversationList")}finally{n.setLoading(!1)}})()}},482:function(t,i,n){"use strict";var r=n(77688),o=n(82749),s=n(56075),a=n(31635);n(55029),n(99413);var l=n(17298),u=n(61818),c=n(67912),d=n(92931),h=n(65805),p=n(4774),f=n(82758),m=n(65478),g=n(21537),b=n(50911),v=n(62843),y=n(78584),_=n(92762),C=n(2692);window.JoditGoogleReadyHandler=c.GoogleReadyHandler;class w extends b.Plugin{className(){return"google-maps"}afterInit(t){t.registerCommand(l.COMMAND_OPEN_DIALOG,()=>{this.openMapEditor(null,{})})}beforeDestruct(t){}onOpenOnDblClick(t){if(t.dataset.googleMaps){let i;try{i=JSON.parse(this.j.ow.atob(t.dataset.googleMaps))}catch(t){}return this.openMapEditor(t,i),!1}}openMapEditor(t,i){return(0,r._)(function*(){let n=this.j,r=this.getDialog(),o=this.j.o.googleMaps.saveStateInStorage?r.storage.get(l.STORAGE_KEY):void 0,{apiUrl:a}=this.jodit.o.googleMaps;(0,c.isApiAvailable)()||(0,g.appendScriptAsync)(this.jodit,a.replace(/\${([^}]+)}/g,(t,i)=>{var n;return null!=(n=this.get(i))?n:""}));let u=(0,s._)({type:this.j.o.googleMaps.map.type,layer:this.j.o.googleMaps.map.layer,size:this.j.o.googleMaps.map.size},o,i),m=new p.UIMap(r,u,this.j.options);m.container.classList.add(r.getFullElName("map"));let b=new h.UIComboBox(n,{icon:"search",placeholder:"Search",clearButton:!0}).setMod("in-header",!0);b.container.classList.add(r.getFullElName("search")),this.j.async.promise(t=>{if((0,c.isApiAvailable)())return void t(0);let i=()=>{(0,c.isApiAvailable)()?t(0):this.j.async.setTimeout(i,100)};i(),(0,c.googleReady)(t)}).then(()=>{m.setStatus("ready"),b.setStatus("ready")}),this.j.e.on(b,"select",(t,i)=>{i?m.map.fitBounds(i):t&&(m.state.center=[t.lat(),t.lng()])}),o||("auto"===this.j.o.googleMaps.map.center?navigator.geolocation.getCurrentPosition(t=>{m.state.center=[t.coords.latitude,t.coords.longitude]},()=>{m.state.center=this.j.o.googleMaps.map.defaultCenter}):m.state.center=this.j.o.googleMaps.map.center),r.setSize(...n.o.googleMaps.dialog.size).setHeader([b,"&nbsp;",(0,v.Button)(n,"eye").onAction(()=>{let t=this.jodit.createInside.element("img");t.src=(0,d.staticUrl)(m),t.dataset.googleMaps=btoa(m.json());let i={value:t.outerHTML};this.onAfterGetValueFromEditor(i),n.execCommand("preview",null,i.value)})]).setContent((0,_.TabsWidget)(n,[{name:"Map",icon:"map",content:m},{name:"Settings",content:new p.UIMapsPropsForm(n,m.state)},{name:"Controls",icon:"menu",content:new p.UIMapsControlsForm(n,m.state)}])).setFooter([(0,v.Button)(n,"cancel","Cancel","default").onAction(()=>r.close()),(0,v.Button)(n,"ok",t?"Save":"Insert","primary").onAction(()=>{m.destruct(),b.destruct(),r.e.off("beforeClose",y),r.close(),this.insertMap(t,m)})]).open();let y=()=>{if(m.state.elements.length&&JSON.stringify(m.state.elements)!==JSON.stringify(u.elements)&&!f.IS_TEST&&!confirm(this.i18n("Are you sure?")))return!1;m.destruct(),b.destruct(),r.e.off("beforeClose",y)};r.e.on("beforeClose",y)}).call(this)}getDialog(){if(!this.dialog){let t=new y.Dialog({language:this.j.o.language});t.container.classList.add(this.getFullElName("")),this.dialog=t}return this.dialog}insertMap(t,i){let n=null!=t?t:this.jodit.createInside.element("img");n.src=(0,d.staticUrl)(i),n.dataset.googleMaps=btoa(i.json()),t||this.jodit.s.insertImage(n)}onBeforeSetNativeEditorValue(t){t.value=t.value.replace(RegExp("<script[^>]+jodit-google-maps-init[^>]+>.*?<\\/script>","gs"),"")}onAfterGetValueFromEditor(t,i){this.j.o.googleMaps.useStaticImage||i===f.SOURCE_CONSUMER||(t.value=t.value.replace(RegExp("(<img[^>]+)([\"']?)data-google-maps\\2\\s*=([\"'])([^\"']+)\\3([^>]*>)","gs"),(t,i,n,r,o,s)=>{let a={};try{a=JSON.parse(this.j.ow.atob(o))}catch(t){}return`${i} id="${a.uid}" ${n}data-google-maps${n}=${r}${o}${r}${s}${(0,u.generateJSScript)(this.j,a)}`}))}constructor(...t){super(...t),(0,o._)(this,"buttons",[{group:"media",name:"googleMaps"}]),(0,o._)(this,"dialog",null)}}(0,o._)(w,"requires",["license","color-picker"]),(0,a.__decorate)([(0,m.watch)("?:openOnDblClick")],w.prototype,"onOpenOnDblClick",null),(0,a.__decorate)([(0,m.watch)(":beforeSetNativeEditorValue")],w.prototype,"onBeforeSetNativeEditorValue",null),(0,a.__decorate)([(0,m.watch)(":afterGetValueFromEditor")],w.prototype,"onAfterGetValueFromEditor",null),C.JoditPro.plugins.add("google-maps",w)},575:function(t,i,n){"use strict";var r=n(82758),o=n(65478),s=n(2748),a=n(580),l=n(87612),u=n(20356),c=n(35399);class d extends u.Plugin{afterInit(t){let i=t.o.enter.toLowerCase(),n=i===r.BR.toLowerCase();t.o.enterBlock||(t.o.enterBlock=n?r.PARAGRAPH:i),t.registerCommand("enter",(t,i,n={})=>this.onEnter(n))}onEnterKeyDown(t){if(t.key===r.KEY_ENTER){let i=this.j,n=i.e.fire("beforeEnter",t);return void 0!==n?n:(i.s.isCollapsed()||i.execCommand("Delete"),i.s.focus(),this.onEnter(t),i.e.fire("afterEnter",t),i.synchronizeValues(),!1)}}onEnter(t){let{jodit:i}=this,n=i.createInside.fake();try{s.Dom.safeInsertNode(i.s.range,n),(0,c.moveCursorOutFromSpecialTags)(i,n,["a"]);let r=(0,c.getBlockWrapper)(n,i),o=s.Dom.isLeaf(r);if((!o||(null==t?void 0:t.shiftKey))&&(0,c.checkBR)(n,i,null==t?void 0:t.shiftKey))return!1;if(r||(0,c.hasPreviousBlock)(n,i)||(r=(0,c.wrapText)(n,i)),!r)return(0,c.insertParagraph)(n,i,o?"li":i.o.enter),!1;if(!(0,c.checkUnsplittableBox)(n,i,r))return!1;if(o&&this.__isEmptyListLeaf(r))return(0,c.processEmptyLILeaf)(n,i,r),!1;(0,c.splitFragment)(n,i,r)}finally{n.isConnected&&i.s.setCursorBefore(n),s.Dom.safeRemove(n)}}__isEmptyListLeaf(t){let i=this.j.e.fire("enterIsEmptyListLeaf",t);return(0,l.isBoolean)(i)?i:s.Dom.isEmpty(t)}beforeDestruct(t){t.e.off("keydown.enter")}}!function(t,i,n,r){var o,s=arguments.length,a=s<3?i:null===r?r=Object.getOwnPropertyDescriptor(i,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,i,n,r);else for(var l=t.length-1;l>=0;l--)(o=t[l])&&(a=(s<3?o(a):s>3?o(i,n,a):o(i,n))||a);s>3&&a&&Object.defineProperty(i,n,a)}([(0,o.watch)(":keydown.enter")],d.prototype,"onEnterKeyDown",null),a.pluginSystem.add("enter",d)},580:function(t,i,n){"use strict";n.d(i,{eventEmitter:function(){return E},extendLang:function(){return _},getContainer:function(){return w},getPopupViewRoot:function(){return F},instances:function(){return f},modules:function(){return y},pluginSystem:function(){return v},uniqueUid:function(){return b}});var r=n(19306),o=n(70799),s=n(39955),a=n(12475),l=n(41180),u=n(80568),c=n(41876),d=n(57012),h=n(82758),p=n(22732);let f={},m=1,g=new Set;function b(){function t(){return Math.round(m+=10*(Math.random()+1)).toString(16)}let i=t();for(;g.has(i);)i=t();return g.add(i),i}let v=new c.PluginSystem({getContainer:w}),y={},_=t=>{Object.keys(t).forEach(i=>{h.lang[i]?Object.assign(h.lang[i],t[i]):h.lang[i]=t[i]})},C=new WeakMap;function w(t,i,n="div",l=!1){let c=(0,o.isString)(i)?i:i?(0,u.getClassName)(i.prototype):"jodit-utils",d=C.get(t)||{},h=c+n,f=(0,s.isViewObject)(t)?t:t.j,m=null;if(!d[h]){let i=f.c;if(m=F(f.o,f.container,t.od.body),l&&(0,r.isJoditObject)(t)&&t.od!==t.ed){i=t.createInside;let o="style"===n?t.ed.head:t.ed.body;m=(0,r.isJoditObject)(t)&&t.o.shadowRoot?t.o.shadowRoot:o}let o=i.element(n,{className:`jodit jodit-${(0,a.kebabCase)(c)}-container jodit-box`});o.classList.add(`jodit_theme_${f.o.theme||"default"}`),m.appendChild(o),d[h]=o,t.hookStatus("beforeDestruct",()=>{f.events.off(o),p.Dom.safeRemove(o),delete d[h],Object.keys(d).length&&C.delete(t)}),C.set(t,d),f.events.fire("getContainer",o)}return d[h].classList.remove("jodit_theme_default","jodit_theme_dark"),d[h].classList.add(`jodit_theme_${f.o.theme||"default"}`),d[h]}function F(t,i,n){var r,o,s;return null!=(s=null!=(o=null!=(r=t.popupRoot)?r:t.shadowRoot)?o:p.Dom.closest(i,t=>p.Dom.isHTMLElement(t)&&(p.Dom.isTag(t,"dialog")||["fixed","absolute"].includes((0,l.css)(t,"position"))),n))?s:n}let E=d.eventEmitter},638:function(t,i,n){"use strict";n.d(i,{Alert:function(){return r.Alert},Confirm:function(){return o.Confirm},Dialog:function(){return s.Dialog},Prompt:function(){return a.Prompt}});var r=n(71568),o=n(26866),s=n(78584),a=n(36806)},757:function(t,i,n){"use strict";var r=n(6441);r.Config.prototype.mediaFakeTag="jodit-media",r.Config.prototype.mediaInFakeBlock=!0,r.Config.prototype.mediaBlocks=["video","audio"]},767:function(t,i,n){"use strict";var r=n(82758),o=n(65478),s=n(580),a=n(50911);n(66288);var l=n(47686),u=function(t,i,n,r){var o,s=arguments.length,a=s<3?i:null===r?r=Object.getOwnPropertyDescriptor(i,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,i,n,r);else for(var l=t.length-1;l>=0;l--)(o=t[l])&&(a=(s<3?o(a):s>3?o(i,n,a):o(i,n))||a);return s>3&&a&&Object.defineProperty(i,n,a),a};class c extends a.Plugin{afterInit(t){}__onTab(t){if(t.key===r.KEY_TAB&&this.__onShift(t.shiftKey))return!1}__onCommand(t){if(("indent"===t||"outdent"===t)&&this.__onShift("outdent"===t))return!1}__onShift(t){let i=(0,l.onTabInsideLi)(this.j,t);return i&&this.j.e.fire("afterTab",t),i}beforeDestruct(t){}}u([(0,o.watch)(":keydown.tab")],c.prototype,"__onTab",null),u([(0,o.watch)(":beforeCommand.tab")],c.prototype,"__onCommand",null),s.pluginSystem.add("tab",c)},820:function(t,i){"use strict";i.default='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M747 1521q74 32 140 32 376 0 376-335 0-114-41-180-27-44-61.5-74t-67.5-46.5-80.5-25-84-10.5-94.5-2q-73 0-101 10 0 53-.5 159t-.5 158q0 8-1 67.5t-.5 96.5 4.5 83.5 12 66.5zm-14-746q42 7 109 7 82 0 143-13t110-44.5 74.5-89.5 25.5-142q0-70-29-122.5t-79-82-108-43.5-124-14q-50 0-130 13 0 50 4 151t4 152q0 27-.5 80t-.5 79q0 46 1 69zm-541 889l2-94q15-4 85-16t106-27q7-12 12.5-27t8.5-33.5 5.5-32.5 3-37.5.5-34v-65.5q0-982-22-1025-4-8-22-14.5t-44.5-11-49.5-7-48.5-4.5-30.5-3l-4-83q98-2 340-11.5t373-9.5q23 0 68.5.5t67.5.5q70 0 136.5 13t128.5 42 108 71 74 104.5 28 137.5q0 52-16.5 95.5t-39 72-64.5 57.5-73 45-84 40q154 35 256.5 134t102.5 248q0 100-35 179.5t-93.5 130.5-138 85.5-163.5 48.5-176 14q-44 0-132-3t-132-3q-106 0-307 11t-231 12z"/> </svg> '},1050:function(t,i,n){"use strict";var r=n(82749),o=n(31635);n(88092);var s=n(29744),a=n(65478),l=n(22732),u=n(21537),c=n(50911),d=n(62843),h=n(41409),p=n(2692);class f extends c.Plugin{afterInit(t){t.e.on("toggleIframeEditor",this.toggleEditor)}toggleEditor(t){var i,n,r,o,a;this.__dialog||(this.__dialog=new h.Dialog({language:this.j.o.language,theme:this.j.o.theme}),this.__dialog.setHeader("Iframe Properties").setSize(470,400)),t&&!l.Dom.isTag(t,"iframe")&&(t=void 0);let c=new s.UIIframeEditor(this.__dialog,{src:null!=(i=null==t?void 0:t.src)?i:"",name:null!=(n=null==t?void 0:t.name)?n:"",title:null!=(r=null==t?void 0:t.title)?r:"",frameBorder:(null==t?void 0:t.frameBorder)==="1"||(null==t?void 0:t.frameBorder)==="yes",width:null!=(o=null==t?void 0:t.offsetWidth)?o:700,height:null!=(a=null==t?void 0:t.offsetHeight)?a:400});this.__dialog.setContent(c);let p=this.__dialog;p.isOpened?p.close():(p.setFooter([(0,d.Button)(p,"cancel","Cancel","default").onAction(()=>p.close()),(0,d.Button)(p,"ok",t?"Update":"Insert","primary").onAction(()=>{if(!c.srcField.value){c.srcField.validate(),c.srcField.focus();return}t||(t=this.j.createInside.element("iframe"),this.j.s.insertNode(t,!0,!1)),t.className=c.state.className||"",(0,u.attr)(t,{src:c.state.src,title:c.state.title,name:c.state.name,frameborder:c.state.frameBorder?"1":"0",width:c.state.width,height:c.state.height}),l.Dom.isTag(t.parentElement,"jodit")&&(0,u.css)(t.parentElement,{width:c.state.width,height:c.state.height}),this.jodit.e.fire("synchro"),p.close()})]).open(),this.jodit.async.requestIdleCallback(()=>{c.srcField.focus()}))}onDblClick(t){l.Dom.isTag(t.target,"iframe")&&this.toggleEditor(t.target)}beforeDestruct(t){var i;null==(i=this.__dialog)||i.destruct()}constructor(...t){super(...t),(0,r._)(this,"buttons",[{group:"form",name:"iframeEditor"}]),(0,r._)(this,"__dialog",void 0)}}(0,r._)(f,"requires",["license","color-picker"]),(0,o.__decorate)([a.autobind],f.prototype,"toggleEditor",null),(0,o.__decorate)([(0,a.watch)(":dblclick")],f.prototype,"onDblClick",null),p.JoditPro.plugins.add("iframe-editor",f)},1115:function(t,i,n){"use strict";n.r(i),i.default={"Speech Recognize":"Puheentunnistus",newline:"uusi rivi",delete:"poistaa",space:"tilaa",Sound:"\xc4\xe4ni","Interim Results":"V\xe4litulokset"}},1172:function(t,i){"use strict";i.default={"copy-format":"复制格式"}},1255:function(t,i,n){"use strict";var r,o,s=n(65478),a=n(22732),l=n(580),u=n(21537),c=n(50911);n(44586);var d=function(t,i,n,r){var o,s=arguments.length,a=s<3?i:null===r?r=Object.getOwnPropertyDescriptor(i,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,i,n,r);else for(var l=t.length-1;l>=0;l--)(o=t[l])&&(a=(s<3?o(a):s>3?o(i,n,a):o(i,n))||a);return s>3&&a&&Object.defineProperty(i,n,a),a};(r=o||(o={}))[r.IDLE=0]="IDLE",r[r.WAIT_DRAGGING=1]="WAIT_DRAGGING",r[r.DRAGGING=2]="DRAGGING";class h extends c.Plugin{afterInit(){this.dragList=this.j.o.draggableTags?(0,u.splitArray)(this.j.o.draggableTags).filter(Boolean).map(t=>t.toLowerCase()):[],this.dragList.length&&this.j.e.on("mousedown dragstart",this.onDragStart)}onDragStart(t){if("dragstart"===t.type&&this.draggable)return!1;if(this.state>o.IDLE)return;let i=t.target;if(!this.dragList.length||!i)return;let n=t=>!!(t&&this.dragList.includes(t.nodeName.toLowerCase())),r=a.Dom.furthest(i,n,this.j.editor)||(n(i)?i:null);r&&(a.Dom.isTag(r.parentElement,"a")&&r.parentElement.firstChild===r&&r.parentElement.lastChild===r&&(r=r.parentElement),this.startX=t.clientX,this.startY=t.clientY,this.isCopyMode=(0,u.ctrlKey)(t),this.draggable=r.cloneNode(!0),(0,u.dataBind)(this.draggable,"target",r),this.state=o.WAIT_DRAGGING,this.addDragListeners())}onDrag(t){var i,n;if(!this.draggable||this.state===o.IDLE)return;let r=t.clientX,s=t.clientY;if(!(this.state===o.WAIT_DRAGGING&&Math.sqrt(Math.pow(r-this.startX,2)+Math.pow(s-this.startY,2))<this.diffStep)){if(this.state===o.WAIT_DRAGGING&&(this.j.lock("drag-and-drop-element"),this.state=o.DRAGGING),this.j.e.fire("hidePopup hideResizer"),!this.draggable.parentNode){let r=(0,u.dataBind)(this.draggable,"target");(0,u.css)(this.draggable,{zIndex:1e13,pointerEvents:"none",pointer:"drag",position:"fixed",opacity:.7,display:"inline-block",left:t.clientX,top:t.clientY,width:null!=(i=null==r?void 0:r.offsetWidth)?i:100,height:null!=(n=null==r?void 0:r.offsetHeight)?n:100}),(0,l.getContainer)(this.j,h).appendChild(this.draggable)}(0,u.css)(this.draggable,{left:t.clientX,top:t.clientY}),this.j.s.insertCursorAtPoint(t.clientX,t.clientY)}}onDragEnd(){!this.isInDestruct&&(this.removeDragListeners(),this.j.unlock(),this.state=o.IDLE,this.draggable&&(a.Dom.safeRemove(this.draggable),this.draggable=null))}onDrop(){if(!this.draggable||this.state<o.DRAGGING)return void this.onDragEnd();let t=(0,u.dataBind)(this.draggable,"target");this.onDragEnd(),this.isCopyMode&&(t=t.cloneNode(!0));let{parentElement:i}=t;this.j.s.insertNode(t,!0,!1),i&&a.Dom.isEmpty(i)&&!a.Dom.isCell(i)&&a.Dom.safeRemove(i),a.Dom.isTag(t,"img")&&this.j.e&&this.j.e.fire("afterInsertImage",t),this.j.e.fire("synchro")}addDragListeners(){this.j.e.on(this.j.editor,"mousemove",this.onDrag).on("mouseup",this.onDrop).on([this.j.ew,this.ow],"mouseup",this.onDragEnd)}removeDragListeners(){this.j.e.off(this.j.editor,"mousemove",this.onDrag).off("mouseup",this.onDrop).off([this.j.ew,this.ow],"mouseup",this.onDragEnd)}beforeDestruct(){this.onDragEnd(),this.j.e.off("mousedown dragstart",this.onDragStart),this.removeDragListeners()}constructor(){super(...arguments),this.dragList=[],this.draggable=null,this.isCopyMode=!1,this.diffStep=10,this.startX=0,this.startY=0,this.state=o.IDLE}}d([s.autobind],h.prototype,"onDragStart",null),d([(0,s.throttle)(t=>t.defaultTimeout/10)],h.prototype,"onDrag",null),d([s.autobind],h.prototype,"onDragEnd",null),d([s.autobind],h.prototype,"onDrop",null),l.pluginSystem.add("dragAndDropElement",h)},1322:function(t,i,n){"use strict";n.r(i),i.default={Spellcheck:"Stavekontroll"}},1475:function(t,i,n){"use strict";n.d(i,{initOrUpdateElementFromState:function(){return c}});var r=n(53454),o=n(11079),s=n(72690),a=n(580),l=n(12153),u=n(67912);function c(t,i){let n,c=this.mapElements[i];if(c){if(c.state.type===t.type)return s.updateStateAndGme.call(this,t,i);c.gme.setMap(null)}switch(t.type){case"text":n=new google.maps.Marker({position:new google.maps.LatLng(t.coordinates[0],t.coordinates[1]),draggable:!0,title:t.text,map:this.map});break;case"marker":n=new google.maps.Marker({position:new google.maps.LatLng(t.coordinates[0],t.coordinates[1]),draggable:!0,label:t.showCaption?t.title:"",title:t.title,icon:t.icon?l.Icon.get(t.icon):void 0,map:this.map});break;case"polyline":case"polygon":{let i=(0,u.arrayToPath)(t.coordinates);n=new google.maps["polygon"===t.type?"Polygon":"Polyline"]({path:i,strokeColor:t.strokeColor,fillColor:t.fillColor,strokeWeight:t.strokeWeight,editable:!0,draggable:!0,map:this.map,fillOpacity:"polygon"===t.type?t.fillOpacity:1})}break;case"circle":var d;n=new google.maps.Circle({center:new google.maps.LatLng(t.coordinates[0],t.coordinates[1]),radius:t.radius,strokeColor:t.strokeColor,fillColor:t.fillColor,strokeWeight:t.strokeWeight,editable:!0,draggable:!0,map:this.map,fillOpacity:null!=(d=t.fillOpacity)?d:1})}let h={type:t.type,uid:(0,a.uniqueUid)(),state:t,gme:n};"dragend radius_changed center_changed".split(" ").forEach(t=>n.addListener(t,()=>r.onChangeGeometries.call(this,h,i))),("polygon"===h.type||"polyline"===h.type)&&"insert_at set_at remove_at".split(" ").forEach(t=>h.gme.getPath().addListener(t,()=>r.onChangeGeometries.call(this,h,i))),n.addListener("click",()=>o.openPropsDialog.call(this,h,i)),this.mapElements[i]=h}},1580:function(t,i,n){"use strict";n.d(i,{processImage:function(){return o}});var r=n(21537);let o=(t,i)=>{if(i.rtf&&"#comment"===t.name&&t.attributes.nodeValue&&-1!==t.attributes.nodeValue.indexOf("<v:shape")){i.shapes||(i.shapes={});let n=i.jodit.create.fromHTML(t.attributes.nodeValue);return(0,r.toArray)(n.getElementsByTagName("v:shape")).forEach(t=>{i.shapes[t.id]=t.getAttribute("o:spid")}),t}if("img"!==t.name)return t;if(i.rtf&&t.attributes["v:shapes"]){var n,o;let r=null==(n=i.shapes)?void 0:n[t.attributes["v:shapes"]];if(r){let n=null!=(o=i.imageMap)?o:{};i.imageMap||(i.imageMap=n,s(i.rtf,"i","\\shppict",i.imageMap),s(i.rtf,"s","\\shp{",i.imageMap));let a=n[r.substring(7)];if(a){let i=[],n=a.hex.match(/[0-9a-f]{2}/gi);if(n){for(let t=0;t<n.length;t++){let r=parseInt(n[t],16);i.push(String.fromCharCode(r))}t.attributes.src="data:"+a.type+";base64,"+btoa(i.join(""))}}}}return t};function s(t,i,n,r){for(let o of t.split(n)){let t=o.split("shplid");if(1<t.length){let n,o=t[1],s="";for(let t=0;t<o.length&&!/[{ \r\n\\]/.test(o[t]);t++)s+=o[t];let a=o.split("bliptag");if(a&&a.length<2)continue;let l=null;if(a[0].indexOf("pngblip")?l="image/png":-1!==a[0].indexOf("jpegblip")&&(l="image/jpeg"),!l)continue;let u=a[1].split("}");if(u&&u.length<2)continue;if(2<u.length&&u[0].includes("blipuid"))n=u[1].split(" ");else{if((n=u[0].split(" "))&&n.length<2)continue;n.shift()}r[i+s]={hex:n.join(""),type:l}}}}},1808:function(t,i,n){"use strict";n.d(i,{UIMessages:function(){return l}});var r=n(87325),o=n(41180),s=n(62405),a=n(68389);let l=class t extends s.UIGroup{className(){return"UIMessages"}info(t,i){this.__message(t,"info",i)}success(t,i){this.__message(t,"success",i)}error(t,i){this.__message(t,"error",i)}message(t,i,n){this.__message(t,i,n)}__message(t,i="info",n){let r=t+":"+i;if(this.__messages.has(r))return void this.async.updateTimeout(r,n||this.options.defaultTimeout);if(!this.__box)throw Error("Container is not defined: "+r);this.__box.appendChild(this.container);let o=new a.UIMessage(this.j,{text:t,variant:i});this.append(o),this.__calcOffsets(),this.__messages.add(r);let s=this.__getRemoveCallback(o,r);this.j.e.on(o.container,"pointerdown",s),this.async.setTimeout(s,{label:r,timeout:n||this.options.defaultTimeout})}__getRemoveCallback(t,i){let n=r=>{r&&r.preventDefault(),t.isInDestruct||(this.async.clearTimeout(i),this.j.e.off(t.container,"pointerdown",n),this.__messages.delete(i),t.setMod("active",!1),this.async.setTimeout(()=>{this.remove(t),t.destruct(),this.__calcOffsets()},300))};return n}__calcOffsets(){let t=5;this.elements.forEach(i=>{(0,o.css)(i.container,"bottom",t+"px"),t+=i.container.offsetHeight+this.options.defaultOffset})}constructor(t,i,n={defaultTimeout:3e3,defaultOffset:5}){super(t),this.__box=i,this.options=n,this.__messages=new Set}};l=function(t,i,n,r){var o,s=arguments.length,a=s<3?i:null===r?r=Object.getOwnPropertyDescriptor(i,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,i,n,r);else for(var l=t.length-1;l>=0;l--)(o=t[l])&&(a=(s<3?o(a):s>3?o(i,n,a):o(i,n))||a);return s>3&&a&&Object.defineProperty(i,n,a),a}([r.component],l)},1830:function(t,i){"use strict";i.default={"Type something":"Start writing...",pencil:"Edit",Quadrate:"Square"}},1879:function(t,i,n){"use strict";n.r(i),i.default={Spellcheck:"Spellingcontrole"}},2020:function(t,i,n){"use strict";var r=n(56075),o=n(11886),s=n(96675),a=n(3091);i.default=(0,o._)((0,r._)({},s),{execute:a.execute})},2169:function(t,i,n){"use strict";var r=n(580),o=n(19306),s=n(41180);n(99823);let a=new Set;r.pluginSystem.add("fullsize",function(t){t.registerButton({name:"fullsize"});let i=!1,n=0,r=0,l=!1,u=()=>{let{container:o,events:a}=t;a&&(i?(n=(0,s.css)(o,"height",!0),r=(0,s.css)(o,"width",!0),(0,s.css)(o,{height:t.ow.innerHeight,width:t.ow.innerWidth}),l=!0):l&&(0,s.css)(o,{height:n||"auto",width:r||"auto"}))},c=n=>{var r;let{container:l,events:c}=t;if(l){if(void 0===n&&(n=!l.classList.contains("jodit_fullsize")),t.setMod("fullsize",n),t.o.fullsize=n,i=n,l.classList.toggle("jodit_fullsize",n),t.toolbar&&((0,o.isJoditObject)(t)&&(null==(r=t.toolbarContainer)||r.appendChild(t.toolbar.container)),(0,s.css)(t.toolbar.container,"width","auto")),n?a.add(l):a.delete(l),t.o.globalFullSize&&(1===a.size&&n||0===a.size&&!n)){let t=l.parentNode;for(;t&&t.nodeType!==Node.DOCUMENT_NODE&&t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE;)t.classList.toggle("jodit_fullsize-box_true",n),t=t.parentNode;u()}c.fire("afterResize")}};t.o.globalFullSize&&t.e.on(t.ow,"resize",u),t.e.on("afterInit afterOpen",()=>{var i;t.toggleFullSize(null==(i=null==t?void 0:t.options)?void 0:i.fullsize)}).on("toggleFullSize",c).on("beforeDestruct",()=>{i&&c(!1)}).on("beforeDestruct",()=>{t.events&&t.e.off(t.ow,"resize",u)})})},2303:function(t,i,n){"use strict";n.d(i,{Jodit:function(){return Jodit}});var r,o=n(82758),s=n(65478),a=n(580),l=n(21537),u=n(41601),c=n(70231),d=n(6441),h=n(41409),p=function(t,i,n,r){var o,s=arguments.length,a=s<3?i:null===r?r=Object.getOwnPropertyDescriptor(i,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,i,n,r);else for(var l=t.length-1;l>=0;l--)(o=t[l])&&(a=(s<3?o(a):s>3?o(i,n,a):o(i,n))||a);return s>3&&a&&Object.defineProperty(i,n,a),a};let f="data-jodit-default-style-display",m="data-jodit-default-classes",g={contenteditable:!1},Jodit=r=class t extends h.ViewWithToolbar{className(){return"Jodit"}waitForReady(){return this.isReady?Promise.resolve(this):this.async.promise(t=>{this.hookStatus("ready",()=>t(this))})}static get ready(){return new Promise(t=>{a.eventEmitter.on("joditready",t)})}get text(){if(this.editor)return this.editor.innerText||"";let t=this.createInside.div();return t.innerHTML=this.getElementValue(),t.innerText||""}get defaultTimeout(){return(0,l.isNumber)(this.o.defaultTimeout)?this.o.defaultTimeout:d.Config.defaultOptions.defaultTimeout}static atom(t){return(0,l.markAsAtomic)(t)}static make(t,i){return new this(t,i)}static isJoditAssigned(t){return t&&(0,l.isJoditObject)(t.component)&&!t.component.isInDestruct}static get defaultOptions(){return d.Config.defaultOptions}get createInside(){return new h.Create(()=>this.ed,this.o.createAttributes)}__setPlaceField(t,i){this.currentPlace||(this.currentPlace={},this.places=[this.currentPlace]),this.currentPlace[t]=i}get element(){return this.currentPlace.element}get editor(){return this.currentPlace.editor}set editor(t){this.__setPlaceField("editor",t)}get container(){return this.currentPlace.container}set container(t){this.__setPlaceField("container",t)}get workplace(){return this.currentPlace.workplace}get message(){return this.getMessageModule(this.workplace)}get statusbar(){return this.currentPlace.statusbar}get iframe(){return this.currentPlace.iframe}set iframe(t){this.__setPlaceField("iframe",t)}get history(){return this.currentPlace.history}get editorWindow(){return this.currentPlace.editorWindow}set editorWindow(t){this.__setPlaceField("editorWindow",t)}get ew(){return this.editorWindow}get editorDocument(){return this.currentPlace.editorWindow.document}get ed(){return this.editorDocument}get options(){return this.currentPlace.options}set options(t){this.__options=t,this.__setPlaceField("options",t)}get s(){return this.selection}get uploader(){return this.getInstance("Uploader",this.o.uploader)}get filebrowser(){let t=this,i=(0,l.ConfigProto)({defaultTimeout:t.defaultTimeout,uploader:t.o.uploader,language:t.o.language,license:t.o.license,theme:t.o.theme,shadowRoot:t.o.shadowRoot,defaultCallback(i){i.files&&i.files.length&&i.files.forEach((n,r)=>{let o=i.baseurl+n;i.isImages&&i.isImages[r]?t.s.insertImage(o,null,t.o.imageDefaultWidth):t.s.insertNode(t.createInside.fromHTML(`<a href='${o}' title='${o}'>${o}</a>`))})}},this.o.filebrowser);return t.getInstance("FileBrowser",i)}get mode(){return this.__mode}set mode(t){this.setMode(t)}getNativeEditorValue(){let t=this.e.fire("beforeGetNativeEditorValue");return(0,l.isString)(t)?t:this.editor?this.editor.innerHTML:this.getElementValue()}setNativeEditorValue(t){let i={value:t};!this.e.fire("beforeSetNativeEditorValue",i)&&this.editor&&(this.editor.innerHTML=i.value)}get value(){return this.getEditorValue()}set value(t){this.setEditorValue(t),this.history.__processChanges()}synchronizeValues(){this.__imdSynchronizeValues()}__imdSynchronizeValues(){this.setEditorValue()}getEditorValue(t=!0,i){let n;if(void 0!==(n=this.e.fire("beforeGetValueFromEditor",i)))return n;n=this.getNativeEditorValue().replace(o.INVISIBLE_SPACE_REG_EXP(),""),t&&(n=n.replace(/<span[^>]+id="jodit-selection_marker_[^>]+><\/span>/g,"")),"<br>"===n&&(n="");let r={value:n};return this.e.fire("afterGetValueFromEditor",r,i),r.value}setEditorValue(t){let i=this.e.fire("beforeSetValueToEditor",t);if(!1===i)return;if((0,l.isString)(i)&&(t=i),!this.editor){void 0!==t&&this.__setElementValue(t);return}if(!(0,l.isString)(t)&&!(0,l.isVoid)(t))throw(0,l.error)("value must be string");(0,l.isVoid)(t)||this.getNativeEditorValue()===t||this.setNativeEditorValue(t),this.e.fire("postProcessSetEditorValue");let n=this.getElementValue(),r=this.getEditorValue();if(!this.__isSilentChange&&n!==r&&this.__callChangeCount<o.SAFE_COUNT_CHANGE_CALL){this.__setElementValue(r),this.__callChangeCount+=1,o.IS_PROD||this.__callChangeCount;try{this.history.__upTick(),this.e.fire("change",r,n),this.e.fire(this.history,"change",r,n)}finally{this.__callChangeCount=0}}}updateElementValue(){this.__setElementValue(this.getEditorValue())}getElementValue(){return void 0!==this.element.value?this.element.value:this.element.innerHTML}__setElementValue(t){if(!(0,l.isString)(t))throw(0,l.error)("value must be string");if(this.element!==this.container&&t!==this.getElementValue()){let i={value:t},n=this.e.fire("beforeSetElementValue",i);(0,l.callPromise)(n,()=>{void 0!==this.element.value?this.element.value=i.value:this.element.innerHTML=i.value,this.e.fire("afterSetElementValue",i)})}}registerCommand(t,i,n){let r=t.toLowerCase(),o=this.commands.get(r);if(void 0===o&&(o=[],this.commands.set(r,o)),o.push(i),!(0,l.isFunction)(i)){let o=this.o.commandToHotkeys[r]||this.o.commandToHotkeys[t]||i.hotkeys;o&&this.registerHotkeyToCommand(o,r,null==n?void 0:n.stopPropagation)}return this}registerHotkeyToCommand(t,i,n=!0){let r=(0,l.asArray)(t).map(l.normalizeKeyAliases).map(t=>t+".hotkey").join(" ");this.e.off(r).on(r,(t,r)=>(r&&(r.shouldStop=null==n||n),this.execCommand(i)))}execCommand(t,i,n,...r){let s;if(this.s.isFocused()||this.s.focus(),!this.o.readonly||this.o.allowCommandsInReadOnly.includes(t)){if(t=t.toLowerCase(),!1!==(s=this.e.fire(`beforeCommand${(0,l.ucfirst)(t)}`,i,n,...r))&&(s=this.e.fire("beforeCommand",t,i,n,...r)),!1!==s&&(s=this.__execCustomCommands(t,i,n,...r)),!1!==s){this.s.focus();try{s=this.nativeExecCommand(t,i,n)}catch(t){if(!o.IS_PROD)throw t}}return this.e.fire("afterCommand",t,i,n),this.__imdSynchronizeValues(),s}}nativeExecCommand(t,i,n){this.__isSilentChange=!0;try{return this.ed.execCommand(t,i,n)}finally{this.__isSilentChange=!1}}__execCustomCommands(t,i,n,...r){t=t.toLowerCase();let o=this.commands.get(t);if(void 0!==o){let s;return o.forEach(o=>{let a=((0,l.isFunction)(o)?o:o.exec).call(this,t,i,n,...r);void 0!==a&&(s=a)}),s}}lock(t="any"){return!!super.lock(t)&&(this.__selectionLocked=this.s.save(),this.s.clear(),this.container.classList.add("jodit_lock"),this.e.fire("lock",!0),!0)}unlock(){return!!super.unlock()&&(this.container.classList.remove("jodit_lock"),this.__selectionLocked&&this.s.restore(),this.e.fire("lock",!1),!0)}getMode(){return this.mode}isEditorMode(){return this.getRealMode()===o.MODE_WYSIWYG}getRealMode(){if(this.getMode()!==o.MODE_SPLIT)return this.getMode();let t=this.od.activeElement;return t&&(t===this.iframe||h.Dom.isOrContains(this.editor,t)||h.Dom.isOrContains(this.toolbar.container,t))?o.MODE_WYSIWYG:o.MODE_SOURCE}setMode(t){let i=this.getMode(),n={mode:parseInt(t.toString(),10)},r=["jodit-wysiwyg_mode","jodit-source__mode","jodit_split_mode"];!1!==this.e.fire("beforeSetMode",n)&&(this.__mode=[o.MODE_SOURCE,o.MODE_WYSIWYG,o.MODE_SPLIT].includes(n.mode)?n.mode:o.MODE_WYSIWYG,this.o.saveModeInStorage&&this.storage.set("jodit_default_mode",this.mode),r.forEach(t=>{this.container.classList.remove(t)}),this.container.classList.add(r[this.mode-1]),i!==this.getMode()&&this.e.fire("afterSetMode"))}toggleMode(){let t=this.getMode();[o.MODE_SOURCE,o.MODE_WYSIWYG,this.o.useSplitMode?o.MODE_SPLIT:9].includes(t+1)?t+=1:t=o.MODE_WYSIWYG,this.setMode(t)}setDisabled(t){this.o.disabled=t;let i=this.__wasReadOnly;this.setReadOnly(t||i),this.__wasReadOnly=i,this.editor&&(this.editor.setAttribute("aria-disabled",t.toString()),this.container.classList.toggle("jodit_disabled",t),this.e.fire("disabled",t))}getDisabled(){return this.o.disabled}setReadOnly(t){this.__wasReadOnly!==t&&(this.__wasReadOnly=t,this.o.readonly=t,t?this.editor&&this.editor.removeAttribute("contenteditable"):this.editor&&this.editor.setAttribute("contenteditable","true"),this.e&&this.e.fire("readonly",t))}getReadOnly(){return this.o.readonly}focus(){this.getMode()!==o.MODE_SOURCE&&this.s.focus()}get isFocused(){return this.s.isFocused()}beforeInitHook(){}afterInitHook(){}initOptions(t){this.options=(0,l.ConfigProto)(t||{},d.Config.defaultOptions)}initOwners(){this.editorWindow=this.o.ownerWindow,this.ownerWindow=this.o.ownerWindow}addPlace(t,i){let n=(0,l.resolveElement)(t,this.o.shadowRoot||this.od);this.attachEvents(i),n.attributes&&(0,l.toArray)(n.attributes).forEach(t=>{let n=t.name,r=t.value;void 0===d.Config.defaultOptions[n]||i&&void 0!==i[n]||(-1!==["readonly","disabled"].indexOf(n)&&(r=""===r||"true"===r),/^[0-9]+(\.)?([0-9]+)?$/.test(r.toString())&&(r=Number(r)),this.options[n]=r)});let r=this.c.div("jodit-container");r.classList.add("jodit"),r.classList.add("jodit-container"),r.classList.add(`jodit_theme_${this.o.theme||"default"}`),b(this.o.className,r),this.o.containerStyle&&(0,l.css)(r,this.o.containerStyle);let{styleValues:o}=this.o;Object.keys(o).forEach(t=>{let i=(0,l.kebabCase)(t);r.style.setProperty(`--jd-${i}`,o[t])}),r.setAttribute("contenteditable","false");let s=null;this.o.inline&&(-1===["TEXTAREA","INPUT"].indexOf(n.nodeName)&&(r=n,n.setAttribute(m,n.className.toString()),s=r.innerHTML,r.innerHTML=""),r.classList.add("jodit_inline"),r.classList.add("jodit-container")),n!==r&&(n.style.display&&n.setAttribute(f,n.style.display),n.style.display="none");let a="workplace-slot",u=this.c.div(this.getFullElName(a,"top"),g);r.appendChild(u);let c=this.c.div(this.getFullElName(a,"center"),g),p=this.c.div("jodit-workplace",g),v=this.c.div(this.getFullElName(a,"left"),g),y=this.c.div(this.getFullElName(a,"right"),g);c.appendChild(v),c.appendChild(p),c.appendChild(y),r.appendChild(c);let _=this.c.div(this.getFullElName(a,"bottom"),g);r.appendChild(_),n.parentNode&&n!==r&&n.parentNode.insertBefore(r,n),Object.defineProperty(n,"component",{enumerable:!1,configurable:!0,value:this});let C=this.c.div("jodit-wysiwyg",{contenteditable:!0,"aria-disabled":!1,tabindex:this.o.tabIndex});p.appendChild(C);let w={editor:C,element:n,container:r,workplace:p,slots:{top:u,bottom:_,center:c,left:v,right:y},statusbar:new h.StatusBar(this,r),options:this.isReady?(0,l.ConfigProto)(i||{},d.Config.defaultOptions):this.options,history:new h.History(this),editorWindow:this.ow};this.__elementToPlace.set(C,w),this.setCurrentPlace(w),this.places.push(w),this.setNativeEditorValue(this.getElementValue());let F=this.__initEditor(s),E=this.options,k=()=>{E.enableDragAndDropFileToEditor&&E.uploader&&(E.uploader.url||E.uploader.insertImageAsBase64URI)&&this.uploader.bind(this.editor),this.__elementToPlace.get(this.editor)||this.__elementToPlace.set(this.editor,w),this.e.fire("afterAddPlace",w)};return(0,l.callPromise)(F,k)}addDisclaimer(t){this.workplace.appendChild(t)}setCurrentPlace(t){this.currentPlace!==t&&(this.isEditorMode()||this.setMode(o.MODE_WYSIWYG),this.currentPlace=t,this.buildToolbar(),this.isReady&&this.e.fire("changePlace",t))}__initEditor(t){let i=this.__createEditor();return(0,l.callPromise)(i,()=>{if(this.isInDestruct)return;if(this.element!==this.container){let t=this.getElementValue();t!==this.getEditorValue()&&this.setEditorValue(t)}else null!=t&&this.setEditorValue(t);let i=this.o.defaultMode;if(this.o.saveModeInStorage){let t=this.storage.get("jodit_default_mode");"string"==typeof t&&(i=parseInt(t,10))}this.setMode(i),this.o.readonly&&(this.__wasReadOnly=!1,this.setReadOnly(!0)),this.o.disabled&&this.setDisabled(!0);try{this.ed.execCommand("defaultParagraphSeparator",!1,this.o.enter.toLowerCase())}catch(t){}})}__createEditor(){let t=this.editor,i=this.e.fire("createEditor",this);return(0,l.callPromise)(i,()=>{!this.isInDestruct&&((!1===i||(0,l.isPromise)(i))&&h.Dom.safeRemove(t),b(this.o.editorClassName,this.editor),this.o.style&&(0,l.css)(this.editor,this.o.style),this.e.on("synchro",()=>{this.setEditorValue()}).on("focus",()=>{this.editorIsActive=!0}).on("blur",()=>this.editorIsActive=!1),this.__prepareWYSIWYGEditor(),this.o.triggerChangeEvent&&this.e.on("change",this.async.debounce(()=>{this.e&&this.e.fire(this.element,"change")},this.defaultTimeout)))})}__prepareWYSIWYGEditor(){let{editor:t}=this;if(this.o.direction){let t="rtl"===this.o.direction.toLowerCase()?"rtl":"ltr";this.editor.style.direction=t,this.editor.setAttribute("dir",t),this.container.style.direction=t,this.container.setAttribute("dir",t),this.toolbar.setDirection(t)}this.e.on(t,"mousedown touchstart focus",()=>{let i=this.__elementToPlace.get(t);i&&this.setCurrentPlace(i)}).on(t,"compositionend",this.synchronizeValues).on(t,"selectionchange selectionstart keydown keyup input keypress dblclick mousedown mouseup click copy cut dragstart drop dragover paste resize touchstart touchend focus blur",t=>{if(!this.o.readonly&&!this.__isSilentChange&&(!(t instanceof this.ew.KeyboardEvent)||!t.isComposing)&&this.e&&this.e.fire){if(!1===this.e.fire(t.type,t))return!1;this.synchronizeValues()}})}fetch(t,i){let n=new u.Ajax(function(t){for(var i=1;i<arguments.length;i++){var n=null!=arguments[i]?arguments[i]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),r.forEach(function(i){var r;r=n[i],i in t?Object.defineProperty(t,i,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[i]=r})}return t}({url:t},i),this.o.defaultAjaxOptions),r=()=>{this.e.off("beforeDestruct",r),this.progressbar.progress(100).hide(),n.destruct()};this.e.one("beforeDestruct",r),this.progressbar.show().progress(30);let o=n.send();return o.finally(r).catch(()=>null),o}destruct(){var t,i;if(this.isInDestruct)return;this.setStatus(h.STATUSES.beforeDestruct),this.__elementToPlace.clear(),null==(t=(0,s.cached)(this,"storage"))||t.clear(),null==(i=(0,s.cached)(this,"buffer"))||i.clear(),this.commands.clear(),this.__selectionLocked=null,this.e.off(this.ow,"resize"),this.e.off(this.ow),this.e.off(this.od),this.e.off(this.od.body);let n=this.editor?this.getEditorValue():"";this.places.forEach(({container:t,workplace:i,statusbar:r,element:o,iframe:s,editor:a,history:u})=>{if(o){if(o!==t)if(o.hasAttribute(f)){let t=(0,l.attr)(o,f);t&&(o.style.display=t,o.removeAttribute(f))}else o.style.display="";else o.hasAttribute(m)&&(o.className=(0,l.attr)(o,m)||"",o.removeAttribute(m));o.hasAttribute("style")&&!(0,l.attr)(o,"style")&&o.removeAttribute("style"),r.destruct(),this.e.off(t),this.e.off(o),this.e.off(a),h.Dom.safeRemove(i),h.Dom.safeRemove(a),t!==o&&h.Dom.safeRemove(t),Object.defineProperty(o,"component",{enumerable:!1,configurable:!0,value:null}),h.Dom.safeRemove(s),t===o&&(o.innerHTML=n),u.destruct()}}),this.places.length=0,this.currentPlace={},delete a.instances[this.id],super.destruct()}constructor(t,i){super(i,!0),this.isJodit=!0,this.commands=new Map,this.__selectionLocked=null,this.__wasReadOnly=!1,this.editorIsActive=!1,this.__mode=o.MODE_WYSIWYG,this.__callChangeCount=0,this.__isSilentChange=!1,this.currentPlace={options:this.__options,container:this.__container},this.places=[],this.__elementToPlace=new Map;try{const i=(0,l.resolveElement)(t,this.options.shadowRoot||this.od);if(r.isJoditAssigned(i))return i.component}catch(t){if(!o.IS_PROD)throw t;throw this.destruct(),t}this.setStatus(h.STATUSES.beforeInit),this.id=(0,l.attr)((0,l.resolveElement)(t,this.o.shadowRoot||this.od),"id")||new Date().getTime().toString(),a.instances[this.id]=this,this.attachEvents(i),this.e.on(this.ow,"resize",()=>{this.e&&this.e.fire("resize")}),this.e.on("prepareWYSIWYGEditor",this.__prepareWYSIWYGEditor),this.selection=new h.Selection(this);const n=this.beforeInitHook();(0,l.callPromise)(n,()=>{if(this.isInDestruct)return;this.e.fire("beforeInit",this),a.pluginSystem.__init(this),this.e.fire("afterPluginSystemInit",this),this.e.on("changePlace",()=>{this.setReadOnly(this.o.readonly),this.setDisabled(this.o.disabled)}),this.places.length=0;let n=this.addPlace(t,i);a.instances[this.id]=this;let r=()=>{this.isInDestruct||(this.e&&this.e.fire("afterInit",this),(0,l.callPromise)(this.afterInitHook()),this.setStatus(h.STATUSES.ready),this.e.fire("afterConstructor",this))};(0,l.callPromise)(n,r)})}};function b(t,i){t&&t.split(/\s+/).forEach(t=>i.classList.add(t))}Jodit.fatMode=o.FAT_MODE,Jodit.plugins=a.pluginSystem,Jodit.modules=a.modules,Jodit.ns=a.modules,Jodit.decorators={},Jodit.constants=o,Jodit.instances=a.instances,Jodit.lang=o.lang,Jodit.core={Plugin:h.Plugin},p([s.cache],Jodit.prototype,"createInside",null),p([s.cache],Jodit.prototype,"message",null),p([s.cache],Jodit.prototype,"s",null),p([s.cache],Jodit.prototype,"uploader",null),p([s.cache],Jodit.prototype,"filebrowser",null),p([(0,s.throttle)()],Jodit.prototype,"synchronizeValues",null),p([(0,s.watch)(":internalChange")],Jodit.prototype,"updateElementValue",null),p([s.autobind],Jodit.prototype,"__prepareWYSIWYGEditor",null),Jodit=r=p([(0,s.derive)(c.Dlgs)],Jodit)},2525:function(t,i,n){"use strict";n.d(i,{UIBlock:function(){return r.UIBlock},UICheckbox:function(){return s.UICheckbox},UIFileInput:function(){return s.UIFileInput},UIForm:function(){return o.UIForm},UIInput:function(){return s.UIInput},UISelect:function(){return s.UISelect},UITextArea:function(){return s.UITextArea}});var r=n(19070),o=n(86327),s=n(8959)},2536:function(t,i){"use strict";i.default={"copy-format":"Copiar formato"}},2621:function(t,i,n){"use strict";n.d(i,{IndexedDBProvider:function(){return a},canUseIndexedDB:function(){return c},clearUseIndexedDBCache:function(){return u}});var r=n(82758);function o(t,i,n,r,o,s,a){try{var l=t[s](a),u=l.value}catch(t){n(t);return}l.done?i(u):Promise.resolve(u).then(r,o)}function s(t){return function(){var i=this,n=arguments;return new Promise(function(r,s){var a=t.apply(i,n);function l(t){o(a,r,s,l,u,"next",t)}function u(t){o(a,r,s,l,u,"throw",t)}l(void 0)})}}class a{getDB(){return this.dbPromise||(this.dbPromise=new Promise((t,i)=>{let n=indexedDB.open(this.dbName,this.DB_VERSION);n.onerror=()=>{i(n.error)},n.onsuccess=()=>{t(n.result)},n.onupgradeneeded=t=>{let i=t.target.result;i.objectStoreNames.contains(this.storeName)||i.createObjectStore(this.storeName)}})),this.dbPromise}performTransaction(t,i){return s(function*(){try{let n=(yield this.getDB()).transaction([this.storeName],t).objectStore(this.storeName),r=i(n);return new Promise((t,i)=>{r.onsuccess=()=>{t(r.result)},r.onerror=()=>{i(r.error)}})}catch(t){return Promise.reject(t)}}).call(this)}set(t,i){return s(function*(){try{yield this.performTransaction("readwrite",n=>n.put(i,t))}catch(t){r.IS_PROD}return this}).call(this)}delete(t){return s(function*(){try{yield this.performTransaction("readwrite",i=>i.delete(t))}catch(t){}return this}).call(this)}get(t){return s(function*(){try{return yield this.performTransaction("readonly",i=>i.get(t))}catch(t){return}}).call(this)}exists(t){return s(function*(){try{let i=yield this.performTransaction("readonly",i=>i.get(t));return void 0!==i}catch(t){return!1}}).call(this)}clear(){return s(function*(){try{yield this.performTransaction("readwrite",t=>t.clear())}catch(t){}return this}).call(this)}close(){return s(function*(){if(this.dbPromise){try{(yield this.dbPromise).close()}catch(t){}this.dbPromise=null}}).call(this)}keys(){return s(function*(){try{let t=yield this.performTransaction("readonly",t=>t.getAllKeys());return t&&"object"==typeof t&&"then"in t&&(t=yield t),t.map(t=>String(t))}catch(t){return[]}}).call(this)}values(){return s(function*(){try{let t=yield this.performTransaction("readonly",t=>t.getAll());return t&&"object"==typeof t&&"then"in t&&(t=yield t),t}catch(t){return[]}}).call(this)}entries(){return s(function*(){try{let[t,i]=yield Promise.all([this.keys(),this.values()]);return t.map((t,n)=>[t,i[n]])}catch(t){return[]}}).call(this)}constructor(t="JoditDB",i="keyValueStore"){this.dbName=t,this.dbPromise=null,this.DB_VERSION=1,this.storeName=i}}let l=null;function u(){l=null}function c(){return s(function*(){if(null!=l)return l;try{if("u"<typeof indexedDB)return l=!1,!1;let t="___Jodit___"+Math.random().toString(),i=indexedDB.open(t);return l=yield new Promise(n=>{i.onerror=()=>{n(!1)},i.onsuccess=()=>{indexedDB.deleteDatabase(t),n(!0)}})}catch(t){return l=!1,!1}})()}},2692:function(t,i,n){"use strict";n.d(i,{JoditPro:function(){return u}});var r=n(77688),o=n(82758),s=n(63799),a=n(41180),l=n(86019);class u extends l.Jodit{static make(t,i){return new this(t,i)}beforeInitHook(){if(o.IS_PROD&&!o.IS_TEST&&this.o.loadExternalConfig)return(0,s.appendScriptAsync)(this,this.basePath+"config.js")}afterInitHook(){(0,r._)(function*(){if((yield this.e.fire("checkReserve",location.host))!=="normal"){if(this.isInDestruct)return;let t=this.c.div("",'Trial version. Buy <a href="https://xdsoft.net/jodit/pro/">Jodit Pro</a>');o.IS_TEST||o.IS_PROD,(0,a.css)(t,{position:"absolute",color:"red",right:10,bottom:10}),this.addDisclaimer(t)}}).call(this).catch(()=>null),super.afterInitHook()}getVersion(){return"PRO "+o.APP_VERSION}}},2748:function(t,i,n){"use strict";n.d(i,{Dom:function(){return y}});var r=n(82758),o=n(4510),s=n(68345),a=n(23282),l=n(58487),u=n(42320),c=n(70799),d=n(86068),h=n(49055),p=n(38837),f=n(29960),m=n(41180),g=n(86583),b=n(89890),v=n(37790);class y{static detach(t){for(;t&&t.firstChild;)t.removeChild(t.firstChild)}static wrapNextInline(t,i,n){let r,o=t;n.s.save();let s=!1;do s=!1,(r=o.nextSibling)&&!y.isBlock(r)&&!y.isTag(r,"br")&&(s=!0,o=r);while(s);return y.__wrapElements(i,n,t,o)}static __wrapElements(t,i,n,r){let o=(0,c.isString)(t)?i.createInside.element(t):t;n.parentNode&&n.parentNode.insertBefore(o,n);let s=n;for(;s&&(s=n.nextSibling,o.appendChild(n),n!==r&&s);)n=s;return i.s.restore(),o}static wrapInline(t,i,n){let r,o=t,s=t;n.s.save();let a=!1;do a=!1,(r=o.previousSibling)&&!y.isBlock(r)&&(a=!0,o=r);while(a);do a=!1,(r=