@ckeditor/ckeditor5-slash-command 49.0.0-alpha.3 → 49.0.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 _0x674bba}from'@ckeditor/ckeditor5-core';import{Mention as _0xce3de0}from'@ckeditor/ckeditor5-mention';import{CKEditorError as _0x571e03,uid as _0x1d3643}from'@ckeditor/ckeditor5-utils';import{IconBrowseFiles as _0x31f20e,IconBulletedList as _0x32aae0,IconCodeBlock as _0x1528ef,IconEmoji as _0xd4d189,IconFootnote as _0xb91d2,IconHeading1 as _0xd04a20,IconHeading2 as _0x3bd825,IconHeading3 as _0x276033,IconHeading4 as _0xb679f8,IconHeading5 as _0x442e7b,IconHeading6 as _0x3af91b,IconHorizontalLine as _0x4c8457,IconHtml as _0x3b1d59,IconIndent as _0x18d4e2,IconNumberedList as _0x3e6165,IconOutdent as _0x4cd936,IconParagraph as _0x358727,IconPlay as _0xf18499,IconQuote as _0x1b98d7,IconRobotPencil as _0x19af70,IconTable as _0x35ca49,IconTableOfContents as _0x35c250,IconTodoList as _0x42c993}from'@ckeditor/ckeditor5-icons';import{ButtonView as _0x4aa3e7,View as _0x5b326c}from'@ckeditor/ckeditor5-ui';var O=class extends _0x674bba{static get['pluginName'](){return'SlashCommandConfig';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x94ff2a){super(_0x94ff2a),this['_allowedCommands']=null;}afterInit(){const _0x185c44=this['editor']['config']['get']('slashCommand.removeCommands')||[],_0xc3e836=function(_0x5b5272){let _0x267ec2=['heading4','heading5','heading6'];if(_0x5b5272){const _0x30fd0e=_0x5b5272['map'](_0x248e22=>_0x248e22['model']);_0x267ec2=['heading1','heading2','heading3','heading4','heading5','heading6']['filter'](_0x138d49=>!_0x30fd0e['includes'](_0x138d49));}return _0x267ec2;}(this['editor']['config']['get']('heading.options'));let _0x503bfd=this['getDefaultCommands']()['filter'](_0x45b7cc=>!_0xc3e836['includes'](_0x45b7cc['id']))['filter'](_0x3dabeb=>!_0x185c44['includes'](_0x3dabeb['commandName']));const _0x573796=this['editor']['config']['get']('slashCommand.extraCommands');_0x573796&&_0x573796['length']&&(_0x503bfd=_0x503bfd['concat'](_0x573796));const _0x3a58ae=this['editor']['config']['get']('template.definitions');_0x3a58ae&&_0x3a58ae['length']&&(_0x503bfd=_0x503bfd['concat'](function(_0x24ff22){return _0x24ff22['map'](_0x2e4f18=>{const {title:_0xe28075,icon:_0x3bb039,description:_0x306b47,data:_0x17824c}=_0x2e4f18,_0x25078a={'id':P(_0xe28075,'template'),'commandName':'insertTemplate','execute':_0x24d1ca=>{_0x24d1ca['execute']('insertTemplate',_0x17824c);},'description':_0x306b47,'icon':_0x3bb039,'title':_0xe28075};return _0x3bb039&&(_0x25078a['isIconColorInherited']=!0x1),_0x25078a;});}(_0x3a58ae)));const _0x21ba0c=this['editor']['config']['get']('style.definitions');_0x21ba0c&&_0x21ba0c['length']&&(_0x503bfd=_0x503bfd['concat'](function(_0x566afd){return _0x566afd['map'](_0x590f7a=>({'id':P(_0x590f7a['name'],'style'),'commandName':'style','execute':_0x10f3d1=>{_0x10f3d1['execute']('style',{'styleName':_0x590f7a['name']});},'isEnabled':_0x51914d=>{const _0x7c57a5=_0x51914d['commands']['get']('style');return _0x7c57a5['isEnabled']&&_0x7c57a5['enabledStyles']['includes'](_0x590f7a['name']);},'title':_0x590f7a['name']}));}(_0x21ba0c)));const _0x288701=_0x503bfd['filter'](_0xbb74a1=>!_0xbb74a1['commandName']||void 0x0!==this['editor']['commands']['get'](_0xbb74a1['commandName'])),_0x38a2be=[];for(const _0x14f5a4 of _0x288701)_0x38a2be['push']({'id':_0x14f5a4['id'],'commandName':_0x14f5a4['commandName'],'title':'function'==typeof _0x14f5a4['title']?_0x14f5a4['title'](this['editor']):_0x14f5a4['title'],'description':_0x14f5a4['description'],'icon':_0x14f5a4['icon'],'isIconColorInherited':_0x14f5a4['isIconColorInherited'],'aliases':_0x14f5a4['aliases'],'isEnabled':()=>this['_proxyIsEnabled'](_0x14f5a4),'execute':()=>this['_proxyExecute'](_0x14f5a4)});this['_allowedCommands']=_0x38a2be['sort'](E),async function(_0x5cf809){const _0x47c55c='5goNZRxHzmBfrl0Fq6Cks1ahDGS2LUEWiby3wKvu4IVPdeT8jn9MOQJtcAY7Xp',_0x9a49c1=0x79758,_0x27e900={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x3a19fc(_0x1042b0){const _0x4305b3=new window['Promise'](_0x2e1490=>{_0x1042b0['once']('ready',_0x2e1490);}),_0x2bfe55=window['Date']['now'](),_0x101a04=_0x1042b0['config']['get']('licenseKey');async function _0x5c6970(){let _0x7343e4,_0x4936c2=null,_0x4633cb=null;try{return'GPL'==_0x101a04?'NotAllowed':(_0x7343e4=_0xa874a7(),_0x7343e4?(_0x7343e4['usageEndpoint']&&(_0x4633cb=_0x44113a(_0x7343e4['usageEndpoint'],_0x7343e4['jti'])),await _0x17488()?_0x523279()?_0x5600af()?'Expired':_0x461f83()?('evaluation'==_0x7343e4['licenseType']&&(_0x4936c2=_0x4f230c('EvaluationLimit')),await _0x1e2dc6()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x5600af(){const _0x20825d=['evaluation','trial']['includes'](_0x7343e4['licenseType'])?_0x2bfe55/0x3e8:0xe10*_0x9a49c1;return _0x7343e4['exp']<_0x20825d;}function _0x523279(){const _0x4d5e9e=_0x7343e4['features'];return!!_0x4d5e9e&&(!!_0x4d5e9e['includes']('*')||(!!_0x4d5e9e['includes']('SC')||(!!_0x4d5e9e['includes']('PP')||!(!_0x4d5e9e['includes']('TRILIUM')||!_0x12a40e()))));}function _0x461f83(){const _0x5a5cb4=_0x7343e4['licensedHosts'];if(!_0x5a5cb4||0x0==_0x5a5cb4['length'])return!0x0;const {hostname:_0x1ff7df}=new URL(window['location']['href']);if(_0x5a5cb4['includes'](_0x1ff7df))return!0x0;const _0x42ffe3=_0x1ff7df['split']('.');return _0x5a5cb4['filter'](_0x52c80a=>_0x52c80a['includes']('*'))['map'](_0x251007=>_0x251007['split']('.'))['filter'](_0x17ec26=>_0x17ec26['length']<=_0x42ffe3['length'])['map'](_0x9a4bc7=>Array(_0x42ffe3['length']-_0x9a4bc7['length'])['fill']('*'===_0x9a4bc7[0x0]?'*':'')['concat'](_0x9a4bc7))['some'](_0x514eee=>_0x42ffe3['every']((_0x40a05c,_0x3653ae)=>_0x514eee[_0x3653ae]===_0x40a05c||'*'===_0x514eee[_0x3653ae]));}function _0x1e2dc6(){return _0x4936c2&&_0x4633cb?new window['Promise']((_0x4e6535,_0x2b546a)=>{_0x4936c2['then'](_0x4e6535,_0x2b546a),_0x4633cb['then'](_0x11a271=>{'Valid'!=_0x11a271&&_0x4e6535(_0x11a271);},_0x2b546a);}):_0x4936c2||_0x4633cb||'Valid';}}function _0x44113a(_0x5df4e9,_0x4fb241){return new window['Promise'](_0x25cbfc=>{if(_0x7dcbd())return _0x25cbfc('Valid');_0x257394(),_0x1042b0['decorate']('_sendUsageRequest');let _0x5319cd=!0x1;const _0x6a3881=_0x1d3643();function _0x204e7d(_0x12bb77){return!!_0x12bb77&&('object'==typeof _0x12bb77||'function'==typeof _0x12bb77)&&'function'==typeof _0x12bb77['then']&&'function'==typeof _0x12bb77['catch'];}function _0xc24046(_0x1ec5b3){_0x533a23(_0x1ec5b3)['then'](_0x38db87=>_0x38db87&&'ok'==_0x38db87['status']?_0x3dc8fc(_0xff3530(_0x6a3881+_0x4fb241))!=_0x38db87['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x41b823=>(_0x39b1d7(),_0x41b823),()=>{const _0x49dafb=_0x24e25e();return null==_0x49dafb?(_0x39b1d7(),'Valid'):_0x2bfe55-_0x49dafb>0x240c8400?'UsageLimit':'Valid';})['then'](_0x25cbfc)['catch'](()=>{_0x25cbfc('UsageLimit');});const _0x4029eb=0x36ee80;function _0x39b1d7(){const _0x1e8238='llct-'+_0x3dc8fc(_0xff3530(_0x5df4e9)),_0x217cce=_0x112728(_0x3dc8fc(window['Math']['ceil'](_0x2bfe55/_0x4029eb)));window['localStorage']['setItem'](_0x1e8238,_0x217cce);}function _0x24e25e(){const _0x2d37bb='llct-'+_0x3dc8fc(_0xff3530(_0x5df4e9)),_0x2ccf7f=window['localStorage']['getItem'](_0x2d37bb);return _0x2ccf7f?window['parseInt'](_0x112728(_0x2ccf7f),0x10)*_0x4029eb:null;}function _0x533a23(_0xeacc4b){return new window['Promise']((_0x4725c1,_0x581586)=>{_0xeacc4b['then'](_0x4725c1,_0x581586),window['setTimeout'](_0x581586,0x1d4c0);});}}_0x1042b0['on']('_sendUsageRequest',(_0x147372,_0x29b748)=>{if(_0x29b748[0x0]!=_0x5df4e9)return _0x25cbfc('UsageLimit');_0x29b748[0x1]={..._0x29b748[0x1],'requestId':_0x6a3881};},{'priority':'high'}),_0x1042b0['on']('_sendUsageRequest',_0x290858=>{_0x204e7d(_0x290858['return'])&&(_0x5319cd=!0x0,_0xc24046(_0x290858['return']));},{'priority':'low'}),_0x4305b3['then'](()=>{_0x5319cd||_0x25cbfc('UsageLimit');});});function _0x7dcbd(){return'auto'==_0x1042b0['editing']['view']['_overlayModeHint'];}function _0x257394(){_0x1042b0['editing']['view']['_overlayModeHint']='auto';}}function _0x4f230c(_0x16a816){const _0x4ff71b=[new window['Promise'](_0x2bc2d5=>setTimeout(_0x2bc2d5,0x93ecc)),_0x4305b3['then'](()=>new window['Promise'](_0x365b7f=>{let _0x188f94=0x0;_0x1042b0['model']['on']('applyOperation',(_0x2b2936,_0x41c3a1)=>{_0x41c3a1[0x0]['isDocumentOperation']&&_0x188f94++,0x5e8==_0x188f94&&(_0x365b7f(),_0x2b2936['off']());});}))];return window['Promise']['race'](_0x4ff71b)['then'](()=>_0x16a816);}async function _0x1c3d0c(){await _0x4305b3,_0x1042b0['model']['change']=_0x39c54f,_0x1042b0['model']['enqueueChange']=_0x39c54f,_0x1042b0['enableReadOnlyMode']('model');}function _0x12a40e(){return window['glob']&&window['glob']['triliumVersion'];}function _0x230786(_0x3de758){const _0x2d2252=_0x43fed4();_0x1042b0[_0x2d2252]='slashCommandLicenseKey'+_0x3de758,'Valid'!=_0x3de758&&_0x1c3d0c();}function _0x43fed4(){const _0x251b22=window['String'](window['performance']['now']())['replace']('.','');let _0x15cd23='g';for(let _0x5b4bae=0x0;_0x5b4bae<_0x251b22['length'];_0x5b4bae+=0x2){let _0x459457=window['parseInt'](_0x251b22['substring'](_0x5b4bae,_0x5b4bae+0x2));_0x459457>=0x3e&&(_0x459457-=0x3e),_0x15cd23+=_0x47c55c[_0x459457];}return _0x15cd23;}function _0xa874a7(){const _0x16ad7f=_0x101a04['split']('.');if(0x3!=_0x16ad7f['length'])return null;return _0x32a728(_0x16ad7f[0x1]);function _0x32a728(_0xe6d545){const _0x3257c7=_0x504652(_0xe6d545);return _0x3257c7&&_0x365a7c()?_0x3257c7:null;function _0x365a7c(){const _0x2f3b79=_0x3257c7['jti'],_0x583046=window['parseInt'](_0x2f3b79['substring'](_0x2f3b79['length']-0x8),0x10),_0x492c46={..._0x3257c7,'jti':_0x2f3b79['substring'](0x0,_0x2f3b79['length']-0x8)};return delete _0x492c46['vc'],_0xff3530(_0x492c46)==_0x583046;}}}async function _0x17488(){let _0x377862=!0x0;try{const [_0x786f3c,_0x49d42b,_0x3786f9]=_0x101a04['split']('.');return _0x35cdd6(_0x786f3c),await _0x20c2cc(_0x786f3c,_0x49d42b,_0x3786f9),_0x377862;}catch{return!0x1;}function _0x35cdd6(_0x57dbf2){const _0x1f451e=_0x504652(_0x57dbf2);_0x1f451e&&'ES256'==_0x1f451e['alg']||(_0x377862=!0x1);}async function _0x20c2cc(_0x207619,_0x3dd35d,_0xba7a90){const _0x4ec7d3=window['Uint8Array']['from'](_0x19dd82(_0xba7a90),_0xb650a5=>_0xb650a5['charCodeAt'](0x0)),_0x57624=new window['TextEncoder']()['encode'](_0x207619+'.'+_0x3dd35d),_0x2a8b8e=window['crypto']['subtle'];if(!_0x2a8b8e)return;const _0x263916=await _0x2a8b8e['importKey']('jwk',_0x27e900,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x2a8b8e['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x263916,_0x4ec7d3,_0x57624)||(_0x377862=!0x1);}}function _0x504652(_0x404bf0){return _0x404bf0['startsWith']('ey')?JSON['parse'](_0x19dd82(_0x404bf0)):null;}function _0x19dd82(_0xc6538f){return window['atob'](_0xc6538f['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0xff3530(_0x37ca1c){let _0x20c2bb=0x1505;function _0x5d6d97(_0x5aeb92){for(let _0x622c42=0x0;_0x622c42<_0x5aeb92['length'];_0x622c42++){const _0x5f2d59=_0x5aeb92['charCodeAt'](_0x622c42);_0x20c2bb=(_0x20c2bb<<0x5)+_0x20c2bb+_0x5f2d59,_0x20c2bb&=_0x20c2bb;}}function _0x5570c6(_0x31285c){Array['isArray'](_0x31285c)?_0x31285c['forEach'](_0x5570c6):_0x31285c&&'object'==typeof _0x31285c?Object['entries'](_0x31285c)['sort']()['forEach'](([_0x41ed8d,_0x18426c])=>{_0x5d6d97(_0x41ed8d),_0x5570c6(_0x18426c);}):_0x5d6d97(window['String'](_0x31285c));}return _0x5570c6(_0x37ca1c),_0x20c2bb>>>0x0;}function _0x3dc8fc(_0x2e0cec){return _0x2e0cec['toString'](0x10)['padStart'](0x8,'0');}function _0x112728(_0x295845){return _0x295845['split']('')['reverse']()['join']('');}function _0x39c54f(){}_0x230786(await _0x5c6970());}_0x3a19fc(_0x5cf809['editor']);}(this);}getAllowedCommands(){return this['_allowedCommands'];}getDefaultCommands(){const _0x109ae5=_0x3c64fb=>function(_0x1098c2,_0x249eb0){const t=_0x1098c2['t'],_0x5afece=_0x1098c2['t'];switch(_0x249eb0){case'AI\x20Assistant':return _0x5afece('AI\x20Assistant');case'Block\x20quote':return _0x5afece('Block\x20quote');case'Bulleted\x20List':return _0x5afece('Bulleted\x20List');case'Insert\x20code\x20block':return _0x5afece('Insert\x20code\x20block');case'Open\x20file\x20manager':return _0x5afece('Open\x20file\x20manager');case'Insert\x20image':return _0x5afece('Insert\x20image');case'Heading\x201':return _0x5afece('Heading\x201');case'Heading\x202':return _0x5afece('Heading\x202');case'Heading\x203':return _0x5afece('Heading\x203');case'Heading\x204':return _0x5afece('Heading\x204');case'Heading\x205':return _0x5afece('Heading\x205');case'Heading\x206':return _0x5afece('Heading\x206');case'Horizontal\x20line':return _0x5afece('Horizontal\x20line');case'Insert\x20HTML':return _0x5afece('Insert\x20HTML');case'Increase\x20indent':return _0x5afece('Increase\x20indent');case'Insert\x20table':return _0x5afece('Insert\x20table');case'Table\x20of\x20contents':return _0x5afece('Table\x20of\x20contents');case'Numbered\x20List':return _0x5afece('Numbered\x20List');case'Decrease\x20indent':return _0x5afece('Decrease\x20indent');case'Paragraph':return _0x5afece('Paragraph');case'To-do\x20List':return _0x5afece('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 _0x249eb0;}}(this['editor']['locale'],_0x3c64fb);return[{'id':'aiAssistant','commandName':'showAIAssistant','icon':_0x19af70,'title':_0x109ae5('AI\x20Assistant'),'description':_0x109ae5('Open\x20the\x20AI\x20Assistant\x20to\x20generate\x20content'),'execute':_0x766052=>{setTimeout(()=>_0x766052['execute']('showAIAssistant'));}},{'id':'blockQuote','commandName':'blockQuote','icon':_0x1b98d7,'title':_0x109ae5('Block\x20quote'),'description':_0x109ae5('Create\x20a\x20block\x20quote')},{'id':'bulletedList','commandName':'bulletedList','icon':_0x32aae0,'title':_0x109ae5('Bulleted\x20List'),'description':_0x109ae5('Create\x20a\x20bulleted\x20list')},{'id':'codeBlock','commandName':'codeBlock','icon':_0x1528ef,'title':_0x109ae5('Insert\x20code\x20block'),'description':_0x109ae5('Create\x20a\x20code\x20block')},{'id':'ckbox','commandName':'ckbox','icon':_0x31f20e,'title':_0x109ae5('Open\x20file\x20manager'),'description':_0x109ae5('Open\x20file\x20manager\x20to\x20insert\x20an\x20image\x20or\x20a\x20file'),'aliases':['ckfinder','filemanager','upload']},{'id':'ckfinder','commandName':'ckfinder','icon':_0x31f20e,'title':_0x109ae5('Insert\x20image'),'description':_0x109ae5('Open\x20file\x20browser\x20to\x20insert\x20an\x20image\x20or\x20a\x20file'),'aliases':['ckbox','filemanager','upload']},{'id':'emoji','commandName':'emoji','icon':_0xd4d189,'title':_0x109ae5('Emoji'),'description':_0x109ae5('Insert\x20an\x20emoji'),'execute':_0x539a60=>{setTimeout(()=>_0x539a60['execute']('emoji'));}},{'id':'heading1','commandName':'heading','icon':_0xd04a20,'title':_0x109ae5('Heading\x201'),'description':_0x109ae5('Create\x20a\x20heading\x20level\x201'),'execute':_0x3ef366=>{_0x3ef366['execute']('heading',{'value':'heading1'});}},{'id':'heading2','commandName':'heading','icon':_0x3bd825,'title':_0x109ae5('Heading\x202'),'description':_0x109ae5('Create\x20a\x20heading\x20level\x202'),'execute':_0x5c18fc=>{_0x5c18fc['execute']('heading',{'value':'heading2'});}},{'id':'heading3','commandName':'heading','icon':_0x276033,'title':_0x109ae5('Heading\x203'),'description':_0x109ae5('Create\x20a\x20heading\x20level\x203'),'execute':_0xe399f7=>{_0xe399f7['execute']('heading',{'value':'heading3'});}},{'id':'heading4','commandName':'heading','icon':_0xb679f8,'title':_0x109ae5('Heading\x204'),'description':_0x109ae5('Create\x20a\x20heading\x20level\x204'),'execute':_0x2b33cd=>{_0x2b33cd['execute']('heading',{'value':'heading4'});}},{'id':'heading5','commandName':'heading','icon':_0x442e7b,'title':_0x109ae5('Heading\x205'),'description':_0x109ae5('Create\x20a\x20heading\x20level\x205'),'execute':_0x38ce32=>{_0x38ce32['execute']('heading',{'value':'heading5'});}},{'id':'heading6','commandName':'heading','icon':_0x3af91b,'title':_0x109ae5('Heading\x206'),'description':_0x109ae5('Create\x20a\x20heading\x20level\x206'),'execute':_0x5b27e2=>{_0x5b27e2['execute']('heading',{'value':'heading6'});}},{'id':'horizontalLine','commandName':'horizontalLine','icon':_0x4c8457,'title':_0x109ae5('Horizontal\x20line'),'description':_0x109ae5('Insert\x20a\x20horizontal\x20line')},{'id':'htmlEmbed','commandName':'htmlEmbed','icon':_0x3b1d59,'title':_0x109ae5('Insert\x20HTML'),'description':_0x109ae5('Insert\x20an\x20HTML\x20snippet')},{'id':'indent','commandName':'indent','icon':_0x18d4e2,'title':_0x109ae5('Increase\x20indent'),'description':_0x109ae5('Increase\x20the\x20indentation')},{'id':'insertMermaidCommand','commandName':'insertMermaidCommand','title':_0x109ae5('Insert\x20Mermaid\x20diagram'),'description':_0x109ae5('Insert\x20the\x20Mermaid\x20diagram')},{'id':'insertTable','commandName':'insertTable','icon':_0x35ca49,'title':_0x109ae5('Insert\x20table'),'description':_0x109ae5('Create\x20a\x20table')},{'id':'insertTableOfContents','commandName':'insertTableOfContents','icon':_0x35c250,'title':_0x109ae5('Table\x20of\x20contents'),'description':_0x109ae5('Insert\x20table\x20of\x20contents'),'aliases':['toc']},{'id':'numberedList','commandName':'numberedList','icon':_0x3e6165,'title':_0x109ae5('Numbered\x20List'),'description':_0x109ae5('Create\x20a\x20numbered\x20list')},{'id':'outdent','commandName':'outdent','icon':_0x4cd936,'title':_0x109ae5('Decrease\x20indent'),'description':_0x109ae5('Decrease\x20the\x20indentation')},{'id':'paragraph','commandName':'paragraph','icon':_0x358727,'title':_0x109ae5('Paragraph'),'description':_0x109ae5('Insert\x20a\x20paragraph')},{'id':'todoList','commandName':'todoList','icon':_0x42c993,'title':_0x109ae5('To-do\x20List'),'description':_0x109ae5('Create\x20a\x20to-do\x20list')},{'id':'footnote','commandName':'insertFootnote','icon':_0xb91d2,'title':_0x109ae5('Footnote'),'description':_0x109ae5('Insert\x20a\x20footnote')}];}['_proxyIsEnabled'](_0x4ab3da){return _0x4ab3da['isEnabled']?_0x4ab3da['isEnabled'](this['editor']):!_0x4ab3da['commandName']||this['editor']['commands']['get'](_0x4ab3da['commandName'])['isEnabled'];}_proxyExecute(_0x2be967){if(_0x2be967['execute'])_0x2be967['execute'](this['editor']);else{if(!_0x2be967['commandName'])throw new _0x571e03('slash-command-execute-missing',this['editor'],{'commandDefinition':_0x2be967});this['editor']['execute'](_0x2be967['commandName']);}}};function E(_0x5fa4a0,_0xc3065d){return _0x5fa4a0['title']<_0xc3065d['title']?-0x1:_0x5fa4a0['title']>_0xc3065d['title']?0x1:0x0;}function P(_0x491029,_0x4fcaec){return _0x4fcaec+'-'+_0x491029['toLowerCase']()['split']('\x20')['join']('-');}var K=class extends _0x674bba{static get['pluginName'](){return'SlashCommandEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[O];}getMatchingCommands(_0x2ce04c){const _0x3d622e=_0x2ce04c&&_0x2ce04c['toLowerCase']();let _0xa85939=this['editor']['plugins']['get']('SlashCommandConfig')['getAllowedCommands']();if(_0xa85939=_0xa85939['filter'](_0x3f918e=>_0x3f918e['isEnabled']()),_0x3d622e){const _0x4b53d9=[],_0x3b0bd5=[],_0x3bd6bc=[],_0x3e7dc3=[];for(const _0xacc964 of _0xa85939)_0xacc964['id']['toLowerCase']()['includes'](_0x3d622e)?_0x4b53d9['push'](_0xacc964):_0xacc964['title']['toLowerCase']()['includes'](_0x3d622e)?_0x3b0bd5['push'](_0xacc964):_0xacc964['aliases']&&_0xacc964['aliases']['some'](_0x4d16e4=>_0x4d16e4['toLowerCase']()['includes'](_0x3d622e))?_0x3bd6bc['push'](_0xacc964):_0xacc964['description']&&_0xacc964['description']['toLowerCase']()['includes'](_0x3d622e)&&_0x3e7dc3['push'](_0xacc964);_0xa85939=_0x4b53d9['concat'](_0x3b0bd5,_0x3bd6bc,_0x3e7dc3);}return _0xa85939;}},M=class extends _0x4aa3e7{constructor(_0x6c62b1,_0x10e4b7){super(_0x6c62b1),this['textPartView']=this['_createTextPartView'](_0x6c62b1,_0x10e4b7),void 0x0!==_0x10e4b7['isIconColorInherited']&&(this['iconView']['isColorInherited']=_0x10e4b7['isIconColorInherited']),this['set']({'icon':_0x10e4b7['icon']||_0xf18499,'withText':!0x0,'label':_0x10e4b7['title'],'class':'ck-slash-command-button'});}['render'](){super['render'](),this['children']['add'](this['textPartView']);}_createTextPartView(_0xe0ccb1,_0x1bae3c){const _0x9dfb86=new _0x5b326c(_0xe0ccb1);return _0x9dfb86['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-slash-command-button__text-part']},'children':_0x1bae3c['description']?[this['labelView'],{'tag':'span','attributes':{'class':['ck','ck-slash-command-button__description']},'children':[{'text':_0x1bae3c['description']}]}]:[this['labelView']]}),_0x9dfb86;}},S=class extends _0x674bba{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'SlashCommandUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x291906){super(_0x291906),this['_setupMentionConfiguration']();}init(){this['editor']['once']('ready',this['_overrideMentionExecuteListener']['bind'](this)),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x447d02=[this['editor']];for(const _0x489831 of _0x447d02){let _0x13d1c6;for(const _0x4de26 in _0x489831){const _0x1d5ea5=_0x4de26,_0x4a5e28=_0x489831[_0x1d5ea5];if('slashCommandLicenseKeyValid'==_0x4a5e28||'slashCommandLicenseKeyInvalid'==_0x4a5e28||'slashCommandLicenseKeyExpired'==_0x4a5e28||'slashCommandLicenseKeyDomainLimit'==_0x4a5e28||'slashCommandLicenseKeyNotAllowed'==_0x4a5e28||'slashCommandLicenseKeyEvaluationLimit'==_0x4a5e28||'slashCommandLicenseKeyUsageLimit'==_0x4a5e28){delete _0x489831[_0x1d5ea5],_0x13d1c6=_0x4a5e28,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'slashCommandLicenseKeyInvalid'==_0x13d1c6&&_0x489831['_showLicenseError']('invalid'),'slashCommandLicenseKeyExpired'==_0x13d1c6&&_0x489831['_showLicenseError']('expired'),'slashCommandLicenseKeyDomainLimit'==_0x13d1c6&&_0x489831['_showLicenseError']('domainLimit'),'slashCommandLicenseKeyNotAllowed'==_0x13d1c6&&_0x489831['_showLicenseError']('featureNotAllowed','SlashCommand'),'slashCommandLicenseKeyEvaluationLimit'==_0x13d1c6&&_0x489831['_showLicenseError']('evaluationLimit'),'slashCommandLicenseKeyUsageLimit'==_0x13d1c6&&_0x489831['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_setupMentionConfiguration(){const _0x9206a3=this['editor'],_0x424c95=this['editor']['plugins']['get']('SlashCommandEditing'),_0x276248=_0x9206a3['config']['get']('mention.feeds');_0x276248['push']({'marker':'/','feed':_0x1964cc=>_0x424c95['getMatchingCommands'](_0x1964cc),'itemRenderer':this['_customItemRenderer']['bind'](this),'dropdownLimit':_0x9206a3['config']['get']('slashCommand.dropdownLimit')||0x1/0x0}),_0x9206a3['config']['set']('mention.feeds',_0x276248);}_overrideMentionExecuteListener(){const _0x33b2e7=this['editor'];_0x33b2e7['commands']['get']('mention')['on']('execute',(_0x4fa6ab,_0x38010a)=>{const _0x2822eb=_0x38010a[0x0],_0x402abe=_0x33b2e7['model'];'/'===_0x2822eb['marker']&&_0x402abe['change'](_0x1b39b5=>{_0x1b39b5['remove'](_0x2822eb['range']),_0x2822eb['mention']['execute'](),_0x4fa6ab['stop']();});},{'priority':'high'});}_customItemRenderer(_0x50bf0f){const _0x51beb5=this['editor']['locale'],_0x412017=new M(_0x51beb5,_0x50bf0f);return _0x412017['render'](),_0x412017['element'];}},D=class extends _0x674bba{static get requires(){return[_0xce3de0,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 _0x55ef29}from'@ckeditor/ckeditor5-core';import{Mention as _0x3d421d}from'@ckeditor/ckeditor5-mention';import{CKEditorError as _0xc28b2,uid as _0x47e84f}from'@ckeditor/ckeditor5-utils';import{IconBrowseFiles as _0x1f0e6c,IconBulletedList as _0x594cf8,IconCodeBlock as _0x1ad09f,IconEmoji as _0x281d01,IconFootnote as _0x18b6e2,IconHeading1 as _0x4fa13b,IconHeading2 as _0xf94452,IconHeading3 as _0x543bd9,IconHeading4 as _0x3b1ee2,IconHeading5 as _0x455926,IconHeading6 as _0x286d5b,IconHorizontalLine as _0x1dabac,IconHtml as _0x75f72d,IconIndent as _0x28e38e,IconNumberedList as _0x4cd3c4,IconOutdent as _0x3bb700,IconParagraph as _0x3b23e2,IconPlay as _0x2e5d33,IconQuote as _0x332a89,IconRobotPencil as _0x187956,IconTable as _0x18a6a4,IconTableOfContents as _0x19d50e,IconTodoList as _0x479477}from'@ckeditor/ckeditor5-icons';import{ButtonView as _0x38bdab,View as _0x561728}from'@ckeditor/ckeditor5-ui';var O=class extends _0x55ef29{static get['pluginName'](){return'SlashCommandConfig';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x55fe15){super(_0x55fe15),this['_allowedCommands']=null;}afterInit(){const _0x1af312=this['editor']['config']['get']('slashCommand.removeCommands')||[],_0x50f531=function(_0x300d23){let _0x2d92ac=['heading4','heading5','heading6'];if(_0x300d23){const _0x343385=_0x300d23['map'](_0x1409e5=>_0x1409e5['model']);_0x2d92ac=['heading1','heading2','heading3','heading4','heading5','heading6']['filter'](_0x2ded6d=>!_0x343385['includes'](_0x2ded6d));}return _0x2d92ac;}(this['editor']['config']['get']('heading.options'));let _0x8a2e72=this['getDefaultCommands']()['filter'](_0xc73a0=>!_0x50f531['includes'](_0xc73a0['id']))['filter'](_0x2944dd=>!_0x1af312['includes'](_0x2944dd['commandName']));const _0x46b2e5=this['editor']['config']['get']('slashCommand.extraCommands');_0x46b2e5&&_0x46b2e5['length']&&(_0x8a2e72=_0x8a2e72['concat'](_0x46b2e5));const _0x530d46=this['editor']['config']['get']('template.definitions');_0x530d46&&_0x530d46['length']&&(_0x8a2e72=_0x8a2e72['concat'](function(_0x39a519){return _0x39a519['map'](_0x3ad884=>{const {title:_0x24a784,icon:_0x407622,description:_0x284af2,data:_0x8c447a}=_0x3ad884,_0x5ca9af={'id':P(_0x24a784,'template'),'commandName':'insertTemplate','execute':_0xe162b4=>{_0xe162b4['execute']('insertTemplate',_0x8c447a);},'description':_0x284af2,'icon':_0x407622,'title':_0x24a784};return _0x407622&&(_0x5ca9af['isIconColorInherited']=!0x1),_0x5ca9af;});}(_0x530d46)));const _0x37c50e=this['editor']['config']['get']('style.definitions');_0x37c50e&&_0x37c50e['length']&&(_0x8a2e72=_0x8a2e72['concat'](function(_0x41322e){return _0x41322e['map'](_0x3bb4a4=>({'id':P(_0x3bb4a4['name'],'style'),'commandName':'style','execute':_0x3b4201=>{_0x3b4201['execute']('style',{'styleName':_0x3bb4a4['name']});},'isEnabled':_0x37c2cb=>{const _0x1d16ef=_0x37c2cb['commands']['get']('style');return _0x1d16ef['isEnabled']&&_0x1d16ef['enabledStyles']['includes'](_0x3bb4a4['name']);},'title':_0x3bb4a4['name']}));}(_0x37c50e)));const _0x563612=_0x8a2e72['filter'](_0x2c3b87=>!_0x2c3b87['commandName']||void 0x0!==this['editor']['commands']['get'](_0x2c3b87['commandName'])),_0x473486=[];for(const _0x49b4fd of _0x563612)_0x473486['push']({'id':_0x49b4fd['id'],'commandName':_0x49b4fd['commandName'],'title':'function'==typeof _0x49b4fd['title']?_0x49b4fd['title'](this['editor']):_0x49b4fd['title'],'description':_0x49b4fd['description'],'icon':_0x49b4fd['icon'],'isIconColorInherited':_0x49b4fd['isIconColorInherited'],'aliases':_0x49b4fd['aliases'],'isEnabled':()=>this['_proxyIsEnabled'](_0x49b4fd),'execute':()=>this['_proxyExecute'](_0x49b4fd)});this['_allowedCommands']=_0x473486['sort'](E),async function(_0x16da63){const _0x3e4593='5goNZRxHzmBfrl0Fq6Cks1ahDGS2LUEWiby3wKvu4IVPdeT8jn9MOQJtcAY7Xp',_0x99c07e=0x79788,_0x1d6bcd={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x15e552(_0x3a6cd3){const _0x579c99=new window['Promise'](_0x41abed=>{_0x3a6cd3['once']('ready',_0x41abed);}),_0x4b6b17=window['Date']['now'](),_0x1bbf41=_0x3a6cd3['config']['get']('licenseKey');async function _0xb4e6e3(){let _0x58b1cb,_0x2c9b74=null,_0x1dcdf1=null;try{return'GPL'==_0x1bbf41?'NotAllowed':(_0x58b1cb=_0x1003e4(),_0x58b1cb?(_0x58b1cb['usageEndpoint']&&(_0x1dcdf1=_0x379bc1(_0x58b1cb['usageEndpoint'],_0x58b1cb['jti'])),await _0x29ec03()?_0x333769()?_0x97b260()?'Expired':_0x2cfd75()?('evaluation'==_0x58b1cb['licenseType']&&(_0x2c9b74=_0x3e1bc3('EvaluationLimit')),await _0x27bc0e()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x97b260(){const _0x5f2756=['evaluation','trial']['includes'](_0x58b1cb['licenseType'])?_0x4b6b17/0x3e8:0xe10*_0x99c07e;return _0x58b1cb['exp']<_0x5f2756;}function _0x333769(){const _0x4ad2f8=_0x58b1cb['features'];return!!_0x4ad2f8&&(!!_0x4ad2f8['includes']('*')||(!!_0x4ad2f8['includes']('SC')||(!!_0x4ad2f8['includes']('PP')||!(!_0x4ad2f8['includes']('TRILIUM')||!_0x137ae8()))));}function _0x2cfd75(){const _0x44bfdf=_0x58b1cb['licensedHosts'];if(!_0x44bfdf||0x0==_0x44bfdf['length'])return!0x0;const {hostname:_0x3781fd}=new URL(window['location']['href']);if(_0x44bfdf['includes'](_0x3781fd))return!0x0;const _0x3049b3=_0x3781fd['split']('.');return _0x44bfdf['filter'](_0x4d3612=>_0x4d3612['includes']('*'))['map'](_0x2fe74d=>_0x2fe74d['split']('.'))['filter'](_0xb4c9c=>_0xb4c9c['length']<=_0x3049b3['length'])['map'](_0x527720=>Array(_0x3049b3['length']-_0x527720['length'])['fill']('*'===_0x527720[0x0]?'*':'')['concat'](_0x527720))['some'](_0x5584e0=>_0x3049b3['every']((_0x23b5d3,_0x25b58b)=>_0x5584e0[_0x25b58b]===_0x23b5d3||'*'===_0x5584e0[_0x25b58b]));}function _0x27bc0e(){return _0x2c9b74&&_0x1dcdf1?new window['Promise']((_0x49564a,_0xedf94c)=>{_0x2c9b74['then'](_0x49564a,_0xedf94c),_0x1dcdf1['then'](_0x214e4d=>{'Valid'!=_0x214e4d&&_0x49564a(_0x214e4d);},_0xedf94c);}):_0x2c9b74||_0x1dcdf1||'Valid';}}function _0x379bc1(_0x2e9a9a,_0x3590d1){return new window['Promise'](_0x292d48=>{if(_0x52ba42())return _0x292d48('Valid');_0x168a7c(),_0x3a6cd3['decorate']('_sendUsageRequest');let _0x514145=!0x1;const _0x44275b=_0x47e84f();function _0x5271e8(_0x4a757d){return!!_0x4a757d&&('object'==typeof _0x4a757d||'function'==typeof _0x4a757d)&&'function'==typeof _0x4a757d['then']&&'function'==typeof _0x4a757d['catch'];}function _0x3c8f52(_0x4a787f){_0x1fbbe6(_0x4a787f)['then'](_0x242338=>_0x242338&&'ok'==_0x242338['status']?_0x307922(_0x38db7f(_0x44275b+_0x3590d1))!=_0x242338['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x1c269c=>(_0x397e58(),_0x1c269c),()=>{const _0x1f1c68=_0x3ef23b();return null==_0x1f1c68?(_0x397e58(),'Valid'):_0x4b6b17-_0x1f1c68>0x240c8400?'UsageLimit':'Valid';})['then'](_0x292d48)['catch'](()=>{_0x292d48('UsageLimit');});const _0xa6e790=0x36ee80;function _0x397e58(){const _0x387f2d='llct-'+_0x307922(_0x38db7f(_0x2e9a9a)),_0x4f46fc=_0x21ae8d(_0x307922(window['Math']['ceil'](_0x4b6b17/_0xa6e790)));window['localStorage']['setItem'](_0x387f2d,_0x4f46fc);}function _0x3ef23b(){const _0x59c685='llct-'+_0x307922(_0x38db7f(_0x2e9a9a)),_0x52ac72=window['localStorage']['getItem'](_0x59c685);return _0x52ac72?window['parseInt'](_0x21ae8d(_0x52ac72),0x10)*_0xa6e790:null;}function _0x1fbbe6(_0x39151a){return new window['Promise']((_0x60f867,_0x38d4ac)=>{_0x39151a['then'](_0x60f867,_0x38d4ac),window['setTimeout'](_0x38d4ac,0x1d4c0);});}}_0x3a6cd3['on']('_sendUsageRequest',(_0x2b2524,_0x30090e)=>{if(_0x30090e[0x0]!=_0x2e9a9a)return _0x292d48('UsageLimit');_0x30090e[0x1]={..._0x30090e[0x1],'requestId':_0x44275b};},{'priority':'high'}),_0x3a6cd3['on']('_sendUsageRequest',_0x3c06fa=>{_0x5271e8(_0x3c06fa['return'])&&(_0x514145=!0x0,_0x3c8f52(_0x3c06fa['return']));},{'priority':'low'}),_0x579c99['then'](()=>{_0x514145||_0x292d48('UsageLimit');});});function _0x52ba42(){return'auto'==_0x3a6cd3['editing']['view']['_overlayModeHint'];}function _0x168a7c(){_0x3a6cd3['editing']['view']['_overlayModeHint']='auto';}}function _0x3e1bc3(_0x3806eb){const _0x1dc74b=[new window['Promise'](_0x581b69=>setTimeout(_0x581b69,0x93ecc)),_0x579c99['then'](()=>new window['Promise'](_0x2b0366=>{let _0x3facee=0x0;_0x3a6cd3['model']['on']('applyOperation',(_0x139649,_0x5983f)=>{_0x5983f[0x0]['isDocumentOperation']&&_0x3facee++,0x5e8==_0x3facee&&(_0x2b0366(),_0x139649['off']());});}))];return window['Promise']['race'](_0x1dc74b)['then'](()=>_0x3806eb);}async function _0x150682(){await _0x579c99,_0x3a6cd3['model']['change']=_0x39f448,_0x3a6cd3['model']['enqueueChange']=_0x39f448,_0x3a6cd3['enableReadOnlyMode']('model');}function _0x137ae8(){return window['glob']&&window['glob']['triliumVersion'];}function _0x32656f(_0x3c3fd1){const _0x1a959a=_0x30eef1();_0x3a6cd3[_0x1a959a]='slashCommandLicenseKey'+_0x3c3fd1,'Valid'!=_0x3c3fd1&&_0x150682();}function _0x30eef1(){const _0x2d4fe9=window['String'](window['performance']['now']())['replace']('.','');let _0x33c20e='g';for(let _0x8b25d8=0x0;_0x8b25d8<_0x2d4fe9['length'];_0x8b25d8+=0x2){let _0x158515=window['parseInt'](_0x2d4fe9['substring'](_0x8b25d8,_0x8b25d8+0x2));_0x158515>=0x3e&&(_0x158515-=0x3e),_0x33c20e+=_0x3e4593[_0x158515];}return _0x33c20e;}function _0x1003e4(){const _0x12832a=_0x1bbf41['split']('.');if(0x3!=_0x12832a['length'])return null;return _0x187f42(_0x12832a[0x1]);function _0x187f42(_0xedfdc){const _0x55dd01=_0x42f0bd(_0xedfdc);return _0x55dd01&&_0x4dbbf8()?_0x55dd01:null;function _0x4dbbf8(){const _0x4d16b9=_0x55dd01['jti'],_0x2039a3=window['parseInt'](_0x4d16b9['substring'](_0x4d16b9['length']-0x8),0x10),_0x3179d0={..._0x55dd01,'jti':_0x4d16b9['substring'](0x0,_0x4d16b9['length']-0x8)};return delete _0x3179d0['vc'],_0x38db7f(_0x3179d0)==_0x2039a3;}}}async function _0x29ec03(){let _0x1571aa=!0x0;try{const [_0x417fd2,_0xa77333,_0x582b07]=_0x1bbf41['split']('.');return _0x127fa6(_0x417fd2),await _0x3270ee(_0x417fd2,_0xa77333,_0x582b07),_0x1571aa;}catch{return!0x1;}function _0x127fa6(_0x23839d){const _0xfe9daf=_0x42f0bd(_0x23839d);_0xfe9daf&&'ES256'==_0xfe9daf['alg']||(_0x1571aa=!0x1);}async function _0x3270ee(_0x2dfd9b,_0x51b187,_0x18b648){const _0x4b78e9=window['Uint8Array']['from'](_0x34b0cf(_0x18b648),_0x13e5a6=>_0x13e5a6['charCodeAt'](0x0)),_0x15b4cb=new window['TextEncoder']()['encode'](_0x2dfd9b+'.'+_0x51b187),_0x4fd36e=window['crypto']['subtle'];if(!_0x4fd36e)return;const _0x37cef6=await _0x4fd36e['importKey']('jwk',_0x1d6bcd,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x4fd36e['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x37cef6,_0x4b78e9,_0x15b4cb)||(_0x1571aa=!0x1);}}function _0x42f0bd(_0x4638a2){return _0x4638a2['startsWith']('ey')?JSON['parse'](_0x34b0cf(_0x4638a2)):null;}function _0x34b0cf(_0x5c8a8c){return window['atob'](_0x5c8a8c['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x38db7f(_0x46468f){let _0x3dff29=0x1505;function _0x13cc70(_0x1ed729){for(let _0x5bcc00=0x0;_0x5bcc00<_0x1ed729['length'];_0x5bcc00++){const _0xfb3bc5=_0x1ed729['charCodeAt'](_0x5bcc00);_0x3dff29=(_0x3dff29<<0x5)+_0x3dff29+_0xfb3bc5,_0x3dff29&=_0x3dff29;}}function _0x54d09a(_0x397359){Array['isArray'](_0x397359)?_0x397359['forEach'](_0x54d09a):_0x397359&&'object'==typeof _0x397359?Object['entries'](_0x397359)['sort']()['forEach'](([_0x4fe0cf,_0x5396dd])=>{_0x13cc70(_0x4fe0cf),_0x54d09a(_0x5396dd);}):_0x13cc70(window['String'](_0x397359));}return _0x54d09a(_0x46468f),_0x3dff29>>>0x0;}function _0x307922(_0x790b60){return _0x790b60['toString'](0x10)['padStart'](0x8,'0');}function _0x21ae8d(_0x3822fc){return _0x3822fc['split']('')['reverse']()['join']('');}function _0x39f448(){}_0x32656f(await _0xb4e6e3());}_0x15e552(_0x16da63['editor']);}(this);}getAllowedCommands(){return this['_allowedCommands'];}getDefaultCommands(){const _0x14c1a4=_0x26d62e=>function(_0x5d7030,_0x29f70d){const t=_0x5d7030['t'],_0x46c3b=_0x5d7030['t'];switch(_0x29f70d){case'AI\x20Assistant':return _0x46c3b('AI\x20Assistant');case'Block\x20quote':return _0x46c3b('Block\x20quote');case'Bulleted\x20List':return _0x46c3b('Bulleted\x20List');case'Insert\x20code\x20block':return _0x46c3b('Insert\x20code\x20block');case'Open\x20file\x20manager':return _0x46c3b('Open\x20file\x20manager');case'Insert\x20image':return _0x46c3b('Insert\x20image');case'Heading\x201':return _0x46c3b('Heading\x201');case'Heading\x202':return _0x46c3b('Heading\x202');case'Heading\x203':return _0x46c3b('Heading\x203');case'Heading\x204':return _0x46c3b('Heading\x204');case'Heading\x205':return _0x46c3b('Heading\x205');case'Heading\x206':return _0x46c3b('Heading\x206');case'Horizontal\x20line':return _0x46c3b('Horizontal\x20line');case'Insert\x20HTML':return _0x46c3b('Insert\x20HTML');case'Increase\x20indent':return _0x46c3b('Increase\x20indent');case'Insert\x20table':return _0x46c3b('Insert\x20table');case'Table\x20of\x20contents':return _0x46c3b('Table\x20of\x20contents');case'Numbered\x20List':return _0x46c3b('Numbered\x20List');case'Decrease\x20indent':return _0x46c3b('Decrease\x20indent');case'Paragraph':return _0x46c3b('Paragraph');case'To-do\x20List':return _0x46c3b('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 _0x29f70d;}}(this['editor']['locale'],_0x26d62e);return[{'id':'aiAssistant','commandName':'showAIAssistant','icon':_0x187956,'title':_0x14c1a4('AI\x20Assistant'),'description':_0x14c1a4('Open\x20the\x20AI\x20Assistant\x20to\x20generate\x20content'),'execute':_0x59bdfe=>{setTimeout(()=>_0x59bdfe['execute']('showAIAssistant'));}},{'id':'blockQuote','commandName':'blockQuote','icon':_0x332a89,'title':_0x14c1a4('Block\x20quote'),'description':_0x14c1a4('Create\x20a\x20block\x20quote')},{'id':'bulletedList','commandName':'bulletedList','icon':_0x594cf8,'title':_0x14c1a4('Bulleted\x20List'),'description':_0x14c1a4('Create\x20a\x20bulleted\x20list')},{'id':'codeBlock','commandName':'codeBlock','icon':_0x1ad09f,'title':_0x14c1a4('Insert\x20code\x20block'),'description':_0x14c1a4('Create\x20a\x20code\x20block')},{'id':'ckbox','commandName':'ckbox','icon':_0x1f0e6c,'title':_0x14c1a4('Open\x20file\x20manager'),'description':_0x14c1a4('Open\x20file\x20manager\x20to\x20insert\x20an\x20image\x20or\x20a\x20file'),'aliases':['ckfinder','filemanager','upload']},{'id':'ckfinder','commandName':'ckfinder','icon':_0x1f0e6c,'title':_0x14c1a4('Insert\x20image'),'description':_0x14c1a4('Open\x20file\x20browser\x20to\x20insert\x20an\x20image\x20or\x20a\x20file'),'aliases':['ckbox','filemanager','upload']},{'id':'emoji','commandName':'emoji','icon':_0x281d01,'title':_0x14c1a4('Emoji'),'description':_0x14c1a4('Insert\x20an\x20emoji'),'execute':_0x1e5fc0=>{setTimeout(()=>_0x1e5fc0['execute']('emoji'));}},{'id':'heading1','commandName':'heading','icon':_0x4fa13b,'title':_0x14c1a4('Heading\x201'),'description':_0x14c1a4('Create\x20a\x20heading\x20level\x201'),'execute':_0x4726eb=>{_0x4726eb['execute']('heading',{'value':'heading1'});}},{'id':'heading2','commandName':'heading','icon':_0xf94452,'title':_0x14c1a4('Heading\x202'),'description':_0x14c1a4('Create\x20a\x20heading\x20level\x202'),'execute':_0x2b19bb=>{_0x2b19bb['execute']('heading',{'value':'heading2'});}},{'id':'heading3','commandName':'heading','icon':_0x543bd9,'title':_0x14c1a4('Heading\x203'),'description':_0x14c1a4('Create\x20a\x20heading\x20level\x203'),'execute':_0x1503af=>{_0x1503af['execute']('heading',{'value':'heading3'});}},{'id':'heading4','commandName':'heading','icon':_0x3b1ee2,'title':_0x14c1a4('Heading\x204'),'description':_0x14c1a4('Create\x20a\x20heading\x20level\x204'),'execute':_0x320a64=>{_0x320a64['execute']('heading',{'value':'heading4'});}},{'id':'heading5','commandName':'heading','icon':_0x455926,'title':_0x14c1a4('Heading\x205'),'description':_0x14c1a4('Create\x20a\x20heading\x20level\x205'),'execute':_0x40e175=>{_0x40e175['execute']('heading',{'value':'heading5'});}},{'id':'heading6','commandName':'heading','icon':_0x286d5b,'title':_0x14c1a4('Heading\x206'),'description':_0x14c1a4('Create\x20a\x20heading\x20level\x206'),'execute':_0x559b6d=>{_0x559b6d['execute']('heading',{'value':'heading6'});}},{'id':'horizontalLine','commandName':'horizontalLine','icon':_0x1dabac,'title':_0x14c1a4('Horizontal\x20line'),'description':_0x14c1a4('Insert\x20a\x20horizontal\x20line')},{'id':'htmlEmbed','commandName':'htmlEmbed','icon':_0x75f72d,'title':_0x14c1a4('Insert\x20HTML'),'description':_0x14c1a4('Insert\x20an\x20HTML\x20snippet')},{'id':'indent','commandName':'indent','icon':_0x28e38e,'title':_0x14c1a4('Increase\x20indent'),'description':_0x14c1a4('Increase\x20the\x20indentation')},{'id':'insertMermaidCommand','commandName':'insertMermaidCommand','title':_0x14c1a4('Insert\x20Mermaid\x20diagram'),'description':_0x14c1a4('Insert\x20the\x20Mermaid\x20diagram')},{'id':'insertTable','commandName':'insertTable','icon':_0x18a6a4,'title':_0x14c1a4('Insert\x20table'),'description':_0x14c1a4('Create\x20a\x20table')},{'id':'insertTableOfContents','commandName':'insertTableOfContents','icon':_0x19d50e,'title':_0x14c1a4('Table\x20of\x20contents'),'description':_0x14c1a4('Insert\x20table\x20of\x20contents'),'aliases':['toc']},{'id':'numberedList','commandName':'numberedList','icon':_0x4cd3c4,'title':_0x14c1a4('Numbered\x20List'),'description':_0x14c1a4('Create\x20a\x20numbered\x20list')},{'id':'outdent','commandName':'outdent','icon':_0x3bb700,'title':_0x14c1a4('Decrease\x20indent'),'description':_0x14c1a4('Decrease\x20the\x20indentation')},{'id':'paragraph','commandName':'paragraph','icon':_0x3b23e2,'title':_0x14c1a4('Paragraph'),'description':_0x14c1a4('Insert\x20a\x20paragraph')},{'id':'todoList','commandName':'todoList','icon':_0x479477,'title':_0x14c1a4('To-do\x20List'),'description':_0x14c1a4('Create\x20a\x20to-do\x20list')},{'id':'footnote','commandName':'insertFootnote','icon':_0x18b6e2,'title':_0x14c1a4('Footnote'),'description':_0x14c1a4('Insert\x20a\x20footnote')}];}['_proxyIsEnabled'](_0x19e163){return _0x19e163['isEnabled']?_0x19e163['isEnabled'](this['editor']):!_0x19e163['commandName']||this['editor']['commands']['get'](_0x19e163['commandName'])['isEnabled'];}_proxyExecute(_0x3d3b96){if(_0x3d3b96['execute'])_0x3d3b96['execute'](this['editor']);else{if(!_0x3d3b96['commandName'])throw new _0xc28b2('slash-command-execute-missing',this['editor'],{'commandDefinition':_0x3d3b96});this['editor']['execute'](_0x3d3b96['commandName']);}}};function E(_0x3d4cb0,_0x4a6cde){return _0x3d4cb0['title']<_0x4a6cde['title']?-0x1:_0x3d4cb0['title']>_0x4a6cde['title']?0x1:0x0;}function P(_0x45299c,_0x44699a){return _0x44699a+'-'+_0x45299c['toLowerCase']()['split']('\x20')['join']('-');}var K=class extends _0x55ef29{static get['pluginName'](){return'SlashCommandEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[O];}getMatchingCommands(_0x239573){const _0x3497bd=_0x239573&&_0x239573['toLowerCase']();let _0x503798=this['editor']['plugins']['get']('SlashCommandConfig')['getAllowedCommands']();if(_0x503798=_0x503798['filter'](_0x332de8=>_0x332de8['isEnabled']()),_0x3497bd){const _0x1e0922=[],_0x38f114=[],_0x2f0952=[],_0x248e1d=[];for(const _0x4ea3e5 of _0x503798)_0x4ea3e5['id']['toLowerCase']()['includes'](_0x3497bd)?_0x1e0922['push'](_0x4ea3e5):_0x4ea3e5['title']['toLowerCase']()['includes'](_0x3497bd)?_0x38f114['push'](_0x4ea3e5):_0x4ea3e5['aliases']&&_0x4ea3e5['aliases']['some'](_0x1618e2=>_0x1618e2['toLowerCase']()['includes'](_0x3497bd))?_0x2f0952['push'](_0x4ea3e5):_0x4ea3e5['description']&&_0x4ea3e5['description']['toLowerCase']()['includes'](_0x3497bd)&&_0x248e1d['push'](_0x4ea3e5);_0x503798=_0x1e0922['concat'](_0x38f114,_0x2f0952,_0x248e1d);}return _0x503798;}},M=class extends _0x38bdab{constructor(_0x8e7b59,_0x36348f){super(_0x8e7b59),this['textPartView']=this['_createTextPartView'](_0x8e7b59,_0x36348f),void 0x0!==_0x36348f['isIconColorInherited']&&(this['iconView']['isColorInherited']=_0x36348f['isIconColorInherited']),this['set']({'icon':_0x36348f['icon']||_0x2e5d33,'withText':!0x0,'label':_0x36348f['title'],'class':'ck-slash-command-button'});}['render'](){super['render'](),this['children']['add'](this['textPartView']);}_createTextPartView(_0xee7b4,_0x57ba9f){const _0x5aeb90=new _0x561728(_0xee7b4);return _0x5aeb90['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-slash-command-button__text-part']},'children':_0x57ba9f['description']?[this['labelView'],{'tag':'span','attributes':{'class':['ck','ck-slash-command-button__description']},'children':[{'text':_0x57ba9f['description']}]}]:[this['labelView']]}),_0x5aeb90;}},S=class extends _0x55ef29{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'SlashCommandUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x555216){super(_0x555216),this['_setupMentionConfiguration']();}init(){this['editor']['once']('ready',this['_overrideMentionExecuteListener']['bind'](this)),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x2c13de=[this['editor']];for(const _0x169e08 of _0x2c13de){let _0x11ee8a;for(const _0x5098ed in _0x169e08){const _0x51668a=_0x5098ed,_0x257286=_0x169e08[_0x51668a];if('slashCommandLicenseKeyValid'==_0x257286||'slashCommandLicenseKeyInvalid'==_0x257286||'slashCommandLicenseKeyExpired'==_0x257286||'slashCommandLicenseKeyDomainLimit'==_0x257286||'slashCommandLicenseKeyNotAllowed'==_0x257286||'slashCommandLicenseKeyEvaluationLimit'==_0x257286||'slashCommandLicenseKeyUsageLimit'==_0x257286){delete _0x169e08[_0x51668a],_0x11ee8a=_0x257286,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'slashCommandLicenseKeyInvalid'==_0x11ee8a&&_0x169e08['_showLicenseError']('invalid'),'slashCommandLicenseKeyExpired'==_0x11ee8a&&_0x169e08['_showLicenseError']('expired'),'slashCommandLicenseKeyDomainLimit'==_0x11ee8a&&_0x169e08['_showLicenseError']('domainLimit'),'slashCommandLicenseKeyNotAllowed'==_0x11ee8a&&_0x169e08['_showLicenseError']('featureNotAllowed','SlashCommand'),'slashCommandLicenseKeyEvaluationLimit'==_0x11ee8a&&_0x169e08['_showLicenseError']('evaluationLimit'),'slashCommandLicenseKeyUsageLimit'==_0x11ee8a&&_0x169e08['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_setupMentionConfiguration(){const _0x319ec5=this['editor'],_0x559b61=this['editor']['plugins']['get']('SlashCommandEditing'),_0x76aa8d=_0x319ec5['config']['get']('mention.feeds');_0x76aa8d['push']({'marker':'/','feed':_0x28ab5b=>_0x559b61['getMatchingCommands'](_0x28ab5b),'itemRenderer':this['_customItemRenderer']['bind'](this),'dropdownLimit':_0x319ec5['config']['get']('slashCommand.dropdownLimit')||0x1/0x0}),_0x319ec5['config']['set']('mention.feeds',_0x76aa8d);}_overrideMentionExecuteListener(){const _0x46e5ee=this['editor'];_0x46e5ee['commands']['get']('mention')['on']('execute',(_0x4567ad,_0x34f03d)=>{const _0x3b5be5=_0x34f03d[0x0],_0x4707ee=_0x46e5ee['model'];'/'===_0x3b5be5['marker']&&_0x4707ee['change'](_0x23efcc=>{_0x23efcc['remove'](_0x3b5be5['range']),_0x3b5be5['mention']['execute'](),_0x4567ad['stop']();});},{'priority':'high'});}_customItemRenderer(_0x28ad17){const _0x423222=this['editor']['locale'],_0x5c160d=new M(_0x423222,_0x28ad17);return _0x5c160d['render'](),_0x5c160d['element'];}},D=class extends _0x55ef29{static get requires(){return[_0x3d421d,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": "49.0.0-alpha.3",
3
+ "version": "49.0.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": "49.0.0-alpha.3",
25
- "@ckeditor/ckeditor5-heading": "49.0.0-alpha.3",
26
- "@ckeditor/ckeditor5-icons": "49.0.0-alpha.3",
27
- "@ckeditor/ckeditor5-mention": "49.0.0-alpha.3",
28
- "@ckeditor/ckeditor5-style": "49.0.0-alpha.3",
29
- "@ckeditor/ckeditor5-template": "49.0.0-alpha.3",
30
- "@ckeditor/ckeditor5-ui": "49.0.0-alpha.3",
31
- "@ckeditor/ckeditor5-utils": "49.0.0-alpha.3"
24
+ "@ckeditor/ckeditor5-core": "49.0.0-alpha.5",
25
+ "@ckeditor/ckeditor5-heading": "49.0.0-alpha.5",
26
+ "@ckeditor/ckeditor5-icons": "49.0.0-alpha.5",
27
+ "@ckeditor/ckeditor5-mention": "49.0.0-alpha.5",
28
+ "@ckeditor/ckeditor5-style": "49.0.0-alpha.5",
29
+ "@ckeditor/ckeditor5-template": "49.0.0-alpha.5",
30
+ "@ckeditor/ckeditor5-ui": "49.0.0-alpha.5",
31
+ "@ckeditor/ckeditor5-utils": "49.0.0-alpha.5"
32
32
  },
33
33
  "files": [
34
34
  "dist",