@ckeditor/ckeditor5-comments 46.0.1-alpha.12 → 46.0.1-alpha.13
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/annotations/view/annotationcounterbuttonview.js +1 -1
- package/src/annotations/view/annotationview.js +1 -1
- package/src/annotations/view/sidebaritemview.js +2 -2
- package/src/annotations/view/sidebarview.js +2 -2
- package/src/comments/commentsarchiveui.js +1 -1
- package/src/comments/commentsediting.js +1 -1
- package/src/comments/commentsrepository.js +3 -3
- package/src/comments/commentsui.js +1 -1
- package/src/comments/integrations/importword.js +1 -1
- package/src/comments/integrations/showcommenthighlights.js +1 -1
- package/src/comments/ui/commenteditor/commenteditor.js +2 -2
- package/src/comments/ui/view/basecommentview.js +1 -1
- package/src/comments/ui/view/commentinputview.js +1 -1
- package/src/comments/ui/view/commentthreadheaderview.js +1 -1
- package/src/comments/ui/view/commentview.js +2 -2
- package/src/utils/createmutationobserver.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(_0x4849e7={}){function _0x500608(_0x2a7783){return _0x2a7783['map'](_0xd657dc=>String['fromCharCode'](_0xd657dc))['join']('');}(_0x4849e7=Object['assign']({},_0x4849e7))['plugins']||(_0x4849e7['plugins']=Rt['defaultPlugins']),super(_0x4849e7),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[_0x500608([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x500608([0x76,0x69,0x65,0x77])][_0x500608([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x500608([0x61,0x75,0x74,0x6f]),this[_0x500608([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x500608([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x500608([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x500608([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x500608([0x6f,0x6b])});}['create'](){const _0x34b0e7=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x34b0e7))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x2088ce=>{const _0x5e1ecd=this['model']['document']['getRoot'](),_0x57a7fb=_0x5e1ecd&&_0x5e1ecd['getChild'](_0x5e1ecd['childCount']-0x1);_0x2088ce['setSelection'](_0x57a7fb,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x119250=this['editing']['view'],_0x46d2ee=_0x119250['document']['getRoot'](),_0x4c301a=_0x46d2ee['getChild'](0x0);_0x46d2ee['childCount']>0x1||!_0x4c301a||'p'!=_0x4c301a['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x119250,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x4c301a['placeholder']=this['placeholder']),St({'view':_0x119250,'element':_0x4c301a,'keepOnFocus':!0x0}),this['placeholderElement']=_0x4c301a);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x3c098b,_0x37a61e={}){super(_0x3c098b),this['editor']=null,this['_editorConfig']=_0x37a61e,this['set']('value',_0x37a61e['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x3c098b,'Reply...')),this['set']('submitLabel',N(_0x3c098b,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x3f0639(),this['focusCycler']=new _0x47818a({'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',(_0x57775f,_0xc2fd43)=>{this['cancelButtonView']['fire']('execute'),_0xc2fd43();}),this['keystrokes']['set']('Ctrl+Enter',(_0x44961c,_0x338ce2)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x338ce2());}),this['on']('submit',(_0x51cb5f,_0x12531a)=>{_0x12531a['length']>0xfde8?(alert(N(_0x3c098b,'TOO_LONG_COMMENT_ALERT',[_0x12531a['length'],0xfde8])),_0x51cb5f['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 _0x3fb9a6=this['editor'];this['element']['insertBefore'](_0x3fb9a6['ui']['element'],this['element']['firstChild']),_0x3fb9a6['model']['document']['on']('change',()=>this['value']=_0x3fb9a6['getData']()),_0x3fb9a6['bind']('placeholder')['to'](this),this['focusables']['add'](_0x3fb9a6['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x5b8181){-0x1===_0x5b8181?(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:_0x186414}=this,_0xf81c71=new _0x31c82b(_0x186414);return _0xf81c71['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0xf81c71['withText']=!0x0,_0xf81c71['bind']('label')['to'](this,'submitLabel'),_0xf81c71['on']('execute',()=>{this['fire']('submit',this['value']);}),_0xf81c71['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x55e53c,_0x1d3b45)=>!_0x1d3b45&&!!_0x55e53c['trim']()),_0xf81c71;}['_createCancelButton'](){const {locale:_0x36f489}=this,_0x25f9cb=new _0x31c82b(_0x36f489);return _0x25f9cb['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x25f9cb['label']=N(_0x36f489,'Cancel'),_0x25f9cb['withText']=!0x0,_0x25f9cb['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x25f9cb;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x461b03=>{this['focusTracker']['add'](_0x461b03['element']);}),this['focusables']['on']('change',(_0x144537,_0x22abe5)=>{for(const _0x2d186f of Array['from'](_0x22abe5['added'])['reverse']())this['focusTracker']['add'](_0x2d186f['element']);});}}class ie extends kt{constructor(_0x80b20c,_0x13ee06,_0xcbf309){super(_0x80b20c),this['commentInputView']=new os(_0x80b20c,_0xcbf309),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x3fa7e5,_0x266271)=>_0x3fa7e5||!!_0x266271),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 _0x1262f7(_0x80b20c,_0x13ee06),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'](_0x40619b){this['commentInputView']['focus'](_0x40619b);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x1be14e,_0x33ce58)=>{const {submitButtonView:_0x64056b,cancelButtonView:_0x5cba91,editor:_0x1a8ec8}=this['commentInputView'];[_0x64056b['element'],_0x5cba91['element'],_0x1a8ec8?_0x1a8ec8['editing']['view']['getDomRoot']():null]['filter'](_0x8a6df=>_0x8a6df)['some'](_0x4bd044=>_0x4bd044['contains'](_0x33ce58['target']))||(this['focus'](),_0x33ce58['preventDefault']());});}}class rs extends kt{constructor(_0x351a0f){super(_0x351a0f);const _0x5dadf8=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x5dadf8['to']('count',_0x3e4311=>N(_0x351a0f,'NUMBER_OF_COMMENTS',_0x3e4311))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x1bc45c,_0x2be1b8,_0x4448cb){super(_0x1bc45c);const _0x320e17=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x2be1b8['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x2be1b8,this['_config']=_0x4448cb,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x3f0639(),this['keystrokes']=new jt(),this['focusCycler']=new _0x47818a({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x255d12=>this['commentViews']['map'](_0x2671e5=>_0x2671e5['element'])['includes'](_0x255d12['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x1bc45c),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x4263ff=>_0x4263ff-this['_config']['maxCommentsWhenCollapsed']);for(const _0x1deb58 of _0x2be1b8['comments'])this['_handleNewCommentModel'](_0x1deb58);this['_handleInfoComment'](),this['listenTo'](_0x2be1b8['comments'],'add',(_0x499e43,_0x1b038a)=>{const _0x25ad6c=this['_calculatePosition'](_0x1b038a);this['length']++,this['_handleNewCommentModel'](_0x1b038a,_0x25ad6c),this['refreshVisibleViews']();}),this['listenTo'](_0x2be1b8['comments'],'remove',(_0x4847de,_0x40f372)=>{this['length']--,this['_handleRemoveCommentModel'](_0x40f372),this['refreshVisibleViews']();}),this['listenTo'](_0x2be1b8,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x2be1b8,'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',_0x320e17['if']('length','ck-hidden',_0x5b3807=>!_0x5b3807)],'aria-label':N(_0x1bc45c,'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'](_0x1e62a4){-0x1===_0x1e62a4?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x495864 of this['commentViews'])_0x495864['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x999995,_0x40e177){const _0x22b16a=new this['_config']['CommentView'](this['locale'],_0x999995,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x22b16a['viewUid']=_0x999995['id'],_0x22b16a['delegate']('removeComment')['to'](this),_0x22b16a['delegate']('updateComment')['to'](this),_0x22b16a['delegate']('resolveCommentThread')['to'](this),_0x22b16a['delegate']('editorReady')['to'](this),_0x22b16a['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x22b16a,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x22b16a,_0x40e177);}['_calculatePosition'](_0x3098bc){const _0x3f9ff3=this['_model']['_findOptimalIndex'](_0x3098bc);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x3098bc['authoredAt']?_0x3f9ff3-0x1:_0x3f9ff3:_0x3f9ff3-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x2acbf4={'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'],_0x2acbf4,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x2acbf4));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0xcde83f){const _0x208843=this['commentViews']['remove'](_0xcde83f['id']);this['stopListening'](_0x208843),_0x208843['isEditMode']&&this['_updateHasDirtyComment'](),_0x208843['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x142d08=>_0x142d08['isEditMode']);}['_rearrangeCollapse'](){const _0x179f1c=function(_0x49fd53){const _0xd3fd55=new _0x55c097();for(const _0x168225 of _0x49fd53)_0xd3fd55['add'](_0x168225);return _0xd3fd55;}(this['commentViews']),_0x2f8404=this['_collapsedCommentsView']['count'];for(let _0x374319=0x1;_0x374319<=_0x2f8404;_0x374319++)_0x179f1c['remove'](0x1);for(const _0xf6abd8 of _0x179f1c)_0xf6abd8['collapse']();_0x2f8404>0x0&&_0x179f1c['add'](this['_collapsedCommentsView'],0x1),ns(_0x4b2a6b(Array['from'](this['visibleViews']),Array['from'](_0x179f1c)),this['visibleViews'],_0x179f1c);}['_rearrangeExpand'](){ns(_0x4b2a6b(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x38f749 of this['visibleViews'])_0x38f749['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x517249=>{this['focusTracker']['add'](_0x517249['element']),this['keystrokes']['listenTo'](_0x517249['element']);}),this['commentViews']['on']('change',(_0x58a35a,_0x36afac)=>{for(const _0x3d8fad of _0x36afac['removed'])this['focusTracker']['remove'](_0x3d8fad['element']),this['keystrokes']['stopListening'](_0x3d8fad['element']);for(const _0x5bc793 of Array['from'](_0x36afac['added'])['reverse']())this['focusTracker']['add'](_0x5bc793['element']),this['keystrokes']['listenTo'](_0x5bc793['element']);});}}function ns(_0x397e2a,_0x3a1885,_0x145973){let _0x314aa6=0x0;for(const _0x45b2d9 of _0x397e2a)switch(_0x45b2d9){case'insert':_0x3a1885['add'](_0x145973['get'](_0x314aa6),_0x314aa6),_0x314aa6++;break;case'delete':_0x3a1885['remove'](_0x314aa6);break;case'equal':_0x314aa6++;}}class oe extends kt{constructor(_0x2414ea){super(_0x2414ea);const _0x2f2209=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x2f2209['to']('contextValue',_0x46229b=>N(_0x2414ea,'THREAD_CONTEXT_LABEL',_0x46229b)),'tabindex':-0x1},'children':[{'text':_0x2f2209['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3e208a,_0x55bb06){super(_0x3e208a);const _0x4cf848=this['bindTemplate'];this['_model']=_0x55bb06,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x3f0639(),this['keystrokes']=new jt(),this['focusCycler']=new _0x47818a({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x55e098=>!!_0x55e098),this['bind']('contextValue')['to'](this['_model'],'context',_0x1f5787=>_0x1f5787&&_0x1f5787['value']?this['_trimContextValue'](_0x1f5787['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',_0x4cf848['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 _0x55c979=new _0x31c82b(this['locale']);return _0x55c979['label']=N(this['locale'],'Reopen'),_0x55c979['tooltip']=N(this['locale'],'Reopen'),_0x55c979['icon']=_0x3375c2,_0x55c979['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x389d80=>!_0x389d80),_0x55c979['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3f426e,_0x1d3edc)=>_0x3f426e&&_0x1d3edc),_0x55c979['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x55c979;}['_trimContextValue'](_0x5e8f02){if(_0x5e8f02['length']<0x96)return _0x5e8f02;const _0x29754f=_0x5e8f02['lastIndexOf']('\x20',0x93);return _0x5e8f02['substring'](0x0,_0x29754f>-0x1?_0x29754f:0x93)+'...';}['_attachContextActions'](){const _0x35915e=this['element']['querySelector']('.ck-context'),_0x4b645a=_0x35915e['querySelector']('.ck-context__value');this['listenTo'](_0x35915e,'mouseenter',()=>{_0x4b645a['offsetWidth']<_0x4b645a['scrollWidth']&&_0x35915e['classList']['add']('overlay');}),this['listenTo'](_0x35915e,'mouseleave',()=>{_0x35915e['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x30d380 of this['focusables'])this['focusTracker']['add'](_0x30d380['element']),this['keystrokes']['listenTo'](_0x30d380['element']);}['_createContextView'](){const _0x6f8455=new oe(this['locale']);return _0x6f8455['bind']('contextValue')['to'](this),_0x6f8455;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0xfadf21,_0x2c6384,_0x37460b,_0x480b2f){super(_0xfadf21),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x2c6384,this['_localUser']=_0x37460b,this['_config']=_0x480b2f,this['commentThreadHeaderView']=new Yt(_0xfadf21,_0x2c6384),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0xfadf21,N(_0xfadf21,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0xfadf21,_0x2c6384,Object['assign']({'CommentView':this['_config']['CommentView']},_0x480b2f)),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',(_0x6e8936,_0x125d53)=>_0x6e8936||!!_0x125d53),this['bind']('isUnlinked')['to'](_0x2c6384,'unlinkedAt',_0x134a96=>!!_0x134a96),this['bind']('ariaLabel')['to'](this,'length',_0x265986=>{const _0x1203d5=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x265986,_0x1203d5]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x3f0639(),this['keystrokes']=new jt(),this['focusCycler']=new _0x47818a({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x268c5a=>_0x268c5a['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 _0x561149=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x46ba86=_0x561149['commentInputView'];return _0x561149['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x46ba86,'value',(_0x250662,_0x5d50ed,_0x33b51f,_0x3fd5e0,_0x4c254d)=>!!_0x4c254d||!!_0x3fd5e0&&_0x33b51f&&!_0x5d50ed||_0x250662&&_0x33b51f&&!_0x5d50ed),_0x46ba86['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x28c6e4,_0x5e0877,_0x36f1aa)=>{let _0x179c8f;return _0x179c8f=_0x36f1aa&&_0x5e0877?'Reply\x20to\x20reopen\x20discussion...':_0x28c6e4?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x179c8f);}),_0x46ba86['bind']('submitLabel')['to'](this,'length',_0x25db56=>N(this['locale'],_0x25db56?'Reply':'Comment')),_0x46ba86['on']('submit',(_0xb4babc,_0x77a77b)=>{this['fire']('addComment',_0x77a77b),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x46ba86['on']('cancel',()=>{this['focus']();}),_0x46ba86['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x46ba86['on']('cancel',_0xefc86c=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0xefc86c['stop']());}),this['on']('change:isActive',(_0x767af2,_0x12fb87,_0x1f0284)=>{_0x1f0284||this['length']||_0x46ba86['value']||this['fire']('removeCommentThread');}),_0x561149;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(di){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x36005d(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x32d696,target:_0x5eeff0,type:_0x4589f0,isVisible:_0x33707d=!0x0}){super(),this['view']=_0x32d696,this['view']['element']||this['view']['render'](),this['_type']=_0x4589f0,this['_target']=_0x5eeff0,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x55c097([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x18727d,_0x4d8d56)=>{this['view']['focusTracker']['add'](_0x4d8d56);}),this['focusableElements']['on']('remove',(_0x133344,_0x5114d7)=>{this['view']['focusTracker']['remove'](_0x5114d7);}),this['set']('isVisible',_0x33707d);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x5b598d=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x5b598d),_0x5b598d;}get['targetRect'](){const _0x203507=this['target'];if(null===_0x203507)return null;if(_0x203507 instanceof _0x4904b4)return _0x203507;const _0x5b9b9b=_0x203507['filter'](_0x5510a6=>function(_0x2126d1){const _0x195020=_0x2126d1['offsetParent'];if(_0x195020)return!0x0;const _0x1c1687=_0x2126d1['getClientRects']()['item'](0x0);return!!_0x1c1687;}(_0x5510a6));return 0x0===_0x5b9b9b['length']?null:new _0x4904b4(_0x5b9b9b[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x7b595){this['view']['isActive']=_0x7b595,this['view']['mainView']['isActive']=_0x7b595;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x4788d1){if(!(null===_0x4788d1||_0x4788d1 instanceof _0x4904b4||Array['isArray'](_0x4788d1)&&_0x4788d1['every'](_0x10e31b=>fi(_0x10e31b))))throw new _0x3888cd('annotation-invalid-target',null,{'target':_0x4788d1});}['_getNormalizedTarget'](){const _0x486274='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x486274)?[_0x486274]:_0x486274;}}function fi(_0x25c8f8){return null!==_0x25c8f8&&'object'==typeof _0x25c8f8&&'nodeType'in _0x25c8f8&&0x1===_0x25c8f8['nodeType'];}class S extends _0x55c097{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x277164=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x3f0639(),this['_focusTracker']['on']('change:isFocused',(_0x1c8916,_0x40e5f0,_0x13bb09)=>{_0x13bb09||this['fire']('blur');});for(const _0x124ad4 of _0x277164)this['add'](_0x124ad4);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x5aa25a){if(this['has'](_0x5aa25a))throw new _0x3888cd('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x5aa25a['innerView'],_0x5aa25a),this['_viewToAnnotation']['set'](_0x5aa25a['view'],_0x5aa25a);for(const _0x2bc0b7 of _0x5aa25a['focusableElements'])this['_focusTracker']['add'](_0x2bc0b7);this['listenTo'](_0x5aa25a['focusableElements'],'add',(_0x476609,_0x4366f2)=>{this['_focusTracker']['add'](_0x4366f2);}),this['listenTo'](_0x5aa25a['focusableElements'],'remove',(_0x39b289,_0xbb223a)=>{this['_focusTracker']['remove'](_0xbb223a);}),this['listenTo'](_0x5aa25a['view']['focusTracker'],'change:isFocused',(_0x2f6adb,_0x4aba99,_0x214341)=>{_0x214341&&this['fire']('focus',_0x5aa25a);}),_0x5aa25a['updateTargetRect']();const _0x13b2ea=this['_getOrderInContent'](_0x5aa25a['view']['targetRect']);return super['add'](_0x5aa25a,_0x13b2ea);}['remove'](_0x173069){if(!this['has'](_0x173069))throw new _0x3888cd('annotationcollection-not-existing-item',null);this['stopListening'](_0x173069['view']['focusTracker']),this['stopListening'](_0x173069['focusableElements']);for(const _0x2ed7fa of _0x173069['focusableElements'])this['_focusTracker']['remove'](_0x2ed7fa);return this['_viewToAnnotation']['delete'](_0x173069['view']),this['_innerViewToAnnotation']['delete'](_0x173069['innerView']),super['remove'](_0x173069);}['getByInnerView'](_0x5943d5){return this['_innerViewToAnnotation']['get'](_0x5943d5);}['getByView'](_0x20fcdc){return this['_viewToAnnotation']['get'](_0x20fcdc);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x582190 of this)_0x582190['updateTargetRect']();this['_sort']();}['_sort'](){const _0x3c3435=Array['from'](this)['sort']((_0x76f9ee,_0x3007ca)=>w(_0x76f9ee['view']['targetRect'],_0x3007ca['view']['targetRect']));for(let _0x339627=_0x3c3435['length']-0x1;_0x339627>0x0;_0x339627--){const _0x3f8b1d=_0x3c3435[_0x339627];_0x339627!==this['getIndex'](_0x3f8b1d)&&(this['remove'](_0x3f8b1d),this['add'](_0x3f8b1d));}}['_getOrderInContent'](_0x3b3f7a){let _0x506360=0x0;if(!_0x3b3f7a)return this['length'];for(const _0x2d1b51 of this){const _0x4c4c4a=_0x2d1b51['view']['targetRect'];if(_0x4c4c4a){if(w(_0x3b3f7a,_0x4c4c4a)<0x0)return _0x506360;_0x506360++;}}return _0x506360;}}function v({source:_0x5809b9,target:_0x13586b,filter:_0x2c3a00}){for(const _0x183562 of _0x5809b9)_0x2c3a00(_0x183562)&&_0x13586b['add'](_0x183562);_0x13586b['listenTo'](_0x5809b9,'add',(_0x4e3a18,_0x3d9d33)=>{_0x2c3a00(_0x3d9d33)&&_0x13586b['add'](_0x3d9d33);}),_0x13586b['listenTo'](_0x5809b9,'remove',(_0x41716c,_0x807d9c)=>{_0x13586b['has'](_0x807d9c)&&_0x13586b['remove'](_0x807d9c);});}function w(_0x2d01a6,_0x2462ea){if(null===_0x2d01a6&&null===_0x2462ea)return 0x0;if(null===_0x2d01a6)return-0x1;if(null===_0x2462ea)return 0x1;const _0x3ef0cd=_0x2d01a6['top']-_0x2462ea['top'];return 0x0==_0x3ef0cd?_0x2d01a6['left']-_0x2462ea['left']:_0x3ef0cd;}class y extends _0x1a03b6{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x520933){if(super(_0x520933),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x520933 instanceof _0x403d5f){const _0x235194=_0x520933['locale'];_0x520933['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x235194,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x235194,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x235194,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x235194,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x235194,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x235194,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x235194,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x50abab){this['collection']['add'](_0x50abab);}['remove'](_0x4ffdd3){this['collection']['remove'](_0x4ffdd3),_0x4ffdd3['destroy']();}['refreshVisibility'](){for(const _0x197717 of this['collection'])_0x197717['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x19a579){return this['collection']['getByInnerView'](_0x19a579);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x4496cd of this['collection'])_0x4496cd['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x4e1655){this['fire']('_activateAnnotation',_0x4e1655);}['createAnnotation'](_0x39e55c){return new T(_0x39e55c);}['createAnnotationView'](_0x55cc3d,_0xca235){return new E(_0x55cc3d,_0xca235);}['_addActiveAnnotation'](_0x507701){const _0x4dc8a5=new Set(this['activeAnnotations']);_0x4dc8a5['add'](_0x507701),this['activeAnnotations']=_0x4dc8a5;}['_removeActiveAnnotation'](_0x199f7d){const _0x41e24c=new Set(this['activeAnnotations']);_0x41e24c['delete'](_0x199f7d),this['activeAnnotations']=_0x41e24c;}['_bindAnnotationsToVisibleAnnotations'](){const _0x46fe56=this['collection'],_0x6d22a1=this['_visibleAnnotations'];function _0x19072f(_0x57924f){const _0x129fe3=_0x57924f['source'];_0x129fe3['isVisible']&&!_0x6d22a1['has'](_0x129fe3)?_0x6d22a1['add'](_0x129fe3):!_0x129fe3['isVisible']&&_0x6d22a1['has'](_0x129fe3)&&_0x6d22a1['remove'](_0x129fe3),_0x129fe3['view']['focusTracker']['remove'](_0x129fe3['view']['element']),_0x129fe3['view']['focusTracker']['add'](_0x129fe3['view']['element']);}this['listenTo'](_0x46fe56,'add',(_0x2267c0,_0x23b1a2)=>{_0x23b1a2['isVisible']&&_0x6d22a1['add'](_0x23b1a2),this['listenTo'](_0x23b1a2,'change:isVisible',_0x19072f);}),this['listenTo'](_0x46fe56,'remove',(_0x56a149,_0x4049d8)=>{_0x6d22a1['has'](_0x4049d8)&&_0x6d22a1['remove'](_0x4049d8),this['stopListening'](_0x4049d8,'change:isVisible',_0x19072f);});}['_setupEnterAnnotationKeystroke'](){const _0x575c5f=_0x5b80e8=>{_0x5b80e8['on']('ready',()=>{_0x5b80e8['keystrokes']['set'](_0x21ae3c,(_0x315c45,_0x57289f)=>{const _0x1177b2=_0x39ab61(this['activeAnnotations']['values']());_0x1177b2&&(_0x1177b2['view']['focus'](),_0x57289f());});});};this['context']instanceof _0x403d5f?_0x575c5f(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x8f624,_0x35249d)=>{_0x575c5f(_0x35249d);});}['_setupEscapeAnnotationHandling'](){const _0x16d3b6=_0x255238=>{const _0x8b927d=_0x255238['source'],_0x4af9be=[];let _0x2316d1;if(Array['isArray'](_0x8b927d['target'])){_0x2316d1=_0x8b927d['target'][0x0],this['context']instanceof _0x403d5f?_0x4af9be['push'](this['context']):this['context']['editors']&&_0x4af9be['push'](...this['context']['editors']);for(const _0x5f0d42 of _0x4af9be)for(const _0x16d64e of _0x5f0d42['editing']['view']['domRoots']['values']())if(_0x16d64e['contains'](_0x2316d1))return void _0x5f0d42['editing']['view']['focus']();_0x2316d1['focus']();}};this['listenTo'](this['collection'],'add',(_0xd18df5,_0x5e12b6)=>{this['listenTo'](_0x5e12b6,'escape',_0x16d3b6,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x22c4fc,_0x404248)=>{this['stopListening'](_0x404248,'escape',_0x16d3b6);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x1a03b6{['_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(_0x31faff){super(_0x31faff),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x2e1daf=this['context']['config'];_0x2e1daf['define']('comments.maxCommentsWhenCollapsed',0x2),_0x2e1daf['define']('comments.maxThreadTotalWeight',0x1f4),_0x2e1daf['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x2e1daf['define']('comments.CommentThreadView',gt),_0x2e1daf['define']('comments.CommentView',Tt),_0x2e1daf['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x36543d=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x244017,_0xa9b143)=>this['_addCommentThread'](_0xa9b143)),this['on']('submitCommentThread',(_0x236b48,_0x5305d7)=>this['_submitCommentThread'](_0x5305d7)),this['on']('resolveCommentThread',(_0x23a4ad,_0x275d6d)=>this['_resolveCommentThread'](_0x275d6d)),this['on']('resolveCommentThread',(_0x7f9cb,_0x124102)=>this['_updateActiveAnnotation'](_0x124102),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x57dcaa,_0x4af5e5)=>this['_reopenCommentThread'](_0x4af5e5)),this['on']('reopenCommentThread',(_0x49f897,_0xa00163)=>this['_updateActiveAnnotation'](_0xa00163),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x5d4005,_0x271021)=>this['_removeCommentThread'](_0x271021)),this['on']('updateCommentThread',(_0x98cf54,_0x71f290)=>this['_updateCommentThread'](_0x71f290)),this['on']('updateCommentThread',(_0x52f475,_0x1381a5)=>this['_updateActiveAnnotation'](_0x1381a5),{'priority':'lowest'}),this['on']('addComment',(_0x4963b4,_0x4d2df9)=>this['_addComment'](_0x4d2df9)),this['on']('updateComment',(_0x512dee,_0x10d8c2)=>this['_updateComment'](_0x10d8c2)),this['on']('removeComment',(_0x11c013,_0x55cd37)=>this['_removeComment'](_0x55cd37)),this['on']('addComment',(_0x198b7a,{threadId:_0x3fdd3b,isFromAdapter:_0x109c21})=>{if(_0x109c21)return;const _0x50b4b4=this['getCommentThread'](_0x3fdd3b),_0x5375b4=_0x50b4b4&&this['_threadToController']['get'](_0x50b4b4);_0x5375b4&&_0x5375b4['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x36543d,'change:activeAnnotations',(_0x2c84b8,_0x215788,_0x2f2c2a)=>{const _0x2cb71e=Array['from'](_0x2f2c2a)['map'](_0x5a5897=>this['_viewToController']['get'](_0x5a5897['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x2cb71e?_0x2cb71e['model']:null;});}set['adapter'](_0xf5681){if(this['_adapter'])throw new _0x3888cd('commentsrepository-adapter-already-set');this['_adapter']=_0xf5681;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0xabd907=_t,threadId:_0x5968cd=_0x2f9c10(),comments:_0x5c9646=[],unlinkedAt:_0x5dac5d=null,resolvedAt:_0x3eb684=null,resolvedBy:_0x196d10=null,target:_0x293859=null,context:_0x13ef55=null,attributes:_0x85560e={},isResolvable:_0x5e2900=!0x0,isSubmitted:_0x2a7385=!0x1,isFromAdapter:_0x37627a=!0x1}={}){return this['fire'](Nt('addCommentThread',_0xabd907),{'channelId':_0xabd907,'threadId':_0x5968cd,'comments':_0x5c9646,'unlinkedAt':_0x5dac5d,'resolvedAt':_0x3eb684,'resolvedBy':_0x196d10,'target':_0x293859,'context':_0x13ef55,'attributes':_0x85560e,'isFromAdapter':_0x37627a,'isResolvable':_0x5e2900,'isSubmitted':_0x2a7385}),this['getCommentThread'](_0x5968cd);}['openNewCommentThread']({channelId:_0x3499b8=_t,threadId:_0x440f91=_0x2f9c10(),target:_0x3b46c0,context:_0x2fcb02=null,isResolvable:_0x3e0a51=!0x0}){if(this['_readOnlyChannels']['has'](_0x3499b8)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x3b46c0)throw new _0x3888cd('commentsrepository-missing-target');const _0x3e5c9b=this['addCommentThread']({'channelId':_0x3499b8,'threadId':_0x440f91,'target':_0x3b46c0,'context':_0x2fcb02,'isResolvable':_0x3e0a51});if(!_0x3e5c9b)return null;const _0x2b444c=this['_threadToController']['get'](_0x3e5c9b),_0x446bcd=_0x2b444c['view']['commentThreadInputView']['commentInputView'],_0x5b35c1=this['context']['plugins']['get'](y),_0x567c1e=_0x5b35c1['getByInnerView'](_0x2b444c['view']);return _0x5b35c1['activate'](_0x567c1e),_0x446bcd['once']('editorReady',()=>_0x446bcd['focus']()),_0x3e5c9b;}['hasCommentThread'](_0xc0f4e9){if('string'!=typeof _0xc0f4e9)throw new _0x3888cd('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0xc0f4e9);}['updateCommentThread']({channelId:_0xa5e0e9=_t,threadId:_0x52defa,context:_0x197506,unlinkedAt:_0x4c700c,attributes:_0x4615ef,isFromAdapter:_0xc5278f=!0x1}){return this['fire'](Nt('updateCommentThread',_0xa5e0e9),{'channelId':_0xa5e0e9,'threadId':_0x52defa,'context':_0x197506,'unlinkedAt':_0x4c700c,'attributes':_0x4615ef,'isFromAdapter':_0xc5278f}),this['getCommentThread'](_0x52defa);}['getCommentThread'](_0x5d5ad4){if('string'!=typeof _0x5d5ad4)throw new _0x3888cd('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x5d5ad4);}['fetchCommentThread']({channelId:_0x6431d7,threadId:_0x533194}={}){const _0x2f7ca8=this['getCommentThread'](_0x533194);if(_0x2f7ca8)return Promise['resolve'](_0x2f7ca8);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x3888cd('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x6431d7,'threadId':_0x533194})['then'](_0x1f4a4d=>this['hasCommentThread'](_0x533194)?this['getCommentThread'](_0x533194):_0x1f4a4d?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x6431d7},_0x1f4a4d)):void 0x0)['catch'](_0x17915d=>{throw console['error'](_0x17915d),new _0x3888cd('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x227c85,skipNotAttached:_0x1f8c5e=!0x1,skipEmpty:_0x39183e=!0x1,toJSON:_0x3cab3e=!0x1}={}){const _0x3d32ba=[];for(const _0x46aeeb of this['_threads']['values']())_0x227c85&&_0x46aeeb['channelId']!==_0x227c85||_0x1f8c5e&&!_0x46aeeb['isAttached']||_0x39183e&&0x0===_0x46aeeb['length']||_0x3d32ba['push'](_0x46aeeb);return _0x3cab3e?_0x3d32ba['map'](_0x25996a=>_0x25996a['toJSON']()):_0x3d32ba;}['getAnnotationForCommentThread'](_0x59e2cc){const _0x57df72=this['_threadToController']['get'](_0x59e2cc);if(!_0x57df72)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x57df72['view'])||null;}['getCommentThreadForAnnotation'](_0x51f9d9){const _0x4bc565=this['_viewToController']['get'](_0x51f9d9['innerView']);return _0x4bc565?_0x4bc565['model']:null;}['setActiveCommentThread'](_0x59f0b7){const _0x428637=this['context']['plugins']['get'](y);if(!_0x59f0b7)return void(this['activeCommentThread']&&_0x428637['deactivateAll']());const _0x3efe26=this['getCommentThread'](_0x59f0b7);if(!_0x3efe26)throw new _0x3888cd('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x59f0b7});if(!this['_threadToController']['has'](_0x3efe26))throw new _0x3888cd('commentsrepository-active-not-attached',null,{'threadId':_0x59f0b7});const _0x23bf48=_0x428637['getByInnerView'](this['_threadToController']['get'](_0x3efe26)['view']);_0x428637['activate'](_0x23bf48);}['switchReadOnly'](_0x1dad7f,_0x31598a){_0x1dad7f?this['_readOnlyChannels']['add'](_0x31598a):this['_readOnlyChannels']['delete'](_0x31598a),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x26f881){return this['_readOnlyChannels']['has'](_0x26f881)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x495122,_0x59bd18){return new vt(_0x495122,_0x59bd18);}['setPermissions'](_0xf96831,_0x5f2581=_t){this['_permissions']['set'](_0x5f2581,_0xf96831),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x335348=_t){return this['_permissions']['has'](_0x335348)?this['_permissions']['get'](_0x335348):bt;}['_addCommentThread']({channelId:_0x3a1a3d,threadId:_0x559998,comments:_0x34ea3d,unlinkedAt:_0x6c0664,resolvedAt:_0x4df9a3,resolvedBy:_0x5ef210,target:_0x14e41a,context:_0x227a34,attributes:_0x2f81b2,isFromAdapter:_0x31884c,isResolvable:_0x3b5d6c,isSubmitted:_0x2503df}){if('string'!=typeof _0x559998)throw new _0x3888cd('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x559998});if(this['hasCommentThread'](_0x559998))throw new _0x3888cd('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x559998});const _0x487105=new pi(this,{'channelId':_0x3a1a3d,'id':_0x559998,'context':_0x227a34,'attributes':_0x2f81b2,'unlinkedAt':_0x6c0664,'resolvedAt':_0x4df9a3,'resolvedBy':_0x5ef210?this['context']['plugins']['get'](it)['getUser'](_0x5ef210):null,'isResolvable':_0x3b5d6c,'isSubmitted':_0x2503df||_0x31884c});this['_threads']['set'](_0x559998,_0x487105);for(const _0x4ee6d9 of _0x34ea3d)_0x487105['_add'](this['_createNewComment']({'threadId':_0x559998,..._0x4ee6d9}));return _0x14e41a&&_0x487105['attachTo'](_0x14e41a),_0x31884c||!_0x487105['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x3a1a3d,'threadId':_0x559998});}['_submitCommentThread']({channelId:_0x435d64,threadId:_0x29c641}){if(!this['hasCommentThread'](_0x29c641))throw new _0x3888cd('commentsrepository-missing-comment-thread',this);const _0x5aa753=this['getCommentThread'](_0x29c641);if(_0x5aa753['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x419bf2,comments:_0x5852b3,resolvedAt:_0x31cbd0,resolvedBy:_0x564e43,context:_0x31e36f,attributes:_0x28e9ab}=_0x5aa753,_0x25ac56=this['context']['plugins']['get']('PendingActions'),_0x5594b8=_0x25ac56['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x435d64,'threadId':_0x419bf2,'comments':_0x5852b3['map'](_0x350767=>_0x350767['toJSON']()),'resolvedAt':_0x31cbd0,'resolvedBy':_0x564e43?_0x564e43['id']:_0x564e43,'context':_0x31e36f,'attributes':_0x28e9ab})['then'](({comments:_0x30b05d})=>{_0x25ac56['remove'](_0x5594b8);for(const _0x3eed1c of _0x30b05d)this['_updateComment']({'channelId':_0x435d64,'threadId':_0x29c641,'commentId':_0x3eed1c['commentId'],'createdAt':_0x3eed1c['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x20a57f=>{throw console['error'](_0x20a57f),new _0x3888cd('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x214c5f,target:_0x59c93c}){const _0x1aad77=this['getCommentThread'](_0x214c5f);if(!_0x1aad77)throw new _0x3888cd('commentsrepository-attach-missing-comment-thread',this);const _0x23de64=this['context']['plugins']['get']('PendingActions'),_0xecf13f=this['context']['plugins']['get'](y),_0x3a3cde=this['_createCommentThreadView'](_0x1aad77),_0x245666=new vt(_0x1aad77,_0x3a3cde);let _0x21dbc2=null;_0x3a3cde['on']('change:isDirty',(_0x5d4d7c,_0x48c025,_0xd7ea3e)=>{_0xd7ea3e?_0x21dbc2=_0x23de64['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x21dbc2&&(_0x23de64['remove'](_0x21dbc2),_0x21dbc2=null);}),this['_threadToController']['set'](_0x1aad77,_0x245666),this['_viewToController']['set'](_0x3a3cde,_0x245666);const _0x38bcf9=new E(this['context']['locale'],_0x3a3cde);_0x38bcf9['bind']('length')['to'](_0x3a3cde),_0x38bcf9['bind']('isDirty')['to'](_0x3a3cde,'isDirty',_0x3a3cde,'length',(_0x61b9c6,_0x2ed4ee)=>_0x61b9c6||!_0x2ed4ee),_0x38bcf9['bind']('isActive')['to'](_0x3a3cde),_0x38bcf9['type']='comment';const _0x399302=new T({'view':_0x38bcf9,'target':_0x59c93c,'type':'comment','isVisible':!_0x1aad77['archivedAt']&&!!('function'==typeof _0x59c93c?_0x59c93c():_0x59c93c)});return _0x3a3cde['on']('escape',()=>{_0x399302['fire']('escape');}),this['_bindAnnotationToEditors'](_0x3a3cde,_0x399302),_0xecf13f['add'](_0x399302),_0x399302;}['_bindAnnotationToEditors'](_0x32a193,_0x94ec78){this['listenTo'](_0x32a193,'editorReady',(_0x2494f4,_0x425c6d)=>{const _0x1ef5c7=_0x425c6d['ui']['view']['body']['bodyCollectionContainer'];_0x94ec78['focusableElements']['add'](_0x1ef5c7),this['context']instanceof _0x403d5f&&this['context']['ui']['focusTracker']['add'](_0x1ef5c7);},{'priority':'highest'}),this['listenTo'](_0x32a193,'editorDestroyed',(_0x52c779,_0x2eda21)=>{const _0x16354d=_0x2eda21['ui']['view']['body']['bodyCollectionContainer'];_0x94ec78['focusableElements']['has'](_0x16354d)&&_0x94ec78['focusableElements']['remove'](_0x16354d),this['context']instanceof _0x403d5f&&this['context']['ui']['focusTracker']['remove'](_0x16354d);});}['_unbindEditors'](_0x29ddda){this['stopListening'](_0x29ddda,'editorReady'),this['stopListening'](_0x29ddda,'editorDestroyed');}['_createCommentThreadView'](_0x21e3a2){const _0xeaca7b=this['context']['plugins']['get'](it),{config:_0xcf586b,locale:_0x4e5c5f}=this['context'],_0x3e25a6=pt(_0xcf586b['get']('locale'),_0x4e5c5f);return new(0x0,(_0xcf586b['get']('comments'))['CommentThreadView'])(_0x4e5c5f,_0x21e3a2,_0xeaca7b['me'],{'editorConfig':{..._0xcf586b['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0xcf586b['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0xcf586b['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0xcf586b['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0xcf586b['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x3e25a6,'CommentView':_0xcf586b['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x86d80a,channelId:_0x4f83e3,resolvedAt:_0x39faef,resolvedBy:_0x2de846,isFromAdapter:_0x58982f}){if(!this['hasCommentThread'](_0x86d80a))throw new _0x3888cd('commentsrepository-missing-comment-thread',null,{'threadId':_0x86d80a});const _0x20f3de=this['getCommentThread'](_0x86d80a);if(_0x20f3de['isResolved'])throw new _0x3888cd('commentsrepository-resolved-comment-thread',null,{'threadId':_0x86d80a});const _0xfc5524=this['context']['plugins']['get'](it);if(_0x20f3de['resolvedBy']=_0xfc5524['getUser'](_0x2de846),_0x20f3de['resolvedAt']=_0x39faef,_0x58982f||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x3f14f5=this['context']['plugins']['get']('PendingActions'),_0x2fc199=_0x3f14f5['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x4f83e3,'threadId':_0x86d80a})['then'](({resolvedAt:_0x182c18,resolvedBy:_0x563f45})=>{_0x3f14f5['remove'](_0x2fc199),_0x20f3de['resolvedBy']['id']!==_0x563f45&&(_0x20f3de['resolvedBy']=_0xfc5524['getUser'](_0x563f45)),_0x20f3de['resolvedAt']=_0x182c18;})['catch'](_0x19ed5c=>{throw console['error'](_0x19ed5c),new _0x3888cd('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x2bb6dc,channelId:_0x586253,isFromAdapter:_0xd1f5bf}){if(!this['hasCommentThread'](_0x2bb6dc))throw new _0x3888cd('commentsrepository-missing-comment-thread',null,{'threadId':_0x2bb6dc});const _0x295821=this['getCommentThread'](_0x2bb6dc);if(!_0x295821['isResolved'])throw new _0x3888cd('commentsrepository-reopen-comment-thread',null,{'threadId':_0x2bb6dc});if(_0x295821['resolvedBy']=null,_0x295821['resolvedAt']=null,_0xd1f5bf||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x513066=this['context']['plugins']['get']('PendingActions'),_0x4e6f37=_0x513066['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x586253,'threadId':_0x2bb6dc})['then'](()=>_0x513066['remove'](_0x4e6f37))['catch'](_0x416386=>{throw console['error'](_0x416386),new _0x3888cd('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x4a3970,isFromAdapter:_0x30cbef}){const _0x3adbfc=this['getCommentThread'](_0x4a3970);if(!_0x3adbfc)throw new _0x3888cd('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x4a3970),this['_threads']['delete'](_0x4a3970),!_0x3adbfc['isSubmitted']||_0x30cbef||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x379dfc=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2ee3ae}=_0x3adbfc,_0x1b69aa=_0x379dfc['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x2ee3ae,'threadId':_0x4a3970})['then'](()=>_0x379dfc['remove'](_0x1b69aa))['catch'](_0x428927=>{throw console['error'](_0x428927),new _0x3888cd('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x382274,unlinkedAt:_0x30b51b,context:_0x42fbc6,attributes:_0x201e2f,isFromAdapter:_0x5d5143}){if('string'!=typeof _0x382274)throw new _0x3888cd('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x382274});if(!this['hasCommentThread'](_0x382274))throw new _0x3888cd('commentsrepository-missing-comment-thread',null,{'threadId':_0x382274});const _0x21802a=this['getCommentThread'](_0x382274);let _0x4ff75c=!0x1;if(void 0x0!==_0x42fbc6&&_0x21802a['context']!==_0x42fbc6&&(_0x21802a['context']=_0x42fbc6,_0x4ff75c=!0x0),void 0x0!==_0x30b51b&&_0x21802a['unlinkedAt']!==_0x30b51b&&(_0x21802a['unlinkedAt']=_0x30b51b,_0x4ff75c=!0x0),_0x201e2f&&!At(_0x201e2f,_0x21802a['attributes'])&&(_0x21802a['attributes']=_0x201e2f,_0x4ff75c=!0x0),!_0x4ff75c)return Promise['resolve']();if(!_0x21802a['isSubmitted']||_0x5d5143||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x37dc73=this['context']['plugins']['get']('PendingActions'),{channelId:_0x485f5b}=_0x21802a,_0x48e398=_0x37dc73['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x485f5b,'threadId':_0x382274,'context':_0x42fbc6,'unlinkedAt':_0x30b51b,'attributes':_0x201e2f})['then'](()=>_0x37dc73['remove'](_0x48e398))['catch'](_0x3225fa=>{throw console['error'](_0x3225fa),new _0x3888cd('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x15eb28){const _0x34cc09=this['context']['plugins']['get'](y),_0x580de4=this['getCommentThread'](_0x15eb28);if(_0x580de4['_isAttached']=!0x1,this['_threadToController']['has'](_0x580de4)){const _0x238143=this['_threadToController']['get'](_0x580de4),_0x2941fa=_0x238143['view'],_0x485aab=_0x34cc09['getByInnerView'](_0x2941fa);this['_threadToController']['delete'](_0x580de4),this['_viewToController']['delete'](_0x2941fa),_0x485aab&&_0x34cc09['remove'](_0x485aab),_0x238143['destroy'](),_0x2941fa['destroy']()['then'](()=>{this['_unbindEditors'](_0x2941fa);});}}['_updateActiveAnnotation']({threadId:_0x4c2fbe,resolvedAt:_0x5cc994,unlinkedAt:_0x1ea0e4}){const _0x2b3183=!!_0x5cc994,_0x19dbdf=this['context']['plugins']['get'](y),_0x4f4708=this['getCommentThread'](_0x4c2fbe);if(this['_threadToController']['has'](_0x4f4708)){const _0x2bd558=this['_threadToController']['get'](_0x4f4708)['view'],_0x2e5372=_0x19dbdf['getByInnerView'](_0x2bd558);_0x2e5372&&(_0x2b3183&&_0x19dbdf['_removeActiveAnnotation'](_0x2e5372),_0x1ea0e4?_0x2e5372['isVisible']=!0x1:_0x2e5372['refreshVisibility']());}}['_getExternalAuthor'](_0x56a020){const _0x5065a4=this['context']['plugins']['get'](it),_0x388e7a=It('external:'+_0x56a020),_0x54aadf=_0x5065a4['getUser'](_0x388e7a);return _0x54aadf||_0x5065a4['addUser']({'id':_0x388e7a,'name':_0x56a020});}['_createNewComment']({threadId:_0x105564,commentId:_0x43d875=_0x2f9c10(),content:_0x40f56b,authorId:_0x180002,createdAt:_0x1cb0c5,attributes:_0x4e1f90}){if('string'!=typeof _0x43d875)throw new _0x3888cd('commentsrepository-invalid-commentid');if('string'!=typeof _0x180002)throw new _0x3888cd('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x40f56b||!_0x40f56b['trim']())throw new _0x3888cd('commentsrepository-invalid-comment-content');const _0x53c702=this['context']['plugins']['get'](it)['getUser'](_0x180002);if(!_0x53c702)throw new _0x3888cd('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x180002});let _0x57c138=null,_0x3dee01=_0x1cb0c5;return _0x4e1f90?.['@external']&&(_0x57c138=this['_getExternalAuthor'](_0x4e1f90['@external']['authorName']),_0x3dee01=new Date(_0x4e1f90['@external']['createdAt'])),new wi(this,{'threadId':_0x105564,'id':_0x43d875,'author':_0x57c138||_0x53c702,'creator':_0x53c702,'content':_0x40f56b,'createdAt':_0x1cb0c5,'authoredAt':_0x3dee01,'attributes':_0x4e1f90});}['_addComment'](_0x5a0aaf){let {threadId:_0x223c18,content:_0x16273b,attributes:_0x11dd13,isFromAdapter:_0x44a4f6}=_0x5a0aaf;const _0x3404a9=this['getCommentThread'](_0x5a0aaf['threadId']);if(!_0x3404a9)throw new _0x3888cd('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x37de5a=this['_createNewComment'](_0x5a0aaf),{id:_0x694b34}=_0x37de5a;if(_0x3404a9['_add'](_0x37de5a),_0x44a4f6||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x3404a9['isSubmitted'])return Promise['resolve']();const _0x499355=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2e24bd}=_0x3404a9,_0x3d2ce5=_0x499355['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x11dd13||(_0x11dd13={}),this['adapter']['addComment']({'channelId':_0x2e24bd,'threadId':_0x223c18,'commentId':_0x694b34,'content':_0x16273b,'attributes':_0x11dd13})['then'](_0x11db41=>{_0x499355['remove'](_0x3d2ce5),_0x11db41&&this['_updateComment']({'channelId':_0x2e24bd,'threadId':_0x223c18,'commentId':_0x694b34,'createdAt':_0x11db41['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x25da48=>{throw console['error'](_0x25da48),new _0x3888cd('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x4b0fe9,commentId:_0xf1884c,content:_0x214fb5,createdAt:_0x3ea924,attributes:_0x202531,isFromAdapter:_0x54245d}){if(void 0x0!==_0x214fb5&&('string'!=typeof _0x214fb5||!_0x214fb5['trim']()['length']))throw new _0x3888cd('commentsrepository-update-comment-invalid-content');const _0x4f8889=this['getCommentThread'](_0x4b0fe9),_0x366675=_0x4f8889['getComment'](_0xf1884c);if(!_0x366675)throw new _0x3888cd('commentsrepository-update-missing-comment',this);let _0x531e5f=!0x1;if(_0x214fb5&&_0x214fb5!==_0x366675['content']&&(_0x366675['isEditable']||_0x54245d)&&(_0x366675['content']=_0x214fb5,_0x531e5f=!0x0),_0x3ea924&&_0x3ea924!==_0x366675['createdAt']&&(_0x366675['createdAt']=_0x3ea924,_0x366675['attributes']&&_0x366675['attributes']['@external']||(_0x366675['authoredAt']=_0x3ea924),_0x531e5f=!0x0),_0x202531&&!At(_0x202531,_0x366675['attributes'])&&(_0x366675['attributes']=_0x202531,_0x531e5f=!0x0),!_0x531e5f)return Promise['resolve']();if(_0x4f8889['fire']('commentUpdated'),_0x54245d||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x2a7592=this['context']['plugins']['get']('PendingActions'),{channelId:_0x37a8ad}=this['getCommentThread'](_0x366675['threadId']),_0x1826b7=_0x2a7592['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x37a8ad,'threadId':_0x4b0fe9,'commentId':_0xf1884c,'content':_0x214fb5,'attributes':_0x202531})['then'](()=>_0x2a7592['remove'](_0x1826b7))['catch'](_0x98a6e4=>{throw console['error'](_0x98a6e4),new _0x3888cd('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0xc50efa,commentId:_0x1f19d8,isFromAdapter:_0x78204}){const _0xcbef74=this['getCommentThread'](_0xc50efa),_0x5c4d2f=_0xcbef74['getComment'](_0x1f19d8);if(!_0x5c4d2f)throw new _0x3888cd('commentsrepository-remove-missing-comment',this);if(_0xcbef74['_remove'](_0x5c4d2f),_0x78204||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0xcdb8dc=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3f0544}=_0xcbef74,_0x4ac605=_0xcdb8dc['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x3f0544,'threadId':_0xc50efa,'commentId':_0x1f19d8})['then'](()=>_0xcdb8dc['remove'](_0x4ac605))['catch'](_0x19b0e2=>{throw console['error'](_0x19b0e2),new _0x3888cd('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x36005d(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x4f3adc,_0x46bab7){super();const _0x9e98d7=_0x4f3adc['context']['plugins']['get'](it)['me'],_0x3c36f9=_0x4f3adc['getCommentThread'](_0x46bab7['threadId']),_0x467fa8=0x0===_0x3c36f9['comments']['length'],_0x3d0310=_0x9e98d7===_0x46bab7['author'];this['id']=_0x46bab7['id'],this['threadId']=_0x46bab7['threadId'],this['author']=_0x46bab7['author'],this['creator']=_0x46bab7['creator'],this['isExternal']=Boolean(_0x46bab7['attributes']&&_0x46bab7['attributes']['@external']),this['set']('content',_0x46bab7['content']),this['createdAt']=_0x46bab7['createdAt']||new Date(),this['set']('authoredAt',_0x46bab7['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x3c36f9,'resolvedAt'),this['set']('attributes',_0x46bab7['attributes']||{}),this['bind']('isEditable')['to'](_0x4f3adc,'_permissions',()=>{const _0xcbcbef=_0x4f3adc['getPermissions'](_0x3c36f9['channelId'])['write'],_0x6df944=_0x4f3adc['getPermissions'](_0x3c36f9['channelId'])['modifyAll'];return _0x3d0310&&_0xcbcbef||!_0x3d0310&&_0x6df944;}),this['bind']('isRemovable')['to'](_0x3c36f9,'isRemovable',_0x4f3adc,'_permissions',_0x1beaec=>{const _0x351ff8=_0x4f3adc['getPermissions'](_0x3c36f9['channelId'])['write'],_0x2bfd09=_0x4f3adc['getPermissions'](_0x3c36f9['channelId'])['modifyAll'];return _0x3d0310&&_0x351ff8||_0x1beaec&&_0x467fa8||!_0x3d0310&&_0x2bfd09&&!_0x467fa8;}),this['bind']('isReadOnly')['to'](_0x3c36f9,'isReadOnly'),this['_repository']=_0x4f3adc;}get['weight'](){return Math['max'](function(_0x115686){const _0x175656=document['createElement']('div');return _0x175656['innerHTML']=_0x115686,_0x175656['textContent']['length'];}(this['content']),0xc8);}['update'](_0x3fd022){const {threadId:_0x5a8932,id:_0x43ce72}=this;if(!this['_repository']['hasCommentThread'](_0x5a8932))throw new _0x3888cd('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x136681}=this['_repository']['getCommentThread'](_0x5a8932);this['_repository']['fire'](Nt('updateComment',_0x136681,_0x5a8932),{'channelId':_0x136681,'threadId':_0x5a8932,'commentId':_0x43ce72,..._0x3fd022});}['setAttribute'](_0x1a4b41,_0x483ec6){const _0x33541d=wt(this['attributes']);yt(_0x33541d,_0x1a4b41,_0x483ec6),this['update']({'attributes':_0x33541d});}['removeAttribute'](_0x2d742a){const _0x343bbd=wt(this['attributes']);Ct(_0x343bbd,_0x2d742a),this['update']({'attributes':_0x343bbd});}['remove'](_0x42f486={}){if(!_0x42f486['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x2db9c7,id:_0xe166a}=this;if(!this['_repository']['hasCommentThread'](_0x2db9c7))throw new _0x3888cd('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x271f82}=this['_repository']['getCommentThread'](_0x2db9c7);this['_repository']['fire'](Nt('removeComment',_0x271f82,_0x2db9c7),{'channelId':_0x271f82,'threadId':_0x2db9c7,'commentId':_0xe166a,..._0x42f486});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x2ca6da,..._0x426651){for(const _0x4fd212 of _0x426651)void 0x0!==_0x4fd212&&(_0x2ca6da+=':'+String(_0x4fd212));return _0x2ca6da;}class ot extends _0x491be9{constructor(_0x93552d){super(_0x93552d),this['set']('hasContent',!0x1);}['refresh'](){const _0x2fa8a2=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x159e27 of _0x2fa8a2['getRanges']())if(this['_hasContent'](_0x159e27))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x3c5618=_0x2f9c10(),ranges:_0xe5c556,comment:_0x44bc9e}={}){const _0x11ee25=this['editor']['model'],_0x422798=_0xe5c556??Array['from'](_0x11ee25['document']['selection']['getRanges']()),_0x3ce3de=[];for(const _0x1ae68f of _0x422798)this['_hasContent'](_0x1ae68f)&&_0x3ce3de['push'](this['_trimToContent'](_0x1ae68f));if(!_0x3ce3de['length'])throw new _0x3888cd('addcommentthreadcommand-incorrect-ranges',null);_0x44bc9e&&this['_createCommentThread'](_0x3c5618,_0x44bc9e),this['_createMarkersFromRanges'](_0x3c5618,_0x3ce3de,!!_0x44bc9e);}['_createMarkersFromRanges'](_0x3463d1,_0x423c9a,_0x2fef3c){this['editor']['model']['change'](_0x22bc20=>{for(const _0x2ef68e of _0x423c9a){const _0x3328c2=_0x2f9c10()['substr'](0x1,0x5),_0x19db78='comment:'+_0x3463d1+':'+_0x3328c2;_0x22bc20['addMarker'](_0x19db78,{'range':_0x2ef68e,'usingOperation':_0x2fef3c,'affectsData':_0x2fef3c});}});}['_createCommentThread'](_0x425c8a,_0x441370){const _0x3a4cad=this['editor']['plugins']['get']('CommentsRepository'),_0x6bffb0=this['editor']['config']['get']('collaboration.channelId'),_0x251207=this['editor']['plugins']['get']('Users')['me'];if(!_0x251207)throw new _0x3888cd('addcommentthreadcommand-user-not-found',null);_0x3a4cad['addCommentThread']({'threadId':_0x425c8a,'channelId':_0x6bffb0,'comments':[{'authorId':_0x251207['id'],'content':_0x441370,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x45f5c7){for(const _0x393a34 of _0x45f5c7['getItems']())if(this['_itemIsContent'](_0x393a34))return!0x0;return!0x1;}['_itemIsContent'](_0xa5ad98){return _0xa5ad98['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0xa5ad98)&&!_0xa5ad98['is']('element','tableCell');}['_trimToContent'](_0x1ac037){const _0x1ae939=_0x1baf96=>!this['_itemIsContent'](_0x1baf96['item']),_0x5d5a8b=_0x1ac037['start']['getLastMatchingPosition'](_0x1ae939),_0x4cb51e=_0x1ac037['end']['getLastMatchingPosition'](_0x1ae939,{'direction':'backward'});return this['editor']['model']['createRange'](_0x5d5a8b,_0x4cb51e);}}class b extends _0x22a428{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xdc94f5){super(_0xdc94f5),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x191abe=this['editor'],_0x521146=_0x191abe['model']['document']['selection'],_0x35616c=_0x107550(()=>this['refreshSelectedViews'](),0xa);_0x521146['on']('change:range',(_0x5f56bd,_0x1e6cbc)=>{_0x1e6cbc['directChange']&&(_0x35616c['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x191abe['editing']['view']['document'],'change:isFocused',(_0x174b47,_0x3c81e3,_0x4ca868)=>{_0x4ca868&&_0x35616c();}),this['listenTo'](_0x191abe['ui']['focusTracker'],'change:isFocused',(_0x189183,_0x24ca01,_0x33c2d7)=>{_0x33c2d7||this['fire']('blur',{'isAnnotationTracked':_0x2473ce=>this['_editorAnnotationsData']['has'](_0x2473ce['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x18aff7){if(this['_editorAnnotations']['has'](_0x18aff7['view']))return;this['_editorAnnotations']['add'](_0x18aff7['view']),this['editor']['ui']['focusTracker']['add'](_0x18aff7['view']['element']);const _0x591494=this['editor']['plugins']['get'](y);this['listenTo'](_0x591494['collection'],'remove',(_0x10d6bb,_0x1c27bc)=>{this['editor']['ui']['focusTracker']['remove'](_0x1c27bc['view']['element']),this['_editorAnnotations']['delete'](_0x1c27bc['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x3f643e){if('function'!=typeof _0x3f643e)throw new _0x3888cd('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x3f643e);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x39823d,annotations:_0x54db34}){const _0x42ebaa=[],_0x58493e=this['editor']['model']['document']['selection'],_0x55c25b=Array['from'](_0x58493e['getRanges']());for(const [_0x1e4c06,_0xb4a586]of this['_editorAnnotationsData']){const _0x5ac613=_0x20f943(_0xb4a586),_0x423b7e=_0x54db34['getByInnerView'](_0x1e4c06);_0x5ac613&&_0x423b7e&&_0x42ebaa['push']({'annotation':_0x423b7e,'range':_0x5ac613});}function _0x20f943(_0x237ddd){for(const _0x3c9ba7 of _0x237ddd)for(const _0x206b03 of _0x55c25b)if(_0x3c9ba7['containsRange'](_0x206b03,!_0x58493e['isCollapsed']))return _0x3c9ba7;return null;}return _0x42ebaa['sort']((_0xf943ef,_0x6f91b5)=>{const _0x229828=_0xf943ef['range'],_0x18502f=_0x6f91b5['range'];if(!_0x229828['isEqual'](_0x18502f)){if(_0x229828['containsRange'](_0x18502f,!0x0))return 0x1;if(_0x18502f['containsRange'](_0x229828,!0x0))return-0x1;}return _0xf943ef['annotation']==_0x39823d?-0x1:_0x6f91b5['annotation']==_0x39823d?0x1:0x0;})['map'](_0x3ddb22=>_0x3ddb22['annotation']);}get['_editorAnnotationsData'](){const _0x1955df=new Map();for(const _0x4a9b0f of Array['from'](this['_dataCollectors']))for(const [_0x307643,_0x2d53b3]of _0x4a9b0f())_0x1955df['set'](_0x307643,_0x2d53b3);return _0x1955df;}}class st extends _0x22a428{['afterInit'](){const _0x308e60=this['editor'];if(!_0x308e60['plugins']['has']('RestrictedEditingModeEditing'))return;_0x308e60['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x22a428{constructor(_0x41e219){super(_0x41e219),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x2ebbdb=this['editor'],_0x509d18=_0x2ebbdb['commands']['get']('importWord'),_0x4a5fcc=_0x2ebbdb['plugins']['get'](it);_0x509d18&&(_0x509d18['on']('execute',(_0x1a20ec,[,_0x476eae])=>{_0x476eae['collaboration_features']={'comments':!0x0,'user_id':_0x4a5fcc['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x509d18,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x4601d1,_0x2c10c9){const {comment_threads:_0x380f80}=_0x2c10c9;_0x380f80&&_0x380f80['forEach'](({thread_id:_0x1d73dc,comments:_0x5b9eb8,is_resolved:_0x12f71c})=>{const _0x4da9bc=new Date(),_0x5f3508=_0x5b9eb8['map'](({author:_0x3ce959,content:_0x536f8d,created_at:_0x5da9aa})=>({'content':_0x536f8d,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x4da9bc,'attributes':{'@external':{'authorName':_0x3ce959,'createdAt':_0x5da9aa?new Date(_0x5da9aa):new Date(),'source':'importWord'}}})),_0x2a25b5=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x2a25b5,'threadId':_0x1d73dc,'comments':_0x5f3508,'resolvedAt':_0x12f71c?_0x4da9bc:null});});}}class at extends _0x22a428{constructor(_0x210558){super(_0x210558),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x5a7f77=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x5a7f77,'contentInsertion',(_0x5616e5,_0x38e6c4)=>this['_removeMarkersWithoutThreads'](_0x38e6c4['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x4583ac){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x4583ac;const _0x4fb3d4=this['editor']['plugins']['get']('CommentsRepository');for(const _0x184ad3 of _0x4583ac['keys']()){const [_0x23bfc6,_0x1e1b1e]=_0x184ad3['split'](':');'comment'!=_0x23bfc6||_0x4fb3d4['hasCommentThread'](_0x1e1b1e)||_0x4583ac['delete'](_0x184ad3);}return _0x4583ac;}['_registerMarkerInClipboardPipeline'](){const _0x36a0c2=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x181443=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x181443&&_0x36a0c2['_registerMarkerToCopy']('comment',_0x181443);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x403d48){switch(_0x403d48){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x226a50){const _0x2946e5=_0x226a50['split'](':');return{'group':_0x2946e5[0x0],'id':_0x2946e5[0x1],'part':_0x2946e5[0x2]};}class ut extends _0x22a428{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x52bd77,_0x4cff0f)=>{if(!_0x4cff0f['options']['showCommentHighlights'])return null;if(_0x4cff0f['options']['ignoreResolvedComments']){const {id:_0x51f51f}=ft(_0x52bd77['markerName']),_0x3cb5d3=this['editor']['plugins']['get'](o);if(_0x3cb5d3['getCommentThread'](_0x51f51f)?.['isResolved']&&_0x52bd77['item'])return _0x4cff0f['consumable']['consume'](_0x52bd77['item'],'addMarker:'+_0x52bd77['markerName']),_0x4cff0f['consumable']['consume'](_0x52bd77['item'],'removeMarker:'+_0x52bd77['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x332fff=>{_0x332fff['on']('addMarker:comment',(_0x4ee6c0,_0x3d2e3e,_0xd92504)=>{if(!_0xd92504['options']['showCommentHighlights'])return;const _0x5e575c=_0x3d2e3e['item'];if(!_0x5e575c)return;const _0x5dc108=_0xd92504['mapper']['toViewElement'](_0x5e575c);this['editor']['model']['schema']['isObject'](_0x5e575c)&&_0x5dc108&&!_0x5dc108['getCustomProperty']('widget')&&_0x5dc108['is']('containerElement')&&_0x27576a(_0x5dc108,_0xd92504['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x34141f,{writer:_0x39d0be,options:_0x57bef0})=>{if(!_0x57bef0['showCommentHighlights'])return null;const _0x57804f=_0x39d0be['createContainerElement']('div'),_0x3ebd6a=_0x39d0be['createEmptyElement']('hr');return _0x39d0be['addClass']('ck-horizontal-line',_0x57804f),_0x39d0be['insert'](_0x39d0be['createPositionAt'](_0x57804f,0x0),_0x3ebd6a),_0x57804f;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x462f52,{writer:_0x4fa47d,options:_0x294715})=>{if(!_0x294715['showCommentHighlights'])return null;const _0x150354=_0x4fa47d['createContainerElement']('span'),_0x14eb9a=_0x4fa47d['createEmptyElement']('img');return _0x4fa47d['addClass']('image-inline',_0x150354),_0x4fa47d['insert'](_0x4fa47d['createPositionAt'](_0x150354,0x0),_0x14eb9a),_0x150354;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x2f9d95,{writer:_0xb3bccf,options:_0x42612d})=>{if(_0x42612d['showCommentHighlights'])return _0xb3bccf['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x4cbc84,_0xfbac0f,_0x59e7ef)=>{_0x59e7ef['options']['showCommentHighlights']&&_0x4cbc84['stop']();},{'priority':'high'});}}class r extends _0x22a428{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(_0x1f501b){super(_0x1f501b),this['set']('isThreadsLoadingPaused',!0x0),_0x1f501b['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x334152,_0x176188,_0x8445f,_0x43d3e7)=>{const _0x1bc573=_0x1f501b['plugins']['get'](o),_0x5175c9=_0x8445f?ft(_0x8445f)['id']:null;_0x1f501b['model']['change'](()=>{if(_0x5175c9){const _0x53ae73=this['getAllMarkersForId'](_0x5175c9);for(const _0x3b838c of _0x53ae73)_0x1f501b['editing']['reconvertMarker'](_0x3b838c);}if(_0x43d3e7){const {id:_0x4c4cb5}=ft(_0x43d3e7),_0x2eb128=_0x1bc573['getCommentThread'](_0x4c4cb5);if(_0x2eb128&&_0x2eb128['unlinkedAt'])return;if(_0x2eb128&&!_0x2eb128['isAttached'])return;const _0x35963e=this['getAllMarkersForId'](_0x4c4cb5);for(const _0x37d64e of _0x35963e)_0x1f501b['editing']['reconvertMarker'](_0x37d64e);}}),_0x5175c9&&this['scrollToThreadMarker'](_0x5175c9);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x229818=this['editor'],_0x28dee4=_0x229818['plugins']['get'](o),_0x47d14a=_0x229818['config']['get']('collaboration.channelId'),_0x1fefa3=_0x28dee4['getCommentThreads']()['filter'](_0x3753da=>_0x3753da['channelId']!==_0x47d14a);_0x229818['commands']['add']('addCommentThread',new ot(_0x229818)),this['listenTo'](_0x229818,'change:isReadOnly',(_0x6cc771,_0x2ef36c,_0x5ba7f7)=>{_0x28dee4['switchReadOnly'](_0x5ba7f7,_0x229818['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x28dee4,dt('addCommentThread',_0x47d14a),(_0x193c28,{threadId:_0x431971})=>{const _0x4435c2=this['editor']['plugins']['get'](o)['getCommentThread'](_0x431971);_0x4435c2?.['unlinkedAt']&&this['_attachArchivedThread'](_0x431971);}),this['listenTo'](_0x28dee4,dt('removeCommentThread',_0x47d14a),(_0x21481f,{threadId:_0x59bc73})=>{_0x229818['model']['enqueueChange']({'isUndoable':!0x1},_0x188b4a=>{const _0x285625=this['getAllMarkersForId'](_0x59bc73);for(const _0xfa8634 of _0x285625)_0x188b4a['removeMarker'](_0xfa8634);});}),this['listenTo'](_0x28dee4,dt('resolveCommentThread',_0x47d14a),(_0x475288,{threadId:_0x26b7e2})=>{(this['_reconvertMarkers'](_0x26b7e2),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x26b7e2)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x28dee4,dt('reopenCommentThread',_0x47d14a),(_0x38d818,{threadId:_0x2000b8})=>{this['_reconvertMarkers'](_0x2000b8);},{'priority':'low'}),this['listenTo'](_0x28dee4,dt('addComment',_0x47d14a),(_0x388459,{threadId:_0x584949,isFromAdapter:_0x23cb49})=>{const _0x19ba79=this['getAllMarkersForId'](_0x584949);if(_0x23cb49||0x0==_0x19ba79['length']||!_0x28dee4['hasCommentThread'](_0x584949))return;0x1===_0x28dee4['getCommentThread'](_0x584949)['length']&&_0x229818['model']['enqueueChange']({'isUndoable':!0x1},_0x139f5e=>{for(const _0x5a46fc of _0x19ba79)_0x139f5e['updateMarker'](_0x5a46fc,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x1fefa3);}['afterInit'](){!async function(_0xd10946){const _0x4a7c51=_0x12bc8c([0x32,0x67,0x6f,0x54,0x47,0x61,0x52,0x5a,0x70,0x33,0x46,0x6b,0x48,0x6c,0x42,0x4b,0x6a,0x71,0x44,0x6d,0x4a,0x4d,0x58,0x50,0x63,0x74,0x64,0x39,0x59,0x62,0x51,0x68,0x4e,0x77,0x45,0x37,0x79,0x41,0x30,0x56,0x53,0x66,0x34,0x31,0x78,0x36,0x49,0x4f,0x65,0x75,0x6e,0x55,0x35,0x72,0x38,0x69,0x43,0x76,0x4c,0x57,0x7a,0x73]),_0x55c347=0x57d7d8af,_0x15c858=0x57d0b757^_0x55c347,_0xabe448=window[_0x12bc8c([0x44,0x61,0x74,0x65])][_0x12bc8c([0x6e,0x6f,0x77])](),_0x434189=_0xd10946[_0x12bc8c([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3d6d50=new window[(_0x12bc8c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4da332=>{_0x434189[_0x12bc8c([0x6f,0x6e,0x63,0x65])](_0x12bc8c([0x72,0x65,0x61,0x64,0x79]),_0x4da332);}),_0x37c932={[_0x12bc8c([0x6b,0x74,0x79])]:_0x12bc8c([0x45,0x43]),[_0x12bc8c([0x75,0x73,0x65])]:_0x12bc8c([0x73,0x69,0x67]),[_0x12bc8c([0x63,0x72,0x76])]:_0x12bc8c([0x50,0x2d,0x32,0x35,0x36]),[_0x12bc8c([0x78])]:_0x12bc8c([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]),[_0x12bc8c([0x79])]:_0x12bc8c([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]),[_0x12bc8c([0x61,0x6c,0x67])]:_0x12bc8c([0x45,0x53,0x32,0x35,0x36])},_0x294b78=_0x434189[_0x12bc8c([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x12bc8c([0x67,0x65,0x74])](_0x12bc8c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x4126b9(){let _0x47cec3,_0x2bca5f=null,_0x3c64e3=null;try{if(_0x294b78==_0x12bc8c([0x47,0x50,0x4c]))return _0x12bc8c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x47cec3=_0x380881(),!_0x47cec3)return _0x12bc8c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x47cec3[_0x12bc8c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3c64e3=_0x2795b9(_0x47cec3[_0x12bc8c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x47cec3[_0x12bc8c([0x6a,0x74,0x69])])),await _0x2a5632()?_0x46fa25()?_0x1bc0c0()?_0x12bc8c([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x361dbf()?(_0x47cec3[_0x12bc8c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x12bc8c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2bca5f=_0x1fc522(_0x12bc8c([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x47cec3[_0x12bc8c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x12bc8c([0x74,0x72,0x69,0x61,0x6c])&&(_0x2bca5f=_0x1fc522(_0x12bc8c([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3d37d8()):_0x12bc8c([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x12bc8c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x12bc8c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x12bc8c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1bc0c0(){const _0x3af79f=[_0x12bc8c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x12bc8c([0x74,0x72,0x69,0x61,0x6c])][_0x12bc8c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x47cec3[_0x12bc8c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xabe448/0x3e8:0xe10*_0x15c858;return _0x47cec3[_0x12bc8c([0x65,0x78,0x70])]<_0x3af79f;}function _0x46fa25(){const _0x2076d4=_0x47cec3[_0x12bc8c([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x2076d4)return!0x1;if(_0x2076d4[_0x12bc8c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x12bc8c([0x2a])))return!0x0;if(_0x2076d4[_0x12bc8c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x12bc8c([0x43,0x4d,0x54])))return!0x0;if(_0x2076d4[_0x12bc8c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x12bc8c([0x52,0x43,0x4d,0x54]))){if(_0x2afc3e())return!0x0;if(_0x1899ae()||_0x1a03e7())return!0x0;}return!0x1;}function _0x361dbf(){const _0x30961=_0x47cec3[_0x12bc8c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x30961||0x0==_0x30961[_0x12bc8c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5c63ea}=new URL(window[_0x12bc8c([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x30961[_0x12bc8c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5c63ea))return!0x0;const _0x54da22=_0x5c63ea[_0x12bc8c([0x73,0x70,0x6c,0x69,0x74])](_0x12bc8c([0x2e]));return _0x30961[_0x12bc8c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x399c26=>_0x399c26[_0x12bc8c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x12bc8c([0x2a])))[_0x12bc8c([0x6d,0x61,0x70])](_0x448327=>_0x448327[_0x12bc8c([0x73,0x70,0x6c,0x69,0x74])](_0x12bc8c([0x2e])))[_0x12bc8c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1fcfa9=>_0x1fcfa9[_0x12bc8c([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x54da22[_0x12bc8c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x12bc8c([0x6d,0x61,0x70])](_0x4914eb=>Array(_0x54da22[_0x12bc8c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x4914eb[_0x12bc8c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x12bc8c([0x66,0x69,0x6c,0x6c])](_0x4914eb[0x0]===_0x12bc8c([0x2a])?_0x12bc8c([0x2a]):'')[_0x12bc8c([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x4914eb))[_0x12bc8c([0x73,0x6f,0x6d,0x65])](_0x4cfefd=>_0x54da22[_0x12bc8c([0x65,0x76,0x65,0x72,0x79])]((_0x172cd8,_0x525293)=>_0x4cfefd[_0x525293]===_0x172cd8||_0x4cfefd[_0x525293]===_0x12bc8c([0x2a])));}function _0x3d37d8(){return _0x2bca5f&&_0x3c64e3?new window[(_0x12bc8c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x59ef75,_0x4c279b)=>{_0x2bca5f[_0x12bc8c([0x74,0x68,0x65,0x6e])](_0x59ef75,_0x4c279b),_0x3c64e3[_0x12bc8c([0x74,0x68,0x65,0x6e])](_0x53ef72=>{_0x53ef72!=_0x12bc8c([0x56,0x61,0x6c,0x69,0x64])&&_0x59ef75(_0x53ef72);},_0x4c279b);}):_0x2bca5f||_0x3c64e3||_0x12bc8c([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2795b9(_0x1bda87,_0x763689){return new window[(_0x12bc8c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x6d6ddb=>{if(_0x262aef())return _0x6d6ddb(_0x12bc8c([0x56,0x61,0x6c,0x69,0x64]));_0x271001(),_0x434189[_0x12bc8c([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x12bc8c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2af2d7=!0x1;const _0x2d0f5e=_0x2f9c10();function _0x5357ab(_0x1f2a68){return!!_0x1f2a68&&(typeof _0x1f2a68===_0x12bc8c([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1f2a68===_0x12bc8c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1f2a68[_0x12bc8c([0x74,0x68,0x65,0x6e])]===_0x12bc8c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1f2a68[_0x12bc8c([0x63,0x61,0x74,0x63,0x68])]===_0x12bc8c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x2cbfea(_0x4a02c6){_0x35e01d(_0x4a02c6)[_0x12bc8c([0x74,0x68,0x65,0x6e])](_0x2158cd=>{if(!_0x2158cd||_0x2158cd[_0x12bc8c([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x12bc8c([0x6f,0x6b]))return _0x12bc8c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x40a036(_0x39db05(_0x2d0f5e+_0x763689))!=_0x2158cd[_0x12bc8c([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x12bc8c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x12bc8c([0x56,0x61,0x6c,0x69,0x64]);})[_0x12bc8c([0x74,0x68,0x65,0x6e])](_0x58b1e2=>(_0x4639b9(),_0x58b1e2),()=>{const _0x2bc258=_0x353fcc();return null==_0x2bc258?(_0x4639b9(),_0x12bc8c([0x56,0x61,0x6c,0x69,0x64])):_0x12bc8c(_0xabe448-_0x2bc258>(0x73db5caf^_0x55c347)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x12bc8c([0x74,0x68,0x65,0x6e])](_0x6d6ddb)[_0x12bc8c([0x63,0x61,0x74,0x63,0x68])](()=>{_0x6d6ddb(_0x12bc8c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x309aa9=0x57e1362f^_0x55c347;function _0x4639b9(){const _0x13f3d1=_0x12bc8c([0x6c,0x6c,0x63,0x74,0x2d])+_0x40a036(_0x39db05(_0x1bda87)),_0x2cf6c4=_0x58dc9(_0x40a036(window[_0x12bc8c([0x4d,0x61,0x74,0x68])][_0x12bc8c([0x63,0x65,0x69,0x6c])](_0xabe448/_0x309aa9)));window[_0x12bc8c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x12bc8c([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x13f3d1,_0x2cf6c4);}function _0x353fcc(){const _0x406309=_0x12bc8c([0x6c,0x6c,0x63,0x74,0x2d])+_0x40a036(_0x39db05(_0x1bda87)),_0x1a811a=window[_0x12bc8c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x12bc8c([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x406309);return _0x1a811a?window[_0x12bc8c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x58dc9(_0x1a811a),0x10)*_0x309aa9:null;}function _0x35e01d(_0x28aa1f){return new window[(_0x12bc8c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5baaec,_0x5b5a28)=>{_0x28aa1f[_0x12bc8c([0x74,0x68,0x65,0x6e])](_0x5baaec,_0x5b5a28),window[_0x12bc8c([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5b5a28,0x57d60c6f^_0x55c347);});}}_0x434189[_0x12bc8c([0x6f,0x6e])](_0x12bc8c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5b113c,_0x3283d6)=>{if(_0x3283d6[0x0]!=_0x1bda87)return _0x6d6ddb(_0x12bc8c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3283d6[0x1]={..._0x3283d6[0x1],[_0x12bc8c([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2d0f5e};},{[_0x12bc8c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x12bc8c([0x68,0x69,0x67,0x68])}),_0x434189[_0x12bc8c([0x6f,0x6e])](_0x12bc8c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xf0a2cd=>{_0x5357ab(_0xf0a2cd[_0x12bc8c([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2af2d7=!0x0,_0x2cbfea(_0xf0a2cd[_0x12bc8c([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x12bc8c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x12bc8c([0x6c,0x6f,0x77])}),_0x3d6d50[_0x12bc8c([0x74,0x68,0x65,0x6e])](()=>{_0x2af2d7||_0x6d6ddb(_0x12bc8c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x262aef(){return _0x434189[_0x12bc8c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x12bc8c([0x76,0x69,0x65,0x77])][_0x12bc8c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x12bc8c([0x61,0x75,0x74,0x6f]);}function _0x271001(){_0x434189[_0x12bc8c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x12bc8c([0x76,0x69,0x65,0x77])][_0x12bc8c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x12bc8c([0x61,0x75,0x74,0x6f]);}}function _0x1fc522(_0x16240e){const _0x577ff1=[new window[(_0x12bc8c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2c6fac=>setTimeout(_0x2c6fac,0x57dee663^_0x55c347)),_0x3d6d50[_0x12bc8c([0x74,0x68,0x65,0x6e])](()=>new window[(_0x12bc8c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4c0f34=>{let _0x2c2511=0x0;_0x434189[_0x12bc8c([0x6d,0x6f,0x64,0x65,0x6c])][_0x12bc8c([0x6f,0x6e])](_0x12bc8c([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x20c2dd,_0x9dde1f)=>{_0x9dde1f[0x0][_0x12bc8c([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x2c2511++,_0x2c2511==(0x57d7d957^_0x55c347)&&(_0x4c0f34(),_0x20c2dd[_0x12bc8c([0x6f,0x66,0x66])]());});}))];return window[_0x12bc8c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x12bc8c([0x72,0x61,0x63,0x65])](_0x577ff1)[_0x12bc8c([0x74,0x68,0x65,0x6e])](()=>_0x16240e);}async function _0xdb3a17(){await _0x3d6d50,_0x434189[_0x12bc8c([0x6d,0x6f,0x64,0x65,0x6c])][_0x12bc8c([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x44add1,_0x434189[_0x12bc8c([0x6d,0x6f,0x64,0x65,0x6c])][_0x12bc8c([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x44add1,_0x434189[_0x12bc8c([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x12bc8c([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2afc3e(){return _0x133d5f(_0x12bc8c([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x10dc06(_0x12bc8c([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x12bc8c([0x73,0x74,0x61,0x74,0x65])]==_0x12bc8c([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x1899ae(){return _0x133d5f(_0x12bc8c([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 _0x1a03e7(){return _0x133d5f(_0x12bc8c([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x24a8e3(_0x18c69f){const _0x4d9352=_0x580292();_0x434189[_0x4d9352]=_0x12bc8c([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x18c69f,_0x18c69f!=_0x12bc8c([0x56,0x61,0x6c,0x69,0x64])&&_0xdb3a17();}function _0x580292(){const _0x16bc4e=window[_0x12bc8c([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x12bc8c([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x12bc8c([0x6e,0x6f,0x77])]())[_0x12bc8c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x12bc8c([0x2e]),'');let _0x480884=_0x12bc8c([0x67]);for(let _0x19f7fb=0x0;_0x19f7fb<_0x16bc4e[_0x12bc8c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x19f7fb+=0x2){let _0x4910ec=window[_0x12bc8c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x16bc4e[_0x12bc8c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x19f7fb,_0x19f7fb+0x2));_0x4910ec>=_0x4a7c51[_0x12bc8c([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4910ec-=_0x4a7c51[_0x12bc8c([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x480884+=_0x4a7c51[_0x4910ec];}return _0x480884;}function _0x380881(){const _0x3ffdc1=_0x294b78[_0x12bc8c([0x73,0x70,0x6c,0x69,0x74])](_0x12bc8c([0x2e]));if(0x3!=_0x3ffdc1[_0x12bc8c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x299cfa(_0x3ffdc1[0x1]);function _0x299cfa(_0xfb7c2e){const _0x24cddb=_0x42df3a(_0xfb7c2e);return _0x24cddb&&_0x519041()?_0x24cddb:null;function _0x519041(){const _0x17d219=_0x24cddb[_0x12bc8c([0x6a,0x74,0x69])],_0x9a2b38=window[_0x12bc8c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x17d219[_0x12bc8c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x17d219[_0x12bc8c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x31052a={..._0x24cddb,[_0x12bc8c([0x6a,0x74,0x69])]:_0x17d219[_0x12bc8c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x17d219[_0x12bc8c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x31052a[_0x12bc8c([0x76,0x63])],_0x39db05(_0x31052a)==_0x9a2b38;}}}async function _0x2a5632(){let _0x3a8241=!0x0;try{const _0x284cfa=_0x294b78[_0x12bc8c([0x73,0x70,0x6c,0x69,0x74])](_0x12bc8c([0x2e])),[_0x3b1a9d,_0x5e4a19,_0xa93e45]=_0x284cfa;return _0x53e644(_0x3b1a9d),await _0x4f3161(_0x3b1a9d,_0x5e4a19,_0xa93e45),_0x3a8241;}catch{return!0x1;}function _0x53e644(_0x26d774){const _0x321b25=_0x42df3a(_0x26d774);_0x321b25&&_0x321b25[_0x12bc8c([0x61,0x6c,0x67])]==_0x12bc8c([0x45,0x53,0x32,0x35,0x36])||(_0x3a8241=!0x1);}async function _0x4f3161(_0x117307,_0x3548a5,_0x11bc94){const _0x4c6574=window[_0x12bc8c([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x12bc8c([0x66,0x72,0x6f,0x6d])](_0x4b421f(_0x11bc94),_0x491ccf=>_0x491ccf[_0x12bc8c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4adec2=new window[(_0x12bc8c([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x12bc8c([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x117307+_0x12bc8c([0x2e])+_0x3548a5),_0x5d2988=window[_0x12bc8c([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x12bc8c([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5d2988)return;const _0xf93543=await _0x5d2988[_0x12bc8c([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x12bc8c([0x6a,0x77,0x6b]),_0x37c932,{[_0x12bc8c([0x6e,0x61,0x6d,0x65])]:_0x12bc8c([0x45,0x43,0x44,0x53,0x41]),[_0x12bc8c([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x12bc8c([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x12bc8c([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5d2988[_0x12bc8c([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x12bc8c([0x6e,0x61,0x6d,0x65])]:_0x12bc8c([0x45,0x43,0x44,0x53,0x41]),[_0x12bc8c([0x68,0x61,0x73,0x68])]:{[_0x12bc8c([0x6e,0x61,0x6d,0x65])]:_0x12bc8c([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0xf93543,_0x4c6574,_0x4adec2)||(_0x3a8241=!0x1);}}function _0x42df3a(_0x3ec347){return _0x3ec347[_0x12bc8c([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x12bc8c([0x65,0x79]))?JSON[_0x12bc8c([0x70,0x61,0x72,0x73,0x65])](_0x4b421f(_0x3ec347)):null;}function _0x4b421f(_0x2f5b3e){return window[_0x12bc8c([0x61,0x74,0x6f,0x62])](_0x2f5b3e[_0x12bc8c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x12bc8c([0x2b]))[_0x12bc8c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x12bc8c([0x2f])));}function _0x39db05(_0x5c90ff){let _0x3893b0=0x1505;function _0xcfced1(_0x1676ec){for(let _0x4d4b5e=0x0;_0x4d4b5e<_0x1676ec[_0x12bc8c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4d4b5e++){const _0x3b9148=_0x1676ec[_0x12bc8c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4d4b5e);_0x3893b0=(_0x3893b0<<0x5)+_0x3893b0+_0x3b9148,_0x3893b0&=_0x3893b0;}}function _0x21a45a(_0x55e62c){Array[_0x12bc8c([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x55e62c)?_0x55e62c[_0x12bc8c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x21a45a):_0x55e62c&&typeof _0x55e62c==_0x12bc8c([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x12bc8c([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x55e62c)[_0x12bc8c([0x73,0x6f,0x72,0x74])]()[_0x12bc8c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x490f3e,_0x31b80e])=>{_0xcfced1(_0x490f3e),_0x21a45a(_0x31b80e);}):_0xcfced1(window[_0x12bc8c([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x55e62c));}return _0x21a45a(_0x5c90ff),_0x3893b0>>>0x0;}function _0x40a036(_0x304ed6){return _0x304ed6[_0x12bc8c([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x12bc8c([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x12bc8c([0x30]));}function _0x58dc9(_0x1a3ab5){return _0x1a3ab5[_0x12bc8c([0x73,0x70,0x6c,0x69,0x74])]('')[_0x12bc8c([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x12bc8c([0x6a,0x6f,0x69,0x6e])]('');}function _0x133d5f(_0xe46d9d){return _0x434189[_0x12bc8c([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x12bc8c([0x68,0x61,0x73])](_0xe46d9d);}function _0x10dc06(_0x81c1fb){return _0x434189[_0x12bc8c([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x12bc8c([0x67,0x65,0x74])](_0x81c1fb);}function _0x44add1(){}function _0x12bc8c(_0x101873){return _0x101873['map'](_0x3549cf=>String['fromCharCode'](_0x3549cf))['join']('');}_0x24a8e3(await _0x4126b9());}(this);}['destroy'](){const _0x5bd11b=this['editor']['plugins']['get'](o),_0x1e4fc3=this['editor']['config']['get']('collaboration.channelId');for(const _0x4576cd of _0x5bd11b['getCommentThreads']({'channelId':_0x1e4fc3}))_0x5bd11b['_detachCommentThread'](_0x4576cd['id']),_0x5bd11b['_threads']['delete'](_0x4576cd['id']);super['destroy']();}['hasMarkerForId'](_0x1772a5){return this['getAllMarkersForId'](_0x1772a5)['length']>0x0;}['getAllMarkersForId'](_0x51d187){const _0x1e51f4=[];for(const _0x4100f4 of this['editor']['model']['markers'])_0x4100f4['name']['startsWith']('comment:'+_0x51d187)&&_0x1e51f4['push'](_0x4100f4);return _0x1e51f4;}['scrollToThreadMarker'](_0x4e5fa4){setTimeout(()=>{const _0x3b3cc0=this['_getTargetForId'](_0x4e5fa4);if(!_0x3b3cc0)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x4e5fa4&&nt({'target':_0x3b3cc0[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x244666){this['editor']['model']['change'](()=>{for(const _0x28e590 of this['getAllMarkersForId'](_0x244666))this['editor']['editing']['reconvertMarker'](_0x28e590);});}['_attachArchivedThread'](_0x494926){const _0x543d16=this['editor']['plugins']['get'](o),_0x48a40e=this['editor']['plugins']['get'](b),_0x5711f8=_0x543d16['getCommentThread'](_0x494926);if(!_0x5711f8['isAttached']){const _0x268ddf=_0x5711f8['attachTo'](()=>this['_getTargetForId'](_0x5711f8['id']));_0x48a40e['registerAnnotation'](_0x268ddf),_0x5711f8['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x578477=this['editor'],_0x2c4695=_0x578477['plugins']['get'](it);_0x578477['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x4d68dc,_0x43f0d2)=>{const {id:_0x2c38fd}=ft(_0x4d68dc['markerName']),_0x4d4316=_0x578477['plugins']['get'](o)['getCommentThread'](_0x2c38fd),_0x43a391=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x2c38fd;let _0x557490;if(_0x4d4316&&_0x4d4316['isResolved']&&!_0x43a391&&_0x4d68dc['item'])return _0x43f0d2['consumable']['consume'](_0x4d68dc['item'],'addMarker:'+_0x4d68dc['markerName']),_0x43f0d2['consumable']['consume'](_0x4d68dc['item'],'removeMarker:'+_0x4d68dc['markerName']),null;const _0x25f6ac=['ck-comment-marker'];return _0x43a391&&_0x25f6ac['push']('ck-comment-marker--active'),_0x557490=_0x4d4316?.['length']?_0x4d4316['comments']['first']['author']['id']:_0x2c4695['me']['id'],{'classes':_0x25f6ac,'attributes':{'data-comment':_0x2c38fd,'data-author-id':_0x557490}};}}),_0x578477['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x2b8c88,{options:_0x147950})=>{if(_0x147950['showCommentHighlights'])return null;const _0x4eb772=_0x578477['plugins']['get'](o),_0x40df04=_0x578477['model']['markers']['get'](_0x2b8c88),{id:_0xb31842,part:_0x4c8774}=ft(_0x2b8c88);return _0x40df04&&!_0x40df04['affectsData']||_0x147950['ignoreResolvedComments']&&_0x4eb772['getCommentThread'](_0xb31842)?.['isResolved']?null:{'group':'comment','name':_0x4c8774?_0xb31842+':'+_0x4c8774:_0xb31842};}}),_0x578477['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x3786a7,{writer:_0x17b119})=>_0x17b119['createElement']('$marker',{'data-name':'comment:'+_0x3786a7['getAttribute']('id')})}),_0x578477['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x1945cc=this['editor'],_0x5dcba5=_0x1945cc['plugins']['get'](o),_0x3e2852=new Set(),_0x5bd4af=new Set();_0x1945cc['model']['document']['registerPostFixer'](_0x3db950=>{let _0x3deb21=!0x1;for(const {name:_0x3d1b57,data:_0x2e672d}of _0x1945cc['model']['document']['differ']['getChangedMarkers']()){const {group:_0x8b5e27,id:_0xc7d971}=ft(_0x3d1b57);let _0x55e2eb=_0x2e672d['newRange'];if('comment'!==_0x8b5e27||!_0x55e2eb)continue;const _0x409e3b='$graveyard'===_0x55e2eb['root']['rootName'];_0x409e3b||(_0x55e2eb=ht(_0x55e2eb,_0x1945cc['model']),!_0x55e2eb||_0x55e2eb['isCollapsed']||!_0x2e672d['newRange']||_0x55e2eb['isEqual'](_0x2e672d['newRange']))?_0x1945cc['model']['hasContent'](_0x55e2eb)&&!_0x409e3b?this['isThreadsLoadingPaused']?_0x3e2852['add'](_0x3d1b57):this['_handleThreadMarker'](_0x3d1b57,_0xc7d971):(_0x5bd4af['add'](_0x3d1b57),_0x3e2852['delete'](_0x3d1b57),_0x3db950['removeMarker'](_0x3d1b57),_0x3deb21=!0x0):(_0x3db950['updateMarker'](_0x3d1b57,{'range':_0x55e2eb}),_0x3deb21=!0x0);}return _0x3deb21;}),this['on']('change:isThreadsLoadingPaused',(_0x4c82cf,_0x13028a,_0x4a9fd6)=>{if(!_0x4a9fd6&&_0x3e2852['size'])for(const _0x16fc43 of _0x3e2852){const {id:_0x9256eb}=ft(_0x16fc43);_0x3e2852['delete'](_0x16fc43),_0x1945cc['model']['markers']['get'](_0x16fc43)&&this['_handleThreadMarker'](_0x16fc43,_0x9256eb);}}),this['listenTo'](_0x1945cc['model']['document'],'change',()=>{for(const {name:_0x6c044e,data:{newRange:_0x30f08e}}of _0x1945cc['model']['document']['differ']['getChangedMarkers']()){const {group:_0x1c2749,id:_0x2322e0}=ft(_0x6c044e);if('comment'!==_0x1c2749)continue;const _0x1a8835=_0x5dcba5['getCommentThread'](_0x2322e0),_0x23743f=this['hasMarkerForId'](_0x2322e0);_0x1a8835&&(!_0x1a8835['_hasTargetInContent']&&_0x30f08e&&_0x1945cc['editing']['view']['once']('render',()=>{const _0x35d134=_0x1945cc['plugins']['get'](y),_0x4dcb2c=_0x5dcba5['_threadToController']['get'](_0x1a8835)['view'];_0x35d134['getByInnerView'](_0x4dcb2c)['refreshVisibility']();},{'priority':'low'}),_0x1a8835['_hasTargetInContent']=_0x23743f||!!_0x30f08e),_0x30f08e||(_0x5bd4af['add'](_0x6c044e),_0x3e2852['delete'](_0x6c044e));}for(const _0xae7979 of _0x5bd4af){const {id:_0x39d8ee}=ft(_0xae7979),_0x19c125=_0x5dcba5['getCommentThread'](_0x39d8ee);if(_0x3e2852['delete'](_0xae7979),!_0x19c125)continue;const _0x1f4dc5=this['hasMarkerForId'](_0x39d8ee);_0x1f4dc5||_0x19c125['isSubmitted']?_0x1f4dc5||_0x19c125['unlinkedAt']||_0x19c125['setUnlinkedAt'](new Date()):_0x19c125['remove']();}_0x5bd4af['clear']();});}['_handleInitialThreads'](_0x1d50ab){_0x1d50ab['forEach'](_0x5258c4=>{_0x5258c4['unlinkedAt']&&this['_attachArchivedThread'](_0x5258c4['id']);});}['_getTargetForId'](_0x3f982b){const _0xfb1f26=this['editor'],_0xe02512=this['getAllMarkersForId'](_0x3f982b);return et(_0xfb1f26['editing'],_0xe02512);}['_getTextContext'](_0x281535){const _0x38c4f9=this['getAllMarkersForId'](_0x281535);let _0x413ac0='',_0x40e954=!0x1;for(const _0x16b4c8 of _0x38c4f9){const _0x24548f=_0x16b4c8['getRange']();for(const _0x1488f4 of Array['from'](_0x24548f['getItems']()))_0x1488f4['is']('$textProxy')?(_0x413ac0&&_0x40e954&&(_0x413ac0+='\x20',_0x40e954=!0x1),_0x413ac0+=_0x1488f4['data']):_0x40e954=!0x0;_0x40e954=!0x0;}return _0x413ac0['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x471312,_0x359245){const _0x120fba=this['editor'],_0x301a38=_0x120fba['plugins']['get'](o);let _0x4c73ad=_0x301a38['getCommentThread'](_0x359245);const _0x333541=_0x120fba['config']['get']('collaboration.channelId'),_0xf4f673=_0x120fba['plugins']['get'](b);if(_0x4c73ad&&(_0x4c73ad['unlinkedAt']&&_0x4c73ad['setUnlinkedAt'](null),_0x4c73ad['isAttached']))return _0x4c73ad;return!this['getAllMarkersForId'](_0x359245)[0x0]['managedUsingOperations']?_0x120fba['editing']['view']['once']('render',()=>{if(_0x301a38['getCommentThread'](_0x359245))return;const _0x2b359d=_0x120fba['plugins']['get'](y);_0x4c73ad=_0x301a38['openNewCommentThread']({'channelId':_0x333541,'threadId':_0x359245,'target':()=>this['_getTargetForId'](_0x359245),'context':{'type':'text','value':this['_getTextContext'](_0x359245)}});const _0x1040a2=_0x301a38['_threadToController']['get'](_0x4c73ad)['view'],_0x462fd5=_0x2b359d['getByInnerView'](_0x1040a2);_0x462fd5&&_0xf4f673['registerAnnotation'](_0x462fd5);},{'priority':'low'}):_0x301a38['fetchCommentThread']({'channelId':_0x333541,'threadId':_0x359245})['then'](_0x224e62=>{if('destroyed'!==_0x120fba['state']){if(_0x4c73ad=_0x224e62,_0x4c73ad&&!_0x4c73ad['isAttached']){const _0x173299=_0x4c73ad['attachTo'](()=>this['_getTargetForId'](_0x359245));_0xf4f673['registerAnnotation'](_0x173299),_0x4c73ad['isResolved']&&this['_reconvertMarkers'](_0x359245);}else{if(!_0x4c73ad){const _0x46a85a=this['getAllMarkersForId'](_0x359245);_0x120fba['model']['change'](_0x3d8dce=>{for(const _0xe6a8a9 of _0x46a85a)_0x3d8dce['removeMarker'](_0xe6a8a9);});}}}}),_0x4c73ad;}['_handleThreadMarker'](_0x273b21,_0x133ce7){const _0x2a0c2b=this['_attachMarkerToThread'](_0x273b21,_0x133ce7);_0x2a0c2b&&!_0x2a0c2b['context']&&_0x2a0c2b['setContext']({'type':'text','value':this['_getTextContext'](_0x133ce7)});}['_initAriaMarkerChangeAnnouncements'](){const _0x44e411=this['editor'];rt(_0x44e411['model'],({left:_0x16fda1,entered:_0x34940b})=>{for(const _0xa436f of _0x16fda1)if(mt(_0xa436f)){_0x44e411['ui']['ariaLiveAnnouncer']['announce'](N(_0x44e411['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x4351f9 of _0x34940b)if(mt(_0x4351f9)){_0x44e411['ui']['ariaLiveAnnouncer']['announce'](N(_0x44e411['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x4818da)));break;}});}}function dt(_0x5c8b9b,_0x1ff7b7){return _0x1ff7b7?_0x5c8b9b+':'+_0x1ff7b7:_0x5c8b9b;}function ht(_0x1d971b,_0x43ce74){const _0x36f045=_0x43ce74['schema'],_0x3a68fd=_0x43ce74['createRange'](_0x1d971b['start']);for(const _0x40b911 of _0x1d971b['getWalker']()){const {type:_0x5e92ea,item:_0x38ba68,nextPosition:_0x3fc371}=_0x40b911;if('text'===_0x5e92ea||_0x36f045['isObject'](_0x38ba68)){const _0x337e06=_0x43ce74['createPositionBefore'](_0x38ba68);_0x3a68fd['isCollapsed']&&(_0x3a68fd['start']=_0x337e06),_0x3a68fd['end']=_0x3fc371;}}return _0x3a68fd;}function mt(_0x25b99b){return'comment'===ft(_0x25b99b['name'])['group'];}class s extends _0x22a428{['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 _0x4b0c1c=this['editor'],_0x329d46=_0x4b0c1c['plugins']['get'](o),_0x539509=_0x4b0c1c['plugins']['get'](r),_0x23bf66=_0x4b0c1c['plugins']['get'](y),_0xa2fb6f=_0x4b0c1c['plugins']['get'](b);_0x4b0c1c['ui']['componentFactory']['add']('comment',()=>{const _0x1ba325=this['_createUIButton'](_0x31c82b);return _0x1ba325['tooltip']=!0x0,_0x1ba325;}),_0x4b0c1c['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x3e45ab)),_0xa2fb6f['addSourceCollector'](()=>{const _0x1619cc=[];for(const [_0xfbdafd,_0x561c6e]of _0x329d46['_threadToController']){const _0x5a25d5=_0x539509['getAllMarkersForId'](_0xfbdafd['id']),_0x55b82c=_0x5a25d5['map'](_0x58f133=>_0x58f133['getRange']());_0x5a25d5['length']>0x0&&_0x1619cc['push']([_0x561c6e['view'],_0x55b82c]);}return _0x1619cc;}),this['listenTo'](_0x23bf66,'change:activeAnnotations',(_0x53abec,_0xb32a33,_0x2acdc8)=>{const _0x25a035=Array['from'](_0x2acdc8)['map'](_0x2128a4=>_0x2128a4['innerView'])['find'](_0x7c7718=>_0x329d46['_viewToController']['has'](_0x7c7718));if(!_0x25a035)return void(_0x539509['activeMarker']=null);const _0x2d2b5f=_0x329d46['_viewToController']['get'](_0x25a035)['model']['id'],_0x30358b='comment:'+_0x2d2b5f;_0x2d2b5f&&_0x539509['hasMarkerForId'](_0x2d2b5f)?_0x539509['activeMarker']=_0x30358b:_0x539509['activeMarker']&&(_0x539509['activeMarker']=null);}),this['listenTo'](_0x329d46,'removeCommentThread',(_0x12f172,{threadId:_0x17b985,isFromAdapter:_0x33f8bb})=>{!_0x33f8bb&&_0x4b0c1c['ui']['focusTracker']['isFocused']&&_0x539509['hasMarkerForId'](_0x17b985)&&_0x4b0c1c['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x329d46,'addComment',(_0x47c8e5,{threadId:_0x4df33e,isFromAdapter:_0x2789ef})=>{if(_0x2789ef||!_0x539509['hasMarkerForId'](_0x4df33e)||!_0x329d46['hasCommentThread'](_0x4df33e))return;0x1===_0x329d46['getCommentThread'](_0x4df33e)['length']&&(_0x4b0c1c['editing']['view']['focus'](),_0x47c8e5['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x88550a=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x34b1cf;for(const _0x1aa9f1 in _0x88550a){const _0x34c89f=_0x1aa9f1,_0x964107=_0x88550a[_0x34c89f];if('commentsLicenseKeyValid'==_0x964107||'commentsLicenseKeyInvalid'==_0x964107||'commentsLicenseKeyExpired'==_0x964107||'commentsLicenseKeyDomainLimit'==_0x964107||'commentsLicenseKeyNotAllowed'==_0x964107||'commentsLicenseKeyEvaluationLimit'==_0x964107||'commentsLicenseKeyTrialLimit'==_0x964107||'commentsLicenseKeyUsageLimit'==_0x964107){delete _0x88550a[_0x34c89f],_0x34b1cf=_0x964107,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x34b1cf&&_0x88550a['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x34b1cf&&_0x88550a['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x34b1cf&&_0x88550a['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x34b1cf&&_0x88550a['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x34b1cf&&_0x88550a['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x34b1cf&&_0x88550a['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x34b1cf&&_0x88550a['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x5ed213){const _0x4f5546=this['editor'],_0x771189=new _0x5ed213(_0x4f5546['locale']),_0x1e1a1b=_0x4f5546['commands']['get']('addCommentThread');return _0x771189['set']({'label':N(_0x4f5546['locale'],'Comment'),'icon':_0x1828af}),_0x771189['bind']('isEnabled')['to'](_0x1e1a1b,'hasContent'),this['listenTo'](_0x771189,'execute',()=>{_0x1e1a1b['execute']();}),_0x771189;}}class i extends _0x22a428{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x4c6cc4){super(_0x4c6cc4),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x472549,_0xaab1f9,_0x33e9ba)=>{_0x33e9ba?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x31c8fc,_0x307a2a]of this['editor']['commands'])_0x307a2a['affectsData']&&'addCommentThread'!==_0x31c8fc&&_0x307a2a['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 _0x53fb63=this['editor']['editing']['view']['document'];this['listenTo'](_0x53fb63,'cut',_0x4722b5=>_0x4722b5['stop'](),{'priority':'highest'}),this['listenTo'](_0x53fb63,'clipboardInput',_0x1226f7=>_0x1226f7['stop'](),{'priority':'highest'}),this['listenTo'](_0x53fb63,'delete',_0x28146f=>_0x28146f['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x502626,_0x2daa2d]of this['editor']['commands'])_0x2daa2d['affectsData']&&'addCommentThread'!==_0x502626&&_0x2daa2d['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 _0x1a03b6{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4efa93){super(_0x4efa93),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x36a76d=this['context']['plugins']['get'](y);this['listenTo'](_0x36a76d,'_activateAnnotation',(_0x5abaed,_0x3cbfce)=>{for(const _0x27b2c4 of this['activeUIs']){const _0x45f570=this['_uis']['get'](_0x27b2c4);(0x0,this['uisData']['get'](_0x27b2c4)['filter'])(_0x3cbfce)&&_0x45f570['setActiveAnnotation'](_0x3cbfce);}}),this['listenTo'](_0x36a76d,'_deactivateAllAnnotations',()=>{for(const _0x123735 of this['activeUIs']){this['_uis']['get'](_0x123735)['setActiveAnnotation'](null);}}),this['listenTo'](_0x36a76d['_visibleAnnotations'],'add',(_0x2de54a,_0x4591b7)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4591b7);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x366617){return this['activeUIs']['has'](_0x366617);}['activate'](_0x2b0d70,_0x2d133f=this['defaultFilter']){const _0x5b4500=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x2b0d70))throw new _0x3888cd('annotationsuis-missing-ui',this,{'uiName':_0x2b0d70});this['isActive'](_0x2b0d70)&&this['deactivate'](_0x2b0d70),this['activeUIs']['add'](_0x2b0d70);const _0x17f959=new S();v({'source':_0x5b4500['_visibleAnnotations'],'target':_0x17f959,'filter':_0x2d133f}),this['uisData']['set'](_0x2b0d70,{'collection':_0x17f959,'filter':_0x2d133f});const _0x39d7b4=this['_uis']['get'](_0x2b0d70);_0x39d7b4['attach'](_0x17f959),this['listenTo'](_0x39d7b4,'change:activeAnnotation',(_0x48d1b6,_0x12949b,_0x106f49,_0x130419)=>{_0x130419&&_0x5b4500['_removeActiveAnnotation'](_0x130419),_0x106f49&&_0x5b4500['_addActiveAnnotation'](_0x106f49);});}['deactivate'](_0x4d4a18){if(this['activeUIs']['delete'](_0x4d4a18),!this['_uis']['has'](_0x4d4a18))throw new _0x3888cd('annotationsuis-missing-ui',this,{'uiName':_0x4d4a18});const _0x124b0f=this['_uis']['get'](_0x4d4a18);_0x124b0f['detach'](),this['stopListening'](_0x124b0f),this['uisData']['get'](_0x4d4a18)['collection']['destroy'](),this['uisData']['delete'](_0x4d4a18);}['switchTo'](_0x3bcf9e){if(!this['_uis']['has'](_0x3bcf9e))throw new _0x3888cd('annotationsuis-missing-ui',this,{'uiName':_0x3bcf9e});const _0x182f77=this['context']['plugins']['get'](y),_0x535428=Array['from'](_0x182f77['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x3bcf9e);const _0x23bc93=this['_uis']['get'](_0x3bcf9e);_0x23bc93['setActiveAnnotation'](_0x535428),_0x23bc93['_setSelectedAnnotations']&&_0x535428&&_0x23bc93['_setSelectedAnnotations']([_0x535428]);}['deactivateAll'](){for(const _0x112d5d of this['activeUIs'])this['deactivate'](_0x112d5d);}['register'](_0x15c650,_0x4213a6){if(this['_uis']['has'](_0x15c650))throw new _0x3888cd('annotationsuis-register-already-registered');if('function'!=typeof _0x4213a6['attach']||'function'!=typeof _0x4213a6['detach']||'function'!=typeof _0x4213a6['setActiveAnnotation'])throw new _0x3888cd('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x15c650,_0x4213a6);}['refilterAnnotations'](){const _0x4f1026=this['context']['plugins']['get'](y)['collection'],_0xde6bc0=new Map(),_0xa5a9da=Array['from'](this['activeUIs']);for(const _0xd4ccb2 of this['activeUIs']){const _0x123018=this['uisData']['get'](_0xd4ccb2)['collection'];for(const _0xed8b6b of _0x123018)_0xde6bc0['set'](_0xed8b6b,_0xd4ccb2);}for(const _0x3004b1 of _0x4f1026){const _0xdddf20=_0xde6bc0['get'](_0x3004b1);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3004b1);const _0x5ade59=_0xa5a9da['find'](_0x15b524=>this['uisData']['get'](_0x15b524)['filter'](_0x3004b1));_0xdddf20!==_0x5ade59&&(_0xdddf20&&this['uisData']['get'](_0xdddf20)['collection']['remove'](_0x3004b1),_0x5ade59&&this['uisData']['get'](_0x5ade59)['collection']['add'](_0x3004b1));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x236c51){const _0x110011=[];for(const _0x14a7e6 of this['activeUIs']){(0x0,this['uisData']['get'](_0x14a7e6)['filter'])(_0x236c51)&&_0x110011['push'](_0x14a7e6);}if(_0x110011['length']>0x1)throw new _0x3888cd('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x110011,'annotationType':_0x236c51['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
-
|
|
33
|
-
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x51a4fe){super(_0x51a4fe),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x20f0e4,_0x4db25d)=>_0x20f0e4+_0x4db25d),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x2acdbf=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x2acdbf['to']('isAnimationDisabled',_0xeece19=>_0xeece19?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x2acdbf['to']('top',_0x4dd71f=>Ot(_0x4dd71f))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x49c526=this['element']['clientHeight'];_0x49c526&&(this['height']=_0x49c526);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x1a03b6{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5e647e){super(_0x5e647e),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 _0x15fb17=this['context']['config']['get']('sidebar.container');_0x15fb17&&this['setContainer'](_0x15fb17);}['setContainer'](_0x3b8fce){if(!g(_0x3b8fce))throw new _0x3888cd('sidebar-setcontainer-invalid-element');this['container']=_0x3b8fce;}['_attachToContainer']({viewClass:_0x54a762='',spaceBetweenItems:_0x2e6463=0x19}={}){if(!g(this['container']))throw new _0x3888cd('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x54a762,this['_spaceBetweenItems']=_0x2e6463;}['rearrange']({removedAnnotation:_0x1526db,previousAnnotation:_0x1a5b25,nextAnnotation:_0x2bdce1}){const _0x3e5309=this['getSidebarItemView'](_0x1526db);this['view']['list']['remove'](_0x3e5309),this['_destroySidebarItemView'](_0x1526db),_0x1a5b25&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x1a5b25)),_0x2bdce1&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x2bdce1)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x282c12,activatedAnnotation:_0x258361,disableAnimationOnActivatedAnnotation:_0x371f6e}){if(this['_activeAnnotation']=_0x258361,_0x282c12){_0x282c12['isActive']=!0x1;const _0x55916b=this['getSidebarItemView'](_0x282c12);_0x55916b&&_0x371f6e&&(_0x55916b['isAnimationDisabled']=!0x1);}if(_0x258361){const _0x588ef7=this['getSidebarItemView'](_0x258361);_0x588ef7&&(_0x258361['isActive']=!0x0,_0x371f6e&&(_0x588ef7['isAnimationDisabled']=!0x0,_0x588ef7['top']+=0x1),this['_alignToTargetRect'](_0x588ef7));}}['_detachFromContainer'](_0x1dcff1){if(this['view']['element']['remove'](),_0x1dcff1){for(const _0x5d0c30 of _0x1dcff1)this['_destroySidebarItemView'](_0x5d0c30);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x114006,_0x1776a2){_0x1776a2||(_0x1776a2=_0x114006['view']);const _0x46f2f5=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x46f2f5,_0x114006),this['_annotationToSidebarItemView']['set'](_0x114006,_0x46f2f5),_0x46f2f5['content']['add'](_0x1776a2),this['listenTo'](_0x114006['view'],'change:targetRect',(_0x578d91,_0x18d695,_0x46a1ee)=>{const _0x2de2cc=this['_getTargetTop'](_0x114006,_0x46a1ee);_0x46f2f5['_targetTop']!=_0x2de2cc&&(_0x46f2f5['_targetTop']=_0x2de2cc,this['_setItemTop'](_0x46f2f5,_0x2de2cc));}),this['listenTo'](_0x46f2f5,'change:top',()=>{this['_recalculate'](_0x46f2f5,'top');}),this['listenTo'](_0x46f2f5,'change:bottom',()=>{this['_recalculate'](_0x46f2f5,'bottom');}),this['_alignToTargetRect'](_0x46f2f5);const _0x20c66e=this['_getItemBefore'](_0x46f2f5);if(_0x20c66e)this['_alignAfterItem'](_0x20c66e,_0x46f2f5)||this['_alignToTargetRect'](_0x46f2f5);else this['_alignToTargetRect'](_0x46f2f5);return this['_updateLastItem'](),this['view']['list']['add'](_0x46f2f5),_0x46f2f5;}['_alignForTopChange'](_0x20c93a){if(!_0x20c93a['content']['length'])return;const _0x21d7e8=this['_getItemBefore'](_0x20c93a);if(!_0x21d7e8)return;const _0xa52a24=this['_sidebarItemViewToAnnotation']['get'](_0x21d7e8),_0x3bc7f5=this['_activeAnnotation'];_0x3bc7f5&&_0x3bc7f5===_0xa52a24?this['_alignAfterItem'](_0x21d7e8,_0x20c93a):this['_alignBeforeItem'](_0x20c93a,_0x21d7e8);}['_alignForBottomChange'](_0x39943d){if(!_0x39943d['content']['length'])return;const _0x45defe=this['_getItemAfter'](_0x39943d);if(!_0x45defe)return;const _0x5cc6e9=this['_sidebarItemViewToAnnotation']['get'](_0x45defe),_0x306552=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x43a764=this['_activeAnnotation'];_0x43a764&&_0x43a764===_0x5cc6e9&&_0x306552?(this['_alignBeforeItem'](_0x45defe,_0x39943d),this['_alignAfterItem'](_0x39943d,_0x45defe)):_0x43a764&&_0x43a764===_0x5cc6e9?this['_alignBeforeItem'](_0x45defe,_0x39943d):this['_alignAfterItem'](_0x39943d,_0x45defe);}['_recalculate'](_0x52887c,_0x4c67ec){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x5e3127,changedProp:_0x2b5495}of this['_recalculateBuffer'])'top'===_0x2b5495?this['_alignForTopChange'](_0x5e3127):this['_alignForBottomChange'](_0x5e3127);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x52887c,'changedProp':_0x4c67ec});}['getSidebarItemView'](_0x4a2a94){return this['_annotationToSidebarItemView']['get'](_0x4a2a94);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x22ab14){const _0xe4b46=this['getSidebarItemView'](_0x22ab14);this['stopListening'](_0xe4b46),this['stopListening'](_0x22ab14['view']),_0xe4b46['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x22ab14),this['_sidebarItemViewToAnnotation']['delete'](_0xe4b46);}['_createSidebarView'](){const _0x290afa=new H(this['context']['locale']);return _0x290afa['render'](),this['on']('change:_lastItem',(_0x5b3b45,_0x53169e,_0x318330,_0x54d24f)=>{_0x54d24f&&_0x290afa['unbind']('minHeight'),_0x318330?_0x290afa['bind']('minHeight')['to'](_0x318330,'bottom'):_0x290afa['minHeight']=null;}),_0x290afa;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x57b123){const _0x4eb038=this['_sidebarItemViewToAnnotation']['get'](_0x57b123),_0x2c9747=_0x4eb038&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x4eb038)-0x1);return _0x2c9747&&this['getSidebarItemView'](_0x2c9747)||null;}['_getItemAfter'](_0x280eea){const _0x3b1ee4=this['_sidebarItemViewToAnnotation']['get'](_0x280eea),_0x55989d=_0x3b1ee4&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x3b1ee4)+0x1);return _0x55989d&&this['getSidebarItemView'](_0x55989d)||null;}['_alignBeforeItem'](_0x5b592b,_0x135f5d){_0x5b592b['updateHeight']();const _0x1eb4d8=G(_0x135f5d['bottom']+this['_spaceBetweenItems'],_0x5b592b['top']);return!!_0x1eb4d8&&(this['_setItemTop'](_0x135f5d,_0x135f5d['top']-_0x1eb4d8),!0x0);}['_alignAfterItem'](_0x5d1fc4,_0x5d4cd2){_0x5d1fc4['updateHeight']();const _0x44f2d0=G(_0x5d1fc4['bottom']+this['_spaceBetweenItems'],_0x5d4cd2['top']);return!!_0x44f2d0&&(this['_setItemTop'](_0x5d4cd2,_0x5d4cd2['top']+_0x44f2d0,!0x1),!0x0);}['_alignToTargetRect'](_0x41a148){const _0x380b83=this['_sidebarItemViewToAnnotation']['get'](_0x41a148);if(!_0x380b83||!_0x380b83['target']||!_0x380b83['targetRect'])return;const _0x14f29e=this['_getTargetTop'](_0x380b83,_0x380b83['targetRect']);this['_setItemTop'](_0x41a148,_0x14f29e);}['_getTargetTop'](_0x12eca6,_0x5f2caf){if(null===_0x5f2caf)return 0x0;if(_0x12eca6['target']instanceof _0x4904b4)return _0x5f2caf['top'];{const _0x9fc8dc=new _0x4904b4(this['view']['element'])['top'];return _0x5f2caf['top']-_0x9fc8dc;}}['_setItemTop'](_0x2d9dd5,_0x3aee18,_0x5986d3=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x5986d3&&(_0x3aee18=Math['max'](_0x3aee18,this['_getMaxAvailableTop'](_0x2d9dd5))),_0x2d9dd5['top']=_0x3aee18;}['_getMaxAvailableTop'](_0x5c15b2){let _0x2dd730=this['_getItemBefore'](_0x5c15b2),_0x31744d=0x0;for(;_0x2dd730;)_0x2dd730['updateHeight'](),_0x31744d+=this['_spaceBetweenItems']+_0x2dd730['height'],_0x2dd730=this['_getItemBefore'](_0x2dd730);return _0x31744d;}}function G(_0x11e9bb,_0x21f3e2){return Math['max'](_0x11e9bb-_0x21f3e2,0x0);}function g(_0x5f5651){return null!==_0x5f5651&&'object'==typeof _0x5f5651&&0x1===_0x5f5651['nodeType'];}class e extends _0x1a03b6{['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(_0x25f8cb){super(_0x25f8cb),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x55c097(),this['_refreshPositioningDebounced']=_0x107550(()=>{_0x25f8cb['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x4d128a=this['context']['plugins']['get'](j),_0x23993b=this['context']['plugins']['get'](z);_0x4d128a['register']('wideSidebar',this),_0x23993b['container']&&_0x4d128a['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x58896a){if(_0x58896a===this['activeAnnotation'])return;const _0x27bd02=this['context']['plugins']['get'](z);_0x27bd02['_activeAnnotation']=_0x58896a;const _0x5c2ebf=this['activeAnnotation'];_0x27bd02['refresh']({'blurredAnnotation':_0x5c2ebf,'activatedAnnotation':_0x58896a}),this['activeAnnotation']=_0x58896a;}['attach'](_0x55011b){this['annotations']=_0x55011b;const _0x4fd59c=this['context']['plugins']['get'](z);if(_0x4fd59c['_annotations']=_0x55011b,this['isAttached'])throw new _0x3888cd('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x4fd59c,'set:container',()=>{this['detach'](),this['listenTo'](_0x4fd59c,'change:container',_0x5bd4ab=>{_0x5bd4ab['off'](),this['attach'](_0x55011b);});}),_0x4fd59c['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x8d6515=_0x5c3529=>{_0x5c3529['updateTargetRect'](),_0x4fd59c['addAnnotation'](_0x5c3529);};for(const _0x7b4459 of _0x55011b)_0x8d6515(_0x7b4459);this['listenTo'](_0x55011b,'add',(_0x3df1d2,_0x2ef0d0)=>{_0x8d6515(_0x2ef0d0);}),this['listenTo'](_0x55011b,'remove',(_0x258130,_0x261e52,_0x8388e3)=>{_0x4fd59c['rearrange']({'removedAnnotation':_0x261e52,'previousAnnotation':_0x55011b['get'](_0x8388e3-0x1),'nextAnnotation':_0x55011b['get'](_0x8388e3+0x1)}),_0x261e52===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x55011b,'focus',(_0x5edcba,_0x216318)=>{this['setActiveAnnotation'](_0x216318);}),this['listenTo'](_0x55011b,'blur',()=>{this['setActiveAnnotation'](null);});const _0x317206=this['context']instanceof _0x185e0a?this['context']['editors']:new _0x55c097([this['context']]);for(const _0x45174a of _0x317206)this['_integrateWithEditorAnnotations'](_0x45174a);this['listenTo'](_0x317206,'add',(_0x57ab15,_0x2dc829)=>{this['listenTo'](_0x2dc829,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x2dc829);});}),this['listenTo'](_0x317206,'remove',(_0x16c40f,_0x1bd9ed)=>{_0x1bd9ed['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x1bd9ed['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x3888cd('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x2a62b7=this['context']['plugins']['get'](z);_0x2a62b7['_detachFromContainer'](this['annotations']),this['stopListening'](_0x2a62b7),this['stopListening'](this['annotations']),this['context']instanceof _0x185e0a&&this['stopListening'](this['context']['editors']);for(const _0x15fedf of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x15fedf);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x33b8ca){if(!_0x33b8ca['plugins']['has']('EditorAnnotations'))return;const _0x2b0d1d=_0x33b8ca['plugins']['get']('EditorAnnotations'),_0x58135e=()=>{const _0x104d8a=_0x2b0d1d['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x104d8a[0x0]||null);};this['listenTo'](_0x2b0d1d,'refresh',_0x58135e),this['listenTo'](_0x2b0d1d,'blur',(_0x2afd47,{isAnnotationTracked:_0xdcbad4})=>{this['activeAnnotation']&&_0xdcbad4(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x2b0d1d,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x4d9e6e=>{_0x2b0d1d['hasDomSelection']()&&(_0x58135e(),_0x4d9e6e['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2b0d1d);}['_destroyEditorAnnotationsIntegration'](_0x55c8a2){this['stopListening'](_0x55c8a2),this['_editorAnnotations']['remove'](_0x55c8a2);}}class C extends _0x31c82b{['counterView'];constructor(_0x1afee9){super(_0x1afee9);const _0x2d71c9=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x300324,_0xd3307a)=>_0x300324?'...':_0xd3307a['toString']()),this['set']('annotationType',''),this['icon']=_0x1828af,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x2d71c9['to']('annotationType',_0x102dae=>'ck-annotation-counter__badge--'+_0x102dae),_0x2d71c9['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x2d71c9['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x1a03b6{['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(_0x1eb68b){super(_0x1eb68b),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x4379d0())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x55c097(),this['_refreshPositioningDebounced']=_0x107550(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0xeb78fe(this['context']['locale']),this['balloonPanelView']=new _0x54bee3(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x1ffb66){this['annotations']=_0x1ffb66;const _0x1f3df8=this['context']['plugins']['get'](z),_0x7ed222=this['balloonPanelView'];if(_0x1f3df8['_annotations']=_0x1ffb66,this['isAttached'])throw new _0x3888cd('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x1f3df8,'set:container',()=>{this['detach'](),this['listenTo'](_0x1f3df8,'change:container',_0x380b04=>{_0x380b04['off'](),this['attach'](_0x1ffb66);});}),_0x1f3df8['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x4ebf04=_0x2b137a=>{const _0x4b1911=new C(this['context']['locale']);_0x1f3df8['addAnnotation'](_0x2b137a,_0x4b1911),this['_annotationToNarrowView']['set'](_0x2b137a,_0x4b1911),_0x4b1911['bind']('isDirty','annotationType','number')['to'](_0x2b137a['view'],'isDirty','type','length'),_0x4b1911['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x7ed222['content']['first']!==_0x2b137a['view']?(this['_showBalloon'](_0x2b137a),_0x2b137a['view']['element']['focus'](),this['setActiveAnnotation'](_0x2b137a)):this['setActiveAnnotation'](null);});};for(const _0x3d4659 of _0x1ffb66)_0x4ebf04(_0x3d4659);this['listenTo'](_0x1ffb66,'add',(_0x5a7d0b,_0x1e237c)=>{_0x4ebf04(_0x1e237c);}),this['listenTo'](_0x1ffb66,'remove',(_0x256397,_0x3d712a,_0x18f985)=>{this['_annotationToNarrowView']['get'](_0x3d712a)['destroy'](),this['_annotationToNarrowView']['delete'](_0x3d712a),_0x1f3df8['rearrange']({'removedAnnotation':_0x3d712a,'previousAnnotation':_0x1ffb66['get'](_0x18f985-0x1),'nextAnnotation':_0x1ffb66['get'](_0x18f985+0x1)}),_0x3d712a===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x1ffb66,'focus',(_0x30cccd,_0x4f4c03)=>{this['setActiveAnnotation'](_0x4f4c03);}),this['listenTo'](_0x1ffb66,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x83c50,_0xa33bb1)=>{_0xa33bb1['keyCode']===_0x1a4904['esc']&&_0x7ed222['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x7ed222['content']['first']),this['_hideBalloon'](),_0xa33bb1['stopPropagation'](),_0xa33bb1['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x246237,_0x2d4f20)=>{const _0x497158=_0x2d4f20['target'];_0x7ed222['isVisible']&&_0x7ed222['element']['contains'](_0x497158)||_0x1f3df8['view']['element']['contains'](_0x497158)||_0x246237['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x17d639=>_0x17d639['contains'](_0x497158))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x252621=this['context']instanceof _0x185e0a?this['context']['editors']:new _0x55c097([this['context']]);for(const _0x3afd7c of _0x252621)this['_integrateWithEditorAnnotations'](_0x3afd7c);this['listenTo'](_0x252621,'add',(_0x301248,_0x28de57)=>{this['listenTo'](_0x28de57,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x28de57);});}),this['listenTo'](_0x252621,'remove',(_0x484ac4,_0x2a5b79)=>{_0x2a5b79['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2a5b79['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x969b90){if(_0x969b90===this['activeAnnotation'])return;const _0x3bf2c5=this['context']['plugins']['get'](z);if(_0x3bf2c5['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x969b90,'disableAnimationOnActivatedAnnotation':!0x0}),_0x969b90)_0x3bf2c5['getSidebarItemView'](_0x969b90)?this['_showBalloon'](_0x969b90):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x969b90;}['detach'](){if(!this['isAttached'])throw new _0x3888cd('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x49a3d3=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0xdc4d99=>_0xdc4d99['destroy']()),this['_annotationToNarrowView']['clear'](),_0x49a3d3['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x185e0a&&this['stopListening'](this['context']['editors']);for(const _0x4b28f1 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x4b28f1);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'](_0x1d0b3a){if(!_0x1d0b3a['plugins']['has']('EditorAnnotations'))return;const _0x58fd83=_0x1d0b3a['plugins']['get']('EditorAnnotations'),_0x558862=this['context']['plugins']['get'](z),_0xc3c2b=this['annotations'],_0xb6a5f4=this['balloonPanelView'],_0x1d329c=()=>{const _0x58bf26=_0x58fd83['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x58bf26),this['setActiveAnnotation'](_0x58bf26[0x0]||null);};this['listenTo'](_0x58fd83,'refresh',_0x1d329c),this['listenTo'](_0x58fd83,'blur',(_0x559674,{isAnnotationTracked:_0x1421b9})=>{this['activeAnnotation']&&_0x1421b9(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x58fd83,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0xc3c2b,'blur',_0x23e59d=>{_0x58fd83['hasDomSelection']()&&_0x23e59d['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x43592a,_0x228c46)=>{const _0x2729c2=_0x228c46['target'];_0xb6a5f4['isVisible']&&_0xb6a5f4['element']['contains'](_0x2729c2)||_0x558862['view']['element']['contains'](_0x2729c2)||this['activeAnnotation']&&_0x58fd83['hasDomSelection']()&&(_0x1d329c(),_0x43592a['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x58fd83);}['_destroyEditorAnnotationsIntegration'](_0x41e463){_0x41e463&&(this['stopListening'](_0x41e463),this['_editorAnnotations']['remove'](_0x41e463));}['_setSelectedAnnotations'](_0x11c85d){for(const _0x50fcb6 of this['_selectedAnnotations'])_0x11c85d['includes'](_0x50fcb6)||this['_manuallyClosedAnnotationViews']['delete'](_0x50fcb6['view']);this['_selectedAnnotations']=_0x11c85d;}['_refreshPositioning'](){const _0x3e7415=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x3e7415['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x151a1b){if(this['_manuallyClosedAnnotationViews']['has'](_0x151a1b['view']))return;const _0x56654c=this['balloonPanelView']['content']['first'];_0x56654c!==_0x151a1b['view']?(_0x56654c&&this['_detachListeners'](_0x56654c),this['_attachListeners'](_0x151a1b['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x151a1b['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x3bdf17=this['balloonPanelView']['content']['first'],_0x14ac73=_0x3bdf17&&this['annotations']['getByView'](_0x3bdf17);if(!_0x14ac73||!this['_annotationToNarrowView']['has'](_0x14ac73))return;const _0x3d7f16=this['_annotationToNarrowView']['get'](_0x14ac73)['element'],_0x58fb4f=(function(){const _0x1e6921=_0x54bee3['defaultPositions'];return[_0x1e6921['southArrowNorthEast'],_0x1e6921['northArrowSouthEast'],_0x1e6921['southArrowNorth'],_0x1e6921['northArrowSouth'],_0x1e6921['southArrowNorthWest'],_0x1e6921['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x3d7f16,'positions':_0x58fb4f});}['_hideBalloon'](){const _0x4a30e2=this['balloonPanelView'],_0x3bcdd8=_0x4a30e2['content']['first'];_0x3bcdd8&&(this['_detachListeners'](_0x3bcdd8),_0x4a30e2['unpin'](),_0x4a30e2['content']['clear']());}['_attachListeners'](_0x468425){this['listenTo'](_0x468425,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x468425,'Esc',(_0x2ace7a,_0x4990ce)=>{this['_manuallyClosedAnnotationViews']['add'](_0x468425),this['_hideBalloon'](),_0x4990ce();});}['_detachListeners'](_0x2d5b26){this['stopListening'](_0x2d5b26);}}class c extends _0x22a428{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x524c47,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x34e39e){super(_0x34e39e),_0x34e39e['editing']['view']['addObserver'](_0x4b3dd3),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x34e39e['plugins']['get'](_0x524c47),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x44d131=this['editor']['plugins']['get'](j);_0x44d131['context']===this['editor']&&(_0x44d131['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x4344ca,_0x4e498d)=>{const _0x22fd8a=this['_balloon'];if(this['isAttached']&&_0x22fd8a['visibleView']){const _0x5069ff=this['annotations']['getByView'](_0x22fd8a['visibleView']);_0x5069ff&&this['_closeAnnotation'](_0x5069ff),_0x4e498d();}}));}['afterInit'](){const _0x2867b7=this['editor']['plugins']['get'](j);_0x2867b7['context']===this['editor']&&(_0x2867b7['hasActive']()||_0x2867b7['switchTo']('inline'));}['setActiveAnnotation'](_0x1362ec){_0x1362ec!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x1362ec&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x1362ec)&&this['_addAnnotationToBalloon'](_0x1362ec,!0x0),_0x1362ec['isActive']=!0x0),_0x1362ec||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x1362ec);}['attach'](_0x4c2c8e){this['annotations']=_0x4c2c8e;const _0x57d8c6=this['editor']['plugins']['get'](j),_0x3339fd=this['_balloon'];if(this['isAttached'])throw new _0x3888cd('inlineannotations-attach-already-attached',this);if(_0x57d8c6['context']!==this['editor'])throw new _0x3888cd('inlineannotations-not-allowed-with-context',this);const _0x30e3bd=this['editor']['plugins']['get'](b);this['listenTo'](_0x30e3bd,'refresh',()=>{const _0xaf4027=_0x30e3bd['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x53f7a1,_0x5cbabb;!this['_forceRefresh']&&(_0x53f7a1=_0xaf4027,_0x5cbabb=this['_selectedAnnotations'],_0x53f7a1['length']===_0x5cbabb['length']&&_0x53f7a1['every'](_0x4b5b95=>_0x5cbabb['includes'](_0x4b5b95)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0xaf4027),this['setActiveAnnotation'](_0xaf4027[0x0]||null));}),this['listenTo'](_0x30e3bd,'blur',(_0x2c80c6,{isAnnotationTracked:_0x532215})=>{this['activeAnnotation']&&_0x532215(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x552aac,_0x36fb1e,_0x547734)=>{_0x547734||this['setActiveAnnotation'](null);}),this['listenTo'](_0x4c2c8e,'remove',(_0x523205,_0x1b8e42)=>{this['_removeAnnotationFromBalloon'](_0x1b8e42),_0x1b8e42===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x3339fd,'change:visibleView',(_0x1108b2,_0x36cf88,_0xe9fec6,_0x35c158)=>{_0x35c158&&this['stopListening'](_0x35c158);const _0x45e7ec=_0x4c2c8e['getByView'](_0xe9fec6);_0xe9fec6&&_0x45e7ec&&(this['listenTo'](_0xe9fec6,'change:height',()=>{_0x3339fd['updatePosition']();}),this['listenTo'](_0xe9fec6,'Esc',()=>{this['_closeAnnotation'](_0x45e7ec),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x45e7ec&&this['setActiveAnnotation'](_0x45e7ec));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x3339fd['visibleView']&&(_0x4c2c8e['getByView'](_0x3339fd['visibleView'])&&_0x3339fd['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 _0x3888cd('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x44a09b of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x44a09b);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x38082b){for(const _0x936089 of this['_selectedAnnotations'])_0x38082b['includes'](_0x936089)||this['_manuallyClosed']['delete'](_0x936089);for(const _0x455bbd of this['annotations'])_0x38082b['includes'](_0x455bbd)||this['_removeAnnotationFromBalloon'](_0x455bbd);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x2944ee of _0x38082b)this['_addAnnotationToBalloon'](_0x2944ee);}this['_selectedAnnotations']=_0x38082b;}['_addAnnotationToBalloon'](_0x54559a,_0x5e4d4c=!0x1){this['_manuallyClosed']['has'](_0x54559a)||(this['_addedAnnotations']['has'](_0x54559a)||this['_balloon']['hasView'](_0x54559a['view'])||(this['_addedAnnotations']['add'](_0x54559a),this['_balloon']['add']({'stackId':_0x54559a['view']['id'],'view':_0x54559a['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x54559a)}})),_0x5e4d4c&&this['_balloon']['showStack'](_0x54559a['view']['id']));}['_getBalloonTargetForAnnotation'](_0x10e10d){const _0x4e44ae=_0x10e10d['target'],_0x501e7d=this['editor']['editing']['view'],_0x4858ac=_0x501e7d['document']['selection']['getFirstRange'](),_0x95afdb=_0x501e7d['domConverter']['viewRangeToDom'](_0x4858ac);if(_0x95afdb['collapse'](!0x0),_0x4e44ae){if(_0x4e44ae instanceof _0x4904b4)return _0x4e44ae;let _0xe74311=[];for(const _0x391ae0 of _0x4e44ae)_0xe74311['push'](...F(_0x391ae0['getClientRects']()));_0xe74311=function(_0x4e02ff){const _0x2706ad=[];let _0x4d768a=_0x4e02ff[0x0];for(let _0x39a2b6=0x1;_0x39a2b6<_0x4e02ff['length'];_0x39a2b6++)P(_0x4d768a,_0x4e02ff[_0x39a2b6])?_0x4d768a['width']+=_0x4e02ff[_0x39a2b6]['width']:(_0x2706ad['push'](_0x4d768a),_0x4d768a=_0x4e02ff[_0x39a2b6]);return _0x2706ad['push'](_0x4d768a),_0x2706ad;}(_0xe74311);const _0x34707f=_0x95afdb['getBoundingClientRect']();return _0xe74311['find'](_0x2bc966=>_0x2bc966['top']<=_0x34707f['top']&&_0x2bc966['bottom']>=_0x34707f['bottom']&&_0x2bc966['left']<=_0x34707f['left']&&_0x2bc966['right']>=_0x34707f['right'])||_0xe74311[0x0];}return _0x10e10d['targetRect']||_0x95afdb;}['_removeAnnotationFromBalloon'](_0x418da0){this['_addedAnnotations']['has'](_0x418da0)&&this['_balloon']['hasView'](_0x418da0['view'])&&(this['_addedAnnotations']['delete'](_0x418da0),this['_balloon']['remove'](_0x418da0['view']));}['_closeAnnotation'](_0x35cf2d){this['_manuallyClosed']['add'](_0x35cf2d),this['_removeAnnotationFromBalloon'](_0x35cf2d);}}function F(_0x3ab973){return Array['from'](_0x3ab973)['map'](DOMRect['fromRect']);}function P(_0x16c032,_0x557f88){return _0x16c032['top']===_0x557f88['top']&&_0x16c032['bottom']===_0x557f88['bottom']&&_0x16c032['right']===_0x557f88['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x30bab4,_0x3ea122){super(_0x30bab4),this['set']('isEmpty',!_0x3ea122['length']),this['focusTracker']=new _0x3f0639(),this['_annotationViews']=_0x3ea122,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x47818a({'focusables':_0x3ea122,'focusTracker':this['focusTracker']}),this['listenTo'](_0x3ea122,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x3ea122,'remove',(_0x252afe,_0x15065a)=>{_0x15065a['isActive']&&this['focus'](),_0x3ea122['length']||(this['isEmpty']=!0x0);});const _0x16f3dd=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x30bab4,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x3ea122},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x16f3dd['if']('isEmpty','ck-hidden',_0x3f03d0=>!_0x3f03d0)]},'children':[{'text':N(_0x30bab4,'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 _0xddd0f9 of this['_annotationViews'])this['focusTracker']['add'](_0xddd0f9['element']);this['_annotationViews']['on']('change',(_0x1fca1d,{added:_0x3b5e22,removed:_0x39ee1b})=>{for(const _0x4d3359 of _0x3b5e22)this['focusTracker']['add'](_0x4d3359['element']);for(const _0x587bbf of _0x39ee1b)this['focusTracker']['remove'](_0x587bbf['element']);});}}class p extends _0x1a03b6{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x43cc7c){super(_0x43cc7c),this['archivedThreads']=new _0x55c097();}['init'](){const _0x1d2418=this['context'],_0x1c27db=_0x1d2418['plugins']['get'](o),_0x2c7ee2=_0x1d2418['plugins']['get'](y);this['listenTo'](_0x1c27db,'addCommentThread',(_0x1c5697,{threadId:_0x38c405})=>{const _0x160d46=_0x1c27db['getCommentThread'](_0x38c405);_0x160d46['archivedAt']&&this['archivedThreads']['add'](_0x160d46,this['_calculatePosition'](_0x160d46['archivedAt'])),this['listenTo'](_0x160d46,'change:archivedAt',(_0x2546ef,_0x29c423,_0x1e3d32)=>{_0x1e3d32?this['archivedThreads']['has'](_0x160d46)||this['archivedThreads']['add'](_0x160d46,this['_calculatePosition'](_0x160d46['archivedAt'])):this['archivedThreads']['has'](_0x160d46)&&this['archivedThreads']['remove'](_0x160d46);});}),this['listenTo'](_0x1c27db,'removeCommentThread',(_0x2e4374,{threadId:_0x252c69})=>{const _0xda717c=_0x1c27db['getCommentThread'](_0x252c69);this['stopListening'](_0xda717c),this['archivedThreads']['has'](_0xda717c)&&this['archivedThreads']['remove'](_0xda717c);},{'priority':'highest'}),this['listenTo'](_0x2c7ee2['collection'],'focus',(_0x1f2cd4,_0x562c73)=>{_0x562c73['isVisible']||(_0x562c73['isActive']=!0x0,_0x2c7ee2['activate'](_0x562c73));});}['_calculatePosition'](_0x156be6){const _0x3deb20=[...this['archivedThreads']]['findIndex'](_0x3012f5=>_0x3012f5['archivedAt']<_0x156be6);return _0x3deb20>-0x1?_0x3deb20:this['archivedThreads']['length'];}}class a extends _0x22a428{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x46fba1];}constructor(_0x37a84e){super(_0x37a84e),this['annotationViews']=new _0x4221f7(),this['_pendingThreads']=[];}['init'](){const _0x35b1b3=this['editor'],_0x5acb59=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x35b1b3['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x31c82b,!0x0)),_0x35b1b3['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x95e7fb=this['_createCommentsArchiveButton'](_0x3e45ab);return _0x95e7fb['set']({'role':'menuitemcheckbox'}),_0x95e7fb;});const _0x2b9279=_0x35b1b3['plugins']['get'](p),_0x5ad7f2=_0x35b1b3['plugins']['get']('Annotations'),_0x2627c2=_0x35b1b3['plugins']['get']('CommentsRepository');_0x2b9279['archivedThreads']['forEach'](_0xe2deaa=>{this['_handleNewThread'](_0xe2deaa);}),this['listenTo'](_0x2b9279['archivedThreads'],'add',(_0x5eb0bf,_0x4b10d5)=>{this['_handleNewThread'](_0x4b10d5);}),this['listenTo'](_0x5ad7f2['collection'],'add',(_0x4f822f,_0x366723)=>{const _0x54f4f9=this['_pendingThreads']['find'](_0x57350a=>{const _0xd3c7ba=_0x2627c2['_threadToController']['get'](_0x57350a);return _0xd3c7ba&&_0x366723['innerView']===_0xd3c7ba['view'];});if(_0x54f4f9){const _0x28b05b=this['_calculatePosition'](_0x54f4f9['archivedAt']);this['annotationViews']['add'](_0x366723['view'],_0x28b05b),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x54f4f9),0x1);}}),this['listenTo'](_0x2b9279['archivedThreads'],'remove',(_0x151592,_0xe6eaac)=>{const _0x5e3368=_0x35b1b3['config']['get']('collaboration.channelId');if(!_0x5e3368||_0xe6eaac['channelId']===_0x5e3368){if(this['_pendingThreads']['includes'](_0xe6eaac))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0xe6eaac),0x1);else{const _0x4aeea0=_0x2627c2['_threadToController']['get'](_0xe6eaac),_0x3040a1=_0x5ad7f2['getByInnerView'](_0x4aeea0['view']);this['annotationViews']['remove'](_0x3040a1['view']),this['stopListening'](_0x3040a1['focusableElements']);}}}),this['listenTo'](_0x5ad7f2['collection'],'add',(_0x5e0190,_0x237a0b)=>{this['listenTo'](_0x237a0b,'escape',_0x5acb59);}),this['listenTo'](_0x5ad7f2['collection'],'remove',(_0x3db396,_0x38fa76)=>{this['stopListening'](_0x38fa76,'escape',_0x5acb59);});}['_handleNewThread'](_0x649da2){const _0x4b95b4=this['editor']['plugins']['get']('CommentsRepository'),_0x3e7081=this['editor']['plugins']['get']('Annotations'),_0x22a9db=this['editor']['config']['get']('collaboration.channelId');if(!_0x22a9db||_0x649da2['channelId']===_0x22a9db){const _0x2da876=_0x4b95b4['_threadToController']['get'](_0x649da2);if(!_0x2da876)return void this['_pendingThreads']['push'](_0x649da2);const _0x2846c0=this['_calculatePosition'](_0x649da2['archivedAt']),_0x34e4a6=_0x3e7081['getByInnerView'](_0x2da876['view']);_0x34e4a6['isVisible']&&_0x3e7081['_visibleAnnotations']['remove'](_0x34e4a6),this['annotationViews']['add'](_0x34e4a6['view'],_0x2846c0);}}['_calculatePosition'](_0x2b7c2d){const _0x550609=this['editor']['config']['get']('collaboration.channelId'),_0x368619=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x21d24f=>_0x21d24f['channelId']===_0x550609)['findIndex'](_0x48042d=>_0x48042d['archivedAt']<_0x2b7c2d);return _0x368619<0x0||_0x368619>this['annotationViews']['length']?this['annotationViews']['length']:_0x368619-0x1;}['_toggleDialog'](){const _0x412dc5=this['editor'],_0x1def01=_0x412dc5['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x412dc5['locale'],this['annotationViews'])),'commentsArchive'===_0x1def01['id']?_0x1def01['hide']():_0x1def01['show']({'id':'commentsArchive','title':N(_0x412dc5['locale'],'COMMENTS_ARCHIVE'),'icon':_0x5092a2,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x5a724f['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0xe6cef9,_0x2e4da0=!0x1){const _0x356797=this['editor']['locale'],_0x6366a6=this['editor']['plugins']['get']('Dialog'),_0x328419=new _0xe6cef9(_0x356797);return _0x328419['bind']('isEnabled')['to'](this,'isEnabled'),_0x328419['bind']('isOn')['to'](_0x6366a6,'id',_0x259e41=>'commentsArchive'===_0x259e41),_0x328419['set']({'label':N(_0x356797,'COMMENTS_ARCHIVE'),'icon':_0x5092a2,'isToggleable':!0x0}),_0x2e4da0&&(_0x328419['tooltip']=!0x0),this['listenTo'](_0x328419,'execute',()=>this['_toggleDialog']()),_0x328419;}['_hideDialogOnAnnotationEscape']=_0xa7dbbf=>{const _0x5c101c=_0xa7dbbf['source'];if(!this['annotationViews']['has'](_0x5c101c['view']))return;const _0x311009=this['editor']['plugins']['get']('Dialog');_0x311009['isOpen']&&'commentsArchive'===_0x311009['id']&&(_0x311009['hide'](),_0xa7dbbf['stop']());};}class gi extends _0x22a428{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 _0x1961e5,ContextPlugin as _0x388a6f,PendingActions as pt,Command as _0x406027,Plugin as _0x35651a,Context as _0x3a3651}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x3538ec,uid as _0x3b880e,KeystrokeHandler as jt,FocusTracker as _0x43d57e,diff as _0x152196,Collection as _0x504ada,Rect as _0x3dcdfa,CKEditorError as _0x274fd1,first as _0x3292fb,priorities as Wt,scrollViewportToShowTarget as ot,getEnvKeystrokeText as nt,toUnit as Dt,DomEmitterMixin as _0x3fda0f,keyCodes as _0x50541b}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x3e6b0c,AriaDescriptionView as Zt,setupThreadKeyboardNavigation as ts,ConfirmMixin as ti,LateFocusButtonView as _0x2c520f,trimHtml as _0x180eda,LateFocusDropdownButtonView as _0xbda48,Users as st,getDateTimeFormatter as It,hashObject as wt,getAllMarkersDomElementsSorted as it,surroundingMarkersDetector as et,FOCUS_ANNOTATION_KEYSTROKE as _0x3be90e}from'ckeditor5-collaboration/dist/index.js';import{throttle as _0x378124,isEqual as yt,cloneDeep as At,set as Ct,unset as vt,debounce as _0x12b399}from'es-toolkit/compat';import{IconUndo as _0x476701,IconCheck as _0x2a6e37,IconPencil as _0x4dc30,IconRemoveComment as _0x1ad19b,IconThreeVerticalDots as _0x384224,IconAddComment as _0x14f2f4,IconCommentsArchive as _0x37f55e}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Xt,InlineEditableUIView as $t,EditorUI as Ut,View as kt,FocusCycler as _0x5a7382,ButtonView as _0x13fccc,ViewCollection as _0x31ebb9,createDropdown as _0x1a0755,ListView as _0x3737d5,focusChildOnDropdownOpen as _0x2e355f,ListItemView as _0x53e8ec,MenuBarMenuListItemButtonView as _0x339fd3,BodyCollection as _0x308b40,BalloonPanelView as _0x1d2c37,ContextualBalloon as _0x2e5f1d,Dialog as _0x3c85b0,DialogViewPosition as _0x4c44fd}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as St,enableViewPlaceholder as Ft,MouseObserver as _0xbea9b9}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as 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 _0x258aa7}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x976562}from'@ckeditor/ckeditor5-widget/dist/index.js';class gt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x3538ec(){['model'];['view'];constructor(_0x4e0548,_0x320a7d){super(),this['model']=_0x4e0548,this['model']['_isAttached']=!0x0,this['view']=_0x320a7d,this['listenTo'](_0x320a7d,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x320a7d,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x320a7d,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x320a7d,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x320a7d,'addComment',(_0x3f05d1,_0x366b55)=>this['addComment'](_0x366b55)),this['listenTo'](_0x320a7d,'updateComment',(_0x54ddf0,_0x2a3f86,_0x9bd238)=>this['updateComment'](_0x2a3f86,_0x9bd238)),this['listenTo'](_0x320a7d,'removeComment',(_0x3ce61b,_0x5dafe9)=>this['removeComment'](_0x5dafe9));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x2246c8){this['model']['addComment']({'content':_0x2246c8,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x3cf2fb,_0x2d1687){this['model']['getComment'](_0x3cf2fb)['update']({'content':_0x2d1687});}['removeComment'](_0x324877){this['model']['getComment'](_0x324877)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x1a9765,_0x3a6d19,_0x313af5){const t=_0x1a9765['t'];switch(_0x3a6d19){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'},_0x313af5);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'},_0x313af5);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'},_0x313af5);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'},_0x313af5);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x313af5);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'},_0x313af5);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'},_0x313af5);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'},_0x313af5);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(_0xb317a4,_0x41b49a){super(_0xb317a4);const _0x1f0902=_0x3b880e();this['main']=this['createCollection'](),this['editable']=new $t(_0xb317a4,_0x41b49a,void 0x0,{'label':()=>N(_0xb317a4,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0xb317a4['uiLanguageDirection'],'lang':_0xb317a4['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x1f0902},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Ot extends Ut{['view'];constructor(_0x406fd7){super(_0x406fd7),this['view']=new Vt(_0x406fd7['locale'],_0x406fd7['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x1b2d1a=this['editor']['editing']['view'],_0x3473d6=this['view']['editable'],_0xb4ba04=_0x1b2d1a['document']['getRoot']();_0x3473d6['name']=_0xb4ba04['rootName'],this['view']['render']();const _0x56cafc=_0x3473d6['element'];this['setEditableElement'](_0x3473d6['name'],_0x56cafc),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x1b2d1a['attachDomRoot'](_0x56cafc),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[qt,zt,Bt,Gt,Jt,Kt,Lt];class Rt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x3538ec(_0x1961e5){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Qt)());constructor(_0x1c6cfc={}){function _0x59de9d(_0x5b11a6){return _0x5b11a6['map'](_0x3ccaae=>String['fromCharCode'](_0x3ccaae))['join']('');}(_0x1c6cfc=Object['assign']({},_0x1c6cfc))['plugins']||(_0x1c6cfc['plugins']=Rt['defaultPlugins']),super(_0x1c6cfc),this['ui']=new Ot(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x59de9d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x59de9d([0x76,0x69,0x65,0x77])][_0x59de9d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x59de9d([0x61,0x75,0x74,0x6f]),this[_0x59de9d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x59de9d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x59de9d([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x59de9d([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x59de9d([0x6f,0x6b])});}['create'](){const _0x584393=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x584393))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x372514=>{const _0x1d6259=this['model']['document']['getRoot'](),_0xc991b7=_0x1d6259&&_0x1d6259['getChild'](_0x1d6259['childCount']-0x1);_0x372514['setSelection'](_0xc991b7,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x1a33f6=this['editing']['view'],_0x588e0e=_0x1a33f6['document']['getRoot'](),_0x291873=_0x588e0e['getChild'](0x0);_0x588e0e['childCount']>0x1||!_0x291873||'p'!=_0x291873['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x1a33f6,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x291873['placeholder']=this['placeholder']),Ft({'view':_0x1a33f6,'element':_0x291873,'keepOnFocus':!0x0}),this['placeholderElement']=_0x291873);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x56eea7,_0x1f7b97={}){super(_0x56eea7),this['editor']=null,this['_editorConfig']=_0x1f7b97,this['set']('value',_0x1f7b97['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x56eea7,'Reply...')),this['set']('submitLabel',N(_0x56eea7,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x43d57e(),this['focusCycler']=new _0x5a7382({'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',(_0x4106dc,_0x3a4424)=>{this['cancelButtonView']['fire']('execute'),_0x3a4424();}),this['keystrokes']['set']('Ctrl+Enter',(_0x51af32,_0x3d946c)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x3d946c());}),this['on']('submit',(_0x3863eb,_0x5f034e)=>{_0x5f034e['length']>0xfde8?(alert(N(_0x56eea7,'TOO_LONG_COMMENT_ALERT',[_0x5f034e['length'],0xfde8])),_0x3863eb['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 _0xf039e7=this['editor'];this['element']['insertBefore'](_0xf039e7['ui']['element'],this['element']['firstChild']),_0xf039e7['model']['document']['on']('change',()=>this['value']=_0xf039e7['getData']()),_0xf039e7['bind']('placeholder')['to'](this),this['focusables']['add'](_0xf039e7['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x3cb71b){-0x1===_0x3cb71b?(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:_0x2c53cb}=this,_0x2248fd=new _0x13fccc(_0x2c53cb);return _0x2248fd['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x2248fd['withText']=!0x0,_0x2248fd['bind']('label')['to'](this,'submitLabel'),_0x2248fd['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x2248fd['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x5ae149,_0x187a8a)=>!_0x187a8a&&!!_0x5ae149['trim']()),_0x2248fd;}['_createCancelButton'](){const {locale:_0x53b520}=this,_0x1ee4d9=new _0x13fccc(_0x53b520);return _0x1ee4d9['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x1ee4d9['label']=N(_0x53b520,'Cancel'),_0x1ee4d9['withText']=!0x0,_0x1ee4d9['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x1ee4d9;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x3735ee=>{this['focusTracker']['add'](_0x3735ee['element']);}),this['focusables']['on']('change',(_0x381599,_0x564afe)=>{for(const _0x545d9b of Array['from'](_0x564afe['added'])['reverse']())this['focusTracker']['add'](_0x545d9b['element']);});}}class ie extends kt{constructor(_0x31d2cd,_0xda2624,_0x3dfe55){super(_0x31d2cd),this['commentInputView']=new os(_0x31d2cd,_0x3dfe55),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x5015d3,_0xd7935e)=>_0x5015d3||!!_0xd7935e),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 _0x3e6b0c(_0x31d2cd,_0xda2624),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'](_0x10992a){this['commentInputView']['focus'](_0x10992a);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x5e394e,_0x40fb36)=>{const {submitButtonView:_0x2d6b98,cancelButtonView:_0x17ae5f,editor:_0x2f9157}=this['commentInputView'];[_0x2d6b98['element'],_0x17ae5f['element'],_0x2f9157?_0x2f9157['editing']['view']['getDomRoot']():null]['filter'](_0x1ed4a0=>_0x1ed4a0)['some'](_0x423f15=>_0x423f15['contains'](_0x40fb36['target']))||(this['focus'](),_0x40fb36['preventDefault']());});}}class rs extends kt{constructor(_0x171632){super(_0x171632);const _0xcc923f=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0xcc923f['to']('count',_0x211d0c=>N(_0x171632,'NUMBER_OF_COMMENTS',_0x211d0c))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x37da3f,_0xb5fe56,_0x3ecc17){super(_0x37da3f);const _0x4fb83f=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0xb5fe56['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0xb5fe56,this['_config']=_0x3ecc17,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x43d57e(),this['keystrokes']=new jt(),this['focusCycler']=new _0x5a7382({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x21bd3b=>this['commentViews']['map'](_0x3544d6=>_0x3544d6['element'])['includes'](_0x21bd3b['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x37da3f),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x3d2419=>_0x3d2419-this['_config']['maxCommentsWhenCollapsed']);for(const _0x49f632 of _0xb5fe56['comments'])this['_handleNewCommentModel'](_0x49f632);this['_handleInfoComment'](),this['listenTo'](_0xb5fe56['comments'],'add',(_0x1d4a2d,_0x52f9bd)=>{const _0x4dab03=this['_calculatePosition'](_0x52f9bd);this['length']++,this['_handleNewCommentModel'](_0x52f9bd,_0x4dab03),this['refreshVisibleViews']();}),this['listenTo'](_0xb5fe56['comments'],'remove',(_0x40b752,_0xa336b6)=>{this['length']--,this['_handleRemoveCommentModel'](_0xa336b6),this['refreshVisibleViews']();}),this['listenTo'](_0xb5fe56,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0xb5fe56,'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',_0x4fb83f['if']('length','ck-hidden',_0x3fb2ba=>!_0x3fb2ba)],'aria-label':N(_0x37da3f,'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'](_0x3e0a45){-0x1===_0x3e0a45?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x67c59 of this['commentViews'])_0x67c59['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x1bdc58,_0x5e4c3c){const _0x237581=new this['_config']['CommentView'](this['locale'],_0x1bdc58,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x237581['viewUid']=_0x1bdc58['id'],_0x237581['delegate']('removeComment')['to'](this),_0x237581['delegate']('updateComment')['to'](this),_0x237581['delegate']('resolveCommentThread')['to'](this),_0x237581['delegate']('editorReady')['to'](this),_0x237581['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x237581,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x237581,_0x5e4c3c);}['_calculatePosition'](_0x3dd37){const _0x171078=this['_model']['_findOptimalIndex'](_0x3dd37);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x3dd37['authoredAt']?_0x171078-0x1:_0x171078:_0x171078-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x3b3161={'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'],_0x3b3161,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x3b3161));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x295990){const _0x45d3bd=this['commentViews']['remove'](_0x295990['id']);this['stopListening'](_0x45d3bd),_0x45d3bd['isEditMode']&&this['_updateHasDirtyComment'](),_0x45d3bd['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x20b578=>_0x20b578['isEditMode']);}['_rearrangeCollapse'](){const _0x2a098d=function(_0x469b9a){const _0x14beee=new _0x504ada();for(const _0xa482e2 of _0x469b9a)_0x14beee['add'](_0xa482e2);return _0x14beee;}(this['commentViews']),_0x25f789=this['_collapsedCommentsView']['count'];for(let _0x4ed2b2=0x1;_0x4ed2b2<=_0x25f789;_0x4ed2b2++)_0x2a098d['remove'](0x1);for(const _0x290bd1 of _0x2a098d)_0x290bd1['collapse']();_0x25f789>0x0&&_0x2a098d['add'](this['_collapsedCommentsView'],0x1),ns(_0x152196(Array['from'](this['visibleViews']),Array['from'](_0x2a098d)),this['visibleViews'],_0x2a098d);}['_rearrangeExpand'](){ns(_0x152196(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x18fdfd of this['visibleViews'])_0x18fdfd['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x1f7e28=>{this['focusTracker']['add'](_0x1f7e28['element']),this['keystrokes']['listenTo'](_0x1f7e28['element']);}),this['commentViews']['on']('change',(_0x1fcadc,_0x2549b0)=>{for(const _0x38fae6 of _0x2549b0['removed'])this['focusTracker']['remove'](_0x38fae6['element']),this['keystrokes']['stopListening'](_0x38fae6['element']);for(const _0x336e24 of Array['from'](_0x2549b0['added'])['reverse']())this['focusTracker']['add'](_0x336e24['element']),this['keystrokes']['listenTo'](_0x336e24['element']);});}}function ns(_0x28760c,_0x52acda,_0x31ed3e){let _0x9028d5=0x0;for(const _0x171d19 of _0x28760c)switch(_0x171d19){case'insert':_0x52acda['add'](_0x31ed3e['get'](_0x9028d5),_0x9028d5),_0x9028d5++;break;case'delete':_0x52acda['remove'](_0x9028d5);break;case'equal':_0x9028d5++;}}class oe extends kt{constructor(_0x77339e){super(_0x77339e);const _0x83d5e2=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x83d5e2['to']('contextValue',_0x12a9a5=>N(_0x77339e,'THREAD_CONTEXT_LABEL',_0x12a9a5)),'tabindex':-0x1},'children':[{'text':_0x83d5e2['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x974bd5,_0x435022){super(_0x974bd5);const _0x2ce67d=this['bindTemplate'];this['_model']=_0x435022,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x43d57e(),this['keystrokes']=new jt(),this['focusCycler']=new _0x5a7382({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x1b6811=>!!_0x1b6811),this['bind']('contextValue')['to'](this['_model'],'context',_0x166e21=>_0x166e21&&_0x166e21['value']?this['_trimContextValue'](_0x166e21['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',_0x2ce67d['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 _0x149713=new _0x13fccc(this['locale']);return _0x149713['label']=N(this['locale'],'Reopen'),_0x149713['tooltip']=N(this['locale'],'Reopen'),_0x149713['icon']=_0x476701,_0x149713['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2206ac=>!_0x2206ac),_0x149713['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x317512,_0x305aad)=>_0x317512&&_0x305aad),_0x149713['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x149713;}['_trimContextValue'](_0x272266){if(_0x272266['length']<0x96)return _0x272266;const _0x40710a=_0x272266['lastIndexOf']('\x20',0x93);return _0x272266['substring'](0x0,_0x40710a>-0x1?_0x40710a:0x93)+'...';}['_attachContextActions'](){const _0x391708=this['element']['querySelector']('.ck-context'),_0x1d371a=_0x391708['querySelector']('.ck-context__value');this['listenTo'](_0x391708,'mouseenter',()=>{_0x1d371a['offsetWidth']<_0x1d371a['scrollWidth']&&_0x391708['classList']['add']('overlay');}),this['listenTo'](_0x391708,'mouseleave',()=>{_0x391708['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x26939a of this['focusables'])this['focusTracker']['add'](_0x26939a['element']),this['keystrokes']['listenTo'](_0x26939a['element']);}['_createContextView'](){const _0x9c0ac3=new oe(this['locale']);return _0x9c0ac3['bind']('contextValue')['to'](this),_0x9c0ac3;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x2f2ca6,_0x54cbaf,_0x5b3711,_0x1dc481){super(_0x2f2ca6),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x54cbaf,this['_localUser']=_0x5b3711,this['_config']=_0x1dc481,this['commentThreadHeaderView']=new Yt(_0x2f2ca6,_0x54cbaf),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x2f2ca6,N(_0x2f2ca6,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x2f2ca6,_0x54cbaf,Object['assign']({'CommentView':this['_config']['CommentView']},_0x1dc481)),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',(_0x237886,_0x31a02b)=>_0x237886||!!_0x31a02b),this['bind']('isUnlinked')['to'](_0x54cbaf,'unlinkedAt',_0x5ccbd4=>!!_0x5ccbd4),this['bind']('ariaLabel')['to'](this,'length',_0x167772=>{const _0x4db465=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x167772,_0x4db465]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x43d57e(),this['keystrokes']=new jt(),this['focusCycler']=new _0x5a7382({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5adb86=>_0x5adb86['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 _0x2e8f25=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x37867f=_0x2e8f25['commentInputView'];return _0x2e8f25['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x37867f,'value',(_0x5de711,_0x160d86,_0x4cecb7,_0x7da004,_0x3027a7)=>!!_0x3027a7||!!_0x7da004&&_0x4cecb7&&!_0x160d86||_0x5de711&&_0x4cecb7&&!_0x160d86),_0x37867f['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x335974,_0x724c9e,_0x441e45)=>{let _0x289fb7;return _0x289fb7=_0x441e45&&_0x724c9e?'Reply\x20to\x20reopen\x20discussion...':_0x335974?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x289fb7);}),_0x37867f['bind']('submitLabel')['to'](this,'length',_0x449184=>N(this['locale'],_0x449184?'Reply':'Comment')),_0x37867f['on']('submit',(_0xc01dfc,_0x559d18)=>{this['fire']('addComment',_0x559d18),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x37867f['on']('cancel',()=>{this['focus']();}),_0x37867f['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x37867f['on']('cancel',_0x5c37be=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x5c37be['stop']());}),this['on']('change:isActive',(_0x3df9a2,_0xf28ea0,_0x2608be)=>{_0x2608be||this['length']||_0x37867f['value']||this['fire']('removeCommentThread');}),_0x2e8f25;}}class Tt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0xd63abc,_0x26053f,_0x5caca0,_0x396502){super(_0xd63abc,_0x26053f,_0x5caca0,_0x396502),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0xd63abc,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x298bcb,_0xf5c4c,_0x295389)=>{_0x295389||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x495ad9,_0x3be33e,_0x1b1d95)=>{_0x1b1d95&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x2f161d=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x2f161d['if']('isActive','ck-thread--active'),_0x2f161d['if']('isUnlinked','ck-thread--unlinked'),_0x2f161d['if']('isConfirm','ck-thread--remove-confirmation'),_0x2f161d['to']('actionIndicator',_0x343d9b=>_0x343d9b?'ck-thread--'+_0x343d9b:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x2f161d['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 _0xc2da7c of this['commentsListView']['commentViews'])_0xc2da7c['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x5ceefe}=this,_0x216c24=this['commentsListView']['commentViews']['get'](0x0);_0x216c24===this['_boundFirstCommentView']||_0x216c24['isSystemComment']||(this['_boundFirstCommentView']=_0x216c24,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x216c24,'actionIndicator',_0x94e8d1=>'remove'===_0x94e8d1?'remove':null),_0x216c24['placeholder']=N(_0x5ceefe,'Write\x20a\x20comment...'),_0x216c24['removeButton']['on']('execute',_0x480e05=>{_0x480e05['stop'](),this['showConfirm'](N(_0x5ceefe,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x216c24['focus']();}),_0x216c24['actionBar']['add'](this['resolveButton'],0x0),_0x216c24['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x38e8aa=new _0x2c520f(this['locale']);return _0x38e8aa['label']=N(this['locale'],'Resolve'),_0x38e8aa['tooltip']=N(this['locale'],'Resolve'),_0x38e8aa['icon']=_0x2a6e37,_0x38e8aa['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x38e8aa['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x318f76=>!_0x318f76),_0x38e8aa['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x524c17,_0x392787)=>_0x524c17&&!_0x392787),_0x38e8aa['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x38e8aa;}['_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(_0xf067e8){super(_0xf067e8),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x724ee0,_0x2ee50a,_0x2f18f7)=>{this['element']['innerHTML']=_0x2f18f7;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x488f9d,_0x48162a,_0x465839){super(_0x488f9d),this['_model']=_0x48162a,this['_config']=_0x465839,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x48162a,'content',_0x48162a,'authoredAt',(_0x2ee7d5,_0x31d6b0)=>N(_0x488f9d,'COMMENT_ARIA_LABEL',[_0x48162a['author']['name'],_0x465839['formatDateTime'](_0x31d6b0),new DOMParser()['parseFromString'](_0x2ee7d5,'text/html')['body']['textContent'],_0x48162a['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Zt(_0x488f9d,N(_0x488f9d,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x31ebb9(),this['focusTracker']=new _0x43d57e(),this['keystrokes']=new jt(),this['focusCycler']=new _0x5a7382({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x62d6b5=>_0x62d6b5['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 _0x21ded5=new es(this['locale']);return _0x21ded5['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x573e8b,_0x5acc78)=>_0x5acc78?_0x180eda(_0x573e8b,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x573e8b),_0x21ded5;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x5eef90=new os(this['locale'],this['_config']['editorConfig']);return _0x5eef90['value']=this['_model']['content'],_0x5eef90['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x5eef90['submitLabel']=N(this['locale'],'Save'),_0x5eef90['on']('submit',(_0x532d8,_0x216d72)=>{this['fire']('updateComment',this['_model']['id'],_0x216d72),this['switchToDisplayMode'](),this['focus']();}),_0x5eef90['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x5eef90['once']('editorReady',()=>{_0x5eef90['focus']();}),_0x5eef90['createEditor'](),_0x5eef90['delegate']('editorReady')['to'](this),_0x5eef90['delegate']('editorDestroyed')['to'](this),_0x5eef90;}['_setupKeyboardNavigation'](){const _0x1d105c=this['element'];this['keystrokes']['listenTo'](_0x1d105c);for(const _0x12f226 of this['focusables'])this['focusTracker']['add'](_0x12f226['element']),this['keystrokes']['listenTo'](_0x12f226['element']);this['focusables']['on']('change',(_0x6ec879,_0x5ccdf7)=>{for(const _0x78c727 of _0x5ccdf7['removed'])this['focusTracker']['remove'](_0x78c727['element']),this['keystrokes']['stopListening'](_0x78c727['element']);for(const _0x3e3d2e of _0x5ccdf7['added'])this['focusTracker']['add'](_0x3e3d2e['element']),this['keystrokes']['listenTo'](_0x3e3d2e['element']);}),this['keystrokes']['set']('enter',(_0x51a643,_0x3bb9f2)=>{_0x1d105c===_0x51a643['target']&&(this['focusCycler']['focusFirst'](),_0x3bb9f2());}),this['keystrokes']['set']('esc',(_0x97b76f,_0x3ee34e)=>{_0x1d105c!==_0x97b76f['target']&&(this['focus'](),_0x3ee34e());});}}class _t extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(di){['actionBar'];['userView'];constructor(_0x1f77b5,_0x491330,_0x528877){super(_0x1f77b5,_0x491330,_0x528877),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x1f77b5,'Reply...')),this['bind']('authoredAt')['to'](_0x491330),this['bind']('resolvedAt')['to'](_0x491330),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 _0x3e6b0c(_0x1f77b5,_0x491330['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x491330,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x1d6333=this['bindTemplate'],_0x4f576c=[{'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':_0x1d6333['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x1d6333['to']('authoredAt',_0x28445e=>this['_config']['formatDateTime'](_0x28445e))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x1d6333['if']('isEditMode','ck-comment__actions--hidden'),_0x1d6333['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']&&_0x4f576c['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x1d6333['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x1d6333['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x1d6333['if']('isEditMode','ck-comment--edit'),_0x1d6333['if']('isSystemComment','ck-comment--info'),_0x1d6333['to']('actionIndicator',_0x66de32=>_0x66de32?'ck-comment--'+_0x66de32:'')],'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':_0x4f576c}]}]};}['_createEditButton'](){const _0xaef185=new _0x13fccc(this['locale']);return _0xaef185['label']=N(this['locale'],'Edit'),_0xaef185['icon']=_0x4dc30,_0xaef185['withText']=!0x0,_0xaef185['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0xaef185['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x34007f=>!_0x34007f),_0xaef185['bind']('isVisible')['to'](this['_model'],'isEditable'),_0xaef185['on']('execute',()=>this['switchToEditMode']()),_0xaef185;}['_createRemoveButton'](){const _0x15c5aa=new _0x13fccc(this['locale']);return _0x15c5aa['label']=N(this['locale'],'Remove'),_0x15c5aa['icon']=_0x1ad19b,_0x15c5aa['withText']=!0x0,_0x15c5aa['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x15c5aa['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x525c28=>!_0x525c28),_0x15c5aa['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x15c5aa['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x15c5aa;}['_createDropdown'](){const _0x5a1a91=_0x1a0755(this['locale'],_0xbda48),_0x1f6fce=_0x5a1a91['panelView']['children'],_0x5e9352=new _0x3737d5(this['locale']),_0x2862e0=_0x5a1a91['bindTemplate'];_0x2e355f(_0x5a1a91,()=>this['items']['find'](_0x27ee21=>_0x27ee21['isVisible'])),_0x5a1a91['extendTemplate']({'attributes':{'class':[_0x2862e0['if']('isVisible','ck-hidden',_0x1f1246=>!_0x1f1246)]}});const _0x49b25b=(_0x23b3ba,_0x5b2720=-0x1)=>{const _0xafc193=new _0x53e8ec(this['locale']);_0xafc193['children']['add'](_0x23b3ba);const _0x44f84b=_0x5b2720>-0x1?_0x5b2720:_0x5e9352['items']['length'];_0x5e9352['items']['add'](_0xafc193,_0x44f84b);const _0x4e2276=Array['from'](this['items']);_0x5a1a91['unbind']('isEnabled','isVisible'),_0x5a1a91['bind']('isEnabled')['toMany'](_0x4e2276,'isEnabled',(..._0x28ed14)=>_0x28ed14['some'](_0x234b7a=>_0x234b7a)),_0x5a1a91['bind']('isVisible')['toMany'](_0x4e2276,'isVisible',(..._0x4451d0)=>_0x4451d0['some'](_0x769f7=>_0x769f7));};_0x5a1a91['panelPosition']='sw',_0x5a1a91['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x384224});for(const _0x5ddccc of this['items'])_0x49b25b(_0x5ddccc);return _0x1f6fce['add'](_0x5e9352),_0x5a1a91['listenTo'](this['items'],'add',(_0x1f1c47,_0x968980,_0x416ed9)=>{_0x49b25b(_0x968980,_0x416ed9);}),_0x5a1a91['listenTo'](this['items'],'remove',(_0xe451c6,_0x21d935,_0x3421c8)=>{_0x5e9352['items']['remove'](_0x3421c8);}),_0x5a1a91;}['_attachActions'](_0x29c022,_0x2b92f4){const _0x2bbfb0=_0x29c022&&_0x29c022['element'];_0x2bbfb0&&(this['listenTo'](_0x2bbfb0,'mouseenter',()=>this['actionIndicator']=_0x2b92f4),this['listenTo'](_0x2bbfb0,'focus',()=>this['actionIndicator']=_0x2b92f4),this['listenTo'](_0x2bbfb0,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x2bbfb0,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x30eeed=super['_createCommentInputView']();return _0x30eeed['bind']('placeholder')['to'](this),_0x30eeed;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Et(_0x26b94d){const _0xdd31d2=_0x378124(_0x26b94d,0x1e),_0x4ab3e1=new MutationObserver(_0x4516a4=>{for(const _0x3b9102 of _0x4516a4)('attributes'==_0x3b9102['type']&&'class'==_0x3b9102['attributeName']||'childList'==_0x3b9102['type']||'characterData'==_0x3b9102['type'])&&_0xdd31d2();});return{'attach'(_0x3da89d){_0x4ab3e1['observe'](_0x3da89d,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x4ab3e1['disconnect'](),_0xdd31d2['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x291033,_0x4b4f59){super(_0x291033),this['id']=_0x3b880e(),this['focusTracker']=new _0x43d57e(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x176de0,_0x305977)=>this['fire']('Esc',_0x305977)),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']=Et(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x4b4f59),this['mainView']=_0x4b4f59;const _0x257b80=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x257b80['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 _0xf326b8=this['element']['clientHeight'];_0xf326b8&&(this['height']=_0xf326b8);}}class T extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x3538ec(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x3a262a,target:_0x2dd17c,type:_0x227279,isVisible:_0xa1117=!0x0}){super(),this['view']=_0x3a262a,this['view']['element']||this['view']['render'](),this['_type']=_0x227279,this['_target']=_0x2dd17c,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x504ada([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x41a0fa,_0x5389f8)=>{this['view']['focusTracker']['add'](_0x5389f8);}),this['focusableElements']['on']('remove',(_0x20a265,_0x32002d)=>{this['view']['focusTracker']['remove'](_0x32002d);}),this['set']('isVisible',_0xa1117);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x274c6c=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x274c6c),_0x274c6c;}get['targetRect'](){const _0x4572eb=this['target'];if(null===_0x4572eb)return null;if(_0x4572eb instanceof _0x3dcdfa)return _0x4572eb;const _0x379b88=_0x4572eb['filter'](_0x147a4a=>function(_0x409300){const _0x244971=_0x409300['offsetParent'];if(_0x244971)return!0x0;const _0x530245=_0x409300['getClientRects']()['item'](0x0);return!!_0x530245;}(_0x147a4a));return 0x0===_0x379b88['length']?null:new _0x3dcdfa(_0x379b88[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x277f8e){this['view']['isActive']=_0x277f8e,this['view']['mainView']['isActive']=_0x277f8e;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x60f062){if(!(null===_0x60f062||_0x60f062 instanceof _0x3dcdfa||Array['isArray'](_0x60f062)&&_0x60f062['every'](_0x47f634=>fi(_0x47f634))))throw new _0x274fd1('annotation-invalid-target',null,{'target':_0x60f062});}['_getNormalizedTarget'](){const _0x3dc7f5='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x3dc7f5)?[_0x3dc7f5]:_0x3dc7f5;}}function fi(_0x25b629){return null!==_0x25b629&&'object'==typeof _0x25b629&&'nodeType'in _0x25b629&&0x1===_0x25b629['nodeType'];}class S extends _0x504ada{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x594d65=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x43d57e(),this['_focusTracker']['on']('change:isFocused',(_0x1d70de,_0x2727e2,_0x2ff482)=>{_0x2ff482||this['fire']('blur');});for(const _0x457145 of _0x594d65)this['add'](_0x457145);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x324126){if(this['has'](_0x324126))throw new _0x274fd1('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x324126['innerView'],_0x324126),this['_viewToAnnotation']['set'](_0x324126['view'],_0x324126);for(const _0x373271 of _0x324126['focusableElements'])this['_focusTracker']['add'](_0x373271);this['listenTo'](_0x324126['focusableElements'],'add',(_0x329033,_0x50510d)=>{this['_focusTracker']['add'](_0x50510d);}),this['listenTo'](_0x324126['focusableElements'],'remove',(_0x50695b,_0x3f7431)=>{this['_focusTracker']['remove'](_0x3f7431);}),this['listenTo'](_0x324126['view']['focusTracker'],'change:isFocused',(_0xb87467,_0x842c84,_0x295610)=>{_0x295610&&this['fire']('focus',_0x324126);}),_0x324126['updateTargetRect']();const _0x58e6a9=this['_getOrderInContent'](_0x324126['view']['targetRect']);return super['add'](_0x324126,_0x58e6a9);}['remove'](_0x87dd61){if(!this['has'](_0x87dd61))throw new _0x274fd1('annotationcollection-not-existing-item',null);this['stopListening'](_0x87dd61['view']['focusTracker']),this['stopListening'](_0x87dd61['focusableElements']);for(const _0x3653c5 of _0x87dd61['focusableElements'])this['_focusTracker']['remove'](_0x3653c5);return this['_viewToAnnotation']['delete'](_0x87dd61['view']),this['_innerViewToAnnotation']['delete'](_0x87dd61['innerView']),super['remove'](_0x87dd61);}['getByInnerView'](_0x4eeb34){return this['_innerViewToAnnotation']['get'](_0x4eeb34);}['getByView'](_0x4c0430){return this['_viewToAnnotation']['get'](_0x4c0430);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x3c10f0 of this)_0x3c10f0['updateTargetRect']();this['_sort']();}['_sort'](){const _0xcc06ed=Array['from'](this)['sort']((_0xb8ccd9,_0x53e459)=>w(_0xb8ccd9['view']['targetRect'],_0x53e459['view']['targetRect']));for(let _0x3f747c=_0xcc06ed['length']-0x1;_0x3f747c>0x0;_0x3f747c--){const _0x5a88cf=_0xcc06ed[_0x3f747c];_0x3f747c!==this['getIndex'](_0x5a88cf)&&(this['remove'](_0x5a88cf),this['add'](_0x5a88cf));}}['_getOrderInContent'](_0x3effa3){let _0x348986=0x0;if(!_0x3effa3)return this['length'];for(const _0x34ba6c of this){const _0x291512=_0x34ba6c['view']['targetRect'];if(_0x291512){if(w(_0x3effa3,_0x291512)<0x0)return _0x348986;_0x348986++;}}return _0x348986;}}function v({source:_0x4e3ab4,target:_0x531b59,filter:_0x1c7599}){for(const _0x4e6228 of _0x4e3ab4)_0x1c7599(_0x4e6228)&&_0x531b59['add'](_0x4e6228);_0x531b59['listenTo'](_0x4e3ab4,'add',(_0xbfde8f,_0x4d2bf6)=>{_0x1c7599(_0x4d2bf6)&&_0x531b59['add'](_0x4d2bf6);}),_0x531b59['listenTo'](_0x4e3ab4,'remove',(_0x449aa5,_0x16ed83)=>{_0x531b59['has'](_0x16ed83)&&_0x531b59['remove'](_0x16ed83);});}function w(_0x3b72a0,_0x882466){if(null===_0x3b72a0&&null===_0x882466)return 0x0;if(null===_0x3b72a0)return-0x1;if(null===_0x882466)return 0x1;const _0x1e88fb=_0x3b72a0['top']-_0x882466['top'];return 0x0==_0x1e88fb?_0x3b72a0['left']-_0x882466['left']:_0x1e88fb;}class y extends _0x388a6f{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x52edd6){if(super(_0x52edd6),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x52edd6 instanceof _0x1961e5){const _0x287bc3=_0x52edd6['locale'];_0x52edd6['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x287bc3,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x287bc3,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x287bc3,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x287bc3,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x287bc3,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x287bc3,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x287bc3,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x51eb9c){this['collection']['add'](_0x51eb9c);}['remove'](_0x306991){this['collection']['remove'](_0x306991),_0x306991['destroy']();}['refreshVisibility'](){for(const _0x435f2a of this['collection'])_0x435f2a['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x46c386){return this['collection']['getByInnerView'](_0x46c386);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x5245b3 of this['collection'])_0x5245b3['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x3b321e){this['fire']('_activateAnnotation',_0x3b321e);}['createAnnotation'](_0x1a104d){return new T(_0x1a104d);}['createAnnotationView'](_0x430d34,_0x58f5c6){return new E(_0x430d34,_0x58f5c6);}['_addActiveAnnotation'](_0x390e08){const _0x17ee57=new Set(this['activeAnnotations']);_0x17ee57['add'](_0x390e08),this['activeAnnotations']=_0x17ee57;}['_removeActiveAnnotation'](_0x290f94){const _0x1ad4f3=new Set(this['activeAnnotations']);_0x1ad4f3['delete'](_0x290f94),this['activeAnnotations']=_0x1ad4f3;}['_bindAnnotationsToVisibleAnnotations'](){const _0x4ea5aa=this['collection'],_0x3c997d=this['_visibleAnnotations'];function _0x3f37d4(_0x253faa){const _0x264dc5=_0x253faa['source'];_0x264dc5['isVisible']&&!_0x3c997d['has'](_0x264dc5)?_0x3c997d['add'](_0x264dc5):!_0x264dc5['isVisible']&&_0x3c997d['has'](_0x264dc5)&&_0x3c997d['remove'](_0x264dc5),_0x264dc5['view']['focusTracker']['remove'](_0x264dc5['view']['element']),_0x264dc5['view']['focusTracker']['add'](_0x264dc5['view']['element']);}this['listenTo'](_0x4ea5aa,'add',(_0x534df1,_0x4b0229)=>{_0x4b0229['isVisible']&&_0x3c997d['add'](_0x4b0229),this['listenTo'](_0x4b0229,'change:isVisible',_0x3f37d4);}),this['listenTo'](_0x4ea5aa,'remove',(_0x49c18d,_0x4a1a68)=>{_0x3c997d['has'](_0x4a1a68)&&_0x3c997d['remove'](_0x4a1a68),this['stopListening'](_0x4a1a68,'change:isVisible',_0x3f37d4);});}['_setupEnterAnnotationKeystroke'](){const _0x4aa855=_0xb36d9d=>{_0xb36d9d['on']('ready',()=>{_0xb36d9d['keystrokes']['set'](_0x258aa7,(_0x41cc99,_0x1dfc75)=>{const _0x3c5db9=_0x3292fb(this['activeAnnotations']['values']());_0x3c5db9&&(_0x3c5db9['view']['focus'](),_0x1dfc75());});});};this['context']instanceof _0x1961e5?_0x4aa855(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0xabcaf8,_0x227965)=>{_0x4aa855(_0x227965);});}['_setupEscapeAnnotationHandling'](){const _0x137099=_0x540a2e=>{const _0x5bd156=_0x540a2e['source'],_0x2a7ee9=[];let _0x277ef9;if(Array['isArray'](_0x5bd156['target'])){_0x277ef9=_0x5bd156['target'][0x0],this['context']instanceof _0x1961e5?_0x2a7ee9['push'](this['context']):this['context']['editors']&&_0x2a7ee9['push'](...this['context']['editors']);for(const _0x331135 of _0x2a7ee9)for(const _0x164f6c of _0x331135['editing']['view']['domRoots']['values']())if(_0x164f6c['contains'](_0x277ef9))return void _0x331135['editing']['view']['focus']();_0x277ef9['focus']();}};this['listenTo'](this['collection'],'add',(_0x311d4a,_0x55abd9)=>{this['listenTo'](_0x55abd9,'escape',_0x137099,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x2f5e8a,_0x4c8ea9)=>{this['stopListening'](_0x4c8ea9,'escape',_0x137099);});}}const bt=Symbol('noChannel'),Nt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x388a6f{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,pt,st];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x209bc7){super(_0x209bc7),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x5e865e=this['context']['config'];_0x5e865e['define']('comments.maxCommentsWhenCollapsed',0x2),_0x5e865e['define']('comments.maxThreadTotalWeight',0x1f4),_0x5e865e['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x5e865e['define']('comments.CommentThreadView',Tt),_0x5e865e['define']('comments.CommentView',_t),_0x5e865e['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x5315ab=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0xe4b159,_0x3f767c)=>this['_addCommentThread'](_0x3f767c)),this['on']('submitCommentThread',(_0x4ab146,_0x49293e)=>this['_submitCommentThread'](_0x49293e)),this['on']('resolveCommentThread',(_0x33cd42,_0x5f0325)=>this['_resolveCommentThread'](_0x5f0325)),this['on']('resolveCommentThread',(_0x51d4e7,_0x38c7b5)=>this['_updateActiveAnnotation'](_0x38c7b5),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x362bb4,_0x5382e4)=>this['_reopenCommentThread'](_0x5382e4)),this['on']('reopenCommentThread',(_0x676d0f,_0x7a4779)=>this['_updateActiveAnnotation'](_0x7a4779),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x5ed8e7,_0x5909f3)=>this['_removeCommentThread'](_0x5909f3)),this['on']('updateCommentThread',(_0x3f9eb7,_0x4d13f4)=>this['_updateCommentThread'](_0x4d13f4)),this['on']('updateCommentThread',(_0x5ed8f1,_0x306a8f)=>this['_updateActiveAnnotation'](_0x306a8f),{'priority':'lowest'}),this['on']('addComment',(_0x44d7d6,_0x121eb1)=>this['_addComment'](_0x121eb1)),this['on']('updateComment',(_0x46dd74,_0x160196)=>this['_updateComment'](_0x160196)),this['on']('removeComment',(_0x2b2c03,_0x2f7c47)=>this['_removeComment'](_0x2f7c47)),this['on']('addComment',(_0x503c59,{threadId:_0x5d46fa,isFromAdapter:_0x26af0e})=>{if(_0x26af0e)return;const _0x5a81c7=this['getCommentThread'](_0x5d46fa),_0x389b50=_0x5a81c7&&this['_threadToController']['get'](_0x5a81c7);_0x389b50&&_0x389b50['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x5315ab,'change:activeAnnotations',(_0x48a95d,_0x4013ae,_0x5d9a03)=>{const _0x3c7a1f=Array['from'](_0x5d9a03)['map'](_0x11f12a=>this['_viewToController']['get'](_0x11f12a['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x3c7a1f?_0x3c7a1f['model']:null;});}set['adapter'](_0x4a9237){if(this['_adapter'])throw new _0x274fd1('commentsrepository-adapter-already-set');this['_adapter']=_0x4a9237;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x2243ef=bt,threadId:_0x1beee7=_0x3b880e(),comments:_0x2d2a0f=[],unlinkedAt:_0x126a48=null,resolvedAt:_0x52d27c=null,resolvedBy:_0x251138=null,target:_0x548a4a=null,context:_0xfff122=null,attributes:_0x263be8={},isResolvable:_0xedbf24=!0x0,isSubmitted:_0x1e1565=!0x1,isFromAdapter:_0x50503e=!0x1}={}){return this['fire'](xt('addCommentThread',_0x2243ef),{'channelId':_0x2243ef,'threadId':_0x1beee7,'comments':_0x2d2a0f,'unlinkedAt':_0x126a48,'resolvedAt':_0x52d27c,'resolvedBy':_0x251138,'target':_0x548a4a,'context':_0xfff122,'attributes':_0x263be8,'isFromAdapter':_0x50503e,'isResolvable':_0xedbf24,'isSubmitted':_0x1e1565}),this['getCommentThread'](_0x1beee7);}['openNewCommentThread']({channelId:_0x49f218=bt,threadId:_0x5ee0e2=_0x3b880e(),target:_0x4421e6,context:_0x55b487=null,isResolvable:_0x5e18c8=!0x0}){if(this['_readOnlyChannels']['has'](_0x49f218)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x4421e6)throw new _0x274fd1('commentsrepository-missing-target');const _0x1b9cb5=this['addCommentThread']({'channelId':_0x49f218,'threadId':_0x5ee0e2,'target':_0x4421e6,'context':_0x55b487,'isResolvable':_0x5e18c8});if(!_0x1b9cb5)return null;const _0x651ee3=this['_threadToController']['get'](_0x1b9cb5),_0x2273ec=_0x651ee3['view']['commentThreadInputView']['commentInputView'],_0x1ce22b=this['context']['plugins']['get'](y),_0x372324=_0x1ce22b['getByInnerView'](_0x651ee3['view']);return _0x1ce22b['activate'](_0x372324),_0x2273ec['once']('editorReady',()=>_0x2273ec['focus']()),_0x1b9cb5;}['hasCommentThread'](_0x1c4bb3){if('string'!=typeof _0x1c4bb3)throw new _0x274fd1('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x1c4bb3);}['updateCommentThread']({channelId:_0x4ea232=bt,threadId:_0x3ee8a4,context:_0x19e8d1,unlinkedAt:_0xba49ca,attributes:_0x176edc,isFromAdapter:_0x5e8615=!0x1}){return this['fire'](xt('updateCommentThread',_0x4ea232),{'channelId':_0x4ea232,'threadId':_0x3ee8a4,'context':_0x19e8d1,'unlinkedAt':_0xba49ca,'attributes':_0x176edc,'isFromAdapter':_0x5e8615}),this['getCommentThread'](_0x3ee8a4);}['getCommentThread'](_0x603aad){if('string'!=typeof _0x603aad)throw new _0x274fd1('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x603aad);}['fetchCommentThread']({channelId:_0x332692,threadId:_0x5dea16}={}){const _0x2fe73c=this['getCommentThread'](_0x5dea16);if(_0x2fe73c)return Promise['resolve'](_0x2fe73c);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x274fd1('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x332692,'threadId':_0x5dea16})['then'](_0x490632=>this['hasCommentThread'](_0x5dea16)?this['getCommentThread'](_0x5dea16):_0x490632?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x332692},_0x490632)):void 0x0)['catch'](_0x3d2ec1=>{throw console['error'](_0x3d2ec1),new _0x274fd1('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x42947b,skipNotAttached:_0x56f7e3=!0x1,skipEmpty:_0x22fb5a=!0x1,toJSON:_0x994181=!0x1}={}){const _0x3acc81=[];for(const _0x529aad of this['_threads']['values']())_0x42947b&&_0x529aad['channelId']!==_0x42947b||_0x56f7e3&&!_0x529aad['isAttached']||_0x22fb5a&&0x0===_0x529aad['length']||_0x3acc81['push'](_0x529aad);return _0x994181?_0x3acc81['map'](_0x2dceca=>_0x2dceca['toJSON']()):_0x3acc81;}['getAnnotationForCommentThread'](_0x59c778){const _0x1623ef=this['_threadToController']['get'](_0x59c778);if(!_0x1623ef)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x1623ef['view'])||null;}['getCommentThreadForAnnotation'](_0x3404e9){const _0x18e417=this['_viewToController']['get'](_0x3404e9['innerView']);return _0x18e417?_0x18e417['model']:null;}['setActiveCommentThread'](_0x5f1da5){const _0x42c3cd=this['context']['plugins']['get'](y);if(!_0x5f1da5)return void(this['activeCommentThread']&&_0x42c3cd['deactivateAll']());const _0x526130=this['getCommentThread'](_0x5f1da5);if(!_0x526130)throw new _0x274fd1('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x5f1da5});if(!this['_threadToController']['has'](_0x526130))throw new _0x274fd1('commentsrepository-active-not-attached',null,{'threadId':_0x5f1da5});const _0x51fbf3=_0x42c3cd['getByInnerView'](this['_threadToController']['get'](_0x526130)['view']);_0x42c3cd['activate'](_0x51fbf3);}['switchReadOnly'](_0x492294,_0x2510e4){_0x492294?this['_readOnlyChannels']['add'](_0x2510e4):this['_readOnlyChannels']['delete'](_0x2510e4),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x43da71){return this['_readOnlyChannels']['has'](_0x43da71)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x2527d1,_0xf291f0){return new gt(_0x2527d1,_0xf291f0);}['setPermissions'](_0x23bc48,_0xc2de48=bt){this['_permissions']['set'](_0xc2de48,_0x23bc48),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x5d91a0=bt){return this['_permissions']['has'](_0x5d91a0)?this['_permissions']['get'](_0x5d91a0):Nt;}['_addCommentThread']({channelId:_0x1f0a80,threadId:_0x210660,comments:_0x136c36,unlinkedAt:_0x21771e,resolvedAt:_0x18a09f,resolvedBy:_0x43b5a1,target:_0x4eaf5b,context:_0x512e8d,attributes:_0x1b5a64,isFromAdapter:_0x2f90ae,isResolvable:_0xe244c9,isSubmitted:_0x1ec0a2}){if('string'!=typeof _0x210660)throw new _0x274fd1('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x210660});if(this['hasCommentThread'](_0x210660))throw new _0x274fd1('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x210660});const _0xf1ac9a=new pi(this,{'channelId':_0x1f0a80,'id':_0x210660,'context':_0x512e8d,'attributes':_0x1b5a64,'unlinkedAt':_0x21771e,'resolvedAt':_0x18a09f,'resolvedBy':_0x43b5a1?this['context']['plugins']['get'](st)['getUser'](_0x43b5a1):null,'isResolvable':_0xe244c9,'isSubmitted':_0x1ec0a2||_0x2f90ae});this['_threads']['set'](_0x210660,_0xf1ac9a);for(const _0x3bf860 of _0x136c36)_0xf1ac9a['_add'](this['_createNewComment']({'threadId':_0x210660,..._0x3bf860}));return _0x4eaf5b&&_0xf1ac9a['attachTo'](_0x4eaf5b),_0x2f90ae||!_0xf1ac9a['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x1f0a80,'threadId':_0x210660});}['_submitCommentThread']({channelId:_0x44551f,threadId:_0x4bd4cd}){if(!this['hasCommentThread'](_0x4bd4cd))throw new _0x274fd1('commentsrepository-missing-comment-thread',this);const _0x8340af=this['getCommentThread'](_0x4bd4cd);if(_0x8340af['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x16b55e,comments:_0x1a9f00,resolvedAt:_0x13e11a,resolvedBy:_0x43cce4,context:_0x188ec7,attributes:_0x48000e}=_0x8340af,_0x46ba16=this['context']['plugins']['get']('PendingActions'),_0x414b61=_0x46ba16['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x44551f,'threadId':_0x16b55e,'comments':_0x1a9f00['map'](_0x282118=>_0x282118['toJSON']()),'resolvedAt':_0x13e11a,'resolvedBy':_0x43cce4?_0x43cce4['id']:_0x43cce4,'context':_0x188ec7,'attributes':_0x48000e})['then'](({comments:_0x462a31})=>{_0x46ba16['remove'](_0x414b61);for(const _0x943d85 of _0x462a31)this['_updateComment']({'channelId':_0x44551f,'threadId':_0x4bd4cd,'commentId':_0x943d85['commentId'],'createdAt':_0x943d85['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x34de38=>{throw console['error'](_0x34de38),new _0x274fd1('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x969f78,target:_0x39a548}){const _0x5719b4=this['getCommentThread'](_0x969f78);if(!_0x5719b4)throw new _0x274fd1('commentsrepository-attach-missing-comment-thread',this);const _0x30f090=this['context']['plugins']['get']('PendingActions'),_0x48f48d=this['context']['plugins']['get'](y),_0x451997=this['_createCommentThreadView'](_0x5719b4),_0x404b6b=new gt(_0x5719b4,_0x451997);let _0x217bbf=null;_0x451997['on']('change:isDirty',(_0xb21d43,_0xdb479e,_0x30db22)=>{_0x30db22?_0x217bbf=_0x30f090['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x217bbf&&(_0x30f090['remove'](_0x217bbf),_0x217bbf=null);}),this['_threadToController']['set'](_0x5719b4,_0x404b6b),this['_viewToController']['set'](_0x451997,_0x404b6b);const _0x4122a6=new E(this['context']['locale'],_0x451997);_0x4122a6['bind']('length')['to'](_0x451997),_0x4122a6['bind']('isDirty')['to'](_0x451997,'isDirty',_0x451997,'length',(_0x23ed63,_0x235e66)=>_0x23ed63||!_0x235e66),_0x4122a6['bind']('isActive')['to'](_0x451997),_0x4122a6['type']='comment';const _0x295f8a=new T({'view':_0x4122a6,'target':_0x39a548,'type':'comment','isVisible':!_0x5719b4['archivedAt']&&!!('function'==typeof _0x39a548?_0x39a548():_0x39a548)});return _0x451997['on']('escape',()=>{_0x295f8a['fire']('escape');}),this['_bindAnnotationToEditors'](_0x451997,_0x295f8a),_0x48f48d['add'](_0x295f8a),_0x295f8a;}['_bindAnnotationToEditors'](_0x1f20da,_0x5478a7){this['listenTo'](_0x1f20da,'editorReady',(_0x21c564,_0x44c4da)=>{const _0x54b20f=_0x44c4da['ui']['view']['body']['bodyCollectionContainer'];_0x5478a7['focusableElements']['add'](_0x54b20f),this['context']instanceof _0x1961e5&&this['context']['ui']['focusTracker']['add'](_0x54b20f);},{'priority':'highest'}),this['listenTo'](_0x1f20da,'editorDestroyed',(_0x133679,_0x371d85)=>{const _0x1336e9=_0x371d85['ui']['view']['body']['bodyCollectionContainer'];_0x5478a7['focusableElements']['has'](_0x1336e9)&&_0x5478a7['focusableElements']['remove'](_0x1336e9),this['context']instanceof _0x1961e5&&this['context']['ui']['focusTracker']['remove'](_0x1336e9);});}['_unbindEditors'](_0x8810ef){this['stopListening'](_0x8810ef,'editorReady'),this['stopListening'](_0x8810ef,'editorDestroyed');}['_createCommentThreadView'](_0x492467){const _0x489339=this['context']['plugins']['get'](st),{config:_0x375e03,locale:_0x2cf684}=this['context'],_0x1fdc78=It(_0x375e03['get']('locale'),_0x2cf684);return new(0x0,(_0x375e03['get']('comments'))['CommentThreadView'])(_0x2cf684,_0x492467,_0x489339['me'],{'editorConfig':{..._0x375e03['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x375e03['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x375e03['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x375e03['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x375e03['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x1fdc78,'CommentView':_0x375e03['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x427518,channelId:_0x1679c8,resolvedAt:_0x4e20e3,resolvedBy:_0x4e5515,isFromAdapter:_0x422c3a}){if(!this['hasCommentThread'](_0x427518))throw new _0x274fd1('commentsrepository-missing-comment-thread',null,{'threadId':_0x427518});const _0x4670e1=this['getCommentThread'](_0x427518);if(_0x4670e1['isResolved'])throw new _0x274fd1('commentsrepository-resolved-comment-thread',null,{'threadId':_0x427518});const _0x4d71b4=this['context']['plugins']['get'](st);if(_0x4670e1['resolvedBy']=_0x4d71b4['getUser'](_0x4e5515),_0x4670e1['resolvedAt']=_0x4e20e3,_0x422c3a||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x141ee6=this['context']['plugins']['get']('PendingActions'),_0x60249e=_0x141ee6['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x1679c8,'threadId':_0x427518})['then'](({resolvedAt:_0x11a9e2,resolvedBy:_0x39a156})=>{_0x141ee6['remove'](_0x60249e),_0x4670e1['resolvedBy']['id']!==_0x39a156&&(_0x4670e1['resolvedBy']=_0x4d71b4['getUser'](_0x39a156)),_0x4670e1['resolvedAt']=_0x11a9e2;})['catch'](_0x4ba815=>{throw console['error'](_0x4ba815),new _0x274fd1('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x1d7b29,channelId:_0x3929f6,isFromAdapter:_0x4a2189}){if(!this['hasCommentThread'](_0x1d7b29))throw new _0x274fd1('commentsrepository-missing-comment-thread',null,{'threadId':_0x1d7b29});const _0x178239=this['getCommentThread'](_0x1d7b29);if(!_0x178239['isResolved'])throw new _0x274fd1('commentsrepository-reopen-comment-thread',null,{'threadId':_0x1d7b29});if(_0x178239['resolvedBy']=null,_0x178239['resolvedAt']=null,_0x4a2189||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0xc7ab59=this['context']['plugins']['get']('PendingActions'),_0x453881=_0xc7ab59['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x3929f6,'threadId':_0x1d7b29})['then'](()=>_0xc7ab59['remove'](_0x453881))['catch'](_0x1f6608=>{throw console['error'](_0x1f6608),new _0x274fd1('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x4db91d,isFromAdapter:_0x297702}){const _0x13acfc=this['getCommentThread'](_0x4db91d);if(!_0x13acfc)throw new _0x274fd1('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x4db91d),this['_threads']['delete'](_0x4db91d),!_0x13acfc['isSubmitted']||_0x297702||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0xbc51a3=this['context']['plugins']['get']('PendingActions'),{channelId:_0x23fa65}=_0x13acfc,_0x5db7a1=_0xbc51a3['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x23fa65,'threadId':_0x4db91d})['then'](()=>_0xbc51a3['remove'](_0x5db7a1))['catch'](_0x79b303=>{throw console['error'](_0x79b303),new _0x274fd1('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x25cc24,unlinkedAt:_0x5cfe50,context:_0x2934b8,attributes:_0x28c5ca,isFromAdapter:_0x19c8fd}){if('string'!=typeof _0x25cc24)throw new _0x274fd1('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x25cc24});if(!this['hasCommentThread'](_0x25cc24))throw new _0x274fd1('commentsrepository-missing-comment-thread',null,{'threadId':_0x25cc24});const _0x20a0e7=this['getCommentThread'](_0x25cc24);let _0x16a2e8=!0x1;if(void 0x0!==_0x2934b8&&_0x20a0e7['context']!==_0x2934b8&&(_0x20a0e7['context']=_0x2934b8,_0x16a2e8=!0x0),void 0x0!==_0x5cfe50&&_0x20a0e7['unlinkedAt']!==_0x5cfe50&&(_0x20a0e7['unlinkedAt']=_0x5cfe50,_0x16a2e8=!0x0),_0x28c5ca&&!yt(_0x28c5ca,_0x20a0e7['attributes'])&&(_0x20a0e7['attributes']=_0x28c5ca,_0x16a2e8=!0x0),!_0x16a2e8)return Promise['resolve']();if(!_0x20a0e7['isSubmitted']||_0x19c8fd||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x44ca48=this['context']['plugins']['get']('PendingActions'),{channelId:_0xf3833f}=_0x20a0e7,_0x4a4996=_0x44ca48['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0xf3833f,'threadId':_0x25cc24,'context':_0x2934b8,'unlinkedAt':_0x5cfe50,'attributes':_0x28c5ca})['then'](()=>_0x44ca48['remove'](_0x4a4996))['catch'](_0x581872=>{throw console['error'](_0x581872),new _0x274fd1('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x29eded){const _0x307a6b=this['context']['plugins']['get'](y),_0x4576c2=this['getCommentThread'](_0x29eded);if(_0x4576c2['_isAttached']=!0x1,this['_threadToController']['has'](_0x4576c2)){const _0x3ebc48=this['_threadToController']['get'](_0x4576c2),_0x923687=_0x3ebc48['view'],_0x15eaa8=_0x307a6b['getByInnerView'](_0x923687);this['_threadToController']['delete'](_0x4576c2),this['_viewToController']['delete'](_0x923687),_0x15eaa8&&_0x307a6b['remove'](_0x15eaa8),_0x3ebc48['destroy'](),_0x923687['destroy']()['then'](()=>{this['_unbindEditors'](_0x923687);});}}['_updateActiveAnnotation']({threadId:_0x12a453,resolvedAt:_0x303d07,unlinkedAt:_0x2dcf2d}){const _0x2a6c34=!!_0x303d07,_0x9080ff=this['context']['plugins']['get'](y),_0x5309ee=this['getCommentThread'](_0x12a453);if(this['_threadToController']['has'](_0x5309ee)){const _0x52cb41=this['_threadToController']['get'](_0x5309ee)['view'],_0x2b5731=_0x9080ff['getByInnerView'](_0x52cb41);_0x2b5731&&(_0x2a6c34&&_0x9080ff['_removeActiveAnnotation'](_0x2b5731),_0x2dcf2d?_0x2b5731['isVisible']=!0x1:_0x2b5731['refreshVisibility']());}}['_getExternalAuthor'](_0x537b6f){const _0x18c452=this['context']['plugins']['get'](st),_0x308ccf=wt('external:'+_0x537b6f),_0x8aec43=_0x18c452['getUser'](_0x308ccf);return _0x8aec43||_0x18c452['addUser']({'id':_0x308ccf,'name':_0x537b6f});}['_createNewComment']({threadId:_0x351faa,commentId:_0x384f7b=_0x3b880e(),content:_0x5d303e,authorId:_0x1962a8,createdAt:_0x492044,attributes:_0x8ce13d}){if('string'!=typeof _0x384f7b)throw new _0x274fd1('commentsrepository-invalid-commentid');if('string'!=typeof _0x1962a8)throw new _0x274fd1('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x5d303e||!_0x5d303e['trim']())throw new _0x274fd1('commentsrepository-invalid-comment-content');const _0x3f68d1=this['context']['plugins']['get'](st)['getUser'](_0x1962a8);if(!_0x3f68d1)throw new _0x274fd1('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x1962a8});let _0x1ed260=null,_0x554657=_0x492044;return _0x8ce13d?.['@external']&&(_0x1ed260=this['_getExternalAuthor'](_0x8ce13d['@external']['authorName']),_0x554657=new Date(_0x8ce13d['@external']['createdAt'])),new wi(this,{'threadId':_0x351faa,'id':_0x384f7b,'author':_0x1ed260||_0x3f68d1,'creator':_0x3f68d1,'content':_0x5d303e,'createdAt':_0x492044,'authoredAt':_0x554657,'attributes':_0x8ce13d});}['_addComment'](_0x395ca1){let {threadId:_0x27338c,content:_0x379860,attributes:_0x32ad6b,isFromAdapter:_0x4a99c7}=_0x395ca1;const _0x527f65=this['getCommentThread'](_0x395ca1['threadId']);if(!_0x527f65)throw new _0x274fd1('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x4f7a71=this['_createNewComment'](_0x395ca1),{id:_0x1ae04c}=_0x4f7a71;if(_0x527f65['_add'](_0x4f7a71),_0x4a99c7||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x527f65['isSubmitted'])return Promise['resolve']();const _0x26e614=this['context']['plugins']['get']('PendingActions'),{channelId:_0xaed131}=_0x527f65,_0x506a84=_0x26e614['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x32ad6b||(_0x32ad6b={}),this['adapter']['addComment']({'channelId':_0xaed131,'threadId':_0x27338c,'commentId':_0x1ae04c,'content':_0x379860,'attributes':_0x32ad6b})['then'](_0x4dce0a=>{_0x26e614['remove'](_0x506a84),_0x4dce0a&&this['_updateComment']({'channelId':_0xaed131,'threadId':_0x27338c,'commentId':_0x1ae04c,'createdAt':_0x4dce0a['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x296976=>{throw console['error'](_0x296976),new _0x274fd1('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x3d7e5a,commentId:_0x433d15,content:_0x319c31,createdAt:_0x27eee7,attributes:_0x2e89d5,isFromAdapter:_0x2b9baa}){if(void 0x0!==_0x319c31&&('string'!=typeof _0x319c31||!_0x319c31['trim']()['length']))throw new _0x274fd1('commentsrepository-update-comment-invalid-content');const _0x37880a=this['getCommentThread'](_0x3d7e5a),_0x5d63e9=_0x37880a['getComment'](_0x433d15);if(!_0x5d63e9)throw new _0x274fd1('commentsrepository-update-missing-comment',this);let _0x5d0203=!0x1;if(_0x319c31&&_0x319c31!==_0x5d63e9['content']&&(_0x5d63e9['isEditable']||_0x2b9baa)&&(_0x5d63e9['content']=_0x319c31,_0x5d0203=!0x0),_0x27eee7&&_0x27eee7!==_0x5d63e9['createdAt']&&(_0x5d63e9['createdAt']=_0x27eee7,_0x5d63e9['attributes']&&_0x5d63e9['attributes']['@external']||(_0x5d63e9['authoredAt']=_0x27eee7),_0x5d0203=!0x0),_0x2e89d5&&!yt(_0x2e89d5,_0x5d63e9['attributes'])&&(_0x5d63e9['attributes']=_0x2e89d5,_0x5d0203=!0x0),!_0x5d0203)return Promise['resolve']();if(_0x37880a['fire']('commentUpdated'),_0x2b9baa||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0xd498d8=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5d1cd0}=this['getCommentThread'](_0x5d63e9['threadId']),_0x49e1de=_0xd498d8['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x5d1cd0,'threadId':_0x3d7e5a,'commentId':_0x433d15,'content':_0x319c31,'attributes':_0x2e89d5})['then'](()=>_0xd498d8['remove'](_0x49e1de))['catch'](_0x345feb=>{throw console['error'](_0x345feb),new _0x274fd1('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0xf3eab6,commentId:_0x57b6bc,isFromAdapter:_0xc8952f}){const _0x348ee7=this['getCommentThread'](_0xf3eab6),_0x37ae44=_0x348ee7['getComment'](_0x57b6bc);if(!_0x37ae44)throw new _0x274fd1('commentsrepository-remove-missing-comment',this);if(_0x348ee7['_remove'](_0x37ae44),_0xc8952f||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x32862a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x35634b}=_0x348ee7,_0x500bd2=_0x32862a['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x35634b,'threadId':_0xf3eab6,'commentId':_0x57b6bc})['then'](()=>_0x32862a['remove'](_0x500bd2))['catch'](_0x1a4165=>{throw console['error'](_0x1a4165),new _0x274fd1('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x3538ec(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x5c9f27,_0x55beb0){super();const _0x12dca8=_0x55beb0['isResolvable'];this['channelId']=_0x55beb0['channelId'],this['id']=_0x55beb0['id'],this['comments']=new _0x504ada(),this['_repository']=_0x5c9f27,this['_isAttached']=!0x1,this['_isSubmitted']=_0x55beb0['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x5c9f27,'_permissions',_0x5c9f27,'_readOnlyChannels',()=>_0x5c9f27['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x5c9f27,'_permissions',()=>_0x5c9f27['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x5c9f27,'_permissions',()=>{const _0x35ca1a=_0x5c9f27['getPermissions'](this['channelId']);return _0x35ca1a['write']||_0x35ca1a['admin'];}),this['bind']('isResolvable')['to'](_0x5c9f27,'_permissions',()=>_0x12dca8&&_0x5c9f27['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x55beb0['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0xb7af55,_0x37c013)=>_0xb7af55?_0x37c013?_0xb7af55<_0x37c013?_0xb7af55:_0x37c013:_0xb7af55:_0x37c013),this['set']('unlinkedAt',_0x55beb0['unlinkedAt']||null),this['set']('resolvedAt',_0x55beb0['resolvedAt']||null),this['set']('resolvedBy',_0x55beb0['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x33d9a8=>!!_0x33d9a8),this['set']('attributes',_0x55beb0['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x3b67a7,_0x1826df)=>_0x3b67a7+_0x1826df['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x2618b4,id:_0x5790ff}=this;this['_repository']['fire'](xt('submitCommentThread',_0x2618b4),{'channelId':_0x2618b4,'threadId':_0x5790ff});}['setUnlinkedAt'](_0x2e155e){this['_update']({'unlinkedAt':_0x2e155e});}['resolve']({resolvedAt:_0x294587=new Date(),resolvedBy:_0x57d9b1=null,isFromAdapter:_0x3f12f5=!0x1}={}){const _0x39ae0b=this['_repository']['context']['plugins']['get'](st)['me'],{channelId:_0x67b10b,id:_0x4dc3cb}=this;this['_repository']['fire'](xt('resolveCommentThread',_0x67b10b),{'channelId':_0x67b10b,'threadId':_0x4dc3cb,'resolvedAt':_0x294587,'resolvedBy':_0x57d9b1||_0x39ae0b['id'],'isFromAdapter':_0x3f12f5});}['reopen']({isFromAdapter:_0x430741=!0x1}={}){const {channelId:_0x289696,id:_0x5bb820}=this;this['_repository']['fire'](xt('reopenCommentThread',_0x289696),{'channelId':_0x289696,'threadId':_0x5bb820,'isFromAdapter':_0x430741});}['setContext'](_0x170491){this['context']||this['_update']({'context':_0x170491});}['setAttribute'](_0x4312cb,_0x2e9709){const _0x1ba3bb=At(this['attributes']);Ct(_0x1ba3bb,_0x4312cb,_0x2e9709),this['_update']({'attributes':_0x1ba3bb});}['removeAttribute'](_0x2f53e0){const _0x2e7644=At(this['attributes']);vt(_0x2e7644,_0x2f53e0),this['_update']({'attributes':_0x2e7644});}['remove']({isFromAdapter:_0x35eb4d=!0x1}={}){const {channelId:_0x25d061,id:_0xf3d81a}=this;this['_repository']['fire'](xt('removeCommentThread',_0x25d061),{'channelId':_0x25d061,'threadId':_0xf3d81a,'isFromAdapter':_0x35eb4d});}['attachTo'](_0x37d4c1){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x37d4c1});}['addComment'](_0xc5e775){const {channelId:_0x15aa01,id:_0x5c2ac5}=this;this['_repository']['fire'](xt('addComment',_0x15aa01,_0x5c2ac5),Object['assign']({'channelId':_0x15aa01,'threadId':_0x5c2ac5},_0xc5e775));}['getComment'](_0x132c07){if('string'!=typeof _0x132c07)throw new _0x274fd1('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x132c07});return this['comments']['get'](_0x132c07);}['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'](_0x44afee=>_0x44afee['toJSON']()),'attributes':this['attributes']};}['_add'](_0x3689cb){return this['listenTo'](_0x3689cb,'change:authoredAt',()=>{const _0x1dbb5a=this['_findOptimalIndex'](_0x3689cb),_0xa0636c=this['comments'];_0x1dbb5a-0x1!=_0xa0636c['getIndex'](_0x3689cb)&&_0x1dbb5a+0x1!=_0xa0636c['getIndex'](_0x3689cb)&&(this['_remove'](_0x3689cb),this['_add'](_0x3689cb));}),this['comments']['add'](_0x3689cb,this['_findOptimalIndex'](_0x3689cb));}['_update'](_0x583379){const {channelId:_0x52c736,id:_0x3f2298}=this;this['_repository']['fire'](xt('updateCommentThread',_0x52c736),{..._0x583379,'channelId':_0x52c736,'threadId':_0x3f2298});}['_remove'](_0x51a4fa){return this['stopListening'](_0x51a4fa),_0x51a4fa['destroy'](),this['comments']['remove'](_0x51a4fa);}['_findOptimalIndex'](_0x580382){const _0x444c69=this['comments']['find'](_0x48254b=>new Date(_0x48254b['authoredAt'])['getTime']()>new Date(_0x580382['authoredAt'])['getTime']());return _0x444c69?this['comments']['getIndex'](_0x444c69):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x3538ec(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x2609f8,_0x936c52){super();const _0x123c42=_0x2609f8['context']['plugins']['get'](st)['me'],_0x335071=_0x2609f8['getCommentThread'](_0x936c52['threadId']),_0x45f291=0x0===_0x335071['comments']['length'],_0x5e238e=_0x123c42===_0x936c52['author'];this['id']=_0x936c52['id'],this['threadId']=_0x936c52['threadId'],this['author']=_0x936c52['author'],this['creator']=_0x936c52['creator'],this['isExternal']=Boolean(_0x936c52['attributes']&&_0x936c52['attributes']['@external']),this['set']('content',_0x936c52['content']),this['createdAt']=_0x936c52['createdAt']||new Date(),this['set']('authoredAt',_0x936c52['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x335071,'resolvedAt'),this['set']('attributes',_0x936c52['attributes']||{}),this['bind']('isEditable')['to'](_0x2609f8,'_permissions',()=>{const _0x529aea=_0x2609f8['getPermissions'](_0x335071['channelId'])['write'],_0x121628=_0x2609f8['getPermissions'](_0x335071['channelId'])['modifyAll'];return _0x5e238e&&_0x529aea||!_0x5e238e&&_0x121628;}),this['bind']('isRemovable')['to'](_0x335071,'isRemovable',_0x2609f8,'_permissions',_0x364da1=>{const _0x54d9d4=_0x2609f8['getPermissions'](_0x335071['channelId'])['write'],_0x21319e=_0x2609f8['getPermissions'](_0x335071['channelId'])['modifyAll'];return _0x5e238e&&_0x54d9d4||_0x364da1&&_0x45f291||!_0x5e238e&&_0x21319e&&!_0x45f291;}),this['bind']('isReadOnly')['to'](_0x335071,'isReadOnly'),this['_repository']=_0x2609f8;}get['weight'](){return Math['max'](function(_0x35d740){const _0x128ef8=document['createElement']('div');return _0x128ef8['innerHTML']=_0x35d740,_0x128ef8['textContent']['length'];}(this['content']),0xc8);}['update'](_0x1b0b0b){const {threadId:_0x32d3df,id:_0x53eea0}=this;if(!this['_repository']['hasCommentThread'](_0x32d3df))throw new _0x274fd1('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x4ac6d3}=this['_repository']['getCommentThread'](_0x32d3df);this['_repository']['fire'](xt('updateComment',_0x4ac6d3,_0x32d3df),{'channelId':_0x4ac6d3,'threadId':_0x32d3df,'commentId':_0x53eea0,..._0x1b0b0b});}['setAttribute'](_0x1648d0,_0x31cafd){const _0x4f4dbe=At(this['attributes']);Ct(_0x4f4dbe,_0x1648d0,_0x31cafd),this['update']({'attributes':_0x4f4dbe});}['removeAttribute'](_0x2c3a94){const _0x446f9d=At(this['attributes']);vt(_0x446f9d,_0x2c3a94),this['update']({'attributes':_0x446f9d});}['remove'](_0x5e8416={}){if(!_0x5e8416['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x242d78,id:_0x268fa0}=this;if(!this['_repository']['hasCommentThread'](_0x242d78))throw new _0x274fd1('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x35f610}=this['_repository']['getCommentThread'](_0x242d78);this['_repository']['fire'](xt('removeComment',_0x35f610,_0x242d78),{'channelId':_0x35f610,'threadId':_0x242d78,'commentId':_0x268fa0,..._0x5e8416});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function xt(_0x192832,..._0x5ec929){for(const _0x17a8e1 of _0x5ec929)void 0x0!==_0x17a8e1&&(_0x192832+=':'+String(_0x17a8e1));return _0x192832;}class rt extends _0x406027{constructor(_0xd5f856){super(_0xd5f856),this['set']('hasContent',!0x1);}['refresh'](){const _0x3b6648=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x5426fe of _0x3b6648['getRanges']())if(this['_hasContent'](_0x5426fe))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x351581=_0x3b880e(),ranges:_0x17ce6f,comment:_0x4d386b}={}){const _0x1f4e3e=this['editor']['model'],_0x323f42=_0x17ce6f??Array['from'](_0x1f4e3e['document']['selection']['getRanges']()),_0x1dbdb1=[];for(const _0x44e9d3 of _0x323f42)this['_hasContent'](_0x44e9d3)&&_0x1dbdb1['push'](this['_trimToContent'](_0x44e9d3));if(!_0x1dbdb1['length'])throw new _0x274fd1('addcommentthreadcommand-incorrect-ranges',null);_0x4d386b&&this['_createCommentThread'](_0x351581,_0x4d386b),this['_createMarkersFromRanges'](_0x351581,_0x1dbdb1,!!_0x4d386b);}['_createMarkersFromRanges'](_0x4117f6,_0x443fe1,_0x5d720a){this['editor']['model']['change'](_0x51db30=>{for(const _0x32b6ed of _0x443fe1){const _0xb0dc6c=_0x3b880e()['substr'](0x1,0x5),_0x2dc69b='comment:'+_0x4117f6+':'+_0xb0dc6c;_0x51db30['addMarker'](_0x2dc69b,{'range':_0x32b6ed,'usingOperation':_0x5d720a,'affectsData':_0x5d720a});}});}['_createCommentThread'](_0x351010,_0x381654){const _0x16bd46=this['editor']['plugins']['get']('CommentsRepository'),_0x57ed09=this['editor']['config']['get']('collaboration.channelId'),_0x66929e=this['editor']['plugins']['get']('Users')['me'];if(!_0x66929e)throw new _0x274fd1('addcommentthreadcommand-user-not-found',null);_0x16bd46['addCommentThread']({'threadId':_0x351010,'channelId':_0x57ed09,'comments':[{'authorId':_0x66929e['id'],'content':_0x381654,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x31b3bf){for(const _0x25241a of _0x31b3bf['getItems']())if(this['_itemIsContent'](_0x25241a))return!0x0;return!0x1;}['_itemIsContent'](_0x1f3943){return _0x1f3943['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x1f3943)&&!_0x1f3943['is']('element','tableCell');}['_trimToContent'](_0x41e642){const _0x58591e=_0x21c956=>!this['_itemIsContent'](_0x21c956['item']),_0xa54c61=_0x41e642['start']['getLastMatchingPosition'](_0x58591e),_0x260909=_0x41e642['end']['getLastMatchingPosition'](_0x58591e,{'direction':'backward'});return this['editor']['model']['createRange'](_0xa54c61,_0x260909);}}class b extends _0x35651a{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xbf3c5e){super(_0xbf3c5e),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x35abdc=this['editor'],_0x121596=_0x35abdc['model']['document']['selection'],_0x4fe9ee=_0x12b399(()=>this['refreshSelectedViews'](),0xa);_0x121596['on']('change:range',(_0x32892f,_0x54d8ea)=>{_0x54d8ea['directChange']&&(_0x4fe9ee['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x35abdc['editing']['view']['document'],'change:isFocused',(_0x2c6e88,_0x4d0677,_0x5f9bfa)=>{_0x5f9bfa&&_0x4fe9ee();}),this['listenTo'](_0x35abdc['ui']['focusTracker'],'change:isFocused',(_0x225487,_0x230c34,_0x35ad96)=>{_0x35ad96||this['fire']('blur',{'isAnnotationTracked':_0x313e2d=>this['_editorAnnotationsData']['has'](_0x313e2d['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x1a8fb9){if(this['_editorAnnotations']['has'](_0x1a8fb9['view']))return;this['_editorAnnotations']['add'](_0x1a8fb9['view']),this['editor']['ui']['focusTracker']['add'](_0x1a8fb9['view']['element']);const _0x535da8=this['editor']['plugins']['get'](y);this['listenTo'](_0x535da8['collection'],'remove',(_0xa9a6a6,_0x59ab9d)=>{this['editor']['ui']['focusTracker']['remove'](_0x59ab9d['view']['element']),this['_editorAnnotations']['delete'](_0x59ab9d['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x2d885e){if('function'!=typeof _0x2d885e)throw new _0x274fd1('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x2d885e);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x39a5a9,annotations:_0x3ea183}){const _0x2ee20b=[],_0x5425c5=this['editor']['model']['document']['selection'],_0x4ff4b0=Array['from'](_0x5425c5['getRanges']());for(const [_0x4736c5,_0x55c670]of this['_editorAnnotationsData']){const _0x51bfe3=_0x58333c(_0x55c670),_0x509240=_0x3ea183['getByInnerView'](_0x4736c5);_0x51bfe3&&_0x509240&&_0x2ee20b['push']({'annotation':_0x509240,'range':_0x51bfe3});}function _0x58333c(_0xcae89){for(const _0x20aadc of _0xcae89)for(const _0x1058c1 of _0x4ff4b0)if(_0x20aadc['containsRange'](_0x1058c1,!_0x5425c5['isCollapsed']))return _0x20aadc;return null;}return _0x2ee20b['sort']((_0x47950f,_0x3af7e3)=>{const _0x2e6939=_0x47950f['range'],_0x59266c=_0x3af7e3['range'];if(!_0x2e6939['isEqual'](_0x59266c)){if(_0x2e6939['containsRange'](_0x59266c,!0x0))return 0x1;if(_0x59266c['containsRange'](_0x2e6939,!0x0))return-0x1;}return _0x47950f['annotation']==_0x39a5a9?-0x1:_0x3af7e3['annotation']==_0x39a5a9?0x1:0x0;})['map'](_0x1c953f=>_0x1c953f['annotation']);}get['_editorAnnotationsData'](){const _0x3fc65b=new Map();for(const _0xe2e394 of Array['from'](this['_dataCollectors']))for(const [_0x2c0740,_0x2cbdad]of _0xe2e394())_0x3fc65b['set'](_0x2c0740,_0x2cbdad);return _0x3fc65b;}}class ct extends _0x35651a{['afterInit'](){const _0x424d05=this['editor'];if(!_0x424d05['plugins']['has']('RestrictedEditingModeEditing'))return;_0x424d05['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class at extends _0x35651a{constructor(_0x3bfb2e){super(_0x3bfb2e),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x2edc4c=this['editor'],_0x2130eb=_0x2edc4c['commands']['get']('importWord'),_0x564f0f=_0x2edc4c['plugins']['get'](st);_0x2130eb&&(_0x2130eb['on']('execute',(_0x29a6d5,[,_0x14cd92])=>{_0x14cd92['collaboration_features']={'comments':!0x0,'user_id':_0x564f0f['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x2130eb,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x4c4b1c,_0x2a8e4e){const {comment_threads:_0x314546}=_0x2a8e4e;_0x314546&&_0x314546['forEach'](({thread_id:_0x22fb9b,comments:_0x2dd422,is_resolved:_0x3c6ff4})=>{const _0x139f55=new Date(),_0x4b645e=_0x2dd422['map'](({author:_0x20ce22,content:_0x23290f,created_at:_0x27f036})=>({'content':_0x23290f,'authorId':this['editor']['plugins']['get'](st)['me']['id'],'createdAt':_0x139f55,'attributes':{'@external':{'authorName':_0x20ce22,'createdAt':_0x27f036?new Date(_0x27f036):new Date(),'source':'importWord'}}})),_0x48ff21=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x48ff21,'threadId':_0x22fb9b,'comments':_0x4b645e,'resolvedAt':_0x3c6ff4?_0x139f55:null});});}}class ut extends _0x35651a{constructor(_0x4593ec){super(_0x4593ec),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x21b8cf=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x21b8cf,'contentInsertion',(_0xc87aaf,_0x29d22e)=>this['_removeMarkersWithoutThreads'](_0x29d22e['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x43a1c8){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x43a1c8;const _0x36bf89=this['editor']['plugins']['get']('CommentsRepository');for(const _0x2c53bc of _0x43a1c8['keys']()){const [_0x55e075,_0x590492]=_0x2c53bc['split'](':');'comment'!=_0x55e075||_0x36bf89['hasCommentThread'](_0x590492)||_0x43a1c8['delete'](_0x2c53bc);}return _0x43a1c8;}['_registerMarkerInClipboardPipeline'](){const _0x29f544=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0xd6861c=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0xd6861c&&_0x29f544['_registerMarkerToCopy']('comment',_0xd6861c);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0xe4cbce){switch(_0xe4cbce){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function dt(_0x19ca29){const _0x43d31b=_0x19ca29['split'](':');return{'group':_0x43d31b[0x0],'id':_0x43d31b[0x1],'part':_0x43d31b[0x2]};}class ft extends _0x35651a{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x56bcec,_0x44240b)=>{if(!_0x44240b['options']['showCommentHighlights'])return null;if(_0x44240b['options']['ignoreResolvedComments']){const {id:_0x507927}=dt(_0x56bcec['markerName']),_0x41fe79=this['editor']['plugins']['get'](o);if(_0x41fe79['getCommentThread'](_0x507927)?.['isResolved']&&_0x56bcec['item'])return _0x44240b['consumable']['consume'](_0x56bcec['item'],'addMarker:'+_0x56bcec['markerName']),_0x44240b['consumable']['consume'](_0x56bcec['item'],'removeMarker:'+_0x56bcec['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x3d56a3=>{_0x3d56a3['on']('addMarker:comment',(_0x1ae192,_0x5e775b,_0x5635d3)=>{if(!_0x5635d3['options']['showCommentHighlights'])return;const _0x1f596e=_0x5e775b['item'];if(!_0x1f596e)return;const _0x57f2db=_0x5635d3['mapper']['toViewElement'](_0x1f596e);this['editor']['model']['schema']['isObject'](_0x1f596e)&&_0x57f2db&&!_0x57f2db['getCustomProperty']('widget')&&_0x57f2db['is']('containerElement')&&_0x976562(_0x57f2db,_0x5635d3['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x43c087,{writer:_0x57aba4,options:_0x48a981})=>{if(!_0x48a981['showCommentHighlights'])return null;const _0x599050=_0x57aba4['createContainerElement']('div'),_0x3ebde2=_0x57aba4['createEmptyElement']('hr');return _0x57aba4['addClass']('ck-horizontal-line',_0x599050),_0x57aba4['insert'](_0x57aba4['createPositionAt'](_0x599050,0x0),_0x3ebde2),_0x599050;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x768829,{writer:_0x56633b,options:_0x602716})=>{if(!_0x602716['showCommentHighlights'])return null;const _0x3ebb26=_0x56633b['createContainerElement']('span'),_0x50eb26=_0x56633b['createEmptyElement']('img');return _0x56633b['addClass']('image-inline',_0x3ebb26),_0x56633b['insert'](_0x56633b['createPositionAt'](_0x3ebb26,0x0),_0x50eb26),_0x3ebb26;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x32ae87,{writer:_0x34158c,options:_0x244868})=>{if(_0x244868['showCommentHighlights'])return _0x34158c['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x1c13eb,_0x4b2585,_0x1db2fc)=>{_0x1db2fc['options']['showCommentHighlights']&&_0x1c13eb['stop']();},{'priority':'high'});}}class r extends _0x35651a{static get['requires'](){return[o,b,st,ct,at,ut,ft];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x436784){super(_0x436784),this['set']('isThreadsLoadingPaused',!0x0),_0x436784['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x52490a,_0x147afa,_0x2c9220,_0x3a128f)=>{const _0x4c5b9d=_0x436784['plugins']['get'](o),_0x149973=_0x2c9220?dt(_0x2c9220)['id']:null;_0x436784['model']['change'](()=>{if(_0x149973){const _0x69c487=this['getAllMarkersForId'](_0x149973);for(const _0x358e0c of _0x69c487)_0x436784['editing']['reconvertMarker'](_0x358e0c);}if(_0x3a128f){const {id:_0x5f17cb}=dt(_0x3a128f),_0x1fb42e=_0x4c5b9d['getCommentThread'](_0x5f17cb);if(_0x1fb42e&&_0x1fb42e['unlinkedAt'])return;if(_0x1fb42e&&!_0x1fb42e['isAttached'])return;const _0x1621fb=this['getAllMarkersForId'](_0x5f17cb);for(const _0x1537d0 of _0x1621fb)_0x436784['editing']['reconvertMarker'](_0x1537d0);}}),_0x149973&&this['scrollToThreadMarker'](_0x149973);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x41ed91=this['editor'],_0x522b99=_0x41ed91['plugins']['get'](o),_0x255f89=_0x41ed91['config']['get']('collaboration.channelId'),_0x351b61=_0x522b99['getCommentThreads']()['filter'](_0x21fb0a=>_0x21fb0a['channelId']!==_0x255f89);_0x41ed91['commands']['add']('addCommentThread',new rt(_0x41ed91)),this['listenTo'](_0x41ed91,'change:isReadOnly',(_0x986760,_0x21b2a7,_0x1a4f22)=>{_0x522b99['switchReadOnly'](_0x1a4f22,_0x41ed91['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x522b99,ht('addCommentThread',_0x255f89),(_0x5d4ec5,{threadId:_0x495568})=>{const _0x27b5b3=this['editor']['plugins']['get'](o)['getCommentThread'](_0x495568);_0x27b5b3?.['unlinkedAt']&&this['_attachArchivedThread'](_0x495568);}),this['listenTo'](_0x522b99,ht('removeCommentThread',_0x255f89),(_0x27350e,{threadId:_0xdc7413})=>{_0x41ed91['model']['enqueueChange']({'isUndoable':!0x1},_0x3e82b1=>{const _0x3d8412=this['getAllMarkersForId'](_0xdc7413);for(const _0x2c5daf of _0x3d8412)_0x3e82b1['removeMarker'](_0x2c5daf);});}),this['listenTo'](_0x522b99,ht('resolveCommentThread',_0x255f89),(_0x500784,{threadId:_0x367964})=>{(this['_reconvertMarkers'](_0x367964),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x367964)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x522b99,ht('reopenCommentThread',_0x255f89),(_0x8421b1,{threadId:_0x29da67})=>{this['_reconvertMarkers'](_0x29da67);},{'priority':'low'}),this['listenTo'](_0x522b99,ht('addComment',_0x255f89),(_0x3b5706,{threadId:_0x49fca3,isFromAdapter:_0x3761ba})=>{const _0x1da265=this['getAllMarkersForId'](_0x49fca3);if(_0x3761ba||0x0==_0x1da265['length']||!_0x522b99['hasCommentThread'](_0x49fca3))return;0x1===_0x522b99['getCommentThread'](_0x49fca3)['length']&&_0x41ed91['model']['enqueueChange']({'isUndoable':!0x1},_0x3f5bd4=>{for(const _0x51c839 of _0x1da265)_0x3f5bd4['updateMarker'](_0x51c839,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x351b61);}['afterInit'](){!async function(_0x4958ee){const _0x27b748=_0x39836c([0x67,0x62,0x77,0x61,0x63,0x43,0x51,0x79,0x44,0x4a,0x41,0x70,0x6e,0x6a,0x69,0x73,0x58,0x37,0x71,0x38,0x52,0x30,0x55,0x50,0x6f,0x46,0x54,0x74,0x7a,0x4e,0x5a,0x66,0x4c,0x39,0x65,0x33,0x48,0x36,0x53,0x78,0x4f,0x4d,0x4b,0x72,0x59,0x6c,0x42,0x32,0x76,0x68,0x35,0x6b,0x34,0x6d,0x31,0x45,0x47,0x75,0x49,0x56,0x64,0x57]),_0x29cae0=0x273176d4,_0x3bc0e3=0x273606c4^_0x29cae0,_0x5759c2=window[_0x39836c([0x44,0x61,0x74,0x65])][_0x39836c([0x6e,0x6f,0x77])](),_0x1c8134=_0x4958ee[_0x39836c([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x41b0ad=new window[(_0x39836c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x450998=>{_0x1c8134[_0x39836c([0x6f,0x6e,0x63,0x65])](_0x39836c([0x72,0x65,0x61,0x64,0x79]),_0x450998);}),_0x283f17={[_0x39836c([0x6b,0x74,0x79])]:_0x39836c([0x45,0x43]),[_0x39836c([0x75,0x73,0x65])]:_0x39836c([0x73,0x69,0x67]),[_0x39836c([0x63,0x72,0x76])]:_0x39836c([0x50,0x2d,0x32,0x35,0x36]),[_0x39836c([0x78])]:_0x39836c([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]),[_0x39836c([0x79])]:_0x39836c([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]),[_0x39836c([0x61,0x6c,0x67])]:_0x39836c([0x45,0x53,0x32,0x35,0x36])},_0x2c1fbd=_0x1c8134[_0x39836c([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x39836c([0x67,0x65,0x74])](_0x39836c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0xe98768(){let _0x394182,_0x116c48=null,_0x356d31=null;try{if(_0x2c1fbd==_0x39836c([0x47,0x50,0x4c]))return _0x39836c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x394182=_0x545082(),!_0x394182)return _0x39836c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x394182[_0x39836c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x356d31=_0xb6d0cf(_0x394182[_0x39836c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x394182[_0x39836c([0x6a,0x74,0x69])])),await _0x37350d()?_0x5e2e7a()?_0x125837()?_0x39836c([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5d8fdf()?(_0x394182[_0x39836c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x39836c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x116c48=_0x578628(_0x39836c([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x394182[_0x39836c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x39836c([0x74,0x72,0x69,0x61,0x6c])&&(_0x116c48=_0x578628(_0x39836c([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x327c1c()):_0x39836c([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x39836c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x39836c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x39836c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x125837(){const _0x46e46a=[_0x39836c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x39836c([0x74,0x72,0x69,0x61,0x6c])][_0x39836c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x394182[_0x39836c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x5759c2/0x3e8:0xe10*_0x3bc0e3;return _0x394182[_0x39836c([0x65,0x78,0x70])]<_0x46e46a;}function _0x5e2e7a(){const _0x3e8e95=_0x394182[_0x39836c([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x3e8e95)return!0x1;if(_0x3e8e95[_0x39836c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x39836c([0x2a])))return!0x0;if(_0x3e8e95[_0x39836c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x39836c([0x43,0x4d,0x54])))return!0x0;if(_0x3e8e95[_0x39836c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x39836c([0x52,0x43,0x4d,0x54]))){if(_0x35eb3f())return!0x0;if(_0x987021()||_0x14bdbb())return!0x0;}return!0x1;}function _0x5d8fdf(){const _0x24b159=_0x394182[_0x39836c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x24b159||0x0==_0x24b159[_0x39836c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3cf206}=new URL(window[_0x39836c([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x24b159[_0x39836c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3cf206))return!0x0;const _0x300108=_0x3cf206[_0x39836c([0x73,0x70,0x6c,0x69,0x74])](_0x39836c([0x2e]));return _0x24b159[_0x39836c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x10737d=>_0x10737d[_0x39836c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x39836c([0x2a])))[_0x39836c([0x6d,0x61,0x70])](_0x1b96dc=>_0x1b96dc[_0x39836c([0x73,0x70,0x6c,0x69,0x74])](_0x39836c([0x2e])))[_0x39836c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3c9f18=>_0x3c9f18[_0x39836c([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x300108[_0x39836c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x39836c([0x6d,0x61,0x70])](_0x46f788=>Array(_0x300108[_0x39836c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x46f788[_0x39836c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x39836c([0x66,0x69,0x6c,0x6c])](_0x46f788[0x0]===_0x39836c([0x2a])?_0x39836c([0x2a]):'')[_0x39836c([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x46f788))[_0x39836c([0x73,0x6f,0x6d,0x65])](_0x5f3108=>_0x300108[_0x39836c([0x65,0x76,0x65,0x72,0x79])]((_0x3d430e,_0x21863b)=>_0x5f3108[_0x21863b]===_0x3d430e||_0x5f3108[_0x21863b]===_0x39836c([0x2a])));}function _0x327c1c(){return _0x116c48&&_0x356d31?new window[(_0x39836c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5c6749,_0x144190)=>{_0x116c48[_0x39836c([0x74,0x68,0x65,0x6e])](_0x5c6749,_0x144190),_0x356d31[_0x39836c([0x74,0x68,0x65,0x6e])](_0x32e3af=>{_0x32e3af!=_0x39836c([0x56,0x61,0x6c,0x69,0x64])&&_0x5c6749(_0x32e3af);},_0x144190);}):_0x116c48||_0x356d31||_0x39836c([0x56,0x61,0x6c,0x69,0x64]);}}function _0xb6d0cf(_0x408f76,_0x201039){return new window[(_0x39836c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2e6a91=>{if(_0x61ce0c())return _0x2e6a91(_0x39836c([0x56,0x61,0x6c,0x69,0x64]));_0x1b2be9(),_0x1c8134[_0x39836c([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x39836c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x20c62d=!0x1;const _0x42567c=_0x3b880e();function _0xcd6561(_0x1e10bf){return!!_0x1e10bf&&(typeof _0x1e10bf===_0x39836c([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1e10bf===_0x39836c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1e10bf[_0x39836c([0x74,0x68,0x65,0x6e])]===_0x39836c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1e10bf[_0x39836c([0x63,0x61,0x74,0x63,0x68])]===_0x39836c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xc78445(_0x5823eb){_0x29a617(_0x5823eb)[_0x39836c([0x74,0x68,0x65,0x6e])](_0x2fce47=>{if(!_0x2fce47||_0x2fce47[_0x39836c([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x39836c([0x6f,0x6b]))return _0x39836c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5d3396(_0x25689c(_0x42567c+_0x201039))!=_0x2fce47[_0x39836c([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x39836c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x39836c([0x56,0x61,0x6c,0x69,0x64]);})[_0x39836c([0x74,0x68,0x65,0x6e])](_0x49cfdd=>(_0x2d633a(),_0x49cfdd),()=>{const _0x461e41=_0x24e773();return null==_0x461e41?(_0x2d633a(),_0x39836c([0x56,0x61,0x6c,0x69,0x64])):_0x39836c(_0x5759c2-_0x461e41>(0x33df2d4^_0x29cae0)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x39836c([0x74,0x68,0x65,0x6e])](_0x2e6a91)[_0x39836c([0x63,0x61,0x74,0x63,0x68])](()=>{_0x2e6a91(_0x39836c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3fabee=0x27079854^_0x29cae0;function _0x2d633a(){const _0x10e916=_0x39836c([0x6c,0x6c,0x63,0x74,0x2d])+_0x5d3396(_0x25689c(_0x408f76)),_0xc9087d=_0x5a44a3(_0x5d3396(window[_0x39836c([0x4d,0x61,0x74,0x68])][_0x39836c([0x63,0x65,0x69,0x6c])](_0x5759c2/_0x3fabee)));window[_0x39836c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x39836c([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x10e916,_0xc9087d);}function _0x24e773(){const _0x55a02f=_0x39836c([0x6c,0x6c,0x63,0x74,0x2d])+_0x5d3396(_0x25689c(_0x408f76)),_0x39d051=window[_0x39836c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x39836c([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x55a02f);return _0x39d051?window[_0x39836c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5a44a3(_0x39d051),0x10)*_0x3fabee:null;}function _0x29a617(_0xd5e5bc){return new window[(_0x39836c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3f4c1b,_0x31d08d)=>{_0xd5e5bc[_0x39836c([0x74,0x68,0x65,0x6e])](_0x3f4c1b,_0x31d08d),window[_0x39836c([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x31d08d,0x2730a214^_0x29cae0);});}}_0x1c8134[_0x39836c([0x6f,0x6e])](_0x39836c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x51a2d3,_0x20a648)=>{if(_0x20a648[0x0]!=_0x408f76)return _0x2e6a91(_0x39836c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x20a648[0x1]={..._0x20a648[0x1],[_0x39836c([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x42567c};},{[_0x39836c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x39836c([0x68,0x69,0x67,0x68])}),_0x1c8134[_0x39836c([0x6f,0x6e])](_0x39836c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x226e1a=>{_0xcd6561(_0x226e1a[_0x39836c([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x20c62d=!0x0,_0xc78445(_0x226e1a[_0x39836c([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x39836c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x39836c([0x6c,0x6f,0x77])}),_0x41b0ad[_0x39836c([0x74,0x68,0x65,0x6e])](()=>{_0x20c62d||_0x2e6a91(_0x39836c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x61ce0c(){return _0x1c8134[_0x39836c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x39836c([0x76,0x69,0x65,0x77])][_0x39836c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x39836c([0x61,0x75,0x74,0x6f]);}function _0x1b2be9(){_0x1c8134[_0x39836c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x39836c([0x76,0x69,0x65,0x77])][_0x39836c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x39836c([0x61,0x75,0x74,0x6f]);}}function _0x578628(_0x103622){const _0x1ad3f6=[new window[(_0x39836c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4e2427=>setTimeout(_0x4e2427,0x27384818^_0x29cae0)),_0x41b0ad[_0x39836c([0x74,0x68,0x65,0x6e])](()=>new window[(_0x39836c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x341c89=>{let _0x4d955b=0x0;_0x1c8134[_0x39836c([0x6d,0x6f,0x64,0x65,0x6c])][_0x39836c([0x6f,0x6e])](_0x39836c([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x5d2a78,_0x1df3ac)=>{_0x1df3ac[0x0][_0x39836c([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x4d955b++,_0x4d955b==(0x2731772c^_0x29cae0)&&(_0x341c89(),_0x5d2a78[_0x39836c([0x6f,0x66,0x66])]());});}))];return window[_0x39836c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x39836c([0x72,0x61,0x63,0x65])](_0x1ad3f6)[_0x39836c([0x74,0x68,0x65,0x6e])](()=>_0x103622);}async function _0x3927b9(){await _0x41b0ad,_0x1c8134[_0x39836c([0x6d,0x6f,0x64,0x65,0x6c])][_0x39836c([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x282407,_0x1c8134[_0x39836c([0x6d,0x6f,0x64,0x65,0x6c])][_0x39836c([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x282407,_0x1c8134[_0x39836c([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x39836c([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x35eb3f(){return _0xe7d731(_0x39836c([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x161c64(_0x39836c([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x39836c([0x73,0x74,0x61,0x74,0x65])]==_0x39836c([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x987021(){return _0xe7d731(_0x39836c([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 _0x14bdbb(){return _0xe7d731(_0x39836c([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x12cd80(_0x240cce){const _0x5be10a=_0x179772();_0x1c8134[_0x5be10a]=_0x39836c([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x240cce,_0x240cce!=_0x39836c([0x56,0x61,0x6c,0x69,0x64])&&_0x3927b9();}function _0x179772(){const _0x190884=window[_0x39836c([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x39836c([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x39836c([0x6e,0x6f,0x77])]())[_0x39836c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x39836c([0x2e]),'');let _0x5ef5c0=_0x39836c([0x67]);for(let _0x2d455c=0x0;_0x2d455c<_0x190884[_0x39836c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2d455c+=0x2){let _0x550427=window[_0x39836c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x190884[_0x39836c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2d455c,_0x2d455c+0x2));_0x550427>=_0x27b748[_0x39836c([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x550427-=_0x27b748[_0x39836c([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5ef5c0+=_0x27b748[_0x550427];}return _0x5ef5c0;}function _0x545082(){const _0x3bdeb9=_0x2c1fbd[_0x39836c([0x73,0x70,0x6c,0x69,0x74])](_0x39836c([0x2e]));if(0x3!=_0x3bdeb9[_0x39836c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xcd4ac9(_0x3bdeb9[0x1]);function _0xcd4ac9(_0xf22245){const _0x4f709d=_0x4ce539(_0xf22245);return _0x4f709d&&_0x5549b1()?_0x4f709d:null;function _0x5549b1(){const _0x519a21=_0x4f709d[_0x39836c([0x6a,0x74,0x69])],_0xec0ee4=window[_0x39836c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x519a21[_0x39836c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x519a21[_0x39836c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x34bb09={..._0x4f709d,[_0x39836c([0x6a,0x74,0x69])]:_0x519a21[_0x39836c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x519a21[_0x39836c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x34bb09[_0x39836c([0x76,0x63])],_0x25689c(_0x34bb09)==_0xec0ee4;}}}async function _0x37350d(){let _0x3f4c18=!0x0;try{const _0x21be3a=_0x2c1fbd[_0x39836c([0x73,0x70,0x6c,0x69,0x74])](_0x39836c([0x2e])),[_0x4a6922,_0x28ce63,_0x541778]=_0x21be3a;return _0xc8c3a0(_0x4a6922),await _0x5273aa(_0x4a6922,_0x28ce63,_0x541778),_0x3f4c18;}catch{return!0x1;}function _0xc8c3a0(_0x52c4ed){const _0x256116=_0x4ce539(_0x52c4ed);_0x256116&&_0x256116[_0x39836c([0x61,0x6c,0x67])]==_0x39836c([0x45,0x53,0x32,0x35,0x36])||(_0x3f4c18=!0x1);}async function _0x5273aa(_0x4976ba,_0x76ca12,_0xf96e9a){const _0x436ad2=window[_0x39836c([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x39836c([0x66,0x72,0x6f,0x6d])](_0x2f433a(_0xf96e9a),_0x18cd36=>_0x18cd36[_0x39836c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x49ffab=new window[(_0x39836c([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x39836c([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4976ba+_0x39836c([0x2e])+_0x76ca12),_0x31ce6c=window[_0x39836c([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x39836c([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x31ce6c)return;const _0x5c808d=await _0x31ce6c[_0x39836c([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x39836c([0x6a,0x77,0x6b]),_0x283f17,{[_0x39836c([0x6e,0x61,0x6d,0x65])]:_0x39836c([0x45,0x43,0x44,0x53,0x41]),[_0x39836c([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x39836c([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x39836c([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x31ce6c[_0x39836c([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x39836c([0x6e,0x61,0x6d,0x65])]:_0x39836c([0x45,0x43,0x44,0x53,0x41]),[_0x39836c([0x68,0x61,0x73,0x68])]:{[_0x39836c([0x6e,0x61,0x6d,0x65])]:_0x39836c([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x5c808d,_0x436ad2,_0x49ffab)||(_0x3f4c18=!0x1);}}function _0x4ce539(_0x21a8dc){return _0x21a8dc[_0x39836c([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x39836c([0x65,0x79]))?JSON[_0x39836c([0x70,0x61,0x72,0x73,0x65])](_0x2f433a(_0x21a8dc)):null;}function _0x2f433a(_0x501383){return window[_0x39836c([0x61,0x74,0x6f,0x62])](_0x501383[_0x39836c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x39836c([0x2b]))[_0x39836c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x39836c([0x2f])));}function _0x25689c(_0x3490d3){let _0x4b6f35=0x1505;function _0x2fb7a3(_0x54aadb){for(let _0x3b19da=0x0;_0x3b19da<_0x54aadb[_0x39836c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3b19da++){const _0x1e210a=_0x54aadb[_0x39836c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3b19da);_0x4b6f35=(_0x4b6f35<<0x5)+_0x4b6f35+_0x1e210a,_0x4b6f35&=_0x4b6f35;}}function _0x5905bc(_0x194048){Array[_0x39836c([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x194048)?_0x194048[_0x39836c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5905bc):_0x194048&&typeof _0x194048==_0x39836c([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x39836c([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x194048)[_0x39836c([0x73,0x6f,0x72,0x74])]()[_0x39836c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x58567d,_0x23e31c])=>{_0x2fb7a3(_0x58567d),_0x5905bc(_0x23e31c);}):_0x2fb7a3(window[_0x39836c([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x194048));}return _0x5905bc(_0x3490d3),_0x4b6f35>>>0x0;}function _0x5d3396(_0x138900){return _0x138900[_0x39836c([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x39836c([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x39836c([0x30]));}function _0x5a44a3(_0x56fca1){return _0x56fca1[_0x39836c([0x73,0x70,0x6c,0x69,0x74])]('')[_0x39836c([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x39836c([0x6a,0x6f,0x69,0x6e])]('');}function _0xe7d731(_0x3ea074){return _0x1c8134[_0x39836c([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x39836c([0x68,0x61,0x73])](_0x3ea074);}function _0x161c64(_0x4e2750){return _0x1c8134[_0x39836c([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x39836c([0x67,0x65,0x74])](_0x4e2750);}function _0x282407(){}function _0x39836c(_0xcbe6a2){return _0xcbe6a2['map'](_0x1d5c21=>String['fromCharCode'](_0x1d5c21))['join']('');}_0x12cd80(await _0xe98768());}(this);}['destroy'](){const _0x1c1f50=this['editor']['plugins']['get'](o),_0x1fb0a4=this['editor']['config']['get']('collaboration.channelId');for(const _0x30264b of _0x1c1f50['getCommentThreads']({'channelId':_0x1fb0a4}))_0x1c1f50['_detachCommentThread'](_0x30264b['id']),_0x1c1f50['_threads']['delete'](_0x30264b['id']);super['destroy']();}['hasMarkerForId'](_0x3747ad){return this['getAllMarkersForId'](_0x3747ad)['length']>0x0;}['getAllMarkersForId'](_0x2b1eb4){const _0x24b545=[];for(const _0x352a40 of this['editor']['model']['markers'])_0x352a40['name']['startsWith']('comment:'+_0x2b1eb4)&&_0x24b545['push'](_0x352a40);return _0x24b545;}['scrollToThreadMarker'](_0x41d763){setTimeout(()=>{const _0x4befb8=this['_getTargetForId'](_0x41d763);if(!_0x4befb8)return;this['activeMarker']&&dt(this['activeMarker'])['id']===_0x41d763&&ot({'target':_0x4befb8[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0xe5c784){this['editor']['model']['change'](()=>{for(const _0x4b47fb of this['getAllMarkersForId'](_0xe5c784))this['editor']['editing']['reconvertMarker'](_0x4b47fb);});}['_attachArchivedThread'](_0x419fa1){const _0x47e95b=this['editor']['plugins']['get'](o),_0x430b82=this['editor']['plugins']['get'](b),_0x5ee30d=_0x47e95b['getCommentThread'](_0x419fa1);if(!_0x5ee30d['isAttached']){const _0x288a58=_0x5ee30d['attachTo'](()=>this['_getTargetForId'](_0x5ee30d['id']));_0x430b82['registerAnnotation'](_0x288a58),_0x5ee30d['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x1dcfdd=this['editor'],_0x449a69=_0x1dcfdd['plugins']['get'](st);_0x1dcfdd['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x1f07cc,_0x199e1b)=>{const {id:_0x30778e}=dt(_0x1f07cc['markerName']),_0x436708=_0x1dcfdd['plugins']['get'](o)['getCommentThread'](_0x30778e),_0x1a602d=this['activeMarker']&&dt(this['activeMarker'])['id']===_0x30778e;let _0x35ede3;if(_0x436708&&_0x436708['isResolved']&&!_0x1a602d&&_0x1f07cc['item'])return _0x199e1b['consumable']['consume'](_0x1f07cc['item'],'addMarker:'+_0x1f07cc['markerName']),_0x199e1b['consumable']['consume'](_0x1f07cc['item'],'removeMarker:'+_0x1f07cc['markerName']),null;const _0x1a0b08=['ck-comment-marker'];return _0x1a602d&&_0x1a0b08['push']('ck-comment-marker--active'),_0x35ede3=_0x436708?.['length']?_0x436708['comments']['first']['author']['id']:_0x449a69['me']['id'],{'classes':_0x1a0b08,'attributes':{'data-comment':_0x30778e,'data-author-id':_0x35ede3}};}}),_0x1dcfdd['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x452a51,{options:_0x3925da})=>{if(_0x3925da['showCommentHighlights'])return null;const _0x2c5614=_0x1dcfdd['plugins']['get'](o),_0x47c02c=_0x1dcfdd['model']['markers']['get'](_0x452a51),{id:_0x38522b,part:_0x282646}=dt(_0x452a51);return _0x47c02c&&!_0x47c02c['affectsData']||_0x3925da['ignoreResolvedComments']&&_0x2c5614['getCommentThread'](_0x38522b)?.['isResolved']?null:{'group':'comment','name':_0x282646?_0x38522b+':'+_0x282646:_0x38522b};}}),_0x1dcfdd['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x23f35b,{writer:_0x31756c})=>_0x31756c['createElement']('$marker',{'data-name':'comment:'+_0x23f35b['getAttribute']('id')})}),_0x1dcfdd['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x295c08=this['editor'],_0x1d5a3b=_0x295c08['plugins']['get'](o),_0x261fd6=new Set(),_0x29cf86=new Set();_0x295c08['model']['document']['registerPostFixer'](_0x2ef708=>{let _0x12071f=!0x1;for(const {name:_0x32a56b,data:_0x5eef7d}of _0x295c08['model']['document']['differ']['getChangedMarkers']()){const {group:_0x4f3969,id:_0x41bca6}=dt(_0x32a56b);let _0x24fae3=_0x5eef7d['newRange'];if('comment'!==_0x4f3969||!_0x24fae3)continue;const _0x3e3e0f='$graveyard'===_0x24fae3['root']['rootName'];_0x3e3e0f||(_0x24fae3=mt(_0x24fae3,_0x295c08['model']),!_0x24fae3||_0x24fae3['isCollapsed']||!_0x5eef7d['newRange']||_0x24fae3['isEqual'](_0x5eef7d['newRange']))?_0x295c08['model']['hasContent'](_0x24fae3)&&!_0x3e3e0f?this['isThreadsLoadingPaused']?_0x261fd6['add'](_0x32a56b):this['_handleThreadMarker'](_0x32a56b,_0x41bca6):(_0x29cf86['add'](_0x32a56b),_0x261fd6['delete'](_0x32a56b),_0x2ef708['removeMarker'](_0x32a56b),_0x12071f=!0x0):(_0x2ef708['updateMarker'](_0x32a56b,{'range':_0x24fae3}),_0x12071f=!0x0);}return _0x12071f;}),this['on']('change:isThreadsLoadingPaused',(_0x5957ce,_0x55337a,_0x223f6e)=>{if(!_0x223f6e&&_0x261fd6['size'])for(const _0x1ecb17 of _0x261fd6){const {id:_0x525d62}=dt(_0x1ecb17);_0x261fd6['delete'](_0x1ecb17),_0x295c08['model']['markers']['get'](_0x1ecb17)&&this['_handleThreadMarker'](_0x1ecb17,_0x525d62);}}),this['listenTo'](_0x295c08['model']['document'],'change',()=>{for(const {name:_0x20b065,data:{newRange:_0x4af090}}of _0x295c08['model']['document']['differ']['getChangedMarkers']()){const {group:_0x2e037e,id:_0x2e795e}=dt(_0x20b065);if('comment'!==_0x2e037e)continue;const _0xabb710=_0x1d5a3b['getCommentThread'](_0x2e795e),_0x203019=this['hasMarkerForId'](_0x2e795e);_0xabb710&&(!_0xabb710['_hasTargetInContent']&&_0x4af090&&_0x295c08['editing']['view']['once']('render',()=>{const _0x4603f1=_0x295c08['plugins']['get'](y),_0x185504=_0x1d5a3b['_threadToController']['get'](_0xabb710)['view'];_0x4603f1['getByInnerView'](_0x185504)['refreshVisibility']();},{'priority':'low'}),_0xabb710['_hasTargetInContent']=_0x203019||!!_0x4af090),_0x4af090||(_0x29cf86['add'](_0x20b065),_0x261fd6['delete'](_0x20b065));}for(const _0x15d215 of _0x29cf86){const {id:_0x2210d3}=dt(_0x15d215),_0x5b661a=_0x1d5a3b['getCommentThread'](_0x2210d3);if(_0x261fd6['delete'](_0x15d215),!_0x5b661a)continue;const _0xfd3d98=this['hasMarkerForId'](_0x2210d3);_0xfd3d98||_0x5b661a['isSubmitted']?_0xfd3d98||_0x5b661a['unlinkedAt']||_0x5b661a['setUnlinkedAt'](new Date()):_0x5b661a['remove']();}_0x29cf86['clear']();});}['_handleInitialThreads'](_0x158626){_0x158626['forEach'](_0x5dc832=>{_0x5dc832['unlinkedAt']&&this['_attachArchivedThread'](_0x5dc832['id']);});}['_getTargetForId'](_0x4d8f8e){const _0x31bba2=this['editor'],_0x16c2c7=this['getAllMarkersForId'](_0x4d8f8e);return it(_0x31bba2['editing'],_0x16c2c7);}['_getTextContext'](_0x219932){const _0x3813bb=this['getAllMarkersForId'](_0x219932);let _0x5ec648='',_0x5859a1=!0x1;for(const _0x22abd9 of _0x3813bb){const _0x4ff3a9=_0x22abd9['getRange']();for(const _0x524721 of Array['from'](_0x4ff3a9['getItems']()))_0x524721['is']('$textProxy')?(_0x5ec648&&_0x5859a1&&(_0x5ec648+='\x20',_0x5859a1=!0x1),_0x5ec648+=_0x524721['data']):_0x5859a1=!0x0;_0x5859a1=!0x0;}return _0x5ec648['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x462b31,_0x5125c6){const _0xb36be2=this['editor'],_0x8f9c88=_0xb36be2['plugins']['get'](o);let _0x2c0c3f=_0x8f9c88['getCommentThread'](_0x5125c6);const _0x18c5bf=_0xb36be2['config']['get']('collaboration.channelId'),_0xe572f7=_0xb36be2['plugins']['get'](b);if(_0x2c0c3f&&(_0x2c0c3f['unlinkedAt']&&_0x2c0c3f['setUnlinkedAt'](null),_0x2c0c3f['isAttached']))return _0x2c0c3f;return!this['getAllMarkersForId'](_0x5125c6)[0x0]['managedUsingOperations']?_0xb36be2['editing']['view']['once']('render',()=>{if(_0x8f9c88['getCommentThread'](_0x5125c6))return;const _0x3ee113=_0xb36be2['plugins']['get'](y);_0x2c0c3f=_0x8f9c88['openNewCommentThread']({'channelId':_0x18c5bf,'threadId':_0x5125c6,'target':()=>this['_getTargetForId'](_0x5125c6),'context':{'type':'text','value':this['_getTextContext'](_0x5125c6)}});const _0x47574e=_0x8f9c88['_threadToController']['get'](_0x2c0c3f)['view'],_0x1c8676=_0x3ee113['getByInnerView'](_0x47574e);_0x1c8676&&_0xe572f7['registerAnnotation'](_0x1c8676);},{'priority':'low'}):_0x8f9c88['fetchCommentThread']({'channelId':_0x18c5bf,'threadId':_0x5125c6})['then'](_0x40d9c2=>{if('destroyed'!==_0xb36be2['state']){if(_0x2c0c3f=_0x40d9c2,_0x2c0c3f&&!_0x2c0c3f['isAttached']){const _0x52b175=_0x2c0c3f['attachTo'](()=>this['_getTargetForId'](_0x5125c6));_0xe572f7['registerAnnotation'](_0x52b175),_0x2c0c3f['isResolved']&&this['_reconvertMarkers'](_0x5125c6);}else{if(!_0x2c0c3f){const _0x42be97=this['getAllMarkersForId'](_0x5125c6);_0xb36be2['model']['change'](_0x210fb5=>{for(const _0x4df732 of _0x42be97)_0x210fb5['removeMarker'](_0x4df732);});}}}}),_0x2c0c3f;}['_handleThreadMarker'](_0x4db417,_0x2fc720){const _0xa9af2=this['_attachMarkerToThread'](_0x4db417,_0x2fc720);_0xa9af2&&!_0xa9af2['context']&&_0xa9af2['setContext']({'type':'text','value':this['_getTextContext'](_0x2fc720)});}['_initAriaMarkerChangeAnnouncements'](){const _0x4d355a=this['editor'];et(_0x4d355a['model'],({left:_0x489e91,entered:_0x1f0c51})=>{for(const _0x3324e4 of _0x489e91)if(lt(_0x3324e4)){_0x4d355a['ui']['ariaLiveAnnouncer']['announce'](N(_0x4d355a['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x2f3abe of _0x1f0c51)if(lt(_0x2f3abe)){_0x4d355a['ui']['ariaLiveAnnouncer']['announce'](N(_0x4d355a['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x3be90e)));break;}});}}function ht(_0x412964,_0x3533f2){return _0x3533f2?_0x412964+':'+_0x3533f2:_0x412964;}function mt(_0x5addfa,_0x3a4876){const _0x49c78e=_0x3a4876['schema'],_0x1e7e16=_0x3a4876['createRange'](_0x5addfa['start']);for(const _0x3ce849 of _0x5addfa['getWalker']()){const {type:_0x2857f7,item:_0x5919b0,nextPosition:_0x25778}=_0x3ce849;if('text'===_0x2857f7||_0x49c78e['isObject'](_0x5919b0)){const _0x55b5ba=_0x3a4876['createPositionBefore'](_0x5919b0);_0x1e7e16['isCollapsed']&&(_0x1e7e16['start']=_0x55b5ba),_0x1e7e16['end']=_0x25778;}}return _0x1e7e16;}function lt(_0x2fd496){return'comment'===dt(_0x2fd496['name'])['group'];}class s extends _0x35651a{['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 _0x2400a8=this['editor'],_0x3e6ef1=_0x2400a8['plugins']['get'](o),_0x2318bb=_0x2400a8['plugins']['get'](r),_0x4c1819=_0x2400a8['plugins']['get'](y),_0x47cb3c=_0x2400a8['plugins']['get'](b);_0x2400a8['ui']['componentFactory']['add']('comment',()=>{const _0x457914=this['_createUIButton'](_0x13fccc);return _0x457914['tooltip']=!0x0,_0x457914;}),_0x2400a8['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x339fd3)),_0x47cb3c['addSourceCollector'](()=>{const _0x31efa8=[];for(const [_0x423a1e,_0x7e4b16]of _0x3e6ef1['_threadToController']){const _0xa4ef4=_0x2318bb['getAllMarkersForId'](_0x423a1e['id']),_0x143262=_0xa4ef4['map'](_0x2d50ee=>_0x2d50ee['getRange']());_0xa4ef4['length']>0x0&&_0x31efa8['push']([_0x7e4b16['view'],_0x143262]);}return _0x31efa8;}),this['listenTo'](_0x4c1819,'change:activeAnnotations',(_0x2225af,_0x2dfbc5,_0x524b3d)=>{const _0xd51042=Array['from'](_0x524b3d)['map'](_0x314ae1=>_0x314ae1['innerView'])['find'](_0x57b430=>_0x3e6ef1['_viewToController']['has'](_0x57b430));if(!_0xd51042)return void(_0x2318bb['activeMarker']=null);const _0x57d6d6=_0x3e6ef1['_viewToController']['get'](_0xd51042)['model']['id'],_0x161b30='comment:'+_0x57d6d6;_0x57d6d6&&_0x2318bb['hasMarkerForId'](_0x57d6d6)?_0x2318bb['activeMarker']=_0x161b30:_0x2318bb['activeMarker']&&(_0x2318bb['activeMarker']=null);}),this['listenTo'](_0x3e6ef1,'removeCommentThread',(_0x2083c3,{threadId:_0x4784e8,isFromAdapter:_0x44b6e8})=>{!_0x44b6e8&&_0x2400a8['ui']['focusTracker']['isFocused']&&_0x2318bb['hasMarkerForId'](_0x4784e8)&&_0x2400a8['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x3e6ef1,'addComment',(_0xdc8fdf,{threadId:_0x2f1706,isFromAdapter:_0x1bc7e8})=>{if(_0x1bc7e8||!_0x2318bb['hasMarkerForId'](_0x2f1706)||!_0x3e6ef1['hasCommentThread'](_0x2f1706))return;0x1===_0x3e6ef1['getCommentThread'](_0x2f1706)['length']&&(_0x2400a8['editing']['view']['focus'](),_0xdc8fdf['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x4eccd2=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x262815;for(const _0x151ed1 in _0x4eccd2){const _0x124780=_0x151ed1,_0x3f59ac=_0x4eccd2[_0x124780];if('commentsLicenseKeyValid'==_0x3f59ac||'commentsLicenseKeyInvalid'==_0x3f59ac||'commentsLicenseKeyExpired'==_0x3f59ac||'commentsLicenseKeyDomainLimit'==_0x3f59ac||'commentsLicenseKeyNotAllowed'==_0x3f59ac||'commentsLicenseKeyEvaluationLimit'==_0x3f59ac||'commentsLicenseKeyTrialLimit'==_0x3f59ac||'commentsLicenseKeyUsageLimit'==_0x3f59ac){delete _0x4eccd2[_0x124780],_0x262815=_0x3f59ac,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x262815&&_0x4eccd2['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x262815&&_0x4eccd2['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x262815&&_0x4eccd2['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x262815&&_0x4eccd2['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x262815&&_0x4eccd2['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x262815&&_0x4eccd2['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x262815&&_0x4eccd2['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x3d1372){const _0x543941=this['editor'],_0x46410c=new _0x3d1372(_0x543941['locale']),_0x1a5480=_0x543941['commands']['get']('addCommentThread');return _0x46410c['set']({'label':N(_0x543941['locale'],'Comment'),'icon':_0x14f2f4}),_0x46410c['bind']('isEnabled')['to'](_0x1a5480,'hasContent'),this['listenTo'](_0x46410c,'execute',()=>{_0x1a5480['execute']();}),_0x46410c;}}class i extends _0x35651a{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x8175e3){super(_0x8175e3),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0xa5e95b,_0x18a194,_0x19b721)=>{_0x19b721?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x25184d,_0x34d209]of this['editor']['commands'])_0x34d209['affectsData']&&'addCommentThread'!==_0x25184d&&_0x34d209['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 _0x360d97=this['editor']['editing']['view']['document'];this['listenTo'](_0x360d97,'cut',_0x1635d8=>_0x1635d8['stop'](),{'priority':'highest'}),this['listenTo'](_0x360d97,'clipboardInput',_0x2fa355=>_0x2fa355['stop'](),{'priority':'highest'}),this['listenTo'](_0x360d97,'delete',_0x1ddc6e=>_0x1ddc6e['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x4829a6,_0x44ed53]of this['editor']['commands'])_0x44ed53['affectsData']&&'addCommentThread'!==_0x4829a6&&_0x44ed53['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 _0x388a6f{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5e702){super(_0x5e702),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x45c091=this['context']['plugins']['get'](y);this['listenTo'](_0x45c091,'_activateAnnotation',(_0x2f56e5,_0x415626)=>{for(const _0x48f8a0 of this['activeUIs']){const _0x2e751b=this['_uis']['get'](_0x48f8a0);(0x0,this['uisData']['get'](_0x48f8a0)['filter'])(_0x415626)&&_0x2e751b['setActiveAnnotation'](_0x415626);}}),this['listenTo'](_0x45c091,'_deactivateAllAnnotations',()=>{for(const _0x4f1eff of this['activeUIs']){this['_uis']['get'](_0x4f1eff)['setActiveAnnotation'](null);}}),this['listenTo'](_0x45c091['_visibleAnnotations'],'add',(_0xc9f64e,_0x27fc58)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x27fc58);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x2b9d23){return this['activeUIs']['has'](_0x2b9d23);}['activate'](_0x1874c6,_0x499a6c=this['defaultFilter']){const _0x4425b3=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x1874c6))throw new _0x274fd1('annotationsuis-missing-ui',this,{'uiName':_0x1874c6});this['isActive'](_0x1874c6)&&this['deactivate'](_0x1874c6),this['activeUIs']['add'](_0x1874c6);const _0x3c4dcd=new S();v({'source':_0x4425b3['_visibleAnnotations'],'target':_0x3c4dcd,'filter':_0x499a6c}),this['uisData']['set'](_0x1874c6,{'collection':_0x3c4dcd,'filter':_0x499a6c});const _0x33e3e9=this['_uis']['get'](_0x1874c6);_0x33e3e9['attach'](_0x3c4dcd),this['listenTo'](_0x33e3e9,'change:activeAnnotation',(_0x326aa1,_0x7f68ed,_0x4369ec,_0x22542b)=>{_0x22542b&&_0x4425b3['_removeActiveAnnotation'](_0x22542b),_0x4369ec&&_0x4425b3['_addActiveAnnotation'](_0x4369ec);});}['deactivate'](_0x15875b){if(this['activeUIs']['delete'](_0x15875b),!this['_uis']['has'](_0x15875b))throw new _0x274fd1('annotationsuis-missing-ui',this,{'uiName':_0x15875b});const _0x426140=this['_uis']['get'](_0x15875b);_0x426140['detach'](),this['stopListening'](_0x426140),this['uisData']['get'](_0x15875b)['collection']['destroy'](),this['uisData']['delete'](_0x15875b);}['switchTo'](_0x272cb8){if(!this['_uis']['has'](_0x272cb8))throw new _0x274fd1('annotationsuis-missing-ui',this,{'uiName':_0x272cb8});const _0x20eb88=this['context']['plugins']['get'](y),_0x57bcbb=Array['from'](_0x20eb88['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x272cb8);const _0x5b5733=this['_uis']['get'](_0x272cb8);_0x5b5733['setActiveAnnotation'](_0x57bcbb),_0x5b5733['_setSelectedAnnotations']&&_0x57bcbb&&_0x5b5733['_setSelectedAnnotations']([_0x57bcbb]);}['deactivateAll'](){for(const _0x3bf58e of this['activeUIs'])this['deactivate'](_0x3bf58e);}['register'](_0x1719f2,_0x52aa1f){if(this['_uis']['has'](_0x1719f2))throw new _0x274fd1('annotationsuis-register-already-registered');if('function'!=typeof _0x52aa1f['attach']||'function'!=typeof _0x52aa1f['detach']||'function'!=typeof _0x52aa1f['setActiveAnnotation'])throw new _0x274fd1('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x1719f2,_0x52aa1f);}['refilterAnnotations'](){const _0x76902a=this['context']['plugins']['get'](y)['collection'],_0x47de65=new Map(),_0x334240=Array['from'](this['activeUIs']);for(const _0x1c0fb1 of this['activeUIs']){const _0x277818=this['uisData']['get'](_0x1c0fb1)['collection'];for(const _0x6e70d7 of _0x277818)_0x47de65['set'](_0x6e70d7,_0x1c0fb1);}for(const _0x1a3b04 of _0x76902a){const _0x34afe0=_0x47de65['get'](_0x1a3b04);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1a3b04);const _0xaa93c3=_0x334240['find'](_0x2767dc=>this['uisData']['get'](_0x2767dc)['filter'](_0x1a3b04));_0x34afe0!==_0xaa93c3&&(_0x34afe0&&this['uisData']['get'](_0x34afe0)['collection']['remove'](_0x1a3b04),_0xaa93c3&&this['uisData']['get'](_0xaa93c3)['collection']['add'](_0x1a3b04));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x388464){const _0x283e39=[];for(const _0x2add6e of this['activeUIs']){(0x0,this['uisData']['get'](_0x2add6e)['filter'])(_0x388464)&&_0x283e39['push'](_0x2add6e);}if(_0x283e39['length']>0x1)throw new _0x274fd1('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x283e39,'annotationType':_0x388464['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
+
Dt('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x9a5ceb){super(_0x9a5ceb);const _0x342f6e=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 _0x43d57e(),this['focusCycler']=new _0x5a7382({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x342f6e['to']('class')],'style':{'minHeight':_0x342f6e['to']('minHeight',_0x49c36f=>'number'==typeof _0x49c36f?_i(_0x49c36f+0xa):null)},'dir':_0x9a5ceb['uiLanguageDirection'],'role':'application','aria-label':N(_0x9a5ceb,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x9a5ceb,'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',_0xfde88a=>{this['_updateItemPositionInFocusables'](_0xfde88a['source']);}),this['list']['forEach'](_0x4ef085=>{this['focusTracker']['add'](_0x4ef085['element']),this['_updateItemPositionInFocusables'](_0x4ef085);}),this['list']['on']('change',(_0x126f4d,_0x1a15a5)=>{for(const _0x5bfd95 of _0x1a15a5['removed'])this['focusTracker']['remove'](_0x5bfd95['element']),this['focusables']['remove'](_0x5bfd95);for(const _0x43aa0d of _0x1a15a5['added'])this['focusTracker']['add'](_0x43aa0d['element']),this['_updateItemPositionInFocusables'](_0x43aa0d);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x1ab7cc){const _0x59caa8=this['focusables']['getIndex'](_0x1ab7cc);let _0x281c45,_0x1755e3;for(const _0x29b8b4 of this['focusables'])if(_0x1ab7cc['top']<_0x29b8b4['top']){_0x281c45=_0x29b8b4;break;}if(_0x1755e3=_0x281c45?this['focusables']['getIndex'](_0x281c45):this['focusables']['length'],-0x1!==_0x59caa8){if(_0x59caa8===_0x1755e3-0x1)return;this['focusables']['remove'](_0x1ab7cc),_0x1755e3=_0x281c45?this['focusables']['getIndex'](_0x281c45):this['focusables']['length'];}this['focusables']['add'](_0x1ab7cc,_0x1755e3);}}const Ht=/* #__PURE__ -- @preserve */
|
|
33
|
+
Dt('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x454dac){super(_0x454dac),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x44f408,_0x285a31)=>_0x44f408+_0x285a31),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Et(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x12cf6a=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x12cf6a['to']('isAnimationDisabled',_0x4778bf=>_0x4778bf?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x12cf6a['to']('top',_0x33258a=>Ht(_0x33258a))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x4925a6=this['element']['clientHeight'];_0x4925a6&&(this['height']=_0x4925a6);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x388a6f{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x39952a){super(_0x39952a),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 _0x29abd1=this['context']['config']['get']('sidebar.container');_0x29abd1&&this['setContainer'](_0x29abd1);}['setContainer'](_0x1b90c3){if(!g(_0x1b90c3))throw new _0x274fd1('sidebar-setcontainer-invalid-element');this['container']=_0x1b90c3;}['_attachToContainer']({viewClass:_0x583f65='',spaceBetweenItems:_0x58debd=0x19}={}){if(!g(this['container']))throw new _0x274fd1('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x583f65,this['_spaceBetweenItems']=_0x58debd;}['rearrange']({removedAnnotation:_0x10ef2b,previousAnnotation:_0x5222cf,nextAnnotation:_0x2b46be}){const _0x35fde1=this['getSidebarItemView'](_0x10ef2b);this['view']['list']['remove'](_0x35fde1),this['_destroySidebarItemView'](_0x10ef2b),_0x5222cf&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x5222cf)),_0x2b46be&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x2b46be)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x2532cb,activatedAnnotation:_0x1e4cee,disableAnimationOnActivatedAnnotation:_0x413594}){if(this['_activeAnnotation']=_0x1e4cee,_0x2532cb){_0x2532cb['isActive']=!0x1;const _0x4c9eb5=this['getSidebarItemView'](_0x2532cb);_0x4c9eb5&&_0x413594&&(_0x4c9eb5['isAnimationDisabled']=!0x1);}if(_0x1e4cee){const _0x34428f=this['getSidebarItemView'](_0x1e4cee);_0x34428f&&(_0x1e4cee['isActive']=!0x0,_0x413594&&(_0x34428f['isAnimationDisabled']=!0x0,_0x34428f['top']+=0x1),this['_alignToTargetRect'](_0x34428f));}}['_detachFromContainer'](_0x3fec18){if(this['view']['element']['remove'](),_0x3fec18){for(const _0x4e5cfb of _0x3fec18)this['_destroySidebarItemView'](_0x4e5cfb);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x227251,_0x1b342c){_0x1b342c||(_0x1b342c=_0x227251['view']);const _0x1d15a3=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x1d15a3,_0x227251),this['_annotationToSidebarItemView']['set'](_0x227251,_0x1d15a3),_0x1d15a3['content']['add'](_0x1b342c),this['listenTo'](_0x227251['view'],'change:targetRect',(_0x266253,_0x2b5037,_0x1b5447)=>{const _0x1c9b7f=this['_getTargetTop'](_0x227251,_0x1b5447);_0x1d15a3['_targetTop']!=_0x1c9b7f&&(_0x1d15a3['_targetTop']=_0x1c9b7f,this['_setItemTop'](_0x1d15a3,_0x1c9b7f));}),this['listenTo'](_0x1d15a3,'change:top',()=>{this['_recalculate'](_0x1d15a3,'top');}),this['listenTo'](_0x1d15a3,'change:bottom',()=>{this['_recalculate'](_0x1d15a3,'bottom');}),this['_alignToTargetRect'](_0x1d15a3);const _0x569ee9=this['_getItemBefore'](_0x1d15a3);if(_0x569ee9)this['_alignAfterItem'](_0x569ee9,_0x1d15a3)||this['_alignToTargetRect'](_0x1d15a3);else this['_alignToTargetRect'](_0x1d15a3);return this['_updateLastItem'](),this['view']['list']['add'](_0x1d15a3),_0x1d15a3;}['_alignForTopChange'](_0x4b4cc8){if(!_0x4b4cc8['content']['length'])return;const _0x871db9=this['_getItemBefore'](_0x4b4cc8);if(!_0x871db9)return;const _0x124e6f=this['_sidebarItemViewToAnnotation']['get'](_0x871db9),_0x531e75=this['_activeAnnotation'];_0x531e75&&_0x531e75===_0x124e6f?this['_alignAfterItem'](_0x871db9,_0x4b4cc8):this['_alignBeforeItem'](_0x4b4cc8,_0x871db9);}['_alignForBottomChange'](_0x1f1483){if(!_0x1f1483['content']['length'])return;const _0x28234b=this['_getItemAfter'](_0x1f1483);if(!_0x28234b)return;const _0x3a22e8=this['_sidebarItemViewToAnnotation']['get'](_0x28234b),_0x2d201a=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x531ed1=this['_activeAnnotation'];_0x531ed1&&_0x531ed1===_0x3a22e8&&_0x2d201a?(this['_alignBeforeItem'](_0x28234b,_0x1f1483),this['_alignAfterItem'](_0x1f1483,_0x28234b)):_0x531ed1&&_0x531ed1===_0x3a22e8?this['_alignBeforeItem'](_0x28234b,_0x1f1483):this['_alignAfterItem'](_0x1f1483,_0x28234b);}['_recalculate'](_0x54b32e,_0x513082){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x5c567b,changedProp:_0x3380d6}of this['_recalculateBuffer'])'top'===_0x3380d6?this['_alignForTopChange'](_0x5c567b):this['_alignForBottomChange'](_0x5c567b);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x54b32e,'changedProp':_0x513082});}['getSidebarItemView'](_0x3e6de6){return this['_annotationToSidebarItemView']['get'](_0x3e6de6);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x6d29c0){const _0x5bf889=this['getSidebarItemView'](_0x6d29c0);this['stopListening'](_0x5bf889),this['stopListening'](_0x6d29c0['view']),_0x5bf889['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x6d29c0),this['_sidebarItemViewToAnnotation']['delete'](_0x5bf889);}['_createSidebarView'](){const _0x2dd475=new H(this['context']['locale']);return _0x2dd475['render'](),this['on']('change:_lastItem',(_0x1e958c,_0x32007,_0x428679,_0x46b664)=>{_0x46b664&&_0x2dd475['unbind']('minHeight'),_0x428679?_0x2dd475['bind']('minHeight')['to'](_0x428679,'bottom'):_0x2dd475['minHeight']=null;}),_0x2dd475;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x108936){const _0x2cbc0b=this['_sidebarItemViewToAnnotation']['get'](_0x108936),_0x3517ca=_0x2cbc0b&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2cbc0b)-0x1);return _0x3517ca&&this['getSidebarItemView'](_0x3517ca)||null;}['_getItemAfter'](_0x556308){const _0x4fa846=this['_sidebarItemViewToAnnotation']['get'](_0x556308),_0x25fffb=_0x4fa846&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x4fa846)+0x1);return _0x25fffb&&this['getSidebarItemView'](_0x25fffb)||null;}['_alignBeforeItem'](_0xec6410,_0x50cd8e){_0xec6410['updateHeight']();const _0x43d97c=G(_0x50cd8e['bottom']+this['_spaceBetweenItems'],_0xec6410['top']);return!!_0x43d97c&&(this['_setItemTop'](_0x50cd8e,_0x50cd8e['top']-_0x43d97c),!0x0);}['_alignAfterItem'](_0x24210c,_0x2e9821){_0x24210c['updateHeight']();const _0x2b0070=G(_0x24210c['bottom']+this['_spaceBetweenItems'],_0x2e9821['top']);return!!_0x2b0070&&(this['_setItemTop'](_0x2e9821,_0x2e9821['top']+_0x2b0070,!0x1),!0x0);}['_alignToTargetRect'](_0x1f1ef1){const _0x185461=this['_sidebarItemViewToAnnotation']['get'](_0x1f1ef1);if(!_0x185461||!_0x185461['target']||!_0x185461['targetRect'])return;const _0x59b2bc=this['_getTargetTop'](_0x185461,_0x185461['targetRect']);this['_setItemTop'](_0x1f1ef1,_0x59b2bc);}['_getTargetTop'](_0x4a1cc7,_0x52b017){if(null===_0x52b017)return 0x0;if(_0x4a1cc7['target']instanceof _0x3dcdfa)return _0x52b017['top'];{const _0x2a9270=new _0x3dcdfa(this['view']['element'])['top'];return _0x52b017['top']-_0x2a9270;}}['_setItemTop'](_0x10c582,_0x53ac0c,_0x48ccc0=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x48ccc0&&(_0x53ac0c=Math['max'](_0x53ac0c,this['_getMaxAvailableTop'](_0x10c582))),_0x10c582['top']=_0x53ac0c;}['_getMaxAvailableTop'](_0x1c8b90){let _0x1642a5=this['_getItemBefore'](_0x1c8b90),_0x5df7d3=0x0;for(;_0x1642a5;)_0x1642a5['updateHeight'](),_0x5df7d3+=this['_spaceBetweenItems']+_0x1642a5['height'],_0x1642a5=this['_getItemBefore'](_0x1642a5);return _0x5df7d3;}}function G(_0x3ca5a4,_0x1c1299){return Math['max'](_0x3ca5a4-_0x1c1299,0x0);}function g(_0x5a943a){return null!==_0x5a943a&&'object'==typeof _0x5a943a&&0x1===_0x5a943a['nodeType'];}class e extends _0x388a6f{['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(_0x58a7cf){super(_0x58a7cf),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x504ada(),this['_refreshPositioningDebounced']=_0x12b399(()=>{_0x58a7cf['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x9d6925=this['context']['plugins']['get'](j),_0x81610=this['context']['plugins']['get'](z);_0x9d6925['register']('wideSidebar',this),_0x81610['container']&&_0x9d6925['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x36c16f){if(_0x36c16f===this['activeAnnotation'])return;const _0x3f77a6=this['context']['plugins']['get'](z);_0x3f77a6['_activeAnnotation']=_0x36c16f;const _0xacc878=this['activeAnnotation'];_0x3f77a6['refresh']({'blurredAnnotation':_0xacc878,'activatedAnnotation':_0x36c16f}),this['activeAnnotation']=_0x36c16f;}['attach'](_0x76c379){this['annotations']=_0x76c379;const _0x61c103=this['context']['plugins']['get'](z);if(_0x61c103['_annotations']=_0x76c379,this['isAttached'])throw new _0x274fd1('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x61c103,'set:container',()=>{this['detach'](),this['listenTo'](_0x61c103,'change:container',_0xe1cb77=>{_0xe1cb77['off'](),this['attach'](_0x76c379);});}),_0x61c103['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x42d242=_0x3b62f3=>{_0x3b62f3['updateTargetRect'](),_0x61c103['addAnnotation'](_0x3b62f3);};for(const _0x3e7aec of _0x76c379)_0x42d242(_0x3e7aec);this['listenTo'](_0x76c379,'add',(_0x5ed9cf,_0x58a725)=>{_0x42d242(_0x58a725);}),this['listenTo'](_0x76c379,'remove',(_0x2e2507,_0x267e67,_0xffda5f)=>{_0x61c103['rearrange']({'removedAnnotation':_0x267e67,'previousAnnotation':_0x76c379['get'](_0xffda5f-0x1),'nextAnnotation':_0x76c379['get'](_0xffda5f+0x1)}),_0x267e67===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x76c379,'focus',(_0x5baa52,_0x20abe4)=>{this['setActiveAnnotation'](_0x20abe4);}),this['listenTo'](_0x76c379,'blur',()=>{this['setActiveAnnotation'](null);});const _0xda44fa=this['context']instanceof _0x3a3651?this['context']['editors']:new _0x504ada([this['context']]);for(const _0x495875 of _0xda44fa)this['_integrateWithEditorAnnotations'](_0x495875);this['listenTo'](_0xda44fa,'add',(_0x10efd2,_0x328780)=>{this['listenTo'](_0x328780,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x328780);});}),this['listenTo'](_0xda44fa,'remove',(_0x1a5caa,_0x1a1322)=>{_0x1a1322['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x1a1322['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x274fd1('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5d4f07=this['context']['plugins']['get'](z);_0x5d4f07['_detachFromContainer'](this['annotations']),this['stopListening'](_0x5d4f07),this['stopListening'](this['annotations']),this['context']instanceof _0x3a3651&&this['stopListening'](this['context']['editors']);for(const _0x211183 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x211183);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x3b82ff){if(!_0x3b82ff['plugins']['has']('EditorAnnotations'))return;const _0x34ad9e=_0x3b82ff['plugins']['get']('EditorAnnotations'),_0x22b2d2=()=>{const _0x3a0b8f=_0x34ad9e['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x3a0b8f[0x0]||null);};this['listenTo'](_0x34ad9e,'refresh',_0x22b2d2),this['listenTo'](_0x34ad9e,'blur',(_0x32c90b,{isAnnotationTracked:_0x1827ce})=>{this['activeAnnotation']&&_0x1827ce(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x34ad9e,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x557048=>{_0x34ad9e['hasDomSelection']()&&(_0x22b2d2(),_0x557048['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x34ad9e);}['_destroyEditorAnnotationsIntegration'](_0x4c8d8f){this['stopListening'](_0x4c8d8f),this['_editorAnnotations']['remove'](_0x4c8d8f);}}class C extends _0x13fccc{['counterView'];constructor(_0x54779a){super(_0x54779a);const _0x1b2e5a=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x21b323,_0x3e76b9)=>_0x21b323?'...':_0x3e76b9['toString']()),this['set']('annotationType',''),this['icon']=_0x14f2f4,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x1b2e5a['to']('annotationType',_0x4c7683=>'ck-annotation-counter__badge--'+_0x4c7683),_0x1b2e5a['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x1b2e5a['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x388a6f{['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(_0x2f3938){super(_0x2f3938),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x3fda0f())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x504ada(),this['_refreshPositioningDebounced']=_0x12b399(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x308b40(this['context']['locale']),this['balloonPanelView']=new _0x1d2c37(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x490417){this['annotations']=_0x490417;const _0x3e5bf2=this['context']['plugins']['get'](z),_0x5793be=this['balloonPanelView'];if(_0x3e5bf2['_annotations']=_0x490417,this['isAttached'])throw new _0x274fd1('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x3e5bf2,'set:container',()=>{this['detach'](),this['listenTo'](_0x3e5bf2,'change:container',_0x19ec37=>{_0x19ec37['off'](),this['attach'](_0x490417);});}),_0x3e5bf2['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x65fb4e=_0x26163a=>{const _0xd80b60=new C(this['context']['locale']);_0x3e5bf2['addAnnotation'](_0x26163a,_0xd80b60),this['_annotationToNarrowView']['set'](_0x26163a,_0xd80b60),_0xd80b60['bind']('isDirty','annotationType','number')['to'](_0x26163a['view'],'isDirty','type','length'),_0xd80b60['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x5793be['content']['first']!==_0x26163a['view']?(this['_showBalloon'](_0x26163a),_0x26163a['view']['element']['focus'](),this['setActiveAnnotation'](_0x26163a)):this['setActiveAnnotation'](null);});};for(const _0x334b52 of _0x490417)_0x65fb4e(_0x334b52);this['listenTo'](_0x490417,'add',(_0x28c066,_0x3ff0c6)=>{_0x65fb4e(_0x3ff0c6);}),this['listenTo'](_0x490417,'remove',(_0x1deb64,_0x2d3f99,_0x20aaa1)=>{this['_annotationToNarrowView']['get'](_0x2d3f99)['destroy'](),this['_annotationToNarrowView']['delete'](_0x2d3f99),_0x3e5bf2['rearrange']({'removedAnnotation':_0x2d3f99,'previousAnnotation':_0x490417['get'](_0x20aaa1-0x1),'nextAnnotation':_0x490417['get'](_0x20aaa1+0x1)}),_0x2d3f99===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x490417,'focus',(_0x4b7040,_0x4cc94e)=>{this['setActiveAnnotation'](_0x4cc94e);}),this['listenTo'](_0x490417,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x51878f,_0x4056c0)=>{_0x4056c0['keyCode']===_0x50541b['esc']&&_0x5793be['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x5793be['content']['first']),this['_hideBalloon'](),_0x4056c0['stopPropagation'](),_0x4056c0['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x1fb495,_0x323e5e)=>{const _0x58dfc7=_0x323e5e['target'];_0x5793be['isVisible']&&_0x5793be['element']['contains'](_0x58dfc7)||_0x3e5bf2['view']['element']['contains'](_0x58dfc7)||_0x1fb495['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x193b03=>_0x193b03['contains'](_0x58dfc7))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x3b5687=this['context']instanceof _0x3a3651?this['context']['editors']:new _0x504ada([this['context']]);for(const _0x1d6e78 of _0x3b5687)this['_integrateWithEditorAnnotations'](_0x1d6e78);this['listenTo'](_0x3b5687,'add',(_0x3d52b0,_0x4b99bd)=>{this['listenTo'](_0x4b99bd,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x4b99bd);});}),this['listenTo'](_0x3b5687,'remove',(_0x11f332,_0x3a26ab)=>{_0x3a26ab['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3a26ab['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x2b9d54){if(_0x2b9d54===this['activeAnnotation'])return;const _0x2e36fb=this['context']['plugins']['get'](z);if(_0x2e36fb['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x2b9d54,'disableAnimationOnActivatedAnnotation':!0x0}),_0x2b9d54)_0x2e36fb['getSidebarItemView'](_0x2b9d54)?this['_showBalloon'](_0x2b9d54):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x2b9d54;}['detach'](){if(!this['isAttached'])throw new _0x274fd1('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x429703=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x42c854=>_0x42c854['destroy']()),this['_annotationToNarrowView']['clear'](),_0x429703['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x3a3651&&this['stopListening'](this['context']['editors']);for(const _0x23e830 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x23e830);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'](_0xca5fdc){if(!_0xca5fdc['plugins']['has']('EditorAnnotations'))return;const _0x4e10a2=_0xca5fdc['plugins']['get']('EditorAnnotations'),_0x375a2a=this['context']['plugins']['get'](z),_0x2f1134=this['annotations'],_0x45ce88=this['balloonPanelView'],_0x334c16=()=>{const _0x2e1fc5=_0x4e10a2['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x2e1fc5),this['setActiveAnnotation'](_0x2e1fc5[0x0]||null);};this['listenTo'](_0x4e10a2,'refresh',_0x334c16),this['listenTo'](_0x4e10a2,'blur',(_0x35f479,{isAnnotationTracked:_0x5b9dec})=>{this['activeAnnotation']&&_0x5b9dec(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x4e10a2,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x2f1134,'blur',_0x1950ba=>{_0x4e10a2['hasDomSelection']()&&_0x1950ba['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x45f8ea,_0x465240)=>{const _0x184b29=_0x465240['target'];_0x45ce88['isVisible']&&_0x45ce88['element']['contains'](_0x184b29)||_0x375a2a['view']['element']['contains'](_0x184b29)||this['activeAnnotation']&&_0x4e10a2['hasDomSelection']()&&(_0x334c16(),_0x45f8ea['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x4e10a2);}['_destroyEditorAnnotationsIntegration'](_0x44ff47){_0x44ff47&&(this['stopListening'](_0x44ff47),this['_editorAnnotations']['remove'](_0x44ff47));}['_setSelectedAnnotations'](_0x5735af){for(const _0x530042 of this['_selectedAnnotations'])_0x5735af['includes'](_0x530042)||this['_manuallyClosedAnnotationViews']['delete'](_0x530042['view']);this['_selectedAnnotations']=_0x5735af;}['_refreshPositioning'](){const _0xb0f7d5=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0xb0f7d5['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x489047){if(this['_manuallyClosedAnnotationViews']['has'](_0x489047['view']))return;const _0x30ffde=this['balloonPanelView']['content']['first'];_0x30ffde!==_0x489047['view']?(_0x30ffde&&this['_detachListeners'](_0x30ffde),this['_attachListeners'](_0x489047['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x489047['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x1654db=this['balloonPanelView']['content']['first'],_0x488dd0=_0x1654db&&this['annotations']['getByView'](_0x1654db);if(!_0x488dd0||!this['_annotationToNarrowView']['has'](_0x488dd0))return;const _0x1195f4=this['_annotationToNarrowView']['get'](_0x488dd0)['element'],_0x2d59f6=(function(){const _0x12bcb5=_0x1d2c37['defaultPositions'];return[_0x12bcb5['southArrowNorthEast'],_0x12bcb5['northArrowSouthEast'],_0x12bcb5['southArrowNorth'],_0x12bcb5['northArrowSouth'],_0x12bcb5['southArrowNorthWest'],_0x12bcb5['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x1195f4,'positions':_0x2d59f6});}['_hideBalloon'](){const _0x23db2f=this['balloonPanelView'],_0xdd260e=_0x23db2f['content']['first'];_0xdd260e&&(this['_detachListeners'](_0xdd260e),_0x23db2f['unpin'](),_0x23db2f['content']['clear']());}['_attachListeners'](_0x48f9d6){this['listenTo'](_0x48f9d6,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x48f9d6,'Esc',(_0x3c4860,_0xe01ab5)=>{this['_manuallyClosedAnnotationViews']['add'](_0x48f9d6),this['_hideBalloon'](),_0xe01ab5();});}['_detachListeners'](_0x5cdf70){this['stopListening'](_0x5cdf70);}}class c extends _0x35651a{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x2e5f1d,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x497c67){super(_0x497c67),_0x497c67['editing']['view']['addObserver'](_0xbea9b9),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x497c67['plugins']['get'](_0x2e5f1d),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0xe6d4ab=this['editor']['plugins']['get'](j);_0xe6d4ab['context']===this['editor']&&(_0xe6d4ab['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x1faaf7,_0x371428)=>{const _0x463606=this['_balloon'];if(this['isAttached']&&_0x463606['visibleView']){const _0x3b2af8=this['annotations']['getByView'](_0x463606['visibleView']);_0x3b2af8&&this['_closeAnnotation'](_0x3b2af8),_0x371428();}}));}['afterInit'](){const _0x46d39a=this['editor']['plugins']['get'](j);_0x46d39a['context']===this['editor']&&(_0x46d39a['hasActive']()||_0x46d39a['switchTo']('inline'));}['setActiveAnnotation'](_0x1e223b){_0x1e223b!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x1e223b&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x1e223b)&&this['_addAnnotationToBalloon'](_0x1e223b,!0x0),_0x1e223b['isActive']=!0x0),_0x1e223b||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x1e223b);}['attach'](_0x568430){this['annotations']=_0x568430;const _0x19115d=this['editor']['plugins']['get'](j),_0x267b1d=this['_balloon'];if(this['isAttached'])throw new _0x274fd1('inlineannotations-attach-already-attached',this);if(_0x19115d['context']!==this['editor'])throw new _0x274fd1('inlineannotations-not-allowed-with-context',this);const _0x3d9dff=this['editor']['plugins']['get'](b);this['listenTo'](_0x3d9dff,'refresh',()=>{const _0x1e846c=_0x3d9dff['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x573b8b,_0x429d5b;!this['_forceRefresh']&&(_0x573b8b=_0x1e846c,_0x429d5b=this['_selectedAnnotations'],_0x573b8b['length']===_0x429d5b['length']&&_0x573b8b['every'](_0x3c274c=>_0x429d5b['includes'](_0x3c274c)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x1e846c),this['setActiveAnnotation'](_0x1e846c[0x0]||null));}),this['listenTo'](_0x3d9dff,'blur',(_0xa47002,{isAnnotationTracked:_0x2af247})=>{this['activeAnnotation']&&_0x2af247(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x38c126,_0x2e513d,_0xb9a91b)=>{_0xb9a91b||this['setActiveAnnotation'](null);}),this['listenTo'](_0x568430,'remove',(_0x13c544,_0x4b27a4)=>{this['_removeAnnotationFromBalloon'](_0x4b27a4),_0x4b27a4===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x267b1d,'change:visibleView',(_0x3bbfd5,_0x3571e4,_0x44f4a8,_0x3765a5)=>{_0x3765a5&&this['stopListening'](_0x3765a5);const _0x19ae43=_0x568430['getByView'](_0x44f4a8);_0x44f4a8&&_0x19ae43&&(this['listenTo'](_0x44f4a8,'change:height',()=>{_0x267b1d['updatePosition']();}),this['listenTo'](_0x44f4a8,'Esc',()=>{this['_closeAnnotation'](_0x19ae43),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x19ae43&&this['setActiveAnnotation'](_0x19ae43));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x267b1d['visibleView']&&(_0x568430['getByView'](_0x267b1d['visibleView'])&&_0x267b1d['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 _0x274fd1('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x1cfae3 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x1cfae3);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x748942){for(const _0x524791 of this['_selectedAnnotations'])_0x748942['includes'](_0x524791)||this['_manuallyClosed']['delete'](_0x524791);for(const _0x4d0a7b of this['annotations'])_0x748942['includes'](_0x4d0a7b)||this['_removeAnnotationFromBalloon'](_0x4d0a7b);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x349ad0 of _0x748942)this['_addAnnotationToBalloon'](_0x349ad0);}this['_selectedAnnotations']=_0x748942;}['_addAnnotationToBalloon'](_0x2bb61f,_0x4fc9de=!0x1){this['_manuallyClosed']['has'](_0x2bb61f)||(this['_addedAnnotations']['has'](_0x2bb61f)||this['_balloon']['hasView'](_0x2bb61f['view'])||(this['_addedAnnotations']['add'](_0x2bb61f),this['_balloon']['add']({'stackId':_0x2bb61f['view']['id'],'view':_0x2bb61f['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x2bb61f)}})),_0x4fc9de&&this['_balloon']['showStack'](_0x2bb61f['view']['id']));}['_getBalloonTargetForAnnotation'](_0x2222e6){const _0x38d6dd=_0x2222e6['target'],_0x5707b8=this['editor']['editing']['view'],_0x1806d1=_0x5707b8['document']['selection']['getFirstRange'](),_0x3c6951=_0x5707b8['domConverter']['viewRangeToDom'](_0x1806d1);if(_0x3c6951['collapse'](!0x0),_0x38d6dd){if(_0x38d6dd instanceof _0x3dcdfa)return _0x38d6dd;let _0x64edf7=[];for(const _0x5459f9 of _0x38d6dd)_0x64edf7['push'](...F(_0x5459f9['getClientRects']()));_0x64edf7=function(_0x1a7c58){const _0x4ace9d=[];let _0x420083=_0x1a7c58[0x0];for(let _0x32920b=0x1;_0x32920b<_0x1a7c58['length'];_0x32920b++)P(_0x420083,_0x1a7c58[_0x32920b])?_0x420083['width']+=_0x1a7c58[_0x32920b]['width']:(_0x4ace9d['push'](_0x420083),_0x420083=_0x1a7c58[_0x32920b]);return _0x4ace9d['push'](_0x420083),_0x4ace9d;}(_0x64edf7);const _0x49641e=_0x3c6951['getBoundingClientRect']();return _0x64edf7['find'](_0x2141ff=>_0x2141ff['top']<=_0x49641e['top']&&_0x2141ff['bottom']>=_0x49641e['bottom']&&_0x2141ff['left']<=_0x49641e['left']&&_0x2141ff['right']>=_0x49641e['right'])||_0x64edf7[0x0];}return _0x2222e6['targetRect']||_0x3c6951;}['_removeAnnotationFromBalloon'](_0xf38b20){this['_addedAnnotations']['has'](_0xf38b20)&&this['_balloon']['hasView'](_0xf38b20['view'])&&(this['_addedAnnotations']['delete'](_0xf38b20),this['_balloon']['remove'](_0xf38b20['view']));}['_closeAnnotation'](_0x335f4a){this['_manuallyClosed']['add'](_0x335f4a),this['_removeAnnotationFromBalloon'](_0x335f4a);}}function F(_0x589230){return Array['from'](_0x589230)['map'](DOMRect['fromRect']);}function P(_0xaee39b,_0xbeca68){return _0xaee39b['top']===_0xbeca68['top']&&_0xaee39b['bottom']===_0xbeca68['bottom']&&_0xaee39b['right']===_0xbeca68['left'];}class tt extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x532d6c,_0x187ddd){super(_0x532d6c),this['set']('isEmpty',!_0x187ddd['length']),this['focusTracker']=new _0x43d57e(),this['_annotationViews']=_0x187ddd,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x5a7382({'focusables':_0x187ddd,'focusTracker':this['focusTracker']}),this['listenTo'](_0x187ddd,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x187ddd,'remove',(_0x442d9a,_0x27646f)=>{_0x27646f['isActive']&&this['focus'](),_0x187ddd['length']||(this['isEmpty']=!0x0);});const _0x2a2e5a=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x532d6c,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x187ddd},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x2a2e5a['if']('isEmpty','ck-hidden',_0x4f3ada=>!_0x4f3ada)]},'children':[{'text':N(_0x532d6c,'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 _0x2f0742 of this['_annotationViews'])this['focusTracker']['add'](_0x2f0742['element']);this['_annotationViews']['on']('change',(_0x13d98c,{added:_0xe5a0f4,removed:_0x2181d2})=>{for(const _0x4052a4 of _0xe5a0f4)this['focusTracker']['add'](_0x4052a4['element']);for(const _0x52ecbe of _0x2181d2)this['focusTracker']['remove'](_0x52ecbe['element']);});}}class p extends _0x388a6f{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x1ecf6a){super(_0x1ecf6a),this['archivedThreads']=new _0x504ada();}['init'](){const _0x5cd10f=this['context'],_0x219019=_0x5cd10f['plugins']['get'](o),_0x1452ff=_0x5cd10f['plugins']['get'](y);this['listenTo'](_0x219019,'addCommentThread',(_0x4695af,{threadId:_0x9d26aa})=>{const _0x2fcbe4=_0x219019['getCommentThread'](_0x9d26aa);_0x2fcbe4['archivedAt']&&this['archivedThreads']['add'](_0x2fcbe4,this['_calculatePosition'](_0x2fcbe4['archivedAt'])),this['listenTo'](_0x2fcbe4,'change:archivedAt',(_0xd01f89,_0x2accd3,_0x5370f8)=>{_0x5370f8?this['archivedThreads']['has'](_0x2fcbe4)||this['archivedThreads']['add'](_0x2fcbe4,this['_calculatePosition'](_0x2fcbe4['archivedAt'])):this['archivedThreads']['has'](_0x2fcbe4)&&this['archivedThreads']['remove'](_0x2fcbe4);});}),this['listenTo'](_0x219019,'removeCommentThread',(_0x3c675e,{threadId:_0x30aa72})=>{const _0x1cc67d=_0x219019['getCommentThread'](_0x30aa72);this['stopListening'](_0x1cc67d),this['archivedThreads']['has'](_0x1cc67d)&&this['archivedThreads']['remove'](_0x1cc67d);},{'priority':'highest'}),this['listenTo'](_0x1452ff['collection'],'focus',(_0xd2871,_0x20f3f6)=>{_0x20f3f6['isVisible']||(_0x20f3f6['isActive']=!0x0,_0x1452ff['activate'](_0x20f3f6));});}['_calculatePosition'](_0x4b3bd6){const _0xd73a3a=[...this['archivedThreads']]['findIndex'](_0x125817=>_0x125817['archivedAt']<_0x4b3bd6);return _0xd73a3a>-0x1?_0xd73a3a:this['archivedThreads']['length'];}}class a extends _0x35651a{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x3c85b0];}constructor(_0xe29118){super(_0xe29118),this['annotationViews']=new _0x31ebb9(),this['_pendingThreads']=[];}['init'](){const _0x18cbdc=this['editor'],_0x5d6bcc=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x18cbdc['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x13fccc,!0x0)),_0x18cbdc['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x47fdd9=this['_createCommentsArchiveButton'](_0x339fd3);return _0x47fdd9['set']({'role':'menuitemcheckbox'}),_0x47fdd9;});const _0xab182d=_0x18cbdc['plugins']['get'](p),_0x258868=_0x18cbdc['plugins']['get']('Annotations'),_0x2de03b=_0x18cbdc['plugins']['get']('CommentsRepository');_0xab182d['archivedThreads']['forEach'](_0x2326fa=>{this['_handleNewThread'](_0x2326fa);}),this['listenTo'](_0xab182d['archivedThreads'],'add',(_0x5ec7f0,_0x4aff92)=>{this['_handleNewThread'](_0x4aff92);}),this['listenTo'](_0x258868['collection'],'add',(_0x47ec1d,_0x51d996)=>{const _0x452e9b=this['_pendingThreads']['find'](_0x2e8438=>{const _0x3d82bc=_0x2de03b['_threadToController']['get'](_0x2e8438);return _0x3d82bc&&_0x51d996['innerView']===_0x3d82bc['view'];});if(_0x452e9b){const _0x3e3530=this['_calculatePosition'](_0x452e9b['archivedAt']);this['annotationViews']['add'](_0x51d996['view'],_0x3e3530),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x452e9b),0x1);}}),this['listenTo'](_0xab182d['archivedThreads'],'remove',(_0x54b62b,_0x388137)=>{const _0x37caa7=_0x18cbdc['config']['get']('collaboration.channelId');if(!_0x37caa7||_0x388137['channelId']===_0x37caa7){if(this['_pendingThreads']['includes'](_0x388137))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x388137),0x1);else{const _0x3acd4a=_0x2de03b['_threadToController']['get'](_0x388137),_0x2e2f76=_0x258868['getByInnerView'](_0x3acd4a['view']);this['annotationViews']['remove'](_0x2e2f76['view']),this['stopListening'](_0x2e2f76['focusableElements']);}}}),this['listenTo'](_0x258868['collection'],'add',(_0x4abf65,_0x124792)=>{this['listenTo'](_0x124792,'escape',_0x5d6bcc);}),this['listenTo'](_0x258868['collection'],'remove',(_0x4921d3,_0x5983f8)=>{this['stopListening'](_0x5983f8,'escape',_0x5d6bcc);});}['_handleNewThread'](_0x34867b){const _0x42df52=this['editor']['plugins']['get']('CommentsRepository'),_0x1042ca=this['editor']['plugins']['get']('Annotations'),_0x34941b=this['editor']['config']['get']('collaboration.channelId');if(!_0x34941b||_0x34867b['channelId']===_0x34941b){const _0x5aa367=_0x42df52['_threadToController']['get'](_0x34867b);if(!_0x5aa367)return void this['_pendingThreads']['push'](_0x34867b);const _0xf364c=this['_calculatePosition'](_0x34867b['archivedAt']),_0x13b9ca=_0x1042ca['getByInnerView'](_0x5aa367['view']);_0x13b9ca['isVisible']&&_0x1042ca['_visibleAnnotations']['remove'](_0x13b9ca),this['annotationViews']['add'](_0x13b9ca['view'],_0xf364c);}}['_calculatePosition'](_0x2131a3){const _0x38c792=this['editor']['config']['get']('collaboration.channelId'),_0x3eb46d=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x47e1f6=>_0x47e1f6['channelId']===_0x38c792)['findIndex'](_0x46cf70=>_0x46cf70['archivedAt']<_0x2131a3);return _0x3eb46d<0x0||_0x3eb46d>this['annotationViews']['length']?this['annotationViews']['length']:_0x3eb46d-0x1;}['_toggleDialog'](){const _0x501d3c=this['editor'],_0x23b233=_0x501d3c['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new tt(_0x501d3c['locale'],this['annotationViews'])),'commentsArchive'===_0x23b233['id']?_0x23b233['hide']():_0x23b233['show']({'id':'commentsArchive','title':N(_0x501d3c['locale'],'COMMENTS_ARCHIVE'),'icon':_0x37f55e,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x4c44fd['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x33a533,_0x47d587=!0x1){const _0x4fb832=this['editor']['locale'],_0x5f5479=this['editor']['plugins']['get']('Dialog'),_0x44e425=new _0x33a533(_0x4fb832);return _0x44e425['bind']('isEnabled')['to'](this,'isEnabled'),_0x44e425['bind']('isOn')['to'](_0x5f5479,'id',_0x249b10=>'commentsArchive'===_0x249b10),_0x44e425['set']({'label':N(_0x4fb832,'COMMENTS_ARCHIVE'),'icon':_0x37f55e,'isToggleable':!0x0}),_0x47d587&&(_0x44e425['tooltip']=!0x0),this['listenTo'](_0x44e425,'execute',()=>this['_toggleDialog']()),_0x44e425;}['_hideDialogOnAnnotationEscape']=_0x5da0ad=>{const _0x38f265=_0x5da0ad['source'];if(!this['annotationViews']['has'](_0x38f265['view']))return;const _0x3c9be9=this['editor']['plugins']['get']('Dialog');_0x3c9be9['isOpen']&&'commentsArchive'===_0x3c9be9['id']&&(_0x3c9be9['hide'](),_0x5da0ad['stop']());};}class gi extends _0x35651a{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{rt 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,gt as CommentThreadController,ie as CommentThreadInputView,Tt as CommentThreadView,_t 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};
|