@ckeditor/ckeditor5-document-outline 49.0.0-alpha.3 → 49.0.0-alpha.4
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 _0x392b4a,Plugin as _0x4c8b3e}from'@ckeditor/ckeditor5-core';import{debounce as _0xed0d34,throttle as _0x2faa83}from'es-toolkit/compat';import{ModelText as _0x335900,ModelTreeWalker as _0x5af666}from'@ckeditor/ckeditor5-engine';import{CKEditorError as _0x4fae0f,Rect as _0x584338,diff as _0x46a626,diffToChanges as _0x397844,global as _0x289f00,listenToShadowRoots as _0x4030fe,priorities as _0x5bf6ba,scrollAncestorsToShowTarget as _0x4a2ede,uid as _0x2783d6}from'@ckeditor/ckeditor5-utils';import{ButtonView as _0x257805,MenuBarMenuListItemButtonView as _0x30c5c0,View as _0xe55380}from'@ckeditor/ckeditor5-ui';import{Widget as _0x1b094c,toWidget as _0x2cb5e5}from'@ckeditor/ckeditor5-widget';import{IconTableOfContents as _0x2c6465}from'@ckeditor/ckeditor5-icons';function I(_0x2a2f01){let _0x4e39a6='';for(const _0xdb2aae of _0x2a2f01['getChildren']())_0xdb2aae instanceof _0x335900&&(_0x4e39a6+=_0xdb2aae['data']);return _0x4e39a6;}var L=class extends _0x4c8b3e{static get['pluginName'](){return'DocumentOutlineUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_headingNames']=[];init(){const _0x49fc8e=this['editor'];this['_headingNames']=this['_getHeadingNames']();let _0x3d5be8=[];_0x49fc8e['model']['document']['on']('change',_0xed0d34(()=>{const _0x1a7a34=_0x3d5be8;_0x3d5be8=this['_getOutlineDefinitions']();const _0x58d416=_0x46a626(_0x1a7a34,_0x3d5be8,(_0x4fd234,_0x94893d)=>_0x4fd234['level']===_0x94893d['level']&&_0x4fd234['text']===_0x94893d['text']&&_0x4fd234['modelElement']===_0x94893d['modelElement']),_0x574e50=_0x397844(_0x58d416,_0x3d5be8),_0x4786c2=this['_getActiveHeading'](),_0x64082b=_0x3d5be8['findIndex'](_0x4fb9e6=>_0x4fb9e6['modelElement']===_0x4786c2);_0x574e50['length']&&this['fire']('change',{'outlineDefinitions':_0x3d5be8,'activeItemIndex':_0x64082b,'outlineChanges':_0x574e50}),this['fire']('activeItemIndex',{'index':_0x64082b});},0xfa,{'leading':!0x0,'trailing':!0x0}));}afterInit(){this['_headingNames']['length']||this['_deriveHeadingElementsFromConversion']();}_getOutlineDefinitions(){const _0x378e9d=this['editor'],_0x57e7dd=[],_0x5c3803=this['_headingNames'];for(const _0x476308 of _0x378e9d['model']['document']['getRootNames']())_0x33c788(_0x378e9d['model']['document']['getRoot'](_0x476308));function _0x33c788(_0x460699){for(const _0x4c514c of _0x460699['getChildren']())_0x4c514c['is']('element')&&(_0x5c3803['includes'](_0x4c514c['name'])&&_0x57e7dd['push']({'level':_0x5c3803['indexOf'](_0x4c514c['name'])+0x1,'text':I(_0x4c514c),'modelElement':_0x4c514c}),_0x33c788(_0x4c514c));}return _0x57e7dd;}_getActiveHeading(){const _0x46712d=this['editor']['model']['document']['selection']['getFirstPosition'](),_0x20da31=new _0x5af666({'direction':'backward','startPosition':_0x46712d});for(const _0x4d6db4 of _0x20da31)if(_0x4d6db4['item']['is']('element')&&this['_headingNames']['includes'](_0x4d6db4['item']['name']))return _0x4d6db4['item'];}_getHeadingNames(){const _0x3aceee=this['editor']['config']['get']('documentOutline.headings');return _0x3aceee||function(_0x2d604a){const _0x501b98=_0x2d604a['config']['get']('heading.options');return _0x501b98?_0x501b98['reduce']((_0x513636,_0x553046)=>('paragraph'!==_0x553046['model']&&_0x513636['push'](_0x553046['model']),_0x513636),[]):_0x2d604a['plugins']['has']('GeneralHtmlSupport')?['htmlH1','htmlH2','htmlH3','htmlH4','htmlH5','htmlH6']:[];}(this['editor']);}_deriveHeadingElementsFromConversion(){const _0x9453cd=this['editor'],_0x149540=['h1','h2','h3','h4','h5','h6'],_0x48c6c0=[];for(const _0x8507c0 of _0x149540){const _0x5dee52=_0x9453cd['editing']['view']['domConverter']['domToView'](document['createElement'](_0x8507c0)),_0x448e5a=_0x9453cd['data']['toModel'](_0x5dee52)['getChild'](0x0);_0x448e5a?.['is']('element')&&_0x48c6c0['push'](_0x448e5a['name']);}this['_headingNames']=_0x48c6c0;}};function C(_0x144e33,_0xd41790){const t=_0x144e33['t'];switch(_0xd41790){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 _0xd41790;}}var _=class extends _0xe55380{constructor(_0x11ab29,_0x180de6=!0x1){super(_0x11ab29);const _0x46ac02=this['bindTemplate'],_0x31b5df=_0x180de6?'['+C(_0x11ab29,'Empty\x20heading')+']':'';this['set']('text',''),this['set']('level',0x1),this['set']('isActive',!0x1),this['bind']('isEmpty')['to'](this,'text',_0x194b08=>!_0x194b08),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-document-outline__item',_0x46ac02['to']('level',_0x4e6405=>'ck-document-outline__item_level-'+_0x4e6405),_0x46ac02['if']('isActive','ck-document-outline__item_active'),_0x46ac02['if']('isEmpty','ck-document-outline__item_empty')],'title':_0x46ac02['to']('text')},'children':[{'text':_0x46ac02['to']('text',_0x551b46=>_0x551b46||_0x31b5df)}],'on':{'click':_0x46ac02['to']('click')}});}},k=class extends _0xe55380{items;documentOutlineContainer;showEmptyHeadingText;constructor(_0x4f8113,_0xac4cbb=!0x1,_0x2e78f2){super(_0x4f8113),this['showEmptyHeadingText']=_0xac4cbb,this['set']('activeItemIndex',-0x1),this['documentOutlineContainer']=_0x2e78f2,this['items']=this['createCollection'](),this['items']['delegate']('click')['to'](this),this['on']('click',this['_handleItemClick']['bind'](this)),this['on']('change:activeItemIndex',(_0x1be7df,_0x54e5f6,_0x5584d5,_0x30c66c)=>{this['_setActiveItem'](_0x30c66c,_0x5584d5);}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-document-outline'],'dir':_0x4f8113['contentLanguageDirection'],'data-document-outline-empty-placeholder':C(_0x4f8113,'Editor\x20headings\x20will\x20appear\x20here\x20as\x20you\x20type.'),'tabindex':-0x1},'children':this['items']});}['sync'](_0x123024){_0x123024['forEach'](_0x32976c=>{'insert'==_0x32976c['type']?this['_insertItem'](_0x32976c['index'],..._0x32976c['values']):'delete'==_0x32976c['type']&&this['_deleteItem'](_0x32976c['index'],_0x32976c['howMany']);});}_setActiveItem(_0x11cc29,_0x21c555){if(-0x1!==_0x11cc29){const _0xa57cf7=this['items']['get'](_0x11cc29);_0xa57cf7&&(_0xa57cf7['isActive']=!0x1);}-0x1!==_0x21c555&&(this['items']['get'](_0x21c555)['isActive']=!0x0,this['_scrollToItem'](_0x21c555));}_insertItem(_0x6b2059,..._0xa53596){const _0x21f2c9=_0xa53596['map']((_0x913fe9,_0x254d3b)=>{const _0x380c12=new _(this['locale'],this['showEmptyHeadingText']);return _0x380c12['text']=_0x913fe9['text'],_0x380c12['level']=_0x913fe9['level'],_0x6b2059+_0x254d3b===this['activeItemIndex']&&(_0x380c12['isActive']=!0x0),_0x380c12;});this['items']['addMany'](_0x21f2c9,_0x6b2059);}_deleteItem(_0x3b295f,_0x4afb3d){do{this['items']['remove'](_0x3b295f);}while(--_0x4afb3d);}_handleItemClick(_0x7c3dda){const _0x1cd522=this['items']['getIndex'](_0x7c3dda['source']);this['fire']('itemSelected',_0x1cd522);}_scrollToItem(_0x2360e3){_0x4a2ede(this['items']['get'](_0x2360e3)['element'],0x14,this['documentOutlineContainer']);}destroy(){super['destroy'](),this['element']['remove']();}},x=class extends _0x4c8b3e{['view'];_currentOutlineDefinitions;_updateActiveDefinitionFromViewportThrottled;static get['pluginName'](){return'DocumentOutlineUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4fdeb6){super(_0x4fdeb6),this['view']=new k(_0x4fdeb6['locale'],this['editor']['config']['get']('documentOutline.showEmptyHeadings'),this['editor']['config']['get']('documentOutline.container')),this['_currentOutlineDefinitions']=[],this['_updateActiveDefinitionFromViewportThrottled']=_0x2faa83(this['_updateActiveDefinitionOnViewportChange']['bind'](this),0x64);}init(){const _0x507eef=this['editor'],_0x42d9c2=_0x507eef['plugins']['get']('DocumentOutlineUtils');let _0x209ab1=!0x1;if(this['view']['render'](),this['editor']['ui']['focusTracker']['add'](this['view']['element']),!_0x507eef['config']['get']('documentOutline.container'))throw new _0x4fae0f('document-outline-container-not-provided',{'editor':_0x507eef});_0x507eef['config']['get']('documentOutline.container')['appendChild'](this['view']['element']),_0x42d9c2['on']('change',this['_handleOutlineChange']['bind'](this)),_0x42d9c2['on']('activeItemIndex',(_0x2aded7,{index:_0x48ddd4})=>this['_setActiveViewItem'](_0x48ddd4)),this['view']['on']('itemSelected',(_0x544152,_0x2364c6)=>{_0x209ab1=!0x0,this['_handleItemSelected'](_0x2364c6);});const _0x5bf29c=()=>{_0x209ab1?_0x209ab1=!0x1:this['_updateActiveDefinitionFromViewportThrottled']();};this['view']['listenTo'](_0x289f00['document'],'scroll',_0x5bf29c,{'useCapture':!0x0}),_0x4030fe(_0x507eef['ui']['shadowRootRegistry'],{'emitter':this['view'],'event':'scroll','callback':_0x5bf29c,'listenerOptions':{'useCapture':!0x0}}),this['view']['listenTo'](_0x289f00['window'],'resize',this['_updateActiveDefinitionFromViewportThrottled'],{'useCapture':!0x0});}afterInit(){!async function(_0x52bf6e){const _0x3448f7='uizTdvyBIa4RKsnOYmEXGMfjehwJQqbPSCk7DtZgF58Lxl29Ho6cAUW1pV3Nr0',_0x48d2fe=0x79758,_0x5c3b63={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x5d9e51(_0x2b6834){const _0x40b1a6=new window['Promise'](_0x2998d9=>{_0x2b6834['once']('ready',_0x2998d9);}),_0x672b1e=window['Date']['now'](),_0x3d68d4=_0x2b6834['config']['get']('licenseKey');async function _0x22e2a6(){let _0x1807a7,_0x24a1c6=null,_0x1429cb=null;try{return'GPL'==_0x3d68d4?'NotAllowed':(_0x1807a7=_0x1cea89(),_0x1807a7?(_0x1807a7['usageEndpoint']&&(_0x1429cb=_0x59f31e(_0x1807a7['usageEndpoint'],_0x1807a7['jti'])),await _0x18e748()?_0x3fb760()?_0x42b50d()?'Expired':_0x4e79ca()?('evaluation'==_0x1807a7['licenseType']&&(_0x24a1c6=_0x1398e0('EvaluationLimit')),await _0x1ee588()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x42b50d(){const _0x5c128a=['evaluation','trial']['includes'](_0x1807a7['licenseType'])?_0x672b1e/0x3e8:0xe10*_0x48d2fe;return _0x1807a7['exp']<_0x5c128a;}function _0x3fb760(){const _0x250186=_0x1807a7['features'];return!!_0x250186&&(!!_0x250186['includes']('*')||(!!_0x250186['includes']('DO')||(!!_0x250186['includes']('PP')||!(!_0x250186['includes']('TRILIUM')||!_0x8639f7()))));}function _0x4e79ca(){const _0x3d908c=_0x1807a7['licensedHosts'];if(!_0x3d908c||0x0==_0x3d908c['length'])return!0x0;const {hostname:_0x13efb1}=new URL(window['location']['href']);if(_0x3d908c['includes'](_0x13efb1))return!0x0;const _0x2a0990=_0x13efb1['split']('.');return _0x3d908c['filter'](_0x2fe8fb=>_0x2fe8fb['includes']('*'))['map'](_0x136928=>_0x136928['split']('.'))['filter'](_0x1c0c05=>_0x1c0c05['length']<=_0x2a0990['length'])['map'](_0x244587=>Array(_0x2a0990['length']-_0x244587['length'])['fill']('*'===_0x244587[0x0]?'*':'')['concat'](_0x244587))['some'](_0x3747c3=>_0x2a0990['every']((_0x611b35,_0x426d4f)=>_0x3747c3[_0x426d4f]===_0x611b35||'*'===_0x3747c3[_0x426d4f]));}function _0x1ee588(){return _0x24a1c6&&_0x1429cb?new window['Promise']((_0x4be5bc,_0x3ecd05)=>{_0x24a1c6['then'](_0x4be5bc,_0x3ecd05),_0x1429cb['then'](_0x1a7683=>{'Valid'!=_0x1a7683&&_0x4be5bc(_0x1a7683);},_0x3ecd05);}):_0x24a1c6||_0x1429cb||'Valid';}}function _0x59f31e(_0x1c0239,_0x3d9212){return new window['Promise'](_0x1262de=>{if(_0x469398())return _0x1262de('Valid');_0x1c46ba(),_0x2b6834['decorate']('_sendUsageRequest');let _0x30bf54=!0x1;const _0x2ed3d4=_0x2783d6();function _0x3f8596(_0xe7747d){return!!_0xe7747d&&('object'==typeof _0xe7747d||'function'==typeof _0xe7747d)&&'function'==typeof _0xe7747d['then']&&'function'==typeof _0xe7747d['catch'];}function _0x2cff08(_0x1fcc1f){_0x156e7b(_0x1fcc1f)['then'](_0x58e54f=>_0x58e54f&&'ok'==_0x58e54f['status']?_0x521282(_0x1926d2(_0x2ed3d4+_0x3d9212))!=_0x58e54f['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x5cec43=>(_0x2dc839(),_0x5cec43),()=>{const _0x1da952=_0x3d19ff();return null==_0x1da952?(_0x2dc839(),'Valid'):_0x672b1e-_0x1da952>0x240c8400?'UsageLimit':'Valid';})['then'](_0x1262de)['catch'](()=>{_0x1262de('UsageLimit');});const _0x53277e=0x36ee80;function _0x2dc839(){const _0x4eabf8='llct-'+_0x521282(_0x1926d2(_0x1c0239)),_0x356aa2=_0x30c46e(_0x521282(window['Math']['ceil'](_0x672b1e/_0x53277e)));window['localStorage']['setItem'](_0x4eabf8,_0x356aa2);}function _0x3d19ff(){const _0x3f9ef3='llct-'+_0x521282(_0x1926d2(_0x1c0239)),_0x6746da=window['localStorage']['getItem'](_0x3f9ef3);return _0x6746da?window['parseInt'](_0x30c46e(_0x6746da),0x10)*_0x53277e:null;}function _0x156e7b(_0x3ac2fe){return new window['Promise']((_0x403117,_0x27db2a)=>{_0x3ac2fe['then'](_0x403117,_0x27db2a),window['setTimeout'](_0x27db2a,0x1d4c0);});}}_0x2b6834['on']('_sendUsageRequest',(_0x515d12,_0x2aeb9b)=>{if(_0x2aeb9b[0x0]!=_0x1c0239)return _0x1262de('UsageLimit');_0x2aeb9b[0x1]={..._0x2aeb9b[0x1],'requestId':_0x2ed3d4};},{'priority':'high'}),_0x2b6834['on']('_sendUsageRequest',_0x5a2085=>{_0x3f8596(_0x5a2085['return'])&&(_0x30bf54=!0x0,_0x2cff08(_0x5a2085['return']));},{'priority':'low'}),_0x40b1a6['then'](()=>{_0x30bf54||_0x1262de('UsageLimit');});});function _0x469398(){return'auto'==_0x2b6834['editing']['view']['_overlayModeHint'];}function _0x1c46ba(){_0x2b6834['editing']['view']['_overlayModeHint']='auto';}}function _0x1398e0(_0x569a89){const _0x377099=[new window['Promise'](_0x526048=>setTimeout(_0x526048,0x93ecc)),_0x40b1a6['then'](()=>new window['Promise'](_0x3d68b2=>{let _0xffd17b=0x0;_0x2b6834['model']['on']('applyOperation',(_0xd9f9e5,_0x255b2b)=>{_0x255b2b[0x0]['isDocumentOperation']&&_0xffd17b++,0x5e8==_0xffd17b&&(_0x3d68b2(),_0xd9f9e5['off']());});}))];return window['Promise']['race'](_0x377099)['then'](()=>_0x569a89);}async function _0xd003f6(){await _0x40b1a6,_0x2b6834['model']['change']=_0x5879ac,_0x2b6834['model']['enqueueChange']=_0x5879ac,_0x2b6834['enableReadOnlyMode']('model');}function _0x8639f7(){return window['glob']&&window['glob']['triliumVersion'];}function _0x9e957f(_0x14e383){const _0x1dc1b1=_0x26ec54();_0x2b6834[_0x1dc1b1]='documentOutlineLicenseKey'+_0x14e383,'Valid'!=_0x14e383&&_0xd003f6();}function _0x26ec54(){const _0x5d4740=window['String'](window['performance']['now']())['replace']('.','');let _0x25a600='u';for(let _0x36f1aa=0x0;_0x36f1aa<_0x5d4740['length'];_0x36f1aa+=0x2){let _0x5665e2=window['parseInt'](_0x5d4740['substring'](_0x36f1aa,_0x36f1aa+0x2));_0x5665e2>=0x3e&&(_0x5665e2-=0x3e),_0x25a600+=_0x3448f7[_0x5665e2];}return _0x25a600;}function _0x1cea89(){const _0x1c368c=_0x3d68d4['split']('.');if(0x3!=_0x1c368c['length'])return null;return _0x37c601(_0x1c368c[0x1]);function _0x37c601(_0x4c7374){const _0x5a1dd1=_0x1623cf(_0x4c7374);return _0x5a1dd1&&_0x5839f3()?_0x5a1dd1:null;function _0x5839f3(){const _0x5e7578=_0x5a1dd1['jti'],_0x4ee2cb=window['parseInt'](_0x5e7578['substring'](_0x5e7578['length']-0x8),0x10),_0x25d68b={..._0x5a1dd1,'jti':_0x5e7578['substring'](0x0,_0x5e7578['length']-0x8)};return delete _0x25d68b['vc'],_0x1926d2(_0x25d68b)==_0x4ee2cb;}}}async function _0x18e748(){let _0x27c16f=!0x0;try{const [_0xe8f4ed,_0x3d9099,_0x3cbf7d]=_0x3d68d4['split']('.');return _0x2091da(_0xe8f4ed),await _0x5b113f(_0xe8f4ed,_0x3d9099,_0x3cbf7d),_0x27c16f;}catch{return!0x1;}function _0x2091da(_0x4c7a0e){const _0x3cc03a=_0x1623cf(_0x4c7a0e);_0x3cc03a&&'ES256'==_0x3cc03a['alg']||(_0x27c16f=!0x1);}async function _0x5b113f(_0x1f19eb,_0x2a3399,_0x3b94e5){const _0x3b6153=window['Uint8Array']['from'](_0x506418(_0x3b94e5),_0x25bfd8=>_0x25bfd8['charCodeAt'](0x0)),_0x539934=new window['TextEncoder']()['encode'](_0x1f19eb+'.'+_0x2a3399),_0x8b79be=window['crypto']['subtle'];if(!_0x8b79be)return;const _0x18ef47=await _0x8b79be['importKey']('jwk',_0x5c3b63,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x8b79be['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x18ef47,_0x3b6153,_0x539934)||(_0x27c16f=!0x1);}}function _0x1623cf(_0x4c71e9){return _0x4c71e9['startsWith']('ey')?JSON['parse'](_0x506418(_0x4c71e9)):null;}function _0x506418(_0x325068){return window['atob'](_0x325068['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x1926d2(_0x5754fc){let _0x3cf839=0x1505;function _0x51a1cd(_0x27a4dc){for(let _0x4622ee=0x0;_0x4622ee<_0x27a4dc['length'];_0x4622ee++){const _0x3a8adb=_0x27a4dc['charCodeAt'](_0x4622ee);_0x3cf839=(_0x3cf839<<0x5)+_0x3cf839+_0x3a8adb,_0x3cf839&=_0x3cf839;}}function _0x320529(_0x551111){Array['isArray'](_0x551111)?_0x551111['forEach'](_0x320529):_0x551111&&'object'==typeof _0x551111?Object['entries'](_0x551111)['sort']()['forEach'](([_0x5f1a23,_0x5746da])=>{_0x51a1cd(_0x5f1a23),_0x320529(_0x5746da);}):_0x51a1cd(window['String'](_0x551111));}return _0x320529(_0x5754fc),_0x3cf839>>>0x0;}function _0x521282(_0x1211a8){return _0x1211a8['toString'](0x10)['padStart'](0x8,'0');}function _0x30c46e(_0x55dde9){return _0x55dde9['split']('')['reverse']()['join']('');}function _0x5879ac(){}_0x9e957f(await _0x22e2a6());}_0x5d9e51(_0x52bf6e['editor']);}(this);}destroy(){super['destroy'](),this['view']['destroy'](),this['_updateActiveDefinitionFromViewportThrottled']['cancel']();}_handleOutlineChange(_0x2243ff,{outlineDefinitions:_0x5ff007,outlineChanges:_0x10af1d}){this['_currentOutlineDefinitions']=_0x5ff007,this['view']['sync'](_0x10af1d);}_setActiveViewItem(_0x4e6304){this['_currentOutlineDefinitions']['length']&&this['_currentOutlineDefinitions'][_0x4e6304]&&(this['view']['activeItemIndex']=_0x4e6304);}_handleItemSelected(_0x4b12af){const _0x5e438a=this['_currentOutlineDefinitions'][_0x4b12af]['modelElement'];this['editor']['model']['change'](_0x31c6bd=>{_0x31c6bd['setSelection'](_0x5e438a,0x0);}),this['editor']['editing']['view']['scrollToTheSelection']({'alignToTop':!0x0,'forceScroll':!0x0}),this['editor']['editing']['view']['focus'](),this['_setActiveViewItem'](_0x4b12af);}_updateActiveDefinitionOnViewportChange(){const _0x488ac8=this['editor'];let _0x289af7;for(const _0x19a7a6 of _0x488ac8['model']['document']['getRootNames']()){const _0x5a1765=_0x488ac8['editing']['view']['getDomRoot'](_0x19a7a6),_0x4e7b6c=_0x5a1765&&new _0x584338(_0x5a1765)['getVisible']();if(_0x4e7b6c){const _0x387519=new _0x584338(_0x289f00['window'])['getIntersection'](_0x4e7b6c);_0x387519&&(_0x289af7=_0x387519['top']+0.25*_0x387519['height']);}}if(void 0x0===_0x289af7)return;const _0x40d629=E(_0x488ac8['editing'],this['_currentOutlineDefinitions'],_0x289af7);_0x40d629?this['_setActiveViewItem'](this['_currentOutlineDefinitions']['indexOf'](_0x40d629)):this['_setActiveViewItem'](-0x1);}};function E(_0x13f89d,_0x1c5b72,_0x1cd9d4,_0x19ddee=0x0,_0x47a1d3=_0x1c5b72['length']-0x1){const _0x41c970=Math['floor'](_0x19ddee+(_0x47a1d3-_0x19ddee)/0x2);if(_0x47a1d3>=_0x19ddee){const _0x237c73=_0x1c5b72[_0x41c970],_0x85985c=_0x13f89d['mapper']['toViewElement'](_0x237c73['modelElement']);if(!_0x85985c)return null;const _0xa6d8b7=_0x13f89d['view']['domConverter']['mapViewToDom'](_0x85985c);return new _0x584338(_0xa6d8b7)['bottom']>_0x1cd9d4?E(_0x13f89d,_0x1c5b72,_0x1cd9d4,_0x19ddee,_0x41c970-0x1):E(_0x13f89d,_0x1c5b72,_0x1cd9d4,_0x41c970+0x1,_0x47a1d3);}return _0x41c970<0x0?null:_0x1c5b72[_0x41c970];}var K=class extends _0x4c8b3e{['licenseKey'];_licenseKeyCheckInterval;static get requires(){return[L,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 _0x57ee71=[this['editor']];for(const _0x4c9745 of _0x57ee71){let _0x47fcf3;for(const _0xf3c4a4 in _0x4c9745){const _0x7752d1=_0xf3c4a4,_0x3086ef=_0x4c9745[_0x7752d1];if('documentOutlineLicenseKeyValid'==_0x3086ef||'documentOutlineLicenseKeyInvalid'==_0x3086ef||'documentOutlineLicenseKeyExpired'==_0x3086ef||'documentOutlineLicenseKeyDomainLimit'==_0x3086ef||'documentOutlineLicenseKeyNotAllowed'==_0x3086ef||'documentOutlineLicenseKeyEvaluationLimit'==_0x3086ef||'documentOutlineLicenseKeyUsageLimit'==_0x3086ef){delete _0x4c9745[_0x7752d1],_0x47fcf3=_0x3086ef,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'documentOutlineLicenseKeyInvalid'==_0x47fcf3&&_0x4c9745['_showLicenseError']('invalid'),'documentOutlineLicenseKeyExpired'==_0x47fcf3&&_0x4c9745['_showLicenseError']('expired'),'documentOutlineLicenseKeyDomainLimit'==_0x47fcf3&&_0x4c9745['_showLicenseError']('domainLimit'),'documentOutlineLicenseKeyNotAllowed'==_0x47fcf3&&_0x4c9745['_showLicenseError']('featureNotAllowed','DocumentOutline'),'documentOutlineLicenseKeyEvaluationLimit'==_0x47fcf3&&_0x4c9745['_showLicenseError']('evaluationLimit'),'documentOutlineLicenseKeyUsageLimit'==_0x47fcf3&&_0x4c9745['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},A=class extends _0x392b4a{execute(){this['editor']['model']['change'](_0x331a50=>{this['editor']['model']['insertObject'](_0x331a50['createElement']('tableOfContents'));});}['refresh'](){const _0x1292b4=this['editor']['model'],_0x158ed8=_0x1292b4['document']['selection']['getFirstPosition']();this['isEnabled']=null!==(_0x158ed8&&_0x1292b4['schema']['findAllowedParent'](_0x158ed8,'tableOfContents'));}},N=class extends _0x4c8b3e{static get['pluginName'](){return'HeadingId';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}afterInit(){const _0x1619b7=this['editor'];if(_0x1619b7['config']['get']('headingId.modelAttributeName'))return;const {viewNames:_0xd9c19a,modelNames:_0x3fbd63}=function(_0x53fe11){const _0x37a712=new Set(['h1','h2','h3','h4','h5','h6']),_0x38f003=new Set(['heading1','heading2','heading3','heading4','heading5','heading6','htmlH1','htmlH2','htmlH3','htmlH4','htmlH5','htmlH6']);if(!_0x53fe11)return{'viewNames':_0x37a712,'modelNames':_0x38f003};for(const _0xbcc45e of _0x53fe11){if('paragraph'===_0xbcc45e['model'])continue;const _0x18289e='string'==typeof _0xbcc45e['view']?_0xbcc45e['view']:_0xbcc45e['view']['name'];_0x37a712['add'](_0x18289e),_0x38f003['add'](_0xbcc45e['model']);}return{'viewNames':_0x37a712,'modelNames':_0x38f003};}(this['editor']['config']['get']('heading.options'));for(const _0x45fab1 of _0xd9c19a)this['_customUpcastHeadingsConversion'](_0x45fab1);for(const _0x42f590 of _0x3fbd63)this['_customDataDowncastHeadingsConversion'](_0x42f590),_0x1619b7['model']['schema']['isRegistered'](_0x42f590)&&_0x1619b7['model']['schema']['extend'](_0x42f590,{'allowAttributes':'headingId'});this['_registerHeadingIdAttributePostfixer'](_0x3fbd63);}_customUpcastHeadingsConversion(_0x3fd0f8){this['editor']['conversion']['for']('upcast')['add'](_0x317a6f=>_0x317a6f['on']('element:'+_0x3fd0f8,(_0x49ec2c,_0x5f4152,_0x3e4311)=>{const {consumable:_0x3dbda6,writer:_0x3dc42a}=_0x3e4311,_0x303df6=_0x5f4152['viewItem']['getAttribute']('id'),_0x369f48=_0x5f4152['modelRange']?.['getContainedElement']();if(_0x369f48)return _0x303df6&&_0x303df6['length']||_0x369f48['hasAttribute']('headingId')?void(_0x3dbda6['consume'](_0x5f4152['viewItem'],{'attributes':['id']})&&_0x3dc42a['setAttribute']('headingId',_0x303df6,_0x369f48)):(_0x3dbda6['consume'](_0x5f4152['viewItem'],{'attributes':['id']}),void _0x3dc42a['setAttribute']('headingId',_0x2783d6(),_0x369f48));},{'priority':_0x5bf6ba['get']('low')+0.5}));}_customDataDowncastHeadingsConversion(_0x4fbc06){this['editor']['conversion']['for']('downcast')['add'](_0x8c226a=>_0x8c226a['on']('attribute:headingId:'+_0x4fbc06,(_0x188e44,_0x4f293d,_0x441583)=>{if(!_0x441583['consumable']['consume'](_0x4f293d['item'],_0x188e44['name']))return;const _0x155bcc=_0x4f293d['item']['getAttribute']('headingId'),_0x10196f=_0x441583['mapper']['toViewElement'](_0x4f293d['item']);_0x441583['writer']['setAttribute']('id',_0x155bcc,_0x10196f);}));}_registerHeadingIdAttributePostfixer(_0x49f795){const _0x12f13d=this['editor'],_0x3e0975=new Set(),_0x48ab0a=new Set();function _0x2b0cf6(_0x397c0e,_0x51fa1f){const _0x2b5c17=_0x2783d6();return _0x48ab0a['add'](_0x2b5c17),_0x397c0e['setAttribute']('headingId',_0x2b5c17,_0x51fa1f),_0x2b5c17;}function _0x530751(_0x4d344d,_0x360518){_0x4d344d['removeAttribute']('headingId',_0x360518);}_0x12f13d['model']['document']['registerPostFixer'](_0x231229=>{const _0x30c7bf=_0x12f13d['model']['document']['differ']['getChanges']();let _0x9c8f7=!0x1;for(const _0x13bc88 of _0x30c7bf)if('insert'==_0x13bc88['type']&&_0x13bc88['name']){if(_0x49f795['has'](_0x13bc88['name'])){const _0x90f673=_0x13bc88['attributes']['get']('headingId');'string'==typeof _0x90f673?_0x3e0975['has'](_0x90f673)?(_0x2b0cf6(_0x231229,_0x13bc88['position']['nodeAfter']),_0x9c8f7=!0x0):_0x48ab0a['add'](_0x90f673):(_0x2b0cf6(_0x231229,_0x13bc88['position']['nodeAfter']),_0x9c8f7=!0x0);}else'string'==typeof _0x13bc88['attributes']['get']('headingId')&&(_0x530751(_0x231229,_0x13bc88['position']['nodeAfter']),_0x9c8f7=!0x0);}else{if('remove'==_0x13bc88['type']){const _0x54de06=_0x13bc88['attributes']['get']('headingId');'string'==typeof _0x54de06&&_0x3e0975['delete'](_0x54de06);}}return _0x9c8f7;}),_0x12f13d['model']['document']['on']('change',()=>{_0x48ab0a['forEach'](_0x490778=>_0x3e0975['add'](_0x490778)),_0x48ab0a['clear']();});}},D=class extends _0x4c8b3e{static get['pluginName'](){return'TableOfContentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_0x1b094c,L,N];}_currentOutlineDefinitions;_tableOfContentsElements;_headingIdModelAttributeName;constructor(_0x9961a7){super(_0x9961a7),this['_currentOutlineDefinitions']=[],this['_tableOfContentsElements']=new Set(),this['_headingIdModelAttributeName']='headingId';}init(){const _0x23b7cd=this['editor'],_0x31ff0e=_0x23b7cd['editing']['view']['document'];_0x23b7cd['config']['get']('headingId.modelAttributeName')&&(this['_headingIdModelAttributeName']=_0x23b7cd['config']['get']('headingId.modelAttributeName')),this['listenTo'](_0x31ff0e,'click',(_0x58330f,_0x587f94)=>{if(!_0x587f94['target'])return;const _0x4a218f=_0x587f94['target']['getCustomProperty']('tableOfContentsHeadingIndex');Number['isInteger'](_0x4a218f)&&(_0x587f94['domEvent']['preventDefault'](),_0x58330f['stop'](),this['_handleScrollToHeading'](_0x4a218f));},{'priority':'high','context':'$capture'}),this['_defineSchema'](),this['_defineConverters'](),_0x23b7cd['commands']['add']('insertTableOfContents',new A(_0x23b7cd));const _0x35728a=_0x23b7cd['config']['get']('tableOfContents.headings');_0x35728a&&_0x35728a['length']?this['listenTo'](_0x23b7cd['model']['document'],'change:data',()=>{this['_currentOutlineDefinitions']=this['_getOutlineDefinitions'](_0x35728a),this['_updateTableOfContentsElements']();}):_0x23b7cd['plugins']['get']('DocumentOutlineUtils')['on']('change',(_0x2db10f,_0x58bd0f)=>{this['_currentOutlineDefinitions']=_0x58bd0f['outlineDefinitions'],this['_updateTableOfContentsElements']();}),this['listenTo'](_0x23b7cd['model']['document'],'change',()=>{this['_trackNewToCElements']();});}afterInit(){!async function(_0x212d69){const _0x4ef031='DUA610emL4Q2kjVIvGMHgWT3uySnzPEw79oZJiCrbstcXKq85NhdfaFRxBlpOY',_0x24f97f=0x79758,_0x53ae80={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x42c65d(_0x44ca56){const _0xe1a09f=new window['Promise'](_0x18222b=>{_0x44ca56['once']('ready',_0x18222b);}),_0x1190d6=window['Date']['now'](),_0x3ef05c=_0x44ca56['config']['get']('licenseKey');async function _0x59f875(){let _0x9109b5,_0x204e53=null,_0x21c70c=null;try{return'GPL'==_0x3ef05c?'NotAllowed':(_0x9109b5=_0x2f74ba(),_0x9109b5?(_0x9109b5['usageEndpoint']&&(_0x21c70c=_0x22c30c(_0x9109b5['usageEndpoint'],_0x9109b5['jti'])),await _0x47a4c5()?_0x20312b()?_0x11af3c()?'Expired':_0x19708e()?('evaluation'==_0x9109b5['licenseType']&&(_0x204e53=_0x4871ac('EvaluationLimit')),await _0x24bcc8()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x11af3c(){const _0x151490=['evaluation','trial']['includes'](_0x9109b5['licenseType'])?_0x1190d6/0x3e8:0xe10*_0x24f97f;return _0x9109b5['exp']<_0x151490;}function _0x20312b(){const _0x52264e=_0x9109b5['features'];return!!_0x52264e&&(!!_0x52264e['includes']('*')||(!!_0x52264e['includes']('TOC')||(!!_0x52264e['includes']('PP')||!(!_0x52264e['includes']('TRILIUM')||!_0x4ae705()))));}function _0x19708e(){const _0x4afae4=_0x9109b5['licensedHosts'];if(!_0x4afae4||0x0==_0x4afae4['length'])return!0x0;const {hostname:_0x50f2db}=new URL(window['location']['href']);if(_0x4afae4['includes'](_0x50f2db))return!0x0;const _0x59f70d=_0x50f2db['split']('.');return _0x4afae4['filter'](_0x53977d=>_0x53977d['includes']('*'))['map'](_0x2deece=>_0x2deece['split']('.'))['filter'](_0x391cb5=>_0x391cb5['length']<=_0x59f70d['length'])['map'](_0x3500f1=>Array(_0x59f70d['length']-_0x3500f1['length'])['fill']('*'===_0x3500f1[0x0]?'*':'')['concat'](_0x3500f1))['some'](_0x2d2ce4=>_0x59f70d['every']((_0x25700e,_0x4a78b5)=>_0x2d2ce4[_0x4a78b5]===_0x25700e||'*'===_0x2d2ce4[_0x4a78b5]));}function _0x24bcc8(){return _0x204e53&&_0x21c70c?new window['Promise']((_0x40d489,_0x32b939)=>{_0x204e53['then'](_0x40d489,_0x32b939),_0x21c70c['then'](_0x1b2e44=>{'Valid'!=_0x1b2e44&&_0x40d489(_0x1b2e44);},_0x32b939);}):_0x204e53||_0x21c70c||'Valid';}}function _0x22c30c(_0x56763b,_0x18e5d9){return new window['Promise'](_0x4dc850=>{if(_0x5def73())return _0x4dc850('Valid');_0x55d3e1(),_0x44ca56['decorate']('_sendUsageRequest');let _0x36b86d=!0x1;const _0x3a6be4=_0x2783d6();function _0x2ff773(_0x14d0cb){return!!_0x14d0cb&&('object'==typeof _0x14d0cb||'function'==typeof _0x14d0cb)&&'function'==typeof _0x14d0cb['then']&&'function'==typeof _0x14d0cb['catch'];}function _0x574010(_0x188fac){_0x285e35(_0x188fac)['then'](_0x313ca9=>_0x313ca9&&'ok'==_0x313ca9['status']?_0x17fa6d(_0x4f4bec(_0x3a6be4+_0x18e5d9))!=_0x313ca9['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x558f97=>(_0x174a6b(),_0x558f97),()=>{const _0x5d1a6d=_0x262d8c();return null==_0x5d1a6d?(_0x174a6b(),'Valid'):_0x1190d6-_0x5d1a6d>0x240c8400?'UsageLimit':'Valid';})['then'](_0x4dc850)['catch'](()=>{_0x4dc850('UsageLimit');});const _0x564cd8=0x36ee80;function _0x174a6b(){const _0x44736d='llct-'+_0x17fa6d(_0x4f4bec(_0x56763b)),_0x54609b=_0xa7e5b1(_0x17fa6d(window['Math']['ceil'](_0x1190d6/_0x564cd8)));window['localStorage']['setItem'](_0x44736d,_0x54609b);}function _0x262d8c(){const _0x4a63a4='llct-'+_0x17fa6d(_0x4f4bec(_0x56763b)),_0x37c6f6=window['localStorage']['getItem'](_0x4a63a4);return _0x37c6f6?window['parseInt'](_0xa7e5b1(_0x37c6f6),0x10)*_0x564cd8:null;}function _0x285e35(_0xc3901e){return new window['Promise']((_0x1b77cc,_0x105601)=>{_0xc3901e['then'](_0x1b77cc,_0x105601),window['setTimeout'](_0x105601,0x1d4c0);});}}_0x44ca56['on']('_sendUsageRequest',(_0x2df257,_0x1518c0)=>{if(_0x1518c0[0x0]!=_0x56763b)return _0x4dc850('UsageLimit');_0x1518c0[0x1]={..._0x1518c0[0x1],'requestId':_0x3a6be4};},{'priority':'high'}),_0x44ca56['on']('_sendUsageRequest',_0xfb0b1f=>{_0x2ff773(_0xfb0b1f['return'])&&(_0x36b86d=!0x0,_0x574010(_0xfb0b1f['return']));},{'priority':'low'}),_0xe1a09f['then'](()=>{_0x36b86d||_0x4dc850('UsageLimit');});});function _0x5def73(){return'auto'==_0x44ca56['editing']['view']['_overlayModeHint'];}function _0x55d3e1(){_0x44ca56['editing']['view']['_overlayModeHint']='auto';}}function _0x4871ac(_0x530997){const _0x401f11=[new window['Promise'](_0x3e96d3=>setTimeout(_0x3e96d3,0x93ecc)),_0xe1a09f['then'](()=>new window['Promise'](_0x51be7f=>{let _0x3c9a26=0x0;_0x44ca56['model']['on']('applyOperation',(_0x14c948,_0x520fd0)=>{_0x520fd0[0x0]['isDocumentOperation']&&_0x3c9a26++,0x5e8==_0x3c9a26&&(_0x51be7f(),_0x14c948['off']());});}))];return window['Promise']['race'](_0x401f11)['then'](()=>_0x530997);}async function _0x3b18c6(){await _0xe1a09f,_0x44ca56['model']['change']=_0x15d402,_0x44ca56['model']['enqueueChange']=_0x15d402,_0x44ca56['enableReadOnlyMode']('model');}function _0x4ae705(){return window['glob']&&window['glob']['triliumVersion'];}function _0xff25f2(_0x1e836b){const _0x2987e3=_0x3cb324();_0x44ca56[_0x2987e3]='tableOfContentsLicenseKey'+_0x1e836b,'Valid'!=_0x1e836b&&_0x3b18c6();}function _0x3cb324(){const _0x1d2e56=window['String'](window['performance']['now']())['replace']('.','');let _0x554945='D';for(let _0x5622e1=0x0;_0x5622e1<_0x1d2e56['length'];_0x5622e1+=0x2){let _0x3df65a=window['parseInt'](_0x1d2e56['substring'](_0x5622e1,_0x5622e1+0x2));_0x3df65a>=0x3e&&(_0x3df65a-=0x3e),_0x554945+=_0x4ef031[_0x3df65a];}return _0x554945;}function _0x2f74ba(){const _0x47f03a=_0x3ef05c['split']('.');if(0x3!=_0x47f03a['length'])return null;return _0x239933(_0x47f03a[0x1]);function _0x239933(_0x5442f9){const _0x36ca50=_0x2e58b6(_0x5442f9);return _0x36ca50&&_0x412718()?_0x36ca50:null;function _0x412718(){const _0x3a225a=_0x36ca50['jti'],_0x4b1ee1=window['parseInt'](_0x3a225a['substring'](_0x3a225a['length']-0x8),0x10),_0xeccbe2={..._0x36ca50,'jti':_0x3a225a['substring'](0x0,_0x3a225a['length']-0x8)};return delete _0xeccbe2['vc'],_0x4f4bec(_0xeccbe2)==_0x4b1ee1;}}}async function _0x47a4c5(){let _0x576714=!0x0;try{const [_0x448856,_0x2f286b,_0x4cb838]=_0x3ef05c['split']('.');return _0x345525(_0x448856),await _0xcf70f4(_0x448856,_0x2f286b,_0x4cb838),_0x576714;}catch{return!0x1;}function _0x345525(_0x516c6f){const _0x4d7092=_0x2e58b6(_0x516c6f);_0x4d7092&&'ES256'==_0x4d7092['alg']||(_0x576714=!0x1);}async function _0xcf70f4(_0x34af78,_0x10c2fc,_0x13cba4){const _0xed38b9=window['Uint8Array']['from'](_0x3e5aff(_0x13cba4),_0x340e10=>_0x340e10['charCodeAt'](0x0)),_0x23f265=new window['TextEncoder']()['encode'](_0x34af78+'.'+_0x10c2fc),_0xf129c4=window['crypto']['subtle'];if(!_0xf129c4)return;const _0x558f1c=await _0xf129c4['importKey']('jwk',_0x53ae80,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0xf129c4['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x558f1c,_0xed38b9,_0x23f265)||(_0x576714=!0x1);}}function _0x2e58b6(_0x276e80){return _0x276e80['startsWith']('ey')?JSON['parse'](_0x3e5aff(_0x276e80)):null;}function _0x3e5aff(_0x43f7f9){return window['atob'](_0x43f7f9['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x4f4bec(_0x45da58){let _0x11ad42=0x1505;function _0x288b23(_0x64a4f){for(let _0x12b322=0x0;_0x12b322<_0x64a4f['length'];_0x12b322++){const _0x2a1452=_0x64a4f['charCodeAt'](_0x12b322);_0x11ad42=(_0x11ad42<<0x5)+_0x11ad42+_0x2a1452,_0x11ad42&=_0x11ad42;}}function _0x1b318c(_0x3cc86b){Array['isArray'](_0x3cc86b)?_0x3cc86b['forEach'](_0x1b318c):_0x3cc86b&&'object'==typeof _0x3cc86b?Object['entries'](_0x3cc86b)['sort']()['forEach'](([_0x411b33,_0x14bf38])=>{_0x288b23(_0x411b33),_0x1b318c(_0x14bf38);}):_0x288b23(window['String'](_0x3cc86b));}return _0x1b318c(_0x45da58),_0x11ad42>>>0x0;}function _0x17fa6d(_0x1cc3af){return _0x1cc3af['toString'](0x10)['padStart'](0x8,'0');}function _0xa7e5b1(_0x401b61){return _0x401b61['split']('')['reverse']()['join']('');}function _0x15d402(){}_0xff25f2(await _0x59f875());}_0x42c65d(_0x212d69['editor']);}(this);}_updateTableOfContentsElements(){this['_tableOfContentsElements']['forEach'](_0x7b24=>{'$graveyard'!==_0x7b24['rootName']&&this['editor']['editing']['reconvertItem'](_0x7b24);});}_trackNewToCElements(){for(const _0x49f525 of this['editor']['model']['document']['differ']['getChanges']({'includeChangesInGraveyard':!0x0})){if('insert'!==_0x49f525['type']||'tableOfContents'!==_0x49f525['name'])return;this['_tableOfContentsElements']['add'](_0x49f525['position']['nodeAfter']);}}_getOutlineDefinitions(_0x1bf512){const _0x402005=this['editor'],_0x152ae9=[];for(const _0x4b52e7 of _0x402005['model']['document']['getRootNames']())_0x18d03c(_0x402005['model']['document']['getRoot'](_0x4b52e7));function _0x18d03c(_0x1dc263){for(const _0x1ff11c of _0x1dc263['getChildren']())_0x1ff11c['is']('element')&&(_0x1bf512['includes'](_0x1ff11c['name'])&&_0x152ae9['push']({'level':_0x1bf512['indexOf'](_0x1ff11c['name'])+0x1,'text':I(_0x1ff11c),'modelElement':_0x1ff11c}),_0x18d03c(_0x1ff11c));}return _0x152ae9;}['_defineSchema'](){this['editor']['model']['schema']['register']('tableOfContents',{'inheritAllFrom':'$blockObject'});}_defineConverters(){const _0x14e0d1=this['editor']['conversion'];_0x14e0d1['for']('upcast')['elementToElement']({'model':'tableOfContents','view':{'name':'div','classes':'table-of-contents'}}),_0x14e0d1['for']('dataDowncast')['elementToStructure']({'model':'tableOfContents','view':(_0x2607f3,{writer:_0x1df02b})=>this['_createTableOfContents'](_0x1df02b,!0x0)}),_0x14e0d1['for']('editingDowncast')['elementToStructure']({'model':'tableOfContents','view':(_0x28399a,{writer:_0x51056f})=>{this['_tableOfContentsElements']['add'](_0x28399a);const _0xdf054a=this['_createTableOfContents'](_0x51056f);return _0x2cb5e5(_0xdf054a,_0x51056f,{'label':C(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(_0x2355e9,_0x4d3635=!0x1){const {locale:_0x3b60a0}=this['editor'],_0x47cb35=_0x2355e9['createContainerElement']('div',{'class':'table-of-contents'+(0x0===this['_currentOutlineDefinitions']['length']?'\x20table-of-contents_empty':''),...!_0x4d3635&&{'data-table-of-contents-label':C(_0x3b60a0,'Table\x20of\x20contents')}});0x0===this['_currentOutlineDefinitions']['length']&&!0x1===_0x4d3635&&_0x2355e9['insert'](_0x2355e9['createPositionAt'](_0x47cb35,'end'),_0x2355e9['createContainerElement']('p',{'class':'table-of-contents__placeholder'},[_0x2355e9['createText'](C(_0x3b60a0,'No\x20headings\x20were\x20found\x20in\x20the\x20document.'))]));const _0x393007=_0x4d3635?'':'['+C(_0x3b60a0,'Empty\x20heading')+']';let _0x5583e4=_0x47cb35;return this['_currentOutlineDefinitions']['forEach']((_0x2b0859,_0x4618f3,_0x541516)=>{const _0x1b9253=this['editor']['model']['hasContent'](_0x2b0859['modelElement'],{'ignoreWhitespaces':!0x0}),_0x56c3f4=_0x1b9253?_0x2b0859['text']:_0x393007,_0x426fb5=_0x2b0859['modelElement']['getAttribute'](this['_headingIdModelAttributeName']),_0xd4c281=_0x2355e9['createContainerElement']('a',{'href':'#'+_0x426fb5,...!_0x4d3635&&{'tabindex':'-1'}},[_0x2355e9['createText'](_0x56c3f4)]),_0x4e3bf6=this['editor']['config']['get']('documentOutline.showEmptyHeadings');_0x2355e9['setCustomProperty']('tableOfContentsHeadingIndex',_0x4618f3,_0xd4c281);const _0x15e903=_0x2355e9['createContainerElement']('li',null,[_0x1b9253||!_0x4d3635&&_0x4e3bf6?_0xd4c281:_0x2355e9['createText']('')]),_0x2d2f57=_0x4618f3?_0x541516[_0x4618f3-0x1]['level']:0x0,_0x33bd6b=Math['abs'](_0x2b0859['level']-_0x2d2f57);if(_0x2b0859['level']>_0x2d2f57){const _0x2e674b=H(_0x15e903,_0x33bd6b,_0x2355e9);_0x2355e9['insert'](_0x2355e9['createPositionAt'](_0x5583e4,'end'),_0x2e674b);}else{const _0x4d7f63=function(_0x36d36f,_0x2eac24){return _0x36d36f['getAncestors']({'includeSelf':!0x0,'parentFirst':!0x0})['filter'](_0xa909b1=>_0xa909b1['is']('element','ol'))[_0x2eac24];}(_0x5583e4,_0x33bd6b);_0x2355e9['insert'](_0x2355e9['createPositionAt'](_0x4d7f63,'end'),_0x15e903);}_0x5583e4=_0x15e903;}),_0x47cb35;}['_handleScrollToHeading'](_0x5660b8){const _0x3b6bbb=this['_currentOutlineDefinitions'][_0x5660b8]['modelElement'];this['editor']['model']['change'](_0x5b1c19=>{_0x5b1c19['setSelection'](_0x3b6bbb,0x0);}),this['editor']['editing']['view']['scrollToTheSelection']({'alignToTop':!0x0,'forceScroll':!0x0});}_redirectMapper(){return(_0x1332b9,_0x283a51)=>{const _0x116dea=_0x283a51['mapper'],_0x694302=_0x116dea['findMappedViewAncestor'](_0x283a51['viewPosition']),_0x4c21c6=_0x116dea['toModelElement'](_0x694302);_0x4c21c6['is']('element','tableOfContents')&&(_0x283a51['modelPosition']=this['editor']['model']['createPositionAt'](_0x4c21c6,0x0),_0x1332b9['stop']());};}};function H(_0x249256,_0x121990,_0x703af9){return 0x1===_0x121990?_0x703af9['createContainerElement']('ol',null,[_0x249256]):_0x703af9['createContainerElement']('ol',null,[_0x703af9['createContainerElement']('li',null,[H(_0x249256,_0x121990-0x1,_0x703af9)])]);}var P=class extends _0x4c8b3e{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'TableOfContentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const _0x365598=this['editor'];_0x365598['ui']['componentFactory']['add']('tableOfContents',()=>{const _0x244500=this['_createButton'](_0x257805);return _0x244500['tooltip']=!0x0,_0x244500;}),_0x365598['ui']['componentFactory']['add']('menuBar:tableOfContents',()=>this['_createButton'](_0x30c5c0)),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x645967=[this['editor']];for(const _0x12c7cc of _0x645967){let _0x3defac;for(const _0x57a5b4 in _0x12c7cc){const _0x4efe90=_0x57a5b4,_0x2100c0=_0x12c7cc[_0x4efe90];if('tableOfContentsLicenseKeyValid'==_0x2100c0||'tableOfContentsLicenseKeyInvalid'==_0x2100c0||'tableOfContentsLicenseKeyExpired'==_0x2100c0||'tableOfContentsLicenseKeyDomainLimit'==_0x2100c0||'tableOfContentsLicenseKeyNotAllowed'==_0x2100c0||'tableOfContentsLicenseKeyEvaluationLimit'==_0x2100c0||'tableOfContentsLicenseKeyUsageLimit'==_0x2100c0){delete _0x12c7cc[_0x4efe90],_0x3defac=_0x2100c0,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'tableOfContentsLicenseKeyInvalid'==_0x3defac&&_0x12c7cc['_showLicenseError']('invalid'),'tableOfContentsLicenseKeyExpired'==_0x3defac&&_0x12c7cc['_showLicenseError']('expired'),'tableOfContentsLicenseKeyDomainLimit'==_0x3defac&&_0x12c7cc['_showLicenseError']('domainLimit'),'tableOfContentsLicenseKeyNotAllowed'==_0x3defac&&_0x12c7cc['_showLicenseError']('featureNotAllowed','TableOfContents'),'tableOfContentsLicenseKeyEvaluationLimit'==_0x3defac&&_0x12c7cc['_showLicenseError']('evaluationLimit'),'tableOfContentsLicenseKeyUsageLimit'==_0x3defac&&_0x12c7cc['_showLicenseError']('usageLimit');}},0x3e8);}_createButton(_0xaede21){const _0x470f0d=this['editor'],_0x5aca66=_0x470f0d['locale'],_0xd844f5=_0x470f0d['commands']['get']('insertTableOfContents'),_0x56b78c=new _0xaede21(_0x5aca66);return _0x56b78c['set']({'label':C(_0x5aca66,'Table\x20of\x20contents'),'icon':_0x2c6465}),_0x56b78c['bind']('isEnabled')['to'](_0xd844f5,'isEnabled'),this['listenTo'](_0x56b78c,'execute',()=>{_0x470f0d['execute']('insertTableOfContents'),_0x470f0d['editing']['view']['focus']();}),_0x56b78c;}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},U=class extends _0x4c8b3e{static get requires(){return[D,P];}static get['pluginName'](){return'TableOfContents';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{K as DocumentOutline,x as DocumentOutlineUI,L as DocumentOutlineUtils,N as HeadingId,U as TableOfContents,A as TableOfContentsCommand,D as TableOfContentsEditing,P as TableOfContentsUI};
|
|
23
|
+
import{Command as _0x28edfc,Plugin as _0x409cbd}from'@ckeditor/ckeditor5-core';import{debounce as _0xaba868,throttle as _0x416b59}from'es-toolkit/compat';import{ModelText as _0x5f0db6,ModelTreeWalker as _0x1a0b5e}from'@ckeditor/ckeditor5-engine';import{CKEditorError as _0x2d4680,Rect as _0x4d372f,diff as _0x1b0757,diffToChanges as _0x2fc835,global as _0x4e2c8f,listenToShadowRoots as _0x367669,priorities as _0x5c37be,scrollAncestorsToShowTarget as _0x45cf1e,uid as _0x31d8da}from'@ckeditor/ckeditor5-utils';import{ButtonView as _0x2bf5a3,MenuBarMenuListItemButtonView as _0x22f8ac,View as _0x1fcc4a}from'@ckeditor/ckeditor5-ui';import{Widget as _0x58d970,toWidget as _0x162ef5}from'@ckeditor/ckeditor5-widget';import{IconTableOfContents as _0x172728}from'@ckeditor/ckeditor5-icons';function I(_0x277d34){let _0x3e9338='';for(const _0x2507be of _0x277d34['getChildren']())_0x2507be instanceof _0x5f0db6&&(_0x3e9338+=_0x2507be['data']);return _0x3e9338;}var L=class extends _0x409cbd{static get['pluginName'](){return'DocumentOutlineUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_headingNames']=[];init(){const _0x3f35e3=this['editor'];this['_headingNames']=this['_getHeadingNames']();let _0x4480c4=[];_0x3f35e3['model']['document']['on']('change',_0xaba868(()=>{const _0x52a5ac=_0x4480c4;_0x4480c4=this['_getOutlineDefinitions']();const _0x17f9cf=_0x1b0757(_0x52a5ac,_0x4480c4,(_0x363281,_0x142423)=>_0x363281['level']===_0x142423['level']&&_0x363281['text']===_0x142423['text']&&_0x363281['modelElement']===_0x142423['modelElement']),_0x1584fd=_0x2fc835(_0x17f9cf,_0x4480c4),_0x403d56=this['_getActiveHeading'](),_0x21c10=_0x4480c4['findIndex'](_0x376b64=>_0x376b64['modelElement']===_0x403d56);_0x1584fd['length']&&this['fire']('change',{'outlineDefinitions':_0x4480c4,'activeItemIndex':_0x21c10,'outlineChanges':_0x1584fd}),this['fire']('activeItemIndex',{'index':_0x21c10});},0xfa,{'leading':!0x0,'trailing':!0x0}));}afterInit(){this['_headingNames']['length']||this['_deriveHeadingElementsFromConversion']();}_getOutlineDefinitions(){const _0x173b7c=this['editor'],_0xed2283=[],_0x28f9b2=this['_headingNames'];for(const _0xce2b20 of _0x173b7c['model']['document']['getRootNames']())_0x28febe(_0x173b7c['model']['document']['getRoot'](_0xce2b20));function _0x28febe(_0x2ab3f4){for(const _0xca0ed4 of _0x2ab3f4['getChildren']())_0xca0ed4['is']('element')&&(_0x28f9b2['includes'](_0xca0ed4['name'])&&_0xed2283['push']({'level':_0x28f9b2['indexOf'](_0xca0ed4['name'])+0x1,'text':I(_0xca0ed4),'modelElement':_0xca0ed4}),_0x28febe(_0xca0ed4));}return _0xed2283;}_getActiveHeading(){const _0x1d10d6=this['editor']['model']['document']['selection']['getFirstPosition'](),_0x430460=new _0x1a0b5e({'direction':'backward','startPosition':_0x1d10d6});for(const _0x186347 of _0x430460)if(_0x186347['item']['is']('element')&&this['_headingNames']['includes'](_0x186347['item']['name']))return _0x186347['item'];}_getHeadingNames(){const _0x3fe3e9=this['editor']['config']['get']('documentOutline.headings');return _0x3fe3e9||function(_0x31d73d){const _0x8a349a=_0x31d73d['config']['get']('heading.options');return _0x8a349a?_0x8a349a['reduce']((_0x1a6725,_0x47ccce)=>('paragraph'!==_0x47ccce['model']&&_0x1a6725['push'](_0x47ccce['model']),_0x1a6725),[]):_0x31d73d['plugins']['has']('GeneralHtmlSupport')?['htmlH1','htmlH2','htmlH3','htmlH4','htmlH5','htmlH6']:[];}(this['editor']);}_deriveHeadingElementsFromConversion(){const _0x4bd816=this['editor'],_0x5e0874=['h1','h2','h3','h4','h5','h6'],_0x4d2fca=[];for(const _0x17563a of _0x5e0874){const _0x4f9cfb=_0x4bd816['editing']['view']['domConverter']['domToView'](document['createElement'](_0x17563a)),_0x197153=_0x4bd816['data']['toModel'](_0x4f9cfb)['getChild'](0x0);_0x197153?.['is']('element')&&_0x4d2fca['push'](_0x197153['name']);}this['_headingNames']=_0x4d2fca;}};function C(_0x23551c,_0x5c8d6b){const t=_0x23551c['t'];switch(_0x5c8d6b){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 _0x5c8d6b;}}var _=class extends _0x1fcc4a{constructor(_0x2e9b87,_0x334734=!0x1){super(_0x2e9b87);const _0x2c4326=this['bindTemplate'],_0x575523=_0x334734?'['+C(_0x2e9b87,'Empty\x20heading')+']':'';this['set']('text',''),this['set']('level',0x1),this['set']('isActive',!0x1),this['bind']('isEmpty')['to'](this,'text',_0x183b91=>!_0x183b91),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-document-outline__item',_0x2c4326['to']('level',_0x20e988=>'ck-document-outline__item_level-'+_0x20e988),_0x2c4326['if']('isActive','ck-document-outline__item_active'),_0x2c4326['if']('isEmpty','ck-document-outline__item_empty')],'title':_0x2c4326['to']('text')},'children':[{'text':_0x2c4326['to']('text',_0x534c00=>_0x534c00||_0x575523)}],'on':{'click':_0x2c4326['to']('click')}});}},k=class extends _0x1fcc4a{items;documentOutlineContainer;showEmptyHeadingText;constructor(_0x397c8d,_0x3586b0=!0x1,_0x4ec82f){super(_0x397c8d),this['showEmptyHeadingText']=_0x3586b0,this['set']('activeItemIndex',-0x1),this['documentOutlineContainer']=_0x4ec82f,this['items']=this['createCollection'](),this['items']['delegate']('click')['to'](this),this['on']('click',this['_handleItemClick']['bind'](this)),this['on']('change:activeItemIndex',(_0x167d25,_0x27c547,_0x25f436,_0x33a7a8)=>{this['_setActiveItem'](_0x33a7a8,_0x25f436);}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-document-outline'],'dir':_0x397c8d['contentLanguageDirection'],'data-document-outline-empty-placeholder':C(_0x397c8d,'Editor\x20headings\x20will\x20appear\x20here\x20as\x20you\x20type.'),'tabindex':-0x1},'children':this['items']});}['sync'](_0xce8ce3){_0xce8ce3['forEach'](_0x4d403d=>{'insert'==_0x4d403d['type']?this['_insertItem'](_0x4d403d['index'],..._0x4d403d['values']):'delete'==_0x4d403d['type']&&this['_deleteItem'](_0x4d403d['index'],_0x4d403d['howMany']);});}_setActiveItem(_0x4410da,_0x294716){if(-0x1!==_0x4410da){const _0x314168=this['items']['get'](_0x4410da);_0x314168&&(_0x314168['isActive']=!0x1);}-0x1!==_0x294716&&(this['items']['get'](_0x294716)['isActive']=!0x0,this['_scrollToItem'](_0x294716));}_insertItem(_0x450602,..._0x348d08){const _0x36384d=_0x348d08['map']((_0x252b69,_0x55c9ac)=>{const _0x12e198=new _(this['locale'],this['showEmptyHeadingText']);return _0x12e198['text']=_0x252b69['text'],_0x12e198['level']=_0x252b69['level'],_0x450602+_0x55c9ac===this['activeItemIndex']&&(_0x12e198['isActive']=!0x0),_0x12e198;});this['items']['addMany'](_0x36384d,_0x450602);}_deleteItem(_0x458f3c,_0x3ddfcc){do{this['items']['remove'](_0x458f3c);}while(--_0x3ddfcc);}_handleItemClick(_0x4ea6eb){const _0x4012ec=this['items']['getIndex'](_0x4ea6eb['source']);this['fire']('itemSelected',_0x4012ec);}_scrollToItem(_0x561ad7){_0x45cf1e(this['items']['get'](_0x561ad7)['element'],0x14,this['documentOutlineContainer']);}destroy(){super['destroy'](),this['element']['remove']();}},x=class extends _0x409cbd{['view'];_currentOutlineDefinitions;_updateActiveDefinitionFromViewportThrottled;static get['pluginName'](){return'DocumentOutlineUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2a8377){super(_0x2a8377),this['view']=new k(_0x2a8377['locale'],this['editor']['config']['get']('documentOutline.showEmptyHeadings'),this['editor']['config']['get']('documentOutline.container')),this['_currentOutlineDefinitions']=[],this['_updateActiveDefinitionFromViewportThrottled']=_0x416b59(this['_updateActiveDefinitionOnViewportChange']['bind'](this),0x64);}init(){const _0x36fc2d=this['editor'],_0xd15639=_0x36fc2d['plugins']['get']('DocumentOutlineUtils');let _0x1ce5ba=!0x1;if(this['view']['render'](),this['editor']['ui']['focusTracker']['add'](this['view']['element']),!_0x36fc2d['config']['get']('documentOutline.container'))throw new _0x2d4680('document-outline-container-not-provided',{'editor':_0x36fc2d});_0x36fc2d['config']['get']('documentOutline.container')['appendChild'](this['view']['element']),_0xd15639['on']('change',this['_handleOutlineChange']['bind'](this)),_0xd15639['on']('activeItemIndex',(_0x53cb19,{index:_0x5d5400})=>this['_setActiveViewItem'](_0x5d5400)),this['view']['on']('itemSelected',(_0x4e87fb,_0x2feedf)=>{_0x1ce5ba=!0x0,this['_handleItemSelected'](_0x2feedf);});const _0x156aa=()=>{_0x1ce5ba?_0x1ce5ba=!0x1:this['_updateActiveDefinitionFromViewportThrottled']();};this['view']['listenTo'](_0x4e2c8f['document'],'scroll',_0x156aa,{'useCapture':!0x0}),_0x367669(_0x36fc2d['ui']['shadowRootRegistry'],{'emitter':this['view'],'event':'scroll','callback':_0x156aa,'listenerOptions':{'useCapture':!0x0}}),this['view']['listenTo'](_0x4e2c8f['window'],'resize',this['_updateActiveDefinitionFromViewportThrottled'],{'useCapture':!0x0});}afterInit(){!async function(_0x1dfd0b){const _0x4bbdfa='uizTdvyBIa4RKsnOYmEXGMfjehwJQqbPSCk7DtZgF58Lxl29Ho6cAUW1pV3Nr0',_0x1d66cd=0x79770,_0x2aac42={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0xa5ff68(_0x1d8735){const _0x263bfd=new window['Promise'](_0xc66dc4=>{_0x1d8735['once']('ready',_0xc66dc4);}),_0x153e63=window['Date']['now'](),_0x3c6c9e=_0x1d8735['config']['get']('licenseKey');async function _0x528107(){let _0xe30a32,_0x1367e0=null,_0x18fb16=null;try{return'GPL'==_0x3c6c9e?'NotAllowed':(_0xe30a32=_0x30f58c(),_0xe30a32?(_0xe30a32['usageEndpoint']&&(_0x18fb16=_0x5b59f5(_0xe30a32['usageEndpoint'],_0xe30a32['jti'])),await _0x15c3fe()?_0x10fc90()?_0x109b51()?'Expired':_0x8967fa()?('evaluation'==_0xe30a32['licenseType']&&(_0x1367e0=_0x3042fc('EvaluationLimit')),await _0x1ee686()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x109b51(){const _0x3548e5=['evaluation','trial']['includes'](_0xe30a32['licenseType'])?_0x153e63/0x3e8:0xe10*_0x1d66cd;return _0xe30a32['exp']<_0x3548e5;}function _0x10fc90(){const _0x1d7e67=_0xe30a32['features'];return!!_0x1d7e67&&(!!_0x1d7e67['includes']('*')||(!!_0x1d7e67['includes']('DO')||(!!_0x1d7e67['includes']('PP')||!(!_0x1d7e67['includes']('TRILIUM')||!_0x1f6716()))));}function _0x8967fa(){const _0x93d359=_0xe30a32['licensedHosts'];if(!_0x93d359||0x0==_0x93d359['length'])return!0x0;const {hostname:_0xa28aa6}=new URL(window['location']['href']);if(_0x93d359['includes'](_0xa28aa6))return!0x0;const _0x2b34da=_0xa28aa6['split']('.');return _0x93d359['filter'](_0x576fc2=>_0x576fc2['includes']('*'))['map'](_0x4b2dd6=>_0x4b2dd6['split']('.'))['filter'](_0x525fe5=>_0x525fe5['length']<=_0x2b34da['length'])['map'](_0x13daa9=>Array(_0x2b34da['length']-_0x13daa9['length'])['fill']('*'===_0x13daa9[0x0]?'*':'')['concat'](_0x13daa9))['some'](_0x5c3ceb=>_0x2b34da['every']((_0x101605,_0x1c5ef1)=>_0x5c3ceb[_0x1c5ef1]===_0x101605||'*'===_0x5c3ceb[_0x1c5ef1]));}function _0x1ee686(){return _0x1367e0&&_0x18fb16?new window['Promise']((_0x82a060,_0x4750fd)=>{_0x1367e0['then'](_0x82a060,_0x4750fd),_0x18fb16['then'](_0x8fa82=>{'Valid'!=_0x8fa82&&_0x82a060(_0x8fa82);},_0x4750fd);}):_0x1367e0||_0x18fb16||'Valid';}}function _0x5b59f5(_0x43c66b,_0x1fe0ce){return new window['Promise'](_0x4ee273=>{if(_0x16f655())return _0x4ee273('Valid');_0x2c13a6(),_0x1d8735['decorate']('_sendUsageRequest');let _0x361c65=!0x1;const _0x2fa3bf=_0x31d8da();function _0x3cf22f(_0x5440bf){return!!_0x5440bf&&('object'==typeof _0x5440bf||'function'==typeof _0x5440bf)&&'function'==typeof _0x5440bf['then']&&'function'==typeof _0x5440bf['catch'];}function _0x2142c6(_0x3139ca){_0x22f848(_0x3139ca)['then'](_0x329829=>_0x329829&&'ok'==_0x329829['status']?_0x3798ae(_0x480197(_0x2fa3bf+_0x1fe0ce))!=_0x329829['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x4b4604=>(_0x5c129b(),_0x4b4604),()=>{const _0x352f18=_0x947f32();return null==_0x352f18?(_0x5c129b(),'Valid'):_0x153e63-_0x352f18>0x240c8400?'UsageLimit':'Valid';})['then'](_0x4ee273)['catch'](()=>{_0x4ee273('UsageLimit');});const _0x21ca6c=0x36ee80;function _0x5c129b(){const _0x369ff2='llct-'+_0x3798ae(_0x480197(_0x43c66b)),_0x35bc75=_0x410883(_0x3798ae(window['Math']['ceil'](_0x153e63/_0x21ca6c)));window['localStorage']['setItem'](_0x369ff2,_0x35bc75);}function _0x947f32(){const _0x2d5d0c='llct-'+_0x3798ae(_0x480197(_0x43c66b)),_0x4ba589=window['localStorage']['getItem'](_0x2d5d0c);return _0x4ba589?window['parseInt'](_0x410883(_0x4ba589),0x10)*_0x21ca6c:null;}function _0x22f848(_0x526de5){return new window['Promise']((_0x409c8f,_0x466ea3)=>{_0x526de5['then'](_0x409c8f,_0x466ea3),window['setTimeout'](_0x466ea3,0x1d4c0);});}}_0x1d8735['on']('_sendUsageRequest',(_0x3337fc,_0x4e89f7)=>{if(_0x4e89f7[0x0]!=_0x43c66b)return _0x4ee273('UsageLimit');_0x4e89f7[0x1]={..._0x4e89f7[0x1],'requestId':_0x2fa3bf};},{'priority':'high'}),_0x1d8735['on']('_sendUsageRequest',_0x4d6777=>{_0x3cf22f(_0x4d6777['return'])&&(_0x361c65=!0x0,_0x2142c6(_0x4d6777['return']));},{'priority':'low'}),_0x263bfd['then'](()=>{_0x361c65||_0x4ee273('UsageLimit');});});function _0x16f655(){return'auto'==_0x1d8735['editing']['view']['_overlayModeHint'];}function _0x2c13a6(){_0x1d8735['editing']['view']['_overlayModeHint']='auto';}}function _0x3042fc(_0x1f50d4){const _0x3c5fff=[new window['Promise'](_0x3ebdfe=>setTimeout(_0x3ebdfe,0x93ecc)),_0x263bfd['then'](()=>new window['Promise'](_0x52fba4=>{let _0x48d6bf=0x0;_0x1d8735['model']['on']('applyOperation',(_0x27d50c,_0x818fef)=>{_0x818fef[0x0]['isDocumentOperation']&&_0x48d6bf++,0x5e8==_0x48d6bf&&(_0x52fba4(),_0x27d50c['off']());});}))];return window['Promise']['race'](_0x3c5fff)['then'](()=>_0x1f50d4);}async function _0x2e9ccc(){await _0x263bfd,_0x1d8735['model']['change']=_0x4abac2,_0x1d8735['model']['enqueueChange']=_0x4abac2,_0x1d8735['enableReadOnlyMode']('model');}function _0x1f6716(){return window['glob']&&window['glob']['triliumVersion'];}function _0x15dc9a(_0x25d4df){const _0x2c9177=_0xd4beed();_0x1d8735[_0x2c9177]='documentOutlineLicenseKey'+_0x25d4df,'Valid'!=_0x25d4df&&_0x2e9ccc();}function _0xd4beed(){const _0x591e6f=window['String'](window['performance']['now']())['replace']('.','');let _0x212a0a='u';for(let _0x30781c=0x0;_0x30781c<_0x591e6f['length'];_0x30781c+=0x2){let _0x1004fc=window['parseInt'](_0x591e6f['substring'](_0x30781c,_0x30781c+0x2));_0x1004fc>=0x3e&&(_0x1004fc-=0x3e),_0x212a0a+=_0x4bbdfa[_0x1004fc];}return _0x212a0a;}function _0x30f58c(){const _0x1fae9b=_0x3c6c9e['split']('.');if(0x3!=_0x1fae9b['length'])return null;return _0x5bf37a(_0x1fae9b[0x1]);function _0x5bf37a(_0x3cf0bd){const _0x2423da=_0x56f7f8(_0x3cf0bd);return _0x2423da&&_0x3dc9e4()?_0x2423da:null;function _0x3dc9e4(){const _0x249953=_0x2423da['jti'],_0x33a226=window['parseInt'](_0x249953['substring'](_0x249953['length']-0x8),0x10),_0x2cdf13={..._0x2423da,'jti':_0x249953['substring'](0x0,_0x249953['length']-0x8)};return delete _0x2cdf13['vc'],_0x480197(_0x2cdf13)==_0x33a226;}}}async function _0x15c3fe(){let _0x40fc37=!0x0;try{const [_0x20de44,_0x5a81b9,_0x2c4839]=_0x3c6c9e['split']('.');return _0x5b6788(_0x20de44),await _0xa2fadc(_0x20de44,_0x5a81b9,_0x2c4839),_0x40fc37;}catch{return!0x1;}function _0x5b6788(_0x58df24){const _0x45c87a=_0x56f7f8(_0x58df24);_0x45c87a&&'ES256'==_0x45c87a['alg']||(_0x40fc37=!0x1);}async function _0xa2fadc(_0x3a3547,_0x17bd06,_0x585278){const _0x2f2e7d=window['Uint8Array']['from'](_0x349065(_0x585278),_0x143f18=>_0x143f18['charCodeAt'](0x0)),_0x4eabb1=new window['TextEncoder']()['encode'](_0x3a3547+'.'+_0x17bd06),_0x53d9b5=window['crypto']['subtle'];if(!_0x53d9b5)return;const _0x327dca=await _0x53d9b5['importKey']('jwk',_0x2aac42,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x53d9b5['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x327dca,_0x2f2e7d,_0x4eabb1)||(_0x40fc37=!0x1);}}function _0x56f7f8(_0xccf871){return _0xccf871['startsWith']('ey')?JSON['parse'](_0x349065(_0xccf871)):null;}function _0x349065(_0x320fa7){return window['atob'](_0x320fa7['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x480197(_0x1d16d5){let _0x4ccea2=0x1505;function _0x5ad1fc(_0x81fcca){for(let _0x3768a6=0x0;_0x3768a6<_0x81fcca['length'];_0x3768a6++){const _0xa0a7a=_0x81fcca['charCodeAt'](_0x3768a6);_0x4ccea2=(_0x4ccea2<<0x5)+_0x4ccea2+_0xa0a7a,_0x4ccea2&=_0x4ccea2;}}function _0x52bb4c(_0x30779a){Array['isArray'](_0x30779a)?_0x30779a['forEach'](_0x52bb4c):_0x30779a&&'object'==typeof _0x30779a?Object['entries'](_0x30779a)['sort']()['forEach'](([_0x49ab6b,_0x75d5be])=>{_0x5ad1fc(_0x49ab6b),_0x52bb4c(_0x75d5be);}):_0x5ad1fc(window['String'](_0x30779a));}return _0x52bb4c(_0x1d16d5),_0x4ccea2>>>0x0;}function _0x3798ae(_0x124582){return _0x124582['toString'](0x10)['padStart'](0x8,'0');}function _0x410883(_0x1c4ae1){return _0x1c4ae1['split']('')['reverse']()['join']('');}function _0x4abac2(){}_0x15dc9a(await _0x528107());}_0xa5ff68(_0x1dfd0b['editor']);}(this);}destroy(){super['destroy'](),this['view']['destroy'](),this['_updateActiveDefinitionFromViewportThrottled']['cancel']();}_handleOutlineChange(_0x2ef65a,{outlineDefinitions:_0x9c5bc2,outlineChanges:_0x504777}){this['_currentOutlineDefinitions']=_0x9c5bc2,this['view']['sync'](_0x504777);}_setActiveViewItem(_0x1e0283){this['_currentOutlineDefinitions']['length']&&this['_currentOutlineDefinitions'][_0x1e0283]&&(this['view']['activeItemIndex']=_0x1e0283);}_handleItemSelected(_0x36fbbf){const _0xc200a1=this['_currentOutlineDefinitions'][_0x36fbbf]['modelElement'];this['editor']['model']['change'](_0x59decb=>{_0x59decb['setSelection'](_0xc200a1,0x0);}),this['editor']['editing']['view']['scrollToTheSelection']({'alignToTop':!0x0,'forceScroll':!0x0}),this['editor']['editing']['view']['focus'](),this['_setActiveViewItem'](_0x36fbbf);}_updateActiveDefinitionOnViewportChange(){const _0x27779e=this['editor'];let _0x210069;for(const _0x3a3e2e of _0x27779e['model']['document']['getRootNames']()){const _0x1db45b=_0x27779e['editing']['view']['getDomRoot'](_0x3a3e2e),_0x531863=_0x1db45b&&new _0x4d372f(_0x1db45b)['getVisible']();if(_0x531863){const _0x5ec775=new _0x4d372f(_0x4e2c8f['window'])['getIntersection'](_0x531863);_0x5ec775&&(_0x210069=_0x5ec775['top']+0.25*_0x5ec775['height']);}}if(void 0x0===_0x210069)return;const _0x8529ec=E(_0x27779e['editing'],this['_currentOutlineDefinitions'],_0x210069);_0x8529ec?this['_setActiveViewItem'](this['_currentOutlineDefinitions']['indexOf'](_0x8529ec)):this['_setActiveViewItem'](-0x1);}};function E(_0x1a6dfa,_0x4c205c,_0x2f6e06,_0x4c49b4=0x0,_0x2210a8=_0x4c205c['length']-0x1){const _0x58afff=Math['floor'](_0x4c49b4+(_0x2210a8-_0x4c49b4)/0x2);if(_0x2210a8>=_0x4c49b4){const _0x110c32=_0x4c205c[_0x58afff],_0x5189aa=_0x1a6dfa['mapper']['toViewElement'](_0x110c32['modelElement']);if(!_0x5189aa)return null;const _0x3872f6=_0x1a6dfa['view']['domConverter']['mapViewToDom'](_0x5189aa);return new _0x4d372f(_0x3872f6)['bottom']>_0x2f6e06?E(_0x1a6dfa,_0x4c205c,_0x2f6e06,_0x4c49b4,_0x58afff-0x1):E(_0x1a6dfa,_0x4c205c,_0x2f6e06,_0x58afff+0x1,_0x2210a8);}return _0x58afff<0x0?null:_0x4c205c[_0x58afff];}var K=class extends _0x409cbd{['licenseKey'];_licenseKeyCheckInterval;static get requires(){return[L,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 _0x7a52c7=[this['editor']];for(const _0x2b7078 of _0x7a52c7){let _0x5d9b8c;for(const _0x1c0caf in _0x2b7078){const _0x1a5f1b=_0x1c0caf,_0x4ac37f=_0x2b7078[_0x1a5f1b];if('documentOutlineLicenseKeyValid'==_0x4ac37f||'documentOutlineLicenseKeyInvalid'==_0x4ac37f||'documentOutlineLicenseKeyExpired'==_0x4ac37f||'documentOutlineLicenseKeyDomainLimit'==_0x4ac37f||'documentOutlineLicenseKeyNotAllowed'==_0x4ac37f||'documentOutlineLicenseKeyEvaluationLimit'==_0x4ac37f||'documentOutlineLicenseKeyUsageLimit'==_0x4ac37f){delete _0x2b7078[_0x1a5f1b],_0x5d9b8c=_0x4ac37f,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'documentOutlineLicenseKeyInvalid'==_0x5d9b8c&&_0x2b7078['_showLicenseError']('invalid'),'documentOutlineLicenseKeyExpired'==_0x5d9b8c&&_0x2b7078['_showLicenseError']('expired'),'documentOutlineLicenseKeyDomainLimit'==_0x5d9b8c&&_0x2b7078['_showLicenseError']('domainLimit'),'documentOutlineLicenseKeyNotAllowed'==_0x5d9b8c&&_0x2b7078['_showLicenseError']('featureNotAllowed','DocumentOutline'),'documentOutlineLicenseKeyEvaluationLimit'==_0x5d9b8c&&_0x2b7078['_showLicenseError']('evaluationLimit'),'documentOutlineLicenseKeyUsageLimit'==_0x5d9b8c&&_0x2b7078['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},A=class extends _0x28edfc{execute(){this['editor']['model']['change'](_0x5392f2=>{this['editor']['model']['insertObject'](_0x5392f2['createElement']('tableOfContents'));});}['refresh'](){const _0x1e4d3f=this['editor']['model'],_0x5e3a4c=_0x1e4d3f['document']['selection']['getFirstPosition']();this['isEnabled']=null!==(_0x5e3a4c&&_0x1e4d3f['schema']['findAllowedParent'](_0x5e3a4c,'tableOfContents'));}},N=class extends _0x409cbd{static get['pluginName'](){return'HeadingId';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}afterInit(){const _0x572698=this['editor'];if(_0x572698['config']['get']('headingId.modelAttributeName'))return;const {viewNames:_0x15e03d,modelNames:_0x2303fc}=function(_0x334f1e){const _0x4055ed=new Set(['h1','h2','h3','h4','h5','h6']),_0x653108=new Set(['heading1','heading2','heading3','heading4','heading5','heading6','htmlH1','htmlH2','htmlH3','htmlH4','htmlH5','htmlH6']);if(!_0x334f1e)return{'viewNames':_0x4055ed,'modelNames':_0x653108};for(const _0x532366 of _0x334f1e){if('paragraph'===_0x532366['model'])continue;const _0x196382='string'==typeof _0x532366['view']?_0x532366['view']:_0x532366['view']['name'];_0x4055ed['add'](_0x196382),_0x653108['add'](_0x532366['model']);}return{'viewNames':_0x4055ed,'modelNames':_0x653108};}(this['editor']['config']['get']('heading.options'));for(const _0x3f7cab of _0x15e03d)this['_customUpcastHeadingsConversion'](_0x3f7cab);for(const _0x1ccce8 of _0x2303fc)this['_customDataDowncastHeadingsConversion'](_0x1ccce8),_0x572698['model']['schema']['isRegistered'](_0x1ccce8)&&_0x572698['model']['schema']['extend'](_0x1ccce8,{'allowAttributes':'headingId'});this['_registerHeadingIdAttributePostfixer'](_0x2303fc);}_customUpcastHeadingsConversion(_0x3ddebd){this['editor']['conversion']['for']('upcast')['add'](_0x503aca=>_0x503aca['on']('element:'+_0x3ddebd,(_0x4d3769,_0x45102f,_0x5df683)=>{const {consumable:_0x2f99a5,writer:_0x4cf0d7}=_0x5df683,_0x5497df=_0x45102f['viewItem']['getAttribute']('id'),_0x22d1f0=_0x45102f['modelRange']?.['getContainedElement']();if(_0x22d1f0)return _0x5497df&&_0x5497df['length']||_0x22d1f0['hasAttribute']('headingId')?void(_0x2f99a5['consume'](_0x45102f['viewItem'],{'attributes':['id']})&&_0x4cf0d7['setAttribute']('headingId',_0x5497df,_0x22d1f0)):(_0x2f99a5['consume'](_0x45102f['viewItem'],{'attributes':['id']}),void _0x4cf0d7['setAttribute']('headingId',_0x31d8da(),_0x22d1f0));},{'priority':_0x5c37be['get']('low')+0.5}));}_customDataDowncastHeadingsConversion(_0x32c046){this['editor']['conversion']['for']('downcast')['add'](_0x3a0a12=>_0x3a0a12['on']('attribute:headingId:'+_0x32c046,(_0x6eebc8,_0x53048e,_0x2d153b)=>{if(!_0x2d153b['consumable']['consume'](_0x53048e['item'],_0x6eebc8['name']))return;const _0x2ad5e0=_0x53048e['item']['getAttribute']('headingId'),_0x19c1b7=_0x2d153b['mapper']['toViewElement'](_0x53048e['item']);_0x2d153b['writer']['setAttribute']('id',_0x2ad5e0,_0x19c1b7);}));}_registerHeadingIdAttributePostfixer(_0x3367c8){const _0x304664=this['editor'],_0x4ed0cd=new Set(),_0x3588bb=new Set();function _0x4df086(_0x3392d4,_0x2ec54c){const _0x142509=_0x31d8da();return _0x3588bb['add'](_0x142509),_0x3392d4['setAttribute']('headingId',_0x142509,_0x2ec54c),_0x142509;}function _0x56ca4d(_0x4fd5d9,_0x2ade55){_0x4fd5d9['removeAttribute']('headingId',_0x2ade55);}_0x304664['model']['document']['registerPostFixer'](_0x2846e9=>{const _0x53c6bb=_0x304664['model']['document']['differ']['getChanges']();let _0x1eb66c=!0x1;for(const _0x18682f of _0x53c6bb)if('insert'==_0x18682f['type']&&_0x18682f['name']){if(_0x3367c8['has'](_0x18682f['name'])){const _0x5e32c8=_0x18682f['attributes']['get']('headingId');'string'==typeof _0x5e32c8?_0x4ed0cd['has'](_0x5e32c8)?(_0x4df086(_0x2846e9,_0x18682f['position']['nodeAfter']),_0x1eb66c=!0x0):_0x3588bb['add'](_0x5e32c8):(_0x4df086(_0x2846e9,_0x18682f['position']['nodeAfter']),_0x1eb66c=!0x0);}else'string'==typeof _0x18682f['attributes']['get']('headingId')&&(_0x56ca4d(_0x2846e9,_0x18682f['position']['nodeAfter']),_0x1eb66c=!0x0);}else{if('remove'==_0x18682f['type']){const _0x417e60=_0x18682f['attributes']['get']('headingId');'string'==typeof _0x417e60&&_0x4ed0cd['delete'](_0x417e60);}}return _0x1eb66c;}),_0x304664['model']['document']['on']('change',()=>{_0x3588bb['forEach'](_0xaaffb2=>_0x4ed0cd['add'](_0xaaffb2)),_0x3588bb['clear']();});}},D=class extends _0x409cbd{static get['pluginName'](){return'TableOfContentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_0x58d970,L,N];}_currentOutlineDefinitions;_tableOfContentsElements;_headingIdModelAttributeName;constructor(_0x3b220c){super(_0x3b220c),this['_currentOutlineDefinitions']=[],this['_tableOfContentsElements']=new Set(),this['_headingIdModelAttributeName']='headingId';}init(){const _0xbf185=this['editor'],_0x1548cd=_0xbf185['editing']['view']['document'];_0xbf185['config']['get']('headingId.modelAttributeName')&&(this['_headingIdModelAttributeName']=_0xbf185['config']['get']('headingId.modelAttributeName')),this['listenTo'](_0x1548cd,'click',(_0xe07fa0,_0x586f09)=>{if(!_0x586f09['target'])return;const _0x168e13=_0x586f09['target']['getCustomProperty']('tableOfContentsHeadingIndex');Number['isInteger'](_0x168e13)&&(_0x586f09['domEvent']['preventDefault'](),_0xe07fa0['stop'](),this['_handleScrollToHeading'](_0x168e13));},{'priority':'high','context':'$capture'}),this['_defineSchema'](),this['_defineConverters'](),_0xbf185['commands']['add']('insertTableOfContents',new A(_0xbf185));const _0x942672=_0xbf185['config']['get']('tableOfContents.headings');_0x942672&&_0x942672['length']?this['listenTo'](_0xbf185['model']['document'],'change:data',()=>{this['_currentOutlineDefinitions']=this['_getOutlineDefinitions'](_0x942672),this['_updateTableOfContentsElements']();}):_0xbf185['plugins']['get']('DocumentOutlineUtils')['on']('change',(_0x1c8cfa,_0x2db4ff)=>{this['_currentOutlineDefinitions']=_0x2db4ff['outlineDefinitions'],this['_updateTableOfContentsElements']();}),this['listenTo'](_0xbf185['model']['document'],'change',()=>{this['_trackNewToCElements']();});}afterInit(){!async function(_0x353c85){const _0x525913='DUA610emL4Q2kjVIvGMHgWT3uySnzPEw79oZJiCrbstcXKq85NhdfaFRxBlpOY',_0x509989=0x79770,_0x1d8e7f={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x427680(_0x752840){const _0x28d721=new window['Promise'](_0x35c8b2=>{_0x752840['once']('ready',_0x35c8b2);}),_0x2e22ac=window['Date']['now'](),_0x162800=_0x752840['config']['get']('licenseKey');async function _0x5780c4(){let _0x22d84c,_0x2dd693=null,_0x492292=null;try{return'GPL'==_0x162800?'NotAllowed':(_0x22d84c=_0x1d0396(),_0x22d84c?(_0x22d84c['usageEndpoint']&&(_0x492292=_0x3a1b01(_0x22d84c['usageEndpoint'],_0x22d84c['jti'])),await _0x31e103()?_0x5631ac()?_0x37adc7()?'Expired':_0x49a58e()?('evaluation'==_0x22d84c['licenseType']&&(_0x2dd693=_0x1ebeb4('EvaluationLimit')),await _0x5a40e4()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x37adc7(){const _0x2c035b=['evaluation','trial']['includes'](_0x22d84c['licenseType'])?_0x2e22ac/0x3e8:0xe10*_0x509989;return _0x22d84c['exp']<_0x2c035b;}function _0x5631ac(){const _0x55e52a=_0x22d84c['features'];return!!_0x55e52a&&(!!_0x55e52a['includes']('*')||(!!_0x55e52a['includes']('TOC')||(!!_0x55e52a['includes']('PP')||!(!_0x55e52a['includes']('TRILIUM')||!_0x2f206f()))));}function _0x49a58e(){const _0x182f66=_0x22d84c['licensedHosts'];if(!_0x182f66||0x0==_0x182f66['length'])return!0x0;const {hostname:_0xad425}=new URL(window['location']['href']);if(_0x182f66['includes'](_0xad425))return!0x0;const _0x501691=_0xad425['split']('.');return _0x182f66['filter'](_0x4df929=>_0x4df929['includes']('*'))['map'](_0x4f6a1e=>_0x4f6a1e['split']('.'))['filter'](_0x4d66ca=>_0x4d66ca['length']<=_0x501691['length'])['map'](_0x58051e=>Array(_0x501691['length']-_0x58051e['length'])['fill']('*'===_0x58051e[0x0]?'*':'')['concat'](_0x58051e))['some'](_0x4fcd87=>_0x501691['every']((_0x408bfe,_0x8bbed2)=>_0x4fcd87[_0x8bbed2]===_0x408bfe||'*'===_0x4fcd87[_0x8bbed2]));}function _0x5a40e4(){return _0x2dd693&&_0x492292?new window['Promise']((_0x2a7011,_0x2b8551)=>{_0x2dd693['then'](_0x2a7011,_0x2b8551),_0x492292['then'](_0x4b66a2=>{'Valid'!=_0x4b66a2&&_0x2a7011(_0x4b66a2);},_0x2b8551);}):_0x2dd693||_0x492292||'Valid';}}function _0x3a1b01(_0x524ed3,_0x25d5f9){return new window['Promise'](_0xbf016f=>{if(_0x58da2e())return _0xbf016f('Valid');_0x211bc7(),_0x752840['decorate']('_sendUsageRequest');let _0x5b4da9=!0x1;const _0x1d0eea=_0x31d8da();function _0x50e685(_0x3a5460){return!!_0x3a5460&&('object'==typeof _0x3a5460||'function'==typeof _0x3a5460)&&'function'==typeof _0x3a5460['then']&&'function'==typeof _0x3a5460['catch'];}function _0x27cc6d(_0x19cad0){_0x988f0(_0x19cad0)['then'](_0x267a2d=>_0x267a2d&&'ok'==_0x267a2d['status']?_0x461187(_0x52c00a(_0x1d0eea+_0x25d5f9))!=_0x267a2d['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x2f1663=>(_0x4262b4(),_0x2f1663),()=>{const _0x1eeb43=_0x1f135d();return null==_0x1eeb43?(_0x4262b4(),'Valid'):_0x2e22ac-_0x1eeb43>0x240c8400?'UsageLimit':'Valid';})['then'](_0xbf016f)['catch'](()=>{_0xbf016f('UsageLimit');});const _0x21900b=0x36ee80;function _0x4262b4(){const _0x48a29d='llct-'+_0x461187(_0x52c00a(_0x524ed3)),_0x3eb22a=_0x2f02e9(_0x461187(window['Math']['ceil'](_0x2e22ac/_0x21900b)));window['localStorage']['setItem'](_0x48a29d,_0x3eb22a);}function _0x1f135d(){const _0x1010dc='llct-'+_0x461187(_0x52c00a(_0x524ed3)),_0x4ca558=window['localStorage']['getItem'](_0x1010dc);return _0x4ca558?window['parseInt'](_0x2f02e9(_0x4ca558),0x10)*_0x21900b:null;}function _0x988f0(_0x19a314){return new window['Promise']((_0x4240a7,_0x3b15b1)=>{_0x19a314['then'](_0x4240a7,_0x3b15b1),window['setTimeout'](_0x3b15b1,0x1d4c0);});}}_0x752840['on']('_sendUsageRequest',(_0x1f762c,_0x320dae)=>{if(_0x320dae[0x0]!=_0x524ed3)return _0xbf016f('UsageLimit');_0x320dae[0x1]={..._0x320dae[0x1],'requestId':_0x1d0eea};},{'priority':'high'}),_0x752840['on']('_sendUsageRequest',_0x5a8250=>{_0x50e685(_0x5a8250['return'])&&(_0x5b4da9=!0x0,_0x27cc6d(_0x5a8250['return']));},{'priority':'low'}),_0x28d721['then'](()=>{_0x5b4da9||_0xbf016f('UsageLimit');});});function _0x58da2e(){return'auto'==_0x752840['editing']['view']['_overlayModeHint'];}function _0x211bc7(){_0x752840['editing']['view']['_overlayModeHint']='auto';}}function _0x1ebeb4(_0x378e52){const _0x43b2ca=[new window['Promise'](_0xb205ed=>setTimeout(_0xb205ed,0x93ecc)),_0x28d721['then'](()=>new window['Promise'](_0xd3b8a5=>{let _0x128726=0x0;_0x752840['model']['on']('applyOperation',(_0x10a0ae,_0x19d97c)=>{_0x19d97c[0x0]['isDocumentOperation']&&_0x128726++,0x5e8==_0x128726&&(_0xd3b8a5(),_0x10a0ae['off']());});}))];return window['Promise']['race'](_0x43b2ca)['then'](()=>_0x378e52);}async function _0x13ee20(){await _0x28d721,_0x752840['model']['change']=_0x5422fc,_0x752840['model']['enqueueChange']=_0x5422fc,_0x752840['enableReadOnlyMode']('model');}function _0x2f206f(){return window['glob']&&window['glob']['triliumVersion'];}function _0x4f14a9(_0x2e78db){const _0x5b734e=_0x5d92f1();_0x752840[_0x5b734e]='tableOfContentsLicenseKey'+_0x2e78db,'Valid'!=_0x2e78db&&_0x13ee20();}function _0x5d92f1(){const _0x223ce6=window['String'](window['performance']['now']())['replace']('.','');let _0x4ec2a8='D';for(let _0x100fd1=0x0;_0x100fd1<_0x223ce6['length'];_0x100fd1+=0x2){let _0x3bd9dc=window['parseInt'](_0x223ce6['substring'](_0x100fd1,_0x100fd1+0x2));_0x3bd9dc>=0x3e&&(_0x3bd9dc-=0x3e),_0x4ec2a8+=_0x525913[_0x3bd9dc];}return _0x4ec2a8;}function _0x1d0396(){const _0x3fbd58=_0x162800['split']('.');if(0x3!=_0x3fbd58['length'])return null;return _0x2ef33a(_0x3fbd58[0x1]);function _0x2ef33a(_0x826cd8){const _0x3daeb5=_0x3eb537(_0x826cd8);return _0x3daeb5&&_0x270778()?_0x3daeb5:null;function _0x270778(){const _0x231522=_0x3daeb5['jti'],_0x21fa17=window['parseInt'](_0x231522['substring'](_0x231522['length']-0x8),0x10),_0x111766={..._0x3daeb5,'jti':_0x231522['substring'](0x0,_0x231522['length']-0x8)};return delete _0x111766['vc'],_0x52c00a(_0x111766)==_0x21fa17;}}}async function _0x31e103(){let _0xa623ce=!0x0;try{const [_0x179716,_0x439341,_0x4b391e]=_0x162800['split']('.');return _0x284b48(_0x179716),await _0x132a14(_0x179716,_0x439341,_0x4b391e),_0xa623ce;}catch{return!0x1;}function _0x284b48(_0x38c04c){const _0x2366f8=_0x3eb537(_0x38c04c);_0x2366f8&&'ES256'==_0x2366f8['alg']||(_0xa623ce=!0x1);}async function _0x132a14(_0x25056a,_0x1e600a,_0x312d4c){const _0x2cab0b=window['Uint8Array']['from'](_0x2b9601(_0x312d4c),_0x25df43=>_0x25df43['charCodeAt'](0x0)),_0x4af670=new window['TextEncoder']()['encode'](_0x25056a+'.'+_0x1e600a),_0x3d14da=window['crypto']['subtle'];if(!_0x3d14da)return;const _0x15c262=await _0x3d14da['importKey']('jwk',_0x1d8e7f,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x3d14da['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x15c262,_0x2cab0b,_0x4af670)||(_0xa623ce=!0x1);}}function _0x3eb537(_0x5f05a5){return _0x5f05a5['startsWith']('ey')?JSON['parse'](_0x2b9601(_0x5f05a5)):null;}function _0x2b9601(_0xf14154){return window['atob'](_0xf14154['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x52c00a(_0x20cab2){let _0x2d5949=0x1505;function _0x3e28c9(_0x3dceab){for(let _0x278252=0x0;_0x278252<_0x3dceab['length'];_0x278252++){const _0x379ae3=_0x3dceab['charCodeAt'](_0x278252);_0x2d5949=(_0x2d5949<<0x5)+_0x2d5949+_0x379ae3,_0x2d5949&=_0x2d5949;}}function _0x1686c7(_0x3da75d){Array['isArray'](_0x3da75d)?_0x3da75d['forEach'](_0x1686c7):_0x3da75d&&'object'==typeof _0x3da75d?Object['entries'](_0x3da75d)['sort']()['forEach'](([_0x576442,_0x1c37ab])=>{_0x3e28c9(_0x576442),_0x1686c7(_0x1c37ab);}):_0x3e28c9(window['String'](_0x3da75d));}return _0x1686c7(_0x20cab2),_0x2d5949>>>0x0;}function _0x461187(_0x24c9ca){return _0x24c9ca['toString'](0x10)['padStart'](0x8,'0');}function _0x2f02e9(_0x41c4b6){return _0x41c4b6['split']('')['reverse']()['join']('');}function _0x5422fc(){}_0x4f14a9(await _0x5780c4());}_0x427680(_0x353c85['editor']);}(this);}_updateTableOfContentsElements(){this['_tableOfContentsElements']['forEach'](_0x3a92a1=>{'$graveyard'!==_0x3a92a1['rootName']&&this['editor']['editing']['reconvertItem'](_0x3a92a1);});}_trackNewToCElements(){for(const _0x4b284c of this['editor']['model']['document']['differ']['getChanges']({'includeChangesInGraveyard':!0x0})){if('insert'!==_0x4b284c['type']||'tableOfContents'!==_0x4b284c['name'])return;this['_tableOfContentsElements']['add'](_0x4b284c['position']['nodeAfter']);}}_getOutlineDefinitions(_0x51cd77){const _0xfb2a93=this['editor'],_0x26d2cb=[];for(const _0x47063b of _0xfb2a93['model']['document']['getRootNames']())_0x4fa61c(_0xfb2a93['model']['document']['getRoot'](_0x47063b));function _0x4fa61c(_0xa4a5ae){for(const _0x2e69e0 of _0xa4a5ae['getChildren']())_0x2e69e0['is']('element')&&(_0x51cd77['includes'](_0x2e69e0['name'])&&_0x26d2cb['push']({'level':_0x51cd77['indexOf'](_0x2e69e0['name'])+0x1,'text':I(_0x2e69e0),'modelElement':_0x2e69e0}),_0x4fa61c(_0x2e69e0));}return _0x26d2cb;}['_defineSchema'](){this['editor']['model']['schema']['register']('tableOfContents',{'inheritAllFrom':'$blockObject'});}_defineConverters(){const _0x3cc528=this['editor']['conversion'];_0x3cc528['for']('upcast')['elementToElement']({'model':'tableOfContents','view':{'name':'div','classes':'table-of-contents'}}),_0x3cc528['for']('dataDowncast')['elementToStructure']({'model':'tableOfContents','view':(_0x3edd3d,{writer:_0x81a93c})=>this['_createTableOfContents'](_0x81a93c,!0x0)}),_0x3cc528['for']('editingDowncast')['elementToStructure']({'model':'tableOfContents','view':(_0xb46b70,{writer:_0x169fa7})=>{this['_tableOfContentsElements']['add'](_0xb46b70);const _0x2f42d2=this['_createTableOfContents'](_0x169fa7);return _0x162ef5(_0x2f42d2,_0x169fa7,{'label':C(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(_0x425f03,_0xaacc5a=!0x1){const {locale:_0x1c0d72}=this['editor'],_0x467fc3=_0x425f03['createContainerElement']('div',{'class':'table-of-contents'+(0x0===this['_currentOutlineDefinitions']['length']?'\x20table-of-contents_empty':''),...!_0xaacc5a&&{'data-table-of-contents-label':C(_0x1c0d72,'Table\x20of\x20contents')}});0x0===this['_currentOutlineDefinitions']['length']&&!0x1===_0xaacc5a&&_0x425f03['insert'](_0x425f03['createPositionAt'](_0x467fc3,'end'),_0x425f03['createContainerElement']('p',{'class':'table-of-contents__placeholder'},[_0x425f03['createText'](C(_0x1c0d72,'No\x20headings\x20were\x20found\x20in\x20the\x20document.'))]));const _0x1ebf57=_0xaacc5a?'':'['+C(_0x1c0d72,'Empty\x20heading')+']';let _0x18f169=_0x467fc3;return this['_currentOutlineDefinitions']['forEach']((_0x54e9f2,_0x32eef1,_0x13c482)=>{const _0x352dac=this['editor']['model']['hasContent'](_0x54e9f2['modelElement'],{'ignoreWhitespaces':!0x0}),_0x5e9092=_0x352dac?_0x54e9f2['text']:_0x1ebf57,_0x5e206e=_0x54e9f2['modelElement']['getAttribute'](this['_headingIdModelAttributeName']),_0x269caf=_0x425f03['createContainerElement']('a',{'href':'#'+_0x5e206e,...!_0xaacc5a&&{'tabindex':'-1'}},[_0x425f03['createText'](_0x5e9092)]),_0x173447=this['editor']['config']['get']('documentOutline.showEmptyHeadings');_0x425f03['setCustomProperty']('tableOfContentsHeadingIndex',_0x32eef1,_0x269caf);const _0x52cdf1=_0x425f03['createContainerElement']('li',null,[_0x352dac||!_0xaacc5a&&_0x173447?_0x269caf:_0x425f03['createText']('')]),_0x3a5f9c=_0x32eef1?_0x13c482[_0x32eef1-0x1]['level']:0x0,_0x22f681=Math['abs'](_0x54e9f2['level']-_0x3a5f9c);if(_0x54e9f2['level']>_0x3a5f9c){const _0x5146ca=H(_0x52cdf1,_0x22f681,_0x425f03);_0x425f03['insert'](_0x425f03['createPositionAt'](_0x18f169,'end'),_0x5146ca);}else{const _0x286fdc=function(_0xfa9203,_0x4e371d){return _0xfa9203['getAncestors']({'includeSelf':!0x0,'parentFirst':!0x0})['filter'](_0x23c916=>_0x23c916['is']('element','ol'))[_0x4e371d];}(_0x18f169,_0x22f681);_0x425f03['insert'](_0x425f03['createPositionAt'](_0x286fdc,'end'),_0x52cdf1);}_0x18f169=_0x52cdf1;}),_0x467fc3;}['_handleScrollToHeading'](_0x474173){const _0x430b84=this['_currentOutlineDefinitions'][_0x474173]['modelElement'];this['editor']['model']['change'](_0x18cfc5=>{_0x18cfc5['setSelection'](_0x430b84,0x0);}),this['editor']['editing']['view']['scrollToTheSelection']({'alignToTop':!0x0,'forceScroll':!0x0});}_redirectMapper(){return(_0x1954b6,_0x39c604)=>{const _0x1c5846=_0x39c604['mapper'],_0x425235=_0x1c5846['findMappedViewAncestor'](_0x39c604['viewPosition']),_0xb62fd8=_0x1c5846['toModelElement'](_0x425235);_0xb62fd8['is']('element','tableOfContents')&&(_0x39c604['modelPosition']=this['editor']['model']['createPositionAt'](_0xb62fd8,0x0),_0x1954b6['stop']());};}};function H(_0x2c3f6b,_0x217110,_0x3c7eb1){return 0x1===_0x217110?_0x3c7eb1['createContainerElement']('ol',null,[_0x2c3f6b]):_0x3c7eb1['createContainerElement']('ol',null,[_0x3c7eb1['createContainerElement']('li',null,[H(_0x2c3f6b,_0x217110-0x1,_0x3c7eb1)])]);}var P=class extends _0x409cbd{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'TableOfContentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const _0x1ed9be=this['editor'];_0x1ed9be['ui']['componentFactory']['add']('tableOfContents',()=>{const _0x17f962=this['_createButton'](_0x2bf5a3);return _0x17f962['tooltip']=!0x0,_0x17f962;}),_0x1ed9be['ui']['componentFactory']['add']('menuBar:tableOfContents',()=>this['_createButton'](_0x22f8ac)),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x457aac=[this['editor']];for(const _0x42fff3 of _0x457aac){let _0x110911;for(const _0x3d2f70 in _0x42fff3){const _0x2fd275=_0x3d2f70,_0x9d2c29=_0x42fff3[_0x2fd275];if('tableOfContentsLicenseKeyValid'==_0x9d2c29||'tableOfContentsLicenseKeyInvalid'==_0x9d2c29||'tableOfContentsLicenseKeyExpired'==_0x9d2c29||'tableOfContentsLicenseKeyDomainLimit'==_0x9d2c29||'tableOfContentsLicenseKeyNotAllowed'==_0x9d2c29||'tableOfContentsLicenseKeyEvaluationLimit'==_0x9d2c29||'tableOfContentsLicenseKeyUsageLimit'==_0x9d2c29){delete _0x42fff3[_0x2fd275],_0x110911=_0x9d2c29,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'tableOfContentsLicenseKeyInvalid'==_0x110911&&_0x42fff3['_showLicenseError']('invalid'),'tableOfContentsLicenseKeyExpired'==_0x110911&&_0x42fff3['_showLicenseError']('expired'),'tableOfContentsLicenseKeyDomainLimit'==_0x110911&&_0x42fff3['_showLicenseError']('domainLimit'),'tableOfContentsLicenseKeyNotAllowed'==_0x110911&&_0x42fff3['_showLicenseError']('featureNotAllowed','TableOfContents'),'tableOfContentsLicenseKeyEvaluationLimit'==_0x110911&&_0x42fff3['_showLicenseError']('evaluationLimit'),'tableOfContentsLicenseKeyUsageLimit'==_0x110911&&_0x42fff3['_showLicenseError']('usageLimit');}},0x3e8);}_createButton(_0x22c1dd){const _0x53a741=this['editor'],_0x334d12=_0x53a741['locale'],_0x41bc4a=_0x53a741['commands']['get']('insertTableOfContents'),_0x2c650d=new _0x22c1dd(_0x334d12);return _0x2c650d['set']({'label':C(_0x334d12,'Table\x20of\x20contents'),'icon':_0x172728}),_0x2c650d['bind']('isEnabled')['to'](_0x41bc4a,'isEnabled'),this['listenTo'](_0x2c650d,'execute',()=>{_0x53a741['execute']('insertTableOfContents'),_0x53a741['editing']['view']['focus']();}),_0x2c650d;}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},U=class extends _0x409cbd{static get requires(){return[D,P];}static get['pluginName'](){return'TableOfContents';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{K as DocumentOutline,x as DocumentOutlineUI,L as DocumentOutlineUtils,N as HeadingId,U as TableOfContents,A as TableOfContentsCommand,D as TableOfContentsEditing,P as TableOfContentsUI};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-document-outline",
|
|
3
|
-
"version": "49.0.0-alpha.
|
|
3
|
+
"version": "49.0.0-alpha.4",
|
|
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": "49.0.0-alpha.
|
|
25
|
-
"@ckeditor/ckeditor5-engine": "49.0.0-alpha.
|
|
26
|
-
"@ckeditor/ckeditor5-heading": "49.0.0-alpha.
|
|
27
|
-
"@ckeditor/ckeditor5-icons": "49.0.0-alpha.
|
|
28
|
-
"@ckeditor/ckeditor5-ui": "49.0.0-alpha.
|
|
29
|
-
"@ckeditor/ckeditor5-utils": "49.0.0-alpha.
|
|
30
|
-
"@ckeditor/ckeditor5-widget": "49.0.0-alpha.
|
|
24
|
+
"@ckeditor/ckeditor5-core": "49.0.0-alpha.4",
|
|
25
|
+
"@ckeditor/ckeditor5-engine": "49.0.0-alpha.4",
|
|
26
|
+
"@ckeditor/ckeditor5-heading": "49.0.0-alpha.4",
|
|
27
|
+
"@ckeditor/ckeditor5-icons": "49.0.0-alpha.4",
|
|
28
|
+
"@ckeditor/ckeditor5-ui": "49.0.0-alpha.4",
|
|
29
|
+
"@ckeditor/ckeditor5-utils": "49.0.0-alpha.4",
|
|
30
|
+
"@ckeditor/ckeditor5-widget": "49.0.0-alpha.4",
|
|
31
31
|
"es-toolkit": "1.52.0"
|
|
32
32
|
},
|
|
33
33
|
"files": [
|