@ckeditor/ckeditor5-template 48.3.0-alpha.5 → 48.3.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Command as _0x37daa3,Plugin as _0x23211f}from'@ckeditor/ckeditor5-core';import{IconTemplate as _0x82ffff,IconTemplateGeneric as _0x77fdf5}from'@ckeditor/ckeditor5-icons';import{ButtonView as _0x5ee83d,HighlightedTextView as _0x21d4d9,ListItemView as _0x387190,ListView as _0x545831,MenuBarMenuListItemButtonView as _0x4057f1,MenuBarMenuListItemView as _0x532bdb,MenuBarMenuListView as _0x5e7ce4,MenuBarMenuView as _0x4b4b6d,SearchTextView as _0x6584f7,View as _0x22a67b,createDropdown as _0x1526ab}from'@ckeditor/ckeditor5-ui';import{uid as _0x49f129}from'@ckeditor/ckeditor5-utils';var g=class extends _0x37daa3{['execute'](_0x5aa68c){const {model:_0xd0bb9c}=this['editor'];let _0x2d01b9;switch(typeof _0x5aa68c){case'string':_0x2d01b9=_0x5aa68c;break;case'function':_0x2d01b9=_0x5aa68c();}'string'==typeof _0x2d01b9&&_0xd0bb9c['change'](()=>{const _0x4437a7=this['editor']['data']['htmlProcessor']['toView'](_0x2d01b9),_0x36d427=_0xd0bb9c['document']['selection']['getFirstPosition']()['root'],_0x41ba36=this['editor']['data']['toModel'](_0x4437a7,_0x36d427);_0xd0bb9c['insertContent'](_0x41ba36);});}},y=class extends _0x23211f{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'TemplateEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x2c4062}=this;_0x2c4062['commands']['add']('insertTemplate',new g(_0x2c4062)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x13cfe6=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2f66ee;for(const _0x19245a in _0x13cfe6){const _0x5c8060=_0x19245a,_0xb31dc9=_0x13cfe6[_0x5c8060];if('templateLicenseKeyValid'==_0xb31dc9||'templateLicenseKeyInvalid'==_0xb31dc9||'templateLicenseKeyExpired'==_0xb31dc9||'templateLicenseKeyDomainLimit'==_0xb31dc9||'templateLicenseKeyNotAllowed'==_0xb31dc9||'templateLicenseKeyEvaluationLimit'==_0xb31dc9||'templateLicenseKeyUsageLimit'==_0xb31dc9){delete _0x13cfe6[_0x5c8060],_0x2f66ee=_0xb31dc9,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'templateLicenseKeyInvalid'==_0x2f66ee&&_0x13cfe6['_showLicenseError']('invalid'),'templateLicenseKeyExpired'==_0x2f66ee&&_0x13cfe6['_showLicenseError']('expired'),'templateLicenseKeyDomainLimit'==_0x2f66ee&&_0x13cfe6['_showLicenseError']('domainLimit'),'templateLicenseKeyNotAllowed'==_0x2f66ee&&_0x13cfe6['_showLicenseError']('featureNotAllowed','Template'),'templateLicenseKeyEvaluationLimit'==_0x2f66ee&&_0x13cfe6['_showLicenseError']('evaluationLimit'),'templateLicenseKeyUsageLimit'==_0x2f66ee&&_0x13cfe6['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},L=class extends _0x545831{['filter'](_0x3e0a9c){if(!_0x3e0a9c)return this['_resetFiltering']();const _0x11c3ef=new Map(),_0x4a224f=this['items']['map'](_0x17c5cd=>{const _0x5b949c=_0x17c5cd['buttonView']['isMatching'](_0x3e0a9c);return _0x17c5cd['isVisible']=!!_0x5b949c,_0x17c5cd['buttonView']['highlightText'](_0x5b949c?_0x3e0a9c:null),_0x5b949c&&_0x11c3ef['set'](_0x17c5cd,_0x5b949c),_0x17c5cd;})['sort'](v)['sort'](function(_0x12d27f){return function(_0x2fe8dd,_0x46664a){const _0x1a1ff5=_0x12d27f['get'](_0x2fe8dd),_0x223c2d=_0x12d27f['get'](_0x46664a);return _0x1a1ff5&&!_0x223c2d?-0x1:_0x223c2d&&!_0x1a1ff5?0x1:_0x1a1ff5||_0x223c2d?_0x1a1ff5['title']&&!_0x223c2d['title']?-0x1:!_0x1a1ff5['title']&&_0x223c2d['title']?0x1:0x0:0x0;};}(_0x11c3ef));return this['items']['clear'](),this['items']['addMany'](_0x4a224f),{'resultsCount':_0x11c3ef['size'],'totalItemsCount':this['items']['length']};}['_resetFiltering'](){const _0x408fcb=this['items']['map'](_0x5a53ed=>_0x5a53ed)['sort'](v);return _0x408fcb['forEach'](_0x4ddcf1=>{_0x4ddcf1['isVisible']=!0x0,_0x4ddcf1['buttonView']['highlightText'](null);}),this['items']['clear'](),this['items']['addMany'](_0x408fcb),{'resultsCount':_0x408fcb['length'],'totalItemsCount':_0x408fcb['length']};}};function v(_0x79f324,_0x1c5ddd){return _0x79f324['originalIndex']-_0x1c5ddd['originalIndex'];}var x=class extends _0x387190{['originalIndex'];['buttonView'];constructor(_0x24073d,_0x480c8c){super(_0x24073d),this['originalIndex']=_0x480c8c,this['buttonView']=null;}},b=class extends _0x5ee83d{['templateDefinition'];['textPartView'];constructor(_0x551dda,_0x32c845){super(_0x551dda),this['templateDefinition']=_0x32c845,this['textPartView']=null;const {icon:_0x515e8c=_0x77fdf5}=_0x32c845;this['set']({'withText':!0x0,'class':'ck-template-button','role':'option','icon':_0x515e8c}),this['iconView']['isColorInherited']=!0x1;}['render'](){super['render'](),this['textPartView']=new k(this['locale'],this['templateDefinition'],this['labelView']['element']['id']),this['children']['remove'](this['labelView']),this['children']['add'](this['textPartView']);}['destroy'](){super['destroy'](),this['labelView']['destroy']();}['isMatching'](_0x99438c){const {title:_0x4f945a,description:_0x4c81f6}=this['templateDefinition'],_0x36bb31=!!_0x4f945a['match'](_0x99438c),_0x25da58=!(!_0x4c81f6||!_0x4c81f6['match'](_0x99438c));return _0x36bb31||_0x25da58?{'title':_0x36bb31,'description':_0x25da58}:null;}['highlightText'](_0x327196){this['textPartView']['highlightText'](_0x327196);}},k=class extends _0x22a67b{constructor(_0x3b29f3,_0x5dfa18,_0x4b1207){super(_0x3b29f3),this['title']=_0x5dfa18['title'],this['description']=_0x5dfa18['description'],this['titleView']=new _0x21d4d9(),this['titleView']['text']=this['title'],this['titleView']['extendTemplate']({'tag':'span','attributes':{'class':['ck-button__label'],'id':_0x4b1207}});const _0x17f5cb=[this['titleView']];this['description']&&(this['descriptionView']=new _0x21d4d9(),this['descriptionView']['text']=this['description'],this['descriptionView']['extendTemplate']({'tag':'p','attributes':{'class':['ck-template-form__description']}}),_0x17f5cb['push'](this['descriptionView'])),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-template-form__text-part']},'children':_0x17f5cb});}['highlightText'](_0x573f8a){this['titleView']['highlightText'](_0x573f8a),this['description']&&this['descriptionView']['highlightText'](_0x573f8a);}};function I(_0x191f08,_0x30d074,..._0x2006ce){const t=_0x191f08['t'];switch(_0x30d074){case'No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.':return t('No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.',..._0x2006ce);case'Please\x20try\x20a\x20different\x20phrase\x20or\x20check\x20the\x20spelling.':return t('Please\x20try\x20a\x20different\x20phrase\x20or\x20check\x20the\x20spelling.');case'No\x20templates\x20available.':return t('No\x20templates\x20available.');case'%0\x20templates\x20found':return t('%0\x20templates\x20found',..._0x2006ce);case'Search\x20template':return t('Search\x20template');case'Template':return t('Template');case'Insert\x20template':return t('Insert\x20template');default:return _0x30d074;}}var T=class extends _0x23211f{static get['pluginName'](){return'TemplateUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x5a6c91}=this,_0x5de200=_0x5a6c91['config']['get']('template.definitions')||[];_0x5a6c91['ui']['componentFactory']['add']('insertTemplate',_0x4c2161=>{const _0x17f875=_0x1526ab(_0x4c2161),_0x56ec51=new _0x6584f7(_0x4c2161,{'filteredView':this['_createTemplateListView'](_0x4c2161,_0x5de200),'queryView':{'label':I(_0x4c2161,'Search\x20template')},'class':'ck-template-form','infoView':{'text':{'notFound':{'primary':_0x1a2b71=>I(_0x4c2161,'No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.',_0x1a2b71),'secondary':I(_0x4c2161,'Please\x20try\x20a\x20different\x20phrase\x20or\x20check\x20the\x20spelling.')},'noSearchableItems':{'primary':I(_0x4c2161,'No\x20templates\x20available.')}}}}),_0xc5053=_0x5a6c91['commands']['get']('insertTemplate');return _0x56ec51['on']('search',(_0xabe746,_0x5a77ab)=>{_0x5a77ab['query']&&_0x5a77ab['query']['length']&&_0x5a6c91['ui']['ariaLiveAnnouncer']['announce'](I(_0x4c2161,'%0\x20templates\x20found',_0x5a77ab['resultsCount']));}),_0x17f875['bind']('isEnabled')['to'](_0xc5053),_0x17f875['panelView']['children']['add'](_0x56ec51),_0x17f875['buttonView']['set']({'label':I(_0x4c2161,'Insert\x20template'),'icon':_0x82ffff,'tooltip':!0x0}),_0x17f875['on']('change:isOpen',(_0x2763d6,_0x2a43f1,_0x1c8f90)=>{_0x1c8f90||_0x56ec51['reset']();}),_0x17f875;}),_0x5a6c91['ui']['componentFactory']['add']('menuBar:insertTemplate',_0x2993bf=>{const _0xeef53=_0x5a6c91['commands']['get']('insertTemplate'),_0xf7490=new _0x4b4b6d(_0x2993bf);_0xf7490['buttonView']['set']({'label':I(_0x2993bf,'Template'),'icon':_0x82ffff});const _0x2a841b=new _0x5e7ce4(_0x2993bf);if(!_0x5de200||!_0x5de200['length']){const _0x372dc4=new _0x532bdb(_0x2993bf,_0xf7490),_0x4fe3a0=new _0x4057f1(_0x2993bf);_0x4fe3a0['set']({'label':I(_0x2993bf,'No\x20templates\x20available.')}),_0x4fe3a0['delegate']('execute')['to'](_0xf7490),_0x4fe3a0['on']('execute',()=>{_0x5a6c91['editing']['view']['focus']();}),_0x372dc4['children']['add'](_0x4fe3a0),_0x2a841b['items']['add'](_0x372dc4);}for(const _0x48c4c3 of _0x5de200){const _0x3444ea=new _0x532bdb(_0x2993bf,_0xf7490),_0x1282ec=new _0x4057f1(_0x2993bf);_0x1282ec['set']({'class':'ck-template-button','label':_0x48c4c3['title'],'icon':_0x48c4c3['icon']||_0x77fdf5}),_0x1282ec['delegate']('execute')['to'](_0xf7490),_0x1282ec['on']('execute',()=>{_0x5a6c91['execute']('insertTemplate',_0x48c4c3['data']),_0x5a6c91['editing']['view']['focus']();}),_0x3444ea['children']['add'](_0x1282ec),_0x2a841b['items']['add'](_0x3444ea);}return _0xf7490['panelView']['children']['add'](_0x2a841b),_0xf7490['bind']('isEnabled')['to'](_0xeef53,'isEnabled'),_0xf7490;});}['afterInit'](){!async function(_0x45f35b){const _0x55cf77='5goNZRxHzmBfrl0Fq6Cks1ahDGS2LUEWiby3wKvu4IVPdeT8jn9MOQJtcAY7Xp',_0x2e125f=0x78e40,_0x2da7d9=window['Date']['now'](),_0x5b21c8=_0x45f35b['editor'],_0x59f795=new window['Promise'](_0x513428=>{_0x5b21c8['once']('ready',_0x513428);}),_0x83161c={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x14d5cd=_0x5b21c8['config']['get']('licenseKey');async function _0xf624ff(){let _0x2b7be4,_0x753fb3=null,_0x239ae0=null;try{return'GPL'==_0x14d5cd?'NotAllowed':(_0x2b7be4=_0x28d257(),_0x2b7be4?(_0x2b7be4['usageEndpoint']&&(_0x239ae0=_0x257958(_0x2b7be4['usageEndpoint'],_0x2b7be4['jti'])),await _0x1bfd9a()?_0x164c10()?_0x20b6fb()?'Expired':_0x30f55b()?('evaluation'==_0x2b7be4['licenseType']&&(_0x753fb3=_0xd4249('EvaluationLimit')),await _0x1df232()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x20b6fb(){const _0xd42e76=['evaluation','trial']['includes'](_0x2b7be4['licenseType'])?_0x2da7d9/0x3e8:0xe10*_0x2e125f;return _0x2b7be4['exp']<_0xd42e76;}function _0x164c10(){const _0x283aa1=_0x2b7be4['features'];return!!_0x283aa1&&(!!_0x283aa1['includes']('*')||(!!_0x283aa1['includes']('TPL')||(!!_0x283aa1['includes']('PP')||(!(!_0x283aa1['includes']('DRUP')||!_0x32cd75())||!(!_0x283aa1['includes']('TRILIUM')||!_0x379654())))));}function _0x30f55b(){const _0x5c0185=_0x2b7be4['licensedHosts'];if(!_0x5c0185||0x0==_0x5c0185['length'])return!0x0;const {hostname:_0x43be1a}=new URL(window['location']['href']);if(_0x5c0185['includes'](_0x43be1a))return!0x0;const _0x2c7120=_0x43be1a['split']('.');return _0x5c0185['filter'](_0x4d806c=>_0x4d806c['includes']('*'))['map'](_0x36efb6=>_0x36efb6['split']('.'))['filter'](_0x4213a7=>_0x4213a7['length']<=_0x2c7120['length'])['map'](_0x4bb13b=>Array(_0x2c7120['length']-_0x4bb13b['length'])['fill']('*'===_0x4bb13b[0x0]?'*':'')['concat'](_0x4bb13b))['some'](_0x138bfa=>_0x2c7120['every']((_0xa02b8b,_0x26491d)=>_0x138bfa[_0x26491d]===_0xa02b8b||'*'===_0x138bfa[_0x26491d]));}function _0x1df232(){return _0x753fb3&&_0x239ae0?new window['Promise']((_0x4cfc95,_0xdb1178)=>{_0x753fb3['then'](_0x4cfc95,_0xdb1178),_0x239ae0['then'](_0x5f4a1b=>{'Valid'!=_0x5f4a1b&&_0x4cfc95(_0x5f4a1b);},_0xdb1178);}):_0x753fb3||_0x239ae0||'Valid';}}function _0x257958(_0x58c86d,_0x58e141){return new window['Promise'](_0xe9c88c=>{if(_0x2bf6e8())return _0xe9c88c('Valid');_0x1c99a0(),_0x5b21c8['decorate']('_sendUsageRequest');let _0x269f99=!0x1;const _0x3e15ea=_0x49f129();function _0x371bae(_0x546a29){return!!_0x546a29&&('object'==typeof _0x546a29||'function'==typeof _0x546a29)&&'function'==typeof _0x546a29['then']&&'function'==typeof _0x546a29['catch'];}function _0x294161(_0x11cca9){_0x4b3aed(_0x11cca9)['then'](_0x39150c=>_0x39150c&&'ok'==_0x39150c['status']?_0x3e3425(_0x1b0634(_0x3e15ea+_0x58e141))!=_0x39150c['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x281944=>(_0x28aa7b(),_0x281944),()=>{const _0x3273c4=_0x18dc56();return null==_0x3273c4?(_0x28aa7b(),'Valid'):_0x2da7d9-_0x3273c4>0x240c8400?'UsageLimit':'Valid';})['then'](_0xe9c88c)['catch'](()=>{_0xe9c88c('UsageLimit');});const _0x29c6ab=0x36ee80;function _0x28aa7b(){const _0x43ccef='llct-'+_0x3e3425(_0x1b0634(_0x58c86d)),_0x33131f=_0x3afbc1(_0x3e3425(window['Math']['ceil'](_0x2da7d9/_0x29c6ab)));window['localStorage']['setItem'](_0x43ccef,_0x33131f);}function _0x18dc56(){const _0x5148b4='llct-'+_0x3e3425(_0x1b0634(_0x58c86d)),_0x19f6a5=window['localStorage']['getItem'](_0x5148b4);return _0x19f6a5?window['parseInt'](_0x3afbc1(_0x19f6a5),0x10)*_0x29c6ab:null;}function _0x4b3aed(_0x1ede16){return new window['Promise']((_0x52b317,_0xbe5280)=>{_0x1ede16['then'](_0x52b317,_0xbe5280),window['setTimeout'](_0xbe5280,0x1d4c0);});}}_0x5b21c8['on']('_sendUsageRequest',(_0x1be5ac,_0xa34c05)=>{if(_0xa34c05[0x0]!=_0x58c86d)return _0xe9c88c('UsageLimit');_0xa34c05[0x1]={..._0xa34c05[0x1],'requestId':_0x3e15ea};},{'priority':'high'}),_0x5b21c8['on']('_sendUsageRequest',_0x1a17da=>{_0x371bae(_0x1a17da['return'])&&(_0x269f99=!0x0,_0x294161(_0x1a17da['return']));},{'priority':'low'}),_0x59f795['then'](()=>{_0x269f99||_0xe9c88c('UsageLimit');});});function _0x2bf6e8(){return'auto'==_0x5b21c8['editing']['view']['_overlayModeHint'];}function _0x1c99a0(){_0x5b21c8['editing']['view']['_overlayModeHint']='auto';}}function _0xd4249(_0x13133d){const _0x5b4818=[new window['Promise'](_0x5c926d=>setTimeout(_0x5c926d,0x93ecc)),_0x59f795['then'](()=>new window['Promise'](_0x3bee79=>{let _0xb6855b=0x0;_0x5b21c8['model']['on']('applyOperation',(_0x1b8799,_0x3d9228)=>{_0x3d9228[0x0]['isDocumentOperation']&&_0xb6855b++,0x5e8==_0xb6855b&&(_0x3bee79(),_0x1b8799['off']());});}))];return window['Promise']['race'](_0x5b4818)['then'](()=>_0x13133d);}async function _0xc4b3ef(){await _0x59f795,_0x5b21c8['model']['change']=_0x156cdb,_0x5b21c8['model']['enqueueChange']=_0x156cdb,_0x5b21c8['enableReadOnlyMode']('model');}function _0x32cd75(){return window['Drupal'];}function _0x379654(){return window['glob']&&window['glob']['triliumVersion'];}function _0x37d754(_0x29add1){const _0x1b2330=_0x579540();_0x5b21c8[_0x1b2330]='templateLicenseKey'+_0x29add1,'Valid'!=_0x29add1&&_0xc4b3ef();}function _0x579540(){const _0x4036e4=window['String'](window['performance']['now']())['replace']('.','');let _0x2256af='g';for(let _0x297bf0=0x0;_0x297bf0<_0x4036e4['length'];_0x297bf0+=0x2){let _0x1a4259=window['parseInt'](_0x4036e4['substring'](_0x297bf0,_0x297bf0+0x2));_0x1a4259>=0x3e&&(_0x1a4259-=0x3e),_0x2256af+=_0x55cf77[_0x1a4259];}return _0x2256af;}function _0x28d257(){const _0x4a4e48=_0x14d5cd['split']('.');if(0x3!=_0x4a4e48['length'])return null;return _0x39ef88(_0x4a4e48[0x1]);function _0x39ef88(_0x373407){const _0x3b2247=_0x4c8212(_0x373407);return _0x3b2247&&_0x30ecee()?_0x3b2247:null;function _0x30ecee(){const _0x19f9bd=_0x3b2247['jti'],_0x1b8691=window['parseInt'](_0x19f9bd['substring'](_0x19f9bd['length']-0x8),0x10),_0x29c076={..._0x3b2247,'jti':_0x19f9bd['substring'](0x0,_0x19f9bd['length']-0x8)};return delete _0x29c076['vc'],_0x1b0634(_0x29c076)==_0x1b8691;}}}async function _0x1bfd9a(){let _0x25a96a=!0x0;try{const [_0x2b6a41,_0x5b824e,_0x3b4642]=_0x14d5cd['split']('.');return _0x3c201c(_0x2b6a41),await _0x597f75(_0x2b6a41,_0x5b824e,_0x3b4642),_0x25a96a;}catch{return!0x1;}function _0x3c201c(_0x5a6cad){const _0x40c61d=_0x4c8212(_0x5a6cad);_0x40c61d&&'ES256'==_0x40c61d['alg']||(_0x25a96a=!0x1);}async function _0x597f75(_0x4353b6,_0x579968,_0x3690ce){const _0x3cb277=window['Uint8Array']['from'](_0x4a8650(_0x3690ce),_0x27a799=>_0x27a799['charCodeAt'](0x0)),_0x3b0e70=new window['TextEncoder']()['encode'](_0x4353b6+'.'+_0x579968),_0x1caa50=window['crypto']['subtle'];if(!_0x1caa50)return;const _0xbc5103=await _0x1caa50['importKey']('jwk',_0x83161c,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x1caa50['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0xbc5103,_0x3cb277,_0x3b0e70)||(_0x25a96a=!0x1);}}function _0x4c8212(_0x1a000e){return _0x1a000e['startsWith']('ey')?JSON['parse'](_0x4a8650(_0x1a000e)):null;}function _0x4a8650(_0x1363a1){return window['atob'](_0x1363a1['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x1b0634(_0x6aa3ea){let _0x4b9cea=0x1505;function _0x222590(_0x4b488b){for(let _0x3af833=0x0;_0x3af833<_0x4b488b['length'];_0x3af833++){const _0x3b2ff0=_0x4b488b['charCodeAt'](_0x3af833);_0x4b9cea=(_0x4b9cea<<0x5)+_0x4b9cea+_0x3b2ff0,_0x4b9cea&=_0x4b9cea;}}function _0x37eaba(_0xf9266e){Array['isArray'](_0xf9266e)?_0xf9266e['forEach'](_0x37eaba):_0xf9266e&&'object'==typeof _0xf9266e?Object['entries'](_0xf9266e)['sort']()['forEach'](([_0x16a1b2,_0x1496d8])=>{_0x222590(_0x16a1b2),_0x37eaba(_0x1496d8);}):_0x222590(window['String'](_0xf9266e));}return _0x37eaba(_0x6aa3ea),_0x4b9cea>>>0x0;}function _0x3e3425(_0x28e8c3){return _0x28e8c3['toString'](0x10)['padStart'](0x8,'0');}function _0x3afbc1(_0x246c64){return _0x246c64['split']('')['reverse']()['join']('');}function _0x156cdb(){}_0x37d754(await _0xf624ff());}(this);}['_createTemplateListView'](_0x2ae1c9,_0x55de87){const {editor:_0x4bb480}=this,_0x359a46=new L(_0x2ae1c9);return _0x359a46['extendTemplate']({'attributes':{'role':'listbox','class':['ck-template-list']}}),_0x359a46['items']['addMany'](_0x55de87['map']((_0x482747,_0x124cc6)=>{const _0x4a4a86=new x(_0x2ae1c9,_0x124cc6),_0x5839e8=new b(_0x2ae1c9,_0x482747);return _0x4a4a86['buttonView']=_0x5839e8,_0x4a4a86['children']['add'](_0x5839e8),_0x4a4a86['buttonView']['on']('execute',_0x3baa99=>{_0x4bb480['execute']('insertTemplate',_0x3baa99['source']['templateDefinition']['data']),_0x4bb480['editing']['view']['focus']();}),_0x4a4a86;})),_0x359a46;}},K=class extends _0x23211f{static get['requires'](){return[y,T];}static get['pluginName'](){return'Template';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{K as Template,g as TemplateCommand,y as TemplateEditing,T as TemplateUI};
|
|
23
|
+
import{Command as _0xeb2747,Plugin as _0x5d8300}from'@ckeditor/ckeditor5-core';import{IconTemplate as _0x5195b1,IconTemplateGeneric as _0x2613f2}from'@ckeditor/ckeditor5-icons';import{ButtonView as _0x5e13cc,HighlightedTextView as _0x599ca6,ListItemView as _0x4f9460,ListView as _0x573d74,MenuBarMenuListItemButtonView as _0xf4b6c1,MenuBarMenuListItemView as _0x2344c0,MenuBarMenuListView as _0x56d7ca,MenuBarMenuView as _0x39cf5d,SearchTextView as _0x490c31,View as _0x5b6ef0,createDropdown as _0x3e40be}from'@ckeditor/ckeditor5-ui';import{uid as _0x185f5c}from'@ckeditor/ckeditor5-utils';var g=class extends _0xeb2747{['execute'](_0x14f6d6){const {model:_0x412f6d}=this['editor'];let _0x3cfbcb;switch(typeof _0x14f6d6){case'string':_0x3cfbcb=_0x14f6d6;break;case'function':_0x3cfbcb=_0x14f6d6();}'string'==typeof _0x3cfbcb&&_0x412f6d['change'](()=>{const _0x574174=this['editor']['data']['htmlProcessor']['toView'](_0x3cfbcb),_0x276901=_0x412f6d['document']['selection']['getFirstPosition']()['root'],_0x1f249e=this['editor']['data']['toModel'](_0x574174,_0x276901);_0x412f6d['insertContent'](_0x1f249e);});}},y=class extends _0x5d8300{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'TemplateEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x3c407d}=this;_0x3c407d['commands']['add']('insertTemplate',new g(_0x3c407d)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x476026=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x20327b;for(const _0x54f14f in _0x476026){const _0x4acbbf=_0x54f14f,_0xb53bf8=_0x476026[_0x4acbbf];if('templateLicenseKeyValid'==_0xb53bf8||'templateLicenseKeyInvalid'==_0xb53bf8||'templateLicenseKeyExpired'==_0xb53bf8||'templateLicenseKeyDomainLimit'==_0xb53bf8||'templateLicenseKeyNotAllowed'==_0xb53bf8||'templateLicenseKeyEvaluationLimit'==_0xb53bf8||'templateLicenseKeyUsageLimit'==_0xb53bf8){delete _0x476026[_0x4acbbf],_0x20327b=_0xb53bf8,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'templateLicenseKeyInvalid'==_0x20327b&&_0x476026['_showLicenseError']('invalid'),'templateLicenseKeyExpired'==_0x20327b&&_0x476026['_showLicenseError']('expired'),'templateLicenseKeyDomainLimit'==_0x20327b&&_0x476026['_showLicenseError']('domainLimit'),'templateLicenseKeyNotAllowed'==_0x20327b&&_0x476026['_showLicenseError']('featureNotAllowed','Template'),'templateLicenseKeyEvaluationLimit'==_0x20327b&&_0x476026['_showLicenseError']('evaluationLimit'),'templateLicenseKeyUsageLimit'==_0x20327b&&_0x476026['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},L=class extends _0x573d74{['filter'](_0x2ea302){if(!_0x2ea302)return this['_resetFiltering']();const _0x4a6c9f=new Map(),_0x224def=this['items']['map'](_0x2e9c7b=>{const _0x1d4d5b=_0x2e9c7b['buttonView']['isMatching'](_0x2ea302);return _0x2e9c7b['isVisible']=!!_0x1d4d5b,_0x2e9c7b['buttonView']['highlightText'](_0x1d4d5b?_0x2ea302:null),_0x1d4d5b&&_0x4a6c9f['set'](_0x2e9c7b,_0x1d4d5b),_0x2e9c7b;})['sort'](v)['sort'](function(_0x236d43){return function(_0x429b97,_0x57296d){const _0x28b4cc=_0x236d43['get'](_0x429b97),_0x3fd788=_0x236d43['get'](_0x57296d);return _0x28b4cc&&!_0x3fd788?-0x1:_0x3fd788&&!_0x28b4cc?0x1:_0x28b4cc||_0x3fd788?_0x28b4cc['title']&&!_0x3fd788['title']?-0x1:!_0x28b4cc['title']&&_0x3fd788['title']?0x1:0x0:0x0;};}(_0x4a6c9f));return this['items']['clear'](),this['items']['addMany'](_0x224def),{'resultsCount':_0x4a6c9f['size'],'totalItemsCount':this['items']['length']};}['_resetFiltering'](){const _0x537760=this['items']['map'](_0x4f14c8=>_0x4f14c8)['sort'](v);return _0x537760['forEach'](_0x25d620=>{_0x25d620['isVisible']=!0x0,_0x25d620['buttonView']['highlightText'](null);}),this['items']['clear'](),this['items']['addMany'](_0x537760),{'resultsCount':_0x537760['length'],'totalItemsCount':_0x537760['length']};}};function v(_0x14c769,_0x36882b){return _0x14c769['originalIndex']-_0x36882b['originalIndex'];}var x=class extends _0x4f9460{['originalIndex'];['buttonView'];constructor(_0x2132a9,_0x758579){super(_0x2132a9),this['originalIndex']=_0x758579,this['buttonView']=null;}},b=class extends _0x5e13cc{['templateDefinition'];['textPartView'];constructor(_0x543a44,_0x1457ed){super(_0x543a44),this['templateDefinition']=_0x1457ed,this['textPartView']=null;const {icon:_0x30f4d6=_0x2613f2}=_0x1457ed;this['set']({'withText':!0x0,'class':'ck-template-button','role':'option','icon':_0x30f4d6}),this['iconView']['isColorInherited']=!0x1;}['render'](){super['render'](),this['textPartView']=new k(this['locale'],this['templateDefinition'],this['labelView']['element']['id']),this['children']['remove'](this['labelView']),this['children']['add'](this['textPartView']);}['destroy'](){super['destroy'](),this['labelView']['destroy']();}['isMatching'](_0x1d9fc4){const {title:_0x305cc4,description:_0x285d18}=this['templateDefinition'],_0x1d9c3a=!!_0x305cc4['match'](_0x1d9fc4),_0xa31de0=!(!_0x285d18||!_0x285d18['match'](_0x1d9fc4));return _0x1d9c3a||_0xa31de0?{'title':_0x1d9c3a,'description':_0xa31de0}:null;}['highlightText'](_0x37c85f){this['textPartView']['highlightText'](_0x37c85f);}},k=class extends _0x5b6ef0{constructor(_0x8c1c83,_0x22b3ec,_0x5394e8){super(_0x8c1c83),this['title']=_0x22b3ec['title'],this['description']=_0x22b3ec['description'],this['titleView']=new _0x599ca6(),this['titleView']['text']=this['title'],this['titleView']['extendTemplate']({'tag':'span','attributes':{'class':['ck-button__label'],'id':_0x5394e8}});const _0x13f57a=[this['titleView']];this['description']&&(this['descriptionView']=new _0x599ca6(),this['descriptionView']['text']=this['description'],this['descriptionView']['extendTemplate']({'tag':'p','attributes':{'class':['ck-template-form__description']}}),_0x13f57a['push'](this['descriptionView'])),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-template-form__text-part']},'children':_0x13f57a});}['highlightText'](_0x4ec8ac){this['titleView']['highlightText'](_0x4ec8ac),this['description']&&this['descriptionView']['highlightText'](_0x4ec8ac);}};function I(_0x2252c3,_0x1f352d,..._0x1fe661){const t=_0x2252c3['t'];switch(_0x1f352d){case'No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.':return t('No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.',..._0x1fe661);case'Please\x20try\x20a\x20different\x20phrase\x20or\x20check\x20the\x20spelling.':return t('Please\x20try\x20a\x20different\x20phrase\x20or\x20check\x20the\x20spelling.');case'No\x20templates\x20available.':return t('No\x20templates\x20available.');case'%0\x20templates\x20found':return t('%0\x20templates\x20found',..._0x1fe661);case'Search\x20template':return t('Search\x20template');case'Template':return t('Template');case'Insert\x20template':return t('Insert\x20template');default:return _0x1f352d;}}var T=class extends _0x5d8300{static get['pluginName'](){return'TemplateUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x23c2f2}=this,_0x798318=_0x23c2f2['config']['get']('template.definitions')||[];_0x23c2f2['ui']['componentFactory']['add']('insertTemplate',_0x5866ee=>{const _0x17a887=_0x3e40be(_0x5866ee),_0x359bec=new _0x490c31(_0x5866ee,{'filteredView':this['_createTemplateListView'](_0x5866ee,_0x798318),'queryView':{'label':I(_0x5866ee,'Search\x20template')},'class':'ck-template-form','infoView':{'text':{'notFound':{'primary':_0x569834=>I(_0x5866ee,'No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.',_0x569834),'secondary':I(_0x5866ee,'Please\x20try\x20a\x20different\x20phrase\x20or\x20check\x20the\x20spelling.')},'noSearchableItems':{'primary':I(_0x5866ee,'No\x20templates\x20available.')}}}}),_0x47d643=_0x23c2f2['commands']['get']('insertTemplate');return _0x359bec['on']('search',(_0x3fc90e,_0x558be8)=>{_0x558be8['query']&&_0x558be8['query']['length']&&_0x23c2f2['ui']['ariaLiveAnnouncer']['announce'](I(_0x5866ee,'%0\x20templates\x20found',_0x558be8['resultsCount']));}),_0x17a887['bind']('isEnabled')['to'](_0x47d643),_0x17a887['panelView']['children']['add'](_0x359bec),_0x17a887['buttonView']['set']({'label':I(_0x5866ee,'Insert\x20template'),'icon':_0x5195b1,'tooltip':!0x0}),_0x17a887['on']('change:isOpen',(_0x4d1c2c,_0x2ebbd3,_0x11f93b)=>{_0x11f93b||_0x359bec['reset']();}),_0x17a887;}),_0x23c2f2['ui']['componentFactory']['add']('menuBar:insertTemplate',_0x3fb6ab=>{const _0x319a00=_0x23c2f2['commands']['get']('insertTemplate'),_0x163490=new _0x39cf5d(_0x3fb6ab);_0x163490['buttonView']['set']({'label':I(_0x3fb6ab,'Template'),'icon':_0x5195b1});const _0x485340=new _0x56d7ca(_0x3fb6ab);if(!_0x798318||!_0x798318['length']){const _0x2b3e79=new _0x2344c0(_0x3fb6ab,_0x163490),_0x2d8442=new _0xf4b6c1(_0x3fb6ab);_0x2d8442['set']({'label':I(_0x3fb6ab,'No\x20templates\x20available.')}),_0x2d8442['delegate']('execute')['to'](_0x163490),_0x2d8442['on']('execute',()=>{_0x23c2f2['editing']['view']['focus']();}),_0x2b3e79['children']['add'](_0x2d8442),_0x485340['items']['add'](_0x2b3e79);}for(const _0x58d734 of _0x798318){const _0x5321e9=new _0x2344c0(_0x3fb6ab,_0x163490),_0x20d624=new _0xf4b6c1(_0x3fb6ab);_0x20d624['set']({'class':'ck-template-button','label':_0x58d734['title'],'icon':_0x58d734['icon']||_0x2613f2}),_0x20d624['delegate']('execute')['to'](_0x163490),_0x20d624['on']('execute',()=>{_0x23c2f2['execute']('insertTemplate',_0x58d734['data']),_0x23c2f2['editing']['view']['focus']();}),_0x5321e9['children']['add'](_0x20d624),_0x485340['items']['add'](_0x5321e9);}return _0x163490['panelView']['children']['add'](_0x485340),_0x163490['bind']('isEnabled')['to'](_0x319a00,'isEnabled'),_0x163490;});}['afterInit'](){!async function(_0x53c261){const _0x13bdda='5goNZRxHzmBfrl0Fq6Cks1ahDGS2LUEWiby3wKvu4IVPdeT8jn9MOQJtcAY7Xp',_0x2f9358=0x78e58,_0x223c3f=window['Date']['now'](),_0x11f0da=_0x53c261['editor'],_0x5d17e3=new window['Promise'](_0x209c97=>{_0x11f0da['once']('ready',_0x209c97);}),_0x398dae={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x395ebf=_0x11f0da['config']['get']('licenseKey');async function _0x555420(){let _0x28f451,_0x327499=null,_0x5d3ae2=null;try{return'GPL'==_0x395ebf?'NotAllowed':(_0x28f451=_0x43ee62(),_0x28f451?(_0x28f451['usageEndpoint']&&(_0x5d3ae2=_0x493403(_0x28f451['usageEndpoint'],_0x28f451['jti'])),await _0x4c1aa3()?_0x18e50d()?_0x18862a()?'Expired':_0x18a07a()?('evaluation'==_0x28f451['licenseType']&&(_0x327499=_0x41fc26('EvaluationLimit')),await _0x33d634()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x18862a(){const _0x3654ed=['evaluation','trial']['includes'](_0x28f451['licenseType'])?_0x223c3f/0x3e8:0xe10*_0x2f9358;return _0x28f451['exp']<_0x3654ed;}function _0x18e50d(){const _0x263fcd=_0x28f451['features'];return!!_0x263fcd&&(!!_0x263fcd['includes']('*')||(!!_0x263fcd['includes']('TPL')||(!!_0x263fcd['includes']('PP')||(!(!_0x263fcd['includes']('DRUP')||!_0x327a56())||!(!_0x263fcd['includes']('TRILIUM')||!_0x800a6f())))));}function _0x18a07a(){const _0x36b308=_0x28f451['licensedHosts'];if(!_0x36b308||0x0==_0x36b308['length'])return!0x0;const {hostname:_0x2dddc4}=new URL(window['location']['href']);if(_0x36b308['includes'](_0x2dddc4))return!0x0;const _0x22e50b=_0x2dddc4['split']('.');return _0x36b308['filter'](_0xd84358=>_0xd84358['includes']('*'))['map'](_0x35bb9d=>_0x35bb9d['split']('.'))['filter'](_0x539656=>_0x539656['length']<=_0x22e50b['length'])['map'](_0x2d8eff=>Array(_0x22e50b['length']-_0x2d8eff['length'])['fill']('*'===_0x2d8eff[0x0]?'*':'')['concat'](_0x2d8eff))['some'](_0x5e66e4=>_0x22e50b['every']((_0x29cc22,_0x59cb0e)=>_0x5e66e4[_0x59cb0e]===_0x29cc22||'*'===_0x5e66e4[_0x59cb0e]));}function _0x33d634(){return _0x327499&&_0x5d3ae2?new window['Promise']((_0x5f05be,_0x25e441)=>{_0x327499['then'](_0x5f05be,_0x25e441),_0x5d3ae2['then'](_0x2816e0=>{'Valid'!=_0x2816e0&&_0x5f05be(_0x2816e0);},_0x25e441);}):_0x327499||_0x5d3ae2||'Valid';}}function _0x493403(_0x292706,_0x37643f){return new window['Promise'](_0x3cba54=>{if(_0x50efa8())return _0x3cba54('Valid');_0x4753d4(),_0x11f0da['decorate']('_sendUsageRequest');let _0x52be64=!0x1;const _0x24a0f5=_0x185f5c();function _0x57f636(_0x27c159){return!!_0x27c159&&('object'==typeof _0x27c159||'function'==typeof _0x27c159)&&'function'==typeof _0x27c159['then']&&'function'==typeof _0x27c159['catch'];}function _0x5c32a5(_0x550fe8){_0x431cc8(_0x550fe8)['then'](_0x493844=>_0x493844&&'ok'==_0x493844['status']?_0x25ebb8(_0x30831d(_0x24a0f5+_0x37643f))!=_0x493844['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x495b2c=>(_0x4ad631(),_0x495b2c),()=>{const _0x23686f=_0x470beb();return null==_0x23686f?(_0x4ad631(),'Valid'):_0x223c3f-_0x23686f>0x240c8400?'UsageLimit':'Valid';})['then'](_0x3cba54)['catch'](()=>{_0x3cba54('UsageLimit');});const _0x4280e2=0x36ee80;function _0x4ad631(){const _0x4df08b='llct-'+_0x25ebb8(_0x30831d(_0x292706)),_0x3c6f49=_0x16a79c(_0x25ebb8(window['Math']['ceil'](_0x223c3f/_0x4280e2)));window['localStorage']['setItem'](_0x4df08b,_0x3c6f49);}function _0x470beb(){const _0x41388b='llct-'+_0x25ebb8(_0x30831d(_0x292706)),_0x490ce6=window['localStorage']['getItem'](_0x41388b);return _0x490ce6?window['parseInt'](_0x16a79c(_0x490ce6),0x10)*_0x4280e2:null;}function _0x431cc8(_0x5bfb1e){return new window['Promise']((_0x5810f3,_0x1095d5)=>{_0x5bfb1e['then'](_0x5810f3,_0x1095d5),window['setTimeout'](_0x1095d5,0x1d4c0);});}}_0x11f0da['on']('_sendUsageRequest',(_0x520df0,_0x46c7d8)=>{if(_0x46c7d8[0x0]!=_0x292706)return _0x3cba54('UsageLimit');_0x46c7d8[0x1]={..._0x46c7d8[0x1],'requestId':_0x24a0f5};},{'priority':'high'}),_0x11f0da['on']('_sendUsageRequest',_0x2ad782=>{_0x57f636(_0x2ad782['return'])&&(_0x52be64=!0x0,_0x5c32a5(_0x2ad782['return']));},{'priority':'low'}),_0x5d17e3['then'](()=>{_0x52be64||_0x3cba54('UsageLimit');});});function _0x50efa8(){return'auto'==_0x11f0da['editing']['view']['_overlayModeHint'];}function _0x4753d4(){_0x11f0da['editing']['view']['_overlayModeHint']='auto';}}function _0x41fc26(_0x1c284b){const _0x195689=[new window['Promise'](_0x3c130e=>setTimeout(_0x3c130e,0x93ecc)),_0x5d17e3['then'](()=>new window['Promise'](_0x3af65c=>{let _0x2c94d4=0x0;_0x11f0da['model']['on']('applyOperation',(_0x462f7c,_0x216c8e)=>{_0x216c8e[0x0]['isDocumentOperation']&&_0x2c94d4++,0x5e8==_0x2c94d4&&(_0x3af65c(),_0x462f7c['off']());});}))];return window['Promise']['race'](_0x195689)['then'](()=>_0x1c284b);}async function _0x11794e(){await _0x5d17e3,_0x11f0da['model']['change']=_0x563b7e,_0x11f0da['model']['enqueueChange']=_0x563b7e,_0x11f0da['enableReadOnlyMode']('model');}function _0x327a56(){return window['Drupal'];}function _0x800a6f(){return window['glob']&&window['glob']['triliumVersion'];}function _0x4d744d(_0x32fe23){const _0x3c8742=_0xa16847();_0x11f0da[_0x3c8742]='templateLicenseKey'+_0x32fe23,'Valid'!=_0x32fe23&&_0x11794e();}function _0xa16847(){const _0x350c23=window['String'](window['performance']['now']())['replace']('.','');let _0x170ada='g';for(let _0x4f27cc=0x0;_0x4f27cc<_0x350c23['length'];_0x4f27cc+=0x2){let _0x1955c0=window['parseInt'](_0x350c23['substring'](_0x4f27cc,_0x4f27cc+0x2));_0x1955c0>=0x3e&&(_0x1955c0-=0x3e),_0x170ada+=_0x13bdda[_0x1955c0];}return _0x170ada;}function _0x43ee62(){const _0x33b745=_0x395ebf['split']('.');if(0x3!=_0x33b745['length'])return null;return _0x510265(_0x33b745[0x1]);function _0x510265(_0x440929){const _0x515a04=_0x398cf3(_0x440929);return _0x515a04&&_0x4bacb0()?_0x515a04:null;function _0x4bacb0(){const _0x5512d8=_0x515a04['jti'],_0x127ffd=window['parseInt'](_0x5512d8['substring'](_0x5512d8['length']-0x8),0x10),_0x212db3={..._0x515a04,'jti':_0x5512d8['substring'](0x0,_0x5512d8['length']-0x8)};return delete _0x212db3['vc'],_0x30831d(_0x212db3)==_0x127ffd;}}}async function _0x4c1aa3(){let _0x3f4e8b=!0x0;try{const [_0x2490a7,_0x2563a6,_0x594e5e]=_0x395ebf['split']('.');return _0x30c241(_0x2490a7),await _0x5ae962(_0x2490a7,_0x2563a6,_0x594e5e),_0x3f4e8b;}catch{return!0x1;}function _0x30c241(_0x72b9bf){const _0x276447=_0x398cf3(_0x72b9bf);_0x276447&&'ES256'==_0x276447['alg']||(_0x3f4e8b=!0x1);}async function _0x5ae962(_0x3cc4c0,_0x164361,_0x28eada){const _0x8f985=window['Uint8Array']['from'](_0x144e6c(_0x28eada),_0xb0a921=>_0xb0a921['charCodeAt'](0x0)),_0x122103=new window['TextEncoder']()['encode'](_0x3cc4c0+'.'+_0x164361),_0x50ef37=window['crypto']['subtle'];if(!_0x50ef37)return;const _0x135115=await _0x50ef37['importKey']('jwk',_0x398dae,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x50ef37['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x135115,_0x8f985,_0x122103)||(_0x3f4e8b=!0x1);}}function _0x398cf3(_0x39eb0f){return _0x39eb0f['startsWith']('ey')?JSON['parse'](_0x144e6c(_0x39eb0f)):null;}function _0x144e6c(_0xcf48ae){return window['atob'](_0xcf48ae['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x30831d(_0x5a610c){let _0x38270d=0x1505;function _0x5ba2c8(_0x4ea257){for(let _0x272f52=0x0;_0x272f52<_0x4ea257['length'];_0x272f52++){const _0x34271c=_0x4ea257['charCodeAt'](_0x272f52);_0x38270d=(_0x38270d<<0x5)+_0x38270d+_0x34271c,_0x38270d&=_0x38270d;}}function _0x4878a7(_0x22a65d){Array['isArray'](_0x22a65d)?_0x22a65d['forEach'](_0x4878a7):_0x22a65d&&'object'==typeof _0x22a65d?Object['entries'](_0x22a65d)['sort']()['forEach'](([_0x3a2dca,_0x528dd4])=>{_0x5ba2c8(_0x3a2dca),_0x4878a7(_0x528dd4);}):_0x5ba2c8(window['String'](_0x22a65d));}return _0x4878a7(_0x5a610c),_0x38270d>>>0x0;}function _0x25ebb8(_0x3e10c2){return _0x3e10c2['toString'](0x10)['padStart'](0x8,'0');}function _0x16a79c(_0x5b8f38){return _0x5b8f38['split']('')['reverse']()['join']('');}function _0x563b7e(){}_0x4d744d(await _0x555420());}(this);}['_createTemplateListView'](_0x6372cc,_0x3f8903){const {editor:_0x2cb893}=this,_0x4afe4e=new L(_0x6372cc);return _0x4afe4e['extendTemplate']({'attributes':{'role':'listbox','class':['ck-template-list']}}),_0x4afe4e['items']['addMany'](_0x3f8903['map']((_0x500b67,_0xb6a4f3)=>{const _0x1c31d3=new x(_0x6372cc,_0xb6a4f3),_0x4db684=new b(_0x6372cc,_0x500b67);return _0x1c31d3['buttonView']=_0x4db684,_0x1c31d3['children']['add'](_0x4db684),_0x1c31d3['buttonView']['on']('execute',_0x49180d=>{_0x2cb893['execute']('insertTemplate',_0x49180d['source']['templateDefinition']['data']),_0x2cb893['editing']['view']['focus']();}),_0x1c31d3;})),_0x4afe4e;}},K=class extends _0x5d8300{static get['requires'](){return[y,T];}static get['pluginName'](){return'Template';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{K as Template,g as TemplateCommand,y as TemplateEditing,T as TemplateUI};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-template",
|
|
3
|
-
"version": "48.3.0-alpha.
|
|
3
|
+
"version": "48.3.0-alpha.6",
|
|
4
4
|
"description": "Template feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"./package.json": "./package.json"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@ckeditor/ckeditor5-core": "48.3.0-alpha.
|
|
35
|
-
"@ckeditor/ckeditor5-engine": "48.3.0-alpha.
|
|
36
|
-
"@ckeditor/ckeditor5-icons": "48.3.0-alpha.
|
|
37
|
-
"@ckeditor/ckeditor5-ui": "48.3.0-alpha.
|
|
38
|
-
"@ckeditor/ckeditor5-utils": "48.3.0-alpha.
|
|
34
|
+
"@ckeditor/ckeditor5-core": "48.3.0-alpha.6",
|
|
35
|
+
"@ckeditor/ckeditor5-engine": "48.3.0-alpha.6",
|
|
36
|
+
"@ckeditor/ckeditor5-icons": "48.3.0-alpha.6",
|
|
37
|
+
"@ckeditor/ckeditor5-ui": "48.3.0-alpha.6",
|
|
38
|
+
"@ckeditor/ckeditor5-utils": "48.3.0-alpha.6"
|
|
39
39
|
},
|
|
40
40
|
"files": [
|
|
41
41
|
"dist",
|