@ckeditor/ckeditor5-template 48.4.0-alpha.4 → 48.4.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 _0x50d333,Plugin as _0x52044c}from'@ckeditor/ckeditor5-core';import{IconTemplate as _0xe4a28f,IconTemplateGeneric as _0x2731d7}from'@ckeditor/ckeditor5-icons';import{ButtonView as _0x33a237,HighlightedTextView as _0x2cec36,ListItemView as _0x3c24db,ListView as _0x35493c,MenuBarMenuListItemButtonView as _0x3b6091,MenuBarMenuListItemView as _0x2071ad,MenuBarMenuListView as _0x545bd7,MenuBarMenuView as _0x473d04,SearchTextView as _0x2c3a77,View as _0x16148c,createDropdown as _0x27ea28}from'@ckeditor/ckeditor5-ui';import{uid as _0x14d0ba}from'@ckeditor/ckeditor5-utils';var g=class extends _0x50d333{execute(_0x595725){const {model:_0x16b78f}=this['editor'];let _0x1117e3;switch(typeof _0x595725){case'string':_0x1117e3=_0x595725;break;case'function':_0x1117e3=_0x595725();}'string'==typeof _0x1117e3&&_0x16b78f['change'](()=>{const _0x1da7a2=this['editor']['data']['htmlProcessor']['toView'](_0x1117e3),_0x227bfd=_0x16b78f['document']['selection']['getFirstPosition']()['root'],_0x16db1e=this['editor']['data']['toModel'](_0x1da7a2,_0x227bfd);_0x16b78f['insertContent'](_0x16db1e);});}},y=class extends _0x52044c{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'TemplateEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const {editor:_0x506d75}=this;_0x506d75['commands']['add']('insertTemplate',new g(_0x506d75)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x1f92a6=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4ea3c9;for(const _0x3454ed in _0x1f92a6){const _0xc9b9bb=_0x3454ed,_0x5ded40=_0x1f92a6[_0xc9b9bb];if('templateLicenseKeyValid'==_0x5ded40||'templateLicenseKeyInvalid'==_0x5ded40||'templateLicenseKeyExpired'==_0x5ded40||'templateLicenseKeyDomainLimit'==_0x5ded40||'templateLicenseKeyNotAllowed'==_0x5ded40||'templateLicenseKeyEvaluationLimit'==_0x5ded40||'templateLicenseKeyUsageLimit'==_0x5ded40){delete _0x1f92a6[_0xc9b9bb],_0x4ea3c9=_0x5ded40,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'templateLicenseKeyInvalid'==_0x4ea3c9&&_0x1f92a6['_showLicenseError']('invalid'),'templateLicenseKeyExpired'==_0x4ea3c9&&_0x1f92a6['_showLicenseError']('expired'),'templateLicenseKeyDomainLimit'==_0x4ea3c9&&_0x1f92a6['_showLicenseError']('domainLimit'),'templateLicenseKeyNotAllowed'==_0x4ea3c9&&_0x1f92a6['_showLicenseError']('featureNotAllowed','Template'),'templateLicenseKeyEvaluationLimit'==_0x4ea3c9&&_0x1f92a6['_showLicenseError']('evaluationLimit'),'templateLicenseKeyUsageLimit'==_0x4ea3c9&&_0x1f92a6['_showLicenseError']('usageLimit');},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},L=class extends _0x35493c{filter(_0x531cbe){if(!_0x531cbe)return this['_resetFiltering']();const _0x55b4b6=new Map(),_0x5b73d0=this['items']['map'](_0xd379d2=>{const _0x6e966b=_0xd379d2['buttonView']['isMatching'](_0x531cbe);return _0xd379d2['isVisible']=!!_0x6e966b,_0xd379d2['buttonView']['highlightText'](_0x6e966b?_0x531cbe:null),_0x6e966b&&_0x55b4b6['set'](_0xd379d2,_0x6e966b),_0xd379d2;})['sort'](v)['sort'](function(_0x490828){return function(_0x53e759,_0x583100){const _0x2bbeec=_0x490828['get'](_0x53e759),_0x1a61c4=_0x490828['get'](_0x583100);return _0x2bbeec&&!_0x1a61c4?-0x1:_0x1a61c4&&!_0x2bbeec?0x1:_0x2bbeec||_0x1a61c4?_0x2bbeec['title']&&!_0x1a61c4['title']?-0x1:!_0x2bbeec['title']&&_0x1a61c4['title']?0x1:0x0:0x0;};}(_0x55b4b6));return this['items']['clear'](),this['items']['addMany'](_0x5b73d0),{'resultsCount':_0x55b4b6['size'],'totalItemsCount':this['items']['length']};}_resetFiltering(){const _0xc96fc1=this['items']['map'](_0x1bafdd=>_0x1bafdd)['sort'](v);return _0xc96fc1['forEach'](_0x56c706=>{_0x56c706['isVisible']=!0x0,_0x56c706['buttonView']['highlightText'](null);}),this['items']['clear'](),this['items']['addMany'](_0xc96fc1),{'resultsCount':_0xc96fc1['length'],'totalItemsCount':_0xc96fc1['length']};}};function v(_0x2e3f93,_0xfa9b2a){return _0x2e3f93['originalIndex']-_0xfa9b2a['originalIndex'];}var x=class extends _0x3c24db{['originalIndex'];buttonView;constructor(_0x51c6fe,_0x550395){super(_0x51c6fe),this['originalIndex']=_0x550395,this['buttonView']=null;}},b=class extends _0x33a237{templateDefinition;textPartView;constructor(_0x480905,_0x424987){super(_0x480905),this['templateDefinition']=_0x424987,this['textPartView']=null;const {icon:_0x455492=_0x2731d7}=_0x424987;this['set']({'withText':!0x0,'class':'ck-template-button','role':'option','icon':_0x455492}),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(_0x56ad61){const {title:_0x3af04e,description:_0x5497fb}=this['templateDefinition'],_0x3c8e0e=!!_0x3af04e['match'](_0x56ad61),_0x2877a8=!(!_0x5497fb||!_0x5497fb['match'](_0x56ad61));return _0x3c8e0e||_0x2877a8?{'title':_0x3c8e0e,'description':_0x2877a8}:null;}highlightText(_0x4c7513){this['textPartView']['highlightText'](_0x4c7513);}},k=class extends _0x16148c{constructor(_0x482c65,_0x393104,_0x47cee1){super(_0x482c65),this['title']=_0x393104['title'],this['description']=_0x393104['description'],this['titleView']=new _0x2cec36(),this['titleView']['text']=this['title'],this['titleView']['extendTemplate']({'tag':'span','attributes':{'class':['ck-button__label'],'id':_0x47cee1}});const _0x11ba28=[this['titleView']];this['description']&&(this['descriptionView']=new _0x2cec36(),this['descriptionView']['text']=this['description'],this['descriptionView']['extendTemplate']({'tag':'p','attributes':{'class':['ck-template-form__description']}}),_0x11ba28['push'](this['descriptionView'])),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-template-form__text-part']},'children':_0x11ba28});}highlightText(_0x256b16){this['titleView']['highlightText'](_0x256b16),this['description']&&this['descriptionView']['highlightText'](_0x256b16);}};function I(_0xd42529,_0x79b454,..._0x322bda){const t=_0xd42529['t'];switch(_0x79b454){case'No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.':return t('No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.',..._0x322bda);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',..._0x322bda);case'Search\x20template':return t('Search\x20template');case'Template':return t('Template');case'Insert\x20template':return t('Insert\x20template');default:return _0x79b454;}}var T=class extends _0x52044c{static get['pluginName'](){return'TemplateUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const {editor:_0x2f46b6}=this,_0xe02e01=_0x2f46b6['config']['get']('template.definitions')||[];_0x2f46b6['ui']['componentFactory']['add']('insertTemplate',_0x3da0fe=>{const _0x3712b9=_0x27ea28(_0x3da0fe),_0x3ac137=new _0x2c3a77(_0x3da0fe,{'filteredView':this['_createTemplateListView'](_0x3da0fe,_0xe02e01),'queryView':{'label':I(_0x3da0fe,'Search\x20template')},'class':'ck-template-form','infoView':{'text':{'notFound':{'primary':_0x4c5965=>I(_0x3da0fe,'No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.',_0x4c5965),'secondary':I(_0x3da0fe,'Please\x20try\x20a\x20different\x20phrase\x20or\x20check\x20the\x20spelling.')},'noSearchableItems':{'primary':I(_0x3da0fe,'No\x20templates\x20available.')}}}}),_0x40b12e=_0x2f46b6['commands']['get']('insertTemplate');return _0x3ac137['on']('search',(_0x3654db,_0x5b5860)=>{_0x5b5860['query']&&_0x5b5860['query']['length']&&_0x2f46b6['ui']['ariaLiveAnnouncer']['announce'](I(_0x3da0fe,'%0\x20templates\x20found',_0x5b5860['resultsCount']));}),_0x3712b9['bind']('isEnabled')['to'](_0x40b12e),_0x3712b9['panelView']['children']['add'](_0x3ac137),_0x3712b9['buttonView']['set']({'label':I(_0x3da0fe,'Insert\x20template'),'icon':_0xe4a28f,'tooltip':!0x0}),_0x3712b9['on']('change:isOpen',(_0x4ac20b,_0x47be72,_0x37d93c)=>{_0x37d93c||_0x3ac137['reset']();}),_0x3712b9;}),_0x2f46b6['ui']['componentFactory']['add']('menuBar:insertTemplate',_0x3c1010=>{const _0x59f4e1=_0x2f46b6['commands']['get']('insertTemplate'),_0x48ce64=new _0x473d04(_0x3c1010);_0x48ce64['buttonView']['set']({'label':I(_0x3c1010,'Template'),'icon':_0xe4a28f});const _0xd05918=new _0x545bd7(_0x3c1010);if(!_0xe02e01||!_0xe02e01['length']){const _0x5bd886=new _0x2071ad(_0x3c1010,_0x48ce64),_0x5414fd=new _0x3b6091(_0x3c1010);_0x5414fd['set']({'label':I(_0x3c1010,'No\x20templates\x20available.')}),_0x5414fd['delegate']('execute')['to'](_0x48ce64),_0x5414fd['on']('execute',()=>{_0x2f46b6['editing']['view']['focus']();}),_0x5bd886['children']['add'](_0x5414fd),_0xd05918['items']['add'](_0x5bd886);}for(const _0x4d499d of _0xe02e01){const _0x22a335=new _0x2071ad(_0x3c1010,_0x48ce64),_0x46f2fc=new _0x3b6091(_0x3c1010);_0x46f2fc['set']({'class':'ck-template-button','label':_0x4d499d['title'],'icon':_0x4d499d['icon']||_0x2731d7}),_0x46f2fc['delegate']('execute')['to'](_0x48ce64),_0x46f2fc['on']('execute',()=>{_0x2f46b6['execute']('insertTemplate',_0x4d499d['data']),_0x2f46b6['editing']['view']['focus']();}),_0x22a335['children']['add'](_0x46f2fc),_0xd05918['items']['add'](_0x22a335);}return _0x48ce64['panelView']['children']['add'](_0xd05918),_0x48ce64['bind']('isEnabled')['to'](_0x59f4e1,'isEnabled'),_0x48ce64;});}afterInit(){!async function(_0xdc707a){const _0x33af89='5goNZRxHzmBfrl0Fq6Cks1ahDGS2LUEWiby3wKvu4IVPdeT8jn9MOQJtcAY7Xp',_0x448636=0x79188,_0x39ff69=window['Date']['now'](),_0x1614d3=_0xdc707a['editor'],_0x26e7ac=new window['Promise'](_0x58b7ad=>{_0x1614d3['once']('ready',_0x58b7ad);}),_0x7e9741={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x418bf9=_0x1614d3['config']['get']('licenseKey');async function _0x4c04f1(){let _0x3b9a1c,_0xfd9918=null,_0x487673=null;try{return'GPL'==_0x418bf9?'NotAllowed':(_0x3b9a1c=_0x2d1dbd(),_0x3b9a1c?(_0x3b9a1c['usageEndpoint']&&(_0x487673=_0x35af46(_0x3b9a1c['usageEndpoint'],_0x3b9a1c['jti'])),await _0x2102d6()?_0x1b379a()?_0x36322f()?'Expired':_0x2ad8d5()?('evaluation'==_0x3b9a1c['licenseType']&&(_0xfd9918=_0x2a4613('EvaluationLimit')),await _0x3408be()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x36322f(){const _0x34b592=['evaluation','trial']['includes'](_0x3b9a1c['licenseType'])?_0x39ff69/0x3e8:0xe10*_0x448636;return _0x3b9a1c['exp']<_0x34b592;}function _0x1b379a(){const _0x179cb8=_0x3b9a1c['features'];return!!_0x179cb8&&(!!_0x179cb8['includes']('*')||(!!_0x179cb8['includes']('TPL')||(!!_0x179cb8['includes']('PP')||(!(!_0x179cb8['includes']('DRUP')||!_0x3a93a4())||!(!_0x179cb8['includes']('TRILIUM')||!_0x37b163())))));}function _0x2ad8d5(){const _0x2599bd=_0x3b9a1c['licensedHosts'];if(!_0x2599bd||0x0==_0x2599bd['length'])return!0x0;const {hostname:_0x4e2c95}=new URL(window['location']['href']);if(_0x2599bd['includes'](_0x4e2c95))return!0x0;const _0x17d386=_0x4e2c95['split']('.');return _0x2599bd['filter'](_0x2a1191=>_0x2a1191['includes']('*'))['map'](_0x40fb16=>_0x40fb16['split']('.'))['filter'](_0x104dc8=>_0x104dc8['length']<=_0x17d386['length'])['map'](_0x341184=>Array(_0x17d386['length']-_0x341184['length'])['fill']('*'===_0x341184[0x0]?'*':'')['concat'](_0x341184))['some'](_0x212fd1=>_0x17d386['every']((_0x1b9dbf,_0x4f13f0)=>_0x212fd1[_0x4f13f0]===_0x1b9dbf||'*'===_0x212fd1[_0x4f13f0]));}function _0x3408be(){return _0xfd9918&&_0x487673?new window['Promise']((_0xd3354d,_0x252d49)=>{_0xfd9918['then'](_0xd3354d,_0x252d49),_0x487673['then'](_0xe0f950=>{'Valid'!=_0xe0f950&&_0xd3354d(_0xe0f950);},_0x252d49);}):_0xfd9918||_0x487673||'Valid';}}function _0x35af46(_0x4b1b1d,_0x26b631){return new window['Promise'](_0x27415a=>{if(_0x1e8ef5())return _0x27415a('Valid');_0x19f70(),_0x1614d3['decorate']('_sendUsageRequest');let _0x58cbff=!0x1;const _0x59c19d=_0x14d0ba();function _0x1ecdba(_0x14f163){return!!_0x14f163&&('object'==typeof _0x14f163||'function'==typeof _0x14f163)&&'function'==typeof _0x14f163['then']&&'function'==typeof _0x14f163['catch'];}function _0x417da2(_0x26abf2){_0x391e7c(_0x26abf2)['then'](_0x2ba6ac=>_0x2ba6ac&&'ok'==_0x2ba6ac['status']?_0x348bd0(_0x183397(_0x59c19d+_0x26b631))!=_0x2ba6ac['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x4a24eb=>(_0x2281ef(),_0x4a24eb),()=>{const _0x239888=_0x28c18d();return null==_0x239888?(_0x2281ef(),'Valid'):_0x39ff69-_0x239888>0x240c8400?'UsageLimit':'Valid';})['then'](_0x27415a)['catch'](()=>{_0x27415a('UsageLimit');});const _0x589175=0x36ee80;function _0x2281ef(){const _0x4bc2f4='llct-'+_0x348bd0(_0x183397(_0x4b1b1d)),_0x69c525=_0x38585e(_0x348bd0(window['Math']['ceil'](_0x39ff69/_0x589175)));window['localStorage']['setItem'](_0x4bc2f4,_0x69c525);}function _0x28c18d(){const _0x1f3e1c='llct-'+_0x348bd0(_0x183397(_0x4b1b1d)),_0x1798ca=window['localStorage']['getItem'](_0x1f3e1c);return _0x1798ca?window['parseInt'](_0x38585e(_0x1798ca),0x10)*_0x589175:null;}function _0x391e7c(_0x404eac){return new window['Promise']((_0x12a585,_0x19789f)=>{_0x404eac['then'](_0x12a585,_0x19789f),window['setTimeout'](_0x19789f,0x1d4c0);});}}_0x1614d3['on']('_sendUsageRequest',(_0xb91f5b,_0x3bd5e6)=>{if(_0x3bd5e6[0x0]!=_0x4b1b1d)return _0x27415a('UsageLimit');_0x3bd5e6[0x1]={..._0x3bd5e6[0x1],'requestId':_0x59c19d};},{'priority':'high'}),_0x1614d3['on']('_sendUsageRequest',_0x5e954d=>{_0x1ecdba(_0x5e954d['return'])&&(_0x58cbff=!0x0,_0x417da2(_0x5e954d['return']));},{'priority':'low'}),_0x26e7ac['then'](()=>{_0x58cbff||_0x27415a('UsageLimit');});});function _0x1e8ef5(){return'auto'==_0x1614d3['editing']['view']['_overlayModeHint'];}function _0x19f70(){_0x1614d3['editing']['view']['_overlayModeHint']='auto';}}function _0x2a4613(_0x2c08bd){const _0x12bad8=[new window['Promise'](_0x5280cd=>setTimeout(_0x5280cd,0x93ecc)),_0x26e7ac['then'](()=>new window['Promise'](_0x3c6f70=>{let _0x4a0a46=0x0;_0x1614d3['model']['on']('applyOperation',(_0x3641ba,_0x2ac353)=>{_0x2ac353[0x0]['isDocumentOperation']&&_0x4a0a46++,0x5e8==_0x4a0a46&&(_0x3c6f70(),_0x3641ba['off']());});}))];return window['Promise']['race'](_0x12bad8)['then'](()=>_0x2c08bd);}async function _0x5e14bf(){await _0x26e7ac,_0x1614d3['model']['change']=_0x368549,_0x1614d3['model']['enqueueChange']=_0x368549,_0x1614d3['enableReadOnlyMode']('model');}function _0x3a93a4(){return window['Drupal'];}function _0x37b163(){return window['glob']&&window['glob']['triliumVersion'];}function _0x4efdc5(_0x57e682){const _0x58a4c8=_0x7842cf();_0x1614d3[_0x58a4c8]='templateLicenseKey'+_0x57e682,'Valid'!=_0x57e682&&_0x5e14bf();}function _0x7842cf(){const _0xb76e2f=window['String'](window['performance']['now']())['replace']('.','');let _0x3facb8='g';for(let _0x5d37f2=0x0;_0x5d37f2<_0xb76e2f['length'];_0x5d37f2+=0x2){let _0x4c11f9=window['parseInt'](_0xb76e2f['substring'](_0x5d37f2,_0x5d37f2+0x2));_0x4c11f9>=0x3e&&(_0x4c11f9-=0x3e),_0x3facb8+=_0x33af89[_0x4c11f9];}return _0x3facb8;}function _0x2d1dbd(){const _0x48ca03=_0x418bf9['split']('.');if(0x3!=_0x48ca03['length'])return null;return _0x38bf43(_0x48ca03[0x1]);function _0x38bf43(_0x10adf1){const _0x530a83=_0x25266a(_0x10adf1);return _0x530a83&&_0x49efed()?_0x530a83:null;function _0x49efed(){const _0x5426cf=_0x530a83['jti'],_0x2856b3=window['parseInt'](_0x5426cf['substring'](_0x5426cf['length']-0x8),0x10),_0x3ff519={..._0x530a83,'jti':_0x5426cf['substring'](0x0,_0x5426cf['length']-0x8)};return delete _0x3ff519['vc'],_0x183397(_0x3ff519)==_0x2856b3;}}}async function _0x2102d6(){let _0x2b50a5=!0x0;try{const [_0x3e2292,_0x4b1269,_0x7168e1]=_0x418bf9['split']('.');return _0x3ddbc6(_0x3e2292),await _0x464cfa(_0x3e2292,_0x4b1269,_0x7168e1),_0x2b50a5;}catch{return!0x1;}function _0x3ddbc6(_0x2077af){const _0x379a72=_0x25266a(_0x2077af);_0x379a72&&'ES256'==_0x379a72['alg']||(_0x2b50a5=!0x1);}async function _0x464cfa(_0x1dd901,_0x3af83f,_0x5ddd5e){const _0x40872d=window['Uint8Array']['from'](_0x597343(_0x5ddd5e),_0x2de8d0=>_0x2de8d0['charCodeAt'](0x0)),_0x5bbd5b=new window['TextEncoder']()['encode'](_0x1dd901+'.'+_0x3af83f),_0x803431=window['crypto']['subtle'];if(!_0x803431)return;const _0x4d71d7=await _0x803431['importKey']('jwk',_0x7e9741,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x803431['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x4d71d7,_0x40872d,_0x5bbd5b)||(_0x2b50a5=!0x1);}}function _0x25266a(_0x220820){return _0x220820['startsWith']('ey')?JSON['parse'](_0x597343(_0x220820)):null;}function _0x597343(_0x12c590){return window['atob'](_0x12c590['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x183397(_0x2525c2){let _0x3aebf7=0x1505;function _0x5ea531(_0x5a1a60){for(let _0x4a02cf=0x0;_0x4a02cf<_0x5a1a60['length'];_0x4a02cf++){const _0x4a28d1=_0x5a1a60['charCodeAt'](_0x4a02cf);_0x3aebf7=(_0x3aebf7<<0x5)+_0x3aebf7+_0x4a28d1,_0x3aebf7&=_0x3aebf7;}}function _0x40e41f(_0x5f89a3){Array['isArray'](_0x5f89a3)?_0x5f89a3['forEach'](_0x40e41f):_0x5f89a3&&'object'==typeof _0x5f89a3?Object['entries'](_0x5f89a3)['sort']()['forEach'](([_0x12f838,_0x436ab7])=>{_0x5ea531(_0x12f838),_0x40e41f(_0x436ab7);}):_0x5ea531(window['String'](_0x5f89a3));}return _0x40e41f(_0x2525c2),_0x3aebf7>>>0x0;}function _0x348bd0(_0x4e1ff8){return _0x4e1ff8['toString'](0x10)['padStart'](0x8,'0');}function _0x38585e(_0x14660e){return _0x14660e['split']('')['reverse']()['join']('');}function _0x368549(){}_0x4efdc5(await _0x4c04f1());}(this);}_createTemplateListView(_0xe1dbb1,_0x55ec00){const {editor:_0x2fc969}=this,_0x348197=new L(_0xe1dbb1);return _0x348197['extendTemplate']({'attributes':{'role':'listbox','class':['ck-template-list']}}),_0x348197['items']['addMany'](_0x55ec00['map']((_0x4a25a1,_0x46ea9a)=>{const _0x514dbf=new x(_0xe1dbb1,_0x46ea9a),_0x34dc3e=new b(_0xe1dbb1,_0x4a25a1);return _0x514dbf['buttonView']=_0x34dc3e,_0x514dbf['children']['add'](_0x34dc3e),_0x514dbf['buttonView']['on']('execute',_0x550c93=>{_0x2fc969['execute']('insertTemplate',_0x550c93['source']['templateDefinition']['data']),_0x2fc969['editing']['view']['focus']();}),_0x514dbf;})),_0x348197;}},K=class extends _0x52044c{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 _0x335517,Plugin as _0x5b2c51}from'@ckeditor/ckeditor5-core';import{IconTemplate as _0x594409,IconTemplateGeneric as _0xcd55d1}from'@ckeditor/ckeditor5-icons';import{ButtonView as _0xe003bf,HighlightedTextView as _0x1c33f3,ListItemView as _0xfde076,ListView as _0x28f2a1,MenuBarMenuListItemButtonView as _0x171dd6,MenuBarMenuListItemView as _0xeede10,MenuBarMenuListView as _0x2eac98,MenuBarMenuView as _0x10ec8f,SearchTextView as _0x15a52b,View as _0x2c90eb,createDropdown as _0x4b0cb4}from'@ckeditor/ckeditor5-ui';import{uid as _0x7a386d}from'@ckeditor/ckeditor5-utils';var g=class extends _0x335517{execute(_0x28d91e){const {model:_0x50c929}=this['editor'];let _0x5c877e;switch(typeof _0x28d91e){case'string':_0x5c877e=_0x28d91e;break;case'function':_0x5c877e=_0x28d91e();}'string'==typeof _0x5c877e&&_0x50c929['change'](()=>{const _0x16c7f7=this['editor']['data']['htmlProcessor']['toView'](_0x5c877e),_0xa85655=_0x50c929['document']['selection']['getFirstPosition']()['root'],_0x4c6f88=this['editor']['data']['toModel'](_0x16c7f7,_0xa85655);_0x50c929['insertContent'](_0x4c6f88);});}},y=class extends _0x5b2c51{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'TemplateEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const {editor:_0x137fee}=this;_0x137fee['commands']['add']('insertTemplate',new g(_0x137fee)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x5339ab=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x19e978;for(const _0x1be8d1 in _0x5339ab){const _0x47cf0a=_0x1be8d1,_0x413176=_0x5339ab[_0x47cf0a];if('templateLicenseKeyValid'==_0x413176||'templateLicenseKeyInvalid'==_0x413176||'templateLicenseKeyExpired'==_0x413176||'templateLicenseKeyDomainLimit'==_0x413176||'templateLicenseKeyNotAllowed'==_0x413176||'templateLicenseKeyEvaluationLimit'==_0x413176||'templateLicenseKeyUsageLimit'==_0x413176){delete _0x5339ab[_0x47cf0a],_0x19e978=_0x413176,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'templateLicenseKeyInvalid'==_0x19e978&&_0x5339ab['_showLicenseError']('invalid'),'templateLicenseKeyExpired'==_0x19e978&&_0x5339ab['_showLicenseError']('expired'),'templateLicenseKeyDomainLimit'==_0x19e978&&_0x5339ab['_showLicenseError']('domainLimit'),'templateLicenseKeyNotAllowed'==_0x19e978&&_0x5339ab['_showLicenseError']('featureNotAllowed','Template'),'templateLicenseKeyEvaluationLimit'==_0x19e978&&_0x5339ab['_showLicenseError']('evaluationLimit'),'templateLicenseKeyUsageLimit'==_0x19e978&&_0x5339ab['_showLicenseError']('usageLimit');},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},L=class extends _0x28f2a1{filter(_0x20b8ef){if(!_0x20b8ef)return this['_resetFiltering']();const _0x51d9e4=new Map(),_0x3efeba=this['items']['map'](_0x334c2e=>{const _0x21821b=_0x334c2e['buttonView']['isMatching'](_0x20b8ef);return _0x334c2e['isVisible']=!!_0x21821b,_0x334c2e['buttonView']['highlightText'](_0x21821b?_0x20b8ef:null),_0x21821b&&_0x51d9e4['set'](_0x334c2e,_0x21821b),_0x334c2e;})['sort'](v)['sort'](function(_0x33c0f2){return function(_0x372c67,_0x5d99aa){const _0x45b5b4=_0x33c0f2['get'](_0x372c67),_0x5231de=_0x33c0f2['get'](_0x5d99aa);return _0x45b5b4&&!_0x5231de?-0x1:_0x5231de&&!_0x45b5b4?0x1:_0x45b5b4||_0x5231de?_0x45b5b4['title']&&!_0x5231de['title']?-0x1:!_0x45b5b4['title']&&_0x5231de['title']?0x1:0x0:0x0;};}(_0x51d9e4));return this['items']['clear'](),this['items']['addMany'](_0x3efeba),{'resultsCount':_0x51d9e4['size'],'totalItemsCount':this['items']['length']};}_resetFiltering(){const _0x24984d=this['items']['map'](_0x1405a9=>_0x1405a9)['sort'](v);return _0x24984d['forEach'](_0x4d90ff=>{_0x4d90ff['isVisible']=!0x0,_0x4d90ff['buttonView']['highlightText'](null);}),this['items']['clear'](),this['items']['addMany'](_0x24984d),{'resultsCount':_0x24984d['length'],'totalItemsCount':_0x24984d['length']};}};function v(_0x55bfe8,_0x4d9b56){return _0x55bfe8['originalIndex']-_0x4d9b56['originalIndex'];}var x=class extends _0xfde076{['originalIndex'];buttonView;constructor(_0x2e2d83,_0xf40548){super(_0x2e2d83),this['originalIndex']=_0xf40548,this['buttonView']=null;}},b=class extends _0xe003bf{templateDefinition;textPartView;constructor(_0x950c93,_0x14cc12){super(_0x950c93),this['templateDefinition']=_0x14cc12,this['textPartView']=null;const {icon:_0x1cbc4d=_0xcd55d1}=_0x14cc12;this['set']({'withText':!0x0,'class':'ck-template-button','role':'option','icon':_0x1cbc4d}),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(_0x646f83){const {title:_0x304c1e,description:_0x5370aa}=this['templateDefinition'],_0x44a14a=!!_0x304c1e['match'](_0x646f83),_0x2f9856=!(!_0x5370aa||!_0x5370aa['match'](_0x646f83));return _0x44a14a||_0x2f9856?{'title':_0x44a14a,'description':_0x2f9856}:null;}highlightText(_0x3809f1){this['textPartView']['highlightText'](_0x3809f1);}},k=class extends _0x2c90eb{constructor(_0x4d0ff9,_0x298087,_0xc33d99){super(_0x4d0ff9),this['title']=_0x298087['title'],this['description']=_0x298087['description'],this['titleView']=new _0x1c33f3(),this['titleView']['text']=this['title'],this['titleView']['extendTemplate']({'tag':'span','attributes':{'class':['ck-button__label'],'id':_0xc33d99}});const _0xfb4ad8=[this['titleView']];this['description']&&(this['descriptionView']=new _0x1c33f3(),this['descriptionView']['text']=this['description'],this['descriptionView']['extendTemplate']({'tag':'p','attributes':{'class':['ck-template-form__description']}}),_0xfb4ad8['push'](this['descriptionView'])),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-template-form__text-part']},'children':_0xfb4ad8});}highlightText(_0x27a2ef){this['titleView']['highlightText'](_0x27a2ef),this['description']&&this['descriptionView']['highlightText'](_0x27a2ef);}};function I(_0x11d601,_0x4132ed,..._0x3f1597){const t=_0x11d601['t'];switch(_0x4132ed){case'No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.':return t('No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.',..._0x3f1597);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',..._0x3f1597);case'Search\x20template':return t('Search\x20template');case'Template':return t('Template');case'Insert\x20template':return t('Insert\x20template');default:return _0x4132ed;}}var T=class extends _0x5b2c51{static get['pluginName'](){return'TemplateUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const {editor:_0x258fd4}=this,_0x219248=_0x258fd4['config']['get']('template.definitions')||[];_0x258fd4['ui']['componentFactory']['add']('insertTemplate',_0x2b89de=>{const _0x40ad37=_0x4b0cb4(_0x2b89de),_0x175e4d=new _0x15a52b(_0x2b89de,{'filteredView':this['_createTemplateListView'](_0x2b89de,_0x219248),'queryView':{'label':I(_0x2b89de,'Search\x20template')},'class':'ck-template-form','infoView':{'text':{'notFound':{'primary':_0x27a52e=>I(_0x2b89de,'No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.',_0x27a52e),'secondary':I(_0x2b89de,'Please\x20try\x20a\x20different\x20phrase\x20or\x20check\x20the\x20spelling.')},'noSearchableItems':{'primary':I(_0x2b89de,'No\x20templates\x20available.')}}}}),_0x4e32b8=_0x258fd4['commands']['get']('insertTemplate');return _0x175e4d['on']('search',(_0x5556a2,_0x1e76b4)=>{_0x1e76b4['query']&&_0x1e76b4['query']['length']&&_0x258fd4['ui']['ariaLiveAnnouncer']['announce'](I(_0x2b89de,'%0\x20templates\x20found',_0x1e76b4['resultsCount']));}),_0x40ad37['bind']('isEnabled')['to'](_0x4e32b8),_0x40ad37['panelView']['children']['add'](_0x175e4d),_0x40ad37['buttonView']['set']({'label':I(_0x2b89de,'Insert\x20template'),'icon':_0x594409,'tooltip':!0x0}),_0x40ad37['on']('change:isOpen',(_0x58db43,_0x9c36c4,_0x22cf13)=>{_0x22cf13||_0x175e4d['reset']();}),_0x40ad37;}),_0x258fd4['ui']['componentFactory']['add']('menuBar:insertTemplate',_0x142741=>{const _0x1a5ebd=_0x258fd4['commands']['get']('insertTemplate'),_0x137b1e=new _0x10ec8f(_0x142741);_0x137b1e['buttonView']['set']({'label':I(_0x142741,'Template'),'icon':_0x594409});const _0x8e0323=new _0x2eac98(_0x142741);if(!_0x219248||!_0x219248['length']){const _0x93a45f=new _0xeede10(_0x142741,_0x137b1e),_0x404422=new _0x171dd6(_0x142741);_0x404422['set']({'label':I(_0x142741,'No\x20templates\x20available.')}),_0x404422['delegate']('execute')['to'](_0x137b1e),_0x404422['on']('execute',()=>{_0x258fd4['editing']['view']['focus']();}),_0x93a45f['children']['add'](_0x404422),_0x8e0323['items']['add'](_0x93a45f);}for(const _0x44dad6 of _0x219248){const _0x4e136d=new _0xeede10(_0x142741,_0x137b1e),_0x3aaeed=new _0x171dd6(_0x142741);_0x3aaeed['set']({'class':'ck-template-button','label':_0x44dad6['title'],'icon':_0x44dad6['icon']||_0xcd55d1}),_0x3aaeed['delegate']('execute')['to'](_0x137b1e),_0x3aaeed['on']('execute',()=>{_0x258fd4['execute']('insertTemplate',_0x44dad6['data']),_0x258fd4['editing']['view']['focus']();}),_0x4e136d['children']['add'](_0x3aaeed),_0x8e0323['items']['add'](_0x4e136d);}return _0x137b1e['panelView']['children']['add'](_0x8e0323),_0x137b1e['bind']('isEnabled')['to'](_0x1a5ebd,'isEnabled'),_0x137b1e;});}afterInit(){!async function(_0x1d2153){const _0x2ed9b0='5goNZRxHzmBfrl0Fq6Cks1ahDGS2LUEWiby3wKvu4IVPdeT8jn9MOQJtcAY7Xp',_0x2a670a=0x791a0,_0x54d33c=window['Date']['now'](),_0x41369c=_0x1d2153['editor'],_0xb74704=new window['Promise'](_0x40b80e=>{_0x41369c['once']('ready',_0x40b80e);}),_0x276c70={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x46e122=_0x41369c['config']['get']('licenseKey');async function _0x28cfa1(){let _0x44cb9b,_0x412e5f=null,_0x58d36b=null;try{return'GPL'==_0x46e122?'NotAllowed':(_0x44cb9b=_0x101305(),_0x44cb9b?(_0x44cb9b['usageEndpoint']&&(_0x58d36b=_0x4fb6aa(_0x44cb9b['usageEndpoint'],_0x44cb9b['jti'])),await _0x4561eb()?_0x26c890()?_0x498229()?'Expired':_0x270336()?('evaluation'==_0x44cb9b['licenseType']&&(_0x412e5f=_0x2e9f98('EvaluationLimit')),await _0x48a604()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x498229(){const _0x4a2feb=['evaluation','trial']['includes'](_0x44cb9b['licenseType'])?_0x54d33c/0x3e8:0xe10*_0x2a670a;return _0x44cb9b['exp']<_0x4a2feb;}function _0x26c890(){const _0x286fea=_0x44cb9b['features'];return!!_0x286fea&&(!!_0x286fea['includes']('*')||(!!_0x286fea['includes']('TPL')||(!!_0x286fea['includes']('PP')||(!(!_0x286fea['includes']('DRUP')||!_0x14427c())||!(!_0x286fea['includes']('TRILIUM')||!_0x4b934b())))));}function _0x270336(){const _0xed5387=_0x44cb9b['licensedHosts'];if(!_0xed5387||0x0==_0xed5387['length'])return!0x0;const {hostname:_0x18f84f}=new URL(window['location']['href']);if(_0xed5387['includes'](_0x18f84f))return!0x0;const _0x3ef60a=_0x18f84f['split']('.');return _0xed5387['filter'](_0x10295d=>_0x10295d['includes']('*'))['map'](_0x585d3e=>_0x585d3e['split']('.'))['filter'](_0x503a59=>_0x503a59['length']<=_0x3ef60a['length'])['map'](_0x19c725=>Array(_0x3ef60a['length']-_0x19c725['length'])['fill']('*'===_0x19c725[0x0]?'*':'')['concat'](_0x19c725))['some'](_0x5ee2e6=>_0x3ef60a['every']((_0x4ff45d,_0x2e7b63)=>_0x5ee2e6[_0x2e7b63]===_0x4ff45d||'*'===_0x5ee2e6[_0x2e7b63]));}function _0x48a604(){return _0x412e5f&&_0x58d36b?new window['Promise']((_0xb404e8,_0x47d6c4)=>{_0x412e5f['then'](_0xb404e8,_0x47d6c4),_0x58d36b['then'](_0x3851ad=>{'Valid'!=_0x3851ad&&_0xb404e8(_0x3851ad);},_0x47d6c4);}):_0x412e5f||_0x58d36b||'Valid';}}function _0x4fb6aa(_0x313ceb,_0x2a6009){return new window['Promise'](_0x27e45d=>{if(_0x4b785d())return _0x27e45d('Valid');_0x1eea65(),_0x41369c['decorate']('_sendUsageRequest');let _0xdc84b6=!0x1;const _0x51ea68=_0x7a386d();function _0x3c0254(_0x478066){return!!_0x478066&&('object'==typeof _0x478066||'function'==typeof _0x478066)&&'function'==typeof _0x478066['then']&&'function'==typeof _0x478066['catch'];}function _0x4ee95e(_0x2eeef5){_0x5aaf7a(_0x2eeef5)['then'](_0x3f2173=>_0x3f2173&&'ok'==_0x3f2173['status']?_0x24d018(_0x4b8ba8(_0x51ea68+_0x2a6009))!=_0x3f2173['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x51ce60=>(_0x356683(),_0x51ce60),()=>{const _0xc7b51a=_0x49f52f();return null==_0xc7b51a?(_0x356683(),'Valid'):_0x54d33c-_0xc7b51a>0x240c8400?'UsageLimit':'Valid';})['then'](_0x27e45d)['catch'](()=>{_0x27e45d('UsageLimit');});const _0x2af5ed=0x36ee80;function _0x356683(){const _0x25ef56='llct-'+_0x24d018(_0x4b8ba8(_0x313ceb)),_0x55131d=_0x55806e(_0x24d018(window['Math']['ceil'](_0x54d33c/_0x2af5ed)));window['localStorage']['setItem'](_0x25ef56,_0x55131d);}function _0x49f52f(){const _0x1a46f5='llct-'+_0x24d018(_0x4b8ba8(_0x313ceb)),_0x4e2f20=window['localStorage']['getItem'](_0x1a46f5);return _0x4e2f20?window['parseInt'](_0x55806e(_0x4e2f20),0x10)*_0x2af5ed:null;}function _0x5aaf7a(_0x52bb0f){return new window['Promise']((_0x255344,_0x58bb35)=>{_0x52bb0f['then'](_0x255344,_0x58bb35),window['setTimeout'](_0x58bb35,0x1d4c0);});}}_0x41369c['on']('_sendUsageRequest',(_0x457b14,_0x49ca32)=>{if(_0x49ca32[0x0]!=_0x313ceb)return _0x27e45d('UsageLimit');_0x49ca32[0x1]={..._0x49ca32[0x1],'requestId':_0x51ea68};},{'priority':'high'}),_0x41369c['on']('_sendUsageRequest',_0x46a45f=>{_0x3c0254(_0x46a45f['return'])&&(_0xdc84b6=!0x0,_0x4ee95e(_0x46a45f['return']));},{'priority':'low'}),_0xb74704['then'](()=>{_0xdc84b6||_0x27e45d('UsageLimit');});});function _0x4b785d(){return'auto'==_0x41369c['editing']['view']['_overlayModeHint'];}function _0x1eea65(){_0x41369c['editing']['view']['_overlayModeHint']='auto';}}function _0x2e9f98(_0x49a319){const _0x4d209a=[new window['Promise'](_0x447761=>setTimeout(_0x447761,0x93ecc)),_0xb74704['then'](()=>new window['Promise'](_0x589a32=>{let _0x188c01=0x0;_0x41369c['model']['on']('applyOperation',(_0x1e145f,_0x586a69)=>{_0x586a69[0x0]['isDocumentOperation']&&_0x188c01++,0x5e8==_0x188c01&&(_0x589a32(),_0x1e145f['off']());});}))];return window['Promise']['race'](_0x4d209a)['then'](()=>_0x49a319);}async function _0x1fa119(){await _0xb74704,_0x41369c['model']['change']=_0x368b6b,_0x41369c['model']['enqueueChange']=_0x368b6b,_0x41369c['enableReadOnlyMode']('model');}function _0x14427c(){return window['Drupal'];}function _0x4b934b(){return window['glob']&&window['glob']['triliumVersion'];}function _0x32c85c(_0x59f3d3){const _0xa274b4=_0x447fb7();_0x41369c[_0xa274b4]='templateLicenseKey'+_0x59f3d3,'Valid'!=_0x59f3d3&&_0x1fa119();}function _0x447fb7(){const _0x535249=window['String'](window['performance']['now']())['replace']('.','');let _0x2c8f9e='g';for(let _0x2712b7=0x0;_0x2712b7<_0x535249['length'];_0x2712b7+=0x2){let _0x49b370=window['parseInt'](_0x535249['substring'](_0x2712b7,_0x2712b7+0x2));_0x49b370>=0x3e&&(_0x49b370-=0x3e),_0x2c8f9e+=_0x2ed9b0[_0x49b370];}return _0x2c8f9e;}function _0x101305(){const _0x71420c=_0x46e122['split']('.');if(0x3!=_0x71420c['length'])return null;return _0x338ede(_0x71420c[0x1]);function _0x338ede(_0x49187b){const _0x53fa59=_0x18202b(_0x49187b);return _0x53fa59&&_0x157f8f()?_0x53fa59:null;function _0x157f8f(){const _0x5845bf=_0x53fa59['jti'],_0x43a934=window['parseInt'](_0x5845bf['substring'](_0x5845bf['length']-0x8),0x10),_0x16078f={..._0x53fa59,'jti':_0x5845bf['substring'](0x0,_0x5845bf['length']-0x8)};return delete _0x16078f['vc'],_0x4b8ba8(_0x16078f)==_0x43a934;}}}async function _0x4561eb(){let _0x45915a=!0x0;try{const [_0x4452e4,_0x22dbd6,_0x2bb182]=_0x46e122['split']('.');return _0x56a4a9(_0x4452e4),await _0x35ad68(_0x4452e4,_0x22dbd6,_0x2bb182),_0x45915a;}catch{return!0x1;}function _0x56a4a9(_0x3a522b){const _0xe4652b=_0x18202b(_0x3a522b);_0xe4652b&&'ES256'==_0xe4652b['alg']||(_0x45915a=!0x1);}async function _0x35ad68(_0x494d02,_0x492b31,_0x2b2700){const _0x18ff01=window['Uint8Array']['from'](_0x4ac3bc(_0x2b2700),_0xbae8f0=>_0xbae8f0['charCodeAt'](0x0)),_0x1a97ac=new window['TextEncoder']()['encode'](_0x494d02+'.'+_0x492b31),_0x1b9df2=window['crypto']['subtle'];if(!_0x1b9df2)return;const _0x324459=await _0x1b9df2['importKey']('jwk',_0x276c70,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x1b9df2['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x324459,_0x18ff01,_0x1a97ac)||(_0x45915a=!0x1);}}function _0x18202b(_0x1669bf){return _0x1669bf['startsWith']('ey')?JSON['parse'](_0x4ac3bc(_0x1669bf)):null;}function _0x4ac3bc(_0x6a7ac9){return window['atob'](_0x6a7ac9['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x4b8ba8(_0x27ac8e){let _0x10d495=0x1505;function _0x27feb5(_0x19288c){for(let _0x41f737=0x0;_0x41f737<_0x19288c['length'];_0x41f737++){const _0x3967f5=_0x19288c['charCodeAt'](_0x41f737);_0x10d495=(_0x10d495<<0x5)+_0x10d495+_0x3967f5,_0x10d495&=_0x10d495;}}function _0x3853f6(_0x467bdc){Array['isArray'](_0x467bdc)?_0x467bdc['forEach'](_0x3853f6):_0x467bdc&&'object'==typeof _0x467bdc?Object['entries'](_0x467bdc)['sort']()['forEach'](([_0xd2753b,_0x1d63b5])=>{_0x27feb5(_0xd2753b),_0x3853f6(_0x1d63b5);}):_0x27feb5(window['String'](_0x467bdc));}return _0x3853f6(_0x27ac8e),_0x10d495>>>0x0;}function _0x24d018(_0x280ff3){return _0x280ff3['toString'](0x10)['padStart'](0x8,'0');}function _0x55806e(_0x35ff22){return _0x35ff22['split']('')['reverse']()['join']('');}function _0x368b6b(){}_0x32c85c(await _0x28cfa1());}(this);}_createTemplateListView(_0x42e6eb,_0xec0483){const {editor:_0x49f7e0}=this,_0xe14914=new L(_0x42e6eb);return _0xe14914['extendTemplate']({'attributes':{'role':'listbox','class':['ck-template-list']}}),_0xe14914['items']['addMany'](_0xec0483['map']((_0x1afa2e,_0xcbfd46)=>{const _0x4fb989=new x(_0x42e6eb,_0xcbfd46),_0x27f90b=new b(_0x42e6eb,_0x1afa2e);return _0x4fb989['buttonView']=_0x27f90b,_0x4fb989['children']['add'](_0x27f90b),_0x4fb989['buttonView']['on']('execute',_0x53f6f1=>{_0x49f7e0['execute']('insertTemplate',_0x53f6f1['source']['templateDefinition']['data']),_0x49f7e0['editing']['view']['focus']();}),_0x4fb989;})),_0xe14914;}},K=class extends _0x5b2c51{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.4.0-alpha.
|
|
3
|
+
"version": "48.4.0-alpha.5",
|
|
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.4.0-alpha.
|
|
35
|
-
"@ckeditor/ckeditor5-engine": "48.4.0-alpha.
|
|
36
|
-
"@ckeditor/ckeditor5-icons": "48.4.0-alpha.
|
|
37
|
-
"@ckeditor/ckeditor5-ui": "48.4.0-alpha.
|
|
38
|
-
"@ckeditor/ckeditor5-utils": "48.4.0-alpha.
|
|
34
|
+
"@ckeditor/ckeditor5-core": "48.4.0-alpha.5",
|
|
35
|
+
"@ckeditor/ckeditor5-engine": "48.4.0-alpha.5",
|
|
36
|
+
"@ckeditor/ckeditor5-icons": "48.4.0-alpha.5",
|
|
37
|
+
"@ckeditor/ckeditor5-ui": "48.4.0-alpha.5",
|
|
38
|
+
"@ckeditor/ckeditor5-utils": "48.4.0-alpha.5"
|
|
39
39
|
},
|
|
40
40
|
"files": [
|
|
41
41
|
"dist",
|