@ckeditor/ckeditor5-document-outline 48.3.0-alpha.4 → 48.3.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Command as _0x180044,Plugin as _0x5ce0ef}from'@ckeditor/ckeditor5-core';import{debounce as _0x58dd74,throttle as _0x3e8807}from'es-toolkit/compat';import{ModelText as _0x8396d5,ModelTreeWalker as _0x30e144}from'@ckeditor/ckeditor5-engine';import{CKEditorError as _0x3e9fc5,Rect as _0x177ca1,diff as _0x1add66,diffToChanges as _0x5ce77f,global as _0x3aefbf,priorities as _0x166799,scrollAncestorsToShowTarget as _0x2ac805,uid as _0x4f1821}from'@ckeditor/ckeditor5-utils';import{ButtonView as _0x1f5861,MenuBarMenuListItemButtonView as _0x2d8c96,View as _0x2439ce}from'@ckeditor/ckeditor5-ui';import{Widget as _0x16ef4f,toWidget as _0x2d1f70}from'@ckeditor/ckeditor5-widget';import{IconTableOfContents as _0x16dacb}from'@ckeditor/ckeditor5-icons';function b(_0x501861){let _0x5c5b51='';for(const _0x267a62 of _0x501861['getChildren']())_0x267a62 instanceof _0x8396d5&&(_0x5c5b51+=_0x267a62['data']);return _0x5c5b51;}var I=class extends _0x5ce0ef{static get['pluginName'](){return'DocumentOutlineUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_headingNames']=[];['init'](){const _0x26d128=this['editor'];this['_headingNames']=this['_getHeadingNames']();let _0x481bd9=[];_0x26d128['model']['document']['on']('change',_0x58dd74(()=>{const _0x33dcea=_0x481bd9;_0x481bd9=this['_getOutlineDefinitions']();const _0x4f637e=_0x5ce77f(_0x1add66(_0x33dcea,_0x481bd9,(_0x1ea7a9,_0x2163d8)=>_0x1ea7a9['level']===_0x2163d8['level']&&_0x1ea7a9['text']===_0x2163d8['text']&&_0x1ea7a9['modelElement']===_0x2163d8['modelElement']),_0x481bd9),_0x40f58e=this['_getActiveHeading'](),_0x2745bb=_0x481bd9['findIndex'](_0x55ebd7=>_0x55ebd7['modelElement']===_0x40f58e);_0x4f637e['length']&&this['fire']('change',{'outlineDefinitions':_0x481bd9,'activeItemIndex':_0x2745bb,'outlineChanges':_0x4f637e}),this['fire']('activeItemIndex',{'index':_0x2745bb});},0xfa,{'leading':!0x0,'trailing':!0x0}));}['afterInit'](){this['_headingNames']['length']||this['_deriveHeadingElementsFromConversion']();}['_getOutlineDefinitions'](){const _0x3a195f=this['editor'],_0x1f0d38=[],_0x5efcd0=this['_headingNames'];for(const _0x1a551c of _0x3a195f['model']['document']['getRootNames']())_0x185209(_0x3a195f['model']['document']['getRoot'](_0x1a551c));function _0x185209(_0x462214){for(const _0x30450e of _0x462214['getChildren']())_0x30450e['is']('element')&&(_0x5efcd0['includes'](_0x30450e['name'])&&_0x1f0d38['push']({'level':_0x5efcd0['indexOf'](_0x30450e['name'])+0x1,'text':b(_0x30450e),'modelElement':_0x30450e}),_0x185209(_0x30450e));}return _0x1f0d38;}['_getActiveHeading'](){const _0x33de48=new _0x30e144({'direction':'backward','startPosition':this['editor']['model']['document']['selection']['getFirstPosition']()});for(const _0x4a058c of _0x33de48)if(_0x4a058c['item']['is']('element')&&this['_headingNames']['includes'](_0x4a058c['item']['name']))return _0x4a058c['item'];}['_getHeadingNames'](){const _0x1af4a3=this['editor']['config']['get']('documentOutline.headings');return _0x1af4a3||function(_0x31cd18){const _0x65eb81=_0x31cd18['config']['get']('heading.options');return _0x65eb81?_0x65eb81['reduce']((_0x23c28e,_0x1a29b2)=>('paragraph'!==_0x1a29b2['model']&&_0x23c28e['push'](_0x1a29b2['model']),_0x23c28e),[]):_0x31cd18['plugins']['has']('GeneralHtmlSupport')?['htmlH1','htmlH2','htmlH3','htmlH4','htmlH5','htmlH6']:[];}(this['editor']);}['_deriveHeadingElementsFromConversion'](){const _0x2bee8d=this['editor'],_0x153fc3=['h1','h2','h3','h4','h5','h6'],_0x161311=[];for(const _0x5cbcce of _0x153fc3){const _0x158825=_0x2bee8d['editing']['view']['domConverter']['domToView'](document['createElement'](_0x5cbcce)),_0x4f427a=_0x2bee8d['data']['toModel'](_0x158825)['getChild'](0x0);_0x4f427a?.['is']('element')&&_0x161311['push'](_0x4f427a['name']);}this['_headingNames']=_0x161311;}};function L(_0x434b05,_0x4aa99c){const t=_0x434b05['t'];switch(_0x4aa99c){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 _0x4aa99c;}}var C=class extends _0x2439ce{constructor(_0x3a0fd4,_0x3d8cd2=!0x1){super(_0x3a0fd4);const _0x513497=this['bindTemplate'],_0x228efd=_0x3d8cd2?'['+L(_0x3a0fd4,'Empty\x20heading')+']':'';this['set']('text',''),this['set']('level',0x1),this['set']('isActive',!0x1),this['bind']('isEmpty')['to'](this,'text',_0x211712=>!_0x211712),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-document-outline__item',_0x513497['to']('level',_0x5d69b9=>'ck-document-outline__item_level-'+_0x5d69b9),_0x513497['if']('isActive','ck-document-outline__item_active'),_0x513497['if']('isEmpty','ck-document-outline__item_empty')],'title':_0x513497['to']('text')},'children':[{'text':_0x513497['to']('text',_0x868f5d=>_0x868f5d||_0x228efd)}],'on':{'click':_0x513497['to']('click')}});}},_=class extends _0x2439ce{['items'];['documentOutlineContainer'];['showEmptyHeadingText'];constructor(_0x357cae,_0x58e997=!0x1,_0x41a240){super(_0x357cae),this['showEmptyHeadingText']=_0x58e997,this['set']('activeItemIndex',-0x1),this['documentOutlineContainer']=_0x41a240,this['items']=this['createCollection'](),this['items']['delegate']('click')['to'](this),this['on']('click',this['_handleItemClick']['bind'](this)),this['on']('change:activeItemIndex',(_0x1bab0b,_0x15c0c0,_0x25f28d,_0x41a2e3)=>{this['_setActiveItem'](_0x41a2e3,_0x25f28d);}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-document-outline'],'dir':_0x357cae['contentLanguageDirection'],'data-document-outline-empty-placeholder':L(_0x357cae,'Editor\x20headings\x20will\x20appear\x20here\x20as\x20you\x20type.'),'tabindex':-0x1},'children':this['items']});}['sync'](_0x137dc7){_0x137dc7['forEach'](_0x13d527=>{'insert'==_0x13d527['type']?this['_insertItem'](_0x13d527['index'],..._0x13d527['values']):'delete'==_0x13d527['type']&&this['_deleteItem'](_0x13d527['index'],_0x13d527['howMany']);});}['_setActiveItem'](_0x1169d2,_0x5b18e0){if(-0x1!==_0x1169d2){const _0x501d5f=this['items']['get'](_0x1169d2);_0x501d5f&&(_0x501d5f['isActive']=!0x1);}-0x1!==_0x5b18e0&&(this['items']['get'](_0x5b18e0)['isActive']=!0x0,this['_scrollToItem'](_0x5b18e0));}['_insertItem'](_0x51461f,..._0x117467){const _0x4c83bc=_0x117467['map']((_0x2b8c5c,_0x38da8a)=>{const _0x15a1c1=new C(this['locale'],this['showEmptyHeadingText']);return _0x15a1c1['text']=_0x2b8c5c['text'],_0x15a1c1['level']=_0x2b8c5c['level'],_0x51461f+_0x38da8a===this['activeItemIndex']&&(_0x15a1c1['isActive']=!0x0),_0x15a1c1;});this['items']['addMany'](_0x4c83bc,_0x51461f);}['_deleteItem'](_0x2f765a,_0x51764e){do{this['items']['remove'](_0x2f765a);}while(--_0x51764e);}['_handleItemClick'](_0x5ea46f){const _0x10834b=this['items']['getIndex'](_0x5ea46f['source']);this['fire']('itemSelected',_0x10834b);}['_scrollToItem'](_0x3bfdc3){_0x2ac805(this['items']['get'](_0x3bfdc3)['element'],0x14,this['documentOutlineContainer']);}['destroy'](){super['destroy'](),this['element']['remove']();}},x=class extends _0x5ce0ef{['view'];['_currentOutlineDefinitions'];['_updateActiveDefinitionFromViewportThrottled'];static get['pluginName'](){return'DocumentOutlineUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x38f67a){super(_0x38f67a),this['view']=new _(_0x38f67a['locale'],this['editor']['config']['get']('documentOutline.showEmptyHeadings'),this['editor']['config']['get']('documentOutline.container')),this['_currentOutlineDefinitions']=[],this['_updateActiveDefinitionFromViewportThrottled']=_0x3e8807(this['_updateActiveDefinitionOnViewportChange']['bind'](this),0x64);}['init'](){const _0x1d765f=this['editor'],_0x5aac91=_0x1d765f['plugins']['get']('DocumentOutlineUtils');let _0x15e9a8=!0x1;if(this['view']['render'](),this['editor']['ui']['focusTracker']['add'](this['view']['element']),!_0x1d765f['config']['get']('documentOutline.container'))throw new _0x3e9fc5('document-outline-container-not-provided',{'editor':_0x1d765f});_0x1d765f['config']['get']('documentOutline.container')['appendChild'](this['view']['element']),_0x5aac91['on']('change',this['_handleOutlineChange']['bind'](this)),_0x5aac91['on']('activeItemIndex',(_0x1919d1,{index:_0x23fd1f})=>this['_setActiveViewItem'](_0x23fd1f)),this['view']['on']('itemSelected',(_0x37f379,_0x38cfee)=>{_0x15e9a8=!0x0,this['_handleItemSelected'](_0x38cfee);}),this['view']['listenTo'](_0x3aefbf['document'],'scroll',()=>{_0x15e9a8?_0x15e9a8=!0x1:this['_updateActiveDefinitionFromViewportThrottled']();},{'useCapture':!0x0}),this['view']['listenTo'](_0x3aefbf['window'],'resize',this['_updateActiveDefinitionFromViewportThrottled'],{'useCapture':!0x0});}['afterInit'](){!async function(_0x1c0502){const _0x465b66='aWxlPG0A3CDdHBsZEqwULojOrgMXVTRvu1bI2487ptzJKQeihfNkYS9n6y5mcF',_0x4678aa=0x78e28,_0x368086=window['Date']['now'](),_0x2975fa=_0x1c0502['editor'],_0x25b554=new window['Promise'](_0x4bd1bb=>{_0x2975fa['once']('ready',_0x4bd1bb);}),_0x3bdc74={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x4d8909=_0x2975fa['config']['get']('licenseKey');async function _0xbcfd54(){let _0xfcc4dc,_0x904666=null,_0x3c76e3=null;try{return'GPL'==_0x4d8909?'NotAllowed':(_0xfcc4dc=_0x389697(),_0xfcc4dc?(_0xfcc4dc['usageEndpoint']&&(_0x3c76e3=_0x474d6c(_0xfcc4dc['usageEndpoint'],_0xfcc4dc['jti'])),await _0x2699f1()?_0x2ef115()?_0x3fffc3()?'Expired':_0x59f8ac()?('evaluation'==_0xfcc4dc['licenseType']&&(_0x904666=_0x57d27a('EvaluationLimit')),await _0xec686b()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x3fffc3(){const _0x487d3f=['evaluation','trial']['includes'](_0xfcc4dc['licenseType'])?_0x368086/0x3e8:0xe10*_0x4678aa;return _0xfcc4dc['exp']<_0x487d3f;}function _0x2ef115(){const _0x1bb96d=_0xfcc4dc['features'];return!!_0x1bb96d&&(!!_0x1bb96d['includes']('*')||(!!_0x1bb96d['includes']('DO')||(!!_0x1bb96d['includes']('PP')||!(!_0x1bb96d['includes']('TRILIUM')||!_0x36e56a()))));}function _0x59f8ac(){const _0x433413=_0xfcc4dc['licensedHosts'];if(!_0x433413||0x0==_0x433413['length'])return!0x0;const {hostname:_0x3cfd3e}=new URL(window['location']['href']);if(_0x433413['includes'](_0x3cfd3e))return!0x0;const _0xd7ed5a=_0x3cfd3e['split']('.');return _0x433413['filter'](_0xfab0e2=>_0xfab0e2['includes']('*'))['map'](_0x1e424f=>_0x1e424f['split']('.'))['filter'](_0x4b71ae=>_0x4b71ae['length']<=_0xd7ed5a['length'])['map'](_0x2cdb4c=>Array(_0xd7ed5a['length']-_0x2cdb4c['length'])['fill']('*'===_0x2cdb4c[0x0]?'*':'')['concat'](_0x2cdb4c))['some'](_0x147fd6=>_0xd7ed5a['every']((_0x402d9e,_0x20d3c8)=>_0x147fd6[_0x20d3c8]===_0x402d9e||'*'===_0x147fd6[_0x20d3c8]));}function _0xec686b(){return _0x904666&&_0x3c76e3?new window['Promise']((_0x41b9d2,_0x1a7cd0)=>{_0x904666['then'](_0x41b9d2,_0x1a7cd0),_0x3c76e3['then'](_0x33cacf=>{'Valid'!=_0x33cacf&&_0x41b9d2(_0x33cacf);},_0x1a7cd0);}):_0x904666||_0x3c76e3||'Valid';}}function _0x474d6c(_0x31ab1e,_0x434d60){return new window['Promise'](_0x5d6c7c=>{if(_0x4c3022())return _0x5d6c7c('Valid');_0x21c97d(),_0x2975fa['decorate']('_sendUsageRequest');let _0x352547=!0x1;const _0x17f294=_0x4f1821();function _0x3f8344(_0x5c5a34){return!!_0x5c5a34&&('object'==typeof _0x5c5a34||'function'==typeof _0x5c5a34)&&'function'==typeof _0x5c5a34['then']&&'function'==typeof _0x5c5a34['catch'];}function _0xdc4ddb(_0x177b9b){_0x4bb4cb(_0x177b9b)['then'](_0x1d31cb=>_0x1d31cb&&'ok'==_0x1d31cb['status']?_0x239fdd(_0x231b18(_0x17f294+_0x434d60))!=_0x1d31cb['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x5490c9=>(_0x3847cc(),_0x5490c9),()=>{const _0x3e4412=_0x2da56e();return null==_0x3e4412?(_0x3847cc(),'Valid'):_0x368086-_0x3e4412>0x240c8400?'UsageLimit':'Valid';})['then'](_0x5d6c7c)['catch'](()=>{_0x5d6c7c('UsageLimit');});const _0x3df6b4=0x36ee80;function _0x3847cc(){const _0x29ef1b='llct-'+_0x239fdd(_0x231b18(_0x31ab1e)),_0x353484=_0x4daa47(_0x239fdd(window['Math']['ceil'](_0x368086/_0x3df6b4)));window['localStorage']['setItem'](_0x29ef1b,_0x353484);}function _0x2da56e(){const _0x137196='llct-'+_0x239fdd(_0x231b18(_0x31ab1e)),_0x4058cb=window['localStorage']['getItem'](_0x137196);return _0x4058cb?window['parseInt'](_0x4daa47(_0x4058cb),0x10)*_0x3df6b4:null;}function _0x4bb4cb(_0x23be6f){return new window['Promise']((_0x405c14,_0x1308e7)=>{_0x23be6f['then'](_0x405c14,_0x1308e7),window['setTimeout'](_0x1308e7,0x1d4c0);});}}_0x2975fa['on']('_sendUsageRequest',(_0x301bb5,_0x2f662b)=>{if(_0x2f662b[0x0]!=_0x31ab1e)return _0x5d6c7c('UsageLimit');_0x2f662b[0x1]={..._0x2f662b[0x1],'requestId':_0x17f294};},{'priority':'high'}),_0x2975fa['on']('_sendUsageRequest',_0x1a474a=>{_0x3f8344(_0x1a474a['return'])&&(_0x352547=!0x0,_0xdc4ddb(_0x1a474a['return']));},{'priority':'low'}),_0x25b554['then'](()=>{_0x352547||_0x5d6c7c('UsageLimit');});});function _0x4c3022(){return'auto'==_0x2975fa['editing']['view']['_overlayModeHint'];}function _0x21c97d(){_0x2975fa['editing']['view']['_overlayModeHint']='auto';}}function _0x57d27a(_0x1145e2){const _0x3455c5=[new window['Promise'](_0x570b12=>setTimeout(_0x570b12,0x93ecc)),_0x25b554['then'](()=>new window['Promise'](_0x7e4c5b=>{let _0x5840a7=0x0;_0x2975fa['model']['on']('applyOperation',(_0x13ee95,_0x3c1f58)=>{_0x3c1f58[0x0]['isDocumentOperation']&&_0x5840a7++,0x5e8==_0x5840a7&&(_0x7e4c5b(),_0x13ee95['off']());});}))];return window['Promise']['race'](_0x3455c5)['then'](()=>_0x1145e2);}async function _0x489605(){await _0x25b554,_0x2975fa['model']['change']=_0x1824fb,_0x2975fa['model']['enqueueChange']=_0x1824fb,_0x2975fa['enableReadOnlyMode']('model');}function _0x36e56a(){return window['glob']&&window['glob']['triliumVersion'];}function _0x37b0ea(_0x2e4c94){const _0x1caf80=_0x3818a2();_0x2975fa[_0x1caf80]='documentOutlineLicenseKey'+_0x2e4c94,'Valid'!=_0x2e4c94&&_0x489605();}function _0x3818a2(){const _0x4cf26b=window['String'](window['performance']['now']())['replace']('.','');let _0x5a1d91='a';for(let _0x59ed75=0x0;_0x59ed75<_0x4cf26b['length'];_0x59ed75+=0x2){let _0x5377e4=window['parseInt'](_0x4cf26b['substring'](_0x59ed75,_0x59ed75+0x2));_0x5377e4>=0x3e&&(_0x5377e4-=0x3e),_0x5a1d91+=_0x465b66[_0x5377e4];}return _0x5a1d91;}function _0x389697(){const _0x29f0ff=_0x4d8909['split']('.');if(0x3!=_0x29f0ff['length'])return null;return _0x3c56c3(_0x29f0ff[0x1]);function _0x3c56c3(_0x2ac061){const _0x643245=_0x27023d(_0x2ac061);return _0x643245&&_0x267eae()?_0x643245:null;function _0x267eae(){const _0x58f921=_0x643245['jti'],_0x45c910=window['parseInt'](_0x58f921['substring'](_0x58f921['length']-0x8),0x10),_0x171413={..._0x643245,'jti':_0x58f921['substring'](0x0,_0x58f921['length']-0x8)};return delete _0x171413['vc'],_0x231b18(_0x171413)==_0x45c910;}}}async function _0x2699f1(){let _0xfbffc=!0x0;try{const [_0x248086,_0x2b26b0,_0x1ecdd2]=_0x4d8909['split']('.');return _0x45b8ef(_0x248086),await _0x5af860(_0x248086,_0x2b26b0,_0x1ecdd2),_0xfbffc;}catch{return!0x1;}function _0x45b8ef(_0x30820d){const _0x11d999=_0x27023d(_0x30820d);_0x11d999&&'ES256'==_0x11d999['alg']||(_0xfbffc=!0x1);}async function _0x5af860(_0x428c3f,_0x152b0a,_0x277cec){const _0x15a20e=window['Uint8Array']['from'](_0x2d03a4(_0x277cec),_0x24f9fd=>_0x24f9fd['charCodeAt'](0x0)),_0x58501d=new window['TextEncoder']()['encode'](_0x428c3f+'.'+_0x152b0a),_0xe8ae8c=window['crypto']['subtle'];if(!_0xe8ae8c)return;const _0x219034=await _0xe8ae8c['importKey']('jwk',_0x3bdc74,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0xe8ae8c['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x219034,_0x15a20e,_0x58501d)||(_0xfbffc=!0x1);}}function _0x27023d(_0x391fe9){return _0x391fe9['startsWith']('ey')?JSON['parse'](_0x2d03a4(_0x391fe9)):null;}function _0x2d03a4(_0x553f51){return window['atob'](_0x553f51['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x231b18(_0x5031d6){let _0x3a9683=0x1505;function _0xf28885(_0x2a81f7){for(let _0xe1e002=0x0;_0xe1e002<_0x2a81f7['length'];_0xe1e002++){const _0x1a3ff3=_0x2a81f7['charCodeAt'](_0xe1e002);_0x3a9683=(_0x3a9683<<0x5)+_0x3a9683+_0x1a3ff3,_0x3a9683&=_0x3a9683;}}function _0x2cbe2b(_0x19583f){Array['isArray'](_0x19583f)?_0x19583f['forEach'](_0x2cbe2b):_0x19583f&&'object'==typeof _0x19583f?Object['entries'](_0x19583f)['sort']()['forEach'](([_0x57406e,_0x470fd3])=>{_0xf28885(_0x57406e),_0x2cbe2b(_0x470fd3);}):_0xf28885(window['String'](_0x19583f));}return _0x2cbe2b(_0x5031d6),_0x3a9683>>>0x0;}function _0x239fdd(_0x2821d5){return _0x2821d5['toString'](0x10)['padStart'](0x8,'0');}function _0x4daa47(_0xfee2ce){return _0xfee2ce['split']('')['reverse']()['join']('');}function _0x1824fb(){}_0x37b0ea(await _0xbcfd54());}(this);}['destroy'](){super['destroy'](),this['view']['destroy'](),this['_updateActiveDefinitionFromViewportThrottled']['cancel']();}['_handleOutlineChange'](_0x1470a5,{outlineDefinitions:_0x282490,outlineChanges:_0x2c8934}){this['_currentOutlineDefinitions']=_0x282490,this['view']['sync'](_0x2c8934);}['_setActiveViewItem'](_0x42b470){this['_currentOutlineDefinitions']['length']&&this['_currentOutlineDefinitions'][_0x42b470]&&(this['view']['activeItemIndex']=_0x42b470);}['_handleItemSelected'](_0x2d2072){const _0x2f3d79=this['_currentOutlineDefinitions'][_0x2d2072]['modelElement'];this['editor']['model']['change'](_0x28b5b1=>{_0x28b5b1['setSelection'](_0x2f3d79,0x0);}),this['editor']['editing']['view']['scrollToTheSelection']({'alignToTop':!0x0,'forceScroll':!0x0}),this['editor']['editing']['view']['focus'](),this['_setActiveViewItem'](_0x2d2072);}['_updateActiveDefinitionOnViewportChange'](){const _0x2e0c96=this['editor'];let _0x480d21;for(const _0x2be8a8 of _0x2e0c96['model']['document']['getRootNames']()){const _0x57bac8=_0x2e0c96['editing']['view']['getDomRoot'](_0x2be8a8),_0x5e1b98=_0x57bac8&&new _0x177ca1(_0x57bac8)['getVisible']();if(_0x5e1b98){const _0x34a612=new _0x177ca1(_0x3aefbf['window'])['getIntersection'](_0x5e1b98);_0x34a612&&(_0x480d21=_0x34a612['top']+0.25*_0x34a612['height']);}}if(void 0x0===_0x480d21)return;const _0xfc61df=k(_0x2e0c96['editing'],this['_currentOutlineDefinitions'],_0x480d21);_0xfc61df?this['_setActiveViewItem'](this['_currentOutlineDefinitions']['indexOf'](_0xfc61df)):this['_setActiveViewItem'](-0x1);}};function k(_0x552775,_0x1f0562,_0x3b2fe4,_0x3672a0=0x0,_0x30d733=_0x1f0562['length']-0x1){const _0x372d34=Math['floor'](_0x3672a0+(_0x30d733-_0x3672a0)/0x2);if(_0x30d733>=_0x3672a0){const _0x3e0d83=_0x1f0562[_0x372d34],_0x27d077=_0x552775['mapper']['toViewElement'](_0x3e0d83['modelElement']);return _0x27d077?new _0x177ca1(_0x552775['view']['domConverter']['mapViewToDom'](_0x27d077))['bottom']>_0x3b2fe4?k(_0x552775,_0x1f0562,_0x3b2fe4,_0x3672a0,_0x372d34-0x1):k(_0x552775,_0x1f0562,_0x3b2fe4,_0x372d34+0x1,_0x30d733):null;}return _0x372d34<0x0?null:_0x1f0562[_0x372d34];}var E=class extends _0x5ce0ef{['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 _0x5ad022=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0xbee8e7;for(const _0x36a63b in _0x5ad022){const _0x4dc55d=_0x36a63b,_0x5a2880=_0x5ad022[_0x4dc55d];if('documentOutlineLicenseKeyValid'==_0x5a2880||'documentOutlineLicenseKeyInvalid'==_0x5a2880||'documentOutlineLicenseKeyExpired'==_0x5a2880||'documentOutlineLicenseKeyDomainLimit'==_0x5a2880||'documentOutlineLicenseKeyNotAllowed'==_0x5a2880||'documentOutlineLicenseKeyEvaluationLimit'==_0x5a2880||'documentOutlineLicenseKeyUsageLimit'==_0x5a2880){delete _0x5ad022[_0x4dc55d],_0xbee8e7=_0x5a2880,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'documentOutlineLicenseKeyInvalid'==_0xbee8e7&&_0x5ad022['_showLicenseError']('invalid'),'documentOutlineLicenseKeyExpired'==_0xbee8e7&&_0x5ad022['_showLicenseError']('expired'),'documentOutlineLicenseKeyDomainLimit'==_0xbee8e7&&_0x5ad022['_showLicenseError']('domainLimit'),'documentOutlineLicenseKeyNotAllowed'==_0xbee8e7&&_0x5ad022['_showLicenseError']('featureNotAllowed','DocumentOutline'),'documentOutlineLicenseKeyEvaluationLimit'==_0xbee8e7&&_0x5ad022['_showLicenseError']('evaluationLimit'),'documentOutlineLicenseKeyUsageLimit'==_0xbee8e7&&_0x5ad022['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},K=class extends _0x180044{['execute'](){this['editor']['model']['change'](_0x87b7cc=>{this['editor']['model']['insertObject'](_0x87b7cc['createElement']('tableOfContents'));});}['refresh'](){const _0x11a69e=this['editor']['model'],_0xaa0900=_0x11a69e['document']['selection']['getFirstPosition']();this['isEnabled']=null!==(_0xaa0900&&_0x11a69e['schema']['findAllowedParent'](_0xaa0900,'tableOfContents'));}},A=class extends _0x5ce0ef{static get['pluginName'](){return'HeadingId';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){const _0x477cdd=this['editor'];if(_0x477cdd['config']['get']('headingId.modelAttributeName'))return;const {viewNames:_0x5bc847,modelNames:_0x148178}=function(_0x25079f){const _0x37d6d7=new Set(),_0x2fd15a=new Set();if(!_0x25079f)return{'viewNames':_0x37d6d7,'modelNames':_0x2fd15a};for(const _0x244c4f of _0x25079f){if('paragraph'===_0x244c4f['model'])continue;const _0x3b2d5d='string'==typeof _0x244c4f['view']?_0x244c4f['view']:_0x244c4f['view']['name'];_0x37d6d7['add'](_0x3b2d5d),_0x2fd15a['add'](_0x244c4f['model']);}return _0x37d6d7['has']('h1')||(_0x37d6d7['add']('h1'),_0x2fd15a['add']('heading1')),{'viewNames':_0x37d6d7,'modelNames':_0x2fd15a};}(this['editor']['config']['get']('heading.options'));for(const _0x183258 of _0x5bc847)this['_customUpcastHeadingsConversion'](_0x183258);for(const _0x244a2b of _0x148178)this['_customDataDowncastHeadingsConversion'](_0x244a2b),_0x477cdd['model']['schema']['isRegistered'](_0x244a2b)&&_0x477cdd['model']['schema']['extend'](_0x244a2b,{'allowAttributes':'headingId'});this['_registerHeadingIdAttributePostfixer'](_0x148178);}['_customUpcastHeadingsConversion'](_0x47ecbb){this['editor']['conversion']['for']('upcast')['add'](_0x39d9ce=>_0x39d9ce['on']('element:'+_0x47ecbb,(_0xd2a53b,_0x47fa4e,_0x3beaeb)=>{const {consumable:_0x39652f,writer:_0x471f49}=_0x3beaeb,_0x1275d5=_0x47fa4e['viewItem']['getAttribute']('id'),_0x2ee506=_0x47fa4e['modelRange']?.['getContainedElement']();if(_0x2ee506)return _0x1275d5&&_0x1275d5['length']||_0x2ee506['hasAttribute']('headingId')?void(_0x39652f['consume'](_0x47fa4e['viewItem'],{'attributes':['id']})&&_0x471f49['setAttribute']('headingId',_0x1275d5,_0x2ee506)):(_0x39652f['consume'](_0x47fa4e['viewItem'],{'attributes':['id']}),void _0x471f49['setAttribute']('headingId',_0x4f1821(),_0x2ee506));},{'priority':_0x166799['get']('low')+0.5}));}['_customDataDowncastHeadingsConversion'](_0x5aaa07){this['editor']['conversion']['for']('downcast')['add'](_0x2caf53=>_0x2caf53['on']('attribute:headingId:'+_0x5aaa07,(_0x390b60,_0x1f9309,_0x1b543f)=>{if(!_0x1b543f['consumable']['consume'](_0x1f9309['item'],_0x390b60['name']))return;const _0x377f8f=_0x1f9309['item']['getAttribute']('headingId'),_0x1f505f=_0x1b543f['mapper']['toViewElement'](_0x1f9309['item']);_0x1b543f['writer']['setAttribute']('id',_0x377f8f,_0x1f505f);}));}['_registerHeadingIdAttributePostfixer'](_0x2687e6){const _0x5886e9=this['editor'],_0x4f35db=new Set(),_0x54d3cf=new Set();function _0x2b27c0(_0x430bdd,_0x47f3b9){const _0x52e35a=_0x4f1821();return _0x54d3cf['add'](_0x52e35a),_0x430bdd['setAttribute']('headingId',_0x52e35a,_0x47f3b9),_0x52e35a;}function _0x49c343(_0x2d053e,_0x1eb70c){_0x2d053e['removeAttribute']('headingId',_0x1eb70c);}_0x5886e9['model']['document']['registerPostFixer'](_0x34441b=>{const _0x12d62f=_0x5886e9['model']['document']['differ']['getChanges']();let _0x3fd1dc=!0x1;for(const _0x488730 of _0x12d62f)if('insert'==_0x488730['type']&&_0x488730['name']){if(_0x2687e6['has'](_0x488730['name'])){const _0x407042=_0x488730['attributes']['get']('headingId');'string'==typeof _0x407042?_0x4f35db['has'](_0x407042)?(_0x2b27c0(_0x34441b,_0x488730['position']['nodeAfter']),_0x3fd1dc=!0x0):_0x54d3cf['add'](_0x407042):(_0x2b27c0(_0x34441b,_0x488730['position']['nodeAfter']),_0x3fd1dc=!0x0);}else'string'==typeof _0x488730['attributes']['get']('headingId')&&(_0x49c343(_0x34441b,_0x488730['position']['nodeAfter']),_0x3fd1dc=!0x0);}else{if('remove'==_0x488730['type']){const _0x3b7780=_0x488730['attributes']['get']('headingId');'string'==typeof _0x3b7780&&_0x4f35db['delete'](_0x3b7780);}}return _0x3fd1dc;}),_0x5886e9['model']['document']['on']('change',()=>{_0x54d3cf['forEach'](_0x957c43=>_0x4f35db['add'](_0x957c43)),_0x54d3cf['clear']();});}},N=class extends _0x5ce0ef{static get['pluginName'](){return'TableOfContentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x16ef4f,I,A];}['_currentOutlineDefinitions'];['_tableOfContentsElements'];['_headingIdModelAttributeName'];constructor(_0x1ae1be){super(_0x1ae1be),this['_currentOutlineDefinitions']=[],this['_tableOfContentsElements']=new Set(),this['_headingIdModelAttributeName']='headingId';}['init'](){const _0x508901=this['editor'],_0x33107d=_0x508901['editing']['view']['document'];_0x508901['config']['get']('headingId.modelAttributeName')&&(this['_headingIdModelAttributeName']=_0x508901['config']['get']('headingId.modelAttributeName')),this['listenTo'](_0x33107d,'click',(_0x56dc39,_0x5d25b6)=>{if(!_0x5d25b6['target'])return;const _0x553a5a=_0x5d25b6['target']['getCustomProperty']('tableOfContentsHeadingIndex');Number['isInteger'](_0x553a5a)&&(_0x5d25b6['domEvent']['preventDefault'](),_0x56dc39['stop'](),this['_handleScrollToHeading'](_0x553a5a));},{'priority':'high','context':'$capture'}),this['_defineSchema'](),this['_defineConverters'](),_0x508901['commands']['add']('insertTableOfContents',new K(_0x508901));const _0xec3815=_0x508901['config']['get']('tableOfContents.headings');_0xec3815&&_0xec3815['length']?this['listenTo'](_0x508901['model']['document'],'change:data',()=>{this['_currentOutlineDefinitions']=this['_getOutlineDefinitions'](_0xec3815),this['_updateTableOfContentsElements']();}):_0x508901['plugins']['get']('DocumentOutlineUtils')['on']('change',(_0x5e41fd,_0x210780)=>{this['_currentOutlineDefinitions']=_0x210780['outlineDefinitions'],this['_updateTableOfContentsElements']();}),this['listenTo'](_0x508901['model']['document'],'change',()=>{this['_trackNewToCElements']();});}['afterInit'](){!async function(_0x51859f){const _0x1ca9a3='mr4z2yakM3x0phtD7jBw1T6qRfeUuZcOLNKVgQSPE9iGIHoXlJW8YsCb5AndFv',_0x5acce2=0x78e28,_0x2ce691=window['Date']['now'](),_0x46448f=_0x51859f['editor'],_0x1e41db=new window['Promise'](_0x5cbc5e=>{_0x46448f['once']('ready',_0x5cbc5e);}),_0x2d701a={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x4632a1=_0x46448f['config']['get']('licenseKey');async function _0xe8165f(){let _0x46fb2d,_0x29a6f4=null,_0x135cf5=null;try{return'GPL'==_0x4632a1?'NotAllowed':(_0x46fb2d=_0x2bada7(),_0x46fb2d?(_0x46fb2d['usageEndpoint']&&(_0x135cf5=_0x373a6b(_0x46fb2d['usageEndpoint'],_0x46fb2d['jti'])),await _0x1dd2fc()?_0x32bb6d()?_0x40e2a4()?'Expired':_0x22e1c3()?('evaluation'==_0x46fb2d['licenseType']&&(_0x29a6f4=_0x3944b4('EvaluationLimit')),await _0x31093d()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x40e2a4(){const _0x95238=['evaluation','trial']['includes'](_0x46fb2d['licenseType'])?_0x2ce691/0x3e8:0xe10*_0x5acce2;return _0x46fb2d['exp']<_0x95238;}function _0x32bb6d(){const _0x12bb9d=_0x46fb2d['features'];return!!_0x12bb9d&&(!!_0x12bb9d['includes']('*')||(!!_0x12bb9d['includes']('TOC')||(!!_0x12bb9d['includes']('PP')||!(!_0x12bb9d['includes']('TRILIUM')||!_0x2f1fa5()))));}function _0x22e1c3(){const _0x2c6d50=_0x46fb2d['licensedHosts'];if(!_0x2c6d50||0x0==_0x2c6d50['length'])return!0x0;const {hostname:_0x4a6e95}=new URL(window['location']['href']);if(_0x2c6d50['includes'](_0x4a6e95))return!0x0;const _0x4fab4a=_0x4a6e95['split']('.');return _0x2c6d50['filter'](_0xfbb701=>_0xfbb701['includes']('*'))['map'](_0x17adf4=>_0x17adf4['split']('.'))['filter'](_0x3ac8a8=>_0x3ac8a8['length']<=_0x4fab4a['length'])['map'](_0x3dcb7b=>Array(_0x4fab4a['length']-_0x3dcb7b['length'])['fill']('*'===_0x3dcb7b[0x0]?'*':'')['concat'](_0x3dcb7b))['some'](_0x37403f=>_0x4fab4a['every']((_0x34aa8d,_0x1e7a88)=>_0x37403f[_0x1e7a88]===_0x34aa8d||'*'===_0x37403f[_0x1e7a88]));}function _0x31093d(){return _0x29a6f4&&_0x135cf5?new window['Promise']((_0xeb3036,_0x5ab5fc)=>{_0x29a6f4['then'](_0xeb3036,_0x5ab5fc),_0x135cf5['then'](_0x3ecc18=>{'Valid'!=_0x3ecc18&&_0xeb3036(_0x3ecc18);},_0x5ab5fc);}):_0x29a6f4||_0x135cf5||'Valid';}}function _0x373a6b(_0x37deb4,_0xe413b1){return new window['Promise'](_0x14b01a=>{if(_0x3db646())return _0x14b01a('Valid');_0x57f3fb(),_0x46448f['decorate']('_sendUsageRequest');let _0x404136=!0x1;const _0x1e49a0=_0x4f1821();function _0x2fcd1e(_0x43b082){return!!_0x43b082&&('object'==typeof _0x43b082||'function'==typeof _0x43b082)&&'function'==typeof _0x43b082['then']&&'function'==typeof _0x43b082['catch'];}function _0x49746b(_0x389f5e){_0x58d7fc(_0x389f5e)['then'](_0x491e37=>_0x491e37&&'ok'==_0x491e37['status']?_0x1c9f9d(_0xf2d13f(_0x1e49a0+_0xe413b1))!=_0x491e37['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0xfeb8ca=>(_0x5b35cf(),_0xfeb8ca),()=>{const _0x32eeb0=_0x2cda08();return null==_0x32eeb0?(_0x5b35cf(),'Valid'):_0x2ce691-_0x32eeb0>0x240c8400?'UsageLimit':'Valid';})['then'](_0x14b01a)['catch'](()=>{_0x14b01a('UsageLimit');});const _0x12a37d=0x36ee80;function _0x5b35cf(){const _0x15051d='llct-'+_0x1c9f9d(_0xf2d13f(_0x37deb4)),_0x4c7e09=_0x502ae6(_0x1c9f9d(window['Math']['ceil'](_0x2ce691/_0x12a37d)));window['localStorage']['setItem'](_0x15051d,_0x4c7e09);}function _0x2cda08(){const _0x1eb2c6='llct-'+_0x1c9f9d(_0xf2d13f(_0x37deb4)),_0x52d104=window['localStorage']['getItem'](_0x1eb2c6);return _0x52d104?window['parseInt'](_0x502ae6(_0x52d104),0x10)*_0x12a37d:null;}function _0x58d7fc(_0x4c761e){return new window['Promise']((_0x52b002,_0x4940ec)=>{_0x4c761e['then'](_0x52b002,_0x4940ec),window['setTimeout'](_0x4940ec,0x1d4c0);});}}_0x46448f['on']('_sendUsageRequest',(_0x1cfdc2,_0x15bf70)=>{if(_0x15bf70[0x0]!=_0x37deb4)return _0x14b01a('UsageLimit');_0x15bf70[0x1]={..._0x15bf70[0x1],'requestId':_0x1e49a0};},{'priority':'high'}),_0x46448f['on']('_sendUsageRequest',_0x506f71=>{_0x2fcd1e(_0x506f71['return'])&&(_0x404136=!0x0,_0x49746b(_0x506f71['return']));},{'priority':'low'}),_0x1e41db['then'](()=>{_0x404136||_0x14b01a('UsageLimit');});});function _0x3db646(){return'auto'==_0x46448f['editing']['view']['_overlayModeHint'];}function _0x57f3fb(){_0x46448f['editing']['view']['_overlayModeHint']='auto';}}function _0x3944b4(_0x24c525){const _0x3aa37c=[new window['Promise'](_0xf15d13=>setTimeout(_0xf15d13,0x93ecc)),_0x1e41db['then'](()=>new window['Promise'](_0x4d0ec6=>{let _0x23323f=0x0;_0x46448f['model']['on']('applyOperation',(_0x21567b,_0x3d1b08)=>{_0x3d1b08[0x0]['isDocumentOperation']&&_0x23323f++,0x5e8==_0x23323f&&(_0x4d0ec6(),_0x21567b['off']());});}))];return window['Promise']['race'](_0x3aa37c)['then'](()=>_0x24c525);}async function _0x50aebc(){await _0x1e41db,_0x46448f['model']['change']=_0x152da6,_0x46448f['model']['enqueueChange']=_0x152da6,_0x46448f['enableReadOnlyMode']('model');}function _0x2f1fa5(){return window['glob']&&window['glob']['triliumVersion'];}function _0x387750(_0x444ca7){const _0xe13b2=_0x1eb4b0();_0x46448f[_0xe13b2]='tableOfContentsLicenseKey'+_0x444ca7,'Valid'!=_0x444ca7&&_0x50aebc();}function _0x1eb4b0(){const _0x14a8f8=window['String'](window['performance']['now']())['replace']('.','');let _0x4170c1='m';for(let _0x28552b=0x0;_0x28552b<_0x14a8f8['length'];_0x28552b+=0x2){let _0x566f63=window['parseInt'](_0x14a8f8['substring'](_0x28552b,_0x28552b+0x2));_0x566f63>=0x3e&&(_0x566f63-=0x3e),_0x4170c1+=_0x1ca9a3[_0x566f63];}return _0x4170c1;}function _0x2bada7(){const _0x478e0e=_0x4632a1['split']('.');if(0x3!=_0x478e0e['length'])return null;return _0x3ba92f(_0x478e0e[0x1]);function _0x3ba92f(_0x1115c5){const _0x3a8a7b=_0x33b33b(_0x1115c5);return _0x3a8a7b&&_0x2e1bb8()?_0x3a8a7b:null;function _0x2e1bb8(){const _0x13915f=_0x3a8a7b['jti'],_0x232ca5=window['parseInt'](_0x13915f['substring'](_0x13915f['length']-0x8),0x10),_0x524478={..._0x3a8a7b,'jti':_0x13915f['substring'](0x0,_0x13915f['length']-0x8)};return delete _0x524478['vc'],_0xf2d13f(_0x524478)==_0x232ca5;}}}async function _0x1dd2fc(){let _0x3ad72c=!0x0;try{const [_0x27d684,_0x33ea69,_0x598e14]=_0x4632a1['split']('.');return _0x3f374d(_0x27d684),await _0x3b6ba1(_0x27d684,_0x33ea69,_0x598e14),_0x3ad72c;}catch{return!0x1;}function _0x3f374d(_0x359ebd){const _0x3b9116=_0x33b33b(_0x359ebd);_0x3b9116&&'ES256'==_0x3b9116['alg']||(_0x3ad72c=!0x1);}async function _0x3b6ba1(_0x1da274,_0xc4490c,_0x284b07){const _0x3b588a=window['Uint8Array']['from'](_0x5d1565(_0x284b07),_0x47c56a=>_0x47c56a['charCodeAt'](0x0)),_0x5666e6=new window['TextEncoder']()['encode'](_0x1da274+'.'+_0xc4490c),_0x162f7a=window['crypto']['subtle'];if(!_0x162f7a)return;const _0x17865d=await _0x162f7a['importKey']('jwk',_0x2d701a,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x162f7a['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x17865d,_0x3b588a,_0x5666e6)||(_0x3ad72c=!0x1);}}function _0x33b33b(_0xae6b51){return _0xae6b51['startsWith']('ey')?JSON['parse'](_0x5d1565(_0xae6b51)):null;}function _0x5d1565(_0x850760){return window['atob'](_0x850760['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0xf2d13f(_0xd9df67){let _0x2a6ae7=0x1505;function _0x1d6c8d(_0x5a173b){for(let _0x107605=0x0;_0x107605<_0x5a173b['length'];_0x107605++){const _0x156c53=_0x5a173b['charCodeAt'](_0x107605);_0x2a6ae7=(_0x2a6ae7<<0x5)+_0x2a6ae7+_0x156c53,_0x2a6ae7&=_0x2a6ae7;}}function _0x32f733(_0x5994b1){Array['isArray'](_0x5994b1)?_0x5994b1['forEach'](_0x32f733):_0x5994b1&&'object'==typeof _0x5994b1?Object['entries'](_0x5994b1)['sort']()['forEach'](([_0x33f9e3,_0x4bd3dd])=>{_0x1d6c8d(_0x33f9e3),_0x32f733(_0x4bd3dd);}):_0x1d6c8d(window['String'](_0x5994b1));}return _0x32f733(_0xd9df67),_0x2a6ae7>>>0x0;}function _0x1c9f9d(_0x129950){return _0x129950['toString'](0x10)['padStart'](0x8,'0');}function _0x502ae6(_0x5b9953){return _0x5b9953['split']('')['reverse']()['join']('');}function _0x152da6(){}_0x387750(await _0xe8165f());}(this);}['_updateTableOfContentsElements'](){this['_tableOfContentsElements']['forEach'](_0x31b31b=>{'$graveyard'!==_0x31b31b['rootName']&&this['editor']['editing']['reconvertItem'](_0x31b31b);});}['_trackNewToCElements'](){for(const _0x262f61 of this['editor']['model']['document']['differ']['getChanges']({'includeChangesInGraveyard':!0x0})){if('insert'!==_0x262f61['type']||'tableOfContents'!==_0x262f61['name'])return;this['_tableOfContentsElements']['add'](_0x262f61['position']['nodeAfter']);}}['_getOutlineDefinitions'](_0x14c20e){const _0x3a3ab1=this['editor'],_0x8514f1=[];for(const _0x508c84 of _0x3a3ab1['model']['document']['getRootNames']())_0x5d00e4(_0x3a3ab1['model']['document']['getRoot'](_0x508c84));function _0x5d00e4(_0x2faa1a){for(const _0x1f2a4e of _0x2faa1a['getChildren']())_0x1f2a4e['is']('element')&&(_0x14c20e['includes'](_0x1f2a4e['name'])&&_0x8514f1['push']({'level':_0x14c20e['indexOf'](_0x1f2a4e['name'])+0x1,'text':b(_0x1f2a4e),'modelElement':_0x1f2a4e}),_0x5d00e4(_0x1f2a4e));}return _0x8514f1;}['_defineSchema'](){this['editor']['model']['schema']['register']('tableOfContents',{'inheritAllFrom':'$blockObject'});}['_defineConverters'](){const _0x181837=this['editor']['conversion'];_0x181837['for']('upcast')['elementToElement']({'model':'tableOfContents','view':{'name':'div','classes':'table-of-contents'}}),_0x181837['for']('dataDowncast')['elementToStructure']({'model':'tableOfContents','view':(_0x1ad15d,{writer:_0x5c7bee})=>this['_createTableOfContents'](_0x5c7bee,!0x0)}),_0x181837['for']('editingDowncast')['elementToStructure']({'model':'tableOfContents','view':(_0x3f44d5,{writer:_0xf2b092})=>(this['_tableOfContentsElements']['add'](_0x3f44d5),_0x2d1f70(this['_createTableOfContents'](_0xf2b092),_0xf2b092,{'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'](_0x12e39e,_0x24ec72=!0x1){const {locale:_0x46d59f}=this['editor'],_0xce4c65=_0x12e39e['createContainerElement']('div',{'class':'table-of-contents'+(0x0===this['_currentOutlineDefinitions']['length']?'\x20table-of-contents_empty':''),...!_0x24ec72&&{'data-table-of-contents-label':L(_0x46d59f,'Table\x20of\x20contents')}});0x0===this['_currentOutlineDefinitions']['length']&&!0x1===_0x24ec72&&_0x12e39e['insert'](_0x12e39e['createPositionAt'](_0xce4c65,'end'),_0x12e39e['createContainerElement']('p',{'class':'table-of-contents__placeholder'},[_0x12e39e['createText'](L(_0x46d59f,'No\x20headings\x20were\x20found\x20in\x20the\x20document.'))]));const _0x35e163=_0x24ec72?'':'['+L(_0x46d59f,'Empty\x20heading')+']';let _0x529b2a=_0xce4c65;return this['_currentOutlineDefinitions']['forEach']((_0x480b62,_0x4e164c,_0x30ee59)=>{const _0x37f658=this['editor']['model']['hasContent'](_0x480b62['modelElement'],{'ignoreWhitespaces':!0x0}),_0x3c9beb=_0x37f658?_0x480b62['text']:_0x35e163,_0x1c717a=_0x480b62['modelElement']['getAttribute'](this['_headingIdModelAttributeName']),_0x1ec9c2=_0x12e39e['createContainerElement']('a',{'href':'#'+_0x1c717a,...!_0x24ec72&&{'tabindex':'-1'}},[_0x12e39e['createText'](_0x3c9beb)]),_0x465f2a=this['editor']['config']['get']('documentOutline.showEmptyHeadings');_0x12e39e['setCustomProperty']('tableOfContentsHeadingIndex',_0x4e164c,_0x1ec9c2);const _0x31bea9=_0x12e39e['createContainerElement']('li',null,[_0x37f658||!_0x24ec72&&_0x465f2a?_0x1ec9c2:_0x12e39e['createText']('')]),_0x144ffb=_0x4e164c?_0x30ee59[_0x4e164c-0x1]['level']:0x0,_0x211242=Math['abs'](_0x480b62['level']-_0x144ffb);if(_0x480b62['level']>_0x144ffb){const _0x4c44d9=P(_0x31bea9,_0x211242,_0x12e39e);_0x12e39e['insert'](_0x12e39e['createPositionAt'](_0x529b2a,'end'),_0x4c44d9);}else{const _0x93e1ea=function(_0x54f35c,_0x4dae95){return _0x54f35c['getAncestors']({'includeSelf':!0x0,'parentFirst':!0x0})['filter'](_0x40a212=>_0x40a212['is']('element','ol'))[_0x4dae95];}(_0x529b2a,_0x211242);_0x12e39e['insert'](_0x12e39e['createPositionAt'](_0x93e1ea,'end'),_0x31bea9);}_0x529b2a=_0x31bea9;}),_0xce4c65;}['_handleScrollToHeading'](_0x7fde32){const _0x3b6cda=this['_currentOutlineDefinitions'][_0x7fde32]['modelElement'];this['editor']['model']['change'](_0x5e2d6f=>{_0x5e2d6f['setSelection'](_0x3b6cda,0x0);}),this['editor']['editing']['view']['scrollToTheSelection']({'alignToTop':!0x0,'forceScroll':!0x0});}['_redirectMapper'](){return(_0x34aac8,_0x7b6b2f)=>{const _0x4a871e=_0x7b6b2f['mapper'],_0x429594=_0x4a871e['findMappedViewAncestor'](_0x7b6b2f['viewPosition']),_0x45c6fe=_0x4a871e['toModelElement'](_0x429594);_0x45c6fe['is']('element','tableOfContents')&&(_0x7b6b2f['modelPosition']=this['editor']['model']['createPositionAt'](_0x45c6fe,0x0),_0x34aac8['stop']());};}};function P(_0x58ba9b,_0x4da410,_0x3bc3d9){return 0x1===_0x4da410?_0x3bc3d9['createContainerElement']('ol',null,[_0x58ba9b]):_0x3bc3d9['createContainerElement']('ol',null,[_0x3bc3d9['createContainerElement']('li',null,[P(_0x58ba9b,_0x4da410-0x1,_0x3bc3d9)])]);}var U=class extends _0x5ce0ef{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'TableOfContentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x14d149=this['editor'];_0x14d149['ui']['componentFactory']['add']('tableOfContents',()=>{const _0x1d4c5b=this['_createButton'](_0x1f5861);return _0x1d4c5b['tooltip']=!0x0,_0x1d4c5b;}),_0x14d149['ui']['componentFactory']['add']('menuBar:tableOfContents',()=>this['_createButton'](_0x2d8c96)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x2921aa=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4987c9;for(const _0x4d562f in _0x2921aa){const _0x28d9e2=_0x4d562f,_0x42bc7e=_0x2921aa[_0x28d9e2];if('tableOfContentsLicenseKeyValid'==_0x42bc7e||'tableOfContentsLicenseKeyInvalid'==_0x42bc7e||'tableOfContentsLicenseKeyExpired'==_0x42bc7e||'tableOfContentsLicenseKeyDomainLimit'==_0x42bc7e||'tableOfContentsLicenseKeyNotAllowed'==_0x42bc7e||'tableOfContentsLicenseKeyEvaluationLimit'==_0x42bc7e||'tableOfContentsLicenseKeyUsageLimit'==_0x42bc7e){delete _0x2921aa[_0x28d9e2],_0x4987c9=_0x42bc7e,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'tableOfContentsLicenseKeyInvalid'==_0x4987c9&&_0x2921aa['_showLicenseError']('invalid'),'tableOfContentsLicenseKeyExpired'==_0x4987c9&&_0x2921aa['_showLicenseError']('expired'),'tableOfContentsLicenseKeyDomainLimit'==_0x4987c9&&_0x2921aa['_showLicenseError']('domainLimit'),'tableOfContentsLicenseKeyNotAllowed'==_0x4987c9&&_0x2921aa['_showLicenseError']('featureNotAllowed','TableOfContents'),'tableOfContentsLicenseKeyEvaluationLimit'==_0x4987c9&&_0x2921aa['_showLicenseError']('evaluationLimit'),'tableOfContentsLicenseKeyUsageLimit'==_0x4987c9&&_0x2921aa['_showLicenseError']('usageLimit');},0x3e8);}['_createButton'](_0x27c666){const _0x3abc8f=this['editor'],_0x4d0df0=_0x3abc8f['locale'],_0x156e13=_0x3abc8f['commands']['get']('insertTableOfContents'),_0x175d1b=new _0x27c666(_0x4d0df0);return _0x175d1b['set']({'label':L(_0x4d0df0,'Table\x20of\x20contents'),'icon':_0x16dacb}),_0x175d1b['bind']('isEnabled')['to'](_0x156e13,'isEnabled'),this['listenTo'](_0x175d1b,'execute',()=>{_0x3abc8f['execute']('insertTableOfContents'),_0x3abc8f['editing']['view']['focus']();}),_0x175d1b;}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},D=class extends _0x5ce0ef{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 _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};
|
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.5",
|
|
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.5",
|
|
25
|
+
"@ckeditor/ckeditor5-engine": "48.3.0-alpha.5",
|
|
26
|
+
"@ckeditor/ckeditor5-heading": "48.3.0-alpha.5",
|
|
27
|
+
"@ckeditor/ckeditor5-icons": "48.3.0-alpha.5",
|
|
28
|
+
"@ckeditor/ckeditor5-ui": "48.3.0-alpha.5",
|
|
29
|
+
"@ckeditor/ckeditor5-utils": "48.3.0-alpha.5",
|
|
30
|
+
"@ckeditor/ckeditor5-widget": "48.3.0-alpha.5",
|
|
31
31
|
"es-toolkit": "1.45.1"
|
|
32
32
|
},
|
|
33
33
|
"files": [
|