jodit-pro 1.2.13 → 1.2.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/jodit.css +1 -1
- package/build/jodit.es5.css +2 -2
- package/build/jodit.es5.js +1 -1
- package/build/jodit.fat.css +1 -1
- package/build/jodit.fat.es5.css +1 -1
- package/build/jodit.fat.es5.js +1 -1
- package/build/jodit.fat.js +1 -1
- package/build/jodit.js +1 -1
- package/build/plugins/backup/backup.es5.js +1 -1
- package/build/plugins/backup/backup.js +1 -1
- package/build/plugins/button-generator/button-generator.es5.js +1 -1
- package/build/plugins/finder/finder.es5.js +1 -1
- package/build/plugins/highlight-signature/highlight-signature.es5.js +1 -1
- package/build/plugins/highlight-signature/highlight-signature.js +1 -1
- package/build/plugins/keyboard/keyboard.es5.js +1 -1
- package/build/plugins/paste-code/paste-code.css +1 -0
- package/build/plugins/paste-code/paste-code.es5.css +1 -0
- package/build/plugins/paste-code/paste-code.es5.js +1 -1
- package/build/plugins/paste-code/paste-code.js +1 -1
- package/build/plugins/tune-block/tune-block.es5.js +1 -1
- package/build/plugins/tune-block/tune-block.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var o=t();for(var n in o)("object"==typeof exports?exports:e)[n]=o[n]}}(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[524],{469:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileBrowserPro=void 0;var n=o(1);o(470),o(471);var r=o(15),i=o(195),s=o(474),a=o(24),c=o(46),l=o(14),u=o(503),h=o(504),d=o(227),p=o(13),f=o(506),v=o(221),m=o(508),g=o(509),y=o(510),_=o(511),w=o(2),b=o(466),I=o(512),S=o(514),C=function(e){function t(t){var o=e.call(this,(0,a.ConfigProto)(Object.assign(t||{},{resizable:!0,draggable:!0,toolbarButtons:(null==t?void 0:t.buttons)||p.Config.defaultOptions.filebrowser.buttons,buttons:w.Jodit.atom(["filebrowser.settings","fullsize","dialog.close"])}),p.Config.defaultOptions.filebrowser))||this;return o.dataProvider=(0,v.makeDataProvider)(o,o.options),o.state=r.ObserveObject.create({onSelectCallBack:null,theme:"default",showSideBar:!0,showFavorites:!0,showSettings:!1,showPreview:!1,withFolders:!0,foldersPosition:"bottom",info:"",metaInfo:null,currentPath:"",currentSource:"",currentBaseUrl:"",tree:[],activeElements:[],favorites:[],progress:0,lastSelectedIndex:0,elements:[],messages:[],sources:[],view:"tiles",tileSize:"default",sortBy:"name-asc",filterWord:"",onlyImages:!1},["state"]),o.persistent=new m.PersistentStore(o,o.state),o.loadingManager=new S.LoadingManager(o,o.state),o.stateManager=new u.StateManager(o.state),o.historyManager=new g.HistoryManager(o,o.state),o.contextMenuManager=new y.ContextMenuManager(o),o.header=new h.UIBrowserHeader(o,o.options,o.stateManager),o.panel=new s.UIBrowserPanel(o,o.stateManager),o.files=o.panel,o.tree=o.panel,o.progressbar=new f.UIProgress(o,o.stateManager.state),b.license.make(o),!o.persistent.theme&&o.options.theme&&(o.persistent.theme=o.options.theme),o.panel.append(o.progressbar),o.toolbar.setMod("mode","header"),o.setSize(Math.min(o.options.width,screen.width),Math.min(o.options.height,screen.height)).setHeader(o.header),o.onResizeWindow(),o.initUploader(),o.onChangeTheme(),o.fullFillOptions(),o.dataProvider.onProgress((function(e){0===e&&(e=30),o.state.progress=e})),o.e.on("beforeClose",o.removeGlobalListeners),o.e.fire("afterInit"),w.Jodit.prototype.afterInitHook.call(o),o}return(0,n.__extends)(t,e),t.prototype.className=function(){return"FileBrowserPro"},t.prototype.lock=function(t){return void 0===t&&(t="any"),this.container.classList.add("jodit_disabled"),e.prototype.lock.call(this,t)},t.prototype.unlock=function(){return this.container.classList.remove("jodit_disabled"),e.prototype.unlock.call(this)},t.prototype.status=function(e,t){var o=this;void 0===t&&(t=!(e instanceof Error)),Error;var n={message:(0,a.isString)(e)?e:e.message,type:t?"success":"error"};this.stateManager.addMessage(n),this.async.setTimeout((function(){o.stateManager.removeMessage(n)}),this.options.howLongShowMsg)},t.prototype.addDisclaimer=function(e){this.dialog.appendChild(e)},t.prototype.open=function(t,o){return void 0===t&&(t=this.o.defaultCallback),(0,n.__awaiter)(this,void 0,Promise,(function(){return(0,n.__generator)(this,(function(n){return this.state.onlyImages=Boolean(o),this.prepareOpening(t),e.prototype.open.call(this,this.panel.container),[2,this.e.fire("update.filebrowser")]}))}))},t.prototype.onResizeWindow=function(){(0,a.css)(this.dialog,{maxWidth:screen.width,minHeight:Math.min(this.options.height,screen.height),minWidth:Math.min(this.options.width,screen.width)})},t.prototype.onChangePath=function(){var e=this.state,t=e.currentSource;this.uploader.setPath(e.currentPath),this.uploader.setSource(t)},t.prototype.onChangeTheme=function(){this.setMod("theme",this.state.theme),this.header.setMod("theme",this.state.theme),this.panel.setMod("theme",this.state.theme),this.options.theme=this.state.theme},t.prototype.onToggleSettings=function(){this.state.showSettings=!this.state.showSettings},t.prototype.prepareOpening=function(e){var t=this;this.registerGlobalListeners(),e&&(this.state.onSelectCallBack=function(o){t.close(),e(o)}),this.persistent.syncWithState()},t.prototype.registerGlobalListeners=function(){this.e.on(this.ow,"keydown",this.onKeyPress)},t.prototype.onKeyPress=function(e){var t=this.od.activeElement;if(this.state.activeElements.length&&t&&r.Dom.isOrContains(this.panel.items.container,t)){var o=this.state.elements;switch(e.key){case l.KEY_ENTER:return this.onChooseItems();case l.KEY_DELETE:return this.onFileRemove();case l.KEY_RIGHT:case l.KEY_LEFT:case l.KEY_DOWN:case l.KEY_UP:var n=e.key===l.KEY_RIGHT||e.key===l.KEY_DOWN,i=this.state.lastSelectedIndex,s=void 0;if([l.KEY_RIGHT,l.KEY_LEFT].includes(e.key))s=n?o[i+1]?i+1:0:o[i-1]?i-1:o.length-1;else{var a=this.panel.countInRow;s=Math.round(((i+1)/a+(n?1:-1))*a-1)}return o[s]&&this.stateManager.addActive(o[s],e.shiftKey),!1}}},t.prototype.removeGlobalListeners=function(){this.e.off(this.ow,"keydown",this.onKeyPress)},t.prototype.onFileRemove=function(){var e=this;this.state.activeElements.length&&(0,r.Confirm)(this.i18n("Are you sure?"),"",(function(t){if(t){var o=[];e.state.activeElements.forEach((function(t){e.stateManager.isFavorite(t)&&e.stateManager.toggleFavorite(t),o.push(e.deleteFile(t.file||t.name||"",t.sourceName))})),e.state.activeElements=[],Promise.all(o).then((function(){e.loadingManager.loadItems()}))}})).bindDestruct(this)},t.prototype.onFileEdit=function(){if(1===this.state.activeElements.length){var e=(0,n.__read)(this.state.activeElements,1)[0];d.openImageEditor.call(this,e.fileURL,e.file||"",e.path,e.sourceName,void 0,this.status)}},t.prototype.onFolderRename=function(e){var t=this;(0,r.Prompt)(this.i18n("Enter new name"),this.i18n("Rename"),(function(o){if(!(0,a.isValidName)(o)||o===e.name)return t.status(t.i18n("Enter new name")),!1;t.dataProvider.folderRename((0,_.parentPath)(e.path),e.name,o,e.sourceName).then((function(n){t.state.activeElements=[],t.status(n,!0),t.state.currentPath=(0,_.parentPath)(e.path)+"/"+o,t.state.currentSource=e.sourceName,t.historyManager.updateCurrent(),t.loadingManager.loadFolders()})).catch(t.status)}),this.i18n("type name"),e.name).bindDestruct(this)},t.prototype.onFolderRemove=function(e){var t=this;(0,r.Confirm)(this.i18n("Are you sure?"),this.i18n("Delete"),(function(o){o&&t.dataProvider.folderRemove((0,_.parentPath)(e.path),e.name,e.sourceName).then((function(o){t.status(o,!0),t.state.currentPath=(0,_.parentPath)(e.path),t.state.currentSource=e.sourceName,t.loadingManager.loadFolders()})).catch(t.status)})).bindDestruct(this)},t.prototype.onFolderCreate=function(e){var t=this;(0,r.Prompt)(this.i18n("Enter Directory name"),this.i18n("Create directory"),(function(o){var n=e.path||"/";t.dataProvider.createFolder(o,e.path||"/",e.sourceName).then((function(){t.state.currentSource===e.sourceName&&t.state.currentPath===n?t.e.fire("update.filebrowser"):(t.state.currentSource=e.sourceName,t.state.currentPath=n),t.historyManager.updateCurrent()}),t.status)}),this.i18n("type name")).bindDestruct(this)},t.prototype.onFileRename=function(e){var t=this,o=e.file||e.name||"";1===this.state.activeElements.length&&o&&(0,r.Prompt)(this.i18n("Enter new name"),this.i18n("Rename"),(function(e){if(!(0,a.isValidName)(e))return t.status(t.i18n("Enter new name")),!1;t.dataProvider.fileRename(t.state.currentPath,o,e,t.state.currentSource).then((function(e){t.state.activeElements=[],t.status(e,!0),t.loadingManager.loadItems()})).catch(t.status)}),this.i18n("type name"),o).bindDestruct(this)},t.prototype.onChooseItems=function(){var e=this.stateManager.state.activeElements;if(e.length){if("folder"===e[0].type)return this.state.currentPath=this.state.currentPath+"/"+e[0].name,this.state.currentSource=e[0].sourceName,void this.e.fire("afterOpenFolder.filebrowser");this.state.onSelectCallBack?this.stateManager.callSelectHandler():this.onOpenLightBox(e[0])}},t.prototype.onOpenLightBox=function(e){I.UILightBox.open(this,e,this.state.elements)},t.prototype.deleteFile=function(e,t){var o=this;return this.dataProvider.fileRemove(this.state.currentPath,e,t).then((function(t){o.status(t||o.i18n('File "%s" was deleted',e),!0)})).catch(this.status)},t.prototype.initUploader=function(){var e=this,t=this,o=(0,a.ConfigProto)(t.o.uploader||{},p.Config.defaultOptions.uploader),n=function(){return e.loadingManager.loadItems()};t.uploader=t.getInstance("Uploader",o),t.uploader.bind(t.panel.container,n,t.status),t.e.on("bindUploader.filebrowser",(function(e){t.uploader.bind(e,n,t.status)}))},t.prototype.destruct=function(){this.removeGlobalListeners(),this.header.destruct(),this.panel.destruct(),e.prototype.destruct.call(this)},t.prototype.fullFillOptions=function(){var e=this;["getLocalFileByUrl","crop","resize","create","fileMove","folderMove","fileRename","folderRename","fileRemove","folderRemove","folder","items","permissions"].forEach((function(t){null!=e.options[t]&&(e.options[t]=(0,a.ConfigProto)(e.options[t],e.o.ajax))}))},(0,n.__decorate)([c.autobind],t.prototype,"status",null),(0,n.__decorate)([(0,c.watch)(":resize",window)],t.prototype,"onResizeWindow",null),(0,n.__decorate)([(0,c.watch)(["state.currentPath","state.currentSource"])],t.prototype,"onChangePath",null),(0,n.__decorate)([(0,c.watch)("state.theme")],t.prototype,"onChangeTheme",null),(0,n.__decorate)([(0,c.watch)(":toggleSettings.filebrowser")],t.prototype,"onToggleSettings",null),(0,n.__decorate)([c.autobind],t.prototype,"onKeyPress",null),(0,n.__decorate)([c.autobind],t.prototype,"removeGlobalListeners",null),(0,n.__decorate)([(0,c.watch)(":fileRemove.filebrowser")],t.prototype,"onFileRemove",null),(0,n.__decorate)([(0,c.watch)(":edit.filebrowser")],t.prototype,"onFileEdit",null),(0,n.__decorate)([(0,c.watch)(":folderRename.filebrowser")],t.prototype,"onFolderRename",null),(0,n.__decorate)([(0,c.watch)(":folderRemove.filebrowser")],t.prototype,"onFolderRemove",null),(0,n.__decorate)([(0,c.watch)(":folderCreate.filebrowser")],t.prototype,"onFolderCreate",null),(0,n.__decorate)([(0,c.watch)(":fileRename.filebrowser")],t.prototype,"onFileRename",null),(0,n.__decorate)([(0,c.watch)(":select.filebrowser")],t.prototype,"onChooseItems",null),(0,n.__decorate)([(0,c.watch)(":openLightBox.filebrowser")],t.prototype,"onOpenLightBox",null),(0,n.__decorate)([c.component],t)}(i.Dialog);t.FileBrowserPro=C,w.Jodit.modules.FileBrowserPro=C},515:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(13);(0,o(35).extendLang)(o(516));var r=n.Config.prototype.controls.filebrowser;r.settings={icon:"settings",exec:function(e){e.e.fire("toggleSettings.filebrowser")}},r.home={icon:"home",exec:function(e){e.e.fire("goHome.filebrowser")}},r.preview={icon:"eye",exec:function(e){e.e.fire("togglePreview.filebrowser")}},r.next={icon:"angle-right",isDisabled:function(e){return!e.historyManager.canNext()},exec:function(e){e.historyManager.next()}},r.previous={icon:"angle-left",isDisabled:function(e){return!e.historyManager.canPrevious()},exec:function(e){e.historyManager.previous()}},Object.assign(n.Config.prototype.filebrowser,{buttons:["filebrowser.home","filebrowser.previous","filebrowser.next","|","filebrowser.upload","filebrowser.remove","filebrowser.update","filebrowser.select","filebrowser.edit","|","filebrowser.preview","about"],sort:!1,pixelOffsetLoadNewChunk:200,width:750,height:400,previewOfficeURL:"https://view.officeapps.live.com/op/view.aspx?src="})},468:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.finder=void 0;var n=o(1),r=o(216),i=o(469),s=o(2);o(515);var a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.requires=["license"],t.hasStyle=!s.Jodit.fatMode,t}return(0,n.__extends)(t,e),t.prototype.afterInit=function(e){var t=this;e.e.on("getInstanceFileBrowser",(function(e){return t.__instance||(t.__instance=new i.FileBrowserPro(e)),t.__instance}))},t.prototype.beforeDestruct=function(e){var t;e.e.off("getInstanceFileBrowser"),null===(t=this.__instance)||void 0===t||t.destruct()},t}(r.Plugin);t.finder=a,s.Jodit.plugins.add("finder",a)},510:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContextMenuManager=void 0;var n=o(1),r=o(221),i=o(32),s=o(46),a=o(227),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,n.__extends)(t,e),t.prototype.className=function(){return"ContextMenuManager"},t.prototype.onFolderContext=function(e,t){return this.buildContextItemMenu(this.getFolderContextActions(e),t),!1},t.prototype.onItemContext=function(e,t,o){return this.buildContextItemMenu(this.getItemContextActions(e),o),!1},t.prototype.onSourceContext=function(e,t){return this.buildContextItemMenu(this.getSourceContextActions(e),t),!1},t.prototype.buildContextItemMenu=function(e,t){if(this.j.o.contextMenu){var o=(0,r.makeContextMenu)(this.j).setMod("theme",this.j.state.theme);o.show(t.clientX,t.clientY,e.filter((function(e){return e&&!1!==e.enabled}))),this.j.e.on(this.j,"afterClose",(function(){o.isOpened&&o.close()}))}},t.prototype.getItemContextActions=function(e){var t=this;if(this.j.stateManager.isActive(e)||this.j.stateManager.addActive(e,this.j.state.activeElements.length>1),"folder"===e.type)return this.getFolderContextActions({type:"directory",children:[],name:e.name||"",path:e.path,sourceName:e.sourceName});var o=this.j.options,n=this.j.dataProvider,r=1===this.j.state.activeElements.length;return[{icon:"pencil",title:"Edit",enabled:Boolean(e.isImage)&&o.editImage&&r&&(n.canI("ImageResize")||n.canI("ImageCrop")),exec:function(){a.openImageEditor.call(t.j,e.imageURL,e.name||"",t.j.state.currentPath,t.j.state.currentSource)}},{icon:"italic",title:"Rename",enabled:n.canI("FileRename")&&r,exec:function(){return t.j.e.fire("fileRename.filebrowser",e)}},{icon:"bin",title:"Delete",enabled:n.canI("FileRemove"),exec:function(){return t.j.e.fire("fileRemove.filebrowser",e)}},{icon:"eye",title:"Preview",enabled:Boolean(e.isImage||"file"===e.type)&&o.preview&&r,exec:function(){return t.j.e.fire("openLightBox.filebrowser",e)}},{icon:"upload",title:"Download",exec:function(){e.fileURL&&t.j.ow.open(e.fileURL)}}]},t.prototype.getFolderContextActions=function(e){var t=this,o=this.j.dataProvider;return[{icon:"pencil",title:"Rename",exec:function(){t.j.e.fire("folderRename.filebrowser",e)},enabled:o.canI("FolderRename")},{icon:"bin",title:"Delete",exec:function(){t.j.e.fire("folderRemove.filebrowser",e)},enabled:o.canI("FolderRemove")},{icon:"plus",title:"Add folder",exec:function(){t.j.e.fire("folderCreate.filebrowser",e)},enabled:o.canI("FolderCreate")}]},t.prototype.getSourceContextActions=function(e){var t=this;return[{icon:"plus",title:"Create folder",exec:function(){t.j.e.fire("folderCreate.filebrowser",e)}}]},(0,n.__decorate)([(0,s.watch)(":contextmenuFolder.filebrowser")],t.prototype,"onFolderContext",null),(0,n.__decorate)([(0,s.watch)(":contextmenuItem.filebrowser")],t.prototype,"onItemContext",null),(0,n.__decorate)([(0,s.watch)(":contextmenuSource.filebrowser")],t.prototype,"onSourceContext",null),(0,n.__decorate)([s.component],t)}(i.ViewComponent);t.ContextMenuManager=c},511:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parentPath=void 0,t.parentPath=function(e){var t=e.split("/").filter((function(e){return e.length}));return t.pop(),t.join("/")||"/"}},509:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HistoryManager=void 0;var n=o(1),r=o(24),i=o(32),s=o(46),a=function(e){function t(t,o){var n=e.call(this,t)||this;return n.state=o,n.history=[],n.historyIndex=0,n}return(0,n.__extends)(t,e),t.prototype.className=function(){return"HistoryManager"},t.prototype.canNext=function(){return this.history.length-1>this.historyIndex},t.prototype.canPrevious=function(){return this.historyIndex>0},t.prototype.push=function(e){var t=this.historyIndex,o=this.history[t];if(!o||o.currentSource!==e.currentSource||o.currentPath!==e.currentPath){var r=(0,n.__spreadArray)([],(0,n.__read)(this.history),!1);r.length-1!==t&&(r=r.slice(0,t+1)),r.push(e),o&&(t+=1),this.history=r,this.historyIndex=t}},t.prototype.next=function(){this.canNext()&&(this.historyIndex+=1,this.updateState())},t.prototype.previous=function(){this.canPrevious()&&(this.historyIndex-=1,this.updateState())},t.prototype.updateCurrent=function(){this.history[this.historyIndex]={currentSource:this.state.currentSource,currentPath:this.state.currentPath,tree:(0,r.fastClone)(this.state.tree),elements:(0,n.__spreadArray)([],(0,n.__read)(this.state.elements),!1)}},t.prototype.onHome=function(){this.state.currentPath="",this.state.currentSource="",this.j.e.fire("afterOpenFolder.filebrowser update.filebrowser")},t.prototype.onOpenFolder=function(){this.push({tree:[],elements:[],currentPath:this.state.currentPath,currentSource:this.state.currentSource}),this.j.e.fire("changeSelection")},t.prototype.updateState=function(){var e=this.history[this.historyIndex],t=e.tree,o=e.elements,r=e.currentSource,i=e.currentPath;this.state.activeElements=[],this.state.elements=(0,n.__spreadArray)([],(0,n.__read)(o),!1),this.state.tree=(0,n.__spreadArray)([],(0,n.__read)(t),!1),this.state.currentSource=r,this.state.currentPath=i,this.j.e.fire("changeSelection")},(0,n.__decorate)([(0,s.watch)(["state.elements","state.tree"])],t.prototype,"updateCurrent",null),(0,n.__decorate)([(0,s.watch)(":goHome.filebrowser")],t.prototype,"onHome",null),(0,n.__decorate)([(0,s.watch)(":afterOpenFolder.filebrowser")],t.prototype,"onOpenFolder",null),(0,n.__decorate)([s.component],t)}(i.ViewComponent);t.HistoryManager=a},514:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoadingManager=void 0;var n=o(1),r=o(32),i=o(46),s=function(e){function t(t,o){var n=e.call(this,t)||this;return n.state=o,n.offset=0,n.countInOneChunk=20,n.stopLoadingParts=!1,n}return(0,n.__extends)(t,e),t.prototype.className=function(){return"LoadingManager"},t.prototype.onUpdateFileBrowser=function(){return(0,n.__awaiter)(this,void 0,Promise,(function(){return(0,n.__generator)(this,(function(e){switch(e.label){case 0:return this.j.state.activeElements=[],this.j.panel.setMod("loading",!0),[4,Promise.all([this.loadFolders(),this.loadItems()])];case 1:return e.sent(),this.j.panel.setMod("loading",!1),[2]}}))}))},t.prototype.loadFolders=function(){return(0,n.__awaiter)(this,void 0,Promise,(function(){var e,t,o,r,i;return(0,n.__generator)(this,(function(n){switch(n.label){case 0:if(!this.j.isOpened)return[2];t=(e=this.j.state).currentPath,o=e.currentSource,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.j.dataProvider.tree(t,o)];case 2:return r=n.sent(),this.j.stateManager.fillSources(r,t),this.j.state.sources=r,[3,4];case 3:return i=n.sent(),this.j.status(i),[3,4];case 4:return[2]}}))}))},t.prototype.loadItems=function(){return(0,n.__awaiter)(this,void 0,Promise,(function(){var e,t;return(0,n.__generator)(this,(function(o){switch(o.label){case 0:if(!this.j.isOpened)return[2];o.label=1;case 1:return o.trys.push([1,6,,7]),this.offset=0,this.stopLoadingParts=!1,e=this.j.state,[4,this.loadPartItems()];case 2:e.elements=o.sent(),this.stopLoadingParts=this.countInOneChunk>this.j.state.elements.length,o.label=3;case 3:return this.stopLoadingParts||this.j.state.elements.length>this.j.panel.countInColumn*this.j.panel.countInRow?[3,5]:[4,this.loadItemsChunk()];case 4:return o.sent(),[3,3];case 5:return[3,7];case 6:return t=o.sent(),this.j.status(t),[3,7];case 7:return[2]}}))}))},t.prototype.loadItemsChunk=function(){return(0,n.__awaiter)(this,void 0,Promise,(function(){var e,t;return(0,n.__generator)(this,(function(o){switch(o.label){case 0:if(this.stopLoadingParts)return[2];o.label=1;case 1:return o.trys.push([1,3,,4]),this.offset+=this.countInOneChunk,[4,this.loadPartItems()];case 2:return e=o.sent(),this.stopLoadingParts=this.countInOneChunk>e.length,e.length&&(this.j.state.elements=this.j.state.elements.concat(e)),[3,4];case 3:return t=o.sent(),this.j.status(t),[3,4];case 4:return[2]}}))}))},t.prototype.loadPartItems=function(){var e=this.j.state;return this.j.dataProvider.items(e.currentPath,e.currentSource,{offset:this.offset,limit:this.countInOneChunk,sortBy:e.sortBy,withFolders:e.withFolders,foldersPosition:e.foldersPosition,onlyImages:e.onlyImages,filterWord:e.filterWord})},(0,n.__decorate)([(0,i.watch)(":update.filebrowser")],t.prototype,"onUpdateFileBrowser",null),(0,n.__decorate)([(0,i.watch)(["state.currentPath","state.currentSource"]),(0,i.debounce)((function(e){return{timeout:e.defaultTimeout,promisify:!0}}))],t.prototype,"loadFolders",null),(0,n.__decorate)([(0,i.watch)(["state.currentPath","state.currentSource","state.sortBy","state.onlyImages","state.foldersPosition","state.filterWord"]),(0,i.debounce)((function(e){return{timeout:e.defaultTimeout,promisify:!0}}))],t.prototype,"loadItems",null),(0,n.__decorate)([(0,i.debounce)((function(e){return{timeout:e.defaultTimeout,promisify:!0}}))],t.prototype,"loadItemsChunk",null),(0,n.__decorate)([i.component],t)}(r.ViewComponent);t.LoadingManager=s},508:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PersistentStore=void 0;var n=o(1),r=o(32),i=o(46),s=o(223),a=function(e){function t(t,o){var n=e.call(this,t)||this;return n.state=o,n.sortBy="changed-desc",n.view="tiles",n.foldersPosition="top",n.tileSize="default",n.favorites=[],n.showSideBar=!0,n.showPreview=!1,n.showFavorites=!0,n}return(0,n.__extends)(t,e),t.prototype.className=function(){return"PersistentStore"},t.prototype.onChangeThemeSetField=function(){this.theme=this.state.theme},t.prototype.onChangeView=function(){this.view=this.state.view},t.prototype.onChangeSortBy=function(){this.sortBy=this.state.sortBy},t.prototype.onChangeTileSize=function(){this.tileSize=this.state.tileSize},t.prototype.onChangeFavorites=function(){this.favorites=this.state.favorites},t.prototype.onChangeShowSideBar=function(){this.showSideBar=this.state.showSideBar},t.prototype.onChangeShowPreview=function(){this.showPreview=this.state.showPreview},t.prototype.onChangeShowFavorites=function(){this.showFavorites=this.state.showFavorites},t.prototype.onChangeFoldersPosition=function(){this.foldersPosition=this.state.foldersPosition},t.prototype.syncWithState=function(){this.state.tileSize=this.tileSize,this.state.favorites=this.favorites.map((function(e){return e instanceof s.FileBrowserItem?e:s.FileBrowserItem.create(e)})),this.state.view=this.view,this.state.theme=this.theme,this.state.showSideBar=this.showSideBar,this.state.showPreview=this.showPreview,this.state.showFavorites=this.showFavorites,this.state.sortBy=this.sortBy,this.state.foldersPosition=this.foldersPosition},(0,n.__decorate)([i.persistent],t.prototype,"theme",void 0),(0,n.__decorate)([i.persistent],t.prototype,"sortBy",void 0),(0,n.__decorate)([i.persistent],t.prototype,"view",void 0),(0,n.__decorate)([i.persistent],t.prototype,"foldersPosition",void 0),(0,n.__decorate)([i.persistent],t.prototype,"tileSize",void 0),(0,n.__decorate)([i.persistent],t.prototype,"favorites",void 0),(0,n.__decorate)([i.persistent],t.prototype,"showSideBar",void 0),(0,n.__decorate)([i.persistent],t.prototype,"showPreview",void 0),(0,n.__decorate)([i.persistent],t.prototype,"showFavorites",void 0),(0,n.__decorate)([(0,i.watch)("state.theme")],t.prototype,"onChangeThemeSetField",null),(0,n.__decorate)([(0,i.watch)("state.view")],t.prototype,"onChangeView",null),(0,n.__decorate)([(0,i.watch)("state.sortBy")],t.prototype,"onChangeSortBy",null),(0,n.__decorate)([(0,i.watch)("state.tileSize")],t.prototype,"onChangeTileSize",null),(0,n.__decorate)([(0,i.watch)("state.favorites")],t.prototype,"onChangeFavorites",null),(0,n.__decorate)([(0,i.watch)("state.showSideBar")],t.prototype,"onChangeShowSideBar",null),(0,n.__decorate)([(0,i.watch)("state.showPreview")],t.prototype,"onChangeShowPreview",null),(0,n.__decorate)([(0,i.watch)("state.showFavorites")],t.prototype,"onChangeShowFavorites",null),(0,n.__decorate)([(0,i.watch)("state.foldersPosition")],t.prototype,"onChangeFoldersPosition",null),(0,n.__decorate)([i.component],t)}(r.ViewComponent);t.PersistentStore=a},503:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StateManager=void 0;var n=o(1),r=o(46),i=function(){function e(e){this.state=e}return e.prototype.getIndex=function(e,t){return void 0===t&&(t=this.state.elements),t.findIndex((function(t){return t.uniqueHashKey===e.uniqueHashKey}))},e.prototype.isActive=function(e){return Boolean(this.state.activeElements.find((function(t){return t.uniqueHashKey===e.uniqueHashKey})))},e.prototype.isFavorite=function(e){return Boolean(this.state.favorites.find((function(t){return t.uniqueHashKey===e.uniqueHashKey})))},e.prototype.addActive=function(e,t){var o;this.state.metaInfo=e,this.state.info=null!==(o=e.file)&&void 0!==o?o:"",this.state.lastSelectedIndex=this.getIndex(e),this.state.activeElements=t?(0,n.__spreadArray)((0,n.__spreadArray)([],(0,n.__read)(this.state.activeElements),!1),[e],!1):[e]},e.prototype.callSelectHandler=function(){var e,t=this.state.activeElements;null===(e=this.state.onSelectCallBack)||void 0===e||e.call(this,{baseurl:"",files:t.map((function(e){return e.fileURL})),isImages:t.map((function(e){return Boolean(e.isImage)}))})},e.prototype.setFilter=function(e){this.state.filterWord=e},e.prototype.addMessage=function(e){var t,o=this.state.messages;(null===(t=o[o.length-1])||void 0===t?void 0:t.message)!==e.message&&(this.state.messages=(0,n.__spreadArray)((0,n.__spreadArray)([],(0,n.__read)(o),!1),[e],!1))},e.prototype.removeMessage=function(e){var t=this.state.messages.indexOf(e);if(-1!==t){var o=(0,n.__spreadArray)([],(0,n.__read)(this.state.messages),!1);o.splice(t,1),this.state.messages=o}},e.prototype.toggleFavorite=function(e){var t=this.getIndex(e,this.state.favorites),o=(0,n.__spreadArray)([],(0,n.__read)(this.state.favorites),!1);-1===t?o.push(e):o.splice(t,1),this.state.favorites=o},e.prototype.fillSources=function(e,t){var o=this,n=function(e){return e.filter((function(e){return"."!==e&&".."!==e}))};if(this.state.tree.length&&t){var r=function(e,t){var o;return null!==(o=e.find((function(e){return e.name===t})))&&void 0!==o?o:null};this.removeActive(this.state.tree),e.forEach((function(e){var i=r(o.state.tree,e.name);if(i){i.isActive=!0;var s=t.split("/").reduce((function(e,t){return e&&r(e.children,t)}),i);s&&(s.isActive=!0,s.children=n(e.folders).map((function(o){return{type:"directory",name:o,path:t+"/"+o,sourceName:e.name,children:[]}})))}}))}else this.state.tree=e.map((function(e){return{type:"source",name:e.name,title:e.title,sourceName:e.name,path:"/",children:n(e.folders).map((function(t){return{type:"directory",name:t,path:t,sourceName:e.name,children:[]}}))}}))},e.prototype.removeActive=function(e){var t=this;e.forEach((function(e){e.isActive=!1,t.removeActive(e.children)}))},Object.defineProperty(e.prototype,"isFavoriteItems",{get:function(){return this.state.favorites===this.state.elements},enumerable:!1,configurable:!0}),(0,n.__decorate)([r.autobind],e.prototype,"getIndex",null),(0,n.__decorate)([r.autobind],e.prototype,"isActive",null),(0,n.__decorate)([r.autobind],e.prototype,"isFavorite",null),e}();t.StateManager=i},516:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ru=void 0;var n=o(517);t.ru=n},471:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(122),r=o(472),i=o(473);n.Icon.set("heart",String(r)),n.Icon.set("home",String(i))},497:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserFolder=void 0;var n=o(1);o(498);var r=o(122),i=o(46),s=function(e){function t(t,o){var n=e.call(this,t)||this;return n.item=o,n.syncMod=!0,n.getElm("name").innerText=o.name,t.e.on(n.container,"click",(function(){return n.getMod("active")||n.setMod("loading",!0),t.e.fire("openFolder",o)})).on(n.container,"contextmenu",(function(e){return t.e.fire("contextmenuFolder.filebrowser",o,e)})),n}return(0,n.__extends)(t,e),t.prototype.className=function(){return"UIBrowserFolder"},t.prototype.render=function(){return'<div>\n\t\t\t<div class="&__icon">\n\t\t\t\t<div class=\'&__loader\'></div>\n\t\t\t\t<div class="&__icon-wrapper">\n\t\t\t\t\t*folder*\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="&__name"></div>\n\t\t\t<div class="&__arrow">*angle-right*</div>\n\t\t</div>'},(0,n.__decorate)([i.component],t)}(r.UIElement);t.UIBrowserFolder=s},504:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserHeader=void 0;var n=o(1);o(505);var r=o(122),i=o(46),s=o(205),a=function(e){function t(t,o,n){var i,a=e.call(this,t)||this;return a.options=o,a.stateManager=n,a.syncMod=!0,a.toolbar=(0,s.makeCollection)(a.j),a.filter=new r.UIInput(a.j,{icon:"search",placeholder:"Filter",clearButton:!0,onChange:function(e){a.stateManager.setFilter(e)}}),a.append(a.toolbar).append(a.filter),a.filter.container.classList.add(a.getFullElName("filter")),a.toolbar.setMod("mode","header").build(null!==(i=a.options.toolbarButtons)&&void 0!==i?i:[]),a}return(0,n.__extends)(t,e),t.prototype.className=function(){return"UIBrowserHeader"},(0,n.__decorate)([i.component],t)}(r.UIGroup);t.UIBrowserHeader=a},478:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserItem=void 0;var n=o(1);o(479);var r=o(122),i=o(46),s=o(223),a=o(15),c=o(24),l=function(e){function t(t,o){var n=e.call(this,t)||this;return n.item=s.FileBrowserItem.create(o),t.e.on(n.container,"click contextmenu dblclick",(function(e){return t.e.fire(e.type+"Item.filebrowser",n.item,(0,c.ctrlKey)(e)||e.shiftKey,e),!1})),n}return(0,n.__extends)(t,e),t.prototype.className=function(){return"UIBrowserItem"},t.prototype.render=function(){return"<div tabindex='-1'>\n\t\t\t<div class='&__image'></div>\n\t\t\t<div class='&__info'></div>\n\t\t\t<div class='&__heart'>*heart*</div>\n\t\t</div>"},t.prototype.onClickFavorite=function(){var e=this;return this.bubble((function(t){e.jodit.e.fire(t,"toggleFavoriteItem",e.item)})),!1},t.prototype.onAction=function(e){return this.jodit.e.fire(e.type+"Item.filebrowser",this.item,(0,c.ctrlKey)(e)||e.shiftKey,e),!1},t.prototype.update=function(){var t;(0,c.css)(this.getElm("image"),"backgroundImage","url("+this.item.imageURL+")"),this.setMod("is-file",!1===this.item.isImage).setMod("type",null!==(t=this.item.type)&&void 0!==t?t:"file").setElementValue("name",this.item.file).setElementValue("time",this.item.time).setElementValue("filesize",this.item.size),(0,c.attr)(this.container,"title",this.item.file+" "+this.item.time+" "+this.item.size),e.prototype.update.call(this)},t.prototype.setElementValue=function(e,t){var o=this.getFullElName(e),n=this.getElm(e);if(!t)return n&&a.Dom.safeRemove(n),this;if(!n){var r=this.getElm("info");n=this.j.create.div(o),r.appendChild(n)}return n.innerText=t,this},(0,n.__decorate)([(0,i.watch)("heart:click")],t.prototype,"onClickFavorite",null),(0,n.__decorate)([(0,i.watch)(["container:click","container:contextmenu","container:dblclick"])],t.prototype,"onAction",null),(0,n.__decorate)([i.component],t)}(r.UIElement);t.UIBrowserItem=l},512:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UILightBox=void 0;var n=o(1);o(513);var r=o(15),i=o(46),s=o(24),a=o(14),c=function(e){function t(t,o,n){var i=e.call(this,t)||this;i.current=o,i.elements=n,i.dialog=new r.Dialog;var s=i.dialog;return s.setMod("theme",t.state.theme).toolbar.setMod("mode","header"),s.open(i),i.elements=i.elements.filter((function(e){return e.isImage})),s.e.on(s,"afterClose",(function(){i.destruct()})),i.addGlobalListeners(),i.onChangeCurrent(),s.toolbar.build([{icon:"check",exec:function(){t.stateManager.addActive(i.current,!1),t.e.fire("select.filebrowser"),s.close()}},"dialog.close"]),i}var o;return(0,n.__extends)(t,e),o=t,t.prototype.className=function(){return"UILightBox"},t.prototype.render=function(){return"<div>\n\t\t\t<div class='&__previous'>*angle-left*</div>\n\t\t\t<div class='&__preview'></div>\n\t\t\t<div class='&__loader'></div>\n\t\t\t<div class='&__next'>*angle-right*</div>\n\t\t</div>"},t.prototype.onChangeCurrent=function(){return(0,n.__awaiter)(this,void 0,Promise,(function(){var e,t,o,i;return(0,n.__generator)(this,(function(n){switch(n.label){case 0:return e=this.current,this.setMod("loading",!0),t=this.getElm("preview"),r.Dom.detach(t),(0,s.css)(t,{backgroundImage:null}),e.isImage?[4,(0,s.loadImage)(e.fileURL,this.j)]:[3,2];case 1:return o=n.sent(),this.dialog.setPosition(),(0,s.css)(t,{width:Math.min(this.jodit.ow.innerWidth,o.naturalWidth),height:Math.min(this.jodit.ow.innerHeight-100,o.naturalHeight),backgroundImage:"url("+o.src+")"}),[3,4];case 2:return[4,this.makeIframe(e.fileURL)];case 3:i=n.sent(),t.appendChild(i),n.label=4;case 4:return this.dialog.setSize(),this.dialog.setPosition(),this.setMod("loading",!1),[2]}}))}))},t.prototype.makeIframe=function(e){var t=this.j.c.element("iframe");return t.classList.add(this.getFullElName("office-iframe")),t.src=/\.pdf/.test(e)?e:this.j.o.previewOfficeURL+encodeURIComponent(e),t},t.prototype.onPreviousClick=function(){var e=this.j.stateManager.getIndex(this.current,this.elements);e>0?e-=1:e=this.elements.length-1,this.current=this.elements[e]},t.prototype.onNextClick=function(){var e=this.j.stateManager.getIndex(this.current,this.elements);this.elements.length-1>e?e+=1:e=0,this.current=this.elements[e]},t.open=function(e,t,n){return new o(e,t,n)},t.prototype.addGlobalListeners=function(){this.j.e.on(this.j.od,"keydown",this.onKeyPress)},t.prototype.onKeyPress=function(e){if(e.key===a.KEY_LEFT||e.key===a.KEY_RIGHT||e.key===a.KEY_SPACE)return e.key===a.KEY_LEFT?this.onPreviousClick():this.onNextClick(),!1},t.prototype.removeGlobalListeners=function(){this.j.e.off(this.j.od,"keydown",this.onKeyPress)},t.prototype.destruct=function(){return this.removeGlobalListeners(),this.dialog.destruct(),e.prototype.destruct.call(this)},(0,n.__decorate)([(0,i.watch)("current")],t.prototype,"onChangeCurrent",null),(0,n.__decorate)([(0,i.watch)("previous:click")],t.prototype,"onPreviousClick",null),(0,n.__decorate)([(0,i.watch)("next:click")],t.prototype,"onNextClick",null),(0,n.__decorate)([i.autobind],t.prototype,"onKeyPress",null),o=(0,n.__decorate)([i.component],t)}(r.UIElement);t.UILightBox=c},484:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserMessage=void 0;var n=o(1),r=o(122),i=o(46),s=o(24),a=function(e){function t(t,o){var n=e.call(this,t)||this;return n.container.innerText=(0,s.isString)(o)?o:o.message,n}return(0,n.__extends)(t,e),t.prototype.className=function(){return"UIBrowserMessage"},(0,n.__decorate)([i.component],t)}(r.UIElement);t.UIBrowserMessage=a},482:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserMessages=void 0;var n=o(1);o(483);var r=o(122),i=o(46),s=o(484),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,n.__extends)(t,e),t.prototype.className=function(){return"UIBrowserMessages"},t.prototype.build=function(e){var t=this;this.clear(),e.forEach((function(e){var o=new s.UIBrowserMessage(t.jodit,e.message);o.setMod("type",e.type),t.append(o)}))},(0,n.__decorate)([i.component],t)}(r.UIGroup);t.UIBrowserMessages=a},474:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserPanel=void 0;var n=o(1);o(475);var r=o(122),i=o(476),s=o(482),a=o(46),c=o(485),l=o(489),u=o(24),h=o(491),d=o(499),p=o(501),f=function(e){function t(t,o){var n=e.call(this,t)||this;return n.stateManager=o,n.syncMod=!0,n.sources=new h.UIBrowserSources(n.j),n.sidebar=new c.UISidebar(n.jodit,[n.sources],n.stateManager.state),n.preview=new p.UIPreview(n.jodit,n.stateManager.state),n.statusbar=new d.UIBrowserStatusBar(n.j),n.items=new i.UIVirtualScroll(n.j,n.stateManager),n.settings=new l.UIBrowserSettings(n.jodit,n.stateManager.state),n.messages=new s.UIBrowserMessages(n.j),n.state=o.state,n.append(n.sidebar,"content"),n.append(n.items,"content"),n.append(n.messages,"footer"),n.append(n.settings,"content"),n.append(n.preview,"content"),n.append(n.statusbar,"footer"),n.onChangeElements(),n.onChangeSources(),n.onChangeView(),n.onChangeTileSize(),n.onChangeShowFavorites(),n.onChangeMessages(),n.onChangeActiveElements(),n.onChangeFavorites(),n.onChangeShowSideBar(),n.onChangeShowSettings(),n.onChangeShowPreview(),n.onChangeTheme(),n}return(0,n.__extends)(t,e),t.prototype.className=function(){return"UIBrowserPanel"},Object.defineProperty(t.prototype,"countInRow",{get:function(){if("list"===this.state.view)return 1;var e=this.items.elements[0].container,t=(0,u.css)(e,"marginLeft");return Math.floor(this.items.container.offsetWidth/(e.offsetWidth+((0,u.isNumber)(t)?t:0)))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"countInColumn",{get:function(){var e=this.items.elements[0].container,t=(0,u.css)(e,"marginTop");return Math.floor(this.items.container.offsetHeight/(e.offsetHeight+((0,u.isNumber)(t)?t:0)))},enumerable:!1,configurable:!0}),t.prototype.render=function(){return"<div>\n\t\t\t<div class='&__content'></div>\n\t\t\t<div class='&__footer'></div>\n\t\t</div>"},t.prototype.onChangeTheme=function(){this.setMod("theme",this.stateManager.state.theme)},t.prototype.onChangeElements=function(){this.items.build(this.stateManager.state.elements)},t.prototype.onChangeActiveElements=function(){var e=this;this.state.activeElements.length||(this.state.info="",this.state.metaInfo=null),this.items.elements.forEach((function(t){t.setMod("active",Boolean(e.stateManager.isActive(t.item)))})),this.j.e.fire("changeSelection")},t.prototype.onChangeFavorites=function(){var e=this;this.items.elements.forEach((function(t){t.setMod("favorite",Boolean(e.stateManager.isFavorite(t.item)))}))},t.prototype.onChangeSources=function(){this.sources.build(this.stateManager.state.tree)},t.prototype.onChangeLastSelectedIndex=function(){var e,t=null===(e=this.items.elements[this.stateManager.state.lastSelectedIndex])||void 0===e?void 0:e.container;t&&((0,u.scrollIntoViewIfNeeded)(t,this.items.container,this.j.od),t.focus())},t.prototype.onChangeInfo=function(){this.statusbar.value(this.state.info,"center")},t.prototype.onChangePathOrSource=function(){this.statusbar.value(this.state.currentPath?this.state.currentPath+" ("+this.state.currentSource+")":this.i18n("Home"),"left")},t.prototype.onChangeShowSettings=function(){this.settings.setMod("hidden",!this.stateManager.state.showSettings)},t.prototype.onChangeShowPreview=function(){this.preview.setMod("hidden",!this.stateManager.state.showPreview)},t.prototype.onChangeShowSideBar=function(){this.sidebar.setMod("hidden",!this.stateManager.state.showSideBar)},t.prototype.onChangeView=function(){this.items.setMod("view",this.stateManager.state.view)},t.prototype.onChangeTileSize=function(){this.items.setMod("size",this.stateManager.state.tileSize)},t.prototype.onChangeShowFavorites=function(){this.sidebar.setMod("show-favorites",this.stateManager.state.showFavorites),this.items.setMod("show-favorites",this.stateManager.state.showFavorites)},t.prototype.onChangeMessages=function(){this.messages.build(this.stateManager.state.messages)},t.prototype.onItemDblClick=function(){return this.j.e.fire("select.filebrowser"),!1},t.prototype.onItemClick=function(e,t){this.stateManager.addActive(e,t)},t.prototype.onTogglePreview=function(){return this.state.showPreview=!this.state.showPreview,!1},t.prototype.onToggleFavoriteItem=function(e){this.stateManager.toggleFavorite(e)},t.prototype.onFolderClick=function(e){this.stateManager.state.currentSource=e.sourceName,this.stateManager.state.currentPath=e.path||"/",this.j.e.fire("afterOpenFolder.filebrowser")},(0,n.__decorate)([(0,a.watch)("state.theme")],t.prototype,"onChangeTheme",null),(0,n.__decorate)([(0,a.watch)("state.elements")],t.prototype,"onChangeElements",null),(0,n.__decorate)([(0,a.watch)("state.activeElements")],t.prototype,"onChangeActiveElements",null),(0,n.__decorate)([(0,a.watch)(["state.favorites","state.elements"])],t.prototype,"onChangeFavorites",null),(0,n.__decorate)([(0,a.watch)("state.sources")],t.prototype,"onChangeSources",null),(0,n.__decorate)([(0,a.watch)("state.lastSelectedIndex")],t.prototype,"onChangeLastSelectedIndex",null),(0,n.__decorate)([(0,a.watch)("state.info")],t.prototype,"onChangeInfo",null),(0,n.__decorate)([(0,a.watch)(["state.currentPath","state.currentSource"])],t.prototype,"onChangePathOrSource",null),(0,n.__decorate)([(0,a.watch)("state.showSettings")],t.prototype,"onChangeShowSettings",null),(0,n.__decorate)([(0,a.watch)("state.showPreview")],t.prototype,"onChangeShowPreview",null),(0,n.__decorate)([(0,a.watch)("state.showSideBar")],t.prototype,"onChangeShowSideBar",null),(0,n.__decorate)([(0,a.watch)("state.view")],t.prototype,"onChangeView",null),(0,n.__decorate)([(0,a.watch)("state.tileSize")],t.prototype,"onChangeTileSize",null),(0,n.__decorate)([(0,a.watch)("state.showFavorites")],t.prototype,"onChangeShowFavorites",null),(0,n.__decorate)([(0,a.watch)("state.messages")],t.prototype,"onChangeMessages",null),(0,n.__decorate)([(0,a.watch)(":dblclickItem.filebrowser")],t.prototype,"onItemDblClick",null),(0,n.__decorate)([(0,a.watch)(":clickItem.filebrowser")],t.prototype,"onItemClick",null),(0,n.__decorate)([(0,a.watch)(":togglePreview.filebrowser")],t.prototype,"onTogglePreview",null),(0,n.__decorate)([(0,a.watch)(":toggleFavoriteItem")],t.prototype,"onToggleFavoriteItem",null),(0,n.__decorate)([(0,a.watch)(":openFolder")],t.prototype,"onFolderClick",null),(0,n.__decorate)([a.component],t)}(r.UIGroup);t.UIBrowserPanel=f},501:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIPreview=void 0;var n=o(1);o(502);var r=o(122),i=o(46),s=o(487),a=o(24),c=o(37),l=o(478),u=function(e){function t(t,o){var n=e.call(this,t)||this;return n.state=o,n.lastLoadPromise=null,n.onChangeMetaInfo(),n}return(0,n.__extends)(t,e),t.prototype.className=function(){return"UIPreview"},t.prototype.addResize=function(){s.UIResize.remove(this),s.UIResize.install(this,screen.width>450?"left":"top")},t.prototype.render=function(){return'<div>\n\t\t\t\t<div class="&__image"></div>\n\t\t\t\t<div class="&__info"></div>\n\t\t\t\t<div class="&__loader"></div>\n\t\t\t\t<div class="&__empty-message">~Select image~</div>\n\t\t\t</div>'},t.prototype.setMod=function(t,o){return e.prototype.setMod.call(this,t,o),"hidden"===t&&!1===o&&this.onChangeMetaInfo(),this},t.prototype.onChangeMetaInfo=function(){var e,t,o=this;if(!this.getMod("hidden")){var n=this.state.metaInfo;this.setMod("empty",!n),c.Dom.detach(this.getElm("info")),(0,a.css)(this.getElm("image"),{backgroundImage:null}),n&&(this.setMod("is-file",!1===n.isImage).setMod("type",null!==(e=n.type)&&void 0!==e?e:"file"),l.UIBrowserItem.prototype.setElementValue.call(this,"name",n.file),l.UIBrowserItem.prototype.setElementValue.call(this,"time",n.time),l.UIBrowserItem.prototype.setElementValue.call(this,"filesize",n.size),this.setMod("loading",!0),null===(t=this.lastLoadPromise)||void 0===t||t.rejectCallback(),this.lastLoadPromise=(0,a.loadImage)(n.isImage?n.fileURL:n.imageURL,this.j),this.lastLoadPromise.then((function(e){e&&(0,a.css)(o.getElm("image"),{backgroundImage:"url("+e.src+")"})})).finally((function(){o.setMod("loading",!1)})).catch((function(){})))}},(0,n.__decorate)([(0,i.hook)("ready"),(0,i.watch)(":resize",window),(0,i.debounce)()],t.prototype,"addResize",null),(0,n.__decorate)([(0,i.watch)("state.metaInfo")],t.prototype,"onChangeMetaInfo",null),(0,n.__decorate)([i.component],t)}(r.UIGroup);t.UIPreview=u},506:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIProgress=void 0;var n=o(1);o(507);var r=o(122),i=o(46),s=function(e){function t(t,o){var n=e.call(this,t)||this;return n.state=o,n.onProgress(),n}return(0,n.__extends)(t,e),t.prototype.className=function(){return"UIProgress"},t.prototype.onProgress=function(){this.state.progress?this.show():this.hide(),this.progress(this.state.progress)},t.prototype.hide=function(){return this.setMod("hidden",!0),this},t.prototype.progress=function(e){var t=this;return this.container.style.width=e.toFixed(2)+"%",98>e||this.j.async.setTimeout((function(){t.hide()}),{label:"progress",timeout:300}),this},t.prototype.show=function(){return this.setMod("hidden",!1),this},(0,n.__decorate)([(0,i.watch)("state.progress")],t.prototype,"onProgress",null),(0,n.__decorate)([i.component],t)}(r.ProgressBar);t.UIProgress=s},489:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserSettings=void 0;var n=o(1);o(490);var r=o(122),i=o(46),s=function(e){function t(t,o){var n=e.call(this,t)||this;return n.state=o,t.e.on(n.getElm("close"),"click",(function(){n.state.showSettings=!1})),n}return(0,n.__extends)(t,e),t.prototype.className=function(){return"UIBrowserSettings"},t.prototype.render=function(){return'<div>\n\t\t\t<div class="'+this.getFullElName("close")+'">'+r.Icon.get("cancel")+'</div>\n\t\t\t<div class="'+this.getFullElName("title")+'">'+this.j.i18n("Settings")+'</div>\n\t\t\t<div class="'+this.getFullElName("options")+'"></div>\n\t\t</div>'},t.prototype.appendChildToContainer=function(e){this.getElm("options").appendChild(e)},t.prototype.setMod=function(t,o){return"hidden"===t&&!1===o&&this.generateSettings(),e.prototype.setMod.call(this,t,o)},t.prototype.onChangeView=function(){var e=this.getElm("tile-size");e&&(e.style.display="tiles"===this.state.view?"block":"none")},t.prototype.generateSettings=function(){var e=this;this.clear();var t=this.j;this.append([new r.UIButtonGroup(t,{label:"Theme",name:"theme",value:this.state.theme,radio:!0,options:[{value:"default",text:"Light"},{value:"dark",text:"Dark"}],onChange:function(t){e.state.theme=t[0].value}}),new r.UIButtonGroup(t,{label:"Show favorites",name:"showFavorites",value:this.state.showFavorites,radio:!0,options:[{value:!0,text:"Show"},{value:!1,text:"Hide"}],onChange:function(t){e.state.showFavorites=t[0].value}}),new r.UIButtonGroup(t,{label:"View",name:"view",value:this.state.view,radio:!0,options:[{value:"tiles",text:"Tiles"},{value:"list",text:"List"},{value:"compact",text:"Compact"}],onChange:function(t){e.state.view=t[0].value}}),new r.UIButtonGroup(t,{label:"Folders position",name:"foldersPosition",value:this.state.foldersPosition,radio:!0,options:[{value:"top",text:"Top"},{value:"bottom",text:"Bottom"},{value:"default",text:"Default"}],onChange:function(t){e.state.foldersPosition=t[0].value}}),new r.UISelect(t,{label:"Sort by",name:"sort-by",value:this.state.sortBy,options:[{value:"changed-asc",text:t.i18n("Sort by changed")+"(⬆)"},{value:"changed-desc",text:t.i18n("Sort by changed")+"(⬇)"},{value:"name-asc",text:t.i18n("Sort by name")+"(⬆)"},{value:"name-desc",text:t.i18n("Sort by name")+"(⬇)"},{value:"size-asc",text:t.i18n("Sort by size")+"(⬆)"},{value:"size-desc",text:t.i18n("Sort by size")+"(⬇)"}],onChange:function(t){e.state.sortBy=t}}),new r.UISelect(t,{label:"Tile size",name:"tile-size",value:this.state.tileSize,options:[{value:"xsmall",text:"Extra small"},{value:"small",text:"Small"},{value:"default",text:"Default"},{value:"large",text:"Large"},{value:"xlarge",text:"Extra large"}],onChange:function(t){e.state.tileSize=t}})]),this.onChangeView()},(0,n.__decorate)([(0,i.watch)("state.view")],t.prototype,"onChangeView",null),(0,n.__decorate)([i.component],t)}(r.UIGroup);t.UIBrowserSettings=s},485:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UISidebar=void 0;var n=o(1);o(486);var r=o(122),i=o(46),s=o(487),a=function(e){function t(t,o,n){var r=e.call(this,t,o)||this;return r.state=n,r.onChangeFavorites(),r}return(0,n.__extends)(t,e),t.prototype.className=function(){return"UISidebar"},t.prototype.render=function(){return"<div>\n\t\t\t<div class='&__hide-btn'>*angle-left*</div>\n\t\t\t<div class='&__favorites'>*heart* ~Favorites~</div>\n\t\t\t<div class='&__box'></div>\n\t\t</div>"},t.prototype.appendChildToContainer=function(e){this.getElm("box").appendChild(e)},t.prototype.addResize=function(){s.UIResize.remove(this),s.UIResize.install(this,screen.width>450?"right":"bottom")},t.prototype.onChangeFavorites=function(){this.setMod("has-favorites",Boolean(this.state.favorites.length))},t.prototype.onClickHideButton=function(){return this.state.showSideBar=!this.state.showSideBar,!1},t.prototype.onClickFavorites=function(){return this.state.elements=this.state.favorites,!1},(0,n.__decorate)([(0,i.hook)("ready"),(0,i.watch)(":resize",window),(0,i.debounce)()],t.prototype,"addResize",null),(0,n.__decorate)([(0,i.watch)("state.favorites")],t.prototype,"onChangeFavorites",null),(0,n.__decorate)([(0,i.watch)("hide-btn:click")],t.prototype,"onClickHideButton",null),(0,n.__decorate)([(0,i.watch)("favorites:click")],t.prototype,"onClickFavorites",null),(0,n.__decorate)([i.component],t)}(r.UIGroup);t.UISidebar=a},493:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserSource=void 0;var n=o(1);o(494);var r=o(122),i=o(46),s=o(495),a=function(e){function t(t,o){var n=e.call(this,t,o)||this;return n.data=o,n.tree=new s.UITree(n.j,n.data.children),n.syncMod=!0,n.getElm("name").innerText=o.title||o.name,n.getElm("tree").appendChild(n.tree.container),t.e.on(n.container,"contextmenu",(function(e){return t.e.fire("contextmenuSource.filebrowser",o,e)})),n}return(0,n.__extends)(t,e),t.prototype.className=function(){return"UIBrowserSource"},t.prototype.render=function(){return'<div>\n\t\t\t<div class="&__name"></div>\n\t\t\t<div class="&__tree"></div>\n\t\t</div>'},(0,n.__decorate)([i.component],t)}(r.UIElement);t.UIBrowserSource=a},491:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserSources=void 0;var n=o(1);o(492);var r=o(122),i=o(46),s=o(493),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.syncMod=!0,t}return(0,n.__extends)(t,e),t.prototype.className=function(){return"UIBrowserSources"},t.prototype.build=function(e){var t=this;this.clear(),e.forEach((function(e){t.append(new s.UIBrowserSource(t.jodit,e))}))},(0,n.__decorate)([i.component],t)}(r.UIGroup);t.UIBrowserSources=a},499:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserStatusBar=void 0;var n=o(1);o(500);var r=o(122),i=o(46),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,n.__extends)(t,e),t.prototype.className=function(){return"UIBrowserStatusBar"},t.prototype.render=function(){return"<div>\n\t\t\t<div class='&__slot-left'></div>\n\t\t\t<div class='&__slot-center'></div>\n\t\t\t<div class='&__slot-right'></div>\n\t\t</div>"},t.prototype.value=function(e,t){return void 0===t&&(t="left"),this.getElm("slot-"+t).innerText=e,this},(0,n.__decorate)([i.component],t)}(r.UIElement);t.UIBrowserStatusBar=s},495:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UITree=void 0;var n=o(1);o(496);var r=o(122),i=o(46),s=o(497),a=function(e){function t(t,o){var n=e.call(this,t)||this;return n.syncMod=!0,n.build(o),n}var o;return(0,n.__extends)(t,e),o=t,t.prototype.className=function(){return"UITree"},t.prototype.build=function(e){var t=this;this.clear(),e.forEach((function(e){var n=new s.UIBrowserFolder(t.jodit,e);t.append(n),e.isActive&&n.setMod("active",!0),e.children.length&&t.append(new o(t.jodit,e.children))}))},o=(0,n.__decorate)([i.component],t)}(r.UIGroup);t.UITree=a},476:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIVirtualScroll=void 0;var n=o(1);o(477);var r=o(122),i=o(46),s=o(478),a=o(223),c=o(480),l=o(24),u=function(e){function t(t,o){var n=e.call(this,t)||this;return n.stateManager=o,n.syncMod=!0,n.addItemsSelector(),n}var o;return(0,n.__extends)(t,e),o=t,t.prototype.className=function(){return"UIVirtualScroll"},t.prototype.render=function(){return"<div>\n\t\t\t\t<div class=\"&__empty-message\">~There are no files~</div>\n\t\t\t\t<div class='&__loader'></div>\n\t\t\t\t<div class='&__drag-area'>~Drop image~</div>\n\t\t\t</div>"},t.prototype.build=function(e){var t=this,o=this.elements.findIndex((function(t,o){return!e[o]||t.item.uniqueHashKey!==a.FileBrowserItem.create(e[o]).uniqueHashKey}));if(o>-1){for(var n=o;this.elements.length>n;n+=1)this.elements[n].destruct();this.elements.length=o}e.slice(o>-1?o:this.elements.length).forEach((function(e){var o=new s.UIBrowserItem(t.jodit,e);Object.keys(t.mods).forEach((function(e){o.setMod(e,t.mods[e])})),t.append(o)})),this.setMod("empty",!this.elements.length)},t.prototype.onScrollLoadChunk=function(){!this.stateManager.isFavoriteItems&&this.j.o.pixelOffsetLoadNewChunk>this.container.scrollHeight-(this.container.scrollTop+this.container.offsetHeight)&&this.j.loadingManager.loadItemsChunk()},t.prototype.onDragOver=function(e){e.preventDefault(),this.setMod("dragover",!0)},t.prototype.onDragLeave=function(e){e.preventDefault(),this.setMod("dragover",!1)},t.prototype.addItemsSelector=function(){c.UISelectItems.install(this)},t.intersectRect=function(e,t){return!(t.left>e.left+e.width||e.left>t.left+t.width||t.top>e.top+e.height||e.top>t.top+t.height)},t.prototype.onSelectItems=function(e){var t=[];this.elements.forEach((function(n){var r=(0,l.position)(n.container);o.intersectRect(r,e)&&t.push(n.item)})),this.stateManager.state.activeElements=t},(0,n.__decorate)([(0,i.watch)(":afterResize"),(0,i.watch)(":resize"),(0,i.watch)("container:scroll"),(0,i.throttle)()],t.prototype,"onScrollLoadChunk",null),(0,n.__decorate)([(0,i.watch)("container:dragover")],t.prototype,"onDragOver",null),(0,n.__decorate)([(0,i.watch)(["container:dragleave","container:drop"])],t.prototype,"onDragLeave",null),o=(0,n.__decorate)([i.component],t)}(r.UIGroup);t.UIVirtualScroll=u},487:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIResize=void 0,o(488);var n=o(24),r=o(37),i=function(){function e(){}return e.remove=function(e){(0,n.css)(e.container,{width:null,height:null}),e.container.classList.remove("jodit-ui-resize"),r.Dom.safeRemove(e.container.querySelector(".jodit-ui-resize__handle"))},e.install=function(e,t){e.container.classList.add("jodit-ui-resize"),"static"===(0,n.css)(e.container,"position")&&(0,n.css)(e.container,"position","relative");var o=e.j.c.div("jodit-ui-resize__handle");o.classList.add("jodit-ui-resize__handle_type_"+t),e.container.appendChild(o),e.j.e.on(o,"mousedown touchstart",this.onStartResize.bind(this,e,t))},e.onStartResize=function(e,t,o){var n=e.j.async.throttle(this.onResize.bind(this,e,{x:o.clientX,y:o.clientY,w:e.container.offsetWidth,h:e.container.offsetHeight,direction:t}),e.j.defaultTimeout/10);e.j.lock(),e.j.e.on(e.j.ow,"mousemove touchmove",n).one(e.j.ow,"mouseup touchend",this.onEndResize.bind(this,e,n))},e.onResize=function(e,t,o){var r=["left","right"].includes(t.direction),i=e.container.parentElement;i&&(0,n.css)(e.container,r?"width":"height",100*(r?(t.w+(o.clientX-t.x)*("right"===t.direction?1:-1))/i.offsetWidth:(t.h+(o.clientY-t.y)*("top"===t.direction?1:-1))/i.offsetHeight)+"%")},e.onEndResize=function(e,t,o){e.j.e.off(e.j.ow,"mousemove touchmove",t),e.j.unlock()},e}();t.UIResize=i},480:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UISelectItems=void 0,o(481);var n=o(37),r=o(24),i=function(){function e(){}return e.remove=function(e){n.Dom.safeRemove(e.container.querySelector(".jodit-ui-select-items")),e.j.e.off(e.container,"mousedown.uiselectitems touchstart.uiselectitems")},e.install=function(e){var t=e.j.c.div("jodit-ui-select-items");e.j.e.on(e.container,"mousedown.uiselectitems touchstart.uiselectitems",this.onStartSelect.bind(this,e,t))},e.onStartSelect=function(e,t,o){if(o.target===e.container){(0,r.css)(t,{width:0,height:0}),e.container.appendChild(t);var n={x:o.clientX,y:o.clientY,w:e.container.offsetWidth,h:e.container.offsetHeight},i=e.j.async.throttle(this.onSelect.bind(this,e,t,n),e.j.defaultTimeout/10);e.j.lock(),e.j.e.on(e.j.ow,"mousemove touchmove",i).one(e.j.ow,"mouseup touchend",this.onEndSelect.bind(this,e,t,i)),e.onSelectItems({left:n.x,top:n.y,width:0,height:0})}},e.onSelect=function(e,t,o,n){var i={left:o.x>n.clientX?n.clientX:o.x,top:o.y>n.clientY?n.clientY:o.y,width:Math.abs(o.x-n.clientX),height:Math.abs(o.y-n.clientY)};(0,r.css)(t,i),e.onSelectItems(i)},e.onEndSelect=function(e,t,o,r){n.Dom.safeRemove(t),e.j.e.off(e.j.ow,"mousemove touchmove",o),e.j.unlock()},e}();t.UISelectItems=i},517:function(e){e.exports={Favorites:"Избранное",Settings:"Настройки",Light:"Светлая",Dark:"Темная",Theme:"Тема",Show:"Показать",Hide:"Скрыть","Show favorites":"Показывать избранное",Tiles:"Плитка",List:"Список",Compact:"Компактный",View:"Отображение","Folders position":"Позиция папок","Sort by":"Сортировать по","Extra small":"Очень маленькие",Small:"Маленькие",Large:"Большие","Extra large":"Очень большие","Tile size":"Размер плитки"}},472:function(e){e.exports='<svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"> <path d="M365.4,59.628c60.56,0,109.6,49.03,109.6,109.47c0,109.47-109.6,171.8-219.06,281.271 C146.47,340.898,37,278.568,37,169.099c0-60.44,49.04-109.47,109.47-109.47c54.73,0,82.1,27.37,109.47,82.1 C283.3,86.999,310.67,59.628,365.4,59.628z"/> </svg>'},473:function(e){e.exports='<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"> <path d="M28.7,16.3l-12-13c-0.4-0.4-1.1-0.4-1.5,0l-12,13C3,16.6,2.9,17,3.1,17.4C3.2,17.8,3.6,18,4,18h3v10c0,0.6,0.4,1,1,1h16 c0.6,0,1-0.4,1-1V18h3c0.4,0,0.8-0.2,0.9-0.6C29.1,17,29,16.6,28.7,16.3z"/> </svg>'},470:function(e,t,o){"use strict";o.r(t)},498:function(e,t,o){"use strict";o.r(t)},505:function(e,t,o){"use strict";o.r(t)},479:function(e,t,o){"use strict";o.r(t)},513:function(e,t,o){"use strict";o.r(t)},483:function(e,t,o){"use strict";o.r(t)},475:function(e,t,o){"use strict";o.r(t)},502:function(e,t,o){"use strict";o.r(t)},507:function(e,t,o){"use strict";o.r(t)},490:function(e,t,o){"use strict";o.r(t)},486:function(e,t,o){"use strict";o.r(t)},494:function(e,t,o){"use strict";o.r(t)},492:function(e,t,o){"use strict";o.r(t)},500:function(e,t,o){"use strict";o.r(t)},496:function(e,t,o){"use strict";o.r(t)},477:function(e,t,o){"use strict";o.r(t)},488:function(e,t,o){"use strict";o.r(t)},481:function(e,t,o){"use strict";o.r(t)}},function(e){return e(e.s=468)}])}));
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var o=t();for(var n in o)("object"==typeof exports?exports:e)[n]=o[n]}}(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[524],{469:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileBrowserPro=void 0;var n=o(1);o(470),o(471);var r=o(15),i=o(195),s=o(474),a=o(24),c=o(46),l=o(14),u=o(503),h=o(504),d=o(227),p=o(13),f=o(506),v=o(221),m=o(508),g=o(509),y=o(510),_=o(511),w=o(2),b=o(466),I=o(512),S=o(514),C=function(e){function t(t){var o=e.call(this,(0,a.ConfigProto)(Object.assign(t||{},{resizable:!0,draggable:!0,toolbarButtons:(null==t?void 0:t.buttons)||p.Config.defaultOptions.filebrowser.buttons,buttons:w.Jodit.atom(["filebrowser.settings","fullsize","dialog.close"])}),p.Config.defaultOptions.filebrowser))||this;return o.dataProvider=(0,v.makeDataProvider)(o,o.options),o.state=r.ObserveObject.create({onSelectCallBack:null,theme:"default",showSideBar:!0,showFavorites:!0,showSettings:!1,showPreview:!1,withFolders:!0,foldersPosition:"bottom",info:"",metaInfo:null,currentPath:"",currentSource:"",currentBaseUrl:"",tree:[],activeElements:[],favorites:[],progress:0,lastSelectedIndex:0,elements:[],messages:[],sources:[],view:"tiles",tileSize:"default",sortBy:"name-asc",filterWord:"",onlyImages:!1},["state"]),o.persistent=new m.PersistentStore(o,o.state),o.loadingManager=new S.LoadingManager(o,o.state),o.stateManager=new u.StateManager(o.state),o.historyManager=new g.HistoryManager(o,o.state),o.contextMenuManager=new y.ContextMenuManager(o),o.header=new h.UIBrowserHeader(o,o.options,o.stateManager),o.panel=new s.UIBrowserPanel(o,o.stateManager),o.files=o.panel,o.tree=o.panel,o.progressbar=new f.UIProgress(o,o.stateManager.state),b.license.make(o),!o.persistent.theme&&o.options.theme&&(o.persistent.theme=o.options.theme),o.panel.append(o.progressbar),o.toolbar.setMod("mode","header"),o.setSize(Math.min(o.options.width,screen.width),Math.min(o.options.height,screen.height)).setHeader(o.header),o.onResizeWindow(),o.initUploader(),o.onChangeTheme(),o.fullFillOptions(),o.dataProvider.onProgress((function(e){0===e&&(e=30),o.state.progress=e})),o.e.on("beforeClose",o.removeGlobalListeners),o.e.fire("afterInit"),w.Jodit.prototype.afterInitHook.call(o),o}return(0,n.__extends)(t,e),t.prototype.className=function(){return"FileBrowserPro"},t.prototype.lock=function(t){return void 0===t&&(t="any"),this.container.classList.add("jodit_disabled"),e.prototype.lock.call(this,t)},t.prototype.unlock=function(){return this.container.classList.remove("jodit_disabled"),e.prototype.unlock.call(this)},t.prototype.status=function(e,t){var o=this;void 0===t&&(t=!(e instanceof Error));var n={message:(0,a.isString)(e)?e:e.message,type:t?"success":"error"};this.stateManager.addMessage(n),this.async.setTimeout((function(){o.stateManager.removeMessage(n)}),this.options.howLongShowMsg)},t.prototype.addDisclaimer=function(e){this.dialog.appendChild(e)},t.prototype.open=function(t,o){return void 0===t&&(t=this.o.defaultCallback),(0,n.__awaiter)(this,void 0,Promise,(function(){return(0,n.__generator)(this,(function(n){return this.state.onlyImages=Boolean(o),this.prepareOpening(t),e.prototype.open.call(this,this.panel.container),[2,this.e.fire("update.filebrowser")]}))}))},t.prototype.onResizeWindow=function(){(0,a.css)(this.dialog,{maxWidth:screen.width,minHeight:Math.min(this.options.height,screen.height),minWidth:Math.min(this.options.width,screen.width)})},t.prototype.onChangePath=function(){var e=this.state,t=e.currentSource;this.uploader.setPath(e.currentPath),this.uploader.setSource(t)},t.prototype.onChangeTheme=function(){this.setMod("theme",this.state.theme),this.header.setMod("theme",this.state.theme),this.panel.setMod("theme",this.state.theme),this.options.theme=this.state.theme},t.prototype.onToggleSettings=function(){this.state.showSettings=!this.state.showSettings},t.prototype.prepareOpening=function(e){var t=this;this.registerGlobalListeners(),e&&(this.state.onSelectCallBack=function(o){t.close(),e(o)}),this.persistent.syncWithState()},t.prototype.registerGlobalListeners=function(){this.e.on(this.ow,"keydown",this.onKeyPress)},t.prototype.onKeyPress=function(e){var t=this.od.activeElement;if(this.state.activeElements.length&&t&&r.Dom.isOrContains(this.panel.items.container,t)){var o=this.state.elements;switch(e.key){case l.KEY_ENTER:return this.onChooseItems();case l.KEY_DELETE:return this.onFileRemove();case l.KEY_RIGHT:case l.KEY_LEFT:case l.KEY_DOWN:case l.KEY_UP:var n=e.key===l.KEY_RIGHT||e.key===l.KEY_DOWN,i=this.state.lastSelectedIndex,s=void 0;if([l.KEY_RIGHT,l.KEY_LEFT].includes(e.key))s=n?o[i+1]?i+1:0:o[i-1]?i-1:o.length-1;else{var a=this.panel.countInRow;s=Math.round(((i+1)/a+(n?1:-1))*a-1)}return o[s]&&this.stateManager.addActive(o[s],e.shiftKey),!1}}},t.prototype.removeGlobalListeners=function(){this.e.off(this.ow,"keydown",this.onKeyPress)},t.prototype.onFileRemove=function(){var e=this;this.state.activeElements.length&&(0,r.Confirm)(this.i18n("Are you sure?"),"",(function(t){if(t){var o=[];e.state.activeElements.forEach((function(t){e.stateManager.isFavorite(t)&&e.stateManager.toggleFavorite(t),o.push(e.deleteFile(t.file||t.name||"",t.sourceName))})),e.state.activeElements=[],Promise.all(o).then((function(){e.loadingManager.loadItems()}))}})).bindDestruct(this)},t.prototype.onFileEdit=function(){if(1===this.state.activeElements.length){var e=(0,n.__read)(this.state.activeElements,1)[0];d.openImageEditor.call(this,e.fileURL,e.file||"",e.path,e.sourceName,void 0,this.status)}},t.prototype.onFolderRename=function(e){var t=this;(0,r.Prompt)(this.i18n("Enter new name"),this.i18n("Rename"),(function(o){if(!(0,a.isValidName)(o)||o===e.name)return t.status(t.i18n("Enter new name")),!1;t.dataProvider.folderRename((0,_.parentPath)(e.path),e.name,o,e.sourceName).then((function(n){t.state.activeElements=[],t.status(n,!0),t.state.currentPath=(0,_.parentPath)(e.path)+"/"+o,t.state.currentSource=e.sourceName,t.historyManager.updateCurrent(),t.loadingManager.loadFolders()})).catch(t.status)}),this.i18n("type name"),e.name).bindDestruct(this)},t.prototype.onFolderRemove=function(e){var t=this;(0,r.Confirm)(this.i18n("Are you sure?"),this.i18n("Delete"),(function(o){o&&t.dataProvider.folderRemove((0,_.parentPath)(e.path),e.name,e.sourceName).then((function(o){t.status(o,!0),t.state.currentPath=(0,_.parentPath)(e.path),t.state.currentSource=e.sourceName,t.loadingManager.loadFolders()})).catch(t.status)})).bindDestruct(this)},t.prototype.onFolderCreate=function(e){var t=this;(0,r.Prompt)(this.i18n("Enter Directory name"),this.i18n("Create directory"),(function(o){var n=e.path||"/";t.dataProvider.createFolder(o,e.path||"/",e.sourceName).then((function(){t.state.currentSource===e.sourceName&&t.state.currentPath===n?t.e.fire("update.filebrowser"):(t.state.currentSource=e.sourceName,t.state.currentPath=n),t.historyManager.updateCurrent()}),t.status)}),this.i18n("type name")).bindDestruct(this)},t.prototype.onFileRename=function(e){var t=this,o=e.file||e.name||"";1===this.state.activeElements.length&&o&&(0,r.Prompt)(this.i18n("Enter new name"),this.i18n("Rename"),(function(e){if(!(0,a.isValidName)(e))return t.status(t.i18n("Enter new name")),!1;t.dataProvider.fileRename(t.state.currentPath,o,e,t.state.currentSource).then((function(e){t.state.activeElements=[],t.status(e,!0),t.loadingManager.loadItems()})).catch(t.status)}),this.i18n("type name"),o).bindDestruct(this)},t.prototype.onChooseItems=function(){var e=this.stateManager.state.activeElements;if(e.length){if("folder"===e[0].type)return this.state.currentPath=this.state.currentPath+"/"+e[0].name,this.state.currentSource=e[0].sourceName,void this.e.fire("afterOpenFolder.filebrowser");this.state.onSelectCallBack?this.stateManager.callSelectHandler():this.onOpenLightBox(e[0])}},t.prototype.onOpenLightBox=function(e){I.UILightBox.open(this,e,this.state.elements)},t.prototype.deleteFile=function(e,t){var o=this;return this.dataProvider.fileRemove(this.state.currentPath,e,t).then((function(t){o.status(t||o.i18n('File "%s" was deleted',e),!0)})).catch(this.status)},t.prototype.initUploader=function(){var e=this,t=this,o=(0,a.ConfigProto)(t.o.uploader||{},p.Config.defaultOptions.uploader),n=function(){return e.loadingManager.loadItems()};t.uploader=t.getInstance("Uploader",o),t.uploader.bind(t.panel.container,n,t.status),t.e.on("bindUploader.filebrowser",(function(e){t.uploader.bind(e,n,t.status)}))},t.prototype.destruct=function(){this.removeGlobalListeners(),this.header.destruct(),this.panel.destruct(),e.prototype.destruct.call(this)},t.prototype.fullFillOptions=function(){var e=this;["getLocalFileByUrl","crop","resize","create","fileMove","folderMove","fileRename","folderRename","fileRemove","folderRemove","folder","items","permissions"].forEach((function(t){null!=e.options[t]&&(e.options[t]=(0,a.ConfigProto)(e.options[t],e.o.ajax))}))},(0,n.__decorate)([c.autobind],t.prototype,"status",null),(0,n.__decorate)([(0,c.watch)(":resize",window)],t.prototype,"onResizeWindow",null),(0,n.__decorate)([(0,c.watch)(["state.currentPath","state.currentSource"])],t.prototype,"onChangePath",null),(0,n.__decorate)([(0,c.watch)("state.theme")],t.prototype,"onChangeTheme",null),(0,n.__decorate)([(0,c.watch)(":toggleSettings.filebrowser")],t.prototype,"onToggleSettings",null),(0,n.__decorate)([c.autobind],t.prototype,"onKeyPress",null),(0,n.__decorate)([c.autobind],t.prototype,"removeGlobalListeners",null),(0,n.__decorate)([(0,c.watch)(":fileRemove.filebrowser")],t.prototype,"onFileRemove",null),(0,n.__decorate)([(0,c.watch)(":edit.filebrowser")],t.prototype,"onFileEdit",null),(0,n.__decorate)([(0,c.watch)(":folderRename.filebrowser")],t.prototype,"onFolderRename",null),(0,n.__decorate)([(0,c.watch)(":folderRemove.filebrowser")],t.prototype,"onFolderRemove",null),(0,n.__decorate)([(0,c.watch)(":folderCreate.filebrowser")],t.prototype,"onFolderCreate",null),(0,n.__decorate)([(0,c.watch)(":fileRename.filebrowser")],t.prototype,"onFileRename",null),(0,n.__decorate)([(0,c.watch)(":select.filebrowser")],t.prototype,"onChooseItems",null),(0,n.__decorate)([(0,c.watch)(":openLightBox.filebrowser")],t.prototype,"onOpenLightBox",null),(0,n.__decorate)([c.component],t)}(i.Dialog);t.FileBrowserPro=C,w.Jodit.modules.FileBrowserPro=C},515:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(13);(0,o(35).extendLang)(o(516));var r=n.Config.prototype.controls.filebrowser;r.settings={icon:"settings",exec:function(e){e.e.fire("toggleSettings.filebrowser")}},r.home={icon:"home",exec:function(e){e.e.fire("goHome.filebrowser")}},r.preview={icon:"eye",exec:function(e){e.e.fire("togglePreview.filebrowser")}},r.next={icon:"angle-right",isDisabled:function(e){return!e.historyManager.canNext()},exec:function(e){e.historyManager.next()}},r.previous={icon:"angle-left",isDisabled:function(e){return!e.historyManager.canPrevious()},exec:function(e){e.historyManager.previous()}},Object.assign(n.Config.prototype.filebrowser,{buttons:["filebrowser.home","filebrowser.previous","filebrowser.next","|","filebrowser.upload","filebrowser.remove","filebrowser.update","filebrowser.select","filebrowser.edit","|","filebrowser.preview","about"],sort:!1,pixelOffsetLoadNewChunk:200,width:750,height:400,previewOfficeURL:"https://view.officeapps.live.com/op/view.aspx?src="})},468:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.finder=void 0;var n=o(1),r=o(216),i=o(469),s=o(2);o(515);var a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.requires=["license"],t.hasStyle=!s.Jodit.fatMode,t}return(0,n.__extends)(t,e),t.prototype.afterInit=function(e){var t=this;e.e.on("getInstanceFileBrowser",(function(e){return t.__instance||(t.__instance=new i.FileBrowserPro(e)),t.__instance}))},t.prototype.beforeDestruct=function(e){var t;e.e.off("getInstanceFileBrowser"),null===(t=this.__instance)||void 0===t||t.destruct()},t}(r.Plugin);t.finder=a,s.Jodit.plugins.add("finder",a)},510:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContextMenuManager=void 0;var n=o(1),r=o(221),i=o(32),s=o(46),a=o(227),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,n.__extends)(t,e),t.prototype.className=function(){return"ContextMenuManager"},t.prototype.onFolderContext=function(e,t){return this.buildContextItemMenu(this.getFolderContextActions(e),t),!1},t.prototype.onItemContext=function(e,t,o){return this.buildContextItemMenu(this.getItemContextActions(e),o),!1},t.prototype.onSourceContext=function(e,t){return this.buildContextItemMenu(this.getSourceContextActions(e),t),!1},t.prototype.buildContextItemMenu=function(e,t){if(this.j.o.contextMenu){var o=(0,r.makeContextMenu)(this.j).setMod("theme",this.j.state.theme);o.show(t.clientX,t.clientY,e.filter((function(e){return e&&!1!==e.enabled}))),this.j.e.on(this.j,"afterClose",(function(){o.isOpened&&o.close()}))}},t.prototype.getItemContextActions=function(e){var t=this;if(this.j.stateManager.isActive(e)||this.j.stateManager.addActive(e,this.j.state.activeElements.length>1),"folder"===e.type)return this.getFolderContextActions({type:"directory",children:[],name:e.name||"",path:e.path,sourceName:e.sourceName});var o=this.j.options,n=this.j.dataProvider,r=1===this.j.state.activeElements.length;return[{icon:"pencil",title:"Edit",enabled:Boolean(e.isImage)&&o.editImage&&r&&(n.canI("ImageResize")||n.canI("ImageCrop")),exec:function(){a.openImageEditor.call(t.j,e.imageURL,e.name||"",t.j.state.currentPath,t.j.state.currentSource)}},{icon:"italic",title:"Rename",enabled:n.canI("FileRename")&&r,exec:function(){return t.j.e.fire("fileRename.filebrowser",e)}},{icon:"bin",title:"Delete",enabled:n.canI("FileRemove"),exec:function(){return t.j.e.fire("fileRemove.filebrowser",e)}},{icon:"eye",title:"Preview",enabled:Boolean(e.isImage||"file"===e.type)&&o.preview&&r,exec:function(){return t.j.e.fire("openLightBox.filebrowser",e)}},{icon:"upload",title:"Download",exec:function(){e.fileURL&&t.j.ow.open(e.fileURL)}}]},t.prototype.getFolderContextActions=function(e){var t=this,o=this.j.dataProvider;return[{icon:"pencil",title:"Rename",exec:function(){t.j.e.fire("folderRename.filebrowser",e)},enabled:o.canI("FolderRename")},{icon:"bin",title:"Delete",exec:function(){t.j.e.fire("folderRemove.filebrowser",e)},enabled:o.canI("FolderRemove")},{icon:"plus",title:"Add folder",exec:function(){t.j.e.fire("folderCreate.filebrowser",e)},enabled:o.canI("FolderCreate")}]},t.prototype.getSourceContextActions=function(e){var t=this;return[{icon:"plus",title:"Create folder",exec:function(){t.j.e.fire("folderCreate.filebrowser",e)}}]},(0,n.__decorate)([(0,s.watch)(":contextmenuFolder.filebrowser")],t.prototype,"onFolderContext",null),(0,n.__decorate)([(0,s.watch)(":contextmenuItem.filebrowser")],t.prototype,"onItemContext",null),(0,n.__decorate)([(0,s.watch)(":contextmenuSource.filebrowser")],t.prototype,"onSourceContext",null),(0,n.__decorate)([s.component],t)}(i.ViewComponent);t.ContextMenuManager=c},511:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parentPath=void 0,t.parentPath=function(e){var t=e.split("/").filter((function(e){return e.length}));return t.pop(),t.join("/")||"/"}},509:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HistoryManager=void 0;var n=o(1),r=o(24),i=o(32),s=o(46),a=function(e){function t(t,o){var n=e.call(this,t)||this;return n.state=o,n.history=[],n.historyIndex=0,n}return(0,n.__extends)(t,e),t.prototype.className=function(){return"HistoryManager"},t.prototype.canNext=function(){return this.history.length-1>this.historyIndex},t.prototype.canPrevious=function(){return this.historyIndex>0},t.prototype.push=function(e){var t=this.historyIndex,o=this.history[t];if(!o||o.currentSource!==e.currentSource||o.currentPath!==e.currentPath){var r=(0,n.__spreadArray)([],(0,n.__read)(this.history),!1);r.length-1!==t&&(r=r.slice(0,t+1)),r.push(e),o&&(t+=1),this.history=r,this.historyIndex=t}},t.prototype.next=function(){this.canNext()&&(this.historyIndex+=1,this.updateState())},t.prototype.previous=function(){this.canPrevious()&&(this.historyIndex-=1,this.updateState())},t.prototype.updateCurrent=function(){this.history[this.historyIndex]={currentSource:this.state.currentSource,currentPath:this.state.currentPath,tree:(0,r.fastClone)(this.state.tree),elements:(0,n.__spreadArray)([],(0,n.__read)(this.state.elements),!1)}},t.prototype.onHome=function(){this.state.currentPath="",this.state.currentSource="",this.j.e.fire("afterOpenFolder.filebrowser update.filebrowser")},t.prototype.onOpenFolder=function(){this.push({tree:[],elements:[],currentPath:this.state.currentPath,currentSource:this.state.currentSource}),this.j.e.fire("changeSelection")},t.prototype.updateState=function(){var e=this.history[this.historyIndex],t=e.tree,o=e.elements,r=e.currentSource,i=e.currentPath;this.state.activeElements=[],this.state.elements=(0,n.__spreadArray)([],(0,n.__read)(o),!1),this.state.tree=(0,n.__spreadArray)([],(0,n.__read)(t),!1),this.state.currentSource=r,this.state.currentPath=i,this.j.e.fire("changeSelection")},(0,n.__decorate)([(0,s.watch)(["state.elements","state.tree"])],t.prototype,"updateCurrent",null),(0,n.__decorate)([(0,s.watch)(":goHome.filebrowser")],t.prototype,"onHome",null),(0,n.__decorate)([(0,s.watch)(":afterOpenFolder.filebrowser")],t.prototype,"onOpenFolder",null),(0,n.__decorate)([s.component],t)}(i.ViewComponent);t.HistoryManager=a},514:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoadingManager=void 0;var n=o(1),r=o(32),i=o(46),s=function(e){function t(t,o){var n=e.call(this,t)||this;return n.state=o,n.offset=0,n.countInOneChunk=20,n.stopLoadingParts=!1,n}return(0,n.__extends)(t,e),t.prototype.className=function(){return"LoadingManager"},t.prototype.onUpdateFileBrowser=function(){return(0,n.__awaiter)(this,void 0,Promise,(function(){return(0,n.__generator)(this,(function(e){switch(e.label){case 0:return this.j.state.activeElements=[],this.j.panel.setMod("loading",!0),[4,Promise.all([this.loadFolders(),this.loadItems()])];case 1:return e.sent(),this.j.panel.setMod("loading",!1),[2]}}))}))},t.prototype.loadFolders=function(){return(0,n.__awaiter)(this,void 0,Promise,(function(){var e,t,o,r,i;return(0,n.__generator)(this,(function(n){switch(n.label){case 0:if(!this.j.isOpened)return[2];t=(e=this.j.state).currentPath,o=e.currentSource,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.j.dataProvider.tree(t,o)];case 2:return r=n.sent(),this.j.stateManager.fillSources(r,t),this.j.state.sources=r,[3,4];case 3:return i=n.sent(),this.j.status(i),[3,4];case 4:return[2]}}))}))},t.prototype.loadItems=function(){return(0,n.__awaiter)(this,void 0,Promise,(function(){var e,t;return(0,n.__generator)(this,(function(o){switch(o.label){case 0:if(!this.j.isOpened)return[2];o.label=1;case 1:return o.trys.push([1,6,,7]),this.offset=0,this.stopLoadingParts=!1,e=this.j.state,[4,this.loadPartItems()];case 2:e.elements=o.sent(),this.stopLoadingParts=this.countInOneChunk>this.j.state.elements.length,o.label=3;case 3:return this.stopLoadingParts||this.j.state.elements.length>this.j.panel.countInColumn*this.j.panel.countInRow?[3,5]:[4,this.loadItemsChunk()];case 4:return o.sent(),[3,3];case 5:return[3,7];case 6:return t=o.sent(),this.j.status(t),[3,7];case 7:return[2]}}))}))},t.prototype.loadItemsChunk=function(){return(0,n.__awaiter)(this,void 0,Promise,(function(){var e,t;return(0,n.__generator)(this,(function(o){switch(o.label){case 0:if(this.stopLoadingParts)return[2];o.label=1;case 1:return o.trys.push([1,3,,4]),this.offset+=this.countInOneChunk,[4,this.loadPartItems()];case 2:return e=o.sent(),this.stopLoadingParts=this.countInOneChunk>e.length,e.length&&(this.j.state.elements=this.j.state.elements.concat(e)),[3,4];case 3:return t=o.sent(),this.j.status(t),[3,4];case 4:return[2]}}))}))},t.prototype.loadPartItems=function(){var e=this.j.state;return this.j.dataProvider.items(e.currentPath,e.currentSource,{offset:this.offset,limit:this.countInOneChunk,sortBy:e.sortBy,withFolders:e.withFolders,foldersPosition:e.foldersPosition,onlyImages:e.onlyImages,filterWord:e.filterWord})},(0,n.__decorate)([(0,i.watch)(":update.filebrowser")],t.prototype,"onUpdateFileBrowser",null),(0,n.__decorate)([(0,i.watch)(["state.currentPath","state.currentSource"]),(0,i.debounce)((function(e){return{timeout:e.defaultTimeout,promisify:!0}}))],t.prototype,"loadFolders",null),(0,n.__decorate)([(0,i.watch)(["state.currentPath","state.currentSource","state.sortBy","state.onlyImages","state.foldersPosition","state.filterWord"]),(0,i.debounce)((function(e){return{timeout:e.defaultTimeout,promisify:!0}}))],t.prototype,"loadItems",null),(0,n.__decorate)([(0,i.debounce)((function(e){return{timeout:e.defaultTimeout,promisify:!0}}))],t.prototype,"loadItemsChunk",null),(0,n.__decorate)([i.component],t)}(r.ViewComponent);t.LoadingManager=s},508:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PersistentStore=void 0;var n=o(1),r=o(32),i=o(46),s=o(223),a=function(e){function t(t,o){var n=e.call(this,t)||this;return n.state=o,n.sortBy="changed-desc",n.view="tiles",n.foldersPosition="top",n.tileSize="default",n.favorites=[],n.showSideBar=!0,n.showPreview=!1,n.showFavorites=!0,n}return(0,n.__extends)(t,e),t.prototype.className=function(){return"PersistentStore"},t.prototype.onChangeThemeSetField=function(){this.theme=this.state.theme},t.prototype.onChangeView=function(){this.view=this.state.view},t.prototype.onChangeSortBy=function(){this.sortBy=this.state.sortBy},t.prototype.onChangeTileSize=function(){this.tileSize=this.state.tileSize},t.prototype.onChangeFavorites=function(){this.favorites=this.state.favorites},t.prototype.onChangeShowSideBar=function(){this.showSideBar=this.state.showSideBar},t.prototype.onChangeShowPreview=function(){this.showPreview=this.state.showPreview},t.prototype.onChangeShowFavorites=function(){this.showFavorites=this.state.showFavorites},t.prototype.onChangeFoldersPosition=function(){this.foldersPosition=this.state.foldersPosition},t.prototype.syncWithState=function(){this.state.tileSize=this.tileSize,this.state.favorites=this.favorites.map((function(e){return e instanceof s.FileBrowserItem?e:s.FileBrowserItem.create(e)})),this.state.view=this.view,this.state.theme=this.theme,this.state.showSideBar=this.showSideBar,this.state.showPreview=this.showPreview,this.state.showFavorites=this.showFavorites,this.state.sortBy=this.sortBy,this.state.foldersPosition=this.foldersPosition},(0,n.__decorate)([i.persistent],t.prototype,"theme",void 0),(0,n.__decorate)([i.persistent],t.prototype,"sortBy",void 0),(0,n.__decorate)([i.persistent],t.prototype,"view",void 0),(0,n.__decorate)([i.persistent],t.prototype,"foldersPosition",void 0),(0,n.__decorate)([i.persistent],t.prototype,"tileSize",void 0),(0,n.__decorate)([i.persistent],t.prototype,"favorites",void 0),(0,n.__decorate)([i.persistent],t.prototype,"showSideBar",void 0),(0,n.__decorate)([i.persistent],t.prototype,"showPreview",void 0),(0,n.__decorate)([i.persistent],t.prototype,"showFavorites",void 0),(0,n.__decorate)([(0,i.watch)("state.theme")],t.prototype,"onChangeThemeSetField",null),(0,n.__decorate)([(0,i.watch)("state.view")],t.prototype,"onChangeView",null),(0,n.__decorate)([(0,i.watch)("state.sortBy")],t.prototype,"onChangeSortBy",null),(0,n.__decorate)([(0,i.watch)("state.tileSize")],t.prototype,"onChangeTileSize",null),(0,n.__decorate)([(0,i.watch)("state.favorites")],t.prototype,"onChangeFavorites",null),(0,n.__decorate)([(0,i.watch)("state.showSideBar")],t.prototype,"onChangeShowSideBar",null),(0,n.__decorate)([(0,i.watch)("state.showPreview")],t.prototype,"onChangeShowPreview",null),(0,n.__decorate)([(0,i.watch)("state.showFavorites")],t.prototype,"onChangeShowFavorites",null),(0,n.__decorate)([(0,i.watch)("state.foldersPosition")],t.prototype,"onChangeFoldersPosition",null),(0,n.__decorate)([i.component],t)}(r.ViewComponent);t.PersistentStore=a},503:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StateManager=void 0;var n=o(1),r=o(46),i=function(){function e(e){this.state=e}return e.prototype.getIndex=function(e,t){return void 0===t&&(t=this.state.elements),t.findIndex((function(t){return t.uniqueHashKey===e.uniqueHashKey}))},e.prototype.isActive=function(e){return Boolean(this.state.activeElements.find((function(t){return t.uniqueHashKey===e.uniqueHashKey})))},e.prototype.isFavorite=function(e){return Boolean(this.state.favorites.find((function(t){return t.uniqueHashKey===e.uniqueHashKey})))},e.prototype.addActive=function(e,t){var o;this.state.metaInfo=e,this.state.info=null!==(o=e.file)&&void 0!==o?o:"",this.state.lastSelectedIndex=this.getIndex(e),this.state.activeElements=t?(0,n.__spreadArray)((0,n.__spreadArray)([],(0,n.__read)(this.state.activeElements),!1),[e],!1):[e]},e.prototype.callSelectHandler=function(){var e,t=this.state.activeElements;null===(e=this.state.onSelectCallBack)||void 0===e||e.call(this,{baseurl:"",files:t.map((function(e){return e.fileURL})),isImages:t.map((function(e){return Boolean(e.isImage)}))})},e.prototype.setFilter=function(e){this.state.filterWord=e},e.prototype.addMessage=function(e){var t,o=this.state.messages;(null===(t=o[o.length-1])||void 0===t?void 0:t.message)!==e.message&&(this.state.messages=(0,n.__spreadArray)((0,n.__spreadArray)([],(0,n.__read)(o),!1),[e],!1))},e.prototype.removeMessage=function(e){var t=this.state.messages.indexOf(e);if(-1!==t){var o=(0,n.__spreadArray)([],(0,n.__read)(this.state.messages),!1);o.splice(t,1),this.state.messages=o}},e.prototype.toggleFavorite=function(e){var t=this.getIndex(e,this.state.favorites),o=(0,n.__spreadArray)([],(0,n.__read)(this.state.favorites),!1);-1===t?o.push(e):o.splice(t,1),this.state.favorites=o},e.prototype.fillSources=function(e,t){var o=this,n=function(e){return e.filter((function(e){return"."!==e&&".."!==e}))};if(this.state.tree.length&&t){var r=function(e,t){var o;return null!==(o=e.find((function(e){return e.name===t})))&&void 0!==o?o:null};this.removeActive(this.state.tree),e.forEach((function(e){var i=r(o.state.tree,e.name);if(i){i.isActive=!0;var s=t.split("/").reduce((function(e,t){return e&&r(e.children,t)}),i);s&&(s.isActive=!0,s.children=n(e.folders).map((function(o){return{type:"directory",name:o,path:t+"/"+o,sourceName:e.name,children:[]}})))}}))}else this.state.tree=e.map((function(e){return{type:"source",name:e.name,title:e.title,sourceName:e.name,path:"/",children:n(e.folders).map((function(t){return{type:"directory",name:t,path:t,sourceName:e.name,children:[]}}))}}))},e.prototype.removeActive=function(e){var t=this;e.forEach((function(e){e.isActive=!1,t.removeActive(e.children)}))},Object.defineProperty(e.prototype,"isFavoriteItems",{get:function(){return this.state.favorites===this.state.elements},enumerable:!1,configurable:!0}),(0,n.__decorate)([r.autobind],e.prototype,"getIndex",null),(0,n.__decorate)([r.autobind],e.prototype,"isActive",null),(0,n.__decorate)([r.autobind],e.prototype,"isFavorite",null),e}();t.StateManager=i},516:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ru=void 0;var n=o(517);t.ru=n},471:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(122),r=o(472),i=o(473);n.Icon.set("heart",String(r)),n.Icon.set("home",String(i))},497:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserFolder=void 0;var n=o(1);o(498);var r=o(122),i=o(46),s=function(e){function t(t,o){var n=e.call(this,t)||this;return n.item=o,n.syncMod=!0,n.getElm("name").innerText=o.name,t.e.on(n.container,"click",(function(){return n.getMod("active")||n.setMod("loading",!0),t.e.fire("openFolder",o)})).on(n.container,"contextmenu",(function(e){return t.e.fire("contextmenuFolder.filebrowser",o,e)})),n}return(0,n.__extends)(t,e),t.prototype.className=function(){return"UIBrowserFolder"},t.prototype.render=function(){return'<div>\n\t\t\t<div class="&__icon">\n\t\t\t\t<div class=\'&__loader\'></div>\n\t\t\t\t<div class="&__icon-wrapper">\n\t\t\t\t\t*folder*\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="&__name"></div>\n\t\t\t<div class="&__arrow">*angle-right*</div>\n\t\t</div>'},(0,n.__decorate)([i.component],t)}(r.UIElement);t.UIBrowserFolder=s},504:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserHeader=void 0;var n=o(1);o(505);var r=o(122),i=o(46),s=o(205),a=function(e){function t(t,o,n){var i,a=e.call(this,t)||this;return a.options=o,a.stateManager=n,a.syncMod=!0,a.toolbar=(0,s.makeCollection)(a.j),a.filter=new r.UIInput(a.j,{icon:"search",placeholder:"Filter",clearButton:!0,onChange:function(e){a.stateManager.setFilter(e)}}),a.append(a.toolbar).append(a.filter),a.filter.container.classList.add(a.getFullElName("filter")),a.toolbar.setMod("mode","header").build(null!==(i=a.options.toolbarButtons)&&void 0!==i?i:[]),a}return(0,n.__extends)(t,e),t.prototype.className=function(){return"UIBrowserHeader"},(0,n.__decorate)([i.component],t)}(r.UIGroup);t.UIBrowserHeader=a},478:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserItem=void 0;var n=o(1);o(479);var r=o(122),i=o(46),s=o(223),a=o(15),c=o(24),l=function(e){function t(t,o){var n=e.call(this,t)||this;return n.item=s.FileBrowserItem.create(o),t.e.on(n.container,"click contextmenu dblclick",(function(e){return t.e.fire(e.type+"Item.filebrowser",n.item,(0,c.ctrlKey)(e)||e.shiftKey,e),!1})),n}return(0,n.__extends)(t,e),t.prototype.className=function(){return"UIBrowserItem"},t.prototype.render=function(){return"<div tabindex='-1'>\n\t\t\t<div class='&__image'></div>\n\t\t\t<div class='&__info'></div>\n\t\t\t<div class='&__heart'>*heart*</div>\n\t\t</div>"},t.prototype.onClickFavorite=function(){var e=this;return this.bubble((function(t){e.jodit.e.fire(t,"toggleFavoriteItem",e.item)})),!1},t.prototype.onAction=function(e){return this.jodit.e.fire(e.type+"Item.filebrowser",this.item,(0,c.ctrlKey)(e)||e.shiftKey,e),!1},t.prototype.update=function(){var t;(0,c.css)(this.getElm("image"),"backgroundImage","url("+this.item.imageURL+")"),this.setMod("is-file",!1===this.item.isImage).setMod("type",null!==(t=this.item.type)&&void 0!==t?t:"file").setElementValue("name",this.item.file).setElementValue("time",this.item.time).setElementValue("filesize",this.item.size),(0,c.attr)(this.container,"title",this.item.file+" "+this.item.time+" "+this.item.size),e.prototype.update.call(this)},t.prototype.setElementValue=function(e,t){var o=this.getFullElName(e),n=this.getElm(e);if(!t)return n&&a.Dom.safeRemove(n),this;if(!n){var r=this.getElm("info");n=this.j.create.div(o),r.appendChild(n)}return n.innerText=t,this},(0,n.__decorate)([(0,i.watch)("heart:click")],t.prototype,"onClickFavorite",null),(0,n.__decorate)([(0,i.watch)(["container:click","container:contextmenu","container:dblclick"])],t.prototype,"onAction",null),(0,n.__decorate)([i.component],t)}(r.UIElement);t.UIBrowserItem=l},512:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UILightBox=void 0;var n=o(1);o(513);var r=o(15),i=o(46),s=o(24),a=o(14),c=function(e){function t(t,o,n){var i=e.call(this,t)||this;i.current=o,i.elements=n,i.dialog=new r.Dialog;var s=i.dialog;return s.setMod("theme",t.state.theme).toolbar.setMod("mode","header"),s.open(i),i.elements=i.elements.filter((function(e){return e.isImage})),s.e.on(s,"afterClose",(function(){i.destruct()})),i.addGlobalListeners(),i.onChangeCurrent(),s.toolbar.build([{icon:"check",exec:function(){t.stateManager.addActive(i.current,!1),t.e.fire("select.filebrowser"),s.close()}},"dialog.close"]),i}var o;return(0,n.__extends)(t,e),o=t,t.prototype.className=function(){return"UILightBox"},t.prototype.render=function(){return"<div>\n\t\t\t<div class='&__previous'>*angle-left*</div>\n\t\t\t<div class='&__preview'></div>\n\t\t\t<div class='&__loader'></div>\n\t\t\t<div class='&__next'>*angle-right*</div>\n\t\t</div>"},t.prototype.onChangeCurrent=function(){return(0,n.__awaiter)(this,void 0,Promise,(function(){var e,t,o,i;return(0,n.__generator)(this,(function(n){switch(n.label){case 0:return e=this.current,this.setMod("loading",!0),t=this.getElm("preview"),r.Dom.detach(t),(0,s.css)(t,{backgroundImage:null}),e.isImage?[4,(0,s.loadImage)(e.fileURL,this.j)]:[3,2];case 1:return o=n.sent(),this.dialog.setPosition(),(0,s.css)(t,{width:Math.min(this.jodit.ow.innerWidth,o.naturalWidth),height:Math.min(this.jodit.ow.innerHeight-100,o.naturalHeight),backgroundImage:"url("+o.src+")"}),[3,4];case 2:return[4,this.makeIframe(e.fileURL)];case 3:i=n.sent(),t.appendChild(i),n.label=4;case 4:return this.dialog.setSize(),this.dialog.setPosition(),this.setMod("loading",!1),[2]}}))}))},t.prototype.makeIframe=function(e){var t=this.j.c.element("iframe");return t.classList.add(this.getFullElName("office-iframe")),t.src=/\.pdf/.test(e)?e:this.j.o.previewOfficeURL+encodeURIComponent(e),t},t.prototype.onPreviousClick=function(){var e=this.j.stateManager.getIndex(this.current,this.elements);e>0?e-=1:e=this.elements.length-1,this.current=this.elements[e]},t.prototype.onNextClick=function(){var e=this.j.stateManager.getIndex(this.current,this.elements);this.elements.length-1>e?e+=1:e=0,this.current=this.elements[e]},t.open=function(e,t,n){return new o(e,t,n)},t.prototype.addGlobalListeners=function(){this.j.e.on(this.j.od,"keydown",this.onKeyPress)},t.prototype.onKeyPress=function(e){if(e.key===a.KEY_LEFT||e.key===a.KEY_RIGHT||e.key===a.KEY_SPACE)return e.key===a.KEY_LEFT?this.onPreviousClick():this.onNextClick(),!1},t.prototype.removeGlobalListeners=function(){this.j.e.off(this.j.od,"keydown",this.onKeyPress)},t.prototype.destruct=function(){return this.removeGlobalListeners(),this.dialog.destruct(),e.prototype.destruct.call(this)},(0,n.__decorate)([(0,i.watch)("current")],t.prototype,"onChangeCurrent",null),(0,n.__decorate)([(0,i.watch)("previous:click")],t.prototype,"onPreviousClick",null),(0,n.__decorate)([(0,i.watch)("next:click")],t.prototype,"onNextClick",null),(0,n.__decorate)([i.autobind],t.prototype,"onKeyPress",null),o=(0,n.__decorate)([i.component],t)}(r.UIElement);t.UILightBox=c},484:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserMessage=void 0;var n=o(1),r=o(122),i=o(46),s=o(24),a=function(e){function t(t,o){var n=e.call(this,t)||this;return n.container.innerText=(0,s.isString)(o)?o:o.message,n}return(0,n.__extends)(t,e),t.prototype.className=function(){return"UIBrowserMessage"},(0,n.__decorate)([i.component],t)}(r.UIElement);t.UIBrowserMessage=a},482:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserMessages=void 0;var n=o(1);o(483);var r=o(122),i=o(46),s=o(484),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,n.__extends)(t,e),t.prototype.className=function(){return"UIBrowserMessages"},t.prototype.build=function(e){var t=this;this.clear(),e.forEach((function(e){var o=new s.UIBrowserMessage(t.jodit,e.message);o.setMod("type",e.type),t.append(o)}))},(0,n.__decorate)([i.component],t)}(r.UIGroup);t.UIBrowserMessages=a},474:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserPanel=void 0;var n=o(1);o(475);var r=o(122),i=o(476),s=o(482),a=o(46),c=o(485),l=o(489),u=o(24),h=o(491),d=o(499),p=o(501),f=function(e){function t(t,o){var n=e.call(this,t)||this;return n.stateManager=o,n.syncMod=!0,n.sources=new h.UIBrowserSources(n.j),n.sidebar=new c.UISidebar(n.jodit,[n.sources],n.stateManager.state),n.preview=new p.UIPreview(n.jodit,n.stateManager.state),n.statusbar=new d.UIBrowserStatusBar(n.j),n.items=new i.UIVirtualScroll(n.j,n.stateManager),n.settings=new l.UIBrowserSettings(n.jodit,n.stateManager.state),n.messages=new s.UIBrowserMessages(n.j),n.state=o.state,n.append(n.sidebar,"content"),n.append(n.items,"content"),n.append(n.messages,"footer"),n.append(n.settings,"content"),n.append(n.preview,"content"),n.append(n.statusbar,"footer"),n.onChangeElements(),n.onChangeSources(),n.onChangeView(),n.onChangeTileSize(),n.onChangeShowFavorites(),n.onChangeMessages(),n.onChangeActiveElements(),n.onChangeFavorites(),n.onChangeShowSideBar(),n.onChangeShowSettings(),n.onChangeShowPreview(),n.onChangeTheme(),n}return(0,n.__extends)(t,e),t.prototype.className=function(){return"UIBrowserPanel"},Object.defineProperty(t.prototype,"countInRow",{get:function(){if("list"===this.state.view)return 1;var e=this.items.elements[0].container,t=(0,u.css)(e,"marginLeft");return Math.floor(this.items.container.offsetWidth/(e.offsetWidth+((0,u.isNumber)(t)?t:0)))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"countInColumn",{get:function(){var e=this.items.elements[0].container,t=(0,u.css)(e,"marginTop");return Math.floor(this.items.container.offsetHeight/(e.offsetHeight+((0,u.isNumber)(t)?t:0)))},enumerable:!1,configurable:!0}),t.prototype.render=function(){return"<div>\n\t\t\t<div class='&__content'></div>\n\t\t\t<div class='&__footer'></div>\n\t\t</div>"},t.prototype.onChangeTheme=function(){this.setMod("theme",this.stateManager.state.theme)},t.prototype.onChangeElements=function(){this.items.build(this.stateManager.state.elements)},t.prototype.onChangeActiveElements=function(){var e=this;this.state.activeElements.length||(this.state.info="",this.state.metaInfo=null),this.items.elements.forEach((function(t){t.setMod("active",Boolean(e.stateManager.isActive(t.item)))})),this.j.e.fire("changeSelection")},t.prototype.onChangeFavorites=function(){var e=this;this.items.elements.forEach((function(t){t.setMod("favorite",Boolean(e.stateManager.isFavorite(t.item)))}))},t.prototype.onChangeSources=function(){this.sources.build(this.stateManager.state.tree)},t.prototype.onChangeLastSelectedIndex=function(){var e,t=null===(e=this.items.elements[this.stateManager.state.lastSelectedIndex])||void 0===e?void 0:e.container;t&&((0,u.scrollIntoViewIfNeeded)(t,this.items.container,this.j.od),t.focus())},t.prototype.onChangeInfo=function(){this.statusbar.value(this.state.info,"center")},t.prototype.onChangePathOrSource=function(){this.statusbar.value(this.state.currentPath?this.state.currentPath+" ("+this.state.currentSource+")":this.i18n("Home"),"left")},t.prototype.onChangeShowSettings=function(){this.settings.setMod("hidden",!this.stateManager.state.showSettings)},t.prototype.onChangeShowPreview=function(){this.preview.setMod("hidden",!this.stateManager.state.showPreview)},t.prototype.onChangeShowSideBar=function(){this.sidebar.setMod("hidden",!this.stateManager.state.showSideBar)},t.prototype.onChangeView=function(){this.items.setMod("view",this.stateManager.state.view)},t.prototype.onChangeTileSize=function(){this.items.setMod("size",this.stateManager.state.tileSize)},t.prototype.onChangeShowFavorites=function(){this.sidebar.setMod("show-favorites",this.stateManager.state.showFavorites),this.items.setMod("show-favorites",this.stateManager.state.showFavorites)},t.prototype.onChangeMessages=function(){this.messages.build(this.stateManager.state.messages)},t.prototype.onItemDblClick=function(){return this.j.e.fire("select.filebrowser"),!1},t.prototype.onItemClick=function(e,t){this.stateManager.addActive(e,t)},t.prototype.onTogglePreview=function(){return this.state.showPreview=!this.state.showPreview,!1},t.prototype.onToggleFavoriteItem=function(e){this.stateManager.toggleFavorite(e)},t.prototype.onFolderClick=function(e){this.stateManager.state.currentSource=e.sourceName,this.stateManager.state.currentPath=e.path||"/",this.j.e.fire("afterOpenFolder.filebrowser")},(0,n.__decorate)([(0,a.watch)("state.theme")],t.prototype,"onChangeTheme",null),(0,n.__decorate)([(0,a.watch)("state.elements")],t.prototype,"onChangeElements",null),(0,n.__decorate)([(0,a.watch)("state.activeElements")],t.prototype,"onChangeActiveElements",null),(0,n.__decorate)([(0,a.watch)(["state.favorites","state.elements"])],t.prototype,"onChangeFavorites",null),(0,n.__decorate)([(0,a.watch)("state.sources")],t.prototype,"onChangeSources",null),(0,n.__decorate)([(0,a.watch)("state.lastSelectedIndex")],t.prototype,"onChangeLastSelectedIndex",null),(0,n.__decorate)([(0,a.watch)("state.info")],t.prototype,"onChangeInfo",null),(0,n.__decorate)([(0,a.watch)(["state.currentPath","state.currentSource"])],t.prototype,"onChangePathOrSource",null),(0,n.__decorate)([(0,a.watch)("state.showSettings")],t.prototype,"onChangeShowSettings",null),(0,n.__decorate)([(0,a.watch)("state.showPreview")],t.prototype,"onChangeShowPreview",null),(0,n.__decorate)([(0,a.watch)("state.showSideBar")],t.prototype,"onChangeShowSideBar",null),(0,n.__decorate)([(0,a.watch)("state.view")],t.prototype,"onChangeView",null),(0,n.__decorate)([(0,a.watch)("state.tileSize")],t.prototype,"onChangeTileSize",null),(0,n.__decorate)([(0,a.watch)("state.showFavorites")],t.prototype,"onChangeShowFavorites",null),(0,n.__decorate)([(0,a.watch)("state.messages")],t.prototype,"onChangeMessages",null),(0,n.__decorate)([(0,a.watch)(":dblclickItem.filebrowser")],t.prototype,"onItemDblClick",null),(0,n.__decorate)([(0,a.watch)(":clickItem.filebrowser")],t.prototype,"onItemClick",null),(0,n.__decorate)([(0,a.watch)(":togglePreview.filebrowser")],t.prototype,"onTogglePreview",null),(0,n.__decorate)([(0,a.watch)(":toggleFavoriteItem")],t.prototype,"onToggleFavoriteItem",null),(0,n.__decorate)([(0,a.watch)(":openFolder")],t.prototype,"onFolderClick",null),(0,n.__decorate)([a.component],t)}(r.UIGroup);t.UIBrowserPanel=f},501:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIPreview=void 0;var n=o(1);o(502);var r=o(122),i=o(46),s=o(487),a=o(24),c=o(37),l=o(478),u=function(e){function t(t,o){var n=e.call(this,t)||this;return n.state=o,n.lastLoadPromise=null,n.onChangeMetaInfo(),n}return(0,n.__extends)(t,e),t.prototype.className=function(){return"UIPreview"},t.prototype.addResize=function(){s.UIResize.remove(this),s.UIResize.install(this,screen.width>450?"left":"top")},t.prototype.render=function(){return'<div>\n\t\t\t\t<div class="&__image"></div>\n\t\t\t\t<div class="&__info"></div>\n\t\t\t\t<div class="&__loader"></div>\n\t\t\t\t<div class="&__empty-message">~Select image~</div>\n\t\t\t</div>'},t.prototype.setMod=function(t,o){return e.prototype.setMod.call(this,t,o),"hidden"===t&&!1===o&&this.onChangeMetaInfo(),this},t.prototype.onChangeMetaInfo=function(){var e,t,o=this;if(!this.getMod("hidden")){var n=this.state.metaInfo;this.setMod("empty",!n),c.Dom.detach(this.getElm("info")),(0,a.css)(this.getElm("image"),{backgroundImage:null}),n&&(this.setMod("is-file",!1===n.isImage).setMod("type",null!==(e=n.type)&&void 0!==e?e:"file"),l.UIBrowserItem.prototype.setElementValue.call(this,"name",n.file),l.UIBrowserItem.prototype.setElementValue.call(this,"time",n.time),l.UIBrowserItem.prototype.setElementValue.call(this,"filesize",n.size),this.setMod("loading",!0),null===(t=this.lastLoadPromise)||void 0===t||t.rejectCallback(),this.lastLoadPromise=(0,a.loadImage)(n.isImage?n.fileURL:n.imageURL,this.j),this.lastLoadPromise.then((function(e){e&&(0,a.css)(o.getElm("image"),{backgroundImage:"url("+e.src+")"})})).finally((function(){o.setMod("loading",!1)})).catch((function(){})))}},(0,n.__decorate)([(0,i.hook)("ready"),(0,i.watch)(":resize",window),(0,i.debounce)()],t.prototype,"addResize",null),(0,n.__decorate)([(0,i.watch)("state.metaInfo")],t.prototype,"onChangeMetaInfo",null),(0,n.__decorate)([i.component],t)}(r.UIGroup);t.UIPreview=u},506:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIProgress=void 0;var n=o(1);o(507);var r=o(122),i=o(46),s=function(e){function t(t,o){var n=e.call(this,t)||this;return n.state=o,n.onProgress(),n}return(0,n.__extends)(t,e),t.prototype.className=function(){return"UIProgress"},t.prototype.onProgress=function(){this.state.progress?this.show():this.hide(),this.progress(this.state.progress)},t.prototype.hide=function(){return this.setMod("hidden",!0),this},t.prototype.progress=function(e){var t=this;return this.container.style.width=e.toFixed(2)+"%",98>e||this.j.async.setTimeout((function(){t.hide()}),{label:"progress",timeout:300}),this},t.prototype.show=function(){return this.setMod("hidden",!1),this},(0,n.__decorate)([(0,i.watch)("state.progress")],t.prototype,"onProgress",null),(0,n.__decorate)([i.component],t)}(r.ProgressBar);t.UIProgress=s},489:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserSettings=void 0;var n=o(1);o(490);var r=o(122),i=o(46),s=function(e){function t(t,o){var n=e.call(this,t)||this;return n.state=o,t.e.on(n.getElm("close"),"click",(function(){n.state.showSettings=!1})),n}return(0,n.__extends)(t,e),t.prototype.className=function(){return"UIBrowserSettings"},t.prototype.render=function(){return'<div>\n\t\t\t<div class="'+this.getFullElName("close")+'">'+r.Icon.get("cancel")+'</div>\n\t\t\t<div class="'+this.getFullElName("title")+'">'+this.j.i18n("Settings")+'</div>\n\t\t\t<div class="'+this.getFullElName("options")+'"></div>\n\t\t</div>'},t.prototype.appendChildToContainer=function(e){this.getElm("options").appendChild(e)},t.prototype.setMod=function(t,o){return"hidden"===t&&!1===o&&this.generateSettings(),e.prototype.setMod.call(this,t,o)},t.prototype.onChangeView=function(){var e=this.getElm("tile-size");e&&(e.style.display="tiles"===this.state.view?"block":"none")},t.prototype.generateSettings=function(){var e=this;this.clear();var t=this.j;this.append([new r.UIButtonGroup(t,{label:"Theme",name:"theme",value:this.state.theme,radio:!0,options:[{value:"default",text:"Light"},{value:"dark",text:"Dark"}],onChange:function(t){e.state.theme=t[0].value}}),new r.UIButtonGroup(t,{label:"Show favorites",name:"showFavorites",value:this.state.showFavorites,radio:!0,options:[{value:!0,text:"Show"},{value:!1,text:"Hide"}],onChange:function(t){e.state.showFavorites=t[0].value}}),new r.UIButtonGroup(t,{label:"View",name:"view",value:this.state.view,radio:!0,options:[{value:"tiles",text:"Tiles"},{value:"list",text:"List"},{value:"compact",text:"Compact"}],onChange:function(t){e.state.view=t[0].value}}),new r.UIButtonGroup(t,{label:"Folders position",name:"foldersPosition",value:this.state.foldersPosition,radio:!0,options:[{value:"top",text:"Top"},{value:"bottom",text:"Bottom"},{value:"default",text:"Default"}],onChange:function(t){e.state.foldersPosition=t[0].value}}),new r.UISelect(t,{label:"Sort by",name:"sort-by",value:this.state.sortBy,options:[{value:"changed-asc",text:t.i18n("Sort by changed")+"(⬆)"},{value:"changed-desc",text:t.i18n("Sort by changed")+"(⬇)"},{value:"name-asc",text:t.i18n("Sort by name")+"(⬆)"},{value:"name-desc",text:t.i18n("Sort by name")+"(⬇)"},{value:"size-asc",text:t.i18n("Sort by size")+"(⬆)"},{value:"size-desc",text:t.i18n("Sort by size")+"(⬇)"}],onChange:function(t){e.state.sortBy=t}}),new r.UISelect(t,{label:"Tile size",name:"tile-size",value:this.state.tileSize,options:[{value:"xsmall",text:"Extra small"},{value:"small",text:"Small"},{value:"default",text:"Default"},{value:"large",text:"Large"},{value:"xlarge",text:"Extra large"}],onChange:function(t){e.state.tileSize=t}})]),this.onChangeView()},(0,n.__decorate)([(0,i.watch)("state.view")],t.prototype,"onChangeView",null),(0,n.__decorate)([i.component],t)}(r.UIGroup);t.UIBrowserSettings=s},485:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UISidebar=void 0;var n=o(1);o(486);var r=o(122),i=o(46),s=o(487),a=function(e){function t(t,o,n){var r=e.call(this,t,o)||this;return r.state=n,r.onChangeFavorites(),r}return(0,n.__extends)(t,e),t.prototype.className=function(){return"UISidebar"},t.prototype.render=function(){return"<div>\n\t\t\t<div class='&__hide-btn'>*angle-left*</div>\n\t\t\t<div class='&__favorites'>*heart* ~Favorites~</div>\n\t\t\t<div class='&__box'></div>\n\t\t</div>"},t.prototype.appendChildToContainer=function(e){this.getElm("box").appendChild(e)},t.prototype.addResize=function(){s.UIResize.remove(this),s.UIResize.install(this,screen.width>450?"right":"bottom")},t.prototype.onChangeFavorites=function(){this.setMod("has-favorites",Boolean(this.state.favorites.length))},t.prototype.onClickHideButton=function(){return this.state.showSideBar=!this.state.showSideBar,!1},t.prototype.onClickFavorites=function(){return this.state.elements=this.state.favorites,!1},(0,n.__decorate)([(0,i.hook)("ready"),(0,i.watch)(":resize",window),(0,i.debounce)()],t.prototype,"addResize",null),(0,n.__decorate)([(0,i.watch)("state.favorites")],t.prototype,"onChangeFavorites",null),(0,n.__decorate)([(0,i.watch)("hide-btn:click")],t.prototype,"onClickHideButton",null),(0,n.__decorate)([(0,i.watch)("favorites:click")],t.prototype,"onClickFavorites",null),(0,n.__decorate)([i.component],t)}(r.UIGroup);t.UISidebar=a},493:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserSource=void 0;var n=o(1);o(494);var r=o(122),i=o(46),s=o(495),a=function(e){function t(t,o){var n=e.call(this,t,o)||this;return n.data=o,n.tree=new s.UITree(n.j,n.data.children),n.syncMod=!0,n.getElm("name").innerText=o.title||o.name,n.getElm("tree").appendChild(n.tree.container),t.e.on(n.container,"contextmenu",(function(e){return t.e.fire("contextmenuSource.filebrowser",o,e)})),n}return(0,n.__extends)(t,e),t.prototype.className=function(){return"UIBrowserSource"},t.prototype.render=function(){return'<div>\n\t\t\t<div class="&__name"></div>\n\t\t\t<div class="&__tree"></div>\n\t\t</div>'},(0,n.__decorate)([i.component],t)}(r.UIElement);t.UIBrowserSource=a},491:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserSources=void 0;var n=o(1);o(492);var r=o(122),i=o(46),s=o(493),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.syncMod=!0,t}return(0,n.__extends)(t,e),t.prototype.className=function(){return"UIBrowserSources"},t.prototype.build=function(e){var t=this;this.clear(),e.forEach((function(e){t.append(new s.UIBrowserSource(t.jodit,e))}))},(0,n.__decorate)([i.component],t)}(r.UIGroup);t.UIBrowserSources=a},499:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserStatusBar=void 0;var n=o(1);o(500);var r=o(122),i=o(46),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,n.__extends)(t,e),t.prototype.className=function(){return"UIBrowserStatusBar"},t.prototype.render=function(){return"<div>\n\t\t\t<div class='&__slot-left'></div>\n\t\t\t<div class='&__slot-center'></div>\n\t\t\t<div class='&__slot-right'></div>\n\t\t</div>"},t.prototype.value=function(e,t){return void 0===t&&(t="left"),this.getElm("slot-"+t).innerText=e,this},(0,n.__decorate)([i.component],t)}(r.UIElement);t.UIBrowserStatusBar=s},495:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UITree=void 0;var n=o(1);o(496);var r=o(122),i=o(46),s=o(497),a=function(e){function t(t,o){var n=e.call(this,t)||this;return n.syncMod=!0,n.build(o),n}var o;return(0,n.__extends)(t,e),o=t,t.prototype.className=function(){return"UITree"},t.prototype.build=function(e){var t=this;this.clear(),e.forEach((function(e){var n=new s.UIBrowserFolder(t.jodit,e);t.append(n),e.isActive&&n.setMod("active",!0),e.children.length&&t.append(new o(t.jodit,e.children))}))},o=(0,n.__decorate)([i.component],t)}(r.UIGroup);t.UITree=a},476:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIVirtualScroll=void 0;var n=o(1);o(477);var r=o(122),i=o(46),s=o(478),a=o(223),c=o(480),l=o(24),u=function(e){function t(t,o){var n=e.call(this,t)||this;return n.stateManager=o,n.syncMod=!0,n.addItemsSelector(),n}var o;return(0,n.__extends)(t,e),o=t,t.prototype.className=function(){return"UIVirtualScroll"},t.prototype.render=function(){return"<div>\n\t\t\t\t<div class=\"&__empty-message\">~There are no files~</div>\n\t\t\t\t<div class='&__loader'></div>\n\t\t\t\t<div class='&__drag-area'>~Drop image~</div>\n\t\t\t</div>"},t.prototype.build=function(e){var t=this,o=this.elements.findIndex((function(t,o){return!e[o]||t.item.uniqueHashKey!==a.FileBrowserItem.create(e[o]).uniqueHashKey}));if(o>-1){for(var n=o;this.elements.length>n;n+=1)this.elements[n].destruct();this.elements.length=o}e.slice(o>-1?o:this.elements.length).forEach((function(e){var o=new s.UIBrowserItem(t.jodit,e);Object.keys(t.mods).forEach((function(e){o.setMod(e,t.mods[e])})),t.append(o)})),this.setMod("empty",!this.elements.length)},t.prototype.onScrollLoadChunk=function(){!this.stateManager.isFavoriteItems&&this.j.o.pixelOffsetLoadNewChunk>this.container.scrollHeight-(this.container.scrollTop+this.container.offsetHeight)&&this.j.loadingManager.loadItemsChunk()},t.prototype.onDragOver=function(e){e.preventDefault(),this.setMod("dragover",!0)},t.prototype.onDragLeave=function(e){e.preventDefault(),this.setMod("dragover",!1)},t.prototype.addItemsSelector=function(){c.UISelectItems.install(this)},t.intersectRect=function(e,t){return!(t.left>e.left+e.width||e.left>t.left+t.width||t.top>e.top+e.height||e.top>t.top+t.height)},t.prototype.onSelectItems=function(e){var t=[];this.elements.forEach((function(n){var r=(0,l.position)(n.container);o.intersectRect(r,e)&&t.push(n.item)})),this.stateManager.state.activeElements=t},(0,n.__decorate)([(0,i.watch)(":afterResize"),(0,i.watch)(":resize"),(0,i.watch)("container:scroll"),(0,i.throttle)()],t.prototype,"onScrollLoadChunk",null),(0,n.__decorate)([(0,i.watch)("container:dragover")],t.prototype,"onDragOver",null),(0,n.__decorate)([(0,i.watch)(["container:dragleave","container:drop"])],t.prototype,"onDragLeave",null),o=(0,n.__decorate)([i.component],t)}(r.UIGroup);t.UIVirtualScroll=u},487:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIResize=void 0,o(488);var n=o(24),r=o(37),i=function(){function e(){}return e.remove=function(e){(0,n.css)(e.container,{width:null,height:null}),e.container.classList.remove("jodit-ui-resize"),r.Dom.safeRemove(e.container.querySelector(".jodit-ui-resize__handle"))},e.install=function(e,t){e.container.classList.add("jodit-ui-resize"),"static"===(0,n.css)(e.container,"position")&&(0,n.css)(e.container,"position","relative");var o=e.j.c.div("jodit-ui-resize__handle");o.classList.add("jodit-ui-resize__handle_type_"+t),e.container.appendChild(o),e.j.e.on(o,"mousedown touchstart",this.onStartResize.bind(this,e,t))},e.onStartResize=function(e,t,o){var n=e.j.async.throttle(this.onResize.bind(this,e,{x:o.clientX,y:o.clientY,w:e.container.offsetWidth,h:e.container.offsetHeight,direction:t}),e.j.defaultTimeout/10);e.j.lock(),e.j.e.on(e.j.ow,"mousemove touchmove",n).one(e.j.ow,"mouseup touchend",this.onEndResize.bind(this,e,n))},e.onResize=function(e,t,o){var r=["left","right"].includes(t.direction),i=e.container.parentElement;i&&(0,n.css)(e.container,r?"width":"height",100*(r?(t.w+(o.clientX-t.x)*("right"===t.direction?1:-1))/i.offsetWidth:(t.h+(o.clientY-t.y)*("top"===t.direction?1:-1))/i.offsetHeight)+"%")},e.onEndResize=function(e,t,o){e.j.e.off(e.j.ow,"mousemove touchmove",t),e.j.unlock()},e}();t.UIResize=i},480:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UISelectItems=void 0,o(481);var n=o(37),r=o(24),i=function(){function e(){}return e.remove=function(e){n.Dom.safeRemove(e.container.querySelector(".jodit-ui-select-items")),e.j.e.off(e.container,"mousedown.uiselectitems touchstart.uiselectitems")},e.install=function(e){var t=e.j.c.div("jodit-ui-select-items");e.j.e.on(e.container,"mousedown.uiselectitems touchstart.uiselectitems",this.onStartSelect.bind(this,e,t))},e.onStartSelect=function(e,t,o){if(o.target===e.container){(0,r.css)(t,{width:0,height:0}),e.container.appendChild(t);var n={x:o.clientX,y:o.clientY,w:e.container.offsetWidth,h:e.container.offsetHeight},i=e.j.async.throttle(this.onSelect.bind(this,e,t,n),e.j.defaultTimeout/10);e.j.lock(),e.j.e.on(e.j.ow,"mousemove touchmove",i).one(e.j.ow,"mouseup touchend",this.onEndSelect.bind(this,e,t,i)),e.onSelectItems({left:n.x,top:n.y,width:0,height:0})}},e.onSelect=function(e,t,o,n){var i={left:o.x>n.clientX?n.clientX:o.x,top:o.y>n.clientY?n.clientY:o.y,width:Math.abs(o.x-n.clientX),height:Math.abs(o.y-n.clientY)};(0,r.css)(t,i),e.onSelectItems(i)},e.onEndSelect=function(e,t,o,r){n.Dom.safeRemove(t),e.j.e.off(e.j.ow,"mousemove touchmove",o),e.j.unlock()},e}();t.UISelectItems=i},517:function(e){e.exports={Favorites:"Избранное",Settings:"Настройки",Light:"Светлая",Dark:"Темная",Theme:"Тема",Show:"Показать",Hide:"Скрыть","Show favorites":"Показывать избранное",Tiles:"Плитка",List:"Список",Compact:"Компактный",View:"Отображение","Folders position":"Позиция папок","Sort by":"Сортировать по","Extra small":"Очень маленькие",Small:"Маленькие",Large:"Большие","Extra large":"Очень большие","Tile size":"Размер плитки"}},472:function(e){e.exports='<svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"> <path d="M365.4,59.628c60.56,0,109.6,49.03,109.6,109.47c0,109.47-109.6,171.8-219.06,281.271 C146.47,340.898,37,278.568,37,169.099c0-60.44,49.04-109.47,109.47-109.47c54.73,0,82.1,27.37,109.47,82.1 C283.3,86.999,310.67,59.628,365.4,59.628z"/> </svg>'},473:function(e){e.exports='<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"> <path d="M28.7,16.3l-12-13c-0.4-0.4-1.1-0.4-1.5,0l-12,13C3,16.6,2.9,17,3.1,17.4C3.2,17.8,3.6,18,4,18h3v10c0,0.6,0.4,1,1,1h16 c0.6,0,1-0.4,1-1V18h3c0.4,0,0.8-0.2,0.9-0.6C29.1,17,29,16.6,28.7,16.3z"/> </svg>'},470:function(e,t,o){"use strict";o.r(t)},498:function(e,t,o){"use strict";o.r(t)},505:function(e,t,o){"use strict";o.r(t)},479:function(e,t,o){"use strict";o.r(t)},513:function(e,t,o){"use strict";o.r(t)},483:function(e,t,o){"use strict";o.r(t)},475:function(e,t,o){"use strict";o.r(t)},502:function(e,t,o){"use strict";o.r(t)},507:function(e,t,o){"use strict";o.r(t)},490:function(e,t,o){"use strict";o.r(t)},486:function(e,t,o){"use strict";o.r(t)},494:function(e,t,o){"use strict";o.r(t)},492:function(e,t,o){"use strict";o.r(t)},500:function(e,t,o){"use strict";o.r(t)},496:function(e,t,o){"use strict";o.r(t)},477:function(e,t,o){"use strict";o.r(t)},488:function(e,t,o){"use strict";o.r(t)},481:function(e,t,o){"use strict";o.r(t)}},function(e){return e(e.s=468)}])}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[10],{
|
|
1
|
+
"use strict";!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[10],{603:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.highlightSignature=void 0;var o=r(1),i=r(216),n=r(46),a=r(37),s=r(25),l=r(2);r(13).Config.prototype.highlightSignature={schema:{},excludeTags:["pre"]};var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.idleId=0,t}return(0,o.__extends)(t,e),t.prototype.afterInit=function(e){Object.keys(e.o.highlightSignature.schema).length&&e.e.on("change afterSetMode",this.walkNodes).on("afterGetValueFromEditor",t.removeUtilWrappers)},t.prototype.beforeDestruct=function(e){e.e.off("change afterSetMode",this.walkNodes).off("afterGetValueFromEditor",t.removeUtilWrappers)},t.prototype.walkNodes=function(){if(this.j.isEditorMode()){this.checkUtilsBoxToSchema();var e=this.j,t=e.ed.createNodeIterator(e.editor,NodeFilter.SHOW_TEXT);this.j.async.cancelIdleCallback(this.idleId),this.workLoop(t)}},t.prototype.runWorker=function(e,t){var r;this.j.e.mute();try{do{if(!(r=t.nextNode()))return;if(this.checkNormalizing(r))return;this.checkReplaceSchemas(r)}while(r&&e.timeRemaining()>1)}finally{this.j.e.unmute()}this.workLoop(t)},t.prototype.workLoop=function(e){var t=this;this.idleId=this.j.async.requestIdleCallback((function(r){t.runWorker(r,e)}))},t.prototype.checkNormalizing=function(e){return!!a.Dom.isText(e.nextSibling)&&(this.j.editor.normalize(),this.walkNodes(),!0)},t.prototype.checkReplaceSchemas=function(e){if(!t.hasUtilWrapper(e)){var r=e.nodeValue;if(null!=r){var o=this.j.o.highlightSignature;for(var i in o.schema){var n=RegExp(i);if(n.test(r)){var s=r.match(n);if(!s||void 0===s.index)continue;var l=o.schema[i](this.j,s);if(l)return a.Dom.markTemporary(l,{dataHighlightSchema:i}),void this.replaceMatchedTextToElm(e,r,s,l)}}}}},t.prototype.replaceMatchedTextToElm=function(e,t,r,o){var i,n=this.j,s=n.s.range,l=s.startContainer===e,h=s.startOffset,c=null!==(i=r.index)&&void 0!==i?i:0;e.nodeValue=t.substr(0,c);var u=t.substr(c+r[0].length);if(u.length){var f=n.createInside.text(u);a.Dom.after(e,f)}o.innerText=r[0],a.Dom.after(e,o),l&&this.restoreCursorPosition(h,e,o.firstChild,o.nextSibling)},t.hasUtilWrapper=function(e){return a.Dom.isTemporary(e.parentElement)},t.removeUtilWrappers=function(e){e.value=a.Dom.replaceTemporaryFromString(e.value)},t.prototype.restoreCursorPosition=function(e){for(var t,r,i=[],n=1;arguments.length>n;n++)i[n-1]=arguments[n];try{for(var a=(0,o.__values)(i),s=a.next();!s.done;s=a.next()){var l=s.value;if(l&&l.nodeValue){var h=l.nodeValue;if(h.length>=e){var c=this.j.s.createRange();c.setStart(l,e),this.j.s.selectRange(c,!1);break}e-=h.length}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}},t.prototype.checkUtilsBoxToSchema=function(){var e=this;a.Dom.temporaryList(this.j.editor).forEach((function(t){var r,o=(0,s.attr)(t,"dataHighlightSchema");if(o){var i=RegExp(o),n=null!==(r=t.innerText)&&void 0!==r?r:"";i.test(n)&&!n.replace(i,"").length||(e.j.s.save(),a.Dom.unwrap(t),e.j.s.restore())}}))},(0,o.__decorate)([(0,n.debounce)()],t.prototype,"walkNodes",null),(0,o.__decorate)([n.autobind],t.prototype,"runWorker",null),t}(i.Plugin);t.highlightSignature=h,l.Jodit.plugins.add("highlight-signature",h)}},function(e){return e(e.s=603)}])}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";((e,t)=>{if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var i in r)("object"==typeof exports?exports:e)[i]=r[i]}})(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[10],{234(e,t,r){r.r(t),r.d(t,{highlightSignature:()=>c});var i=r(181),o=r(59),s=r(19),n=r(17),a=r(11),l=r(1);r(2).D.prototype.highlightSignature={schema:{}};class c extends o.S{constructor(){super(...arguments),this.idleId=0}afterInit(e){Object.keys(e.o.highlightSignature.schema).length&&e.e.on("change afterSetMode",this.walkNodes).on("afterGetValueFromEditor",c.removeUtilWrappers)}beforeDestruct(e){e.e.off("change afterSetMode",this.walkNodes).off("afterGetValueFromEditor",c.removeUtilWrappers)}walkNodes(){if(!this.j.isEditorMode())return;this.checkUtilsBoxToSchema();const{j:e}=this,t=e.ed.createNodeIterator(e.editor,NodeFilter.SHOW_TEXT);this.j.async.cancelIdleCallback(this.idleId),this.workLoop(t)}runWorker(e,t){let r;this.j.e.mute();try{do{if(r=t.nextNode(),!r)return;if(this.checkNormalizing(r))return;this.checkReplaceSchemas(r)}while(r&&e.timeRemaining()>1)}finally{this.j.e.unmute()}this.workLoop(t)}workLoop(e){this.idleId=this.j.async.requestIdleCallback((t=>{this.runWorker(t,e)}))}checkNormalizing(e){return!!n.i.isText(e.nextSibling)&&(this.j.editor.normalize(),this.walkNodes(),!0)}checkReplaceSchemas(e){if(c.hasUtilWrapper(e))return;const t=e.nodeValue;if(null==t)return;const{j:r}=this,i=r.o.highlightSignature;for(const r in i.schema){const o=RegExp(r);if(o.test(t)){const s=t.match(o);if(!s||void 0===s.index)continue;const a=i.schema[r](this.j,s);if(a)return n.i.markTemporary(a,{dataHighlightSchema:r}),void this.replaceMatchedTextToElm(e,t,s,a)}}}replaceMatchedTextToElm(e,t,r,i){var o;const{j:s}=this,{range:a}=s.s,l=a.startContainer===e,c=a.startOffset,h=null!==(o=r.index)&&void 0!==o?o:0;e.nodeValue=t.substr(0,h);const d=t.substr(h+r[0].length);if(d.length){const t=s.createInside.text(d);n.i.after(e,t)}i.innerText=r[0],n.i.after(e,i),l&&this.restoreCursorPosition(c,e,i.firstChild,i.nextSibling)}static hasUtilWrapper(e){return n.i.isTemporary(e.parentElement)}static removeUtilWrappers(e){e.value=n.i.replaceTemporaryFromString(e.value)}restoreCursorPosition(e,...t){for(const r of t)if(r&&r.nodeValue){const t=r.nodeValue;if(t.length>=e){const t=this.j.s.createRange();t.setStart(r,e),this.j.s.selectRange(t,!1);break}e-=t.length}}checkUtilsBoxToSchema(){n.i.temporaryList(this.j.editor).forEach((e=>{var t;const r=(0,a.Lj)(e,"dataHighlightSchema");if(!r)return;const i=RegExp(r),o=null!==(t=e.innerText)&&void 0!==t?t:"";i.test(o)&&!o.replace(i,"").length||(this.j.s.save(),n.i.unwrap(e),this.j.s.restore())}))}}(0,i.gn)([(0,s.debounce)()],c.prototype,"walkNodes",null),(0,i.gn)([s.autobind],c.prototype,"runWorker",null),l.Jodit.plugins.add("highlight-signature",c)},181(e,t,r){function i(e,t,r,i){var o,s=arguments.length,n=3>s?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(3>s?o(n):s>3?o(t,r,n):o(t,r))||n);return s>3&&n&&Object.defineProperty(t,r,n),n}r.d(t,{gn:()=>i})}},e=>e(e.s=234)])}));
|
|
1
|
+
"use strict";((e,t)=>{if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var i in r)("object"==typeof exports?exports:e)[i]=r[i]}})(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[10],{234(e,t,r){r.r(t),r.d(t,{highlightSignature:()=>c});var i=r(181),o=r(59),s=r(19),n=r(17),a=r(11),l=r(1);r(2).D.prototype.highlightSignature={schema:{},excludeTags:["pre"]};class c extends o.S{constructor(){super(...arguments),this.idleId=0}afterInit(e){Object.keys(e.o.highlightSignature.schema).length&&e.e.on("change afterSetMode",this.walkNodes).on("afterGetValueFromEditor",c.removeUtilWrappers)}beforeDestruct(e){e.e.off("change afterSetMode",this.walkNodes).off("afterGetValueFromEditor",c.removeUtilWrappers)}walkNodes(){if(!this.j.isEditorMode())return;this.checkUtilsBoxToSchema();const{j:e}=this,t=e.ed.createNodeIterator(e.editor,NodeFilter.SHOW_TEXT);this.j.async.cancelIdleCallback(this.idleId),this.workLoop(t)}runWorker(e,t){let r;this.j.e.mute();try{do{if(r=t.nextNode(),!r)return;if(this.checkNormalizing(r))return;this.checkReplaceSchemas(r)}while(r&&e.timeRemaining()>1)}finally{this.j.e.unmute()}this.workLoop(t)}workLoop(e){this.idleId=this.j.async.requestIdleCallback((t=>{this.runWorker(t,e)}))}checkNormalizing(e){return!!n.i.isText(e.nextSibling)&&(this.j.editor.normalize(),this.walkNodes(),!0)}checkReplaceSchemas(e){if(c.hasUtilWrapper(e))return;const t=e.nodeValue;if(null==t)return;const{j:r}=this,i=r.o.highlightSignature;for(const r in i.schema){const o=RegExp(r);if(o.test(t)){const s=t.match(o);if(!s||void 0===s.index)continue;const a=i.schema[r](this.j,s);if(a)return n.i.markTemporary(a,{dataHighlightSchema:r}),void this.replaceMatchedTextToElm(e,t,s,a)}}}replaceMatchedTextToElm(e,t,r,i){var o;const{j:s}=this,{range:a}=s.s,l=a.startContainer===e,c=a.startOffset,h=null!==(o=r.index)&&void 0!==o?o:0;e.nodeValue=t.substr(0,h);const d=t.substr(h+r[0].length);if(d.length){const t=s.createInside.text(d);n.i.after(e,t)}i.innerText=r[0],n.i.after(e,i),l&&this.restoreCursorPosition(c,e,i.firstChild,i.nextSibling)}static hasUtilWrapper(e){return n.i.isTemporary(e.parentElement)}static removeUtilWrappers(e){e.value=n.i.replaceTemporaryFromString(e.value)}restoreCursorPosition(e,...t){for(const r of t)if(r&&r.nodeValue){const t=r.nodeValue;if(t.length>=e){const t=this.j.s.createRange();t.setStart(r,e),this.j.s.selectRange(t,!1);break}e-=t.length}}checkUtilsBoxToSchema(){n.i.temporaryList(this.j.editor).forEach((e=>{var t;const r=(0,a.Lj)(e,"dataHighlightSchema");if(!r)return;const i=RegExp(r),o=null!==(t=e.innerText)&&void 0!==t?t:"";i.test(o)&&!o.replace(i,"").length||(this.j.s.save(),n.i.unwrap(e),this.j.s.restore())}))}}(0,i.gn)([(0,s.debounce)()],c.prototype,"walkNodes",null),(0,i.gn)([s.autobind],c.prototype,"runWorker",null),l.Jodit.plugins.add("highlight-signature",c)},181(e,t,r){function i(e,t,r,i){var o,s=arguments.length,n=3>s?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(3>s?o(n):s>3?o(t,r,n):o(t,r))||n);return s>3&&n&&Object.defineProperty(t,r,n),n}r.d(t,{gn:()=>i})}},e=>e(e.s=234)])}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var o=e();for(var r in o)("object"==typeof exports?exports:t)[r]=o[r]}}(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[283],{576:function(t,e,o){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e,o){var n=o.value;if("function"!=typeof n)throw new TypeError("@boundMethod decorator can only be applied to methods not: ".concat(r(n)));var s=!1;return{configurable:!0,get:function(){if(s||this===t.prototype||this.hasOwnProperty(e)||"function"!=typeof n)return n;var o=n.bind(this);return s=!0,Object.defineProperty(this,e,{configurable:!0,get:function(){return o},set:function(t){n=t,delete this[e]}}),s=!1,o},set:function(t){n=t}}}function s(t){var e;return"undefined"!=typeof Reflect&&"function"==typeof Reflect.ownKeys?e=Reflect.ownKeys(t.prototype):(e=Object.getOwnPropertyNames(t.prototype),"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(t.prototype)))),e.forEach((function(e){if("constructor"!==e){var o=Object.getOwnPropertyDescriptor(t.prototype,e);"function"==typeof o.value&&Object.defineProperty(t.prototype,e,n(t,e,o))}})),t}function i(){return 1===arguments.length?s.apply(void 0,arguments):n.apply(void 0,arguments)}o.r(e),o.d(e,{boundMethod:function(){return n},boundClass:function(){return s},default:function(){return i}})},582:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=o(13);r.Config.prototype.keyboard={defaultLayoutSet:"en",showLayoutSwitcher:!0,extraKeyGroup:"other",extraKeyButtons:[],delayKeyRepeat:350,periodKeyRepeat:100,layoutList:{en:{title:"English",keys:[["` ~ ±","1 ! §","2 @","3 #","4 $","5 %","6 ^","7 &","8 *","9 (","0 )","- _","= +","Backspace"],["Tab","q Q","w W","e E","r R","t T","y Y","u U","i I","o O","p P","[ {","] }","\\ |"],["Caps","a A","s S","d D","f F","g G","h H","j J","k K","l L","; :","' \"","Enter"],["Shift","z Z","x X","c C","v V","b B","n N","m M",", <",". >","/ ?","Shift"],["Options","Space","Options"]]},es:{title:"Español",keys:[["º ` ~","1 ! §","2 @","3 #","4 $","5 %","6 ^","7 &","8 *","9 (","0 )","- _ |","¡ = +","Backspace"],["Tab","q Q","w W","e E","r R","t T","y Y","u U","i I","o O","p P","[ {","] }","ç Ç \\"],["Caps","a A","s S","d D","f F","g G","h H","j J","k K","l L","ñ Ñ ; :","' \"","Enter"],["Shift","z Z","x X","c C","v V","b B","n N","m M",", <",". >","/ ?","Shift"],["Options","Space","Options"]]},de:{title:"Deutsch",keys:[["` ~ ±","1 ! §","2 @","3 #","4 $","5 %","6 ^","7 &","8 * :","9 ( {","0 ) }","- _","= +","Backspace"],["Tab","q Q","w W","e E","r R","t T","z Z","u U","i I","o O","p P","ü Ü [","] }","\\ |"],["Caps","a A","s S","d D","f F","g G","h H","j J","k K","l L","ö Ö ;","ä Ä ' \"","Enter"],["Shift","y Y","x X","c C","v V","b B","n N","m M",", <",". >","/ ?","Shift"],["Options","Space","Options"]]},ru:{title:"Русский",keys:[["` ~ ±","1 ! §",'2 @ "',"3 # :","4 $ <","5 % >","6 ^","7 &","8 *","9 (","0 )","- _","= +","Backspace"],["Tab","й Й","ц Ц","у У","к К","е Е","н Н","г Г","ш Ш","щ Щ","з З","х Х [","ъ ] {","\\ | }"],["Caps","ф Ф","ы Ы","в В","а А","п П","р Р","о О","л Л","д Д","ж Ж ;","э Э '","Enter"],["Shift","я Я","ч Ч","с С","м М","и И","т Т","ь Ь","б Б ,","ю Ю .","/ ?","Shift"],["Options","Space","Options"]]},tr:{title:"Türkçe",keys:[['" é` ~',"1 ! §",'2 @ "',"3 # :","4 $ <","5 % >","6 ^ ±","7 &","8 *","9 ( {","0 ) }","- _ [","= + ]","Backspace"],["Tab","q Q","w W","e E","r R","t T","y Y","u U","ı I","o O","p P","ğ Ğ","ü Ü",", \\ |"],["Caps","a A","s S","d D","f F","g G","h H","j J","k K","l L","ş Ş","i̇ İ","Enter"],["Shift","z Z","x X","c C","v V","b B","n N","m M","ö Ö <","ç Ç >",". / ?","Shift"],["Options","Space","Options"]]},iw:{title:"Hebrew",keys:[["` ~ ±","1 ! §","2 @","3 #","4 $","5 %","6 ^","7 &","8 *","9 (","0 )","- _","= +","Backspace"],["Tab","/ q Q","' w W","ק e E","ר r R","א t T","ט y Y","ו u U","ן i I","ם o O","פ p P","[ {","] }","\\ |"],["Caps","ש a A","ד s S","ג d D","כ f F","ע g G","י h H","ח j J","ל k K","ך l L","ף ; :","' \"","Enter"],["Shift","ז z Z","ס x X","ב c C","ה v V","נ b B","מ n N","צ m M",", <",". >","/ ?","Shift"],["Options","Space","Options"]]},tata:{title:"Tata",keys:[["һ Һ` ~","1 ! §",'2 @ "',"3 # :","4 $ <","5 % >","6 ^ ±","7 &","8 *","9 ( {","0 )","- _","= +","Backspace"],["Tab","й Й","ө Ө","у У","к К","е Е","н Н","г Г","ш Ш","ә Ә","з З","х Х [","ү Ү ]","\\ | }"],["Caps","ф Ф","ы Ы","в В","а А","п П","р Р","о О","л Л","д Д","ң Ң ;","э Э '","Enter"],["Shift","я Я","ч Ч","с С","м М","и И","т Т","җ Җ","б Б ,","ю Ю .","ґ Ґ /","Shift"],["Options","Space","Options"]]}},layoutSwitchList:["en","es","de","ru","tr","iw","tata"],keySize:32,layout:[[1,1,1,1,1,1,1,1,1,1,1,1,1,2],[1.5,1,1,1,1,1,1,1,1,1,1,1,1,1.5],[1.8,1,1,1,1,1,1,1,1,1,1,1,2.2],[2.5,1,1,1,1,1,1,1,1,1,1,2.5],[3.5,9,3.5]]},r.Config.prototype.controls.keyboard={tooltip:"Keyboard",icon:o(583),isActive:function(t){return Boolean(t.e.fire("isKeyboardOpened"))},command:"toggleKeyboard"},r.Config.prototype.controls.extraKeyboardButtons={}},573:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.keyboard=void 0;var r=o(1),n=o(216),s=o(2),i=o(574),a=o(46);o(582);var c=o(15),p=o(122),u=o(70),y=o(13),h=function(t){function e(e){var o=t.call(this,e)||this;o.hasStyle=!s.Jodit.fatMode,o.requires=["license"],o.buttons=[{group:"insert",name:"keyboard"}];var r=e.o.keyboard,n=r.extraKeyButtons,i=r.extraKeyGroup;return n.length&&n.forEach((function(t,o){var r=(0,u.isString)(t)?t:t.key,n=(0,u.isString)(t)||!t.hotkeys?["ctrl+"+(o+1)]:t.hotkeys;e.registerButton({name:"extraKeyboardButtons."+r,group:i}),y.Config.defaultOptions.controls.extraKeyboardButtons[r]={name:r,tooltip:r,args:[r],hotkeys:n,command:"insertChar"}})),o}return(0,r.__extends)(e,t),e.prototype.afterInit=function(t){var e=this;t.registerCommand("toggleKeyboard",this.toggleKeyboard).registerCommand("insertChar",this.insertChar),t.e.on("isKeyboardOpened",(function(){var t;return null===(t=e.__keyboard)||void 0===t?void 0:t.isOpened}))},e.prototype.insertChar=function(t,e,o){this.j.s.insertNode(this.j.createInside.text(o))},e.prototype.toggleKeyboard=function(){if(!this.__keyboard){this.__keyboard=new c.Dialog({toolbarButtonSize:"tiny"});var t=new i.UIKeyboard(this.j);this.__keyboard.setMod("slim",!0).setContent(t);var e=this.j.o.keyboard,o=e.layoutList;if(e.showLayoutSwitcher){var r=new p.UISelect(this.__keyboard,{value:t.state.currentLayout,options:e.layoutSwitchList.map((function(t){var e,r;return{text:null!==(r=null===(e=o[t])||void 0===e?void 0:e.title)&&void 0!==r?r:t,value:t}})),onChange:function(e){t.state.currentLayout=e}});r.setMod("size","tiny").setMod("width","auto").setMod("variant","outline"),this.__keyboard.setHeader(r)}}this.__keyboard.isOpened?this.__keyboard.close():this.__keyboard.open()},e.prototype.beforeDestruct=function(t){var e;null===(e=this.__keyboard)||void 0===e||e.destruct()},(0,r.__decorate)([a.autobind],e.prototype,"insertChar",null),(0,r.__decorate)([a.autobind],e.prototype,"toggleKeyboard",null),e}(n.Plugin);e.keyboard=h,s.Jodit.plugins.add("keyboard",h)},574:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UIKeyboard=void 0;var r=o(1);o(575);var n=o(122),s=o(46),i=o(25),a=o(14),c=o(576),p=function(t){function e(e){var o=t.call(this,e)||this;return o.state={caps:!1,shift:!1,options:!1,currentLayout:o.j.o.keyboard.defaultLayoutSet},o._keys=o.getElms("key"),o.pressed=!1,o.reKeyDownTimeout=0,o.onStateChange(),o}var p;return(0,r.__extends)(e,t),p=e,e.prototype.className=function(){return"UIKeyboard"},e.prototype.render=function(){var t=this.j.options.keyboard,e=t.layout,o=t.keySize,r=e.length;return"<div>"+function(){for(var t=[],n=0;r>n;n+=1){for(var s=[],i=0;e[n].length>i;i+=1)s.push('<div style="width:'+o*e[n][i]+"px;height:"+o+'px;" class="&__key"></div>');t.push("<div class='&__row'>"+s.join("\n")+"</div>")}return t.join("\n")}()+"</div>"},e.prototype.onStateChange=function(){for(var t=this.state,e=t.options,o=t.shift,r=t.caps,n=this.j.o.keyboard.layoutList[t.currentLayout].keys,s=0,i=0;n.length>i;i+=1)for(var a=0;n[i].length>a;a+=1){var c=n[i][a].split(" "),u=c[0];o&&(u=c[1]),!o&&r&&c[1]&&p.isLetter(c[0])&&(u=c[1]),e&&(u=c[2]),this.setKeyValue(s,null!=u?u:c[0]),s+=1}},e.isLetter=function(t){return t.toLowerCase()!==t.toUpperCase()},e.prototype.setKeyValue=function(t,e){var o=this._keys[t];if(o){var r=!1,n=this.state,s=n.options,a=n.shift,c=n.caps;switch(e){case"Caps":r=c;break;case"Options":r=s;break;case"Shift":r=a}o.innerHTML=p.decorate(e),o.classList.toggle(this.getFullElName("key","active",!0),r),(0,i.attr)(o,"-key",e)}},e.prototype.onKeyUp=function(){this.pressed&&this.stopPress()},e.prototype.onReady=function(){this.j.e.on(this.getElms("key"),"mouseenter",this.stopPress)},e.prototype.stopPress=function(){var t=this;this.pressed&&(this.pressed=!1,this.j.async.clearTimeout(this.reKeyDownTimeout),this._keys.forEach((function(e){e.classList.remove(t.getFullElName("key","pressed",!0))})))},e.prototype.onKeyDown=function(t,e){var o=this;void 0===e&&(e=0);var r=t.target;if(!r||!r.classList.contains(this.getFullElName("key")))return!1;this.pressed=!0,r.classList.add(this.getFullElName("key","pressed",!0));var n=(0,i.attr)(r,"-key");switch(n){case"Caps":this.state.caps=!this.state.caps;break;case"Shift":this.state.shift=!this.state.shift;break;case"Options":this.state.options=!this.state.options;break;case"Enter":case"Backspace":this.j.e.fire("keydown",{key:n,preventDefault:function(){}});break;case"Space":case"Tab":this.j.s.insertNode(this.j.createInside.text(a.NBSP_SPACE));break;default:this.state.shift&&(this.state.shift=!1),n&&this.j.s.insertNode(this.j.createInside.text(n))}var s=this.j.o.keyboard,c=s.periodKeyRepeat;return this.reKeyDownTimeout=this.j.async.setTimeout((function(){return o.onKeyDown(t,c)}),e||s.delayKeyRepeat),!1},e.decorate=function(t){switch(t){case"Space":return"";case"Enter":return n.Icon.get("enter");case"Backspace":return o(577);case"Shift":return o(578);case"Caps":return o(579);case"Options":return o(580);case"Tab":return o(581);default:return t}},(0,r.__decorate)([(0,s.watch)(["state.currentLayout","state.options","state.shift","state.caps"])],e.prototype,"onStateChange",null),(0,r.__decorate)([(0,s.watch)(["ow:mouseup"])],e.prototype,"onKeyUp",null),(0,r.__decorate)([(0,s.hook)("ready")],e.prototype,"onReady",null),(0,r.__decorate)([c.default],e.prototype,"stopPress",null),(0,r.__decorate)([(0,s.watch)(["container:mousedown"],["container:touchstart"])],e.prototype,"onKeyDown",null),p=(0,r.__decorate)([s.component],e)}(n.UIElement);e.UIKeyboard=p},583:function(t){t.exports='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M0 6c0-1.1.9-2 2-2h16a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6zm2 0v2h2V6H2zm1 3v2h2V9H3zm-1 3v2h2v-2H2zm3 0v2h10v-2H5zm11 0v2h2v-2h-2zM6 9v2h2V9H6zm3 0v2h2V9H9zm3 0v2h2V9h-2zm3 0v2h2V9h-2zM5 6v2h2V6H5zm3 0v2h2V6H8zm3 0v2h2V6h-2zm3 0v2h4V6h-4z"/> </svg>'},577:function(t){t.exports='<?xml version="1.0" ?><svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M0 10l7-7h13v14H7l-7-7zm14.41 0l2.13-2.12-1.42-1.42L13 8.6l-2.12-2.13-1.42 1.42L11.6 10l-2.13 2.12 1.42 1.42L13 11.4l2.12 2.13 1.42-1.42L14.4 10z"/></svg>'},579:function(t){t.exports='<svg viewBox="0 0 30 29" xmlns="http://www.w3.org/2000/svg"> <path d="M15 0.5L30 15.2625H22V24H8V15.2625H0L15 0.5Z"/> <rect x="8" y="26" width="14" height="3"/> </svg>'},580:function(t){t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 24 24" > <circle cy="12" cx="12" r="2.2"/> <circle cy="12" cx="5" r="2.2"/> <circle cy="12" cx="19" r="2.2"/> </svg>'},578:function(t){t.exports='<svg viewBox="0 0 30 29" xmlns="http://www.w3.org/2000/svg"> <path d="M15 0.5L30 15.2625H22V29H8V15.2625H0L15 0.5Z"/> </svg>'},581:function(t){t.exports='<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"> <path d="M23.17 14.83l7.17 7.17h-28.34v4h28.34l-7.17 7.17 2.83 2.83 12-12-12-12-2.83 2.83zm16.83-2.83v24h4v-24h-4z"/> </svg>'},575:function(t,e,o){"use strict";o.r(e)}},function(t){return t(t.s=573)}])}));
|
|
1
|
+
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var o=e();for(var r in o)("object"==typeof exports?exports:t)[r]=o[r]}}(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[283],{577:function(t,e,o){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e,o){var n=o.value;if("function"!=typeof n)throw new TypeError("@boundMethod decorator can only be applied to methods not: ".concat(r(n)));var s=!1;return{configurable:!0,get:function(){if(s||this===t.prototype||this.hasOwnProperty(e)||"function"!=typeof n)return n;var o=n.bind(this);return s=!0,Object.defineProperty(this,e,{configurable:!0,get:function(){return o},set:function(t){n=t,delete this[e]}}),s=!1,o},set:function(t){n=t}}}function s(t){var e;return"undefined"!=typeof Reflect&&"function"==typeof Reflect.ownKeys?e=Reflect.ownKeys(t.prototype):(e=Object.getOwnPropertyNames(t.prototype),"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(t.prototype)))),e.forEach((function(e){if("constructor"!==e){var o=Object.getOwnPropertyDescriptor(t.prototype,e);"function"==typeof o.value&&Object.defineProperty(t.prototype,e,n(t,e,o))}})),t}function i(){return 1===arguments.length?s.apply(void 0,arguments):n.apply(void 0,arguments)}o.r(e),o.d(e,{boundMethod:function(){return n},boundClass:function(){return s},default:function(){return i}})},583:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=o(13);r.Config.prototype.keyboard={defaultLayoutSet:"en",showLayoutSwitcher:!0,extraKeyGroup:"other",extraKeyButtons:[],delayKeyRepeat:350,periodKeyRepeat:100,layoutList:{en:{title:"English",keys:[["` ~ ±","1 ! §","2 @","3 #","4 $","5 %","6 ^","7 &","8 *","9 (","0 )","- _","= +","Backspace"],["Tab","q Q","w W","e E","r R","t T","y Y","u U","i I","o O","p P","[ {","] }","\\ |"],["Caps","a A","s S","d D","f F","g G","h H","j J","k K","l L","; :","' \"","Enter"],["Shift","z Z","x X","c C","v V","b B","n N","m M",", <",". >","/ ?","Shift"],["Options","Space","Options"]]},es:{title:"Español",keys:[["º ` ~","1 ! §","2 @","3 #","4 $","5 %","6 ^","7 &","8 *","9 (","0 )","- _ |","¡ = +","Backspace"],["Tab","q Q","w W","e E","r R","t T","y Y","u U","i I","o O","p P","[ {","] }","ç Ç \\"],["Caps","a A","s S","d D","f F","g G","h H","j J","k K","l L","ñ Ñ ; :","' \"","Enter"],["Shift","z Z","x X","c C","v V","b B","n N","m M",", <",". >","/ ?","Shift"],["Options","Space","Options"]]},de:{title:"Deutsch",keys:[["` ~ ±","1 ! §","2 @","3 #","4 $","5 %","6 ^","7 &","8 * :","9 ( {","0 ) }","- _","= +","Backspace"],["Tab","q Q","w W","e E","r R","t T","z Z","u U","i I","o O","p P","ü Ü [","] }","\\ |"],["Caps","a A","s S","d D","f F","g G","h H","j J","k K","l L","ö Ö ;","ä Ä ' \"","Enter"],["Shift","y Y","x X","c C","v V","b B","n N","m M",", <",". >","/ ?","Shift"],["Options","Space","Options"]]},ru:{title:"Русский",keys:[["` ~ ±","1 ! §",'2 @ "',"3 # :","4 $ <","5 % >","6 ^","7 &","8 *","9 (","0 )","- _","= +","Backspace"],["Tab","й Й","ц Ц","у У","к К","е Е","н Н","г Г","ш Ш","щ Щ","з З","х Х [","ъ ] {","\\ | }"],["Caps","ф Ф","ы Ы","в В","а А","п П","р Р","о О","л Л","д Д","ж Ж ;","э Э '","Enter"],["Shift","я Я","ч Ч","с С","м М","и И","т Т","ь Ь","б Б ,","ю Ю .","/ ?","Shift"],["Options","Space","Options"]]},tr:{title:"Türkçe",keys:[['" é` ~',"1 ! §",'2 @ "',"3 # :","4 $ <","5 % >","6 ^ ±","7 &","8 *","9 ( {","0 ) }","- _ [","= + ]","Backspace"],["Tab","q Q","w W","e E","r R","t T","y Y","u U","ı I","o O","p P","ğ Ğ","ü Ü",", \\ |"],["Caps","a A","s S","d D","f F","g G","h H","j J","k K","l L","ş Ş","i̇ İ","Enter"],["Shift","z Z","x X","c C","v V","b B","n N","m M","ö Ö <","ç Ç >",". / ?","Shift"],["Options","Space","Options"]]},iw:{title:"Hebrew",keys:[["` ~ ±","1 ! §","2 @","3 #","4 $","5 %","6 ^","7 &","8 *","9 (","0 )","- _","= +","Backspace"],["Tab","/ q Q","' w W","ק e E","ר r R","א t T","ט y Y","ו u U","ן i I","ם o O","פ p P","[ {","] }","\\ |"],["Caps","ש a A","ד s S","ג d D","כ f F","ע g G","י h H","ח j J","ל k K","ך l L","ף ; :","' \"","Enter"],["Shift","ז z Z","ס x X","ב c C","ה v V","נ b B","מ n N","צ m M",", <",". >","/ ?","Shift"],["Options","Space","Options"]]},tata:{title:"Tata",keys:[["һ Һ` ~","1 ! §",'2 @ "',"3 # :","4 $ <","5 % >","6 ^ ±","7 &","8 *","9 ( {","0 )","- _","= +","Backspace"],["Tab","й Й","ө Ө","у У","к К","е Е","н Н","г Г","ш Ш","ә Ә","з З","х Х [","ү Ү ]","\\ | }"],["Caps","ф Ф","ы Ы","в В","а А","п П","р Р","о О","л Л","д Д","ң Ң ;","э Э '","Enter"],["Shift","я Я","ч Ч","с С","м М","и И","т Т","җ Җ","б Б ,","ю Ю .","ґ Ґ /","Shift"],["Options","Space","Options"]]}},layoutSwitchList:["en","es","de","ru","tr","iw","tata"],keySize:32,layout:[[1,1,1,1,1,1,1,1,1,1,1,1,1,2],[1.5,1,1,1,1,1,1,1,1,1,1,1,1,1.5],[1.8,1,1,1,1,1,1,1,1,1,1,1,2.2],[2.5,1,1,1,1,1,1,1,1,1,1,2.5],[3.5,9,3.5]]},r.Config.prototype.controls.keyboard={tooltip:"Keyboard",icon:o(584),isActive:function(t){return Boolean(t.e.fire("isKeyboardOpened"))},command:"toggleKeyboard"},r.Config.prototype.controls.extraKeyboardButtons={}},574:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.keyboard=void 0;var r=o(1),n=o(216),s=o(2),i=o(575),a=o(46);o(583);var c=o(15),p=o(122),u=o(70),y=o(13),h=function(t){function e(e){var o=t.call(this,e)||this;o.hasStyle=!s.Jodit.fatMode,o.requires=["license"],o.buttons=[{group:"insert",name:"keyboard"}];var r=e.o.keyboard,n=r.extraKeyButtons,i=r.extraKeyGroup;return n.length&&n.forEach((function(t,o){var r=(0,u.isString)(t)?t:t.key,n=(0,u.isString)(t)||!t.hotkeys?["ctrl+"+(o+1)]:t.hotkeys;e.registerButton({name:"extraKeyboardButtons."+r,group:i}),y.Config.defaultOptions.controls.extraKeyboardButtons[r]={name:r,tooltip:r,args:[r],hotkeys:n,command:"insertChar"}})),o}return(0,r.__extends)(e,t),e.prototype.afterInit=function(t){var e=this;t.registerCommand("toggleKeyboard",this.toggleKeyboard).registerCommand("insertChar",this.insertChar),t.e.on("isKeyboardOpened",(function(){var t;return null===(t=e.__keyboard)||void 0===t?void 0:t.isOpened}))},e.prototype.insertChar=function(t,e,o){this.j.s.insertNode(this.j.createInside.text(o))},e.prototype.toggleKeyboard=function(){if(!this.__keyboard){this.__keyboard=new c.Dialog({toolbarButtonSize:"tiny"});var t=new i.UIKeyboard(this.j);this.__keyboard.setMod("slim",!0).setContent(t);var e=this.j.o.keyboard,o=e.layoutList;if(e.showLayoutSwitcher){var r=new p.UISelect(this.__keyboard,{value:t.state.currentLayout,options:e.layoutSwitchList.map((function(t){var e,r;return{text:null!==(r=null===(e=o[t])||void 0===e?void 0:e.title)&&void 0!==r?r:t,value:t}})),onChange:function(e){t.state.currentLayout=e}});r.setMod("size","tiny").setMod("width","auto").setMod("variant","outline"),this.__keyboard.setHeader(r)}}this.__keyboard.isOpened?this.__keyboard.close():this.__keyboard.open()},e.prototype.beforeDestruct=function(t){var e;null===(e=this.__keyboard)||void 0===e||e.destruct()},(0,r.__decorate)([a.autobind],e.prototype,"insertChar",null),(0,r.__decorate)([a.autobind],e.prototype,"toggleKeyboard",null),e}(n.Plugin);e.keyboard=h,s.Jodit.plugins.add("keyboard",h)},575:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UIKeyboard=void 0;var r=o(1);o(576);var n=o(122),s=o(46),i=o(25),a=o(14),c=o(577),p=function(t){function e(e){var o=t.call(this,e)||this;return o.state={caps:!1,shift:!1,options:!1,currentLayout:o.j.o.keyboard.defaultLayoutSet},o._keys=o.getElms("key"),o.pressed=!1,o.reKeyDownTimeout=0,o.onStateChange(),o}var p;return(0,r.__extends)(e,t),p=e,e.prototype.className=function(){return"UIKeyboard"},e.prototype.render=function(){var t=this.j.options.keyboard,e=t.layout,o=t.keySize,r=e.length;return"<div>"+function(){for(var t=[],n=0;r>n;n+=1){for(var s=[],i=0;e[n].length>i;i+=1)s.push('<div style="width:'+o*e[n][i]+"px;height:"+o+'px;" class="&__key"></div>');t.push("<div class='&__row'>"+s.join("\n")+"</div>")}return t.join("\n")}()+"</div>"},e.prototype.onStateChange=function(){for(var t=this.state,e=t.options,o=t.shift,r=t.caps,n=this.j.o.keyboard.layoutList[t.currentLayout].keys,s=0,i=0;n.length>i;i+=1)for(var a=0;n[i].length>a;a+=1){var c=n[i][a].split(" "),u=c[0];o&&(u=c[1]),!o&&r&&c[1]&&p.isLetter(c[0])&&(u=c[1]),e&&(u=c[2]),this.setKeyValue(s,null!=u?u:c[0]),s+=1}},e.isLetter=function(t){return t.toLowerCase()!==t.toUpperCase()},e.prototype.setKeyValue=function(t,e){var o=this._keys[t];if(o){var r=!1,n=this.state,s=n.options,a=n.shift,c=n.caps;switch(e){case"Caps":r=c;break;case"Options":r=s;break;case"Shift":r=a}o.innerHTML=p.decorate(e),o.classList.toggle(this.getFullElName("key","active",!0),r),(0,i.attr)(o,"-key",e)}},e.prototype.onKeyUp=function(){this.pressed&&this.stopPress()},e.prototype.onReady=function(){this.j.e.on(this.getElms("key"),"mouseenter",this.stopPress)},e.prototype.stopPress=function(){var t=this;this.pressed&&(this.pressed=!1,this.j.async.clearTimeout(this.reKeyDownTimeout),this._keys.forEach((function(e){e.classList.remove(t.getFullElName("key","pressed",!0))})))},e.prototype.onKeyDown=function(t,e){var o=this;void 0===e&&(e=0);var r=t.target;if(!r||!r.classList.contains(this.getFullElName("key")))return!1;this.pressed=!0,r.classList.add(this.getFullElName("key","pressed",!0));var n=(0,i.attr)(r,"-key");switch(n){case"Caps":this.state.caps=!this.state.caps;break;case"Shift":this.state.shift=!this.state.shift;break;case"Options":this.state.options=!this.state.options;break;case"Enter":case"Backspace":this.j.e.fire("keydown",{key:n,preventDefault:function(){}});break;case"Space":case"Tab":this.j.s.insertNode(this.j.createInside.text(a.NBSP_SPACE));break;default:this.state.shift&&(this.state.shift=!1),n&&this.j.s.insertNode(this.j.createInside.text(n))}var s=this.j.o.keyboard,c=s.periodKeyRepeat;return this.reKeyDownTimeout=this.j.async.setTimeout((function(){return o.onKeyDown(t,c)}),e||s.delayKeyRepeat),!1},e.decorate=function(t){switch(t){case"Space":return"";case"Enter":return n.Icon.get("enter");case"Backspace":return o(578);case"Shift":return o(579);case"Caps":return o(580);case"Options":return o(581);case"Tab":return o(582);default:return t}},(0,r.__decorate)([(0,s.watch)(["state.currentLayout","state.options","state.shift","state.caps"])],e.prototype,"onStateChange",null),(0,r.__decorate)([(0,s.watch)(["ow:mouseup"])],e.prototype,"onKeyUp",null),(0,r.__decorate)([(0,s.hook)("ready")],e.prototype,"onReady",null),(0,r.__decorate)([c.default],e.prototype,"stopPress",null),(0,r.__decorate)([(0,s.watch)(["container:mousedown"],["container:touchstart"])],e.prototype,"onKeyDown",null),p=(0,r.__decorate)([s.component],e)}(n.UIElement);e.UIKeyboard=p},584:function(t){t.exports='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M0 6c0-1.1.9-2 2-2h16a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6zm2 0v2h2V6H2zm1 3v2h2V9H3zm-1 3v2h2v-2H2zm3 0v2h10v-2H5zm11 0v2h2v-2h-2zM6 9v2h2V9H6zm3 0v2h2V9H9zm3 0v2h2V9h-2zm3 0v2h2V9h-2zM5 6v2h2V6H5zm3 0v2h2V6H8zm3 0v2h2V6h-2zm3 0v2h4V6h-4z"/> </svg>'},578:function(t){t.exports='<?xml version="1.0" ?><svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M0 10l7-7h13v14H7l-7-7zm14.41 0l2.13-2.12-1.42-1.42L13 8.6l-2.12-2.13-1.42 1.42L11.6 10l-2.13 2.12 1.42 1.42L13 11.4l2.12 2.13 1.42-1.42L14.4 10z"/></svg>'},580:function(t){t.exports='<svg viewBox="0 0 30 29" xmlns="http://www.w3.org/2000/svg"> <path d="M15 0.5L30 15.2625H22V24H8V15.2625H0L15 0.5Z"/> <rect x="8" y="26" width="14" height="3"/> </svg>'},581:function(t){t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 24 24" > <circle cy="12" cx="12" r="2.2"/> <circle cy="12" cx="5" r="2.2"/> <circle cy="12" cx="19" r="2.2"/> </svg>'},579:function(t){t.exports='<svg viewBox="0 0 30 29" xmlns="http://www.w3.org/2000/svg"> <path d="M15 0.5L30 15.2625H22V29H8V15.2625H0L15 0.5Z"/> </svg>'},582:function(t){t.exports='<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"> <path d="M23.17 14.83l7.17 7.17h-28.34v4h28.34l-7.17 7.17 2.83 2.83 12-12-12-12-2.83 2.83zm16.83-2.83v24h4v-24h-4z"/> </svg>'},576:function(t,e,o){"use strict";o.r(e)}},function(t){return t(t.s=574)}])}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.jodit-paste-code{display:flex;flex-direction:column;height:100%;justify-content:stretch;padding:16px}.jodit-paste-code__textarea{flex:1;height:100%;justify-content:stretch}.jodit-wysiwyg code[class*=language-],.jodit-wysiwyg pre[class*=language-]{word-wrap:normal;background:none;color:#000;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;font-size:1em;hyphens:none;line-height:1.5;tab-size:4;text-align:left;text-shadow:0 1px #fff;white-space:pre;word-break:normal;word-spacing:normal}.jodit-wysiwyg pre[class*=language-]{margin:.5em 0;overflow:auto;padding:1em}.jodit-wysiwyg :not(pre)>code[class*=language-],.jodit-wysiwyg pre[class*=language-]{background:#f5f2f0}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.jodit-paste-code{display:flex;flex-direction:column;height:100%;justify-content:stretch;padding:16px}.jodit-paste-code__textarea{flex:1;height:100%;justify-content:stretch}.jodit-wysiwyg code[class*=language-],.jodit-wysiwyg pre[class*=language-]{word-wrap:normal;background:none;color:#000;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;font-size:1em;hyphens:none;line-height:1.5;tab-size:4;text-align:left;text-shadow:0 1px #fff;white-space:pre;word-break:normal;word-spacing:normal}.jodit-wysiwyg pre[class*=language-]{margin:.5em 0;overflow:auto;padding:1em}.jodit-wysiwyg :not(pre)>code[class*=language-],.jodit-wysiwyg pre[class*=language-]{background:#f5f2f0}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var o=t();for(var
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var o=t();for(var a in o)("object"==typeof exports?exports:e)[a]=o[a]}}(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[535],{572:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=o(13),n=o(24);a.Config.prototype.controls.pasteCode={icon:o(573),tooltip:"Paste code",command:"pasteCode"},a.Config.prototype.pasteCode={defaultLanguage:"html",insertTemplate:function(e,t,o){return'<pre class="language-'+t+'"><code>'+(0,n.htmlspecialchars)(o)+"</code></pre>"},languages:[{value:"html",text:"HTML/XML"},{value:"javascript",text:"JavaScript"},{value:"css",text:"CSS"},{value:"php",text:"PHP"},{value:"ruby",text:"Ruby"},{value:"python",text:"Python"},{value:"java",text:"Java"},{value:"c",text:"C"},{value:"csharp",text:"C#"},{value:"cpp",text:"C++"}],dialog:{width:700,height:600}}},570:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pasteCode=void 0;var a=o(1);o(571),o(572);var n=o(216),r=o(122),i=o(46),s=o(24),c=o(2),l=o(15),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.requires=["license"],t.buttons=[{name:"pasteCode",group:"clipboard"}],t}return(0,a.__extends)(t,e),t.prototype.afterInit=function(e){var t=this;e.registerCommand("pasteCode",(function(){return t.openCodeEditDialog()}))},t.prototype.openCodeEditDialog=function(e,t,o){var a=this,n=this.j,r=this.createForm(),i=(0,s.refs)(r),c=i.code,u=i.language;e&&(u.value=e),t&&(c.value=t),n.async.requestIdleCallback((function(){c.focus()})),n.s.save(),this.createDialog((function(){if(!r.validate())return!1;n.s.restore();var e=n.createInside.fromHTML(n.o.pasteCode.insertTemplate(n,u.value,c.value));if(o)l.Dom.replace(o,e,n.createInside,!1,!0);else{var t=n.s.current(),i=l.Dom.up(t,l.Dom.isBlock,n.editor);i?l.Dom.after(i,e):n.s.insertNode(e)}a.onChange()}),(function(){n.s.restore()})).setContent(r.container).open(!0)},t.prototype.beforeDestruct=function(e){},t.prototype.createForm=function(){var e=this.jodit;return new r.UIForm(e,[new r.UISelect(e,{name:"language",label:"Language",value:e.o.pasteCode.defaultLanguage,options:e.o.pasteCode.languages,required:!0}),new r.UITextArea(e,{label:"Code view",resizable:!1,name:"code",required:!0,className:"jodit-paste-code__textarea"})],{className:"jodit-paste-code"})},t.prototype.createDialog=function(e,t){var o=new l.Dialog({language:this.j.o.language});return o.setHeader("Insert/Edit Code Sample").setSize(this.j.o.pasteCode.dialog.width,this.j.o.pasteCode.dialog.height).setFooter([(0,r.Button)(o,"","Cancel","default").onAction((function(){o.close(),t()})),(0,r.Button)(o,"save","Save","primary").onAction((function(){o.close(),e()}))]),o},t.prototype.onChange=function(){(0,s.$$)("pre",this.j.editor).forEach((function(e){(0,s.attr)(e,"contenteditable")||(0,s.attr)(e,"contenteditable",!1)}))},t.prototype.onPreEdit=function(e){var t=l.Dom.isNode(e)&&l.Dom.isTag(e,"pre")?e:l.Dom.closest(e.target,"pre",this.j.editor);if(t){var o="html";t.classList.forEach((function(e){if(/language-/.test(e)){var t=/language-(.*)/.exec(e);t&&t[1]&&(o=t[1])}})),this.openCodeEditDialog(o,t.innerText,t)}},t.prototype.onAfterGetValueFromEditor=function(e){e.value=e.value.replace(/(<pre[^>]*)contenteditable\s*=\s*(['"]?)false(\2)/g,"$1")},(0,a.__decorate)([i.autobind],t.prototype,"openCodeEditDialog",null),(0,a.__decorate)([(0,i.watch)("?:change"),(0,i.debounce)()],t.prototype,"onChange",null),(0,a.__decorate)([(0,i.watch)(["?:dblclick","?:editPreInPasteCode"])],t.prototype,"onPreEdit",null),(0,a.__decorate)([(0,i.watch)("?:afterGetValueFromEditor")],t.prototype,"onAfterGetValueFromEditor",null),(0,a.__decorate)([i.component],t)}(n.Plugin);t.pasteCode=u,c.Jodit.plugins.add("paste-code",u)},573:function(e){e.exports='<svg viewBox="0 0 24 24" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"> <path d="M2.5244141,23.5h18.9511719c0.4140625,0,0.75-0.3359375,0.75-0.75V4.9208984 c0-0.1992188-0.0795898-0.390625-0.2207031-0.53125L18.3198242,0.71875C18.1791992,0.5786133,17.9887695,0.5,17.7905273,0.5 H2.5244141c-0.4140625,0-0.75,0.3359375-0.75,0.75v21.5C1.7744141,23.1640625,2.1103516,23.5,2.5244141,23.5z M20.7128296,5.2197266 h-2.6986694V2.531189L20.7128296,5.2197266z M3.2744141,2h13.2397461v3.9697266c0,0.4140625,0.3359375,0.75,0.75,0.75h3.4614258V22 H3.2744141V2z" fill="#1D1D1D"/> <path d="M8.75,10.25h1.75c0.4140625,0,0.75-0.3359375,0.75-0.75s-0.3359375-0.75-0.75-0.75H8 c-0.4140625,0-0.75,0.3359375-0.75,0.75v2.75H6c-0.4140625,0-0.75,0.3359375-0.75,0.75S5.5859375,13.75,6,13.75h1.25v2.75 c0,0.4140625,0.3359375,0.75,0.75,0.75h2.5c0.4140625,0,0.75-0.3359375,0.75-0.75s-0.3359375-0.75-0.75-0.75H8.75V10.25z" fill="#1D1D1D"/> <path d="M18.5,12.25h-1.25V9.5c0-0.4140625-0.3359375-0.75-0.75-0.75H14c-0.4140625,0-0.75,0.3359375-0.75,0.75 s0.3359375,0.75,0.75,0.75h1.75v5.5H14c-0.4140625,0-0.75,0.3359375-0.75,0.75s0.3359375,0.75,0.75,0.75h2.5 c0.4140625,0,0.75-0.3359375,0.75-0.75v-2.75h1.25c0.4140625,0,0.75-0.3359375,0.75-0.75S18.9140625,12.25,18.5,12.25z" fill="#1D1D1D"/></svg>'},571:function(e,t,o){"use strict";o.r(t)}},function(e){return e(e.s=570)}])}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
((e,t)=>{if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var o=t();for(var
|
|
1
|
+
((e,t)=>{if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var o=t();for(var a in o)("object"==typeof exports?exports:e)[a]=o[a]}})(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[535],{220(e,t,o){"use strict";o.r(t),o.d(t,{pasteCode:()=>p});var a=o(181),s=o(2),r=o(10);s.D.prototype.controls.pasteCode={icon:o(221),tooltip:"Paste code",command:"pasteCode"},s.D.prototype.pasteCode={defaultLanguage:"html",insertTemplate:(e,t,o)=>`<pre class="language-${t}"><code>${(0,r.htmlspecialchars)(o)}</code></pre>`,languages:[{value:"html",text:"HTML/XML"},{value:"javascript",text:"JavaScript"},{value:"css",text:"CSS"},{value:"php",text:"PHP"},{value:"ruby",text:"Ruby"},{value:"python",text:"Python"},{value:"java",text:"Java"},{value:"c",text:"C"},{value:"csharp",text:"C#"},{value:"cpp",text:"C++"}],dialog:{width:700,height:600}};var n=o(59),l=o(34),i=o(19),c=o(1),d=o(4);let p=class extends n.S{constructor(){super(...arguments),this.requires=["license"],this.buttons=[{name:"pasteCode",group:"clipboard"}]}afterInit(e){e.registerCommand("pasteCode",(()=>this.openCodeEditDialog()))}openCodeEditDialog(e,t,o){const a=this.j,s=this.createForm(),{code:n,language:l}=(0,r.refs)(s);e&&(l.value=e),t&&(n.value=t),a.async.requestIdleCallback((()=>{n.focus()})),a.s.save(),this.createDialog((()=>{if(!s.validate())return!1;{a.s.restore();const e=a.createInside.fromHTML(a.o.pasteCode.insertTemplate(a,l.value,n.value));if(o)d.Dom.replace(o,e,a.createInside,!1,!0);else{const t=a.s.current(),o=d.Dom.up(t,d.Dom.isBlock,a.editor);o?d.Dom.after(o,e):a.s.insertNode(e)}this.onChange()}}),(()=>{a.s.restore()})).setContent(s.container).open(!0)}beforeDestruct(e){}createForm(){const{jodit:e}=this;return new l.x4(e,[new l.Cj(e,{name:"language",label:"Language",value:e.o.pasteCode.defaultLanguage,options:e.o.pasteCode.languages,required:!0}),new l.GJ(e,{label:"Code view",resizable:!1,name:"code",required:!0,className:"jodit-paste-code__textarea"})],{className:"jodit-paste-code"})}createDialog(e,t){const o=new d.Dialog({language:this.j.o.language});return o.setHeader("Insert/Edit Code Sample").setSize(this.j.o.pasteCode.dialog.width,this.j.o.pasteCode.dialog.height).setFooter([(0,l.zx)(o,"","Cancel","default").onAction((()=>{o.close(),t()})),(0,l.zx)(o,"save","Save","primary").onAction((()=>{o.close(),e()}))]),o}onChange(){(0,r.$$)("pre",this.j.editor).forEach((e=>{(0,r.attr)(e,"contenteditable")||(0,r.attr)(e,"contenteditable",!1)}))}onPreEdit(e){const t=d.Dom.isNode(e)&&d.Dom.isTag(e,"pre")?e:d.Dom.closest(e.target,"pre",this.j.editor);if(t){let e="html";t.classList.forEach((t=>{if(/language-/.test(t)){const o=/language-(.*)/.exec(t);o&&o[1]&&(e=o[1])}})),this.openCodeEditDialog(e,t.innerText,t)}}onAfterGetValueFromEditor(e){e.value=e.value.replace(/(<pre[^>]*)contenteditable\s*=\s*(['"]?)false(\2)/g,"$1")}};(0,a.gn)([i.autobind],p.prototype,"openCodeEditDialog",null),(0,a.gn)([(0,i.watch)("?:change"),(0,i.debounce)()],p.prototype,"onChange",null),(0,a.gn)([(0,i.watch)(["?:dblclick","?:editPreInPasteCode"])],p.prototype,"onPreEdit",null),(0,a.gn)([(0,i.watch)("?:afterGetValueFromEditor")],p.prototype,"onAfterGetValueFromEditor",null),p=(0,a.gn)([i.component],p),c.Jodit.plugins.add("paste-code",p)},181(e,t,o){"use strict";function a(e,t,o,a){var s,r=arguments.length,n=3>r?t:null===a?a=Object.getOwnPropertyDescriptor(t,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(n=(3>r?s(n):r>3?s(t,o,n):s(t,o))||n);return r>3&&n&&Object.defineProperty(t,o,n),n}o.d(t,{gn:()=>a})},221(e){e.exports='<svg viewBox="0 0 24 24" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"> <path d="M2.5244141,23.5h18.9511719c0.4140625,0,0.75-0.3359375,0.75-0.75V4.9208984 c0-0.1992188-0.0795898-0.390625-0.2207031-0.53125L18.3198242,0.71875C18.1791992,0.5786133,17.9887695,0.5,17.7905273,0.5 H2.5244141c-0.4140625,0-0.75,0.3359375-0.75,0.75v21.5C1.7744141,23.1640625,2.1103516,23.5,2.5244141,23.5z M20.7128296,5.2197266 h-2.6986694V2.531189L20.7128296,5.2197266z M3.2744141,2h13.2397461v3.9697266c0,0.4140625,0.3359375,0.75,0.75,0.75h3.4614258V22 H3.2744141V2z" fill="#1D1D1D"/> <path d="M8.75,10.25h1.75c0.4140625,0,0.75-0.3359375,0.75-0.75s-0.3359375-0.75-0.75-0.75H8 c-0.4140625,0-0.75,0.3359375-0.75,0.75v2.75H6c-0.4140625,0-0.75,0.3359375-0.75,0.75S5.5859375,13.75,6,13.75h1.25v2.75 c0,0.4140625,0.3359375,0.75,0.75,0.75h2.5c0.4140625,0,0.75-0.3359375,0.75-0.75s-0.3359375-0.75-0.75-0.75H8.75V10.25z" fill="#1D1D1D"/> <path d="M18.5,12.25h-1.25V9.5c0-0.4140625-0.3359375-0.75-0.75-0.75H14c-0.4140625,0-0.75,0.3359375-0.75,0.75 s0.3359375,0.75,0.75,0.75h1.75v5.5H14c-0.4140625,0-0.75,0.3359375-0.75,0.75s0.3359375,0.75,0.75,0.75h2.5 c0.4140625,0,0.75-0.3359375,0.75-0.75v-2.75h1.25c0.4140625,0,0.75-0.3359375,0.75-0.75S18.9140625,12.25,18.5,12.25z" fill="#1D1D1D"/></svg>'}},e=>e(e.s=220)])}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var o=t();for(var n in o)("object"==typeof exports?exports:e)[n]=o[n]}}(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[288],{
|
|
1
|
+
"use strict";!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var o=t();for(var n in o)("object"==typeof exports?exports:e)[n]=o[n]}}(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[288],{602:function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});var n=o(1),r=o(13),i=o(37),c=o(24),s=["tune.up","tune.remove","tune.down"],u=(0,n.__spreadArray)(["tune.h1","tune.h2","tune.h3","\n","tune.h4","tune.h5","tune.h6","\n"],(0,n.__read)(s),!1);function l(e){return{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><text dominant-baseline="text-before-edge" style="font: 45px sans-serif" x="0" y="0">'+e.toUpperCase()+"</text></svg>",isActive:function(t,o,n){var r;return(null===(r=null==n?void 0:n.target)||void 0===r?void 0:r.tagName.toLowerCase())===e},exec:function(t,o){if(o){t.selection.save();var n=i.Dom.replace(o,e,t.createInside);t.selection.restore(),t.e.fire("synchro"),t.e.fire("afterExecTune.tune",n)}return!0}}}function p(e){var t=e?"previousSibling":"nextSibling";return{icon:e?"angle-up":"angle-down",isDisabled:function(e,o,n){var r;return!(null===(r=null==n?void 0:n.target)||void 0===r?void 0:r[t])},exec:function(o,n){var r=null==n?void 0:n[t];return n&&r&&(o.selection.save(),(0,c.call)(e?i.Dom.before:i.Dom.after,r,n),o.selection.restore()),o.e.fire("synchro"),o.e.fire("afterExecTune.tune"),!0}}}r.Config.prototype.tuneBlock={popup:{p:s,table:s,img:s,blockquote:s,div:s,pre:(0,n.__spreadArray)(["tune.editPre"],(0,n.__read)(s),!1),h1:u,h2:u,h3:u,h4:u,h5:u,h6:u}},r.Config.prototype.controls.tune={h1:l("h1"),h2:l("h2"),h3:l("h3"),h4:l("h4"),h5:l("h5"),h6:l("h6"),up:p(!0),down:p(!1),editPre:{icon:"pencil",exec:function(e,t){e.e.fire("editPreInPasteCode",t)}},remove:{icon:"bin",exec:function(e,t){i.Dom.safeRemove(t),e.e.fire("synchro"),e.e.fire("closeTuner.tune")}}}},599:function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0}),t.tuneBlock=void 0;var n=o(1),r=o(216),i=o(46),c=o(2),s=o(600);o(602);var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.requires=["license"],t}return(0,n.__extends)(t,e),t.prototype.afterInit=function(e){this.tuner=new s.UITuner(e)},t.prototype.hideTuner=function(){this.tuner.hide()},t.prototype.onChangeSelection=function(){this.j.s.isCollapsed()||this.hideTuner()},t.prototype.onClickInBlock=function(e){this.j.s.isCollapsed()&&this.tuner.show()},t.prototype.beforeDestruct=function(e){this.tuner.destruct()},(0,n.__decorate)([(0,i.watch)(":outsideClick :keydown")],t.prototype,"hideTuner",null),(0,n.__decorate)([(0,i.watch)("j.ed:selectionchange"),(0,i.debounce)()],t.prototype,"onChangeSelection",null),(0,n.__decorate)([(0,i.watch)(":click")],t.prototype,"onClickInBlock",null),t}(r.Plugin);t.tuneBlock=u,c.Jodit.plugins.add("tune-block",u)},600:function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0}),t.UITuner=void 0;var n=o(1);o(601);var r=o(122),i=o(37),c=o(24),s=o(46),u=o(205),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isShown=!1,t.toolbar=(0,u.makeCollection)(t.j,t),t.popup=new r.Popup(t.j,!1),t}return(0,n.__extends)(t,e),t.prototype.className=function(){return"UITuner"},t.prototype.render=function(){return"<div>\n\t\t\t<div class='&__handle' title='~Click to tune~'/>\n\t\t</div>"},t.prototype.show=function(){var e=this,t=this.j.s.current();if(!t)return this.hide();var o=i.Dom.isBlock(t)?t:i.Dom.closest(t,(function(t){return Boolean(t&&e.j.o.tuneBlock.popup[t.nodeName.toLowerCase()])}),this.j.editor);if(!o||o===this.j.editor||!this.j.o.tuneBlock.popup[o.tagName.toLowerCase()])return this.hide();this.currentBlock=o,this.isShown=!0,this.closeToolbar(),this.calcPosition(),this.container.parentNode||this.j.workplace.append(this.container)},t.prototype.hide=function(){this.isShown&&(this.isShown=!1,i.Dom.safeRemove(this.container),this.closeToolbar())},t.prototype.onEditorScroll=function(){this.isShown&&this.calcPosition()},t.prototype.calcPosition=function(){(0,c.css)(this.container,{transform:"translate3d("+(this.currentBlock.offsetWidth-15)+"px, "+(this.currentBlock.offsetTop-this.j.editor.scrollTop)+"px, 0)"}),this.popup.isOpened&&this.popup.updatePosition()},t.prototype.onAfterExecTune=function(e){e&&(this.currentBlock=e),this.calcPosition(),this.openToolbar()},t.prototype.onClickPrevent=function(e){e.preventDefault(),e.stopPropagation()},t.prototype.onTargetClick=function(){this.toggleToolbar()},t.prototype.openToolbar=function(){var e=this;this.setMod("opened",!0),this.toolbar.build(this.j.o.tuneBlock.popup[this.currentBlock.tagName.toLowerCase()],this.currentBlock),this.popup.setContent(this.toolbar.container),this.popup.isOpened||this.popup.open((function(){return(0,c.position)(e.getElm("handle"))}))},t.prototype.closeToolbar=function(){this.setMod("opened",!1),this.popup.close()},t.prototype.toggleToolbar=function(){this.getMod("opened")?this.closeToolbar():this.openToolbar()},(0,n.__decorate)([(0,s.watch)("j.editor:scroll"),(0,s.throttle)(10)],t.prototype,"onEditorScroll",null),(0,n.__decorate)([(0,s.watch)(":afterExecTune.tune"),(0,s.idle)()],t.prototype,"onAfterExecTune",null),(0,n.__decorate)([(0,s.watch)("container:click container:mousedown")],t.prototype,"onClickPrevent",null),(0,n.__decorate)([(0,s.watch)("handle:click")],t.prototype,"onTargetClick",null),(0,n.__decorate)([(0,s.watch)(":closeTuner.tune")],t.prototype,"closeToolbar",null),(0,n.__decorate)([s.component],t)}(r.UIElement);t.UITuner=l},601:function(e,t,o){o.r(t)}},function(e){return e(e.s=599)}])}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";((e,t)=>{if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var o=t();for(var n in o)("object"==typeof exports?exports:e)[n]=o[n]}})(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[288],{233(e,t,o){o.r(t),o.d(t,{tuneBlock:()=>b});var n=o(181),i=o(59),
|
|
1
|
+
"use strict";((e,t)=>{if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var o=t();for(var n in o)("object"==typeof exports?exports:e)[n]=o[n]}})(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[288],{233(e,t,o){o.r(t),o.d(t,{tuneBlock:()=>b});var n=o(181),i=o(59),r=o(19),s=o(1),l=o(34),c=o(17),h=o(10),u=o(54);let p=class extends l.u1{constructor(){super(...arguments),this.isShown=!1,this.toolbar=(0,u.R)(this.j,this),this.popup=new l.GI(this.j,!1)}className(){return"UITuner"}render(){return"<div>\n\t\t\t<div class='&__handle' title='~Click to tune~'/>\n\t\t</div>"}show(){const e=this.j.s.current();if(!e)return this.hide();const t=c.i.isBlock(e)?e:c.i.closest(e,(e=>!(!e||!this.j.o.tuneBlock.popup[e.nodeName.toLowerCase()])),this.j.editor);if(!t||t===this.j.editor||!this.j.o.tuneBlock.popup[t.tagName.toLowerCase()])return this.hide();this.currentBlock=t,this.isShown=!0,this.closeToolbar(),this.calcPosition(),this.container.parentNode||this.j.workplace.append(this.container)}hide(){this.isShown&&(this.isShown=!1,c.i.safeRemove(this.container),this.closeToolbar())}onEditorScroll(){this.isShown&&this.calcPosition()}calcPosition(){(0,h.css)(this.container,{transform:`translate3d(${this.currentBlock.offsetWidth-15}px, ${this.currentBlock.offsetTop-this.j.editor.scrollTop}px, 0)`}),this.popup.isOpened&&this.popup.updatePosition()}onAfterExecTune(e){e&&(this.currentBlock=e),this.calcPosition(),this.openToolbar()}onClickPrevent(e){e.preventDefault(),e.stopPropagation()}onTargetClick(){this.toggleToolbar()}openToolbar(){this.setMod("opened",!0),this.toolbar.build(this.j.o.tuneBlock.popup[this.currentBlock.tagName.toLowerCase()],this.currentBlock),this.popup.setContent(this.toolbar.container),this.popup.isOpened||this.popup.open((()=>(0,h.position)(this.getElm("handle"))))}closeToolbar(){this.setMod("opened",!1),this.popup.close()}toggleToolbar(){this.getMod("opened")?this.closeToolbar():this.openToolbar()}};(0,n.gn)([(0,r.watch)("j.editor:scroll"),(0,r.throttle)(10)],p.prototype,"onEditorScroll",null),(0,n.gn)([(0,r.watch)(":afterExecTune.tune"),(0,r.idle)()],p.prototype,"onAfterExecTune",null),(0,n.gn)([(0,r.watch)("container:click container:mousedown")],p.prototype,"onClickPrevent",null),(0,n.gn)([(0,r.watch)("handle:click")],p.prototype,"onTargetClick",null),(0,n.gn)([(0,r.watch)(":closeTuner.tune")],p.prototype,"closeToolbar",null),p=(0,n.gn)([r.component],p);var a=o(2);const d=["tune.up","tune.remove","tune.down"],f=["tune.h1","tune.h2","tune.h3","\n","tune.h4","tune.h5","tune.h6","\n",...d];function g(e){return{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><text dominant-baseline="text-before-edge" style="font: 45px sans-serif" x="0" y="0">'+e.toUpperCase()+"</text></svg>",isActive(t,o,n){var i;return(null===(i=null==n?void 0:n.target)||void 0===i?void 0:i.tagName.toLowerCase())===e},exec(t,o){if(o){t.selection.save();const n=c.i.replace(o,e,t.createInside);t.selection.restore(),t.e.fire("synchro"),t.e.fire("afterExecTune.tune",n)}return!0}}}function w(e){const t=e?"previousSibling":"nextSibling";return{icon:e?"angle-up":"angle-down",isDisabled(e,o,n){var i;return!(null===(i=null==n?void 0:n.target)||void 0===i?void 0:i[t])},exec(o,n){const i=null==n?void 0:n[t];return n&&i&&(o.selection.save(),(0,h.call)(e?c.i.before:c.i.after,i,n),o.selection.restore()),o.e.fire("synchro"),o.e.fire("afterExecTune.tune"),!0}}}a.D.prototype.tuneBlock={popup:{p:d,table:d,img:d,blockquote:d,div:d,pre:["tune.editPre",...d],h1:f,h2:f,h3:f,h4:f,h5:f,h6:f}},a.D.prototype.controls.tune={h1:g("h1"),h2:g("h2"),h3:g("h3"),h4:g("h4"),h5:g("h5"),h6:g("h6"),up:w(!0),down:w(!1),editPre:{icon:"pencil",exec(e,t){e.e.fire("editPreInPasteCode",t)}},remove:{icon:"bin",exec(e,t){c.i.safeRemove(t),e.e.fire("synchro"),e.e.fire("closeTuner.tune")}}};class b extends i.S{constructor(){super(...arguments),this.requires=["license"]}afterInit(e){this.tuner=new p(e)}hideTuner(){this.tuner.hide()}onChangeSelection(){this.j.s.isCollapsed()||this.hideTuner()}onClickInBlock(e){this.j.s.isCollapsed()&&this.tuner.show()}beforeDestruct(e){this.tuner.destruct()}}(0,n.gn)([(0,r.watch)(":outsideClick :keydown")],b.prototype,"hideTuner",null),(0,n.gn)([(0,r.watch)("j.ed:selectionchange"),(0,r.debounce)()],b.prototype,"onChangeSelection",null),(0,n.gn)([(0,r.watch)(":click")],b.prototype,"onClickInBlock",null),s.Jodit.plugins.add("tune-block",b)},181(e,t,o){function n(e,t,o,n){var i,r=arguments.length,s=3>r?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(s=(3>r?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s}o.d(t,{gn:()=>n})}},e=>e(e.s=233)])}));
|