@ckeditor/ckeditor5-comments 45.1.0-alpha.3 → 45.1.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/comments.js +1 -1
- package/dist/index.js +9 -9
- package/package.json +18 -18
- package/src/comments/commentsediting.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Nt)());constructor(_0x20a7f5={}){function _0x13901e(_0x5ec5fb){return _0x5ec5fb['map'](_0x2261ee=>String['fromCharCode'](_0x2261ee))['join']('');}(_0x20a7f5=Object['assign']({},_0x20a7f5))['plugins']||(_0x20a7f5['plugins']=Qt['defaultPlugins']),super(_0x20a7f5),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[_0x13901e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x13901e([0x76,0x69,0x65,0x77])][_0x13901e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x13901e([0x61,0x75,0x74,0x6f]),this[_0x13901e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x13901e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x13901e([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x13901e([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x13901e([0x6f,0x6b])});}['create'](){const _0x30bb50=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x30bb50))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x2766a9=>{const _0x56e147=this['model']['document']['getRoot'](),_0x1522e6=_0x56e147&&_0x56e147['getChild'](_0x56e147['childCount']-0x1);_0x2766a9['setSelection'](_0x1522e6,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x3cfa0e=this['editing']['view'],_0x3c0b1d=_0x3cfa0e['document']['getRoot'](),_0x12ef43=_0x3c0b1d['getChild'](0x0);_0x3c0b1d['childCount']>0x1||!_0x12ef43||'p'!=_0x12ef43['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x3cfa0e,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x12ef43['placeholder']=this['placeholder']),Ft({'view':_0x3cfa0e,'element':_0x12ef43,'keepOnFocus':!0x0}),this['placeholderElement']=_0x12ef43);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x7733f1,_0x3fa020={}){super(_0x7733f1),this['editor']=null,this['_editorConfig']=_0x3fa020,this['set']('value',_0x3fa020['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',E(_0x7733f1,'Reply...')),this['set']('submitLabel',E(_0x7733f1,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0xb3b6d4(),this['focusCycler']=new _0x2db88c({'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',(_0x4f9632,_0x15f276)=>{this['cancelButtonView']['fire']('execute'),_0x15f276();}),this['keystrokes']['set']('Ctrl+Enter',(_0x3952f3,_0x3ee4eb)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x3ee4eb());}),this['on']('submit',(_0xf8fd1e,_0x15c00d)=>{_0x15c00d['length']>0xfde8?(alert(E(_0x7733f1,'TOO_LONG_COMMENT_ALERT',[_0x15c00d['length'],0xfde8])),_0xf8fd1e['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Qt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x5c7dad=this['editor'];this['element']['insertBefore'](_0x5c7dad['ui']['element'],this['element']['firstChild']),_0x5c7dad['model']['document']['on']('change',()=>this['value']=_0x5c7dad['getData']()),_0x5c7dad['bind']('placeholder')['to'](this),this['focusables']['add'](_0x5c7dad['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x192947){-0x1===_0x192947?(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:_0xf4ba15}=this,_0x1a6036=new _0x181f25(_0xf4ba15);return _0x1a6036['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x1a6036['withText']=!0x0,_0x1a6036['bind']('label')['to'](this,'submitLabel'),_0x1a6036['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x1a6036['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x85e08d,_0x495832)=>!_0x495832&&!!_0x85e08d['trim']()),_0x1a6036;}['_createCancelButton'](){const {locale:_0x52525}=this,_0xa52103=new _0x181f25(_0x52525);return _0xa52103['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0xa52103['label']=E(_0x52525,'Cancel'),_0xa52103['withText']=!0x0,_0xa52103['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0xa52103;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x4c0a61=>{this['focusTracker']['add'](_0x4c0a61['element']);}),this['focusables']['on']('change',(_0x4e0a36,_0x5719e9)=>{for(const _0x5a6d73 of Array['from'](_0x5719e9['added'])['reverse']())this['focusTracker']['add'](_0x5a6d73['element']);});}}class ie extends kt{constructor(_0xd4794b,_0x3969e1,_0x3c97e3){super(_0xd4794b),this['commentInputView']=new os(_0xd4794b,_0x3c97e3),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x58a567,_0x302a01)=>_0x58a567||!!_0x302a01),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 _0x2d7e2b(_0xd4794b,_0x3969e1),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'](_0x336e52){this['commentInputView']['focus'](_0x336e52);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x2481bb,_0x31e721)=>{const {submitButtonView:_0x321beb,cancelButtonView:_0x4d4b42,editor:_0x28d93d}=this['commentInputView'];[_0x321beb['element'],_0x4d4b42['element'],_0x28d93d?_0x28d93d['editing']['view']['getDomRoot']():null]['filter'](_0x2fcb9b=>_0x2fcb9b)['some'](_0x6e64c3=>_0x6e64c3['contains'](_0x31e721['target']))||(this['focus'](),_0x31e721['preventDefault']());});}}class cs extends kt{constructor(_0x56c36d){super(_0x56c36d);const _0x192544=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x192544['to']('count',_0x9b0563=>E(_0x56c36d,'NUMBER_OF_COMMENTS',_0x9b0563))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0xccd786,_0x148bb3,_0x2604eb){super(_0xccd786);const _0xf40831=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x148bb3['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x148bb3,this['_config']=_0x2604eb,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0xb3b6d4(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2db88c({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1767c9=>this['commentViews']['map'](_0x2c3c4d=>_0x2c3c4d['element'])['includes'](_0x1767c9['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0xccd786),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x43abea=>_0x43abea-this['_config']['maxCommentsWhenCollapsed']);for(const _0x1ead71 of _0x148bb3['comments'])this['_handleNewCommentModel'](_0x1ead71);this['_handleInfoComment'](),this['listenTo'](_0x148bb3['comments'],'add',(_0x3be26d,_0x13c11d)=>{const _0x32386c=this['_calculatePosition'](_0x13c11d);this['length']++,this['_handleNewCommentModel'](_0x13c11d,_0x32386c),this['refreshVisibleViews']();}),this['listenTo'](_0x148bb3['comments'],'remove',(_0x27363e,_0x5221e7)=>{this['length']--,this['_handleRemoveCommentModel'](_0x5221e7),this['refreshVisibleViews']();}),this['listenTo'](_0x148bb3,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x148bb3,'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',_0xf40831['if']('length','ck-hidden',_0x32d2e3=>!_0x32d2e3)],'aria-label':E(_0xccd786,'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'](_0x4184c1){-0x1===_0x4184c1?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x18b5bc of this['commentViews'])_0x18b5bc['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x3449b6,_0x1daafa){const _0x23c469=new this['_config']['CommentView'](this['locale'],_0x3449b6,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x23c469['viewUid']=_0x3449b6['id'],_0x23c469['delegate']('removeComment')['to'](this),_0x23c469['delegate']('updateComment')['to'](this),_0x23c469['delegate']('resolveCommentThread')['to'](this),_0x23c469['delegate']('editorReady')['to'](this),_0x23c469['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x23c469,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x23c469,_0x1daafa);}['_calculatePosition'](_0x520651){const _0x397900=this['_model']['_findOptimalIndex'](_0x520651);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x520651['authoredAt']?_0x397900-0x1:_0x397900:_0x397900-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x40c8b7={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':E(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x40c8b7,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x40c8b7));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x1aea7f){const _0x2f6938=this['commentViews']['remove'](_0x1aea7f['id']);this['stopListening'](_0x2f6938),_0x2f6938['isEditMode']&&this['_updateHasDirtyComment'](),_0x2f6938['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x4a6544=>_0x4a6544['isEditMode']);}['_rearrangeCollapse'](){const _0x3df489=function(_0xecdaf3){const _0x28736b=new _0xfcf14();for(const _0x451f1a of _0xecdaf3)_0x28736b['add'](_0x451f1a);return _0x28736b;}(this['commentViews']),_0x2d03e6=this['_collapsedCommentsView']['count'];for(let _0x41dd6f=0x1;_0x41dd6f<=_0x2d03e6;_0x41dd6f++)_0x3df489['remove'](0x1);for(const _0x2fdc8e of _0x3df489)_0x2fdc8e['collapse']();_0x2d03e6>0x0&&_0x3df489['add'](this['_collapsedCommentsView'],0x1),ns(_0x3511a1(Array['from'](this['visibleViews']),Array['from'](_0x3df489)),this['visibleViews'],_0x3df489);}['_rearrangeExpand'](){ns(_0x3511a1(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x32be06 of this['visibleViews'])_0x32be06['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x579c8d=>{this['focusTracker']['add'](_0x579c8d['element']),this['keystrokes']['listenTo'](_0x579c8d['element']);}),this['commentViews']['on']('change',(_0x525b92,_0xc81409)=>{for(const _0x494258 of _0xc81409['removed'])this['focusTracker']['remove'](_0x494258['element']),this['keystrokes']['stopListening'](_0x494258['element']);for(const _0x5bd4b2 of Array['from'](_0xc81409['added'])['reverse']())this['focusTracker']['add'](_0x5bd4b2['element']),this['keystrokes']['listenTo'](_0x5bd4b2['element']);});}}function ns(_0x3112f9,_0x39c3ee,_0x9def23){let _0xd139e0=0x0;for(const _0x4650c1 of _0x3112f9)switch(_0x4650c1){case'insert':_0x39c3ee['add'](_0x9def23['get'](_0xd139e0),_0xd139e0),_0xd139e0++;break;case'delete':_0x39c3ee['remove'](_0xd139e0);break;case'equal':_0xd139e0++;}}class as extends kt{constructor(_0x595eac){super(_0x595eac);const _0x17b2f2=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x17b2f2['to']('contextValue',_0x52e8b9=>E(_0x595eac,'THREAD_CONTEXT_LABEL',_0x52e8b9)),'tabindex':-0x1},'children':[{'text':_0x17b2f2['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x2f591d,_0x13f76e){super(_0x2f591d);const _0x2e2e50=this['bindTemplate'];this['_model']=_0x13f76e,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0xb3b6d4(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2db88c({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x5be380=>!!_0x5be380),this['bind']('contextValue')['to'](this['_model'],'context',_0x57e7b9=>_0x57e7b9&&_0x57e7b9['value']?this['_trimContextValue'](_0x57e7b9['value']):E(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x2e2e50['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 _0x187f13=new _0x181f25(this['locale']);return _0x187f13['label']=E(this['locale'],'Reopen'),_0x187f13['tooltip']=E(this['locale'],'Reopen'),_0x187f13['icon']=_0x3c8e41,_0x187f13['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1d68c8=>!_0x1d68c8),_0x187f13['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x31035f,_0x4b15a8)=>_0x31035f&&_0x4b15a8),_0x187f13['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x187f13;}['_trimContextValue'](_0x2fce12){if(_0x2fce12['length']<0x96)return _0x2fce12;const _0x27958f=_0x2fce12['lastIndexOf']('\x20',0x93);return _0x2fce12['substring'](0x0,_0x27958f>-0x1?_0x27958f:0x93)+'...';}['_attachContextActions'](){const _0x5d751b=this['element']['querySelector']('.ck-context'),_0x4eaf01=_0x5d751b['querySelector']('.ck-context__value');this['listenTo'](_0x5d751b,'mouseenter',()=>{_0x4eaf01['offsetWidth']<_0x4eaf01['scrollWidth']&&_0x5d751b['classList']['add']('overlay');}),this['listenTo'](_0x5d751b,'mouseleave',()=>{_0x5d751b['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x24ba76 of this['focusables'])this['focusTracker']['add'](_0x24ba76['element']),this['keystrokes']['listenTo'](_0x24ba76['element']);}['_createContextView'](){const _0x996202=new as(this['locale']);return _0x996202['bind']('contextValue')['to'](this),_0x996202;}}class ts extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5802e1,_0x3d4c69,_0x3b5929,_0x27d02c){super(_0x5802e1),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x3d4c69,this['_localUser']=_0x3b5929,this['_config']=_0x27d02c,this['commentThreadHeaderView']=new Xt(_0x5802e1,_0x3d4c69),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x5802e1,E(_0x5802e1,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x5802e1,_0x3d4c69,Object['assign']({'CommentView':this['_config']['CommentView']},_0x27d02c)),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',(_0x31b633,_0x1a6e76)=>_0x31b633||!!_0x1a6e76),this['bind']('isUnlinked')['to'](_0x3d4c69,'unlinkedAt',_0x5eabe7=>!!_0x5eabe7),this['bind']('ariaLabel')['to'](this,'length',_0x5a0af7=>{const _0x1fe5dc=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return E(this['locale'],'COMMENT_THREAD_LABEL',[_0x5a0af7,_0x1fe5dc]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0xb3b6d4(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2db88c({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x34e764=>_0x34e764['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x4bb081=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x1cac86=_0x4bb081['commentInputView'];return _0x4bb081['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x1cac86,'value',(_0x414fb0,_0x55ab02,_0x295a09,_0x3dd913,_0x2f80e9)=>!!_0x2f80e9||!!_0x3dd913&&_0x295a09&&!_0x55ab02||_0x414fb0&&_0x295a09&&!_0x55ab02),_0x1cac86['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x21e1d0,_0xdd4da7,_0x456b79)=>{let _0x154000;return _0x154000=_0x456b79&&_0xdd4da7?'Reply\x20to\x20reopen\x20discussion...':_0x21e1d0?'Reply...':'Write\x20a\x20comment...',E(this['locale'],_0x154000);}),_0x1cac86['bind']('submitLabel')['to'](this,'length',_0xe8f7fb=>E(this['locale'],_0xe8f7fb?'Reply':'Comment')),_0x1cac86['on']('submit',(_0x25af2b,_0x8dd848)=>{this['fire']('addComment',_0x8dd848),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x1cac86['on']('cancel',()=>{this['focus']();}),_0x1cac86['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x1cac86['on']('cancel',_0x2274df=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x2274df['stop']());}),this['on']('change:isActive',(_0x5b9cdd,_0x17281b,_0x3f6075)=>{_0x3f6075||this['length']||_0x1cac86['value']||this['fire']('removeCommentThread');}),_0x4bb081;}}class vt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(ts){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(hs){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x4a1ea7(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x50fd56,target:_0x4cac29,type:_0x5efd02,isVisible:_0x58692c=!0x0}){super(),this['view']=_0x50fd56,this['view']['element']||this['view']['render'](),this['_type']=_0x5efd02,this['_target']=_0x4cac29,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0xfcf14([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x4a2233,_0x91e37b)=>{this['view']['focusTracker']['add'](_0x91e37b);}),this['focusableElements']['on']('remove',(_0x5936f3,_0x563b7c)=>{this['view']['focusTracker']['remove'](_0x563b7c);}),this['set']('isVisible',_0x58692c);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x57d7e0=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x57d7e0),_0x57d7e0;}get['targetRect'](){const _0x3e1989=this['target'];if(null===_0x3e1989)return null;if(_0x3e1989 instanceof _0x66e728)return _0x3e1989;const _0x198748=_0x3e1989['filter'](_0x2d4231=>function(_0x1e91bf){const _0x4ecfb9=_0x1e91bf['offsetParent'];if(_0x4ecfb9)return!0x0;const _0x2176e3=_0x1e91bf['getClientRects']()['item'](0x0);return!!_0x2176e3;}(_0x2d4231));return 0x0===_0x198748['length']?null:new _0x66e728(_0x198748[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x4452fa){this['view']['isActive']=_0x4452fa,this['view']['mainView']['isActive']=_0x4452fa;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x3795ae){if(!(null===_0x3795ae||_0x3795ae instanceof _0x66e728||Array['isArray'](_0x3795ae)&&_0x3795ae['every'](_0x25b23d=>li(_0x25b23d))))throw new _0x167eaf('annotation-invalid-target',null,{'target':_0x3795ae});}['_getNormalizedTarget'](){const _0x5d0fa2='function'==typeof this['_target']?this['_target']():this['_target'];return li(_0x5d0fa2)?[_0x5d0fa2]:_0x5d0fa2;}}function li(_0x8d0146){return null!==_0x8d0146&&'object'==typeof _0x8d0146&&'nodeType'in _0x8d0146&&0x1===_0x8d0146['nodeType'];}class _ extends _0xfcf14{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x1c3272=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0xb3b6d4(),this['_focusTracker']['on']('change:isFocused',(_0x3a7cde,_0x2b854e,_0x1c67ed)=>{_0x1c67ed||this['fire']('blur');});for(const _0x35bf45 of _0x1c3272)this['add'](_0x35bf45);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0xd427cc){if(this['has'](_0xd427cc))throw new _0x167eaf('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0xd427cc['innerView'],_0xd427cc),this['_viewToAnnotation']['set'](_0xd427cc['view'],_0xd427cc);for(const _0x51e8a4 of _0xd427cc['focusableElements'])this['_focusTracker']['add'](_0x51e8a4);this['listenTo'](_0xd427cc['focusableElements'],'add',(_0x1bb2fa,_0x149231)=>{this['_focusTracker']['add'](_0x149231);}),this['listenTo'](_0xd427cc['focusableElements'],'remove',(_0x333e5a,_0x3a0365)=>{this['_focusTracker']['remove'](_0x3a0365);}),this['listenTo'](_0xd427cc['view']['focusTracker'],'change:isFocused',(_0x4b21ca,_0x6daee9,_0x5bd626)=>{_0x5bd626&&this['fire']('focus',_0xd427cc);}),_0xd427cc['updateTargetRect']();const _0x45ee3b=this['_getOrderInContent'](_0xd427cc['view']['targetRect']);return super['add'](_0xd427cc,_0x45ee3b);}['remove'](_0x152c1a){if(!this['has'](_0x152c1a))throw new _0x167eaf('annotationcollection-not-existing-item',null);this['stopListening'](_0x152c1a['view']['focusTracker']),this['stopListening'](_0x152c1a['focusableElements']);for(const _0x5317c5 of _0x152c1a['focusableElements'])this['_focusTracker']['remove'](_0x5317c5);return this['_viewToAnnotation']['delete'](_0x152c1a['view']),this['_innerViewToAnnotation']['delete'](_0x152c1a['innerView']),super['remove'](_0x152c1a);}['getByInnerView'](_0x13480b){return this['_innerViewToAnnotation']['get'](_0x13480b);}['getByView'](_0x10f575){return this['_viewToAnnotation']['get'](_0x10f575);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x19e959 of this)_0x19e959['updateTargetRect']();this['_sort']();}['_sort'](){const _0x14401f=Array['from'](this)['sort']((_0x46f74c,_0x332b89)=>v(_0x46f74c['view']['targetRect'],_0x332b89['view']['targetRect']));for(let _0xb40b3f=_0x14401f['length']-0x1;_0xb40b3f>0x0;_0xb40b3f--){const _0x5925f7=_0x14401f[_0xb40b3f];_0xb40b3f!==this['getIndex'](_0x5925f7)&&(this['remove'](_0x5925f7),this['add'](_0x5925f7));}}['_getOrderInContent'](_0xbe6185){let _0x2c7782=0x0;if(!_0xbe6185)return this['length'];for(const _0x3ddb04 of this){const _0x21c50c=_0x3ddb04['view']['targetRect'];if(_0x21c50c){if(v(_0xbe6185,_0x21c50c)<0x0)return _0x2c7782;_0x2c7782++;}}return _0x2c7782;}}function v(_0x109f53,_0x375b5e){if(null===_0x109f53&&null===_0x375b5e)return 0x0;if(null===_0x109f53)return-0x1;if(null===_0x375b5e)return 0x1;const _0xccb8c3=_0x109f53['top']-_0x375b5e['top'];return 0x0==_0xccb8c3?_0x109f53['left']-_0x375b5e['left']:_0xccb8c3;}class O extends _0x3ec28c{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4eff5f){if(super(_0x4eff5f),this['collection']=new _(),this['_visibleAnnotations']=new _(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x4eff5f instanceof _0x4e56ff){const _0x1bd15c=_0x4eff5f['locale'];_0x4eff5f['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':E(_0x1bd15c,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':E(_0x1bd15c,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':E(_0x1bd15c,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':E(_0x1bd15c,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':E(_0x1bd15c,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':E(_0x1bd15c,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':E(_0x1bd15c,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x3b4ef6){this['collection']['add'](_0x3b4ef6);}['remove'](_0x4f2ecc){this['collection']['remove'](_0x4f2ecc),_0x4f2ecc['destroy']();}['refreshVisibility'](){for(const _0x20da00 of this['collection'])_0x20da00['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x7170f9){return this['collection']['getByInnerView'](_0x7170f9);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x4a3eba of this['collection'])_0x4a3eba['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x20eb2a){this['fire']('_activateAnnotation',_0x20eb2a);}['createAnnotation'](_0x372a7d){return new d(_0x372a7d);}['createAnnotationView'](_0x4d56dd,_0x27bb72){return new S(_0x4d56dd,_0x27bb72);}['_addActiveAnnotation'](_0x1c2602){const _0x1899ae=new Set(this['activeAnnotations']);_0x1899ae['add'](_0x1c2602),this['activeAnnotations']=_0x1899ae;}['_removeActiveAnnotation'](_0x130a18){const _0x123425=new Set(this['activeAnnotations']);_0x123425['delete'](_0x130a18),this['activeAnnotations']=_0x123425;}['_bindAnnotationsToVisibleAnnotations'](){const _0x25f159=this['collection'],_0x22ef92=this['_visibleAnnotations'];function _0x1ccf88(_0x4458b5){const _0x411156=_0x4458b5['source'];_0x411156['isVisible']&&!_0x22ef92['has'](_0x411156)?_0x22ef92['add'](_0x411156):!_0x411156['isVisible']&&_0x22ef92['has'](_0x411156)&&_0x22ef92['remove'](_0x411156),_0x411156['view']['focusTracker']['remove'](_0x411156['view']['element']),_0x411156['view']['focusTracker']['add'](_0x411156['view']['element']);}this['listenTo'](_0x25f159,'add',(_0x3de444,_0xfffcfa)=>{_0xfffcfa['isVisible']&&_0x22ef92['add'](_0xfffcfa),this['listenTo'](_0xfffcfa,'change:isVisible',_0x1ccf88);}),this['listenTo'](_0x25f159,'remove',(_0x852bc9,_0x1ca47d)=>{_0x22ef92['has'](_0x1ca47d)&&_0x22ef92['remove'](_0x1ca47d),this['stopListening'](_0x1ca47d,'change:isVisible',_0x1ccf88);});}['_setupEnterAnnotationKeystroke'](){const _0x2fe1f8=_0x557396=>{_0x557396['on']('ready',()=>{_0x557396['keystrokes']['set'](_0x5a7967,(_0x1328fd,_0x11c9ab)=>{const _0x228a33=_0x2ae980(this['activeAnnotations']['values']());_0x228a33&&(_0x228a33['view']['focus'](),_0x11c9ab());});});};this['context']instanceof _0x4e56ff?_0x2fe1f8(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x4928ac,_0x56b194)=>{_0x2fe1f8(_0x56b194);});}['_setupEscapeAnnotationHandling'](){const _0x547396=_0x56b395=>{const _0x2702fc=_0x56b395['source'],_0x4e8ea7=[];let _0x4760b7;if(Array['isArray'](_0x2702fc['target'])){_0x4760b7=_0x2702fc['target'][0x0],this['context']instanceof _0x4e56ff?_0x4e8ea7['push'](this['context']):this['context']['editors']&&_0x4e8ea7['push'](...this['context']['editors']);for(const _0x10bca9 of _0x4e8ea7)for(const _0x33c043 of _0x10bca9['editing']['view']['domRoots']['values']())if(_0x33c043['contains'](_0x4760b7))return void _0x10bca9['editing']['view']['focus']();_0x4760b7['focus']();}};this['listenTo'](this['collection'],'add',(_0x24ee84,_0x9e1dab)=>{this['listenTo'](_0x9e1dab,'escape',_0x547396,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x5abc4e,_0x318b9d)=>{this['stopListening'](_0x318b9d,'escape',_0x547396);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x3ec28c{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[O,ht,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3fc50a){super(_0x3fc50a),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x2f465d=this['context']['config'];_0x2f465d['define']('comments.maxCommentsWhenCollapsed',0x2),_0x2f465d['define']('comments.maxThreadTotalWeight',0x1f4),_0x2f465d['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x2f465d['define']('comments.CommentThreadView',vt),_0x2f465d['define']('comments.CommentView',gt),_0x2f465d['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x5cc75f=this['context']['plugins']['get'](O);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x294be3,_0x2663c1)=>this['_addCommentThread'](_0x2663c1)),this['on']('submitCommentThread',(_0x201d80,_0x4f928d)=>this['_submitCommentThread'](_0x4f928d)),this['on']('resolveCommentThread',(_0x40cb6b,_0x33d724)=>this['_resolveCommentThread'](_0x33d724)),this['on']('resolveCommentThread',(_0x3d6652,_0x1942ca)=>this['_updateActiveAnnotation'](_0x1942ca),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x34685e,_0x23ddf2)=>this['_reopenCommentThread'](_0x23ddf2)),this['on']('reopenCommentThread',(_0xde1c64,_0x456779)=>this['_updateActiveAnnotation'](_0x456779),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x17b274,_0x153ed1)=>this['_removeCommentThread'](_0x153ed1)),this['on']('updateCommentThread',(_0x724466,_0x2ff892)=>this['_updateCommentThread'](_0x2ff892)),this['on']('updateCommentThread',(_0x21ab08,_0x1e0cc1)=>this['_updateActiveAnnotation'](_0x1e0cc1),{'priority':'lowest'}),this['on']('addComment',(_0x59b4b8,_0x57c2e9)=>this['_addComment'](_0x57c2e9)),this['on']('updateComment',(_0x270950,_0x3a21dc)=>this['_updateComment'](_0x3a21dc)),this['on']('removeComment',(_0x3574fa,_0x2a5db3)=>this['_removeComment'](_0x2a5db3)),this['on']('addComment',(_0x33ce14,{threadId:_0x1d6a59,isFromAdapter:_0x3e61b8})=>{if(_0x3e61b8)return;const _0xfa578f=this['getCommentThread'](_0x1d6a59),_0x2fa0ec=_0xfa578f&&this['_threadToController']['get'](_0xfa578f);_0x2fa0ec&&_0x2fa0ec['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x5cc75f,'change:activeAnnotations',(_0x3962f4,_0xc7c1ba,_0x38a175)=>{const _0x4c9260=Array['from'](_0x38a175)['map'](_0x24143a=>this['_viewToController']['get'](_0x24143a['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x4c9260?_0x4c9260['model']:null;});}set['adapter'](_0x4159f2){if(this['_adapter'])throw new _0x167eaf('commentsrepository-adapter-already-set');this['_adapter']=_0x4159f2;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x326073=Tt,threadId:_0x26dd82=_0x1ddcfe(),comments:_0x276587=[],unlinkedAt:_0x629976=null,resolvedAt:_0x578d65=null,resolvedBy:_0x4a917a=null,target:_0x6c546d=null,context:_0x576034=null,attributes:_0x36a924={},isResolvable:_0x299087=!0x0,isSubmitted:_0x14a6a7=!0x1,isFromAdapter:_0x4504ef=!0x1}={}){return this['fire'](bt('addCommentThread',_0x326073),{'channelId':_0x326073,'threadId':_0x26dd82,'comments':_0x276587,'unlinkedAt':_0x629976,'resolvedAt':_0x578d65,'resolvedBy':_0x4a917a,'target':_0x6c546d,'context':_0x576034,'attributes':_0x36a924,'isFromAdapter':_0x4504ef,'isResolvable':_0x299087,'isSubmitted':_0x14a6a7}),this['getCommentThread'](_0x26dd82);}['openNewCommentThread']({channelId:_0x3fece2=Tt,threadId:_0x208bdd=_0x1ddcfe(),target:_0x4a1bdc,context:_0x3ef29f=null,isResolvable:_0x541c9f=!0x0}){if(this['_readOnlyChannels']['has'](_0x3fece2)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x4a1bdc)throw new _0x167eaf('commentsrepository-missing-target');const _0x49b6c2=this['addCommentThread']({'channelId':_0x3fece2,'threadId':_0x208bdd,'target':_0x4a1bdc,'context':_0x3ef29f,'isResolvable':_0x541c9f});if(!_0x49b6c2)return null;const _0x48758d=this['_threadToController']['get'](_0x49b6c2),_0x6b9ca2=_0x48758d['view']['commentThreadInputView']['commentInputView'],_0x12be96=this['context']['plugins']['get'](O),_0x3d434d=_0x12be96['getByInnerView'](_0x48758d['view']);return _0x12be96['activate'](_0x3d434d),_0x6b9ca2['once']('editorReady',()=>_0x6b9ca2['focus']()),_0x49b6c2;}['hasCommentThread'](_0x54a82c){if('string'!=typeof _0x54a82c)throw new _0x167eaf('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x54a82c);}['updateCommentThread']({channelId:_0x3d1dc1=Tt,threadId:_0x519258,context:_0x44e905,unlinkedAt:_0x3e2e3a,attributes:_0x5aa6ed,isFromAdapter:_0x417393=!0x1}){return this['fire'](bt('updateCommentThread',_0x3d1dc1),{'channelId':_0x3d1dc1,'threadId':_0x519258,'context':_0x44e905,'unlinkedAt':_0x3e2e3a,'attributes':_0x5aa6ed,'isFromAdapter':_0x417393}),this['getCommentThread'](_0x519258);}['getCommentThread'](_0x5416d8){if('string'!=typeof _0x5416d8)throw new _0x167eaf('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x5416d8);}['fetchCommentThread']({channelId:_0x594613,threadId:_0x4b8160}={}){const _0x13a20c=this['getCommentThread'](_0x4b8160);if(_0x13a20c)return Promise['resolve'](_0x13a20c);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x167eaf('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x594613,'threadId':_0x4b8160})['then'](_0x1820f3=>this['hasCommentThread'](_0x4b8160)?this['getCommentThread'](_0x4b8160):_0x1820f3?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x594613},_0x1820f3)):void 0x0)['catch'](_0x4f1e6d=>{throw console['error'](_0x4f1e6d),new _0x167eaf('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x509fa9,skipNotAttached:_0x1c978b=!0x1,skipEmpty:_0x2556cb=!0x1,toJSON:_0x12a852=!0x1}={}){const _0x494dc9=[];for(const _0x530b20 of this['_threads']['values']())_0x509fa9&&_0x530b20['channelId']!==_0x509fa9||_0x1c978b&&!_0x530b20['isAttached']||_0x2556cb&&0x0===_0x530b20['length']||_0x494dc9['push'](_0x530b20);return _0x12a852?_0x494dc9['map'](_0x3e76a6=>_0x3e76a6['toJSON']()):_0x494dc9;}['setActiveCommentThread'](_0x213a3e){const _0x33d52e=this['context']['plugins']['get'](O);if(!_0x213a3e)return void(this['activeCommentThread']&&_0x33d52e['deactivateAll']());const _0x161a3d=this['getCommentThread'](_0x213a3e);if(!_0x161a3d)throw new _0x167eaf('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x213a3e});if(!this['_threadToController']['has'](_0x161a3d))throw new _0x167eaf('commentsrepository-active-not-attached',null,{'threadId':_0x213a3e});const _0x2c6cd2=_0x33d52e['getByInnerView'](this['_threadToController']['get'](_0x161a3d)['view']);_0x33d52e['activate'](_0x2c6cd2);}['switchReadOnly'](_0x1e4259,_0x253d2a){_0x1e4259?this['_readOnlyChannels']['add'](_0x253d2a):this['_readOnlyChannels']['delete'](_0x253d2a),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x573d77){return this['_readOnlyChannels']['has'](_0x573d77)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x296d09,_0x1c7795){return new Ct(_0x296d09,_0x1c7795);}['setPermissions'](_0x39b0e4,_0x4e6810=Tt){this['_permissions']['set'](_0x4e6810,_0x39b0e4),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x29676e=Tt){return this['_permissions']['has'](_0x29676e)?this['_permissions']['get'](_0x29676e):_t;}['_addCommentThread']({channelId:_0x545549,threadId:_0x562e22,comments:_0x187fb4,unlinkedAt:_0x3d9c5d,resolvedAt:_0x6ff3bf,resolvedBy:_0x4aa1e4,target:_0x1950e6,context:_0x4d2f0f,attributes:_0x50dda0,isFromAdapter:_0x39003c,isResolvable:_0x34b781,isSubmitted:_0x6f6401}){if('string'!=typeof _0x562e22)throw new _0x167eaf('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x562e22});if(this['hasCommentThread'](_0x562e22))throw new _0x167eaf('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x562e22});const _0xe6efdf=new ui(this,{'channelId':_0x545549,'id':_0x562e22,'context':_0x4d2f0f,'attributes':_0x50dda0,'unlinkedAt':_0x3d9c5d,'resolvedAt':_0x6ff3bf,'resolvedBy':_0x4aa1e4?this['context']['plugins']['get'](it)['getUser'](_0x4aa1e4):null,'isResolvable':_0x34b781,'isSubmitted':_0x6f6401||_0x39003c});this['_threads']['set'](_0x562e22,_0xe6efdf);for(const _0x86f2ef of _0x187fb4)_0xe6efdf['_add'](this['_createNewComment']({'threadId':_0x562e22,..._0x86f2ef}));return _0x1950e6&&_0xe6efdf['attachTo'](_0x1950e6),_0x39003c||!_0xe6efdf['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x545549,'threadId':_0x562e22});}['_submitCommentThread']({channelId:_0x489f0f,threadId:_0x4751f2}){if(!this['hasCommentThread'](_0x4751f2))throw new _0x167eaf('commentsrepository-missing-comment-thread',this);const _0xf93181=this['getCommentThread'](_0x4751f2);if(_0xf93181['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x217075,comments:_0x8e03e2,resolvedAt:_0x2275ac,resolvedBy:_0x1b2ff8,context:_0x49e811,attributes:_0x1445e3}=_0xf93181,_0x4bff2a=this['context']['plugins']['get']('PendingActions'),_0x215d40=_0x4bff2a['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x489f0f,'threadId':_0x217075,'comments':_0x8e03e2['map'](_0x129522=>_0x129522['toJSON']()),'resolvedAt':_0x2275ac,'resolvedBy':_0x1b2ff8?_0x1b2ff8['id']:_0x1b2ff8,'context':_0x49e811,'attributes':_0x1445e3})['then'](({comments:_0x3af6db})=>{_0x4bff2a['remove'](_0x215d40);for(const _0x2ffd26 of _0x3af6db)this['_updateComment']({'channelId':_0x489f0f,'threadId':_0x4751f2,'commentId':_0x2ffd26['commentId'],'createdAt':_0x2ffd26['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x21f766=>{throw console['error'](_0x21f766),new _0x167eaf('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0xe4ebf2,target:_0x50493a}){const _0x3bca23=this['getCommentThread'](_0xe4ebf2);if(!_0x3bca23)throw new _0x167eaf('commentsrepository-attach-missing-comment-thread',this);const _0x584192=this['context']['plugins']['get']('PendingActions'),_0x488d65=this['context']['plugins']['get'](O),_0x3dcc17=this['_createCommentThreadView'](_0x3bca23),_0x2d3548=new Ct(_0x3bca23,_0x3dcc17);let _0x355e48=null;_0x3dcc17['on']('change:isDirty',(_0x15863f,_0x51a432,_0x5afe72)=>{_0x5afe72?_0x355e48=_0x584192['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x355e48&&(_0x584192['remove'](_0x355e48),_0x355e48=null);}),this['_threadToController']['set'](_0x3bca23,_0x2d3548),this['_viewToController']['set'](_0x3dcc17,_0x2d3548);const _0x48a83d=new S(this['context']['locale'],_0x3dcc17);_0x48a83d['bind']('length')['to'](_0x3dcc17),_0x48a83d['bind']('isDirty')['to'](_0x3dcc17,'isDirty',_0x3dcc17,'length',(_0x2f51ae,_0xa47d8a)=>_0x2f51ae||!_0xa47d8a),_0x48a83d['bind']('isActive')['to'](_0x3dcc17),_0x48a83d['type']='comment';const _0x2d4596=new d({'view':_0x48a83d,'target':_0x50493a,'type':'comment','isVisible':!_0x3bca23['archivedAt']});return _0x3dcc17['on']('escape',()=>{_0x2d4596['fire']('escape');}),this['_bindAnnotationToEditors'](_0x3dcc17,_0x2d4596),_0x488d65['add'](_0x2d4596),_0x2d4596;}['_bindAnnotationToEditors'](_0x501cba,_0x269a07){this['listenTo'](_0x501cba,'editorReady',(_0x21a47b,_0x5e9ee4)=>{const _0x29ce99=_0x5e9ee4['ui']['view']['body']['bodyCollectionContainer'];_0x269a07['focusableElements']['add'](_0x29ce99),this['context']instanceof _0x4e56ff&&this['context']['ui']['focusTracker']['add'](_0x29ce99);},{'priority':'highest'}),this['listenTo'](_0x501cba,'editorDestroyed',(_0x1e3481,_0x5d0f87)=>{const _0x160241=_0x5d0f87['ui']['view']['body']['bodyCollectionContainer'];_0x269a07['focusableElements']['has'](_0x160241)&&_0x269a07['focusableElements']['remove'](_0x160241),this['context']instanceof _0x4e56ff&&this['context']['ui']['focusTracker']['remove'](_0x160241);});}['_unbindEditors'](_0x13ce39){this['stopListening'](_0x13ce39,'editorReady'),this['stopListening'](_0x13ce39,'editorDestroyed');}['_createCommentThreadView'](_0x3cab83){const _0x398758=this['context']['plugins']['get'](it),{config:_0x527f2e,locale:_0x534642}=this['context'],_0x4d878b=lt(_0x527f2e['get']('locale'),_0x534642);return new(0x0,(_0x527f2e['get']('comments'))['CommentThreadView'])(_0x534642,_0x3cab83,_0x398758['me'],{'editorConfig':{..._0x527f2e['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x527f2e['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x527f2e['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x527f2e['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x527f2e['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x4d878b,'CommentView':_0x527f2e['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x1317ca,channelId:_0x1855a2,resolvedAt:_0x23d5b2,resolvedBy:_0x319999,isFromAdapter:_0x3752c8}){if(!this['hasCommentThread'](_0x1317ca))throw new _0x167eaf('commentsrepository-missing-comment-thread',null,{'threadId':_0x1317ca});const _0x24fe1b=this['getCommentThread'](_0x1317ca);if(_0x24fe1b['isResolved'])throw new _0x167eaf('commentsrepository-resolved-comment-thread',null,{'threadId':_0x1317ca});const _0x5c1137=this['context']['plugins']['get'](it);if(_0x24fe1b['resolvedBy']=_0x5c1137['getUser'](_0x319999),_0x24fe1b['resolvedAt']=_0x23d5b2,_0x3752c8||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x46d8aa=this['context']['plugins']['get']('PendingActions'),_0x4562b7=_0x46d8aa['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x1855a2,'threadId':_0x1317ca})['then'](({resolvedAt:_0x49b35a,resolvedBy:_0x1aa70a})=>{_0x46d8aa['remove'](_0x4562b7),_0x24fe1b['resolvedBy']['id']!==_0x1aa70a&&(_0x24fe1b['resolvedBy']=_0x5c1137['getUser'](_0x1aa70a)),_0x24fe1b['resolvedAt']=_0x49b35a;})['catch'](_0xbf45a8=>{throw console['error'](_0xbf45a8),new _0x167eaf('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x8aae3,channelId:_0x133e1a,isFromAdapter:_0x535ad5}){if(!this['hasCommentThread'](_0x8aae3))throw new _0x167eaf('commentsrepository-missing-comment-thread',null,{'threadId':_0x8aae3});const _0x468d67=this['getCommentThread'](_0x8aae3);if(!_0x468d67['isResolved'])throw new _0x167eaf('commentsrepository-reopen-comment-thread',null,{'threadId':_0x8aae3});if(_0x468d67['resolvedBy']=null,_0x468d67['resolvedAt']=null,_0x535ad5||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x5974a3=this['context']['plugins']['get']('PendingActions'),_0x3d4a16=_0x5974a3['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x133e1a,'threadId':_0x8aae3})['then'](()=>_0x5974a3['remove'](_0x3d4a16))['catch'](_0x326fde=>{throw console['error'](_0x326fde),new _0x167eaf('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x50ed93,isFromAdapter:_0x37e560}){const _0x69e48b=this['getCommentThread'](_0x50ed93);if(!_0x69e48b)throw new _0x167eaf('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x50ed93),this['_threads']['delete'](_0x50ed93),!_0x69e48b['isSubmitted']||_0x37e560||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x1c65c4=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4fe14f}=_0x69e48b,_0x3ff56a=_0x1c65c4['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x4fe14f,'threadId':_0x50ed93})['then'](()=>_0x1c65c4['remove'](_0x3ff56a))['catch'](_0x481d19=>{throw console['error'](_0x481d19),new _0x167eaf('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x59e4a6,unlinkedAt:_0x4aa786,context:_0x2b528d,attributes:_0x21d0bd,isFromAdapter:_0x53befc}){if('string'!=typeof _0x59e4a6)throw new _0x167eaf('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x59e4a6});if(!this['hasCommentThread'](_0x59e4a6))throw new _0x167eaf('commentsrepository-missing-comment-thread',null,{'threadId':_0x59e4a6});const _0x1a5f95=this['getCommentThread'](_0x59e4a6);let _0x439623=!0x1;if(void 0x0!==_0x2b528d&&_0x1a5f95['context']!==_0x2b528d&&(_0x1a5f95['context']=_0x2b528d,_0x439623=!0x0),void 0x0!==_0x4aa786&&_0x1a5f95['unlinkedAt']!==_0x4aa786&&(_0x1a5f95['unlinkedAt']=_0x4aa786,_0x439623=!0x0),_0x21d0bd&&!wt(_0x21d0bd,_0x1a5f95['attributes'])&&(_0x1a5f95['attributes']=_0x21d0bd,_0x439623=!0x0),!_0x439623)return Promise['resolve']();if(!_0x1a5f95['isSubmitted']||_0x53befc||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x32c83f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5a0848}=_0x1a5f95,_0x49d3de=_0x32c83f['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x5a0848,'threadId':_0x59e4a6,'context':_0x2b528d,'unlinkedAt':_0x4aa786,'attributes':_0x21d0bd})['then'](()=>_0x32c83f['remove'](_0x49d3de))['catch'](_0x2f0d1b=>{throw console['error'](_0x2f0d1b),new _0x167eaf('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x1eeb7e){const _0x538d9d=this['context']['plugins']['get'](O),_0xf338b6=this['getCommentThread'](_0x1eeb7e);if(_0xf338b6['_isAttached']=!0x1,this['_threadToController']['has'](_0xf338b6)){const _0x5cfc79=this['_threadToController']['get'](_0xf338b6),_0xa6a350=_0x5cfc79['view'],_0x58a4b0=_0x538d9d['getByInnerView'](_0xa6a350);this['_threadToController']['delete'](_0xf338b6),this['_viewToController']['delete'](_0xa6a350),_0x58a4b0&&_0x538d9d['remove'](_0x58a4b0),_0x5cfc79['destroy'](),_0xa6a350['destroy']()['then'](()=>{this['_unbindEditors'](_0xa6a350);});}}['_updateActiveAnnotation']({threadId:_0x29b59d,resolvedAt:_0x364044,unlinkedAt:_0x1624b0}){const _0x35d95d=!!_0x364044,_0x5526e7=this['context']['plugins']['get'](O),_0x38cb1d=this['getCommentThread'](_0x29b59d);if(this['_threadToController']['has'](_0x38cb1d)){const _0x19d9f2=this['_threadToController']['get'](_0x38cb1d)['view'],_0x1ba1f5=_0x5526e7['getByInnerView'](_0x19d9f2);_0x1ba1f5&&(_0x35d95d&&_0x5526e7['_removeActiveAnnotation'](_0x1ba1f5),_0x1624b0?_0x1ba1f5['isVisible']=!0x1:_0x1ba1f5['refreshVisibility']());}}['_getExternalAuthor'](_0x59b3f9){const _0x597241=this['context']['plugins']['get'](it),_0x193d51=pt('external:'+_0x59b3f9),_0x11a7dc=_0x597241['getUser'](_0x193d51);return _0x11a7dc||_0x597241['addUser']({'id':_0x193d51,'name':_0x59b3f9});}['_createNewComment']({threadId:_0x5c88d4,commentId:_0x452937=_0x1ddcfe(),content:_0x35928d,authorId:_0x28dd3c,createdAt:_0x43f2f4,attributes:_0x498c84}){if('string'!=typeof _0x452937)throw new _0x167eaf('commentsrepository-invalid-commentid');if('string'!=typeof _0x28dd3c)throw new _0x167eaf('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x35928d||!_0x35928d['trim']())throw new _0x167eaf('commentsrepository-invalid-comment-content');const _0x46b726=this['context']['plugins']['get'](it)['getUser'](_0x28dd3c);if(!_0x46b726)throw new _0x167eaf('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x28dd3c});let _0x207e68=null,_0x29f648=_0x43f2f4;return _0x498c84?.['@external']&&(_0x207e68=this['_getExternalAuthor'](_0x498c84['@external']['authorName']),_0x29f648=new Date(_0x498c84['@external']['createdAt'])),new fi(this,{'threadId':_0x5c88d4,'id':_0x452937,'author':_0x207e68||_0x46b726,'creator':_0x46b726,'content':_0x35928d,'createdAt':_0x43f2f4,'authoredAt':_0x29f648,'attributes':_0x498c84});}['_addComment'](_0x314cd1){let {threadId:_0x89bc21,content:_0x45abfd,attributes:_0x3a7dc4,isFromAdapter:_0x58ece4}=_0x314cd1;const _0x3b4000=this['getCommentThread'](_0x314cd1['threadId']);if(!_0x3b4000)throw new _0x167eaf('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x497f31=this['_createNewComment'](_0x314cd1),{id:_0x596dc9}=_0x497f31;if(_0x3b4000['_add'](_0x497f31),_0x58ece4||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x3b4000['isSubmitted'])return Promise['resolve']();const _0x55260b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x55623c}=_0x3b4000,_0xb44c42=_0x55260b['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x3a7dc4||(_0x3a7dc4={}),this['adapter']['addComment']({'channelId':_0x55623c,'threadId':_0x89bc21,'commentId':_0x596dc9,'content':_0x45abfd,'attributes':_0x3a7dc4})['then'](_0x5780a5=>{_0x55260b['remove'](_0xb44c42),_0x5780a5&&this['_updateComment']({'channelId':_0x55623c,'threadId':_0x89bc21,'commentId':_0x596dc9,'createdAt':_0x5780a5['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x39fdb3=>{throw console['error'](_0x39fdb3),new _0x167eaf('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x2c1c5f,commentId:_0x134c40,content:_0x4bd8f2,createdAt:_0x10d2a6,attributes:_0x2f58ba,isFromAdapter:_0x2d288c}){if(void 0x0!==_0x4bd8f2&&('string'!=typeof _0x4bd8f2||!_0x4bd8f2['trim']()['length']))throw new _0x167eaf('commentsrepository-update-comment-invalid-content');const _0x275afe=this['getCommentThread'](_0x2c1c5f),_0x1e9688=_0x275afe['getComment'](_0x134c40);if(!_0x1e9688)throw new _0x167eaf('commentsrepository-update-missing-comment',this);let _0x4faff4=!0x1;if(_0x4bd8f2&&_0x4bd8f2!==_0x1e9688['content']&&(_0x1e9688['isEditable']||_0x2d288c)&&(_0x1e9688['content']=_0x4bd8f2,_0x4faff4=!0x0),_0x10d2a6&&_0x10d2a6!==_0x1e9688['createdAt']&&(_0x1e9688['createdAt']=_0x10d2a6,_0x1e9688['attributes']&&_0x1e9688['attributes']['@external']||(_0x1e9688['authoredAt']=_0x10d2a6),_0x4faff4=!0x0),_0x2f58ba&&!wt(_0x2f58ba,_0x1e9688['attributes'])&&(_0x1e9688['attributes']=_0x2f58ba,_0x4faff4=!0x0),!_0x4faff4)return Promise['resolve']();if(_0x275afe['fire']('commentUpdated'),_0x2d288c||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x219e54=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3d7ebe}=this['getCommentThread'](_0x1e9688['threadId']),_0xcca5b3=_0x219e54['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x3d7ebe,'threadId':_0x2c1c5f,'commentId':_0x134c40,'content':_0x4bd8f2,'attributes':_0x2f58ba})['then'](()=>_0x219e54['remove'](_0xcca5b3))['catch'](_0x11ef8f=>{throw console['error'](_0x11ef8f),new _0x167eaf('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x128de7,commentId:_0x1a1c1c,isFromAdapter:_0xad5a77}){const _0x322397=this['getCommentThread'](_0x128de7),_0x354739=_0x322397['getComment'](_0x1a1c1c);if(!_0x354739)throw new _0x167eaf('commentsrepository-remove-missing-comment',this);if(_0x322397['_remove'](_0x354739),_0xad5a77||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x38673c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5dbf1d}=_0x322397,_0x2e66aa=_0x38673c['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x5dbf1d,'threadId':_0x128de7,'commentId':_0x1a1c1c})['then'](()=>_0x38673c['remove'](_0x2e66aa))['catch'](_0x1bd71f=>{throw console['error'](_0x1bd71f),new _0x167eaf('commentsrepository-remove-comment-internal-error',this);});}}class ui extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x4a1ea7(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x261897,_0xf37174){super();const _0x465d24=_0x261897['context']['plugins']['get'](it)['me'],_0x3aea47=_0x261897['getCommentThread'](_0xf37174['threadId']),_0x2d2581=0x0===_0x3aea47['comments']['length'],_0x28322a=_0x465d24===_0xf37174['author'];this['id']=_0xf37174['id'],this['threadId']=_0xf37174['threadId'],this['author']=_0xf37174['author'],this['creator']=_0xf37174['creator'],this['isExternal']=Boolean(_0xf37174['attributes']&&_0xf37174['attributes']['@external']),this['set']('content',_0xf37174['content']),this['createdAt']=_0xf37174['createdAt']||new Date(),this['set']('authoredAt',_0xf37174['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x3aea47,'resolvedAt'),this['set']('attributes',_0xf37174['attributes']||{}),this['bind']('isEditable')['to'](_0x261897,'_permissions',()=>{const _0x4f69ff=_0x261897['getPermissions'](_0x3aea47['channelId'])['write'],_0xe07f63=_0x261897['getPermissions'](_0x3aea47['channelId'])['modifyAll'];return _0x28322a&&_0x4f69ff||!_0x28322a&&_0xe07f63;}),this['bind']('isRemovable')['to'](_0x3aea47,'isRemovable',_0x261897,'_permissions',_0x4282c7=>{const _0x54675a=_0x261897['getPermissions'](_0x3aea47['channelId'])['write'],_0x51c110=_0x261897['getPermissions'](_0x3aea47['channelId'])['modifyAll'];return _0x28322a&&_0x54675a||_0x4282c7&&_0x2d2581||!_0x28322a&&_0x51c110&&!_0x2d2581;}),this['bind']('isReadOnly')['to'](_0x3aea47,'isReadOnly'),this['_repository']=_0x261897;}get['weight'](){return Math['max'](function(_0x10c315){const _0x4be5ea=document['createElement']('div');return _0x4be5ea['innerHTML']=_0x10c315,_0x4be5ea['textContent']['length'];}(this['content']),0xc8);}['update'](_0x5323cc){const {threadId:_0x1a10a9,id:_0x3ae35f}=this;if(!this['_repository']['hasCommentThread'](_0x1a10a9))throw new _0x167eaf('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x194e8e}=this['_repository']['getCommentThread'](_0x1a10a9);this['_repository']['fire'](bt('updateComment',_0x194e8e,_0x1a10a9),{'channelId':_0x194e8e,'threadId':_0x1a10a9,'commentId':_0x3ae35f,..._0x5323cc});}['setAttribute'](_0x2db2ad,_0x3d564a){const _0x5e35cd=It(this['attributes']);At(_0x5e35cd,_0x2db2ad,_0x3d564a),this['update']({'attributes':_0x5e35cd});}['removeAttribute'](_0x37620a){const _0x2c5cff=It(this['attributes']);yt(_0x2c5cff,_0x37620a),this['update']({'attributes':_0x2c5cff});}['remove'](_0x2767ee={}){if(!_0x2767ee['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x494a6c,id:_0x3211fb}=this;if(!this['_repository']['hasCommentThread'](_0x494a6c))throw new _0x167eaf('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x116f1e}=this['_repository']['getCommentThread'](_0x494a6c);this['_repository']['fire'](bt('removeComment',_0x116f1e,_0x494a6c),{'channelId':_0x116f1e,'threadId':_0x494a6c,'commentId':_0x3211fb,..._0x2767ee});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0x412d59,..._0xf415ef){for(const _0x135bb0 of _0xf415ef)void 0x0!==_0x135bb0&&(_0x412d59+=':'+String(_0x135bb0));return _0x412d59;}class J extends _0x3fcef6{['refresh'](){const _0x1f6b8d=this['editor']['model']['document']['selection'];for(const _0x36349e of _0x1f6b8d['getRanges']())if(this['_hasContent'](_0x36349e))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x1ef97a=_0x1ddcfe()}={}){const _0x108fa8=this['editor']['model'],_0x4ce335=[];for(const _0x1f6236 of _0x108fa8['document']['selection']['getRanges']())this['_hasContent'](_0x1f6236)&&_0x4ce335['push'](this['_trimToContent'](_0x1f6236));_0x108fa8['change'](_0x3289de=>{for(const _0x3b65f2 of _0x4ce335){const _0x1d8940=_0x1ddcfe()['substr'](0x1,0x5),_0x15e391='comment:'+_0x1ef97a+':'+_0x1d8940;_0x3289de['addMarker'](_0x15e391,{'range':_0x3b65f2,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x56e05f){for(const _0x3080ca of _0x56e05f['getItems']())if(this['_itemIsContent'](_0x3080ca))return!0x0;return!0x1;}['_itemIsContent'](_0x196652){return _0x196652['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x196652)&&!_0x196652['is']('element','tableCell');}['_trimToContent'](_0x811d30){const _0x5d2b7f=_0x2441d6=>!this['_itemIsContent'](_0x2441d6['item']),_0x110b9a=_0x811d30['start']['getLastMatchingPosition'](_0x5d2b7f),_0x52cbc7=_0x811d30['end']['getLastMatchingPosition'](_0x5d2b7f,{'direction':'backward'});return this['editor']['model']['createRange'](_0x110b9a,_0x52cbc7);}}class P extends _0x599ac2{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[O];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x353a9a){super(_0x353a9a),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x191b06=this['editor'],_0x22f341=_0x191b06['model']['document']['selection'],_0x225ee5=_0x41a349(()=>this['refreshSelectedViews'](),0xa);_0x22f341['on']('change:range',(_0x5105ee,_0x185600)=>{_0x185600['directChange']&&(_0x225ee5['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x191b06['editing']['view']['document'],'change:isFocused',(_0x5a0ba9,_0x3bbb0c,_0x28cce7)=>{_0x28cce7&&_0x225ee5();}),this['listenTo'](_0x191b06['ui']['focusTracker'],'change:isFocused',(_0x3de478,_0xdd7f99,_0x2291e0)=>{_0x2291e0||_0x191b06['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x2169b7=>this['_editorAnnotationsData']['has'](_0x2169b7['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x3f2336){if(this['_editorAnnotations']['has'](_0x3f2336['view']))return;this['_editorAnnotations']['add'](_0x3f2336['view']),this['editor']['ui']['focusTracker']['add'](_0x3f2336['view']['element']);const _0x3eaccf=this['editor']['plugins']['get'](O);this['listenTo'](_0x3eaccf['collection'],'remove',(_0x1bc4e0,_0x1c5482)=>{this['editor']['ui']['focusTracker']['remove'](_0x1c5482['view']['element']),this['_editorAnnotations']['delete'](_0x1c5482['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x5978d3){if('function'!=typeof _0x5978d3)throw new _0x167eaf('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x5978d3);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x49d129,annotations:_0x1643fb}){const _0x44f2d7=[],_0x413c13=this['editor']['model']['document']['selection'],_0x2eee24=Array['from'](_0x413c13['getRanges']());for(const [_0x63119e,_0x14467c]of this['_editorAnnotationsData']){const _0x45f089=_0x330c2b(_0x14467c),_0x410fe1=_0x1643fb['getByInnerView'](_0x63119e);_0x45f089&&_0x410fe1&&_0x44f2d7['push']({'annotation':_0x410fe1,'range':_0x45f089});}function _0x330c2b(_0x193199){for(const _0x4c0cda of _0x193199)for(const _0x42c401 of _0x2eee24)if(_0x4c0cda['containsRange'](_0x42c401,!_0x413c13['isCollapsed']))return _0x4c0cda;return null;}return _0x44f2d7['sort']((_0x3709d4,_0x48759a)=>{const _0x142079=_0x3709d4['range'],_0xf41949=_0x48759a['range'];if(!_0x142079['isEqual'](_0xf41949)){if(_0x142079['containsRange'](_0xf41949,!0x0))return 0x1;if(_0xf41949['containsRange'](_0x142079,!0x0))return-0x1;}return _0x3709d4['annotation']==_0x49d129?-0x1:_0x48759a['annotation']==_0x49d129?0x1:0x0;})['map'](_0x2819a2=>_0x2819a2['annotation']);}get['_editorAnnotationsData'](){const _0x3e38be=new Map();for(const _0x180526 of Array['from'](this['_dataCollectors']))for(const [_0x2db46c,_0x174c4f]of _0x180526())_0x3e38be['set'](_0x2db46c,_0x174c4f);return _0x3e38be;}}class st extends _0x599ac2{['afterInit'](){const _0x38af18=this['editor'];if(!_0x38af18['plugins']['has']('RestrictedEditingModeEditing'))return;_0x38af18['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x599ac2{constructor(_0x4ef147){super(_0x4ef147),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x3baa0b=this['editor'],_0x1d6230=_0x3baa0b['commands']['get']('importWord'),_0x4ff45d=_0x3baa0b['plugins']['get'](it);_0x1d6230&&(_0x1d6230['on']('execute',(_0x5c0ca7,[,_0x2270f6])=>{_0x2270f6['collaboration_features']={'comments':!0x0,'user_id':_0x4ff45d['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x1d6230,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x10d0ae,_0x493269){const {comment_threads:_0x1926c7}=_0x493269;_0x1926c7&&_0x1926c7['forEach'](({thread_id:_0x54c8ec,comments:_0x5d90e7,is_resolved:_0x1d766f})=>{const _0x2a09d4=new Date(),_0x404aff=_0x5d90e7['map'](({author:_0x52bbe4,content:_0x2a7d3c,created_at:_0x36f35b})=>({'content':_0x2a7d3c,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x2a09d4,'attributes':{'@external':{'authorName':_0x52bbe4,'createdAt':_0x36f35b?new Date(_0x36f35b):new Date(),'source':'importWord'}}})),_0x499870=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x499870,'threadId':_0x54c8ec,'comments':_0x404aff,'resolvedAt':_0x1d766f?_0x2a09d4:null});});}}class at extends _0x599ac2{constructor(_0x125d35){super(_0x125d35),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x5c4fc0=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x5c4fc0,'contentInsertion',(_0x5d37d7,_0x345005)=>this['_removeMarkersWithoutThreads'](_0x345005['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x399e49){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x399e49;const _0x2ab344=this['editor']['plugins']['get']('CommentsRepository');for(const _0xbeee6b of _0x399e49['keys']()){const [_0x50c357,_0x5d01e1]=_0xbeee6b['split'](':');'comment'!=_0x50c357||_0x2ab344['hasCommentThread'](_0x5d01e1)||_0x399e49['delete'](_0xbeee6b);}return _0x399e49;}['_registerMarkerInClipboardPipeline'](){const _0x4daf3c=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x79514e=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x79514e&&_0x4daf3c['_registerMarkerToCopy']('comment',_0x79514e);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x55a514){switch(_0x55a514){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class ut extends _0x599ac2{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x5f2f53,_0x2ec9b4)=>{if(!_0x2ec9b4['options']['showCommentHighlights'])return null;if(_0x2ec9b4['options']['ignoreResolvedComments']){const {id:_0x28e50b}=er(_0x5f2f53['markerName']),_0x208f0e=this['editor']['plugins']['get'](o);if(_0x208f0e['getCommentThread'](_0x28e50b)?.['isResolved']&&_0x5f2f53['item'])return _0x2ec9b4['consumable']['consume'](_0x5f2f53['item'],'addMarker:'+_0x5f2f53['markerName']),_0x2ec9b4['consumable']['consume'](_0x5f2f53['item'],'removeMarker:'+_0x5f2f53['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x3ef4f6=>{_0x3ef4f6['on']('addMarker:comment',(_0xdac9e1,_0x287017,_0x34c86d)=>{if(!_0x34c86d['options']['showCommentHighlights'])return;const _0x1518a2=_0x287017['item'];if(!_0x1518a2)return;const _0x30b5a6=_0x34c86d['mapper']['toViewElement'](_0x1518a2);this['editor']['model']['schema']['isObject'](_0x1518a2)&&_0x30b5a6&&!_0x30b5a6['getCustomProperty']('widget')&&_0x30b5a6['is']('containerElement')&&_0x1690d4(_0x30b5a6,_0x34c86d['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x33d065,{writer:_0x14d4dc,options:_0x276f1c})=>{if(!_0x276f1c['showCommentHighlights'])return null;const _0x2a44e8=_0x14d4dc['createContainerElement']('div'),_0x33953=_0x14d4dc['createEmptyElement']('hr');return _0x14d4dc['addClass']('ck-horizontal-line',_0x2a44e8),_0x14d4dc['insert'](_0x14d4dc['createPositionAt'](_0x2a44e8,0x0),_0x33953),_0x2a44e8;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x28c9b4,{writer:_0x326d27,options:_0x47f3a1})=>{if(!_0x47f3a1['showCommentHighlights'])return null;const _0x2ec752=_0x326d27['createContainerElement']('span'),_0x3cb517=_0x326d27['createEmptyElement']('img');return _0x326d27['addClass']('image-inline',_0x2ec752),_0x326d27['insert'](_0x326d27['createPositionAt'](_0x2ec752,0x0),_0x3cb517),_0x2ec752;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x413612,{writer:_0x16efb1,options:_0x1644c9})=>{if(_0x1644c9['showCommentHighlights'])return _0x16efb1['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x26ec34,_0x1aa730,_0x294a39)=>{_0x294a39['options']['showCommentHighlights']&&_0x26ec34['stop']();},{'priority':'high'});}}class r extends _0x599ac2{static get['requires'](){return[o,P,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2f2524){super(_0x2f2524),this['set']('isThreadsLoadingPaused',!0x0),_0x2f2524['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x504ff6,_0x4953de,_0x4e0004,_0x332efd)=>{const _0x46f7df=_0x2f2524['plugins']['get'](o),_0x55a5ee=_0x4e0004?er(_0x4e0004)['id']:null;_0x2f2524['model']['change'](()=>{if(_0x55a5ee){const _0x367986=this['getAllMarkersForId'](_0x55a5ee);for(const _0x4939f4 of _0x367986)_0x2f2524['editing']['reconvertMarker'](_0x4939f4);}if(_0x332efd){const {id:_0x4e8a8e}=er(_0x332efd),_0x3da078=_0x46f7df['getCommentThread'](_0x4e8a8e);if(_0x3da078&&_0x3da078['unlinkedAt'])return;if(_0x3da078&&!_0x3da078['isAttached'])return;const _0x54d760=this['getAllMarkersForId'](_0x4e8a8e);for(const _0x4c7383 of _0x54d760)_0x2f2524['editing']['reconvertMarker'](_0x4c7383);}}),_0x55a5ee&&this['scrollToThreadMarker'](_0x55a5ee);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x4102bd=this['editor'],_0x50b936=_0x4102bd['plugins']['get'](o),_0x2a81b3=_0x4102bd['config']['get']('collaboration.channelId'),_0x8b0598=_0x50b936['getCommentThreads']()['filter'](_0x374f91=>_0x374f91['channelId']!==_0x2a81b3);_0x4102bd['commands']['add']('addCommentThread',new J(_0x4102bd)),this['listenTo'](_0x4102bd,'change:isReadOnly',(_0x4eb67b,_0x31907d,_0x21a6e6)=>{_0x50b936['switchReadOnly'](_0x21a6e6,_0x4102bd['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x50b936,ft('addCommentThread',_0x2a81b3),(_0x3bf421,{threadId:_0x824a34})=>{const _0xa0449e=this['editor']['plugins']['get'](o)['getCommentThread'](_0x824a34);_0xa0449e?.['unlinkedAt']&&this['_attachArchivedThread'](_0x824a34);}),this['listenTo'](_0x50b936,ft('removeCommentThread',_0x2a81b3),(_0x2befe9,{threadId:_0x1f06e0})=>{_0x4102bd['model']['enqueueChange']({'isUndoable':!0x1},_0x1af05a=>{const _0x346977=this['getAllMarkersForId'](_0x1f06e0);for(const _0x19d90e of _0x346977)_0x1af05a['removeMarker'](_0x19d90e);});}),this['listenTo'](_0x50b936,ft('resolveCommentThread',_0x2a81b3),(_0x55b597,{threadId:_0x2b7776})=>{(this['_reconvertMarkers'](_0x2b7776),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x2b7776)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x50b936,ft('reopenCommentThread',_0x2a81b3),(_0x3cd3c4,{threadId:_0x54d1e1})=>{this['_reconvertMarkers'](_0x54d1e1);},{'priority':'low'}),this['listenTo'](_0x50b936,ft('addComment',_0x2a81b3),(_0x19621d,{threadId:_0x68a915,isFromAdapter:_0x48c6fd})=>{const _0x2c92fd=this['getAllMarkersForId'](_0x68a915);if(_0x48c6fd||0x0==_0x2c92fd['length']||!_0x50b936['hasCommentThread'](_0x68a915))return;0x1===_0x50b936['getCommentThread'](_0x68a915)['length']&&_0x4102bd['model']['enqueueChange']({'isUndoable':!0x1},_0x120f2=>{for(const _0x1d2c2f of _0x2c92fd)_0x120f2['updateMarker'](_0x1d2c2f,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x8b0598);}['afterInit'](){!async function(_0x1e7f20){const _0x3ede8d=_0x4c9ed1([0x36,0x4f,0x66,0x55,0x50,0x49,0x6a,0x41,0x75,0x38,0x71,0x4d,0x62,0x56,0x42,0x4c,0x44,0x33,0x35,0x51,0x52,0x4b,0x32,0x79,0x74,0x39,0x67,0x53,0x70,0x65,0x64,0x6e,0x6c,0x69,0x5a,0x57,0x34,0x46,0x47,0x48,0x58,0x77,0x76,0x30,0x59,0x63,0x7a,0x73,0x6b,0x31,0x45,0x68,0x4a,0x6d,0x43,0x78,0x72,0x54,0x37,0x4e,0x61,0x6f]),_0x50ec53=0x4b21b64a,_0x33493c=0x4b26d13a^_0x50ec53,_0x3d5561=window[_0x4c9ed1([0x44,0x61,0x74,0x65])][_0x4c9ed1([0x6e,0x6f,0x77])](),_0x5e9576=_0x1e7f20[_0x4c9ed1([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x30c6a1=new window[(_0x4c9ed1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1007db=>{_0x5e9576[_0x4c9ed1([0x6f,0x6e,0x63,0x65])](_0x4c9ed1([0x72,0x65,0x61,0x64,0x79]),_0x1007db);}),_0x276561={[_0x4c9ed1([0x6b,0x74,0x79])]:_0x4c9ed1([0x45,0x43]),[_0x4c9ed1([0x75,0x73,0x65])]:_0x4c9ed1([0x73,0x69,0x67]),[_0x4c9ed1([0x63,0x72,0x76])]:_0x4c9ed1([0x50,0x2d,0x32,0x35,0x36]),[_0x4c9ed1([0x78])]:_0x4c9ed1([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]),[_0x4c9ed1([0x79])]:_0x4c9ed1([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]),[_0x4c9ed1([0x61,0x6c,0x67])]:_0x4c9ed1([0x45,0x53,0x32,0x35,0x36])},_0xe5e143=_0x5e9576[_0x4c9ed1([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4c9ed1([0x67,0x65,0x74])](_0x4c9ed1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3b3f34(){let _0x2e9ef3,_0x48b199=null,_0x5e0c6a=null;try{if(_0xe5e143==_0x4c9ed1([0x47,0x50,0x4c]))return _0x4c9ed1([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2e9ef3=_0x497433(),!_0x2e9ef3)return _0x4c9ed1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2e9ef3[_0x4c9ed1([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5e0c6a=_0x210246(_0x2e9ef3[_0x4c9ed1([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2e9ef3[_0x4c9ed1([0x6a,0x74,0x69])])),await _0x1281f2()?_0x49de67()?_0x4749e9()?_0x4c9ed1([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x34b8cc()?(_0x2e9ef3[_0x4c9ed1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4c9ed1([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x48b199=_0x3dd12d(_0x4c9ed1([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2e9ef3[_0x4c9ed1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4c9ed1([0x74,0x72,0x69,0x61,0x6c])&&(_0x48b199=_0x3dd12d(_0x4c9ed1([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2f0595()):_0x4c9ed1([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4c9ed1([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4c9ed1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x420b63){return _0x4c9ed1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4749e9(){const _0x4826ce=[_0x4c9ed1([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4c9ed1([0x74,0x72,0x69,0x61,0x6c])][_0x4c9ed1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2e9ef3[_0x4c9ed1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x3d5561/0x3e8:0xe10*_0x33493c;return _0x2e9ef3[_0x4c9ed1([0x65,0x78,0x70])]<_0x4826ce;}function _0x49de67(){const _0x2a4110=_0x2e9ef3[_0x4c9ed1([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x2a4110)return!0x1;if(_0x2a4110[_0x4c9ed1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c9ed1([0x2a])))return!0x0;if(_0x2a4110[_0x4c9ed1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c9ed1([0x43,0x4d,0x54])))return!0x0;if(_0x2a4110[_0x4c9ed1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c9ed1([0x52,0x43,0x4d,0x54]))){if(_0x58120e())return!0x0;if(_0x230539()||_0x3b1fe2())return!0x0;}return!0x1;}function _0x34b8cc(){const _0x57ed67=_0x2e9ef3[_0x4c9ed1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x57ed67||0x0==_0x57ed67[_0x4c9ed1([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4526f7}=new URL(window[_0x4c9ed1([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x57ed67[_0x4c9ed1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4526f7))return!0x0;const _0x3e3695=_0x4526f7[_0x4c9ed1([0x73,0x70,0x6c,0x69,0x74])](_0x4c9ed1([0x2e]));return _0x57ed67[_0x4c9ed1([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1f3405=>_0x1f3405[_0x4c9ed1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c9ed1([0x2a])))[_0x4c9ed1([0x6d,0x61,0x70])](_0x457f7d=>_0x457f7d[_0x4c9ed1([0x73,0x70,0x6c,0x69,0x74])](_0x4c9ed1([0x2e])))[_0x4c9ed1([0x73,0x6f,0x6d,0x65])](_0x54e936=>_0x3e3695[_0x4c9ed1([0x65,0x76,0x65,0x72,0x79])]((_0x283b95,_0x18474e)=>_0x54e936[_0x18474e]===_0x283b95||_0x54e936[_0x18474e]===_0x4c9ed1([0x2a])));}function _0x2f0595(){return _0x48b199&&_0x5e0c6a?new window[(_0x4c9ed1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1922fb,_0x7367da)=>{_0x48b199[_0x4c9ed1([0x74,0x68,0x65,0x6e])](_0x1922fb,_0x7367da),_0x5e0c6a[_0x4c9ed1([0x74,0x68,0x65,0x6e])](_0x1affbb=>{_0x1affbb!=_0x4c9ed1([0x56,0x61,0x6c,0x69,0x64])&&_0x1922fb(_0x1affbb);},_0x7367da);}):_0x48b199||_0x5e0c6a||_0x4c9ed1([0x56,0x61,0x6c,0x69,0x64]);}}function _0x210246(_0x2165fd,_0x50dc23){return new window[(_0x4c9ed1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1f2d68=>{if(_0x22f8bc())return _0x1f2d68(_0x4c9ed1([0x56,0x61,0x6c,0x69,0x64]));_0x57ba3f(),_0x5e9576[_0x4c9ed1([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4c9ed1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x24cb95=!0x1;const _0x453b7c=_0x1ddcfe();function _0x5026c9(_0x5bdb13){return!!_0x5bdb13&&(typeof _0x5bdb13===_0x4c9ed1([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5bdb13===_0x4c9ed1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5bdb13[_0x4c9ed1([0x74,0x68,0x65,0x6e])]===_0x4c9ed1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5bdb13[_0x4c9ed1([0x63,0x61,0x74,0x63,0x68])]===_0x4c9ed1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x15c02c(_0x30d2bb){_0x5a497a(_0x30d2bb)[_0x4c9ed1([0x74,0x68,0x65,0x6e])](_0x29795a=>{if(!_0x29795a||_0x29795a[_0x4c9ed1([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4c9ed1([0x6f,0x6b]))return _0x4c9ed1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3cfd2b(_0x4855c6(_0x453b7c+_0x50dc23))!=_0x29795a[_0x4c9ed1([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4c9ed1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4c9ed1([0x56,0x61,0x6c,0x69,0x64]);})[_0x4c9ed1([0x74,0x68,0x65,0x6e])](_0x32a94a=>(_0x130a2a(),_0x32a94a),()=>{const _0x2a054a=_0x35c6fa();return null==_0x2a054a?(_0x130a2a(),_0x4c9ed1([0x56,0x61,0x6c,0x69,0x64])):_0x4c9ed1(_0x3d5561-_0x2a054a>(0x6f2d324a^_0x50ec53)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4c9ed1([0x74,0x68,0x65,0x6e])](_0x1f2d68)[_0x4c9ed1([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1f2d68(_0x4c9ed1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xd6dbf4=0x4b1758ca^_0x50ec53;function _0x130a2a(){const _0x5cf540=_0x4c9ed1([0x6c,0x6c,0x63,0x74,0x2d])+_0x3cfd2b(_0x4855c6(_0x2165fd)),_0x169328=_0xa5b738(_0x3cfd2b(window[_0x4c9ed1([0x4d,0x61,0x74,0x68])][_0x4c9ed1([0x63,0x65,0x69,0x6c])](_0x3d5561/_0xd6dbf4)));window[_0x4c9ed1([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4c9ed1([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5cf540,_0x169328);}function _0x35c6fa(){const _0x4f8063=_0x4c9ed1([0x6c,0x6c,0x63,0x74,0x2d])+_0x3cfd2b(_0x4855c6(_0x2165fd)),_0x710ea5=window[_0x4c9ed1([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4c9ed1([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4f8063);return _0x710ea5?window[_0x4c9ed1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xa5b738(_0x710ea5),0x10)*_0xd6dbf4:null;}function _0x5a497a(_0x535fea){return new window[(_0x4c9ed1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4dfedb,_0x55178b)=>{_0x535fea[_0x4c9ed1([0x74,0x68,0x65,0x6e])](_0x4dfedb,_0x55178b),window[_0x4c9ed1([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x55178b,0x4b20628a^_0x50ec53);});}}_0x5e9576[_0x4c9ed1([0x6f,0x6e])](_0x4c9ed1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x52bd97,_0x36afe4)=>{if(_0x36afe4[0x0]!=_0x2165fd)return _0x1f2d68(_0x4c9ed1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x36afe4[0x1]={..._0x36afe4[0x1],[_0x4c9ed1([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x453b7c};},{[_0x4c9ed1([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4c9ed1([0x68,0x69,0x67,0x68])}),_0x5e9576[_0x4c9ed1([0x6f,0x6e])](_0x4c9ed1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x358ec8=>{_0x5026c9(_0x358ec8[_0x4c9ed1([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x24cb95=!0x0,_0x15c02c(_0x358ec8[_0x4c9ed1([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4c9ed1([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4c9ed1([0x6c,0x6f,0x77])}),_0x30c6a1[_0x4c9ed1([0x74,0x68,0x65,0x6e])](()=>{_0x24cb95||_0x1f2d68(_0x4c9ed1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x22f8bc(){return _0x5e9576[_0x4c9ed1([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4c9ed1([0x76,0x69,0x65,0x77])][_0x4c9ed1([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4c9ed1([0x61,0x75,0x74,0x6f]);}function _0x57ba3f(){_0x5e9576[_0x4c9ed1([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4c9ed1([0x76,0x69,0x65,0x77])][_0x4c9ed1([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4c9ed1([0x61,0x75,0x74,0x6f]);}}function _0x3dd12d(_0x3abdcd){const _0x2d5704=[new window[(_0x4c9ed1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x560f69=>setTimeout(_0x560f69,0x4b288886^_0x50ec53)),_0x30c6a1[_0x4c9ed1([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4c9ed1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x16d590=>{let _0x41712a=0x0;_0x5e9576[_0x4c9ed1([0x6d,0x6f,0x64,0x65,0x6c])][_0x4c9ed1([0x6f,0x6e])](_0x4c9ed1([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x5cbcbd,_0x3cef50)=>{_0x3cef50[0x0][_0x4c9ed1([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x41712a++,_0x41712a==(0x4b21b7b2^_0x50ec53)&&(_0x16d590(),_0x5cbcbd[_0x4c9ed1([0x6f,0x66,0x66])]());});}))];return window[_0x4c9ed1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4c9ed1([0x72,0x61,0x63,0x65])](_0x2d5704)[_0x4c9ed1([0x74,0x68,0x65,0x6e])](()=>_0x3abdcd);}async function _0x530fab(){await _0x30c6a1,_0x5e9576[_0x4c9ed1([0x6d,0x6f,0x64,0x65,0x6c])][_0x4c9ed1([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x37c2ca,_0x5e9576[_0x4c9ed1([0x6d,0x6f,0x64,0x65,0x6c])][_0x4c9ed1([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x37c2ca,_0x5e9576[_0x4c9ed1([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4c9ed1([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x58120e(){return _0x8037bd(_0x4c9ed1([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x436fa1(_0x4c9ed1([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x4c9ed1([0x73,0x74,0x61,0x74,0x65])]==_0x4c9ed1([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x230539(){return _0x8037bd(_0x4c9ed1([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 _0x3b1fe2(){return _0x8037bd(_0x4c9ed1([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x4a0bf5(_0x2ffe45){const _0x27c0f6=_0x17934e();_0x5e9576[_0x27c0f6]=_0x4c9ed1([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2ffe45,_0x2ffe45!=_0x4c9ed1([0x56,0x61,0x6c,0x69,0x64])&&_0x530fab();}function _0x17934e(){const _0x14cd49=window[_0x4c9ed1([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4c9ed1([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4c9ed1([0x6e,0x6f,0x77])]())[_0x4c9ed1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4c9ed1([0x2e]),'');let _0x13fbaf=_0x4c9ed1([0x4f]);for(let _0x24008c=0x0;_0x24008c<_0x14cd49[_0x4c9ed1([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x24008c+=0x2){let _0x460780=window[_0x4c9ed1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x14cd49[_0x4c9ed1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x24008c,_0x24008c+0x2));_0x460780>=_0x3ede8d[_0x4c9ed1([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x460780-=_0x3ede8d[_0x4c9ed1([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x13fbaf+=_0x3ede8d[_0x460780];}return _0x13fbaf;}function _0x497433(){const _0x94183c=_0xe5e143[_0x4c9ed1([0x73,0x70,0x6c,0x69,0x74])](_0x4c9ed1([0x2e]));if(0x3!=_0x94183c[_0x4c9ed1([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x706092(_0x94183c[0x1]);function _0x706092(_0x910e5b){const _0x226f6f=_0x31371(_0x910e5b);return _0x226f6f&&_0x3a695b()?_0x226f6f:null;function _0x3a695b(){const _0x15dd01=_0x226f6f[_0x4c9ed1([0x6a,0x74,0x69])],_0x4f2e15=window[_0x4c9ed1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x15dd01[_0x4c9ed1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x15dd01[_0x4c9ed1([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1b9031={..._0x226f6f,[_0x4c9ed1([0x6a,0x74,0x69])]:_0x15dd01[_0x4c9ed1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x15dd01[_0x4c9ed1([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1b9031[_0x4c9ed1([0x76,0x63])],_0x4855c6(_0x1b9031)==_0x4f2e15;}}}async function _0x1281f2(){let _0x5465c9=!0x0;try{const _0x2aa1b2=_0xe5e143[_0x4c9ed1([0x73,0x70,0x6c,0x69,0x74])](_0x4c9ed1([0x2e])),[_0x23c19a,_0x376fdb,_0x53fa11]=_0x2aa1b2;return _0xb65da2(_0x23c19a),await _0x21563e(_0x23c19a,_0x376fdb,_0x53fa11),_0x5465c9;}catch(_0x545d2c){return!0x1;}function _0xb65da2(_0x539e96){const _0x38d63b=_0x31371(_0x539e96);_0x38d63b&&_0x38d63b[_0x4c9ed1([0x61,0x6c,0x67])]==_0x4c9ed1([0x45,0x53,0x32,0x35,0x36])||(_0x5465c9=!0x1);}async function _0x21563e(_0xcdf07c,_0x54db78,_0x42f128){const _0x586f9c=window[_0x4c9ed1([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4c9ed1([0x66,0x72,0x6f,0x6d])](_0x33725b(_0x42f128),_0x2c7b39=>_0x2c7b39[_0x4c9ed1([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x187630=new window[(_0x4c9ed1([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4c9ed1([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0xcdf07c+_0x4c9ed1([0x2e])+_0x54db78),_0x2bb23b=window[_0x4c9ed1([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4c9ed1([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x2bb23b)return;const _0x599c31=await _0x2bb23b[_0x4c9ed1([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4c9ed1([0x6a,0x77,0x6b]),_0x276561,{[_0x4c9ed1([0x6e,0x61,0x6d,0x65])]:_0x4c9ed1([0x45,0x43,0x44,0x53,0x41]),[_0x4c9ed1([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4c9ed1([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4c9ed1([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x2bb23b[_0x4c9ed1([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4c9ed1([0x6e,0x61,0x6d,0x65])]:_0x4c9ed1([0x45,0x43,0x44,0x53,0x41]),[_0x4c9ed1([0x68,0x61,0x73,0x68])]:{[_0x4c9ed1([0x6e,0x61,0x6d,0x65])]:_0x4c9ed1([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x599c31,_0x586f9c,_0x187630)||(_0x5465c9=!0x1);}}function _0x31371(_0x3c257e){return _0x3c257e[_0x4c9ed1([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4c9ed1([0x65,0x79]))?JSON[_0x4c9ed1([0x70,0x61,0x72,0x73,0x65])](_0x33725b(_0x3c257e)):null;}function _0x33725b(_0x4cdb3b){return window[_0x4c9ed1([0x61,0x74,0x6f,0x62])](_0x4cdb3b[_0x4c9ed1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4c9ed1([0x2b]))[_0x4c9ed1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4c9ed1([0x2f])));}function _0x4855c6(_0x4b49a7){let _0x319c67=0x1505;function _0xaf3dc3(_0x213b99){for(let _0x46c192=0x0;_0x46c192<_0x213b99[_0x4c9ed1([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x46c192++){const _0x547414=_0x213b99[_0x4c9ed1([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x46c192);_0x319c67=(_0x319c67<<0x5)+_0x319c67+_0x547414,_0x319c67&=_0x319c67;}}function _0x3098ba(_0x50cf12){Array[_0x4c9ed1([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x50cf12)?_0x50cf12[_0x4c9ed1([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3098ba):_0x50cf12&&typeof _0x50cf12==_0x4c9ed1([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4c9ed1([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x50cf12)[_0x4c9ed1([0x73,0x6f,0x72,0x74])]()[_0x4c9ed1([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x9f2b05,_0x3d7687])=>{_0xaf3dc3(_0x9f2b05),_0x3098ba(_0x3d7687);}):_0xaf3dc3(window[_0x4c9ed1([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x50cf12));}return _0x3098ba(_0x4b49a7),_0x319c67>>>0x0;}function _0x3cfd2b(_0x163788){return _0x163788[_0x4c9ed1([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4c9ed1([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4c9ed1([0x30]));}function _0xa5b738(_0x1d0dfb){return _0x1d0dfb[_0x4c9ed1([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4c9ed1([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4c9ed1([0x6a,0x6f,0x69,0x6e])]('');}function _0x8037bd(_0x3ee2de){return _0x5e9576[_0x4c9ed1([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4c9ed1([0x68,0x61,0x73])](_0x3ee2de);}function _0x436fa1(_0x59c77a){return _0x5e9576[_0x4c9ed1([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4c9ed1([0x67,0x65,0x74])](_0x59c77a);}function _0x37c2ca(){}function _0x4c9ed1(_0x1fd390){return _0x1fd390['map'](_0x3238cc=>String['fromCharCode'](_0x3238cc))['join']('');}_0x4a0bf5(await _0x3b3f34());}(this);}['destroy'](){const _0x42ebe1=this['editor']['plugins']['get'](o),_0x2c99bf=this['editor']['config']['get']('collaboration.channelId');for(const _0x5569e2 of _0x42ebe1['getCommentThreads']({'channelId':_0x2c99bf}))_0x42ebe1['_detachCommentThread'](_0x5569e2['id']),_0x42ebe1['_threads']['delete'](_0x5569e2['id']);super['destroy']();}['hasMarkerForId'](_0x59b56a){return this['getAllMarkersForId'](_0x59b56a)['length']>0x0;}['getAllMarkersForId'](_0x197a98){const _0x2ae34c=[];for(const _0x46ec60 of this['editor']['model']['markers'])_0x46ec60['name']['startsWith']('comment:'+_0x197a98)&&_0x2ae34c['push'](_0x46ec60);return _0x2ae34c;}['scrollToThreadMarker'](_0x29a45a){const _0x6e6d2e=this['_getTargetForId'](_0x29a45a);_0x6e6d2e&&setTimeout(()=>{this['activeMarker']&&er(this['activeMarker'])['id']===_0x29a45a&&rt({'target':_0x6e6d2e[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x1bcbab){this['editor']['model']['change'](()=>{for(const _0x3be0fa of this['getAllMarkersForId'](_0x1bcbab))this['editor']['editing']['reconvertMarker'](_0x3be0fa);});}['_attachArchivedThread'](_0x3666e7){const _0x5be4c8=this['editor']['plugins']['get'](o),_0x49094b=this['editor']['plugins']['get'](P),_0x3d6a0c=_0x5be4c8['getCommentThread'](_0x3666e7);if(!_0x3d6a0c['isAttached']){const _0x150eac=_0x3d6a0c['attachTo'](()=>this['_getTargetForId'](_0x3d6a0c['id']));_0x49094b['registerAnnotation'](_0x150eac),_0x3d6a0c['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x5419c9=this['editor'],_0x21ecc6=_0x5419c9['plugins']['get'](it);_0x5419c9['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x3274b7,_0x491693)=>{const {id:_0x4e114a}=er(_0x3274b7['markerName']),_0x43124d=_0x5419c9['plugins']['get'](o)['getCommentThread'](_0x4e114a),_0xfd006a=this['activeMarker']&&er(this['activeMarker'])['id']===_0x4e114a;let _0x498117;if(_0x43124d&&_0x43124d['isResolved']&&!_0xfd006a&&_0x3274b7['item'])return _0x491693['consumable']['consume'](_0x3274b7['item'],'addMarker:'+_0x3274b7['markerName']),_0x491693['consumable']['consume'](_0x3274b7['item'],'removeMarker:'+_0x3274b7['markerName']),null;const _0x1a4d4=['ck-comment-marker'];return _0xfd006a&&_0x1a4d4['push']('ck-comment-marker--active'),_0x498117=_0x43124d?.['length']?_0x43124d['comments']['first']['author']['id']:_0x21ecc6['me']['id'],{'classes':_0x1a4d4,'attributes':{'data-comment':_0x4e114a,'data-author-id':_0x498117}};}}),_0x5419c9['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x594b0e,{options:_0xa2225})=>{if(_0xa2225['showCommentHighlights'])return null;const _0x27c6da=_0x5419c9['plugins']['get'](o),_0x5cd5f7=_0x5419c9['model']['markers']['get'](_0x594b0e),{id:_0x49ddec,part:_0x2749e9}=er(_0x594b0e);return _0x5cd5f7&&!_0x5cd5f7['affectsData']||_0xa2225['ignoreResolvedComments']&&_0x27c6da['getCommentThread'](_0x49ddec)?.['isResolved']?null:{'group':'comment','name':_0x2749e9?_0x49ddec+':'+_0x2749e9:_0x49ddec};}}),_0x5419c9['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x3f1df8,{writer:_0x9736f6})=>_0x9736f6['createElement']('$marker',{'data-name':'comment:'+_0x3f1df8['getAttribute']('id')})}),_0x5419c9['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x5dd974=this['editor'],_0x2d5dfd=_0x5dd974['plugins']['get'](o),_0x52183a=new Set(),_0x3d08f3=new Set();_0x5dd974['model']['document']['registerPostFixer'](_0x147254=>{let _0x57826e=!0x1;for(const {name:_0x29afe8,data:_0x3c7610}of _0x5dd974['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3d382f,id:_0x4073f6}=er(_0x29afe8);let _0x3ba360=_0x3c7610['newRange'];if('comment'!==_0x3d382f||!_0x3ba360)continue;const _0x334f69='$graveyard'===_0x3ba360['root']['rootName'];_0x334f69||(_0x3ba360=dt(_0x3ba360,_0x5dd974['model']),!_0x3ba360||_0x3ba360['isCollapsed']||!_0x3c7610['newRange']||_0x3ba360['isEqual'](_0x3c7610['newRange']))?_0x5dd974['model']['hasContent'](_0x3ba360)&&!_0x334f69?this['isThreadsLoadingPaused']?_0x52183a['add'](_0x29afe8):this['_handleThreadMarker'](_0x29afe8,_0x4073f6):(_0x3d08f3['add'](_0x29afe8),_0x52183a['delete'](_0x29afe8),_0x147254['removeMarker'](_0x29afe8),_0x57826e=!0x0):(_0x147254['updateMarker'](_0x29afe8,{'range':_0x3ba360}),_0x57826e=!0x0);}return _0x57826e;}),this['on']('change:isThreadsLoadingPaused',(_0x19668d,_0x4000e8,_0x5255d8)=>{if(!_0x5255d8&&_0x52183a['size'])for(const _0x1f06f5 of _0x52183a){const {id:_0x4fcee2}=er(_0x1f06f5);_0x52183a['delete'](_0x1f06f5),_0x5dd974['model']['markers']['get'](_0x1f06f5)&&this['_handleThreadMarker'](_0x1f06f5,_0x4fcee2);}}),this['listenTo'](_0x5dd974['model']['document'],'change',()=>{for(const {name:_0x3913e2,data:{newRange:_0x3b5d1b}}of _0x5dd974['model']['document']['differ']['getChangedMarkers']()){const {group:_0xa77cee,id:_0x3126eb}=er(_0x3913e2);if('comment'!==_0xa77cee)continue;const _0x35cf18=_0x2d5dfd['getCommentThread'](_0x3126eb),_0x29b421=this['hasMarkerForId'](_0x3126eb);_0x35cf18&&(!_0x35cf18['_hasTargetInContent']&&_0x3b5d1b&&_0x5dd974['editing']['view']['once']('render',()=>{const _0x405eee=_0x5dd974['plugins']['get'](O),_0x2e9c5f=_0x2d5dfd['_threadToController']['get'](_0x35cf18)['view'];_0x405eee['getByInnerView'](_0x2e9c5f)['refreshVisibility']();},{'priority':'low'}),_0x35cf18['_hasTargetInContent']=_0x29b421||!!_0x3b5d1b),_0x3b5d1b||(_0x3d08f3['add'](_0x3913e2),_0x52183a['delete'](_0x3913e2));}for(const _0x1074bd of _0x3d08f3){const {id:_0x20e500}=er(_0x1074bd),_0x2439b4=_0x2d5dfd['getCommentThread'](_0x20e500);if(_0x52183a['delete'](_0x1074bd),!_0x2439b4)continue;const _0x311a18=this['hasMarkerForId'](_0x20e500);_0x311a18||_0x2439b4['isSubmitted']?_0x311a18||_0x2439b4['unlinkedAt']||_0x2439b4['setUnlinkedAt'](new Date()):_0x2439b4['remove']();}_0x3d08f3['clear']();});}['_handleInitialThreads'](_0x18c644){_0x18c644['forEach'](_0x35ebce=>{_0x35ebce['unlinkedAt']&&this['_attachArchivedThread'](_0x35ebce['id']);});}['_getTargetForId'](_0x26207c){const _0x464ae1=this['editor'],_0x316e0c=this['getAllMarkersForId'](_0x26207c);return et(_0x464ae1['editing'],_0x316e0c);}['_getTextContext'](_0x4572db){const _0x24e014=this['getAllMarkersForId'](_0x4572db);let _0x43adcc='',_0x8efa63=!0x1;for(const _0x58b0f5 of _0x24e014){const _0x412e2f=_0x58b0f5['getRange']();for(const _0x59fd0a of Array['from'](_0x412e2f['getItems']()))_0x59fd0a['is']('$textProxy')?(_0x43adcc&&_0x8efa63&&(_0x43adcc+='\x20',_0x8efa63=!0x1),_0x43adcc+=_0x59fd0a['data']):_0x8efa63=!0x0;_0x8efa63=!0x0;}return _0x43adcc['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x201d4e,_0x38873f){const _0x4306d1=this['editor'],_0x2ef5d5=_0x4306d1['plugins']['get'](o);let _0x930562=_0x2ef5d5['getCommentThread'](_0x38873f);const _0x2d094e=_0x4306d1['config']['get']('collaboration.channelId'),_0x444461=_0x4306d1['plugins']['get'](P);if(_0x930562&&(_0x930562['unlinkedAt']&&_0x930562['setUnlinkedAt'](null),_0x930562['isAttached']))return _0x930562;return!this['getAllMarkersForId'](_0x38873f)[0x0]['managedUsingOperations']?_0x4306d1['editing']['view']['once']('render',()=>{if(_0x2ef5d5['getCommentThread'](_0x38873f))return;const _0x527971=_0x4306d1['plugins']['get'](O);_0x930562=_0x2ef5d5['openNewCommentThread']({'channelId':_0x2d094e,'threadId':_0x38873f,'target':()=>this['_getTargetForId'](_0x38873f),'context':{'type':'text','value':this['_getTextContext'](_0x38873f)}});const _0x5d5cdc=_0x2ef5d5['_threadToController']['get'](_0x930562)['view'],_0x28d8e6=_0x527971['getByInnerView'](_0x5d5cdc);_0x28d8e6&&_0x444461['registerAnnotation'](_0x28d8e6);},{'priority':'low'}):_0x2ef5d5['fetchCommentThread']({'channelId':_0x2d094e,'threadId':_0x38873f})['then'](_0x570a0a=>{if('destroyed'!==_0x4306d1['state']){if(_0x930562=_0x570a0a,_0x930562&&!_0x930562['isAttached']){const _0x3c6b3d=_0x930562['attachTo'](()=>this['_getTargetForId'](_0x38873f));_0x444461['registerAnnotation'](_0x3c6b3d),_0x930562['isResolved']&&this['_reconvertMarkers'](_0x38873f);}else{if(!_0x930562){const _0x2bde08=this['getAllMarkersForId'](_0x38873f);_0x4306d1['model']['change'](_0x24f528=>{for(const _0x20b381 of _0x2bde08)_0x24f528['removeMarker'](_0x20b381);});}}}}),_0x930562;}['_handleThreadMarker'](_0x5762fa,_0x938eed){const _0x467c5a=this['_attachMarkerToThread'](_0x5762fa,_0x938eed);_0x467c5a&&!_0x467c5a['context']&&_0x467c5a['setContext']({'type':'text','value':this['_getTextContext'](_0x938eed)});}['_initAriaMarkerChangeAnnouncements'](){const _0x45501f=this['editor'];ot(_0x45501f['model'],({left:_0x375386,entered:_0x3cd66c})=>{for(const _0x55c3f2 of _0x375386)if(mt(_0x55c3f2)){_0x45501f['ui']['ariaLiveAnnouncer']['announce'](E(_0x45501f['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0xc2c781 of _0x3cd66c)if(mt(_0xc2c781)){_0x45501f['ui']['ariaLiveAnnouncer']['announce'](E(_0x45501f['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x3eb3e1)));break;}});}}function ft(_0x4f6611,_0x3bd949){return _0x3bd949?_0x4f6611+':'+_0x3bd949:_0x4f6611;}function er(_0x3b5ba9){const _0x24257b=_0x3b5ba9['split'](':');return{'group':_0x24257b[0x0],'id':_0x24257b[0x1],'part':_0x24257b[0x2]};}function dt(_0x51e8f7,_0x5e575b){const _0xe88b8e=_0x5e575b['schema'],_0x7c69da=_0x5e575b['createRange'](_0x51e8f7['start']);for(const _0x3c419e of _0x51e8f7['getWalker']()){const {type:_0xf3f4fb,item:_0x2fac3a,nextPosition:_0x40a194}=_0x3c419e;if('text'===_0xf3f4fb||_0xe88b8e['isObject'](_0x2fac3a)){const _0x235f1d=_0x5e575b['createPositionBefore'](_0x2fac3a);_0x7c69da['isCollapsed']&&(_0x7c69da['start']=_0x235f1d),_0x7c69da['end']=_0x40a194;}}return _0x7c69da;}function mt(_0x4d3c94){return'comment'===er(_0x4d3c94['name'])['group'];}class i extends _0x599ac2{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,P,O];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x2531a9=this['editor'],_0xd59aec=_0x2531a9['plugins']['get'](o),_0x19660e=_0x2531a9['plugins']['get'](r),_0x3e6949=_0x2531a9['plugins']['get'](O),_0x24a107=_0x2531a9['plugins']['get'](P);_0x2531a9['ui']['componentFactory']['add']('comment',()=>{const _0x241d9f=this['_createUIButton'](_0x181f25);return _0x241d9f['tooltip']=!0x0,_0x241d9f;}),_0x2531a9['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x66c319)),_0x24a107['addSourceCollector'](()=>{const _0x2ada63=[];for(const [_0x232dfc,_0x48d249]of _0xd59aec['_threadToController']){const _0x45db32=_0x19660e['getAllMarkersForId'](_0x232dfc['id']),_0x96e8a7=_0x45db32['map'](_0x424eeb=>_0x424eeb['getRange']());_0x45db32['length']>0x0&&_0x2ada63['push']([_0x48d249['view'],_0x96e8a7]);}return _0x2ada63;}),this['listenTo'](_0x3e6949,'change:activeAnnotations',(_0x34d2a8,_0x586edb,_0x5337d9)=>{const _0x10ded5=Array['from'](_0x5337d9)['map'](_0x5a9fab=>_0x5a9fab['innerView'])['find'](_0x4d25b6=>_0xd59aec['_viewToController']['has'](_0x4d25b6));if(!_0x10ded5)return void(_0x19660e['activeMarker']=null);const _0x246bcc=_0xd59aec['_viewToController']['get'](_0x10ded5)['model']['id'],_0x1be84b='comment:'+_0x246bcc;_0x246bcc&&_0x19660e['hasMarkerForId'](_0x246bcc)?_0x19660e['activeMarker']=_0x1be84b:_0x19660e['activeMarker']&&(_0x19660e['activeMarker']=null);}),this['listenTo'](_0xd59aec,'removeCommentThread',(_0x2b8a15,{threadId:_0x22ba5e,isFromAdapter:_0x434fcd})=>{!_0x434fcd&&_0x2531a9['ui']['focusTracker']['isFocused']&&_0x19660e['hasMarkerForId'](_0x22ba5e)&&_0x2531a9['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0xd59aec,'addComment',(_0x3a872e,{threadId:_0x55b38a,isFromAdapter:_0x2e2a56})=>{if(_0x2e2a56||!_0x19660e['hasMarkerForId'](_0x55b38a)||!_0xd59aec['hasCommentThread'](_0x55b38a))return;0x1===_0xd59aec['getCommentThread'](_0x55b38a)['length']&&(_0x2531a9['editing']['view']['focus'](),_0x3a872e['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x516614=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x322db0;for(const _0x11677e in _0x516614){const _0x2e3504=_0x11677e,_0x49cced=_0x516614[_0x2e3504];if('commentsLicenseKeyValid'==_0x49cced||'commentsLicenseKeyInvalid'==_0x49cced||'commentsLicenseKeyExpired'==_0x49cced||'commentsLicenseKeyDomainLimit'==_0x49cced||'commentsLicenseKeyNotAllowed'==_0x49cced||'commentsLicenseKeyEvaluationLimit'==_0x49cced||'commentsLicenseKeyTrialLimit'==_0x49cced||'commentsLicenseKeyUsageLimit'==_0x49cced){delete _0x516614[_0x2e3504],_0x322db0=_0x49cced,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x322db0&&_0x516614['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x322db0&&_0x516614['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x322db0&&_0x516614['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x322db0&&_0x516614['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x322db0&&_0x516614['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x322db0&&_0x516614['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x322db0&&_0x516614['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x39d667){const _0x3a8b56=this['editor'],_0x85e030=new _0x39d667(_0x3a8b56['locale']),_0x342ebd=_0x3a8b56['commands']['get']('addCommentThread');return _0x85e030['set']({'label':E(_0x3a8b56['locale'],'Comment'),'icon':_0x352b6e}),_0x85e030['bind']('isEnabled')['to'](_0x342ebd),this['listenTo'](_0x85e030,'execute',()=>{_0x342ebd['execute']();}),_0x85e030;}}class s extends _0x599ac2{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x29655b){super(_0x29655b),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x5edfc4,_0x1d5efa,_0x2f5c8b)=>{_0x2f5c8b?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x1c102e,_0xc56935]of this['editor']['commands'])_0xc56935['affectsData']&&'addCommentThread'!==_0x1c102e&&_0xc56935['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 _0x2bb87e=this['editor']['editing']['view']['document'];this['listenTo'](_0x2bb87e,'cut',_0x42f9a7=>_0x42f9a7['stop'](),{'priority':'highest'}),this['listenTo'](_0x2bb87e,'clipboardInput',_0x23c2c9=>_0x23c2c9['stop'](),{'priority':'highest'}),this['listenTo'](_0x2bb87e,'delete',_0x4ada39=>_0x4ada39['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x55d1cc,_0x51fd51]of this['editor']['commands'])_0x51fd51['affectsData']&&'addCommentThread'!==_0x55d1cc&&_0x51fd51['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class M extends _0x3ec28c{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[O];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1b079d){super(_0x1b079d),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x4a1f6b=this['context']['plugins']['get'](O);this['listenTo'](_0x4a1f6b,'_activateAnnotation',(_0x5c88aa,_0x10c3eb)=>{for(const _0x44d8c2 of this['activeUIs']){const _0x44b1aa=this['_uis']['get'](_0x44d8c2);(0x0,this['uisData']['get'](_0x44d8c2)['filter'])(_0x10c3eb)&&_0x44b1aa['setActiveAnnotation'](_0x10c3eb);}}),this['listenTo'](_0x4a1f6b,'_deactivateAllAnnotations',()=>{for(const _0x473eae of this['activeUIs']){this['_uis']['get'](_0x473eae)['setActiveAnnotation'](null);}}),this['listenTo'](_0x4a1f6b['_visibleAnnotations'],'add',(_0x4d6324,_0x176c33)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x176c33);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x51720b){return this['activeUIs']['has'](_0x51720b);}['activate'](_0x406691,_0xdb0921=this['defaultFilter']){const _0x5761ab=this['context']['plugins']['get'](O);if(!this['_uis']['has'](_0x406691))throw new _0x167eaf('annotationsuis-missing-ui',this,{'uiName':_0x406691});this['isActive'](_0x406691)&&this['deactivate'](_0x406691),this['activeUIs']['add'](_0x406691);const _0x5a353e=new _();!function({source:_0x473967,target:_0x11d3ad,filter:_0x447fd7}){for(const _0x2d43c5 of _0x473967)_0x447fd7(_0x2d43c5)&&_0x11d3ad['add'](_0x2d43c5);_0x11d3ad['listenTo'](_0x473967,'add',(_0x392405,_0x341352)=>{_0x447fd7(_0x341352)&&_0x11d3ad['add'](_0x341352);}),_0x11d3ad['listenTo'](_0x473967,'remove',(_0x19dedc,_0x2475e5)=>{_0x11d3ad['has'](_0x2475e5)&&_0x11d3ad['remove'](_0x2475e5);});}({'source':_0x5761ab['_visibleAnnotations'],'target':_0x5a353e,'filter':_0xdb0921}),this['uisData']['set'](_0x406691,{'collection':_0x5a353e,'filter':_0xdb0921});const _0x545181=this['_uis']['get'](_0x406691);_0x545181['attach'](_0x5a353e),this['listenTo'](_0x545181,'change:activeAnnotation',(_0x14e7fb,_0xb272ef,_0x2a4e40,_0x48cca0)=>{_0x48cca0&&_0x5761ab['_removeActiveAnnotation'](_0x48cca0),_0x2a4e40&&_0x5761ab['_addActiveAnnotation'](_0x2a4e40);});}['deactivate'](_0x18539c){if(this['activeUIs']['delete'](_0x18539c),!this['_uis']['has'](_0x18539c))throw new _0x167eaf('annotationsuis-missing-ui',this,{'uiName':_0x18539c});const _0x1a2cc9=this['_uis']['get'](_0x18539c);_0x1a2cc9['detach'](),this['stopListening'](_0x1a2cc9),this['uisData']['get'](_0x18539c)['collection']['destroy'](),this['uisData']['delete'](_0x18539c);}['switchTo'](_0x28ae5b){if(!this['_uis']['has'](_0x28ae5b))throw new _0x167eaf('annotationsuis-missing-ui',this,{'uiName':_0x28ae5b});const _0x427937=this['context']['plugins']['get'](O),_0x105657=Array['from'](_0x427937['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x28ae5b);const _0x5018a9=this['_uis']['get'](_0x28ae5b);_0x5018a9['setActiveAnnotation'](_0x105657),_0x5018a9['_setSelectedAnnotations']&&_0x105657&&_0x5018a9['_setSelectedAnnotations']([_0x105657]);}['deactivateAll'](){for(const _0x10bcb8 of this['activeUIs'])this['deactivate'](_0x10bcb8);}['register'](_0x223caf,_0x181c61){if(this['_uis']['has'](_0x223caf))throw new _0x167eaf('annotationsuis-register-already-registered');if('function'!=typeof _0x181c61['attach']||'function'!=typeof _0x181c61['detach']||'function'!=typeof _0x181c61['setActiveAnnotation'])throw new _0x167eaf('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x223caf,_0x181c61);}['refilterAnnotations'](){const _0x17391e=this['context']['plugins']['get'](O)['collection'],_0x15e444=new Map(),_0x39d1d0=Array['from'](this['activeUIs']);for(const _0x5be02e of this['activeUIs']){const _0x544eb0=this['uisData']['get'](_0x5be02e)['collection'];for(const _0x548b7a of _0x544eb0)_0x15e444['set'](_0x548b7a,_0x5be02e);}for(const _0x5999c0 of _0x17391e){const _0x48a7b5=_0x15e444['get'](_0x5999c0);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5999c0);const _0xc69be8=_0x39d1d0['find'](_0x113770=>this['uisData']['get'](_0x113770)['filter'](_0x5999c0));_0x48a7b5!==_0xc69be8&&(_0x48a7b5&&this['uisData']['get'](_0x48a7b5)['collection']['remove'](_0x5999c0),_0xc69be8&&this['uisData']['get'](_0xc69be8)['collection']['add'](_0x5999c0));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x18263c){const _0x18bb92=[];for(const _0x528dd4 of this['activeUIs']){(0x0,this['uisData']['get'](_0x528dd4)['filter'])(_0x18263c)&&_0x18bb92['push'](_0x528dd4);}if(_0x18bb92['length']>0x1)throw new _0x167eaf('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x18bb92,'annotationType':_0x18263c['type']});}}const pi=xt('px');class F extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x5e1fca){super(_0x5e1fca);const _0x5892ba=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 _0xb3b6d4(),this['focusCycler']=new _0x2db88c({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x5892ba['to']('class')],'style':{'minHeight':_0x5892ba['to']('minHeight',_0x1fd586=>'number'==typeof _0x1fd586?pi(_0x1fd586+0xa):null)},'dir':_0x5e1fca['uiLanguageDirection'],'role':'application','aria-label':E(_0x5e1fca,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':E(_0x5e1fca,'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',_0x4ec178=>{this['_updateItemPositionInFocusables'](_0x4ec178['source']);}),this['list']['forEach'](_0x4c66e5=>{this['focusTracker']['add'](_0x4c66e5['element']),this['_updateItemPositionInFocusables'](_0x4c66e5);}),this['list']['on']('change',(_0x3b5056,_0x19d2d2)=>{for(const _0x16f091 of _0x19d2d2['removed'])this['focusTracker']['remove'](_0x16f091['element']),this['focusables']['remove'](_0x16f091);for(const _0x24acf8 of _0x19d2d2['added'])this['focusTracker']['add'](_0x24acf8['element']),this['_updateItemPositionInFocusables'](_0x24acf8);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x2873fd){const _0x4a6581=this['focusables']['getIndex'](_0x2873fd);let _0x58d0fa,_0x73ae84;for(const _0x5d677d of this['focusables'])if(_0x2873fd['top']<_0x5d677d['top']){_0x58d0fa=_0x5d677d;break;}if(_0x73ae84=_0x58d0fa?this['focusables']['getIndex'](_0x58d0fa):this['focusables']['length'],-0x1!==_0x4a6581){if(_0x4a6581===_0x73ae84-0x1)return;this['focusables']['remove'](_0x2873fd),_0x73ae84=_0x58d0fa?this['focusables']['getIndex'](_0x58d0fa):this['focusables']['length'];}this['focusables']['add'](_0x2873fd,_0x73ae84);}}const Ht=xt('px');class H extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x194561){super(_0x194561),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x13608b,_0x245c79)=>_0x13608b+_0x245c79),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Lt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x6e1e75=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x6e1e75['to']('isAnimationDisabled',_0x1cde77=>_0x1cde77?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x6e1e75['to']('top',_0x10ebb6=>Ht(_0x10ebb6))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x2c19e0=this['element']['clientHeight'];_0x2c19e0&&(this['height']=_0x2c19e0);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x3ec28c{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x330a68){super(_0x330a68),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 _0x5aca91=this['context']['config']['get']('sidebar.container');_0x5aca91&&this['setContainer'](_0x5aca91);}['setContainer'](_0x44ae7f){if(!y(_0x44ae7f))throw new _0x167eaf('sidebar-setcontainer-invalid-element');this['container']=_0x44ae7f;}['_attachToContainer']({viewClass:_0x4b4093='',spaceBetweenItems:_0x20256e=0x19}={}){if(!y(this['container']))throw new _0x167eaf('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x4b4093,this['_spaceBetweenItems']=_0x20256e;}['rearrange']({removedAnnotation:_0x123061,previousAnnotation:_0x221914,nextAnnotation:_0x3e92b}){const _0x31ca61=this['getSidebarItemView'](_0x123061);this['view']['list']['remove'](_0x31ca61),this['_destroySidebarItemView'](_0x123061),_0x221914&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x221914)),_0x3e92b&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3e92b)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x1bb52c,activatedAnnotation:_0x46a96b,disableAnimationOnActivatedAnnotation:_0x266bb0}){if(this['_activeAnnotation']=_0x46a96b,_0x1bb52c){_0x1bb52c['isActive']=!0x1;const _0x52d4a6=this['getSidebarItemView'](_0x1bb52c);_0x52d4a6&&_0x266bb0&&(_0x52d4a6['isAnimationDisabled']=!0x1);}if(_0x46a96b){const _0x2871c2=this['getSidebarItemView'](_0x46a96b);_0x2871c2&&(_0x46a96b['isActive']=!0x0,_0x266bb0&&(_0x2871c2['isAnimationDisabled']=!0x0,_0x2871c2['top']+=0x1),this['_alignToTargetRect'](_0x2871c2));}}['_detachFromContainer'](_0xe2fdff){if(this['view']['element']['remove'](),_0xe2fdff){for(const _0x37fa13 of _0xe2fdff)this['_destroySidebarItemView'](_0x37fa13);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x3aa6b6,_0x5997c4){_0x5997c4||(_0x5997c4=_0x3aa6b6['view']);const _0x23ffcb=new H(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x23ffcb,_0x3aa6b6),this['_annotationToSidebarItemView']['set'](_0x3aa6b6,_0x23ffcb),_0x23ffcb['content']['add'](_0x5997c4),this['listenTo'](_0x3aa6b6['view'],'change:targetRect',(_0x1670d1,_0x2c3755,_0x13f662)=>{const _0x19264f=this['_getTargetTop'](_0x3aa6b6,_0x13f662);_0x23ffcb['_targetTop']!=_0x19264f&&(_0x23ffcb['_targetTop']=_0x19264f,this['_setItemTop'](_0x23ffcb,_0x19264f));}),this['listenTo'](_0x23ffcb,'change:top',()=>{this['_recalculate'](_0x23ffcb,'top');}),this['listenTo'](_0x23ffcb,'change:bottom',()=>{this['_recalculate'](_0x23ffcb,'bottom');}),this['_alignToTargetRect'](_0x23ffcb);const _0x249ba5=this['_getItemBefore'](_0x23ffcb);if(_0x249ba5)this['_alignAfterItem'](_0x249ba5,_0x23ffcb)||this['_alignToTargetRect'](_0x23ffcb);else this['_alignToTargetRect'](_0x23ffcb);return this['_updateLastItem'](),this['view']['list']['add'](_0x23ffcb),_0x23ffcb;}['_alignForTopChange'](_0x5d0a2d){if(!_0x5d0a2d['content']['length'])return;const _0x60ae8f=this['_getItemBefore'](_0x5d0a2d);if(!_0x60ae8f)return;const _0x3f859d=this['_sidebarItemViewToAnnotation']['get'](_0x60ae8f),_0x45a5d7=this['_activeAnnotation'];_0x45a5d7&&_0x45a5d7===_0x3f859d?this['_alignAfterItem'](_0x60ae8f,_0x5d0a2d):this['_alignBeforeItem'](_0x5d0a2d,_0x60ae8f);}['_alignForBottomChange'](_0x2e1c0a){if(!_0x2e1c0a['content']['length'])return;const _0x11dce4=this['_getItemAfter'](_0x2e1c0a);if(!_0x11dce4)return;const _0x53a973=this['_sidebarItemViewToAnnotation']['get'](_0x11dce4),_0x487226=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x2c4428=this['_activeAnnotation'];_0x2c4428&&_0x2c4428===_0x53a973&&_0x487226?(this['_alignBeforeItem'](_0x11dce4,_0x2e1c0a),this['_alignAfterItem'](_0x2e1c0a,_0x11dce4)):_0x2c4428&&_0x2c4428===_0x53a973?this['_alignBeforeItem'](_0x11dce4,_0x2e1c0a):this['_alignAfterItem'](_0x2e1c0a,_0x11dce4);}['_recalculate'](_0x2d3675,_0x46c81a){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x24b344,changedProp:_0x94b874}of this['_recalculateBuffer'])'top'===_0x94b874?this['_alignForTopChange'](_0x24b344):this['_alignForBottomChange'](_0x24b344);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x2d3675,'changedProp':_0x46c81a});}['getSidebarItemView'](_0xfa906e){return this['_annotationToSidebarItemView']['get'](_0xfa906e);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x242f2d){const _0x1a5a64=this['getSidebarItemView'](_0x242f2d);this['stopListening'](_0x1a5a64),this['stopListening'](_0x242f2d['view']),_0x1a5a64['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x242f2d),this['_sidebarItemViewToAnnotation']['delete'](_0x1a5a64);}['_createSidebarView'](){const _0x51f151=new F(this['context']['locale']);return _0x51f151['render'](),this['on']('change:_lastItem',(_0x2976ef,_0xe57a4c,_0x3820bc,_0x223c92)=>{_0x223c92&&_0x51f151['unbind']('minHeight'),_0x3820bc?_0x51f151['bind']('minHeight')['to'](_0x3820bc,'bottom'):_0x51f151['minHeight']=null;}),_0x51f151;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x4b7beb){const _0x37a5f9=this['_sidebarItemViewToAnnotation']['get'](_0x4b7beb),_0x2c1ee6=_0x37a5f9&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x37a5f9)-0x1);return _0x2c1ee6&&this['getSidebarItemView'](_0x2c1ee6)||null;}['_getItemAfter'](_0x3299b5){const _0x537a29=this['_sidebarItemViewToAnnotation']['get'](_0x3299b5),_0x13904e=_0x537a29&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x537a29)+0x1);return _0x13904e&&this['getSidebarItemView'](_0x13904e)||null;}['_alignBeforeItem'](_0x486e6e,_0x54366a){_0x486e6e['updateHeight']();const _0x65cdf4=R(_0x54366a['bottom']+this['_spaceBetweenItems'],_0x486e6e['top']);return!!_0x65cdf4&&(this['_setItemTop'](_0x54366a,_0x54366a['top']-_0x65cdf4),!0x0);}['_alignAfterItem'](_0x122a28,_0x1ed775){_0x122a28['updateHeight']();const _0x3ddb26=R(_0x122a28['bottom']+this['_spaceBetweenItems'],_0x1ed775['top']);return!!_0x3ddb26&&(this['_setItemTop'](_0x1ed775,_0x1ed775['top']+_0x3ddb26,!0x1),!0x0);}['_alignToTargetRect'](_0x35e8f9){const _0x2644e6=this['_sidebarItemViewToAnnotation']['get'](_0x35e8f9);if(!_0x2644e6||!_0x2644e6['target']||!_0x2644e6['targetRect'])return;const _0x4a39e3=this['_getTargetTop'](_0x2644e6,_0x2644e6['targetRect']);this['_setItemTop'](_0x35e8f9,_0x4a39e3);}['_getTargetTop'](_0x45d8b4,_0x40e110){if(null===_0x40e110)return 0x0;if(_0x45d8b4['target']instanceof _0x66e728)return _0x40e110['top'];{const _0x355b45=new _0x66e728(this['view']['element'])['top'];return _0x40e110['top']-_0x355b45;}}['_setItemTop'](_0x507d53,_0x3f6ce9,_0x337691=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x337691&&(_0x3f6ce9=Math['max'](_0x3f6ce9,this['_getMaxAvailableTop'](_0x507d53))),_0x507d53['top']=_0x3f6ce9;}['_getMaxAvailableTop'](_0x4c9d96){let _0x6949c7=this['_getItemBefore'](_0x4c9d96),_0x52e607=0x0;for(;_0x6949c7;)_0x6949c7['updateHeight'](),_0x52e607+=this['_spaceBetweenItems']+_0x6949c7['height'],_0x6949c7=this['_getItemBefore'](_0x6949c7);return _0x52e607;}}function R(_0x4a8a63,_0x1c932b){return Math['max'](_0x4a8a63-_0x1c932b,0x0);}function y(_0x95c5b3){return null!==_0x95c5b3&&'object'==typeof _0x95c5b3&&0x1===_0x95c5b3['nodeType'];}class e extends _0x3ec28c{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4d70aa){super(_0x4d70aa),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0xfcf14(),this['_refreshPositioningDebounced']=_0x41a349(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x3161a4=this['context']['plugins']['get'](M),_0x4b836e=this['context']['plugins']['get'](z);_0x3161a4['register']('wideSidebar',this),_0x4b836e['container']&&_0x3161a4['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x1a4756){if(_0x1a4756===this['activeAnnotation'])return;const _0x57ec5d=this['context']['plugins']['get'](z);_0x57ec5d['_activeAnnotation']=_0x1a4756;const _0x347e9d=this['activeAnnotation'];_0x57ec5d['refresh']({'blurredAnnotation':_0x347e9d,'activatedAnnotation':_0x1a4756}),this['activeAnnotation']=_0x1a4756;}['attach'](_0x3b3b6b){this['annotations']=_0x3b3b6b;const _0x234057=this['context']['plugins']['get'](z);if(_0x234057['_annotations']=_0x3b3b6b,this['isAttached'])throw new _0x167eaf('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x234057,'set:container',()=>{this['detach'](),this['listenTo'](_0x234057,'change:container',_0x32092b=>{_0x32092b['off'](),this['attach'](_0x3b3b6b);});}),_0x234057['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x3aea3f=_0x3904d0=>{_0x3904d0['updateTargetRect'](),_0x234057['addAnnotation'](_0x3904d0);};for(const _0xbb1306 of _0x3b3b6b)_0x3aea3f(_0xbb1306);this['listenTo'](_0x3b3b6b,'add',(_0x25a88e,_0x9dcc1)=>{_0x3aea3f(_0x9dcc1);}),this['listenTo'](_0x3b3b6b,'remove',(_0x97a8a2,_0x3fafc5,_0x12fa44)=>{_0x234057['rearrange']({'removedAnnotation':_0x3fafc5,'previousAnnotation':_0x3b3b6b['get'](_0x12fa44-0x1),'nextAnnotation':_0x3b3b6b['get'](_0x12fa44+0x1)}),_0x3fafc5===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x3b3b6b,'focus',(_0x42c3b9,_0x5c1c1f)=>{this['setActiveAnnotation'](_0x5c1c1f);}),this['listenTo'](_0x3b3b6b,'blur',()=>{this['setActiveAnnotation'](null);});const _0x5cee67=this['context']instanceof _0x282b9f?this['context']['editors']:new _0xfcf14([this['context']]);for(const _0x16b048 of _0x5cee67)this['_integrateWithEditorAnnotations'](_0x16b048);this['listenTo'](_0x5cee67,'add',(_0x2fc85c,_0xabc803)=>{this['listenTo'](_0xabc803,'ready',()=>{this['_integrateWithEditorAnnotations'](_0xabc803);});}),this['listenTo'](_0x5cee67,'remove',(_0x44c2fe,_0x2aec0c)=>{_0x2aec0c['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2aec0c['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x167eaf('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5f7d6a=this['context']['plugins']['get'](z);_0x5f7d6a['_detachFromContainer'](this['annotations']),this['stopListening'](_0x5f7d6a),this['stopListening'](this['annotations']),this['context']instanceof _0x282b9f&&this['stopListening'](this['context']['editors']);for(const _0x4d0b47 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x4d0b47);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x2b710b){if(!_0x2b710b['plugins']['has']('EditorAnnotations'))return;const _0x4f07a5=_0x2b710b['plugins']['get']('EditorAnnotations'),_0x31813f=()=>{const _0x4c757c=_0x4f07a5['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x4c757c[0x0]||null);};this['listenTo'](_0x4f07a5,'refresh',_0x31813f),this['listenTo'](_0x4f07a5,'blur',(_0x3746d2,{isAnnotationTracked:_0x39c709})=>{this['activeAnnotation']&&_0x39c709(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x4f07a5,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x921321=>{_0x4f07a5['hasDomSelection']()&&(_0x31813f(),_0x921321['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x4f07a5);}['_destroyEditorAnnotationsIntegration'](_0x3961b1){this['stopListening'](_0x3961b1),this['_editorAnnotations']['remove'](_0x3961b1);}}class C extends _0x181f25{['counterView'];constructor(_0x3951a7){super(_0x3951a7);const _0xffce6c=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x35ee77,_0x997582)=>_0x35ee77?'...':_0x997582['toString']()),this['set']('annotationType',''),this['icon']=_0x352b6e,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0xffce6c['to']('annotationType',_0x55120f=>'ck-annotation-counter__badge--'+_0x55120f),_0xffce6c['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0xffce6c['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x3ec28c{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x400f33){super(_0x400f33),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x40c581),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0xfcf14(),this['_refreshPositioningDebounced']=_0x41a349(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x24189d(this['context']['locale']),this['balloonPanelView']=new _0x4865ab(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x40e401){this['annotations']=_0x40e401;const _0x1c27d1=this['context']['plugins']['get'](z),_0x1c17ef=this['balloonPanelView'];if(_0x1c27d1['_annotations']=_0x40e401,this['isAttached'])throw new _0x167eaf('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x1c27d1,'set:container',()=>{this['detach'](),this['listenTo'](_0x1c27d1,'change:container',_0x541e0d=>{_0x541e0d['off'](),this['attach'](_0x40e401);});}),_0x1c27d1['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x32e26d=_0x4eba66=>{const _0x51481f=new C(this['context']['locale']);_0x1c27d1['addAnnotation'](_0x4eba66,_0x51481f),this['_annotationToNarrowView']['set'](_0x4eba66,_0x51481f),_0x51481f['bind']('isDirty','annotationType','number')['to'](_0x4eba66['view'],'isDirty','type','length'),_0x51481f['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x1c17ef['content']['first']!==_0x4eba66['view']?(this['_showBalloon'](_0x4eba66),_0x4eba66['view']['element']['focus'](),this['setActiveAnnotation'](_0x4eba66)):this['setActiveAnnotation'](null);});};for(const _0x1a882f of _0x40e401)_0x32e26d(_0x1a882f);this['listenTo'](_0x40e401,'add',(_0x5adc78,_0x872dc0)=>{_0x32e26d(_0x872dc0);}),this['listenTo'](_0x40e401,'remove',(_0x279894,_0x3cae7c,_0x225f89)=>{this['_annotationToNarrowView']['get'](_0x3cae7c)['destroy'](),this['_annotationToNarrowView']['delete'](_0x3cae7c),_0x1c27d1['rearrange']({'removedAnnotation':_0x3cae7c,'previousAnnotation':_0x40e401['get'](_0x225f89-0x1),'nextAnnotation':_0x40e401['get'](_0x225f89+0x1)}),_0x3cae7c===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x40e401,'focus',(_0x218ca4,_0x4180d9)=>{this['setActiveAnnotation'](_0x4180d9);}),this['listenTo'](_0x40e401,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x34c28c,_0xb8cd21)=>{_0xb8cd21['keyCode']===_0x31f6cb['esc']&&_0x1c17ef['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x1c17ef['content']['first']),this['_hideBalloon'](),_0xb8cd21['stopPropagation'](),_0xb8cd21['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x3ba834,_0x13ff92)=>{const _0x52f861=_0x13ff92['target'];_0x1c17ef['isVisible']&&_0x1c17ef['element']['contains'](_0x52f861)||_0x1c27d1['view']['element']['contains'](_0x52f861)||_0x3ba834['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x37ec24=>_0x37ec24['contains'](_0x52f861))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x49dc44=this['context']instanceof _0x282b9f?this['context']['editors']:new _0xfcf14([this['context']]);for(const _0x524b7e of _0x49dc44)this['_integrateWithEditorAnnotations'](_0x524b7e);this['listenTo'](_0x49dc44,'add',(_0x4aa3ae,_0x2a91c5)=>{this['listenTo'](_0x2a91c5,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x2a91c5);});}),this['listenTo'](_0x49dc44,'remove',(_0x29ae5c,_0x39ffc6)=>{_0x39ffc6['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x39ffc6['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x3cb042){if(_0x3cb042===this['activeAnnotation'])return;const _0x1b4bc3=this['context']['plugins']['get'](z);if(_0x1b4bc3['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x3cb042,'disableAnimationOnActivatedAnnotation':!0x0}),_0x3cb042)_0x1b4bc3['getSidebarItemView'](_0x3cb042)?this['_showBalloon'](_0x3cb042):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x3cb042;}['detach'](){if(!this['isAttached'])throw new _0x167eaf('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x204290=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x1c384c=>_0x1c384c['destroy']()),this['_annotationToNarrowView']['clear'](),_0x204290['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x282b9f&&this['stopListening'](this['context']['editors']);for(const _0x151779 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x151779);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'](_0x5a2350){if(!_0x5a2350['plugins']['has']('EditorAnnotations'))return;const _0x353780=_0x5a2350['plugins']['get']('EditorAnnotations'),_0xde2089=this['context']['plugins']['get'](z),_0x16b6ae=this['annotations'],_0x1831b9=this['balloonPanelView'],_0x420efa=()=>{const _0x2cf180=_0x353780['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x2cf180),this['setActiveAnnotation'](_0x2cf180[0x0]||null);};this['listenTo'](_0x353780,'refresh',_0x420efa),this['listenTo'](_0x353780,'blur',(_0x4d87fb,{isAnnotationTracked:_0x67c434})=>{this['activeAnnotation']&&_0x67c434(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x353780,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x16b6ae,'blur',_0x549f6a=>{_0x353780['hasDomSelection']()&&_0x549f6a['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x315112,_0x2ea84c)=>{const _0x2aa99a=_0x2ea84c['target'];_0x1831b9['isVisible']&&_0x1831b9['element']['contains'](_0x2aa99a)||_0xde2089['view']['element']['contains'](_0x2aa99a)||this['activeAnnotation']&&_0x353780['hasDomSelection']()&&(_0x420efa(),_0x315112['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x353780);}['_destroyEditorAnnotationsIntegration'](_0x3aad14){_0x3aad14&&(this['stopListening'](_0x3aad14),this['_editorAnnotations']['remove'](_0x3aad14));}['_setSelectedAnnotations'](_0x12aeaa){for(const _0x304325 of this['_selectedAnnotations'])_0x12aeaa['includes'](_0x304325)||this['_manuallyClosedAnnotationViews']['delete'](_0x304325['view']);this['_selectedAnnotations']=_0x12aeaa;}['_refreshPositioning'](){const _0x2c6899=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x2c6899['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x328f37){if(this['_manuallyClosedAnnotationViews']['has'](_0x328f37['view']))return;const _0x1295d1=this['balloonPanelView']['content']['first'];_0x1295d1!==_0x328f37['view']?(_0x1295d1&&this['_detachListeners'](_0x1295d1),this['_attachListeners'](_0x328f37['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x328f37['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x4d694e=this['balloonPanelView']['content']['first'],_0x48d0b7=_0x4d694e&&this['annotations']['getByView'](_0x4d694e);if(!_0x48d0b7||!this['_annotationToNarrowView']['has'](_0x48d0b7))return;const _0xe93da5=this['_annotationToNarrowView']['get'](_0x48d0b7)['element'],_0x10f5c9=(function(){const _0x5f4e8d=_0x4865ab['defaultPositions'];return[_0x5f4e8d['southArrowNorthEast'],_0x5f4e8d['northArrowSouthEast'],_0x5f4e8d['southArrowNorth'],_0x5f4e8d['northArrowSouth'],_0x5f4e8d['southArrowNorthWest'],_0x5f4e8d['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0xe93da5,'positions':_0x10f5c9});}['_hideBalloon'](){const _0x4dc346=this['balloonPanelView'],_0x1ca78e=_0x4dc346['content']['first'];_0x1ca78e&&(this['_detachListeners'](_0x1ca78e),_0x4dc346['unpin'](),_0x4dc346['content']['clear']());}['_attachListeners'](_0x28edee){this['listenTo'](_0x28edee,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x28edee,'Esc',(_0x300491,_0x59b528)=>{this['_manuallyClosedAnnotationViews']['add'](_0x28edee),this['_hideBalloon'](),_0x59b528();});}['_detachListeners'](_0x31348c){this['stopListening'](_0x31348c);}}class c extends _0x599ac2{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x2f55da,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xce9ad9){super(_0xce9ad9),_0xce9ad9['editing']['view']['addObserver'](_0xbf6260),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0xce9ad9['plugins']['get'](_0x2f55da),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x188bfc=this['editor']['plugins']['get'](M);_0x188bfc['context']===this['editor']&&(_0x188bfc['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x2c367b,_0x16311d)=>{const _0x4f935b=this['_balloon'];if(this['isAttached']&&_0x4f935b['visibleView']){const _0x3bdf83=this['annotations']['getByView'](_0x4f935b['visibleView']);_0x3bdf83&&this['_closeAnnotation'](_0x3bdf83),_0x16311d();}}));}['afterInit'](){const _0xf9103b=this['editor']['plugins']['get'](M);_0xf9103b['context']===this['editor']&&(_0xf9103b['hasActive']()||_0xf9103b['switchTo']('inline'));}['setActiveAnnotation'](_0x4dc6fb){_0x4dc6fb!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x4dc6fb&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x4dc6fb)&&this['_addAnnotationToBalloon'](_0x4dc6fb,!0x0),_0x4dc6fb['isActive']=!0x0),_0x4dc6fb||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x4dc6fb);}['attach'](_0x29eb2c){this['annotations']=_0x29eb2c;const _0x2c9e08=this['editor']['plugins']['get'](M),_0x333fb5=this['_balloon'];if(this['isAttached'])throw new _0x167eaf('inlineannotations-attach-already-attached',this);if(_0x2c9e08['context']!==this['editor'])throw new _0x167eaf('inlineannotations-not-allowed-with-context',this);const _0x104e30=this['editor']['plugins']['get'](P);this['listenTo'](_0x104e30,'refresh',()=>{const _0x30c95f=_0x104e30['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x58ebee,_0x43dabc;!this['_forceRefresh']&&(_0x58ebee=_0x30c95f,_0x43dabc=this['_selectedAnnotations'],_0x58ebee['length']===_0x43dabc['length']&&_0x58ebee['every'](_0x5aff5d=>_0x43dabc['includes'](_0x5aff5d)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x30c95f),this['setActiveAnnotation'](_0x30c95f[0x0]||null));}),this['listenTo'](_0x104e30,'blur',(_0xead1f2,{isAnnotationTracked:_0x4fbb48})=>{this['activeAnnotation']&&_0x4fbb48(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x546f93,_0x10930d,_0x3b9f51)=>{_0x3b9f51||this['setActiveAnnotation'](null);}),this['listenTo'](_0x29eb2c,'remove',(_0x3eb7a1,_0x194b97)=>{this['_removeAnnotationFromBalloon'](_0x194b97),_0x194b97===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x333fb5,'change:visibleView',(_0x29df6c,_0x440c6a,_0x447029,_0x498f37)=>{_0x498f37&&this['stopListening'](_0x498f37);const _0x181b5a=_0x29eb2c['getByView'](_0x447029);_0x447029&&_0x181b5a&&(this['listenTo'](_0x447029,'change:height',()=>{_0x333fb5['updatePosition']();}),this['listenTo'](_0x447029,'Esc',()=>{this['_closeAnnotation'](_0x181b5a),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x181b5a&&this['setActiveAnnotation'](_0x181b5a));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x333fb5['visibleView']&&(_0x29eb2c['getByView'](_0x333fb5['visibleView'])&&_0x333fb5['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 _0x167eaf('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x308020 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x308020);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x2c5f31){for(const _0x551ea3 of this['_selectedAnnotations'])_0x2c5f31['includes'](_0x551ea3)||this['_manuallyClosed']['delete'](_0x551ea3);for(const _0x2e5921 of this['annotations'])_0x2c5f31['includes'](_0x2e5921)||this['_removeAnnotationFromBalloon'](_0x2e5921);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x4932bb of _0x2c5f31)this['_addAnnotationToBalloon'](_0x4932bb);}this['_selectedAnnotations']=_0x2c5f31;}['_addAnnotationToBalloon'](_0x405f0c,_0xcdb559=!0x1){this['_manuallyClosed']['has'](_0x405f0c)||(this['_addedAnnotations']['has'](_0x405f0c)||this['_balloon']['hasView'](_0x405f0c['view'])||(this['_addedAnnotations']['add'](_0x405f0c),this['_balloon']['add']({'stackId':_0x405f0c['view']['id'],'view':_0x405f0c['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x405f0c)}})),_0xcdb559&&this['_balloon']['showStack'](_0x405f0c['view']['id']));}['_getBalloonTargetForAnnotation'](_0x1ebcad){const _0x21998a=_0x1ebcad['target'],_0x7871f5=this['editor']['editing']['view'],_0x16b9db=_0x7871f5['document']['selection']['getFirstRange'](),_0x96fe9f=_0x7871f5['domConverter']['viewRangeToDom'](_0x16b9db);if(_0x96fe9f['collapse'](!0x0),_0x21998a){if(_0x21998a instanceof _0x66e728)return _0x21998a;let _0x586c83=[];for(const _0x418969 of _0x21998a)_0x586c83['push'](...(_0xe925b2=_0x418969['getClientRects'](),Array['from'](_0xe925b2)['map'](DOMRect['fromRect'])));_0x586c83=function(_0x55b982){const _0x407ae4=[];let _0x115e42=_0x55b982[0x0];for(let _0x67809f=0x1;_0x67809f<_0x55b982['length'];_0x67809f++)B(_0x115e42,_0x55b982[_0x67809f])?_0x115e42['width']+=_0x55b982[_0x67809f]['width']:(_0x407ae4['push'](_0x115e42),_0x115e42=_0x55b982[_0x67809f]);return _0x407ae4['push'](_0x115e42),_0x407ae4;}(_0x586c83);const _0x1b193c=_0x96fe9f['getBoundingClientRect']();return _0x586c83['find'](_0x15270b=>_0x15270b['top']<=_0x1b193c['top']&&_0x15270b['bottom']>=_0x1b193c['bottom']&&_0x15270b['left']<=_0x1b193c['left']&&_0x15270b['right']>=_0x1b193c['right'])||_0x586c83[0x0];}var _0xe925b2;return _0x1ebcad['targetRect']||_0x96fe9f;}['_removeAnnotationFromBalloon'](_0x54060b){this['_addedAnnotations']['has'](_0x54060b)&&this['_balloon']['hasView'](_0x54060b['view'])&&(this['_addedAnnotations']['delete'](_0x54060b),this['_balloon']['remove'](_0x54060b['view']));}['_closeAnnotation'](_0x391097){this['_manuallyClosed']['add'](_0x391097),this['_removeAnnotationFromBalloon'](_0x391097);}}function B(_0x50ff60,_0x3f86c7){return _0x50ff60['top']===_0x3f86c7['top']&&_0x50ff60['bottom']===_0x3f86c7['bottom']&&_0x50ff60['right']===_0x3f86c7['left'];}class tt extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x27b07a,_0x4762c1){super(_0x27b07a),this['set']('isEmpty',!_0x4762c1['length']),this['focusTracker']=new _0xb3b6d4(),this['_annotationViews']=_0x4762c1,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x2db88c({'focusables':_0x4762c1,'focusTracker':this['focusTracker']}),this['listenTo'](_0x4762c1,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x4762c1,'remove',(_0x78eab9,_0x508191)=>{_0x508191['isActive']&&this['focus'](),_0x4762c1['length']||(this['isEmpty']=!0x0);});const _0xca9c45=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':E(_0x27b07a,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x4762c1},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0xca9c45['if']('isEmpty','ck-hidden',_0x1407c9=>!_0x1407c9)]},'children':[{'text':E(_0x27b07a,'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 _0xfa1339 of this['_annotationViews'])this['focusTracker']['add'](_0xfa1339['element']);this['_annotationViews']['on']('change',(_0x42369e,{added:_0x565a15,removed:_0x2d7c3f})=>{for(const _0x321e08 of _0x565a15)this['focusTracker']['add'](_0x321e08['element']);for(const _0x250859 of _0x2d7c3f)this['focusTracker']['remove'](_0x250859['element']);});}}class f extends _0x3ec28c{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,O];}constructor(_0x5c5492){super(_0x5c5492),this['archivedThreads']=new _0xfcf14();}['init'](){const _0x492052=this['context'],_0x1c4be6=_0x492052['plugins']['get'](o),_0x1f68b4=_0x492052['plugins']['get'](O);this['listenTo'](_0x1c4be6,'addCommentThread',(_0x1490c0,{threadId:_0x2f7953})=>{const _0x5f4a1d=_0x1c4be6['getCommentThread'](_0x2f7953);_0x5f4a1d['archivedAt']&&this['archivedThreads']['add'](_0x5f4a1d,this['_calculatePosition'](_0x5f4a1d['archivedAt'])),this['listenTo'](_0x5f4a1d,'change:archivedAt',(_0x3585bd,_0x393579,_0x5751b0)=>{_0x5751b0?this['archivedThreads']['has'](_0x5f4a1d)||this['archivedThreads']['add'](_0x5f4a1d,this['_calculatePosition'](_0x5f4a1d['archivedAt'])):this['archivedThreads']['has'](_0x5f4a1d)&&this['archivedThreads']['remove'](_0x5f4a1d);});}),this['listenTo'](_0x1c4be6,'removeCommentThread',(_0x492686,{threadId:_0x15afad})=>{const _0x166471=_0x1c4be6['getCommentThread'](_0x15afad);this['stopListening'](_0x166471),this['archivedThreads']['has'](_0x166471)&&this['archivedThreads']['remove'](_0x166471);},{'priority':'highest'}),this['listenTo'](_0x1f68b4['collection'],'focus',(_0x3151af,_0xf2f161)=>{_0xf2f161['isVisible']||(_0xf2f161['isActive']=!0x0,_0x1f68b4['activate'](_0xf2f161));});}['_calculatePosition'](_0x370b0c){const _0xa5dd6a=[...this['archivedThreads']]['findIndex'](_0x4ab005=>_0x4ab005['archivedAt']<_0x370b0c);return _0xa5dd6a>-0x1?_0xa5dd6a:this['archivedThreads']['length'];}}class a extends _0x599ac2{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,_0x3f2689];}constructor(_0x4f7323){super(_0x4f7323),this['annotationViews']=new _0x58f26f(),this['_pendingThreads']=[];}['init'](){const _0x5e4beb=this['editor'],_0x672815=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x5e4beb['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x181f25,!0x0)),_0x5e4beb['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0xa89214=this['_createCommentsArchiveButton'](_0x66c319);return _0xa89214['set']({'role':'menuitemcheckbox'}),_0xa89214;});const _0x3d573a=_0x5e4beb['plugins']['get'](f),_0x1019e7=_0x5e4beb['plugins']['get']('Annotations'),_0x180609=_0x5e4beb['plugins']['get']('CommentsRepository');_0x3d573a['archivedThreads']['forEach'](_0x68c296=>{this['_handleNewThread'](_0x68c296);}),this['listenTo'](_0x3d573a['archivedThreads'],'add',(_0x384f91,_0x2fca6d)=>{this['_handleNewThread'](_0x2fca6d);}),this['listenTo'](_0x1019e7['collection'],'add',(_0x4cea26,_0xdcf3e0)=>{const _0x296528=this['_pendingThreads']['find'](_0x51f344=>{const _0x3b67d2=_0x180609['_threadToController']['get'](_0x51f344);return _0x3b67d2&&_0xdcf3e0['innerView']===_0x3b67d2['view'];});if(_0x296528){const _0x587865=this['_calculatePosition'](_0x296528['archivedAt']);this['annotationViews']['add'](_0xdcf3e0['view'],_0x587865),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x296528),0x1);}}),this['listenTo'](_0x3d573a['archivedThreads'],'remove',(_0x166933,_0x2b03cb)=>{const _0x9f07d7=_0x5e4beb['config']['get']('collaboration.channelId');if(!_0x9f07d7||_0x2b03cb['channelId']===_0x9f07d7){if(this['_pendingThreads']['includes'](_0x2b03cb))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2b03cb),0x1);else{const _0x39dc65=_0x180609['_threadToController']['get'](_0x2b03cb),_0x32da5f=_0x1019e7['getByInnerView'](_0x39dc65['view']);this['annotationViews']['remove'](_0x32da5f['view']),this['stopListening'](_0x32da5f['focusableElements']);}}}),this['listenTo'](_0x1019e7['collection'],'add',(_0x440e61,_0x4aea39)=>{this['listenTo'](_0x4aea39,'escape',_0x672815);}),this['listenTo'](_0x1019e7['collection'],'remove',(_0x7690d9,_0x1e6299)=>{this['stopListening'](_0x1e6299,'escape',_0x672815);});}['_handleNewThread'](_0xa2fc5f){const _0x320649=this['editor']['plugins']['get']('CommentsRepository'),_0xc39b33=this['editor']['plugins']['get']('Annotations'),_0x11ec1e=this['editor']['config']['get']('collaboration.channelId');if(!_0x11ec1e||_0xa2fc5f['channelId']===_0x11ec1e){const _0x589193=_0x320649['_threadToController']['get'](_0xa2fc5f);if(!_0x589193)return void this['_pendingThreads']['push'](_0xa2fc5f);const _0x52e644=this['_calculatePosition'](_0xa2fc5f['archivedAt']),_0x505bb0=_0xc39b33['getByInnerView'](_0x589193['view']);_0x505bb0['isVisible']&&_0xc39b33['_visibleAnnotations']['remove'](_0x505bb0),this['annotationViews']['add'](_0x505bb0['view'],_0x52e644);}}['_calculatePosition'](_0x574ec8){const _0x447261=this['editor']['config']['get']('collaboration.channelId'),_0x249122=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0x263399=>_0x263399['channelId']===_0x447261)['findIndex'](_0x145988=>_0x145988['archivedAt']<_0x574ec8);return _0x249122<0x0||_0x249122>this['annotationViews']['length']?this['annotationViews']['length']:_0x249122-0x1;}['_toggleDialog'](){const _0x2a6133=this['editor'],_0x363c2f=_0x2a6133['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new tt(_0x2a6133['locale'],this['annotationViews'])),'commentsArchive'===_0x363c2f['id']?_0x363c2f['hide']():_0x363c2f['show']({'id':'commentsArchive','title':E(_0x2a6133['locale'],'COMMENTS_ARCHIVE'),'icon':_0x13e233,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0xd26c9f['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x293955,_0x44cc88=!0x1){const _0x53d2cf=this['editor']['locale'],_0x128c2f=this['editor']['plugins']['get']('Dialog'),_0x3c6d34=new _0x293955(_0x53d2cf);return _0x3c6d34['bind']('isEnabled')['to'](this,'isEnabled'),_0x3c6d34['bind']('isOn')['to'](_0x128c2f,'id',_0xbd890e=>'commentsArchive'===_0xbd890e),_0x3c6d34['set']({'label':E(_0x53d2cf,'COMMENTS_ARCHIVE'),'icon':_0x13e233,'isToggleable':!0x0}),_0x44cc88&&(_0x3c6d34['tooltip']=!0x0),this['listenTo'](_0x3c6d34,'execute',()=>this['_toggleDialog']()),_0x3c6d34;}['_hideDialogOnAnnotationEscape']=_0x3f9d2d=>{const _0x3234aa=_0x3f9d2d['source'];if(!this['annotationViews']['has'](_0x3234aa['view']))return;const _0x320ee2=this['editor']['plugins']['get']('Dialog');_0x320ee2['isOpen']&&'commentsArchive'===_0x320ee2['id']&&(_0x320ee2['hide'](),_0x3f9d2d['stop']());};}class p extends _0x599ac2{static get['requires'](){return[o,r,i,f,a,s,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{d as Annotation,_ as AnnotationCollection,S as AnnotationView,O as Annotations,M as AnnotationsUIs,ts as BaseCommentThreadView,hs as BaseCommentView,fi as Comment,ui as CommentThread,Ct as CommentThreadController,ie as CommentThreadInputView,vt as CommentThreadView,gt as CommentView,p as Comments,f as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,s as CommentsOnly,o as CommentsRepository,i as CommentsUI,P as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar};
|
|
23
|
+
import{Editor as _0x3fbaf8,ContextPlugin as _0x43274a,PendingActions as ht,Command as _0x3d3aed,Plugin as _0x90bc29,Context as _0x11fda3}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x33a8ce,uid as _0x2b0c22,KeystrokeHandler as jt,FocusTracker as _0x11f52f,diff as _0x131184,Collection as _0x172c01,Rect as _0x5121c1,CKEditorError as _0x3611b8,first as _0x4a06d2,priorities as Wt,scrollViewportToShowTarget as rt,getEnvKeystrokeText as nt,toUnit as xt,DomEmitterMixin as _0x9ec0df,keyCodes as _0x2f3769}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x4b41c5,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x4fba49,trimHtml as _0x2cb042,LateFocusDropdownButtonView as _0x25d5a9,Users as it,getDateTimeFormatter as lt,hashObject as pt,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as ot,FOCUS_ANNOTATION_KEYSTROKE as _0xa1367f}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as wt,cloneDeep as It,set as At,unset as yt,debounce as _0x54e343}from'es-toolkit/compat';import{IconUndo as _0x21e55f,IconCheck as _0xa5051c,IconPencil as _0x4ba343,IconRemoveComment as _0x53a112,IconThreeVerticalDots as _0x377d03,IconAddComment as _0x433d7b,IconCommentsArchive as _0x2d292b}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Vt,InlineEditableUIView as $t,EditorUI as Rt,View as kt,FocusCycler as _0x4728ff,ButtonView as _0x3d044c,ViewCollection as _0x4a86ed,createDropdown as _0x8fe474,ListView as _0x153bd9,focusChildOnDropdownOpen as _0x398092,ListItemView as _0x407e81,MenuBarMenuListItemButtonView as _0x10c47c,BodyCollection as _0x407751,BalloonPanelView as _0x467b52,ContextualBalloon as _0x5c1ae6,Dialog as _0x1605b6,DialogViewPosition as _0x485ca9}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disablePlaceholder as St,enablePlaceholder as Ft,MouseObserver as _0xc0e6dc}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Et}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Gt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Jt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Kt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x547e5e}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x551600}from'@ckeditor/ckeditor5-widget/dist/index.js';class Ct extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x33a8ce(){['model'];['view'];constructor(_0x25c69d,_0xcc1595){super(),this['model']=_0x25c69d,this['model']['_isAttached']=!0x0,this['view']=_0xcc1595,this['listenTo'](_0xcc1595,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0xcc1595,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0xcc1595,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0xcc1595,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0xcc1595,'addComment',(_0x1dc771,_0x44b965)=>this['addComment'](_0x44b965)),this['listenTo'](_0xcc1595,'updateComment',(_0x2ef55c,_0x25379e,_0x265fbc)=>this['updateComment'](_0x25379e,_0x265fbc)),this['listenTo'](_0xcc1595,'removeComment',(_0xacb83a,_0x1ccb46)=>this['removeComment'](_0x1ccb46));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x418385){this['model']['addComment']({'content':_0x418385,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x457861,_0x45fc8c){this['model']['getComment'](_0x457861)['update']({'content':_0x45fc8c});}['removeComment'](_0x173382){this['model']['getComment'](_0x173382)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function E(_0x246b0a,_0x1d7c85,_0x289684){const t=_0x246b0a['t'];switch(_0x1d7c85){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'},_0x289684);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'},_0x289684);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'},_0x289684);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'},_0x289684);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x289684);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'},_0x289684);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'},_0x289684);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'},_0x289684);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Ut extends Vt{['main'];['editable'];constructor(_0x174fa9,_0x3a2c44){super(_0x174fa9);const _0x1e39e8=_0x2b0c22();this['main']=this['createCollection'](),this['editable']=new $t(_0x174fa9,_0x3a2c44,void 0x0,{'label':()=>E(_0x174fa9,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x174fa9['uiLanguageDirection'],'lang':_0x174fa9['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x1e39e8},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Ot extends Rt{['view'];constructor(_0x2e5e52){super(_0x2e5e52),this['view']=new Ut(_0x2e5e52['locale'],_0x2e5e52['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x336e84=this['editor']['editing']['view'],_0x19db52=this['view']['editable'],_0x30145a=_0x336e84['document']['getRoot']();_0x19db52['name']=_0x30145a['rootName'],this['view']['render']();const _0xa457c7=_0x19db52['element'];this['setEditableElement'](_0x19db52['name'],_0xa457c7),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x336e84['attachDomRoot'](_0xa457c7),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Nt=[qt,zt,Bt,Et,Gt,Jt,Kt];class Qt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x33a8ce(_0x3fbaf8){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Nt)());constructor(_0x24db73={}){function _0x5b299b(_0x1edb5d){return _0x1edb5d['map'](_0x3f7e73=>String['fromCharCode'](_0x3f7e73))['join']('');}(_0x24db73=Object['assign']({},_0x24db73))['plugins']||(_0x24db73['plugins']=Qt['defaultPlugins']),super(_0x24db73),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[_0x5b299b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5b299b([0x76,0x69,0x65,0x77])][_0x5b299b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5b299b([0x61,0x75,0x74,0x6f]),this[_0x5b299b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x5b299b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5b299b([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x5b299b([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x5b299b([0x6f,0x6b])});}['create'](){const _0x36e05a=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x36e05a))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x94f0f5=>{const _0x434f90=this['model']['document']['getRoot'](),_0x31b92d=_0x434f90&&_0x434f90['getChild'](_0x434f90['childCount']-0x1);_0x94f0f5['setSelection'](_0x31b92d,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x655138=this['editing']['view'],_0xbb1d0a=_0x655138['document']['getRoot'](),_0x4e8649=_0xbb1d0a['getChild'](0x0);_0xbb1d0a['childCount']>0x1||!_0x4e8649||'p'!=_0x4e8649['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x655138,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x4e8649['placeholder']=this['placeholder']),Ft({'view':_0x655138,'element':_0x4e8649,'keepOnFocus':!0x0}),this['placeholderElement']=_0x4e8649);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x46342a,_0x4f9a73={}){super(_0x46342a),this['editor']=null,this['_editorConfig']=_0x4f9a73,this['set']('value',_0x4f9a73['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',E(_0x46342a,'Reply...')),this['set']('submitLabel',E(_0x46342a,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x11f52f(),this['focusCycler']=new _0x4728ff({'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',(_0x145bad,_0x3caccb)=>{this['cancelButtonView']['fire']('execute'),_0x3caccb();}),this['keystrokes']['set']('Ctrl+Enter',(_0x2a44e7,_0x220678)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x220678());}),this['on']('submit',(_0x5490a2,_0x573254)=>{_0x573254['length']>0xfde8?(alert(E(_0x46342a,'TOO_LONG_COMMENT_ALERT',[_0x573254['length'],0xfde8])),_0x5490a2['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Qt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x55828f=this['editor'];this['element']['insertBefore'](_0x55828f['ui']['element'],this['element']['firstChild']),_0x55828f['model']['document']['on']('change',()=>this['value']=_0x55828f['getData']()),_0x55828f['bind']('placeholder')['to'](this),this['focusables']['add'](_0x55828f['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x23b288){-0x1===_0x23b288?(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:_0x50dbb9}=this,_0x59361d=new _0x3d044c(_0x50dbb9);return _0x59361d['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x59361d['withText']=!0x0,_0x59361d['bind']('label')['to'](this,'submitLabel'),_0x59361d['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x59361d['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0xf8195c,_0x4769b1)=>!_0x4769b1&&!!_0xf8195c['trim']()),_0x59361d;}['_createCancelButton'](){const {locale:_0x376889}=this,_0x404f3d=new _0x3d044c(_0x376889);return _0x404f3d['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x404f3d['label']=E(_0x376889,'Cancel'),_0x404f3d['withText']=!0x0,_0x404f3d['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x404f3d;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x2dd275=>{this['focusTracker']['add'](_0x2dd275['element']);}),this['focusables']['on']('change',(_0x49a18c,_0xcc0d41)=>{for(const _0x386923 of Array['from'](_0xcc0d41['added'])['reverse']())this['focusTracker']['add'](_0x386923['element']);});}}class ie extends kt{constructor(_0x35b09d,_0x260e7d,_0x3b4b69){super(_0x35b09d),this['commentInputView']=new os(_0x35b09d,_0x3b4b69),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x33d096,_0x6299c3)=>_0x33d096||!!_0x6299c3),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 _0x4b41c5(_0x35b09d,_0x260e7d),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'](_0x4df5b6){this['commentInputView']['focus'](_0x4df5b6);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x286eaf,_0x41f7c9)=>{const {submitButtonView:_0x19f90c,cancelButtonView:_0x54a132,editor:_0xa4b3ef}=this['commentInputView'];[_0x19f90c['element'],_0x54a132['element'],_0xa4b3ef?_0xa4b3ef['editing']['view']['getDomRoot']():null]['filter'](_0x4745ad=>_0x4745ad)['some'](_0x3993c2=>_0x3993c2['contains'](_0x41f7c9['target']))||(this['focus'](),_0x41f7c9['preventDefault']());});}}class cs extends kt{constructor(_0x17347f){super(_0x17347f);const _0x322de1=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x322de1['to']('count',_0x422e48=>E(_0x17347f,'NUMBER_OF_COMMENTS',_0x422e48))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x9160fc,_0x4ae3df,_0x14fcf6){super(_0x9160fc);const _0x55beaa=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x4ae3df['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x4ae3df,this['_config']=_0x14fcf6,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x11f52f(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4728ff({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x13562e=>this['commentViews']['map'](_0x292eb4=>_0x292eb4['element'])['includes'](_0x13562e['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x9160fc),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x2cc0ff=>_0x2cc0ff-this['_config']['maxCommentsWhenCollapsed']);for(const _0x1c7f85 of _0x4ae3df['comments'])this['_handleNewCommentModel'](_0x1c7f85);this['_handleInfoComment'](),this['listenTo'](_0x4ae3df['comments'],'add',(_0x2901a0,_0x5a95c2)=>{const _0x2b79e3=this['_calculatePosition'](_0x5a95c2);this['length']++,this['_handleNewCommentModel'](_0x5a95c2,_0x2b79e3),this['refreshVisibleViews']();}),this['listenTo'](_0x4ae3df['comments'],'remove',(_0x211ba2,_0x595e56)=>{this['length']--,this['_handleRemoveCommentModel'](_0x595e56),this['refreshVisibleViews']();}),this['listenTo'](_0x4ae3df,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x4ae3df,'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',_0x55beaa['if']('length','ck-hidden',_0x317ebc=>!_0x317ebc)],'aria-label':E(_0x9160fc,'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'](_0x3ac23d){-0x1===_0x3ac23d?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0xd0a733 of this['commentViews'])_0xd0a733['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x4a337b,_0x863795){const _0x5e6329=new this['_config']['CommentView'](this['locale'],_0x4a337b,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x5e6329['viewUid']=_0x4a337b['id'],_0x5e6329['delegate']('removeComment')['to'](this),_0x5e6329['delegate']('updateComment')['to'](this),_0x5e6329['delegate']('resolveCommentThread')['to'](this),_0x5e6329['delegate']('editorReady')['to'](this),_0x5e6329['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x5e6329,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x5e6329,_0x863795);}['_calculatePosition'](_0x26c02c){const _0x163aab=this['_model']['_findOptimalIndex'](_0x26c02c);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x26c02c['authoredAt']?_0x163aab-0x1:_0x163aab:_0x163aab-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x175f3c={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':E(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x175f3c,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x175f3c));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x43cc4e){const _0x3cdbbd=this['commentViews']['remove'](_0x43cc4e['id']);this['stopListening'](_0x3cdbbd),_0x3cdbbd['isEditMode']&&this['_updateHasDirtyComment'](),_0x3cdbbd['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x75afa2=>_0x75afa2['isEditMode']);}['_rearrangeCollapse'](){const _0x516ae7=function(_0x3712f2){const _0x172d93=new _0x172c01();for(const _0x12bf6f of _0x3712f2)_0x172d93['add'](_0x12bf6f);return _0x172d93;}(this['commentViews']),_0xdcbedd=this['_collapsedCommentsView']['count'];for(let _0x3b109b=0x1;_0x3b109b<=_0xdcbedd;_0x3b109b++)_0x516ae7['remove'](0x1);for(const _0xdb2d5b of _0x516ae7)_0xdb2d5b['collapse']();_0xdcbedd>0x0&&_0x516ae7['add'](this['_collapsedCommentsView'],0x1),ns(_0x131184(Array['from'](this['visibleViews']),Array['from'](_0x516ae7)),this['visibleViews'],_0x516ae7);}['_rearrangeExpand'](){ns(_0x131184(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x2ab8fc of this['visibleViews'])_0x2ab8fc['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x30590e=>{this['focusTracker']['add'](_0x30590e['element']),this['keystrokes']['listenTo'](_0x30590e['element']);}),this['commentViews']['on']('change',(_0x41793a,_0x281734)=>{for(const _0xe8875 of _0x281734['removed'])this['focusTracker']['remove'](_0xe8875['element']),this['keystrokes']['stopListening'](_0xe8875['element']);for(const _0x4e213e of Array['from'](_0x281734['added'])['reverse']())this['focusTracker']['add'](_0x4e213e['element']),this['keystrokes']['listenTo'](_0x4e213e['element']);});}}function ns(_0x55b66f,_0x30618b,_0x5eed13){let _0x5e304a=0x0;for(const _0x31aea4 of _0x55b66f)switch(_0x31aea4){case'insert':_0x30618b['add'](_0x5eed13['get'](_0x5e304a),_0x5e304a),_0x5e304a++;break;case'delete':_0x30618b['remove'](_0x5e304a);break;case'equal':_0x5e304a++;}}class as extends kt{constructor(_0x21adbe){super(_0x21adbe);const _0x503c19=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x503c19['to']('contextValue',_0x40fbce=>E(_0x21adbe,'THREAD_CONTEXT_LABEL',_0x40fbce)),'tabindex':-0x1},'children':[{'text':_0x503c19['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x313704,_0x3d8e29){super(_0x313704);const _0x2f6905=this['bindTemplate'];this['_model']=_0x3d8e29,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x11f52f(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4728ff({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x5ca46d=>!!_0x5ca46d),this['bind']('contextValue')['to'](this['_model'],'context',_0x3c8cb4=>_0x3c8cb4&&_0x3c8cb4['value']?this['_trimContextValue'](_0x3c8cb4['value']):E(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x2f6905['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 _0x37c497=new _0x3d044c(this['locale']);return _0x37c497['label']=E(this['locale'],'Reopen'),_0x37c497['tooltip']=E(this['locale'],'Reopen'),_0x37c497['icon']=_0x21e55f,_0x37c497['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x6dc9bb=>!_0x6dc9bb),_0x37c497['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x326271,_0x88a793)=>_0x326271&&_0x88a793),_0x37c497['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x37c497;}['_trimContextValue'](_0x49b82c){if(_0x49b82c['length']<0x96)return _0x49b82c;const _0x102d68=_0x49b82c['lastIndexOf']('\x20',0x93);return _0x49b82c['substring'](0x0,_0x102d68>-0x1?_0x102d68:0x93)+'...';}['_attachContextActions'](){const _0x530710=this['element']['querySelector']('.ck-context'),_0x47c4aa=_0x530710['querySelector']('.ck-context__value');this['listenTo'](_0x530710,'mouseenter',()=>{_0x47c4aa['offsetWidth']<_0x47c4aa['scrollWidth']&&_0x530710['classList']['add']('overlay');}),this['listenTo'](_0x530710,'mouseleave',()=>{_0x530710['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x5d9afb of this['focusables'])this['focusTracker']['add'](_0x5d9afb['element']),this['keystrokes']['listenTo'](_0x5d9afb['element']);}['_createContextView'](){const _0x58ce35=new as(this['locale']);return _0x58ce35['bind']('contextValue')['to'](this),_0x58ce35;}}class ts extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x2985c0,_0x2ed9ed,_0x155e73,_0x4eee58){super(_0x2985c0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x2ed9ed,this['_localUser']=_0x155e73,this['_config']=_0x4eee58,this['commentThreadHeaderView']=new Xt(_0x2985c0,_0x2ed9ed),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x2985c0,E(_0x2985c0,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x2985c0,_0x2ed9ed,Object['assign']({'CommentView':this['_config']['CommentView']},_0x4eee58)),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',(_0xcb3e40,_0x33a2e9)=>_0xcb3e40||!!_0x33a2e9),this['bind']('isUnlinked')['to'](_0x2ed9ed,'unlinkedAt',_0x2db1d1=>!!_0x2db1d1),this['bind']('ariaLabel')['to'](this,'length',_0x260601=>{const _0x35d584=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return E(this['locale'],'COMMENT_THREAD_LABEL',[_0x260601,_0x35d584]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x11f52f(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4728ff({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x60ecea=>_0x60ecea['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x340d5f=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x26083c=_0x340d5f['commentInputView'];return _0x340d5f['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x26083c,'value',(_0x4fe872,_0x8eb5d8,_0x207c59,_0x316c9a,_0x497310)=>!!_0x497310||!!_0x316c9a&&_0x207c59&&!_0x8eb5d8||_0x4fe872&&_0x207c59&&!_0x8eb5d8),_0x26083c['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x36466a,_0x28de87,_0x3d423b)=>{let _0x5cc5cc;return _0x5cc5cc=_0x3d423b&&_0x28de87?'Reply\x20to\x20reopen\x20discussion...':_0x36466a?'Reply...':'Write\x20a\x20comment...',E(this['locale'],_0x5cc5cc);}),_0x26083c['bind']('submitLabel')['to'](this,'length',_0x38e265=>E(this['locale'],_0x38e265?'Reply':'Comment')),_0x26083c['on']('submit',(_0x3f4b23,_0x4ad2c0)=>{this['fire']('addComment',_0x4ad2c0),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x26083c['on']('cancel',()=>{this['focus']();}),_0x26083c['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x26083c['on']('cancel',_0x147e4f=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x147e4f['stop']());}),this['on']('change:isActive',(_0x490864,_0x436f17,_0x801d19)=>{_0x801d19||this['length']||_0x26083c['value']||this['fire']('removeCommentThread');}),_0x340d5f;}}class vt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(ts){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x341b6f,_0x124522,_0x57e1e0,_0x6225e1){super(_0x341b6f,_0x124522,_0x57e1e0,_0x6225e1),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x341b6f,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x54bf2d,_0x57f783,_0x4186d3)=>{_0x4186d3||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x1a3b45,_0x405e5c,_0x2af838)=>{_0x2af838&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x1733d4=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x1733d4['if']('isActive','ck-thread--active'),_0x1733d4['if']('isUnlinked','ck-thread--unlinked'),_0x1733d4['if']('isConfirm','ck-thread--remove-confirmation'),_0x1733d4['to']('actionIndicator',_0x2137dc=>_0x2137dc?'ck-thread--'+_0x2137dc:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x1733d4['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 _0x21cfe7 of this['commentsListView']['commentViews'])_0x21cfe7['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x1929b6}=this,_0x51bbfd=this['commentsListView']['commentViews']['get'](0x0);_0x51bbfd===this['_boundFirstCommentView']||_0x51bbfd['isSystemComment']||(this['_boundFirstCommentView']=_0x51bbfd,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x51bbfd,'actionIndicator',_0x5d15f4=>'remove'===_0x5d15f4?'remove':null),_0x51bbfd['placeholder']=E(_0x1929b6,'Write\x20a\x20comment...'),_0x51bbfd['removeButton']['on']('execute',_0x4c27bc=>{_0x4c27bc['stop'](),this['showConfirm'](E(_0x1929b6,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x51bbfd['focus']();}),_0x51bbfd['actionBar']['add'](this['resolveButton'],0x0),_0x51bbfd['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0xdf3db0=new _0x4fba49(this['locale']);return _0xdf3db0['label']=E(this['locale'],'Resolve'),_0xdf3db0['tooltip']=E(this['locale'],'Resolve'),_0xdf3db0['icon']=_0xa5051c,_0xdf3db0['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0xdf3db0['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4a9c73=>!_0x4a9c73),_0xdf3db0['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x30c714,_0x545a61)=>_0x30c714&&!_0x545a61),_0xdf3db0['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0xdf3db0;}['_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(_0x1d2242){super(_0x1d2242),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x344fe3,_0x52d863,_0x26faed)=>{this['element']['innerHTML']=_0x26faed;}),this['element']['innerHTML']=this['content'];}}class hs extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x578dab,_0x4b630a,_0x5c6fd5){super(_0x578dab),this['_model']=_0x4b630a,this['_config']=_0x5c6fd5,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x4b630a,'content',_0x4b630a,'authoredAt',(_0x188343,_0x564bce)=>E(_0x578dab,'COMMENT_ARIA_LABEL',[_0x4b630a['author']['name'],_0x5c6fd5['formatDateTime'](_0x564bce),new DOMParser()['parseFromString'](_0x188343,'text/html')['body']['textContent'],_0x4b630a['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x578dab,E(_0x578dab,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x4a86ed(),this['focusTracker']=new _0x11f52f(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4728ff({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x149268=>_0x149268['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?E(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):E(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?E(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):E(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x4b9930=new es(this['locale']);return _0x4b9930['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x2242af,_0x47e89d)=>_0x47e89d?_0x2cb042(_0x2242af,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x2242af),_0x4b9930;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x22b833=new os(this['locale'],this['_config']['editorConfig']);return _0x22b833['value']=this['_model']['content'],_0x22b833['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x22b833['submitLabel']=E(this['locale'],'Save'),_0x22b833['on']('submit',(_0x15afb2,_0x38bb23)=>{this['fire']('updateComment',this['_model']['id'],_0x38bb23),this['switchToDisplayMode'](),this['focus']();}),_0x22b833['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x22b833['once']('editorReady',()=>{_0x22b833['focus']();}),_0x22b833['createEditor'](),_0x22b833['delegate']('editorReady')['to'](this),_0x22b833['delegate']('editorDestroyed')['to'](this),_0x22b833;}['_setupKeyboardNavigation'](){const _0x1f7dfc=this['element'];this['keystrokes']['listenTo'](_0x1f7dfc);for(const _0x475ca3 of this['focusables'])this['focusTracker']['add'](_0x475ca3['element']),this['keystrokes']['listenTo'](_0x475ca3['element']);this['focusables']['on']('change',(_0xee3219,_0x159c8c)=>{for(const _0x261c58 of _0x159c8c['removed'])this['focusTracker']['remove'](_0x261c58['element']),this['keystrokes']['stopListening'](_0x261c58['element']);for(const _0x519e5a of _0x159c8c['added'])this['focusTracker']['add'](_0x519e5a['element']),this['keystrokes']['listenTo'](_0x519e5a['element']);}),this['keystrokes']['set']('enter',(_0x4320d3,_0x3c13eb)=>{_0x1f7dfc===_0x4320d3['target']&&(this['focusCycler']['focusFirst'](),_0x3c13eb());}),this['keystrokes']['set']('esc',(_0x4ed068,_0xc5bd8f)=>{_0x1f7dfc!==_0x4ed068['target']&&(this['focus'](),_0xc5bd8f());});}}class gt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(hs){['actionBar'];['userView'];constructor(_0x259311,_0x5caba1,_0x3f9b47){super(_0x259311,_0x5caba1,_0x3f9b47),this['set']('actionIndicator',null),this['set']('placeholder',E(_0x259311,'Reply...')),this['bind']('authoredAt')['to'](_0x5caba1),this['bind']('resolvedAt')['to'](_0x5caba1),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 _0x4b41c5(_0x259311,_0x5caba1['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x5caba1,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x1a2ef9=this['bindTemplate'],_0x272dbb=[{'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':_0x1a2ef9['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x1a2ef9['to']('authoredAt',_0x5bcb31=>this['_config']['formatDateTime'](_0x5bcb31))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x1a2ef9['if']('isEditMode','ck-comment__actions--hidden'),_0x1a2ef9['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']&&_0x272dbb['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x1a2ef9['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x1a2ef9['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x1a2ef9['if']('isEditMode','ck-comment--edit'),_0x1a2ef9['if']('isSystemComment','ck-comment--info'),_0x1a2ef9['to']('actionIndicator',_0x1637eb=>_0x1637eb?'ck-comment--'+_0x1637eb:'')],'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':_0x272dbb}]}]};}['_createEditButton'](){const _0x22d24e=new _0x3d044c(this['locale']);return _0x22d24e['label']=E(this['locale'],'Edit'),_0x22d24e['icon']=_0x4ba343,_0x22d24e['withText']=!0x0,_0x22d24e['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x22d24e['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x336f54=>!_0x336f54),_0x22d24e['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x22d24e['on']('execute',()=>this['switchToEditMode']()),_0x22d24e;}['_createRemoveButton'](){const _0x266c4e=new _0x3d044c(this['locale']);return _0x266c4e['label']=E(this['locale'],'Remove'),_0x266c4e['icon']=_0x53a112,_0x266c4e['withText']=!0x0,_0x266c4e['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x266c4e['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x53d3ec=>!_0x53d3ec),_0x266c4e['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x266c4e['on']('execute',()=>{this['showConfirm'](E(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x266c4e;}['_createDropdown'](){const _0x3cee40=_0x8fe474(this['locale'],_0x25d5a9),_0x5590b6=_0x3cee40['panelView']['children'],_0x5292d5=new _0x153bd9(this['locale']),_0x48dc74=_0x3cee40['bindTemplate'];_0x398092(_0x3cee40,()=>this['items']['find'](_0x31e43e=>_0x31e43e['isVisible'])),_0x3cee40['extendTemplate']({'attributes':{'class':[_0x48dc74['if']('isVisible','ck-hidden',_0x2ab8e7=>!_0x2ab8e7)]}});const _0x5ce174=(_0x312dc9,_0x152023=-0x1)=>{const _0x5a4d0d=new _0x407e81(this['locale']);_0x5a4d0d['children']['add'](_0x312dc9);const _0x8e1e3c=_0x152023>-0x1?_0x152023:_0x5292d5['items']['length'];_0x5292d5['items']['add'](_0x5a4d0d,_0x8e1e3c);const _0x198b4c=Array['from'](this['items']);_0x3cee40['unbind']('isEnabled','isVisible'),_0x3cee40['bind']('isEnabled')['toMany'](_0x198b4c,'isEnabled',(..._0x1f02af)=>_0x1f02af['some'](_0xd9cd34=>_0xd9cd34)),_0x3cee40['bind']('isVisible')['toMany'](_0x198b4c,'isVisible',(..._0x43da7e)=>_0x43da7e['some'](_0x5605ca=>_0x5605ca));};_0x3cee40['panelPosition']='sw',_0x3cee40['buttonView']['set']({'label':E(this['locale'],'Show\x20more\x20items'),'icon':_0x377d03});for(const _0x21464a of this['items'])_0x5ce174(_0x21464a);return _0x5590b6['add'](_0x5292d5),_0x3cee40['listenTo'](this['items'],'add',(_0x344367,_0x139731,_0x1f251b)=>{_0x5ce174(_0x139731,_0x1f251b);}),_0x3cee40['listenTo'](this['items'],'remove',(_0x402be8,_0x29e467,_0x1c4353)=>{_0x5292d5['items']['remove'](_0x1c4353);}),_0x3cee40;}['_attachActions'](_0x30ab7a,_0x58bf72){const _0x21886f=_0x30ab7a&&_0x30ab7a['element'];_0x21886f&&(this['listenTo'](_0x21886f,'mouseenter',()=>this['actionIndicator']=_0x58bf72),this['listenTo'](_0x21886f,'focus',()=>this['actionIndicator']=_0x58bf72),this['listenTo'](_0x21886f,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x21886f,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x1c7402=super['_createCommentInputView']();return _0x1c7402['bind']('placeholder')['to'](this),_0x1c7402;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Lt(_0x2a280d){const _0x6091bf=Dt(_0x2a280d,0x1e),_0xbe0fcb=new MutationObserver(_0x34ad98=>{for(const _0x1d6c2d of _0x34ad98)('attributes'==_0x1d6c2d['type']&&'class'==_0x1d6c2d['attributeName']||'childList'==_0x1d6c2d['type']||'characterData'==_0x1d6c2d['type'])&&_0x6091bf();});return{'attach'(_0x409737){_0xbe0fcb['observe'](_0x409737,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0xbe0fcb['disconnect'](),_0x6091bf['cancel']();}};}class S extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0xe129f8,_0x3b0cd2){super(_0xe129f8),this['id']=_0x2b0c22(),this['focusTracker']=new _0x11f52f(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x458103,_0x77c0f)=>this['fire']('Esc',_0x77c0f)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=Lt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x3b0cd2),this['mainView']=_0x3b0cd2;const _0x5badcf=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x5badcf['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 _0x4ee93a=this['element']['clientHeight'];_0x4ee93a&&(this['height']=_0x4ee93a);}}class d extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x33a8ce(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x2dc72a,target:_0xd9db82,type:_0x5cd789,isVisible:_0x1fee1a=!0x0}){super(),this['view']=_0x2dc72a,this['view']['element']||this['view']['render'](),this['_type']=_0x5cd789,this['_target']=_0xd9db82,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x172c01([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x3ecfd1,_0x1c5c57)=>{this['view']['focusTracker']['add'](_0x1c5c57);}),this['focusableElements']['on']('remove',(_0x403d2e,_0x2cb2bb)=>{this['view']['focusTracker']['remove'](_0x2cb2bb);}),this['set']('isVisible',_0x1fee1a);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x529576=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x529576),_0x529576;}get['targetRect'](){const _0x166044=this['target'];if(null===_0x166044)return null;if(_0x166044 instanceof _0x5121c1)return _0x166044;const _0x51bdae=_0x166044['filter'](_0x4e5d2a=>function(_0x2c866c){const _0x1b5003=_0x2c866c['offsetParent'];if(_0x1b5003)return!0x0;const _0x3052cd=_0x2c866c['getClientRects']()['item'](0x0);return!!_0x3052cd;}(_0x4e5d2a));return 0x0===_0x51bdae['length']?null:new _0x5121c1(_0x51bdae[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x519de4){this['view']['isActive']=_0x519de4,this['view']['mainView']['isActive']=_0x519de4;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x3c64d6){if(!(null===_0x3c64d6||_0x3c64d6 instanceof _0x5121c1||Array['isArray'](_0x3c64d6)&&_0x3c64d6['every'](_0x3c5cde=>li(_0x3c5cde))))throw new _0x3611b8('annotation-invalid-target',null,{'target':_0x3c64d6});}['_getNormalizedTarget'](){const _0x367005='function'==typeof this['_target']?this['_target']():this['_target'];return li(_0x367005)?[_0x367005]:_0x367005;}}function li(_0x3afc74){return null!==_0x3afc74&&'object'==typeof _0x3afc74&&'nodeType'in _0x3afc74&&0x1===_0x3afc74['nodeType'];}class _ extends _0x172c01{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x488acd=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x11f52f(),this['_focusTracker']['on']('change:isFocused',(_0x461506,_0x2d332c,_0x24c161)=>{_0x24c161||this['fire']('blur');});for(const _0x3468f8 of _0x488acd)this['add'](_0x3468f8);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x28b39a){if(this['has'](_0x28b39a))throw new _0x3611b8('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x28b39a['innerView'],_0x28b39a),this['_viewToAnnotation']['set'](_0x28b39a['view'],_0x28b39a);for(const _0x219104 of _0x28b39a['focusableElements'])this['_focusTracker']['add'](_0x219104);this['listenTo'](_0x28b39a['focusableElements'],'add',(_0x2e043e,_0x26310e)=>{this['_focusTracker']['add'](_0x26310e);}),this['listenTo'](_0x28b39a['focusableElements'],'remove',(_0xc3f01,_0x5d147b)=>{this['_focusTracker']['remove'](_0x5d147b);}),this['listenTo'](_0x28b39a['view']['focusTracker'],'change:isFocused',(_0x3a3d89,_0x3172df,_0x3d153a)=>{_0x3d153a&&this['fire']('focus',_0x28b39a);}),_0x28b39a['updateTargetRect']();const _0xf623e5=this['_getOrderInContent'](_0x28b39a['view']['targetRect']);return super['add'](_0x28b39a,_0xf623e5);}['remove'](_0x1a98cf){if(!this['has'](_0x1a98cf))throw new _0x3611b8('annotationcollection-not-existing-item',null);this['stopListening'](_0x1a98cf['view']['focusTracker']),this['stopListening'](_0x1a98cf['focusableElements']);for(const _0xbf7027 of _0x1a98cf['focusableElements'])this['_focusTracker']['remove'](_0xbf7027);return this['_viewToAnnotation']['delete'](_0x1a98cf['view']),this['_innerViewToAnnotation']['delete'](_0x1a98cf['innerView']),super['remove'](_0x1a98cf);}['getByInnerView'](_0x4841e4){return this['_innerViewToAnnotation']['get'](_0x4841e4);}['getByView'](_0x3c58c5){return this['_viewToAnnotation']['get'](_0x3c58c5);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x2422a4 of this)_0x2422a4['updateTargetRect']();this['_sort']();}['_sort'](){const _0x4e009d=Array['from'](this)['sort']((_0x5d39f8,_0x40a640)=>v(_0x5d39f8['view']['targetRect'],_0x40a640['view']['targetRect']));for(let _0x267d9f=_0x4e009d['length']-0x1;_0x267d9f>0x0;_0x267d9f--){const _0x4c2405=_0x4e009d[_0x267d9f];_0x267d9f!==this['getIndex'](_0x4c2405)&&(this['remove'](_0x4c2405),this['add'](_0x4c2405));}}['_getOrderInContent'](_0x1ac822){let _0x5285e5=0x0;if(!_0x1ac822)return this['length'];for(const _0x378373 of this){const _0x2265e5=_0x378373['view']['targetRect'];if(_0x2265e5){if(v(_0x1ac822,_0x2265e5)<0x0)return _0x5285e5;_0x5285e5++;}}return _0x5285e5;}}function v(_0x88433b,_0x57a8d5){if(null===_0x88433b&&null===_0x57a8d5)return 0x0;if(null===_0x88433b)return-0x1;if(null===_0x57a8d5)return 0x1;const _0x5ce9b7=_0x88433b['top']-_0x57a8d5['top'];return 0x0==_0x5ce9b7?_0x88433b['left']-_0x57a8d5['left']:_0x5ce9b7;}class O extends _0x43274a{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3870d7){if(super(_0x3870d7),this['collection']=new _(),this['_visibleAnnotations']=new _(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x3870d7 instanceof _0x3fbaf8){const _0x35fd8c=_0x3870d7['locale'];_0x3870d7['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':E(_0x35fd8c,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':E(_0x35fd8c,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':E(_0x35fd8c,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':E(_0x35fd8c,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':E(_0x35fd8c,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':E(_0x35fd8c,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':E(_0x35fd8c,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x3852b6){this['collection']['add'](_0x3852b6);}['remove'](_0x1ca2d9){this['collection']['remove'](_0x1ca2d9),_0x1ca2d9['destroy']();}['refreshVisibility'](){for(const _0x4dfe88 of this['collection'])_0x4dfe88['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x8b6efa){return this['collection']['getByInnerView'](_0x8b6efa);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x236b94 of this['collection'])_0x236b94['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x402288){this['fire']('_activateAnnotation',_0x402288);}['createAnnotation'](_0x4a795f){return new d(_0x4a795f);}['createAnnotationView'](_0x3568f9,_0x26674f){return new S(_0x3568f9,_0x26674f);}['_addActiveAnnotation'](_0x4898cb){const _0x402ef8=new Set(this['activeAnnotations']);_0x402ef8['add'](_0x4898cb),this['activeAnnotations']=_0x402ef8;}['_removeActiveAnnotation'](_0x3c4d58){const _0x210777=new Set(this['activeAnnotations']);_0x210777['delete'](_0x3c4d58),this['activeAnnotations']=_0x210777;}['_bindAnnotationsToVisibleAnnotations'](){const _0x3eb37a=this['collection'],_0x537e6c=this['_visibleAnnotations'];function _0x452c8c(_0x3b51e6){const _0x5a4f53=_0x3b51e6['source'];_0x5a4f53['isVisible']&&!_0x537e6c['has'](_0x5a4f53)?_0x537e6c['add'](_0x5a4f53):!_0x5a4f53['isVisible']&&_0x537e6c['has'](_0x5a4f53)&&_0x537e6c['remove'](_0x5a4f53),_0x5a4f53['view']['focusTracker']['remove'](_0x5a4f53['view']['element']),_0x5a4f53['view']['focusTracker']['add'](_0x5a4f53['view']['element']);}this['listenTo'](_0x3eb37a,'add',(_0x4ac794,_0x1343ce)=>{_0x1343ce['isVisible']&&_0x537e6c['add'](_0x1343ce),this['listenTo'](_0x1343ce,'change:isVisible',_0x452c8c);}),this['listenTo'](_0x3eb37a,'remove',(_0x453fc0,_0x41a948)=>{_0x537e6c['has'](_0x41a948)&&_0x537e6c['remove'](_0x41a948),this['stopListening'](_0x41a948,'change:isVisible',_0x452c8c);});}['_setupEnterAnnotationKeystroke'](){const _0x2be2fa=_0x227493=>{_0x227493['on']('ready',()=>{_0x227493['keystrokes']['set'](_0x547e5e,(_0x2b25cb,_0xc1790a)=>{const _0x397c1b=_0x4a06d2(this['activeAnnotations']['values']());_0x397c1b&&(_0x397c1b['view']['focus'](),_0xc1790a());});});};this['context']instanceof _0x3fbaf8?_0x2be2fa(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x56250e,_0x1495c3)=>{_0x2be2fa(_0x1495c3);});}['_setupEscapeAnnotationHandling'](){const _0x64c5b5=_0x13680d=>{const _0x374b52=_0x13680d['source'],_0x3a89bc=[];let _0x3f1953;if(Array['isArray'](_0x374b52['target'])){_0x3f1953=_0x374b52['target'][0x0],this['context']instanceof _0x3fbaf8?_0x3a89bc['push'](this['context']):this['context']['editors']&&_0x3a89bc['push'](...this['context']['editors']);for(const _0x246cc7 of _0x3a89bc)for(const _0x3b7d9d of _0x246cc7['editing']['view']['domRoots']['values']())if(_0x3b7d9d['contains'](_0x3f1953))return void _0x246cc7['editing']['view']['focus']();_0x3f1953['focus']();}};this['listenTo'](this['collection'],'add',(_0x487a4e,_0x516316)=>{this['listenTo'](_0x516316,'escape',_0x64c5b5,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x2b69ef,_0x5815c0)=>{this['stopListening'](_0x5815c0,'escape',_0x64c5b5);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x43274a{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[O,ht,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x15ff82){super(_0x15ff82),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x275dc=this['context']['config'];_0x275dc['define']('comments.maxCommentsWhenCollapsed',0x2),_0x275dc['define']('comments.maxThreadTotalWeight',0x1f4),_0x275dc['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x275dc['define']('comments.CommentThreadView',vt),_0x275dc['define']('comments.CommentView',gt),_0x275dc['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x1bc021=this['context']['plugins']['get'](O);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x59b61a,_0x1791a3)=>this['_addCommentThread'](_0x1791a3)),this['on']('submitCommentThread',(_0x3947bb,_0x45d807)=>this['_submitCommentThread'](_0x45d807)),this['on']('resolveCommentThread',(_0x590f14,_0x5c6c74)=>this['_resolveCommentThread'](_0x5c6c74)),this['on']('resolveCommentThread',(_0x20e4d3,_0x15c5a6)=>this['_updateActiveAnnotation'](_0x15c5a6),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x149e4c,_0x25241b)=>this['_reopenCommentThread'](_0x25241b)),this['on']('reopenCommentThread',(_0x415172,_0x2daff3)=>this['_updateActiveAnnotation'](_0x2daff3),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x2abf33,_0x6e9017)=>this['_removeCommentThread'](_0x6e9017)),this['on']('updateCommentThread',(_0x39d6e7,_0xc36792)=>this['_updateCommentThread'](_0xc36792)),this['on']('updateCommentThread',(_0x21b2f9,_0x35ebf0)=>this['_updateActiveAnnotation'](_0x35ebf0),{'priority':'lowest'}),this['on']('addComment',(_0x4cc33d,_0x56caaa)=>this['_addComment'](_0x56caaa)),this['on']('updateComment',(_0xf7d9f8,_0x2b7cf9)=>this['_updateComment'](_0x2b7cf9)),this['on']('removeComment',(_0x3c6dc0,_0x355327)=>this['_removeComment'](_0x355327)),this['on']('addComment',(_0x3f9320,{threadId:_0x5bfcc1,isFromAdapter:_0x2a03a9})=>{if(_0x2a03a9)return;const _0x8067ad=this['getCommentThread'](_0x5bfcc1),_0x452a12=_0x8067ad&&this['_threadToController']['get'](_0x8067ad);_0x452a12&&_0x452a12['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x1bc021,'change:activeAnnotations',(_0x10f7f6,_0x503fc5,_0x3c1cd7)=>{const _0x465334=Array['from'](_0x3c1cd7)['map'](_0x2ded3b=>this['_viewToController']['get'](_0x2ded3b['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x465334?_0x465334['model']:null;});}set['adapter'](_0x4ff2f8){if(this['_adapter'])throw new _0x3611b8('commentsrepository-adapter-already-set');this['_adapter']=_0x4ff2f8;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x257127=Tt,threadId:_0x3e93ad=_0x2b0c22(),comments:_0x4bf519=[],unlinkedAt:_0x452e51=null,resolvedAt:_0x5eac38=null,resolvedBy:_0x312143=null,target:_0x13b7b0=null,context:_0x1122bd=null,attributes:_0xce3343={},isResolvable:_0x478acb=!0x0,isSubmitted:_0x5be0ad=!0x1,isFromAdapter:_0x2619ca=!0x1}={}){return this['fire'](bt('addCommentThread',_0x257127),{'channelId':_0x257127,'threadId':_0x3e93ad,'comments':_0x4bf519,'unlinkedAt':_0x452e51,'resolvedAt':_0x5eac38,'resolvedBy':_0x312143,'target':_0x13b7b0,'context':_0x1122bd,'attributes':_0xce3343,'isFromAdapter':_0x2619ca,'isResolvable':_0x478acb,'isSubmitted':_0x5be0ad}),this['getCommentThread'](_0x3e93ad);}['openNewCommentThread']({channelId:_0x3ce2ed=Tt,threadId:_0x4d6dc8=_0x2b0c22(),target:_0x358f02,context:_0x12fc85=null,isResolvable:_0x1e6a75=!0x0}){if(this['_readOnlyChannels']['has'](_0x3ce2ed)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x358f02)throw new _0x3611b8('commentsrepository-missing-target');const _0x265272=this['addCommentThread']({'channelId':_0x3ce2ed,'threadId':_0x4d6dc8,'target':_0x358f02,'context':_0x12fc85,'isResolvable':_0x1e6a75});if(!_0x265272)return null;const _0x45452c=this['_threadToController']['get'](_0x265272),_0x59b48b=_0x45452c['view']['commentThreadInputView']['commentInputView'],_0x506648=this['context']['plugins']['get'](O),_0x2fefca=_0x506648['getByInnerView'](_0x45452c['view']);return _0x506648['activate'](_0x2fefca),_0x59b48b['once']('editorReady',()=>_0x59b48b['focus']()),_0x265272;}['hasCommentThread'](_0x4e8e42){if('string'!=typeof _0x4e8e42)throw new _0x3611b8('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x4e8e42);}['updateCommentThread']({channelId:_0x14a8ae=Tt,threadId:_0x4a88ae,context:_0x48912f,unlinkedAt:_0x2022e9,attributes:_0x393344,isFromAdapter:_0x2ad318=!0x1}){return this['fire'](bt('updateCommentThread',_0x14a8ae),{'channelId':_0x14a8ae,'threadId':_0x4a88ae,'context':_0x48912f,'unlinkedAt':_0x2022e9,'attributes':_0x393344,'isFromAdapter':_0x2ad318}),this['getCommentThread'](_0x4a88ae);}['getCommentThread'](_0x3f2290){if('string'!=typeof _0x3f2290)throw new _0x3611b8('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x3f2290);}['fetchCommentThread']({channelId:_0x11bc34,threadId:_0x1e51d5}={}){const _0x41654c=this['getCommentThread'](_0x1e51d5);if(_0x41654c)return Promise['resolve'](_0x41654c);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x3611b8('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x11bc34,'threadId':_0x1e51d5})['then'](_0x1f9ce8=>this['hasCommentThread'](_0x1e51d5)?this['getCommentThread'](_0x1e51d5):_0x1f9ce8?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x11bc34},_0x1f9ce8)):void 0x0)['catch'](_0x12dca0=>{throw console['error'](_0x12dca0),new _0x3611b8('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x38d980,skipNotAttached:_0x2d7e79=!0x1,skipEmpty:_0x59b92c=!0x1,toJSON:_0x27c1e9=!0x1}={}){const _0x29360c=[];for(const _0x2448b4 of this['_threads']['values']())_0x38d980&&_0x2448b4['channelId']!==_0x38d980||_0x2d7e79&&!_0x2448b4['isAttached']||_0x59b92c&&0x0===_0x2448b4['length']||_0x29360c['push'](_0x2448b4);return _0x27c1e9?_0x29360c['map'](_0x1dfab1=>_0x1dfab1['toJSON']()):_0x29360c;}['setActiveCommentThread'](_0x3c9303){const _0xd0b094=this['context']['plugins']['get'](O);if(!_0x3c9303)return void(this['activeCommentThread']&&_0xd0b094['deactivateAll']());const _0x1680f0=this['getCommentThread'](_0x3c9303);if(!_0x1680f0)throw new _0x3611b8('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x3c9303});if(!this['_threadToController']['has'](_0x1680f0))throw new _0x3611b8('commentsrepository-active-not-attached',null,{'threadId':_0x3c9303});const _0x190579=_0xd0b094['getByInnerView'](this['_threadToController']['get'](_0x1680f0)['view']);_0xd0b094['activate'](_0x190579);}['switchReadOnly'](_0xf26440,_0x39e8a){_0xf26440?this['_readOnlyChannels']['add'](_0x39e8a):this['_readOnlyChannels']['delete'](_0x39e8a),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x238fea){return this['_readOnlyChannels']['has'](_0x238fea)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x2f581f,_0x1e5fa0){return new Ct(_0x2f581f,_0x1e5fa0);}['setPermissions'](_0x17fd4e,_0x1c01bb=Tt){this['_permissions']['set'](_0x1c01bb,_0x17fd4e),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0xcd8b2f=Tt){return this['_permissions']['has'](_0xcd8b2f)?this['_permissions']['get'](_0xcd8b2f):_t;}['_addCommentThread']({channelId:_0x2f044b,threadId:_0x57c289,comments:_0x4d4b99,unlinkedAt:_0x1a6161,resolvedAt:_0x9bb65b,resolvedBy:_0x4e7c5b,target:_0x3ee864,context:_0x23e80b,attributes:_0x10615b,isFromAdapter:_0x334aff,isResolvable:_0x241649,isSubmitted:_0x2c7aae}){if('string'!=typeof _0x57c289)throw new _0x3611b8('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x57c289});if(this['hasCommentThread'](_0x57c289))throw new _0x3611b8('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x57c289});const _0x25b433=new ui(this,{'channelId':_0x2f044b,'id':_0x57c289,'context':_0x23e80b,'attributes':_0x10615b,'unlinkedAt':_0x1a6161,'resolvedAt':_0x9bb65b,'resolvedBy':_0x4e7c5b?this['context']['plugins']['get'](it)['getUser'](_0x4e7c5b):null,'isResolvable':_0x241649,'isSubmitted':_0x2c7aae||_0x334aff});this['_threads']['set'](_0x57c289,_0x25b433);for(const _0xa1bdd3 of _0x4d4b99)_0x25b433['_add'](this['_createNewComment']({'threadId':_0x57c289,..._0xa1bdd3}));return _0x3ee864&&_0x25b433['attachTo'](_0x3ee864),_0x334aff||!_0x25b433['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x2f044b,'threadId':_0x57c289});}['_submitCommentThread']({channelId:_0x46ac2e,threadId:_0x14c1cc}){if(!this['hasCommentThread'](_0x14c1cc))throw new _0x3611b8('commentsrepository-missing-comment-thread',this);const _0x20ddc0=this['getCommentThread'](_0x14c1cc);if(_0x20ddc0['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x12c5f4,comments:_0x14f451,resolvedAt:_0xf9d52e,resolvedBy:_0x5855d6,context:_0x35b737,attributes:_0x3456d2}=_0x20ddc0,_0x504756=this['context']['plugins']['get']('PendingActions'),_0x18b97e=_0x504756['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x46ac2e,'threadId':_0x12c5f4,'comments':_0x14f451['map'](_0x30edd6=>_0x30edd6['toJSON']()),'resolvedAt':_0xf9d52e,'resolvedBy':_0x5855d6?_0x5855d6['id']:_0x5855d6,'context':_0x35b737,'attributes':_0x3456d2})['then'](({comments:_0x224a35})=>{_0x504756['remove'](_0x18b97e);for(const _0x367bf6 of _0x224a35)this['_updateComment']({'channelId':_0x46ac2e,'threadId':_0x14c1cc,'commentId':_0x367bf6['commentId'],'createdAt':_0x367bf6['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x3cc6f7=>{throw console['error'](_0x3cc6f7),new _0x3611b8('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x33cbb2,target:_0x53806}){const _0x487dfb=this['getCommentThread'](_0x33cbb2);if(!_0x487dfb)throw new _0x3611b8('commentsrepository-attach-missing-comment-thread',this);const _0x5af3e5=this['context']['plugins']['get']('PendingActions'),_0x2b72fb=this['context']['plugins']['get'](O),_0x1f9d38=this['_createCommentThreadView'](_0x487dfb),_0x203ea1=new Ct(_0x487dfb,_0x1f9d38);let _0x5206d7=null;_0x1f9d38['on']('change:isDirty',(_0x9aaff,_0x57c235,_0x212be4)=>{_0x212be4?_0x5206d7=_0x5af3e5['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x5206d7&&(_0x5af3e5['remove'](_0x5206d7),_0x5206d7=null);}),this['_threadToController']['set'](_0x487dfb,_0x203ea1),this['_viewToController']['set'](_0x1f9d38,_0x203ea1);const _0x4ff001=new S(this['context']['locale'],_0x1f9d38);_0x4ff001['bind']('length')['to'](_0x1f9d38),_0x4ff001['bind']('isDirty')['to'](_0x1f9d38,'isDirty',_0x1f9d38,'length',(_0x302096,_0x1a8853)=>_0x302096||!_0x1a8853),_0x4ff001['bind']('isActive')['to'](_0x1f9d38),_0x4ff001['type']='comment';const _0x11551d=new d({'view':_0x4ff001,'target':_0x53806,'type':'comment','isVisible':!_0x487dfb['archivedAt']});return _0x1f9d38['on']('escape',()=>{_0x11551d['fire']('escape');}),this['_bindAnnotationToEditors'](_0x1f9d38,_0x11551d),_0x2b72fb['add'](_0x11551d),_0x11551d;}['_bindAnnotationToEditors'](_0x4e5df8,_0x19500f){this['listenTo'](_0x4e5df8,'editorReady',(_0xe26018,_0x252faa)=>{const _0x287d07=_0x252faa['ui']['view']['body']['bodyCollectionContainer'];_0x19500f['focusableElements']['add'](_0x287d07),this['context']instanceof _0x3fbaf8&&this['context']['ui']['focusTracker']['add'](_0x287d07);},{'priority':'highest'}),this['listenTo'](_0x4e5df8,'editorDestroyed',(_0x50e695,_0xfb95db)=>{const _0x49622a=_0xfb95db['ui']['view']['body']['bodyCollectionContainer'];_0x19500f['focusableElements']['has'](_0x49622a)&&_0x19500f['focusableElements']['remove'](_0x49622a),this['context']instanceof _0x3fbaf8&&this['context']['ui']['focusTracker']['remove'](_0x49622a);});}['_unbindEditors'](_0x45bc6e){this['stopListening'](_0x45bc6e,'editorReady'),this['stopListening'](_0x45bc6e,'editorDestroyed');}['_createCommentThreadView'](_0x27d527){const _0x284d20=this['context']['plugins']['get'](it),{config:_0x323d83,locale:_0x26a1c2}=this['context'],_0x380c9c=lt(_0x323d83['get']('locale'),_0x26a1c2);return new(0x0,(_0x323d83['get']('comments'))['CommentThreadView'])(_0x26a1c2,_0x27d527,_0x284d20['me'],{'editorConfig':{..._0x323d83['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x323d83['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x323d83['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x323d83['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x323d83['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x380c9c,'CommentView':_0x323d83['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x11c97f,channelId:_0x51cd14,resolvedAt:_0x1f1e50,resolvedBy:_0x3e007e,isFromAdapter:_0x371dd4}){if(!this['hasCommentThread'](_0x11c97f))throw new _0x3611b8('commentsrepository-missing-comment-thread',null,{'threadId':_0x11c97f});const _0x4fc56c=this['getCommentThread'](_0x11c97f);if(_0x4fc56c['isResolved'])throw new _0x3611b8('commentsrepository-resolved-comment-thread',null,{'threadId':_0x11c97f});const _0xd26e5d=this['context']['plugins']['get'](it);if(_0x4fc56c['resolvedBy']=_0xd26e5d['getUser'](_0x3e007e),_0x4fc56c['resolvedAt']=_0x1f1e50,_0x371dd4||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x1454b9=this['context']['plugins']['get']('PendingActions'),_0x4e2bad=_0x1454b9['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x51cd14,'threadId':_0x11c97f})['then'](({resolvedAt:_0x2252b4,resolvedBy:_0x568d2b})=>{_0x1454b9['remove'](_0x4e2bad),_0x4fc56c['resolvedBy']['id']!==_0x568d2b&&(_0x4fc56c['resolvedBy']=_0xd26e5d['getUser'](_0x568d2b)),_0x4fc56c['resolvedAt']=_0x2252b4;})['catch'](_0xc5e20c=>{throw console['error'](_0xc5e20c),new _0x3611b8('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x4e21e1,channelId:_0x57fb03,isFromAdapter:_0x3cef1a}){if(!this['hasCommentThread'](_0x4e21e1))throw new _0x3611b8('commentsrepository-missing-comment-thread',null,{'threadId':_0x4e21e1});const _0x1f9985=this['getCommentThread'](_0x4e21e1);if(!_0x1f9985['isResolved'])throw new _0x3611b8('commentsrepository-reopen-comment-thread',null,{'threadId':_0x4e21e1});if(_0x1f9985['resolvedBy']=null,_0x1f9985['resolvedAt']=null,_0x3cef1a||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x2afb03=this['context']['plugins']['get']('PendingActions'),_0x6a3144=_0x2afb03['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x57fb03,'threadId':_0x4e21e1})['then'](()=>_0x2afb03['remove'](_0x6a3144))['catch'](_0xce3f04=>{throw console['error'](_0xce3f04),new _0x3611b8('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x2255a1,isFromAdapter:_0x22effe}){const _0x9d90c7=this['getCommentThread'](_0x2255a1);if(!_0x9d90c7)throw new _0x3611b8('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x2255a1),this['_threads']['delete'](_0x2255a1),!_0x9d90c7['isSubmitted']||_0x22effe||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x407c81=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3db24b}=_0x9d90c7,_0x4ae632=_0x407c81['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x3db24b,'threadId':_0x2255a1})['then'](()=>_0x407c81['remove'](_0x4ae632))['catch'](_0x555506=>{throw console['error'](_0x555506),new _0x3611b8('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x81049a,unlinkedAt:_0x4d0ba8,context:_0x21ea66,attributes:_0x2721bd,isFromAdapter:_0x2b5183}){if('string'!=typeof _0x81049a)throw new _0x3611b8('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x81049a});if(!this['hasCommentThread'](_0x81049a))throw new _0x3611b8('commentsrepository-missing-comment-thread',null,{'threadId':_0x81049a});const _0x20be9d=this['getCommentThread'](_0x81049a);let _0x56d596=!0x1;if(void 0x0!==_0x21ea66&&_0x20be9d['context']!==_0x21ea66&&(_0x20be9d['context']=_0x21ea66,_0x56d596=!0x0),void 0x0!==_0x4d0ba8&&_0x20be9d['unlinkedAt']!==_0x4d0ba8&&(_0x20be9d['unlinkedAt']=_0x4d0ba8,_0x56d596=!0x0),_0x2721bd&&!wt(_0x2721bd,_0x20be9d['attributes'])&&(_0x20be9d['attributes']=_0x2721bd,_0x56d596=!0x0),!_0x56d596)return Promise['resolve']();if(!_0x20be9d['isSubmitted']||_0x2b5183||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x2d62d5=this['context']['plugins']['get']('PendingActions'),{channelId:_0x27a935}=_0x20be9d,_0x42eac4=_0x2d62d5['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x27a935,'threadId':_0x81049a,'context':_0x21ea66,'unlinkedAt':_0x4d0ba8,'attributes':_0x2721bd})['then'](()=>_0x2d62d5['remove'](_0x42eac4))['catch'](_0x123d32=>{throw console['error'](_0x123d32),new _0x3611b8('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x4e8b95){const _0x4510ae=this['context']['plugins']['get'](O),_0x5bdf06=this['getCommentThread'](_0x4e8b95);if(_0x5bdf06['_isAttached']=!0x1,this['_threadToController']['has'](_0x5bdf06)){const _0x55e950=this['_threadToController']['get'](_0x5bdf06),_0x13afa5=_0x55e950['view'],_0x39acbe=_0x4510ae['getByInnerView'](_0x13afa5);this['_threadToController']['delete'](_0x5bdf06),this['_viewToController']['delete'](_0x13afa5),_0x39acbe&&_0x4510ae['remove'](_0x39acbe),_0x55e950['destroy'](),_0x13afa5['destroy']()['then'](()=>{this['_unbindEditors'](_0x13afa5);});}}['_updateActiveAnnotation']({threadId:_0x14a2d0,resolvedAt:_0x2bed69,unlinkedAt:_0x51d861}){const _0x2db006=!!_0x2bed69,_0x356475=this['context']['plugins']['get'](O),_0x239a5d=this['getCommentThread'](_0x14a2d0);if(this['_threadToController']['has'](_0x239a5d)){const _0x5692f4=this['_threadToController']['get'](_0x239a5d)['view'],_0x44a221=_0x356475['getByInnerView'](_0x5692f4);_0x44a221&&(_0x2db006&&_0x356475['_removeActiveAnnotation'](_0x44a221),_0x51d861?_0x44a221['isVisible']=!0x1:_0x44a221['refreshVisibility']());}}['_getExternalAuthor'](_0x3781b2){const _0x126f87=this['context']['plugins']['get'](it),_0x1ba09c=pt('external:'+_0x3781b2),_0x24e004=_0x126f87['getUser'](_0x1ba09c);return _0x24e004||_0x126f87['addUser']({'id':_0x1ba09c,'name':_0x3781b2});}['_createNewComment']({threadId:_0x552263,commentId:_0x925c4b=_0x2b0c22(),content:_0x11b6e9,authorId:_0x4cc24e,createdAt:_0x3f8e1c,attributes:_0x416a32}){if('string'!=typeof _0x925c4b)throw new _0x3611b8('commentsrepository-invalid-commentid');if('string'!=typeof _0x4cc24e)throw new _0x3611b8('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x11b6e9||!_0x11b6e9['trim']())throw new _0x3611b8('commentsrepository-invalid-comment-content');const _0x575f1f=this['context']['plugins']['get'](it)['getUser'](_0x4cc24e);if(!_0x575f1f)throw new _0x3611b8('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x4cc24e});let _0xda583=null,_0x3a9194=_0x3f8e1c;return _0x416a32?.['@external']&&(_0xda583=this['_getExternalAuthor'](_0x416a32['@external']['authorName']),_0x3a9194=new Date(_0x416a32['@external']['createdAt'])),new fi(this,{'threadId':_0x552263,'id':_0x925c4b,'author':_0xda583||_0x575f1f,'creator':_0x575f1f,'content':_0x11b6e9,'createdAt':_0x3f8e1c,'authoredAt':_0x3a9194,'attributes':_0x416a32});}['_addComment'](_0x1bbf11){let {threadId:_0x37c0ed,content:_0x578ede,attributes:_0x26ddeb,isFromAdapter:_0x5ec5de}=_0x1bbf11;const _0x3221ca=this['getCommentThread'](_0x1bbf11['threadId']);if(!_0x3221ca)throw new _0x3611b8('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x33b234=this['_createNewComment'](_0x1bbf11),{id:_0x565604}=_0x33b234;if(_0x3221ca['_add'](_0x33b234),_0x5ec5de||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x3221ca['isSubmitted'])return Promise['resolve']();const _0x601a8=this['context']['plugins']['get']('PendingActions'),{channelId:_0x38a589}=_0x3221ca,_0x436961=_0x601a8['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x26ddeb||(_0x26ddeb={}),this['adapter']['addComment']({'channelId':_0x38a589,'threadId':_0x37c0ed,'commentId':_0x565604,'content':_0x578ede,'attributes':_0x26ddeb})['then'](_0x1df3c2=>{_0x601a8['remove'](_0x436961),_0x1df3c2&&this['_updateComment']({'channelId':_0x38a589,'threadId':_0x37c0ed,'commentId':_0x565604,'createdAt':_0x1df3c2['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x237ce8=>{throw console['error'](_0x237ce8),new _0x3611b8('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x2c1887,commentId:_0x438db3,content:_0x408ad1,createdAt:_0x47bd4f,attributes:_0x5a3e1e,isFromAdapter:_0x1b5182}){if(void 0x0!==_0x408ad1&&('string'!=typeof _0x408ad1||!_0x408ad1['trim']()['length']))throw new _0x3611b8('commentsrepository-update-comment-invalid-content');const _0x49c608=this['getCommentThread'](_0x2c1887),_0x21c41d=_0x49c608['getComment'](_0x438db3);if(!_0x21c41d)throw new _0x3611b8('commentsrepository-update-missing-comment',this);let _0x4df7b2=!0x1;if(_0x408ad1&&_0x408ad1!==_0x21c41d['content']&&(_0x21c41d['isEditable']||_0x1b5182)&&(_0x21c41d['content']=_0x408ad1,_0x4df7b2=!0x0),_0x47bd4f&&_0x47bd4f!==_0x21c41d['createdAt']&&(_0x21c41d['createdAt']=_0x47bd4f,_0x21c41d['attributes']&&_0x21c41d['attributes']['@external']||(_0x21c41d['authoredAt']=_0x47bd4f),_0x4df7b2=!0x0),_0x5a3e1e&&!wt(_0x5a3e1e,_0x21c41d['attributes'])&&(_0x21c41d['attributes']=_0x5a3e1e,_0x4df7b2=!0x0),!_0x4df7b2)return Promise['resolve']();if(_0x49c608['fire']('commentUpdated'),_0x1b5182||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x2fa5c8=this['context']['plugins']['get']('PendingActions'),{channelId:_0x241181}=this['getCommentThread'](_0x21c41d['threadId']),_0x41850b=_0x2fa5c8['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x241181,'threadId':_0x2c1887,'commentId':_0x438db3,'content':_0x408ad1,'attributes':_0x5a3e1e})['then'](()=>_0x2fa5c8['remove'](_0x41850b))['catch'](_0x3d6167=>{throw console['error'](_0x3d6167),new _0x3611b8('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x5a2e72,commentId:_0x307792,isFromAdapter:_0x4aa1b3}){const _0x43cb1c=this['getCommentThread'](_0x5a2e72),_0x4a3372=_0x43cb1c['getComment'](_0x307792);if(!_0x4a3372)throw new _0x3611b8('commentsrepository-remove-missing-comment',this);if(_0x43cb1c['_remove'](_0x4a3372),_0x4aa1b3||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x5e88d1=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3641f3}=_0x43cb1c,_0x2e8c08=_0x5e88d1['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x3641f3,'threadId':_0x5a2e72,'commentId':_0x307792})['then'](()=>_0x5e88d1['remove'](_0x2e8c08))['catch'](_0xd9b8a4=>{throw console['error'](_0xd9b8a4),new _0x3611b8('commentsrepository-remove-comment-internal-error',this);});}}class ui extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x33a8ce(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x1dcfc6,_0xadb164){super();const _0x26d396=_0xadb164['isResolvable'];this['channelId']=_0xadb164['channelId'],this['id']=_0xadb164['id'],this['comments']=new _0x172c01(),this['_repository']=_0x1dcfc6,this['_isAttached']=!0x1,this['_isSubmitted']=_0xadb164['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x1dcfc6,'_permissions',_0x1dcfc6,'_readOnlyChannels',()=>_0x1dcfc6['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x1dcfc6,'_permissions',()=>_0x1dcfc6['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x1dcfc6,'_permissions',()=>{const _0x583948=_0x1dcfc6['getPermissions'](this['channelId']);return _0x583948['write']||_0x583948['admin'];}),this['bind']('isResolvable')['to'](_0x1dcfc6,'_permissions',()=>_0x26d396&&_0x1dcfc6['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0xadb164['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x3ff993,_0x1379b3)=>_0x3ff993?_0x1379b3?_0x3ff993<_0x1379b3?_0x3ff993:_0x1379b3:_0x3ff993:_0x1379b3),this['set']('unlinkedAt',_0xadb164['unlinkedAt']||null),this['set']('resolvedAt',_0xadb164['resolvedAt']||null),this['set']('resolvedBy',_0xadb164['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x1cd477=>!!_0x1cd477),this['set']('attributes',_0xadb164['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x2e500a,_0x2ea8c2)=>_0x2e500a+_0x2ea8c2['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x43ccfa,id:_0x3f574c}=this;this['_repository']['fire'](bt('submitCommentThread',_0x43ccfa),{'channelId':_0x43ccfa,'threadId':_0x3f574c});}['setUnlinkedAt'](_0x530c1c){this['_update']({'unlinkedAt':_0x530c1c});}['resolve']({resolvedAt:_0x12b64=new Date(),resolvedBy:_0x469845=null,isFromAdapter:_0x5345f7=!0x1}={}){const _0x1630e5=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x1d9871,id:_0xb0a6e2}=this;this['_repository']['fire'](bt('resolveCommentThread',_0x1d9871),{'channelId':_0x1d9871,'threadId':_0xb0a6e2,'resolvedAt':_0x12b64,'resolvedBy':_0x469845||_0x1630e5['id'],'isFromAdapter':_0x5345f7});}['reopen']({isFromAdapter:_0x5ef95b=!0x1}={}){const {channelId:_0x283375,id:_0x37def2}=this;this['_repository']['fire'](bt('reopenCommentThread',_0x283375),{'channelId':_0x283375,'threadId':_0x37def2,'isFromAdapter':_0x5ef95b});}['setContext'](_0x454241){this['context']||this['_update']({'context':_0x454241});}['setAttribute'](_0x22330e,_0x4e2cf5){const _0x31efd6=It(this['attributes']);At(_0x31efd6,_0x22330e,_0x4e2cf5),this['_update']({'attributes':_0x31efd6});}['removeAttribute'](_0x4e7cb4){const _0x298e6b=It(this['attributes']);yt(_0x298e6b,_0x4e7cb4),this['_update']({'attributes':_0x298e6b});}['remove']({isFromAdapter:_0x56ffcb=!0x1}={}){const {channelId:_0xc63e90,id:_0x5e888f}=this;this['_repository']['fire'](bt('removeCommentThread',_0xc63e90),{'channelId':_0xc63e90,'threadId':_0x5e888f,'isFromAdapter':_0x56ffcb});}['attachTo'](_0x2d63cb){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x2d63cb});}['addComment'](_0x45754a){const {channelId:_0xf1fe5e,id:_0x5b55bd}=this;this['_repository']['fire'](bt('addComment',_0xf1fe5e,_0x5b55bd),Object['assign']({'channelId':_0xf1fe5e,'threadId':_0x5b55bd},_0x45754a));}['getComment'](_0x604f71){if('string'!=typeof _0x604f71)throw new _0x3611b8('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x604f71});return this['comments']['get'](_0x604f71);}['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'](_0x5ec7e3=>_0x5ec7e3['toJSON']()),'attributes':this['attributes']};}['_add'](_0x92015b){return this['listenTo'](_0x92015b,'change:authoredAt',()=>{const _0x2381ef=this['_findOptimalIndex'](_0x92015b),_0x4245b4=this['comments'];_0x2381ef-0x1!=_0x4245b4['getIndex'](_0x92015b)&&_0x2381ef+0x1!=_0x4245b4['getIndex'](_0x92015b)&&(this['_remove'](_0x92015b),this['_add'](_0x92015b));}),this['comments']['add'](_0x92015b,this['_findOptimalIndex'](_0x92015b));}['_update'](_0x32040c){const {channelId:_0x18a814,id:_0x278f7f}=this;this['_repository']['fire'](bt('updateCommentThread',_0x18a814),{..._0x32040c,'channelId':_0x18a814,'threadId':_0x278f7f});}['_remove'](_0x27a3f2){return this['stopListening'](_0x27a3f2),_0x27a3f2['destroy'](),this['comments']['remove'](_0x27a3f2);}['_findOptimalIndex'](_0xb3ba51){const _0x442f9b=this['comments']['find'](_0x437311=>new Date(_0x437311['authoredAt'])['getTime']()>new Date(_0xb3ba51['authoredAt'])['getTime']());return _0x442f9b?this['comments']['getIndex'](_0x442f9b):this['length'];}}class fi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x33a8ce(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x14567c,_0x491f30){super();const _0x588750=_0x14567c['context']['plugins']['get'](it)['me'],_0x27b693=_0x14567c['getCommentThread'](_0x491f30['threadId']),_0x1f09f9=0x0===_0x27b693['comments']['length'],_0x497915=_0x588750===_0x491f30['author'];this['id']=_0x491f30['id'],this['threadId']=_0x491f30['threadId'],this['author']=_0x491f30['author'],this['creator']=_0x491f30['creator'],this['isExternal']=Boolean(_0x491f30['attributes']&&_0x491f30['attributes']['@external']),this['set']('content',_0x491f30['content']),this['createdAt']=_0x491f30['createdAt']||new Date(),this['set']('authoredAt',_0x491f30['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x27b693,'resolvedAt'),this['set']('attributes',_0x491f30['attributes']||{}),this['bind']('isEditable')['to'](_0x14567c,'_permissions',()=>{const _0xc91f1d=_0x14567c['getPermissions'](_0x27b693['channelId'])['write'],_0x571036=_0x14567c['getPermissions'](_0x27b693['channelId'])['modifyAll'];return _0x497915&&_0xc91f1d||!_0x497915&&_0x571036;}),this['bind']('isRemovable')['to'](_0x27b693,'isRemovable',_0x14567c,'_permissions',_0x380147=>{const _0x2460b5=_0x14567c['getPermissions'](_0x27b693['channelId'])['write'],_0x2c0c10=_0x14567c['getPermissions'](_0x27b693['channelId'])['modifyAll'];return _0x497915&&_0x2460b5||_0x380147&&_0x1f09f9||!_0x497915&&_0x2c0c10&&!_0x1f09f9;}),this['bind']('isReadOnly')['to'](_0x27b693,'isReadOnly'),this['_repository']=_0x14567c;}get['weight'](){return Math['max'](function(_0x4b72e8){const _0x3b48ec=document['createElement']('div');return _0x3b48ec['innerHTML']=_0x4b72e8,_0x3b48ec['textContent']['length'];}(this['content']),0xc8);}['update'](_0x593eba){const {threadId:_0x55b3d5,id:_0x40147e}=this;if(!this['_repository']['hasCommentThread'](_0x55b3d5))throw new _0x3611b8('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x4c07b4}=this['_repository']['getCommentThread'](_0x55b3d5);this['_repository']['fire'](bt('updateComment',_0x4c07b4,_0x55b3d5),{'channelId':_0x4c07b4,'threadId':_0x55b3d5,'commentId':_0x40147e,..._0x593eba});}['setAttribute'](_0x299f8f,_0x39a937){const _0x37046b=It(this['attributes']);At(_0x37046b,_0x299f8f,_0x39a937),this['update']({'attributes':_0x37046b});}['removeAttribute'](_0x245a95){const _0x2fa955=It(this['attributes']);yt(_0x2fa955,_0x245a95),this['update']({'attributes':_0x2fa955});}['remove'](_0x53fd7b={}){if(!_0x53fd7b['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x2fab4e,id:_0x3f7154}=this;if(!this['_repository']['hasCommentThread'](_0x2fab4e))throw new _0x3611b8('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x3993a1}=this['_repository']['getCommentThread'](_0x2fab4e);this['_repository']['fire'](bt('removeComment',_0x3993a1,_0x2fab4e),{'channelId':_0x3993a1,'threadId':_0x2fab4e,'commentId':_0x3f7154,..._0x53fd7b});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0x1d4665,..._0x539552){for(const _0x5701af of _0x539552)void 0x0!==_0x5701af&&(_0x1d4665+=':'+String(_0x5701af));return _0x1d4665;}class J extends _0x3d3aed{['refresh'](){const _0x132001=this['editor']['model']['document']['selection'];for(const _0x375883 of _0x132001['getRanges']())if(this['_hasContent'](_0x375883))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x4c0f73=_0x2b0c22()}={}){const _0x543f18=this['editor']['model'],_0x55af67=[];for(const _0x3c12d1 of _0x543f18['document']['selection']['getRanges']())this['_hasContent'](_0x3c12d1)&&_0x55af67['push'](this['_trimToContent'](_0x3c12d1));_0x543f18['change'](_0x20dab1=>{for(const _0x9fc05e of _0x55af67){const _0x27b871=_0x2b0c22()['substr'](0x1,0x5),_0x5436ae='comment:'+_0x4c0f73+':'+_0x27b871;_0x20dab1['addMarker'](_0x5436ae,{'range':_0x9fc05e,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x35ccd4){for(const _0x45b199 of _0x35ccd4['getItems']())if(this['_itemIsContent'](_0x45b199))return!0x0;return!0x1;}['_itemIsContent'](_0x28421a){return _0x28421a['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x28421a)&&!_0x28421a['is']('element','tableCell');}['_trimToContent'](_0x9b8fa0){const _0x25bada=_0x399473=>!this['_itemIsContent'](_0x399473['item']),_0x526803=_0x9b8fa0['start']['getLastMatchingPosition'](_0x25bada),_0x5d118d=_0x9b8fa0['end']['getLastMatchingPosition'](_0x25bada,{'direction':'backward'});return this['editor']['model']['createRange'](_0x526803,_0x5d118d);}}class P extends _0x90bc29{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[O];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x270f22){super(_0x270f22),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x4bb32f=this['editor'],_0xab563e=_0x4bb32f['model']['document']['selection'],_0x4ff48e=_0x54e343(()=>this['refreshSelectedViews'](),0xa);_0xab563e['on']('change:range',(_0xacd5ea,_0x44c093)=>{_0x44c093['directChange']&&(_0x4ff48e['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x4bb32f['editing']['view']['document'],'change:isFocused',(_0x21c382,_0x4cb1a1,_0x429b9d)=>{_0x429b9d&&_0x4ff48e();}),this['listenTo'](_0x4bb32f['ui']['focusTracker'],'change:isFocused',(_0x3f2b57,_0x3cb793,_0x10d98b)=>{_0x10d98b||_0x4bb32f['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x19bc07=>this['_editorAnnotationsData']['has'](_0x19bc07['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x2971f2){if(this['_editorAnnotations']['has'](_0x2971f2['view']))return;this['_editorAnnotations']['add'](_0x2971f2['view']),this['editor']['ui']['focusTracker']['add'](_0x2971f2['view']['element']);const _0x1230cb=this['editor']['plugins']['get'](O);this['listenTo'](_0x1230cb['collection'],'remove',(_0x42fe6f,_0x1171d3)=>{this['editor']['ui']['focusTracker']['remove'](_0x1171d3['view']['element']),this['_editorAnnotations']['delete'](_0x1171d3['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0xfb2cdf){if('function'!=typeof _0xfb2cdf)throw new _0x3611b8('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0xfb2cdf);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x525f63,annotations:_0x1de801}){const _0x34bcd8=[],_0x311aec=this['editor']['model']['document']['selection'],_0x13a75c=Array['from'](_0x311aec['getRanges']());for(const [_0x133b47,_0x3dacca]of this['_editorAnnotationsData']){const _0xadd772=_0x4aaa49(_0x3dacca),_0x2ee7e0=_0x1de801['getByInnerView'](_0x133b47);_0xadd772&&_0x2ee7e0&&_0x34bcd8['push']({'annotation':_0x2ee7e0,'range':_0xadd772});}function _0x4aaa49(_0x45ceed){for(const _0x27be3c of _0x45ceed)for(const _0x188cec of _0x13a75c)if(_0x27be3c['containsRange'](_0x188cec,!_0x311aec['isCollapsed']))return _0x27be3c;return null;}return _0x34bcd8['sort']((_0x44d4f0,_0x9d053c)=>{const _0x57e483=_0x44d4f0['range'],_0x1f56fa=_0x9d053c['range'];if(!_0x57e483['isEqual'](_0x1f56fa)){if(_0x57e483['containsRange'](_0x1f56fa,!0x0))return 0x1;if(_0x1f56fa['containsRange'](_0x57e483,!0x0))return-0x1;}return _0x44d4f0['annotation']==_0x525f63?-0x1:_0x9d053c['annotation']==_0x525f63?0x1:0x0;})['map'](_0x1b239c=>_0x1b239c['annotation']);}get['_editorAnnotationsData'](){const _0x5c708a=new Map();for(const _0x2c5adf of Array['from'](this['_dataCollectors']))for(const [_0x3bb599,_0x816a43]of _0x2c5adf())_0x5c708a['set'](_0x3bb599,_0x816a43);return _0x5c708a;}}class st extends _0x90bc29{['afterInit'](){const _0x4f2acc=this['editor'];if(!_0x4f2acc['plugins']['has']('RestrictedEditingModeEditing'))return;_0x4f2acc['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x90bc29{constructor(_0x2fbabc){super(_0x2fbabc),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x33ee35=this['editor'],_0x1d2ca9=_0x33ee35['commands']['get']('importWord'),_0x1948ed=_0x33ee35['plugins']['get'](it);_0x1d2ca9&&(_0x1d2ca9['on']('execute',(_0x1d8836,[,_0x588952])=>{_0x588952['collaboration_features']={'comments':!0x0,'user_id':_0x1948ed['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x1d2ca9,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x1639b7,_0x2621cf){const {comment_threads:_0x349b60}=_0x2621cf;_0x349b60&&_0x349b60['forEach'](({thread_id:_0x3484c3,comments:_0x286f81,is_resolved:_0x97d15e})=>{const _0x54e66a=new Date(),_0x2cf82a=_0x286f81['map'](({author:_0x22d47a,content:_0x4fc9d6,created_at:_0x36aa01})=>({'content':_0x4fc9d6,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x54e66a,'attributes':{'@external':{'authorName':_0x22d47a,'createdAt':_0x36aa01?new Date(_0x36aa01):new Date(),'source':'importWord'}}})),_0x128bf4=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x128bf4,'threadId':_0x3484c3,'comments':_0x2cf82a,'resolvedAt':_0x97d15e?_0x54e66a:null});});}}class at extends _0x90bc29{constructor(_0x4d7720){super(_0x4d7720),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x433745=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x433745,'contentInsertion',(_0x36eee7,_0x15b786)=>this['_removeMarkersWithoutThreads'](_0x15b786['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x58b1ac){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x58b1ac;const _0x286b0c=this['editor']['plugins']['get']('CommentsRepository');for(const _0x9115c9 of _0x58b1ac['keys']()){const [_0x4e252f,_0x442ba3]=_0x9115c9['split'](':');'comment'!=_0x4e252f||_0x286b0c['hasCommentThread'](_0x442ba3)||_0x58b1ac['delete'](_0x9115c9);}return _0x58b1ac;}['_registerMarkerInClipboardPipeline'](){const _0x4f67c9=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x3e6913=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x3e6913&&_0x4f67c9['_registerMarkerToCopy']('comment',_0x3e6913);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x4399c4){switch(_0x4399c4){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class ut extends _0x90bc29{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x47d76d,_0x508e57)=>{if(!_0x508e57['options']['showCommentHighlights'])return null;if(_0x508e57['options']['ignoreResolvedComments']){const {id:_0xe7841c}=er(_0x47d76d['markerName']),_0x1c4c6d=this['editor']['plugins']['get'](o);if(_0x1c4c6d['getCommentThread'](_0xe7841c)?.['isResolved']&&_0x47d76d['item'])return _0x508e57['consumable']['consume'](_0x47d76d['item'],'addMarker:'+_0x47d76d['markerName']),_0x508e57['consumable']['consume'](_0x47d76d['item'],'removeMarker:'+_0x47d76d['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0xba2002=>{_0xba2002['on']('addMarker:comment',(_0x11b988,_0x5497fd,_0x45c2b7)=>{if(!_0x45c2b7['options']['showCommentHighlights'])return;const _0x3a586c=_0x5497fd['item'];if(!_0x3a586c)return;const _0x46eca0=_0x45c2b7['mapper']['toViewElement'](_0x3a586c);this['editor']['model']['schema']['isObject'](_0x3a586c)&&_0x46eca0&&!_0x46eca0['getCustomProperty']('widget')&&_0x46eca0['is']('containerElement')&&_0x551600(_0x46eca0,_0x45c2b7['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x469e1e,{writer:_0x4165fd,options:_0x16a204})=>{if(!_0x16a204['showCommentHighlights'])return null;const _0xed4975=_0x4165fd['createContainerElement']('div'),_0xce4819=_0x4165fd['createEmptyElement']('hr');return _0x4165fd['addClass']('ck-horizontal-line',_0xed4975),_0x4165fd['insert'](_0x4165fd['createPositionAt'](_0xed4975,0x0),_0xce4819),_0xed4975;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x533ba2,{writer:_0x1dee6d,options:_0x17ba32})=>{if(!_0x17ba32['showCommentHighlights'])return null;const _0x2ff6e8=_0x1dee6d['createContainerElement']('span'),_0x4582d8=_0x1dee6d['createEmptyElement']('img');return _0x1dee6d['addClass']('image-inline',_0x2ff6e8),_0x1dee6d['insert'](_0x1dee6d['createPositionAt'](_0x2ff6e8,0x0),_0x4582d8),_0x2ff6e8;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x58cb67,{writer:_0x43dcc4,options:_0x5a1d7c})=>{if(_0x5a1d7c['showCommentHighlights'])return _0x43dcc4['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x36e58d,_0x199b15,_0xfcdc21)=>{_0xfcdc21['options']['showCommentHighlights']&&_0x36e58d['stop']();},{'priority':'high'});}}class r extends _0x90bc29{static get['requires'](){return[o,P,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1f2d82){super(_0x1f2d82),this['set']('isThreadsLoadingPaused',!0x0),_0x1f2d82['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x37804c,_0x1db9bc,_0x2c0432,_0x3cf83e)=>{const _0x303402=_0x1f2d82['plugins']['get'](o),_0x2e634f=_0x2c0432?er(_0x2c0432)['id']:null;_0x1f2d82['model']['change'](()=>{if(_0x2e634f){const _0x202f40=this['getAllMarkersForId'](_0x2e634f);for(const _0x34e3e6 of _0x202f40)_0x1f2d82['editing']['reconvertMarker'](_0x34e3e6);}if(_0x3cf83e){const {id:_0x18e0b8}=er(_0x3cf83e),_0x10a9b7=_0x303402['getCommentThread'](_0x18e0b8);if(_0x10a9b7&&_0x10a9b7['unlinkedAt'])return;if(_0x10a9b7&&!_0x10a9b7['isAttached'])return;const _0x125377=this['getAllMarkersForId'](_0x18e0b8);for(const _0x23adc0 of _0x125377)_0x1f2d82['editing']['reconvertMarker'](_0x23adc0);}}),_0x2e634f&&this['scrollToThreadMarker'](_0x2e634f);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x80355b=this['editor'],_0x542f5a=_0x80355b['plugins']['get'](o),_0x1f8092=_0x80355b['config']['get']('collaboration.channelId'),_0x449789=_0x542f5a['getCommentThreads']()['filter'](_0xe59382=>_0xe59382['channelId']!==_0x1f8092);_0x80355b['commands']['add']('addCommentThread',new J(_0x80355b)),this['listenTo'](_0x80355b,'change:isReadOnly',(_0x1a6b82,_0x7460eb,_0x527b97)=>{_0x542f5a['switchReadOnly'](_0x527b97,_0x80355b['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x542f5a,ft('addCommentThread',_0x1f8092),(_0x1e903d,{threadId:_0xd5dd1f})=>{const _0x2104c7=this['editor']['plugins']['get'](o)['getCommentThread'](_0xd5dd1f);_0x2104c7?.['unlinkedAt']&&this['_attachArchivedThread'](_0xd5dd1f);}),this['listenTo'](_0x542f5a,ft('removeCommentThread',_0x1f8092),(_0x1ec870,{threadId:_0x15e6fb})=>{_0x80355b['model']['enqueueChange']({'isUndoable':!0x1},_0x2cf85e=>{const _0xcfae7a=this['getAllMarkersForId'](_0x15e6fb);for(const _0x163cd1 of _0xcfae7a)_0x2cf85e['removeMarker'](_0x163cd1);});}),this['listenTo'](_0x542f5a,ft('resolveCommentThread',_0x1f8092),(_0x1577a7,{threadId:_0x40b5ff})=>{(this['_reconvertMarkers'](_0x40b5ff),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x40b5ff)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x542f5a,ft('reopenCommentThread',_0x1f8092),(_0x3b934c,{threadId:_0x5b4736})=>{this['_reconvertMarkers'](_0x5b4736);},{'priority':'low'}),this['listenTo'](_0x542f5a,ft('addComment',_0x1f8092),(_0x1caafa,{threadId:_0x1ceace,isFromAdapter:_0x4231dd})=>{const _0x418bf5=this['getAllMarkersForId'](_0x1ceace);if(_0x4231dd||0x0==_0x418bf5['length']||!_0x542f5a['hasCommentThread'](_0x1ceace))return;0x1===_0x542f5a['getCommentThread'](_0x1ceace)['length']&&_0x80355b['model']['enqueueChange']({'isUndoable':!0x1},_0x5644f9=>{for(const _0x3df81c of _0x418bf5)_0x5644f9['updateMarker'](_0x3df81c,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x449789);}['afterInit'](){!async function(_0x51ca6c){const _0x5354a9=_0x179269([0x51,0x36,0x62,0x32,0x71,0x77,0x61,0x70,0x47,0x6c,0x4e,0x30,0x37,0x78,0x54,0x56,0x6b,0x48,0x4b,0x44,0x65,0x6d,0x59,0x74,0x69,0x39,0x4c,0x76,0x64,0x58,0x63,0x66,0x4f,0x49,0x52,0x38,0x35,0x50,0x55,0x41,0x73,0x31,0x33,0x6f,0x34,0x42,0x67,0x4a,0x6e,0x4d,0x7a,0x75,0x57,0x43,0x6a,0x45,0x53,0x79,0x68,0x5a,0x46,0x72]),_0x2d18f9=0x668069cf,_0x2082e1=0x66870e47^_0x2d18f9,_0x1d2742=window[_0x179269([0x44,0x61,0x74,0x65])][_0x179269([0x6e,0x6f,0x77])](),_0x3057fd=_0x51ca6c[_0x179269([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x22dbba=new window[(_0x179269([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xa9fbb7=>{_0x3057fd[_0x179269([0x6f,0x6e,0x63,0x65])](_0x179269([0x72,0x65,0x61,0x64,0x79]),_0xa9fbb7);}),_0x145bb8={[_0x179269([0x6b,0x74,0x79])]:_0x179269([0x45,0x43]),[_0x179269([0x75,0x73,0x65])]:_0x179269([0x73,0x69,0x67]),[_0x179269([0x63,0x72,0x76])]:_0x179269([0x50,0x2d,0x32,0x35,0x36]),[_0x179269([0x78])]:_0x179269([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]),[_0x179269([0x79])]:_0x179269([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]),[_0x179269([0x61,0x6c,0x67])]:_0x179269([0x45,0x53,0x32,0x35,0x36])},_0x19da63=_0x3057fd[_0x179269([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x179269([0x67,0x65,0x74])](_0x179269([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x4d8fbe(){let _0x3f05a9,_0x3f998b=null,_0x3db2db=null;try{if(_0x19da63==_0x179269([0x47,0x50,0x4c]))return _0x179269([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x3f05a9=_0x3ae1a0(),!_0x3f05a9)return _0x179269([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x3f05a9[_0x179269([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3db2db=_0xf803f3(_0x3f05a9[_0x179269([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x3f05a9[_0x179269([0x6a,0x74,0x69])])),await _0x290745()?_0x566321()?_0x55fcd9()?_0x179269([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0xce3f34()?(_0x3f05a9[_0x179269([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x179269([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x3f998b=_0x1ad377(_0x179269([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x3f05a9[_0x179269([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x179269([0x74,0x72,0x69,0x61,0x6c])&&(_0x3f998b=_0x1ad377(_0x179269([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x4a88ff()):_0x179269([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x179269([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x179269([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x1c38b4){return _0x179269([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x55fcd9(){const _0x384df4=[_0x179269([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x179269([0x74,0x72,0x69,0x61,0x6c])][_0x179269([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3f05a9[_0x179269([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1d2742/0x3e8:0xe10*_0x2082e1;return _0x3f05a9[_0x179269([0x65,0x78,0x70])]<_0x384df4;}function _0x566321(){const _0x5ef03e=_0x3f05a9[_0x179269([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x5ef03e)return!0x1;if(_0x5ef03e[_0x179269([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x179269([0x2a])))return!0x0;if(_0x5ef03e[_0x179269([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x179269([0x43,0x4d,0x54])))return!0x0;if(_0x5ef03e[_0x179269([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x179269([0x52,0x43,0x4d,0x54]))){if(_0x3551fd())return!0x0;if(_0x2a3272()||_0x520104())return!0x0;}return!0x1;}function _0xce3f34(){const _0x5161b9=_0x3f05a9[_0x179269([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x5161b9||0x0==_0x5161b9[_0x179269([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0xdee262}=new URL(window[_0x179269([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x5161b9[_0x179269([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xdee262))return!0x0;const _0xa2505e=_0xdee262[_0x179269([0x73,0x70,0x6c,0x69,0x74])](_0x179269([0x2e]));return _0x5161b9[_0x179269([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x35fcd4=>_0x35fcd4[_0x179269([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x179269([0x2a])))[_0x179269([0x6d,0x61,0x70])](_0x5c738a=>_0x5c738a[_0x179269([0x73,0x70,0x6c,0x69,0x74])](_0x179269([0x2e])))[_0x179269([0x73,0x6f,0x6d,0x65])](_0x5af2cf=>_0xa2505e[_0x179269([0x65,0x76,0x65,0x72,0x79])]((_0x44b6af,_0x667c5c)=>_0x5af2cf[_0x667c5c]===_0x44b6af||_0x5af2cf[_0x667c5c]===_0x179269([0x2a])));}function _0x4a88ff(){return _0x3f998b&&_0x3db2db?new window[(_0x179269([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4bdacb,_0x7e2c52)=>{_0x3f998b[_0x179269([0x74,0x68,0x65,0x6e])](_0x4bdacb,_0x7e2c52),_0x3db2db[_0x179269([0x74,0x68,0x65,0x6e])](_0x473508=>{_0x473508!=_0x179269([0x56,0x61,0x6c,0x69,0x64])&&_0x4bdacb(_0x473508);},_0x7e2c52);}):_0x3f998b||_0x3db2db||_0x179269([0x56,0x61,0x6c,0x69,0x64]);}}function _0xf803f3(_0x439c06,_0x489e2d){return new window[(_0x179269([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2dddba=>{if(_0x402020())return _0x2dddba(_0x179269([0x56,0x61,0x6c,0x69,0x64]));_0x2b7ea9(),_0x3057fd[_0x179269([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x179269([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x5d80ef=!0x1;const _0x2a04de=_0x2b0c22();function _0x42de73(_0x42579f){return!!_0x42579f&&(typeof _0x42579f===_0x179269([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x42579f===_0x179269([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x42579f[_0x179269([0x74,0x68,0x65,0x6e])]===_0x179269([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x42579f[_0x179269([0x63,0x61,0x74,0x63,0x68])]===_0x179269([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x17619b(_0x422bbd){_0x38e182(_0x422bbd)[_0x179269([0x74,0x68,0x65,0x6e])](_0x547bf7=>{if(!_0x547bf7||_0x547bf7[_0x179269([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x179269([0x6f,0x6b]))return _0x179269([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x50ce30(_0x4cadb4(_0x2a04de+_0x489e2d))!=_0x547bf7[_0x179269([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x179269([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x179269([0x56,0x61,0x6c,0x69,0x64]);})[_0x179269([0x74,0x68,0x65,0x6e])](_0x225064=>(_0x1d22be(),_0x225064),()=>{const _0x1fa89c=_0x3f25f9();return null==_0x1fa89c?(_0x1d22be(),_0x179269([0x56,0x61,0x6c,0x69,0x64])):_0x179269(_0x1d2742-_0x1fa89c>(0x428cedcf^_0x2d18f9)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x179269([0x74,0x68,0x65,0x6e])](_0x2dddba)[_0x179269([0x63,0x61,0x74,0x63,0x68])](()=>{_0x2dddba(_0x179269([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x148076=0x66b6874f^_0x2d18f9;function _0x1d22be(){const _0x2c0694=_0x179269([0x6c,0x6c,0x63,0x74,0x2d])+_0x50ce30(_0x4cadb4(_0x439c06)),_0x1e7ae2=_0x29fc2a(_0x50ce30(window[_0x179269([0x4d,0x61,0x74,0x68])][_0x179269([0x63,0x65,0x69,0x6c])](_0x1d2742/_0x148076)));window[_0x179269([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x179269([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2c0694,_0x1e7ae2);}function _0x3f25f9(){const _0x31b0a1=_0x179269([0x6c,0x6c,0x63,0x74,0x2d])+_0x50ce30(_0x4cadb4(_0x439c06)),_0x4f6638=window[_0x179269([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x179269([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x31b0a1);return _0x4f6638?window[_0x179269([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x29fc2a(_0x4f6638),0x10)*_0x148076:null;}function _0x38e182(_0x2cc29b){return new window[(_0x179269([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x15adb3,_0x7b3758)=>{_0x2cc29b[_0x179269([0x74,0x68,0x65,0x6e])](_0x15adb3,_0x7b3758),window[_0x179269([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x7b3758,0x6681bd0f^_0x2d18f9);});}}_0x3057fd[_0x179269([0x6f,0x6e])](_0x179269([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x3fb9b6,_0x46a9ef)=>{if(_0x46a9ef[0x0]!=_0x439c06)return _0x2dddba(_0x179269([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x46a9ef[0x1]={..._0x46a9ef[0x1],[_0x179269([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2a04de};},{[_0x179269([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x179269([0x68,0x69,0x67,0x68])}),_0x3057fd[_0x179269([0x6f,0x6e])](_0x179269([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x4d9e8=>{_0x42de73(_0x4d9e8[_0x179269([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x5d80ef=!0x0,_0x17619b(_0x4d9e8[_0x179269([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x179269([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x179269([0x6c,0x6f,0x77])}),_0x22dbba[_0x179269([0x74,0x68,0x65,0x6e])](()=>{_0x5d80ef||_0x2dddba(_0x179269([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x402020(){return _0x3057fd[_0x179269([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x179269([0x76,0x69,0x65,0x77])][_0x179269([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x179269([0x61,0x75,0x74,0x6f]);}function _0x2b7ea9(){_0x3057fd[_0x179269([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x179269([0x76,0x69,0x65,0x77])][_0x179269([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x179269([0x61,0x75,0x74,0x6f]);}}function _0x1ad377(_0x8ea942){const _0x7b2367=[new window[(_0x179269([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x31fcd7=>setTimeout(_0x31fcd7,0x66895703^_0x2d18f9)),_0x22dbba[_0x179269([0x74,0x68,0x65,0x6e])](()=>new window[(_0x179269([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x25c9c0=>{let _0x10efcc=0x0;_0x3057fd[_0x179269([0x6d,0x6f,0x64,0x65,0x6c])][_0x179269([0x6f,0x6e])](_0x179269([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x3384d4,_0x292aca)=>{_0x292aca[0x0][_0x179269([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x10efcc++,_0x10efcc==(0x66806837^_0x2d18f9)&&(_0x25c9c0(),_0x3384d4[_0x179269([0x6f,0x66,0x66])]());});}))];return window[_0x179269([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x179269([0x72,0x61,0x63,0x65])](_0x7b2367)[_0x179269([0x74,0x68,0x65,0x6e])](()=>_0x8ea942);}async function _0x5260d9(){await _0x22dbba,_0x3057fd[_0x179269([0x6d,0x6f,0x64,0x65,0x6c])][_0x179269([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x53f0dc,_0x3057fd[_0x179269([0x6d,0x6f,0x64,0x65,0x6c])][_0x179269([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x53f0dc,_0x3057fd[_0x179269([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x179269([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3551fd(){return _0x595f9d(_0x179269([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x3a8c46(_0x179269([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x179269([0x73,0x74,0x61,0x74,0x65])]==_0x179269([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x2a3272(){return _0x595f9d(_0x179269([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 _0x520104(){return _0x595f9d(_0x179269([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x37ce50(_0x34675d){const _0x3b9747=_0x40cd2c();_0x3057fd[_0x3b9747]=_0x179269([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x34675d,_0x34675d!=_0x179269([0x56,0x61,0x6c,0x69,0x64])&&_0x5260d9();}function _0x40cd2c(){const _0x2c4424=window[_0x179269([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x179269([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x179269([0x6e,0x6f,0x77])]())[_0x179269([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x179269([0x2e]),'');let _0x12193c=_0x179269([0x51]);for(let _0x178c48=0x0;_0x178c48<_0x2c4424[_0x179269([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x178c48+=0x2){let _0x5940ff=window[_0x179269([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2c4424[_0x179269([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x178c48,_0x178c48+0x2));_0x5940ff>=_0x5354a9[_0x179269([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5940ff-=_0x5354a9[_0x179269([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x12193c+=_0x5354a9[_0x5940ff];}return _0x12193c;}function _0x3ae1a0(){const _0x24b220=_0x19da63[_0x179269([0x73,0x70,0x6c,0x69,0x74])](_0x179269([0x2e]));if(0x3!=_0x24b220[_0x179269([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x599b3d(_0x24b220[0x1]);function _0x599b3d(_0x4e1347){const _0x4c5507=_0xecbc03(_0x4e1347);return _0x4c5507&&_0x1c0499()?_0x4c5507:null;function _0x1c0499(){const _0x4e12d4=_0x4c5507[_0x179269([0x6a,0x74,0x69])],_0x6eb793=window[_0x179269([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4e12d4[_0x179269([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4e12d4[_0x179269([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x35ed77={..._0x4c5507,[_0x179269([0x6a,0x74,0x69])]:_0x4e12d4[_0x179269([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4e12d4[_0x179269([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x35ed77[_0x179269([0x76,0x63])],_0x4cadb4(_0x35ed77)==_0x6eb793;}}}async function _0x290745(){let _0x5a408c=!0x0;try{const _0x36f833=_0x19da63[_0x179269([0x73,0x70,0x6c,0x69,0x74])](_0x179269([0x2e])),[_0x31f6c9,_0x3835bf,_0x1674c1]=_0x36f833;return _0xc641bf(_0x31f6c9),await _0x472b84(_0x31f6c9,_0x3835bf,_0x1674c1),_0x5a408c;}catch(_0x1a78cb){return!0x1;}function _0xc641bf(_0xab6ccb){const _0x262f62=_0xecbc03(_0xab6ccb);_0x262f62&&_0x262f62[_0x179269([0x61,0x6c,0x67])]==_0x179269([0x45,0x53,0x32,0x35,0x36])||(_0x5a408c=!0x1);}async function _0x472b84(_0xc761be,_0x4e0060,_0x3e3099){const _0x453841=window[_0x179269([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x179269([0x66,0x72,0x6f,0x6d])](_0x26b966(_0x3e3099),_0x53b405=>_0x53b405[_0x179269([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x29af94=new window[(_0x179269([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x179269([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0xc761be+_0x179269([0x2e])+_0x4e0060),_0x3c9ed9=window[_0x179269([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x179269([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3c9ed9)return;const _0x338641=await _0x3c9ed9[_0x179269([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x179269([0x6a,0x77,0x6b]),_0x145bb8,{[_0x179269([0x6e,0x61,0x6d,0x65])]:_0x179269([0x45,0x43,0x44,0x53,0x41]),[_0x179269([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x179269([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x179269([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3c9ed9[_0x179269([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x179269([0x6e,0x61,0x6d,0x65])]:_0x179269([0x45,0x43,0x44,0x53,0x41]),[_0x179269([0x68,0x61,0x73,0x68])]:{[_0x179269([0x6e,0x61,0x6d,0x65])]:_0x179269([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x338641,_0x453841,_0x29af94)||(_0x5a408c=!0x1);}}function _0xecbc03(_0xc057a6){return _0xc057a6[_0x179269([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x179269([0x65,0x79]))?JSON[_0x179269([0x70,0x61,0x72,0x73,0x65])](_0x26b966(_0xc057a6)):null;}function _0x26b966(_0x5d3f02){return window[_0x179269([0x61,0x74,0x6f,0x62])](_0x5d3f02[_0x179269([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x179269([0x2b]))[_0x179269([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x179269([0x2f])));}function _0x4cadb4(_0x3bee29){let _0xf240b1=0x1505;function _0x4d289e(_0x15ddfd){for(let _0x20672e=0x0;_0x20672e<_0x15ddfd[_0x179269([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x20672e++){const _0x3a515a=_0x15ddfd[_0x179269([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x20672e);_0xf240b1=(_0xf240b1<<0x5)+_0xf240b1+_0x3a515a,_0xf240b1&=_0xf240b1;}}function _0x79770(_0x335318){Array[_0x179269([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x335318)?_0x335318[_0x179269([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x79770):_0x335318&&typeof _0x335318==_0x179269([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x179269([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x335318)[_0x179269([0x73,0x6f,0x72,0x74])]()[_0x179269([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x385032,_0x2677e3])=>{_0x4d289e(_0x385032),_0x79770(_0x2677e3);}):_0x4d289e(window[_0x179269([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x335318));}return _0x79770(_0x3bee29),_0xf240b1>>>0x0;}function _0x50ce30(_0x238316){return _0x238316[_0x179269([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x179269([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x179269([0x30]));}function _0x29fc2a(_0x4f7d69){return _0x4f7d69[_0x179269([0x73,0x70,0x6c,0x69,0x74])]('')[_0x179269([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x179269([0x6a,0x6f,0x69,0x6e])]('');}function _0x595f9d(_0x2499a7){return _0x3057fd[_0x179269([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x179269([0x68,0x61,0x73])](_0x2499a7);}function _0x3a8c46(_0x4488b9){return _0x3057fd[_0x179269([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x179269([0x67,0x65,0x74])](_0x4488b9);}function _0x53f0dc(){}function _0x179269(_0x284c6e){return _0x284c6e['map'](_0x5294b0=>String['fromCharCode'](_0x5294b0))['join']('');}_0x37ce50(await _0x4d8fbe());}(this);}['destroy'](){const _0x551645=this['editor']['plugins']['get'](o),_0x1dfc4d=this['editor']['config']['get']('collaboration.channelId');for(const _0x2d3e83 of _0x551645['getCommentThreads']({'channelId':_0x1dfc4d}))_0x551645['_detachCommentThread'](_0x2d3e83['id']),_0x551645['_threads']['delete'](_0x2d3e83['id']);super['destroy']();}['hasMarkerForId'](_0xdfe4e2){return this['getAllMarkersForId'](_0xdfe4e2)['length']>0x0;}['getAllMarkersForId'](_0x3b9b14){const _0x558eb3=[];for(const _0x54109f of this['editor']['model']['markers'])_0x54109f['name']['startsWith']('comment:'+_0x3b9b14)&&_0x558eb3['push'](_0x54109f);return _0x558eb3;}['scrollToThreadMarker'](_0x56f040){const _0x4697fc=this['_getTargetForId'](_0x56f040);_0x4697fc&&setTimeout(()=>{this['activeMarker']&&er(this['activeMarker'])['id']===_0x56f040&&rt({'target':_0x4697fc[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0xde7c8b){this['editor']['model']['change'](()=>{for(const _0x5615ac of this['getAllMarkersForId'](_0xde7c8b))this['editor']['editing']['reconvertMarker'](_0x5615ac);});}['_attachArchivedThread'](_0xce3ac4){const _0x312ec0=this['editor']['plugins']['get'](o),_0x2bfd8d=this['editor']['plugins']['get'](P),_0x38e453=_0x312ec0['getCommentThread'](_0xce3ac4);if(!_0x38e453['isAttached']){const _0x273f12=_0x38e453['attachTo'](()=>this['_getTargetForId'](_0x38e453['id']));_0x2bfd8d['registerAnnotation'](_0x273f12),_0x38e453['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x545d8c=this['editor'],_0x379387=_0x545d8c['plugins']['get'](it);_0x545d8c['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x39cb1b,_0x44d058)=>{const {id:_0x3e4772}=er(_0x39cb1b['markerName']),_0x2144ba=_0x545d8c['plugins']['get'](o)['getCommentThread'](_0x3e4772),_0x12ef58=this['activeMarker']&&er(this['activeMarker'])['id']===_0x3e4772;let _0x3f3d1b;if(_0x2144ba&&_0x2144ba['isResolved']&&!_0x12ef58&&_0x39cb1b['item'])return _0x44d058['consumable']['consume'](_0x39cb1b['item'],'addMarker:'+_0x39cb1b['markerName']),_0x44d058['consumable']['consume'](_0x39cb1b['item'],'removeMarker:'+_0x39cb1b['markerName']),null;const _0x2865ca=['ck-comment-marker'];return _0x12ef58&&_0x2865ca['push']('ck-comment-marker--active'),_0x3f3d1b=_0x2144ba?.['length']?_0x2144ba['comments']['first']['author']['id']:_0x379387['me']['id'],{'classes':_0x2865ca,'attributes':{'data-comment':_0x3e4772,'data-author-id':_0x3f3d1b}};}}),_0x545d8c['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x5a97fb,{options:_0x2d7043})=>{if(_0x2d7043['showCommentHighlights'])return null;const _0x4e6929=_0x545d8c['plugins']['get'](o),_0xff0d5=_0x545d8c['model']['markers']['get'](_0x5a97fb),{id:_0x564a03,part:_0x53f649}=er(_0x5a97fb);return _0xff0d5&&!_0xff0d5['affectsData']||_0x2d7043['ignoreResolvedComments']&&_0x4e6929['getCommentThread'](_0x564a03)?.['isResolved']?null:{'group':'comment','name':_0x53f649?_0x564a03+':'+_0x53f649:_0x564a03};}}),_0x545d8c['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x5c8939,{writer:_0x359a46})=>_0x359a46['createElement']('$marker',{'data-name':'comment:'+_0x5c8939['getAttribute']('id')})}),_0x545d8c['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x13ba28=this['editor'],_0x43b5ce=_0x13ba28['plugins']['get'](o),_0x5244c6=new Set(),_0x4cfa0a=new Set();_0x13ba28['model']['document']['registerPostFixer'](_0x280114=>{let _0x3ac73=!0x1;for(const {name:_0x5f2e37,data:_0x4a5ab9}of _0x13ba28['model']['document']['differ']['getChangedMarkers']()){const {group:_0x4d92cd,id:_0x143933}=er(_0x5f2e37);let _0x5b8368=_0x4a5ab9['newRange'];if('comment'!==_0x4d92cd||!_0x5b8368)continue;const _0x375319='$graveyard'===_0x5b8368['root']['rootName'];_0x375319||(_0x5b8368=dt(_0x5b8368,_0x13ba28['model']),!_0x5b8368||_0x5b8368['isCollapsed']||!_0x4a5ab9['newRange']||_0x5b8368['isEqual'](_0x4a5ab9['newRange']))?_0x13ba28['model']['hasContent'](_0x5b8368)&&!_0x375319?this['isThreadsLoadingPaused']?_0x5244c6['add'](_0x5f2e37):this['_handleThreadMarker'](_0x5f2e37,_0x143933):(_0x4cfa0a['add'](_0x5f2e37),_0x5244c6['delete'](_0x5f2e37),_0x280114['removeMarker'](_0x5f2e37),_0x3ac73=!0x0):(_0x280114['updateMarker'](_0x5f2e37,{'range':_0x5b8368}),_0x3ac73=!0x0);}return _0x3ac73;}),this['on']('change:isThreadsLoadingPaused',(_0x4ecc7e,_0x16ef81,_0x498fed)=>{if(!_0x498fed&&_0x5244c6['size'])for(const _0x1e83ff of _0x5244c6){const {id:_0x23e2b3}=er(_0x1e83ff);_0x5244c6['delete'](_0x1e83ff),_0x13ba28['model']['markers']['get'](_0x1e83ff)&&this['_handleThreadMarker'](_0x1e83ff,_0x23e2b3);}}),this['listenTo'](_0x13ba28['model']['document'],'change',()=>{for(const {name:_0x19e31d,data:{newRange:_0x4d1525}}of _0x13ba28['model']['document']['differ']['getChangedMarkers']()){const {group:_0x12f267,id:_0x49ae1d}=er(_0x19e31d);if('comment'!==_0x12f267)continue;const _0x38cd38=_0x43b5ce['getCommentThread'](_0x49ae1d),_0xb521ad=this['hasMarkerForId'](_0x49ae1d);_0x38cd38&&(!_0x38cd38['_hasTargetInContent']&&_0x4d1525&&_0x13ba28['editing']['view']['once']('render',()=>{const _0x516e77=_0x13ba28['plugins']['get'](O),_0x5c024a=_0x43b5ce['_threadToController']['get'](_0x38cd38)['view'];_0x516e77['getByInnerView'](_0x5c024a)['refreshVisibility']();},{'priority':'low'}),_0x38cd38['_hasTargetInContent']=_0xb521ad||!!_0x4d1525),_0x4d1525||(_0x4cfa0a['add'](_0x19e31d),_0x5244c6['delete'](_0x19e31d));}for(const _0x4d4e48 of _0x4cfa0a){const {id:_0x50448e}=er(_0x4d4e48),_0x126238=_0x43b5ce['getCommentThread'](_0x50448e);if(_0x5244c6['delete'](_0x4d4e48),!_0x126238)continue;const _0x336032=this['hasMarkerForId'](_0x50448e);_0x336032||_0x126238['isSubmitted']?_0x336032||_0x126238['unlinkedAt']||_0x126238['setUnlinkedAt'](new Date()):_0x126238['remove']();}_0x4cfa0a['clear']();});}['_handleInitialThreads'](_0x1fe6ef){_0x1fe6ef['forEach'](_0x5b88c8=>{_0x5b88c8['unlinkedAt']&&this['_attachArchivedThread'](_0x5b88c8['id']);});}['_getTargetForId'](_0x497ced){const _0x4a5f30=this['editor'],_0x16860e=this['getAllMarkersForId'](_0x497ced);return et(_0x4a5f30['editing'],_0x16860e);}['_getTextContext'](_0x10175b){const _0x8d4869=this['getAllMarkersForId'](_0x10175b);let _0x1986cc='',_0x421892=!0x1;for(const _0x500ba2 of _0x8d4869){const _0x5c6269=_0x500ba2['getRange']();for(const _0x3be8f1 of Array['from'](_0x5c6269['getItems']()))_0x3be8f1['is']('$textProxy')?(_0x1986cc&&_0x421892&&(_0x1986cc+='\x20',_0x421892=!0x1),_0x1986cc+=_0x3be8f1['data']):_0x421892=!0x0;_0x421892=!0x0;}return _0x1986cc['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x5da577,_0x464cf4){const _0x71e7cc=this['editor'],_0x3ede8c=_0x71e7cc['plugins']['get'](o);let _0x2a97af=_0x3ede8c['getCommentThread'](_0x464cf4);const _0x36743b=_0x71e7cc['config']['get']('collaboration.channelId'),_0x49d8ff=_0x71e7cc['plugins']['get'](P);if(_0x2a97af&&(_0x2a97af['unlinkedAt']&&_0x2a97af['setUnlinkedAt'](null),_0x2a97af['isAttached']))return _0x2a97af;return!this['getAllMarkersForId'](_0x464cf4)[0x0]['managedUsingOperations']?_0x71e7cc['editing']['view']['once']('render',()=>{if(_0x3ede8c['getCommentThread'](_0x464cf4))return;const _0x322d04=_0x71e7cc['plugins']['get'](O);_0x2a97af=_0x3ede8c['openNewCommentThread']({'channelId':_0x36743b,'threadId':_0x464cf4,'target':()=>this['_getTargetForId'](_0x464cf4),'context':{'type':'text','value':this['_getTextContext'](_0x464cf4)}});const _0x13adc1=_0x3ede8c['_threadToController']['get'](_0x2a97af)['view'],_0x5c9ed0=_0x322d04['getByInnerView'](_0x13adc1);_0x5c9ed0&&_0x49d8ff['registerAnnotation'](_0x5c9ed0);},{'priority':'low'}):_0x3ede8c['fetchCommentThread']({'channelId':_0x36743b,'threadId':_0x464cf4})['then'](_0x4da4c3=>{if('destroyed'!==_0x71e7cc['state']){if(_0x2a97af=_0x4da4c3,_0x2a97af&&!_0x2a97af['isAttached']){const _0x284300=_0x2a97af['attachTo'](()=>this['_getTargetForId'](_0x464cf4));_0x49d8ff['registerAnnotation'](_0x284300),_0x2a97af['isResolved']&&this['_reconvertMarkers'](_0x464cf4);}else{if(!_0x2a97af){const _0x4362bf=this['getAllMarkersForId'](_0x464cf4);_0x71e7cc['model']['change'](_0x33ce14=>{for(const _0xced520 of _0x4362bf)_0x33ce14['removeMarker'](_0xced520);});}}}}),_0x2a97af;}['_handleThreadMarker'](_0x3f3e94,_0x4e001a){const _0x167658=this['_attachMarkerToThread'](_0x3f3e94,_0x4e001a);_0x167658&&!_0x167658['context']&&_0x167658['setContext']({'type':'text','value':this['_getTextContext'](_0x4e001a)});}['_initAriaMarkerChangeAnnouncements'](){const _0x45e3ff=this['editor'];ot(_0x45e3ff['model'],({left:_0x43977f,entered:_0x8f80db})=>{for(const _0x34db32 of _0x43977f)if(mt(_0x34db32)){_0x45e3ff['ui']['ariaLiveAnnouncer']['announce'](E(_0x45e3ff['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x1702bc of _0x8f80db)if(mt(_0x1702bc)){_0x45e3ff['ui']['ariaLiveAnnouncer']['announce'](E(_0x45e3ff['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0xa1367f)));break;}});}}function ft(_0x129c5c,_0x3d6098){return _0x3d6098?_0x129c5c+':'+_0x3d6098:_0x129c5c;}function er(_0x33dcf6){const _0x33d5e0=_0x33dcf6['split'](':');return{'group':_0x33d5e0[0x0],'id':_0x33d5e0[0x1],'part':_0x33d5e0[0x2]};}function dt(_0x42fd7c,_0x59492f){const _0x5ccadc=_0x59492f['schema'],_0x1af5f4=_0x59492f['createRange'](_0x42fd7c['start']);for(const _0xd90488 of _0x42fd7c['getWalker']()){const {type:_0x4b2b1c,item:_0xce29a5,nextPosition:_0x8f445a}=_0xd90488;if('text'===_0x4b2b1c||_0x5ccadc['isObject'](_0xce29a5)){const _0x541040=_0x59492f['createPositionBefore'](_0xce29a5);_0x1af5f4['isCollapsed']&&(_0x1af5f4['start']=_0x541040),_0x1af5f4['end']=_0x8f445a;}}return _0x1af5f4;}function mt(_0x3ce436){return'comment'===er(_0x3ce436['name'])['group'];}class i extends _0x90bc29{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,P,O];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x5ab70d=this['editor'],_0x5b5572=_0x5ab70d['plugins']['get'](o),_0x5884ef=_0x5ab70d['plugins']['get'](r),_0x2f429b=_0x5ab70d['plugins']['get'](O),_0x294aab=_0x5ab70d['plugins']['get'](P);_0x5ab70d['ui']['componentFactory']['add']('comment',()=>{const _0x36cd26=this['_createUIButton'](_0x3d044c);return _0x36cd26['tooltip']=!0x0,_0x36cd26;}),_0x5ab70d['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x10c47c)),_0x294aab['addSourceCollector'](()=>{const _0x9566c9=[];for(const [_0x3cc395,_0xc6e31b]of _0x5b5572['_threadToController']){const _0x15b08f=_0x5884ef['getAllMarkersForId'](_0x3cc395['id']),_0x4d783b=_0x15b08f['map'](_0x264c05=>_0x264c05['getRange']());_0x15b08f['length']>0x0&&_0x9566c9['push']([_0xc6e31b['view'],_0x4d783b]);}return _0x9566c9;}),this['listenTo'](_0x2f429b,'change:activeAnnotations',(_0x3de68c,_0x31cdd2,_0x493df6)=>{const _0x28df99=Array['from'](_0x493df6)['map'](_0x2751d4=>_0x2751d4['innerView'])['find'](_0x199112=>_0x5b5572['_viewToController']['has'](_0x199112));if(!_0x28df99)return void(_0x5884ef['activeMarker']=null);const _0x43a790=_0x5b5572['_viewToController']['get'](_0x28df99)['model']['id'],_0x2be46e='comment:'+_0x43a790;_0x43a790&&_0x5884ef['hasMarkerForId'](_0x43a790)?_0x5884ef['activeMarker']=_0x2be46e:_0x5884ef['activeMarker']&&(_0x5884ef['activeMarker']=null);}),this['listenTo'](_0x5b5572,'removeCommentThread',(_0x4b0522,{threadId:_0x4abac1,isFromAdapter:_0x5e2df4})=>{!_0x5e2df4&&_0x5ab70d['ui']['focusTracker']['isFocused']&&_0x5884ef['hasMarkerForId'](_0x4abac1)&&_0x5ab70d['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x5b5572,'addComment',(_0x57a175,{threadId:_0x4ff863,isFromAdapter:_0x50a10c})=>{if(_0x50a10c||!_0x5884ef['hasMarkerForId'](_0x4ff863)||!_0x5b5572['hasCommentThread'](_0x4ff863))return;0x1===_0x5b5572['getCommentThread'](_0x4ff863)['length']&&(_0x5ab70d['editing']['view']['focus'](),_0x57a175['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x1a0256=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x25bd4f;for(const _0x5b312d in _0x1a0256){const _0x435d1c=_0x5b312d,_0x43964f=_0x1a0256[_0x435d1c];if('commentsLicenseKeyValid'==_0x43964f||'commentsLicenseKeyInvalid'==_0x43964f||'commentsLicenseKeyExpired'==_0x43964f||'commentsLicenseKeyDomainLimit'==_0x43964f||'commentsLicenseKeyNotAllowed'==_0x43964f||'commentsLicenseKeyEvaluationLimit'==_0x43964f||'commentsLicenseKeyTrialLimit'==_0x43964f||'commentsLicenseKeyUsageLimit'==_0x43964f){delete _0x1a0256[_0x435d1c],_0x25bd4f=_0x43964f,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x25bd4f&&_0x1a0256['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x25bd4f&&_0x1a0256['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x25bd4f&&_0x1a0256['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x25bd4f&&_0x1a0256['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x25bd4f&&_0x1a0256['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x25bd4f&&_0x1a0256['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x25bd4f&&_0x1a0256['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x3b6be9){const _0x40b67b=this['editor'],_0x565c41=new _0x3b6be9(_0x40b67b['locale']),_0x174761=_0x40b67b['commands']['get']('addCommentThread');return _0x565c41['set']({'label':E(_0x40b67b['locale'],'Comment'),'icon':_0x433d7b}),_0x565c41['bind']('isEnabled')['to'](_0x174761),this['listenTo'](_0x565c41,'execute',()=>{_0x174761['execute']();}),_0x565c41;}}class s extends _0x90bc29{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x1570e5){super(_0x1570e5),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x13488a,_0x3403e3,_0x52d763)=>{_0x52d763?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0xe68180,_0x2388c1]of this['editor']['commands'])_0x2388c1['affectsData']&&'addCommentThread'!==_0xe68180&&_0x2388c1['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 _0x1aa1bc=this['editor']['editing']['view']['document'];this['listenTo'](_0x1aa1bc,'cut',_0x6dfe4a=>_0x6dfe4a['stop'](),{'priority':'highest'}),this['listenTo'](_0x1aa1bc,'clipboardInput',_0x10ce2a=>_0x10ce2a['stop'](),{'priority':'highest'}),this['listenTo'](_0x1aa1bc,'delete',_0x14064e=>_0x14064e['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x333bc4,_0x58cfc8]of this['editor']['commands'])_0x58cfc8['affectsData']&&'addCommentThread'!==_0x333bc4&&_0x58cfc8['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class M extends _0x43274a{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[O];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x112a12){super(_0x112a12),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x91620=this['context']['plugins']['get'](O);this['listenTo'](_0x91620,'_activateAnnotation',(_0x5bf1e3,_0x52e82d)=>{for(const _0x2575ab of this['activeUIs']){const _0x115ff3=this['_uis']['get'](_0x2575ab);(0x0,this['uisData']['get'](_0x2575ab)['filter'])(_0x52e82d)&&_0x115ff3['setActiveAnnotation'](_0x52e82d);}}),this['listenTo'](_0x91620,'_deactivateAllAnnotations',()=>{for(const _0xd90061 of this['activeUIs']){this['_uis']['get'](_0xd90061)['setActiveAnnotation'](null);}}),this['listenTo'](_0x91620['_visibleAnnotations'],'add',(_0x2bef51,_0x388161)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x388161);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0xa44f21){return this['activeUIs']['has'](_0xa44f21);}['activate'](_0x26ec7f,_0x335e56=this['defaultFilter']){const _0x20926c=this['context']['plugins']['get'](O);if(!this['_uis']['has'](_0x26ec7f))throw new _0x3611b8('annotationsuis-missing-ui',this,{'uiName':_0x26ec7f});this['isActive'](_0x26ec7f)&&this['deactivate'](_0x26ec7f),this['activeUIs']['add'](_0x26ec7f);const _0x22aac4=new _();!function({source:_0x40eb1c,target:_0x2bbeff,filter:_0x1871bf}){for(const _0xd840f of _0x40eb1c)_0x1871bf(_0xd840f)&&_0x2bbeff['add'](_0xd840f);_0x2bbeff['listenTo'](_0x40eb1c,'add',(_0x3b5767,_0x59f057)=>{_0x1871bf(_0x59f057)&&_0x2bbeff['add'](_0x59f057);}),_0x2bbeff['listenTo'](_0x40eb1c,'remove',(_0x3f73cb,_0x507c84)=>{_0x2bbeff['has'](_0x507c84)&&_0x2bbeff['remove'](_0x507c84);});}({'source':_0x20926c['_visibleAnnotations'],'target':_0x22aac4,'filter':_0x335e56}),this['uisData']['set'](_0x26ec7f,{'collection':_0x22aac4,'filter':_0x335e56});const _0x2b3534=this['_uis']['get'](_0x26ec7f);_0x2b3534['attach'](_0x22aac4),this['listenTo'](_0x2b3534,'change:activeAnnotation',(_0x4d68c8,_0x4dee26,_0x4d8bf7,_0x5b9dee)=>{_0x5b9dee&&_0x20926c['_removeActiveAnnotation'](_0x5b9dee),_0x4d8bf7&&_0x20926c['_addActiveAnnotation'](_0x4d8bf7);});}['deactivate'](_0x585bf9){if(this['activeUIs']['delete'](_0x585bf9),!this['_uis']['has'](_0x585bf9))throw new _0x3611b8('annotationsuis-missing-ui',this,{'uiName':_0x585bf9});const _0x5b3849=this['_uis']['get'](_0x585bf9);_0x5b3849['detach'](),this['stopListening'](_0x5b3849),this['uisData']['get'](_0x585bf9)['collection']['destroy'](),this['uisData']['delete'](_0x585bf9);}['switchTo'](_0xafb8f0){if(!this['_uis']['has'](_0xafb8f0))throw new _0x3611b8('annotationsuis-missing-ui',this,{'uiName':_0xafb8f0});const _0x41dfd6=this['context']['plugins']['get'](O),_0x2248b2=Array['from'](_0x41dfd6['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0xafb8f0);const _0x4b9cec=this['_uis']['get'](_0xafb8f0);_0x4b9cec['setActiveAnnotation'](_0x2248b2),_0x4b9cec['_setSelectedAnnotations']&&_0x2248b2&&_0x4b9cec['_setSelectedAnnotations']([_0x2248b2]);}['deactivateAll'](){for(const _0x43c849 of this['activeUIs'])this['deactivate'](_0x43c849);}['register'](_0x1a5804,_0x130d62){if(this['_uis']['has'](_0x1a5804))throw new _0x3611b8('annotationsuis-register-already-registered');if('function'!=typeof _0x130d62['attach']||'function'!=typeof _0x130d62['detach']||'function'!=typeof _0x130d62['setActiveAnnotation'])throw new _0x3611b8('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x1a5804,_0x130d62);}['refilterAnnotations'](){const _0x5dfb46=this['context']['plugins']['get'](O)['collection'],_0x1444df=new Map(),_0x492885=Array['from'](this['activeUIs']);for(const _0x214cda of this['activeUIs']){const _0x24aa41=this['uisData']['get'](_0x214cda)['collection'];for(const _0x4a61a8 of _0x24aa41)_0x1444df['set'](_0x4a61a8,_0x214cda);}for(const _0x5eb072 of _0x5dfb46){const _0x45fa81=_0x1444df['get'](_0x5eb072);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5eb072);const _0x5596fd=_0x492885['find'](_0x14db06=>this['uisData']['get'](_0x14db06)['filter'](_0x5eb072));_0x45fa81!==_0x5596fd&&(_0x45fa81&&this['uisData']['get'](_0x45fa81)['collection']['remove'](_0x5eb072),_0x5596fd&&this['uisData']['get'](_0x5596fd)['collection']['add'](_0x5eb072));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x36cfb4){const _0x4d09b3=[];for(const _0x4fc0cf of this['activeUIs']){(0x0,this['uisData']['get'](_0x4fc0cf)['filter'])(_0x36cfb4)&&_0x4d09b3['push'](_0x4fc0cf);}if(_0x4d09b3['length']>0x1)throw new _0x3611b8('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x4d09b3,'annotationType':_0x36cfb4['type']});}}const pi=xt('px');class F extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x36adf1){super(_0x36adf1);const _0xf034a4=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 _0x11f52f(),this['focusCycler']=new _0x4728ff({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0xf034a4['to']('class')],'style':{'minHeight':_0xf034a4['to']('minHeight',_0x3c3bee=>'number'==typeof _0x3c3bee?pi(_0x3c3bee+0xa):null)},'dir':_0x36adf1['uiLanguageDirection'],'role':'application','aria-label':E(_0x36adf1,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':E(_0x36adf1,'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',_0x1a4ba2=>{this['_updateItemPositionInFocusables'](_0x1a4ba2['source']);}),this['list']['forEach'](_0x304acb=>{this['focusTracker']['add'](_0x304acb['element']),this['_updateItemPositionInFocusables'](_0x304acb);}),this['list']['on']('change',(_0x7adf66,_0xb1ede4)=>{for(const _0x1da5d4 of _0xb1ede4['removed'])this['focusTracker']['remove'](_0x1da5d4['element']),this['focusables']['remove'](_0x1da5d4);for(const _0x204277 of _0xb1ede4['added'])this['focusTracker']['add'](_0x204277['element']),this['_updateItemPositionInFocusables'](_0x204277);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x373348){const _0x1264c3=this['focusables']['getIndex'](_0x373348);let _0x50b19c,_0x570c79;for(const _0x531b87 of this['focusables'])if(_0x373348['top']<_0x531b87['top']){_0x50b19c=_0x531b87;break;}if(_0x570c79=_0x50b19c?this['focusables']['getIndex'](_0x50b19c):this['focusables']['length'],-0x1!==_0x1264c3){if(_0x1264c3===_0x570c79-0x1)return;this['focusables']['remove'](_0x373348),_0x570c79=_0x50b19c?this['focusables']['getIndex'](_0x50b19c):this['focusables']['length'];}this['focusables']['add'](_0x373348,_0x570c79);}}const Ht=xt('px');class H extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x402258){super(_0x402258),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x314a1f,_0xc1a135)=>_0x314a1f+_0xc1a135),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Lt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x23f345=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x23f345['to']('isAnimationDisabled',_0x4d33cb=>_0x4d33cb?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x23f345['to']('top',_0x1386c1=>Ht(_0x1386c1))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x29b59b=this['element']['clientHeight'];_0x29b59b&&(this['height']=_0x29b59b);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x43274a{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x449b34){super(_0x449b34),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 _0x287c6c=this['context']['config']['get']('sidebar.container');_0x287c6c&&this['setContainer'](_0x287c6c);}['setContainer'](_0x3a6193){if(!y(_0x3a6193))throw new _0x3611b8('sidebar-setcontainer-invalid-element');this['container']=_0x3a6193;}['_attachToContainer']({viewClass:_0x17e83d='',spaceBetweenItems:_0x334362=0x19}={}){if(!y(this['container']))throw new _0x3611b8('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x17e83d,this['_spaceBetweenItems']=_0x334362;}['rearrange']({removedAnnotation:_0x221dd4,previousAnnotation:_0x285d75,nextAnnotation:_0xd11323}){const _0x5a3bcf=this['getSidebarItemView'](_0x221dd4);this['view']['list']['remove'](_0x5a3bcf),this['_destroySidebarItemView'](_0x221dd4),_0x285d75&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x285d75)),_0xd11323&&this['_alignToTargetRect'](this['getSidebarItemView'](_0xd11323)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x1b2885,activatedAnnotation:_0x3e7a79,disableAnimationOnActivatedAnnotation:_0x518181}){if(this['_activeAnnotation']=_0x3e7a79,_0x1b2885){_0x1b2885['isActive']=!0x1;const _0x4946e7=this['getSidebarItemView'](_0x1b2885);_0x4946e7&&_0x518181&&(_0x4946e7['isAnimationDisabled']=!0x1);}if(_0x3e7a79){const _0x471509=this['getSidebarItemView'](_0x3e7a79);_0x471509&&(_0x3e7a79['isActive']=!0x0,_0x518181&&(_0x471509['isAnimationDisabled']=!0x0,_0x471509['top']+=0x1),this['_alignToTargetRect'](_0x471509));}}['_detachFromContainer'](_0xd6e09a){if(this['view']['element']['remove'](),_0xd6e09a){for(const _0x14fd36 of _0xd6e09a)this['_destroySidebarItemView'](_0x14fd36);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x350aa2,_0x27ea94){_0x27ea94||(_0x27ea94=_0x350aa2['view']);const _0x2a8f1a=new H(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x2a8f1a,_0x350aa2),this['_annotationToSidebarItemView']['set'](_0x350aa2,_0x2a8f1a),_0x2a8f1a['content']['add'](_0x27ea94),this['listenTo'](_0x350aa2['view'],'change:targetRect',(_0x4e947a,_0x1b9668,_0x1296d8)=>{const _0x2307db=this['_getTargetTop'](_0x350aa2,_0x1296d8);_0x2a8f1a['_targetTop']!=_0x2307db&&(_0x2a8f1a['_targetTop']=_0x2307db,this['_setItemTop'](_0x2a8f1a,_0x2307db));}),this['listenTo'](_0x2a8f1a,'change:top',()=>{this['_recalculate'](_0x2a8f1a,'top');}),this['listenTo'](_0x2a8f1a,'change:bottom',()=>{this['_recalculate'](_0x2a8f1a,'bottom');}),this['_alignToTargetRect'](_0x2a8f1a);const _0x291bb6=this['_getItemBefore'](_0x2a8f1a);if(_0x291bb6)this['_alignAfterItem'](_0x291bb6,_0x2a8f1a)||this['_alignToTargetRect'](_0x2a8f1a);else this['_alignToTargetRect'](_0x2a8f1a);return this['_updateLastItem'](),this['view']['list']['add'](_0x2a8f1a),_0x2a8f1a;}['_alignForTopChange'](_0x3a5a32){if(!_0x3a5a32['content']['length'])return;const _0x52287a=this['_getItemBefore'](_0x3a5a32);if(!_0x52287a)return;const _0x4a6819=this['_sidebarItemViewToAnnotation']['get'](_0x52287a),_0x2c4bf9=this['_activeAnnotation'];_0x2c4bf9&&_0x2c4bf9===_0x4a6819?this['_alignAfterItem'](_0x52287a,_0x3a5a32):this['_alignBeforeItem'](_0x3a5a32,_0x52287a);}['_alignForBottomChange'](_0x189b5e){if(!_0x189b5e['content']['length'])return;const _0x34ace2=this['_getItemAfter'](_0x189b5e);if(!_0x34ace2)return;const _0x38183e=this['_sidebarItemViewToAnnotation']['get'](_0x34ace2),_0x10351f=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x3451e9=this['_activeAnnotation'];_0x3451e9&&_0x3451e9===_0x38183e&&_0x10351f?(this['_alignBeforeItem'](_0x34ace2,_0x189b5e),this['_alignAfterItem'](_0x189b5e,_0x34ace2)):_0x3451e9&&_0x3451e9===_0x38183e?this['_alignBeforeItem'](_0x34ace2,_0x189b5e):this['_alignAfterItem'](_0x189b5e,_0x34ace2);}['_recalculate'](_0x3f1b5c,_0x59f242){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x58ef70,changedProp:_0x2728c5}of this['_recalculateBuffer'])'top'===_0x2728c5?this['_alignForTopChange'](_0x58ef70):this['_alignForBottomChange'](_0x58ef70);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x3f1b5c,'changedProp':_0x59f242});}['getSidebarItemView'](_0x3949e2){return this['_annotationToSidebarItemView']['get'](_0x3949e2);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x38a21e){const _0x247430=this['getSidebarItemView'](_0x38a21e);this['stopListening'](_0x247430),this['stopListening'](_0x38a21e['view']),_0x247430['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x38a21e),this['_sidebarItemViewToAnnotation']['delete'](_0x247430);}['_createSidebarView'](){const _0x300cf6=new F(this['context']['locale']);return _0x300cf6['render'](),this['on']('change:_lastItem',(_0x1d277c,_0x5d3e86,_0xe2dabf,_0x2981e8)=>{_0x2981e8&&_0x300cf6['unbind']('minHeight'),_0xe2dabf?_0x300cf6['bind']('minHeight')['to'](_0xe2dabf,'bottom'):_0x300cf6['minHeight']=null;}),_0x300cf6;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x14db1b){const _0x2eab27=this['_sidebarItemViewToAnnotation']['get'](_0x14db1b),_0x1bdce4=_0x2eab27&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2eab27)-0x1);return _0x1bdce4&&this['getSidebarItemView'](_0x1bdce4)||null;}['_getItemAfter'](_0x3121c7){const _0xb03bb9=this['_sidebarItemViewToAnnotation']['get'](_0x3121c7),_0x2a55f6=_0xb03bb9&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0xb03bb9)+0x1);return _0x2a55f6&&this['getSidebarItemView'](_0x2a55f6)||null;}['_alignBeforeItem'](_0x2f5670,_0x154876){_0x2f5670['updateHeight']();const _0x1bfa2f=R(_0x154876['bottom']+this['_spaceBetweenItems'],_0x2f5670['top']);return!!_0x1bfa2f&&(this['_setItemTop'](_0x154876,_0x154876['top']-_0x1bfa2f),!0x0);}['_alignAfterItem'](_0x1d3984,_0x29c032){_0x1d3984['updateHeight']();const _0x46475d=R(_0x1d3984['bottom']+this['_spaceBetweenItems'],_0x29c032['top']);return!!_0x46475d&&(this['_setItemTop'](_0x29c032,_0x29c032['top']+_0x46475d,!0x1),!0x0);}['_alignToTargetRect'](_0x5a636f){const _0xeed427=this['_sidebarItemViewToAnnotation']['get'](_0x5a636f);if(!_0xeed427||!_0xeed427['target']||!_0xeed427['targetRect'])return;const _0x342da3=this['_getTargetTop'](_0xeed427,_0xeed427['targetRect']);this['_setItemTop'](_0x5a636f,_0x342da3);}['_getTargetTop'](_0x257a40,_0x2662c7){if(null===_0x2662c7)return 0x0;if(_0x257a40['target']instanceof _0x5121c1)return _0x2662c7['top'];{const _0x4e4df7=new _0x5121c1(this['view']['element'])['top'];return _0x2662c7['top']-_0x4e4df7;}}['_setItemTop'](_0x3339a3,_0x47934d,_0x5311af=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x5311af&&(_0x47934d=Math['max'](_0x47934d,this['_getMaxAvailableTop'](_0x3339a3))),_0x3339a3['top']=_0x47934d;}['_getMaxAvailableTop'](_0x89b9f8){let _0x466660=this['_getItemBefore'](_0x89b9f8),_0x3a6ec5=0x0;for(;_0x466660;)_0x466660['updateHeight'](),_0x3a6ec5+=this['_spaceBetweenItems']+_0x466660['height'],_0x466660=this['_getItemBefore'](_0x466660);return _0x3a6ec5;}}function R(_0x32468b,_0x54fc13){return Math['max'](_0x32468b-_0x54fc13,0x0);}function y(_0x400b96){return null!==_0x400b96&&'object'==typeof _0x400b96&&0x1===_0x400b96['nodeType'];}class e extends _0x43274a{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1f3aac){super(_0x1f3aac),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x172c01(),this['_refreshPositioningDebounced']=_0x54e343(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x212319=this['context']['plugins']['get'](M),_0x50c81b=this['context']['plugins']['get'](z);_0x212319['register']('wideSidebar',this),_0x50c81b['container']&&_0x212319['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x1b7c6e){if(_0x1b7c6e===this['activeAnnotation'])return;const _0x5bc54b=this['context']['plugins']['get'](z);_0x5bc54b['_activeAnnotation']=_0x1b7c6e;const _0x47668c=this['activeAnnotation'];_0x5bc54b['refresh']({'blurredAnnotation':_0x47668c,'activatedAnnotation':_0x1b7c6e}),this['activeAnnotation']=_0x1b7c6e;}['attach'](_0xe69e92){this['annotations']=_0xe69e92;const _0x99ca4d=this['context']['plugins']['get'](z);if(_0x99ca4d['_annotations']=_0xe69e92,this['isAttached'])throw new _0x3611b8('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x99ca4d,'set:container',()=>{this['detach'](),this['listenTo'](_0x99ca4d,'change:container',_0x2d2583=>{_0x2d2583['off'](),this['attach'](_0xe69e92);});}),_0x99ca4d['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x232b27=_0x1a36d7=>{_0x1a36d7['updateTargetRect'](),_0x99ca4d['addAnnotation'](_0x1a36d7);};for(const _0x49c9a0 of _0xe69e92)_0x232b27(_0x49c9a0);this['listenTo'](_0xe69e92,'add',(_0x196662,_0x2ae52b)=>{_0x232b27(_0x2ae52b);}),this['listenTo'](_0xe69e92,'remove',(_0x3fa8b,_0x47e902,_0x389c74)=>{_0x99ca4d['rearrange']({'removedAnnotation':_0x47e902,'previousAnnotation':_0xe69e92['get'](_0x389c74-0x1),'nextAnnotation':_0xe69e92['get'](_0x389c74+0x1)}),_0x47e902===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0xe69e92,'focus',(_0x2b9691,_0x5a15a1)=>{this['setActiveAnnotation'](_0x5a15a1);}),this['listenTo'](_0xe69e92,'blur',()=>{this['setActiveAnnotation'](null);});const _0x186933=this['context']instanceof _0x11fda3?this['context']['editors']:new _0x172c01([this['context']]);for(const _0x45eceb of _0x186933)this['_integrateWithEditorAnnotations'](_0x45eceb);this['listenTo'](_0x186933,'add',(_0x4549fb,_0x197836)=>{this['listenTo'](_0x197836,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x197836);});}),this['listenTo'](_0x186933,'remove',(_0x3b0ea3,_0x3d32e9)=>{_0x3d32e9['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3d32e9['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x3611b8('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x4a57eb=this['context']['plugins']['get'](z);_0x4a57eb['_detachFromContainer'](this['annotations']),this['stopListening'](_0x4a57eb),this['stopListening'](this['annotations']),this['context']instanceof _0x11fda3&&this['stopListening'](this['context']['editors']);for(const _0x395e87 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x395e87);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x191c54){if(!_0x191c54['plugins']['has']('EditorAnnotations'))return;const _0x2529b4=_0x191c54['plugins']['get']('EditorAnnotations'),_0x269184=()=>{const _0x4b2ec4=_0x2529b4['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x4b2ec4[0x0]||null);};this['listenTo'](_0x2529b4,'refresh',_0x269184),this['listenTo'](_0x2529b4,'blur',(_0x1ba8a5,{isAnnotationTracked:_0x1cfe16})=>{this['activeAnnotation']&&_0x1cfe16(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x2529b4,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x574f96=>{_0x2529b4['hasDomSelection']()&&(_0x269184(),_0x574f96['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2529b4);}['_destroyEditorAnnotationsIntegration'](_0x364794){this['stopListening'](_0x364794),this['_editorAnnotations']['remove'](_0x364794);}}class C extends _0x3d044c{['counterView'];constructor(_0x62d353){super(_0x62d353);const _0x2b5902=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x2b4108,_0x4e7e51)=>_0x2b4108?'...':_0x4e7e51['toString']()),this['set']('annotationType',''),this['icon']=_0x433d7b,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x2b5902['to']('annotationType',_0x5772c1=>'ck-annotation-counter__badge--'+_0x5772c1),_0x2b5902['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x2b5902['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x43274a{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x288ca6){super(_0x288ca6),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x9ec0df),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x172c01(),this['_refreshPositioningDebounced']=_0x54e343(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x407751(this['context']['locale']),this['balloonPanelView']=new _0x467b52(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x14ab24){this['annotations']=_0x14ab24;const _0x33133d=this['context']['plugins']['get'](z),_0x4a2496=this['balloonPanelView'];if(_0x33133d['_annotations']=_0x14ab24,this['isAttached'])throw new _0x3611b8('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x33133d,'set:container',()=>{this['detach'](),this['listenTo'](_0x33133d,'change:container',_0x261f9f=>{_0x261f9f['off'](),this['attach'](_0x14ab24);});}),_0x33133d['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x450422=_0x465da5=>{const _0x919df2=new C(this['context']['locale']);_0x33133d['addAnnotation'](_0x465da5,_0x919df2),this['_annotationToNarrowView']['set'](_0x465da5,_0x919df2),_0x919df2['bind']('isDirty','annotationType','number')['to'](_0x465da5['view'],'isDirty','type','length'),_0x919df2['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x4a2496['content']['first']!==_0x465da5['view']?(this['_showBalloon'](_0x465da5),_0x465da5['view']['element']['focus'](),this['setActiveAnnotation'](_0x465da5)):this['setActiveAnnotation'](null);});};for(const _0x207f69 of _0x14ab24)_0x450422(_0x207f69);this['listenTo'](_0x14ab24,'add',(_0x2def5e,_0x1a8408)=>{_0x450422(_0x1a8408);}),this['listenTo'](_0x14ab24,'remove',(_0xd91f96,_0xde0718,_0x5be9e2)=>{this['_annotationToNarrowView']['get'](_0xde0718)['destroy'](),this['_annotationToNarrowView']['delete'](_0xde0718),_0x33133d['rearrange']({'removedAnnotation':_0xde0718,'previousAnnotation':_0x14ab24['get'](_0x5be9e2-0x1),'nextAnnotation':_0x14ab24['get'](_0x5be9e2+0x1)}),_0xde0718===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x14ab24,'focus',(_0xc411a7,_0x5e57b1)=>{this['setActiveAnnotation'](_0x5e57b1);}),this['listenTo'](_0x14ab24,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x26dccd,_0x25bc08)=>{_0x25bc08['keyCode']===_0x2f3769['esc']&&_0x4a2496['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x4a2496['content']['first']),this['_hideBalloon'](),_0x25bc08['stopPropagation'](),_0x25bc08['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x5308a6,_0x497b92)=>{const _0x317088=_0x497b92['target'];_0x4a2496['isVisible']&&_0x4a2496['element']['contains'](_0x317088)||_0x33133d['view']['element']['contains'](_0x317088)||_0x5308a6['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x79ee1b=>_0x79ee1b['contains'](_0x317088))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x55bbf9=this['context']instanceof _0x11fda3?this['context']['editors']:new _0x172c01([this['context']]);for(const _0x9d5381 of _0x55bbf9)this['_integrateWithEditorAnnotations'](_0x9d5381);this['listenTo'](_0x55bbf9,'add',(_0x3cf42f,_0x26cafa)=>{this['listenTo'](_0x26cafa,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x26cafa);});}),this['listenTo'](_0x55bbf9,'remove',(_0x5838f7,_0x2c5e62)=>{_0x2c5e62['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2c5e62['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x3d451e){if(_0x3d451e===this['activeAnnotation'])return;const _0xdddf1e=this['context']['plugins']['get'](z);if(_0xdddf1e['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x3d451e,'disableAnimationOnActivatedAnnotation':!0x0}),_0x3d451e)_0xdddf1e['getSidebarItemView'](_0x3d451e)?this['_showBalloon'](_0x3d451e):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x3d451e;}['detach'](){if(!this['isAttached'])throw new _0x3611b8('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x2532d6=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x3b1fdd=>_0x3b1fdd['destroy']()),this['_annotationToNarrowView']['clear'](),_0x2532d6['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x11fda3&&this['stopListening'](this['context']['editors']);for(const _0x4848de of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x4848de);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'](_0x2ca7bc){if(!_0x2ca7bc['plugins']['has']('EditorAnnotations'))return;const _0x321431=_0x2ca7bc['plugins']['get']('EditorAnnotations'),_0x5d5e85=this['context']['plugins']['get'](z),_0x459f60=this['annotations'],_0x1fa419=this['balloonPanelView'],_0x3f80a0=()=>{const _0x1787f6=_0x321431['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x1787f6),this['setActiveAnnotation'](_0x1787f6[0x0]||null);};this['listenTo'](_0x321431,'refresh',_0x3f80a0),this['listenTo'](_0x321431,'blur',(_0x512bf9,{isAnnotationTracked:_0xd15c79})=>{this['activeAnnotation']&&_0xd15c79(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x321431,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x459f60,'blur',_0x173705=>{_0x321431['hasDomSelection']()&&_0x173705['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x3bf0e6,_0x3ff210)=>{const _0x4d3ba1=_0x3ff210['target'];_0x1fa419['isVisible']&&_0x1fa419['element']['contains'](_0x4d3ba1)||_0x5d5e85['view']['element']['contains'](_0x4d3ba1)||this['activeAnnotation']&&_0x321431['hasDomSelection']()&&(_0x3f80a0(),_0x3bf0e6['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x321431);}['_destroyEditorAnnotationsIntegration'](_0x57c172){_0x57c172&&(this['stopListening'](_0x57c172),this['_editorAnnotations']['remove'](_0x57c172));}['_setSelectedAnnotations'](_0x24971a){for(const _0x1b3d16 of this['_selectedAnnotations'])_0x24971a['includes'](_0x1b3d16)||this['_manuallyClosedAnnotationViews']['delete'](_0x1b3d16['view']);this['_selectedAnnotations']=_0x24971a;}['_refreshPositioning'](){const _0x17967b=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x17967b['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x37ec7c){if(this['_manuallyClosedAnnotationViews']['has'](_0x37ec7c['view']))return;const _0x66f087=this['balloonPanelView']['content']['first'];_0x66f087!==_0x37ec7c['view']?(_0x66f087&&this['_detachListeners'](_0x66f087),this['_attachListeners'](_0x37ec7c['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x37ec7c['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x4c7d1c=this['balloonPanelView']['content']['first'],_0x26601c=_0x4c7d1c&&this['annotations']['getByView'](_0x4c7d1c);if(!_0x26601c||!this['_annotationToNarrowView']['has'](_0x26601c))return;const _0x3caa42=this['_annotationToNarrowView']['get'](_0x26601c)['element'],_0x49d9b4=(function(){const _0x4f9902=_0x467b52['defaultPositions'];return[_0x4f9902['southArrowNorthEast'],_0x4f9902['northArrowSouthEast'],_0x4f9902['southArrowNorth'],_0x4f9902['northArrowSouth'],_0x4f9902['southArrowNorthWest'],_0x4f9902['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x3caa42,'positions':_0x49d9b4});}['_hideBalloon'](){const _0x15344a=this['balloonPanelView'],_0x12d71f=_0x15344a['content']['first'];_0x12d71f&&(this['_detachListeners'](_0x12d71f),_0x15344a['unpin'](),_0x15344a['content']['clear']());}['_attachListeners'](_0x57d5eb){this['listenTo'](_0x57d5eb,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x57d5eb,'Esc',(_0x3fac91,_0x35dfd1)=>{this['_manuallyClosedAnnotationViews']['add'](_0x57d5eb),this['_hideBalloon'](),_0x35dfd1();});}['_detachListeners'](_0x2f705b){this['stopListening'](_0x2f705b);}}class c extends _0x90bc29{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x5c1ae6,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x387412){super(_0x387412),_0x387412['editing']['view']['addObserver'](_0xc0e6dc),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x387412['plugins']['get'](_0x5c1ae6),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x5d4a00=this['editor']['plugins']['get'](M);_0x5d4a00['context']===this['editor']&&(_0x5d4a00['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x3a3dfb,_0x5e2321)=>{const _0x236f1c=this['_balloon'];if(this['isAttached']&&_0x236f1c['visibleView']){const _0x3cb0f5=this['annotations']['getByView'](_0x236f1c['visibleView']);_0x3cb0f5&&this['_closeAnnotation'](_0x3cb0f5),_0x5e2321();}}));}['afterInit'](){const _0x149863=this['editor']['plugins']['get'](M);_0x149863['context']===this['editor']&&(_0x149863['hasActive']()||_0x149863['switchTo']('inline'));}['setActiveAnnotation'](_0x414f26){_0x414f26!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x414f26&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x414f26)&&this['_addAnnotationToBalloon'](_0x414f26,!0x0),_0x414f26['isActive']=!0x0),_0x414f26||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x414f26);}['attach'](_0x49fae1){this['annotations']=_0x49fae1;const _0x4af53d=this['editor']['plugins']['get'](M),_0x4938b6=this['_balloon'];if(this['isAttached'])throw new _0x3611b8('inlineannotations-attach-already-attached',this);if(_0x4af53d['context']!==this['editor'])throw new _0x3611b8('inlineannotations-not-allowed-with-context',this);const _0x4e7163=this['editor']['plugins']['get'](P);this['listenTo'](_0x4e7163,'refresh',()=>{const _0x897b3f=_0x4e7163['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x4e3e47,_0x2ea59b;!this['_forceRefresh']&&(_0x4e3e47=_0x897b3f,_0x2ea59b=this['_selectedAnnotations'],_0x4e3e47['length']===_0x2ea59b['length']&&_0x4e3e47['every'](_0x12387=>_0x2ea59b['includes'](_0x12387)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x897b3f),this['setActiveAnnotation'](_0x897b3f[0x0]||null));}),this['listenTo'](_0x4e7163,'blur',(_0x337d93,{isAnnotationTracked:_0x4268bc})=>{this['activeAnnotation']&&_0x4268bc(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x2fd766,_0x53ceb9,_0x397551)=>{_0x397551||this['setActiveAnnotation'](null);}),this['listenTo'](_0x49fae1,'remove',(_0x3ad005,_0x4e9181)=>{this['_removeAnnotationFromBalloon'](_0x4e9181),_0x4e9181===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x4938b6,'change:visibleView',(_0x2fb5e9,_0x57e21c,_0x5848aa,_0x55af61)=>{_0x55af61&&this['stopListening'](_0x55af61);const _0x448632=_0x49fae1['getByView'](_0x5848aa);_0x5848aa&&_0x448632&&(this['listenTo'](_0x5848aa,'change:height',()=>{_0x4938b6['updatePosition']();}),this['listenTo'](_0x5848aa,'Esc',()=>{this['_closeAnnotation'](_0x448632),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x448632&&this['setActiveAnnotation'](_0x448632));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x4938b6['visibleView']&&(_0x49fae1['getByView'](_0x4938b6['visibleView'])&&_0x4938b6['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 _0x3611b8('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x4f4436 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x4f4436);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x3154f8){for(const _0x2f972e of this['_selectedAnnotations'])_0x3154f8['includes'](_0x2f972e)||this['_manuallyClosed']['delete'](_0x2f972e);for(const _0x50017d of this['annotations'])_0x3154f8['includes'](_0x50017d)||this['_removeAnnotationFromBalloon'](_0x50017d);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x578eaa of _0x3154f8)this['_addAnnotationToBalloon'](_0x578eaa);}this['_selectedAnnotations']=_0x3154f8;}['_addAnnotationToBalloon'](_0x293d3f,_0x1b0fa9=!0x1){this['_manuallyClosed']['has'](_0x293d3f)||(this['_addedAnnotations']['has'](_0x293d3f)||this['_balloon']['hasView'](_0x293d3f['view'])||(this['_addedAnnotations']['add'](_0x293d3f),this['_balloon']['add']({'stackId':_0x293d3f['view']['id'],'view':_0x293d3f['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x293d3f)}})),_0x1b0fa9&&this['_balloon']['showStack'](_0x293d3f['view']['id']));}['_getBalloonTargetForAnnotation'](_0x4e4311){const _0x498e29=_0x4e4311['target'],_0x38239a=this['editor']['editing']['view'],_0xe4a3ef=_0x38239a['document']['selection']['getFirstRange'](),_0xdc05fb=_0x38239a['domConverter']['viewRangeToDom'](_0xe4a3ef);if(_0xdc05fb['collapse'](!0x0),_0x498e29){if(_0x498e29 instanceof _0x5121c1)return _0x498e29;let _0x8b7426=[];for(const _0x50c4ca of _0x498e29)_0x8b7426['push'](...(_0x3f4796=_0x50c4ca['getClientRects'](),Array['from'](_0x3f4796)['map'](DOMRect['fromRect'])));_0x8b7426=function(_0xeafa9b){const _0x4a2d43=[];let _0x4c7f37=_0xeafa9b[0x0];for(let _0xe452b7=0x1;_0xe452b7<_0xeafa9b['length'];_0xe452b7++)B(_0x4c7f37,_0xeafa9b[_0xe452b7])?_0x4c7f37['width']+=_0xeafa9b[_0xe452b7]['width']:(_0x4a2d43['push'](_0x4c7f37),_0x4c7f37=_0xeafa9b[_0xe452b7]);return _0x4a2d43['push'](_0x4c7f37),_0x4a2d43;}(_0x8b7426);const _0x2b8193=_0xdc05fb['getBoundingClientRect']();return _0x8b7426['find'](_0x1bbd44=>_0x1bbd44['top']<=_0x2b8193['top']&&_0x1bbd44['bottom']>=_0x2b8193['bottom']&&_0x1bbd44['left']<=_0x2b8193['left']&&_0x1bbd44['right']>=_0x2b8193['right'])||_0x8b7426[0x0];}var _0x3f4796;return _0x4e4311['targetRect']||_0xdc05fb;}['_removeAnnotationFromBalloon'](_0x3705d0){this['_addedAnnotations']['has'](_0x3705d0)&&this['_balloon']['hasView'](_0x3705d0['view'])&&(this['_addedAnnotations']['delete'](_0x3705d0),this['_balloon']['remove'](_0x3705d0['view']));}['_closeAnnotation'](_0x30ef2e){this['_manuallyClosed']['add'](_0x30ef2e),this['_removeAnnotationFromBalloon'](_0x30ef2e);}}function B(_0x56edb3,_0x43913f){return _0x56edb3['top']===_0x43913f['top']&&_0x56edb3['bottom']===_0x43913f['bottom']&&_0x56edb3['right']===_0x43913f['left'];}class tt extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x1d72e7,_0x56d51a){super(_0x1d72e7),this['set']('isEmpty',!_0x56d51a['length']),this['focusTracker']=new _0x11f52f(),this['_annotationViews']=_0x56d51a,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x4728ff({'focusables':_0x56d51a,'focusTracker':this['focusTracker']}),this['listenTo'](_0x56d51a,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x56d51a,'remove',(_0x5c1357,_0x29e3dc)=>{_0x29e3dc['isActive']&&this['focus'](),_0x56d51a['length']||(this['isEmpty']=!0x0);});const _0x46c886=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':E(_0x1d72e7,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x56d51a},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x46c886['if']('isEmpty','ck-hidden',_0x4e084a=>!_0x4e084a)]},'children':[{'text':E(_0x1d72e7,'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 _0x9693f1 of this['_annotationViews'])this['focusTracker']['add'](_0x9693f1['element']);this['_annotationViews']['on']('change',(_0x17844c,{added:_0x105fbe,removed:_0x4f9610})=>{for(const _0x3119f0 of _0x105fbe)this['focusTracker']['add'](_0x3119f0['element']);for(const _0x24c77 of _0x4f9610)this['focusTracker']['remove'](_0x24c77['element']);});}}class f extends _0x43274a{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,O];}constructor(_0x3494e0){super(_0x3494e0),this['archivedThreads']=new _0x172c01();}['init'](){const _0x880551=this['context'],_0x4f9745=_0x880551['plugins']['get'](o),_0x332564=_0x880551['plugins']['get'](O);this['listenTo'](_0x4f9745,'addCommentThread',(_0x4f6bea,{threadId:_0x1adda4})=>{const _0x283676=_0x4f9745['getCommentThread'](_0x1adda4);_0x283676['archivedAt']&&this['archivedThreads']['add'](_0x283676,this['_calculatePosition'](_0x283676['archivedAt'])),this['listenTo'](_0x283676,'change:archivedAt',(_0x2168a4,_0x37740f,_0x92a15e)=>{_0x92a15e?this['archivedThreads']['has'](_0x283676)||this['archivedThreads']['add'](_0x283676,this['_calculatePosition'](_0x283676['archivedAt'])):this['archivedThreads']['has'](_0x283676)&&this['archivedThreads']['remove'](_0x283676);});}),this['listenTo'](_0x4f9745,'removeCommentThread',(_0x4ff1ad,{threadId:_0x282706})=>{const _0x4c0dab=_0x4f9745['getCommentThread'](_0x282706);this['stopListening'](_0x4c0dab),this['archivedThreads']['has'](_0x4c0dab)&&this['archivedThreads']['remove'](_0x4c0dab);},{'priority':'highest'}),this['listenTo'](_0x332564['collection'],'focus',(_0x36a482,_0x2dc838)=>{_0x2dc838['isVisible']||(_0x2dc838['isActive']=!0x0,_0x332564['activate'](_0x2dc838));});}['_calculatePosition'](_0x4e85c8){const _0x91b0c5=[...this['archivedThreads']]['findIndex'](_0x1adbaa=>_0x1adbaa['archivedAt']<_0x4e85c8);return _0x91b0c5>-0x1?_0x91b0c5:this['archivedThreads']['length'];}}class a extends _0x90bc29{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,_0x1605b6];}constructor(_0x1d205b){super(_0x1d205b),this['annotationViews']=new _0x4a86ed(),this['_pendingThreads']=[];}['init'](){const _0x41a52f=this['editor'],_0x4e8ed5=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x41a52f['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x3d044c,!0x0)),_0x41a52f['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x2a7090=this['_createCommentsArchiveButton'](_0x10c47c);return _0x2a7090['set']({'role':'menuitemcheckbox'}),_0x2a7090;});const _0x4b5a07=_0x41a52f['plugins']['get'](f),_0x11d765=_0x41a52f['plugins']['get']('Annotations'),_0x3093aa=_0x41a52f['plugins']['get']('CommentsRepository');_0x4b5a07['archivedThreads']['forEach'](_0x4a9e00=>{this['_handleNewThread'](_0x4a9e00);}),this['listenTo'](_0x4b5a07['archivedThreads'],'add',(_0x3d917d,_0x523da4)=>{this['_handleNewThread'](_0x523da4);}),this['listenTo'](_0x11d765['collection'],'add',(_0x368131,_0x77507)=>{const _0x2b2820=this['_pendingThreads']['find'](_0x4bbc89=>{const _0x23b4c3=_0x3093aa['_threadToController']['get'](_0x4bbc89);return _0x23b4c3&&_0x77507['innerView']===_0x23b4c3['view'];});if(_0x2b2820){const _0x5a09d3=this['_calculatePosition'](_0x2b2820['archivedAt']);this['annotationViews']['add'](_0x77507['view'],_0x5a09d3),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2b2820),0x1);}}),this['listenTo'](_0x4b5a07['archivedThreads'],'remove',(_0x40f3ff,_0x2ac24d)=>{const _0x58c446=_0x41a52f['config']['get']('collaboration.channelId');if(!_0x58c446||_0x2ac24d['channelId']===_0x58c446){if(this['_pendingThreads']['includes'](_0x2ac24d))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2ac24d),0x1);else{const _0x50e93d=_0x3093aa['_threadToController']['get'](_0x2ac24d),_0x116d84=_0x11d765['getByInnerView'](_0x50e93d['view']);this['annotationViews']['remove'](_0x116d84['view']),this['stopListening'](_0x116d84['focusableElements']);}}}),this['listenTo'](_0x11d765['collection'],'add',(_0x19bd8e,_0x2d53e8)=>{this['listenTo'](_0x2d53e8,'escape',_0x4e8ed5);}),this['listenTo'](_0x11d765['collection'],'remove',(_0x416876,_0x43aa7f)=>{this['stopListening'](_0x43aa7f,'escape',_0x4e8ed5);});}['_handleNewThread'](_0x56cef6){const _0x20e0d2=this['editor']['plugins']['get']('CommentsRepository'),_0x3c8ea5=this['editor']['plugins']['get']('Annotations'),_0x19da74=this['editor']['config']['get']('collaboration.channelId');if(!_0x19da74||_0x56cef6['channelId']===_0x19da74){const _0x1cd8ee=_0x20e0d2['_threadToController']['get'](_0x56cef6);if(!_0x1cd8ee)return void this['_pendingThreads']['push'](_0x56cef6);const _0xcda276=this['_calculatePosition'](_0x56cef6['archivedAt']),_0x2b1702=_0x3c8ea5['getByInnerView'](_0x1cd8ee['view']);_0x2b1702['isVisible']&&_0x3c8ea5['_visibleAnnotations']['remove'](_0x2b1702),this['annotationViews']['add'](_0x2b1702['view'],_0xcda276);}}['_calculatePosition'](_0x24fe08){const _0x13b390=this['editor']['config']['get']('collaboration.channelId'),_0x4a9faa=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0x372133=>_0x372133['channelId']===_0x13b390)['findIndex'](_0x13c143=>_0x13c143['archivedAt']<_0x24fe08);return _0x4a9faa<0x0||_0x4a9faa>this['annotationViews']['length']?this['annotationViews']['length']:_0x4a9faa-0x1;}['_toggleDialog'](){const _0x4c1993=this['editor'],_0x1d4682=_0x4c1993['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new tt(_0x4c1993['locale'],this['annotationViews'])),'commentsArchive'===_0x1d4682['id']?_0x1d4682['hide']():_0x1d4682['show']({'id':'commentsArchive','title':E(_0x4c1993['locale'],'COMMENTS_ARCHIVE'),'icon':_0x2d292b,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x485ca9['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x36bf08,_0xa77a8d=!0x1){const _0x10295b=this['editor']['locale'],_0x44bd53=this['editor']['plugins']['get']('Dialog'),_0x5aab74=new _0x36bf08(_0x10295b);return _0x5aab74['bind']('isEnabled')['to'](this,'isEnabled'),_0x5aab74['bind']('isOn')['to'](_0x44bd53,'id',_0x31a03d=>'commentsArchive'===_0x31a03d),_0x5aab74['set']({'label':E(_0x10295b,'COMMENTS_ARCHIVE'),'icon':_0x2d292b,'isToggleable':!0x0}),_0xa77a8d&&(_0x5aab74['tooltip']=!0x0),this['listenTo'](_0x5aab74,'execute',()=>this['_toggleDialog']()),_0x5aab74;}['_hideDialogOnAnnotationEscape']=_0x3e4810=>{const _0x3c6a4c=_0x3e4810['source'];if(!this['annotationViews']['has'](_0x3c6a4c['view']))return;const _0xf145d0=this['editor']['plugins']['get']('Dialog');_0xf145d0['isOpen']&&'commentsArchive'===_0xf145d0['id']&&(_0xf145d0['hide'](),_0x3e4810['stop']());};}class p extends _0x90bc29{static get['requires'](){return[o,r,i,f,a,s,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{d as Annotation,_ as AnnotationCollection,S as AnnotationView,O as Annotations,M as AnnotationsUIs,ts as BaseCommentThreadView,hs as BaseCommentView,fi as Comment,ui as CommentThread,Ct as CommentThreadController,ie as CommentThreadInputView,vt as CommentThreadView,gt as CommentView,p as Comments,f as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,s as CommentsOnly,o as CommentsRepository,i as CommentsUI,P as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar};
|