@ckeditor/ckeditor5-slash-command 48.4.0-alpha.3 → 48.4.0-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +9 -9
package/dist/index.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0xb3e9b}from'@ckeditor/ckeditor5-core';import{Mention as _0x31ef0b}from'@ckeditor/ckeditor5-mention';import{CKEditorError as _0x58dbc6,uid as _0x51c197}from'@ckeditor/ckeditor5-utils';import{IconBrowseFiles as _0x3107ea,IconBulletedList as _0x1dd5ad,IconCodeBlock as _0xbe0339,IconEmoji as _0x6616ea,IconFootnote as _0x57faaa,IconHeading1 as _0x4a9312,IconHeading2 as _0x5aeeca,IconHeading3 as _0x28ca2f,IconHeading4 as _0x33cbd5,IconHeading5 as _0x384ea,IconHeading6 as _0x4424f8,IconHorizontalLine as _0x6829fb,IconHtml as _0x55173c,IconIndent as _0x643288,IconNumberedList as _0x5513b3,IconOutdent as _0x415888,IconParagraph as _0x5b0684,IconPlay as _0x4c8ee6,IconQuote as _0x26dec8,IconRobotPencil as _0x5970df,IconTable as _0x296ae0,IconTableOfContents as _0x4fd905,IconTodoList as _0x756b39}from'@ckeditor/ckeditor5-icons';import{ButtonView as _0x3c3363,View as _0x509a25}from'@ckeditor/ckeditor5-ui';var O=class extends _0xb3e9b{static get['pluginName'](){return'SlashCommandConfig';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x29b97e){super(_0x29b97e),this['_allowedCommands']=null;}afterInit(){const _0x1aef7c=this['editor']['config']['get']('slashCommand.removeCommands')||[],_0x1b2d64=function(_0x57185e){let _0xf2d3a9=['heading4','heading5','heading6'];if(_0x57185e){const _0x38557d=_0x57185e['map'](_0x2457f2=>_0x2457f2['model']);_0xf2d3a9=['heading1','heading2','heading3','heading4','heading5','heading6']['filter'](_0x76dfb3=>!_0x38557d['includes'](_0x76dfb3));}return _0xf2d3a9;}(this['editor']['config']['get']('heading.options'));let _0x33005f=this['getDefaultCommands']()['filter'](_0x564c5f=>!_0x1b2d64['includes'](_0x564c5f['id']))['filter'](_0x569919=>!_0x1aef7c['includes'](_0x569919['commandName']));const _0x31140f=this['editor']['config']['get']('slashCommand.extraCommands');_0x31140f&&_0x31140f['length']&&(_0x33005f=_0x33005f['concat'](_0x31140f));const _0x2b36d9=this['editor']['config']['get']('template.definitions');_0x2b36d9&&_0x2b36d9['length']&&(_0x33005f=_0x33005f['concat'](function(_0x584f34){return _0x584f34['map'](_0x443872=>{const {title:_0x4990d8,icon:_0x561e36,description:_0x197949,data:_0x5463c9}=_0x443872,_0x272237={'id':P(_0x4990d8,'template'),'commandName':'insertTemplate','execute':_0x534147=>{_0x534147['execute']('insertTemplate',_0x5463c9);},'description':_0x197949,'icon':_0x561e36,'title':_0x4990d8};return _0x561e36&&(_0x272237['isIconColorInherited']=!0x1),_0x272237;});}(_0x2b36d9)));const _0x3fb026=this['editor']['config']['get']('style.definitions');_0x3fb026&&_0x3fb026['length']&&(_0x33005f=_0x33005f['concat'](function(_0x5de8f9){return _0x5de8f9['map'](_0x2f8084=>({'id':P(_0x2f8084['name'],'style'),'commandName':'style','execute':_0x527477=>{_0x527477['execute']('style',{'styleName':_0x2f8084['name']});},'isEnabled':_0x5d3bb7=>{const _0x5d6caf=_0x5d3bb7['commands']['get']('style');return _0x5d6caf['isEnabled']&&_0x5d6caf['enabledStyles']['includes'](_0x2f8084['name']);},'title':_0x2f8084['name']}));}(_0x3fb026)));const _0x300f94=_0x33005f['filter'](_0x5aed5f=>!_0x5aed5f['commandName']||void 0x0!==this['editor']['commands']['get'](_0x5aed5f['commandName'])),_0x21ad7b=[];for(const _0x27b397 of _0x300f94)_0x21ad7b['push']({'id':_0x27b397['id'],'commandName':_0x27b397['commandName'],'title':'function'==typeof _0x27b397['title']?_0x27b397['title'](this['editor']):_0x27b397['title'],'description':_0x27b397['description'],'icon':_0x27b397['icon'],'isIconColorInherited':_0x27b397['isIconColorInherited'],'aliases':_0x27b397['aliases'],'isEnabled':()=>this['_proxyIsEnabled'](_0x27b397),'execute':()=>this['_proxyExecute'](_0x27b397)});this['_allowedCommands']=_0x21ad7b['sort'](E),async function(_0x245631){const _0xc0528a='umgl1F4YkAVEtv0TcN6nKiXCrhODd2PaGMSIJbspyz9QLBoWxUfj5HZew738Rq',_0x31bc3e=0x79170,_0x45ebd5=window['Date']['now'](),_0x14c202=_0x245631['editor'],_0x1cd27b=new window['Promise'](_0x2110d8=>{_0x14c202['once']('ready',_0x2110d8);}),_0x357fec={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x54088c=_0x14c202['config']['get']('licenseKey');async function _0x5cef00(){let _0x33dbec,_0x2f11ca=null,_0x831e0=null;try{return'GPL'==_0x54088c?'NotAllowed':(_0x33dbec=_0x59a887(),_0x33dbec?(_0x33dbec['usageEndpoint']&&(_0x831e0=_0x126c06(_0x33dbec['usageEndpoint'],_0x33dbec['jti'])),await _0xb9a506()?_0x17efda()?_0x775edb()?'Expired':_0xd374c5()?('evaluation'==_0x33dbec['licenseType']&&(_0x2f11ca=_0xb46b8('EvaluationLimit')),await _0x59fb7d()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x775edb(){const _0x38804c=['evaluation','trial']['includes'](_0x33dbec['licenseType'])?_0x45ebd5/0x3e8:0xe10*_0x31bc3e;return _0x33dbec['exp']<_0x38804c;}function _0x17efda(){const _0x44c59e=_0x33dbec['features'];return!!_0x44c59e&&(!!_0x44c59e['includes']('*')||(!!_0x44c59e['includes']('SC')||(!!_0x44c59e['includes']('PP')||!(!_0x44c59e['includes']('TRILIUM')||!_0x7a9ffe()))));}function _0xd374c5(){const _0x425bd2=_0x33dbec['licensedHosts'];if(!_0x425bd2||0x0==_0x425bd2['length'])return!0x0;const {hostname:_0x8384c3}=new URL(window['location']['href']);if(_0x425bd2['includes'](_0x8384c3))return!0x0;const _0x48fcdf=_0x8384c3['split']('.');return _0x425bd2['filter'](_0x59417f=>_0x59417f['includes']('*'))['map'](_0x91d2ea=>_0x91d2ea['split']('.'))['filter'](_0x32b308=>_0x32b308['length']<=_0x48fcdf['length'])['map'](_0x2e9ff0=>Array(_0x48fcdf['length']-_0x2e9ff0['length'])['fill']('*'===_0x2e9ff0[0x0]?'*':'')['concat'](_0x2e9ff0))['some'](_0x2ba014=>_0x48fcdf['every']((_0x5c2c7a,_0x3c791e)=>_0x2ba014[_0x3c791e]===_0x5c2c7a||'*'===_0x2ba014[_0x3c791e]));}function _0x59fb7d(){return _0x2f11ca&&_0x831e0?new window['Promise']((_0x3ae6ec,_0x2a9f37)=>{_0x2f11ca['then'](_0x3ae6ec,_0x2a9f37),_0x831e0['then'](_0x4507c1=>{'Valid'!=_0x4507c1&&_0x3ae6ec(_0x4507c1);},_0x2a9f37);}):_0x2f11ca||_0x831e0||'Valid';}}function _0x126c06(_0x56d3da,_0x41b88c){return new window['Promise'](_0x1021d0=>{if(_0x27097e())return _0x1021d0('Valid');_0x553546(),_0x14c202['decorate']('_sendUsageRequest');let _0x1fd602=!0x1;const _0x4b4927=_0x51c197();function _0x118a3d(_0x3c0d30){return!!_0x3c0d30&&('object'==typeof _0x3c0d30||'function'==typeof _0x3c0d30)&&'function'==typeof _0x3c0d30['then']&&'function'==typeof _0x3c0d30['catch'];}function _0x223d51(_0x2d4cce){_0x433267(_0x2d4cce)['then'](_0x3f9e7d=>_0x3f9e7d&&'ok'==_0x3f9e7d['status']?_0x588b18(_0x1f0e77(_0x4b4927+_0x41b88c))!=_0x3f9e7d['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x2a0186=>(_0x2f81d8(),_0x2a0186),()=>{const _0x557a7d=_0x59fd72();return null==_0x557a7d?(_0x2f81d8(),'Valid'):_0x45ebd5-_0x557a7d>0x240c8400?'UsageLimit':'Valid';})['then'](_0x1021d0)['catch'](()=>{_0x1021d0('UsageLimit');});const _0x336223=0x36ee80;function _0x2f81d8(){const _0x112470='llct-'+_0x588b18(_0x1f0e77(_0x56d3da)),_0x524086=_0x4bbae3(_0x588b18(window['Math']['ceil'](_0x45ebd5/_0x336223)));window['localStorage']['setItem'](_0x112470,_0x524086);}function _0x59fd72(){const _0x18d676='llct-'+_0x588b18(_0x1f0e77(_0x56d3da)),_0x53b2d4=window['localStorage']['getItem'](_0x18d676);return _0x53b2d4?window['parseInt'](_0x4bbae3(_0x53b2d4),0x10)*_0x336223:null;}function _0x433267(_0x464fb8){return new window['Promise']((_0x2fdf88,_0x1d84e5)=>{_0x464fb8['then'](_0x2fdf88,_0x1d84e5),window['setTimeout'](_0x1d84e5,0x1d4c0);});}}_0x14c202['on']('_sendUsageRequest',(_0x5f33aa,_0x210924)=>{if(_0x210924[0x0]!=_0x56d3da)return _0x1021d0('UsageLimit');_0x210924[0x1]={..._0x210924[0x1],'requestId':_0x4b4927};},{'priority':'high'}),_0x14c202['on']('_sendUsageRequest',_0xdd79a9=>{_0x118a3d(_0xdd79a9['return'])&&(_0x1fd602=!0x0,_0x223d51(_0xdd79a9['return']));},{'priority':'low'}),_0x1cd27b['then'](()=>{_0x1fd602||_0x1021d0('UsageLimit');});});function _0x27097e(){return'auto'==_0x14c202['editing']['view']['_overlayModeHint'];}function _0x553546(){_0x14c202['editing']['view']['_overlayModeHint']='auto';}}function _0xb46b8(_0x239539){const _0x414ef9=[new window['Promise'](_0x1750c4=>setTimeout(_0x1750c4,0x93ecc)),_0x1cd27b['then'](()=>new window['Promise'](_0x340432=>{let _0x476954=0x0;_0x14c202['model']['on']('applyOperation',(_0x4e200b,_0x460dfe)=>{_0x460dfe[0x0]['isDocumentOperation']&&_0x476954++,0x5e8==_0x476954&&(_0x340432(),_0x4e200b['off']());});}))];return window['Promise']['race'](_0x414ef9)['then'](()=>_0x239539);}async function _0x5dbe53(){await _0x1cd27b,_0x14c202['model']['change']=_0x564bfe,_0x14c202['model']['enqueueChange']=_0x564bfe,_0x14c202['enableReadOnlyMode']('model');}function _0x7a9ffe(){return window['glob']&&window['glob']['triliumVersion'];}function _0x2a23b9(_0xa5e932){const _0x2662c2=_0x4846e2();_0x14c202[_0x2662c2]='slashCommandLicenseKey'+_0xa5e932,'Valid'!=_0xa5e932&&_0x5dbe53();}function _0x4846e2(){const _0x48a896=window['String'](window['performance']['now']())['replace']('.','');let _0x10b758='u';for(let _0xce6660=0x0;_0xce6660<_0x48a896['length'];_0xce6660+=0x2){let _0x11fb93=window['parseInt'](_0x48a896['substring'](_0xce6660,_0xce6660+0x2));_0x11fb93>=0x3e&&(_0x11fb93-=0x3e),_0x10b758+=_0xc0528a[_0x11fb93];}return _0x10b758;}function _0x59a887(){const _0x117f62=_0x54088c['split']('.');if(0x3!=_0x117f62['length'])return null;return _0x202f24(_0x117f62[0x1]);function _0x202f24(_0x1b2a3e){const _0x2a7625=_0x336100(_0x1b2a3e);return _0x2a7625&&_0x4aa29f()?_0x2a7625:null;function _0x4aa29f(){const _0x130420=_0x2a7625['jti'],_0x1eda9d=window['parseInt'](_0x130420['substring'](_0x130420['length']-0x8),0x10),_0x3a3385={..._0x2a7625,'jti':_0x130420['substring'](0x0,_0x130420['length']-0x8)};return delete _0x3a3385['vc'],_0x1f0e77(_0x3a3385)==_0x1eda9d;}}}async function _0xb9a506(){let _0x5219b2=!0x0;try{const [_0x587ac7,_0x2df5d8,_0x9c97ba]=_0x54088c['split']('.');return _0x521bff(_0x587ac7),await _0x449095(_0x587ac7,_0x2df5d8,_0x9c97ba),_0x5219b2;}catch{return!0x1;}function _0x521bff(_0x4f1c50){const _0x29e822=_0x336100(_0x4f1c50);_0x29e822&&'ES256'==_0x29e822['alg']||(_0x5219b2=!0x1);}async function _0x449095(_0x4f02c9,_0x5e5eae,_0x13f7b7){const _0x489d4c=window['Uint8Array']['from'](_0x7a2d52(_0x13f7b7),_0x2e2ee3=>_0x2e2ee3['charCodeAt'](0x0)),_0x449143=new window['TextEncoder']()['encode'](_0x4f02c9+'.'+_0x5e5eae),_0x547045=window['crypto']['subtle'];if(!_0x547045)return;const _0x3f9843=await _0x547045['importKey']('jwk',_0x357fec,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x547045['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x3f9843,_0x489d4c,_0x449143)||(_0x5219b2=!0x1);}}function _0x336100(_0x156cb1){return _0x156cb1['startsWith']('ey')?JSON['parse'](_0x7a2d52(_0x156cb1)):null;}function _0x7a2d52(_0x548545){return window['atob'](_0x548545['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x1f0e77(_0x1f13a8){let _0x1b7109=0x1505;function _0x4647a9(_0x369e1b){for(let _0x380e49=0x0;_0x380e49<_0x369e1b['length'];_0x380e49++){const _0x2d3f70=_0x369e1b['charCodeAt'](_0x380e49);_0x1b7109=(_0x1b7109<<0x5)+_0x1b7109+_0x2d3f70,_0x1b7109&=_0x1b7109;}}function _0x5bffa5(_0x43a13b){Array['isArray'](_0x43a13b)?_0x43a13b['forEach'](_0x5bffa5):_0x43a13b&&'object'==typeof _0x43a13b?Object['entries'](_0x43a13b)['sort']()['forEach'](([_0x1f49c8,_0xb62f65])=>{_0x4647a9(_0x1f49c8),_0x5bffa5(_0xb62f65);}):_0x4647a9(window['String'](_0x43a13b));}return _0x5bffa5(_0x1f13a8),_0x1b7109>>>0x0;}function _0x588b18(_0x5909c7){return _0x5909c7['toString'](0x10)['padStart'](0x8,'0');}function _0x4bbae3(_0x37087f){return _0x37087f['split']('')['reverse']()['join']('');}function _0x564bfe(){}_0x2a23b9(await _0x5cef00());}(this);}getAllowedCommands(){return this['_allowedCommands'];}getDefaultCommands(){const _0x340298=_0x1fd986=>function(_0x40e4c9,_0x4a2cae){const t=_0x40e4c9['t'],_0x19f536=_0x40e4c9['t'];switch(_0x4a2cae){case'AI\x20Assistant':return _0x19f536('AI\x20Assistant');case'Block\x20quote':return _0x19f536('Block\x20quote');case'Bulleted\x20List':return _0x19f536('Bulleted\x20List');case'Insert\x20code\x20block':return _0x19f536('Insert\x20code\x20block');case'Open\x20file\x20manager':return _0x19f536('Open\x20file\x20manager');case'Insert\x20image':return _0x19f536('Insert\x20image');case'Heading\x201':return _0x19f536('Heading\x201');case'Heading\x202':return _0x19f536('Heading\x202');case'Heading\x203':return _0x19f536('Heading\x203');case'Heading\x204':return _0x19f536('Heading\x204');case'Heading\x205':return _0x19f536('Heading\x205');case'Heading\x206':return _0x19f536('Heading\x206');case'Horizontal\x20line':return _0x19f536('Horizontal\x20line');case'Insert\x20HTML':return _0x19f536('Insert\x20HTML');case'Increase\x20indent':return _0x19f536('Increase\x20indent');case'Insert\x20table':return _0x19f536('Insert\x20table');case'Table\x20of\x20contents':return _0x19f536('Table\x20of\x20contents');case'Numbered\x20List':return _0x19f536('Numbered\x20List');case'Decrease\x20indent':return _0x19f536('Decrease\x20indent');case'Paragraph':return _0x19f536('Paragraph');case'To-do\x20List':return _0x19f536('To-do\x20List');case'Create\x20a\x20block\x20quote':return t('Create\x20a\x20block\x20quote');case'Create\x20a\x20bulleted\x20list':return t('Create\x20a\x20bulleted\x20list');case'Create\x20a\x20code\x20block':return t('Create\x20a\x20code\x20block');case'Open\x20file\x20manager\x20to\x20insert\x20an\x20image\x20or\x20a\x20file':return t('Open\x20file\x20manager\x20to\x20insert\x20an\x20image\x20or\x20a\x20file');case'Open\x20file\x20browser\x20to\x20insert\x20an\x20image\x20or\x20a\x20file':return t('Open\x20file\x20browser\x20to\x20insert\x20an\x20image\x20or\x20a\x20file');case'Create\x20a\x20heading\x20level\x201':return t('Create\x20a\x20heading\x20level\x201');case'Create\x20a\x20heading\x20level\x202':return t('Create\x20a\x20heading\x20level\x202');case'Create\x20a\x20heading\x20level\x203':return t('Create\x20a\x20heading\x20level\x203');case'Create\x20a\x20heading\x20level\x204':return t('Create\x20a\x20heading\x20level\x204');case'Create\x20a\x20heading\x20level\x205':return t('Create\x20a\x20heading\x20level\x205');case'Create\x20a\x20heading\x20level\x206':return t('Create\x20a\x20heading\x20level\x206');case'Insert\x20a\x20horizontal\x20line':return t('Insert\x20a\x20horizontal\x20line');case'Insert\x20an\x20HTML\x20snippet':return t('Insert\x20an\x20HTML\x20snippet');case'Increase\x20the\x20indentation':return t('Increase\x20the\x20indentation');case'Insert\x20Mermaid\x20diagram':return t('Insert\x20Mermaid\x20diagram');case'Insert\x20the\x20Mermaid\x20diagram':return t('Insert\x20the\x20Mermaid\x20diagram');case'Create\x20a\x20table':return t('Create\x20a\x20table');case'Insert\x20table\x20of\x20contents':return t('Insert\x20table\x20of\x20contents');case'Create\x20a\x20numbered\x20list':return t('Create\x20a\x20numbered\x20list');case'Decrease\x20the\x20indentation':return t('Decrease\x20the\x20indentation');case'Insert\x20a\x20paragraph':return t('Insert\x20a\x20paragraph');case'Create\x20a\x20to-do\x20list':return t('Create\x20a\x20to-do\x20list');case'Open\x20the\x20AI\x20Assistant\x20to\x20generate\x20content':return t('Open\x20the\x20AI\x20Assistant\x20to\x20generate\x20content');case'Insert\x20an\x20emoji':return t('Insert\x20an\x20emoji');case'Insert\x20a\x20footnote':return t('Insert\x20a\x20footnote');default:return _0x4a2cae;}}(this['editor']['locale'],_0x1fd986);return[{'id':'aiAssistant','commandName':'showAIAssistant','icon':_0x5970df,'title':_0x340298('AI\x20Assistant'),'description':_0x340298('Open\x20the\x20AI\x20Assistant\x20to\x20generate\x20content'),'execute':_0x2bd76a=>{setTimeout(()=>_0x2bd76a['execute']('showAIAssistant'));}},{'id':'blockQuote','commandName':'blockQuote','icon':_0x26dec8,'title':_0x340298('Block\x20quote'),'description':_0x340298('Create\x20a\x20block\x20quote')},{'id':'bulletedList','commandName':'bulletedList','icon':_0x1dd5ad,'title':_0x340298('Bulleted\x20List'),'description':_0x340298('Create\x20a\x20bulleted\x20list')},{'id':'codeBlock','commandName':'codeBlock','icon':_0xbe0339,'title':_0x340298('Insert\x20code\x20block'),'description':_0x340298('Create\x20a\x20code\x20block')},{'id':'ckbox','commandName':'ckbox','icon':_0x3107ea,'title':_0x340298('Open\x20file\x20manager'),'description':_0x340298('Open\x20file\x20manager\x20to\x20insert\x20an\x20image\x20or\x20a\x20file'),'aliases':['ckfinder','filemanager','upload']},{'id':'ckfinder','commandName':'ckfinder','icon':_0x3107ea,'title':_0x340298('Insert\x20image'),'description':_0x340298('Open\x20file\x20browser\x20to\x20insert\x20an\x20image\x20or\x20a\x20file'),'aliases':['ckbox','filemanager','upload']},{'id':'emoji','commandName':'emoji','icon':_0x6616ea,'title':_0x340298('Emoji'),'description':_0x340298('Insert\x20an\x20emoji'),'execute':_0x2e6873=>{setTimeout(()=>_0x2e6873['execute']('emoji'));}},{'id':'heading1','commandName':'heading','icon':_0x4a9312,'title':_0x340298('Heading\x201'),'description':_0x340298('Create\x20a\x20heading\x20level\x201'),'execute':_0x3be782=>{_0x3be782['execute']('heading',{'value':'heading1'});}},{'id':'heading2','commandName':'heading','icon':_0x5aeeca,'title':_0x340298('Heading\x202'),'description':_0x340298('Create\x20a\x20heading\x20level\x202'),'execute':_0x1ee237=>{_0x1ee237['execute']('heading',{'value':'heading2'});}},{'id':'heading3','commandName':'heading','icon':_0x28ca2f,'title':_0x340298('Heading\x203'),'description':_0x340298('Create\x20a\x20heading\x20level\x203'),'execute':_0x5c48b2=>{_0x5c48b2['execute']('heading',{'value':'heading3'});}},{'id':'heading4','commandName':'heading','icon':_0x33cbd5,'title':_0x340298('Heading\x204'),'description':_0x340298('Create\x20a\x20heading\x20level\x204'),'execute':_0xa584a7=>{_0xa584a7['execute']('heading',{'value':'heading4'});}},{'id':'heading5','commandName':'heading','icon':_0x384ea,'title':_0x340298('Heading\x205'),'description':_0x340298('Create\x20a\x20heading\x20level\x205'),'execute':_0x30342b=>{_0x30342b['execute']('heading',{'value':'heading5'});}},{'id':'heading6','commandName':'heading','icon':_0x4424f8,'title':_0x340298('Heading\x206'),'description':_0x340298('Create\x20a\x20heading\x20level\x206'),'execute':_0x854419=>{_0x854419['execute']('heading',{'value':'heading6'});}},{'id':'horizontalLine','commandName':'horizontalLine','icon':_0x6829fb,'title':_0x340298('Horizontal\x20line'),'description':_0x340298('Insert\x20a\x20horizontal\x20line')},{'id':'htmlEmbed','commandName':'htmlEmbed','icon':_0x55173c,'title':_0x340298('Insert\x20HTML'),'description':_0x340298('Insert\x20an\x20HTML\x20snippet')},{'id':'indent','commandName':'indent','icon':_0x643288,'title':_0x340298('Increase\x20indent'),'description':_0x340298('Increase\x20the\x20indentation')},{'id':'insertMermaidCommand','commandName':'insertMermaidCommand','title':_0x340298('Insert\x20Mermaid\x20diagram'),'description':_0x340298('Insert\x20the\x20Mermaid\x20diagram')},{'id':'insertTable','commandName':'insertTable','icon':_0x296ae0,'title':_0x340298('Insert\x20table'),'description':_0x340298('Create\x20a\x20table')},{'id':'insertTableOfContents','commandName':'insertTableOfContents','icon':_0x4fd905,'title':_0x340298('Table\x20of\x20contents'),'description':_0x340298('Insert\x20table\x20of\x20contents'),'aliases':['toc']},{'id':'numberedList','commandName':'numberedList','icon':_0x5513b3,'title':_0x340298('Numbered\x20List'),'description':_0x340298('Create\x20a\x20numbered\x20list')},{'id':'outdent','commandName':'outdent','icon':_0x415888,'title':_0x340298('Decrease\x20indent'),'description':_0x340298('Decrease\x20the\x20indentation')},{'id':'paragraph','commandName':'paragraph','icon':_0x5b0684,'title':_0x340298('Paragraph'),'description':_0x340298('Insert\x20a\x20paragraph')},{'id':'todoList','commandName':'todoList','icon':_0x756b39,'title':_0x340298('To-do\x20List'),'description':_0x340298('Create\x20a\x20to-do\x20list')},{'id':'footnote','commandName':'insertFootnote','icon':_0x57faaa,'title':_0x340298('Footnote'),'description':_0x340298('Insert\x20a\x20footnote')}];}['_proxyIsEnabled'](_0x21f045){return _0x21f045['isEnabled']?_0x21f045['isEnabled'](this['editor']):!_0x21f045['commandName']||this['editor']['commands']['get'](_0x21f045['commandName'])['isEnabled'];}_proxyExecute(_0xb1a50e){if(_0xb1a50e['execute'])_0xb1a50e['execute'](this['editor']);else{if(!_0xb1a50e['commandName'])throw new _0x58dbc6('slash-command-execute-missing',this['editor'],{'commandDefinition':_0xb1a50e});this['editor']['execute'](_0xb1a50e['commandName']);}}};function E(_0x13d0fc,_0x3f7d2b){return _0x13d0fc['title']<_0x3f7d2b['title']?-0x1:_0x13d0fc['title']>_0x3f7d2b['title']?0x1:0x0;}function P(_0x390498,_0x81095a){return _0x81095a+'-'+_0x390498['toLowerCase']()['split']('\x20')['join']('-');}var K=class extends _0xb3e9b{static get['pluginName'](){return'SlashCommandEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[O];}getMatchingCommands(_0x17d1c3){const _0x4b9814=_0x17d1c3&&_0x17d1c3['toLowerCase']();let _0x4a9f83=this['editor']['plugins']['get']('SlashCommandConfig')['getAllowedCommands']();if(_0x4a9f83=_0x4a9f83['filter'](_0x35234e=>_0x35234e['isEnabled']()),_0x4b9814){const _0x207e5d=[],_0x5197c0=[],_0x275657=[],_0x83bc94=[];for(const _0x4c04eb of _0x4a9f83)_0x4c04eb['id']['toLowerCase']()['includes'](_0x4b9814)?_0x207e5d['push'](_0x4c04eb):_0x4c04eb['title']['toLowerCase']()['includes'](_0x4b9814)?_0x5197c0['push'](_0x4c04eb):_0x4c04eb['aliases']&&_0x4c04eb['aliases']['some'](_0xac2c5c=>_0xac2c5c['toLowerCase']()['includes'](_0x4b9814))?_0x275657['push'](_0x4c04eb):_0x4c04eb['description']&&_0x4c04eb['description']['toLowerCase']()['includes'](_0x4b9814)&&_0x83bc94['push'](_0x4c04eb);_0x4a9f83=_0x207e5d['concat'](_0x5197c0,_0x275657,_0x83bc94);}return _0x4a9f83;}},M=class extends _0x3c3363{constructor(_0x207cb7,_0x25ff3c){super(_0x207cb7),this['textPartView']=this['_createTextPartView'](_0x207cb7,_0x25ff3c),void 0x0!==_0x25ff3c['isIconColorInherited']&&(this['iconView']['isColorInherited']=_0x25ff3c['isIconColorInherited']),this['set']({'icon':_0x25ff3c['icon']||_0x4c8ee6,'withText':!0x0,'label':_0x25ff3c['title'],'class':'ck-slash-command-button'});}['render'](){super['render'](),this['children']['add'](this['textPartView']);}_createTextPartView(_0xc44064,_0x34d6d3){const _0x35f927=new _0x509a25(_0xc44064);return _0x35f927['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-slash-command-button__text-part']},'children':_0x34d6d3['description']?[this['labelView'],{'tag':'span','attributes':{'class':['ck','ck-slash-command-button__description']},'children':[{'text':_0x34d6d3['description']}]}]:[this['labelView']]}),_0x35f927;}},S=class extends _0xb3e9b{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'SlashCommandUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x143337){super(_0x143337),this['_setupMentionConfiguration']();}init(){this['editor']['once']('ready',this['_overrideMentionExecuteListener']['bind'](this)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x1cfbda=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x48c169;for(const _0x498987 in _0x1cfbda){const _0x3610d5=_0x498987,_0x1ce32e=_0x1cfbda[_0x3610d5];if('slashCommandLicenseKeyValid'==_0x1ce32e||'slashCommandLicenseKeyInvalid'==_0x1ce32e||'slashCommandLicenseKeyExpired'==_0x1ce32e||'slashCommandLicenseKeyDomainLimit'==_0x1ce32e||'slashCommandLicenseKeyNotAllowed'==_0x1ce32e||'slashCommandLicenseKeyEvaluationLimit'==_0x1ce32e||'slashCommandLicenseKeyUsageLimit'==_0x1ce32e){delete _0x1cfbda[_0x3610d5],_0x48c169=_0x1ce32e,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'slashCommandLicenseKeyInvalid'==_0x48c169&&_0x1cfbda['_showLicenseError']('invalid'),'slashCommandLicenseKeyExpired'==_0x48c169&&_0x1cfbda['_showLicenseError']('expired'),'slashCommandLicenseKeyDomainLimit'==_0x48c169&&_0x1cfbda['_showLicenseError']('domainLimit'),'slashCommandLicenseKeyNotAllowed'==_0x48c169&&_0x1cfbda['_showLicenseError']('featureNotAllowed','SlashCommand'),'slashCommandLicenseKeyEvaluationLimit'==_0x48c169&&_0x1cfbda['_showLicenseError']('evaluationLimit'),'slashCommandLicenseKeyUsageLimit'==_0x48c169&&_0x1cfbda['_showLicenseError']('usageLimit');},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_setupMentionConfiguration(){const _0x4ed17c=this['editor'],_0xa7c064=this['editor']['plugins']['get']('SlashCommandEditing'),_0x44025c=_0x4ed17c['config']['get']('mention.feeds');_0x44025c['push']({'marker':'/','feed':_0x5cffea=>_0xa7c064['getMatchingCommands'](_0x5cffea),'itemRenderer':this['_customItemRenderer']['bind'](this),'dropdownLimit':_0x4ed17c['config']['get']('slashCommand.dropdownLimit')||0x1/0x0}),_0x4ed17c['config']['set']('mention.feeds',_0x44025c);}_overrideMentionExecuteListener(){const _0x13306f=this['editor'];_0x13306f['commands']['get']('mention')['on']('execute',(_0x24ecb2,_0x50883b)=>{const _0x5223a1=_0x50883b[0x0],_0x112288=_0x13306f['model'];'/'===_0x5223a1['marker']&&_0x112288['change'](_0x3abf93=>{_0x3abf93['remove'](_0x5223a1['range']),_0x5223a1['mention']['execute'](),_0x24ecb2['stop']();});},{'priority':'high'});}_customItemRenderer(_0x25adab){const _0x3c5986=this['editor']['locale'],_0x56e960=new M(_0x3c5986,_0x25adab);return _0x56e960['render'](),_0x56e960['element'];}},D=class extends _0xb3e9b{static get requires(){return[_0x31ef0b,K,S];}static get['pluginName'](){return'SlashCommand';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{D as SlashCommand,O as SlashCommandConfig,K as SlashCommandEditing,S as SlashCommandUI};
23
+ import{Plugin as _0x170c4b}from'@ckeditor/ckeditor5-core';import{Mention as _0x1ac00d}from'@ckeditor/ckeditor5-mention';import{CKEditorError as _0x50c559,uid as _0x232ed6}from'@ckeditor/ckeditor5-utils';import{IconBrowseFiles as _0x2b7008,IconBulletedList as _0x2c9d1c,IconCodeBlock as _0x187744,IconEmoji as _0xe5155d,IconFootnote as _0x269a5d,IconHeading1 as _0x3d7add,IconHeading2 as _0x49b633,IconHeading3 as _0x580153,IconHeading4 as _0x155ef3,IconHeading5 as _0x161f54,IconHeading6 as _0x2c6229,IconHorizontalLine as _0x266c0a,IconHtml as _0x21815b,IconIndent as _0x54a6d2,IconNumberedList as _0x1a5723,IconOutdent as _0x51f411,IconParagraph as _0x18c66e,IconPlay as _0x42638d,IconQuote as _0x592bb1,IconRobotPencil as _0x4462d3,IconTable as _0xa0b6,IconTableOfContents as _0x294bb4,IconTodoList as _0x37df5b}from'@ckeditor/ckeditor5-icons';import{ButtonView as _0x5db0e8,View as _0x27c612}from'@ckeditor/ckeditor5-ui';var O=class extends _0x170c4b{static get['pluginName'](){return'SlashCommandConfig';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4d36b0){super(_0x4d36b0),this['_allowedCommands']=null;}afterInit(){const _0x1c60c4=this['editor']['config']['get']('slashCommand.removeCommands')||[],_0x810c51=function(_0x5735df){let _0x2d7364=['heading4','heading5','heading6'];if(_0x5735df){const _0x2f2005=_0x5735df['map'](_0x4b45a=>_0x4b45a['model']);_0x2d7364=['heading1','heading2','heading3','heading4','heading5','heading6']['filter'](_0x1368d5=>!_0x2f2005['includes'](_0x1368d5));}return _0x2d7364;}(this['editor']['config']['get']('heading.options'));let _0x497927=this['getDefaultCommands']()['filter'](_0xab82c4=>!_0x810c51['includes'](_0xab82c4['id']))['filter'](_0x53cdd6=>!_0x1c60c4['includes'](_0x53cdd6['commandName']));const _0x54196a=this['editor']['config']['get']('slashCommand.extraCommands');_0x54196a&&_0x54196a['length']&&(_0x497927=_0x497927['concat'](_0x54196a));const _0x1a75f7=this['editor']['config']['get']('template.definitions');_0x1a75f7&&_0x1a75f7['length']&&(_0x497927=_0x497927['concat'](function(_0x34e4ff){return _0x34e4ff['map'](_0x3ad46b=>{const {title:_0x39d96a,icon:_0x3c45a5,description:_0x67b68f,data:_0x9eb8ba}=_0x3ad46b,_0x593c96={'id':P(_0x39d96a,'template'),'commandName':'insertTemplate','execute':_0x4bdfa4=>{_0x4bdfa4['execute']('insertTemplate',_0x9eb8ba);},'description':_0x67b68f,'icon':_0x3c45a5,'title':_0x39d96a};return _0x3c45a5&&(_0x593c96['isIconColorInherited']=!0x1),_0x593c96;});}(_0x1a75f7)));const _0x4724e6=this['editor']['config']['get']('style.definitions');_0x4724e6&&_0x4724e6['length']&&(_0x497927=_0x497927['concat'](function(_0x213da4){return _0x213da4['map'](_0x3071d1=>({'id':P(_0x3071d1['name'],'style'),'commandName':'style','execute':_0x1a95a4=>{_0x1a95a4['execute']('style',{'styleName':_0x3071d1['name']});},'isEnabled':_0x1862c2=>{const _0x23314c=_0x1862c2['commands']['get']('style');return _0x23314c['isEnabled']&&_0x23314c['enabledStyles']['includes'](_0x3071d1['name']);},'title':_0x3071d1['name']}));}(_0x4724e6)));const _0x27387f=_0x497927['filter'](_0x252d65=>!_0x252d65['commandName']||void 0x0!==this['editor']['commands']['get'](_0x252d65['commandName'])),_0x14970f=[];for(const _0xcea899 of _0x27387f)_0x14970f['push']({'id':_0xcea899['id'],'commandName':_0xcea899['commandName'],'title':'function'==typeof _0xcea899['title']?_0xcea899['title'](this['editor']):_0xcea899['title'],'description':_0xcea899['description'],'icon':_0xcea899['icon'],'isIconColorInherited':_0xcea899['isIconColorInherited'],'aliases':_0xcea899['aliases'],'isEnabled':()=>this['_proxyIsEnabled'](_0xcea899),'execute':()=>this['_proxyExecute'](_0xcea899)});this['_allowedCommands']=_0x14970f['sort'](E),async function(_0x5bfcd9){const _0x4083d0='umgl1F4YkAVEtv0TcN6nKiXCrhODd2PaGMSIJbspyz9QLBoWxUfj5HZew738Rq',_0x544652=0x791a0,_0x2c44f4=window['Date']['now'](),_0x485002=_0x5bfcd9['editor'],_0x394d27=new window['Promise'](_0x561f4b=>{_0x485002['once']('ready',_0x561f4b);}),_0x21e7a0={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x15eae0=_0x485002['config']['get']('licenseKey');async function _0x57d740(){let _0x4618df,_0x441855=null,_0x729baa=null;try{return'GPL'==_0x15eae0?'NotAllowed':(_0x4618df=_0x15198e(),_0x4618df?(_0x4618df['usageEndpoint']&&(_0x729baa=_0x22e78a(_0x4618df['usageEndpoint'],_0x4618df['jti'])),await _0x336120()?_0x362f47()?_0x148bfa()?'Expired':_0xb370c0()?('evaluation'==_0x4618df['licenseType']&&(_0x441855=_0x5eb19c('EvaluationLimit')),await _0x548a3b()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x148bfa(){const _0x3d67a8=['evaluation','trial']['includes'](_0x4618df['licenseType'])?_0x2c44f4/0x3e8:0xe10*_0x544652;return _0x4618df['exp']<_0x3d67a8;}function _0x362f47(){const _0x34cb6a=_0x4618df['features'];return!!_0x34cb6a&&(!!_0x34cb6a['includes']('*')||(!!_0x34cb6a['includes']('SC')||(!!_0x34cb6a['includes']('PP')||!(!_0x34cb6a['includes']('TRILIUM')||!_0x295445()))));}function _0xb370c0(){const _0x367f9d=_0x4618df['licensedHosts'];if(!_0x367f9d||0x0==_0x367f9d['length'])return!0x0;const {hostname:_0x31d543}=new URL(window['location']['href']);if(_0x367f9d['includes'](_0x31d543))return!0x0;const _0x2d8da3=_0x31d543['split']('.');return _0x367f9d['filter'](_0x4e6762=>_0x4e6762['includes']('*'))['map'](_0x36a6b7=>_0x36a6b7['split']('.'))['filter'](_0xf0781d=>_0xf0781d['length']<=_0x2d8da3['length'])['map'](_0x195568=>Array(_0x2d8da3['length']-_0x195568['length'])['fill']('*'===_0x195568[0x0]?'*':'')['concat'](_0x195568))['some'](_0x7b3c88=>_0x2d8da3['every']((_0x4e1fbf,_0x337093)=>_0x7b3c88[_0x337093]===_0x4e1fbf||'*'===_0x7b3c88[_0x337093]));}function _0x548a3b(){return _0x441855&&_0x729baa?new window['Promise']((_0x27e967,_0xf7592e)=>{_0x441855['then'](_0x27e967,_0xf7592e),_0x729baa['then'](_0x36ed70=>{'Valid'!=_0x36ed70&&_0x27e967(_0x36ed70);},_0xf7592e);}):_0x441855||_0x729baa||'Valid';}}function _0x22e78a(_0x3df62c,_0x11147c){return new window['Promise'](_0x519b18=>{if(_0x1be76c())return _0x519b18('Valid');_0x2d66eb(),_0x485002['decorate']('_sendUsageRequest');let _0x40f08a=!0x1;const _0x374280=_0x232ed6();function _0x3df036(_0x3ae8f1){return!!_0x3ae8f1&&('object'==typeof _0x3ae8f1||'function'==typeof _0x3ae8f1)&&'function'==typeof _0x3ae8f1['then']&&'function'==typeof _0x3ae8f1['catch'];}function _0x2d5724(_0x18ec1e){_0x271482(_0x18ec1e)['then'](_0x4fbf62=>_0x4fbf62&&'ok'==_0x4fbf62['status']?_0x43408d(_0x3db77e(_0x374280+_0x11147c))!=_0x4fbf62['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x16c17a=>(_0x17903b(),_0x16c17a),()=>{const _0x754975=_0x714610();return null==_0x754975?(_0x17903b(),'Valid'):_0x2c44f4-_0x754975>0x240c8400?'UsageLimit':'Valid';})['then'](_0x519b18)['catch'](()=>{_0x519b18('UsageLimit');});const _0x132874=0x36ee80;function _0x17903b(){const _0x204a42='llct-'+_0x43408d(_0x3db77e(_0x3df62c)),_0x1cd84a=_0xca8afc(_0x43408d(window['Math']['ceil'](_0x2c44f4/_0x132874)));window['localStorage']['setItem'](_0x204a42,_0x1cd84a);}function _0x714610(){const _0x1da87d='llct-'+_0x43408d(_0x3db77e(_0x3df62c)),_0x4b992a=window['localStorage']['getItem'](_0x1da87d);return _0x4b992a?window['parseInt'](_0xca8afc(_0x4b992a),0x10)*_0x132874:null;}function _0x271482(_0x3cd7b2){return new window['Promise']((_0x5b62d1,_0x49311b)=>{_0x3cd7b2['then'](_0x5b62d1,_0x49311b),window['setTimeout'](_0x49311b,0x1d4c0);});}}_0x485002['on']('_sendUsageRequest',(_0x2cf24b,_0x1243b1)=>{if(_0x1243b1[0x0]!=_0x3df62c)return _0x519b18('UsageLimit');_0x1243b1[0x1]={..._0x1243b1[0x1],'requestId':_0x374280};},{'priority':'high'}),_0x485002['on']('_sendUsageRequest',_0x432bc2=>{_0x3df036(_0x432bc2['return'])&&(_0x40f08a=!0x0,_0x2d5724(_0x432bc2['return']));},{'priority':'low'}),_0x394d27['then'](()=>{_0x40f08a||_0x519b18('UsageLimit');});});function _0x1be76c(){return'auto'==_0x485002['editing']['view']['_overlayModeHint'];}function _0x2d66eb(){_0x485002['editing']['view']['_overlayModeHint']='auto';}}function _0x5eb19c(_0x2ee576){const _0x585a99=[new window['Promise'](_0x21cc1b=>setTimeout(_0x21cc1b,0x93ecc)),_0x394d27['then'](()=>new window['Promise'](_0x3d1578=>{let _0x1bfec0=0x0;_0x485002['model']['on']('applyOperation',(_0x2483f3,_0x5af12c)=>{_0x5af12c[0x0]['isDocumentOperation']&&_0x1bfec0++,0x5e8==_0x1bfec0&&(_0x3d1578(),_0x2483f3['off']());});}))];return window['Promise']['race'](_0x585a99)['then'](()=>_0x2ee576);}async function _0x1a1765(){await _0x394d27,_0x485002['model']['change']=_0x51d769,_0x485002['model']['enqueueChange']=_0x51d769,_0x485002['enableReadOnlyMode']('model');}function _0x295445(){return window['glob']&&window['glob']['triliumVersion'];}function _0x505bf1(_0x8cd37a){const _0x510808=_0x41c9f0();_0x485002[_0x510808]='slashCommandLicenseKey'+_0x8cd37a,'Valid'!=_0x8cd37a&&_0x1a1765();}function _0x41c9f0(){const _0x2a36c9=window['String'](window['performance']['now']())['replace']('.','');let _0x112285='u';for(let _0x3e5243=0x0;_0x3e5243<_0x2a36c9['length'];_0x3e5243+=0x2){let _0x59732a=window['parseInt'](_0x2a36c9['substring'](_0x3e5243,_0x3e5243+0x2));_0x59732a>=0x3e&&(_0x59732a-=0x3e),_0x112285+=_0x4083d0[_0x59732a];}return _0x112285;}function _0x15198e(){const _0xf4fb53=_0x15eae0['split']('.');if(0x3!=_0xf4fb53['length'])return null;return _0x50afe0(_0xf4fb53[0x1]);function _0x50afe0(_0x666067){const _0x2c26e0=_0xdf64ea(_0x666067);return _0x2c26e0&&_0x3e2779()?_0x2c26e0:null;function _0x3e2779(){const _0x36b407=_0x2c26e0['jti'],_0x2d8a45=window['parseInt'](_0x36b407['substring'](_0x36b407['length']-0x8),0x10),_0x19d575={..._0x2c26e0,'jti':_0x36b407['substring'](0x0,_0x36b407['length']-0x8)};return delete _0x19d575['vc'],_0x3db77e(_0x19d575)==_0x2d8a45;}}}async function _0x336120(){let _0x288e52=!0x0;try{const [_0x420949,_0x4a5020,_0x41a797]=_0x15eae0['split']('.');return _0x686016(_0x420949),await _0x266e99(_0x420949,_0x4a5020,_0x41a797),_0x288e52;}catch{return!0x1;}function _0x686016(_0x343d29){const _0x114a92=_0xdf64ea(_0x343d29);_0x114a92&&'ES256'==_0x114a92['alg']||(_0x288e52=!0x1);}async function _0x266e99(_0x4df50f,_0x2b2b1d,_0x4e9e1d){const _0x465732=window['Uint8Array']['from'](_0x487868(_0x4e9e1d),_0x250a96=>_0x250a96['charCodeAt'](0x0)),_0x1f1026=new window['TextEncoder']()['encode'](_0x4df50f+'.'+_0x2b2b1d),_0x19f66a=window['crypto']['subtle'];if(!_0x19f66a)return;const _0x4467b1=await _0x19f66a['importKey']('jwk',_0x21e7a0,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x19f66a['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x4467b1,_0x465732,_0x1f1026)||(_0x288e52=!0x1);}}function _0xdf64ea(_0x5d3039){return _0x5d3039['startsWith']('ey')?JSON['parse'](_0x487868(_0x5d3039)):null;}function _0x487868(_0x527215){return window['atob'](_0x527215['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x3db77e(_0x3b6cd1){let _0x22b9ac=0x1505;function _0xda62dd(_0x519c98){for(let _0xcd3a93=0x0;_0xcd3a93<_0x519c98['length'];_0xcd3a93++){const _0x5e3128=_0x519c98['charCodeAt'](_0xcd3a93);_0x22b9ac=(_0x22b9ac<<0x5)+_0x22b9ac+_0x5e3128,_0x22b9ac&=_0x22b9ac;}}function _0x944363(_0x18f996){Array['isArray'](_0x18f996)?_0x18f996['forEach'](_0x944363):_0x18f996&&'object'==typeof _0x18f996?Object['entries'](_0x18f996)['sort']()['forEach'](([_0xac12d3,_0x24a6eb])=>{_0xda62dd(_0xac12d3),_0x944363(_0x24a6eb);}):_0xda62dd(window['String'](_0x18f996));}return _0x944363(_0x3b6cd1),_0x22b9ac>>>0x0;}function _0x43408d(_0x5a95cd){return _0x5a95cd['toString'](0x10)['padStart'](0x8,'0');}function _0xca8afc(_0x2c2168){return _0x2c2168['split']('')['reverse']()['join']('');}function _0x51d769(){}_0x505bf1(await _0x57d740());}(this);}getAllowedCommands(){return this['_allowedCommands'];}getDefaultCommands(){const _0xd8252=_0x2b259a=>function(_0x4231cd,_0x4d69bd){const t=_0x4231cd['t'],_0x2a92d0=_0x4231cd['t'];switch(_0x4d69bd){case'AI\x20Assistant':return _0x2a92d0('AI\x20Assistant');case'Block\x20quote':return _0x2a92d0('Block\x20quote');case'Bulleted\x20List':return _0x2a92d0('Bulleted\x20List');case'Insert\x20code\x20block':return _0x2a92d0('Insert\x20code\x20block');case'Open\x20file\x20manager':return _0x2a92d0('Open\x20file\x20manager');case'Insert\x20image':return _0x2a92d0('Insert\x20image');case'Heading\x201':return _0x2a92d0('Heading\x201');case'Heading\x202':return _0x2a92d0('Heading\x202');case'Heading\x203':return _0x2a92d0('Heading\x203');case'Heading\x204':return _0x2a92d0('Heading\x204');case'Heading\x205':return _0x2a92d0('Heading\x205');case'Heading\x206':return _0x2a92d0('Heading\x206');case'Horizontal\x20line':return _0x2a92d0('Horizontal\x20line');case'Insert\x20HTML':return _0x2a92d0('Insert\x20HTML');case'Increase\x20indent':return _0x2a92d0('Increase\x20indent');case'Insert\x20table':return _0x2a92d0('Insert\x20table');case'Table\x20of\x20contents':return _0x2a92d0('Table\x20of\x20contents');case'Numbered\x20List':return _0x2a92d0('Numbered\x20List');case'Decrease\x20indent':return _0x2a92d0('Decrease\x20indent');case'Paragraph':return _0x2a92d0('Paragraph');case'To-do\x20List':return _0x2a92d0('To-do\x20List');case'Create\x20a\x20block\x20quote':return t('Create\x20a\x20block\x20quote');case'Create\x20a\x20bulleted\x20list':return t('Create\x20a\x20bulleted\x20list');case'Create\x20a\x20code\x20block':return t('Create\x20a\x20code\x20block');case'Open\x20file\x20manager\x20to\x20insert\x20an\x20image\x20or\x20a\x20file':return t('Open\x20file\x20manager\x20to\x20insert\x20an\x20image\x20or\x20a\x20file');case'Open\x20file\x20browser\x20to\x20insert\x20an\x20image\x20or\x20a\x20file':return t('Open\x20file\x20browser\x20to\x20insert\x20an\x20image\x20or\x20a\x20file');case'Create\x20a\x20heading\x20level\x201':return t('Create\x20a\x20heading\x20level\x201');case'Create\x20a\x20heading\x20level\x202':return t('Create\x20a\x20heading\x20level\x202');case'Create\x20a\x20heading\x20level\x203':return t('Create\x20a\x20heading\x20level\x203');case'Create\x20a\x20heading\x20level\x204':return t('Create\x20a\x20heading\x20level\x204');case'Create\x20a\x20heading\x20level\x205':return t('Create\x20a\x20heading\x20level\x205');case'Create\x20a\x20heading\x20level\x206':return t('Create\x20a\x20heading\x20level\x206');case'Insert\x20a\x20horizontal\x20line':return t('Insert\x20a\x20horizontal\x20line');case'Insert\x20an\x20HTML\x20snippet':return t('Insert\x20an\x20HTML\x20snippet');case'Increase\x20the\x20indentation':return t('Increase\x20the\x20indentation');case'Insert\x20Mermaid\x20diagram':return t('Insert\x20Mermaid\x20diagram');case'Insert\x20the\x20Mermaid\x20diagram':return t('Insert\x20the\x20Mermaid\x20diagram');case'Create\x20a\x20table':return t('Create\x20a\x20table');case'Insert\x20table\x20of\x20contents':return t('Insert\x20table\x20of\x20contents');case'Create\x20a\x20numbered\x20list':return t('Create\x20a\x20numbered\x20list');case'Decrease\x20the\x20indentation':return t('Decrease\x20the\x20indentation');case'Insert\x20a\x20paragraph':return t('Insert\x20a\x20paragraph');case'Create\x20a\x20to-do\x20list':return t('Create\x20a\x20to-do\x20list');case'Open\x20the\x20AI\x20Assistant\x20to\x20generate\x20content':return t('Open\x20the\x20AI\x20Assistant\x20to\x20generate\x20content');case'Insert\x20an\x20emoji':return t('Insert\x20an\x20emoji');case'Insert\x20a\x20footnote':return t('Insert\x20a\x20footnote');default:return _0x4d69bd;}}(this['editor']['locale'],_0x2b259a);return[{'id':'aiAssistant','commandName':'showAIAssistant','icon':_0x4462d3,'title':_0xd8252('AI\x20Assistant'),'description':_0xd8252('Open\x20the\x20AI\x20Assistant\x20to\x20generate\x20content'),'execute':_0x5f5849=>{setTimeout(()=>_0x5f5849['execute']('showAIAssistant'));}},{'id':'blockQuote','commandName':'blockQuote','icon':_0x592bb1,'title':_0xd8252('Block\x20quote'),'description':_0xd8252('Create\x20a\x20block\x20quote')},{'id':'bulletedList','commandName':'bulletedList','icon':_0x2c9d1c,'title':_0xd8252('Bulleted\x20List'),'description':_0xd8252('Create\x20a\x20bulleted\x20list')},{'id':'codeBlock','commandName':'codeBlock','icon':_0x187744,'title':_0xd8252('Insert\x20code\x20block'),'description':_0xd8252('Create\x20a\x20code\x20block')},{'id':'ckbox','commandName':'ckbox','icon':_0x2b7008,'title':_0xd8252('Open\x20file\x20manager'),'description':_0xd8252('Open\x20file\x20manager\x20to\x20insert\x20an\x20image\x20or\x20a\x20file'),'aliases':['ckfinder','filemanager','upload']},{'id':'ckfinder','commandName':'ckfinder','icon':_0x2b7008,'title':_0xd8252('Insert\x20image'),'description':_0xd8252('Open\x20file\x20browser\x20to\x20insert\x20an\x20image\x20or\x20a\x20file'),'aliases':['ckbox','filemanager','upload']},{'id':'emoji','commandName':'emoji','icon':_0xe5155d,'title':_0xd8252('Emoji'),'description':_0xd8252('Insert\x20an\x20emoji'),'execute':_0x17d93c=>{setTimeout(()=>_0x17d93c['execute']('emoji'));}},{'id':'heading1','commandName':'heading','icon':_0x3d7add,'title':_0xd8252('Heading\x201'),'description':_0xd8252('Create\x20a\x20heading\x20level\x201'),'execute':_0x2170f2=>{_0x2170f2['execute']('heading',{'value':'heading1'});}},{'id':'heading2','commandName':'heading','icon':_0x49b633,'title':_0xd8252('Heading\x202'),'description':_0xd8252('Create\x20a\x20heading\x20level\x202'),'execute':_0x5382f2=>{_0x5382f2['execute']('heading',{'value':'heading2'});}},{'id':'heading3','commandName':'heading','icon':_0x580153,'title':_0xd8252('Heading\x203'),'description':_0xd8252('Create\x20a\x20heading\x20level\x203'),'execute':_0x11c9b7=>{_0x11c9b7['execute']('heading',{'value':'heading3'});}},{'id':'heading4','commandName':'heading','icon':_0x155ef3,'title':_0xd8252('Heading\x204'),'description':_0xd8252('Create\x20a\x20heading\x20level\x204'),'execute':_0x57d1fe=>{_0x57d1fe['execute']('heading',{'value':'heading4'});}},{'id':'heading5','commandName':'heading','icon':_0x161f54,'title':_0xd8252('Heading\x205'),'description':_0xd8252('Create\x20a\x20heading\x20level\x205'),'execute':_0x1467f5=>{_0x1467f5['execute']('heading',{'value':'heading5'});}},{'id':'heading6','commandName':'heading','icon':_0x2c6229,'title':_0xd8252('Heading\x206'),'description':_0xd8252('Create\x20a\x20heading\x20level\x206'),'execute':_0x230420=>{_0x230420['execute']('heading',{'value':'heading6'});}},{'id':'horizontalLine','commandName':'horizontalLine','icon':_0x266c0a,'title':_0xd8252('Horizontal\x20line'),'description':_0xd8252('Insert\x20a\x20horizontal\x20line')},{'id':'htmlEmbed','commandName':'htmlEmbed','icon':_0x21815b,'title':_0xd8252('Insert\x20HTML'),'description':_0xd8252('Insert\x20an\x20HTML\x20snippet')},{'id':'indent','commandName':'indent','icon':_0x54a6d2,'title':_0xd8252('Increase\x20indent'),'description':_0xd8252('Increase\x20the\x20indentation')},{'id':'insertMermaidCommand','commandName':'insertMermaidCommand','title':_0xd8252('Insert\x20Mermaid\x20diagram'),'description':_0xd8252('Insert\x20the\x20Mermaid\x20diagram')},{'id':'insertTable','commandName':'insertTable','icon':_0xa0b6,'title':_0xd8252('Insert\x20table'),'description':_0xd8252('Create\x20a\x20table')},{'id':'insertTableOfContents','commandName':'insertTableOfContents','icon':_0x294bb4,'title':_0xd8252('Table\x20of\x20contents'),'description':_0xd8252('Insert\x20table\x20of\x20contents'),'aliases':['toc']},{'id':'numberedList','commandName':'numberedList','icon':_0x1a5723,'title':_0xd8252('Numbered\x20List'),'description':_0xd8252('Create\x20a\x20numbered\x20list')},{'id':'outdent','commandName':'outdent','icon':_0x51f411,'title':_0xd8252('Decrease\x20indent'),'description':_0xd8252('Decrease\x20the\x20indentation')},{'id':'paragraph','commandName':'paragraph','icon':_0x18c66e,'title':_0xd8252('Paragraph'),'description':_0xd8252('Insert\x20a\x20paragraph')},{'id':'todoList','commandName':'todoList','icon':_0x37df5b,'title':_0xd8252('To-do\x20List'),'description':_0xd8252('Create\x20a\x20to-do\x20list')},{'id':'footnote','commandName':'insertFootnote','icon':_0x269a5d,'title':_0xd8252('Footnote'),'description':_0xd8252('Insert\x20a\x20footnote')}];}['_proxyIsEnabled'](_0x3eac36){return _0x3eac36['isEnabled']?_0x3eac36['isEnabled'](this['editor']):!_0x3eac36['commandName']||this['editor']['commands']['get'](_0x3eac36['commandName'])['isEnabled'];}_proxyExecute(_0xd12153){if(_0xd12153['execute'])_0xd12153['execute'](this['editor']);else{if(!_0xd12153['commandName'])throw new _0x50c559('slash-command-execute-missing',this['editor'],{'commandDefinition':_0xd12153});this['editor']['execute'](_0xd12153['commandName']);}}};function E(_0x2b8a4d,_0x40988a){return _0x2b8a4d['title']<_0x40988a['title']?-0x1:_0x2b8a4d['title']>_0x40988a['title']?0x1:0x0;}function P(_0xc108ad,_0x2386f0){return _0x2386f0+'-'+_0xc108ad['toLowerCase']()['split']('\x20')['join']('-');}var K=class extends _0x170c4b{static get['pluginName'](){return'SlashCommandEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[O];}getMatchingCommands(_0x26c02b){const _0x37e551=_0x26c02b&&_0x26c02b['toLowerCase']();let _0x5d50b=this['editor']['plugins']['get']('SlashCommandConfig')['getAllowedCommands']();if(_0x5d50b=_0x5d50b['filter'](_0x172fef=>_0x172fef['isEnabled']()),_0x37e551){const _0x59e606=[],_0x41f1b8=[],_0x457a0d=[],_0x2083e4=[];for(const _0x136479 of _0x5d50b)_0x136479['id']['toLowerCase']()['includes'](_0x37e551)?_0x59e606['push'](_0x136479):_0x136479['title']['toLowerCase']()['includes'](_0x37e551)?_0x41f1b8['push'](_0x136479):_0x136479['aliases']&&_0x136479['aliases']['some'](_0x2e29c7=>_0x2e29c7['toLowerCase']()['includes'](_0x37e551))?_0x457a0d['push'](_0x136479):_0x136479['description']&&_0x136479['description']['toLowerCase']()['includes'](_0x37e551)&&_0x2083e4['push'](_0x136479);_0x5d50b=_0x59e606['concat'](_0x41f1b8,_0x457a0d,_0x2083e4);}return _0x5d50b;}},M=class extends _0x5db0e8{constructor(_0x5e20eb,_0xfe4034){super(_0x5e20eb),this['textPartView']=this['_createTextPartView'](_0x5e20eb,_0xfe4034),void 0x0!==_0xfe4034['isIconColorInherited']&&(this['iconView']['isColorInherited']=_0xfe4034['isIconColorInherited']),this['set']({'icon':_0xfe4034['icon']||_0x42638d,'withText':!0x0,'label':_0xfe4034['title'],'class':'ck-slash-command-button'});}['render'](){super['render'](),this['children']['add'](this['textPartView']);}_createTextPartView(_0x2eacb0,_0x35bfb8){const _0x1c12ac=new _0x27c612(_0x2eacb0);return _0x1c12ac['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-slash-command-button__text-part']},'children':_0x35bfb8['description']?[this['labelView'],{'tag':'span','attributes':{'class':['ck','ck-slash-command-button__description']},'children':[{'text':_0x35bfb8['description']}]}]:[this['labelView']]}),_0x1c12ac;}},S=class extends _0x170c4b{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'SlashCommandUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4078ed){super(_0x4078ed),this['_setupMentionConfiguration']();}init(){this['editor']['once']('ready',this['_overrideMentionExecuteListener']['bind'](this)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x56ee03=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x5aa2e6;for(const _0x3662c9 in _0x56ee03){const _0x5d6eb3=_0x3662c9,_0x275ffc=_0x56ee03[_0x5d6eb3];if('slashCommandLicenseKeyValid'==_0x275ffc||'slashCommandLicenseKeyInvalid'==_0x275ffc||'slashCommandLicenseKeyExpired'==_0x275ffc||'slashCommandLicenseKeyDomainLimit'==_0x275ffc||'slashCommandLicenseKeyNotAllowed'==_0x275ffc||'slashCommandLicenseKeyEvaluationLimit'==_0x275ffc||'slashCommandLicenseKeyUsageLimit'==_0x275ffc){delete _0x56ee03[_0x5d6eb3],_0x5aa2e6=_0x275ffc,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'slashCommandLicenseKeyInvalid'==_0x5aa2e6&&_0x56ee03['_showLicenseError']('invalid'),'slashCommandLicenseKeyExpired'==_0x5aa2e6&&_0x56ee03['_showLicenseError']('expired'),'slashCommandLicenseKeyDomainLimit'==_0x5aa2e6&&_0x56ee03['_showLicenseError']('domainLimit'),'slashCommandLicenseKeyNotAllowed'==_0x5aa2e6&&_0x56ee03['_showLicenseError']('featureNotAllowed','SlashCommand'),'slashCommandLicenseKeyEvaluationLimit'==_0x5aa2e6&&_0x56ee03['_showLicenseError']('evaluationLimit'),'slashCommandLicenseKeyUsageLimit'==_0x5aa2e6&&_0x56ee03['_showLicenseError']('usageLimit');},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_setupMentionConfiguration(){const _0x183f9b=this['editor'],_0x2a08e1=this['editor']['plugins']['get']('SlashCommandEditing'),_0x51e6cb=_0x183f9b['config']['get']('mention.feeds');_0x51e6cb['push']({'marker':'/','feed':_0x313e5d=>_0x2a08e1['getMatchingCommands'](_0x313e5d),'itemRenderer':this['_customItemRenderer']['bind'](this),'dropdownLimit':_0x183f9b['config']['get']('slashCommand.dropdownLimit')||0x1/0x0}),_0x183f9b['config']['set']('mention.feeds',_0x51e6cb);}_overrideMentionExecuteListener(){const _0x40e2fc=this['editor'];_0x40e2fc['commands']['get']('mention')['on']('execute',(_0x1230a3,_0x35067a)=>{const _0x1f3c3e=_0x35067a[0x0],_0x13f1ee=_0x40e2fc['model'];'/'===_0x1f3c3e['marker']&&_0x13f1ee['change'](_0x5776ba=>{_0x5776ba['remove'](_0x1f3c3e['range']),_0x1f3c3e['mention']['execute'](),_0x1230a3['stop']();});},{'priority':'high'});}_customItemRenderer(_0x209e15){const _0x3cd7db=this['editor']['locale'],_0x422e90=new M(_0x3cd7db,_0x209e15);return _0x422e90['render'](),_0x422e90['element'];}},D=class extends _0x170c4b{static get requires(){return[_0x1ac00d,K,S];}static get['pluginName'](){return'SlashCommand';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{D as SlashCommand,O as SlashCommandConfig,K as SlashCommandEditing,S as SlashCommandUI};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-slash-command",
3
- "version": "48.4.0-alpha.3",
3
+ "version": "48.4.0-alpha.5",
4
4
  "description": "Slash command feature for CKEditor 5.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (http://cksource.com/)",
@@ -21,14 +21,14 @@
21
21
  "./package.json": "./package.json"
22
22
  },
23
23
  "dependencies": {
24
- "@ckeditor/ckeditor5-core": "48.4.0-alpha.3",
25
- "@ckeditor/ckeditor5-heading": "48.4.0-alpha.3",
26
- "@ckeditor/ckeditor5-icons": "48.4.0-alpha.3",
27
- "@ckeditor/ckeditor5-mention": "48.4.0-alpha.3",
28
- "@ckeditor/ckeditor5-style": "48.4.0-alpha.3",
29
- "@ckeditor/ckeditor5-template": "48.4.0-alpha.3",
30
- "@ckeditor/ckeditor5-ui": "48.4.0-alpha.3",
31
- "@ckeditor/ckeditor5-utils": "48.4.0-alpha.3"
24
+ "@ckeditor/ckeditor5-core": "48.4.0-alpha.5",
25
+ "@ckeditor/ckeditor5-heading": "48.4.0-alpha.5",
26
+ "@ckeditor/ckeditor5-icons": "48.4.0-alpha.5",
27
+ "@ckeditor/ckeditor5-mention": "48.4.0-alpha.5",
28
+ "@ckeditor/ckeditor5-style": "48.4.0-alpha.5",
29
+ "@ckeditor/ckeditor5-template": "48.4.0-alpha.5",
30
+ "@ckeditor/ckeditor5-ui": "48.4.0-alpha.5",
31
+ "@ckeditor/ckeditor5-utils": "48.4.0-alpha.5"
32
32
  },
33
33
  "files": [
34
34
  "dist",