@ckeditor/ckeditor5-comments 48.3.0-alpha.5 → 48.3.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +11 -11
- package/package.json +16 -16
package/dist/index.js
CHANGED
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Command as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Ot)());constructor(_0x2d0ece={}){(_0x2d0ece=Object['assign']({},_0x2d0ece))['plugins']||(_0x2d0ece['plugins']=CommentEditor['defaultPlugins']),super(_0x2d0ece),this['ui']=new Nt(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this['editing']['view']['_overlayModeHint']='auto',this['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}['create'](){const _0x5b0904=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x5b0904))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x28d0a6=>{const _0x39d90b=this['model']['document']['getRoot'](),_0x1e084c=_0x39d90b&&_0x39d90b['getChild'](_0x39d90b['childCount']-0x1);_0x28d0a6['setSelection'](_0x1e084c,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x4fe02b=this['editing']['view'],_0x4a627a=_0x4fe02b['document']['getRoot'](),_0x2b3678=_0x4a627a['getChild'](0x0);_0x4a627a['childCount']>0x1||!_0x2b3678||'p'!=_0x2b3678['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x4fe02b,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x2b3678['placeholder']=this['placeholder']),ut({'view':_0x4fe02b,'element':_0x2b3678,'keepOnFocus':!0x0}),this['placeholderElement']=_0x2b3678);}},St=class extends ht{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x416c1c,_0x3bca66={}){super(_0x416c1c),this['editor']=null,this['_editorConfig']=_0x3bca66,this['set']('value',_0x3bca66['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',Et(_0x416c1c,'Reply...')),this['set']('submitLabel',Et(_0x416c1c,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x3d7c37(),this['focusTracker']=new _0x18a754(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2f4ff6=>!_0x2f4ff6['defaultPrevented']},'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',(_0x2fb027,_0x3d7f29)=>{this['cancelButtonView']['fire']('execute'),_0x3d7f29();}),this['keystrokes']['set']('Ctrl+Enter',(_0x5c32b6,_0x23114b)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x23114b());}),this['on']('submit',(_0x294e8c,_0x2c924b)=>{_0x2c924b['length']>0xfde8?(alert(Et(_0x416c1c,'TOO_LONG_COMMENT_ALERT',[_0x2c924b['length'],0xfde8])),_0x294e8c['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x59bc54=this['editor'];this['element']['insertBefore'](_0x59bc54['ui']['element'],this['element']['firstChild']),_0x59bc54['model']['document']['on']('change',()=>this['value']=_0x59bc54['getData']()),_0x59bc54['bind']('placeholder')['to'](this),this['focusables']['add'](_0x59bc54['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x13df6c){-0x1===_0x13df6c?(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:_0xb97c69}=this,_0x105509=new _0x51f5d3(_0xb97c69);return _0x105509['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x105509['withText']=!0x0,_0x105509['bind']('label')['to'](this,'submitLabel'),_0x105509['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x105509['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x3355cc,_0x2cc0c6)=>!_0x2cc0c6&&!!_0x3355cc['trim']()),_0x105509;}['_createCancelButton'](){const {locale:_0xc551fd}=this,_0x249437=new _0x51f5d3(_0xc551fd);return _0x249437['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x249437['label']=Et(_0xc551fd,'Cancel'),_0x249437['withText']=!0x0,_0x249437['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x249437;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x1fe02b=>{this['focusTracker']['add'](_0x1fe02b['element']);}),this['focusables']['on']('change',(_0x5a0267,_0x573947)=>{for(const _0x3b9266 of Array['from'](_0x573947['added'])['reverse']())this['focusTracker']['add'](_0x3b9266['element']);});}},xt=class extends ht{constructor(_0xde642e,_0x4f68d6,_0x530929){super(_0xde642e),this['commentInputView']=new St(_0xde642e,_0x530929),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x179226,_0x5eec5b)=>_0x179226||!!_0x5eec5b),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 _0x4a9420(_0xde642e,_0x4f68d6),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'](_0x4d93c7){this['commentInputView']['focus'](_0x4d93c7);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x538d85,_0x496ea4)=>{const {submitButtonView:_0x1ef2c2,cancelButtonView:_0xabfc55,editor:_0x57a55f}=this['commentInputView'];[_0x1ef2c2['element'],_0xabfc55['element'],_0x57a55f?_0x57a55f['editing']['view']['getDomRoot']():null]['filter'](_0x3cc68b=>_0x3cc68b)['some'](_0x251e03=>_0x251e03['contains'](_0x496ea4['target']))||(this['focus'](),_0x496ea4['preventDefault']());});}},Pt=class extends ht{constructor(_0x4497e3){super(_0x4497e3);const _0x13bb43=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x13bb43['to']('count',_0x59169d=>Et(_0x4497e3,'NUMBER_OF_COMMENTS',_0x59169d))}]});}},Lt=class extends ht{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x9ae0d8,_0x662c84,_0x56373d){super(_0x9ae0d8);const _0x3b5538=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x662c84['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x662c84,this['_config']=_0x56373d,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x18a754(),this['keystrokes']=new _0x3d7c37(),this['focusCycler']=new et({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4f3804=>this['commentViews']['map'](_0x354c4e=>_0x354c4e['element'])['includes'](_0x4f3804['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Pt(_0x9ae0d8),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x79f39e=>_0x79f39e-this['_config']['maxCommentsWhenCollapsed']);for(const _0x2161c2 of _0x662c84['comments'])this['_handleNewCommentModel'](_0x2161c2);this['_handleInfoComment'](),this['listenTo'](_0x662c84['comments'],'add',(_0x19faf0,_0x483256)=>{const _0x50cb2d=this['_calculatePosition'](_0x483256);this['length']++,this['_handleNewCommentModel'](_0x483256,_0x50cb2d),this['refreshVisibleViews']();}),this['listenTo'](_0x662c84['comments'],'remove',(_0xc4e3a5,_0x566246)=>{this['length']--,this['_handleRemoveCommentModel'](_0x566246),this['refreshVisibleViews']();}),this['listenTo'](_0x662c84,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x662c84,'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',_0x3b5538['if']('length','ck-hidden',_0x1fd4e8=>!_0x1fd4e8)],'aria-label':Et(_0x9ae0d8,'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'](_0x3f6988){-0x1===_0x3f6988?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x1e0334 of this['commentViews'])_0x1e0334['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x223adf,_0xb25b13){const _0x1a7f15=new this['_config']['CommentView'](this['locale'],_0x223adf,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x1a7f15['viewUid']=_0x223adf['id'],_0x1a7f15['delegate']('removeComment')['to'](this),_0x1a7f15['delegate']('updateComment')['to'](this),_0x1a7f15['delegate']('resolveCommentThread')['to'](this),_0x1a7f15['delegate']('editorReady')['to'](this),_0x1a7f15['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x1a7f15,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x1a7f15,_0xb25b13);}['_calculatePosition'](_0x1daa8a){const _0x1c64b0=this['_model']['_findOptimalIndex'](_0x1daa8a);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x1daa8a['authoredAt']?_0x1c64b0-0x1:_0x1c64b0:_0x1c64b0-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0xa798a0={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':Et(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0xa798a0,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0xa798a0));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x3f3c19){const _0x294474=this['commentViews']['remove'](_0x3f3c19['id']);this['stopListening'](_0x294474),_0x294474['isEditMode']&&this['_updateHasDirtyComment'](),_0x294474['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x108e5e=>_0x108e5e['isEditMode']);}['_rearrangeCollapse'](){const _0x598000=function(_0x4a8dbd){const _0x1a0997=new _0x43910f();for(const _0x2eb226 of _0x4a8dbd)_0x1a0997['add'](_0x2eb226);return _0x1a0997;}(this['commentViews']),_0x1278b8=this['_collapsedCommentsView']['count'];for(let _0x4e37aa=0x1;_0x4e37aa<=_0x1278b8;_0x4e37aa++)_0x598000['remove'](0x1);for(const _0xf44a1f of _0x598000)_0xf44a1f['collapse']();_0x1278b8>0x0&&_0x598000['add'](this['_collapsedCommentsView'],0x1),Dt(_0x112006(Array['from'](this['visibleViews']),Array['from'](_0x598000)),this['visibleViews'],_0x598000);}['_rearrangeExpand'](){Dt(_0x112006(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x5dfe65 of this['visibleViews'])_0x5dfe65['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x476554=>{this['focusTracker']['add'](_0x476554['element']),this['keystrokes']['listenTo'](_0x476554['element']);}),this['commentViews']['on']('change',(_0x362041,_0x37ccab)=>{for(const _0x55c601 of _0x37ccab['removed'])this['focusTracker']['remove'](_0x55c601['element']),this['keystrokes']['stopListening'](_0x55c601['element']);for(const _0x375b61 of Array['from'](_0x37ccab['added'])['reverse']())this['focusTracker']['add'](_0x375b61['element']),this['keystrokes']['listenTo'](_0x375b61['element']);});}};function Dt(_0x4bb862,_0x441ed7,_0x187352){let _0x3d239b=0x0;for(const _0x47d3ae of _0x4bb862)switch(_0x47d3ae){case'insert':_0x441ed7['add'](_0x187352['get'](_0x3d239b),_0x3d239b),_0x3d239b++;break;case'delete':_0x441ed7['remove'](_0x3d239b);break;case'equal':_0x3d239b++;}}var Vt=class extends ht{constructor(_0x1a8f95){super(_0x1a8f95);const _0xbeed2e=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0xbeed2e['to']('contextValue',_0x436d69=>Et(_0x1a8f95,'THREAD_CONTEXT_LABEL',_0x436d69)),'tabindex':-0x1},'children':[{'text':_0xbeed2e['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Bt=class extends ht{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x58c77d,_0x307dfe){super(_0x58c77d);const _0x508ef7=this['bindTemplate'];this['_model']=_0x307dfe,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x18a754(),this['keystrokes']=new _0x3d7c37(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x3ec849=>!!_0x3ec849),this['bind']('contextValue')['to'](this['_model'],'context',_0x525af6=>_0x525af6&&_0x525af6['value']?this['_trimContextValue'](_0x525af6['value']):Et(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',_0x508ef7['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 _0x3726ed=new _0x51f5d3(this['locale']);return _0x3726ed['label']=Et(this['locale'],'Reopen'),_0x3726ed['tooltip']=Et(this['locale'],'Reopen'),_0x3726ed['icon']=_0x547353,_0x3726ed['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1f6625=>!_0x1f6625),_0x3726ed['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0xd6646c,_0x16c9e6)=>_0xd6646c&&_0x16c9e6),_0x3726ed['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x3726ed;}['_trimContextValue'](_0x33bf0c){if(_0x33bf0c['length']<0x96)return _0x33bf0c;const _0x2e2246=_0x33bf0c['lastIndexOf']('\x20',0x93);return _0x33bf0c['substring'](0x0,_0x2e2246>-0x1?_0x2e2246:0x93)+'...';}['_attachContextActions'](){const _0xd487f1=this['element']['querySelector']('.ck-context'),_0x6f48c5=_0xd487f1['querySelector']('.ck-context__value');this['listenTo'](_0xd487f1,'mouseenter',()=>{_0x6f48c5['offsetWidth']<_0x6f48c5['scrollWidth']&&_0xd487f1['classList']['add']('overlay');}),this['listenTo'](_0xd487f1,'mouseleave',()=>{_0xd487f1['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0xd170d2 of this['focusables'])this['focusTracker']['add'](_0xd170d2['element']),this['keystrokes']['listenTo'](_0xd170d2['element']);}['_createContextView'](){const _0x42dc23=new Vt(this['locale']);return _0x42dc23['bind']('contextValue')['to'](this),_0x42dc23;}},Ht=class extends ht{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5ae30c,_0x27adda,_0x33df91,_0x129edf){super(_0x5ae30c),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x27adda,this['_localUser']=_0x33df91,this['_config']=_0x129edf,this['commentThreadHeaderView']=new Bt(_0x5ae30c,_0x27adda),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x3dbd57(_0x5ae30c,Et(_0x5ae30c,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Lt(_0x5ae30c,_0x27adda,Object['assign']({'CommentView':this['_config']['CommentView']},_0x129edf)),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',(_0x46a7ce,_0x1c42cf)=>_0x46a7ce||!!_0x1c42cf),this['bind']('isUnlinked')['to'](_0x27adda,'unlinkedAt',_0x3f1cfb=>!!_0x3f1cfb);let _0x3c978c=null;const _0x12ddaf=()=>{const _0x4d0357=this['_model']['comments']['first']||null;_0x4d0357!==_0x3c978c&&(_0x3c978c&&this['stopListening'](_0x3c978c,'change:content'),_0x3c978c=_0x4d0357,_0x4d0357&&this['listenTo'](_0x4d0357,'change:content',_0x12ddaf));const _0x4f481d=_0x4d0357?_0x4d0357['author']['name']:this['_localUser']['name'],_0x350bcd=_0x4d0357?new DOMParser()['parseFromString'](_0xaf539c(_0x4d0357['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']}),'text/html')['body']['textContent']:'',_0x46a320=Et(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x4f481d]);this['set']('ariaLabel',_0x350bcd?_0x46a320+'\x20'+_0x350bcd:_0x46a320);};this['listenTo'](this['_model']['comments'],'change',_0x12ddaf),_0x12ddaf(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x18a754(),this['keystrokes']=new _0x3d7c37(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5b1a8e=>_0x5b1a8e['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x1b415a(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x1a7bdf=new xt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x640a74=_0x1a7bdf['commentInputView'];return _0x1a7bdf['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x640a74,'value',(_0x38ee63,_0x5913c5,_0x55dd48,_0x110003,_0xaf4f82)=>!!_0xaf4f82||!!_0x110003&&_0x55dd48&&!_0x5913c5||_0x38ee63&&_0x55dd48&&!_0x5913c5),_0x640a74['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x2877f9,_0x3fd0e4,_0x3d3c8c)=>{let _0x2ec23a;return _0x2ec23a=_0x3d3c8c&&_0x3fd0e4?'Reply\x20to\x20reopen\x20discussion...':_0x2877f9?'Reply...':'Write\x20a\x20comment...',Et(this['locale'],_0x2ec23a);}),_0x640a74['bind']('submitLabel')['to'](this,'length',_0x309a1b=>Et(this['locale'],_0x309a1b?'Reply':'Comment')),_0x640a74['on']('submit',(_0x3fc334,_0x159f3c)=>{this['fire']('addComment',_0x159f3c),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x640a74['on']('cancel',()=>{this['focus']();}),_0x640a74['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x640a74['on']('cancel',_0x1f220a=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x1f220a['stop']());}),this['on']('change:isActive',(_0x59a672,_0x5a8bc6,_0x3f77bf)=>{_0x3f77bf||this['length']||_0x640a74['value']||this['fire']('removeCommentThread');}),_0x1a7bdf;}};const Ft=/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
_0x5cdce0();var $t=class Annotation extends jt{['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x3a8ef5,target:_0xdd601c,type:_0x2eb204,isVisible:_0x1dd393=!0x0}){super(),this['view']=_0x3a8ef5,this['view']['element']||this['view']['render'](),this['_type']=_0x2eb204,this['_target']=_0xdd601c,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x43910f([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0xdb36c,_0x36c19b)=>{this['view']['focusTracker']['add'](_0x36c19b);}),this['focusableElements']['on']('remove',(_0x238902,_0x110a78)=>{this['view']['focusTracker']['remove'](_0x110a78);}),this['set']('isVisible',_0x1dd393);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x562d74=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x562d74),_0x562d74;}get['targetRect'](){const _0x1afb4f=this['target'];if(null===_0x1afb4f)return null;if(_0x1afb4f instanceof _0x7f9fe4)return _0x1afb4f;const _0x2b0392=_0x1afb4f['filter'](_0x142f51=>function(_0x3c2859){return!!_0x3c2859['offsetParent']||!!_0x3c2859['getClientRects']()['item'](0x0);}(_0x142f51));return 0x0===_0x2b0392['length']?null:_0x7f9fe4['getDomElementRects'](_0x2b0392[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x1b2f4a){this['view']['isActive']=_0x1b2f4a,this['view']['mainView']['isActive']=_0x1b2f4a;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x2042f2){if(!(null===_0x2042f2||_0x2042f2 instanceof _0x7f9fe4||Array['isArray'](_0x2042f2)&&_0x2042f2['every'](_0x5dcba3=>zt(_0x5dcba3))))throw new _0x4b20e3('annotation-invalid-target',null,{'target':_0x2042f2});}['_getNormalizedTarget'](){const _0x348057='function'==typeof this['_target']?this['_target']():this['_target'];return zt(_0x348057)?[_0x348057]:_0x348057;}};function zt(_0x4d389e){return null!==_0x4d389e&&'object'==typeof _0x4d389e&&'nodeType'in _0x4d389e&&0x1===_0x4d389e['nodeType'];}var Jt=class extends _0x43910f{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x3fcc88=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x18a754(),this['_focusTracker']['on']('change:isFocused',(_0x3f455f,_0x6273fb,_0x1d1c56)=>{_0x1d1c56||this['fire']('blur');});for(const _0x2079fd of _0x3fcc88)this['add'](_0x2079fd);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x149646){if(this['has'](_0x149646))throw new _0x4b20e3('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x149646['innerView'],_0x149646),this['_viewToAnnotation']['set'](_0x149646['view'],_0x149646);for(const _0x23d510 of _0x149646['focusableElements'])this['_focusTracker']['add'](_0x23d510);if(this['listenTo'](_0x149646['focusableElements'],'add',(_0x4a3afc,_0x3934bf)=>{this['_focusTracker']['add'](_0x3934bf);}),this['listenTo'](_0x149646['focusableElements'],'remove',(_0x2a7e4c,_0x4e7020)=>{this['_focusTracker']['remove'](_0x4e7020);}),this['listenTo'](_0x149646['view']['focusTracker'],'change:isFocused',(_0x23f534,_0x4ca5f9,_0x2fffa9)=>{_0x2fffa9&&this['fire']('focus',_0x149646);}),_0x149646['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x3bb79f of this)_0x3bb79f['updateTargetRect']();}const _0x2e344d=this['_getOrderInContent'](_0x149646['view']['targetRect']);return super['add'](_0x149646,_0x2e344d);}['remove'](_0x29d981){if(!this['has'](_0x29d981))throw new _0x4b20e3('annotationcollection-not-existing-item',null);this['stopListening'](_0x29d981['view']['focusTracker']),this['stopListening'](_0x29d981['focusableElements']);for(const _0x44f5dc of _0x29d981['focusableElements'])this['_focusTracker']['remove'](_0x44f5dc);return this['_viewToAnnotation']['delete'](_0x29d981['view']),this['_innerViewToAnnotation']['delete'](_0x29d981['innerView']),super['remove'](_0x29d981);}['getByInnerView'](_0x170e70){return this['_innerViewToAnnotation']['get'](_0x170e70);}['getByView'](_0x4841fd){return this['_viewToAnnotation']['get'](_0x4841fd);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x11bd5c of this)_0x11bd5c['updateTargetRect']();this['_sort']();}['_sort'](){const _0xe3f470=Array['from'](this)['sort']((_0xd84bcd,_0x261be8)=>Zt(_0xd84bcd['view']['targetRect'],_0x261be8['view']['targetRect']));for(let _0x229287=_0xe3f470['length']-0x1;_0x229287>0x0;_0x229287--){const _0x5e34e6=_0xe3f470[_0x229287];_0x229287!==this['getIndex'](_0x5e34e6)&&(this['remove'](_0x5e34e6),this['add'](_0x5e34e6));}}['_getOrderInContent'](_0x1f803f){let _0x46b1dd=0x0;if(!_0x1f803f)return this['length'];for(const _0x1b9ab7 of this){const _0x5e250f=_0x1b9ab7['view']['targetRect'];if(_0x5e250f){if(Zt(_0x1f803f,_0x5e250f)<0x0)return _0x46b1dd;_0x46b1dd++;}}return _0x46b1dd;}['_areCachedRectsStale'](){const _0x1d4ac8=this['get'](0x0);if(!_0x1d4ac8)return!0x1;const _0x3ffddb=_0x1d4ac8['view']['targetRect'],_0x4b7c43=_0x1d4ac8['targetRect'];return!(!_0x3ffddb||!_0x4b7c43)&&(_0x3ffddb['top']!==_0x4b7c43['top']||_0x3ffddb['left']!==_0x4b7c43['left']);}};function Qt({source:_0x5e8e5e,target:_0x14fd51,filter:_0x5e50b9}){for(const _0x3e0fb2 of _0x5e8e5e)_0x5e50b9(_0x3e0fb2)&&_0x14fd51['add'](_0x3e0fb2);_0x14fd51['listenTo'](_0x5e8e5e,'add',(_0x3a83a4,_0x4a3ede)=>{_0x5e50b9(_0x4a3ede)&&_0x14fd51['add'](_0x4a3ede);}),_0x14fd51['listenTo'](_0x5e8e5e,'remove',(_0x4299e9,_0x1039bf)=>{_0x14fd51['has'](_0x1039bf)&&_0x14fd51['remove'](_0x1039bf);});}function Zt(_0x16531e,_0x5488c8){if(null===_0x16531e&&null===_0x5488c8)return 0x0;if(null===_0x16531e)return-0x1;if(null===_0x5488c8)return 0x1;const _0x4a84e0=_0x16531e['top']-_0x5488c8['top'];return 0x0==_0x4a84e0?_0x16531e['left']-_0x5488c8['left']:_0x4a84e0;}var ti=class extends _0x1011c1{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x50c65a){if(super(_0x50c65a),this['collection']=new Jt(),this['_visibleAnnotations']=new Jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x50c65a instanceof _0x53fa41){const _0x3477d7=_0x50c65a['locale'];_0x50c65a['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':Et(_0x3477d7,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':Et(_0x3477d7,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':Et(_0x3477d7,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':Et(_0x3477d7,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':Et(_0x3477d7,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':Et(_0x3477d7,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':Et(_0x3477d7,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x2ce5be){this['collection']['add'](_0x2ce5be);}['remove'](_0x1d69e0){this['collection']['remove'](_0x1d69e0),_0x1d69e0['destroy']();}['refreshVisibility'](){for(const _0x570a8d of this['collection'])_0x570a8d['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x3fb0b3){return this['collection']['getByInnerView'](_0x3fb0b3);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x2014c5 of this['collection'])_0x2014c5['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x1a4e1b){this['fire']('_activateAnnotation',_0x1a4e1b);}['createAnnotation'](_0x19a8a0){return new $t(_0x19a8a0);}['createAnnotationView'](_0x89e465,_0x192515){return new qt(_0x89e465,_0x192515);}['_addActiveAnnotation'](_0x29a199){const _0x4e7f18=new Set(this['activeAnnotations']);_0x4e7f18['add'](_0x29a199),this['activeAnnotations']=_0x4e7f18;}['_removeActiveAnnotation'](_0x4cbb0a){const _0x3cbf92=new Set(this['activeAnnotations']);_0x3cbf92['delete'](_0x4cbb0a),this['activeAnnotations']=_0x3cbf92;}['_bindAnnotationsToVisibleAnnotations'](){const _0x53bc1c=this['collection'],_0x2333b6=this['_visibleAnnotations'];function _0x50b145(_0x12b1c9){const _0x3c7394=_0x12b1c9['source'];_0x3c7394['isVisible']&&!_0x2333b6['has'](_0x3c7394)?_0x2333b6['add'](_0x3c7394):!_0x3c7394['isVisible']&&_0x2333b6['has'](_0x3c7394)&&_0x2333b6['remove'](_0x3c7394),_0x3c7394['view']['focusTracker']['remove'](_0x3c7394['view']['element']),_0x3c7394['view']['focusTracker']['add'](_0x3c7394['view']['element']);}this['listenTo'](_0x53bc1c,'add',(_0x2834be,_0x3fb3e8)=>{_0x3fb3e8['isVisible']&&_0x2333b6['add'](_0x3fb3e8),this['listenTo'](_0x3fb3e8,'change:isVisible',_0x50b145);}),this['listenTo'](_0x53bc1c,'remove',(_0x38461d,_0x567446)=>{_0x2333b6['has'](_0x567446)&&_0x2333b6['remove'](_0x567446),this['stopListening'](_0x567446,'change:isVisible',_0x50b145);});}['_setupEnterAnnotationKeystroke'](){const _0x2a956c=_0x192e81=>{_0x192e81['on']('ready',()=>{_0x192e81['keystrokes']['set'](_0x21a0db,(_0x9ce82d,_0x4e9ec8)=>{const _0x5667c4=_0x4149c8(this['activeAnnotations']['values']());_0x5667c4&&(_0x5667c4['view']['focus'](),_0x4e9ec8());});});};this['context']instanceof _0x53fa41?_0x2a956c(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x3587f1,_0x22a8ff)=>{_0x2a956c(_0x22a8ff);});}['_setupEscapeAnnotationHandling'](){const _0x24d9cf=_0x469ab8=>{const _0x5ab381=_0x469ab8['source'],_0x2a31f3=[];let _0x2b65be;if(Array['isArray'](_0x5ab381['target'])){_0x2b65be=_0x5ab381['target'][0x0],this['context']instanceof _0x53fa41?_0x2a31f3['push'](this['context']):this['context']['editors']&&_0x2a31f3['push'](...this['context']['editors']);for(const _0x16e10d of _0x2a31f3)for(const _0x4ca598 of _0x16e10d['editing']['view']['domRoots']['values']())if(_0x4ca598['contains'](_0x2b65be))return void _0x16e10d['editing']['view']['focus']();_0x2b65be['focus']();}};this['listenTo'](this['collection'],'add',(_0x4a6996,_0x4d59b5)=>{this['listenTo'](_0x4d59b5,'escape',_0x24d9cf,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x13bba2,_0xead261)=>{this['stopListening'](_0xead261,'escape',_0x24d9cf);});}};const ii=Symbol('noChannel'),ei={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},si=/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x5cdce0();var oi=class extends _0x1011c1{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[ti,_0x193707,_0x43683a];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1f1991){super(_0x1f1991),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x310a35=this['context']['config'];_0x310a35['define']('comments.maxCommentsWhenCollapsed',0x2),_0x310a35['define']('comments.maxThreadTotalWeight',0x1f4),_0x310a35['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x310a35['define']('comments.CommentThreadView',Ut),_0x310a35['define']('comments.CommentView',Yt),_0x310a35['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x26b45f=this['context']['plugins']['get'](ti);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x4adafa,_0x4f3ca4)=>this['_addCommentThread'](_0x4f3ca4)),this['on']('submitCommentThread',(_0x2dc085,_0x3ecdc8)=>this['_submitCommentThread'](_0x3ecdc8)),this['on']('resolveCommentThread',(_0x38c882,_0x2d6d47)=>this['_resolveCommentThread'](_0x2d6d47)),this['on']('resolveCommentThread',(_0x20f922,_0x33fae5)=>this['_updateActiveAnnotation'](_0x33fae5),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x22bad2,_0x23533c)=>this['_reopenCommentThread'](_0x23533c)),this['on']('reopenCommentThread',(_0x54d2bd,_0x490065)=>this['_updateActiveAnnotation'](_0x490065),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x2ccc69,_0x3305e9)=>this['_removeCommentThread'](_0x3305e9)),this['on']('updateCommentThread',(_0x383adb,_0x1cb83b)=>this['_updateCommentThread'](_0x1cb83b)),this['on']('updateCommentThread',(_0x1e56b3,_0x5b2b7b)=>this['_updateActiveAnnotation'](_0x5b2b7b),{'priority':'lowest'}),this['on']('addComment',(_0x53982c,_0x7404ba)=>this['_addComment'](_0x7404ba)),this['on']('updateComment',(_0x18343d,_0x14c060)=>this['_updateComment'](_0x14c060)),this['on']('removeComment',(_0x2553ae,_0x3638b)=>this['_removeComment'](_0x3638b)),this['on']('addComment',(_0x1a6d52,{threadId:_0x438ebd,isFromAdapter:_0x248e79})=>{if(_0x248e79)return;const _0x4ad129=this['getCommentThread'](_0x438ebd),_0xf1abac=_0x4ad129&&this['_threadToController']['get'](_0x4ad129);_0xf1abac&&_0xf1abac['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x26b45f,'change:activeAnnotations',(_0x4b3a8f,_0x39f795,_0x105b96)=>{const _0x431d9c=Array['from'](_0x105b96)['map'](_0x58a277=>this['_viewToController']['get'](_0x58a277['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x431d9c?_0x431d9c['model']:null;});}set['adapter'](_0x380151){if(this['_adapter'])throw new _0x4b20e3('commentsrepository-adapter-already-set');this['_adapter']=_0x380151;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x3640dd=ii,threadId:_0x3886a7=_0x2624e4(),comments:_0xaf5cf6=[],unlinkedAt:_0x1454f9=null,resolvedAt:_0x2e191d=null,resolvedBy:_0x3ed211=null,target:_0x3caff1=null,context:_0xa61496=null,attributes:_0x5ce3b5={},isResolvable:_0x39d10a=!0x0,isSubmitted:_0x50ad98=!0x1,isFromAdapter:_0xa14603=!0x1}={}){return this['fire'](ai('addCommentThread',_0x3640dd),{'channelId':_0x3640dd,'threadId':_0x3886a7,'comments':_0xaf5cf6,'unlinkedAt':_0x1454f9,'resolvedAt':_0x2e191d,'resolvedBy':_0x3ed211,'target':_0x3caff1,'context':_0xa61496,'attributes':_0x5ce3b5,'isFromAdapter':_0xa14603,'isResolvable':_0x39d10a,'isSubmitted':_0x50ad98}),this['getCommentThread'](_0x3886a7);}['openNewCommentThread']({channelId:_0x3fe77c=ii,threadId:_0x273b28=_0x2624e4(),target:_0x4ed589,context:_0x1e5235=null,isResolvable:_0x35888a=!0x0}){if(this['_readOnlyChannels']['has'](_0x3fe77c)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x4ed589)throw new _0x4b20e3('commentsrepository-missing-target');const _0x4628d5=this['addCommentThread']({'channelId':_0x3fe77c,'threadId':_0x273b28,'target':_0x4ed589,'context':_0x1e5235,'isResolvable':_0x35888a});if(!_0x4628d5)return null;const _0xff8b8b=this['_threadToController']['get'](_0x4628d5),_0x503c49=_0xff8b8b['view']['commentThreadInputView']['commentInputView'],_0x3281a0=this['context']['plugins']['get'](ti),_0x392490=_0x3281a0['getByInnerView'](_0xff8b8b['view']);return _0x3281a0['activate'](_0x392490),_0x503c49['once']('editorReady',()=>_0x503c49['focus']()),_0x4628d5;}['hasCommentThread'](_0x783ba2){if('string'!=typeof _0x783ba2)throw new _0x4b20e3('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x783ba2);}['updateCommentThread']({channelId:_0x1bed84=ii,threadId:_0x467ddf,context:_0x448eaf,unlinkedAt:_0x56bf73,attributes:_0x417e3b,isFromAdapter:_0x23ad14=!0x1}){return this['fire'](ai('updateCommentThread',_0x1bed84),{'channelId':_0x1bed84,'threadId':_0x467ddf,'context':_0x448eaf,'unlinkedAt':_0x56bf73,'attributes':_0x417e3b,'isFromAdapter':_0x23ad14}),this['getCommentThread'](_0x467ddf);}['getCommentThread'](_0x116c9d){if('string'!=typeof _0x116c9d)throw new _0x4b20e3('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x116c9d);}['fetchCommentThread']({channelId:_0x360f4a,threadId:_0x56fe27}={}){const _0x4d6d41=this['getCommentThread'](_0x56fe27);if(_0x4d6d41)return Promise['resolve'](_0x4d6d41);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x4b20e3('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x360f4a,'threadId':_0x56fe27})['then'](_0x620826=>this['hasCommentThread'](_0x56fe27)?this['getCommentThread'](_0x56fe27):_0x620826?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x360f4a},_0x620826)):void 0x0)['catch'](_0x14de4b=>{throw console['error'](_0x14de4b),new _0x4b20e3('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x4dbc4f,skipNotAttached:_0x40aeac=!0x1,skipEmpty:_0x5841e5=!0x1,toJSON:_0x59b837=!0x1}={}){const _0x1b3609=[];for(const _0x6a8b2b of this['_threads']['values']())_0x4dbc4f&&_0x6a8b2b['channelId']!==_0x4dbc4f||_0x40aeac&&!_0x6a8b2b['isAttached']||_0x5841e5&&0x0===_0x6a8b2b['length']||_0x1b3609['push'](_0x6a8b2b);return _0x59b837?_0x1b3609['map'](_0x441d69=>_0x441d69['toJSON']()):_0x1b3609;}['getAnnotationForCommentThread'](_0x3d3e6a){const _0x58a69e=this['_threadToController']['get'](_0x3d3e6a);return _0x58a69e&&this['context']['plugins']['get'](ti)['getByInnerView'](_0x58a69e['view'])||null;}['getCommentThreadForAnnotation'](_0x4d0b22){const _0x371e3f=this['_viewToController']['get'](_0x4d0b22['innerView']);return _0x371e3f?_0x371e3f['model']:null;}['setActiveCommentThread'](_0xbbe02){const _0x1dac6b=this['context']['plugins']['get'](ti);if(!_0xbbe02)return void(this['activeCommentThread']&&_0x1dac6b['deactivateAll']());const _0x5fd87e=this['getCommentThread'](_0xbbe02);if(!_0x5fd87e)throw new _0x4b20e3('commentsrepository-active-missing-comment-thread',null,{'threadId':_0xbbe02});if(!this['_threadToController']['has'](_0x5fd87e))throw new _0x4b20e3('commentsrepository-active-not-attached',null,{'threadId':_0xbbe02});const _0x1e7f3b=_0x1dac6b['getByInnerView'](this['_threadToController']['get'](_0x5fd87e)['view']);_0x1dac6b['activate'](_0x1e7f3b);}['switchReadOnly'](_0x1f77b5,_0x180328){_0x1f77b5?this['_readOnlyChannels']['add'](_0x180328):this['_readOnlyChannels']['delete'](_0x180328),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x2a9036){return this['_readOnlyChannels']['has'](_0x2a9036)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x451d32,_0x35bad1){return new bt(_0x451d32,_0x35bad1);}['setPermissions'](_0x4079f7,_0x36b9fe=ii){this['_permissions']['set'](_0x36b9fe,_0x4079f7),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x395c31=ii){return this['_permissions']['has'](_0x395c31)?this['_permissions']['get'](_0x395c31):ei;}['_addCommentThread']({channelId:_0x220192,threadId:_0x112cd7,comments:_0x127613,unlinkedAt:_0x3836ad,resolvedAt:_0x561484,resolvedBy:_0x55c0f9,target:_0x39607e,context:_0x69e0e8,attributes:_0x3185ed,isFromAdapter:_0x2e209a,isResolvable:_0x4b26a2,isSubmitted:_0x1a706a}){if('string'!=typeof _0x112cd7)throw new _0x4b20e3('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x112cd7});if(this['hasCommentThread'](_0x112cd7))throw new _0x4b20e3('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x112cd7});const _0x16fd5f=new ri(this,{'channelId':_0x220192,'id':_0x112cd7,'context':_0x69e0e8,'attributes':_0x3185ed,'unlinkedAt':_0x3836ad,'resolvedAt':_0x561484,'resolvedBy':_0x55c0f9?this['context']['plugins']['get'](_0x43683a)['getUser'](_0x55c0f9):null,'isResolvable':_0x4b26a2,'isSubmitted':_0x1a706a||_0x2e209a});this['_threads']['set'](_0x112cd7,_0x16fd5f);for(const _0x150792 of _0x127613)_0x16fd5f['_add'](this['_createNewComment']({'threadId':_0x112cd7,..._0x150792}));return _0x39607e&&_0x16fd5f['attachTo'](_0x39607e),_0x2e209a||!_0x16fd5f['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x220192,'threadId':_0x112cd7});}['_submitCommentThread']({channelId:_0x30e4dd,threadId:_0x422b23}){if(!this['hasCommentThread'](_0x422b23))throw new _0x4b20e3('commentsrepository-missing-comment-thread',this);const _0x5aafbf=this['getCommentThread'](_0x422b23);if(_0x5aafbf['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x2c1bc1,comments:_0x16890d,resolvedAt:_0x3e7f3f,resolvedBy:_0x274218,context:_0x409d37,attributes:_0x486e27}=_0x5aafbf,_0x33458d=this['context']['plugins']['get']('PendingActions'),_0x263881=_0x33458d['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x30e4dd,'threadId':_0x2c1bc1,'comments':_0x16890d['map'](_0x42999c=>_0x42999c['toJSON']()),'resolvedAt':_0x3e7f3f,'resolvedBy':_0x274218?_0x274218['id']:_0x274218,'context':_0x409d37,'attributes':_0x486e27})['then'](({comments:_0x319e0e})=>{_0x33458d['remove'](_0x263881);for(const _0x1ff9c4 of _0x319e0e)this['_updateComment']({'channelId':_0x30e4dd,'threadId':_0x422b23,'commentId':_0x1ff9c4['commentId'],'createdAt':_0x1ff9c4['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x2c84ba=>{throw console['error'](_0x2c84ba),new _0x4b20e3('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x305dd9,target:_0x490b23}){const _0x3b60b7=this['getCommentThread'](_0x305dd9);if(!_0x3b60b7)throw new _0x4b20e3('commentsrepository-attach-missing-comment-thread',this);const _0x1bc1e7=this['context']['plugins']['get']('PendingActions'),_0x1b5a6f=this['context']['plugins']['get'](ti),_0x16df8b=this['_createCommentThreadView'](_0x3b60b7),_0x551d74=new bt(_0x3b60b7,_0x16df8b);let _0x34a3dd=null;_0x16df8b['on']('change:isDirty',(_0x5c69e9,_0x4ececd,_0x1e510d)=>{_0x1e510d?_0x34a3dd=_0x1bc1e7['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x34a3dd&&(_0x1bc1e7['remove'](_0x34a3dd),_0x34a3dd=null);}),this['_threadToController']['set'](_0x3b60b7,_0x551d74),this['_viewToController']['set'](_0x16df8b,_0x551d74);const _0x35e129=new qt(this['context']['locale'],_0x16df8b);_0x35e129['bind']('length')['to'](_0x16df8b),_0x35e129['bind']('isDirty')['to'](_0x16df8b,'isDirty',_0x16df8b,'length',(_0x398aa9,_0x48976f)=>_0x398aa9||!_0x48976f),_0x35e129['bind']('isActive')['to'](_0x16df8b),_0x35e129['type']='comment';const _0x267074=new $t({'view':_0x35e129,'target':_0x490b23,'type':'comment','isVisible':!_0x3b60b7['archivedAt']&&!!('function'==typeof _0x490b23?_0x490b23():_0x490b23)});return _0x16df8b['on']('escape',()=>{_0x267074['fire']('escape');}),this['_bindAnnotationToEditors'](_0x16df8b,_0x267074),_0x1b5a6f['add'](_0x267074),_0x267074;}['_bindAnnotationToEditors'](_0x25a2cf,_0x31cf40){this['listenTo'](_0x25a2cf,'editorReady',(_0x29c049,_0x26e549)=>{const _0x4775af=_0x26e549['ui']['view']['body']['bodyCollectionContainer'];_0x31cf40['focusableElements']['add'](_0x4775af),this['context']instanceof _0x53fa41&&this['context']['ui']['focusTracker']['add'](_0x4775af);},{'priority':'highest'}),this['listenTo'](_0x25a2cf,'editorDestroyed',(_0x3fbfcf,_0x2e7719)=>{const _0x2dc198=_0x2e7719['ui']['view']['body']['bodyCollectionContainer'];_0x31cf40['focusableElements']['has'](_0x2dc198)&&_0x31cf40['focusableElements']['remove'](_0x2dc198),this['context']instanceof _0x53fa41&&this['context']['ui']['focusTracker']['remove'](_0x2dc198);});}['_unbindEditors'](_0x240c42){this['stopListening'](_0x240c42,'editorReady'),this['stopListening'](_0x240c42,'editorDestroyed');}['_createCommentThreadView'](_0x4cd5b1){const _0x447e6e=this['context']['plugins']['get'](_0x43683a),{config:_0x392a9f,locale:_0x3f9c59}=this['context'],_0x21b1fc=_0x48eac5(_0x392a9f['get']('locale'),_0x3f9c59);return new(0x0,(_0x392a9f['get']('comments'))['CommentThreadView'])(_0x3f9c59,_0x4cd5b1,_0x447e6e['me'],{'editorConfig':{..._0x392a9f['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x392a9f['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x392a9f['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x392a9f['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x392a9f['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x21b1fc,'CommentView':_0x392a9f['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x527b99,channelId:_0x18e3b5,resolvedAt:_0x4d38c3,resolvedBy:_0x3bb7a5,isFromAdapter:_0x55daa5}){if(!this['hasCommentThread'](_0x527b99))throw new _0x4b20e3('commentsrepository-missing-comment-thread',null,{'threadId':_0x527b99});const _0x1448ef=this['getCommentThread'](_0x527b99);if(_0x1448ef['isResolved'])throw new _0x4b20e3('commentsrepository-resolved-comment-thread',null,{'threadId':_0x527b99});const _0x43f336=this['context']['plugins']['get'](_0x43683a);if(_0x1448ef['resolvedBy']=_0x43f336['getUser'](_0x3bb7a5),_0x1448ef['resolvedAt']=_0x4d38c3,_0x55daa5||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x476ea6=this['context']['plugins']['get']('PendingActions'),_0x39f7c2=_0x476ea6['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x18e3b5,'threadId':_0x527b99})['then'](({resolvedAt:_0x79b98,resolvedBy:_0x1d5b3e})=>{_0x476ea6['remove'](_0x39f7c2),_0x1448ef['resolvedBy']['id']!==_0x1d5b3e&&(_0x1448ef['resolvedBy']=_0x43f336['getUser'](_0x1d5b3e)),_0x1448ef['resolvedAt']=_0x79b98;})['catch'](_0x4fe91d=>{throw console['error'](_0x4fe91d),new _0x4b20e3('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x5edd76,channelId:_0x4e5f22,isFromAdapter:_0x8c189b}){if(!this['hasCommentThread'](_0x5edd76))throw new _0x4b20e3('commentsrepository-missing-comment-thread',null,{'threadId':_0x5edd76});const _0x7eecda=this['getCommentThread'](_0x5edd76);if(!_0x7eecda['isResolved'])throw new _0x4b20e3('commentsrepository-reopen-comment-thread',null,{'threadId':_0x5edd76});if(_0x7eecda['resolvedBy']=null,_0x7eecda['resolvedAt']=null,_0x8c189b||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x17073f=this['context']['plugins']['get']('PendingActions'),_0x31ef02=_0x17073f['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x4e5f22,'threadId':_0x5edd76})['then'](()=>_0x17073f['remove'](_0x31ef02))['catch'](_0x10365a=>{throw console['error'](_0x10365a),new _0x4b20e3('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x572a45,isFromAdapter:_0x4d8384}){const _0x5d0753=this['getCommentThread'](_0x572a45);if(!_0x5d0753)throw new _0x4b20e3('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x572a45),this['_threads']['delete'](_0x572a45),!_0x5d0753['isSubmitted']||_0x4d8384||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x50d9d1=this['context']['plugins']['get']('PendingActions'),{channelId:_0x491dab}=_0x5d0753,_0x58b473=_0x50d9d1['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x491dab,'threadId':_0x572a45})['then'](()=>_0x50d9d1['remove'](_0x58b473))['catch'](_0x1d7be3=>{throw console['error'](_0x1d7be3),new _0x4b20e3('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x412448,unlinkedAt:_0x29c0f0,context:_0xc67322,attributes:_0x7140be,isFromAdapter:_0x5bcd92}){if('string'!=typeof _0x412448)throw new _0x4b20e3('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x412448});if(!this['hasCommentThread'](_0x412448))throw new _0x4b20e3('commentsrepository-missing-comment-thread',null,{'threadId':_0x412448});const _0xb38a4e=this['getCommentThread'](_0x412448);let _0x1c5339=!0x1;if(void 0x0!==_0xc67322&&_0xb38a4e['context']!==_0xc67322&&(_0xb38a4e['context']=_0xc67322,_0x1c5339=!0x0),void 0x0!==_0x29c0f0&&_0xb38a4e['unlinkedAt']!==_0x29c0f0&&(_0xb38a4e['unlinkedAt']=_0x29c0f0,_0x1c5339=!0x0),_0x7140be&&!_0x127d94(_0x7140be,_0xb38a4e['attributes'])&&(_0xb38a4e['attributes']=_0x7140be,_0x1c5339=!0x0),!_0x1c5339)return Promise['resolve']();if(!_0xb38a4e['isSubmitted']||_0x5bcd92||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x884bce=this['context']['plugins']['get']('PendingActions'),{channelId:_0x512cca}=_0xb38a4e,_0x302a5e=_0x884bce['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x512cca,'threadId':_0x412448,'context':_0xc67322,'unlinkedAt':_0x29c0f0,'attributes':_0x7140be})['then'](()=>_0x884bce['remove'](_0x302a5e))['catch'](_0x459677=>{throw console['error'](_0x459677),new _0x4b20e3('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0xc9ef79){const _0x366f70=this['context']['plugins']['get'](ti),_0x523ac4=this['getCommentThread'](_0xc9ef79);if(_0x523ac4['_isAttached']=!0x1,this['_threadToController']['has'](_0x523ac4)){const _0x1697e6=this['_threadToController']['get'](_0x523ac4),_0x3bba18=_0x1697e6['view'],_0x24af57=_0x366f70['getByInnerView'](_0x3bba18);this['_threadToController']['delete'](_0x523ac4),this['_viewToController']['delete'](_0x3bba18),_0x24af57&&_0x366f70['remove'](_0x24af57),_0x1697e6['destroy'](),_0x3bba18['destroy']()['then'](()=>{this['_unbindEditors'](_0x3bba18);});}}['_updateActiveAnnotation']({threadId:_0x31502b,resolvedAt:_0x17777a,unlinkedAt:_0x49bfd0}){const _0x2ace3c=!!_0x17777a,_0x59fe4b=this['context']['plugins']['get'](ti),_0x4e1af1=this['getCommentThread'](_0x31502b);if(this['_threadToController']['has'](_0x4e1af1)){const _0x1d4490=this['_threadToController']['get'](_0x4e1af1)['view'],_0x513d3b=_0x59fe4b['getByInnerView'](_0x1d4490);_0x513d3b&&(_0x2ace3c&&_0x59fe4b['_removeActiveAnnotation'](_0x513d3b),_0x49bfd0?_0x513d3b['isVisible']=!0x1:_0x513d3b['refreshVisibility']());}}['_getExternalAuthor'](_0x5defe4){const _0x1dc624=this['context']['plugins']['get'](_0x43683a),_0x26903a=_0x495ee9('external:'+_0x5defe4),_0x10b6f4=_0x1dc624['getUser'](_0x26903a);return _0x10b6f4||_0x1dc624['addUser']({'id':_0x26903a,'name':_0x5defe4});}['_createNewComment']({threadId:_0x2f09b8,commentId:_0x1e6758=_0x2624e4(),content:_0x2a79e2,authorId:_0x3556c9,createdAt:_0x48fbce,attributes:_0x25f45d}){if('string'!=typeof _0x1e6758)throw new _0x4b20e3('commentsrepository-invalid-commentid');if('string'!=typeof _0x3556c9)throw new _0x4b20e3('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x2a79e2||!_0x2a79e2['trim']())throw new _0x4b20e3('commentsrepository-invalid-comment-content');const _0x54aa6a=this['context']['plugins']['get'](_0x43683a)['getUser'](_0x3556c9);if(!_0x54aa6a)throw new _0x4b20e3('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x3556c9});let _0x142342=null,_0x4cb95a=_0x48fbce;return _0x25f45d?.['@external']&&(_0x142342=this['_getExternalAuthor'](_0x25f45d['@external']['authorName']),_0x4cb95a=new Date(_0x25f45d['@external']['createdAt'])),new hi(this,{'threadId':_0x2f09b8,'id':_0x1e6758,'author':_0x142342||_0x54aa6a,'creator':_0x54aa6a,'content':_0x2a79e2,'createdAt':_0x48fbce,'authoredAt':_0x4cb95a,'attributes':_0x25f45d});}['_addComment'](_0x3ff215){let {threadId:_0x9bc25e,content:_0x20689b,attributes:_0x6f2d8b,isFromAdapter:_0x3cd798}=_0x3ff215;const _0x28a4ed=this['getCommentThread'](_0x3ff215['threadId']);if(!_0x28a4ed)throw new _0x4b20e3('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x3b9aa4=this['_createNewComment'](_0x3ff215),{id:_0x5de685}=_0x3b9aa4;if(_0x28a4ed['_add'](_0x3b9aa4),_0x3cd798||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x28a4ed['isSubmitted'])return Promise['resolve']();const _0x2d63bc=this['context']['plugins']['get']('PendingActions'),{channelId:_0x182cd4}=_0x28a4ed,_0x5cb37a=_0x2d63bc['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x6f2d8b||(_0x6f2d8b={}),this['adapter']['addComment']({'channelId':_0x182cd4,'threadId':_0x9bc25e,'commentId':_0x5de685,'content':_0x20689b,'attributes':_0x6f2d8b})['then'](_0x51267e=>{_0x2d63bc['remove'](_0x5cb37a),_0x51267e&&this['_updateComment']({'channelId':_0x182cd4,'threadId':_0x9bc25e,'commentId':_0x5de685,'createdAt':_0x51267e['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x1c58bc=>{throw console['error'](_0x1c58bc),new _0x4b20e3('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x5c3cd7,commentId:_0x6b5bf0,content:_0x5c8e5c,createdAt:_0x48b440,attributes:_0x236f37,isFromAdapter:_0x59506a}){if(void 0x0!==_0x5c8e5c&&('string'!=typeof _0x5c8e5c||!_0x5c8e5c['trim']()['length']))throw new _0x4b20e3('commentsrepository-update-comment-invalid-content');const _0x592c32=this['getCommentThread'](_0x5c3cd7),_0x25e78b=_0x592c32['getComment'](_0x6b5bf0);if(!_0x25e78b)throw new _0x4b20e3('commentsrepository-update-missing-comment',this);let _0x380046=!0x1;if(_0x5c8e5c&&_0x5c8e5c!==_0x25e78b['content']&&(_0x25e78b['isEditable']||_0x59506a)&&(_0x25e78b['content']=_0x5c8e5c,_0x380046=!0x0),_0x48b440&&_0x48b440!==_0x25e78b['createdAt']&&(_0x25e78b['createdAt']=_0x48b440,_0x25e78b['isExternal']||(_0x25e78b['authoredAt']=_0x48b440),_0x380046=!0x0),_0x236f37&&!_0x127d94(_0x236f37,_0x25e78b['attributes'])&&(_0x25e78b['attributes']=_0x236f37,_0x380046=!0x0),!_0x380046)return Promise['resolve']();if(_0x592c32['fire']('commentUpdated'),_0x59506a||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x2c3753=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3017a8}=this['getCommentThread'](_0x25e78b['threadId']),_0x32bfc4=_0x2c3753['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x3017a8,'threadId':_0x5c3cd7,'commentId':_0x6b5bf0,'content':_0x5c8e5c,'attributes':_0x236f37})['then'](()=>_0x2c3753['remove'](_0x32bfc4))['catch'](_0x49be45=>{throw console['error'](_0x49be45),new _0x4b20e3('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x1cccc2,commentId:_0x4566a9,isFromAdapter:_0xf26bb2}){const _0x311c9e=this['getCommentThread'](_0x1cccc2),_0x27d1a4=_0x311c9e['getComment'](_0x4566a9);if(!_0x27d1a4)throw new _0x4b20e3('commentsrepository-remove-missing-comment',this);if(_0x311c9e['_remove'](_0x27d1a4),_0xf26bb2||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x1c4ffa=this['context']['plugins']['get']('PendingActions'),{channelId:_0x23f2dd}=_0x311c9e,_0x1a00f7=_0x1c4ffa['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x23f2dd,'threadId':_0x1cccc2,'commentId':_0x4566a9})['then'](()=>_0x1c4ffa['remove'](_0x1a00f7))['catch'](_0x952a43=>{throw console['error'](_0x952a43),new _0x4b20e3('commentsrepository-remove-comment-internal-error',this);});}},ri=class extends si{['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x3d44f7,_0x4304ec){super();const _0x29e613=_0x4304ec['isResolvable'];this['channelId']=_0x4304ec['channelId'],this['id']=_0x4304ec['id'],this['comments']=new _0x43910f(),this['_repository']=_0x3d44f7,this['_isAttached']=!0x1,this['_isSubmitted']=_0x4304ec['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x3d44f7,'_permissions',_0x3d44f7,'_readOnlyChannels',()=>_0x3d44f7['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x3d44f7,'_permissions',()=>_0x3d44f7['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x3d44f7,'_permissions',()=>{const _0xc0f24c=_0x3d44f7['getPermissions'](this['channelId']);return _0xc0f24c['write']||_0xc0f24c['admin'];}),this['bind']('isResolvable')['to'](_0x3d44f7,'_permissions',()=>_0x29e613&&_0x3d44f7['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x4304ec['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x2fee61,_0x3cfb6a)=>_0x2fee61?_0x3cfb6a?_0x2fee61<_0x3cfb6a?_0x2fee61:_0x3cfb6a:_0x2fee61:_0x3cfb6a),this['set']('unlinkedAt',_0x4304ec['unlinkedAt']||null),this['set']('resolvedAt',_0x4304ec['resolvedAt']||null),this['set']('resolvedBy',_0x4304ec['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x5b5a71=>!!_0x5b5a71),this['set']('attributes',_0x4304ec['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x226a84,_0x32e3b1)=>_0x226a84+_0x32e3b1['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x2ab679,id:_0x3342ed}=this;this['_repository']['fire'](ai('submitCommentThread',_0x2ab679),{'channelId':_0x2ab679,'threadId':_0x3342ed});}['setUnlinkedAt'](_0x489db7){this['_update']({'unlinkedAt':_0x489db7});}['resolve']({resolvedAt:_0x1fad02=new Date(),resolvedBy:_0x16357d='',isFromAdapter:_0x19c7ce=!0x1}={}){const _0x26891b=this['_repository']['context']['plugins']['get'](_0x43683a)['me'],{channelId:_0x1b4ec2,id:_0x947b76}=this;this['_repository']['fire'](ai('resolveCommentThread',_0x1b4ec2),{'channelId':_0x1b4ec2,'threadId':_0x947b76,'resolvedAt':_0x1fad02,'resolvedBy':_0x16357d||_0x26891b['id'],'isFromAdapter':_0x19c7ce});}['reopen']({isFromAdapter:_0x3be46e=!0x1}={}){const {channelId:_0x2d3b41,id:_0xada258}=this;this['_repository']['fire'](ai('reopenCommentThread',_0x2d3b41),{'channelId':_0x2d3b41,'threadId':_0xada258,'isFromAdapter':_0x3be46e});}['setContext'](_0x357a97){this['context']||this['_update']({'context':_0x357a97});}['setAttribute'](_0x2ba054,_0x57ec2f){const _0x50cadd=_0x569f09(this['attributes']);_0x47947d(_0x50cadd,_0x2ba054,_0x57ec2f),this['_update']({'attributes':_0x50cadd});}['removeAttribute'](_0x2e9b27){const _0x3ff09a=_0x569f09(this['attributes']);_0xc401c1(_0x3ff09a,_0x2e9b27),this['_update']({'attributes':_0x3ff09a});}['remove']({isFromAdapter:_0x570c85=!0x1}={}){const {channelId:_0x3e95c2,id:_0x265612}=this;this['_repository']['fire'](ai('removeCommentThread',_0x3e95c2),{'channelId':_0x3e95c2,'threadId':_0x265612,'isFromAdapter':_0x570c85});}['attachTo'](_0x112a04){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x112a04});}['addComment'](_0x370219){const {channelId:_0x10ab99,id:_0x37b23f}=this;this['_repository']['fire'](ai('addComment',_0x10ab99,_0x37b23f),Object['assign']({'channelId':_0x10ab99,'threadId':_0x37b23f},_0x370219));}['getComment'](_0x4808be){if('string'!=typeof _0x4808be)throw new _0x4b20e3('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x4808be});return this['comments']['get'](_0x4808be);}['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'](_0x2450f9=>_0x2450f9['toJSON']()),'attributes':this['attributes']};}['_add'](_0x18f649){return this['listenTo'](_0x18f649,'change:authoredAt',()=>{const _0x344644=this['_findOptimalIndex'](_0x18f649),_0x2aa4e9=this['comments'];_0x344644-0x1!=_0x2aa4e9['getIndex'](_0x18f649)&&_0x344644+0x1!=_0x2aa4e9['getIndex'](_0x18f649)&&(this['_remove'](_0x18f649),this['_add'](_0x18f649));}),this['comments']['add'](_0x18f649,this['_findOptimalIndex'](_0x18f649));}['_update'](_0x1e4487){const {channelId:_0x578da6,id:_0xda277b}=this;this['_repository']['fire'](ai('updateCommentThread',_0x578da6),{..._0x1e4487,'channelId':_0x578da6,'threadId':_0xda277b});}['_remove'](_0x351dea){return this['stopListening'](_0x351dea),_0x351dea['destroy'](),this['comments']['remove'](_0x351dea);}['_findOptimalIndex'](_0x244a5f){const _0x47470b=this['comments']['find'](_0x551e31=>new Date(_0x551e31['authoredAt'])['getTime']()>new Date(_0x244a5f['authoredAt'])['getTime']());return _0x47470b?this['comments']['getIndex'](_0x47470b):this['length'];}},hi=class extends ni{['id'];['threadId'];['author'];['creator'];['createdAt'];['_repository'];constructor(_0x2fd80d,_0x45b563){super();const _0x58208a=_0x2fd80d['context']['plugins']['get'](_0x43683a)['me'],_0x708942=_0x2fd80d['getCommentThread'](_0x45b563['threadId']),_0x5767a1=0x0===_0x708942['comments']['length'],_0x5b677b=_0x58208a===_0x45b563['author'];this['id']=_0x45b563['id'],this['threadId']=_0x45b563['threadId'],this['author']=_0x45b563['author'],this['creator']=_0x45b563['creator'],this['set']('content',_0x45b563['content']),this['createdAt']=_0x45b563['createdAt']||new Date(),this['set']('authoredAt',_0x45b563['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x708942,'resolvedAt'),this['set']('attributes',_0x45b563['attributes']||{}),this['bind']('isEditable')['to'](_0x2fd80d,'_permissions',()=>{const _0x213a92=_0x2fd80d['getPermissions'](_0x708942['channelId'])['write'],_0x565ac9=_0x2fd80d['getPermissions'](_0x708942['channelId'])['modifyAll'];return _0x5b677b&&_0x213a92||!_0x5b677b&&_0x565ac9;}),this['bind']('isRemovable')['to'](_0x708942,'isRemovable',_0x2fd80d,'_permissions',_0x14ffc5=>{const _0x37f38b=_0x2fd80d['getPermissions'](_0x708942['channelId'])['write'],_0x8373f2=_0x2fd80d['getPermissions'](_0x708942['channelId'])['modifyAll'];return _0x5b677b&&_0x37f38b||_0x14ffc5&&_0x5767a1||!_0x5b677b&&_0x8373f2&&!_0x5767a1;}),this['bind']('isReadOnly')['to'](_0x708942,'isReadOnly'),this['_repository']=_0x2fd80d;}get['isExternal'](){return Boolean(this['attributes']&&this['attributes']['@external']);}get['weight'](){return Math['max'](function(_0xa3fdfa){const _0x567451=document['createElement']('div');return _0x567451['innerHTML']=_0xa3fdfa,_0x567451['textContent']['length'];}(this['content']),0xc8);}['update'](_0x422205){const {threadId:_0x51a8fa,id:_0x3ed4da}=this;if(!this['_repository']['hasCommentThread'](_0x51a8fa))throw new _0x4b20e3('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x4e75cf}=this['_repository']['getCommentThread'](_0x51a8fa);this['_repository']['fire'](ai('updateComment',_0x4e75cf,_0x51a8fa),{'channelId':_0x4e75cf,'threadId':_0x51a8fa,'commentId':_0x3ed4da,..._0x422205});}['setAttribute'](_0x2c3bb8,_0x3c46ec){const _0x32f400=_0x569f09(this['attributes']);_0x47947d(_0x32f400,_0x2c3bb8,_0x3c46ec),this['update']({'attributes':_0x32f400});}['removeAttribute'](_0x5de1ad){const _0x90576e=_0x569f09(this['attributes']);_0xc401c1(_0x90576e,_0x5de1ad),this['update']({'attributes':_0x90576e});}['remove'](_0x5dc0c2={}){if(!_0x5dc0c2['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x4191f7,id:_0x5e3007}=this;if(!this['_repository']['hasCommentThread'](_0x4191f7))throw new _0x4b20e3('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0xc54cd}=this['_repository']['getCommentThread'](_0x4191f7);this['_repository']['fire'](ai('removeComment',_0xc54cd,_0x4191f7),{'channelId':_0xc54cd,'threadId':_0x4191f7,'commentId':_0x5e3007,..._0x5dc0c2});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}};function ai(_0x38fdb8,..._0x282b66){for(const _0x12b35d of _0x282b66)void 0x0!==_0x12b35d&&(_0x38fdb8+=':'+String(_0x12b35d));return _0x38fdb8;}var ci=class extends _0x3ccdb2{constructor(_0xb80e0){super(_0xb80e0),this['set']('hasContent',!0x1);}['refresh'](){const _0x50cd6b=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x10760e of _0x50cd6b['getRanges']())if(this['_hasContent'](_0x10760e))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x3d806a=_0x2624e4(),ranges:_0x4632a4,comment:_0x49995e}={}){const _0x21cf59=this['editor']['model'],_0x4639d7=_0x4632a4??Array['from'](_0x21cf59['document']['selection']['getRanges']()),_0x6aebfc=[];for(const _0x101817 of _0x4639d7)this['_hasContent'](_0x101817)&&_0x6aebfc['push'](this['_trimToContent'](_0x101817));if(!_0x6aebfc['length'])throw new _0x4b20e3('addcommentthreadcommand-incorrect-ranges',null);_0x49995e&&this['_createCommentThread'](_0x3d806a,_0x49995e),this['_createMarkersFromRanges'](_0x3d806a,_0x6aebfc,!!_0x49995e);}['_createMarkersFromRanges'](_0x44eb5b,_0x267753,_0x18ee87){this['editor']['model']['change'](_0x15bd62=>{for(const _0x103727 of _0x267753){const _0x274cb4='comment:'+_0x44eb5b+':'+_0x2624e4()['substr'](0x1,0x5);_0x15bd62['addMarker'](_0x274cb4,{'range':_0x103727,'usingOperation':_0x18ee87,'affectsData':_0x18ee87});}});}['_createCommentThread'](_0x1cb239,_0x3cd5c5){const _0x572614=this['editor']['plugins']['get']('CommentsRepository'),_0x16cced=this['editor']['config']['get']('collaboration.channelId'),_0xa090eb=this['editor']['plugins']['get']('Users')['me'];if(!_0xa090eb)throw new _0x4b20e3('addcommentthreadcommand-user-not-found',null);_0x572614['addCommentThread']({'threadId':_0x1cb239,'channelId':_0x16cced,'comments':[{'authorId':_0xa090eb['id'],'content':_0x3cd5c5,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x76550f){for(const _0x27d197 of _0x76550f['getItems']())if(this['_itemIsContent'](_0x27d197))return!0x0;return!0x1;}['_itemIsContent'](_0x49f786){return _0x49f786['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x49f786)&&!_0x49f786['is']('element','tableCell');}['_trimToContent'](_0x43fdf5){const _0xcadedf=_0x101aaf=>!this['_itemIsContent'](_0x101aaf['item']),_0x4bb526=_0x43fdf5['start']['getLastMatchingPosition'](_0xcadedf),_0x3f7b97=_0x43fdf5['end']['getLastMatchingPosition'](_0xcadedf,{'direction':'backward'});return this['editor']['model']['createRange'](_0x4bb526,_0x3f7b97);}},di=class extends _0x26bf82{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[ti];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x427131){super(_0x427131),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x1a8636=this['editor'],_0x587009=_0x1a8636['model']['document']['selection'],_0x48c15c=_0x3b137b(()=>this['refreshSelectedViews'](),0xa);_0x587009['on']('change:range',(_0x341917,_0x3330ff)=>{_0x3330ff['directChange']&&(_0x48c15c['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x1a8636['editing']['view']['document'],'change:isFocused',(_0x3b9ff6,_0x49e400,_0x222bc4)=>{_0x222bc4&&_0x48c15c();}),this['listenTo'](_0x1a8636['ui']['focusTracker'],'change:isFocused',(_0x471d0b,_0x472f4e,_0xabbdb9)=>{_0xabbdb9||this['fire']('blur',{'isAnnotationTracked':_0xf53c75=>this['_editorAnnotationsData']['has'](_0xf53c75['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x1ddd58){if(this['_editorAnnotations']['has'](_0x1ddd58['view']))return;this['_editorAnnotations']['add'](_0x1ddd58['view']),this['editor']['ui']['focusTracker']['add'](_0x1ddd58['view']['element']);const _0x3afa16=this['editor']['plugins']['get'](ti);this['listenTo'](_0x3afa16['collection'],'remove',(_0x1071de,_0x380b7d)=>{this['editor']['ui']['focusTracker']['remove'](_0x380b7d['view']['element']),this['_editorAnnotations']['delete'](_0x380b7d['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x16c393){if('function'!=typeof _0x16c393)throw new _0x4b20e3('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x16c393);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x2cf171,annotations:_0x3af47e}){const _0x162854=[],_0x47dcce=this['editor']['model']['document']['selection'],_0x3a4cdc=Array['from'](_0x47dcce['getRanges']());for(const [_0x44d85b,_0x5f541a]of this['_editorAnnotationsData']){const _0x4e6a03=_0x24d49d(_0x5f541a),_0x41ccfe=_0x3af47e['getByInnerView'](_0x44d85b);_0x4e6a03&&_0x41ccfe&&_0x162854['push']({'annotation':_0x41ccfe,'range':_0x4e6a03});}function _0x24d49d(_0x90bb08){for(const _0x46b589 of _0x90bb08)for(const _0x206dc3 of _0x3a4cdc)if(_0x46b589['containsRange'](_0x206dc3,!_0x47dcce['isCollapsed']))return _0x46b589;return null;}return _0x162854['sort']((_0x3d3569,_0xcc278f)=>{const _0x39be94=_0x3d3569['range'],_0x4a7a01=_0xcc278f['range'];if(!_0x39be94['isEqual'](_0x4a7a01)){if(_0x39be94['containsRange'](_0x4a7a01,!0x0))return 0x1;if(_0x4a7a01['containsRange'](_0x39be94,!0x0))return-0x1;}return _0x3d3569['annotation']==_0x2cf171?-0x1:_0xcc278f['annotation']==_0x2cf171?0x1:0x0;})['map'](_0x496462=>_0x496462['annotation']);}get['_editorAnnotationsData'](){const _0x1ed1ee=new Map();for(const _0x17af81 of Array['from'](this['_dataCollectors']))for(const [_0x35b950,_0x3a56a0]of _0x17af81())_0x1ed1ee['set'](_0x35b950,_0x3a56a0);return _0x1ed1ee;}},li=class extends _0x26bf82{['afterInit'](){const _0x427bfe=this['editor'];_0x427bfe['plugins']['has']('RestrictedEditingModeEditing')&&_0x427bfe['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},mi=class extends _0x26bf82{constructor(_0x453a4a){super(_0x453a4a),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x182386=this['editor'],_0x18b592=_0x182386['commands']['get']('importWord'),_0x8c4d5a=_0x182386['plugins']['get'](_0x43683a);_0x18b592&&(_0x18b592['on']('execute',(_0x8ca7c7,[,_0x55c200])=>{_0x55c200['collaboration_features']={'comments':!0x0,'user_id':_0x8c4d5a['me']['id']};},{'priority':_0x18bc67['high']+0xa}),this['listenTo'](_0x18b592,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0xf4b899,_0xc4a0fd){const {comment_threads:_0x5ce04a}=_0xc4a0fd;_0x5ce04a&&_0x5ce04a['forEach'](({thread_id:_0x2e8429,comments:_0x4fe467,is_resolved:_0x606530})=>{const _0x5b51d2=new Date(),_0x4d8f0e=_0x4fe467['map'](({author:_0x3184b2,content:_0x25a5e2,created_at:_0x39f271})=>({'content':_0x25a5e2,'authorId':this['editor']['plugins']['get'](_0x43683a)['me']['id'],'createdAt':_0x5b51d2,'attributes':{'@external':{'authorName':_0x3184b2,'createdAt':_0x39f271?new Date(_0x39f271):new Date(),'source':'importWord'}}})),_0x2a6b33=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](oi)['addCommentThread']({'channelId':_0x2a6b33,'threadId':_0x2e8429,'comments':_0x4d8f0e,'resolvedAt':_0x606530?_0x5b51d2:null});});}},ui=class extends _0x26bf82{constructor(_0x4bb399){super(_0x4bb399),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0x2d43f6=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x2d43f6,'contentInsertion',(_0x541f87,_0x21ea0e)=>this['_removeMarkersWithoutThreads'](_0x21ea0e['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x2febbd){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x2febbd;const _0x444f64=this['editor']['plugins']['get']('CommentsRepository');for(const _0xe545ee of _0x2febbd['keys']()){const [_0x2a727f,_0x1aa200]=_0xe545ee['split'](':');'comment'!=_0x2a727f||_0x444f64['hasCommentThread'](_0x1aa200)||_0x2febbd['delete'](_0xe545ee);}return _0x2febbd;}['_registerMarkerInClipboardPipeline'](){const _0x5ced82=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x5f47ea=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x5f47ea&&_0x5ced82['_registerMarkerToCopy']('comment',_0x5f47ea);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x502f6e){switch(_0x502f6e){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function fi(_0x476acd){const _0x488ebe=_0x476acd['split'](':');return{'group':_0x488ebe[0x0],'id':_0x488ebe[0x1],'part':_0x488ebe[0x2]};}var pi=class extends _0x26bf82{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x30859e,_0xa865ab)=>{if(!_0xa865ab['options']['showCommentHighlights'])return null;if(_0xa865ab['options']['ignoreResolvedComments']){const {id:_0x8761ca}=fi(_0x30859e['markerName']);if(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x8761ca)?.['isResolved']&&_0x30859e['item'])return _0xa865ab['consumable']['consume'](_0x30859e['item'],'addMarker:'+_0x30859e['markerName']),_0xa865ab['consumable']['consume'](_0x30859e['item'],'removeMarker:'+_0x30859e['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x52f21c=>{_0x52f21c['on']('addMarker:comment',(_0x31e4dc,_0x3ef7e8,_0x46925d)=>{if(!_0x46925d['options']['showCommentHighlights'])return;const _0x369f41=_0x3ef7e8['item'];if(!_0x369f41)return;const _0x5e961b=_0x46925d['mapper']['toViewElement'](_0x369f41);this['editor']['model']['schema']['isObject'](_0x369f41)&&_0x5e961b&&!_0x5e961b['getCustomProperty']('widget')&&_0x5e961b['is']('containerElement')&&Ct(_0x5e961b,_0x46925d['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x1266f3,{writer:_0x229188,options:_0x148ddd})=>{if(!_0x148ddd['showCommentHighlights'])return null;const _0x57adf1=_0x229188['createContainerElement']('div'),_0x4741d1=_0x229188['createEmptyElement']('hr');return _0x229188['addClass']('ck-horizontal-line',_0x57adf1),_0x229188['insert'](_0x229188['createPositionAt'](_0x57adf1,0x0),_0x4741d1),_0x57adf1;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x31cc85,{writer:_0x449d25,options:_0x27e1e0})=>{if(!_0x27e1e0['showCommentHighlights'])return null;const _0x4f583e=_0x449d25['createContainerElement']('span'),_0x21b8a6=_0x449d25['createEmptyElement']('img');return _0x449d25['addClass']('image-inline',_0x4f583e),_0x449d25['insert'](_0x449d25['createPositionAt'](_0x4f583e,0x0),_0x21b8a6),_0x4f583e;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x4c4806,{writer:_0x1279d3,options:_0x4330a4})=>{if(_0x4330a4['showCommentHighlights'])return _0x1279d3['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x52cd62,_0x4fed9f,_0x468045)=>{_0x468045['options']['showCommentHighlights']&&_0x52cd62['stop']();},{'priority':'high'});}},wi=class extends _0x26bf82{static get['requires'](){return[oi,di,_0x43683a,li,mi,ui,pi];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4f6285){super(_0x4f6285),this['set']('isThreadsLoadingPaused',!0x0),_0x4f6285['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x1b314a,_0x498503,_0x48c0c6,_0x2b8154)=>{const _0x32ad0f=_0x4f6285['plugins']['get'](oi),_0x5c1ff9=_0x48c0c6?fi(_0x48c0c6)['id']:null;_0x4f6285['model']['change'](()=>{if(_0x5c1ff9){const _0x5ca5ac=this['getAllMarkersForId'](_0x5c1ff9);for(const _0x5748d0 of _0x5ca5ac)_0x4f6285['editing']['reconvertMarker'](_0x5748d0);}if(_0x2b8154){const {id:_0x402e93}=fi(_0x2b8154),_0x2e3e73=_0x32ad0f['getCommentThread'](_0x402e93);if(_0x2e3e73&&_0x2e3e73['unlinkedAt'])return;if(_0x2e3e73&&!_0x2e3e73['isAttached'])return;const _0x1874d4=this['getAllMarkersForId'](_0x402e93);for(const _0x1652bd of _0x1874d4)_0x4f6285['editing']['reconvertMarker'](_0x1652bd);}}),_0x5c1ff9&&this['scrollToThreadMarker'](_0x5c1ff9);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x34f5b9=this['editor'],_0x472f03=_0x34f5b9['plugins']['get'](oi),_0x3354cc=_0x34f5b9['config']['get']('collaboration.channelId'),_0x221dd1=_0x472f03['getCommentThreads']()['filter'](_0x5d5b51=>_0x5d5b51['channelId']!==_0x3354cc);_0x34f5b9['commands']['add']('addCommentThread',new ci(_0x34f5b9)),this['listenTo'](_0x34f5b9,'change:isReadOnly',(_0x54ae9e,_0x27164d,_0x2cba41)=>{_0x472f03['switchReadOnly'](_0x2cba41,_0x34f5b9['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x472f03,gi('addCommentThread',_0x3354cc),(_0x223822,{threadId:_0x445d30})=>{this['editor']['plugins']['get'](oi)['getCommentThread'](_0x445d30)?.['unlinkedAt']&&this['_attachArchivedThread'](_0x445d30);}),this['listenTo'](_0x472f03,gi('removeCommentThread',_0x3354cc),(_0x296ccf,{threadId:_0x1b961})=>{_0x34f5b9['model']['enqueueChange']({'isUndoable':!0x1},_0x19ffaf=>{const _0xc71bcd=this['getAllMarkersForId'](_0x1b961);for(const _0x1f4b9c of _0xc71bcd)_0x19ffaf['removeMarker'](_0x1f4b9c);});}),this['listenTo'](_0x472f03,gi('resolveCommentThread',_0x3354cc),(_0x5ea2a1,{threadId:_0x87be75})=>{this['_reconvertMarkers'](_0x87be75);const _0x4324e1=this['editor']['plugins']['get'](ti);(this['editor']['editing']['view']['hasDomSelection']||_0x4324e1['collection']['isFocused'])&&(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x87be75)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x472f03,gi('reopenCommentThread',_0x3354cc),(_0x2b7430,{threadId:_0x3b452d})=>{this['_reconvertMarkers'](_0x3b452d);},{'priority':'low'}),this['listenTo'](_0x472f03,gi('addComment',_0x3354cc),(_0x199bc7,{threadId:_0x561c05,isFromAdapter:_0x5ed0d7})=>{const _0x337220=this['getAllMarkersForId'](_0x561c05);!_0x5ed0d7&&0x0!=_0x337220['length']&&_0x472f03['hasCommentThread'](_0x561c05)&&0x1===_0x472f03['getCommentThread'](_0x561c05)['length']&&_0x34f5b9['model']['enqueueChange']({'isUndoable':!0x1},_0x3f9ec0=>{for(const _0x464fc7 of _0x337220)_0x3f9ec0['updateMarker'](_0x464fc7,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x221dd1);}['afterInit'](){!async function(_0x2256bb){const _0x476ce3='KpOBJGNSEgqCyfVF1kZ8lbnRjM7eIzAsDQHw9aThu6rcYi05UmPL4d3X2Wotvx',_0x297618=0x78e40,_0x19ab68=window['Date']['now'](),_0x53ff6e=_0x2256bb['editor'],_0x221172=new window['Promise'](_0x1dc257=>{_0x53ff6e['once']('ready',_0x1dc257);}),_0x10885f={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x3801dd=_0x53ff6e['config']['get']('licenseKey');async function _0xa04508(){let _0x2e72dc,_0x7c1d66=null,_0x2f841d=null;try{return'GPL'==_0x3801dd?'NotAllowed':(_0x2e72dc=_0x171407(),_0x2e72dc?(_0x2e72dc['usageEndpoint']&&(_0x2f841d=_0x262109(_0x2e72dc['usageEndpoint'],_0x2e72dc['jti'])),await _0x163d2d()?_0x1b8624()?_0x16de1c()?'Expired':_0x33f46a()?('evaluation'==_0x2e72dc['licenseType']&&(_0x7c1d66=_0x4caaa9('EvaluationLimit')),await _0x7fa439()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x16de1c(){const _0x417eef=['evaluation','trial']['includes'](_0x2e72dc['licenseType'])?_0x19ab68/0x3e8:0xe10*_0x297618;return _0x2e72dc['exp']<_0x417eef;}function _0x1b8624(){const _0x5bb21a=_0x2e72dc['features'];if(!_0x5bb21a)return!0x1;if(_0x5bb21a['includes']('*'))return!0x0;if(_0x5bb21a['includes']('CMT'))return!0x0;if(_0x5bb21a['includes']('TRILIUM')&&_0x2dc0e8())return!0x0;if(_0x5bb21a['includes']('RCMT')){if(_0x1e70ce())return!0x0;if(_0x1fdb69()||_0x76abb3())return!0x0;}return!0x1;}function _0x33f46a(){const _0x4d9842=_0x2e72dc['licensedHosts'];if(!_0x4d9842||0x0==_0x4d9842['length'])return!0x0;const {hostname:_0x1a5713}=new URL(window['location']['href']);if(_0x4d9842['includes'](_0x1a5713))return!0x0;const _0x13df35=_0x1a5713['split']('.');return _0x4d9842['filter'](_0x582bdf=>_0x582bdf['includes']('*'))['map'](_0x4d2f26=>_0x4d2f26['split']('.'))['filter'](_0x21da72=>_0x21da72['length']<=_0x13df35['length'])['map'](_0xbb1ee8=>Array(_0x13df35['length']-_0xbb1ee8['length'])['fill']('*'===_0xbb1ee8[0x0]?'*':'')['concat'](_0xbb1ee8))['some'](_0x27c20e=>_0x13df35['every']((_0x412d3a,_0x9dd870)=>_0x27c20e[_0x9dd870]===_0x412d3a||'*'===_0x27c20e[_0x9dd870]));}function _0x7fa439(){return _0x7c1d66&&_0x2f841d?new window['Promise']((_0x261552,_0x4449ef)=>{_0x7c1d66['then'](_0x261552,_0x4449ef),_0x2f841d['then'](_0x12b96f=>{'Valid'!=_0x12b96f&&_0x261552(_0x12b96f);},_0x4449ef);}):_0x7c1d66||_0x2f841d||'Valid';}}function _0x262109(_0x25b7fe,_0x24890a){return new window['Promise'](_0x4db168=>{if(_0x2f7541())return _0x4db168('Valid');_0x1e4a86(),_0x53ff6e['decorate']('_sendUsageRequest');let _0x3bbedf=!0x1;const _0x277f6e=_0x2624e4();function _0x4d6e2e(_0x5593cb){return!!_0x5593cb&&('object'==typeof _0x5593cb||'function'==typeof _0x5593cb)&&'function'==typeof _0x5593cb['then']&&'function'==typeof _0x5593cb['catch'];}function _0x487b01(_0x100524){_0x35125d(_0x100524)['then'](_0x43ef78=>_0x43ef78&&'ok'==_0x43ef78['status']?_0x4bc2e7(_0x5c1285(_0x277f6e+_0x24890a))!=_0x43ef78['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x124bce=>(_0x4e2c15(),_0x124bce),()=>{const _0x148e2f=_0x3c94a0();return null==_0x148e2f?(_0x4e2c15(),'Valid'):_0x19ab68-_0x148e2f>0x240c8400?'UsageLimit':'Valid';})['then'](_0x4db168)['catch'](()=>{_0x4db168('UsageLimit');});const _0x2b77a4=0x36ee80;function _0x4e2c15(){const _0x35508a='llct-'+_0x4bc2e7(_0x5c1285(_0x25b7fe)),_0x32bd08=_0x504dc0(_0x4bc2e7(window['Math']['ceil'](_0x19ab68/_0x2b77a4)));window['localStorage']['setItem'](_0x35508a,_0x32bd08);}function _0x3c94a0(){const _0x519c14='llct-'+_0x4bc2e7(_0x5c1285(_0x25b7fe)),_0x57e983=window['localStorage']['getItem'](_0x519c14);return _0x57e983?window['parseInt'](_0x504dc0(_0x57e983),0x10)*_0x2b77a4:null;}function _0x35125d(_0x1b7297){return new window['Promise']((_0x132aef,_0x3ef776)=>{_0x1b7297['then'](_0x132aef,_0x3ef776),window['setTimeout'](_0x3ef776,0x1d4c0);});}}_0x53ff6e['on']('_sendUsageRequest',(_0x48dfa2,_0x37b7d0)=>{if(_0x37b7d0[0x0]!=_0x25b7fe)return _0x4db168('UsageLimit');_0x37b7d0[0x1]={..._0x37b7d0[0x1],'requestId':_0x277f6e};},{'priority':'high'}),_0x53ff6e['on']('_sendUsageRequest',_0x594678=>{_0x4d6e2e(_0x594678['return'])&&(_0x3bbedf=!0x0,_0x487b01(_0x594678['return']));},{'priority':'low'}),_0x221172['then'](()=>{_0x3bbedf||_0x4db168('UsageLimit');});});function _0x2f7541(){return'auto'==_0x53ff6e['editing']['view']['_overlayModeHint'];}function _0x1e4a86(){_0x53ff6e['editing']['view']['_overlayModeHint']='auto';}}function _0x4caaa9(_0x53355e){const _0x216612=[new window['Promise'](_0x3e2e7c=>setTimeout(_0x3e2e7c,0x93ecc)),_0x221172['then'](()=>new window['Promise'](_0x4b41f8=>{let _0x2f01ed=0x0;_0x53ff6e['model']['on']('applyOperation',(_0x1444cf,_0x5e6d08)=>{_0x5e6d08[0x0]['isDocumentOperation']&&_0x2f01ed++,0x5e8==_0x2f01ed&&(_0x4b41f8(),_0x1444cf['off']());});}))];return window['Promise']['race'](_0x216612)['then'](()=>_0x53355e);}async function _0x2713ea(){await _0x221172,_0x53ff6e['model']['change']=_0x54532f,_0x53ff6e['model']['enqueueChange']=_0x54532f,_0x53ff6e['enableReadOnlyMode']('model');}function _0x2dc0e8(){return window['glob']&&window['glob']['triliumVersion'];}function _0x1e70ce(){return _0x19dce3('WebSocketGateway')&&'connected'==_0x3c12d4('WebSocketGateway')['state'];}function _0x1fdb69(){return _0x19dce3('RevisionViewerIntegration');}function _0x76abb3(){return _0x19dce3('TrackChangesDataGetter');}function _0x22742e(_0x3371c6){const _0x2d2506=_0x4f485();_0x53ff6e[_0x2d2506]='commentsLicenseKey'+_0x3371c6,'Valid'!=_0x3371c6&&_0x2713ea();}function _0x4f485(){const _0x144fca=window['String'](window['performance']['now']())['replace']('.','');let _0x315150='K';for(let _0x2da7b0=0x0;_0x2da7b0<_0x144fca['length'];_0x2da7b0+=0x2){let _0x2a064f=window['parseInt'](_0x144fca['substring'](_0x2da7b0,_0x2da7b0+0x2));_0x2a064f>=0x3e&&(_0x2a064f-=0x3e),_0x315150+=_0x476ce3[_0x2a064f];}return _0x315150;}function _0x171407(){const _0x3d075f=_0x3801dd['split']('.');if(0x3!=_0x3d075f['length'])return null;return _0x1973da(_0x3d075f[0x1]);function _0x1973da(_0x54b3cd){const _0x6f4a94=_0x5c9793(_0x54b3cd);return _0x6f4a94&&_0x48eb48()?_0x6f4a94:null;function _0x48eb48(){const _0x4ff884=_0x6f4a94['jti'],_0x19e040=window['parseInt'](_0x4ff884['substring'](_0x4ff884['length']-0x8),0x10),_0x2bdda6={..._0x6f4a94,'jti':_0x4ff884['substring'](0x0,_0x4ff884['length']-0x8)};return delete _0x2bdda6['vc'],_0x5c1285(_0x2bdda6)==_0x19e040;}}}async function _0x163d2d(){let _0x590c38=!0x0;try{const [_0x142d1e,_0x411d3c,_0x13d83e]=_0x3801dd['split']('.');return _0x340559(_0x142d1e),await _0x510b6d(_0x142d1e,_0x411d3c,_0x13d83e),_0x590c38;}catch{return!0x1;}function _0x340559(_0x5a0bc3){const _0x529cb3=_0x5c9793(_0x5a0bc3);_0x529cb3&&'ES256'==_0x529cb3['alg']||(_0x590c38=!0x1);}async function _0x510b6d(_0x373bf4,_0x4e0633,_0x1fefda){const _0x5c6c87=window['Uint8Array']['from'](_0x5aed62(_0x1fefda),_0x189b14=>_0x189b14['charCodeAt'](0x0)),_0x582757=new window['TextEncoder']()['encode'](_0x373bf4+'.'+_0x4e0633),_0x4429ff=window['crypto']['subtle'];if(!_0x4429ff)return;const _0x42bb6b=await _0x4429ff['importKey']('jwk',_0x10885f,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x4429ff['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x42bb6b,_0x5c6c87,_0x582757)||(_0x590c38=!0x1);}}function _0x5c9793(_0x18860a){return _0x18860a['startsWith']('ey')?JSON['parse'](_0x5aed62(_0x18860a)):null;}function _0x5aed62(_0x7f9355){return window['atob'](_0x7f9355['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x5c1285(_0x12b400){let _0x2c0f14=0x1505;function _0x1c077d(_0x561d1b){for(let _0x406855=0x0;_0x406855<_0x561d1b['length'];_0x406855++){const _0x15c1a6=_0x561d1b['charCodeAt'](_0x406855);_0x2c0f14=(_0x2c0f14<<0x5)+_0x2c0f14+_0x15c1a6,_0x2c0f14&=_0x2c0f14;}}function _0x399507(_0x1e746a){Array['isArray'](_0x1e746a)?_0x1e746a['forEach'](_0x399507):_0x1e746a&&'object'==typeof _0x1e746a?Object['entries'](_0x1e746a)['sort']()['forEach'](([_0x10ad8a,_0x21d056])=>{_0x1c077d(_0x10ad8a),_0x399507(_0x21d056);}):_0x1c077d(window['String'](_0x1e746a));}return _0x399507(_0x12b400),_0x2c0f14>>>0x0;}function _0x4bc2e7(_0xb51d91){return _0xb51d91['toString'](0x10)['padStart'](0x8,'0');}function _0x504dc0(_0x17da11){return _0x17da11['split']('')['reverse']()['join']('');}function _0x19dce3(_0x546743){return _0x53ff6e['plugins']['has'](_0x546743);}function _0x3c12d4(_0xa4df08){return _0x53ff6e['plugins']['get'](_0xa4df08);}function _0x54532f(){}_0x22742e(await _0xa04508());}(this);}['destroy'](){const _0x390a90=this['editor']['plugins']['get'](oi),_0x249901=this['editor']['config']['get']('collaboration.channelId');for(const _0x2812c8 of _0x390a90['getCommentThreads']({'channelId':_0x249901}))_0x390a90['_detachCommentThread'](_0x2812c8['id']),_0x390a90['_threads']['delete'](_0x2812c8['id']);super['destroy']();}['hasMarkerForId'](_0x5740a3){return this['getAllMarkersForId'](_0x5740a3)['length']>0x0;}['getAllMarkersForId'](_0x1864c9){const _0x5d9926=[];for(const _0x26f0e3 of this['editor']['model']['markers'])_0x26f0e3['name']['startsWith']('comment:'+_0x1864c9)&&_0x5d9926['push'](_0x26f0e3);return _0x5d9926;}['scrollToThreadMarker'](_0x124d67){setTimeout(()=>{const _0x3c3492=this['_getTargetForId'](_0x124d67);_0x3c3492&&this['activeMarker']&&fi(this['activeMarker'])['id']===_0x124d67&&_0x5c2280({'target':_0x3c3492[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x542320){this['editor']['model']['change'](()=>{for(const _0x5c60dd of this['getAllMarkersForId'](_0x542320))this['editor']['editing']['reconvertMarker'](_0x5c60dd);});}['_attachArchivedThread'](_0x532870){const _0x4ebe25=this['editor']['plugins']['get'](oi),_0x10d517=this['editor']['plugins']['get'](di),_0x43c1c3=_0x4ebe25['getCommentThread'](_0x532870);if(!_0x43c1c3['isAttached']){const _0x2acfa1=_0x43c1c3['attachTo'](()=>this['_getTargetForId'](_0x43c1c3['id']));_0x10d517['registerAnnotation'](_0x2acfa1),_0x43c1c3['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0xe7ad0c=this['editor'],_0xa91b13=_0xe7ad0c['plugins']['get'](_0x43683a);_0xe7ad0c['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x20c8d9,_0x2afdf4)=>{const {id:_0x4a933a}=fi(_0x20c8d9['markerName']),_0x51c8e9=_0xe7ad0c['plugins']['get'](oi)['getCommentThread'](_0x4a933a),_0x5b8409=this['activeMarker']&&fi(this['activeMarker'])['id']===_0x4a933a;let _0x423e48;if(_0x51c8e9&&_0x51c8e9['isResolved']&&!_0x5b8409&&_0x20c8d9['item'])return _0x2afdf4['consumable']['consume'](_0x20c8d9['item'],'addMarker:'+_0x20c8d9['markerName']),_0x2afdf4['consumable']['consume'](_0x20c8d9['item'],'removeMarker:'+_0x20c8d9['markerName']),null;const _0x227305=['ck-comment-marker'];return _0x5b8409&&_0x227305['push']('ck-comment-marker--active'),_0x423e48=_0x51c8e9?.['length']?_0x51c8e9['comments']['first']['author']['id']:_0xa91b13['me']['id'],{'classes':_0x227305,'attributes':{'data-comment':_0x4a933a,'data-author-id':_0x423e48}};}}),_0xe7ad0c['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x179db9,{options:_0x12f428})=>{if(_0x12f428['showCommentHighlights'])return null;const _0x220157=_0xe7ad0c['plugins']['get'](oi),_0x455d58=_0xe7ad0c['model']['markers']['get'](_0x179db9),{id:_0x30ecde,part:_0x4ba5ed}=fi(_0x179db9);return _0x455d58&&!_0x455d58['affectsData']||_0x12f428['ignoreResolvedComments']&&_0x220157['getCommentThread'](_0x30ecde)?.['isResolved']?null:{'group':'comment','name':_0x4ba5ed?_0x30ecde+':'+_0x4ba5ed:_0x30ecde};}}),_0xe7ad0c['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x50d0eb,{writer:_0x36c3b3})=>_0x36c3b3['createElement']('$marker',{'data-name':'comment:'+_0x50d0eb['getAttribute']('id')})}),_0xe7ad0c['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x27c5fd=this['editor'],_0x25c8ee=_0x27c5fd['plugins']['get'](oi),_0x46575b=new Set(),_0x48a2e8=new Set();_0x27c5fd['model']['document']['registerPostFixer'](_0x5c5b10=>{let _0x2216af=!0x1;for(const {name:_0xec7aac,data:_0x5aa004}of _0x27c5fd['model']['document']['differ']['getChangedMarkers']()){const {group:_0x304be2,id:_0x101329}=fi(_0xec7aac);let _0x3fb8ab=_0x5aa004['newRange'];if('comment'!==_0x304be2||!_0x3fb8ab)continue;const _0x325aff='$graveyard'===_0x3fb8ab['root']['rootName'];_0x325aff||(_0x3fb8ab=_i(_0x3fb8ab,_0x27c5fd['model']),!_0x3fb8ab||_0x3fb8ab['isCollapsed']||!_0x5aa004['newRange']||_0x3fb8ab['isEqual'](_0x5aa004['newRange']))?_0x27c5fd['model']['hasContent'](_0x3fb8ab)&&!_0x325aff?this['isThreadsLoadingPaused']?_0x46575b['add'](_0xec7aac):this['_handleThreadMarker'](_0xec7aac,_0x101329):(_0x48a2e8['add'](_0xec7aac),_0x46575b['delete'](_0xec7aac),_0x5c5b10['removeMarker'](_0xec7aac),_0x2216af=!0x0):(_0x5c5b10['updateMarker'](_0xec7aac,{'range':_0x3fb8ab}),_0x2216af=!0x0);}return _0x2216af;}),this['on']('change:isThreadsLoadingPaused',(_0x571885,_0x4e7bd4,_0x55887e)=>{if(!_0x55887e&&_0x46575b['size'])for(const _0x1893fa of _0x46575b){const {id:_0x225d05}=fi(_0x1893fa);_0x46575b['delete'](_0x1893fa),_0x27c5fd['model']['markers']['get'](_0x1893fa)&&this['_handleThreadMarker'](_0x1893fa,_0x225d05);}}),this['listenTo'](_0x27c5fd['model']['document'],'change',()=>{for(const {name:_0x133ca9,data:{newRange:_0xc37f75}}of _0x27c5fd['model']['document']['differ']['getChangedMarkers']()){const {group:_0x47c8c8,id:_0xf9a868}=fi(_0x133ca9);if('comment'!==_0x47c8c8)continue;const _0x4b9488=_0x25c8ee['getCommentThread'](_0xf9a868),_0x1e188a=this['hasMarkerForId'](_0xf9a868);_0x4b9488&&(!_0x4b9488['_hasTargetInContent']&&_0xc37f75&&_0x27c5fd['editing']['view']['once']('render',()=>{const _0x402dd7=_0x27c5fd['plugins']['get'](ti),_0x4cfcc7=_0x25c8ee['_threadToController']['get'](_0x4b9488)['view'];_0x402dd7['getByInnerView'](_0x4cfcc7)['refreshVisibility']();},{'priority':'low'}),_0x4b9488['_hasTargetInContent']=_0x1e188a||!!_0xc37f75),_0xc37f75||(_0x48a2e8['add'](_0x133ca9),_0x46575b['delete'](_0x133ca9));}for(const _0xe7983f of _0x48a2e8){const {id:_0x386761}=fi(_0xe7983f),_0x4de62d=_0x25c8ee['getCommentThread'](_0x386761);if(_0x46575b['delete'](_0xe7983f),!_0x4de62d)continue;const _0x1c60a4=this['hasMarkerForId'](_0x386761);_0x1c60a4||_0x4de62d['isSubmitted']?_0x1c60a4||_0x4de62d['unlinkedAt']||_0x4de62d['setUnlinkedAt'](new Date()):_0x4de62d['remove']();}_0x48a2e8['clear']();});}['_handleInitialThreads'](_0xc0ebe5){_0xc0ebe5['forEach'](_0x252125=>{_0x252125['unlinkedAt']&&this['_attachArchivedThread'](_0x252125['id']);});}['_getTargetForId'](_0x1aa267){const _0x2fad2a=this['editor'],_0x54ab0b=this['getAllMarkersForId'](_0x1aa267);return _0x3d538b(_0x2fad2a['editing'],_0x54ab0b);}['_getTextContext'](_0x5b1999){const _0x560ff2=this['getAllMarkersForId'](_0x5b1999);let _0x652a1a='',_0x45a890=!0x1;for(const _0x483b73 of _0x560ff2){const _0x4fbc3a=_0x483b73['getRange']();for(const _0x40390a of Array['from'](_0x4fbc3a['getItems']()))_0x40390a['is']('$textProxy')?(_0x652a1a&&_0x45a890&&(_0x652a1a+='\x20',_0x45a890=!0x1),_0x652a1a+=_0x40390a['data']):_0x45a890=!0x0;_0x45a890=!0x0;}return _0x652a1a['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x2b32b0,_0x16c6fc){const _0x39ee37=this['editor'],_0x53695f=_0x39ee37['plugins']['get'](oi);let _0x310657=_0x53695f['getCommentThread'](_0x16c6fc);const _0x58e2bf=_0x39ee37['config']['get']('collaboration.channelId'),_0x4b1d6c=_0x39ee37['plugins']['get'](di);return _0x310657&&(_0x310657['unlinkedAt']&&_0x310657['setUnlinkedAt'](null),_0x310657['isAttached'])||(this['getAllMarkersForId'](_0x16c6fc)[0x0]['managedUsingOperations']?_0x53695f['fetchCommentThread']({'channelId':_0x58e2bf,'threadId':_0x16c6fc})['then'](_0x41caf1=>{if('destroyed'!==_0x39ee37['state']){if(_0x310657=_0x41caf1,_0x310657&&!_0x310657['isAttached']){const _0x4d3239=_0x310657['attachTo'](()=>this['_getTargetForId'](_0x16c6fc));_0x4b1d6c['registerAnnotation'](_0x4d3239),_0x310657['isResolved']&&this['_reconvertMarkers'](_0x16c6fc);}else{if(!_0x310657){const _0x2e35cc=this['getAllMarkersForId'](_0x16c6fc);_0x39ee37['model']['change'](_0xb53728=>{for(const _0x43d202 of _0x2e35cc)_0xb53728['removeMarker'](_0x43d202);});}}}}):_0x39ee37['editing']['view']['once']('render',()=>{if(_0x53695f['getCommentThread'](_0x16c6fc))return;const _0x301cab=_0x39ee37['plugins']['get'](ti);_0x310657=_0x53695f['openNewCommentThread']({'channelId':_0x58e2bf,'threadId':_0x16c6fc,'target':()=>this['_getTargetForId'](_0x16c6fc),'context':{'type':'text','value':this['_getTextContext'](_0x16c6fc)}});const _0x9f6119=_0x53695f['_threadToController']['get'](_0x310657)['view'],_0x3726a7=_0x301cab['getByInnerView'](_0x9f6119);_0x3726a7&&_0x4b1d6c['registerAnnotation'](_0x3726a7);},{'priority':'low'})),_0x310657;}['_handleThreadMarker'](_0x22e876,_0x566e46){const _0x5c13eb=this['_attachMarkerToThread'](_0x22e876,_0x566e46);_0x5c13eb&&!_0x5c13eb['context']&&_0x5c13eb['setContext']({'type':'text','value':this['_getTextContext'](_0x566e46)});}['_initAriaMarkerChangeAnnouncements'](){const _0x576fe7=this['editor'];_0x10c08c(_0x576fe7['model'],({left:_0x4e5aa0,entered:_0x31b0e8})=>{for(const _0x4e61ae of _0x4e5aa0)if(Ai(_0x4e61ae)){_0x576fe7['ui']['ariaLiveAnnouncer']['announce'](Et(_0x576fe7['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x50adbd of _0x31b0e8)if(Ai(_0x50adbd)){_0x576fe7['ui']['ariaLiveAnnouncer']['announce'](Et(_0x576fe7['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x3b42df(_0x21a0db)));break;}});}};function gi(_0x5669f9,_0x48cff5){return _0x48cff5?_0x5669f9+':'+_0x48cff5:_0x5669f9;}function _i(_0x2f357d,_0x3cfcc1){const _0x1503ec=_0x3cfcc1['schema'],_0x271bb8=_0x3cfcc1['createRange'](_0x2f357d['start']);for(const _0x4299a1 of _0x2f357d['getWalker']()){const {type:_0x1b8798,item:_0x150ba6,nextPosition:_0x372067}=_0x4299a1;if('text'===_0x1b8798||_0x1503ec['isObject'](_0x150ba6)){const _0x446825=_0x3cfcc1['createPositionBefore'](_0x150ba6);_0x271bb8['isCollapsed']&&(_0x271bb8['start']=_0x446825),_0x271bb8['end']=_0x372067;}}return _0x271bb8;}function Ai(_0x2c65ae){return'comment'===fi(_0x2c65ae['name'])['group'];}var vi=class extends _0x26bf82{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[oi,wi,di,ti];}get['CommentsListView'](){return Lt;}get['CommentThreadInputView'](){return xt;}['init'](){const _0x53a253=this['editor'],_0x44c0b4=_0x53a253['plugins']['get'](oi),_0x31e048=_0x53a253['plugins']['get'](wi),_0x25e56c=_0x53a253['plugins']['get'](ti),_0x543a25=_0x53a253['plugins']['get'](di);_0x53a253['ui']['componentFactory']['add']('comment',()=>{const _0x4e263a=this['_createUIButton'](_0x51f5d3);return _0x4e263a['tooltip']=!0x0,_0x4e263a;}),_0x53a253['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](rt)),_0x543a25['addSourceCollector'](()=>{const _0x3d7bdb=[];for(const [_0x10f4ba,_0x592e0c]of _0x44c0b4['_threadToController']){const _0x3fd207=_0x31e048['getAllMarkersForId'](_0x10f4ba['id']),_0x28bf7a=_0x3fd207['map'](_0x2f4eca=>_0x2f4eca['getRange']());_0x3fd207['length']>0x0&&_0x3d7bdb['push']([_0x592e0c['view'],_0x28bf7a]);}return _0x3d7bdb;}),this['listenTo'](_0x25e56c,'change:activeAnnotations',(_0x41bff9,_0x542d49,_0x24b5fb)=>{const _0xc3b03a=Array['from'](_0x24b5fb)['map'](_0x3e1509=>_0x3e1509['innerView'])['find'](_0x3ad1d2=>_0x44c0b4['_viewToController']['has'](_0x3ad1d2));if(!_0xc3b03a)return void(_0x31e048['activeMarker']=null);const _0x5f2922=_0x44c0b4['_viewToController']['get'](_0xc3b03a)['model']['id'],_0x597dd5='comment:'+_0x5f2922;_0x5f2922&&_0x31e048['hasMarkerForId'](_0x5f2922)?_0x31e048['activeMarker']=_0x597dd5:_0x31e048['activeMarker']&&(_0x31e048['activeMarker']=null);}),this['listenTo'](_0x44c0b4,'removeCommentThread',(_0x59c407,{threadId:_0x547e52,isFromAdapter:_0x343181})=>{!_0x343181&&_0x53a253['ui']['focusTracker']['isFocused']&&_0x31e048['hasMarkerForId'](_0x547e52)&&_0x53a253['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x44c0b4,'addComment',(_0x41d4a7,{threadId:_0x39bda3,isFromAdapter:_0x128338})=>{!_0x128338&&_0x31e048['hasMarkerForId'](_0x39bda3)&&_0x44c0b4['hasCommentThread'](_0x39bda3)&&0x1===_0x44c0b4['getCommentThread'](_0x39bda3)['length']&&(_0x53a253['editing']['view']['focus'](),_0x41d4a7['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0xa47b4a=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3c68b9;for(const _0x522bee in _0xa47b4a){const _0x1c2b97=_0x522bee,_0x238e09=_0xa47b4a[_0x1c2b97];if('commentsLicenseKeyValid'==_0x238e09||'commentsLicenseKeyInvalid'==_0x238e09||'commentsLicenseKeyExpired'==_0x238e09||'commentsLicenseKeyDomainLimit'==_0x238e09||'commentsLicenseKeyNotAllowed'==_0x238e09||'commentsLicenseKeyEvaluationLimit'==_0x238e09||'commentsLicenseKeyUsageLimit'==_0x238e09){delete _0xa47b4a[_0x1c2b97],_0x3c68b9=_0x238e09,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x3c68b9&&_0xa47b4a['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x3c68b9&&_0xa47b4a['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x3c68b9&&_0xa47b4a['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x3c68b9&&_0xa47b4a['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x3c68b9&&_0xa47b4a['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x3c68b9&&_0xa47b4a['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x258bc5){const _0x2a4eb1=this['editor'],_0x5780c9=new _0x258bc5(_0x2a4eb1['locale']),_0x5e7aa3=_0x2a4eb1['commands']['get']('addCommentThread');return _0x5780c9['set']({'label':Et(_0x2a4eb1['locale'],'Comment'),'icon':_0xc2915e}),_0x5780c9['bind']('isEnabled')['to'](_0x5e7aa3,'isEnabled',_0x5e7aa3,'hasContent',(_0x2a4203,_0x2b2954)=>_0x2a4203&&_0x2b2954),this['listenTo'](_0x5780c9,'execute',()=>{_0x5e7aa3['execute']();}),_0x5780c9;}},yi=class extends _0x26bf82{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[wi];}constructor(_0x5bdbf0){super(_0x5bdbf0),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x2ed253,_0x5d08be,_0x3b3428)=>{_0x3b3428?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x4433fe,_0x55431c]of this['editor']['commands'])_0x55431c['affectsData']&&'addCommentThread'!==_0x4433fe&&_0x55431c['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x33dd58=this['editor']['editing']['view']['document'];this['listenTo'](_0x33dd58,'cut',_0x5cb26a=>_0x5cb26a['stop'](),{'priority':'highest'}),this['listenTo'](_0x33dd58,'clipboardInput',_0x37fe81=>_0x37fe81['stop'](),{'priority':'highest'}),this['listenTo'](_0x33dd58,'delete',_0x14deeb=>_0x14deeb['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x298b13,_0x6dba61]of this['editor']['commands'])_0x6dba61['affectsData']&&'addCommentThread'!==_0x298b13&&_0x6dba61['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['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']);}},Ti=class extends _0x1011c1{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[ti];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1c7d36){super(_0x1c7d36),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x449011=this['context']['plugins']['get'](ti);this['listenTo'](_0x449011,'_activateAnnotation',(_0x28055e,_0x3216ac)=>{for(const _0x22387e of this['activeUIs']){const _0x48c761=this['_uis']['get'](_0x22387e);(0x0,this['uisData']['get'](_0x22387e)['filter'])(_0x3216ac)&&_0x48c761['setActiveAnnotation'](_0x3216ac);}}),this['listenTo'](_0x449011,'_deactivateAllAnnotations',()=>{for(const _0x41b71a of this['activeUIs'])this['_uis']['get'](_0x41b71a)['setActiveAnnotation'](null);}),this['listenTo'](_0x449011['_visibleAnnotations'],'add',(_0x445acb,_0x50747f)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x50747f);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x37a380){return this['activeUIs']['has'](_0x37a380);}['activate'](_0x59510c,_0x3cb8a4=this['defaultFilter']){const _0x87a407=this['context']['plugins']['get'](ti);if(!this['_uis']['has'](_0x59510c))throw new _0x4b20e3('annotationsuis-missing-ui',this,{'uiName':_0x59510c});this['isActive'](_0x59510c)&&this['deactivate'](_0x59510c),this['activeUIs']['add'](_0x59510c);const _0x50dd12=new Jt();Qt({'source':_0x87a407['_visibleAnnotations'],'target':_0x50dd12,'filter':_0x3cb8a4}),this['uisData']['set'](_0x59510c,{'collection':_0x50dd12,'filter':_0x3cb8a4});const _0x3800d7=this['_uis']['get'](_0x59510c);_0x3800d7['attach'](_0x50dd12),this['listenTo'](_0x3800d7,'change:activeAnnotation',(_0x4c4a28,_0x493f89,_0x1ccef2,_0x2a664f)=>{_0x2a664f&&_0x87a407['_removeActiveAnnotation'](_0x2a664f),_0x1ccef2&&_0x87a407['_addActiveAnnotation'](_0x1ccef2);});}['deactivate'](_0x528e1f){if(this['activeUIs']['delete'](_0x528e1f),!this['_uis']['has'](_0x528e1f))throw new _0x4b20e3('annotationsuis-missing-ui',this,{'uiName':_0x528e1f});const _0x489841=this['_uis']['get'](_0x528e1f);_0x489841['detach'](),this['stopListening'](_0x489841),this['uisData']['get'](_0x528e1f)['collection']['destroy'](),this['uisData']['delete'](_0x528e1f);}['switchTo'](_0x2f311f){if(!this['_uis']['has'](_0x2f311f))throw new _0x4b20e3('annotationsuis-missing-ui',this,{'uiName':_0x2f311f});const _0x16018e=this['context']['plugins']['get'](ti),_0x34f7e8=Array['from'](_0x16018e['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x2f311f);const _0x7cd6b3=this['_uis']['get'](_0x2f311f);_0x7cd6b3['setActiveAnnotation'](_0x34f7e8),_0x7cd6b3['_setSelectedAnnotations']&&_0x34f7e8&&_0x7cd6b3['_setSelectedAnnotations']([_0x34f7e8]);}['deactivateAll'](){for(const _0x3f27ae of this['activeUIs'])this['deactivate'](_0x3f27ae);}['register'](_0x167b11,_0x49c937){if(this['_uis']['has'](_0x167b11))throw new _0x4b20e3('annotationsuis-register-already-registered');if('function'!=typeof _0x49c937['attach']||'function'!=typeof _0x49c937['detach']||'function'!=typeof _0x49c937['setActiveAnnotation'])throw new _0x4b20e3('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x167b11,_0x49c937);}['refilterAnnotations'](){const _0x1bf4a1=this['context']['plugins']['get'](ti)['collection'],_0x4a3dd6=new Map(),_0x543267=Array['from'](this['activeUIs']);for(const _0x564c89 of this['activeUIs']){const _0x4ee3c5=this['uisData']['get'](_0x564c89)['collection'];for(const _0x4aab6f of _0x4ee3c5)_0x4a3dd6['set'](_0x4aab6f,_0x564c89);}for(const _0x4df82e of _0x1bf4a1){const _0x1d60d4=_0x4a3dd6['get'](_0x4df82e);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4df82e);const _0x3a0bf7=_0x543267['find'](_0x40313=>this['uisData']['get'](_0x40313)['filter'](_0x4df82e));_0x1d60d4!==_0x3a0bf7&&(_0x1d60d4&&this['uisData']['get'](_0x1d60d4)['collection']['remove'](_0x4df82e),_0x3a0bf7&&this['uisData']['get'](_0x3a0bf7)['collection']['add'](_0x4df82e));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x47bcac){const _0x1e4979=[];for(const _0x453375 of this['activeUIs']){(0x0,this['uisData']['get'](_0x453375)['filter'])(_0x47bcac)&&_0x1e4979['push'](_0x453375);}if(_0x1e4979['length']>0x1)throw new _0x4b20e3('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x1e4979,'annotationType':_0x47bcac['type']});}};const Ci=/* #__PURE__ -- @preserve */
|
|
32
|
-
|
|
33
|
-
_0x373a58('px');var Ei=class extends ht{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x3cbe8e){super(_0x3cbe8e),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x50b863,_0x1c6112)=>_0x50b863+_0x1c6112),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x39180f=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x39180f['to']('isAnimationDisabled',_0x2ee72d=>_0x2ee72d?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x39180f['to']('top',_0x554dfb=>bi(_0x554dfb))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x199d71=this['element']['clientHeight'];_0x199d71&&(this['height']=_0x199d71);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},ki=class extends _0x1011c1{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x235804){super(_0x235804),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 _0x55a673=this['context']['config']['get']('sidebar.container');_0x55a673&&this['setContainer'](_0x55a673);}['setContainer'](_0x36f2ab){if(!Oi(_0x36f2ab))throw new _0x4b20e3('sidebar-setcontainer-invalid-element');this['container']=_0x36f2ab;}['_attachToContainer']({viewClass:_0x436ff7='',spaceBetweenItems:_0x12c845=0x19}={}){if(!Oi(this['container']))throw new _0x4b20e3('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x436ff7,this['_spaceBetweenItems']=_0x12c845;}['rearrange']({removedAnnotation:_0x172e8a,previousAnnotation:_0x145942,nextAnnotation:_0x3b6171}){const _0xd3e015=this['getSidebarItemView'](_0x172e8a);this['view']['list']['remove'](_0xd3e015),this['_destroySidebarItemView'](_0x172e8a),_0x145942&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x145942)),_0x3b6171&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3b6171)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x1f3c0a,activatedAnnotation:_0x5af626,disableAnimationOnActivatedAnnotation:_0x3d52f9}){if(this['_activeAnnotation']=_0x5af626,_0x1f3c0a){_0x1f3c0a['isActive']=!0x1;const _0x3e6872=this['getSidebarItemView'](_0x1f3c0a);_0x3e6872&&_0x3d52f9&&(_0x3e6872['isAnimationDisabled']=!0x1);}if(_0x5af626){const _0x475432=this['getSidebarItemView'](_0x5af626);_0x475432&&(_0x5af626['isActive']=!0x0,_0x3d52f9&&(_0x475432['isAnimationDisabled']=!0x0,_0x475432['top']+=0x1),this['_alignToTargetRect'](_0x475432));}}['_detachFromContainer'](_0x581083){if(this['view']['element']['remove'](),_0x581083){for(const _0x15cb86 of _0x581083)this['_destroySidebarItemView'](_0x15cb86);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x831a00,_0xc2812e){_0xc2812e||(_0xc2812e=_0x831a00['view']);const _0x1bd646=new Ei(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x1bd646,_0x831a00),this['_annotationToSidebarItemView']['set'](_0x831a00,_0x1bd646),_0x1bd646['content']['add'](_0xc2812e),this['listenTo'](_0x831a00['view'],'change:targetRect',(_0x4cfd91,_0x201f9b,_0x159946)=>{const _0x3cba84=this['_getTargetTop'](_0x831a00,_0x159946);_0x1bd646['_targetTop']!=_0x3cba84&&(_0x1bd646['_targetTop']=_0x3cba84,this['_setItemTop'](_0x1bd646,_0x3cba84));}),this['listenTo'](_0x1bd646,'change:top',()=>{this['_recalculate'](_0x1bd646,'top');}),this['listenTo'](_0x1bd646,'change:bottom',()=>{this['_recalculate'](_0x1bd646,'bottom');}),this['_alignToTargetRect'](_0x1bd646);const _0x5ee11c=this['_getItemBefore'](_0x1bd646);return _0x5ee11c&&this['_alignAfterItem'](_0x5ee11c,_0x1bd646)||this['_alignToTargetRect'](_0x1bd646),this['_updateLastItem'](),this['view']['list']['add'](_0x1bd646),_0x1bd646;}['_alignForTopChange'](_0x561b67){if(!_0x561b67['content']['length'])return;const _0x4a864e=this['_getItemBefore'](_0x561b67);if(!_0x4a864e)return;const _0x113b2a=this['_sidebarItemViewToAnnotation']['get'](_0x4a864e),_0x451f58=this['_activeAnnotation'];_0x451f58&&_0x451f58===_0x113b2a?this['_alignAfterItem'](_0x4a864e,_0x561b67):this['_alignBeforeItem'](_0x561b67,_0x4a864e);}['_alignForBottomChange'](_0xa4f357){if(!_0xa4f357['content']['length'])return;const _0x1343a3=this['_getItemAfter'](_0xa4f357);if(!_0x1343a3)return;const _0x3df8bf=this['_sidebarItemViewToAnnotation']['get'](_0x1343a3),_0x53a02d=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x13899e=this['_activeAnnotation'];_0x13899e&&_0x13899e===_0x3df8bf&&_0x53a02d?(this['_alignBeforeItem'](_0x1343a3,_0xa4f357),this['_alignAfterItem'](_0xa4f357,_0x1343a3)):_0x13899e&&_0x13899e===_0x3df8bf?this['_alignBeforeItem'](_0x1343a3,_0xa4f357):this['_alignAfterItem'](_0xa4f357,_0x1343a3);}['_recalculate'](_0x1311f5,_0x441cfd){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x53dd0c,changedProp:_0x173fe0}of this['_recalculateBuffer'])'top'===_0x173fe0?this['_alignForTopChange'](_0x53dd0c):this['_alignForBottomChange'](_0x53dd0c);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x1311f5,'changedProp':_0x441cfd});}['getSidebarItemView'](_0x4f1132){return this['_annotationToSidebarItemView']['get'](_0x4f1132);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x40e3bd){const _0x3d068b=this['getSidebarItemView'](_0x40e3bd);this['stopListening'](_0x3d068b),this['stopListening'](_0x40e3bd['view']),_0x3d068b['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x40e3bd),this['_sidebarItemViewToAnnotation']['delete'](_0x3d068b);}['_createSidebarView'](){const _0x172f2a=new Ii(this['context']['locale']);return _0x172f2a['render'](),this['on']('change:_lastItem',(_0x2f4214,_0xb5bb02,_0x14b540,_0x1e9c51)=>{_0x1e9c51&&_0x172f2a['unbind']('minHeight'),_0x14b540?_0x172f2a['bind']('minHeight')['to'](_0x14b540,'bottom'):_0x172f2a['minHeight']=null;}),_0x172f2a;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x220765){const _0x30bf55=this['_sidebarItemViewToAnnotation']['get'](_0x220765),_0x272e40=_0x30bf55&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x30bf55)-0x1);return _0x272e40&&this['getSidebarItemView'](_0x272e40)||null;}['_getItemAfter'](_0x559363){const _0x356af1=this['_sidebarItemViewToAnnotation']['get'](_0x559363),_0x527758=_0x356af1&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x356af1)+0x1);return _0x527758&&this['getSidebarItemView'](_0x527758)||null;}['_alignBeforeItem'](_0x469b86,_0x878ac1){_0x469b86['updateHeight']();const _0x52099d=Ni(_0x878ac1['bottom']+this['_spaceBetweenItems'],_0x469b86['top']);return!!_0x52099d&&(this['_setItemTop'](_0x878ac1,_0x878ac1['top']-_0x52099d),!0x0);}['_alignAfterItem'](_0x185496,_0x2135f1){_0x185496['updateHeight']();const _0x728d52=Ni(_0x185496['bottom']+this['_spaceBetweenItems'],_0x2135f1['top']);return!!_0x728d52&&(this['_setItemTop'](_0x2135f1,_0x2135f1['top']+_0x728d52,!0x1),!0x0);}['_alignToTargetRect'](_0x571fff){const _0x5c9f71=this['_sidebarItemViewToAnnotation']['get'](_0x571fff);if(!_0x5c9f71||!_0x5c9f71['target']||!_0x5c9f71['targetRect'])return;const _0x597847=this['_getTargetTop'](_0x5c9f71,_0x5c9f71['targetRect']);this['_setItemTop'](_0x571fff,_0x597847);}['_getTargetTop'](_0x560224,_0x21631a){if(null===_0x21631a)return 0x0;if(_0x560224['target']instanceof _0x7f9fe4)return _0x21631a['top'];{const _0x267497=new _0x7f9fe4(this['view']['element'])['top'];return _0x21631a['top']-_0x267497;}}['_setItemTop'](_0x38a9aa,_0x310a82,_0x1e0858=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x1e0858&&(_0x310a82=Math['max'](_0x310a82,this['_getMaxAvailableTop'](_0x38a9aa))),_0x38a9aa['top']=_0x310a82;}['_getMaxAvailableTop'](_0x205d3b){let _0x1f96c8=this['_getItemBefore'](_0x205d3b),_0x6072e7=0x0;for(;_0x1f96c8;)_0x1f96c8['updateHeight'](),_0x6072e7+=this['_spaceBetweenItems']+_0x1f96c8['height'],_0x1f96c8=this['_getItemBefore'](_0x1f96c8);return _0x6072e7;}};function Ni(_0x551d19,_0x5563bf){return Math['max'](_0x551d19-_0x5563bf,0x0);}function Oi(_0x66c853){return null!==_0x66c853&&'object'==typeof _0x66c853&&0x1===_0x66c853['nodeType'];}var Mi=class extends _0x1011c1{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[ki,Ti];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x54426e){super(_0x54426e),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x43910f(),this['_refreshPositioningDebounced']=_0x3b137b(()=>{_0x54426e['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x31282c=this['context']['plugins']['get'](Ti),_0xfacd4=this['context']['plugins']['get'](ki);_0x31282c['register']('wideSidebar',this),_0xfacd4['container']&&_0x31282c['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x5ead7c){if(_0x5ead7c===this['activeAnnotation'])return;const _0x884105=this['context']['plugins']['get'](ki);_0x884105['_activeAnnotation']=_0x5ead7c;const _0x469d69=this['activeAnnotation'];_0x884105['refresh']({'blurredAnnotation':_0x469d69,'activatedAnnotation':_0x5ead7c}),this['activeAnnotation']=_0x5ead7c;}['attach'](_0x4bfce2){this['annotations']=_0x4bfce2;const _0x36b50f=this['context']['plugins']['get'](ki);if(_0x36b50f['_annotations']=_0x4bfce2,this['isAttached'])throw new _0x4b20e3('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x36b50f,'set:container',()=>{this['detach'](),this['listenTo'](_0x36b50f,'change:container',_0x49e1a3=>{_0x49e1a3['off'](),this['attach'](_0x4bfce2);});}),_0x36b50f['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x5676ed=_0x3e8ce5=>{_0x3e8ce5['updateTargetRect'](),_0x36b50f['addAnnotation'](_0x3e8ce5);};for(const _0x1e80f4 of _0x4bfce2)_0x5676ed(_0x1e80f4);this['listenTo'](_0x4bfce2,'add',(_0x49be55,_0x3dbc58)=>{_0x5676ed(_0x3dbc58);}),this['listenTo'](_0x4bfce2,'remove',(_0x24de1a,_0x273038,_0x3fef11)=>{_0x36b50f['rearrange']({'removedAnnotation':_0x273038,'previousAnnotation':_0x4bfce2['get'](_0x3fef11-0x1),'nextAnnotation':_0x4bfce2['get'](_0x3fef11+0x1)}),_0x273038===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x4bfce2,'focus',(_0x4c5d49,_0x3146ca)=>{this['setActiveAnnotation'](_0x3146ca);}),this['listenTo'](_0x4bfce2,'blur',()=>{this['setActiveAnnotation'](null);});const _0xf8fa68=this['context']instanceof _0x152474?this['context']['editors']:new _0x43910f([this['context']]);for(const _0x2daae3 of _0xf8fa68)this['_integrateWithEditorAnnotations'](_0x2daae3);this['listenTo'](_0xf8fa68,'add',(_0x442dec,_0x1f1e54)=>{this['listenTo'](_0x1f1e54,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x1f1e54);});}),this['listenTo'](_0xf8fa68,'remove',(_0xd06ce,_0x4b6e49)=>{_0x4b6e49['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4b6e49['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x4b20e3('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3fe018=this['context']['plugins']['get'](ki);_0x3fe018['_detachFromContainer'](this['annotations']),this['stopListening'](_0x3fe018),this['stopListening'](this['annotations']),this['context']instanceof _0x152474&&this['stopListening'](this['context']['editors']);for(const _0x353f71 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x353f71);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x4b604a){if(!_0x4b604a['plugins']['has']('EditorAnnotations'))return;const _0x2959c6=_0x4b604a['plugins']['get']('EditorAnnotations'),_0x819b5=()=>{const _0x592b66=_0x2959c6['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x592b66[0x0]||null);};this['listenTo'](_0x2959c6,'refresh',_0x819b5),this['listenTo'](_0x2959c6,'blur',(_0x255983,{isAnnotationTracked:_0xfa559e})=>{this['activeAnnotation']&&_0xfa559e(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x2959c6,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x265d29=>{_0x2959c6['hasDomSelection']()&&(_0x819b5(),_0x265d29['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2959c6);}['_destroyEditorAnnotationsIntegration'](_0x4286bd){this['stopListening'](_0x4286bd),this['_editorAnnotations']['remove'](_0x4286bd);}},Ri=class extends _0x51f5d3{['counterView'];constructor(_0x526f46){super(_0x526f46);const _0xf34c2f=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x4de6ad,_0x1d7ea8)=>_0x4de6ad?'...':_0x1d7ea8['toString']()),this['set']('annotationType',''),this['icon']=_0xc2915e,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new ht(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0xf34c2f['to']('annotationType',_0x193d79=>'ck-annotation-counter__badge--'+_0x193d79),_0xf34c2f['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0xf34c2f['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Si=class extends _0x1011c1{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[ki,Ti];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4ef81d){super(_0x4ef81d),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x2df34d())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x43910f(),this['_refreshPositioningDebounced']=_0x3b137b(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](Ti)['register']('narrowSidebar',this),this['bodyCollection']=new _0xa3d6f8(this['context']['locale']),this['balloonPanelView']=new _0x157332(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x2f9012){this['annotations']=_0x2f9012;const _0x58eac9=this['context']['plugins']['get'](ki),_0x4db87b=this['balloonPanelView'];if(_0x58eac9['_annotations']=_0x2f9012,this['isAttached'])throw new _0x4b20e3('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x58eac9,'set:container',()=>{this['detach'](),this['listenTo'](_0x58eac9,'change:container',_0xcb0c13=>{_0xcb0c13['off'](),this['attach'](_0x2f9012);});}),_0x58eac9['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x5c9ecd=_0x281563=>{const _0x6de51d=new Ri(this['context']['locale']);_0x58eac9['addAnnotation'](_0x281563,_0x6de51d),this['_annotationToNarrowView']['set'](_0x281563,_0x6de51d),_0x6de51d['bind']('isDirty','annotationType','number')['to'](_0x281563['view'],'isDirty','type','length'),_0x6de51d['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x4db87b['content']['first']!==_0x281563['view']?(this['_showBalloon'](_0x281563),_0x281563['view']['element']['focus'](),this['setActiveAnnotation'](_0x281563)):this['setActiveAnnotation'](null);});};for(const _0x180f1c of _0x2f9012)_0x5c9ecd(_0x180f1c);this['listenTo'](_0x2f9012,'add',(_0x1d2223,_0x52892c)=>{_0x5c9ecd(_0x52892c);}),this['listenTo'](_0x2f9012,'remove',(_0x44827c,_0x1be35e,_0x235967)=>{this['_annotationToNarrowView']['get'](_0x1be35e)['destroy'](),this['_annotationToNarrowView']['delete'](_0x1be35e),_0x58eac9['rearrange']({'removedAnnotation':_0x1be35e,'previousAnnotation':_0x2f9012['get'](_0x235967-0x1),'nextAnnotation':_0x2f9012['get'](_0x235967+0x1)}),_0x1be35e===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x2f9012,'focus',(_0x4d99a6,_0x57c2c4)=>{this['setActiveAnnotation'](_0x57c2c4);}),this['listenTo'](_0x2f9012,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x71d6a1,_0x1ac7fa)=>{_0x1ac7fa['keyCode']===_0x5595a6['esc']&&_0x4db87b['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x4db87b['content']['first']),this['_hideBalloon'](),_0x1ac7fa['stopPropagation'](),_0x1ac7fa['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x224541,_0x3b5675)=>{const _0x4813d8=_0x3b5675['target'];_0x4db87b['isVisible']&&_0x4db87b['element']['contains'](_0x4813d8)||_0x58eac9['view']['element']['contains'](_0x4813d8)||_0x224541['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x4cdff3=>_0x4cdff3['contains'](_0x4813d8))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x217586=this['context']instanceof _0x152474?this['context']['editors']:new _0x43910f([this['context']]);for(const _0x512af6 of _0x217586)this['_integrateWithEditorAnnotations'](_0x512af6);this['listenTo'](_0x217586,'add',(_0x461ec8,_0x5e597d)=>{this['listenTo'](_0x5e597d,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x5e597d);});}),this['listenTo'](_0x217586,'remove',(_0x46de9a,_0x3bd711)=>{_0x3bd711['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3bd711['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0xe08a67){if(_0xe08a67===this['activeAnnotation'])return;const _0x74df1b=this['context']['plugins']['get'](ki);_0x74df1b['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0xe08a67,'disableAnimationOnActivatedAnnotation':!0x0}),_0xe08a67&&_0x74df1b['getSidebarItemView'](_0xe08a67)?this['_showBalloon'](_0xe08a67):this['_hideBalloon'](),this['activeAnnotation']=_0xe08a67;}['detach'](){if(!this['isAttached'])throw new _0x4b20e3('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0xb5da0a=this['context']['plugins']['get'](ki);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x8f2222=>_0x8f2222['destroy']()),this['_annotationToNarrowView']['clear'](),_0xb5da0a['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x152474&&this['stopListening'](this['context']['editors']);for(const _0xe3cd04 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0xe3cd04);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'](_0x2105a6){if(!_0x2105a6['plugins']['has']('EditorAnnotations'))return;const _0x297a20=_0x2105a6['plugins']['get']('EditorAnnotations'),_0x27c625=this['context']['plugins']['get'](ki),_0x2fbccc=this['annotations'],_0x1584a9=this['balloonPanelView'],_0xd9dc48=()=>{const _0x314db2=_0x297a20['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x314db2),this['setActiveAnnotation'](_0x314db2[0x0]||null);};this['listenTo'](_0x297a20,'refresh',_0xd9dc48),this['listenTo'](_0x297a20,'blur',(_0x44a063,{isAnnotationTracked:_0x23d73a})=>{this['activeAnnotation']&&_0x23d73a(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x297a20,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x2fbccc,'blur',_0x417afc=>{_0x297a20['hasDomSelection']()&&_0x417afc['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0xfd38b2,_0x431018)=>{const _0x48f1a2=_0x431018['target'];_0x1584a9['isVisible']&&_0x1584a9['element']['contains'](_0x48f1a2)||_0x27c625['view']['element']['contains'](_0x48f1a2)||this['activeAnnotation']&&_0x297a20['hasDomSelection']()&&(_0xd9dc48(),_0xfd38b2['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x297a20);}['_destroyEditorAnnotationsIntegration'](_0x2a09a9){_0x2a09a9&&(this['stopListening'](_0x2a09a9),this['_editorAnnotations']['remove'](_0x2a09a9));}['_setSelectedAnnotations'](_0x37cea9){for(const _0x381b16 of this['_selectedAnnotations'])_0x37cea9['includes'](_0x381b16)||this['_manuallyClosedAnnotationViews']['delete'](_0x381b16['view']);this['_selectedAnnotations']=_0x37cea9;}['_refreshPositioning'](){const _0x22e95b=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x22e95b['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x1bf4af){if(this['_manuallyClosedAnnotationViews']['has'](_0x1bf4af['view']))return;const _0x41b1d6=this['balloonPanelView']['content']['first'];_0x41b1d6!==_0x1bf4af['view']?(_0x41b1d6&&this['_detachListeners'](_0x41b1d6),this['_attachListeners'](_0x1bf4af['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x1bf4af['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x45fd0f=this['balloonPanelView']['content']['first'],_0x109c7f=_0x45fd0f&&this['annotations']['getByView'](_0x45fd0f);if(!_0x109c7f||!this['_annotationToNarrowView']['has'](_0x109c7f))return;const _0x261b4c=this['_annotationToNarrowView']['get'](_0x109c7f)['element'],_0x2dc8a8=(function(){const _0x46a08e=_0x157332['defaultPositions'];return[_0x46a08e['southArrowNorthEast'],_0x46a08e['northArrowSouthEast'],_0x46a08e['southArrowNorth'],_0x46a08e['northArrowSouth'],_0x46a08e['southArrowNorthWest'],_0x46a08e['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x261b4c,'positions':_0x2dc8a8});}['_hideBalloon'](){const _0x32dc71=this['balloonPanelView'],_0x223cc6=_0x32dc71['content']['first'];_0x223cc6&&(this['_detachListeners'](_0x223cc6),_0x32dc71['unpin'](),_0x32dc71['content']['clear']());}['_attachListeners'](_0x3749ab){this['listenTo'](_0x3749ab,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x3749ab,'Esc',(_0x2b81bc,_0x19e5ce)=>{this['_manuallyClosedAnnotationViews']['add'](_0x3749ab),this['_hideBalloon'](),_0x19e5ce();});}['_detachListeners'](_0x32371d){this['stopListening'](_0x32371d);}},xi=class extends _0x26bf82{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[di,_0x49e2c8,Ti];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x297b4e){super(_0x297b4e),_0x297b4e['editing']['view']['addObserver'](lt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x297b4e['plugins']['get'](_0x49e2c8),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x3b137b(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x467d28=this['editor']['plugins']['get'](Ti);_0x467d28['context']===this['editor']&&(_0x467d28['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x439ab4,_0x296fe9)=>{const _0x42f46c=this['_balloon'];if(this['isAttached']&&_0x42f46c['visibleView']){const _0x405884=this['annotations']['getByView'](_0x42f46c['visibleView']);_0x405884&&this['_closeAnnotation'](_0x405884),_0x296fe9();}}));}['afterInit'](){const _0x1f5026=this['editor']['plugins']['get'](Ti);_0x1f5026['context']===this['editor']&&(_0x1f5026['hasActive']()||_0x1f5026['switchTo']('inline'));}['setActiveAnnotation'](_0x22a8b3){_0x22a8b3!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x22a8b3&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x22a8b3)&&this['_addAnnotationToBalloon'](_0x22a8b3,!0x0),_0x22a8b3['isActive']=!0x0),_0x22a8b3||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x22a8b3);}['attach'](_0x1c0988){this['annotations']=_0x1c0988;const _0x588171=this['editor']['plugins']['get'](Ti),_0x59f083=this['_balloon'];if(this['isAttached'])throw new _0x4b20e3('inlineannotations-attach-already-attached',this);if(_0x588171['context']!==this['editor'])throw new _0x4b20e3('inlineannotations-not-allowed-with-context',this);const _0x3d74d3=this['editor']['plugins']['get'](di);this['listenTo'](_0x3d74d3,'refresh',()=>{const _0x3c9934=_0x3d74d3['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x2c9c3b,_0x7b4083;!this['_forceRefresh']&&(_0x2c9c3b=_0x3c9934,_0x7b4083=this['_selectedAnnotations'],_0x2c9c3b['length']===_0x7b4083['length']&&_0x2c9c3b['every'](_0x233a90=>_0x7b4083['includes'](_0x233a90)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x3c9934),this['setActiveAnnotation'](_0x3c9934[0x0]||null));}),this['listenTo'](_0x3d74d3,'blur',(_0x1460dc,{isAnnotationTracked:_0xd1f324})=>{this['activeAnnotation']&&_0xd1f324(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x3d74d3,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x2aa64d,_0x5030e2,_0x33e726)=>{_0x33e726||this['setActiveAnnotation'](null);}),this['listenTo'](_0x1c0988,'remove',(_0x4cd9c1,_0x31cae5)=>{this['_removeAnnotationFromBalloon'](_0x31cae5),_0x31cae5===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x59f083,'change:visibleView',(_0x209e7c,_0x454759,_0x57649e,_0x5458fb)=>{_0x5458fb&&this['stopListening'](_0x5458fb);const _0x1e6771=_0x1c0988['getByView'](_0x57649e);_0x57649e&&_0x1e6771&&(this['listenTo'](_0x57649e,'change:height',()=>{_0x59f083['updatePosition']();}),this['listenTo'](_0x57649e,'Esc',()=>{this['_closeAnnotation'](_0x1e6771),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x1e6771&&this['setActiveAnnotation'](_0x1e6771));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x59f083['visibleView']&&_0x1c0988['getByView'](_0x59f083['visibleView'])&&_0x59f083['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 _0x4b20e3('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x534b8f of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x534b8f);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x3079a8){for(const _0x388561 of this['_selectedAnnotations'])_0x3079a8['includes'](_0x388561)||this['_manuallyClosed']['delete'](_0x388561);for(const _0x8eecee of this['annotations'])_0x3079a8['includes'](_0x8eecee)||this['_removeAnnotationFromBalloon'](_0x8eecee);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x170a62 of _0x3079a8)this['_addAnnotationToBalloon'](_0x170a62);}this['_selectedAnnotations']=_0x3079a8;}['_addAnnotationToBalloon'](_0x40bf9a,_0x426752=!0x1){this['_manuallyClosed']['has'](_0x40bf9a)||(this['_addedAnnotations']['has'](_0x40bf9a)||this['_balloon']['hasView'](_0x40bf9a['view'])||(this['_addedAnnotations']['add'](_0x40bf9a),this['_balloon']['add']({'stackId':_0x40bf9a['view']['id'],'view':_0x40bf9a['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x40bf9a)}})),_0x426752&&this['_balloon']['showStack'](_0x40bf9a['view']['id']));}['_getBalloonTargetForAnnotation'](_0x259049){const _0x4aefec=_0x259049['target'],_0x82ccd3=this['editor']['editing']['view'],_0x5a8ce9=_0x82ccd3['document']['selection']['getFirstRange'](),_0x4646c6=_0x82ccd3['domConverter']['viewRangeToDom'](_0x5a8ce9);if(_0x4646c6['collapse'](!0x0),_0x4aefec){if(_0x4aefec instanceof _0x7f9fe4)return _0x4aefec;let _0x3b4c9c=[];for(const _0x53172f of _0x4aefec)_0x3b4c9c['push'](..._0x7f9fe4['getDomElementRects'](_0x53172f));_0x3b4c9c=function(_0x235573){const _0x4fef52=[];let _0x33d2c4=_0x235573[0x0];for(let _0x1a1313=0x1;_0x1a1313<_0x235573['length'];_0x1a1313++)if(Pi(_0x33d2c4,_0x235573[_0x1a1313])){const _0x3e40e1=_0x235573[_0x1a1313]['width'];_0x33d2c4['width']+=_0x3e40e1,_0x33d2c4['right']+=_0x3e40e1;}else _0x4fef52['push'](_0x33d2c4),_0x33d2c4=_0x235573[_0x1a1313];return _0x4fef52['push'](_0x33d2c4),_0x4fef52;}(_0x3b4c9c);const _0x3c0976=_0x4646c6['getBoundingClientRect']();return _0x3b4c9c['find'](_0x2138d1=>_0x2138d1['top']<=_0x3c0976['top']&&_0x2138d1['bottom']>=_0x3c0976['bottom']&&_0x2138d1['left']<=_0x3c0976['left']&&_0x2138d1['right']>=_0x3c0976['right'])||_0x3b4c9c[0x0];}return _0x259049['targetRect']||_0x4646c6;}['_removeAnnotationFromBalloon'](_0x5c1e32){this['_addedAnnotations']['has'](_0x5c1e32)&&this['_balloon']['hasView'](_0x5c1e32['view'])&&(this['_addedAnnotations']['delete'](_0x5c1e32),this['_balloon']['remove'](_0x5c1e32['view']));}['_closeAnnotation'](_0x324717){this['_manuallyClosed']['add'](_0x324717),this['_removeAnnotationFromBalloon'](_0x324717);}};function Pi(_0x5e8eda,_0x3768ce){return _0x5e8eda['top']===_0x3768ce['top']&&_0x5e8eda['bottom']===_0x3768ce['bottom']&&_0x5e8eda['right']===_0x3768ce['left'];}var Li=class extends ht{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x30496c,_0x1d80a8){super(_0x30496c),this['set']('isEmpty',!_0x1d80a8['length']),this['focusTracker']=new _0x18a754(),this['_annotationViews']=_0x1d80a8,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new et({'focusables':_0x1d80a8,'focusTracker':this['focusTracker']}),this['listenTo'](_0x1d80a8,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x1d80a8,'remove',(_0x523b38,_0x2c0179)=>{_0x2c0179['isActive']&&this['focus'](),_0x1d80a8['length']||(this['isEmpty']=!0x0);});const _0x2d6d5f=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':Et(_0x30496c,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x1d80a8},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x2d6d5f['if']('isEmpty','ck-hidden',_0x202f08=>!_0x202f08)]},'children':[{'text':Et(_0x30496c,'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 _0x2add94 of this['_annotationViews'])this['focusTracker']['add'](_0x2add94['element']);this['_annotationViews']['on']('change',(_0x230cd5,{added:_0x535703,removed:_0x31eb89})=>{for(const _0x10b8d7 of _0x535703)this['focusTracker']['add'](_0x10b8d7['element']);for(const _0x16a374 of _0x31eb89)this['focusTracker']['remove'](_0x16a374['element']);});}},Di=class extends _0x1011c1{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[oi,ti];}constructor(_0x3f0e20){super(_0x3f0e20),this['archivedThreads']=new _0x43910f();}['init'](){const _0x2da686=this['context'],_0x2fb657=_0x2da686['plugins']['get'](oi),_0x45aea1=_0x2da686['plugins']['get'](ti);this['listenTo'](_0x2fb657,'addCommentThread',(_0x223fe3,{threadId:_0x5b9d9e})=>{const _0xbe38f8=_0x2fb657['getCommentThread'](_0x5b9d9e);_0xbe38f8['archivedAt']&&this['archivedThreads']['add'](_0xbe38f8,this['_calculatePosition'](_0xbe38f8['archivedAt'])),this['listenTo'](_0xbe38f8,'change:archivedAt',(_0x35e429,_0x144577,_0x58e33e)=>{_0x58e33e?this['archivedThreads']['has'](_0xbe38f8)||this['archivedThreads']['add'](_0xbe38f8,this['_calculatePosition'](_0xbe38f8['archivedAt'])):this['archivedThreads']['has'](_0xbe38f8)&&this['archivedThreads']['remove'](_0xbe38f8);});}),this['listenTo'](_0x2fb657,'removeCommentThread',(_0x426c1f,{threadId:_0x321388})=>{const _0x474ae0=_0x2fb657['getCommentThread'](_0x321388);this['stopListening'](_0x474ae0),this['archivedThreads']['has'](_0x474ae0)&&this['archivedThreads']['remove'](_0x474ae0);},{'priority':'highest'}),this['listenTo'](_0x45aea1['collection'],'focus',(_0x12e77b,_0x4d6561)=>{_0x4d6561['isVisible']||(_0x4d6561['isActive']=!0x0,_0x45aea1['activate'](_0x4d6561));});}['_calculatePosition'](_0xa4e520){const _0x2d0e87=[...this['archivedThreads']]['findIndex'](_0x2b0f3d=>_0x2b0f3d['archivedAt']<_0xa4e520);return _0x2d0e87>-0x1?_0x2d0e87:this['archivedThreads']['length'];}},Vi=class extends _0x26bf82{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Di,_0x57da65];}constructor(_0x3b813e){super(_0x3b813e),this['annotationViews']=new at(),this['_pendingThreads']=[];}['init'](){const _0x4c231c=this['editor'],_0x5cbf37=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x4c231c['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x51f5d3,!0x0)),_0x4c231c['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x57bacf=this['_createCommentsArchiveButton'](rt);return _0x57bacf['set']({'role':'menuitemcheckbox'}),_0x57bacf;});const _0x4e8517=_0x4c231c['plugins']['get'](Di),_0x4c603c=_0x4c231c['plugins']['get']('Annotations'),_0x56c554=_0x4c231c['plugins']['get']('CommentsRepository');_0x4e8517['archivedThreads']['forEach'](_0x122457=>{this['_handleNewThread'](_0x122457);}),this['listenTo'](_0x4e8517['archivedThreads'],'add',(_0x26c895,_0x11eabb)=>{this['_handleNewThread'](_0x11eabb);}),this['listenTo'](_0x4c603c['collection'],'add',(_0x539019,_0x539821)=>{const _0x5cca01=this['_pendingThreads']['find'](_0x12c6b8=>{const _0x409254=_0x56c554['_threadToController']['get'](_0x12c6b8);return _0x409254&&_0x539821['innerView']===_0x409254['view'];});if(_0x5cca01){const _0x1c3732=this['_calculatePosition'](_0x5cca01['archivedAt']);this['_addAnnotationToArchive'](_0x539821,_0x1c3732),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x5cca01),0x1);}}),this['listenTo'](_0x4e8517['archivedThreads'],'remove',(_0x529c91,_0xacacbd)=>{const _0x149d5c=_0x4c231c['config']['get']('collaboration.channelId');if(!_0x149d5c||_0xacacbd['channelId']===_0x149d5c){if(this['_pendingThreads']['includes'](_0xacacbd))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0xacacbd),0x1);else{const _0x54fc1e=_0x56c554['_threadToController']['get'](_0xacacbd),_0x314f41=_0x4c603c['getByInnerView'](_0x54fc1e['view']);this['annotationViews']['remove'](_0x314f41['view']),this['stopListening'](_0x314f41),this['stopListening'](_0x314f41['focusableElements']);}}}),this['listenTo'](_0x4c603c['collection'],'add',(_0x29b5b5,_0x51122b)=>{this['listenTo'](_0x51122b,'escape',_0x5cbf37);}),this['listenTo'](_0x4c603c['collection'],'remove',(_0x27928d,_0x3efd84)=>{this['stopListening'](_0x3efd84,'escape',_0x5cbf37);});}['_addAnnotationToArchive'](_0x265e08,_0x353419){this['listenTo'](_0x265e08,'set:isVisible',_0x31cb16=>{_0x31cb16['return']=!0x1,_0x31cb16['stop']();}),this['annotationViews']['add'](_0x265e08['view'],_0x353419);}['_handleNewThread'](_0xbea59){const _0xf68356=this['editor']['plugins']['get']('CommentsRepository'),_0x1919df=this['editor']['plugins']['get']('Annotations'),_0x5f40f3=this['editor']['config']['get']('collaboration.channelId');if(!_0x5f40f3||_0xbea59['channelId']===_0x5f40f3){const _0x30ca44=_0xf68356['_threadToController']['get'](_0xbea59);if(!_0x30ca44)return void this['_pendingThreads']['push'](_0xbea59);const _0x12d31a=this['_calculatePosition'](_0xbea59['archivedAt']),_0x5209ab=_0x1919df['getByInnerView'](_0x30ca44['view']);_0x5209ab['isVisible']&&_0x1919df['_visibleAnnotations']['remove'](_0x5209ab),this['_addAnnotationToArchive'](_0x5209ab,_0x12d31a);}}['_calculatePosition'](_0x44b7e7){const _0x35b27a=this['editor']['config']['get']('collaboration.channelId'),_0x11af0f=[...this['editor']['plugins']['get'](Di)['archivedThreads']]['filter'](_0x471573=>_0x471573['channelId']===_0x35b27a)['findIndex'](_0x526de7=>_0x526de7['archivedAt']<_0x44b7e7);return _0x11af0f<0x0||_0x11af0f>this['annotationViews']['length']?this['annotationViews']['length']:_0x11af0f-0x1;}['_toggleDialog'](){const _0x4201d2=this['editor'],_0x25a24b=_0x4201d2['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Li(_0x4201d2['locale'],this['annotationViews'])),'commentsArchive'===_0x25a24b['id']?_0x25a24b['hide']():_0x25a24b['show']({'id':'commentsArchive','title':Et(_0x4201d2['locale'],'COMMENTS_ARCHIVE'),'icon':_0x4d5995,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x5568d7['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x41158e,_0x48e944=!0x1){const _0x45cd60=this['editor']['locale'],_0x5da1ed=this['editor']['plugins']['get']('Dialog'),_0x45b706=new _0x41158e(_0x45cd60);return _0x45b706['bind']('isEnabled')['to'](this,'isEnabled'),_0x45b706['bind']('isOn')['to'](_0x5da1ed,'id',_0x382333=>'commentsArchive'===_0x382333),_0x45b706['set']({'label':Et(_0x45cd60,'COMMENTS_ARCHIVE'),'icon':_0x4d5995,'isToggleable':!0x0}),_0x48e944&&(_0x45b706['tooltip']=!0x0),this['listenTo'](_0x45b706,'execute',()=>this['_toggleDialog']()),_0x45b706;}['_hideDialogOnAnnotationEscape']=_0x24160c=>{const _0x9294dc=_0x24160c['source'];if(!this['annotationViews']['has'](_0x9294dc['view']))return;const _0x532e0b=this['editor']['plugins']['get']('Dialog');_0x532e0b['isOpen']&&'commentsArchive'===_0x532e0b['id']&&(_0x532e0b['hide'](),_0x24160c['stop']());};},Bi=class extends _0x26bf82{static get['requires'](){return[oi,wi,vi,Di,Vi,yi,Mi,Si,xi];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{ci as AddCommentThreadCommand,$t as Annotation,Jt as AnnotationCollection,Ri as AnnotationCounterButtonView,qt as AnnotationView,ti as Annotations,Ei as AnnotationsSidebarItemView,Ii as AnnotationsSidebarView,Ti as AnnotationsUIs,Ht as BaseCommentThreadView,Kt as BaseCommentView,hi as Comment,ri as CommentThread,bt as CommentThreadController,xt as CommentThreadInputView,Ut as CommentThreadView,Yt as CommentView,Bi as Comments,Di as CommentsArchive,Vi as CommentsArchiveUI,wi as CommentsEditing,Lt as CommentsListView,yi as CommentsOnly,oi as CommentsRepository,vi as CommentsUI,di as EditorAnnotations,xi as InlineAnnotations,Si as NarrowSidebar,ki as Sidebar,Mi as WideSidebar,Qt as bindAnnotationCollections};
|
|
23
|
+
import{Command as _0x25fd83,Context as _0x3ea8d1,ContextPlugin as _0x584f12,Editor as _0x3c4137,PendingActions as _0x5a9d3d,Plugin as _0x580aef}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x3973a7,Collection as _0x55d760,DomEmitterMixin as _0x4c115d,FocusTracker as _0x17ba74,KeystrokeHandler as _0x17fd77,ObservableMixin as _0x50d712,Rect as _0x3f7499,diff as _0x1de298,first as _0x90b9b4,getEnvKeystrokeText as _0x470c6f,keyCodes as _0x31d699,priorities as _0x454ece,scrollViewportToShowTarget as _0x3650d4,toUnit as _0x3b2cc3,uid as _0x228023}from'@ckeditor/ckeditor5-utils';import{AriaDescriptionView as _0x3592bf,ConfirmMixin as _0x3aed61,FOCUS_ANNOTATION_KEYSTROKE as _0x2f877e,LateFocusButtonView as _0xccc2c6,LateFocusDropdownButtonView as _0x17ac7a,UserView as _0x394548,Users as _0x29eb39,getAllMarkersDomElementsSorted as _0x1bc54f,getDateTimeFormatter as _0x120c49,hashObject as _0x191b3b,setupThreadKeyboardNavigation as _0x550d39,surroundingMarkersDetector as _0x969ef6,trimHtml as _0x23e7f7}from'@ckeditor/ckeditor5-collaboration-core';import{cloneDeep as _0x3bbce8,debounce as _0x488046,isEqual as _0x3a45f3,set as _0x1c2903,throttle as _0x5f57a5,unset as _0x4899cc}from'es-toolkit/compat';import{IconAddComment as _0x52d241,IconCheck as _0x355a0b,IconCommentsArchive as _0x104917,IconPencil as _0x572f5b,IconRemoveComment as _0x43c646,IconThreeVerticalDots as _0x2cdba9,IconUndo as _0xae80cd}from'@ckeditor/ckeditor5-icons';import{BalloonPanelView as _0x162878,BodyCollection as _0x4b697d,ButtonView as _0x352ef3,ContextualBalloon as _0x39675d,Dialog as _0x4abe2b,DialogViewPosition as _0xdcd457,EditorUI as tt,EditorUIView as it,FocusCycler as et,InlineEditableUIView as st,ListItemView as nt,ListView as ot,MenuBarMenuListItemButtonView as rt,View as ht,ViewCollection as at,createDropdown as ct,focusChildOnDropdownOpen as dt}from'@ckeditor/ckeditor5-ui';import{MouseObserver as lt,disableViewPlaceholder as mt,enableViewPlaceholder as ut}from'@ckeditor/ckeditor5-engine';import{Clipboard as ft,ClipboardMarkersUtils as pt,ClipboardPipeline as wt}from'@ckeditor/ckeditor5-clipboard';import{Enter as gt,ShiftEnter as _t}from'@ckeditor/ckeditor5-enter';import{SelectAll as At}from'@ckeditor/ckeditor5-select-all';import{Typing as vt}from'@ckeditor/ckeditor5-typing';import{Undo as yt}from'@ckeditor/ckeditor5-undo';import{Paragraph as Tt}from'@ckeditor/ckeditor5-paragraph';import{toWidget as Ct}from'@ckeditor/ckeditor5-widget';const It=/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x50d712();var bt=class extends It{['model'];['view'];constructor(_0x56ed99,_0x3ac86a){super(),this['model']=_0x56ed99,this['model']['_isAttached']=!0x0,this['view']=_0x3ac86a,this['listenTo'](_0x3ac86a,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x3ac86a,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x3ac86a,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x3ac86a,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x3ac86a,'addComment',(_0x336ad3,_0x1f1eb6)=>this['addComment'](_0x1f1eb6)),this['listenTo'](_0x3ac86a,'updateComment',(_0x30cb35,_0x1f9970,_0x272d3b)=>this['updateComment'](_0x1f9970,_0x272d3b)),this['listenTo'](_0x3ac86a,'removeComment',(_0x10112f,_0x59d7b2)=>this['removeComment'](_0x59d7b2));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x3b0061){this['model']['addComment']({'content':_0x3b0061,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x5a2873,_0x4a2488){this['model']['getComment'](_0x5a2873)['update']({'content':_0x4a2488});}['removeComment'](_0x3bc3c4){this['model']['getComment'](_0x3bc3c4)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}};function Et(_0x310d11,_0x4e21a8,_0x2b7a0f){const t=_0x310d11['t'];switch(_0x4e21a8){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'},_0x2b7a0f);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%0\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x2b7a0f);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'},_0x2b7a0f);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'},_0x2b7a0f);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x2b7a0f);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'},_0x2b7a0f);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'},_0x2b7a0f);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'},_0x2b7a0f);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'';}}var kt=class extends it{['main'];['editable'];constructor(_0x290bae,_0x3c8df2){super(_0x290bae);const _0x377bc1=_0x228023();this['main']=this['createCollection'](),this['editable']=new st(_0x290bae,_0x3c8df2,void 0x0,{'label':()=>Et(_0x290bae,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x290bae['uiLanguageDirection'],'lang':_0x290bae['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x377bc1},'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']();}},Nt=class extends tt{['view'];constructor(_0x31724c){super(_0x31724c),this['view']=new kt(_0x31724c['locale'],_0x31724c['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x2e62ac=this['editor']['editing']['view'],_0x11f5fa=this['view']['editable'];_0x11f5fa['name']=_0x2e62ac['document']['getRoot']()['rootName'],this['view']['render']();const _0x163430=_0x11f5fa['element'];this['setEditableElement'](_0x11f5fa['name'],_0x163430),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x2e62ac['attachDomRoot'](_0x163430),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}};const Ot=[ft,gt,_t,At,vt,yt,Tt],Mt=/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x50d712(_0x3c4137);var Rt=class CommentEditor extends Mt{static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Ot)());constructor(_0x30d825={}){(_0x30d825=Object['assign']({},_0x30d825))['plugins']||(_0x30d825['plugins']=CommentEditor['defaultPlugins']),super(_0x30d825),this['ui']=new Nt(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this['editing']['view']['_overlayModeHint']='auto',this['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}['create'](){const _0x2faa8d=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x2faa8d))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x3a57f2=>{const _0x219ab1=this['model']['document']['getRoot'](),_0x1083e0=_0x219ab1&&_0x219ab1['getChild'](_0x219ab1['childCount']-0x1);_0x3a57f2['setSelection'](_0x1083e0,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x19deda=this['editing']['view'],_0x4873d6=_0x19deda['document']['getRoot'](),_0x2023ca=_0x4873d6['getChild'](0x0);_0x4873d6['childCount']>0x1||!_0x2023ca||'p'!=_0x2023ca['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x19deda,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x2023ca['placeholder']=this['placeholder']),ut({'view':_0x19deda,'element':_0x2023ca,'keepOnFocus':!0x0}),this['placeholderElement']=_0x2023ca);}},St=class extends ht{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x509ef2,_0x3e9028={}){super(_0x509ef2),this['editor']=null,this['_editorConfig']=_0x3e9028,this['set']('value',_0x3e9028['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',Et(_0x509ef2,'Reply...')),this['set']('submitLabel',Et(_0x509ef2,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x17fd77(),this['focusTracker']=new _0x17ba74(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x31bceb=>!_0x31bceb['defaultPrevented']},'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',(_0x480e7e,_0x132654)=>{this['cancelButtonView']['fire']('execute'),_0x132654();}),this['keystrokes']['set']('Ctrl+Enter',(_0x5ec59e,_0x4ef645)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x4ef645());}),this['on']('submit',(_0x47d16b,_0xd4205a)=>{_0xd4205a['length']>0xfde8?(alert(Et(_0x509ef2,'TOO_LONG_COMMENT_ALERT',[_0xd4205a['length'],0xfde8])),_0x47d16b['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x3dbd58=this['editor'];this['element']['insertBefore'](_0x3dbd58['ui']['element'],this['element']['firstChild']),_0x3dbd58['model']['document']['on']('change',()=>this['value']=_0x3dbd58['getData']()),_0x3dbd58['bind']('placeholder')['to'](this),this['focusables']['add'](_0x3dbd58['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x14cc95){-0x1===_0x14cc95?(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:_0x1d2dab}=this,_0x5b528c=new _0x352ef3(_0x1d2dab);return _0x5b528c['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x5b528c['withText']=!0x0,_0x5b528c['bind']('label')['to'](this,'submitLabel'),_0x5b528c['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x5b528c['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0xd373a2,_0x213354)=>!_0x213354&&!!_0xd373a2['trim']()),_0x5b528c;}['_createCancelButton'](){const {locale:_0x428bde}=this,_0x551ab4=new _0x352ef3(_0x428bde);return _0x551ab4['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x551ab4['label']=Et(_0x428bde,'Cancel'),_0x551ab4['withText']=!0x0,_0x551ab4['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x551ab4;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0xb832aa=>{this['focusTracker']['add'](_0xb832aa['element']);}),this['focusables']['on']('change',(_0x536e41,_0x4e3a6d)=>{for(const _0xb23926 of Array['from'](_0x4e3a6d['added'])['reverse']())this['focusTracker']['add'](_0xb23926['element']);});}},xt=class extends ht{constructor(_0x332a1b,_0xf71272,_0x41ee7a){super(_0x332a1b),this['commentInputView']=new St(_0x332a1b,_0x41ee7a),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x53af5c,_0x10eb16)=>_0x53af5c||!!_0x10eb16),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 _0x394548(_0x332a1b,_0xf71272),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'](_0x6037ff){this['commentInputView']['focus'](_0x6037ff);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x5d9b9d,_0x3411ad)=>{const {submitButtonView:_0x113f5a,cancelButtonView:_0x3b4581,editor:_0x5ea000}=this['commentInputView'];[_0x113f5a['element'],_0x3b4581['element'],_0x5ea000?_0x5ea000['editing']['view']['getDomRoot']():null]['filter'](_0x1a7aa0=>_0x1a7aa0)['some'](_0x118aa1=>_0x118aa1['contains'](_0x3411ad['target']))||(this['focus'](),_0x3411ad['preventDefault']());});}},Pt=class extends ht{constructor(_0xa89095){super(_0xa89095);const _0x4eddfe=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x4eddfe['to']('count',_0x5beed2=>Et(_0xa89095,'NUMBER_OF_COMMENTS',_0x5beed2))}]});}},Lt=class extends ht{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x12d4f9,_0x40da95,_0xa504a8){super(_0x12d4f9);const _0x5dfda2=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x40da95['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x40da95,this['_config']=_0xa504a8,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x17ba74(),this['keystrokes']=new _0x17fd77(),this['focusCycler']=new et({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x300990=>this['commentViews']['map'](_0x53ccac=>_0x53ccac['element'])['includes'](_0x300990['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Pt(_0x12d4f9),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x348ca3=>_0x348ca3-this['_config']['maxCommentsWhenCollapsed']);for(const _0x21c7f3 of _0x40da95['comments'])this['_handleNewCommentModel'](_0x21c7f3);this['_handleInfoComment'](),this['listenTo'](_0x40da95['comments'],'add',(_0x76d944,_0x16658b)=>{const _0x3f6d51=this['_calculatePosition'](_0x16658b);this['length']++,this['_handleNewCommentModel'](_0x16658b,_0x3f6d51),this['refreshVisibleViews']();}),this['listenTo'](_0x40da95['comments'],'remove',(_0x154aaf,_0x41d54f)=>{this['length']--,this['_handleRemoveCommentModel'](_0x41d54f),this['refreshVisibleViews']();}),this['listenTo'](_0x40da95,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x40da95,'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',_0x5dfda2['if']('length','ck-hidden',_0x6be7a=>!_0x6be7a)],'aria-label':Et(_0x12d4f9,'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'](_0x54a63a){-0x1===_0x54a63a?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x454713 of this['commentViews'])_0x454713['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x480365,_0x2f380e){const _0xceb03e=new this['_config']['CommentView'](this['locale'],_0x480365,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0xceb03e['viewUid']=_0x480365['id'],_0xceb03e['delegate']('removeComment')['to'](this),_0xceb03e['delegate']('updateComment')['to'](this),_0xceb03e['delegate']('resolveCommentThread')['to'](this),_0xceb03e['delegate']('editorReady')['to'](this),_0xceb03e['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0xceb03e,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0xceb03e,_0x2f380e);}['_calculatePosition'](_0x5446d9){const _0x335701=this['_model']['_findOptimalIndex'](_0x5446d9);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x5446d9['authoredAt']?_0x335701-0x1:_0x335701:_0x335701-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x315f19={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':Et(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x315f19,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x315f19));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x4d6684){const _0x2469c2=this['commentViews']['remove'](_0x4d6684['id']);this['stopListening'](_0x2469c2),_0x2469c2['isEditMode']&&this['_updateHasDirtyComment'](),_0x2469c2['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x45b055=>_0x45b055['isEditMode']);}['_rearrangeCollapse'](){const _0x3a22da=function(_0x2426cb){const _0x3a8445=new _0x55d760();for(const _0x7582ed of _0x2426cb)_0x3a8445['add'](_0x7582ed);return _0x3a8445;}(this['commentViews']),_0x1797d5=this['_collapsedCommentsView']['count'];for(let _0xfc087e=0x1;_0xfc087e<=_0x1797d5;_0xfc087e++)_0x3a22da['remove'](0x1);for(const _0x502ea6 of _0x3a22da)_0x502ea6['collapse']();_0x1797d5>0x0&&_0x3a22da['add'](this['_collapsedCommentsView'],0x1),Dt(_0x1de298(Array['from'](this['visibleViews']),Array['from'](_0x3a22da)),this['visibleViews'],_0x3a22da);}['_rearrangeExpand'](){Dt(_0x1de298(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x1bbba0 of this['visibleViews'])_0x1bbba0['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x10aff2=>{this['focusTracker']['add'](_0x10aff2['element']),this['keystrokes']['listenTo'](_0x10aff2['element']);}),this['commentViews']['on']('change',(_0x3c8631,_0x8ce7d7)=>{for(const _0x5346e8 of _0x8ce7d7['removed'])this['focusTracker']['remove'](_0x5346e8['element']),this['keystrokes']['stopListening'](_0x5346e8['element']);for(const _0x523346 of Array['from'](_0x8ce7d7['added'])['reverse']())this['focusTracker']['add'](_0x523346['element']),this['keystrokes']['listenTo'](_0x523346['element']);});}};function Dt(_0x1ac181,_0x1eb36b,_0x1ddee9){let _0x5b0d27=0x0;for(const _0x3d0829 of _0x1ac181)switch(_0x3d0829){case'insert':_0x1eb36b['add'](_0x1ddee9['get'](_0x5b0d27),_0x5b0d27),_0x5b0d27++;break;case'delete':_0x1eb36b['remove'](_0x5b0d27);break;case'equal':_0x5b0d27++;}}var Vt=class extends ht{constructor(_0x5be532){super(_0x5be532);const _0xa3cccd=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0xa3cccd['to']('contextValue',_0x288406=>Et(_0x5be532,'THREAD_CONTEXT_LABEL',_0x288406)),'tabindex':-0x1},'children':[{'text':_0xa3cccd['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Bt=class extends ht{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x26319a,_0xafb6e8){super(_0x26319a);const _0x10490b=this['bindTemplate'];this['_model']=_0xafb6e8,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x17ba74(),this['keystrokes']=new _0x17fd77(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x1316a5=>!!_0x1316a5),this['bind']('contextValue')['to'](this['_model'],'context',_0x861025=>_0x861025&&_0x861025['value']?this['_trimContextValue'](_0x861025['value']):Et(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',_0x10490b['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 _0x11357e=new _0x352ef3(this['locale']);return _0x11357e['label']=Et(this['locale'],'Reopen'),_0x11357e['tooltip']=Et(this['locale'],'Reopen'),_0x11357e['icon']=_0xae80cd,_0x11357e['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x9507a2=>!_0x9507a2),_0x11357e['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x27f023,_0x592c11)=>_0x27f023&&_0x592c11),_0x11357e['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x11357e;}['_trimContextValue'](_0x548583){if(_0x548583['length']<0x96)return _0x548583;const _0x4dfc87=_0x548583['lastIndexOf']('\x20',0x93);return _0x548583['substring'](0x0,_0x4dfc87>-0x1?_0x4dfc87:0x93)+'...';}['_attachContextActions'](){const _0x512972=this['element']['querySelector']('.ck-context'),_0x1d6fb7=_0x512972['querySelector']('.ck-context__value');this['listenTo'](_0x512972,'mouseenter',()=>{_0x1d6fb7['offsetWidth']<_0x1d6fb7['scrollWidth']&&_0x512972['classList']['add']('overlay');}),this['listenTo'](_0x512972,'mouseleave',()=>{_0x512972['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x388d78 of this['focusables'])this['focusTracker']['add'](_0x388d78['element']),this['keystrokes']['listenTo'](_0x388d78['element']);}['_createContextView'](){const _0x530595=new Vt(this['locale']);return _0x530595['bind']('contextValue')['to'](this),_0x530595;}},Ht=class extends ht{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3685a0,_0x3400b6,_0x7e816d,_0x44710f){super(_0x3685a0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x3400b6,this['_localUser']=_0x7e816d,this['_config']=_0x44710f,this['commentThreadHeaderView']=new Bt(_0x3685a0,_0x3400b6),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x3592bf(_0x3685a0,Et(_0x3685a0,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Lt(_0x3685a0,_0x3400b6,Object['assign']({'CommentView':this['_config']['CommentView']},_0x44710f)),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',(_0x49f338,_0xea1136)=>_0x49f338||!!_0xea1136),this['bind']('isUnlinked')['to'](_0x3400b6,'unlinkedAt',_0x597b4b=>!!_0x597b4b);let _0x378c8e=null;const _0x58896c=()=>{const _0x341a12=this['_model']['comments']['first']||null;_0x341a12!==_0x378c8e&&(_0x378c8e&&this['stopListening'](_0x378c8e,'change:content'),_0x378c8e=_0x341a12,_0x341a12&&this['listenTo'](_0x341a12,'change:content',_0x58896c));const _0x37a8d3=_0x341a12?_0x341a12['author']['name']:this['_localUser']['name'],_0x8ed02d=_0x341a12?new DOMParser()['parseFromString'](_0x23e7f7(_0x341a12['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']}),'text/html')['body']['textContent']:'',_0x420428=Et(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x37a8d3]);this['set']('ariaLabel',_0x8ed02d?_0x420428+'\x20'+_0x8ed02d:_0x420428);};this['listenTo'](this['_model']['comments'],'change',_0x58896c),_0x58896c(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x17ba74(),this['keystrokes']=new _0x17fd77(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x55e5ed=>_0x55e5ed['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x550d39(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x48732c=new xt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x299ebd=_0x48732c['commentInputView'];return _0x48732c['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x299ebd,'value',(_0x245b3d,_0x64d1d1,_0x59bef5,_0x440f74,_0x4ca0e7)=>!!_0x4ca0e7||!!_0x440f74&&_0x59bef5&&!_0x64d1d1||_0x245b3d&&_0x59bef5&&!_0x64d1d1),_0x299ebd['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x2d13aa,_0x41650e,_0x42d148)=>{let _0x1564a8;return _0x1564a8=_0x42d148&&_0x41650e?'Reply\x20to\x20reopen\x20discussion...':_0x2d13aa?'Reply...':'Write\x20a\x20comment...',Et(this['locale'],_0x1564a8);}),_0x299ebd['bind']('submitLabel')['to'](this,'length',_0x2dcf77=>Et(this['locale'],_0x2dcf77?'Reply':'Comment')),_0x299ebd['on']('submit',(_0x135d86,_0x1755b1)=>{this['fire']('addComment',_0x1755b1),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x299ebd['on']('cancel',()=>{this['focus']();}),_0x299ebd['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x299ebd['on']('cancel',_0x59484f=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x59484f['stop']());}),this['on']('change:isActive',(_0x6ce874,_0x5e1dc,_0x1085e7)=>{_0x1085e7||this['length']||_0x299ebd['value']||this['fire']('removeCommentThread');}),_0x48732c;}};const Ft=/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x3aed61(Ht);var Ut=class extends Ft{['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x5103cd,_0xcf3d0f,_0x226dc1,_0x3d1044){super(_0x5103cd,_0xcf3d0f,_0x226dc1,_0x3d1044),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x5103cd,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x9d0a6a,_0x41a2ad,_0x3bcf8a)=>{_0x3bcf8a||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x5b0608,_0x419cb7,_0x1c13a3)=>{_0x1c13a3&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x4325ec=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x4325ec['if']('isActive','ck-thread--active'),_0x4325ec['if']('isUnlinked','ck-thread--unlinked'),_0x4325ec['to']('actionIndicator',_0x616070=>_0x616070?'ck-thread--'+_0x616070:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x4325ec['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 _0x1e5569 of this['commentsListView']['commentViews'])_0x1e5569['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x490233}=this,_0x3846b2=this['commentsListView']['commentViews']['get'](0x0);_0x3846b2===this['_boundFirstCommentView']||_0x3846b2['isSystemComment']||(this['_boundFirstCommentView']=_0x3846b2,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x3846b2,'actionIndicator',_0x5c77bf=>'remove'===_0x5c77bf?'remove':null),_0x3846b2['placeholder']=Et(_0x490233,'Write\x20a\x20comment...'),_0x3846b2['removeButton']['on']('execute',_0x57ad09=>{_0x57ad09['stop'](),this['showConfirm'](Et(_0x490233,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x3846b2['focus']();}),_0x3846b2['actionBar']['add'](this['resolveButton'],0x0),_0x3846b2['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x3304ae=new _0xccc2c6(this['locale']);return _0x3304ae['label']=Et(this['locale'],'Resolve'),_0x3304ae['tooltip']=Et(this['locale'],'Resolve'),_0x3304ae['icon']=_0x355a0b,_0x3304ae['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x3304ae['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x538396=>!_0x538396),_0x3304ae['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3620dd,_0x24b932)=>_0x3620dd&&!_0x24b932),_0x3304ae['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x3304ae;}['_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']));}},Wt=class extends ht{constructor(_0x5dcad7){super(_0x5dcad7),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x4752ce,_0x290c93,_0x40f1a6)=>{this['element']['innerHTML']=_0x40f1a6;}),this['element']['innerHTML']=this['content'];}},Kt=class extends ht{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x1a3460,_0x46c821,_0x21fa0c){super(_0x1a3460),this['_model']=_0x46c821,this['_config']=_0x21fa0c,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x46c821,'content',_0x46c821,'authoredAt',(_0x36b7c1,_0x3f411f)=>Et(_0x1a3460,'COMMENT_ARIA_LABEL',[_0x46c821['author']['name'],_0x21fa0c['formatDateTime'](_0x3f411f),new DOMParser()['parseFromString'](_0x36b7c1,'text/html')['body']['textContent'],_0x46c821['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x3592bf(_0x1a3460,Et(_0x1a3460,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new at(),this['focusTracker']=new _0x17ba74(),this['keystrokes']=new _0x17fd77(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x41962f=>_0x41962f['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']?Et(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):Et(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?Et(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):Et(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x151d74=new Wt(this['locale']);return _0x151d74['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x27af68,_0x3ba87e)=>_0x3ba87e?_0x23e7f7(_0x27af68,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x27af68),_0x151d74;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x1c0014=new St(this['locale'],this['_config']['editorConfig']);return _0x1c0014['value']=this['_model']['content'],_0x1c0014['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x1c0014['submitLabel']=Et(this['locale'],'Save'),_0x1c0014['on']('submit',(_0xfe887c,_0x577739)=>{this['fire']('updateComment',this['_model']['id'],_0x577739),this['switchToDisplayMode'](),this['focus']();}),_0x1c0014['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x1c0014['once']('editorReady',()=>{_0x1c0014['focus']();}),_0x1c0014['createEditor'](),_0x1c0014['delegate']('editorReady')['to'](this),_0x1c0014['delegate']('editorDestroyed')['to'](this),_0x1c0014;}['_setupKeyboardNavigation'](){const _0x164f87=this['element'];this['keystrokes']['listenTo'](_0x164f87);for(const _0x1e6938 of this['focusables'])this['focusTracker']['add'](_0x1e6938['element']),this['keystrokes']['listenTo'](_0x1e6938['element']);this['focusables']['on']('change',(_0x3e107c,_0x46449e)=>{for(const _0x6f57f6 of _0x46449e['removed'])this['focusTracker']['remove'](_0x6f57f6['element']),this['keystrokes']['stopListening'](_0x6f57f6['element']);for(const _0x524cdf of _0x46449e['added'])this['focusTracker']['add'](_0x524cdf['element']),this['keystrokes']['listenTo'](_0x524cdf['element']);}),this['keystrokes']['set']('enter',(_0x3c785c,_0x3d6aa5)=>{_0x164f87===_0x3c785c['target']&&(this['focusCycler']['focusFirst'](),_0x3d6aa5());}),this['keystrokes']['set']('esc',(_0x5af7d5,_0x5dd4a)=>{_0x164f87!==_0x5af7d5['target']&&(this['focus'](),_0x5dd4a());});}};const Gt=/* #__PURE__ -- @preserve */
|
|
28
|
+
_0x3aed61(Kt);var Yt=class extends Gt{['actionBar'];['userView'];constructor(_0x2d2719,_0x382852,_0x33778d){super(_0x2d2719,_0x382852,_0x33778d),this['set']('actionIndicator',null),this['set']('placeholder',Et(_0x2d2719,'Reply...')),this['bind']('authoredAt')['to'](_0x382852),this['bind']('resolvedAt')['to'](_0x382852),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 _0x394548(_0x2d2719,_0x382852['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x382852,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x3fcfd7=this['bindTemplate'],_0x40209e=[{'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':_0x3fcfd7['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x3fcfd7['to']('authoredAt',_0x164a54=>this['_config']['formatDateTime'](_0x164a54))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x3fcfd7['if']('isEditMode','ck-comment__actions--hidden'),_0x3fcfd7['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']&&_0x40209e['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x3fcfd7['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x3fcfd7['if']('isEditMode','ck-comment--edit'),_0x3fcfd7['if']('isSystemComment','ck-comment--info'),_0x3fcfd7['to']('actionIndicator',_0x2ee359=>_0x2ee359?'ck-comment--'+_0x2ee359:'')],'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':_0x40209e}]}]};}['_createEditButton'](){const _0x5f49a9=new _0x352ef3(this['locale']);return _0x5f49a9['label']=Et(this['locale'],'Edit'),_0x5f49a9['icon']=_0x572f5b,_0x5f49a9['withText']=!0x0,_0x5f49a9['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x5f49a9['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0xe4a2b7=>!_0xe4a2b7),_0x5f49a9['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x5f49a9['on']('execute',()=>this['switchToEditMode']()),_0x5f49a9;}['_createRemoveButton'](){const _0x57f47a=new _0x352ef3(this['locale']);return _0x57f47a['label']=Et(this['locale'],'Remove'),_0x57f47a['icon']=_0x43c646,_0x57f47a['withText']=!0x0,_0x57f47a['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x57f47a['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x30f3f5=>!_0x30f3f5),_0x57f47a['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x57f47a['on']('execute',()=>{this['showConfirm'](Et(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x57f47a;}['_createDropdown'](){const _0xef87=ct(this['locale'],_0x17ac7a),_0x20de83=_0xef87['panelView']['children'],_0x53669b=new ot(this['locale']),_0x5249b5=_0xef87['bindTemplate'];dt(_0xef87,()=>this['items']['find'](_0x5a12fa=>_0x5a12fa['isVisible'])),_0xef87['extendTemplate']({'attributes':{'class':[_0x5249b5['if']('isVisible','ck-hidden',_0x2a2d70=>!_0x2a2d70)]}});const _0x1b0dd0=(_0xaa1a4f,_0x3a0e20=-0x1)=>{const _0x5e399b=new nt(this['locale']);_0x5e399b['children']['add'](_0xaa1a4f);const _0x2e81fb=_0x3a0e20>-0x1?_0x3a0e20:_0x53669b['items']['length'];_0x53669b['items']['add'](_0x5e399b,_0x2e81fb);const _0x1a5544=Array['from'](this['items']);_0xef87['unbind']('isEnabled','isVisible'),_0xef87['bind']('isEnabled')['toMany'](_0x1a5544,'isEnabled',(..._0x3c87d7)=>_0x3c87d7['some'](_0x590c62=>_0x590c62)),_0xef87['bind']('isVisible')['toMany'](_0x1a5544,'isVisible',(..._0x3a80ee)=>_0x3a80ee['some'](_0x222349=>_0x222349));};_0xef87['panelPosition']='sw',_0xef87['buttonView']['set']({'label':Et(this['locale'],'Show\x20more\x20items'),'icon':_0x2cdba9});for(const _0x24793b of this['items'])_0x1b0dd0(_0x24793b);return _0x20de83['add'](_0x53669b),_0xef87['listenTo'](this['items'],'add',(_0x57d468,_0x58794d,_0x28eb09)=>{_0x1b0dd0(_0x58794d,_0x28eb09);}),_0xef87['listenTo'](this['items'],'remove',(_0x1883c1,_0x2bdaa7,_0x351ab8)=>{_0x53669b['items']['remove'](_0x351ab8);}),_0xef87;}['_attachActions'](_0x3f87b5,_0x42bbfd){const _0x2f62e9=_0x3f87b5&&_0x3f87b5['element'];_0x2f62e9&&(this['listenTo'](_0x2f62e9,'mouseenter',()=>this['actionIndicator']=_0x42bbfd),this['listenTo'](_0x2f62e9,'focus',()=>this['actionIndicator']=_0x42bbfd),this['listenTo'](_0x2f62e9,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x2f62e9,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x3366a3=super['_createCommentInputView']();return _0x3366a3['bind']('placeholder')['to'](this),_0x3366a3;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}};function Xt(_0x58776c){const _0x58346d=_0x5f57a5(_0x58776c,0x1e),_0x5177ef=new MutationObserver(_0x4eecaf=>{for(const _0x2e4ae6 of _0x4eecaf)('attributes'==_0x2e4ae6['type']&&'class'==_0x2e4ae6['attributeName']||'childList'==_0x2e4ae6['type']||'characterData'==_0x2e4ae6['type'])&&_0x58346d();});return{'attach'(_0x3c6980){_0x5177ef['observe'](_0x3c6980,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x5177ef['disconnect'](),_0x58346d['cancel']();}};}var qt=class extends ht{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x233bd2,_0x2ab5da){super(_0x233bd2),this['id']=_0x228023(),this['focusTracker']=new _0x17ba74(),this['keystrokes']=new _0x17fd77(),this['keystrokes']['set']('Esc',(_0x38772d,_0x4ba112)=>this['fire']('Esc',_0x4ba112)),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']=Xt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x2ab5da),this['mainView']=_0x2ab5da;const _0x3ae3ea=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x3ae3ea['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 _0x5e4aad=this['element']['clientHeight'];_0x5e4aad&&(this['height']=_0x5e4aad);}};const jt=/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x50d712();var $t=class Annotation extends jt{['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x22b9c9,target:_0x1c067a,type:_0xcfd672,isVisible:_0x35a798=!0x0}){super(),this['view']=_0x22b9c9,this['view']['element']||this['view']['render'](),this['_type']=_0xcfd672,this['_target']=_0x1c067a,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x55d760([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x45961e,_0x47a497)=>{this['view']['focusTracker']['add'](_0x47a497);}),this['focusableElements']['on']('remove',(_0x4cbb39,_0x1dda16)=>{this['view']['focusTracker']['remove'](_0x1dda16);}),this['set']('isVisible',_0x35a798);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0xe3a007=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0xe3a007),_0xe3a007;}get['targetRect'](){const _0x400535=this['target'];if(null===_0x400535)return null;if(_0x400535 instanceof _0x3f7499)return _0x400535;const _0x1207cf=_0x400535['filter'](_0x2d36cc=>function(_0x129678){return!!_0x129678['offsetParent']||!!_0x129678['getClientRects']()['item'](0x0);}(_0x2d36cc));return 0x0===_0x1207cf['length']?null:_0x3f7499['getDomElementRects'](_0x1207cf[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x3af2fe){this['view']['isActive']=_0x3af2fe,this['view']['mainView']['isActive']=_0x3af2fe;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x3e7e59){if(!(null===_0x3e7e59||_0x3e7e59 instanceof _0x3f7499||Array['isArray'](_0x3e7e59)&&_0x3e7e59['every'](_0x1fef9f=>zt(_0x1fef9f))))throw new _0x3973a7('annotation-invalid-target',null,{'target':_0x3e7e59});}['_getNormalizedTarget'](){const _0x1cc140='function'==typeof this['_target']?this['_target']():this['_target'];return zt(_0x1cc140)?[_0x1cc140]:_0x1cc140;}};function zt(_0x1daedd){return null!==_0x1daedd&&'object'==typeof _0x1daedd&&'nodeType'in _0x1daedd&&0x1===_0x1daedd['nodeType'];}var Jt=class extends _0x55d760{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x2d172e=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x17ba74(),this['_focusTracker']['on']('change:isFocused',(_0x16710b,_0x361ab6,_0x22233e)=>{_0x22233e||this['fire']('blur');});for(const _0xc9abba of _0x2d172e)this['add'](_0xc9abba);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x5eae5b){if(this['has'](_0x5eae5b))throw new _0x3973a7('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x5eae5b['innerView'],_0x5eae5b),this['_viewToAnnotation']['set'](_0x5eae5b['view'],_0x5eae5b);for(const _0x1fdd18 of _0x5eae5b['focusableElements'])this['_focusTracker']['add'](_0x1fdd18);if(this['listenTo'](_0x5eae5b['focusableElements'],'add',(_0x91f6c1,_0x135fce)=>{this['_focusTracker']['add'](_0x135fce);}),this['listenTo'](_0x5eae5b['focusableElements'],'remove',(_0x52cbcc,_0x365d12)=>{this['_focusTracker']['remove'](_0x365d12);}),this['listenTo'](_0x5eae5b['view']['focusTracker'],'change:isFocused',(_0x259a9e,_0x20c20d,_0x28b66d)=>{_0x28b66d&&this['fire']('focus',_0x5eae5b);}),_0x5eae5b['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x3e32cf of this)_0x3e32cf['updateTargetRect']();}const _0x4ad341=this['_getOrderInContent'](_0x5eae5b['view']['targetRect']);return super['add'](_0x5eae5b,_0x4ad341);}['remove'](_0x49c5b7){if(!this['has'](_0x49c5b7))throw new _0x3973a7('annotationcollection-not-existing-item',null);this['stopListening'](_0x49c5b7['view']['focusTracker']),this['stopListening'](_0x49c5b7['focusableElements']);for(const _0x2867e3 of _0x49c5b7['focusableElements'])this['_focusTracker']['remove'](_0x2867e3);return this['_viewToAnnotation']['delete'](_0x49c5b7['view']),this['_innerViewToAnnotation']['delete'](_0x49c5b7['innerView']),super['remove'](_0x49c5b7);}['getByInnerView'](_0x38b2e6){return this['_innerViewToAnnotation']['get'](_0x38b2e6);}['getByView'](_0x2e9fed){return this['_viewToAnnotation']['get'](_0x2e9fed);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x27459c of this)_0x27459c['updateTargetRect']();this['_sort']();}['_sort'](){const _0x252629=Array['from'](this)['sort']((_0x386fa9,_0x5c5e72)=>Zt(_0x386fa9['view']['targetRect'],_0x5c5e72['view']['targetRect']));for(let _0x3aa15d=_0x252629['length']-0x1;_0x3aa15d>0x0;_0x3aa15d--){const _0x47a936=_0x252629[_0x3aa15d];_0x3aa15d!==this['getIndex'](_0x47a936)&&(this['remove'](_0x47a936),this['add'](_0x47a936));}}['_getOrderInContent'](_0x265710){let _0x424e7a=0x0;if(!_0x265710)return this['length'];for(const _0x5575c5 of this){const _0x1824be=_0x5575c5['view']['targetRect'];if(_0x1824be){if(Zt(_0x265710,_0x1824be)<0x0)return _0x424e7a;_0x424e7a++;}}return _0x424e7a;}['_areCachedRectsStale'](){const _0x26c495=this['get'](0x0);if(!_0x26c495)return!0x1;const _0x3c8ed9=_0x26c495['view']['targetRect'],_0x22ca52=_0x26c495['targetRect'];return!(!_0x3c8ed9||!_0x22ca52)&&(_0x3c8ed9['top']!==_0x22ca52['top']||_0x3c8ed9['left']!==_0x22ca52['left']);}};function Qt({source:_0x4f3b33,target:_0x47b8c7,filter:_0x14377a}){for(const _0x4f4804 of _0x4f3b33)_0x14377a(_0x4f4804)&&_0x47b8c7['add'](_0x4f4804);_0x47b8c7['listenTo'](_0x4f3b33,'add',(_0x4795ba,_0x452c9e)=>{_0x14377a(_0x452c9e)&&_0x47b8c7['add'](_0x452c9e);}),_0x47b8c7['listenTo'](_0x4f3b33,'remove',(_0x337301,_0x4c5e3f)=>{_0x47b8c7['has'](_0x4c5e3f)&&_0x47b8c7['remove'](_0x4c5e3f);});}function Zt(_0x5b40cf,_0x401e9d){if(null===_0x5b40cf&&null===_0x401e9d)return 0x0;if(null===_0x5b40cf)return-0x1;if(null===_0x401e9d)return 0x1;const _0x3ca39f=_0x5b40cf['top']-_0x401e9d['top'];return 0x0==_0x3ca39f?_0x5b40cf['left']-_0x401e9d['left']:_0x3ca39f;}var ti=class extends _0x584f12{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x129a91){if(super(_0x129a91),this['collection']=new Jt(),this['_visibleAnnotations']=new Jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x129a91 instanceof _0x3c4137){const _0x2edd72=_0x129a91['locale'];_0x129a91['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':Et(_0x2edd72,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':Et(_0x2edd72,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':Et(_0x2edd72,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':Et(_0x2edd72,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':Et(_0x2edd72,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':Et(_0x2edd72,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':Et(_0x2edd72,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x1094b4){this['collection']['add'](_0x1094b4);}['remove'](_0x173c19){this['collection']['remove'](_0x173c19),_0x173c19['destroy']();}['refreshVisibility'](){for(const _0x471fa8 of this['collection'])_0x471fa8['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0xb43232){return this['collection']['getByInnerView'](_0xb43232);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x5237be of this['collection'])_0x5237be['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x851989){this['fire']('_activateAnnotation',_0x851989);}['createAnnotation'](_0xc6bbf6){return new $t(_0xc6bbf6);}['createAnnotationView'](_0x12b121,_0x166002){return new qt(_0x12b121,_0x166002);}['_addActiveAnnotation'](_0x3eb8b9){const _0xcabf99=new Set(this['activeAnnotations']);_0xcabf99['add'](_0x3eb8b9),this['activeAnnotations']=_0xcabf99;}['_removeActiveAnnotation'](_0x10c441){const _0x2abb56=new Set(this['activeAnnotations']);_0x2abb56['delete'](_0x10c441),this['activeAnnotations']=_0x2abb56;}['_bindAnnotationsToVisibleAnnotations'](){const _0x29f2ac=this['collection'],_0x329315=this['_visibleAnnotations'];function _0x36778e(_0x389549){const _0x541727=_0x389549['source'];_0x541727['isVisible']&&!_0x329315['has'](_0x541727)?_0x329315['add'](_0x541727):!_0x541727['isVisible']&&_0x329315['has'](_0x541727)&&_0x329315['remove'](_0x541727),_0x541727['view']['focusTracker']['remove'](_0x541727['view']['element']),_0x541727['view']['focusTracker']['add'](_0x541727['view']['element']);}this['listenTo'](_0x29f2ac,'add',(_0x513a47,_0x242574)=>{_0x242574['isVisible']&&_0x329315['add'](_0x242574),this['listenTo'](_0x242574,'change:isVisible',_0x36778e);}),this['listenTo'](_0x29f2ac,'remove',(_0x3f66fd,_0x3f50c5)=>{_0x329315['has'](_0x3f50c5)&&_0x329315['remove'](_0x3f50c5),this['stopListening'](_0x3f50c5,'change:isVisible',_0x36778e);});}['_setupEnterAnnotationKeystroke'](){const _0x58ebee=_0x10383a=>{_0x10383a['on']('ready',()=>{_0x10383a['keystrokes']['set'](_0x2f877e,(_0x5873b1,_0x30039b)=>{const _0x348dd6=_0x90b9b4(this['activeAnnotations']['values']());_0x348dd6&&(_0x348dd6['view']['focus'](),_0x30039b());});});};this['context']instanceof _0x3c4137?_0x58ebee(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x4a7efa,_0x33a55b)=>{_0x58ebee(_0x33a55b);});}['_setupEscapeAnnotationHandling'](){const _0x2b4869=_0x54730c=>{const _0x2268e2=_0x54730c['source'],_0x1025fb=[];let _0x942d53;if(Array['isArray'](_0x2268e2['target'])){_0x942d53=_0x2268e2['target'][0x0],this['context']instanceof _0x3c4137?_0x1025fb['push'](this['context']):this['context']['editors']&&_0x1025fb['push'](...this['context']['editors']);for(const _0xd6d08a of _0x1025fb)for(const _0x2d78bd of _0xd6d08a['editing']['view']['domRoots']['values']())if(_0x2d78bd['contains'](_0x942d53))return void _0xd6d08a['editing']['view']['focus']();_0x942d53['focus']();}};this['listenTo'](this['collection'],'add',(_0xfe2a7,_0x1b69f8)=>{this['listenTo'](_0x1b69f8,'escape',_0x2b4869,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x5c7237,_0x8eb3a0)=>{this['stopListening'](_0x8eb3a0,'escape',_0x2b4869);});}};const ii=Symbol('noChannel'),ei={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},si=/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x50d712(),ni=/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x50d712();var oi=class extends _0x584f12{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[ti,_0x5a9d3d,_0x29eb39];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4ee1f0){super(_0x4ee1f0),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x38a6b0=this['context']['config'];_0x38a6b0['define']('comments.maxCommentsWhenCollapsed',0x2),_0x38a6b0['define']('comments.maxThreadTotalWeight',0x1f4),_0x38a6b0['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x38a6b0['define']('comments.CommentThreadView',Ut),_0x38a6b0['define']('comments.CommentView',Yt),_0x38a6b0['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x3f1b6b=this['context']['plugins']['get'](ti);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x391438,_0x5a5f76)=>this['_addCommentThread'](_0x5a5f76)),this['on']('submitCommentThread',(_0x594012,_0x5a3d3d)=>this['_submitCommentThread'](_0x5a3d3d)),this['on']('resolveCommentThread',(_0x484140,_0x32f940)=>this['_resolveCommentThread'](_0x32f940)),this['on']('resolveCommentThread',(_0x49a9e6,_0x6d5d72)=>this['_updateActiveAnnotation'](_0x6d5d72),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x488e0f,_0x2879f7)=>this['_reopenCommentThread'](_0x2879f7)),this['on']('reopenCommentThread',(_0x2093da,_0x1f254c)=>this['_updateActiveAnnotation'](_0x1f254c),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x4f19a0,_0x395baa)=>this['_removeCommentThread'](_0x395baa)),this['on']('updateCommentThread',(_0x2cade3,_0x2f38b0)=>this['_updateCommentThread'](_0x2f38b0)),this['on']('updateCommentThread',(_0x2afd8d,_0x5c1114)=>this['_updateActiveAnnotation'](_0x5c1114),{'priority':'lowest'}),this['on']('addComment',(_0x235b1e,_0x1a92e7)=>this['_addComment'](_0x1a92e7)),this['on']('updateComment',(_0x347273,_0x2e40e1)=>this['_updateComment'](_0x2e40e1)),this['on']('removeComment',(_0x315b00,_0x104052)=>this['_removeComment'](_0x104052)),this['on']('addComment',(_0x35e204,{threadId:_0x56850,isFromAdapter:_0x34cb8c})=>{if(_0x34cb8c)return;const _0x3796d6=this['getCommentThread'](_0x56850),_0x51b59a=_0x3796d6&&this['_threadToController']['get'](_0x3796d6);_0x51b59a&&_0x51b59a['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x3f1b6b,'change:activeAnnotations',(_0x5bf035,_0x44583d,_0x555c00)=>{const _0x1d4dc8=Array['from'](_0x555c00)['map'](_0x4b80b6=>this['_viewToController']['get'](_0x4b80b6['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x1d4dc8?_0x1d4dc8['model']:null;});}set['adapter'](_0xe6bd1f){if(this['_adapter'])throw new _0x3973a7('commentsrepository-adapter-already-set');this['_adapter']=_0xe6bd1f;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x374eea=ii,threadId:_0x36afbf=_0x228023(),comments:_0x447d34=[],unlinkedAt:_0x815bf6=null,resolvedAt:_0x32db8d=null,resolvedBy:_0x407a2a=null,target:_0x107f5a=null,context:_0x5e2496=null,attributes:_0x4e39a8={},isResolvable:_0x488740=!0x0,isSubmitted:_0xa8560b=!0x1,isFromAdapter:_0x53d593=!0x1}={}){return this['fire'](ai('addCommentThread',_0x374eea),{'channelId':_0x374eea,'threadId':_0x36afbf,'comments':_0x447d34,'unlinkedAt':_0x815bf6,'resolvedAt':_0x32db8d,'resolvedBy':_0x407a2a,'target':_0x107f5a,'context':_0x5e2496,'attributes':_0x4e39a8,'isFromAdapter':_0x53d593,'isResolvable':_0x488740,'isSubmitted':_0xa8560b}),this['getCommentThread'](_0x36afbf);}['openNewCommentThread']({channelId:_0x559653=ii,threadId:_0x24eef5=_0x228023(),target:_0x4af00c,context:_0x14c59d=null,isResolvable:_0x4d863b=!0x0}){if(this['_readOnlyChannels']['has'](_0x559653)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x4af00c)throw new _0x3973a7('commentsrepository-missing-target');const _0x3af8e1=this['addCommentThread']({'channelId':_0x559653,'threadId':_0x24eef5,'target':_0x4af00c,'context':_0x14c59d,'isResolvable':_0x4d863b});if(!_0x3af8e1)return null;const _0x18311e=this['_threadToController']['get'](_0x3af8e1),_0x2777f5=_0x18311e['view']['commentThreadInputView']['commentInputView'],_0x2744ee=this['context']['plugins']['get'](ti),_0x159f31=_0x2744ee['getByInnerView'](_0x18311e['view']);return _0x2744ee['activate'](_0x159f31),_0x2777f5['once']('editorReady',()=>_0x2777f5['focus']()),_0x3af8e1;}['hasCommentThread'](_0x393f04){if('string'!=typeof _0x393f04)throw new _0x3973a7('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x393f04);}['updateCommentThread']({channelId:_0x407e2b=ii,threadId:_0x41acb6,context:_0x5a6513,unlinkedAt:_0x32e252,attributes:_0x4c87da,isFromAdapter:_0x2fdafe=!0x1}){return this['fire'](ai('updateCommentThread',_0x407e2b),{'channelId':_0x407e2b,'threadId':_0x41acb6,'context':_0x5a6513,'unlinkedAt':_0x32e252,'attributes':_0x4c87da,'isFromAdapter':_0x2fdafe}),this['getCommentThread'](_0x41acb6);}['getCommentThread'](_0xa3095d){if('string'!=typeof _0xa3095d)throw new _0x3973a7('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0xa3095d);}['fetchCommentThread']({channelId:_0x26354a,threadId:_0x1e95d1}={}){const _0x530a46=this['getCommentThread'](_0x1e95d1);if(_0x530a46)return Promise['resolve'](_0x530a46);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x3973a7('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x26354a,'threadId':_0x1e95d1})['then'](_0x555fba=>this['hasCommentThread'](_0x1e95d1)?this['getCommentThread'](_0x1e95d1):_0x555fba?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x26354a},_0x555fba)):void 0x0)['catch'](_0xd44b2a=>{throw console['error'](_0xd44b2a),new _0x3973a7('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x8f9908,skipNotAttached:_0x1f5634=!0x1,skipEmpty:_0xcf5af1=!0x1,toJSON:_0x52c32f=!0x1}={}){const _0x44a78a=[];for(const _0x5b3146 of this['_threads']['values']())_0x8f9908&&_0x5b3146['channelId']!==_0x8f9908||_0x1f5634&&!_0x5b3146['isAttached']||_0xcf5af1&&0x0===_0x5b3146['length']||_0x44a78a['push'](_0x5b3146);return _0x52c32f?_0x44a78a['map'](_0x377208=>_0x377208['toJSON']()):_0x44a78a;}['getAnnotationForCommentThread'](_0x220808){const _0x35b657=this['_threadToController']['get'](_0x220808);return _0x35b657&&this['context']['plugins']['get'](ti)['getByInnerView'](_0x35b657['view'])||null;}['getCommentThreadForAnnotation'](_0x58bdf0){const _0x4a9257=this['_viewToController']['get'](_0x58bdf0['innerView']);return _0x4a9257?_0x4a9257['model']:null;}['setActiveCommentThread'](_0x73228){const _0x3f277c=this['context']['plugins']['get'](ti);if(!_0x73228)return void(this['activeCommentThread']&&_0x3f277c['deactivateAll']());const _0x3d6cf3=this['getCommentThread'](_0x73228);if(!_0x3d6cf3)throw new _0x3973a7('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x73228});if(!this['_threadToController']['has'](_0x3d6cf3))throw new _0x3973a7('commentsrepository-active-not-attached',null,{'threadId':_0x73228});const _0x363d5f=_0x3f277c['getByInnerView'](this['_threadToController']['get'](_0x3d6cf3)['view']);_0x3f277c['activate'](_0x363d5f);}['switchReadOnly'](_0x570d37,_0x4475bd){_0x570d37?this['_readOnlyChannels']['add'](_0x4475bd):this['_readOnlyChannels']['delete'](_0x4475bd),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x41f852){return this['_readOnlyChannels']['has'](_0x41f852)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x3bc956,_0x123372){return new bt(_0x3bc956,_0x123372);}['setPermissions'](_0x11ed2f,_0x4b4333=ii){this['_permissions']['set'](_0x4b4333,_0x11ed2f),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x22de91=ii){return this['_permissions']['has'](_0x22de91)?this['_permissions']['get'](_0x22de91):ei;}['_addCommentThread']({channelId:_0x5f0ab0,threadId:_0x40c375,comments:_0x1fc163,unlinkedAt:_0x25931d,resolvedAt:_0x40761a,resolvedBy:_0x22b63d,target:_0x3b1411,context:_0xc66627,attributes:_0x24b47e,isFromAdapter:_0x1f417c,isResolvable:_0x256b1b,isSubmitted:_0x5aa50c}){if('string'!=typeof _0x40c375)throw new _0x3973a7('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x40c375});if(this['hasCommentThread'](_0x40c375))throw new _0x3973a7('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x40c375});const _0x21a972=new ri(this,{'channelId':_0x5f0ab0,'id':_0x40c375,'context':_0xc66627,'attributes':_0x24b47e,'unlinkedAt':_0x25931d,'resolvedAt':_0x40761a,'resolvedBy':_0x22b63d?this['context']['plugins']['get'](_0x29eb39)['getUser'](_0x22b63d):null,'isResolvable':_0x256b1b,'isSubmitted':_0x5aa50c||_0x1f417c});this['_threads']['set'](_0x40c375,_0x21a972);for(const _0x1b9f18 of _0x1fc163)_0x21a972['_add'](this['_createNewComment']({'threadId':_0x40c375,..._0x1b9f18}));return _0x3b1411&&_0x21a972['attachTo'](_0x3b1411),_0x1f417c||!_0x21a972['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x5f0ab0,'threadId':_0x40c375});}['_submitCommentThread']({channelId:_0xa71acf,threadId:_0x40202b}){if(!this['hasCommentThread'](_0x40202b))throw new _0x3973a7('commentsrepository-missing-comment-thread',this);const _0x2e093d=this['getCommentThread'](_0x40202b);if(_0x2e093d['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x2f5214,comments:_0x6faac,resolvedAt:_0x19aa26,resolvedBy:_0x56fd1b,context:_0x2151b4,attributes:_0x43a8fe}=_0x2e093d,_0x4f1647=this['context']['plugins']['get']('PendingActions'),_0x23dbe6=_0x4f1647['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0xa71acf,'threadId':_0x2f5214,'comments':_0x6faac['map'](_0x1869a1=>_0x1869a1['toJSON']()),'resolvedAt':_0x19aa26,'resolvedBy':_0x56fd1b?_0x56fd1b['id']:_0x56fd1b,'context':_0x2151b4,'attributes':_0x43a8fe})['then'](({comments:_0x4ac47f})=>{_0x4f1647['remove'](_0x23dbe6);for(const _0x248d6f of _0x4ac47f)this['_updateComment']({'channelId':_0xa71acf,'threadId':_0x40202b,'commentId':_0x248d6f['commentId'],'createdAt':_0x248d6f['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x215a02=>{throw console['error'](_0x215a02),new _0x3973a7('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x4f6e78,target:_0x1314ba}){const _0x1b0f8e=this['getCommentThread'](_0x4f6e78);if(!_0x1b0f8e)throw new _0x3973a7('commentsrepository-attach-missing-comment-thread',this);const _0x75edfb=this['context']['plugins']['get']('PendingActions'),_0x435146=this['context']['plugins']['get'](ti),_0x4c597d=this['_createCommentThreadView'](_0x1b0f8e),_0x3183c9=new bt(_0x1b0f8e,_0x4c597d);let _0x3ca647=null;_0x4c597d['on']('change:isDirty',(_0x147550,_0x13084f,_0x1d690b)=>{_0x1d690b?_0x3ca647=_0x75edfb['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x3ca647&&(_0x75edfb['remove'](_0x3ca647),_0x3ca647=null);}),this['_threadToController']['set'](_0x1b0f8e,_0x3183c9),this['_viewToController']['set'](_0x4c597d,_0x3183c9);const _0x452661=new qt(this['context']['locale'],_0x4c597d);_0x452661['bind']('length')['to'](_0x4c597d),_0x452661['bind']('isDirty')['to'](_0x4c597d,'isDirty',_0x4c597d,'length',(_0x26b1b6,_0x50974b)=>_0x26b1b6||!_0x50974b),_0x452661['bind']('isActive')['to'](_0x4c597d),_0x452661['type']='comment';const _0x49f247=new $t({'view':_0x452661,'target':_0x1314ba,'type':'comment','isVisible':!_0x1b0f8e['archivedAt']&&!!('function'==typeof _0x1314ba?_0x1314ba():_0x1314ba)});return _0x4c597d['on']('escape',()=>{_0x49f247['fire']('escape');}),this['_bindAnnotationToEditors'](_0x4c597d,_0x49f247),_0x435146['add'](_0x49f247),_0x49f247;}['_bindAnnotationToEditors'](_0x2c7b9e,_0x1d6ab5){this['listenTo'](_0x2c7b9e,'editorReady',(_0x1e2f29,_0x30a3ee)=>{const _0x38208a=_0x30a3ee['ui']['view']['body']['bodyCollectionContainer'];_0x1d6ab5['focusableElements']['add'](_0x38208a),this['context']instanceof _0x3c4137&&this['context']['ui']['focusTracker']['add'](_0x38208a);},{'priority':'highest'}),this['listenTo'](_0x2c7b9e,'editorDestroyed',(_0x22a16a,_0x424b6c)=>{const _0x12e114=_0x424b6c['ui']['view']['body']['bodyCollectionContainer'];_0x1d6ab5['focusableElements']['has'](_0x12e114)&&_0x1d6ab5['focusableElements']['remove'](_0x12e114),this['context']instanceof _0x3c4137&&this['context']['ui']['focusTracker']['remove'](_0x12e114);});}['_unbindEditors'](_0x291a89){this['stopListening'](_0x291a89,'editorReady'),this['stopListening'](_0x291a89,'editorDestroyed');}['_createCommentThreadView'](_0x3c5edc){const _0x287141=this['context']['plugins']['get'](_0x29eb39),{config:_0x4174ba,locale:_0x33fb35}=this['context'],_0x3fa20a=_0x120c49(_0x4174ba['get']('locale'),_0x33fb35);return new(0x0,(_0x4174ba['get']('comments'))['CommentThreadView'])(_0x33fb35,_0x3c5edc,_0x287141['me'],{'editorConfig':{..._0x4174ba['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x4174ba['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x4174ba['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x4174ba['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x4174ba['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x3fa20a,'CommentView':_0x4174ba['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x50608f,channelId:_0x2f34b4,resolvedAt:_0x341d7c,resolvedBy:_0x3d27de,isFromAdapter:_0x2ced30}){if(!this['hasCommentThread'](_0x50608f))throw new _0x3973a7('commentsrepository-missing-comment-thread',null,{'threadId':_0x50608f});const _0x2b0fa0=this['getCommentThread'](_0x50608f);if(_0x2b0fa0['isResolved'])throw new _0x3973a7('commentsrepository-resolved-comment-thread',null,{'threadId':_0x50608f});const _0x18d694=this['context']['plugins']['get'](_0x29eb39);if(_0x2b0fa0['resolvedBy']=_0x18d694['getUser'](_0x3d27de),_0x2b0fa0['resolvedAt']=_0x341d7c,_0x2ced30||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x480de8=this['context']['plugins']['get']('PendingActions'),_0x53701c=_0x480de8['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x2f34b4,'threadId':_0x50608f})['then'](({resolvedAt:_0x5453c8,resolvedBy:_0x1978b6})=>{_0x480de8['remove'](_0x53701c),_0x2b0fa0['resolvedBy']['id']!==_0x1978b6&&(_0x2b0fa0['resolvedBy']=_0x18d694['getUser'](_0x1978b6)),_0x2b0fa0['resolvedAt']=_0x5453c8;})['catch'](_0x222640=>{throw console['error'](_0x222640),new _0x3973a7('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x218867,channelId:_0x59dea9,isFromAdapter:_0x1c959a}){if(!this['hasCommentThread'](_0x218867))throw new _0x3973a7('commentsrepository-missing-comment-thread',null,{'threadId':_0x218867});const _0x139042=this['getCommentThread'](_0x218867);if(!_0x139042['isResolved'])throw new _0x3973a7('commentsrepository-reopen-comment-thread',null,{'threadId':_0x218867});if(_0x139042['resolvedBy']=null,_0x139042['resolvedAt']=null,_0x1c959a||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x4fd6ba=this['context']['plugins']['get']('PendingActions'),_0xab7686=_0x4fd6ba['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x59dea9,'threadId':_0x218867})['then'](()=>_0x4fd6ba['remove'](_0xab7686))['catch'](_0x1dfe4c=>{throw console['error'](_0x1dfe4c),new _0x3973a7('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x13cda2,isFromAdapter:_0x98a159}){const _0x113d82=this['getCommentThread'](_0x13cda2);if(!_0x113d82)throw new _0x3973a7('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x13cda2),this['_threads']['delete'](_0x13cda2),!_0x113d82['isSubmitted']||_0x98a159||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x563c52=this['context']['plugins']['get']('PendingActions'),{channelId:_0x346830}=_0x113d82,_0x524b77=_0x563c52['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x346830,'threadId':_0x13cda2})['then'](()=>_0x563c52['remove'](_0x524b77))['catch'](_0x40fe54=>{throw console['error'](_0x40fe54),new _0x3973a7('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x3c06d6,unlinkedAt:_0x5ec88e,context:_0x585dc8,attributes:_0x9ec9f5,isFromAdapter:_0x21db14}){if('string'!=typeof _0x3c06d6)throw new _0x3973a7('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x3c06d6});if(!this['hasCommentThread'](_0x3c06d6))throw new _0x3973a7('commentsrepository-missing-comment-thread',null,{'threadId':_0x3c06d6});const _0x5b1860=this['getCommentThread'](_0x3c06d6);let _0x140f96=!0x1;if(void 0x0!==_0x585dc8&&_0x5b1860['context']!==_0x585dc8&&(_0x5b1860['context']=_0x585dc8,_0x140f96=!0x0),void 0x0!==_0x5ec88e&&_0x5b1860['unlinkedAt']!==_0x5ec88e&&(_0x5b1860['unlinkedAt']=_0x5ec88e,_0x140f96=!0x0),_0x9ec9f5&&!_0x3a45f3(_0x9ec9f5,_0x5b1860['attributes'])&&(_0x5b1860['attributes']=_0x9ec9f5,_0x140f96=!0x0),!_0x140f96)return Promise['resolve']();if(!_0x5b1860['isSubmitted']||_0x21db14||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x286b91=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2df400}=_0x5b1860,_0x217f1d=_0x286b91['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x2df400,'threadId':_0x3c06d6,'context':_0x585dc8,'unlinkedAt':_0x5ec88e,'attributes':_0x9ec9f5})['then'](()=>_0x286b91['remove'](_0x217f1d))['catch'](_0x41c863=>{throw console['error'](_0x41c863),new _0x3973a7('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x33d949){const _0xfc9d35=this['context']['plugins']['get'](ti),_0x25db5e=this['getCommentThread'](_0x33d949);if(_0x25db5e['_isAttached']=!0x1,this['_threadToController']['has'](_0x25db5e)){const _0x2f8f66=this['_threadToController']['get'](_0x25db5e),_0x2fdaf4=_0x2f8f66['view'],_0x27c365=_0xfc9d35['getByInnerView'](_0x2fdaf4);this['_threadToController']['delete'](_0x25db5e),this['_viewToController']['delete'](_0x2fdaf4),_0x27c365&&_0xfc9d35['remove'](_0x27c365),_0x2f8f66['destroy'](),_0x2fdaf4['destroy']()['then'](()=>{this['_unbindEditors'](_0x2fdaf4);});}}['_updateActiveAnnotation']({threadId:_0x2a0c6d,resolvedAt:_0x3d14bf,unlinkedAt:_0x35a338}){const _0x148c69=!!_0x3d14bf,_0x233dde=this['context']['plugins']['get'](ti),_0x4f8424=this['getCommentThread'](_0x2a0c6d);if(this['_threadToController']['has'](_0x4f8424)){const _0x53308e=this['_threadToController']['get'](_0x4f8424)['view'],_0x57459b=_0x233dde['getByInnerView'](_0x53308e);_0x57459b&&(_0x148c69&&_0x233dde['_removeActiveAnnotation'](_0x57459b),_0x35a338?_0x57459b['isVisible']=!0x1:_0x57459b['refreshVisibility']());}}['_getExternalAuthor'](_0x41d4ac){const _0x5c993f=this['context']['plugins']['get'](_0x29eb39),_0x13bd80=_0x191b3b('external:'+_0x41d4ac),_0x518f00=_0x5c993f['getUser'](_0x13bd80);return _0x518f00||_0x5c993f['addUser']({'id':_0x13bd80,'name':_0x41d4ac});}['_createNewComment']({threadId:_0x1c05e3,commentId:_0x11ed8a=_0x228023(),content:_0x3292b5,authorId:_0x5cb21a,createdAt:_0x1ae0a2,attributes:_0x447f6e}){if('string'!=typeof _0x11ed8a)throw new _0x3973a7('commentsrepository-invalid-commentid');if('string'!=typeof _0x5cb21a)throw new _0x3973a7('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x3292b5||!_0x3292b5['trim']())throw new _0x3973a7('commentsrepository-invalid-comment-content');const _0x1ede43=this['context']['plugins']['get'](_0x29eb39)['getUser'](_0x5cb21a);if(!_0x1ede43)throw new _0x3973a7('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x5cb21a});let _0x1a0cc9=null,_0x3edbfe=_0x1ae0a2;return _0x447f6e?.['@external']&&(_0x1a0cc9=this['_getExternalAuthor'](_0x447f6e['@external']['authorName']),_0x3edbfe=new Date(_0x447f6e['@external']['createdAt'])),new hi(this,{'threadId':_0x1c05e3,'id':_0x11ed8a,'author':_0x1a0cc9||_0x1ede43,'creator':_0x1ede43,'content':_0x3292b5,'createdAt':_0x1ae0a2,'authoredAt':_0x3edbfe,'attributes':_0x447f6e});}['_addComment'](_0x2733bc){let {threadId:_0xc78b3b,content:_0x2758e8,attributes:_0x24d543,isFromAdapter:_0x159aaa}=_0x2733bc;const _0x8b38fa=this['getCommentThread'](_0x2733bc['threadId']);if(!_0x8b38fa)throw new _0x3973a7('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x2cf414=this['_createNewComment'](_0x2733bc),{id:_0x44c5d0}=_0x2cf414;if(_0x8b38fa['_add'](_0x2cf414),_0x159aaa||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x8b38fa['isSubmitted'])return Promise['resolve']();const _0x5410fb=this['context']['plugins']['get']('PendingActions'),{channelId:_0x524730}=_0x8b38fa,_0x522738=_0x5410fb['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x24d543||(_0x24d543={}),this['adapter']['addComment']({'channelId':_0x524730,'threadId':_0xc78b3b,'commentId':_0x44c5d0,'content':_0x2758e8,'attributes':_0x24d543})['then'](_0xcf835f=>{_0x5410fb['remove'](_0x522738),_0xcf835f&&this['_updateComment']({'channelId':_0x524730,'threadId':_0xc78b3b,'commentId':_0x44c5d0,'createdAt':_0xcf835f['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x53903f=>{throw console['error'](_0x53903f),new _0x3973a7('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x3d7129,commentId:_0x154b1b,content:_0x237be2,createdAt:_0x4a449d,attributes:_0x296459,isFromAdapter:_0x8c8b89}){if(void 0x0!==_0x237be2&&('string'!=typeof _0x237be2||!_0x237be2['trim']()['length']))throw new _0x3973a7('commentsrepository-update-comment-invalid-content');const _0x51aae2=this['getCommentThread'](_0x3d7129),_0x2ae94a=_0x51aae2['getComment'](_0x154b1b);if(!_0x2ae94a)throw new _0x3973a7('commentsrepository-update-missing-comment',this);let _0x514229=!0x1;if(_0x237be2&&_0x237be2!==_0x2ae94a['content']&&(_0x2ae94a['isEditable']||_0x8c8b89)&&(_0x2ae94a['content']=_0x237be2,_0x514229=!0x0),_0x4a449d&&_0x4a449d!==_0x2ae94a['createdAt']&&(_0x2ae94a['createdAt']=_0x4a449d,_0x2ae94a['isExternal']||(_0x2ae94a['authoredAt']=_0x4a449d),_0x514229=!0x0),_0x296459&&!_0x3a45f3(_0x296459,_0x2ae94a['attributes'])&&(_0x2ae94a['attributes']=_0x296459,_0x514229=!0x0),!_0x514229)return Promise['resolve']();if(_0x51aae2['fire']('commentUpdated'),_0x8c8b89||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x37f0dd=this['context']['plugins']['get']('PendingActions'),{channelId:_0x202ab3}=this['getCommentThread'](_0x2ae94a['threadId']),_0x398a38=_0x37f0dd['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x202ab3,'threadId':_0x3d7129,'commentId':_0x154b1b,'content':_0x237be2,'attributes':_0x296459})['then'](()=>_0x37f0dd['remove'](_0x398a38))['catch'](_0x4747fe=>{throw console['error'](_0x4747fe),new _0x3973a7('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x3379c6,commentId:_0x1b69af,isFromAdapter:_0x319eb7}){const _0x3354cb=this['getCommentThread'](_0x3379c6),_0x574b2e=_0x3354cb['getComment'](_0x1b69af);if(!_0x574b2e)throw new _0x3973a7('commentsrepository-remove-missing-comment',this);if(_0x3354cb['_remove'](_0x574b2e),_0x319eb7||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x5adb41=this['context']['plugins']['get']('PendingActions'),{channelId:_0x30239c}=_0x3354cb,_0x4d640f=_0x5adb41['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x30239c,'threadId':_0x3379c6,'commentId':_0x1b69af})['then'](()=>_0x5adb41['remove'](_0x4d640f))['catch'](_0x3f7752=>{throw console['error'](_0x3f7752),new _0x3973a7('commentsrepository-remove-comment-internal-error',this);});}},ri=class extends si{['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x2e47d9,_0x556baf){super();const _0x17942b=_0x556baf['isResolvable'];this['channelId']=_0x556baf['channelId'],this['id']=_0x556baf['id'],this['comments']=new _0x55d760(),this['_repository']=_0x2e47d9,this['_isAttached']=!0x1,this['_isSubmitted']=_0x556baf['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x2e47d9,'_permissions',_0x2e47d9,'_readOnlyChannels',()=>_0x2e47d9['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x2e47d9,'_permissions',()=>_0x2e47d9['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x2e47d9,'_permissions',()=>{const _0x1cc8ce=_0x2e47d9['getPermissions'](this['channelId']);return _0x1cc8ce['write']||_0x1cc8ce['admin'];}),this['bind']('isResolvable')['to'](_0x2e47d9,'_permissions',()=>_0x17942b&&_0x2e47d9['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x556baf['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x5f5db3,_0x3bc357)=>_0x5f5db3?_0x3bc357?_0x5f5db3<_0x3bc357?_0x5f5db3:_0x3bc357:_0x5f5db3:_0x3bc357),this['set']('unlinkedAt',_0x556baf['unlinkedAt']||null),this['set']('resolvedAt',_0x556baf['resolvedAt']||null),this['set']('resolvedBy',_0x556baf['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x1fa938=>!!_0x1fa938),this['set']('attributes',_0x556baf['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0xc85afd,_0x3c1bfc)=>_0xc85afd+_0x3c1bfc['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x5c685d,id:_0xd51693}=this;this['_repository']['fire'](ai('submitCommentThread',_0x5c685d),{'channelId':_0x5c685d,'threadId':_0xd51693});}['setUnlinkedAt'](_0x5a491d){this['_update']({'unlinkedAt':_0x5a491d});}['resolve']({resolvedAt:_0x5afb52=new Date(),resolvedBy:_0x5d2f60='',isFromAdapter:_0x31018b=!0x1}={}){const _0x4d1923=this['_repository']['context']['plugins']['get'](_0x29eb39)['me'],{channelId:_0x4d9141,id:_0x2889c0}=this;this['_repository']['fire'](ai('resolveCommentThread',_0x4d9141),{'channelId':_0x4d9141,'threadId':_0x2889c0,'resolvedAt':_0x5afb52,'resolvedBy':_0x5d2f60||_0x4d1923['id'],'isFromAdapter':_0x31018b});}['reopen']({isFromAdapter:_0x486042=!0x1}={}){const {channelId:_0x3cd7d8,id:_0x42fdae}=this;this['_repository']['fire'](ai('reopenCommentThread',_0x3cd7d8),{'channelId':_0x3cd7d8,'threadId':_0x42fdae,'isFromAdapter':_0x486042});}['setContext'](_0xbcecb8){this['context']||this['_update']({'context':_0xbcecb8});}['setAttribute'](_0x33b216,_0x58a8cc){const _0x141610=_0x3bbce8(this['attributes']);_0x1c2903(_0x141610,_0x33b216,_0x58a8cc),this['_update']({'attributes':_0x141610});}['removeAttribute'](_0x4f09da){const _0x2985da=_0x3bbce8(this['attributes']);_0x4899cc(_0x2985da,_0x4f09da),this['_update']({'attributes':_0x2985da});}['remove']({isFromAdapter:_0x4432c8=!0x1}={}){const {channelId:_0x12f726,id:_0x317a60}=this;this['_repository']['fire'](ai('removeCommentThread',_0x12f726),{'channelId':_0x12f726,'threadId':_0x317a60,'isFromAdapter':_0x4432c8});}['attachTo'](_0x435176){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x435176});}['addComment'](_0x1861c4){const {channelId:_0x56738e,id:_0x31f7ef}=this;this['_repository']['fire'](ai('addComment',_0x56738e,_0x31f7ef),Object['assign']({'channelId':_0x56738e,'threadId':_0x31f7ef},_0x1861c4));}['getComment'](_0x6a9043){if('string'!=typeof _0x6a9043)throw new _0x3973a7('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x6a9043});return this['comments']['get'](_0x6a9043);}['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'](_0x2f4cc7=>_0x2f4cc7['toJSON']()),'attributes':this['attributes']};}['_add'](_0x12089d){return this['listenTo'](_0x12089d,'change:authoredAt',()=>{const _0x52bf76=this['_findOptimalIndex'](_0x12089d),_0x1175a5=this['comments'];_0x52bf76-0x1!=_0x1175a5['getIndex'](_0x12089d)&&_0x52bf76+0x1!=_0x1175a5['getIndex'](_0x12089d)&&(this['_remove'](_0x12089d),this['_add'](_0x12089d));}),this['comments']['add'](_0x12089d,this['_findOptimalIndex'](_0x12089d));}['_update'](_0x5c1dc8){const {channelId:_0x3a5346,id:_0x90df5a}=this;this['_repository']['fire'](ai('updateCommentThread',_0x3a5346),{..._0x5c1dc8,'channelId':_0x3a5346,'threadId':_0x90df5a});}['_remove'](_0x56c889){return this['stopListening'](_0x56c889),_0x56c889['destroy'](),this['comments']['remove'](_0x56c889);}['_findOptimalIndex'](_0x1da091){const _0x7f9742=this['comments']['find'](_0x2f5487=>new Date(_0x2f5487['authoredAt'])['getTime']()>new Date(_0x1da091['authoredAt'])['getTime']());return _0x7f9742?this['comments']['getIndex'](_0x7f9742):this['length'];}},hi=class extends ni{['id'];['threadId'];['author'];['creator'];['createdAt'];['_repository'];constructor(_0x258c66,_0x3d69c4){super();const _0x1bbca0=_0x258c66['context']['plugins']['get'](_0x29eb39)['me'],_0x5b13b0=_0x258c66['getCommentThread'](_0x3d69c4['threadId']),_0x54379b=0x0===_0x5b13b0['comments']['length'],_0x26593f=_0x1bbca0===_0x3d69c4['author'];this['id']=_0x3d69c4['id'],this['threadId']=_0x3d69c4['threadId'],this['author']=_0x3d69c4['author'],this['creator']=_0x3d69c4['creator'],this['set']('content',_0x3d69c4['content']),this['createdAt']=_0x3d69c4['createdAt']||new Date(),this['set']('authoredAt',_0x3d69c4['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x5b13b0,'resolvedAt'),this['set']('attributes',_0x3d69c4['attributes']||{}),this['bind']('isEditable')['to'](_0x258c66,'_permissions',()=>{const _0x1db467=_0x258c66['getPermissions'](_0x5b13b0['channelId'])['write'],_0x18a054=_0x258c66['getPermissions'](_0x5b13b0['channelId'])['modifyAll'];return _0x26593f&&_0x1db467||!_0x26593f&&_0x18a054;}),this['bind']('isRemovable')['to'](_0x5b13b0,'isRemovable',_0x258c66,'_permissions',_0x3c827c=>{const _0xaeac37=_0x258c66['getPermissions'](_0x5b13b0['channelId'])['write'],_0xe109a4=_0x258c66['getPermissions'](_0x5b13b0['channelId'])['modifyAll'];return _0x26593f&&_0xaeac37||_0x3c827c&&_0x54379b||!_0x26593f&&_0xe109a4&&!_0x54379b;}),this['bind']('isReadOnly')['to'](_0x5b13b0,'isReadOnly'),this['_repository']=_0x258c66;}get['isExternal'](){return Boolean(this['attributes']&&this['attributes']['@external']);}get['weight'](){return Math['max'](function(_0x1297d1){const _0x57a809=document['createElement']('div');return _0x57a809['innerHTML']=_0x1297d1,_0x57a809['textContent']['length'];}(this['content']),0xc8);}['update'](_0x3c63d4){const {threadId:_0x1865d2,id:_0x360c67}=this;if(!this['_repository']['hasCommentThread'](_0x1865d2))throw new _0x3973a7('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x23f2d3}=this['_repository']['getCommentThread'](_0x1865d2);this['_repository']['fire'](ai('updateComment',_0x23f2d3,_0x1865d2),{'channelId':_0x23f2d3,'threadId':_0x1865d2,'commentId':_0x360c67,..._0x3c63d4});}['setAttribute'](_0x4cc897,_0x2491a4){const _0x4d2f92=_0x3bbce8(this['attributes']);_0x1c2903(_0x4d2f92,_0x4cc897,_0x2491a4),this['update']({'attributes':_0x4d2f92});}['removeAttribute'](_0x320bea){const _0x29e55a=_0x3bbce8(this['attributes']);_0x4899cc(_0x29e55a,_0x320bea),this['update']({'attributes':_0x29e55a});}['remove'](_0x42c0a3={}){if(!_0x42c0a3['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x1339b1,id:_0x4dba15}=this;if(!this['_repository']['hasCommentThread'](_0x1339b1))throw new _0x3973a7('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x5912bc}=this['_repository']['getCommentThread'](_0x1339b1);this['_repository']['fire'](ai('removeComment',_0x5912bc,_0x1339b1),{'channelId':_0x5912bc,'threadId':_0x1339b1,'commentId':_0x4dba15,..._0x42c0a3});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}};function ai(_0x2a9096,..._0x3cc62b){for(const _0x5e902c of _0x3cc62b)void 0x0!==_0x5e902c&&(_0x2a9096+=':'+String(_0x5e902c));return _0x2a9096;}var ci=class extends _0x25fd83{constructor(_0x1deb36){super(_0x1deb36),this['set']('hasContent',!0x1);}['refresh'](){const _0x21014b=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x1bc33e of _0x21014b['getRanges']())if(this['_hasContent'](_0x1bc33e))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x309e39=_0x228023(),ranges:_0x1d6a25,comment:_0x209604}={}){const _0x342c76=this['editor']['model'],_0x82f962=_0x1d6a25??Array['from'](_0x342c76['document']['selection']['getRanges']()),_0x50b929=[];for(const _0x307388 of _0x82f962)this['_hasContent'](_0x307388)&&_0x50b929['push'](this['_trimToContent'](_0x307388));if(!_0x50b929['length'])throw new _0x3973a7('addcommentthreadcommand-incorrect-ranges',null);_0x209604&&this['_createCommentThread'](_0x309e39,_0x209604),this['_createMarkersFromRanges'](_0x309e39,_0x50b929,!!_0x209604);}['_createMarkersFromRanges'](_0x2fa52e,_0x40f117,_0x12e0e1){this['editor']['model']['change'](_0x28c973=>{for(const _0x51fe6a of _0x40f117){const _0x36ccbd='comment:'+_0x2fa52e+':'+_0x228023()['substr'](0x1,0x5);_0x28c973['addMarker'](_0x36ccbd,{'range':_0x51fe6a,'usingOperation':_0x12e0e1,'affectsData':_0x12e0e1});}});}['_createCommentThread'](_0x5c8042,_0x43a4b3){const _0x4bae5b=this['editor']['plugins']['get']('CommentsRepository'),_0x465311=this['editor']['config']['get']('collaboration.channelId'),_0x4e282c=this['editor']['plugins']['get']('Users')['me'];if(!_0x4e282c)throw new _0x3973a7('addcommentthreadcommand-user-not-found',null);_0x4bae5b['addCommentThread']({'threadId':_0x5c8042,'channelId':_0x465311,'comments':[{'authorId':_0x4e282c['id'],'content':_0x43a4b3,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x1aba4a){for(const _0x2b8e84 of _0x1aba4a['getItems']())if(this['_itemIsContent'](_0x2b8e84))return!0x0;return!0x1;}['_itemIsContent'](_0x302ab7){return _0x302ab7['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x302ab7)&&!_0x302ab7['is']('element','tableCell');}['_trimToContent'](_0x481332){const _0x1dbe04=_0x5af515=>!this['_itemIsContent'](_0x5af515['item']),_0x3f13f4=_0x481332['start']['getLastMatchingPosition'](_0x1dbe04),_0x44b39e=_0x481332['end']['getLastMatchingPosition'](_0x1dbe04,{'direction':'backward'});return this['editor']['model']['createRange'](_0x3f13f4,_0x44b39e);}},di=class extends _0x580aef{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[ti];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xad3598){super(_0xad3598),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x14a158=this['editor'],_0x35070d=_0x14a158['model']['document']['selection'],_0xfb2df7=_0x488046(()=>this['refreshSelectedViews'](),0xa);_0x35070d['on']('change:range',(_0x259b4c,_0x53bb53)=>{_0x53bb53['directChange']&&(_0xfb2df7['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x14a158['editing']['view']['document'],'change:isFocused',(_0x2968f8,_0x1607a0,_0x34e9aa)=>{_0x34e9aa&&_0xfb2df7();}),this['listenTo'](_0x14a158['ui']['focusTracker'],'change:isFocused',(_0x2ece4f,_0x395b23,_0x290315)=>{_0x290315||this['fire']('blur',{'isAnnotationTracked':_0x2b7a23=>this['_editorAnnotationsData']['has'](_0x2b7a23['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x32b8f6){if(this['_editorAnnotations']['has'](_0x32b8f6['view']))return;this['_editorAnnotations']['add'](_0x32b8f6['view']),this['editor']['ui']['focusTracker']['add'](_0x32b8f6['view']['element']);const _0x44eda7=this['editor']['plugins']['get'](ti);this['listenTo'](_0x44eda7['collection'],'remove',(_0x274b90,_0xefc0fc)=>{this['editor']['ui']['focusTracker']['remove'](_0xefc0fc['view']['element']),this['_editorAnnotations']['delete'](_0xefc0fc['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x10cb26){if('function'!=typeof _0x10cb26)throw new _0x3973a7('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x10cb26);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x426a89,annotations:_0x393c2c}){const _0x52aefb=[],_0x16c83a=this['editor']['model']['document']['selection'],_0x365037=Array['from'](_0x16c83a['getRanges']());for(const [_0x3b5712,_0x5e2a0e]of this['_editorAnnotationsData']){const _0x501bfa=_0x2043df(_0x5e2a0e),_0x7d239a=_0x393c2c['getByInnerView'](_0x3b5712);_0x501bfa&&_0x7d239a&&_0x52aefb['push']({'annotation':_0x7d239a,'range':_0x501bfa});}function _0x2043df(_0x11d8fe){for(const _0x1981ae of _0x11d8fe)for(const _0xa12117 of _0x365037)if(_0x1981ae['containsRange'](_0xa12117,!_0x16c83a['isCollapsed']))return _0x1981ae;return null;}return _0x52aefb['sort']((_0x1180bf,_0x543fcf)=>{const _0x33fd77=_0x1180bf['range'],_0x4a062b=_0x543fcf['range'];if(!_0x33fd77['isEqual'](_0x4a062b)){if(_0x33fd77['containsRange'](_0x4a062b,!0x0))return 0x1;if(_0x4a062b['containsRange'](_0x33fd77,!0x0))return-0x1;}return _0x1180bf['annotation']==_0x426a89?-0x1:_0x543fcf['annotation']==_0x426a89?0x1:0x0;})['map'](_0x19beca=>_0x19beca['annotation']);}get['_editorAnnotationsData'](){const _0x57444f=new Map();for(const _0x25d508 of Array['from'](this['_dataCollectors']))for(const [_0x45a707,_0x24d2de]of _0x25d508())_0x57444f['set'](_0x45a707,_0x24d2de);return _0x57444f;}},li=class extends _0x580aef{['afterInit'](){const _0x459262=this['editor'];_0x459262['plugins']['has']('RestrictedEditingModeEditing')&&_0x459262['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},mi=class extends _0x580aef{constructor(_0x51307c){super(_0x51307c),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x2948a0=this['editor'],_0xc0d08c=_0x2948a0['commands']['get']('importWord'),_0x2a4bd2=_0x2948a0['plugins']['get'](_0x29eb39);_0xc0d08c&&(_0xc0d08c['on']('execute',(_0x4614cc,[,_0x21b80a])=>{_0x21b80a['collaboration_features']={'comments':!0x0,'user_id':_0x2a4bd2['me']['id']};},{'priority':_0x454ece['high']+0xa}),this['listenTo'](_0xc0d08c,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x3b0bbf,_0x5e0ffc){const {comment_threads:_0x285700}=_0x5e0ffc;_0x285700&&_0x285700['forEach'](({thread_id:_0x31e578,comments:_0x19aab4,is_resolved:_0x1fff39})=>{const _0x239045=new Date(),_0x14dc9c=_0x19aab4['map'](({author:_0x213655,content:_0x4bb0e3,created_at:_0x326086})=>({'content':_0x4bb0e3,'authorId':this['editor']['plugins']['get'](_0x29eb39)['me']['id'],'createdAt':_0x239045,'attributes':{'@external':{'authorName':_0x213655,'createdAt':_0x326086?new Date(_0x326086):new Date(),'source':'importWord'}}})),_0x246749=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](oi)['addCommentThread']({'channelId':_0x246749,'threadId':_0x31e578,'comments':_0x14dc9c,'resolvedAt':_0x1fff39?_0x239045:null});});}},ui=class extends _0x580aef{constructor(_0x57fcba){super(_0x57fcba),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0x4c8d37=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x4c8d37,'contentInsertion',(_0x54f1f2,_0x412b32)=>this['_removeMarkersWithoutThreads'](_0x412b32['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x408f61){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x408f61;const _0x48c0a2=this['editor']['plugins']['get']('CommentsRepository');for(const _0x5a0b11 of _0x408f61['keys']()){const [_0x57e3ec,_0x30de25]=_0x5a0b11['split'](':');'comment'!=_0x57e3ec||_0x48c0a2['hasCommentThread'](_0x30de25)||_0x408f61['delete'](_0x5a0b11);}return _0x408f61;}['_registerMarkerInClipboardPipeline'](){const _0x1e62ec=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x5971db=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x5971db&&_0x1e62ec['_registerMarkerToCopy']('comment',_0x5971db);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x3bc4b9){switch(_0x3bc4b9){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function fi(_0xb20474){const _0x1a9cf9=_0xb20474['split'](':');return{'group':_0x1a9cf9[0x0],'id':_0x1a9cf9[0x1],'part':_0x1a9cf9[0x2]};}var pi=class extends _0x580aef{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x481d3d,_0x390c97)=>{if(!_0x390c97['options']['showCommentHighlights'])return null;if(_0x390c97['options']['ignoreResolvedComments']){const {id:_0x248160}=fi(_0x481d3d['markerName']);if(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x248160)?.['isResolved']&&_0x481d3d['item'])return _0x390c97['consumable']['consume'](_0x481d3d['item'],'addMarker:'+_0x481d3d['markerName']),_0x390c97['consumable']['consume'](_0x481d3d['item'],'removeMarker:'+_0x481d3d['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x19b2f7=>{_0x19b2f7['on']('addMarker:comment',(_0x1b6bc6,_0x569ea3,_0x2d034f)=>{if(!_0x2d034f['options']['showCommentHighlights'])return;const _0x5a877e=_0x569ea3['item'];if(!_0x5a877e)return;const _0x3f1695=_0x2d034f['mapper']['toViewElement'](_0x5a877e);this['editor']['model']['schema']['isObject'](_0x5a877e)&&_0x3f1695&&!_0x3f1695['getCustomProperty']('widget')&&_0x3f1695['is']('containerElement')&&Ct(_0x3f1695,_0x2d034f['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x4efbdc,{writer:_0x466e20,options:_0x45a58d})=>{if(!_0x45a58d['showCommentHighlights'])return null;const _0x2c5cf7=_0x466e20['createContainerElement']('div'),_0x2bf859=_0x466e20['createEmptyElement']('hr');return _0x466e20['addClass']('ck-horizontal-line',_0x2c5cf7),_0x466e20['insert'](_0x466e20['createPositionAt'](_0x2c5cf7,0x0),_0x2bf859),_0x2c5cf7;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x3ab856,{writer:_0x29b7d9,options:_0xc7e717})=>{if(!_0xc7e717['showCommentHighlights'])return null;const _0x58b399=_0x29b7d9['createContainerElement']('span'),_0x3054ca=_0x29b7d9['createEmptyElement']('img');return _0x29b7d9['addClass']('image-inline',_0x58b399),_0x29b7d9['insert'](_0x29b7d9['createPositionAt'](_0x58b399,0x0),_0x3054ca),_0x58b399;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x190421,{writer:_0x4651d5,options:_0x8ad628})=>{if(_0x8ad628['showCommentHighlights'])return _0x4651d5['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x1c68b5,_0x3da35a,_0x36cbbd)=>{_0x36cbbd['options']['showCommentHighlights']&&_0x1c68b5['stop']();},{'priority':'high'});}},wi=class extends _0x580aef{static get['requires'](){return[oi,di,_0x29eb39,li,mi,ui,pi];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2d7218){super(_0x2d7218),this['set']('isThreadsLoadingPaused',!0x0),_0x2d7218['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x3c760e,_0x24333d,_0x5c3f52,_0x1da73f)=>{const _0x3c9858=_0x2d7218['plugins']['get'](oi),_0x571d9b=_0x5c3f52?fi(_0x5c3f52)['id']:null;_0x2d7218['model']['change'](()=>{if(_0x571d9b){const _0x14cdff=this['getAllMarkersForId'](_0x571d9b);for(const _0x31224d of _0x14cdff)_0x2d7218['editing']['reconvertMarker'](_0x31224d);}if(_0x1da73f){const {id:_0x4b3ead}=fi(_0x1da73f),_0x2c8da4=_0x3c9858['getCommentThread'](_0x4b3ead);if(_0x2c8da4&&_0x2c8da4['unlinkedAt'])return;if(_0x2c8da4&&!_0x2c8da4['isAttached'])return;const _0x21a2ea=this['getAllMarkersForId'](_0x4b3ead);for(const _0x49cc84 of _0x21a2ea)_0x2d7218['editing']['reconvertMarker'](_0x49cc84);}}),_0x571d9b&&this['scrollToThreadMarker'](_0x571d9b);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x2f8c10=this['editor'],_0x32d2f3=_0x2f8c10['plugins']['get'](oi),_0x30ef1b=_0x2f8c10['config']['get']('collaboration.channelId'),_0x30def9=_0x32d2f3['getCommentThreads']()['filter'](_0x41d47e=>_0x41d47e['channelId']!==_0x30ef1b);_0x2f8c10['commands']['add']('addCommentThread',new ci(_0x2f8c10)),this['listenTo'](_0x2f8c10,'change:isReadOnly',(_0x1b5491,_0x4dd554,_0x1f8b90)=>{_0x32d2f3['switchReadOnly'](_0x1f8b90,_0x2f8c10['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x32d2f3,gi('addCommentThread',_0x30ef1b),(_0x21f347,{threadId:_0x42f755})=>{this['editor']['plugins']['get'](oi)['getCommentThread'](_0x42f755)?.['unlinkedAt']&&this['_attachArchivedThread'](_0x42f755);}),this['listenTo'](_0x32d2f3,gi('removeCommentThread',_0x30ef1b),(_0x57cd01,{threadId:_0xe3cc8a})=>{_0x2f8c10['model']['enqueueChange']({'isUndoable':!0x1},_0x114a64=>{const _0x3b34a9=this['getAllMarkersForId'](_0xe3cc8a);for(const _0x4797cf of _0x3b34a9)_0x114a64['removeMarker'](_0x4797cf);});}),this['listenTo'](_0x32d2f3,gi('resolveCommentThread',_0x30ef1b),(_0x10ab4a,{threadId:_0x2a3c22})=>{this['_reconvertMarkers'](_0x2a3c22);const _0x573646=this['editor']['plugins']['get'](ti);(this['editor']['editing']['view']['hasDomSelection']||_0x573646['collection']['isFocused'])&&(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x2a3c22)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x32d2f3,gi('reopenCommentThread',_0x30ef1b),(_0x4def81,{threadId:_0x500f5f})=>{this['_reconvertMarkers'](_0x500f5f);},{'priority':'low'}),this['listenTo'](_0x32d2f3,gi('addComment',_0x30ef1b),(_0x3b4d72,{threadId:_0x210dfa,isFromAdapter:_0x4e65f0})=>{const _0x5183c7=this['getAllMarkersForId'](_0x210dfa);!_0x4e65f0&&0x0!=_0x5183c7['length']&&_0x32d2f3['hasCommentThread'](_0x210dfa)&&0x1===_0x32d2f3['getCommentThread'](_0x210dfa)['length']&&_0x2f8c10['model']['enqueueChange']({'isUndoable':!0x1},_0x47330e=>{for(const _0x4be70f of _0x5183c7)_0x47330e['updateMarker'](_0x4be70f,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x30def9);}['afterInit'](){!async function(_0x57c772){const _0x4581ac='KpOBJGNSEgqCyfVF1kZ8lbnRjM7eIzAsDQHw9aThu6rcYi05UmPL4d3X2Wotvx',_0x55865f=0x78e58,_0x3397e9=window['Date']['now'](),_0x807ae8=_0x57c772['editor'],_0x52bd34=new window['Promise'](_0x2413e7=>{_0x807ae8['once']('ready',_0x2413e7);}),_0x4e49e7={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x5e71d3=_0x807ae8['config']['get']('licenseKey');async function _0x5b0ea5(){let _0x441da0,_0x5aa7dc=null,_0x369b67=null;try{return'GPL'==_0x5e71d3?'NotAllowed':(_0x441da0=_0x4fcdf1(),_0x441da0?(_0x441da0['usageEndpoint']&&(_0x369b67=_0x57c05b(_0x441da0['usageEndpoint'],_0x441da0['jti'])),await _0x34584d()?_0x345fa1()?_0x1eb3f0()?'Expired':_0x2bcaf8()?('evaluation'==_0x441da0['licenseType']&&(_0x5aa7dc=_0x2ac3ff('EvaluationLimit')),await _0x282795()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x1eb3f0(){const _0x7284aa=['evaluation','trial']['includes'](_0x441da0['licenseType'])?_0x3397e9/0x3e8:0xe10*_0x55865f;return _0x441da0['exp']<_0x7284aa;}function _0x345fa1(){const _0x4982aa=_0x441da0['features'];if(!_0x4982aa)return!0x1;if(_0x4982aa['includes']('*'))return!0x0;if(_0x4982aa['includes']('CMT'))return!0x0;if(_0x4982aa['includes']('TRILIUM')&&_0x1cd196())return!0x0;if(_0x4982aa['includes']('RCMT')){if(_0x587ad3())return!0x0;if(_0x2b34b3()||_0x1b3953())return!0x0;}return!0x1;}function _0x2bcaf8(){const _0x7316e3=_0x441da0['licensedHosts'];if(!_0x7316e3||0x0==_0x7316e3['length'])return!0x0;const {hostname:_0x88ecb6}=new URL(window['location']['href']);if(_0x7316e3['includes'](_0x88ecb6))return!0x0;const _0x3ab719=_0x88ecb6['split']('.');return _0x7316e3['filter'](_0x1db525=>_0x1db525['includes']('*'))['map'](_0x19bbe2=>_0x19bbe2['split']('.'))['filter'](_0x53e09a=>_0x53e09a['length']<=_0x3ab719['length'])['map'](_0x508a28=>Array(_0x3ab719['length']-_0x508a28['length'])['fill']('*'===_0x508a28[0x0]?'*':'')['concat'](_0x508a28))['some'](_0x514c79=>_0x3ab719['every']((_0x349e38,_0x228e13)=>_0x514c79[_0x228e13]===_0x349e38||'*'===_0x514c79[_0x228e13]));}function _0x282795(){return _0x5aa7dc&&_0x369b67?new window['Promise']((_0x35afe0,_0x511825)=>{_0x5aa7dc['then'](_0x35afe0,_0x511825),_0x369b67['then'](_0xd75116=>{'Valid'!=_0xd75116&&_0x35afe0(_0xd75116);},_0x511825);}):_0x5aa7dc||_0x369b67||'Valid';}}function _0x57c05b(_0x5a4e93,_0x5144fb){return new window['Promise'](_0x5d5536=>{if(_0x397633())return _0x5d5536('Valid');_0x3a6023(),_0x807ae8['decorate']('_sendUsageRequest');let _0xf364f7=!0x1;const _0x2d0917=_0x228023();function _0x547d5e(_0xa61184){return!!_0xa61184&&('object'==typeof _0xa61184||'function'==typeof _0xa61184)&&'function'==typeof _0xa61184['then']&&'function'==typeof _0xa61184['catch'];}function _0x274598(_0x3c56cf){_0x302c84(_0x3c56cf)['then'](_0x3b3bef=>_0x3b3bef&&'ok'==_0x3b3bef['status']?_0x1510bb(_0xa29369(_0x2d0917+_0x5144fb))!=_0x3b3bef['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x547618=>(_0x358ef1(),_0x547618),()=>{const _0x404678=_0x3e36b9();return null==_0x404678?(_0x358ef1(),'Valid'):_0x3397e9-_0x404678>0x240c8400?'UsageLimit':'Valid';})['then'](_0x5d5536)['catch'](()=>{_0x5d5536('UsageLimit');});const _0x64a7ef=0x36ee80;function _0x358ef1(){const _0x11bd73='llct-'+_0x1510bb(_0xa29369(_0x5a4e93)),_0x46a05c=_0x443bbb(_0x1510bb(window['Math']['ceil'](_0x3397e9/_0x64a7ef)));window['localStorage']['setItem'](_0x11bd73,_0x46a05c);}function _0x3e36b9(){const _0xd74521='llct-'+_0x1510bb(_0xa29369(_0x5a4e93)),_0x58e6b4=window['localStorage']['getItem'](_0xd74521);return _0x58e6b4?window['parseInt'](_0x443bbb(_0x58e6b4),0x10)*_0x64a7ef:null;}function _0x302c84(_0x241efb){return new window['Promise']((_0x356643,_0x7699ce)=>{_0x241efb['then'](_0x356643,_0x7699ce),window['setTimeout'](_0x7699ce,0x1d4c0);});}}_0x807ae8['on']('_sendUsageRequest',(_0x47726d,_0xf7a26c)=>{if(_0xf7a26c[0x0]!=_0x5a4e93)return _0x5d5536('UsageLimit');_0xf7a26c[0x1]={..._0xf7a26c[0x1],'requestId':_0x2d0917};},{'priority':'high'}),_0x807ae8['on']('_sendUsageRequest',_0x1c5fca=>{_0x547d5e(_0x1c5fca['return'])&&(_0xf364f7=!0x0,_0x274598(_0x1c5fca['return']));},{'priority':'low'}),_0x52bd34['then'](()=>{_0xf364f7||_0x5d5536('UsageLimit');});});function _0x397633(){return'auto'==_0x807ae8['editing']['view']['_overlayModeHint'];}function _0x3a6023(){_0x807ae8['editing']['view']['_overlayModeHint']='auto';}}function _0x2ac3ff(_0x30af07){const _0x12460b=[new window['Promise'](_0x38d551=>setTimeout(_0x38d551,0x93ecc)),_0x52bd34['then'](()=>new window['Promise'](_0x5f1cda=>{let _0x402470=0x0;_0x807ae8['model']['on']('applyOperation',(_0x28fa73,_0x56562b)=>{_0x56562b[0x0]['isDocumentOperation']&&_0x402470++,0x5e8==_0x402470&&(_0x5f1cda(),_0x28fa73['off']());});}))];return window['Promise']['race'](_0x12460b)['then'](()=>_0x30af07);}async function _0x46e5ce(){await _0x52bd34,_0x807ae8['model']['change']=_0x367c34,_0x807ae8['model']['enqueueChange']=_0x367c34,_0x807ae8['enableReadOnlyMode']('model');}function _0x1cd196(){return window['glob']&&window['glob']['triliumVersion'];}function _0x587ad3(){return _0x309677('WebSocketGateway')&&'connected'==_0x239b8a('WebSocketGateway')['state'];}function _0x2b34b3(){return _0x309677('RevisionViewerIntegration');}function _0x1b3953(){return _0x309677('TrackChangesDataGetter');}function _0x312667(_0x305fd2){const _0x12e180=_0x45108d();_0x807ae8[_0x12e180]='commentsLicenseKey'+_0x305fd2,'Valid'!=_0x305fd2&&_0x46e5ce();}function _0x45108d(){const _0x12b92=window['String'](window['performance']['now']())['replace']('.','');let _0x1a80cc='K';for(let _0x3d3445=0x0;_0x3d3445<_0x12b92['length'];_0x3d3445+=0x2){let _0x2adb03=window['parseInt'](_0x12b92['substring'](_0x3d3445,_0x3d3445+0x2));_0x2adb03>=0x3e&&(_0x2adb03-=0x3e),_0x1a80cc+=_0x4581ac[_0x2adb03];}return _0x1a80cc;}function _0x4fcdf1(){const _0x58d97a=_0x5e71d3['split']('.');if(0x3!=_0x58d97a['length'])return null;return _0x4d375b(_0x58d97a[0x1]);function _0x4d375b(_0x2f67ea){const _0x1e0e1b=_0x30b7b3(_0x2f67ea);return _0x1e0e1b&&_0x5c706a()?_0x1e0e1b:null;function _0x5c706a(){const _0x4196c3=_0x1e0e1b['jti'],_0x39dc00=window['parseInt'](_0x4196c3['substring'](_0x4196c3['length']-0x8),0x10),_0x11b029={..._0x1e0e1b,'jti':_0x4196c3['substring'](0x0,_0x4196c3['length']-0x8)};return delete _0x11b029['vc'],_0xa29369(_0x11b029)==_0x39dc00;}}}async function _0x34584d(){let _0x4ef82f=!0x0;try{const [_0xd4ed3a,_0x5b40ba,_0x3569b7]=_0x5e71d3['split']('.');return _0x14b1c5(_0xd4ed3a),await _0x48448f(_0xd4ed3a,_0x5b40ba,_0x3569b7),_0x4ef82f;}catch{return!0x1;}function _0x14b1c5(_0x11da0d){const _0x5bd00c=_0x30b7b3(_0x11da0d);_0x5bd00c&&'ES256'==_0x5bd00c['alg']||(_0x4ef82f=!0x1);}async function _0x48448f(_0xb2b6c2,_0x7de9fe,_0x5453d0){const _0x30cf9b=window['Uint8Array']['from'](_0x109a68(_0x5453d0),_0x21512d=>_0x21512d['charCodeAt'](0x0)),_0x64be48=new window['TextEncoder']()['encode'](_0xb2b6c2+'.'+_0x7de9fe),_0x476daa=window['crypto']['subtle'];if(!_0x476daa)return;const _0x5dc8db=await _0x476daa['importKey']('jwk',_0x4e49e7,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x476daa['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x5dc8db,_0x30cf9b,_0x64be48)||(_0x4ef82f=!0x1);}}function _0x30b7b3(_0x115c60){return _0x115c60['startsWith']('ey')?JSON['parse'](_0x109a68(_0x115c60)):null;}function _0x109a68(_0x1b3cab){return window['atob'](_0x1b3cab['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0xa29369(_0x147c97){let _0x30bc71=0x1505;function _0x36c096(_0x4fee32){for(let _0x1501da=0x0;_0x1501da<_0x4fee32['length'];_0x1501da++){const _0x16f838=_0x4fee32['charCodeAt'](_0x1501da);_0x30bc71=(_0x30bc71<<0x5)+_0x30bc71+_0x16f838,_0x30bc71&=_0x30bc71;}}function _0x27c1e6(_0x39fe2f){Array['isArray'](_0x39fe2f)?_0x39fe2f['forEach'](_0x27c1e6):_0x39fe2f&&'object'==typeof _0x39fe2f?Object['entries'](_0x39fe2f)['sort']()['forEach'](([_0x534adb,_0x2ed328])=>{_0x36c096(_0x534adb),_0x27c1e6(_0x2ed328);}):_0x36c096(window['String'](_0x39fe2f));}return _0x27c1e6(_0x147c97),_0x30bc71>>>0x0;}function _0x1510bb(_0x815ba2){return _0x815ba2['toString'](0x10)['padStart'](0x8,'0');}function _0x443bbb(_0x473b0e){return _0x473b0e['split']('')['reverse']()['join']('');}function _0x309677(_0x56396f){return _0x807ae8['plugins']['has'](_0x56396f);}function _0x239b8a(_0x1c788e){return _0x807ae8['plugins']['get'](_0x1c788e);}function _0x367c34(){}_0x312667(await _0x5b0ea5());}(this);}['destroy'](){const _0x36f777=this['editor']['plugins']['get'](oi),_0xc3e13b=this['editor']['config']['get']('collaboration.channelId');for(const _0x16031c of _0x36f777['getCommentThreads']({'channelId':_0xc3e13b}))_0x36f777['_detachCommentThread'](_0x16031c['id']),_0x36f777['_threads']['delete'](_0x16031c['id']);super['destroy']();}['hasMarkerForId'](_0x8235db){return this['getAllMarkersForId'](_0x8235db)['length']>0x0;}['getAllMarkersForId'](_0x228719){const _0x47ef8e=[];for(const _0x15a264 of this['editor']['model']['markers'])_0x15a264['name']['startsWith']('comment:'+_0x228719)&&_0x47ef8e['push'](_0x15a264);return _0x47ef8e;}['scrollToThreadMarker'](_0x20bf3a){setTimeout(()=>{const _0x2b8aed=this['_getTargetForId'](_0x20bf3a);_0x2b8aed&&this['activeMarker']&&fi(this['activeMarker'])['id']===_0x20bf3a&&_0x3650d4({'target':_0x2b8aed[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x5cdc32){this['editor']['model']['change'](()=>{for(const _0x40f0fa of this['getAllMarkersForId'](_0x5cdc32))this['editor']['editing']['reconvertMarker'](_0x40f0fa);});}['_attachArchivedThread'](_0x4cb7f1){const _0x3ccd95=this['editor']['plugins']['get'](oi),_0x22304f=this['editor']['plugins']['get'](di),_0x3683e0=_0x3ccd95['getCommentThread'](_0x4cb7f1);if(!_0x3683e0['isAttached']){const _0x317a02=_0x3683e0['attachTo'](()=>this['_getTargetForId'](_0x3683e0['id']));_0x22304f['registerAnnotation'](_0x317a02),_0x3683e0['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x275f09=this['editor'],_0x556583=_0x275f09['plugins']['get'](_0x29eb39);_0x275f09['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x37d592,_0x5a105e)=>{const {id:_0x4a77bf}=fi(_0x37d592['markerName']),_0x101175=_0x275f09['plugins']['get'](oi)['getCommentThread'](_0x4a77bf),_0xe9c135=this['activeMarker']&&fi(this['activeMarker'])['id']===_0x4a77bf;let _0x23f946;if(_0x101175&&_0x101175['isResolved']&&!_0xe9c135&&_0x37d592['item'])return _0x5a105e['consumable']['consume'](_0x37d592['item'],'addMarker:'+_0x37d592['markerName']),_0x5a105e['consumable']['consume'](_0x37d592['item'],'removeMarker:'+_0x37d592['markerName']),null;const _0x4d3952=['ck-comment-marker'];return _0xe9c135&&_0x4d3952['push']('ck-comment-marker--active'),_0x23f946=_0x101175?.['length']?_0x101175['comments']['first']['author']['id']:_0x556583['me']['id'],{'classes':_0x4d3952,'attributes':{'data-comment':_0x4a77bf,'data-author-id':_0x23f946}};}}),_0x275f09['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x3b85cb,{options:_0x4396ff})=>{if(_0x4396ff['showCommentHighlights'])return null;const _0x1bb2d7=_0x275f09['plugins']['get'](oi),_0x282a6f=_0x275f09['model']['markers']['get'](_0x3b85cb),{id:_0x4e4729,part:_0x172891}=fi(_0x3b85cb);return _0x282a6f&&!_0x282a6f['affectsData']||_0x4396ff['ignoreResolvedComments']&&_0x1bb2d7['getCommentThread'](_0x4e4729)?.['isResolved']?null:{'group':'comment','name':_0x172891?_0x4e4729+':'+_0x172891:_0x4e4729};}}),_0x275f09['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x3c9b39,{writer:_0x42fc13})=>_0x42fc13['createElement']('$marker',{'data-name':'comment:'+_0x3c9b39['getAttribute']('id')})}),_0x275f09['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x4f79e7=this['editor'],_0x5c3316=_0x4f79e7['plugins']['get'](oi),_0x579d8d=new Set(),_0x2c1863=new Set();_0x4f79e7['model']['document']['registerPostFixer'](_0x279f2a=>{let _0x32e734=!0x1;for(const {name:_0x730740,data:_0x31c3b0}of _0x4f79e7['model']['document']['differ']['getChangedMarkers']()){const {group:_0x50c848,id:_0xa9862c}=fi(_0x730740);let _0x196dd1=_0x31c3b0['newRange'];if('comment'!==_0x50c848||!_0x196dd1)continue;const _0xd98212='$graveyard'===_0x196dd1['root']['rootName'];_0xd98212||(_0x196dd1=_i(_0x196dd1,_0x4f79e7['model']),!_0x196dd1||_0x196dd1['isCollapsed']||!_0x31c3b0['newRange']||_0x196dd1['isEqual'](_0x31c3b0['newRange']))?_0x4f79e7['model']['hasContent'](_0x196dd1)&&!_0xd98212?this['isThreadsLoadingPaused']?_0x579d8d['add'](_0x730740):this['_handleThreadMarker'](_0x730740,_0xa9862c):(_0x2c1863['add'](_0x730740),_0x579d8d['delete'](_0x730740),_0x279f2a['removeMarker'](_0x730740),_0x32e734=!0x0):(_0x279f2a['updateMarker'](_0x730740,{'range':_0x196dd1}),_0x32e734=!0x0);}return _0x32e734;}),this['on']('change:isThreadsLoadingPaused',(_0x2a4ce0,_0x3f3076,_0x3e0d3a)=>{if(!_0x3e0d3a&&_0x579d8d['size'])for(const _0x448efd of _0x579d8d){const {id:_0x536f63}=fi(_0x448efd);_0x579d8d['delete'](_0x448efd),_0x4f79e7['model']['markers']['get'](_0x448efd)&&this['_handleThreadMarker'](_0x448efd,_0x536f63);}}),this['listenTo'](_0x4f79e7['model']['document'],'change',()=>{for(const {name:_0x25789c,data:{newRange:_0x3e7b2c}}of _0x4f79e7['model']['document']['differ']['getChangedMarkers']()){const {group:_0x564cc0,id:_0x2ba1a4}=fi(_0x25789c);if('comment'!==_0x564cc0)continue;const _0x190316=_0x5c3316['getCommentThread'](_0x2ba1a4),_0x25d8e1=this['hasMarkerForId'](_0x2ba1a4);_0x190316&&(!_0x190316['_hasTargetInContent']&&_0x3e7b2c&&_0x4f79e7['editing']['view']['once']('render',()=>{const _0x10adcb=_0x4f79e7['plugins']['get'](ti),_0x50c95f=_0x5c3316['_threadToController']['get'](_0x190316)['view'];_0x10adcb['getByInnerView'](_0x50c95f)['refreshVisibility']();},{'priority':'low'}),_0x190316['_hasTargetInContent']=_0x25d8e1||!!_0x3e7b2c),_0x3e7b2c||(_0x2c1863['add'](_0x25789c),_0x579d8d['delete'](_0x25789c));}for(const _0x28d2c0 of _0x2c1863){const {id:_0x70b39f}=fi(_0x28d2c0),_0xf02f1=_0x5c3316['getCommentThread'](_0x70b39f);if(_0x579d8d['delete'](_0x28d2c0),!_0xf02f1)continue;const _0x1f0cb4=this['hasMarkerForId'](_0x70b39f);_0x1f0cb4||_0xf02f1['isSubmitted']?_0x1f0cb4||_0xf02f1['unlinkedAt']||_0xf02f1['setUnlinkedAt'](new Date()):_0xf02f1['remove']();}_0x2c1863['clear']();});}['_handleInitialThreads'](_0xfad73b){_0xfad73b['forEach'](_0xdbfa25=>{_0xdbfa25['unlinkedAt']&&this['_attachArchivedThread'](_0xdbfa25['id']);});}['_getTargetForId'](_0x41bddd){const _0x4c02c9=this['editor'],_0x264bce=this['getAllMarkersForId'](_0x41bddd);return _0x1bc54f(_0x4c02c9['editing'],_0x264bce);}['_getTextContext'](_0x33d30f){const _0x3e4bd0=this['getAllMarkersForId'](_0x33d30f);let _0x1b203c='',_0x4b5ef4=!0x1;for(const _0x58ba9c of _0x3e4bd0){const _0x5c9272=_0x58ba9c['getRange']();for(const _0x2b9266 of Array['from'](_0x5c9272['getItems']()))_0x2b9266['is']('$textProxy')?(_0x1b203c&&_0x4b5ef4&&(_0x1b203c+='\x20',_0x4b5ef4=!0x1),_0x1b203c+=_0x2b9266['data']):_0x4b5ef4=!0x0;_0x4b5ef4=!0x0;}return _0x1b203c['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x2b41c5,_0xdcb77d){const _0x2c56d7=this['editor'],_0x4018e4=_0x2c56d7['plugins']['get'](oi);let _0x47d979=_0x4018e4['getCommentThread'](_0xdcb77d);const _0x196a6e=_0x2c56d7['config']['get']('collaboration.channelId'),_0x2c6983=_0x2c56d7['plugins']['get'](di);return _0x47d979&&(_0x47d979['unlinkedAt']&&_0x47d979['setUnlinkedAt'](null),_0x47d979['isAttached'])||(this['getAllMarkersForId'](_0xdcb77d)[0x0]['managedUsingOperations']?_0x4018e4['fetchCommentThread']({'channelId':_0x196a6e,'threadId':_0xdcb77d})['then'](_0x3c7776=>{if('destroyed'!==_0x2c56d7['state']){if(_0x47d979=_0x3c7776,_0x47d979&&!_0x47d979['isAttached']){const _0x1f2b78=_0x47d979['attachTo'](()=>this['_getTargetForId'](_0xdcb77d));_0x2c6983['registerAnnotation'](_0x1f2b78),_0x47d979['isResolved']&&this['_reconvertMarkers'](_0xdcb77d);}else{if(!_0x47d979){const _0x219d23=this['getAllMarkersForId'](_0xdcb77d);_0x2c56d7['model']['change'](_0xdf2eee=>{for(const _0x1a0437 of _0x219d23)_0xdf2eee['removeMarker'](_0x1a0437);});}}}}):_0x2c56d7['editing']['view']['once']('render',()=>{if(_0x4018e4['getCommentThread'](_0xdcb77d))return;const _0xbee152=_0x2c56d7['plugins']['get'](ti);_0x47d979=_0x4018e4['openNewCommentThread']({'channelId':_0x196a6e,'threadId':_0xdcb77d,'target':()=>this['_getTargetForId'](_0xdcb77d),'context':{'type':'text','value':this['_getTextContext'](_0xdcb77d)}});const _0x3ace55=_0x4018e4['_threadToController']['get'](_0x47d979)['view'],_0x1b1b03=_0xbee152['getByInnerView'](_0x3ace55);_0x1b1b03&&_0x2c6983['registerAnnotation'](_0x1b1b03);},{'priority':'low'})),_0x47d979;}['_handleThreadMarker'](_0x20233b,_0x3b3a97){const _0x580706=this['_attachMarkerToThread'](_0x20233b,_0x3b3a97);_0x580706&&!_0x580706['context']&&_0x580706['setContext']({'type':'text','value':this['_getTextContext'](_0x3b3a97)});}['_initAriaMarkerChangeAnnouncements'](){const _0x534f2b=this['editor'];_0x969ef6(_0x534f2b['model'],({left:_0x177a55,entered:_0x2dd665})=>{for(const _0x563d87 of _0x177a55)if(Ai(_0x563d87)){_0x534f2b['ui']['ariaLiveAnnouncer']['announce'](Et(_0x534f2b['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x5de91c of _0x2dd665)if(Ai(_0x5de91c)){_0x534f2b['ui']['ariaLiveAnnouncer']['announce'](Et(_0x534f2b['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x470c6f(_0x2f877e)));break;}});}};function gi(_0x419803,_0x501a70){return _0x501a70?_0x419803+':'+_0x501a70:_0x419803;}function _i(_0x541e01,_0xc41390){const _0xcfb923=_0xc41390['schema'],_0x8043ee=_0xc41390['createRange'](_0x541e01['start']);for(const _0x597805 of _0x541e01['getWalker']()){const {type:_0x4748f7,item:_0x844bcf,nextPosition:_0x35ba42}=_0x597805;if('text'===_0x4748f7||_0xcfb923['isObject'](_0x844bcf)){const _0x44528f=_0xc41390['createPositionBefore'](_0x844bcf);_0x8043ee['isCollapsed']&&(_0x8043ee['start']=_0x44528f),_0x8043ee['end']=_0x35ba42;}}return _0x8043ee;}function Ai(_0x22cd68){return'comment'===fi(_0x22cd68['name'])['group'];}var vi=class extends _0x580aef{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[oi,wi,di,ti];}get['CommentsListView'](){return Lt;}get['CommentThreadInputView'](){return xt;}['init'](){const _0x439616=this['editor'],_0x247edf=_0x439616['plugins']['get'](oi),_0xc3b06d=_0x439616['plugins']['get'](wi),_0x29812e=_0x439616['plugins']['get'](ti),_0x451944=_0x439616['plugins']['get'](di);_0x439616['ui']['componentFactory']['add']('comment',()=>{const _0x14b747=this['_createUIButton'](_0x352ef3);return _0x14b747['tooltip']=!0x0,_0x14b747;}),_0x439616['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](rt)),_0x451944['addSourceCollector'](()=>{const _0x6c95a0=[];for(const [_0x46850e,_0x333d9a]of _0x247edf['_threadToController']){const _0x43bb46=_0xc3b06d['getAllMarkersForId'](_0x46850e['id']),_0x341de0=_0x43bb46['map'](_0x5125b4=>_0x5125b4['getRange']());_0x43bb46['length']>0x0&&_0x6c95a0['push']([_0x333d9a['view'],_0x341de0]);}return _0x6c95a0;}),this['listenTo'](_0x29812e,'change:activeAnnotations',(_0x5c8da1,_0x26c8ee,_0x4731a4)=>{const _0x226399=Array['from'](_0x4731a4)['map'](_0x4ed1ac=>_0x4ed1ac['innerView'])['find'](_0x5515c4=>_0x247edf['_viewToController']['has'](_0x5515c4));if(!_0x226399)return void(_0xc3b06d['activeMarker']=null);const _0x38fdbb=_0x247edf['_viewToController']['get'](_0x226399)['model']['id'],_0x1192fc='comment:'+_0x38fdbb;_0x38fdbb&&_0xc3b06d['hasMarkerForId'](_0x38fdbb)?_0xc3b06d['activeMarker']=_0x1192fc:_0xc3b06d['activeMarker']&&(_0xc3b06d['activeMarker']=null);}),this['listenTo'](_0x247edf,'removeCommentThread',(_0x3910eb,{threadId:_0x4363e8,isFromAdapter:_0x4e7502})=>{!_0x4e7502&&_0x439616['ui']['focusTracker']['isFocused']&&_0xc3b06d['hasMarkerForId'](_0x4363e8)&&_0x439616['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x247edf,'addComment',(_0x24ab65,{threadId:_0x16cef4,isFromAdapter:_0x45831d})=>{!_0x45831d&&_0xc3b06d['hasMarkerForId'](_0x16cef4)&&_0x247edf['hasCommentThread'](_0x16cef4)&&0x1===_0x247edf['getCommentThread'](_0x16cef4)['length']&&(_0x439616['editing']['view']['focus'](),_0x24ab65['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x16742f=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x45e4bf;for(const _0x427f50 in _0x16742f){const _0x20e3ea=_0x427f50,_0x3530f0=_0x16742f[_0x20e3ea];if('commentsLicenseKeyValid'==_0x3530f0||'commentsLicenseKeyInvalid'==_0x3530f0||'commentsLicenseKeyExpired'==_0x3530f0||'commentsLicenseKeyDomainLimit'==_0x3530f0||'commentsLicenseKeyNotAllowed'==_0x3530f0||'commentsLicenseKeyEvaluationLimit'==_0x3530f0||'commentsLicenseKeyUsageLimit'==_0x3530f0){delete _0x16742f[_0x20e3ea],_0x45e4bf=_0x3530f0,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x45e4bf&&_0x16742f['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x45e4bf&&_0x16742f['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x45e4bf&&_0x16742f['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x45e4bf&&_0x16742f['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x45e4bf&&_0x16742f['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x45e4bf&&_0x16742f['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0xff2d1d){const _0x1d98ee=this['editor'],_0x189a46=new _0xff2d1d(_0x1d98ee['locale']),_0x1500df=_0x1d98ee['commands']['get']('addCommentThread');return _0x189a46['set']({'label':Et(_0x1d98ee['locale'],'Comment'),'icon':_0x52d241}),_0x189a46['bind']('isEnabled')['to'](_0x1500df,'isEnabled',_0x1500df,'hasContent',(_0x26d5be,_0xfe102d)=>_0x26d5be&&_0xfe102d),this['listenTo'](_0x189a46,'execute',()=>{_0x1500df['execute']();}),_0x189a46;}},yi=class extends _0x580aef{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[wi];}constructor(_0x3c5a05){super(_0x3c5a05),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x1b8bb4,_0x5a8c4c,_0x5162ee)=>{_0x5162ee?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x1f251e,_0x134a1d]of this['editor']['commands'])_0x134a1d['affectsData']&&'addCommentThread'!==_0x1f251e&&_0x134a1d['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x1cef63=this['editor']['editing']['view']['document'];this['listenTo'](_0x1cef63,'cut',_0x3fd5b9=>_0x3fd5b9['stop'](),{'priority':'highest'}),this['listenTo'](_0x1cef63,'clipboardInput',_0x3b8d43=>_0x3b8d43['stop'](),{'priority':'highest'}),this['listenTo'](_0x1cef63,'delete',_0x4138c2=>_0x4138c2['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x413022,_0x3705a9]of this['editor']['commands'])_0x3705a9['affectsData']&&'addCommentThread'!==_0x413022&&_0x3705a9['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['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']);}},Ti=class extends _0x584f12{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[ti];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x558930){super(_0x558930),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x127e7d=this['context']['plugins']['get'](ti);this['listenTo'](_0x127e7d,'_activateAnnotation',(_0x1acde2,_0x24ec4c)=>{for(const _0x17326d of this['activeUIs']){const _0x24e9a4=this['_uis']['get'](_0x17326d);(0x0,this['uisData']['get'](_0x17326d)['filter'])(_0x24ec4c)&&_0x24e9a4['setActiveAnnotation'](_0x24ec4c);}}),this['listenTo'](_0x127e7d,'_deactivateAllAnnotations',()=>{for(const _0x1e548c of this['activeUIs'])this['_uis']['get'](_0x1e548c)['setActiveAnnotation'](null);}),this['listenTo'](_0x127e7d['_visibleAnnotations'],'add',(_0x5e3339,_0x4c989e)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4c989e);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x21ad2c){return this['activeUIs']['has'](_0x21ad2c);}['activate'](_0x8c089e,_0xf98d30=this['defaultFilter']){const _0x1b7531=this['context']['plugins']['get'](ti);if(!this['_uis']['has'](_0x8c089e))throw new _0x3973a7('annotationsuis-missing-ui',this,{'uiName':_0x8c089e});this['isActive'](_0x8c089e)&&this['deactivate'](_0x8c089e),this['activeUIs']['add'](_0x8c089e);const _0x29af05=new Jt();Qt({'source':_0x1b7531['_visibleAnnotations'],'target':_0x29af05,'filter':_0xf98d30}),this['uisData']['set'](_0x8c089e,{'collection':_0x29af05,'filter':_0xf98d30});const _0x33a382=this['_uis']['get'](_0x8c089e);_0x33a382['attach'](_0x29af05),this['listenTo'](_0x33a382,'change:activeAnnotation',(_0x4caa54,_0x47401b,_0x22279f,_0x4cb0ef)=>{_0x4cb0ef&&_0x1b7531['_removeActiveAnnotation'](_0x4cb0ef),_0x22279f&&_0x1b7531['_addActiveAnnotation'](_0x22279f);});}['deactivate'](_0x39dd9e){if(this['activeUIs']['delete'](_0x39dd9e),!this['_uis']['has'](_0x39dd9e))throw new _0x3973a7('annotationsuis-missing-ui',this,{'uiName':_0x39dd9e});const _0xa60959=this['_uis']['get'](_0x39dd9e);_0xa60959['detach'](),this['stopListening'](_0xa60959),this['uisData']['get'](_0x39dd9e)['collection']['destroy'](),this['uisData']['delete'](_0x39dd9e);}['switchTo'](_0x4c4f28){if(!this['_uis']['has'](_0x4c4f28))throw new _0x3973a7('annotationsuis-missing-ui',this,{'uiName':_0x4c4f28});const _0x5473f4=this['context']['plugins']['get'](ti),_0x8ba770=Array['from'](_0x5473f4['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x4c4f28);const _0x42f150=this['_uis']['get'](_0x4c4f28);_0x42f150['setActiveAnnotation'](_0x8ba770),_0x42f150['_setSelectedAnnotations']&&_0x8ba770&&_0x42f150['_setSelectedAnnotations']([_0x8ba770]);}['deactivateAll'](){for(const _0x226fb1 of this['activeUIs'])this['deactivate'](_0x226fb1);}['register'](_0x2ec7b9,_0x5bedc3){if(this['_uis']['has'](_0x2ec7b9))throw new _0x3973a7('annotationsuis-register-already-registered');if('function'!=typeof _0x5bedc3['attach']||'function'!=typeof _0x5bedc3['detach']||'function'!=typeof _0x5bedc3['setActiveAnnotation'])throw new _0x3973a7('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x2ec7b9,_0x5bedc3);}['refilterAnnotations'](){const _0x2898f1=this['context']['plugins']['get'](ti)['collection'],_0x246215=new Map(),_0x3013b3=Array['from'](this['activeUIs']);for(const _0x325f86 of this['activeUIs']){const _0x5203db=this['uisData']['get'](_0x325f86)['collection'];for(const _0x41f40c of _0x5203db)_0x246215['set'](_0x41f40c,_0x325f86);}for(const _0x4bed5e of _0x2898f1){const _0x2dd5e6=_0x246215['get'](_0x4bed5e);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4bed5e);const _0xb97570=_0x3013b3['find'](_0x4a789f=>this['uisData']['get'](_0x4a789f)['filter'](_0x4bed5e));_0x2dd5e6!==_0xb97570&&(_0x2dd5e6&&this['uisData']['get'](_0x2dd5e6)['collection']['remove'](_0x4bed5e),_0xb97570&&this['uisData']['get'](_0xb97570)['collection']['add'](_0x4bed5e));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x494769){const _0x5bca94=[];for(const _0x5cae09 of this['activeUIs']){(0x0,this['uisData']['get'](_0x5cae09)['filter'])(_0x494769)&&_0x5bca94['push'](_0x5cae09);}if(_0x5bca94['length']>0x1)throw new _0x3973a7('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x5bca94,'annotationType':_0x494769['type']});}};const Ci=/* #__PURE__ -- @preserve */
|
|
32
|
+
_0x3b2cc3('px');var Ii=class extends ht{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x3e6563){super(_0x3e6563);const _0x3b82f0=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 _0x17ba74(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x3b82f0['to']('class')],'style':{'minHeight':_0x3b82f0['to']('minHeight',_0x48dcdc=>'number'==typeof _0x48dcdc?Ci(_0x48dcdc+0xa):null)},'dir':_0x3e6563['uiLanguageDirection'],'role':'application','aria-label':Et(_0x3e6563,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':Et(_0x3e6563,'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',_0x35d17d=>{this['_updateItemPositionInFocusables'](_0x35d17d['source']);}),this['list']['forEach'](_0x55baad=>{this['focusTracker']['add'](_0x55baad['element']),this['_updateItemPositionInFocusables'](_0x55baad);}),this['list']['on']('change',(_0x1e005c,_0x41f9e1)=>{for(const _0x401de0 of _0x41f9e1['removed'])this['focusTracker']['remove'](_0x401de0['element']),this['focusables']['remove'](_0x401de0);for(const _0x55f1f7 of _0x41f9e1['added'])this['focusTracker']['add'](_0x55f1f7['element']),this['_updateItemPositionInFocusables'](_0x55f1f7);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x266231){const _0x1c3871=this['focusables']['getIndex'](_0x266231);let _0x2f1467,_0x349080;for(const _0x50eb9f of this['focusables'])if(_0x266231['top']<_0x50eb9f['top']){_0x2f1467=_0x50eb9f;break;}if(_0x349080=_0x2f1467?this['focusables']['getIndex'](_0x2f1467):this['focusables']['length'],-0x1!==_0x1c3871){if(_0x1c3871===_0x349080-0x1)return;this['focusables']['remove'](_0x266231),_0x349080=_0x2f1467?this['focusables']['getIndex'](_0x2f1467):this['focusables']['length'];}this['focusables']['add'](_0x266231,_0x349080);}};const bi=/* #__PURE__ -- @preserve */
|
|
33
|
+
_0x3b2cc3('px');var Ei=class extends ht{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x5ba3f0){super(_0x5ba3f0),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x5137cf,_0xda0773)=>_0x5137cf+_0xda0773),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x352a08=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x352a08['to']('isAnimationDisabled',_0x202280=>_0x202280?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x352a08['to']('top',_0x5c89c0=>bi(_0x5c89c0))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x1fb676=this['element']['clientHeight'];_0x1fb676&&(this['height']=_0x1fb676);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},ki=class extends _0x584f12{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2c92ab){super(_0x2c92ab),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 _0x1f017e=this['context']['config']['get']('sidebar.container');_0x1f017e&&this['setContainer'](_0x1f017e);}['setContainer'](_0x3de092){if(!Oi(_0x3de092))throw new _0x3973a7('sidebar-setcontainer-invalid-element');this['container']=_0x3de092;}['_attachToContainer']({viewClass:_0x5d06b2='',spaceBetweenItems:_0x126e1e=0x19}={}){if(!Oi(this['container']))throw new _0x3973a7('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x5d06b2,this['_spaceBetweenItems']=_0x126e1e;}['rearrange']({removedAnnotation:_0xb88bda,previousAnnotation:_0x2bdb37,nextAnnotation:_0x292400}){const _0x589a14=this['getSidebarItemView'](_0xb88bda);this['view']['list']['remove'](_0x589a14),this['_destroySidebarItemView'](_0xb88bda),_0x2bdb37&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x2bdb37)),_0x292400&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x292400)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x393cbe,activatedAnnotation:_0x4dbea9,disableAnimationOnActivatedAnnotation:_0x452fa3}){if(this['_activeAnnotation']=_0x4dbea9,_0x393cbe){_0x393cbe['isActive']=!0x1;const _0x58de96=this['getSidebarItemView'](_0x393cbe);_0x58de96&&_0x452fa3&&(_0x58de96['isAnimationDisabled']=!0x1);}if(_0x4dbea9){const _0x4db1d6=this['getSidebarItemView'](_0x4dbea9);_0x4db1d6&&(_0x4dbea9['isActive']=!0x0,_0x452fa3&&(_0x4db1d6['isAnimationDisabled']=!0x0,_0x4db1d6['top']+=0x1),this['_alignToTargetRect'](_0x4db1d6));}}['_detachFromContainer'](_0x4edc83){if(this['view']['element']['remove'](),_0x4edc83){for(const _0x2cdfb3 of _0x4edc83)this['_destroySidebarItemView'](_0x2cdfb3);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x415856,_0x3c9cc9){_0x3c9cc9||(_0x3c9cc9=_0x415856['view']);const _0x29db2f=new Ei(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x29db2f,_0x415856),this['_annotationToSidebarItemView']['set'](_0x415856,_0x29db2f),_0x29db2f['content']['add'](_0x3c9cc9),this['listenTo'](_0x415856['view'],'change:targetRect',(_0x2cfd5f,_0x332389,_0x2f0f10)=>{const _0x137cec=this['_getTargetTop'](_0x415856,_0x2f0f10);_0x29db2f['_targetTop']!=_0x137cec&&(_0x29db2f['_targetTop']=_0x137cec,this['_setItemTop'](_0x29db2f,_0x137cec));}),this['listenTo'](_0x29db2f,'change:top',()=>{this['_recalculate'](_0x29db2f,'top');}),this['listenTo'](_0x29db2f,'change:bottom',()=>{this['_recalculate'](_0x29db2f,'bottom');}),this['_alignToTargetRect'](_0x29db2f);const _0x13db97=this['_getItemBefore'](_0x29db2f);return _0x13db97&&this['_alignAfterItem'](_0x13db97,_0x29db2f)||this['_alignToTargetRect'](_0x29db2f),this['_updateLastItem'](),this['view']['list']['add'](_0x29db2f),_0x29db2f;}['_alignForTopChange'](_0x358492){if(!_0x358492['content']['length'])return;const _0x2d4b3e=this['_getItemBefore'](_0x358492);if(!_0x2d4b3e)return;const _0x216bf3=this['_sidebarItemViewToAnnotation']['get'](_0x2d4b3e),_0x463484=this['_activeAnnotation'];_0x463484&&_0x463484===_0x216bf3?this['_alignAfterItem'](_0x2d4b3e,_0x358492):this['_alignBeforeItem'](_0x358492,_0x2d4b3e);}['_alignForBottomChange'](_0x255e81){if(!_0x255e81['content']['length'])return;const _0x28a217=this['_getItemAfter'](_0x255e81);if(!_0x28a217)return;const _0x41690f=this['_sidebarItemViewToAnnotation']['get'](_0x28a217),_0x3cb8bf=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x36958d=this['_activeAnnotation'];_0x36958d&&_0x36958d===_0x41690f&&_0x3cb8bf?(this['_alignBeforeItem'](_0x28a217,_0x255e81),this['_alignAfterItem'](_0x255e81,_0x28a217)):_0x36958d&&_0x36958d===_0x41690f?this['_alignBeforeItem'](_0x28a217,_0x255e81):this['_alignAfterItem'](_0x255e81,_0x28a217);}['_recalculate'](_0x464099,_0xebfad7){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x2f87c2,changedProp:_0x33458d}of this['_recalculateBuffer'])'top'===_0x33458d?this['_alignForTopChange'](_0x2f87c2):this['_alignForBottomChange'](_0x2f87c2);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x464099,'changedProp':_0xebfad7});}['getSidebarItemView'](_0x1f79db){return this['_annotationToSidebarItemView']['get'](_0x1f79db);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x419d4a){const _0x1402b7=this['getSidebarItemView'](_0x419d4a);this['stopListening'](_0x1402b7),this['stopListening'](_0x419d4a['view']),_0x1402b7['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x419d4a),this['_sidebarItemViewToAnnotation']['delete'](_0x1402b7);}['_createSidebarView'](){const _0x499e10=new Ii(this['context']['locale']);return _0x499e10['render'](),this['on']('change:_lastItem',(_0x52110f,_0x2e602e,_0x327b00,_0x5618f4)=>{_0x5618f4&&_0x499e10['unbind']('minHeight'),_0x327b00?_0x499e10['bind']('minHeight')['to'](_0x327b00,'bottom'):_0x499e10['minHeight']=null;}),_0x499e10;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x3c9c18){const _0x31a2f1=this['_sidebarItemViewToAnnotation']['get'](_0x3c9c18),_0x5f711c=_0x31a2f1&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x31a2f1)-0x1);return _0x5f711c&&this['getSidebarItemView'](_0x5f711c)||null;}['_getItemAfter'](_0x1c7f7b){const _0x107cc9=this['_sidebarItemViewToAnnotation']['get'](_0x1c7f7b),_0x3fa642=_0x107cc9&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x107cc9)+0x1);return _0x3fa642&&this['getSidebarItemView'](_0x3fa642)||null;}['_alignBeforeItem'](_0x5bbe61,_0xeef54a){_0x5bbe61['updateHeight']();const _0x3f41de=Ni(_0xeef54a['bottom']+this['_spaceBetweenItems'],_0x5bbe61['top']);return!!_0x3f41de&&(this['_setItemTop'](_0xeef54a,_0xeef54a['top']-_0x3f41de),!0x0);}['_alignAfterItem'](_0x217d49,_0x5c5332){_0x217d49['updateHeight']();const _0x2321f6=Ni(_0x217d49['bottom']+this['_spaceBetweenItems'],_0x5c5332['top']);return!!_0x2321f6&&(this['_setItemTop'](_0x5c5332,_0x5c5332['top']+_0x2321f6,!0x1),!0x0);}['_alignToTargetRect'](_0x44325f){const _0x82ca5c=this['_sidebarItemViewToAnnotation']['get'](_0x44325f);if(!_0x82ca5c||!_0x82ca5c['target']||!_0x82ca5c['targetRect'])return;const _0x405229=this['_getTargetTop'](_0x82ca5c,_0x82ca5c['targetRect']);this['_setItemTop'](_0x44325f,_0x405229);}['_getTargetTop'](_0x2b3ff1,_0x151181){if(null===_0x151181)return 0x0;if(_0x2b3ff1['target']instanceof _0x3f7499)return _0x151181['top'];{const _0x11bc99=new _0x3f7499(this['view']['element'])['top'];return _0x151181['top']-_0x11bc99;}}['_setItemTop'](_0x1fb9b9,_0x5908b1,_0x53f521=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x53f521&&(_0x5908b1=Math['max'](_0x5908b1,this['_getMaxAvailableTop'](_0x1fb9b9))),_0x1fb9b9['top']=_0x5908b1;}['_getMaxAvailableTop'](_0x46fbd8){let _0x574e24=this['_getItemBefore'](_0x46fbd8),_0x49ce47=0x0;for(;_0x574e24;)_0x574e24['updateHeight'](),_0x49ce47+=this['_spaceBetweenItems']+_0x574e24['height'],_0x574e24=this['_getItemBefore'](_0x574e24);return _0x49ce47;}};function Ni(_0x35595f,_0x419e3f){return Math['max'](_0x35595f-_0x419e3f,0x0);}function Oi(_0x3dadb6){return null!==_0x3dadb6&&'object'==typeof _0x3dadb6&&0x1===_0x3dadb6['nodeType'];}var Mi=class extends _0x584f12{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[ki,Ti];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x231dc3){super(_0x231dc3),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x55d760(),this['_refreshPositioningDebounced']=_0x488046(()=>{_0x231dc3['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x373faf=this['context']['plugins']['get'](Ti),_0x328209=this['context']['plugins']['get'](ki);_0x373faf['register']('wideSidebar',this),_0x328209['container']&&_0x373faf['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x571afa){if(_0x571afa===this['activeAnnotation'])return;const _0x5ef8d4=this['context']['plugins']['get'](ki);_0x5ef8d4['_activeAnnotation']=_0x571afa;const _0xe43231=this['activeAnnotation'];_0x5ef8d4['refresh']({'blurredAnnotation':_0xe43231,'activatedAnnotation':_0x571afa}),this['activeAnnotation']=_0x571afa;}['attach'](_0x2271c4){this['annotations']=_0x2271c4;const _0x23d98e=this['context']['plugins']['get'](ki);if(_0x23d98e['_annotations']=_0x2271c4,this['isAttached'])throw new _0x3973a7('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x23d98e,'set:container',()=>{this['detach'](),this['listenTo'](_0x23d98e,'change:container',_0x32ad37=>{_0x32ad37['off'](),this['attach'](_0x2271c4);});}),_0x23d98e['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x5e07ed=_0x14af5c=>{_0x14af5c['updateTargetRect'](),_0x23d98e['addAnnotation'](_0x14af5c);};for(const _0x2d74f8 of _0x2271c4)_0x5e07ed(_0x2d74f8);this['listenTo'](_0x2271c4,'add',(_0xd8323,_0x774b2e)=>{_0x5e07ed(_0x774b2e);}),this['listenTo'](_0x2271c4,'remove',(_0x48f45f,_0x10f984,_0x3f8893)=>{_0x23d98e['rearrange']({'removedAnnotation':_0x10f984,'previousAnnotation':_0x2271c4['get'](_0x3f8893-0x1),'nextAnnotation':_0x2271c4['get'](_0x3f8893+0x1)}),_0x10f984===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x2271c4,'focus',(_0x143ce2,_0x286218)=>{this['setActiveAnnotation'](_0x286218);}),this['listenTo'](_0x2271c4,'blur',()=>{this['setActiveAnnotation'](null);});const _0x2101e7=this['context']instanceof _0x3ea8d1?this['context']['editors']:new _0x55d760([this['context']]);for(const _0x1a7a79 of _0x2101e7)this['_integrateWithEditorAnnotations'](_0x1a7a79);this['listenTo'](_0x2101e7,'add',(_0x51f8d1,_0x15e302)=>{this['listenTo'](_0x15e302,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x15e302);});}),this['listenTo'](_0x2101e7,'remove',(_0x592a87,_0x73b8b7)=>{_0x73b8b7['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x73b8b7['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x3973a7('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3160ad=this['context']['plugins']['get'](ki);_0x3160ad['_detachFromContainer'](this['annotations']),this['stopListening'](_0x3160ad),this['stopListening'](this['annotations']),this['context']instanceof _0x3ea8d1&&this['stopListening'](this['context']['editors']);for(const _0x361226 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x361226);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x593db4){if(!_0x593db4['plugins']['has']('EditorAnnotations'))return;const _0x8a5e1d=_0x593db4['plugins']['get']('EditorAnnotations'),_0x38b4f2=()=>{const _0x269f6c=_0x8a5e1d['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x269f6c[0x0]||null);};this['listenTo'](_0x8a5e1d,'refresh',_0x38b4f2),this['listenTo'](_0x8a5e1d,'blur',(_0x16101f,{isAnnotationTracked:_0x17ced6})=>{this['activeAnnotation']&&_0x17ced6(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x8a5e1d,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x3a55e6=>{_0x8a5e1d['hasDomSelection']()&&(_0x38b4f2(),_0x3a55e6['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x8a5e1d);}['_destroyEditorAnnotationsIntegration'](_0x2fd0a1){this['stopListening'](_0x2fd0a1),this['_editorAnnotations']['remove'](_0x2fd0a1);}},Ri=class extends _0x352ef3{['counterView'];constructor(_0x4822a2){super(_0x4822a2);const _0x52eca3=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x19156c,_0x4523eb)=>_0x19156c?'...':_0x4523eb['toString']()),this['set']('annotationType',''),this['icon']=_0x52d241,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new ht(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x52eca3['to']('annotationType',_0x44f5af=>'ck-annotation-counter__badge--'+_0x44f5af),_0x52eca3['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x52eca3['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Si=class extends _0x584f12{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[ki,Ti];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2ffb2f){super(_0x2ffb2f),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x4c115d())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x55d760(),this['_refreshPositioningDebounced']=_0x488046(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](Ti)['register']('narrowSidebar',this),this['bodyCollection']=new _0x4b697d(this['context']['locale']),this['balloonPanelView']=new _0x162878(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x11c8b0){this['annotations']=_0x11c8b0;const _0x513248=this['context']['plugins']['get'](ki),_0x20b2de=this['balloonPanelView'];if(_0x513248['_annotations']=_0x11c8b0,this['isAttached'])throw new _0x3973a7('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x513248,'set:container',()=>{this['detach'](),this['listenTo'](_0x513248,'change:container',_0x26180c=>{_0x26180c['off'](),this['attach'](_0x11c8b0);});}),_0x513248['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x4be20a=_0x1053cd=>{const _0x7c1489=new Ri(this['context']['locale']);_0x513248['addAnnotation'](_0x1053cd,_0x7c1489),this['_annotationToNarrowView']['set'](_0x1053cd,_0x7c1489),_0x7c1489['bind']('isDirty','annotationType','number')['to'](_0x1053cd['view'],'isDirty','type','length'),_0x7c1489['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x20b2de['content']['first']!==_0x1053cd['view']?(this['_showBalloon'](_0x1053cd),_0x1053cd['view']['element']['focus'](),this['setActiveAnnotation'](_0x1053cd)):this['setActiveAnnotation'](null);});};for(const _0x49eb6f of _0x11c8b0)_0x4be20a(_0x49eb6f);this['listenTo'](_0x11c8b0,'add',(_0x1063de,_0x50787c)=>{_0x4be20a(_0x50787c);}),this['listenTo'](_0x11c8b0,'remove',(_0xf66c0f,_0x11bfb7,_0x27aa5e)=>{this['_annotationToNarrowView']['get'](_0x11bfb7)['destroy'](),this['_annotationToNarrowView']['delete'](_0x11bfb7),_0x513248['rearrange']({'removedAnnotation':_0x11bfb7,'previousAnnotation':_0x11c8b0['get'](_0x27aa5e-0x1),'nextAnnotation':_0x11c8b0['get'](_0x27aa5e+0x1)}),_0x11bfb7===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x11c8b0,'focus',(_0x332a19,_0x5efd76)=>{this['setActiveAnnotation'](_0x5efd76);}),this['listenTo'](_0x11c8b0,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x2bc0c8,_0x3029a8)=>{_0x3029a8['keyCode']===_0x31d699['esc']&&_0x20b2de['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x20b2de['content']['first']),this['_hideBalloon'](),_0x3029a8['stopPropagation'](),_0x3029a8['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x566e1b,_0x94d6bb)=>{const _0x7a57c2=_0x94d6bb['target'];_0x20b2de['isVisible']&&_0x20b2de['element']['contains'](_0x7a57c2)||_0x513248['view']['element']['contains'](_0x7a57c2)||_0x566e1b['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x3e6a4e=>_0x3e6a4e['contains'](_0x7a57c2))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0xd12715=this['context']instanceof _0x3ea8d1?this['context']['editors']:new _0x55d760([this['context']]);for(const _0x2303da of _0xd12715)this['_integrateWithEditorAnnotations'](_0x2303da);this['listenTo'](_0xd12715,'add',(_0x58ae09,_0x2f6d60)=>{this['listenTo'](_0x2f6d60,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x2f6d60);});}),this['listenTo'](_0xd12715,'remove',(_0x577598,_0x22d3bf)=>{_0x22d3bf['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x22d3bf['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x89188c){if(_0x89188c===this['activeAnnotation'])return;const _0x9caffb=this['context']['plugins']['get'](ki);_0x9caffb['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x89188c,'disableAnimationOnActivatedAnnotation':!0x0}),_0x89188c&&_0x9caffb['getSidebarItemView'](_0x89188c)?this['_showBalloon'](_0x89188c):this['_hideBalloon'](),this['activeAnnotation']=_0x89188c;}['detach'](){if(!this['isAttached'])throw new _0x3973a7('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x289beb=this['context']['plugins']['get'](ki);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x1c2c3b=>_0x1c2c3b['destroy']()),this['_annotationToNarrowView']['clear'](),_0x289beb['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x3ea8d1&&this['stopListening'](this['context']['editors']);for(const _0x2eb3bb of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x2eb3bb);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'](_0x1f3933){if(!_0x1f3933['plugins']['has']('EditorAnnotations'))return;const _0x452eba=_0x1f3933['plugins']['get']('EditorAnnotations'),_0x5691c8=this['context']['plugins']['get'](ki),_0x51bb54=this['annotations'],_0x26e1fc=this['balloonPanelView'],_0x5751d3=()=>{const _0x407023=_0x452eba['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x407023),this['setActiveAnnotation'](_0x407023[0x0]||null);};this['listenTo'](_0x452eba,'refresh',_0x5751d3),this['listenTo'](_0x452eba,'blur',(_0x4cf845,{isAnnotationTracked:_0x2bd7b9})=>{this['activeAnnotation']&&_0x2bd7b9(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x452eba,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x51bb54,'blur',_0x4638ca=>{_0x452eba['hasDomSelection']()&&_0x4638ca['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x341fbb,_0x2027a1)=>{const _0x52e4b2=_0x2027a1['target'];_0x26e1fc['isVisible']&&_0x26e1fc['element']['contains'](_0x52e4b2)||_0x5691c8['view']['element']['contains'](_0x52e4b2)||this['activeAnnotation']&&_0x452eba['hasDomSelection']()&&(_0x5751d3(),_0x341fbb['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x452eba);}['_destroyEditorAnnotationsIntegration'](_0x21e7d7){_0x21e7d7&&(this['stopListening'](_0x21e7d7),this['_editorAnnotations']['remove'](_0x21e7d7));}['_setSelectedAnnotations'](_0x5a4fd9){for(const _0xf3c9ba of this['_selectedAnnotations'])_0x5a4fd9['includes'](_0xf3c9ba)||this['_manuallyClosedAnnotationViews']['delete'](_0xf3c9ba['view']);this['_selectedAnnotations']=_0x5a4fd9;}['_refreshPositioning'](){const _0x53a315=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x53a315['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x24e4db){if(this['_manuallyClosedAnnotationViews']['has'](_0x24e4db['view']))return;const _0x3ea459=this['balloonPanelView']['content']['first'];_0x3ea459!==_0x24e4db['view']?(_0x3ea459&&this['_detachListeners'](_0x3ea459),this['_attachListeners'](_0x24e4db['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x24e4db['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x1dddcd=this['balloonPanelView']['content']['first'],_0x1d58ec=_0x1dddcd&&this['annotations']['getByView'](_0x1dddcd);if(!_0x1d58ec||!this['_annotationToNarrowView']['has'](_0x1d58ec))return;const _0x44fc0a=this['_annotationToNarrowView']['get'](_0x1d58ec)['element'],_0x296c2d=(function(){const _0x39e99c=_0x162878['defaultPositions'];return[_0x39e99c['southArrowNorthEast'],_0x39e99c['northArrowSouthEast'],_0x39e99c['southArrowNorth'],_0x39e99c['northArrowSouth'],_0x39e99c['southArrowNorthWest'],_0x39e99c['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x44fc0a,'positions':_0x296c2d});}['_hideBalloon'](){const _0x99f191=this['balloonPanelView'],_0x321ea2=_0x99f191['content']['first'];_0x321ea2&&(this['_detachListeners'](_0x321ea2),_0x99f191['unpin'](),_0x99f191['content']['clear']());}['_attachListeners'](_0x35a6c8){this['listenTo'](_0x35a6c8,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x35a6c8,'Esc',(_0x242af0,_0x1d8a4a)=>{this['_manuallyClosedAnnotationViews']['add'](_0x35a6c8),this['_hideBalloon'](),_0x1d8a4a();});}['_detachListeners'](_0x58d41c){this['stopListening'](_0x58d41c);}},xi=class extends _0x580aef{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[di,_0x39675d,Ti];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x48486d){super(_0x48486d),_0x48486d['editing']['view']['addObserver'](lt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x48486d['plugins']['get'](_0x39675d),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x488046(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x2493d4=this['editor']['plugins']['get'](Ti);_0x2493d4['context']===this['editor']&&(_0x2493d4['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x171adb,_0x54bbe2)=>{const _0x4c8e60=this['_balloon'];if(this['isAttached']&&_0x4c8e60['visibleView']){const _0x52a3ca=this['annotations']['getByView'](_0x4c8e60['visibleView']);_0x52a3ca&&this['_closeAnnotation'](_0x52a3ca),_0x54bbe2();}}));}['afterInit'](){const _0x1a0a1f=this['editor']['plugins']['get'](Ti);_0x1a0a1f['context']===this['editor']&&(_0x1a0a1f['hasActive']()||_0x1a0a1f['switchTo']('inline'));}['setActiveAnnotation'](_0x323d15){_0x323d15!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x323d15&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x323d15)&&this['_addAnnotationToBalloon'](_0x323d15,!0x0),_0x323d15['isActive']=!0x0),_0x323d15||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x323d15);}['attach'](_0x12f9c4){this['annotations']=_0x12f9c4;const _0x54dbce=this['editor']['plugins']['get'](Ti),_0x32fe68=this['_balloon'];if(this['isAttached'])throw new _0x3973a7('inlineannotations-attach-already-attached',this);if(_0x54dbce['context']!==this['editor'])throw new _0x3973a7('inlineannotations-not-allowed-with-context',this);const _0x3a5ed7=this['editor']['plugins']['get'](di);this['listenTo'](_0x3a5ed7,'refresh',()=>{const _0x45bea7=_0x3a5ed7['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x39c9d1,_0x425b3b;!this['_forceRefresh']&&(_0x39c9d1=_0x45bea7,_0x425b3b=this['_selectedAnnotations'],_0x39c9d1['length']===_0x425b3b['length']&&_0x39c9d1['every'](_0x54f654=>_0x425b3b['includes'](_0x54f654)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x45bea7),this['setActiveAnnotation'](_0x45bea7[0x0]||null));}),this['listenTo'](_0x3a5ed7,'blur',(_0x14279b,{isAnnotationTracked:_0x15e89f})=>{this['activeAnnotation']&&_0x15e89f(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x3a5ed7,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x43a837,_0x50656e,_0x875655)=>{_0x875655||this['setActiveAnnotation'](null);}),this['listenTo'](_0x12f9c4,'remove',(_0x582091,_0x1662e0)=>{this['_removeAnnotationFromBalloon'](_0x1662e0),_0x1662e0===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x32fe68,'change:visibleView',(_0x228a6b,_0x56fa57,_0x2a65ae,_0x278743)=>{_0x278743&&this['stopListening'](_0x278743);const _0x3a3193=_0x12f9c4['getByView'](_0x2a65ae);_0x2a65ae&&_0x3a3193&&(this['listenTo'](_0x2a65ae,'change:height',()=>{_0x32fe68['updatePosition']();}),this['listenTo'](_0x2a65ae,'Esc',()=>{this['_closeAnnotation'](_0x3a3193),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x3a3193&&this['setActiveAnnotation'](_0x3a3193));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x32fe68['visibleView']&&_0x12f9c4['getByView'](_0x32fe68['visibleView'])&&_0x32fe68['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 _0x3973a7('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x28f9c6 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x28f9c6);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x564bb9){for(const _0x294249 of this['_selectedAnnotations'])_0x564bb9['includes'](_0x294249)||this['_manuallyClosed']['delete'](_0x294249);for(const _0x10d0dc of this['annotations'])_0x564bb9['includes'](_0x10d0dc)||this['_removeAnnotationFromBalloon'](_0x10d0dc);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x4d2038 of _0x564bb9)this['_addAnnotationToBalloon'](_0x4d2038);}this['_selectedAnnotations']=_0x564bb9;}['_addAnnotationToBalloon'](_0x1a08f8,_0x5dd05c=!0x1){this['_manuallyClosed']['has'](_0x1a08f8)||(this['_addedAnnotations']['has'](_0x1a08f8)||this['_balloon']['hasView'](_0x1a08f8['view'])||(this['_addedAnnotations']['add'](_0x1a08f8),this['_balloon']['add']({'stackId':_0x1a08f8['view']['id'],'view':_0x1a08f8['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x1a08f8)}})),_0x5dd05c&&this['_balloon']['showStack'](_0x1a08f8['view']['id']));}['_getBalloonTargetForAnnotation'](_0x5cb2ef){const _0xdea8d3=_0x5cb2ef['target'],_0x6d3f26=this['editor']['editing']['view'],_0x2e3d68=_0x6d3f26['document']['selection']['getFirstRange'](),_0x3451cc=_0x6d3f26['domConverter']['viewRangeToDom'](_0x2e3d68);if(_0x3451cc['collapse'](!0x0),_0xdea8d3){if(_0xdea8d3 instanceof _0x3f7499)return _0xdea8d3;let _0x12d990=[];for(const _0x4d405d of _0xdea8d3)_0x12d990['push'](..._0x3f7499['getDomElementRects'](_0x4d405d));_0x12d990=function(_0x5b0ac9){const _0x275bb4=[];let _0x8d0f40=_0x5b0ac9[0x0];for(let _0xf03250=0x1;_0xf03250<_0x5b0ac9['length'];_0xf03250++)if(Pi(_0x8d0f40,_0x5b0ac9[_0xf03250])){const _0x8d4563=_0x5b0ac9[_0xf03250]['width'];_0x8d0f40['width']+=_0x8d4563,_0x8d0f40['right']+=_0x8d4563;}else _0x275bb4['push'](_0x8d0f40),_0x8d0f40=_0x5b0ac9[_0xf03250];return _0x275bb4['push'](_0x8d0f40),_0x275bb4;}(_0x12d990);const _0x1f8766=_0x3451cc['getBoundingClientRect']();return _0x12d990['find'](_0x3fe822=>_0x3fe822['top']<=_0x1f8766['top']&&_0x3fe822['bottom']>=_0x1f8766['bottom']&&_0x3fe822['left']<=_0x1f8766['left']&&_0x3fe822['right']>=_0x1f8766['right'])||_0x12d990[0x0];}return _0x5cb2ef['targetRect']||_0x3451cc;}['_removeAnnotationFromBalloon'](_0x374ce9){this['_addedAnnotations']['has'](_0x374ce9)&&this['_balloon']['hasView'](_0x374ce9['view'])&&(this['_addedAnnotations']['delete'](_0x374ce9),this['_balloon']['remove'](_0x374ce9['view']));}['_closeAnnotation'](_0x46188e){this['_manuallyClosed']['add'](_0x46188e),this['_removeAnnotationFromBalloon'](_0x46188e);}};function Pi(_0x585ac2,_0x2226b4){return _0x585ac2['top']===_0x2226b4['top']&&_0x585ac2['bottom']===_0x2226b4['bottom']&&_0x585ac2['right']===_0x2226b4['left'];}var Li=class extends ht{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x6d1936,_0xde6e8c){super(_0x6d1936),this['set']('isEmpty',!_0xde6e8c['length']),this['focusTracker']=new _0x17ba74(),this['_annotationViews']=_0xde6e8c,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new et({'focusables':_0xde6e8c,'focusTracker':this['focusTracker']}),this['listenTo'](_0xde6e8c,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0xde6e8c,'remove',(_0x325709,_0xa942e0)=>{_0xa942e0['isActive']&&this['focus'](),_0xde6e8c['length']||(this['isEmpty']=!0x0);});const _0x2ff769=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':Et(_0x6d1936,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0xde6e8c},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x2ff769['if']('isEmpty','ck-hidden',_0x4f3fcd=>!_0x4f3fcd)]},'children':[{'text':Et(_0x6d1936,'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 _0x4cb533 of this['_annotationViews'])this['focusTracker']['add'](_0x4cb533['element']);this['_annotationViews']['on']('change',(_0x27363c,{added:_0x56e62f,removed:_0x63d444})=>{for(const _0x38fbe4 of _0x56e62f)this['focusTracker']['add'](_0x38fbe4['element']);for(const _0x2eee25 of _0x63d444)this['focusTracker']['remove'](_0x2eee25['element']);});}},Di=class extends _0x584f12{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[oi,ti];}constructor(_0x1a6ef4){super(_0x1a6ef4),this['archivedThreads']=new _0x55d760();}['init'](){const _0x480403=this['context'],_0x321fd1=_0x480403['plugins']['get'](oi),_0x1c0865=_0x480403['plugins']['get'](ti);this['listenTo'](_0x321fd1,'addCommentThread',(_0x55f0b8,{threadId:_0x23afb5})=>{const _0x22129c=_0x321fd1['getCommentThread'](_0x23afb5);_0x22129c['archivedAt']&&this['archivedThreads']['add'](_0x22129c,this['_calculatePosition'](_0x22129c['archivedAt'])),this['listenTo'](_0x22129c,'change:archivedAt',(_0x1a6570,_0x5ad876,_0x5452a2)=>{_0x5452a2?this['archivedThreads']['has'](_0x22129c)||this['archivedThreads']['add'](_0x22129c,this['_calculatePosition'](_0x22129c['archivedAt'])):this['archivedThreads']['has'](_0x22129c)&&this['archivedThreads']['remove'](_0x22129c);});}),this['listenTo'](_0x321fd1,'removeCommentThread',(_0x3f48eb,{threadId:_0x214c58})=>{const _0x58b7ce=_0x321fd1['getCommentThread'](_0x214c58);this['stopListening'](_0x58b7ce),this['archivedThreads']['has'](_0x58b7ce)&&this['archivedThreads']['remove'](_0x58b7ce);},{'priority':'highest'}),this['listenTo'](_0x1c0865['collection'],'focus',(_0x403011,_0x27dffa)=>{_0x27dffa['isVisible']||(_0x27dffa['isActive']=!0x0,_0x1c0865['activate'](_0x27dffa));});}['_calculatePosition'](_0x4f7069){const _0x31c626=[...this['archivedThreads']]['findIndex'](_0x4a3381=>_0x4a3381['archivedAt']<_0x4f7069);return _0x31c626>-0x1?_0x31c626:this['archivedThreads']['length'];}},Vi=class extends _0x580aef{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Di,_0x4abe2b];}constructor(_0x1bdcb2){super(_0x1bdcb2),this['annotationViews']=new at(),this['_pendingThreads']=[];}['init'](){const _0x2a20f5=this['editor'],_0x102570=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x2a20f5['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x352ef3,!0x0)),_0x2a20f5['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x4233da=this['_createCommentsArchiveButton'](rt);return _0x4233da['set']({'role':'menuitemcheckbox'}),_0x4233da;});const _0x376d53=_0x2a20f5['plugins']['get'](Di),_0x492134=_0x2a20f5['plugins']['get']('Annotations'),_0x905e4c=_0x2a20f5['plugins']['get']('CommentsRepository');_0x376d53['archivedThreads']['forEach'](_0x4a63fb=>{this['_handleNewThread'](_0x4a63fb);}),this['listenTo'](_0x376d53['archivedThreads'],'add',(_0x4edfd5,_0x604196)=>{this['_handleNewThread'](_0x604196);}),this['listenTo'](_0x492134['collection'],'add',(_0x2346f9,_0x421429)=>{const _0x48e630=this['_pendingThreads']['find'](_0x44bbd0=>{const _0x1983a3=_0x905e4c['_threadToController']['get'](_0x44bbd0);return _0x1983a3&&_0x421429['innerView']===_0x1983a3['view'];});if(_0x48e630){const _0xf0f888=this['_calculatePosition'](_0x48e630['archivedAt']);this['_addAnnotationToArchive'](_0x421429,_0xf0f888),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x48e630),0x1);}}),this['listenTo'](_0x376d53['archivedThreads'],'remove',(_0x3387eb,_0x2f6135)=>{const _0x587ff5=_0x2a20f5['config']['get']('collaboration.channelId');if(!_0x587ff5||_0x2f6135['channelId']===_0x587ff5){if(this['_pendingThreads']['includes'](_0x2f6135))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2f6135),0x1);else{const _0x30c52f=_0x905e4c['_threadToController']['get'](_0x2f6135),_0x39a257=_0x492134['getByInnerView'](_0x30c52f['view']);this['annotationViews']['remove'](_0x39a257['view']),this['stopListening'](_0x39a257),this['stopListening'](_0x39a257['focusableElements']);}}}),this['listenTo'](_0x492134['collection'],'add',(_0xb658f1,_0x404455)=>{this['listenTo'](_0x404455,'escape',_0x102570);}),this['listenTo'](_0x492134['collection'],'remove',(_0x3fc3cf,_0x546d11)=>{this['stopListening'](_0x546d11,'escape',_0x102570);});}['_addAnnotationToArchive'](_0x568f1e,_0x40ac76){this['listenTo'](_0x568f1e,'set:isVisible',_0x54c2ee=>{_0x54c2ee['return']=!0x1,_0x54c2ee['stop']();}),this['annotationViews']['add'](_0x568f1e['view'],_0x40ac76);}['_handleNewThread'](_0x1c88f3){const _0x40c034=this['editor']['plugins']['get']('CommentsRepository'),_0x5a6af3=this['editor']['plugins']['get']('Annotations'),_0x41ce44=this['editor']['config']['get']('collaboration.channelId');if(!_0x41ce44||_0x1c88f3['channelId']===_0x41ce44){const _0xf0240c=_0x40c034['_threadToController']['get'](_0x1c88f3);if(!_0xf0240c)return void this['_pendingThreads']['push'](_0x1c88f3);const _0x4c8231=this['_calculatePosition'](_0x1c88f3['archivedAt']),_0x5ba9cb=_0x5a6af3['getByInnerView'](_0xf0240c['view']);_0x5ba9cb['isVisible']&&_0x5a6af3['_visibleAnnotations']['remove'](_0x5ba9cb),this['_addAnnotationToArchive'](_0x5ba9cb,_0x4c8231);}}['_calculatePosition'](_0x5040a4){const _0x4a1de1=this['editor']['config']['get']('collaboration.channelId'),_0x2703f5=[...this['editor']['plugins']['get'](Di)['archivedThreads']]['filter'](_0x37ef82=>_0x37ef82['channelId']===_0x4a1de1)['findIndex'](_0x4749c4=>_0x4749c4['archivedAt']<_0x5040a4);return _0x2703f5<0x0||_0x2703f5>this['annotationViews']['length']?this['annotationViews']['length']:_0x2703f5-0x1;}['_toggleDialog'](){const _0x2fb16e=this['editor'],_0x196182=_0x2fb16e['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Li(_0x2fb16e['locale'],this['annotationViews'])),'commentsArchive'===_0x196182['id']?_0x196182['hide']():_0x196182['show']({'id':'commentsArchive','title':Et(_0x2fb16e['locale'],'COMMENTS_ARCHIVE'),'icon':_0x104917,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0xdcd457['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x50c410,_0x464c0d=!0x1){const _0x5cf364=this['editor']['locale'],_0x184f21=this['editor']['plugins']['get']('Dialog'),_0x3badad=new _0x50c410(_0x5cf364);return _0x3badad['bind']('isEnabled')['to'](this,'isEnabled'),_0x3badad['bind']('isOn')['to'](_0x184f21,'id',_0x294008=>'commentsArchive'===_0x294008),_0x3badad['set']({'label':Et(_0x5cf364,'COMMENTS_ARCHIVE'),'icon':_0x104917,'isToggleable':!0x0}),_0x464c0d&&(_0x3badad['tooltip']=!0x0),this['listenTo'](_0x3badad,'execute',()=>this['_toggleDialog']()),_0x3badad;}['_hideDialogOnAnnotationEscape']=_0xf77f63=>{const _0xc53205=_0xf77f63['source'];if(!this['annotationViews']['has'](_0xc53205['view']))return;const _0x57c213=this['editor']['plugins']['get']('Dialog');_0x57c213['isOpen']&&'commentsArchive'===_0x57c213['id']&&(_0x57c213['hide'](),_0xf77f63['stop']());};},Bi=class extends _0x580aef{static get['requires'](){return[oi,wi,vi,Di,Vi,yi,Mi,Si,xi];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{ci as AddCommentThreadCommand,$t as Annotation,Jt as AnnotationCollection,Ri as AnnotationCounterButtonView,qt as AnnotationView,ti as Annotations,Ei as AnnotationsSidebarItemView,Ii as AnnotationsSidebarView,Ti as AnnotationsUIs,Ht as BaseCommentThreadView,Kt as BaseCommentView,hi as Comment,ri as CommentThread,bt as CommentThreadController,xt as CommentThreadInputView,Ut as CommentThreadView,Yt as CommentView,Bi as Comments,Di as CommentsArchive,Vi as CommentsArchiveUI,wi as CommentsEditing,Lt as CommentsListView,yi as CommentsOnly,oi as CommentsRepository,vi as CommentsUI,di as EditorAnnotations,xi as InlineAnnotations,Si as NarrowSidebar,ki as Sidebar,Mi as WideSidebar,Qt as bindAnnotationCollections};
|