@ckeditor/ckeditor5-comments 45.1.0-alpha.6 → 45.1.0-alpha.7
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/build/comments.js +1 -1
- package/dist/index.js +9 -9
- package/package.json +18 -18
- package/src/comments/commentsediting.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Nt)());constructor(_0x20109a={}){function _0xcf2d80(_0x3ecbfb){return _0x3ecbfb['map'](_0x5503f4=>String['fromCharCode'](_0x5503f4))['join']('');}(_0x20109a=Object['assign']({},_0x20109a))['plugins']||(_0x20109a['plugins']=Qt['defaultPlugins']),super(_0x20109a),this['ui']=new Ot(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0xcf2d80([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xcf2d80([0x76,0x69,0x65,0x77])][_0xcf2d80([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xcf2d80([0x61,0x75,0x74,0x6f]),this[_0xcf2d80([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0xcf2d80([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xcf2d80([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0xcf2d80([0x73,0x74,0x61,0x74,0x75,0x73])]:_0xcf2d80([0x6f,0x6b])});}['create'](){const _0x39b22c=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x39b22c))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x1e2436=>{const _0x440f6a=this['model']['document']['getRoot'](),_0x5f1885=_0x440f6a&&_0x440f6a['getChild'](_0x440f6a['childCount']-0x1);_0x1e2436['setSelection'](_0x5f1885,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x105666=this['editing']['view'],_0x3f6cb4=_0x105666['document']['getRoot'](),_0x595ed1=_0x3f6cb4['getChild'](0x0);_0x3f6cb4['childCount']>0x1||!_0x595ed1||'p'!=_0x595ed1['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x105666,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x595ed1['placeholder']=this['placeholder']),Ft({'view':_0x105666,'element':_0x595ed1,'keepOnFocus':!0x0}),this['placeholderElement']=_0x595ed1);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x1dbfba,_0x4c4b81={}){super(_0x1dbfba),this['editor']=null,this['_editorConfig']=_0x4c4b81,this['set']('value',_0x4c4b81['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',E(_0x1dbfba,'Reply...')),this['set']('submitLabel',E(_0x1dbfba,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x4e3bb4(),this['focusCycler']=new _0x591c72({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x5c62d9,_0x1b291e)=>{this['cancelButtonView']['fire']('execute'),_0x1b291e();}),this['keystrokes']['set']('Ctrl+Enter',(_0x264ddc,_0x859b31)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x859b31());}),this['on']('submit',(_0x118c71,_0x28b4ab)=>{_0x28b4ab['length']>0xfde8?(alert(E(_0x1dbfba,'TOO_LONG_COMMENT_ALERT',[_0x28b4ab['length'],0xfde8])),_0x118c71['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Qt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x2cbdf6=this['editor'];this['element']['insertBefore'](_0x2cbdf6['ui']['element'],this['element']['firstChild']),_0x2cbdf6['model']['document']['on']('change',()=>this['value']=_0x2cbdf6['getData']()),_0x2cbdf6['bind']('placeholder')['to'](this),this['focusables']['add'](_0x2cbdf6['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x4e97b8){-0x1===_0x4e97b8?(this['focusCycler']['focusFirst'](),this['focusCycler']['focusLast']()):this['focusCycler']['focusFirst']();}async['destroy'](){this['_isDestroyed']||(this['_isDestroyed']=!0x0,this['editor']&&(await this['_editorCreationPromise'],await this['editor']['destroy'](),this['fire']('editorDestroyed',this['editor'])),await super['destroy']());}['_createSubmitButton'](){const {locale:_0x532f92}=this,_0x3aeec2=new _0x45b47a(_0x532f92);return _0x3aeec2['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x3aeec2['withText']=!0x0,_0x3aeec2['bind']('label')['to'](this,'submitLabel'),_0x3aeec2['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x3aeec2['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x25260c,_0x1c4019)=>!_0x1c4019&&!!_0x25260c['trim']()),_0x3aeec2;}['_createCancelButton'](){const {locale:_0x431379}=this,_0x20451a=new _0x45b47a(_0x431379);return _0x20451a['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x20451a['label']=E(_0x431379,'Cancel'),_0x20451a['withText']=!0x0,_0x20451a['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x20451a;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x45e914=>{this['focusTracker']['add'](_0x45e914['element']);}),this['focusables']['on']('change',(_0x516329,_0x234bca)=>{for(const _0x272b6f of Array['from'](_0x234bca['added'])['reverse']())this['focusTracker']['add'](_0x272b6f['element']);});}}class ie extends kt{constructor(_0x123705,_0xfb0146,_0x41fd8a){super(_0x123705),this['commentInputView']=new os(_0x123705,_0x41fd8a),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x381857,_0x1bf086)=>_0x381857||!!_0x1bf086),this['set']('showInput',!0x1),this['on']('change:showInput',()=>{this['showInput']&&!this['commentInputView']['editor']&&this['commentInputView']['createEditor']();}),this['commentInputView']['delegate']('editorReady')['to'](this),this['commentInputView']['delegate']('editorDestroyed')['to'](this),this['userView']=new _0x287cbb(_0x123705,_0xfb0146),this['userView']['extendTemplate']({'attributes':{'class':'ck-thread__user','aria-hidden':!0x0}}),this['commentInputView']['extendTemplate']({'attributes':{'class':'ck-thread__input'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-container',this['bindTemplate']['if']('showInput','ck-comment__input-container--active')]},'children':[this['userView'],this['commentInputView']]});}['render'](){super['render'](),this['_focusOnNonInteractiveMouseDown']();}['destroy'](){return this['commentInputView']['destroy']()['then'](()=>super['destroy']());}['focus'](_0x709ebd){this['commentInputView']['focus'](_0x709ebd);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x20de09,_0x374c7d)=>{const {submitButtonView:_0x3aeaee,cancelButtonView:_0x3568df,editor:_0x253859}=this['commentInputView'];[_0x3aeaee['element'],_0x3568df['element'],_0x253859?_0x253859['editing']['view']['getDomRoot']():null]['filter'](_0xc2cb63=>_0xc2cb63)['some'](_0x595825=>_0x595825['contains'](_0x374c7d['target']))||(this['focus'](),_0x374c7d['preventDefault']());});}}class cs extends kt{constructor(_0x40a06f){super(_0x40a06f);const _0x5e6220=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x5e6220['to']('count',_0x1022c7=>E(_0x40a06f,'NUMBER_OF_COMMENTS',_0x1022c7))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x3a79a,_0x4d1447,_0x51e8eb){super(_0x3a79a);const _0x44953e=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x4d1447['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x4d1447,this['_config']=_0x51e8eb,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x4e3bb4(),this['keystrokes']=new jt(),this['focusCycler']=new _0x591c72({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1dce64=>this['commentViews']['map'](_0x183f33=>_0x183f33['element'])['includes'](_0x1dce64['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x3a79a),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x558ed4=>_0x558ed4-this['_config']['maxCommentsWhenCollapsed']);for(const _0x245796 of _0x4d1447['comments'])this['_handleNewCommentModel'](_0x245796);this['_handleInfoComment'](),this['listenTo'](_0x4d1447['comments'],'add',(_0x576243,_0x206093)=>{const _0x30e75a=this['_calculatePosition'](_0x206093);this['length']++,this['_handleNewCommentModel'](_0x206093,_0x30e75a),this['refreshVisibleViews']();}),this['listenTo'](_0x4d1447['comments'],'remove',(_0x1b85d7,_0x3ac764)=>{this['length']--,this['_handleRemoveCommentModel'](_0x3ac764),this['refreshVisibleViews']();}),this['listenTo'](_0x4d1447,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x4d1447,'change:isResolved',()=>this['_handleInfoComment']()),this['on']('change:isActive',()=>this['refreshVisibleViews']()),this['on']('change:hasDirtyComment',()=>this['refreshVisibleViews']()),this['setTemplate']({'tag':'ul','attributes':{'class':['ck-thread__comments',_0x44953e['if']('length','ck-hidden',_0xf2d24b=>!_0xf2d24b)],'aria-label':E(_0x3a79a,'Thread\x20comments')},'children':this['visibleViews']});}get['_shouldCollapse'](){return this['_model']['weight']>this['_config']['maxThreadTotalWeight']&&!this['isActive']&&!this['hasDirtyComment'];}['render'](){super['render'](),this['refreshVisibleViews'](),this['_setupKeyboardNavigation']();}['focus'](_0x47a3ba){-0x1===_0x47a3ba?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x4d27c5 of this['commentViews'])_0x4d27c5['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x2ca780,_0x31a188){const _0x36177c=new this['_config']['CommentView'](this['locale'],_0x2ca780,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x36177c['viewUid']=_0x2ca780['id'],_0x36177c['delegate']('removeComment')['to'](this),_0x36177c['delegate']('updateComment')['to'](this),_0x36177c['delegate']('resolveCommentThread')['to'](this),_0x36177c['delegate']('editorReady')['to'](this),_0x36177c['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x36177c,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x36177c,_0x31a188);}['_calculatePosition'](_0x5c885d){const _0x5772c2=this['_model']['_findOptimalIndex'](_0x5c885d);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x5c885d['authoredAt']?_0x5772c2-0x1:_0x5772c2:_0x5772c2-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x5a07c0={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':E(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x5a07c0,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x5a07c0));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x4aa6c7){const _0x426e3e=this['commentViews']['remove'](_0x4aa6c7['id']);this['stopListening'](_0x426e3e),_0x426e3e['isEditMode']&&this['_updateHasDirtyComment'](),_0x426e3e['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x30a7fa=>_0x30a7fa['isEditMode']);}['_rearrangeCollapse'](){const _0x49dc96=function(_0x31489d){const _0x21a982=new _0x2cece5();for(const _0x2d8ea9 of _0x31489d)_0x21a982['add'](_0x2d8ea9);return _0x21a982;}(this['commentViews']),_0x5067a9=this['_collapsedCommentsView']['count'];for(let _0x3484c8=0x1;_0x3484c8<=_0x5067a9;_0x3484c8++)_0x49dc96['remove'](0x1);for(const _0x1c05a9 of _0x49dc96)_0x1c05a9['collapse']();_0x5067a9>0x0&&_0x49dc96['add'](this['_collapsedCommentsView'],0x1),ns(_0xfb03d2(Array['from'](this['visibleViews']),Array['from'](_0x49dc96)),this['visibleViews'],_0x49dc96);}['_rearrangeExpand'](){ns(_0xfb03d2(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x4612ae of this['visibleViews'])_0x4612ae['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x2832ee=>{this['focusTracker']['add'](_0x2832ee['element']),this['keystrokes']['listenTo'](_0x2832ee['element']);}),this['commentViews']['on']('change',(_0x48fe05,_0x2be682)=>{for(const _0x2a1d20 of _0x2be682['removed'])this['focusTracker']['remove'](_0x2a1d20['element']),this['keystrokes']['stopListening'](_0x2a1d20['element']);for(const _0x281c12 of Array['from'](_0x2be682['added'])['reverse']())this['focusTracker']['add'](_0x281c12['element']),this['keystrokes']['listenTo'](_0x281c12['element']);});}}function ns(_0x1d0527,_0x5c2aa9,_0x4e64db){let _0x510019=0x0;for(const _0xe4d75f of _0x1d0527)switch(_0xe4d75f){case'insert':_0x5c2aa9['add'](_0x4e64db['get'](_0x510019),_0x510019),_0x510019++;break;case'delete':_0x5c2aa9['remove'](_0x510019);break;case'equal':_0x510019++;}}class as extends kt{constructor(_0x3886d2){super(_0x3886d2);const _0x1fbedd=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x1fbedd['to']('contextValue',_0x478848=>E(_0x3886d2,'THREAD_CONTEXT_LABEL',_0x478848)),'tabindex':-0x1},'children':[{'text':_0x1fbedd['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x4f5c0a,_0x5a9c15){super(_0x4f5c0a);const _0x48e991=this['bindTemplate'];this['_model']=_0x5a9c15,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x4e3bb4(),this['keystrokes']=new jt(),this['focusCycler']=new _0x591c72({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x48461b=>!!_0x48461b),this['bind']('contextValue')['to'](this['_model'],'context',_0x5c20a4=>_0x5c20a4&&_0x5c20a4['value']?this['_trimContextValue'](_0x5c20a4['value']):E(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x48e991['if']('hasContext','ck-context--quotes')]},'children':[this['contextView']]}]},{'tag':'div','attributes':{'class':['ck-annotation__actions']},'children':[this['reopenButtonView']]}]});}['render'](){super['render'](),this['_attachContextActions'](),this['_setupKeyboardNavigation']();}['focus'](){this['focusCycler']['focusFirst']();}['_createReopenButton'](){const _0x138a17=new _0x45b47a(this['locale']);return _0x138a17['label']=E(this['locale'],'Reopen'),_0x138a17['tooltip']=E(this['locale'],'Reopen'),_0x138a17['icon']=_0x4b7ac0,_0x138a17['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3d728c=>!_0x3d728c),_0x138a17['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0xa039a7,_0x3373a3)=>_0xa039a7&&_0x3373a3),_0x138a17['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x138a17;}['_trimContextValue'](_0x1ab7b5){if(_0x1ab7b5['length']<0x96)return _0x1ab7b5;const _0x598531=_0x1ab7b5['lastIndexOf']('\x20',0x93);return _0x1ab7b5['substring'](0x0,_0x598531>-0x1?_0x598531:0x93)+'...';}['_attachContextActions'](){const _0x3c46d1=this['element']['querySelector']('.ck-context'),_0x5206de=_0x3c46d1['querySelector']('.ck-context__value');this['listenTo'](_0x3c46d1,'mouseenter',()=>{_0x5206de['offsetWidth']<_0x5206de['scrollWidth']&&_0x3c46d1['classList']['add']('overlay');}),this['listenTo'](_0x3c46d1,'mouseleave',()=>{_0x3c46d1['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0xcf4c4a of this['focusables'])this['focusTracker']['add'](_0xcf4c4a['element']),this['keystrokes']['listenTo'](_0xcf4c4a['element']);}['_createContextView'](){const _0x1268e3=new as(this['locale']);return _0x1268e3['bind']('contextValue')['to'](this),_0x1268e3;}}class ts extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3fff9c,_0x5f6c86,_0x24cd2f,_0x34ffe3){super(_0x3fff9c),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x5f6c86,this['_localUser']=_0x24cd2f,this['_config']=_0x34ffe3,this['commentThreadHeaderView']=new Xt(_0x3fff9c,_0x5f6c86),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x3fff9c,E(_0x3fff9c,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x3fff9c,_0x5f6c86,Object['assign']({'CommentView':this['_config']['CommentView']},_0x34ffe3)),this['commentsListView']['delegate']('removeComment')['to'](this),this['commentsListView']['delegate']('updateComment')['to'](this),this['commentsListView']['delegate']('resolveCommentThread')['to'](this),this['commentsListView']['delegate']('editorReady')['to'](this),this['commentsListView']['delegate']('editorDestroyed')['to'](this),this['commentsListView']['bind']('isActive')['to'](this),this['listenTo'](this,'resolveCommentThread',()=>{this['focus']();}),this['set']('length',this['commentsListView']['length']),this['bind']('length')['to'](this['commentsListView'],'length'),this['commentThreadInputView']=this['_createCommentThreadInputView'](),this['commentThreadInputView']['delegate']('editorReady')['to'](this),this['commentThreadInputView']['delegate']('editorDestroyed')['to'](this),this['on']('removeComment',()=>this['focus']()),this['bind']('isDirty')['to'](this['commentsListView'],'hasDirtyComment',this['commentThreadInputView']['commentInputView'],'value',(_0x2620a2,_0x22b8f3)=>_0x2620a2||!!_0x22b8f3),this['bind']('isUnlinked')['to'](_0x5f6c86,'unlinkedAt',_0x2d87e1=>!!_0x2d87e1),this['bind']('ariaLabel')['to'](this,'length',_0x25191a=>{const _0x39e04c=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return E(this['locale'],'COMMENT_THREAD_LABEL',[_0x25191a,_0x39e04c]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x4e3bb4(),this['keystrokes']=new jt(),this['focusCycler']=new _0x591c72({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3fd467=>_0x3fd467['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x2710e4=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x177455=_0x2710e4['commentInputView'];return _0x2710e4['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x177455,'value',(_0x287334,_0x5ad784,_0x25303b,_0xee75e,_0x534d0e)=>!!_0x534d0e||!!_0xee75e&&_0x25303b&&!_0x5ad784||_0x287334&&_0x25303b&&!_0x5ad784),_0x177455['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x29ebeb,_0x37b0b1,_0x3702e4)=>{let _0x5d9da0;return _0x5d9da0=_0x3702e4&&_0x37b0b1?'Reply\x20to\x20reopen\x20discussion...':_0x29ebeb?'Reply...':'Write\x20a\x20comment...',E(this['locale'],_0x5d9da0);}),_0x177455['bind']('submitLabel')['to'](this,'length',_0xeae993=>E(this['locale'],_0xeae993?'Reply':'Comment')),_0x177455['on']('submit',(_0x3ff48b,_0x52d6ec)=>{this['fire']('addComment',_0x52d6ec),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x177455['on']('cancel',()=>{this['focus']();}),_0x177455['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x177455['on']('cancel',_0x3ce431=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x3ce431['stop']());}),this['on']('change:isActive',(_0x13f39e,_0x31be0a,_0x5c0e36)=>{_0x5c0e36||this['length']||_0x177455['value']||this['fire']('removeCommentThread');}),_0x2710e4;}}class vt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(ts){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(hs){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x3fc27f(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x4a72f5,target:_0x42ccd4,type:_0x349304,isVisible:_0x23d058=!0x0}){super(),this['view']=_0x4a72f5,this['view']['element']||this['view']['render'](),this['_type']=_0x349304,this['_target']=_0x42ccd4,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x2cece5([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x5737a4,_0x19210b)=>{this['view']['focusTracker']['add'](_0x19210b);}),this['focusableElements']['on']('remove',(_0x4286c5,_0xa8f467)=>{this['view']['focusTracker']['remove'](_0xa8f467);}),this['set']('isVisible',_0x23d058);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x194b65=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x194b65),_0x194b65;}get['targetRect'](){const _0x9e61b4=this['target'];if(null===_0x9e61b4)return null;if(_0x9e61b4 instanceof _0x543406)return _0x9e61b4;const _0x31d8e1=_0x9e61b4['filter'](_0x50a6fc=>function(_0x5e6ee2){const _0xe1c9ef=_0x5e6ee2['offsetParent'];if(_0xe1c9ef)return!0x0;const _0x471b3c=_0x5e6ee2['getClientRects']()['item'](0x0);return!!_0x471b3c;}(_0x50a6fc));return 0x0===_0x31d8e1['length']?null:new _0x543406(_0x31d8e1[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x5debe3){this['view']['isActive']=_0x5debe3,this['view']['mainView']['isActive']=_0x5debe3;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x481b45){if(!(null===_0x481b45||_0x481b45 instanceof _0x543406||Array['isArray'](_0x481b45)&&_0x481b45['every'](_0x40defb=>li(_0x40defb))))throw new _0x202340('annotation-invalid-target',null,{'target':_0x481b45});}['_getNormalizedTarget'](){const _0x212662='function'==typeof this['_target']?this['_target']():this['_target'];return li(_0x212662)?[_0x212662]:_0x212662;}}function li(_0x338af7){return null!==_0x338af7&&'object'==typeof _0x338af7&&'nodeType'in _0x338af7&&0x1===_0x338af7['nodeType'];}class _ extends _0x2cece5{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x3687f0=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x4e3bb4(),this['_focusTracker']['on']('change:isFocused',(_0x4430fe,_0x1d3ebb,_0x432dba)=>{_0x432dba||this['fire']('blur');});for(const _0x16450d of _0x3687f0)this['add'](_0x16450d);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x2387b6){if(this['has'](_0x2387b6))throw new _0x202340('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x2387b6['innerView'],_0x2387b6),this['_viewToAnnotation']['set'](_0x2387b6['view'],_0x2387b6);for(const _0x197cde of _0x2387b6['focusableElements'])this['_focusTracker']['add'](_0x197cde);this['listenTo'](_0x2387b6['focusableElements'],'add',(_0x2ad5bc,_0x10f7ef)=>{this['_focusTracker']['add'](_0x10f7ef);}),this['listenTo'](_0x2387b6['focusableElements'],'remove',(_0x436452,_0x47bfb1)=>{this['_focusTracker']['remove'](_0x47bfb1);}),this['listenTo'](_0x2387b6['view']['focusTracker'],'change:isFocused',(_0x1ebe26,_0x39ceff,_0x5ea26d)=>{_0x5ea26d&&this['fire']('focus',_0x2387b6);}),_0x2387b6['updateTargetRect']();const _0x45b2f3=this['_getOrderInContent'](_0x2387b6['view']['targetRect']);return super['add'](_0x2387b6,_0x45b2f3);}['remove'](_0x5444d0){if(!this['has'](_0x5444d0))throw new _0x202340('annotationcollection-not-existing-item',null);this['stopListening'](_0x5444d0['view']['focusTracker']),this['stopListening'](_0x5444d0['focusableElements']);for(const _0x287dee of _0x5444d0['focusableElements'])this['_focusTracker']['remove'](_0x287dee);return this['_viewToAnnotation']['delete'](_0x5444d0['view']),this['_innerViewToAnnotation']['delete'](_0x5444d0['innerView']),super['remove'](_0x5444d0);}['getByInnerView'](_0x548c28){return this['_innerViewToAnnotation']['get'](_0x548c28);}['getByView'](_0x1a30ea){return this['_viewToAnnotation']['get'](_0x1a30ea);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x17297e of this)_0x17297e['updateTargetRect']();this['_sort']();}['_sort'](){const _0x6767de=Array['from'](this)['sort']((_0x579bf5,_0x5a0085)=>v(_0x579bf5['view']['targetRect'],_0x5a0085['view']['targetRect']));for(let _0x184a9f=_0x6767de['length']-0x1;_0x184a9f>0x0;_0x184a9f--){const _0x14b704=_0x6767de[_0x184a9f];_0x184a9f!==this['getIndex'](_0x14b704)&&(this['remove'](_0x14b704),this['add'](_0x14b704));}}['_getOrderInContent'](_0x3fd267){let _0x40e43e=0x0;if(!_0x3fd267)return this['length'];for(const _0x125687 of this){const _0x45220a=_0x125687['view']['targetRect'];if(_0x45220a){if(v(_0x3fd267,_0x45220a)<0x0)return _0x40e43e;_0x40e43e++;}}return _0x40e43e;}}function v(_0x43273d,_0x247e7a){if(null===_0x43273d&&null===_0x247e7a)return 0x0;if(null===_0x43273d)return-0x1;if(null===_0x247e7a)return 0x1;const _0x3b85ef=_0x43273d['top']-_0x247e7a['top'];return 0x0==_0x3b85ef?_0x43273d['left']-_0x247e7a['left']:_0x3b85ef;}class O extends _0x154e47{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4f5f87){if(super(_0x4f5f87),this['collection']=new _(),this['_visibleAnnotations']=new _(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x4f5f87 instanceof _0x255aae){const _0x3c5e34=_0x4f5f87['locale'];_0x4f5f87['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':E(_0x3c5e34,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':E(_0x3c5e34,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':E(_0x3c5e34,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':E(_0x3c5e34,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':E(_0x3c5e34,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':E(_0x3c5e34,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':E(_0x3c5e34,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x47c86c){this['collection']['add'](_0x47c86c);}['remove'](_0x5e5b94){this['collection']['remove'](_0x5e5b94),_0x5e5b94['destroy']();}['refreshVisibility'](){for(const _0x16e155 of this['collection'])_0x16e155['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x5d297c){return this['collection']['getByInnerView'](_0x5d297c);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x24304b of this['collection'])_0x24304b['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x2648ec){this['fire']('_activateAnnotation',_0x2648ec);}['createAnnotation'](_0x1f556f){return new d(_0x1f556f);}['createAnnotationView'](_0x52194b,_0x3b3105){return new S(_0x52194b,_0x3b3105);}['_addActiveAnnotation'](_0x350ac8){const _0x146d6e=new Set(this['activeAnnotations']);_0x146d6e['add'](_0x350ac8),this['activeAnnotations']=_0x146d6e;}['_removeActiveAnnotation'](_0x5adde8){const _0x1e1e6d=new Set(this['activeAnnotations']);_0x1e1e6d['delete'](_0x5adde8),this['activeAnnotations']=_0x1e1e6d;}['_bindAnnotationsToVisibleAnnotations'](){const _0x303993=this['collection'],_0x11e2b1=this['_visibleAnnotations'];function _0x2f4a12(_0x20ea50){const _0x5d729d=_0x20ea50['source'];_0x5d729d['isVisible']&&!_0x11e2b1['has'](_0x5d729d)?_0x11e2b1['add'](_0x5d729d):!_0x5d729d['isVisible']&&_0x11e2b1['has'](_0x5d729d)&&_0x11e2b1['remove'](_0x5d729d),_0x5d729d['view']['focusTracker']['remove'](_0x5d729d['view']['element']),_0x5d729d['view']['focusTracker']['add'](_0x5d729d['view']['element']);}this['listenTo'](_0x303993,'add',(_0x2c6992,_0x12a7eb)=>{_0x12a7eb['isVisible']&&_0x11e2b1['add'](_0x12a7eb),this['listenTo'](_0x12a7eb,'change:isVisible',_0x2f4a12);}),this['listenTo'](_0x303993,'remove',(_0x5ed0b8,_0x26bcb1)=>{_0x11e2b1['has'](_0x26bcb1)&&_0x11e2b1['remove'](_0x26bcb1),this['stopListening'](_0x26bcb1,'change:isVisible',_0x2f4a12);});}['_setupEnterAnnotationKeystroke'](){const _0x489819=_0x4de8bd=>{_0x4de8bd['on']('ready',()=>{_0x4de8bd['keystrokes']['set'](_0x1a764c,(_0x138b21,_0x378397)=>{const _0x474f5d=_0x2e4433(this['activeAnnotations']['values']());_0x474f5d&&(_0x474f5d['view']['focus'](),_0x378397());});});};this['context']instanceof _0x255aae?_0x489819(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x14e62b,_0x22e364)=>{_0x489819(_0x22e364);});}['_setupEscapeAnnotationHandling'](){const _0x53efb5=_0x4ca483=>{const _0x48c01d=_0x4ca483['source'],_0x328bc7=[];let _0x27af38;if(Array['isArray'](_0x48c01d['target'])){_0x27af38=_0x48c01d['target'][0x0],this['context']instanceof _0x255aae?_0x328bc7['push'](this['context']):this['context']['editors']&&_0x328bc7['push'](...this['context']['editors']);for(const _0x58b392 of _0x328bc7)for(const _0x276e06 of _0x58b392['editing']['view']['domRoots']['values']())if(_0x276e06['contains'](_0x27af38))return void _0x58b392['editing']['view']['focus']();_0x27af38['focus']();}};this['listenTo'](this['collection'],'add',(_0x4098d1,_0x401325)=>{this['listenTo'](_0x401325,'escape',_0x53efb5,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x19d071,_0xa62c17)=>{this['stopListening'](_0xa62c17,'escape',_0x53efb5);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x154e47{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[O,ht,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x38640a){super(_0x38640a),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x4b0fdf=this['context']['config'];_0x4b0fdf['define']('comments.maxCommentsWhenCollapsed',0x2),_0x4b0fdf['define']('comments.maxThreadTotalWeight',0x1f4),_0x4b0fdf['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x4b0fdf['define']('comments.CommentThreadView',vt),_0x4b0fdf['define']('comments.CommentView',gt),_0x4b0fdf['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x41934e=this['context']['plugins']['get'](O);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x31660f,_0x56b9e8)=>this['_addCommentThread'](_0x56b9e8)),this['on']('submitCommentThread',(_0x15c39c,_0x5352bb)=>this['_submitCommentThread'](_0x5352bb)),this['on']('resolveCommentThread',(_0x193f97,_0x5ba9fa)=>this['_resolveCommentThread'](_0x5ba9fa)),this['on']('resolveCommentThread',(_0x131018,_0x1c991a)=>this['_updateActiveAnnotation'](_0x1c991a),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x43f8f1,_0x5018b)=>this['_reopenCommentThread'](_0x5018b)),this['on']('reopenCommentThread',(_0x581e10,_0x3cf9bb)=>this['_updateActiveAnnotation'](_0x3cf9bb),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x46d5ec,_0x3d212)=>this['_removeCommentThread'](_0x3d212)),this['on']('updateCommentThread',(_0x18b0f4,_0x4f52b8)=>this['_updateCommentThread'](_0x4f52b8)),this['on']('updateCommentThread',(_0x2ba099,_0x430f9d)=>this['_updateActiveAnnotation'](_0x430f9d),{'priority':'lowest'}),this['on']('addComment',(_0x32240a,_0x509c94)=>this['_addComment'](_0x509c94)),this['on']('updateComment',(_0x77efe3,_0x45acfc)=>this['_updateComment'](_0x45acfc)),this['on']('removeComment',(_0x34b067,_0x4241fe)=>this['_removeComment'](_0x4241fe)),this['on']('addComment',(_0x40acd3,{threadId:_0x1fbc1e,isFromAdapter:_0x1bb04d})=>{if(_0x1bb04d)return;const _0x27836e=this['getCommentThread'](_0x1fbc1e),_0x25a553=_0x27836e&&this['_threadToController']['get'](_0x27836e);_0x25a553&&_0x25a553['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x41934e,'change:activeAnnotations',(_0x2d7617,_0x1915a8,_0x52da5e)=>{const _0x59db6a=Array['from'](_0x52da5e)['map'](_0x4bcb88=>this['_viewToController']['get'](_0x4bcb88['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x59db6a?_0x59db6a['model']:null;});}set['adapter'](_0x3bc536){if(this['_adapter'])throw new _0x202340('commentsrepository-adapter-already-set');this['_adapter']=_0x3bc536;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x35a3ff=Tt,threadId:_0x3f1ae0=_0x7543b8(),comments:_0x2ec158=[],unlinkedAt:_0x581346=null,resolvedAt:_0x5e76c3=null,resolvedBy:_0x450397=null,target:_0x3c5b1c=null,context:_0x4e3566=null,attributes:_0x2cad00={},isResolvable:_0x4c89ca=!0x0,isSubmitted:_0x3cf95f=!0x1,isFromAdapter:_0x375cf7=!0x1}={}){return this['fire'](bt('addCommentThread',_0x35a3ff),{'channelId':_0x35a3ff,'threadId':_0x3f1ae0,'comments':_0x2ec158,'unlinkedAt':_0x581346,'resolvedAt':_0x5e76c3,'resolvedBy':_0x450397,'target':_0x3c5b1c,'context':_0x4e3566,'attributes':_0x2cad00,'isFromAdapter':_0x375cf7,'isResolvable':_0x4c89ca,'isSubmitted':_0x3cf95f}),this['getCommentThread'](_0x3f1ae0);}['openNewCommentThread']({channelId:_0x15313f=Tt,threadId:_0x11fe30=_0x7543b8(),target:_0x100d24,context:_0x475960=null,isResolvable:_0x2ba21e=!0x0}){if(this['_readOnlyChannels']['has'](_0x15313f)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x100d24)throw new _0x202340('commentsrepository-missing-target');const _0x473ea3=this['addCommentThread']({'channelId':_0x15313f,'threadId':_0x11fe30,'target':_0x100d24,'context':_0x475960,'isResolvable':_0x2ba21e});if(!_0x473ea3)return null;const _0x384a9f=this['_threadToController']['get'](_0x473ea3),_0x5cbc56=_0x384a9f['view']['commentThreadInputView']['commentInputView'],_0x45736b=this['context']['plugins']['get'](O),_0x4e6520=_0x45736b['getByInnerView'](_0x384a9f['view']);return _0x45736b['activate'](_0x4e6520),_0x5cbc56['once']('editorReady',()=>_0x5cbc56['focus']()),_0x473ea3;}['hasCommentThread'](_0x59c0b2){if('string'!=typeof _0x59c0b2)throw new _0x202340('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x59c0b2);}['updateCommentThread']({channelId:_0x24b818=Tt,threadId:_0x470cc3,context:_0x2d51f1,unlinkedAt:_0x4932a5,attributes:_0x2e0967,isFromAdapter:_0x2bf095=!0x1}){return this['fire'](bt('updateCommentThread',_0x24b818),{'channelId':_0x24b818,'threadId':_0x470cc3,'context':_0x2d51f1,'unlinkedAt':_0x4932a5,'attributes':_0x2e0967,'isFromAdapter':_0x2bf095}),this['getCommentThread'](_0x470cc3);}['getCommentThread'](_0xce3b00){if('string'!=typeof _0xce3b00)throw new _0x202340('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0xce3b00);}['fetchCommentThread']({channelId:_0x10945e,threadId:_0x117ed0}={}){const _0x59b840=this['getCommentThread'](_0x117ed0);if(_0x59b840)return Promise['resolve'](_0x59b840);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x202340('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x10945e,'threadId':_0x117ed0})['then'](_0x461760=>this['hasCommentThread'](_0x117ed0)?this['getCommentThread'](_0x117ed0):_0x461760?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x10945e},_0x461760)):void 0x0)['catch'](_0x2441ef=>{throw console['error'](_0x2441ef),new _0x202340('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x477ac7,skipNotAttached:_0x3da5dc=!0x1,skipEmpty:_0x557509=!0x1,toJSON:_0x5b7cf3=!0x1}={}){const _0x255ca9=[];for(const _0xdf66da of this['_threads']['values']())_0x477ac7&&_0xdf66da['channelId']!==_0x477ac7||_0x3da5dc&&!_0xdf66da['isAttached']||_0x557509&&0x0===_0xdf66da['length']||_0x255ca9['push'](_0xdf66da);return _0x5b7cf3?_0x255ca9['map'](_0x15c083=>_0x15c083['toJSON']()):_0x255ca9;}['setActiveCommentThread'](_0x2fd98e){const _0x7c8404=this['context']['plugins']['get'](O);if(!_0x2fd98e)return void(this['activeCommentThread']&&_0x7c8404['deactivateAll']());const _0x365617=this['getCommentThread'](_0x2fd98e);if(!_0x365617)throw new _0x202340('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x2fd98e});if(!this['_threadToController']['has'](_0x365617))throw new _0x202340('commentsrepository-active-not-attached',null,{'threadId':_0x2fd98e});const _0x100e35=_0x7c8404['getByInnerView'](this['_threadToController']['get'](_0x365617)['view']);_0x7c8404['activate'](_0x100e35);}['switchReadOnly'](_0x947aa4,_0x3772b3){_0x947aa4?this['_readOnlyChannels']['add'](_0x3772b3):this['_readOnlyChannels']['delete'](_0x3772b3),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x4af7f8){return this['_readOnlyChannels']['has'](_0x4af7f8)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0xdb6ca8,_0x57ce50){return new Ct(_0xdb6ca8,_0x57ce50);}['setPermissions'](_0x55353b,_0x2ed3d8=Tt){this['_permissions']['set'](_0x2ed3d8,_0x55353b),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x512d68=Tt){return this['_permissions']['has'](_0x512d68)?this['_permissions']['get'](_0x512d68):_t;}['_addCommentThread']({channelId:_0x1c26e5,threadId:_0x1c74c2,comments:_0x262781,unlinkedAt:_0x1d331c,resolvedAt:_0x1dccab,resolvedBy:_0x2fe469,target:_0x725d9d,context:_0x398851,attributes:_0x441293,isFromAdapter:_0x753c93,isResolvable:_0x356462,isSubmitted:_0x411529}){if('string'!=typeof _0x1c74c2)throw new _0x202340('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x1c74c2});if(this['hasCommentThread'](_0x1c74c2))throw new _0x202340('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x1c74c2});const _0x5796b2=new ui(this,{'channelId':_0x1c26e5,'id':_0x1c74c2,'context':_0x398851,'attributes':_0x441293,'unlinkedAt':_0x1d331c,'resolvedAt':_0x1dccab,'resolvedBy':_0x2fe469?this['context']['plugins']['get'](it)['getUser'](_0x2fe469):null,'isResolvable':_0x356462,'isSubmitted':_0x411529||_0x753c93});this['_threads']['set'](_0x1c74c2,_0x5796b2);for(const _0x1e8e15 of _0x262781)_0x5796b2['_add'](this['_createNewComment']({'threadId':_0x1c74c2,..._0x1e8e15}));return _0x725d9d&&_0x5796b2['attachTo'](_0x725d9d),_0x753c93||!_0x5796b2['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x1c26e5,'threadId':_0x1c74c2});}['_submitCommentThread']({channelId:_0x38f338,threadId:_0x165a0c}){if(!this['hasCommentThread'](_0x165a0c))throw new _0x202340('commentsrepository-missing-comment-thread',this);const _0xe24cd=this['getCommentThread'](_0x165a0c);if(_0xe24cd['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x5afdc2,comments:_0x4b5a40,resolvedAt:_0x68b597,resolvedBy:_0x5a4913,context:_0x53e3a4,attributes:_0x513b9c}=_0xe24cd,_0x3d7124=this['context']['plugins']['get']('PendingActions'),_0x4750da=_0x3d7124['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x38f338,'threadId':_0x5afdc2,'comments':_0x4b5a40['map'](_0x12918a=>_0x12918a['toJSON']()),'resolvedAt':_0x68b597,'resolvedBy':_0x5a4913?_0x5a4913['id']:_0x5a4913,'context':_0x53e3a4,'attributes':_0x513b9c})['then'](({comments:_0x498db4})=>{_0x3d7124['remove'](_0x4750da);for(const _0x3d6b23 of _0x498db4)this['_updateComment']({'channelId':_0x38f338,'threadId':_0x165a0c,'commentId':_0x3d6b23['commentId'],'createdAt':_0x3d6b23['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x21c83f=>{throw console['error'](_0x21c83f),new _0x202340('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x261401,target:_0x20b82a}){const _0x1417eb=this['getCommentThread'](_0x261401);if(!_0x1417eb)throw new _0x202340('commentsrepository-attach-missing-comment-thread',this);const _0x247ff8=this['context']['plugins']['get']('PendingActions'),_0x22e2f8=this['context']['plugins']['get'](O),_0x296bd2=this['_createCommentThreadView'](_0x1417eb),_0x43bd1e=new Ct(_0x1417eb,_0x296bd2);let _0x1bb027=null;_0x296bd2['on']('change:isDirty',(_0x422c4d,_0x4c988f,_0x5cd057)=>{_0x5cd057?_0x1bb027=_0x247ff8['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x1bb027&&(_0x247ff8['remove'](_0x1bb027),_0x1bb027=null);}),this['_threadToController']['set'](_0x1417eb,_0x43bd1e),this['_viewToController']['set'](_0x296bd2,_0x43bd1e);const _0x218f13=new S(this['context']['locale'],_0x296bd2);_0x218f13['bind']('length')['to'](_0x296bd2),_0x218f13['bind']('isDirty')['to'](_0x296bd2,'isDirty',_0x296bd2,'length',(_0xb47ccb,_0x396adb)=>_0xb47ccb||!_0x396adb),_0x218f13['bind']('isActive')['to'](_0x296bd2),_0x218f13['type']='comment';const _0x505475=new d({'view':_0x218f13,'target':_0x20b82a,'type':'comment','isVisible':!_0x1417eb['archivedAt']});return _0x296bd2['on']('escape',()=>{_0x505475['fire']('escape');}),this['_bindAnnotationToEditors'](_0x296bd2,_0x505475),_0x22e2f8['add'](_0x505475),_0x505475;}['_bindAnnotationToEditors'](_0x3f5bd3,_0xa2bce1){this['listenTo'](_0x3f5bd3,'editorReady',(_0x594395,_0x40e0d6)=>{const _0x44a2e4=_0x40e0d6['ui']['view']['body']['bodyCollectionContainer'];_0xa2bce1['focusableElements']['add'](_0x44a2e4),this['context']instanceof _0x255aae&&this['context']['ui']['focusTracker']['add'](_0x44a2e4);},{'priority':'highest'}),this['listenTo'](_0x3f5bd3,'editorDestroyed',(_0x4aabd0,_0x3df7ab)=>{const _0x1e9583=_0x3df7ab['ui']['view']['body']['bodyCollectionContainer'];_0xa2bce1['focusableElements']['has'](_0x1e9583)&&_0xa2bce1['focusableElements']['remove'](_0x1e9583),this['context']instanceof _0x255aae&&this['context']['ui']['focusTracker']['remove'](_0x1e9583);});}['_unbindEditors'](_0x576d04){this['stopListening'](_0x576d04,'editorReady'),this['stopListening'](_0x576d04,'editorDestroyed');}['_createCommentThreadView'](_0x36641b){const _0x31d9e6=this['context']['plugins']['get'](it),{config:_0x1f3c04,locale:_0x5146cf}=this['context'],_0x2614c7=lt(_0x1f3c04['get']('locale'),_0x5146cf);return new(0x0,(_0x1f3c04['get']('comments'))['CommentThreadView'])(_0x5146cf,_0x36641b,_0x31d9e6['me'],{'editorConfig':{..._0x1f3c04['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x1f3c04['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x1f3c04['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x1f3c04['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x1f3c04['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x2614c7,'CommentView':_0x1f3c04['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x1fc789,channelId:_0x3f0134,resolvedAt:_0x8d66bf,resolvedBy:_0x28dd03,isFromAdapter:_0x40fe76}){if(!this['hasCommentThread'](_0x1fc789))throw new _0x202340('commentsrepository-missing-comment-thread',null,{'threadId':_0x1fc789});const _0x41de99=this['getCommentThread'](_0x1fc789);if(_0x41de99['isResolved'])throw new _0x202340('commentsrepository-resolved-comment-thread',null,{'threadId':_0x1fc789});const _0x213fd3=this['context']['plugins']['get'](it);if(_0x41de99['resolvedBy']=_0x213fd3['getUser'](_0x28dd03),_0x41de99['resolvedAt']=_0x8d66bf,_0x40fe76||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x516538=this['context']['plugins']['get']('PendingActions'),_0x53aaa8=_0x516538['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x3f0134,'threadId':_0x1fc789})['then'](({resolvedAt:_0x2549cc,resolvedBy:_0xfda65e})=>{_0x516538['remove'](_0x53aaa8),_0x41de99['resolvedBy']['id']!==_0xfda65e&&(_0x41de99['resolvedBy']=_0x213fd3['getUser'](_0xfda65e)),_0x41de99['resolvedAt']=_0x2549cc;})['catch'](_0x4c1634=>{throw console['error'](_0x4c1634),new _0x202340('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x16295a,channelId:_0x1b4cd1,isFromAdapter:_0x30a8a1}){if(!this['hasCommentThread'](_0x16295a))throw new _0x202340('commentsrepository-missing-comment-thread',null,{'threadId':_0x16295a});const _0x146760=this['getCommentThread'](_0x16295a);if(!_0x146760['isResolved'])throw new _0x202340('commentsrepository-reopen-comment-thread',null,{'threadId':_0x16295a});if(_0x146760['resolvedBy']=null,_0x146760['resolvedAt']=null,_0x30a8a1||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x2b851d=this['context']['plugins']['get']('PendingActions'),_0x5d4def=_0x2b851d['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x1b4cd1,'threadId':_0x16295a})['then'](()=>_0x2b851d['remove'](_0x5d4def))['catch'](_0x218846=>{throw console['error'](_0x218846),new _0x202340('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x10642a,isFromAdapter:_0x186c95}){const _0x2dd3a=this['getCommentThread'](_0x10642a);if(!_0x2dd3a)throw new _0x202340('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x10642a),this['_threads']['delete'](_0x10642a),!_0x2dd3a['isSubmitted']||_0x186c95||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x50ccce=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2a0f91}=_0x2dd3a,_0x3640c2=_0x50ccce['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x2a0f91,'threadId':_0x10642a})['then'](()=>_0x50ccce['remove'](_0x3640c2))['catch'](_0x571018=>{throw console['error'](_0x571018),new _0x202340('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x3e72a5,unlinkedAt:_0x457d9a,context:_0x142590,attributes:_0x2b0f0c,isFromAdapter:_0x2e7ea5}){if('string'!=typeof _0x3e72a5)throw new _0x202340('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x3e72a5});if(!this['hasCommentThread'](_0x3e72a5))throw new _0x202340('commentsrepository-missing-comment-thread',null,{'threadId':_0x3e72a5});const _0x31840d=this['getCommentThread'](_0x3e72a5);let _0x2f53a0=!0x1;if(void 0x0!==_0x142590&&_0x31840d['context']!==_0x142590&&(_0x31840d['context']=_0x142590,_0x2f53a0=!0x0),void 0x0!==_0x457d9a&&_0x31840d['unlinkedAt']!==_0x457d9a&&(_0x31840d['unlinkedAt']=_0x457d9a,_0x2f53a0=!0x0),_0x2b0f0c&&!wt(_0x2b0f0c,_0x31840d['attributes'])&&(_0x31840d['attributes']=_0x2b0f0c,_0x2f53a0=!0x0),!_0x2f53a0)return Promise['resolve']();if(!_0x31840d['isSubmitted']||_0x2e7ea5||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x1ec490=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1b0ca6}=_0x31840d,_0x5270cb=_0x1ec490['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x1b0ca6,'threadId':_0x3e72a5,'context':_0x142590,'unlinkedAt':_0x457d9a,'attributes':_0x2b0f0c})['then'](()=>_0x1ec490['remove'](_0x5270cb))['catch'](_0x56ef67=>{throw console['error'](_0x56ef67),new _0x202340('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x19df96){const _0xb3cff1=this['context']['plugins']['get'](O),_0x553298=this['getCommentThread'](_0x19df96);if(_0x553298['_isAttached']=!0x1,this['_threadToController']['has'](_0x553298)){const _0x21379d=this['_threadToController']['get'](_0x553298),_0x51fb4b=_0x21379d['view'],_0x1bba07=_0xb3cff1['getByInnerView'](_0x51fb4b);this['_threadToController']['delete'](_0x553298),this['_viewToController']['delete'](_0x51fb4b),_0x1bba07&&_0xb3cff1['remove'](_0x1bba07),_0x21379d['destroy'](),_0x51fb4b['destroy']()['then'](()=>{this['_unbindEditors'](_0x51fb4b);});}}['_updateActiveAnnotation']({threadId:_0x50b448,resolvedAt:_0x426b5b,unlinkedAt:_0x1ea7f5}){const _0x52ceef=!!_0x426b5b,_0x3d402f=this['context']['plugins']['get'](O),_0x4d1d0e=this['getCommentThread'](_0x50b448);if(this['_threadToController']['has'](_0x4d1d0e)){const _0x24ac27=this['_threadToController']['get'](_0x4d1d0e)['view'],_0xec3a13=_0x3d402f['getByInnerView'](_0x24ac27);_0xec3a13&&(_0x52ceef&&_0x3d402f['_removeActiveAnnotation'](_0xec3a13),_0x1ea7f5?_0xec3a13['isVisible']=!0x1:_0xec3a13['refreshVisibility']());}}['_getExternalAuthor'](_0x33ae78){const _0x4c8f39=this['context']['plugins']['get'](it),_0x5d1f8b=pt('external:'+_0x33ae78),_0x1d85ad=_0x4c8f39['getUser'](_0x5d1f8b);return _0x1d85ad||_0x4c8f39['addUser']({'id':_0x5d1f8b,'name':_0x33ae78});}['_createNewComment']({threadId:_0x27f687,commentId:_0x309ee1=_0x7543b8(),content:_0x37b483,authorId:_0x2c0fff,createdAt:_0x2435af,attributes:_0x240eb2}){if('string'!=typeof _0x309ee1)throw new _0x202340('commentsrepository-invalid-commentid');if('string'!=typeof _0x2c0fff)throw new _0x202340('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x37b483||!_0x37b483['trim']())throw new _0x202340('commentsrepository-invalid-comment-content');const _0x418ffd=this['context']['plugins']['get'](it)['getUser'](_0x2c0fff);if(!_0x418ffd)throw new _0x202340('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x2c0fff});let _0x5612e8=null,_0x29c8da=_0x2435af;return _0x240eb2?.['@external']&&(_0x5612e8=this['_getExternalAuthor'](_0x240eb2['@external']['authorName']),_0x29c8da=new Date(_0x240eb2['@external']['createdAt'])),new fi(this,{'threadId':_0x27f687,'id':_0x309ee1,'author':_0x5612e8||_0x418ffd,'creator':_0x418ffd,'content':_0x37b483,'createdAt':_0x2435af,'authoredAt':_0x29c8da,'attributes':_0x240eb2});}['_addComment'](_0x40e6e5){let {threadId:_0x2aa0a8,content:_0x4eb804,attributes:_0x407621,isFromAdapter:_0x487f35}=_0x40e6e5;const _0x5ac6b9=this['getCommentThread'](_0x40e6e5['threadId']);if(!_0x5ac6b9)throw new _0x202340('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x1ee5e6=this['_createNewComment'](_0x40e6e5),{id:_0x555a0f}=_0x1ee5e6;if(_0x5ac6b9['_add'](_0x1ee5e6),_0x487f35||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x5ac6b9['isSubmitted'])return Promise['resolve']();const _0x46dcc2=this['context']['plugins']['get']('PendingActions'),{channelId:_0x247f33}=_0x5ac6b9,_0x1eb4f9=_0x46dcc2['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x407621||(_0x407621={}),this['adapter']['addComment']({'channelId':_0x247f33,'threadId':_0x2aa0a8,'commentId':_0x555a0f,'content':_0x4eb804,'attributes':_0x407621})['then'](_0x5e7fc2=>{_0x46dcc2['remove'](_0x1eb4f9),_0x5e7fc2&&this['_updateComment']({'channelId':_0x247f33,'threadId':_0x2aa0a8,'commentId':_0x555a0f,'createdAt':_0x5e7fc2['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x2bebce=>{throw console['error'](_0x2bebce),new _0x202340('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x43238d,commentId:_0x25b446,content:_0xc5f5b1,createdAt:_0x504057,attributes:_0x5b80a6,isFromAdapter:_0x1d9e7f}){if(void 0x0!==_0xc5f5b1&&('string'!=typeof _0xc5f5b1||!_0xc5f5b1['trim']()['length']))throw new _0x202340('commentsrepository-update-comment-invalid-content');const _0x108af6=this['getCommentThread'](_0x43238d),_0x5f2b0a=_0x108af6['getComment'](_0x25b446);if(!_0x5f2b0a)throw new _0x202340('commentsrepository-update-missing-comment',this);let _0x5cd326=!0x1;if(_0xc5f5b1&&_0xc5f5b1!==_0x5f2b0a['content']&&(_0x5f2b0a['isEditable']||_0x1d9e7f)&&(_0x5f2b0a['content']=_0xc5f5b1,_0x5cd326=!0x0),_0x504057&&_0x504057!==_0x5f2b0a['createdAt']&&(_0x5f2b0a['createdAt']=_0x504057,_0x5f2b0a['attributes']&&_0x5f2b0a['attributes']['@external']||(_0x5f2b0a['authoredAt']=_0x504057),_0x5cd326=!0x0),_0x5b80a6&&!wt(_0x5b80a6,_0x5f2b0a['attributes'])&&(_0x5f2b0a['attributes']=_0x5b80a6,_0x5cd326=!0x0),!_0x5cd326)return Promise['resolve']();if(_0x108af6['fire']('commentUpdated'),_0x1d9e7f||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x22bfe1=this['context']['plugins']['get']('PendingActions'),{channelId:_0x36bbe0}=this['getCommentThread'](_0x5f2b0a['threadId']),_0x5933d2=_0x22bfe1['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x36bbe0,'threadId':_0x43238d,'commentId':_0x25b446,'content':_0xc5f5b1,'attributes':_0x5b80a6})['then'](()=>_0x22bfe1['remove'](_0x5933d2))['catch'](_0x10a4ce=>{throw console['error'](_0x10a4ce),new _0x202340('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x29b832,commentId:_0x259625,isFromAdapter:_0x18fe40}){const _0x23f3b9=this['getCommentThread'](_0x29b832),_0x5db75f=_0x23f3b9['getComment'](_0x259625);if(!_0x5db75f)throw new _0x202340('commentsrepository-remove-missing-comment',this);if(_0x23f3b9['_remove'](_0x5db75f),_0x18fe40||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x55fa0f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2ac603}=_0x23f3b9,_0x2d4cf2=_0x55fa0f['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x2ac603,'threadId':_0x29b832,'commentId':_0x259625})['then'](()=>_0x55fa0f['remove'](_0x2d4cf2))['catch'](_0x3292ba=>{throw console['error'](_0x3292ba),new _0x202340('commentsrepository-remove-comment-internal-error',this);});}}class ui extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x3fc27f(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x3ed901,_0x589de5){super();const _0x538e51=_0x3ed901['context']['plugins']['get'](it)['me'],_0x3704aa=_0x3ed901['getCommentThread'](_0x589de5['threadId']),_0x1c4bf7=0x0===_0x3704aa['comments']['length'],_0x342a57=_0x538e51===_0x589de5['author'];this['id']=_0x589de5['id'],this['threadId']=_0x589de5['threadId'],this['author']=_0x589de5['author'],this['creator']=_0x589de5['creator'],this['isExternal']=Boolean(_0x589de5['attributes']&&_0x589de5['attributes']['@external']),this['set']('content',_0x589de5['content']),this['createdAt']=_0x589de5['createdAt']||new Date(),this['set']('authoredAt',_0x589de5['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x3704aa,'resolvedAt'),this['set']('attributes',_0x589de5['attributes']||{}),this['bind']('isEditable')['to'](_0x3ed901,'_permissions',()=>{const _0x2c6950=_0x3ed901['getPermissions'](_0x3704aa['channelId'])['write'],_0x189ed9=_0x3ed901['getPermissions'](_0x3704aa['channelId'])['modifyAll'];return _0x342a57&&_0x2c6950||!_0x342a57&&_0x189ed9;}),this['bind']('isRemovable')['to'](_0x3704aa,'isRemovable',_0x3ed901,'_permissions',_0xd208a4=>{const _0x5f5b83=_0x3ed901['getPermissions'](_0x3704aa['channelId'])['write'],_0x1e867f=_0x3ed901['getPermissions'](_0x3704aa['channelId'])['modifyAll'];return _0x342a57&&_0x5f5b83||_0xd208a4&&_0x1c4bf7||!_0x342a57&&_0x1e867f&&!_0x1c4bf7;}),this['bind']('isReadOnly')['to'](_0x3704aa,'isReadOnly'),this['_repository']=_0x3ed901;}get['weight'](){return Math['max'](function(_0x4bb306){const _0x3cccf7=document['createElement']('div');return _0x3cccf7['innerHTML']=_0x4bb306,_0x3cccf7['textContent']['length'];}(this['content']),0xc8);}['update'](_0x18bb1b){const {threadId:_0x513333,id:_0x2803b6}=this;if(!this['_repository']['hasCommentThread'](_0x513333))throw new _0x202340('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x52a1fa}=this['_repository']['getCommentThread'](_0x513333);this['_repository']['fire'](bt('updateComment',_0x52a1fa,_0x513333),{'channelId':_0x52a1fa,'threadId':_0x513333,'commentId':_0x2803b6,..._0x18bb1b});}['setAttribute'](_0x59d04b,_0x51e40){const _0x541ae3=It(this['attributes']);At(_0x541ae3,_0x59d04b,_0x51e40),this['update']({'attributes':_0x541ae3});}['removeAttribute'](_0x5344db){const _0x4f08f6=It(this['attributes']);yt(_0x4f08f6,_0x5344db),this['update']({'attributes':_0x4f08f6});}['remove'](_0x4009cf={}){if(!_0x4009cf['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x1ef518,id:_0x397dcb}=this;if(!this['_repository']['hasCommentThread'](_0x1ef518))throw new _0x202340('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x190305}=this['_repository']['getCommentThread'](_0x1ef518);this['_repository']['fire'](bt('removeComment',_0x190305,_0x1ef518),{'channelId':_0x190305,'threadId':_0x1ef518,'commentId':_0x397dcb,..._0x4009cf});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0x203a5b,..._0xd11504){for(const _0xee7fd of _0xd11504)void 0x0!==_0xee7fd&&(_0x203a5b+=':'+String(_0xee7fd));return _0x203a5b;}class J extends _0x3de137{['refresh'](){const _0x445f59=this['editor']['model']['document']['selection'];for(const _0x42c456 of _0x445f59['getRanges']())if(this['_hasContent'](_0x42c456))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x5d3df1=_0x7543b8()}={}){const _0x5d61c6=this['editor']['model'],_0x1b203b=[];for(const _0x545c10 of _0x5d61c6['document']['selection']['getRanges']())this['_hasContent'](_0x545c10)&&_0x1b203b['push'](this['_trimToContent'](_0x545c10));_0x5d61c6['change'](_0x29f7e4=>{for(const _0x48a6ac of _0x1b203b){const _0x52eb37=_0x7543b8()['substr'](0x1,0x5),_0x1a598e='comment:'+_0x5d3df1+':'+_0x52eb37;_0x29f7e4['addMarker'](_0x1a598e,{'range':_0x48a6ac,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0xdb95a0){for(const _0x3214bc of _0xdb95a0['getItems']())if(this['_itemIsContent'](_0x3214bc))return!0x0;return!0x1;}['_itemIsContent'](_0x304500){return _0x304500['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x304500)&&!_0x304500['is']('element','tableCell');}['_trimToContent'](_0x16e6d8){const _0x1934a1=_0x2c5857=>!this['_itemIsContent'](_0x2c5857['item']),_0xabcde1=_0x16e6d8['start']['getLastMatchingPosition'](_0x1934a1),_0x509195=_0x16e6d8['end']['getLastMatchingPosition'](_0x1934a1,{'direction':'backward'});return this['editor']['model']['createRange'](_0xabcde1,_0x509195);}}class P extends _0x119370{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[O];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4aafd8){super(_0x4aafd8),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x21d282=this['editor'],_0x51970a=_0x21d282['model']['document']['selection'],_0x1bc2c6=_0x569f83(()=>this['refreshSelectedViews'](),0xa);_0x51970a['on']('change:range',(_0x518766,_0x2ba042)=>{_0x2ba042['directChange']&&(_0x1bc2c6['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x21d282['editing']['view']['document'],'change:isFocused',(_0x266102,_0x2a52a6,_0x225a23)=>{_0x225a23&&_0x1bc2c6();}),this['listenTo'](_0x21d282['ui']['focusTracker'],'change:isFocused',(_0x199082,_0x1191f2,_0x3d2f93)=>{_0x3d2f93||_0x21d282['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x5d21b8=>this['_editorAnnotationsData']['has'](_0x5d21b8['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x421aef){if(this['_editorAnnotations']['has'](_0x421aef['view']))return;this['_editorAnnotations']['add'](_0x421aef['view']),this['editor']['ui']['focusTracker']['add'](_0x421aef['view']['element']);const _0x554d18=this['editor']['plugins']['get'](O);this['listenTo'](_0x554d18['collection'],'remove',(_0x23b5b2,_0x4f62e3)=>{this['editor']['ui']['focusTracker']['remove'](_0x4f62e3['view']['element']),this['_editorAnnotations']['delete'](_0x4f62e3['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x9ee1b5){if('function'!=typeof _0x9ee1b5)throw new _0x202340('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x9ee1b5);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x2f4f03,annotations:_0x1d800c}){const _0x5f4087=[],_0x5449a8=this['editor']['model']['document']['selection'],_0x2ee10f=Array['from'](_0x5449a8['getRanges']());for(const [_0xf89004,_0x5181df]of this['_editorAnnotationsData']){const _0x570df7=_0xaebd1f(_0x5181df),_0x4dc415=_0x1d800c['getByInnerView'](_0xf89004);_0x570df7&&_0x4dc415&&_0x5f4087['push']({'annotation':_0x4dc415,'range':_0x570df7});}function _0xaebd1f(_0x5e20ff){for(const _0x244972 of _0x5e20ff)for(const _0x59953f of _0x2ee10f)if(_0x244972['containsRange'](_0x59953f,!_0x5449a8['isCollapsed']))return _0x244972;return null;}return _0x5f4087['sort']((_0x4d0d94,_0x526e29)=>{const _0x38b9c2=_0x4d0d94['range'],_0x1e39e7=_0x526e29['range'];if(!_0x38b9c2['isEqual'](_0x1e39e7)){if(_0x38b9c2['containsRange'](_0x1e39e7,!0x0))return 0x1;if(_0x1e39e7['containsRange'](_0x38b9c2,!0x0))return-0x1;}return _0x4d0d94['annotation']==_0x2f4f03?-0x1:_0x526e29['annotation']==_0x2f4f03?0x1:0x0;})['map'](_0x3c3763=>_0x3c3763['annotation']);}get['_editorAnnotationsData'](){const _0x19c7e8=new Map();for(const _0x13d768 of Array['from'](this['_dataCollectors']))for(const [_0x40d4a3,_0x330bc1]of _0x13d768())_0x19c7e8['set'](_0x40d4a3,_0x330bc1);return _0x19c7e8;}}class st extends _0x119370{['afterInit'](){const _0x2cccff=this['editor'];if(!_0x2cccff['plugins']['has']('RestrictedEditingModeEditing'))return;_0x2cccff['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x119370{constructor(_0x4ae4e4){super(_0x4ae4e4),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x1ad491=this['editor'],_0x2fdf6d=_0x1ad491['commands']['get']('importWord'),_0x3b2f36=_0x1ad491['plugins']['get'](it);_0x2fdf6d&&(_0x2fdf6d['on']('execute',(_0xf395db,[,_0x459d25])=>{_0x459d25['collaboration_features']={'comments':!0x0,'user_id':_0x3b2f36['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x2fdf6d,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x213431,_0x442666){const {comment_threads:_0x320b27}=_0x442666;_0x320b27&&_0x320b27['forEach'](({thread_id:_0x424ce1,comments:_0x3a1b51,is_resolved:_0xe922fe})=>{const _0x31e7eb=new Date(),_0x4ea512=_0x3a1b51['map'](({author:_0x5435b8,content:_0x1b6736,created_at:_0x20112f})=>({'content':_0x1b6736,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x31e7eb,'attributes':{'@external':{'authorName':_0x5435b8,'createdAt':_0x20112f?new Date(_0x20112f):new Date(),'source':'importWord'}}})),_0xb37e3a=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0xb37e3a,'threadId':_0x424ce1,'comments':_0x4ea512,'resolvedAt':_0xe922fe?_0x31e7eb:null});});}}class at extends _0x119370{constructor(_0x3f33a4){super(_0x3f33a4),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x421f54=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x421f54,'contentInsertion',(_0x36ce31,_0x5e3f89)=>this['_removeMarkersWithoutThreads'](_0x5e3f89['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x1a5f94){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x1a5f94;const _0x3c2235=this['editor']['plugins']['get']('CommentsRepository');for(const _0x40b91d of _0x1a5f94['keys']()){const [_0x2db27a,_0x5c3198]=_0x40b91d['split'](':');'comment'!=_0x2db27a||_0x3c2235['hasCommentThread'](_0x5c3198)||_0x1a5f94['delete'](_0x40b91d);}return _0x1a5f94;}['_registerMarkerInClipboardPipeline'](){const _0x1a3a8b=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x4afdb1=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x4afdb1&&_0x1a3a8b['_registerMarkerToCopy']('comment',_0x4afdb1);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x57a7ed){switch(_0x57a7ed){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class ut extends _0x119370{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x22c172,_0x24f339)=>{if(!_0x24f339['options']['showCommentHighlights'])return null;if(_0x24f339['options']['ignoreResolvedComments']){const {id:_0x5058ca}=er(_0x22c172['markerName']),_0x25039c=this['editor']['plugins']['get'](o);if(_0x25039c['getCommentThread'](_0x5058ca)?.['isResolved']&&_0x22c172['item'])return _0x24f339['consumable']['consume'](_0x22c172['item'],'addMarker:'+_0x22c172['markerName']),_0x24f339['consumable']['consume'](_0x22c172['item'],'removeMarker:'+_0x22c172['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x4378aa=>{_0x4378aa['on']('addMarker:comment',(_0xf30ac2,_0xd1458d,_0x38f17c)=>{if(!_0x38f17c['options']['showCommentHighlights'])return;const _0x3ec975=_0xd1458d['item'];if(!_0x3ec975)return;const _0x2a9da5=_0x38f17c['mapper']['toViewElement'](_0x3ec975);this['editor']['model']['schema']['isObject'](_0x3ec975)&&_0x2a9da5&&!_0x2a9da5['getCustomProperty']('widget')&&_0x2a9da5['is']('containerElement')&&_0x210e46(_0x2a9da5,_0x38f17c['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0xed77c5,{writer:_0x1b606c,options:_0x4faf7f})=>{if(!_0x4faf7f['showCommentHighlights'])return null;const _0x2b3619=_0x1b606c['createContainerElement']('div'),_0x387cff=_0x1b606c['createEmptyElement']('hr');return _0x1b606c['addClass']('ck-horizontal-line',_0x2b3619),_0x1b606c['insert'](_0x1b606c['createPositionAt'](_0x2b3619,0x0),_0x387cff),_0x2b3619;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x48a485,{writer:_0x3015ab,options:_0x3a8bae})=>{if(!_0x3a8bae['showCommentHighlights'])return null;const _0x242f07=_0x3015ab['createContainerElement']('span'),_0x5ab448=_0x3015ab['createEmptyElement']('img');return _0x3015ab['addClass']('image-inline',_0x242f07),_0x3015ab['insert'](_0x3015ab['createPositionAt'](_0x242f07,0x0),_0x5ab448),_0x242f07;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x1cbe07,{writer:_0x1fdb20,options:_0x5c02f5})=>{if(_0x5c02f5['showCommentHighlights'])return _0x1fdb20['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x4dbb88,_0x2539f9,_0x16c38c)=>{_0x16c38c['options']['showCommentHighlights']&&_0x4dbb88['stop']();},{'priority':'high'});}}class r extends _0x119370{static get['requires'](){return[o,P,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2c32ef){super(_0x2c32ef),this['set']('isThreadsLoadingPaused',!0x0),_0x2c32ef['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x48df98,_0x270e48,_0x2766f7,_0x1ab19f)=>{const _0x383646=_0x2c32ef['plugins']['get'](o),_0x2997a5=_0x2766f7?er(_0x2766f7)['id']:null;_0x2c32ef['model']['change'](()=>{if(_0x2997a5){const _0x3c7241=this['getAllMarkersForId'](_0x2997a5);for(const _0x4d6099 of _0x3c7241)_0x2c32ef['editing']['reconvertMarker'](_0x4d6099);}if(_0x1ab19f){const {id:_0x4628ac}=er(_0x1ab19f),_0x1f4e90=_0x383646['getCommentThread'](_0x4628ac);if(_0x1f4e90&&_0x1f4e90['unlinkedAt'])return;if(_0x1f4e90&&!_0x1f4e90['isAttached'])return;const _0x355235=this['getAllMarkersForId'](_0x4628ac);for(const _0x219237 of _0x355235)_0x2c32ef['editing']['reconvertMarker'](_0x219237);}}),_0x2997a5&&this['scrollToThreadMarker'](_0x2997a5);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x49871a=this['editor'],_0x2f8e68=_0x49871a['plugins']['get'](o),_0x10c7b9=_0x49871a['config']['get']('collaboration.channelId'),_0x323911=_0x2f8e68['getCommentThreads']()['filter'](_0x440c03=>_0x440c03['channelId']!==_0x10c7b9);_0x49871a['commands']['add']('addCommentThread',new J(_0x49871a)),this['listenTo'](_0x49871a,'change:isReadOnly',(_0x14dd8e,_0x5b4a5d,_0x2b5cfb)=>{_0x2f8e68['switchReadOnly'](_0x2b5cfb,_0x49871a['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x2f8e68,ft('addCommentThread',_0x10c7b9),(_0x22218d,{threadId:_0x19a52c})=>{const _0x5e7f79=this['editor']['plugins']['get'](o)['getCommentThread'](_0x19a52c);_0x5e7f79?.['unlinkedAt']&&this['_attachArchivedThread'](_0x19a52c);}),this['listenTo'](_0x2f8e68,ft('removeCommentThread',_0x10c7b9),(_0x53b955,{threadId:_0x14c583})=>{_0x49871a['model']['enqueueChange']({'isUndoable':!0x1},_0x1f343d=>{const _0x4fa03c=this['getAllMarkersForId'](_0x14c583);for(const _0x4bfd63 of _0x4fa03c)_0x1f343d['removeMarker'](_0x4bfd63);});}),this['listenTo'](_0x2f8e68,ft('resolveCommentThread',_0x10c7b9),(_0x22a999,{threadId:_0x46111c})=>{(this['_reconvertMarkers'](_0x46111c),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x46111c)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x2f8e68,ft('reopenCommentThread',_0x10c7b9),(_0x5d193d,{threadId:_0x2f8b03})=>{this['_reconvertMarkers'](_0x2f8b03);},{'priority':'low'}),this['listenTo'](_0x2f8e68,ft('addComment',_0x10c7b9),(_0x2008aa,{threadId:_0x5ae0a2,isFromAdapter:_0x39baa2})=>{const _0xaaf8ae=this['getAllMarkersForId'](_0x5ae0a2);if(_0x39baa2||0x0==_0xaaf8ae['length']||!_0x2f8e68['hasCommentThread'](_0x5ae0a2))return;0x1===_0x2f8e68['getCommentThread'](_0x5ae0a2)['length']&&_0x49871a['model']['enqueueChange']({'isUndoable':!0x1},_0x523f5c=>{for(const _0x449c1d of _0xaaf8ae)_0x523f5c['updateMarker'](_0x449c1d,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x323911);}['afterInit'](){!async function(_0x5d8c23){const _0x240ac5=_0x4f25ff([0x31,0x54,0x46,0x56,0x74,0x7a,0x67,0x53,0x64,0x35,0x49,0x45,0x4a,0x38,0x6f,0x6b,0x4d,0x61,0x59,0x4e,0x68,0x30,0x42,0x39,0x44,0x33,0x4f,0x73,0x5a,0x52,0x75,0x34,0x6d,0x37,0x71,0x63,0x51,0x58,0x62,0x6e,0x69,0x50,0x76,0x32,0x70,0x4b,0x4c,0x57,0x79,0x43,0x65,0x66,0x72,0x36,0x78,0x55,0x48,0x6a,0x77,0x41,0x6c,0x47]),_0x5501b0=0x7e651f39,_0x4cc6d8=0x7e627881^_0x5501b0,_0x219b4f=window[_0x4f25ff([0x44,0x61,0x74,0x65])][_0x4f25ff([0x6e,0x6f,0x77])](),_0x3de0a0=_0x5d8c23[_0x4f25ff([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x43199d=new window[(_0x4f25ff([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x13554a=>{_0x3de0a0[_0x4f25ff([0x6f,0x6e,0x63,0x65])](_0x4f25ff([0x72,0x65,0x61,0x64,0x79]),_0x13554a);}),_0x2b263d={[_0x4f25ff([0x6b,0x74,0x79])]:_0x4f25ff([0x45,0x43]),[_0x4f25ff([0x75,0x73,0x65])]:_0x4f25ff([0x73,0x69,0x67]),[_0x4f25ff([0x63,0x72,0x76])]:_0x4f25ff([0x50,0x2d,0x32,0x35,0x36]),[_0x4f25ff([0x78])]:_0x4f25ff([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x4f25ff([0x79])]:_0x4f25ff([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x4f25ff([0x61,0x6c,0x67])]:_0x4f25ff([0x45,0x53,0x32,0x35,0x36])},_0x37cfd4=_0x3de0a0[_0x4f25ff([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4f25ff([0x67,0x65,0x74])](_0x4f25ff([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x249049(){let _0x2297ac,_0x5f18af=null,_0x2802cf=null;try{if(_0x37cfd4==_0x4f25ff([0x47,0x50,0x4c]))return _0x4f25ff([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2297ac=_0x18fd78(),!_0x2297ac)return _0x4f25ff([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2297ac[_0x4f25ff([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2802cf=_0x1d9f01(_0x2297ac[_0x4f25ff([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2297ac[_0x4f25ff([0x6a,0x74,0x69])])),await _0x12ee6e()?_0x495311()?_0x1a429d()?_0x4f25ff([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x24d061()?(_0x2297ac[_0x4f25ff([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4f25ff([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5f18af=_0x4987a8(_0x4f25ff([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2297ac[_0x4f25ff([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4f25ff([0x74,0x72,0x69,0x61,0x6c])&&(_0x5f18af=_0x4987a8(_0x4f25ff([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x48a3ce()):_0x4f25ff([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4f25ff([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4f25ff([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x287635){return _0x4f25ff([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1a429d(){const _0x5e7b8f=[_0x4f25ff([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4f25ff([0x74,0x72,0x69,0x61,0x6c])][_0x4f25ff([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2297ac[_0x4f25ff([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x219b4f/0x3e8:0xe10*_0x4cc6d8;return _0x2297ac[_0x4f25ff([0x65,0x78,0x70])]<_0x5e7b8f;}function _0x495311(){const _0x2d292c=_0x2297ac[_0x4f25ff([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x2d292c)return!0x1;if(_0x2d292c[_0x4f25ff([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f25ff([0x2a])))return!0x0;if(_0x2d292c[_0x4f25ff([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f25ff([0x43,0x4d,0x54])))return!0x0;if(_0x2d292c[_0x4f25ff([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f25ff([0x52,0x43,0x4d,0x54]))){if(_0x3ba2a0())return!0x0;if(_0x5bceb1()||_0x45f759())return!0x0;}return!0x1;}function _0x24d061(){const _0x375679=_0x2297ac[_0x4f25ff([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x375679||0x0==_0x375679[_0x4f25ff([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x581414}=new URL(window[_0x4f25ff([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x375679[_0x4f25ff([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x581414))return!0x0;const _0x59a6d0=_0x581414[_0x4f25ff([0x73,0x70,0x6c,0x69,0x74])](_0x4f25ff([0x2e]));return _0x375679[_0x4f25ff([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5b91db=>_0x5b91db[_0x4f25ff([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f25ff([0x2a])))[_0x4f25ff([0x6d,0x61,0x70])](_0x29ad88=>_0x29ad88[_0x4f25ff([0x73,0x70,0x6c,0x69,0x74])](_0x4f25ff([0x2e])))[_0x4f25ff([0x73,0x6f,0x6d,0x65])](_0x4a7813=>_0x59a6d0[_0x4f25ff([0x65,0x76,0x65,0x72,0x79])]((_0x367953,_0xf19d69)=>_0x4a7813[_0xf19d69]===_0x367953||_0x4a7813[_0xf19d69]===_0x4f25ff([0x2a])));}function _0x48a3ce(){return _0x5f18af&&_0x2802cf?new window[(_0x4f25ff([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5344bf,_0x3d7b13)=>{_0x5f18af[_0x4f25ff([0x74,0x68,0x65,0x6e])](_0x5344bf,_0x3d7b13),_0x2802cf[_0x4f25ff([0x74,0x68,0x65,0x6e])](_0x1e94fc=>{_0x1e94fc!=_0x4f25ff([0x56,0x61,0x6c,0x69,0x64])&&_0x5344bf(_0x1e94fc);},_0x3d7b13);}):_0x5f18af||_0x2802cf||_0x4f25ff([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1d9f01(_0x3e1dfe,_0x1c3ca6){return new window[(_0x4f25ff([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3d8242=>{if(_0x1c8da1())return _0x3d8242(_0x4f25ff([0x56,0x61,0x6c,0x69,0x64]));_0x997b95(),_0x3de0a0[_0x4f25ff([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4f25ff([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3dc101=!0x1;const _0x18098b=_0x7543b8();function _0x3168d4(_0xd3bf6f){return!!_0xd3bf6f&&(typeof _0xd3bf6f===_0x4f25ff([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xd3bf6f===_0x4f25ff([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xd3bf6f[_0x4f25ff([0x74,0x68,0x65,0x6e])]===_0x4f25ff([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xd3bf6f[_0x4f25ff([0x63,0x61,0x74,0x63,0x68])]===_0x4f25ff([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x50d4a1(_0x121222){_0x445cef(_0x121222)[_0x4f25ff([0x74,0x68,0x65,0x6e])](_0x142e39=>{if(!_0x142e39||_0x142e39[_0x4f25ff([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4f25ff([0x6f,0x6b]))return _0x4f25ff([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x50684f(_0x1c1682(_0x18098b+_0x1c3ca6))!=_0x142e39[_0x4f25ff([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4f25ff([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4f25ff([0x56,0x61,0x6c,0x69,0x64]);})[_0x4f25ff([0x74,0x68,0x65,0x6e])](_0x32c0c6=>(_0x452aeb(),_0x32c0c6),()=>{const _0x31a50b=_0xe8ccb();return null==_0x31a50b?(_0x452aeb(),_0x4f25ff([0x56,0x61,0x6c,0x69,0x64])):_0x4f25ff(_0x219b4f-_0x31a50b>(0x5a699b39^_0x5501b0)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4f25ff([0x74,0x68,0x65,0x6e])](_0x3d8242)[_0x4f25ff([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3d8242(_0x4f25ff([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x85d682=0x7e53f1b9^_0x5501b0;function _0x452aeb(){const _0x3a7ef3=_0x4f25ff([0x6c,0x6c,0x63,0x74,0x2d])+_0x50684f(_0x1c1682(_0x3e1dfe)),_0xa87d69=_0x43ea5d(_0x50684f(window[_0x4f25ff([0x4d,0x61,0x74,0x68])][_0x4f25ff([0x63,0x65,0x69,0x6c])](_0x219b4f/_0x85d682)));window[_0x4f25ff([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4f25ff([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3a7ef3,_0xa87d69);}function _0xe8ccb(){const _0xd4a2fc=_0x4f25ff([0x6c,0x6c,0x63,0x74,0x2d])+_0x50684f(_0x1c1682(_0x3e1dfe)),_0xf89b3d=window[_0x4f25ff([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4f25ff([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xd4a2fc);return _0xf89b3d?window[_0x4f25ff([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x43ea5d(_0xf89b3d),0x10)*_0x85d682:null;}function _0x445cef(_0x290daf){return new window[(_0x4f25ff([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5c7875,_0x5895b2)=>{_0x290daf[_0x4f25ff([0x74,0x68,0x65,0x6e])](_0x5c7875,_0x5895b2),window[_0x4f25ff([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5895b2,0x7e64cbf9^_0x5501b0);});}}_0x3de0a0[_0x4f25ff([0x6f,0x6e])](_0x4f25ff([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x565589,_0x45b968)=>{if(_0x45b968[0x0]!=_0x3e1dfe)return _0x3d8242(_0x4f25ff([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x45b968[0x1]={..._0x45b968[0x1],[_0x4f25ff([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x18098b};},{[_0x4f25ff([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4f25ff([0x68,0x69,0x67,0x68])}),_0x3de0a0[_0x4f25ff([0x6f,0x6e])](_0x4f25ff([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5cdb40=>{_0x3168d4(_0x5cdb40[_0x4f25ff([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3dc101=!0x0,_0x50d4a1(_0x5cdb40[_0x4f25ff([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4f25ff([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4f25ff([0x6c,0x6f,0x77])}),_0x43199d[_0x4f25ff([0x74,0x68,0x65,0x6e])](()=>{_0x3dc101||_0x3d8242(_0x4f25ff([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x1c8da1(){return _0x3de0a0[_0x4f25ff([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4f25ff([0x76,0x69,0x65,0x77])][_0x4f25ff([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4f25ff([0x61,0x75,0x74,0x6f]);}function _0x997b95(){_0x3de0a0[_0x4f25ff([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4f25ff([0x76,0x69,0x65,0x77])][_0x4f25ff([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4f25ff([0x61,0x75,0x74,0x6f]);}}function _0x4987a8(_0x18502e){const _0x376e40=[new window[(_0x4f25ff([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1f5d76=>setTimeout(_0x1f5d76,0x7e6c21f5^_0x5501b0)),_0x43199d[_0x4f25ff([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4f25ff([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1fc718=>{let _0x3ba8d9=0x0;_0x3de0a0[_0x4f25ff([0x6d,0x6f,0x64,0x65,0x6c])][_0x4f25ff([0x6f,0x6e])](_0x4f25ff([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x22a7c9,_0x119495)=>{_0x119495[0x0][_0x4f25ff([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x3ba8d9++,_0x3ba8d9==(0x7e651ec1^_0x5501b0)&&(_0x1fc718(),_0x22a7c9[_0x4f25ff([0x6f,0x66,0x66])]());});}))];return window[_0x4f25ff([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4f25ff([0x72,0x61,0x63,0x65])](_0x376e40)[_0x4f25ff([0x74,0x68,0x65,0x6e])](()=>_0x18502e);}async function _0x2c9a2(){await _0x43199d,_0x3de0a0[_0x4f25ff([0x6d,0x6f,0x64,0x65,0x6c])][_0x4f25ff([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5b1c3a,_0x3de0a0[_0x4f25ff([0x6d,0x6f,0x64,0x65,0x6c])][_0x4f25ff([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5b1c3a,_0x3de0a0[_0x4f25ff([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4f25ff([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3ba2a0(){return _0x5efa37(_0x4f25ff([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x593fa7(_0x4f25ff([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x4f25ff([0x73,0x74,0x61,0x74,0x65])]==_0x4f25ff([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x5bceb1(){return _0x5efa37(_0x4f25ff([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x45f759(){return _0x5efa37(_0x4f25ff([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x3899bb(_0x12c833){const _0x566df2=_0x29c77d();_0x3de0a0[_0x566df2]=_0x4f25ff([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x12c833,_0x12c833!=_0x4f25ff([0x56,0x61,0x6c,0x69,0x64])&&_0x2c9a2();}function _0x29c77d(){const _0x56ecd3=window[_0x4f25ff([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4f25ff([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4f25ff([0x6e,0x6f,0x77])]())[_0x4f25ff([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4f25ff([0x2e]),'');let _0x299f11=_0x4f25ff([0x54]);for(let _0x147f1f=0x0;_0x147f1f<_0x56ecd3[_0x4f25ff([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x147f1f+=0x2){let _0x409834=window[_0x4f25ff([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x56ecd3[_0x4f25ff([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x147f1f,_0x147f1f+0x2));_0x409834>=_0x240ac5[_0x4f25ff([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x409834-=_0x240ac5[_0x4f25ff([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x299f11+=_0x240ac5[_0x409834];}return _0x299f11;}function _0x18fd78(){const _0x4e0dab=_0x37cfd4[_0x4f25ff([0x73,0x70,0x6c,0x69,0x74])](_0x4f25ff([0x2e]));if(0x3!=_0x4e0dab[_0x4f25ff([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x33294f(_0x4e0dab[0x1]);function _0x33294f(_0x183ded){const _0x260f51=_0xffba1d(_0x183ded);return _0x260f51&&_0x43b886()?_0x260f51:null;function _0x43b886(){const _0x213bc6=_0x260f51[_0x4f25ff([0x6a,0x74,0x69])],_0x450abd=window[_0x4f25ff([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x213bc6[_0x4f25ff([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x213bc6[_0x4f25ff([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x20e6c1={..._0x260f51,[_0x4f25ff([0x6a,0x74,0x69])]:_0x213bc6[_0x4f25ff([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x213bc6[_0x4f25ff([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x20e6c1[_0x4f25ff([0x76,0x63])],_0x1c1682(_0x20e6c1)==_0x450abd;}}}async function _0x12ee6e(){let _0x11930a=!0x0;try{const _0xbb2b57=_0x37cfd4[_0x4f25ff([0x73,0x70,0x6c,0x69,0x74])](_0x4f25ff([0x2e])),[_0x46fe2a,_0x546a8a,_0xaf19b0]=_0xbb2b57;return _0x11afd6(_0x46fe2a),await _0x2b3548(_0x46fe2a,_0x546a8a,_0xaf19b0),_0x11930a;}catch(_0x2e6bf2){return!0x1;}function _0x11afd6(_0x4856f2){const _0x2c8cf0=_0xffba1d(_0x4856f2);_0x2c8cf0&&_0x2c8cf0[_0x4f25ff([0x61,0x6c,0x67])]==_0x4f25ff([0x45,0x53,0x32,0x35,0x36])||(_0x11930a=!0x1);}async function _0x2b3548(_0x3795ce,_0x41a6b6,_0x4f4c24){const _0x549f0b=window[_0x4f25ff([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4f25ff([0x66,0x72,0x6f,0x6d])](_0x55842d(_0x4f4c24),_0x394d6d=>_0x394d6d[_0x4f25ff([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x353795=new window[(_0x4f25ff([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4f25ff([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x3795ce+_0x4f25ff([0x2e])+_0x41a6b6),_0x5866d7=window[_0x4f25ff([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4f25ff([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5866d7)return;const _0x108de4=await _0x5866d7[_0x4f25ff([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4f25ff([0x6a,0x77,0x6b]),_0x2b263d,{[_0x4f25ff([0x6e,0x61,0x6d,0x65])]:_0x4f25ff([0x45,0x43,0x44,0x53,0x41]),[_0x4f25ff([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4f25ff([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4f25ff([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5866d7[_0x4f25ff([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4f25ff([0x6e,0x61,0x6d,0x65])]:_0x4f25ff([0x45,0x43,0x44,0x53,0x41]),[_0x4f25ff([0x68,0x61,0x73,0x68])]:{[_0x4f25ff([0x6e,0x61,0x6d,0x65])]:_0x4f25ff([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x108de4,_0x549f0b,_0x353795)||(_0x11930a=!0x1);}}function _0xffba1d(_0x58df1a){return _0x58df1a[_0x4f25ff([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4f25ff([0x65,0x79]))?JSON[_0x4f25ff([0x70,0x61,0x72,0x73,0x65])](_0x55842d(_0x58df1a)):null;}function _0x55842d(_0x2a5379){return window[_0x4f25ff([0x61,0x74,0x6f,0x62])](_0x2a5379[_0x4f25ff([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4f25ff([0x2b]))[_0x4f25ff([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4f25ff([0x2f])));}function _0x1c1682(_0x2decae){let _0xc7233f=0x1505;function _0x32fde5(_0x18d0f5){for(let _0x1c1393=0x0;_0x1c1393<_0x18d0f5[_0x4f25ff([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1c1393++){const _0x4cba32=_0x18d0f5[_0x4f25ff([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1c1393);_0xc7233f=(_0xc7233f<<0x5)+_0xc7233f+_0x4cba32,_0xc7233f&=_0xc7233f;}}function _0x3995c2(_0x4f2e89){Array[_0x4f25ff([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4f2e89)?_0x4f2e89[_0x4f25ff([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3995c2):_0x4f2e89&&typeof _0x4f2e89==_0x4f25ff([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4f25ff([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4f2e89)[_0x4f25ff([0x73,0x6f,0x72,0x74])]()[_0x4f25ff([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x3a43c0,_0x5be0d3])=>{_0x32fde5(_0x3a43c0),_0x3995c2(_0x5be0d3);}):_0x32fde5(window[_0x4f25ff([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4f2e89));}return _0x3995c2(_0x2decae),_0xc7233f>>>0x0;}function _0x50684f(_0x455b17){return _0x455b17[_0x4f25ff([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4f25ff([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4f25ff([0x30]));}function _0x43ea5d(_0x2e173e){return _0x2e173e[_0x4f25ff([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4f25ff([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4f25ff([0x6a,0x6f,0x69,0x6e])]('');}function _0x5efa37(_0x4c9574){return _0x3de0a0[_0x4f25ff([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4f25ff([0x68,0x61,0x73])](_0x4c9574);}function _0x593fa7(_0x19f7d2){return _0x3de0a0[_0x4f25ff([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4f25ff([0x67,0x65,0x74])](_0x19f7d2);}function _0x5b1c3a(){}function _0x4f25ff(_0x534e50){return _0x534e50['map'](_0x8047b=>String['fromCharCode'](_0x8047b))['join']('');}_0x3899bb(await _0x249049());}(this);}['destroy'](){const _0x207d58=this['editor']['plugins']['get'](o),_0x2b27ae=this['editor']['config']['get']('collaboration.channelId');for(const _0x3b54a1 of _0x207d58['getCommentThreads']({'channelId':_0x2b27ae}))_0x207d58['_detachCommentThread'](_0x3b54a1['id']),_0x207d58['_threads']['delete'](_0x3b54a1['id']);super['destroy']();}['hasMarkerForId'](_0x5c1750){return this['getAllMarkersForId'](_0x5c1750)['length']>0x0;}['getAllMarkersForId'](_0x4e241d){const _0x41ff7b=[];for(const _0x5828cc of this['editor']['model']['markers'])_0x5828cc['name']['startsWith']('comment:'+_0x4e241d)&&_0x41ff7b['push'](_0x5828cc);return _0x41ff7b;}['scrollToThreadMarker'](_0x46ab08){const _0x134a05=this['_getTargetForId'](_0x46ab08);_0x134a05&&setTimeout(()=>{this['activeMarker']&&er(this['activeMarker'])['id']===_0x46ab08&&rt({'target':_0x134a05[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x4a2e28){this['editor']['model']['change'](()=>{for(const _0xb3f7dd of this['getAllMarkersForId'](_0x4a2e28))this['editor']['editing']['reconvertMarker'](_0xb3f7dd);});}['_attachArchivedThread'](_0x5acf5b){const _0x3f6272=this['editor']['plugins']['get'](o),_0x5df2c5=this['editor']['plugins']['get'](P),_0x2d2a8f=_0x3f6272['getCommentThread'](_0x5acf5b);if(!_0x2d2a8f['isAttached']){const _0x534ef4=_0x2d2a8f['attachTo'](()=>this['_getTargetForId'](_0x2d2a8f['id']));_0x5df2c5['registerAnnotation'](_0x534ef4),_0x2d2a8f['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x5cec67=this['editor'],_0x1300b5=_0x5cec67['plugins']['get'](it);_0x5cec67['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x503a60,_0x5f2b1e)=>{const {id:_0x3f56c1}=er(_0x503a60['markerName']),_0x38efdb=_0x5cec67['plugins']['get'](o)['getCommentThread'](_0x3f56c1),_0x39fa80=this['activeMarker']&&er(this['activeMarker'])['id']===_0x3f56c1;let _0x2454c1;if(_0x38efdb&&_0x38efdb['isResolved']&&!_0x39fa80&&_0x503a60['item'])return _0x5f2b1e['consumable']['consume'](_0x503a60['item'],'addMarker:'+_0x503a60['markerName']),_0x5f2b1e['consumable']['consume'](_0x503a60['item'],'removeMarker:'+_0x503a60['markerName']),null;const _0xebf09a=['ck-comment-marker'];return _0x39fa80&&_0xebf09a['push']('ck-comment-marker--active'),_0x2454c1=_0x38efdb?.['length']?_0x38efdb['comments']['first']['author']['id']:_0x1300b5['me']['id'],{'classes':_0xebf09a,'attributes':{'data-comment':_0x3f56c1,'data-author-id':_0x2454c1}};}}),_0x5cec67['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x507476,{options:_0x528888})=>{if(_0x528888['showCommentHighlights'])return null;const _0x2fbb8d=_0x5cec67['plugins']['get'](o),_0xc9ed3f=_0x5cec67['model']['markers']['get'](_0x507476),{id:_0x3319a9,part:_0x24c0b0}=er(_0x507476);return _0xc9ed3f&&!_0xc9ed3f['affectsData']||_0x528888['ignoreResolvedComments']&&_0x2fbb8d['getCommentThread'](_0x3319a9)?.['isResolved']?null:{'group':'comment','name':_0x24c0b0?_0x3319a9+':'+_0x24c0b0:_0x3319a9};}}),_0x5cec67['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x10c091,{writer:_0x161286})=>_0x161286['createElement']('$marker',{'data-name':'comment:'+_0x10c091['getAttribute']('id')})}),_0x5cec67['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x3f5918=this['editor'],_0x2c5451=_0x3f5918['plugins']['get'](o),_0x159149=new Set(),_0x3b30c7=new Set();_0x3f5918['model']['document']['registerPostFixer'](_0x2ca148=>{let _0x24813=!0x1;for(const {name:_0x23d0e5,data:_0x4a1699}of _0x3f5918['model']['document']['differ']['getChangedMarkers']()){const {group:_0x48c6a6,id:_0x2a3ca5}=er(_0x23d0e5);let _0x489cc3=_0x4a1699['newRange'];if('comment'!==_0x48c6a6||!_0x489cc3)continue;const _0x31917e='$graveyard'===_0x489cc3['root']['rootName'];_0x31917e||(_0x489cc3=dt(_0x489cc3,_0x3f5918['model']),!_0x489cc3||_0x489cc3['isCollapsed']||!_0x4a1699['newRange']||_0x489cc3['isEqual'](_0x4a1699['newRange']))?_0x3f5918['model']['hasContent'](_0x489cc3)&&!_0x31917e?this['isThreadsLoadingPaused']?_0x159149['add'](_0x23d0e5):this['_handleThreadMarker'](_0x23d0e5,_0x2a3ca5):(_0x3b30c7['add'](_0x23d0e5),_0x159149['delete'](_0x23d0e5),_0x2ca148['removeMarker'](_0x23d0e5),_0x24813=!0x0):(_0x2ca148['updateMarker'](_0x23d0e5,{'range':_0x489cc3}),_0x24813=!0x0);}return _0x24813;}),this['on']('change:isThreadsLoadingPaused',(_0x43ce72,_0x4cf852,_0x23065a)=>{if(!_0x23065a&&_0x159149['size'])for(const _0x57f630 of _0x159149){const {id:_0x28102c}=er(_0x57f630);_0x159149['delete'](_0x57f630),_0x3f5918['model']['markers']['get'](_0x57f630)&&this['_handleThreadMarker'](_0x57f630,_0x28102c);}}),this['listenTo'](_0x3f5918['model']['document'],'change',()=>{for(const {name:_0x195010,data:{newRange:_0x520cdd}}of _0x3f5918['model']['document']['differ']['getChangedMarkers']()){const {group:_0x392adf,id:_0x1d1168}=er(_0x195010);if('comment'!==_0x392adf)continue;const _0x190062=_0x2c5451['getCommentThread'](_0x1d1168),_0x19fcee=this['hasMarkerForId'](_0x1d1168);_0x190062&&(!_0x190062['_hasTargetInContent']&&_0x520cdd&&_0x3f5918['editing']['view']['once']('render',()=>{const _0x2b42c5=_0x3f5918['plugins']['get'](O),_0x452f0e=_0x2c5451['_threadToController']['get'](_0x190062)['view'];_0x2b42c5['getByInnerView'](_0x452f0e)['refreshVisibility']();},{'priority':'low'}),_0x190062['_hasTargetInContent']=_0x19fcee||!!_0x520cdd),_0x520cdd||(_0x3b30c7['add'](_0x195010),_0x159149['delete'](_0x195010));}for(const _0x1b3762 of _0x3b30c7){const {id:_0x512b1b}=er(_0x1b3762),_0x59a64a=_0x2c5451['getCommentThread'](_0x512b1b);if(_0x159149['delete'](_0x1b3762),!_0x59a64a)continue;const _0x498a5e=this['hasMarkerForId'](_0x512b1b);_0x498a5e||_0x59a64a['isSubmitted']?_0x498a5e||_0x59a64a['unlinkedAt']||_0x59a64a['setUnlinkedAt'](new Date()):_0x59a64a['remove']();}_0x3b30c7['clear']();});}['_handleInitialThreads'](_0x14e231){_0x14e231['forEach'](_0x544aac=>{_0x544aac['unlinkedAt']&&this['_attachArchivedThread'](_0x544aac['id']);});}['_getTargetForId'](_0x5ee69f){const _0x1a6964=this['editor'],_0xdad605=this['getAllMarkersForId'](_0x5ee69f);return et(_0x1a6964['editing'],_0xdad605);}['_getTextContext'](_0x4d031f){const _0x488e5e=this['getAllMarkersForId'](_0x4d031f);let _0xdd3ebd='',_0x267ff2=!0x1;for(const _0x43dc21 of _0x488e5e){const _0x49d6dc=_0x43dc21['getRange']();for(const _0x5ecec1 of Array['from'](_0x49d6dc['getItems']()))_0x5ecec1['is']('$textProxy')?(_0xdd3ebd&&_0x267ff2&&(_0xdd3ebd+='\x20',_0x267ff2=!0x1),_0xdd3ebd+=_0x5ecec1['data']):_0x267ff2=!0x0;_0x267ff2=!0x0;}return _0xdd3ebd['substring'](0x0,0x96);}['_attachMarkerToThread'](_0xb71c86,_0x2127a9){const _0x1f2266=this['editor'],_0x1133da=_0x1f2266['plugins']['get'](o);let _0x253548=_0x1133da['getCommentThread'](_0x2127a9);const _0x4cfba0=_0x1f2266['config']['get']('collaboration.channelId'),_0xd766aa=_0x1f2266['plugins']['get'](P);if(_0x253548&&(_0x253548['unlinkedAt']&&_0x253548['setUnlinkedAt'](null),_0x253548['isAttached']))return _0x253548;return!this['getAllMarkersForId'](_0x2127a9)[0x0]['managedUsingOperations']?_0x1f2266['editing']['view']['once']('render',()=>{if(_0x1133da['getCommentThread'](_0x2127a9))return;const _0x47e0c2=_0x1f2266['plugins']['get'](O);_0x253548=_0x1133da['openNewCommentThread']({'channelId':_0x4cfba0,'threadId':_0x2127a9,'target':()=>this['_getTargetForId'](_0x2127a9),'context':{'type':'text','value':this['_getTextContext'](_0x2127a9)}});const _0x17670c=_0x1133da['_threadToController']['get'](_0x253548)['view'],_0x23fee2=_0x47e0c2['getByInnerView'](_0x17670c);_0x23fee2&&_0xd766aa['registerAnnotation'](_0x23fee2);},{'priority':'low'}):_0x1133da['fetchCommentThread']({'channelId':_0x4cfba0,'threadId':_0x2127a9})['then'](_0xa83591=>{if('destroyed'!==_0x1f2266['state']){if(_0x253548=_0xa83591,_0x253548&&!_0x253548['isAttached']){const _0x223d60=_0x253548['attachTo'](()=>this['_getTargetForId'](_0x2127a9));_0xd766aa['registerAnnotation'](_0x223d60),_0x253548['isResolved']&&this['_reconvertMarkers'](_0x2127a9);}else{if(!_0x253548){const _0x3f7a34=this['getAllMarkersForId'](_0x2127a9);_0x1f2266['model']['change'](_0x25ab01=>{for(const _0x3ec868 of _0x3f7a34)_0x25ab01['removeMarker'](_0x3ec868);});}}}}),_0x253548;}['_handleThreadMarker'](_0x450e5f,_0x365115){const _0x73d356=this['_attachMarkerToThread'](_0x450e5f,_0x365115);_0x73d356&&!_0x73d356['context']&&_0x73d356['setContext']({'type':'text','value':this['_getTextContext'](_0x365115)});}['_initAriaMarkerChangeAnnouncements'](){const _0x5cb440=this['editor'];ot(_0x5cb440['model'],({left:_0x4a9bc1,entered:_0x3fad92})=>{for(const _0x37cbda of _0x4a9bc1)if(mt(_0x37cbda)){_0x5cb440['ui']['ariaLiveAnnouncer']['announce'](E(_0x5cb440['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0xac9550 of _0x3fad92)if(mt(_0xac9550)){_0x5cb440['ui']['ariaLiveAnnouncer']['announce'](E(_0x5cb440['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x480ff9)));break;}});}}function ft(_0x2b0b14,_0x4dd321){return _0x4dd321?_0x2b0b14+':'+_0x4dd321:_0x2b0b14;}function er(_0x26e603){const _0x39322f=_0x26e603['split'](':');return{'group':_0x39322f[0x0],'id':_0x39322f[0x1],'part':_0x39322f[0x2]};}function dt(_0x397082,_0x362fdc){const _0x54e5ef=_0x362fdc['schema'],_0x34d417=_0x362fdc['createRange'](_0x397082['start']);for(const _0x18520f of _0x397082['getWalker']()){const {type:_0x275f4d,item:_0x5449a7,nextPosition:_0x125f13}=_0x18520f;if('text'===_0x275f4d||_0x54e5ef['isObject'](_0x5449a7)){const _0x305aef=_0x362fdc['createPositionBefore'](_0x5449a7);_0x34d417['isCollapsed']&&(_0x34d417['start']=_0x305aef),_0x34d417['end']=_0x125f13;}}return _0x34d417;}function mt(_0x13aaf6){return'comment'===er(_0x13aaf6['name'])['group'];}class i extends _0x119370{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,P,O];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x1d6cdf=this['editor'],_0x488c00=_0x1d6cdf['plugins']['get'](o),_0x18068e=_0x1d6cdf['plugins']['get'](r),_0xd76fc7=_0x1d6cdf['plugins']['get'](O),_0x2b7e24=_0x1d6cdf['plugins']['get'](P);_0x1d6cdf['ui']['componentFactory']['add']('comment',()=>{const _0x335436=this['_createUIButton'](_0x45b47a);return _0x335436['tooltip']=!0x0,_0x335436;}),_0x1d6cdf['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x3d3e75)),_0x2b7e24['addSourceCollector'](()=>{const _0x1c5ad6=[];for(const [_0x52ce26,_0x40bca8]of _0x488c00['_threadToController']){const _0x167c5b=_0x18068e['getAllMarkersForId'](_0x52ce26['id']),_0x26f66a=_0x167c5b['map'](_0x124adf=>_0x124adf['getRange']());_0x167c5b['length']>0x0&&_0x1c5ad6['push']([_0x40bca8['view'],_0x26f66a]);}return _0x1c5ad6;}),this['listenTo'](_0xd76fc7,'change:activeAnnotations',(_0x37d91d,_0x32c4da,_0x5b7a12)=>{const _0x99031a=Array['from'](_0x5b7a12)['map'](_0x2ea1b5=>_0x2ea1b5['innerView'])['find'](_0x5eb3e4=>_0x488c00['_viewToController']['has'](_0x5eb3e4));if(!_0x99031a)return void(_0x18068e['activeMarker']=null);const _0x498788=_0x488c00['_viewToController']['get'](_0x99031a)['model']['id'],_0x527eda='comment:'+_0x498788;_0x498788&&_0x18068e['hasMarkerForId'](_0x498788)?_0x18068e['activeMarker']=_0x527eda:_0x18068e['activeMarker']&&(_0x18068e['activeMarker']=null);}),this['listenTo'](_0x488c00,'removeCommentThread',(_0x34f126,{threadId:_0x5421ae,isFromAdapter:_0x4a18d8})=>{!_0x4a18d8&&_0x1d6cdf['ui']['focusTracker']['isFocused']&&_0x18068e['hasMarkerForId'](_0x5421ae)&&_0x1d6cdf['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x488c00,'addComment',(_0x1eb807,{threadId:_0x51b69d,isFromAdapter:_0x40970d})=>{if(_0x40970d||!_0x18068e['hasMarkerForId'](_0x51b69d)||!_0x488c00['hasCommentThread'](_0x51b69d))return;0x1===_0x488c00['getCommentThread'](_0x51b69d)['length']&&(_0x1d6cdf['editing']['view']['focus'](),_0x1eb807['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x100bc1=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x5b113f;for(const _0x2fccfe in _0x100bc1){const _0x4aee38=_0x2fccfe,_0x3810e6=_0x100bc1[_0x4aee38];if('commentsLicenseKeyValid'==_0x3810e6||'commentsLicenseKeyInvalid'==_0x3810e6||'commentsLicenseKeyExpired'==_0x3810e6||'commentsLicenseKeyDomainLimit'==_0x3810e6||'commentsLicenseKeyNotAllowed'==_0x3810e6||'commentsLicenseKeyEvaluationLimit'==_0x3810e6||'commentsLicenseKeyTrialLimit'==_0x3810e6||'commentsLicenseKeyUsageLimit'==_0x3810e6){delete _0x100bc1[_0x4aee38],_0x5b113f=_0x3810e6,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x5b113f&&_0x100bc1['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x5b113f&&_0x100bc1['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x5b113f&&_0x100bc1['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x5b113f&&_0x100bc1['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x5b113f&&_0x100bc1['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x5b113f&&_0x100bc1['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x5b113f&&_0x100bc1['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x98b45d){const _0x43a1ca=this['editor'],_0x34efd9=new _0x98b45d(_0x43a1ca['locale']),_0x7b1e12=_0x43a1ca['commands']['get']('addCommentThread');return _0x34efd9['set']({'label':E(_0x43a1ca['locale'],'Comment'),'icon':_0x286001}),_0x34efd9['bind']('isEnabled')['to'](_0x7b1e12),this['listenTo'](_0x34efd9,'execute',()=>{_0x7b1e12['execute']();}),_0x34efd9;}}class s extends _0x119370{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x3b3849){super(_0x3b3849),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x30c593,_0x78610d,_0x5318ee)=>{_0x5318ee?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x40a865,_0x411e10]of this['editor']['commands'])_0x411e10['affectsData']&&'addCommentThread'!==_0x40a865&&_0x411e10['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x21487a=this['editor']['editing']['view']['document'];this['listenTo'](_0x21487a,'cut',_0x10e648=>_0x10e648['stop'](),{'priority':'highest'}),this['listenTo'](_0x21487a,'clipboardInput',_0xa224bd=>_0xa224bd['stop'](),{'priority':'highest'}),this['listenTo'](_0x21487a,'delete',_0x1cf0fc=>_0x1cf0fc['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x5129c5,_0x96ee62]of this['editor']['commands'])_0x96ee62['affectsData']&&'addCommentThread'!==_0x5129c5&&_0x96ee62['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class M extends _0x154e47{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[O];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x52e81b){super(_0x52e81b),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x568212=this['context']['plugins']['get'](O);this['listenTo'](_0x568212,'_activateAnnotation',(_0x23d6a6,_0x2315d7)=>{for(const _0x237132 of this['activeUIs']){const _0x1f7bf1=this['_uis']['get'](_0x237132);(0x0,this['uisData']['get'](_0x237132)['filter'])(_0x2315d7)&&_0x1f7bf1['setActiveAnnotation'](_0x2315d7);}}),this['listenTo'](_0x568212,'_deactivateAllAnnotations',()=>{for(const _0x276b68 of this['activeUIs']){this['_uis']['get'](_0x276b68)['setActiveAnnotation'](null);}}),this['listenTo'](_0x568212['_visibleAnnotations'],'add',(_0x2a29d4,_0x3f1093)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3f1093);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x3f519d){return this['activeUIs']['has'](_0x3f519d);}['activate'](_0x37cb5b,_0x50001d=this['defaultFilter']){const _0x2e93e3=this['context']['plugins']['get'](O);if(!this['_uis']['has'](_0x37cb5b))throw new _0x202340('annotationsuis-missing-ui',this,{'uiName':_0x37cb5b});this['isActive'](_0x37cb5b)&&this['deactivate'](_0x37cb5b),this['activeUIs']['add'](_0x37cb5b);const _0x3622b2=new _();!function({source:_0x79e88b,target:_0x11f83c,filter:_0x319e00}){for(const _0x5dc071 of _0x79e88b)_0x319e00(_0x5dc071)&&_0x11f83c['add'](_0x5dc071);_0x11f83c['listenTo'](_0x79e88b,'add',(_0x22f225,_0x127bdb)=>{_0x319e00(_0x127bdb)&&_0x11f83c['add'](_0x127bdb);}),_0x11f83c['listenTo'](_0x79e88b,'remove',(_0x41f0cf,_0x1827a4)=>{_0x11f83c['has'](_0x1827a4)&&_0x11f83c['remove'](_0x1827a4);});}({'source':_0x2e93e3['_visibleAnnotations'],'target':_0x3622b2,'filter':_0x50001d}),this['uisData']['set'](_0x37cb5b,{'collection':_0x3622b2,'filter':_0x50001d});const _0x31297d=this['_uis']['get'](_0x37cb5b);_0x31297d['attach'](_0x3622b2),this['listenTo'](_0x31297d,'change:activeAnnotation',(_0x312c28,_0x2df4cd,_0x26ea56,_0x7bd0eb)=>{_0x7bd0eb&&_0x2e93e3['_removeActiveAnnotation'](_0x7bd0eb),_0x26ea56&&_0x2e93e3['_addActiveAnnotation'](_0x26ea56);});}['deactivate'](_0x2018ea){if(this['activeUIs']['delete'](_0x2018ea),!this['_uis']['has'](_0x2018ea))throw new _0x202340('annotationsuis-missing-ui',this,{'uiName':_0x2018ea});const _0x3d0412=this['_uis']['get'](_0x2018ea);_0x3d0412['detach'](),this['stopListening'](_0x3d0412),this['uisData']['get'](_0x2018ea)['collection']['destroy'](),this['uisData']['delete'](_0x2018ea);}['switchTo'](_0x26381d){if(!this['_uis']['has'](_0x26381d))throw new _0x202340('annotationsuis-missing-ui',this,{'uiName':_0x26381d});const _0x5e9d7d=this['context']['plugins']['get'](O),_0x4693a8=Array['from'](_0x5e9d7d['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x26381d);const _0x279a12=this['_uis']['get'](_0x26381d);_0x279a12['setActiveAnnotation'](_0x4693a8),_0x279a12['_setSelectedAnnotations']&&_0x4693a8&&_0x279a12['_setSelectedAnnotations']([_0x4693a8]);}['deactivateAll'](){for(const _0x54c294 of this['activeUIs'])this['deactivate'](_0x54c294);}['register'](_0xabdae2,_0x2d1d6b){if(this['_uis']['has'](_0xabdae2))throw new _0x202340('annotationsuis-register-already-registered');if('function'!=typeof _0x2d1d6b['attach']||'function'!=typeof _0x2d1d6b['detach']||'function'!=typeof _0x2d1d6b['setActiveAnnotation'])throw new _0x202340('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0xabdae2,_0x2d1d6b);}['refilterAnnotations'](){const _0x5b9440=this['context']['plugins']['get'](O)['collection'],_0x1d08d5=new Map(),_0x12ca79=Array['from'](this['activeUIs']);for(const _0x2df698 of this['activeUIs']){const _0x244984=this['uisData']['get'](_0x2df698)['collection'];for(const _0x2a2a33 of _0x244984)_0x1d08d5['set'](_0x2a2a33,_0x2df698);}for(const _0x2f1343 of _0x5b9440){const _0x534007=_0x1d08d5['get'](_0x2f1343);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2f1343);const _0x5169a8=_0x12ca79['find'](_0x5a8841=>this['uisData']['get'](_0x5a8841)['filter'](_0x2f1343));_0x534007!==_0x5169a8&&(_0x534007&&this['uisData']['get'](_0x534007)['collection']['remove'](_0x2f1343),_0x5169a8&&this['uisData']['get'](_0x5169a8)['collection']['add'](_0x2f1343));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x142575){const _0x2e0c5f=[];for(const _0x40fbfb of this['activeUIs']){(0x0,this['uisData']['get'](_0x40fbfb)['filter'])(_0x142575)&&_0x2e0c5f['push'](_0x40fbfb);}if(_0x2e0c5f['length']>0x1)throw new _0x202340('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x2e0c5f,'annotationType':_0x142575['type']});}}const pi=xt('px');class F extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x29896a){super(_0x29896a);const _0x8141e1=this['bindTemplate'];this['set']('minHeight',0x0),this['set']('class',''),this['list']=this['createCollection'](),this['focusables']=this['createCollection'](),this['list']['delegate']('arrowup','arrowdown')['to'](this),this['focusTracker']=new _0x4e3bb4(),this['focusCycler']=new _0x591c72({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x8141e1['to']('class')],'style':{'minHeight':_0x8141e1['to']('minHeight',_0x3d914c=>'number'==typeof _0x3d914c?pi(_0x3d914c+0xa):null)},'dir':_0x29896a['uiLanguageDirection'],'role':'application','aria-label':E(_0x29896a,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':E(_0x29896a,'Annotations\x20list')},'children':this['list']}]});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['focus'](){this['focusCycler']['focusFirst']();}['_setupKeyboardNavigation'](){this['list']['delegate']('change:top')['to'](this),this['on']('change:top',_0x4d0990=>{this['_updateItemPositionInFocusables'](_0x4d0990['source']);}),this['list']['forEach'](_0x23b079=>{this['focusTracker']['add'](_0x23b079['element']),this['_updateItemPositionInFocusables'](_0x23b079);}),this['list']['on']('change',(_0x2d63f6,_0x18d066)=>{for(const _0x9e19cc of _0x18d066['removed'])this['focusTracker']['remove'](_0x9e19cc['element']),this['focusables']['remove'](_0x9e19cc);for(const _0x265556 of _0x18d066['added'])this['focusTracker']['add'](_0x265556['element']),this['_updateItemPositionInFocusables'](_0x265556);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x2dff03){const _0x3a4b49=this['focusables']['getIndex'](_0x2dff03);let _0x284f07,_0x200770;for(const _0x22c517 of this['focusables'])if(_0x2dff03['top']<_0x22c517['top']){_0x284f07=_0x22c517;break;}if(_0x200770=_0x284f07?this['focusables']['getIndex'](_0x284f07):this['focusables']['length'],-0x1!==_0x3a4b49){if(_0x3a4b49===_0x200770-0x1)return;this['focusables']['remove'](_0x2dff03),_0x200770=_0x284f07?this['focusables']['getIndex'](_0x284f07):this['focusables']['length'];}this['focusables']['add'](_0x2dff03,_0x200770);}}const Ht=xt('px');class H extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x37cfe1){super(_0x37cfe1),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x5dfb9d,_0xeb79ef)=>_0x5dfb9d+_0xeb79ef),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Lt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x312615=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x312615['to']('isAnimationDisabled',_0x4675c1=>_0x4675c1?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x312615['to']('top',_0x3f9946=>Ht(_0x3f9946))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x4c5e9b=this['element']['clientHeight'];_0x4c5e9b&&(this['height']=_0x4c5e9b);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x154e47{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1154ef){super(_0x1154ef),this['set']('_lastItem',void 0x0),this['view']=this['_createSidebarView'](),this['set']('container',null),this['_spaceBetweenItems']=0x19,this['_sidebarItemViewToAnnotation']=new Map(),this['_annotationToSidebarItemView']=new Map(),this['context']['config']['define']('sidebar.preventScrollOutOfView',!0x1),this['_annotations']=null,this['_activeAnnotation']=null,this['_recalculateBuffer']=[];}['init'](){const _0x2bba96=this['context']['config']['get']('sidebar.container');_0x2bba96&&this['setContainer'](_0x2bba96);}['setContainer'](_0xe3f397){if(!y(_0xe3f397))throw new _0x202340('sidebar-setcontainer-invalid-element');this['container']=_0xe3f397;}['_attachToContainer']({viewClass:_0x1a1ed='',spaceBetweenItems:_0x134643=0x19}={}){if(!y(this['container']))throw new _0x202340('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x1a1ed,this['_spaceBetweenItems']=_0x134643;}['rearrange']({removedAnnotation:_0x178605,previousAnnotation:_0x9055e0,nextAnnotation:_0x50db83}){const _0x58328d=this['getSidebarItemView'](_0x178605);this['view']['list']['remove'](_0x58328d),this['_destroySidebarItemView'](_0x178605),_0x9055e0&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x9055e0)),_0x50db83&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x50db83)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x3bb1aa,activatedAnnotation:_0x278019,disableAnimationOnActivatedAnnotation:_0x46dba1}){if(this['_activeAnnotation']=_0x278019,_0x3bb1aa){_0x3bb1aa['isActive']=!0x1;const _0x78eb3f=this['getSidebarItemView'](_0x3bb1aa);_0x78eb3f&&_0x46dba1&&(_0x78eb3f['isAnimationDisabled']=!0x1);}if(_0x278019){const _0x3e3097=this['getSidebarItemView'](_0x278019);_0x3e3097&&(_0x278019['isActive']=!0x0,_0x46dba1&&(_0x3e3097['isAnimationDisabled']=!0x0,_0x3e3097['top']+=0x1),this['_alignToTargetRect'](_0x3e3097));}}['_detachFromContainer'](_0x1253d6){if(this['view']['element']['remove'](),_0x1253d6){for(const _0x3f9f7c of _0x1253d6)this['_destroySidebarItemView'](_0x3f9f7c);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x41daba,_0xbbfb7b){_0xbbfb7b||(_0xbbfb7b=_0x41daba['view']);const _0x8f601e=new H(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x8f601e,_0x41daba),this['_annotationToSidebarItemView']['set'](_0x41daba,_0x8f601e),_0x8f601e['content']['add'](_0xbbfb7b),this['listenTo'](_0x41daba['view'],'change:targetRect',(_0x39fd8d,_0x5e8fef,_0x1767f)=>{const _0xb06ddb=this['_getTargetTop'](_0x41daba,_0x1767f);_0x8f601e['_targetTop']!=_0xb06ddb&&(_0x8f601e['_targetTop']=_0xb06ddb,this['_setItemTop'](_0x8f601e,_0xb06ddb));}),this['listenTo'](_0x8f601e,'change:top',()=>{this['_recalculate'](_0x8f601e,'top');}),this['listenTo'](_0x8f601e,'change:bottom',()=>{this['_recalculate'](_0x8f601e,'bottom');}),this['_alignToTargetRect'](_0x8f601e);const _0x1e2c90=this['_getItemBefore'](_0x8f601e);if(_0x1e2c90)this['_alignAfterItem'](_0x1e2c90,_0x8f601e)||this['_alignToTargetRect'](_0x8f601e);else this['_alignToTargetRect'](_0x8f601e);return this['_updateLastItem'](),this['view']['list']['add'](_0x8f601e),_0x8f601e;}['_alignForTopChange'](_0x1e5300){if(!_0x1e5300['content']['length'])return;const _0xb5b3ec=this['_getItemBefore'](_0x1e5300);if(!_0xb5b3ec)return;const _0x254358=this['_sidebarItemViewToAnnotation']['get'](_0xb5b3ec),_0x3a22bf=this['_activeAnnotation'];_0x3a22bf&&_0x3a22bf===_0x254358?this['_alignAfterItem'](_0xb5b3ec,_0x1e5300):this['_alignBeforeItem'](_0x1e5300,_0xb5b3ec);}['_alignForBottomChange'](_0x359ea8){if(!_0x359ea8['content']['length'])return;const _0x4b3178=this['_getItemAfter'](_0x359ea8);if(!_0x4b3178)return;const _0x4d2d94=this['_sidebarItemViewToAnnotation']['get'](_0x4b3178),_0x11d075=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x5598e5=this['_activeAnnotation'];_0x5598e5&&_0x5598e5===_0x4d2d94&&_0x11d075?(this['_alignBeforeItem'](_0x4b3178,_0x359ea8),this['_alignAfterItem'](_0x359ea8,_0x4b3178)):_0x5598e5&&_0x5598e5===_0x4d2d94?this['_alignBeforeItem'](_0x4b3178,_0x359ea8):this['_alignAfterItem'](_0x359ea8,_0x4b3178);}['_recalculate'](_0x147ce7,_0x4116a6){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x29529d,changedProp:_0x1f7544}of this['_recalculateBuffer'])'top'===_0x1f7544?this['_alignForTopChange'](_0x29529d):this['_alignForBottomChange'](_0x29529d);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x147ce7,'changedProp':_0x4116a6});}['getSidebarItemView'](_0x2ab10c){return this['_annotationToSidebarItemView']['get'](_0x2ab10c);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x537342){const _0x14445b=this['getSidebarItemView'](_0x537342);this['stopListening'](_0x14445b),this['stopListening'](_0x537342['view']),_0x14445b['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x537342),this['_sidebarItemViewToAnnotation']['delete'](_0x14445b);}['_createSidebarView'](){const _0x32ace5=new F(this['context']['locale']);return _0x32ace5['render'](),this['on']('change:_lastItem',(_0x4aaa66,_0x5769d6,_0x32b63f,_0x153535)=>{_0x153535&&_0x32ace5['unbind']('minHeight'),_0x32b63f?_0x32ace5['bind']('minHeight')['to'](_0x32b63f,'bottom'):_0x32ace5['minHeight']=null;}),_0x32ace5;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x28ec72){const _0x5bcd3d=this['_sidebarItemViewToAnnotation']['get'](_0x28ec72),_0x1668d7=_0x5bcd3d&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x5bcd3d)-0x1);return _0x1668d7&&this['getSidebarItemView'](_0x1668d7)||null;}['_getItemAfter'](_0x16d6b2){const _0x11b016=this['_sidebarItemViewToAnnotation']['get'](_0x16d6b2),_0x15a144=_0x11b016&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x11b016)+0x1);return _0x15a144&&this['getSidebarItemView'](_0x15a144)||null;}['_alignBeforeItem'](_0xd3bb9b,_0x99df19){_0xd3bb9b['updateHeight']();const _0x35f5e4=R(_0x99df19['bottom']+this['_spaceBetweenItems'],_0xd3bb9b['top']);return!!_0x35f5e4&&(this['_setItemTop'](_0x99df19,_0x99df19['top']-_0x35f5e4),!0x0);}['_alignAfterItem'](_0x1b41c4,_0x5c41ed){_0x1b41c4['updateHeight']();const _0x233502=R(_0x1b41c4['bottom']+this['_spaceBetweenItems'],_0x5c41ed['top']);return!!_0x233502&&(this['_setItemTop'](_0x5c41ed,_0x5c41ed['top']+_0x233502,!0x1),!0x0);}['_alignToTargetRect'](_0x366fdb){const _0x824da3=this['_sidebarItemViewToAnnotation']['get'](_0x366fdb);if(!_0x824da3||!_0x824da3['target']||!_0x824da3['targetRect'])return;const _0xa8b1c=this['_getTargetTop'](_0x824da3,_0x824da3['targetRect']);this['_setItemTop'](_0x366fdb,_0xa8b1c);}['_getTargetTop'](_0x147094,_0x1f2972){if(null===_0x1f2972)return 0x0;if(_0x147094['target']instanceof _0x543406)return _0x1f2972['top'];{const _0xdb762a=new _0x543406(this['view']['element'])['top'];return _0x1f2972['top']-_0xdb762a;}}['_setItemTop'](_0x353a5c,_0x531651,_0x1babb4=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x1babb4&&(_0x531651=Math['max'](_0x531651,this['_getMaxAvailableTop'](_0x353a5c))),_0x353a5c['top']=_0x531651;}['_getMaxAvailableTop'](_0x3282e6){let _0x278a28=this['_getItemBefore'](_0x3282e6),_0x2a361e=0x0;for(;_0x278a28;)_0x278a28['updateHeight'](),_0x2a361e+=this['_spaceBetweenItems']+_0x278a28['height'],_0x278a28=this['_getItemBefore'](_0x278a28);return _0x2a361e;}}function R(_0x19a1b8,_0x3612f){return Math['max'](_0x19a1b8-_0x3612f,0x0);}function y(_0x330078){return null!==_0x330078&&'object'==typeof _0x330078&&0x1===_0x330078['nodeType'];}class e extends _0x154e47{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5a1f0e){super(_0x5a1f0e),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x2cece5(),this['_refreshPositioningDebounced']=_0x569f83(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x41be42=this['context']['plugins']['get'](M),_0x5abcd2=this['context']['plugins']['get'](z);_0x41be42['register']('wideSidebar',this),_0x5abcd2['container']&&_0x41be42['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x2f6bd5){if(_0x2f6bd5===this['activeAnnotation'])return;const _0x244948=this['context']['plugins']['get'](z);_0x244948['_activeAnnotation']=_0x2f6bd5;const _0x2edcdd=this['activeAnnotation'];_0x244948['refresh']({'blurredAnnotation':_0x2edcdd,'activatedAnnotation':_0x2f6bd5}),this['activeAnnotation']=_0x2f6bd5;}['attach'](_0x2e9c38){this['annotations']=_0x2e9c38;const _0x54f6b8=this['context']['plugins']['get'](z);if(_0x54f6b8['_annotations']=_0x2e9c38,this['isAttached'])throw new _0x202340('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x54f6b8,'set:container',()=>{this['detach'](),this['listenTo'](_0x54f6b8,'change:container',_0x59615c=>{_0x59615c['off'](),this['attach'](_0x2e9c38);});}),_0x54f6b8['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x480dd5=_0x2dedf8=>{_0x2dedf8['updateTargetRect'](),_0x54f6b8['addAnnotation'](_0x2dedf8);};for(const _0x32f0ff of _0x2e9c38)_0x480dd5(_0x32f0ff);this['listenTo'](_0x2e9c38,'add',(_0x39b928,_0x3d83ea)=>{_0x480dd5(_0x3d83ea);}),this['listenTo'](_0x2e9c38,'remove',(_0x53ba75,_0x1e13a4,_0x23ee9e)=>{_0x54f6b8['rearrange']({'removedAnnotation':_0x1e13a4,'previousAnnotation':_0x2e9c38['get'](_0x23ee9e-0x1),'nextAnnotation':_0x2e9c38['get'](_0x23ee9e+0x1)}),_0x1e13a4===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x2e9c38,'focus',(_0x367a13,_0x333aa5)=>{this['setActiveAnnotation'](_0x333aa5);}),this['listenTo'](_0x2e9c38,'blur',()=>{this['setActiveAnnotation'](null);});const _0x5dff93=this['context']instanceof _0x2e6587?this['context']['editors']:new _0x2cece5([this['context']]);for(const _0x5d9018 of _0x5dff93)this['_integrateWithEditorAnnotations'](_0x5d9018);this['listenTo'](_0x5dff93,'add',(_0x12979a,_0x48df8b)=>{this['listenTo'](_0x48df8b,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x48df8b);});}),this['listenTo'](_0x5dff93,'remove',(_0x2ec856,_0x33dbda)=>{_0x33dbda['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x33dbda['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x202340('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x577623=this['context']['plugins']['get'](z);_0x577623['_detachFromContainer'](this['annotations']),this['stopListening'](_0x577623),this['stopListening'](this['annotations']),this['context']instanceof _0x2e6587&&this['stopListening'](this['context']['editors']);for(const _0x508d24 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x508d24);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x1d16ab){if(!_0x1d16ab['plugins']['has']('EditorAnnotations'))return;const _0x3265d5=_0x1d16ab['plugins']['get']('EditorAnnotations'),_0x403dc3=()=>{const _0x506709=_0x3265d5['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x506709[0x0]||null);};this['listenTo'](_0x3265d5,'refresh',_0x403dc3),this['listenTo'](_0x3265d5,'blur',(_0x4e59ca,{isAnnotationTracked:_0x39454a})=>{this['activeAnnotation']&&_0x39454a(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x3265d5,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x390d30=>{_0x3265d5['hasDomSelection']()&&(_0x403dc3(),_0x390d30['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x3265d5);}['_destroyEditorAnnotationsIntegration'](_0x3daca8){this['stopListening'](_0x3daca8),this['_editorAnnotations']['remove'](_0x3daca8);}}class C extends _0x45b47a{['counterView'];constructor(_0x201e57){super(_0x201e57);const _0x599875=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x14cffa,_0x161be9)=>_0x14cffa?'...':_0x161be9['toString']()),this['set']('annotationType',''),this['icon']=_0x286001,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x599875['to']('annotationType',_0x12784d=>'ck-annotation-counter__badge--'+_0x12784d),_0x599875['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x599875['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x154e47{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x31bad3){super(_0x31bad3),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x3f2877),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x2cece5(),this['_refreshPositioningDebounced']=_0x569f83(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x170ade(this['context']['locale']),this['balloonPanelView']=new _0x3d40f4(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x1aa30c){this['annotations']=_0x1aa30c;const _0x449268=this['context']['plugins']['get'](z),_0xe6b3b0=this['balloonPanelView'];if(_0x449268['_annotations']=_0x1aa30c,this['isAttached'])throw new _0x202340('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x449268,'set:container',()=>{this['detach'](),this['listenTo'](_0x449268,'change:container',_0x29daea=>{_0x29daea['off'](),this['attach'](_0x1aa30c);});}),_0x449268['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x21b87f=_0x2f5653=>{const _0x1461c8=new C(this['context']['locale']);_0x449268['addAnnotation'](_0x2f5653,_0x1461c8),this['_annotationToNarrowView']['set'](_0x2f5653,_0x1461c8),_0x1461c8['bind']('isDirty','annotationType','number')['to'](_0x2f5653['view'],'isDirty','type','length'),_0x1461c8['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0xe6b3b0['content']['first']!==_0x2f5653['view']?(this['_showBalloon'](_0x2f5653),_0x2f5653['view']['element']['focus'](),this['setActiveAnnotation'](_0x2f5653)):this['setActiveAnnotation'](null);});};for(const _0x4cb165 of _0x1aa30c)_0x21b87f(_0x4cb165);this['listenTo'](_0x1aa30c,'add',(_0x140c5a,_0x1d65e6)=>{_0x21b87f(_0x1d65e6);}),this['listenTo'](_0x1aa30c,'remove',(_0x2a0b00,_0x236ce6,_0x37bd26)=>{this['_annotationToNarrowView']['get'](_0x236ce6)['destroy'](),this['_annotationToNarrowView']['delete'](_0x236ce6),_0x449268['rearrange']({'removedAnnotation':_0x236ce6,'previousAnnotation':_0x1aa30c['get'](_0x37bd26-0x1),'nextAnnotation':_0x1aa30c['get'](_0x37bd26+0x1)}),_0x236ce6===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x1aa30c,'focus',(_0x5d17d9,_0x54266d)=>{this['setActiveAnnotation'](_0x54266d);}),this['listenTo'](_0x1aa30c,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x1ab4b4,_0xf05c4)=>{_0xf05c4['keyCode']===_0x579ced['esc']&&_0xe6b3b0['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0xe6b3b0['content']['first']),this['_hideBalloon'](),_0xf05c4['stopPropagation'](),_0xf05c4['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x1011b6,_0x7eb20e)=>{const _0x2dda65=_0x7eb20e['target'];_0xe6b3b0['isVisible']&&_0xe6b3b0['element']['contains'](_0x2dda65)||_0x449268['view']['element']['contains'](_0x2dda65)||_0x1011b6['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x2bd31d=>_0x2bd31d['contains'](_0x2dda65))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x50a633=this['context']instanceof _0x2e6587?this['context']['editors']:new _0x2cece5([this['context']]);for(const _0x1f28db of _0x50a633)this['_integrateWithEditorAnnotations'](_0x1f28db);this['listenTo'](_0x50a633,'add',(_0x166d55,_0x58bf39)=>{this['listenTo'](_0x58bf39,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x58bf39);});}),this['listenTo'](_0x50a633,'remove',(_0x2674b9,_0x50b967)=>{_0x50b967['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x50b967['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x3071fb){if(_0x3071fb===this['activeAnnotation'])return;const _0x137876=this['context']['plugins']['get'](z);if(_0x137876['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x3071fb,'disableAnimationOnActivatedAnnotation':!0x0}),_0x3071fb)_0x137876['getSidebarItemView'](_0x3071fb)?this['_showBalloon'](_0x3071fb):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x3071fb;}['detach'](){if(!this['isAttached'])throw new _0x202340('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x2b2957=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x2e9998=>_0x2e9998['destroy']()),this['_annotationToNarrowView']['clear'](),_0x2b2957['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x2e6587&&this['stopListening'](this['context']['editors']);for(const _0x2fe70a of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x2fe70a);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['_selectedAnnotations']=[],this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['bodyCollection']['detachFromDom']();}['_integrateWithEditorAnnotations'](_0x7a16b){if(!_0x7a16b['plugins']['has']('EditorAnnotations'))return;const _0x376c13=_0x7a16b['plugins']['get']('EditorAnnotations'),_0x5dfa84=this['context']['plugins']['get'](z),_0x236a3f=this['annotations'],_0xfc88c1=this['balloonPanelView'],_0x5903c5=()=>{const _0x332348=_0x376c13['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x332348),this['setActiveAnnotation'](_0x332348[0x0]||null);};this['listenTo'](_0x376c13,'refresh',_0x5903c5),this['listenTo'](_0x376c13,'blur',(_0x27c382,{isAnnotationTracked:_0x120f5a})=>{this['activeAnnotation']&&_0x120f5a(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x376c13,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x236a3f,'blur',_0x161278=>{_0x376c13['hasDomSelection']()&&_0x161278['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x29d2fa,_0x3300c9)=>{const _0xe901d4=_0x3300c9['target'];_0xfc88c1['isVisible']&&_0xfc88c1['element']['contains'](_0xe901d4)||_0x5dfa84['view']['element']['contains'](_0xe901d4)||this['activeAnnotation']&&_0x376c13['hasDomSelection']()&&(_0x5903c5(),_0x29d2fa['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x376c13);}['_destroyEditorAnnotationsIntegration'](_0x18bd0f){_0x18bd0f&&(this['stopListening'](_0x18bd0f),this['_editorAnnotations']['remove'](_0x18bd0f));}['_setSelectedAnnotations'](_0x56b37f){for(const _0x45d6e0 of this['_selectedAnnotations'])_0x56b37f['includes'](_0x45d6e0)||this['_manuallyClosedAnnotationViews']['delete'](_0x45d6e0['view']);this['_selectedAnnotations']=_0x56b37f;}['_refreshPositioning'](){const _0x19d575=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x19d575['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x13c63c){if(this['_manuallyClosedAnnotationViews']['has'](_0x13c63c['view']))return;const _0x1d55b4=this['balloonPanelView']['content']['first'];_0x1d55b4!==_0x13c63c['view']?(_0x1d55b4&&this['_detachListeners'](_0x1d55b4),this['_attachListeners'](_0x13c63c['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x13c63c['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x3431ee=this['balloonPanelView']['content']['first'],_0x32a548=_0x3431ee&&this['annotations']['getByView'](_0x3431ee);if(!_0x32a548||!this['_annotationToNarrowView']['has'](_0x32a548))return;const _0x3fcc33=this['_annotationToNarrowView']['get'](_0x32a548)['element'],_0xa4cc93=(function(){const _0x9b427b=_0x3d40f4['defaultPositions'];return[_0x9b427b['southArrowNorthEast'],_0x9b427b['northArrowSouthEast'],_0x9b427b['southArrowNorth'],_0x9b427b['northArrowSouth'],_0x9b427b['southArrowNorthWest'],_0x9b427b['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x3fcc33,'positions':_0xa4cc93});}['_hideBalloon'](){const _0x46861e=this['balloonPanelView'],_0x1ca398=_0x46861e['content']['first'];_0x1ca398&&(this['_detachListeners'](_0x1ca398),_0x46861e['unpin'](),_0x46861e['content']['clear']());}['_attachListeners'](_0x429298){this['listenTo'](_0x429298,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x429298,'Esc',(_0x131290,_0x4d7049)=>{this['_manuallyClosedAnnotationViews']['add'](_0x429298),this['_hideBalloon'](),_0x4d7049();});}['_detachListeners'](_0x18d3dd){this['stopListening'](_0x18d3dd);}}class c extends _0x119370{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x337f8d,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4608c1){super(_0x4608c1),_0x4608c1['editing']['view']['addObserver'](_0xc369e3),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x4608c1['plugins']['get'](_0x337f8d),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x3e97cb=this['editor']['plugins']['get'](M);_0x3e97cb['context']===this['editor']&&(_0x3e97cb['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x468d2c,_0x1d0165)=>{const _0x73816=this['_balloon'];if(this['isAttached']&&_0x73816['visibleView']){const _0x1c7edc=this['annotations']['getByView'](_0x73816['visibleView']);_0x1c7edc&&this['_closeAnnotation'](_0x1c7edc),_0x1d0165();}}));}['afterInit'](){const _0xad65ab=this['editor']['plugins']['get'](M);_0xad65ab['context']===this['editor']&&(_0xad65ab['hasActive']()||_0xad65ab['switchTo']('inline'));}['setActiveAnnotation'](_0x499f9c){_0x499f9c!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x499f9c&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x499f9c)&&this['_addAnnotationToBalloon'](_0x499f9c,!0x0),_0x499f9c['isActive']=!0x0),_0x499f9c||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x499f9c);}['attach'](_0x3e89ac){this['annotations']=_0x3e89ac;const _0xc0f7c7=this['editor']['plugins']['get'](M),_0x3c0e94=this['_balloon'];if(this['isAttached'])throw new _0x202340('inlineannotations-attach-already-attached',this);if(_0xc0f7c7['context']!==this['editor'])throw new _0x202340('inlineannotations-not-allowed-with-context',this);const _0x5927f6=this['editor']['plugins']['get'](P);this['listenTo'](_0x5927f6,'refresh',()=>{const _0x532b61=_0x5927f6['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x3207cd,_0xb2da15;!this['_forceRefresh']&&(_0x3207cd=_0x532b61,_0xb2da15=this['_selectedAnnotations'],_0x3207cd['length']===_0xb2da15['length']&&_0x3207cd['every'](_0x590da0=>_0xb2da15['includes'](_0x590da0)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x532b61),this['setActiveAnnotation'](_0x532b61[0x0]||null));}),this['listenTo'](_0x5927f6,'blur',(_0x238af5,{isAnnotationTracked:_0x4fa2cf})=>{this['activeAnnotation']&&_0x4fa2cf(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x2bed91,_0x4044da,_0x10a1c4)=>{_0x10a1c4||this['setActiveAnnotation'](null);}),this['listenTo'](_0x3e89ac,'remove',(_0x5a3d02,_0xe85cb6)=>{this['_removeAnnotationFromBalloon'](_0xe85cb6),_0xe85cb6===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x3c0e94,'change:visibleView',(_0x3b0b4b,_0xef1b97,_0x40af48,_0x720ced)=>{_0x720ced&&this['stopListening'](_0x720ced);const _0x2efbd7=_0x3e89ac['getByView'](_0x40af48);_0x40af48&&_0x2efbd7&&(this['listenTo'](_0x40af48,'change:height',()=>{_0x3c0e94['updatePosition']();}),this['listenTo'](_0x40af48,'Esc',()=>{this['_closeAnnotation'](_0x2efbd7),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x2efbd7&&this['setActiveAnnotation'](_0x2efbd7));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x3c0e94['visibleView']&&(_0x3e89ac['getByView'](_0x3c0e94['visibleView'])&&_0x3c0e94['updatePosition']());}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',()=>{this['_forceRefresh']=!0x0,this['_manuallyClosed']['clear']();}),this['editor']['editing']['view']['document']['selection']['editableElement']&&this['editor']['editing']['view']['focus'](),this['isAttached']=!0x0;}['detach'](){if(!this['isAttached'])throw new _0x202340('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x3c67c3 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x3c67c3);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x34d8aa){for(const _0x49f826 of this['_selectedAnnotations'])_0x34d8aa['includes'](_0x49f826)||this['_manuallyClosed']['delete'](_0x49f826);for(const _0x5110b3 of this['annotations'])_0x34d8aa['includes'](_0x5110b3)||this['_removeAnnotationFromBalloon'](_0x5110b3);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x2a572f of _0x34d8aa)this['_addAnnotationToBalloon'](_0x2a572f);}this['_selectedAnnotations']=_0x34d8aa;}['_addAnnotationToBalloon'](_0x1e208b,_0x4eab61=!0x1){this['_manuallyClosed']['has'](_0x1e208b)||(this['_addedAnnotations']['has'](_0x1e208b)||this['_balloon']['hasView'](_0x1e208b['view'])||(this['_addedAnnotations']['add'](_0x1e208b),this['_balloon']['add']({'stackId':_0x1e208b['view']['id'],'view':_0x1e208b['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x1e208b)}})),_0x4eab61&&this['_balloon']['showStack'](_0x1e208b['view']['id']));}['_getBalloonTargetForAnnotation'](_0x9a56ac){const _0x348f6a=_0x9a56ac['target'],_0x512c20=this['editor']['editing']['view'],_0x4a87be=_0x512c20['document']['selection']['getFirstRange'](),_0x1e9133=_0x512c20['domConverter']['viewRangeToDom'](_0x4a87be);if(_0x1e9133['collapse'](!0x0),_0x348f6a){if(_0x348f6a instanceof _0x543406)return _0x348f6a;let _0x39e99c=[];for(const _0x236322 of _0x348f6a)_0x39e99c['push'](...(_0x2a9daa=_0x236322['getClientRects'](),Array['from'](_0x2a9daa)['map'](DOMRect['fromRect'])));_0x39e99c=function(_0x39867b){const _0x26fb65=[];let _0x8a687b=_0x39867b[0x0];for(let _0x32f3b7=0x1;_0x32f3b7<_0x39867b['length'];_0x32f3b7++)B(_0x8a687b,_0x39867b[_0x32f3b7])?_0x8a687b['width']+=_0x39867b[_0x32f3b7]['width']:(_0x26fb65['push'](_0x8a687b),_0x8a687b=_0x39867b[_0x32f3b7]);return _0x26fb65['push'](_0x8a687b),_0x26fb65;}(_0x39e99c);const _0x32e2ce=_0x1e9133['getBoundingClientRect']();return _0x39e99c['find'](_0x38bea7=>_0x38bea7['top']<=_0x32e2ce['top']&&_0x38bea7['bottom']>=_0x32e2ce['bottom']&&_0x38bea7['left']<=_0x32e2ce['left']&&_0x38bea7['right']>=_0x32e2ce['right'])||_0x39e99c[0x0];}var _0x2a9daa;return _0x9a56ac['targetRect']||_0x1e9133;}['_removeAnnotationFromBalloon'](_0x5cd581){this['_addedAnnotations']['has'](_0x5cd581)&&this['_balloon']['hasView'](_0x5cd581['view'])&&(this['_addedAnnotations']['delete'](_0x5cd581),this['_balloon']['remove'](_0x5cd581['view']));}['_closeAnnotation'](_0x4a88eb){this['_manuallyClosed']['add'](_0x4a88eb),this['_removeAnnotationFromBalloon'](_0x4a88eb);}}function B(_0x2f7aea,_0x5a29bf){return _0x2f7aea['top']===_0x5a29bf['top']&&_0x2f7aea['bottom']===_0x5a29bf['bottom']&&_0x2f7aea['right']===_0x5a29bf['left'];}class tt extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x195aea,_0x4331a4){super(_0x195aea),this['set']('isEmpty',!_0x4331a4['length']),this['focusTracker']=new _0x4e3bb4(),this['_annotationViews']=_0x4331a4,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x591c72({'focusables':_0x4331a4,'focusTracker':this['focusTracker']}),this['listenTo'](_0x4331a4,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x4331a4,'remove',(_0x42cb88,_0x2d959b)=>{_0x2d959b['isActive']&&this['focus'](),_0x4331a4['length']||(this['isEmpty']=!0x0);});const _0x1d8cd2=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':E(_0x195aea,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x4331a4},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x1d8cd2['if']('isEmpty','ck-hidden',_0x208ca8=>!_0x208ca8)]},'children':[{'text':E(_0x195aea,'EMPTY_COMMENTS_ARCHIVE')}]}]}]});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['destroy'](){super['destroy'](),this['focusTracker']['destroy']();}['focus'](){this['focusCycler']['first']?this['focusCycler']['focusFirst']():this['element']['focus']();}['_setupKeyboardNavigation'](){for(const _0x3fc25a of this['_annotationViews'])this['focusTracker']['add'](_0x3fc25a['element']);this['_annotationViews']['on']('change',(_0x59c841,{added:_0xfbadd6,removed:_0xc5fd40})=>{for(const _0x3dff4f of _0xfbadd6)this['focusTracker']['add'](_0x3dff4f['element']);for(const _0x570f10 of _0xc5fd40)this['focusTracker']['remove'](_0x570f10['element']);});}}class f extends _0x154e47{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,O];}constructor(_0x4dd128){super(_0x4dd128),this['archivedThreads']=new _0x2cece5();}['init'](){const _0x3d0164=this['context'],_0x47f63b=_0x3d0164['plugins']['get'](o),_0x5977fd=_0x3d0164['plugins']['get'](O);this['listenTo'](_0x47f63b,'addCommentThread',(_0x18bdb2,{threadId:_0x2fda6f})=>{const _0x17e73a=_0x47f63b['getCommentThread'](_0x2fda6f);_0x17e73a['archivedAt']&&this['archivedThreads']['add'](_0x17e73a,this['_calculatePosition'](_0x17e73a['archivedAt'])),this['listenTo'](_0x17e73a,'change:archivedAt',(_0x54794c,_0x4485ef,_0x2b6da9)=>{_0x2b6da9?this['archivedThreads']['has'](_0x17e73a)||this['archivedThreads']['add'](_0x17e73a,this['_calculatePosition'](_0x17e73a['archivedAt'])):this['archivedThreads']['has'](_0x17e73a)&&this['archivedThreads']['remove'](_0x17e73a);});}),this['listenTo'](_0x47f63b,'removeCommentThread',(_0x4323dc,{threadId:_0x21cebd})=>{const _0x46ec8d=_0x47f63b['getCommentThread'](_0x21cebd);this['stopListening'](_0x46ec8d),this['archivedThreads']['has'](_0x46ec8d)&&this['archivedThreads']['remove'](_0x46ec8d);},{'priority':'highest'}),this['listenTo'](_0x5977fd['collection'],'focus',(_0x56d8f5,_0x39eb5e)=>{_0x39eb5e['isVisible']||(_0x39eb5e['isActive']=!0x0,_0x5977fd['activate'](_0x39eb5e));});}['_calculatePosition'](_0x52cbf2){const _0x558cc6=[...this['archivedThreads']]['findIndex'](_0x3d94dd=>_0x3d94dd['archivedAt']<_0x52cbf2);return _0x558cc6>-0x1?_0x558cc6:this['archivedThreads']['length'];}}class a extends _0x119370{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,_0x474467];}constructor(_0x25a537){super(_0x25a537),this['annotationViews']=new _0x242a87(),this['_pendingThreads']=[];}['init'](){const _0x5c0829=this['editor'],_0x2c9a9c=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x5c0829['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x45b47a,!0x0)),_0x5c0829['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x2b9379=this['_createCommentsArchiveButton'](_0x3d3e75);return _0x2b9379['set']({'role':'menuitemcheckbox'}),_0x2b9379;});const _0x2adcab=_0x5c0829['plugins']['get'](f),_0x5b8de3=_0x5c0829['plugins']['get']('Annotations'),_0x31df5f=_0x5c0829['plugins']['get']('CommentsRepository');_0x2adcab['archivedThreads']['forEach'](_0x5f0a8e=>{this['_handleNewThread'](_0x5f0a8e);}),this['listenTo'](_0x2adcab['archivedThreads'],'add',(_0x319ab0,_0x49801a)=>{this['_handleNewThread'](_0x49801a);}),this['listenTo'](_0x5b8de3['collection'],'add',(_0x47c4a8,_0x44df92)=>{const _0x1b4eed=this['_pendingThreads']['find'](_0x3ec097=>{const _0x462db7=_0x31df5f['_threadToController']['get'](_0x3ec097);return _0x462db7&&_0x44df92['innerView']===_0x462db7['view'];});if(_0x1b4eed){const _0x5a718=this['_calculatePosition'](_0x1b4eed['archivedAt']);this['annotationViews']['add'](_0x44df92['view'],_0x5a718),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x1b4eed),0x1);}}),this['listenTo'](_0x2adcab['archivedThreads'],'remove',(_0x3c5734,_0x19f6cd)=>{const _0x19a66e=_0x5c0829['config']['get']('collaboration.channelId');if(!_0x19a66e||_0x19f6cd['channelId']===_0x19a66e){if(this['_pendingThreads']['includes'](_0x19f6cd))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x19f6cd),0x1);else{const _0x3f78ac=_0x31df5f['_threadToController']['get'](_0x19f6cd),_0x14461f=_0x5b8de3['getByInnerView'](_0x3f78ac['view']);this['annotationViews']['remove'](_0x14461f['view']),this['stopListening'](_0x14461f['focusableElements']);}}}),this['listenTo'](_0x5b8de3['collection'],'add',(_0x44e9f8,_0x2b55ec)=>{this['listenTo'](_0x2b55ec,'escape',_0x2c9a9c);}),this['listenTo'](_0x5b8de3['collection'],'remove',(_0x27f30a,_0x375901)=>{this['stopListening'](_0x375901,'escape',_0x2c9a9c);});}['_handleNewThread'](_0x2d00e2){const _0x2c7769=this['editor']['plugins']['get']('CommentsRepository'),_0xebbb5b=this['editor']['plugins']['get']('Annotations'),_0x31ecc9=this['editor']['config']['get']('collaboration.channelId');if(!_0x31ecc9||_0x2d00e2['channelId']===_0x31ecc9){const _0x33ef2e=_0x2c7769['_threadToController']['get'](_0x2d00e2);if(!_0x33ef2e)return void this['_pendingThreads']['push'](_0x2d00e2);const _0x5b6f70=this['_calculatePosition'](_0x2d00e2['archivedAt']),_0x63678d=_0xebbb5b['getByInnerView'](_0x33ef2e['view']);_0x63678d['isVisible']&&_0xebbb5b['_visibleAnnotations']['remove'](_0x63678d),this['annotationViews']['add'](_0x63678d['view'],_0x5b6f70);}}['_calculatePosition'](_0x5eb015){const _0x28ed77=this['editor']['config']['get']('collaboration.channelId'),_0x1a88ad=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0x1810b4=>_0x1810b4['channelId']===_0x28ed77)['findIndex'](_0x5d38fd=>_0x5d38fd['archivedAt']<_0x5eb015);return _0x1a88ad<0x0||_0x1a88ad>this['annotationViews']['length']?this['annotationViews']['length']:_0x1a88ad-0x1;}['_toggleDialog'](){const _0x58fb9c=this['editor'],_0x2bf6b7=_0x58fb9c['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new tt(_0x58fb9c['locale'],this['annotationViews'])),'commentsArchive'===_0x2bf6b7['id']?_0x2bf6b7['hide']():_0x2bf6b7['show']({'id':'commentsArchive','title':E(_0x58fb9c['locale'],'COMMENTS_ARCHIVE'),'icon':_0x34d309,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x4dc751['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x427ccf,_0x2fe7ce=!0x1){const _0x368157=this['editor']['locale'],_0x13b5a5=this['editor']['plugins']['get']('Dialog'),_0x1cb3dc=new _0x427ccf(_0x368157);return _0x1cb3dc['bind']('isEnabled')['to'](this,'isEnabled'),_0x1cb3dc['bind']('isOn')['to'](_0x13b5a5,'id',_0x36a4a1=>'commentsArchive'===_0x36a4a1),_0x1cb3dc['set']({'label':E(_0x368157,'COMMENTS_ARCHIVE'),'icon':_0x34d309,'isToggleable':!0x0}),_0x2fe7ce&&(_0x1cb3dc['tooltip']=!0x0),this['listenTo'](_0x1cb3dc,'execute',()=>this['_toggleDialog']()),_0x1cb3dc;}['_hideDialogOnAnnotationEscape']=_0x357f4c=>{const _0x4ac375=_0x357f4c['source'];if(!this['annotationViews']['has'](_0x4ac375['view']))return;const _0x523ba0=this['editor']['plugins']['get']('Dialog');_0x523ba0['isOpen']&&'commentsArchive'===_0x523ba0['id']&&(_0x523ba0['hide'](),_0x357f4c['stop']());};}class p extends _0x119370{static get['requires'](){return[o,r,i,f,a,s,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{d as Annotation,_ as AnnotationCollection,S as AnnotationView,O as Annotations,M as AnnotationsUIs,ts as BaseCommentThreadView,hs as BaseCommentView,fi as Comment,ui as CommentThread,Ct as CommentThreadController,ie as CommentThreadInputView,vt as CommentThreadView,gt as CommentView,p as Comments,f as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,s as CommentsOnly,o as CommentsRepository,i as CommentsUI,P as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar};
|
|
23
|
+
import{Editor as _0x240f2b,ContextPlugin as _0x11dfc6,PendingActions as ht,Command as _0xc8a10b,Plugin as _0xfe9bd5,Context as _0x176874}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x321e78,uid as _0x1e5d77,KeystrokeHandler as jt,FocusTracker as _0xd81594,diff as _0x1bb837,Collection as _0x11e188,Rect as _0x229aaa,CKEditorError as _0x4a9b4a,first as _0x4224f0,priorities as Wt,scrollViewportToShowTarget as rt,getEnvKeystrokeText as nt,toUnit as xt,DomEmitterMixin as _0x317c37,keyCodes as _0x72709}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x29a76b,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x341836,trimHtml as _0x5a5569,LateFocusDropdownButtonView as _0x3a2148,Users as it,getDateTimeFormatter as lt,hashObject as pt,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as ot,FOCUS_ANNOTATION_KEYSTROKE as _0x566818}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as wt,cloneDeep as It,set as At,unset as yt,debounce as _0x3ad571}from'es-toolkit/compat';import{IconUndo as _0x26ba99,IconCheck as _0x59b25b,IconPencil as _0x45b643,IconRemoveComment as _0x5337cb,IconThreeVerticalDots as _0x5c1ab3,IconAddComment as _0xdbf8fb,IconCommentsArchive as _0xa53eed}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Vt,InlineEditableUIView as $t,EditorUI as Rt,View as kt,FocusCycler as _0x4bc745,ButtonView as _0x5e3054,ViewCollection as _0x43a8d4,createDropdown as _0x4b5ec0,ListView as _0x180d48,focusChildOnDropdownOpen as _0x23cfdf,ListItemView as _0xa50171,MenuBarMenuListItemButtonView as _0x2971e2,BodyCollection as _0x4ffd49,BalloonPanelView as _0x38aab7,ContextualBalloon as _0x23f0a9,Dialog as _0x2ea84c,DialogViewPosition as _0x481f5f}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disablePlaceholder as St,enablePlaceholder as Ft,MouseObserver as _0x1f961f}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Et}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Gt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Jt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Kt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x47dcde}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0xdc6819}from'@ckeditor/ckeditor5-widget/dist/index.js';class Ct extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x321e78(){['model'];['view'];constructor(_0x2e97cf,_0x51ccc6){super(),this['model']=_0x2e97cf,this['model']['_isAttached']=!0x0,this['view']=_0x51ccc6,this['listenTo'](_0x51ccc6,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x51ccc6,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x51ccc6,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x51ccc6,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x51ccc6,'addComment',(_0x3277d7,_0x1aea4a)=>this['addComment'](_0x1aea4a)),this['listenTo'](_0x51ccc6,'updateComment',(_0x54f012,_0x2e1247,_0x3accb3)=>this['updateComment'](_0x2e1247,_0x3accb3)),this['listenTo'](_0x51ccc6,'removeComment',(_0x437c4b,_0xd23a52)=>this['removeComment'](_0xd23a52));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x1d2aae){this['model']['addComment']({'content':_0x1d2aae,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x20693d,_0xdbe4d0){this['model']['getComment'](_0x20693d)['update']({'content':_0xdbe4d0});}['removeComment'](_0x49f83d){this['model']['getComment'](_0x49f83d)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function E(_0x5ac9bd,_0x1c6350,_0xd57b41){const t=_0x5ac9bd['t'];switch(_0x1c6350){case'PENDING_ACTION_COMMENT_THREAD':return t({'string':'Unsaved\x20change\x20in\x20comment\x20thread.','id':'PENDING_ACTION_COMMENT_THREAD'});case'Comment':return t('Comment');case'Reply...':return t('Reply...');case'Reply\x20to\x20reopen\x20discussion...':return t('Reply\x20to\x20reopen\x20discussion...');case'Write\x20a\x20comment...':return t('Write\x20a\x20comment...');case'Comment\x20was\x20made\x20on\x20an\x20element':return t('Comment\x20was\x20made\x20on\x20an\x20element');case'Comment\x20editor':return t('Comment\x20editor');case'Delete\x20comment\x20thread?':return t('Delete\x20comment\x20thread?');case'Delete\x20comment?':return t('Delete\x20comment?');case'Marked\x20as\x20resolved':return t('Marked\x20as\x20resolved');case'Show\x20more\x20items':return t('Show\x20more\x20items');case'Cancel':return t('Cancel');case'Edit':return t('Edit');case'Resolve':return t('Resolve');case'Reopen':return t('Reopen');case'Remove':return t('Remove');case'Reply':return t('Reply');case'Save':return t('Save');case'Annotations\x20sidebar':return t('Annotations\x20sidebar');case'Annotations\x20list':return t('Annotations\x20list');case'Thread\x20comments':return t('Thread\x20comments');case'THREAD_CONTEXT_LABEL':return t({'string':'Thread\x20context:\x20%0','id':'THREAD_CONTEXT_LABEL'},_0xd57b41);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%1\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0xd57b41);case'COMMENT_THREAD_DESCRIPTION':return t({'string':'Press\x20Enter\x20for\x20more\x20options.\x20Press\x20Escape\x20to\x20exit.','id':'COMMENT_THREAD_DESCRIPTION'});case'COMMENT_ARIA_LABEL':return t({'string':'Comment\x20by\x20%0.\x20Created\x20on\x20%1.\x20%2.\x20%3','id':'COMMENT_ARIA_LABEL'},_0xd57b41);case'LEAVE_COMMENT_ANNOUNCEMENT':return t({'string':'Leaving\x20a\x20content\x20with\x20comments.','id':'LEAVE_COMMENT_ANNOUNCEMENT'});case'ENTER_COMMENT_ANNOUNCEMENT':return t({'string':'Entering\x20a\x20content\x20with\x20comments.\x20Press\x20%0\x20to\x20go\x20to\x20the\x20discussion.','id':'ENTER_COMMENT_ANNOUNCEMENT'},_0xd57b41);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0xd57b41);case'TOO_LONG_COMMENT_ALERT':return t({'string':'Comment\x20content\x20is\x20too\x20long.\x20Your\x20comment\x20has\x20%0\x20characters\x20but\x20the\x20limit\x20is\x20%1\x20characters.','id':'TOO_LONG_COMMENT_ALERT'},_0xd57b41);case'EXTERNAL_COMMENT':return t({'string':'This\x20comment\x20comes\x20from\x20an\x20external\x20source.','id':'EXTERNAL_COMMENT'});case'EXTERNAL_IMPORT_WORD_COMMENT':return t({'string':'This\x20comment\x20comes\x20from\x20an\x20imported\x20Word\x20file.','id':'EXTERNAL_IMPORT_WORD_COMMENT'});case'EXTERNAL_AVATAR':return t({'string':'Displayed\x20author\x20name\x20comes\x20from\x20external\x20source\x20(added\x20by\x20%0)','id':'EXTERNAL_AVATAR'},_0xd57b41);case'EXTERNAL_IMPORT_WORD_AVATAR':return t({'string':'Displayed\x20author\x20name\x20comes\x20from\x20a\x20Word\x20document\x20imported\x20by\x20%0','id':'EXTERNAL_IMPORT_WORD_AVATAR'},_0xd57b41);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Ut extends Vt{['main'];['editable'];constructor(_0x33eb3b,_0x38891a){super(_0x33eb3b);const _0x501b5b=_0x1e5d77();this['main']=this['createCollection'](),this['editable']=new $t(_0x33eb3b,_0x38891a,void 0x0,{'label':()=>E(_0x33eb3b,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x33eb3b['uiLanguageDirection'],'lang':_0x33eb3b['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x501b5b},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Ot extends Rt{['view'];constructor(_0x20123a){super(_0x20123a),this['view']=new Ut(_0x20123a['locale'],_0x20123a['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x549d4d=this['editor']['editing']['view'],_0x2ce5ee=this['view']['editable'],_0x323b0d=_0x549d4d['document']['getRoot']();_0x2ce5ee['name']=_0x323b0d['rootName'],this['view']['render']();const _0x263a4c=_0x2ce5ee['element'];this['setEditableElement'](_0x2ce5ee['name'],_0x263a4c),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x549d4d['attachDomRoot'](_0x263a4c),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Nt=[qt,zt,Bt,Et,Gt,Jt,Kt];class Qt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x321e78(_0x240f2b){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Nt)());constructor(_0x5e6a04={}){function _0x26d43e(_0x4855a5){return _0x4855a5['map'](_0x23524b=>String['fromCharCode'](_0x23524b))['join']('');}(_0x5e6a04=Object['assign']({},_0x5e6a04))['plugins']||(_0x5e6a04['plugins']=Qt['defaultPlugins']),super(_0x5e6a04),this['ui']=new Ot(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x26d43e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x26d43e([0x76,0x69,0x65,0x77])][_0x26d43e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x26d43e([0x61,0x75,0x74,0x6f]),this[_0x26d43e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x26d43e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x26d43e([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x26d43e([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x26d43e([0x6f,0x6b])});}['create'](){const _0x20d346=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x20d346))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x44c7e0=>{const _0x2dab30=this['model']['document']['getRoot'](),_0x4f0075=_0x2dab30&&_0x2dab30['getChild'](_0x2dab30['childCount']-0x1);_0x44c7e0['setSelection'](_0x4f0075,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x24b7e6=this['editing']['view'],_0x476d88=_0x24b7e6['document']['getRoot'](),_0x2d68ca=_0x476d88['getChild'](0x0);_0x476d88['childCount']>0x1||!_0x2d68ca||'p'!=_0x2d68ca['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x24b7e6,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x2d68ca['placeholder']=this['placeholder']),Ft({'view':_0x24b7e6,'element':_0x2d68ca,'keepOnFocus':!0x0}),this['placeholderElement']=_0x2d68ca);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x5262bb,_0x500af3={}){super(_0x5262bb),this['editor']=null,this['_editorConfig']=_0x500af3,this['set']('value',_0x500af3['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',E(_0x5262bb,'Reply...')),this['set']('submitLabel',E(_0x5262bb,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0xd81594(),this['focusCycler']=new _0x4bc745({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x3b1fdf,_0x1487ef)=>{this['cancelButtonView']['fire']('execute'),_0x1487ef();}),this['keystrokes']['set']('Ctrl+Enter',(_0x509405,_0x4dbe96)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x4dbe96());}),this['on']('submit',(_0x4531e3,_0x3bfee0)=>{_0x3bfee0['length']>0xfde8?(alert(E(_0x5262bb,'TOO_LONG_COMMENT_ALERT',[_0x3bfee0['length'],0xfde8])),_0x4531e3['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Qt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x19ac09=this['editor'];this['element']['insertBefore'](_0x19ac09['ui']['element'],this['element']['firstChild']),_0x19ac09['model']['document']['on']('change',()=>this['value']=_0x19ac09['getData']()),_0x19ac09['bind']('placeholder')['to'](this),this['focusables']['add'](_0x19ac09['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0xf71112){-0x1===_0xf71112?(this['focusCycler']['focusFirst'](),this['focusCycler']['focusLast']()):this['focusCycler']['focusFirst']();}async['destroy'](){this['_isDestroyed']||(this['_isDestroyed']=!0x0,this['editor']&&(await this['_editorCreationPromise'],await this['editor']['destroy'](),this['fire']('editorDestroyed',this['editor'])),await super['destroy']());}['_createSubmitButton'](){const {locale:_0x355b13}=this,_0x497cd6=new _0x5e3054(_0x355b13);return _0x497cd6['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x497cd6['withText']=!0x0,_0x497cd6['bind']('label')['to'](this,'submitLabel'),_0x497cd6['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x497cd6['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x4794b3,_0x1c234e)=>!_0x1c234e&&!!_0x4794b3['trim']()),_0x497cd6;}['_createCancelButton'](){const {locale:_0x25fb03}=this,_0x3a7125=new _0x5e3054(_0x25fb03);return _0x3a7125['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x3a7125['label']=E(_0x25fb03,'Cancel'),_0x3a7125['withText']=!0x0,_0x3a7125['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x3a7125;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x2250da=>{this['focusTracker']['add'](_0x2250da['element']);}),this['focusables']['on']('change',(_0x17a581,_0xa3cfd7)=>{for(const _0x1fbe38 of Array['from'](_0xa3cfd7['added'])['reverse']())this['focusTracker']['add'](_0x1fbe38['element']);});}}class ie extends kt{constructor(_0x49d3c2,_0x46391e,_0x3ec84d){super(_0x49d3c2),this['commentInputView']=new os(_0x49d3c2,_0x3ec84d),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x2c2bdc,_0xf264b8)=>_0x2c2bdc||!!_0xf264b8),this['set']('showInput',!0x1),this['on']('change:showInput',()=>{this['showInput']&&!this['commentInputView']['editor']&&this['commentInputView']['createEditor']();}),this['commentInputView']['delegate']('editorReady')['to'](this),this['commentInputView']['delegate']('editorDestroyed')['to'](this),this['userView']=new _0x29a76b(_0x49d3c2,_0x46391e),this['userView']['extendTemplate']({'attributes':{'class':'ck-thread__user','aria-hidden':!0x0}}),this['commentInputView']['extendTemplate']({'attributes':{'class':'ck-thread__input'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-container',this['bindTemplate']['if']('showInput','ck-comment__input-container--active')]},'children':[this['userView'],this['commentInputView']]});}['render'](){super['render'](),this['_focusOnNonInteractiveMouseDown']();}['destroy'](){return this['commentInputView']['destroy']()['then'](()=>super['destroy']());}['focus'](_0x160334){this['commentInputView']['focus'](_0x160334);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x30618a,_0x40cfc6)=>{const {submitButtonView:_0x34f695,cancelButtonView:_0x59f096,editor:_0x1a782f}=this['commentInputView'];[_0x34f695['element'],_0x59f096['element'],_0x1a782f?_0x1a782f['editing']['view']['getDomRoot']():null]['filter'](_0x1f5e0=>_0x1f5e0)['some'](_0x28d21f=>_0x28d21f['contains'](_0x40cfc6['target']))||(this['focus'](),_0x40cfc6['preventDefault']());});}}class cs extends kt{constructor(_0x5a6760){super(_0x5a6760);const _0x2663a6=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x2663a6['to']('count',_0x37869d=>E(_0x5a6760,'NUMBER_OF_COMMENTS',_0x37869d))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x53258e,_0x4e0dba,_0x10c053){super(_0x53258e);const _0x53cf01=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x4e0dba['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x4e0dba,this['_config']=_0x10c053,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0xd81594(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4bc745({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3e06be=>this['commentViews']['map'](_0x574fd9=>_0x574fd9['element'])['includes'](_0x3e06be['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x53258e),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x392d24=>_0x392d24-this['_config']['maxCommentsWhenCollapsed']);for(const _0x29a799 of _0x4e0dba['comments'])this['_handleNewCommentModel'](_0x29a799);this['_handleInfoComment'](),this['listenTo'](_0x4e0dba['comments'],'add',(_0x4e095c,_0xbf3ec4)=>{const _0x2dea76=this['_calculatePosition'](_0xbf3ec4);this['length']++,this['_handleNewCommentModel'](_0xbf3ec4,_0x2dea76),this['refreshVisibleViews']();}),this['listenTo'](_0x4e0dba['comments'],'remove',(_0x311ae9,_0x137081)=>{this['length']--,this['_handleRemoveCommentModel'](_0x137081),this['refreshVisibleViews']();}),this['listenTo'](_0x4e0dba,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x4e0dba,'change:isResolved',()=>this['_handleInfoComment']()),this['on']('change:isActive',()=>this['refreshVisibleViews']()),this['on']('change:hasDirtyComment',()=>this['refreshVisibleViews']()),this['setTemplate']({'tag':'ul','attributes':{'class':['ck-thread__comments',_0x53cf01['if']('length','ck-hidden',_0x420ada=>!_0x420ada)],'aria-label':E(_0x53258e,'Thread\x20comments')},'children':this['visibleViews']});}get['_shouldCollapse'](){return this['_model']['weight']>this['_config']['maxThreadTotalWeight']&&!this['isActive']&&!this['hasDirtyComment'];}['render'](){super['render'](),this['refreshVisibleViews'](),this['_setupKeyboardNavigation']();}['focus'](_0x1acaaa){-0x1===_0x1acaaa?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x289552 of this['commentViews'])_0x289552['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x350c8f,_0x47c52b){const _0x3b4d35=new this['_config']['CommentView'](this['locale'],_0x350c8f,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x3b4d35['viewUid']=_0x350c8f['id'],_0x3b4d35['delegate']('removeComment')['to'](this),_0x3b4d35['delegate']('updateComment')['to'](this),_0x3b4d35['delegate']('resolveCommentThread')['to'](this),_0x3b4d35['delegate']('editorReady')['to'](this),_0x3b4d35['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x3b4d35,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x3b4d35,_0x47c52b);}['_calculatePosition'](_0x53a831){const _0x1c11db=this['_model']['_findOptimalIndex'](_0x53a831);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x53a831['authoredAt']?_0x1c11db-0x1:_0x1c11db:_0x1c11db-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0xeb63f={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':E(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0xeb63f,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0xeb63f));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x1e9eee){const _0x3995e9=this['commentViews']['remove'](_0x1e9eee['id']);this['stopListening'](_0x3995e9),_0x3995e9['isEditMode']&&this['_updateHasDirtyComment'](),_0x3995e9['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x21f9ea=>_0x21f9ea['isEditMode']);}['_rearrangeCollapse'](){const _0x1b7b53=function(_0x54fe2f){const _0xfaa565=new _0x11e188();for(const _0x530697 of _0x54fe2f)_0xfaa565['add'](_0x530697);return _0xfaa565;}(this['commentViews']),_0x5dce65=this['_collapsedCommentsView']['count'];for(let _0x4293f8=0x1;_0x4293f8<=_0x5dce65;_0x4293f8++)_0x1b7b53['remove'](0x1);for(const _0x22c56f of _0x1b7b53)_0x22c56f['collapse']();_0x5dce65>0x0&&_0x1b7b53['add'](this['_collapsedCommentsView'],0x1),ns(_0x1bb837(Array['from'](this['visibleViews']),Array['from'](_0x1b7b53)),this['visibleViews'],_0x1b7b53);}['_rearrangeExpand'](){ns(_0x1bb837(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x3f7eed of this['visibleViews'])_0x3f7eed['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x4e51d7=>{this['focusTracker']['add'](_0x4e51d7['element']),this['keystrokes']['listenTo'](_0x4e51d7['element']);}),this['commentViews']['on']('change',(_0x29a938,_0x534636)=>{for(const _0x12ba71 of _0x534636['removed'])this['focusTracker']['remove'](_0x12ba71['element']),this['keystrokes']['stopListening'](_0x12ba71['element']);for(const _0x6f2ce4 of Array['from'](_0x534636['added'])['reverse']())this['focusTracker']['add'](_0x6f2ce4['element']),this['keystrokes']['listenTo'](_0x6f2ce4['element']);});}}function ns(_0xfeb40d,_0x411a76,_0x19a726){let _0x9ad63a=0x0;for(const _0x56b6d4 of _0xfeb40d)switch(_0x56b6d4){case'insert':_0x411a76['add'](_0x19a726['get'](_0x9ad63a),_0x9ad63a),_0x9ad63a++;break;case'delete':_0x411a76['remove'](_0x9ad63a);break;case'equal':_0x9ad63a++;}}class as extends kt{constructor(_0x2115e9){super(_0x2115e9);const _0x26dccd=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x26dccd['to']('contextValue',_0x6b971f=>E(_0x2115e9,'THREAD_CONTEXT_LABEL',_0x6b971f)),'tabindex':-0x1},'children':[{'text':_0x26dccd['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x47e0e2,_0x4f141c){super(_0x47e0e2);const _0x381c96=this['bindTemplate'];this['_model']=_0x4f141c,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0xd81594(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4bc745({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x36c30a=>!!_0x36c30a),this['bind']('contextValue')['to'](this['_model'],'context',_0x3a73e3=>_0x3a73e3&&_0x3a73e3['value']?this['_trimContextValue'](_0x3a73e3['value']):E(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x381c96['if']('hasContext','ck-context--quotes')]},'children':[this['contextView']]}]},{'tag':'div','attributes':{'class':['ck-annotation__actions']},'children':[this['reopenButtonView']]}]});}['render'](){super['render'](),this['_attachContextActions'](),this['_setupKeyboardNavigation']();}['focus'](){this['focusCycler']['focusFirst']();}['_createReopenButton'](){const _0x351e50=new _0x5e3054(this['locale']);return _0x351e50['label']=E(this['locale'],'Reopen'),_0x351e50['tooltip']=E(this['locale'],'Reopen'),_0x351e50['icon']=_0x26ba99,_0x351e50['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x27d8e2=>!_0x27d8e2),_0x351e50['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x25c9b7,_0x187033)=>_0x25c9b7&&_0x187033),_0x351e50['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x351e50;}['_trimContextValue'](_0x127957){if(_0x127957['length']<0x96)return _0x127957;const _0xb3ab1a=_0x127957['lastIndexOf']('\x20',0x93);return _0x127957['substring'](0x0,_0xb3ab1a>-0x1?_0xb3ab1a:0x93)+'...';}['_attachContextActions'](){const _0x4aa95d=this['element']['querySelector']('.ck-context'),_0x4acce0=_0x4aa95d['querySelector']('.ck-context__value');this['listenTo'](_0x4aa95d,'mouseenter',()=>{_0x4acce0['offsetWidth']<_0x4acce0['scrollWidth']&&_0x4aa95d['classList']['add']('overlay');}),this['listenTo'](_0x4aa95d,'mouseleave',()=>{_0x4aa95d['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0xc6c1ca of this['focusables'])this['focusTracker']['add'](_0xc6c1ca['element']),this['keystrokes']['listenTo'](_0xc6c1ca['element']);}['_createContextView'](){const _0x3c6f06=new as(this['locale']);return _0x3c6f06['bind']('contextValue')['to'](this),_0x3c6f06;}}class ts extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0xedfd90,_0x5e32e2,_0x3d4f00,_0x2c4019){super(_0xedfd90),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x5e32e2,this['_localUser']=_0x3d4f00,this['_config']=_0x2c4019,this['commentThreadHeaderView']=new Xt(_0xedfd90,_0x5e32e2),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0xedfd90,E(_0xedfd90,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0xedfd90,_0x5e32e2,Object['assign']({'CommentView':this['_config']['CommentView']},_0x2c4019)),this['commentsListView']['delegate']('removeComment')['to'](this),this['commentsListView']['delegate']('updateComment')['to'](this),this['commentsListView']['delegate']('resolveCommentThread')['to'](this),this['commentsListView']['delegate']('editorReady')['to'](this),this['commentsListView']['delegate']('editorDestroyed')['to'](this),this['commentsListView']['bind']('isActive')['to'](this),this['listenTo'](this,'resolveCommentThread',()=>{this['focus']();}),this['set']('length',this['commentsListView']['length']),this['bind']('length')['to'](this['commentsListView'],'length'),this['commentThreadInputView']=this['_createCommentThreadInputView'](),this['commentThreadInputView']['delegate']('editorReady')['to'](this),this['commentThreadInputView']['delegate']('editorDestroyed')['to'](this),this['on']('removeComment',()=>this['focus']()),this['bind']('isDirty')['to'](this['commentsListView'],'hasDirtyComment',this['commentThreadInputView']['commentInputView'],'value',(_0x13bbc,_0x2e251f)=>_0x13bbc||!!_0x2e251f),this['bind']('isUnlinked')['to'](_0x5e32e2,'unlinkedAt',_0x22ed92=>!!_0x22ed92),this['bind']('ariaLabel')['to'](this,'length',_0x1a62b8=>{const _0x632321=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return E(this['locale'],'COMMENT_THREAD_LABEL',[_0x1a62b8,_0x632321]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0xd81594(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4bc745({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3b6332=>_0x3b6332['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x204452=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x32a76b=_0x204452['commentInputView'];return _0x204452['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x32a76b,'value',(_0x235fa5,_0x30a701,_0x5ecc45,_0x1f2142,_0x55459e)=>!!_0x55459e||!!_0x1f2142&&_0x5ecc45&&!_0x30a701||_0x235fa5&&_0x5ecc45&&!_0x30a701),_0x32a76b['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x19fc20,_0xf5ceba,_0x28b4e8)=>{let _0x41dcf1;return _0x41dcf1=_0x28b4e8&&_0xf5ceba?'Reply\x20to\x20reopen\x20discussion...':_0x19fc20?'Reply...':'Write\x20a\x20comment...',E(this['locale'],_0x41dcf1);}),_0x32a76b['bind']('submitLabel')['to'](this,'length',_0x4c90ed=>E(this['locale'],_0x4c90ed?'Reply':'Comment')),_0x32a76b['on']('submit',(_0x34f12b,_0x36dfa6)=>{this['fire']('addComment',_0x36dfa6),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x32a76b['on']('cancel',()=>{this['focus']();}),_0x32a76b['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x32a76b['on']('cancel',_0x464b46=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x464b46['stop']());}),this['on']('change:isActive',(_0x447a1b,_0x3a176b,_0x13c776)=>{_0x13c776||this['length']||_0x32a76b['value']||this['fire']('removeCommentThread');}),_0x204452;}}class vt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(ts){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x3d0597,_0x438a26,_0x142c95,_0x25fc61){super(_0x3d0597,_0x438a26,_0x142c95,_0x25fc61),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x3d0597,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x17d1ea,_0x51fba0,_0x48cb63)=>{_0x48cb63||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x54fbeb,_0xb96ebb,_0x273898)=>{_0x273898&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x3d5ca5=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x3d5ca5['if']('isActive','ck-thread--active'),_0x3d5ca5['if']('isUnlinked','ck-thread--unlinked'),_0x3d5ca5['if']('isConfirm','ck-thread--remove-confirmation'),_0x3d5ca5['to']('actionIndicator',_0x4fea4=>_0x4fea4?'ck-thread--'+_0x4fea4:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x3d5ca5['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id']},'children':[{'tag':'div','attributes':{'class':'ck-thread__container'},'children':this['commentThreadChildren']}]};}['render'](){super['render'](),this['containerElement']=this['element']['querySelector']('.ck-thread__container'),this['_model']['on']('change:archivedAt',()=>{this['_updateArchivedThreadHeader']();}),this['_updateArchivedThreadHeader']();}['_cancelAllConfirms'](){this['cancelConfirm']();for(const _0x5e0a7e of this['commentsListView']['commentViews'])_0x5e0a7e['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x37d437}=this,_0x28132f=this['commentsListView']['commentViews']['get'](0x0);_0x28132f===this['_boundFirstCommentView']||_0x28132f['isSystemComment']||(this['_boundFirstCommentView']=_0x28132f,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x28132f,'actionIndicator',_0x40937f=>'remove'===_0x40937f?'remove':null),_0x28132f['placeholder']=E(_0x37d437,'Write\x20a\x20comment...'),_0x28132f['removeButton']['on']('execute',_0x23de97=>{_0x23de97['stop'](),this['showConfirm'](E(_0x37d437,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x28132f['focus']();}),_0x28132f['actionBar']['add'](this['resolveButton'],0x0),_0x28132f['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x4ae643=new _0x341836(this['locale']);return _0x4ae643['label']=E(this['locale'],'Resolve'),_0x4ae643['tooltip']=E(this['locale'],'Resolve'),_0x4ae643['icon']=_0x59b25b,_0x4ae643['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x4ae643['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x35174a=>!_0x35174a),_0x4ae643['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x2dc4f5,_0x2ec275)=>_0x2dc4f5&&!_0x2ec275),_0x4ae643['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x4ae643;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class es extends kt{constructor(_0x5c1544){super(_0x5c1544),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x5a9edc,_0x5f4636,_0x46eb7b)=>{this['element']['innerHTML']=_0x46eb7b;}),this['element']['innerHTML']=this['content'];}}class hs extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x2ff984,_0x4f479d,_0x5a16e8){super(_0x2ff984),this['_model']=_0x4f479d,this['_config']=_0x5a16e8,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x4f479d,'content',_0x4f479d,'authoredAt',(_0x3d8c91,_0x253fb0)=>E(_0x2ff984,'COMMENT_ARIA_LABEL',[_0x4f479d['author']['name'],_0x5a16e8['formatDateTime'](_0x253fb0),new DOMParser()['parseFromString'](_0x3d8c91,'text/html')['body']['textContent'],_0x4f479d['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x2ff984,E(_0x2ff984,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x43a8d4(),this['focusTracker']=new _0xd81594(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4bc745({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5d1dd4=>_0x5d1dd4['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?E(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):E(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?E(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):E(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x2b39da=new es(this['locale']);return _0x2b39da['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x46dbbc,_0x1f1128)=>_0x1f1128?_0x5a5569(_0x46dbbc,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x46dbbc),_0x2b39da;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x306c6b=new os(this['locale'],this['_config']['editorConfig']);return _0x306c6b['value']=this['_model']['content'],_0x306c6b['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x306c6b['submitLabel']=E(this['locale'],'Save'),_0x306c6b['on']('submit',(_0x2181ca,_0x350ca6)=>{this['fire']('updateComment',this['_model']['id'],_0x350ca6),this['switchToDisplayMode'](),this['focus']();}),_0x306c6b['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x306c6b['once']('editorReady',()=>{_0x306c6b['focus']();}),_0x306c6b['createEditor'](),_0x306c6b['delegate']('editorReady')['to'](this),_0x306c6b['delegate']('editorDestroyed')['to'](this),_0x306c6b;}['_setupKeyboardNavigation'](){const _0x3dfda4=this['element'];this['keystrokes']['listenTo'](_0x3dfda4);for(const _0x31f9a7 of this['focusables'])this['focusTracker']['add'](_0x31f9a7['element']),this['keystrokes']['listenTo'](_0x31f9a7['element']);this['focusables']['on']('change',(_0x4dc1e0,_0x4562c3)=>{for(const _0x1640c6 of _0x4562c3['removed'])this['focusTracker']['remove'](_0x1640c6['element']),this['keystrokes']['stopListening'](_0x1640c6['element']);for(const _0x14bde0 of _0x4562c3['added'])this['focusTracker']['add'](_0x14bde0['element']),this['keystrokes']['listenTo'](_0x14bde0['element']);}),this['keystrokes']['set']('enter',(_0x131548,_0x5a9b17)=>{_0x3dfda4===_0x131548['target']&&(this['focusCycler']['focusFirst'](),_0x5a9b17());}),this['keystrokes']['set']('esc',(_0x41a742,_0x13ee00)=>{_0x3dfda4!==_0x41a742['target']&&(this['focus'](),_0x13ee00());});}}class gt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(hs){['actionBar'];['userView'];constructor(_0x59cd05,_0x3c96aa,_0x197be6){super(_0x59cd05,_0x3c96aa,_0x197be6),this['set']('actionIndicator',null),this['set']('placeholder',E(_0x59cd05,'Reply...')),this['bind']('authoredAt')['to'](_0x3c96aa),this['bind']('resolvedAt')['to'](_0x3c96aa),this['actionBar']=this['createCollection'](),this['isSystemComment']||(this['editButton']=this['_createEditButton'](),this['removeButton']=this['_createRemoveButton'](),this['items']=this['createCollection'](),this['items']['addMany']([this['editButton'],this['removeButton']]),this['dropdown']=this['_createDropdown'](),this['actionBar']['add'](this['dropdown']),this['focusables']['add'](this['dropdown'])),this['userView']=new _0x29a76b(_0x59cd05,_0x3c96aa['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x3c96aa,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x9294a7=this['bindTemplate'],_0x1efff1=[{'tag':'div','attributes':{'class':['ck-comment__info','ck-annotation__info']},'children':[{'tag':'span','children':[{'text':this['userView']['name']}],'attributes':{'class':['ck-comment__info-name','ck-annotation__info-name'],'data-cke-tooltip-text':this['userView']['name']}},{'tag':'time','attributes':{'datetime':_0x9294a7['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x9294a7['to']('authoredAt',_0x4e31c2=>this['_config']['formatDateTime'](_0x4e31c2))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x9294a7['if']('isEditMode','ck-comment__actions--hidden'),_0x9294a7['if']('isEditMode','ck-annotation__actions--hidden')]},'children':this['actionBar']},{'tag':'div','attributes':{'class':['ck-annotation__content-wrapper']},'children':this['visibleView']},this['ariaDescriptionView']];return this['_model']['isExternal']&&_0x1efff1['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x9294a7['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x9294a7['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x9294a7['if']('isEditMode','ck-comment--edit'),_0x9294a7['if']('isSystemComment','ck-comment--info'),_0x9294a7['to']('actionIndicator',_0x2c10e5=>_0x2c10e5?'ck-comment--'+_0x2c10e5:'')],'data-author-id':this['_model']['author']['id'],'data-comment-id':this['_model']['id'],'role':'group'},'children':[this['userView'],{'tag':'div','attributes':{'class':['ck-comment__main','ck-annotation__main']},'children':_0x1efff1}]}]};}['_createEditButton'](){const _0x3305a7=new _0x5e3054(this['locale']);return _0x3305a7['label']=E(this['locale'],'Edit'),_0x3305a7['icon']=_0x45b643,_0x3305a7['withText']=!0x0,_0x3305a7['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x3305a7['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x31486c=>!_0x31486c),_0x3305a7['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x3305a7['on']('execute',()=>this['switchToEditMode']()),_0x3305a7;}['_createRemoveButton'](){const _0x585dd7=new _0x5e3054(this['locale']);return _0x585dd7['label']=E(this['locale'],'Remove'),_0x585dd7['icon']=_0x5337cb,_0x585dd7['withText']=!0x0,_0x585dd7['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x585dd7['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4da3b9=>!_0x4da3b9),_0x585dd7['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x585dd7['on']('execute',()=>{this['showConfirm'](E(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x585dd7;}['_createDropdown'](){const _0x187d2d=_0x4b5ec0(this['locale'],_0x3a2148),_0x57b3b8=_0x187d2d['panelView']['children'],_0x421305=new _0x180d48(this['locale']),_0x3ed477=_0x187d2d['bindTemplate'];_0x23cfdf(_0x187d2d,()=>this['items']['find'](_0x106a09=>_0x106a09['isVisible'])),_0x187d2d['extendTemplate']({'attributes':{'class':[_0x3ed477['if']('isVisible','ck-hidden',_0x249e9a=>!_0x249e9a)]}});const _0xbc355b=(_0x4ac5c1,_0x44fdcb=-0x1)=>{const _0x14c6f9=new _0xa50171(this['locale']);_0x14c6f9['children']['add'](_0x4ac5c1);const _0x341e02=_0x44fdcb>-0x1?_0x44fdcb:_0x421305['items']['length'];_0x421305['items']['add'](_0x14c6f9,_0x341e02);const _0x44910e=Array['from'](this['items']);_0x187d2d['unbind']('isEnabled','isVisible'),_0x187d2d['bind']('isEnabled')['toMany'](_0x44910e,'isEnabled',(..._0x42d8ec)=>_0x42d8ec['some'](_0x4e3324=>_0x4e3324)),_0x187d2d['bind']('isVisible')['toMany'](_0x44910e,'isVisible',(..._0x322e87)=>_0x322e87['some'](_0x402927=>_0x402927));};_0x187d2d['panelPosition']='sw',_0x187d2d['buttonView']['set']({'label':E(this['locale'],'Show\x20more\x20items'),'icon':_0x5c1ab3});for(const _0x31a721 of this['items'])_0xbc355b(_0x31a721);return _0x57b3b8['add'](_0x421305),_0x187d2d['listenTo'](this['items'],'add',(_0x16a4d0,_0x5c262e,_0x5acb0c)=>{_0xbc355b(_0x5c262e,_0x5acb0c);}),_0x187d2d['listenTo'](this['items'],'remove',(_0x3fb0f3,_0x18464d,_0x4d7d7b)=>{_0x421305['items']['remove'](_0x4d7d7b);}),_0x187d2d;}['_attachActions'](_0x34bd2b,_0x4ec1f0){const _0x3f74c7=_0x34bd2b&&_0x34bd2b['element'];_0x3f74c7&&(this['listenTo'](_0x3f74c7,'mouseenter',()=>this['actionIndicator']=_0x4ec1f0),this['listenTo'](_0x3f74c7,'focus',()=>this['actionIndicator']=_0x4ec1f0),this['listenTo'](_0x3f74c7,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x3f74c7,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0xb12dcf=super['_createCommentInputView']();return _0xb12dcf['bind']('placeholder')['to'](this),_0xb12dcf;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Lt(_0x3315a9){const _0x376b5f=Dt(_0x3315a9,0x1e),_0x3eda49=new MutationObserver(_0x18b2ff=>{for(const _0xe525a1 of _0x18b2ff)('attributes'==_0xe525a1['type']&&'class'==_0xe525a1['attributeName']||'childList'==_0xe525a1['type']||'characterData'==_0xe525a1['type'])&&_0x376b5f();});return{'attach'(_0x902f72){_0x3eda49['observe'](_0x902f72,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x3eda49['disconnect'](),_0x376b5f['cancel']();}};}class S extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x5c16ec,_0x24a020){super(_0x5c16ec),this['id']=_0x1e5d77(),this['focusTracker']=new _0xd81594(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x2ba750,_0x3c6f2f)=>this['fire']('Esc',_0x3c6f2f)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=Lt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x24a020),this['mainView']=_0x24a020;const _0x13e950=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x13e950['if']('isActive','ck-annotation-wrapper--active')],'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['focusTracker']['add'](this['element']),this['keystrokes']['listenTo'](this['element']),this['_mutationObserver']['attach'](this['element']);}['destroy'](){this['content']['clear'](),this['keystrokes']['destroy'](),this['focusTracker']['destroy'](),this['_mutationObserver']['detach'](),super['destroy']();}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['_updateHeight'](){const _0x52689b=this['element']['clientHeight'];_0x52689b&&(this['height']=_0x52689b);}}class d extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x321e78(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x44638f,target:_0x1f3e68,type:_0x4b5aa3,isVisible:_0x2a293d=!0x0}){super(),this['view']=_0x44638f,this['view']['element']||this['view']['render'](),this['_type']=_0x4b5aa3,this['_target']=_0x1f3e68,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x11e188([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x47374f,_0x5e41ad)=>{this['view']['focusTracker']['add'](_0x5e41ad);}),this['focusableElements']['on']('remove',(_0x48514c,_0x4aa530)=>{this['view']['focusTracker']['remove'](_0x4aa530);}),this['set']('isVisible',_0x2a293d);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x18c84e=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x18c84e),_0x18c84e;}get['targetRect'](){const _0x281ee5=this['target'];if(null===_0x281ee5)return null;if(_0x281ee5 instanceof _0x229aaa)return _0x281ee5;const _0x177703=_0x281ee5['filter'](_0x27b4a0=>function(_0x1507d1){const _0x47a87e=_0x1507d1['offsetParent'];if(_0x47a87e)return!0x0;const _0x16f811=_0x1507d1['getClientRects']()['item'](0x0);return!!_0x16f811;}(_0x27b4a0));return 0x0===_0x177703['length']?null:new _0x229aaa(_0x177703[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x488d1c){this['view']['isActive']=_0x488d1c,this['view']['mainView']['isActive']=_0x488d1c;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x44ca1c){if(!(null===_0x44ca1c||_0x44ca1c instanceof _0x229aaa||Array['isArray'](_0x44ca1c)&&_0x44ca1c['every'](_0x538558=>li(_0x538558))))throw new _0x4a9b4a('annotation-invalid-target',null,{'target':_0x44ca1c});}['_getNormalizedTarget'](){const _0x1b5606='function'==typeof this['_target']?this['_target']():this['_target'];return li(_0x1b5606)?[_0x1b5606]:_0x1b5606;}}function li(_0x3eb49a){return null!==_0x3eb49a&&'object'==typeof _0x3eb49a&&'nodeType'in _0x3eb49a&&0x1===_0x3eb49a['nodeType'];}class _ extends _0x11e188{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x50d0a6=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0xd81594(),this['_focusTracker']['on']('change:isFocused',(_0x3bdb6c,_0x538aa6,_0x1e38ad)=>{_0x1e38ad||this['fire']('blur');});for(const _0x219e4a of _0x50d0a6)this['add'](_0x219e4a);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0xf72fb9){if(this['has'](_0xf72fb9))throw new _0x4a9b4a('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0xf72fb9['innerView'],_0xf72fb9),this['_viewToAnnotation']['set'](_0xf72fb9['view'],_0xf72fb9);for(const _0x21589d of _0xf72fb9['focusableElements'])this['_focusTracker']['add'](_0x21589d);this['listenTo'](_0xf72fb9['focusableElements'],'add',(_0x51c15e,_0x5965b2)=>{this['_focusTracker']['add'](_0x5965b2);}),this['listenTo'](_0xf72fb9['focusableElements'],'remove',(_0x5f107a,_0xee4684)=>{this['_focusTracker']['remove'](_0xee4684);}),this['listenTo'](_0xf72fb9['view']['focusTracker'],'change:isFocused',(_0x2a4c15,_0x4b35b2,_0x2f519a)=>{_0x2f519a&&this['fire']('focus',_0xf72fb9);}),_0xf72fb9['updateTargetRect']();const _0x19e992=this['_getOrderInContent'](_0xf72fb9['view']['targetRect']);return super['add'](_0xf72fb9,_0x19e992);}['remove'](_0x571d38){if(!this['has'](_0x571d38))throw new _0x4a9b4a('annotationcollection-not-existing-item',null);this['stopListening'](_0x571d38['view']['focusTracker']),this['stopListening'](_0x571d38['focusableElements']);for(const _0x920d64 of _0x571d38['focusableElements'])this['_focusTracker']['remove'](_0x920d64);return this['_viewToAnnotation']['delete'](_0x571d38['view']),this['_innerViewToAnnotation']['delete'](_0x571d38['innerView']),super['remove'](_0x571d38);}['getByInnerView'](_0x41e1dc){return this['_innerViewToAnnotation']['get'](_0x41e1dc);}['getByView'](_0x4fa3f7){return this['_viewToAnnotation']['get'](_0x4fa3f7);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x992302 of this)_0x992302['updateTargetRect']();this['_sort']();}['_sort'](){const _0x3bda92=Array['from'](this)['sort']((_0x39edb3,_0x32eacc)=>v(_0x39edb3['view']['targetRect'],_0x32eacc['view']['targetRect']));for(let _0x56c609=_0x3bda92['length']-0x1;_0x56c609>0x0;_0x56c609--){const _0x3e66ce=_0x3bda92[_0x56c609];_0x56c609!==this['getIndex'](_0x3e66ce)&&(this['remove'](_0x3e66ce),this['add'](_0x3e66ce));}}['_getOrderInContent'](_0x1b1a98){let _0x15a512=0x0;if(!_0x1b1a98)return this['length'];for(const _0x1407be of this){const _0x14d24e=_0x1407be['view']['targetRect'];if(_0x14d24e){if(v(_0x1b1a98,_0x14d24e)<0x0)return _0x15a512;_0x15a512++;}}return _0x15a512;}}function v(_0x4297d4,_0x51b595){if(null===_0x4297d4&&null===_0x51b595)return 0x0;if(null===_0x4297d4)return-0x1;if(null===_0x51b595)return 0x1;const _0x397762=_0x4297d4['top']-_0x51b595['top'];return 0x0==_0x397762?_0x4297d4['left']-_0x51b595['left']:_0x397762;}class O extends _0x11dfc6{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xe6349){if(super(_0xe6349),this['collection']=new _(),this['_visibleAnnotations']=new _(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0xe6349 instanceof _0x240f2b){const _0x7111f8=_0xe6349['locale'];_0xe6349['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':E(_0x7111f8,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':E(_0x7111f8,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':E(_0x7111f8,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':E(_0x7111f8,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':E(_0x7111f8,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':E(_0x7111f8,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':E(_0x7111f8,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x4565e9){this['collection']['add'](_0x4565e9);}['remove'](_0x31bbb3){this['collection']['remove'](_0x31bbb3),_0x31bbb3['destroy']();}['refreshVisibility'](){for(const _0x3b2487 of this['collection'])_0x3b2487['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x5c43a9){return this['collection']['getByInnerView'](_0x5c43a9);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0xb02062 of this['collection'])_0xb02062['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0xe26a76){this['fire']('_activateAnnotation',_0xe26a76);}['createAnnotation'](_0xefb398){return new d(_0xefb398);}['createAnnotationView'](_0x4e8556,_0x1bb5da){return new S(_0x4e8556,_0x1bb5da);}['_addActiveAnnotation'](_0x30ee59){const _0x259438=new Set(this['activeAnnotations']);_0x259438['add'](_0x30ee59),this['activeAnnotations']=_0x259438;}['_removeActiveAnnotation'](_0x14498f){const _0x48e5e9=new Set(this['activeAnnotations']);_0x48e5e9['delete'](_0x14498f),this['activeAnnotations']=_0x48e5e9;}['_bindAnnotationsToVisibleAnnotations'](){const _0x19f0ce=this['collection'],_0x5889a6=this['_visibleAnnotations'];function _0x35c7b5(_0x9062ea){const _0x2ca392=_0x9062ea['source'];_0x2ca392['isVisible']&&!_0x5889a6['has'](_0x2ca392)?_0x5889a6['add'](_0x2ca392):!_0x2ca392['isVisible']&&_0x5889a6['has'](_0x2ca392)&&_0x5889a6['remove'](_0x2ca392),_0x2ca392['view']['focusTracker']['remove'](_0x2ca392['view']['element']),_0x2ca392['view']['focusTracker']['add'](_0x2ca392['view']['element']);}this['listenTo'](_0x19f0ce,'add',(_0x45b4c1,_0x50db76)=>{_0x50db76['isVisible']&&_0x5889a6['add'](_0x50db76),this['listenTo'](_0x50db76,'change:isVisible',_0x35c7b5);}),this['listenTo'](_0x19f0ce,'remove',(_0x1f3417,_0x2f051a)=>{_0x5889a6['has'](_0x2f051a)&&_0x5889a6['remove'](_0x2f051a),this['stopListening'](_0x2f051a,'change:isVisible',_0x35c7b5);});}['_setupEnterAnnotationKeystroke'](){const _0x11f96d=_0x30b270=>{_0x30b270['on']('ready',()=>{_0x30b270['keystrokes']['set'](_0x47dcde,(_0x16520e,_0x452205)=>{const _0x274b57=_0x4224f0(this['activeAnnotations']['values']());_0x274b57&&(_0x274b57['view']['focus'](),_0x452205());});});};this['context']instanceof _0x240f2b?_0x11f96d(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x263451,_0x2800d5)=>{_0x11f96d(_0x2800d5);});}['_setupEscapeAnnotationHandling'](){const _0x12d3e6=_0xc382e5=>{const _0x2ba8f3=_0xc382e5['source'],_0x45f0cc=[];let _0x48f727;if(Array['isArray'](_0x2ba8f3['target'])){_0x48f727=_0x2ba8f3['target'][0x0],this['context']instanceof _0x240f2b?_0x45f0cc['push'](this['context']):this['context']['editors']&&_0x45f0cc['push'](...this['context']['editors']);for(const _0x10bbb1 of _0x45f0cc)for(const _0x2a7f42 of _0x10bbb1['editing']['view']['domRoots']['values']())if(_0x2a7f42['contains'](_0x48f727))return void _0x10bbb1['editing']['view']['focus']();_0x48f727['focus']();}};this['listenTo'](this['collection'],'add',(_0x4e1f30,_0xb4c5c6)=>{this['listenTo'](_0xb4c5c6,'escape',_0x12d3e6,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x1a827c,_0x2a7dc0)=>{this['stopListening'](_0x2a7dc0,'escape',_0x12d3e6);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x11dfc6{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[O,ht,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x22c319){super(_0x22c319),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x13de72=this['context']['config'];_0x13de72['define']('comments.maxCommentsWhenCollapsed',0x2),_0x13de72['define']('comments.maxThreadTotalWeight',0x1f4),_0x13de72['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x13de72['define']('comments.CommentThreadView',vt),_0x13de72['define']('comments.CommentView',gt),_0x13de72['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x249252=this['context']['plugins']['get'](O);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x384618,_0x5724cf)=>this['_addCommentThread'](_0x5724cf)),this['on']('submitCommentThread',(_0x16c2f5,_0x5ddf68)=>this['_submitCommentThread'](_0x5ddf68)),this['on']('resolveCommentThread',(_0x404c81,_0x17d229)=>this['_resolveCommentThread'](_0x17d229)),this['on']('resolveCommentThread',(_0x1c1ff8,_0x144586)=>this['_updateActiveAnnotation'](_0x144586),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x30643d,_0x5bdb34)=>this['_reopenCommentThread'](_0x5bdb34)),this['on']('reopenCommentThread',(_0x4a9783,_0x1261fc)=>this['_updateActiveAnnotation'](_0x1261fc),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x5ec567,_0x355b73)=>this['_removeCommentThread'](_0x355b73)),this['on']('updateCommentThread',(_0x48d1fc,_0x36b57c)=>this['_updateCommentThread'](_0x36b57c)),this['on']('updateCommentThread',(_0x217895,_0x3a76fc)=>this['_updateActiveAnnotation'](_0x3a76fc),{'priority':'lowest'}),this['on']('addComment',(_0x1ff57c,_0x53a594)=>this['_addComment'](_0x53a594)),this['on']('updateComment',(_0x15f059,_0xd637f3)=>this['_updateComment'](_0xd637f3)),this['on']('removeComment',(_0x3f09a7,_0x50565b)=>this['_removeComment'](_0x50565b)),this['on']('addComment',(_0x80c1b2,{threadId:_0x104604,isFromAdapter:_0x504d42})=>{if(_0x504d42)return;const _0x846c4b=this['getCommentThread'](_0x104604),_0x39f5f8=_0x846c4b&&this['_threadToController']['get'](_0x846c4b);_0x39f5f8&&_0x39f5f8['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x249252,'change:activeAnnotations',(_0x3f51a1,_0x18d1b8,_0x14ef11)=>{const _0x50b9c3=Array['from'](_0x14ef11)['map'](_0x176a12=>this['_viewToController']['get'](_0x176a12['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x50b9c3?_0x50b9c3['model']:null;});}set['adapter'](_0x3ea8fb){if(this['_adapter'])throw new _0x4a9b4a('commentsrepository-adapter-already-set');this['_adapter']=_0x3ea8fb;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x14d7fe=Tt,threadId:_0x361e91=_0x1e5d77(),comments:_0x376b98=[],unlinkedAt:_0x1185c9=null,resolvedAt:_0x39f584=null,resolvedBy:_0x40695d=null,target:_0x1bd047=null,context:_0x873007=null,attributes:_0x4d1bfa={},isResolvable:_0x209461=!0x0,isSubmitted:_0x496412=!0x1,isFromAdapter:_0x17a31a=!0x1}={}){return this['fire'](bt('addCommentThread',_0x14d7fe),{'channelId':_0x14d7fe,'threadId':_0x361e91,'comments':_0x376b98,'unlinkedAt':_0x1185c9,'resolvedAt':_0x39f584,'resolvedBy':_0x40695d,'target':_0x1bd047,'context':_0x873007,'attributes':_0x4d1bfa,'isFromAdapter':_0x17a31a,'isResolvable':_0x209461,'isSubmitted':_0x496412}),this['getCommentThread'](_0x361e91);}['openNewCommentThread']({channelId:_0x303a61=Tt,threadId:_0x1777a0=_0x1e5d77(),target:_0xed1421,context:_0x4a7b88=null,isResolvable:_0x1ded7b=!0x0}){if(this['_readOnlyChannels']['has'](_0x303a61)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0xed1421)throw new _0x4a9b4a('commentsrepository-missing-target');const _0x3d8481=this['addCommentThread']({'channelId':_0x303a61,'threadId':_0x1777a0,'target':_0xed1421,'context':_0x4a7b88,'isResolvable':_0x1ded7b});if(!_0x3d8481)return null;const _0x150768=this['_threadToController']['get'](_0x3d8481),_0x452371=_0x150768['view']['commentThreadInputView']['commentInputView'],_0x4eb69e=this['context']['plugins']['get'](O),_0x5e788b=_0x4eb69e['getByInnerView'](_0x150768['view']);return _0x4eb69e['activate'](_0x5e788b),_0x452371['once']('editorReady',()=>_0x452371['focus']()),_0x3d8481;}['hasCommentThread'](_0x337ce5){if('string'!=typeof _0x337ce5)throw new _0x4a9b4a('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x337ce5);}['updateCommentThread']({channelId:_0x37409a=Tt,threadId:_0x2f8738,context:_0x21b982,unlinkedAt:_0x4d2965,attributes:_0x48a180,isFromAdapter:_0x1ed778=!0x1}){return this['fire'](bt('updateCommentThread',_0x37409a),{'channelId':_0x37409a,'threadId':_0x2f8738,'context':_0x21b982,'unlinkedAt':_0x4d2965,'attributes':_0x48a180,'isFromAdapter':_0x1ed778}),this['getCommentThread'](_0x2f8738);}['getCommentThread'](_0x2ae886){if('string'!=typeof _0x2ae886)throw new _0x4a9b4a('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x2ae886);}['fetchCommentThread']({channelId:_0xa93ac5,threadId:_0x13e279}={}){const _0x5ada0b=this['getCommentThread'](_0x13e279);if(_0x5ada0b)return Promise['resolve'](_0x5ada0b);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x4a9b4a('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0xa93ac5,'threadId':_0x13e279})['then'](_0x23aafa=>this['hasCommentThread'](_0x13e279)?this['getCommentThread'](_0x13e279):_0x23aafa?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0xa93ac5},_0x23aafa)):void 0x0)['catch'](_0x2eaea1=>{throw console['error'](_0x2eaea1),new _0x4a9b4a('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x46bb92,skipNotAttached:_0x363ce7=!0x1,skipEmpty:_0x1608ae=!0x1,toJSON:_0x3193b0=!0x1}={}){const _0x20121f=[];for(const _0x28c46a of this['_threads']['values']())_0x46bb92&&_0x28c46a['channelId']!==_0x46bb92||_0x363ce7&&!_0x28c46a['isAttached']||_0x1608ae&&0x0===_0x28c46a['length']||_0x20121f['push'](_0x28c46a);return _0x3193b0?_0x20121f['map'](_0x4bd535=>_0x4bd535['toJSON']()):_0x20121f;}['setActiveCommentThread'](_0x1069ce){const _0x532754=this['context']['plugins']['get'](O);if(!_0x1069ce)return void(this['activeCommentThread']&&_0x532754['deactivateAll']());const _0x58557f=this['getCommentThread'](_0x1069ce);if(!_0x58557f)throw new _0x4a9b4a('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x1069ce});if(!this['_threadToController']['has'](_0x58557f))throw new _0x4a9b4a('commentsrepository-active-not-attached',null,{'threadId':_0x1069ce});const _0xc0fe29=_0x532754['getByInnerView'](this['_threadToController']['get'](_0x58557f)['view']);_0x532754['activate'](_0xc0fe29);}['switchReadOnly'](_0x1c6412,_0x2ea3ab){_0x1c6412?this['_readOnlyChannels']['add'](_0x2ea3ab):this['_readOnlyChannels']['delete'](_0x2ea3ab),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x5ce05f){return this['_readOnlyChannels']['has'](_0x5ce05f)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x58def7,_0x5d29e6){return new Ct(_0x58def7,_0x5d29e6);}['setPermissions'](_0x1c585e,_0x519394=Tt){this['_permissions']['set'](_0x519394,_0x1c585e),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x545daa=Tt){return this['_permissions']['has'](_0x545daa)?this['_permissions']['get'](_0x545daa):_t;}['_addCommentThread']({channelId:_0x4b9c6,threadId:_0x21764f,comments:_0x5d8954,unlinkedAt:_0x51d61f,resolvedAt:_0x8ac34b,resolvedBy:_0x85aab8,target:_0xc4ab4c,context:_0x977482,attributes:_0x334d3e,isFromAdapter:_0x410b85,isResolvable:_0x240ec8,isSubmitted:_0x1abd8f}){if('string'!=typeof _0x21764f)throw new _0x4a9b4a('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x21764f});if(this['hasCommentThread'](_0x21764f))throw new _0x4a9b4a('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x21764f});const _0x3752dd=new ui(this,{'channelId':_0x4b9c6,'id':_0x21764f,'context':_0x977482,'attributes':_0x334d3e,'unlinkedAt':_0x51d61f,'resolvedAt':_0x8ac34b,'resolvedBy':_0x85aab8?this['context']['plugins']['get'](it)['getUser'](_0x85aab8):null,'isResolvable':_0x240ec8,'isSubmitted':_0x1abd8f||_0x410b85});this['_threads']['set'](_0x21764f,_0x3752dd);for(const _0x16d5a8 of _0x5d8954)_0x3752dd['_add'](this['_createNewComment']({'threadId':_0x21764f,..._0x16d5a8}));return _0xc4ab4c&&_0x3752dd['attachTo'](_0xc4ab4c),_0x410b85||!_0x3752dd['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x4b9c6,'threadId':_0x21764f});}['_submitCommentThread']({channelId:_0x123877,threadId:_0x2223f4}){if(!this['hasCommentThread'](_0x2223f4))throw new _0x4a9b4a('commentsrepository-missing-comment-thread',this);const _0x2c86a7=this['getCommentThread'](_0x2223f4);if(_0x2c86a7['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x4726bc,comments:_0x3bf7f2,resolvedAt:_0x29a34e,resolvedBy:_0x203f88,context:_0x3867bb,attributes:_0x3aa43f}=_0x2c86a7,_0x11d931=this['context']['plugins']['get']('PendingActions'),_0x1b9d3c=_0x11d931['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x123877,'threadId':_0x4726bc,'comments':_0x3bf7f2['map'](_0x54eaa3=>_0x54eaa3['toJSON']()),'resolvedAt':_0x29a34e,'resolvedBy':_0x203f88?_0x203f88['id']:_0x203f88,'context':_0x3867bb,'attributes':_0x3aa43f})['then'](({comments:_0x3f7d24})=>{_0x11d931['remove'](_0x1b9d3c);for(const _0x117c9a of _0x3f7d24)this['_updateComment']({'channelId':_0x123877,'threadId':_0x2223f4,'commentId':_0x117c9a['commentId'],'createdAt':_0x117c9a['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x205f1c=>{throw console['error'](_0x205f1c),new _0x4a9b4a('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x4d23dd,target:_0x52d968}){const _0x170040=this['getCommentThread'](_0x4d23dd);if(!_0x170040)throw new _0x4a9b4a('commentsrepository-attach-missing-comment-thread',this);const _0x42c98b=this['context']['plugins']['get']('PendingActions'),_0x3c5800=this['context']['plugins']['get'](O),_0x54d5e7=this['_createCommentThreadView'](_0x170040),_0x4588f2=new Ct(_0x170040,_0x54d5e7);let _0x2d651a=null;_0x54d5e7['on']('change:isDirty',(_0x594a84,_0x187b42,_0x504685)=>{_0x504685?_0x2d651a=_0x42c98b['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x2d651a&&(_0x42c98b['remove'](_0x2d651a),_0x2d651a=null);}),this['_threadToController']['set'](_0x170040,_0x4588f2),this['_viewToController']['set'](_0x54d5e7,_0x4588f2);const _0x229e77=new S(this['context']['locale'],_0x54d5e7);_0x229e77['bind']('length')['to'](_0x54d5e7),_0x229e77['bind']('isDirty')['to'](_0x54d5e7,'isDirty',_0x54d5e7,'length',(_0x2cdb7d,_0x174c7e)=>_0x2cdb7d||!_0x174c7e),_0x229e77['bind']('isActive')['to'](_0x54d5e7),_0x229e77['type']='comment';const _0x350e0b=new d({'view':_0x229e77,'target':_0x52d968,'type':'comment','isVisible':!_0x170040['archivedAt']});return _0x54d5e7['on']('escape',()=>{_0x350e0b['fire']('escape');}),this['_bindAnnotationToEditors'](_0x54d5e7,_0x350e0b),_0x3c5800['add'](_0x350e0b),_0x350e0b;}['_bindAnnotationToEditors'](_0x2f02a1,_0x4c4297){this['listenTo'](_0x2f02a1,'editorReady',(_0x4b9383,_0x461937)=>{const _0x4e11f4=_0x461937['ui']['view']['body']['bodyCollectionContainer'];_0x4c4297['focusableElements']['add'](_0x4e11f4),this['context']instanceof _0x240f2b&&this['context']['ui']['focusTracker']['add'](_0x4e11f4);},{'priority':'highest'}),this['listenTo'](_0x2f02a1,'editorDestroyed',(_0x5a6669,_0x3deefc)=>{const _0x1c3b0a=_0x3deefc['ui']['view']['body']['bodyCollectionContainer'];_0x4c4297['focusableElements']['has'](_0x1c3b0a)&&_0x4c4297['focusableElements']['remove'](_0x1c3b0a),this['context']instanceof _0x240f2b&&this['context']['ui']['focusTracker']['remove'](_0x1c3b0a);});}['_unbindEditors'](_0x5828f9){this['stopListening'](_0x5828f9,'editorReady'),this['stopListening'](_0x5828f9,'editorDestroyed');}['_createCommentThreadView'](_0x2236e6){const _0x2c0371=this['context']['plugins']['get'](it),{config:_0x4e1401,locale:_0x338002}=this['context'],_0x37e257=lt(_0x4e1401['get']('locale'),_0x338002);return new(0x0,(_0x4e1401['get']('comments'))['CommentThreadView'])(_0x338002,_0x2236e6,_0x2c0371['me'],{'editorConfig':{..._0x4e1401['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x4e1401['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x4e1401['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x4e1401['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x4e1401['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x37e257,'CommentView':_0x4e1401['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x26d294,channelId:_0x2e5fa3,resolvedAt:_0x5a85f0,resolvedBy:_0x1ab2f8,isFromAdapter:_0x18a1c9}){if(!this['hasCommentThread'](_0x26d294))throw new _0x4a9b4a('commentsrepository-missing-comment-thread',null,{'threadId':_0x26d294});const _0x12f44f=this['getCommentThread'](_0x26d294);if(_0x12f44f['isResolved'])throw new _0x4a9b4a('commentsrepository-resolved-comment-thread',null,{'threadId':_0x26d294});const _0x485a67=this['context']['plugins']['get'](it);if(_0x12f44f['resolvedBy']=_0x485a67['getUser'](_0x1ab2f8),_0x12f44f['resolvedAt']=_0x5a85f0,_0x18a1c9||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x3a0801=this['context']['plugins']['get']('PendingActions'),_0x22ee48=_0x3a0801['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x2e5fa3,'threadId':_0x26d294})['then'](({resolvedAt:_0x2ea480,resolvedBy:_0x3b2c0d})=>{_0x3a0801['remove'](_0x22ee48),_0x12f44f['resolvedBy']['id']!==_0x3b2c0d&&(_0x12f44f['resolvedBy']=_0x485a67['getUser'](_0x3b2c0d)),_0x12f44f['resolvedAt']=_0x2ea480;})['catch'](_0x679b03=>{throw console['error'](_0x679b03),new _0x4a9b4a('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x5d45e3,channelId:_0x1304b4,isFromAdapter:_0x44769e}){if(!this['hasCommentThread'](_0x5d45e3))throw new _0x4a9b4a('commentsrepository-missing-comment-thread',null,{'threadId':_0x5d45e3});const _0x984118=this['getCommentThread'](_0x5d45e3);if(!_0x984118['isResolved'])throw new _0x4a9b4a('commentsrepository-reopen-comment-thread',null,{'threadId':_0x5d45e3});if(_0x984118['resolvedBy']=null,_0x984118['resolvedAt']=null,_0x44769e||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x492e92=this['context']['plugins']['get']('PendingActions'),_0x4763f3=_0x492e92['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x1304b4,'threadId':_0x5d45e3})['then'](()=>_0x492e92['remove'](_0x4763f3))['catch'](_0x185a98=>{throw console['error'](_0x185a98),new _0x4a9b4a('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x1fdf27,isFromAdapter:_0xd39a9c}){const _0xee5fe1=this['getCommentThread'](_0x1fdf27);if(!_0xee5fe1)throw new _0x4a9b4a('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x1fdf27),this['_threads']['delete'](_0x1fdf27),!_0xee5fe1['isSubmitted']||_0xd39a9c||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x28a5ca=this['context']['plugins']['get']('PendingActions'),{channelId:_0x8e80f5}=_0xee5fe1,_0x3cfeca=_0x28a5ca['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x8e80f5,'threadId':_0x1fdf27})['then'](()=>_0x28a5ca['remove'](_0x3cfeca))['catch'](_0x2d5862=>{throw console['error'](_0x2d5862),new _0x4a9b4a('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x3d7044,unlinkedAt:_0x45adaf,context:_0x244dee,attributes:_0x196594,isFromAdapter:_0x4bcaff}){if('string'!=typeof _0x3d7044)throw new _0x4a9b4a('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x3d7044});if(!this['hasCommentThread'](_0x3d7044))throw new _0x4a9b4a('commentsrepository-missing-comment-thread',null,{'threadId':_0x3d7044});const _0x27da4b=this['getCommentThread'](_0x3d7044);let _0x136257=!0x1;if(void 0x0!==_0x244dee&&_0x27da4b['context']!==_0x244dee&&(_0x27da4b['context']=_0x244dee,_0x136257=!0x0),void 0x0!==_0x45adaf&&_0x27da4b['unlinkedAt']!==_0x45adaf&&(_0x27da4b['unlinkedAt']=_0x45adaf,_0x136257=!0x0),_0x196594&&!wt(_0x196594,_0x27da4b['attributes'])&&(_0x27da4b['attributes']=_0x196594,_0x136257=!0x0),!_0x136257)return Promise['resolve']();if(!_0x27da4b['isSubmitted']||_0x4bcaff||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x44ab40=this['context']['plugins']['get']('PendingActions'),{channelId:_0x299326}=_0x27da4b,_0xdc6ce0=_0x44ab40['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x299326,'threadId':_0x3d7044,'context':_0x244dee,'unlinkedAt':_0x45adaf,'attributes':_0x196594})['then'](()=>_0x44ab40['remove'](_0xdc6ce0))['catch'](_0x171300=>{throw console['error'](_0x171300),new _0x4a9b4a('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x53385c){const _0x3ff517=this['context']['plugins']['get'](O),_0x3a1ddd=this['getCommentThread'](_0x53385c);if(_0x3a1ddd['_isAttached']=!0x1,this['_threadToController']['has'](_0x3a1ddd)){const _0xab8c4e=this['_threadToController']['get'](_0x3a1ddd),_0x397aee=_0xab8c4e['view'],_0x1de5ad=_0x3ff517['getByInnerView'](_0x397aee);this['_threadToController']['delete'](_0x3a1ddd),this['_viewToController']['delete'](_0x397aee),_0x1de5ad&&_0x3ff517['remove'](_0x1de5ad),_0xab8c4e['destroy'](),_0x397aee['destroy']()['then'](()=>{this['_unbindEditors'](_0x397aee);});}}['_updateActiveAnnotation']({threadId:_0x469773,resolvedAt:_0x55915b,unlinkedAt:_0x73363e}){const _0x4d3134=!!_0x55915b,_0x5dcc28=this['context']['plugins']['get'](O),_0xe68c91=this['getCommentThread'](_0x469773);if(this['_threadToController']['has'](_0xe68c91)){const _0x1319c3=this['_threadToController']['get'](_0xe68c91)['view'],_0xdd8913=_0x5dcc28['getByInnerView'](_0x1319c3);_0xdd8913&&(_0x4d3134&&_0x5dcc28['_removeActiveAnnotation'](_0xdd8913),_0x73363e?_0xdd8913['isVisible']=!0x1:_0xdd8913['refreshVisibility']());}}['_getExternalAuthor'](_0x5bbcec){const _0x3d4156=this['context']['plugins']['get'](it),_0x5c9e8f=pt('external:'+_0x5bbcec),_0x442ac4=_0x3d4156['getUser'](_0x5c9e8f);return _0x442ac4||_0x3d4156['addUser']({'id':_0x5c9e8f,'name':_0x5bbcec});}['_createNewComment']({threadId:_0x302d42,commentId:_0x5c454e=_0x1e5d77(),content:_0x11fc32,authorId:_0x2cf71e,createdAt:_0x166148,attributes:_0x2b2d37}){if('string'!=typeof _0x5c454e)throw new _0x4a9b4a('commentsrepository-invalid-commentid');if('string'!=typeof _0x2cf71e)throw new _0x4a9b4a('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x11fc32||!_0x11fc32['trim']())throw new _0x4a9b4a('commentsrepository-invalid-comment-content');const _0x5b8691=this['context']['plugins']['get'](it)['getUser'](_0x2cf71e);if(!_0x5b8691)throw new _0x4a9b4a('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x2cf71e});let _0x5f05fc=null,_0x327c19=_0x166148;return _0x2b2d37?.['@external']&&(_0x5f05fc=this['_getExternalAuthor'](_0x2b2d37['@external']['authorName']),_0x327c19=new Date(_0x2b2d37['@external']['createdAt'])),new fi(this,{'threadId':_0x302d42,'id':_0x5c454e,'author':_0x5f05fc||_0x5b8691,'creator':_0x5b8691,'content':_0x11fc32,'createdAt':_0x166148,'authoredAt':_0x327c19,'attributes':_0x2b2d37});}['_addComment'](_0xc2d1ab){let {threadId:_0x173f4f,content:_0x1d72ad,attributes:_0x1b67fa,isFromAdapter:_0x165372}=_0xc2d1ab;const _0x10046a=this['getCommentThread'](_0xc2d1ab['threadId']);if(!_0x10046a)throw new _0x4a9b4a('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x3056dd=this['_createNewComment'](_0xc2d1ab),{id:_0xecb2cb}=_0x3056dd;if(_0x10046a['_add'](_0x3056dd),_0x165372||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x10046a['isSubmitted'])return Promise['resolve']();const _0xa9ae50=this['context']['plugins']['get']('PendingActions'),{channelId:_0x253bf9}=_0x10046a,_0x174017=_0xa9ae50['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x1b67fa||(_0x1b67fa={}),this['adapter']['addComment']({'channelId':_0x253bf9,'threadId':_0x173f4f,'commentId':_0xecb2cb,'content':_0x1d72ad,'attributes':_0x1b67fa})['then'](_0x38311b=>{_0xa9ae50['remove'](_0x174017),_0x38311b&&this['_updateComment']({'channelId':_0x253bf9,'threadId':_0x173f4f,'commentId':_0xecb2cb,'createdAt':_0x38311b['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x2ce181=>{throw console['error'](_0x2ce181),new _0x4a9b4a('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x402ffd,commentId:_0x2a3de7,content:_0x562870,createdAt:_0x3e862a,attributes:_0x542382,isFromAdapter:_0x465c97}){if(void 0x0!==_0x562870&&('string'!=typeof _0x562870||!_0x562870['trim']()['length']))throw new _0x4a9b4a('commentsrepository-update-comment-invalid-content');const _0x186791=this['getCommentThread'](_0x402ffd),_0x53ec84=_0x186791['getComment'](_0x2a3de7);if(!_0x53ec84)throw new _0x4a9b4a('commentsrepository-update-missing-comment',this);let _0x46d169=!0x1;if(_0x562870&&_0x562870!==_0x53ec84['content']&&(_0x53ec84['isEditable']||_0x465c97)&&(_0x53ec84['content']=_0x562870,_0x46d169=!0x0),_0x3e862a&&_0x3e862a!==_0x53ec84['createdAt']&&(_0x53ec84['createdAt']=_0x3e862a,_0x53ec84['attributes']&&_0x53ec84['attributes']['@external']||(_0x53ec84['authoredAt']=_0x3e862a),_0x46d169=!0x0),_0x542382&&!wt(_0x542382,_0x53ec84['attributes'])&&(_0x53ec84['attributes']=_0x542382,_0x46d169=!0x0),!_0x46d169)return Promise['resolve']();if(_0x186791['fire']('commentUpdated'),_0x465c97||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x4f17ac=this['context']['plugins']['get']('PendingActions'),{channelId:_0x15c23a}=this['getCommentThread'](_0x53ec84['threadId']),_0x52f19b=_0x4f17ac['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x15c23a,'threadId':_0x402ffd,'commentId':_0x2a3de7,'content':_0x562870,'attributes':_0x542382})['then'](()=>_0x4f17ac['remove'](_0x52f19b))['catch'](_0x557d5e=>{throw console['error'](_0x557d5e),new _0x4a9b4a('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x1ae2c1,commentId:_0x331408,isFromAdapter:_0x2ac32c}){const _0x24944c=this['getCommentThread'](_0x1ae2c1),_0x26b978=_0x24944c['getComment'](_0x331408);if(!_0x26b978)throw new _0x4a9b4a('commentsrepository-remove-missing-comment',this);if(_0x24944c['_remove'](_0x26b978),_0x2ac32c||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x50b0f7=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4fa4c2}=_0x24944c,_0x4ecdac=_0x50b0f7['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x4fa4c2,'threadId':_0x1ae2c1,'commentId':_0x331408})['then'](()=>_0x50b0f7['remove'](_0x4ecdac))['catch'](_0x4c5241=>{throw console['error'](_0x4c5241),new _0x4a9b4a('commentsrepository-remove-comment-internal-error',this);});}}class ui extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x321e78(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x48e004,_0x778853){super();const _0x16085e=_0x778853['isResolvable'];this['channelId']=_0x778853['channelId'],this['id']=_0x778853['id'],this['comments']=new _0x11e188(),this['_repository']=_0x48e004,this['_isAttached']=!0x1,this['_isSubmitted']=_0x778853['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x48e004,'_permissions',_0x48e004,'_readOnlyChannels',()=>_0x48e004['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x48e004,'_permissions',()=>_0x48e004['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x48e004,'_permissions',()=>{const _0x1f673d=_0x48e004['getPermissions'](this['channelId']);return _0x1f673d['write']||_0x1f673d['admin'];}),this['bind']('isResolvable')['to'](_0x48e004,'_permissions',()=>_0x16085e&&_0x48e004['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x778853['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x4617d6,_0x4b3680)=>_0x4617d6?_0x4b3680?_0x4617d6<_0x4b3680?_0x4617d6:_0x4b3680:_0x4617d6:_0x4b3680),this['set']('unlinkedAt',_0x778853['unlinkedAt']||null),this['set']('resolvedAt',_0x778853['resolvedAt']||null),this['set']('resolvedBy',_0x778853['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x4b6dc8=>!!_0x4b6dc8),this['set']('attributes',_0x778853['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x404ffe,_0x143b25)=>_0x404ffe+_0x143b25['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x542013,id:_0xef841d}=this;this['_repository']['fire'](bt('submitCommentThread',_0x542013),{'channelId':_0x542013,'threadId':_0xef841d});}['setUnlinkedAt'](_0x55a261){this['_update']({'unlinkedAt':_0x55a261});}['resolve']({resolvedAt:_0x23f763=new Date(),resolvedBy:_0x48f970=null,isFromAdapter:_0x29b9bb=!0x1}={}){const _0x557134=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x31fc47,id:_0x21985e}=this;this['_repository']['fire'](bt('resolveCommentThread',_0x31fc47),{'channelId':_0x31fc47,'threadId':_0x21985e,'resolvedAt':_0x23f763,'resolvedBy':_0x48f970||_0x557134['id'],'isFromAdapter':_0x29b9bb});}['reopen']({isFromAdapter:_0x485bd4=!0x1}={}){const {channelId:_0x3a4670,id:_0x4b4dff}=this;this['_repository']['fire'](bt('reopenCommentThread',_0x3a4670),{'channelId':_0x3a4670,'threadId':_0x4b4dff,'isFromAdapter':_0x485bd4});}['setContext'](_0x35c737){this['context']||this['_update']({'context':_0x35c737});}['setAttribute'](_0x3c7138,_0x43de76){const _0x207026=It(this['attributes']);At(_0x207026,_0x3c7138,_0x43de76),this['_update']({'attributes':_0x207026});}['removeAttribute'](_0xb5c980){const _0x4e853d=It(this['attributes']);yt(_0x4e853d,_0xb5c980),this['_update']({'attributes':_0x4e853d});}['remove']({isFromAdapter:_0xa903ce=!0x1}={}){const {channelId:_0x51c35e,id:_0x19edc5}=this;this['_repository']['fire'](bt('removeCommentThread',_0x51c35e),{'channelId':_0x51c35e,'threadId':_0x19edc5,'isFromAdapter':_0xa903ce});}['attachTo'](_0x1b8514){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x1b8514});}['addComment'](_0x37ec96){const {channelId:_0x20c496,id:_0x3d5cd0}=this;this['_repository']['fire'](bt('addComment',_0x20c496,_0x3d5cd0),Object['assign']({'channelId':_0x20c496,'threadId':_0x3d5cd0},_0x37ec96));}['getComment'](_0x32ccd0){if('string'!=typeof _0x32ccd0)throw new _0x4a9b4a('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x32ccd0});return this['comments']['get'](_0x32ccd0);}['toJSON'](){return{'threadId':this['id'],'context':this['context'],'unlinkedAt':this['unlinkedAt'],'resolvedAt':this['resolvedAt'],'resolvedBy':this['resolvedBy']?this['resolvedBy']['id']:null,'archivedAt':this['archivedAt'],'comments':this['comments']['map'](_0xb32705=>_0xb32705['toJSON']()),'attributes':this['attributes']};}['_add'](_0x4a820d){return this['listenTo'](_0x4a820d,'change:authoredAt',()=>{const _0x319804=this['_findOptimalIndex'](_0x4a820d),_0x1c7904=this['comments'];_0x319804-0x1!=_0x1c7904['getIndex'](_0x4a820d)&&_0x319804+0x1!=_0x1c7904['getIndex'](_0x4a820d)&&(this['_remove'](_0x4a820d),this['_add'](_0x4a820d));}),this['comments']['add'](_0x4a820d,this['_findOptimalIndex'](_0x4a820d));}['_update'](_0x4941cc){const {channelId:_0x25c98b,id:_0xaa47ea}=this;this['_repository']['fire'](bt('updateCommentThread',_0x25c98b),{..._0x4941cc,'channelId':_0x25c98b,'threadId':_0xaa47ea});}['_remove'](_0x15995d){return this['stopListening'](_0x15995d),_0x15995d['destroy'](),this['comments']['remove'](_0x15995d);}['_findOptimalIndex'](_0x1f59ab){const _0x229c58=this['comments']['find'](_0x2cf7db=>new Date(_0x2cf7db['authoredAt'])['getTime']()>new Date(_0x1f59ab['authoredAt'])['getTime']());return _0x229c58?this['comments']['getIndex'](_0x229c58):this['length'];}}class fi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x321e78(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x46f729,_0x40439b){super();const _0x2d8980=_0x46f729['context']['plugins']['get'](it)['me'],_0x4cda6f=_0x46f729['getCommentThread'](_0x40439b['threadId']),_0x25dfb8=0x0===_0x4cda6f['comments']['length'],_0x60fcf4=_0x2d8980===_0x40439b['author'];this['id']=_0x40439b['id'],this['threadId']=_0x40439b['threadId'],this['author']=_0x40439b['author'],this['creator']=_0x40439b['creator'],this['isExternal']=Boolean(_0x40439b['attributes']&&_0x40439b['attributes']['@external']),this['set']('content',_0x40439b['content']),this['createdAt']=_0x40439b['createdAt']||new Date(),this['set']('authoredAt',_0x40439b['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x4cda6f,'resolvedAt'),this['set']('attributes',_0x40439b['attributes']||{}),this['bind']('isEditable')['to'](_0x46f729,'_permissions',()=>{const _0x473ec6=_0x46f729['getPermissions'](_0x4cda6f['channelId'])['write'],_0x560eb7=_0x46f729['getPermissions'](_0x4cda6f['channelId'])['modifyAll'];return _0x60fcf4&&_0x473ec6||!_0x60fcf4&&_0x560eb7;}),this['bind']('isRemovable')['to'](_0x4cda6f,'isRemovable',_0x46f729,'_permissions',_0x2327db=>{const _0x5cb9c9=_0x46f729['getPermissions'](_0x4cda6f['channelId'])['write'],_0x2dd4b8=_0x46f729['getPermissions'](_0x4cda6f['channelId'])['modifyAll'];return _0x60fcf4&&_0x5cb9c9||_0x2327db&&_0x25dfb8||!_0x60fcf4&&_0x2dd4b8&&!_0x25dfb8;}),this['bind']('isReadOnly')['to'](_0x4cda6f,'isReadOnly'),this['_repository']=_0x46f729;}get['weight'](){return Math['max'](function(_0x55a326){const _0x27f641=document['createElement']('div');return _0x27f641['innerHTML']=_0x55a326,_0x27f641['textContent']['length'];}(this['content']),0xc8);}['update'](_0x6bc0c2){const {threadId:_0x4dcde8,id:_0x38b3}=this;if(!this['_repository']['hasCommentThread'](_0x4dcde8))throw new _0x4a9b4a('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x3db277}=this['_repository']['getCommentThread'](_0x4dcde8);this['_repository']['fire'](bt('updateComment',_0x3db277,_0x4dcde8),{'channelId':_0x3db277,'threadId':_0x4dcde8,'commentId':_0x38b3,..._0x6bc0c2});}['setAttribute'](_0x46012e,_0x3e2f21){const _0xe2ab16=It(this['attributes']);At(_0xe2ab16,_0x46012e,_0x3e2f21),this['update']({'attributes':_0xe2ab16});}['removeAttribute'](_0x234963){const _0x5c8ed9=It(this['attributes']);yt(_0x5c8ed9,_0x234963),this['update']({'attributes':_0x5c8ed9});}['remove'](_0x153402={}){if(!_0x153402['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x59cec6,id:_0x588eea}=this;if(!this['_repository']['hasCommentThread'](_0x59cec6))throw new _0x4a9b4a('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x89aa9b}=this['_repository']['getCommentThread'](_0x59cec6);this['_repository']['fire'](bt('removeComment',_0x89aa9b,_0x59cec6),{'channelId':_0x89aa9b,'threadId':_0x59cec6,'commentId':_0x588eea,..._0x153402});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0x29445d,..._0x45f2c2){for(const _0x1331b8 of _0x45f2c2)void 0x0!==_0x1331b8&&(_0x29445d+=':'+String(_0x1331b8));return _0x29445d;}class J extends _0xc8a10b{['refresh'](){const _0x14b1b2=this['editor']['model']['document']['selection'];for(const _0x1015b4 of _0x14b1b2['getRanges']())if(this['_hasContent'](_0x1015b4))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x387950=_0x1e5d77()}={}){const _0x3426bc=this['editor']['model'],_0x326006=[];for(const _0x4d6f1c of _0x3426bc['document']['selection']['getRanges']())this['_hasContent'](_0x4d6f1c)&&_0x326006['push'](this['_trimToContent'](_0x4d6f1c));_0x3426bc['change'](_0x1aaed7=>{for(const _0x51ff29 of _0x326006){const _0x3bf9a=_0x1e5d77()['substr'](0x1,0x5),_0x1c0301='comment:'+_0x387950+':'+_0x3bf9a;_0x1aaed7['addMarker'](_0x1c0301,{'range':_0x51ff29,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x487ae6){for(const _0xb20032 of _0x487ae6['getItems']())if(this['_itemIsContent'](_0xb20032))return!0x0;return!0x1;}['_itemIsContent'](_0x30c230){return _0x30c230['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x30c230)&&!_0x30c230['is']('element','tableCell');}['_trimToContent'](_0xc1df2d){const _0x5ceced=_0x40f225=>!this['_itemIsContent'](_0x40f225['item']),_0x3e576d=_0xc1df2d['start']['getLastMatchingPosition'](_0x5ceced),_0x151687=_0xc1df2d['end']['getLastMatchingPosition'](_0x5ceced,{'direction':'backward'});return this['editor']['model']['createRange'](_0x3e576d,_0x151687);}}class P extends _0xfe9bd5{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[O];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4cec52){super(_0x4cec52),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x5ebacf=this['editor'],_0x1acfae=_0x5ebacf['model']['document']['selection'],_0x35d3a6=_0x3ad571(()=>this['refreshSelectedViews'](),0xa);_0x1acfae['on']('change:range',(_0x5ca411,_0x19ac08)=>{_0x19ac08['directChange']&&(_0x35d3a6['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x5ebacf['editing']['view']['document'],'change:isFocused',(_0x5754e5,_0x3b686c,_0x3a20bf)=>{_0x3a20bf&&_0x35d3a6();}),this['listenTo'](_0x5ebacf['ui']['focusTracker'],'change:isFocused',(_0x56d0d4,_0x200a73,_0x37789d)=>{_0x37789d||_0x5ebacf['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x1bbac5=>this['_editorAnnotationsData']['has'](_0x1bbac5['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x58525b){if(this['_editorAnnotations']['has'](_0x58525b['view']))return;this['_editorAnnotations']['add'](_0x58525b['view']),this['editor']['ui']['focusTracker']['add'](_0x58525b['view']['element']);const _0x10d6cc=this['editor']['plugins']['get'](O);this['listenTo'](_0x10d6cc['collection'],'remove',(_0x25e35d,_0x39209e)=>{this['editor']['ui']['focusTracker']['remove'](_0x39209e['view']['element']),this['_editorAnnotations']['delete'](_0x39209e['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x17b4c5){if('function'!=typeof _0x17b4c5)throw new _0x4a9b4a('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x17b4c5);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x1b897e,annotations:_0x5ecf54}){const _0x4c6705=[],_0x5c7fab=this['editor']['model']['document']['selection'],_0x17ba5a=Array['from'](_0x5c7fab['getRanges']());for(const [_0x528409,_0x3116e9]of this['_editorAnnotationsData']){const _0x5d7edd=_0x3f12b1(_0x3116e9),_0x32a053=_0x5ecf54['getByInnerView'](_0x528409);_0x5d7edd&&_0x32a053&&_0x4c6705['push']({'annotation':_0x32a053,'range':_0x5d7edd});}function _0x3f12b1(_0x382e6d){for(const _0x596645 of _0x382e6d)for(const _0x34f7db of _0x17ba5a)if(_0x596645['containsRange'](_0x34f7db,!_0x5c7fab['isCollapsed']))return _0x596645;return null;}return _0x4c6705['sort']((_0x5f3239,_0x33436c)=>{const _0x65bedf=_0x5f3239['range'],_0x3ece33=_0x33436c['range'];if(!_0x65bedf['isEqual'](_0x3ece33)){if(_0x65bedf['containsRange'](_0x3ece33,!0x0))return 0x1;if(_0x3ece33['containsRange'](_0x65bedf,!0x0))return-0x1;}return _0x5f3239['annotation']==_0x1b897e?-0x1:_0x33436c['annotation']==_0x1b897e?0x1:0x0;})['map'](_0x20577a=>_0x20577a['annotation']);}get['_editorAnnotationsData'](){const _0x2ba279=new Map();for(const _0x3c12a6 of Array['from'](this['_dataCollectors']))for(const [_0x3188d3,_0x45eada]of _0x3c12a6())_0x2ba279['set'](_0x3188d3,_0x45eada);return _0x2ba279;}}class st extends _0xfe9bd5{['afterInit'](){const _0x160b02=this['editor'];if(!_0x160b02['plugins']['has']('RestrictedEditingModeEditing'))return;_0x160b02['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0xfe9bd5{constructor(_0x13df70){super(_0x13df70),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x59745a=this['editor'],_0x3db3b4=_0x59745a['commands']['get']('importWord'),_0x21f22a=_0x59745a['plugins']['get'](it);_0x3db3b4&&(_0x3db3b4['on']('execute',(_0x1ab587,[,_0x31e3c9])=>{_0x31e3c9['collaboration_features']={'comments':!0x0,'user_id':_0x21f22a['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x3db3b4,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x54eddc,_0x292c65){const {comment_threads:_0xad9124}=_0x292c65;_0xad9124&&_0xad9124['forEach'](({thread_id:_0x36de4c,comments:_0x287063,is_resolved:_0x364e73})=>{const _0x2fb364=new Date(),_0x54f594=_0x287063['map'](({author:_0x3f3947,content:_0x2e5689,created_at:_0x2ff1dc})=>({'content':_0x2e5689,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x2fb364,'attributes':{'@external':{'authorName':_0x3f3947,'createdAt':_0x2ff1dc?new Date(_0x2ff1dc):new Date(),'source':'importWord'}}})),_0x1f851a=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x1f851a,'threadId':_0x36de4c,'comments':_0x54f594,'resolvedAt':_0x364e73?_0x2fb364:null});});}}class at extends _0xfe9bd5{constructor(_0xcf32b8){super(_0xcf32b8),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x5e1b19=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x5e1b19,'contentInsertion',(_0x5f064f,_0x216c32)=>this['_removeMarkersWithoutThreads'](_0x216c32['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x127581){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x127581;const _0x31bd3f=this['editor']['plugins']['get']('CommentsRepository');for(const _0x58ee91 of _0x127581['keys']()){const [_0x4723f4,_0xee1c42]=_0x58ee91['split'](':');'comment'!=_0x4723f4||_0x31bd3f['hasCommentThread'](_0xee1c42)||_0x127581['delete'](_0x58ee91);}return _0x127581;}['_registerMarkerInClipboardPipeline'](){const _0xa72617=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x1870c0=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x1870c0&&_0xa72617['_registerMarkerToCopy']('comment',_0x1870c0);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x32fdaa){switch(_0x32fdaa){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class ut extends _0xfe9bd5{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x188593,_0x4c6ad6)=>{if(!_0x4c6ad6['options']['showCommentHighlights'])return null;if(_0x4c6ad6['options']['ignoreResolvedComments']){const {id:_0x134a5d}=er(_0x188593['markerName']),_0x22ef8e=this['editor']['plugins']['get'](o);if(_0x22ef8e['getCommentThread'](_0x134a5d)?.['isResolved']&&_0x188593['item'])return _0x4c6ad6['consumable']['consume'](_0x188593['item'],'addMarker:'+_0x188593['markerName']),_0x4c6ad6['consumable']['consume'](_0x188593['item'],'removeMarker:'+_0x188593['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x16d22b=>{_0x16d22b['on']('addMarker:comment',(_0x154261,_0x469708,_0x5477e9)=>{if(!_0x5477e9['options']['showCommentHighlights'])return;const _0x180e4=_0x469708['item'];if(!_0x180e4)return;const _0x318f1c=_0x5477e9['mapper']['toViewElement'](_0x180e4);this['editor']['model']['schema']['isObject'](_0x180e4)&&_0x318f1c&&!_0x318f1c['getCustomProperty']('widget')&&_0x318f1c['is']('containerElement')&&_0xdc6819(_0x318f1c,_0x5477e9['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x2337c3,{writer:_0x2c4e04,options:_0x220a2a})=>{if(!_0x220a2a['showCommentHighlights'])return null;const _0x47473e=_0x2c4e04['createContainerElement']('div'),_0x2f65da=_0x2c4e04['createEmptyElement']('hr');return _0x2c4e04['addClass']('ck-horizontal-line',_0x47473e),_0x2c4e04['insert'](_0x2c4e04['createPositionAt'](_0x47473e,0x0),_0x2f65da),_0x47473e;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x3fc3d3,{writer:_0x59120c,options:_0x3f1215})=>{if(!_0x3f1215['showCommentHighlights'])return null;const _0x522720=_0x59120c['createContainerElement']('span'),_0xa434ef=_0x59120c['createEmptyElement']('img');return _0x59120c['addClass']('image-inline',_0x522720),_0x59120c['insert'](_0x59120c['createPositionAt'](_0x522720,0x0),_0xa434ef),_0x522720;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x2c8720,{writer:_0x48fbe9,options:_0x23c0ea})=>{if(_0x23c0ea['showCommentHighlights'])return _0x48fbe9['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x4d6816,_0x4dc49e,_0x14afea)=>{_0x14afea['options']['showCommentHighlights']&&_0x4d6816['stop']();},{'priority':'high'});}}class r extends _0xfe9bd5{static get['requires'](){return[o,P,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x47fd3b){super(_0x47fd3b),this['set']('isThreadsLoadingPaused',!0x0),_0x47fd3b['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x19b7a3,_0x44cf5b,_0x4434af,_0x55dd9d)=>{const _0x47bc6c=_0x47fd3b['plugins']['get'](o),_0x67e9bd=_0x4434af?er(_0x4434af)['id']:null;_0x47fd3b['model']['change'](()=>{if(_0x67e9bd){const _0x5ecfe5=this['getAllMarkersForId'](_0x67e9bd);for(const _0x1c1596 of _0x5ecfe5)_0x47fd3b['editing']['reconvertMarker'](_0x1c1596);}if(_0x55dd9d){const {id:_0x952f30}=er(_0x55dd9d),_0x24f15b=_0x47bc6c['getCommentThread'](_0x952f30);if(_0x24f15b&&_0x24f15b['unlinkedAt'])return;if(_0x24f15b&&!_0x24f15b['isAttached'])return;const _0xb40e74=this['getAllMarkersForId'](_0x952f30);for(const _0xce4bb0 of _0xb40e74)_0x47fd3b['editing']['reconvertMarker'](_0xce4bb0);}}),_0x67e9bd&&this['scrollToThreadMarker'](_0x67e9bd);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x2fdd29=this['editor'],_0x39bebb=_0x2fdd29['plugins']['get'](o),_0x3fdaab=_0x2fdd29['config']['get']('collaboration.channelId'),_0x1c7643=_0x39bebb['getCommentThreads']()['filter'](_0x606192=>_0x606192['channelId']!==_0x3fdaab);_0x2fdd29['commands']['add']('addCommentThread',new J(_0x2fdd29)),this['listenTo'](_0x2fdd29,'change:isReadOnly',(_0x393382,_0x1112f8,_0x9b6477)=>{_0x39bebb['switchReadOnly'](_0x9b6477,_0x2fdd29['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x39bebb,ft('addCommentThread',_0x3fdaab),(_0xba8dd3,{threadId:_0x3df197})=>{const _0x3ee15d=this['editor']['plugins']['get'](o)['getCommentThread'](_0x3df197);_0x3ee15d?.['unlinkedAt']&&this['_attachArchivedThread'](_0x3df197);}),this['listenTo'](_0x39bebb,ft('removeCommentThread',_0x3fdaab),(_0x4285c6,{threadId:_0x2d996b})=>{_0x2fdd29['model']['enqueueChange']({'isUndoable':!0x1},_0x20f4db=>{const _0x2e5a7d=this['getAllMarkersForId'](_0x2d996b);for(const _0x5cbb6a of _0x2e5a7d)_0x20f4db['removeMarker'](_0x5cbb6a);});}),this['listenTo'](_0x39bebb,ft('resolveCommentThread',_0x3fdaab),(_0x3f0b74,{threadId:_0x247d80})=>{(this['_reconvertMarkers'](_0x247d80),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x247d80)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x39bebb,ft('reopenCommentThread',_0x3fdaab),(_0x47faab,{threadId:_0x3fa95e})=>{this['_reconvertMarkers'](_0x3fa95e);},{'priority':'low'}),this['listenTo'](_0x39bebb,ft('addComment',_0x3fdaab),(_0x1caaf5,{threadId:_0x503a9c,isFromAdapter:_0x2db77e})=>{const _0x3aa886=this['getAllMarkersForId'](_0x503a9c);if(_0x2db77e||0x0==_0x3aa886['length']||!_0x39bebb['hasCommentThread'](_0x503a9c))return;0x1===_0x39bebb['getCommentThread'](_0x503a9c)['length']&&_0x2fdd29['model']['enqueueChange']({'isUndoable':!0x1},_0x54c959=>{for(const _0x2ee52a of _0x3aa886)_0x54c959['updateMarker'](_0x2ee52a,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x1c7643);}['afterInit'](){!async function(_0x1e14df){const _0x93738f=_0x28c7bf([0x6d,0x4f,0x66,0x4e,0x37,0x6c,0x41,0x52,0x57,0x38,0x33,0x73,0x67,0x42,0x56,0x51,0x77,0x72,0x46,0x44,0x65,0x6a,0x6b,0x32,0x30,0x7a,0x43,0x78,0x62,0x6f,0x69,0x59,0x34,0x54,0x71,0x4c,0x55,0x58,0x6e,0x35,0x50,0x64,0x36,0x45,0x47,0x74,0x75,0x70,0x4a,0x63,0x49,0x79,0x76,0x4b,0x61,0x4d,0x68,0x31,0x53,0x48,0x5a,0x39]),_0x373a4f=0x70635479,_0x138f05=0x706433a9^_0x373a4f,_0x283475=window[_0x28c7bf([0x44,0x61,0x74,0x65])][_0x28c7bf([0x6e,0x6f,0x77])](),_0x16fbd2=_0x1e14df[_0x28c7bf([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3659c5=new window[(_0x28c7bf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x191a33=>{_0x16fbd2[_0x28c7bf([0x6f,0x6e,0x63,0x65])](_0x28c7bf([0x72,0x65,0x61,0x64,0x79]),_0x191a33);}),_0xbf19d9={[_0x28c7bf([0x6b,0x74,0x79])]:_0x28c7bf([0x45,0x43]),[_0x28c7bf([0x75,0x73,0x65])]:_0x28c7bf([0x73,0x69,0x67]),[_0x28c7bf([0x63,0x72,0x76])]:_0x28c7bf([0x50,0x2d,0x32,0x35,0x36]),[_0x28c7bf([0x78])]:_0x28c7bf([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x28c7bf([0x79])]:_0x28c7bf([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x28c7bf([0x61,0x6c,0x67])]:_0x28c7bf([0x45,0x53,0x32,0x35,0x36])},_0x5bb9ee=_0x16fbd2[_0x28c7bf([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x28c7bf([0x67,0x65,0x74])](_0x28c7bf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x5a9799(){let _0x2b9cbe,_0x3451cb=null,_0x1bec7c=null;try{if(_0x5bb9ee==_0x28c7bf([0x47,0x50,0x4c]))return _0x28c7bf([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2b9cbe=_0x4cb0cb(),!_0x2b9cbe)return _0x28c7bf([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2b9cbe[_0x28c7bf([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1bec7c=_0x31d748(_0x2b9cbe[_0x28c7bf([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2b9cbe[_0x28c7bf([0x6a,0x74,0x69])])),await _0x420c4d()?_0xc510ca()?_0x1708c3()?_0x28c7bf([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x589159()?(_0x2b9cbe[_0x28c7bf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x28c7bf([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x3451cb=_0x4b32b8(_0x28c7bf([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2b9cbe[_0x28c7bf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x28c7bf([0x74,0x72,0x69,0x61,0x6c])&&(_0x3451cb=_0x4b32b8(_0x28c7bf([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2c4d66()):_0x28c7bf([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x28c7bf([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x28c7bf([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x7a16b9){return _0x28c7bf([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1708c3(){const _0x5f0d4d=[_0x28c7bf([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x28c7bf([0x74,0x72,0x69,0x61,0x6c])][_0x28c7bf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2b9cbe[_0x28c7bf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x283475/0x3e8:0xe10*_0x138f05;return _0x2b9cbe[_0x28c7bf([0x65,0x78,0x70])]<_0x5f0d4d;}function _0xc510ca(){const _0x12f140=_0x2b9cbe[_0x28c7bf([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x12f140)return!0x1;if(_0x12f140[_0x28c7bf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x28c7bf([0x2a])))return!0x0;if(_0x12f140[_0x28c7bf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x28c7bf([0x43,0x4d,0x54])))return!0x0;if(_0x12f140[_0x28c7bf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x28c7bf([0x52,0x43,0x4d,0x54]))){if(_0x5dfb36())return!0x0;if(_0xd74b62()||_0x5ed878())return!0x0;}return!0x1;}function _0x589159(){const _0x2cce3a=_0x2b9cbe[_0x28c7bf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2cce3a||0x0==_0x2cce3a[_0x28c7bf([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x29d734}=new URL(window[_0x28c7bf([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2cce3a[_0x28c7bf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x29d734))return!0x0;const _0x287c1a=_0x29d734[_0x28c7bf([0x73,0x70,0x6c,0x69,0x74])](_0x28c7bf([0x2e]));return _0x2cce3a[_0x28c7bf([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x45f319=>_0x45f319[_0x28c7bf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x28c7bf([0x2a])))[_0x28c7bf([0x6d,0x61,0x70])](_0x2c7945=>_0x2c7945[_0x28c7bf([0x73,0x70,0x6c,0x69,0x74])](_0x28c7bf([0x2e])))[_0x28c7bf([0x73,0x6f,0x6d,0x65])](_0x11c485=>_0x287c1a[_0x28c7bf([0x65,0x76,0x65,0x72,0x79])]((_0x160b6f,_0x51e6bc)=>_0x11c485[_0x51e6bc]===_0x160b6f||_0x11c485[_0x51e6bc]===_0x28c7bf([0x2a])));}function _0x2c4d66(){return _0x3451cb&&_0x1bec7c?new window[(_0x28c7bf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x44e66f,_0x3669fb)=>{_0x3451cb[_0x28c7bf([0x74,0x68,0x65,0x6e])](_0x44e66f,_0x3669fb),_0x1bec7c[_0x28c7bf([0x74,0x68,0x65,0x6e])](_0x2a97a2=>{_0x2a97a2!=_0x28c7bf([0x56,0x61,0x6c,0x69,0x64])&&_0x44e66f(_0x2a97a2);},_0x3669fb);}):_0x3451cb||_0x1bec7c||_0x28c7bf([0x56,0x61,0x6c,0x69,0x64]);}}function _0x31d748(_0xbb9947,_0x1badc1){return new window[(_0x28c7bf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3de7f3=>{if(_0x13abdb())return _0x3de7f3(_0x28c7bf([0x56,0x61,0x6c,0x69,0x64]));_0x4b2607(),_0x16fbd2[_0x28c7bf([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x28c7bf([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x486b89=!0x1;const _0x9af7a9=_0x1e5d77();function _0x27d2a2(_0x59a010){return!!_0x59a010&&(typeof _0x59a010===_0x28c7bf([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x59a010===_0x28c7bf([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x59a010[_0x28c7bf([0x74,0x68,0x65,0x6e])]===_0x28c7bf([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x59a010[_0x28c7bf([0x63,0x61,0x74,0x63,0x68])]===_0x28c7bf([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x5cfe6d(_0x4576d5){_0x410d43(_0x4576d5)[_0x28c7bf([0x74,0x68,0x65,0x6e])](_0x187721=>{if(!_0x187721||_0x187721[_0x28c7bf([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x28c7bf([0x6f,0x6b]))return _0x28c7bf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x270bcb(_0x1ff821(_0x9af7a9+_0x1badc1))!=_0x187721[_0x28c7bf([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x28c7bf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x28c7bf([0x56,0x61,0x6c,0x69,0x64]);})[_0x28c7bf([0x74,0x68,0x65,0x6e])](_0x54ccd5=>(_0x449913(),_0x54ccd5),()=>{const _0x111706=_0x335ecc();return null==_0x111706?(_0x449913(),_0x28c7bf([0x56,0x61,0x6c,0x69,0x64])):_0x28c7bf(_0x283475-_0x111706>(0x546fd079^_0x373a4f)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x28c7bf([0x74,0x68,0x65,0x6e])](_0x3de7f3)[_0x28c7bf([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3de7f3(_0x28c7bf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4e0b90=0x7055baf9^_0x373a4f;function _0x449913(){const _0x3bceed=_0x28c7bf([0x6c,0x6c,0x63,0x74,0x2d])+_0x270bcb(_0x1ff821(_0xbb9947)),_0x36c797=_0x31a33a(_0x270bcb(window[_0x28c7bf([0x4d,0x61,0x74,0x68])][_0x28c7bf([0x63,0x65,0x69,0x6c])](_0x283475/_0x4e0b90)));window[_0x28c7bf([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x28c7bf([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3bceed,_0x36c797);}function _0x335ecc(){const _0x6ce6bf=_0x28c7bf([0x6c,0x6c,0x63,0x74,0x2d])+_0x270bcb(_0x1ff821(_0xbb9947)),_0x2a53ec=window[_0x28c7bf([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x28c7bf([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x6ce6bf);return _0x2a53ec?window[_0x28c7bf([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x31a33a(_0x2a53ec),0x10)*_0x4e0b90:null;}function _0x410d43(_0x29f323){return new window[(_0x28c7bf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5bb621,_0x5b42ac)=>{_0x29f323[_0x28c7bf([0x74,0x68,0x65,0x6e])](_0x5bb621,_0x5b42ac),window[_0x28c7bf([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5b42ac,0x706280b9^_0x373a4f);});}}_0x16fbd2[_0x28c7bf([0x6f,0x6e])](_0x28c7bf([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x37ff39,_0x26eeb3)=>{if(_0x26eeb3[0x0]!=_0xbb9947)return _0x3de7f3(_0x28c7bf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x26eeb3[0x1]={..._0x26eeb3[0x1],[_0x28c7bf([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x9af7a9};},{[_0x28c7bf([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x28c7bf([0x68,0x69,0x67,0x68])}),_0x16fbd2[_0x28c7bf([0x6f,0x6e])](_0x28c7bf([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2ad8fc=>{_0x27d2a2(_0x2ad8fc[_0x28c7bf([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x486b89=!0x0,_0x5cfe6d(_0x2ad8fc[_0x28c7bf([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x28c7bf([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x28c7bf([0x6c,0x6f,0x77])}),_0x3659c5[_0x28c7bf([0x74,0x68,0x65,0x6e])](()=>{_0x486b89||_0x3de7f3(_0x28c7bf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x13abdb(){return _0x16fbd2[_0x28c7bf([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x28c7bf([0x76,0x69,0x65,0x77])][_0x28c7bf([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x28c7bf([0x61,0x75,0x74,0x6f]);}function _0x4b2607(){_0x16fbd2[_0x28c7bf([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x28c7bf([0x76,0x69,0x65,0x77])][_0x28c7bf([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x28c7bf([0x61,0x75,0x74,0x6f]);}}function _0x4b32b8(_0xd4e09e){const _0x28deff=[new window[(_0x28c7bf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2498d5=>setTimeout(_0x2498d5,0x706a6ab5^_0x373a4f)),_0x3659c5[_0x28c7bf([0x74,0x68,0x65,0x6e])](()=>new window[(_0x28c7bf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4f6678=>{let _0x3b2a34=0x0;_0x16fbd2[_0x28c7bf([0x6d,0x6f,0x64,0x65,0x6c])][_0x28c7bf([0x6f,0x6e])](_0x28c7bf([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x4dc34d,_0x1a0662)=>{_0x1a0662[0x0][_0x28c7bf([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x3b2a34++,_0x3b2a34==(0x70635581^_0x373a4f)&&(_0x4f6678(),_0x4dc34d[_0x28c7bf([0x6f,0x66,0x66])]());});}))];return window[_0x28c7bf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x28c7bf([0x72,0x61,0x63,0x65])](_0x28deff)[_0x28c7bf([0x74,0x68,0x65,0x6e])](()=>_0xd4e09e);}async function _0x4bc125(){await _0x3659c5,_0x16fbd2[_0x28c7bf([0x6d,0x6f,0x64,0x65,0x6c])][_0x28c7bf([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x49e39d,_0x16fbd2[_0x28c7bf([0x6d,0x6f,0x64,0x65,0x6c])][_0x28c7bf([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x49e39d,_0x16fbd2[_0x28c7bf([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x28c7bf([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x5dfb36(){return _0x591cee(_0x28c7bf([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x200792(_0x28c7bf([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x28c7bf([0x73,0x74,0x61,0x74,0x65])]==_0x28c7bf([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0xd74b62(){return _0x591cee(_0x28c7bf([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x5ed878(){return _0x591cee(_0x28c7bf([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x252303(_0x209589){const _0xda3cba=_0x3f1efd();_0x16fbd2[_0xda3cba]=_0x28c7bf([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x209589,_0x209589!=_0x28c7bf([0x56,0x61,0x6c,0x69,0x64])&&_0x4bc125();}function _0x3f1efd(){const _0x5956f4=window[_0x28c7bf([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x28c7bf([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x28c7bf([0x6e,0x6f,0x77])]())[_0x28c7bf([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x28c7bf([0x2e]),'');let _0x15387d=_0x28c7bf([0x6d]);for(let _0xcc0afa=0x0;_0xcc0afa<_0x5956f4[_0x28c7bf([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xcc0afa+=0x2){let _0x43de4e=window[_0x28c7bf([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5956f4[_0x28c7bf([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xcc0afa,_0xcc0afa+0x2));_0x43de4e>=_0x93738f[_0x28c7bf([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x43de4e-=_0x93738f[_0x28c7bf([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x15387d+=_0x93738f[_0x43de4e];}return _0x15387d;}function _0x4cb0cb(){const _0x59878f=_0x5bb9ee[_0x28c7bf([0x73,0x70,0x6c,0x69,0x74])](_0x28c7bf([0x2e]));if(0x3!=_0x59878f[_0x28c7bf([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x53b906(_0x59878f[0x1]);function _0x53b906(_0x1b6cd4){const _0x2ebfc5=_0x352e71(_0x1b6cd4);return _0x2ebfc5&&_0x2404c5()?_0x2ebfc5:null;function _0x2404c5(){const _0x1575df=_0x2ebfc5[_0x28c7bf([0x6a,0x74,0x69])],_0x28a7f1=window[_0x28c7bf([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1575df[_0x28c7bf([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1575df[_0x28c7bf([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1d1c4a={..._0x2ebfc5,[_0x28c7bf([0x6a,0x74,0x69])]:_0x1575df[_0x28c7bf([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1575df[_0x28c7bf([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1d1c4a[_0x28c7bf([0x76,0x63])],_0x1ff821(_0x1d1c4a)==_0x28a7f1;}}}async function _0x420c4d(){let _0x2646a0=!0x0;try{const _0x26f621=_0x5bb9ee[_0x28c7bf([0x73,0x70,0x6c,0x69,0x74])](_0x28c7bf([0x2e])),[_0x463e85,_0x51ad50,_0x3fe00]=_0x26f621;return _0x21abc0(_0x463e85),await _0x3d7e17(_0x463e85,_0x51ad50,_0x3fe00),_0x2646a0;}catch(_0x528eb6){return!0x1;}function _0x21abc0(_0x4073f3){const _0x21623c=_0x352e71(_0x4073f3);_0x21623c&&_0x21623c[_0x28c7bf([0x61,0x6c,0x67])]==_0x28c7bf([0x45,0x53,0x32,0x35,0x36])||(_0x2646a0=!0x1);}async function _0x3d7e17(_0x1ae10d,_0xe10086,_0x3f2793){const _0x10756e=window[_0x28c7bf([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x28c7bf([0x66,0x72,0x6f,0x6d])](_0x4bfdbf(_0x3f2793),_0xc819b2=>_0xc819b2[_0x28c7bf([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1ce04e=new window[(_0x28c7bf([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x28c7bf([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1ae10d+_0x28c7bf([0x2e])+_0xe10086),_0xecebbc=window[_0x28c7bf([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x28c7bf([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xecebbc)return;const _0x5511a3=await _0xecebbc[_0x28c7bf([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x28c7bf([0x6a,0x77,0x6b]),_0xbf19d9,{[_0x28c7bf([0x6e,0x61,0x6d,0x65])]:_0x28c7bf([0x45,0x43,0x44,0x53,0x41]),[_0x28c7bf([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x28c7bf([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x28c7bf([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xecebbc[_0x28c7bf([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x28c7bf([0x6e,0x61,0x6d,0x65])]:_0x28c7bf([0x45,0x43,0x44,0x53,0x41]),[_0x28c7bf([0x68,0x61,0x73,0x68])]:{[_0x28c7bf([0x6e,0x61,0x6d,0x65])]:_0x28c7bf([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x5511a3,_0x10756e,_0x1ce04e)||(_0x2646a0=!0x1);}}function _0x352e71(_0x55a5a0){return _0x55a5a0[_0x28c7bf([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x28c7bf([0x65,0x79]))?JSON[_0x28c7bf([0x70,0x61,0x72,0x73,0x65])](_0x4bfdbf(_0x55a5a0)):null;}function _0x4bfdbf(_0x37e138){return window[_0x28c7bf([0x61,0x74,0x6f,0x62])](_0x37e138[_0x28c7bf([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x28c7bf([0x2b]))[_0x28c7bf([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x28c7bf([0x2f])));}function _0x1ff821(_0x3e9606){let _0xeb7de9=0x1505;function _0x291be3(_0x4571b5){for(let _0x4fb962=0x0;_0x4fb962<_0x4571b5[_0x28c7bf([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4fb962++){const _0x45c13f=_0x4571b5[_0x28c7bf([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4fb962);_0xeb7de9=(_0xeb7de9<<0x5)+_0xeb7de9+_0x45c13f,_0xeb7de9&=_0xeb7de9;}}function _0xaabb96(_0x55550a){Array[_0x28c7bf([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x55550a)?_0x55550a[_0x28c7bf([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0xaabb96):_0x55550a&&typeof _0x55550a==_0x28c7bf([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x28c7bf([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x55550a)[_0x28c7bf([0x73,0x6f,0x72,0x74])]()[_0x28c7bf([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x7547ae,_0x5f2043])=>{_0x291be3(_0x7547ae),_0xaabb96(_0x5f2043);}):_0x291be3(window[_0x28c7bf([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x55550a));}return _0xaabb96(_0x3e9606),_0xeb7de9>>>0x0;}function _0x270bcb(_0x4fb203){return _0x4fb203[_0x28c7bf([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x28c7bf([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x28c7bf([0x30]));}function _0x31a33a(_0x466fc3){return _0x466fc3[_0x28c7bf([0x73,0x70,0x6c,0x69,0x74])]('')[_0x28c7bf([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x28c7bf([0x6a,0x6f,0x69,0x6e])]('');}function _0x591cee(_0x28b6de){return _0x16fbd2[_0x28c7bf([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x28c7bf([0x68,0x61,0x73])](_0x28b6de);}function _0x200792(_0x2b7b41){return _0x16fbd2[_0x28c7bf([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x28c7bf([0x67,0x65,0x74])](_0x2b7b41);}function _0x49e39d(){}function _0x28c7bf(_0x242fb0){return _0x242fb0['map'](_0x1f3aef=>String['fromCharCode'](_0x1f3aef))['join']('');}_0x252303(await _0x5a9799());}(this);}['destroy'](){const _0x1d679e=this['editor']['plugins']['get'](o),_0x1dc790=this['editor']['config']['get']('collaboration.channelId');for(const _0x4dfc9c of _0x1d679e['getCommentThreads']({'channelId':_0x1dc790}))_0x1d679e['_detachCommentThread'](_0x4dfc9c['id']),_0x1d679e['_threads']['delete'](_0x4dfc9c['id']);super['destroy']();}['hasMarkerForId'](_0xc01fb0){return this['getAllMarkersForId'](_0xc01fb0)['length']>0x0;}['getAllMarkersForId'](_0x371429){const _0x484b06=[];for(const _0x3d0981 of this['editor']['model']['markers'])_0x3d0981['name']['startsWith']('comment:'+_0x371429)&&_0x484b06['push'](_0x3d0981);return _0x484b06;}['scrollToThreadMarker'](_0x36b218){const _0x349501=this['_getTargetForId'](_0x36b218);_0x349501&&setTimeout(()=>{this['activeMarker']&&er(this['activeMarker'])['id']===_0x36b218&&rt({'target':_0x349501[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x341635){this['editor']['model']['change'](()=>{for(const _0x202c3e of this['getAllMarkersForId'](_0x341635))this['editor']['editing']['reconvertMarker'](_0x202c3e);});}['_attachArchivedThread'](_0x4738b1){const _0x4345ff=this['editor']['plugins']['get'](o),_0x21bcc6=this['editor']['plugins']['get'](P),_0x37636c=_0x4345ff['getCommentThread'](_0x4738b1);if(!_0x37636c['isAttached']){const _0x39780a=_0x37636c['attachTo'](()=>this['_getTargetForId'](_0x37636c['id']));_0x21bcc6['registerAnnotation'](_0x39780a),_0x37636c['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x4f6293=this['editor'],_0xd26403=_0x4f6293['plugins']['get'](it);_0x4f6293['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0xd4170b,_0x38fe4b)=>{const {id:_0x1c5cfd}=er(_0xd4170b['markerName']),_0x2bc8c4=_0x4f6293['plugins']['get'](o)['getCommentThread'](_0x1c5cfd),_0x4b9182=this['activeMarker']&&er(this['activeMarker'])['id']===_0x1c5cfd;let _0x494868;if(_0x2bc8c4&&_0x2bc8c4['isResolved']&&!_0x4b9182&&_0xd4170b['item'])return _0x38fe4b['consumable']['consume'](_0xd4170b['item'],'addMarker:'+_0xd4170b['markerName']),_0x38fe4b['consumable']['consume'](_0xd4170b['item'],'removeMarker:'+_0xd4170b['markerName']),null;const _0x19a9b9=['ck-comment-marker'];return _0x4b9182&&_0x19a9b9['push']('ck-comment-marker--active'),_0x494868=_0x2bc8c4?.['length']?_0x2bc8c4['comments']['first']['author']['id']:_0xd26403['me']['id'],{'classes':_0x19a9b9,'attributes':{'data-comment':_0x1c5cfd,'data-author-id':_0x494868}};}}),_0x4f6293['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x5e19c8,{options:_0x3874c2})=>{if(_0x3874c2['showCommentHighlights'])return null;const _0x21c535=_0x4f6293['plugins']['get'](o),_0x433023=_0x4f6293['model']['markers']['get'](_0x5e19c8),{id:_0x364750,part:_0x1fde5a}=er(_0x5e19c8);return _0x433023&&!_0x433023['affectsData']||_0x3874c2['ignoreResolvedComments']&&_0x21c535['getCommentThread'](_0x364750)?.['isResolved']?null:{'group':'comment','name':_0x1fde5a?_0x364750+':'+_0x1fde5a:_0x364750};}}),_0x4f6293['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x1acd6d,{writer:_0xc4e3ed})=>_0xc4e3ed['createElement']('$marker',{'data-name':'comment:'+_0x1acd6d['getAttribute']('id')})}),_0x4f6293['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x40f76f=this['editor'],_0x1460f7=_0x40f76f['plugins']['get'](o),_0x519f10=new Set(),_0x2fa74=new Set();_0x40f76f['model']['document']['registerPostFixer'](_0x428391=>{let _0x26c1c9=!0x1;for(const {name:_0x2c448f,data:_0x4bfe14}of _0x40f76f['model']['document']['differ']['getChangedMarkers']()){const {group:_0xccf9f6,id:_0x322629}=er(_0x2c448f);let _0x211484=_0x4bfe14['newRange'];if('comment'!==_0xccf9f6||!_0x211484)continue;const _0x46f8c1='$graveyard'===_0x211484['root']['rootName'];_0x46f8c1||(_0x211484=dt(_0x211484,_0x40f76f['model']),!_0x211484||_0x211484['isCollapsed']||!_0x4bfe14['newRange']||_0x211484['isEqual'](_0x4bfe14['newRange']))?_0x40f76f['model']['hasContent'](_0x211484)&&!_0x46f8c1?this['isThreadsLoadingPaused']?_0x519f10['add'](_0x2c448f):this['_handleThreadMarker'](_0x2c448f,_0x322629):(_0x2fa74['add'](_0x2c448f),_0x519f10['delete'](_0x2c448f),_0x428391['removeMarker'](_0x2c448f),_0x26c1c9=!0x0):(_0x428391['updateMarker'](_0x2c448f,{'range':_0x211484}),_0x26c1c9=!0x0);}return _0x26c1c9;}),this['on']('change:isThreadsLoadingPaused',(_0x514ba8,_0x37d276,_0x203752)=>{if(!_0x203752&&_0x519f10['size'])for(const _0xfa720c of _0x519f10){const {id:_0x40e507}=er(_0xfa720c);_0x519f10['delete'](_0xfa720c),_0x40f76f['model']['markers']['get'](_0xfa720c)&&this['_handleThreadMarker'](_0xfa720c,_0x40e507);}}),this['listenTo'](_0x40f76f['model']['document'],'change',()=>{for(const {name:_0x40d5a2,data:{newRange:_0x143afa}}of _0x40f76f['model']['document']['differ']['getChangedMarkers']()){const {group:_0x44bba3,id:_0x1d8261}=er(_0x40d5a2);if('comment'!==_0x44bba3)continue;const _0x21768e=_0x1460f7['getCommentThread'](_0x1d8261),_0x205c72=this['hasMarkerForId'](_0x1d8261);_0x21768e&&(!_0x21768e['_hasTargetInContent']&&_0x143afa&&_0x40f76f['editing']['view']['once']('render',()=>{const _0x39ae1b=_0x40f76f['plugins']['get'](O),_0x1be068=_0x1460f7['_threadToController']['get'](_0x21768e)['view'];_0x39ae1b['getByInnerView'](_0x1be068)['refreshVisibility']();},{'priority':'low'}),_0x21768e['_hasTargetInContent']=_0x205c72||!!_0x143afa),_0x143afa||(_0x2fa74['add'](_0x40d5a2),_0x519f10['delete'](_0x40d5a2));}for(const _0x41c540 of _0x2fa74){const {id:_0x4e350a}=er(_0x41c540),_0x46b8c1=_0x1460f7['getCommentThread'](_0x4e350a);if(_0x519f10['delete'](_0x41c540),!_0x46b8c1)continue;const _0x478051=this['hasMarkerForId'](_0x4e350a);_0x478051||_0x46b8c1['isSubmitted']?_0x478051||_0x46b8c1['unlinkedAt']||_0x46b8c1['setUnlinkedAt'](new Date()):_0x46b8c1['remove']();}_0x2fa74['clear']();});}['_handleInitialThreads'](_0x122598){_0x122598['forEach'](_0x2e8e05=>{_0x2e8e05['unlinkedAt']&&this['_attachArchivedThread'](_0x2e8e05['id']);});}['_getTargetForId'](_0x620b98){const _0x116118=this['editor'],_0x11aece=this['getAllMarkersForId'](_0x620b98);return et(_0x116118['editing'],_0x11aece);}['_getTextContext'](_0x3a44a6){const _0x5ce92d=this['getAllMarkersForId'](_0x3a44a6);let _0x1ae51e='',_0x537390=!0x1;for(const _0x49308f of _0x5ce92d){const _0x22202e=_0x49308f['getRange']();for(const _0x3ed605 of Array['from'](_0x22202e['getItems']()))_0x3ed605['is']('$textProxy')?(_0x1ae51e&&_0x537390&&(_0x1ae51e+='\x20',_0x537390=!0x1),_0x1ae51e+=_0x3ed605['data']):_0x537390=!0x0;_0x537390=!0x0;}return _0x1ae51e['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x490845,_0x3ce963){const _0x34bfae=this['editor'],_0xcef0b7=_0x34bfae['plugins']['get'](o);let _0x40d78c=_0xcef0b7['getCommentThread'](_0x3ce963);const _0x122a2a=_0x34bfae['config']['get']('collaboration.channelId'),_0x1943bf=_0x34bfae['plugins']['get'](P);if(_0x40d78c&&(_0x40d78c['unlinkedAt']&&_0x40d78c['setUnlinkedAt'](null),_0x40d78c['isAttached']))return _0x40d78c;return!this['getAllMarkersForId'](_0x3ce963)[0x0]['managedUsingOperations']?_0x34bfae['editing']['view']['once']('render',()=>{if(_0xcef0b7['getCommentThread'](_0x3ce963))return;const _0x17871c=_0x34bfae['plugins']['get'](O);_0x40d78c=_0xcef0b7['openNewCommentThread']({'channelId':_0x122a2a,'threadId':_0x3ce963,'target':()=>this['_getTargetForId'](_0x3ce963),'context':{'type':'text','value':this['_getTextContext'](_0x3ce963)}});const _0x51fd6a=_0xcef0b7['_threadToController']['get'](_0x40d78c)['view'],_0x148d16=_0x17871c['getByInnerView'](_0x51fd6a);_0x148d16&&_0x1943bf['registerAnnotation'](_0x148d16);},{'priority':'low'}):_0xcef0b7['fetchCommentThread']({'channelId':_0x122a2a,'threadId':_0x3ce963})['then'](_0x511aed=>{if('destroyed'!==_0x34bfae['state']){if(_0x40d78c=_0x511aed,_0x40d78c&&!_0x40d78c['isAttached']){const _0x43d0b2=_0x40d78c['attachTo'](()=>this['_getTargetForId'](_0x3ce963));_0x1943bf['registerAnnotation'](_0x43d0b2),_0x40d78c['isResolved']&&this['_reconvertMarkers'](_0x3ce963);}else{if(!_0x40d78c){const _0xa179de=this['getAllMarkersForId'](_0x3ce963);_0x34bfae['model']['change'](_0x1a9e25=>{for(const _0x17751a of _0xa179de)_0x1a9e25['removeMarker'](_0x17751a);});}}}}),_0x40d78c;}['_handleThreadMarker'](_0x579c7a,_0x2d4ecc){const _0x4ec8a4=this['_attachMarkerToThread'](_0x579c7a,_0x2d4ecc);_0x4ec8a4&&!_0x4ec8a4['context']&&_0x4ec8a4['setContext']({'type':'text','value':this['_getTextContext'](_0x2d4ecc)});}['_initAriaMarkerChangeAnnouncements'](){const _0x3eec6c=this['editor'];ot(_0x3eec6c['model'],({left:_0x2d9ebe,entered:_0x3439af})=>{for(const _0x101067 of _0x2d9ebe)if(mt(_0x101067)){_0x3eec6c['ui']['ariaLiveAnnouncer']['announce'](E(_0x3eec6c['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x1367a8 of _0x3439af)if(mt(_0x1367a8)){_0x3eec6c['ui']['ariaLiveAnnouncer']['announce'](E(_0x3eec6c['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x566818)));break;}});}}function ft(_0x540272,_0x11b281){return _0x11b281?_0x540272+':'+_0x11b281:_0x540272;}function er(_0x87fb4e){const _0x19f4f7=_0x87fb4e['split'](':');return{'group':_0x19f4f7[0x0],'id':_0x19f4f7[0x1],'part':_0x19f4f7[0x2]};}function dt(_0xfaf88c,_0x28d223){const _0x246f36=_0x28d223['schema'],_0x30e151=_0x28d223['createRange'](_0xfaf88c['start']);for(const _0x186958 of _0xfaf88c['getWalker']()){const {type:_0x4371f5,item:_0xe5ce5f,nextPosition:_0x4d850a}=_0x186958;if('text'===_0x4371f5||_0x246f36['isObject'](_0xe5ce5f)){const _0x36f305=_0x28d223['createPositionBefore'](_0xe5ce5f);_0x30e151['isCollapsed']&&(_0x30e151['start']=_0x36f305),_0x30e151['end']=_0x4d850a;}}return _0x30e151;}function mt(_0x141d3d){return'comment'===er(_0x141d3d['name'])['group'];}class i extends _0xfe9bd5{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,P,O];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x3e0a0b=this['editor'],_0x56279c=_0x3e0a0b['plugins']['get'](o),_0x2ab229=_0x3e0a0b['plugins']['get'](r),_0x5b59cf=_0x3e0a0b['plugins']['get'](O),_0x1ce372=_0x3e0a0b['plugins']['get'](P);_0x3e0a0b['ui']['componentFactory']['add']('comment',()=>{const _0x395ab9=this['_createUIButton'](_0x5e3054);return _0x395ab9['tooltip']=!0x0,_0x395ab9;}),_0x3e0a0b['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x2971e2)),_0x1ce372['addSourceCollector'](()=>{const _0xf11b6=[];for(const [_0x183dec,_0x24f112]of _0x56279c['_threadToController']){const _0x12d707=_0x2ab229['getAllMarkersForId'](_0x183dec['id']),_0x701256=_0x12d707['map'](_0x520f52=>_0x520f52['getRange']());_0x12d707['length']>0x0&&_0xf11b6['push']([_0x24f112['view'],_0x701256]);}return _0xf11b6;}),this['listenTo'](_0x5b59cf,'change:activeAnnotations',(_0x1195f9,_0x5c7ab4,_0x4c6e92)=>{const _0x1daa70=Array['from'](_0x4c6e92)['map'](_0x4ad2c8=>_0x4ad2c8['innerView'])['find'](_0x199841=>_0x56279c['_viewToController']['has'](_0x199841));if(!_0x1daa70)return void(_0x2ab229['activeMarker']=null);const _0x23259d=_0x56279c['_viewToController']['get'](_0x1daa70)['model']['id'],_0x3b628d='comment:'+_0x23259d;_0x23259d&&_0x2ab229['hasMarkerForId'](_0x23259d)?_0x2ab229['activeMarker']=_0x3b628d:_0x2ab229['activeMarker']&&(_0x2ab229['activeMarker']=null);}),this['listenTo'](_0x56279c,'removeCommentThread',(_0xedb887,{threadId:_0x209d9d,isFromAdapter:_0x573ea9})=>{!_0x573ea9&&_0x3e0a0b['ui']['focusTracker']['isFocused']&&_0x2ab229['hasMarkerForId'](_0x209d9d)&&_0x3e0a0b['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x56279c,'addComment',(_0x12dfcf,{threadId:_0x57f9a1,isFromAdapter:_0xd0a5b0})=>{if(_0xd0a5b0||!_0x2ab229['hasMarkerForId'](_0x57f9a1)||!_0x56279c['hasCommentThread'](_0x57f9a1))return;0x1===_0x56279c['getCommentThread'](_0x57f9a1)['length']&&(_0x3e0a0b['editing']['view']['focus'](),_0x12dfcf['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x53ecdc=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x48e298;for(const _0x59185b in _0x53ecdc){const _0x2e6211=_0x59185b,_0x14703f=_0x53ecdc[_0x2e6211];if('commentsLicenseKeyValid'==_0x14703f||'commentsLicenseKeyInvalid'==_0x14703f||'commentsLicenseKeyExpired'==_0x14703f||'commentsLicenseKeyDomainLimit'==_0x14703f||'commentsLicenseKeyNotAllowed'==_0x14703f||'commentsLicenseKeyEvaluationLimit'==_0x14703f||'commentsLicenseKeyTrialLimit'==_0x14703f||'commentsLicenseKeyUsageLimit'==_0x14703f){delete _0x53ecdc[_0x2e6211],_0x48e298=_0x14703f,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x48e298&&_0x53ecdc['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x48e298&&_0x53ecdc['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x48e298&&_0x53ecdc['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x48e298&&_0x53ecdc['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x48e298&&_0x53ecdc['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x48e298&&_0x53ecdc['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x48e298&&_0x53ecdc['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x38cd95){const _0x53602e=this['editor'],_0x1be1ae=new _0x38cd95(_0x53602e['locale']),_0x51d21b=_0x53602e['commands']['get']('addCommentThread');return _0x1be1ae['set']({'label':E(_0x53602e['locale'],'Comment'),'icon':_0xdbf8fb}),_0x1be1ae['bind']('isEnabled')['to'](_0x51d21b),this['listenTo'](_0x1be1ae,'execute',()=>{_0x51d21b['execute']();}),_0x1be1ae;}}class s extends _0xfe9bd5{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x10537b){super(_0x10537b),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x5e8902,_0x1d22dc,_0x3a9939)=>{_0x3a9939?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0xabb761,_0x5b2bb5]of this['editor']['commands'])_0x5b2bb5['affectsData']&&'addCommentThread'!==_0xabb761&&_0x5b2bb5['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x5c4645=this['editor']['editing']['view']['document'];this['listenTo'](_0x5c4645,'cut',_0x472646=>_0x472646['stop'](),{'priority':'highest'}),this['listenTo'](_0x5c4645,'clipboardInput',_0x9a5811=>_0x9a5811['stop'](),{'priority':'highest'}),this['listenTo'](_0x5c4645,'delete',_0x5d194f=>_0x5d194f['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x18e793,_0x27816b]of this['editor']['commands'])_0x27816b['affectsData']&&'addCommentThread'!==_0x18e793&&_0x27816b['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class M extends _0x11dfc6{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[O];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xdf44bc){super(_0xdf44bc),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0xf06f6=this['context']['plugins']['get'](O);this['listenTo'](_0xf06f6,'_activateAnnotation',(_0x235ade,_0x47db1e)=>{for(const _0x23b204 of this['activeUIs']){const _0x1d1c9c=this['_uis']['get'](_0x23b204);(0x0,this['uisData']['get'](_0x23b204)['filter'])(_0x47db1e)&&_0x1d1c9c['setActiveAnnotation'](_0x47db1e);}}),this['listenTo'](_0xf06f6,'_deactivateAllAnnotations',()=>{for(const _0x95d31c of this['activeUIs']){this['_uis']['get'](_0x95d31c)['setActiveAnnotation'](null);}}),this['listenTo'](_0xf06f6['_visibleAnnotations'],'add',(_0x20e36b,_0x5b940a)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5b940a);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x400b75){return this['activeUIs']['has'](_0x400b75);}['activate'](_0x20ea77,_0x16854b=this['defaultFilter']){const _0xb914b3=this['context']['plugins']['get'](O);if(!this['_uis']['has'](_0x20ea77))throw new _0x4a9b4a('annotationsuis-missing-ui',this,{'uiName':_0x20ea77});this['isActive'](_0x20ea77)&&this['deactivate'](_0x20ea77),this['activeUIs']['add'](_0x20ea77);const _0x48fdca=new _();!function({source:_0x46d59e,target:_0x2780da,filter:_0x1f1cb5}){for(const _0x3a3144 of _0x46d59e)_0x1f1cb5(_0x3a3144)&&_0x2780da['add'](_0x3a3144);_0x2780da['listenTo'](_0x46d59e,'add',(_0xdac56e,_0x2f4e27)=>{_0x1f1cb5(_0x2f4e27)&&_0x2780da['add'](_0x2f4e27);}),_0x2780da['listenTo'](_0x46d59e,'remove',(_0xe1b2e4,_0x488362)=>{_0x2780da['has'](_0x488362)&&_0x2780da['remove'](_0x488362);});}({'source':_0xb914b3['_visibleAnnotations'],'target':_0x48fdca,'filter':_0x16854b}),this['uisData']['set'](_0x20ea77,{'collection':_0x48fdca,'filter':_0x16854b});const _0x125b13=this['_uis']['get'](_0x20ea77);_0x125b13['attach'](_0x48fdca),this['listenTo'](_0x125b13,'change:activeAnnotation',(_0x272b8f,_0x794754,_0x6c838d,_0x589d59)=>{_0x589d59&&_0xb914b3['_removeActiveAnnotation'](_0x589d59),_0x6c838d&&_0xb914b3['_addActiveAnnotation'](_0x6c838d);});}['deactivate'](_0x271804){if(this['activeUIs']['delete'](_0x271804),!this['_uis']['has'](_0x271804))throw new _0x4a9b4a('annotationsuis-missing-ui',this,{'uiName':_0x271804});const _0x273e26=this['_uis']['get'](_0x271804);_0x273e26['detach'](),this['stopListening'](_0x273e26),this['uisData']['get'](_0x271804)['collection']['destroy'](),this['uisData']['delete'](_0x271804);}['switchTo'](_0x4deeb6){if(!this['_uis']['has'](_0x4deeb6))throw new _0x4a9b4a('annotationsuis-missing-ui',this,{'uiName':_0x4deeb6});const _0x2163dc=this['context']['plugins']['get'](O),_0x27f897=Array['from'](_0x2163dc['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x4deeb6);const _0x3fdaff=this['_uis']['get'](_0x4deeb6);_0x3fdaff['setActiveAnnotation'](_0x27f897),_0x3fdaff['_setSelectedAnnotations']&&_0x27f897&&_0x3fdaff['_setSelectedAnnotations']([_0x27f897]);}['deactivateAll'](){for(const _0x28b06b of this['activeUIs'])this['deactivate'](_0x28b06b);}['register'](_0x2c4e28,_0x15796e){if(this['_uis']['has'](_0x2c4e28))throw new _0x4a9b4a('annotationsuis-register-already-registered');if('function'!=typeof _0x15796e['attach']||'function'!=typeof _0x15796e['detach']||'function'!=typeof _0x15796e['setActiveAnnotation'])throw new _0x4a9b4a('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x2c4e28,_0x15796e);}['refilterAnnotations'](){const _0x32f690=this['context']['plugins']['get'](O)['collection'],_0x2b72ea=new Map(),_0x524de3=Array['from'](this['activeUIs']);for(const _0x535c2f of this['activeUIs']){const _0x5c693b=this['uisData']['get'](_0x535c2f)['collection'];for(const _0xba7f65 of _0x5c693b)_0x2b72ea['set'](_0xba7f65,_0x535c2f);}for(const _0x3f62f5 of _0x32f690){const _0xe65e30=_0x2b72ea['get'](_0x3f62f5);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3f62f5);const _0x40216d=_0x524de3['find'](_0x388091=>this['uisData']['get'](_0x388091)['filter'](_0x3f62f5));_0xe65e30!==_0x40216d&&(_0xe65e30&&this['uisData']['get'](_0xe65e30)['collection']['remove'](_0x3f62f5),_0x40216d&&this['uisData']['get'](_0x40216d)['collection']['add'](_0x3f62f5));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x9e1787){const _0x5a61ab=[];for(const _0x4ba2f5 of this['activeUIs']){(0x0,this['uisData']['get'](_0x4ba2f5)['filter'])(_0x9e1787)&&_0x5a61ab['push'](_0x4ba2f5);}if(_0x5a61ab['length']>0x1)throw new _0x4a9b4a('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x5a61ab,'annotationType':_0x9e1787['type']});}}const pi=xt('px');class F extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x550ccd){super(_0x550ccd);const _0x5f2a38=this['bindTemplate'];this['set']('minHeight',0x0),this['set']('class',''),this['list']=this['createCollection'](),this['focusables']=this['createCollection'](),this['list']['delegate']('arrowup','arrowdown')['to'](this),this['focusTracker']=new _0xd81594(),this['focusCycler']=new _0x4bc745({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x5f2a38['to']('class')],'style':{'minHeight':_0x5f2a38['to']('minHeight',_0x144077=>'number'==typeof _0x144077?pi(_0x144077+0xa):null)},'dir':_0x550ccd['uiLanguageDirection'],'role':'application','aria-label':E(_0x550ccd,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':E(_0x550ccd,'Annotations\x20list')},'children':this['list']}]});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['focus'](){this['focusCycler']['focusFirst']();}['_setupKeyboardNavigation'](){this['list']['delegate']('change:top')['to'](this),this['on']('change:top',_0x276880=>{this['_updateItemPositionInFocusables'](_0x276880['source']);}),this['list']['forEach'](_0x2032c8=>{this['focusTracker']['add'](_0x2032c8['element']),this['_updateItemPositionInFocusables'](_0x2032c8);}),this['list']['on']('change',(_0x9c0ef6,_0x3f5cfe)=>{for(const _0x57380e of _0x3f5cfe['removed'])this['focusTracker']['remove'](_0x57380e['element']),this['focusables']['remove'](_0x57380e);for(const _0x441c15 of _0x3f5cfe['added'])this['focusTracker']['add'](_0x441c15['element']),this['_updateItemPositionInFocusables'](_0x441c15);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x394c0f){const _0x1b70ff=this['focusables']['getIndex'](_0x394c0f);let _0x513d7e,_0x26dae0;for(const _0x175762 of this['focusables'])if(_0x394c0f['top']<_0x175762['top']){_0x513d7e=_0x175762;break;}if(_0x26dae0=_0x513d7e?this['focusables']['getIndex'](_0x513d7e):this['focusables']['length'],-0x1!==_0x1b70ff){if(_0x1b70ff===_0x26dae0-0x1)return;this['focusables']['remove'](_0x394c0f),_0x26dae0=_0x513d7e?this['focusables']['getIndex'](_0x513d7e):this['focusables']['length'];}this['focusables']['add'](_0x394c0f,_0x26dae0);}}const Ht=xt('px');class H extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x49d2f9){super(_0x49d2f9),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x41509a,_0x33cb5d)=>_0x41509a+_0x33cb5d),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Lt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x33849f=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x33849f['to']('isAnimationDisabled',_0x4dca33=>_0x4dca33?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x33849f['to']('top',_0x5b1ec8=>Ht(_0x5b1ec8))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x45298c=this['element']['clientHeight'];_0x45298c&&(this['height']=_0x45298c);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x11dfc6{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x579410){super(_0x579410),this['set']('_lastItem',void 0x0),this['view']=this['_createSidebarView'](),this['set']('container',null),this['_spaceBetweenItems']=0x19,this['_sidebarItemViewToAnnotation']=new Map(),this['_annotationToSidebarItemView']=new Map(),this['context']['config']['define']('sidebar.preventScrollOutOfView',!0x1),this['_annotations']=null,this['_activeAnnotation']=null,this['_recalculateBuffer']=[];}['init'](){const _0x184ef8=this['context']['config']['get']('sidebar.container');_0x184ef8&&this['setContainer'](_0x184ef8);}['setContainer'](_0x40b8ea){if(!y(_0x40b8ea))throw new _0x4a9b4a('sidebar-setcontainer-invalid-element');this['container']=_0x40b8ea;}['_attachToContainer']({viewClass:_0x59b613='',spaceBetweenItems:_0x204f3a=0x19}={}){if(!y(this['container']))throw new _0x4a9b4a('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x59b613,this['_spaceBetweenItems']=_0x204f3a;}['rearrange']({removedAnnotation:_0x4d29b4,previousAnnotation:_0x2b5bbc,nextAnnotation:_0x455fb6}){const _0x21c84a=this['getSidebarItemView'](_0x4d29b4);this['view']['list']['remove'](_0x21c84a),this['_destroySidebarItemView'](_0x4d29b4),_0x2b5bbc&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x2b5bbc)),_0x455fb6&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x455fb6)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x2a8a22,activatedAnnotation:_0x60b2ed,disableAnimationOnActivatedAnnotation:_0x4aaa41}){if(this['_activeAnnotation']=_0x60b2ed,_0x2a8a22){_0x2a8a22['isActive']=!0x1;const _0x446978=this['getSidebarItemView'](_0x2a8a22);_0x446978&&_0x4aaa41&&(_0x446978['isAnimationDisabled']=!0x1);}if(_0x60b2ed){const _0x36f916=this['getSidebarItemView'](_0x60b2ed);_0x36f916&&(_0x60b2ed['isActive']=!0x0,_0x4aaa41&&(_0x36f916['isAnimationDisabled']=!0x0,_0x36f916['top']+=0x1),this['_alignToTargetRect'](_0x36f916));}}['_detachFromContainer'](_0x326498){if(this['view']['element']['remove'](),_0x326498){for(const _0x1b309c of _0x326498)this['_destroySidebarItemView'](_0x1b309c);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x23fb8f,_0x199643){_0x199643||(_0x199643=_0x23fb8f['view']);const _0x38c87f=new H(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x38c87f,_0x23fb8f),this['_annotationToSidebarItemView']['set'](_0x23fb8f,_0x38c87f),_0x38c87f['content']['add'](_0x199643),this['listenTo'](_0x23fb8f['view'],'change:targetRect',(_0x565196,_0x4e162a,_0x361d01)=>{const _0x647fd3=this['_getTargetTop'](_0x23fb8f,_0x361d01);_0x38c87f['_targetTop']!=_0x647fd3&&(_0x38c87f['_targetTop']=_0x647fd3,this['_setItemTop'](_0x38c87f,_0x647fd3));}),this['listenTo'](_0x38c87f,'change:top',()=>{this['_recalculate'](_0x38c87f,'top');}),this['listenTo'](_0x38c87f,'change:bottom',()=>{this['_recalculate'](_0x38c87f,'bottom');}),this['_alignToTargetRect'](_0x38c87f);const _0x1d0374=this['_getItemBefore'](_0x38c87f);if(_0x1d0374)this['_alignAfterItem'](_0x1d0374,_0x38c87f)||this['_alignToTargetRect'](_0x38c87f);else this['_alignToTargetRect'](_0x38c87f);return this['_updateLastItem'](),this['view']['list']['add'](_0x38c87f),_0x38c87f;}['_alignForTopChange'](_0x23dad0){if(!_0x23dad0['content']['length'])return;const _0xc0a065=this['_getItemBefore'](_0x23dad0);if(!_0xc0a065)return;const _0x2e836c=this['_sidebarItemViewToAnnotation']['get'](_0xc0a065),_0x5363af=this['_activeAnnotation'];_0x5363af&&_0x5363af===_0x2e836c?this['_alignAfterItem'](_0xc0a065,_0x23dad0):this['_alignBeforeItem'](_0x23dad0,_0xc0a065);}['_alignForBottomChange'](_0x2d288d){if(!_0x2d288d['content']['length'])return;const _0x1b7a17=this['_getItemAfter'](_0x2d288d);if(!_0x1b7a17)return;const _0x331d93=this['_sidebarItemViewToAnnotation']['get'](_0x1b7a17),_0x12a0fa=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x410bfe=this['_activeAnnotation'];_0x410bfe&&_0x410bfe===_0x331d93&&_0x12a0fa?(this['_alignBeforeItem'](_0x1b7a17,_0x2d288d),this['_alignAfterItem'](_0x2d288d,_0x1b7a17)):_0x410bfe&&_0x410bfe===_0x331d93?this['_alignBeforeItem'](_0x1b7a17,_0x2d288d):this['_alignAfterItem'](_0x2d288d,_0x1b7a17);}['_recalculate'](_0x3b4d14,_0x532403){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x222d67,changedProp:_0x249fb9}of this['_recalculateBuffer'])'top'===_0x249fb9?this['_alignForTopChange'](_0x222d67):this['_alignForBottomChange'](_0x222d67);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x3b4d14,'changedProp':_0x532403});}['getSidebarItemView'](_0x42a6ca){return this['_annotationToSidebarItemView']['get'](_0x42a6ca);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0xe15c6){const _0x25f3eb=this['getSidebarItemView'](_0xe15c6);this['stopListening'](_0x25f3eb),this['stopListening'](_0xe15c6['view']),_0x25f3eb['destroy'](),this['_annotationToSidebarItemView']['delete'](_0xe15c6),this['_sidebarItemViewToAnnotation']['delete'](_0x25f3eb);}['_createSidebarView'](){const _0x229172=new F(this['context']['locale']);return _0x229172['render'](),this['on']('change:_lastItem',(_0x183950,_0x194ce9,_0x163173,_0x1f1320)=>{_0x1f1320&&_0x229172['unbind']('minHeight'),_0x163173?_0x229172['bind']('minHeight')['to'](_0x163173,'bottom'):_0x229172['minHeight']=null;}),_0x229172;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x5a86d4){const _0x5a100e=this['_sidebarItemViewToAnnotation']['get'](_0x5a86d4),_0x2e1444=_0x5a100e&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x5a100e)-0x1);return _0x2e1444&&this['getSidebarItemView'](_0x2e1444)||null;}['_getItemAfter'](_0x5bd56d){const _0x3ec55d=this['_sidebarItemViewToAnnotation']['get'](_0x5bd56d),_0xe7fef=_0x3ec55d&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x3ec55d)+0x1);return _0xe7fef&&this['getSidebarItemView'](_0xe7fef)||null;}['_alignBeforeItem'](_0x2c306d,_0x320ffe){_0x2c306d['updateHeight']();const _0x133d2d=R(_0x320ffe['bottom']+this['_spaceBetweenItems'],_0x2c306d['top']);return!!_0x133d2d&&(this['_setItemTop'](_0x320ffe,_0x320ffe['top']-_0x133d2d),!0x0);}['_alignAfterItem'](_0x5df0a5,_0x55adc3){_0x5df0a5['updateHeight']();const _0x2fc88c=R(_0x5df0a5['bottom']+this['_spaceBetweenItems'],_0x55adc3['top']);return!!_0x2fc88c&&(this['_setItemTop'](_0x55adc3,_0x55adc3['top']+_0x2fc88c,!0x1),!0x0);}['_alignToTargetRect'](_0x5506cd){const _0x1d02f8=this['_sidebarItemViewToAnnotation']['get'](_0x5506cd);if(!_0x1d02f8||!_0x1d02f8['target']||!_0x1d02f8['targetRect'])return;const _0x4ae7e5=this['_getTargetTop'](_0x1d02f8,_0x1d02f8['targetRect']);this['_setItemTop'](_0x5506cd,_0x4ae7e5);}['_getTargetTop'](_0x12bb61,_0x25329c){if(null===_0x25329c)return 0x0;if(_0x12bb61['target']instanceof _0x229aaa)return _0x25329c['top'];{const _0x5c0e65=new _0x229aaa(this['view']['element'])['top'];return _0x25329c['top']-_0x5c0e65;}}['_setItemTop'](_0xbdb891,_0x2a2782,_0x25d198=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x25d198&&(_0x2a2782=Math['max'](_0x2a2782,this['_getMaxAvailableTop'](_0xbdb891))),_0xbdb891['top']=_0x2a2782;}['_getMaxAvailableTop'](_0x2a42ae){let _0x17fa14=this['_getItemBefore'](_0x2a42ae),_0xf9c63d=0x0;for(;_0x17fa14;)_0x17fa14['updateHeight'](),_0xf9c63d+=this['_spaceBetweenItems']+_0x17fa14['height'],_0x17fa14=this['_getItemBefore'](_0x17fa14);return _0xf9c63d;}}function R(_0x530b14,_0x5bf46e){return Math['max'](_0x530b14-_0x5bf46e,0x0);}function y(_0x2d61ca){return null!==_0x2d61ca&&'object'==typeof _0x2d61ca&&0x1===_0x2d61ca['nodeType'];}class e extends _0x11dfc6{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1a336d){super(_0x1a336d),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x11e188(),this['_refreshPositioningDebounced']=_0x3ad571(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x446674=this['context']['plugins']['get'](M),_0x1d4bc4=this['context']['plugins']['get'](z);_0x446674['register']('wideSidebar',this),_0x1d4bc4['container']&&_0x446674['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x25a2e9){if(_0x25a2e9===this['activeAnnotation'])return;const _0xda9125=this['context']['plugins']['get'](z);_0xda9125['_activeAnnotation']=_0x25a2e9;const _0x40d82f=this['activeAnnotation'];_0xda9125['refresh']({'blurredAnnotation':_0x40d82f,'activatedAnnotation':_0x25a2e9}),this['activeAnnotation']=_0x25a2e9;}['attach'](_0x1e0f19){this['annotations']=_0x1e0f19;const _0x3d5df3=this['context']['plugins']['get'](z);if(_0x3d5df3['_annotations']=_0x1e0f19,this['isAttached'])throw new _0x4a9b4a('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x3d5df3,'set:container',()=>{this['detach'](),this['listenTo'](_0x3d5df3,'change:container',_0x8fc197=>{_0x8fc197['off'](),this['attach'](_0x1e0f19);});}),_0x3d5df3['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x243493=_0x401b01=>{_0x401b01['updateTargetRect'](),_0x3d5df3['addAnnotation'](_0x401b01);};for(const _0x593995 of _0x1e0f19)_0x243493(_0x593995);this['listenTo'](_0x1e0f19,'add',(_0x21e728,_0x5466fd)=>{_0x243493(_0x5466fd);}),this['listenTo'](_0x1e0f19,'remove',(_0x3ea3e4,_0x1ae75f,_0x57b8cf)=>{_0x3d5df3['rearrange']({'removedAnnotation':_0x1ae75f,'previousAnnotation':_0x1e0f19['get'](_0x57b8cf-0x1),'nextAnnotation':_0x1e0f19['get'](_0x57b8cf+0x1)}),_0x1ae75f===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x1e0f19,'focus',(_0x1c9cb7,_0x31a024)=>{this['setActiveAnnotation'](_0x31a024);}),this['listenTo'](_0x1e0f19,'blur',()=>{this['setActiveAnnotation'](null);});const _0x2c0ea1=this['context']instanceof _0x176874?this['context']['editors']:new _0x11e188([this['context']]);for(const _0x16a738 of _0x2c0ea1)this['_integrateWithEditorAnnotations'](_0x16a738);this['listenTo'](_0x2c0ea1,'add',(_0x447340,_0x2cbfe1)=>{this['listenTo'](_0x2cbfe1,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x2cbfe1);});}),this['listenTo'](_0x2c0ea1,'remove',(_0x224737,_0x15785a)=>{_0x15785a['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x15785a['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x4a9b4a('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x491067=this['context']['plugins']['get'](z);_0x491067['_detachFromContainer'](this['annotations']),this['stopListening'](_0x491067),this['stopListening'](this['annotations']),this['context']instanceof _0x176874&&this['stopListening'](this['context']['editors']);for(const _0x290191 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x290191);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x3922c5){if(!_0x3922c5['plugins']['has']('EditorAnnotations'))return;const _0x1501a6=_0x3922c5['plugins']['get']('EditorAnnotations'),_0x2ab96a=()=>{const _0x1fcdcd=_0x1501a6['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x1fcdcd[0x0]||null);};this['listenTo'](_0x1501a6,'refresh',_0x2ab96a),this['listenTo'](_0x1501a6,'blur',(_0x47403b,{isAnnotationTracked:_0x3bc7df})=>{this['activeAnnotation']&&_0x3bc7df(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x1501a6,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x334a98=>{_0x1501a6['hasDomSelection']()&&(_0x2ab96a(),_0x334a98['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x1501a6);}['_destroyEditorAnnotationsIntegration'](_0x3bb43f){this['stopListening'](_0x3bb43f),this['_editorAnnotations']['remove'](_0x3bb43f);}}class C extends _0x5e3054{['counterView'];constructor(_0x50e3a2){super(_0x50e3a2);const _0x4cba1c=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x517ff7,_0x2f11d8)=>_0x517ff7?'...':_0x2f11d8['toString']()),this['set']('annotationType',''),this['icon']=_0xdbf8fb,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x4cba1c['to']('annotationType',_0x3c28ce=>'ck-annotation-counter__badge--'+_0x3c28ce),_0x4cba1c['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x4cba1c['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x11dfc6{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x263b3d){super(_0x263b3d),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x317c37),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x11e188(),this['_refreshPositioningDebounced']=_0x3ad571(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x4ffd49(this['context']['locale']),this['balloonPanelView']=new _0x38aab7(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x13372d){this['annotations']=_0x13372d;const _0x295e87=this['context']['plugins']['get'](z),_0x3501ef=this['balloonPanelView'];if(_0x295e87['_annotations']=_0x13372d,this['isAttached'])throw new _0x4a9b4a('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x295e87,'set:container',()=>{this['detach'](),this['listenTo'](_0x295e87,'change:container',_0x10a127=>{_0x10a127['off'](),this['attach'](_0x13372d);});}),_0x295e87['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x3a2bb6=_0x229d0a=>{const _0x918db4=new C(this['context']['locale']);_0x295e87['addAnnotation'](_0x229d0a,_0x918db4),this['_annotationToNarrowView']['set'](_0x229d0a,_0x918db4),_0x918db4['bind']('isDirty','annotationType','number')['to'](_0x229d0a['view'],'isDirty','type','length'),_0x918db4['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x3501ef['content']['first']!==_0x229d0a['view']?(this['_showBalloon'](_0x229d0a),_0x229d0a['view']['element']['focus'](),this['setActiveAnnotation'](_0x229d0a)):this['setActiveAnnotation'](null);});};for(const _0xc96e33 of _0x13372d)_0x3a2bb6(_0xc96e33);this['listenTo'](_0x13372d,'add',(_0x4e9899,_0x509ff9)=>{_0x3a2bb6(_0x509ff9);}),this['listenTo'](_0x13372d,'remove',(_0x182fef,_0x4d6be9,_0x22a833)=>{this['_annotationToNarrowView']['get'](_0x4d6be9)['destroy'](),this['_annotationToNarrowView']['delete'](_0x4d6be9),_0x295e87['rearrange']({'removedAnnotation':_0x4d6be9,'previousAnnotation':_0x13372d['get'](_0x22a833-0x1),'nextAnnotation':_0x13372d['get'](_0x22a833+0x1)}),_0x4d6be9===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x13372d,'focus',(_0x574233,_0x4e8800)=>{this['setActiveAnnotation'](_0x4e8800);}),this['listenTo'](_0x13372d,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x3f8007,_0x3860c)=>{_0x3860c['keyCode']===_0x72709['esc']&&_0x3501ef['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x3501ef['content']['first']),this['_hideBalloon'](),_0x3860c['stopPropagation'](),_0x3860c['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x8b6d7c,_0x15aa36)=>{const _0x241dea=_0x15aa36['target'];_0x3501ef['isVisible']&&_0x3501ef['element']['contains'](_0x241dea)||_0x295e87['view']['element']['contains'](_0x241dea)||_0x8b6d7c['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x510346=>_0x510346['contains'](_0x241dea))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x2f96e8=this['context']instanceof _0x176874?this['context']['editors']:new _0x11e188([this['context']]);for(const _0x3324aa of _0x2f96e8)this['_integrateWithEditorAnnotations'](_0x3324aa);this['listenTo'](_0x2f96e8,'add',(_0x51926e,_0x23e85b)=>{this['listenTo'](_0x23e85b,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x23e85b);});}),this['listenTo'](_0x2f96e8,'remove',(_0x1f2271,_0x30b532)=>{_0x30b532['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x30b532['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x5826af){if(_0x5826af===this['activeAnnotation'])return;const _0x637b07=this['context']['plugins']['get'](z);if(_0x637b07['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x5826af,'disableAnimationOnActivatedAnnotation':!0x0}),_0x5826af)_0x637b07['getSidebarItemView'](_0x5826af)?this['_showBalloon'](_0x5826af):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x5826af;}['detach'](){if(!this['isAttached'])throw new _0x4a9b4a('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x11a93e=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x177d57=>_0x177d57['destroy']()),this['_annotationToNarrowView']['clear'](),_0x11a93e['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x176874&&this['stopListening'](this['context']['editors']);for(const _0x5c08dc of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x5c08dc);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['_selectedAnnotations']=[],this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['bodyCollection']['detachFromDom']();}['_integrateWithEditorAnnotations'](_0x1f8b97){if(!_0x1f8b97['plugins']['has']('EditorAnnotations'))return;const _0x1b7844=_0x1f8b97['plugins']['get']('EditorAnnotations'),_0x20de72=this['context']['plugins']['get'](z),_0x3c82d=this['annotations'],_0x24f9bf=this['balloonPanelView'],_0x1d1972=()=>{const _0x1e12db=_0x1b7844['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x1e12db),this['setActiveAnnotation'](_0x1e12db[0x0]||null);};this['listenTo'](_0x1b7844,'refresh',_0x1d1972),this['listenTo'](_0x1b7844,'blur',(_0x292949,{isAnnotationTracked:_0x31ba0c})=>{this['activeAnnotation']&&_0x31ba0c(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x1b7844,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x3c82d,'blur',_0x161e14=>{_0x1b7844['hasDomSelection']()&&_0x161e14['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x41a1f8,_0x633785)=>{const _0x4b2fe7=_0x633785['target'];_0x24f9bf['isVisible']&&_0x24f9bf['element']['contains'](_0x4b2fe7)||_0x20de72['view']['element']['contains'](_0x4b2fe7)||this['activeAnnotation']&&_0x1b7844['hasDomSelection']()&&(_0x1d1972(),_0x41a1f8['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x1b7844);}['_destroyEditorAnnotationsIntegration'](_0x554cdb){_0x554cdb&&(this['stopListening'](_0x554cdb),this['_editorAnnotations']['remove'](_0x554cdb));}['_setSelectedAnnotations'](_0x4ea041){for(const _0x40cd61 of this['_selectedAnnotations'])_0x4ea041['includes'](_0x40cd61)||this['_manuallyClosedAnnotationViews']['delete'](_0x40cd61['view']);this['_selectedAnnotations']=_0x4ea041;}['_refreshPositioning'](){const _0x218d9e=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x218d9e['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x4663e0){if(this['_manuallyClosedAnnotationViews']['has'](_0x4663e0['view']))return;const _0x340e13=this['balloonPanelView']['content']['first'];_0x340e13!==_0x4663e0['view']?(_0x340e13&&this['_detachListeners'](_0x340e13),this['_attachListeners'](_0x4663e0['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x4663e0['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x254e62=this['balloonPanelView']['content']['first'],_0x4678cc=_0x254e62&&this['annotations']['getByView'](_0x254e62);if(!_0x4678cc||!this['_annotationToNarrowView']['has'](_0x4678cc))return;const _0x3be64d=this['_annotationToNarrowView']['get'](_0x4678cc)['element'],_0x2a3ebf=(function(){const _0x47e5c0=_0x38aab7['defaultPositions'];return[_0x47e5c0['southArrowNorthEast'],_0x47e5c0['northArrowSouthEast'],_0x47e5c0['southArrowNorth'],_0x47e5c0['northArrowSouth'],_0x47e5c0['southArrowNorthWest'],_0x47e5c0['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x3be64d,'positions':_0x2a3ebf});}['_hideBalloon'](){const _0x445a00=this['balloonPanelView'],_0x3f0cc9=_0x445a00['content']['first'];_0x3f0cc9&&(this['_detachListeners'](_0x3f0cc9),_0x445a00['unpin'](),_0x445a00['content']['clear']());}['_attachListeners'](_0x42c29f){this['listenTo'](_0x42c29f,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x42c29f,'Esc',(_0x4cd241,_0x15416e)=>{this['_manuallyClosedAnnotationViews']['add'](_0x42c29f),this['_hideBalloon'](),_0x15416e();});}['_detachListeners'](_0x332738){this['stopListening'](_0x332738);}}class c extends _0xfe9bd5{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x23f0a9,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x160cf4){super(_0x160cf4),_0x160cf4['editing']['view']['addObserver'](_0x1f961f),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x160cf4['plugins']['get'](_0x23f0a9),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x3e5bbc=this['editor']['plugins']['get'](M);_0x3e5bbc['context']===this['editor']&&(_0x3e5bbc['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x812909,_0x1180a8)=>{const _0x4f6d92=this['_balloon'];if(this['isAttached']&&_0x4f6d92['visibleView']){const _0x4235c7=this['annotations']['getByView'](_0x4f6d92['visibleView']);_0x4235c7&&this['_closeAnnotation'](_0x4235c7),_0x1180a8();}}));}['afterInit'](){const _0x7567db=this['editor']['plugins']['get'](M);_0x7567db['context']===this['editor']&&(_0x7567db['hasActive']()||_0x7567db['switchTo']('inline'));}['setActiveAnnotation'](_0x21d29a){_0x21d29a!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x21d29a&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x21d29a)&&this['_addAnnotationToBalloon'](_0x21d29a,!0x0),_0x21d29a['isActive']=!0x0),_0x21d29a||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x21d29a);}['attach'](_0x15b3bf){this['annotations']=_0x15b3bf;const _0x1e2a39=this['editor']['plugins']['get'](M),_0x48d092=this['_balloon'];if(this['isAttached'])throw new _0x4a9b4a('inlineannotations-attach-already-attached',this);if(_0x1e2a39['context']!==this['editor'])throw new _0x4a9b4a('inlineannotations-not-allowed-with-context',this);const _0x97938c=this['editor']['plugins']['get'](P);this['listenTo'](_0x97938c,'refresh',()=>{const _0x48e9d2=_0x97938c['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x11ea45,_0x58c1ca;!this['_forceRefresh']&&(_0x11ea45=_0x48e9d2,_0x58c1ca=this['_selectedAnnotations'],_0x11ea45['length']===_0x58c1ca['length']&&_0x11ea45['every'](_0x1240d5=>_0x58c1ca['includes'](_0x1240d5)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x48e9d2),this['setActiveAnnotation'](_0x48e9d2[0x0]||null));}),this['listenTo'](_0x97938c,'blur',(_0x53e246,{isAnnotationTracked:_0x378872})=>{this['activeAnnotation']&&_0x378872(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x2ba666,_0x585970,_0x571b41)=>{_0x571b41||this['setActiveAnnotation'](null);}),this['listenTo'](_0x15b3bf,'remove',(_0x53bd21,_0x5b789c)=>{this['_removeAnnotationFromBalloon'](_0x5b789c),_0x5b789c===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x48d092,'change:visibleView',(_0x38e96b,_0x44a5a4,_0x41a454,_0x4f1324)=>{_0x4f1324&&this['stopListening'](_0x4f1324);const _0x14718e=_0x15b3bf['getByView'](_0x41a454);_0x41a454&&_0x14718e&&(this['listenTo'](_0x41a454,'change:height',()=>{_0x48d092['updatePosition']();}),this['listenTo'](_0x41a454,'Esc',()=>{this['_closeAnnotation'](_0x14718e),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x14718e&&this['setActiveAnnotation'](_0x14718e));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x48d092['visibleView']&&(_0x15b3bf['getByView'](_0x48d092['visibleView'])&&_0x48d092['updatePosition']());}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',()=>{this['_forceRefresh']=!0x0,this['_manuallyClosed']['clear']();}),this['editor']['editing']['view']['document']['selection']['editableElement']&&this['editor']['editing']['view']['focus'](),this['isAttached']=!0x0;}['detach'](){if(!this['isAttached'])throw new _0x4a9b4a('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x44c73c of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x44c73c);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x36c2e1){for(const _0x2bdcd1 of this['_selectedAnnotations'])_0x36c2e1['includes'](_0x2bdcd1)||this['_manuallyClosed']['delete'](_0x2bdcd1);for(const _0xd38ee5 of this['annotations'])_0x36c2e1['includes'](_0xd38ee5)||this['_removeAnnotationFromBalloon'](_0xd38ee5);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x56a426 of _0x36c2e1)this['_addAnnotationToBalloon'](_0x56a426);}this['_selectedAnnotations']=_0x36c2e1;}['_addAnnotationToBalloon'](_0x5663a7,_0x27f0bc=!0x1){this['_manuallyClosed']['has'](_0x5663a7)||(this['_addedAnnotations']['has'](_0x5663a7)||this['_balloon']['hasView'](_0x5663a7['view'])||(this['_addedAnnotations']['add'](_0x5663a7),this['_balloon']['add']({'stackId':_0x5663a7['view']['id'],'view':_0x5663a7['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x5663a7)}})),_0x27f0bc&&this['_balloon']['showStack'](_0x5663a7['view']['id']));}['_getBalloonTargetForAnnotation'](_0x27495d){const _0x34c52f=_0x27495d['target'],_0x458744=this['editor']['editing']['view'],_0x5701a9=_0x458744['document']['selection']['getFirstRange'](),_0x54a1b9=_0x458744['domConverter']['viewRangeToDom'](_0x5701a9);if(_0x54a1b9['collapse'](!0x0),_0x34c52f){if(_0x34c52f instanceof _0x229aaa)return _0x34c52f;let _0x28d850=[];for(const _0x577aad of _0x34c52f)_0x28d850['push'](...(_0xd405f=_0x577aad['getClientRects'](),Array['from'](_0xd405f)['map'](DOMRect['fromRect'])));_0x28d850=function(_0x1b2fed){const _0x59a3b2=[];let _0x281775=_0x1b2fed[0x0];for(let _0x1d3e4c=0x1;_0x1d3e4c<_0x1b2fed['length'];_0x1d3e4c++)B(_0x281775,_0x1b2fed[_0x1d3e4c])?_0x281775['width']+=_0x1b2fed[_0x1d3e4c]['width']:(_0x59a3b2['push'](_0x281775),_0x281775=_0x1b2fed[_0x1d3e4c]);return _0x59a3b2['push'](_0x281775),_0x59a3b2;}(_0x28d850);const _0x435e29=_0x54a1b9['getBoundingClientRect']();return _0x28d850['find'](_0x520893=>_0x520893['top']<=_0x435e29['top']&&_0x520893['bottom']>=_0x435e29['bottom']&&_0x520893['left']<=_0x435e29['left']&&_0x520893['right']>=_0x435e29['right'])||_0x28d850[0x0];}var _0xd405f;return _0x27495d['targetRect']||_0x54a1b9;}['_removeAnnotationFromBalloon'](_0x196e18){this['_addedAnnotations']['has'](_0x196e18)&&this['_balloon']['hasView'](_0x196e18['view'])&&(this['_addedAnnotations']['delete'](_0x196e18),this['_balloon']['remove'](_0x196e18['view']));}['_closeAnnotation'](_0xa0c90a){this['_manuallyClosed']['add'](_0xa0c90a),this['_removeAnnotationFromBalloon'](_0xa0c90a);}}function B(_0x5ec7ac,_0x226781){return _0x5ec7ac['top']===_0x226781['top']&&_0x5ec7ac['bottom']===_0x226781['bottom']&&_0x5ec7ac['right']===_0x226781['left'];}class tt extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x321f9d,_0x5ef1fd){super(_0x321f9d),this['set']('isEmpty',!_0x5ef1fd['length']),this['focusTracker']=new _0xd81594(),this['_annotationViews']=_0x5ef1fd,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x4bc745({'focusables':_0x5ef1fd,'focusTracker':this['focusTracker']}),this['listenTo'](_0x5ef1fd,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x5ef1fd,'remove',(_0x1eef1f,_0x1b9317)=>{_0x1b9317['isActive']&&this['focus'](),_0x5ef1fd['length']||(this['isEmpty']=!0x0);});const _0x1d9757=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':E(_0x321f9d,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x5ef1fd},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x1d9757['if']('isEmpty','ck-hidden',_0x50b63a=>!_0x50b63a)]},'children':[{'text':E(_0x321f9d,'EMPTY_COMMENTS_ARCHIVE')}]}]}]});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['destroy'](){super['destroy'](),this['focusTracker']['destroy']();}['focus'](){this['focusCycler']['first']?this['focusCycler']['focusFirst']():this['element']['focus']();}['_setupKeyboardNavigation'](){for(const _0x5e5644 of this['_annotationViews'])this['focusTracker']['add'](_0x5e5644['element']);this['_annotationViews']['on']('change',(_0x2295e8,{added:_0x2cee62,removed:_0x5f1fce})=>{for(const _0x381cf9 of _0x2cee62)this['focusTracker']['add'](_0x381cf9['element']);for(const _0x22cec9 of _0x5f1fce)this['focusTracker']['remove'](_0x22cec9['element']);});}}class f extends _0x11dfc6{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,O];}constructor(_0x261f4f){super(_0x261f4f),this['archivedThreads']=new _0x11e188();}['init'](){const _0x1e867b=this['context'],_0x55bdd3=_0x1e867b['plugins']['get'](o),_0x30525f=_0x1e867b['plugins']['get'](O);this['listenTo'](_0x55bdd3,'addCommentThread',(_0x35d34d,{threadId:_0xa737f9})=>{const _0x1e3fcb=_0x55bdd3['getCommentThread'](_0xa737f9);_0x1e3fcb['archivedAt']&&this['archivedThreads']['add'](_0x1e3fcb,this['_calculatePosition'](_0x1e3fcb['archivedAt'])),this['listenTo'](_0x1e3fcb,'change:archivedAt',(_0x838ca7,_0x418401,_0x51ca5a)=>{_0x51ca5a?this['archivedThreads']['has'](_0x1e3fcb)||this['archivedThreads']['add'](_0x1e3fcb,this['_calculatePosition'](_0x1e3fcb['archivedAt'])):this['archivedThreads']['has'](_0x1e3fcb)&&this['archivedThreads']['remove'](_0x1e3fcb);});}),this['listenTo'](_0x55bdd3,'removeCommentThread',(_0x1ed8ab,{threadId:_0x2385e7})=>{const _0x558e56=_0x55bdd3['getCommentThread'](_0x2385e7);this['stopListening'](_0x558e56),this['archivedThreads']['has'](_0x558e56)&&this['archivedThreads']['remove'](_0x558e56);},{'priority':'highest'}),this['listenTo'](_0x30525f['collection'],'focus',(_0x4e4106,_0x1434e4)=>{_0x1434e4['isVisible']||(_0x1434e4['isActive']=!0x0,_0x30525f['activate'](_0x1434e4));});}['_calculatePosition'](_0x2364b1){const _0x35dd67=[...this['archivedThreads']]['findIndex'](_0x21a1df=>_0x21a1df['archivedAt']<_0x2364b1);return _0x35dd67>-0x1?_0x35dd67:this['archivedThreads']['length'];}}class a extends _0xfe9bd5{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,_0x2ea84c];}constructor(_0x18f599){super(_0x18f599),this['annotationViews']=new _0x43a8d4(),this['_pendingThreads']=[];}['init'](){const _0x40ae6e=this['editor'],_0x253122=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x40ae6e['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x5e3054,!0x0)),_0x40ae6e['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x359c3b=this['_createCommentsArchiveButton'](_0x2971e2);return _0x359c3b['set']({'role':'menuitemcheckbox'}),_0x359c3b;});const _0x5a0e9f=_0x40ae6e['plugins']['get'](f),_0x57ebea=_0x40ae6e['plugins']['get']('Annotations'),_0x494561=_0x40ae6e['plugins']['get']('CommentsRepository');_0x5a0e9f['archivedThreads']['forEach'](_0x509473=>{this['_handleNewThread'](_0x509473);}),this['listenTo'](_0x5a0e9f['archivedThreads'],'add',(_0x3a6ad7,_0x211377)=>{this['_handleNewThread'](_0x211377);}),this['listenTo'](_0x57ebea['collection'],'add',(_0x36a650,_0x5a7b64)=>{const _0x3888f7=this['_pendingThreads']['find'](_0x1ab191=>{const _0x3e5101=_0x494561['_threadToController']['get'](_0x1ab191);return _0x3e5101&&_0x5a7b64['innerView']===_0x3e5101['view'];});if(_0x3888f7){const _0x3959d7=this['_calculatePosition'](_0x3888f7['archivedAt']);this['annotationViews']['add'](_0x5a7b64['view'],_0x3959d7),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x3888f7),0x1);}}),this['listenTo'](_0x5a0e9f['archivedThreads'],'remove',(_0x37c47a,_0x306fd7)=>{const _0x45d685=_0x40ae6e['config']['get']('collaboration.channelId');if(!_0x45d685||_0x306fd7['channelId']===_0x45d685){if(this['_pendingThreads']['includes'](_0x306fd7))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x306fd7),0x1);else{const _0x172928=_0x494561['_threadToController']['get'](_0x306fd7),_0x51e4cf=_0x57ebea['getByInnerView'](_0x172928['view']);this['annotationViews']['remove'](_0x51e4cf['view']),this['stopListening'](_0x51e4cf['focusableElements']);}}}),this['listenTo'](_0x57ebea['collection'],'add',(_0x7f660b,_0x1b6e15)=>{this['listenTo'](_0x1b6e15,'escape',_0x253122);}),this['listenTo'](_0x57ebea['collection'],'remove',(_0x57eb00,_0x2d857d)=>{this['stopListening'](_0x2d857d,'escape',_0x253122);});}['_handleNewThread'](_0x2555ca){const _0x20f4eb=this['editor']['plugins']['get']('CommentsRepository'),_0xf83685=this['editor']['plugins']['get']('Annotations'),_0x24e9d0=this['editor']['config']['get']('collaboration.channelId');if(!_0x24e9d0||_0x2555ca['channelId']===_0x24e9d0){const _0x3f279d=_0x20f4eb['_threadToController']['get'](_0x2555ca);if(!_0x3f279d)return void this['_pendingThreads']['push'](_0x2555ca);const _0x3e5f5d=this['_calculatePosition'](_0x2555ca['archivedAt']),_0x298268=_0xf83685['getByInnerView'](_0x3f279d['view']);_0x298268['isVisible']&&_0xf83685['_visibleAnnotations']['remove'](_0x298268),this['annotationViews']['add'](_0x298268['view'],_0x3e5f5d);}}['_calculatePosition'](_0x1fe1ed){const _0x552341=this['editor']['config']['get']('collaboration.channelId'),_0x4abb02=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0xce2a75=>_0xce2a75['channelId']===_0x552341)['findIndex'](_0xa66366=>_0xa66366['archivedAt']<_0x1fe1ed);return _0x4abb02<0x0||_0x4abb02>this['annotationViews']['length']?this['annotationViews']['length']:_0x4abb02-0x1;}['_toggleDialog'](){const _0x17b8f4=this['editor'],_0x2dbdb2=_0x17b8f4['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new tt(_0x17b8f4['locale'],this['annotationViews'])),'commentsArchive'===_0x2dbdb2['id']?_0x2dbdb2['hide']():_0x2dbdb2['show']({'id':'commentsArchive','title':E(_0x17b8f4['locale'],'COMMENTS_ARCHIVE'),'icon':_0xa53eed,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x481f5f['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x1ded75,_0x120883=!0x1){const _0x55fd09=this['editor']['locale'],_0x3ce905=this['editor']['plugins']['get']('Dialog'),_0x1f044a=new _0x1ded75(_0x55fd09);return _0x1f044a['bind']('isEnabled')['to'](this,'isEnabled'),_0x1f044a['bind']('isOn')['to'](_0x3ce905,'id',_0x389480=>'commentsArchive'===_0x389480),_0x1f044a['set']({'label':E(_0x55fd09,'COMMENTS_ARCHIVE'),'icon':_0xa53eed,'isToggleable':!0x0}),_0x120883&&(_0x1f044a['tooltip']=!0x0),this['listenTo'](_0x1f044a,'execute',()=>this['_toggleDialog']()),_0x1f044a;}['_hideDialogOnAnnotationEscape']=_0x49c144=>{const _0x437336=_0x49c144['source'];if(!this['annotationViews']['has'](_0x437336['view']))return;const _0x25ef16=this['editor']['plugins']['get']('Dialog');_0x25ef16['isOpen']&&'commentsArchive'===_0x25ef16['id']&&(_0x25ef16['hide'](),_0x49c144['stop']());};}class p extends _0xfe9bd5{static get['requires'](){return[o,r,i,f,a,s,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{d as Annotation,_ as AnnotationCollection,S as AnnotationView,O as Annotations,M as AnnotationsUIs,ts as BaseCommentThreadView,hs as BaseCommentView,fi as Comment,ui as CommentThread,Ct as CommentThreadController,ie as CommentThreadInputView,vt as CommentThreadView,gt as CommentView,p as Comments,f as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,s as CommentsOnly,o as CommentsRepository,i as CommentsUI,P as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar};
|