jodit-pro
Advanced tools
Comparing version 1.0.10 to 1.0.12
/*! | ||
* jodit-pro - PRO Version of Jodit Editor | ||
* Author: Chupurnov Valeriy <chupurnov@gmail.com> | ||
* Version: v1.0.10 | ||
* Version: v1.0.12 | ||
* Url: https://xdsoft.net/jodit/pro/ | ||
@@ -6,0 +6,0 @@ * License(s): SEE LICENSE IN LICENSE.MD |
/*! | ||
* jodit-pro - PRO Version of Jodit Editor | ||
* Author: Chupurnov Valeriy <chupurnov@gmail.com> | ||
* Version: v1.0.10 | ||
* Version: v1.0.12 | ||
* Url: https://xdsoft.net/jodit/pro/ | ||
@@ -10,2 +10,2 @@ * License(s): SEE LICENSE IN LICENSE.MD | ||
((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 s in o)("object"==typeof exports?exports:e)[s]=o[s]}})(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[633],{194(e,t,o){"use strict";o.r(t),o.d(t,{autocomplete:()=>m});var s=o(169),n=o(56),i=o(2),c=o(36),l=o(13),r=o(4),u=o(26);class p extends u.u1{constructor(e,t){var o;super(e),this.item=t,this.container.innerText=null!==(o=t.title)&&void 0!==o?o:t.value}className(){return"AutocompleteItem"}}let a=class extends u.qe{constructor(){super(...arguments),this.elements=[],this.currentSelection=-1}className(){return"Autocomplete"}onChangeSelection(e,t){var o;null!=t&&(null===(o=this.elements[t])||void 0===o||o.setMod("active",!1)),this.elements[this.currentSelection].setMod("active",!0),this.elements[this.currentSelection].container.scrollIntoView(!1)}build(e){this.clear(),e.forEach(((e,t)=>{const o=new p(this.jodit,e);this.j.e.on(o.container,"click",(()=>{this.currentSelection=t,this.select()})),this.append(o)})),this.currentSelection=0,this.onChangeSelection()}selectNext(){this.currentSelection+1>this.elements.length-1?this.currentSelection=0:this.currentSelection+=1}selectPrevious(){0>this.currentSelection-1?this.currentSelection=this.elements.length-1:this.currentSelection-=1}select(){this.j.e.fire(this,"select.autocomplete",this.elements[this.currentSelection].item)}};(0,s.gn)([(0,c.watch)("currentSelection")],a.prototype,"onChangeSelection",null),a=(0,s.gn)([c.component],a);var h=o(3),d=o(1);i.D.prototype.autocomplete={sources:[]};class m extends n.S{constructor(){super(...arguments),this.requires=["enter","license"],this.hasStyle=!0,this.sources=[]}afterInit(e){this.popup=new r.Popup(e),this.popup.setMod("padding",!1),this.list=new a(e),this.popup.setContent(this.list.container),e.e.on(this.list,"select.autocomplete",(t=>{const o=e.s.current();if(r.Dom.isText(o)&&o.nodeValue){const s=o.nodeValue.split(" ");s[s.length-1]=t.value,o.nodeValue=s.join(" "),e.s.setCursorAfter(o)}else e.s.insertNode(e.createInside.text(t.value),!0);this.popup.close()})).on("keydown.autocomplete",this.onKeyDown).on("keydown.autocomplete",this.onKeyControlDown,void 0,!0).on("autocomplete.autocomplete",this.onAutoComplete).on("registerAutocompleteSource.autocomplete",this.registerAutocompleteSource.bind(this))}registerAutocompleteSource(e){this.sources.push(e)}static isContolKey(e){return e===h.KEY_DOWN||e===h.KEY_UP||e===h.KEY_ENTER||e===h.KEY_TAB}async onKeyDown(e){if(m.isContolKey(e.key)||!this.j.s.isCollapsed)return;const t=this.j.s.current();if(r.Dom.isText(t)&&t.nodeValue){const e=t.nodeValue.split(" ").pop();if(e&&(0,l.trim)(e).length){const t=await this.onAutoComplete(e);if(t.length)return this.openPopup(t)}}this.popup.isOpened&&this.popup.close()}onKeyControlDown(e){if(this.popup.isOpened&&m.isContolKey(e.key)){switch(e.key){case h.KEY_DOWN:this.list.selectNext();break;case h.KEY_UP:this.list.selectPrevious();break;case h.KEY_TAB:case h.KEY_ENTER:this.list.select()}return this.j.e.stopPropagation(e.type),!1}}async onAutoComplete(e){const t=[];return await Promise.all(this.sources.concat(this.j.o.autocomplete.sources).map((async o=>{const s=await o(e);s&&(0,l.isArray)(s)&&t.push(...s)}))),t}openPopup(e){this.list.build(e),this.popup.open((()=>this.j.s.range.getBoundingClientRect()))}beforeDestruct(e){e.e.off(this.list).off("keydown.autocomplete",this.onKeyDown).off("autocomplete.autocomplete",this.onAutoComplete).off(".autocomplete"),this.list.destruct(),this.popup.destruct()}}(0,s.gn)([(0,c.debounce)()],m.prototype,"onKeyDown",null),(0,s.gn)([c.autobind],m.prototype,"onKeyControlDown",null),(0,s.gn)([c.autobind],m.prototype,"onAutoComplete",null),d.Jodit.plugins.add("autocomplete",m)},169(e,t,o){"use strict";function s(e,t,o,s){var n,i=arguments.length,c=3>i?t:null===s?s=Object.getOwnPropertyDescriptor(t,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(c=(3>i?n(c):i>3?n(t,o,c):n(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c}o.d(t,{gn:()=>s})}},0,[[194,670]]])})); | ||
((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 s in o)("object"==typeof exports?exports:e)[s]=o[s]}})(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[633],{195(e,t,o){"use strict";o.r(t),o.d(t,{autocomplete:()=>m});var s=o(170),n=o(56),i=o(2),c=o(36),l=o(13),r=o(4),u=o(26);class p extends u.u1{constructor(e,t){var o;super(e),this.item=t,this.container.innerText=null!==(o=t.title)&&void 0!==o?o:t.value}className(){return"AutocompleteItem"}}let a=class extends u.qe{constructor(){super(...arguments),this.elements=[],this.currentSelection=-1}className(){return"Autocomplete"}onChangeSelection(e,t){var o;null!=t&&(null===(o=this.elements[t])||void 0===o||o.setMod("active",!1)),this.elements[this.currentSelection].setMod("active",!0),this.elements[this.currentSelection].container.scrollIntoView(!1)}build(e){this.clear(),e.forEach(((e,t)=>{const o=new p(this.jodit,e);this.j.e.on(o.container,"click",(()=>{this.currentSelection=t,this.select()})),this.append(o)})),this.currentSelection=0,this.onChangeSelection()}selectNext(){this.currentSelection+1>this.elements.length-1?this.currentSelection=0:this.currentSelection+=1}selectPrevious(){0>this.currentSelection-1?this.currentSelection=this.elements.length-1:this.currentSelection-=1}select(){this.j.e.fire(this,"select.autocomplete",this.elements[this.currentSelection].item)}};(0,s.gn)([(0,c.watch)("currentSelection")],a.prototype,"onChangeSelection",null),a=(0,s.gn)([c.component],a);var h=o(3),d=o(1);i.D.prototype.autocomplete={sources:[]};class m extends n.S{constructor(){super(...arguments),this.requires=["enter","license"],this.hasStyle=!0,this.sources=[]}afterInit(e){this.popup=new r.Popup(e),this.popup.setMod("padding",!1),this.list=new a(e),this.popup.setContent(this.list.container),e.e.on(this.list,"select.autocomplete",(t=>{const o=e.s.current();if(r.Dom.isText(o)&&o.nodeValue){const s=o.nodeValue.split(" ");s[s.length-1]=t.value,o.nodeValue=s.join(" "),e.s.setCursorAfter(o)}else e.s.insertNode(e.createInside.text(t.value),!0);this.popup.close()})).on("keydown.autocomplete",this.onKeyDown).on("keydown.autocomplete",this.onKeyControlDown,void 0,!0).on("autocomplete.autocomplete",this.onAutoComplete).on("registerAutocompleteSource.autocomplete",this.registerAutocompleteSource.bind(this))}registerAutocompleteSource(e){this.sources.push(e)}static isContolKey(e){return e===h.KEY_DOWN||e===h.KEY_UP||e===h.KEY_ENTER||e===h.KEY_TAB}async onKeyDown(e){if(m.isContolKey(e.key)||!this.j.s.isCollapsed)return;const t=this.j.s.current();if(r.Dom.isText(t)&&t.nodeValue){const e=t.nodeValue.split(" ").pop();if(e&&(0,l.trim)(e).length){const t=await this.onAutoComplete(e);if(t.length)return this.openPopup(t)}}this.popup.isOpened&&this.popup.close()}onKeyControlDown(e){if(this.popup.isOpened&&m.isContolKey(e.key)){switch(e.key){case h.KEY_DOWN:this.list.selectNext();break;case h.KEY_UP:this.list.selectPrevious();break;case h.KEY_TAB:case h.KEY_ENTER:this.list.select()}return this.j.e.stopPropagation(e.type),!1}}async onAutoComplete(e){const t=[];return await Promise.all(this.sources.concat(this.j.o.autocomplete.sources).map((async o=>{const s=await o(e);s&&(0,l.isArray)(s)&&t.push(...s)}))),t}openPopup(e){this.list.build(e),this.popup.open((()=>this.j.s.range.getBoundingClientRect()))}beforeDestruct(e){e.e.off(this.list).off("keydown.autocomplete",this.onKeyDown).off("autocomplete.autocomplete",this.onAutoComplete).off(".autocomplete"),this.list.destruct(),this.popup.destruct()}}(0,s.gn)([(0,c.debounce)()],m.prototype,"onKeyDown",null),(0,s.gn)([c.autobind],m.prototype,"onKeyControlDown",null),(0,s.gn)([c.autobind],m.prototype,"onAutoComplete",null),d.Jodit.plugins.add("autocomplete",m)},170(e,t,o){"use strict";function s(e,t,o,s){var n,i=arguments.length,c=3>i?t:null===s?s=Object.getOwnPropertyDescriptor(t,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(c=(3>i?n(c):i>3?n(t,o,c):n(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c}o.d(t,{gn:()=>s})}},0,[[195,670]]])})); |
/*! | ||
* jodit-pro - PRO Version of Jodit Editor | ||
* Author: Chupurnov Valeriy <chupurnov@gmail.com> | ||
* Version: v1.0.10 | ||
* Version: v1.0.12 | ||
* Url: https://xdsoft.net/jodit/pro/ | ||
@@ -6,0 +6,0 @@ * License(s): SEE LICENSE IN LICENSE.MD |
/*! | ||
* jodit-pro - PRO Version of Jodit Editor | ||
* Author: Chupurnov Valeriy <chupurnov@gmail.com> | ||
* Version: v1.0.10 | ||
* Version: v1.0.12 | ||
* Url: https://xdsoft.net/jodit/pro/ | ||
@@ -10,2 +10,2 @@ * License(s): SEE LICENSE IN LICENSE.MD | ||
((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 s in o)("object"==typeof exports?exports:t)[s]=o[s]}})(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[391],{195(t,e,o){"use strict";o.r(e),o.d(e,{backup:()=>b});var s=o(169),i=o(2),n=o(30),a=o(20);i.D.prototype.backup={interval:30,limit:50,dialogWidth:700,hotkeys:["ctrl+shift+b","cmd+shift+b"]},i.D.prototype.controls.backup={store:{command:"saveBackup",text:"Save backup now"},restore:{tooltip:"Restore",list:["backup.store"],exec(t){t.execCommand("openBackupDialog")}}},n.J.set("restore",o(196)),(0,a.xl)(o(197));var r=o(56);class l{constructor(t){this.jodit=t,this.key="backup.default.storage"}async add(t){if(!t.html.trim().length)return!1;const e=this.jodit.storage.get(this.key)||[];return e.find((e=>e.html===t.html))||(e.unshift(t),e.length>this.jodit.o.backup.limit&&(e.length=this.jodit.o.backup.limit),this.jodit.storage.set(this.key,e)),!1}items(){return Promise.resolve(this.jodit.storage.get(this.key)||[])}clear(){return this.jodit.storage.delete(this.key),Promise.resolve(!1)}}var c=o(47),h=o(36),u=o(26),d=o(13);class p extends u.u1{constructor(t,e){super(t),this.data=e,this.container.innerHTML=this.formatDate(e.created),(0,d.attr)(this.container,"tabIndex",0)}className(){return"UIBackupItem"}formatDate(t){const e=new Date,o=(0,d.isString)(t)?new Date(t):t,s=(e.getTime()-o.getTime())/1e3;return(0,d.isFunction)(this.j.o.backup.formatDate)?this.j.o.backup.formatDate(o):.2>s?this.j.i18n("Current"):60>s?this.j.i18n("Less minute"):s>3600?s>86400?`${o.toDateString()} ${o.toLocaleTimeString()}`:this.j.i18n("%s hours ago",Math.floor(s/3600)):this.j.i18n("%s minutes ago",Math.floor(s/60))}focus(){this.container.focus()}}var m=o(3);let g=class extends u.qe{constructor(t){super(t),this.elements=[],this.currentSelection=-1,t.e.on(this.container,"keydown",(t=>{switch(t.key){case m.KEY_ENTER:t.preventDefault(),t.stopPropagation(),this.onChoose(this.currentSelection);break;case m.KEY_DOWN:this.selectNext();break;case m.KEY_UP:this.selectPrevious()}}))}className(){return"UIBackupList"}createContainer(t){const e=super.createContainer(t);return(0,d.attr)(e,"tabIndex","-1"),e}build(t){this.clear(),t.forEach(((t,e)=>{const o=new p(this.jodit,t);this.append(o),this.j.e.on(o.container,"focus",(()=>this.onSelect(e))).on(o.container,"click",(()=>this.onSelect(e))).on(o.container,"dblclick",(()=>this.onChoose(e)))})),this.currentSelection=0,this.onChangeCurrentSelection(void 0,-1,0)}onChangeCurrentSelection(t,e,o){var s,i,n;null===(s=this.elements[e])||void 0===s||s.setMod("active",!1),null===(i=this.elements[o])||void 0===i||i.setMod("active",!0),null===(n=this.elements[o])||void 0===n||n.focus(),this.j.e.fire(this,"select",this.elements[o].data)}onSelect(t){this.currentSelection=t}onChoose(t){this.j.e.fire(this,"choose",this.elements[null!=t?t:this.currentSelection].data)}selectNext(){this.currentSelection+1>this.elements.length-1?this.currentSelection=0:this.currentSelection+=1}selectPrevious(){0>this.currentSelection-1?this.currentSelection=this.elements.length-1:this.currentSelection-=1}};(0,s.gn)([(0,h.watch)("currentSelection")],g.prototype,"onChangeCurrentSelection",null),(0,s.gn)([h.autobind],g.prototype,"onSelect",null),(0,s.gn)([h.autobind],g.prototype,"onChoose",null),g=(0,s.gn)([h.component],g);let f=class extends u.u1{constructor(t){super(t),this.list=new g(this.j),this.preview=this.j.c.div(this.getFullElName("preview")),this.container.appendChild(this.list.container),this.container.appendChild(this.preview),this.list.container.classList.add(this.getFullElName("list")),t.e.on(this.list,"select",this.onSelectItem).on(this.list,"choose",this.onChooseItem)}className(){return"UIBackupBox"}build(t){this.preview.innerHTML="",this.list.build(t)}destruct(){return this.j.e.off(this.list,"select",this.onSelectItem),this.list.destruct(),super.destruct()}onSelectItem(t){this.latestSelected=t,this.preview.innerHTML=t.html||`<div class="${this.getFullElName("empty")}">${this.j.i18n("Empty")}</div>`}onChooseItem(t){this.j.e.fire(this,"choose",t)}chooseSelected(){this.onChooseItem(this.latestSelected)}};(0,s.gn)([h.autobind],f.prototype,"onSelectItem",null),(0,s.gn)([h.autobind],f.prototype,"onChooseItem",null),f=(0,s.gn)([h.component],f);var v=o(1);class b extends r.S{constructor(){var t;super(...arguments),this.requires=["license"],this.hasStyle=!0,this.buttons=[{name:"backup.restore",group:"history"}],this.box=new f(this.j),this.dialog=null,this.storage=null!==(t=this.jodit.o.backup.remoteStore)&&void 0!==t?t:new l(this.jodit),this.timeout=0}afterInit(t){t.registerCommand("saveBackup",this.onSaveBackup).registerCommand("openBackupDialog",{exec:this.onOpenBackupDialog,hotkeys:t.o.backup.hotkeys});const e=()=>{this.timeout=t.async.setTimeout((()=>{this.onSaveBackup(),e()}),1e3*t.o.backup.interval)};e(),t.e.on(this.box,"choose",this.onSelectItem).on(t.ow,"beforeunload.backup",(()=>{this.onSaveBackup()}))}prepareDialog(){this.dialog||(this.dialog=new c.Vq({minWidth:this.j.o.backup.dialogWidth,buttons:["fullsize","dialog.close"]}).setContent(this.box.container)),this.dialog.setHeader(this.jodit.i18n("Restore")),this.addButtonsToDialog()}onSaveBackup(){this.storage.add({created:new Date,html:this.j.value})}async onOpenBackupDialog(){this.prepareDialog();const{dialog:t}=this;if(!t)return;t.open().setModal(!0);const e=await this.storage.items();this.box.build([{created:new Date,html:this.j.value},...e]),t.calcAutoSize(),t.setPosition()}onSelectItem(t){var e;null===(e=this.dialog)||void 0===e||e.close(),this.j.value=t.html,this.j.s.focus()}addButtonsToDialog(){var t;const{jodit:e}=this,o=(0,u.zx)(e,{name:"ok",tabIndex:0,status:"primary",text:"Ok"}),s=(0,u.zx)(e,{status:"secondary",tabIndex:0,text:"Cancel"}),i=(0,u.zx)(e,{name:"clear",tabIndex:0,status:"secondary",text:"Remove all"});o.onAction((()=>{this.box.chooseSelected()})),s.onAction((()=>{var t;null===(t=this.dialog)||void 0===t||t.close()})),i.onAction((()=>{(0,c.I4)("Are you shure?",void 0,(t=>{var e;t&&(this.storage.clear(),null===(e=this.dialog)||void 0===e||e.close())}))}));const n=new u.eC(e,[i,s,o]);n.container.style.margin="0",n.container.style.justifyContent="flex-end",n.container.style.width="100%",null===(t=this.dialog)||void 0===t||t.setFooter(n)}beforeDestruct(){var t;const{j:e}=this;e.async.clearTimeout(this.timeout),e.e.off(this.box,"choose",this.onSelectItem).off(e.ow,"beforeunload.backup"),this.box.destruct(),null===(t=this.dialog)||void 0===t||t.destruct()}}(0,s.gn)([h.autobind],b.prototype,"onSaveBackup",null),(0,s.gn)([h.autobind],b.prototype,"onOpenBackupDialog",null),(0,s.gn)([h.autobind],b.prototype,"onSelectItem",null),v.Jodit.plugins.add("backup",b)},197(t,e,o){"use strict";o.r(e)},169(t,e,o){"use strict";function s(t,e,o,s){var i,n=arguments.length,a=3>n?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,s);else for(var r=t.length-1;r>=0;r--)(i=t[r])&&(a=(3>n?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a}o.d(e,{gn:()=>s})},196(t){t.exports='<?xml version="1.0" ?><svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg"><title/><g id="Upload"><path d="M16,26h8V50a2,2,0,0,0,2,2H38a2,2,0,0,0,2-2V26h8a2,2,0,0,0,1.4946-3.3291l-16-18a2,2,0,0,0-2.9892,0l-16,18A2,2,0,0,0,16,26ZM32,9.0107,43.5464,22H38a2,2,0,0,0-2,2V48H28V24a2,2,0,0,0-2-2H20.4536Z"/><path d="M53,42a2,2,0,0,0-2,2V54a2.0023,2.0023,0,0,1-2,2H15a2.0023,2.0023,0,0,1-2-2V44a2,2,0,0,0-4,0V54a6.0066,6.0066,0,0,0,6,6H49a6.0066,6.0066,0,0,0,6-6V44A2,2,0,0,0,53,42Z"/></g></svg>'}},0,[[195,670]]])})); | ||
((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 s in o)("object"==typeof exports?exports:t)[s]=o[s]}})(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[391],{196(t,e,o){"use strict";o.r(e),o.d(e,{backup:()=>b});var s=o(170),i=o(2),n=o(30),a=o(20);i.D.prototype.backup={interval:30,limit:50,dialogWidth:700,hotkeys:["ctrl+shift+b","cmd+shift+b"]},i.D.prototype.controls.backup={store:{command:"saveBackup",text:"Save backup now"},restore:{tooltip:"Restore",list:["backup.store"],exec(t){t.execCommand("openBackupDialog")}}},n.J.set("restore",o(197)),(0,a.xl)(o(198));var r=o(56);class l{constructor(t){this.jodit=t,this.key="backup.default.storage"}async add(t){if(!t.html.trim().length)return!1;const e=this.jodit.storage.get(this.key)||[];return e.find((e=>e.html===t.html))||(e.unshift(t),e.length>this.jodit.o.backup.limit&&(e.length=this.jodit.o.backup.limit),this.jodit.storage.set(this.key,e)),!1}items(){return Promise.resolve(this.jodit.storage.get(this.key)||[])}clear(){return this.jodit.storage.delete(this.key),Promise.resolve(!1)}}var c=o(47),h=o(36),u=o(26),d=o(13);class p extends u.u1{constructor(t,e){super(t),this.data=e,this.container.innerHTML=this.formatDate(e.created),(0,d.attr)(this.container,"tabIndex",0)}className(){return"UIBackupItem"}formatDate(t){const e=new Date,o=(0,d.isString)(t)?new Date(t):t,s=(e.getTime()-o.getTime())/1e3;return(0,d.isFunction)(this.j.o.backup.formatDate)?this.j.o.backup.formatDate(o):.2>s?this.j.i18n("Current"):60>s?this.j.i18n("Less minute"):s>3600?s>86400?`${o.toDateString()} ${o.toLocaleTimeString()}`:this.j.i18n("%s hours ago",Math.floor(s/3600)):this.j.i18n("%s minutes ago",Math.floor(s/60))}focus(){this.container.focus()}}var m=o(3);let g=class extends u.qe{constructor(t){super(t),this.elements=[],this.currentSelection=-1,t.e.on(this.container,"keydown",(t=>{switch(t.key){case m.KEY_ENTER:t.preventDefault(),t.stopPropagation(),this.onChoose(this.currentSelection);break;case m.KEY_DOWN:this.selectNext();break;case m.KEY_UP:this.selectPrevious()}}))}className(){return"UIBackupList"}createContainer(t){const e=super.createContainer(t);return(0,d.attr)(e,"tabIndex","-1"),e}build(t){this.clear(),t.forEach(((t,e)=>{const o=new p(this.jodit,t);this.append(o),this.j.e.on(o.container,"focus",(()=>this.onSelect(e))).on(o.container,"click",(()=>this.onSelect(e))).on(o.container,"dblclick",(()=>this.onChoose(e)))})),this.currentSelection=0,this.onChangeCurrentSelection(void 0,-1,0)}onChangeCurrentSelection(t,e,o){var s,i,n;null===(s=this.elements[e])||void 0===s||s.setMod("active",!1),null===(i=this.elements[o])||void 0===i||i.setMod("active",!0),null===(n=this.elements[o])||void 0===n||n.focus(),this.j.e.fire(this,"select",this.elements[o].data)}onSelect(t){this.currentSelection=t}onChoose(t){this.j.e.fire(this,"choose",this.elements[null!=t?t:this.currentSelection].data)}selectNext(){this.currentSelection+1>this.elements.length-1?this.currentSelection=0:this.currentSelection+=1}selectPrevious(){0>this.currentSelection-1?this.currentSelection=this.elements.length-1:this.currentSelection-=1}};(0,s.gn)([(0,h.watch)("currentSelection")],g.prototype,"onChangeCurrentSelection",null),(0,s.gn)([h.autobind],g.prototype,"onSelect",null),(0,s.gn)([h.autobind],g.prototype,"onChoose",null),g=(0,s.gn)([h.component],g);let f=class extends u.u1{constructor(t){super(t),this.list=new g(this.j),this.preview=this.j.c.div(this.getFullElName("preview")),this.container.appendChild(this.list.container),this.container.appendChild(this.preview),this.list.container.classList.add(this.getFullElName("list")),t.e.on(this.list,"select",this.onSelectItem).on(this.list,"choose",this.onChooseItem)}className(){return"UIBackupBox"}build(t){this.preview.innerHTML="",this.list.build(t)}destruct(){return this.j.e.off(this.list,"select",this.onSelectItem),this.list.destruct(),super.destruct()}onSelectItem(t){this.latestSelected=t,this.preview.innerHTML=t.html||`<div class="${this.getFullElName("empty")}">${this.j.i18n("Empty")}</div>`}onChooseItem(t){this.j.e.fire(this,"choose",t)}chooseSelected(){this.onChooseItem(this.latestSelected)}};(0,s.gn)([h.autobind],f.prototype,"onSelectItem",null),(0,s.gn)([h.autobind],f.prototype,"onChooseItem",null),f=(0,s.gn)([h.component],f);var v=o(1);class b extends r.S{constructor(){var t;super(...arguments),this.requires=["license"],this.hasStyle=!0,this.buttons=[{name:"backup.restore",group:"history"}],this.box=new f(this.j),this.dialog=null,this.storage=null!==(t=this.jodit.o.backup.remoteStore)&&void 0!==t?t:new l(this.jodit),this.timeout=0}afterInit(t){t.registerCommand("saveBackup",this.onSaveBackup).registerCommand("openBackupDialog",{exec:this.onOpenBackupDialog,hotkeys:t.o.backup.hotkeys});const e=()=>{this.timeout=t.async.setTimeout((()=>{this.onSaveBackup(),e()}),1e3*t.o.backup.interval)};e(),t.e.on(this.box,"choose",this.onSelectItem).on(t.ow,"beforeunload.backup",(()=>{this.onSaveBackup()}))}prepareDialog(){this.dialog||(this.dialog=new c.Vq({minWidth:this.j.o.backup.dialogWidth,buttons:["fullsize","dialog.close"]}).setContent(this.box.container)),this.dialog.setHeader(this.jodit.i18n("Restore")),this.addButtonsToDialog()}onSaveBackup(){this.storage.add({created:new Date,html:this.j.value})}async onOpenBackupDialog(){this.prepareDialog();const{dialog:t}=this;if(!t)return;t.open().setModal(!0);const e=await this.storage.items();this.box.build([{created:new Date,html:this.j.value},...e]),t.calcAutoSize(),t.setPosition()}onSelectItem(t){var e;null===(e=this.dialog)||void 0===e||e.close(),this.j.value=t.html,this.j.s.focus()}addButtonsToDialog(){var t;const{jodit:e}=this,o=(0,u.zx)(e,{name:"ok",tabIndex:0,status:"primary",text:"Ok"}),s=(0,u.zx)(e,{status:"secondary",tabIndex:0,text:"Cancel"}),i=(0,u.zx)(e,{name:"clear",tabIndex:0,status:"secondary",text:"Remove all"});o.onAction((()=>{this.box.chooseSelected()})),s.onAction((()=>{var t;null===(t=this.dialog)||void 0===t||t.close()})),i.onAction((()=>{(0,c.I4)("Are you shure?",void 0,(t=>{var e;t&&(this.storage.clear(),null===(e=this.dialog)||void 0===e||e.close())}))}));const n=new u.eC(e,[i,s,o]);n.container.style.margin="0",n.container.style.justifyContent="flex-end",n.container.style.width="100%",null===(t=this.dialog)||void 0===t||t.setFooter(n)}beforeDestruct(){var t;const{j:e}=this;e.async.clearTimeout(this.timeout),e.e.off(this.box,"choose",this.onSelectItem).off(e.ow,"beforeunload.backup"),this.box.destruct(),null===(t=this.dialog)||void 0===t||t.destruct()}}(0,s.gn)([h.autobind],b.prototype,"onSaveBackup",null),(0,s.gn)([h.autobind],b.prototype,"onOpenBackupDialog",null),(0,s.gn)([h.autobind],b.prototype,"onSelectItem",null),v.Jodit.plugins.add("backup",b)},198(t,e,o){"use strict";o.r(e)},170(t,e,o){"use strict";function s(t,e,o,s){var i,n=arguments.length,a=3>n?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,s);else for(var r=t.length-1;r>=0;r--)(i=t[r])&&(a=(3>n?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a}o.d(e,{gn:()=>s})},197(t){t.exports='<?xml version="1.0" ?><svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg"><title/><g id="Upload"><path d="M16,26h8V50a2,2,0,0,0,2,2H38a2,2,0,0,0,2-2V26h8a2,2,0,0,0,1.4946-3.3291l-16-18a2,2,0,0,0-2.9892,0l-16,18A2,2,0,0,0,16,26ZM32,9.0107,43.5464,22H38a2,2,0,0,0-2,2V48H28V24a2,2,0,0,0-2-2H20.4536Z"/><path d="M53,42a2,2,0,0,0-2,2V54a2.0023,2.0023,0,0,1-2,2H15a2.0023,2.0023,0,0,1-2-2V44a2,2,0,0,0-4,0V54a6.0066,6.0066,0,0,0,6,6H49a6.0066,6.0066,0,0,0,6-6V44A2,2,0,0,0,53,42Z"/></g></svg>'}},0,[[196,670]]])})); |
/*! | ||
* jodit-pro - PRO Version of Jodit Editor | ||
* Author: Chupurnov Valeriy <chupurnov@gmail.com> | ||
* Version: v1.0.10 | ||
* Version: v1.0.12 | ||
* Url: https://xdsoft.net/jodit/pro/ | ||
@@ -6,0 +6,0 @@ * License(s): SEE LICENSE IN LICENSE.MD |
/*! | ||
* jodit-pro - PRO Version of Jodit Editor | ||
* Author: Chupurnov Valeriy <chupurnov@gmail.com> | ||
* Version: v1.0.10 | ||
* Version: v1.0.12 | ||
* Url: https://xdsoft.net/jodit/pro/ | ||
@@ -10,2 +10,2 @@ * License(s): SEE LICENSE IN LICENSE.MD | ||
((e,t)=>{if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var s=t();for(var a in s)("object"==typeof exports?exports:e)[a]=s[a]}})(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[102],{205(e,t,s){"use strict";s.r(t),s.d(t,{changeCase:()=>C});var a=s(2),o=s(13);a.D.prototype.controls.changeCase={tooltip:"Change case",icon:s(206),list:["lowercase","UPPERCASE","Title Case"],isDisabled(e){return!e.s.current()},exec(e,t,{control:s}){const a=s.command+"Selected",n=s.args&&s.args[0]||(0,o.dataBind)(e,a);if(!n||!s.command)return!1;(0,o.dataBind)(e,a,n),e.execCommand(s.command,null,n)},command:"changeCase"};var n=s(56),r=s(4),c=s(1);class C extends n.S{constructor(){super(...arguments),this.requires=["license"],this.buttons=[{name:"changeCase",group:"font-style"}]}afterInit(e){e.registerCommand("changeCase",{exec:(t,s,a)=>{a=a.toLowerCase();const o=e.s.range,{startContainer:n,startOffset:c}=o;if(e.s.isCollapsed()){const t=e.s.current(!0);t&&t.parentElement&&this.applyCase(a,t.parentElement),o.setStart(n,c),e.s.selectRange(o)}else{const t=o.cloneRange(),s=o.cloneRange(),n=e.createInside.fake(),c=e.createInside.fake();t.collapse(!0),s.collapse(!1),t.insertNode(n),s.insertNode(c),r.Dom.between(n,c,(e=>{this.applyCase(a,e)})),o.setStartAfter(n),o.setEndBefore(c),e.s.selectRange(o),r.Dom.safeRemove(n),r.Dom.safeRemove(c)}}})}applyCase(e,t){if(r.Dom.isText(t)){const s=t.nodeValue;s&&(t.nodeValue=(t=>{switch(e){case"lowercase":return t.toLowerCase();case"uppercase":return t.toUpperCase();default:return t.split(" ").map(o.ucfirst).join(" ")}})(s))}else r.Dom.each(t,(t=>{this.applyCase(e,t)}))}beforeDestruct(e){}}c.Jodit.plugins.add("change-case",C)},206(e){e.exports='<svg width="19" height="13" viewBox="0 0 19 13" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12.799 11.449V12H7.764V11.449L8.695 11.487C9.075 11.525 9.265 11.373 9.265 11.031C9.265 10.8157 9.20167 10.5687 9.075 10.29L8.144 8.048H3.717L2.843 10.176C2.66567 10.5687 2.577 10.8853 2.577 11.126C2.577 11.392 2.71633 11.5187 2.995 11.506L3.907 11.449V12H0.62V11.449L1.114 11.487H1.19C1.44333 11.487 1.65233 11.3667 1.817 11.126C2.007 10.8473 2.197 10.48 2.387 10.024L6.358 0.466999H6.852L10.861 10.062C11.0383 10.518 11.222 10.879 11.412 11.145C11.5893 11.373 11.811 11.487 12.077 11.487H12.172L12.799 11.449ZM3.945 7.516H7.916L5.921 2.728L3.945 7.516Z" fill="black"/> <path d="M18.45 11.61V12H16.32C16.33 11.93 16.34 11.84 16.35 11.73C16.37 11.61 16.38 11.515 16.38 11.445L16.41 10.86C16.19 11.29 15.905 11.6 15.555 11.79C15.215 11.98 14.805 12.075 14.325 12.075C13.695 12.075 13.215 11.935 12.885 11.655C12.565 11.365 12.405 10.94 12.405 10.38C12.405 9.61 12.725 9.045 13.365 8.685C14.015 8.315 15.03 8.13 16.41 8.13V7.26C16.41 6.79 16.3 6.455 16.08 6.255C15.86 6.055 15.505 5.955 15.015 5.955C14.255 5.955 13.875 6.165 13.875 6.585C13.875 6.665 13.895 6.76 13.935 6.87C13.985 6.97 14.01 7.065 14.01 7.155C14.01 7.325 13.955 7.455 13.845 7.545C13.735 7.625 13.595 7.665 13.425 7.665C13.215 7.665 13.05 7.6 12.93 7.47C12.82 7.34 12.765 7.17 12.765 6.96C12.765 6.54 12.985 6.2 13.425 5.94C13.865 5.68 14.455 5.55 15.195 5.55C16.865 5.55 17.7 6.255 17.7 7.665V11.355C17.7 11.545 17.765 11.64 17.895 11.64L18.45 11.61ZM14.775 11.535C15.215 11.535 15.59 11.355 15.9 10.995C16.21 10.625 16.38 10.15 16.41 9.57V8.535C15.47 8.535 14.795 8.675 14.385 8.955C13.975 9.225 13.77 9.66 13.77 10.26C13.77 10.68 13.855 11 14.025 11.22C14.205 11.43 14.455 11.535 14.775 11.535Z" fill="black"/> </svg>'}},0,[[205,670]]])})); | ||
((e,t)=>{if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var s=t();for(var a in s)("object"==typeof exports?exports:e)[a]=s[a]}})(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[102],{206(e,t,s){"use strict";s.r(t),s.d(t,{changeCase:()=>C});var a=s(2),o=s(13);a.D.prototype.controls.changeCase={tooltip:"Change case",icon:s(207),list:["lowercase","UPPERCASE","Title Case"],isDisabled(e){return!e.s.current()},exec(e,t,{control:s}){const a=s.command+"Selected",n=s.args&&s.args[0]||(0,o.dataBind)(e,a);if(!n||!s.command)return!1;(0,o.dataBind)(e,a,n),e.execCommand(s.command,null,n)},command:"changeCase"};var n=s(56),r=s(4),c=s(1);class C extends n.S{constructor(){super(...arguments),this.requires=["license"],this.buttons=[{name:"changeCase",group:"font-style"}]}afterInit(e){e.registerCommand("changeCase",{exec:(t,s,a)=>{a=a.toLowerCase();const o=e.s.range,{startContainer:n,startOffset:c}=o;if(e.s.isCollapsed()){const t=e.s.current(!0);t&&t.parentElement&&this.applyCase(a,t.parentElement),o.setStart(n,c),e.s.selectRange(o)}else{const t=o.cloneRange(),s=o.cloneRange(),n=e.createInside.fake(),c=e.createInside.fake();t.collapse(!0),s.collapse(!1),t.insertNode(n),s.insertNode(c),r.Dom.between(n,c,(e=>{this.applyCase(a,e)})),o.setStartAfter(n),o.setEndBefore(c),e.s.selectRange(o),r.Dom.safeRemove(n),r.Dom.safeRemove(c)}}})}applyCase(e,t){if(r.Dom.isText(t)){const s=t.nodeValue;s&&(t.nodeValue=(t=>{switch(e){case"lowercase":return t.toLowerCase();case"uppercase":return t.toUpperCase();default:return t.split(" ").map(o.ucfirst).join(" ")}})(s))}else r.Dom.each(t,(t=>{this.applyCase(e,t)}))}beforeDestruct(e){}}c.Jodit.plugins.add("change-case",C)},207(e){e.exports='<svg width="19" height="13" viewBox="0 0 19 13" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12.799 11.449V12H7.764V11.449L8.695 11.487C9.075 11.525 9.265 11.373 9.265 11.031C9.265 10.8157 9.20167 10.5687 9.075 10.29L8.144 8.048H3.717L2.843 10.176C2.66567 10.5687 2.577 10.8853 2.577 11.126C2.577 11.392 2.71633 11.5187 2.995 11.506L3.907 11.449V12H0.62V11.449L1.114 11.487H1.19C1.44333 11.487 1.65233 11.3667 1.817 11.126C2.007 10.8473 2.197 10.48 2.387 10.024L6.358 0.466999H6.852L10.861 10.062C11.0383 10.518 11.222 10.879 11.412 11.145C11.5893 11.373 11.811 11.487 12.077 11.487H12.172L12.799 11.449ZM3.945 7.516H7.916L5.921 2.728L3.945 7.516Z" fill="black"/> <path d="M18.45 11.61V12H16.32C16.33 11.93 16.34 11.84 16.35 11.73C16.37 11.61 16.38 11.515 16.38 11.445L16.41 10.86C16.19 11.29 15.905 11.6 15.555 11.79C15.215 11.98 14.805 12.075 14.325 12.075C13.695 12.075 13.215 11.935 12.885 11.655C12.565 11.365 12.405 10.94 12.405 10.38C12.405 9.61 12.725 9.045 13.365 8.685C14.015 8.315 15.03 8.13 16.41 8.13V7.26C16.41 6.79 16.3 6.455 16.08 6.255C15.86 6.055 15.505 5.955 15.015 5.955C14.255 5.955 13.875 6.165 13.875 6.585C13.875 6.665 13.895 6.76 13.935 6.87C13.985 6.97 14.01 7.065 14.01 7.155C14.01 7.325 13.955 7.455 13.845 7.545C13.735 7.625 13.595 7.665 13.425 7.665C13.215 7.665 13.05 7.6 12.93 7.47C12.82 7.34 12.765 7.17 12.765 6.96C12.765 6.54 12.985 6.2 13.425 5.94C13.865 5.68 14.455 5.55 15.195 5.55C16.865 5.55 17.7 6.255 17.7 7.665V11.355C17.7 11.545 17.765 11.64 17.895 11.64L18.45 11.61ZM14.775 11.535C15.215 11.535 15.59 11.355 15.9 10.995C16.21 10.625 16.38 10.15 16.41 9.57V8.535C15.47 8.535 14.795 8.675 14.385 8.955C13.975 9.225 13.77 9.66 13.77 10.26C13.77 10.68 13.855 11 14.025 11.22C14.205 11.43 14.455 11.535 14.775 11.535Z" fill="black"/> </svg>'}},0,[[206,670]]])})); |
/*! | ||
* jodit-pro - PRO Version of Jodit Editor | ||
* Author: Chupurnov Valeriy <chupurnov@gmail.com> | ||
* Version: v1.0.10 | ||
* Version: v1.0.12 | ||
* Url: https://xdsoft.net/jodit/pro/ | ||
@@ -6,0 +6,0 @@ * License(s): SEE LICENSE IN LICENSE.MD |
/*! | ||
* jodit-pro - PRO Version of Jodit Editor | ||
* Author: Chupurnov Valeriy <chupurnov@gmail.com> | ||
* Version: v1.0.10 | ||
* Version: v1.0.12 | ||
* Url: https://xdsoft.net/jodit/pro/ | ||
@@ -10,2 +10,2 @@ * License(s): SEE LICENSE IN LICENSE.MD | ||
((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([[652],{202(e){"undefined"!=typeof self&&self,e.exports=(e=>{var t={};function r(i){if(t[i])return t[i].exports;var o=t[i]={i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=(e,t,i)=>{r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=(e,t)=>{if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(i,o,(t=>e[t]).bind(null,o));return i},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,"a",t),t},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.p="",r(r.s=1)})([(e,t,r)=>{"use strict";var i=r(3);function o(e){return!0===i(e)&&"[object Object]"===Object.prototype.toString.call(e)}e.exports=e=>{var t,r;return!1!==o(e)&&"function"==typeof(t=e.constructor)&&!1!==o(r=t.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=t.PALETTE_MATERIAL_CHROME=t.PALETTE_MATERIAL_500=t.COLOR_NAMES=t.getLuminance=t.intToRgb=t.rgbToInt=t.rgbToHsv=t.rgbToHsl=t.hslToRgb=t.rgbToHex=t.parseColor=t.parseColorToHsla=t.parseColorToHsl=t.parseColorToRgba=t.parseColorToRgb=t.from=t.createPicker=void 0;var i=(()=>{function e(e,t){for(var r=0;t.length>r;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return(t,r,i)=>(r&&e(t.prototype,r),i&&e(t,i),t)})(),o=(e,t)=>{if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return((e,t)=>{var r=[],i=!0,o=!1,s=void 0;try{for(var a,n=e[Symbol.iterator]();!(i=(a=n.next()).done)&&(r.push(a.value),!t||r.length!==t);i=!0);}catch(e){o=!0,s=e}finally{try{!i&&n.return&&n.return()}finally{if(o)throw s}}return r})(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},s=r(2),a=l(r(0)),n=l(r(4));function l(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);e.length>t;t++)r[t]=e[t];return r}return Array.from(e)}var p="undefined"!=typeof window&&window.navigator.userAgent.indexOf("Edge")>-1,u="undefined"!=typeof window&&window.navigator.userAgent.indexOf("rv:")>-1,d={id:null,attachTo:"body",showHSL:!0,showRGB:!0,showHEX:!0,showAlpha:!1,color:"#ff0000",palette:null,paletteEditable:!1,useAlphaInPalette:"auto",slBarSize:[232,150],hueBarSize:[150,11],alphaBarSize:[150,11]},g="COLOR",b="RGBA_USER",v="HSLA_USER";function f(e,t,r){return e?e instanceof HTMLElement?e:e instanceof NodeList?e[0]:"string"==typeof e?document.querySelector(e):e.jquery?e.get(0):r?t:null:t}function m(e){var t=e.getContext("2d"),r=+e.width,i=+e.height,a=t.createLinearGradient(1,1,1,i-1);return a.addColorStop(0,"white"),a.addColorStop(1,"black"),{setHue(e){var o=t.createLinearGradient(1,0,r-1,0);o.addColorStop(0,"hsla("+e+", 100%, 50%, 0)"),o.addColorStop(1,"hsla("+e+", 100%, 50%, 1)"),t.fillStyle=a,t.fillRect(0,0,r,i),t.fillStyle=o,t.globalCompositeOperation="multiply",t.fillRect(0,0,r,i),t.globalCompositeOperation="source-over"},grabColor:(e,r)=>t.getImageData(e,r,1,1).data,findColor(e,t,a){var n=(0,s.rgbToHsv)(e,t,a),l=o(n,3);return[l[1]*r,i-l[2]*i]}}}function A(e,t,r){return null===e?t:/^\s*$/.test(e)?r:!!/true|yes|1/i.test(e)||!/false|no|0/i.test(e)&&t}function y(e,t,r){if(null===e)return t;if(/^\s*$/.test(e))return r;var i=e.split(",").map(Number);return 2===i.length&&i[0]&&i[1]?i:t}var k=function(){function e(t,r){if(h(this,e),r?(t=f(t),this.options=Object.assign({},d,r)):t&&(0,a.default)(t)?(this.options=Object.assign({},d,t),t=f(this.options.attachTo)):(this.options=Object.assign({},d),t=f((0,s.nvl)(t,this.options.attachTo))),!t)throw Error("Container not found: "+this.options.attachTo);!function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"acp-";if(t.hasAttribute(r+"show-hsl")&&(e.showHSL=A(t.getAttribute(r+"show-hsl"),d.showHSL,!0)),t.hasAttribute(r+"show-rgb")&&(e.showRGB=A(t.getAttribute(r+"show-rgb"),d.showRGB,!0)),t.hasAttribute(r+"show-hex")&&(e.showHEX=A(t.getAttribute(r+"show-hex"),d.showHEX,!0)),t.hasAttribute(r+"show-alpha")&&(e.showAlpha=A(t.getAttribute(r+"show-alpha"),d.showAlpha,!0)),t.hasAttribute(r+"palette-editable")&&(e.paletteEditable=A(t.getAttribute(r+"palette-editable"),d.paletteEditable,!0)),t.hasAttribute(r+"sl-bar-size")&&(e.slBarSize=y(t.getAttribute(r+"sl-bar-size"),d.slBarSize,[232,150])),t.hasAttribute(r+"hue-bar-size")&&(e.hueBarSize=y(t.getAttribute(r+"hue-bar-size"),d.hueBarSize,[150,11]),e.alphaBarSize=e.hueBarSize),t.hasAttribute(r+"palette")){var i=t.getAttribute(r+"palette");switch(i){case"PALETTE_MATERIAL_500":e.palette=s.PALETTE_MATERIAL_500;break;case"PALETTE_MATERIAL_CHROME":case"":e.palette=s.PALETTE_MATERIAL_CHROME;break;default:e.palette=i.split(/[;|]/)}}t.hasAttribute(r+"color")&&(e.color=t.getAttribute(r+"color"))}(this.options,t),this.H=0,this.S=0,this.L=0,this.R=0,this.G=0,this.B=0,this.A=1,this.palette={},this.element=document.createElement("div"),this.options.id&&(this.element.id=this.options.id),this.element.className="a-color-picker",this.element.innerHTML=n.default,t.appendChild(this.element);var i=this.element.querySelector(".a-color-picker-h");this.setupHueCanvas(i),this.hueBarHelper=m(i),this.huePointer=this.element.querySelector(".a-color-picker-h+.a-color-picker-dot");var o=this.element.querySelector(".a-color-picker-sl");this.setupSlCanvas(o),this.slBarHelper=m(o),this.slPointer=this.element.querySelector(".a-color-picker-sl+.a-color-picker-dot"),this.preview=this.element.querySelector(".a-color-picker-preview"),this.setupClipboard(this.preview.querySelector(".a-color-picker-clipbaord")),this.options.showHSL?(this.setupInput(this.inputH=this.element.querySelector(".a-color-picker-hsl>input[nameref=H]")),this.setupInput(this.inputS=this.element.querySelector(".a-color-picker-hsl>input[nameref=S]")),this.setupInput(this.inputL=this.element.querySelector(".a-color-picker-hsl>input[nameref=L]"))):this.element.querySelector(".a-color-picker-hsl").remove(),this.options.showRGB?(this.setupInput(this.inputR=this.element.querySelector(".a-color-picker-rgb>input[nameref=R]")),this.setupInput(this.inputG=this.element.querySelector(".a-color-picker-rgb>input[nameref=G]")),this.setupInput(this.inputB=this.element.querySelector(".a-color-picker-rgb>input[nameref=B]"))):this.element.querySelector(".a-color-picker-rgb").remove(),this.options.showHEX?this.setupInput(this.inputRGBHEX=this.element.querySelector("input[nameref=RGBHEX]")):this.element.querySelector(".a-color-picker-rgbhex").remove(),this.options.paletteEditable||this.options.palette&&this.options.palette.length>0?this.setPalette(this.paletteRow=this.element.querySelector(".a-color-picker-palette")):(this.paletteRow=this.element.querySelector(".a-color-picker-palette"),this.paletteRow.remove()),this.options.showAlpha?(this.setupAlphaCanvas(this.element.querySelector(".a-color-picker-a")),this.alphaPointer=this.element.querySelector(".a-color-picker-a+.a-color-picker-dot")):this.element.querySelector(".a-color-picker-alpha").remove(),this.element.style.width=this.options.slBarSize[0]+"px",this.onValueChanged(g,this.options.color)}return i(e,[{key:"setupHueCanvas",value(e){var t=this;e.width=this.options.hueBarSize[0],e.height=this.options.hueBarSize[1];for(var r=e.getContext("2d"),i=r.createLinearGradient(0,0,this.options.hueBarSize[0],0),o=0;1>=o;o+=1/360)i.addColorStop(o,"hsl("+360*o+", 100%, 50%)");r.fillStyle=i,r.fillRect(0,0,this.options.hueBarSize[0],this.options.hueBarSize[1]);var a=r=>{var i=(0,s.limit)(r.clientX-e.getBoundingClientRect().left,0,t.options.hueBarSize[0]),o=Math.round(360*i/t.options.hueBarSize[0]);t.huePointer.style.left=i-7+"px",t.onValueChanged("H",o)},n=function e(){document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",e)};e.addEventListener("mousedown",(e=>{a(e),document.addEventListener("mousemove",a),document.addEventListener("mouseup",n)}))}},{key:"setupSlCanvas",value(e){var t=this;e.width=this.options.slBarSize[0],e.height=this.options.slBarSize[1];var r=r=>{var i=(0,s.limit)(r.clientX-e.getBoundingClientRect().left,0,t.options.slBarSize[0]-1),o=(0,s.limit)(r.clientY-e.getBoundingClientRect().top,0,t.options.slBarSize[1]-1),a=t.slBarHelper.grabColor(i,o);t.slPointer.style.left=i-7+"px",t.slPointer.style.top=o-7+"px",t.onValueChanged("RGB",a)},i=function e(){document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",e)};e.addEventListener("mousedown",(e=>{r(e),document.addEventListener("mousemove",r),document.addEventListener("mouseup",i)}))}},{key:"setupAlphaCanvas",value(e){var t=this;e.width=this.options.alphaBarSize[0],e.height=this.options.alphaBarSize[1];var r=e.getContext("2d"),i=r.createLinearGradient(0,0,e.width-1,0);i.addColorStop(0,"hsla(0, 0%, 50%, 0)"),i.addColorStop(1,"hsla(0, 0%, 50%, 1)"),r.fillStyle=i,r.fillRect(0,0,this.options.alphaBarSize[0],this.options.alphaBarSize[1]);var o=r=>{var i=(0,s.limit)(r.clientX-e.getBoundingClientRect().left,0,t.options.alphaBarSize[0]),o=+(i/t.options.alphaBarSize[0]).toFixed(2);t.alphaPointer.style.left=i-7+"px",t.onValueChanged("ALPHA",o)},a=function e(){document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",e)};e.addEventListener("mousedown",(e=>{o(e),document.addEventListener("mousemove",o),document.addEventListener("mouseup",a)}))}},{key:"setupInput",value(e){var t=this,r=+e.min,i=+e.max,o=e.getAttribute("nameref");e.hasAttribute("select-on-focus")&&e.addEventListener("focus",(()=>{e.select()})),"text"===e.type?e.addEventListener("change",(()=>{t.onValueChanged(o,e.value)})):((p||u)&&e.addEventListener("keydown",(a=>{"Up"===a.key?(e.value=(0,s.limit)(+e.value+1,r,i),t.onValueChanged(o,e.value),a.returnValue=!1):"Down"===a.key&&(e.value=(0,s.limit)(+e.value-1,r,i),t.onValueChanged(o,e.value),a.returnValue=!1)})),e.addEventListener("change",(()=>{t.onValueChanged(o,(0,s.limit)(+e.value,r,i))})))}},{key:"setupClipboard",value(e){var t=this;e.title="click to copy",e.addEventListener("click",(()=>{e.value=(0,s.parseColor)([t.R,t.G,t.B,t.A],"hexcss4"),e.select(),document.execCommand("copy")}))}},{key:"setPalette",value(e){var t=this,r="auto"===this.options.useAlphaInPalette?this.options.showAlpha:this.options.useAlphaInPalette,i=null;switch(this.options.palette){case"PALETTE_MATERIAL_500":i=s.PALETTE_MATERIAL_500;break;case"PALETTE_MATERIAL_CHROME":i=s.PALETTE_MATERIAL_CHROME;break;default:i=(0,s.ensureArray)(this.options.palette)}if(this.options.paletteEditable||i.length>0){var o=(r,i,o)=>{var s=e.querySelector('.a-color-picker-palette-color[data-color="'+r+'"]')||document.createElement("div");s.className="a-color-picker-palette-color",s.style.backgroundColor=r,s.setAttribute("data-color",r),s.title=r,e.insertBefore(s,i),t.palette[r]=!0,o&&t.onPaletteColorAdd(r)},a=(r,i)=>{r?(e.removeChild(r),t.palette[r.getAttribute("data-color")]=!1,i&&t.onPaletteColorRemove(r.getAttribute("data-color"))):(e.querySelectorAll(".a-color-picker-palette-color[data-color]").forEach((t=>{e.removeChild(t)})),Object.keys(t.palette).forEach((e=>{t.palette[e]=!1})),i&&t.onPaletteColorRemove())};if(i.map((e=>(0,s.parseColor)(e,r?"rgbcss4":"hex"))).filter((e=>!!e)).forEach((e=>o(e))),this.options.paletteEditable){var n=document.createElement("div");n.className="a-color-picker-palette-color a-color-picker-palette-add",n.innerHTML="+",e.appendChild(n),e.addEventListener("click",(e=>{/a-color-picker-palette-add/.test(e.target.className)?e.shiftKey?a(null,!0):o(r?(0,s.parseColor)([t.R,t.G,t.B,t.A],"rgbcss4"):(0,s.rgbToHex)(t.R,t.G,t.B),e.target,!0):/a-color-picker-palette-color/.test(e.target.className)&&(e.shiftKey?a(e.target,!0):t.onValueChanged(g,e.target.getAttribute("data-color")))}))}else e.addEventListener("click",(e=>{/a-color-picker-palette-color/.test(e.target.className)&&t.onValueChanged(g,e.target.getAttribute("data-color"))}))}else e.style.display="none"}},{key:"updatePalette",value(e){this.paletteRow.innerHTML="",this.palette={},this.paletteRow.parentElement||this.element.appendChild(this.paletteRow),this.options.palette=e,this.setPalette(this.paletteRow)}},{key:"onValueChanged",value(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{silent:!1};switch(e){case"H":this.H=t;var i=(0,s.hslToRgb)(this.H,this.S,this.L),a=o(i,3);this.R=a[0],this.G=a[1],this.B=a[2],this.slBarHelper.setHue(t),this.updatePointerH(this.H),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"S":this.S=t;var n=(0,s.hslToRgb)(this.H,this.S,this.L),l=o(n,3);this.R=l[0],this.G=l[1],this.B=l[2],this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"L":this.L=t;var h=(0,s.hslToRgb)(this.H,this.S,this.L),c=o(h,3);this.R=c[0],this.G=c[1],this.B=c[2],this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"R":this.R=t;var p=(0,s.rgbToHsl)(this.R,this.G,this.B),u=o(p,3);this.H=u[0],this.S=u[1],this.L=u[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"G":this.G=t;var d=(0,s.rgbToHsl)(this.R,this.G,this.B),f=o(d,3);this.H=f[0],this.S=f[1],this.L=f[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"B":this.B=t;var m=(0,s.rgbToHsl)(this.R,this.G,this.B),A=o(m,3);this.H=A[0],this.S=A[1],this.L=A[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"RGB":var y=o(t,3);this.R=y[0],this.G=y[1],this.B=y[2];var k=(0,s.rgbToHsl)(this.R,this.G,this.B),F=o(k,3);this.H=F[0],this.S=F[1],this.L=F[2],this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case b:var E=o(t,4);this.R=E[0],this.G=E[1],this.B=E[2],this.A=E[3];var H=(0,s.rgbToHsl)(this.R,this.G,this.B),C=o(H,3);this.H=C[0],this.S=C[1],this.L=C[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case v:var B=o(t,4);this.H=B[0],this.S=B[1],this.L=B[2],this.A=B[3];var R=(0,s.hslToRgb)(this.H,this.S,this.L),S=o(R,3);this.R=S[0],this.G=S[1],this.B=S[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case"RGBHEX":var L=(0,s.cssColorToRgb)(t)||[this.R,this.G,this.B],w=o(L,3);this.R=w[0],this.G=w[1],this.B=w[2];var x=(0,s.rgbToHsl)(this.R,this.G,this.B),T=o(x,3);this.H=T[0],this.S=T[1],this.L=T[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B);break;case g:var G=(0,s.parseColor)(t,"rgba")||[0,0,0,1],I=o(G,4);this.R=I[0],this.G=I[1],this.B=I[2],this.A=I[3];var P=(0,s.rgbToHsl)(this.R,this.G,this.B),D=o(P,3);this.H=D[0],this.S=D[1],this.L=D[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case"ALPHA":this.A=t}this.preview.style.backgroundColor=1===this.A?"rgb("+this.R+","+this.G+","+this.B+")":"rgba("+this.R+","+this.G+","+this.B+","+this.A+")",r&&r.silent||this.onchange&&this.onchange(this.preview.style.backgroundColor)}},{key:"onPaletteColorAdd",value(e){this.oncoloradd&&this.oncoloradd(e)}},{key:"onPaletteColorRemove",value(e){this.oncolorremove&&this.oncolorremove(e)}},{key:"updateInputHSL",value(e,t,r){this.options.showHSL&&(this.inputH.value=e,this.inputS.value=t,this.inputL.value=r)}},{key:"updateInputRGB",value(e,t,r){this.options.showRGB&&(this.inputR.value=e,this.inputG.value=t,this.inputB.value=r)}},{key:"updateInputRGBHEX",value(e,t,r){this.options.showHEX&&(this.inputRGBHEX.value=(0,s.rgbToHex)(e,t,r))}},{key:"updatePointerH",value(e){this.huePointer.style.left=this.options.hueBarSize[0]*e/360-7+"px"}},{key:"updatePointerSL",value(e,t,r){var i=(0,s.hslToRgb)(e,t,r),a=o(i,3),n=this.slBarHelper.findColor(a[0],a[1],a[2]),l=o(n,2),h=l[0],c=l[1];h>=0&&(this.slPointer.style.left=h-7+"px",this.slPointer.style.top=c-7+"px")}},{key:"updatePointerA",value(e){this.options.showAlpha&&(this.alphaPointer.style.left=this.options.alphaBarSize[0]*e-7+"px")}}]),e}(),F=function(){function e(t){h(this,e),this.name=t,this.listeners=[]}return i(e,[{key:"on",value(e){e&&this.listeners.push(e)}},{key:"off",value(e){this.listeners=e?this.listeners.filter((t=>t!==e)):[]}},{key:"emit",value(e,t){for(var r=this.listeners.slice(0),i=0;r.length>i;i++)r[i].apply(t,e)}}]),e}();function E(e,t){var r=new k(e,t),i={change:new F("change"),coloradd:new F("coloradd"),colorremove:new F("colorremove")},a=!0,n={},l={get element(){return r.element},get rgb(){return[r.R,r.G,r.B]},set rgb(e){var t=o(e,3),i=t[0],a=t[1],n=t[2],l=[(0,s.limit)(i,0,255),(0,s.limit)(a,0,255),(0,s.limit)(n,0,255)];r.onValueChanged(b,[i=l[0],a=l[1],n=l[2],1])},get hsl(){return[r.H,r.S,r.L]},set hsl(e){var t=o(e,3),i=t[0],a=t[1],n=t[2],l=[(0,s.limit)(i,0,360),(0,s.limit)(a,0,100),(0,s.limit)(n,0,100)];r.onValueChanged(v,[i=l[0],a=l[1],n=l[2],1])},get rgbhex(){return this.all.hex},get rgba(){return[r.R,r.G,r.B,r.A]},set rgba(e){var t=o(e,4),i=t[0],a=t[1],n=t[2],l=t[3],h=[(0,s.limit)(i,0,255),(0,s.limit)(a,0,255),(0,s.limit)(n,0,255),(0,s.limit)(l,0,1)];r.onValueChanged(b,[i=h[0],a=h[1],n=h[2],l=h[3]])},get hsla(){return[r.H,r.S,r.L,r.A]},set hsla(e){var t=o(e,4),i=t[0],a=t[1],n=t[2],l=t[3],h=[(0,s.limit)(i,0,360),(0,s.limit)(a,0,100),(0,s.limit)(n,0,100),(0,s.limit)(l,0,1)];r.onValueChanged(v,[i=h[0],a=h[1],n=h[2],l=h[3]])},get color(){return""+this.all},set color(e){r.onValueChanged(g,e)},setColor(e){r.onValueChanged(g,e,{silent:arguments.length>1&&void 0!==arguments[1]&&arguments[1]})},get all(){if(a){var e=[r.R,r.G,r.B,r.A],t=1>r.A?"rgba("+r.R+","+r.G+","+r.B+","+r.A+")":s.rgbToHex.apply(void 0,e);(n=(0,s.parseColor)(e,n)).toString=()=>t,a=!1}return Object.assign({},n)},get onchange(){return i.change&&i.change.listeners[0]},set onchange(e){this.off("change").on("change",e)},get oncoloradd(){return i.coloradd&&i.coloradd.listeners[0]},set oncoloradd(e){this.off("coloradd").on("coloradd",e)},get oncolorremove(){return i.colorremove&&i.colorremove.listeners[0]},set oncolorremove(e){this.off("colorremove").on("colorremove",e)},get palette(){return Object.keys(r.palette).filter((e=>r.palette[e]))},set palette(e){r.updatePalette(e)},show(){r.element.classList.remove("hidden")},hide(){r.element.classList.add("hidden")},toggle(){r.element.classList.toggle("hidden")},on(e,t){return e&&i[e]&&i[e].on(t),this},off(e,t){return e&&i[e]&&i[e].off(t),this},destroy(){i.change.off(),i.coloradd.off(),i.colorremove.off(),r.element.remove(),i=null,r=null}};return r.onchange=function(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];a=!0,i.change.emit([l].concat(t),l)},r.oncoloradd=function(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];i.coloradd.emit([l].concat(t),l)},r.oncolorremove=function(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];i.colorremove.emit([l].concat(t),l)},r.element.ctrl=l,l}if("undefined"!=typeof window&&!document.querySelector('head>style[data-source="a-color-picker"]')){var H=""+r(5),C=document.createElement("style");C.setAttribute("type","text/css"),C.setAttribute("data-source","a-color-picker"),C.innerHTML=H,document.querySelector("head").appendChild(C)}t.createPicker=E,t.from=function(e,t){var r=(e=>e?Array.isArray(e)?e:e instanceof HTMLElement?[e]:e instanceof NodeList?[].concat(c(e)):"string"==typeof e?[].concat(c(document.querySelectorAll(e))):e.jquery?e.get():[]:[])(e).map(((e,r)=>{var i=E(e,t);return i.index=r,i}));return r.on=function(e,t){return r.forEach((r=>r.on(e,t))),this},r.off=function(e){return r.forEach((t=>t.off(e))),this},r},t.parseColorToRgb=s.parseColorToRgb,t.parseColorToRgba=s.parseColorToRgba,t.parseColorToHsl=s.parseColorToHsl,t.parseColorToHsla=s.parseColorToHsla,t.parseColor=s.parseColor,t.rgbToHex=s.rgbToHex,t.hslToRgb=s.hslToRgb,t.rgbToHsl=s.rgbToHsl,t.rgbToHsv=s.rgbToHsv,t.rgbToInt=s.rgbToInt,t.intToRgb=s.intToRgb,t.getLuminance=s.getLuminance,t.COLOR_NAMES=s.COLOR_NAMES,t.PALETTE_MATERIAL_500=s.PALETTE_MATERIAL_500,t.PALETTE_MATERIAL_CHROME=s.PALETTE_MATERIAL_CHROME,t.VERSION="1.2.1"},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.nvl=t.ensureArray=t.limit=t.getLuminance=t.parseColor=t.parseColorToHsla=t.parseColorToHsl=t.cssHslaToHsla=t.cssHslToHsl=t.parseColorToRgba=t.parseColorToRgb=t.cssRgbaToRgba=t.cssRgbToRgb=t.cssColorToRgba=t.cssColorToRgb=t.intToRgb=t.rgbToInt=t.rgbToHsv=t.rgbToHsl=t.hslToRgb=t.rgbToHex=t.PALETTE_MATERIAL_CHROME=t.PALETTE_MATERIAL_500=t.COLOR_NAMES=void 0;var i=(e,t)=>{if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return((e,t)=>{var r=[],i=!0,o=!1,s=void 0;try{for(var a,n=e[Symbol.iterator]();!(i=(a=n.next()).done)&&(r.push(a.value),!t||r.length!==t);i=!0);}catch(e){o=!0,s=e}finally{try{!i&&n.return&&n.return()}finally{if(o)throw s}}return r})(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=(e=>e&&e.__esModule?e:{default:e})(r(0));function s(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);e.length>t;t++)r[t]=e[t];return r}return Array.from(e)}var a={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",darkgreen:"#006400",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4","indianred ":"#CD5C5C","indigo ":"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",lightgreen:"#90EE90",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"};function n(e,t,r){return isNaN(e=+e)||t>e?t:e>r?r:e}function l(e,t){return null==e?t:e}function h(e,t,r){var i=[n(e,0,255),n(t,0,255),n(r,0,255)];return"#"+("000000"+((e=i[0])<<16|(t=i[1])<<8|(r=i[2])).toString(16)).slice(-6)}function c(e,t,r){var i=void 0,o=void 0,s=void 0,a=[n(e,0,360)/360,n(t,0,100)/100,n(r,0,100)/100];if(e=a[0],r=a[2],0==(t=a[1]))i=o=s=r;else{var l=(e,t,r)=>(0>r&&(r+=1),r>1&&(r-=1),1/6>r?e+6*(t-e)*r:.5>r?t:2/3>r?e+(t-e)*(2/3-r)*6:e),h=.5>r?r*(1+t):r+t-r*t,c=2*r-h;i=l(c,h,e+1/3),o=l(c,h,e),s=l(c,h,e-1/3)}return[255*i,255*o,255*s].map(Math.round)}function p(e,t,r){var i=[n(e,0,255)/255,n(t,0,255)/255,n(r,0,255)/255],o=Math.max(e=i[0],t=i[1],r=i[2]),s=Math.min(e,t,r),a=void 0,l=void 0,h=(o+s)/2;if(o==s)a=l=0;else{var c=o-s;switch(l=h>.5?c/(2-o-s):c/(o+s),o){case e:a=(t-r)/c+(r>t?6:0);break;case t:a=(r-e)/c+2;break;case r:a=(e-t)/c+4}a/=6}return[360*a,100*l,100*h].map(Math.round)}function u(e,t,r){return e<<16|t<<8|r}function d(e){if(e){var t=/^\s*#?((([0-9A-F])([0-9A-F])([0-9A-F]))|(([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})))\s*$/i.exec(a[(""+e).toLowerCase()]||e)||[],r=i(t,10),o=r[3],s=r[4],n=r[5],l=r[7],h=r[8],c=r[9];if(void 0!==o)return[parseInt(o+o,16),parseInt(s+s,16),parseInt(n+n,16)];if(void 0!==l)return[parseInt(l,16),parseInt(h,16),parseInt(c,16)]}}function g(e){if(e){var t=/^\s*#?((([0-9A-F])([0-9A-F])([0-9A-F])([0-9A-F])?)|(([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})?))\s*$/i.exec(a[(""+e).toLowerCase()]||e)||[],r=i(t,12),o=r[3],s=r[4],n=r[5],l=r[6],h=r[8],c=r[9],p=r[10],u=r[11];if(void 0!==o)return[parseInt(o+o,16),parseInt(s+s,16),parseInt(n+n,16),l?+(parseInt(l+l,16)/255).toFixed(2):1];if(void 0!==h)return[parseInt(h,16),parseInt(c,16),parseInt(p,16),u?+(parseInt(u,16)/255).toFixed(2):1]}}function b(e){if(e){var t=/^rgb\((\d+)[\s,](\d+)[\s,](\d+)\)/i.exec(e)||[],r=i(t,4),o=r[2],s=r[3];return r[0]?[n(r[1],0,255),n(o,0,255),n(s,0,255)]:void 0}}function v(e){if(e){var t=/^rgba?\((\d+)\s*[\s,]\s*(\d+)\s*[\s,]\s*(\d+)(\s*[\s,]\s*(\d*(.\d+)?))?\)/i.exec(e)||[],r=i(t,6),o=r[2],s=r[3],a=r[5];return r[0]?[n(r[1],0,255),n(o,0,255),n(s,0,255),n(l(a,1),0,1)]:void 0}}function f(e){if(Array.isArray(e))return[n(e[0],0,255),n(e[1],0,255),n(e[2],0,255),n(l(e[3],1),0,1)];var t=g(e)||v(e);return t&&3===t.length&&t.push(1),t}function m(e){if(e){var t=/^hsl\((\d+)[\s,](\d+)[\s,](\d+)\)/i.exec(e)||[],r=i(t,4),o=r[2],s=r[3];return r[0]?[n(r[1],0,360),n(o,0,100),n(s,0,100)]:void 0}}function A(e){if(e){var t=/^hsla?\((\d+)\s*[\s,]\s*(\d+)\s*[\s,]\s*(\d+)(\s*[\s,]\s*(\d*(.\d+)?))?\)/i.exec(e)||[],r=i(t,6),o=r[2],s=r[3],a=r[5];return r[0]?[n(r[1],0,255),n(o,0,255),n(s,0,255),n(l(a,1),0,1)]:void 0}}function y(e){if(Array.isArray(e))return[n(e[0],0,360),n(e[1],0,100),n(e[2],0,100),n(l(e[3],1),0,1)];var t=A(e);return t&&3===t.length&&t.push(1),t}function k(e,t){switch(t){case"rgb":default:return e.slice(0,3);case"rgbcss":return"rgb("+e[0]+", "+e[1]+", "+e[2]+")";case"rgbcss4":return"rgb("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")";case"rgba":return e;case"rgbacss":return"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")";case"hsl":return p.apply(void 0,s(e));case"hslcss":return"hsl("+(e=p.apply(void 0,s(e)))[0]+", "+e[1]+", "+e[2]+")";case"hslcss4":var r=p.apply(void 0,s(e));return"hsl("+r[0]+", "+r[1]+", "+r[2]+", "+e[3]+")";case"hsla":return[].concat(s(p.apply(void 0,s(e))),[e[3]]);case"hslacss":var i=p.apply(void 0,s(e));return"hsla("+i[0]+", "+i[1]+", "+i[2]+", "+e[3]+")";case"hex":return h.apply(void 0,s(e));case"hexcss4":return h.apply(void 0,s(e))+("00"+parseInt(255*e[3]).toString(16)).slice(-2);case"int":return u.apply(void 0,s(e))}}t.COLOR_NAMES=a,t.PALETTE_MATERIAL_500=["#F44336","#E91E63","#E91E63","#9C27B0","#9C27B0","#673AB7","#673AB7","#3F51B5","#3F51B5","#2196F3","#2196F3","#03A9F4","#03A9F4","#00BCD4","#00BCD4","#009688","#009688","#4CAF50","#4CAF50","#8BC34A","#8BC34A","#CDDC39","#CDDC39","#FFEB3B","#FFEB3B","#FFC107","#FFC107","#FF9800","#FF9800","#FF5722","#FF5722","#795548","#795548","#9E9E9E","#9E9E9E","#607D8B","#607D8B"],t.PALETTE_MATERIAL_CHROME=["#f44336","#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#03a9f4","#00bcd4","#009688","#4caf50","#8bc34a","#cddc39","#ffeb3b","#ffc107","#ff9800","#ff5722","#795548","#9e9e9e","#607d8b"],t.rgbToHex=h,t.hslToRgb=c,t.rgbToHsl=p,t.rgbToHsv=(e,t,r)=>{var i,o=[n(e,0,255)/255,n(t,0,255)/255,n(r,0,255)/255],s=Math.max(e=o[0],t=o[1],r=o[2]),a=Math.min(e,t,r),l=void 0,h=s,c=s-a;if(i=0===s?0:c/s,s==a)l=0;else{switch(s){case e:l=(t-r)/c+(r>t?6:0);break;case t:l=(r-e)/c+2;break;case r:l=(e-t)/c+4}l/=6}return[l,i,h]},t.rgbToInt=u,t.intToRgb=e=>[e>>16&255,e>>8&255,255&e],t.cssColorToRgb=d,t.cssColorToRgba=g,t.cssRgbToRgb=b,t.cssRgbaToRgba=v,t.parseColorToRgb=e=>Array.isArray(e)?e=[n(e[0],0,255),n(e[1],0,255),n(e[2],0,255)]:d(e)||b(e),t.parseColorToRgba=f,t.cssHslToHsl=m,t.cssHslaToHsla=A,t.parseColorToHsl=e=>Array.isArray(e)?e=[n(e[0],0,360),n(e[1],0,100),n(e[2],0,100)]:m(e),t.parseColorToHsla=y,t.parseColor=(e,t)=>{if(t=t||"rgb",null!=e){var r=void 0;if((r=f(e))||(r=y(e))&&(r=[].concat(s(c.apply(void 0,s(r))),[r[3]])))return(0,o.default)(t)?["rgb","rgbcss","rgbcss4","rgba","rgbacss","hsl","hslcss","hslcss4","hsla","hslacss","hex","hexcss4","int"].reduce(((e,t)=>(e[t]=k(r,t),e)),t||{}):k(r,(""+t).toLowerCase())}},t.getLuminance=(e,t,r)=>.2126*(e=.03928>(e/=255)?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t=.03928>(t/=255)?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(.03928>(r/=255)?r/12.92:Math.pow((r+.055)/1.055,2.4)),t.limit=n,t.ensureArray=e=>e?Array.from(e):[],t.nvl=l},(e,t,r)=>{"use strict";e.exports=e=>null!=e&&"object"==typeof e&&!1===Array.isArray(e)},(e,t)=>{e.exports='<div class="a-color-picker-row a-color-picker-stack a-color-picker-row-top"> <canvas class="a-color-picker-sl a-color-picker-transparent"></canvas> <div class=a-color-picker-dot></div> </div> <div class=a-color-picker-row> <div class="a-color-picker-stack a-color-picker-transparent a-color-picker-circle"> <div class=a-color-picker-preview> <input class=a-color-picker-clipbaord type=text> </div> </div> <div class=a-color-picker-column> <div class="a-color-picker-cell a-color-picker-stack"> <canvas class=a-color-picker-h></canvas> <div class=a-color-picker-dot></div> </div> <div class="a-color-picker-cell a-color-picker-alpha a-color-picker-stack" show-on-alpha> <canvas class="a-color-picker-a a-color-picker-transparent"></canvas> <div class=a-color-picker-dot></div> </div> </div> </div> <div class="a-color-picker-row a-color-picker-hsl" show-on-hsl> <label>H</label> <input nameref=H type=number maxlength=3 min=0 max=360 value=0> <label>S</label> <input nameref=S type=number maxlength=3 min=0 max=100 value=0> <label>L</label> <input nameref=L type=number maxlength=3 min=0 max=100 value=0> </div> <div class="a-color-picker-row a-color-picker-rgb" show-on-rgb> <label>R</label> <input nameref=R type=number maxlength=3 min=0 max=255 value=0> <label>G</label> <input nameref=G type=number maxlength=3 min=0 max=255 value=0> <label>B</label> <input nameref=B type=number maxlength=3 min=0 max=255 value=0> </div> <div class="a-color-picker-row a-color-picker-rgbhex a-color-picker-single-input" show-on-single-input> <label>HEX</label> <input nameref=RGBHEX type=text select-on-focus> </div> <div class="a-color-picker-row a-color-picker-palette"></div>'},(e,t,r)=>{var i=r(6);e.exports="string"==typeof i?i:""+i},(e,t,r)=>{(e.exports=r(7)(!1)).push([e.i,"/*!\n * a-color-picker\n * https://github.com/narsenico/a-color-picker\n *\n * Copyright (c) 2017-2018, Gianfranco Caldi.\n * Released under the MIT License.\n */.a-color-picker{background-color:#fff;padding:0;display:inline-flex;flex-direction:column;user-select:none;width:232px;font:400 10px Helvetica,Arial,sans-serif;border-radius:3px;box-shadow:0 0 0 1px rgba(0,0,0,.05),0 2px 4px rgba(0,0,0,.25)}.a-color-picker,.a-color-picker-row,.a-color-picker input{box-sizing:border-box}.a-color-picker-row{padding:15px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;user-select:none}.a-color-picker-row-top{padding:0}.a-color-picker-row:not(:first-child){border-top:1px solid #f5f5f5}.a-color-picker-column{display:flex;flex-direction:column}.a-color-picker-cell{flex:1 1 auto;margin-bottom:4px}.a-color-picker-cell:last-child{margin-bottom:0}.a-color-picker-stack{position:relative}.a-color-picker-dot{position:absolute;width:14px;height:14px;top:0;left:0;background:#fff;pointer-events:none;border-radius:50px;z-index:1000;box-shadow:0 1px 2px rgba(0,0,0,.75)}.a-color-picker-a,.a-color-picker-h,.a-color-picker-sl{cursor:cell}.a-color-picker-a+.a-color-picker-dot,.a-color-picker-h+.a-color-picker-dot{top:-2px}.a-color-picker-a,.a-color-picker-h{border-radius:2px}.a-color-picker-preview{box-sizing:border-box;width:30px;height:30px;user-select:none;border-radius:15px}.a-color-picker-circle{border-radius:50px;border:1px solid #eee}.a-color-picker-hsl,.a-color-picker-rgb,.a-color-picker-single-input{justify-content:space-evenly}.a-color-picker-hsl>label,.a-color-picker-rgb>label,.a-color-picker-single-input>label{padding:0 8px;flex:0 0 auto;color:#969696}.a-color-picker-hsl>input,.a-color-picker-rgb>input,.a-color-picker-single-input>input{text-align:center;padding:2px 0;width:0;flex:1 1 auto;border:1px solid #e0e0e0;line-height:20px}.a-color-picker-hsl>input::-webkit-inner-spin-button,.a-color-picker-rgb>input::-webkit-inner-spin-button,.a-color-picker-single-input>input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.a-color-picker-hsl>input:focus,.a-color-picker-rgb>input:focus,.a-color-picker-single-input>input:focus{border-color:#04a9f4;outline:none}.a-color-picker-transparent{background-image:linear-gradient(-45deg,#cdcdcd 25%,transparent 0),linear-gradient(45deg,#cdcdcd 25%,transparent 0),linear-gradient(-45deg,transparent 75%,#cdcdcd 0),linear-gradient(45deg,transparent 75%,#cdcdcd 0);background-size:11px 11px;background-position:0 0,0 -5.5px,-5.5px 5.5px,5.5px 0}.a-color-picker-sl{border-radius:3px 3px 0 0}.a-color-picker.hide-alpha [show-on-alpha],.a-color-picker.hide-hsl [show-on-hsl],.a-color-picker.hide-rgb [show-on-rgb],.a-color-picker.hide-single-input [show-on-single-input]{display:none}.a-color-picker-clipbaord{width:100%;height:100%;opacity:0;cursor:pointer}.a-color-picker-palette{flex-flow:wrap;flex-direction:row;justify-content:flex-start;padding:10px}.a-color-picker-palette-color{width:15px;height:15px;flex:0 1 15px;margin:3px;box-sizing:border-box;cursor:pointer;border-radius:3px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1)}.a-color-picker-palette-add{text-align:center;line-height:13px;color:#607d8b}.a-color-picker.hidden{display:none}",""])},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((t=>{var r=((e,t)=>{var r=e[1]||"",i=e[3];if(!i)return r;if(t&&"function"==typeof btoa){var o=(e=>"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */")(i),s=i.sources.map((e=>"/*# sourceURL="+i.sourceRoot+e+" */"));return[r].concat(s).concat([o]).join("\n")}return""+r})(t,e);return t[2]?"@media "+t[2]+"{"+r+"}":r})).join("")},t.i=function(e,r){"string"==typeof e&&(e=[[null,e,""]]);for(var i={},o=0;this.length>o;o++){var s=this[o][0];"number"==typeof s&&(i[s]=!0)}for(o=0;e.length>o;o++){var a=e[o];"number"==typeof a[0]&&i[a[0]]||(r&&!a[2]?a[2]=r:r&&(a[2]="("+a[2]+") and ("+r+")"),t.push(a))}},t}}])},201(e,t,r){"use strict";r.r(t),r.d(t,{colorPicker:()=>u});var i=r(169),o=r(56),s=r(4),a=r(26),n=r(36),l=r(13),h=r(202);let c=class extends a.u3{constructor(e,t){super(e);const r=new a.GI(this.jodit);this.trigger.onAction((()=>{t(this.value),r.close()})),r.setMod("padding",!1).setMod("max-height",!1);const i=this.j.create.div(this.getFullElName("picker")),o=h.createPicker(i,{paletteEditable:!0,showAlpha:!0,palette:"PALETTE_MATERIAL_CHROME"}).on("change",((e,t)=>{this.isFocused||(this.value=h.parseColor(t||"","hex"))}));this.j.e.on(this,"change",(()=>{h.parseColor(this.value,"hex")!==o.color&&(o.color=this.value)})),r.setContent(i),this.j.e.on(this.nativeInput,"click",(()=>{r.parentElement=this,r.open((()=>(0,l.position)(this.container)))}))}className(){return"ColorInput"}createContainer(e){const t=super.createContainer(e);return this.trigger=(0,a.zx)(this.j,"ok"),t.appendChild(this.trigger.container),t}};c=(0,i.gn)([n.component],c);var p=r(1);class u extends o.S{constructor(){super(...arguments),this.requires=["license"],this.hasStyle=!0}afterInit(e){e.e.on("afterGenerateColorPicker",this.onAfterGenerateColorPicker)}onAfterGenerateColorPicker(e,t,r,i){s.Dom.detach(t);const o=new c(this.j,r);o.value=i||"#000",t.appendChild(o.container)}beforeDestruct(e){e.e.off("afterGenerateColorPicker",this.onAfterGenerateColorPicker)}}(0,i.gn)([n.autobind],u.prototype,"onAfterGenerateColorPicker",null),p.Jodit.plugins.add("color-picker",u)},169(e,t,r){"use strict";function i(e,t,r,i){var o,s=arguments.length,a=3>s?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(3>s?o(a):s>3?o(t,r,a):o(t,r))||a);return s>3&&a&&Object.defineProperty(t,r,a),a}r.d(t,{gn:()=>i})}},0,[[201,670]]])})); | ||
((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([[652],{203(e){"undefined"!=typeof self&&self,e.exports=(e=>{var t={};function r(i){if(t[i])return t[i].exports;var o=t[i]={i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=(e,t,i)=>{r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=(e,t)=>{if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(i,o,(t=>e[t]).bind(null,o));return i},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,"a",t),t},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.p="",r(r.s=1)})([(e,t,r)=>{"use strict";var i=r(3);function o(e){return!0===i(e)&&"[object Object]"===Object.prototype.toString.call(e)}e.exports=e=>{var t,r;return!1!==o(e)&&"function"==typeof(t=e.constructor)&&!1!==o(r=t.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=t.PALETTE_MATERIAL_CHROME=t.PALETTE_MATERIAL_500=t.COLOR_NAMES=t.getLuminance=t.intToRgb=t.rgbToInt=t.rgbToHsv=t.rgbToHsl=t.hslToRgb=t.rgbToHex=t.parseColor=t.parseColorToHsla=t.parseColorToHsl=t.parseColorToRgba=t.parseColorToRgb=t.from=t.createPicker=void 0;var i=(()=>{function e(e,t){for(var r=0;t.length>r;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return(t,r,i)=>(r&&e(t.prototype,r),i&&e(t,i),t)})(),o=(e,t)=>{if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return((e,t)=>{var r=[],i=!0,o=!1,s=void 0;try{for(var a,n=e[Symbol.iterator]();!(i=(a=n.next()).done)&&(r.push(a.value),!t||r.length!==t);i=!0);}catch(e){o=!0,s=e}finally{try{!i&&n.return&&n.return()}finally{if(o)throw s}}return r})(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},s=r(2),a=l(r(0)),n=l(r(4));function l(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);e.length>t;t++)r[t]=e[t];return r}return Array.from(e)}var p="undefined"!=typeof window&&window.navigator.userAgent.indexOf("Edge")>-1,u="undefined"!=typeof window&&window.navigator.userAgent.indexOf("rv:")>-1,d={id:null,attachTo:"body",showHSL:!0,showRGB:!0,showHEX:!0,showAlpha:!1,color:"#ff0000",palette:null,paletteEditable:!1,useAlphaInPalette:"auto",slBarSize:[232,150],hueBarSize:[150,11],alphaBarSize:[150,11]},g="COLOR",b="RGBA_USER",v="HSLA_USER";function f(e,t,r){return e?e instanceof HTMLElement?e:e instanceof NodeList?e[0]:"string"==typeof e?document.querySelector(e):e.jquery?e.get(0):r?t:null:t}function m(e){var t=e.getContext("2d"),r=+e.width,i=+e.height,a=t.createLinearGradient(1,1,1,i-1);return a.addColorStop(0,"white"),a.addColorStop(1,"black"),{setHue(e){var o=t.createLinearGradient(1,0,r-1,0);o.addColorStop(0,"hsla("+e+", 100%, 50%, 0)"),o.addColorStop(1,"hsla("+e+", 100%, 50%, 1)"),t.fillStyle=a,t.fillRect(0,0,r,i),t.fillStyle=o,t.globalCompositeOperation="multiply",t.fillRect(0,0,r,i),t.globalCompositeOperation="source-over"},grabColor:(e,r)=>t.getImageData(e,r,1,1).data,findColor(e,t,a){var n=(0,s.rgbToHsv)(e,t,a),l=o(n,3);return[l[1]*r,i-l[2]*i]}}}function A(e,t,r){return null===e?t:/^\s*$/.test(e)?r:!!/true|yes|1/i.test(e)||!/false|no|0/i.test(e)&&t}function y(e,t,r){if(null===e)return t;if(/^\s*$/.test(e))return r;var i=e.split(",").map(Number);return 2===i.length&&i[0]&&i[1]?i:t}var k=function(){function e(t,r){if(h(this,e),r?(t=f(t),this.options=Object.assign({},d,r)):t&&(0,a.default)(t)?(this.options=Object.assign({},d,t),t=f(this.options.attachTo)):(this.options=Object.assign({},d),t=f((0,s.nvl)(t,this.options.attachTo))),!t)throw Error("Container not found: "+this.options.attachTo);!function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"acp-";if(t.hasAttribute(r+"show-hsl")&&(e.showHSL=A(t.getAttribute(r+"show-hsl"),d.showHSL,!0)),t.hasAttribute(r+"show-rgb")&&(e.showRGB=A(t.getAttribute(r+"show-rgb"),d.showRGB,!0)),t.hasAttribute(r+"show-hex")&&(e.showHEX=A(t.getAttribute(r+"show-hex"),d.showHEX,!0)),t.hasAttribute(r+"show-alpha")&&(e.showAlpha=A(t.getAttribute(r+"show-alpha"),d.showAlpha,!0)),t.hasAttribute(r+"palette-editable")&&(e.paletteEditable=A(t.getAttribute(r+"palette-editable"),d.paletteEditable,!0)),t.hasAttribute(r+"sl-bar-size")&&(e.slBarSize=y(t.getAttribute(r+"sl-bar-size"),d.slBarSize,[232,150])),t.hasAttribute(r+"hue-bar-size")&&(e.hueBarSize=y(t.getAttribute(r+"hue-bar-size"),d.hueBarSize,[150,11]),e.alphaBarSize=e.hueBarSize),t.hasAttribute(r+"palette")){var i=t.getAttribute(r+"palette");switch(i){case"PALETTE_MATERIAL_500":e.palette=s.PALETTE_MATERIAL_500;break;case"PALETTE_MATERIAL_CHROME":case"":e.palette=s.PALETTE_MATERIAL_CHROME;break;default:e.palette=i.split(/[;|]/)}}t.hasAttribute(r+"color")&&(e.color=t.getAttribute(r+"color"))}(this.options,t),this.H=0,this.S=0,this.L=0,this.R=0,this.G=0,this.B=0,this.A=1,this.palette={},this.element=document.createElement("div"),this.options.id&&(this.element.id=this.options.id),this.element.className="a-color-picker",this.element.innerHTML=n.default,t.appendChild(this.element);var i=this.element.querySelector(".a-color-picker-h");this.setupHueCanvas(i),this.hueBarHelper=m(i),this.huePointer=this.element.querySelector(".a-color-picker-h+.a-color-picker-dot");var o=this.element.querySelector(".a-color-picker-sl");this.setupSlCanvas(o),this.slBarHelper=m(o),this.slPointer=this.element.querySelector(".a-color-picker-sl+.a-color-picker-dot"),this.preview=this.element.querySelector(".a-color-picker-preview"),this.setupClipboard(this.preview.querySelector(".a-color-picker-clipbaord")),this.options.showHSL?(this.setupInput(this.inputH=this.element.querySelector(".a-color-picker-hsl>input[nameref=H]")),this.setupInput(this.inputS=this.element.querySelector(".a-color-picker-hsl>input[nameref=S]")),this.setupInput(this.inputL=this.element.querySelector(".a-color-picker-hsl>input[nameref=L]"))):this.element.querySelector(".a-color-picker-hsl").remove(),this.options.showRGB?(this.setupInput(this.inputR=this.element.querySelector(".a-color-picker-rgb>input[nameref=R]")),this.setupInput(this.inputG=this.element.querySelector(".a-color-picker-rgb>input[nameref=G]")),this.setupInput(this.inputB=this.element.querySelector(".a-color-picker-rgb>input[nameref=B]"))):this.element.querySelector(".a-color-picker-rgb").remove(),this.options.showHEX?this.setupInput(this.inputRGBHEX=this.element.querySelector("input[nameref=RGBHEX]")):this.element.querySelector(".a-color-picker-rgbhex").remove(),this.options.paletteEditable||this.options.palette&&this.options.palette.length>0?this.setPalette(this.paletteRow=this.element.querySelector(".a-color-picker-palette")):(this.paletteRow=this.element.querySelector(".a-color-picker-palette"),this.paletteRow.remove()),this.options.showAlpha?(this.setupAlphaCanvas(this.element.querySelector(".a-color-picker-a")),this.alphaPointer=this.element.querySelector(".a-color-picker-a+.a-color-picker-dot")):this.element.querySelector(".a-color-picker-alpha").remove(),this.element.style.width=this.options.slBarSize[0]+"px",this.onValueChanged(g,this.options.color)}return i(e,[{key:"setupHueCanvas",value(e){var t=this;e.width=this.options.hueBarSize[0],e.height=this.options.hueBarSize[1];for(var r=e.getContext("2d"),i=r.createLinearGradient(0,0,this.options.hueBarSize[0],0),o=0;1>=o;o+=1/360)i.addColorStop(o,"hsl("+360*o+", 100%, 50%)");r.fillStyle=i,r.fillRect(0,0,this.options.hueBarSize[0],this.options.hueBarSize[1]);var a=r=>{var i=(0,s.limit)(r.clientX-e.getBoundingClientRect().left,0,t.options.hueBarSize[0]),o=Math.round(360*i/t.options.hueBarSize[0]);t.huePointer.style.left=i-7+"px",t.onValueChanged("H",o)},n=function e(){document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",e)};e.addEventListener("mousedown",(e=>{a(e),document.addEventListener("mousemove",a),document.addEventListener("mouseup",n)}))}},{key:"setupSlCanvas",value(e){var t=this;e.width=this.options.slBarSize[0],e.height=this.options.slBarSize[1];var r=r=>{var i=(0,s.limit)(r.clientX-e.getBoundingClientRect().left,0,t.options.slBarSize[0]-1),o=(0,s.limit)(r.clientY-e.getBoundingClientRect().top,0,t.options.slBarSize[1]-1),a=t.slBarHelper.grabColor(i,o);t.slPointer.style.left=i-7+"px",t.slPointer.style.top=o-7+"px",t.onValueChanged("RGB",a)},i=function e(){document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",e)};e.addEventListener("mousedown",(e=>{r(e),document.addEventListener("mousemove",r),document.addEventListener("mouseup",i)}))}},{key:"setupAlphaCanvas",value(e){var t=this;e.width=this.options.alphaBarSize[0],e.height=this.options.alphaBarSize[1];var r=e.getContext("2d"),i=r.createLinearGradient(0,0,e.width-1,0);i.addColorStop(0,"hsla(0, 0%, 50%, 0)"),i.addColorStop(1,"hsla(0, 0%, 50%, 1)"),r.fillStyle=i,r.fillRect(0,0,this.options.alphaBarSize[0],this.options.alphaBarSize[1]);var o=r=>{var i=(0,s.limit)(r.clientX-e.getBoundingClientRect().left,0,t.options.alphaBarSize[0]),o=+(i/t.options.alphaBarSize[0]).toFixed(2);t.alphaPointer.style.left=i-7+"px",t.onValueChanged("ALPHA",o)},a=function e(){document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",e)};e.addEventListener("mousedown",(e=>{o(e),document.addEventListener("mousemove",o),document.addEventListener("mouseup",a)}))}},{key:"setupInput",value(e){var t=this,r=+e.min,i=+e.max,o=e.getAttribute("nameref");e.hasAttribute("select-on-focus")&&e.addEventListener("focus",(()=>{e.select()})),"text"===e.type?e.addEventListener("change",(()=>{t.onValueChanged(o,e.value)})):((p||u)&&e.addEventListener("keydown",(a=>{"Up"===a.key?(e.value=(0,s.limit)(+e.value+1,r,i),t.onValueChanged(o,e.value),a.returnValue=!1):"Down"===a.key&&(e.value=(0,s.limit)(+e.value-1,r,i),t.onValueChanged(o,e.value),a.returnValue=!1)})),e.addEventListener("change",(()=>{t.onValueChanged(o,(0,s.limit)(+e.value,r,i))})))}},{key:"setupClipboard",value(e){var t=this;e.title="click to copy",e.addEventListener("click",(()=>{e.value=(0,s.parseColor)([t.R,t.G,t.B,t.A],"hexcss4"),e.select(),document.execCommand("copy")}))}},{key:"setPalette",value(e){var t=this,r="auto"===this.options.useAlphaInPalette?this.options.showAlpha:this.options.useAlphaInPalette,i=null;switch(this.options.palette){case"PALETTE_MATERIAL_500":i=s.PALETTE_MATERIAL_500;break;case"PALETTE_MATERIAL_CHROME":i=s.PALETTE_MATERIAL_CHROME;break;default:i=(0,s.ensureArray)(this.options.palette)}if(this.options.paletteEditable||i.length>0){var o=(r,i,o)=>{var s=e.querySelector('.a-color-picker-palette-color[data-color="'+r+'"]')||document.createElement("div");s.className="a-color-picker-palette-color",s.style.backgroundColor=r,s.setAttribute("data-color",r),s.title=r,e.insertBefore(s,i),t.palette[r]=!0,o&&t.onPaletteColorAdd(r)},a=(r,i)=>{r?(e.removeChild(r),t.palette[r.getAttribute("data-color")]=!1,i&&t.onPaletteColorRemove(r.getAttribute("data-color"))):(e.querySelectorAll(".a-color-picker-palette-color[data-color]").forEach((t=>{e.removeChild(t)})),Object.keys(t.palette).forEach((e=>{t.palette[e]=!1})),i&&t.onPaletteColorRemove())};if(i.map((e=>(0,s.parseColor)(e,r?"rgbcss4":"hex"))).filter((e=>!!e)).forEach((e=>o(e))),this.options.paletteEditable){var n=document.createElement("div");n.className="a-color-picker-palette-color a-color-picker-palette-add",n.innerHTML="+",e.appendChild(n),e.addEventListener("click",(e=>{/a-color-picker-palette-add/.test(e.target.className)?e.shiftKey?a(null,!0):o(r?(0,s.parseColor)([t.R,t.G,t.B,t.A],"rgbcss4"):(0,s.rgbToHex)(t.R,t.G,t.B),e.target,!0):/a-color-picker-palette-color/.test(e.target.className)&&(e.shiftKey?a(e.target,!0):t.onValueChanged(g,e.target.getAttribute("data-color")))}))}else e.addEventListener("click",(e=>{/a-color-picker-palette-color/.test(e.target.className)&&t.onValueChanged(g,e.target.getAttribute("data-color"))}))}else e.style.display="none"}},{key:"updatePalette",value(e){this.paletteRow.innerHTML="",this.palette={},this.paletteRow.parentElement||this.element.appendChild(this.paletteRow),this.options.palette=e,this.setPalette(this.paletteRow)}},{key:"onValueChanged",value(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{silent:!1};switch(e){case"H":this.H=t;var i=(0,s.hslToRgb)(this.H,this.S,this.L),a=o(i,3);this.R=a[0],this.G=a[1],this.B=a[2],this.slBarHelper.setHue(t),this.updatePointerH(this.H),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"S":this.S=t;var n=(0,s.hslToRgb)(this.H,this.S,this.L),l=o(n,3);this.R=l[0],this.G=l[1],this.B=l[2],this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"L":this.L=t;var h=(0,s.hslToRgb)(this.H,this.S,this.L),c=o(h,3);this.R=c[0],this.G=c[1],this.B=c[2],this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"R":this.R=t;var p=(0,s.rgbToHsl)(this.R,this.G,this.B),u=o(p,3);this.H=u[0],this.S=u[1],this.L=u[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"G":this.G=t;var d=(0,s.rgbToHsl)(this.R,this.G,this.B),f=o(d,3);this.H=f[0],this.S=f[1],this.L=f[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"B":this.B=t;var m=(0,s.rgbToHsl)(this.R,this.G,this.B),A=o(m,3);this.H=A[0],this.S=A[1],this.L=A[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"RGB":var y=o(t,3);this.R=y[0],this.G=y[1],this.B=y[2];var k=(0,s.rgbToHsl)(this.R,this.G,this.B),F=o(k,3);this.H=F[0],this.S=F[1],this.L=F[2],this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case b:var E=o(t,4);this.R=E[0],this.G=E[1],this.B=E[2],this.A=E[3];var H=(0,s.rgbToHsl)(this.R,this.G,this.B),C=o(H,3);this.H=C[0],this.S=C[1],this.L=C[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case v:var B=o(t,4);this.H=B[0],this.S=B[1],this.L=B[2],this.A=B[3];var R=(0,s.hslToRgb)(this.H,this.S,this.L),S=o(R,3);this.R=S[0],this.G=S[1],this.B=S[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case"RGBHEX":var L=(0,s.cssColorToRgb)(t)||[this.R,this.G,this.B],w=o(L,3);this.R=w[0],this.G=w[1],this.B=w[2];var x=(0,s.rgbToHsl)(this.R,this.G,this.B),T=o(x,3);this.H=T[0],this.S=T[1],this.L=T[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B);break;case g:var G=(0,s.parseColor)(t,"rgba")||[0,0,0,1],I=o(G,4);this.R=I[0],this.G=I[1],this.B=I[2],this.A=I[3];var P=(0,s.rgbToHsl)(this.R,this.G,this.B),D=o(P,3);this.H=D[0],this.S=D[1],this.L=D[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case"ALPHA":this.A=t}this.preview.style.backgroundColor=1===this.A?"rgb("+this.R+","+this.G+","+this.B+")":"rgba("+this.R+","+this.G+","+this.B+","+this.A+")",r&&r.silent||this.onchange&&this.onchange(this.preview.style.backgroundColor)}},{key:"onPaletteColorAdd",value(e){this.oncoloradd&&this.oncoloradd(e)}},{key:"onPaletteColorRemove",value(e){this.oncolorremove&&this.oncolorremove(e)}},{key:"updateInputHSL",value(e,t,r){this.options.showHSL&&(this.inputH.value=e,this.inputS.value=t,this.inputL.value=r)}},{key:"updateInputRGB",value(e,t,r){this.options.showRGB&&(this.inputR.value=e,this.inputG.value=t,this.inputB.value=r)}},{key:"updateInputRGBHEX",value(e,t,r){this.options.showHEX&&(this.inputRGBHEX.value=(0,s.rgbToHex)(e,t,r))}},{key:"updatePointerH",value(e){this.huePointer.style.left=this.options.hueBarSize[0]*e/360-7+"px"}},{key:"updatePointerSL",value(e,t,r){var i=(0,s.hslToRgb)(e,t,r),a=o(i,3),n=this.slBarHelper.findColor(a[0],a[1],a[2]),l=o(n,2),h=l[0],c=l[1];h>=0&&(this.slPointer.style.left=h-7+"px",this.slPointer.style.top=c-7+"px")}},{key:"updatePointerA",value(e){this.options.showAlpha&&(this.alphaPointer.style.left=this.options.alphaBarSize[0]*e-7+"px")}}]),e}(),F=function(){function e(t){h(this,e),this.name=t,this.listeners=[]}return i(e,[{key:"on",value(e){e&&this.listeners.push(e)}},{key:"off",value(e){this.listeners=e?this.listeners.filter((t=>t!==e)):[]}},{key:"emit",value(e,t){for(var r=this.listeners.slice(0),i=0;r.length>i;i++)r[i].apply(t,e)}}]),e}();function E(e,t){var r=new k(e,t),i={change:new F("change"),coloradd:new F("coloradd"),colorremove:new F("colorremove")},a=!0,n={},l={get element(){return r.element},get rgb(){return[r.R,r.G,r.B]},set rgb(e){var t=o(e,3),i=t[0],a=t[1],n=t[2],l=[(0,s.limit)(i,0,255),(0,s.limit)(a,0,255),(0,s.limit)(n,0,255)];r.onValueChanged(b,[i=l[0],a=l[1],n=l[2],1])},get hsl(){return[r.H,r.S,r.L]},set hsl(e){var t=o(e,3),i=t[0],a=t[1],n=t[2],l=[(0,s.limit)(i,0,360),(0,s.limit)(a,0,100),(0,s.limit)(n,0,100)];r.onValueChanged(v,[i=l[0],a=l[1],n=l[2],1])},get rgbhex(){return this.all.hex},get rgba(){return[r.R,r.G,r.B,r.A]},set rgba(e){var t=o(e,4),i=t[0],a=t[1],n=t[2],l=t[3],h=[(0,s.limit)(i,0,255),(0,s.limit)(a,0,255),(0,s.limit)(n,0,255),(0,s.limit)(l,0,1)];r.onValueChanged(b,[i=h[0],a=h[1],n=h[2],l=h[3]])},get hsla(){return[r.H,r.S,r.L,r.A]},set hsla(e){var t=o(e,4),i=t[0],a=t[1],n=t[2],l=t[3],h=[(0,s.limit)(i,0,360),(0,s.limit)(a,0,100),(0,s.limit)(n,0,100),(0,s.limit)(l,0,1)];r.onValueChanged(v,[i=h[0],a=h[1],n=h[2],l=h[3]])},get color(){return""+this.all},set color(e){r.onValueChanged(g,e)},setColor(e){r.onValueChanged(g,e,{silent:arguments.length>1&&void 0!==arguments[1]&&arguments[1]})},get all(){if(a){var e=[r.R,r.G,r.B,r.A],t=1>r.A?"rgba("+r.R+","+r.G+","+r.B+","+r.A+")":s.rgbToHex.apply(void 0,e);(n=(0,s.parseColor)(e,n)).toString=()=>t,a=!1}return Object.assign({},n)},get onchange(){return i.change&&i.change.listeners[0]},set onchange(e){this.off("change").on("change",e)},get oncoloradd(){return i.coloradd&&i.coloradd.listeners[0]},set oncoloradd(e){this.off("coloradd").on("coloradd",e)},get oncolorremove(){return i.colorremove&&i.colorremove.listeners[0]},set oncolorremove(e){this.off("colorremove").on("colorremove",e)},get palette(){return Object.keys(r.palette).filter((e=>r.palette[e]))},set palette(e){r.updatePalette(e)},show(){r.element.classList.remove("hidden")},hide(){r.element.classList.add("hidden")},toggle(){r.element.classList.toggle("hidden")},on(e,t){return e&&i[e]&&i[e].on(t),this},off(e,t){return e&&i[e]&&i[e].off(t),this},destroy(){i.change.off(),i.coloradd.off(),i.colorremove.off(),r.element.remove(),i=null,r=null}};return r.onchange=function(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];a=!0,i.change.emit([l].concat(t),l)},r.oncoloradd=function(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];i.coloradd.emit([l].concat(t),l)},r.oncolorremove=function(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];i.colorremove.emit([l].concat(t),l)},r.element.ctrl=l,l}if("undefined"!=typeof window&&!document.querySelector('head>style[data-source="a-color-picker"]')){var H=""+r(5),C=document.createElement("style");C.setAttribute("type","text/css"),C.setAttribute("data-source","a-color-picker"),C.innerHTML=H,document.querySelector("head").appendChild(C)}t.createPicker=E,t.from=function(e,t){var r=(e=>e?Array.isArray(e)?e:e instanceof HTMLElement?[e]:e instanceof NodeList?[].concat(c(e)):"string"==typeof e?[].concat(c(document.querySelectorAll(e))):e.jquery?e.get():[]:[])(e).map(((e,r)=>{var i=E(e,t);return i.index=r,i}));return r.on=function(e,t){return r.forEach((r=>r.on(e,t))),this},r.off=function(e){return r.forEach((t=>t.off(e))),this},r},t.parseColorToRgb=s.parseColorToRgb,t.parseColorToRgba=s.parseColorToRgba,t.parseColorToHsl=s.parseColorToHsl,t.parseColorToHsla=s.parseColorToHsla,t.parseColor=s.parseColor,t.rgbToHex=s.rgbToHex,t.hslToRgb=s.hslToRgb,t.rgbToHsl=s.rgbToHsl,t.rgbToHsv=s.rgbToHsv,t.rgbToInt=s.rgbToInt,t.intToRgb=s.intToRgb,t.getLuminance=s.getLuminance,t.COLOR_NAMES=s.COLOR_NAMES,t.PALETTE_MATERIAL_500=s.PALETTE_MATERIAL_500,t.PALETTE_MATERIAL_CHROME=s.PALETTE_MATERIAL_CHROME,t.VERSION="1.2.1"},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.nvl=t.ensureArray=t.limit=t.getLuminance=t.parseColor=t.parseColorToHsla=t.parseColorToHsl=t.cssHslaToHsla=t.cssHslToHsl=t.parseColorToRgba=t.parseColorToRgb=t.cssRgbaToRgba=t.cssRgbToRgb=t.cssColorToRgba=t.cssColorToRgb=t.intToRgb=t.rgbToInt=t.rgbToHsv=t.rgbToHsl=t.hslToRgb=t.rgbToHex=t.PALETTE_MATERIAL_CHROME=t.PALETTE_MATERIAL_500=t.COLOR_NAMES=void 0;var i=(e,t)=>{if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return((e,t)=>{var r=[],i=!0,o=!1,s=void 0;try{for(var a,n=e[Symbol.iterator]();!(i=(a=n.next()).done)&&(r.push(a.value),!t||r.length!==t);i=!0);}catch(e){o=!0,s=e}finally{try{!i&&n.return&&n.return()}finally{if(o)throw s}}return r})(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=(e=>e&&e.__esModule?e:{default:e})(r(0));function s(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);e.length>t;t++)r[t]=e[t];return r}return Array.from(e)}var a={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",darkgreen:"#006400",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4","indianred ":"#CD5C5C","indigo ":"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",lightgreen:"#90EE90",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"};function n(e,t,r){return isNaN(e=+e)||t>e?t:e>r?r:e}function l(e,t){return null==e?t:e}function h(e,t,r){var i=[n(e,0,255),n(t,0,255),n(r,0,255)];return"#"+("000000"+((e=i[0])<<16|(t=i[1])<<8|(r=i[2])).toString(16)).slice(-6)}function c(e,t,r){var i=void 0,o=void 0,s=void 0,a=[n(e,0,360)/360,n(t,0,100)/100,n(r,0,100)/100];if(e=a[0],r=a[2],0==(t=a[1]))i=o=s=r;else{var l=(e,t,r)=>(0>r&&(r+=1),r>1&&(r-=1),1/6>r?e+6*(t-e)*r:.5>r?t:2/3>r?e+(t-e)*(2/3-r)*6:e),h=.5>r?r*(1+t):r+t-r*t,c=2*r-h;i=l(c,h,e+1/3),o=l(c,h,e),s=l(c,h,e-1/3)}return[255*i,255*o,255*s].map(Math.round)}function p(e,t,r){var i=[n(e,0,255)/255,n(t,0,255)/255,n(r,0,255)/255],o=Math.max(e=i[0],t=i[1],r=i[2]),s=Math.min(e,t,r),a=void 0,l=void 0,h=(o+s)/2;if(o==s)a=l=0;else{var c=o-s;switch(l=h>.5?c/(2-o-s):c/(o+s),o){case e:a=(t-r)/c+(r>t?6:0);break;case t:a=(r-e)/c+2;break;case r:a=(e-t)/c+4}a/=6}return[360*a,100*l,100*h].map(Math.round)}function u(e,t,r){return e<<16|t<<8|r}function d(e){if(e){var t=/^\s*#?((([0-9A-F])([0-9A-F])([0-9A-F]))|(([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})))\s*$/i.exec(a[(""+e).toLowerCase()]||e)||[],r=i(t,10),o=r[3],s=r[4],n=r[5],l=r[7],h=r[8],c=r[9];if(void 0!==o)return[parseInt(o+o,16),parseInt(s+s,16),parseInt(n+n,16)];if(void 0!==l)return[parseInt(l,16),parseInt(h,16),parseInt(c,16)]}}function g(e){if(e){var t=/^\s*#?((([0-9A-F])([0-9A-F])([0-9A-F])([0-9A-F])?)|(([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})?))\s*$/i.exec(a[(""+e).toLowerCase()]||e)||[],r=i(t,12),o=r[3],s=r[4],n=r[5],l=r[6],h=r[8],c=r[9],p=r[10],u=r[11];if(void 0!==o)return[parseInt(o+o,16),parseInt(s+s,16),parseInt(n+n,16),l?+(parseInt(l+l,16)/255).toFixed(2):1];if(void 0!==h)return[parseInt(h,16),parseInt(c,16),parseInt(p,16),u?+(parseInt(u,16)/255).toFixed(2):1]}}function b(e){if(e){var t=/^rgb\((\d+)[\s,](\d+)[\s,](\d+)\)/i.exec(e)||[],r=i(t,4),o=r[2],s=r[3];return r[0]?[n(r[1],0,255),n(o,0,255),n(s,0,255)]:void 0}}function v(e){if(e){var t=/^rgba?\((\d+)\s*[\s,]\s*(\d+)\s*[\s,]\s*(\d+)(\s*[\s,]\s*(\d*(.\d+)?))?\)/i.exec(e)||[],r=i(t,6),o=r[2],s=r[3],a=r[5];return r[0]?[n(r[1],0,255),n(o,0,255),n(s,0,255),n(l(a,1),0,1)]:void 0}}function f(e){if(Array.isArray(e))return[n(e[0],0,255),n(e[1],0,255),n(e[2],0,255),n(l(e[3],1),0,1)];var t=g(e)||v(e);return t&&3===t.length&&t.push(1),t}function m(e){if(e){var t=/^hsl\((\d+)[\s,](\d+)[\s,](\d+)\)/i.exec(e)||[],r=i(t,4),o=r[2],s=r[3];return r[0]?[n(r[1],0,360),n(o,0,100),n(s,0,100)]:void 0}}function A(e){if(e){var t=/^hsla?\((\d+)\s*[\s,]\s*(\d+)\s*[\s,]\s*(\d+)(\s*[\s,]\s*(\d*(.\d+)?))?\)/i.exec(e)||[],r=i(t,6),o=r[2],s=r[3],a=r[5];return r[0]?[n(r[1],0,255),n(o,0,255),n(s,0,255),n(l(a,1),0,1)]:void 0}}function y(e){if(Array.isArray(e))return[n(e[0],0,360),n(e[1],0,100),n(e[2],0,100),n(l(e[3],1),0,1)];var t=A(e);return t&&3===t.length&&t.push(1),t}function k(e,t){switch(t){case"rgb":default:return e.slice(0,3);case"rgbcss":return"rgb("+e[0]+", "+e[1]+", "+e[2]+")";case"rgbcss4":return"rgb("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")";case"rgba":return e;case"rgbacss":return"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")";case"hsl":return p.apply(void 0,s(e));case"hslcss":return"hsl("+(e=p.apply(void 0,s(e)))[0]+", "+e[1]+", "+e[2]+")";case"hslcss4":var r=p.apply(void 0,s(e));return"hsl("+r[0]+", "+r[1]+", "+r[2]+", "+e[3]+")";case"hsla":return[].concat(s(p.apply(void 0,s(e))),[e[3]]);case"hslacss":var i=p.apply(void 0,s(e));return"hsla("+i[0]+", "+i[1]+", "+i[2]+", "+e[3]+")";case"hex":return h.apply(void 0,s(e));case"hexcss4":return h.apply(void 0,s(e))+("00"+parseInt(255*e[3]).toString(16)).slice(-2);case"int":return u.apply(void 0,s(e))}}t.COLOR_NAMES=a,t.PALETTE_MATERIAL_500=["#F44336","#E91E63","#E91E63","#9C27B0","#9C27B0","#673AB7","#673AB7","#3F51B5","#3F51B5","#2196F3","#2196F3","#03A9F4","#03A9F4","#00BCD4","#00BCD4","#009688","#009688","#4CAF50","#4CAF50","#8BC34A","#8BC34A","#CDDC39","#CDDC39","#FFEB3B","#FFEB3B","#FFC107","#FFC107","#FF9800","#FF9800","#FF5722","#FF5722","#795548","#795548","#9E9E9E","#9E9E9E","#607D8B","#607D8B"],t.PALETTE_MATERIAL_CHROME=["#f44336","#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#03a9f4","#00bcd4","#009688","#4caf50","#8bc34a","#cddc39","#ffeb3b","#ffc107","#ff9800","#ff5722","#795548","#9e9e9e","#607d8b"],t.rgbToHex=h,t.hslToRgb=c,t.rgbToHsl=p,t.rgbToHsv=(e,t,r)=>{var i,o=[n(e,0,255)/255,n(t,0,255)/255,n(r,0,255)/255],s=Math.max(e=o[0],t=o[1],r=o[2]),a=Math.min(e,t,r),l=void 0,h=s,c=s-a;if(i=0===s?0:c/s,s==a)l=0;else{switch(s){case e:l=(t-r)/c+(r>t?6:0);break;case t:l=(r-e)/c+2;break;case r:l=(e-t)/c+4}l/=6}return[l,i,h]},t.rgbToInt=u,t.intToRgb=e=>[e>>16&255,e>>8&255,255&e],t.cssColorToRgb=d,t.cssColorToRgba=g,t.cssRgbToRgb=b,t.cssRgbaToRgba=v,t.parseColorToRgb=e=>Array.isArray(e)?e=[n(e[0],0,255),n(e[1],0,255),n(e[2],0,255)]:d(e)||b(e),t.parseColorToRgba=f,t.cssHslToHsl=m,t.cssHslaToHsla=A,t.parseColorToHsl=e=>Array.isArray(e)?e=[n(e[0],0,360),n(e[1],0,100),n(e[2],0,100)]:m(e),t.parseColorToHsla=y,t.parseColor=(e,t)=>{if(t=t||"rgb",null!=e){var r=void 0;if((r=f(e))||(r=y(e))&&(r=[].concat(s(c.apply(void 0,s(r))),[r[3]])))return(0,o.default)(t)?["rgb","rgbcss","rgbcss4","rgba","rgbacss","hsl","hslcss","hslcss4","hsla","hslacss","hex","hexcss4","int"].reduce(((e,t)=>(e[t]=k(r,t),e)),t||{}):k(r,(""+t).toLowerCase())}},t.getLuminance=(e,t,r)=>.2126*(e=.03928>(e/=255)?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t=.03928>(t/=255)?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(.03928>(r/=255)?r/12.92:Math.pow((r+.055)/1.055,2.4)),t.limit=n,t.ensureArray=e=>e?Array.from(e):[],t.nvl=l},(e,t,r)=>{"use strict";e.exports=e=>null!=e&&"object"==typeof e&&!1===Array.isArray(e)},(e,t)=>{e.exports='<div class="a-color-picker-row a-color-picker-stack a-color-picker-row-top"> <canvas class="a-color-picker-sl a-color-picker-transparent"></canvas> <div class=a-color-picker-dot></div> </div> <div class=a-color-picker-row> <div class="a-color-picker-stack a-color-picker-transparent a-color-picker-circle"> <div class=a-color-picker-preview> <input class=a-color-picker-clipbaord type=text> </div> </div> <div class=a-color-picker-column> <div class="a-color-picker-cell a-color-picker-stack"> <canvas class=a-color-picker-h></canvas> <div class=a-color-picker-dot></div> </div> <div class="a-color-picker-cell a-color-picker-alpha a-color-picker-stack" show-on-alpha> <canvas class="a-color-picker-a a-color-picker-transparent"></canvas> <div class=a-color-picker-dot></div> </div> </div> </div> <div class="a-color-picker-row a-color-picker-hsl" show-on-hsl> <label>H</label> <input nameref=H type=number maxlength=3 min=0 max=360 value=0> <label>S</label> <input nameref=S type=number maxlength=3 min=0 max=100 value=0> <label>L</label> <input nameref=L type=number maxlength=3 min=0 max=100 value=0> </div> <div class="a-color-picker-row a-color-picker-rgb" show-on-rgb> <label>R</label> <input nameref=R type=number maxlength=3 min=0 max=255 value=0> <label>G</label> <input nameref=G type=number maxlength=3 min=0 max=255 value=0> <label>B</label> <input nameref=B type=number maxlength=3 min=0 max=255 value=0> </div> <div class="a-color-picker-row a-color-picker-rgbhex a-color-picker-single-input" show-on-single-input> <label>HEX</label> <input nameref=RGBHEX type=text select-on-focus> </div> <div class="a-color-picker-row a-color-picker-palette"></div>'},(e,t,r)=>{var i=r(6);e.exports="string"==typeof i?i:""+i},(e,t,r)=>{(e.exports=r(7)(!1)).push([e.i,"/*!\n * a-color-picker\n * https://github.com/narsenico/a-color-picker\n *\n * Copyright (c) 2017-2018, Gianfranco Caldi.\n * Released under the MIT License.\n */.a-color-picker{background-color:#fff;padding:0;display:inline-flex;flex-direction:column;user-select:none;width:232px;font:400 10px Helvetica,Arial,sans-serif;border-radius:3px;box-shadow:0 0 0 1px rgba(0,0,0,.05),0 2px 4px rgba(0,0,0,.25)}.a-color-picker,.a-color-picker-row,.a-color-picker input{box-sizing:border-box}.a-color-picker-row{padding:15px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;user-select:none}.a-color-picker-row-top{padding:0}.a-color-picker-row:not(:first-child){border-top:1px solid #f5f5f5}.a-color-picker-column{display:flex;flex-direction:column}.a-color-picker-cell{flex:1 1 auto;margin-bottom:4px}.a-color-picker-cell:last-child{margin-bottom:0}.a-color-picker-stack{position:relative}.a-color-picker-dot{position:absolute;width:14px;height:14px;top:0;left:0;background:#fff;pointer-events:none;border-radius:50px;z-index:1000;box-shadow:0 1px 2px rgba(0,0,0,.75)}.a-color-picker-a,.a-color-picker-h,.a-color-picker-sl{cursor:cell}.a-color-picker-a+.a-color-picker-dot,.a-color-picker-h+.a-color-picker-dot{top:-2px}.a-color-picker-a,.a-color-picker-h{border-radius:2px}.a-color-picker-preview{box-sizing:border-box;width:30px;height:30px;user-select:none;border-radius:15px}.a-color-picker-circle{border-radius:50px;border:1px solid #eee}.a-color-picker-hsl,.a-color-picker-rgb,.a-color-picker-single-input{justify-content:space-evenly}.a-color-picker-hsl>label,.a-color-picker-rgb>label,.a-color-picker-single-input>label{padding:0 8px;flex:0 0 auto;color:#969696}.a-color-picker-hsl>input,.a-color-picker-rgb>input,.a-color-picker-single-input>input{text-align:center;padding:2px 0;width:0;flex:1 1 auto;border:1px solid #e0e0e0;line-height:20px}.a-color-picker-hsl>input::-webkit-inner-spin-button,.a-color-picker-rgb>input::-webkit-inner-spin-button,.a-color-picker-single-input>input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.a-color-picker-hsl>input:focus,.a-color-picker-rgb>input:focus,.a-color-picker-single-input>input:focus{border-color:#04a9f4;outline:none}.a-color-picker-transparent{background-image:linear-gradient(-45deg,#cdcdcd 25%,transparent 0),linear-gradient(45deg,#cdcdcd 25%,transparent 0),linear-gradient(-45deg,transparent 75%,#cdcdcd 0),linear-gradient(45deg,transparent 75%,#cdcdcd 0);background-size:11px 11px;background-position:0 0,0 -5.5px,-5.5px 5.5px,5.5px 0}.a-color-picker-sl{border-radius:3px 3px 0 0}.a-color-picker.hide-alpha [show-on-alpha],.a-color-picker.hide-hsl [show-on-hsl],.a-color-picker.hide-rgb [show-on-rgb],.a-color-picker.hide-single-input [show-on-single-input]{display:none}.a-color-picker-clipbaord{width:100%;height:100%;opacity:0;cursor:pointer}.a-color-picker-palette{flex-flow:wrap;flex-direction:row;justify-content:flex-start;padding:10px}.a-color-picker-palette-color{width:15px;height:15px;flex:0 1 15px;margin:3px;box-sizing:border-box;cursor:pointer;border-radius:3px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1)}.a-color-picker-palette-add{text-align:center;line-height:13px;color:#607d8b}.a-color-picker.hidden{display:none}",""])},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((t=>{var r=((e,t)=>{var r=e[1]||"",i=e[3];if(!i)return r;if(t&&"function"==typeof btoa){var o=(e=>"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */")(i),s=i.sources.map((e=>"/*# sourceURL="+i.sourceRoot+e+" */"));return[r].concat(s).concat([o]).join("\n")}return""+r})(t,e);return t[2]?"@media "+t[2]+"{"+r+"}":r})).join("")},t.i=function(e,r){"string"==typeof e&&(e=[[null,e,""]]);for(var i={},o=0;this.length>o;o++){var s=this[o][0];"number"==typeof s&&(i[s]=!0)}for(o=0;e.length>o;o++){var a=e[o];"number"==typeof a[0]&&i[a[0]]||(r&&!a[2]?a[2]=r:r&&(a[2]="("+a[2]+") and ("+r+")"),t.push(a))}},t}}])},202(e,t,r){"use strict";r.r(t),r.d(t,{colorPicker:()=>u});var i=r(170),o=r(56),s=r(4),a=r(26),n=r(36),l=r(13),h=r(203);let c=class extends a.u3{constructor(e,t){super(e);const r=new a.GI(this.jodit);this.trigger.onAction((()=>{t(this.value),r.close()})),r.setMod("padding",!1).setMod("max-height",!1);const i=this.j.create.div(this.getFullElName("picker")),o=h.createPicker(i,{paletteEditable:!0,showAlpha:!0,palette:"PALETTE_MATERIAL_CHROME"}).on("change",((e,t)=>{this.isFocused||(this.value=h.parseColor(t||"","hex"))}));this.j.e.on(this,"change",(()=>{h.parseColor(this.value,"hex")!==o.color&&(o.color=this.value)})),r.setContent(i),this.j.e.on(this.nativeInput,"click",(()=>{r.parentElement=this,r.open((()=>(0,l.position)(this.container)))}))}className(){return"ColorInput"}createContainer(e){const t=super.createContainer(e);return this.trigger=(0,a.zx)(this.j,"ok"),t.appendChild(this.trigger.container),t}};c=(0,i.gn)([n.component],c);var p=r(1);class u extends o.S{constructor(){super(...arguments),this.requires=["license"],this.hasStyle=!0}afterInit(e){e.e.on("afterGenerateColorPicker",this.onAfterGenerateColorPicker)}onAfterGenerateColorPicker(e,t,r,i){s.Dom.detach(t);const o=new c(this.j,r);o.value=i||"#000",t.appendChild(o.container)}beforeDestruct(e){e.e.off("afterGenerateColorPicker",this.onAfterGenerateColorPicker)}}(0,i.gn)([n.autobind],u.prototype,"onAfterGenerateColorPicker",null),p.Jodit.plugins.add("color-picker",u)},170(e,t,r){"use strict";function i(e,t,r,i){var o,s=arguments.length,a=3>s?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(3>s?o(a):s>3?o(t,r,a):o(t,r))||a);return s>3&&a&&Object.defineProperty(t,r,a),a}r.d(t,{gn:()=>i})}},0,[[202,670]]])})); |
/*! | ||
* jodit-pro - PRO Version of Jodit Editor | ||
* Author: Chupurnov Valeriy <chupurnov@gmail.com> | ||
* Version: v1.0.10 | ||
* Version: v1.0.12 | ||
* Url: https://xdsoft.net/jodit/pro/ | ||
@@ -10,2 +10,2 @@ * License(s): SEE LICENSE IN LICENSE.MD | ||
!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],{432:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileBrowserPro=void 0;var n=o(1);o(433),o(434);var r=o(15),s=o(169),i=o(437),a=o(27),c=o(104),l=o(14),u=o(464),h=o(465),d=o(202),p=o(13),f=o(467),v=o(196),m=o(469),g=o(470),y=o(471),_=o(474),w=function(e){function t(t){var o=e.call(this,a.ConfigProto(Object.assign(t||{},{resizable:!0,draggable:!0,toolbarButtons:null==t?void 0:t.buttons,buttons:Jodit.atom(["filebrowser.settings","fullsize","dialog.close"])}),p.Config.defaultOptions.filebrowser))||this;return o.dataProvider=v.makeDataProvider(o,o.options),o.state=r.ObserveObject.create({onSelectCallBack:function(){},theme:"default",showSideBar:!0,showFavorites:!0,showSettings:!1,withFolders:!0,foldersPosition:"bottom",info:"",currentPath:"",currentSource:"",currentBaseUrl:"",history:[],historyIndex:0,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.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 i.UIBrowserPanel(o,o.stateManager),o.progressbar=new f.UIProgress(o,o.stateManager.state),o.offset=0,o.countInOneChunk=20,o.stopLoadingParts=!1,!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}return 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: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.onResizeWindow=function(){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.open=function(t,o){return n.__awaiter(this,void 0,Promise,(function(){return n.__generator(this,(function(o){return this.prepareOpening(t),e.prototype.open.call(this,this.panel.container),[2,this.onUpdateFileBrowser()]}))}))},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.onUpdateFileBrowser=function(){return n.__awaiter(this,void 0,Promise,(function(){return n.__generator(this,(function(e){switch(e.label){case 0:return this.state.activeElements=[],this.panel.setMod("loading",!0),[4,Promise.all([this.loadFolders(),this.loadItems()])];case 1:return e.sent(),this.panel.setMod("loading",!1),this.historyManager.updateHistory(),[2]}}))}))},t.prototype.loadFolders=function(){return n.__awaiter(this,void 0,Promise,(function(){var e,t,o,r,s;return n.__generator(this,(function(n){switch(n.label){case 0:if(!this.isOpened)return[2];t=(e=this.state).currentPath,o=e.currentSource,this.historyManager.push(),n.label=1;case 1:return n.trys.push([1,3,,4]),this.uploader.setPath(t),this.uploader.setSource(o),[4,this.dataProvider.tree(t,o)];case 2:return r=n.sent(),this.stateManager.fillSources(r,t),this.historyManager.updateHistory(),this.state.sources=r,[3,4];case 3:return s=n.sent(),this.status(s),[3,4];case 4:return[2]}}))}))},t.prototype.loadItems=function(){return n.__awaiter(this,void 0,Promise,(function(){var e,t;return n.__generator(this,(function(o){switch(o.label){case 0:if(!this.isOpened)return[2];o.label=1;case 1:return o.trys.push([1,6,,7]),this.offset=0,this.stopLoadingParts=!1,e=this.state,[4,this.loadPartItems()];case 2:e.elements=o.sent(),this.stopLoadingParts=this.countInOneChunk>this.state.elements.length,o.label=3;case 3:return this.stopLoadingParts||this.state.elements.length>=this.panel.countInColumn*this.panel.countInRow?[3,5]:[4,this.loadItemsChunk()];case 4:return o.sent(),[3,3];case 5:return this.historyManager.updateHistory(),[3,7];case 6:return t=o.sent(),this.status(t),[3,7];case 7:return[2]}}))}))},t.prototype.loadItemsChunk=function(){return n.__awaiter(this,void 0,Promise,(function(){var e,t;return 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.state.elements=this.state.elements.concat(e)),[3,4];case 3:return t=o.sent(),this.status(t),[3,4];case 4:return[2]}}))}))},t.prototype.prepareOpening=function(e){var t=this;this.registerGlobalListeners(),this.state.onSelectCallBack=function(o){t.close(),null==e||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,s=this.state.lastSelectedIndex,i=void 0;if([l.KEY_RIGHT,l.KEY_LEFT].includes(e.key))i=n?o[s+1]?s+1:0:o[s-1]?s-1:o.length-1;else{var a=this.panel.countInRow;i=Math.round(((s+1)/a+(n?1:-1))*a-1)}return o[i]&&this.stateManager.addActive(o[i],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&&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(){return e.loadItems()}))}})).bindDestruct(this)},t.prototype.onFileEdit=function(){if(1===this.state.activeElements.length){var e=this.state.activeElements[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;r.Prompt(this.i18n("Enter new name"),this.i18n("Rename"),(function(o){if(!a.isValidName(o)||o===e.name)return t.status(t.i18n("Enter new name")),!1;t.dataProvider.folderRename(_.parentPath(e.path),e.name,o,e.sourceName).then((function(n){t.state.activeElements=[],t.status(n,!0),t.state.currentPath=_.parentPath(e.path)+"/"+o,t.state.currentSource=e.sourceName,t.loadFolders()})).catch(t.status)}),this.i18n("type name"),e.name).bindDestruct(this)},t.prototype.onFolderRemove=function(e){var t=this;r.Confirm(this.i18n("Are you sure?"),this.i18n("Delete"),(function(o){o&&t.dataProvider.folderRemove(_.parentPath(e.path),e.name,e.sourceName).then((function(o){t.status(o,!0),t.state.currentPath=_.parentPath(e.path),t.state.currentSource=e.sourceName,t.loadFolders()})).catch(t.status)})).bindDestruct(this)},t.prototype.onFolderCreate=function(e){var t=this;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.onUpdateFileBrowser():(t.state.currentSource=e.sourceName,t.state.currentPath=n)}),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&&r.Prompt(this.i18n("Enter new name"),this.i18n("Rename"),(function(e){if(!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.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,void(this.state.currentSource=e[0].sourceName);this.stateManager.callSelectHandler()}},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=a.ConfigProto(t.o.uploader||{},p.Config.defaultOptions.uploader),n=function(){return e.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]=a.ConfigProto(e.options[t],e.o.ajax))}))},t.prototype.loadPartItems=function(){return this.dataProvider.items(this.state.currentPath,this.state.currentSource,{offset:this.offset,limit:this.countInOneChunk,sortBy:this.state.sortBy,withFolders:this.state.withFolders,foldersPosition:this.state.foldersPosition,onlyImages:this.state.onlyImages,filterWord:this.state.filterWord})},n.__decorate([c.autobind],t.prototype,"status",null),n.__decorate([c.watch(":resize",window)],t.prototype,"onResizeWindow",null),n.__decorate([c.watch("state.theme")],t.prototype,"onChangeTheme",null),n.__decorate([c.watch(":toggleSettings.filebrowser")],t.prototype,"onToggleSettings",null),n.__decorate([c.watch(":update.filebrowser")],t.prototype,"onUpdateFileBrowser",null),n.__decorate([c.watch(["state.currentPath","state.currentSource"]),c.debounce((function(e){return{timeout:e.defaultTimeout,promisify:!0}}))],t.prototype,"loadFolders",null),n.__decorate([c.watch(["state.currentPath","state.currentSource","state.sortBy","state.onlyImages","state.foldersPosition","state.filterWord"]),c.debounce((function(e){return{timeout:e.defaultTimeout,promisify:!0}}))],t.prototype,"loadItems",null),n.__decorate([c.debounce((function(e){return{timeout:e.defaultTimeout,promisify:!0}}))],t.prototype,"loadItemsChunk",null),n.__decorate([c.autobind],t.prototype,"onKeyPress",null),n.__decorate([c.autobind],t.prototype,"removeGlobalListeners",null),n.__decorate([c.watch(":fileRemove.filebrowser")],t.prototype,"onFileRemove",null),n.__decorate([c.watch(":edit.filebrowser")],t.prototype,"onFileEdit",null),n.__decorate([c.watch(":folderRename.filebrowser")],t.prototype,"onFolderRename",null),n.__decorate([c.watch(":folderRemove.filebrowser")],t.prototype,"onFolderRemove",null),n.__decorate([c.watch(":folderCreate.filebrowser")],t.prototype,"onFolderCreate",null),n.__decorate([c.watch(":fileRename.filebrowser")],t.prototype,"onFileRename",null),n.__decorate([c.watch(":select.filebrowser")],t.prototype,"onChooseItems",null),n.__decorate([c.component],t)}(s.Dialog);t.FileBrowserPro=w},475:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(13);o(46).extendLang(o(476));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.next={icon:"angle-right",isDisabled:function(e){if(!e.state)return!0;var t=e.state,o=t.history;return!o||!o.length||t.historyIndex===o.length-1},exec:function(e){e.e.fire("next.filebrowser")}},r.previous={icon:"angle-left",isDisabled:function(e){if(!e.state)return!0;var t=e.state,o=t.history;return!o||!o.length||0===t.historyIndex},exec:function(e){e.e.fire("previous.filebrowser")}},Object.assign(n.Config.prototype.filebrowser,{buttons:["filebrowser.home","filebrowser.previous","filebrowser.next","|","filebrowser.upload","filebrowser.remove","filebrowser.update","filebrowser.select","filebrowser.edit","|","about"],sort:!1,pixelOffsetLoadNewChunk:200,width:715,height:400})},431:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.finder=void 0;var n=o(1),r=o(190),s=o(432),i=o(2);o(475);var a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.requires=["license"],t.hasStyle=!0,t}return n.__extends(t,e),t.prototype.afterInit=function(e){var t=this;e.e.on("getInstanceFileBrowser",(function(e){return t.__instance||(t.__instance=new s.FileBrowserPro(e)),t.__instance}))},t.prototype.beforeDestruct=function(e){e.e.off("getInstanceFileBrowser")},t}(r.Plugin);t.finder=a,i.Jodit.plugins.add("finder",a)},471:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContextMenuManager=void 0;var n=o(1),r=o(196),s=o(78),i=o(104),a=o(202),c=o(472),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return 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=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)&&o.preview&&r,exec:function(){c.UILightBox.open(t.j,e,t.j.state.elements)}},{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)}}]},n.__decorate([i.watch(":contextmenuFolder.filebrowser")],t.prototype,"onFolderContext",null),n.__decorate([i.watch(":contextmenuItem.filebrowser")],t.prototype,"onItemContext",null),n.__decorate([i.watch(":contextmenuSource.filebrowser")],t.prototype,"onSourceContext",null),n.__decorate([i.component],t)}(s.ViewComponent);t.ContextMenuManager=l},474:(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("/")||"/"}},470:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HistoryManager=void 0;var n=o(1),r=o(27),s=o(78),i=o(104),a=function(e){function t(t,o){var n=e.call(this,t)||this;return n.state=o,n}return n.__extends(t,e),t.prototype.className=function(){return"HistoryManager"},t.prototype.updateHistory=function(){this.state.history[this.state.historyIndex]={currentSource:this.state.currentSource,currentPath:this.state.currentPath,tree:r.fastClone(this.state.tree),elements:this.state.elements}},t.prototype.updateState=function(){var e=this.state.history[this.state.historyIndex],t=e.tree,o=e.currentSource,n=e.currentPath;this.state.elements=e.elements,this.state.tree=t,this.state.currentSource=o,this.state.currentPath=n,this.j.e.fire("changeSelection")},t.prototype.push=function(){var e=n.__spreadArrays(this.state.history),t=this.state.historyIndex,o=e[t];o&&o.currentSource===this.state.currentSource&&o.currentPath===this.state.currentPath||(e.length-1!==t&&(e=e.slice(0,t)),e.push({tree:[],elements:[],currentPath:this.state.currentPath,currentSource:this.state.currentSource}),o&&(t+=1),this.state.historyIndex=t,this.state.history=e,this.updateHistory(),this.j.e.fire("changeSelection"))},t.prototype.onNext=function(){this.state.history.length-1>this.state.historyIndex&&(this.state.historyIndex+=1,this.updateState())},t.prototype.onPrevious=function(){this.state.historyIndex>0&&(this.state.historyIndex-=1,this.updateState())},t.prototype.onHome=function(){this.state.currentSource="",this.state.currentPath=""},n.__decorate([i.watch(":next.filebrowser")],t.prototype,"onNext",null),n.__decorate([i.watch(":previous.filebrowser")],t.prototype,"onPrevious",null),n.__decorate([i.watch(":goHome.filebrowser")],t.prototype,"onHome",null),n.__decorate([i.component],t)}(s.ViewComponent);t.HistoryManager=a},469:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PersistentStore=void 0;var n=o(1),r=o(78),s=o(104),i=o(198),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.showFavorites=!0,n}return 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.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 i.FileBrowserItem?e:i.FileBrowserItem.create(e)})),this.state.view=this.view,this.state.theme=this.theme,this.state.showSideBar=this.showSideBar,this.state.showFavorites=this.showFavorites,this.state.sortBy=this.sortBy,this.state.foldersPosition=this.foldersPosition},n.__decorate([s.persistent],t.prototype,"theme",void 0),n.__decorate([s.persistent],t.prototype,"sortBy",void 0),n.__decorate([s.persistent],t.prototype,"view",void 0),n.__decorate([s.persistent],t.prototype,"foldersPosition",void 0),n.__decorate([s.persistent],t.prototype,"tileSize",void 0),n.__decorate([s.persistent],t.prototype,"favorites",void 0),n.__decorate([s.persistent],t.prototype,"showSideBar",void 0),n.__decorate([s.persistent],t.prototype,"showFavorites",void 0),n.__decorate([s.watch("state.theme")],t.prototype,"onChangeThemeSetField",null),n.__decorate([s.watch("state.view")],t.prototype,"onChangeView",null),n.__decorate([s.watch("state.sortBy")],t.prototype,"onChangeSortBy",null),n.__decorate([s.watch("state.tileSize")],t.prototype,"onChangeTileSize",null),n.__decorate([s.watch("state.favorites")],t.prototype,"onChangeFavorites",null),n.__decorate([s.watch("state.showSideBar")],t.prototype,"onChangeShowSideBar",null),n.__decorate([s.watch("state.showFavorites")],t.prototype,"onChangeShowFavorites",null),n.__decorate([s.watch("state.foldersPosition")],t.prototype,"onChangeFoldersPosition",null),n.__decorate([s.component],t)}(r.ViewComponent);t.PersistentStore=a},464:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StateManager=void 0;var n=o(1),r=o(104),s=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.info=null!==(o=e.file)&&void 0!==o?o:"",this.state.lastSelectedIndex=this.getIndex(e),this.state.activeElements=t?n.__spreadArrays(this.state.activeElements,[e]):[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=n.__spreadArrays(o,[e]))},e.prototype.removeMessage=function(e){var t=this.state.messages.indexOf(e);if(-1!==t){var o=n.__spreadArrays(this.state.messages);o.splice(t,1),this.state.messages=o}},e.prototype.toggleFavorite=function(e){var t=this.getIndex(e,this.state.favorites),o=n.__spreadArrays(this.state.favorites);-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 s=r(o.state.tree,e.name);if(s){s.isActive=!0;var i=t.split("/").reduce((function(e,t){return e&&r(e.children,t)}),s);i&&(i.isActive=!0,i.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}),n.__decorate([r.autobind],e.prototype,"getIndex",null),n.__decorate([r.autobind],e.prototype,"isActive",null),n.__decorate([r.autobind],e.prototype,"isFavorite",null),e}();t.StateManager=s},476:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ru=void 0;var n=o(477);t.ru=n},434:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(76),r=o(435),s=o(436);n.Icon.set("heart",String(r)),n.Icon.set("home",String(s))},460:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserFolder=void 0;var n=o(1);o(461);var r=o(76),s=o(104),i=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 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>'},n.__decorate([s.component],t)}(r.UIElement);t.UIBrowserFolder=i},465:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserHeader=void 0;var n=o(1);o(466);var r=o(76),s=o(104),i=o(179),a=function(e){function t(t,o,n){var s,a=e.call(this,t)||this;return a.options=o,a.stateManager=n,a.syncMod=!0,a.toolbar=i.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!==(s=a.options.toolbarButtons)&&void 0!==s?s:[]),a}return n.__extends(t,e),t.prototype.className=function(){return"UIBrowserHeader"},n.__decorate([s.component],t)}(r.UIGroup);t.UIBrowserHeader=a},441:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserItem=void 0;var n=o(1);o(442);var r=o(76),s=o(104),i=o(198),a=o(15),c=o(27),l=function(e){function t(t,o){var n=e.call(this,t)||this;return n.item=i.FileBrowserItem.create(o),t.e.on(n.container,"click contextmenu dblclick",(function(e){return t.e.fire(e.type+"Item.filebrowser",n.item,c.ctrlKey(e)||e.shiftKey,e),!1})),n}return 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,c.ctrlKey(e)||e.shiftKey,e),!1},t.prototype.update=function(){var t;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),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},n.__decorate([s.watch("heart:click")],t.prototype,"onClickFavorite",null),n.__decorate([s.watch(["container:click","container:contextmenu","container:dblclick"])],t.prototype,"onAction",null),n.__decorate([s.component],t)}(r.UIElement);t.UIBrowserItem=l},472:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UILightBox=void 0;var n=o(1);o(473);var r=o(15),s=o(104),i=o(27),a=o(14),c=function(e){function t(t,o,n){var s=e.call(this,t)||this;s.current=o,s.elements=n,s.dialog=new r.Dialog;var i=s.dialog;return i.setMod("theme",t.state.theme).toolbar.setMod("mode","header"),i.open(s),s.elements=s.elements.filter((function(e){return e.isImage})),i.e.on("afterClose",(function(){s.destruct()})),s.addGlobalListeners(),s.onChangeCurrent(),i.toolbar.build([{icon:"check",exec:function(){t.stateManager.addActive(s.current,!1),t.e.fire("select.filebrowser"),i.close()}},"dialog.close"]),s}var o;return 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 n.__awaiter(this,void 0,Promise,(function(){var e,t;return n.__generator(this,(function(o){switch(o.label){case 0:return e=this.current,this.setMod("loading",!0),[4,i.loadImage(e.fileURL,this.j)];case 1:return t=o.sent(),this.dialog.setPosition(),i.css(this.getElm("preview"),{width:Math.min(this.jodit.ow.innerWidth,t.naturalWidth),height:Math.min(this.jodit.ow.innerHeight-100,t.naturalHeight),backgroundImage:"url("+t.src+")"}),this.dialog.setSize(),this.dialog.setPosition(),this.setMod("loading",!1),[2]}}))}))},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)},n.__decorate([s.watch("current")],t.prototype,"onChangeCurrent",null),n.__decorate([s.watch("previous:click")],t.prototype,"onPreviousClick",null),n.__decorate([s.watch("next:click")],t.prototype,"onNextClick",null),n.__decorate([s.autobind],t.prototype,"onKeyPress",null),o=n.__decorate([s.component],t)}(r.UIElement);t.UILightBox=c},447:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserMessage=void 0;var n=o(1),r=o(76),s=o(104),i=o(27),a=function(e){function t(t,o){var n=e.call(this,t)||this;return n.container.innerText=i.isString(o)?o:o.message,n}return n.__extends(t,e),t.prototype.className=function(){return"UIBrowserMessage"},n.__decorate([s.component],t)}(r.UIElement);t.UIBrowserMessage=a},445:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserMessages=void 0;var n=o(1);o(446);var r=o(76),s=o(104),i=o(447),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return 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 i.UIBrowserMessage(t.jodit,e.message);o.setMod("type",e.type),t.append(o)}))},n.__decorate([s.component],t)}(r.UIGroup);t.UIBrowserMessages=a},437:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserPanel=void 0;var n=o(1);o(438);var r=o(76),s=o(439),i=o(445),a=o(104),c=o(448),l=o(452),u=o(27),h=o(454),d=o(462),p=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.statusbar=new d.UIBrowserStatusBar(n.j),n.items=new s.UIVirtualScroll(n.j,n.stateManager),n.settings=new l.UIBrowserSettings(n.jodit,n.stateManager.state),n.messages=new i.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.statusbar,"footer"),n.onChangeElements(),n.onChangeSources(),n.onChangeView(),n.onChangeTileSize(),n.onChangeShowFavorites(),n.onChangeMessages(),n.onChangeActiveElements(),n.onChangeFavorites(),n.onChangeShowSideBar(),n.onChangeShowSettings(),n.onChangeTheme(),n}return n.__extends(t,e),t.prototype.className=function(){return"UIBrowserPanel"},Object.defineProperty(t.prototype,"countInRow",{get:function(){var e=this.items.elements[0].container,t=u.css(e,"marginLeft");return Math.floor(this.items.container.offsetWidth/(e.offsetWidth+(u.isNumber(t)?t:0)))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"countInColumn",{get:function(){var e=this.items.elements[0].container,t=u.css(e,"marginTop");return Math.floor(this.items.container.offsetHeight/(e.offsetHeight+(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.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&&(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.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.onToggleFavoriteItem=function(e){this.stateManager.toggleFavorite(e)},t.prototype.onFolderClick=function(e){this.stateManager.state.currentSource=e.sourceName,this.stateManager.state.currentPath=e.path||"/"},n.__decorate([a.watch("state.theme")],t.prototype,"onChangeTheme",null),n.__decorate([a.watch("state.elements")],t.prototype,"onChangeElements",null),n.__decorate([a.watch("state.activeElements")],t.prototype,"onChangeActiveElements",null),n.__decorate([a.watch(["state.favorites","state.elements"])],t.prototype,"onChangeFavorites",null),n.__decorate([a.watch("state.sources")],t.prototype,"onChangeSources",null),n.__decorate([a.watch("state.lastSelectedIndex")],t.prototype,"onChangeLastSelectedIndex",null),n.__decorate([a.watch("state.info")],t.prototype,"onChangeInfo",null),n.__decorate([a.watch(["state.currentPath","state.currentSource"])],t.prototype,"onChangePathOrSource",null),n.__decorate([a.watch("state.showSettings")],t.prototype,"onChangeShowSettings",null),n.__decorate([a.watch("state.showSideBar")],t.prototype,"onChangeShowSideBar",null),n.__decorate([a.watch("state.view")],t.prototype,"onChangeView",null),n.__decorate([a.watch("state.tileSize")],t.prototype,"onChangeTileSize",null),n.__decorate([a.watch("state.showFavorites")],t.prototype,"onChangeShowFavorites",null),n.__decorate([a.watch("state.messages")],t.prototype,"onChangeMessages",null),n.__decorate([a.watch(":dblclickItem.filebrowser")],t.prototype,"onItemDblClick",null),n.__decorate([a.watch(":clickItem.filebrowser")],t.prototype,"onItemClick",null),n.__decorate([a.watch(":toggleFavoriteItem")],t.prototype,"onToggleFavoriteItem",null),n.__decorate([a.watch(":openFolder")],t.prototype,"onFolderClick",null),n.__decorate([a.component],t)}(r.UIGroup);t.UIBrowserPanel=p},467:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIProgress=void 0;var n=o(1);o(468);var r=o(76),s=o(104),i=function(e){function t(t,o){var n=e.call(this,t)||this;return n.state=o,n.onProgress(),n}return 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},n.__decorate([s.watch("state.progress")],t.prototype,"onProgress",null),n.__decorate([s.component],t)}(r.ProgressBar);t.UIProgress=i},452:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserSettings=void 0;var n=o(1);o(453);var r=o(76),s=o(104),i=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 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()},n.__decorate([s.watch("state.view")],t.prototype,"onChangeView",null),n.__decorate([s.component],t)}(r.UIGroup);t.UIBrowserSettings=i},448:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UISidebar=void 0;var n=o(1);o(449);var r=o(76),s=o(104),i=o(450),a=function(e){function t(t,o,n){var r=e.call(this,t,o)||this;return r.state=n,r.onChangeFavorites(),r}return 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(){i.UIResize.remove(this),i.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},n.__decorate([s.hook("ready"),s.watch(":resize",window),s.debounce()],t.prototype,"addResize",null),n.__decorate([s.watch("state.favorites")],t.prototype,"onChangeFavorites",null),n.__decorate([s.watch("hide-btn:click")],t.prototype,"onClickHideButton",null),n.__decorate([s.watch("favorites:click")],t.prototype,"onClickFavorites",null),n.__decorate([s.component],t)}(r.UIGroup);t.UISidebar=a},456:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserSource=void 0;var n=o(1);o(457);var r=o(76),s=o(104),i=o(458),a=function(e){function t(t,o){var n=e.call(this,t,o)||this;return n.data=o,n.tree=new i.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 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>'},n.__decorate([s.component],t)}(r.UIElement);t.UIBrowserSource=a},454:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserSources=void 0;var n=o(1);o(455);var r=o(76),s=o(104),i=o(456),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.syncMod=!0,t}return 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 i.UIBrowserSource(t.jodit,e))}))},n.__decorate([s.component],t)}(r.UIGroup);t.UIBrowserSources=a},462:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserStatusBar=void 0;var n=o(1);o(463);var r=o(76),s=o(104),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return 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},n.__decorate([s.component],t)}(r.UIElement);t.UIBrowserStatusBar=i},458:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UITree=void 0;var n=o(1);o(459);var r=o(76),s=o(104),i=o(460),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 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 i.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=n.__decorate([s.component],t)}(r.UIGroup);t.UITree=a},439:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIVirtualScroll=void 0;var n=o(1);o(440);var r=o(76),s=o(104),i=o(441),a=o(198),c=o(443),l=o(27),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 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 i.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.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=l.position(n.container);o.intersectRect(r,e)&&t.push(n.item)})),this.stateManager.state.activeElements=t},n.__decorate([s.watch("resize"),s.watch("container:scroll"),s.throttle()],t.prototype,"onScrollLoadChunk",null),n.__decorate([s.watch("container:dragover")],t.prototype,"onDragOver",null),n.__decorate([s.watch(["container:dragleave","container:drop"])],t.prototype,"onDragLeave",null),o=n.__decorate([s.component],t)}(r.UIGroup);t.UIVirtualScroll=u},450:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIResize=void 0,o(451);var n=o(27),r=o(43),s=function(){function e(){}return e.remove=function(e){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"===n.css(e.container,"position")&&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);n.css(e.container,r?"width":"height",r?t.w+(o.clientX-t.x):t.h+(o.clientY-t.y))},e.onEndResize=function(e,t,o){e.j.e.off(e.j.ow,"mousemove touchmove",t),e.j.unlock()},e}();t.UIResize=s},443:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UISelectItems=void 0,o(444);var n=o(43),r=o(27),s=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){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},s=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",s).one(e.j.ow,"mouseup touchend",this.onEndSelect.bind(this,e,t,s)),e.onSelectItems({left:n.x,top:n.y,width:0,height:0})}},e.onSelect=function(e,t,o,n){var s={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)};r.css(t,s),e.onSelectItems(s)},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=s},477: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":"Размер плитки"}},433:(e,t,o)=>{"use strict";o.r(t)},461:(e,t,o)=>{"use strict";o.r(t)},466:(e,t,o)=>{"use strict";o.r(t)},442:(e,t,o)=>{"use strict";o.r(t)},473:(e,t,o)=>{"use strict";o.r(t)},446:(e,t,o)=>{"use strict";o.r(t)},438:(e,t,o)=>{"use strict";o.r(t)},468:(e,t,o)=>{"use strict";o.r(t)},453:(e,t,o)=>{"use strict";o.r(t)},449:(e,t,o)=>{"use strict";o.r(t)},457:(e,t,o)=>{"use strict";o.r(t)},455:(e,t,o)=>{"use strict";o.r(t)},463:(e,t,o)=>{"use strict";o.r(t)},459:(e,t,o)=>{"use strict";o.r(t)},440:(e,t,o)=>{"use strict";o.r(t)},451:(e,t,o)=>{"use strict";o.r(t)},444:(e,t,o)=>{"use strict";o.r(t)},435: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>'},436: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>'}},0,[[431,670]]])})); | ||
!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],{432:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileBrowserPro=void 0;var n=o(1);o(433),o(434);var r=o(15),i=o(169),s=o(437),a=o(27),c=o(104),l=o(14),u=o(464),h=o(465),d=o(202),p=o(13),f=o(467),v=o(196),m=o(469),g=o(470),y=o(471),_=o(474),w=o(2),b=o(430),I=function(e){function t(t){var o=e.call(this,a.ConfigProto(Object.assign(t||{},{resizable:!0,draggable:!0,toolbarButtons:null==t?void 0:t.buttons,license:p.Config.defaultOptions.license,buttons:w.Jodit.atom(["filebrowser.settings","fullsize","dialog.close"])}),p.Config.defaultOptions.filebrowser))||this;return o.dataProvider=v.makeDataProvider(o,o.options),o.state=r.ObserveObject.create({onSelectCallBack:function(){},theme:"default",showSideBar:!0,showFavorites:!0,showSettings:!1,withFolders:!0,foldersPosition:"bottom",info:"",currentPath:"",currentSource:"",currentBaseUrl:"",history:[],historyIndex:0,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.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.progressbar=new f.UIProgress(o,o.stateManager.state),o.offset=0,o.countInOneChunk=20,o.stopLoadingParts=!1,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 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: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.onResizeWindow=function(){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.open=function(t,o){return n.__awaiter(this,void 0,Promise,(function(){return n.__generator(this,(function(o){return this.prepareOpening(t),e.prototype.open.call(this,this.panel.container),[2,this.onUpdateFileBrowser()]}))}))},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.onUpdateFileBrowser=function(){return n.__awaiter(this,void 0,Promise,(function(){return n.__generator(this,(function(e){switch(e.label){case 0:return this.state.activeElements=[],this.panel.setMod("loading",!0),[4,Promise.all([this.loadFolders(),this.loadItems()])];case 1:return e.sent(),this.panel.setMod("loading",!1),this.historyManager.updateHistory(),[2]}}))}))},t.prototype.loadFolders=function(){return n.__awaiter(this,void 0,Promise,(function(){var e,t,o,r,i;return n.__generator(this,(function(n){switch(n.label){case 0:if(!this.isOpened)return[2];t=(e=this.state).currentPath,o=e.currentSource,this.historyManager.push(),n.label=1;case 1:return n.trys.push([1,3,,4]),this.uploader.setPath(t),this.uploader.setSource(o),[4,this.dataProvider.tree(t,o)];case 2:return r=n.sent(),this.stateManager.fillSources(r,t),this.historyManager.updateHistory(),this.state.sources=r,[3,4];case 3:return i=n.sent(),this.status(i),[3,4];case 4:return[2]}}))}))},t.prototype.loadItems=function(){return n.__awaiter(this,void 0,Promise,(function(){var e,t;return n.__generator(this,(function(o){switch(o.label){case 0:if(!this.isOpened)return[2];o.label=1;case 1:return o.trys.push([1,6,,7]),this.offset=0,this.stopLoadingParts=!1,e=this.state,[4,this.loadPartItems()];case 2:e.elements=o.sent(),this.stopLoadingParts=this.countInOneChunk>this.state.elements.length,o.label=3;case 3:return this.stopLoadingParts||this.state.elements.length>=this.panel.countInColumn*this.panel.countInRow?[3,5]:[4,this.loadItemsChunk()];case 4:return o.sent(),[3,3];case 5:return this.historyManager.updateHistory(),[3,7];case 6:return t=o.sent(),this.status(t),[3,7];case 7:return[2]}}))}))},t.prototype.loadItemsChunk=function(){return n.__awaiter(this,void 0,Promise,(function(){var e,t;return 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.state.elements=this.state.elements.concat(e)),[3,4];case 3:return t=o.sent(),this.status(t),[3,4];case 4:return[2]}}))}))},t.prototype.prepareOpening=function(e){var t=this;this.registerGlobalListeners(),this.state.onSelectCallBack=function(o){t.close(),null==e||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&&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(){return e.loadItems()}))}})).bindDestruct(this)},t.prototype.onFileEdit=function(){if(1===this.state.activeElements.length){var e=this.state.activeElements[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;r.Prompt(this.i18n("Enter new name"),this.i18n("Rename"),(function(o){if(!a.isValidName(o)||o===e.name)return t.status(t.i18n("Enter new name")),!1;t.dataProvider.folderRename(_.parentPath(e.path),e.name,o,e.sourceName).then((function(n){t.state.activeElements=[],t.status(n,!0),t.state.currentPath=_.parentPath(e.path)+"/"+o,t.state.currentSource=e.sourceName,t.loadFolders()})).catch(t.status)}),this.i18n("type name"),e.name).bindDestruct(this)},t.prototype.onFolderRemove=function(e){var t=this;r.Confirm(this.i18n("Are you sure?"),this.i18n("Delete"),(function(o){o&&t.dataProvider.folderRemove(_.parentPath(e.path),e.name,e.sourceName).then((function(o){t.status(o,!0),t.state.currentPath=_.parentPath(e.path),t.state.currentSource=e.sourceName,t.loadFolders()})).catch(t.status)})).bindDestruct(this)},t.prototype.onFolderCreate=function(e){var t=this;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.onUpdateFileBrowser():(t.state.currentSource=e.sourceName,t.state.currentPath=n)}),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&&r.Prompt(this.i18n("Enter new name"),this.i18n("Rename"),(function(e){if(!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.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,void(this.state.currentSource=e[0].sourceName);this.stateManager.callSelectHandler()}},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=a.ConfigProto(t.o.uploader||{},p.Config.defaultOptions.uploader),n=function(){return e.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]=a.ConfigProto(e.options[t],e.o.ajax))}))},t.prototype.loadPartItems=function(){return this.dataProvider.items(this.state.currentPath,this.state.currentSource,{offset:this.offset,limit:this.countInOneChunk,sortBy:this.state.sortBy,withFolders:this.state.withFolders,foldersPosition:this.state.foldersPosition,onlyImages:this.state.onlyImages,filterWord:this.state.filterWord})},n.__decorate([c.autobind],t.prototype,"status",null),n.__decorate([c.watch(":resize",window)],t.prototype,"onResizeWindow",null),n.__decorate([c.watch("state.theme")],t.prototype,"onChangeTheme",null),n.__decorate([c.watch(":toggleSettings.filebrowser")],t.prototype,"onToggleSettings",null),n.__decorate([c.watch(":update.filebrowser")],t.prototype,"onUpdateFileBrowser",null),n.__decorate([c.watch(["state.currentPath","state.currentSource"]),c.debounce((function(e){return{timeout:e.defaultTimeout,promisify:!0}}))],t.prototype,"loadFolders",null),n.__decorate([c.watch(["state.currentPath","state.currentSource","state.sortBy","state.onlyImages","state.foldersPosition","state.filterWord"]),c.debounce((function(e){return{timeout:e.defaultTimeout,promisify:!0}}))],t.prototype,"loadItems",null),n.__decorate([c.debounce((function(e){return{timeout:e.defaultTimeout,promisify:!0}}))],t.prototype,"loadItemsChunk",null),n.__decorate([c.autobind],t.prototype,"onKeyPress",null),n.__decorate([c.autobind],t.prototype,"removeGlobalListeners",null),n.__decorate([c.watch(":fileRemove.filebrowser")],t.prototype,"onFileRemove",null),n.__decorate([c.watch(":edit.filebrowser")],t.prototype,"onFileEdit",null),n.__decorate([c.watch(":folderRename.filebrowser")],t.prototype,"onFolderRename",null),n.__decorate([c.watch(":folderRemove.filebrowser")],t.prototype,"onFolderRemove",null),n.__decorate([c.watch(":folderCreate.filebrowser")],t.prototype,"onFolderCreate",null),n.__decorate([c.watch(":fileRename.filebrowser")],t.prototype,"onFileRename",null),n.__decorate([c.watch(":select.filebrowser")],t.prototype,"onChooseItems",null),n.__decorate([c.component],t)}(i.Dialog);t.FileBrowserPro=I},475:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(13);o(46).extendLang(o(476));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.next={icon:"angle-right",isDisabled:function(e){if(!e.state)return!0;var t=e.state,o=t.history;return!o||!o.length||t.historyIndex===o.length-1},exec:function(e){e.e.fire("next.filebrowser")}},r.previous={icon:"angle-left",isDisabled:function(e){if(!e.state)return!0;var t=e.state,o=t.history;return!o||!o.length||0===t.historyIndex},exec:function(e){e.e.fire("previous.filebrowser")}},Object.assign(n.Config.prototype.filebrowser,{buttons:["filebrowser.home","filebrowser.previous","filebrowser.next","|","filebrowser.upload","filebrowser.remove","filebrowser.update","filebrowser.select","filebrowser.edit","|","about"],sort:!1,pixelOffsetLoadNewChunk:200,width:715,height:400})},431:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.finder=void 0;var n=o(1),r=o(190),i=o(432),s=o(2);o(475);var a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.requires=["license"],t.hasStyle=!0,t}return 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){e.e.off("getInstanceFileBrowser")},t}(r.Plugin);t.finder=a,s.Jodit.plugins.add("finder",a)},471:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContextMenuManager=void 0;var n=o(1),r=o(196),i=o(78),s=o(104),a=o(202),c=o(472),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return 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=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)&&o.preview&&r,exec:function(){c.UILightBox.open(t.j,e,t.j.state.elements)}},{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)}}]},n.__decorate([s.watch(":contextmenuFolder.filebrowser")],t.prototype,"onFolderContext",null),n.__decorate([s.watch(":contextmenuItem.filebrowser")],t.prototype,"onItemContext",null),n.__decorate([s.watch(":contextmenuSource.filebrowser")],t.prototype,"onSourceContext",null),n.__decorate([s.component],t)}(i.ViewComponent);t.ContextMenuManager=l},474:(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("/")||"/"}},470:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HistoryManager=void 0;var n=o(1),r=o(27),i=o(78),s=o(104),a=function(e){function t(t,o){var n=e.call(this,t)||this;return n.state=o,n}return n.__extends(t,e),t.prototype.className=function(){return"HistoryManager"},t.prototype.updateHistory=function(){this.state.history[this.state.historyIndex]={currentSource:this.state.currentSource,currentPath:this.state.currentPath,tree:r.fastClone(this.state.tree),elements:this.state.elements}},t.prototype.updateState=function(){var e=this.state.history[this.state.historyIndex],t=e.tree,o=e.currentSource,n=e.currentPath;this.state.elements=e.elements,this.state.tree=t,this.state.currentSource=o,this.state.currentPath=n,this.j.e.fire("changeSelection")},t.prototype.push=function(){var e=n.__spreadArrays(this.state.history),t=this.state.historyIndex,o=e[t];o&&o.currentSource===this.state.currentSource&&o.currentPath===this.state.currentPath||(e.length-1!==t&&(e=e.slice(0,t)),e.push({tree:[],elements:[],currentPath:this.state.currentPath,currentSource:this.state.currentSource}),o&&(t+=1),this.state.historyIndex=t,this.state.history=e,this.updateHistory(),this.j.e.fire("changeSelection"))},t.prototype.onNext=function(){this.state.history.length-1>this.state.historyIndex&&(this.state.historyIndex+=1,this.updateState())},t.prototype.onPrevious=function(){this.state.historyIndex>0&&(this.state.historyIndex-=1,this.updateState())},t.prototype.onHome=function(){this.state.currentSource="",this.state.currentPath=""},n.__decorate([s.watch(":next.filebrowser")],t.prototype,"onNext",null),n.__decorate([s.watch(":previous.filebrowser")],t.prototype,"onPrevious",null),n.__decorate([s.watch(":goHome.filebrowser")],t.prototype,"onHome",null),n.__decorate([s.component],t)}(i.ViewComponent);t.HistoryManager=a},469:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PersistentStore=void 0;var n=o(1),r=o(78),i=o(104),s=o(198),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.showFavorites=!0,n}return 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.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.showFavorites=this.showFavorites,this.state.sortBy=this.sortBy,this.state.foldersPosition=this.foldersPosition},n.__decorate([i.persistent],t.prototype,"theme",void 0),n.__decorate([i.persistent],t.prototype,"sortBy",void 0),n.__decorate([i.persistent],t.prototype,"view",void 0),n.__decorate([i.persistent],t.prototype,"foldersPosition",void 0),n.__decorate([i.persistent],t.prototype,"tileSize",void 0),n.__decorate([i.persistent],t.prototype,"favorites",void 0),n.__decorate([i.persistent],t.prototype,"showSideBar",void 0),n.__decorate([i.persistent],t.prototype,"showFavorites",void 0),n.__decorate([i.watch("state.theme")],t.prototype,"onChangeThemeSetField",null),n.__decorate([i.watch("state.view")],t.prototype,"onChangeView",null),n.__decorate([i.watch("state.sortBy")],t.prototype,"onChangeSortBy",null),n.__decorate([i.watch("state.tileSize")],t.prototype,"onChangeTileSize",null),n.__decorate([i.watch("state.favorites")],t.prototype,"onChangeFavorites",null),n.__decorate([i.watch("state.showSideBar")],t.prototype,"onChangeShowSideBar",null),n.__decorate([i.watch("state.showFavorites")],t.prototype,"onChangeShowFavorites",null),n.__decorate([i.watch("state.foldersPosition")],t.prototype,"onChangeFoldersPosition",null),n.__decorate([i.component],t)}(r.ViewComponent);t.PersistentStore=a},464:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StateManager=void 0;var n=o(1),r=o(104),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.info=null!==(o=e.file)&&void 0!==o?o:"",this.state.lastSelectedIndex=this.getIndex(e),this.state.activeElements=t?n.__spreadArrays(this.state.activeElements,[e]):[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=n.__spreadArrays(o,[e]))},e.prototype.removeMessage=function(e){var t=this.state.messages.indexOf(e);if(-1!==t){var o=n.__spreadArrays(this.state.messages);o.splice(t,1),this.state.messages=o}},e.prototype.toggleFavorite=function(e){var t=this.getIndex(e,this.state.favorites),o=n.__spreadArrays(this.state.favorites);-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}),n.__decorate([r.autobind],e.prototype,"getIndex",null),n.__decorate([r.autobind],e.prototype,"isActive",null),n.__decorate([r.autobind],e.prototype,"isFavorite",null),e}();t.StateManager=i},476:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ru=void 0;var n=o(477);t.ru=n},434:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(76),r=o(435),i=o(436);n.Icon.set("heart",String(r)),n.Icon.set("home",String(i))},460:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserFolder=void 0;var n=o(1);o(461);var r=o(76),i=o(104),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 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>'},n.__decorate([i.component],t)}(r.UIElement);t.UIBrowserFolder=s},465:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserHeader=void 0;var n=o(1);o(466);var r=o(76),i=o(104),s=o(179),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=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 n.__extends(t,e),t.prototype.className=function(){return"UIBrowserHeader"},n.__decorate([i.component],t)}(r.UIGroup);t.UIBrowserHeader=a},441:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserItem=void 0;var n=o(1);o(442);var r=o(76),i=o(104),s=o(198),a=o(15),c=o(27),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,c.ctrlKey(e)||e.shiftKey,e),!1})),n}return 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,c.ctrlKey(e)||e.shiftKey,e),!1},t.prototype.update=function(){var t;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),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},n.__decorate([i.watch("heart:click")],t.prototype,"onClickFavorite",null),n.__decorate([i.watch(["container:click","container:contextmenu","container:dblclick"])],t.prototype,"onAction",null),n.__decorate([i.component],t)}(r.UIElement);t.UIBrowserItem=l},472:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UILightBox=void 0;var n=o(1);o(473);var r=o(15),i=o(104),s=o(27),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("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 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 n.__awaiter(this,void 0,Promise,(function(){var e,t;return n.__generator(this,(function(o){switch(o.label){case 0:return e=this.current,this.setMod("loading",!0),[4,s.loadImage(e.fileURL,this.j)];case 1:return t=o.sent(),this.dialog.setPosition(),s.css(this.getElm("preview"),{width:Math.min(this.jodit.ow.innerWidth,t.naturalWidth),height:Math.min(this.jodit.ow.innerHeight-100,t.naturalHeight),backgroundImage:"url("+t.src+")"}),this.dialog.setSize(),this.dialog.setPosition(),this.setMod("loading",!1),[2]}}))}))},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)},n.__decorate([i.watch("current")],t.prototype,"onChangeCurrent",null),n.__decorate([i.watch("previous:click")],t.prototype,"onPreviousClick",null),n.__decorate([i.watch("next:click")],t.prototype,"onNextClick",null),n.__decorate([i.autobind],t.prototype,"onKeyPress",null),o=n.__decorate([i.component],t)}(r.UIElement);t.UILightBox=c},447:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserMessage=void 0;var n=o(1),r=o(76),i=o(104),s=o(27),a=function(e){function t(t,o){var n=e.call(this,t)||this;return n.container.innerText=s.isString(o)?o:o.message,n}return n.__extends(t,e),t.prototype.className=function(){return"UIBrowserMessage"},n.__decorate([i.component],t)}(r.UIElement);t.UIBrowserMessage=a},445:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserMessages=void 0;var n=o(1);o(446);var r=o(76),i=o(104),s=o(447),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return 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)}))},n.__decorate([i.component],t)}(r.UIGroup);t.UIBrowserMessages=a},437:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserPanel=void 0;var n=o(1);o(438);var r=o(76),i=o(439),s=o(445),a=o(104),c=o(448),l=o(452),u=o(27),h=o(454),d=o(462),p=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.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.statusbar,"footer"),n.onChangeElements(),n.onChangeSources(),n.onChangeView(),n.onChangeTileSize(),n.onChangeShowFavorites(),n.onChangeMessages(),n.onChangeActiveElements(),n.onChangeFavorites(),n.onChangeShowSideBar(),n.onChangeShowSettings(),n.onChangeTheme(),n}return n.__extends(t,e),t.prototype.className=function(){return"UIBrowserPanel"},Object.defineProperty(t.prototype,"countInRow",{get:function(){var e=this.items.elements[0].container,t=u.css(e,"marginLeft");return Math.floor(this.items.container.offsetWidth/(e.offsetWidth+(u.isNumber(t)?t:0)))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"countInColumn",{get:function(){var e=this.items.elements[0].container,t=u.css(e,"marginTop");return Math.floor(this.items.container.offsetHeight/(e.offsetHeight+(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.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&&(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.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.onToggleFavoriteItem=function(e){this.stateManager.toggleFavorite(e)},t.prototype.onFolderClick=function(e){this.stateManager.state.currentSource=e.sourceName,this.stateManager.state.currentPath=e.path||"/"},n.__decorate([a.watch("state.theme")],t.prototype,"onChangeTheme",null),n.__decorate([a.watch("state.elements")],t.prototype,"onChangeElements",null),n.__decorate([a.watch("state.activeElements")],t.prototype,"onChangeActiveElements",null),n.__decorate([a.watch(["state.favorites","state.elements"])],t.prototype,"onChangeFavorites",null),n.__decorate([a.watch("state.sources")],t.prototype,"onChangeSources",null),n.__decorate([a.watch("state.lastSelectedIndex")],t.prototype,"onChangeLastSelectedIndex",null),n.__decorate([a.watch("state.info")],t.prototype,"onChangeInfo",null),n.__decorate([a.watch(["state.currentPath","state.currentSource"])],t.prototype,"onChangePathOrSource",null),n.__decorate([a.watch("state.showSettings")],t.prototype,"onChangeShowSettings",null),n.__decorate([a.watch("state.showSideBar")],t.prototype,"onChangeShowSideBar",null),n.__decorate([a.watch("state.view")],t.prototype,"onChangeView",null),n.__decorate([a.watch("state.tileSize")],t.prototype,"onChangeTileSize",null),n.__decorate([a.watch("state.showFavorites")],t.prototype,"onChangeShowFavorites",null),n.__decorate([a.watch("state.messages")],t.prototype,"onChangeMessages",null),n.__decorate([a.watch(":dblclickItem.filebrowser")],t.prototype,"onItemDblClick",null),n.__decorate([a.watch(":clickItem.filebrowser")],t.prototype,"onItemClick",null),n.__decorate([a.watch(":toggleFavoriteItem")],t.prototype,"onToggleFavoriteItem",null),n.__decorate([a.watch(":openFolder")],t.prototype,"onFolderClick",null),n.__decorate([a.component],t)}(r.UIGroup);t.UIBrowserPanel=p},467:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIProgress=void 0;var n=o(1);o(468);var r=o(76),i=o(104),s=function(e){function t(t,o){var n=e.call(this,t)||this;return n.state=o,n.onProgress(),n}return 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},n.__decorate([i.watch("state.progress")],t.prototype,"onProgress",null),n.__decorate([i.component],t)}(r.ProgressBar);t.UIProgress=s},452:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserSettings=void 0;var n=o(1);o(453);var r=o(76),i=o(104),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 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()},n.__decorate([i.watch("state.view")],t.prototype,"onChangeView",null),n.__decorate([i.component],t)}(r.UIGroup);t.UIBrowserSettings=s},448:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UISidebar=void 0;var n=o(1);o(449);var r=o(76),i=o(104),s=o(450),a=function(e){function t(t,o,n){var r=e.call(this,t,o)||this;return r.state=n,r.onChangeFavorites(),r}return 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},n.__decorate([i.hook("ready"),i.watch(":resize",window),i.debounce()],t.prototype,"addResize",null),n.__decorate([i.watch("state.favorites")],t.prototype,"onChangeFavorites",null),n.__decorate([i.watch("hide-btn:click")],t.prototype,"onClickHideButton",null),n.__decorate([i.watch("favorites:click")],t.prototype,"onClickFavorites",null),n.__decorate([i.component],t)}(r.UIGroup);t.UISidebar=a},456:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserSource=void 0;var n=o(1);o(457);var r=o(76),i=o(104),s=o(458),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 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>'},n.__decorate([i.component],t)}(r.UIElement);t.UIBrowserSource=a},454:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserSources=void 0;var n=o(1);o(455);var r=o(76),i=o(104),s=o(456),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.syncMod=!0,t}return 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))}))},n.__decorate([i.component],t)}(r.UIGroup);t.UIBrowserSources=a},462:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserStatusBar=void 0;var n=o(1);o(463);var r=o(76),i=o(104),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return 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},n.__decorate([i.component],t)}(r.UIElement);t.UIBrowserStatusBar=s},458:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UITree=void 0;var n=o(1);o(459);var r=o(76),i=o(104),s=o(460),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 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=n.__decorate([i.component],t)}(r.UIGroup);t.UITree=a},439:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIVirtualScroll=void 0;var n=o(1);o(440);var r=o(76),i=o(104),s=o(441),a=o(198),c=o(443),l=o(27),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 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.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=l.position(n.container);o.intersectRect(r,e)&&t.push(n.item)})),this.stateManager.state.activeElements=t},n.__decorate([i.watch("resize"),i.watch("container:scroll"),i.throttle()],t.prototype,"onScrollLoadChunk",null),n.__decorate([i.watch("container:dragover")],t.prototype,"onDragOver",null),n.__decorate([i.watch(["container:dragleave","container:drop"])],t.prototype,"onDragLeave",null),o=n.__decorate([i.component],t)}(r.UIGroup);t.UIVirtualScroll=u},450:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIResize=void 0,o(451);var n=o(27),r=o(43),i=function(){function e(){}return e.remove=function(e){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"===n.css(e.container,"position")&&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);n.css(e.container,r?"width":"height",r?t.w+(o.clientX-t.x):t.h+(o.clientY-t.y))},e.onEndResize=function(e,t,o){e.j.e.off(e.j.ow,"mousemove touchmove",t),e.j.unlock()},e}();t.UIResize=i},443:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UISelectItems=void 0,o(444);var n=o(43),r=o(27),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){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)};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},477: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":"Размер плитки"}},433:(e,t,o)=>{"use strict";o.r(t)},461:(e,t,o)=>{"use strict";o.r(t)},466:(e,t,o)=>{"use strict";o.r(t)},442:(e,t,o)=>{"use strict";o.r(t)},473:(e,t,o)=>{"use strict";o.r(t)},446:(e,t,o)=>{"use strict";o.r(t)},438:(e,t,o)=>{"use strict";o.r(t)},468:(e,t,o)=>{"use strict";o.r(t)},453:(e,t,o)=>{"use strict";o.r(t)},449:(e,t,o)=>{"use strict";o.r(t)},457:(e,t,o)=>{"use strict";o.r(t)},455:(e,t,o)=>{"use strict";o.r(t)},463:(e,t,o)=>{"use strict";o.r(t)},459:(e,t,o)=>{"use strict";o.r(t)},440:(e,t,o)=>{"use strict";o.r(t)},451:(e,t,o)=>{"use strict";o.r(t)},444:(e,t,o)=>{"use strict";o.r(t)},435: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>'},436: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>'}},0,[[431,670]]])})); |
/*! | ||
* jodit-pro - PRO Version of Jodit Editor | ||
* Author: Chupurnov Valeriy <chupurnov@gmail.com> | ||
* Version: v1.0.10 | ||
* Version: v1.0.12 | ||
* Url: https://xdsoft.net/jodit/pro/ | ||
@@ -10,2 +10,2 @@ * License(s): SEE LICENSE IN LICENSE.MD | ||
((t,e)=>{if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var s=e();for(var i in s)("object"==typeof exports?exports:t)[i]=s[i]}})(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[524],{166(t,e,s){"use strict";s.r(e),s.d(e,{finder:()=>W});var i=s(56),n=s(169),o=s(26),a=s(167),r=s(168);o.JO.set("heart",a+""),o.JO.set("home",r+"");var h=s(4),l=s(47),c=s(36),d=s(59),u=s(13);let m=class extends o.u1{constructor(t,e){super(t),this.item=d.Z.create(e),t.e.on(this.container,"click contextmenu dblclick",(e=>(t.e.fire(e.type+"Item.filebrowser",this.item,(0,u.ctrlKey)(e)||e.shiftKey,e),!1)))}className(){return"UIBrowserItem"}render(){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>"}onClickFavorite(){return this.bubble((t=>{this.jodit.e.fire(t,"toggleFavoriteItem",this.item)})),!1}onAction(t){return this.jodit.e.fire(t.type+"Item.filebrowser",this.item,(0,u.ctrlKey)(t)||t.shiftKey,t),!1}update(){var t;(0,u.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,u.attr)(this.container,"title",`${this.item.file} ${this.item.time} ${this.item.size}`),super.update()}setElementValue(t,e){const s=this.getFullElName(t);let i=this.getElm(t);if(!e)return i&&h.Dom.safeRemove(i),this;if(!i){const t=this.getElm("info");i=this.j.create.div(s),t.appendChild(i)}return i.innerText=e,this}};(0,n.gn)([(0,c.watch)("heart:click")],m.prototype,"onClickFavorite",null),(0,n.gn)([(0,c.watch)(["container:click","container:contextmenu","container:dblclick"])],m.prototype,"onAction",null),m=(0,n.gn)([c.component],m);var g,p=s(18);let v=g=class extends o.qe{constructor(t,e){super(t),this.stateManager=e,this.syncMod=!0,this.addItemsSelector()}className(){return"UIVirtualScroll"}render(){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>"}build(t){const e=this.elements.findIndex(((e,s)=>!t[s]||e.item.uniqueHashKey!==d.Z.create(t[s]).uniqueHashKey));if(e>-1){for(let t=e;this.elements.length>t;t+=1)this.elements[t].destruct();this.elements.length=e}t.slice(e>-1?e:this.elements.length).forEach((t=>{const e=new m(this.jodit,t);Object.keys(this.mods).forEach((t=>{e.setMod(t,this.mods[t])})),this.append(e)})),this.setMod("empty",!this.elements.length)}onScrollLoadChunk(){!this.stateManager.isFavoriteItems&&this.j.o.pixelOffsetLoadNewChunk>this.container.scrollHeight-(this.container.scrollTop+this.container.offsetHeight)&&this.j.loadItemsChunk()}onDragOver(t){t.preventDefault(),this.setMod("dragover",!0)}onDragLeave(t){t.preventDefault(),this.setMod("dragover",!1)}addItemsSelector(){(class{static remove(t){p.i.safeRemove(t.container.querySelector(".jodit-ui-select-items")),t.j.e.off(t.container,"mousedown.uiselectitems touchstart.uiselectitems")}static install(t){const e=t.j.c.div("jodit-ui-select-items");t.j.e.on(t.container,"mousedown.uiselectitems touchstart.uiselectitems",this.onStartSelect.bind(this,t,e))}static onStartSelect(t,e,s){if(s.target!==t.container)return;(0,u.css)(e,{width:0,height:0}),t.container.appendChild(e);const i={x:s.clientX,y:s.clientY,w:t.container.offsetWidth,h:t.container.offsetHeight},n=t.j.async.throttle(this.onSelect.bind(this,t,e,i),t.j.defaultTimeout/10);t.j.lock(),t.j.e.on(t.j.ow,"mousemove touchmove",n).one(t.j.ow,"mouseup touchend",this.onEndSelect.bind(this,t,e,n)),t.onSelectItems({left:i.x,top:i.y,width:0,height:0})}static onSelect(t,e,s,i){const n={left:s.x>i.clientX?i.clientX:s.x,top:s.y>i.clientY?i.clientY:s.y,width:Math.abs(s.x-i.clientX),height:Math.abs(s.y-i.clientY)};(0,u.css)(e,n),t.onSelectItems(n)}static onEndSelect(t,e,s,i){p.i.safeRemove(e),t.j.e.off(t.j.ow,"mousemove touchmove",s),t.j.unlock()}}).install(this)}static intersectRect(t,e){return!(e.left>t.left+t.width||t.left>e.left+e.width||e.top>t.top+t.height||t.top>e.top+e.height)}onSelectItems(t){const e=[];this.elements.forEach((s=>{const i=(0,u.position)(s.container);g.intersectRect(i,t)&&e.push(s.item)})),this.stateManager.state.activeElements=e}};(0,n.gn)([(0,c.watch)("resize"),(0,c.watch)("container:scroll"),(0,c.throttle)()],v.prototype,"onScrollLoadChunk",null),(0,n.gn)([(0,c.watch)("container:dragover")],v.prototype,"onDragOver",null),(0,n.gn)([(0,c.watch)(["container:dragleave","container:drop"])],v.prototype,"onDragLeave",null),v=g=(0,n.gn)([c.component],v);let f=class extends o.u1{className(){return"UIBrowserMessage"}constructor(t,e){super(t),this.container.innerText=(0,u.isString)(e)?e:e.message}};f=(0,n.gn)([c.component],f);let w=class extends o.qe{className(){return"UIBrowserMessages"}build(t){this.clear(),t.forEach((t=>{const e=new f(this.jodit,t.message);e.setMod("type",t.type),this.append(e)}))}};w=(0,n.gn)([c.component],w);class y{static remove(t){(0,u.css)(t.container,{width:null,height:null}),t.container.classList.remove("jodit-ui-resize"),p.i.safeRemove(t.container.querySelector(".jodit-ui-resize__handle"))}static install(t,e){t.container.classList.add("jodit-ui-resize"),"static"===(0,u.css)(t.container,"position")&&(0,u.css)(t.container,"position","relative");const s=t.j.c.div("jodit-ui-resize__handle");s.classList.add("jodit-ui-resize__handle_type_"+e),t.container.appendChild(s),t.j.e.on(s,"mousedown touchstart",this.onStartResize.bind(this,t,e))}static onStartResize(t,e,s){const i=t.j.async.throttle(this.onResize.bind(this,t,{x:s.clientX,y:s.clientY,w:t.container.offsetWidth,h:t.container.offsetHeight,direction:e}),t.j.defaultTimeout/10);t.j.lock(),t.j.e.on(t.j.ow,"mousemove touchmove",i).one(t.j.ow,"mouseup touchend",this.onEndResize.bind(this,t,i))}static onResize(t,e,s){const i=["left","right"].includes(e.direction);(0,u.css)(t.container,i?"width":"height",i?e.w+(s.clientX-e.x):e.h+(s.clientY-e.y))}static onEndResize(t,e,s){t.j.e.off(t.j.ow,"mousemove touchmove",e),t.j.unlock()}}let b=class extends o.qe{constructor(t,e,s){super(t,e),this.state=s,this.onChangeFavorites()}className(){return"UISidebar"}render(){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>"}appendChildToContainer(t){this.getElm("box").appendChild(t)}addResize(){y.remove(this),y.install(this,screen.width>450?"right":"bottom")}onChangeFavorites(){this.setMod("has-favorites",!!this.state.favorites.length)}onClickHideButton(){return this.state.showSideBar=!this.state.showSideBar,!1}onClickFavorites(){return this.state.elements=this.state.favorites,!1}};(0,n.gn)([(0,c.hook)("ready"),(0,c.watch)(":resize",window),(0,c.debounce)()],b.prototype,"addResize",null),(0,n.gn)([(0,c.watch)("state.favorites")],b.prototype,"onChangeFavorites",null),(0,n.gn)([(0,c.watch)("hide-btn:click")],b.prototype,"onClickHideButton",null),(0,n.gn)([(0,c.watch)("favorites:click")],b.prototype,"onClickFavorites",null),b=(0,n.gn)([c.component],b);let C=class extends o.qe{constructor(t,e){super(t),this.state=e,t.e.on(this.getElm("close"),"click",(()=>{this.state.showSettings=!1}))}className(){return"UIBrowserSettings"}render(){return`<div>\n\t\t\t<div class="${this.getFullElName("close")}">${o.JO.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>`}appendChildToContainer(t){this.getElm("options").appendChild(t)}setMod(t,e){return"hidden"===t&&!1===e&&this.generateSettings(),super.setMod(t,e)}onChangeView(){const t=this.getElm("tile-size");t&&(t.style.display="tiles"===this.state.view?"block":"none")}generateSettings(){this.clear();const{j:t}=this;this.append([new o.BO(t,{label:"Theme",name:"theme",value:this.state.theme,radio:!0,options:[{value:"default",text:"Light"},{value:"dark",text:"Dark"}],onChange:t=>{this.state.theme=t[0].value}}),new o.BO(t,{label:"Show favorites",name:"showFavorites",value:this.state.showFavorites,radio:!0,options:[{value:!0,text:"Show"},{value:!1,text:"Hide"}],onChange:t=>{this.state.showFavorites=t[0].value}}),new o.BO(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:t=>{this.state.view=t[0].value}}),new o.BO(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:t=>{this.state.foldersPosition=t[0].value}}),new o.Cj(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:t=>{this.state.sortBy=t}}),new o.Cj(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:t=>{this.state.tileSize=t}})]),this.onChangeView()}};(0,n.gn)([(0,c.watch)("state.view")],C.prototype,"onChangeView",null),C=(0,n.gn)([c.component],C);let S=class extends o.u1{constructor(t,e){super(t),this.item=e,this.syncMod=!0,this.getElm("name").innerText=e.name,t.e.on(this.container,"click",(()=>(this.getMod("active")||this.setMod("loading",!0),t.e.fire("openFolder",e)))).on(this.container,"contextmenu",(s=>t.e.fire("contextmenuFolder.filebrowser",e,s)))}className(){return"UIBrowserFolder"}render(){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>'}};var x;S=(0,n.gn)([c.component],S);let I=x=class extends o.qe{constructor(t,e){super(t),this.syncMod=!0,this.build(e)}className(){return"UITree"}build(t){this.clear(),t.forEach((t=>{const e=new S(this.jodit,t);this.append(e),t.isActive&&e.setMod("active",!0),t.children.length&&this.append(new x(this.jodit,t.children))}))}};I=x=(0,n.gn)([c.component],I);let M=class extends o.u1{constructor(t,e){super(t,e),this.data=e,this.tree=new I(this.j,this.data.children),this.syncMod=!0,this.getElm("name").innerText=e.title||e.name,this.getElm("tree").appendChild(this.tree.container),t.e.on(this.container,"contextmenu",(s=>t.e.fire("contextmenuSource.filebrowser",e,s)))}className(){return"UIBrowserSource"}render(){return'<div>\n\t\t\t<div class="&__name"></div>\n\t\t\t<div class="&__tree"></div>\n\t\t</div>'}};M=(0,n.gn)([c.component],M);let F=class extends o.qe{constructor(){super(...arguments),this.syncMod=!0}className(){return"UIBrowserSources"}build(t){this.clear(),t.forEach((t=>{this.append(new M(this.jodit,t))}))}};F=(0,n.gn)([c.component],F);let j=class extends o.u1{className(){return"UIBrowserStatusBar"}render(){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>"}value(t,e="left"){return this.getElm("slot-"+e).innerText=t,this}};j=(0,n.gn)([c.component],j);let E=class extends o.qe{constructor(t,e){super(t),this.stateManager=e,this.syncMod=!0,this.sources=new F(this.j),this.sidebar=new b(this.jodit,[this.sources],this.stateManager.state),this.statusbar=new j(this.j),this.items=new v(this.j,this.stateManager),this.settings=new C(this.jodit,this.stateManager.state),this.messages=new w(this.j),this.state=e.state,this.append(this.sidebar,"content"),this.append(this.items,"content"),this.append(this.messages,"footer"),this.append(this.settings,"content"),this.append(this.statusbar,"footer"),this.onChangeElements(),this.onChangeSources(),this.onChangeView(),this.onChangeTileSize(),this.onChangeShowFavorites(),this.onChangeMessages(),this.onChangeActiveElements(),this.onChangeFavorites(),this.onChangeShowSideBar(),this.onChangeShowSettings(),this.onChangeTheme()}className(){return"UIBrowserPanel"}get countInRow(){const{container:t}=this.items.elements[0],e=(0,u.css)(t,"marginLeft");return Math.floor(this.items.container.offsetWidth/(t.offsetWidth+((0,u.isNumber)(e)?e:0)))}get countInColumn(){const{container:t}=this.items.elements[0],e=(0,u.css)(t,"marginTop");return Math.floor(this.items.container.offsetHeight/(t.offsetHeight+((0,u.isNumber)(e)?e:0)))}render(){return"<div>\n\t\t\t<div class='&__content'></div>\n\t\t\t<div class='&__footer'></div>\n\t\t</div>"}onChangeTheme(){this.setMod("theme",this.stateManager.state.theme)}onChangeElements(){this.items.build(this.stateManager.state.elements)}onChangeActiveElements(){this.state.activeElements.length||(this.state.info=""),this.items.elements.forEach((t=>{t.setMod("active",!!this.stateManager.isActive(t.item))})),this.j.e.fire("changeSelection")}onChangeFavorites(){this.items.elements.forEach((t=>{t.setMod("favorite",!!this.stateManager.isFavorite(t.item))}))}onChangeSources(){this.sources.build(this.stateManager.state.tree)}onChangeLastSelectedIndex(){var t;const e=null===(t=this.items.elements[this.stateManager.state.lastSelectedIndex])||void 0===t?void 0:t.container;e&&((0,u.scrollIntoViewIfNeeded)(e,this.items.container,this.j.od),e.focus())}onChangeInfo(){this.statusbar.value(this.state.info,"center")}onChangePathOrSource(){this.statusbar.value(this.state.currentPath?`${this.state.currentPath} (${this.state.currentSource})`:this.i18n("Home"),"left")}onChangeShowSettings(){this.settings.setMod("hidden",!this.stateManager.state.showSettings)}onChangeShowSideBar(){this.sidebar.setMod("hidden",!this.stateManager.state.showSideBar)}onChangeView(){this.items.setMod("view",this.stateManager.state.view)}onChangeTileSize(){this.items.setMod("size",this.stateManager.state.tileSize)}onChangeShowFavorites(){this.sidebar.setMod("show-favorites",this.stateManager.state.showFavorites),this.items.setMod("show-favorites",this.stateManager.state.showFavorites)}onChangeMessages(){this.messages.build(this.stateManager.state.messages)}onItemDblClick(){return this.j.e.fire("select.filebrowser"),!1}onItemClick(t,e){this.stateManager.addActive(t,e)}onToggleFavoriteItem(t){this.stateManager.toggleFavorite(t)}onFolderClick(t){this.stateManager.state.currentSource=t.sourceName,this.stateManager.state.currentPath=t.path||"/"}};(0,n.gn)([(0,c.watch)("state.theme")],E.prototype,"onChangeTheme",null),(0,n.gn)([(0,c.watch)("state.elements")],E.prototype,"onChangeElements",null),(0,n.gn)([(0,c.watch)("state.activeElements")],E.prototype,"onChangeActiveElements",null),(0,n.gn)([(0,c.watch)(["state.favorites","state.elements"])],E.prototype,"onChangeFavorites",null),(0,n.gn)([(0,c.watch)("state.sources")],E.prototype,"onChangeSources",null),(0,n.gn)([(0,c.watch)("state.lastSelectedIndex")],E.prototype,"onChangeLastSelectedIndex",null),(0,n.gn)([(0,c.watch)("state.info")],E.prototype,"onChangeInfo",null),(0,n.gn)([(0,c.watch)(["state.currentPath","state.currentSource"])],E.prototype,"onChangePathOrSource",null),(0,n.gn)([(0,c.watch)("state.showSettings")],E.prototype,"onChangeShowSettings",null),(0,n.gn)([(0,c.watch)("state.showSideBar")],E.prototype,"onChangeShowSideBar",null),(0,n.gn)([(0,c.watch)("state.view")],E.prototype,"onChangeView",null),(0,n.gn)([(0,c.watch)("state.tileSize")],E.prototype,"onChangeTileSize",null),(0,n.gn)([(0,c.watch)("state.showFavorites")],E.prototype,"onChangeShowFavorites",null),(0,n.gn)([(0,c.watch)("state.messages")],E.prototype,"onChangeMessages",null),(0,n.gn)([(0,c.watch)(":dblclickItem.filebrowser")],E.prototype,"onItemDblClick",null),(0,n.gn)([(0,c.watch)(":clickItem.filebrowser")],E.prototype,"onItemClick",null),(0,n.gn)([(0,c.watch)(":toggleFavoriteItem")],E.prototype,"onToggleFavoriteItem",null),(0,n.gn)([(0,c.watch)(":openFolder")],E.prototype,"onFolderClick",null),E=(0,n.gn)([c.component],E);var P=s(3);class _{constructor(t){this.state=t}getIndex(t,e=this.state.elements){return e.findIndex((e=>e.uniqueHashKey===t.uniqueHashKey))}isActive(t){return!!this.state.activeElements.find((e=>e.uniqueHashKey===t.uniqueHashKey))}isFavorite(t){return!!this.state.favorites.find((e=>e.uniqueHashKey===t.uniqueHashKey))}addActive(t,e){var s;this.state.info=null!==(s=t.file)&&void 0!==s?s:"",this.state.lastSelectedIndex=this.getIndex(t),this.state.activeElements=e?[...this.state.activeElements,t]:[t]}callSelectHandler(){var t;const e=this.state.activeElements;null===(t=this.state.onSelectCallBack)||void 0===t||t.call(this,{baseurl:"",files:e.map((t=>t.fileURL)),isImages:e.map((t=>!!t.isImage))})}setFilter(t){this.state.filterWord=t}addMessage(t){var e;const s=this.state.messages;(null===(e=s[s.length-1])||void 0===e?void 0:e.message)!==t.message&&(this.state.messages=[...s,t])}removeMessage(t){const e=this.state.messages.indexOf(t);if(-1!==e){const t=[...this.state.messages];t.splice(e,1),this.state.messages=t}}toggleFavorite(t){const e=this.getIndex(t,this.state.favorites),s=[...this.state.favorites];-1===e?s.push(t):s.splice(e,1),this.state.favorites=s}fillSources(t,e){const s=t=>t.filter((t=>"."!==t&&".."!==t));if(this.state.tree.length&&e){const i=(t,e)=>{var s;return null!==(s=t.find((t=>t.name===e)))&&void 0!==s?s:null};this.removeActive(this.state.tree),t.forEach((t=>{const n=i(this.state.tree,t.name);if(n){n.isActive=!0;const o=e.split("/").reduce(((t,e)=>t&&i(t.children,e)),n);o&&(o.isActive=!0,o.children=s(t.folders).map((s=>({type:"directory",name:s,path:e+"/"+s,sourceName:t.name,children:[]}))))}}))}else this.state.tree=t.map((t=>({type:"source",name:t.name,title:t.title,sourceName:t.name,path:"/",children:s(t.folders).map((e=>({type:"directory",name:e,path:e,sourceName:t.name,children:[]})))})))}removeActive(t){t.forEach((t=>{t.isActive=!1,this.removeActive(t.children)}))}get isFavoriteItems(){return this.state.favorites===this.state.elements}}(0,n.gn)([c.autobind],_.prototype,"getIndex",null),(0,n.gn)([c.autobind],_.prototype,"isActive",null),(0,n.gn)([c.autobind],_.prototype,"isFavorite",null);var k=s(51);let R=class extends o.qe{constructor(t,e,s){var i;super(t),this.options=e,this.stateManager=s,this.syncMod=!0,this.toolbar=(0,k.R)(this.j),this.filter=new o.u3(this.j,{icon:"search",placeholder:"Filter",clearButton:!0,onChange:t=>{this.stateManager.setFilter(t)}}),this.append(this.toolbar).append(this.filter),this.filter.container.classList.add(this.getFullElName("filter")),this.toolbar.setMod("mode","header").build(null!==(i=this.options.toolbarButtons)&&void 0!==i?i:[])}className(){return"UIBrowserHeader"}};R=(0,n.gn)([c.component],R);var B=s(60),z=s(2);let N=class extends o.ko{constructor(t,e){super(t),this.state=e,this.onProgress()}className(){return"UIProgress"}onProgress(){this.state.progress?this.show():this.hide(),this.progress(this.state.progress)}hide(){return this.setMod("hidden",!0),this}progress(t){return this.container.style.width=t.toFixed(2)+"%",98>t||this.j.async.setTimeout((()=>{this.hide()}),{label:"progress",timeout:300}),this}show(){return this.setMod("hidden",!1),this}};(0,n.gn)([(0,c.watch)("state.progress")],N.prototype,"onProgress",null),N=(0,n.gn)([c.component],N);var L=s(57),T=s(28);let H=class extends T.Hr{constructor(t,e){super(t),this.state=e,this.sortBy="changed-desc",this.view="tiles",this.foldersPosition="top",this.tileSize="default",this.favorites=[],this.showSideBar=!0,this.showFavorites=!0}className(){return"PersistentStore"}onChangeThemeSetField(){this.theme=this.state.theme}onChangeView(){this.view=this.state.view}onChangeSortBy(){this.sortBy=this.state.sortBy}onChangeTileSize(){this.tileSize=this.state.tileSize}onChangeFavorites(){this.favorites=this.state.favorites}onChangeShowSideBar(){this.showSideBar=this.state.showSideBar}onChangeShowFavorites(){this.showFavorites=this.state.showFavorites}onChangeFoldersPosition(){this.foldersPosition=this.state.foldersPosition}syncWithState(){this.state.tileSize=this.tileSize,this.state.favorites=this.favorites.map((t=>t instanceof d.Z?t:d.Z.create(t))),this.state.view=this.view,this.state.theme=this.theme,this.state.showSideBar=this.showSideBar,this.state.showFavorites=this.showFavorites,this.state.sortBy=this.sortBy,this.state.foldersPosition=this.foldersPosition}};(0,n.gn)([c.persistent],H.prototype,"theme",void 0),(0,n.gn)([c.persistent],H.prototype,"sortBy",void 0),(0,n.gn)([c.persistent],H.prototype,"view",void 0),(0,n.gn)([c.persistent],H.prototype,"foldersPosition",void 0),(0,n.gn)([c.persistent],H.prototype,"tileSize",void 0),(0,n.gn)([c.persistent],H.prototype,"favorites",void 0),(0,n.gn)([c.persistent],H.prototype,"showSideBar",void 0),(0,n.gn)([c.persistent],H.prototype,"showFavorites",void 0),(0,n.gn)([(0,c.watch)("state.theme")],H.prototype,"onChangeThemeSetField",null),(0,n.gn)([(0,c.watch)("state.view")],H.prototype,"onChangeView",null),(0,n.gn)([(0,c.watch)("state.sortBy")],H.prototype,"onChangeSortBy",null),(0,n.gn)([(0,c.watch)("state.tileSize")],H.prototype,"onChangeTileSize",null),(0,n.gn)([(0,c.watch)("state.favorites")],H.prototype,"onChangeFavorites",null),(0,n.gn)([(0,c.watch)("state.showSideBar")],H.prototype,"onChangeShowSideBar",null),(0,n.gn)([(0,c.watch)("state.showFavorites")],H.prototype,"onChangeShowFavorites",null),(0,n.gn)([(0,c.watch)("state.foldersPosition")],H.prototype,"onChangeFoldersPosition",null),H=(0,n.gn)([c.component],H);let O=class extends T.Hr{constructor(t,e){super(t),this.state=e}className(){return"HistoryManager"}updateHistory(){this.state.history[this.state.historyIndex]={currentSource:this.state.currentSource,currentPath:this.state.currentPath,tree:(0,u.fastClone)(this.state.tree),elements:this.state.elements}}updateState(){const{tree:t,elements:e,currentSource:s,currentPath:i}=this.state.history[this.state.historyIndex];this.state.elements=e,this.state.tree=t,this.state.currentSource=s,this.state.currentPath=i,this.j.e.fire("changeSelection")}push(){let t=[...this.state.history],{historyIndex:e}=this.state;const s=t[e];s&&s.currentSource===this.state.currentSource&&s.currentPath===this.state.currentPath||(t.length-1!==e&&(t=t.slice(0,e)),t.push({tree:[],elements:[],currentPath:this.state.currentPath,currentSource:this.state.currentSource}),s&&(e+=1),this.state.historyIndex=e,this.state.history=t,this.updateHistory(),this.j.e.fire("changeSelection"))}onNext(){this.state.history.length-1>this.state.historyIndex&&(this.state.historyIndex+=1,this.updateState())}onPrevious(){this.state.historyIndex>0&&(this.state.historyIndex-=1,this.updateState())}onHome(){this.state.currentSource="",this.state.currentPath=""}};var D;(0,n.gn)([(0,c.watch)(":next.filebrowser")],O.prototype,"onNext",null),(0,n.gn)([(0,c.watch)(":previous.filebrowser")],O.prototype,"onPrevious",null),(0,n.gn)([(0,c.watch)(":goHome.filebrowser")],O.prototype,"onHome",null),O=(0,n.gn)([c.component],O);let K=D=class extends h.UIElement{constructor(t,e,s){super(t),this.current=e,this.elements=s,this.dialog=new h.Dialog;const{dialog:i}=this;i.setMod("theme",t.state.theme).toolbar.setMod("mode","header"),i.open(this),this.elements=this.elements.filter((t=>t.isImage)),i.e.on("afterClose",(()=>{this.destruct()})),this.addGlobalListeners(),this.onChangeCurrent(),i.toolbar.build([{icon:"check",exec:()=>{t.stateManager.addActive(this.current,!1),t.e.fire("select.filebrowser"),i.close()}},"dialog.close"])}className(){return"UILightBox"}render(){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>"}async onChangeCurrent(){const{current:t}=this;this.setMod("loading",!0);const e=await(0,u.loadImage)(t.fileURL,this.j);this.dialog.setPosition(),(0,u.css)(this.getElm("preview"),{width:Math.min(this.jodit.ow.innerWidth,e.naturalWidth),height:Math.min(this.jodit.ow.innerHeight-100,e.naturalHeight),backgroundImage:`url(${e.src})`}),this.dialog.setSize(),this.dialog.setPosition(),this.setMod("loading",!1)}onPreviousClick(){const{current:t}=this;let e=this.j.stateManager.getIndex(t,this.elements);e>0?e-=1:e=this.elements.length-1,this.current=this.elements[e]}onNextClick(){const{current:t}=this;let e=this.j.stateManager.getIndex(t,this.elements);this.elements.length-1>e?e+=1:e=0,this.current=this.elements[e]}static open(t,e,s){return new D(t,e,s)}addGlobalListeners(){this.j.e.on(this.j.od,"keydown",this.onKeyPress)}onKeyPress(t){if(t.key===P.KEY_LEFT||t.key===P.KEY_RIGHT||t.key===P.KEY_SPACE)return t.key===P.KEY_LEFT?this.onPreviousClick():this.onNextClick(),!1}removeGlobalListeners(){this.j.e.off(this.j.od,"keydown",this.onKeyPress)}destruct(){return this.removeGlobalListeners(),this.dialog.destruct(),super.destruct()}};(0,n.gn)([(0,c.watch)("current")],K.prototype,"onChangeCurrent",null),(0,n.gn)([(0,c.watch)("previous:click")],K.prototype,"onPreviousClick",null),(0,n.gn)([(0,c.watch)("next:click")],K.prototype,"onNextClick",null),(0,n.gn)([c.autobind],K.prototype,"onKeyPress",null),K=D=(0,n.gn)([c.component],K);let U=class extends T.Hr{className(){return"ContextMenuManager"}onFolderContext(t,e){return this.buildContextItemMenu(this.getFolderContextActions(t),e),!1}onItemContext(t,e,s){return this.buildContextItemMenu(this.getItemContextActions(t),s),!1}onSourceContext(t,e){return this.buildContextItemMenu(this.getSourceContextActions(t),e),!1}buildContextItemMenu(t,e){if(!this.j.o.contextMenu)return;const s=(0,L.L)(this.j).setMod("theme",this.j.state.theme);s.show(e.clientX,e.clientY,t.filter((t=>t&&!1!==t.enabled))),this.j.e.on(this.j,"afterClose",(()=>{s.isOpened&&s.close()}))}getItemContextActions(t){if(this.j.stateManager.isActive(t)||this.j.stateManager.addActive(t,this.j.state.activeElements.length>1),"folder"===t.type)return this.getFolderContextActions({type:"directory",children:[],name:t.name||"",path:t.path,sourceName:t.sourceName});const e=this.j.options,s=this.j.dataProvider,i=1===this.j.state.activeElements.length;return[{icon:"pencil",title:"Edit",enabled:!!t.isImage&&e.editImage&&i&&(s.canI("ImageResize")||s.canI("ImageCrop")),exec:()=>{B.r.call(this.j,t.imageURL,t.name||"",this.j.state.currentPath,this.j.state.currentSource)}},{icon:"italic",title:"Rename",enabled:s.canI("FileRename")&&i,exec:()=>this.j.e.fire("fileRename.filebrowser",t)},{icon:"bin",title:"Delete",enabled:s.canI("FileRemove"),exec:()=>this.j.e.fire("fileRemove.filebrowser",t)},{icon:"eye",title:"Preview",enabled:!!t.isImage&&e.preview&&i,exec:()=>{K.open(this.j,t,this.j.state.elements)}},{icon:"upload",title:"Download",exec:()=>{t.fileURL&&this.j.ow.open(t.fileURL)}}]}getFolderContextActions(t){const e=this.j.dataProvider;return[{icon:"pencil",title:"Rename",exec:()=>{this.j.e.fire("folderRename.filebrowser",t)},enabled:e.canI("FolderRename")},{icon:"bin",title:"Delete",exec:()=>{this.j.e.fire("folderRemove.filebrowser",t)},enabled:e.canI("FolderRemove")},{icon:"plus",title:"Add folder",exec:()=>{this.j.e.fire("folderCreate.filebrowser",t)},enabled:e.canI("FolderCreate")}]}getSourceContextActions(t){return[{icon:"plus",title:"Create folder",exec:()=>{this.j.e.fire("folderCreate.filebrowser",t)}}]}};(0,n.gn)([(0,c.watch)(":contextmenuFolder.filebrowser")],U.prototype,"onFolderContext",null),(0,n.gn)([(0,c.watch)(":contextmenuItem.filebrowser")],U.prototype,"onItemContext",null),(0,n.gn)([(0,c.watch)(":contextmenuSource.filebrowser")],U.prototype,"onSourceContext",null),U=(0,n.gn)([c.component],U);const A=t=>{const e=t.split("/").filter((t=>t.length));return e.pop(),e.join("/")||"/"};let Y=class extends l.Vq{constructor(t){super((0,u.ConfigProto)(Object.assign(t||{},{resizable:!0,draggable:!0,toolbarButtons:null==t?void 0:t.buttons,buttons:Jodit.atom(["filebrowser.settings","fullsize","dialog.close"])}),z.D.defaultOptions.filebrowser)),this.dataProvider=(0,L.S)(this,this.options),this.state=h.ObserveObject.create({onSelectCallBack(){},theme:"default",showSideBar:!0,showFavorites:!0,showSettings:!1,withFolders:!0,foldersPosition:"bottom",info:"",currentPath:"",currentSource:"",currentBaseUrl:"",history:[],historyIndex:0,tree:[],activeElements:[],favorites:[],progress:0,lastSelectedIndex:0,elements:[],messages:[],sources:[],view:"tiles",tileSize:"default",sortBy:"name-asc",filterWord:"",onlyImages:!1},["state"]),this.persistent=new H(this,this.state),this.stateManager=new _(this.state),this.historyManager=new O(this,this.state),this.contextMenuManager=new U(this),this.header=new R(this,this.options,this.stateManager),this.panel=new E(this,this.stateManager),this.progressbar=new N(this,this.stateManager.state),this.offset=0,this.countInOneChunk=20,this.stopLoadingParts=!1,!this.persistent.theme&&this.options.theme&&(this.persistent.theme=this.options.theme),this.panel.append(this.progressbar),this.toolbar.setMod("mode","header"),this.setSize(Math.min(this.options.width,screen.width),Math.min(this.options.height,screen.height)).setHeader(this.header),this.onResizeWindow(),this.initUploader(),this.onChangeTheme(),this.fullFillOptions(),this.dataProvider.onProgress((t=>{0===t&&(t=30),this.state.progress=t})),this.e.on("beforeClose",this.removeGlobalListeners)}className(){return"FileBrowserPro"}lock(t="any"){return this.container.classList.add("jodit_disabled"),super.lock(t)}unlock(){return this.container.classList.remove("jodit_disabled"),super.unlock()}status(t,e=!(t instanceof Error)){const s={message:(0,u.isString)(t)?t:t.message,type:e?"success":"error"};this.stateManager.addMessage(s),this.async.setTimeout((()=>{this.stateManager.removeMessage(s)}),this.options.howLongShowMsg)}onResizeWindow(){(0,u.css)(this.dialog,{maxWidth:screen.width,minHeight:Math.min(this.options.height,screen.height),minWidth:Math.min(this.options.width,screen.width)})}async open(t,e){return this.prepareOpening(t),super.open(this.panel.container),this.onUpdateFileBrowser()}onChangeTheme(){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}onToggleSettings(){this.state.showSettings=!this.state.showSettings}async onUpdateFileBrowser(){this.state.activeElements=[],this.panel.setMod("loading",!0),await Promise.all([this.loadFolders(),this.loadItems()]),this.panel.setMod("loading",!1),this.historyManager.updateHistory()}async loadFolders(){if(!this.isOpened)return;const{currentPath:t,currentSource:e}=this.state;this.historyManager.push();try{this.uploader.setPath(t),this.uploader.setSource(e);const s=await this.dataProvider.tree(t,e);this.stateManager.fillSources(s,t),this.historyManager.updateHistory(),this.state.sources=s}catch(t){this.status(t)}}async loadItems(){if(this.isOpened)try{for(this.offset=0,this.stopLoadingParts=!1,this.state.elements=await this.loadPartItems(),this.stopLoadingParts=this.countInOneChunk>this.state.elements.length;!this.stopLoadingParts&&this.panel.countInColumn*this.panel.countInRow>this.state.elements.length;)await this.loadItemsChunk();this.historyManager.updateHistory()}catch(t){this.status(t)}}async loadItemsChunk(){if(!this.stopLoadingParts)try{this.offset+=this.countInOneChunk;const t=await this.loadPartItems();this.stopLoadingParts=this.countInOneChunk>t.length,t.length&&(this.state.elements=this.state.elements.concat(t))}catch(t){this.status(t)}}prepareOpening(t){this.registerGlobalListeners(),this.state.onSelectCallBack=e=>{this.close(),null==t||t(e)},this.persistent.syncWithState()}registerGlobalListeners(){this.e.on(this.ow,"keydown",this.onKeyPress)}onKeyPress(t){const{activeElement:e}=this.od;if(!this.state.activeElements.length||!e||!h.Dom.isOrContains(this.panel.items.container,e))return;const s=this.state.elements;switch(t.key){case P.KEY_ENTER:return this.onChooseItems();case P.KEY_DELETE:return this.onFileRemove();case P.KEY_RIGHT:case P.KEY_LEFT:case P.KEY_DOWN:case P.KEY_UP:{const e=t.key===P.KEY_RIGHT||t.key===P.KEY_DOWN,i=this.state.lastSelectedIndex;let n;if([P.KEY_RIGHT,P.KEY_LEFT].includes(t.key))n=e?s[i+1]?i+1:0:s[i-1]?i-1:s.length-1;else{const{countInRow:t}=this.panel;n=Math.round(((i+1)/t+(e?1:-1))*t-1)}return s[n]&&this.stateManager.addActive(s[n],t.shiftKey),!1}}}removeGlobalListeners(){this.e.off(this.ow,"keydown",this.onKeyPress)}onFileRemove(){this.state.activeElements.length&&(0,h.Confirm)(this.i18n("Are you sure?"),"",(t=>{if(t){const t=[];this.state.activeElements.forEach((e=>{this.stateManager.isFavorite(e)&&this.stateManager.toggleFavorite(e),t.push(this.deleteFile(e.file||e.name||"",e.sourceName))})),this.state.activeElements=[],Promise.all(t).then((()=>this.loadItems()))}})).bindDestruct(this)}onFileEdit(){if(1===this.state.activeElements.length){const[t]=this.state.activeElements;B.r.call(this,t.fileURL,t.file||"",t.path,t.sourceName,void 0,this.status)}}onFolderRename(t){(0,h.Prompt)(this.i18n("Enter new name"),this.i18n("Rename"),(e=>{if(!(0,u.isValidName)(e)||e===t.name)return this.status(this.i18n("Enter new name")),!1;this.dataProvider.folderRename(A(t.path),t.name,e,t.sourceName).then((s=>{this.state.activeElements=[],this.status(s,!0),this.state.currentPath=A(t.path)+"/"+e,this.state.currentSource=t.sourceName,this.loadFolders()})).catch(this.status)}),this.i18n("type name"),t.name).bindDestruct(this)}onFolderRemove(t){(0,h.Confirm)(this.i18n("Are you sure?"),this.i18n("Delete"),(e=>{e&&this.dataProvider.folderRemove(A(t.path),t.name,t.sourceName).then((e=>{this.status(e,!0),this.state.currentPath=A(t.path),this.state.currentSource=t.sourceName,this.loadFolders()})).catch(this.status)})).bindDestruct(this)}onFolderCreate(t){(0,h.Prompt)(this.i18n("Enter Directory name"),this.i18n("Create directory"),(e=>{const s=t.path||"/";this.dataProvider.createFolder(e,t.path||"/",t.sourceName).then((()=>{this.state.currentSource===t.sourceName&&this.state.currentPath===s?this.onUpdateFileBrowser():(this.state.currentSource=t.sourceName,this.state.currentPath=s)}),this.status)}),this.i18n("type name")).bindDestruct(this)}onFileRename(t){const e=t.file||t.name||"";1===this.state.activeElements.length&&e&&(0,h.Prompt)(this.i18n("Enter new name"),this.i18n("Rename"),(t=>{if(!(0,u.isValidName)(t))return this.status(this.i18n("Enter new name")),!1;this.dataProvider.fileRename(this.state.currentPath,e,t,this.state.currentSource).then((t=>{this.state.activeElements=[],this.status(t,!0),this.loadItems()})).catch(this.status)}),this.i18n("type name"),e).bindDestruct(this)}onChooseItems(){const t=this.stateManager.state.activeElements;if(t.length){if("folder"===t[0].type)return this.state.currentPath=this.state.currentPath+"/"+t[0].name,void(this.state.currentSource=t[0].sourceName);this.stateManager.callSelectHandler()}}deleteFile(t,e){return this.dataProvider.fileRemove(this.state.currentPath,t,e).then((e=>{this.status(e||this.i18n('File "%s" was deleted',t),!0)})).catch(this.status)}initUploader(){const t=this,e=(0,u.ConfigProto)(t.o.uploader||{},z.D.defaultOptions.uploader),s=()=>this.loadItems();t.uploader=t.getInstance("Uploader",e),t.uploader.bind(t.panel.container,s,t.status),t.e.on("bindUploader.filebrowser",(e=>{t.uploader.bind(e,s,t.status)}))}destruct(){this.removeGlobalListeners(),this.header.destruct(),this.panel.destruct(),super.destruct()}fullFillOptions(){["getLocalFileByUrl","crop","resize","create","fileMove","folderMove","fileRename","folderRename","fileRemove","folderRemove","folder","items","permissions"].forEach((t=>{null!=this.options[t]&&(this.options[t]=(0,u.ConfigProto)(this.options[t],this.o.ajax))}))}loadPartItems(){return this.dataProvider.items(this.state.currentPath,this.state.currentSource,{offset:this.offset,limit:this.countInOneChunk,sortBy:this.state.sortBy,withFolders:this.state.withFolders,foldersPosition:this.state.foldersPosition,onlyImages:this.state.onlyImages,filterWord:this.state.filterWord})}};(0,n.gn)([c.autobind],Y.prototype,"status",null),(0,n.gn)([(0,c.watch)(":resize",window)],Y.prototype,"onResizeWindow",null),(0,n.gn)([(0,c.watch)("state.theme")],Y.prototype,"onChangeTheme",null),(0,n.gn)([(0,c.watch)(":toggleSettings.filebrowser")],Y.prototype,"onToggleSettings",null),(0,n.gn)([(0,c.watch)(":update.filebrowser")],Y.prototype,"onUpdateFileBrowser",null),(0,n.gn)([(0,c.watch)(["state.currentPath","state.currentSource"]),(0,c.debounce)((t=>({timeout:t.defaultTimeout,promisify:!0})))],Y.prototype,"loadFolders",null),(0,n.gn)([(0,c.watch)(["state.currentPath","state.currentSource","state.sortBy","state.onlyImages","state.foldersPosition","state.filterWord"]),(0,c.debounce)((t=>({timeout:t.defaultTimeout,promisify:!0})))],Y.prototype,"loadItems",null),(0,n.gn)([(0,c.debounce)((t=>({timeout:t.defaultTimeout,promisify:!0})))],Y.prototype,"loadItemsChunk",null),(0,n.gn)([c.autobind],Y.prototype,"onKeyPress",null),(0,n.gn)([c.autobind],Y.prototype,"removeGlobalListeners",null),(0,n.gn)([(0,c.watch)(":fileRemove.filebrowser")],Y.prototype,"onFileRemove",null),(0,n.gn)([(0,c.watch)(":edit.filebrowser")],Y.prototype,"onFileEdit",null),(0,n.gn)([(0,c.watch)(":folderRename.filebrowser")],Y.prototype,"onFolderRename",null),(0,n.gn)([(0,c.watch)(":folderRemove.filebrowser")],Y.prototype,"onFolderRemove",null),(0,n.gn)([(0,c.watch)(":folderCreate.filebrowser")],Y.prototype,"onFolderCreate",null),(0,n.gn)([(0,c.watch)(":fileRename.filebrowser")],Y.prototype,"onFileRename",null),(0,n.gn)([(0,c.watch)(":select.filebrowser")],Y.prototype,"onChooseItems",null),Y=(0,n.gn)([c.component],Y);var q=s(1);(0,s(20).xl)(s(170));const V=z.D.prototype.controls.filebrowser;V.settings={icon:"settings",exec(t){t.e.fire("toggleSettings.filebrowser")}},V.home={icon:"home",exec(t){t.e.fire("goHome.filebrowser")}},V.next={icon:"angle-right",isDisabled(t){if(!t.state)return!0;const{history:e,historyIndex:s}=t.state;return!e||!e.length||s===e.length-1},exec(t){t.e.fire("next.filebrowser")}},V.previous={icon:"angle-left",isDisabled(t){if(!t.state)return!0;const{history:e,historyIndex:s}=t.state;return!e||!e.length||0===s},exec(t){t.e.fire("previous.filebrowser")}},Object.assign(z.D.prototype.filebrowser,{buttons:["filebrowser.home","filebrowser.previous","filebrowser.next","|","filebrowser.upload","filebrowser.remove","filebrowser.update","filebrowser.select","filebrowser.edit","|","about"],sort:!1,pixelOffsetLoadNewChunk:200,width:715,height:400});class W extends i.S{constructor(){super(...arguments),this.requires=["license"],this.hasStyle=!0}afterInit(t){t.e.on("getInstanceFileBrowser",(t=>(this.__instance||(this.__instance=new Y(t)),this.__instance)))}beforeDestruct(t){t.e.off("getInstanceFileBrowser")}}q.Jodit.plugins.add("finder",W)},170(t,e,s){"use strict";s.r(e),s.d(e,{ru:()=>i});const i=s(171)},169(t,e,s){"use strict";function i(t,e,s,i){var n,o=arguments.length,a=3>o?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,s,i);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(a=(3>o?n(a):o>3?n(e,s,a):n(e,s))||a);return o>3&&a&&Object.defineProperty(e,s,a),a}s.d(e,{gn:()=>i})},171(t){t.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":"Размер плитки"}},167(t){t.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>'},168(t){t.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>'}},0,[[166,670]]])})); | ||
((t,e)=>{if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var s=e();for(var i in s)("object"==typeof exports?exports:t)[i]=s[i]}})(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[524],{167(t,e,s){"use strict";s.r(e),s.d(e,{finder:()=>G});var i=s(56),n=s(170),o=s(26),a=s(168),r=s(169);o.JO.set("heart",a+""),o.JO.set("home",r+"");var h=s(4),l=s(47),c=s(36),d=s(59),u=s(13);let m=class extends o.u1{constructor(t,e){super(t),this.item=d.Z.create(e),t.e.on(this.container,"click contextmenu dblclick",(e=>(t.e.fire(e.type+"Item.filebrowser",this.item,(0,u.ctrlKey)(e)||e.shiftKey,e),!1)))}className(){return"UIBrowserItem"}render(){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>"}onClickFavorite(){return this.bubble((t=>{this.jodit.e.fire(t,"toggleFavoriteItem",this.item)})),!1}onAction(t){return this.jodit.e.fire(t.type+"Item.filebrowser",this.item,(0,u.ctrlKey)(t)||t.shiftKey,t),!1}update(){var t;(0,u.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,u.attr)(this.container,"title",`${this.item.file} ${this.item.time} ${this.item.size}`),super.update()}setElementValue(t,e){const s=this.getFullElName(t);let i=this.getElm(t);if(!e)return i&&h.Dom.safeRemove(i),this;if(!i){const t=this.getElm("info");i=this.j.create.div(s),t.appendChild(i)}return i.innerText=e,this}};(0,n.gn)([(0,c.watch)("heart:click")],m.prototype,"onClickFavorite",null),(0,n.gn)([(0,c.watch)(["container:click","container:contextmenu","container:dblclick"])],m.prototype,"onAction",null),m=(0,n.gn)([c.component],m);var g,p=s(18);let v=g=class extends o.qe{constructor(t,e){super(t),this.stateManager=e,this.syncMod=!0,this.addItemsSelector()}className(){return"UIVirtualScroll"}render(){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>"}build(t){const e=this.elements.findIndex(((e,s)=>!t[s]||e.item.uniqueHashKey!==d.Z.create(t[s]).uniqueHashKey));if(e>-1){for(let t=e;this.elements.length>t;t+=1)this.elements[t].destruct();this.elements.length=e}t.slice(e>-1?e:this.elements.length).forEach((t=>{const e=new m(this.jodit,t);Object.keys(this.mods).forEach((t=>{e.setMod(t,this.mods[t])})),this.append(e)})),this.setMod("empty",!this.elements.length)}onScrollLoadChunk(){!this.stateManager.isFavoriteItems&&this.j.o.pixelOffsetLoadNewChunk>this.container.scrollHeight-(this.container.scrollTop+this.container.offsetHeight)&&this.j.loadItemsChunk()}onDragOver(t){t.preventDefault(),this.setMod("dragover",!0)}onDragLeave(t){t.preventDefault(),this.setMod("dragover",!1)}addItemsSelector(){(class{static remove(t){p.i.safeRemove(t.container.querySelector(".jodit-ui-select-items")),t.j.e.off(t.container,"mousedown.uiselectitems touchstart.uiselectitems")}static install(t){const e=t.j.c.div("jodit-ui-select-items");t.j.e.on(t.container,"mousedown.uiselectitems touchstart.uiselectitems",this.onStartSelect.bind(this,t,e))}static onStartSelect(t,e,s){if(s.target!==t.container)return;(0,u.css)(e,{width:0,height:0}),t.container.appendChild(e);const i={x:s.clientX,y:s.clientY,w:t.container.offsetWidth,h:t.container.offsetHeight},n=t.j.async.throttle(this.onSelect.bind(this,t,e,i),t.j.defaultTimeout/10);t.j.lock(),t.j.e.on(t.j.ow,"mousemove touchmove",n).one(t.j.ow,"mouseup touchend",this.onEndSelect.bind(this,t,e,n)),t.onSelectItems({left:i.x,top:i.y,width:0,height:0})}static onSelect(t,e,s,i){const n={left:s.x>i.clientX?i.clientX:s.x,top:s.y>i.clientY?i.clientY:s.y,width:Math.abs(s.x-i.clientX),height:Math.abs(s.y-i.clientY)};(0,u.css)(e,n),t.onSelectItems(n)}static onEndSelect(t,e,s,i){p.i.safeRemove(e),t.j.e.off(t.j.ow,"mousemove touchmove",s),t.j.unlock()}}).install(this)}static intersectRect(t,e){return!(e.left>t.left+t.width||t.left>e.left+e.width||e.top>t.top+t.height||t.top>e.top+e.height)}onSelectItems(t){const e=[];this.elements.forEach((s=>{const i=(0,u.position)(s.container);g.intersectRect(i,t)&&e.push(s.item)})),this.stateManager.state.activeElements=e}};(0,n.gn)([(0,c.watch)("resize"),(0,c.watch)("container:scroll"),(0,c.throttle)()],v.prototype,"onScrollLoadChunk",null),(0,n.gn)([(0,c.watch)("container:dragover")],v.prototype,"onDragOver",null),(0,n.gn)([(0,c.watch)(["container:dragleave","container:drop"])],v.prototype,"onDragLeave",null),v=g=(0,n.gn)([c.component],v);let f=class extends o.u1{className(){return"UIBrowserMessage"}constructor(t,e){super(t),this.container.innerText=(0,u.isString)(e)?e:e.message}};f=(0,n.gn)([c.component],f);let w=class extends o.qe{className(){return"UIBrowserMessages"}build(t){this.clear(),t.forEach((t=>{const e=new f(this.jodit,t.message);e.setMod("type",t.type),this.append(e)}))}};w=(0,n.gn)([c.component],w);class y{static remove(t){(0,u.css)(t.container,{width:null,height:null}),t.container.classList.remove("jodit-ui-resize"),p.i.safeRemove(t.container.querySelector(".jodit-ui-resize__handle"))}static install(t,e){t.container.classList.add("jodit-ui-resize"),"static"===(0,u.css)(t.container,"position")&&(0,u.css)(t.container,"position","relative");const s=t.j.c.div("jodit-ui-resize__handle");s.classList.add("jodit-ui-resize__handle_type_"+e),t.container.appendChild(s),t.j.e.on(s,"mousedown touchstart",this.onStartResize.bind(this,t,e))}static onStartResize(t,e,s){const i=t.j.async.throttle(this.onResize.bind(this,t,{x:s.clientX,y:s.clientY,w:t.container.offsetWidth,h:t.container.offsetHeight,direction:e}),t.j.defaultTimeout/10);t.j.lock(),t.j.e.on(t.j.ow,"mousemove touchmove",i).one(t.j.ow,"mouseup touchend",this.onEndResize.bind(this,t,i))}static onResize(t,e,s){const i=["left","right"].includes(e.direction);(0,u.css)(t.container,i?"width":"height",i?e.w+(s.clientX-e.x):e.h+(s.clientY-e.y))}static onEndResize(t,e,s){t.j.e.off(t.j.ow,"mousemove touchmove",e),t.j.unlock()}}let b=class extends o.qe{constructor(t,e,s){super(t,e),this.state=s,this.onChangeFavorites()}className(){return"UISidebar"}render(){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>"}appendChildToContainer(t){this.getElm("box").appendChild(t)}addResize(){y.remove(this),y.install(this,screen.width>450?"right":"bottom")}onChangeFavorites(){this.setMod("has-favorites",!!this.state.favorites.length)}onClickHideButton(){return this.state.showSideBar=!this.state.showSideBar,!1}onClickFavorites(){return this.state.elements=this.state.favorites,!1}};(0,n.gn)([(0,c.hook)("ready"),(0,c.watch)(":resize",window),(0,c.debounce)()],b.prototype,"addResize",null),(0,n.gn)([(0,c.watch)("state.favorites")],b.prototype,"onChangeFavorites",null),(0,n.gn)([(0,c.watch)("hide-btn:click")],b.prototype,"onClickHideButton",null),(0,n.gn)([(0,c.watch)("favorites:click")],b.prototype,"onClickFavorites",null),b=(0,n.gn)([c.component],b);let C=class extends o.qe{constructor(t,e){super(t),this.state=e,t.e.on(this.getElm("close"),"click",(()=>{this.state.showSettings=!1}))}className(){return"UIBrowserSettings"}render(){return`<div>\n\t\t\t<div class="${this.getFullElName("close")}">${o.JO.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>`}appendChildToContainer(t){this.getElm("options").appendChild(t)}setMod(t,e){return"hidden"===t&&!1===e&&this.generateSettings(),super.setMod(t,e)}onChangeView(){const t=this.getElm("tile-size");t&&(t.style.display="tiles"===this.state.view?"block":"none")}generateSettings(){this.clear();const{j:t}=this;this.append([new o.BO(t,{label:"Theme",name:"theme",value:this.state.theme,radio:!0,options:[{value:"default",text:"Light"},{value:"dark",text:"Dark"}],onChange:t=>{this.state.theme=t[0].value}}),new o.BO(t,{label:"Show favorites",name:"showFavorites",value:this.state.showFavorites,radio:!0,options:[{value:!0,text:"Show"},{value:!1,text:"Hide"}],onChange:t=>{this.state.showFavorites=t[0].value}}),new o.BO(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:t=>{this.state.view=t[0].value}}),new o.BO(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:t=>{this.state.foldersPosition=t[0].value}}),new o.Cj(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:t=>{this.state.sortBy=t}}),new o.Cj(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:t=>{this.state.tileSize=t}})]),this.onChangeView()}};(0,n.gn)([(0,c.watch)("state.view")],C.prototype,"onChangeView",null),C=(0,n.gn)([c.component],C);let S=class extends o.u1{constructor(t,e){super(t),this.item=e,this.syncMod=!0,this.getElm("name").innerText=e.name,t.e.on(this.container,"click",(()=>(this.getMod("active")||this.setMod("loading",!0),t.e.fire("openFolder",e)))).on(this.container,"contextmenu",(s=>t.e.fire("contextmenuFolder.filebrowser",e,s)))}className(){return"UIBrowserFolder"}render(){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>'}};var x;S=(0,n.gn)([c.component],S);let I=x=class extends o.qe{constructor(t,e){super(t),this.syncMod=!0,this.build(e)}className(){return"UITree"}build(t){this.clear(),t.forEach((t=>{const e=new S(this.jodit,t);this.append(e),t.isActive&&e.setMod("active",!0),t.children.length&&this.append(new x(this.jodit,t.children))}))}};I=x=(0,n.gn)([c.component],I);let M=class extends o.u1{constructor(t,e){super(t,e),this.data=e,this.tree=new I(this.j,this.data.children),this.syncMod=!0,this.getElm("name").innerText=e.title||e.name,this.getElm("tree").appendChild(this.tree.container),t.e.on(this.container,"contextmenu",(s=>t.e.fire("contextmenuSource.filebrowser",e,s)))}className(){return"UIBrowserSource"}render(){return'<div>\n\t\t\t<div class="&__name"></div>\n\t\t\t<div class="&__tree"></div>\n\t\t</div>'}};M=(0,n.gn)([c.component],M);let F=class extends o.qe{constructor(){super(...arguments),this.syncMod=!0}className(){return"UIBrowserSources"}build(t){this.clear(),t.forEach((t=>{this.append(new M(this.jodit,t))}))}};F=(0,n.gn)([c.component],F);let j=class extends o.u1{className(){return"UIBrowserStatusBar"}render(){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>"}value(t,e="left"){return this.getElm("slot-"+e).innerText=t,this}};j=(0,n.gn)([c.component],j);let E=class extends o.qe{constructor(t,e){super(t),this.stateManager=e,this.syncMod=!0,this.sources=new F(this.j),this.sidebar=new b(this.jodit,[this.sources],this.stateManager.state),this.statusbar=new j(this.j),this.items=new v(this.j,this.stateManager),this.settings=new C(this.jodit,this.stateManager.state),this.messages=new w(this.j),this.state=e.state,this.append(this.sidebar,"content"),this.append(this.items,"content"),this.append(this.messages,"footer"),this.append(this.settings,"content"),this.append(this.statusbar,"footer"),this.onChangeElements(),this.onChangeSources(),this.onChangeView(),this.onChangeTileSize(),this.onChangeShowFavorites(),this.onChangeMessages(),this.onChangeActiveElements(),this.onChangeFavorites(),this.onChangeShowSideBar(),this.onChangeShowSettings(),this.onChangeTheme()}className(){return"UIBrowserPanel"}get countInRow(){const{container:t}=this.items.elements[0],e=(0,u.css)(t,"marginLeft");return Math.floor(this.items.container.offsetWidth/(t.offsetWidth+((0,u.isNumber)(e)?e:0)))}get countInColumn(){const{container:t}=this.items.elements[0],e=(0,u.css)(t,"marginTop");return Math.floor(this.items.container.offsetHeight/(t.offsetHeight+((0,u.isNumber)(e)?e:0)))}render(){return"<div>\n\t\t\t<div class='&__content'></div>\n\t\t\t<div class='&__footer'></div>\n\t\t</div>"}onChangeTheme(){this.setMod("theme",this.stateManager.state.theme)}onChangeElements(){this.items.build(this.stateManager.state.elements)}onChangeActiveElements(){this.state.activeElements.length||(this.state.info=""),this.items.elements.forEach((t=>{t.setMod("active",!!this.stateManager.isActive(t.item))})),this.j.e.fire("changeSelection")}onChangeFavorites(){this.items.elements.forEach((t=>{t.setMod("favorite",!!this.stateManager.isFavorite(t.item))}))}onChangeSources(){this.sources.build(this.stateManager.state.tree)}onChangeLastSelectedIndex(){var t;const e=null===(t=this.items.elements[this.stateManager.state.lastSelectedIndex])||void 0===t?void 0:t.container;e&&((0,u.scrollIntoViewIfNeeded)(e,this.items.container,this.j.od),e.focus())}onChangeInfo(){this.statusbar.value(this.state.info,"center")}onChangePathOrSource(){this.statusbar.value(this.state.currentPath?`${this.state.currentPath} (${this.state.currentSource})`:this.i18n("Home"),"left")}onChangeShowSettings(){this.settings.setMod("hidden",!this.stateManager.state.showSettings)}onChangeShowSideBar(){this.sidebar.setMod("hidden",!this.stateManager.state.showSideBar)}onChangeView(){this.items.setMod("view",this.stateManager.state.view)}onChangeTileSize(){this.items.setMod("size",this.stateManager.state.tileSize)}onChangeShowFavorites(){this.sidebar.setMod("show-favorites",this.stateManager.state.showFavorites),this.items.setMod("show-favorites",this.stateManager.state.showFavorites)}onChangeMessages(){this.messages.build(this.stateManager.state.messages)}onItemDblClick(){return this.j.e.fire("select.filebrowser"),!1}onItemClick(t,e){this.stateManager.addActive(t,e)}onToggleFavoriteItem(t){this.stateManager.toggleFavorite(t)}onFolderClick(t){this.stateManager.state.currentSource=t.sourceName,this.stateManager.state.currentPath=t.path||"/"}};(0,n.gn)([(0,c.watch)("state.theme")],E.prototype,"onChangeTheme",null),(0,n.gn)([(0,c.watch)("state.elements")],E.prototype,"onChangeElements",null),(0,n.gn)([(0,c.watch)("state.activeElements")],E.prototype,"onChangeActiveElements",null),(0,n.gn)([(0,c.watch)(["state.favorites","state.elements"])],E.prototype,"onChangeFavorites",null),(0,n.gn)([(0,c.watch)("state.sources")],E.prototype,"onChangeSources",null),(0,n.gn)([(0,c.watch)("state.lastSelectedIndex")],E.prototype,"onChangeLastSelectedIndex",null),(0,n.gn)([(0,c.watch)("state.info")],E.prototype,"onChangeInfo",null),(0,n.gn)([(0,c.watch)(["state.currentPath","state.currentSource"])],E.prototype,"onChangePathOrSource",null),(0,n.gn)([(0,c.watch)("state.showSettings")],E.prototype,"onChangeShowSettings",null),(0,n.gn)([(0,c.watch)("state.showSideBar")],E.prototype,"onChangeShowSideBar",null),(0,n.gn)([(0,c.watch)("state.view")],E.prototype,"onChangeView",null),(0,n.gn)([(0,c.watch)("state.tileSize")],E.prototype,"onChangeTileSize",null),(0,n.gn)([(0,c.watch)("state.showFavorites")],E.prototype,"onChangeShowFavorites",null),(0,n.gn)([(0,c.watch)("state.messages")],E.prototype,"onChangeMessages",null),(0,n.gn)([(0,c.watch)(":dblclickItem.filebrowser")],E.prototype,"onItemDblClick",null),(0,n.gn)([(0,c.watch)(":clickItem.filebrowser")],E.prototype,"onItemClick",null),(0,n.gn)([(0,c.watch)(":toggleFavoriteItem")],E.prototype,"onToggleFavoriteItem",null),(0,n.gn)([(0,c.watch)(":openFolder")],E.prototype,"onFolderClick",null),E=(0,n.gn)([c.component],E);var P=s(3);class k{constructor(t){this.state=t}getIndex(t,e=this.state.elements){return e.findIndex((e=>e.uniqueHashKey===t.uniqueHashKey))}isActive(t){return!!this.state.activeElements.find((e=>e.uniqueHashKey===t.uniqueHashKey))}isFavorite(t){return!!this.state.favorites.find((e=>e.uniqueHashKey===t.uniqueHashKey))}addActive(t,e){var s;this.state.info=null!==(s=t.file)&&void 0!==s?s:"",this.state.lastSelectedIndex=this.getIndex(t),this.state.activeElements=e?[...this.state.activeElements,t]:[t]}callSelectHandler(){var t;const e=this.state.activeElements;null===(t=this.state.onSelectCallBack)||void 0===t||t.call(this,{baseurl:"",files:e.map((t=>t.fileURL)),isImages:e.map((t=>!!t.isImage))})}setFilter(t){this.state.filterWord=t}addMessage(t){var e;const s=this.state.messages;(null===(e=s[s.length-1])||void 0===e?void 0:e.message)!==t.message&&(this.state.messages=[...s,t])}removeMessage(t){const e=this.state.messages.indexOf(t);if(-1!==e){const t=[...this.state.messages];t.splice(e,1),this.state.messages=t}}toggleFavorite(t){const e=this.getIndex(t,this.state.favorites),s=[...this.state.favorites];-1===e?s.push(t):s.splice(e,1),this.state.favorites=s}fillSources(t,e){const s=t=>t.filter((t=>"."!==t&&".."!==t));if(this.state.tree.length&&e){const i=(t,e)=>{var s;return null!==(s=t.find((t=>t.name===e)))&&void 0!==s?s:null};this.removeActive(this.state.tree),t.forEach((t=>{const n=i(this.state.tree,t.name);if(n){n.isActive=!0;const o=e.split("/").reduce(((t,e)=>t&&i(t.children,e)),n);o&&(o.isActive=!0,o.children=s(t.folders).map((s=>({type:"directory",name:s,path:e+"/"+s,sourceName:t.name,children:[]}))))}}))}else this.state.tree=t.map((t=>({type:"source",name:t.name,title:t.title,sourceName:t.name,path:"/",children:s(t.folders).map((e=>({type:"directory",name:e,path:e,sourceName:t.name,children:[]})))})))}removeActive(t){t.forEach((t=>{t.isActive=!1,this.removeActive(t.children)}))}get isFavoriteItems(){return this.state.favorites===this.state.elements}}(0,n.gn)([c.autobind],k.prototype,"getIndex",null),(0,n.gn)([c.autobind],k.prototype,"isActive",null),(0,n.gn)([c.autobind],k.prototype,"isFavorite",null);var _=s(51);let R=class extends o.qe{constructor(t,e,s){var i;super(t),this.options=e,this.stateManager=s,this.syncMod=!0,this.toolbar=(0,_.R)(this.j),this.filter=new o.u3(this.j,{icon:"search",placeholder:"Filter",clearButton:!0,onChange:t=>{this.stateManager.setFilter(t)}}),this.append(this.toolbar).append(this.filter),this.filter.container.classList.add(this.getFullElName("filter")),this.toolbar.setMod("mode","header").build(null!==(i=this.options.toolbarButtons)&&void 0!==i?i:[])}className(){return"UIBrowserHeader"}};R=(0,n.gn)([c.component],R);var B=s(60),z=s(2);let N=class extends o.ko{constructor(t,e){super(t),this.state=e,this.onProgress()}className(){return"UIProgress"}onProgress(){this.state.progress?this.show():this.hide(),this.progress(this.state.progress)}hide(){return this.setMod("hidden",!0),this}progress(t){return this.container.style.width=t.toFixed(2)+"%",98>t||this.j.async.setTimeout((()=>{this.hide()}),{label:"progress",timeout:300}),this}show(){return this.setMod("hidden",!1),this}};(0,n.gn)([(0,c.watch)("state.progress")],N.prototype,"onProgress",null),N=(0,n.gn)([c.component],N);var L=s(57),T=s(28);let H=class extends T.Hr{constructor(t,e){super(t),this.state=e,this.sortBy="changed-desc",this.view="tiles",this.foldersPosition="top",this.tileSize="default",this.favorites=[],this.showSideBar=!0,this.showFavorites=!0}className(){return"PersistentStore"}onChangeThemeSetField(){this.theme=this.state.theme}onChangeView(){this.view=this.state.view}onChangeSortBy(){this.sortBy=this.state.sortBy}onChangeTileSize(){this.tileSize=this.state.tileSize}onChangeFavorites(){this.favorites=this.state.favorites}onChangeShowSideBar(){this.showSideBar=this.state.showSideBar}onChangeShowFavorites(){this.showFavorites=this.state.showFavorites}onChangeFoldersPosition(){this.foldersPosition=this.state.foldersPosition}syncWithState(){this.state.tileSize=this.tileSize,this.state.favorites=this.favorites.map((t=>t instanceof d.Z?t:d.Z.create(t))),this.state.view=this.view,this.state.theme=this.theme,this.state.showSideBar=this.showSideBar,this.state.showFavorites=this.showFavorites,this.state.sortBy=this.sortBy,this.state.foldersPosition=this.foldersPosition}};(0,n.gn)([c.persistent],H.prototype,"theme",void 0),(0,n.gn)([c.persistent],H.prototype,"sortBy",void 0),(0,n.gn)([c.persistent],H.prototype,"view",void 0),(0,n.gn)([c.persistent],H.prototype,"foldersPosition",void 0),(0,n.gn)([c.persistent],H.prototype,"tileSize",void 0),(0,n.gn)([c.persistent],H.prototype,"favorites",void 0),(0,n.gn)([c.persistent],H.prototype,"showSideBar",void 0),(0,n.gn)([c.persistent],H.prototype,"showFavorites",void 0),(0,n.gn)([(0,c.watch)("state.theme")],H.prototype,"onChangeThemeSetField",null),(0,n.gn)([(0,c.watch)("state.view")],H.prototype,"onChangeView",null),(0,n.gn)([(0,c.watch)("state.sortBy")],H.prototype,"onChangeSortBy",null),(0,n.gn)([(0,c.watch)("state.tileSize")],H.prototype,"onChangeTileSize",null),(0,n.gn)([(0,c.watch)("state.favorites")],H.prototype,"onChangeFavorites",null),(0,n.gn)([(0,c.watch)("state.showSideBar")],H.prototype,"onChangeShowSideBar",null),(0,n.gn)([(0,c.watch)("state.showFavorites")],H.prototype,"onChangeShowFavorites",null),(0,n.gn)([(0,c.watch)("state.foldersPosition")],H.prototype,"onChangeFoldersPosition",null),H=(0,n.gn)([c.component],H);let O=class extends T.Hr{constructor(t,e){super(t),this.state=e}className(){return"HistoryManager"}updateHistory(){this.state.history[this.state.historyIndex]={currentSource:this.state.currentSource,currentPath:this.state.currentPath,tree:(0,u.fastClone)(this.state.tree),elements:this.state.elements}}updateState(){const{tree:t,elements:e,currentSource:s,currentPath:i}=this.state.history[this.state.historyIndex];this.state.elements=e,this.state.tree=t,this.state.currentSource=s,this.state.currentPath=i,this.j.e.fire("changeSelection")}push(){let t=[...this.state.history],{historyIndex:e}=this.state;const s=t[e];s&&s.currentSource===this.state.currentSource&&s.currentPath===this.state.currentPath||(t.length-1!==e&&(t=t.slice(0,e)),t.push({tree:[],elements:[],currentPath:this.state.currentPath,currentSource:this.state.currentSource}),s&&(e+=1),this.state.historyIndex=e,this.state.history=t,this.updateHistory(),this.j.e.fire("changeSelection"))}onNext(){this.state.history.length-1>this.state.historyIndex&&(this.state.historyIndex+=1,this.updateState())}onPrevious(){this.state.historyIndex>0&&(this.state.historyIndex-=1,this.updateState())}onHome(){this.state.currentSource="",this.state.currentPath=""}};var D;(0,n.gn)([(0,c.watch)(":next.filebrowser")],O.prototype,"onNext",null),(0,n.gn)([(0,c.watch)(":previous.filebrowser")],O.prototype,"onPrevious",null),(0,n.gn)([(0,c.watch)(":goHome.filebrowser")],O.prototype,"onHome",null),O=(0,n.gn)([c.component],O);let K=D=class extends h.UIElement{constructor(t,e,s){super(t),this.current=e,this.elements=s,this.dialog=new h.Dialog;const{dialog:i}=this;i.setMod("theme",t.state.theme).toolbar.setMod("mode","header"),i.open(this),this.elements=this.elements.filter((t=>t.isImage)),i.e.on("afterClose",(()=>{this.destruct()})),this.addGlobalListeners(),this.onChangeCurrent(),i.toolbar.build([{icon:"check",exec:()=>{t.stateManager.addActive(this.current,!1),t.e.fire("select.filebrowser"),i.close()}},"dialog.close"])}className(){return"UILightBox"}render(){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>"}async onChangeCurrent(){const{current:t}=this;this.setMod("loading",!0);const e=await(0,u.loadImage)(t.fileURL,this.j);this.dialog.setPosition(),(0,u.css)(this.getElm("preview"),{width:Math.min(this.jodit.ow.innerWidth,e.naturalWidth),height:Math.min(this.jodit.ow.innerHeight-100,e.naturalHeight),backgroundImage:`url(${e.src})`}),this.dialog.setSize(),this.dialog.setPosition(),this.setMod("loading",!1)}onPreviousClick(){const{current:t}=this;let e=this.j.stateManager.getIndex(t,this.elements);e>0?e-=1:e=this.elements.length-1,this.current=this.elements[e]}onNextClick(){const{current:t}=this;let e=this.j.stateManager.getIndex(t,this.elements);this.elements.length-1>e?e+=1:e=0,this.current=this.elements[e]}static open(t,e,s){return new D(t,e,s)}addGlobalListeners(){this.j.e.on(this.j.od,"keydown",this.onKeyPress)}onKeyPress(t){if(t.key===P.KEY_LEFT||t.key===P.KEY_RIGHT||t.key===P.KEY_SPACE)return t.key===P.KEY_LEFT?this.onPreviousClick():this.onNextClick(),!1}removeGlobalListeners(){this.j.e.off(this.j.od,"keydown",this.onKeyPress)}destruct(){return this.removeGlobalListeners(),this.dialog.destruct(),super.destruct()}};(0,n.gn)([(0,c.watch)("current")],K.prototype,"onChangeCurrent",null),(0,n.gn)([(0,c.watch)("previous:click")],K.prototype,"onPreviousClick",null),(0,n.gn)([(0,c.watch)("next:click")],K.prototype,"onNextClick",null),(0,n.gn)([c.autobind],K.prototype,"onKeyPress",null),K=D=(0,n.gn)([c.component],K);let U=class extends T.Hr{className(){return"ContextMenuManager"}onFolderContext(t,e){return this.buildContextItemMenu(this.getFolderContextActions(t),e),!1}onItemContext(t,e,s){return this.buildContextItemMenu(this.getItemContextActions(t),s),!1}onSourceContext(t,e){return this.buildContextItemMenu(this.getSourceContextActions(t),e),!1}buildContextItemMenu(t,e){if(!this.j.o.contextMenu)return;const s=(0,L.L)(this.j).setMod("theme",this.j.state.theme);s.show(e.clientX,e.clientY,t.filter((t=>t&&!1!==t.enabled))),this.j.e.on(this.j,"afterClose",(()=>{s.isOpened&&s.close()}))}getItemContextActions(t){if(this.j.stateManager.isActive(t)||this.j.stateManager.addActive(t,this.j.state.activeElements.length>1),"folder"===t.type)return this.getFolderContextActions({type:"directory",children:[],name:t.name||"",path:t.path,sourceName:t.sourceName});const e=this.j.options,s=this.j.dataProvider,i=1===this.j.state.activeElements.length;return[{icon:"pencil",title:"Edit",enabled:!!t.isImage&&e.editImage&&i&&(s.canI("ImageResize")||s.canI("ImageCrop")),exec:()=>{B.r.call(this.j,t.imageURL,t.name||"",this.j.state.currentPath,this.j.state.currentSource)}},{icon:"italic",title:"Rename",enabled:s.canI("FileRename")&&i,exec:()=>this.j.e.fire("fileRename.filebrowser",t)},{icon:"bin",title:"Delete",enabled:s.canI("FileRemove"),exec:()=>this.j.e.fire("fileRemove.filebrowser",t)},{icon:"eye",title:"Preview",enabled:!!t.isImage&&e.preview&&i,exec:()=>{K.open(this.j,t,this.j.state.elements)}},{icon:"upload",title:"Download",exec:()=>{t.fileURL&&this.j.ow.open(t.fileURL)}}]}getFolderContextActions(t){const e=this.j.dataProvider;return[{icon:"pencil",title:"Rename",exec:()=>{this.j.e.fire("folderRename.filebrowser",t)},enabled:e.canI("FolderRename")},{icon:"bin",title:"Delete",exec:()=>{this.j.e.fire("folderRemove.filebrowser",t)},enabled:e.canI("FolderRemove")},{icon:"plus",title:"Add folder",exec:()=>{this.j.e.fire("folderCreate.filebrowser",t)},enabled:e.canI("FolderCreate")}]}getSourceContextActions(t){return[{icon:"plus",title:"Create folder",exec:()=>{this.j.e.fire("folderCreate.filebrowser",t)}}]}};(0,n.gn)([(0,c.watch)(":contextmenuFolder.filebrowser")],U.prototype,"onFolderContext",null),(0,n.gn)([(0,c.watch)(":contextmenuItem.filebrowser")],U.prototype,"onItemContext",null),(0,n.gn)([(0,c.watch)(":contextmenuSource.filebrowser")],U.prototype,"onSourceContext",null),U=(0,n.gn)([c.component],U);const A=t=>{const e=t.split("/").filter((t=>t.length));return e.pop(),e.join("/")||"/"};var V=s(1),Y=s(166);let q=class extends l.Vq{constructor(t){super((0,u.ConfigProto)(Object.assign(t||{},{resizable:!0,draggable:!0,toolbarButtons:null==t?void 0:t.buttons,license:z.D.defaultOptions.license,buttons:V.Jodit.atom(["filebrowser.settings","fullsize","dialog.close"])}),z.D.defaultOptions.filebrowser)),this.dataProvider=(0,L.S)(this,this.options),this.state=h.ObserveObject.create({onSelectCallBack(){},theme:"default",showSideBar:!0,showFavorites:!0,showSettings:!1,withFolders:!0,foldersPosition:"bottom",info:"",currentPath:"",currentSource:"",currentBaseUrl:"",history:[],historyIndex:0,tree:[],activeElements:[],favorites:[],progress:0,lastSelectedIndex:0,elements:[],messages:[],sources:[],view:"tiles",tileSize:"default",sortBy:"name-asc",filterWord:"",onlyImages:!1},["state"]),this.persistent=new H(this,this.state),this.stateManager=new k(this.state),this.historyManager=new O(this,this.state),this.contextMenuManager=new U(this),this.header=new R(this,this.options,this.stateManager),this.panel=new E(this,this.stateManager),this.progressbar=new N(this,this.stateManager.state),this.offset=0,this.countInOneChunk=20,this.stopLoadingParts=!1,Y.V.make(this),!this.persistent.theme&&this.options.theme&&(this.persistent.theme=this.options.theme),this.panel.append(this.progressbar),this.toolbar.setMod("mode","header"),this.setSize(Math.min(this.options.width,screen.width),Math.min(this.options.height,screen.height)).setHeader(this.header),this.onResizeWindow(),this.initUploader(),this.onChangeTheme(),this.fullFillOptions(),this.dataProvider.onProgress((t=>{0===t&&(t=30),this.state.progress=t})),this.e.on("beforeClose",this.removeGlobalListeners),this.e.fire("afterInit"),V.Jodit.prototype.afterInitHook.call(this)}className(){return"FileBrowserPro"}lock(t="any"){return this.container.classList.add("jodit_disabled"),super.lock(t)}unlock(){return this.container.classList.remove("jodit_disabled"),super.unlock()}status(t,e=!(t instanceof Error)){const s={message:(0,u.isString)(t)?t:t.message,type:e?"success":"error"};this.stateManager.addMessage(s),this.async.setTimeout((()=>{this.stateManager.removeMessage(s)}),this.options.howLongShowMsg)}addDisclaimer(t){this.dialog.appendChild(t)}onResizeWindow(){(0,u.css)(this.dialog,{maxWidth:screen.width,minHeight:Math.min(this.options.height,screen.height),minWidth:Math.min(this.options.width,screen.width)})}async open(t,e){return this.prepareOpening(t),super.open(this.panel.container),this.onUpdateFileBrowser()}onChangeTheme(){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}onToggleSettings(){this.state.showSettings=!this.state.showSettings}async onUpdateFileBrowser(){this.state.activeElements=[],this.panel.setMod("loading",!0),await Promise.all([this.loadFolders(),this.loadItems()]),this.panel.setMod("loading",!1),this.historyManager.updateHistory()}async loadFolders(){if(!this.isOpened)return;const{currentPath:t,currentSource:e}=this.state;this.historyManager.push();try{this.uploader.setPath(t),this.uploader.setSource(e);const s=await this.dataProvider.tree(t,e);this.stateManager.fillSources(s,t),this.historyManager.updateHistory(),this.state.sources=s}catch(t){this.status(t)}}async loadItems(){if(this.isOpened)try{for(this.offset=0,this.stopLoadingParts=!1,this.state.elements=await this.loadPartItems(),this.stopLoadingParts=this.countInOneChunk>this.state.elements.length;!this.stopLoadingParts&&this.panel.countInColumn*this.panel.countInRow>this.state.elements.length;)await this.loadItemsChunk();this.historyManager.updateHistory()}catch(t){this.status(t)}}async loadItemsChunk(){if(!this.stopLoadingParts)try{this.offset+=this.countInOneChunk;const t=await this.loadPartItems();this.stopLoadingParts=this.countInOneChunk>t.length,t.length&&(this.state.elements=this.state.elements.concat(t))}catch(t){this.status(t)}}prepareOpening(t){this.registerGlobalListeners(),this.state.onSelectCallBack=e=>{this.close(),null==t||t(e)},this.persistent.syncWithState()}registerGlobalListeners(){this.e.on(this.ow,"keydown",this.onKeyPress)}onKeyPress(t){const{activeElement:e}=this.od;if(!this.state.activeElements.length||!e||!h.Dom.isOrContains(this.panel.items.container,e))return;const s=this.state.elements;switch(t.key){case P.KEY_ENTER:return this.onChooseItems();case P.KEY_DELETE:return this.onFileRemove();case P.KEY_RIGHT:case P.KEY_LEFT:case P.KEY_DOWN:case P.KEY_UP:{const e=t.key===P.KEY_RIGHT||t.key===P.KEY_DOWN,i=this.state.lastSelectedIndex;let n;if([P.KEY_RIGHT,P.KEY_LEFT].includes(t.key))n=e?s[i+1]?i+1:0:s[i-1]?i-1:s.length-1;else{const{countInRow:t}=this.panel;n=Math.round(((i+1)/t+(e?1:-1))*t-1)}return s[n]&&this.stateManager.addActive(s[n],t.shiftKey),!1}}}removeGlobalListeners(){this.e.off(this.ow,"keydown",this.onKeyPress)}onFileRemove(){this.state.activeElements.length&&(0,h.Confirm)(this.i18n("Are you sure?"),"",(t=>{if(t){const t=[];this.state.activeElements.forEach((e=>{this.stateManager.isFavorite(e)&&this.stateManager.toggleFavorite(e),t.push(this.deleteFile(e.file||e.name||"",e.sourceName))})),this.state.activeElements=[],Promise.all(t).then((()=>this.loadItems()))}})).bindDestruct(this)}onFileEdit(){if(1===this.state.activeElements.length){const[t]=this.state.activeElements;B.r.call(this,t.fileURL,t.file||"",t.path,t.sourceName,void 0,this.status)}}onFolderRename(t){(0,h.Prompt)(this.i18n("Enter new name"),this.i18n("Rename"),(e=>{if(!(0,u.isValidName)(e)||e===t.name)return this.status(this.i18n("Enter new name")),!1;this.dataProvider.folderRename(A(t.path),t.name,e,t.sourceName).then((s=>{this.state.activeElements=[],this.status(s,!0),this.state.currentPath=A(t.path)+"/"+e,this.state.currentSource=t.sourceName,this.loadFolders()})).catch(this.status)}),this.i18n("type name"),t.name).bindDestruct(this)}onFolderRemove(t){(0,h.Confirm)(this.i18n("Are you sure?"),this.i18n("Delete"),(e=>{e&&this.dataProvider.folderRemove(A(t.path),t.name,t.sourceName).then((e=>{this.status(e,!0),this.state.currentPath=A(t.path),this.state.currentSource=t.sourceName,this.loadFolders()})).catch(this.status)})).bindDestruct(this)}onFolderCreate(t){(0,h.Prompt)(this.i18n("Enter Directory name"),this.i18n("Create directory"),(e=>{const s=t.path||"/";this.dataProvider.createFolder(e,t.path||"/",t.sourceName).then((()=>{this.state.currentSource===t.sourceName&&this.state.currentPath===s?this.onUpdateFileBrowser():(this.state.currentSource=t.sourceName,this.state.currentPath=s)}),this.status)}),this.i18n("type name")).bindDestruct(this)}onFileRename(t){const e=t.file||t.name||"";1===this.state.activeElements.length&&e&&(0,h.Prompt)(this.i18n("Enter new name"),this.i18n("Rename"),(t=>{if(!(0,u.isValidName)(t))return this.status(this.i18n("Enter new name")),!1;this.dataProvider.fileRename(this.state.currentPath,e,t,this.state.currentSource).then((t=>{this.state.activeElements=[],this.status(t,!0),this.loadItems()})).catch(this.status)}),this.i18n("type name"),e).bindDestruct(this)}onChooseItems(){const t=this.stateManager.state.activeElements;if(t.length){if("folder"===t[0].type)return this.state.currentPath=this.state.currentPath+"/"+t[0].name,void(this.state.currentSource=t[0].sourceName);this.stateManager.callSelectHandler()}}deleteFile(t,e){return this.dataProvider.fileRemove(this.state.currentPath,t,e).then((e=>{this.status(e||this.i18n('File "%s" was deleted',t),!0)})).catch(this.status)}initUploader(){const t=this,e=(0,u.ConfigProto)(t.o.uploader||{},z.D.defaultOptions.uploader),s=()=>this.loadItems();t.uploader=t.getInstance("Uploader",e),t.uploader.bind(t.panel.container,s,t.status),t.e.on("bindUploader.filebrowser",(e=>{t.uploader.bind(e,s,t.status)}))}destruct(){this.removeGlobalListeners(),this.header.destruct(),this.panel.destruct(),super.destruct()}fullFillOptions(){["getLocalFileByUrl","crop","resize","create","fileMove","folderMove","fileRename","folderRename","fileRemove","folderRemove","folder","items","permissions"].forEach((t=>{null!=this.options[t]&&(this.options[t]=(0,u.ConfigProto)(this.options[t],this.o.ajax))}))}loadPartItems(){return this.dataProvider.items(this.state.currentPath,this.state.currentSource,{offset:this.offset,limit:this.countInOneChunk,sortBy:this.state.sortBy,withFolders:this.state.withFolders,foldersPosition:this.state.foldersPosition,onlyImages:this.state.onlyImages,filterWord:this.state.filterWord})}};(0,n.gn)([c.autobind],q.prototype,"status",null),(0,n.gn)([(0,c.watch)(":resize",window)],q.prototype,"onResizeWindow",null),(0,n.gn)([(0,c.watch)("state.theme")],q.prototype,"onChangeTheme",null),(0,n.gn)([(0,c.watch)(":toggleSettings.filebrowser")],q.prototype,"onToggleSettings",null),(0,n.gn)([(0,c.watch)(":update.filebrowser")],q.prototype,"onUpdateFileBrowser",null),(0,n.gn)([(0,c.watch)(["state.currentPath","state.currentSource"]),(0,c.debounce)((t=>({timeout:t.defaultTimeout,promisify:!0})))],q.prototype,"loadFolders",null),(0,n.gn)([(0,c.watch)(["state.currentPath","state.currentSource","state.sortBy","state.onlyImages","state.foldersPosition","state.filterWord"]),(0,c.debounce)((t=>({timeout:t.defaultTimeout,promisify:!0})))],q.prototype,"loadItems",null),(0,n.gn)([(0,c.debounce)((t=>({timeout:t.defaultTimeout,promisify:!0})))],q.prototype,"loadItemsChunk",null),(0,n.gn)([c.autobind],q.prototype,"onKeyPress",null),(0,n.gn)([c.autobind],q.prototype,"removeGlobalListeners",null),(0,n.gn)([(0,c.watch)(":fileRemove.filebrowser")],q.prototype,"onFileRemove",null),(0,n.gn)([(0,c.watch)(":edit.filebrowser")],q.prototype,"onFileEdit",null),(0,n.gn)([(0,c.watch)(":folderRename.filebrowser")],q.prototype,"onFolderRename",null),(0,n.gn)([(0,c.watch)(":folderRemove.filebrowser")],q.prototype,"onFolderRemove",null),(0,n.gn)([(0,c.watch)(":folderCreate.filebrowser")],q.prototype,"onFolderCreate",null),(0,n.gn)([(0,c.watch)(":fileRename.filebrowser")],q.prototype,"onFileRename",null),(0,n.gn)([(0,c.watch)(":select.filebrowser")],q.prototype,"onChooseItems",null),q=(0,n.gn)([c.component],q),(0,s(20).xl)(s(171));const W=z.D.prototype.controls.filebrowser;W.settings={icon:"settings",exec(t){t.e.fire("toggleSettings.filebrowser")}},W.home={icon:"home",exec(t){t.e.fire("goHome.filebrowser")}},W.next={icon:"angle-right",isDisabled(t){if(!t.state)return!0;const{history:e,historyIndex:s}=t.state;return!e||!e.length||s===e.length-1},exec(t){t.e.fire("next.filebrowser")}},W.previous={icon:"angle-left",isDisabled(t){if(!t.state)return!0;const{history:e,historyIndex:s}=t.state;return!e||!e.length||0===s},exec(t){t.e.fire("previous.filebrowser")}},Object.assign(z.D.prototype.filebrowser,{buttons:["filebrowser.home","filebrowser.previous","filebrowser.next","|","filebrowser.upload","filebrowser.remove","filebrowser.update","filebrowser.select","filebrowser.edit","|","about"],sort:!1,pixelOffsetLoadNewChunk:200,width:715,height:400});class G extends i.S{constructor(){super(...arguments),this.requires=["license"],this.hasStyle=!0}afterInit(t){t.e.on("getInstanceFileBrowser",(t=>(this.__instance||(this.__instance=new q(t)),this.__instance)))}beforeDestruct(t){t.e.off("getInstanceFileBrowser")}}V.Jodit.plugins.add("finder",G)},171(t,e,s){"use strict";s.r(e),s.d(e,{ru:()=>i});const i=s(172)},170(t,e,s){"use strict";function i(t,e,s,i){var n,o=arguments.length,a=3>o?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,s,i);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(a=(3>o?n(a):o>3?n(e,s,a):n(e,s))||a);return o>3&&a&&Object.defineProperty(e,s,a),a}s.d(e,{gn:()=>i})},172(t){t.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":"Размер плитки"}},168(t){t.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>'},169(t){t.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>'}},0,[[167,670]]])})); |
/*! | ||
* jodit-pro - PRO Version of Jodit Editor | ||
* Author: Chupurnov Valeriy <chupurnov@gmail.com> | ||
* Version: v1.0.10 | ||
* Version: v1.0.12 | ||
* Url: https://xdsoft.net/jodit/pro/ | ||
@@ -6,0 +6,0 @@ * License(s): SEE LICENSE IN LICENSE.MD |
/*! | ||
* jodit-pro - PRO Version of Jodit Editor | ||
* Author: Chupurnov Valeriy <chupurnov@gmail.com> | ||
* Version: v1.0.10 | ||
* Version: v1.0.12 | ||
* Url: https://xdsoft.net/jodit/pro/ | ||
@@ -10,2 +10,2 @@ * License(s): SEE LICENSE IN LICENSE.MD | ||
((e,o)=>{if("object"==typeof exports&&"object"==typeof module)module.exports=o();else if("function"==typeof define&&define.amd)define([],o);else{var t=o();for(var r in t)("object"==typeof exports?exports:e)[r]=t[r]}})(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[799],{203(e,o,t){"use strict";t.r(o),t.d(o,{googleSearch:()=>c});var r=t(56),s=t(2),n=t(13),i=t(84),l=t(1);s.D.prototype.controls.google={tooltip:"Google search",icon:t(204),isDisabled(e){return(0,i.u)(e.editor)},command:"startSearch"};class c extends r.S{constructor(){super(...arguments),this.requires=["license"],this.buttons=[{name:"google",group:"search"}]}afterInit(e){e.registerCommand("startSearch",{exec(){var o,t,r;let s;const{s:i}=e;if(s=i.isCollapsed()?null===(t=null===(o=i.current())||void 0===o?void 0:o.parentElement)||void 0===t?void 0:t.innerText:null===(r=i.sel)||void 0===r?void 0:""+r,s){const e="https://www.google.com/search?q="+encodeURIComponent((0,n.trim)(s));window.open(e,"_blank")}}})}beforeDestruct(e){}}l.Jodit.plugins.add("google-search",c)},204(e){e.exports='<svg width="11" height="15" viewBox="0 0 11 15" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M10.925 7.122V14H9.747L9.462 13.164C9.044 13.4933 8.55 13.7467 7.98 13.924C7.42267 14.1013 6.82733 14.19 6.194 14.19C5.054 14.19 4.066 13.9177 3.23 13.373C2.394 12.8157 1.75433 12.024 1.311 10.998C0.867667 9.972 0.646 8.756 0.646 7.35C0.646 5.96933 0.880333 4.766 1.349 3.74C1.83033 2.714 2.50167 1.92233 3.363 1.365C4.237 0.794999 5.25667 0.509999 6.422 0.509999C7.41 0.509999 8.284 0.693666 9.044 1.061C9.804 1.42833 10.3613 1.935 10.716 2.581L9.747 3.55C9.41767 3.03067 8.968 2.638 8.398 2.372C7.84067 2.09333 7.18833 1.954 6.441 1.954C5.17433 1.954 4.18633 2.429 3.477 3.379C2.76767 4.329 2.413 5.65267 2.413 7.35C2.413 9.07267 2.755 10.4153 3.439 11.378C4.13567 12.3407 5.10467 12.822 6.346 12.822C6.92867 12.822 7.46067 12.7397 7.942 12.575C8.436 12.4103 8.854 12.1697 9.196 11.853V8.414H6.023V7.122H10.925Z" fill="black"/> </svg>'}},0,[[203,670]]])})); | ||
((e,o)=>{if("object"==typeof exports&&"object"==typeof module)module.exports=o();else if("function"==typeof define&&define.amd)define([],o);else{var t=o();for(var r in t)("object"==typeof exports?exports:e)[r]=t[r]}})(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[799],{204(e,o,t){"use strict";t.r(o),t.d(o,{googleSearch:()=>c});var r=t(56),s=t(2),n=t(13),i=t(84),l=t(1);s.D.prototype.controls.google={tooltip:"Google search",icon:t(205),isDisabled(e){return(0,i.u)(e.editor)},command:"startSearch"};class c extends r.S{constructor(){super(...arguments),this.requires=["license"],this.buttons=[{name:"google",group:"search"}]}afterInit(e){e.registerCommand("startSearch",{exec(){var o,t,r;let s;const{s:i}=e;if(s=i.isCollapsed()?null===(t=null===(o=i.current())||void 0===o?void 0:o.parentElement)||void 0===t?void 0:t.innerText:null===(r=i.sel)||void 0===r?void 0:""+r,s){const e="https://www.google.com/search?q="+encodeURIComponent((0,n.trim)(s));window.open(e,"_blank")}}})}beforeDestruct(e){}}l.Jodit.plugins.add("google-search",c)},205(e){e.exports='<svg width="11" height="15" viewBox="0 0 11 15" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M10.925 7.122V14H9.747L9.462 13.164C9.044 13.4933 8.55 13.7467 7.98 13.924C7.42267 14.1013 6.82733 14.19 6.194 14.19C5.054 14.19 4.066 13.9177 3.23 13.373C2.394 12.8157 1.75433 12.024 1.311 10.998C0.867667 9.972 0.646 8.756 0.646 7.35C0.646 5.96933 0.880333 4.766 1.349 3.74C1.83033 2.714 2.50167 1.92233 3.363 1.365C4.237 0.794999 5.25667 0.509999 6.422 0.509999C7.41 0.509999 8.284 0.693666 9.044 1.061C9.804 1.42833 10.3613 1.935 10.716 2.581L9.747 3.55C9.41767 3.03067 8.968 2.638 8.398 2.372C7.84067 2.09333 7.18833 1.954 6.441 1.954C5.17433 1.954 4.18633 2.429 3.477 3.379C2.76767 4.329 2.413 5.65267 2.413 7.35C2.413 9.07267 2.755 10.4153 3.439 11.378C4.13567 12.3407 5.10467 12.822 6.346 12.822C6.92867 12.822 7.46067 12.7397 7.942 12.575C8.436 12.4103 8.854 12.1697 9.196 11.853V8.414H6.023V7.122H10.925Z" fill="black"/> </svg>'}},0,[[204,670]]])})); |
/*! | ||
* jodit-pro - PRO Version of Jodit Editor | ||
* Author: Chupurnov Valeriy <chupurnov@gmail.com> | ||
* Version: v1.0.10 | ||
* Version: v1.0.12 | ||
* Url: https://xdsoft.net/jodit/pro/ | ||
@@ -6,0 +6,0 @@ * License(s): SEE LICENSE IN LICENSE.MD |
/*! | ||
* jodit-pro - PRO Version of Jodit Editor | ||
* Author: Chupurnov Valeriy <chupurnov@gmail.com> | ||
* Version: v1.0.10 | ||
* Version: v1.0.12 | ||
* Url: https://xdsoft.net/jodit/pro/ | ||
@@ -10,2 +10,2 @@ * License(s): SEE LICENSE IN LICENSE.MD | ||
((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 s in o)("object"==typeof exports?exports:e)[s]=o[s]}})(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[535],{207(e,t,o){"use strict";o.r(t),o.d(t,{pasteCode:()=>p});var s=o(169);o(2).D.prototype.controls.pasteCode={icon:o(208),tooltip:"Paste code",command:"pasteCode"};var r=o(56),c=o(47),n=o(26),i=o(36),d=o(13),a=o(1);class p extends r.S{constructor(){super(...arguments),this.requires=["license"],this.buttons=[{name:"pasteCode",group:"clipboard"}]}afterInit(e){e.registerCommand("pasteCode",this.openCodeEditDialog)}openCodeEditDialog(){const e=this.j,t=new n.x4(e,[new n.eC(e,[new n.GJ(e,{name:"code",required:!0})],{mod:"padding"})]),{code:o}=(0,d.refs)(t);e.async.requestIdleCallback((()=>{o.focus()}));const s=e.s.save();(0,c.I4)("","Paste as code",(r=>{if(r)return!!t.validate()&&(e.s.restore(s),void e.s.insertHTML(o.value));e.s.restore(s)})).setContent(t.container)}beforeDestruct(e){}}(0,s.gn)([i.autobind],p.prototype,"openCodeEditDialog",null),a.Jodit.plugins.add("paste-code",p)},169(e,t,o){"use strict";function s(e,t,o,s){var r,c=arguments.length,n=3>c?t:null===s?s=Object.getOwnPropertyDescriptor(t,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,s);else for(var i=e.length-1;i>=0;i--)(r=e[i])&&(n=(3>c?r(n):c>3?r(t,o,n):r(t,o))||n);return c>3&&n&&Object.defineProperty(t,o,n),n}o.d(t,{gn:()=>s})},208(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>'}},0,[[207,670]]])})); | ||
((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 s in o)("object"==typeof exports?exports:e)[s]=o[s]}})(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[535],{208(e,t,o){"use strict";o.r(t),o.d(t,{pasteCode:()=>p});var s=o(170);o(2).D.prototype.controls.pasteCode={icon:o(209),tooltip:"Paste code",command:"pasteCode"};var r=o(56),c=o(47),n=o(26),i=o(36),d=o(13),a=o(1);class p extends r.S{constructor(){super(...arguments),this.requires=["license"],this.buttons=[{name:"pasteCode",group:"clipboard"}]}afterInit(e){e.registerCommand("pasteCode",this.openCodeEditDialog)}openCodeEditDialog(){const e=this.j,t=new n.x4(e,[new n.eC(e,[new n.GJ(e,{name:"code",required:!0})],{mod:"padding"})]),{code:o}=(0,d.refs)(t);e.async.requestIdleCallback((()=>{o.focus()}));const s=e.s.save();(0,c.I4)("","Paste as code",(r=>{if(r)return!!t.validate()&&(e.s.restore(s),void e.s.insertHTML(o.value));e.s.restore(s)})).setContent(t.container)}beforeDestruct(e){}}(0,s.gn)([i.autobind],p.prototype,"openCodeEditDialog",null),a.Jodit.plugins.add("paste-code",p)},170(e,t,o){"use strict";function s(e,t,o,s){var r,c=arguments.length,n=3>c?t:null===s?s=Object.getOwnPropertyDescriptor(t,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,s);else for(var i=e.length-1;i>=0;i--)(r=e[i])&&(n=(3>c?r(n):c>3?r(t,o,n):r(t,o))||n);return c>3&&n&&Object.defineProperty(t,o,n),n}o.d(t,{gn:()=>s})},209(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>'}},0,[[208,670]]])})); |
/*! | ||
* jodit-pro - PRO Version of Jodit Editor | ||
* Author: Chupurnov Valeriy <chupurnov@gmail.com> | ||
* Version: v1.0.10 | ||
* Version: v1.0.12 | ||
* Url: https://xdsoft.net/jodit/pro/ | ||
@@ -6,0 +6,0 @@ * License(s): SEE LICENSE IN LICENSE.MD |
/*! | ||
* jodit-pro - PRO Version of Jodit Editor | ||
* Author: Chupurnov Valeriy <chupurnov@gmail.com> | ||
* Version: v1.0.10 | ||
* Version: v1.0.12 | ||
* Url: https://xdsoft.net/jodit/pro/ | ||
@@ -10,2 +10,2 @@ * License(s): SEE LICENSE IN LICENSE.MD | ||
((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 s in o)("object"==typeof exports?exports:t)[s]=o[s]}})(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[876],{173(t,e,o){"use strict";o.r(e),o.d(e,{ar:()=>s,cs_cz:()=>l,de:()=>r,es:()=>i,fa:()=>n,fr:()=>a,he:()=>c,hu:()=>h,id:()=>p,it:()=>d,ja:()=>k,ko:()=>u,nl:()=>b,pl:()=>g,pt_br:()=>w,ru:()=>f,tr:()=>B,zh_cn:()=>x,zh_tw:()=>m});const s=o(174),l=o(175),r=o(176),i=o(177),n=o(178),a=o(179),c=o(180),h=o(181),p=o(182),d=o(183),k=o(184),u=o(185),b=o(186),g=o(187),w=o(188),f=o(189),B=o(190),x=o(191),m=o(192)},172(t,e,o){"use strict";o.r(e),o.d(e,{showBlocks:()=>p});var s=o(169),l=o(2);l.D.prototype.showBlocks={enable:!1,color:"#ccc",tagList:["html","body","div","span","applet","object","iframe","h1","h2","h3","h4","h5","h6","p","blockquote","pre","a","abbr","acronym","address","big","cite","code","del","dfn","em","img","ins","kbd","q","s","samp","small","strike","strong","sub","sup","tt","var","b","u","i","center","dl","dt","dd","fieldset","form","label","legend","caption","th","td","li","ol","ul","article","aside","canvas","details","embed","figure","figcaption","footer","header","hgroup","menu","nav","output","ruby","section","summary","time","mark","audio","video"]},l.D.prototype.controls.showBlocks={isActive(t){return!!t.e.fire("showBlocksEnabled")},tooltip:"Show Blocks",command:"toggleShowBlocks"};var r=o(56),i=o(4),n=o(26),a=o(20),c=o(36),h=o(1);class p extends r.S{constructor(t){super(t),this.requires=["license"],this.buttons=[{name:"showBlocks",group:"state"}],this.isEnabled=!1,(0,a.xl)(o(173)),n.JO.set("showBlocks",o(193))}enable(){this.isEnabled=!0;const t=this.j.o.iframe?"body":".jodit-wysiwyg",{tagList:e,color:o}=this.j.o.showBlocks;this.style.innerHTML=e.map((e=>{return`${t} ${e}{\n\t\t\t\t\toutline: 1px dashed ${o};\n\t\t\t\t\tbackground-image: url("${s='<svg xmlns="http://www.w3.org/2000/svg" width="50px"><text dominant-baseline="hanging" text-anchor="end" style="fill: '+o+';font: 10px sans-serif" x="50px" y="0">'+e+"</text></svg>","data:image/svg+xml;utf8,"+escape(s)}");\n\t\t\t\t\tbackground-position: top 2px ${"rtl"===this.j.o.direction?"left":"right"} 4px;\n\t\t\t\t\tbackground-repeat: no-repeat;\n\t\t\t\t\tposition: relative;\n\t\t\t\t}`;var s})).join("")}disable(){this.isEnabled=!1,this.style.innerHTML=""}toggle(){this.isEnabled?this.disable():this.enable(),this.j.e.fire("updateToolbar")}afterInit(t){this.style=(0,a.ZO)(t,p,"style",!0),t.e.on("showBlocksEnabled",(()=>this.isEnabled)),t.registerCommand("enableShowBlocks",this.enable).registerCommand("disableShowBlocks",this.disable).registerCommand("toggleShowBlocks",this.toggle),this.j.o.showBlocks.enable&&this.enable()}beforeDestruct(t){this.disable(),i.Dom.safeRemove(this.style)}}(0,s.gn)([c.autobind],p.prototype,"enable",null),(0,s.gn)([c.autobind],p.prototype,"disable",null),(0,s.gn)([c.autobind],p.prototype,"toggle",null),h.Jodit.plugins.add("show-blocks",p)},169(t,e,o){"use strict";function s(t,e,o,s){var l,r=arguments.length,i=3>r?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,o,s);else for(var n=t.length-1;n>=0;n--)(l=t[n])&&(i=(3>r?l(i):r>3?l(e,o,i):l(e,o))||i);return r>3&&i&&Object.defineProperty(e,o,i),i}o.d(e,{gn:()=>s})},174(t){t.exports={"Show Blocks":"تظهر كتل"}},175(t){t.exports={"Show Blocks":"Ukázat Bloky"}},176(t){t.exports={"Show Blocks":"Zeigen Blöcke"}},177(t){t.exports={"Show Blocks":"Mostrar Bloques"}},178(t){t.exports={"Show Blocks":"نشان می دهد بلوک"}},179(t){t.exports={"Show Blocks":"Afficher Les Blocs"}},180(t){t.exports={"Show Blocks":"תראה רחובות"}},181(t){t.exports={"Show Blocks":"Mutasd Meg Blokkok"}},182(t){t.exports={"Show Blocks":"Menunjukkan Blok"}},183(t){t.exports={"Show Blocks":"Visualizza Blocchi"}},184(t){t.exports={"Show Blocks":"ショーのブロック"}},185(t){t.exports={"Show Blocks":"쇼 블록"}},186(t){t.exports={"Show Blocks":"Toon Blokken"}},187(t){t.exports={"Show Blocks":"Pokaż Bloki"}},188(t){t.exports={"Show Blocks":"Mostrar Blocos"}},189(t){t.exports={"Show Blocks":"Показать Блоки"}},190(t){t.exports={"Show Blocks":"Haritayı Blokları"}},191(t){t.exports={"Show Blocks":"显示块"}},192(t){t.exports={"Show Blocks":"แสดงช่วงตึก"}},193(t){t.exports='<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"> <g> <rect rx="10" height="1620" width="1620" y="79.646973" x="80" stroke-width="100" stroke-dasharray="8% 10%" fill="none"/> <path d="m1333.992706,381.692384l0,52.982419q0,21.04781 -12.98052,44.272981t-29.820114,23.22517q-35.082487,0 -37.889085,0.725787q-18.242893,4.354719 -22.452791,22.499384q-2.104949,7.983652 -2.104949,46.45034l0,836.106125q0,18.144664 -12.629695,31.208822t-30.170938,13.064158l-75.778171,0q-17.541243,0 -30.170938,-13.064158t-12.629695,-31.208822l0,-884.008038l-100.335911,0l0,884.008038q0,18.144664 -12.27887,31.208822t-30.521763,13.064158l-75.778171,0q-18.242893,0 -30.521763,-13.064158t-12.27887,-31.208822l0,-359.990137q-103.14251,-8.709439 -171.904184,-42.821407q-88.407866,-42.095621 -134.716748,-129.915795q-44.905583,-84.917028 -44.905583,-187.978721q0,-120.48057 61.745176,-207.574958q61.745176,-85.642815 146.644794,-115.400064q77.88312,-26.854103 292.587937,-26.854103l336.090221,0q17.541243,0 30.170938,13.064158t12.629695,31.208822z"/> </g> </svg>'}},0,[[172,670]]])})); | ||
((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 s in o)("object"==typeof exports?exports:t)[s]=o[s]}})(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[876],{174(t,e,o){"use strict";o.r(e),o.d(e,{ar:()=>s,cs_cz:()=>l,de:()=>r,es:()=>i,fa:()=>n,fr:()=>a,he:()=>c,hu:()=>h,id:()=>p,it:()=>d,ja:()=>k,ko:()=>u,nl:()=>b,pl:()=>g,pt_br:()=>w,ru:()=>f,tr:()=>B,zh_cn:()=>x,zh_tw:()=>m});const s=o(175),l=o(176),r=o(177),i=o(178),n=o(179),a=o(180),c=o(181),h=o(182),p=o(183),d=o(184),k=o(185),u=o(186),b=o(187),g=o(188),w=o(189),f=o(190),B=o(191),x=o(192),m=o(193)},173(t,e,o){"use strict";o.r(e),o.d(e,{showBlocks:()=>p});var s=o(170),l=o(2);l.D.prototype.showBlocks={enable:!1,color:"#ccc",tagList:["html","body","div","span","applet","object","iframe","h1","h2","h3","h4","h5","h6","p","blockquote","pre","a","abbr","acronym","address","big","cite","code","del","dfn","em","img","ins","kbd","q","s","samp","small","strike","strong","sub","sup","tt","var","b","u","i","center","dl","dt","dd","fieldset","form","label","legend","caption","th","td","li","ol","ul","article","aside","canvas","details","embed","figure","figcaption","footer","header","hgroup","menu","nav","output","ruby","section","summary","time","mark","audio","video"]},l.D.prototype.controls.showBlocks={isActive(t){return!!t.e.fire("showBlocksEnabled")},tooltip:"Show Blocks",command:"toggleShowBlocks"};var r=o(56),i=o(4),n=o(26),a=o(20),c=o(36),h=o(1);class p extends r.S{constructor(t){super(t),this.requires=["license"],this.buttons=[{name:"showBlocks",group:"state"}],this.isEnabled=!1,(0,a.xl)(o(174)),n.JO.set("showBlocks",o(194))}enable(){this.isEnabled=!0;const t=this.j.o.iframe?"body":".jodit-wysiwyg",{tagList:e,color:o}=this.j.o.showBlocks;this.style.innerHTML=e.map((e=>{return`${t} ${e}{\n\t\t\t\t\toutline: 1px dashed ${o};\n\t\t\t\t\tbackground-image: url("${s='<svg xmlns="http://www.w3.org/2000/svg" width="50px"><text dominant-baseline="hanging" text-anchor="end" style="fill: '+o+';font: 10px sans-serif" x="50px" y="0">'+e+"</text></svg>","data:image/svg+xml;utf8,"+escape(s)}");\n\t\t\t\t\tbackground-position: top 2px ${"rtl"===this.j.o.direction?"left":"right"} 4px;\n\t\t\t\t\tbackground-repeat: no-repeat;\n\t\t\t\t\tposition: relative;\n\t\t\t\t}`;var s})).join("")}disable(){this.isEnabled=!1,this.style.innerHTML=""}toggle(){this.isEnabled?this.disable():this.enable(),this.j.e.fire("updateToolbar")}afterInit(t){this.style=(0,a.ZO)(t,p,"style",!0),t.e.on("showBlocksEnabled",(()=>this.isEnabled)),t.registerCommand("enableShowBlocks",this.enable).registerCommand("disableShowBlocks",this.disable).registerCommand("toggleShowBlocks",this.toggle),this.j.o.showBlocks.enable&&this.enable()}beforeDestruct(t){this.disable(),i.Dom.safeRemove(this.style)}}(0,s.gn)([c.autobind],p.prototype,"enable",null),(0,s.gn)([c.autobind],p.prototype,"disable",null),(0,s.gn)([c.autobind],p.prototype,"toggle",null),h.Jodit.plugins.add("show-blocks",p)},170(t,e,o){"use strict";function s(t,e,o,s){var l,r=arguments.length,i=3>r?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,o,s);else for(var n=t.length-1;n>=0;n--)(l=t[n])&&(i=(3>r?l(i):r>3?l(e,o,i):l(e,o))||i);return r>3&&i&&Object.defineProperty(e,o,i),i}o.d(e,{gn:()=>s})},175(t){t.exports={"Show Blocks":"تظهر كتل"}},176(t){t.exports={"Show Blocks":"Ukázat Bloky"}},177(t){t.exports={"Show Blocks":"Zeigen Blöcke"}},178(t){t.exports={"Show Blocks":"Mostrar Bloques"}},179(t){t.exports={"Show Blocks":"نشان می دهد بلوک"}},180(t){t.exports={"Show Blocks":"Afficher Les Blocs"}},181(t){t.exports={"Show Blocks":"תראה רחובות"}},182(t){t.exports={"Show Blocks":"Mutasd Meg Blokkok"}},183(t){t.exports={"Show Blocks":"Menunjukkan Blok"}},184(t){t.exports={"Show Blocks":"Visualizza Blocchi"}},185(t){t.exports={"Show Blocks":"ショーのブロック"}},186(t){t.exports={"Show Blocks":"쇼 블록"}},187(t){t.exports={"Show Blocks":"Toon Blokken"}},188(t){t.exports={"Show Blocks":"Pokaż Bloki"}},189(t){t.exports={"Show Blocks":"Mostrar Blocos"}},190(t){t.exports={"Show Blocks":"Показать Блоки"}},191(t){t.exports={"Show Blocks":"Haritayı Blokları"}},192(t){t.exports={"Show Blocks":"显示块"}},193(t){t.exports={"Show Blocks":"แสดงช่วงตึก"}},194(t){t.exports='<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"> <g> <rect rx="10" height="1620" width="1620" y="79.646973" x="80" stroke-width="100" stroke-dasharray="8% 10%" fill="none"/> <path d="m1333.992706,381.692384l0,52.982419q0,21.04781 -12.98052,44.272981t-29.820114,23.22517q-35.082487,0 -37.889085,0.725787q-18.242893,4.354719 -22.452791,22.499384q-2.104949,7.983652 -2.104949,46.45034l0,836.106125q0,18.144664 -12.629695,31.208822t-30.170938,13.064158l-75.778171,0q-17.541243,0 -30.170938,-13.064158t-12.629695,-31.208822l0,-884.008038l-100.335911,0l0,884.008038q0,18.144664 -12.27887,31.208822t-30.521763,13.064158l-75.778171,0q-18.242893,0 -30.521763,-13.064158t-12.27887,-31.208822l0,-359.990137q-103.14251,-8.709439 -171.904184,-42.821407q-88.407866,-42.095621 -134.716748,-129.915795q-44.905583,-84.917028 -44.905583,-187.978721q0,-120.48057 61.745176,-207.574958q61.745176,-85.642815 146.644794,-115.400064q77.88312,-26.854103 292.587937,-26.854103l336.090221,0q17.541243,0 30.170938,13.064158t12.629695,31.208822z"/> </g> </svg>'}},0,[[173,670]]])})); |
{ | ||
"name": "jodit-pro", | ||
"version": "1.0.10", | ||
"version": "1.0.12", | ||
"author": "Chupurnov Valeriy <chupurnov@gmail.com>", | ||
@@ -5,0 +5,0 @@ "homepage": "https://xdsoft.net/jodit/pro/", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
4081118