@ckeditor/ckeditor5-document-outline 48.3.0-alpha.5 → 48.3.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Command as _0xd4f6ff,Plugin as _0x1898dd}from'@ckeditor/ckeditor5-core';import{debounce as _0x2c2112,throttle as _0x33b0c6}from'es-toolkit/compat';import{ModelText as _0x1813a0,ModelTreeWalker as _0x1acb11}from'@ckeditor/ckeditor5-engine';import{CKEditorError as _0x62cf56,Rect as _0x498ab9,diff as _0x55250e,diffToChanges as _0x525b9e,global as _0x377ee9,priorities as _0x23297a,scrollAncestorsToShowTarget as _0x2dd828,uid as _0x57bf1a}from'@ckeditor/ckeditor5-utils';import{ButtonView as _0x5b9d43,MenuBarMenuListItemButtonView as _0x15a6c3,View as _0x6d338a}from'@ckeditor/ckeditor5-ui';import{Widget as _0x23273c,toWidget as _0x10649e}from'@ckeditor/ckeditor5-widget';import{IconTableOfContents as _0x48a9d0}from'@ckeditor/ckeditor5-icons';function b(_0x25223d){let _0x19e623='';for(const _0x384dbd of _0x25223d['getChildren']())_0x384dbd instanceof _0x1813a0&&(_0x19e623+=_0x384dbd['data']);return _0x19e623;}var I=class extends _0x1898dd{static get['pluginName'](){return'DocumentOutlineUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_headingNames']=[];['init'](){const _0x507a10=this['editor'];this['_headingNames']=this['_getHeadingNames']();let _0x147e27=[];_0x507a10['model']['document']['on']('change',_0x2c2112(()=>{const _0xfaedc3=_0x147e27;_0x147e27=this['_getOutlineDefinitions']();const _0x35c5ec=_0x525b9e(_0x55250e(_0xfaedc3,_0x147e27,(_0x1b06df,_0x259f95)=>_0x1b06df['level']===_0x259f95['level']&&_0x1b06df['text']===_0x259f95['text']&&_0x1b06df['modelElement']===_0x259f95['modelElement']),_0x147e27),_0x3a0446=this['_getActiveHeading'](),_0x57e564=_0x147e27['findIndex'](_0x358770=>_0x358770['modelElement']===_0x3a0446);_0x35c5ec['length']&&this['fire']('change',{'outlineDefinitions':_0x147e27,'activeItemIndex':_0x57e564,'outlineChanges':_0x35c5ec}),this['fire']('activeItemIndex',{'index':_0x57e564});},0xfa,{'leading':!0x0,'trailing':!0x0}));}['afterInit'](){this['_headingNames']['length']||this['_deriveHeadingElementsFromConversion']();}['_getOutlineDefinitions'](){const _0x2dad7f=this['editor'],_0x100713=[],_0x1e96ad=this['_headingNames'];for(const _0x40200d of _0x2dad7f['model']['document']['getRootNames']())_0x1c13cb(_0x2dad7f['model']['document']['getRoot'](_0x40200d));function _0x1c13cb(_0x2e2e26){for(const _0xb314cc of _0x2e2e26['getChildren']())_0xb314cc['is']('element')&&(_0x1e96ad['includes'](_0xb314cc['name'])&&_0x100713['push']({'level':_0x1e96ad['indexOf'](_0xb314cc['name'])+0x1,'text':b(_0xb314cc),'modelElement':_0xb314cc}),_0x1c13cb(_0xb314cc));}return _0x100713;}['_getActiveHeading'](){const _0x1f88f8=new _0x1acb11({'direction':'backward','startPosition':this['editor']['model']['document']['selection']['getFirstPosition']()});for(const _0x1085e1 of _0x1f88f8)if(_0x1085e1['item']['is']('element')&&this['_headingNames']['includes'](_0x1085e1['item']['name']))return _0x1085e1['item'];}['_getHeadingNames'](){const _0x41527b=this['editor']['config']['get']('documentOutline.headings');return _0x41527b||function(_0x22995b){const _0x49624c=_0x22995b['config']['get']('heading.options');return _0x49624c?_0x49624c['reduce']((_0x4ac39d,_0x45670f)=>('paragraph'!==_0x45670f['model']&&_0x4ac39d['push'](_0x45670f['model']),_0x4ac39d),[]):_0x22995b['plugins']['has']('GeneralHtmlSupport')?['htmlH1','htmlH2','htmlH3','htmlH4','htmlH5','htmlH6']:[];}(this['editor']);}['_deriveHeadingElementsFromConversion'](){const _0x1f478a=this['editor'],_0x49234a=['h1','h2','h3','h4','h5','h6'],_0x563a5d=[];for(const _0x18ef35 of _0x49234a){const _0x443045=_0x1f478a['editing']['view']['domConverter']['domToView'](document['createElement'](_0x18ef35)),_0x20d4a3=_0x1f478a['data']['toModel'](_0x443045)['getChild'](0x0);_0x20d4a3?.['is']('element')&&_0x563a5d['push'](_0x20d4a3['name']);}this['_headingNames']=_0x563a5d;}};function L(_0x5cc908,_0x3cf317){const t=_0x5cc908['t'];switch(_0x3cf317){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 _0x3cf317;}}var C=class extends _0x6d338a{constructor(_0x17628a,_0x554cca=!0x1){super(_0x17628a);const _0x3560a6=this['bindTemplate'],_0x8f2e51=_0x554cca?'['+L(_0x17628a,'Empty\x20heading')+']':'';this['set']('text',''),this['set']('level',0x1),this['set']('isActive',!0x1),this['bind']('isEmpty')['to'](this,'text',_0xcc9ea=>!_0xcc9ea),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-document-outline__item',_0x3560a6['to']('level',_0x2b66fa=>'ck-document-outline__item_level-'+_0x2b66fa),_0x3560a6['if']('isActive','ck-document-outline__item_active'),_0x3560a6['if']('isEmpty','ck-document-outline__item_empty')],'title':_0x3560a6['to']('text')},'children':[{'text':_0x3560a6['to']('text',_0x5d42cc=>_0x5d42cc||_0x8f2e51)}],'on':{'click':_0x3560a6['to']('click')}});}},_=class extends _0x6d338a{['items'];['documentOutlineContainer'];['showEmptyHeadingText'];constructor(_0x2ad0a6,_0x447014=!0x1,_0xea9e31){super(_0x2ad0a6),this['showEmptyHeadingText']=_0x447014,this['set']('activeItemIndex',-0x1),this['documentOutlineContainer']=_0xea9e31,this['items']=this['createCollection'](),this['items']['delegate']('click')['to'](this),this['on']('click',this['_handleItemClick']['bind'](this)),this['on']('change:activeItemIndex',(_0x22fcfe,_0x38e728,_0x1c974c,_0xbc134c)=>{this['_setActiveItem'](_0xbc134c,_0x1c974c);}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-document-outline'],'dir':_0x2ad0a6['contentLanguageDirection'],'data-document-outline-empty-placeholder':L(_0x2ad0a6,'Editor\x20headings\x20will\x20appear\x20here\x20as\x20you\x20type.'),'tabindex':-0x1},'children':this['items']});}['sync'](_0x43d9cf){_0x43d9cf['forEach'](_0x827101=>{'insert'==_0x827101['type']?this['_insertItem'](_0x827101['index'],..._0x827101['values']):'delete'==_0x827101['type']&&this['_deleteItem'](_0x827101['index'],_0x827101['howMany']);});}['_setActiveItem'](_0x251472,_0x2f33d7){if(-0x1!==_0x251472){const _0x45b6b0=this['items']['get'](_0x251472);_0x45b6b0&&(_0x45b6b0['isActive']=!0x1);}-0x1!==_0x2f33d7&&(this['items']['get'](_0x2f33d7)['isActive']=!0x0,this['_scrollToItem'](_0x2f33d7));}['_insertItem'](_0x1d8e86,..._0x4645af){const _0x4d5ac6=_0x4645af['map']((_0x170ef2,_0x30a020)=>{const _0x2c5e78=new C(this['locale'],this['showEmptyHeadingText']);return _0x2c5e78['text']=_0x170ef2['text'],_0x2c5e78['level']=_0x170ef2['level'],_0x1d8e86+_0x30a020===this['activeItemIndex']&&(_0x2c5e78['isActive']=!0x0),_0x2c5e78;});this['items']['addMany'](_0x4d5ac6,_0x1d8e86);}['_deleteItem'](_0x43245d,_0x36ba8a){do{this['items']['remove'](_0x43245d);}while(--_0x36ba8a);}['_handleItemClick'](_0x12f012){const _0x4c29dd=this['items']['getIndex'](_0x12f012['source']);this['fire']('itemSelected',_0x4c29dd);}['_scrollToItem'](_0x5ee73f){_0x2dd828(this['items']['get'](_0x5ee73f)['element'],0x14,this['documentOutlineContainer']);}['destroy'](){super['destroy'](),this['element']['remove']();}},x=class extends _0x1898dd{['view'];['_currentOutlineDefinitions'];['_updateActiveDefinitionFromViewportThrottled'];static get['pluginName'](){return'DocumentOutlineUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x101d2c){super(_0x101d2c),this['view']=new _(_0x101d2c['locale'],this['editor']['config']['get']('documentOutline.showEmptyHeadings'),this['editor']['config']['get']('documentOutline.container')),this['_currentOutlineDefinitions']=[],this['_updateActiveDefinitionFromViewportThrottled']=_0x33b0c6(this['_updateActiveDefinitionOnViewportChange']['bind'](this),0x64);}['init'](){const _0x26db71=this['editor'],_0x479c92=_0x26db71['plugins']['get']('DocumentOutlineUtils');let _0x5a2e58=!0x1;if(this['view']['render'](),this['editor']['ui']['focusTracker']['add'](this['view']['element']),!_0x26db71['config']['get']('documentOutline.container'))throw new _0x62cf56('document-outline-container-not-provided',{'editor':_0x26db71});_0x26db71['config']['get']('documentOutline.container')['appendChild'](this['view']['element']),_0x479c92['on']('change',this['_handleOutlineChange']['bind'](this)),_0x479c92['on']('activeItemIndex',(_0x3e7a6d,{index:_0x449d6d})=>this['_setActiveViewItem'](_0x449d6d)),this['view']['on']('itemSelected',(_0x42d625,_0x53dfff)=>{_0x5a2e58=!0x0,this['_handleItemSelected'](_0x53dfff);}),this['view']['listenTo'](_0x377ee9['document'],'scroll',()=>{_0x5a2e58?_0x5a2e58=!0x1:this['_updateActiveDefinitionFromViewportThrottled']();},{'useCapture':!0x0}),this['view']['listenTo'](_0x377ee9['window'],'resize',this['_updateActiveDefinitionFromViewportThrottled'],{'useCapture':!0x0});}['afterInit'](){!async function(_0x21a22a){const _0x82835a='aWxlPG0A3CDdHBsZEqwULojOrgMXVTRvu1bI2487ptzJKQeihfNkYS9n6y5mcF',_0xd66073=0x78e40,_0x3c21bc=window['Date']['now'](),_0x3e9641=_0x21a22a['editor'],_0x4d38ea=new window['Promise'](_0x1bd34a=>{_0x3e9641['once']('ready',_0x1bd34a);}),_0x5afcbf={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x74674a=_0x3e9641['config']['get']('licenseKey');async function _0x18b886(){let _0x4d9c7b,_0x2a4328=null,_0x3059f1=null;try{return'GPL'==_0x74674a?'NotAllowed':(_0x4d9c7b=_0x1b94b7(),_0x4d9c7b?(_0x4d9c7b['usageEndpoint']&&(_0x3059f1=_0x47682b(_0x4d9c7b['usageEndpoint'],_0x4d9c7b['jti'])),await _0x28cf64()?_0x594aa8()?_0x349ce4()?'Expired':_0x3ed6ba()?('evaluation'==_0x4d9c7b['licenseType']&&(_0x2a4328=_0x4601ed('EvaluationLimit')),await _0x3d74c6()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x349ce4(){const _0x4fd3e6=['evaluation','trial']['includes'](_0x4d9c7b['licenseType'])?_0x3c21bc/0x3e8:0xe10*_0xd66073;return _0x4d9c7b['exp']<_0x4fd3e6;}function _0x594aa8(){const _0x5479f8=_0x4d9c7b['features'];return!!_0x5479f8&&(!!_0x5479f8['includes']('*')||(!!_0x5479f8['includes']('DO')||(!!_0x5479f8['includes']('PP')||!(!_0x5479f8['includes']('TRILIUM')||!_0x480e61()))));}function _0x3ed6ba(){const _0x556cfe=_0x4d9c7b['licensedHosts'];if(!_0x556cfe||0x0==_0x556cfe['length'])return!0x0;const {hostname:_0x3a0659}=new URL(window['location']['href']);if(_0x556cfe['includes'](_0x3a0659))return!0x0;const _0x1c3494=_0x3a0659['split']('.');return _0x556cfe['filter'](_0x3e8962=>_0x3e8962['includes']('*'))['map'](_0x33c637=>_0x33c637['split']('.'))['filter'](_0x1f5498=>_0x1f5498['length']<=_0x1c3494['length'])['map'](_0x3407d8=>Array(_0x1c3494['length']-_0x3407d8['length'])['fill']('*'===_0x3407d8[0x0]?'*':'')['concat'](_0x3407d8))['some'](_0x5273ed=>_0x1c3494['every']((_0x1a29fb,_0x254c31)=>_0x5273ed[_0x254c31]===_0x1a29fb||'*'===_0x5273ed[_0x254c31]));}function _0x3d74c6(){return _0x2a4328&&_0x3059f1?new window['Promise']((_0x2469ee,_0x2ef4b3)=>{_0x2a4328['then'](_0x2469ee,_0x2ef4b3),_0x3059f1['then'](_0xb7c6b1=>{'Valid'!=_0xb7c6b1&&_0x2469ee(_0xb7c6b1);},_0x2ef4b3);}):_0x2a4328||_0x3059f1||'Valid';}}function _0x47682b(_0x4fc3e9,_0x202b38){return new window['Promise'](_0x39693a=>{if(_0x1b77c7())return _0x39693a('Valid');_0x3166d2(),_0x3e9641['decorate']('_sendUsageRequest');let _0x4f89d5=!0x1;const _0x1f9457=_0x57bf1a();function _0x24c8ce(_0x25a39e){return!!_0x25a39e&&('object'==typeof _0x25a39e||'function'==typeof _0x25a39e)&&'function'==typeof _0x25a39e['then']&&'function'==typeof _0x25a39e['catch'];}function _0x1d8688(_0x21a71e){_0x455c57(_0x21a71e)['then'](_0x5bfeab=>_0x5bfeab&&'ok'==_0x5bfeab['status']?_0x39b524(_0x5eff78(_0x1f9457+_0x202b38))!=_0x5bfeab['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x5271db=>(_0x1ee5c2(),_0x5271db),()=>{const _0x1451c1=_0x728e50();return null==_0x1451c1?(_0x1ee5c2(),'Valid'):_0x3c21bc-_0x1451c1>0x240c8400?'UsageLimit':'Valid';})['then'](_0x39693a)['catch'](()=>{_0x39693a('UsageLimit');});const _0x2f2d9d=0x36ee80;function _0x1ee5c2(){const _0x386717='llct-'+_0x39b524(_0x5eff78(_0x4fc3e9)),_0x4b8c9a=_0x32caad(_0x39b524(window['Math']['ceil'](_0x3c21bc/_0x2f2d9d)));window['localStorage']['setItem'](_0x386717,_0x4b8c9a);}function _0x728e50(){const _0x31b2d6='llct-'+_0x39b524(_0x5eff78(_0x4fc3e9)),_0x18d98d=window['localStorage']['getItem'](_0x31b2d6);return _0x18d98d?window['parseInt'](_0x32caad(_0x18d98d),0x10)*_0x2f2d9d:null;}function _0x455c57(_0x56b953){return new window['Promise']((_0x39717a,_0x1d62de)=>{_0x56b953['then'](_0x39717a,_0x1d62de),window['setTimeout'](_0x1d62de,0x1d4c0);});}}_0x3e9641['on']('_sendUsageRequest',(_0x3f21a1,_0x5e6338)=>{if(_0x5e6338[0x0]!=_0x4fc3e9)return _0x39693a('UsageLimit');_0x5e6338[0x1]={..._0x5e6338[0x1],'requestId':_0x1f9457};},{'priority':'high'}),_0x3e9641['on']('_sendUsageRequest',_0x1e1cf6=>{_0x24c8ce(_0x1e1cf6['return'])&&(_0x4f89d5=!0x0,_0x1d8688(_0x1e1cf6['return']));},{'priority':'low'}),_0x4d38ea['then'](()=>{_0x4f89d5||_0x39693a('UsageLimit');});});function _0x1b77c7(){return'auto'==_0x3e9641['editing']['view']['_overlayModeHint'];}function _0x3166d2(){_0x3e9641['editing']['view']['_overlayModeHint']='auto';}}function _0x4601ed(_0x5d8935){const _0x45d35d=[new window['Promise'](_0xefdb99=>setTimeout(_0xefdb99,0x93ecc)),_0x4d38ea['then'](()=>new window['Promise'](_0x20f1dc=>{let _0x4359f0=0x0;_0x3e9641['model']['on']('applyOperation',(_0x235ba2,_0x3ab51c)=>{_0x3ab51c[0x0]['isDocumentOperation']&&_0x4359f0++,0x5e8==_0x4359f0&&(_0x20f1dc(),_0x235ba2['off']());});}))];return window['Promise']['race'](_0x45d35d)['then'](()=>_0x5d8935);}async function _0x508694(){await _0x4d38ea,_0x3e9641['model']['change']=_0x5b0e66,_0x3e9641['model']['enqueueChange']=_0x5b0e66,_0x3e9641['enableReadOnlyMode']('model');}function _0x480e61(){return window['glob']&&window['glob']['triliumVersion'];}function _0x5cdabd(_0xfb731){const _0x4cacaa=_0xcd9f39();_0x3e9641[_0x4cacaa]='documentOutlineLicenseKey'+_0xfb731,'Valid'!=_0xfb731&&_0x508694();}function _0xcd9f39(){const _0x300f31=window['String'](window['performance']['now']())['replace']('.','');let _0xbd8906='a';for(let _0x2e1c1f=0x0;_0x2e1c1f<_0x300f31['length'];_0x2e1c1f+=0x2){let _0x4205bd=window['parseInt'](_0x300f31['substring'](_0x2e1c1f,_0x2e1c1f+0x2));_0x4205bd>=0x3e&&(_0x4205bd-=0x3e),_0xbd8906+=_0x82835a[_0x4205bd];}return _0xbd8906;}function _0x1b94b7(){const _0xb45009=_0x74674a['split']('.');if(0x3!=_0xb45009['length'])return null;return _0x29aa6f(_0xb45009[0x1]);function _0x29aa6f(_0x359794){const _0x31a4dc=_0x50248b(_0x359794);return _0x31a4dc&&_0x4251ce()?_0x31a4dc:null;function _0x4251ce(){const _0x4e445e=_0x31a4dc['jti'],_0x37fc5f=window['parseInt'](_0x4e445e['substring'](_0x4e445e['length']-0x8),0x10),_0x498a47={..._0x31a4dc,'jti':_0x4e445e['substring'](0x0,_0x4e445e['length']-0x8)};return delete _0x498a47['vc'],_0x5eff78(_0x498a47)==_0x37fc5f;}}}async function _0x28cf64(){let _0x1b31a7=!0x0;try{const [_0x4a4f57,_0x3f17a4,_0x1160b0]=_0x74674a['split']('.');return _0x48d262(_0x4a4f57),await _0x47ac2a(_0x4a4f57,_0x3f17a4,_0x1160b0),_0x1b31a7;}catch{return!0x1;}function _0x48d262(_0x34e661){const _0x23f6f5=_0x50248b(_0x34e661);_0x23f6f5&&'ES256'==_0x23f6f5['alg']||(_0x1b31a7=!0x1);}async function _0x47ac2a(_0x5e62c0,_0x4d0ef1,_0x47f9b8){const _0x2fc5ab=window['Uint8Array']['from'](_0xd3c0f3(_0x47f9b8),_0x1e486c=>_0x1e486c['charCodeAt'](0x0)),_0x28b895=new window['TextEncoder']()['encode'](_0x5e62c0+'.'+_0x4d0ef1),_0x60a278=window['crypto']['subtle'];if(!_0x60a278)return;const _0x2d9d25=await _0x60a278['importKey']('jwk',_0x5afcbf,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x60a278['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x2d9d25,_0x2fc5ab,_0x28b895)||(_0x1b31a7=!0x1);}}function _0x50248b(_0x72d99b){return _0x72d99b['startsWith']('ey')?JSON['parse'](_0xd3c0f3(_0x72d99b)):null;}function _0xd3c0f3(_0x34f106){return window['atob'](_0x34f106['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x5eff78(_0x56cd2a){let _0x1bd538=0x1505;function _0x2e5cae(_0x1287ec){for(let _0x5996c3=0x0;_0x5996c3<_0x1287ec['length'];_0x5996c3++){const _0x2b9946=_0x1287ec['charCodeAt'](_0x5996c3);_0x1bd538=(_0x1bd538<<0x5)+_0x1bd538+_0x2b9946,_0x1bd538&=_0x1bd538;}}function _0x3e49c8(_0x524ced){Array['isArray'](_0x524ced)?_0x524ced['forEach'](_0x3e49c8):_0x524ced&&'object'==typeof _0x524ced?Object['entries'](_0x524ced)['sort']()['forEach'](([_0x247efa,_0x2af0e7])=>{_0x2e5cae(_0x247efa),_0x3e49c8(_0x2af0e7);}):_0x2e5cae(window['String'](_0x524ced));}return _0x3e49c8(_0x56cd2a),_0x1bd538>>>0x0;}function _0x39b524(_0x4099dd){return _0x4099dd['toString'](0x10)['padStart'](0x8,'0');}function _0x32caad(_0x84ecec){return _0x84ecec['split']('')['reverse']()['join']('');}function _0x5b0e66(){}_0x5cdabd(await _0x18b886());}(this);}['destroy'](){super['destroy'](),this['view']['destroy'](),this['_updateActiveDefinitionFromViewportThrottled']['cancel']();}['_handleOutlineChange'](_0x44b65a,{outlineDefinitions:_0x18b12e,outlineChanges:_0x3b8fb0}){this['_currentOutlineDefinitions']=_0x18b12e,this['view']['sync'](_0x3b8fb0);}['_setActiveViewItem'](_0x18cd5){this['_currentOutlineDefinitions']['length']&&this['_currentOutlineDefinitions'][_0x18cd5]&&(this['view']['activeItemIndex']=_0x18cd5);}['_handleItemSelected'](_0x3d9316){const _0x232f5a=this['_currentOutlineDefinitions'][_0x3d9316]['modelElement'];this['editor']['model']['change'](_0x756961=>{_0x756961['setSelection'](_0x232f5a,0x0);}),this['editor']['editing']['view']['scrollToTheSelection']({'alignToTop':!0x0,'forceScroll':!0x0}),this['editor']['editing']['view']['focus'](),this['_setActiveViewItem'](_0x3d9316);}['_updateActiveDefinitionOnViewportChange'](){const _0x264b22=this['editor'];let _0x2c46e9;for(const _0xe4d1b2 of _0x264b22['model']['document']['getRootNames']()){const _0x35f000=_0x264b22['editing']['view']['getDomRoot'](_0xe4d1b2),_0x33c365=_0x35f000&&new _0x498ab9(_0x35f000)['getVisible']();if(_0x33c365){const _0x1db752=new _0x498ab9(_0x377ee9['window'])['getIntersection'](_0x33c365);_0x1db752&&(_0x2c46e9=_0x1db752['top']+0.25*_0x1db752['height']);}}if(void 0x0===_0x2c46e9)return;const _0x1154a2=k(_0x264b22['editing'],this['_currentOutlineDefinitions'],_0x2c46e9);_0x1154a2?this['_setActiveViewItem'](this['_currentOutlineDefinitions']['indexOf'](_0x1154a2)):this['_setActiveViewItem'](-0x1);}};function k(_0x187760,_0x46d776,_0xd6e663,_0xcb9b65=0x0,_0xaa1a96=_0x46d776['length']-0x1){const _0x437cb3=Math['floor'](_0xcb9b65+(_0xaa1a96-_0xcb9b65)/0x2);if(_0xaa1a96>=_0xcb9b65){const _0x2c94b7=_0x46d776[_0x437cb3],_0x35ed66=_0x187760['mapper']['toViewElement'](_0x2c94b7['modelElement']);return _0x35ed66?new _0x498ab9(_0x187760['view']['domConverter']['mapViewToDom'](_0x35ed66))['bottom']>_0xd6e663?k(_0x187760,_0x46d776,_0xd6e663,_0xcb9b65,_0x437cb3-0x1):k(_0x187760,_0x46d776,_0xd6e663,_0x437cb3+0x1,_0xaa1a96):null;}return _0x437cb3<0x0?null:_0x46d776[_0x437cb3];}var E=class extends _0x1898dd{['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');const _0x1f5379=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2ead2a;for(const _0x11f300 in _0x1f5379){const _0x2d0332=_0x11f300,_0x4af01f=_0x1f5379[_0x2d0332];if('documentOutlineLicenseKeyValid'==_0x4af01f||'documentOutlineLicenseKeyInvalid'==_0x4af01f||'documentOutlineLicenseKeyExpired'==_0x4af01f||'documentOutlineLicenseKeyDomainLimit'==_0x4af01f||'documentOutlineLicenseKeyNotAllowed'==_0x4af01f||'documentOutlineLicenseKeyEvaluationLimit'==_0x4af01f||'documentOutlineLicenseKeyUsageLimit'==_0x4af01f){delete _0x1f5379[_0x2d0332],_0x2ead2a=_0x4af01f,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'documentOutlineLicenseKeyInvalid'==_0x2ead2a&&_0x1f5379['_showLicenseError']('invalid'),'documentOutlineLicenseKeyExpired'==_0x2ead2a&&_0x1f5379['_showLicenseError']('expired'),'documentOutlineLicenseKeyDomainLimit'==_0x2ead2a&&_0x1f5379['_showLicenseError']('domainLimit'),'documentOutlineLicenseKeyNotAllowed'==_0x2ead2a&&_0x1f5379['_showLicenseError']('featureNotAllowed','DocumentOutline'),'documentOutlineLicenseKeyEvaluationLimit'==_0x2ead2a&&_0x1f5379['_showLicenseError']('evaluationLimit'),'documentOutlineLicenseKeyUsageLimit'==_0x2ead2a&&_0x1f5379['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},K=class extends _0xd4f6ff{['execute'](){this['editor']['model']['change'](_0x2035c5=>{this['editor']['model']['insertObject'](_0x2035c5['createElement']('tableOfContents'));});}['refresh'](){const _0x2ca0bf=this['editor']['model'],_0x123a2a=_0x2ca0bf['document']['selection']['getFirstPosition']();this['isEnabled']=null!==(_0x123a2a&&_0x2ca0bf['schema']['findAllowedParent'](_0x123a2a,'tableOfContents'));}},A=class extends _0x1898dd{static get['pluginName'](){return'HeadingId';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){const _0x3da73f=this['editor'];if(_0x3da73f['config']['get']('headingId.modelAttributeName'))return;const {viewNames:_0x193482,modelNames:_0x340f30}=function(_0x385048){const _0x1b8d3e=new Set(),_0x84f513=new Set();if(!_0x385048)return{'viewNames':_0x1b8d3e,'modelNames':_0x84f513};for(const _0x2d4dd6 of _0x385048){if('paragraph'===_0x2d4dd6['model'])continue;const _0x124262='string'==typeof _0x2d4dd6['view']?_0x2d4dd6['view']:_0x2d4dd6['view']['name'];_0x1b8d3e['add'](_0x124262),_0x84f513['add'](_0x2d4dd6['model']);}return _0x1b8d3e['has']('h1')||(_0x1b8d3e['add']('h1'),_0x84f513['add']('heading1')),{'viewNames':_0x1b8d3e,'modelNames':_0x84f513};}(this['editor']['config']['get']('heading.options'));for(const _0x5cc0c1 of _0x193482)this['_customUpcastHeadingsConversion'](_0x5cc0c1);for(const _0x3377b4 of _0x340f30)this['_customDataDowncastHeadingsConversion'](_0x3377b4),_0x3da73f['model']['schema']['isRegistered'](_0x3377b4)&&_0x3da73f['model']['schema']['extend'](_0x3377b4,{'allowAttributes':'headingId'});this['_registerHeadingIdAttributePostfixer'](_0x340f30);}['_customUpcastHeadingsConversion'](_0x44fbd3){this['editor']['conversion']['for']('upcast')['add'](_0x57adc0=>_0x57adc0['on']('element:'+_0x44fbd3,(_0x19acf5,_0x214f3d,_0x5cb4b0)=>{const {consumable:_0x32cbcb,writer:_0x5bfb9e}=_0x5cb4b0,_0x54de6d=_0x214f3d['viewItem']['getAttribute']('id'),_0x5f138e=_0x214f3d['modelRange']?.['getContainedElement']();if(_0x5f138e)return _0x54de6d&&_0x54de6d['length']||_0x5f138e['hasAttribute']('headingId')?void(_0x32cbcb['consume'](_0x214f3d['viewItem'],{'attributes':['id']})&&_0x5bfb9e['setAttribute']('headingId',_0x54de6d,_0x5f138e)):(_0x32cbcb['consume'](_0x214f3d['viewItem'],{'attributes':['id']}),void _0x5bfb9e['setAttribute']('headingId',_0x57bf1a(),_0x5f138e));},{'priority':_0x23297a['get']('low')+0.5}));}['_customDataDowncastHeadingsConversion'](_0x489678){this['editor']['conversion']['for']('downcast')['add'](_0x45b6c7=>_0x45b6c7['on']('attribute:headingId:'+_0x489678,(_0x24308b,_0x24b742,_0x26328a)=>{if(!_0x26328a['consumable']['consume'](_0x24b742['item'],_0x24308b['name']))return;const _0x34297a=_0x24b742['item']['getAttribute']('headingId'),_0x1248fc=_0x26328a['mapper']['toViewElement'](_0x24b742['item']);_0x26328a['writer']['setAttribute']('id',_0x34297a,_0x1248fc);}));}['_registerHeadingIdAttributePostfixer'](_0x5d9e46){const _0x4a74d1=this['editor'],_0x1f847a=new Set(),_0x8c169c=new Set();function _0x6a5e54(_0x2ba4c9,_0x156bb6){const _0x40ce86=_0x57bf1a();return _0x8c169c['add'](_0x40ce86),_0x2ba4c9['setAttribute']('headingId',_0x40ce86,_0x156bb6),_0x40ce86;}function _0x406b76(_0x123cf0,_0x5d3051){_0x123cf0['removeAttribute']('headingId',_0x5d3051);}_0x4a74d1['model']['document']['registerPostFixer'](_0xd0989c=>{const _0x18b004=_0x4a74d1['model']['document']['differ']['getChanges']();let _0x229f1e=!0x1;for(const _0x440078 of _0x18b004)if('insert'==_0x440078['type']&&_0x440078['name']){if(_0x5d9e46['has'](_0x440078['name'])){const _0x3d3993=_0x440078['attributes']['get']('headingId');'string'==typeof _0x3d3993?_0x1f847a['has'](_0x3d3993)?(_0x6a5e54(_0xd0989c,_0x440078['position']['nodeAfter']),_0x229f1e=!0x0):_0x8c169c['add'](_0x3d3993):(_0x6a5e54(_0xd0989c,_0x440078['position']['nodeAfter']),_0x229f1e=!0x0);}else'string'==typeof _0x440078['attributes']['get']('headingId')&&(_0x406b76(_0xd0989c,_0x440078['position']['nodeAfter']),_0x229f1e=!0x0);}else{if('remove'==_0x440078['type']){const _0x21a6be=_0x440078['attributes']['get']('headingId');'string'==typeof _0x21a6be&&_0x1f847a['delete'](_0x21a6be);}}return _0x229f1e;}),_0x4a74d1['model']['document']['on']('change',()=>{_0x8c169c['forEach'](_0xa22edf=>_0x1f847a['add'](_0xa22edf)),_0x8c169c['clear']();});}},N=class extends _0x1898dd{static get['pluginName'](){return'TableOfContentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x23273c,I,A];}['_currentOutlineDefinitions'];['_tableOfContentsElements'];['_headingIdModelAttributeName'];constructor(_0x3fb050){super(_0x3fb050),this['_currentOutlineDefinitions']=[],this['_tableOfContentsElements']=new Set(),this['_headingIdModelAttributeName']='headingId';}['init'](){const _0x145456=this['editor'],_0x4de8e0=_0x145456['editing']['view']['document'];_0x145456['config']['get']('headingId.modelAttributeName')&&(this['_headingIdModelAttributeName']=_0x145456['config']['get']('headingId.modelAttributeName')),this['listenTo'](_0x4de8e0,'click',(_0x210c0e,_0x354120)=>{if(!_0x354120['target'])return;const _0xc6be84=_0x354120['target']['getCustomProperty']('tableOfContentsHeadingIndex');Number['isInteger'](_0xc6be84)&&(_0x354120['domEvent']['preventDefault'](),_0x210c0e['stop'](),this['_handleScrollToHeading'](_0xc6be84));},{'priority':'high','context':'$capture'}),this['_defineSchema'](),this['_defineConverters'](),_0x145456['commands']['add']('insertTableOfContents',new K(_0x145456));const _0x418fbd=_0x145456['config']['get']('tableOfContents.headings');_0x418fbd&&_0x418fbd['length']?this['listenTo'](_0x145456['model']['document'],'change:data',()=>{this['_currentOutlineDefinitions']=this['_getOutlineDefinitions'](_0x418fbd),this['_updateTableOfContentsElements']();}):_0x145456['plugins']['get']('DocumentOutlineUtils')['on']('change',(_0x415aa1,_0x44884c)=>{this['_currentOutlineDefinitions']=_0x44884c['outlineDefinitions'],this['_updateTableOfContentsElements']();}),this['listenTo'](_0x145456['model']['document'],'change',()=>{this['_trackNewToCElements']();});}['afterInit'](){!async function(_0x931f32){const _0x4d84a1='mr4z2yakM3x0phtD7jBw1T6qRfeUuZcOLNKVgQSPE9iGIHoXlJW8YsCb5AndFv',_0x514f03=0x78e40,_0x4c04fe=window['Date']['now'](),_0x4954ef=_0x931f32['editor'],_0x1cb1f8=new window['Promise'](_0x5f326f=>{_0x4954ef['once']('ready',_0x5f326f);}),_0x8c99de={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x29f960=_0x4954ef['config']['get']('licenseKey');async function _0x458a9a(){let _0x205caa,_0x36ed62=null,_0x1a237a=null;try{return'GPL'==_0x29f960?'NotAllowed':(_0x205caa=_0x64e1e8(),_0x205caa?(_0x205caa['usageEndpoint']&&(_0x1a237a=_0x154092(_0x205caa['usageEndpoint'],_0x205caa['jti'])),await _0x426166()?_0x50096b()?_0x3d3b11()?'Expired':_0xe5f174()?('evaluation'==_0x205caa['licenseType']&&(_0x36ed62=_0x1a01ef('EvaluationLimit')),await _0x355165()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x3d3b11(){const _0x13e853=['evaluation','trial']['includes'](_0x205caa['licenseType'])?_0x4c04fe/0x3e8:0xe10*_0x514f03;return _0x205caa['exp']<_0x13e853;}function _0x50096b(){const _0x4c430a=_0x205caa['features'];return!!_0x4c430a&&(!!_0x4c430a['includes']('*')||(!!_0x4c430a['includes']('TOC')||(!!_0x4c430a['includes']('PP')||!(!_0x4c430a['includes']('TRILIUM')||!_0x45a765()))));}function _0xe5f174(){const _0x1e93a0=_0x205caa['licensedHosts'];if(!_0x1e93a0||0x0==_0x1e93a0['length'])return!0x0;const {hostname:_0x4b5fa0}=new URL(window['location']['href']);if(_0x1e93a0['includes'](_0x4b5fa0))return!0x0;const _0xbfdfde=_0x4b5fa0['split']('.');return _0x1e93a0['filter'](_0x3f6bf2=>_0x3f6bf2['includes']('*'))['map'](_0x43bf3d=>_0x43bf3d['split']('.'))['filter'](_0x837496=>_0x837496['length']<=_0xbfdfde['length'])['map'](_0x5693e2=>Array(_0xbfdfde['length']-_0x5693e2['length'])['fill']('*'===_0x5693e2[0x0]?'*':'')['concat'](_0x5693e2))['some'](_0x1c7235=>_0xbfdfde['every']((_0x215d39,_0x4286e5)=>_0x1c7235[_0x4286e5]===_0x215d39||'*'===_0x1c7235[_0x4286e5]));}function _0x355165(){return _0x36ed62&&_0x1a237a?new window['Promise']((_0x4233e7,_0x245a0e)=>{_0x36ed62['then'](_0x4233e7,_0x245a0e),_0x1a237a['then'](_0x474d1e=>{'Valid'!=_0x474d1e&&_0x4233e7(_0x474d1e);},_0x245a0e);}):_0x36ed62||_0x1a237a||'Valid';}}function _0x154092(_0x41e2c7,_0x260221){return new window['Promise'](_0x4fe3ae=>{if(_0x18d30c())return _0x4fe3ae('Valid');_0x4588a8(),_0x4954ef['decorate']('_sendUsageRequest');let _0x55535a=!0x1;const _0x1c03a0=_0x57bf1a();function _0x81f80b(_0x4c4541){return!!_0x4c4541&&('object'==typeof _0x4c4541||'function'==typeof _0x4c4541)&&'function'==typeof _0x4c4541['then']&&'function'==typeof _0x4c4541['catch'];}function _0x31417a(_0x3c527b){_0x1528ac(_0x3c527b)['then'](_0x773e9d=>_0x773e9d&&'ok'==_0x773e9d['status']?_0x2b30d9(_0x43c747(_0x1c03a0+_0x260221))!=_0x773e9d['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x5eb194=>(_0x29e2f1(),_0x5eb194),()=>{const _0xc2aa51=_0x352121();return null==_0xc2aa51?(_0x29e2f1(),'Valid'):_0x4c04fe-_0xc2aa51>0x240c8400?'UsageLimit':'Valid';})['then'](_0x4fe3ae)['catch'](()=>{_0x4fe3ae('UsageLimit');});const _0x2a2030=0x36ee80;function _0x29e2f1(){const _0x29a7e9='llct-'+_0x2b30d9(_0x43c747(_0x41e2c7)),_0x4d3a26=_0x3dc001(_0x2b30d9(window['Math']['ceil'](_0x4c04fe/_0x2a2030)));window['localStorage']['setItem'](_0x29a7e9,_0x4d3a26);}function _0x352121(){const _0x58fa87='llct-'+_0x2b30d9(_0x43c747(_0x41e2c7)),_0x50df3f=window['localStorage']['getItem'](_0x58fa87);return _0x50df3f?window['parseInt'](_0x3dc001(_0x50df3f),0x10)*_0x2a2030:null;}function _0x1528ac(_0x570b49){return new window['Promise']((_0x3bc425,_0x32bba1)=>{_0x570b49['then'](_0x3bc425,_0x32bba1),window['setTimeout'](_0x32bba1,0x1d4c0);});}}_0x4954ef['on']('_sendUsageRequest',(_0x47e0b7,_0x37b345)=>{if(_0x37b345[0x0]!=_0x41e2c7)return _0x4fe3ae('UsageLimit');_0x37b345[0x1]={..._0x37b345[0x1],'requestId':_0x1c03a0};},{'priority':'high'}),_0x4954ef['on']('_sendUsageRequest',_0x115a50=>{_0x81f80b(_0x115a50['return'])&&(_0x55535a=!0x0,_0x31417a(_0x115a50['return']));},{'priority':'low'}),_0x1cb1f8['then'](()=>{_0x55535a||_0x4fe3ae('UsageLimit');});});function _0x18d30c(){return'auto'==_0x4954ef['editing']['view']['_overlayModeHint'];}function _0x4588a8(){_0x4954ef['editing']['view']['_overlayModeHint']='auto';}}function _0x1a01ef(_0x8b92be){const _0x354b62=[new window['Promise'](_0x111c09=>setTimeout(_0x111c09,0x93ecc)),_0x1cb1f8['then'](()=>new window['Promise'](_0x91d6b2=>{let _0x44815c=0x0;_0x4954ef['model']['on']('applyOperation',(_0x24eefe,_0x1805a3)=>{_0x1805a3[0x0]['isDocumentOperation']&&_0x44815c++,0x5e8==_0x44815c&&(_0x91d6b2(),_0x24eefe['off']());});}))];return window['Promise']['race'](_0x354b62)['then'](()=>_0x8b92be);}async function _0x4473aa(){await _0x1cb1f8,_0x4954ef['model']['change']=_0xd01d8a,_0x4954ef['model']['enqueueChange']=_0xd01d8a,_0x4954ef['enableReadOnlyMode']('model');}function _0x45a765(){return window['glob']&&window['glob']['triliumVersion'];}function _0x30be0c(_0x3eb098){const _0x2a10cd=_0x28f24e();_0x4954ef[_0x2a10cd]='tableOfContentsLicenseKey'+_0x3eb098,'Valid'!=_0x3eb098&&_0x4473aa();}function _0x28f24e(){const _0x49b82b=window['String'](window['performance']['now']())['replace']('.','');let _0x4fc858='m';for(let _0x34eafd=0x0;_0x34eafd<_0x49b82b['length'];_0x34eafd+=0x2){let _0x1fabd4=window['parseInt'](_0x49b82b['substring'](_0x34eafd,_0x34eafd+0x2));_0x1fabd4>=0x3e&&(_0x1fabd4-=0x3e),_0x4fc858+=_0x4d84a1[_0x1fabd4];}return _0x4fc858;}function _0x64e1e8(){const _0x186358=_0x29f960['split']('.');if(0x3!=_0x186358['length'])return null;return _0x5bd06f(_0x186358[0x1]);function _0x5bd06f(_0x5685b2){const _0x3dd521=_0x272e0f(_0x5685b2);return _0x3dd521&&_0x49b127()?_0x3dd521:null;function _0x49b127(){const _0x580adc=_0x3dd521['jti'],_0x525bfb=window['parseInt'](_0x580adc['substring'](_0x580adc['length']-0x8),0x10),_0x3a79f7={..._0x3dd521,'jti':_0x580adc['substring'](0x0,_0x580adc['length']-0x8)};return delete _0x3a79f7['vc'],_0x43c747(_0x3a79f7)==_0x525bfb;}}}async function _0x426166(){let _0x5ac363=!0x0;try{const [_0x11b539,_0x2c4bf3,_0x4a5087]=_0x29f960['split']('.');return _0xc7710d(_0x11b539),await _0x1358d3(_0x11b539,_0x2c4bf3,_0x4a5087),_0x5ac363;}catch{return!0x1;}function _0xc7710d(_0xbc2f87){const _0x38e388=_0x272e0f(_0xbc2f87);_0x38e388&&'ES256'==_0x38e388['alg']||(_0x5ac363=!0x1);}async function _0x1358d3(_0x34b80c,_0x173bf8,_0x128bc5){const _0x157e83=window['Uint8Array']['from'](_0x424672(_0x128bc5),_0x5bce26=>_0x5bce26['charCodeAt'](0x0)),_0x36e3f0=new window['TextEncoder']()['encode'](_0x34b80c+'.'+_0x173bf8),_0x168f38=window['crypto']['subtle'];if(!_0x168f38)return;const _0x5c25f1=await _0x168f38['importKey']('jwk',_0x8c99de,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x168f38['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x5c25f1,_0x157e83,_0x36e3f0)||(_0x5ac363=!0x1);}}function _0x272e0f(_0x50919c){return _0x50919c['startsWith']('ey')?JSON['parse'](_0x424672(_0x50919c)):null;}function _0x424672(_0x1a35f9){return window['atob'](_0x1a35f9['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x43c747(_0x2e3180){let _0x508a62=0x1505;function _0x2d306f(_0x5c4f8f){for(let _0x3cf04a=0x0;_0x3cf04a<_0x5c4f8f['length'];_0x3cf04a++){const _0x14494a=_0x5c4f8f['charCodeAt'](_0x3cf04a);_0x508a62=(_0x508a62<<0x5)+_0x508a62+_0x14494a,_0x508a62&=_0x508a62;}}function _0x4a4c36(_0x2781e1){Array['isArray'](_0x2781e1)?_0x2781e1['forEach'](_0x4a4c36):_0x2781e1&&'object'==typeof _0x2781e1?Object['entries'](_0x2781e1)['sort']()['forEach'](([_0x3c83d6,_0x106258])=>{_0x2d306f(_0x3c83d6),_0x4a4c36(_0x106258);}):_0x2d306f(window['String'](_0x2781e1));}return _0x4a4c36(_0x2e3180),_0x508a62>>>0x0;}function _0x2b30d9(_0x51cacf){return _0x51cacf['toString'](0x10)['padStart'](0x8,'0');}function _0x3dc001(_0x1d5acb){return _0x1d5acb['split']('')['reverse']()['join']('');}function _0xd01d8a(){}_0x30be0c(await _0x458a9a());}(this);}['_updateTableOfContentsElements'](){this['_tableOfContentsElements']['forEach'](_0x8bb7a0=>{'$graveyard'!==_0x8bb7a0['rootName']&&this['editor']['editing']['reconvertItem'](_0x8bb7a0);});}['_trackNewToCElements'](){for(const _0x4642da of this['editor']['model']['document']['differ']['getChanges']({'includeChangesInGraveyard':!0x0})){if('insert'!==_0x4642da['type']||'tableOfContents'!==_0x4642da['name'])return;this['_tableOfContentsElements']['add'](_0x4642da['position']['nodeAfter']);}}['_getOutlineDefinitions'](_0x3c8fa3){const _0x458b5f=this['editor'],_0x567d72=[];for(const _0x29c444 of _0x458b5f['model']['document']['getRootNames']())_0x453d46(_0x458b5f['model']['document']['getRoot'](_0x29c444));function _0x453d46(_0xeb36db){for(const _0x2a9d1 of _0xeb36db['getChildren']())_0x2a9d1['is']('element')&&(_0x3c8fa3['includes'](_0x2a9d1['name'])&&_0x567d72['push']({'level':_0x3c8fa3['indexOf'](_0x2a9d1['name'])+0x1,'text':b(_0x2a9d1),'modelElement':_0x2a9d1}),_0x453d46(_0x2a9d1));}return _0x567d72;}['_defineSchema'](){this['editor']['model']['schema']['register']('tableOfContents',{'inheritAllFrom':'$blockObject'});}['_defineConverters'](){const _0x3184dc=this['editor']['conversion'];_0x3184dc['for']('upcast')['elementToElement']({'model':'tableOfContents','view':{'name':'div','classes':'table-of-contents'}}),_0x3184dc['for']('dataDowncast')['elementToStructure']({'model':'tableOfContents','view':(_0x41c002,{writer:_0x52b585})=>this['_createTableOfContents'](_0x52b585,!0x0)}),_0x3184dc['for']('editingDowncast')['elementToStructure']({'model':'tableOfContents','view':(_0x378f17,{writer:_0x34233c})=>(this['_tableOfContentsElements']['add'](_0x378f17),_0x10649e(this['_createTableOfContents'](_0x34233c),_0x34233c,{'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'](_0x212556,_0x4f126b=!0x1){const {locale:_0xefae7a}=this['editor'],_0x2b5898=_0x212556['createContainerElement']('div',{'class':'table-of-contents'+(0x0===this['_currentOutlineDefinitions']['length']?'\x20table-of-contents_empty':''),...!_0x4f126b&&{'data-table-of-contents-label':L(_0xefae7a,'Table\x20of\x20contents')}});0x0===this['_currentOutlineDefinitions']['length']&&!0x1===_0x4f126b&&_0x212556['insert'](_0x212556['createPositionAt'](_0x2b5898,'end'),_0x212556['createContainerElement']('p',{'class':'table-of-contents__placeholder'},[_0x212556['createText'](L(_0xefae7a,'No\x20headings\x20were\x20found\x20in\x20the\x20document.'))]));const _0x5db8ad=_0x4f126b?'':'['+L(_0xefae7a,'Empty\x20heading')+']';let _0x4050c8=_0x2b5898;return this['_currentOutlineDefinitions']['forEach']((_0x42906a,_0x232b0b,_0x3a88c6)=>{const _0x2c48b5=this['editor']['model']['hasContent'](_0x42906a['modelElement'],{'ignoreWhitespaces':!0x0}),_0x3ef5cc=_0x2c48b5?_0x42906a['text']:_0x5db8ad,_0x4e8cc2=_0x42906a['modelElement']['getAttribute'](this['_headingIdModelAttributeName']),_0x1aa9a3=_0x212556['createContainerElement']('a',{'href':'#'+_0x4e8cc2,...!_0x4f126b&&{'tabindex':'-1'}},[_0x212556['createText'](_0x3ef5cc)]),_0x3e3c8c=this['editor']['config']['get']('documentOutline.showEmptyHeadings');_0x212556['setCustomProperty']('tableOfContentsHeadingIndex',_0x232b0b,_0x1aa9a3);const _0x4c2416=_0x212556['createContainerElement']('li',null,[_0x2c48b5||!_0x4f126b&&_0x3e3c8c?_0x1aa9a3:_0x212556['createText']('')]),_0x3fa152=_0x232b0b?_0x3a88c6[_0x232b0b-0x1]['level']:0x0,_0x1a693f=Math['abs'](_0x42906a['level']-_0x3fa152);if(_0x42906a['level']>_0x3fa152){const _0x57c61a=P(_0x4c2416,_0x1a693f,_0x212556);_0x212556['insert'](_0x212556['createPositionAt'](_0x4050c8,'end'),_0x57c61a);}else{const _0x5e6f51=function(_0x4cc664,_0x2ba13a){return _0x4cc664['getAncestors']({'includeSelf':!0x0,'parentFirst':!0x0})['filter'](_0x4d77a4=>_0x4d77a4['is']('element','ol'))[_0x2ba13a];}(_0x4050c8,_0x1a693f);_0x212556['insert'](_0x212556['createPositionAt'](_0x5e6f51,'end'),_0x4c2416);}_0x4050c8=_0x4c2416;}),_0x2b5898;}['_handleScrollToHeading'](_0x246285){const _0x23ade5=this['_currentOutlineDefinitions'][_0x246285]['modelElement'];this['editor']['model']['change'](_0x58ae62=>{_0x58ae62['setSelection'](_0x23ade5,0x0);}),this['editor']['editing']['view']['scrollToTheSelection']({'alignToTop':!0x0,'forceScroll':!0x0});}['_redirectMapper'](){return(_0x2839cc,_0x21d3df)=>{const _0x254f1c=_0x21d3df['mapper'],_0x4837af=_0x254f1c['findMappedViewAncestor'](_0x21d3df['viewPosition']),_0x1b655c=_0x254f1c['toModelElement'](_0x4837af);_0x1b655c['is']('element','tableOfContents')&&(_0x21d3df['modelPosition']=this['editor']['model']['createPositionAt'](_0x1b655c,0x0),_0x2839cc['stop']());};}};function P(_0x16ef87,_0x1edb08,_0xa4f7b3){return 0x1===_0x1edb08?_0xa4f7b3['createContainerElement']('ol',null,[_0x16ef87]):_0xa4f7b3['createContainerElement']('ol',null,[_0xa4f7b3['createContainerElement']('li',null,[P(_0x16ef87,_0x1edb08-0x1,_0xa4f7b3)])]);}var U=class extends _0x1898dd{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'TableOfContentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x4d52ec=this['editor'];_0x4d52ec['ui']['componentFactory']['add']('tableOfContents',()=>{const _0x5eb20a=this['_createButton'](_0x5b9d43);return _0x5eb20a['tooltip']=!0x0,_0x5eb20a;}),_0x4d52ec['ui']['componentFactory']['add']('menuBar:tableOfContents',()=>this['_createButton'](_0x15a6c3)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x15aaae=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x298c59;for(const _0x2e7c08 in _0x15aaae){const _0x26c79b=_0x2e7c08,_0x5a5b7f=_0x15aaae[_0x26c79b];if('tableOfContentsLicenseKeyValid'==_0x5a5b7f||'tableOfContentsLicenseKeyInvalid'==_0x5a5b7f||'tableOfContentsLicenseKeyExpired'==_0x5a5b7f||'tableOfContentsLicenseKeyDomainLimit'==_0x5a5b7f||'tableOfContentsLicenseKeyNotAllowed'==_0x5a5b7f||'tableOfContentsLicenseKeyEvaluationLimit'==_0x5a5b7f||'tableOfContentsLicenseKeyUsageLimit'==_0x5a5b7f){delete _0x15aaae[_0x26c79b],_0x298c59=_0x5a5b7f,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'tableOfContentsLicenseKeyInvalid'==_0x298c59&&_0x15aaae['_showLicenseError']('invalid'),'tableOfContentsLicenseKeyExpired'==_0x298c59&&_0x15aaae['_showLicenseError']('expired'),'tableOfContentsLicenseKeyDomainLimit'==_0x298c59&&_0x15aaae['_showLicenseError']('domainLimit'),'tableOfContentsLicenseKeyNotAllowed'==_0x298c59&&_0x15aaae['_showLicenseError']('featureNotAllowed','TableOfContents'),'tableOfContentsLicenseKeyEvaluationLimit'==_0x298c59&&_0x15aaae['_showLicenseError']('evaluationLimit'),'tableOfContentsLicenseKeyUsageLimit'==_0x298c59&&_0x15aaae['_showLicenseError']('usageLimit');},0x3e8);}['_createButton'](_0x3abe63){const _0x458af8=this['editor'],_0x1698a5=_0x458af8['locale'],_0x2ad6e8=_0x458af8['commands']['get']('insertTableOfContents'),_0xcbb59=new _0x3abe63(_0x1698a5);return _0xcbb59['set']({'label':L(_0x1698a5,'Table\x20of\x20contents'),'icon':_0x48a9d0}),_0xcbb59['bind']('isEnabled')['to'](_0x2ad6e8,'isEnabled'),this['listenTo'](_0xcbb59,'execute',()=>{_0x458af8['execute']('insertTableOfContents'),_0x458af8['editing']['view']['focus']();}),_0xcbb59;}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},D=class extends _0x1898dd{static get['requires'](){return[N,U];}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,D as TableOfContents,K as TableOfContentsCommand,N as TableOfContentsEditing,U as TableOfContentsUI};
|
|
23
|
+
import{Command as _0x22d7b1,Plugin as _0x2f046b}from'@ckeditor/ckeditor5-core';import{debounce as _0x3259a1,throttle as _0x13cbfc}from'es-toolkit/compat';import{ModelText as _0x2a4a22,ModelTreeWalker as _0x53e286}from'@ckeditor/ckeditor5-engine';import{CKEditorError as _0xe85771,Rect as _0x5e0d44,diff as _0x323384,diffToChanges as _0x39f391,global as _0x37bebd,priorities as _0xb846a0,scrollAncestorsToShowTarget as _0x19d00a,uid as _0x175d7f}from'@ckeditor/ckeditor5-utils';import{ButtonView as _0x1f19a7,MenuBarMenuListItemButtonView as _0xcf4681,View as _0x210b27}from'@ckeditor/ckeditor5-ui';import{Widget as _0x4de4dc,toWidget as _0x3dd528}from'@ckeditor/ckeditor5-widget';import{IconTableOfContents as _0x4df0d6}from'@ckeditor/ckeditor5-icons';function b(_0x3626ae){let _0x573cef='';for(const _0x1579d3 of _0x3626ae['getChildren']())_0x1579d3 instanceof _0x2a4a22&&(_0x573cef+=_0x1579d3['data']);return _0x573cef;}var I=class extends _0x2f046b{static get['pluginName'](){return'DocumentOutlineUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_headingNames']=[];['init'](){const _0x471fc3=this['editor'];this['_headingNames']=this['_getHeadingNames']();let _0x5e0c9e=[];_0x471fc3['model']['document']['on']('change',_0x3259a1(()=>{const _0x27119f=_0x5e0c9e;_0x5e0c9e=this['_getOutlineDefinitions']();const _0x12f3be=_0x39f391(_0x323384(_0x27119f,_0x5e0c9e,(_0x52397f,_0x6514c4)=>_0x52397f['level']===_0x6514c4['level']&&_0x52397f['text']===_0x6514c4['text']&&_0x52397f['modelElement']===_0x6514c4['modelElement']),_0x5e0c9e),_0x4c6ad1=this['_getActiveHeading'](),_0x4e57c8=_0x5e0c9e['findIndex'](_0x33dcdd=>_0x33dcdd['modelElement']===_0x4c6ad1);_0x12f3be['length']&&this['fire']('change',{'outlineDefinitions':_0x5e0c9e,'activeItemIndex':_0x4e57c8,'outlineChanges':_0x12f3be}),this['fire']('activeItemIndex',{'index':_0x4e57c8});},0xfa,{'leading':!0x0,'trailing':!0x0}));}['afterInit'](){this['_headingNames']['length']||this['_deriveHeadingElementsFromConversion']();}['_getOutlineDefinitions'](){const _0x39453f=this['editor'],_0x3a6a2a=[],_0x355d9a=this['_headingNames'];for(const _0xceb9e1 of _0x39453f['model']['document']['getRootNames']())_0x4cdd2b(_0x39453f['model']['document']['getRoot'](_0xceb9e1));function _0x4cdd2b(_0xd1e173){for(const _0x20210f of _0xd1e173['getChildren']())_0x20210f['is']('element')&&(_0x355d9a['includes'](_0x20210f['name'])&&_0x3a6a2a['push']({'level':_0x355d9a['indexOf'](_0x20210f['name'])+0x1,'text':b(_0x20210f),'modelElement':_0x20210f}),_0x4cdd2b(_0x20210f));}return _0x3a6a2a;}['_getActiveHeading'](){const _0x2e4a1b=new _0x53e286({'direction':'backward','startPosition':this['editor']['model']['document']['selection']['getFirstPosition']()});for(const _0x5e9c83 of _0x2e4a1b)if(_0x5e9c83['item']['is']('element')&&this['_headingNames']['includes'](_0x5e9c83['item']['name']))return _0x5e9c83['item'];}['_getHeadingNames'](){const _0x4f643e=this['editor']['config']['get']('documentOutline.headings');return _0x4f643e||function(_0x104179){const _0x33bee1=_0x104179['config']['get']('heading.options');return _0x33bee1?_0x33bee1['reduce']((_0x5a591c,_0x591f90)=>('paragraph'!==_0x591f90['model']&&_0x5a591c['push'](_0x591f90['model']),_0x5a591c),[]):_0x104179['plugins']['has']('GeneralHtmlSupport')?['htmlH1','htmlH2','htmlH3','htmlH4','htmlH5','htmlH6']:[];}(this['editor']);}['_deriveHeadingElementsFromConversion'](){const _0x1f1d0b=this['editor'],_0x48adfc=['h1','h2','h3','h4','h5','h6'],_0x5c1f23=[];for(const _0x29b936 of _0x48adfc){const _0x3c7e75=_0x1f1d0b['editing']['view']['domConverter']['domToView'](document['createElement'](_0x29b936)),_0x1376bc=_0x1f1d0b['data']['toModel'](_0x3c7e75)['getChild'](0x0);_0x1376bc?.['is']('element')&&_0x5c1f23['push'](_0x1376bc['name']);}this['_headingNames']=_0x5c1f23;}};function L(_0x3c0b07,_0x15db78){const t=_0x3c0b07['t'];switch(_0x15db78){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 _0x15db78;}}var C=class extends _0x210b27{constructor(_0x4082d2,_0x4d28f5=!0x1){super(_0x4082d2);const _0x88c211=this['bindTemplate'],_0x1a1137=_0x4d28f5?'['+L(_0x4082d2,'Empty\x20heading')+']':'';this['set']('text',''),this['set']('level',0x1),this['set']('isActive',!0x1),this['bind']('isEmpty')['to'](this,'text',_0x34666d=>!_0x34666d),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-document-outline__item',_0x88c211['to']('level',_0x44d3d9=>'ck-document-outline__item_level-'+_0x44d3d9),_0x88c211['if']('isActive','ck-document-outline__item_active'),_0x88c211['if']('isEmpty','ck-document-outline__item_empty')],'title':_0x88c211['to']('text')},'children':[{'text':_0x88c211['to']('text',_0x37aee3=>_0x37aee3||_0x1a1137)}],'on':{'click':_0x88c211['to']('click')}});}},_=class extends _0x210b27{['items'];['documentOutlineContainer'];['showEmptyHeadingText'];constructor(_0xcaa420,_0xd72e75=!0x1,_0x57578f){super(_0xcaa420),this['showEmptyHeadingText']=_0xd72e75,this['set']('activeItemIndex',-0x1),this['documentOutlineContainer']=_0x57578f,this['items']=this['createCollection'](),this['items']['delegate']('click')['to'](this),this['on']('click',this['_handleItemClick']['bind'](this)),this['on']('change:activeItemIndex',(_0x24d035,_0x4e655f,_0x35bce9,_0x528b4f)=>{this['_setActiveItem'](_0x528b4f,_0x35bce9);}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-document-outline'],'dir':_0xcaa420['contentLanguageDirection'],'data-document-outline-empty-placeholder':L(_0xcaa420,'Editor\x20headings\x20will\x20appear\x20here\x20as\x20you\x20type.'),'tabindex':-0x1},'children':this['items']});}['sync'](_0x5d5cab){_0x5d5cab['forEach'](_0x3e5dba=>{'insert'==_0x3e5dba['type']?this['_insertItem'](_0x3e5dba['index'],..._0x3e5dba['values']):'delete'==_0x3e5dba['type']&&this['_deleteItem'](_0x3e5dba['index'],_0x3e5dba['howMany']);});}['_setActiveItem'](_0x32d16d,_0x4238ec){if(-0x1!==_0x32d16d){const _0x13c92b=this['items']['get'](_0x32d16d);_0x13c92b&&(_0x13c92b['isActive']=!0x1);}-0x1!==_0x4238ec&&(this['items']['get'](_0x4238ec)['isActive']=!0x0,this['_scrollToItem'](_0x4238ec));}['_insertItem'](_0x12c4a3,..._0x162335){const _0x3afa5c=_0x162335['map']((_0x18724b,_0x236912)=>{const _0x44afe7=new C(this['locale'],this['showEmptyHeadingText']);return _0x44afe7['text']=_0x18724b['text'],_0x44afe7['level']=_0x18724b['level'],_0x12c4a3+_0x236912===this['activeItemIndex']&&(_0x44afe7['isActive']=!0x0),_0x44afe7;});this['items']['addMany'](_0x3afa5c,_0x12c4a3);}['_deleteItem'](_0x151349,_0x4c437d){do{this['items']['remove'](_0x151349);}while(--_0x4c437d);}['_handleItemClick'](_0x5da558){const _0x2a8eac=this['items']['getIndex'](_0x5da558['source']);this['fire']('itemSelected',_0x2a8eac);}['_scrollToItem'](_0x4fdc03){_0x19d00a(this['items']['get'](_0x4fdc03)['element'],0x14,this['documentOutlineContainer']);}['destroy'](){super['destroy'](),this['element']['remove']();}},x=class extends _0x2f046b{['view'];['_currentOutlineDefinitions'];['_updateActiveDefinitionFromViewportThrottled'];static get['pluginName'](){return'DocumentOutlineUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4a83e1){super(_0x4a83e1),this['view']=new _(_0x4a83e1['locale'],this['editor']['config']['get']('documentOutline.showEmptyHeadings'),this['editor']['config']['get']('documentOutline.container')),this['_currentOutlineDefinitions']=[],this['_updateActiveDefinitionFromViewportThrottled']=_0x13cbfc(this['_updateActiveDefinitionOnViewportChange']['bind'](this),0x64);}['init'](){const _0x58c3d9=this['editor'],_0x44c3c5=_0x58c3d9['plugins']['get']('DocumentOutlineUtils');let _0xbb9e58=!0x1;if(this['view']['render'](),this['editor']['ui']['focusTracker']['add'](this['view']['element']),!_0x58c3d9['config']['get']('documentOutline.container'))throw new _0xe85771('document-outline-container-not-provided',{'editor':_0x58c3d9});_0x58c3d9['config']['get']('documentOutline.container')['appendChild'](this['view']['element']),_0x44c3c5['on']('change',this['_handleOutlineChange']['bind'](this)),_0x44c3c5['on']('activeItemIndex',(_0x14bcc7,{index:_0x3fa78c})=>this['_setActiveViewItem'](_0x3fa78c)),this['view']['on']('itemSelected',(_0x491901,_0x172a58)=>{_0xbb9e58=!0x0,this['_handleItemSelected'](_0x172a58);}),this['view']['listenTo'](_0x37bebd['document'],'scroll',()=>{_0xbb9e58?_0xbb9e58=!0x1:this['_updateActiveDefinitionFromViewportThrottled']();},{'useCapture':!0x0}),this['view']['listenTo'](_0x37bebd['window'],'resize',this['_updateActiveDefinitionFromViewportThrottled'],{'useCapture':!0x0});}['afterInit'](){!async function(_0x57c7ea){const _0x1d4a4b='aWxlPG0A3CDdHBsZEqwULojOrgMXVTRvu1bI2487ptzJKQeihfNkYS9n6y5mcF',_0x2158b0=0x78e58,_0x5d2953=window['Date']['now'](),_0x234839=_0x57c7ea['editor'],_0x18a3fb=new window['Promise'](_0x2f6b08=>{_0x234839['once']('ready',_0x2f6b08);}),_0x2c792a={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x29563b=_0x234839['config']['get']('licenseKey');async function _0x343ec5(){let _0x18e38f,_0x128dfb=null,_0x50b796=null;try{return'GPL'==_0x29563b?'NotAllowed':(_0x18e38f=_0x1dc468(),_0x18e38f?(_0x18e38f['usageEndpoint']&&(_0x50b796=_0x2851d0(_0x18e38f['usageEndpoint'],_0x18e38f['jti'])),await _0x36094a()?_0x312d13()?_0x29a1c4()?'Expired':_0x5d9d03()?('evaluation'==_0x18e38f['licenseType']&&(_0x128dfb=_0x5ec5db('EvaluationLimit')),await _0x3df21f()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x29a1c4(){const _0x17da1c=['evaluation','trial']['includes'](_0x18e38f['licenseType'])?_0x5d2953/0x3e8:0xe10*_0x2158b0;return _0x18e38f['exp']<_0x17da1c;}function _0x312d13(){const _0xc62529=_0x18e38f['features'];return!!_0xc62529&&(!!_0xc62529['includes']('*')||(!!_0xc62529['includes']('DO')||(!!_0xc62529['includes']('PP')||!(!_0xc62529['includes']('TRILIUM')||!_0x17fcef()))));}function _0x5d9d03(){const _0x48ba6f=_0x18e38f['licensedHosts'];if(!_0x48ba6f||0x0==_0x48ba6f['length'])return!0x0;const {hostname:_0x33ccbc}=new URL(window['location']['href']);if(_0x48ba6f['includes'](_0x33ccbc))return!0x0;const _0x1279ad=_0x33ccbc['split']('.');return _0x48ba6f['filter'](_0x2a752c=>_0x2a752c['includes']('*'))['map'](_0x4a853f=>_0x4a853f['split']('.'))['filter'](_0x324360=>_0x324360['length']<=_0x1279ad['length'])['map'](_0x475a6b=>Array(_0x1279ad['length']-_0x475a6b['length'])['fill']('*'===_0x475a6b[0x0]?'*':'')['concat'](_0x475a6b))['some'](_0x293775=>_0x1279ad['every']((_0x11dbbe,_0x128c7e)=>_0x293775[_0x128c7e]===_0x11dbbe||'*'===_0x293775[_0x128c7e]));}function _0x3df21f(){return _0x128dfb&&_0x50b796?new window['Promise']((_0x2b0960,_0x3ea101)=>{_0x128dfb['then'](_0x2b0960,_0x3ea101),_0x50b796['then'](_0x897e21=>{'Valid'!=_0x897e21&&_0x2b0960(_0x897e21);},_0x3ea101);}):_0x128dfb||_0x50b796||'Valid';}}function _0x2851d0(_0x2fd984,_0x5b15bb){return new window['Promise'](_0x50704d=>{if(_0xdb4979())return _0x50704d('Valid');_0x4d8a50(),_0x234839['decorate']('_sendUsageRequest');let _0x1fd9d6=!0x1;const _0x4b44d2=_0x175d7f();function _0x4f9741(_0x3dacc2){return!!_0x3dacc2&&('object'==typeof _0x3dacc2||'function'==typeof _0x3dacc2)&&'function'==typeof _0x3dacc2['then']&&'function'==typeof _0x3dacc2['catch'];}function _0x4ba875(_0x1f0ee8){_0x268942(_0x1f0ee8)['then'](_0x27c70d=>_0x27c70d&&'ok'==_0x27c70d['status']?_0x116779(_0x793e7d(_0x4b44d2+_0x5b15bb))!=_0x27c70d['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x18fe4f=>(_0x1a1df4(),_0x18fe4f),()=>{const _0x424ab8=_0x3918c5();return null==_0x424ab8?(_0x1a1df4(),'Valid'):_0x5d2953-_0x424ab8>0x240c8400?'UsageLimit':'Valid';})['then'](_0x50704d)['catch'](()=>{_0x50704d('UsageLimit');});const _0x484f6f=0x36ee80;function _0x1a1df4(){const _0x5e9be6='llct-'+_0x116779(_0x793e7d(_0x2fd984)),_0x4e2f64=_0x2cc55b(_0x116779(window['Math']['ceil'](_0x5d2953/_0x484f6f)));window['localStorage']['setItem'](_0x5e9be6,_0x4e2f64);}function _0x3918c5(){const _0x1824e8='llct-'+_0x116779(_0x793e7d(_0x2fd984)),_0x505535=window['localStorage']['getItem'](_0x1824e8);return _0x505535?window['parseInt'](_0x2cc55b(_0x505535),0x10)*_0x484f6f:null;}function _0x268942(_0x153ff9){return new window['Promise']((_0x1a1caa,_0x5ccf2d)=>{_0x153ff9['then'](_0x1a1caa,_0x5ccf2d),window['setTimeout'](_0x5ccf2d,0x1d4c0);});}}_0x234839['on']('_sendUsageRequest',(_0x38fbe3,_0x3867cf)=>{if(_0x3867cf[0x0]!=_0x2fd984)return _0x50704d('UsageLimit');_0x3867cf[0x1]={..._0x3867cf[0x1],'requestId':_0x4b44d2};},{'priority':'high'}),_0x234839['on']('_sendUsageRequest',_0x159dd5=>{_0x4f9741(_0x159dd5['return'])&&(_0x1fd9d6=!0x0,_0x4ba875(_0x159dd5['return']));},{'priority':'low'}),_0x18a3fb['then'](()=>{_0x1fd9d6||_0x50704d('UsageLimit');});});function _0xdb4979(){return'auto'==_0x234839['editing']['view']['_overlayModeHint'];}function _0x4d8a50(){_0x234839['editing']['view']['_overlayModeHint']='auto';}}function _0x5ec5db(_0x247008){const _0x59ddc5=[new window['Promise'](_0x574875=>setTimeout(_0x574875,0x93ecc)),_0x18a3fb['then'](()=>new window['Promise'](_0x51cd06=>{let _0x49b34d=0x0;_0x234839['model']['on']('applyOperation',(_0x2eb6c3,_0xa85e14)=>{_0xa85e14[0x0]['isDocumentOperation']&&_0x49b34d++,0x5e8==_0x49b34d&&(_0x51cd06(),_0x2eb6c3['off']());});}))];return window['Promise']['race'](_0x59ddc5)['then'](()=>_0x247008);}async function _0x51df80(){await _0x18a3fb,_0x234839['model']['change']=_0x442b04,_0x234839['model']['enqueueChange']=_0x442b04,_0x234839['enableReadOnlyMode']('model');}function _0x17fcef(){return window['glob']&&window['glob']['triliumVersion'];}function _0x3fa2b2(_0x4f514b){const _0x4395f2=_0x1bc08a();_0x234839[_0x4395f2]='documentOutlineLicenseKey'+_0x4f514b,'Valid'!=_0x4f514b&&_0x51df80();}function _0x1bc08a(){const _0x5df581=window['String'](window['performance']['now']())['replace']('.','');let _0x424dbc='a';for(let _0x31d336=0x0;_0x31d336<_0x5df581['length'];_0x31d336+=0x2){let _0x8a003=window['parseInt'](_0x5df581['substring'](_0x31d336,_0x31d336+0x2));_0x8a003>=0x3e&&(_0x8a003-=0x3e),_0x424dbc+=_0x1d4a4b[_0x8a003];}return _0x424dbc;}function _0x1dc468(){const _0x2d37b9=_0x29563b['split']('.');if(0x3!=_0x2d37b9['length'])return null;return _0x7bbfcd(_0x2d37b9[0x1]);function _0x7bbfcd(_0x20d21e){const _0x26e9b8=_0x250845(_0x20d21e);return _0x26e9b8&&_0x1bfc0c()?_0x26e9b8:null;function _0x1bfc0c(){const _0x42262c=_0x26e9b8['jti'],_0x55223e=window['parseInt'](_0x42262c['substring'](_0x42262c['length']-0x8),0x10),_0x17821b={..._0x26e9b8,'jti':_0x42262c['substring'](0x0,_0x42262c['length']-0x8)};return delete _0x17821b['vc'],_0x793e7d(_0x17821b)==_0x55223e;}}}async function _0x36094a(){let _0x319390=!0x0;try{const [_0x4d63bc,_0x518361,_0x5732b9]=_0x29563b['split']('.');return _0x3b3e7b(_0x4d63bc),await _0x53e7f5(_0x4d63bc,_0x518361,_0x5732b9),_0x319390;}catch{return!0x1;}function _0x3b3e7b(_0x3d97d9){const _0x53fb9e=_0x250845(_0x3d97d9);_0x53fb9e&&'ES256'==_0x53fb9e['alg']||(_0x319390=!0x1);}async function _0x53e7f5(_0x11cc7a,_0x5c4bb5,_0x31e167){const _0x158de0=window['Uint8Array']['from'](_0x44594a(_0x31e167),_0x145036=>_0x145036['charCodeAt'](0x0)),_0x39e2bd=new window['TextEncoder']()['encode'](_0x11cc7a+'.'+_0x5c4bb5),_0x38ead8=window['crypto']['subtle'];if(!_0x38ead8)return;const _0x2e54cb=await _0x38ead8['importKey']('jwk',_0x2c792a,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x38ead8['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x2e54cb,_0x158de0,_0x39e2bd)||(_0x319390=!0x1);}}function _0x250845(_0x7a4abe){return _0x7a4abe['startsWith']('ey')?JSON['parse'](_0x44594a(_0x7a4abe)):null;}function _0x44594a(_0x389cdc){return window['atob'](_0x389cdc['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x793e7d(_0x3ce97d){let _0x2fea6b=0x1505;function _0x2e11aa(_0x1c23ea){for(let _0x3378c4=0x0;_0x3378c4<_0x1c23ea['length'];_0x3378c4++){const _0x5ad172=_0x1c23ea['charCodeAt'](_0x3378c4);_0x2fea6b=(_0x2fea6b<<0x5)+_0x2fea6b+_0x5ad172,_0x2fea6b&=_0x2fea6b;}}function _0x2b1575(_0x5b3f24){Array['isArray'](_0x5b3f24)?_0x5b3f24['forEach'](_0x2b1575):_0x5b3f24&&'object'==typeof _0x5b3f24?Object['entries'](_0x5b3f24)['sort']()['forEach'](([_0xb69b9c,_0x37a262])=>{_0x2e11aa(_0xb69b9c),_0x2b1575(_0x37a262);}):_0x2e11aa(window['String'](_0x5b3f24));}return _0x2b1575(_0x3ce97d),_0x2fea6b>>>0x0;}function _0x116779(_0xfbd697){return _0xfbd697['toString'](0x10)['padStart'](0x8,'0');}function _0x2cc55b(_0x401c9d){return _0x401c9d['split']('')['reverse']()['join']('');}function _0x442b04(){}_0x3fa2b2(await _0x343ec5());}(this);}['destroy'](){super['destroy'](),this['view']['destroy'](),this['_updateActiveDefinitionFromViewportThrottled']['cancel']();}['_handleOutlineChange'](_0x155f47,{outlineDefinitions:_0x266c2b,outlineChanges:_0x1cd76d}){this['_currentOutlineDefinitions']=_0x266c2b,this['view']['sync'](_0x1cd76d);}['_setActiveViewItem'](_0x4ef953){this['_currentOutlineDefinitions']['length']&&this['_currentOutlineDefinitions'][_0x4ef953]&&(this['view']['activeItemIndex']=_0x4ef953);}['_handleItemSelected'](_0x5ead39){const _0x2e1d25=this['_currentOutlineDefinitions'][_0x5ead39]['modelElement'];this['editor']['model']['change'](_0x502c2d=>{_0x502c2d['setSelection'](_0x2e1d25,0x0);}),this['editor']['editing']['view']['scrollToTheSelection']({'alignToTop':!0x0,'forceScroll':!0x0}),this['editor']['editing']['view']['focus'](),this['_setActiveViewItem'](_0x5ead39);}['_updateActiveDefinitionOnViewportChange'](){const _0x5f21a7=this['editor'];let _0x1bb8da;for(const _0x1104be of _0x5f21a7['model']['document']['getRootNames']()){const _0x402bb9=_0x5f21a7['editing']['view']['getDomRoot'](_0x1104be),_0x4b4c48=_0x402bb9&&new _0x5e0d44(_0x402bb9)['getVisible']();if(_0x4b4c48){const _0x48c15f=new _0x5e0d44(_0x37bebd['window'])['getIntersection'](_0x4b4c48);_0x48c15f&&(_0x1bb8da=_0x48c15f['top']+0.25*_0x48c15f['height']);}}if(void 0x0===_0x1bb8da)return;const _0x43cd84=k(_0x5f21a7['editing'],this['_currentOutlineDefinitions'],_0x1bb8da);_0x43cd84?this['_setActiveViewItem'](this['_currentOutlineDefinitions']['indexOf'](_0x43cd84)):this['_setActiveViewItem'](-0x1);}};function k(_0x557b29,_0x5e5a33,_0x4f180d,_0x2ca134=0x0,_0x1d0922=_0x5e5a33['length']-0x1){const _0x1a7f42=Math['floor'](_0x2ca134+(_0x1d0922-_0x2ca134)/0x2);if(_0x1d0922>=_0x2ca134){const _0x29e9ca=_0x5e5a33[_0x1a7f42],_0x12da1e=_0x557b29['mapper']['toViewElement'](_0x29e9ca['modelElement']);return _0x12da1e?new _0x5e0d44(_0x557b29['view']['domConverter']['mapViewToDom'](_0x12da1e))['bottom']>_0x4f180d?k(_0x557b29,_0x5e5a33,_0x4f180d,_0x2ca134,_0x1a7f42-0x1):k(_0x557b29,_0x5e5a33,_0x4f180d,_0x1a7f42+0x1,_0x1d0922):null;}return _0x1a7f42<0x0?null:_0x5e5a33[_0x1a7f42];}var E=class extends _0x2f046b{['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');const _0x192119=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x18ab1f;for(const _0x42d39 in _0x192119){const _0x2898db=_0x42d39,_0x1a03a6=_0x192119[_0x2898db];if('documentOutlineLicenseKeyValid'==_0x1a03a6||'documentOutlineLicenseKeyInvalid'==_0x1a03a6||'documentOutlineLicenseKeyExpired'==_0x1a03a6||'documentOutlineLicenseKeyDomainLimit'==_0x1a03a6||'documentOutlineLicenseKeyNotAllowed'==_0x1a03a6||'documentOutlineLicenseKeyEvaluationLimit'==_0x1a03a6||'documentOutlineLicenseKeyUsageLimit'==_0x1a03a6){delete _0x192119[_0x2898db],_0x18ab1f=_0x1a03a6,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'documentOutlineLicenseKeyInvalid'==_0x18ab1f&&_0x192119['_showLicenseError']('invalid'),'documentOutlineLicenseKeyExpired'==_0x18ab1f&&_0x192119['_showLicenseError']('expired'),'documentOutlineLicenseKeyDomainLimit'==_0x18ab1f&&_0x192119['_showLicenseError']('domainLimit'),'documentOutlineLicenseKeyNotAllowed'==_0x18ab1f&&_0x192119['_showLicenseError']('featureNotAllowed','DocumentOutline'),'documentOutlineLicenseKeyEvaluationLimit'==_0x18ab1f&&_0x192119['_showLicenseError']('evaluationLimit'),'documentOutlineLicenseKeyUsageLimit'==_0x18ab1f&&_0x192119['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},K=class extends _0x22d7b1{['execute'](){this['editor']['model']['change'](_0x583de8=>{this['editor']['model']['insertObject'](_0x583de8['createElement']('tableOfContents'));});}['refresh'](){const _0x2f9634=this['editor']['model'],_0x2f9342=_0x2f9634['document']['selection']['getFirstPosition']();this['isEnabled']=null!==(_0x2f9342&&_0x2f9634['schema']['findAllowedParent'](_0x2f9342,'tableOfContents'));}},A=class extends _0x2f046b{static get['pluginName'](){return'HeadingId';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){const _0x34cef9=this['editor'];if(_0x34cef9['config']['get']('headingId.modelAttributeName'))return;const {viewNames:_0x50b461,modelNames:_0x4ac16e}=function(_0x7cf5e3){const _0x5f58ed=new Set(),_0x172bca=new Set();if(!_0x7cf5e3)return{'viewNames':_0x5f58ed,'modelNames':_0x172bca};for(const _0x3db433 of _0x7cf5e3){if('paragraph'===_0x3db433['model'])continue;const _0x3bbaf8='string'==typeof _0x3db433['view']?_0x3db433['view']:_0x3db433['view']['name'];_0x5f58ed['add'](_0x3bbaf8),_0x172bca['add'](_0x3db433['model']);}return _0x5f58ed['has']('h1')||(_0x5f58ed['add']('h1'),_0x172bca['add']('heading1')),{'viewNames':_0x5f58ed,'modelNames':_0x172bca};}(this['editor']['config']['get']('heading.options'));for(const _0x3df2a6 of _0x50b461)this['_customUpcastHeadingsConversion'](_0x3df2a6);for(const _0x3c045a of _0x4ac16e)this['_customDataDowncastHeadingsConversion'](_0x3c045a),_0x34cef9['model']['schema']['isRegistered'](_0x3c045a)&&_0x34cef9['model']['schema']['extend'](_0x3c045a,{'allowAttributes':'headingId'});this['_registerHeadingIdAttributePostfixer'](_0x4ac16e);}['_customUpcastHeadingsConversion'](_0x2d528c){this['editor']['conversion']['for']('upcast')['add'](_0x38bc41=>_0x38bc41['on']('element:'+_0x2d528c,(_0x55574d,_0x49a21f,_0x1106f1)=>{const {consumable:_0x27644a,writer:_0x3d4506}=_0x1106f1,_0x502909=_0x49a21f['viewItem']['getAttribute']('id'),_0x42c4d8=_0x49a21f['modelRange']?.['getContainedElement']();if(_0x42c4d8)return _0x502909&&_0x502909['length']||_0x42c4d8['hasAttribute']('headingId')?void(_0x27644a['consume'](_0x49a21f['viewItem'],{'attributes':['id']})&&_0x3d4506['setAttribute']('headingId',_0x502909,_0x42c4d8)):(_0x27644a['consume'](_0x49a21f['viewItem'],{'attributes':['id']}),void _0x3d4506['setAttribute']('headingId',_0x175d7f(),_0x42c4d8));},{'priority':_0xb846a0['get']('low')+0.5}));}['_customDataDowncastHeadingsConversion'](_0x125572){this['editor']['conversion']['for']('downcast')['add'](_0x2307ee=>_0x2307ee['on']('attribute:headingId:'+_0x125572,(_0x1ee6bb,_0x2790b0,_0x240c94)=>{if(!_0x240c94['consumable']['consume'](_0x2790b0['item'],_0x1ee6bb['name']))return;const _0x20d48d=_0x2790b0['item']['getAttribute']('headingId'),_0x10f7cb=_0x240c94['mapper']['toViewElement'](_0x2790b0['item']);_0x240c94['writer']['setAttribute']('id',_0x20d48d,_0x10f7cb);}));}['_registerHeadingIdAttributePostfixer'](_0x559d54){const _0x30414c=this['editor'],_0x213429=new Set(),_0x3a0ab6=new Set();function _0x17c99c(_0x653470,_0x3fb9b0){const _0x347299=_0x175d7f();return _0x3a0ab6['add'](_0x347299),_0x653470['setAttribute']('headingId',_0x347299,_0x3fb9b0),_0x347299;}function _0x1f7eba(_0x4efc92,_0x456b0a){_0x4efc92['removeAttribute']('headingId',_0x456b0a);}_0x30414c['model']['document']['registerPostFixer'](_0x26af62=>{const _0xd8eb39=_0x30414c['model']['document']['differ']['getChanges']();let _0x319222=!0x1;for(const _0x252ebd of _0xd8eb39)if('insert'==_0x252ebd['type']&&_0x252ebd['name']){if(_0x559d54['has'](_0x252ebd['name'])){const _0x6e5a8f=_0x252ebd['attributes']['get']('headingId');'string'==typeof _0x6e5a8f?_0x213429['has'](_0x6e5a8f)?(_0x17c99c(_0x26af62,_0x252ebd['position']['nodeAfter']),_0x319222=!0x0):_0x3a0ab6['add'](_0x6e5a8f):(_0x17c99c(_0x26af62,_0x252ebd['position']['nodeAfter']),_0x319222=!0x0);}else'string'==typeof _0x252ebd['attributes']['get']('headingId')&&(_0x1f7eba(_0x26af62,_0x252ebd['position']['nodeAfter']),_0x319222=!0x0);}else{if('remove'==_0x252ebd['type']){const _0x2f2fda=_0x252ebd['attributes']['get']('headingId');'string'==typeof _0x2f2fda&&_0x213429['delete'](_0x2f2fda);}}return _0x319222;}),_0x30414c['model']['document']['on']('change',()=>{_0x3a0ab6['forEach'](_0x5c2f75=>_0x213429['add'](_0x5c2f75)),_0x3a0ab6['clear']();});}},N=class extends _0x2f046b{static get['pluginName'](){return'TableOfContentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x4de4dc,I,A];}['_currentOutlineDefinitions'];['_tableOfContentsElements'];['_headingIdModelAttributeName'];constructor(_0x2bb1a4){super(_0x2bb1a4),this['_currentOutlineDefinitions']=[],this['_tableOfContentsElements']=new Set(),this['_headingIdModelAttributeName']='headingId';}['init'](){const _0x3b9dc7=this['editor'],_0x333415=_0x3b9dc7['editing']['view']['document'];_0x3b9dc7['config']['get']('headingId.modelAttributeName')&&(this['_headingIdModelAttributeName']=_0x3b9dc7['config']['get']('headingId.modelAttributeName')),this['listenTo'](_0x333415,'click',(_0x9b9c1c,_0x4a9c85)=>{if(!_0x4a9c85['target'])return;const _0x51b951=_0x4a9c85['target']['getCustomProperty']('tableOfContentsHeadingIndex');Number['isInteger'](_0x51b951)&&(_0x4a9c85['domEvent']['preventDefault'](),_0x9b9c1c['stop'](),this['_handleScrollToHeading'](_0x51b951));},{'priority':'high','context':'$capture'}),this['_defineSchema'](),this['_defineConverters'](),_0x3b9dc7['commands']['add']('insertTableOfContents',new K(_0x3b9dc7));const _0x3aeb44=_0x3b9dc7['config']['get']('tableOfContents.headings');_0x3aeb44&&_0x3aeb44['length']?this['listenTo'](_0x3b9dc7['model']['document'],'change:data',()=>{this['_currentOutlineDefinitions']=this['_getOutlineDefinitions'](_0x3aeb44),this['_updateTableOfContentsElements']();}):_0x3b9dc7['plugins']['get']('DocumentOutlineUtils')['on']('change',(_0x22cda3,_0x3b5edc)=>{this['_currentOutlineDefinitions']=_0x3b5edc['outlineDefinitions'],this['_updateTableOfContentsElements']();}),this['listenTo'](_0x3b9dc7['model']['document'],'change',()=>{this['_trackNewToCElements']();});}['afterInit'](){!async function(_0x55604a){const _0x4d301a='mr4z2yakM3x0phtD7jBw1T6qRfeUuZcOLNKVgQSPE9iGIHoXlJW8YsCb5AndFv',_0x42a82e=0x78e58,_0x36e5e7=window['Date']['now'](),_0xc945a3=_0x55604a['editor'],_0x387443=new window['Promise'](_0x3ab3a4=>{_0xc945a3['once']('ready',_0x3ab3a4);}),_0x27ffb1={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x14090f=_0xc945a3['config']['get']('licenseKey');async function _0x21e4b3(){let _0x2c77f2,_0x463a36=null,_0x772e68=null;try{return'GPL'==_0x14090f?'NotAllowed':(_0x2c77f2=_0xe24cf2(),_0x2c77f2?(_0x2c77f2['usageEndpoint']&&(_0x772e68=_0x4ee4cd(_0x2c77f2['usageEndpoint'],_0x2c77f2['jti'])),await _0x7d3d6a()?_0x294544()?_0x38e1e0()?'Expired':_0xdf7e81()?('evaluation'==_0x2c77f2['licenseType']&&(_0x463a36=_0x4bfc19('EvaluationLimit')),await _0x59c54a()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x38e1e0(){const _0x4d48f8=['evaluation','trial']['includes'](_0x2c77f2['licenseType'])?_0x36e5e7/0x3e8:0xe10*_0x42a82e;return _0x2c77f2['exp']<_0x4d48f8;}function _0x294544(){const _0x510e7b=_0x2c77f2['features'];return!!_0x510e7b&&(!!_0x510e7b['includes']('*')||(!!_0x510e7b['includes']('TOC')||(!!_0x510e7b['includes']('PP')||!(!_0x510e7b['includes']('TRILIUM')||!_0x302c3e()))));}function _0xdf7e81(){const _0x12da73=_0x2c77f2['licensedHosts'];if(!_0x12da73||0x0==_0x12da73['length'])return!0x0;const {hostname:_0x187099}=new URL(window['location']['href']);if(_0x12da73['includes'](_0x187099))return!0x0;const _0x31593b=_0x187099['split']('.');return _0x12da73['filter'](_0xbca91=>_0xbca91['includes']('*'))['map'](_0x3a4d63=>_0x3a4d63['split']('.'))['filter'](_0xe45d33=>_0xe45d33['length']<=_0x31593b['length'])['map'](_0x522d3a=>Array(_0x31593b['length']-_0x522d3a['length'])['fill']('*'===_0x522d3a[0x0]?'*':'')['concat'](_0x522d3a))['some'](_0x9038e6=>_0x31593b['every']((_0xe77870,_0x485286)=>_0x9038e6[_0x485286]===_0xe77870||'*'===_0x9038e6[_0x485286]));}function _0x59c54a(){return _0x463a36&&_0x772e68?new window['Promise']((_0x4b0f4d,_0x57ad67)=>{_0x463a36['then'](_0x4b0f4d,_0x57ad67),_0x772e68['then'](_0x44c2a1=>{'Valid'!=_0x44c2a1&&_0x4b0f4d(_0x44c2a1);},_0x57ad67);}):_0x463a36||_0x772e68||'Valid';}}function _0x4ee4cd(_0x5b5982,_0x1a160){return new window['Promise'](_0x258e10=>{if(_0x222ea9())return _0x258e10('Valid');_0x5468e8(),_0xc945a3['decorate']('_sendUsageRequest');let _0x29f4f7=!0x1;const _0x537596=_0x175d7f();function _0x1f5579(_0x2b9936){return!!_0x2b9936&&('object'==typeof _0x2b9936||'function'==typeof _0x2b9936)&&'function'==typeof _0x2b9936['then']&&'function'==typeof _0x2b9936['catch'];}function _0x1a9e86(_0x1cff0f){_0x257fbb(_0x1cff0f)['then'](_0x2e3427=>_0x2e3427&&'ok'==_0x2e3427['status']?_0x2d4f38(_0x3024a9(_0x537596+_0x1a160))!=_0x2e3427['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0xb9dbab=>(_0x18e6f3(),_0xb9dbab),()=>{const _0x53d2f7=_0x1f70cf();return null==_0x53d2f7?(_0x18e6f3(),'Valid'):_0x36e5e7-_0x53d2f7>0x240c8400?'UsageLimit':'Valid';})['then'](_0x258e10)['catch'](()=>{_0x258e10('UsageLimit');});const _0x1d58e6=0x36ee80;function _0x18e6f3(){const _0x2804ca='llct-'+_0x2d4f38(_0x3024a9(_0x5b5982)),_0xb2e3f3=_0x39fde8(_0x2d4f38(window['Math']['ceil'](_0x36e5e7/_0x1d58e6)));window['localStorage']['setItem'](_0x2804ca,_0xb2e3f3);}function _0x1f70cf(){const _0x24b4d5='llct-'+_0x2d4f38(_0x3024a9(_0x5b5982)),_0x189ab0=window['localStorage']['getItem'](_0x24b4d5);return _0x189ab0?window['parseInt'](_0x39fde8(_0x189ab0),0x10)*_0x1d58e6:null;}function _0x257fbb(_0x13c594){return new window['Promise']((_0x9f40ca,_0x352474)=>{_0x13c594['then'](_0x9f40ca,_0x352474),window['setTimeout'](_0x352474,0x1d4c0);});}}_0xc945a3['on']('_sendUsageRequest',(_0x3a53ff,_0x55b91d)=>{if(_0x55b91d[0x0]!=_0x5b5982)return _0x258e10('UsageLimit');_0x55b91d[0x1]={..._0x55b91d[0x1],'requestId':_0x537596};},{'priority':'high'}),_0xc945a3['on']('_sendUsageRequest',_0x45ef50=>{_0x1f5579(_0x45ef50['return'])&&(_0x29f4f7=!0x0,_0x1a9e86(_0x45ef50['return']));},{'priority':'low'}),_0x387443['then'](()=>{_0x29f4f7||_0x258e10('UsageLimit');});});function _0x222ea9(){return'auto'==_0xc945a3['editing']['view']['_overlayModeHint'];}function _0x5468e8(){_0xc945a3['editing']['view']['_overlayModeHint']='auto';}}function _0x4bfc19(_0x26b5bf){const _0x421aa8=[new window['Promise'](_0x1f2de9=>setTimeout(_0x1f2de9,0x93ecc)),_0x387443['then'](()=>new window['Promise'](_0x3ed640=>{let _0x26aa48=0x0;_0xc945a3['model']['on']('applyOperation',(_0x24bdc7,_0x1fd9f9)=>{_0x1fd9f9[0x0]['isDocumentOperation']&&_0x26aa48++,0x5e8==_0x26aa48&&(_0x3ed640(),_0x24bdc7['off']());});}))];return window['Promise']['race'](_0x421aa8)['then'](()=>_0x26b5bf);}async function _0x19077(){await _0x387443,_0xc945a3['model']['change']=_0xaae849,_0xc945a3['model']['enqueueChange']=_0xaae849,_0xc945a3['enableReadOnlyMode']('model');}function _0x302c3e(){return window['glob']&&window['glob']['triliumVersion'];}function _0x5752b5(_0x92b787){const _0x13c4ca=_0x2fb0ad();_0xc945a3[_0x13c4ca]='tableOfContentsLicenseKey'+_0x92b787,'Valid'!=_0x92b787&&_0x19077();}function _0x2fb0ad(){const _0x3e6368=window['String'](window['performance']['now']())['replace']('.','');let _0x1a8242='m';for(let _0x6ed75b=0x0;_0x6ed75b<_0x3e6368['length'];_0x6ed75b+=0x2){let _0x44fb46=window['parseInt'](_0x3e6368['substring'](_0x6ed75b,_0x6ed75b+0x2));_0x44fb46>=0x3e&&(_0x44fb46-=0x3e),_0x1a8242+=_0x4d301a[_0x44fb46];}return _0x1a8242;}function _0xe24cf2(){const _0x48cd40=_0x14090f['split']('.');if(0x3!=_0x48cd40['length'])return null;return _0x3b25b8(_0x48cd40[0x1]);function _0x3b25b8(_0x363e92){const _0x5eb386=_0x37f7ba(_0x363e92);return _0x5eb386&&_0x45a045()?_0x5eb386:null;function _0x45a045(){const _0x160c0c=_0x5eb386['jti'],_0x3e6ffe=window['parseInt'](_0x160c0c['substring'](_0x160c0c['length']-0x8),0x10),_0x39377f={..._0x5eb386,'jti':_0x160c0c['substring'](0x0,_0x160c0c['length']-0x8)};return delete _0x39377f['vc'],_0x3024a9(_0x39377f)==_0x3e6ffe;}}}async function _0x7d3d6a(){let _0x41422e=!0x0;try{const [_0x142015,_0x584f57,_0x26ac7e]=_0x14090f['split']('.');return _0x35ab27(_0x142015),await _0x299b6e(_0x142015,_0x584f57,_0x26ac7e),_0x41422e;}catch{return!0x1;}function _0x35ab27(_0x30b7fd){const _0x4f0c04=_0x37f7ba(_0x30b7fd);_0x4f0c04&&'ES256'==_0x4f0c04['alg']||(_0x41422e=!0x1);}async function _0x299b6e(_0x28cc57,_0x28851f,_0x46855c){const _0x34f4fa=window['Uint8Array']['from'](_0x4ffcd1(_0x46855c),_0x461e2b=>_0x461e2b['charCodeAt'](0x0)),_0x103ab9=new window['TextEncoder']()['encode'](_0x28cc57+'.'+_0x28851f),_0x587d7d=window['crypto']['subtle'];if(!_0x587d7d)return;const _0x22e9a5=await _0x587d7d['importKey']('jwk',_0x27ffb1,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x587d7d['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x22e9a5,_0x34f4fa,_0x103ab9)||(_0x41422e=!0x1);}}function _0x37f7ba(_0x132124){return _0x132124['startsWith']('ey')?JSON['parse'](_0x4ffcd1(_0x132124)):null;}function _0x4ffcd1(_0x62457d){return window['atob'](_0x62457d['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x3024a9(_0xc3f736){let _0x1bd7cb=0x1505;function _0x3331d0(_0x310526){for(let _0x4f79f8=0x0;_0x4f79f8<_0x310526['length'];_0x4f79f8++){const _0x4da5db=_0x310526['charCodeAt'](_0x4f79f8);_0x1bd7cb=(_0x1bd7cb<<0x5)+_0x1bd7cb+_0x4da5db,_0x1bd7cb&=_0x1bd7cb;}}function _0xeb4b34(_0x1449b7){Array['isArray'](_0x1449b7)?_0x1449b7['forEach'](_0xeb4b34):_0x1449b7&&'object'==typeof _0x1449b7?Object['entries'](_0x1449b7)['sort']()['forEach'](([_0x5d543f,_0x2bb26f])=>{_0x3331d0(_0x5d543f),_0xeb4b34(_0x2bb26f);}):_0x3331d0(window['String'](_0x1449b7));}return _0xeb4b34(_0xc3f736),_0x1bd7cb>>>0x0;}function _0x2d4f38(_0x58da76){return _0x58da76['toString'](0x10)['padStart'](0x8,'0');}function _0x39fde8(_0x49cf18){return _0x49cf18['split']('')['reverse']()['join']('');}function _0xaae849(){}_0x5752b5(await _0x21e4b3());}(this);}['_updateTableOfContentsElements'](){this['_tableOfContentsElements']['forEach'](_0x26752f=>{'$graveyard'!==_0x26752f['rootName']&&this['editor']['editing']['reconvertItem'](_0x26752f);});}['_trackNewToCElements'](){for(const _0x403067 of this['editor']['model']['document']['differ']['getChanges']({'includeChangesInGraveyard':!0x0})){if('insert'!==_0x403067['type']||'tableOfContents'!==_0x403067['name'])return;this['_tableOfContentsElements']['add'](_0x403067['position']['nodeAfter']);}}['_getOutlineDefinitions'](_0xda2f81){const _0x4037b9=this['editor'],_0x2a0336=[];for(const _0x2db5c2 of _0x4037b9['model']['document']['getRootNames']())_0x684462(_0x4037b9['model']['document']['getRoot'](_0x2db5c2));function _0x684462(_0x5a3849){for(const _0x138a87 of _0x5a3849['getChildren']())_0x138a87['is']('element')&&(_0xda2f81['includes'](_0x138a87['name'])&&_0x2a0336['push']({'level':_0xda2f81['indexOf'](_0x138a87['name'])+0x1,'text':b(_0x138a87),'modelElement':_0x138a87}),_0x684462(_0x138a87));}return _0x2a0336;}['_defineSchema'](){this['editor']['model']['schema']['register']('tableOfContents',{'inheritAllFrom':'$blockObject'});}['_defineConverters'](){const _0x53fc47=this['editor']['conversion'];_0x53fc47['for']('upcast')['elementToElement']({'model':'tableOfContents','view':{'name':'div','classes':'table-of-contents'}}),_0x53fc47['for']('dataDowncast')['elementToStructure']({'model':'tableOfContents','view':(_0x229ac0,{writer:_0x180aa6})=>this['_createTableOfContents'](_0x180aa6,!0x0)}),_0x53fc47['for']('editingDowncast')['elementToStructure']({'model':'tableOfContents','view':(_0x8b207e,{writer:_0x17292a})=>(this['_tableOfContentsElements']['add'](_0x8b207e),_0x3dd528(this['_createTableOfContents'](_0x17292a),_0x17292a,{'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'](_0x1a172e,_0x32f57f=!0x1){const {locale:_0x4993a9}=this['editor'],_0x39b8f7=_0x1a172e['createContainerElement']('div',{'class':'table-of-contents'+(0x0===this['_currentOutlineDefinitions']['length']?'\x20table-of-contents_empty':''),...!_0x32f57f&&{'data-table-of-contents-label':L(_0x4993a9,'Table\x20of\x20contents')}});0x0===this['_currentOutlineDefinitions']['length']&&!0x1===_0x32f57f&&_0x1a172e['insert'](_0x1a172e['createPositionAt'](_0x39b8f7,'end'),_0x1a172e['createContainerElement']('p',{'class':'table-of-contents__placeholder'},[_0x1a172e['createText'](L(_0x4993a9,'No\x20headings\x20were\x20found\x20in\x20the\x20document.'))]));const _0x17fb72=_0x32f57f?'':'['+L(_0x4993a9,'Empty\x20heading')+']';let _0xdeaee3=_0x39b8f7;return this['_currentOutlineDefinitions']['forEach']((_0x4c24b9,_0xfa2985,_0x1287f1)=>{const _0xcff514=this['editor']['model']['hasContent'](_0x4c24b9['modelElement'],{'ignoreWhitespaces':!0x0}),_0x597d28=_0xcff514?_0x4c24b9['text']:_0x17fb72,_0x2421e9=_0x4c24b9['modelElement']['getAttribute'](this['_headingIdModelAttributeName']),_0x21af88=_0x1a172e['createContainerElement']('a',{'href':'#'+_0x2421e9,...!_0x32f57f&&{'tabindex':'-1'}},[_0x1a172e['createText'](_0x597d28)]),_0x463835=this['editor']['config']['get']('documentOutline.showEmptyHeadings');_0x1a172e['setCustomProperty']('tableOfContentsHeadingIndex',_0xfa2985,_0x21af88);const _0x27f961=_0x1a172e['createContainerElement']('li',null,[_0xcff514||!_0x32f57f&&_0x463835?_0x21af88:_0x1a172e['createText']('')]),_0x3cd78d=_0xfa2985?_0x1287f1[_0xfa2985-0x1]['level']:0x0,_0x3f2098=Math['abs'](_0x4c24b9['level']-_0x3cd78d);if(_0x4c24b9['level']>_0x3cd78d){const _0x261447=P(_0x27f961,_0x3f2098,_0x1a172e);_0x1a172e['insert'](_0x1a172e['createPositionAt'](_0xdeaee3,'end'),_0x261447);}else{const _0xf484a7=function(_0x589270,_0x59ec6d){return _0x589270['getAncestors']({'includeSelf':!0x0,'parentFirst':!0x0})['filter'](_0xeb607c=>_0xeb607c['is']('element','ol'))[_0x59ec6d];}(_0xdeaee3,_0x3f2098);_0x1a172e['insert'](_0x1a172e['createPositionAt'](_0xf484a7,'end'),_0x27f961);}_0xdeaee3=_0x27f961;}),_0x39b8f7;}['_handleScrollToHeading'](_0x4efca7){const _0x338b5e=this['_currentOutlineDefinitions'][_0x4efca7]['modelElement'];this['editor']['model']['change'](_0x5afb1d=>{_0x5afb1d['setSelection'](_0x338b5e,0x0);}),this['editor']['editing']['view']['scrollToTheSelection']({'alignToTop':!0x0,'forceScroll':!0x0});}['_redirectMapper'](){return(_0x1ecd7f,_0x280f80)=>{const _0x19f65d=_0x280f80['mapper'],_0xe67511=_0x19f65d['findMappedViewAncestor'](_0x280f80['viewPosition']),_0x57d555=_0x19f65d['toModelElement'](_0xe67511);_0x57d555['is']('element','tableOfContents')&&(_0x280f80['modelPosition']=this['editor']['model']['createPositionAt'](_0x57d555,0x0),_0x1ecd7f['stop']());};}};function P(_0x45a86a,_0x3900b1,_0x101f74){return 0x1===_0x3900b1?_0x101f74['createContainerElement']('ol',null,[_0x45a86a]):_0x101f74['createContainerElement']('ol',null,[_0x101f74['createContainerElement']('li',null,[P(_0x45a86a,_0x3900b1-0x1,_0x101f74)])]);}var U=class extends _0x2f046b{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'TableOfContentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x5a5b49=this['editor'];_0x5a5b49['ui']['componentFactory']['add']('tableOfContents',()=>{const _0x3c2110=this['_createButton'](_0x1f19a7);return _0x3c2110['tooltip']=!0x0,_0x3c2110;}),_0x5a5b49['ui']['componentFactory']['add']('menuBar:tableOfContents',()=>this['_createButton'](_0xcf4681)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3d43e3=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x132d80;for(const _0x5c6794 in _0x3d43e3){const _0x1cb513=_0x5c6794,_0x291cad=_0x3d43e3[_0x1cb513];if('tableOfContentsLicenseKeyValid'==_0x291cad||'tableOfContentsLicenseKeyInvalid'==_0x291cad||'tableOfContentsLicenseKeyExpired'==_0x291cad||'tableOfContentsLicenseKeyDomainLimit'==_0x291cad||'tableOfContentsLicenseKeyNotAllowed'==_0x291cad||'tableOfContentsLicenseKeyEvaluationLimit'==_0x291cad||'tableOfContentsLicenseKeyUsageLimit'==_0x291cad){delete _0x3d43e3[_0x1cb513],_0x132d80=_0x291cad,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'tableOfContentsLicenseKeyInvalid'==_0x132d80&&_0x3d43e3['_showLicenseError']('invalid'),'tableOfContentsLicenseKeyExpired'==_0x132d80&&_0x3d43e3['_showLicenseError']('expired'),'tableOfContentsLicenseKeyDomainLimit'==_0x132d80&&_0x3d43e3['_showLicenseError']('domainLimit'),'tableOfContentsLicenseKeyNotAllowed'==_0x132d80&&_0x3d43e3['_showLicenseError']('featureNotAllowed','TableOfContents'),'tableOfContentsLicenseKeyEvaluationLimit'==_0x132d80&&_0x3d43e3['_showLicenseError']('evaluationLimit'),'tableOfContentsLicenseKeyUsageLimit'==_0x132d80&&_0x3d43e3['_showLicenseError']('usageLimit');},0x3e8);}['_createButton'](_0x582ecb){const _0x56b5d6=this['editor'],_0x533409=_0x56b5d6['locale'],_0x33f166=_0x56b5d6['commands']['get']('insertTableOfContents'),_0x10066f=new _0x582ecb(_0x533409);return _0x10066f['set']({'label':L(_0x533409,'Table\x20of\x20contents'),'icon':_0x4df0d6}),_0x10066f['bind']('isEnabled')['to'](_0x33f166,'isEnabled'),this['listenTo'](_0x10066f,'execute',()=>{_0x56b5d6['execute']('insertTableOfContents'),_0x56b5d6['editing']['view']['focus']();}),_0x10066f;}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},D=class extends _0x2f046b{static get['requires'](){return[N,U];}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,D as TableOfContents,K as TableOfContentsCommand,N as TableOfContentsEditing,U as TableOfContentsUI};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-document-outline",
|
|
3
|
-
"version": "48.3.0-alpha.
|
|
3
|
+
"version": "48.3.0-alpha.6",
|
|
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.3.0-alpha.
|
|
25
|
-
"@ckeditor/ckeditor5-engine": "48.3.0-alpha.
|
|
26
|
-
"@ckeditor/ckeditor5-heading": "48.3.0-alpha.
|
|
27
|
-
"@ckeditor/ckeditor5-icons": "48.3.0-alpha.
|
|
28
|
-
"@ckeditor/ckeditor5-ui": "48.3.0-alpha.
|
|
29
|
-
"@ckeditor/ckeditor5-utils": "48.3.0-alpha.
|
|
30
|
-
"@ckeditor/ckeditor5-widget": "48.3.0-alpha.
|
|
24
|
+
"@ckeditor/ckeditor5-core": "48.3.0-alpha.6",
|
|
25
|
+
"@ckeditor/ckeditor5-engine": "48.3.0-alpha.6",
|
|
26
|
+
"@ckeditor/ckeditor5-heading": "48.3.0-alpha.6",
|
|
27
|
+
"@ckeditor/ckeditor5-icons": "48.3.0-alpha.6",
|
|
28
|
+
"@ckeditor/ckeditor5-ui": "48.3.0-alpha.6",
|
|
29
|
+
"@ckeditor/ckeditor5-utils": "48.3.0-alpha.6",
|
|
30
|
+
"@ckeditor/ckeditor5-widget": "48.3.0-alpha.6",
|
|
31
31
|
"es-toolkit": "1.45.1"
|
|
32
32
|
},
|
|
33
33
|
"files": [
|