@ckeditor/ckeditor5-document-outline 48.5.0-alpha.1 → 48.5.0-alpha.2
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 +8 -8
package/dist/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Command as _0x3420f8,Plugin as _0x4bc148}from'@ckeditor/ckeditor5-core';import{debounce as _0x3e24e0,throttle as _0x5a22da}from'es-toolkit/compat';import{ModelText as _0x5d5adf,ModelTreeWalker as _0x34536f}from'@ckeditor/ckeditor5-engine';import{CKEditorError as _0x3eb466,Rect as _0x20cbca,diff as _0x4ce3f2,diffToChanges as _0x19593b,global as _0x16cf09,priorities as _0x40ce6e,scrollAncestorsToShowTarget as _0x178eae,uid as _0x155df0}from'@ckeditor/ckeditor5-utils';import{ButtonView as _0x5dada1,MenuBarMenuListItemButtonView as _0x4d4856,View as _0x23ed9c}from'@ckeditor/ckeditor5-ui';import{Widget as _0x431630,toWidget as _0x3afa56}from'@ckeditor/ckeditor5-widget';import{IconTableOfContents as _0x2515a9}from'@ckeditor/ckeditor5-icons';function b(_0x400027){let _0x3d9b73='';for(const _0x2b3ff6 of _0x400027['getChildren']())_0x2b3ff6 instanceof _0x5d5adf&&(_0x3d9b73+=_0x2b3ff6['data']);return _0x3d9b73;}var I=class extends _0x4bc148{static get['pluginName'](){return'DocumentOutlineUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_headingNames']=[];init(){const _0x107126=this['editor'];this['_headingNames']=this['_getHeadingNames']();let _0x5d0aba=[];_0x107126['model']['document']['on']('change',_0x3e24e0(()=>{const _0x21a83c=_0x5d0aba;_0x5d0aba=this['_getOutlineDefinitions']();const _0x3bf0c7=_0x4ce3f2(_0x21a83c,_0x5d0aba,(_0x334a07,_0x170689)=>_0x334a07['level']===_0x170689['level']&&_0x334a07['text']===_0x170689['text']&&_0x334a07['modelElement']===_0x170689['modelElement']),_0x456289=_0x19593b(_0x3bf0c7,_0x5d0aba),_0x30e901=this['_getActiveHeading'](),_0x9c9f31=_0x5d0aba['findIndex'](_0x2e5d5a=>_0x2e5d5a['modelElement']===_0x30e901);_0x456289['length']&&this['fire']('change',{'outlineDefinitions':_0x5d0aba,'activeItemIndex':_0x9c9f31,'outlineChanges':_0x456289}),this['fire']('activeItemIndex',{'index':_0x9c9f31});},0xfa,{'leading':!0x0,'trailing':!0x0}));}afterInit(){this['_headingNames']['length']||this['_deriveHeadingElementsFromConversion']();}_getOutlineDefinitions(){const _0x24a5bd=this['editor'],_0x2f77d9=[],_0x125816=this['_headingNames'];for(const _0x491e98 of _0x24a5bd['model']['document']['getRootNames']())_0x2f6bd0(_0x24a5bd['model']['document']['getRoot'](_0x491e98));function _0x2f6bd0(_0xa267ac){for(const _0x30ff1c of _0xa267ac['getChildren']())_0x30ff1c['is']('element')&&(_0x125816['includes'](_0x30ff1c['name'])&&_0x2f77d9['push']({'level':_0x125816['indexOf'](_0x30ff1c['name'])+0x1,'text':b(_0x30ff1c),'modelElement':_0x30ff1c}),_0x2f6bd0(_0x30ff1c));}return _0x2f77d9;}_getActiveHeading(){const _0x4161aa=this['editor']['model']['document']['selection']['getFirstPosition'](),_0x276ae0=new _0x34536f({'direction':'backward','startPosition':_0x4161aa});for(const _0x112093 of _0x276ae0)if(_0x112093['item']['is']('element')&&this['_headingNames']['includes'](_0x112093['item']['name']))return _0x112093['item'];}_getHeadingNames(){const _0x15bf14=this['editor']['config']['get']('documentOutline.headings');return _0x15bf14||function(_0x402d29){const _0x356cdb=_0x402d29['config']['get']('heading.options');return _0x356cdb?_0x356cdb['reduce']((_0x510372,_0x241cb7)=>('paragraph'!==_0x241cb7['model']&&_0x510372['push'](_0x241cb7['model']),_0x510372),[]):_0x402d29['plugins']['has']('GeneralHtmlSupport')?['htmlH1','htmlH2','htmlH3','htmlH4','htmlH5','htmlH6']:[];}(this['editor']);}_deriveHeadingElementsFromConversion(){const _0x30a828=this['editor'],_0x2826c5=['h1','h2','h3','h4','h5','h6'],_0x36af51=[];for(const _0x89c45e of _0x2826c5){const _0x2cdd13=_0x30a828['editing']['view']['domConverter']['domToView'](document['createElement'](_0x89c45e)),_0x139589=_0x30a828['data']['toModel'](_0x2cdd13)['getChild'](0x0);_0x139589?.['is']('element')&&_0x36af51['push'](_0x139589['name']);}this['_headingNames']=_0x36af51;}};function L(_0x5ae39b,_0x4ab2d1){const t=_0x5ae39b['t'];switch(_0x4ab2d1){case'Empty\x20heading':return t('Empty\x20heading');case'Editor\x20headings\x20will\x20appear\x20here\x20as\x20you\x20type.':return t('Editor\x20headings\x20will\x20appear\x20here\x20as\x20you\x20type.');case'No\x20headings\x20were\x20found\x20in\x20the\x20document.':return t('No\x20headings\x20were\x20found\x20in\x20the\x20document.');case'Table\x20of\x20contents':return t('Table\x20of\x20contents');default:return _0x4ab2d1;}}var C=class extends _0x23ed9c{constructor(_0x5afb92,_0x5a6f93=!0x1){super(_0x5afb92);const _0x35ab59=this['bindTemplate'],_0x1bc83b=_0x5a6f93?'['+L(_0x5afb92,'Empty\x20heading')+']':'';this['set']('text',''),this['set']('level',0x1),this['set']('isActive',!0x1),this['bind']('isEmpty')['to'](this,'text',_0x6e97a0=>!_0x6e97a0),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-document-outline__item',_0x35ab59['to']('level',_0x429e9c=>'ck-document-outline__item_level-'+_0x429e9c),_0x35ab59['if']('isActive','ck-document-outline__item_active'),_0x35ab59['if']('isEmpty','ck-document-outline__item_empty')],'title':_0x35ab59['to']('text')},'children':[{'text':_0x35ab59['to']('text',_0x453dc5=>_0x453dc5||_0x1bc83b)}],'on':{'click':_0x35ab59['to']('click')}});}},_=class extends _0x23ed9c{items;documentOutlineContainer;showEmptyHeadingText;constructor(_0x12d688,_0x3efe0b=!0x1,_0x2d9df9){super(_0x12d688),this['showEmptyHeadingText']=_0x3efe0b,this['set']('activeItemIndex',-0x1),this['documentOutlineContainer']=_0x2d9df9,this['items']=this['createCollection'](),this['items']['delegate']('click')['to'](this),this['on']('click',this['_handleItemClick']['bind'](this)),this['on']('change:activeItemIndex',(_0x4ec7c2,_0x36c2e3,_0x2a6b55,_0x2fab1e)=>{this['_setActiveItem'](_0x2fab1e,_0x2a6b55);}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-document-outline'],'dir':_0x12d688['contentLanguageDirection'],'data-document-outline-empty-placeholder':L(_0x12d688,'Editor\x20headings\x20will\x20appear\x20here\x20as\x20you\x20type.'),'tabindex':-0x1},'children':this['items']});}['sync'](_0x2e16bb){_0x2e16bb['forEach'](_0x41f352=>{'insert'==_0x41f352['type']?this['_insertItem'](_0x41f352['index'],..._0x41f352['values']):'delete'==_0x41f352['type']&&this['_deleteItem'](_0x41f352['index'],_0x41f352['howMany']);});}_setActiveItem(_0x30df9b,_0x2048e0){if(-0x1!==_0x30df9b){const _0x57e9c4=this['items']['get'](_0x30df9b);_0x57e9c4&&(_0x57e9c4['isActive']=!0x1);}-0x1!==_0x2048e0&&(this['items']['get'](_0x2048e0)['isActive']=!0x0,this['_scrollToItem'](_0x2048e0));}_insertItem(_0x2a5919,..._0x277fe1){const _0x3bc336=_0x277fe1['map']((_0x5b2852,_0x5937a6)=>{const _0x2ba1fc=new C(this['locale'],this['showEmptyHeadingText']);return _0x2ba1fc['text']=_0x5b2852['text'],_0x2ba1fc['level']=_0x5b2852['level'],_0x2a5919+_0x5937a6===this['activeItemIndex']&&(_0x2ba1fc['isActive']=!0x0),_0x2ba1fc;});this['items']['addMany'](_0x3bc336,_0x2a5919);}_deleteItem(_0x88b148,_0x4af88b){do{this['items']['remove'](_0x88b148);}while(--_0x4af88b);}_handleItemClick(_0x4b7b12){const _0x2eb266=this['items']['getIndex'](_0x4b7b12['source']);this['fire']('itemSelected',_0x2eb266);}_scrollToItem(_0xe5507c){_0x178eae(this['items']['get'](_0xe5507c)['element'],0x14,this['documentOutlineContainer']);}destroy(){super['destroy'](),this['element']['remove']();}},x=class extends _0x4bc148{['view'];_currentOutlineDefinitions;_updateActiveDefinitionFromViewportThrottled;static get['pluginName'](){return'DocumentOutlineUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x183ea3){super(_0x183ea3),this['view']=new _(_0x183ea3['locale'],this['editor']['config']['get']('documentOutline.showEmptyHeadings'),this['editor']['config']['get']('documentOutline.container')),this['_currentOutlineDefinitions']=[],this['_updateActiveDefinitionFromViewportThrottled']=_0x5a22da(this['_updateActiveDefinitionOnViewportChange']['bind'](this),0x64);}init(){const _0x29d69f=this['editor'],_0x4727bd=_0x29d69f['plugins']['get']('DocumentOutlineUtils');let _0x1dd843=!0x1;if(this['view']['render'](),this['editor']['ui']['focusTracker']['add'](this['view']['element']),!_0x29d69f['config']['get']('documentOutline.container'))throw new _0x3eb466('document-outline-container-not-provided',{'editor':_0x29d69f});_0x29d69f['config']['get']('documentOutline.container')['appendChild'](this['view']['element']),_0x4727bd['on']('change',this['_handleOutlineChange']['bind'](this)),_0x4727bd['on']('activeItemIndex',(_0x570adb,{index:_0xd4c213})=>this['_setActiveViewItem'](_0xd4c213)),this['view']['on']('itemSelected',(_0x27cfeb,_0x1b7550)=>{_0x1dd843=!0x0,this['_handleItemSelected'](_0x1b7550);}),this['view']['listenTo'](_0x16cf09['document'],'scroll',()=>{_0x1dd843?_0x1dd843=!0x1:this['_updateActiveDefinitionFromViewportThrottled']();},{'useCapture':!0x0}),this['view']['listenTo'](_0x16cf09['window'],'resize',this['_updateActiveDefinitionFromViewportThrottled'],{'useCapture':!0x0});}afterInit(){!async function(_0x1ba4a9){const _0x26cd3d='uizTdvyBIa4RKsnOYmEXGMfjehwJQqbPSCk7DtZgF58Lxl29Ho6cAUW1pV3Nr0',_0x534e09=0x793e0,_0xfd9e97={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0xee8cc0(_0xf4751a){const _0x5b5cea=new window['Promise'](_0x23206b=>{_0xf4751a['once']('ready',_0x23206b);}),_0x666ef0=window['Date']['now'](),_0xc63cbb=_0xf4751a['config']['get']('licenseKey');async function _0x46b08f(){let _0x419fc3,_0x37e038=null,_0x25afe8=null;try{return'GPL'==_0xc63cbb?'NotAllowed':(_0x419fc3=_0x551c90(),_0x419fc3?(_0x419fc3['usageEndpoint']&&(_0x25afe8=_0xb726f6(_0x419fc3['usageEndpoint'],_0x419fc3['jti'])),await _0x24fd98()?_0x5736fc()?_0x2c5f0c()?'Expired':_0x6b5750()?('evaluation'==_0x419fc3['licenseType']&&(_0x37e038=_0x426f49('EvaluationLimit')),await _0x2bb428()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x2c5f0c(){const _0x336a29=['evaluation','trial']['includes'](_0x419fc3['licenseType'])?_0x666ef0/0x3e8:0xe10*_0x534e09;return _0x419fc3['exp']<_0x336a29;}function _0x5736fc(){const _0xe752bc=_0x419fc3['features'];return!!_0xe752bc&&(!!_0xe752bc['includes']('*')||(!!_0xe752bc['includes']('DO')||(!!_0xe752bc['includes']('PP')||!(!_0xe752bc['includes']('TRILIUM')||!_0x1f1e30()))));}function _0x6b5750(){const _0x3a9209=_0x419fc3['licensedHosts'];if(!_0x3a9209||0x0==_0x3a9209['length'])return!0x0;const {hostname:_0x16c309}=new URL(window['location']['href']);if(_0x3a9209['includes'](_0x16c309))return!0x0;const _0xe9930f=_0x16c309['split']('.');return _0x3a9209['filter'](_0x245b03=>_0x245b03['includes']('*'))['map'](_0x53e87e=>_0x53e87e['split']('.'))['filter'](_0x3397af=>_0x3397af['length']<=_0xe9930f['length'])['map'](_0x5be6cd=>Array(_0xe9930f['length']-_0x5be6cd['length'])['fill']('*'===_0x5be6cd[0x0]?'*':'')['concat'](_0x5be6cd))['some'](_0x33a1e7=>_0xe9930f['every']((_0x4830dd,_0x8a8dd1)=>_0x33a1e7[_0x8a8dd1]===_0x4830dd||'*'===_0x33a1e7[_0x8a8dd1]));}function _0x2bb428(){return _0x37e038&&_0x25afe8?new window['Promise']((_0xcf2260,_0x374c7b)=>{_0x37e038['then'](_0xcf2260,_0x374c7b),_0x25afe8['then'](_0x260c60=>{'Valid'!=_0x260c60&&_0xcf2260(_0x260c60);},_0x374c7b);}):_0x37e038||_0x25afe8||'Valid';}}function _0xb726f6(_0x124909,_0x2f0135){return new window['Promise'](_0x143c1c=>{if(_0x1759be())return _0x143c1c('Valid');_0x53535e(),_0xf4751a['decorate']('_sendUsageRequest');let _0x419e01=!0x1;const _0xf4da83=_0x155df0();function _0x39735e(_0x380c8f){return!!_0x380c8f&&('object'==typeof _0x380c8f||'function'==typeof _0x380c8f)&&'function'==typeof _0x380c8f['then']&&'function'==typeof _0x380c8f['catch'];}function _0x1fe106(_0x7c94b9){_0x352f7(_0x7c94b9)['then'](_0x384ffa=>_0x384ffa&&'ok'==_0x384ffa['status']?_0x4819ef(_0x2c06ba(_0xf4da83+_0x2f0135))!=_0x384ffa['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x11d2cd=>(_0x51f17a(),_0x11d2cd),()=>{const _0x14cbcb=_0x885549();return null==_0x14cbcb?(_0x51f17a(),'Valid'):_0x666ef0-_0x14cbcb>0x240c8400?'UsageLimit':'Valid';})['then'](_0x143c1c)['catch'](()=>{_0x143c1c('UsageLimit');});const _0x3c6285=0x36ee80;function _0x51f17a(){const _0x4a5a48='llct-'+_0x4819ef(_0x2c06ba(_0x124909)),_0x77ba2=_0x539fed(_0x4819ef(window['Math']['ceil'](_0x666ef0/_0x3c6285)));window['localStorage']['setItem'](_0x4a5a48,_0x77ba2);}function _0x885549(){const _0xef7917='llct-'+_0x4819ef(_0x2c06ba(_0x124909)),_0x5a5606=window['localStorage']['getItem'](_0xef7917);return _0x5a5606?window['parseInt'](_0x539fed(_0x5a5606),0x10)*_0x3c6285:null;}function _0x352f7(_0xb9eabe){return new window['Promise']((_0x248457,_0x477277)=>{_0xb9eabe['then'](_0x248457,_0x477277),window['setTimeout'](_0x477277,0x1d4c0);});}}_0xf4751a['on']('_sendUsageRequest',(_0x2d5fee,_0x3c1dd0)=>{if(_0x3c1dd0[0x0]!=_0x124909)return _0x143c1c('UsageLimit');_0x3c1dd0[0x1]={..._0x3c1dd0[0x1],'requestId':_0xf4da83};},{'priority':'high'}),_0xf4751a['on']('_sendUsageRequest',_0x515bd5=>{_0x39735e(_0x515bd5['return'])&&(_0x419e01=!0x0,_0x1fe106(_0x515bd5['return']));},{'priority':'low'}),_0x5b5cea['then'](()=>{_0x419e01||_0x143c1c('UsageLimit');});});function _0x1759be(){return'auto'==_0xf4751a['editing']['view']['_overlayModeHint'];}function _0x53535e(){_0xf4751a['editing']['view']['_overlayModeHint']='auto';}}function _0x426f49(_0x29e2cf){const _0x281963=[new window['Promise'](_0x5d3478=>setTimeout(_0x5d3478,0x93ecc)),_0x5b5cea['then'](()=>new window['Promise'](_0x48693b=>{let _0x238a50=0x0;_0xf4751a['model']['on']('applyOperation',(_0x496a72,_0x1ff47d)=>{_0x1ff47d[0x0]['isDocumentOperation']&&_0x238a50++,0x5e8==_0x238a50&&(_0x48693b(),_0x496a72['off']());});}))];return window['Promise']['race'](_0x281963)['then'](()=>_0x29e2cf);}async function _0x4194c8(){await _0x5b5cea,_0xf4751a['model']['change']=_0x5ef420,_0xf4751a['model']['enqueueChange']=_0x5ef420,_0xf4751a['enableReadOnlyMode']('model');}function _0x1f1e30(){return window['glob']&&window['glob']['triliumVersion'];}function _0x2551ad(_0x280bab){const _0x57f0e6=_0x1259f1();_0xf4751a[_0x57f0e6]='documentOutlineLicenseKey'+_0x280bab,'Valid'!=_0x280bab&&_0x4194c8();}function _0x1259f1(){const _0x413a54=window['String'](window['performance']['now']())['replace']('.','');let _0x3b038c='u';for(let _0x317074=0x0;_0x317074<_0x413a54['length'];_0x317074+=0x2){let _0x5b1b4b=window['parseInt'](_0x413a54['substring'](_0x317074,_0x317074+0x2));_0x5b1b4b>=0x3e&&(_0x5b1b4b-=0x3e),_0x3b038c+=_0x26cd3d[_0x5b1b4b];}return _0x3b038c;}function _0x551c90(){const _0x1fcc9b=_0xc63cbb['split']('.');if(0x3!=_0x1fcc9b['length'])return null;return _0x157b59(_0x1fcc9b[0x1]);function _0x157b59(_0x3c9f){const _0x167ad2=_0x1a38f4(_0x3c9f);return _0x167ad2&&_0x3271b7()?_0x167ad2:null;function _0x3271b7(){const _0x1f469d=_0x167ad2['jti'],_0x2fe6bd=window['parseInt'](_0x1f469d['substring'](_0x1f469d['length']-0x8),0x10),_0x473004={..._0x167ad2,'jti':_0x1f469d['substring'](0x0,_0x1f469d['length']-0x8)};return delete _0x473004['vc'],_0x2c06ba(_0x473004)==_0x2fe6bd;}}}async function _0x24fd98(){let _0x1df3f2=!0x0;try{const [_0xc118d7,_0x4fc762,_0xa18c34]=_0xc63cbb['split']('.');return _0x4c80de(_0xc118d7),await _0x9fb5eb(_0xc118d7,_0x4fc762,_0xa18c34),_0x1df3f2;}catch{return!0x1;}function _0x4c80de(_0xde0ecd){const _0x3e8310=_0x1a38f4(_0xde0ecd);_0x3e8310&&'ES256'==_0x3e8310['alg']||(_0x1df3f2=!0x1);}async function _0x9fb5eb(_0x129fcb,_0x5de3d8,_0x349398){const _0x589ef4=window['Uint8Array']['from'](_0x35eac2(_0x349398),_0x2a7b27=>_0x2a7b27['charCodeAt'](0x0)),_0xf910a1=new window['TextEncoder']()['encode'](_0x129fcb+'.'+_0x5de3d8),_0x4474b2=window['crypto']['subtle'];if(!_0x4474b2)return;const _0x40879c=await _0x4474b2['importKey']('jwk',_0xfd9e97,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x4474b2['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x40879c,_0x589ef4,_0xf910a1)||(_0x1df3f2=!0x1);}}function _0x1a38f4(_0x401d8c){return _0x401d8c['startsWith']('ey')?JSON['parse'](_0x35eac2(_0x401d8c)):null;}function _0x35eac2(_0x927f33){return window['atob'](_0x927f33['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x2c06ba(_0x1e413c){let _0x4e7e18=0x1505;function _0x3135fe(_0xc1325f){for(let _0x234186=0x0;_0x234186<_0xc1325f['length'];_0x234186++){const _0x356769=_0xc1325f['charCodeAt'](_0x234186);_0x4e7e18=(_0x4e7e18<<0x5)+_0x4e7e18+_0x356769,_0x4e7e18&=_0x4e7e18;}}function _0x1951c6(_0x175948){Array['isArray'](_0x175948)?_0x175948['forEach'](_0x1951c6):_0x175948&&'object'==typeof _0x175948?Object['entries'](_0x175948)['sort']()['forEach'](([_0x57491e,_0x26a352])=>{_0x3135fe(_0x57491e),_0x1951c6(_0x26a352);}):_0x3135fe(window['String'](_0x175948));}return _0x1951c6(_0x1e413c),_0x4e7e18>>>0x0;}function _0x4819ef(_0x123ab5){return _0x123ab5['toString'](0x10)['padStart'](0x8,'0');}function _0x539fed(_0xde9f71){return _0xde9f71['split']('')['reverse']()['join']('');}function _0x5ef420(){}_0x2551ad(await _0x46b08f());}_0xee8cc0(_0x1ba4a9['editor']);}(this);}destroy(){super['destroy'](),this['view']['destroy'](),this['_updateActiveDefinitionFromViewportThrottled']['cancel']();}_handleOutlineChange(_0x471413,{outlineDefinitions:_0x431a5a,outlineChanges:_0x3addeb}){this['_currentOutlineDefinitions']=_0x431a5a,this['view']['sync'](_0x3addeb);}_setActiveViewItem(_0xd95f53){this['_currentOutlineDefinitions']['length']&&this['_currentOutlineDefinitions'][_0xd95f53]&&(this['view']['activeItemIndex']=_0xd95f53);}_handleItemSelected(_0x555a8d){const _0x4452b4=this['_currentOutlineDefinitions'][_0x555a8d]['modelElement'];this['editor']['model']['change'](_0x27f0a2=>{_0x27f0a2['setSelection'](_0x4452b4,0x0);}),this['editor']['editing']['view']['scrollToTheSelection']({'alignToTop':!0x0,'forceScroll':!0x0}),this['editor']['editing']['view']['focus'](),this['_setActiveViewItem'](_0x555a8d);}_updateActiveDefinitionOnViewportChange(){const _0x45130c=this['editor'];let _0x426b06;for(const _0x32449 of _0x45130c['model']['document']['getRootNames']()){const _0x11a53c=_0x45130c['editing']['view']['getDomRoot'](_0x32449),_0x560287=_0x11a53c&&new _0x20cbca(_0x11a53c)['getVisible']();if(_0x560287){const _0x5caab8=new _0x20cbca(_0x16cf09['window'])['getIntersection'](_0x560287);_0x5caab8&&(_0x426b06=_0x5caab8['top']+0.25*_0x5caab8['height']);}}if(void 0x0===_0x426b06)return;const _0x446dc1=k(_0x45130c['editing'],this['_currentOutlineDefinitions'],_0x426b06);_0x446dc1?this['_setActiveViewItem'](this['_currentOutlineDefinitions']['indexOf'](_0x446dc1)):this['_setActiveViewItem'](-0x1);}};function k(_0x2af73d,_0x495823,_0x3570bf,_0x191308=0x0,_0x278a8=_0x495823['length']-0x1){const _0x167a8e=Math['floor'](_0x191308+(_0x278a8-_0x191308)/0x2);if(_0x278a8>=_0x191308){const _0x2df581=_0x495823[_0x167a8e],_0x3db0b9=_0x2af73d['mapper']['toViewElement'](_0x2df581['modelElement']);if(!_0x3db0b9)return null;const _0x129e16=_0x2af73d['view']['domConverter']['mapViewToDom'](_0x3db0b9);return new _0x20cbca(_0x129e16)['bottom']>_0x3570bf?k(_0x2af73d,_0x495823,_0x3570bf,_0x191308,_0x167a8e-0x1):k(_0x2af73d,_0x495823,_0x3570bf,_0x167a8e+0x1,_0x278a8);}return _0x167a8e<0x0?null:_0x495823[_0x167a8e];}var E=class extends _0x4bc148{['licenseKey'];_licenseKeyCheckInterval;static get requires(){return[I,x];}static get['pluginName'](){return'DocumentOutline';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x394477=[this['editor']];for(const _0x5d80a9 of _0x394477){let _0x18b1ba;for(const _0x103f0e in _0x5d80a9){const _0x11a36a=_0x103f0e,_0x497444=_0x5d80a9[_0x11a36a];if('documentOutlineLicenseKeyValid'==_0x497444||'documentOutlineLicenseKeyInvalid'==_0x497444||'documentOutlineLicenseKeyExpired'==_0x497444||'documentOutlineLicenseKeyDomainLimit'==_0x497444||'documentOutlineLicenseKeyNotAllowed'==_0x497444||'documentOutlineLicenseKeyEvaluationLimit'==_0x497444||'documentOutlineLicenseKeyUsageLimit'==_0x497444){delete _0x5d80a9[_0x11a36a],_0x18b1ba=_0x497444,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'documentOutlineLicenseKeyInvalid'==_0x18b1ba&&_0x5d80a9['_showLicenseError']('invalid'),'documentOutlineLicenseKeyExpired'==_0x18b1ba&&_0x5d80a9['_showLicenseError']('expired'),'documentOutlineLicenseKeyDomainLimit'==_0x18b1ba&&_0x5d80a9['_showLicenseError']('domainLimit'),'documentOutlineLicenseKeyNotAllowed'==_0x18b1ba&&_0x5d80a9['_showLicenseError']('featureNotAllowed','DocumentOutline'),'documentOutlineLicenseKeyEvaluationLimit'==_0x18b1ba&&_0x5d80a9['_showLicenseError']('evaluationLimit'),'documentOutlineLicenseKeyUsageLimit'==_0x18b1ba&&_0x5d80a9['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},K=class extends _0x3420f8{execute(){this['editor']['model']['change'](_0x1d8a9b=>{this['editor']['model']['insertObject'](_0x1d8a9b['createElement']('tableOfContents'));});}['refresh'](){const _0x5b5461=this['editor']['model'],_0x55b195=_0x5b5461['document']['selection']['getFirstPosition']();this['isEnabled']=null!==(_0x55b195&&_0x5b5461['schema']['findAllowedParent'](_0x55b195,'tableOfContents'));}},A=class extends _0x4bc148{static get['pluginName'](){return'HeadingId';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}afterInit(){const _0x28031b=this['editor'];if(_0x28031b['config']['get']('headingId.modelAttributeName'))return;const {viewNames:_0x2b0ad6,modelNames:_0x2ebdad}=function(_0x167f03){const _0x107f81=new Set(['h1','h2','h3','h4','h5','h6']),_0x59d517=new Set(['heading1','heading2','heading3','heading4','heading5','heading6','htmlH1','htmlH2','htmlH3','htmlH4','htmlH5','htmlH6']);if(!_0x167f03)return{'viewNames':_0x107f81,'modelNames':_0x59d517};for(const _0x3be4bb of _0x167f03){if('paragraph'===_0x3be4bb['model'])continue;const _0x139097='string'==typeof _0x3be4bb['view']?_0x3be4bb['view']:_0x3be4bb['view']['name'];_0x107f81['add'](_0x139097),_0x59d517['add'](_0x3be4bb['model']);}return{'viewNames':_0x107f81,'modelNames':_0x59d517};}(this['editor']['config']['get']('heading.options'));for(const _0x3e5c73 of _0x2b0ad6)this['_customUpcastHeadingsConversion'](_0x3e5c73);for(const _0x234030 of _0x2ebdad)this['_customDataDowncastHeadingsConversion'](_0x234030),_0x28031b['model']['schema']['isRegistered'](_0x234030)&&_0x28031b['model']['schema']['extend'](_0x234030,{'allowAttributes':'headingId'});this['_registerHeadingIdAttributePostfixer'](_0x2ebdad);}_customUpcastHeadingsConversion(_0x17f161){this['editor']['conversion']['for']('upcast')['add'](_0x20c644=>_0x20c644['on']('element:'+_0x17f161,(_0x3e1b64,_0x40d53c,_0x266e61)=>{const {consumable:_0x2ead43,writer:_0x4def59}=_0x266e61,_0x20d59b=_0x40d53c['viewItem']['getAttribute']('id'),_0x5c6dcb=_0x40d53c['modelRange']?.['getContainedElement']();if(_0x5c6dcb)return _0x20d59b&&_0x20d59b['length']||_0x5c6dcb['hasAttribute']('headingId')?void(_0x2ead43['consume'](_0x40d53c['viewItem'],{'attributes':['id']})&&_0x4def59['setAttribute']('headingId',_0x20d59b,_0x5c6dcb)):(_0x2ead43['consume'](_0x40d53c['viewItem'],{'attributes':['id']}),void _0x4def59['setAttribute']('headingId',_0x155df0(),_0x5c6dcb));},{'priority':_0x40ce6e['get']('low')+0.5}));}_customDataDowncastHeadingsConversion(_0x21b708){this['editor']['conversion']['for']('downcast')['add'](_0x117395=>_0x117395['on']('attribute:headingId:'+_0x21b708,(_0x4df0f8,_0x4fff26,_0x573c5a)=>{if(!_0x573c5a['consumable']['consume'](_0x4fff26['item'],_0x4df0f8['name']))return;const _0x3ecad9=_0x4fff26['item']['getAttribute']('headingId'),_0x3f2bd0=_0x573c5a['mapper']['toViewElement'](_0x4fff26['item']);_0x573c5a['writer']['setAttribute']('id',_0x3ecad9,_0x3f2bd0);}));}_registerHeadingIdAttributePostfixer(_0x190445){const _0x2a8709=this['editor'],_0x53434f=new Set(),_0xe8d7f7=new Set();function _0x4247b9(_0x14b292,_0x4b59f2){const _0x46881f=_0x155df0();return _0xe8d7f7['add'](_0x46881f),_0x14b292['setAttribute']('headingId',_0x46881f,_0x4b59f2),_0x46881f;}function _0x6c89d8(_0x1abb23,_0x3ad314){_0x1abb23['removeAttribute']('headingId',_0x3ad314);}_0x2a8709['model']['document']['registerPostFixer'](_0x3626e4=>{const _0x3127f2=_0x2a8709['model']['document']['differ']['getChanges']();let _0x2d8a5c=!0x1;for(const _0x4dcfb7 of _0x3127f2)if('insert'==_0x4dcfb7['type']&&_0x4dcfb7['name']){if(_0x190445['has'](_0x4dcfb7['name'])){const _0x580d14=_0x4dcfb7['attributes']['get']('headingId');'string'==typeof _0x580d14?_0x53434f['has'](_0x580d14)?(_0x4247b9(_0x3626e4,_0x4dcfb7['position']['nodeAfter']),_0x2d8a5c=!0x0):_0xe8d7f7['add'](_0x580d14):(_0x4247b9(_0x3626e4,_0x4dcfb7['position']['nodeAfter']),_0x2d8a5c=!0x0);}else'string'==typeof _0x4dcfb7['attributes']['get']('headingId')&&(_0x6c89d8(_0x3626e4,_0x4dcfb7['position']['nodeAfter']),_0x2d8a5c=!0x0);}else{if('remove'==_0x4dcfb7['type']){const _0x76ed3a=_0x4dcfb7['attributes']['get']('headingId');'string'==typeof _0x76ed3a&&_0x53434f['delete'](_0x76ed3a);}}return _0x2d8a5c;}),_0x2a8709['model']['document']['on']('change',()=>{_0xe8d7f7['forEach'](_0x2b065c=>_0x53434f['add'](_0x2b065c)),_0xe8d7f7['clear']();});}},N=class extends _0x4bc148{static get['pluginName'](){return'TableOfContentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_0x431630,I,A];}_currentOutlineDefinitions;_tableOfContentsElements;_headingIdModelAttributeName;constructor(_0x396dee){super(_0x396dee),this['_currentOutlineDefinitions']=[],this['_tableOfContentsElements']=new Set(),this['_headingIdModelAttributeName']='headingId';}init(){const _0x3b2111=this['editor'],_0x28edd4=_0x3b2111['editing']['view']['document'];_0x3b2111['config']['get']('headingId.modelAttributeName')&&(this['_headingIdModelAttributeName']=_0x3b2111['config']['get']('headingId.modelAttributeName')),this['listenTo'](_0x28edd4,'click',(_0x2dfb0b,_0x23932f)=>{if(!_0x23932f['target'])return;const _0x32f8ab=_0x23932f['target']['getCustomProperty']('tableOfContentsHeadingIndex');Number['isInteger'](_0x32f8ab)&&(_0x23932f['domEvent']['preventDefault'](),_0x2dfb0b['stop'](),this['_handleScrollToHeading'](_0x32f8ab));},{'priority':'high','context':'$capture'}),this['_defineSchema'](),this['_defineConverters'](),_0x3b2111['commands']['add']('insertTableOfContents',new K(_0x3b2111));const _0x152eef=_0x3b2111['config']['get']('tableOfContents.headings');_0x152eef&&_0x152eef['length']?this['listenTo'](_0x3b2111['model']['document'],'change:data',()=>{this['_currentOutlineDefinitions']=this['_getOutlineDefinitions'](_0x152eef),this['_updateTableOfContentsElements']();}):_0x3b2111['plugins']['get']('DocumentOutlineUtils')['on']('change',(_0x358a70,_0x378f79)=>{this['_currentOutlineDefinitions']=_0x378f79['outlineDefinitions'],this['_updateTableOfContentsElements']();}),this['listenTo'](_0x3b2111['model']['document'],'change',()=>{this['_trackNewToCElements']();});}afterInit(){!async function(_0x5076d9){const _0x4056e7='DUA610emL4Q2kjVIvGMHgWT3uySnzPEw79oZJiCrbstcXKq85NhdfaFRxBlpOY',_0x183197=0x793e0,_0x5f04d7={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x54dd8f(_0x55cae9){const _0x280bf2=new window['Promise'](_0x2a04d0=>{_0x55cae9['once']('ready',_0x2a04d0);}),_0x2b1a12=window['Date']['now'](),_0x268319=_0x55cae9['config']['get']('licenseKey');async function _0x42e541(){let _0x52134e,_0x367f0=null,_0x141229=null;try{return'GPL'==_0x268319?'NotAllowed':(_0x52134e=_0x20a9ca(),_0x52134e?(_0x52134e['usageEndpoint']&&(_0x141229=_0xe77972(_0x52134e['usageEndpoint'],_0x52134e['jti'])),await _0x1fce6d()?_0x3c33bc()?_0x5b3a7b()?'Expired':_0x57d2ed()?('evaluation'==_0x52134e['licenseType']&&(_0x367f0=_0x1169f7('EvaluationLimit')),await _0x28aa0a()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x5b3a7b(){const _0x1a5b3b=['evaluation','trial']['includes'](_0x52134e['licenseType'])?_0x2b1a12/0x3e8:0xe10*_0x183197;return _0x52134e['exp']<_0x1a5b3b;}function _0x3c33bc(){const _0x500370=_0x52134e['features'];return!!_0x500370&&(!!_0x500370['includes']('*')||(!!_0x500370['includes']('TOC')||(!!_0x500370['includes']('PP')||!(!_0x500370['includes']('TRILIUM')||!_0xcc8ee0()))));}function _0x57d2ed(){const _0x286980=_0x52134e['licensedHosts'];if(!_0x286980||0x0==_0x286980['length'])return!0x0;const {hostname:_0x513917}=new URL(window['location']['href']);if(_0x286980['includes'](_0x513917))return!0x0;const _0x452d7a=_0x513917['split']('.');return _0x286980['filter'](_0x13c4b1=>_0x13c4b1['includes']('*'))['map'](_0x2e25c8=>_0x2e25c8['split']('.'))['filter'](_0x5c2b52=>_0x5c2b52['length']<=_0x452d7a['length'])['map'](_0x4020f9=>Array(_0x452d7a['length']-_0x4020f9['length'])['fill']('*'===_0x4020f9[0x0]?'*':'')['concat'](_0x4020f9))['some'](_0x4f92b3=>_0x452d7a['every']((_0x3dab78,_0x3dfb26)=>_0x4f92b3[_0x3dfb26]===_0x3dab78||'*'===_0x4f92b3[_0x3dfb26]));}function _0x28aa0a(){return _0x367f0&&_0x141229?new window['Promise']((_0x32d21c,_0x14429c)=>{_0x367f0['then'](_0x32d21c,_0x14429c),_0x141229['then'](_0x2e832e=>{'Valid'!=_0x2e832e&&_0x32d21c(_0x2e832e);},_0x14429c);}):_0x367f0||_0x141229||'Valid';}}function _0xe77972(_0x9473c,_0x50d420){return new window['Promise'](_0x1c0acd=>{if(_0x53b256())return _0x1c0acd('Valid');_0x5157aa(),_0x55cae9['decorate']('_sendUsageRequest');let _0x473484=!0x1;const _0x3573cf=_0x155df0();function _0x13422d(_0x47a800){return!!_0x47a800&&('object'==typeof _0x47a800||'function'==typeof _0x47a800)&&'function'==typeof _0x47a800['then']&&'function'==typeof _0x47a800['catch'];}function _0x29686a(_0x45739f){_0x584ccf(_0x45739f)['then'](_0x3c4a88=>_0x3c4a88&&'ok'==_0x3c4a88['status']?_0x1295c9(_0x1cb3e2(_0x3573cf+_0x50d420))!=_0x3c4a88['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x167d01=>(_0x5a2ee3(),_0x167d01),()=>{const _0x49fbbd=_0x65b40a();return null==_0x49fbbd?(_0x5a2ee3(),'Valid'):_0x2b1a12-_0x49fbbd>0x240c8400?'UsageLimit':'Valid';})['then'](_0x1c0acd)['catch'](()=>{_0x1c0acd('UsageLimit');});const _0x572134=0x36ee80;function _0x5a2ee3(){const _0x5ec74a='llct-'+_0x1295c9(_0x1cb3e2(_0x9473c)),_0x357f9e=_0x4139fc(_0x1295c9(window['Math']['ceil'](_0x2b1a12/_0x572134)));window['localStorage']['setItem'](_0x5ec74a,_0x357f9e);}function _0x65b40a(){const _0x21c048='llct-'+_0x1295c9(_0x1cb3e2(_0x9473c)),_0xa9c51a=window['localStorage']['getItem'](_0x21c048);return _0xa9c51a?window['parseInt'](_0x4139fc(_0xa9c51a),0x10)*_0x572134:null;}function _0x584ccf(_0x5b6e9c){return new window['Promise']((_0x5de36e,_0x23fe97)=>{_0x5b6e9c['then'](_0x5de36e,_0x23fe97),window['setTimeout'](_0x23fe97,0x1d4c0);});}}_0x55cae9['on']('_sendUsageRequest',(_0x4a8330,_0x27c3ed)=>{if(_0x27c3ed[0x0]!=_0x9473c)return _0x1c0acd('UsageLimit');_0x27c3ed[0x1]={..._0x27c3ed[0x1],'requestId':_0x3573cf};},{'priority':'high'}),_0x55cae9['on']('_sendUsageRequest',_0x43edfc=>{_0x13422d(_0x43edfc['return'])&&(_0x473484=!0x0,_0x29686a(_0x43edfc['return']));},{'priority':'low'}),_0x280bf2['then'](()=>{_0x473484||_0x1c0acd('UsageLimit');});});function _0x53b256(){return'auto'==_0x55cae9['editing']['view']['_overlayModeHint'];}function _0x5157aa(){_0x55cae9['editing']['view']['_overlayModeHint']='auto';}}function _0x1169f7(_0x4fe2ff){const _0x1b5cfc=[new window['Promise'](_0x41dd95=>setTimeout(_0x41dd95,0x93ecc)),_0x280bf2['then'](()=>new window['Promise'](_0x201dac=>{let _0x47b931=0x0;_0x55cae9['model']['on']('applyOperation',(_0x16dd4d,_0x3c9604)=>{_0x3c9604[0x0]['isDocumentOperation']&&_0x47b931++,0x5e8==_0x47b931&&(_0x201dac(),_0x16dd4d['off']());});}))];return window['Promise']['race'](_0x1b5cfc)['then'](()=>_0x4fe2ff);}async function _0x4ea2ed(){await _0x280bf2,_0x55cae9['model']['change']=_0x146e3c,_0x55cae9['model']['enqueueChange']=_0x146e3c,_0x55cae9['enableReadOnlyMode']('model');}function _0xcc8ee0(){return window['glob']&&window['glob']['triliumVersion'];}function _0x3789f5(_0x20bcd1){const _0x415f4a=_0x495aba();_0x55cae9[_0x415f4a]='tableOfContentsLicenseKey'+_0x20bcd1,'Valid'!=_0x20bcd1&&_0x4ea2ed();}function _0x495aba(){const _0x4ebb78=window['String'](window['performance']['now']())['replace']('.','');let _0x3a46b1='D';for(let _0x4f1d35=0x0;_0x4f1d35<_0x4ebb78['length'];_0x4f1d35+=0x2){let _0x22dc70=window['parseInt'](_0x4ebb78['substring'](_0x4f1d35,_0x4f1d35+0x2));_0x22dc70>=0x3e&&(_0x22dc70-=0x3e),_0x3a46b1+=_0x4056e7[_0x22dc70];}return _0x3a46b1;}function _0x20a9ca(){const _0x4ac418=_0x268319['split']('.');if(0x3!=_0x4ac418['length'])return null;return _0x4d36d0(_0x4ac418[0x1]);function _0x4d36d0(_0x303cac){const _0x3e9fd6=_0xc50990(_0x303cac);return _0x3e9fd6&&_0x3918f1()?_0x3e9fd6:null;function _0x3918f1(){const _0x352d3c=_0x3e9fd6['jti'],_0x1927a4=window['parseInt'](_0x352d3c['substring'](_0x352d3c['length']-0x8),0x10),_0x9230e6={..._0x3e9fd6,'jti':_0x352d3c['substring'](0x0,_0x352d3c['length']-0x8)};return delete _0x9230e6['vc'],_0x1cb3e2(_0x9230e6)==_0x1927a4;}}}async function _0x1fce6d(){let _0x323926=!0x0;try{const [_0x2f394d,_0x692dd4,_0x5d0488]=_0x268319['split']('.');return _0x1db1d4(_0x2f394d),await _0x15b5ab(_0x2f394d,_0x692dd4,_0x5d0488),_0x323926;}catch{return!0x1;}function _0x1db1d4(_0x25b08e){const _0x2b6570=_0xc50990(_0x25b08e);_0x2b6570&&'ES256'==_0x2b6570['alg']||(_0x323926=!0x1);}async function _0x15b5ab(_0x3dea4c,_0x137865,_0x3e2f14){const _0x36f558=window['Uint8Array']['from'](_0x2aa9e(_0x3e2f14),_0x839311=>_0x839311['charCodeAt'](0x0)),_0x3350b9=new window['TextEncoder']()['encode'](_0x3dea4c+'.'+_0x137865),_0x179266=window['crypto']['subtle'];if(!_0x179266)return;const _0x71d1cd=await _0x179266['importKey']('jwk',_0x5f04d7,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x179266['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x71d1cd,_0x36f558,_0x3350b9)||(_0x323926=!0x1);}}function _0xc50990(_0xb5c55a){return _0xb5c55a['startsWith']('ey')?JSON['parse'](_0x2aa9e(_0xb5c55a)):null;}function _0x2aa9e(_0x3b067f){return window['atob'](_0x3b067f['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x1cb3e2(_0x5a9c8a){let _0x59dd01=0x1505;function _0x4dbc2f(_0x42e493){for(let _0xe5c07b=0x0;_0xe5c07b<_0x42e493['length'];_0xe5c07b++){const _0x422aef=_0x42e493['charCodeAt'](_0xe5c07b);_0x59dd01=(_0x59dd01<<0x5)+_0x59dd01+_0x422aef,_0x59dd01&=_0x59dd01;}}function _0x4b2f65(_0x3f3044){Array['isArray'](_0x3f3044)?_0x3f3044['forEach'](_0x4b2f65):_0x3f3044&&'object'==typeof _0x3f3044?Object['entries'](_0x3f3044)['sort']()['forEach'](([_0x153cc8,_0x38a431])=>{_0x4dbc2f(_0x153cc8),_0x4b2f65(_0x38a431);}):_0x4dbc2f(window['String'](_0x3f3044));}return _0x4b2f65(_0x5a9c8a),_0x59dd01>>>0x0;}function _0x1295c9(_0x207dfe){return _0x207dfe['toString'](0x10)['padStart'](0x8,'0');}function _0x4139fc(_0x1b8f5d){return _0x1b8f5d['split']('')['reverse']()['join']('');}function _0x146e3c(){}_0x3789f5(await _0x42e541());}_0x54dd8f(_0x5076d9['editor']);}(this);}_updateTableOfContentsElements(){this['_tableOfContentsElements']['forEach'](_0xa32183=>{'$graveyard'!==_0xa32183['rootName']&&this['editor']['editing']['reconvertItem'](_0xa32183);});}_trackNewToCElements(){for(const _0x2d00e9 of this['editor']['model']['document']['differ']['getChanges']({'includeChangesInGraveyard':!0x0})){if('insert'!==_0x2d00e9['type']||'tableOfContents'!==_0x2d00e9['name'])return;this['_tableOfContentsElements']['add'](_0x2d00e9['position']['nodeAfter']);}}_getOutlineDefinitions(_0x464416){const _0x215e19=this['editor'],_0x2962bf=[];for(const _0x429d6f of _0x215e19['model']['document']['getRootNames']())_0x2b949d(_0x215e19['model']['document']['getRoot'](_0x429d6f));function _0x2b949d(_0x409839){for(const _0x4b13a5 of _0x409839['getChildren']())_0x4b13a5['is']('element')&&(_0x464416['includes'](_0x4b13a5['name'])&&_0x2962bf['push']({'level':_0x464416['indexOf'](_0x4b13a5['name'])+0x1,'text':b(_0x4b13a5),'modelElement':_0x4b13a5}),_0x2b949d(_0x4b13a5));}return _0x2962bf;}['_defineSchema'](){this['editor']['model']['schema']['register']('tableOfContents',{'inheritAllFrom':'$blockObject'});}_defineConverters(){const _0x2a9f3e=this['editor']['conversion'];_0x2a9f3e['for']('upcast')['elementToElement']({'model':'tableOfContents','view':{'name':'div','classes':'table-of-contents'}}),_0x2a9f3e['for']('dataDowncast')['elementToStructure']({'model':'tableOfContents','view':(_0x84bb6,{writer:_0x425990})=>this['_createTableOfContents'](_0x425990,!0x0)}),_0x2a9f3e['for']('editingDowncast')['elementToStructure']({'model':'tableOfContents','view':(_0x5d61f7,{writer:_0x29e5c4})=>{this['_tableOfContentsElements']['add'](_0x5d61f7);const _0x1bd3a9=this['_createTableOfContents'](_0x29e5c4);return _0x3afa56(_0x1bd3a9,_0x29e5c4,{'label':L(this['editor']['locale'],'Table\x20of\x20contents')});}}),this['editor']['data']['registerRawContentMatcher']({'name':'div','classes':'table-of-contents'}),this['editor']['editing']['mapper']['on']('viewToModelPosition',this['_redirectMapper'](),{'priority':'high'});}_createTableOfContents(_0x4f145e,_0x358440=!0x1){const {locale:_0x29b4e1}=this['editor'],_0xe10e14=_0x4f145e['createContainerElement']('div',{'class':'table-of-contents'+(0x0===this['_currentOutlineDefinitions']['length']?'\x20table-of-contents_empty':''),...!_0x358440&&{'data-table-of-contents-label':L(_0x29b4e1,'Table\x20of\x20contents')}});0x0===this['_currentOutlineDefinitions']['length']&&!0x1===_0x358440&&_0x4f145e['insert'](_0x4f145e['createPositionAt'](_0xe10e14,'end'),_0x4f145e['createContainerElement']('p',{'class':'table-of-contents__placeholder'},[_0x4f145e['createText'](L(_0x29b4e1,'No\x20headings\x20were\x20found\x20in\x20the\x20document.'))]));const _0x3a69d2=_0x358440?'':'['+L(_0x29b4e1,'Empty\x20heading')+']';let _0x4790cd=_0xe10e14;return this['_currentOutlineDefinitions']['forEach']((_0x12ed80,_0x4128a0,_0x39977c)=>{const _0x1941f4=this['editor']['model']['hasContent'](_0x12ed80['modelElement'],{'ignoreWhitespaces':!0x0}),_0x3568c8=_0x1941f4?_0x12ed80['text']:_0x3a69d2,_0x582570=_0x12ed80['modelElement']['getAttribute'](this['_headingIdModelAttributeName']),_0x39e2a4=_0x4f145e['createContainerElement']('a',{'href':'#'+_0x582570,...!_0x358440&&{'tabindex':'-1'}},[_0x4f145e['createText'](_0x3568c8)]),_0x50338e=this['editor']['config']['get']('documentOutline.showEmptyHeadings');_0x4f145e['setCustomProperty']('tableOfContentsHeadingIndex',_0x4128a0,_0x39e2a4);const _0x4c8fe7=_0x4f145e['createContainerElement']('li',null,[_0x1941f4||!_0x358440&&_0x50338e?_0x39e2a4:_0x4f145e['createText']('')]),_0x4624e5=_0x4128a0?_0x39977c[_0x4128a0-0x1]['level']:0x0,_0x28b7a6=Math['abs'](_0x12ed80['level']-_0x4624e5);if(_0x12ed80['level']>_0x4624e5){const _0x318504=D(_0x4c8fe7,_0x28b7a6,_0x4f145e);_0x4f145e['insert'](_0x4f145e['createPositionAt'](_0x4790cd,'end'),_0x318504);}else{const _0x1dc302=function(_0x4c9f9b,_0x5bc1c9){return _0x4c9f9b['getAncestors']({'includeSelf':!0x0,'parentFirst':!0x0})['filter'](_0x6f3443=>_0x6f3443['is']('element','ol'))[_0x5bc1c9];}(_0x4790cd,_0x28b7a6);_0x4f145e['insert'](_0x4f145e['createPositionAt'](_0x1dc302,'end'),_0x4c8fe7);}_0x4790cd=_0x4c8fe7;}),_0xe10e14;}['_handleScrollToHeading'](_0x1a1855){const _0x1c4553=this['_currentOutlineDefinitions'][_0x1a1855]['modelElement'];this['editor']['model']['change'](_0x55ef45=>{_0x55ef45['setSelection'](_0x1c4553,0x0);}),this['editor']['editing']['view']['scrollToTheSelection']({'alignToTop':!0x0,'forceScroll':!0x0});}_redirectMapper(){return(_0x3038b0,_0x420e02)=>{const _0x34b95b=_0x420e02['mapper'],_0x439f2f=_0x34b95b['findMappedViewAncestor'](_0x420e02['viewPosition']),_0x82da4d=_0x34b95b['toModelElement'](_0x439f2f);_0x82da4d['is']('element','tableOfContents')&&(_0x420e02['modelPosition']=this['editor']['model']['createPositionAt'](_0x82da4d,0x0),_0x3038b0['stop']());};}};function D(_0x494e6c,_0x516eb9,_0x2d55a9){return 0x1===_0x516eb9?_0x2d55a9['createContainerElement']('ol',null,[_0x494e6c]):_0x2d55a9['createContainerElement']('ol',null,[_0x2d55a9['createContainerElement']('li',null,[D(_0x494e6c,_0x516eb9-0x1,_0x2d55a9)])]);}var H=class extends _0x4bc148{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'TableOfContentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const _0x52351f=this['editor'];_0x52351f['ui']['componentFactory']['add']('tableOfContents',()=>{const _0x2ef53f=this['_createButton'](_0x5dada1);return _0x2ef53f['tooltip']=!0x0,_0x2ef53f;}),_0x52351f['ui']['componentFactory']['add']('menuBar:tableOfContents',()=>this['_createButton'](_0x4d4856)),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x15c9d8=[this['editor']];for(const _0x1713fa of _0x15c9d8){let _0x27bb9f;for(const _0x553e83 in _0x1713fa){const _0xe6b52b=_0x553e83,_0xe96967=_0x1713fa[_0xe6b52b];if('tableOfContentsLicenseKeyValid'==_0xe96967||'tableOfContentsLicenseKeyInvalid'==_0xe96967||'tableOfContentsLicenseKeyExpired'==_0xe96967||'tableOfContentsLicenseKeyDomainLimit'==_0xe96967||'tableOfContentsLicenseKeyNotAllowed'==_0xe96967||'tableOfContentsLicenseKeyEvaluationLimit'==_0xe96967||'tableOfContentsLicenseKeyUsageLimit'==_0xe96967){delete _0x1713fa[_0xe6b52b],_0x27bb9f=_0xe96967,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'tableOfContentsLicenseKeyInvalid'==_0x27bb9f&&_0x1713fa['_showLicenseError']('invalid'),'tableOfContentsLicenseKeyExpired'==_0x27bb9f&&_0x1713fa['_showLicenseError']('expired'),'tableOfContentsLicenseKeyDomainLimit'==_0x27bb9f&&_0x1713fa['_showLicenseError']('domainLimit'),'tableOfContentsLicenseKeyNotAllowed'==_0x27bb9f&&_0x1713fa['_showLicenseError']('featureNotAllowed','TableOfContents'),'tableOfContentsLicenseKeyEvaluationLimit'==_0x27bb9f&&_0x1713fa['_showLicenseError']('evaluationLimit'),'tableOfContentsLicenseKeyUsageLimit'==_0x27bb9f&&_0x1713fa['_showLicenseError']('usageLimit');}},0x3e8);}_createButton(_0x55806d){const _0x1f2e5d=this['editor'],_0x36ad95=_0x1f2e5d['locale'],_0x318168=_0x1f2e5d['commands']['get']('insertTableOfContents'),_0x204ed1=new _0x55806d(_0x36ad95);return _0x204ed1['set']({'label':L(_0x36ad95,'Table\x20of\x20contents'),'icon':_0x2515a9}),_0x204ed1['bind']('isEnabled')['to'](_0x318168,'isEnabled'),this['listenTo'](_0x204ed1,'execute',()=>{_0x1f2e5d['execute']('insertTableOfContents'),_0x1f2e5d['editing']['view']['focus']();}),_0x204ed1;}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},P=class extends _0x4bc148{static get requires(){return[N,H];}static get['pluginName'](){return'TableOfContents';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{E as DocumentOutline,x as DocumentOutlineUI,I as DocumentOutlineUtils,A as HeadingId,P as TableOfContents,K as TableOfContentsCommand,N as TableOfContentsEditing,H as TableOfContentsUI};
|
|
23
|
+
import{Command as _0x337f30,Plugin as _0x5dedd1}from'@ckeditor/ckeditor5-core';import{debounce as _0x4e364d,throttle as _0x2e59c0}from'es-toolkit/compat';import{ModelText as _0x354ef4,ModelTreeWalker as _0x3b9ba4}from'@ckeditor/ckeditor5-engine';import{CKEditorError as _0x3f1d81,Rect as _0x23a68f,diff as _0x336bee,diffToChanges as _0x5a04c3,global as _0x1f8121,priorities as _0x3ee460,scrollAncestorsToShowTarget as _0x18037a,uid as _0x381f74}from'@ckeditor/ckeditor5-utils';import{ButtonView as _0x2db7e6,MenuBarMenuListItemButtonView as _0x568abd,View as _0x1f9360}from'@ckeditor/ckeditor5-ui';import{Widget as _0x351635,toWidget as _0x242937}from'@ckeditor/ckeditor5-widget';import{IconTableOfContents as _0x19a9cf}from'@ckeditor/ckeditor5-icons';function b(_0x5408cd){let _0x30a96c='';for(const _0x4d9366 of _0x5408cd['getChildren']())_0x4d9366 instanceof _0x354ef4&&(_0x30a96c+=_0x4d9366['data']);return _0x30a96c;}var I=class extends _0x5dedd1{static get['pluginName'](){return'DocumentOutlineUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_headingNames']=[];init(){const _0x5eee42=this['editor'];this['_headingNames']=this['_getHeadingNames']();let _0x516b3c=[];_0x5eee42['model']['document']['on']('change',_0x4e364d(()=>{const _0x59f81c=_0x516b3c;_0x516b3c=this['_getOutlineDefinitions']();const _0x490694=_0x336bee(_0x59f81c,_0x516b3c,(_0x3a348b,_0x5ea41b)=>_0x3a348b['level']===_0x5ea41b['level']&&_0x3a348b['text']===_0x5ea41b['text']&&_0x3a348b['modelElement']===_0x5ea41b['modelElement']),_0x5cfeb0=_0x5a04c3(_0x490694,_0x516b3c),_0x19dd48=this['_getActiveHeading'](),_0x4e61c9=_0x516b3c['findIndex'](_0x16806d=>_0x16806d['modelElement']===_0x19dd48);_0x5cfeb0['length']&&this['fire']('change',{'outlineDefinitions':_0x516b3c,'activeItemIndex':_0x4e61c9,'outlineChanges':_0x5cfeb0}),this['fire']('activeItemIndex',{'index':_0x4e61c9});},0xfa,{'leading':!0x0,'trailing':!0x0}));}afterInit(){this['_headingNames']['length']||this['_deriveHeadingElementsFromConversion']();}_getOutlineDefinitions(){const _0x4c943c=this['editor'],_0x1cbeec=[],_0x3bf4c7=this['_headingNames'];for(const _0x44f2ff of _0x4c943c['model']['document']['getRootNames']())_0x5968d6(_0x4c943c['model']['document']['getRoot'](_0x44f2ff));function _0x5968d6(_0x401771){for(const _0x455e22 of _0x401771['getChildren']())_0x455e22['is']('element')&&(_0x3bf4c7['includes'](_0x455e22['name'])&&_0x1cbeec['push']({'level':_0x3bf4c7['indexOf'](_0x455e22['name'])+0x1,'text':b(_0x455e22),'modelElement':_0x455e22}),_0x5968d6(_0x455e22));}return _0x1cbeec;}_getActiveHeading(){const _0x576e75=this['editor']['model']['document']['selection']['getFirstPosition'](),_0x359498=new _0x3b9ba4({'direction':'backward','startPosition':_0x576e75});for(const _0x362032 of _0x359498)if(_0x362032['item']['is']('element')&&this['_headingNames']['includes'](_0x362032['item']['name']))return _0x362032['item'];}_getHeadingNames(){const _0x33977c=this['editor']['config']['get']('documentOutline.headings');return _0x33977c||function(_0x429323){const _0x2bc65b=_0x429323['config']['get']('heading.options');return _0x2bc65b?_0x2bc65b['reduce']((_0x534138,_0xfa939f)=>('paragraph'!==_0xfa939f['model']&&_0x534138['push'](_0xfa939f['model']),_0x534138),[]):_0x429323['plugins']['has']('GeneralHtmlSupport')?['htmlH1','htmlH2','htmlH3','htmlH4','htmlH5','htmlH6']:[];}(this['editor']);}_deriveHeadingElementsFromConversion(){const _0x141a32=this['editor'],_0x348f30=['h1','h2','h3','h4','h5','h6'],_0x2f8f55=[];for(const _0x100a6d of _0x348f30){const _0x5a3e17=_0x141a32['editing']['view']['domConverter']['domToView'](document['createElement'](_0x100a6d)),_0x500869=_0x141a32['data']['toModel'](_0x5a3e17)['getChild'](0x0);_0x500869?.['is']('element')&&_0x2f8f55['push'](_0x500869['name']);}this['_headingNames']=_0x2f8f55;}};function L(_0x533173,_0x345146){const t=_0x533173['t'];switch(_0x345146){case'Empty\x20heading':return t('Empty\x20heading');case'Editor\x20headings\x20will\x20appear\x20here\x20as\x20you\x20type.':return t('Editor\x20headings\x20will\x20appear\x20here\x20as\x20you\x20type.');case'No\x20headings\x20were\x20found\x20in\x20the\x20document.':return t('No\x20headings\x20were\x20found\x20in\x20the\x20document.');case'Table\x20of\x20contents':return t('Table\x20of\x20contents');default:return _0x345146;}}var C=class extends _0x1f9360{constructor(_0x230ef6,_0x6b984d=!0x1){super(_0x230ef6);const _0x5332af=this['bindTemplate'],_0x386878=_0x6b984d?'['+L(_0x230ef6,'Empty\x20heading')+']':'';this['set']('text',''),this['set']('level',0x1),this['set']('isActive',!0x1),this['bind']('isEmpty')['to'](this,'text',_0x418a86=>!_0x418a86),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-document-outline__item',_0x5332af['to']('level',_0x570588=>'ck-document-outline__item_level-'+_0x570588),_0x5332af['if']('isActive','ck-document-outline__item_active'),_0x5332af['if']('isEmpty','ck-document-outline__item_empty')],'title':_0x5332af['to']('text')},'children':[{'text':_0x5332af['to']('text',_0x86b83b=>_0x86b83b||_0x386878)}],'on':{'click':_0x5332af['to']('click')}});}},_=class extends _0x1f9360{items;documentOutlineContainer;showEmptyHeadingText;constructor(_0x56af95,_0x52410d=!0x1,_0xd678a){super(_0x56af95),this['showEmptyHeadingText']=_0x52410d,this['set']('activeItemIndex',-0x1),this['documentOutlineContainer']=_0xd678a,this['items']=this['createCollection'](),this['items']['delegate']('click')['to'](this),this['on']('click',this['_handleItemClick']['bind'](this)),this['on']('change:activeItemIndex',(_0x5cdf99,_0x340122,_0x38a5a5,_0x54da19)=>{this['_setActiveItem'](_0x54da19,_0x38a5a5);}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-document-outline'],'dir':_0x56af95['contentLanguageDirection'],'data-document-outline-empty-placeholder':L(_0x56af95,'Editor\x20headings\x20will\x20appear\x20here\x20as\x20you\x20type.'),'tabindex':-0x1},'children':this['items']});}['sync'](_0x1b561a){_0x1b561a['forEach'](_0x3f305b=>{'insert'==_0x3f305b['type']?this['_insertItem'](_0x3f305b['index'],..._0x3f305b['values']):'delete'==_0x3f305b['type']&&this['_deleteItem'](_0x3f305b['index'],_0x3f305b['howMany']);});}_setActiveItem(_0x377740,_0x80408a){if(-0x1!==_0x377740){const _0x4b9dc0=this['items']['get'](_0x377740);_0x4b9dc0&&(_0x4b9dc0['isActive']=!0x1);}-0x1!==_0x80408a&&(this['items']['get'](_0x80408a)['isActive']=!0x0,this['_scrollToItem'](_0x80408a));}_insertItem(_0x395984,..._0x6205f3){const _0x1a2b07=_0x6205f3['map']((_0x3dcbcd,_0x319b81)=>{const _0x4914b9=new C(this['locale'],this['showEmptyHeadingText']);return _0x4914b9['text']=_0x3dcbcd['text'],_0x4914b9['level']=_0x3dcbcd['level'],_0x395984+_0x319b81===this['activeItemIndex']&&(_0x4914b9['isActive']=!0x0),_0x4914b9;});this['items']['addMany'](_0x1a2b07,_0x395984);}_deleteItem(_0xf5091f,_0x1798cc){do{this['items']['remove'](_0xf5091f);}while(--_0x1798cc);}_handleItemClick(_0x103f0f){const _0x1d260d=this['items']['getIndex'](_0x103f0f['source']);this['fire']('itemSelected',_0x1d260d);}_scrollToItem(_0x265587){_0x18037a(this['items']['get'](_0x265587)['element'],0x14,this['documentOutlineContainer']);}destroy(){super['destroy'](),this['element']['remove']();}},x=class extends _0x5dedd1{['view'];_currentOutlineDefinitions;_updateActiveDefinitionFromViewportThrottled;static get['pluginName'](){return'DocumentOutlineUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x51ce72){super(_0x51ce72),this['view']=new _(_0x51ce72['locale'],this['editor']['config']['get']('documentOutline.showEmptyHeadings'),this['editor']['config']['get']('documentOutline.container')),this['_currentOutlineDefinitions']=[],this['_updateActiveDefinitionFromViewportThrottled']=_0x2e59c0(this['_updateActiveDefinitionOnViewportChange']['bind'](this),0x64);}init(){const _0x408d76=this['editor'],_0x316321=_0x408d76['plugins']['get']('DocumentOutlineUtils');let _0x56d177=!0x1;if(this['view']['render'](),this['editor']['ui']['focusTracker']['add'](this['view']['element']),!_0x408d76['config']['get']('documentOutline.container'))throw new _0x3f1d81('document-outline-container-not-provided',{'editor':_0x408d76});_0x408d76['config']['get']('documentOutline.container')['appendChild'](this['view']['element']),_0x316321['on']('change',this['_handleOutlineChange']['bind'](this)),_0x316321['on']('activeItemIndex',(_0x50d561,{index:_0x54bb8c})=>this['_setActiveViewItem'](_0x54bb8c)),this['view']['on']('itemSelected',(_0x170487,_0x21ee0b)=>{_0x56d177=!0x0,this['_handleItemSelected'](_0x21ee0b);}),this['view']['listenTo'](_0x1f8121['document'],'scroll',()=>{_0x56d177?_0x56d177=!0x1:this['_updateActiveDefinitionFromViewportThrottled']();},{'useCapture':!0x0}),this['view']['listenTo'](_0x1f8121['window'],'resize',this['_updateActiveDefinitionFromViewportThrottled'],{'useCapture':!0x0});}afterInit(){!async function(_0x23cb30){const _0x3d887c='uizTdvyBIa4RKsnOYmEXGMfjehwJQqbPSCk7DtZgF58Lxl29Ho6cAUW1pV3Nr0',_0x14ef7=0x793f8,_0x4bd4fb={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x93204c(_0x197b8b){const _0x3a6ac5=new window['Promise'](_0x445a53=>{_0x197b8b['once']('ready',_0x445a53);}),_0x5e6ded=window['Date']['now'](),_0xaa2c72=_0x197b8b['config']['get']('licenseKey');async function _0x517e90(){let _0x557676,_0x5c107a=null,_0x315cf7=null;try{return'GPL'==_0xaa2c72?'NotAllowed':(_0x557676=_0x74502(),_0x557676?(_0x557676['usageEndpoint']&&(_0x315cf7=_0x345ece(_0x557676['usageEndpoint'],_0x557676['jti'])),await _0x14629f()?_0x1959cf()?_0x376d16()?'Expired':_0x26ed5f()?('evaluation'==_0x557676['licenseType']&&(_0x5c107a=_0x1f907f('EvaluationLimit')),await _0x13163e()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x376d16(){const _0xc0cb21=['evaluation','trial']['includes'](_0x557676['licenseType'])?_0x5e6ded/0x3e8:0xe10*_0x14ef7;return _0x557676['exp']<_0xc0cb21;}function _0x1959cf(){const _0x83bf19=_0x557676['features'];return!!_0x83bf19&&(!!_0x83bf19['includes']('*')||(!!_0x83bf19['includes']('DO')||(!!_0x83bf19['includes']('PP')||!(!_0x83bf19['includes']('TRILIUM')||!_0x33daa3()))));}function _0x26ed5f(){const _0x55ea1d=_0x557676['licensedHosts'];if(!_0x55ea1d||0x0==_0x55ea1d['length'])return!0x0;const {hostname:_0x1b55b0}=new URL(window['location']['href']);if(_0x55ea1d['includes'](_0x1b55b0))return!0x0;const _0x2de5bc=_0x1b55b0['split']('.');return _0x55ea1d['filter'](_0x30d100=>_0x30d100['includes']('*'))['map'](_0x36ced3=>_0x36ced3['split']('.'))['filter'](_0x4b419c=>_0x4b419c['length']<=_0x2de5bc['length'])['map'](_0x68e35b=>Array(_0x2de5bc['length']-_0x68e35b['length'])['fill']('*'===_0x68e35b[0x0]?'*':'')['concat'](_0x68e35b))['some'](_0x1a2fb8=>_0x2de5bc['every']((_0x30d5cd,_0x436457)=>_0x1a2fb8[_0x436457]===_0x30d5cd||'*'===_0x1a2fb8[_0x436457]));}function _0x13163e(){return _0x5c107a&&_0x315cf7?new window['Promise']((_0x2a189b,_0xee6ac1)=>{_0x5c107a['then'](_0x2a189b,_0xee6ac1),_0x315cf7['then'](_0x327910=>{'Valid'!=_0x327910&&_0x2a189b(_0x327910);},_0xee6ac1);}):_0x5c107a||_0x315cf7||'Valid';}}function _0x345ece(_0x31ef13,_0x53c48f){return new window['Promise'](_0x1a3a76=>{if(_0x474a1())return _0x1a3a76('Valid');_0x254bc5(),_0x197b8b['decorate']('_sendUsageRequest');let _0x378507=!0x1;const _0x1ed0cc=_0x381f74();function _0x33bfba(_0x564117){return!!_0x564117&&('object'==typeof _0x564117||'function'==typeof _0x564117)&&'function'==typeof _0x564117['then']&&'function'==typeof _0x564117['catch'];}function _0x2c64b5(_0x209edd){_0x40b7d5(_0x209edd)['then'](_0x28d004=>_0x28d004&&'ok'==_0x28d004['status']?_0x3965f7(_0x271b62(_0x1ed0cc+_0x53c48f))!=_0x28d004['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x181bcb=>(_0x1c9000(),_0x181bcb),()=>{const _0x24bda1=_0x4a9cc5();return null==_0x24bda1?(_0x1c9000(),'Valid'):_0x5e6ded-_0x24bda1>0x240c8400?'UsageLimit':'Valid';})['then'](_0x1a3a76)['catch'](()=>{_0x1a3a76('UsageLimit');});const _0x4a8911=0x36ee80;function _0x1c9000(){const _0x370526='llct-'+_0x3965f7(_0x271b62(_0x31ef13)),_0x516ae2=_0x5cbee6(_0x3965f7(window['Math']['ceil'](_0x5e6ded/_0x4a8911)));window['localStorage']['setItem'](_0x370526,_0x516ae2);}function _0x4a9cc5(){const _0x2a24ec='llct-'+_0x3965f7(_0x271b62(_0x31ef13)),_0x25a98d=window['localStorage']['getItem'](_0x2a24ec);return _0x25a98d?window['parseInt'](_0x5cbee6(_0x25a98d),0x10)*_0x4a8911:null;}function _0x40b7d5(_0x109fe3){return new window['Promise']((_0x59d34b,_0x3f3ab5)=>{_0x109fe3['then'](_0x59d34b,_0x3f3ab5),window['setTimeout'](_0x3f3ab5,0x1d4c0);});}}_0x197b8b['on']('_sendUsageRequest',(_0x2cd7e6,_0x136877)=>{if(_0x136877[0x0]!=_0x31ef13)return _0x1a3a76('UsageLimit');_0x136877[0x1]={..._0x136877[0x1],'requestId':_0x1ed0cc};},{'priority':'high'}),_0x197b8b['on']('_sendUsageRequest',_0x3d0ba0=>{_0x33bfba(_0x3d0ba0['return'])&&(_0x378507=!0x0,_0x2c64b5(_0x3d0ba0['return']));},{'priority':'low'}),_0x3a6ac5['then'](()=>{_0x378507||_0x1a3a76('UsageLimit');});});function _0x474a1(){return'auto'==_0x197b8b['editing']['view']['_overlayModeHint'];}function _0x254bc5(){_0x197b8b['editing']['view']['_overlayModeHint']='auto';}}function _0x1f907f(_0x1dbcf9){const _0x5981db=[new window['Promise'](_0x20ce3f=>setTimeout(_0x20ce3f,0x93ecc)),_0x3a6ac5['then'](()=>new window['Promise'](_0xe23b1a=>{let _0x3ec776=0x0;_0x197b8b['model']['on']('applyOperation',(_0x33f700,_0x21b856)=>{_0x21b856[0x0]['isDocumentOperation']&&_0x3ec776++,0x5e8==_0x3ec776&&(_0xe23b1a(),_0x33f700['off']());});}))];return window['Promise']['race'](_0x5981db)['then'](()=>_0x1dbcf9);}async function _0x515bcb(){await _0x3a6ac5,_0x197b8b['model']['change']=_0x382e80,_0x197b8b['model']['enqueueChange']=_0x382e80,_0x197b8b['enableReadOnlyMode']('model');}function _0x33daa3(){return window['glob']&&window['glob']['triliumVersion'];}function _0x2d360b(_0x577e2b){const _0x19381e=_0x26278c();_0x197b8b[_0x19381e]='documentOutlineLicenseKey'+_0x577e2b,'Valid'!=_0x577e2b&&_0x515bcb();}function _0x26278c(){const _0x1591d6=window['String'](window['performance']['now']())['replace']('.','');let _0x285c2a='u';for(let _0x5d1a48=0x0;_0x5d1a48<_0x1591d6['length'];_0x5d1a48+=0x2){let _0x2b4be4=window['parseInt'](_0x1591d6['substring'](_0x5d1a48,_0x5d1a48+0x2));_0x2b4be4>=0x3e&&(_0x2b4be4-=0x3e),_0x285c2a+=_0x3d887c[_0x2b4be4];}return _0x285c2a;}function _0x74502(){const _0x54d0d5=_0xaa2c72['split']('.');if(0x3!=_0x54d0d5['length'])return null;return _0x4ad1cd(_0x54d0d5[0x1]);function _0x4ad1cd(_0x384b2c){const _0x1fa3d6=_0x2d0bc5(_0x384b2c);return _0x1fa3d6&&_0x5efbc6()?_0x1fa3d6:null;function _0x5efbc6(){const _0x42a3c3=_0x1fa3d6['jti'],_0x22dd83=window['parseInt'](_0x42a3c3['substring'](_0x42a3c3['length']-0x8),0x10),_0x5d59b4={..._0x1fa3d6,'jti':_0x42a3c3['substring'](0x0,_0x42a3c3['length']-0x8)};return delete _0x5d59b4['vc'],_0x271b62(_0x5d59b4)==_0x22dd83;}}}async function _0x14629f(){let _0x3f7508=!0x0;try{const [_0x25ad66,_0x4aa137,_0xc4c768]=_0xaa2c72['split']('.');return _0x46e466(_0x25ad66),await _0x296e33(_0x25ad66,_0x4aa137,_0xc4c768),_0x3f7508;}catch{return!0x1;}function _0x46e466(_0x1e6539){const _0x2da500=_0x2d0bc5(_0x1e6539);_0x2da500&&'ES256'==_0x2da500['alg']||(_0x3f7508=!0x1);}async function _0x296e33(_0x4f0a26,_0x335edb,_0x4a7262){const _0x289100=window['Uint8Array']['from'](_0x5bfff5(_0x4a7262),_0x10b526=>_0x10b526['charCodeAt'](0x0)),_0x1857fe=new window['TextEncoder']()['encode'](_0x4f0a26+'.'+_0x335edb),_0x104784=window['crypto']['subtle'];if(!_0x104784)return;const _0x2b046e=await _0x104784['importKey']('jwk',_0x4bd4fb,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x104784['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x2b046e,_0x289100,_0x1857fe)||(_0x3f7508=!0x1);}}function _0x2d0bc5(_0x1166ab){return _0x1166ab['startsWith']('ey')?JSON['parse'](_0x5bfff5(_0x1166ab)):null;}function _0x5bfff5(_0x276047){return window['atob'](_0x276047['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x271b62(_0x5c870d){let _0x526654=0x1505;function _0x656d68(_0x4a9920){for(let _0x5acfb8=0x0;_0x5acfb8<_0x4a9920['length'];_0x5acfb8++){const _0x155b79=_0x4a9920['charCodeAt'](_0x5acfb8);_0x526654=(_0x526654<<0x5)+_0x526654+_0x155b79,_0x526654&=_0x526654;}}function _0x38c7ca(_0x377fd8){Array['isArray'](_0x377fd8)?_0x377fd8['forEach'](_0x38c7ca):_0x377fd8&&'object'==typeof _0x377fd8?Object['entries'](_0x377fd8)['sort']()['forEach'](([_0x7e4af9,_0x1db16d])=>{_0x656d68(_0x7e4af9),_0x38c7ca(_0x1db16d);}):_0x656d68(window['String'](_0x377fd8));}return _0x38c7ca(_0x5c870d),_0x526654>>>0x0;}function _0x3965f7(_0x1350c8){return _0x1350c8['toString'](0x10)['padStart'](0x8,'0');}function _0x5cbee6(_0x50c2b6){return _0x50c2b6['split']('')['reverse']()['join']('');}function _0x382e80(){}_0x2d360b(await _0x517e90());}_0x93204c(_0x23cb30['editor']);}(this);}destroy(){super['destroy'](),this['view']['destroy'](),this['_updateActiveDefinitionFromViewportThrottled']['cancel']();}_handleOutlineChange(_0x4be8ed,{outlineDefinitions:_0x49e242,outlineChanges:_0x43fefd}){this['_currentOutlineDefinitions']=_0x49e242,this['view']['sync'](_0x43fefd);}_setActiveViewItem(_0x3bdb75){this['_currentOutlineDefinitions']['length']&&this['_currentOutlineDefinitions'][_0x3bdb75]&&(this['view']['activeItemIndex']=_0x3bdb75);}_handleItemSelected(_0x810f67){const _0x504f36=this['_currentOutlineDefinitions'][_0x810f67]['modelElement'];this['editor']['model']['change'](_0x46dfc8=>{_0x46dfc8['setSelection'](_0x504f36,0x0);}),this['editor']['editing']['view']['scrollToTheSelection']({'alignToTop':!0x0,'forceScroll':!0x0}),this['editor']['editing']['view']['focus'](),this['_setActiveViewItem'](_0x810f67);}_updateActiveDefinitionOnViewportChange(){const _0x2d6ca0=this['editor'];let _0x47fa4d;for(const _0xca4fda of _0x2d6ca0['model']['document']['getRootNames']()){const _0xdac9b3=_0x2d6ca0['editing']['view']['getDomRoot'](_0xca4fda),_0x2c528a=_0xdac9b3&&new _0x23a68f(_0xdac9b3)['getVisible']();if(_0x2c528a){const _0x14716c=new _0x23a68f(_0x1f8121['window'])['getIntersection'](_0x2c528a);_0x14716c&&(_0x47fa4d=_0x14716c['top']+0.25*_0x14716c['height']);}}if(void 0x0===_0x47fa4d)return;const _0x850510=k(_0x2d6ca0['editing'],this['_currentOutlineDefinitions'],_0x47fa4d);_0x850510?this['_setActiveViewItem'](this['_currentOutlineDefinitions']['indexOf'](_0x850510)):this['_setActiveViewItem'](-0x1);}};function k(_0x4210b8,_0x13571a,_0x4bc490,_0x1ad407=0x0,_0x40ad0e=_0x13571a['length']-0x1){const _0x16d2d2=Math['floor'](_0x1ad407+(_0x40ad0e-_0x1ad407)/0x2);if(_0x40ad0e>=_0x1ad407){const _0x50a43e=_0x13571a[_0x16d2d2],_0x417f24=_0x4210b8['mapper']['toViewElement'](_0x50a43e['modelElement']);if(!_0x417f24)return null;const _0x136c68=_0x4210b8['view']['domConverter']['mapViewToDom'](_0x417f24);return new _0x23a68f(_0x136c68)['bottom']>_0x4bc490?k(_0x4210b8,_0x13571a,_0x4bc490,_0x1ad407,_0x16d2d2-0x1):k(_0x4210b8,_0x13571a,_0x4bc490,_0x16d2d2+0x1,_0x40ad0e);}return _0x16d2d2<0x0?null:_0x13571a[_0x16d2d2];}var E=class extends _0x5dedd1{['licenseKey'];_licenseKeyCheckInterval;static get requires(){return[I,x];}static get['pluginName'](){return'DocumentOutline';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x3c9c2c=[this['editor']];for(const _0x5a0528 of _0x3c9c2c){let _0x5bacee;for(const _0x345477 in _0x5a0528){const _0x59212f=_0x345477,_0x126ddf=_0x5a0528[_0x59212f];if('documentOutlineLicenseKeyValid'==_0x126ddf||'documentOutlineLicenseKeyInvalid'==_0x126ddf||'documentOutlineLicenseKeyExpired'==_0x126ddf||'documentOutlineLicenseKeyDomainLimit'==_0x126ddf||'documentOutlineLicenseKeyNotAllowed'==_0x126ddf||'documentOutlineLicenseKeyEvaluationLimit'==_0x126ddf||'documentOutlineLicenseKeyUsageLimit'==_0x126ddf){delete _0x5a0528[_0x59212f],_0x5bacee=_0x126ddf,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'documentOutlineLicenseKeyInvalid'==_0x5bacee&&_0x5a0528['_showLicenseError']('invalid'),'documentOutlineLicenseKeyExpired'==_0x5bacee&&_0x5a0528['_showLicenseError']('expired'),'documentOutlineLicenseKeyDomainLimit'==_0x5bacee&&_0x5a0528['_showLicenseError']('domainLimit'),'documentOutlineLicenseKeyNotAllowed'==_0x5bacee&&_0x5a0528['_showLicenseError']('featureNotAllowed','DocumentOutline'),'documentOutlineLicenseKeyEvaluationLimit'==_0x5bacee&&_0x5a0528['_showLicenseError']('evaluationLimit'),'documentOutlineLicenseKeyUsageLimit'==_0x5bacee&&_0x5a0528['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},K=class extends _0x337f30{execute(){this['editor']['model']['change'](_0x5719be=>{this['editor']['model']['insertObject'](_0x5719be['createElement']('tableOfContents'));});}['refresh'](){const _0x25cda9=this['editor']['model'],_0xfd5a6b=_0x25cda9['document']['selection']['getFirstPosition']();this['isEnabled']=null!==(_0xfd5a6b&&_0x25cda9['schema']['findAllowedParent'](_0xfd5a6b,'tableOfContents'));}},A=class extends _0x5dedd1{static get['pluginName'](){return'HeadingId';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}afterInit(){const _0x443701=this['editor'];if(_0x443701['config']['get']('headingId.modelAttributeName'))return;const {viewNames:_0x14dde7,modelNames:_0x583ba0}=function(_0x54b5dd){const _0x595242=new Set(['h1','h2','h3','h4','h5','h6']),_0x45828d=new Set(['heading1','heading2','heading3','heading4','heading5','heading6','htmlH1','htmlH2','htmlH3','htmlH4','htmlH5','htmlH6']);if(!_0x54b5dd)return{'viewNames':_0x595242,'modelNames':_0x45828d};for(const _0x51a70c of _0x54b5dd){if('paragraph'===_0x51a70c['model'])continue;const _0x318842='string'==typeof _0x51a70c['view']?_0x51a70c['view']:_0x51a70c['view']['name'];_0x595242['add'](_0x318842),_0x45828d['add'](_0x51a70c['model']);}return{'viewNames':_0x595242,'modelNames':_0x45828d};}(this['editor']['config']['get']('heading.options'));for(const _0x7939bb of _0x14dde7)this['_customUpcastHeadingsConversion'](_0x7939bb);for(const _0x377277 of _0x583ba0)this['_customDataDowncastHeadingsConversion'](_0x377277),_0x443701['model']['schema']['isRegistered'](_0x377277)&&_0x443701['model']['schema']['extend'](_0x377277,{'allowAttributes':'headingId'});this['_registerHeadingIdAttributePostfixer'](_0x583ba0);}_customUpcastHeadingsConversion(_0x43b0d5){this['editor']['conversion']['for']('upcast')['add'](_0x391e19=>_0x391e19['on']('element:'+_0x43b0d5,(_0x3db3ea,_0xc0493f,_0x50d42c)=>{const {consumable:_0x25337a,writer:_0x1fd495}=_0x50d42c,_0x42d207=_0xc0493f['viewItem']['getAttribute']('id'),_0x97b9c6=_0xc0493f['modelRange']?.['getContainedElement']();if(_0x97b9c6)return _0x42d207&&_0x42d207['length']||_0x97b9c6['hasAttribute']('headingId')?void(_0x25337a['consume'](_0xc0493f['viewItem'],{'attributes':['id']})&&_0x1fd495['setAttribute']('headingId',_0x42d207,_0x97b9c6)):(_0x25337a['consume'](_0xc0493f['viewItem'],{'attributes':['id']}),void _0x1fd495['setAttribute']('headingId',_0x381f74(),_0x97b9c6));},{'priority':_0x3ee460['get']('low')+0.5}));}_customDataDowncastHeadingsConversion(_0x5258df){this['editor']['conversion']['for']('downcast')['add'](_0x169731=>_0x169731['on']('attribute:headingId:'+_0x5258df,(_0x4ab3da,_0x470165,_0x5a2929)=>{if(!_0x5a2929['consumable']['consume'](_0x470165['item'],_0x4ab3da['name']))return;const _0x399a59=_0x470165['item']['getAttribute']('headingId'),_0x35974d=_0x5a2929['mapper']['toViewElement'](_0x470165['item']);_0x5a2929['writer']['setAttribute']('id',_0x399a59,_0x35974d);}));}_registerHeadingIdAttributePostfixer(_0x4aaaf7){const _0x2e0287=this['editor'],_0x29a073=new Set(),_0x41bb54=new Set();function _0x1789fe(_0x211901,_0x213af0){const _0x112d8e=_0x381f74();return _0x41bb54['add'](_0x112d8e),_0x211901['setAttribute']('headingId',_0x112d8e,_0x213af0),_0x112d8e;}function _0x314a89(_0x78d0b,_0x2b14ab){_0x78d0b['removeAttribute']('headingId',_0x2b14ab);}_0x2e0287['model']['document']['registerPostFixer'](_0x1ef719=>{const _0x31bafe=_0x2e0287['model']['document']['differ']['getChanges']();let _0x265135=!0x1;for(const _0x5f0b2b of _0x31bafe)if('insert'==_0x5f0b2b['type']&&_0x5f0b2b['name']){if(_0x4aaaf7['has'](_0x5f0b2b['name'])){const _0x1b4f30=_0x5f0b2b['attributes']['get']('headingId');'string'==typeof _0x1b4f30?_0x29a073['has'](_0x1b4f30)?(_0x1789fe(_0x1ef719,_0x5f0b2b['position']['nodeAfter']),_0x265135=!0x0):_0x41bb54['add'](_0x1b4f30):(_0x1789fe(_0x1ef719,_0x5f0b2b['position']['nodeAfter']),_0x265135=!0x0);}else'string'==typeof _0x5f0b2b['attributes']['get']('headingId')&&(_0x314a89(_0x1ef719,_0x5f0b2b['position']['nodeAfter']),_0x265135=!0x0);}else{if('remove'==_0x5f0b2b['type']){const _0x228637=_0x5f0b2b['attributes']['get']('headingId');'string'==typeof _0x228637&&_0x29a073['delete'](_0x228637);}}return _0x265135;}),_0x2e0287['model']['document']['on']('change',()=>{_0x41bb54['forEach'](_0x10d762=>_0x29a073['add'](_0x10d762)),_0x41bb54['clear']();});}},N=class extends _0x5dedd1{static get['pluginName'](){return'TableOfContentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_0x351635,I,A];}_currentOutlineDefinitions;_tableOfContentsElements;_headingIdModelAttributeName;constructor(_0xc60298){super(_0xc60298),this['_currentOutlineDefinitions']=[],this['_tableOfContentsElements']=new Set(),this['_headingIdModelAttributeName']='headingId';}init(){const _0x5572a2=this['editor'],_0x262fe8=_0x5572a2['editing']['view']['document'];_0x5572a2['config']['get']('headingId.modelAttributeName')&&(this['_headingIdModelAttributeName']=_0x5572a2['config']['get']('headingId.modelAttributeName')),this['listenTo'](_0x262fe8,'click',(_0x4a0b6b,_0x136ce5)=>{if(!_0x136ce5['target'])return;const _0x20c70d=_0x136ce5['target']['getCustomProperty']('tableOfContentsHeadingIndex');Number['isInteger'](_0x20c70d)&&(_0x136ce5['domEvent']['preventDefault'](),_0x4a0b6b['stop'](),this['_handleScrollToHeading'](_0x20c70d));},{'priority':'high','context':'$capture'}),this['_defineSchema'](),this['_defineConverters'](),_0x5572a2['commands']['add']('insertTableOfContents',new K(_0x5572a2));const _0x5d750a=_0x5572a2['config']['get']('tableOfContents.headings');_0x5d750a&&_0x5d750a['length']?this['listenTo'](_0x5572a2['model']['document'],'change:data',()=>{this['_currentOutlineDefinitions']=this['_getOutlineDefinitions'](_0x5d750a),this['_updateTableOfContentsElements']();}):_0x5572a2['plugins']['get']('DocumentOutlineUtils')['on']('change',(_0x4e1587,_0xa202d4)=>{this['_currentOutlineDefinitions']=_0xa202d4['outlineDefinitions'],this['_updateTableOfContentsElements']();}),this['listenTo'](_0x5572a2['model']['document'],'change',()=>{this['_trackNewToCElements']();});}afterInit(){!async function(_0x571a56){const _0x587f6c='DUA610emL4Q2kjVIvGMHgWT3uySnzPEw79oZJiCrbstcXKq85NhdfaFRxBlpOY',_0x5c1ebe=0x793f8,_0x25c582={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x30467a(_0x481e05){const _0x37ab1f=new window['Promise'](_0x366bf0=>{_0x481e05['once']('ready',_0x366bf0);}),_0x15e2a2=window['Date']['now'](),_0x4641ea=_0x481e05['config']['get']('licenseKey');async function _0x43f76e(){let _0x3985b8,_0x3e90ad=null,_0x587481=null;try{return'GPL'==_0x4641ea?'NotAllowed':(_0x3985b8=_0x5f4e46(),_0x3985b8?(_0x3985b8['usageEndpoint']&&(_0x587481=_0x13e89e(_0x3985b8['usageEndpoint'],_0x3985b8['jti'])),await _0xc0c018()?_0x3245b3()?_0x32d32f()?'Expired':_0x2ea879()?('evaluation'==_0x3985b8['licenseType']&&(_0x3e90ad=_0x7479e('EvaluationLimit')),await _0x36f786()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x32d32f(){const _0x32e35d=['evaluation','trial']['includes'](_0x3985b8['licenseType'])?_0x15e2a2/0x3e8:0xe10*_0x5c1ebe;return _0x3985b8['exp']<_0x32e35d;}function _0x3245b3(){const _0x27d8e3=_0x3985b8['features'];return!!_0x27d8e3&&(!!_0x27d8e3['includes']('*')||(!!_0x27d8e3['includes']('TOC')||(!!_0x27d8e3['includes']('PP')||!(!_0x27d8e3['includes']('TRILIUM')||!_0x1154d7()))));}function _0x2ea879(){const _0x35d6d1=_0x3985b8['licensedHosts'];if(!_0x35d6d1||0x0==_0x35d6d1['length'])return!0x0;const {hostname:_0x286251}=new URL(window['location']['href']);if(_0x35d6d1['includes'](_0x286251))return!0x0;const _0x32ee7e=_0x286251['split']('.');return _0x35d6d1['filter'](_0x53ae18=>_0x53ae18['includes']('*'))['map'](_0x298b17=>_0x298b17['split']('.'))['filter'](_0x3dfa47=>_0x3dfa47['length']<=_0x32ee7e['length'])['map'](_0x158227=>Array(_0x32ee7e['length']-_0x158227['length'])['fill']('*'===_0x158227[0x0]?'*':'')['concat'](_0x158227))['some'](_0x14c672=>_0x32ee7e['every']((_0xd1fe92,_0x3a6db3)=>_0x14c672[_0x3a6db3]===_0xd1fe92||'*'===_0x14c672[_0x3a6db3]));}function _0x36f786(){return _0x3e90ad&&_0x587481?new window['Promise']((_0x1c1c05,_0x54afb4)=>{_0x3e90ad['then'](_0x1c1c05,_0x54afb4),_0x587481['then'](_0x55cc14=>{'Valid'!=_0x55cc14&&_0x1c1c05(_0x55cc14);},_0x54afb4);}):_0x3e90ad||_0x587481||'Valid';}}function _0x13e89e(_0x3da673,_0x13b413){return new window['Promise'](_0x4604b8=>{if(_0x3729d4())return _0x4604b8('Valid');_0x56da39(),_0x481e05['decorate']('_sendUsageRequest');let _0x138d84=!0x1;const _0x478c6c=_0x381f74();function _0x542e73(_0x1c9c8d){return!!_0x1c9c8d&&('object'==typeof _0x1c9c8d||'function'==typeof _0x1c9c8d)&&'function'==typeof _0x1c9c8d['then']&&'function'==typeof _0x1c9c8d['catch'];}function _0x3c0823(_0x376a2f){_0x360f48(_0x376a2f)['then'](_0x2fc969=>_0x2fc969&&'ok'==_0x2fc969['status']?_0x333231(_0x43e941(_0x478c6c+_0x13b413))!=_0x2fc969['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x5133c0=>(_0x236456(),_0x5133c0),()=>{const _0x312d09=_0x4eff3b();return null==_0x312d09?(_0x236456(),'Valid'):_0x15e2a2-_0x312d09>0x240c8400?'UsageLimit':'Valid';})['then'](_0x4604b8)['catch'](()=>{_0x4604b8('UsageLimit');});const _0x548892=0x36ee80;function _0x236456(){const _0x2de5d6='llct-'+_0x333231(_0x43e941(_0x3da673)),_0x75c540=_0x14f345(_0x333231(window['Math']['ceil'](_0x15e2a2/_0x548892)));window['localStorage']['setItem'](_0x2de5d6,_0x75c540);}function _0x4eff3b(){const _0x5c5df1='llct-'+_0x333231(_0x43e941(_0x3da673)),_0x4e3303=window['localStorage']['getItem'](_0x5c5df1);return _0x4e3303?window['parseInt'](_0x14f345(_0x4e3303),0x10)*_0x548892:null;}function _0x360f48(_0x435df6){return new window['Promise']((_0x2593c2,_0x1fbe10)=>{_0x435df6['then'](_0x2593c2,_0x1fbe10),window['setTimeout'](_0x1fbe10,0x1d4c0);});}}_0x481e05['on']('_sendUsageRequest',(_0x3c16ae,_0x4dfe66)=>{if(_0x4dfe66[0x0]!=_0x3da673)return _0x4604b8('UsageLimit');_0x4dfe66[0x1]={..._0x4dfe66[0x1],'requestId':_0x478c6c};},{'priority':'high'}),_0x481e05['on']('_sendUsageRequest',_0x1114b8=>{_0x542e73(_0x1114b8['return'])&&(_0x138d84=!0x0,_0x3c0823(_0x1114b8['return']));},{'priority':'low'}),_0x37ab1f['then'](()=>{_0x138d84||_0x4604b8('UsageLimit');});});function _0x3729d4(){return'auto'==_0x481e05['editing']['view']['_overlayModeHint'];}function _0x56da39(){_0x481e05['editing']['view']['_overlayModeHint']='auto';}}function _0x7479e(_0x125e96){const _0x4cc48c=[new window['Promise'](_0x1ab75b=>setTimeout(_0x1ab75b,0x93ecc)),_0x37ab1f['then'](()=>new window['Promise'](_0x5416ef=>{let _0x1c26da=0x0;_0x481e05['model']['on']('applyOperation',(_0x3ba5b4,_0x24b0fd)=>{_0x24b0fd[0x0]['isDocumentOperation']&&_0x1c26da++,0x5e8==_0x1c26da&&(_0x5416ef(),_0x3ba5b4['off']());});}))];return window['Promise']['race'](_0x4cc48c)['then'](()=>_0x125e96);}async function _0x3758cf(){await _0x37ab1f,_0x481e05['model']['change']=_0x486413,_0x481e05['model']['enqueueChange']=_0x486413,_0x481e05['enableReadOnlyMode']('model');}function _0x1154d7(){return window['glob']&&window['glob']['triliumVersion'];}function _0x107b81(_0x3a6fd8){const _0x1bd036=_0x31f3fc();_0x481e05[_0x1bd036]='tableOfContentsLicenseKey'+_0x3a6fd8,'Valid'!=_0x3a6fd8&&_0x3758cf();}function _0x31f3fc(){const _0x585893=window['String'](window['performance']['now']())['replace']('.','');let _0x54c550='D';for(let _0x33bdee=0x0;_0x33bdee<_0x585893['length'];_0x33bdee+=0x2){let _0xd7a07e=window['parseInt'](_0x585893['substring'](_0x33bdee,_0x33bdee+0x2));_0xd7a07e>=0x3e&&(_0xd7a07e-=0x3e),_0x54c550+=_0x587f6c[_0xd7a07e];}return _0x54c550;}function _0x5f4e46(){const _0x4075f5=_0x4641ea['split']('.');if(0x3!=_0x4075f5['length'])return null;return _0x1fb5f0(_0x4075f5[0x1]);function _0x1fb5f0(_0x1b7b2d){const _0x200a17=_0x3c0dd9(_0x1b7b2d);return _0x200a17&&_0x360526()?_0x200a17:null;function _0x360526(){const _0x31f9ea=_0x200a17['jti'],_0x2102b1=window['parseInt'](_0x31f9ea['substring'](_0x31f9ea['length']-0x8),0x10),_0x1da41f={..._0x200a17,'jti':_0x31f9ea['substring'](0x0,_0x31f9ea['length']-0x8)};return delete _0x1da41f['vc'],_0x43e941(_0x1da41f)==_0x2102b1;}}}async function _0xc0c018(){let _0x307a48=!0x0;try{const [_0x44ecef,_0x545b1d,_0x4c0eeb]=_0x4641ea['split']('.');return _0x4c270a(_0x44ecef),await _0x69448e(_0x44ecef,_0x545b1d,_0x4c0eeb),_0x307a48;}catch{return!0x1;}function _0x4c270a(_0x1e4bb4){const _0xaa72f4=_0x3c0dd9(_0x1e4bb4);_0xaa72f4&&'ES256'==_0xaa72f4['alg']||(_0x307a48=!0x1);}async function _0x69448e(_0x4edecf,_0x4f85d9,_0x1ed955){const _0x18ad43=window['Uint8Array']['from'](_0x14f4a5(_0x1ed955),_0x265408=>_0x265408['charCodeAt'](0x0)),_0x3dbf93=new window['TextEncoder']()['encode'](_0x4edecf+'.'+_0x4f85d9),_0x4b62ae=window['crypto']['subtle'];if(!_0x4b62ae)return;const _0x38ddda=await _0x4b62ae['importKey']('jwk',_0x25c582,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x4b62ae['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x38ddda,_0x18ad43,_0x3dbf93)||(_0x307a48=!0x1);}}function _0x3c0dd9(_0x3b7166){return _0x3b7166['startsWith']('ey')?JSON['parse'](_0x14f4a5(_0x3b7166)):null;}function _0x14f4a5(_0x392901){return window['atob'](_0x392901['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x43e941(_0x22d1ee){let _0x416122=0x1505;function _0x2d5310(_0x18d3c0){for(let _0x1d5b42=0x0;_0x1d5b42<_0x18d3c0['length'];_0x1d5b42++){const _0x1e64ea=_0x18d3c0['charCodeAt'](_0x1d5b42);_0x416122=(_0x416122<<0x5)+_0x416122+_0x1e64ea,_0x416122&=_0x416122;}}function _0x103947(_0x23c65e){Array['isArray'](_0x23c65e)?_0x23c65e['forEach'](_0x103947):_0x23c65e&&'object'==typeof _0x23c65e?Object['entries'](_0x23c65e)['sort']()['forEach'](([_0x57ba9c,_0x4140a2])=>{_0x2d5310(_0x57ba9c),_0x103947(_0x4140a2);}):_0x2d5310(window['String'](_0x23c65e));}return _0x103947(_0x22d1ee),_0x416122>>>0x0;}function _0x333231(_0x522563){return _0x522563['toString'](0x10)['padStart'](0x8,'0');}function _0x14f345(_0x5e925d){return _0x5e925d['split']('')['reverse']()['join']('');}function _0x486413(){}_0x107b81(await _0x43f76e());}_0x30467a(_0x571a56['editor']);}(this);}_updateTableOfContentsElements(){this['_tableOfContentsElements']['forEach'](_0x29fee2=>{'$graveyard'!==_0x29fee2['rootName']&&this['editor']['editing']['reconvertItem'](_0x29fee2);});}_trackNewToCElements(){for(const _0x3e6c0f of this['editor']['model']['document']['differ']['getChanges']({'includeChangesInGraveyard':!0x0})){if('insert'!==_0x3e6c0f['type']||'tableOfContents'!==_0x3e6c0f['name'])return;this['_tableOfContentsElements']['add'](_0x3e6c0f['position']['nodeAfter']);}}_getOutlineDefinitions(_0x296861){const _0x5c30fb=this['editor'],_0x2a8460=[];for(const _0x5b2742 of _0x5c30fb['model']['document']['getRootNames']())_0x4f258d(_0x5c30fb['model']['document']['getRoot'](_0x5b2742));function _0x4f258d(_0x3fce91){for(const _0x52014a of _0x3fce91['getChildren']())_0x52014a['is']('element')&&(_0x296861['includes'](_0x52014a['name'])&&_0x2a8460['push']({'level':_0x296861['indexOf'](_0x52014a['name'])+0x1,'text':b(_0x52014a),'modelElement':_0x52014a}),_0x4f258d(_0x52014a));}return _0x2a8460;}['_defineSchema'](){this['editor']['model']['schema']['register']('tableOfContents',{'inheritAllFrom':'$blockObject'});}_defineConverters(){const _0x39bafa=this['editor']['conversion'];_0x39bafa['for']('upcast')['elementToElement']({'model':'tableOfContents','view':{'name':'div','classes':'table-of-contents'}}),_0x39bafa['for']('dataDowncast')['elementToStructure']({'model':'tableOfContents','view':(_0x28f12d,{writer:_0x176a23})=>this['_createTableOfContents'](_0x176a23,!0x0)}),_0x39bafa['for']('editingDowncast')['elementToStructure']({'model':'tableOfContents','view':(_0x177a00,{writer:_0x1ada21})=>{this['_tableOfContentsElements']['add'](_0x177a00);const _0x1fbefd=this['_createTableOfContents'](_0x1ada21);return _0x242937(_0x1fbefd,_0x1ada21,{'label':L(this['editor']['locale'],'Table\x20of\x20contents')});}}),this['editor']['data']['registerRawContentMatcher']({'name':'div','classes':'table-of-contents'}),this['editor']['editing']['mapper']['on']('viewToModelPosition',this['_redirectMapper'](),{'priority':'high'});}_createTableOfContents(_0x51703b,_0x19fdd5=!0x1){const {locale:_0x19ba0e}=this['editor'],_0x289fe2=_0x51703b['createContainerElement']('div',{'class':'table-of-contents'+(0x0===this['_currentOutlineDefinitions']['length']?'\x20table-of-contents_empty':''),...!_0x19fdd5&&{'data-table-of-contents-label':L(_0x19ba0e,'Table\x20of\x20contents')}});0x0===this['_currentOutlineDefinitions']['length']&&!0x1===_0x19fdd5&&_0x51703b['insert'](_0x51703b['createPositionAt'](_0x289fe2,'end'),_0x51703b['createContainerElement']('p',{'class':'table-of-contents__placeholder'},[_0x51703b['createText'](L(_0x19ba0e,'No\x20headings\x20were\x20found\x20in\x20the\x20document.'))]));const _0xb8b491=_0x19fdd5?'':'['+L(_0x19ba0e,'Empty\x20heading')+']';let _0x870639=_0x289fe2;return this['_currentOutlineDefinitions']['forEach']((_0x5e2f36,_0x38ee87,_0x1bf86f)=>{const _0x502f7f=this['editor']['model']['hasContent'](_0x5e2f36['modelElement'],{'ignoreWhitespaces':!0x0}),_0x14c036=_0x502f7f?_0x5e2f36['text']:_0xb8b491,_0x26c91c=_0x5e2f36['modelElement']['getAttribute'](this['_headingIdModelAttributeName']),_0xbd4ccc=_0x51703b['createContainerElement']('a',{'href':'#'+_0x26c91c,...!_0x19fdd5&&{'tabindex':'-1'}},[_0x51703b['createText'](_0x14c036)]),_0x2a1aba=this['editor']['config']['get']('documentOutline.showEmptyHeadings');_0x51703b['setCustomProperty']('tableOfContentsHeadingIndex',_0x38ee87,_0xbd4ccc);const _0x94c28c=_0x51703b['createContainerElement']('li',null,[_0x502f7f||!_0x19fdd5&&_0x2a1aba?_0xbd4ccc:_0x51703b['createText']('')]),_0x220002=_0x38ee87?_0x1bf86f[_0x38ee87-0x1]['level']:0x0,_0x3d6ff8=Math['abs'](_0x5e2f36['level']-_0x220002);if(_0x5e2f36['level']>_0x220002){const _0x595982=D(_0x94c28c,_0x3d6ff8,_0x51703b);_0x51703b['insert'](_0x51703b['createPositionAt'](_0x870639,'end'),_0x595982);}else{const _0x17f2ad=function(_0x48ebeb,_0x4059f2){return _0x48ebeb['getAncestors']({'includeSelf':!0x0,'parentFirst':!0x0})['filter'](_0x4c8483=>_0x4c8483['is']('element','ol'))[_0x4059f2];}(_0x870639,_0x3d6ff8);_0x51703b['insert'](_0x51703b['createPositionAt'](_0x17f2ad,'end'),_0x94c28c);}_0x870639=_0x94c28c;}),_0x289fe2;}['_handleScrollToHeading'](_0x2f2251){const _0x1eeec1=this['_currentOutlineDefinitions'][_0x2f2251]['modelElement'];this['editor']['model']['change'](_0x9a44f4=>{_0x9a44f4['setSelection'](_0x1eeec1,0x0);}),this['editor']['editing']['view']['scrollToTheSelection']({'alignToTop':!0x0,'forceScroll':!0x0});}_redirectMapper(){return(_0x4e3dc0,_0xb921e5)=>{const _0x19b5dc=_0xb921e5['mapper'],_0x400b44=_0x19b5dc['findMappedViewAncestor'](_0xb921e5['viewPosition']),_0x118705=_0x19b5dc['toModelElement'](_0x400b44);_0x118705['is']('element','tableOfContents')&&(_0xb921e5['modelPosition']=this['editor']['model']['createPositionAt'](_0x118705,0x0),_0x4e3dc0['stop']());};}};function D(_0x42c00a,_0x2d4b8c,_0x4e9bb8){return 0x1===_0x2d4b8c?_0x4e9bb8['createContainerElement']('ol',null,[_0x42c00a]):_0x4e9bb8['createContainerElement']('ol',null,[_0x4e9bb8['createContainerElement']('li',null,[D(_0x42c00a,_0x2d4b8c-0x1,_0x4e9bb8)])]);}var H=class extends _0x5dedd1{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'TableOfContentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const _0x54c7d6=this['editor'];_0x54c7d6['ui']['componentFactory']['add']('tableOfContents',()=>{const _0x804617=this['_createButton'](_0x2db7e6);return _0x804617['tooltip']=!0x0,_0x804617;}),_0x54c7d6['ui']['componentFactory']['add']('menuBar:tableOfContents',()=>this['_createButton'](_0x568abd)),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x1c9ae6=[this['editor']];for(const _0x986793 of _0x1c9ae6){let _0x3da9c3;for(const _0x28b5c1 in _0x986793){const _0x26c6da=_0x28b5c1,_0x3efb9f=_0x986793[_0x26c6da];if('tableOfContentsLicenseKeyValid'==_0x3efb9f||'tableOfContentsLicenseKeyInvalid'==_0x3efb9f||'tableOfContentsLicenseKeyExpired'==_0x3efb9f||'tableOfContentsLicenseKeyDomainLimit'==_0x3efb9f||'tableOfContentsLicenseKeyNotAllowed'==_0x3efb9f||'tableOfContentsLicenseKeyEvaluationLimit'==_0x3efb9f||'tableOfContentsLicenseKeyUsageLimit'==_0x3efb9f){delete _0x986793[_0x26c6da],_0x3da9c3=_0x3efb9f,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'tableOfContentsLicenseKeyInvalid'==_0x3da9c3&&_0x986793['_showLicenseError']('invalid'),'tableOfContentsLicenseKeyExpired'==_0x3da9c3&&_0x986793['_showLicenseError']('expired'),'tableOfContentsLicenseKeyDomainLimit'==_0x3da9c3&&_0x986793['_showLicenseError']('domainLimit'),'tableOfContentsLicenseKeyNotAllowed'==_0x3da9c3&&_0x986793['_showLicenseError']('featureNotAllowed','TableOfContents'),'tableOfContentsLicenseKeyEvaluationLimit'==_0x3da9c3&&_0x986793['_showLicenseError']('evaluationLimit'),'tableOfContentsLicenseKeyUsageLimit'==_0x3da9c3&&_0x986793['_showLicenseError']('usageLimit');}},0x3e8);}_createButton(_0x338b86){const _0x4664a4=this['editor'],_0x4bb170=_0x4664a4['locale'],_0xf6f7f4=_0x4664a4['commands']['get']('insertTableOfContents'),_0x32af6c=new _0x338b86(_0x4bb170);return _0x32af6c['set']({'label':L(_0x4bb170,'Table\x20of\x20contents'),'icon':_0x19a9cf}),_0x32af6c['bind']('isEnabled')['to'](_0xf6f7f4,'isEnabled'),this['listenTo'](_0x32af6c,'execute',()=>{_0x4664a4['execute']('insertTableOfContents'),_0x4664a4['editing']['view']['focus']();}),_0x32af6c;}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},P=class extends _0x5dedd1{static get requires(){return[N,H];}static get['pluginName'](){return'TableOfContents';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{E as DocumentOutline,x as DocumentOutlineUI,I as DocumentOutlineUtils,A as HeadingId,P as TableOfContents,K as TableOfContentsCommand,N as TableOfContentsEditing,H as TableOfContentsUI};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-document-outline",
|
|
3
|
-
"version": "48.5.0-alpha.
|
|
3
|
+
"version": "48.5.0-alpha.2",
|
|
4
4
|
"description": "Document outline feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
"./package.json": "./package.json"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@ckeditor/ckeditor5-core": "48.5.0-alpha.
|
|
25
|
-
"@ckeditor/ckeditor5-engine": "48.5.0-alpha.
|
|
26
|
-
"@ckeditor/ckeditor5-heading": "48.5.0-alpha.
|
|
27
|
-
"@ckeditor/ckeditor5-icons": "48.5.0-alpha.
|
|
28
|
-
"@ckeditor/ckeditor5-ui": "48.5.0-alpha.
|
|
29
|
-
"@ckeditor/ckeditor5-utils": "48.5.0-alpha.
|
|
30
|
-
"@ckeditor/ckeditor5-widget": "48.5.0-alpha.
|
|
24
|
+
"@ckeditor/ckeditor5-core": "48.5.0-alpha.2",
|
|
25
|
+
"@ckeditor/ckeditor5-engine": "48.5.0-alpha.2",
|
|
26
|
+
"@ckeditor/ckeditor5-heading": "48.5.0-alpha.2",
|
|
27
|
+
"@ckeditor/ckeditor5-icons": "48.5.0-alpha.2",
|
|
28
|
+
"@ckeditor/ckeditor5-ui": "48.5.0-alpha.2",
|
|
29
|
+
"@ckeditor/ckeditor5-utils": "48.5.0-alpha.2",
|
|
30
|
+
"@ckeditor/ckeditor5-widget": "48.5.0-alpha.2",
|
|
31
31
|
"es-toolkit": "1.45.1"
|
|
32
32
|
},
|
|
33
33
|
"files": [
|