@ckeditor/ckeditor5-template 48.3.0-alpha.4 → 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 _0x312c33,Plugin as _0x5b906d}from'@ckeditor/ckeditor5-core';import{IconTemplate as _0x549879,IconTemplateGeneric as _0x7a7bbf}from'@ckeditor/ckeditor5-icons';import{ButtonView as _0xbf1458,HighlightedTextView as _0xf6ca49,ListItemView as _0x4dda36,ListView as _0x38982f,MenuBarMenuListItemButtonView as _0x26273c,MenuBarMenuListItemView as _0x3ba19f,MenuBarMenuListView as _0x377d99,MenuBarMenuView as _0x5148a5,SearchTextView as _0x212c62,View as _0x18e169,createDropdown as _0x573f61}from'@ckeditor/ckeditor5-ui';import{uid as _0x4a8b05}from'@ckeditor/ckeditor5-utils';var g=class extends _0x312c33{['execute'](_0x37b1d7){const {model:_0x5e414a}=this['editor'];let _0x259389;switch(typeof _0x37b1d7){case'string':_0x259389=_0x37b1d7;break;case'function':_0x259389=_0x37b1d7();}'string'==typeof _0x259389&&_0x5e414a['change'](()=>{const _0x445615=this['editor']['data']['htmlProcessor']['toView'](_0x259389),_0x1f8106=_0x5e414a['document']['selection']['getFirstPosition']()['root'],_0x4fb583=this['editor']['data']['toModel'](_0x445615,_0x1f8106);_0x5e414a['insertContent'](_0x4fb583);});}},y=class extends _0x5b906d{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'TemplateEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x41a837}=this;_0x41a837['commands']['add']('insertTemplate',new g(_0x41a837)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x143fb5=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x111aa7;for(const _0x56e12e in _0x143fb5){const _0x59c86f=_0x56e12e,_0x18f5ad=_0x143fb5[_0x59c86f];if('templateLicenseKeyValid'==_0x18f5ad||'templateLicenseKeyInvalid'==_0x18f5ad||'templateLicenseKeyExpired'==_0x18f5ad||'templateLicenseKeyDomainLimit'==_0x18f5ad||'templateLicenseKeyNotAllowed'==_0x18f5ad||'templateLicenseKeyEvaluationLimit'==_0x18f5ad||'templateLicenseKeyUsageLimit'==_0x18f5ad){delete _0x143fb5[_0x59c86f],_0x111aa7=_0x18f5ad,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'templateLicenseKeyInvalid'==_0x111aa7&&_0x143fb5['_showLicenseError']('invalid'),'templateLicenseKeyExpired'==_0x111aa7&&_0x143fb5['_showLicenseError']('expired'),'templateLicenseKeyDomainLimit'==_0x111aa7&&_0x143fb5['_showLicenseError']('domainLimit'),'templateLicenseKeyNotAllowed'==_0x111aa7&&_0x143fb5['_showLicenseError']('featureNotAllowed','Template'),'templateLicenseKeyEvaluationLimit'==_0x111aa7&&_0x143fb5['_showLicenseError']('evaluationLimit'),'templateLicenseKeyUsageLimit'==_0x111aa7&&_0x143fb5['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},L=class extends _0x38982f{['filter'](_0x590830){if(!_0x590830)return this['_resetFiltering']();const _0x403d48=new Map(),_0x535242=this['items']['map'](_0x35a8cd=>{const _0x520ed8=_0x35a8cd['buttonView']['isMatching'](_0x590830);return _0x35a8cd['isVisible']=!!_0x520ed8,_0x35a8cd['buttonView']['highlightText'](_0x520ed8?_0x590830:null),_0x520ed8&&_0x403d48['set'](_0x35a8cd,_0x520ed8),_0x35a8cd;})['sort'](v)['sort'](function(_0x34df54){return function(_0x2768e7,_0x5588cd){const _0x4ac5a6=_0x34df54['get'](_0x2768e7),_0x4d8f27=_0x34df54['get'](_0x5588cd);return _0x4ac5a6&&!_0x4d8f27?-0x1:_0x4d8f27&&!_0x4ac5a6?0x1:_0x4ac5a6||_0x4d8f27?_0x4ac5a6['title']&&!_0x4d8f27['title']?-0x1:!_0x4ac5a6['title']&&_0x4d8f27['title']?0x1:0x0:0x0;};}(_0x403d48));return this['items']['clear'](),this['items']['addMany'](_0x535242),{'resultsCount':_0x403d48['size'],'totalItemsCount':this['items']['length']};}['_resetFiltering'](){const _0x78823a=this['items']['map'](_0xa46798=>_0xa46798)['sort'](v);return _0x78823a['forEach'](_0x58c70a=>{_0x58c70a['isVisible']=!0x0,_0x58c70a['buttonView']['highlightText'](null);}),this['items']['clear'](),this['items']['addMany'](_0x78823a),{'resultsCount':_0x78823a['length'],'totalItemsCount':_0x78823a['length']};}};function v(_0x388ccb,_0x56ac8a){return _0x388ccb['originalIndex']-_0x56ac8a['originalIndex'];}var x=class extends _0x4dda36{['originalIndex'];['buttonView'];constructor(_0x488ef6,_0xa1d00f){super(_0x488ef6),this['originalIndex']=_0xa1d00f,this['buttonView']=null;}},b=class extends _0xbf1458{['templateDefinition'];['textPartView'];constructor(_0x49bbba,_0x27100b){super(_0x49bbba),this['templateDefinition']=_0x27100b,this['textPartView']=null;const {icon:_0x14c4d5=_0x7a7bbf}=_0x27100b;this['set']({'withText':!0x0,'class':'ck-template-button','role':'option','icon':_0x14c4d5}),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'](_0x2e539b){const {title:_0x4c3c15,description:_0x260b45}=this['templateDefinition'],_0x533983=!!_0x4c3c15['match'](_0x2e539b),_0x2cfdef=!(!_0x260b45||!_0x260b45['match'](_0x2e539b));return _0x533983||_0x2cfdef?{'title':_0x533983,'description':_0x2cfdef}:null;}['highlightText'](_0x465335){this['textPartView']['highlightText'](_0x465335);}},k=class extends _0x18e169{constructor(_0x4592dd,_0x5330ca,_0x2fc309){super(_0x4592dd),this['title']=_0x5330ca['title'],this['description']=_0x5330ca['description'],this['titleView']=new _0xf6ca49(),this['titleView']['text']=this['title'],this['titleView']['extendTemplate']({'tag':'span','attributes':{'class':['ck-button__label'],'id':_0x2fc309}});const _0xfd9ea5=[this['titleView']];this['description']&&(this['descriptionView']=new _0xf6ca49(),this['descriptionView']['text']=this['description'],this['descriptionView']['extendTemplate']({'tag':'p','attributes':{'class':['ck-template-form__description']}}),_0xfd9ea5['push'](this['descriptionView'])),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-template-form__text-part']},'children':_0xfd9ea5});}['highlightText'](_0x5a81ef){this['titleView']['highlightText'](_0x5a81ef),this['description']&&this['descriptionView']['highlightText'](_0x5a81ef);}};function I(_0x50c005,_0x1af4a9,..._0x3eecd3){const t=_0x50c005['t'];switch(_0x1af4a9){case'No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.':return t('No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.',..._0x3eecd3);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',..._0x3eecd3);case'Search\x20template':return t('Search\x20template');case'Template':return t('Template');case'Insert\x20template':return t('Insert\x20template');default:return _0x1af4a9;}}var T=class extends _0x5b906d{static get['pluginName'](){return'TemplateUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x4898f0}=this,_0x259b51=_0x4898f0['config']['get']('template.definitions')||[];_0x4898f0['ui']['componentFactory']['add']('insertTemplate',_0x47e00f=>{const _0x26826f=_0x573f61(_0x47e00f),_0x2025ef=new _0x212c62(_0x47e00f,{'filteredView':this['_createTemplateListView'](_0x47e00f,_0x259b51),'queryView':{'label':I(_0x47e00f,'Search\x20template')},'class':'ck-template-form','infoView':{'text':{'notFound':{'primary':_0x586098=>I(_0x47e00f,'No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.',_0x586098),'secondary':I(_0x47e00f,'Please\x20try\x20a\x20different\x20phrase\x20or\x20check\x20the\x20spelling.')},'noSearchableItems':{'primary':I(_0x47e00f,'No\x20templates\x20available.')}}}}),_0x2d04ac=_0x4898f0['commands']['get']('insertTemplate');return _0x2025ef['on']('search',(_0x4d035c,_0x113a93)=>{_0x113a93['query']&&_0x113a93['query']['length']&&_0x4898f0['ui']['ariaLiveAnnouncer']['announce'](I(_0x47e00f,'%0\x20templates\x20found',_0x113a93['resultsCount']));}),_0x26826f['bind']('isEnabled')['to'](_0x2d04ac),_0x26826f['panelView']['children']['add'](_0x2025ef),_0x26826f['buttonView']['set']({'label':I(_0x47e00f,'Insert\x20template'),'icon':_0x549879,'tooltip':!0x0}),_0x26826f['on']('change:isOpen',(_0x1136c9,_0x2ce87a,_0x4ce39e)=>{_0x4ce39e||_0x2025ef['reset']();}),_0x26826f;}),_0x4898f0['ui']['componentFactory']['add']('menuBar:insertTemplate',_0x4431d4=>{const _0x85414f=_0x4898f0['commands']['get']('insertTemplate'),_0x50de7a=new _0x5148a5(_0x4431d4);_0x50de7a['buttonView']['set']({'label':I(_0x4431d4,'Template'),'icon':_0x549879});const _0x34e7f5=new _0x377d99(_0x4431d4);if(!_0x259b51||!_0x259b51['length']){const _0x1dd281=new _0x3ba19f(_0x4431d4,_0x50de7a),_0x3077e6=new _0x26273c(_0x4431d4);_0x3077e6['set']({'label':I(_0x4431d4,'No\x20templates\x20available.')}),_0x3077e6['delegate']('execute')['to'](_0x50de7a),_0x3077e6['on']('execute',()=>{_0x4898f0['editing']['view']['focus']();}),_0x1dd281['children']['add'](_0x3077e6),_0x34e7f5['items']['add'](_0x1dd281);}for(const _0x56628d of _0x259b51){const _0x37de31=new _0x3ba19f(_0x4431d4,_0x50de7a),_0xbf28df=new _0x26273c(_0x4431d4);_0xbf28df['set']({'class':'ck-template-button','label':_0x56628d['title'],'icon':_0x56628d['icon']||_0x7a7bbf}),_0xbf28df['delegate']('execute')['to'](_0x50de7a),_0xbf28df['on']('execute',()=>{_0x4898f0['execute']('insertTemplate',_0x56628d['data']),_0x4898f0['editing']['view']['focus']();}),_0x37de31['children']['add'](_0xbf28df),_0x34e7f5['items']['add'](_0x37de31);}return _0x50de7a['panelView']['children']['add'](_0x34e7f5),_0x50de7a['bind']('isEnabled')['to'](_0x85414f,'isEnabled'),_0x50de7a;});}['afterInit'](){!async function(_0xd7c25a){const _0x5864c3='5goNZRxHzmBfrl0Fq6Cks1ahDGS2LUEWiby3wKvu4IVPdeT8jn9MOQJtcAY7Xp',_0x43936a=0x78e28,_0x3b8a7b=window['Date']['now'](),_0x395676=_0xd7c25a['editor'],_0x5aa63f=new window['Promise'](_0x4ededd=>{_0x395676['once']('ready',_0x4ededd);}),_0x23e2bd={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x5c44a1=_0x395676['config']['get']('licenseKey');async function _0x3fce10(){let _0xf36260,_0x356e44=null,_0x10eeb8=null;try{return'GPL'==_0x5c44a1?'NotAllowed':(_0xf36260=_0x1c3e30(),_0xf36260?(_0xf36260['usageEndpoint']&&(_0x10eeb8=_0x23fb64(_0xf36260['usageEndpoint'],_0xf36260['jti'])),await _0x33538e()?_0x2df387()?_0x3994c1()?'Expired':_0x206455()?('evaluation'==_0xf36260['licenseType']&&(_0x356e44=_0x3703a8('EvaluationLimit')),await _0x3e2387()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x3994c1(){const _0x6c1adf=['evaluation','trial']['includes'](_0xf36260['licenseType'])?_0x3b8a7b/0x3e8:0xe10*_0x43936a;return _0xf36260['exp']<_0x6c1adf;}function _0x2df387(){const _0x440891=_0xf36260['features'];return!!_0x440891&&(!!_0x440891['includes']('*')||(!!_0x440891['includes']('TPL')||(!!_0x440891['includes']('PP')||(!(!_0x440891['includes']('DRUP')||!_0x42c652())||!(!_0x440891['includes']('TRILIUM')||!_0x5026b7())))));}function _0x206455(){const _0x229636=_0xf36260['licensedHosts'];if(!_0x229636||0x0==_0x229636['length'])return!0x0;const {hostname:_0x20cb02}=new URL(window['location']['href']);if(_0x229636['includes'](_0x20cb02))return!0x0;const _0x4d175a=_0x20cb02['split']('.');return _0x229636['filter'](_0x4598df=>_0x4598df['includes']('*'))['map'](_0x4f13d2=>_0x4f13d2['split']('.'))['filter'](_0x57b0a2=>_0x57b0a2['length']<=_0x4d175a['length'])['map'](_0x57cc3e=>Array(_0x4d175a['length']-_0x57cc3e['length'])['fill']('*'===_0x57cc3e[0x0]?'*':'')['concat'](_0x57cc3e))['some'](_0x3c16bb=>_0x4d175a['every']((_0x3253af,_0x316b60)=>_0x3c16bb[_0x316b60]===_0x3253af||'*'===_0x3c16bb[_0x316b60]));}function _0x3e2387(){return _0x356e44&&_0x10eeb8?new window['Promise']((_0x4de57d,_0x5ef80b)=>{_0x356e44['then'](_0x4de57d,_0x5ef80b),_0x10eeb8['then'](_0x13f968=>{'Valid'!=_0x13f968&&_0x4de57d(_0x13f968);},_0x5ef80b);}):_0x356e44||_0x10eeb8||'Valid';}}function _0x23fb64(_0x569a9e,_0x722125){return new window['Promise'](_0x3560dc=>{if(_0x37cb5f())return _0x3560dc('Valid');_0x2d930c(),_0x395676['decorate']('_sendUsageRequest');let _0x3899e8=!0x1;const _0x3d0a38=_0x4a8b05();function _0x285418(_0xa00299){return!!_0xa00299&&('object'==typeof _0xa00299||'function'==typeof _0xa00299)&&'function'==typeof _0xa00299['then']&&'function'==typeof _0xa00299['catch'];}function _0xe0ca5f(_0x1faf63){_0x2ee071(_0x1faf63)['then'](_0x2a73a7=>_0x2a73a7&&'ok'==_0x2a73a7['status']?_0x7f4591(_0x312c57(_0x3d0a38+_0x722125))!=_0x2a73a7['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x3e5955=>(_0x41ea2d(),_0x3e5955),()=>{const _0x408d54=_0x5e3e8f();return null==_0x408d54?(_0x41ea2d(),'Valid'):_0x3b8a7b-_0x408d54>0x240c8400?'UsageLimit':'Valid';})['then'](_0x3560dc)['catch'](()=>{_0x3560dc('UsageLimit');});const _0x27c731=0x36ee80;function _0x41ea2d(){const _0x481f8f='llct-'+_0x7f4591(_0x312c57(_0x569a9e)),_0x3ddaee=_0x45d369(_0x7f4591(window['Math']['ceil'](_0x3b8a7b/_0x27c731)));window['localStorage']['setItem'](_0x481f8f,_0x3ddaee);}function _0x5e3e8f(){const _0x5c4c18='llct-'+_0x7f4591(_0x312c57(_0x569a9e)),_0x11c707=window['localStorage']['getItem'](_0x5c4c18);return _0x11c707?window['parseInt'](_0x45d369(_0x11c707),0x10)*_0x27c731:null;}function _0x2ee071(_0x31015a){return new window['Promise']((_0x1c4545,_0xb35fa8)=>{_0x31015a['then'](_0x1c4545,_0xb35fa8),window['setTimeout'](_0xb35fa8,0x1d4c0);});}}_0x395676['on']('_sendUsageRequest',(_0x33a21f,_0x430245)=>{if(_0x430245[0x0]!=_0x569a9e)return _0x3560dc('UsageLimit');_0x430245[0x1]={..._0x430245[0x1],'requestId':_0x3d0a38};},{'priority':'high'}),_0x395676['on']('_sendUsageRequest',_0x25dd0a=>{_0x285418(_0x25dd0a['return'])&&(_0x3899e8=!0x0,_0xe0ca5f(_0x25dd0a['return']));},{'priority':'low'}),_0x5aa63f['then'](()=>{_0x3899e8||_0x3560dc('UsageLimit');});});function _0x37cb5f(){return'auto'==_0x395676['editing']['view']['_overlayModeHint'];}function _0x2d930c(){_0x395676['editing']['view']['_overlayModeHint']='auto';}}function _0x3703a8(_0x5a70aa){const _0x484941=[new window['Promise'](_0x378d2e=>setTimeout(_0x378d2e,0x93ecc)),_0x5aa63f['then'](()=>new window['Promise'](_0x5ed7bc=>{let _0x407f96=0x0;_0x395676['model']['on']('applyOperation',(_0x2e3357,_0x1fc888)=>{_0x1fc888[0x0]['isDocumentOperation']&&_0x407f96++,0x5e8==_0x407f96&&(_0x5ed7bc(),_0x2e3357['off']());});}))];return window['Promise']['race'](_0x484941)['then'](()=>_0x5a70aa);}async function _0x1c9ace(){await _0x5aa63f,_0x395676['model']['change']=_0x40c868,_0x395676['model']['enqueueChange']=_0x40c868,_0x395676['enableReadOnlyMode']('model');}function _0x42c652(){return window['Drupal'];}function _0x5026b7(){return window['glob']&&window['glob']['triliumVersion'];}function _0x530de1(_0x255a42){const _0x1679d2=_0x3fee7a();_0x395676[_0x1679d2]='templateLicenseKey'+_0x255a42,'Valid'!=_0x255a42&&_0x1c9ace();}function _0x3fee7a(){const _0x37eadb=window['String'](window['performance']['now']())['replace']('.','');let _0x3c9a82='g';for(let _0x1f4cdb=0x0;_0x1f4cdb<_0x37eadb['length'];_0x1f4cdb+=0x2){let _0x22caeb=window['parseInt'](_0x37eadb['substring'](_0x1f4cdb,_0x1f4cdb+0x2));_0x22caeb>=0x3e&&(_0x22caeb-=0x3e),_0x3c9a82+=_0x5864c3[_0x22caeb];}return _0x3c9a82;}function _0x1c3e30(){const _0x2b3baa=_0x5c44a1['split']('.');if(0x3!=_0x2b3baa['length'])return null;return _0x382400(_0x2b3baa[0x1]);function _0x382400(_0x2119ab){const _0x1faf48=_0x41bae0(_0x2119ab);return _0x1faf48&&_0x281f55()?_0x1faf48:null;function _0x281f55(){const _0x189b8e=_0x1faf48['jti'],_0x3430d1=window['parseInt'](_0x189b8e['substring'](_0x189b8e['length']-0x8),0x10),_0x3f02b4={..._0x1faf48,'jti':_0x189b8e['substring'](0x0,_0x189b8e['length']-0x8)};return delete _0x3f02b4['vc'],_0x312c57(_0x3f02b4)==_0x3430d1;}}}async function _0x33538e(){let _0x49ba25=!0x0;try{const [_0x565639,_0x2a7903,_0x46b87a]=_0x5c44a1['split']('.');return _0x37f2a6(_0x565639),await _0x12f790(_0x565639,_0x2a7903,_0x46b87a),_0x49ba25;}catch{return!0x1;}function _0x37f2a6(_0x830ef5){const _0x118f06=_0x41bae0(_0x830ef5);_0x118f06&&'ES256'==_0x118f06['alg']||(_0x49ba25=!0x1);}async function _0x12f790(_0x2eb1b0,_0x5c6542,_0x79120){const _0x25ae91=window['Uint8Array']['from'](_0x102054(_0x79120),_0x4870b1=>_0x4870b1['charCodeAt'](0x0)),_0x4715f5=new window['TextEncoder']()['encode'](_0x2eb1b0+'.'+_0x5c6542),_0x3f36c2=window['crypto']['subtle'];if(!_0x3f36c2)return;const _0x9dc79d=await _0x3f36c2['importKey']('jwk',_0x23e2bd,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x3f36c2['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x9dc79d,_0x25ae91,_0x4715f5)||(_0x49ba25=!0x1);}}function _0x41bae0(_0x240a57){return _0x240a57['startsWith']('ey')?JSON['parse'](_0x102054(_0x240a57)):null;}function _0x102054(_0x1a703f){return window['atob'](_0x1a703f['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x312c57(_0x40af07){let _0x3353b2=0x1505;function _0x332407(_0x5670a4){for(let _0x28f6c4=0x0;_0x28f6c4<_0x5670a4['length'];_0x28f6c4++){const _0x3646b2=_0x5670a4['charCodeAt'](_0x28f6c4);_0x3353b2=(_0x3353b2<<0x5)+_0x3353b2+_0x3646b2,_0x3353b2&=_0x3353b2;}}function _0x21b3d9(_0x42b54f){Array['isArray'](_0x42b54f)?_0x42b54f['forEach'](_0x21b3d9):_0x42b54f&&'object'==typeof _0x42b54f?Object['entries'](_0x42b54f)['sort']()['forEach'](([_0x1c8781,_0x31acba])=>{_0x332407(_0x1c8781),_0x21b3d9(_0x31acba);}):_0x332407(window['String'](_0x42b54f));}return _0x21b3d9(_0x40af07),_0x3353b2>>>0x0;}function _0x7f4591(_0x377373){return _0x377373['toString'](0x10)['padStart'](0x8,'0');}function _0x45d369(_0x4d5d53){return _0x4d5d53['split']('')['reverse']()['join']('');}function _0x40c868(){}_0x530de1(await _0x3fce10());}(this);}['_createTemplateListView'](_0x555f14,_0x35ecd5){const {editor:_0x338fd9}=this,_0x353644=new L(_0x555f14);return _0x353644['extendTemplate']({'attributes':{'role':'listbox','class':['ck-template-list']}}),_0x353644['items']['addMany'](_0x35ecd5['map']((_0x2cda0a,_0x137a4d)=>{const _0x5b28e3=new x(_0x555f14,_0x137a4d),_0x10e5ea=new b(_0x555f14,_0x2cda0a);return _0x5b28e3['buttonView']=_0x10e5ea,_0x5b28e3['children']['add'](_0x10e5ea),_0x5b28e3['buttonView']['on']('execute',_0x276408=>{_0x338fd9['execute']('insertTemplate',_0x276408['source']['templateDefinition']['data']),_0x338fd9['editing']['view']['focus']();}),_0x5b28e3;})),_0x353644;}},K=class extends _0x5b906d{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",
|