@ckeditor/ckeditor5-comments 46.1.1-alpha.1 → 46.1.1-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/comments.js +1 -1
- package/dist/index.js +11 -11
- package/package.json +18 -18
- package/src/comments/commentsediting.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Qt)());constructor(_0xf05c66={}){function _0x3dd676(_0x5bfd2b){return _0x5bfd2b['map'](_0x2285ed=>String['fromCharCode'](_0x2285ed))['join']('');}(_0xf05c66=Object['assign']({},_0xf05c66))['plugins']||(_0xf05c66['plugins']=Rt['defaultPlugins']),super(_0xf05c66),this['ui']=new Ft(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x3dd676([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3dd676([0x76,0x69,0x65,0x77])][_0x3dd676([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3dd676([0x61,0x75,0x74,0x6f]),this[_0x3dd676([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x3dd676([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3dd676([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x3dd676([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x3dd676([0x6f,0x6b])});}['create'](){const _0x3cca89=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x3cca89))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x46ea2d=>{const _0x237851=this['model']['document']['getRoot'](),_0x4430d3=_0x237851&&_0x237851['getChild'](_0x237851['childCount']-0x1);_0x46ea2d['setSelection'](_0x4430d3,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x1374f8=this['editing']['view'],_0xccd9f3=_0x1374f8['document']['getRoot'](),_0x2d7fef=_0xccd9f3['getChild'](0x0);_0xccd9f3['childCount']>0x1||!_0x2d7fef||'p'!=_0x2d7fef['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x1374f8,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x2d7fef['placeholder']=this['placeholder']),St({'view':_0x1374f8,'element':_0x2d7fef,'keepOnFocus':!0x0}),this['placeholderElement']=_0x2d7fef);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x5ed39b,_0x462f21={}){super(_0x5ed39b),this['editor']=null,this['_editorConfig']=_0x462f21,this['set']('value',_0x462f21['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x5ed39b,'Reply...')),this['set']('submitLabel',N(_0x5ed39b,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0xeb7998(),this['focusCycler']=new _0x2fb93a({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x51c15b,_0x4b904f)=>{this['cancelButtonView']['fire']('execute'),_0x4b904f();}),this['keystrokes']['set']('Ctrl+Enter',(_0x25b599,_0x3763fc)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x3763fc());}),this['on']('submit',(_0x442cd8,_0x475c03)=>{_0x475c03['length']>0xfde8?(alert(N(_0x5ed39b,'TOO_LONG_COMMENT_ALERT',[_0x475c03['length'],0xfde8])),_0x442cd8['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 _0x274441=this['editor'];this['element']['insertBefore'](_0x274441['ui']['element'],this['element']['firstChild']),_0x274441['model']['document']['on']('change',()=>this['value']=_0x274441['getData']()),_0x274441['bind']('placeholder')['to'](this),this['focusables']['add'](_0x274441['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x52a7e7){-0x1===_0x52a7e7?(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:_0x445597}=this,_0x15e925=new _0x56f2fa(_0x445597);return _0x15e925['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x15e925['withText']=!0x0,_0x15e925['bind']('label')['to'](this,'submitLabel'),_0x15e925['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x15e925['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x5b2746,_0x386187)=>!_0x386187&&!!_0x5b2746['trim']()),_0x15e925;}['_createCancelButton'](){const {locale:_0x1de053}=this,_0x16a49a=new _0x56f2fa(_0x1de053);return _0x16a49a['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x16a49a['label']=N(_0x1de053,'Cancel'),_0x16a49a['withText']=!0x0,_0x16a49a['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x16a49a;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x3e283f=>{this['focusTracker']['add'](_0x3e283f['element']);}),this['focusables']['on']('change',(_0x381112,_0x4ae2cd)=>{for(const _0x3b24a2 of Array['from'](_0x4ae2cd['added'])['reverse']())this['focusTracker']['add'](_0x3b24a2['element']);});}}class ie extends kt{constructor(_0x5380a4,_0x4add55,_0x2376fe){super(_0x5380a4),this['commentInputView']=new os(_0x5380a4,_0x2376fe),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x532e97,_0x1be79a)=>_0x532e97||!!_0x1be79a),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 _0x5d5a77(_0x5380a4,_0x4add55),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'](_0x1ddaeb){this['commentInputView']['focus'](_0x1ddaeb);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x1561c3,_0xbf6ef5)=>{const {submitButtonView:_0x110362,cancelButtonView:_0x461087,editor:_0x26b2af}=this['commentInputView'];[_0x110362['element'],_0x461087['element'],_0x26b2af?_0x26b2af['editing']['view']['getDomRoot']():null]['filter'](_0xf18629=>_0xf18629)['some'](_0x4db36e=>_0x4db36e['contains'](_0xbf6ef5['target']))||(this['focus'](),_0xbf6ef5['preventDefault']());});}}class rs extends kt{constructor(_0xc74c7d){super(_0xc74c7d);const _0x8ab2fe=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x8ab2fe['to']('count',_0x515c49=>N(_0xc74c7d,'NUMBER_OF_COMMENTS',_0x515c49))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x5e60ea,_0x22147e,_0x544d2b){super(_0x5e60ea);const _0x4f5630=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x22147e['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x22147e,this['_config']=_0x544d2b,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0xeb7998(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2fb93a({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x29f7a8=>this['commentViews']['map'](_0xd96607=>_0xd96607['element'])['includes'](_0x29f7a8['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x5e60ea),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0xee7be1=>_0xee7be1-this['_config']['maxCommentsWhenCollapsed']);for(const _0x5e17e1 of _0x22147e['comments'])this['_handleNewCommentModel'](_0x5e17e1);this['_handleInfoComment'](),this['listenTo'](_0x22147e['comments'],'add',(_0x1f2fe,_0x3f38f8)=>{const _0x234a15=this['_calculatePosition'](_0x3f38f8);this['length']++,this['_handleNewCommentModel'](_0x3f38f8,_0x234a15),this['refreshVisibleViews']();}),this['listenTo'](_0x22147e['comments'],'remove',(_0x47130a,_0x2c65fe)=>{this['length']--,this['_handleRemoveCommentModel'](_0x2c65fe),this['refreshVisibleViews']();}),this['listenTo'](_0x22147e,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x22147e,'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',_0x4f5630['if']('length','ck-hidden',_0x42c213=>!_0x42c213)],'aria-label':N(_0x5e60ea,'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'](_0x430e26){-0x1===_0x430e26?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x4723f4 of this['commentViews'])_0x4723f4['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x24c3b4,_0x2e6465){const _0x697671=new this['_config']['CommentView'](this['locale'],_0x24c3b4,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x697671['viewUid']=_0x24c3b4['id'],_0x697671['delegate']('removeComment')['to'](this),_0x697671['delegate']('updateComment')['to'](this),_0x697671['delegate']('resolveCommentThread')['to'](this),_0x697671['delegate']('editorReady')['to'](this),_0x697671['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x697671,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x697671,_0x2e6465);}['_calculatePosition'](_0x52d0ce){const _0x1783e8=this['_model']['_findOptimalIndex'](_0x52d0ce);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x52d0ce['authoredAt']?_0x1783e8-0x1:_0x1783e8:_0x1783e8-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x54bbb9={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x54bbb9,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x54bbb9));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x39edcb){const _0x3dde39=this['commentViews']['remove'](_0x39edcb['id']);this['stopListening'](_0x3dde39),_0x3dde39['isEditMode']&&this['_updateHasDirtyComment'](),_0x3dde39['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x186c43=>_0x186c43['isEditMode']);}['_rearrangeCollapse'](){const _0x4f8df3=function(_0x2aee0f){const _0x412ba2=new _0x1b1bd5();for(const _0x38f1e7 of _0x2aee0f)_0x412ba2['add'](_0x38f1e7);return _0x412ba2;}(this['commentViews']),_0x3563a8=this['_collapsedCommentsView']['count'];for(let _0x507c3c=0x1;_0x507c3c<=_0x3563a8;_0x507c3c++)_0x4f8df3['remove'](0x1);for(const _0x191dde of _0x4f8df3)_0x191dde['collapse']();_0x3563a8>0x0&&_0x4f8df3['add'](this['_collapsedCommentsView'],0x1),ns(_0x4a1d9a(Array['from'](this['visibleViews']),Array['from'](_0x4f8df3)),this['visibleViews'],_0x4f8df3);}['_rearrangeExpand'](){ns(_0x4a1d9a(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x173c97 of this['visibleViews'])_0x173c97['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x1bcf72=>{this['focusTracker']['add'](_0x1bcf72['element']),this['keystrokes']['listenTo'](_0x1bcf72['element']);}),this['commentViews']['on']('change',(_0x1c8808,_0x84e82)=>{for(const _0xf7189a of _0x84e82['removed'])this['focusTracker']['remove'](_0xf7189a['element']),this['keystrokes']['stopListening'](_0xf7189a['element']);for(const _0x39c2d2 of Array['from'](_0x84e82['added'])['reverse']())this['focusTracker']['add'](_0x39c2d2['element']),this['keystrokes']['listenTo'](_0x39c2d2['element']);});}}function ns(_0x44ffb4,_0x241540,_0x5074cd){let _0x4a4145=0x0;for(const _0x376e19 of _0x44ffb4)switch(_0x376e19){case'insert':_0x241540['add'](_0x5074cd['get'](_0x4a4145),_0x4a4145),_0x4a4145++;break;case'delete':_0x241540['remove'](_0x4a4145);break;case'equal':_0x4a4145++;}}class oe extends kt{constructor(_0x3c1a87){super(_0x3c1a87);const _0x454886=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x454886['to']('contextValue',_0x51a388=>N(_0x3c1a87,'THREAD_CONTEXT_LABEL',_0x51a388)),'tabindex':-0x1},'children':[{'text':_0x454886['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x446176,_0x5debd9){super(_0x446176);const _0x62d8a0=this['bindTemplate'];this['_model']=_0x5debd9,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0xeb7998(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2fb93a({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x591c1f=>!!_0x591c1f),this['bind']('contextValue')['to'](this['_model'],'context',_0x5a0c03=>_0x5a0c03&&_0x5a0c03['value']?this['_trimContextValue'](_0x5a0c03['value']):N(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',_0x62d8a0['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 _0x17fb88=new _0x56f2fa(this['locale']);return _0x17fb88['label']=N(this['locale'],'Reopen'),_0x17fb88['tooltip']=N(this['locale'],'Reopen'),_0x17fb88['icon']=_0x2ba54b,_0x17fb88['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2b3f21=>!_0x2b3f21),_0x17fb88['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x782a30,_0x3d9953)=>_0x782a30&&_0x3d9953),_0x17fb88['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x17fb88;}['_trimContextValue'](_0x5de310){if(_0x5de310['length']<0x96)return _0x5de310;const _0x408890=_0x5de310['lastIndexOf']('\x20',0x93);return _0x5de310['substring'](0x0,_0x408890>-0x1?_0x408890:0x93)+'...';}['_attachContextActions'](){const _0x5587cc=this['element']['querySelector']('.ck-context'),_0x1b831c=_0x5587cc['querySelector']('.ck-context__value');this['listenTo'](_0x5587cc,'mouseenter',()=>{_0x1b831c['offsetWidth']<_0x1b831c['scrollWidth']&&_0x5587cc['classList']['add']('overlay');}),this['listenTo'](_0x5587cc,'mouseleave',()=>{_0x5587cc['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x112add of this['focusables'])this['focusTracker']['add'](_0x112add['element']),this['keystrokes']['listenTo'](_0x112add['element']);}['_createContextView'](){const _0x1cec8c=new oe(this['locale']);return _0x1cec8c['bind']('contextValue')['to'](this),_0x1cec8c;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x1ca89a,_0x56a2f2,_0x177d22,_0x5911c8){super(_0x1ca89a),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x56a2f2,this['_localUser']=_0x177d22,this['_config']=_0x5911c8,this['commentThreadHeaderView']=new Yt(_0x1ca89a,_0x56a2f2),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x1ca89a,N(_0x1ca89a,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x1ca89a,_0x56a2f2,Object['assign']({'CommentView':this['_config']['CommentView']},_0x5911c8)),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',(_0x33e5f3,_0x33b9f3)=>_0x33e5f3||!!_0x33b9f3),this['bind']('isUnlinked')['to'](_0x56a2f2,'unlinkedAt',_0x4c0696=>!!_0x4c0696),this['bind']('ariaLabel')['to'](this,'length',_0x531c7b=>{const _0x328586=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x531c7b,_0x328586]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0xeb7998(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2fb93a({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x58250f=>_0x58250f['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),ts(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x4f7dc8=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x33819b=_0x4f7dc8['commentInputView'];return _0x4f7dc8['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x33819b,'value',(_0x52eef4,_0x578cdb,_0x5938a3,_0x2c86b6,_0x46aaee)=>!!_0x46aaee||!!_0x2c86b6&&_0x5938a3&&!_0x578cdb||_0x52eef4&&_0x5938a3&&!_0x578cdb),_0x33819b['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4df7f7,_0x27afdd,_0x11b3b4)=>{let _0x20accb;return _0x20accb=_0x11b3b4&&_0x27afdd?'Reply\x20to\x20reopen\x20discussion...':_0x4df7f7?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x20accb);}),_0x33819b['bind']('submitLabel')['to'](this,'length',_0x589ac7=>N(this['locale'],_0x589ac7?'Reply':'Comment')),_0x33819b['on']('submit',(_0x1113ce,_0x1c5883)=>{this['fire']('addComment',_0x1c5883),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x33819b['on']('cancel',()=>{this['focus']();}),_0x33819b['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x33819b['on']('cancel',_0x434e86=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x434e86['stop']());}),this['on']('change:isActive',(_0x4038f4,_0x3ffd60,_0x292520)=>{_0x292520||this['length']||_0x33819b['value']||this['fire']('removeCommentThread');}),_0x4f7dc8;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(di){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x240a0a(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x231bed,target:_0x16162c,type:_0x478cf6,isVisible:_0x5b79b2=!0x0}){super(),this['view']=_0x231bed,this['view']['element']||this['view']['render'](),this['_type']=_0x478cf6,this['_target']=_0x16162c,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x1b1bd5([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x225c3a,_0x4ebf21)=>{this['view']['focusTracker']['add'](_0x4ebf21);}),this['focusableElements']['on']('remove',(_0x4a6c49,_0x4244be)=>{this['view']['focusTracker']['remove'](_0x4244be);}),this['set']('isVisible',_0x5b79b2);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x57b684=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x57b684),_0x57b684;}get['targetRect'](){const _0x1fd539=this['target'];if(null===_0x1fd539)return null;if(_0x1fd539 instanceof _0x4d09a0)return _0x1fd539;const _0x75d601=_0x1fd539['filter'](_0x10f496=>function(_0x206500){const _0x117c87=_0x206500['offsetParent'];if(_0x117c87)return!0x0;const _0x255d87=_0x206500['getClientRects']()['item'](0x0);return!!_0x255d87;}(_0x10f496));return 0x0===_0x75d601['length']?null:new _0x4d09a0(_0x75d601[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x9ec5b0){this['view']['isActive']=_0x9ec5b0,this['view']['mainView']['isActive']=_0x9ec5b0;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x36b8af){if(!(null===_0x36b8af||_0x36b8af instanceof _0x4d09a0||Array['isArray'](_0x36b8af)&&_0x36b8af['every'](_0x498dc9=>fi(_0x498dc9))))throw new _0x3e31b7('annotation-invalid-target',null,{'target':_0x36b8af});}['_getNormalizedTarget'](){const _0x14e38b='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x14e38b)?[_0x14e38b]:_0x14e38b;}}function fi(_0x32a96d){return null!==_0x32a96d&&'object'==typeof _0x32a96d&&'nodeType'in _0x32a96d&&0x1===_0x32a96d['nodeType'];}class S extends _0x1b1bd5{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x23966a=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0xeb7998(),this['_focusTracker']['on']('change:isFocused',(_0x141804,_0x487655,_0x2fa4eb)=>{_0x2fa4eb||this['fire']('blur');});for(const _0x585133 of _0x23966a)this['add'](_0x585133);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x162337){if(this['has'](_0x162337))throw new _0x3e31b7('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x162337['innerView'],_0x162337),this['_viewToAnnotation']['set'](_0x162337['view'],_0x162337);for(const _0xa5fca5 of _0x162337['focusableElements'])this['_focusTracker']['add'](_0xa5fca5);this['listenTo'](_0x162337['focusableElements'],'add',(_0x96e666,_0x457860)=>{this['_focusTracker']['add'](_0x457860);}),this['listenTo'](_0x162337['focusableElements'],'remove',(_0x450981,_0x1570a6)=>{this['_focusTracker']['remove'](_0x1570a6);}),this['listenTo'](_0x162337['view']['focusTracker'],'change:isFocused',(_0x159de5,_0x27719f,_0x1662c5)=>{_0x1662c5&&this['fire']('focus',_0x162337);}),_0x162337['updateTargetRect']();const _0x1c3ad0=this['_getOrderInContent'](_0x162337['view']['targetRect']);return super['add'](_0x162337,_0x1c3ad0);}['remove'](_0x279690){if(!this['has'](_0x279690))throw new _0x3e31b7('annotationcollection-not-existing-item',null);this['stopListening'](_0x279690['view']['focusTracker']),this['stopListening'](_0x279690['focusableElements']);for(const _0x4353bb of _0x279690['focusableElements'])this['_focusTracker']['remove'](_0x4353bb);return this['_viewToAnnotation']['delete'](_0x279690['view']),this['_innerViewToAnnotation']['delete'](_0x279690['innerView']),super['remove'](_0x279690);}['getByInnerView'](_0x4b1965){return this['_innerViewToAnnotation']['get'](_0x4b1965);}['getByView'](_0x4d423c){return this['_viewToAnnotation']['get'](_0x4d423c);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x1718f7 of this)_0x1718f7['updateTargetRect']();this['_sort']();}['_sort'](){const _0xf5a083=Array['from'](this)['sort']((_0xfc7cc4,_0x39e650)=>w(_0xfc7cc4['view']['targetRect'],_0x39e650['view']['targetRect']));for(let _0x240438=_0xf5a083['length']-0x1;_0x240438>0x0;_0x240438--){const _0x17340c=_0xf5a083[_0x240438];_0x240438!==this['getIndex'](_0x17340c)&&(this['remove'](_0x17340c),this['add'](_0x17340c));}}['_getOrderInContent'](_0x20dbe2){let _0x29d02a=0x0;if(!_0x20dbe2)return this['length'];for(const _0x300252 of this){const _0x33e464=_0x300252['view']['targetRect'];if(_0x33e464){if(w(_0x20dbe2,_0x33e464)<0x0)return _0x29d02a;_0x29d02a++;}}return _0x29d02a;}}function v({source:_0x40126b,target:_0x2803b0,filter:_0x2c53e6}){for(const _0x3dabf9 of _0x40126b)_0x2c53e6(_0x3dabf9)&&_0x2803b0['add'](_0x3dabf9);_0x2803b0['listenTo'](_0x40126b,'add',(_0x51d31a,_0x366ec8)=>{_0x2c53e6(_0x366ec8)&&_0x2803b0['add'](_0x366ec8);}),_0x2803b0['listenTo'](_0x40126b,'remove',(_0x1f2f4f,_0x7cc647)=>{_0x2803b0['has'](_0x7cc647)&&_0x2803b0['remove'](_0x7cc647);});}function w(_0x32452c,_0x4f4dd7){if(null===_0x32452c&&null===_0x4f4dd7)return 0x0;if(null===_0x32452c)return-0x1;if(null===_0x4f4dd7)return 0x1;const _0x43c140=_0x32452c['top']-_0x4f4dd7['top'];return 0x0==_0x43c140?_0x32452c['left']-_0x4f4dd7['left']:_0x43c140;}class y extends _0x5769e4{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x76a85d){if(super(_0x76a85d),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x76a85d instanceof _0x3b8c1f){const _0x5e0cac=_0x76a85d['locale'];_0x76a85d['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x5e0cac,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x5e0cac,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x5e0cac,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x5e0cac,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x5e0cac,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x5e0cac,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x5e0cac,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x3300e5){this['collection']['add'](_0x3300e5);}['remove'](_0x5a4c89){this['collection']['remove'](_0x5a4c89),_0x5a4c89['destroy']();}['refreshVisibility'](){for(const _0x4d81d5 of this['collection'])_0x4d81d5['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x27b457){return this['collection']['getByInnerView'](_0x27b457);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x1d0b3f of this['collection'])_0x1d0b3f['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x5b9ee1){this['fire']('_activateAnnotation',_0x5b9ee1);}['createAnnotation'](_0xbe7405){return new T(_0xbe7405);}['createAnnotationView'](_0x1444da,_0x38a2cc){return new E(_0x1444da,_0x38a2cc);}['_addActiveAnnotation'](_0x47401a){const _0xf527cd=new Set(this['activeAnnotations']);_0xf527cd['add'](_0x47401a),this['activeAnnotations']=_0xf527cd;}['_removeActiveAnnotation'](_0xfc47c6){const _0x5198e5=new Set(this['activeAnnotations']);_0x5198e5['delete'](_0xfc47c6),this['activeAnnotations']=_0x5198e5;}['_bindAnnotationsToVisibleAnnotations'](){const _0x5af278=this['collection'],_0xb392a7=this['_visibleAnnotations'];function _0x38dd48(_0x3e1288){const _0xff385a=_0x3e1288['source'];_0xff385a['isVisible']&&!_0xb392a7['has'](_0xff385a)?_0xb392a7['add'](_0xff385a):!_0xff385a['isVisible']&&_0xb392a7['has'](_0xff385a)&&_0xb392a7['remove'](_0xff385a),_0xff385a['view']['focusTracker']['remove'](_0xff385a['view']['element']),_0xff385a['view']['focusTracker']['add'](_0xff385a['view']['element']);}this['listenTo'](_0x5af278,'add',(_0x4441d8,_0x763bf8)=>{_0x763bf8['isVisible']&&_0xb392a7['add'](_0x763bf8),this['listenTo'](_0x763bf8,'change:isVisible',_0x38dd48);}),this['listenTo'](_0x5af278,'remove',(_0x3ef44f,_0x3db0dd)=>{_0xb392a7['has'](_0x3db0dd)&&_0xb392a7['remove'](_0x3db0dd),this['stopListening'](_0x3db0dd,'change:isVisible',_0x38dd48);});}['_setupEnterAnnotationKeystroke'](){const _0x17f737=_0x1641f6=>{_0x1641f6['on']('ready',()=>{_0x1641f6['keystrokes']['set'](_0x48ecb2,(_0x1a8ecc,_0x5e2710)=>{const _0x2f9784=_0xa7a780(this['activeAnnotations']['values']());_0x2f9784&&(_0x2f9784['view']['focus'](),_0x5e2710());});});};this['context']instanceof _0x3b8c1f?_0x17f737(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x7a5222,_0x1dcdc5)=>{_0x17f737(_0x1dcdc5);});}['_setupEscapeAnnotationHandling'](){const _0x35585b=_0x4a4d8a=>{const _0x307c93=_0x4a4d8a['source'],_0x5875f5=[];let _0x3431f2;if(Array['isArray'](_0x307c93['target'])){_0x3431f2=_0x307c93['target'][0x0],this['context']instanceof _0x3b8c1f?_0x5875f5['push'](this['context']):this['context']['editors']&&_0x5875f5['push'](...this['context']['editors']);for(const _0x263375 of _0x5875f5)for(const _0x58d79a of _0x263375['editing']['view']['domRoots']['values']())if(_0x58d79a['contains'](_0x3431f2))return void _0x263375['editing']['view']['focus']();_0x3431f2['focus']();}};this['listenTo'](this['collection'],'add',(_0x59b940,_0x40786a)=>{this['listenTo'](_0x40786a,'escape',_0x35585b,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x1e66c0,_0x5c7fa4)=>{this['stopListening'](_0x5c7fa4,'escape',_0x35585b);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x5769e4{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2354cf){super(_0x2354cf),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x1142cf=this['context']['config'];_0x1142cf['define']('comments.maxCommentsWhenCollapsed',0x2),_0x1142cf['define']('comments.maxThreadTotalWeight',0x1f4),_0x1142cf['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x1142cf['define']('comments.CommentThreadView',gt),_0x1142cf['define']('comments.CommentView',Tt),_0x1142cf['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x3be396=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x1cc69f,_0x124daa)=>this['_addCommentThread'](_0x124daa)),this['on']('submitCommentThread',(_0x2bda4b,_0x1106a9)=>this['_submitCommentThread'](_0x1106a9)),this['on']('resolveCommentThread',(_0xa9d0d,_0x12505b)=>this['_resolveCommentThread'](_0x12505b)),this['on']('resolveCommentThread',(_0x4ceb2b,_0xf28e14)=>this['_updateActiveAnnotation'](_0xf28e14),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x5ac771,_0x10c926)=>this['_reopenCommentThread'](_0x10c926)),this['on']('reopenCommentThread',(_0x3c4fc2,_0x23558b)=>this['_updateActiveAnnotation'](_0x23558b),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x47b7a1,_0x171d9c)=>this['_removeCommentThread'](_0x171d9c)),this['on']('updateCommentThread',(_0x1379ff,_0x1c3fef)=>this['_updateCommentThread'](_0x1c3fef)),this['on']('updateCommentThread',(_0x508023,_0x17484e)=>this['_updateActiveAnnotation'](_0x17484e),{'priority':'lowest'}),this['on']('addComment',(_0x32aefe,_0x2152cd)=>this['_addComment'](_0x2152cd)),this['on']('updateComment',(_0x4bc1da,_0x278b7e)=>this['_updateComment'](_0x278b7e)),this['on']('removeComment',(_0x1f4c57,_0x9827ea)=>this['_removeComment'](_0x9827ea)),this['on']('addComment',(_0x5bf288,{threadId:_0x25cd0f,isFromAdapter:_0xae1e83})=>{if(_0xae1e83)return;const _0x53218f=this['getCommentThread'](_0x25cd0f),_0x11f776=_0x53218f&&this['_threadToController']['get'](_0x53218f);_0x11f776&&_0x11f776['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x3be396,'change:activeAnnotations',(_0x4529f8,_0x5b3b8d,_0x167a3f)=>{const _0xc46b81=Array['from'](_0x167a3f)['map'](_0x208f7b=>this['_viewToController']['get'](_0x208f7b['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0xc46b81?_0xc46b81['model']:null;});}set['adapter'](_0x510e5c){if(this['_adapter'])throw new _0x3e31b7('commentsrepository-adapter-already-set');this['_adapter']=_0x510e5c;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x51060f=_t,threadId:_0x26c744=_0x4e4e67(),comments:_0x3c666b=[],unlinkedAt:_0x56bec1=null,resolvedAt:_0x59ae82=null,resolvedBy:_0x43dd9d=null,target:_0x4e7176=null,context:_0x1eb3b1=null,attributes:_0x3ef044={},isResolvable:_0x1f5ca4=!0x0,isSubmitted:_0x3ee63d=!0x1,isFromAdapter:_0x1807dc=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x51060f),{'channelId':_0x51060f,'threadId':_0x26c744,'comments':_0x3c666b,'unlinkedAt':_0x56bec1,'resolvedAt':_0x59ae82,'resolvedBy':_0x43dd9d,'target':_0x4e7176,'context':_0x1eb3b1,'attributes':_0x3ef044,'isFromAdapter':_0x1807dc,'isResolvable':_0x1f5ca4,'isSubmitted':_0x3ee63d}),this['getCommentThread'](_0x26c744);}['openNewCommentThread']({channelId:_0x3aadd6=_t,threadId:_0x3c5605=_0x4e4e67(),target:_0x527afc,context:_0x4ae6d0=null,isResolvable:_0x2fcd94=!0x0}){if(this['_readOnlyChannels']['has'](_0x3aadd6)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x527afc)throw new _0x3e31b7('commentsrepository-missing-target');const _0x441eed=this['addCommentThread']({'channelId':_0x3aadd6,'threadId':_0x3c5605,'target':_0x527afc,'context':_0x4ae6d0,'isResolvable':_0x2fcd94});if(!_0x441eed)return null;const _0x1ebef8=this['_threadToController']['get'](_0x441eed),_0x2cfa85=_0x1ebef8['view']['commentThreadInputView']['commentInputView'],_0xd0fe22=this['context']['plugins']['get'](y),_0x1de9a6=_0xd0fe22['getByInnerView'](_0x1ebef8['view']);return _0xd0fe22['activate'](_0x1de9a6),_0x2cfa85['once']('editorReady',()=>_0x2cfa85['focus']()),_0x441eed;}['hasCommentThread'](_0x241eb9){if('string'!=typeof _0x241eb9)throw new _0x3e31b7('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x241eb9);}['updateCommentThread']({channelId:_0x3bcda1=_t,threadId:_0x575dab,context:_0x31fac9,unlinkedAt:_0x412e88,attributes:_0x51a7b6,isFromAdapter:_0x3c617d=!0x1}){return this['fire'](Nt('updateCommentThread',_0x3bcda1),{'channelId':_0x3bcda1,'threadId':_0x575dab,'context':_0x31fac9,'unlinkedAt':_0x412e88,'attributes':_0x51a7b6,'isFromAdapter':_0x3c617d}),this['getCommentThread'](_0x575dab);}['getCommentThread'](_0x53bef8){if('string'!=typeof _0x53bef8)throw new _0x3e31b7('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x53bef8);}['fetchCommentThread']({channelId:_0x23e2e0,threadId:_0x4d7036}={}){const _0x323589=this['getCommentThread'](_0x4d7036);if(_0x323589)return Promise['resolve'](_0x323589);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x3e31b7('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x23e2e0,'threadId':_0x4d7036})['then'](_0x206fa0=>this['hasCommentThread'](_0x4d7036)?this['getCommentThread'](_0x4d7036):_0x206fa0?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x23e2e0},_0x206fa0)):void 0x0)['catch'](_0x37d3e9=>{throw console['error'](_0x37d3e9),new _0x3e31b7('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x9951ac,skipNotAttached:_0x12d15f=!0x1,skipEmpty:_0x210baa=!0x1,toJSON:_0x292305=!0x1}={}){const _0x3212ed=[];for(const _0x408f94 of this['_threads']['values']())_0x9951ac&&_0x408f94['channelId']!==_0x9951ac||_0x12d15f&&!_0x408f94['isAttached']||_0x210baa&&0x0===_0x408f94['length']||_0x3212ed['push'](_0x408f94);return _0x292305?_0x3212ed['map'](_0x29fc4b=>_0x29fc4b['toJSON']()):_0x3212ed;}['getAnnotationForCommentThread'](_0x3e9518){const _0xcd40a4=this['_threadToController']['get'](_0x3e9518);if(!_0xcd40a4)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0xcd40a4['view'])||null;}['getCommentThreadForAnnotation'](_0x2c99ee){const _0x5dfbda=this['_viewToController']['get'](_0x2c99ee['innerView']);return _0x5dfbda?_0x5dfbda['model']:null;}['setActiveCommentThread'](_0x30a56a){const _0x1641aa=this['context']['plugins']['get'](y);if(!_0x30a56a)return void(this['activeCommentThread']&&_0x1641aa['deactivateAll']());const _0x254571=this['getCommentThread'](_0x30a56a);if(!_0x254571)throw new _0x3e31b7('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x30a56a});if(!this['_threadToController']['has'](_0x254571))throw new _0x3e31b7('commentsrepository-active-not-attached',null,{'threadId':_0x30a56a});const _0x153360=_0x1641aa['getByInnerView'](this['_threadToController']['get'](_0x254571)['view']);_0x1641aa['activate'](_0x153360);}['switchReadOnly'](_0x4f74e7,_0x48f74e){_0x4f74e7?this['_readOnlyChannels']['add'](_0x48f74e):this['_readOnlyChannels']['delete'](_0x48f74e),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x76db19){return this['_readOnlyChannels']['has'](_0x76db19)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x4c7249,_0x42b92c){return new vt(_0x4c7249,_0x42b92c);}['setPermissions'](_0x24a330,_0x1404f6=_t){this['_permissions']['set'](_0x1404f6,_0x24a330),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x109242=_t){return this['_permissions']['has'](_0x109242)?this['_permissions']['get'](_0x109242):bt;}['_addCommentThread']({channelId:_0x4d66dd,threadId:_0x548a81,comments:_0x424ca0,unlinkedAt:_0x57959b,resolvedAt:_0x46cd62,resolvedBy:_0x521c50,target:_0x241876,context:_0x58ae1,attributes:_0x2958cd,isFromAdapter:_0x20e506,isResolvable:_0x4a7ea5,isSubmitted:_0x427a60}){if('string'!=typeof _0x548a81)throw new _0x3e31b7('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x548a81});if(this['hasCommentThread'](_0x548a81))throw new _0x3e31b7('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x548a81});const _0xd077e1=new pi(this,{'channelId':_0x4d66dd,'id':_0x548a81,'context':_0x58ae1,'attributes':_0x2958cd,'unlinkedAt':_0x57959b,'resolvedAt':_0x46cd62,'resolvedBy':_0x521c50?this['context']['plugins']['get'](it)['getUser'](_0x521c50):null,'isResolvable':_0x4a7ea5,'isSubmitted':_0x427a60||_0x20e506});this['_threads']['set'](_0x548a81,_0xd077e1);for(const _0x44e7c2 of _0x424ca0)_0xd077e1['_add'](this['_createNewComment']({'threadId':_0x548a81,..._0x44e7c2}));return _0x241876&&_0xd077e1['attachTo'](_0x241876),_0x20e506||!_0xd077e1['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x4d66dd,'threadId':_0x548a81});}['_submitCommentThread']({channelId:_0x27bef3,threadId:_0x4cc189}){if(!this['hasCommentThread'](_0x4cc189))throw new _0x3e31b7('commentsrepository-missing-comment-thread',this);const _0x21a6e4=this['getCommentThread'](_0x4cc189);if(_0x21a6e4['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x5c45f4,comments:_0x27c625,resolvedAt:_0xd00e7f,resolvedBy:_0x23de1c,context:_0x31c4ad,attributes:_0x17d356}=_0x21a6e4,_0x580537=this['context']['plugins']['get']('PendingActions'),_0x3abbea=_0x580537['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x27bef3,'threadId':_0x5c45f4,'comments':_0x27c625['map'](_0x7f4a7=>_0x7f4a7['toJSON']()),'resolvedAt':_0xd00e7f,'resolvedBy':_0x23de1c?_0x23de1c['id']:_0x23de1c,'context':_0x31c4ad,'attributes':_0x17d356})['then'](({comments:_0x1782e1})=>{_0x580537['remove'](_0x3abbea);for(const _0xb227c4 of _0x1782e1)this['_updateComment']({'channelId':_0x27bef3,'threadId':_0x4cc189,'commentId':_0xb227c4['commentId'],'createdAt':_0xb227c4['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x37fd90=>{throw console['error'](_0x37fd90),new _0x3e31b7('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x5acb9c,target:_0x459855}){const _0xcf9e20=this['getCommentThread'](_0x5acb9c);if(!_0xcf9e20)throw new _0x3e31b7('commentsrepository-attach-missing-comment-thread',this);const _0x296856=this['context']['plugins']['get']('PendingActions'),_0x33ef05=this['context']['plugins']['get'](y),_0x4a4147=this['_createCommentThreadView'](_0xcf9e20),_0x24dd93=new vt(_0xcf9e20,_0x4a4147);let _0x298683=null;_0x4a4147['on']('change:isDirty',(_0x50fef5,_0x3f5e55,_0x20d012)=>{_0x20d012?_0x298683=_0x296856['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x298683&&(_0x296856['remove'](_0x298683),_0x298683=null);}),this['_threadToController']['set'](_0xcf9e20,_0x24dd93),this['_viewToController']['set'](_0x4a4147,_0x24dd93);const _0x2d9d51=new E(this['context']['locale'],_0x4a4147);_0x2d9d51['bind']('length')['to'](_0x4a4147),_0x2d9d51['bind']('isDirty')['to'](_0x4a4147,'isDirty',_0x4a4147,'length',(_0x456a2c,_0x5a89f0)=>_0x456a2c||!_0x5a89f0),_0x2d9d51['bind']('isActive')['to'](_0x4a4147),_0x2d9d51['type']='comment';const _0x166d6c=new T({'view':_0x2d9d51,'target':_0x459855,'type':'comment','isVisible':!_0xcf9e20['archivedAt']&&!!('function'==typeof _0x459855?_0x459855():_0x459855)});return _0x4a4147['on']('escape',()=>{_0x166d6c['fire']('escape');}),this['_bindAnnotationToEditors'](_0x4a4147,_0x166d6c),_0x33ef05['add'](_0x166d6c),_0x166d6c;}['_bindAnnotationToEditors'](_0xd2791c,_0xc4068a){this['listenTo'](_0xd2791c,'editorReady',(_0x5311c8,_0x5095ba)=>{const _0x4df4f3=_0x5095ba['ui']['view']['body']['bodyCollectionContainer'];_0xc4068a['focusableElements']['add'](_0x4df4f3),this['context']instanceof _0x3b8c1f&&this['context']['ui']['focusTracker']['add'](_0x4df4f3);},{'priority':'highest'}),this['listenTo'](_0xd2791c,'editorDestroyed',(_0x548650,_0x473119)=>{const _0x5d2957=_0x473119['ui']['view']['body']['bodyCollectionContainer'];_0xc4068a['focusableElements']['has'](_0x5d2957)&&_0xc4068a['focusableElements']['remove'](_0x5d2957),this['context']instanceof _0x3b8c1f&&this['context']['ui']['focusTracker']['remove'](_0x5d2957);});}['_unbindEditors'](_0x1ec96a){this['stopListening'](_0x1ec96a,'editorReady'),this['stopListening'](_0x1ec96a,'editorDestroyed');}['_createCommentThreadView'](_0x44ea23){const _0x35b24b=this['context']['plugins']['get'](it),{config:_0x22a77b,locale:_0x3df030}=this['context'],_0xaaa8a=pt(_0x22a77b['get']('locale'),_0x3df030);return new(0x0,(_0x22a77b['get']('comments'))['CommentThreadView'])(_0x3df030,_0x44ea23,_0x35b24b['me'],{'editorConfig':{..._0x22a77b['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x22a77b['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x22a77b['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x22a77b['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x22a77b['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0xaaa8a,'CommentView':_0x22a77b['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x5792c1,channelId:_0x1aec89,resolvedAt:_0x2773a1,resolvedBy:_0x3bfd07,isFromAdapter:_0x4d513b}){if(!this['hasCommentThread'](_0x5792c1))throw new _0x3e31b7('commentsrepository-missing-comment-thread',null,{'threadId':_0x5792c1});const _0x36605e=this['getCommentThread'](_0x5792c1);if(_0x36605e['isResolved'])throw new _0x3e31b7('commentsrepository-resolved-comment-thread',null,{'threadId':_0x5792c1});const _0x2857f8=this['context']['plugins']['get'](it);if(_0x36605e['resolvedBy']=_0x2857f8['getUser'](_0x3bfd07),_0x36605e['resolvedAt']=_0x2773a1,_0x4d513b||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x5b6761=this['context']['plugins']['get']('PendingActions'),_0xa2f746=_0x5b6761['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x1aec89,'threadId':_0x5792c1})['then'](({resolvedAt:_0x23c646,resolvedBy:_0x500bc6})=>{_0x5b6761['remove'](_0xa2f746),_0x36605e['resolvedBy']['id']!==_0x500bc6&&(_0x36605e['resolvedBy']=_0x2857f8['getUser'](_0x500bc6)),_0x36605e['resolvedAt']=_0x23c646;})['catch'](_0x43aef6=>{throw console['error'](_0x43aef6),new _0x3e31b7('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x389691,channelId:_0x799669,isFromAdapter:_0x43f393}){if(!this['hasCommentThread'](_0x389691))throw new _0x3e31b7('commentsrepository-missing-comment-thread',null,{'threadId':_0x389691});const _0x4186b5=this['getCommentThread'](_0x389691);if(!_0x4186b5['isResolved'])throw new _0x3e31b7('commentsrepository-reopen-comment-thread',null,{'threadId':_0x389691});if(_0x4186b5['resolvedBy']=null,_0x4186b5['resolvedAt']=null,_0x43f393||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x1bf372=this['context']['plugins']['get']('PendingActions'),_0x455db1=_0x1bf372['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x799669,'threadId':_0x389691})['then'](()=>_0x1bf372['remove'](_0x455db1))['catch'](_0x105aa6=>{throw console['error'](_0x105aa6),new _0x3e31b7('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0xf5b469,isFromAdapter:_0xdd0ccd}){const _0x38373c=this['getCommentThread'](_0xf5b469);if(!_0x38373c)throw new _0x3e31b7('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0xf5b469),this['_threads']['delete'](_0xf5b469),!_0x38373c['isSubmitted']||_0xdd0ccd||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x3b67fe=this['context']['plugins']['get']('PendingActions'),{channelId:_0x469c24}=_0x38373c,_0x257d78=_0x3b67fe['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x469c24,'threadId':_0xf5b469})['then'](()=>_0x3b67fe['remove'](_0x257d78))['catch'](_0x2802c1=>{throw console['error'](_0x2802c1),new _0x3e31b7('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x585cf5,unlinkedAt:_0x1d325a,context:_0x34c25a,attributes:_0x9a3624,isFromAdapter:_0x7bd6d2}){if('string'!=typeof _0x585cf5)throw new _0x3e31b7('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x585cf5});if(!this['hasCommentThread'](_0x585cf5))throw new _0x3e31b7('commentsrepository-missing-comment-thread',null,{'threadId':_0x585cf5});const _0x5a78bf=this['getCommentThread'](_0x585cf5);let _0x370a76=!0x1;if(void 0x0!==_0x34c25a&&_0x5a78bf['context']!==_0x34c25a&&(_0x5a78bf['context']=_0x34c25a,_0x370a76=!0x0),void 0x0!==_0x1d325a&&_0x5a78bf['unlinkedAt']!==_0x1d325a&&(_0x5a78bf['unlinkedAt']=_0x1d325a,_0x370a76=!0x0),_0x9a3624&&!At(_0x9a3624,_0x5a78bf['attributes'])&&(_0x5a78bf['attributes']=_0x9a3624,_0x370a76=!0x0),!_0x370a76)return Promise['resolve']();if(!_0x5a78bf['isSubmitted']||_0x7bd6d2||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x560000=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1ed94e}=_0x5a78bf,_0x10b5df=_0x560000['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x1ed94e,'threadId':_0x585cf5,'context':_0x34c25a,'unlinkedAt':_0x1d325a,'attributes':_0x9a3624})['then'](()=>_0x560000['remove'](_0x10b5df))['catch'](_0x304234=>{throw console['error'](_0x304234),new _0x3e31b7('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x42bba1){const _0x4b8a04=this['context']['plugins']['get'](y),_0x5b05b8=this['getCommentThread'](_0x42bba1);if(_0x5b05b8['_isAttached']=!0x1,this['_threadToController']['has'](_0x5b05b8)){const _0x2a81b2=this['_threadToController']['get'](_0x5b05b8),_0x52df6f=_0x2a81b2['view'],_0x12fe90=_0x4b8a04['getByInnerView'](_0x52df6f);this['_threadToController']['delete'](_0x5b05b8),this['_viewToController']['delete'](_0x52df6f),_0x12fe90&&_0x4b8a04['remove'](_0x12fe90),_0x2a81b2['destroy'](),_0x52df6f['destroy']()['then'](()=>{this['_unbindEditors'](_0x52df6f);});}}['_updateActiveAnnotation']({threadId:_0xccf0d1,resolvedAt:_0x466a81,unlinkedAt:_0x16590e}){const _0x2f9a48=!!_0x466a81,_0x543568=this['context']['plugins']['get'](y),_0x598812=this['getCommentThread'](_0xccf0d1);if(this['_threadToController']['has'](_0x598812)){const _0x33037b=this['_threadToController']['get'](_0x598812)['view'],_0x10a333=_0x543568['getByInnerView'](_0x33037b);_0x10a333&&(_0x2f9a48&&_0x543568['_removeActiveAnnotation'](_0x10a333),_0x16590e?_0x10a333['isVisible']=!0x1:_0x10a333['refreshVisibility']());}}['_getExternalAuthor'](_0x13e238){const _0xfcd950=this['context']['plugins']['get'](it),_0x29f056=It('external:'+_0x13e238),_0x36b927=_0xfcd950['getUser'](_0x29f056);return _0x36b927||_0xfcd950['addUser']({'id':_0x29f056,'name':_0x13e238});}['_createNewComment']({threadId:_0x4ea450,commentId:_0x22762b=_0x4e4e67(),content:_0x162085,authorId:_0x529610,createdAt:_0x17f695,attributes:_0x11f8b4}){if('string'!=typeof _0x22762b)throw new _0x3e31b7('commentsrepository-invalid-commentid');if('string'!=typeof _0x529610)throw new _0x3e31b7('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x162085||!_0x162085['trim']())throw new _0x3e31b7('commentsrepository-invalid-comment-content');const _0x197869=this['context']['plugins']['get'](it)['getUser'](_0x529610);if(!_0x197869)throw new _0x3e31b7('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x529610});let _0x2c690b=null,_0x39c294=_0x17f695;return _0x11f8b4?.['@external']&&(_0x2c690b=this['_getExternalAuthor'](_0x11f8b4['@external']['authorName']),_0x39c294=new Date(_0x11f8b4['@external']['createdAt'])),new wi(this,{'threadId':_0x4ea450,'id':_0x22762b,'author':_0x2c690b||_0x197869,'creator':_0x197869,'content':_0x162085,'createdAt':_0x17f695,'authoredAt':_0x39c294,'attributes':_0x11f8b4});}['_addComment'](_0x3d8c2f){let {threadId:_0x3a320d,content:_0xf6900c,attributes:_0x1eec8b,isFromAdapter:_0x26af6f}=_0x3d8c2f;const _0x1409cf=this['getCommentThread'](_0x3d8c2f['threadId']);if(!_0x1409cf)throw new _0x3e31b7('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x55759b=this['_createNewComment'](_0x3d8c2f),{id:_0x5cfe71}=_0x55759b;if(_0x1409cf['_add'](_0x55759b),_0x26af6f||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x1409cf['isSubmitted'])return Promise['resolve']();const _0x5aa655=this['context']['plugins']['get']('PendingActions'),{channelId:_0xbb3821}=_0x1409cf,_0x1a386b=_0x5aa655['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x1eec8b||(_0x1eec8b={}),this['adapter']['addComment']({'channelId':_0xbb3821,'threadId':_0x3a320d,'commentId':_0x5cfe71,'content':_0xf6900c,'attributes':_0x1eec8b})['then'](_0x1fbd27=>{_0x5aa655['remove'](_0x1a386b),_0x1fbd27&&this['_updateComment']({'channelId':_0xbb3821,'threadId':_0x3a320d,'commentId':_0x5cfe71,'createdAt':_0x1fbd27['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4e5710=>{throw console['error'](_0x4e5710),new _0x3e31b7('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x55c46d,commentId:_0x28439d,content:_0x37002a,createdAt:_0x15bc97,attributes:_0x9fee72,isFromAdapter:_0x365dc5}){if(void 0x0!==_0x37002a&&('string'!=typeof _0x37002a||!_0x37002a['trim']()['length']))throw new _0x3e31b7('commentsrepository-update-comment-invalid-content');const _0x88ba9a=this['getCommentThread'](_0x55c46d),_0x1e4c4d=_0x88ba9a['getComment'](_0x28439d);if(!_0x1e4c4d)throw new _0x3e31b7('commentsrepository-update-missing-comment',this);let _0x3cbbc8=!0x1;if(_0x37002a&&_0x37002a!==_0x1e4c4d['content']&&(_0x1e4c4d['isEditable']||_0x365dc5)&&(_0x1e4c4d['content']=_0x37002a,_0x3cbbc8=!0x0),_0x15bc97&&_0x15bc97!==_0x1e4c4d['createdAt']&&(_0x1e4c4d['createdAt']=_0x15bc97,_0x1e4c4d['attributes']&&_0x1e4c4d['attributes']['@external']||(_0x1e4c4d['authoredAt']=_0x15bc97),_0x3cbbc8=!0x0),_0x9fee72&&!At(_0x9fee72,_0x1e4c4d['attributes'])&&(_0x1e4c4d['attributes']=_0x9fee72,_0x3cbbc8=!0x0),!_0x3cbbc8)return Promise['resolve']();if(_0x88ba9a['fire']('commentUpdated'),_0x365dc5||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x354bce=this['context']['plugins']['get']('PendingActions'),{channelId:_0x65740a}=this['getCommentThread'](_0x1e4c4d['threadId']),_0x167412=_0x354bce['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x65740a,'threadId':_0x55c46d,'commentId':_0x28439d,'content':_0x37002a,'attributes':_0x9fee72})['then'](()=>_0x354bce['remove'](_0x167412))['catch'](_0x3eee57=>{throw console['error'](_0x3eee57),new _0x3e31b7('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x5974be,commentId:_0x1878fd,isFromAdapter:_0x8857d2}){const _0x191102=this['getCommentThread'](_0x5974be),_0x4d6328=_0x191102['getComment'](_0x1878fd);if(!_0x4d6328)throw new _0x3e31b7('commentsrepository-remove-missing-comment',this);if(_0x191102['_remove'](_0x4d6328),_0x8857d2||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x4a44f4=this['context']['plugins']['get']('PendingActions'),{channelId:_0x14b9a5}=_0x191102,_0x5b2914=_0x4a44f4['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x14b9a5,'threadId':_0x5974be,'commentId':_0x1878fd})['then'](()=>_0x4a44f4['remove'](_0x5b2914))['catch'](_0x59f0e5=>{throw console['error'](_0x59f0e5),new _0x3e31b7('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x240a0a(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x47e012,_0x224d3b){super();const _0x4c906c=_0x47e012['context']['plugins']['get'](it)['me'],_0x1240ac=_0x47e012['getCommentThread'](_0x224d3b['threadId']),_0x3eb5fc=0x0===_0x1240ac['comments']['length'],_0x3b1495=_0x4c906c===_0x224d3b['author'];this['id']=_0x224d3b['id'],this['threadId']=_0x224d3b['threadId'],this['author']=_0x224d3b['author'],this['creator']=_0x224d3b['creator'],this['isExternal']=Boolean(_0x224d3b['attributes']&&_0x224d3b['attributes']['@external']),this['set']('content',_0x224d3b['content']),this['createdAt']=_0x224d3b['createdAt']||new Date(),this['set']('authoredAt',_0x224d3b['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x1240ac,'resolvedAt'),this['set']('attributes',_0x224d3b['attributes']||{}),this['bind']('isEditable')['to'](_0x47e012,'_permissions',()=>{const _0x560eb3=_0x47e012['getPermissions'](_0x1240ac['channelId'])['write'],_0x5a30fa=_0x47e012['getPermissions'](_0x1240ac['channelId'])['modifyAll'];return _0x3b1495&&_0x560eb3||!_0x3b1495&&_0x5a30fa;}),this['bind']('isRemovable')['to'](_0x1240ac,'isRemovable',_0x47e012,'_permissions',_0x50df09=>{const _0x444609=_0x47e012['getPermissions'](_0x1240ac['channelId'])['write'],_0x49f483=_0x47e012['getPermissions'](_0x1240ac['channelId'])['modifyAll'];return _0x3b1495&&_0x444609||_0x50df09&&_0x3eb5fc||!_0x3b1495&&_0x49f483&&!_0x3eb5fc;}),this['bind']('isReadOnly')['to'](_0x1240ac,'isReadOnly'),this['_repository']=_0x47e012;}get['weight'](){return Math['max'](function(_0x2febb7){const _0x46e864=document['createElement']('div');return _0x46e864['innerHTML']=_0x2febb7,_0x46e864['textContent']['length'];}(this['content']),0xc8);}['update'](_0x13aef5){const {threadId:_0x44525c,id:_0x5cff3b}=this;if(!this['_repository']['hasCommentThread'](_0x44525c))throw new _0x3e31b7('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x341a62}=this['_repository']['getCommentThread'](_0x44525c);this['_repository']['fire'](Nt('updateComment',_0x341a62,_0x44525c),{'channelId':_0x341a62,'threadId':_0x44525c,'commentId':_0x5cff3b,..._0x13aef5});}['setAttribute'](_0x1eb50c,_0xc7a243){const _0x4399d8=wt(this['attributes']);yt(_0x4399d8,_0x1eb50c,_0xc7a243),this['update']({'attributes':_0x4399d8});}['removeAttribute'](_0x4d2bc2){const _0x3540ba=wt(this['attributes']);Ct(_0x3540ba,_0x4d2bc2),this['update']({'attributes':_0x3540ba});}['remove'](_0x9c9a4f={}){if(!_0x9c9a4f['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x14fcbd,id:_0x372d33}=this;if(!this['_repository']['hasCommentThread'](_0x14fcbd))throw new _0x3e31b7('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x45a072}=this['_repository']['getCommentThread'](_0x14fcbd);this['_repository']['fire'](Nt('removeComment',_0x45a072,_0x14fcbd),{'channelId':_0x45a072,'threadId':_0x14fcbd,'commentId':_0x372d33,..._0x9c9a4f});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x4a2dcf,..._0x2d638d){for(const _0x25f085 of _0x2d638d)void 0x0!==_0x25f085&&(_0x4a2dcf+=':'+String(_0x25f085));return _0x4a2dcf;}class ot extends _0x46685b{constructor(_0x3f795f){super(_0x3f795f),this['set']('hasContent',!0x1);}['refresh'](){const _0x317209=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x37f0ce of _0x317209['getRanges']())if(this['_hasContent'](_0x37f0ce))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x160bbc=_0x4e4e67(),ranges:_0x17f1c2,comment:_0x361198}={}){const _0x492bf0=this['editor']['model'],_0x6fdfc=_0x17f1c2??Array['from'](_0x492bf0['document']['selection']['getRanges']()),_0x134f49=[];for(const _0x1dab29 of _0x6fdfc)this['_hasContent'](_0x1dab29)&&_0x134f49['push'](this['_trimToContent'](_0x1dab29));if(!_0x134f49['length'])throw new _0x3e31b7('addcommentthreadcommand-incorrect-ranges',null);_0x361198&&this['_createCommentThread'](_0x160bbc,_0x361198),this['_createMarkersFromRanges'](_0x160bbc,_0x134f49,!!_0x361198);}['_createMarkersFromRanges'](_0x23d833,_0x53db4b,_0x489b4a){this['editor']['model']['change'](_0x3ff48c=>{for(const _0x8b82d4 of _0x53db4b){const _0x1a3008=_0x4e4e67()['substr'](0x1,0x5),_0x17163c='comment:'+_0x23d833+':'+_0x1a3008;_0x3ff48c['addMarker'](_0x17163c,{'range':_0x8b82d4,'usingOperation':_0x489b4a,'affectsData':_0x489b4a});}});}['_createCommentThread'](_0x12e286,_0x5c17c6){const _0x79c8dc=this['editor']['plugins']['get']('CommentsRepository'),_0x1e1a9a=this['editor']['config']['get']('collaboration.channelId'),_0x4b7cc0=this['editor']['plugins']['get']('Users')['me'];if(!_0x4b7cc0)throw new _0x3e31b7('addcommentthreadcommand-user-not-found',null);_0x79c8dc['addCommentThread']({'threadId':_0x12e286,'channelId':_0x1e1a9a,'comments':[{'authorId':_0x4b7cc0['id'],'content':_0x5c17c6,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x314c10){for(const _0x374606 of _0x314c10['getItems']())if(this['_itemIsContent'](_0x374606))return!0x0;return!0x1;}['_itemIsContent'](_0x446353){return _0x446353['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x446353)&&!_0x446353['is']('element','tableCell');}['_trimToContent'](_0x5037a2){const _0x41ded3=_0x3eab7a=>!this['_itemIsContent'](_0x3eab7a['item']),_0x513f83=_0x5037a2['start']['getLastMatchingPosition'](_0x41ded3),_0x432739=_0x5037a2['end']['getLastMatchingPosition'](_0x41ded3,{'direction':'backward'});return this['editor']['model']['createRange'](_0x513f83,_0x432739);}}class b extends _0x3d233f{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xcfa39d){super(_0xcfa39d),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x5497ce=this['editor'],_0x3dccff=_0x5497ce['model']['document']['selection'],_0x45e949=_0x1f36ab(()=>this['refreshSelectedViews'](),0xa);_0x3dccff['on']('change:range',(_0x1dc283,_0x23eec4)=>{_0x23eec4['directChange']&&(_0x45e949['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x5497ce['editing']['view']['document'],'change:isFocused',(_0x5cd5d5,_0x446c0b,_0x276445)=>{_0x276445&&_0x45e949();}),this['listenTo'](_0x5497ce['ui']['focusTracker'],'change:isFocused',(_0x48a351,_0x1ce536,_0x5363ac)=>{_0x5363ac||this['fire']('blur',{'isAnnotationTracked':_0x2822ec=>this['_editorAnnotationsData']['has'](_0x2822ec['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x3c9f60){if(this['_editorAnnotations']['has'](_0x3c9f60['view']))return;this['_editorAnnotations']['add'](_0x3c9f60['view']),this['editor']['ui']['focusTracker']['add'](_0x3c9f60['view']['element']);const _0x48c9b0=this['editor']['plugins']['get'](y);this['listenTo'](_0x48c9b0['collection'],'remove',(_0x828e82,_0x55de5c)=>{this['editor']['ui']['focusTracker']['remove'](_0x55de5c['view']['element']),this['_editorAnnotations']['delete'](_0x55de5c['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x1ad011){if('function'!=typeof _0x1ad011)throw new _0x3e31b7('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x1ad011);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x327837,annotations:_0x114340}){const _0x4c023f=[],_0x1e2854=this['editor']['model']['document']['selection'],_0x21b000=Array['from'](_0x1e2854['getRanges']());for(const [_0x4fa381,_0x431f17]of this['_editorAnnotationsData']){const _0x276097=_0x4e6c4c(_0x431f17),_0x555fb8=_0x114340['getByInnerView'](_0x4fa381);_0x276097&&_0x555fb8&&_0x4c023f['push']({'annotation':_0x555fb8,'range':_0x276097});}function _0x4e6c4c(_0x1a7448){for(const _0x2cb533 of _0x1a7448)for(const _0x3a0bb2 of _0x21b000)if(_0x2cb533['containsRange'](_0x3a0bb2,!_0x1e2854['isCollapsed']))return _0x2cb533;return null;}return _0x4c023f['sort']((_0x318078,_0x23a14f)=>{const _0x5ac4e9=_0x318078['range'],_0x4a36b5=_0x23a14f['range'];if(!_0x5ac4e9['isEqual'](_0x4a36b5)){if(_0x5ac4e9['containsRange'](_0x4a36b5,!0x0))return 0x1;if(_0x4a36b5['containsRange'](_0x5ac4e9,!0x0))return-0x1;}return _0x318078['annotation']==_0x327837?-0x1:_0x23a14f['annotation']==_0x327837?0x1:0x0;})['map'](_0xb4054=>_0xb4054['annotation']);}get['_editorAnnotationsData'](){const _0xad9ed7=new Map();for(const _0x1c55b2 of Array['from'](this['_dataCollectors']))for(const [_0x37fff0,_0x33dab4]of _0x1c55b2())_0xad9ed7['set'](_0x37fff0,_0x33dab4);return _0xad9ed7;}}class st extends _0x3d233f{['afterInit'](){const _0x4d564d=this['editor'];if(!_0x4d564d['plugins']['has']('RestrictedEditingModeEditing'))return;_0x4d564d['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x3d233f{constructor(_0xe0c7fd){super(_0xe0c7fd),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x36d534=this['editor'],_0x5139d6=_0x36d534['commands']['get']('importWord'),_0xb9bacd=_0x36d534['plugins']['get'](it);_0x5139d6&&(_0x5139d6['on']('execute',(_0x1f0ac8,[,_0x3f3695])=>{_0x3f3695['collaboration_features']={'comments':!0x0,'user_id':_0xb9bacd['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x5139d6,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x220d15,_0x2aca9b){const {comment_threads:_0x4fa80a}=_0x2aca9b;_0x4fa80a&&_0x4fa80a['forEach'](({thread_id:_0x5e050a,comments:_0x4f9555,is_resolved:_0x3b7e42})=>{const _0xe30061=new Date(),_0x359d02=_0x4f9555['map'](({author:_0x4e4a97,content:_0x1ade19,created_at:_0x3b4fcb})=>({'content':_0x1ade19,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0xe30061,'attributes':{'@external':{'authorName':_0x4e4a97,'createdAt':_0x3b4fcb?new Date(_0x3b4fcb):new Date(),'source':'importWord'}}})),_0x4e11ab=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x4e11ab,'threadId':_0x5e050a,'comments':_0x359d02,'resolvedAt':_0x3b7e42?_0xe30061:null});});}}class at extends _0x3d233f{constructor(_0x3a3d6d){super(_0x3a3d6d),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x32fdf1=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x32fdf1,'contentInsertion',(_0x3e7eea,_0x545d4f)=>this['_removeMarkersWithoutThreads'](_0x545d4f['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x4438f6){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x4438f6;const _0x2a4e9d=this['editor']['plugins']['get']('CommentsRepository');for(const _0x2121a5 of _0x4438f6['keys']()){const [_0x3b54ab,_0x53271f]=_0x2121a5['split'](':');'comment'!=_0x3b54ab||_0x2a4e9d['hasCommentThread'](_0x53271f)||_0x4438f6['delete'](_0x2121a5);}return _0x4438f6;}['_registerMarkerInClipboardPipeline'](){const _0x4622f5=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0xa11c07=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0xa11c07&&_0x4622f5['_registerMarkerToCopy']('comment',_0xa11c07);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x2f6875){switch(_0x2f6875){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x3cdba8){const _0xd7e833=_0x3cdba8['split'](':');return{'group':_0xd7e833[0x0],'id':_0xd7e833[0x1],'part':_0xd7e833[0x2]};}class ut extends _0x3d233f{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x1ecc43,_0x95321b)=>{if(!_0x95321b['options']['showCommentHighlights'])return null;if(_0x95321b['options']['ignoreResolvedComments']){const {id:_0x442a26}=ft(_0x1ecc43['markerName']),_0x1dc838=this['editor']['plugins']['get'](o);if(_0x1dc838['getCommentThread'](_0x442a26)?.['isResolved']&&_0x1ecc43['item'])return _0x95321b['consumable']['consume'](_0x1ecc43['item'],'addMarker:'+_0x1ecc43['markerName']),_0x95321b['consumable']['consume'](_0x1ecc43['item'],'removeMarker:'+_0x1ecc43['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x31f11e=>{_0x31f11e['on']('addMarker:comment',(_0x49105c,_0x309667,_0x4e5473)=>{if(!_0x4e5473['options']['showCommentHighlights'])return;const _0x1dd680=_0x309667['item'];if(!_0x1dd680)return;const _0x54f973=_0x4e5473['mapper']['toViewElement'](_0x1dd680);this['editor']['model']['schema']['isObject'](_0x1dd680)&&_0x54f973&&!_0x54f973['getCustomProperty']('widget')&&_0x54f973['is']('containerElement')&&_0x156cb0(_0x54f973,_0x4e5473['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x5991b5,{writer:_0x12ce05,options:_0xd98655})=>{if(!_0xd98655['showCommentHighlights'])return null;const _0xed4321=_0x12ce05['createContainerElement']('div'),_0x2c74cd=_0x12ce05['createEmptyElement']('hr');return _0x12ce05['addClass']('ck-horizontal-line',_0xed4321),_0x12ce05['insert'](_0x12ce05['createPositionAt'](_0xed4321,0x0),_0x2c74cd),_0xed4321;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x19ea7c,{writer:_0x131d84,options:_0x45946b})=>{if(!_0x45946b['showCommentHighlights'])return null;const _0xd4bcf8=_0x131d84['createContainerElement']('span'),_0x2ff293=_0x131d84['createEmptyElement']('img');return _0x131d84['addClass']('image-inline',_0xd4bcf8),_0x131d84['insert'](_0x131d84['createPositionAt'](_0xd4bcf8,0x0),_0x2ff293),_0xd4bcf8;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x5fb38e,{writer:_0x44423e,options:_0xf6dd26})=>{if(_0xf6dd26['showCommentHighlights'])return _0x44423e['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x2a7918,_0x53f93f,_0x420ae2)=>{_0x420ae2['options']['showCommentHighlights']&&_0x2a7918['stop']();},{'priority':'high'});}}class r extends _0x3d233f{static get['requires'](){return[o,b,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x9bffc2){super(_0x9bffc2),this['set']('isThreadsLoadingPaused',!0x0),_0x9bffc2['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0xf14b7,_0x28e8bb,_0x4d67d4,_0x33bad7)=>{const _0x1924ec=_0x9bffc2['plugins']['get'](o),_0x4ac3fd=_0x4d67d4?ft(_0x4d67d4)['id']:null;_0x9bffc2['model']['change'](()=>{if(_0x4ac3fd){const _0x3e37f2=this['getAllMarkersForId'](_0x4ac3fd);for(const _0x527729 of _0x3e37f2)_0x9bffc2['editing']['reconvertMarker'](_0x527729);}if(_0x33bad7){const {id:_0x2704fc}=ft(_0x33bad7),_0x1e4dbe=_0x1924ec['getCommentThread'](_0x2704fc);if(_0x1e4dbe&&_0x1e4dbe['unlinkedAt'])return;if(_0x1e4dbe&&!_0x1e4dbe['isAttached'])return;const _0x259505=this['getAllMarkersForId'](_0x2704fc);for(const _0x4a6ea7 of _0x259505)_0x9bffc2['editing']['reconvertMarker'](_0x4a6ea7);}}),_0x4ac3fd&&this['scrollToThreadMarker'](_0x4ac3fd);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x57fb45=this['editor'],_0x3cfc16=_0x57fb45['plugins']['get'](o),_0x43083a=_0x57fb45['config']['get']('collaboration.channelId'),_0x5fc88d=_0x3cfc16['getCommentThreads']()['filter'](_0x3dab0b=>_0x3dab0b['channelId']!==_0x43083a);_0x57fb45['commands']['add']('addCommentThread',new ot(_0x57fb45)),this['listenTo'](_0x57fb45,'change:isReadOnly',(_0x52e738,_0x43a27c,_0x547404)=>{_0x3cfc16['switchReadOnly'](_0x547404,_0x57fb45['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x3cfc16,dt('addCommentThread',_0x43083a),(_0xcc7e89,{threadId:_0x51aae5})=>{const _0x594130=this['editor']['plugins']['get'](o)['getCommentThread'](_0x51aae5);_0x594130?.['unlinkedAt']&&this['_attachArchivedThread'](_0x51aae5);}),this['listenTo'](_0x3cfc16,dt('removeCommentThread',_0x43083a),(_0xbdc149,{threadId:_0x72c14f})=>{_0x57fb45['model']['enqueueChange']({'isUndoable':!0x1},_0x373929=>{const _0x4995e5=this['getAllMarkersForId'](_0x72c14f);for(const _0x8b456 of _0x4995e5)_0x373929['removeMarker'](_0x8b456);});}),this['listenTo'](_0x3cfc16,dt('resolveCommentThread',_0x43083a),(_0x423038,{threadId:_0x5eed48})=>{(this['_reconvertMarkers'](_0x5eed48),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x5eed48)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x3cfc16,dt('reopenCommentThread',_0x43083a),(_0xd164e9,{threadId:_0x403198})=>{this['_reconvertMarkers'](_0x403198);},{'priority':'low'}),this['listenTo'](_0x3cfc16,dt('addComment',_0x43083a),(_0x2a2a21,{threadId:_0x3d5c35,isFromAdapter:_0x48b9cf})=>{const _0x186269=this['getAllMarkersForId'](_0x3d5c35);if(_0x48b9cf||0x0==_0x186269['length']||!_0x3cfc16['hasCommentThread'](_0x3d5c35))return;0x1===_0x3cfc16['getCommentThread'](_0x3d5c35)['length']&&_0x57fb45['model']['enqueueChange']({'isUndoable':!0x1},_0x2add84=>{for(const _0x2b1a86 of _0x186269)_0x2add84['updateMarker'](_0x2b1a86,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x5fc88d);}['afterInit'](){!async function(_0x121f7c){const _0x1bbbf3=_0x30451c([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x3ea085=0x73460ab3,_0x20bd55=0x734179f3^_0x3ea085,_0x2ee5c9=window[_0x30451c([0x44,0x61,0x74,0x65])][_0x30451c([0x6e,0x6f,0x77])](),_0x488a4a=_0x121f7c[_0x30451c([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x366bc5=new window[(_0x30451c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x20c988=>{_0x488a4a[_0x30451c([0x6f,0x6e,0x63,0x65])](_0x30451c([0x72,0x65,0x61,0x64,0x79]),_0x20c988);}),_0x4e105c={[_0x30451c([0x6b,0x74,0x79])]:_0x30451c([0x45,0x43]),[_0x30451c([0x75,0x73,0x65])]:_0x30451c([0x73,0x69,0x67]),[_0x30451c([0x63,0x72,0x76])]:_0x30451c([0x50,0x2d,0x32,0x35,0x36]),[_0x30451c([0x78])]:_0x30451c([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x30451c([0x79])]:_0x30451c([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x30451c([0x61,0x6c,0x67])]:_0x30451c([0x45,0x53,0x32,0x35,0x36])},_0x1c7cb2=_0x488a4a[_0x30451c([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x30451c([0x67,0x65,0x74])](_0x30451c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x5cec0f(){let _0x349c35,_0x1c32bf=null,_0xc6d45b=null;try{if(_0x1c7cb2==_0x30451c([0x47,0x50,0x4c]))return _0x30451c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x349c35=_0x5f1cad(),!_0x349c35)return _0x30451c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x349c35[_0x30451c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0xc6d45b=_0xe25b47(_0x349c35[_0x30451c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x349c35[_0x30451c([0x6a,0x74,0x69])])),await _0x502921()?_0x104b20()?_0x116142()?_0x30451c([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x2276a2()?(_0x349c35[_0x30451c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x30451c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1c32bf=_0x3bc421(_0x30451c([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x349c35[_0x30451c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x30451c([0x74,0x72,0x69,0x61,0x6c])&&(_0x1c32bf=_0x3bc421(_0x30451c([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3aa10b()):_0x30451c([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x30451c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x30451c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x30451c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x116142(){const _0x22ed09=[_0x30451c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x30451c([0x74,0x72,0x69,0x61,0x6c])][_0x30451c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x349c35[_0x30451c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2ee5c9/0x3e8:0xe10*_0x20bd55;return _0x349c35[_0x30451c([0x65,0x78,0x70])]<_0x22ed09;}function _0x104b20(){const _0x4022ce=_0x349c35[_0x30451c([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x4022ce)return!0x1;if(_0x4022ce[_0x30451c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x30451c([0x2a])))return!0x0;if(_0x4022ce[_0x30451c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x30451c([0x43,0x4d,0x54])))return!0x0;if(_0x4022ce[_0x30451c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x30451c([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x25f50c())return!0x0;if(_0x4022ce[_0x30451c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x30451c([0x52,0x43,0x4d,0x54]))){if(_0x2c24e6())return!0x0;if(_0xbca993()||_0x2e885f())return!0x0;}return!0x1;}function _0x2276a2(){const _0x2cf091=_0x349c35[_0x30451c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2cf091||0x0==_0x2cf091[_0x30451c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2d37f6}=new URL(window[_0x30451c([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2cf091[_0x30451c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2d37f6))return!0x0;const _0x3473b4=_0x2d37f6[_0x30451c([0x73,0x70,0x6c,0x69,0x74])](_0x30451c([0x2e]));return _0x2cf091[_0x30451c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1e9ddc=>_0x1e9ddc[_0x30451c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x30451c([0x2a])))[_0x30451c([0x6d,0x61,0x70])](_0x335a30=>_0x335a30[_0x30451c([0x73,0x70,0x6c,0x69,0x74])](_0x30451c([0x2e])))[_0x30451c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4dc60d=>_0x4dc60d[_0x30451c([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x3473b4[_0x30451c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x30451c([0x6d,0x61,0x70])](_0x3d789d=>Array(_0x3473b4[_0x30451c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x3d789d[_0x30451c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x30451c([0x66,0x69,0x6c,0x6c])](_0x3d789d[0x0]===_0x30451c([0x2a])?_0x30451c([0x2a]):'')[_0x30451c([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x3d789d))[_0x30451c([0x73,0x6f,0x6d,0x65])](_0xda64f1=>_0x3473b4[_0x30451c([0x65,0x76,0x65,0x72,0x79])]((_0x342bcf,_0x2fb188)=>_0xda64f1[_0x2fb188]===_0x342bcf||_0xda64f1[_0x2fb188]===_0x30451c([0x2a])));}function _0x3aa10b(){return _0x1c32bf&&_0xc6d45b?new window[(_0x30451c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xa5fe1c,_0x1a9719)=>{_0x1c32bf[_0x30451c([0x74,0x68,0x65,0x6e])](_0xa5fe1c,_0x1a9719),_0xc6d45b[_0x30451c([0x74,0x68,0x65,0x6e])](_0x4dd4de=>{_0x4dd4de!=_0x30451c([0x56,0x61,0x6c,0x69,0x64])&&_0xa5fe1c(_0x4dd4de);},_0x1a9719);}):_0x1c32bf||_0xc6d45b||_0x30451c([0x56,0x61,0x6c,0x69,0x64]);}}function _0xe25b47(_0x492d89,_0x17dc31){return new window[(_0x30451c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x393cec=>{if(_0x5cbab3())return _0x393cec(_0x30451c([0x56,0x61,0x6c,0x69,0x64]));_0x3322d9(),_0x488a4a[_0x30451c([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x30451c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x234550=!0x1;const _0x1715c2=_0x4e4e67();function _0x200646(_0x559eca){return!!_0x559eca&&(typeof _0x559eca===_0x30451c([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x559eca===_0x30451c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x559eca[_0x30451c([0x74,0x68,0x65,0x6e])]===_0x30451c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x559eca[_0x30451c([0x63,0x61,0x74,0x63,0x68])]===_0x30451c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x280e25(_0x29d9bd){_0x4c682f(_0x29d9bd)[_0x30451c([0x74,0x68,0x65,0x6e])](_0x295d42=>{if(!_0x295d42||_0x295d42[_0x30451c([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x30451c([0x6f,0x6b]))return _0x30451c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x439da1(_0x42b473(_0x1715c2+_0x17dc31))!=_0x295d42[_0x30451c([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x30451c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x30451c([0x56,0x61,0x6c,0x69,0x64]);})[_0x30451c([0x74,0x68,0x65,0x6e])](_0x368952=>(_0x27d0a5(),_0x368952),()=>{const _0x38e213=_0x2c99d1();return null==_0x38e213?(_0x27d0a5(),_0x30451c([0x56,0x61,0x6c,0x69,0x64])):_0x30451c(_0x2ee5c9-_0x38e213>(0x574a8eb3^_0x3ea085)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x30451c([0x74,0x68,0x65,0x6e])](_0x393cec)[_0x30451c([0x63,0x61,0x74,0x63,0x68])](()=>{_0x393cec(_0x30451c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x154f1a=0x7370e433^_0x3ea085;function _0x27d0a5(){const _0x2b80bf=_0x30451c([0x6c,0x6c,0x63,0x74,0x2d])+_0x439da1(_0x42b473(_0x492d89)),_0x279956=_0x21c325(_0x439da1(window[_0x30451c([0x4d,0x61,0x74,0x68])][_0x30451c([0x63,0x65,0x69,0x6c])](_0x2ee5c9/_0x154f1a)));window[_0x30451c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x30451c([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2b80bf,_0x279956);}function _0x2c99d1(){const _0x5200ad=_0x30451c([0x6c,0x6c,0x63,0x74,0x2d])+_0x439da1(_0x42b473(_0x492d89)),_0x4efc87=window[_0x30451c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x30451c([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5200ad);return _0x4efc87?window[_0x30451c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x21c325(_0x4efc87),0x10)*_0x154f1a:null;}function _0x4c682f(_0x2d6ef3){return new window[(_0x30451c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4dae6a,_0x538280)=>{_0x2d6ef3[_0x30451c([0x74,0x68,0x65,0x6e])](_0x4dae6a,_0x538280),window[_0x30451c([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x538280,0x7347de73^_0x3ea085);});}}_0x488a4a[_0x30451c([0x6f,0x6e])](_0x30451c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x59666e,_0x547d89)=>{if(_0x547d89[0x0]!=_0x492d89)return _0x393cec(_0x30451c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x547d89[0x1]={..._0x547d89[0x1],[_0x30451c([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1715c2};},{[_0x30451c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x30451c([0x68,0x69,0x67,0x68])}),_0x488a4a[_0x30451c([0x6f,0x6e])](_0x30451c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x10e04e=>{_0x200646(_0x10e04e[_0x30451c([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x234550=!0x0,_0x280e25(_0x10e04e[_0x30451c([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x30451c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x30451c([0x6c,0x6f,0x77])}),_0x366bc5[_0x30451c([0x74,0x68,0x65,0x6e])](()=>{_0x234550||_0x393cec(_0x30451c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x5cbab3(){return _0x488a4a[_0x30451c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x30451c([0x76,0x69,0x65,0x77])][_0x30451c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x30451c([0x61,0x75,0x74,0x6f]);}function _0x3322d9(){_0x488a4a[_0x30451c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x30451c([0x76,0x69,0x65,0x77])][_0x30451c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x30451c([0x61,0x75,0x74,0x6f]);}}function _0x3bc421(_0x31960d){const _0x5031d9=[new window[(_0x30451c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5c10da=>setTimeout(_0x5c10da,0x734f347f^_0x3ea085)),_0x366bc5[_0x30451c([0x74,0x68,0x65,0x6e])](()=>new window[(_0x30451c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x21b5ee=>{let _0x3888d8=0x0;_0x488a4a[_0x30451c([0x6d,0x6f,0x64,0x65,0x6c])][_0x30451c([0x6f,0x6e])](_0x30451c([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x3f0c92,_0x581f87)=>{_0x581f87[0x0][_0x30451c([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x3888d8++,_0x3888d8==(0x73460b4b^_0x3ea085)&&(_0x21b5ee(),_0x3f0c92[_0x30451c([0x6f,0x66,0x66])]());});}))];return window[_0x30451c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x30451c([0x72,0x61,0x63,0x65])](_0x5031d9)[_0x30451c([0x74,0x68,0x65,0x6e])](()=>_0x31960d);}async function _0x4034c6(){await _0x366bc5,_0x488a4a[_0x30451c([0x6d,0x6f,0x64,0x65,0x6c])][_0x30451c([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3ee88a,_0x488a4a[_0x30451c([0x6d,0x6f,0x64,0x65,0x6c])][_0x30451c([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3ee88a,_0x488a4a[_0x30451c([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x30451c([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x25f50c(){return window[_0x30451c([0x67,0x6c,0x6f,0x62])]&&window[_0x30451c([0x67,0x6c,0x6f,0x62])][_0x30451c([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x2c24e6(){return _0x304f3e(_0x30451c([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x876bad(_0x30451c([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x30451c([0x73,0x74,0x61,0x74,0x65])]==_0x30451c([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0xbca993(){return _0x304f3e(_0x30451c([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x2e885f(){return _0x304f3e(_0x30451c([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x44257e(_0x2edb95){const _0x19002a=_0x143bf7();_0x488a4a[_0x19002a]=_0x30451c([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2edb95,_0x2edb95!=_0x30451c([0x56,0x61,0x6c,0x69,0x64])&&_0x4034c6();}function _0x143bf7(){const _0x8d40c5=window[_0x30451c([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x30451c([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x30451c([0x6e,0x6f,0x77])]())[_0x30451c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x30451c([0x2e]),'');let _0x58d3cc=_0x30451c([0x4b]);for(let _0x256a73=0x0;_0x256a73<_0x8d40c5[_0x30451c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x256a73+=0x2){let _0x85ea3=window[_0x30451c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x8d40c5[_0x30451c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x256a73,_0x256a73+0x2));_0x85ea3>=_0x1bbbf3[_0x30451c([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x85ea3-=_0x1bbbf3[_0x30451c([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x58d3cc+=_0x1bbbf3[_0x85ea3];}return _0x58d3cc;}function _0x5f1cad(){const _0x5c8aa4=_0x1c7cb2[_0x30451c([0x73,0x70,0x6c,0x69,0x74])](_0x30451c([0x2e]));if(0x3!=_0x5c8aa4[_0x30451c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x18614e(_0x5c8aa4[0x1]);function _0x18614e(_0x136062){const _0x2ab6be=_0x345d9f(_0x136062);return _0x2ab6be&&_0x2d5133()?_0x2ab6be:null;function _0x2d5133(){const _0x1fee80=_0x2ab6be[_0x30451c([0x6a,0x74,0x69])],_0x511ea9=window[_0x30451c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1fee80[_0x30451c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1fee80[_0x30451c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x460327={..._0x2ab6be,[_0x30451c([0x6a,0x74,0x69])]:_0x1fee80[_0x30451c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1fee80[_0x30451c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x460327[_0x30451c([0x76,0x63])],_0x42b473(_0x460327)==_0x511ea9;}}}async function _0x502921(){let _0x5510d6=!0x0;try{const _0x3789db=_0x1c7cb2[_0x30451c([0x73,0x70,0x6c,0x69,0x74])](_0x30451c([0x2e])),[_0x345bd3,_0x14b74e,_0x2f4f1f]=_0x3789db;return _0xf55514(_0x345bd3),await _0x4bc19a(_0x345bd3,_0x14b74e,_0x2f4f1f),_0x5510d6;}catch{return!0x1;}function _0xf55514(_0x17fcaa){const _0x4ebb00=_0x345d9f(_0x17fcaa);_0x4ebb00&&_0x4ebb00[_0x30451c([0x61,0x6c,0x67])]==_0x30451c([0x45,0x53,0x32,0x35,0x36])||(_0x5510d6=!0x1);}async function _0x4bc19a(_0x397323,_0x55fa04,_0xd9a32a){const _0xe4c9af=window[_0x30451c([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x30451c([0x66,0x72,0x6f,0x6d])](_0x114eba(_0xd9a32a),_0x3cd9a6=>_0x3cd9a6[_0x30451c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0xe3350=new window[(_0x30451c([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x30451c([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x397323+_0x30451c([0x2e])+_0x55fa04),_0x82149c=window[_0x30451c([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x30451c([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x82149c)return;const _0x1855cd=await _0x82149c[_0x30451c([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x30451c([0x6a,0x77,0x6b]),_0x4e105c,{[_0x30451c([0x6e,0x61,0x6d,0x65])]:_0x30451c([0x45,0x43,0x44,0x53,0x41]),[_0x30451c([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x30451c([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x30451c([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x82149c[_0x30451c([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x30451c([0x6e,0x61,0x6d,0x65])]:_0x30451c([0x45,0x43,0x44,0x53,0x41]),[_0x30451c([0x68,0x61,0x73,0x68])]:{[_0x30451c([0x6e,0x61,0x6d,0x65])]:_0x30451c([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1855cd,_0xe4c9af,_0xe3350)||(_0x5510d6=!0x1);}}function _0x345d9f(_0x135885){return _0x135885[_0x30451c([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x30451c([0x65,0x79]))?JSON[_0x30451c([0x70,0x61,0x72,0x73,0x65])](_0x114eba(_0x135885)):null;}function _0x114eba(_0x15fee1){return window[_0x30451c([0x61,0x74,0x6f,0x62])](_0x15fee1[_0x30451c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x30451c([0x2b]))[_0x30451c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x30451c([0x2f])));}function _0x42b473(_0x32ad5a){let _0x6c7c6d=0x1505;function _0x26b82b(_0x3cfbd7){for(let _0x4771b6=0x0;_0x4771b6<_0x3cfbd7[_0x30451c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4771b6++){const _0x1e6e6d=_0x3cfbd7[_0x30451c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4771b6);_0x6c7c6d=(_0x6c7c6d<<0x5)+_0x6c7c6d+_0x1e6e6d,_0x6c7c6d&=_0x6c7c6d;}}function _0x2f1a2b(_0x5e806b){Array[_0x30451c([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5e806b)?_0x5e806b[_0x30451c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2f1a2b):_0x5e806b&&typeof _0x5e806b==_0x30451c([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x30451c([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5e806b)[_0x30451c([0x73,0x6f,0x72,0x74])]()[_0x30451c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4347a2,_0x542df0])=>{_0x26b82b(_0x4347a2),_0x2f1a2b(_0x542df0);}):_0x26b82b(window[_0x30451c([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5e806b));}return _0x2f1a2b(_0x32ad5a),_0x6c7c6d>>>0x0;}function _0x439da1(_0x10fd6e){return _0x10fd6e[_0x30451c([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x30451c([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x30451c([0x30]));}function _0x21c325(_0x59230a){return _0x59230a[_0x30451c([0x73,0x70,0x6c,0x69,0x74])]('')[_0x30451c([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x30451c([0x6a,0x6f,0x69,0x6e])]('');}function _0x304f3e(_0x311f02){return _0x488a4a[_0x30451c([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x30451c([0x68,0x61,0x73])](_0x311f02);}function _0x876bad(_0x35fa96){return _0x488a4a[_0x30451c([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x30451c([0x67,0x65,0x74])](_0x35fa96);}function _0x3ee88a(){}function _0x30451c(_0x305a2e){return _0x305a2e['map'](_0x48c81f=>String['fromCharCode'](_0x48c81f))['join']('');}_0x44257e(await _0x5cec0f());}(this);}['destroy'](){const _0x5c6c73=this['editor']['plugins']['get'](o),_0x485fb5=this['editor']['config']['get']('collaboration.channelId');for(const _0x2670ab of _0x5c6c73['getCommentThreads']({'channelId':_0x485fb5}))_0x5c6c73['_detachCommentThread'](_0x2670ab['id']),_0x5c6c73['_threads']['delete'](_0x2670ab['id']);super['destroy']();}['hasMarkerForId'](_0x288fd8){return this['getAllMarkersForId'](_0x288fd8)['length']>0x0;}['getAllMarkersForId'](_0x4e89e2){const _0x1dc02e=[];for(const _0x47a7f7 of this['editor']['model']['markers'])_0x47a7f7['name']['startsWith']('comment:'+_0x4e89e2)&&_0x1dc02e['push'](_0x47a7f7);return _0x1dc02e;}['scrollToThreadMarker'](_0x584fa1){setTimeout(()=>{const _0x5b2fa4=this['_getTargetForId'](_0x584fa1);if(!_0x5b2fa4)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x584fa1&&nt({'target':_0x5b2fa4[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x47cc52){this['editor']['model']['change'](()=>{for(const _0x3c8f62 of this['getAllMarkersForId'](_0x47cc52))this['editor']['editing']['reconvertMarker'](_0x3c8f62);});}['_attachArchivedThread'](_0x31588c){const _0x4d2035=this['editor']['plugins']['get'](o),_0x1df49d=this['editor']['plugins']['get'](b),_0x27a95f=_0x4d2035['getCommentThread'](_0x31588c);if(!_0x27a95f['isAttached']){const _0x38cbd2=_0x27a95f['attachTo'](()=>this['_getTargetForId'](_0x27a95f['id']));_0x1df49d['registerAnnotation'](_0x38cbd2),_0x27a95f['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x2082e7=this['editor'],_0x5b2cce=_0x2082e7['plugins']['get'](it);_0x2082e7['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x4d7a05,_0x3c23db)=>{const {id:_0x20f917}=ft(_0x4d7a05['markerName']),_0x1b9cba=_0x2082e7['plugins']['get'](o)['getCommentThread'](_0x20f917),_0x312d07=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x20f917;let _0x19cda8;if(_0x1b9cba&&_0x1b9cba['isResolved']&&!_0x312d07&&_0x4d7a05['item'])return _0x3c23db['consumable']['consume'](_0x4d7a05['item'],'addMarker:'+_0x4d7a05['markerName']),_0x3c23db['consumable']['consume'](_0x4d7a05['item'],'removeMarker:'+_0x4d7a05['markerName']),null;const _0x155fc1=['ck-comment-marker'];return _0x312d07&&_0x155fc1['push']('ck-comment-marker--active'),_0x19cda8=_0x1b9cba?.['length']?_0x1b9cba['comments']['first']['author']['id']:_0x5b2cce['me']['id'],{'classes':_0x155fc1,'attributes':{'data-comment':_0x20f917,'data-author-id':_0x19cda8}};}}),_0x2082e7['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x1bf637,{options:_0x3473fa})=>{if(_0x3473fa['showCommentHighlights'])return null;const _0x19245f=_0x2082e7['plugins']['get'](o),_0x5a9d88=_0x2082e7['model']['markers']['get'](_0x1bf637),{id:_0x2c6dc3,part:_0xeb7e2f}=ft(_0x1bf637);return _0x5a9d88&&!_0x5a9d88['affectsData']||_0x3473fa['ignoreResolvedComments']&&_0x19245f['getCommentThread'](_0x2c6dc3)?.['isResolved']?null:{'group':'comment','name':_0xeb7e2f?_0x2c6dc3+':'+_0xeb7e2f:_0x2c6dc3};}}),_0x2082e7['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x500d7a,{writer:_0x4a0b5d})=>_0x4a0b5d['createElement']('$marker',{'data-name':'comment:'+_0x500d7a['getAttribute']('id')})}),_0x2082e7['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x3aa05d=this['editor'],_0x9026d9=_0x3aa05d['plugins']['get'](o),_0x41bd3a=new Set(),_0x22c323=new Set();_0x3aa05d['model']['document']['registerPostFixer'](_0x474693=>{let _0x58cce0=!0x1;for(const {name:_0x14ea95,data:_0x153721}of _0x3aa05d['model']['document']['differ']['getChangedMarkers']()){const {group:_0x542538,id:_0x4fd806}=ft(_0x14ea95);let _0x130cd7=_0x153721['newRange'];if('comment'!==_0x542538||!_0x130cd7)continue;const _0x548e59='$graveyard'===_0x130cd7['root']['rootName'];_0x548e59||(_0x130cd7=ht(_0x130cd7,_0x3aa05d['model']),!_0x130cd7||_0x130cd7['isCollapsed']||!_0x153721['newRange']||_0x130cd7['isEqual'](_0x153721['newRange']))?_0x3aa05d['model']['hasContent'](_0x130cd7)&&!_0x548e59?this['isThreadsLoadingPaused']?_0x41bd3a['add'](_0x14ea95):this['_handleThreadMarker'](_0x14ea95,_0x4fd806):(_0x22c323['add'](_0x14ea95),_0x41bd3a['delete'](_0x14ea95),_0x474693['removeMarker'](_0x14ea95),_0x58cce0=!0x0):(_0x474693['updateMarker'](_0x14ea95,{'range':_0x130cd7}),_0x58cce0=!0x0);}return _0x58cce0;}),this['on']('change:isThreadsLoadingPaused',(_0x149157,_0x1b339e,_0x520048)=>{if(!_0x520048&&_0x41bd3a['size'])for(const _0x4f2be8 of _0x41bd3a){const {id:_0x18885f}=ft(_0x4f2be8);_0x41bd3a['delete'](_0x4f2be8),_0x3aa05d['model']['markers']['get'](_0x4f2be8)&&this['_handleThreadMarker'](_0x4f2be8,_0x18885f);}}),this['listenTo'](_0x3aa05d['model']['document'],'change',()=>{for(const {name:_0x129e5a,data:{newRange:_0x12e460}}of _0x3aa05d['model']['document']['differ']['getChangedMarkers']()){const {group:_0x5e1071,id:_0x1b2a73}=ft(_0x129e5a);if('comment'!==_0x5e1071)continue;const _0x185996=_0x9026d9['getCommentThread'](_0x1b2a73),_0x3c0246=this['hasMarkerForId'](_0x1b2a73);_0x185996&&(!_0x185996['_hasTargetInContent']&&_0x12e460&&_0x3aa05d['editing']['view']['once']('render',()=>{const _0x1788a9=_0x3aa05d['plugins']['get'](y),_0x2190ea=_0x9026d9['_threadToController']['get'](_0x185996)['view'];_0x1788a9['getByInnerView'](_0x2190ea)['refreshVisibility']();},{'priority':'low'}),_0x185996['_hasTargetInContent']=_0x3c0246||!!_0x12e460),_0x12e460||(_0x22c323['add'](_0x129e5a),_0x41bd3a['delete'](_0x129e5a));}for(const _0x259449 of _0x22c323){const {id:_0x537e4f}=ft(_0x259449),_0x4c8764=_0x9026d9['getCommentThread'](_0x537e4f);if(_0x41bd3a['delete'](_0x259449),!_0x4c8764)continue;const _0x4ab060=this['hasMarkerForId'](_0x537e4f);_0x4ab060||_0x4c8764['isSubmitted']?_0x4ab060||_0x4c8764['unlinkedAt']||_0x4c8764['setUnlinkedAt'](new Date()):_0x4c8764['remove']();}_0x22c323['clear']();});}['_handleInitialThreads'](_0x1613dc){_0x1613dc['forEach'](_0x4d7d49=>{_0x4d7d49['unlinkedAt']&&this['_attachArchivedThread'](_0x4d7d49['id']);});}['_getTargetForId'](_0x11893a){const _0x1ff00b=this['editor'],_0x44c832=this['getAllMarkersForId'](_0x11893a);return et(_0x1ff00b['editing'],_0x44c832);}['_getTextContext'](_0x3dfd6c){const _0x4c67a4=this['getAllMarkersForId'](_0x3dfd6c);let _0x5cb030='',_0x3ff508=!0x1;for(const _0x2cf6f1 of _0x4c67a4){const _0x21717e=_0x2cf6f1['getRange']();for(const _0x505186 of Array['from'](_0x21717e['getItems']()))_0x505186['is']('$textProxy')?(_0x5cb030&&_0x3ff508&&(_0x5cb030+='\x20',_0x3ff508=!0x1),_0x5cb030+=_0x505186['data']):_0x3ff508=!0x0;_0x3ff508=!0x0;}return _0x5cb030['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x10434f,_0x1bd66c){const _0x3540bf=this['editor'],_0x56af04=_0x3540bf['plugins']['get'](o);let _0x34656b=_0x56af04['getCommentThread'](_0x1bd66c);const _0x22c46b=_0x3540bf['config']['get']('collaboration.channelId'),_0x196a71=_0x3540bf['plugins']['get'](b);if(_0x34656b&&(_0x34656b['unlinkedAt']&&_0x34656b['setUnlinkedAt'](null),_0x34656b['isAttached']))return _0x34656b;return!this['getAllMarkersForId'](_0x1bd66c)[0x0]['managedUsingOperations']?_0x3540bf['editing']['view']['once']('render',()=>{if(_0x56af04['getCommentThread'](_0x1bd66c))return;const _0x49ba32=_0x3540bf['plugins']['get'](y);_0x34656b=_0x56af04['openNewCommentThread']({'channelId':_0x22c46b,'threadId':_0x1bd66c,'target':()=>this['_getTargetForId'](_0x1bd66c),'context':{'type':'text','value':this['_getTextContext'](_0x1bd66c)}});const _0x21b7f0=_0x56af04['_threadToController']['get'](_0x34656b)['view'],_0x22c9b7=_0x49ba32['getByInnerView'](_0x21b7f0);_0x22c9b7&&_0x196a71['registerAnnotation'](_0x22c9b7);},{'priority':'low'}):_0x56af04['fetchCommentThread']({'channelId':_0x22c46b,'threadId':_0x1bd66c})['then'](_0x5d950c=>{if('destroyed'!==_0x3540bf['state']){if(_0x34656b=_0x5d950c,_0x34656b&&!_0x34656b['isAttached']){const _0x29813b=_0x34656b['attachTo'](()=>this['_getTargetForId'](_0x1bd66c));_0x196a71['registerAnnotation'](_0x29813b),_0x34656b['isResolved']&&this['_reconvertMarkers'](_0x1bd66c);}else{if(!_0x34656b){const _0xfb15ca=this['getAllMarkersForId'](_0x1bd66c);_0x3540bf['model']['change'](_0x1423d5=>{for(const _0x204263 of _0xfb15ca)_0x1423d5['removeMarker'](_0x204263);});}}}}),_0x34656b;}['_handleThreadMarker'](_0x1c0c55,_0x7633e0){const _0x2558d3=this['_attachMarkerToThread'](_0x1c0c55,_0x7633e0);_0x2558d3&&!_0x2558d3['context']&&_0x2558d3['setContext']({'type':'text','value':this['_getTextContext'](_0x7633e0)});}['_initAriaMarkerChangeAnnouncements'](){const _0x4f331b=this['editor'];rt(_0x4f331b['model'],({left:_0x27c124,entered:_0x1ca1a1})=>{for(const _0x4ebe02 of _0x27c124)if(mt(_0x4ebe02)){_0x4f331b['ui']['ariaLiveAnnouncer']['announce'](N(_0x4f331b['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x4bc853 of _0x1ca1a1)if(mt(_0x4bc853)){_0x4f331b['ui']['ariaLiveAnnouncer']['announce'](N(_0x4f331b['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x5c46b2)));break;}});}}function dt(_0x100c44,_0x29bca1){return _0x29bca1?_0x100c44+':'+_0x29bca1:_0x100c44;}function ht(_0x1d514e,_0x2a466a){const _0x190e53=_0x2a466a['schema'],_0x4d3b7f=_0x2a466a['createRange'](_0x1d514e['start']);for(const _0x4eda5a of _0x1d514e['getWalker']()){const {type:_0x9e4572,item:_0xd13f38,nextPosition:_0x1a63b2}=_0x4eda5a;if('text'===_0x9e4572||_0x190e53['isObject'](_0xd13f38)){const _0x43227b=_0x2a466a['createPositionBefore'](_0xd13f38);_0x4d3b7f['isCollapsed']&&(_0x4d3b7f['start']=_0x43227b),_0x4d3b7f['end']=_0x1a63b2;}}return _0x4d3b7f;}function mt(_0x151827){return'comment'===ft(_0x151827['name'])['group'];}class s extends _0x3d233f{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x55cb54=this['editor'],_0x1d79e4=_0x55cb54['plugins']['get'](o),_0x297f8e=_0x55cb54['plugins']['get'](r),_0x4a8090=_0x55cb54['plugins']['get'](y),_0x427dfd=_0x55cb54['plugins']['get'](b);_0x55cb54['ui']['componentFactory']['add']('comment',()=>{const _0x1c3977=this['_createUIButton'](_0x56f2fa);return _0x1c3977['tooltip']=!0x0,_0x1c3977;}),_0x55cb54['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0xf31b41)),_0x427dfd['addSourceCollector'](()=>{const _0x5575e2=[];for(const [_0x15e999,_0x4c372f]of _0x1d79e4['_threadToController']){const _0xb32b1e=_0x297f8e['getAllMarkersForId'](_0x15e999['id']),_0x19a11c=_0xb32b1e['map'](_0x358a9e=>_0x358a9e['getRange']());_0xb32b1e['length']>0x0&&_0x5575e2['push']([_0x4c372f['view'],_0x19a11c]);}return _0x5575e2;}),this['listenTo'](_0x4a8090,'change:activeAnnotations',(_0x5dc306,_0x263159,_0x5921c4)=>{const _0x52cb40=Array['from'](_0x5921c4)['map'](_0xe4509e=>_0xe4509e['innerView'])['find'](_0x57f197=>_0x1d79e4['_viewToController']['has'](_0x57f197));if(!_0x52cb40)return void(_0x297f8e['activeMarker']=null);const _0x3f59a6=_0x1d79e4['_viewToController']['get'](_0x52cb40)['model']['id'],_0x55b4bc='comment:'+_0x3f59a6;_0x3f59a6&&_0x297f8e['hasMarkerForId'](_0x3f59a6)?_0x297f8e['activeMarker']=_0x55b4bc:_0x297f8e['activeMarker']&&(_0x297f8e['activeMarker']=null);}),this['listenTo'](_0x1d79e4,'removeCommentThread',(_0x383981,{threadId:_0x2074ab,isFromAdapter:_0x5a4741})=>{!_0x5a4741&&_0x55cb54['ui']['focusTracker']['isFocused']&&_0x297f8e['hasMarkerForId'](_0x2074ab)&&_0x55cb54['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x1d79e4,'addComment',(_0x56a708,{threadId:_0x328e29,isFromAdapter:_0x42edd8})=>{if(_0x42edd8||!_0x297f8e['hasMarkerForId'](_0x328e29)||!_0x1d79e4['hasCommentThread'](_0x328e29))return;0x1===_0x1d79e4['getCommentThread'](_0x328e29)['length']&&(_0x55cb54['editing']['view']['focus'](),_0x56a708['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x115e45=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x59a2cc;for(const _0x5097a4 in _0x115e45){const _0x18f29e=_0x5097a4,_0x32ee0e=_0x115e45[_0x18f29e];if('commentsLicenseKeyValid'==_0x32ee0e||'commentsLicenseKeyInvalid'==_0x32ee0e||'commentsLicenseKeyExpired'==_0x32ee0e||'commentsLicenseKeyDomainLimit'==_0x32ee0e||'commentsLicenseKeyNotAllowed'==_0x32ee0e||'commentsLicenseKeyEvaluationLimit'==_0x32ee0e||'commentsLicenseKeyTrialLimit'==_0x32ee0e||'commentsLicenseKeyUsageLimit'==_0x32ee0e){delete _0x115e45[_0x18f29e],_0x59a2cc=_0x32ee0e,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x59a2cc&&_0x115e45['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x59a2cc&&_0x115e45['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x59a2cc&&_0x115e45['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x59a2cc&&_0x115e45['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x59a2cc&&_0x115e45['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x59a2cc&&_0x115e45['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x59a2cc&&_0x115e45['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x398a20){const _0x8175fb=this['editor'],_0x441327=new _0x398a20(_0x8175fb['locale']),_0x28b826=_0x8175fb['commands']['get']('addCommentThread');return _0x441327['set']({'label':N(_0x8175fb['locale'],'Comment'),'icon':_0x417cca}),_0x441327['bind']('isEnabled')['to'](_0x28b826,'hasContent'),this['listenTo'](_0x441327,'execute',()=>{_0x28b826['execute']();}),_0x441327;}}class i extends _0x3d233f{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x4926a3){super(_0x4926a3),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x5e719a,_0x110804,_0x34eb31)=>{_0x34eb31?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x7f0638,_0x224b54]of this['editor']['commands'])_0x224b54['affectsData']&&'addCommentThread'!==_0x7f0638&&_0x224b54['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x1b8b82=this['editor']['editing']['view']['document'];this['listenTo'](_0x1b8b82,'cut',_0x31d3dc=>_0x31d3dc['stop'](),{'priority':'highest'}),this['listenTo'](_0x1b8b82,'clipboardInput',_0x10ed4d=>_0x10ed4d['stop'](),{'priority':'highest'}),this['listenTo'](_0x1b8b82,'delete',_0x41b51f=>_0x41b51f['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x5645a0,_0x11729c]of this['editor']['commands'])_0x11729c['affectsData']&&'addCommentThread'!==_0x5645a0&&_0x11729c['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x5769e4{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x72bad4){super(_0x72bad4),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x410860=this['context']['plugins']['get'](y);this['listenTo'](_0x410860,'_activateAnnotation',(_0x405a4c,_0x11363f)=>{for(const _0x309b78 of this['activeUIs']){const _0x320ac7=this['_uis']['get'](_0x309b78);(0x0,this['uisData']['get'](_0x309b78)['filter'])(_0x11363f)&&_0x320ac7['setActiveAnnotation'](_0x11363f);}}),this['listenTo'](_0x410860,'_deactivateAllAnnotations',()=>{for(const _0x2901df of this['activeUIs']){this['_uis']['get'](_0x2901df)['setActiveAnnotation'](null);}}),this['listenTo'](_0x410860['_visibleAnnotations'],'add',(_0x1de8ed,_0x482a42)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x482a42);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x2b0498){return this['activeUIs']['has'](_0x2b0498);}['activate'](_0x1b69fd,_0xb16033=this['defaultFilter']){const _0x574b87=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x1b69fd))throw new _0x3e31b7('annotationsuis-missing-ui',this,{'uiName':_0x1b69fd});this['isActive'](_0x1b69fd)&&this['deactivate'](_0x1b69fd),this['activeUIs']['add'](_0x1b69fd);const _0x48783c=new S();v({'source':_0x574b87['_visibleAnnotations'],'target':_0x48783c,'filter':_0xb16033}),this['uisData']['set'](_0x1b69fd,{'collection':_0x48783c,'filter':_0xb16033});const _0x3b1980=this['_uis']['get'](_0x1b69fd);_0x3b1980['attach'](_0x48783c),this['listenTo'](_0x3b1980,'change:activeAnnotation',(_0x542bfa,_0x169bf5,_0x3b02d7,_0x4b8328)=>{_0x4b8328&&_0x574b87['_removeActiveAnnotation'](_0x4b8328),_0x3b02d7&&_0x574b87['_addActiveAnnotation'](_0x3b02d7);});}['deactivate'](_0x13f114){if(this['activeUIs']['delete'](_0x13f114),!this['_uis']['has'](_0x13f114))throw new _0x3e31b7('annotationsuis-missing-ui',this,{'uiName':_0x13f114});const _0x35287b=this['_uis']['get'](_0x13f114);_0x35287b['detach'](),this['stopListening'](_0x35287b),this['uisData']['get'](_0x13f114)['collection']['destroy'](),this['uisData']['delete'](_0x13f114);}['switchTo'](_0x4c3681){if(!this['_uis']['has'](_0x4c3681))throw new _0x3e31b7('annotationsuis-missing-ui',this,{'uiName':_0x4c3681});const _0x3a67f8=this['context']['plugins']['get'](y),_0x1ded80=Array['from'](_0x3a67f8['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x4c3681);const _0x347848=this['_uis']['get'](_0x4c3681);_0x347848['setActiveAnnotation'](_0x1ded80),_0x347848['_setSelectedAnnotations']&&_0x1ded80&&_0x347848['_setSelectedAnnotations']([_0x1ded80]);}['deactivateAll'](){for(const _0x4e4b75 of this['activeUIs'])this['deactivate'](_0x4e4b75);}['register'](_0x1be95d,_0x1b19d5){if(this['_uis']['has'](_0x1be95d))throw new _0x3e31b7('annotationsuis-register-already-registered');if('function'!=typeof _0x1b19d5['attach']||'function'!=typeof _0x1b19d5['detach']||'function'!=typeof _0x1b19d5['setActiveAnnotation'])throw new _0x3e31b7('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x1be95d,_0x1b19d5);}['refilterAnnotations'](){const _0x5b9f2f=this['context']['plugins']['get'](y)['collection'],_0x1dc06d=new Map(),_0x32b45e=Array['from'](this['activeUIs']);for(const _0x44d0de of this['activeUIs']){const _0x5c7164=this['uisData']['get'](_0x44d0de)['collection'];for(const _0xa3e7f2 of _0x5c7164)_0x1dc06d['set'](_0xa3e7f2,_0x44d0de);}for(const _0x5322d3 of _0x5b9f2f){const _0x1678c3=_0x1dc06d['get'](_0x5322d3);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5322d3);const _0x3f7fb0=_0x32b45e['find'](_0x255716=>this['uisData']['get'](_0x255716)['filter'](_0x5322d3));_0x1678c3!==_0x3f7fb0&&(_0x1678c3&&this['uisData']['get'](_0x1678c3)['collection']['remove'](_0x5322d3),_0x3f7fb0&&this['uisData']['get'](_0x3f7fb0)['collection']['add'](_0x5322d3));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x22720a){const _0x54911c=[];for(const _0x582f4e of this['activeUIs']){(0x0,this['uisData']['get'](_0x582f4e)['filter'])(_0x22720a)&&_0x54911c['push'](_0x582f4e);}if(_0x54911c['length']>0x1)throw new _0x3e31b7('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x54911c,'annotationType':_0x22720a['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
-
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(
|
|
33
|
-
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x1f8c7c){super(_0x1f8c7c),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x227e61,_0x2a4685)=>_0x227e61+_0x2a4685),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x1a630a=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x1a630a['to']('isAnimationDisabled',_0x16d49a=>_0x16d49a?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x1a630a['to']('top',_0x39b368=>Ot(_0x39b368))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x112b7f=this['element']['clientHeight'];_0x112b7f&&(this['height']=_0x112b7f);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x5769e4{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x50f109){super(_0x50f109),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 _0x1220c1=this['context']['config']['get']('sidebar.container');_0x1220c1&&this['setContainer'](_0x1220c1);}['setContainer'](_0x389e4d){if(!g(_0x389e4d))throw new _0x3e31b7('sidebar-setcontainer-invalid-element');this['container']=_0x389e4d;}['_attachToContainer']({viewClass:_0x3b7cfa='',spaceBetweenItems:_0x41cc45=0x19}={}){if(!g(this['container']))throw new _0x3e31b7('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x3b7cfa,this['_spaceBetweenItems']=_0x41cc45;}['rearrange']({removedAnnotation:_0x3e4db7,previousAnnotation:_0x3f7f56,nextAnnotation:_0x3f9881}){const _0x543b60=this['getSidebarItemView'](_0x3e4db7);this['view']['list']['remove'](_0x543b60),this['_destroySidebarItemView'](_0x3e4db7),_0x3f7f56&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3f7f56)),_0x3f9881&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3f9881)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x1e1611,activatedAnnotation:_0x58f4f4,disableAnimationOnActivatedAnnotation:_0x23ecdb}){if(this['_activeAnnotation']=_0x58f4f4,_0x1e1611){_0x1e1611['isActive']=!0x1;const _0x30c441=this['getSidebarItemView'](_0x1e1611);_0x30c441&&_0x23ecdb&&(_0x30c441['isAnimationDisabled']=!0x1);}if(_0x58f4f4){const _0x5843a8=this['getSidebarItemView'](_0x58f4f4);_0x5843a8&&(_0x58f4f4['isActive']=!0x0,_0x23ecdb&&(_0x5843a8['isAnimationDisabled']=!0x0,_0x5843a8['top']+=0x1),this['_alignToTargetRect'](_0x5843a8));}}['_detachFromContainer'](_0x1d56e1){if(this['view']['element']['remove'](),_0x1d56e1){for(const _0x501a0c of _0x1d56e1)this['_destroySidebarItemView'](_0x501a0c);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x35277c,_0x34153e){_0x34153e||(_0x34153e=_0x35277c['view']);const _0x3587ed=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x3587ed,_0x35277c),this['_annotationToSidebarItemView']['set'](_0x35277c,_0x3587ed),_0x3587ed['content']['add'](_0x34153e),this['listenTo'](_0x35277c['view'],'change:targetRect',(_0x392343,_0x114d5e,_0x293c9f)=>{const _0x179bfc=this['_getTargetTop'](_0x35277c,_0x293c9f);_0x3587ed['_targetTop']!=_0x179bfc&&(_0x3587ed['_targetTop']=_0x179bfc,this['_setItemTop'](_0x3587ed,_0x179bfc));}),this['listenTo'](_0x3587ed,'change:top',()=>{this['_recalculate'](_0x3587ed,'top');}),this['listenTo'](_0x3587ed,'change:bottom',()=>{this['_recalculate'](_0x3587ed,'bottom');}),this['_alignToTargetRect'](_0x3587ed);const _0x2ca47f=this['_getItemBefore'](_0x3587ed);if(_0x2ca47f)this['_alignAfterItem'](_0x2ca47f,_0x3587ed)||this['_alignToTargetRect'](_0x3587ed);else this['_alignToTargetRect'](_0x3587ed);return this['_updateLastItem'](),this['view']['list']['add'](_0x3587ed),_0x3587ed;}['_alignForTopChange'](_0x287229){if(!_0x287229['content']['length'])return;const _0x1cf261=this['_getItemBefore'](_0x287229);if(!_0x1cf261)return;const _0x5d50ca=this['_sidebarItemViewToAnnotation']['get'](_0x1cf261),_0x57ff59=this['_activeAnnotation'];_0x57ff59&&_0x57ff59===_0x5d50ca?this['_alignAfterItem'](_0x1cf261,_0x287229):this['_alignBeforeItem'](_0x287229,_0x1cf261);}['_alignForBottomChange'](_0x1f74bd){if(!_0x1f74bd['content']['length'])return;const _0x651546=this['_getItemAfter'](_0x1f74bd);if(!_0x651546)return;const _0x1e51bd=this['_sidebarItemViewToAnnotation']['get'](_0x651546),_0x1222c5=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x181730=this['_activeAnnotation'];_0x181730&&_0x181730===_0x1e51bd&&_0x1222c5?(this['_alignBeforeItem'](_0x651546,_0x1f74bd),this['_alignAfterItem'](_0x1f74bd,_0x651546)):_0x181730&&_0x181730===_0x1e51bd?this['_alignBeforeItem'](_0x651546,_0x1f74bd):this['_alignAfterItem'](_0x1f74bd,_0x651546);}['_recalculate'](_0x5e1fa3,_0x238f42){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x377a17,changedProp:_0x150b3c}of this['_recalculateBuffer'])'top'===_0x150b3c?this['_alignForTopChange'](_0x377a17):this['_alignForBottomChange'](_0x377a17);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x5e1fa3,'changedProp':_0x238f42});}['getSidebarItemView'](_0x1c4ebb){return this['_annotationToSidebarItemView']['get'](_0x1c4ebb);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x47f6fc){const _0xff12c4=this['getSidebarItemView'](_0x47f6fc);this['stopListening'](_0xff12c4),this['stopListening'](_0x47f6fc['view']),_0xff12c4['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x47f6fc),this['_sidebarItemViewToAnnotation']['delete'](_0xff12c4);}['_createSidebarView'](){const _0x432f9e=new H(this['context']['locale']);return _0x432f9e['render'](),this['on']('change:_lastItem',(_0x274e50,_0x4ad10b,_0x5dfbc2,_0x4669d0)=>{_0x4669d0&&_0x432f9e['unbind']('minHeight'),_0x5dfbc2?_0x432f9e['bind']('minHeight')['to'](_0x5dfbc2,'bottom'):_0x432f9e['minHeight']=null;}),_0x432f9e;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x263f3f){const _0x29aeab=this['_sidebarItemViewToAnnotation']['get'](_0x263f3f),_0x2c1a1f=_0x29aeab&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x29aeab)-0x1);return _0x2c1a1f&&this['getSidebarItemView'](_0x2c1a1f)||null;}['_getItemAfter'](_0x16396f){const _0x5a995d=this['_sidebarItemViewToAnnotation']['get'](_0x16396f),_0xbccf91=_0x5a995d&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x5a995d)+0x1);return _0xbccf91&&this['getSidebarItemView'](_0xbccf91)||null;}['_alignBeforeItem'](_0x1c800a,_0x5a0805){_0x1c800a['updateHeight']();const _0xc38a15=G(_0x5a0805['bottom']+this['_spaceBetweenItems'],_0x1c800a['top']);return!!_0xc38a15&&(this['_setItemTop'](_0x5a0805,_0x5a0805['top']-_0xc38a15),!0x0);}['_alignAfterItem'](_0x1bda2e,_0x2405f4){_0x1bda2e['updateHeight']();const _0x28a019=G(_0x1bda2e['bottom']+this['_spaceBetweenItems'],_0x2405f4['top']);return!!_0x28a019&&(this['_setItemTop'](_0x2405f4,_0x2405f4['top']+_0x28a019,!0x1),!0x0);}['_alignToTargetRect'](_0x1aca48){const _0x395e03=this['_sidebarItemViewToAnnotation']['get'](_0x1aca48);if(!_0x395e03||!_0x395e03['target']||!_0x395e03['targetRect'])return;const _0x4a6ad9=this['_getTargetTop'](_0x395e03,_0x395e03['targetRect']);this['_setItemTop'](_0x1aca48,_0x4a6ad9);}['_getTargetTop'](_0x1be1f6,_0x58a9be){if(null===_0x58a9be)return 0x0;if(_0x1be1f6['target']instanceof _0x4d09a0)return _0x58a9be['top'];{const _0x599ca2=new _0x4d09a0(this['view']['element'])['top'];return _0x58a9be['top']-_0x599ca2;}}['_setItemTop'](_0x5475df,_0x1a50c6,_0x478323=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x478323&&(_0x1a50c6=Math['max'](_0x1a50c6,this['_getMaxAvailableTop'](_0x5475df))),_0x5475df['top']=_0x1a50c6;}['_getMaxAvailableTop'](_0x154712){let _0x42aa89=this['_getItemBefore'](_0x154712),_0x4b3c47=0x0;for(;_0x42aa89;)_0x42aa89['updateHeight'](),_0x4b3c47+=this['_spaceBetweenItems']+_0x42aa89['height'],_0x42aa89=this['_getItemBefore'](_0x42aa89);return _0x4b3c47;}}function G(_0x344ef4,_0x256e9c){return Math['max'](_0x344ef4-_0x256e9c,0x0);}function g(_0x3490a3){return null!==_0x3490a3&&'object'==typeof _0x3490a3&&0x1===_0x3490a3['nodeType'];}class e extends _0x5769e4{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1e4d0a){super(_0x1e4d0a),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x1b1bd5(),this['_refreshPositioningDebounced']=_0x1f36ab(()=>{_0x1e4d0a['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x284de8=this['context']['plugins']['get'](j),_0x4ebadb=this['context']['plugins']['get'](z);_0x284de8['register']('wideSidebar',this),_0x4ebadb['container']&&_0x284de8['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x15973c){if(_0x15973c===this['activeAnnotation'])return;const _0x522e01=this['context']['plugins']['get'](z);_0x522e01['_activeAnnotation']=_0x15973c;const _0x40a49f=this['activeAnnotation'];_0x522e01['refresh']({'blurredAnnotation':_0x40a49f,'activatedAnnotation':_0x15973c}),this['activeAnnotation']=_0x15973c;}['attach'](_0x1091a9){this['annotations']=_0x1091a9;const _0x281c2a=this['context']['plugins']['get'](z);if(_0x281c2a['_annotations']=_0x1091a9,this['isAttached'])throw new _0x3e31b7('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x281c2a,'set:container',()=>{this['detach'](),this['listenTo'](_0x281c2a,'change:container',_0x2adf6b=>{_0x2adf6b['off'](),this['attach'](_0x1091a9);});}),_0x281c2a['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x3e2873=_0x24169f=>{_0x24169f['updateTargetRect'](),_0x281c2a['addAnnotation'](_0x24169f);};for(const _0x222aeb of _0x1091a9)_0x3e2873(_0x222aeb);this['listenTo'](_0x1091a9,'add',(_0x3577fe,_0xa6c356)=>{_0x3e2873(_0xa6c356);}),this['listenTo'](_0x1091a9,'remove',(_0x2785c0,_0x4b8481,_0x1e79de)=>{_0x281c2a['rearrange']({'removedAnnotation':_0x4b8481,'previousAnnotation':_0x1091a9['get'](_0x1e79de-0x1),'nextAnnotation':_0x1091a9['get'](_0x1e79de+0x1)}),_0x4b8481===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x1091a9,'focus',(_0x3250aa,_0x799a30)=>{this['setActiveAnnotation'](_0x799a30);}),this['listenTo'](_0x1091a9,'blur',()=>{this['setActiveAnnotation'](null);});const _0x3de035=this['context']instanceof _0x18e5c3?this['context']['editors']:new _0x1b1bd5([this['context']]);for(const _0x44b8be of _0x3de035)this['_integrateWithEditorAnnotations'](_0x44b8be);this['listenTo'](_0x3de035,'add',(_0x185580,_0x187f44)=>{this['listenTo'](_0x187f44,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x187f44);});}),this['listenTo'](_0x3de035,'remove',(_0xe312c0,_0x1f70a4)=>{_0x1f70a4['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x1f70a4['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x3e31b7('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x45bade=this['context']['plugins']['get'](z);_0x45bade['_detachFromContainer'](this['annotations']),this['stopListening'](_0x45bade),this['stopListening'](this['annotations']),this['context']instanceof _0x18e5c3&&this['stopListening'](this['context']['editors']);for(const _0x270299 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x270299);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x36bdc4){if(!_0x36bdc4['plugins']['has']('EditorAnnotations'))return;const _0x22e0e7=_0x36bdc4['plugins']['get']('EditorAnnotations'),_0x36af33=()=>{const _0x27c5bd=_0x22e0e7['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x27c5bd[0x0]||null);};this['listenTo'](_0x22e0e7,'refresh',_0x36af33),this['listenTo'](_0x22e0e7,'blur',(_0x33d5cc,{isAnnotationTracked:_0x104e18})=>{this['activeAnnotation']&&_0x104e18(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x22e0e7,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x272f4a=>{_0x22e0e7['hasDomSelection']()&&(_0x36af33(),_0x272f4a['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x22e0e7);}['_destroyEditorAnnotationsIntegration'](_0x47f6a8){this['stopListening'](_0x47f6a8),this['_editorAnnotations']['remove'](_0x47f6a8);}}class C extends _0x56f2fa{['counterView'];constructor(_0x59daaa){super(_0x59daaa);const _0x4ce452=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x16b73b,_0x3449ca)=>_0x16b73b?'...':_0x3449ca['toString']()),this['set']('annotationType',''),this['icon']=_0x417cca,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x4ce452['to']('annotationType',_0x35f7e7=>'ck-annotation-counter__badge--'+_0x35f7e7),_0x4ce452['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x4ce452['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x5769e4{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2c850b){super(_0x2c850b),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x1a9ea6())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x1b1bd5(),this['_refreshPositioningDebounced']=_0x1f36ab(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x21805a(this['context']['locale']),this['balloonPanelView']=new _0x251547(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x4da67f){this['annotations']=_0x4da67f;const _0x226852=this['context']['plugins']['get'](z),_0x5a53de=this['balloonPanelView'];if(_0x226852['_annotations']=_0x4da67f,this['isAttached'])throw new _0x3e31b7('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x226852,'set:container',()=>{this['detach'](),this['listenTo'](_0x226852,'change:container',_0x3888b2=>{_0x3888b2['off'](),this['attach'](_0x4da67f);});}),_0x226852['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x2f9a20=_0x12a98e=>{const _0x2479b8=new C(this['context']['locale']);_0x226852['addAnnotation'](_0x12a98e,_0x2479b8),this['_annotationToNarrowView']['set'](_0x12a98e,_0x2479b8),_0x2479b8['bind']('isDirty','annotationType','number')['to'](_0x12a98e['view'],'isDirty','type','length'),_0x2479b8['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x5a53de['content']['first']!==_0x12a98e['view']?(this['_showBalloon'](_0x12a98e),_0x12a98e['view']['element']['focus'](),this['setActiveAnnotation'](_0x12a98e)):this['setActiveAnnotation'](null);});};for(const _0x1228b9 of _0x4da67f)_0x2f9a20(_0x1228b9);this['listenTo'](_0x4da67f,'add',(_0x48dea4,_0x50581e)=>{_0x2f9a20(_0x50581e);}),this['listenTo'](_0x4da67f,'remove',(_0x10ef34,_0x671dce,_0x43e43e)=>{this['_annotationToNarrowView']['get'](_0x671dce)['destroy'](),this['_annotationToNarrowView']['delete'](_0x671dce),_0x226852['rearrange']({'removedAnnotation':_0x671dce,'previousAnnotation':_0x4da67f['get'](_0x43e43e-0x1),'nextAnnotation':_0x4da67f['get'](_0x43e43e+0x1)}),_0x671dce===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x4da67f,'focus',(_0x47e619,_0x40f70a)=>{this['setActiveAnnotation'](_0x40f70a);}),this['listenTo'](_0x4da67f,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x38af0e,_0x4dce4b)=>{_0x4dce4b['keyCode']===_0x496e11['esc']&&_0x5a53de['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x5a53de['content']['first']),this['_hideBalloon'](),_0x4dce4b['stopPropagation'](),_0x4dce4b['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x1b72e6,_0x41c8c2)=>{const _0x41d4f4=_0x41c8c2['target'];_0x5a53de['isVisible']&&_0x5a53de['element']['contains'](_0x41d4f4)||_0x226852['view']['element']['contains'](_0x41d4f4)||_0x1b72e6['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x4bc842=>_0x4bc842['contains'](_0x41d4f4))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x4e11be=this['context']instanceof _0x18e5c3?this['context']['editors']:new _0x1b1bd5([this['context']]);for(const _0x38e8eb of _0x4e11be)this['_integrateWithEditorAnnotations'](_0x38e8eb);this['listenTo'](_0x4e11be,'add',(_0x4ff6ab,_0x263569)=>{this['listenTo'](_0x263569,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x263569);});}),this['listenTo'](_0x4e11be,'remove',(_0x1f0176,_0x3428ca)=>{_0x3428ca['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3428ca['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x4de885){if(_0x4de885===this['activeAnnotation'])return;const _0x3c336d=this['context']['plugins']['get'](z);if(_0x3c336d['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x4de885,'disableAnimationOnActivatedAnnotation':!0x0}),_0x4de885)_0x3c336d['getSidebarItemView'](_0x4de885)?this['_showBalloon'](_0x4de885):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x4de885;}['detach'](){if(!this['isAttached'])throw new _0x3e31b7('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3cbc06=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x5b0638=>_0x5b0638['destroy']()),this['_annotationToNarrowView']['clear'](),_0x3cbc06['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x18e5c3&&this['stopListening'](this['context']['editors']);for(const _0x5a4ffe of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x5a4ffe);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'](_0x50c87b){if(!_0x50c87b['plugins']['has']('EditorAnnotations'))return;const _0x497311=_0x50c87b['plugins']['get']('EditorAnnotations'),_0x4bebe8=this['context']['plugins']['get'](z),_0x9146a0=this['annotations'],_0x113aca=this['balloonPanelView'],_0x19e029=()=>{const _0x1bc62d=_0x497311['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x1bc62d),this['setActiveAnnotation'](_0x1bc62d[0x0]||null);};this['listenTo'](_0x497311,'refresh',_0x19e029),this['listenTo'](_0x497311,'blur',(_0x200e16,{isAnnotationTracked:_0xf24cea})=>{this['activeAnnotation']&&_0xf24cea(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x497311,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x9146a0,'blur',_0x150cfd=>{_0x497311['hasDomSelection']()&&_0x150cfd['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x251e2a,_0x148ed9)=>{const _0x42613b=_0x148ed9['target'];_0x113aca['isVisible']&&_0x113aca['element']['contains'](_0x42613b)||_0x4bebe8['view']['element']['contains'](_0x42613b)||this['activeAnnotation']&&_0x497311['hasDomSelection']()&&(_0x19e029(),_0x251e2a['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x497311);}['_destroyEditorAnnotationsIntegration'](_0x1ee603){_0x1ee603&&(this['stopListening'](_0x1ee603),this['_editorAnnotations']['remove'](_0x1ee603));}['_setSelectedAnnotations'](_0x52bcf6){for(const _0x223178 of this['_selectedAnnotations'])_0x52bcf6['includes'](_0x223178)||this['_manuallyClosedAnnotationViews']['delete'](_0x223178['view']);this['_selectedAnnotations']=_0x52bcf6;}['_refreshPositioning'](){const _0x4d9604=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x4d9604['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0xa19634){if(this['_manuallyClosedAnnotationViews']['has'](_0xa19634['view']))return;const _0x2c481b=this['balloonPanelView']['content']['first'];_0x2c481b!==_0xa19634['view']?(_0x2c481b&&this['_detachListeners'](_0x2c481b),this['_attachListeners'](_0xa19634['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0xa19634['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x1e693c=this['balloonPanelView']['content']['first'],_0x12f4dd=_0x1e693c&&this['annotations']['getByView'](_0x1e693c);if(!_0x12f4dd||!this['_annotationToNarrowView']['has'](_0x12f4dd))return;const _0x4c981f=this['_annotationToNarrowView']['get'](_0x12f4dd)['element'],_0x2f0b7c=(function(){const _0x36a47c=_0x251547['defaultPositions'];return[_0x36a47c['southArrowNorthEast'],_0x36a47c['northArrowSouthEast'],_0x36a47c['southArrowNorth'],_0x36a47c['northArrowSouth'],_0x36a47c['southArrowNorthWest'],_0x36a47c['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x4c981f,'positions':_0x2f0b7c});}['_hideBalloon'](){const _0x18c8a1=this['balloonPanelView'],_0x2a2ec4=_0x18c8a1['content']['first'];_0x2a2ec4&&(this['_detachListeners'](_0x2a2ec4),_0x18c8a1['unpin'](),_0x18c8a1['content']['clear']());}['_attachListeners'](_0x45cd45){this['listenTo'](_0x45cd45,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x45cd45,'Esc',(_0x47bb3d,_0x55475c)=>{this['_manuallyClosedAnnotationViews']['add'](_0x45cd45),this['_hideBalloon'](),_0x55475c();});}['_detachListeners'](_0x285354){this['stopListening'](_0x285354);}}class c extends _0x3d233f{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x1d3115,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1388c7){super(_0x1388c7),_0x1388c7['editing']['view']['addObserver'](_0x30b63e),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x1388c7['plugins']['get'](_0x1d3115),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0xa3ce97=this['editor']['plugins']['get'](j);_0xa3ce97['context']===this['editor']&&(_0xa3ce97['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0xfdc084,_0x8ba29a)=>{const _0x3284ac=this['_balloon'];if(this['isAttached']&&_0x3284ac['visibleView']){const _0x2465cd=this['annotations']['getByView'](_0x3284ac['visibleView']);_0x2465cd&&this['_closeAnnotation'](_0x2465cd),_0x8ba29a();}}));}['afterInit'](){const _0x1ccc20=this['editor']['plugins']['get'](j);_0x1ccc20['context']===this['editor']&&(_0x1ccc20['hasActive']()||_0x1ccc20['switchTo']('inline'));}['setActiveAnnotation'](_0x355839){_0x355839!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x355839&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x355839)&&this['_addAnnotationToBalloon'](_0x355839,!0x0),_0x355839['isActive']=!0x0),_0x355839||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x355839);}['attach'](_0x31c808){this['annotations']=_0x31c808;const _0x237e42=this['editor']['plugins']['get'](j),_0x18236e=this['_balloon'];if(this['isAttached'])throw new _0x3e31b7('inlineannotations-attach-already-attached',this);if(_0x237e42['context']!==this['editor'])throw new _0x3e31b7('inlineannotations-not-allowed-with-context',this);const _0x37ea9b=this['editor']['plugins']['get'](b);this['listenTo'](_0x37ea9b,'refresh',()=>{const _0x45c1bc=_0x37ea9b['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x11267d,_0x40fad7;!this['_forceRefresh']&&(_0x11267d=_0x45c1bc,_0x40fad7=this['_selectedAnnotations'],_0x11267d['length']===_0x40fad7['length']&&_0x11267d['every'](_0x44f24=>_0x40fad7['includes'](_0x44f24)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x45c1bc),this['setActiveAnnotation'](_0x45c1bc[0x0]||null));}),this['listenTo'](_0x37ea9b,'blur',(_0x1cb8fa,{isAnnotationTracked:_0x5287a0})=>{this['activeAnnotation']&&_0x5287a0(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x52f9b9,_0x4f24fe,_0x57ec14)=>{_0x57ec14||this['setActiveAnnotation'](null);}),this['listenTo'](_0x31c808,'remove',(_0x2b9a1f,_0x5cebff)=>{this['_removeAnnotationFromBalloon'](_0x5cebff),_0x5cebff===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x18236e,'change:visibleView',(_0x3040cf,_0xb21668,_0x3098fd,_0xffcdbb)=>{_0xffcdbb&&this['stopListening'](_0xffcdbb);const _0x3b7229=_0x31c808['getByView'](_0x3098fd);_0x3098fd&&_0x3b7229&&(this['listenTo'](_0x3098fd,'change:height',()=>{_0x18236e['updatePosition']();}),this['listenTo'](_0x3098fd,'Esc',()=>{this['_closeAnnotation'](_0x3b7229),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x3b7229&&this['setActiveAnnotation'](_0x3b7229));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x18236e['visibleView']&&(_0x31c808['getByView'](_0x18236e['visibleView'])&&_0x18236e['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 _0x3e31b7('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0xd84a19 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0xd84a19);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0xff18cf){for(const _0xf85df6 of this['_selectedAnnotations'])_0xff18cf['includes'](_0xf85df6)||this['_manuallyClosed']['delete'](_0xf85df6);for(const _0xf63592 of this['annotations'])_0xff18cf['includes'](_0xf63592)||this['_removeAnnotationFromBalloon'](_0xf63592);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x25bfcd of _0xff18cf)this['_addAnnotationToBalloon'](_0x25bfcd);}this['_selectedAnnotations']=_0xff18cf;}['_addAnnotationToBalloon'](_0x173c10,_0x3dd9c3=!0x1){this['_manuallyClosed']['has'](_0x173c10)||(this['_addedAnnotations']['has'](_0x173c10)||this['_balloon']['hasView'](_0x173c10['view'])||(this['_addedAnnotations']['add'](_0x173c10),this['_balloon']['add']({'stackId':_0x173c10['view']['id'],'view':_0x173c10['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x173c10)}})),_0x3dd9c3&&this['_balloon']['showStack'](_0x173c10['view']['id']));}['_getBalloonTargetForAnnotation'](_0xc286c1){const _0xa11ac=_0xc286c1['target'],_0x5d8b5f=this['editor']['editing']['view'],_0x5dade4=_0x5d8b5f['document']['selection']['getFirstRange'](),_0x342e2f=_0x5d8b5f['domConverter']['viewRangeToDom'](_0x5dade4);if(_0x342e2f['collapse'](!0x0),_0xa11ac){if(_0xa11ac instanceof _0x4d09a0)return _0xa11ac;let _0x49ff62=[];for(const _0x1a69ec of _0xa11ac)_0x49ff62['push'](...F(_0x1a69ec['getClientRects']()));_0x49ff62=function(_0x9acb7c){const _0x2edb5a=[];let _0x53c8ba=_0x9acb7c[0x0];for(let _0x124792=0x1;_0x124792<_0x9acb7c['length'];_0x124792++)P(_0x53c8ba,_0x9acb7c[_0x124792])?_0x53c8ba['width']+=_0x9acb7c[_0x124792]['width']:(_0x2edb5a['push'](_0x53c8ba),_0x53c8ba=_0x9acb7c[_0x124792]);return _0x2edb5a['push'](_0x53c8ba),_0x2edb5a;}(_0x49ff62);const _0x720903=_0x342e2f['getBoundingClientRect']();return _0x49ff62['find'](_0x24d4e7=>_0x24d4e7['top']<=_0x720903['top']&&_0x24d4e7['bottom']>=_0x720903['bottom']&&_0x24d4e7['left']<=_0x720903['left']&&_0x24d4e7['right']>=_0x720903['right'])||_0x49ff62[0x0];}return _0xc286c1['targetRect']||_0x342e2f;}['_removeAnnotationFromBalloon'](_0x204373){this['_addedAnnotations']['has'](_0x204373)&&this['_balloon']['hasView'](_0x204373['view'])&&(this['_addedAnnotations']['delete'](_0x204373),this['_balloon']['remove'](_0x204373['view']));}['_closeAnnotation'](_0x4f142e){this['_manuallyClosed']['add'](_0x4f142e),this['_removeAnnotationFromBalloon'](_0x4f142e);}}function F(_0x4d2f46){return Array['from'](_0x4d2f46)['map'](DOMRect['fromRect']);}function P(_0x4fad32,_0x21d10b){return _0x4fad32['top']===_0x21d10b['top']&&_0x4fad32['bottom']===_0x21d10b['bottom']&&_0x4fad32['right']===_0x21d10b['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x1954b7,_0x342869){super(_0x1954b7),this['set']('isEmpty',!_0x342869['length']),this['focusTracker']=new _0xeb7998(),this['_annotationViews']=_0x342869,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x2fb93a({'focusables':_0x342869,'focusTracker':this['focusTracker']}),this['listenTo'](_0x342869,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x342869,'remove',(_0x108503,_0x13e762)=>{_0x13e762['isActive']&&this['focus'](),_0x342869['length']||(this['isEmpty']=!0x0);});const _0x257a92=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x1954b7,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x342869},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x257a92['if']('isEmpty','ck-hidden',_0x9bff4a=>!_0x9bff4a)]},'children':[{'text':N(_0x1954b7,'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 _0x19bf06 of this['_annotationViews'])this['focusTracker']['add'](_0x19bf06['element']);this['_annotationViews']['on']('change',(_0x3c285c,{added:_0x1638c2,removed:_0x25a21e})=>{for(const _0x37baa0 of _0x1638c2)this['focusTracker']['add'](_0x37baa0['element']);for(const _0x1e9938 of _0x25a21e)this['focusTracker']['remove'](_0x1e9938['element']);});}}class p extends _0x5769e4{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x2c99b6){super(_0x2c99b6),this['archivedThreads']=new _0x1b1bd5();}['init'](){const _0x4a6ac9=this['context'],_0x49532d=_0x4a6ac9['plugins']['get'](o),_0x159dc6=_0x4a6ac9['plugins']['get'](y);this['listenTo'](_0x49532d,'addCommentThread',(_0x525cd1,{threadId:_0x35f735})=>{const _0x55eb42=_0x49532d['getCommentThread'](_0x35f735);_0x55eb42['archivedAt']&&this['archivedThreads']['add'](_0x55eb42,this['_calculatePosition'](_0x55eb42['archivedAt'])),this['listenTo'](_0x55eb42,'change:archivedAt',(_0x5014b1,_0x361930,_0x15d65d)=>{_0x15d65d?this['archivedThreads']['has'](_0x55eb42)||this['archivedThreads']['add'](_0x55eb42,this['_calculatePosition'](_0x55eb42['archivedAt'])):this['archivedThreads']['has'](_0x55eb42)&&this['archivedThreads']['remove'](_0x55eb42);});}),this['listenTo'](_0x49532d,'removeCommentThread',(_0x282e5d,{threadId:_0x4a723b})=>{const _0x344dd5=_0x49532d['getCommentThread'](_0x4a723b);this['stopListening'](_0x344dd5),this['archivedThreads']['has'](_0x344dd5)&&this['archivedThreads']['remove'](_0x344dd5);},{'priority':'highest'}),this['listenTo'](_0x159dc6['collection'],'focus',(_0x315a6e,_0x5a94d0)=>{_0x5a94d0['isVisible']||(_0x5a94d0['isActive']=!0x0,_0x159dc6['activate'](_0x5a94d0));});}['_calculatePosition'](_0x16e192){const _0x49d6ec=[...this['archivedThreads']]['findIndex'](_0x91a3dc=>_0x91a3dc['archivedAt']<_0x16e192);return _0x49d6ec>-0x1?_0x49d6ec:this['archivedThreads']['length'];}}class a extends _0x3d233f{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x30ecf7];}constructor(_0x2f0ba6){super(_0x2f0ba6),this['annotationViews']=new _0x16b584(),this['_pendingThreads']=[];}['init'](){const _0x1aa02f=this['editor'],_0xcae9ed=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x1aa02f['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x56f2fa,!0x0)),_0x1aa02f['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x2190a6=this['_createCommentsArchiveButton'](_0xf31b41);return _0x2190a6['set']({'role':'menuitemcheckbox'}),_0x2190a6;});const _0x1abfb7=_0x1aa02f['plugins']['get'](p),_0x1ac732=_0x1aa02f['plugins']['get']('Annotations'),_0x3bb107=_0x1aa02f['plugins']['get']('CommentsRepository');_0x1abfb7['archivedThreads']['forEach'](_0x1544f6=>{this['_handleNewThread'](_0x1544f6);}),this['listenTo'](_0x1abfb7['archivedThreads'],'add',(_0x52001e,_0x10b819)=>{this['_handleNewThread'](_0x10b819);}),this['listenTo'](_0x1ac732['collection'],'add',(_0x10d456,_0xe48a79)=>{const _0x1a54c8=this['_pendingThreads']['find'](_0x339bd9=>{const _0x10d368=_0x3bb107['_threadToController']['get'](_0x339bd9);return _0x10d368&&_0xe48a79['innerView']===_0x10d368['view'];});if(_0x1a54c8){const _0x59d98b=this['_calculatePosition'](_0x1a54c8['archivedAt']);this['_addAnnotationToArchive'](_0xe48a79,_0x59d98b),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x1a54c8),0x1);}}),this['listenTo'](_0x1abfb7['archivedThreads'],'remove',(_0x1fd613,_0x87027d)=>{const _0xccabaf=_0x1aa02f['config']['get']('collaboration.channelId');if(!_0xccabaf||_0x87027d['channelId']===_0xccabaf){if(this['_pendingThreads']['includes'](_0x87027d))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x87027d),0x1);else{const _0x5ee458=_0x3bb107['_threadToController']['get'](_0x87027d),_0x4ba413=_0x1ac732['getByInnerView'](_0x5ee458['view']);this['annotationViews']['remove'](_0x4ba413['view']),this['stopListening'](_0x4ba413),this['stopListening'](_0x4ba413['focusableElements']);}}}),this['listenTo'](_0x1ac732['collection'],'add',(_0x2ec778,_0x19df92)=>{this['listenTo'](_0x19df92,'escape',_0xcae9ed);}),this['listenTo'](_0x1ac732['collection'],'remove',(_0xc2c7,_0x56de7e)=>{this['stopListening'](_0x56de7e,'escape',_0xcae9ed);});}['_addAnnotationToArchive'](_0x5c66e8,_0x58a320){this['listenTo'](_0x5c66e8,'set:isVisible',_0x3a8b34=>{_0x3a8b34['return']=!0x1,_0x3a8b34['stop']();}),this['annotationViews']['add'](_0x5c66e8['view'],_0x58a320);}['_handleNewThread'](_0x3db7c6){const _0x11cc6b=this['editor']['plugins']['get']('CommentsRepository'),_0x39c0a1=this['editor']['plugins']['get']('Annotations'),_0x8ed0ea=this['editor']['config']['get']('collaboration.channelId');if(!_0x8ed0ea||_0x3db7c6['channelId']===_0x8ed0ea){const _0x16e72e=_0x11cc6b['_threadToController']['get'](_0x3db7c6);if(!_0x16e72e)return void this['_pendingThreads']['push'](_0x3db7c6);const _0x17b43b=this['_calculatePosition'](_0x3db7c6['archivedAt']),_0x10e9bd=_0x39c0a1['getByInnerView'](_0x16e72e['view']);_0x10e9bd['isVisible']&&_0x39c0a1['_visibleAnnotations']['remove'](_0x10e9bd),this['_addAnnotationToArchive'](_0x10e9bd,_0x17b43b);}}['_calculatePosition'](_0x11b7e2){const _0x57055f=this['editor']['config']['get']('collaboration.channelId'),_0x27faf5=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x4a1a5e=>_0x4a1a5e['channelId']===_0x57055f)['findIndex'](_0x54b043=>_0x54b043['archivedAt']<_0x11b7e2);return _0x27faf5<0x0||_0x27faf5>this['annotationViews']['length']?this['annotationViews']['length']:_0x27faf5-0x1;}['_toggleDialog'](){const _0x34234e=this['editor'],_0x25e299=_0x34234e['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x34234e['locale'],this['annotationViews'])),'commentsArchive'===_0x25e299['id']?_0x25e299['hide']():_0x25e299['show']({'id':'commentsArchive','title':N(_0x34234e['locale'],'COMMENTS_ARCHIVE'),'icon':_0x13c696,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x3e7464['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x128e25,_0x2a93e3=!0x1){const _0x51ee79=this['editor']['locale'],_0x358ae1=this['editor']['plugins']['get']('Dialog'),_0x24c8bd=new _0x128e25(_0x51ee79);return _0x24c8bd['bind']('isEnabled')['to'](this,'isEnabled'),_0x24c8bd['bind']('isOn')['to'](_0x358ae1,'id',_0x3adf62=>'commentsArchive'===_0x3adf62),_0x24c8bd['set']({'label':N(_0x51ee79,'COMMENTS_ARCHIVE'),'icon':_0x13c696,'isToggleable':!0x0}),_0x2a93e3&&(_0x24c8bd['tooltip']=!0x0),this['listenTo'](_0x24c8bd,'execute',()=>this['_toggleDialog']()),_0x24c8bd;}['_hideDialogOnAnnotationEscape']=_0xd3175d=>{const _0x328acd=_0xd3175d['source'];if(!this['annotationViews']['has'](_0x328acd['view']))return;const _0x521b69=this['editor']['plugins']['get']('Dialog');_0x521b69['isOpen']&&'commentsArchive'===_0x521b69['id']&&(_0x521b69['hide'](),_0xd3175d['stop']());};}class gi extends _0x3d233f{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|
|
23
|
+
import{Editor as _0x43a56a,ContextPlugin as _0x1057fb,PendingActions as lt,Command as _0x1974c9,Plugin as _0x22838b,Context as _0x153b8d}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x22e9b3,uid as _0x4606c5,KeystrokeHandler as jt,FocusTracker as _0x2a4010,diff as _0x417a3a,Collection as _0x39f167,Rect as _0x2a219f,CKEditorError as _0x5d3b6b,first as _0x4f8be7,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x281b79,keyCodes as _0x175d78}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x2a1515,AriaDescriptionView as Zt,setupThreadKeyboardNavigation as ts,ConfirmMixin as ti,LateFocusButtonView as _0xb40dab,trimHtml as _0x236065,LateFocusDropdownButtonView as _0x208729,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x2a23c3}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x44edca}from'es-toolkit/compat';import{IconUndo as _0x22fc39,IconCheck as _0x240c1c,IconPencil as _0x1cc3bd,IconRemoveComment as _0x1d8d7b,IconThreeVerticalDots as _0x55a270,IconAddComment as _0x4c1049,IconCommentsArchive as _0x39f3b8}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Xt,InlineEditableUIView as $t,EditorUI as Ut,View as kt,FocusCycler as _0x4babae,ButtonView as _0x3252f0,ViewCollection as _0x1c7545,createDropdown as _0xeb0826,ListView as _0x160694,focusChildOnDropdownOpen as _0x30ff51,ListItemView as _0x3844a8,MenuBarMenuListItemButtonView as _0x489c6e,BodyCollection as _0x2ed1a9,BalloonPanelView as _0x6bac08,ContextualBalloon as _0x586269,Dialog as _0x48c1d1,DialogViewPosition as _0x301d4b}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as qt,enableViewPlaceholder as St,MouseObserver as _0x4e119d}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as zt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as Bt,ShiftEnter as Et}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Gt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Jt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Kt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Lt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x40e3f8}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x5e5f33}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x22e9b3(){['model'];['view'];constructor(_0x3906bd,_0x27a335){super(),this['model']=_0x3906bd,this['model']['_isAttached']=!0x0,this['view']=_0x27a335,this['listenTo'](_0x27a335,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x27a335,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x27a335,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x27a335,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x27a335,'addComment',(_0x50150f,_0x3711e9)=>this['addComment'](_0x3711e9)),this['listenTo'](_0x27a335,'updateComment',(_0x50101f,_0x4950de,_0x356824)=>this['updateComment'](_0x4950de,_0x356824)),this['listenTo'](_0x27a335,'removeComment',(_0x20e508,_0x2767be)=>this['removeComment'](_0x2767be));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x17deff){this['model']['addComment']({'content':_0x17deff,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0xde5861,_0x22935f){this['model']['getComment'](_0xde5861)['update']({'content':_0x22935f});}['removeComment'](_0xb263bc){this['model']['getComment'](_0xb263bc)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x11e266,_0x21a491,_0x279561){const t=_0x11e266['t'];switch(_0x21a491){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'},_0x279561);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%1\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x279561);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'},_0x279561);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'},_0x279561);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x279561);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'},_0x279561);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'},_0x279561);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'},_0x279561);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Vt extends Xt{['main'];['editable'];constructor(_0x3cff4a,_0x20caa6){super(_0x3cff4a);const _0xdc57b8=_0x4606c5();this['main']=this['createCollection'](),this['editable']=new $t(_0x3cff4a,_0x20caa6,void 0x0,{'label':()=>N(_0x3cff4a,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x3cff4a['uiLanguageDirection'],'lang':_0x3cff4a['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0xdc57b8},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Ft extends Ut{['view'];constructor(_0x4cbbb2){super(_0x4cbbb2),this['view']=new Vt(_0x4cbbb2['locale'],_0x4cbbb2['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x55b4f7=this['editor']['editing']['view'],_0x1cf8a9=this['view']['editable'],_0x5c6b1a=_0x55b4f7['document']['getRoot']();_0x1cf8a9['name']=_0x5c6b1a['rootName'],this['view']['render']();const _0x37ed8b=_0x1cf8a9['element'];this['setEditableElement'](_0x1cf8a9['name'],_0x37ed8b),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x55b4f7['attachDomRoot'](_0x37ed8b),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[zt,Bt,Et,Gt,Jt,Kt,Lt];class Rt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x22e9b3(_0x43a56a){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Qt)());constructor(_0x48b531={}){function _0x376618(_0x2d71c5){return _0x2d71c5['map'](_0x24b717=>String['fromCharCode'](_0x24b717))['join']('');}(_0x48b531=Object['assign']({},_0x48b531))['plugins']||(_0x48b531['plugins']=Rt['defaultPlugins']),super(_0x48b531),this['ui']=new Ft(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x376618([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x376618([0x76,0x69,0x65,0x77])][_0x376618([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x376618([0x61,0x75,0x74,0x6f]),this[_0x376618([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x376618([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x376618([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x376618([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x376618([0x6f,0x6b])});}['create'](){const _0x4a4bd5=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x4a4bd5))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x56fb31=>{const _0x10e2b7=this['model']['document']['getRoot'](),_0x34b0ab=_0x10e2b7&&_0x10e2b7['getChild'](_0x10e2b7['childCount']-0x1);_0x56fb31['setSelection'](_0x34b0ab,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x5693a6=this['editing']['view'],_0x267665=_0x5693a6['document']['getRoot'](),_0x2f29b5=_0x267665['getChild'](0x0);_0x267665['childCount']>0x1||!_0x2f29b5||'p'!=_0x2f29b5['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x5693a6,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x2f29b5['placeholder']=this['placeholder']),St({'view':_0x5693a6,'element':_0x2f29b5,'keepOnFocus':!0x0}),this['placeholderElement']=_0x2f29b5);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x52498b,_0x42a2c3={}){super(_0x52498b),this['editor']=null,this['_editorConfig']=_0x42a2c3,this['set']('value',_0x42a2c3['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x52498b,'Reply...')),this['set']('submitLabel',N(_0x52498b,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x2a4010(),this['focusCycler']=new _0x4babae({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x1d488a,_0x3ccd40)=>{this['cancelButtonView']['fire']('execute'),_0x3ccd40();}),this['keystrokes']['set']('Ctrl+Enter',(_0x4d59cf,_0xcecb46)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0xcecb46());}),this['on']('submit',(_0x3ff66b,_0x2862a2)=>{_0x2862a2['length']>0xfde8?(alert(N(_0x52498b,'TOO_LONG_COMMENT_ALERT',[_0x2862a2['length'],0xfde8])),_0x3ff66b['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 _0x4c7bcd=this['editor'];this['element']['insertBefore'](_0x4c7bcd['ui']['element'],this['element']['firstChild']),_0x4c7bcd['model']['document']['on']('change',()=>this['value']=_0x4c7bcd['getData']()),_0x4c7bcd['bind']('placeholder')['to'](this),this['focusables']['add'](_0x4c7bcd['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x1a814e){-0x1===_0x1a814e?(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:_0x4ffbe8}=this,_0x12b1d3=new _0x3252f0(_0x4ffbe8);return _0x12b1d3['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x12b1d3['withText']=!0x0,_0x12b1d3['bind']('label')['to'](this,'submitLabel'),_0x12b1d3['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x12b1d3['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x52760f,_0x1eea3f)=>!_0x1eea3f&&!!_0x52760f['trim']()),_0x12b1d3;}['_createCancelButton'](){const {locale:_0x418cdb}=this,_0x243d63=new _0x3252f0(_0x418cdb);return _0x243d63['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x243d63['label']=N(_0x418cdb,'Cancel'),_0x243d63['withText']=!0x0,_0x243d63['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x243d63;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x518c6d=>{this['focusTracker']['add'](_0x518c6d['element']);}),this['focusables']['on']('change',(_0x4dd930,_0xda34ee)=>{for(const _0x2485e8 of Array['from'](_0xda34ee['added'])['reverse']())this['focusTracker']['add'](_0x2485e8['element']);});}}class ie extends kt{constructor(_0x7be9de,_0x253b02,_0x21262e){super(_0x7be9de),this['commentInputView']=new os(_0x7be9de,_0x21262e),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x45bec3,_0x41f0a0)=>_0x45bec3||!!_0x41f0a0),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 _0x2a1515(_0x7be9de,_0x253b02),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'](_0x1b5452){this['commentInputView']['focus'](_0x1b5452);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0xbcfa38,_0x2c49bb)=>{const {submitButtonView:_0x56358c,cancelButtonView:_0x1f5b38,editor:_0x30a7a7}=this['commentInputView'];[_0x56358c['element'],_0x1f5b38['element'],_0x30a7a7?_0x30a7a7['editing']['view']['getDomRoot']():null]['filter'](_0x47092f=>_0x47092f)['some'](_0xa44453=>_0xa44453['contains'](_0x2c49bb['target']))||(this['focus'](),_0x2c49bb['preventDefault']());});}}class rs extends kt{constructor(_0x4e8a66){super(_0x4e8a66);const _0x53c76b=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x53c76b['to']('count',_0x200309=>N(_0x4e8a66,'NUMBER_OF_COMMENTS',_0x200309))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x451974,_0x4e6de6,_0x159d40){super(_0x451974);const _0xd629bf=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x4e6de6['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x4e6de6,this['_config']=_0x159d40,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x2a4010(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4babae({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xd9c4b9=>this['commentViews']['map'](_0x4a4c3c=>_0x4a4c3c['element'])['includes'](_0xd9c4b9['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x451974),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x2f827a=>_0x2f827a-this['_config']['maxCommentsWhenCollapsed']);for(const _0x24516a of _0x4e6de6['comments'])this['_handleNewCommentModel'](_0x24516a);this['_handleInfoComment'](),this['listenTo'](_0x4e6de6['comments'],'add',(_0x203d13,_0x10ce0c)=>{const _0x50dc72=this['_calculatePosition'](_0x10ce0c);this['length']++,this['_handleNewCommentModel'](_0x10ce0c,_0x50dc72),this['refreshVisibleViews']();}),this['listenTo'](_0x4e6de6['comments'],'remove',(_0x12daac,_0x29a556)=>{this['length']--,this['_handleRemoveCommentModel'](_0x29a556),this['refreshVisibleViews']();}),this['listenTo'](_0x4e6de6,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x4e6de6,'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',_0xd629bf['if']('length','ck-hidden',_0x2cffbd=>!_0x2cffbd)],'aria-label':N(_0x451974,'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'](_0x1bb58a){-0x1===_0x1bb58a?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x2567df of this['commentViews'])_0x2567df['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x27f90e,_0x41892e){const _0x526e15=new this['_config']['CommentView'](this['locale'],_0x27f90e,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x526e15['viewUid']=_0x27f90e['id'],_0x526e15['delegate']('removeComment')['to'](this),_0x526e15['delegate']('updateComment')['to'](this),_0x526e15['delegate']('resolveCommentThread')['to'](this),_0x526e15['delegate']('editorReady')['to'](this),_0x526e15['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x526e15,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x526e15,_0x41892e);}['_calculatePosition'](_0x38e742){const _0x181215=this['_model']['_findOptimalIndex'](_0x38e742);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x38e742['authoredAt']?_0x181215-0x1:_0x181215:_0x181215-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x2d16dc={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x2d16dc,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x2d16dc));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x445006){const _0x4121be=this['commentViews']['remove'](_0x445006['id']);this['stopListening'](_0x4121be),_0x4121be['isEditMode']&&this['_updateHasDirtyComment'](),_0x4121be['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x2d70a1=>_0x2d70a1['isEditMode']);}['_rearrangeCollapse'](){const _0x475d3b=function(_0x364ba1){const _0x293709=new _0x39f167();for(const _0x5847d2 of _0x364ba1)_0x293709['add'](_0x5847d2);return _0x293709;}(this['commentViews']),_0x4dfaa7=this['_collapsedCommentsView']['count'];for(let _0x2449ca=0x1;_0x2449ca<=_0x4dfaa7;_0x2449ca++)_0x475d3b['remove'](0x1);for(const _0x5f178a of _0x475d3b)_0x5f178a['collapse']();_0x4dfaa7>0x0&&_0x475d3b['add'](this['_collapsedCommentsView'],0x1),ns(_0x417a3a(Array['from'](this['visibleViews']),Array['from'](_0x475d3b)),this['visibleViews'],_0x475d3b);}['_rearrangeExpand'](){ns(_0x417a3a(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x3c45b9 of this['visibleViews'])_0x3c45b9['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x387df5=>{this['focusTracker']['add'](_0x387df5['element']),this['keystrokes']['listenTo'](_0x387df5['element']);}),this['commentViews']['on']('change',(_0x314ad0,_0x49458e)=>{for(const _0x46ec14 of _0x49458e['removed'])this['focusTracker']['remove'](_0x46ec14['element']),this['keystrokes']['stopListening'](_0x46ec14['element']);for(const _0x3c676f of Array['from'](_0x49458e['added'])['reverse']())this['focusTracker']['add'](_0x3c676f['element']),this['keystrokes']['listenTo'](_0x3c676f['element']);});}}function ns(_0x59e28f,_0x3046ef,_0x34935a){let _0x564381=0x0;for(const _0x7e3e1d of _0x59e28f)switch(_0x7e3e1d){case'insert':_0x3046ef['add'](_0x34935a['get'](_0x564381),_0x564381),_0x564381++;break;case'delete':_0x3046ef['remove'](_0x564381);break;case'equal':_0x564381++;}}class oe extends kt{constructor(_0x26b30e){super(_0x26b30e);const _0x4e7f03=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x4e7f03['to']('contextValue',_0x1ec3d4=>N(_0x26b30e,'THREAD_CONTEXT_LABEL',_0x1ec3d4)),'tabindex':-0x1},'children':[{'text':_0x4e7f03['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0xe70201,_0x3afb4b){super(_0xe70201);const _0x16b66e=this['bindTemplate'];this['_model']=_0x3afb4b,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x2a4010(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4babae({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x218163=>!!_0x218163),this['bind']('contextValue')['to'](this['_model'],'context',_0x93963=>_0x93963&&_0x93963['value']?this['_trimContextValue'](_0x93963['value']):N(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',_0x16b66e['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 _0x52d1b0=new _0x3252f0(this['locale']);return _0x52d1b0['label']=N(this['locale'],'Reopen'),_0x52d1b0['tooltip']=N(this['locale'],'Reopen'),_0x52d1b0['icon']=_0x22fc39,_0x52d1b0['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1cecf8=>!_0x1cecf8),_0x52d1b0['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x5595d7,_0x520bfe)=>_0x5595d7&&_0x520bfe),_0x52d1b0['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x52d1b0;}['_trimContextValue'](_0x4e6373){if(_0x4e6373['length']<0x96)return _0x4e6373;const _0x510542=_0x4e6373['lastIndexOf']('\x20',0x93);return _0x4e6373['substring'](0x0,_0x510542>-0x1?_0x510542:0x93)+'...';}['_attachContextActions'](){const _0x574e17=this['element']['querySelector']('.ck-context'),_0x2b529b=_0x574e17['querySelector']('.ck-context__value');this['listenTo'](_0x574e17,'mouseenter',()=>{_0x2b529b['offsetWidth']<_0x2b529b['scrollWidth']&&_0x574e17['classList']['add']('overlay');}),this['listenTo'](_0x574e17,'mouseleave',()=>{_0x574e17['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x629868 of this['focusables'])this['focusTracker']['add'](_0x629868['element']),this['keystrokes']['listenTo'](_0x629868['element']);}['_createContextView'](){const _0x22c7ee=new oe(this['locale']);return _0x22c7ee['bind']('contextValue')['to'](this),_0x22c7ee;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x1de2ac,_0x3cd281,_0x490509,_0x2d4c2e){super(_0x1de2ac),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x3cd281,this['_localUser']=_0x490509,this['_config']=_0x2d4c2e,this['commentThreadHeaderView']=new Yt(_0x1de2ac,_0x3cd281),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x1de2ac,N(_0x1de2ac,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x1de2ac,_0x3cd281,Object['assign']({'CommentView':this['_config']['CommentView']},_0x2d4c2e)),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',(_0x777871,_0x34feff)=>_0x777871||!!_0x34feff),this['bind']('isUnlinked')['to'](_0x3cd281,'unlinkedAt',_0x1f9e6b=>!!_0x1f9e6b),this['bind']('ariaLabel')['to'](this,'length',_0x49714b=>{const _0x1e14ff=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x49714b,_0x1e14ff]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x2a4010(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4babae({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2945ca=>_0x2945ca['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),ts(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x8fad=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x112f8a=_0x8fad['commentInputView'];return _0x8fad['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x112f8a,'value',(_0x4f88ed,_0x57f41f,_0x50fde4,_0x2ee2be,_0x221517)=>!!_0x221517||!!_0x2ee2be&&_0x50fde4&&!_0x57f41f||_0x4f88ed&&_0x50fde4&&!_0x57f41f),_0x112f8a['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x32eeb3,_0x2ef090,_0xc05ac9)=>{let _0x194d5b;return _0x194d5b=_0xc05ac9&&_0x2ef090?'Reply\x20to\x20reopen\x20discussion...':_0x32eeb3?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x194d5b);}),_0x112f8a['bind']('submitLabel')['to'](this,'length',_0x5d814f=>N(this['locale'],_0x5d814f?'Reply':'Comment')),_0x112f8a['on']('submit',(_0x4c1f91,_0x4b44dd)=>{this['fire']('addComment',_0x4b44dd),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x112f8a['on']('cancel',()=>{this['focus']();}),_0x112f8a['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x112f8a['on']('cancel',_0x4ffa6e=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x4ffa6e['stop']());}),this['on']('change:isActive',(_0x27e302,_0xbada49,_0x5df32c)=>{_0x5df32c||this['length']||_0x112f8a['value']||this['fire']('removeCommentThread');}),_0x8fad;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x5a31ea,_0x4a60ba,_0x5b3a20,_0x702e65){super(_0x5a31ea,_0x4a60ba,_0x5b3a20,_0x702e65),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x5a31ea,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x1b245a,_0x24bd92,_0x1f66d5)=>{_0x1f66d5||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x20e696,_0x2ca68e,_0x3d66bd)=>{_0x3d66bd&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x4c3ba4=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x4c3ba4['if']('isActive','ck-thread--active'),_0x4c3ba4['if']('isUnlinked','ck-thread--unlinked'),_0x4c3ba4['if']('isConfirm','ck-thread--remove-confirmation'),_0x4c3ba4['to']('actionIndicator',_0x435d1d=>_0x435d1d?'ck-thread--'+_0x435d1d:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x4c3ba4['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 _0x1e1680 of this['commentsListView']['commentViews'])_0x1e1680['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x1f805e}=this,_0x293bdf=this['commentsListView']['commentViews']['get'](0x0);_0x293bdf===this['_boundFirstCommentView']||_0x293bdf['isSystemComment']||(this['_boundFirstCommentView']=_0x293bdf,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x293bdf,'actionIndicator',_0xe5c0e3=>'remove'===_0xe5c0e3?'remove':null),_0x293bdf['placeholder']=N(_0x1f805e,'Write\x20a\x20comment...'),_0x293bdf['removeButton']['on']('execute',_0x253768=>{_0x253768['stop'](),this['showConfirm'](N(_0x1f805e,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x293bdf['focus']();}),_0x293bdf['actionBar']['add'](this['resolveButton'],0x0),_0x293bdf['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x140794=new _0xb40dab(this['locale']);return _0x140794['label']=N(this['locale'],'Resolve'),_0x140794['tooltip']=N(this['locale'],'Resolve'),_0x140794['icon']=_0x240c1c,_0x140794['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x140794['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1c1a61=>!_0x1c1a61),_0x140794['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4ff9a5,_0x2b018c)=>_0x4ff9a5&&!_0x2b018c),_0x140794['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x140794;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class es extends kt{constructor(_0x264b2c){super(_0x264b2c),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0xf630,_0x4b8832,_0x162964)=>{this['element']['innerHTML']=_0x162964;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x594a8b,_0x45ebb7,_0x5b98a2){super(_0x594a8b),this['_model']=_0x45ebb7,this['_config']=_0x5b98a2,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x45ebb7,'content',_0x45ebb7,'authoredAt',(_0x3badd3,_0x5a8850)=>N(_0x594a8b,'COMMENT_ARIA_LABEL',[_0x45ebb7['author']['name'],_0x5b98a2['formatDateTime'](_0x5a8850),new DOMParser()['parseFromString'](_0x3badd3,'text/html')['body']['textContent'],_0x45ebb7['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Zt(_0x594a8b,N(_0x594a8b,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x1c7545(),this['focusTracker']=new _0x2a4010(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4babae({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1c234f=>_0x1c234f['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']?N(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):N(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):N(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x1b68e4=new es(this['locale']);return _0x1b68e4['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x419688,_0x4e9e32)=>_0x4e9e32?_0x236065(_0x419688,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x419688),_0x1b68e4;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x24f0c5=new os(this['locale'],this['_config']['editorConfig']);return _0x24f0c5['value']=this['_model']['content'],_0x24f0c5['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x24f0c5['submitLabel']=N(this['locale'],'Save'),_0x24f0c5['on']('submit',(_0x28ecf1,_0x284b4a)=>{this['fire']('updateComment',this['_model']['id'],_0x284b4a),this['switchToDisplayMode'](),this['focus']();}),_0x24f0c5['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x24f0c5['once']('editorReady',()=>{_0x24f0c5['focus']();}),_0x24f0c5['createEditor'](),_0x24f0c5['delegate']('editorReady')['to'](this),_0x24f0c5['delegate']('editorDestroyed')['to'](this),_0x24f0c5;}['_setupKeyboardNavigation'](){const _0x13422a=this['element'];this['keystrokes']['listenTo'](_0x13422a);for(const _0x1ab9f7 of this['focusables'])this['focusTracker']['add'](_0x1ab9f7['element']),this['keystrokes']['listenTo'](_0x1ab9f7['element']);this['focusables']['on']('change',(_0x13c9b4,_0x20366e)=>{for(const _0x362b53 of _0x20366e['removed'])this['focusTracker']['remove'](_0x362b53['element']),this['keystrokes']['stopListening'](_0x362b53['element']);for(const _0x54b32a of _0x20366e['added'])this['focusTracker']['add'](_0x54b32a['element']),this['keystrokes']['listenTo'](_0x54b32a['element']);}),this['keystrokes']['set']('enter',(_0x5bb310,_0x388f66)=>{_0x13422a===_0x5bb310['target']&&(this['focusCycler']['focusFirst'](),_0x388f66());}),this['keystrokes']['set']('esc',(_0x3f363d,_0x40a46d)=>{_0x13422a!==_0x3f363d['target']&&(this['focus'](),_0x40a46d());});}}class Tt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(di){['actionBar'];['userView'];constructor(_0xc02379,_0x2453f0,_0x17b9f4){super(_0xc02379,_0x2453f0,_0x17b9f4),this['set']('actionIndicator',null),this['set']('placeholder',N(_0xc02379,'Reply...')),this['bind']('authoredAt')['to'](_0x2453f0),this['bind']('resolvedAt')['to'](_0x2453f0),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 _0x2a1515(_0xc02379,_0x2453f0['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x2453f0,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x3ae311=this['bindTemplate'],_0x25b665=[{'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':_0x3ae311['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x3ae311['to']('authoredAt',_0x2156f8=>this['_config']['formatDateTime'](_0x2156f8))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x3ae311['if']('isEditMode','ck-comment__actions--hidden'),_0x3ae311['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']&&_0x25b665['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x3ae311['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x3ae311['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x3ae311['if']('isEditMode','ck-comment--edit'),_0x3ae311['if']('isSystemComment','ck-comment--info'),_0x3ae311['to']('actionIndicator',_0x261a2c=>_0x261a2c?'ck-comment--'+_0x261a2c:'')],'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':_0x25b665}]}]};}['_createEditButton'](){const _0x505b07=new _0x3252f0(this['locale']);return _0x505b07['label']=N(this['locale'],'Edit'),_0x505b07['icon']=_0x1cc3bd,_0x505b07['withText']=!0x0,_0x505b07['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x505b07['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0xd78739=>!_0xd78739),_0x505b07['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x505b07['on']('execute',()=>this['switchToEditMode']()),_0x505b07;}['_createRemoveButton'](){const _0x4103bb=new _0x3252f0(this['locale']);return _0x4103bb['label']=N(this['locale'],'Remove'),_0x4103bb['icon']=_0x1d8d7b,_0x4103bb['withText']=!0x0,_0x4103bb['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x4103bb['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3a7725=>!_0x3a7725),_0x4103bb['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x4103bb['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x4103bb;}['_createDropdown'](){const _0x2e1eec=_0xeb0826(this['locale'],_0x208729),_0x26dbd5=_0x2e1eec['panelView']['children'],_0x5d36f7=new _0x160694(this['locale']),_0x42df0b=_0x2e1eec['bindTemplate'];_0x30ff51(_0x2e1eec,()=>this['items']['find'](_0x30267f=>_0x30267f['isVisible'])),_0x2e1eec['extendTemplate']({'attributes':{'class':[_0x42df0b['if']('isVisible','ck-hidden',_0x383c2b=>!_0x383c2b)]}});const _0xcfd7cd=(_0x4769c8,_0x4ef037=-0x1)=>{const _0x14a5ee=new _0x3844a8(this['locale']);_0x14a5ee['children']['add'](_0x4769c8);const _0x58430c=_0x4ef037>-0x1?_0x4ef037:_0x5d36f7['items']['length'];_0x5d36f7['items']['add'](_0x14a5ee,_0x58430c);const _0xabf119=Array['from'](this['items']);_0x2e1eec['unbind']('isEnabled','isVisible'),_0x2e1eec['bind']('isEnabled')['toMany'](_0xabf119,'isEnabled',(..._0x2dc0d4)=>_0x2dc0d4['some'](_0x430ae6=>_0x430ae6)),_0x2e1eec['bind']('isVisible')['toMany'](_0xabf119,'isVisible',(..._0x1cb1de)=>_0x1cb1de['some'](_0x262cdb=>_0x262cdb));};_0x2e1eec['panelPosition']='sw',_0x2e1eec['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x55a270});for(const _0xcbec2c of this['items'])_0xcfd7cd(_0xcbec2c);return _0x26dbd5['add'](_0x5d36f7),_0x2e1eec['listenTo'](this['items'],'add',(_0x915c97,_0x3604ba,_0xc5886e)=>{_0xcfd7cd(_0x3604ba,_0xc5886e);}),_0x2e1eec['listenTo'](this['items'],'remove',(_0x3c1e93,_0x4f82ec,_0x21c3b9)=>{_0x5d36f7['items']['remove'](_0x21c3b9);}),_0x2e1eec;}['_attachActions'](_0x4f4d40,_0x33dc9c){const _0x4e664a=_0x4f4d40&&_0x4f4d40['element'];_0x4e664a&&(this['listenTo'](_0x4e664a,'mouseenter',()=>this['actionIndicator']=_0x33dc9c),this['listenTo'](_0x4e664a,'focus',()=>this['actionIndicator']=_0x33dc9c),this['listenTo'](_0x4e664a,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x4e664a,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x3c3657=super['_createCommentInputView']();return _0x3c3657['bind']('placeholder')['to'](this),_0x3c3657;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x48c584){const _0x204a1d=Dt(_0x48c584,0x1e),_0x1716e1=new MutationObserver(_0x621d43=>{for(const _0x4b0214 of _0x621d43)('attributes'==_0x4b0214['type']&&'class'==_0x4b0214['attributeName']||'childList'==_0x4b0214['type']||'characterData'==_0x4b0214['type'])&&_0x204a1d();});return{'attach'(_0x4b3d3a){_0x1716e1['observe'](_0x4b3d3a,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x1716e1['disconnect'](),_0x204a1d['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x4bad27,_0x2986db){super(_0x4bad27),this['id']=_0x4606c5(),this['focusTracker']=new _0x2a4010(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x1f0fc0,_0x492223)=>this['fire']('Esc',_0x492223)),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'](_0x2986db),this['mainView']=_0x2986db;const _0x40c6f6=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x40c6f6['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 _0x263d4c=this['element']['clientHeight'];_0x263d4c&&(this['height']=_0x263d4c);}}class T extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x22e9b3(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x2a95a0,target:_0x28bc39,type:_0x3f6685,isVisible:_0x3da7b5=!0x0}){super(),this['view']=_0x2a95a0,this['view']['element']||this['view']['render'](),this['_type']=_0x3f6685,this['_target']=_0x28bc39,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x39f167([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x57bf01,_0x1b6194)=>{this['view']['focusTracker']['add'](_0x1b6194);}),this['focusableElements']['on']('remove',(_0x258ff9,_0x3ee087)=>{this['view']['focusTracker']['remove'](_0x3ee087);}),this['set']('isVisible',_0x3da7b5);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x2a428e=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x2a428e),_0x2a428e;}get['targetRect'](){const _0x3429f8=this['target'];if(null===_0x3429f8)return null;if(_0x3429f8 instanceof _0x2a219f)return _0x3429f8;const _0x279425=_0x3429f8['filter'](_0x5cc173=>function(_0x5191fc){const _0x2d8c7e=_0x5191fc['offsetParent'];if(_0x2d8c7e)return!0x0;const _0x4cf3bb=_0x5191fc['getClientRects']()['item'](0x0);return!!_0x4cf3bb;}(_0x5cc173));return 0x0===_0x279425['length']?null:new _0x2a219f(_0x279425[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x6fe676){this['view']['isActive']=_0x6fe676,this['view']['mainView']['isActive']=_0x6fe676;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x1cb3bf){if(!(null===_0x1cb3bf||_0x1cb3bf instanceof _0x2a219f||Array['isArray'](_0x1cb3bf)&&_0x1cb3bf['every'](_0x1005df=>fi(_0x1005df))))throw new _0x5d3b6b('annotation-invalid-target',null,{'target':_0x1cb3bf});}['_getNormalizedTarget'](){const _0x1856e1='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x1856e1)?[_0x1856e1]:_0x1856e1;}}function fi(_0x1e7ab7){return null!==_0x1e7ab7&&'object'==typeof _0x1e7ab7&&'nodeType'in _0x1e7ab7&&0x1===_0x1e7ab7['nodeType'];}class S extends _0x39f167{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x567aa8=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x2a4010(),this['_focusTracker']['on']('change:isFocused',(_0x58e900,_0xe4f8f5,_0x3f5e73)=>{_0x3f5e73||this['fire']('blur');});for(const _0x3a22cd of _0x567aa8)this['add'](_0x3a22cd);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x1bb391){if(this['has'](_0x1bb391))throw new _0x5d3b6b('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x1bb391['innerView'],_0x1bb391),this['_viewToAnnotation']['set'](_0x1bb391['view'],_0x1bb391);for(const _0x275740 of _0x1bb391['focusableElements'])this['_focusTracker']['add'](_0x275740);this['listenTo'](_0x1bb391['focusableElements'],'add',(_0x1353c9,_0x33447b)=>{this['_focusTracker']['add'](_0x33447b);}),this['listenTo'](_0x1bb391['focusableElements'],'remove',(_0x41612e,_0x4e75ad)=>{this['_focusTracker']['remove'](_0x4e75ad);}),this['listenTo'](_0x1bb391['view']['focusTracker'],'change:isFocused',(_0x382303,_0x2aa3c7,_0x1b12d7)=>{_0x1b12d7&&this['fire']('focus',_0x1bb391);}),_0x1bb391['updateTargetRect']();const _0x2982c1=this['_getOrderInContent'](_0x1bb391['view']['targetRect']);return super['add'](_0x1bb391,_0x2982c1);}['remove'](_0x133981){if(!this['has'](_0x133981))throw new _0x5d3b6b('annotationcollection-not-existing-item',null);this['stopListening'](_0x133981['view']['focusTracker']),this['stopListening'](_0x133981['focusableElements']);for(const _0x582660 of _0x133981['focusableElements'])this['_focusTracker']['remove'](_0x582660);return this['_viewToAnnotation']['delete'](_0x133981['view']),this['_innerViewToAnnotation']['delete'](_0x133981['innerView']),super['remove'](_0x133981);}['getByInnerView'](_0x301e2b){return this['_innerViewToAnnotation']['get'](_0x301e2b);}['getByView'](_0x58ccf5){return this['_viewToAnnotation']['get'](_0x58ccf5);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x14edd3 of this)_0x14edd3['updateTargetRect']();this['_sort']();}['_sort'](){const _0x29960c=Array['from'](this)['sort']((_0x53c348,_0x4298d6)=>w(_0x53c348['view']['targetRect'],_0x4298d6['view']['targetRect']));for(let _0x2524cb=_0x29960c['length']-0x1;_0x2524cb>0x0;_0x2524cb--){const _0x2e827d=_0x29960c[_0x2524cb];_0x2524cb!==this['getIndex'](_0x2e827d)&&(this['remove'](_0x2e827d),this['add'](_0x2e827d));}}['_getOrderInContent'](_0x22fe2){let _0x1a0550=0x0;if(!_0x22fe2)return this['length'];for(const _0x283102 of this){const _0x297915=_0x283102['view']['targetRect'];if(_0x297915){if(w(_0x22fe2,_0x297915)<0x0)return _0x1a0550;_0x1a0550++;}}return _0x1a0550;}}function v({source:_0x2745db,target:_0x384c48,filter:_0x5e19c3}){for(const _0x574be5 of _0x2745db)_0x5e19c3(_0x574be5)&&_0x384c48['add'](_0x574be5);_0x384c48['listenTo'](_0x2745db,'add',(_0x5ceae2,_0x4c1871)=>{_0x5e19c3(_0x4c1871)&&_0x384c48['add'](_0x4c1871);}),_0x384c48['listenTo'](_0x2745db,'remove',(_0x40f282,_0x20fe25)=>{_0x384c48['has'](_0x20fe25)&&_0x384c48['remove'](_0x20fe25);});}function w(_0x5deb58,_0x39f6a1){if(null===_0x5deb58&&null===_0x39f6a1)return 0x0;if(null===_0x5deb58)return-0x1;if(null===_0x39f6a1)return 0x1;const _0x1d5f9c=_0x5deb58['top']-_0x39f6a1['top'];return 0x0==_0x1d5f9c?_0x5deb58['left']-_0x39f6a1['left']:_0x1d5f9c;}class y extends _0x1057fb{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x411574){if(super(_0x411574),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x411574 instanceof _0x43a56a){const _0xbc2def=_0x411574['locale'];_0x411574['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0xbc2def,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0xbc2def,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0xbc2def,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0xbc2def,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0xbc2def,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0xbc2def,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0xbc2def,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x11d0f6){this['collection']['add'](_0x11d0f6);}['remove'](_0x1cafe7){this['collection']['remove'](_0x1cafe7),_0x1cafe7['destroy']();}['refreshVisibility'](){for(const _0x5cbed5 of this['collection'])_0x5cbed5['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x54974c){return this['collection']['getByInnerView'](_0x54974c);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x10f99f of this['collection'])_0x10f99f['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x19739f){this['fire']('_activateAnnotation',_0x19739f);}['createAnnotation'](_0x14deee){return new T(_0x14deee);}['createAnnotationView'](_0x4f4229,_0x45fef9){return new E(_0x4f4229,_0x45fef9);}['_addActiveAnnotation'](_0x5593df){const _0x4c68db=new Set(this['activeAnnotations']);_0x4c68db['add'](_0x5593df),this['activeAnnotations']=_0x4c68db;}['_removeActiveAnnotation'](_0x37e152){const _0x51c46b=new Set(this['activeAnnotations']);_0x51c46b['delete'](_0x37e152),this['activeAnnotations']=_0x51c46b;}['_bindAnnotationsToVisibleAnnotations'](){const _0x4f395f=this['collection'],_0x7d8c27=this['_visibleAnnotations'];function _0x5c2ce3(_0xb04837){const _0x1d235f=_0xb04837['source'];_0x1d235f['isVisible']&&!_0x7d8c27['has'](_0x1d235f)?_0x7d8c27['add'](_0x1d235f):!_0x1d235f['isVisible']&&_0x7d8c27['has'](_0x1d235f)&&_0x7d8c27['remove'](_0x1d235f),_0x1d235f['view']['focusTracker']['remove'](_0x1d235f['view']['element']),_0x1d235f['view']['focusTracker']['add'](_0x1d235f['view']['element']);}this['listenTo'](_0x4f395f,'add',(_0xe0c820,_0x161a97)=>{_0x161a97['isVisible']&&_0x7d8c27['add'](_0x161a97),this['listenTo'](_0x161a97,'change:isVisible',_0x5c2ce3);}),this['listenTo'](_0x4f395f,'remove',(_0x21e2c0,_0x300568)=>{_0x7d8c27['has'](_0x300568)&&_0x7d8c27['remove'](_0x300568),this['stopListening'](_0x300568,'change:isVisible',_0x5c2ce3);});}['_setupEnterAnnotationKeystroke'](){const _0x19a6b5=_0x4e91ea=>{_0x4e91ea['on']('ready',()=>{_0x4e91ea['keystrokes']['set'](_0x40e3f8,(_0x358c9b,_0x11e567)=>{const _0x281286=_0x4f8be7(this['activeAnnotations']['values']());_0x281286&&(_0x281286['view']['focus'](),_0x11e567());});});};this['context']instanceof _0x43a56a?_0x19a6b5(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0xfe21fe,_0x2434a6)=>{_0x19a6b5(_0x2434a6);});}['_setupEscapeAnnotationHandling'](){const _0x47d72c=_0x26a881=>{const _0x1884db=_0x26a881['source'],_0x54858b=[];let _0x19d49b;if(Array['isArray'](_0x1884db['target'])){_0x19d49b=_0x1884db['target'][0x0],this['context']instanceof _0x43a56a?_0x54858b['push'](this['context']):this['context']['editors']&&_0x54858b['push'](...this['context']['editors']);for(const _0xdd2431 of _0x54858b)for(const _0x2ef8e6 of _0xdd2431['editing']['view']['domRoots']['values']())if(_0x2ef8e6['contains'](_0x19d49b))return void _0xdd2431['editing']['view']['focus']();_0x19d49b['focus']();}};this['listenTo'](this['collection'],'add',(_0x2ca68d,_0x39d537)=>{this['listenTo'](_0x39d537,'escape',_0x47d72c,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x4d00e4,_0x3ddd7b)=>{this['stopListening'](_0x3ddd7b,'escape',_0x47d72c);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x1057fb{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2ff481){super(_0x2ff481),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x3ffb3c=this['context']['config'];_0x3ffb3c['define']('comments.maxCommentsWhenCollapsed',0x2),_0x3ffb3c['define']('comments.maxThreadTotalWeight',0x1f4),_0x3ffb3c['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x3ffb3c['define']('comments.CommentThreadView',gt),_0x3ffb3c['define']('comments.CommentView',Tt),_0x3ffb3c['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x4558dd=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x5187c0,_0x3ddbba)=>this['_addCommentThread'](_0x3ddbba)),this['on']('submitCommentThread',(_0x684193,_0x2a5a42)=>this['_submitCommentThread'](_0x2a5a42)),this['on']('resolveCommentThread',(_0x4724c3,_0x66f75d)=>this['_resolveCommentThread'](_0x66f75d)),this['on']('resolveCommentThread',(_0x20c6f0,_0xdd5e8b)=>this['_updateActiveAnnotation'](_0xdd5e8b),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x421168,_0x439d05)=>this['_reopenCommentThread'](_0x439d05)),this['on']('reopenCommentThread',(_0x4e6ac7,_0x541980)=>this['_updateActiveAnnotation'](_0x541980),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x47aa3,_0x256456)=>this['_removeCommentThread'](_0x256456)),this['on']('updateCommentThread',(_0x27fea6,_0x4c997d)=>this['_updateCommentThread'](_0x4c997d)),this['on']('updateCommentThread',(_0x46a5ac,_0x205793)=>this['_updateActiveAnnotation'](_0x205793),{'priority':'lowest'}),this['on']('addComment',(_0x3a1e50,_0x50a532)=>this['_addComment'](_0x50a532)),this['on']('updateComment',(_0x37a7b3,_0x28c254)=>this['_updateComment'](_0x28c254)),this['on']('removeComment',(_0x1c0062,_0x56ecde)=>this['_removeComment'](_0x56ecde)),this['on']('addComment',(_0x51375d,{threadId:_0x1bb2b9,isFromAdapter:_0xff39e2})=>{if(_0xff39e2)return;const _0xd2f04e=this['getCommentThread'](_0x1bb2b9),_0x1d49ae=_0xd2f04e&&this['_threadToController']['get'](_0xd2f04e);_0x1d49ae&&_0x1d49ae['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x4558dd,'change:activeAnnotations',(_0x2815d0,_0x2a28d3,_0xe1f211)=>{const _0x56669c=Array['from'](_0xe1f211)['map'](_0x4de162=>this['_viewToController']['get'](_0x4de162['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x56669c?_0x56669c['model']:null;});}set['adapter'](_0x4c657b){if(this['_adapter'])throw new _0x5d3b6b('commentsrepository-adapter-already-set');this['_adapter']=_0x4c657b;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x38c5ef=_t,threadId:_0x1a5a12=_0x4606c5(),comments:_0x1ec50f=[],unlinkedAt:_0x19f1a7=null,resolvedAt:_0x3aed3a=null,resolvedBy:_0xce521d=null,target:_0x3e4766=null,context:_0x20862e=null,attributes:_0x492ec5={},isResolvable:_0x27efac=!0x0,isSubmitted:_0x3bc6ba=!0x1,isFromAdapter:_0x2401ad=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x38c5ef),{'channelId':_0x38c5ef,'threadId':_0x1a5a12,'comments':_0x1ec50f,'unlinkedAt':_0x19f1a7,'resolvedAt':_0x3aed3a,'resolvedBy':_0xce521d,'target':_0x3e4766,'context':_0x20862e,'attributes':_0x492ec5,'isFromAdapter':_0x2401ad,'isResolvable':_0x27efac,'isSubmitted':_0x3bc6ba}),this['getCommentThread'](_0x1a5a12);}['openNewCommentThread']({channelId:_0x50822b=_t,threadId:_0x5a715c=_0x4606c5(),target:_0xcfc8a6,context:_0x325282=null,isResolvable:_0x460462=!0x0}){if(this['_readOnlyChannels']['has'](_0x50822b)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0xcfc8a6)throw new _0x5d3b6b('commentsrepository-missing-target');const _0x5d9a4a=this['addCommentThread']({'channelId':_0x50822b,'threadId':_0x5a715c,'target':_0xcfc8a6,'context':_0x325282,'isResolvable':_0x460462});if(!_0x5d9a4a)return null;const _0x473ec1=this['_threadToController']['get'](_0x5d9a4a),_0x9a3a61=_0x473ec1['view']['commentThreadInputView']['commentInputView'],_0x38bb93=this['context']['plugins']['get'](y),_0x43ec7a=_0x38bb93['getByInnerView'](_0x473ec1['view']);return _0x38bb93['activate'](_0x43ec7a),_0x9a3a61['once']('editorReady',()=>_0x9a3a61['focus']()),_0x5d9a4a;}['hasCommentThread'](_0x20cd7b){if('string'!=typeof _0x20cd7b)throw new _0x5d3b6b('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x20cd7b);}['updateCommentThread']({channelId:_0x55bf22=_t,threadId:_0x4797f3,context:_0xc84221,unlinkedAt:_0x316caa,attributes:_0x35e471,isFromAdapter:_0x4312ee=!0x1}){return this['fire'](Nt('updateCommentThread',_0x55bf22),{'channelId':_0x55bf22,'threadId':_0x4797f3,'context':_0xc84221,'unlinkedAt':_0x316caa,'attributes':_0x35e471,'isFromAdapter':_0x4312ee}),this['getCommentThread'](_0x4797f3);}['getCommentThread'](_0x84c71d){if('string'!=typeof _0x84c71d)throw new _0x5d3b6b('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x84c71d);}['fetchCommentThread']({channelId:_0xb242f6,threadId:_0x559150}={}){const _0x266d30=this['getCommentThread'](_0x559150);if(_0x266d30)return Promise['resolve'](_0x266d30);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x5d3b6b('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0xb242f6,'threadId':_0x559150})['then'](_0x560ce2=>this['hasCommentThread'](_0x559150)?this['getCommentThread'](_0x559150):_0x560ce2?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0xb242f6},_0x560ce2)):void 0x0)['catch'](_0x345729=>{throw console['error'](_0x345729),new _0x5d3b6b('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x3c65e6,skipNotAttached:_0x23efd2=!0x1,skipEmpty:_0xad39a4=!0x1,toJSON:_0x468ed4=!0x1}={}){const _0x4cca45=[];for(const _0x4d7f9b of this['_threads']['values']())_0x3c65e6&&_0x4d7f9b['channelId']!==_0x3c65e6||_0x23efd2&&!_0x4d7f9b['isAttached']||_0xad39a4&&0x0===_0x4d7f9b['length']||_0x4cca45['push'](_0x4d7f9b);return _0x468ed4?_0x4cca45['map'](_0x3888a3=>_0x3888a3['toJSON']()):_0x4cca45;}['getAnnotationForCommentThread'](_0x39feb8){const _0x20046a=this['_threadToController']['get'](_0x39feb8);if(!_0x20046a)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x20046a['view'])||null;}['getCommentThreadForAnnotation'](_0x34d9ca){const _0xc87e8f=this['_viewToController']['get'](_0x34d9ca['innerView']);return _0xc87e8f?_0xc87e8f['model']:null;}['setActiveCommentThread'](_0x327630){const _0x202113=this['context']['plugins']['get'](y);if(!_0x327630)return void(this['activeCommentThread']&&_0x202113['deactivateAll']());const _0x5e031a=this['getCommentThread'](_0x327630);if(!_0x5e031a)throw new _0x5d3b6b('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x327630});if(!this['_threadToController']['has'](_0x5e031a))throw new _0x5d3b6b('commentsrepository-active-not-attached',null,{'threadId':_0x327630});const _0x53f032=_0x202113['getByInnerView'](this['_threadToController']['get'](_0x5e031a)['view']);_0x202113['activate'](_0x53f032);}['switchReadOnly'](_0x23088c,_0x418a67){_0x23088c?this['_readOnlyChannels']['add'](_0x418a67):this['_readOnlyChannels']['delete'](_0x418a67),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x26c364){return this['_readOnlyChannels']['has'](_0x26c364)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x37d4e1,_0x3b844c){return new vt(_0x37d4e1,_0x3b844c);}['setPermissions'](_0x4d1369,_0x19c5b2=_t){this['_permissions']['set'](_0x19c5b2,_0x4d1369),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x5ab2fa=_t){return this['_permissions']['has'](_0x5ab2fa)?this['_permissions']['get'](_0x5ab2fa):bt;}['_addCommentThread']({channelId:_0x25e755,threadId:_0x2ecc7e,comments:_0x55d722,unlinkedAt:_0x5debff,resolvedAt:_0x20bc65,resolvedBy:_0x49f34f,target:_0x52d87d,context:_0x4dcfd6,attributes:_0x5064d7,isFromAdapter:_0x210828,isResolvable:_0xf09e3f,isSubmitted:_0x371864}){if('string'!=typeof _0x2ecc7e)throw new _0x5d3b6b('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x2ecc7e});if(this['hasCommentThread'](_0x2ecc7e))throw new _0x5d3b6b('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x2ecc7e});const _0x3322e2=new pi(this,{'channelId':_0x25e755,'id':_0x2ecc7e,'context':_0x4dcfd6,'attributes':_0x5064d7,'unlinkedAt':_0x5debff,'resolvedAt':_0x20bc65,'resolvedBy':_0x49f34f?this['context']['plugins']['get'](it)['getUser'](_0x49f34f):null,'isResolvable':_0xf09e3f,'isSubmitted':_0x371864||_0x210828});this['_threads']['set'](_0x2ecc7e,_0x3322e2);for(const _0x1867b7 of _0x55d722)_0x3322e2['_add'](this['_createNewComment']({'threadId':_0x2ecc7e,..._0x1867b7}));return _0x52d87d&&_0x3322e2['attachTo'](_0x52d87d),_0x210828||!_0x3322e2['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x25e755,'threadId':_0x2ecc7e});}['_submitCommentThread']({channelId:_0x189782,threadId:_0x2001cf}){if(!this['hasCommentThread'](_0x2001cf))throw new _0x5d3b6b('commentsrepository-missing-comment-thread',this);const _0x4ee4ba=this['getCommentThread'](_0x2001cf);if(_0x4ee4ba['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x8d629,comments:_0x294a67,resolvedAt:_0x4ba994,resolvedBy:_0x3ecea8,context:_0x17df71,attributes:_0x14f847}=_0x4ee4ba,_0x1037ca=this['context']['plugins']['get']('PendingActions'),_0x5a3886=_0x1037ca['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x189782,'threadId':_0x8d629,'comments':_0x294a67['map'](_0x2dcd49=>_0x2dcd49['toJSON']()),'resolvedAt':_0x4ba994,'resolvedBy':_0x3ecea8?_0x3ecea8['id']:_0x3ecea8,'context':_0x17df71,'attributes':_0x14f847})['then'](({comments:_0x3aea3a})=>{_0x1037ca['remove'](_0x5a3886);for(const _0x2016fd of _0x3aea3a)this['_updateComment']({'channelId':_0x189782,'threadId':_0x2001cf,'commentId':_0x2016fd['commentId'],'createdAt':_0x2016fd['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x42f211=>{throw console['error'](_0x42f211),new _0x5d3b6b('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x4d4e7f,target:_0x24ead3}){const _0x236475=this['getCommentThread'](_0x4d4e7f);if(!_0x236475)throw new _0x5d3b6b('commentsrepository-attach-missing-comment-thread',this);const _0x306b5c=this['context']['plugins']['get']('PendingActions'),_0x309095=this['context']['plugins']['get'](y),_0xa1a84a=this['_createCommentThreadView'](_0x236475),_0x4138a5=new vt(_0x236475,_0xa1a84a);let _0x2a0e05=null;_0xa1a84a['on']('change:isDirty',(_0x328e7e,_0x394be7,_0x5efeb1)=>{_0x5efeb1?_0x2a0e05=_0x306b5c['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x2a0e05&&(_0x306b5c['remove'](_0x2a0e05),_0x2a0e05=null);}),this['_threadToController']['set'](_0x236475,_0x4138a5),this['_viewToController']['set'](_0xa1a84a,_0x4138a5);const _0x4593d4=new E(this['context']['locale'],_0xa1a84a);_0x4593d4['bind']('length')['to'](_0xa1a84a),_0x4593d4['bind']('isDirty')['to'](_0xa1a84a,'isDirty',_0xa1a84a,'length',(_0x555f75,_0x7ae3a7)=>_0x555f75||!_0x7ae3a7),_0x4593d4['bind']('isActive')['to'](_0xa1a84a),_0x4593d4['type']='comment';const _0x5097d0=new T({'view':_0x4593d4,'target':_0x24ead3,'type':'comment','isVisible':!_0x236475['archivedAt']&&!!('function'==typeof _0x24ead3?_0x24ead3():_0x24ead3)});return _0xa1a84a['on']('escape',()=>{_0x5097d0['fire']('escape');}),this['_bindAnnotationToEditors'](_0xa1a84a,_0x5097d0),_0x309095['add'](_0x5097d0),_0x5097d0;}['_bindAnnotationToEditors'](_0x4f9699,_0x19fae1){this['listenTo'](_0x4f9699,'editorReady',(_0x114319,_0x5b1218)=>{const _0x1fbc06=_0x5b1218['ui']['view']['body']['bodyCollectionContainer'];_0x19fae1['focusableElements']['add'](_0x1fbc06),this['context']instanceof _0x43a56a&&this['context']['ui']['focusTracker']['add'](_0x1fbc06);},{'priority':'highest'}),this['listenTo'](_0x4f9699,'editorDestroyed',(_0x35b746,_0x59e4d1)=>{const _0x88961c=_0x59e4d1['ui']['view']['body']['bodyCollectionContainer'];_0x19fae1['focusableElements']['has'](_0x88961c)&&_0x19fae1['focusableElements']['remove'](_0x88961c),this['context']instanceof _0x43a56a&&this['context']['ui']['focusTracker']['remove'](_0x88961c);});}['_unbindEditors'](_0x1e0500){this['stopListening'](_0x1e0500,'editorReady'),this['stopListening'](_0x1e0500,'editorDestroyed');}['_createCommentThreadView'](_0x109924){const _0x300fc0=this['context']['plugins']['get'](it),{config:_0x2988ab,locale:_0x41df0b}=this['context'],_0x1746b7=pt(_0x2988ab['get']('locale'),_0x41df0b);return new(0x0,(_0x2988ab['get']('comments'))['CommentThreadView'])(_0x41df0b,_0x109924,_0x300fc0['me'],{'editorConfig':{..._0x2988ab['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x2988ab['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x2988ab['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x2988ab['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x2988ab['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x1746b7,'CommentView':_0x2988ab['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x49e313,channelId:_0x92ab84,resolvedAt:_0x2939da,resolvedBy:_0x8eaa7a,isFromAdapter:_0x35c341}){if(!this['hasCommentThread'](_0x49e313))throw new _0x5d3b6b('commentsrepository-missing-comment-thread',null,{'threadId':_0x49e313});const _0x5b85e5=this['getCommentThread'](_0x49e313);if(_0x5b85e5['isResolved'])throw new _0x5d3b6b('commentsrepository-resolved-comment-thread',null,{'threadId':_0x49e313});const _0x53c973=this['context']['plugins']['get'](it);if(_0x5b85e5['resolvedBy']=_0x53c973['getUser'](_0x8eaa7a),_0x5b85e5['resolvedAt']=_0x2939da,_0x35c341||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x5a6166=this['context']['plugins']['get']('PendingActions'),_0x5882d6=_0x5a6166['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x92ab84,'threadId':_0x49e313})['then'](({resolvedAt:_0x4642e3,resolvedBy:_0x256b8a})=>{_0x5a6166['remove'](_0x5882d6),_0x5b85e5['resolvedBy']['id']!==_0x256b8a&&(_0x5b85e5['resolvedBy']=_0x53c973['getUser'](_0x256b8a)),_0x5b85e5['resolvedAt']=_0x4642e3;})['catch'](_0xe34219=>{throw console['error'](_0xe34219),new _0x5d3b6b('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x1d2d95,channelId:_0x80eab0,isFromAdapter:_0x5377f4}){if(!this['hasCommentThread'](_0x1d2d95))throw new _0x5d3b6b('commentsrepository-missing-comment-thread',null,{'threadId':_0x1d2d95});const _0x319ee2=this['getCommentThread'](_0x1d2d95);if(!_0x319ee2['isResolved'])throw new _0x5d3b6b('commentsrepository-reopen-comment-thread',null,{'threadId':_0x1d2d95});if(_0x319ee2['resolvedBy']=null,_0x319ee2['resolvedAt']=null,_0x5377f4||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x2249b4=this['context']['plugins']['get']('PendingActions'),_0x3bd775=_0x2249b4['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x80eab0,'threadId':_0x1d2d95})['then'](()=>_0x2249b4['remove'](_0x3bd775))['catch'](_0x30f84b=>{throw console['error'](_0x30f84b),new _0x5d3b6b('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x18e1f6,isFromAdapter:_0x362872}){const _0x5a822a=this['getCommentThread'](_0x18e1f6);if(!_0x5a822a)throw new _0x5d3b6b('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x18e1f6),this['_threads']['delete'](_0x18e1f6),!_0x5a822a['isSubmitted']||_0x362872||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x46d21d=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5cc579}=_0x5a822a,_0x19b878=_0x46d21d['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x5cc579,'threadId':_0x18e1f6})['then'](()=>_0x46d21d['remove'](_0x19b878))['catch'](_0x33b7d5=>{throw console['error'](_0x33b7d5),new _0x5d3b6b('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x23dc40,unlinkedAt:_0x556f58,context:_0x47a274,attributes:_0x1264fd,isFromAdapter:_0x20c847}){if('string'!=typeof _0x23dc40)throw new _0x5d3b6b('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x23dc40});if(!this['hasCommentThread'](_0x23dc40))throw new _0x5d3b6b('commentsrepository-missing-comment-thread',null,{'threadId':_0x23dc40});const _0x55cad7=this['getCommentThread'](_0x23dc40);let _0x2a8c61=!0x1;if(void 0x0!==_0x47a274&&_0x55cad7['context']!==_0x47a274&&(_0x55cad7['context']=_0x47a274,_0x2a8c61=!0x0),void 0x0!==_0x556f58&&_0x55cad7['unlinkedAt']!==_0x556f58&&(_0x55cad7['unlinkedAt']=_0x556f58,_0x2a8c61=!0x0),_0x1264fd&&!At(_0x1264fd,_0x55cad7['attributes'])&&(_0x55cad7['attributes']=_0x1264fd,_0x2a8c61=!0x0),!_0x2a8c61)return Promise['resolve']();if(!_0x55cad7['isSubmitted']||_0x20c847||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x3b2cef=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3d9b77}=_0x55cad7,_0x4b3643=_0x3b2cef['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x3d9b77,'threadId':_0x23dc40,'context':_0x47a274,'unlinkedAt':_0x556f58,'attributes':_0x1264fd})['then'](()=>_0x3b2cef['remove'](_0x4b3643))['catch'](_0x5e42f5=>{throw console['error'](_0x5e42f5),new _0x5d3b6b('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x2006fe){const _0x317d8e=this['context']['plugins']['get'](y),_0x548e35=this['getCommentThread'](_0x2006fe);if(_0x548e35['_isAttached']=!0x1,this['_threadToController']['has'](_0x548e35)){const _0x59deb6=this['_threadToController']['get'](_0x548e35),_0x32a9af=_0x59deb6['view'],_0x344085=_0x317d8e['getByInnerView'](_0x32a9af);this['_threadToController']['delete'](_0x548e35),this['_viewToController']['delete'](_0x32a9af),_0x344085&&_0x317d8e['remove'](_0x344085),_0x59deb6['destroy'](),_0x32a9af['destroy']()['then'](()=>{this['_unbindEditors'](_0x32a9af);});}}['_updateActiveAnnotation']({threadId:_0x3237a6,resolvedAt:_0x25759c,unlinkedAt:_0x3d1063}){const _0x125a57=!!_0x25759c,_0x49cd4c=this['context']['plugins']['get'](y),_0x5ab3fe=this['getCommentThread'](_0x3237a6);if(this['_threadToController']['has'](_0x5ab3fe)){const _0x4e1536=this['_threadToController']['get'](_0x5ab3fe)['view'],_0x344cf4=_0x49cd4c['getByInnerView'](_0x4e1536);_0x344cf4&&(_0x125a57&&_0x49cd4c['_removeActiveAnnotation'](_0x344cf4),_0x3d1063?_0x344cf4['isVisible']=!0x1:_0x344cf4['refreshVisibility']());}}['_getExternalAuthor'](_0x195ef1){const _0x11293e=this['context']['plugins']['get'](it),_0x28fd6f=It('external:'+_0x195ef1),_0x776455=_0x11293e['getUser'](_0x28fd6f);return _0x776455||_0x11293e['addUser']({'id':_0x28fd6f,'name':_0x195ef1});}['_createNewComment']({threadId:_0x2f4d49,commentId:_0x1a2c1e=_0x4606c5(),content:_0x1fb3e7,authorId:_0x5b2597,createdAt:_0x5bc23d,attributes:_0x427fd9}){if('string'!=typeof _0x1a2c1e)throw new _0x5d3b6b('commentsrepository-invalid-commentid');if('string'!=typeof _0x5b2597)throw new _0x5d3b6b('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x1fb3e7||!_0x1fb3e7['trim']())throw new _0x5d3b6b('commentsrepository-invalid-comment-content');const _0x2127a5=this['context']['plugins']['get'](it)['getUser'](_0x5b2597);if(!_0x2127a5)throw new _0x5d3b6b('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x5b2597});let _0x1151a8=null,_0x6a47ea=_0x5bc23d;return _0x427fd9?.['@external']&&(_0x1151a8=this['_getExternalAuthor'](_0x427fd9['@external']['authorName']),_0x6a47ea=new Date(_0x427fd9['@external']['createdAt'])),new wi(this,{'threadId':_0x2f4d49,'id':_0x1a2c1e,'author':_0x1151a8||_0x2127a5,'creator':_0x2127a5,'content':_0x1fb3e7,'createdAt':_0x5bc23d,'authoredAt':_0x6a47ea,'attributes':_0x427fd9});}['_addComment'](_0x139dcb){let {threadId:_0xa98c72,content:_0x43457e,attributes:_0x4d036d,isFromAdapter:_0x1062a1}=_0x139dcb;const _0x259229=this['getCommentThread'](_0x139dcb['threadId']);if(!_0x259229)throw new _0x5d3b6b('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x5d99fa=this['_createNewComment'](_0x139dcb),{id:_0x1645dd}=_0x5d99fa;if(_0x259229['_add'](_0x5d99fa),_0x1062a1||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x259229['isSubmitted'])return Promise['resolve']();const _0x2cef8b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4bbd2f}=_0x259229,_0x378cd9=_0x2cef8b['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x4d036d||(_0x4d036d={}),this['adapter']['addComment']({'channelId':_0x4bbd2f,'threadId':_0xa98c72,'commentId':_0x1645dd,'content':_0x43457e,'attributes':_0x4d036d})['then'](_0x1720ee=>{_0x2cef8b['remove'](_0x378cd9),_0x1720ee&&this['_updateComment']({'channelId':_0x4bbd2f,'threadId':_0xa98c72,'commentId':_0x1645dd,'createdAt':_0x1720ee['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4eee4e=>{throw console['error'](_0x4eee4e),new _0x5d3b6b('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x494137,commentId:_0x19d4ef,content:_0x4ff0bd,createdAt:_0x3e2fc1,attributes:_0x2684e9,isFromAdapter:_0x4c3802}){if(void 0x0!==_0x4ff0bd&&('string'!=typeof _0x4ff0bd||!_0x4ff0bd['trim']()['length']))throw new _0x5d3b6b('commentsrepository-update-comment-invalid-content');const _0x3aa31e=this['getCommentThread'](_0x494137),_0x498f54=_0x3aa31e['getComment'](_0x19d4ef);if(!_0x498f54)throw new _0x5d3b6b('commentsrepository-update-missing-comment',this);let _0xf88306=!0x1;if(_0x4ff0bd&&_0x4ff0bd!==_0x498f54['content']&&(_0x498f54['isEditable']||_0x4c3802)&&(_0x498f54['content']=_0x4ff0bd,_0xf88306=!0x0),_0x3e2fc1&&_0x3e2fc1!==_0x498f54['createdAt']&&(_0x498f54['createdAt']=_0x3e2fc1,_0x498f54['attributes']&&_0x498f54['attributes']['@external']||(_0x498f54['authoredAt']=_0x3e2fc1),_0xf88306=!0x0),_0x2684e9&&!At(_0x2684e9,_0x498f54['attributes'])&&(_0x498f54['attributes']=_0x2684e9,_0xf88306=!0x0),!_0xf88306)return Promise['resolve']();if(_0x3aa31e['fire']('commentUpdated'),_0x4c3802||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x4dfb1b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x29c23f}=this['getCommentThread'](_0x498f54['threadId']),_0x2708aa=_0x4dfb1b['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x29c23f,'threadId':_0x494137,'commentId':_0x19d4ef,'content':_0x4ff0bd,'attributes':_0x2684e9})['then'](()=>_0x4dfb1b['remove'](_0x2708aa))['catch'](_0x2450d3=>{throw console['error'](_0x2450d3),new _0x5d3b6b('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x5e7097,commentId:_0xdc809f,isFromAdapter:_0x3a8785}){const _0x5216cb=this['getCommentThread'](_0x5e7097),_0x29c52e=_0x5216cb['getComment'](_0xdc809f);if(!_0x29c52e)throw new _0x5d3b6b('commentsrepository-remove-missing-comment',this);if(_0x5216cb['_remove'](_0x29c52e),_0x3a8785||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x38f74e=this['context']['plugins']['get']('PendingActions'),{channelId:_0x14561e}=_0x5216cb,_0x291362=_0x38f74e['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x14561e,'threadId':_0x5e7097,'commentId':_0xdc809f})['then'](()=>_0x38f74e['remove'](_0x291362))['catch'](_0xb44acb=>{throw console['error'](_0xb44acb),new _0x5d3b6b('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x22e9b3(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0xdf7573,_0x2611aa){super();const _0x1f2508=_0x2611aa['isResolvable'];this['channelId']=_0x2611aa['channelId'],this['id']=_0x2611aa['id'],this['comments']=new _0x39f167(),this['_repository']=_0xdf7573,this['_isAttached']=!0x1,this['_isSubmitted']=_0x2611aa['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0xdf7573,'_permissions',_0xdf7573,'_readOnlyChannels',()=>_0xdf7573['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0xdf7573,'_permissions',()=>_0xdf7573['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0xdf7573,'_permissions',()=>{const _0x2d8fec=_0xdf7573['getPermissions'](this['channelId']);return _0x2d8fec['write']||_0x2d8fec['admin'];}),this['bind']('isResolvable')['to'](_0xdf7573,'_permissions',()=>_0x1f2508&&_0xdf7573['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x2611aa['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x599da1,_0x51b21b)=>_0x599da1?_0x51b21b?_0x599da1<_0x51b21b?_0x599da1:_0x51b21b:_0x599da1:_0x51b21b),this['set']('unlinkedAt',_0x2611aa['unlinkedAt']||null),this['set']('resolvedAt',_0x2611aa['resolvedAt']||null),this['set']('resolvedBy',_0x2611aa['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x24803c=>!!_0x24803c),this['set']('attributes',_0x2611aa['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x53d30c,_0x95a49)=>_0x53d30c+_0x95a49['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x49b255,id:_0x4715cf}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x49b255),{'channelId':_0x49b255,'threadId':_0x4715cf});}['setUnlinkedAt'](_0x28dbf1){this['_update']({'unlinkedAt':_0x28dbf1});}['resolve']({resolvedAt:_0x2cdf38=new Date(),resolvedBy:_0x413fb7=null,isFromAdapter:_0x341195=!0x1}={}){const _0x3f84d9=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x21029d,id:_0x5b5829}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x21029d),{'channelId':_0x21029d,'threadId':_0x5b5829,'resolvedAt':_0x2cdf38,'resolvedBy':_0x413fb7||_0x3f84d9['id'],'isFromAdapter':_0x341195});}['reopen']({isFromAdapter:_0x54f510=!0x1}={}){const {channelId:_0x4e8abd,id:_0x22577e}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x4e8abd),{'channelId':_0x4e8abd,'threadId':_0x22577e,'isFromAdapter':_0x54f510});}['setContext'](_0x1c9c9e){this['context']||this['_update']({'context':_0x1c9c9e});}['setAttribute'](_0x46c5ac,_0x23e010){const _0x3c7d9d=wt(this['attributes']);yt(_0x3c7d9d,_0x46c5ac,_0x23e010),this['_update']({'attributes':_0x3c7d9d});}['removeAttribute'](_0xce1205){const _0x166b6e=wt(this['attributes']);Ct(_0x166b6e,_0xce1205),this['_update']({'attributes':_0x166b6e});}['remove']({isFromAdapter:_0x446ac6=!0x1}={}){const {channelId:_0x2ea7a1,id:_0x614c67}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x2ea7a1),{'channelId':_0x2ea7a1,'threadId':_0x614c67,'isFromAdapter':_0x446ac6});}['attachTo'](_0x9204cb){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x9204cb});}['addComment'](_0x1eff97){const {channelId:_0x321ee6,id:_0x5c9d23}=this;this['_repository']['fire'](Nt('addComment',_0x321ee6,_0x5c9d23),Object['assign']({'channelId':_0x321ee6,'threadId':_0x5c9d23},_0x1eff97));}['getComment'](_0x2e8049){if('string'!=typeof _0x2e8049)throw new _0x5d3b6b('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x2e8049});return this['comments']['get'](_0x2e8049);}['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'](_0x1321a8=>_0x1321a8['toJSON']()),'attributes':this['attributes']};}['_add'](_0x2dc1f0){return this['listenTo'](_0x2dc1f0,'change:authoredAt',()=>{const _0x38f33b=this['_findOptimalIndex'](_0x2dc1f0),_0x1cbdd5=this['comments'];_0x38f33b-0x1!=_0x1cbdd5['getIndex'](_0x2dc1f0)&&_0x38f33b+0x1!=_0x1cbdd5['getIndex'](_0x2dc1f0)&&(this['_remove'](_0x2dc1f0),this['_add'](_0x2dc1f0));}),this['comments']['add'](_0x2dc1f0,this['_findOptimalIndex'](_0x2dc1f0));}['_update'](_0x45b52e){const {channelId:_0x4a6495,id:_0x3b7b0e}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x4a6495),{..._0x45b52e,'channelId':_0x4a6495,'threadId':_0x3b7b0e});}['_remove'](_0x304803){return this['stopListening'](_0x304803),_0x304803['destroy'](),this['comments']['remove'](_0x304803);}['_findOptimalIndex'](_0x44e31c){const _0x6f42b5=this['comments']['find'](_0x7a5660=>new Date(_0x7a5660['authoredAt'])['getTime']()>new Date(_0x44e31c['authoredAt'])['getTime']());return _0x6f42b5?this['comments']['getIndex'](_0x6f42b5):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x22e9b3(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x55c146,_0xb39a37){super();const _0x138319=_0x55c146['context']['plugins']['get'](it)['me'],_0xd67c7c=_0x55c146['getCommentThread'](_0xb39a37['threadId']),_0x4f5c50=0x0===_0xd67c7c['comments']['length'],_0x4342e8=_0x138319===_0xb39a37['author'];this['id']=_0xb39a37['id'],this['threadId']=_0xb39a37['threadId'],this['author']=_0xb39a37['author'],this['creator']=_0xb39a37['creator'],this['isExternal']=Boolean(_0xb39a37['attributes']&&_0xb39a37['attributes']['@external']),this['set']('content',_0xb39a37['content']),this['createdAt']=_0xb39a37['createdAt']||new Date(),this['set']('authoredAt',_0xb39a37['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0xd67c7c,'resolvedAt'),this['set']('attributes',_0xb39a37['attributes']||{}),this['bind']('isEditable')['to'](_0x55c146,'_permissions',()=>{const _0x1baec3=_0x55c146['getPermissions'](_0xd67c7c['channelId'])['write'],_0xdb2962=_0x55c146['getPermissions'](_0xd67c7c['channelId'])['modifyAll'];return _0x4342e8&&_0x1baec3||!_0x4342e8&&_0xdb2962;}),this['bind']('isRemovable')['to'](_0xd67c7c,'isRemovable',_0x55c146,'_permissions',_0x1d736b=>{const _0x23d7df=_0x55c146['getPermissions'](_0xd67c7c['channelId'])['write'],_0x3f6914=_0x55c146['getPermissions'](_0xd67c7c['channelId'])['modifyAll'];return _0x4342e8&&_0x23d7df||_0x1d736b&&_0x4f5c50||!_0x4342e8&&_0x3f6914&&!_0x4f5c50;}),this['bind']('isReadOnly')['to'](_0xd67c7c,'isReadOnly'),this['_repository']=_0x55c146;}get['weight'](){return Math['max'](function(_0x487cfc){const _0xe1ef10=document['createElement']('div');return _0xe1ef10['innerHTML']=_0x487cfc,_0xe1ef10['textContent']['length'];}(this['content']),0xc8);}['update'](_0x3b2a42){const {threadId:_0x1e757b,id:_0x5c8a27}=this;if(!this['_repository']['hasCommentThread'](_0x1e757b))throw new _0x5d3b6b('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x3d70f4}=this['_repository']['getCommentThread'](_0x1e757b);this['_repository']['fire'](Nt('updateComment',_0x3d70f4,_0x1e757b),{'channelId':_0x3d70f4,'threadId':_0x1e757b,'commentId':_0x5c8a27,..._0x3b2a42});}['setAttribute'](_0x11e6d7,_0x35eafd){const _0x3c2131=wt(this['attributes']);yt(_0x3c2131,_0x11e6d7,_0x35eafd),this['update']({'attributes':_0x3c2131});}['removeAttribute'](_0x2393d5){const _0x167511=wt(this['attributes']);Ct(_0x167511,_0x2393d5),this['update']({'attributes':_0x167511});}['remove'](_0x3a3676={}){if(!_0x3a3676['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x5bc0c9,id:_0x4ccce7}=this;if(!this['_repository']['hasCommentThread'](_0x5bc0c9))throw new _0x5d3b6b('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x51bc26}=this['_repository']['getCommentThread'](_0x5bc0c9);this['_repository']['fire'](Nt('removeComment',_0x51bc26,_0x5bc0c9),{'channelId':_0x51bc26,'threadId':_0x5bc0c9,'commentId':_0x4ccce7,..._0x3a3676});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x282573,..._0x314552){for(const _0x4faf6a of _0x314552)void 0x0!==_0x4faf6a&&(_0x282573+=':'+String(_0x4faf6a));return _0x282573;}class ot extends _0x1974c9{constructor(_0x50241a){super(_0x50241a),this['set']('hasContent',!0x1);}['refresh'](){const _0xac23b0=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x2ed155 of _0xac23b0['getRanges']())if(this['_hasContent'](_0x2ed155))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x259aaa=_0x4606c5(),ranges:_0x5e80ec,comment:_0x3b2ea5}={}){const _0x3fc96a=this['editor']['model'],_0x5873dc=_0x5e80ec??Array['from'](_0x3fc96a['document']['selection']['getRanges']()),_0x2b68b2=[];for(const _0xbfe020 of _0x5873dc)this['_hasContent'](_0xbfe020)&&_0x2b68b2['push'](this['_trimToContent'](_0xbfe020));if(!_0x2b68b2['length'])throw new _0x5d3b6b('addcommentthreadcommand-incorrect-ranges',null);_0x3b2ea5&&this['_createCommentThread'](_0x259aaa,_0x3b2ea5),this['_createMarkersFromRanges'](_0x259aaa,_0x2b68b2,!!_0x3b2ea5);}['_createMarkersFromRanges'](_0x1a51a4,_0x513b83,_0x205391){this['editor']['model']['change'](_0x499f29=>{for(const _0x1e82e7 of _0x513b83){const _0x45ee2b=_0x4606c5()['substr'](0x1,0x5),_0x3c6df3='comment:'+_0x1a51a4+':'+_0x45ee2b;_0x499f29['addMarker'](_0x3c6df3,{'range':_0x1e82e7,'usingOperation':_0x205391,'affectsData':_0x205391});}});}['_createCommentThread'](_0x52a552,_0x3f4032){const _0xe55b38=this['editor']['plugins']['get']('CommentsRepository'),_0x38f26b=this['editor']['config']['get']('collaboration.channelId'),_0x438bfe=this['editor']['plugins']['get']('Users')['me'];if(!_0x438bfe)throw new _0x5d3b6b('addcommentthreadcommand-user-not-found',null);_0xe55b38['addCommentThread']({'threadId':_0x52a552,'channelId':_0x38f26b,'comments':[{'authorId':_0x438bfe['id'],'content':_0x3f4032,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x2aed8a){for(const _0x1f81fa of _0x2aed8a['getItems']())if(this['_itemIsContent'](_0x1f81fa))return!0x0;return!0x1;}['_itemIsContent'](_0x3ae3ed){return _0x3ae3ed['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x3ae3ed)&&!_0x3ae3ed['is']('element','tableCell');}['_trimToContent'](_0xc2dc37){const _0x8d1eb5=_0x21d911=>!this['_itemIsContent'](_0x21d911['item']),_0x5539f4=_0xc2dc37['start']['getLastMatchingPosition'](_0x8d1eb5),_0x74da2=_0xc2dc37['end']['getLastMatchingPosition'](_0x8d1eb5,{'direction':'backward'});return this['editor']['model']['createRange'](_0x5539f4,_0x74da2);}}class b extends _0x22838b{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2b8d47){super(_0x2b8d47),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x55783b=this['editor'],_0x2405e6=_0x55783b['model']['document']['selection'],_0xe8531=_0x44edca(()=>this['refreshSelectedViews'](),0xa);_0x2405e6['on']('change:range',(_0x5d2fc9,_0x3e314d)=>{_0x3e314d['directChange']&&(_0xe8531['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x55783b['editing']['view']['document'],'change:isFocused',(_0x3536b3,_0x21341c,_0x2f7a8b)=>{_0x2f7a8b&&_0xe8531();}),this['listenTo'](_0x55783b['ui']['focusTracker'],'change:isFocused',(_0x1575e3,_0x245468,_0x4606e0)=>{_0x4606e0||this['fire']('blur',{'isAnnotationTracked':_0x46f959=>this['_editorAnnotationsData']['has'](_0x46f959['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x2009f2){if(this['_editorAnnotations']['has'](_0x2009f2['view']))return;this['_editorAnnotations']['add'](_0x2009f2['view']),this['editor']['ui']['focusTracker']['add'](_0x2009f2['view']['element']);const _0x30b573=this['editor']['plugins']['get'](y);this['listenTo'](_0x30b573['collection'],'remove',(_0x1c85d4,_0x3a9abd)=>{this['editor']['ui']['focusTracker']['remove'](_0x3a9abd['view']['element']),this['_editorAnnotations']['delete'](_0x3a9abd['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x311969){if('function'!=typeof _0x311969)throw new _0x5d3b6b('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x311969);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x123716,annotations:_0x13e3b2}){const _0x1b5524=[],_0x24878c=this['editor']['model']['document']['selection'],_0x1632a0=Array['from'](_0x24878c['getRanges']());for(const [_0x460a17,_0x3ea113]of this['_editorAnnotationsData']){const _0x503063=_0xf16f34(_0x3ea113),_0x43b513=_0x13e3b2['getByInnerView'](_0x460a17);_0x503063&&_0x43b513&&_0x1b5524['push']({'annotation':_0x43b513,'range':_0x503063});}function _0xf16f34(_0xefa97d){for(const _0xa79256 of _0xefa97d)for(const _0x1cb4bf of _0x1632a0)if(_0xa79256['containsRange'](_0x1cb4bf,!_0x24878c['isCollapsed']))return _0xa79256;return null;}return _0x1b5524['sort']((_0x4c95b3,_0x5d1dcf)=>{const _0x405c94=_0x4c95b3['range'],_0x18a0ad=_0x5d1dcf['range'];if(!_0x405c94['isEqual'](_0x18a0ad)){if(_0x405c94['containsRange'](_0x18a0ad,!0x0))return 0x1;if(_0x18a0ad['containsRange'](_0x405c94,!0x0))return-0x1;}return _0x4c95b3['annotation']==_0x123716?-0x1:_0x5d1dcf['annotation']==_0x123716?0x1:0x0;})['map'](_0x257140=>_0x257140['annotation']);}get['_editorAnnotationsData'](){const _0x105681=new Map();for(const _0x56bd72 of Array['from'](this['_dataCollectors']))for(const [_0x3eb431,_0x1ed540]of _0x56bd72())_0x105681['set'](_0x3eb431,_0x1ed540);return _0x105681;}}class st extends _0x22838b{['afterInit'](){const _0x3c7481=this['editor'];if(!_0x3c7481['plugins']['has']('RestrictedEditingModeEditing'))return;_0x3c7481['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x22838b{constructor(_0x6fd211){super(_0x6fd211),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x32e6b1=this['editor'],_0x1da479=_0x32e6b1['commands']['get']('importWord'),_0x3a0b92=_0x32e6b1['plugins']['get'](it);_0x1da479&&(_0x1da479['on']('execute',(_0x4d9c33,[,_0x3f9cf9])=>{_0x3f9cf9['collaboration_features']={'comments':!0x0,'user_id':_0x3a0b92['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x1da479,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x51d95e,_0x2ce68d){const {comment_threads:_0x1e6fc1}=_0x2ce68d;_0x1e6fc1&&_0x1e6fc1['forEach'](({thread_id:_0x4a1dd8,comments:_0x14a355,is_resolved:_0x4be2e8})=>{const _0x11c5e9=new Date(),_0x2aafa9=_0x14a355['map'](({author:_0x22e8f4,content:_0x304cda,created_at:_0x236abf})=>({'content':_0x304cda,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x11c5e9,'attributes':{'@external':{'authorName':_0x22e8f4,'createdAt':_0x236abf?new Date(_0x236abf):new Date(),'source':'importWord'}}})),_0x13e061=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x13e061,'threadId':_0x4a1dd8,'comments':_0x2aafa9,'resolvedAt':_0x4be2e8?_0x11c5e9:null});});}}class at extends _0x22838b{constructor(_0x1b9efd){super(_0x1b9efd),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x13bae0=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x13bae0,'contentInsertion',(_0x55714b,_0xc6633f)=>this['_removeMarkersWithoutThreads'](_0xc6633f['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x3b792a){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x3b792a;const _0x5bdcc9=this['editor']['plugins']['get']('CommentsRepository');for(const _0x4fc009 of _0x3b792a['keys']()){const [_0x4a00b1,_0x5e91de]=_0x4fc009['split'](':');'comment'!=_0x4a00b1||_0x5bdcc9['hasCommentThread'](_0x5e91de)||_0x3b792a['delete'](_0x4fc009);}return _0x3b792a;}['_registerMarkerInClipboardPipeline'](){const _0x3337bf=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x5945b6=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x5945b6&&_0x3337bf['_registerMarkerToCopy']('comment',_0x5945b6);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x54c732){switch(_0x54c732){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x4c0151){const _0x12772b=_0x4c0151['split'](':');return{'group':_0x12772b[0x0],'id':_0x12772b[0x1],'part':_0x12772b[0x2]};}class ut extends _0x22838b{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x28b08e,_0x2a4e5a)=>{if(!_0x2a4e5a['options']['showCommentHighlights'])return null;if(_0x2a4e5a['options']['ignoreResolvedComments']){const {id:_0x298e63}=ft(_0x28b08e['markerName']),_0x5190a3=this['editor']['plugins']['get'](o);if(_0x5190a3['getCommentThread'](_0x298e63)?.['isResolved']&&_0x28b08e['item'])return _0x2a4e5a['consumable']['consume'](_0x28b08e['item'],'addMarker:'+_0x28b08e['markerName']),_0x2a4e5a['consumable']['consume'](_0x28b08e['item'],'removeMarker:'+_0x28b08e['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x56a127=>{_0x56a127['on']('addMarker:comment',(_0x47ce00,_0x4e4c45,_0x136b12)=>{if(!_0x136b12['options']['showCommentHighlights'])return;const _0x3b0364=_0x4e4c45['item'];if(!_0x3b0364)return;const _0x3c3794=_0x136b12['mapper']['toViewElement'](_0x3b0364);this['editor']['model']['schema']['isObject'](_0x3b0364)&&_0x3c3794&&!_0x3c3794['getCustomProperty']('widget')&&_0x3c3794['is']('containerElement')&&_0x5e5f33(_0x3c3794,_0x136b12['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x5c5faf,{writer:_0x5e3078,options:_0x3bb8ad})=>{if(!_0x3bb8ad['showCommentHighlights'])return null;const _0x52dc75=_0x5e3078['createContainerElement']('div'),_0x475588=_0x5e3078['createEmptyElement']('hr');return _0x5e3078['addClass']('ck-horizontal-line',_0x52dc75),_0x5e3078['insert'](_0x5e3078['createPositionAt'](_0x52dc75,0x0),_0x475588),_0x52dc75;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x284b7d,{writer:_0x5bb232,options:_0x593c66})=>{if(!_0x593c66['showCommentHighlights'])return null;const _0x1e69a6=_0x5bb232['createContainerElement']('span'),_0x3e666a=_0x5bb232['createEmptyElement']('img');return _0x5bb232['addClass']('image-inline',_0x1e69a6),_0x5bb232['insert'](_0x5bb232['createPositionAt'](_0x1e69a6,0x0),_0x3e666a),_0x1e69a6;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x2bda73,{writer:_0x248565,options:_0x4d25ef})=>{if(_0x4d25ef['showCommentHighlights'])return _0x248565['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x16f2ee,_0x16b322,_0x5d7948)=>{_0x5d7948['options']['showCommentHighlights']&&_0x16f2ee['stop']();},{'priority':'high'});}}class r extends _0x22838b{static get['requires'](){return[o,b,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x163a88){super(_0x163a88),this['set']('isThreadsLoadingPaused',!0x0),_0x163a88['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x3f358d,_0x146de0,_0x2d2501,_0x3f57a2)=>{const _0x1fc5f2=_0x163a88['plugins']['get'](o),_0x3eb3d4=_0x2d2501?ft(_0x2d2501)['id']:null;_0x163a88['model']['change'](()=>{if(_0x3eb3d4){const _0x3d57c7=this['getAllMarkersForId'](_0x3eb3d4);for(const _0xf4f4b0 of _0x3d57c7)_0x163a88['editing']['reconvertMarker'](_0xf4f4b0);}if(_0x3f57a2){const {id:_0x230696}=ft(_0x3f57a2),_0x201467=_0x1fc5f2['getCommentThread'](_0x230696);if(_0x201467&&_0x201467['unlinkedAt'])return;if(_0x201467&&!_0x201467['isAttached'])return;const _0x276344=this['getAllMarkersForId'](_0x230696);for(const _0x300f0c of _0x276344)_0x163a88['editing']['reconvertMarker'](_0x300f0c);}}),_0x3eb3d4&&this['scrollToThreadMarker'](_0x3eb3d4);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x230cf7=this['editor'],_0x5e3fd5=_0x230cf7['plugins']['get'](o),_0x116a43=_0x230cf7['config']['get']('collaboration.channelId'),_0x5eb7ef=_0x5e3fd5['getCommentThreads']()['filter'](_0x52c20c=>_0x52c20c['channelId']!==_0x116a43);_0x230cf7['commands']['add']('addCommentThread',new ot(_0x230cf7)),this['listenTo'](_0x230cf7,'change:isReadOnly',(_0x4c6897,_0x43b647,_0x4021f2)=>{_0x5e3fd5['switchReadOnly'](_0x4021f2,_0x230cf7['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x5e3fd5,dt('addCommentThread',_0x116a43),(_0x2debd0,{threadId:_0x1a6903})=>{const _0x5167c9=this['editor']['plugins']['get'](o)['getCommentThread'](_0x1a6903);_0x5167c9?.['unlinkedAt']&&this['_attachArchivedThread'](_0x1a6903);}),this['listenTo'](_0x5e3fd5,dt('removeCommentThread',_0x116a43),(_0x3bd136,{threadId:_0x120191})=>{_0x230cf7['model']['enqueueChange']({'isUndoable':!0x1},_0x238eb5=>{const _0xb5f572=this['getAllMarkersForId'](_0x120191);for(const _0x2f37ed of _0xb5f572)_0x238eb5['removeMarker'](_0x2f37ed);});}),this['listenTo'](_0x5e3fd5,dt('resolveCommentThread',_0x116a43),(_0x34fee4,{threadId:_0x24e448})=>{(this['_reconvertMarkers'](_0x24e448),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x24e448)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x5e3fd5,dt('reopenCommentThread',_0x116a43),(_0xc8f152,{threadId:_0x2a98c5})=>{this['_reconvertMarkers'](_0x2a98c5);},{'priority':'low'}),this['listenTo'](_0x5e3fd5,dt('addComment',_0x116a43),(_0x12c4d2,{threadId:_0x1b958a,isFromAdapter:_0x27b2ab})=>{const _0x2ee311=this['getAllMarkersForId'](_0x1b958a);if(_0x27b2ab||0x0==_0x2ee311['length']||!_0x5e3fd5['hasCommentThread'](_0x1b958a))return;0x1===_0x5e3fd5['getCommentThread'](_0x1b958a)['length']&&_0x230cf7['model']['enqueueChange']({'isUndoable':!0x1},_0x179ede=>{for(const _0x335e12 of _0x2ee311)_0x179ede['updateMarker'](_0x335e12,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x5eb7ef);}['afterInit'](){!async function(_0x37854d){const _0x2d030a=_0xf72225([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x1a71de=0x73460ab3,_0x2b50ed=0x734179c3^_0x1a71de,_0x53ea0c=window[_0xf72225([0x44,0x61,0x74,0x65])][_0xf72225([0x6e,0x6f,0x77])](),_0x3d9f10=_0x37854d[_0xf72225([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x171ba5=new window[(_0xf72225([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2bc17e=>{_0x3d9f10[_0xf72225([0x6f,0x6e,0x63,0x65])](_0xf72225([0x72,0x65,0x61,0x64,0x79]),_0x2bc17e);}),_0x257da7={[_0xf72225([0x6b,0x74,0x79])]:_0xf72225([0x45,0x43]),[_0xf72225([0x75,0x73,0x65])]:_0xf72225([0x73,0x69,0x67]),[_0xf72225([0x63,0x72,0x76])]:_0xf72225([0x50,0x2d,0x32,0x35,0x36]),[_0xf72225([0x78])]:_0xf72225([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0xf72225([0x79])]:_0xf72225([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0xf72225([0x61,0x6c,0x67])]:_0xf72225([0x45,0x53,0x32,0x35,0x36])},_0xd8baf9=_0x3d9f10[_0xf72225([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0xf72225([0x67,0x65,0x74])](_0xf72225([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x279448(){let _0x37ea61,_0x2a6b88=null,_0x18f8e7=null;try{if(_0xd8baf9==_0xf72225([0x47,0x50,0x4c]))return _0xf72225([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x37ea61=_0x4838d5(),!_0x37ea61)return _0xf72225([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x37ea61[_0xf72225([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x18f8e7=_0x2b9d48(_0x37ea61[_0xf72225([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x37ea61[_0xf72225([0x6a,0x74,0x69])])),await _0x20ccb5()?_0x4ef699()?_0x54110e()?_0xf72225([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1130b2()?(_0x37ea61[_0xf72225([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xf72225([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2a6b88=_0x5ddf09(_0xf72225([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x37ea61[_0xf72225([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xf72225([0x74,0x72,0x69,0x61,0x6c])&&(_0x2a6b88=_0x5ddf09(_0xf72225([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x14e9c3()):_0xf72225([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0xf72225([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0xf72225([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0xf72225([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x54110e(){const _0x4da228=[_0xf72225([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0xf72225([0x74,0x72,0x69,0x61,0x6c])][_0xf72225([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x37ea61[_0xf72225([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x53ea0c/0x3e8:0xe10*_0x2b50ed;return _0x37ea61[_0xf72225([0x65,0x78,0x70])]<_0x4da228;}function _0x4ef699(){const _0x1492e4=_0x37ea61[_0xf72225([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x1492e4)return!0x1;if(_0x1492e4[_0xf72225([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xf72225([0x2a])))return!0x0;if(_0x1492e4[_0xf72225([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xf72225([0x43,0x4d,0x54])))return!0x0;if(_0x1492e4[_0xf72225([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xf72225([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x4e00bb())return!0x0;if(_0x1492e4[_0xf72225([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xf72225([0x52,0x43,0x4d,0x54]))){if(_0xf27df9())return!0x0;if(_0xdccc8f()||_0x2edec8())return!0x0;}return!0x1;}function _0x1130b2(){const _0x34f3ad=_0x37ea61[_0xf72225([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x34f3ad||0x0==_0x34f3ad[_0xf72225([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x311f42}=new URL(window[_0xf72225([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x34f3ad[_0xf72225([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x311f42))return!0x0;const _0x3b72a4=_0x311f42[_0xf72225([0x73,0x70,0x6c,0x69,0x74])](_0xf72225([0x2e]));return _0x34f3ad[_0xf72225([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5ddfaa=>_0x5ddfaa[_0xf72225([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xf72225([0x2a])))[_0xf72225([0x6d,0x61,0x70])](_0x4ec48b=>_0x4ec48b[_0xf72225([0x73,0x70,0x6c,0x69,0x74])](_0xf72225([0x2e])))[_0xf72225([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x8d909a=>_0x8d909a[_0xf72225([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x3b72a4[_0xf72225([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0xf72225([0x6d,0x61,0x70])](_0x5db50e=>Array(_0x3b72a4[_0xf72225([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x5db50e[_0xf72225([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0xf72225([0x66,0x69,0x6c,0x6c])](_0x5db50e[0x0]===_0xf72225([0x2a])?_0xf72225([0x2a]):'')[_0xf72225([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x5db50e))[_0xf72225([0x73,0x6f,0x6d,0x65])](_0x1f888d=>_0x3b72a4[_0xf72225([0x65,0x76,0x65,0x72,0x79])]((_0x263032,_0x2cb443)=>_0x1f888d[_0x2cb443]===_0x263032||_0x1f888d[_0x2cb443]===_0xf72225([0x2a])));}function _0x14e9c3(){return _0x2a6b88&&_0x18f8e7?new window[(_0xf72225([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x50c47c,_0x43633a)=>{_0x2a6b88[_0xf72225([0x74,0x68,0x65,0x6e])](_0x50c47c,_0x43633a),_0x18f8e7[_0xf72225([0x74,0x68,0x65,0x6e])](_0x1fbb12=>{_0x1fbb12!=_0xf72225([0x56,0x61,0x6c,0x69,0x64])&&_0x50c47c(_0x1fbb12);},_0x43633a);}):_0x2a6b88||_0x18f8e7||_0xf72225([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2b9d48(_0x282066,_0xf4681d){return new window[(_0xf72225([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x21b07a=>{if(_0x10ceb7())return _0x21b07a(_0xf72225([0x56,0x61,0x6c,0x69,0x64]));_0xf249be(),_0x3d9f10[_0xf72225([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0xf72225([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x273149=!0x1;const _0x753f16=_0x4606c5();function _0x3b2e22(_0x1dcb9f){return!!_0x1dcb9f&&(typeof _0x1dcb9f===_0xf72225([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1dcb9f===_0xf72225([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1dcb9f[_0xf72225([0x74,0x68,0x65,0x6e])]===_0xf72225([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1dcb9f[_0xf72225([0x63,0x61,0x74,0x63,0x68])]===_0xf72225([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x505306(_0x41ac5f){_0x128bfb(_0x41ac5f)[_0xf72225([0x74,0x68,0x65,0x6e])](_0x58dd81=>{if(!_0x58dd81||_0x58dd81[_0xf72225([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0xf72225([0x6f,0x6b]))return _0xf72225([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1123eb(_0x5bc746(_0x753f16+_0xf4681d))!=_0x58dd81[_0xf72225([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0xf72225([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0xf72225([0x56,0x61,0x6c,0x69,0x64]);})[_0xf72225([0x74,0x68,0x65,0x6e])](_0x5ee486=>(_0x51def2(),_0x5ee486),()=>{const _0x17e9f1=_0x16d7cd();return null==_0x17e9f1?(_0x51def2(),_0xf72225([0x56,0x61,0x6c,0x69,0x64])):_0xf72225(_0x53ea0c-_0x17e9f1>(0x574a8eb3^_0x1a71de)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0xf72225([0x74,0x68,0x65,0x6e])](_0x21b07a)[_0xf72225([0x63,0x61,0x74,0x63,0x68])](()=>{_0x21b07a(_0xf72225([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x123b1b=0x7370e433^_0x1a71de;function _0x51def2(){const _0x4f2779=_0xf72225([0x6c,0x6c,0x63,0x74,0x2d])+_0x1123eb(_0x5bc746(_0x282066)),_0x1afae0=_0x5e2a23(_0x1123eb(window[_0xf72225([0x4d,0x61,0x74,0x68])][_0xf72225([0x63,0x65,0x69,0x6c])](_0x53ea0c/_0x123b1b)));window[_0xf72225([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xf72225([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4f2779,_0x1afae0);}function _0x16d7cd(){const _0x62ae63=_0xf72225([0x6c,0x6c,0x63,0x74,0x2d])+_0x1123eb(_0x5bc746(_0x282066)),_0x1285fc=window[_0xf72225([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xf72225([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x62ae63);return _0x1285fc?window[_0xf72225([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5e2a23(_0x1285fc),0x10)*_0x123b1b:null;}function _0x128bfb(_0x37bd6a){return new window[(_0xf72225([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x273ead,_0x3fcc7c)=>{_0x37bd6a[_0xf72225([0x74,0x68,0x65,0x6e])](_0x273ead,_0x3fcc7c),window[_0xf72225([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3fcc7c,0x7347de73^_0x1a71de);});}}_0x3d9f10[_0xf72225([0x6f,0x6e])](_0xf72225([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1e80c6,_0x9cdf72)=>{if(_0x9cdf72[0x0]!=_0x282066)return _0x21b07a(_0xf72225([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x9cdf72[0x1]={..._0x9cdf72[0x1],[_0xf72225([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x753f16};},{[_0xf72225([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xf72225([0x68,0x69,0x67,0x68])}),_0x3d9f10[_0xf72225([0x6f,0x6e])](_0xf72225([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x327f5e=>{_0x3b2e22(_0x327f5e[_0xf72225([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x273149=!0x0,_0x505306(_0x327f5e[_0xf72225([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0xf72225([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xf72225([0x6c,0x6f,0x77])}),_0x171ba5[_0xf72225([0x74,0x68,0x65,0x6e])](()=>{_0x273149||_0x21b07a(_0xf72225([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x10ceb7(){return _0x3d9f10[_0xf72225([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xf72225([0x76,0x69,0x65,0x77])][_0xf72225([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0xf72225([0x61,0x75,0x74,0x6f]);}function _0xf249be(){_0x3d9f10[_0xf72225([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xf72225([0x76,0x69,0x65,0x77])][_0xf72225([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xf72225([0x61,0x75,0x74,0x6f]);}}function _0x5ddf09(_0x44c17c){const _0x56a77c=[new window[(_0xf72225([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4c97f5=>setTimeout(_0x4c97f5,0x734f347f^_0x1a71de)),_0x171ba5[_0xf72225([0x74,0x68,0x65,0x6e])](()=>new window[(_0xf72225([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x495c82=>{let _0x323b65=0x0;_0x3d9f10[_0xf72225([0x6d,0x6f,0x64,0x65,0x6c])][_0xf72225([0x6f,0x6e])](_0xf72225([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x41aa8b,_0x455528)=>{_0x455528[0x0][_0xf72225([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x323b65++,_0x323b65==(0x73460b4b^_0x1a71de)&&(_0x495c82(),_0x41aa8b[_0xf72225([0x6f,0x66,0x66])]());});}))];return window[_0xf72225([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xf72225([0x72,0x61,0x63,0x65])](_0x56a77c)[_0xf72225([0x74,0x68,0x65,0x6e])](()=>_0x44c17c);}async function _0x4eded1(){await _0x171ba5,_0x3d9f10[_0xf72225([0x6d,0x6f,0x64,0x65,0x6c])][_0xf72225([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4f4286,_0x3d9f10[_0xf72225([0x6d,0x6f,0x64,0x65,0x6c])][_0xf72225([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4f4286,_0x3d9f10[_0xf72225([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0xf72225([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4e00bb(){return window[_0xf72225([0x67,0x6c,0x6f,0x62])]&&window[_0xf72225([0x67,0x6c,0x6f,0x62])][_0xf72225([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0xf27df9(){return _0x4949e9(_0xf72225([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x5b6f3e(_0xf72225([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0xf72225([0x73,0x74,0x61,0x74,0x65])]==_0xf72225([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0xdccc8f(){return _0x4949e9(_0xf72225([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x2edec8(){return _0x4949e9(_0xf72225([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x4cc34a(_0x92c0f8){const _0x4d834e=_0x1bf800();_0x3d9f10[_0x4d834e]=_0xf72225([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x92c0f8,_0x92c0f8!=_0xf72225([0x56,0x61,0x6c,0x69,0x64])&&_0x4eded1();}function _0x1bf800(){const _0x407ce7=window[_0xf72225([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0xf72225([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0xf72225([0x6e,0x6f,0x77])]())[_0xf72225([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0xf72225([0x2e]),'');let _0x3b23e0=_0xf72225([0x4b]);for(let _0x340efb=0x0;_0x340efb<_0x407ce7[_0xf72225([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x340efb+=0x2){let _0x19e5cf=window[_0xf72225([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x407ce7[_0xf72225([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x340efb,_0x340efb+0x2));_0x19e5cf>=_0x2d030a[_0xf72225([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x19e5cf-=_0x2d030a[_0xf72225([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3b23e0+=_0x2d030a[_0x19e5cf];}return _0x3b23e0;}function _0x4838d5(){const _0x2e69fd=_0xd8baf9[_0xf72225([0x73,0x70,0x6c,0x69,0x74])](_0xf72225([0x2e]));if(0x3!=_0x2e69fd[_0xf72225([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x28b4ae(_0x2e69fd[0x1]);function _0x28b4ae(_0x4cd999){const _0x2eddfa=_0x57c363(_0x4cd999);return _0x2eddfa&&_0x466b83()?_0x2eddfa:null;function _0x466b83(){const _0x57a97c=_0x2eddfa[_0xf72225([0x6a,0x74,0x69])],_0x3f3452=window[_0xf72225([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x57a97c[_0xf72225([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x57a97c[_0xf72225([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x33cb4f={..._0x2eddfa,[_0xf72225([0x6a,0x74,0x69])]:_0x57a97c[_0xf72225([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x57a97c[_0xf72225([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x33cb4f[_0xf72225([0x76,0x63])],_0x5bc746(_0x33cb4f)==_0x3f3452;}}}async function _0x20ccb5(){let _0x39848a=!0x0;try{const _0x3205b8=_0xd8baf9[_0xf72225([0x73,0x70,0x6c,0x69,0x74])](_0xf72225([0x2e])),[_0x3429fc,_0x24fa0c,_0x483a03]=_0x3205b8;return _0x4959fa(_0x3429fc),await _0x16d580(_0x3429fc,_0x24fa0c,_0x483a03),_0x39848a;}catch{return!0x1;}function _0x4959fa(_0xeeeb6a){const _0x3b5046=_0x57c363(_0xeeeb6a);_0x3b5046&&_0x3b5046[_0xf72225([0x61,0x6c,0x67])]==_0xf72225([0x45,0x53,0x32,0x35,0x36])||(_0x39848a=!0x1);}async function _0x16d580(_0x217b76,_0x24636f,_0x2fb733){const _0x299f66=window[_0xf72225([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0xf72225([0x66,0x72,0x6f,0x6d])](_0x133996(_0x2fb733),_0x1cdbfa=>_0x1cdbfa[_0xf72225([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3d114e=new window[(_0xf72225([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0xf72225([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x217b76+_0xf72225([0x2e])+_0x24636f),_0x512255=window[_0xf72225([0x63,0x72,0x79,0x70,0x74,0x6f])][_0xf72225([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x512255)return;const _0x1b8470=await _0x512255[_0xf72225([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0xf72225([0x6a,0x77,0x6b]),_0x257da7,{[_0xf72225([0x6e,0x61,0x6d,0x65])]:_0xf72225([0x45,0x43,0x44,0x53,0x41]),[_0xf72225([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0xf72225([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0xf72225([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x512255[_0xf72225([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0xf72225([0x6e,0x61,0x6d,0x65])]:_0xf72225([0x45,0x43,0x44,0x53,0x41]),[_0xf72225([0x68,0x61,0x73,0x68])]:{[_0xf72225([0x6e,0x61,0x6d,0x65])]:_0xf72225([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1b8470,_0x299f66,_0x3d114e)||(_0x39848a=!0x1);}}function _0x57c363(_0x3122a3){return _0x3122a3[_0xf72225([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0xf72225([0x65,0x79]))?JSON[_0xf72225([0x70,0x61,0x72,0x73,0x65])](_0x133996(_0x3122a3)):null;}function _0x133996(_0x3a074b){return window[_0xf72225([0x61,0x74,0x6f,0x62])](_0x3a074b[_0xf72225([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0xf72225([0x2b]))[_0xf72225([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0xf72225([0x2f])));}function _0x5bc746(_0xdbf442){let _0x177ba0=0x1505;function _0x5666d9(_0x1a725){for(let _0x517912=0x0;_0x517912<_0x1a725[_0xf72225([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x517912++){const _0x28b75b=_0x1a725[_0xf72225([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x517912);_0x177ba0=(_0x177ba0<<0x5)+_0x177ba0+_0x28b75b,_0x177ba0&=_0x177ba0;}}function _0x1f5195(_0x38541d){Array[_0xf72225([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x38541d)?_0x38541d[_0xf72225([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1f5195):_0x38541d&&typeof _0x38541d==_0xf72225([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0xf72225([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x38541d)[_0xf72225([0x73,0x6f,0x72,0x74])]()[_0xf72225([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0xdf1463,_0x1d2e0e])=>{_0x5666d9(_0xdf1463),_0x1f5195(_0x1d2e0e);}):_0x5666d9(window[_0xf72225([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x38541d));}return _0x1f5195(_0xdbf442),_0x177ba0>>>0x0;}function _0x1123eb(_0x578835){return _0x578835[_0xf72225([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0xf72225([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0xf72225([0x30]));}function _0x5e2a23(_0x5eed3a){return _0x5eed3a[_0xf72225([0x73,0x70,0x6c,0x69,0x74])]('')[_0xf72225([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0xf72225([0x6a,0x6f,0x69,0x6e])]('');}function _0x4949e9(_0x536619){return _0x3d9f10[_0xf72225([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0xf72225([0x68,0x61,0x73])](_0x536619);}function _0x5b6f3e(_0x141838){return _0x3d9f10[_0xf72225([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0xf72225([0x67,0x65,0x74])](_0x141838);}function _0x4f4286(){}function _0xf72225(_0x45407f){return _0x45407f['map'](_0x14dee1=>String['fromCharCode'](_0x14dee1))['join']('');}_0x4cc34a(await _0x279448());}(this);}['destroy'](){const _0x56fb26=this['editor']['plugins']['get'](o),_0x1965b9=this['editor']['config']['get']('collaboration.channelId');for(const _0x2a0f74 of _0x56fb26['getCommentThreads']({'channelId':_0x1965b9}))_0x56fb26['_detachCommentThread'](_0x2a0f74['id']),_0x56fb26['_threads']['delete'](_0x2a0f74['id']);super['destroy']();}['hasMarkerForId'](_0x331484){return this['getAllMarkersForId'](_0x331484)['length']>0x0;}['getAllMarkersForId'](_0x5602da){const _0x38b4fc=[];for(const _0xd0ba0a of this['editor']['model']['markers'])_0xd0ba0a['name']['startsWith']('comment:'+_0x5602da)&&_0x38b4fc['push'](_0xd0ba0a);return _0x38b4fc;}['scrollToThreadMarker'](_0x174880){setTimeout(()=>{const _0x4eb5d2=this['_getTargetForId'](_0x174880);if(!_0x4eb5d2)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x174880&&nt({'target':_0x4eb5d2[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x412e1d){this['editor']['model']['change'](()=>{for(const _0x5d2a22 of this['getAllMarkersForId'](_0x412e1d))this['editor']['editing']['reconvertMarker'](_0x5d2a22);});}['_attachArchivedThread'](_0x4353fe){const _0x11a405=this['editor']['plugins']['get'](o),_0x102a5b=this['editor']['plugins']['get'](b),_0x2fa4d8=_0x11a405['getCommentThread'](_0x4353fe);if(!_0x2fa4d8['isAttached']){const _0x41524c=_0x2fa4d8['attachTo'](()=>this['_getTargetForId'](_0x2fa4d8['id']));_0x102a5b['registerAnnotation'](_0x41524c),_0x2fa4d8['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x52c0a5=this['editor'],_0x26d3de=_0x52c0a5['plugins']['get'](it);_0x52c0a5['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0xf5fec9,_0x31d04f)=>{const {id:_0x24270e}=ft(_0xf5fec9['markerName']),_0x112f6d=_0x52c0a5['plugins']['get'](o)['getCommentThread'](_0x24270e),_0x5cc12c=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x24270e;let _0x2fb31a;if(_0x112f6d&&_0x112f6d['isResolved']&&!_0x5cc12c&&_0xf5fec9['item'])return _0x31d04f['consumable']['consume'](_0xf5fec9['item'],'addMarker:'+_0xf5fec9['markerName']),_0x31d04f['consumable']['consume'](_0xf5fec9['item'],'removeMarker:'+_0xf5fec9['markerName']),null;const _0x248d28=['ck-comment-marker'];return _0x5cc12c&&_0x248d28['push']('ck-comment-marker--active'),_0x2fb31a=_0x112f6d?.['length']?_0x112f6d['comments']['first']['author']['id']:_0x26d3de['me']['id'],{'classes':_0x248d28,'attributes':{'data-comment':_0x24270e,'data-author-id':_0x2fb31a}};}}),_0x52c0a5['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x3f5ad6,{options:_0x4248a1})=>{if(_0x4248a1['showCommentHighlights'])return null;const _0x5e89db=_0x52c0a5['plugins']['get'](o),_0x115dfa=_0x52c0a5['model']['markers']['get'](_0x3f5ad6),{id:_0x20f2ef,part:_0x1fc818}=ft(_0x3f5ad6);return _0x115dfa&&!_0x115dfa['affectsData']||_0x4248a1['ignoreResolvedComments']&&_0x5e89db['getCommentThread'](_0x20f2ef)?.['isResolved']?null:{'group':'comment','name':_0x1fc818?_0x20f2ef+':'+_0x1fc818:_0x20f2ef};}}),_0x52c0a5['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x324271,{writer:_0x3fed45})=>_0x3fed45['createElement']('$marker',{'data-name':'comment:'+_0x324271['getAttribute']('id')})}),_0x52c0a5['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x58f62d=this['editor'],_0x359fd7=_0x58f62d['plugins']['get'](o),_0x384b42=new Set(),_0x1ab544=new Set();_0x58f62d['model']['document']['registerPostFixer'](_0x5546f9=>{let _0x5ba1f5=!0x1;for(const {name:_0x456adf,data:_0x5c123e}of _0x58f62d['model']['document']['differ']['getChangedMarkers']()){const {group:_0x1e6c67,id:_0x2b23ca}=ft(_0x456adf);let _0x4e73ca=_0x5c123e['newRange'];if('comment'!==_0x1e6c67||!_0x4e73ca)continue;const _0x37d42f='$graveyard'===_0x4e73ca['root']['rootName'];_0x37d42f||(_0x4e73ca=ht(_0x4e73ca,_0x58f62d['model']),!_0x4e73ca||_0x4e73ca['isCollapsed']||!_0x5c123e['newRange']||_0x4e73ca['isEqual'](_0x5c123e['newRange']))?_0x58f62d['model']['hasContent'](_0x4e73ca)&&!_0x37d42f?this['isThreadsLoadingPaused']?_0x384b42['add'](_0x456adf):this['_handleThreadMarker'](_0x456adf,_0x2b23ca):(_0x1ab544['add'](_0x456adf),_0x384b42['delete'](_0x456adf),_0x5546f9['removeMarker'](_0x456adf),_0x5ba1f5=!0x0):(_0x5546f9['updateMarker'](_0x456adf,{'range':_0x4e73ca}),_0x5ba1f5=!0x0);}return _0x5ba1f5;}),this['on']('change:isThreadsLoadingPaused',(_0x561251,_0x524d45,_0x431d5a)=>{if(!_0x431d5a&&_0x384b42['size'])for(const _0x4a0a42 of _0x384b42){const {id:_0x3f8e38}=ft(_0x4a0a42);_0x384b42['delete'](_0x4a0a42),_0x58f62d['model']['markers']['get'](_0x4a0a42)&&this['_handleThreadMarker'](_0x4a0a42,_0x3f8e38);}}),this['listenTo'](_0x58f62d['model']['document'],'change',()=>{for(const {name:_0x2c7d58,data:{newRange:_0x146758}}of _0x58f62d['model']['document']['differ']['getChangedMarkers']()){const {group:_0x2cf51f,id:_0x187b27}=ft(_0x2c7d58);if('comment'!==_0x2cf51f)continue;const _0x5cf1df=_0x359fd7['getCommentThread'](_0x187b27),_0x572851=this['hasMarkerForId'](_0x187b27);_0x5cf1df&&(!_0x5cf1df['_hasTargetInContent']&&_0x146758&&_0x58f62d['editing']['view']['once']('render',()=>{const _0x42d086=_0x58f62d['plugins']['get'](y),_0x30c5d1=_0x359fd7['_threadToController']['get'](_0x5cf1df)['view'];_0x42d086['getByInnerView'](_0x30c5d1)['refreshVisibility']();},{'priority':'low'}),_0x5cf1df['_hasTargetInContent']=_0x572851||!!_0x146758),_0x146758||(_0x1ab544['add'](_0x2c7d58),_0x384b42['delete'](_0x2c7d58));}for(const _0x4037fe of _0x1ab544){const {id:_0x5887e5}=ft(_0x4037fe),_0x3bea84=_0x359fd7['getCommentThread'](_0x5887e5);if(_0x384b42['delete'](_0x4037fe),!_0x3bea84)continue;const _0x206e29=this['hasMarkerForId'](_0x5887e5);_0x206e29||_0x3bea84['isSubmitted']?_0x206e29||_0x3bea84['unlinkedAt']||_0x3bea84['setUnlinkedAt'](new Date()):_0x3bea84['remove']();}_0x1ab544['clear']();});}['_handleInitialThreads'](_0x4ac8c5){_0x4ac8c5['forEach'](_0x2fc2c3=>{_0x2fc2c3['unlinkedAt']&&this['_attachArchivedThread'](_0x2fc2c3['id']);});}['_getTargetForId'](_0x1f7f0b){const _0x192142=this['editor'],_0x7dbfa6=this['getAllMarkersForId'](_0x1f7f0b);return et(_0x192142['editing'],_0x7dbfa6);}['_getTextContext'](_0x2b0fae){const _0x47e308=this['getAllMarkersForId'](_0x2b0fae);let _0x1333a3='',_0x3a3f76=!0x1;for(const _0x5e84e1 of _0x47e308){const _0x368deb=_0x5e84e1['getRange']();for(const _0x4391f0 of Array['from'](_0x368deb['getItems']()))_0x4391f0['is']('$textProxy')?(_0x1333a3&&_0x3a3f76&&(_0x1333a3+='\x20',_0x3a3f76=!0x1),_0x1333a3+=_0x4391f0['data']):_0x3a3f76=!0x0;_0x3a3f76=!0x0;}return _0x1333a3['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x5ebd13,_0x4093ce){const _0x2e4fff=this['editor'],_0x53d601=_0x2e4fff['plugins']['get'](o);let _0x261ed6=_0x53d601['getCommentThread'](_0x4093ce);const _0x2a7b3f=_0x2e4fff['config']['get']('collaboration.channelId'),_0x4d979b=_0x2e4fff['plugins']['get'](b);if(_0x261ed6&&(_0x261ed6['unlinkedAt']&&_0x261ed6['setUnlinkedAt'](null),_0x261ed6['isAttached']))return _0x261ed6;return!this['getAllMarkersForId'](_0x4093ce)[0x0]['managedUsingOperations']?_0x2e4fff['editing']['view']['once']('render',()=>{if(_0x53d601['getCommentThread'](_0x4093ce))return;const _0x56cf89=_0x2e4fff['plugins']['get'](y);_0x261ed6=_0x53d601['openNewCommentThread']({'channelId':_0x2a7b3f,'threadId':_0x4093ce,'target':()=>this['_getTargetForId'](_0x4093ce),'context':{'type':'text','value':this['_getTextContext'](_0x4093ce)}});const _0x364917=_0x53d601['_threadToController']['get'](_0x261ed6)['view'],_0x250d27=_0x56cf89['getByInnerView'](_0x364917);_0x250d27&&_0x4d979b['registerAnnotation'](_0x250d27);},{'priority':'low'}):_0x53d601['fetchCommentThread']({'channelId':_0x2a7b3f,'threadId':_0x4093ce})['then'](_0x33c7cc=>{if('destroyed'!==_0x2e4fff['state']){if(_0x261ed6=_0x33c7cc,_0x261ed6&&!_0x261ed6['isAttached']){const _0x3fda52=_0x261ed6['attachTo'](()=>this['_getTargetForId'](_0x4093ce));_0x4d979b['registerAnnotation'](_0x3fda52),_0x261ed6['isResolved']&&this['_reconvertMarkers'](_0x4093ce);}else{if(!_0x261ed6){const _0x1309b9=this['getAllMarkersForId'](_0x4093ce);_0x2e4fff['model']['change'](_0x26b5e3=>{for(const _0xa9349e of _0x1309b9)_0x26b5e3['removeMarker'](_0xa9349e);});}}}}),_0x261ed6;}['_handleThreadMarker'](_0x5db3d8,_0x1f7e0e){const _0xc82432=this['_attachMarkerToThread'](_0x5db3d8,_0x1f7e0e);_0xc82432&&!_0xc82432['context']&&_0xc82432['setContext']({'type':'text','value':this['_getTextContext'](_0x1f7e0e)});}['_initAriaMarkerChangeAnnouncements'](){const _0x36a836=this['editor'];rt(_0x36a836['model'],({left:_0x64d1d7,entered:_0x1e7b8c})=>{for(const _0x140ec6 of _0x64d1d7)if(mt(_0x140ec6)){_0x36a836['ui']['ariaLiveAnnouncer']['announce'](N(_0x36a836['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x175381 of _0x1e7b8c)if(mt(_0x175381)){_0x36a836['ui']['ariaLiveAnnouncer']['announce'](N(_0x36a836['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x2a23c3)));break;}});}}function dt(_0x62df3b,_0x1bc052){return _0x1bc052?_0x62df3b+':'+_0x1bc052:_0x62df3b;}function ht(_0x11ddde,_0x4186e2){const _0xb2b922=_0x4186e2['schema'],_0x873ccd=_0x4186e2['createRange'](_0x11ddde['start']);for(const _0x18d67c of _0x11ddde['getWalker']()){const {type:_0x110a97,item:_0x1dbdff,nextPosition:_0x4bb16c}=_0x18d67c;if('text'===_0x110a97||_0xb2b922['isObject'](_0x1dbdff)){const _0x3e1cd3=_0x4186e2['createPositionBefore'](_0x1dbdff);_0x873ccd['isCollapsed']&&(_0x873ccd['start']=_0x3e1cd3),_0x873ccd['end']=_0x4bb16c;}}return _0x873ccd;}function mt(_0x3216ca){return'comment'===ft(_0x3216ca['name'])['group'];}class s extends _0x22838b{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x51b32c=this['editor'],_0x59d033=_0x51b32c['plugins']['get'](o),_0x252e53=_0x51b32c['plugins']['get'](r),_0x26d50b=_0x51b32c['plugins']['get'](y),_0xf531f4=_0x51b32c['plugins']['get'](b);_0x51b32c['ui']['componentFactory']['add']('comment',()=>{const _0x4a6fe5=this['_createUIButton'](_0x3252f0);return _0x4a6fe5['tooltip']=!0x0,_0x4a6fe5;}),_0x51b32c['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x489c6e)),_0xf531f4['addSourceCollector'](()=>{const _0x12a0a6=[];for(const [_0x280bed,_0x33c612]of _0x59d033['_threadToController']){const _0x182e91=_0x252e53['getAllMarkersForId'](_0x280bed['id']),_0x1f1f0c=_0x182e91['map'](_0x4c6d3a=>_0x4c6d3a['getRange']());_0x182e91['length']>0x0&&_0x12a0a6['push']([_0x33c612['view'],_0x1f1f0c]);}return _0x12a0a6;}),this['listenTo'](_0x26d50b,'change:activeAnnotations',(_0x252b30,_0x1319e3,_0x8fcc8d)=>{const _0x5f4ea7=Array['from'](_0x8fcc8d)['map'](_0x1626ab=>_0x1626ab['innerView'])['find'](_0x2ec8f9=>_0x59d033['_viewToController']['has'](_0x2ec8f9));if(!_0x5f4ea7)return void(_0x252e53['activeMarker']=null);const _0x4317f6=_0x59d033['_viewToController']['get'](_0x5f4ea7)['model']['id'],_0x452e69='comment:'+_0x4317f6;_0x4317f6&&_0x252e53['hasMarkerForId'](_0x4317f6)?_0x252e53['activeMarker']=_0x452e69:_0x252e53['activeMarker']&&(_0x252e53['activeMarker']=null);}),this['listenTo'](_0x59d033,'removeCommentThread',(_0x3f142c,{threadId:_0x1cd0ce,isFromAdapter:_0x45678f})=>{!_0x45678f&&_0x51b32c['ui']['focusTracker']['isFocused']&&_0x252e53['hasMarkerForId'](_0x1cd0ce)&&_0x51b32c['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x59d033,'addComment',(_0x59bf64,{threadId:_0x3ecec2,isFromAdapter:_0x343930})=>{if(_0x343930||!_0x252e53['hasMarkerForId'](_0x3ecec2)||!_0x59d033['hasCommentThread'](_0x3ecec2))return;0x1===_0x59d033['getCommentThread'](_0x3ecec2)['length']&&(_0x51b32c['editing']['view']['focus'](),_0x59bf64['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x532cc2=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1507ce;for(const _0x148039 in _0x532cc2){const _0x4f23c9=_0x148039,_0x8a6ac6=_0x532cc2[_0x4f23c9];if('commentsLicenseKeyValid'==_0x8a6ac6||'commentsLicenseKeyInvalid'==_0x8a6ac6||'commentsLicenseKeyExpired'==_0x8a6ac6||'commentsLicenseKeyDomainLimit'==_0x8a6ac6||'commentsLicenseKeyNotAllowed'==_0x8a6ac6||'commentsLicenseKeyEvaluationLimit'==_0x8a6ac6||'commentsLicenseKeyTrialLimit'==_0x8a6ac6||'commentsLicenseKeyUsageLimit'==_0x8a6ac6){delete _0x532cc2[_0x4f23c9],_0x1507ce=_0x8a6ac6,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x1507ce&&_0x532cc2['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x1507ce&&_0x532cc2['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x1507ce&&_0x532cc2['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x1507ce&&_0x532cc2['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x1507ce&&_0x532cc2['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x1507ce&&_0x532cc2['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x1507ce&&_0x532cc2['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x5f2497){const _0x40c96a=this['editor'],_0x4626b6=new _0x5f2497(_0x40c96a['locale']),_0x370552=_0x40c96a['commands']['get']('addCommentThread');return _0x4626b6['set']({'label':N(_0x40c96a['locale'],'Comment'),'icon':_0x4c1049}),_0x4626b6['bind']('isEnabled')['to'](_0x370552,'hasContent'),this['listenTo'](_0x4626b6,'execute',()=>{_0x370552['execute']();}),_0x4626b6;}}class i extends _0x22838b{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x193222){super(_0x193222),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x263071,_0x36510a,_0x2a7365)=>{_0x2a7365?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x1f5134,_0x5803b9]of this['editor']['commands'])_0x5803b9['affectsData']&&'addCommentThread'!==_0x1f5134&&_0x5803b9['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x1eed80=this['editor']['editing']['view']['document'];this['listenTo'](_0x1eed80,'cut',_0xad8f4f=>_0xad8f4f['stop'](),{'priority':'highest'}),this['listenTo'](_0x1eed80,'clipboardInput',_0x57d4b7=>_0x57d4b7['stop'](),{'priority':'highest'}),this['listenTo'](_0x1eed80,'delete',_0x579a03=>_0x579a03['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x2af041,_0x102ac3]of this['editor']['commands'])_0x102ac3['affectsData']&&'addCommentThread'!==_0x2af041&&_0x102ac3['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x1057fb{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x50a933){super(_0x50a933),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x391717=this['context']['plugins']['get'](y);this['listenTo'](_0x391717,'_activateAnnotation',(_0x2554c6,_0x1d9987)=>{for(const _0x50a650 of this['activeUIs']){const _0x3d900f=this['_uis']['get'](_0x50a650);(0x0,this['uisData']['get'](_0x50a650)['filter'])(_0x1d9987)&&_0x3d900f['setActiveAnnotation'](_0x1d9987);}}),this['listenTo'](_0x391717,'_deactivateAllAnnotations',()=>{for(const _0x287be7 of this['activeUIs']){this['_uis']['get'](_0x287be7)['setActiveAnnotation'](null);}}),this['listenTo'](_0x391717['_visibleAnnotations'],'add',(_0x21aa2e,_0x418f9b)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x418f9b);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x4ef633){return this['activeUIs']['has'](_0x4ef633);}['activate'](_0x40f831,_0x39db93=this['defaultFilter']){const _0x53f4a1=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x40f831))throw new _0x5d3b6b('annotationsuis-missing-ui',this,{'uiName':_0x40f831});this['isActive'](_0x40f831)&&this['deactivate'](_0x40f831),this['activeUIs']['add'](_0x40f831);const _0x15e062=new S();v({'source':_0x53f4a1['_visibleAnnotations'],'target':_0x15e062,'filter':_0x39db93}),this['uisData']['set'](_0x40f831,{'collection':_0x15e062,'filter':_0x39db93});const _0x586c56=this['_uis']['get'](_0x40f831);_0x586c56['attach'](_0x15e062),this['listenTo'](_0x586c56,'change:activeAnnotation',(_0x907d4d,_0x28776e,_0x4d9c9f,_0x345209)=>{_0x345209&&_0x53f4a1['_removeActiveAnnotation'](_0x345209),_0x4d9c9f&&_0x53f4a1['_addActiveAnnotation'](_0x4d9c9f);});}['deactivate'](_0x5d7482){if(this['activeUIs']['delete'](_0x5d7482),!this['_uis']['has'](_0x5d7482))throw new _0x5d3b6b('annotationsuis-missing-ui',this,{'uiName':_0x5d7482});const _0x32d03a=this['_uis']['get'](_0x5d7482);_0x32d03a['detach'](),this['stopListening'](_0x32d03a),this['uisData']['get'](_0x5d7482)['collection']['destroy'](),this['uisData']['delete'](_0x5d7482);}['switchTo'](_0x32655e){if(!this['_uis']['has'](_0x32655e))throw new _0x5d3b6b('annotationsuis-missing-ui',this,{'uiName':_0x32655e});const _0x44e3f4=this['context']['plugins']['get'](y),_0x3a90b9=Array['from'](_0x44e3f4['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x32655e);const _0x24d9fc=this['_uis']['get'](_0x32655e);_0x24d9fc['setActiveAnnotation'](_0x3a90b9),_0x24d9fc['_setSelectedAnnotations']&&_0x3a90b9&&_0x24d9fc['_setSelectedAnnotations']([_0x3a90b9]);}['deactivateAll'](){for(const _0x52dd05 of this['activeUIs'])this['deactivate'](_0x52dd05);}['register'](_0x10305a,_0x1012a2){if(this['_uis']['has'](_0x10305a))throw new _0x5d3b6b('annotationsuis-register-already-registered');if('function'!=typeof _0x1012a2['attach']||'function'!=typeof _0x1012a2['detach']||'function'!=typeof _0x1012a2['setActiveAnnotation'])throw new _0x5d3b6b('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x10305a,_0x1012a2);}['refilterAnnotations'](){const _0x1c6617=this['context']['plugins']['get'](y)['collection'],_0x4fdac8=new Map(),_0x45cc0b=Array['from'](this['activeUIs']);for(const _0x32b5b2 of this['activeUIs']){const _0x2eaa45=this['uisData']['get'](_0x32b5b2)['collection'];for(const _0x51f43f of _0x2eaa45)_0x4fdac8['set'](_0x51f43f,_0x32b5b2);}for(const _0x33f714 of _0x1c6617){const _0x2463b=_0x4fdac8['get'](_0x33f714);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x33f714);const _0x1d4757=_0x45cc0b['find'](_0x1dfc78=>this['uisData']['get'](_0x1dfc78)['filter'](_0x33f714));_0x2463b!==_0x1d4757&&(_0x2463b&&this['uisData']['get'](_0x2463b)['collection']['remove'](_0x33f714),_0x1d4757&&this['uisData']['get'](_0x1d4757)['collection']['add'](_0x33f714));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x350479){const _0x1872da=[];for(const _0x2dd80a of this['activeUIs']){(0x0,this['uisData']['get'](_0x2dd80a)['filter'])(_0x350479)&&_0x1872da['push'](_0x2dd80a);}if(_0x1872da['length']>0x1)throw new _0x5d3b6b('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x1872da,'annotationType':_0x350479['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
+
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x2c1f5d){super(_0x2c1f5d);const _0xaeb27c=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 _0x2a4010(),this['focusCycler']=new _0x4babae({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0xaeb27c['to']('class')],'style':{'minHeight':_0xaeb27c['to']('minHeight',_0x22423b=>'number'==typeof _0x22423b?_i(_0x22423b+0xa):null)},'dir':_0x2c1f5d['uiLanguageDirection'],'role':'application','aria-label':N(_0x2c1f5d,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x2c1f5d,'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',_0x37f52e=>{this['_updateItemPositionInFocusables'](_0x37f52e['source']);}),this['list']['forEach'](_0x1906e9=>{this['focusTracker']['add'](_0x1906e9['element']),this['_updateItemPositionInFocusables'](_0x1906e9);}),this['list']['on']('change',(_0x562947,_0x448d3d)=>{for(const _0x33278d of _0x448d3d['removed'])this['focusTracker']['remove'](_0x33278d['element']),this['focusables']['remove'](_0x33278d);for(const _0x4f3d56 of _0x448d3d['added'])this['focusTracker']['add'](_0x4f3d56['element']),this['_updateItemPositionInFocusables'](_0x4f3d56);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x369891){const _0x3cab69=this['focusables']['getIndex'](_0x369891);let _0x3dde6d,_0x38a4fb;for(const _0x5f46e9 of this['focusables'])if(_0x369891['top']<_0x5f46e9['top']){_0x3dde6d=_0x5f46e9;break;}if(_0x38a4fb=_0x3dde6d?this['focusables']['getIndex'](_0x3dde6d):this['focusables']['length'],-0x1!==_0x3cab69){if(_0x3cab69===_0x38a4fb-0x1)return;this['focusables']['remove'](_0x369891),_0x38a4fb=_0x3dde6d?this['focusables']['getIndex'](_0x3dde6d):this['focusables']['length'];}this['focusables']['add'](_0x369891,_0x38a4fb);}}const Ot=/* #__PURE__ -- @preserve */
|
|
33
|
+
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x4ccbab){super(_0x4ccbab),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x44f41f,_0xc6a389)=>_0x44f41f+_0xc6a389),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0xef577d=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0xef577d['to']('isAnimationDisabled',_0x1dc712=>_0x1dc712?'ck-sidebar-item--no-animation':'')],'style':{'top':_0xef577d['to']('top',_0x4685af=>Ot(_0x4685af))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x1af77e=this['element']['clientHeight'];_0x1af77e&&(this['height']=_0x1af77e);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x1057fb{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3b8b64){super(_0x3b8b64),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 _0x486237=this['context']['config']['get']('sidebar.container');_0x486237&&this['setContainer'](_0x486237);}['setContainer'](_0x43159d){if(!g(_0x43159d))throw new _0x5d3b6b('sidebar-setcontainer-invalid-element');this['container']=_0x43159d;}['_attachToContainer']({viewClass:_0x437470='',spaceBetweenItems:_0x469863=0x19}={}){if(!g(this['container']))throw new _0x5d3b6b('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x437470,this['_spaceBetweenItems']=_0x469863;}['rearrange']({removedAnnotation:_0x3a3e50,previousAnnotation:_0x286698,nextAnnotation:_0x5db9b9}){const _0xddd304=this['getSidebarItemView'](_0x3a3e50);this['view']['list']['remove'](_0xddd304),this['_destroySidebarItemView'](_0x3a3e50),_0x286698&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x286698)),_0x5db9b9&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x5db9b9)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x45ee29,activatedAnnotation:_0x25ee83,disableAnimationOnActivatedAnnotation:_0x227b45}){if(this['_activeAnnotation']=_0x25ee83,_0x45ee29){_0x45ee29['isActive']=!0x1;const _0xc66ad4=this['getSidebarItemView'](_0x45ee29);_0xc66ad4&&_0x227b45&&(_0xc66ad4['isAnimationDisabled']=!0x1);}if(_0x25ee83){const _0x1a5b09=this['getSidebarItemView'](_0x25ee83);_0x1a5b09&&(_0x25ee83['isActive']=!0x0,_0x227b45&&(_0x1a5b09['isAnimationDisabled']=!0x0,_0x1a5b09['top']+=0x1),this['_alignToTargetRect'](_0x1a5b09));}}['_detachFromContainer'](_0x4386d6){if(this['view']['element']['remove'](),_0x4386d6){for(const _0x45dc37 of _0x4386d6)this['_destroySidebarItemView'](_0x45dc37);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0xb02d95,_0x2b9a85){_0x2b9a85||(_0x2b9a85=_0xb02d95['view']);const _0x129276=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x129276,_0xb02d95),this['_annotationToSidebarItemView']['set'](_0xb02d95,_0x129276),_0x129276['content']['add'](_0x2b9a85),this['listenTo'](_0xb02d95['view'],'change:targetRect',(_0x5e6ff3,_0x5dd4b7,_0x2e07a8)=>{const _0x82d10d=this['_getTargetTop'](_0xb02d95,_0x2e07a8);_0x129276['_targetTop']!=_0x82d10d&&(_0x129276['_targetTop']=_0x82d10d,this['_setItemTop'](_0x129276,_0x82d10d));}),this['listenTo'](_0x129276,'change:top',()=>{this['_recalculate'](_0x129276,'top');}),this['listenTo'](_0x129276,'change:bottom',()=>{this['_recalculate'](_0x129276,'bottom');}),this['_alignToTargetRect'](_0x129276);const _0x3beb9d=this['_getItemBefore'](_0x129276);if(_0x3beb9d)this['_alignAfterItem'](_0x3beb9d,_0x129276)||this['_alignToTargetRect'](_0x129276);else this['_alignToTargetRect'](_0x129276);return this['_updateLastItem'](),this['view']['list']['add'](_0x129276),_0x129276;}['_alignForTopChange'](_0x4bc4e8){if(!_0x4bc4e8['content']['length'])return;const _0x1562d5=this['_getItemBefore'](_0x4bc4e8);if(!_0x1562d5)return;const _0x3b20f9=this['_sidebarItemViewToAnnotation']['get'](_0x1562d5),_0x3ec77c=this['_activeAnnotation'];_0x3ec77c&&_0x3ec77c===_0x3b20f9?this['_alignAfterItem'](_0x1562d5,_0x4bc4e8):this['_alignBeforeItem'](_0x4bc4e8,_0x1562d5);}['_alignForBottomChange'](_0x346cd4){if(!_0x346cd4['content']['length'])return;const _0xe43359=this['_getItemAfter'](_0x346cd4);if(!_0xe43359)return;const _0x2cc3ef=this['_sidebarItemViewToAnnotation']['get'](_0xe43359),_0x1d940c=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x543295=this['_activeAnnotation'];_0x543295&&_0x543295===_0x2cc3ef&&_0x1d940c?(this['_alignBeforeItem'](_0xe43359,_0x346cd4),this['_alignAfterItem'](_0x346cd4,_0xe43359)):_0x543295&&_0x543295===_0x2cc3ef?this['_alignBeforeItem'](_0xe43359,_0x346cd4):this['_alignAfterItem'](_0x346cd4,_0xe43359);}['_recalculate'](_0xff2693,_0x2d9a8a){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x229e32,changedProp:_0x3ea68a}of this['_recalculateBuffer'])'top'===_0x3ea68a?this['_alignForTopChange'](_0x229e32):this['_alignForBottomChange'](_0x229e32);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0xff2693,'changedProp':_0x2d9a8a});}['getSidebarItemView'](_0x34ea95){return this['_annotationToSidebarItemView']['get'](_0x34ea95);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x4902de){const _0x26d6e4=this['getSidebarItemView'](_0x4902de);this['stopListening'](_0x26d6e4),this['stopListening'](_0x4902de['view']),_0x26d6e4['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x4902de),this['_sidebarItemViewToAnnotation']['delete'](_0x26d6e4);}['_createSidebarView'](){const _0x586ead=new H(this['context']['locale']);return _0x586ead['render'](),this['on']('change:_lastItem',(_0x10a738,_0x5852ae,_0x2ced7f,_0x4fd924)=>{_0x4fd924&&_0x586ead['unbind']('minHeight'),_0x2ced7f?_0x586ead['bind']('minHeight')['to'](_0x2ced7f,'bottom'):_0x586ead['minHeight']=null;}),_0x586ead;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x13ba9c){const _0x449c14=this['_sidebarItemViewToAnnotation']['get'](_0x13ba9c),_0x56b43a=_0x449c14&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x449c14)-0x1);return _0x56b43a&&this['getSidebarItemView'](_0x56b43a)||null;}['_getItemAfter'](_0x133de0){const _0x2179c9=this['_sidebarItemViewToAnnotation']['get'](_0x133de0),_0x54abbc=_0x2179c9&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2179c9)+0x1);return _0x54abbc&&this['getSidebarItemView'](_0x54abbc)||null;}['_alignBeforeItem'](_0x3d52c6,_0x5644d0){_0x3d52c6['updateHeight']();const _0x1c4d85=G(_0x5644d0['bottom']+this['_spaceBetweenItems'],_0x3d52c6['top']);return!!_0x1c4d85&&(this['_setItemTop'](_0x5644d0,_0x5644d0['top']-_0x1c4d85),!0x0);}['_alignAfterItem'](_0x13499f,_0x242382){_0x13499f['updateHeight']();const _0x4db825=G(_0x13499f['bottom']+this['_spaceBetweenItems'],_0x242382['top']);return!!_0x4db825&&(this['_setItemTop'](_0x242382,_0x242382['top']+_0x4db825,!0x1),!0x0);}['_alignToTargetRect'](_0x301a10){const _0x246692=this['_sidebarItemViewToAnnotation']['get'](_0x301a10);if(!_0x246692||!_0x246692['target']||!_0x246692['targetRect'])return;const _0x1b4fc7=this['_getTargetTop'](_0x246692,_0x246692['targetRect']);this['_setItemTop'](_0x301a10,_0x1b4fc7);}['_getTargetTop'](_0x3b0b2c,_0x1452fc){if(null===_0x1452fc)return 0x0;if(_0x3b0b2c['target']instanceof _0x2a219f)return _0x1452fc['top'];{const _0x472227=new _0x2a219f(this['view']['element'])['top'];return _0x1452fc['top']-_0x472227;}}['_setItemTop'](_0x49aab4,_0x2f2229,_0x9ec1a1=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x9ec1a1&&(_0x2f2229=Math['max'](_0x2f2229,this['_getMaxAvailableTop'](_0x49aab4))),_0x49aab4['top']=_0x2f2229;}['_getMaxAvailableTop'](_0x496715){let _0x8efde9=this['_getItemBefore'](_0x496715),_0x4216f0=0x0;for(;_0x8efde9;)_0x8efde9['updateHeight'](),_0x4216f0+=this['_spaceBetweenItems']+_0x8efde9['height'],_0x8efde9=this['_getItemBefore'](_0x8efde9);return _0x4216f0;}}function G(_0x172e52,_0xa491f0){return Math['max'](_0x172e52-_0xa491f0,0x0);}function g(_0x50bacd){return null!==_0x50bacd&&'object'==typeof _0x50bacd&&0x1===_0x50bacd['nodeType'];}class e extends _0x1057fb{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3f3118){super(_0x3f3118),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x39f167(),this['_refreshPositioningDebounced']=_0x44edca(()=>{_0x3f3118['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x357995=this['context']['plugins']['get'](j),_0x387e8f=this['context']['plugins']['get'](z);_0x357995['register']('wideSidebar',this),_0x387e8f['container']&&_0x357995['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x1c29c4){if(_0x1c29c4===this['activeAnnotation'])return;const _0x36364c=this['context']['plugins']['get'](z);_0x36364c['_activeAnnotation']=_0x1c29c4;const _0x3f1631=this['activeAnnotation'];_0x36364c['refresh']({'blurredAnnotation':_0x3f1631,'activatedAnnotation':_0x1c29c4}),this['activeAnnotation']=_0x1c29c4;}['attach'](_0x1232cd){this['annotations']=_0x1232cd;const _0x26519b=this['context']['plugins']['get'](z);if(_0x26519b['_annotations']=_0x1232cd,this['isAttached'])throw new _0x5d3b6b('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x26519b,'set:container',()=>{this['detach'](),this['listenTo'](_0x26519b,'change:container',_0x143376=>{_0x143376['off'](),this['attach'](_0x1232cd);});}),_0x26519b['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x4afe32=_0x373d15=>{_0x373d15['updateTargetRect'](),_0x26519b['addAnnotation'](_0x373d15);};for(const _0x15dcba of _0x1232cd)_0x4afe32(_0x15dcba);this['listenTo'](_0x1232cd,'add',(_0x156965,_0x42de2e)=>{_0x4afe32(_0x42de2e);}),this['listenTo'](_0x1232cd,'remove',(_0x16da38,_0x4cb5db,_0x504f0b)=>{_0x26519b['rearrange']({'removedAnnotation':_0x4cb5db,'previousAnnotation':_0x1232cd['get'](_0x504f0b-0x1),'nextAnnotation':_0x1232cd['get'](_0x504f0b+0x1)}),_0x4cb5db===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x1232cd,'focus',(_0x1cfb4d,_0x1d6c61)=>{this['setActiveAnnotation'](_0x1d6c61);}),this['listenTo'](_0x1232cd,'blur',()=>{this['setActiveAnnotation'](null);});const _0x3a4726=this['context']instanceof _0x153b8d?this['context']['editors']:new _0x39f167([this['context']]);for(const _0x24c6bb of _0x3a4726)this['_integrateWithEditorAnnotations'](_0x24c6bb);this['listenTo'](_0x3a4726,'add',(_0x56eae9,_0x1bc7ed)=>{this['listenTo'](_0x1bc7ed,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x1bc7ed);});}),this['listenTo'](_0x3a4726,'remove',(_0x4af89e,_0x4c30a7)=>{_0x4c30a7['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4c30a7['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x5d3b6b('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x50e087=this['context']['plugins']['get'](z);_0x50e087['_detachFromContainer'](this['annotations']),this['stopListening'](_0x50e087),this['stopListening'](this['annotations']),this['context']instanceof _0x153b8d&&this['stopListening'](this['context']['editors']);for(const _0x3d7ee9 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x3d7ee9);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x514109){if(!_0x514109['plugins']['has']('EditorAnnotations'))return;const _0x1ef435=_0x514109['plugins']['get']('EditorAnnotations'),_0x6d7724=()=>{const _0x52f6e7=_0x1ef435['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x52f6e7[0x0]||null);};this['listenTo'](_0x1ef435,'refresh',_0x6d7724),this['listenTo'](_0x1ef435,'blur',(_0x341020,{isAnnotationTracked:_0x49f094})=>{this['activeAnnotation']&&_0x49f094(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x1ef435,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x33daf6=>{_0x1ef435['hasDomSelection']()&&(_0x6d7724(),_0x33daf6['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x1ef435);}['_destroyEditorAnnotationsIntegration'](_0x4c421a){this['stopListening'](_0x4c421a),this['_editorAnnotations']['remove'](_0x4c421a);}}class C extends _0x3252f0{['counterView'];constructor(_0x1822a7){super(_0x1822a7);const _0xd92d73=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x126534,_0x578937)=>_0x126534?'...':_0x578937['toString']()),this['set']('annotationType',''),this['icon']=_0x4c1049,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0xd92d73['to']('annotationType',_0x79de7d=>'ck-annotation-counter__badge--'+_0x79de7d),_0xd92d73['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0xd92d73['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x1057fb{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5a4af2){super(_0x5a4af2),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x281b79())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x39f167(),this['_refreshPositioningDebounced']=_0x44edca(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x2ed1a9(this['context']['locale']),this['balloonPanelView']=new _0x6bac08(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x2549f7){this['annotations']=_0x2549f7;const _0x32499d=this['context']['plugins']['get'](z),_0x2629df=this['balloonPanelView'];if(_0x32499d['_annotations']=_0x2549f7,this['isAttached'])throw new _0x5d3b6b('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x32499d,'set:container',()=>{this['detach'](),this['listenTo'](_0x32499d,'change:container',_0x968898=>{_0x968898['off'](),this['attach'](_0x2549f7);});}),_0x32499d['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x50217a=_0x198f03=>{const _0xfc3627=new C(this['context']['locale']);_0x32499d['addAnnotation'](_0x198f03,_0xfc3627),this['_annotationToNarrowView']['set'](_0x198f03,_0xfc3627),_0xfc3627['bind']('isDirty','annotationType','number')['to'](_0x198f03['view'],'isDirty','type','length'),_0xfc3627['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x2629df['content']['first']!==_0x198f03['view']?(this['_showBalloon'](_0x198f03),_0x198f03['view']['element']['focus'](),this['setActiveAnnotation'](_0x198f03)):this['setActiveAnnotation'](null);});};for(const _0x544136 of _0x2549f7)_0x50217a(_0x544136);this['listenTo'](_0x2549f7,'add',(_0x5924c7,_0x3be361)=>{_0x50217a(_0x3be361);}),this['listenTo'](_0x2549f7,'remove',(_0x205cea,_0x43b0dc,_0x45d75f)=>{this['_annotationToNarrowView']['get'](_0x43b0dc)['destroy'](),this['_annotationToNarrowView']['delete'](_0x43b0dc),_0x32499d['rearrange']({'removedAnnotation':_0x43b0dc,'previousAnnotation':_0x2549f7['get'](_0x45d75f-0x1),'nextAnnotation':_0x2549f7['get'](_0x45d75f+0x1)}),_0x43b0dc===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x2549f7,'focus',(_0x16dfbf,_0x59a8fe)=>{this['setActiveAnnotation'](_0x59a8fe);}),this['listenTo'](_0x2549f7,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x1ecd7d,_0x492243)=>{_0x492243['keyCode']===_0x175d78['esc']&&_0x2629df['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x2629df['content']['first']),this['_hideBalloon'](),_0x492243['stopPropagation'](),_0x492243['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x4d882c,_0x147f3f)=>{const _0xf865e0=_0x147f3f['target'];_0x2629df['isVisible']&&_0x2629df['element']['contains'](_0xf865e0)||_0x32499d['view']['element']['contains'](_0xf865e0)||_0x4d882c['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x232349=>_0x232349['contains'](_0xf865e0))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x1de8e7=this['context']instanceof _0x153b8d?this['context']['editors']:new _0x39f167([this['context']]);for(const _0x3c64d1 of _0x1de8e7)this['_integrateWithEditorAnnotations'](_0x3c64d1);this['listenTo'](_0x1de8e7,'add',(_0x354a8d,_0x349e94)=>{this['listenTo'](_0x349e94,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x349e94);});}),this['listenTo'](_0x1de8e7,'remove',(_0x3974bb,_0x2075ee)=>{_0x2075ee['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2075ee['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x299d64){if(_0x299d64===this['activeAnnotation'])return;const _0x20f7a9=this['context']['plugins']['get'](z);if(_0x20f7a9['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x299d64,'disableAnimationOnActivatedAnnotation':!0x0}),_0x299d64)_0x20f7a9['getSidebarItemView'](_0x299d64)?this['_showBalloon'](_0x299d64):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x299d64;}['detach'](){if(!this['isAttached'])throw new _0x5d3b6b('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x507c26=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x15999c=>_0x15999c['destroy']()),this['_annotationToNarrowView']['clear'](),_0x507c26['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x153b8d&&this['stopListening'](this['context']['editors']);for(const _0x38c24b of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x38c24b);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'](_0x34487c){if(!_0x34487c['plugins']['has']('EditorAnnotations'))return;const _0x539f82=_0x34487c['plugins']['get']('EditorAnnotations'),_0x16c444=this['context']['plugins']['get'](z),_0x22b4af=this['annotations'],_0x5bdfda=this['balloonPanelView'],_0x3790ae=()=>{const _0x46e981=_0x539f82['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x46e981),this['setActiveAnnotation'](_0x46e981[0x0]||null);};this['listenTo'](_0x539f82,'refresh',_0x3790ae),this['listenTo'](_0x539f82,'blur',(_0x5afb49,{isAnnotationTracked:_0x42fa9f})=>{this['activeAnnotation']&&_0x42fa9f(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x539f82,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x22b4af,'blur',_0x213d04=>{_0x539f82['hasDomSelection']()&&_0x213d04['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x4411c9,_0x2edfcd)=>{const _0x39df97=_0x2edfcd['target'];_0x5bdfda['isVisible']&&_0x5bdfda['element']['contains'](_0x39df97)||_0x16c444['view']['element']['contains'](_0x39df97)||this['activeAnnotation']&&_0x539f82['hasDomSelection']()&&(_0x3790ae(),_0x4411c9['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x539f82);}['_destroyEditorAnnotationsIntegration'](_0x6f57ed){_0x6f57ed&&(this['stopListening'](_0x6f57ed),this['_editorAnnotations']['remove'](_0x6f57ed));}['_setSelectedAnnotations'](_0xe44c88){for(const _0x5188bb of this['_selectedAnnotations'])_0xe44c88['includes'](_0x5188bb)||this['_manuallyClosedAnnotationViews']['delete'](_0x5188bb['view']);this['_selectedAnnotations']=_0xe44c88;}['_refreshPositioning'](){const _0xfbbb2f=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0xfbbb2f['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x1e1099){if(this['_manuallyClosedAnnotationViews']['has'](_0x1e1099['view']))return;const _0x4c8e56=this['balloonPanelView']['content']['first'];_0x4c8e56!==_0x1e1099['view']?(_0x4c8e56&&this['_detachListeners'](_0x4c8e56),this['_attachListeners'](_0x1e1099['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x1e1099['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x197b46=this['balloonPanelView']['content']['first'],_0x30821a=_0x197b46&&this['annotations']['getByView'](_0x197b46);if(!_0x30821a||!this['_annotationToNarrowView']['has'](_0x30821a))return;const _0x35c7cd=this['_annotationToNarrowView']['get'](_0x30821a)['element'],_0xe68544=(function(){const _0x58e8d7=_0x6bac08['defaultPositions'];return[_0x58e8d7['southArrowNorthEast'],_0x58e8d7['northArrowSouthEast'],_0x58e8d7['southArrowNorth'],_0x58e8d7['northArrowSouth'],_0x58e8d7['southArrowNorthWest'],_0x58e8d7['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x35c7cd,'positions':_0xe68544});}['_hideBalloon'](){const _0x4fe421=this['balloonPanelView'],_0x207a03=_0x4fe421['content']['first'];_0x207a03&&(this['_detachListeners'](_0x207a03),_0x4fe421['unpin'](),_0x4fe421['content']['clear']());}['_attachListeners'](_0x415ffc){this['listenTo'](_0x415ffc,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x415ffc,'Esc',(_0x20e998,_0xf94434)=>{this['_manuallyClosedAnnotationViews']['add'](_0x415ffc),this['_hideBalloon'](),_0xf94434();});}['_detachListeners'](_0x185df8){this['stopListening'](_0x185df8);}}class c extends _0x22838b{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x586269,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x184efd){super(_0x184efd),_0x184efd['editing']['view']['addObserver'](_0x4e119d),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x184efd['plugins']['get'](_0x586269),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x49385d=this['editor']['plugins']['get'](j);_0x49385d['context']===this['editor']&&(_0x49385d['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x4cd9d4,_0x324507)=>{const _0x2bb6fd=this['_balloon'];if(this['isAttached']&&_0x2bb6fd['visibleView']){const _0x5436bf=this['annotations']['getByView'](_0x2bb6fd['visibleView']);_0x5436bf&&this['_closeAnnotation'](_0x5436bf),_0x324507();}}));}['afterInit'](){const _0x5a7153=this['editor']['plugins']['get'](j);_0x5a7153['context']===this['editor']&&(_0x5a7153['hasActive']()||_0x5a7153['switchTo']('inline'));}['setActiveAnnotation'](_0x44a88b){_0x44a88b!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x44a88b&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x44a88b)&&this['_addAnnotationToBalloon'](_0x44a88b,!0x0),_0x44a88b['isActive']=!0x0),_0x44a88b||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x44a88b);}['attach'](_0x3a97b){this['annotations']=_0x3a97b;const _0x370ced=this['editor']['plugins']['get'](j),_0xe0dd66=this['_balloon'];if(this['isAttached'])throw new _0x5d3b6b('inlineannotations-attach-already-attached',this);if(_0x370ced['context']!==this['editor'])throw new _0x5d3b6b('inlineannotations-not-allowed-with-context',this);const _0x14d032=this['editor']['plugins']['get'](b);this['listenTo'](_0x14d032,'refresh',()=>{const _0x3198e8=_0x14d032['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x40c123,_0x16fdd5;!this['_forceRefresh']&&(_0x40c123=_0x3198e8,_0x16fdd5=this['_selectedAnnotations'],_0x40c123['length']===_0x16fdd5['length']&&_0x40c123['every'](_0x25174a=>_0x16fdd5['includes'](_0x25174a)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x3198e8),this['setActiveAnnotation'](_0x3198e8[0x0]||null));}),this['listenTo'](_0x14d032,'blur',(_0x5db2b1,{isAnnotationTracked:_0x2a994b})=>{this['activeAnnotation']&&_0x2a994b(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x55ae99,_0x45fcfa,_0xe15eb9)=>{_0xe15eb9||this['setActiveAnnotation'](null);}),this['listenTo'](_0x3a97b,'remove',(_0x51f813,_0xe3f2f5)=>{this['_removeAnnotationFromBalloon'](_0xe3f2f5),_0xe3f2f5===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0xe0dd66,'change:visibleView',(_0x1cfa87,_0x4bd497,_0x57c3f1,_0x38ff7d)=>{_0x38ff7d&&this['stopListening'](_0x38ff7d);const _0x1f4052=_0x3a97b['getByView'](_0x57c3f1);_0x57c3f1&&_0x1f4052&&(this['listenTo'](_0x57c3f1,'change:height',()=>{_0xe0dd66['updatePosition']();}),this['listenTo'](_0x57c3f1,'Esc',()=>{this['_closeAnnotation'](_0x1f4052),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x1f4052&&this['setActiveAnnotation'](_0x1f4052));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0xe0dd66['visibleView']&&(_0x3a97b['getByView'](_0xe0dd66['visibleView'])&&_0xe0dd66['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 _0x5d3b6b('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x427adc of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x427adc);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0xe13a7f){for(const _0x532344 of this['_selectedAnnotations'])_0xe13a7f['includes'](_0x532344)||this['_manuallyClosed']['delete'](_0x532344);for(const _0x290d26 of this['annotations'])_0xe13a7f['includes'](_0x290d26)||this['_removeAnnotationFromBalloon'](_0x290d26);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x3251fc of _0xe13a7f)this['_addAnnotationToBalloon'](_0x3251fc);}this['_selectedAnnotations']=_0xe13a7f;}['_addAnnotationToBalloon'](_0x21f1ed,_0x3c88cf=!0x1){this['_manuallyClosed']['has'](_0x21f1ed)||(this['_addedAnnotations']['has'](_0x21f1ed)||this['_balloon']['hasView'](_0x21f1ed['view'])||(this['_addedAnnotations']['add'](_0x21f1ed),this['_balloon']['add']({'stackId':_0x21f1ed['view']['id'],'view':_0x21f1ed['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x21f1ed)}})),_0x3c88cf&&this['_balloon']['showStack'](_0x21f1ed['view']['id']));}['_getBalloonTargetForAnnotation'](_0x4eaf9d){const _0x528f0b=_0x4eaf9d['target'],_0x24ae9f=this['editor']['editing']['view'],_0x39dd02=_0x24ae9f['document']['selection']['getFirstRange'](),_0xdae817=_0x24ae9f['domConverter']['viewRangeToDom'](_0x39dd02);if(_0xdae817['collapse'](!0x0),_0x528f0b){if(_0x528f0b instanceof _0x2a219f)return _0x528f0b;let _0x2f291e=[];for(const _0xa349d5 of _0x528f0b)_0x2f291e['push'](...F(_0xa349d5['getClientRects']()));_0x2f291e=function(_0x1350fb){const _0x51aef5=[];let _0x41e646=_0x1350fb[0x0];for(let _0x517607=0x1;_0x517607<_0x1350fb['length'];_0x517607++)P(_0x41e646,_0x1350fb[_0x517607])?_0x41e646['width']+=_0x1350fb[_0x517607]['width']:(_0x51aef5['push'](_0x41e646),_0x41e646=_0x1350fb[_0x517607]);return _0x51aef5['push'](_0x41e646),_0x51aef5;}(_0x2f291e);const _0x22b947=_0xdae817['getBoundingClientRect']();return _0x2f291e['find'](_0x2d9158=>_0x2d9158['top']<=_0x22b947['top']&&_0x2d9158['bottom']>=_0x22b947['bottom']&&_0x2d9158['left']<=_0x22b947['left']&&_0x2d9158['right']>=_0x22b947['right'])||_0x2f291e[0x0];}return _0x4eaf9d['targetRect']||_0xdae817;}['_removeAnnotationFromBalloon'](_0x166186){this['_addedAnnotations']['has'](_0x166186)&&this['_balloon']['hasView'](_0x166186['view'])&&(this['_addedAnnotations']['delete'](_0x166186),this['_balloon']['remove'](_0x166186['view']));}['_closeAnnotation'](_0x5c80ba){this['_manuallyClosed']['add'](_0x5c80ba),this['_removeAnnotationFromBalloon'](_0x5c80ba);}}function F(_0x2ef127){return Array['from'](_0x2ef127)['map'](DOMRect['fromRect']);}function P(_0x1b9837,_0x6d81f8){return _0x1b9837['top']===_0x6d81f8['top']&&_0x1b9837['bottom']===_0x6d81f8['bottom']&&_0x1b9837['right']===_0x6d81f8['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x595db1,_0x541495){super(_0x595db1),this['set']('isEmpty',!_0x541495['length']),this['focusTracker']=new _0x2a4010(),this['_annotationViews']=_0x541495,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x4babae({'focusables':_0x541495,'focusTracker':this['focusTracker']}),this['listenTo'](_0x541495,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x541495,'remove',(_0x42cd8b,_0x247ff3)=>{_0x247ff3['isActive']&&this['focus'](),_0x541495['length']||(this['isEmpty']=!0x0);});const _0x5a83be=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x595db1,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x541495},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x5a83be['if']('isEmpty','ck-hidden',_0x196d2b=>!_0x196d2b)]},'children':[{'text':N(_0x595db1,'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 _0x1542fd of this['_annotationViews'])this['focusTracker']['add'](_0x1542fd['element']);this['_annotationViews']['on']('change',(_0x1fd2f8,{added:_0x101ded,removed:_0x21b05f})=>{for(const _0x136853 of _0x101ded)this['focusTracker']['add'](_0x136853['element']);for(const _0x3ce0b4 of _0x21b05f)this['focusTracker']['remove'](_0x3ce0b4['element']);});}}class p extends _0x1057fb{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x2a9102){super(_0x2a9102),this['archivedThreads']=new _0x39f167();}['init'](){const _0x24cb93=this['context'],_0x4f9c96=_0x24cb93['plugins']['get'](o),_0x4e6078=_0x24cb93['plugins']['get'](y);this['listenTo'](_0x4f9c96,'addCommentThread',(_0x460ead,{threadId:_0x2a7a6c})=>{const _0x382aa0=_0x4f9c96['getCommentThread'](_0x2a7a6c);_0x382aa0['archivedAt']&&this['archivedThreads']['add'](_0x382aa0,this['_calculatePosition'](_0x382aa0['archivedAt'])),this['listenTo'](_0x382aa0,'change:archivedAt',(_0x1d6291,_0x444e86,_0x21690a)=>{_0x21690a?this['archivedThreads']['has'](_0x382aa0)||this['archivedThreads']['add'](_0x382aa0,this['_calculatePosition'](_0x382aa0['archivedAt'])):this['archivedThreads']['has'](_0x382aa0)&&this['archivedThreads']['remove'](_0x382aa0);});}),this['listenTo'](_0x4f9c96,'removeCommentThread',(_0x485ada,{threadId:_0x3c156f})=>{const _0x40d957=_0x4f9c96['getCommentThread'](_0x3c156f);this['stopListening'](_0x40d957),this['archivedThreads']['has'](_0x40d957)&&this['archivedThreads']['remove'](_0x40d957);},{'priority':'highest'}),this['listenTo'](_0x4e6078['collection'],'focus',(_0x32de0a,_0x55805a)=>{_0x55805a['isVisible']||(_0x55805a['isActive']=!0x0,_0x4e6078['activate'](_0x55805a));});}['_calculatePosition'](_0x3dafd7){const _0x351959=[...this['archivedThreads']]['findIndex'](_0x2ed9f3=>_0x2ed9f3['archivedAt']<_0x3dafd7);return _0x351959>-0x1?_0x351959:this['archivedThreads']['length'];}}class a extends _0x22838b{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x48c1d1];}constructor(_0x4b2449){super(_0x4b2449),this['annotationViews']=new _0x1c7545(),this['_pendingThreads']=[];}['init'](){const _0x1e8d26=this['editor'],_0x2635f8=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x1e8d26['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x3252f0,!0x0)),_0x1e8d26['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x170be4=this['_createCommentsArchiveButton'](_0x489c6e);return _0x170be4['set']({'role':'menuitemcheckbox'}),_0x170be4;});const _0x312269=_0x1e8d26['plugins']['get'](p),_0x5ec895=_0x1e8d26['plugins']['get']('Annotations'),_0x5a69f8=_0x1e8d26['plugins']['get']('CommentsRepository');_0x312269['archivedThreads']['forEach'](_0x46cc90=>{this['_handleNewThread'](_0x46cc90);}),this['listenTo'](_0x312269['archivedThreads'],'add',(_0x2089ae,_0x56356b)=>{this['_handleNewThread'](_0x56356b);}),this['listenTo'](_0x5ec895['collection'],'add',(_0x58acb8,_0x341c07)=>{const _0x4afb88=this['_pendingThreads']['find'](_0x2d1367=>{const _0x4a9402=_0x5a69f8['_threadToController']['get'](_0x2d1367);return _0x4a9402&&_0x341c07['innerView']===_0x4a9402['view'];});if(_0x4afb88){const _0xe5c571=this['_calculatePosition'](_0x4afb88['archivedAt']);this['_addAnnotationToArchive'](_0x341c07,_0xe5c571),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x4afb88),0x1);}}),this['listenTo'](_0x312269['archivedThreads'],'remove',(_0x4ed909,_0x34fdd2)=>{const _0x4c46dd=_0x1e8d26['config']['get']('collaboration.channelId');if(!_0x4c46dd||_0x34fdd2['channelId']===_0x4c46dd){if(this['_pendingThreads']['includes'](_0x34fdd2))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x34fdd2),0x1);else{const _0x3fd419=_0x5a69f8['_threadToController']['get'](_0x34fdd2),_0x14ae73=_0x5ec895['getByInnerView'](_0x3fd419['view']);this['annotationViews']['remove'](_0x14ae73['view']),this['stopListening'](_0x14ae73),this['stopListening'](_0x14ae73['focusableElements']);}}}),this['listenTo'](_0x5ec895['collection'],'add',(_0x1a4c29,_0x3764f2)=>{this['listenTo'](_0x3764f2,'escape',_0x2635f8);}),this['listenTo'](_0x5ec895['collection'],'remove',(_0x4dcb72,_0x20e343)=>{this['stopListening'](_0x20e343,'escape',_0x2635f8);});}['_addAnnotationToArchive'](_0x53e9bb,_0x4ec18e){this['listenTo'](_0x53e9bb,'set:isVisible',_0x593734=>{_0x593734['return']=!0x1,_0x593734['stop']();}),this['annotationViews']['add'](_0x53e9bb['view'],_0x4ec18e);}['_handleNewThread'](_0x57566b){const _0x54f41a=this['editor']['plugins']['get']('CommentsRepository'),_0x2da199=this['editor']['plugins']['get']('Annotations'),_0xba06a8=this['editor']['config']['get']('collaboration.channelId');if(!_0xba06a8||_0x57566b['channelId']===_0xba06a8){const _0x3d0ed8=_0x54f41a['_threadToController']['get'](_0x57566b);if(!_0x3d0ed8)return void this['_pendingThreads']['push'](_0x57566b);const _0x119aa8=this['_calculatePosition'](_0x57566b['archivedAt']),_0x26fb47=_0x2da199['getByInnerView'](_0x3d0ed8['view']);_0x26fb47['isVisible']&&_0x2da199['_visibleAnnotations']['remove'](_0x26fb47),this['_addAnnotationToArchive'](_0x26fb47,_0x119aa8);}}['_calculatePosition'](_0x3c8068){const _0x3de43b=this['editor']['config']['get']('collaboration.channelId'),_0x536663=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x9d9c83=>_0x9d9c83['channelId']===_0x3de43b)['findIndex'](_0x4bfcd9=>_0x4bfcd9['archivedAt']<_0x3c8068);return _0x536663<0x0||_0x536663>this['annotationViews']['length']?this['annotationViews']['length']:_0x536663-0x1;}['_toggleDialog'](){const _0xec6777=this['editor'],_0x2a8c11=_0xec6777['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0xec6777['locale'],this['annotationViews'])),'commentsArchive'===_0x2a8c11['id']?_0x2a8c11['hide']():_0x2a8c11['show']({'id':'commentsArchive','title':N(_0xec6777['locale'],'COMMENTS_ARCHIVE'),'icon':_0x39f3b8,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x301d4b['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x36e0b5,_0x5d4803=!0x1){const _0x528e89=this['editor']['locale'],_0x325ef8=this['editor']['plugins']['get']('Dialog'),_0x527eb9=new _0x36e0b5(_0x528e89);return _0x527eb9['bind']('isEnabled')['to'](this,'isEnabled'),_0x527eb9['bind']('isOn')['to'](_0x325ef8,'id',_0x39f17b=>'commentsArchive'===_0x39f17b),_0x527eb9['set']({'label':N(_0x528e89,'COMMENTS_ARCHIVE'),'icon':_0x39f3b8,'isToggleable':!0x0}),_0x5d4803&&(_0x527eb9['tooltip']=!0x0),this['listenTo'](_0x527eb9,'execute',()=>this['_toggleDialog']()),_0x527eb9;}['_hideDialogOnAnnotationEscape']=_0x18cb75=>{const _0x1ae549=_0x18cb75['source'];if(!this['annotationViews']['has'](_0x1ae549['view']))return;const _0x13edc7=this['editor']['plugins']['get']('Dialog');_0x13edc7['isOpen']&&'commentsArchive'===_0x13edc7['id']&&(_0x13edc7['hide'](),_0x18cb75['stop']());};}class gi extends _0x22838b{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|