@ckeditor/ckeditor5-comments 45.2.0-alpha.5 → 45.2.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/comments.js +1 -1
- package/dist/index.js +9 -9
- package/package.json +18 -18
- package/src/annotations/view/annotationcounterbuttonview.js +1 -1
- package/src/annotations/view/annotationview.js +1 -1
- package/src/annotations/view/sidebaritemview.js +1 -1
- package/src/annotations/view/sidebarview.js +1 -1
- package/src/comments/addcommentthreadcommand.js +1 -1
- package/src/comments/commentsarchiveui.js +1 -1
- package/src/comments/commentsediting.js +1 -1
- package/src/comments/commentsrepository.js +3 -3
- package/src/comments/commentsui.js +1 -1
- package/src/comments/integrations/clipboard.js +1 -1
- package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
- package/src/comments/integrations/importword.js +1 -1
- package/src/comments/integrations/showcommenthighlights.js +1 -1
- package/src/comments/ui/commenteditor/commenteditor.js +2 -2
- package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
- package/src/comments/ui/commentthreadcontroller.js +2 -2
- package/src/comments/ui/view/basecommentview.js +1 -1
- package/src/comments/ui/view/commentinputview.js +1 -1
- package/src/comments/ui/view/commentsarchiveview.js +1 -1
- package/src/comments/ui/view/commentthreadheaderview.js +1 -1
- package/src/comments/ui/view/commentthreadview.js +2 -2
- package/src/comments/ui/view/commentview.js +2 -2
- package/src/utils/createmutationobserver.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
|
-
((()=>Lt)());constructor(_0x2d993e={}){function _0x288d54(_0x2bd136){return _0x2bd136['map'](_0x4ac519=>String['fromCharCode'](_0x4ac519))['join']('');}(_0x2d993e=Object['assign']({},_0x2d993e))['plugins']||(_0x2d993e['plugins']=Qt['defaultPlugins']),super(_0x2d993e),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[_0x288d54([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x288d54([0x76,0x69,0x65,0x77])][_0x288d54([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x288d54([0x61,0x75,0x74,0x6f]),this[_0x288d54([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x288d54([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x288d54([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x288d54([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x288d54([0x6f,0x6b])});}['create'](){const _0x2c3a1c=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x2c3a1c))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x4a4ee9=>{const _0x5b7bbb=this['model']['document']['getRoot'](),_0x2581ee=_0x5b7bbb&&_0x5b7bbb['getChild'](_0x5b7bbb['childCount']-0x1);_0x4a4ee9['setSelection'](_0x2581ee,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x448738=this['editing']['view'],_0x4730eb=_0x448738['document']['getRoot'](),_0x433733=_0x4730eb['getChild'](0x0);_0x4730eb['childCount']>0x1||!_0x433733||'p'!=_0x433733['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x448738,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x433733['placeholder']=this['placeholder']),Ft({'view':_0x448738,'element':_0x433733,'keepOnFocus':!0x0}),this['placeholderElement']=_0x433733);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x510fac,_0x325a27={}){super(_0x510fac),this['editor']=null,this['_editorConfig']=_0x325a27,this['set']('value',_0x325a27['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',E(_0x510fac,'Reply...')),this['set']('submitLabel',E(_0x510fac,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x4e787a(),this['focusCycler']=new _0x420628({'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',(_0x3aef80,_0xd89987)=>{this['cancelButtonView']['fire']('execute'),_0xd89987();}),this['keystrokes']['set']('Ctrl+Enter',(_0x536160,_0x4b5048)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x4b5048());}),this['on']('submit',(_0x147bc0,_0x51e89c)=>{_0x51e89c['length']>0xfde8?(alert(E(_0x510fac,'TOO_LONG_COMMENT_ALERT',[_0x51e89c['length'],0xfde8])),_0x147bc0['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 _0x409104=this['editor'];this['element']['insertBefore'](_0x409104['ui']['element'],this['element']['firstChild']),_0x409104['model']['document']['on']('change',()=>this['value']=_0x409104['getData']()),_0x409104['bind']('placeholder')['to'](this),this['focusables']['add'](_0x409104['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x5a90ff){-0x1===_0x5a90ff?(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:_0x3f843d}=this,_0x358934=new _0xada5a(_0x3f843d);return _0x358934['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x358934['withText']=!0x0,_0x358934['bind']('label')['to'](this,'submitLabel'),_0x358934['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x358934['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x353a06,_0x471dcf)=>!_0x471dcf&&!!_0x353a06['trim']()),_0x358934;}['_createCancelButton'](){const {locale:_0x270e22}=this,_0x132881=new _0xada5a(_0x270e22);return _0x132881['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x132881['label']=E(_0x270e22,'Cancel'),_0x132881['withText']=!0x0,_0x132881['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x132881;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x3d500d=>{this['focusTracker']['add'](_0x3d500d['element']);}),this['focusables']['on']('change',(_0x26922e,_0x5dad7f)=>{for(const _0x4a9616 of Array['from'](_0x5dad7f['added'])['reverse']())this['focusTracker']['add'](_0x4a9616['element']);});}}class ie extends kt{constructor(_0x51d063,_0x1b272e,_0x15a202){super(_0x51d063),this['commentInputView']=new os(_0x51d063,_0x15a202),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x375214,_0x31bd6b)=>_0x375214||!!_0x31bd6b),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 _0x3bb20a(_0x51d063,_0x1b272e),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'](_0x448d82){this['commentInputView']['focus'](_0x448d82);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x1bc5fc,_0xee2c16)=>{const {submitButtonView:_0x379997,cancelButtonView:_0x374ef1,editor:_0x264a9b}=this['commentInputView'];[_0x379997['element'],_0x374ef1['element'],_0x264a9b?_0x264a9b['editing']['view']['getDomRoot']():null]['filter'](_0xd5a9dd=>_0xd5a9dd)['some'](_0x2b1d4b=>_0x2b1d4b['contains'](_0xee2c16['target']))||(this['focus'](),_0xee2c16['preventDefault']());});}}class cs extends kt{constructor(_0x16214d){super(_0x16214d);const _0x2d3112=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x2d3112['to']('count',_0xf56f2=>E(_0x16214d,'NUMBER_OF_COMMENTS',_0xf56f2))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x3c4bb7,_0xc5454a,_0x21f362){super(_0x3c4bb7);const _0x23a9f2=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0xc5454a['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0xc5454a,this['_config']=_0x21f362,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x4e787a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x420628({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x12b11b=>this['commentViews']['map'](_0x3cbcf7=>_0x3cbcf7['element'])['includes'](_0x12b11b['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x3c4bb7),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x39f883=>_0x39f883-this['_config']['maxCommentsWhenCollapsed']);for(const _0x210954 of _0xc5454a['comments'])this['_handleNewCommentModel'](_0x210954);this['_handleInfoComment'](),this['listenTo'](_0xc5454a['comments'],'add',(_0x32224e,_0x483971)=>{const _0x15bb17=this['_calculatePosition'](_0x483971);this['length']++,this['_handleNewCommentModel'](_0x483971,_0x15bb17),this['refreshVisibleViews']();}),this['listenTo'](_0xc5454a['comments'],'remove',(_0x217df5,_0x58f434)=>{this['length']--,this['_handleRemoveCommentModel'](_0x58f434),this['refreshVisibleViews']();}),this['listenTo'](_0xc5454a,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0xc5454a,'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',_0x23a9f2['if']('length','ck-hidden',_0x3c7db7=>!_0x3c7db7)],'aria-label':E(_0x3c4bb7,'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'](_0x18ceaa){-0x1===_0x18ceaa?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x1c4a9a of this['commentViews'])_0x1c4a9a['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x38cca2,_0x417f7a){const _0x139e24=new this['_config']['CommentView'](this['locale'],_0x38cca2,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x139e24['viewUid']=_0x38cca2['id'],_0x139e24['delegate']('removeComment')['to'](this),_0x139e24['delegate']('updateComment')['to'](this),_0x139e24['delegate']('resolveCommentThread')['to'](this),_0x139e24['delegate']('editorReady')['to'](this),_0x139e24['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x139e24,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x139e24,_0x417f7a);}['_calculatePosition'](_0xd65e26){const _0x1e5814=this['_model']['_findOptimalIndex'](_0xd65e26);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0xd65e26['authoredAt']?_0x1e5814-0x1:_0x1e5814:_0x1e5814-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x29eab4={'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'],_0x29eab4,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x29eab4));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x1a29e1){const _0x136868=this['commentViews']['remove'](_0x1a29e1['id']);this['stopListening'](_0x136868),_0x136868['isEditMode']&&this['_updateHasDirtyComment'](),_0x136868['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x255bf6=>_0x255bf6['isEditMode']);}['_rearrangeCollapse'](){const _0x2e4d95=function(_0x5f00a2){const _0x222876=new _0x1990b8();for(const _0xb73a15 of _0x5f00a2)_0x222876['add'](_0xb73a15);return _0x222876;}(this['commentViews']),_0x2b830a=this['_collapsedCommentsView']['count'];for(let _0x50921c=0x1;_0x50921c<=_0x2b830a;_0x50921c++)_0x2e4d95['remove'](0x1);for(const _0x5103f3 of _0x2e4d95)_0x5103f3['collapse']();_0x2b830a>0x0&&_0x2e4d95['add'](this['_collapsedCommentsView'],0x1),ns(_0x4f3751(Array['from'](this['visibleViews']),Array['from'](_0x2e4d95)),this['visibleViews'],_0x2e4d95);}['_rearrangeExpand'](){ns(_0x4f3751(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x19ba23 of this['visibleViews'])_0x19ba23['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x26d61f=>{this['focusTracker']['add'](_0x26d61f['element']),this['keystrokes']['listenTo'](_0x26d61f['element']);}),this['commentViews']['on']('change',(_0x10c8e6,_0x59a54e)=>{for(const _0x1e2be7 of _0x59a54e['removed'])this['focusTracker']['remove'](_0x1e2be7['element']),this['keystrokes']['stopListening'](_0x1e2be7['element']);for(const _0x181e6f of Array['from'](_0x59a54e['added'])['reverse']())this['focusTracker']['add'](_0x181e6f['element']),this['keystrokes']['listenTo'](_0x181e6f['element']);});}}function ns(_0x17284c,_0x1c7d55,_0xb993bc){let _0x43b466=0x0;for(const _0x4be2f4 of _0x17284c)switch(_0x4be2f4){case'insert':_0x1c7d55['add'](_0xb993bc['get'](_0x43b466),_0x43b466),_0x43b466++;break;case'delete':_0x1c7d55['remove'](_0x43b466);break;case'equal':_0x43b466++;}}class as extends kt{constructor(_0x2fa44a){super(_0x2fa44a);const _0x179975=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x179975['to']('contextValue',_0x6f9b7=>E(_0x2fa44a,'THREAD_CONTEXT_LABEL',_0x6f9b7)),'tabindex':-0x1},'children':[{'text':_0x179975['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3bf8f8,_0x5c1dd9){super(_0x3bf8f8);const _0x46c30b=this['bindTemplate'];this['_model']=_0x5c1dd9,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x4e787a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x420628({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x5ad25e=>!!_0x5ad25e),this['bind']('contextValue')['to'](this['_model'],'context',_0x5c48dc=>_0x5c48dc&&_0x5c48dc['value']?this['_trimContextValue'](_0x5c48dc['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',_0x46c30b['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 _0x12f56d=new _0xada5a(this['locale']);return _0x12f56d['label']=E(this['locale'],'Reopen'),_0x12f56d['tooltip']=E(this['locale'],'Reopen'),_0x12f56d['icon']=_0x5e686f,_0x12f56d['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x383915=>!_0x383915),_0x12f56d['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0xf3dbed,_0x3ba1dc)=>_0xf3dbed&&_0x3ba1dc),_0x12f56d['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x12f56d;}['_trimContextValue'](_0x13d20b){if(_0x13d20b['length']<0x96)return _0x13d20b;const _0x4a0adb=_0x13d20b['lastIndexOf']('\x20',0x93);return _0x13d20b['substring'](0x0,_0x4a0adb>-0x1?_0x4a0adb:0x93)+'...';}['_attachContextActions'](){const _0x562e9e=this['element']['querySelector']('.ck-context'),_0x14cc4b=_0x562e9e['querySelector']('.ck-context__value');this['listenTo'](_0x562e9e,'mouseenter',()=>{_0x14cc4b['offsetWidth']<_0x14cc4b['scrollWidth']&&_0x562e9e['classList']['add']('overlay');}),this['listenTo'](_0x562e9e,'mouseleave',()=>{_0x562e9e['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x166275 of this['focusables'])this['focusTracker']['add'](_0x166275['element']),this['keystrokes']['listenTo'](_0x166275['element']);}['_createContextView'](){const _0x1cb169=new as(this['locale']);return _0x1cb169['bind']('contextValue')['to'](this),_0x1cb169;}}class ts extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3c7280,_0x1e28b8,_0x41f5b0,_0x20ddca){super(_0x3c7280),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x1e28b8,this['_localUser']=_0x41f5b0,this['_config']=_0x20ddca,this['commentThreadHeaderView']=new Xt(_0x3c7280,_0x1e28b8),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x3c7280,E(_0x3c7280,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x3c7280,_0x1e28b8,Object['assign']({'CommentView':this['_config']['CommentView']},_0x20ddca)),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',(_0xb51f1f,_0x1af0a3)=>_0xb51f1f||!!_0x1af0a3),this['bind']('isUnlinked')['to'](_0x1e28b8,'unlinkedAt',_0x1d8f3d=>!!_0x1d8f3d),this['bind']('ariaLabel')['to'](this,'length',_0x1b1dc5=>{const _0x3b081d=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return E(this['locale'],'COMMENT_THREAD_LABEL',[_0x1b1dc5,_0x3b081d]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x4e787a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x420628({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4ee12a=>_0x4ee12a['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 _0x5ef50e=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x3a8756=_0x5ef50e['commentInputView'];return _0x5ef50e['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x3a8756,'value',(_0x4b7f4d,_0x39ee10,_0x8742b3,_0x1c25af,_0x1d806f)=>!!_0x1d806f||!!_0x1c25af&&_0x8742b3&&!_0x39ee10||_0x4b7f4d&&_0x8742b3&&!_0x39ee10),_0x3a8756['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0xbd7184,_0x4bc248,_0x4aaea7)=>{let _0x4965a2;return _0x4965a2=_0x4aaea7&&_0x4bc248?'Reply\x20to\x20reopen\x20discussion...':_0xbd7184?'Reply...':'Write\x20a\x20comment...',E(this['locale'],_0x4965a2);}),_0x3a8756['bind']('submitLabel')['to'](this,'length',_0x2f6d81=>E(this['locale'],_0x2f6d81?'Reply':'Comment')),_0x3a8756['on']('submit',(_0x374177,_0x3975d6)=>{this['fire']('addComment',_0x3975d6),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x3a8756['on']('cancel',()=>{this['focus']();}),_0x3a8756['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x3a8756['on']('cancel',_0x545803=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x545803['stop']());}),this['on']('change:isActive',(_0x37b7f9,_0x30de35,_0x57fd8e)=>{_0x57fd8e||this['length']||_0x3a8756['value']||this['fire']('removeCommentThread');}),_0x5ef50e;}}class Tt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(ts){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(hs){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x5dc210(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x1c646f,target:_0x30e9e5,type:_0x295b67,isVisible:_0x1c544b=!0x0}){super(),this['view']=_0x1c646f,this['view']['element']||this['view']['render'](),this['_type']=_0x295b67,this['_target']=_0x30e9e5,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x1990b8([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x11dbb1,_0x297356)=>{this['view']['focusTracker']['add'](_0x297356);}),this['focusableElements']['on']('remove',(_0x5e4b66,_0x216be0)=>{this['view']['focusTracker']['remove'](_0x216be0);}),this['set']('isVisible',_0x1c544b);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x199164=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x199164),_0x199164;}get['targetRect'](){const _0x1fc660=this['target'];if(null===_0x1fc660)return null;if(_0x1fc660 instanceof _0x38453a)return _0x1fc660;const _0x38a3d3=_0x1fc660['filter'](_0xae9722=>function(_0x157f7b){const _0x11676c=_0x157f7b['offsetParent'];if(_0x11676c)return!0x0;const _0x5d6a1b=_0x157f7b['getClientRects']()['item'](0x0);return!!_0x5d6a1b;}(_0xae9722));return 0x0===_0x38a3d3['length']?null:new _0x38453a(_0x38a3d3[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x55352e){this['view']['isActive']=_0x55352e,this['view']['mainView']['isActive']=_0x55352e;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x52a438){if(!(null===_0x52a438||_0x52a438 instanceof _0x38453a||Array['isArray'](_0x52a438)&&_0x52a438['every'](_0x2a37e0=>li(_0x2a37e0))))throw new _0x4877d5('annotation-invalid-target',null,{'target':_0x52a438});}['_getNormalizedTarget'](){const _0x43b43f='function'==typeof this['_target']?this['_target']():this['_target'];return li(_0x43b43f)?[_0x43b43f]:_0x43b43f;}}function li(_0x20bfab){return null!==_0x20bfab&&'object'==typeof _0x20bfab&&'nodeType'in _0x20bfab&&0x1===_0x20bfab['nodeType'];}class _ extends _0x1990b8{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x3a07aa=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x4e787a(),this['_focusTracker']['on']('change:isFocused',(_0x373710,_0x2d15bc,_0x8bc39)=>{_0x8bc39||this['fire']('blur');});for(const _0x4c9db6 of _0x3a07aa)this['add'](_0x4c9db6);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x47808b){if(this['has'](_0x47808b))throw new _0x4877d5('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x47808b['innerView'],_0x47808b),this['_viewToAnnotation']['set'](_0x47808b['view'],_0x47808b);for(const _0x88b6dc of _0x47808b['focusableElements'])this['_focusTracker']['add'](_0x88b6dc);this['listenTo'](_0x47808b['focusableElements'],'add',(_0x3f7060,_0x3e8bd4)=>{this['_focusTracker']['add'](_0x3e8bd4);}),this['listenTo'](_0x47808b['focusableElements'],'remove',(_0x3d8dc5,_0x14104a)=>{this['_focusTracker']['remove'](_0x14104a);}),this['listenTo'](_0x47808b['view']['focusTracker'],'change:isFocused',(_0x3835ba,_0x19d646,_0x4fea3a)=>{_0x4fea3a&&this['fire']('focus',_0x47808b);}),_0x47808b['updateTargetRect']();const _0x3b5d4c=this['_getOrderInContent'](_0x47808b['view']['targetRect']);return super['add'](_0x47808b,_0x3b5d4c);}['remove'](_0x4459cd){if(!this['has'](_0x4459cd))throw new _0x4877d5('annotationcollection-not-existing-item',null);this['stopListening'](_0x4459cd['view']['focusTracker']),this['stopListening'](_0x4459cd['focusableElements']);for(const _0x254ab6 of _0x4459cd['focusableElements'])this['_focusTracker']['remove'](_0x254ab6);return this['_viewToAnnotation']['delete'](_0x4459cd['view']),this['_innerViewToAnnotation']['delete'](_0x4459cd['innerView']),super['remove'](_0x4459cd);}['getByInnerView'](_0x9d12cd){return this['_innerViewToAnnotation']['get'](_0x9d12cd);}['getByView'](_0xb1437a){return this['_viewToAnnotation']['get'](_0xb1437a);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x62268c of this)_0x62268c['updateTargetRect']();this['_sort']();}['_sort'](){const _0x2823f4=Array['from'](this)['sort']((_0x7c285c,_0x49efaa)=>v(_0x7c285c['view']['targetRect'],_0x49efaa['view']['targetRect']));for(let _0x1a4e96=_0x2823f4['length']-0x1;_0x1a4e96>0x0;_0x1a4e96--){const _0x592b6e=_0x2823f4[_0x1a4e96];_0x1a4e96!==this['getIndex'](_0x592b6e)&&(this['remove'](_0x592b6e),this['add'](_0x592b6e));}}['_getOrderInContent'](_0x2f7e4e){let _0x4f3125=0x0;if(!_0x2f7e4e)return this['length'];for(const _0xbfa80d of this){const _0x28f9e5=_0xbfa80d['view']['targetRect'];if(_0x28f9e5){if(v(_0x2f7e4e,_0x28f9e5)<0x0)return _0x4f3125;_0x4f3125++;}}return _0x4f3125;}}function v(_0xe46d2e,_0x8625e2){if(null===_0xe46d2e&&null===_0x8625e2)return 0x0;if(null===_0xe46d2e)return-0x1;if(null===_0x8625e2)return 0x1;const _0x4b537c=_0xe46d2e['top']-_0x8625e2['top'];return 0x0==_0x4b537c?_0xe46d2e['left']-_0x8625e2['left']:_0x4b537c;}class O extends _0xb0fdc5{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4f7131){if(super(_0x4f7131),this['collection']=new _(),this['_visibleAnnotations']=new _(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x4f7131 instanceof _0x4c4f23){const _0x4d6dd4=_0x4f7131['locale'];_0x4f7131['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':E(_0x4d6dd4,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':E(_0x4d6dd4,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':E(_0x4d6dd4,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':E(_0x4d6dd4,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':E(_0x4d6dd4,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':E(_0x4d6dd4,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':E(_0x4d6dd4,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x263e37){this['collection']['add'](_0x263e37);}['remove'](_0x105c98){this['collection']['remove'](_0x105c98),_0x105c98['destroy']();}['refreshVisibility'](){for(const _0x27b439 of this['collection'])_0x27b439['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x2ca595){return this['collection']['getByInnerView'](_0x2ca595);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x2bca42 of this['collection'])_0x2bca42['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x21f586){this['fire']('_activateAnnotation',_0x21f586);}['createAnnotation'](_0x1abde2){return new d(_0x1abde2);}['createAnnotationView'](_0x51d9e2,_0x194f1c){return new S(_0x51d9e2,_0x194f1c);}['_addActiveAnnotation'](_0x4f724c){const _0x6113e4=new Set(this['activeAnnotations']);_0x6113e4['add'](_0x4f724c),this['activeAnnotations']=_0x6113e4;}['_removeActiveAnnotation'](_0xfd9a5b){const _0x35aaea=new Set(this['activeAnnotations']);_0x35aaea['delete'](_0xfd9a5b),this['activeAnnotations']=_0x35aaea;}['_bindAnnotationsToVisibleAnnotations'](){const _0x38d49b=this['collection'],_0x4c554d=this['_visibleAnnotations'];function _0x4efba6(_0x1231e6){const _0x1cfd04=_0x1231e6['source'];_0x1cfd04['isVisible']&&!_0x4c554d['has'](_0x1cfd04)?_0x4c554d['add'](_0x1cfd04):!_0x1cfd04['isVisible']&&_0x4c554d['has'](_0x1cfd04)&&_0x4c554d['remove'](_0x1cfd04),_0x1cfd04['view']['focusTracker']['remove'](_0x1cfd04['view']['element']),_0x1cfd04['view']['focusTracker']['add'](_0x1cfd04['view']['element']);}this['listenTo'](_0x38d49b,'add',(_0x134709,_0x2416fb)=>{_0x2416fb['isVisible']&&_0x4c554d['add'](_0x2416fb),this['listenTo'](_0x2416fb,'change:isVisible',_0x4efba6);}),this['listenTo'](_0x38d49b,'remove',(_0xf2cb0d,_0x5dc25a)=>{_0x4c554d['has'](_0x5dc25a)&&_0x4c554d['remove'](_0x5dc25a),this['stopListening'](_0x5dc25a,'change:isVisible',_0x4efba6);});}['_setupEnterAnnotationKeystroke'](){const _0x18a979=_0x14de48=>{_0x14de48['on']('ready',()=>{_0x14de48['keystrokes']['set'](_0x332c79,(_0xe1ba2f,_0x203429)=>{const _0x263d01=_0x2f235a(this['activeAnnotations']['values']());_0x263d01&&(_0x263d01['view']['focus'](),_0x203429());});});};this['context']instanceof _0x4c4f23?_0x18a979(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x2f50b0,_0x148a27)=>{_0x18a979(_0x148a27);});}['_setupEscapeAnnotationHandling'](){const _0x502e66=_0x43fddc=>{const _0x438756=_0x43fddc['source'],_0x25f0ed=[];let _0x5052e3;if(Array['isArray'](_0x438756['target'])){_0x5052e3=_0x438756['target'][0x0],this['context']instanceof _0x4c4f23?_0x25f0ed['push'](this['context']):this['context']['editors']&&_0x25f0ed['push'](...this['context']['editors']);for(const _0x479438 of _0x25f0ed)for(const _0x15e9cf of _0x479438['editing']['view']['domRoots']['values']())if(_0x15e9cf['contains'](_0x5052e3))return void _0x479438['editing']['view']['focus']();_0x5052e3['focus']();}};this['listenTo'](this['collection'],'add',(_0x45bd75,_0x5ddf5e)=>{this['listenTo'](_0x5ddf5e,'escape',_0x502e66,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x2c8e24,_0x4d41aa)=>{this['stopListening'](_0x4d41aa,'escape',_0x502e66);});}}const bt=Symbol('noChannel'),Nt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0xb0fdc5{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[O,pt,ct];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x377201){super(_0x377201),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0xc43585=this['context']['config'];_0xc43585['define']('comments.maxCommentsWhenCollapsed',0x2),_0xc43585['define']('comments.maxThreadTotalWeight',0x1f4),_0xc43585['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0xc43585['define']('comments.CommentThreadView',Tt),_0xc43585['define']('comments.CommentView',_t),_0xc43585['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x10a4ea=this['context']['plugins']['get'](O);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x328222,_0x4b1e4e)=>this['_addCommentThread'](_0x4b1e4e)),this['on']('submitCommentThread',(_0x349cbd,_0x105581)=>this['_submitCommentThread'](_0x105581)),this['on']('resolveCommentThread',(_0x364f61,_0x4fb40e)=>this['_resolveCommentThread'](_0x4fb40e)),this['on']('resolveCommentThread',(_0x4fd4dd,_0x4f0c29)=>this['_updateActiveAnnotation'](_0x4f0c29),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x2dcb33,_0xc2ed4)=>this['_reopenCommentThread'](_0xc2ed4)),this['on']('reopenCommentThread',(_0x47af53,_0x2b7344)=>this['_updateActiveAnnotation'](_0x2b7344),{'priority':'lowest'}),this['on']('removeCommentThread',(_0xbae81e,_0x4589b2)=>this['_removeCommentThread'](_0x4589b2)),this['on']('updateCommentThread',(_0x3d475a,_0x285eb3)=>this['_updateCommentThread'](_0x285eb3)),this['on']('updateCommentThread',(_0x59c246,_0x132745)=>this['_updateActiveAnnotation'](_0x132745),{'priority':'lowest'}),this['on']('addComment',(_0x17dc38,_0x4c4dee)=>this['_addComment'](_0x4c4dee)),this['on']('updateComment',(_0x4fe9bf,_0x2ccec7)=>this['_updateComment'](_0x2ccec7)),this['on']('removeComment',(_0x280def,_0x1a99a9)=>this['_removeComment'](_0x1a99a9)),this['on']('addComment',(_0x11baa4,{threadId:_0xad6757,isFromAdapter:_0x5a4051})=>{if(_0x5a4051)return;const _0x31d0e3=this['getCommentThread'](_0xad6757),_0x5b456b=_0x31d0e3&&this['_threadToController']['get'](_0x31d0e3);_0x5b456b&&_0x5b456b['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x10a4ea,'change:activeAnnotations',(_0x1d3f6f,_0xee6dc1,_0x1cce47)=>{const _0x564fa4=Array['from'](_0x1cce47)['map'](_0x5a1e32=>this['_viewToController']['get'](_0x5a1e32['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x564fa4?_0x564fa4['model']:null;});}set['adapter'](_0x7aed71){if(this['_adapter'])throw new _0x4877d5('commentsrepository-adapter-already-set');this['_adapter']=_0x7aed71;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x1695e1=bt,threadId:_0x1daf3a=_0x5db4a7(),comments:_0x3614e4=[],unlinkedAt:_0x3e0683=null,resolvedAt:_0x7fe59e=null,resolvedBy:_0x5f43a3=null,target:_0x37d166=null,context:_0xad2c75=null,attributes:_0x127b23={},isResolvable:_0x479751=!0x0,isSubmitted:_0x130fd4=!0x1,isFromAdapter:_0x42281f=!0x1}={}){return this['fire'](xt('addCommentThread',_0x1695e1),{'channelId':_0x1695e1,'threadId':_0x1daf3a,'comments':_0x3614e4,'unlinkedAt':_0x3e0683,'resolvedAt':_0x7fe59e,'resolvedBy':_0x5f43a3,'target':_0x37d166,'context':_0xad2c75,'attributes':_0x127b23,'isFromAdapter':_0x42281f,'isResolvable':_0x479751,'isSubmitted':_0x130fd4}),this['getCommentThread'](_0x1daf3a);}['openNewCommentThread']({channelId:_0xc6fa4f=bt,threadId:_0x3bd602=_0x5db4a7(),target:_0x277881,context:_0x30daef=null,isResolvable:_0x1bf027=!0x0}){if(this['_readOnlyChannels']['has'](_0xc6fa4f)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x277881)throw new _0x4877d5('commentsrepository-missing-target');const _0x396486=this['addCommentThread']({'channelId':_0xc6fa4f,'threadId':_0x3bd602,'target':_0x277881,'context':_0x30daef,'isResolvable':_0x1bf027});if(!_0x396486)return null;const _0x27be99=this['_threadToController']['get'](_0x396486),_0x20872f=_0x27be99['view']['commentThreadInputView']['commentInputView'],_0x3cb178=this['context']['plugins']['get'](O),_0x42c78f=_0x3cb178['getByInnerView'](_0x27be99['view']);return _0x3cb178['activate'](_0x42c78f),_0x20872f['once']('editorReady',()=>_0x20872f['focus']()),_0x396486;}['hasCommentThread'](_0x2e0b0d){if('string'!=typeof _0x2e0b0d)throw new _0x4877d5('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x2e0b0d);}['updateCommentThread']({channelId:_0x4308=bt,threadId:_0x586134,context:_0x88b93a,unlinkedAt:_0x41bc32,attributes:_0x27c92f,isFromAdapter:_0x124ad3=!0x1}){return this['fire'](xt('updateCommentThread',_0x4308),{'channelId':_0x4308,'threadId':_0x586134,'context':_0x88b93a,'unlinkedAt':_0x41bc32,'attributes':_0x27c92f,'isFromAdapter':_0x124ad3}),this['getCommentThread'](_0x586134);}['getCommentThread'](_0xa619c8){if('string'!=typeof _0xa619c8)throw new _0x4877d5('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0xa619c8);}['fetchCommentThread']({channelId:_0x5b2ccf,threadId:_0x49bfdc}={}){const _0x26ca56=this['getCommentThread'](_0x49bfdc);if(_0x26ca56)return Promise['resolve'](_0x26ca56);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x4877d5('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x5b2ccf,'threadId':_0x49bfdc})['then'](_0xc613c2=>this['hasCommentThread'](_0x49bfdc)?this['getCommentThread'](_0x49bfdc):_0xc613c2?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x5b2ccf},_0xc613c2)):void 0x0)['catch'](_0x579336=>{throw console['error'](_0x579336),new _0x4877d5('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x40ff86,skipNotAttached:_0x1459e3=!0x1,skipEmpty:_0x333bc3=!0x1,toJSON:_0x51a5a2=!0x1}={}){const _0x27c271=[];for(const _0xf26c95 of this['_threads']['values']())_0x40ff86&&_0xf26c95['channelId']!==_0x40ff86||_0x1459e3&&!_0xf26c95['isAttached']||_0x333bc3&&0x0===_0xf26c95['length']||_0x27c271['push'](_0xf26c95);return _0x51a5a2?_0x27c271['map'](_0x54be50=>_0x54be50['toJSON']()):_0x27c271;}['setActiveCommentThread'](_0x21dd54){const _0xe66483=this['context']['plugins']['get'](O);if(!_0x21dd54)return void(this['activeCommentThread']&&_0xe66483['deactivateAll']());const _0x2f4e41=this['getCommentThread'](_0x21dd54);if(!_0x2f4e41)throw new _0x4877d5('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x21dd54});if(!this['_threadToController']['has'](_0x2f4e41))throw new _0x4877d5('commentsrepository-active-not-attached',null,{'threadId':_0x21dd54});const _0x47dbe9=_0xe66483['getByInnerView'](this['_threadToController']['get'](_0x2f4e41)['view']);_0xe66483['activate'](_0x47dbe9);}['switchReadOnly'](_0x434304,_0x4b6fcc){_0x434304?this['_readOnlyChannels']['add'](_0x4b6fcc):this['_readOnlyChannels']['delete'](_0x4b6fcc),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x5eeb63){return this['_readOnlyChannels']['has'](_0x5eeb63)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x302ea3,_0x2a5027){return new gt(_0x302ea3,_0x2a5027);}['setPermissions'](_0x22cf8b,_0x1f19d4=bt){this['_permissions']['set'](_0x1f19d4,_0x22cf8b),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x162bc6=bt){return this['_permissions']['has'](_0x162bc6)?this['_permissions']['get'](_0x162bc6):Nt;}['_addCommentThread']({channelId:_0x1a6a96,threadId:_0x5221d0,comments:_0x4fbfe4,unlinkedAt:_0x2f9515,resolvedAt:_0x328d3c,resolvedBy:_0x13f53c,target:_0x11daba,context:_0x474393,attributes:_0x136846,isFromAdapter:_0xaa42cb,isResolvable:_0x3db6b8,isSubmitted:_0x54026b}){if('string'!=typeof _0x5221d0)throw new _0x4877d5('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x5221d0});if(this['hasCommentThread'](_0x5221d0))throw new _0x4877d5('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x5221d0});const _0x345b03=new ui(this,{'channelId':_0x1a6a96,'id':_0x5221d0,'context':_0x474393,'attributes':_0x136846,'unlinkedAt':_0x2f9515,'resolvedAt':_0x328d3c,'resolvedBy':_0x13f53c?this['context']['plugins']['get'](ct)['getUser'](_0x13f53c):null,'isResolvable':_0x3db6b8,'isSubmitted':_0x54026b||_0xaa42cb});this['_threads']['set'](_0x5221d0,_0x345b03);for(const _0x199025 of _0x4fbfe4)_0x345b03['_add'](this['_createNewComment']({'threadId':_0x5221d0,..._0x199025}));return _0x11daba&&_0x345b03['attachTo'](_0x11daba),_0xaa42cb||!_0x345b03['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x1a6a96,'threadId':_0x5221d0});}['_submitCommentThread']({channelId:_0x54058e,threadId:_0x29e0a6}){if(!this['hasCommentThread'](_0x29e0a6))throw new _0x4877d5('commentsrepository-missing-comment-thread',this);const _0x1388e1=this['getCommentThread'](_0x29e0a6);if(_0x1388e1['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x577726,comments:_0x95ca3f,resolvedAt:_0x58443f,resolvedBy:_0x3b5f01,context:_0x4df68b,attributes:_0x24c799}=_0x1388e1,_0x41e872=this['context']['plugins']['get']('PendingActions'),_0x24e2e7=_0x41e872['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x54058e,'threadId':_0x577726,'comments':_0x95ca3f['map'](_0x479524=>_0x479524['toJSON']()),'resolvedAt':_0x58443f,'resolvedBy':_0x3b5f01?_0x3b5f01['id']:_0x3b5f01,'context':_0x4df68b,'attributes':_0x24c799})['then'](({comments:_0x142a9c})=>{_0x41e872['remove'](_0x24e2e7);for(const _0x3c16d5 of _0x142a9c)this['_updateComment']({'channelId':_0x54058e,'threadId':_0x29e0a6,'commentId':_0x3c16d5['commentId'],'createdAt':_0x3c16d5['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x56a63b=>{throw console['error'](_0x56a63b),new _0x4877d5('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x380f5a,target:_0x2fa9ca}){const _0x2a9a06=this['getCommentThread'](_0x380f5a);if(!_0x2a9a06)throw new _0x4877d5('commentsrepository-attach-missing-comment-thread',this);const _0x307a04=this['context']['plugins']['get']('PendingActions'),_0x340f8d=this['context']['plugins']['get'](O),_0x9340ea=this['_createCommentThreadView'](_0x2a9a06),_0x46a8ef=new gt(_0x2a9a06,_0x9340ea);let _0x4c8747=null;_0x9340ea['on']('change:isDirty',(_0xb3f144,_0xff370a,_0x5ed1ce)=>{_0x5ed1ce?_0x4c8747=_0x307a04['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x4c8747&&(_0x307a04['remove'](_0x4c8747),_0x4c8747=null);}),this['_threadToController']['set'](_0x2a9a06,_0x46a8ef),this['_viewToController']['set'](_0x9340ea,_0x46a8ef);const _0x426b18=new S(this['context']['locale'],_0x9340ea);_0x426b18['bind']('length')['to'](_0x9340ea),_0x426b18['bind']('isDirty')['to'](_0x9340ea,'isDirty',_0x9340ea,'length',(_0x3111e6,_0x1787df)=>_0x3111e6||!_0x1787df),_0x426b18['bind']('isActive')['to'](_0x9340ea),_0x426b18['type']='comment';const _0x2c6f9b=new d({'view':_0x426b18,'target':_0x2fa9ca,'type':'comment','isVisible':!_0x2a9a06['archivedAt']});return _0x9340ea['on']('escape',()=>{_0x2c6f9b['fire']('escape');}),this['_bindAnnotationToEditors'](_0x9340ea,_0x2c6f9b),_0x340f8d['add'](_0x2c6f9b),_0x2c6f9b;}['_bindAnnotationToEditors'](_0x56a21f,_0x23bb27){this['listenTo'](_0x56a21f,'editorReady',(_0x2b0223,_0x3b7568)=>{const _0x162381=_0x3b7568['ui']['view']['body']['bodyCollectionContainer'];_0x23bb27['focusableElements']['add'](_0x162381),this['context']instanceof _0x4c4f23&&this['context']['ui']['focusTracker']['add'](_0x162381);},{'priority':'highest'}),this['listenTo'](_0x56a21f,'editorDestroyed',(_0x32a90e,_0x1e2929)=>{const _0x51ae17=_0x1e2929['ui']['view']['body']['bodyCollectionContainer'];_0x23bb27['focusableElements']['has'](_0x51ae17)&&_0x23bb27['focusableElements']['remove'](_0x51ae17),this['context']instanceof _0x4c4f23&&this['context']['ui']['focusTracker']['remove'](_0x51ae17);});}['_unbindEditors'](_0x3b8196){this['stopListening'](_0x3b8196,'editorReady'),this['stopListening'](_0x3b8196,'editorDestroyed');}['_createCommentThreadView'](_0x594f64){const _0x528392=this['context']['plugins']['get'](ct),{config:_0x5c9b88,locale:_0x552911}=this['context'],_0x53bd42=It(_0x5c9b88['get']('locale'),_0x552911);return new(0x0,(_0x5c9b88['get']('comments'))['CommentThreadView'])(_0x552911,_0x594f64,_0x528392['me'],{'editorConfig':{..._0x5c9b88['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x5c9b88['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x5c9b88['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x5c9b88['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x5c9b88['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x53bd42,'CommentView':_0x5c9b88['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x59ce5c,channelId:_0x564208,resolvedAt:_0x41fe9b,resolvedBy:_0xbb9873,isFromAdapter:_0x19b12a}){if(!this['hasCommentThread'](_0x59ce5c))throw new _0x4877d5('commentsrepository-missing-comment-thread',null,{'threadId':_0x59ce5c});const _0x1b70e5=this['getCommentThread'](_0x59ce5c);if(_0x1b70e5['isResolved'])throw new _0x4877d5('commentsrepository-resolved-comment-thread',null,{'threadId':_0x59ce5c});const _0x54e858=this['context']['plugins']['get'](ct);if(_0x1b70e5['resolvedBy']=_0x54e858['getUser'](_0xbb9873),_0x1b70e5['resolvedAt']=_0x41fe9b,_0x19b12a||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0xf05e49=this['context']['plugins']['get']('PendingActions'),_0x4c7fe7=_0xf05e49['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x564208,'threadId':_0x59ce5c})['then'](({resolvedAt:_0x2cc63f,resolvedBy:_0x2041ee})=>{_0xf05e49['remove'](_0x4c7fe7),_0x1b70e5['resolvedBy']['id']!==_0x2041ee&&(_0x1b70e5['resolvedBy']=_0x54e858['getUser'](_0x2041ee)),_0x1b70e5['resolvedAt']=_0x2cc63f;})['catch'](_0x5998ce=>{throw console['error'](_0x5998ce),new _0x4877d5('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x1c62ce,channelId:_0x4658b4,isFromAdapter:_0x1b8db0}){if(!this['hasCommentThread'](_0x1c62ce))throw new _0x4877d5('commentsrepository-missing-comment-thread',null,{'threadId':_0x1c62ce});const _0x4c0463=this['getCommentThread'](_0x1c62ce);if(!_0x4c0463['isResolved'])throw new _0x4877d5('commentsrepository-reopen-comment-thread',null,{'threadId':_0x1c62ce});if(_0x4c0463['resolvedBy']=null,_0x4c0463['resolvedAt']=null,_0x1b8db0||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x48c59b=this['context']['plugins']['get']('PendingActions'),_0x1fc760=_0x48c59b['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x4658b4,'threadId':_0x1c62ce})['then'](()=>_0x48c59b['remove'](_0x1fc760))['catch'](_0x15a72a=>{throw console['error'](_0x15a72a),new _0x4877d5('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x47eb47,isFromAdapter:_0x93e7e}){const _0x2147fa=this['getCommentThread'](_0x47eb47);if(!_0x2147fa)throw new _0x4877d5('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x47eb47),this['_threads']['delete'](_0x47eb47),!_0x2147fa['isSubmitted']||_0x93e7e||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x2b6ac4=this['context']['plugins']['get']('PendingActions'),{channelId:_0x133d18}=_0x2147fa,_0x26b9a8=_0x2b6ac4['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x133d18,'threadId':_0x47eb47})['then'](()=>_0x2b6ac4['remove'](_0x26b9a8))['catch'](_0x3a8d21=>{throw console['error'](_0x3a8d21),new _0x4877d5('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x4f99b6,unlinkedAt:_0x34b550,context:_0xeae3ae,attributes:_0x4b21e8,isFromAdapter:_0x55a1f0}){if('string'!=typeof _0x4f99b6)throw new _0x4877d5('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4f99b6});if(!this['hasCommentThread'](_0x4f99b6))throw new _0x4877d5('commentsrepository-missing-comment-thread',null,{'threadId':_0x4f99b6});const _0xa05151=this['getCommentThread'](_0x4f99b6);let _0x5df355=!0x1;if(void 0x0!==_0xeae3ae&&_0xa05151['context']!==_0xeae3ae&&(_0xa05151['context']=_0xeae3ae,_0x5df355=!0x0),void 0x0!==_0x34b550&&_0xa05151['unlinkedAt']!==_0x34b550&&(_0xa05151['unlinkedAt']=_0x34b550,_0x5df355=!0x0),_0x4b21e8&&!yt(_0x4b21e8,_0xa05151['attributes'])&&(_0xa05151['attributes']=_0x4b21e8,_0x5df355=!0x0),!_0x5df355)return Promise['resolve']();if(!_0xa05151['isSubmitted']||_0x55a1f0||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x289bf6=this['context']['plugins']['get']('PendingActions'),{channelId:_0xd75880}=_0xa05151,_0x921f96=_0x289bf6['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0xd75880,'threadId':_0x4f99b6,'context':_0xeae3ae,'unlinkedAt':_0x34b550,'attributes':_0x4b21e8})['then'](()=>_0x289bf6['remove'](_0x921f96))['catch'](_0x17ffb0=>{throw console['error'](_0x17ffb0),new _0x4877d5('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0xd0934b){const _0x2dc02c=this['context']['plugins']['get'](O),_0x3ff48f=this['getCommentThread'](_0xd0934b);if(_0x3ff48f['_isAttached']=!0x1,this['_threadToController']['has'](_0x3ff48f)){const _0x4721c5=this['_threadToController']['get'](_0x3ff48f),_0x1f2264=_0x4721c5['view'],_0x374cf5=_0x2dc02c['getByInnerView'](_0x1f2264);this['_threadToController']['delete'](_0x3ff48f),this['_viewToController']['delete'](_0x1f2264),_0x374cf5&&_0x2dc02c['remove'](_0x374cf5),_0x4721c5['destroy'](),_0x1f2264['destroy']()['then'](()=>{this['_unbindEditors'](_0x1f2264);});}}['_updateActiveAnnotation']({threadId:_0x51af63,resolvedAt:_0x5b1902,unlinkedAt:_0x385fbf}){const _0x51be9e=!!_0x5b1902,_0xdd57d0=this['context']['plugins']['get'](O),_0x2b27c1=this['getCommentThread'](_0x51af63);if(this['_threadToController']['has'](_0x2b27c1)){const _0x5f4b6b=this['_threadToController']['get'](_0x2b27c1)['view'],_0x15e669=_0xdd57d0['getByInnerView'](_0x5f4b6b);_0x15e669&&(_0x51be9e&&_0xdd57d0['_removeActiveAnnotation'](_0x15e669),_0x385fbf?_0x15e669['isVisible']=!0x1:_0x15e669['refreshVisibility']());}}['_getExternalAuthor'](_0x45ef94){const _0x1f9ac7=this['context']['plugins']['get'](ct),_0x2b7c09=wt('external:'+_0x45ef94),_0x986425=_0x1f9ac7['getUser'](_0x2b7c09);return _0x986425||_0x1f9ac7['addUser']({'id':_0x2b7c09,'name':_0x45ef94});}['_createNewComment']({threadId:_0x502576,commentId:_0x11c1c0=_0x5db4a7(),content:_0xc63acf,authorId:_0x45c4f0,createdAt:_0x143dc4,attributes:_0x20c1c5}){if('string'!=typeof _0x11c1c0)throw new _0x4877d5('commentsrepository-invalid-commentid');if('string'!=typeof _0x45c4f0)throw new _0x4877d5('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0xc63acf||!_0xc63acf['trim']())throw new _0x4877d5('commentsrepository-invalid-comment-content');const _0x482fa5=this['context']['plugins']['get'](ct)['getUser'](_0x45c4f0);if(!_0x482fa5)throw new _0x4877d5('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x45c4f0});let _0x42b6d0=null,_0x48d836=_0x143dc4;return _0x20c1c5?.['@external']&&(_0x42b6d0=this['_getExternalAuthor'](_0x20c1c5['@external']['authorName']),_0x48d836=new Date(_0x20c1c5['@external']['createdAt'])),new fi(this,{'threadId':_0x502576,'id':_0x11c1c0,'author':_0x42b6d0||_0x482fa5,'creator':_0x482fa5,'content':_0xc63acf,'createdAt':_0x143dc4,'authoredAt':_0x48d836,'attributes':_0x20c1c5});}['_addComment'](_0xb6af4f){let {threadId:_0x3c8c5b,content:_0x3f5f5e,attributes:_0x135dfc,isFromAdapter:_0x40e56e}=_0xb6af4f;const _0x3659ba=this['getCommentThread'](_0xb6af4f['threadId']);if(!_0x3659ba)throw new _0x4877d5('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x5c2850=this['_createNewComment'](_0xb6af4f),{id:_0x5e9caa}=_0x5c2850;if(_0x3659ba['_add'](_0x5c2850),_0x40e56e||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x3659ba['isSubmitted'])return Promise['resolve']();const _0x7227=this['context']['plugins']['get']('PendingActions'),{channelId:_0x194a25}=_0x3659ba,_0xe25af8=_0x7227['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x135dfc||(_0x135dfc={}),this['adapter']['addComment']({'channelId':_0x194a25,'threadId':_0x3c8c5b,'commentId':_0x5e9caa,'content':_0x3f5f5e,'attributes':_0x135dfc})['then'](_0x169cb5=>{_0x7227['remove'](_0xe25af8),_0x169cb5&&this['_updateComment']({'channelId':_0x194a25,'threadId':_0x3c8c5b,'commentId':_0x5e9caa,'createdAt':_0x169cb5['createdAt'],'isFromAdapter':!0x0});})['catch'](_0xb2123c=>{throw console['error'](_0xb2123c),new _0x4877d5('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x47799f,commentId:_0x42838b,content:_0x44c6ba,createdAt:_0x360a5f,attributes:_0x477143,isFromAdapter:_0xd26ffb}){if(void 0x0!==_0x44c6ba&&('string'!=typeof _0x44c6ba||!_0x44c6ba['trim']()['length']))throw new _0x4877d5('commentsrepository-update-comment-invalid-content');const _0x419c37=this['getCommentThread'](_0x47799f),_0x12144f=_0x419c37['getComment'](_0x42838b);if(!_0x12144f)throw new _0x4877d5('commentsrepository-update-missing-comment',this);let _0x156099=!0x1;if(_0x44c6ba&&_0x44c6ba!==_0x12144f['content']&&(_0x12144f['isEditable']||_0xd26ffb)&&(_0x12144f['content']=_0x44c6ba,_0x156099=!0x0),_0x360a5f&&_0x360a5f!==_0x12144f['createdAt']&&(_0x12144f['createdAt']=_0x360a5f,_0x12144f['attributes']&&_0x12144f['attributes']['@external']||(_0x12144f['authoredAt']=_0x360a5f),_0x156099=!0x0),_0x477143&&!yt(_0x477143,_0x12144f['attributes'])&&(_0x12144f['attributes']=_0x477143,_0x156099=!0x0),!_0x156099)return Promise['resolve']();if(_0x419c37['fire']('commentUpdated'),_0xd26ffb||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x392262=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2047bb}=this['getCommentThread'](_0x12144f['threadId']),_0x238590=_0x392262['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x2047bb,'threadId':_0x47799f,'commentId':_0x42838b,'content':_0x44c6ba,'attributes':_0x477143})['then'](()=>_0x392262['remove'](_0x238590))['catch'](_0x267f78=>{throw console['error'](_0x267f78),new _0x4877d5('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x3d2409,commentId:_0x258585,isFromAdapter:_0x31d6fa}){const _0x5c2add=this['getCommentThread'](_0x3d2409),_0xa0aa46=_0x5c2add['getComment'](_0x258585);if(!_0xa0aa46)throw new _0x4877d5('commentsrepository-remove-missing-comment',this);if(_0x5c2add['_remove'](_0xa0aa46),_0x31d6fa||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x4f883f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x121c56}=_0x5c2add,_0x26a7e8=_0x4f883f['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x121c56,'threadId':_0x3d2409,'commentId':_0x258585})['then'](()=>_0x4f883f['remove'](_0x26a7e8))['catch'](_0x55e300=>{throw console['error'](_0x55e300),new _0x4877d5('commentsrepository-remove-comment-internal-error',this);});}}class ui extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x5dc210(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x15f871,_0x2defa8){super();const _0x313c0a=_0x15f871['context']['plugins']['get'](ct)['me'],_0x32f809=_0x15f871['getCommentThread'](_0x2defa8['threadId']),_0x541291=0x0===_0x32f809['comments']['length'],_0x4f7ffc=_0x313c0a===_0x2defa8['author'];this['id']=_0x2defa8['id'],this['threadId']=_0x2defa8['threadId'],this['author']=_0x2defa8['author'],this['creator']=_0x2defa8['creator'],this['isExternal']=Boolean(_0x2defa8['attributes']&&_0x2defa8['attributes']['@external']),this['set']('content',_0x2defa8['content']),this['createdAt']=_0x2defa8['createdAt']||new Date(),this['set']('authoredAt',_0x2defa8['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x32f809,'resolvedAt'),this['set']('attributes',_0x2defa8['attributes']||{}),this['bind']('isEditable')['to'](_0x15f871,'_permissions',()=>{const _0x2e4605=_0x15f871['getPermissions'](_0x32f809['channelId'])['write'],_0x5dd69d=_0x15f871['getPermissions'](_0x32f809['channelId'])['modifyAll'];return _0x4f7ffc&&_0x2e4605||!_0x4f7ffc&&_0x5dd69d;}),this['bind']('isRemovable')['to'](_0x32f809,'isRemovable',_0x15f871,'_permissions',_0x13cd95=>{const _0x542bff=_0x15f871['getPermissions'](_0x32f809['channelId'])['write'],_0x598a12=_0x15f871['getPermissions'](_0x32f809['channelId'])['modifyAll'];return _0x4f7ffc&&_0x542bff||_0x13cd95&&_0x541291||!_0x4f7ffc&&_0x598a12&&!_0x541291;}),this['bind']('isReadOnly')['to'](_0x32f809,'isReadOnly'),this['_repository']=_0x15f871;}get['weight'](){return Math['max'](function(_0x22e356){const _0xd18521=document['createElement']('div');return _0xd18521['innerHTML']=_0x22e356,_0xd18521['textContent']['length'];}(this['content']),0xc8);}['update'](_0x35588e){const {threadId:_0x142ca5,id:_0x239f94}=this;if(!this['_repository']['hasCommentThread'](_0x142ca5))throw new _0x4877d5('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x3fcf46}=this['_repository']['getCommentThread'](_0x142ca5);this['_repository']['fire'](xt('updateComment',_0x3fcf46,_0x142ca5),{'channelId':_0x3fcf46,'threadId':_0x142ca5,'commentId':_0x239f94,..._0x35588e});}['setAttribute'](_0x428691,_0x57a67b){const _0x4611a7=At(this['attributes']);Ct(_0x4611a7,_0x428691,_0x57a67b),this['update']({'attributes':_0x4611a7});}['removeAttribute'](_0x5c77a6){const _0x1079f9=At(this['attributes']);vt(_0x1079f9,_0x5c77a6),this['update']({'attributes':_0x1079f9});}['remove'](_0x1e0860={}){if(!_0x1e0860['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0xe0e22a,id:_0x17e572}=this;if(!this['_repository']['hasCommentThread'](_0xe0e22a))throw new _0x4877d5('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x1c1f78}=this['_repository']['getCommentThread'](_0xe0e22a);this['_repository']['fire'](xt('removeComment',_0x1c1f78,_0xe0e22a),{'channelId':_0x1c1f78,'threadId':_0xe0e22a,'commentId':_0x17e572,..._0x1e0860});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function xt(_0x25e15a,..._0x3211ce){for(const _0x3911b2 of _0x3211ce)void 0x0!==_0x3911b2&&(_0x25e15a+=':'+String(_0x3911b2));return _0x25e15a;}class Q extends _0x4d8247{['refresh'](){const _0x39b1ae=this['editor']['model']['document']['selection'];for(const _0xac1d43 of _0x39b1ae['getRanges']())if(this['_hasContent'](_0xac1d43))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x3a7f4d=_0x5db4a7()}={}){const _0x242789=this['editor']['model'],_0x2f9d52=[];for(const _0x2af77b of _0x242789['document']['selection']['getRanges']())this['_hasContent'](_0x2af77b)&&_0x2f9d52['push'](this['_trimToContent'](_0x2af77b));_0x242789['change'](_0x2f9adf=>{for(const _0x5a2c04 of _0x2f9d52){const _0x494b66=_0x5db4a7()['substr'](0x1,0x5),_0x4372b1='comment:'+_0x3a7f4d+':'+_0x494b66;_0x2f9adf['addMarker'](_0x4372b1,{'range':_0x5a2c04,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x10c22a){for(const _0x641349 of _0x10c22a['getItems']())if(this['_itemIsContent'](_0x641349))return!0x0;return!0x1;}['_itemIsContent'](_0x9b72c6){return _0x9b72c6['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x9b72c6)&&!_0x9b72c6['is']('element','tableCell');}['_trimToContent'](_0x463d15){const _0x4c6d9a=_0x28d07e=>!this['_itemIsContent'](_0x28d07e['item']),_0x14f1bd=_0x463d15['start']['getLastMatchingPosition'](_0x4c6d9a),_0x6b6449=_0x463d15['end']['getLastMatchingPosition'](_0x4c6d9a,{'direction':'backward'});return this['editor']['model']['createRange'](_0x14f1bd,_0x6b6449);}}class P extends _0x1b90ef{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[O];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5bd8d4){super(_0x5bd8d4),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x829838=this['editor'],_0x48057c=_0x829838['model']['document']['selection'],_0x11f175=_0xd76232(()=>this['refreshSelectedViews'](),0xa);_0x48057c['on']('change:range',(_0x395101,_0x148c66)=>{_0x148c66['directChange']&&(_0x11f175['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x829838['editing']['view']['document'],'change:isFocused',(_0x5622ec,_0x449bb8,_0x164f6e)=>{_0x164f6e&&_0x11f175();}),this['listenTo'](_0x829838['ui']['focusTracker'],'change:isFocused',(_0x35ab26,_0x319c1d,_0x4a898c)=>{_0x4a898c||_0x829838['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0xe08611=>this['_editorAnnotationsData']['has'](_0xe08611['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x36657f){if(this['_editorAnnotations']['has'](_0x36657f['view']))return;this['_editorAnnotations']['add'](_0x36657f['view']),this['editor']['ui']['focusTracker']['add'](_0x36657f['view']['element']);const _0x3d48aa=this['editor']['plugins']['get'](O);this['listenTo'](_0x3d48aa['collection'],'remove',(_0x3719a7,_0x5adfbc)=>{this['editor']['ui']['focusTracker']['remove'](_0x5adfbc['view']['element']),this['_editorAnnotations']['delete'](_0x5adfbc['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x592503){if('function'!=typeof _0x592503)throw new _0x4877d5('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x592503);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x5d777b,annotations:_0xf812a8}){const _0x4c85a1=[],_0x2d96c7=this['editor']['model']['document']['selection'],_0x41837f=Array['from'](_0x2d96c7['getRanges']());for(const [_0xcfde46,_0x478120]of this['_editorAnnotationsData']){const _0x2f1e71=_0x36974a(_0x478120),_0xb03291=_0xf812a8['getByInnerView'](_0xcfde46);_0x2f1e71&&_0xb03291&&_0x4c85a1['push']({'annotation':_0xb03291,'range':_0x2f1e71});}function _0x36974a(_0x165ac8){for(const _0x33fd5e of _0x165ac8)for(const _0x4fd951 of _0x41837f)if(_0x33fd5e['containsRange'](_0x4fd951,!_0x2d96c7['isCollapsed']))return _0x33fd5e;return null;}return _0x4c85a1['sort']((_0x5c6d24,_0x2ba716)=>{const _0x126a55=_0x5c6d24['range'],_0x1b33f7=_0x2ba716['range'];if(!_0x126a55['isEqual'](_0x1b33f7)){if(_0x126a55['containsRange'](_0x1b33f7,!0x0))return 0x1;if(_0x1b33f7['containsRange'](_0x126a55,!0x0))return-0x1;}return _0x5c6d24['annotation']==_0x5d777b?-0x1:_0x2ba716['annotation']==_0x5d777b?0x1:0x0;})['map'](_0xcdeb5a=>_0xcdeb5a['annotation']);}get['_editorAnnotationsData'](){const _0x1fe194=new Map();for(const _0x5b778c of Array['from'](this['_dataCollectors']))for(const [_0x41f406,_0x4599e2]of _0x5b778c())_0x1fe194['set'](_0x41f406,_0x4599e2);return _0x1fe194;}}class at extends _0x1b90ef{['afterInit'](){const _0x1e91e0=this['editor'];if(!_0x1e91e0['plugins']['has']('RestrictedEditingModeEditing'))return;_0x1e91e0['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ut extends _0x1b90ef{constructor(_0xb64bc5){super(_0xb64bc5),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x4a383e=this['editor'],_0x1280be=_0x4a383e['commands']['get']('importWord'),_0x236d88=_0x4a383e['plugins']['get'](ct);_0x1280be&&(_0x1280be['on']('execute',(_0x42957a,[,_0x159cda])=>{_0x159cda['collaboration_features']={'comments':!0x0,'user_id':_0x236d88['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x1280be,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x2e642a,_0xc8cff7){const {comment_threads:_0x11917b}=_0xc8cff7;_0x11917b&&_0x11917b['forEach'](({thread_id:_0xa2aa6c,comments:_0x3e0367,is_resolved:_0xce829d})=>{const _0x2f3adf=new Date(),_0x54fff0=_0x3e0367['map'](({author:_0x285dc9,content:_0xf46a2b,created_at:_0x188ea8})=>({'content':_0xf46a2b,'authorId':this['editor']['plugins']['get'](ct)['me']['id'],'createdAt':_0x2f3adf,'attributes':{'@external':{'authorName':_0x285dc9,'createdAt':_0x188ea8?new Date(_0x188ea8):new Date(),'source':'importWord'}}})),_0x42b7c1=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x42b7c1,'threadId':_0xa2aa6c,'comments':_0x54fff0,'resolvedAt':_0xce829d?_0x2f3adf:null});});}}class ft extends _0x1b90ef{constructor(_0x461120){super(_0x461120),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x385449=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x385449,'contentInsertion',(_0x4aff34,_0x11af06)=>this['_removeMarkersWithoutThreads'](_0x11af06['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x1ebc38){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x1ebc38;const _0x183037=this['editor']['plugins']['get']('CommentsRepository');for(const _0x54f5f5 of _0x1ebc38['keys']()){const [_0x3b991c,_0x4e431d]=_0x54f5f5['split'](':');'comment'!=_0x3b991c||_0x183037['hasCommentThread'](_0x4e431d)||_0x1ebc38['delete'](_0x54f5f5);}return _0x1ebc38;}['_registerMarkerInClipboardPipeline'](){const _0x341d81=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x1f2dc4=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x1f2dc4&&_0x341d81['_registerMarkerToCopy']('comment',_0x1f2dc4);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x1b64a7){switch(_0x1b64a7){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class dt extends _0x1b90ef{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x3f8d7a,_0x413c73)=>{if(!_0x413c73['options']['showCommentHighlights'])return null;if(_0x413c73['options']['ignoreResolvedComments']){const {id:_0xb5f695}=er(_0x3f8d7a['markerName']),_0x238586=this['editor']['plugins']['get'](o);if(_0x238586['getCommentThread'](_0xb5f695)?.['isResolved']&&_0x3f8d7a['item'])return _0x413c73['consumable']['consume'](_0x3f8d7a['item'],'addMarker:'+_0x3f8d7a['markerName']),_0x413c73['consumable']['consume'](_0x3f8d7a['item'],'removeMarker:'+_0x3f8d7a['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x15e6c5=>{_0x15e6c5['on']('addMarker:comment',(_0x324b61,_0x1e6d16,_0x5a4f73)=>{if(!_0x5a4f73['options']['showCommentHighlights'])return;const _0x25054e=_0x1e6d16['item'];if(!_0x25054e)return;const _0x5369c4=_0x5a4f73['mapper']['toViewElement'](_0x25054e);this['editor']['model']['schema']['isObject'](_0x25054e)&&_0x5369c4&&!_0x5369c4['getCustomProperty']('widget')&&_0x5369c4['is']('containerElement')&&_0x2b6cc6(_0x5369c4,_0x5a4f73['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x3ee9c0,{writer:_0x11ce61,options:_0x2d81c3})=>{if(!_0x2d81c3['showCommentHighlights'])return null;const _0x18e647=_0x11ce61['createContainerElement']('div'),_0x2f6d5c=_0x11ce61['createEmptyElement']('hr');return _0x11ce61['addClass']('ck-horizontal-line',_0x18e647),_0x11ce61['insert'](_0x11ce61['createPositionAt'](_0x18e647,0x0),_0x2f6d5c),_0x18e647;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x52f020,{writer:_0x688d3b,options:_0x40735f})=>{if(!_0x40735f['showCommentHighlights'])return null;const _0x3b03bc=_0x688d3b['createContainerElement']('span'),_0x14ab13=_0x688d3b['createEmptyElement']('img');return _0x688d3b['addClass']('image-inline',_0x3b03bc),_0x688d3b['insert'](_0x688d3b['createPositionAt'](_0x3b03bc,0x0),_0x14ab13),_0x3b03bc;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x1ffab6,{writer:_0x4946cf,options:_0x274c7e})=>{if(_0x274c7e['showCommentHighlights'])return _0x4946cf['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x1df16a,_0x58a2b7,_0x1206cc)=>{_0x1206cc['options']['showCommentHighlights']&&_0x1df16a['stop']();},{'priority':'high'});}}class r extends _0x1b90ef{static get['requires'](){return[o,P,ct,at,ut,ft,dt];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x8a6bd5){super(_0x8a6bd5),this['set']('isThreadsLoadingPaused',!0x0),_0x8a6bd5['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x29e15c,_0x594339,_0x4fb15f,_0x4a20e4)=>{const _0x4094c0=_0x8a6bd5['plugins']['get'](o),_0x1b832e=_0x4fb15f?er(_0x4fb15f)['id']:null;_0x8a6bd5['model']['change'](()=>{if(_0x1b832e){const _0x338b45=this['getAllMarkersForId'](_0x1b832e);for(const _0x52e06f of _0x338b45)_0x8a6bd5['editing']['reconvertMarker'](_0x52e06f);}if(_0x4a20e4){const {id:_0x1049f1}=er(_0x4a20e4),_0x16f23f=_0x4094c0['getCommentThread'](_0x1049f1);if(_0x16f23f&&_0x16f23f['unlinkedAt'])return;if(_0x16f23f&&!_0x16f23f['isAttached'])return;const _0xe04ea2=this['getAllMarkersForId'](_0x1049f1);for(const _0x15790d of _0xe04ea2)_0x8a6bd5['editing']['reconvertMarker'](_0x15790d);}}),_0x1b832e&&this['scrollToThreadMarker'](_0x1b832e);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x10a39f=this['editor'],_0x47c404=_0x10a39f['plugins']['get'](o),_0x402dd2=_0x10a39f['config']['get']('collaboration.channelId'),_0x9f2659=_0x47c404['getCommentThreads']()['filter'](_0xf638b9=>_0xf638b9['channelId']!==_0x402dd2);_0x10a39f['commands']['add']('addCommentThread',new Q(_0x10a39f)),this['listenTo'](_0x10a39f,'change:isReadOnly',(_0x3683c6,_0xffab3d,_0xda709f)=>{_0x47c404['switchReadOnly'](_0xda709f,_0x10a39f['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x47c404,mt('addCommentThread',_0x402dd2),(_0x11e255,{threadId:_0x1fef79})=>{const _0x57ea65=this['editor']['plugins']['get'](o)['getCommentThread'](_0x1fef79);_0x57ea65?.['unlinkedAt']&&this['_attachArchivedThread'](_0x1fef79);}),this['listenTo'](_0x47c404,mt('removeCommentThread',_0x402dd2),(_0x36f500,{threadId:_0x4aa512})=>{_0x10a39f['model']['enqueueChange']({'isUndoable':!0x1},_0x36373d=>{const _0x4287c2=this['getAllMarkersForId'](_0x4aa512);for(const _0x171d5a of _0x4287c2)_0x36373d['removeMarker'](_0x171d5a);});}),this['listenTo'](_0x47c404,mt('resolveCommentThread',_0x402dd2),(_0x298507,{threadId:_0x47d7ef})=>{(this['_reconvertMarkers'](_0x47d7ef),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x47d7ef)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x47c404,mt('reopenCommentThread',_0x402dd2),(_0x4d1f46,{threadId:_0x133232})=>{this['_reconvertMarkers'](_0x133232);},{'priority':'low'}),this['listenTo'](_0x47c404,mt('addComment',_0x402dd2),(_0x2a815a,{threadId:_0x5e529a,isFromAdapter:_0x312a61})=>{const _0x3884f9=this['getAllMarkersForId'](_0x5e529a);if(_0x312a61||0x0==_0x3884f9['length']||!_0x47c404['hasCommentThread'](_0x5e529a))return;0x1===_0x47c404['getCommentThread'](_0x5e529a)['length']&&_0x10a39f['model']['enqueueChange']({'isUndoable':!0x1},_0x3c4d8f=>{for(const _0x18dcb4 of _0x3884f9)_0x3c4d8f['updateMarker'](_0x18dcb4,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x9f2659);}['afterInit'](){!async function(_0x313012){const _0x4c6491=_0x2d792b([0x37,0x43,0x73,0x30,0x74,0x58,0x35,0x52,0x77,0x50,0x51,0x5a,0x57,0x7a,0x53,0x64,0x54,0x34,0x48,0x33,0x42,0x76,0x4e,0x46,0x45,0x4b,0x6f,0x36,0x66,0x6a,0x78,0x4a,0x67,0x65,0x6c,0x79,0x44,0x4d,0x47,0x72,0x55,0x4c,0x69,0x41,0x6d,0x38,0x31,0x70,0x59,0x6e,0x49,0x75,0x68,0x71,0x32,0x61,0x56,0x39,0x62,0x63,0x6b,0x4f]),_0xfd6b3b=0x6f72e012,_0x26f96e=0x6f75898a^_0xfd6b3b,_0x2fcc6b=window[_0x2d792b([0x44,0x61,0x74,0x65])][_0x2d792b([0x6e,0x6f,0x77])](),_0x3b94b3=_0x313012[_0x2d792b([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x204d4c=new window[(_0x2d792b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2e39c4=>{_0x3b94b3[_0x2d792b([0x6f,0x6e,0x63,0x65])](_0x2d792b([0x72,0x65,0x61,0x64,0x79]),_0x2e39c4);}),_0x8809e7={[_0x2d792b([0x6b,0x74,0x79])]:_0x2d792b([0x45,0x43]),[_0x2d792b([0x75,0x73,0x65])]:_0x2d792b([0x73,0x69,0x67]),[_0x2d792b([0x63,0x72,0x76])]:_0x2d792b([0x50,0x2d,0x32,0x35,0x36]),[_0x2d792b([0x78])]:_0x2d792b([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]),[_0x2d792b([0x79])]:_0x2d792b([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]),[_0x2d792b([0x61,0x6c,0x67])]:_0x2d792b([0x45,0x53,0x32,0x35,0x36])},_0x436f03=_0x3b94b3[_0x2d792b([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2d792b([0x67,0x65,0x74])](_0x2d792b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1507f5(){let _0x1e1132,_0x1b2801=null,_0xfc4436=null;try{if(_0x436f03==_0x2d792b([0x47,0x50,0x4c]))return _0x2d792b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1e1132=_0x748bd3(),!_0x1e1132)return _0x2d792b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1e1132[_0x2d792b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0xfc4436=_0x2bf200(_0x1e1132[_0x2d792b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1e1132[_0x2d792b([0x6a,0x74,0x69])])),await _0xb9470()?_0xf69e25()?_0x2c1d37()?_0x2d792b([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x50d01f()?(_0x1e1132[_0x2d792b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2d792b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1b2801=_0xc760f0(_0x2d792b([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1e1132[_0x2d792b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2d792b([0x74,0x72,0x69,0x61,0x6c])&&(_0x1b2801=_0xc760f0(_0x2d792b([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x194b2d()):_0x2d792b([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2d792b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2d792b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x2d792b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2c1d37(){const _0xd5cc12=[_0x2d792b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2d792b([0x74,0x72,0x69,0x61,0x6c])][_0x2d792b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1e1132[_0x2d792b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2fcc6b/0x3e8:0xe10*_0x26f96e;return _0x1e1132[_0x2d792b([0x65,0x78,0x70])]<_0xd5cc12;}function _0xf69e25(){const _0x3ba2a8=_0x1e1132[_0x2d792b([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x3ba2a8)return!0x1;if(_0x3ba2a8[_0x2d792b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2d792b([0x2a])))return!0x0;if(_0x3ba2a8[_0x2d792b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2d792b([0x43,0x4d,0x54])))return!0x0;if(_0x3ba2a8[_0x2d792b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2d792b([0x52,0x43,0x4d,0x54]))){if(_0x2dc518())return!0x0;if(_0x5e12de()||_0x2a804d())return!0x0;}return!0x1;}function _0x50d01f(){const _0x34df7d=_0x1e1132[_0x2d792b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x34df7d||0x0==_0x34df7d[_0x2d792b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0xa5c3a0}=new URL(window[_0x2d792b([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x34df7d[_0x2d792b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xa5c3a0))return!0x0;const _0x59af56=_0xa5c3a0[_0x2d792b([0x73,0x70,0x6c,0x69,0x74])](_0x2d792b([0x2e]));return _0x34df7d[_0x2d792b([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xdb0dfc=>_0xdb0dfc[_0x2d792b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2d792b([0x2a])))[_0x2d792b([0x6d,0x61,0x70])](_0x30c59d=>_0x30c59d[_0x2d792b([0x73,0x70,0x6c,0x69,0x74])](_0x2d792b([0x2e])))[_0x2d792b([0x73,0x6f,0x6d,0x65])](_0x2cd658=>_0x59af56[_0x2d792b([0x65,0x76,0x65,0x72,0x79])]((_0x401ba5,_0xe9c64f)=>_0x2cd658[_0xe9c64f]===_0x401ba5||_0x2cd658[_0xe9c64f]===_0x2d792b([0x2a])));}function _0x194b2d(){return _0x1b2801&&_0xfc4436?new window[(_0x2d792b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5931ee,_0x1e127f)=>{_0x1b2801[_0x2d792b([0x74,0x68,0x65,0x6e])](_0x5931ee,_0x1e127f),_0xfc4436[_0x2d792b([0x74,0x68,0x65,0x6e])](_0x3481f3=>{_0x3481f3!=_0x2d792b([0x56,0x61,0x6c,0x69,0x64])&&_0x5931ee(_0x3481f3);},_0x1e127f);}):_0x1b2801||_0xfc4436||_0x2d792b([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2bf200(_0x16cad8,_0xf1b02a){return new window[(_0x2d792b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x533796=>{if(_0x223616())return _0x533796(_0x2d792b([0x56,0x61,0x6c,0x69,0x64]));_0x41f1bc(),_0x3b94b3[_0x2d792b([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2d792b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1ae0b0=!0x1;const _0x40aa34=_0x5db4a7();function _0x5139d3(_0x1344f6){return!!_0x1344f6&&(typeof _0x1344f6===_0x2d792b([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1344f6===_0x2d792b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1344f6[_0x2d792b([0x74,0x68,0x65,0x6e])]===_0x2d792b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1344f6[_0x2d792b([0x63,0x61,0x74,0x63,0x68])]===_0x2d792b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xb017fd(_0x52c26c){_0x2e9c3d(_0x52c26c)[_0x2d792b([0x74,0x68,0x65,0x6e])](_0x125692=>{if(!_0x125692||_0x125692[_0x2d792b([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2d792b([0x6f,0x6b]))return _0x2d792b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3954ce(_0x4685a(_0x40aa34+_0xf1b02a))!=_0x125692[_0x2d792b([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2d792b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2d792b([0x56,0x61,0x6c,0x69,0x64]);})[_0x2d792b([0x74,0x68,0x65,0x6e])](_0x128a7f=>(_0x17d7e4(),_0x128a7f),()=>{const _0x31fd14=_0x5be037();return null==_0x31fd14?(_0x17d7e4(),_0x2d792b([0x56,0x61,0x6c,0x69,0x64])):_0x2d792b(_0x2fcc6b-_0x31fd14>(0x4b7e6412^_0xfd6b3b)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2d792b([0x74,0x68,0x65,0x6e])](_0x533796)[_0x2d792b([0x63,0x61,0x74,0x63,0x68])](()=>{_0x533796(_0x2d792b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1a14eb=0x6f440e92^_0xfd6b3b;function _0x17d7e4(){const _0x1b355e=_0x2d792b([0x6c,0x6c,0x63,0x74,0x2d])+_0x3954ce(_0x4685a(_0x16cad8)),_0x354fc0=_0x24bb7a(_0x3954ce(window[_0x2d792b([0x4d,0x61,0x74,0x68])][_0x2d792b([0x63,0x65,0x69,0x6c])](_0x2fcc6b/_0x1a14eb)));window[_0x2d792b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2d792b([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1b355e,_0x354fc0);}function _0x5be037(){const _0x582d8b=_0x2d792b([0x6c,0x6c,0x63,0x74,0x2d])+_0x3954ce(_0x4685a(_0x16cad8)),_0x234054=window[_0x2d792b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2d792b([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x582d8b);return _0x234054?window[_0x2d792b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x24bb7a(_0x234054),0x10)*_0x1a14eb:null;}function _0x2e9c3d(_0x4132fe){return new window[(_0x2d792b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x457a10,_0x3f35fb)=>{_0x4132fe[_0x2d792b([0x74,0x68,0x65,0x6e])](_0x457a10,_0x3f35fb),window[_0x2d792b([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3f35fb,0x6f7334d2^_0xfd6b3b);});}}_0x3b94b3[_0x2d792b([0x6f,0x6e])](_0x2d792b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x337374,_0x259b72)=>{if(_0x259b72[0x0]!=_0x16cad8)return _0x533796(_0x2d792b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x259b72[0x1]={..._0x259b72[0x1],[_0x2d792b([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x40aa34};},{[_0x2d792b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2d792b([0x68,0x69,0x67,0x68])}),_0x3b94b3[_0x2d792b([0x6f,0x6e])](_0x2d792b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x20f254=>{_0x5139d3(_0x20f254[_0x2d792b([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1ae0b0=!0x0,_0xb017fd(_0x20f254[_0x2d792b([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2d792b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2d792b([0x6c,0x6f,0x77])}),_0x204d4c[_0x2d792b([0x74,0x68,0x65,0x6e])](()=>{_0x1ae0b0||_0x533796(_0x2d792b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x223616(){return _0x3b94b3[_0x2d792b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2d792b([0x76,0x69,0x65,0x77])][_0x2d792b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2d792b([0x61,0x75,0x74,0x6f]);}function _0x41f1bc(){_0x3b94b3[_0x2d792b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2d792b([0x76,0x69,0x65,0x77])][_0x2d792b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2d792b([0x61,0x75,0x74,0x6f]);}}function _0xc760f0(_0x1cc35a){const _0x422958=[new window[(_0x2d792b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x293349=>setTimeout(_0x293349,0x6f7bdede^_0xfd6b3b)),_0x204d4c[_0x2d792b([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2d792b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4b9792=>{let _0x44ac05=0x0;_0x3b94b3[_0x2d792b([0x6d,0x6f,0x64,0x65,0x6c])][_0x2d792b([0x6f,0x6e])](_0x2d792b([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x14abb6,_0x46ae04)=>{_0x46ae04[0x0][_0x2d792b([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x44ac05++,_0x44ac05==(0x6f72e1ea^_0xfd6b3b)&&(_0x4b9792(),_0x14abb6[_0x2d792b([0x6f,0x66,0x66])]());});}))];return window[_0x2d792b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2d792b([0x72,0x61,0x63,0x65])](_0x422958)[_0x2d792b([0x74,0x68,0x65,0x6e])](()=>_0x1cc35a);}async function _0x5592c1(){await _0x204d4c,_0x3b94b3[_0x2d792b([0x6d,0x6f,0x64,0x65,0x6c])][_0x2d792b([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x25b487,_0x3b94b3[_0x2d792b([0x6d,0x6f,0x64,0x65,0x6c])][_0x2d792b([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x25b487,_0x3b94b3[_0x2d792b([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2d792b([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2dc518(){return _0x1a1510(_0x2d792b([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x42206d(_0x2d792b([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x2d792b([0x73,0x74,0x61,0x74,0x65])]==_0x2d792b([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x5e12de(){return _0x1a1510(_0x2d792b([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 _0x2a804d(){return _0x1a1510(_0x2d792b([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x382903(_0x51eff8){const _0x3fe778=_0x2131b2();_0x3b94b3[_0x3fe778]=_0x2d792b([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x51eff8,_0x51eff8!=_0x2d792b([0x56,0x61,0x6c,0x69,0x64])&&_0x5592c1();}function _0x2131b2(){const _0x32bb84=window[_0x2d792b([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2d792b([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2d792b([0x6e,0x6f,0x77])]())[_0x2d792b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2d792b([0x2e]),'');let _0x275343=_0x2d792b([0x43]);for(let _0x271a24=0x0;_0x271a24<_0x32bb84[_0x2d792b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x271a24+=0x2){let _0x5f7f9a=window[_0x2d792b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x32bb84[_0x2d792b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x271a24,_0x271a24+0x2));_0x5f7f9a>=_0x4c6491[_0x2d792b([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5f7f9a-=_0x4c6491[_0x2d792b([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x275343+=_0x4c6491[_0x5f7f9a];}return _0x275343;}function _0x748bd3(){const _0xbcb0a7=_0x436f03[_0x2d792b([0x73,0x70,0x6c,0x69,0x74])](_0x2d792b([0x2e]));if(0x3!=_0xbcb0a7[_0x2d792b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x49fbe5(_0xbcb0a7[0x1]);function _0x49fbe5(_0x3f2991){const _0x4bee52=_0x401695(_0x3f2991);return _0x4bee52&&_0x4a1246()?_0x4bee52:null;function _0x4a1246(){const _0x50c916=_0x4bee52[_0x2d792b([0x6a,0x74,0x69])],_0x3449aa=window[_0x2d792b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x50c916[_0x2d792b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x50c916[_0x2d792b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2f903e={..._0x4bee52,[_0x2d792b([0x6a,0x74,0x69])]:_0x50c916[_0x2d792b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x50c916[_0x2d792b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2f903e[_0x2d792b([0x76,0x63])],_0x4685a(_0x2f903e)==_0x3449aa;}}}async function _0xb9470(){let _0x3e5cca=!0x0;try{const _0x1b7a23=_0x436f03[_0x2d792b([0x73,0x70,0x6c,0x69,0x74])](_0x2d792b([0x2e])),[_0x5ab373,_0x1cf52a,_0x1b5eff]=_0x1b7a23;return _0x83be84(_0x5ab373),await _0x58f469(_0x5ab373,_0x1cf52a,_0x1b5eff),_0x3e5cca;}catch{return!0x1;}function _0x83be84(_0x247a06){const _0x36e40f=_0x401695(_0x247a06);_0x36e40f&&_0x36e40f[_0x2d792b([0x61,0x6c,0x67])]==_0x2d792b([0x45,0x53,0x32,0x35,0x36])||(_0x3e5cca=!0x1);}async function _0x58f469(_0xed381d,_0x17b907,_0x3d4b60){const _0x5a194a=window[_0x2d792b([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2d792b([0x66,0x72,0x6f,0x6d])](_0x39a23c(_0x3d4b60),_0xa8fbba=>_0xa8fbba[_0x2d792b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2f7ca5=new window[(_0x2d792b([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2d792b([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0xed381d+_0x2d792b([0x2e])+_0x17b907),_0x233f15=window[_0x2d792b([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2d792b([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x233f15)return;const _0x3d36b9=await _0x233f15[_0x2d792b([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2d792b([0x6a,0x77,0x6b]),_0x8809e7,{[_0x2d792b([0x6e,0x61,0x6d,0x65])]:_0x2d792b([0x45,0x43,0x44,0x53,0x41]),[_0x2d792b([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2d792b([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2d792b([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x233f15[_0x2d792b([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2d792b([0x6e,0x61,0x6d,0x65])]:_0x2d792b([0x45,0x43,0x44,0x53,0x41]),[_0x2d792b([0x68,0x61,0x73,0x68])]:{[_0x2d792b([0x6e,0x61,0x6d,0x65])]:_0x2d792b([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3d36b9,_0x5a194a,_0x2f7ca5)||(_0x3e5cca=!0x1);}}function _0x401695(_0xfaebe0){return _0xfaebe0[_0x2d792b([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2d792b([0x65,0x79]))?JSON[_0x2d792b([0x70,0x61,0x72,0x73,0x65])](_0x39a23c(_0xfaebe0)):null;}function _0x39a23c(_0x5021c1){return window[_0x2d792b([0x61,0x74,0x6f,0x62])](_0x5021c1[_0x2d792b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2d792b([0x2b]))[_0x2d792b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2d792b([0x2f])));}function _0x4685a(_0x5cc8d5){let _0x5644e5=0x1505;function _0x2fa1b3(_0x2fe0d1){for(let _0x2066d8=0x0;_0x2066d8<_0x2fe0d1[_0x2d792b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2066d8++){const _0x4008e7=_0x2fe0d1[_0x2d792b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2066d8);_0x5644e5=(_0x5644e5<<0x5)+_0x5644e5+_0x4008e7,_0x5644e5&=_0x5644e5;}}function _0xb2d4c(_0x4271f9){Array[_0x2d792b([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4271f9)?_0x4271f9[_0x2d792b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0xb2d4c):_0x4271f9&&typeof _0x4271f9==_0x2d792b([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2d792b([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4271f9)[_0x2d792b([0x73,0x6f,0x72,0x74])]()[_0x2d792b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1c9f2c,_0x12b74c])=>{_0x2fa1b3(_0x1c9f2c),_0xb2d4c(_0x12b74c);}):_0x2fa1b3(window[_0x2d792b([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4271f9));}return _0xb2d4c(_0x5cc8d5),_0x5644e5>>>0x0;}function _0x3954ce(_0x4ece9b){return _0x4ece9b[_0x2d792b([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2d792b([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2d792b([0x30]));}function _0x24bb7a(_0x149432){return _0x149432[_0x2d792b([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2d792b([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2d792b([0x6a,0x6f,0x69,0x6e])]('');}function _0x1a1510(_0xd5153a){return _0x3b94b3[_0x2d792b([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2d792b([0x68,0x61,0x73])](_0xd5153a);}function _0x42206d(_0x4b04c4){return _0x3b94b3[_0x2d792b([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2d792b([0x67,0x65,0x74])](_0x4b04c4);}function _0x25b487(){}function _0x2d792b(_0x465d88){return _0x465d88['map'](_0x1e21ca=>String['fromCharCode'](_0x1e21ca))['join']('');}_0x382903(await _0x1507f5());}(this);}['destroy'](){const _0x444f09=this['editor']['plugins']['get'](o),_0x404485=this['editor']['config']['get']('collaboration.channelId');for(const _0x5f092a of _0x444f09['getCommentThreads']({'channelId':_0x404485}))_0x444f09['_detachCommentThread'](_0x5f092a['id']),_0x444f09['_threads']['delete'](_0x5f092a['id']);super['destroy']();}['hasMarkerForId'](_0xca0322){return this['getAllMarkersForId'](_0xca0322)['length']>0x0;}['getAllMarkersForId'](_0x274dc6){const _0x3c33d3=[];for(const _0x3ea90d of this['editor']['model']['markers'])_0x3ea90d['name']['startsWith']('comment:'+_0x274dc6)&&_0x3c33d3['push'](_0x3ea90d);return _0x3c33d3;}['scrollToThreadMarker'](_0x573cd9){const _0x5b4910=this['_getTargetForId'](_0x573cd9);_0x5b4910&&setTimeout(()=>{this['activeMarker']&&er(this['activeMarker'])['id']===_0x573cd9&&rt({'target':_0x5b4910[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x49137e){this['editor']['model']['change'](()=>{for(const _0x45af4a of this['getAllMarkersForId'](_0x49137e))this['editor']['editing']['reconvertMarker'](_0x45af4a);});}['_attachArchivedThread'](_0x1ada78){const _0x2db8aa=this['editor']['plugins']['get'](o),_0x259985=this['editor']['plugins']['get'](P),_0x29ad47=_0x2db8aa['getCommentThread'](_0x1ada78);if(!_0x29ad47['isAttached']){const _0x58c08e=_0x29ad47['attachTo'](()=>this['_getTargetForId'](_0x29ad47['id']));_0x259985['registerAnnotation'](_0x58c08e),_0x29ad47['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x31d4e7=this['editor'],_0x263abb=_0x31d4e7['plugins']['get'](ct);_0x31d4e7['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x352da6,_0x20b817)=>{const {id:_0x4a43e4}=er(_0x352da6['markerName']),_0x1a2a98=_0x31d4e7['plugins']['get'](o)['getCommentThread'](_0x4a43e4),_0x4797f4=this['activeMarker']&&er(this['activeMarker'])['id']===_0x4a43e4;let _0x51eea4;if(_0x1a2a98&&_0x1a2a98['isResolved']&&!_0x4797f4&&_0x352da6['item'])return _0x20b817['consumable']['consume'](_0x352da6['item'],'addMarker:'+_0x352da6['markerName']),_0x20b817['consumable']['consume'](_0x352da6['item'],'removeMarker:'+_0x352da6['markerName']),null;const _0x1c4a6c=['ck-comment-marker'];return _0x4797f4&&_0x1c4a6c['push']('ck-comment-marker--active'),_0x51eea4=_0x1a2a98?.['length']?_0x1a2a98['comments']['first']['author']['id']:_0x263abb['me']['id'],{'classes':_0x1c4a6c,'attributes':{'data-comment':_0x4a43e4,'data-author-id':_0x51eea4}};}}),_0x31d4e7['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x5f32a8,{options:_0x4513ce})=>{if(_0x4513ce['showCommentHighlights'])return null;const _0x163c7e=_0x31d4e7['plugins']['get'](o),_0x5181e6=_0x31d4e7['model']['markers']['get'](_0x5f32a8),{id:_0x50ffcf,part:_0x195042}=er(_0x5f32a8);return _0x5181e6&&!_0x5181e6['affectsData']||_0x4513ce['ignoreResolvedComments']&&_0x163c7e['getCommentThread'](_0x50ffcf)?.['isResolved']?null:{'group':'comment','name':_0x195042?_0x50ffcf+':'+_0x195042:_0x50ffcf};}}),_0x31d4e7['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x41477f,{writer:_0x31e2a5})=>_0x31e2a5['createElement']('$marker',{'data-name':'comment:'+_0x41477f['getAttribute']('id')})}),_0x31d4e7['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x1f125e=this['editor'],_0x25369c=_0x1f125e['plugins']['get'](o),_0x20af65=new Set(),_0x531cb6=new Set();_0x1f125e['model']['document']['registerPostFixer'](_0x218fa7=>{let _0x49ea09=!0x1;for(const {name:_0x4938cc,data:_0x482860}of _0x1f125e['model']['document']['differ']['getChangedMarkers']()){const {group:_0x235c19,id:_0x1582da}=er(_0x4938cc);let _0x7732b9=_0x482860['newRange'];if('comment'!==_0x235c19||!_0x7732b9)continue;const _0x4b2a0d='$graveyard'===_0x7732b9['root']['rootName'];_0x4b2a0d||(_0x7732b9=ht(_0x7732b9,_0x1f125e['model']),!_0x7732b9||_0x7732b9['isCollapsed']||!_0x482860['newRange']||_0x7732b9['isEqual'](_0x482860['newRange']))?_0x1f125e['model']['hasContent'](_0x7732b9)&&!_0x4b2a0d?this['isThreadsLoadingPaused']?_0x20af65['add'](_0x4938cc):this['_handleThreadMarker'](_0x4938cc,_0x1582da):(_0x531cb6['add'](_0x4938cc),_0x20af65['delete'](_0x4938cc),_0x218fa7['removeMarker'](_0x4938cc),_0x49ea09=!0x0):(_0x218fa7['updateMarker'](_0x4938cc,{'range':_0x7732b9}),_0x49ea09=!0x0);}return _0x49ea09;}),this['on']('change:isThreadsLoadingPaused',(_0x128463,_0x240165,_0x480a0a)=>{if(!_0x480a0a&&_0x20af65['size'])for(const _0x15a2a7 of _0x20af65){const {id:_0x6501ad}=er(_0x15a2a7);_0x20af65['delete'](_0x15a2a7),_0x1f125e['model']['markers']['get'](_0x15a2a7)&&this['_handleThreadMarker'](_0x15a2a7,_0x6501ad);}}),this['listenTo'](_0x1f125e['model']['document'],'change',()=>{for(const {name:_0x39cd35,data:{newRange:_0x5641b3}}of _0x1f125e['model']['document']['differ']['getChangedMarkers']()){const {group:_0x5b8e6d,id:_0x213449}=er(_0x39cd35);if('comment'!==_0x5b8e6d)continue;const _0xe817b5=_0x25369c['getCommentThread'](_0x213449),_0x330e75=this['hasMarkerForId'](_0x213449);_0xe817b5&&(!_0xe817b5['_hasTargetInContent']&&_0x5641b3&&_0x1f125e['editing']['view']['once']('render',()=>{const _0x1af99a=_0x1f125e['plugins']['get'](O),_0x2fc8ad=_0x25369c['_threadToController']['get'](_0xe817b5)['view'];_0x1af99a['getByInnerView'](_0x2fc8ad)['refreshVisibility']();},{'priority':'low'}),_0xe817b5['_hasTargetInContent']=_0x330e75||!!_0x5641b3),_0x5641b3||(_0x531cb6['add'](_0x39cd35),_0x20af65['delete'](_0x39cd35));}for(const _0x4ca4dc of _0x531cb6){const {id:_0x40156b}=er(_0x4ca4dc),_0x1a7dc4=_0x25369c['getCommentThread'](_0x40156b);if(_0x20af65['delete'](_0x4ca4dc),!_0x1a7dc4)continue;const _0xae77c=this['hasMarkerForId'](_0x40156b);_0xae77c||_0x1a7dc4['isSubmitted']?_0xae77c||_0x1a7dc4['unlinkedAt']||_0x1a7dc4['setUnlinkedAt'](new Date()):_0x1a7dc4['remove']();}_0x531cb6['clear']();});}['_handleInitialThreads'](_0x38af58){_0x38af58['forEach'](_0x11e338=>{_0x11e338['unlinkedAt']&&this['_attachArchivedThread'](_0x11e338['id']);});}['_getTargetForId'](_0x12977d){const _0x2c61a3=this['editor'],_0x431166=this['getAllMarkersForId'](_0x12977d);return et(_0x2c61a3['editing'],_0x431166);}['_getTextContext'](_0x3eda32){const _0x1f337d=this['getAllMarkersForId'](_0x3eda32);let _0x2ec1ba='',_0xdc1caf=!0x1;for(const _0x67cf6b of _0x1f337d){const _0x5a98d5=_0x67cf6b['getRange']();for(const _0x9fbe5b of Array['from'](_0x5a98d5['getItems']()))_0x9fbe5b['is']('$textProxy')?(_0x2ec1ba&&_0xdc1caf&&(_0x2ec1ba+='\x20',_0xdc1caf=!0x1),_0x2ec1ba+=_0x9fbe5b['data']):_0xdc1caf=!0x0;_0xdc1caf=!0x0;}return _0x2ec1ba['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x54f97e,_0x2479fe){const _0x4b5a28=this['editor'],_0x1b3778=_0x4b5a28['plugins']['get'](o);let _0x4d0f5c=_0x1b3778['getCommentThread'](_0x2479fe);const _0x196821=_0x4b5a28['config']['get']('collaboration.channelId'),_0x300e1c=_0x4b5a28['plugins']['get'](P);if(_0x4d0f5c&&(_0x4d0f5c['unlinkedAt']&&_0x4d0f5c['setUnlinkedAt'](null),_0x4d0f5c['isAttached']))return _0x4d0f5c;return!this['getAllMarkersForId'](_0x2479fe)[0x0]['managedUsingOperations']?_0x4b5a28['editing']['view']['once']('render',()=>{if(_0x1b3778['getCommentThread'](_0x2479fe))return;const _0x5361de=_0x4b5a28['plugins']['get'](O);_0x4d0f5c=_0x1b3778['openNewCommentThread']({'channelId':_0x196821,'threadId':_0x2479fe,'target':()=>this['_getTargetForId'](_0x2479fe),'context':{'type':'text','value':this['_getTextContext'](_0x2479fe)}});const _0x267ca3=_0x1b3778['_threadToController']['get'](_0x4d0f5c)['view'],_0x3dddbb=_0x5361de['getByInnerView'](_0x267ca3);_0x3dddbb&&_0x300e1c['registerAnnotation'](_0x3dddbb);},{'priority':'low'}):_0x1b3778['fetchCommentThread']({'channelId':_0x196821,'threadId':_0x2479fe})['then'](_0x35191e=>{if('destroyed'!==_0x4b5a28['state']){if(_0x4d0f5c=_0x35191e,_0x4d0f5c&&!_0x4d0f5c['isAttached']){const _0x15e29d=_0x4d0f5c['attachTo'](()=>this['_getTargetForId'](_0x2479fe));_0x300e1c['registerAnnotation'](_0x15e29d),_0x4d0f5c['isResolved']&&this['_reconvertMarkers'](_0x2479fe);}else{if(!_0x4d0f5c){const _0x5417d3=this['getAllMarkersForId'](_0x2479fe);_0x4b5a28['model']['change'](_0xb6a296=>{for(const _0x49ea0f of _0x5417d3)_0xb6a296['removeMarker'](_0x49ea0f);});}}}}),_0x4d0f5c;}['_handleThreadMarker'](_0x54c817,_0x2ad994){const _0x448fe8=this['_attachMarkerToThread'](_0x54c817,_0x2ad994);_0x448fe8&&!_0x448fe8['context']&&_0x448fe8['setContext']({'type':'text','value':this['_getTextContext'](_0x2ad994)});}['_initAriaMarkerChangeAnnouncements'](){const _0x4750e2=this['editor'];ot(_0x4750e2['model'],({left:_0x505eb6,entered:_0x2acb63})=>{for(const _0x4fed45 of _0x505eb6)if(lt(_0x4fed45)){_0x4750e2['ui']['ariaLiveAnnouncer']['announce'](E(_0x4750e2['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x2ccf7c of _0x2acb63)if(lt(_0x2ccf7c)){_0x4750e2['ui']['ariaLiveAnnouncer']['announce'](E(_0x4750e2['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x918704)));break;}});}}function mt(_0x21ec73,_0x48075f){return _0x48075f?_0x21ec73+':'+_0x48075f:_0x21ec73;}function er(_0x214e17){const _0x32c8ac=_0x214e17['split'](':');return{'group':_0x32c8ac[0x0],'id':_0x32c8ac[0x1],'part':_0x32c8ac[0x2]};}function ht(_0x337c6b,_0x4af8c3){const _0x36750e=_0x4af8c3['schema'],_0xa830ce=_0x4af8c3['createRange'](_0x337c6b['start']);for(const _0x144ddb of _0x337c6b['getWalker']()){const {type:_0x34d1eb,item:_0x1d5540,nextPosition:_0x3ace4b}=_0x144ddb;if('text'===_0x34d1eb||_0x36750e['isObject'](_0x1d5540)){const _0xe88491=_0x4af8c3['createPositionBefore'](_0x1d5540);_0xa830ce['isCollapsed']&&(_0xa830ce['start']=_0xe88491),_0xa830ce['end']=_0x3ace4b;}}return _0xa830ce;}function lt(_0x2f97be){return'comment'===er(_0x2f97be['name'])['group'];}class i extends _0x1b90ef{['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 _0x3fb171=this['editor'],_0x32630a=_0x3fb171['plugins']['get'](o),_0x487189=_0x3fb171['plugins']['get'](r),_0x1e5e39=_0x3fb171['plugins']['get'](O),_0xc330f2=_0x3fb171['plugins']['get'](P);_0x3fb171['ui']['componentFactory']['add']('comment',()=>{const _0x20814d=this['_createUIButton'](_0xada5a);return _0x20814d['tooltip']=!0x0,_0x20814d;}),_0x3fb171['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x558b83)),_0xc330f2['addSourceCollector'](()=>{const _0x3fc0e7=[];for(const [_0x869866,_0x353ce9]of _0x32630a['_threadToController']){const _0x44757a=_0x487189['getAllMarkersForId'](_0x869866['id']),_0xe503be=_0x44757a['map'](_0x258543=>_0x258543['getRange']());_0x44757a['length']>0x0&&_0x3fc0e7['push']([_0x353ce9['view'],_0xe503be]);}return _0x3fc0e7;}),this['listenTo'](_0x1e5e39,'change:activeAnnotations',(_0x51d216,_0xc0a81c,_0x16ccf9)=>{const _0x56732e=Array['from'](_0x16ccf9)['map'](_0x3b5986=>_0x3b5986['innerView'])['find'](_0x11f39a=>_0x32630a['_viewToController']['has'](_0x11f39a));if(!_0x56732e)return void(_0x487189['activeMarker']=null);const _0x1cb6bb=_0x32630a['_viewToController']['get'](_0x56732e)['model']['id'],_0xa2e21b='comment:'+_0x1cb6bb;_0x1cb6bb&&_0x487189['hasMarkerForId'](_0x1cb6bb)?_0x487189['activeMarker']=_0xa2e21b:_0x487189['activeMarker']&&(_0x487189['activeMarker']=null);}),this['listenTo'](_0x32630a,'removeCommentThread',(_0x175b0d,{threadId:_0xb78076,isFromAdapter:_0x4c4438})=>{!_0x4c4438&&_0x3fb171['ui']['focusTracker']['isFocused']&&_0x487189['hasMarkerForId'](_0xb78076)&&_0x3fb171['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x32630a,'addComment',(_0x55366a,{threadId:_0x2ffade,isFromAdapter:_0x38595b})=>{if(_0x38595b||!_0x487189['hasMarkerForId'](_0x2ffade)||!_0x32630a['hasCommentThread'](_0x2ffade))return;0x1===_0x32630a['getCommentThread'](_0x2ffade)['length']&&(_0x3fb171['editing']['view']['focus'](),_0x55366a['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x1df529=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x13afe1;for(const _0x5ea62d in _0x1df529){const _0x2d2cdf=_0x5ea62d,_0x11d9e3=_0x1df529[_0x2d2cdf];if('commentsLicenseKeyValid'==_0x11d9e3||'commentsLicenseKeyInvalid'==_0x11d9e3||'commentsLicenseKeyExpired'==_0x11d9e3||'commentsLicenseKeyDomainLimit'==_0x11d9e3||'commentsLicenseKeyNotAllowed'==_0x11d9e3||'commentsLicenseKeyEvaluationLimit'==_0x11d9e3||'commentsLicenseKeyTrialLimit'==_0x11d9e3||'commentsLicenseKeyUsageLimit'==_0x11d9e3){delete _0x1df529[_0x2d2cdf],_0x13afe1=_0x11d9e3,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x13afe1&&_0x1df529['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x13afe1&&_0x1df529['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x13afe1&&_0x1df529['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x13afe1&&_0x1df529['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x13afe1&&_0x1df529['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x13afe1&&_0x1df529['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x13afe1&&_0x1df529['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x2df6e2){const _0x39fa3c=this['editor'],_0x4ea7c2=new _0x2df6e2(_0x39fa3c['locale']),_0x4958f6=_0x39fa3c['commands']['get']('addCommentThread');return _0x4ea7c2['set']({'label':E(_0x39fa3c['locale'],'Comment'),'icon':_0x22b197}),_0x4ea7c2['bind']('isEnabled')['to'](_0x4958f6),this['listenTo'](_0x4ea7c2,'execute',()=>{_0x4958f6['execute']();}),_0x4ea7c2;}}class s extends _0x1b90ef{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x2898d1){super(_0x2898d1),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x1e1e69,_0x1d4a4b,_0x546558)=>{_0x546558?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x501a40,_0x1b7818]of this['editor']['commands'])_0x1b7818['affectsData']&&'addCommentThread'!==_0x501a40&&_0x1b7818['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 _0x2fcac8=this['editor']['editing']['view']['document'];this['listenTo'](_0x2fcac8,'cut',_0x703e6=>_0x703e6['stop'](),{'priority':'highest'}),this['listenTo'](_0x2fcac8,'clipboardInput',_0x238502=>_0x238502['stop'](),{'priority':'highest'}),this['listenTo'](_0x2fcac8,'delete',_0x3ffd21=>_0x3ffd21['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x565c21,_0x328cc8]of this['editor']['commands'])_0x328cc8['affectsData']&&'addCommentThread'!==_0x565c21&&_0x328cc8['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 _0xb0fdc5{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[O];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4db6b6){super(_0x4db6b6),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x2006a3=this['context']['plugins']['get'](O);this['listenTo'](_0x2006a3,'_activateAnnotation',(_0x256d82,_0x45c534)=>{for(const _0xfa62e0 of this['activeUIs']){const _0x264217=this['_uis']['get'](_0xfa62e0);(0x0,this['uisData']['get'](_0xfa62e0)['filter'])(_0x45c534)&&_0x264217['setActiveAnnotation'](_0x45c534);}}),this['listenTo'](_0x2006a3,'_deactivateAllAnnotations',()=>{for(const _0x46c54c of this['activeUIs']){this['_uis']['get'](_0x46c54c)['setActiveAnnotation'](null);}}),this['listenTo'](_0x2006a3['_visibleAnnotations'],'add',(_0x14b277,_0xcc9f40)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xcc9f40);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x5b8e88){return this['activeUIs']['has'](_0x5b8e88);}['activate'](_0x233b5a,_0x4d8153=this['defaultFilter']){const _0x523014=this['context']['plugins']['get'](O);if(!this['_uis']['has'](_0x233b5a))throw new _0x4877d5('annotationsuis-missing-ui',this,{'uiName':_0x233b5a});this['isActive'](_0x233b5a)&&this['deactivate'](_0x233b5a),this['activeUIs']['add'](_0x233b5a);const _0xa80c5d=new _();!function({source:_0x23c7ae,target:_0x5232ba,filter:_0xa22ce}){for(const _0x49ddcd of _0x23c7ae)_0xa22ce(_0x49ddcd)&&_0x5232ba['add'](_0x49ddcd);_0x5232ba['listenTo'](_0x23c7ae,'add',(_0x29bd5f,_0x4a18fa)=>{_0xa22ce(_0x4a18fa)&&_0x5232ba['add'](_0x4a18fa);}),_0x5232ba['listenTo'](_0x23c7ae,'remove',(_0x14f775,_0x55b2d1)=>{_0x5232ba['has'](_0x55b2d1)&&_0x5232ba['remove'](_0x55b2d1);});}({'source':_0x523014['_visibleAnnotations'],'target':_0xa80c5d,'filter':_0x4d8153}),this['uisData']['set'](_0x233b5a,{'collection':_0xa80c5d,'filter':_0x4d8153});const _0xc48c9a=this['_uis']['get'](_0x233b5a);_0xc48c9a['attach'](_0xa80c5d),this['listenTo'](_0xc48c9a,'change:activeAnnotation',(_0x4da25e,_0x3456e0,_0x2d6442,_0x4c74e2)=>{_0x4c74e2&&_0x523014['_removeActiveAnnotation'](_0x4c74e2),_0x2d6442&&_0x523014['_addActiveAnnotation'](_0x2d6442);});}['deactivate'](_0x82538b){if(this['activeUIs']['delete'](_0x82538b),!this['_uis']['has'](_0x82538b))throw new _0x4877d5('annotationsuis-missing-ui',this,{'uiName':_0x82538b});const _0xf0e8d9=this['_uis']['get'](_0x82538b);_0xf0e8d9['detach'](),this['stopListening'](_0xf0e8d9),this['uisData']['get'](_0x82538b)['collection']['destroy'](),this['uisData']['delete'](_0x82538b);}['switchTo'](_0x2ab9a7){if(!this['_uis']['has'](_0x2ab9a7))throw new _0x4877d5('annotationsuis-missing-ui',this,{'uiName':_0x2ab9a7});const _0xea88bd=this['context']['plugins']['get'](O),_0x4235df=Array['from'](_0xea88bd['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x2ab9a7);const _0x53c388=this['_uis']['get'](_0x2ab9a7);_0x53c388['setActiveAnnotation'](_0x4235df),_0x53c388['_setSelectedAnnotations']&&_0x4235df&&_0x53c388['_setSelectedAnnotations']([_0x4235df]);}['deactivateAll'](){for(const _0x408f29 of this['activeUIs'])this['deactivate'](_0x408f29);}['register'](_0x3fdc53,_0xd7c68){if(this['_uis']['has'](_0x3fdc53))throw new _0x4877d5('annotationsuis-register-already-registered');if('function'!=typeof _0xd7c68['attach']||'function'!=typeof _0xd7c68['detach']||'function'!=typeof _0xd7c68['setActiveAnnotation'])throw new _0x4877d5('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x3fdc53,_0xd7c68);}['refilterAnnotations'](){const _0x54ccc8=this['context']['plugins']['get'](O)['collection'],_0x3cd179=new Map(),_0x38a9de=Array['from'](this['activeUIs']);for(const _0x1249d4 of this['activeUIs']){const _0x3b7ce4=this['uisData']['get'](_0x1249d4)['collection'];for(const _0x120072 of _0x3b7ce4)_0x3cd179['set'](_0x120072,_0x1249d4);}for(const _0x5901ff of _0x54ccc8){const _0x29812d=_0x3cd179['get'](_0x5901ff);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5901ff);const _0x294a72=_0x38a9de['find'](_0xa7a40c=>this['uisData']['get'](_0xa7a40c)['filter'](_0x5901ff));_0x29812d!==_0x294a72&&(_0x29812d&&this['uisData']['get'](_0x29812d)['collection']['remove'](_0x5901ff),_0x294a72&&this['uisData']['get'](_0x294a72)['collection']['add'](_0x5901ff));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x413407){const _0x7420f0=[];for(const _0x2f0893 of this['activeUIs']){(0x0,this['uisData']['get'](_0x2f0893)['filter'])(_0x413407)&&_0x7420f0['push'](_0x2f0893);}if(_0x7420f0['length']>0x1)throw new _0x4877d5('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x7420f0,'annotationType':_0x413407['type']});}}const pi=Dt('px');class F extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x423d19){super(_0x423d19);const _0xd91318=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 _0x4e787a(),this['focusCycler']=new _0x420628({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0xd91318['to']('class')],'style':{'minHeight':_0xd91318['to']('minHeight',_0x1ed0c8=>'number'==typeof _0x1ed0c8?pi(_0x1ed0c8+0xa):null)},'dir':_0x423d19['uiLanguageDirection'],'role':'application','aria-label':E(_0x423d19,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':E(_0x423d19,'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',_0x245b24=>{this['_updateItemPositionInFocusables'](_0x245b24['source']);}),this['list']['forEach'](_0x44491c=>{this['focusTracker']['add'](_0x44491c['element']),this['_updateItemPositionInFocusables'](_0x44491c);}),this['list']['on']('change',(_0x4e3a21,_0x42cc0e)=>{for(const _0x1c01c8 of _0x42cc0e['removed'])this['focusTracker']['remove'](_0x1c01c8['element']),this['focusables']['remove'](_0x1c01c8);for(const _0x43c941 of _0x42cc0e['added'])this['focusTracker']['add'](_0x43c941['element']),this['_updateItemPositionInFocusables'](_0x43c941);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x3bce62){const _0x5bef13=this['focusables']['getIndex'](_0x3bce62);let _0x2eb382,_0xa66988;for(const _0x5e4dcf of this['focusables'])if(_0x3bce62['top']<_0x5e4dcf['top']){_0x2eb382=_0x5e4dcf;break;}if(_0xa66988=_0x2eb382?this['focusables']['getIndex'](_0x2eb382):this['focusables']['length'],-0x1!==_0x5bef13){if(_0x5bef13===_0xa66988-0x1)return;this['focusables']['remove'](_0x3bce62),_0xa66988=_0x2eb382?this['focusables']['getIndex'](_0x2eb382):this['focusables']['length'];}this['focusables']['add'](_0x3bce62,_0xa66988);}}const Ht=Dt('px');class H extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x1d87a7){super(_0x1d87a7),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x22321f,_0x4235cb)=>_0x22321f+_0x4235cb),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=J(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x4716fe=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x4716fe['to']('isAnimationDisabled',_0x3ef406=>_0x3ef406?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x4716fe['to']('top',_0x533c3f=>Ht(_0x533c3f))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x346cdc=this['element']['clientHeight'];_0x346cdc&&(this['height']=_0x346cdc);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0xb0fdc5{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x19f4b7){super(_0x19f4b7),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 _0x130783=this['context']['config']['get']('sidebar.container');_0x130783&&this['setContainer'](_0x130783);}['setContainer'](_0x504b9b){if(!y(_0x504b9b))throw new _0x4877d5('sidebar-setcontainer-invalid-element');this['container']=_0x504b9b;}['_attachToContainer']({viewClass:_0x3760a9='',spaceBetweenItems:_0x468b7e=0x19}={}){if(!y(this['container']))throw new _0x4877d5('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x3760a9,this['_spaceBetweenItems']=_0x468b7e;}['rearrange']({removedAnnotation:_0x3e8bf1,previousAnnotation:_0x4b8e31,nextAnnotation:_0x450037}){const _0x27dd00=this['getSidebarItemView'](_0x3e8bf1);this['view']['list']['remove'](_0x27dd00),this['_destroySidebarItemView'](_0x3e8bf1),_0x4b8e31&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x4b8e31)),_0x450037&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x450037)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x556fd3,activatedAnnotation:_0x44bd6f,disableAnimationOnActivatedAnnotation:_0x3480a5}){if(this['_activeAnnotation']=_0x44bd6f,_0x556fd3){_0x556fd3['isActive']=!0x1;const _0x5011cb=this['getSidebarItemView'](_0x556fd3);_0x5011cb&&_0x3480a5&&(_0x5011cb['isAnimationDisabled']=!0x1);}if(_0x44bd6f){const _0x1cc3f6=this['getSidebarItemView'](_0x44bd6f);_0x1cc3f6&&(_0x44bd6f['isActive']=!0x0,_0x3480a5&&(_0x1cc3f6['isAnimationDisabled']=!0x0,_0x1cc3f6['top']+=0x1),this['_alignToTargetRect'](_0x1cc3f6));}}['_detachFromContainer'](_0x2cad38){if(this['view']['element']['remove'](),_0x2cad38){for(const _0x2a87b4 of _0x2cad38)this['_destroySidebarItemView'](_0x2a87b4);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x1dfddb,_0x1da2ca){_0x1da2ca||(_0x1da2ca=_0x1dfddb['view']);const _0x57b417=new H(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x57b417,_0x1dfddb),this['_annotationToSidebarItemView']['set'](_0x1dfddb,_0x57b417),_0x57b417['content']['add'](_0x1da2ca),this['listenTo'](_0x1dfddb['view'],'change:targetRect',(_0x1c8c6b,_0x385deb,_0x1d624a)=>{const _0x5944bd=this['_getTargetTop'](_0x1dfddb,_0x1d624a);_0x57b417['_targetTop']!=_0x5944bd&&(_0x57b417['_targetTop']=_0x5944bd,this['_setItemTop'](_0x57b417,_0x5944bd));}),this['listenTo'](_0x57b417,'change:top',()=>{this['_recalculate'](_0x57b417,'top');}),this['listenTo'](_0x57b417,'change:bottom',()=>{this['_recalculate'](_0x57b417,'bottom');}),this['_alignToTargetRect'](_0x57b417);const _0x381a81=this['_getItemBefore'](_0x57b417);if(_0x381a81)this['_alignAfterItem'](_0x381a81,_0x57b417)||this['_alignToTargetRect'](_0x57b417);else this['_alignToTargetRect'](_0x57b417);return this['_updateLastItem'](),this['view']['list']['add'](_0x57b417),_0x57b417;}['_alignForTopChange'](_0x1836fa){if(!_0x1836fa['content']['length'])return;const _0x4315eb=this['_getItemBefore'](_0x1836fa);if(!_0x4315eb)return;const _0x31bf0e=this['_sidebarItemViewToAnnotation']['get'](_0x4315eb),_0x36169c=this['_activeAnnotation'];_0x36169c&&_0x36169c===_0x31bf0e?this['_alignAfterItem'](_0x4315eb,_0x1836fa):this['_alignBeforeItem'](_0x1836fa,_0x4315eb);}['_alignForBottomChange'](_0x2559cf){if(!_0x2559cf['content']['length'])return;const _0xf188b1=this['_getItemAfter'](_0x2559cf);if(!_0xf188b1)return;const _0x11a94c=this['_sidebarItemViewToAnnotation']['get'](_0xf188b1),_0x461808=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0xf2dcf5=this['_activeAnnotation'];_0xf2dcf5&&_0xf2dcf5===_0x11a94c&&_0x461808?(this['_alignBeforeItem'](_0xf188b1,_0x2559cf),this['_alignAfterItem'](_0x2559cf,_0xf188b1)):_0xf2dcf5&&_0xf2dcf5===_0x11a94c?this['_alignBeforeItem'](_0xf188b1,_0x2559cf):this['_alignAfterItem'](_0x2559cf,_0xf188b1);}['_recalculate'](_0x339139,_0x217c29){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x21c1eb,changedProp:_0x182f76}of this['_recalculateBuffer'])'top'===_0x182f76?this['_alignForTopChange'](_0x21c1eb):this['_alignForBottomChange'](_0x21c1eb);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x339139,'changedProp':_0x217c29});}['getSidebarItemView'](_0x4f7865){return this['_annotationToSidebarItemView']['get'](_0x4f7865);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x4e3d91){const _0x4c0064=this['getSidebarItemView'](_0x4e3d91);this['stopListening'](_0x4c0064),this['stopListening'](_0x4e3d91['view']),_0x4c0064['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x4e3d91),this['_sidebarItemViewToAnnotation']['delete'](_0x4c0064);}['_createSidebarView'](){const _0x1e3d75=new F(this['context']['locale']);return _0x1e3d75['render'](),this['on']('change:_lastItem',(_0xc21121,_0x1acffe,_0x43d840,_0x98784a)=>{_0x98784a&&_0x1e3d75['unbind']('minHeight'),_0x43d840?_0x1e3d75['bind']('minHeight')['to'](_0x43d840,'bottom'):_0x1e3d75['minHeight']=null;}),_0x1e3d75;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x568b44){const _0xfd1b6a=this['_sidebarItemViewToAnnotation']['get'](_0x568b44),_0x2e838c=_0xfd1b6a&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0xfd1b6a)-0x1);return _0x2e838c&&this['getSidebarItemView'](_0x2e838c)||null;}['_getItemAfter'](_0x56a4b7){const _0x2c6404=this['_sidebarItemViewToAnnotation']['get'](_0x56a4b7),_0x11605a=_0x2c6404&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2c6404)+0x1);return _0x11605a&&this['getSidebarItemView'](_0x11605a)||null;}['_alignBeforeItem'](_0x2070a6,_0x1cbfc7){_0x2070a6['updateHeight']();const _0x12fe14=R(_0x1cbfc7['bottom']+this['_spaceBetweenItems'],_0x2070a6['top']);return!!_0x12fe14&&(this['_setItemTop'](_0x1cbfc7,_0x1cbfc7['top']-_0x12fe14),!0x0);}['_alignAfterItem'](_0x350e64,_0x25e522){_0x350e64['updateHeight']();const _0x137fc5=R(_0x350e64['bottom']+this['_spaceBetweenItems'],_0x25e522['top']);return!!_0x137fc5&&(this['_setItemTop'](_0x25e522,_0x25e522['top']+_0x137fc5,!0x1),!0x0);}['_alignToTargetRect'](_0x253823){const _0x2b1e7d=this['_sidebarItemViewToAnnotation']['get'](_0x253823);if(!_0x2b1e7d||!_0x2b1e7d['target']||!_0x2b1e7d['targetRect'])return;const _0x501299=this['_getTargetTop'](_0x2b1e7d,_0x2b1e7d['targetRect']);this['_setItemTop'](_0x253823,_0x501299);}['_getTargetTop'](_0x41ba0f,_0x1b647e){if(null===_0x1b647e)return 0x0;if(_0x41ba0f['target']instanceof _0x38453a)return _0x1b647e['top'];{const _0x148936=new _0x38453a(this['view']['element'])['top'];return _0x1b647e['top']-_0x148936;}}['_setItemTop'](_0x499a62,_0x3dad7,_0x58d727=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x58d727&&(_0x3dad7=Math['max'](_0x3dad7,this['_getMaxAvailableTop'](_0x499a62))),_0x499a62['top']=_0x3dad7;}['_getMaxAvailableTop'](_0x5be315){let _0x3afc4=this['_getItemBefore'](_0x5be315),_0x1adcad=0x0;for(;_0x3afc4;)_0x3afc4['updateHeight'](),_0x1adcad+=this['_spaceBetweenItems']+_0x3afc4['height'],_0x3afc4=this['_getItemBefore'](_0x3afc4);return _0x1adcad;}}function R(_0x13bb40,_0x84a852){return Math['max'](_0x13bb40-_0x84a852,0x0);}function y(_0x1359fd){return null!==_0x1359fd&&'object'==typeof _0x1359fd&&0x1===_0x1359fd['nodeType'];}class e extends _0xb0fdc5{['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(_0x26d726){super(_0x26d726),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x1990b8(),this['_refreshPositioningDebounced']=_0xd76232(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x4da4b2=this['context']['plugins']['get'](M),_0x53abcb=this['context']['plugins']['get'](z);_0x4da4b2['register']('wideSidebar',this),_0x53abcb['container']&&_0x4da4b2['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x59c06b){if(_0x59c06b===this['activeAnnotation'])return;const _0x104ed7=this['context']['plugins']['get'](z);_0x104ed7['_activeAnnotation']=_0x59c06b;const _0x9ee7e8=this['activeAnnotation'];_0x104ed7['refresh']({'blurredAnnotation':_0x9ee7e8,'activatedAnnotation':_0x59c06b}),this['activeAnnotation']=_0x59c06b;}['attach'](_0x4789ac){this['annotations']=_0x4789ac;const _0xb0597f=this['context']['plugins']['get'](z);if(_0xb0597f['_annotations']=_0x4789ac,this['isAttached'])throw new _0x4877d5('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0xb0597f,'set:container',()=>{this['detach'](),this['listenTo'](_0xb0597f,'change:container',_0x266d9a=>{_0x266d9a['off'](),this['attach'](_0x4789ac);});}),_0xb0597f['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x216121=_0x2b53f2=>{_0x2b53f2['updateTargetRect'](),_0xb0597f['addAnnotation'](_0x2b53f2);};for(const _0x39b4c3 of _0x4789ac)_0x216121(_0x39b4c3);this['listenTo'](_0x4789ac,'add',(_0x2a9018,_0xfc9c2d)=>{_0x216121(_0xfc9c2d);}),this['listenTo'](_0x4789ac,'remove',(_0x26683c,_0x5c7679,_0x17b2a4)=>{_0xb0597f['rearrange']({'removedAnnotation':_0x5c7679,'previousAnnotation':_0x4789ac['get'](_0x17b2a4-0x1),'nextAnnotation':_0x4789ac['get'](_0x17b2a4+0x1)}),_0x5c7679===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x4789ac,'focus',(_0x42b668,_0x5f0498)=>{this['setActiveAnnotation'](_0x5f0498);}),this['listenTo'](_0x4789ac,'blur',()=>{this['setActiveAnnotation'](null);});const _0x32b4b2=this['context']instanceof _0x20d897?this['context']['editors']:new _0x1990b8([this['context']]);for(const _0x588bef of _0x32b4b2)this['_integrateWithEditorAnnotations'](_0x588bef);this['listenTo'](_0x32b4b2,'add',(_0x4bcc49,_0x267bf4)=>{this['listenTo'](_0x267bf4,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x267bf4);});}),this['listenTo'](_0x32b4b2,'remove',(_0x5d64b2,_0x560d5c)=>{_0x560d5c['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x560d5c['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x4877d5('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x475c78=this['context']['plugins']['get'](z);_0x475c78['_detachFromContainer'](this['annotations']),this['stopListening'](_0x475c78),this['stopListening'](this['annotations']),this['context']instanceof _0x20d897&&this['stopListening'](this['context']['editors']);for(const _0x46a015 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x46a015);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x3cf03a){if(!_0x3cf03a['plugins']['has']('EditorAnnotations'))return;const _0x3fe5b5=_0x3cf03a['plugins']['get']('EditorAnnotations'),_0xa2a950=()=>{const _0x3002f6=_0x3fe5b5['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x3002f6[0x0]||null);};this['listenTo'](_0x3fe5b5,'refresh',_0xa2a950),this['listenTo'](_0x3fe5b5,'blur',(_0x4840b5,{isAnnotationTracked:_0x1abe0d})=>{this['activeAnnotation']&&_0x1abe0d(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x3fe5b5,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x233a1c=>{_0x3fe5b5['hasDomSelection']()&&(_0xa2a950(),_0x233a1c['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x3fe5b5);}['_destroyEditorAnnotationsIntegration'](_0x5c3551){this['stopListening'](_0x5c3551),this['_editorAnnotations']['remove'](_0x5c3551);}}class C extends _0xada5a{['counterView'];constructor(_0x25bda0){super(_0x25bda0);const _0x4cdf7f=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x34fd5e,_0x1e18f0)=>_0x34fd5e?'...':_0x1e18f0['toString']()),this['set']('annotationType',''),this['icon']=_0x22b197,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x4cdf7f['to']('annotationType',_0x501b4a=>'ck-annotation-counter__badge--'+_0x501b4a),_0x4cdf7f['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x4cdf7f['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0xb0fdc5{['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(_0x5e3282){super(_0x5e3282),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x5ae503),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x1990b8(),this['_refreshPositioningDebounced']=_0xd76232(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x3294cf(this['context']['locale']),this['balloonPanelView']=new _0x41e242(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x5e783c){this['annotations']=_0x5e783c;const _0x8761db=this['context']['plugins']['get'](z),_0x4f12c4=this['balloonPanelView'];if(_0x8761db['_annotations']=_0x5e783c,this['isAttached'])throw new _0x4877d5('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x8761db,'set:container',()=>{this['detach'](),this['listenTo'](_0x8761db,'change:container',_0x11faba=>{_0x11faba['off'](),this['attach'](_0x5e783c);});}),_0x8761db['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0xd81199=_0x3b88b5=>{const _0x4816ae=new C(this['context']['locale']);_0x8761db['addAnnotation'](_0x3b88b5,_0x4816ae),this['_annotationToNarrowView']['set'](_0x3b88b5,_0x4816ae),_0x4816ae['bind']('isDirty','annotationType','number')['to'](_0x3b88b5['view'],'isDirty','type','length'),_0x4816ae['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x4f12c4['content']['first']!==_0x3b88b5['view']?(this['_showBalloon'](_0x3b88b5),_0x3b88b5['view']['element']['focus'](),this['setActiveAnnotation'](_0x3b88b5)):this['setActiveAnnotation'](null);});};for(const _0x29dea8 of _0x5e783c)_0xd81199(_0x29dea8);this['listenTo'](_0x5e783c,'add',(_0x5c82f3,_0x3229d8)=>{_0xd81199(_0x3229d8);}),this['listenTo'](_0x5e783c,'remove',(_0x59f3c3,_0x1e0187,_0x319785)=>{this['_annotationToNarrowView']['get'](_0x1e0187)['destroy'](),this['_annotationToNarrowView']['delete'](_0x1e0187),_0x8761db['rearrange']({'removedAnnotation':_0x1e0187,'previousAnnotation':_0x5e783c['get'](_0x319785-0x1),'nextAnnotation':_0x5e783c['get'](_0x319785+0x1)}),_0x1e0187===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x5e783c,'focus',(_0x2e0c3b,_0x203ddf)=>{this['setActiveAnnotation'](_0x203ddf);}),this['listenTo'](_0x5e783c,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x1f8407,_0x548791)=>{_0x548791['keyCode']===_0x55d262['esc']&&_0x4f12c4['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x4f12c4['content']['first']),this['_hideBalloon'](),_0x548791['stopPropagation'](),_0x548791['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x561347,_0x5e65f9)=>{const _0x3e1f49=_0x5e65f9['target'];_0x4f12c4['isVisible']&&_0x4f12c4['element']['contains'](_0x3e1f49)||_0x8761db['view']['element']['contains'](_0x3e1f49)||_0x561347['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x40d7d0=>_0x40d7d0['contains'](_0x3e1f49))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x1c74bc=this['context']instanceof _0x20d897?this['context']['editors']:new _0x1990b8([this['context']]);for(const _0x260fde of _0x1c74bc)this['_integrateWithEditorAnnotations'](_0x260fde);this['listenTo'](_0x1c74bc,'add',(_0x4c253d,_0x536cdb)=>{this['listenTo'](_0x536cdb,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x536cdb);});}),this['listenTo'](_0x1c74bc,'remove',(_0x10cb7c,_0x558da2)=>{_0x558da2['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x558da2['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x4a158a){if(_0x4a158a===this['activeAnnotation'])return;const _0x4de1af=this['context']['plugins']['get'](z);if(_0x4de1af['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x4a158a,'disableAnimationOnActivatedAnnotation':!0x0}),_0x4a158a)_0x4de1af['getSidebarItemView'](_0x4a158a)?this['_showBalloon'](_0x4a158a):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x4a158a;}['detach'](){if(!this['isAttached'])throw new _0x4877d5('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x595e43=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0xe4276f=>_0xe4276f['destroy']()),this['_annotationToNarrowView']['clear'](),_0x595e43['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x20d897&&this['stopListening'](this['context']['editors']);for(const _0x5f49ee of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x5f49ee);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'](_0x290c61){if(!_0x290c61['plugins']['has']('EditorAnnotations'))return;const _0x569dac=_0x290c61['plugins']['get']('EditorAnnotations'),_0x7546c5=this['context']['plugins']['get'](z),_0xfb0f4c=this['annotations'],_0x20b692=this['balloonPanelView'],_0x2fa1bd=()=>{const _0x112f69=_0x569dac['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x112f69),this['setActiveAnnotation'](_0x112f69[0x0]||null);};this['listenTo'](_0x569dac,'refresh',_0x2fa1bd),this['listenTo'](_0x569dac,'blur',(_0x3da062,{isAnnotationTracked:_0xc1d42b})=>{this['activeAnnotation']&&_0xc1d42b(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x569dac,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0xfb0f4c,'blur',_0x16adb1=>{_0x569dac['hasDomSelection']()&&_0x16adb1['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x155d84,_0x4cf7ec)=>{const _0x451bc5=_0x4cf7ec['target'];_0x20b692['isVisible']&&_0x20b692['element']['contains'](_0x451bc5)||_0x7546c5['view']['element']['contains'](_0x451bc5)||this['activeAnnotation']&&_0x569dac['hasDomSelection']()&&(_0x2fa1bd(),_0x155d84['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x569dac);}['_destroyEditorAnnotationsIntegration'](_0x57cdb1){_0x57cdb1&&(this['stopListening'](_0x57cdb1),this['_editorAnnotations']['remove'](_0x57cdb1));}['_setSelectedAnnotations'](_0x1f9eba){for(const _0x228b72 of this['_selectedAnnotations'])_0x1f9eba['includes'](_0x228b72)||this['_manuallyClosedAnnotationViews']['delete'](_0x228b72['view']);this['_selectedAnnotations']=_0x1f9eba;}['_refreshPositioning'](){const _0x7f2f61=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x7f2f61['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x22ddf7){if(this['_manuallyClosedAnnotationViews']['has'](_0x22ddf7['view']))return;const _0x4a3c3b=this['balloonPanelView']['content']['first'];_0x4a3c3b!==_0x22ddf7['view']?(_0x4a3c3b&&this['_detachListeners'](_0x4a3c3b),this['_attachListeners'](_0x22ddf7['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x22ddf7['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0xb94ad4=this['balloonPanelView']['content']['first'],_0xcd14a9=_0xb94ad4&&this['annotations']['getByView'](_0xb94ad4);if(!_0xcd14a9||!this['_annotationToNarrowView']['has'](_0xcd14a9))return;const _0x2260f4=this['_annotationToNarrowView']['get'](_0xcd14a9)['element'],_0x1aae93=(function(){const _0x218848=_0x41e242['defaultPositions'];return[_0x218848['southArrowNorthEast'],_0x218848['northArrowSouthEast'],_0x218848['southArrowNorth'],_0x218848['northArrowSouth'],_0x218848['southArrowNorthWest'],_0x218848['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x2260f4,'positions':_0x1aae93});}['_hideBalloon'](){const _0x3d5664=this['balloonPanelView'],_0x1c6c2f=_0x3d5664['content']['first'];_0x1c6c2f&&(this['_detachListeners'](_0x1c6c2f),_0x3d5664['unpin'](),_0x3d5664['content']['clear']());}['_attachListeners'](_0x10734b){this['listenTo'](_0x10734b,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x10734b,'Esc',(_0x5050a4,_0x11a123)=>{this['_manuallyClosedAnnotationViews']['add'](_0x10734b),this['_hideBalloon'](),_0x11a123();});}['_detachListeners'](_0x5887c0){this['stopListening'](_0x5887c0);}}class c extends _0x1b90ef{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x3a7997,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3448f3){super(_0x3448f3),_0x3448f3['editing']['view']['addObserver'](_0x19e0b5),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x3448f3['plugins']['get'](_0x3a7997),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x1e5a41=this['editor']['plugins']['get'](M);_0x1e5a41['context']===this['editor']&&(_0x1e5a41['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x32288d,_0x7b05ce)=>{const _0x57a0e9=this['_balloon'];if(this['isAttached']&&_0x57a0e9['visibleView']){const _0x5358f4=this['annotations']['getByView'](_0x57a0e9['visibleView']);_0x5358f4&&this['_closeAnnotation'](_0x5358f4),_0x7b05ce();}}));}['afterInit'](){const _0x4f1666=this['editor']['plugins']['get'](M);_0x4f1666['context']===this['editor']&&(_0x4f1666['hasActive']()||_0x4f1666['switchTo']('inline'));}['setActiveAnnotation'](_0x20bf90){_0x20bf90!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x20bf90&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x20bf90)&&this['_addAnnotationToBalloon'](_0x20bf90,!0x0),_0x20bf90['isActive']=!0x0),_0x20bf90||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x20bf90);}['attach'](_0x142153){this['annotations']=_0x142153;const _0x4a3d03=this['editor']['plugins']['get'](M),_0x44b6da=this['_balloon'];if(this['isAttached'])throw new _0x4877d5('inlineannotations-attach-already-attached',this);if(_0x4a3d03['context']!==this['editor'])throw new _0x4877d5('inlineannotations-not-allowed-with-context',this);const _0x5eef78=this['editor']['plugins']['get'](P);this['listenTo'](_0x5eef78,'refresh',()=>{const _0x24d53b=_0x5eef78['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x3aa79d,_0x35ec5d;!this['_forceRefresh']&&(_0x3aa79d=_0x24d53b,_0x35ec5d=this['_selectedAnnotations'],_0x3aa79d['length']===_0x35ec5d['length']&&_0x3aa79d['every'](_0x358793=>_0x35ec5d['includes'](_0x358793)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x24d53b),this['setActiveAnnotation'](_0x24d53b[0x0]||null));}),this['listenTo'](_0x5eef78,'blur',(_0x4ce008,{isAnnotationTracked:_0x345a96})=>{this['activeAnnotation']&&_0x345a96(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x345c05,_0x428e76,_0x44ef4f)=>{_0x44ef4f||this['setActiveAnnotation'](null);}),this['listenTo'](_0x142153,'remove',(_0x24ce0d,_0x494b3b)=>{this['_removeAnnotationFromBalloon'](_0x494b3b),_0x494b3b===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x44b6da,'change:visibleView',(_0x122cc4,_0x363438,_0x1425ab,_0x44412f)=>{_0x44412f&&this['stopListening'](_0x44412f);const _0x4d8ddb=_0x142153['getByView'](_0x1425ab);_0x1425ab&&_0x4d8ddb&&(this['listenTo'](_0x1425ab,'change:height',()=>{_0x44b6da['updatePosition']();}),this['listenTo'](_0x1425ab,'Esc',()=>{this['_closeAnnotation'](_0x4d8ddb),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x4d8ddb&&this['setActiveAnnotation'](_0x4d8ddb));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x44b6da['visibleView']&&(_0x142153['getByView'](_0x44b6da['visibleView'])&&_0x44b6da['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 _0x4877d5('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x156ef0 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x156ef0);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x25ec4f){for(const _0x3bfd4f of this['_selectedAnnotations'])_0x25ec4f['includes'](_0x3bfd4f)||this['_manuallyClosed']['delete'](_0x3bfd4f);for(const _0xa10fb7 of this['annotations'])_0x25ec4f['includes'](_0xa10fb7)||this['_removeAnnotationFromBalloon'](_0xa10fb7);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x3e80d4 of _0x25ec4f)this['_addAnnotationToBalloon'](_0x3e80d4);}this['_selectedAnnotations']=_0x25ec4f;}['_addAnnotationToBalloon'](_0x5750ba,_0x52724d=!0x1){this['_manuallyClosed']['has'](_0x5750ba)||(this['_addedAnnotations']['has'](_0x5750ba)||this['_balloon']['hasView'](_0x5750ba['view'])||(this['_addedAnnotations']['add'](_0x5750ba),this['_balloon']['add']({'stackId':_0x5750ba['view']['id'],'view':_0x5750ba['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x5750ba)}})),_0x52724d&&this['_balloon']['showStack'](_0x5750ba['view']['id']));}['_getBalloonTargetForAnnotation'](_0x18181f){const _0x2ae9db=_0x18181f['target'],_0x30a0e1=this['editor']['editing']['view'],_0x2366a1=_0x30a0e1['document']['selection']['getFirstRange'](),_0x33358e=_0x30a0e1['domConverter']['viewRangeToDom'](_0x2366a1);if(_0x33358e['collapse'](!0x0),_0x2ae9db){if(_0x2ae9db instanceof _0x38453a)return _0x2ae9db;let _0xbb02ca=[];for(const _0x4584fc of _0x2ae9db)_0xbb02ca['push'](...(_0x48b86b=_0x4584fc['getClientRects'](),Array['from'](_0x48b86b)['map'](DOMRect['fromRect'])));_0xbb02ca=function(_0x1cbb13){const _0x48d69e=[];let _0x296b25=_0x1cbb13[0x0];for(let _0x550a57=0x1;_0x550a57<_0x1cbb13['length'];_0x550a57++)B(_0x296b25,_0x1cbb13[_0x550a57])?_0x296b25['width']+=_0x1cbb13[_0x550a57]['width']:(_0x48d69e['push'](_0x296b25),_0x296b25=_0x1cbb13[_0x550a57]);return _0x48d69e['push'](_0x296b25),_0x48d69e;}(_0xbb02ca);const _0x34b7a5=_0x33358e['getBoundingClientRect']();return _0xbb02ca['find'](_0xd5c149=>_0xd5c149['top']<=_0x34b7a5['top']&&_0xd5c149['bottom']>=_0x34b7a5['bottom']&&_0xd5c149['left']<=_0x34b7a5['left']&&_0xd5c149['right']>=_0x34b7a5['right'])||_0xbb02ca[0x0];}var _0x48b86b;return _0x18181f['targetRect']||_0x33358e;}['_removeAnnotationFromBalloon'](_0x532ce3){this['_addedAnnotations']['has'](_0x532ce3)&&this['_balloon']['hasView'](_0x532ce3['view'])&&(this['_addedAnnotations']['delete'](_0x532ce3),this['_balloon']['remove'](_0x532ce3['view']));}['_closeAnnotation'](_0x2471a6){this['_manuallyClosed']['add'](_0x2471a6),this['_removeAnnotationFromBalloon'](_0x2471a6);}}function B(_0x245f2f,_0x27c955){return _0x245f2f['top']===_0x27c955['top']&&_0x245f2f['bottom']===_0x27c955['bottom']&&_0x245f2f['right']===_0x27c955['left'];}class st extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x452c83,_0x258fd0){super(_0x452c83),this['set']('isEmpty',!_0x258fd0['length']),this['focusTracker']=new _0x4e787a(),this['_annotationViews']=_0x258fd0,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x420628({'focusables':_0x258fd0,'focusTracker':this['focusTracker']}),this['listenTo'](_0x258fd0,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x258fd0,'remove',(_0x4bb52f,_0x446323)=>{_0x446323['isActive']&&this['focus'](),_0x258fd0['length']||(this['isEmpty']=!0x0);});const _0x4307d8=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':E(_0x452c83,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x258fd0},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x4307d8['if']('isEmpty','ck-hidden',_0x3b2795=>!_0x3b2795)]},'children':[{'text':E(_0x452c83,'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 _0x3aa620 of this['_annotationViews'])this['focusTracker']['add'](_0x3aa620['element']);this['_annotationViews']['on']('change',(_0x7d267f,{added:_0x33b13a,removed:_0x5e6eeb})=>{for(const _0x1098e1 of _0x33b13a)this['focusTracker']['add'](_0x1098e1['element']);for(const _0x37b348 of _0x5e6eeb)this['focusTracker']['remove'](_0x37b348['element']);});}}class f extends _0xb0fdc5{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,O];}constructor(_0x8509b4){super(_0x8509b4),this['archivedThreads']=new _0x1990b8();}['init'](){const _0x568db2=this['context'],_0x423876=_0x568db2['plugins']['get'](o),_0x3f6918=_0x568db2['plugins']['get'](O);this['listenTo'](_0x423876,'addCommentThread',(_0x1544d9,{threadId:_0x2cbbb5})=>{const _0x2c51d3=_0x423876['getCommentThread'](_0x2cbbb5);_0x2c51d3['archivedAt']&&this['archivedThreads']['add'](_0x2c51d3,this['_calculatePosition'](_0x2c51d3['archivedAt'])),this['listenTo'](_0x2c51d3,'change:archivedAt',(_0x5d371a,_0x5b79f8,_0x1b4508)=>{_0x1b4508?this['archivedThreads']['has'](_0x2c51d3)||this['archivedThreads']['add'](_0x2c51d3,this['_calculatePosition'](_0x2c51d3['archivedAt'])):this['archivedThreads']['has'](_0x2c51d3)&&this['archivedThreads']['remove'](_0x2c51d3);});}),this['listenTo'](_0x423876,'removeCommentThread',(_0x367cc4,{threadId:_0x365d2f})=>{const _0x186926=_0x423876['getCommentThread'](_0x365d2f);this['stopListening'](_0x186926),this['archivedThreads']['has'](_0x186926)&&this['archivedThreads']['remove'](_0x186926);},{'priority':'highest'}),this['listenTo'](_0x3f6918['collection'],'focus',(_0x8f3341,_0x28731b)=>{_0x28731b['isVisible']||(_0x28731b['isActive']=!0x0,_0x3f6918['activate'](_0x28731b));});}['_calculatePosition'](_0x3df895){const _0x57503e=[...this['archivedThreads']]['findIndex'](_0x563f06=>_0x563f06['archivedAt']<_0x3df895);return _0x57503e>-0x1?_0x57503e:this['archivedThreads']['length'];}}class a extends _0x1b90ef{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,tt];}constructor(_0x3e06e2){super(_0x3e06e2),this['annotationViews']=new _0x273922(),this['_pendingThreads']=[];}['init'](){const _0x417fb5=this['editor'],_0x1a0ed6=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x417fb5['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0xada5a,!0x0)),_0x417fb5['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x575434=this['_createCommentsArchiveButton'](_0x558b83);return _0x575434['set']({'role':'menuitemcheckbox'}),_0x575434;});const _0xdedc85=_0x417fb5['plugins']['get'](f),_0x559996=_0x417fb5['plugins']['get']('Annotations'),_0x534074=_0x417fb5['plugins']['get']('CommentsRepository');_0xdedc85['archivedThreads']['forEach'](_0x19da48=>{this['_handleNewThread'](_0x19da48);}),this['listenTo'](_0xdedc85['archivedThreads'],'add',(_0xdefea1,_0x4efa80)=>{this['_handleNewThread'](_0x4efa80);}),this['listenTo'](_0x559996['collection'],'add',(_0x2f10b8,_0x3a1659)=>{const _0x1f20a9=this['_pendingThreads']['find'](_0xfc1d0e=>{const _0x5e7e98=_0x534074['_threadToController']['get'](_0xfc1d0e);return _0x5e7e98&&_0x3a1659['innerView']===_0x5e7e98['view'];});if(_0x1f20a9){const _0x2b7533=this['_calculatePosition'](_0x1f20a9['archivedAt']);this['annotationViews']['add'](_0x3a1659['view'],_0x2b7533),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x1f20a9),0x1);}}),this['listenTo'](_0xdedc85['archivedThreads'],'remove',(_0x3ae33a,_0x512c42)=>{const _0x30d16b=_0x417fb5['config']['get']('collaboration.channelId');if(!_0x30d16b||_0x512c42['channelId']===_0x30d16b){if(this['_pendingThreads']['includes'](_0x512c42))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x512c42),0x1);else{const _0x29bcf8=_0x534074['_threadToController']['get'](_0x512c42),_0x9283f7=_0x559996['getByInnerView'](_0x29bcf8['view']);this['annotationViews']['remove'](_0x9283f7['view']),this['stopListening'](_0x9283f7['focusableElements']);}}}),this['listenTo'](_0x559996['collection'],'add',(_0x43371d,_0x56a67a)=>{this['listenTo'](_0x56a67a,'escape',_0x1a0ed6);}),this['listenTo'](_0x559996['collection'],'remove',(_0x4d5a85,_0x1c9d55)=>{this['stopListening'](_0x1c9d55,'escape',_0x1a0ed6);});}['_handleNewThread'](_0x4ca209){const _0x497e3c=this['editor']['plugins']['get']('CommentsRepository'),_0x52da2=this['editor']['plugins']['get']('Annotations'),_0x26ad13=this['editor']['config']['get']('collaboration.channelId');if(!_0x26ad13||_0x4ca209['channelId']===_0x26ad13){const _0x2e331e=_0x497e3c['_threadToController']['get'](_0x4ca209);if(!_0x2e331e)return void this['_pendingThreads']['push'](_0x4ca209);const _0x528810=this['_calculatePosition'](_0x4ca209['archivedAt']),_0x236c13=_0x52da2['getByInnerView'](_0x2e331e['view']);_0x236c13['isVisible']&&_0x52da2['_visibleAnnotations']['remove'](_0x236c13),this['annotationViews']['add'](_0x236c13['view'],_0x528810);}}['_calculatePosition'](_0x319008){const _0x5b8f38=this['editor']['config']['get']('collaboration.channelId'),_0x52b6af=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0x514ed6=>_0x514ed6['channelId']===_0x5b8f38)['findIndex'](_0x5b4008=>_0x5b4008['archivedAt']<_0x319008);return _0x52b6af<0x0||_0x52b6af>this['annotationViews']['length']?this['annotationViews']['length']:_0x52b6af-0x1;}['_toggleDialog'](){const _0x319003=this['editor'],_0x5d4699=_0x319003['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new st(_0x319003['locale'],this['annotationViews'])),'commentsArchive'===_0x5d4699['id']?_0x5d4699['hide']():_0x5d4699['show']({'id':'commentsArchive','title':E(_0x319003['locale'],'COMMENTS_ARCHIVE'),'icon':_0x279b67,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':it['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x1d86d6,_0x566fbb=!0x1){const _0xeac5fb=this['editor']['locale'],_0x58fe88=this['editor']['plugins']['get']('Dialog'),_0x584b8b=new _0x1d86d6(_0xeac5fb);return _0x584b8b['bind']('isEnabled')['to'](this,'isEnabled'),_0x584b8b['bind']('isOn')['to'](_0x58fe88,'id',_0x3b8cfe=>'commentsArchive'===_0x3b8cfe),_0x584b8b['set']({'label':E(_0xeac5fb,'COMMENTS_ARCHIVE'),'icon':_0x279b67,'isToggleable':!0x0}),_0x566fbb&&(_0x584b8b['tooltip']=!0x0),this['listenTo'](_0x584b8b,'execute',()=>this['_toggleDialog']()),_0x584b8b;}['_hideDialogOnAnnotationEscape']=_0x594532=>{const _0x59df03=_0x594532['source'];if(!this['annotationViews']['has'](_0x59df03['view']))return;const _0x3b0e9d=this['editor']['plugins']['get']('Dialog');_0x3b0e9d['isOpen']&&'commentsArchive'===_0x3b0e9d['id']&&(_0x3b0e9d['hide'](),_0x594532['stop']());};}class p extends _0x1b90ef{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,gt as CommentThreadController,ie as CommentThreadInputView,Tt as CommentThreadView,_t 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 _0x5704e9,ContextPlugin as _0x27e7bc,PendingActions as ht,Command as _0x51e5f3,Plugin as _0x4e6ffe,Context as _0x4ed3e0}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x4ba4c4,uid as _0x5d5a44,KeystrokeHandler as jt,FocusTracker as _0x1096d1,diff as _0x4dd938,Collection as _0x321144,Rect as _0x212c58,CKEditorError as _0x5bf711,first as _0x1ab4c8,priorities as Wt,scrollViewportToShowTarget as rt,getEnvKeystrokeText as nt,toUnit as xt,DomEmitterMixin as _0x5853c4,keyCodes as _0x414a9a}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x1d38bf,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0xebfec6,trimHtml as _0x4181a6,LateFocusDropdownButtonView as _0x5dd4b3,Users as it,getDateTimeFormatter as lt,hashObject as pt,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as ot,FOCUS_ANNOTATION_KEYSTROKE as _0x18815c}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as wt,cloneDeep as It,set as At,unset as yt,debounce as _0x1aaecd}from'es-toolkit/compat';import{IconUndo as _0x8344d6,IconCheck as _0x4fd30b,IconPencil as _0x311751,IconRemoveComment as _0x441e28,IconThreeVerticalDots as _0xa59250,IconAddComment as _0x723f12,IconCommentsArchive as _0x33284a}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Vt,InlineEditableUIView as $t,EditorUI as Rt,View as kt,FocusCycler as _0x47bf62,ButtonView as _0x59b830,ViewCollection as _0x265dd7,createDropdown as _0x7c791f,ListView as _0x55a164,focusChildOnDropdownOpen as _0x319f16,ListItemView as _0x21f179,MenuBarMenuListItemButtonView as _0x38f3a4,BodyCollection as _0x3b31ed,BalloonPanelView as _0x1c86d3,ContextualBalloon as _0x114036,Dialog as _0x89b3d0,DialogViewPosition as _0x45c3e0}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disablePlaceholder as St,enablePlaceholder as Ft,MouseObserver as _0x5ae565}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 _0x2e9390}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x5a1464}from'@ckeditor/ckeditor5-widget/dist/index.js';class Ct extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x4ba4c4(){['model'];['view'];constructor(_0x9dc451,_0x26e615){super(),this['model']=_0x9dc451,this['model']['_isAttached']=!0x0,this['view']=_0x26e615,this['listenTo'](_0x26e615,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x26e615,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x26e615,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x26e615,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x26e615,'addComment',(_0x2c3c6b,_0x403b73)=>this['addComment'](_0x403b73)),this['listenTo'](_0x26e615,'updateComment',(_0x19e849,_0xbb4cdb,_0x1d8484)=>this['updateComment'](_0xbb4cdb,_0x1d8484)),this['listenTo'](_0x26e615,'removeComment',(_0x3aa47b,_0x222367)=>this['removeComment'](_0x222367));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x5ea202){this['model']['addComment']({'content':_0x5ea202,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x3215e4,_0x1070ef){this['model']['getComment'](_0x3215e4)['update']({'content':_0x1070ef});}['removeComment'](_0x2164a6){this['model']['getComment'](_0x2164a6)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function E(_0xd028b4,_0x5d32b2,_0x36e9a7){const t=_0xd028b4['t'];switch(_0x5d32b2){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'},_0x36e9a7);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'},_0x36e9a7);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'},_0x36e9a7);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'},_0x36e9a7);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x36e9a7);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'},_0x36e9a7);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'},_0x36e9a7);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'},_0x36e9a7);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(_0x5645a0,_0x238a73){super(_0x5645a0);const _0x3d188b=_0x5d5a44();this['main']=this['createCollection'](),this['editable']=new $t(_0x5645a0,_0x238a73,void 0x0,{'label':()=>E(_0x5645a0,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x5645a0['uiLanguageDirection'],'lang':_0x5645a0['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x3d188b},'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(_0x10c336){super(_0x10c336),this['view']=new Ut(_0x10c336['locale'],_0x10c336['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x53288a=this['editor']['editing']['view'],_0x37e5e2=this['view']['editable'],_0x51e5fc=_0x53288a['document']['getRoot']();_0x37e5e2['name']=_0x51e5fc['rootName'],this['view']['render']();const _0x4d898a=_0x37e5e2['element'];this['setEditableElement'](_0x37e5e2['name'],_0x4d898a),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x53288a['attachDomRoot'](_0x4d898a),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Nt=[qt,zt,Bt,Et,Gt,Jt,Kt];class Qt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x4ba4c4(_0x5704e9){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Nt)());constructor(_0x556d29={}){function _0x2614d3(_0x1ef7ea){return _0x1ef7ea['map'](_0x35ff00=>String['fromCharCode'](_0x35ff00))['join']('');}(_0x556d29=Object['assign']({},_0x556d29))['plugins']||(_0x556d29['plugins']=Qt['defaultPlugins']),super(_0x556d29),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[_0x2614d3([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2614d3([0x76,0x69,0x65,0x77])][_0x2614d3([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2614d3([0x61,0x75,0x74,0x6f]),this[_0x2614d3([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x2614d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2614d3([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x2614d3([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x2614d3([0x6f,0x6b])});}['create'](){const _0x4c330a=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x4c330a))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x3429d6=>{const _0x4f5f5a=this['model']['document']['getRoot'](),_0x3bc900=_0x4f5f5a&&_0x4f5f5a['getChild'](_0x4f5f5a['childCount']-0x1);_0x3429d6['setSelection'](_0x3bc900,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x194915=this['editing']['view'],_0x9a827a=_0x194915['document']['getRoot'](),_0x2e83d1=_0x9a827a['getChild'](0x0);_0x9a827a['childCount']>0x1||!_0x2e83d1||'p'!=_0x2e83d1['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x194915,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x2e83d1['placeholder']=this['placeholder']),Ft({'view':_0x194915,'element':_0x2e83d1,'keepOnFocus':!0x0}),this['placeholderElement']=_0x2e83d1);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x4efe4b,_0x401cfa={}){super(_0x4efe4b),this['editor']=null,this['_editorConfig']=_0x401cfa,this['set']('value',_0x401cfa['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',E(_0x4efe4b,'Reply...')),this['set']('submitLabel',E(_0x4efe4b,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x1096d1(),this['focusCycler']=new _0x47bf62({'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',(_0x32888a,_0x20abd7)=>{this['cancelButtonView']['fire']('execute'),_0x20abd7();}),this['keystrokes']['set']('Ctrl+Enter',(_0x147e27,_0x13b459)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x13b459());}),this['on']('submit',(_0x84586c,_0x22883d)=>{_0x22883d['length']>0xfde8?(alert(E(_0x4efe4b,'TOO_LONG_COMMENT_ALERT',[_0x22883d['length'],0xfde8])),_0x84586c['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 _0x20821a=this['editor'];this['element']['insertBefore'](_0x20821a['ui']['element'],this['element']['firstChild']),_0x20821a['model']['document']['on']('change',()=>this['value']=_0x20821a['getData']()),_0x20821a['bind']('placeholder')['to'](this),this['focusables']['add'](_0x20821a['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x54e363){-0x1===_0x54e363?(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:_0x3395d9}=this,_0xa80d9f=new _0x59b830(_0x3395d9);return _0xa80d9f['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0xa80d9f['withText']=!0x0,_0xa80d9f['bind']('label')['to'](this,'submitLabel'),_0xa80d9f['on']('execute',()=>{this['fire']('submit',this['value']);}),_0xa80d9f['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0xc7f54b,_0x3c6910)=>!_0x3c6910&&!!_0xc7f54b['trim']()),_0xa80d9f;}['_createCancelButton'](){const {locale:_0x381eee}=this,_0x4af9b7=new _0x59b830(_0x381eee);return _0x4af9b7['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x4af9b7['label']=E(_0x381eee,'Cancel'),_0x4af9b7['withText']=!0x0,_0x4af9b7['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x4af9b7;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x565959=>{this['focusTracker']['add'](_0x565959['element']);}),this['focusables']['on']('change',(_0x4d9510,_0x37607b)=>{for(const _0x4309ea of Array['from'](_0x37607b['added'])['reverse']())this['focusTracker']['add'](_0x4309ea['element']);});}}class ie extends kt{constructor(_0x3fbd80,_0x568d09,_0x53722a){super(_0x3fbd80),this['commentInputView']=new os(_0x3fbd80,_0x53722a),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x54bf95,_0x6a836)=>_0x54bf95||!!_0x6a836),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 _0x1d38bf(_0x3fbd80,_0x568d09),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'](_0x3fc296){this['commentInputView']['focus'](_0x3fc296);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x2f6feb,_0x485acd)=>{const {submitButtonView:_0x2fd272,cancelButtonView:_0x2a6dde,editor:_0x12e7f4}=this['commentInputView'];[_0x2fd272['element'],_0x2a6dde['element'],_0x12e7f4?_0x12e7f4['editing']['view']['getDomRoot']():null]['filter'](_0x185512=>_0x185512)['some'](_0xafc9fb=>_0xafc9fb['contains'](_0x485acd['target']))||(this['focus'](),_0x485acd['preventDefault']());});}}class cs extends kt{constructor(_0x370f12){super(_0x370f12);const _0x5a0805=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x5a0805['to']('count',_0x771645=>E(_0x370f12,'NUMBER_OF_COMMENTS',_0x771645))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x10c0ce,_0x1326f3,_0x3d32bb){super(_0x10c0ce);const _0x1c3587=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x1326f3['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x1326f3,this['_config']=_0x3d32bb,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x1096d1(),this['keystrokes']=new jt(),this['focusCycler']=new _0x47bf62({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3b3bcb=>this['commentViews']['map'](_0x55f86e=>_0x55f86e['element'])['includes'](_0x3b3bcb['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x10c0ce),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x9cef50=>_0x9cef50-this['_config']['maxCommentsWhenCollapsed']);for(const _0x1502d5 of _0x1326f3['comments'])this['_handleNewCommentModel'](_0x1502d5);this['_handleInfoComment'](),this['listenTo'](_0x1326f3['comments'],'add',(_0x13f44e,_0x3df86d)=>{const _0x2def6d=this['_calculatePosition'](_0x3df86d);this['length']++,this['_handleNewCommentModel'](_0x3df86d,_0x2def6d),this['refreshVisibleViews']();}),this['listenTo'](_0x1326f3['comments'],'remove',(_0x2292ce,_0x5eb3af)=>{this['length']--,this['_handleRemoveCommentModel'](_0x5eb3af),this['refreshVisibleViews']();}),this['listenTo'](_0x1326f3,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x1326f3,'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',_0x1c3587['if']('length','ck-hidden',_0x51e776=>!_0x51e776)],'aria-label':E(_0x10c0ce,'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'](_0x55e5c2){-0x1===_0x55e5c2?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x4da7e5 of this['commentViews'])_0x4da7e5['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x7d8bf9,_0x4a24c8){const _0x4625b2=new this['_config']['CommentView'](this['locale'],_0x7d8bf9,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x4625b2['viewUid']=_0x7d8bf9['id'],_0x4625b2['delegate']('removeComment')['to'](this),_0x4625b2['delegate']('updateComment')['to'](this),_0x4625b2['delegate']('resolveCommentThread')['to'](this),_0x4625b2['delegate']('editorReady')['to'](this),_0x4625b2['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x4625b2,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x4625b2,_0x4a24c8);}['_calculatePosition'](_0x246a7c){const _0x399d8d=this['_model']['_findOptimalIndex'](_0x246a7c);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x246a7c['authoredAt']?_0x399d8d-0x1:_0x399d8d:_0x399d8d-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x486f87={'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'],_0x486f87,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x486f87));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x110403){const _0x393fbf=this['commentViews']['remove'](_0x110403['id']);this['stopListening'](_0x393fbf),_0x393fbf['isEditMode']&&this['_updateHasDirtyComment'](),_0x393fbf['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x5d3d95=>_0x5d3d95['isEditMode']);}['_rearrangeCollapse'](){const _0x5d5131=function(_0x5954e2){const _0x2e208b=new _0x321144();for(const _0x1b17dd of _0x5954e2)_0x2e208b['add'](_0x1b17dd);return _0x2e208b;}(this['commentViews']),_0x3d237c=this['_collapsedCommentsView']['count'];for(let _0x369c6b=0x1;_0x369c6b<=_0x3d237c;_0x369c6b++)_0x5d5131['remove'](0x1);for(const _0x1ef892 of _0x5d5131)_0x1ef892['collapse']();_0x3d237c>0x0&&_0x5d5131['add'](this['_collapsedCommentsView'],0x1),ns(_0x4dd938(Array['from'](this['visibleViews']),Array['from'](_0x5d5131)),this['visibleViews'],_0x5d5131);}['_rearrangeExpand'](){ns(_0x4dd938(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0xef8800 of this['visibleViews'])_0xef8800['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x2afb1f=>{this['focusTracker']['add'](_0x2afb1f['element']),this['keystrokes']['listenTo'](_0x2afb1f['element']);}),this['commentViews']['on']('change',(_0x42c38e,_0x5030a3)=>{for(const _0x484b71 of _0x5030a3['removed'])this['focusTracker']['remove'](_0x484b71['element']),this['keystrokes']['stopListening'](_0x484b71['element']);for(const _0x5db739 of Array['from'](_0x5030a3['added'])['reverse']())this['focusTracker']['add'](_0x5db739['element']),this['keystrokes']['listenTo'](_0x5db739['element']);});}}function ns(_0x375f4a,_0x175e55,_0x5ee58f){let _0xb02d07=0x0;for(const _0x360349 of _0x375f4a)switch(_0x360349){case'insert':_0x175e55['add'](_0x5ee58f['get'](_0xb02d07),_0xb02d07),_0xb02d07++;break;case'delete':_0x175e55['remove'](_0xb02d07);break;case'equal':_0xb02d07++;}}class as extends kt{constructor(_0x341f7f){super(_0x341f7f);const _0x2ad221=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x2ad221['to']('contextValue',_0x480f7e=>E(_0x341f7f,'THREAD_CONTEXT_LABEL',_0x480f7e)),'tabindex':-0x1},'children':[{'text':_0x2ad221['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5b4a18,_0x49cc57){super(_0x5b4a18);const _0x524c72=this['bindTemplate'];this['_model']=_0x49cc57,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x1096d1(),this['keystrokes']=new jt(),this['focusCycler']=new _0x47bf62({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x1e1a19=>!!_0x1e1a19),this['bind']('contextValue')['to'](this['_model'],'context',_0x2b48ec=>_0x2b48ec&&_0x2b48ec['value']?this['_trimContextValue'](_0x2b48ec['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',_0x524c72['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 _0x546a9b=new _0x59b830(this['locale']);return _0x546a9b['label']=E(this['locale'],'Reopen'),_0x546a9b['tooltip']=E(this['locale'],'Reopen'),_0x546a9b['icon']=_0x8344d6,_0x546a9b['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x31c7b4=>!_0x31c7b4),_0x546a9b['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x141872,_0x2d0e14)=>_0x141872&&_0x2d0e14),_0x546a9b['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x546a9b;}['_trimContextValue'](_0x2fb2dd){if(_0x2fb2dd['length']<0x96)return _0x2fb2dd;const _0x3c82dd=_0x2fb2dd['lastIndexOf']('\x20',0x93);return _0x2fb2dd['substring'](0x0,_0x3c82dd>-0x1?_0x3c82dd:0x93)+'...';}['_attachContextActions'](){const _0x4831d9=this['element']['querySelector']('.ck-context'),_0x1e44c6=_0x4831d9['querySelector']('.ck-context__value');this['listenTo'](_0x4831d9,'mouseenter',()=>{_0x1e44c6['offsetWidth']<_0x1e44c6['scrollWidth']&&_0x4831d9['classList']['add']('overlay');}),this['listenTo'](_0x4831d9,'mouseleave',()=>{_0x4831d9['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x31501d of this['focusables'])this['focusTracker']['add'](_0x31501d['element']),this['keystrokes']['listenTo'](_0x31501d['element']);}['_createContextView'](){const _0x5c41a8=new as(this['locale']);return _0x5c41a8['bind']('contextValue')['to'](this),_0x5c41a8;}}class ts extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5ae181,_0x364805,_0x407b31,_0x342901){super(_0x5ae181),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x364805,this['_localUser']=_0x407b31,this['_config']=_0x342901,this['commentThreadHeaderView']=new Xt(_0x5ae181,_0x364805),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x5ae181,E(_0x5ae181,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x5ae181,_0x364805,Object['assign']({'CommentView':this['_config']['CommentView']},_0x342901)),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',(_0x3c2ef2,_0x1c7369)=>_0x3c2ef2||!!_0x1c7369),this['bind']('isUnlinked')['to'](_0x364805,'unlinkedAt',_0x286d65=>!!_0x286d65),this['bind']('ariaLabel')['to'](this,'length',_0x27649a=>{const _0x39036a=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return E(this['locale'],'COMMENT_THREAD_LABEL',[_0x27649a,_0x39036a]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x1096d1(),this['keystrokes']=new jt(),this['focusCycler']=new _0x47bf62({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x569379=>_0x569379['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 _0x15ccc5=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x2c24ff=_0x15ccc5['commentInputView'];return _0x15ccc5['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x2c24ff,'value',(_0x7c8604,_0x455827,_0x3ebcfd,_0x22e6e2,_0x2bd02b)=>!!_0x2bd02b||!!_0x22e6e2&&_0x3ebcfd&&!_0x455827||_0x7c8604&&_0x3ebcfd&&!_0x455827),_0x2c24ff['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x5b4dca,_0x55034f,_0x322618)=>{let _0x19d79e;return _0x19d79e=_0x322618&&_0x55034f?'Reply\x20to\x20reopen\x20discussion...':_0x5b4dca?'Reply...':'Write\x20a\x20comment...',E(this['locale'],_0x19d79e);}),_0x2c24ff['bind']('submitLabel')['to'](this,'length',_0x55c847=>E(this['locale'],_0x55c847?'Reply':'Comment')),_0x2c24ff['on']('submit',(_0x2c0c15,_0x3daca1)=>{this['fire']('addComment',_0x3daca1),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x2c24ff['on']('cancel',()=>{this['focus']();}),_0x2c24ff['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x2c24ff['on']('cancel',_0x17032a=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x17032a['stop']());}),this['on']('change:isActive',(_0x2a414c,_0x5d5d2f,_0x2be633)=>{_0x2be633||this['length']||_0x2c24ff['value']||this['fire']('removeCommentThread');}),_0x15ccc5;}}class vt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(ts){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x2896e3,_0x43f025,_0x103740,_0x313e6c){super(_0x2896e3,_0x43f025,_0x103740,_0x313e6c),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x2896e3,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x43c847,_0x3461fd,_0x211eba)=>{_0x211eba||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x23c60b,_0x5067de,_0x5977fe)=>{_0x5977fe&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x4b20d9=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x4b20d9['if']('isActive','ck-thread--active'),_0x4b20d9['if']('isUnlinked','ck-thread--unlinked'),_0x4b20d9['if']('isConfirm','ck-thread--remove-confirmation'),_0x4b20d9['to']('actionIndicator',_0x22fdb7=>_0x22fdb7?'ck-thread--'+_0x22fdb7:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x4b20d9['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 _0x4f5afb of this['commentsListView']['commentViews'])_0x4f5afb['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x7b250b}=this,_0x114534=this['commentsListView']['commentViews']['get'](0x0);_0x114534===this['_boundFirstCommentView']||_0x114534['isSystemComment']||(this['_boundFirstCommentView']=_0x114534,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x114534,'actionIndicator',_0x1f6723=>'remove'===_0x1f6723?'remove':null),_0x114534['placeholder']=E(_0x7b250b,'Write\x20a\x20comment...'),_0x114534['removeButton']['on']('execute',_0x694431=>{_0x694431['stop'](),this['showConfirm'](E(_0x7b250b,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x114534['focus']();}),_0x114534['actionBar']['add'](this['resolveButton'],0x0),_0x114534['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x3cfff4=new _0xebfec6(this['locale']);return _0x3cfff4['label']=E(this['locale'],'Resolve'),_0x3cfff4['tooltip']=E(this['locale'],'Resolve'),_0x3cfff4['icon']=_0x4fd30b,_0x3cfff4['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x3cfff4['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0xb820ba=>!_0xb820ba),_0x3cfff4['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x50f11e,_0x4cfd88)=>_0x50f11e&&!_0x4cfd88),_0x3cfff4['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x3cfff4;}['_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(_0x5494be){super(_0x5494be),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x145acd,_0x1e6b9a,_0x41b06b)=>{this['element']['innerHTML']=_0x41b06b;}),this['element']['innerHTML']=this['content'];}}class hs extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x376513,_0x465b3d,_0xb37e9){super(_0x376513),this['_model']=_0x465b3d,this['_config']=_0xb37e9,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x465b3d,'content',_0x465b3d,'authoredAt',(_0x2d5f5b,_0x3e5fec)=>E(_0x376513,'COMMENT_ARIA_LABEL',[_0x465b3d['author']['name'],_0xb37e9['formatDateTime'](_0x3e5fec),new DOMParser()['parseFromString'](_0x2d5f5b,'text/html')['body']['textContent'],_0x465b3d['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x376513,E(_0x376513,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x265dd7(),this['focusTracker']=new _0x1096d1(),this['keystrokes']=new jt(),this['focusCycler']=new _0x47bf62({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3b0d89=>_0x3b0d89['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 _0x3b8b9a=new es(this['locale']);return _0x3b8b9a['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x550c51,_0x2774ec)=>_0x2774ec?_0x4181a6(_0x550c51,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x550c51),_0x3b8b9a;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x316c9d=new os(this['locale'],this['_config']['editorConfig']);return _0x316c9d['value']=this['_model']['content'],_0x316c9d['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x316c9d['submitLabel']=E(this['locale'],'Save'),_0x316c9d['on']('submit',(_0x4154b5,_0x35d880)=>{this['fire']('updateComment',this['_model']['id'],_0x35d880),this['switchToDisplayMode'](),this['focus']();}),_0x316c9d['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x316c9d['once']('editorReady',()=>{_0x316c9d['focus']();}),_0x316c9d['createEditor'](),_0x316c9d['delegate']('editorReady')['to'](this),_0x316c9d['delegate']('editorDestroyed')['to'](this),_0x316c9d;}['_setupKeyboardNavigation'](){const _0x1b59d9=this['element'];this['keystrokes']['listenTo'](_0x1b59d9);for(const _0x2b7135 of this['focusables'])this['focusTracker']['add'](_0x2b7135['element']),this['keystrokes']['listenTo'](_0x2b7135['element']);this['focusables']['on']('change',(_0x3b4648,_0x1fc617)=>{for(const _0x28dd8b of _0x1fc617['removed'])this['focusTracker']['remove'](_0x28dd8b['element']),this['keystrokes']['stopListening'](_0x28dd8b['element']);for(const _0x326177 of _0x1fc617['added'])this['focusTracker']['add'](_0x326177['element']),this['keystrokes']['listenTo'](_0x326177['element']);}),this['keystrokes']['set']('enter',(_0x5627aa,_0x303d72)=>{_0x1b59d9===_0x5627aa['target']&&(this['focusCycler']['focusFirst'](),_0x303d72());}),this['keystrokes']['set']('esc',(_0xb0d823,_0x40e616)=>{_0x1b59d9!==_0xb0d823['target']&&(this['focus'](),_0x40e616());});}}class gt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(hs){['actionBar'];['userView'];constructor(_0x129d04,_0x2e52f6,_0x4271ea){super(_0x129d04,_0x2e52f6,_0x4271ea),this['set']('actionIndicator',null),this['set']('placeholder',E(_0x129d04,'Reply...')),this['bind']('authoredAt')['to'](_0x2e52f6),this['bind']('resolvedAt')['to'](_0x2e52f6),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 _0x1d38bf(_0x129d04,_0x2e52f6['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x2e52f6,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x49be58=this['bindTemplate'],_0x451d69=[{'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':_0x49be58['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x49be58['to']('authoredAt',_0x26fa73=>this['_config']['formatDateTime'](_0x26fa73))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x49be58['if']('isEditMode','ck-comment__actions--hidden'),_0x49be58['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']&&_0x451d69['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x49be58['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x49be58['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x49be58['if']('isEditMode','ck-comment--edit'),_0x49be58['if']('isSystemComment','ck-comment--info'),_0x49be58['to']('actionIndicator',_0x3b4543=>_0x3b4543?'ck-comment--'+_0x3b4543:'')],'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':_0x451d69}]}]};}['_createEditButton'](){const _0x51cfa7=new _0x59b830(this['locale']);return _0x51cfa7['label']=E(this['locale'],'Edit'),_0x51cfa7['icon']=_0x311751,_0x51cfa7['withText']=!0x0,_0x51cfa7['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x51cfa7['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x441b55=>!_0x441b55),_0x51cfa7['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x51cfa7['on']('execute',()=>this['switchToEditMode']()),_0x51cfa7;}['_createRemoveButton'](){const _0x27d31e=new _0x59b830(this['locale']);return _0x27d31e['label']=E(this['locale'],'Remove'),_0x27d31e['icon']=_0x441e28,_0x27d31e['withText']=!0x0,_0x27d31e['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x27d31e['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1d90a9=>!_0x1d90a9),_0x27d31e['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x27d31e['on']('execute',()=>{this['showConfirm'](E(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x27d31e;}['_createDropdown'](){const _0x297e6e=_0x7c791f(this['locale'],_0x5dd4b3),_0x31f6a4=_0x297e6e['panelView']['children'],_0x3de4c6=new _0x55a164(this['locale']),_0x3e5b80=_0x297e6e['bindTemplate'];_0x319f16(_0x297e6e,()=>this['items']['find'](_0x3b6a81=>_0x3b6a81['isVisible'])),_0x297e6e['extendTemplate']({'attributes':{'class':[_0x3e5b80['if']('isVisible','ck-hidden',_0xd946a9=>!_0xd946a9)]}});const _0x57f3a5=(_0x527395,_0x25f071=-0x1)=>{const _0x51f4cf=new _0x21f179(this['locale']);_0x51f4cf['children']['add'](_0x527395);const _0x4f8cf9=_0x25f071>-0x1?_0x25f071:_0x3de4c6['items']['length'];_0x3de4c6['items']['add'](_0x51f4cf,_0x4f8cf9);const _0x45f3a8=Array['from'](this['items']);_0x297e6e['unbind']('isEnabled','isVisible'),_0x297e6e['bind']('isEnabled')['toMany'](_0x45f3a8,'isEnabled',(..._0x1b461e)=>_0x1b461e['some'](_0x40118f=>_0x40118f)),_0x297e6e['bind']('isVisible')['toMany'](_0x45f3a8,'isVisible',(..._0x1f3b19)=>_0x1f3b19['some'](_0x54e16a=>_0x54e16a));};_0x297e6e['panelPosition']='sw',_0x297e6e['buttonView']['set']({'label':E(this['locale'],'Show\x20more\x20items'),'icon':_0xa59250});for(const _0x16635c of this['items'])_0x57f3a5(_0x16635c);return _0x31f6a4['add'](_0x3de4c6),_0x297e6e['listenTo'](this['items'],'add',(_0x2fb7b1,_0xd6ca1b,_0x38870d)=>{_0x57f3a5(_0xd6ca1b,_0x38870d);}),_0x297e6e['listenTo'](this['items'],'remove',(_0x5235a3,_0x48f961,_0x31b697)=>{_0x3de4c6['items']['remove'](_0x31b697);}),_0x297e6e;}['_attachActions'](_0x25d86e,_0x20f2c5){const _0x78f6ee=_0x25d86e&&_0x25d86e['element'];_0x78f6ee&&(this['listenTo'](_0x78f6ee,'mouseenter',()=>this['actionIndicator']=_0x20f2c5),this['listenTo'](_0x78f6ee,'focus',()=>this['actionIndicator']=_0x20f2c5),this['listenTo'](_0x78f6ee,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x78f6ee,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x5f5bff=super['_createCommentInputView']();return _0x5f5bff['bind']('placeholder')['to'](this),_0x5f5bff;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Lt(_0x1c09a2){const _0x36af95=Dt(_0x1c09a2,0x1e),_0x591648=new MutationObserver(_0x32b73e=>{for(const _0x1da23e of _0x32b73e)('attributes'==_0x1da23e['type']&&'class'==_0x1da23e['attributeName']||'childList'==_0x1da23e['type']||'characterData'==_0x1da23e['type'])&&_0x36af95();});return{'attach'(_0xb66d17){_0x591648['observe'](_0xb66d17,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x591648['disconnect'](),_0x36af95['cancel']();}};}class S extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x40daa9,_0x4b74c5){super(_0x40daa9),this['id']=_0x5d5a44(),this['focusTracker']=new _0x1096d1(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x3dbeb0,_0x2d3e4a)=>this['fire']('Esc',_0x2d3e4a)),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'](_0x4b74c5),this['mainView']=_0x4b74c5;const _0x20be29=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x20be29['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 _0x52da8b=this['element']['clientHeight'];_0x52da8b&&(this['height']=_0x52da8b);}}class d extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x4ba4c4(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x1be5c7,target:_0x792421,type:_0x399fa6,isVisible:_0x120e10=!0x0}){super(),this['view']=_0x1be5c7,this['view']['element']||this['view']['render'](),this['_type']=_0x399fa6,this['_target']=_0x792421,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x321144([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x1ff7eb,_0x106317)=>{this['view']['focusTracker']['add'](_0x106317);}),this['focusableElements']['on']('remove',(_0x19c681,_0x465417)=>{this['view']['focusTracker']['remove'](_0x465417);}),this['set']('isVisible',_0x120e10);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x33d075=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x33d075),_0x33d075;}get['targetRect'](){const _0x242e36=this['target'];if(null===_0x242e36)return null;if(_0x242e36 instanceof _0x212c58)return _0x242e36;const _0x44b818=_0x242e36['filter'](_0x5086b9=>function(_0x4f31a5){const _0x2f8ee3=_0x4f31a5['offsetParent'];if(_0x2f8ee3)return!0x0;const _0x21f532=_0x4f31a5['getClientRects']()['item'](0x0);return!!_0x21f532;}(_0x5086b9));return 0x0===_0x44b818['length']?null:new _0x212c58(_0x44b818[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x45af8a){this['view']['isActive']=_0x45af8a,this['view']['mainView']['isActive']=_0x45af8a;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x9a4f89){if(!(null===_0x9a4f89||_0x9a4f89 instanceof _0x212c58||Array['isArray'](_0x9a4f89)&&_0x9a4f89['every'](_0xd928bd=>li(_0xd928bd))))throw new _0x5bf711('annotation-invalid-target',null,{'target':_0x9a4f89});}['_getNormalizedTarget'](){const _0x3f9b13='function'==typeof this['_target']?this['_target']():this['_target'];return li(_0x3f9b13)?[_0x3f9b13]:_0x3f9b13;}}function li(_0x30d5a4){return null!==_0x30d5a4&&'object'==typeof _0x30d5a4&&'nodeType'in _0x30d5a4&&0x1===_0x30d5a4['nodeType'];}class _ extends _0x321144{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x12687f=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x1096d1(),this['_focusTracker']['on']('change:isFocused',(_0x289e60,_0x263286,_0x24b4c6)=>{_0x24b4c6||this['fire']('blur');});for(const _0x30502a of _0x12687f)this['add'](_0x30502a);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x4ab441){if(this['has'](_0x4ab441))throw new _0x5bf711('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x4ab441['innerView'],_0x4ab441),this['_viewToAnnotation']['set'](_0x4ab441['view'],_0x4ab441);for(const _0x486f6d of _0x4ab441['focusableElements'])this['_focusTracker']['add'](_0x486f6d);this['listenTo'](_0x4ab441['focusableElements'],'add',(_0x529eaa,_0x1f426e)=>{this['_focusTracker']['add'](_0x1f426e);}),this['listenTo'](_0x4ab441['focusableElements'],'remove',(_0x262591,_0x29524d)=>{this['_focusTracker']['remove'](_0x29524d);}),this['listenTo'](_0x4ab441['view']['focusTracker'],'change:isFocused',(_0x4091f2,_0x2a03e3,_0x124772)=>{_0x124772&&this['fire']('focus',_0x4ab441);}),_0x4ab441['updateTargetRect']();const _0x50d125=this['_getOrderInContent'](_0x4ab441['view']['targetRect']);return super['add'](_0x4ab441,_0x50d125);}['remove'](_0x1a8c84){if(!this['has'](_0x1a8c84))throw new _0x5bf711('annotationcollection-not-existing-item',null);this['stopListening'](_0x1a8c84['view']['focusTracker']),this['stopListening'](_0x1a8c84['focusableElements']);for(const _0x1087a9 of _0x1a8c84['focusableElements'])this['_focusTracker']['remove'](_0x1087a9);return this['_viewToAnnotation']['delete'](_0x1a8c84['view']),this['_innerViewToAnnotation']['delete'](_0x1a8c84['innerView']),super['remove'](_0x1a8c84);}['getByInnerView'](_0x24dd6a){return this['_innerViewToAnnotation']['get'](_0x24dd6a);}['getByView'](_0x56e8a1){return this['_viewToAnnotation']['get'](_0x56e8a1);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x10ab1c of this)_0x10ab1c['updateTargetRect']();this['_sort']();}['_sort'](){const _0x23b76c=Array['from'](this)['sort']((_0x12698a,_0x3a668d)=>v(_0x12698a['view']['targetRect'],_0x3a668d['view']['targetRect']));for(let _0x3f296f=_0x23b76c['length']-0x1;_0x3f296f>0x0;_0x3f296f--){const _0x5cc1cb=_0x23b76c[_0x3f296f];_0x3f296f!==this['getIndex'](_0x5cc1cb)&&(this['remove'](_0x5cc1cb),this['add'](_0x5cc1cb));}}['_getOrderInContent'](_0x349420){let _0x4fa541=0x0;if(!_0x349420)return this['length'];for(const _0x3836b6 of this){const _0x3b5fb2=_0x3836b6['view']['targetRect'];if(_0x3b5fb2){if(v(_0x349420,_0x3b5fb2)<0x0)return _0x4fa541;_0x4fa541++;}}return _0x4fa541;}}function v(_0x4d9723,_0x3c214b){if(null===_0x4d9723&&null===_0x3c214b)return 0x0;if(null===_0x4d9723)return-0x1;if(null===_0x3c214b)return 0x1;const _0x27a047=_0x4d9723['top']-_0x3c214b['top'];return 0x0==_0x27a047?_0x4d9723['left']-_0x3c214b['left']:_0x27a047;}class O extends _0x27e7bc{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x363493){if(super(_0x363493),this['collection']=new _(),this['_visibleAnnotations']=new _(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x363493 instanceof _0x5704e9){const _0x58cd25=_0x363493['locale'];_0x363493['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':E(_0x58cd25,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':E(_0x58cd25,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':E(_0x58cd25,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':E(_0x58cd25,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':E(_0x58cd25,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':E(_0x58cd25,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':E(_0x58cd25,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x4c6c11){this['collection']['add'](_0x4c6c11);}['remove'](_0x153640){this['collection']['remove'](_0x153640),_0x153640['destroy']();}['refreshVisibility'](){for(const _0x596445 of this['collection'])_0x596445['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x2e18f6){return this['collection']['getByInnerView'](_0x2e18f6);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x43890e of this['collection'])_0x43890e['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x297df8){this['fire']('_activateAnnotation',_0x297df8);}['createAnnotation'](_0x4b386e){return new d(_0x4b386e);}['createAnnotationView'](_0x3ebc22,_0x1a62d7){return new S(_0x3ebc22,_0x1a62d7);}['_addActiveAnnotation'](_0x4b4b39){const _0x199fe5=new Set(this['activeAnnotations']);_0x199fe5['add'](_0x4b4b39),this['activeAnnotations']=_0x199fe5;}['_removeActiveAnnotation'](_0x35cd3b){const _0x2a87b9=new Set(this['activeAnnotations']);_0x2a87b9['delete'](_0x35cd3b),this['activeAnnotations']=_0x2a87b9;}['_bindAnnotationsToVisibleAnnotations'](){const _0x4f4d58=this['collection'],_0x238ed9=this['_visibleAnnotations'];function _0x2198a9(_0x40c2b9){const _0x595bdc=_0x40c2b9['source'];_0x595bdc['isVisible']&&!_0x238ed9['has'](_0x595bdc)?_0x238ed9['add'](_0x595bdc):!_0x595bdc['isVisible']&&_0x238ed9['has'](_0x595bdc)&&_0x238ed9['remove'](_0x595bdc),_0x595bdc['view']['focusTracker']['remove'](_0x595bdc['view']['element']),_0x595bdc['view']['focusTracker']['add'](_0x595bdc['view']['element']);}this['listenTo'](_0x4f4d58,'add',(_0x599ea0,_0x5ec638)=>{_0x5ec638['isVisible']&&_0x238ed9['add'](_0x5ec638),this['listenTo'](_0x5ec638,'change:isVisible',_0x2198a9);}),this['listenTo'](_0x4f4d58,'remove',(_0x593589,_0x4b9bf2)=>{_0x238ed9['has'](_0x4b9bf2)&&_0x238ed9['remove'](_0x4b9bf2),this['stopListening'](_0x4b9bf2,'change:isVisible',_0x2198a9);});}['_setupEnterAnnotationKeystroke'](){const _0x59fb4a=_0x999a79=>{_0x999a79['on']('ready',()=>{_0x999a79['keystrokes']['set'](_0x2e9390,(_0x358c7c,_0x487831)=>{const _0x29eea4=_0x1ab4c8(this['activeAnnotations']['values']());_0x29eea4&&(_0x29eea4['view']['focus'](),_0x487831());});});};this['context']instanceof _0x5704e9?_0x59fb4a(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x19c897,_0x43b734)=>{_0x59fb4a(_0x43b734);});}['_setupEscapeAnnotationHandling'](){const _0x173e8c=_0x352d8f=>{const _0xa62ced=_0x352d8f['source'],_0x3010e6=[];let _0x1115e8;if(Array['isArray'](_0xa62ced['target'])){_0x1115e8=_0xa62ced['target'][0x0],this['context']instanceof _0x5704e9?_0x3010e6['push'](this['context']):this['context']['editors']&&_0x3010e6['push'](...this['context']['editors']);for(const _0x19fa9a of _0x3010e6)for(const _0x2589f4 of _0x19fa9a['editing']['view']['domRoots']['values']())if(_0x2589f4['contains'](_0x1115e8))return void _0x19fa9a['editing']['view']['focus']();_0x1115e8['focus']();}};this['listenTo'](this['collection'],'add',(_0xd4e594,_0xda7164)=>{this['listenTo'](_0xda7164,'escape',_0x173e8c,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x5d57ea,_0xb116ba)=>{this['stopListening'](_0xb116ba,'escape',_0x173e8c);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x27e7bc{['_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(_0x1c1c8b){super(_0x1c1c8b),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x2c1cf5=this['context']['config'];_0x2c1cf5['define']('comments.maxCommentsWhenCollapsed',0x2),_0x2c1cf5['define']('comments.maxThreadTotalWeight',0x1f4),_0x2c1cf5['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x2c1cf5['define']('comments.CommentThreadView',vt),_0x2c1cf5['define']('comments.CommentView',gt),_0x2c1cf5['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0xcad046=this['context']['plugins']['get'](O);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0xd6960a,_0x2a85bf)=>this['_addCommentThread'](_0x2a85bf)),this['on']('submitCommentThread',(_0x57bde1,_0x22bf77)=>this['_submitCommentThread'](_0x22bf77)),this['on']('resolveCommentThread',(_0x84a97b,_0x2449aa)=>this['_resolveCommentThread'](_0x2449aa)),this['on']('resolveCommentThread',(_0x4f475a,_0xbf85b)=>this['_updateActiveAnnotation'](_0xbf85b),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0xb92d44,_0x55998c)=>this['_reopenCommentThread'](_0x55998c)),this['on']('reopenCommentThread',(_0x48ff28,_0x251a87)=>this['_updateActiveAnnotation'](_0x251a87),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x15068c,_0x11656c)=>this['_removeCommentThread'](_0x11656c)),this['on']('updateCommentThread',(_0x441303,_0x23d6ff)=>this['_updateCommentThread'](_0x23d6ff)),this['on']('updateCommentThread',(_0x3015a9,_0x206d97)=>this['_updateActiveAnnotation'](_0x206d97),{'priority':'lowest'}),this['on']('addComment',(_0x512d64,_0x46d447)=>this['_addComment'](_0x46d447)),this['on']('updateComment',(_0x30279a,_0x4c2caf)=>this['_updateComment'](_0x4c2caf)),this['on']('removeComment',(_0x54fdce,_0x2e667c)=>this['_removeComment'](_0x2e667c)),this['on']('addComment',(_0x5cda80,{threadId:_0x1e27b1,isFromAdapter:_0x9569b6})=>{if(_0x9569b6)return;const _0x1cdf89=this['getCommentThread'](_0x1e27b1),_0x2e691a=_0x1cdf89&&this['_threadToController']['get'](_0x1cdf89);_0x2e691a&&_0x2e691a['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0xcad046,'change:activeAnnotations',(_0x2cb45c,_0x370757,_0x36a5e5)=>{const _0x37b041=Array['from'](_0x36a5e5)['map'](_0x54750e=>this['_viewToController']['get'](_0x54750e['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x37b041?_0x37b041['model']:null;});}set['adapter'](_0x39b614){if(this['_adapter'])throw new _0x5bf711('commentsrepository-adapter-already-set');this['_adapter']=_0x39b614;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x40ece2=Tt,threadId:_0x2a59e8=_0x5d5a44(),comments:_0x2a8335=[],unlinkedAt:_0xbb2c81=null,resolvedAt:_0x5ec783=null,resolvedBy:_0x2dd005=null,target:_0x444ee9=null,context:_0x16fea7=null,attributes:_0x3ebc53={},isResolvable:_0x1394c2=!0x0,isSubmitted:_0xa92111=!0x1,isFromAdapter:_0x2cce40=!0x1}={}){return this['fire'](bt('addCommentThread',_0x40ece2),{'channelId':_0x40ece2,'threadId':_0x2a59e8,'comments':_0x2a8335,'unlinkedAt':_0xbb2c81,'resolvedAt':_0x5ec783,'resolvedBy':_0x2dd005,'target':_0x444ee9,'context':_0x16fea7,'attributes':_0x3ebc53,'isFromAdapter':_0x2cce40,'isResolvable':_0x1394c2,'isSubmitted':_0xa92111}),this['getCommentThread'](_0x2a59e8);}['openNewCommentThread']({channelId:_0x108c31=Tt,threadId:_0x111908=_0x5d5a44(),target:_0x3d2aa5,context:_0x1726d9=null,isResolvable:_0xb272da=!0x0}){if(this['_readOnlyChannels']['has'](_0x108c31)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x3d2aa5)throw new _0x5bf711('commentsrepository-missing-target');const _0x490b31=this['addCommentThread']({'channelId':_0x108c31,'threadId':_0x111908,'target':_0x3d2aa5,'context':_0x1726d9,'isResolvable':_0xb272da});if(!_0x490b31)return null;const _0x553280=this['_threadToController']['get'](_0x490b31),_0x2108c5=_0x553280['view']['commentThreadInputView']['commentInputView'],_0x33b19a=this['context']['plugins']['get'](O),_0x2e0b39=_0x33b19a['getByInnerView'](_0x553280['view']);return _0x33b19a['activate'](_0x2e0b39),_0x2108c5['once']('editorReady',()=>_0x2108c5['focus']()),_0x490b31;}['hasCommentThread'](_0x572ad2){if('string'!=typeof _0x572ad2)throw new _0x5bf711('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x572ad2);}['updateCommentThread']({channelId:_0x66b942=Tt,threadId:_0x453b63,context:_0x58b436,unlinkedAt:_0x5d3790,attributes:_0x756b95,isFromAdapter:_0x1a4d98=!0x1}){return this['fire'](bt('updateCommentThread',_0x66b942),{'channelId':_0x66b942,'threadId':_0x453b63,'context':_0x58b436,'unlinkedAt':_0x5d3790,'attributes':_0x756b95,'isFromAdapter':_0x1a4d98}),this['getCommentThread'](_0x453b63);}['getCommentThread'](_0x54cfb5){if('string'!=typeof _0x54cfb5)throw new _0x5bf711('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x54cfb5);}['fetchCommentThread']({channelId:_0x3e9b98,threadId:_0x2c1786}={}){const _0x5ee506=this['getCommentThread'](_0x2c1786);if(_0x5ee506)return Promise['resolve'](_0x5ee506);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x5bf711('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x3e9b98,'threadId':_0x2c1786})['then'](_0x53e692=>this['hasCommentThread'](_0x2c1786)?this['getCommentThread'](_0x2c1786):_0x53e692?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x3e9b98},_0x53e692)):void 0x0)['catch'](_0x4c73c3=>{throw console['error'](_0x4c73c3),new _0x5bf711('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x178eab,skipNotAttached:_0xa1d199=!0x1,skipEmpty:_0x21f5e8=!0x1,toJSON:_0x2d3ebc=!0x1}={}){const _0x2d3729=[];for(const _0x4bbf30 of this['_threads']['values']())_0x178eab&&_0x4bbf30['channelId']!==_0x178eab||_0xa1d199&&!_0x4bbf30['isAttached']||_0x21f5e8&&0x0===_0x4bbf30['length']||_0x2d3729['push'](_0x4bbf30);return _0x2d3ebc?_0x2d3729['map'](_0x1ad6b6=>_0x1ad6b6['toJSON']()):_0x2d3729;}['setActiveCommentThread'](_0x128f44){const _0x50aba2=this['context']['plugins']['get'](O);if(!_0x128f44)return void(this['activeCommentThread']&&_0x50aba2['deactivateAll']());const _0x9ec89f=this['getCommentThread'](_0x128f44);if(!_0x9ec89f)throw new _0x5bf711('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x128f44});if(!this['_threadToController']['has'](_0x9ec89f))throw new _0x5bf711('commentsrepository-active-not-attached',null,{'threadId':_0x128f44});const _0x3db1eb=_0x50aba2['getByInnerView'](this['_threadToController']['get'](_0x9ec89f)['view']);_0x50aba2['activate'](_0x3db1eb);}['switchReadOnly'](_0x4edb1c,_0x330578){_0x4edb1c?this['_readOnlyChannels']['add'](_0x330578):this['_readOnlyChannels']['delete'](_0x330578),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x44743a){return this['_readOnlyChannels']['has'](_0x44743a)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x56886b,_0x999f59){return new Ct(_0x56886b,_0x999f59);}['setPermissions'](_0x5f425c,_0x5e38ba=Tt){this['_permissions']['set'](_0x5e38ba,_0x5f425c),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x299f13=Tt){return this['_permissions']['has'](_0x299f13)?this['_permissions']['get'](_0x299f13):_t;}['_addCommentThread']({channelId:_0x4d642a,threadId:_0xb74e1f,comments:_0x1f6fc4,unlinkedAt:_0x3769ed,resolvedAt:_0x40be3a,resolvedBy:_0x12cb62,target:_0x50315e,context:_0x49a5d0,attributes:_0x40a899,isFromAdapter:_0x1947ab,isResolvable:_0x1fbe55,isSubmitted:_0x69472f}){if('string'!=typeof _0xb74e1f)throw new _0x5bf711('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0xb74e1f});if(this['hasCommentThread'](_0xb74e1f))throw new _0x5bf711('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0xb74e1f});const _0x222e00=new ui(this,{'channelId':_0x4d642a,'id':_0xb74e1f,'context':_0x49a5d0,'attributes':_0x40a899,'unlinkedAt':_0x3769ed,'resolvedAt':_0x40be3a,'resolvedBy':_0x12cb62?this['context']['plugins']['get'](it)['getUser'](_0x12cb62):null,'isResolvable':_0x1fbe55,'isSubmitted':_0x69472f||_0x1947ab});this['_threads']['set'](_0xb74e1f,_0x222e00);for(const _0x5ec166 of _0x1f6fc4)_0x222e00['_add'](this['_createNewComment']({'threadId':_0xb74e1f,..._0x5ec166}));return _0x50315e&&_0x222e00['attachTo'](_0x50315e),_0x1947ab||!_0x222e00['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x4d642a,'threadId':_0xb74e1f});}['_submitCommentThread']({channelId:_0x11dbf0,threadId:_0x55295c}){if(!this['hasCommentThread'](_0x55295c))throw new _0x5bf711('commentsrepository-missing-comment-thread',this);const _0x3dbb6f=this['getCommentThread'](_0x55295c);if(_0x3dbb6f['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x11d789,comments:_0x454245,resolvedAt:_0x1f3eb5,resolvedBy:_0x2cc2e8,context:_0x21d862,attributes:_0xc677f7}=_0x3dbb6f,_0xe5ec1e=this['context']['plugins']['get']('PendingActions'),_0x302c22=_0xe5ec1e['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x11dbf0,'threadId':_0x11d789,'comments':_0x454245['map'](_0xe1bdf7=>_0xe1bdf7['toJSON']()),'resolvedAt':_0x1f3eb5,'resolvedBy':_0x2cc2e8?_0x2cc2e8['id']:_0x2cc2e8,'context':_0x21d862,'attributes':_0xc677f7})['then'](({comments:_0x55df1f})=>{_0xe5ec1e['remove'](_0x302c22);for(const _0x2b0dc6 of _0x55df1f)this['_updateComment']({'channelId':_0x11dbf0,'threadId':_0x55295c,'commentId':_0x2b0dc6['commentId'],'createdAt':_0x2b0dc6['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x1dec9f=>{throw console['error'](_0x1dec9f),new _0x5bf711('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x599b3d,target:_0x880e62}){const _0x1efa5b=this['getCommentThread'](_0x599b3d);if(!_0x1efa5b)throw new _0x5bf711('commentsrepository-attach-missing-comment-thread',this);const _0x56a21d=this['context']['plugins']['get']('PendingActions'),_0x11809e=this['context']['plugins']['get'](O),_0x4bf114=this['_createCommentThreadView'](_0x1efa5b),_0x12b802=new Ct(_0x1efa5b,_0x4bf114);let _0x526c50=null;_0x4bf114['on']('change:isDirty',(_0x2b3ef4,_0x20dcb9,_0xe537f)=>{_0xe537f?_0x526c50=_0x56a21d['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x526c50&&(_0x56a21d['remove'](_0x526c50),_0x526c50=null);}),this['_threadToController']['set'](_0x1efa5b,_0x12b802),this['_viewToController']['set'](_0x4bf114,_0x12b802);const _0x41554d=new S(this['context']['locale'],_0x4bf114);_0x41554d['bind']('length')['to'](_0x4bf114),_0x41554d['bind']('isDirty')['to'](_0x4bf114,'isDirty',_0x4bf114,'length',(_0x4e80b8,_0x22d9dc)=>_0x4e80b8||!_0x22d9dc),_0x41554d['bind']('isActive')['to'](_0x4bf114),_0x41554d['type']='comment';const _0x5d6b66=new d({'view':_0x41554d,'target':_0x880e62,'type':'comment','isVisible':!_0x1efa5b['archivedAt']});return _0x4bf114['on']('escape',()=>{_0x5d6b66['fire']('escape');}),this['_bindAnnotationToEditors'](_0x4bf114,_0x5d6b66),_0x11809e['add'](_0x5d6b66),_0x5d6b66;}['_bindAnnotationToEditors'](_0x48d513,_0x3e7d20){this['listenTo'](_0x48d513,'editorReady',(_0x1f8cef,_0x5a7cb6)=>{const _0x5401db=_0x5a7cb6['ui']['view']['body']['bodyCollectionContainer'];_0x3e7d20['focusableElements']['add'](_0x5401db),this['context']instanceof _0x5704e9&&this['context']['ui']['focusTracker']['add'](_0x5401db);},{'priority':'highest'}),this['listenTo'](_0x48d513,'editorDestroyed',(_0xf6df50,_0x5c820c)=>{const _0x283a2a=_0x5c820c['ui']['view']['body']['bodyCollectionContainer'];_0x3e7d20['focusableElements']['has'](_0x283a2a)&&_0x3e7d20['focusableElements']['remove'](_0x283a2a),this['context']instanceof _0x5704e9&&this['context']['ui']['focusTracker']['remove'](_0x283a2a);});}['_unbindEditors'](_0x346946){this['stopListening'](_0x346946,'editorReady'),this['stopListening'](_0x346946,'editorDestroyed');}['_createCommentThreadView'](_0x32bc4a){const _0x3a5ce0=this['context']['plugins']['get'](it),{config:_0x4d102c,locale:_0x18c804}=this['context'],_0x34ade0=lt(_0x4d102c['get']('locale'),_0x18c804);return new(0x0,(_0x4d102c['get']('comments'))['CommentThreadView'])(_0x18c804,_0x32bc4a,_0x3a5ce0['me'],{'editorConfig':{..._0x4d102c['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x4d102c['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x4d102c['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x4d102c['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x4d102c['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x34ade0,'CommentView':_0x4d102c['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x1b88b4,channelId:_0x67e7b7,resolvedAt:_0x111002,resolvedBy:_0x542a8c,isFromAdapter:_0x45397c}){if(!this['hasCommentThread'](_0x1b88b4))throw new _0x5bf711('commentsrepository-missing-comment-thread',null,{'threadId':_0x1b88b4});const _0x21e33c=this['getCommentThread'](_0x1b88b4);if(_0x21e33c['isResolved'])throw new _0x5bf711('commentsrepository-resolved-comment-thread',null,{'threadId':_0x1b88b4});const _0x209ad0=this['context']['plugins']['get'](it);if(_0x21e33c['resolvedBy']=_0x209ad0['getUser'](_0x542a8c),_0x21e33c['resolvedAt']=_0x111002,_0x45397c||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x1604ce=this['context']['plugins']['get']('PendingActions'),_0x22bc0=_0x1604ce['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x67e7b7,'threadId':_0x1b88b4})['then'](({resolvedAt:_0x3088c9,resolvedBy:_0x389cb4})=>{_0x1604ce['remove'](_0x22bc0),_0x21e33c['resolvedBy']['id']!==_0x389cb4&&(_0x21e33c['resolvedBy']=_0x209ad0['getUser'](_0x389cb4)),_0x21e33c['resolvedAt']=_0x3088c9;})['catch'](_0x1d269a=>{throw console['error'](_0x1d269a),new _0x5bf711('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x39f2c6,channelId:_0x31a129,isFromAdapter:_0x46ec84}){if(!this['hasCommentThread'](_0x39f2c6))throw new _0x5bf711('commentsrepository-missing-comment-thread',null,{'threadId':_0x39f2c6});const _0x1f9a2c=this['getCommentThread'](_0x39f2c6);if(!_0x1f9a2c['isResolved'])throw new _0x5bf711('commentsrepository-reopen-comment-thread',null,{'threadId':_0x39f2c6});if(_0x1f9a2c['resolvedBy']=null,_0x1f9a2c['resolvedAt']=null,_0x46ec84||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x208128=this['context']['plugins']['get']('PendingActions'),_0x5f58ef=_0x208128['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x31a129,'threadId':_0x39f2c6})['then'](()=>_0x208128['remove'](_0x5f58ef))['catch'](_0x4536f6=>{throw console['error'](_0x4536f6),new _0x5bf711('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x42db03,isFromAdapter:_0x25f0a8}){const _0x9c3805=this['getCommentThread'](_0x42db03);if(!_0x9c3805)throw new _0x5bf711('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x42db03),this['_threads']['delete'](_0x42db03),!_0x9c3805['isSubmitted']||_0x25f0a8||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x1ea42e=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2075f1}=_0x9c3805,_0x3e5d6f=_0x1ea42e['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x2075f1,'threadId':_0x42db03})['then'](()=>_0x1ea42e['remove'](_0x3e5d6f))['catch'](_0x42a7c1=>{throw console['error'](_0x42a7c1),new _0x5bf711('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x1a830a,unlinkedAt:_0x164fa9,context:_0x20b321,attributes:_0x50b1f5,isFromAdapter:_0x29c799}){if('string'!=typeof _0x1a830a)throw new _0x5bf711('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x1a830a});if(!this['hasCommentThread'](_0x1a830a))throw new _0x5bf711('commentsrepository-missing-comment-thread',null,{'threadId':_0x1a830a});const _0x5d7166=this['getCommentThread'](_0x1a830a);let _0x4c9e3f=!0x1;if(void 0x0!==_0x20b321&&_0x5d7166['context']!==_0x20b321&&(_0x5d7166['context']=_0x20b321,_0x4c9e3f=!0x0),void 0x0!==_0x164fa9&&_0x5d7166['unlinkedAt']!==_0x164fa9&&(_0x5d7166['unlinkedAt']=_0x164fa9,_0x4c9e3f=!0x0),_0x50b1f5&&!wt(_0x50b1f5,_0x5d7166['attributes'])&&(_0x5d7166['attributes']=_0x50b1f5,_0x4c9e3f=!0x0),!_0x4c9e3f)return Promise['resolve']();if(!_0x5d7166['isSubmitted']||_0x29c799||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x5528fa=this['context']['plugins']['get']('PendingActions'),{channelId:_0xe44ffc}=_0x5d7166,_0x111456=_0x5528fa['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0xe44ffc,'threadId':_0x1a830a,'context':_0x20b321,'unlinkedAt':_0x164fa9,'attributes':_0x50b1f5})['then'](()=>_0x5528fa['remove'](_0x111456))['catch'](_0x12221e=>{throw console['error'](_0x12221e),new _0x5bf711('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x51a29d){const _0x1066d7=this['context']['plugins']['get'](O),_0x1af76c=this['getCommentThread'](_0x51a29d);if(_0x1af76c['_isAttached']=!0x1,this['_threadToController']['has'](_0x1af76c)){const _0x48ecc1=this['_threadToController']['get'](_0x1af76c),_0x1f695f=_0x48ecc1['view'],_0x1da036=_0x1066d7['getByInnerView'](_0x1f695f);this['_threadToController']['delete'](_0x1af76c),this['_viewToController']['delete'](_0x1f695f),_0x1da036&&_0x1066d7['remove'](_0x1da036),_0x48ecc1['destroy'](),_0x1f695f['destroy']()['then'](()=>{this['_unbindEditors'](_0x1f695f);});}}['_updateActiveAnnotation']({threadId:_0x5a6eb0,resolvedAt:_0x250b9f,unlinkedAt:_0x459e64}){const _0x2526c4=!!_0x250b9f,_0x58e432=this['context']['plugins']['get'](O),_0x2cd16c=this['getCommentThread'](_0x5a6eb0);if(this['_threadToController']['has'](_0x2cd16c)){const _0x89c5ff=this['_threadToController']['get'](_0x2cd16c)['view'],_0x108b38=_0x58e432['getByInnerView'](_0x89c5ff);_0x108b38&&(_0x2526c4&&_0x58e432['_removeActiveAnnotation'](_0x108b38),_0x459e64?_0x108b38['isVisible']=!0x1:_0x108b38['refreshVisibility']());}}['_getExternalAuthor'](_0x2afb77){const _0xa0c96f=this['context']['plugins']['get'](it),_0x156769=pt('external:'+_0x2afb77),_0x36f173=_0xa0c96f['getUser'](_0x156769);return _0x36f173||_0xa0c96f['addUser']({'id':_0x156769,'name':_0x2afb77});}['_createNewComment']({threadId:_0x3c26cb,commentId:_0x30ea2d=_0x5d5a44(),content:_0x215e10,authorId:_0x2e0bba,createdAt:_0x3c7a75,attributes:_0x44d09b}){if('string'!=typeof _0x30ea2d)throw new _0x5bf711('commentsrepository-invalid-commentid');if('string'!=typeof _0x2e0bba)throw new _0x5bf711('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x215e10||!_0x215e10['trim']())throw new _0x5bf711('commentsrepository-invalid-comment-content');const _0x5de263=this['context']['plugins']['get'](it)['getUser'](_0x2e0bba);if(!_0x5de263)throw new _0x5bf711('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x2e0bba});let _0x2f8c7c=null,_0x3af56a=_0x3c7a75;return _0x44d09b?.['@external']&&(_0x2f8c7c=this['_getExternalAuthor'](_0x44d09b['@external']['authorName']),_0x3af56a=new Date(_0x44d09b['@external']['createdAt'])),new fi(this,{'threadId':_0x3c26cb,'id':_0x30ea2d,'author':_0x2f8c7c||_0x5de263,'creator':_0x5de263,'content':_0x215e10,'createdAt':_0x3c7a75,'authoredAt':_0x3af56a,'attributes':_0x44d09b});}['_addComment'](_0x15c65){let {threadId:_0x39a48b,content:_0x588567,attributes:_0x4a25f5,isFromAdapter:_0xb5fe87}=_0x15c65;const _0x188d08=this['getCommentThread'](_0x15c65['threadId']);if(!_0x188d08)throw new _0x5bf711('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x590cd4=this['_createNewComment'](_0x15c65),{id:_0x536a91}=_0x590cd4;if(_0x188d08['_add'](_0x590cd4),_0xb5fe87||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x188d08['isSubmitted'])return Promise['resolve']();const _0x176718=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1ed69d}=_0x188d08,_0x18dfe0=_0x176718['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x4a25f5||(_0x4a25f5={}),this['adapter']['addComment']({'channelId':_0x1ed69d,'threadId':_0x39a48b,'commentId':_0x536a91,'content':_0x588567,'attributes':_0x4a25f5})['then'](_0x26206d=>{_0x176718['remove'](_0x18dfe0),_0x26206d&&this['_updateComment']({'channelId':_0x1ed69d,'threadId':_0x39a48b,'commentId':_0x536a91,'createdAt':_0x26206d['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4cc7a7=>{throw console['error'](_0x4cc7a7),new _0x5bf711('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x55bdc6,commentId:_0x25e16e,content:_0x1e8d54,createdAt:_0x3269de,attributes:_0x25954c,isFromAdapter:_0x51a1e7}){if(void 0x0!==_0x1e8d54&&('string'!=typeof _0x1e8d54||!_0x1e8d54['trim']()['length']))throw new _0x5bf711('commentsrepository-update-comment-invalid-content');const _0x4a9a68=this['getCommentThread'](_0x55bdc6),_0x4891de=_0x4a9a68['getComment'](_0x25e16e);if(!_0x4891de)throw new _0x5bf711('commentsrepository-update-missing-comment',this);let _0xf4dd5e=!0x1;if(_0x1e8d54&&_0x1e8d54!==_0x4891de['content']&&(_0x4891de['isEditable']||_0x51a1e7)&&(_0x4891de['content']=_0x1e8d54,_0xf4dd5e=!0x0),_0x3269de&&_0x3269de!==_0x4891de['createdAt']&&(_0x4891de['createdAt']=_0x3269de,_0x4891de['attributes']&&_0x4891de['attributes']['@external']||(_0x4891de['authoredAt']=_0x3269de),_0xf4dd5e=!0x0),_0x25954c&&!wt(_0x25954c,_0x4891de['attributes'])&&(_0x4891de['attributes']=_0x25954c,_0xf4dd5e=!0x0),!_0xf4dd5e)return Promise['resolve']();if(_0x4a9a68['fire']('commentUpdated'),_0x51a1e7||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x389bfb=this['context']['plugins']['get']('PendingActions'),{channelId:_0x597058}=this['getCommentThread'](_0x4891de['threadId']),_0x22053d=_0x389bfb['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x597058,'threadId':_0x55bdc6,'commentId':_0x25e16e,'content':_0x1e8d54,'attributes':_0x25954c})['then'](()=>_0x389bfb['remove'](_0x22053d))['catch'](_0x26f0b4=>{throw console['error'](_0x26f0b4),new _0x5bf711('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x1d71ba,commentId:_0x38af9c,isFromAdapter:_0x3f6f46}){const _0xa9b11=this['getCommentThread'](_0x1d71ba),_0x347977=_0xa9b11['getComment'](_0x38af9c);if(!_0x347977)throw new _0x5bf711('commentsrepository-remove-missing-comment',this);if(_0xa9b11['_remove'](_0x347977),_0x3f6f46||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x2378c3=this['context']['plugins']['get']('PendingActions'),{channelId:_0x124ed1}=_0xa9b11,_0x35fb01=_0x2378c3['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x124ed1,'threadId':_0x1d71ba,'commentId':_0x38af9c})['then'](()=>_0x2378c3['remove'](_0x35fb01))['catch'](_0x3815f8=>{throw console['error'](_0x3815f8),new _0x5bf711('commentsrepository-remove-comment-internal-error',this);});}}class ui extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x4ba4c4(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x34a79,_0x4cfd3f){super();const _0x4e5a07=_0x4cfd3f['isResolvable'];this['channelId']=_0x4cfd3f['channelId'],this['id']=_0x4cfd3f['id'],this['comments']=new _0x321144(),this['_repository']=_0x34a79,this['_isAttached']=!0x1,this['_isSubmitted']=_0x4cfd3f['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x34a79,'_permissions',_0x34a79,'_readOnlyChannels',()=>_0x34a79['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x34a79,'_permissions',()=>_0x34a79['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x34a79,'_permissions',()=>{const _0x52f2ac=_0x34a79['getPermissions'](this['channelId']);return _0x52f2ac['write']||_0x52f2ac['admin'];}),this['bind']('isResolvable')['to'](_0x34a79,'_permissions',()=>_0x4e5a07&&_0x34a79['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x4cfd3f['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x4ecf79,_0x100993)=>_0x4ecf79?_0x100993?_0x4ecf79<_0x100993?_0x4ecf79:_0x100993:_0x4ecf79:_0x100993),this['set']('unlinkedAt',_0x4cfd3f['unlinkedAt']||null),this['set']('resolvedAt',_0x4cfd3f['resolvedAt']||null),this['set']('resolvedBy',_0x4cfd3f['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x328c5d=>!!_0x328c5d),this['set']('attributes',_0x4cfd3f['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x1f644a,_0x382b66)=>_0x1f644a+_0x382b66['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x3b06e5,id:_0x157fd1}=this;this['_repository']['fire'](bt('submitCommentThread',_0x3b06e5),{'channelId':_0x3b06e5,'threadId':_0x157fd1});}['setUnlinkedAt'](_0x1ca7ac){this['_update']({'unlinkedAt':_0x1ca7ac});}['resolve']({resolvedAt:_0x57d834=new Date(),resolvedBy:_0x4702c2=null,isFromAdapter:_0x27d618=!0x1}={}){const _0x1f5565=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x186002,id:_0x1bc845}=this;this['_repository']['fire'](bt('resolveCommentThread',_0x186002),{'channelId':_0x186002,'threadId':_0x1bc845,'resolvedAt':_0x57d834,'resolvedBy':_0x4702c2||_0x1f5565['id'],'isFromAdapter':_0x27d618});}['reopen']({isFromAdapter:_0x470f90=!0x1}={}){const {channelId:_0x22978b,id:_0x6f9933}=this;this['_repository']['fire'](bt('reopenCommentThread',_0x22978b),{'channelId':_0x22978b,'threadId':_0x6f9933,'isFromAdapter':_0x470f90});}['setContext'](_0xbec0de){this['context']||this['_update']({'context':_0xbec0de});}['setAttribute'](_0x1ac306,_0x38896f){const _0xa0d610=It(this['attributes']);At(_0xa0d610,_0x1ac306,_0x38896f),this['_update']({'attributes':_0xa0d610});}['removeAttribute'](_0x49234c){const _0x3323c0=It(this['attributes']);yt(_0x3323c0,_0x49234c),this['_update']({'attributes':_0x3323c0});}['remove']({isFromAdapter:_0x1aef64=!0x1}={}){const {channelId:_0x19b4e8,id:_0x570e9e}=this;this['_repository']['fire'](bt('removeCommentThread',_0x19b4e8),{'channelId':_0x19b4e8,'threadId':_0x570e9e,'isFromAdapter':_0x1aef64});}['attachTo'](_0x896471){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x896471});}['addComment'](_0x245a62){const {channelId:_0x2b1c3d,id:_0x5ec6be}=this;this['_repository']['fire'](bt('addComment',_0x2b1c3d,_0x5ec6be),Object['assign']({'channelId':_0x2b1c3d,'threadId':_0x5ec6be},_0x245a62));}['getComment'](_0x4b063f){if('string'!=typeof _0x4b063f)throw new _0x5bf711('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x4b063f});return this['comments']['get'](_0x4b063f);}['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'](_0x416c9a=>_0x416c9a['toJSON']()),'attributes':this['attributes']};}['_add'](_0x318b4b){return this['listenTo'](_0x318b4b,'change:authoredAt',()=>{const _0x5ac7b7=this['_findOptimalIndex'](_0x318b4b),_0x4b1163=this['comments'];_0x5ac7b7-0x1!=_0x4b1163['getIndex'](_0x318b4b)&&_0x5ac7b7+0x1!=_0x4b1163['getIndex'](_0x318b4b)&&(this['_remove'](_0x318b4b),this['_add'](_0x318b4b));}),this['comments']['add'](_0x318b4b,this['_findOptimalIndex'](_0x318b4b));}['_update'](_0x68118f){const {channelId:_0x56df8f,id:_0xc14057}=this;this['_repository']['fire'](bt('updateCommentThread',_0x56df8f),{..._0x68118f,'channelId':_0x56df8f,'threadId':_0xc14057});}['_remove'](_0x1c47d7){return this['stopListening'](_0x1c47d7),_0x1c47d7['destroy'](),this['comments']['remove'](_0x1c47d7);}['_findOptimalIndex'](_0x528e60){const _0x567900=this['comments']['find'](_0x579fa9=>new Date(_0x579fa9['authoredAt'])['getTime']()>new Date(_0x528e60['authoredAt'])['getTime']());return _0x567900?this['comments']['getIndex'](_0x567900):this['length'];}}class fi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x4ba4c4(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0xe869bf,_0x3a1756){super();const _0x538a2e=_0xe869bf['context']['plugins']['get'](it)['me'],_0xb7d75f=_0xe869bf['getCommentThread'](_0x3a1756['threadId']),_0x273e4c=0x0===_0xb7d75f['comments']['length'],_0x358bc9=_0x538a2e===_0x3a1756['author'];this['id']=_0x3a1756['id'],this['threadId']=_0x3a1756['threadId'],this['author']=_0x3a1756['author'],this['creator']=_0x3a1756['creator'],this['isExternal']=Boolean(_0x3a1756['attributes']&&_0x3a1756['attributes']['@external']),this['set']('content',_0x3a1756['content']),this['createdAt']=_0x3a1756['createdAt']||new Date(),this['set']('authoredAt',_0x3a1756['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0xb7d75f,'resolvedAt'),this['set']('attributes',_0x3a1756['attributes']||{}),this['bind']('isEditable')['to'](_0xe869bf,'_permissions',()=>{const _0x26e1b7=_0xe869bf['getPermissions'](_0xb7d75f['channelId'])['write'],_0xde2231=_0xe869bf['getPermissions'](_0xb7d75f['channelId'])['modifyAll'];return _0x358bc9&&_0x26e1b7||!_0x358bc9&&_0xde2231;}),this['bind']('isRemovable')['to'](_0xb7d75f,'isRemovable',_0xe869bf,'_permissions',_0x4d7cbb=>{const _0x16a1fa=_0xe869bf['getPermissions'](_0xb7d75f['channelId'])['write'],_0x10091a=_0xe869bf['getPermissions'](_0xb7d75f['channelId'])['modifyAll'];return _0x358bc9&&_0x16a1fa||_0x4d7cbb&&_0x273e4c||!_0x358bc9&&_0x10091a&&!_0x273e4c;}),this['bind']('isReadOnly')['to'](_0xb7d75f,'isReadOnly'),this['_repository']=_0xe869bf;}get['weight'](){return Math['max'](function(_0x5650a1){const _0xda5ffc=document['createElement']('div');return _0xda5ffc['innerHTML']=_0x5650a1,_0xda5ffc['textContent']['length'];}(this['content']),0xc8);}['update'](_0x33b595){const {threadId:_0x4f2467,id:_0x5c5c75}=this;if(!this['_repository']['hasCommentThread'](_0x4f2467))throw new _0x5bf711('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x304504}=this['_repository']['getCommentThread'](_0x4f2467);this['_repository']['fire'](bt('updateComment',_0x304504,_0x4f2467),{'channelId':_0x304504,'threadId':_0x4f2467,'commentId':_0x5c5c75,..._0x33b595});}['setAttribute'](_0x579c02,_0x509c03){const _0x51b08d=It(this['attributes']);At(_0x51b08d,_0x579c02,_0x509c03),this['update']({'attributes':_0x51b08d});}['removeAttribute'](_0x590d17){const _0x1e1378=It(this['attributes']);yt(_0x1e1378,_0x590d17),this['update']({'attributes':_0x1e1378});}['remove'](_0x30cc40={}){if(!_0x30cc40['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x26e69d,id:_0x47913f}=this;if(!this['_repository']['hasCommentThread'](_0x26e69d))throw new _0x5bf711('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x45f565}=this['_repository']['getCommentThread'](_0x26e69d);this['_repository']['fire'](bt('removeComment',_0x45f565,_0x26e69d),{'channelId':_0x45f565,'threadId':_0x26e69d,'commentId':_0x47913f,..._0x30cc40});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0x566f21,..._0x394710){for(const _0x660748 of _0x394710)void 0x0!==_0x660748&&(_0x566f21+=':'+String(_0x660748));return _0x566f21;}class J extends _0x51e5f3{['refresh'](){const _0x21fd57=this['editor']['model']['document']['selection'];for(const _0xb9d97c of _0x21fd57['getRanges']())if(this['_hasContent'](_0xb9d97c))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x5724b0=_0x5d5a44()}={}){const _0x582fd5=this['editor']['model'],_0x3a1fb1=[];for(const _0x4507cc of _0x582fd5['document']['selection']['getRanges']())this['_hasContent'](_0x4507cc)&&_0x3a1fb1['push'](this['_trimToContent'](_0x4507cc));_0x582fd5['change'](_0x553ef3=>{for(const _0x56e77b of _0x3a1fb1){const _0x522e60=_0x5d5a44()['substr'](0x1,0x5),_0x40096b='comment:'+_0x5724b0+':'+_0x522e60;_0x553ef3['addMarker'](_0x40096b,{'range':_0x56e77b,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x585874){for(const _0x1e1074 of _0x585874['getItems']())if(this['_itemIsContent'](_0x1e1074))return!0x0;return!0x1;}['_itemIsContent'](_0x1f757c){return _0x1f757c['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x1f757c)&&!_0x1f757c['is']('element','tableCell');}['_trimToContent'](_0x59a559){const _0x163e40=_0x4b7138=>!this['_itemIsContent'](_0x4b7138['item']),_0x240678=_0x59a559['start']['getLastMatchingPosition'](_0x163e40),_0x3ef192=_0x59a559['end']['getLastMatchingPosition'](_0x163e40,{'direction':'backward'});return this['editor']['model']['createRange'](_0x240678,_0x3ef192);}}class P extends _0x4e6ffe{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[O];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3ad2fb){super(_0x3ad2fb),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x5a63e9=this['editor'],_0x66ed5d=_0x5a63e9['model']['document']['selection'],_0x2bb04d=_0x1aaecd(()=>this['refreshSelectedViews'](),0xa);_0x66ed5d['on']('change:range',(_0x4f4c6b,_0x4add11)=>{_0x4add11['directChange']&&(_0x2bb04d['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x5a63e9['editing']['view']['document'],'change:isFocused',(_0x2bee7f,_0x229a6f,_0x5164e1)=>{_0x5164e1&&_0x2bb04d();}),this['listenTo'](_0x5a63e9['ui']['focusTracker'],'change:isFocused',(_0x4107e9,_0x21a481,_0x42a334)=>{_0x42a334||_0x5a63e9['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x5f277f=>this['_editorAnnotationsData']['has'](_0x5f277f['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x37fb3c){if(this['_editorAnnotations']['has'](_0x37fb3c['view']))return;this['_editorAnnotations']['add'](_0x37fb3c['view']),this['editor']['ui']['focusTracker']['add'](_0x37fb3c['view']['element']);const _0x3e56ff=this['editor']['plugins']['get'](O);this['listenTo'](_0x3e56ff['collection'],'remove',(_0x30b8ca,_0x557a22)=>{this['editor']['ui']['focusTracker']['remove'](_0x557a22['view']['element']),this['_editorAnnotations']['delete'](_0x557a22['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x324c47){if('function'!=typeof _0x324c47)throw new _0x5bf711('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x324c47);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x4254cf,annotations:_0x206af9}){const _0x1beb1d=[],_0x416c04=this['editor']['model']['document']['selection'],_0x1aa898=Array['from'](_0x416c04['getRanges']());for(const [_0x1e9d27,_0x42c2de]of this['_editorAnnotationsData']){const _0x3e2b2f=_0x3dc501(_0x42c2de),_0x1d447f=_0x206af9['getByInnerView'](_0x1e9d27);_0x3e2b2f&&_0x1d447f&&_0x1beb1d['push']({'annotation':_0x1d447f,'range':_0x3e2b2f});}function _0x3dc501(_0x481422){for(const _0x245b83 of _0x481422)for(const _0x1894c1 of _0x1aa898)if(_0x245b83['containsRange'](_0x1894c1,!_0x416c04['isCollapsed']))return _0x245b83;return null;}return _0x1beb1d['sort']((_0x22f95d,_0x39e584)=>{const _0x125a68=_0x22f95d['range'],_0x550f66=_0x39e584['range'];if(!_0x125a68['isEqual'](_0x550f66)){if(_0x125a68['containsRange'](_0x550f66,!0x0))return 0x1;if(_0x550f66['containsRange'](_0x125a68,!0x0))return-0x1;}return _0x22f95d['annotation']==_0x4254cf?-0x1:_0x39e584['annotation']==_0x4254cf?0x1:0x0;})['map'](_0x27c5cc=>_0x27c5cc['annotation']);}get['_editorAnnotationsData'](){const _0x43501e=new Map();for(const _0x392a2c of Array['from'](this['_dataCollectors']))for(const [_0x3b0839,_0xba2bef]of _0x392a2c())_0x43501e['set'](_0x3b0839,_0xba2bef);return _0x43501e;}}class st extends _0x4e6ffe{['afterInit'](){const _0x5ec62b=this['editor'];if(!_0x5ec62b['plugins']['has']('RestrictedEditingModeEditing'))return;_0x5ec62b['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x4e6ffe{constructor(_0x150249){super(_0x150249),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x47c574=this['editor'],_0x39adab=_0x47c574['commands']['get']('importWord'),_0x552035=_0x47c574['plugins']['get'](it);_0x39adab&&(_0x39adab['on']('execute',(_0xcef650,[,_0x89e9cf])=>{_0x89e9cf['collaboration_features']={'comments':!0x0,'user_id':_0x552035['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x39adab,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x16af67,_0x1b8a52){const {comment_threads:_0x1d64dc}=_0x1b8a52;_0x1d64dc&&_0x1d64dc['forEach'](({thread_id:_0x47ab46,comments:_0x2c0849,is_resolved:_0x173e67})=>{const _0x8b87c9=new Date(),_0x5d79c6=_0x2c0849['map'](({author:_0x5b2356,content:_0x5567b0,created_at:_0x5b4ccf})=>({'content':_0x5567b0,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x8b87c9,'attributes':{'@external':{'authorName':_0x5b2356,'createdAt':_0x5b4ccf?new Date(_0x5b4ccf):new Date(),'source':'importWord'}}})),_0x4d31bc=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x4d31bc,'threadId':_0x47ab46,'comments':_0x5d79c6,'resolvedAt':_0x173e67?_0x8b87c9:null});});}}class at extends _0x4e6ffe{constructor(_0x8fb078){super(_0x8fb078),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x2cf7df=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x2cf7df,'contentInsertion',(_0x1ae987,_0x225226)=>this['_removeMarkersWithoutThreads'](_0x225226['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x418cac){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x418cac;const _0x53b5ba=this['editor']['plugins']['get']('CommentsRepository');for(const _0x17e2a6 of _0x418cac['keys']()){const [_0x39a02f,_0x299c8e]=_0x17e2a6['split'](':');'comment'!=_0x39a02f||_0x53b5ba['hasCommentThread'](_0x299c8e)||_0x418cac['delete'](_0x17e2a6);}return _0x418cac;}['_registerMarkerInClipboardPipeline'](){const _0x5f40c0=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x3fe568=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x3fe568&&_0x5f40c0['_registerMarkerToCopy']('comment',_0x3fe568);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x563dc7){switch(_0x563dc7){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 _0x4e6ffe{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x155c98,_0x41f747)=>{if(!_0x41f747['options']['showCommentHighlights'])return null;if(_0x41f747['options']['ignoreResolvedComments']){const {id:_0x3b727d}=er(_0x155c98['markerName']),_0x1fa8b3=this['editor']['plugins']['get'](o);if(_0x1fa8b3['getCommentThread'](_0x3b727d)?.['isResolved']&&_0x155c98['item'])return _0x41f747['consumable']['consume'](_0x155c98['item'],'addMarker:'+_0x155c98['markerName']),_0x41f747['consumable']['consume'](_0x155c98['item'],'removeMarker:'+_0x155c98['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x31e98b=>{_0x31e98b['on']('addMarker:comment',(_0x16e338,_0x408c66,_0x184e55)=>{if(!_0x184e55['options']['showCommentHighlights'])return;const _0x298225=_0x408c66['item'];if(!_0x298225)return;const _0x49973f=_0x184e55['mapper']['toViewElement'](_0x298225);this['editor']['model']['schema']['isObject'](_0x298225)&&_0x49973f&&!_0x49973f['getCustomProperty']('widget')&&_0x49973f['is']('containerElement')&&_0x5a1464(_0x49973f,_0x184e55['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x501e14,{writer:_0x43f7f4,options:_0x529054})=>{if(!_0x529054['showCommentHighlights'])return null;const _0x2c3a3a=_0x43f7f4['createContainerElement']('div'),_0x39279b=_0x43f7f4['createEmptyElement']('hr');return _0x43f7f4['addClass']('ck-horizontal-line',_0x2c3a3a),_0x43f7f4['insert'](_0x43f7f4['createPositionAt'](_0x2c3a3a,0x0),_0x39279b),_0x2c3a3a;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x514014,{writer:_0x49b431,options:_0x59481c})=>{if(!_0x59481c['showCommentHighlights'])return null;const _0x41cdad=_0x49b431['createContainerElement']('span'),_0x13f4a0=_0x49b431['createEmptyElement']('img');return _0x49b431['addClass']('image-inline',_0x41cdad),_0x49b431['insert'](_0x49b431['createPositionAt'](_0x41cdad,0x0),_0x13f4a0),_0x41cdad;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x350e93,{writer:_0x588fbf,options:_0xa48b0b})=>{if(_0xa48b0b['showCommentHighlights'])return _0x588fbf['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x1ea565,_0x527f17,_0x3ebddc)=>{_0x3ebddc['options']['showCommentHighlights']&&_0x1ea565['stop']();},{'priority':'high'});}}class r extends _0x4e6ffe{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(_0x498fa3){super(_0x498fa3),this['set']('isThreadsLoadingPaused',!0x0),_0x498fa3['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x19eb2f,_0x191b31,_0x43a99c,_0x52a95e)=>{const _0x21a404=_0x498fa3['plugins']['get'](o),_0x28d5fe=_0x43a99c?er(_0x43a99c)['id']:null;_0x498fa3['model']['change'](()=>{if(_0x28d5fe){const _0x428f75=this['getAllMarkersForId'](_0x28d5fe);for(const _0x524346 of _0x428f75)_0x498fa3['editing']['reconvertMarker'](_0x524346);}if(_0x52a95e){const {id:_0x3dacdc}=er(_0x52a95e),_0x3da262=_0x21a404['getCommentThread'](_0x3dacdc);if(_0x3da262&&_0x3da262['unlinkedAt'])return;if(_0x3da262&&!_0x3da262['isAttached'])return;const _0xf9df44=this['getAllMarkersForId'](_0x3dacdc);for(const _0x3e5332 of _0xf9df44)_0x498fa3['editing']['reconvertMarker'](_0x3e5332);}}),_0x28d5fe&&this['scrollToThreadMarker'](_0x28d5fe);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x5b8993=this['editor'],_0xeeba0=_0x5b8993['plugins']['get'](o),_0x2274b6=_0x5b8993['config']['get']('collaboration.channelId'),_0x3845ba=_0xeeba0['getCommentThreads']()['filter'](_0x368423=>_0x368423['channelId']!==_0x2274b6);_0x5b8993['commands']['add']('addCommentThread',new J(_0x5b8993)),this['listenTo'](_0x5b8993,'change:isReadOnly',(_0x373ca9,_0x4c39a1,_0x11d16c)=>{_0xeeba0['switchReadOnly'](_0x11d16c,_0x5b8993['config']['get']('collaboration.channelId'));}),this['listenTo'](_0xeeba0,ft('addCommentThread',_0x2274b6),(_0x2e09d7,{threadId:_0x2476d8})=>{const _0x24e91e=this['editor']['plugins']['get'](o)['getCommentThread'](_0x2476d8);_0x24e91e?.['unlinkedAt']&&this['_attachArchivedThread'](_0x2476d8);}),this['listenTo'](_0xeeba0,ft('removeCommentThread',_0x2274b6),(_0x5e1780,{threadId:_0x123e99})=>{_0x5b8993['model']['enqueueChange']({'isUndoable':!0x1},_0x10460f=>{const _0xddb99e=this['getAllMarkersForId'](_0x123e99);for(const _0x47eba2 of _0xddb99e)_0x10460f['removeMarker'](_0x47eba2);});}),this['listenTo'](_0xeeba0,ft('resolveCommentThread',_0x2274b6),(_0x4e6363,{threadId:_0x7eb35e})=>{(this['_reconvertMarkers'](_0x7eb35e),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x7eb35e)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0xeeba0,ft('reopenCommentThread',_0x2274b6),(_0x3356b5,{threadId:_0x217399})=>{this['_reconvertMarkers'](_0x217399);},{'priority':'low'}),this['listenTo'](_0xeeba0,ft('addComment',_0x2274b6),(_0x409d0a,{threadId:_0x472411,isFromAdapter:_0x12d532})=>{const _0x39473a=this['getAllMarkersForId'](_0x472411);if(_0x12d532||0x0==_0x39473a['length']||!_0xeeba0['hasCommentThread'](_0x472411))return;0x1===_0xeeba0['getCommentThread'](_0x472411)['length']&&_0x5b8993['model']['enqueueChange']({'isUndoable':!0x1},_0x4041aa=>{for(const _0x376c0f of _0x39473a)_0x4041aa['updateMarker'](_0x376c0f,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x3845ba);}['afterInit'](){!async function(_0x4ad1ec){const _0x341e0a=_0xbed2dd([0x4d,0x65,0x52,0x55,0x46,0x4e,0x58,0x6b,0x64,0x72,0x6d,0x49,0x66,0x43,0x71,0x6f,0x79,0x70,0x51,0x77,0x48,0x47,0x73,0x7a,0x62,0x41,0x56,0x4c,0x6c,0x4f,0x50,0x53,0x74,0x59,0x36,0x44,0x4a,0x32,0x33,0x54,0x37,0x39,0x4b,0x30,0x42,0x38,0x31,0x61,0x75,0x35,0x78,0x5a,0x6e,0x63,0x69,0x57,0x76,0x67,0x45,0x68,0x34,0x6a]),_0x47f6c6=0x142a3e64,_0x26d3ee=0x142d57d4^_0x47f6c6,_0x148a2f=window[_0xbed2dd([0x44,0x61,0x74,0x65])][_0xbed2dd([0x6e,0x6f,0x77])](),_0x5381d8=_0x4ad1ec[_0xbed2dd([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4d2acb=new window[(_0xbed2dd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x15b1ce=>{_0x5381d8[_0xbed2dd([0x6f,0x6e,0x63,0x65])](_0xbed2dd([0x72,0x65,0x61,0x64,0x79]),_0x15b1ce);}),_0x4e0970={[_0xbed2dd([0x6b,0x74,0x79])]:_0xbed2dd([0x45,0x43]),[_0xbed2dd([0x75,0x73,0x65])]:_0xbed2dd([0x73,0x69,0x67]),[_0xbed2dd([0x63,0x72,0x76])]:_0xbed2dd([0x50,0x2d,0x32,0x35,0x36]),[_0xbed2dd([0x78])]:_0xbed2dd([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]),[_0xbed2dd([0x79])]:_0xbed2dd([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]),[_0xbed2dd([0x61,0x6c,0x67])]:_0xbed2dd([0x45,0x53,0x32,0x35,0x36])},_0x28f20d=_0x5381d8[_0xbed2dd([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0xbed2dd([0x67,0x65,0x74])](_0xbed2dd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1bbf78(){let _0x2a8673,_0x4bdcef=null,_0x4dd390=null;try{if(_0x28f20d==_0xbed2dd([0x47,0x50,0x4c]))return _0xbed2dd([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2a8673=_0xe921c1(),!_0x2a8673)return _0xbed2dd([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2a8673[_0xbed2dd([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x4dd390=_0x16e515(_0x2a8673[_0xbed2dd([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2a8673[_0xbed2dd([0x6a,0x74,0x69])])),await _0x541123()?_0x1fc82c()?_0x50eb85()?_0xbed2dd([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x19ce77()?(_0x2a8673[_0xbed2dd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xbed2dd([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4bdcef=_0x41118e(_0xbed2dd([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2a8673[_0xbed2dd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xbed2dd([0x74,0x72,0x69,0x61,0x6c])&&(_0x4bdcef=_0x41118e(_0xbed2dd([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x59b3f7()):_0xbed2dd([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0xbed2dd([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0xbed2dd([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0xbed2dd([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x50eb85(){const _0x529b2e=[_0xbed2dd([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0xbed2dd([0x74,0x72,0x69,0x61,0x6c])][_0xbed2dd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2a8673[_0xbed2dd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x148a2f/0x3e8:0xe10*_0x26d3ee;return _0x2a8673[_0xbed2dd([0x65,0x78,0x70])]<_0x529b2e;}function _0x1fc82c(){const _0x2d574f=_0x2a8673[_0xbed2dd([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x2d574f)return!0x1;if(_0x2d574f[_0xbed2dd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xbed2dd([0x2a])))return!0x0;if(_0x2d574f[_0xbed2dd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xbed2dd([0x43,0x4d,0x54])))return!0x0;if(_0x2d574f[_0xbed2dd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xbed2dd([0x52,0x43,0x4d,0x54]))){if(_0x374342())return!0x0;if(_0x2f7926()||_0x1cd32a())return!0x0;}return!0x1;}function _0x19ce77(){const _0x13d1ba=_0x2a8673[_0xbed2dd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x13d1ba||0x0==_0x13d1ba[_0xbed2dd([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5835e8}=new URL(window[_0xbed2dd([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x13d1ba[_0xbed2dd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5835e8))return!0x0;const _0x33a7fd=_0x5835e8[_0xbed2dd([0x73,0x70,0x6c,0x69,0x74])](_0xbed2dd([0x2e]));return _0x13d1ba[_0xbed2dd([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5e2364=>_0x5e2364[_0xbed2dd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xbed2dd([0x2a])))[_0xbed2dd([0x6d,0x61,0x70])](_0x2f7fb5=>_0x2f7fb5[_0xbed2dd([0x73,0x70,0x6c,0x69,0x74])](_0xbed2dd([0x2e])))[_0xbed2dd([0x73,0x6f,0x6d,0x65])](_0x3ee598=>_0x33a7fd[_0xbed2dd([0x65,0x76,0x65,0x72,0x79])]((_0x1fb13a,_0x3a9e7a)=>_0x3ee598[_0x3a9e7a]===_0x1fb13a||_0x3ee598[_0x3a9e7a]===_0xbed2dd([0x2a])));}function _0x59b3f7(){return _0x4bdcef&&_0x4dd390?new window[(_0xbed2dd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1647a6,_0x17d1de)=>{_0x4bdcef[_0xbed2dd([0x74,0x68,0x65,0x6e])](_0x1647a6,_0x17d1de),_0x4dd390[_0xbed2dd([0x74,0x68,0x65,0x6e])](_0x12355b=>{_0x12355b!=_0xbed2dd([0x56,0x61,0x6c,0x69,0x64])&&_0x1647a6(_0x12355b);},_0x17d1de);}):_0x4bdcef||_0x4dd390||_0xbed2dd([0x56,0x61,0x6c,0x69,0x64]);}}function _0x16e515(_0x4a0bb7,_0x257751){return new window[(_0xbed2dd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5c4055=>{if(_0x201e56())return _0x5c4055(_0xbed2dd([0x56,0x61,0x6c,0x69,0x64]));_0x101b85(),_0x5381d8[_0xbed2dd([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0xbed2dd([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x9d5612=!0x1;const _0x22525e=_0x5d5a44();function _0x5c7e66(_0x2ae8dd){return!!_0x2ae8dd&&(typeof _0x2ae8dd===_0xbed2dd([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x2ae8dd===_0xbed2dd([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x2ae8dd[_0xbed2dd([0x74,0x68,0x65,0x6e])]===_0xbed2dd([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x2ae8dd[_0xbed2dd([0x63,0x61,0x74,0x63,0x68])]===_0xbed2dd([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x94cfc0(_0x4c220d){_0x590aa4(_0x4c220d)[_0xbed2dd([0x74,0x68,0x65,0x6e])](_0x1de437=>{if(!_0x1de437||_0x1de437[_0xbed2dd([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0xbed2dd([0x6f,0x6b]))return _0xbed2dd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4a8248(_0x7a1aac(_0x22525e+_0x257751))!=_0x1de437[_0xbed2dd([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0xbed2dd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0xbed2dd([0x56,0x61,0x6c,0x69,0x64]);})[_0xbed2dd([0x74,0x68,0x65,0x6e])](_0x4b01af=>(_0xa01b03(),_0x4b01af),()=>{const _0x431822=_0x1f19c3();return null==_0x431822?(_0xa01b03(),_0xbed2dd([0x56,0x61,0x6c,0x69,0x64])):_0xbed2dd(_0x148a2f-_0x431822>(0x3026ba64^_0x47f6c6)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0xbed2dd([0x74,0x68,0x65,0x6e])](_0x5c4055)[_0xbed2dd([0x63,0x61,0x74,0x63,0x68])](()=>{_0x5c4055(_0xbed2dd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x288ed0=0x141cd0e4^_0x47f6c6;function _0xa01b03(){const _0x81c7f9=_0xbed2dd([0x6c,0x6c,0x63,0x74,0x2d])+_0x4a8248(_0x7a1aac(_0x4a0bb7)),_0x254ffa=_0x1f4717(_0x4a8248(window[_0xbed2dd([0x4d,0x61,0x74,0x68])][_0xbed2dd([0x63,0x65,0x69,0x6c])](_0x148a2f/_0x288ed0)));window[_0xbed2dd([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xbed2dd([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x81c7f9,_0x254ffa);}function _0x1f19c3(){const _0x157d98=_0xbed2dd([0x6c,0x6c,0x63,0x74,0x2d])+_0x4a8248(_0x7a1aac(_0x4a0bb7)),_0x34cf63=window[_0xbed2dd([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xbed2dd([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x157d98);return _0x34cf63?window[_0xbed2dd([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1f4717(_0x34cf63),0x10)*_0x288ed0:null;}function _0x590aa4(_0x32767a){return new window[(_0xbed2dd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2e51a9,_0xa8a9a6)=>{_0x32767a[_0xbed2dd([0x74,0x68,0x65,0x6e])](_0x2e51a9,_0xa8a9a6),window[_0xbed2dd([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0xa8a9a6,0x142beaa4^_0x47f6c6);});}}_0x5381d8[_0xbed2dd([0x6f,0x6e])](_0xbed2dd([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2fced3,_0x5da20f)=>{if(_0x5da20f[0x0]!=_0x4a0bb7)return _0x5c4055(_0xbed2dd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5da20f[0x1]={..._0x5da20f[0x1],[_0xbed2dd([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x22525e};},{[_0xbed2dd([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xbed2dd([0x68,0x69,0x67,0x68])}),_0x5381d8[_0xbed2dd([0x6f,0x6e])](_0xbed2dd([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x260fc3=>{_0x5c7e66(_0x260fc3[_0xbed2dd([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x9d5612=!0x0,_0x94cfc0(_0x260fc3[_0xbed2dd([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0xbed2dd([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xbed2dd([0x6c,0x6f,0x77])}),_0x4d2acb[_0xbed2dd([0x74,0x68,0x65,0x6e])](()=>{_0x9d5612||_0x5c4055(_0xbed2dd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x201e56(){return _0x5381d8[_0xbed2dd([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xbed2dd([0x76,0x69,0x65,0x77])][_0xbed2dd([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0xbed2dd([0x61,0x75,0x74,0x6f]);}function _0x101b85(){_0x5381d8[_0xbed2dd([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xbed2dd([0x76,0x69,0x65,0x77])][_0xbed2dd([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xbed2dd([0x61,0x75,0x74,0x6f]);}}function _0x41118e(_0x2070d7){const _0x3e4891=[new window[(_0xbed2dd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x50819c=>setTimeout(_0x50819c,0x142300a8^_0x47f6c6)),_0x4d2acb[_0xbed2dd([0x74,0x68,0x65,0x6e])](()=>new window[(_0xbed2dd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3da7a9=>{let _0x182774=0x0;_0x5381d8[_0xbed2dd([0x6d,0x6f,0x64,0x65,0x6c])][_0xbed2dd([0x6f,0x6e])](_0xbed2dd([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0xf9cdf0,_0x5c91ea)=>{_0x5c91ea[0x0][_0xbed2dd([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x182774++,_0x182774==(0x142a3f9c^_0x47f6c6)&&(_0x3da7a9(),_0xf9cdf0[_0xbed2dd([0x6f,0x66,0x66])]());});}))];return window[_0xbed2dd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xbed2dd([0x72,0x61,0x63,0x65])](_0x3e4891)[_0xbed2dd([0x74,0x68,0x65,0x6e])](()=>_0x2070d7);}async function _0x248d88(){await _0x4d2acb,_0x5381d8[_0xbed2dd([0x6d,0x6f,0x64,0x65,0x6c])][_0xbed2dd([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5a2059,_0x5381d8[_0xbed2dd([0x6d,0x6f,0x64,0x65,0x6c])][_0xbed2dd([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5a2059,_0x5381d8[_0xbed2dd([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0xbed2dd([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x374342(){return _0x20ab80(_0xbed2dd([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x1ffdbb(_0xbed2dd([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0xbed2dd([0x73,0x74,0x61,0x74,0x65])]==_0xbed2dd([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x2f7926(){return _0x20ab80(_0xbed2dd([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 _0x1cd32a(){return _0x20ab80(_0xbed2dd([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x3c1467(_0x4ebbd4){const _0x50ff8b=_0x1f66f4();_0x5381d8[_0x50ff8b]=_0xbed2dd([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x4ebbd4,_0x4ebbd4!=_0xbed2dd([0x56,0x61,0x6c,0x69,0x64])&&_0x248d88();}function _0x1f66f4(){const _0xf0c381=window[_0xbed2dd([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0xbed2dd([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0xbed2dd([0x6e,0x6f,0x77])]())[_0xbed2dd([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0xbed2dd([0x2e]),'');let _0x34c851=_0xbed2dd([0x4d]);for(let _0x1d1b64=0x0;_0x1d1b64<_0xf0c381[_0xbed2dd([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1d1b64+=0x2){let _0x5602e2=window[_0xbed2dd([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xf0c381[_0xbed2dd([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1d1b64,_0x1d1b64+0x2));_0x5602e2>=_0x341e0a[_0xbed2dd([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5602e2-=_0x341e0a[_0xbed2dd([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x34c851+=_0x341e0a[_0x5602e2];}return _0x34c851;}function _0xe921c1(){const _0x5a1571=_0x28f20d[_0xbed2dd([0x73,0x70,0x6c,0x69,0x74])](_0xbed2dd([0x2e]));if(0x3!=_0x5a1571[_0xbed2dd([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3379a9(_0x5a1571[0x1]);function _0x3379a9(_0x519e64){const _0x218fdf=_0x26d226(_0x519e64);return _0x218fdf&&_0x46e133()?_0x218fdf:null;function _0x46e133(){const _0x908cab=_0x218fdf[_0xbed2dd([0x6a,0x74,0x69])],_0xd4504f=window[_0xbed2dd([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x908cab[_0xbed2dd([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x908cab[_0xbed2dd([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x544795={..._0x218fdf,[_0xbed2dd([0x6a,0x74,0x69])]:_0x908cab[_0xbed2dd([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x908cab[_0xbed2dd([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x544795[_0xbed2dd([0x76,0x63])],_0x7a1aac(_0x544795)==_0xd4504f;}}}async function _0x541123(){let _0x50438c=!0x0;try{const _0xecd77c=_0x28f20d[_0xbed2dd([0x73,0x70,0x6c,0x69,0x74])](_0xbed2dd([0x2e])),[_0x430024,_0x34eb62,_0x2885dc]=_0xecd77c;return _0x3da518(_0x430024),await _0x198c81(_0x430024,_0x34eb62,_0x2885dc),_0x50438c;}catch{return!0x1;}function _0x3da518(_0x2f760a){const _0x409299=_0x26d226(_0x2f760a);_0x409299&&_0x409299[_0xbed2dd([0x61,0x6c,0x67])]==_0xbed2dd([0x45,0x53,0x32,0x35,0x36])||(_0x50438c=!0x1);}async function _0x198c81(_0x260695,_0x467147,_0x16be4b){const _0x44d82f=window[_0xbed2dd([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0xbed2dd([0x66,0x72,0x6f,0x6d])](_0x14ed67(_0x16be4b),_0x190b37=>_0x190b37[_0xbed2dd([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x49ff78=new window[(_0xbed2dd([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0xbed2dd([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x260695+_0xbed2dd([0x2e])+_0x467147),_0x51b5aa=window[_0xbed2dd([0x63,0x72,0x79,0x70,0x74,0x6f])][_0xbed2dd([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x51b5aa)return;const _0x20c900=await _0x51b5aa[_0xbed2dd([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0xbed2dd([0x6a,0x77,0x6b]),_0x4e0970,{[_0xbed2dd([0x6e,0x61,0x6d,0x65])]:_0xbed2dd([0x45,0x43,0x44,0x53,0x41]),[_0xbed2dd([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0xbed2dd([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0xbed2dd([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x51b5aa[_0xbed2dd([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0xbed2dd([0x6e,0x61,0x6d,0x65])]:_0xbed2dd([0x45,0x43,0x44,0x53,0x41]),[_0xbed2dd([0x68,0x61,0x73,0x68])]:{[_0xbed2dd([0x6e,0x61,0x6d,0x65])]:_0xbed2dd([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x20c900,_0x44d82f,_0x49ff78)||(_0x50438c=!0x1);}}function _0x26d226(_0x241186){return _0x241186[_0xbed2dd([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0xbed2dd([0x65,0x79]))?JSON[_0xbed2dd([0x70,0x61,0x72,0x73,0x65])](_0x14ed67(_0x241186)):null;}function _0x14ed67(_0x4bec8e){return window[_0xbed2dd([0x61,0x74,0x6f,0x62])](_0x4bec8e[_0xbed2dd([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0xbed2dd([0x2b]))[_0xbed2dd([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0xbed2dd([0x2f])));}function _0x7a1aac(_0x56b263){let _0x3bc20e=0x1505;function _0x304bb6(_0x237b37){for(let _0x183187=0x0;_0x183187<_0x237b37[_0xbed2dd([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x183187++){const _0x55b2af=_0x237b37[_0xbed2dd([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x183187);_0x3bc20e=(_0x3bc20e<<0x5)+_0x3bc20e+_0x55b2af,_0x3bc20e&=_0x3bc20e;}}function _0x29e5ab(_0x246079){Array[_0xbed2dd([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x246079)?_0x246079[_0xbed2dd([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x29e5ab):_0x246079&&typeof _0x246079==_0xbed2dd([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0xbed2dd([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x246079)[_0xbed2dd([0x73,0x6f,0x72,0x74])]()[_0xbed2dd([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x34f04e,_0x31c330])=>{_0x304bb6(_0x34f04e),_0x29e5ab(_0x31c330);}):_0x304bb6(window[_0xbed2dd([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x246079));}return _0x29e5ab(_0x56b263),_0x3bc20e>>>0x0;}function _0x4a8248(_0x3db1d2){return _0x3db1d2[_0xbed2dd([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0xbed2dd([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0xbed2dd([0x30]));}function _0x1f4717(_0x2e19b0){return _0x2e19b0[_0xbed2dd([0x73,0x70,0x6c,0x69,0x74])]('')[_0xbed2dd([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0xbed2dd([0x6a,0x6f,0x69,0x6e])]('');}function _0x20ab80(_0x22fe6b){return _0x5381d8[_0xbed2dd([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0xbed2dd([0x68,0x61,0x73])](_0x22fe6b);}function _0x1ffdbb(_0x1a0fe5){return _0x5381d8[_0xbed2dd([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0xbed2dd([0x67,0x65,0x74])](_0x1a0fe5);}function _0x5a2059(){}function _0xbed2dd(_0x3d0e89){return _0x3d0e89['map'](_0x198333=>String['fromCharCode'](_0x198333))['join']('');}_0x3c1467(await _0x1bbf78());}(this);}['destroy'](){const _0x11034a=this['editor']['plugins']['get'](o),_0xb04716=this['editor']['config']['get']('collaboration.channelId');for(const _0x2a3955 of _0x11034a['getCommentThreads']({'channelId':_0xb04716}))_0x11034a['_detachCommentThread'](_0x2a3955['id']),_0x11034a['_threads']['delete'](_0x2a3955['id']);super['destroy']();}['hasMarkerForId'](_0x4b5dbc){return this['getAllMarkersForId'](_0x4b5dbc)['length']>0x0;}['getAllMarkersForId'](_0xa7b542){const _0x3de1c8=[];for(const _0x32b437 of this['editor']['model']['markers'])_0x32b437['name']['startsWith']('comment:'+_0xa7b542)&&_0x3de1c8['push'](_0x32b437);return _0x3de1c8;}['scrollToThreadMarker'](_0xe4636d){const _0x93dbc0=this['_getTargetForId'](_0xe4636d);_0x93dbc0&&setTimeout(()=>{this['activeMarker']&&er(this['activeMarker'])['id']===_0xe4636d&&rt({'target':_0x93dbc0[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x4ea463){this['editor']['model']['change'](()=>{for(const _0x565ab2 of this['getAllMarkersForId'](_0x4ea463))this['editor']['editing']['reconvertMarker'](_0x565ab2);});}['_attachArchivedThread'](_0x1b5fb1){const _0x5c2db3=this['editor']['plugins']['get'](o),_0x12ef0c=this['editor']['plugins']['get'](P),_0x381426=_0x5c2db3['getCommentThread'](_0x1b5fb1);if(!_0x381426['isAttached']){const _0x42cf8f=_0x381426['attachTo'](()=>this['_getTargetForId'](_0x381426['id']));_0x12ef0c['registerAnnotation'](_0x42cf8f),_0x381426['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x48a5e1=this['editor'],_0x19adb4=_0x48a5e1['plugins']['get'](it);_0x48a5e1['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x1b4b81,_0x55ef63)=>{const {id:_0x1a4426}=er(_0x1b4b81['markerName']),_0x2b8c75=_0x48a5e1['plugins']['get'](o)['getCommentThread'](_0x1a4426),_0x1a50e9=this['activeMarker']&&er(this['activeMarker'])['id']===_0x1a4426;let _0x9d4be8;if(_0x2b8c75&&_0x2b8c75['isResolved']&&!_0x1a50e9&&_0x1b4b81['item'])return _0x55ef63['consumable']['consume'](_0x1b4b81['item'],'addMarker:'+_0x1b4b81['markerName']),_0x55ef63['consumable']['consume'](_0x1b4b81['item'],'removeMarker:'+_0x1b4b81['markerName']),null;const _0x554903=['ck-comment-marker'];return _0x1a50e9&&_0x554903['push']('ck-comment-marker--active'),_0x9d4be8=_0x2b8c75?.['length']?_0x2b8c75['comments']['first']['author']['id']:_0x19adb4['me']['id'],{'classes':_0x554903,'attributes':{'data-comment':_0x1a4426,'data-author-id':_0x9d4be8}};}}),_0x48a5e1['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x534782,{options:_0x4e701d})=>{if(_0x4e701d['showCommentHighlights'])return null;const _0x249d25=_0x48a5e1['plugins']['get'](o),_0x1f85c4=_0x48a5e1['model']['markers']['get'](_0x534782),{id:_0x6e5215,part:_0x4a5424}=er(_0x534782);return _0x1f85c4&&!_0x1f85c4['affectsData']||_0x4e701d['ignoreResolvedComments']&&_0x249d25['getCommentThread'](_0x6e5215)?.['isResolved']?null:{'group':'comment','name':_0x4a5424?_0x6e5215+':'+_0x4a5424:_0x6e5215};}}),_0x48a5e1['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0xf09030,{writer:_0x40c68a})=>_0x40c68a['createElement']('$marker',{'data-name':'comment:'+_0xf09030['getAttribute']('id')})}),_0x48a5e1['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x5a5b20=this['editor'],_0x2d2c09=_0x5a5b20['plugins']['get'](o),_0x56edd7=new Set(),_0xdb6ff5=new Set();_0x5a5b20['model']['document']['registerPostFixer'](_0x328d65=>{let _0x432523=!0x1;for(const {name:_0x25fc72,data:_0x4f0f01}of _0x5a5b20['model']['document']['differ']['getChangedMarkers']()){const {group:_0x11247b,id:_0x2a4ae8}=er(_0x25fc72);let _0x2f1484=_0x4f0f01['newRange'];if('comment'!==_0x11247b||!_0x2f1484)continue;const _0x145cd1='$graveyard'===_0x2f1484['root']['rootName'];_0x145cd1||(_0x2f1484=dt(_0x2f1484,_0x5a5b20['model']),!_0x2f1484||_0x2f1484['isCollapsed']||!_0x4f0f01['newRange']||_0x2f1484['isEqual'](_0x4f0f01['newRange']))?_0x5a5b20['model']['hasContent'](_0x2f1484)&&!_0x145cd1?this['isThreadsLoadingPaused']?_0x56edd7['add'](_0x25fc72):this['_handleThreadMarker'](_0x25fc72,_0x2a4ae8):(_0xdb6ff5['add'](_0x25fc72),_0x56edd7['delete'](_0x25fc72),_0x328d65['removeMarker'](_0x25fc72),_0x432523=!0x0):(_0x328d65['updateMarker'](_0x25fc72,{'range':_0x2f1484}),_0x432523=!0x0);}return _0x432523;}),this['on']('change:isThreadsLoadingPaused',(_0x32defb,_0x1f6a7c,_0x1206a6)=>{if(!_0x1206a6&&_0x56edd7['size'])for(const _0x3329fc of _0x56edd7){const {id:_0x479609}=er(_0x3329fc);_0x56edd7['delete'](_0x3329fc),_0x5a5b20['model']['markers']['get'](_0x3329fc)&&this['_handleThreadMarker'](_0x3329fc,_0x479609);}}),this['listenTo'](_0x5a5b20['model']['document'],'change',()=>{for(const {name:_0x188137,data:{newRange:_0x3cffd4}}of _0x5a5b20['model']['document']['differ']['getChangedMarkers']()){const {group:_0x11df83,id:_0x9ede17}=er(_0x188137);if('comment'!==_0x11df83)continue;const _0x27f393=_0x2d2c09['getCommentThread'](_0x9ede17),_0x4b21bc=this['hasMarkerForId'](_0x9ede17);_0x27f393&&(!_0x27f393['_hasTargetInContent']&&_0x3cffd4&&_0x5a5b20['editing']['view']['once']('render',()=>{const _0x45b2c7=_0x5a5b20['plugins']['get'](O),_0x6423fe=_0x2d2c09['_threadToController']['get'](_0x27f393)['view'];_0x45b2c7['getByInnerView'](_0x6423fe)['refreshVisibility']();},{'priority':'low'}),_0x27f393['_hasTargetInContent']=_0x4b21bc||!!_0x3cffd4),_0x3cffd4||(_0xdb6ff5['add'](_0x188137),_0x56edd7['delete'](_0x188137));}for(const _0x1a0072 of _0xdb6ff5){const {id:_0x3a036f}=er(_0x1a0072),_0xee0252=_0x2d2c09['getCommentThread'](_0x3a036f);if(_0x56edd7['delete'](_0x1a0072),!_0xee0252)continue;const _0x4a5118=this['hasMarkerForId'](_0x3a036f);_0x4a5118||_0xee0252['isSubmitted']?_0x4a5118||_0xee0252['unlinkedAt']||_0xee0252['setUnlinkedAt'](new Date()):_0xee0252['remove']();}_0xdb6ff5['clear']();});}['_handleInitialThreads'](_0xe47656){_0xe47656['forEach'](_0x31b0fa=>{_0x31b0fa['unlinkedAt']&&this['_attachArchivedThread'](_0x31b0fa['id']);});}['_getTargetForId'](_0x44686b){const _0xe5bfca=this['editor'],_0x23f0a6=this['getAllMarkersForId'](_0x44686b);return et(_0xe5bfca['editing'],_0x23f0a6);}['_getTextContext'](_0x4fe6cd){const _0xd0e94b=this['getAllMarkersForId'](_0x4fe6cd);let _0x526003='',_0x2a50e0=!0x1;for(const _0x4d1aec of _0xd0e94b){const _0x5a738f=_0x4d1aec['getRange']();for(const _0x3c9f47 of Array['from'](_0x5a738f['getItems']()))_0x3c9f47['is']('$textProxy')?(_0x526003&&_0x2a50e0&&(_0x526003+='\x20',_0x2a50e0=!0x1),_0x526003+=_0x3c9f47['data']):_0x2a50e0=!0x0;_0x2a50e0=!0x0;}return _0x526003['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x160686,_0x4f8aa5){const _0x5de73e=this['editor'],_0x2665fd=_0x5de73e['plugins']['get'](o);let _0x3653a9=_0x2665fd['getCommentThread'](_0x4f8aa5);const _0x1d7c75=_0x5de73e['config']['get']('collaboration.channelId'),_0x4fb33d=_0x5de73e['plugins']['get'](P);if(_0x3653a9&&(_0x3653a9['unlinkedAt']&&_0x3653a9['setUnlinkedAt'](null),_0x3653a9['isAttached']))return _0x3653a9;return!this['getAllMarkersForId'](_0x4f8aa5)[0x0]['managedUsingOperations']?_0x5de73e['editing']['view']['once']('render',()=>{if(_0x2665fd['getCommentThread'](_0x4f8aa5))return;const _0x307c7e=_0x5de73e['plugins']['get'](O);_0x3653a9=_0x2665fd['openNewCommentThread']({'channelId':_0x1d7c75,'threadId':_0x4f8aa5,'target':()=>this['_getTargetForId'](_0x4f8aa5),'context':{'type':'text','value':this['_getTextContext'](_0x4f8aa5)}});const _0x22ba34=_0x2665fd['_threadToController']['get'](_0x3653a9)['view'],_0xd0dfdb=_0x307c7e['getByInnerView'](_0x22ba34);_0xd0dfdb&&_0x4fb33d['registerAnnotation'](_0xd0dfdb);},{'priority':'low'}):_0x2665fd['fetchCommentThread']({'channelId':_0x1d7c75,'threadId':_0x4f8aa5})['then'](_0x3f7447=>{if('destroyed'!==_0x5de73e['state']){if(_0x3653a9=_0x3f7447,_0x3653a9&&!_0x3653a9['isAttached']){const _0x58ab08=_0x3653a9['attachTo'](()=>this['_getTargetForId'](_0x4f8aa5));_0x4fb33d['registerAnnotation'](_0x58ab08),_0x3653a9['isResolved']&&this['_reconvertMarkers'](_0x4f8aa5);}else{if(!_0x3653a9){const _0x28f770=this['getAllMarkersForId'](_0x4f8aa5);_0x5de73e['model']['change'](_0x394d27=>{for(const _0x315913 of _0x28f770)_0x394d27['removeMarker'](_0x315913);});}}}}),_0x3653a9;}['_handleThreadMarker'](_0x3d5298,_0x2d7204){const _0x39ca24=this['_attachMarkerToThread'](_0x3d5298,_0x2d7204);_0x39ca24&&!_0x39ca24['context']&&_0x39ca24['setContext']({'type':'text','value':this['_getTextContext'](_0x2d7204)});}['_initAriaMarkerChangeAnnouncements'](){const _0x583f89=this['editor'];ot(_0x583f89['model'],({left:_0x49d39a,entered:_0x35e47d})=>{for(const _0x2d3885 of _0x49d39a)if(mt(_0x2d3885)){_0x583f89['ui']['ariaLiveAnnouncer']['announce'](E(_0x583f89['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x3a8742 of _0x35e47d)if(mt(_0x3a8742)){_0x583f89['ui']['ariaLiveAnnouncer']['announce'](E(_0x583f89['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x18815c)));break;}});}}function ft(_0x47419d,_0x18071e){return _0x18071e?_0x47419d+':'+_0x18071e:_0x47419d;}function er(_0x3ef114){const _0x43b068=_0x3ef114['split'](':');return{'group':_0x43b068[0x0],'id':_0x43b068[0x1],'part':_0x43b068[0x2]};}function dt(_0x2fa328,_0x3d676d){const _0x22b5bb=_0x3d676d['schema'],_0x155f00=_0x3d676d['createRange'](_0x2fa328['start']);for(const _0x98969f of _0x2fa328['getWalker']()){const {type:_0x1cb111,item:_0x30d6e2,nextPosition:_0x11c156}=_0x98969f;if('text'===_0x1cb111||_0x22b5bb['isObject'](_0x30d6e2)){const _0x2f44c4=_0x3d676d['createPositionBefore'](_0x30d6e2);_0x155f00['isCollapsed']&&(_0x155f00['start']=_0x2f44c4),_0x155f00['end']=_0x11c156;}}return _0x155f00;}function mt(_0x41dccf){return'comment'===er(_0x41dccf['name'])['group'];}class i extends _0x4e6ffe{['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 _0x5e26e6=this['editor'],_0x3cdf5b=_0x5e26e6['plugins']['get'](o),_0xac7676=_0x5e26e6['plugins']['get'](r),_0x278b61=_0x5e26e6['plugins']['get'](O),_0x1568ee=_0x5e26e6['plugins']['get'](P);_0x5e26e6['ui']['componentFactory']['add']('comment',()=>{const _0x33ba46=this['_createUIButton'](_0x59b830);return _0x33ba46['tooltip']=!0x0,_0x33ba46;}),_0x5e26e6['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x38f3a4)),_0x1568ee['addSourceCollector'](()=>{const _0x47c670=[];for(const [_0x399a0b,_0xf571ce]of _0x3cdf5b['_threadToController']){const _0x1cabb8=_0xac7676['getAllMarkersForId'](_0x399a0b['id']),_0x22f479=_0x1cabb8['map'](_0x5c88e5=>_0x5c88e5['getRange']());_0x1cabb8['length']>0x0&&_0x47c670['push']([_0xf571ce['view'],_0x22f479]);}return _0x47c670;}),this['listenTo'](_0x278b61,'change:activeAnnotations',(_0x2a377c,_0x2fad99,_0x174c83)=>{const _0x22b05a=Array['from'](_0x174c83)['map'](_0x8a95a4=>_0x8a95a4['innerView'])['find'](_0x3ce575=>_0x3cdf5b['_viewToController']['has'](_0x3ce575));if(!_0x22b05a)return void(_0xac7676['activeMarker']=null);const _0x526853=_0x3cdf5b['_viewToController']['get'](_0x22b05a)['model']['id'],_0x5ca53d='comment:'+_0x526853;_0x526853&&_0xac7676['hasMarkerForId'](_0x526853)?_0xac7676['activeMarker']=_0x5ca53d:_0xac7676['activeMarker']&&(_0xac7676['activeMarker']=null);}),this['listenTo'](_0x3cdf5b,'removeCommentThread',(_0x1d6c3d,{threadId:_0x6c820a,isFromAdapter:_0x501d6e})=>{!_0x501d6e&&_0x5e26e6['ui']['focusTracker']['isFocused']&&_0xac7676['hasMarkerForId'](_0x6c820a)&&_0x5e26e6['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x3cdf5b,'addComment',(_0x505ccb,{threadId:_0x126cbe,isFromAdapter:_0x2c7313})=>{if(_0x2c7313||!_0xac7676['hasMarkerForId'](_0x126cbe)||!_0x3cdf5b['hasCommentThread'](_0x126cbe))return;0x1===_0x3cdf5b['getCommentThread'](_0x126cbe)['length']&&(_0x5e26e6['editing']['view']['focus'](),_0x505ccb['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x512b12=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x6f415b;for(const _0x371d82 in _0x512b12){const _0x52fd24=_0x371d82,_0x1989fc=_0x512b12[_0x52fd24];if('commentsLicenseKeyValid'==_0x1989fc||'commentsLicenseKeyInvalid'==_0x1989fc||'commentsLicenseKeyExpired'==_0x1989fc||'commentsLicenseKeyDomainLimit'==_0x1989fc||'commentsLicenseKeyNotAllowed'==_0x1989fc||'commentsLicenseKeyEvaluationLimit'==_0x1989fc||'commentsLicenseKeyTrialLimit'==_0x1989fc||'commentsLicenseKeyUsageLimit'==_0x1989fc){delete _0x512b12[_0x52fd24],_0x6f415b=_0x1989fc,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x6f415b&&_0x512b12['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x6f415b&&_0x512b12['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x6f415b&&_0x512b12['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x6f415b&&_0x512b12['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x6f415b&&_0x512b12['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x6f415b&&_0x512b12['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x6f415b&&_0x512b12['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x3409d6){const _0x404d46=this['editor'],_0x4504c3=new _0x3409d6(_0x404d46['locale']),_0x141c16=_0x404d46['commands']['get']('addCommentThread');return _0x4504c3['set']({'label':E(_0x404d46['locale'],'Comment'),'icon':_0x723f12}),_0x4504c3['bind']('isEnabled')['to'](_0x141c16),this['listenTo'](_0x4504c3,'execute',()=>{_0x141c16['execute']();}),_0x4504c3;}}class s extends _0x4e6ffe{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x123b4d){super(_0x123b4d),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x8792ce,_0x178055,_0x575e99)=>{_0x575e99?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x4a9dbe,_0x4fb5ad]of this['editor']['commands'])_0x4fb5ad['affectsData']&&'addCommentThread'!==_0x4a9dbe&&_0x4fb5ad['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 _0x23e02f=this['editor']['editing']['view']['document'];this['listenTo'](_0x23e02f,'cut',_0xd6e51f=>_0xd6e51f['stop'](),{'priority':'highest'}),this['listenTo'](_0x23e02f,'clipboardInput',_0x2cf547=>_0x2cf547['stop'](),{'priority':'highest'}),this['listenTo'](_0x23e02f,'delete',_0x883cc2=>_0x883cc2['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x1092e3,_0x74e5c4]of this['editor']['commands'])_0x74e5c4['affectsData']&&'addCommentThread'!==_0x1092e3&&_0x74e5c4['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 _0x27e7bc{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[O];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x22f144){super(_0x22f144),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x44c303=this['context']['plugins']['get'](O);this['listenTo'](_0x44c303,'_activateAnnotation',(_0x49c814,_0x340428)=>{for(const _0x2270a6 of this['activeUIs']){const _0x57ebd1=this['_uis']['get'](_0x2270a6);(0x0,this['uisData']['get'](_0x2270a6)['filter'])(_0x340428)&&_0x57ebd1['setActiveAnnotation'](_0x340428);}}),this['listenTo'](_0x44c303,'_deactivateAllAnnotations',()=>{for(const _0x1c48b0 of this['activeUIs']){this['_uis']['get'](_0x1c48b0)['setActiveAnnotation'](null);}}),this['listenTo'](_0x44c303['_visibleAnnotations'],'add',(_0x20047f,_0xdcd8e3)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xdcd8e3);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x34a4c3){return this['activeUIs']['has'](_0x34a4c3);}['activate'](_0x301fac,_0x3955f5=this['defaultFilter']){const _0x1bd286=this['context']['plugins']['get'](O);if(!this['_uis']['has'](_0x301fac))throw new _0x5bf711('annotationsuis-missing-ui',this,{'uiName':_0x301fac});this['isActive'](_0x301fac)&&this['deactivate'](_0x301fac),this['activeUIs']['add'](_0x301fac);const _0x56aea4=new _();!function({source:_0x373b8c,target:_0x2a92ca,filter:_0x5db42a}){for(const _0x545e7a of _0x373b8c)_0x5db42a(_0x545e7a)&&_0x2a92ca['add'](_0x545e7a);_0x2a92ca['listenTo'](_0x373b8c,'add',(_0x2c44ab,_0x56eca3)=>{_0x5db42a(_0x56eca3)&&_0x2a92ca['add'](_0x56eca3);}),_0x2a92ca['listenTo'](_0x373b8c,'remove',(_0x5e77c5,_0x2d449a)=>{_0x2a92ca['has'](_0x2d449a)&&_0x2a92ca['remove'](_0x2d449a);});}({'source':_0x1bd286['_visibleAnnotations'],'target':_0x56aea4,'filter':_0x3955f5}),this['uisData']['set'](_0x301fac,{'collection':_0x56aea4,'filter':_0x3955f5});const _0x185801=this['_uis']['get'](_0x301fac);_0x185801['attach'](_0x56aea4),this['listenTo'](_0x185801,'change:activeAnnotation',(_0x3a2648,_0x24a2a8,_0x40d7f0,_0x22a234)=>{_0x22a234&&_0x1bd286['_removeActiveAnnotation'](_0x22a234),_0x40d7f0&&_0x1bd286['_addActiveAnnotation'](_0x40d7f0);});}['deactivate'](_0x2df04a){if(this['activeUIs']['delete'](_0x2df04a),!this['_uis']['has'](_0x2df04a))throw new _0x5bf711('annotationsuis-missing-ui',this,{'uiName':_0x2df04a});const _0x43c6cf=this['_uis']['get'](_0x2df04a);_0x43c6cf['detach'](),this['stopListening'](_0x43c6cf),this['uisData']['get'](_0x2df04a)['collection']['destroy'](),this['uisData']['delete'](_0x2df04a);}['switchTo'](_0x4dd44e){if(!this['_uis']['has'](_0x4dd44e))throw new _0x5bf711('annotationsuis-missing-ui',this,{'uiName':_0x4dd44e});const _0x268cd9=this['context']['plugins']['get'](O),_0x3111b3=Array['from'](_0x268cd9['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x4dd44e);const _0x590ac6=this['_uis']['get'](_0x4dd44e);_0x590ac6['setActiveAnnotation'](_0x3111b3),_0x590ac6['_setSelectedAnnotations']&&_0x3111b3&&_0x590ac6['_setSelectedAnnotations']([_0x3111b3]);}['deactivateAll'](){for(const _0x1e2846 of this['activeUIs'])this['deactivate'](_0x1e2846);}['register'](_0x5c1287,_0x38ad00){if(this['_uis']['has'](_0x5c1287))throw new _0x5bf711('annotationsuis-register-already-registered');if('function'!=typeof _0x38ad00['attach']||'function'!=typeof _0x38ad00['detach']||'function'!=typeof _0x38ad00['setActiveAnnotation'])throw new _0x5bf711('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x5c1287,_0x38ad00);}['refilterAnnotations'](){const _0x3c4f06=this['context']['plugins']['get'](O)['collection'],_0x259c9d=new Map(),_0x231c99=Array['from'](this['activeUIs']);for(const _0x54d0fe of this['activeUIs']){const _0x271aec=this['uisData']['get'](_0x54d0fe)['collection'];for(const _0x42f0ae of _0x271aec)_0x259c9d['set'](_0x42f0ae,_0x54d0fe);}for(const _0x3210f5 of _0x3c4f06){const _0x19f812=_0x259c9d['get'](_0x3210f5);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3210f5);const _0x21af37=_0x231c99['find'](_0x5afdc7=>this['uisData']['get'](_0x5afdc7)['filter'](_0x3210f5));_0x19f812!==_0x21af37&&(_0x19f812&&this['uisData']['get'](_0x19f812)['collection']['remove'](_0x3210f5),_0x21af37&&this['uisData']['get'](_0x21af37)['collection']['add'](_0x3210f5));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x29f4f7){const _0x270b2b=[];for(const _0xc3c670 of this['activeUIs']){(0x0,this['uisData']['get'](_0xc3c670)['filter'])(_0x29f4f7)&&_0x270b2b['push'](_0xc3c670);}if(_0x270b2b['length']>0x1)throw new _0x5bf711('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x270b2b,'annotationType':_0x29f4f7['type']});}}const pi=xt('px');class F extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x494da1){super(_0x494da1);const _0x35ae1a=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 _0x1096d1(),this['focusCycler']=new _0x47bf62({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x35ae1a['to']('class')],'style':{'minHeight':_0x35ae1a['to']('minHeight',_0x5a61ba=>'number'==typeof _0x5a61ba?pi(_0x5a61ba+0xa):null)},'dir':_0x494da1['uiLanguageDirection'],'role':'application','aria-label':E(_0x494da1,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':E(_0x494da1,'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',_0x46fcc9=>{this['_updateItemPositionInFocusables'](_0x46fcc9['source']);}),this['list']['forEach'](_0x394011=>{this['focusTracker']['add'](_0x394011['element']),this['_updateItemPositionInFocusables'](_0x394011);}),this['list']['on']('change',(_0x570e80,_0x44368c)=>{for(const _0x59ee9e of _0x44368c['removed'])this['focusTracker']['remove'](_0x59ee9e['element']),this['focusables']['remove'](_0x59ee9e);for(const _0x12f9d7 of _0x44368c['added'])this['focusTracker']['add'](_0x12f9d7['element']),this['_updateItemPositionInFocusables'](_0x12f9d7);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x43ac57){const _0xfc23ff=this['focusables']['getIndex'](_0x43ac57);let _0xec8b9f,_0x186fe0;for(const _0x179fcd of this['focusables'])if(_0x43ac57['top']<_0x179fcd['top']){_0xec8b9f=_0x179fcd;break;}if(_0x186fe0=_0xec8b9f?this['focusables']['getIndex'](_0xec8b9f):this['focusables']['length'],-0x1!==_0xfc23ff){if(_0xfc23ff===_0x186fe0-0x1)return;this['focusables']['remove'](_0x43ac57),_0x186fe0=_0xec8b9f?this['focusables']['getIndex'](_0xec8b9f):this['focusables']['length'];}this['focusables']['add'](_0x43ac57,_0x186fe0);}}const Ht=xt('px');class H extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x2ac1da){super(_0x2ac1da),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x56b1b,_0x5f043d)=>_0x56b1b+_0x5f043d),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Lt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x4c1471=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x4c1471['to']('isAnimationDisabled',_0xcf7d3f=>_0xcf7d3f?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x4c1471['to']('top',_0x814122=>Ht(_0x814122))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x5ac2b9=this['element']['clientHeight'];_0x5ac2b9&&(this['height']=_0x5ac2b9);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x27e7bc{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1f05d7){super(_0x1f05d7),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 _0x9fc60c=this['context']['config']['get']('sidebar.container');_0x9fc60c&&this['setContainer'](_0x9fc60c);}['setContainer'](_0x1a426e){if(!y(_0x1a426e))throw new _0x5bf711('sidebar-setcontainer-invalid-element');this['container']=_0x1a426e;}['_attachToContainer']({viewClass:_0x4d83b2='',spaceBetweenItems:_0x508266=0x19}={}){if(!y(this['container']))throw new _0x5bf711('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x4d83b2,this['_spaceBetweenItems']=_0x508266;}['rearrange']({removedAnnotation:_0x5065aa,previousAnnotation:_0x35a5c0,nextAnnotation:_0x55f5d0}){const _0x4caedf=this['getSidebarItemView'](_0x5065aa);this['view']['list']['remove'](_0x4caedf),this['_destroySidebarItemView'](_0x5065aa),_0x35a5c0&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x35a5c0)),_0x55f5d0&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x55f5d0)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x199860,activatedAnnotation:_0x39776a,disableAnimationOnActivatedAnnotation:_0x399ce2}){if(this['_activeAnnotation']=_0x39776a,_0x199860){_0x199860['isActive']=!0x1;const _0x84b0f7=this['getSidebarItemView'](_0x199860);_0x84b0f7&&_0x399ce2&&(_0x84b0f7['isAnimationDisabled']=!0x1);}if(_0x39776a){const _0x157859=this['getSidebarItemView'](_0x39776a);_0x157859&&(_0x39776a['isActive']=!0x0,_0x399ce2&&(_0x157859['isAnimationDisabled']=!0x0,_0x157859['top']+=0x1),this['_alignToTargetRect'](_0x157859));}}['_detachFromContainer'](_0x3db3a4){if(this['view']['element']['remove'](),_0x3db3a4){for(const _0x597869 of _0x3db3a4)this['_destroySidebarItemView'](_0x597869);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x175332,_0x3cda4c){_0x3cda4c||(_0x3cda4c=_0x175332['view']);const _0x32aaec=new H(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x32aaec,_0x175332),this['_annotationToSidebarItemView']['set'](_0x175332,_0x32aaec),_0x32aaec['content']['add'](_0x3cda4c),this['listenTo'](_0x175332['view'],'change:targetRect',(_0x316599,_0x2b7e9b,_0x34efce)=>{const _0x3f566f=this['_getTargetTop'](_0x175332,_0x34efce);_0x32aaec['_targetTop']!=_0x3f566f&&(_0x32aaec['_targetTop']=_0x3f566f,this['_setItemTop'](_0x32aaec,_0x3f566f));}),this['listenTo'](_0x32aaec,'change:top',()=>{this['_recalculate'](_0x32aaec,'top');}),this['listenTo'](_0x32aaec,'change:bottom',()=>{this['_recalculate'](_0x32aaec,'bottom');}),this['_alignToTargetRect'](_0x32aaec);const _0x10b28f=this['_getItemBefore'](_0x32aaec);if(_0x10b28f)this['_alignAfterItem'](_0x10b28f,_0x32aaec)||this['_alignToTargetRect'](_0x32aaec);else this['_alignToTargetRect'](_0x32aaec);return this['_updateLastItem'](),this['view']['list']['add'](_0x32aaec),_0x32aaec;}['_alignForTopChange'](_0x5ad585){if(!_0x5ad585['content']['length'])return;const _0x2241d5=this['_getItemBefore'](_0x5ad585);if(!_0x2241d5)return;const _0x4661a1=this['_sidebarItemViewToAnnotation']['get'](_0x2241d5),_0x5ee811=this['_activeAnnotation'];_0x5ee811&&_0x5ee811===_0x4661a1?this['_alignAfterItem'](_0x2241d5,_0x5ad585):this['_alignBeforeItem'](_0x5ad585,_0x2241d5);}['_alignForBottomChange'](_0x4116fa){if(!_0x4116fa['content']['length'])return;const _0x4e1789=this['_getItemAfter'](_0x4116fa);if(!_0x4e1789)return;const _0x5e421c=this['_sidebarItemViewToAnnotation']['get'](_0x4e1789),_0x463c43=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0xf91826=this['_activeAnnotation'];_0xf91826&&_0xf91826===_0x5e421c&&_0x463c43?(this['_alignBeforeItem'](_0x4e1789,_0x4116fa),this['_alignAfterItem'](_0x4116fa,_0x4e1789)):_0xf91826&&_0xf91826===_0x5e421c?this['_alignBeforeItem'](_0x4e1789,_0x4116fa):this['_alignAfterItem'](_0x4116fa,_0x4e1789);}['_recalculate'](_0x32e039,_0x5dd5a4){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x4921ef,changedProp:_0x5816a3}of this['_recalculateBuffer'])'top'===_0x5816a3?this['_alignForTopChange'](_0x4921ef):this['_alignForBottomChange'](_0x4921ef);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x32e039,'changedProp':_0x5dd5a4});}['getSidebarItemView'](_0x572a4c){return this['_annotationToSidebarItemView']['get'](_0x572a4c);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x3c9ee4){const _0xfb82b8=this['getSidebarItemView'](_0x3c9ee4);this['stopListening'](_0xfb82b8),this['stopListening'](_0x3c9ee4['view']),_0xfb82b8['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x3c9ee4),this['_sidebarItemViewToAnnotation']['delete'](_0xfb82b8);}['_createSidebarView'](){const _0x3d28dd=new F(this['context']['locale']);return _0x3d28dd['render'](),this['on']('change:_lastItem',(_0x422d71,_0x331ceb,_0x3a542f,_0x2f0e20)=>{_0x2f0e20&&_0x3d28dd['unbind']('minHeight'),_0x3a542f?_0x3d28dd['bind']('minHeight')['to'](_0x3a542f,'bottom'):_0x3d28dd['minHeight']=null;}),_0x3d28dd;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x12bd48){const _0x7e5c59=this['_sidebarItemViewToAnnotation']['get'](_0x12bd48),_0xc270ce=_0x7e5c59&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x7e5c59)-0x1);return _0xc270ce&&this['getSidebarItemView'](_0xc270ce)||null;}['_getItemAfter'](_0x78e1c5){const _0x4c02f1=this['_sidebarItemViewToAnnotation']['get'](_0x78e1c5),_0x521d6f=_0x4c02f1&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x4c02f1)+0x1);return _0x521d6f&&this['getSidebarItemView'](_0x521d6f)||null;}['_alignBeforeItem'](_0x21c61f,_0x1f1552){_0x21c61f['updateHeight']();const _0x48f0cd=R(_0x1f1552['bottom']+this['_spaceBetweenItems'],_0x21c61f['top']);return!!_0x48f0cd&&(this['_setItemTop'](_0x1f1552,_0x1f1552['top']-_0x48f0cd),!0x0);}['_alignAfterItem'](_0x598b6e,_0x3f5f34){_0x598b6e['updateHeight']();const _0x4187e3=R(_0x598b6e['bottom']+this['_spaceBetweenItems'],_0x3f5f34['top']);return!!_0x4187e3&&(this['_setItemTop'](_0x3f5f34,_0x3f5f34['top']+_0x4187e3,!0x1),!0x0);}['_alignToTargetRect'](_0x506f13){const _0x5bb271=this['_sidebarItemViewToAnnotation']['get'](_0x506f13);if(!_0x5bb271||!_0x5bb271['target']||!_0x5bb271['targetRect'])return;const _0x354507=this['_getTargetTop'](_0x5bb271,_0x5bb271['targetRect']);this['_setItemTop'](_0x506f13,_0x354507);}['_getTargetTop'](_0xf68dc0,_0x236bd7){if(null===_0x236bd7)return 0x0;if(_0xf68dc0['target']instanceof _0x212c58)return _0x236bd7['top'];{const _0x3643bf=new _0x212c58(this['view']['element'])['top'];return _0x236bd7['top']-_0x3643bf;}}['_setItemTop'](_0xf3614f,_0x30d256,_0x4bc3a5=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x4bc3a5&&(_0x30d256=Math['max'](_0x30d256,this['_getMaxAvailableTop'](_0xf3614f))),_0xf3614f['top']=_0x30d256;}['_getMaxAvailableTop'](_0x5f3828){let _0x435da9=this['_getItemBefore'](_0x5f3828),_0x52b441=0x0;for(;_0x435da9;)_0x435da9['updateHeight'](),_0x52b441+=this['_spaceBetweenItems']+_0x435da9['height'],_0x435da9=this['_getItemBefore'](_0x435da9);return _0x52b441;}}function R(_0x53e857,_0x51187b){return Math['max'](_0x53e857-_0x51187b,0x0);}function y(_0x302553){return null!==_0x302553&&'object'==typeof _0x302553&&0x1===_0x302553['nodeType'];}class e extends _0x27e7bc{['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(_0x204183){super(_0x204183),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x321144(),this['_refreshPositioningDebounced']=_0x1aaecd(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x267d83=this['context']['plugins']['get'](M),_0x19f8ef=this['context']['plugins']['get'](z);_0x267d83['register']('wideSidebar',this),_0x19f8ef['container']&&_0x267d83['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x5f490d){if(_0x5f490d===this['activeAnnotation'])return;const _0x1b7469=this['context']['plugins']['get'](z);_0x1b7469['_activeAnnotation']=_0x5f490d;const _0x1666b4=this['activeAnnotation'];_0x1b7469['refresh']({'blurredAnnotation':_0x1666b4,'activatedAnnotation':_0x5f490d}),this['activeAnnotation']=_0x5f490d;}['attach'](_0x69c034){this['annotations']=_0x69c034;const _0x4a4781=this['context']['plugins']['get'](z);if(_0x4a4781['_annotations']=_0x69c034,this['isAttached'])throw new _0x5bf711('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x4a4781,'set:container',()=>{this['detach'](),this['listenTo'](_0x4a4781,'change:container',_0x14bbf2=>{_0x14bbf2['off'](),this['attach'](_0x69c034);});}),_0x4a4781['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x21f75f=_0x5a5edd=>{_0x5a5edd['updateTargetRect'](),_0x4a4781['addAnnotation'](_0x5a5edd);};for(const _0x54da77 of _0x69c034)_0x21f75f(_0x54da77);this['listenTo'](_0x69c034,'add',(_0x28c60d,_0x1ec84e)=>{_0x21f75f(_0x1ec84e);}),this['listenTo'](_0x69c034,'remove',(_0x478d3f,_0x57976d,_0x2c3d35)=>{_0x4a4781['rearrange']({'removedAnnotation':_0x57976d,'previousAnnotation':_0x69c034['get'](_0x2c3d35-0x1),'nextAnnotation':_0x69c034['get'](_0x2c3d35+0x1)}),_0x57976d===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x69c034,'focus',(_0x35fe6e,_0x1a33a0)=>{this['setActiveAnnotation'](_0x1a33a0);}),this['listenTo'](_0x69c034,'blur',()=>{this['setActiveAnnotation'](null);});const _0x95a2b9=this['context']instanceof _0x4ed3e0?this['context']['editors']:new _0x321144([this['context']]);for(const _0x4f547 of _0x95a2b9)this['_integrateWithEditorAnnotations'](_0x4f547);this['listenTo'](_0x95a2b9,'add',(_0x1b1c6d,_0x2d7c8b)=>{this['listenTo'](_0x2d7c8b,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x2d7c8b);});}),this['listenTo'](_0x95a2b9,'remove',(_0x5589df,_0x5078f9)=>{_0x5078f9['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x5078f9['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x5bf711('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0xf99e9e=this['context']['plugins']['get'](z);_0xf99e9e['_detachFromContainer'](this['annotations']),this['stopListening'](_0xf99e9e),this['stopListening'](this['annotations']),this['context']instanceof _0x4ed3e0&&this['stopListening'](this['context']['editors']);for(const _0x384939 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x384939);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x5016e1){if(!_0x5016e1['plugins']['has']('EditorAnnotations'))return;const _0x2c4440=_0x5016e1['plugins']['get']('EditorAnnotations'),_0x438705=()=>{const _0x38a31a=_0x2c4440['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x38a31a[0x0]||null);};this['listenTo'](_0x2c4440,'refresh',_0x438705),this['listenTo'](_0x2c4440,'blur',(_0x4d04e9,{isAnnotationTracked:_0xdca90d})=>{this['activeAnnotation']&&_0xdca90d(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x2c4440,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x21156b=>{_0x2c4440['hasDomSelection']()&&(_0x438705(),_0x21156b['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2c4440);}['_destroyEditorAnnotationsIntegration'](_0x2e22c1){this['stopListening'](_0x2e22c1),this['_editorAnnotations']['remove'](_0x2e22c1);}}class C extends _0x59b830{['counterView'];constructor(_0x3b9f81){super(_0x3b9f81);const _0x1f807f=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x265100,_0xda886b)=>_0x265100?'...':_0xda886b['toString']()),this['set']('annotationType',''),this['icon']=_0x723f12,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x1f807f['to']('annotationType',_0x537ceb=>'ck-annotation-counter__badge--'+_0x537ceb),_0x1f807f['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x1f807f['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x27e7bc{['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(_0x5a40ee){super(_0x5a40ee),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x5853c4),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x321144(),this['_refreshPositioningDebounced']=_0x1aaecd(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x3b31ed(this['context']['locale']),this['balloonPanelView']=new _0x1c86d3(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x450d7c){this['annotations']=_0x450d7c;const _0x5f0e0e=this['context']['plugins']['get'](z),_0x26dd7f=this['balloonPanelView'];if(_0x5f0e0e['_annotations']=_0x450d7c,this['isAttached'])throw new _0x5bf711('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x5f0e0e,'set:container',()=>{this['detach'](),this['listenTo'](_0x5f0e0e,'change:container',_0x414b57=>{_0x414b57['off'](),this['attach'](_0x450d7c);});}),_0x5f0e0e['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x52f7b0=_0x474328=>{const _0x3f153f=new C(this['context']['locale']);_0x5f0e0e['addAnnotation'](_0x474328,_0x3f153f),this['_annotationToNarrowView']['set'](_0x474328,_0x3f153f),_0x3f153f['bind']('isDirty','annotationType','number')['to'](_0x474328['view'],'isDirty','type','length'),_0x3f153f['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x26dd7f['content']['first']!==_0x474328['view']?(this['_showBalloon'](_0x474328),_0x474328['view']['element']['focus'](),this['setActiveAnnotation'](_0x474328)):this['setActiveAnnotation'](null);});};for(const _0x10f2ee of _0x450d7c)_0x52f7b0(_0x10f2ee);this['listenTo'](_0x450d7c,'add',(_0x1325ff,_0x4fd8bb)=>{_0x52f7b0(_0x4fd8bb);}),this['listenTo'](_0x450d7c,'remove',(_0x5ed381,_0xdf3c5e,_0x358605)=>{this['_annotationToNarrowView']['get'](_0xdf3c5e)['destroy'](),this['_annotationToNarrowView']['delete'](_0xdf3c5e),_0x5f0e0e['rearrange']({'removedAnnotation':_0xdf3c5e,'previousAnnotation':_0x450d7c['get'](_0x358605-0x1),'nextAnnotation':_0x450d7c['get'](_0x358605+0x1)}),_0xdf3c5e===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x450d7c,'focus',(_0x23ee28,_0x119f64)=>{this['setActiveAnnotation'](_0x119f64);}),this['listenTo'](_0x450d7c,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x2457a0,_0x574564)=>{_0x574564['keyCode']===_0x414a9a['esc']&&_0x26dd7f['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x26dd7f['content']['first']),this['_hideBalloon'](),_0x574564['stopPropagation'](),_0x574564['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x49fd61,_0x306048)=>{const _0x158c90=_0x306048['target'];_0x26dd7f['isVisible']&&_0x26dd7f['element']['contains'](_0x158c90)||_0x5f0e0e['view']['element']['contains'](_0x158c90)||_0x49fd61['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0xc029a9=>_0xc029a9['contains'](_0x158c90))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x40c3c9=this['context']instanceof _0x4ed3e0?this['context']['editors']:new _0x321144([this['context']]);for(const _0x773292 of _0x40c3c9)this['_integrateWithEditorAnnotations'](_0x773292);this['listenTo'](_0x40c3c9,'add',(_0x32d1a7,_0xfc8727)=>{this['listenTo'](_0xfc8727,'ready',()=>{this['_integrateWithEditorAnnotations'](_0xfc8727);});}),this['listenTo'](_0x40c3c9,'remove',(_0x356fcc,_0x2b9447)=>{_0x2b9447['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2b9447['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x3c9b78){if(_0x3c9b78===this['activeAnnotation'])return;const _0x4b5cb6=this['context']['plugins']['get'](z);if(_0x4b5cb6['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x3c9b78,'disableAnimationOnActivatedAnnotation':!0x0}),_0x3c9b78)_0x4b5cb6['getSidebarItemView'](_0x3c9b78)?this['_showBalloon'](_0x3c9b78):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x3c9b78;}['detach'](){if(!this['isAttached'])throw new _0x5bf711('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0xc1d63e=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0xfd6dc9=>_0xfd6dc9['destroy']()),this['_annotationToNarrowView']['clear'](),_0xc1d63e['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x4ed3e0&&this['stopListening'](this['context']['editors']);for(const _0x58b403 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x58b403);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'](_0x5a0cb8){if(!_0x5a0cb8['plugins']['has']('EditorAnnotations'))return;const _0x46044a=_0x5a0cb8['plugins']['get']('EditorAnnotations'),_0x3fcc2a=this['context']['plugins']['get'](z),_0x390fa9=this['annotations'],_0x10974a=this['balloonPanelView'],_0x177e0d=()=>{const _0x28fde6=_0x46044a['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x28fde6),this['setActiveAnnotation'](_0x28fde6[0x0]||null);};this['listenTo'](_0x46044a,'refresh',_0x177e0d),this['listenTo'](_0x46044a,'blur',(_0x409a1e,{isAnnotationTracked:_0x278410})=>{this['activeAnnotation']&&_0x278410(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x46044a,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x390fa9,'blur',_0x20cd17=>{_0x46044a['hasDomSelection']()&&_0x20cd17['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x11b9ac,_0x4ace3c)=>{const _0x1ce63a=_0x4ace3c['target'];_0x10974a['isVisible']&&_0x10974a['element']['contains'](_0x1ce63a)||_0x3fcc2a['view']['element']['contains'](_0x1ce63a)||this['activeAnnotation']&&_0x46044a['hasDomSelection']()&&(_0x177e0d(),_0x11b9ac['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x46044a);}['_destroyEditorAnnotationsIntegration'](_0x542dae){_0x542dae&&(this['stopListening'](_0x542dae),this['_editorAnnotations']['remove'](_0x542dae));}['_setSelectedAnnotations'](_0x4d5805){for(const _0x22bea1 of this['_selectedAnnotations'])_0x4d5805['includes'](_0x22bea1)||this['_manuallyClosedAnnotationViews']['delete'](_0x22bea1['view']);this['_selectedAnnotations']=_0x4d5805;}['_refreshPositioning'](){const _0x410be7=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x410be7['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x2facbc){if(this['_manuallyClosedAnnotationViews']['has'](_0x2facbc['view']))return;const _0x1eaeb9=this['balloonPanelView']['content']['first'];_0x1eaeb9!==_0x2facbc['view']?(_0x1eaeb9&&this['_detachListeners'](_0x1eaeb9),this['_attachListeners'](_0x2facbc['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x2facbc['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x468cdb=this['balloonPanelView']['content']['first'],_0x5e7bae=_0x468cdb&&this['annotations']['getByView'](_0x468cdb);if(!_0x5e7bae||!this['_annotationToNarrowView']['has'](_0x5e7bae))return;const _0x2a8550=this['_annotationToNarrowView']['get'](_0x5e7bae)['element'],_0x5689d4=(function(){const _0x34cbfe=_0x1c86d3['defaultPositions'];return[_0x34cbfe['southArrowNorthEast'],_0x34cbfe['northArrowSouthEast'],_0x34cbfe['southArrowNorth'],_0x34cbfe['northArrowSouth'],_0x34cbfe['southArrowNorthWest'],_0x34cbfe['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x2a8550,'positions':_0x5689d4});}['_hideBalloon'](){const _0x1cd285=this['balloonPanelView'],_0x57395a=_0x1cd285['content']['first'];_0x57395a&&(this['_detachListeners'](_0x57395a),_0x1cd285['unpin'](),_0x1cd285['content']['clear']());}['_attachListeners'](_0x31f461){this['listenTo'](_0x31f461,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x31f461,'Esc',(_0x3c9c6e,_0x5bf3b5)=>{this['_manuallyClosedAnnotationViews']['add'](_0x31f461),this['_hideBalloon'](),_0x5bf3b5();});}['_detachListeners'](_0x50cccf){this['stopListening'](_0x50cccf);}}class c extends _0x4e6ffe{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x114036,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2f09c4){super(_0x2f09c4),_0x2f09c4['editing']['view']['addObserver'](_0x5ae565),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x2f09c4['plugins']['get'](_0x114036),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x277ba9=this['editor']['plugins']['get'](M);_0x277ba9['context']===this['editor']&&(_0x277ba9['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0xa0f0ee,_0x56fdab)=>{const _0x5b70a3=this['_balloon'];if(this['isAttached']&&_0x5b70a3['visibleView']){const _0x3f5c38=this['annotations']['getByView'](_0x5b70a3['visibleView']);_0x3f5c38&&this['_closeAnnotation'](_0x3f5c38),_0x56fdab();}}));}['afterInit'](){const _0x5171f2=this['editor']['plugins']['get'](M);_0x5171f2['context']===this['editor']&&(_0x5171f2['hasActive']()||_0x5171f2['switchTo']('inline'));}['setActiveAnnotation'](_0x336dfe){_0x336dfe!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x336dfe&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x336dfe)&&this['_addAnnotationToBalloon'](_0x336dfe,!0x0),_0x336dfe['isActive']=!0x0),_0x336dfe||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x336dfe);}['attach'](_0x3524e4){this['annotations']=_0x3524e4;const _0x4ae376=this['editor']['plugins']['get'](M),_0x85cd46=this['_balloon'];if(this['isAttached'])throw new _0x5bf711('inlineannotations-attach-already-attached',this);if(_0x4ae376['context']!==this['editor'])throw new _0x5bf711('inlineannotations-not-allowed-with-context',this);const _0x278b3d=this['editor']['plugins']['get'](P);this['listenTo'](_0x278b3d,'refresh',()=>{const _0x611de9=_0x278b3d['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x34602b,_0x3237c2;!this['_forceRefresh']&&(_0x34602b=_0x611de9,_0x3237c2=this['_selectedAnnotations'],_0x34602b['length']===_0x3237c2['length']&&_0x34602b['every'](_0x2ee787=>_0x3237c2['includes'](_0x2ee787)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x611de9),this['setActiveAnnotation'](_0x611de9[0x0]||null));}),this['listenTo'](_0x278b3d,'blur',(_0x580a0d,{isAnnotationTracked:_0x3e1a1b})=>{this['activeAnnotation']&&_0x3e1a1b(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x424986,_0x442697,_0x1870ba)=>{_0x1870ba||this['setActiveAnnotation'](null);}),this['listenTo'](_0x3524e4,'remove',(_0x386720,_0x37866c)=>{this['_removeAnnotationFromBalloon'](_0x37866c),_0x37866c===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x85cd46,'change:visibleView',(_0x37d726,_0x573a84,_0x40c9b2,_0x43ce71)=>{_0x43ce71&&this['stopListening'](_0x43ce71);const _0xa5fbb=_0x3524e4['getByView'](_0x40c9b2);_0x40c9b2&&_0xa5fbb&&(this['listenTo'](_0x40c9b2,'change:height',()=>{_0x85cd46['updatePosition']();}),this['listenTo'](_0x40c9b2,'Esc',()=>{this['_closeAnnotation'](_0xa5fbb),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0xa5fbb&&this['setActiveAnnotation'](_0xa5fbb));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x85cd46['visibleView']&&(_0x3524e4['getByView'](_0x85cd46['visibleView'])&&_0x85cd46['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 _0x5bf711('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x225e45 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x225e45);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x1ea002){for(const _0x56f40c of this['_selectedAnnotations'])_0x1ea002['includes'](_0x56f40c)||this['_manuallyClosed']['delete'](_0x56f40c);for(const _0x187cca of this['annotations'])_0x1ea002['includes'](_0x187cca)||this['_removeAnnotationFromBalloon'](_0x187cca);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x1f78df of _0x1ea002)this['_addAnnotationToBalloon'](_0x1f78df);}this['_selectedAnnotations']=_0x1ea002;}['_addAnnotationToBalloon'](_0xb03581,_0x2b0191=!0x1){this['_manuallyClosed']['has'](_0xb03581)||(this['_addedAnnotations']['has'](_0xb03581)||this['_balloon']['hasView'](_0xb03581['view'])||(this['_addedAnnotations']['add'](_0xb03581),this['_balloon']['add']({'stackId':_0xb03581['view']['id'],'view':_0xb03581['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0xb03581)}})),_0x2b0191&&this['_balloon']['showStack'](_0xb03581['view']['id']));}['_getBalloonTargetForAnnotation'](_0x16a5c4){const _0x3b0e65=_0x16a5c4['target'],_0x238995=this['editor']['editing']['view'],_0x10b6f2=_0x238995['document']['selection']['getFirstRange'](),_0x3e06ac=_0x238995['domConverter']['viewRangeToDom'](_0x10b6f2);if(_0x3e06ac['collapse'](!0x0),_0x3b0e65){if(_0x3b0e65 instanceof _0x212c58)return _0x3b0e65;let _0x3e26b6=[];for(const _0x24c2f0 of _0x3b0e65)_0x3e26b6['push'](...(_0x45ada5=_0x24c2f0['getClientRects'](),Array['from'](_0x45ada5)['map'](DOMRect['fromRect'])));_0x3e26b6=function(_0x23e04b){const _0x22960=[];let _0x240160=_0x23e04b[0x0];for(let _0x7fcbb2=0x1;_0x7fcbb2<_0x23e04b['length'];_0x7fcbb2++)B(_0x240160,_0x23e04b[_0x7fcbb2])?_0x240160['width']+=_0x23e04b[_0x7fcbb2]['width']:(_0x22960['push'](_0x240160),_0x240160=_0x23e04b[_0x7fcbb2]);return _0x22960['push'](_0x240160),_0x22960;}(_0x3e26b6);const _0x4b2436=_0x3e06ac['getBoundingClientRect']();return _0x3e26b6['find'](_0x58636e=>_0x58636e['top']<=_0x4b2436['top']&&_0x58636e['bottom']>=_0x4b2436['bottom']&&_0x58636e['left']<=_0x4b2436['left']&&_0x58636e['right']>=_0x4b2436['right'])||_0x3e26b6[0x0];}var _0x45ada5;return _0x16a5c4['targetRect']||_0x3e06ac;}['_removeAnnotationFromBalloon'](_0xd76c0e){this['_addedAnnotations']['has'](_0xd76c0e)&&this['_balloon']['hasView'](_0xd76c0e['view'])&&(this['_addedAnnotations']['delete'](_0xd76c0e),this['_balloon']['remove'](_0xd76c0e['view']));}['_closeAnnotation'](_0x33d7cd){this['_manuallyClosed']['add'](_0x33d7cd),this['_removeAnnotationFromBalloon'](_0x33d7cd);}}function B(_0x4d8f5a,_0x2f21bc){return _0x4d8f5a['top']===_0x2f21bc['top']&&_0x4d8f5a['bottom']===_0x2f21bc['bottom']&&_0x4d8f5a['right']===_0x2f21bc['left'];}class tt extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x3dfa16,_0x21fb7c){super(_0x3dfa16),this['set']('isEmpty',!_0x21fb7c['length']),this['focusTracker']=new _0x1096d1(),this['_annotationViews']=_0x21fb7c,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x47bf62({'focusables':_0x21fb7c,'focusTracker':this['focusTracker']}),this['listenTo'](_0x21fb7c,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x21fb7c,'remove',(_0x105a77,_0x5174a2)=>{_0x5174a2['isActive']&&this['focus'](),_0x21fb7c['length']||(this['isEmpty']=!0x0);});const _0x57e61c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':E(_0x3dfa16,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x21fb7c},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x57e61c['if']('isEmpty','ck-hidden',_0x239efb=>!_0x239efb)]},'children':[{'text':E(_0x3dfa16,'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 _0x383d6b of this['_annotationViews'])this['focusTracker']['add'](_0x383d6b['element']);this['_annotationViews']['on']('change',(_0x10de00,{added:_0xb55f24,removed:_0x1314a9})=>{for(const _0x469f37 of _0xb55f24)this['focusTracker']['add'](_0x469f37['element']);for(const _0x1bbb9e of _0x1314a9)this['focusTracker']['remove'](_0x1bbb9e['element']);});}}class f extends _0x27e7bc{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,O];}constructor(_0x5d2653){super(_0x5d2653),this['archivedThreads']=new _0x321144();}['init'](){const _0x288b84=this['context'],_0x3cca12=_0x288b84['plugins']['get'](o),_0x5c9517=_0x288b84['plugins']['get'](O);this['listenTo'](_0x3cca12,'addCommentThread',(_0x237105,{threadId:_0x21dbb6})=>{const _0x1952a3=_0x3cca12['getCommentThread'](_0x21dbb6);_0x1952a3['archivedAt']&&this['archivedThreads']['add'](_0x1952a3,this['_calculatePosition'](_0x1952a3['archivedAt'])),this['listenTo'](_0x1952a3,'change:archivedAt',(_0x84c03d,_0x7e2d13,_0x448071)=>{_0x448071?this['archivedThreads']['has'](_0x1952a3)||this['archivedThreads']['add'](_0x1952a3,this['_calculatePosition'](_0x1952a3['archivedAt'])):this['archivedThreads']['has'](_0x1952a3)&&this['archivedThreads']['remove'](_0x1952a3);});}),this['listenTo'](_0x3cca12,'removeCommentThread',(_0x3bdfbc,{threadId:_0x38ba3f})=>{const _0x4bc100=_0x3cca12['getCommentThread'](_0x38ba3f);this['stopListening'](_0x4bc100),this['archivedThreads']['has'](_0x4bc100)&&this['archivedThreads']['remove'](_0x4bc100);},{'priority':'highest'}),this['listenTo'](_0x5c9517['collection'],'focus',(_0x19df0f,_0x44944b)=>{_0x44944b['isVisible']||(_0x44944b['isActive']=!0x0,_0x5c9517['activate'](_0x44944b));});}['_calculatePosition'](_0x3083f7){const _0x1c7a77=[...this['archivedThreads']]['findIndex'](_0x2a92e5=>_0x2a92e5['archivedAt']<_0x3083f7);return _0x1c7a77>-0x1?_0x1c7a77:this['archivedThreads']['length'];}}class a extends _0x4e6ffe{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,_0x89b3d0];}constructor(_0x55d959){super(_0x55d959),this['annotationViews']=new _0x265dd7(),this['_pendingThreads']=[];}['init'](){const _0x1a323b=this['editor'],_0x1f734c=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x1a323b['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x59b830,!0x0)),_0x1a323b['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x1c8b7a=this['_createCommentsArchiveButton'](_0x38f3a4);return _0x1c8b7a['set']({'role':'menuitemcheckbox'}),_0x1c8b7a;});const _0x4c96ca=_0x1a323b['plugins']['get'](f),_0x4c1bd9=_0x1a323b['plugins']['get']('Annotations'),_0x3266d4=_0x1a323b['plugins']['get']('CommentsRepository');_0x4c96ca['archivedThreads']['forEach'](_0x38a69d=>{this['_handleNewThread'](_0x38a69d);}),this['listenTo'](_0x4c96ca['archivedThreads'],'add',(_0x2b0d9c,_0x295d49)=>{this['_handleNewThread'](_0x295d49);}),this['listenTo'](_0x4c1bd9['collection'],'add',(_0x1aebd1,_0x12237a)=>{const _0x441b66=this['_pendingThreads']['find'](_0x498bda=>{const _0x50f32d=_0x3266d4['_threadToController']['get'](_0x498bda);return _0x50f32d&&_0x12237a['innerView']===_0x50f32d['view'];});if(_0x441b66){const _0x1a6a21=this['_calculatePosition'](_0x441b66['archivedAt']);this['annotationViews']['add'](_0x12237a['view'],_0x1a6a21),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x441b66),0x1);}}),this['listenTo'](_0x4c96ca['archivedThreads'],'remove',(_0x194ee7,_0x1f6cf9)=>{const _0x4e8970=_0x1a323b['config']['get']('collaboration.channelId');if(!_0x4e8970||_0x1f6cf9['channelId']===_0x4e8970){if(this['_pendingThreads']['includes'](_0x1f6cf9))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x1f6cf9),0x1);else{const _0x3c9982=_0x3266d4['_threadToController']['get'](_0x1f6cf9),_0x22e0f7=_0x4c1bd9['getByInnerView'](_0x3c9982['view']);this['annotationViews']['remove'](_0x22e0f7['view']),this['stopListening'](_0x22e0f7['focusableElements']);}}}),this['listenTo'](_0x4c1bd9['collection'],'add',(_0x3635b0,_0x3d35dc)=>{this['listenTo'](_0x3d35dc,'escape',_0x1f734c);}),this['listenTo'](_0x4c1bd9['collection'],'remove',(_0x153c05,_0xe5a258)=>{this['stopListening'](_0xe5a258,'escape',_0x1f734c);});}['_handleNewThread'](_0x7dc87){const _0x1cefc7=this['editor']['plugins']['get']('CommentsRepository'),_0x22d33a=this['editor']['plugins']['get']('Annotations'),_0x56d925=this['editor']['config']['get']('collaboration.channelId');if(!_0x56d925||_0x7dc87['channelId']===_0x56d925){const _0x32c7e1=_0x1cefc7['_threadToController']['get'](_0x7dc87);if(!_0x32c7e1)return void this['_pendingThreads']['push'](_0x7dc87);const _0x34e7be=this['_calculatePosition'](_0x7dc87['archivedAt']),_0x5094d3=_0x22d33a['getByInnerView'](_0x32c7e1['view']);_0x5094d3['isVisible']&&_0x22d33a['_visibleAnnotations']['remove'](_0x5094d3),this['annotationViews']['add'](_0x5094d3['view'],_0x34e7be);}}['_calculatePosition'](_0x317289){const _0x382595=this['editor']['config']['get']('collaboration.channelId'),_0x376864=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0x41b3f4=>_0x41b3f4['channelId']===_0x382595)['findIndex'](_0x2727aa=>_0x2727aa['archivedAt']<_0x317289);return _0x376864<0x0||_0x376864>this['annotationViews']['length']?this['annotationViews']['length']:_0x376864-0x1;}['_toggleDialog'](){const _0x9066d8=this['editor'],_0x30ea30=_0x9066d8['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new tt(_0x9066d8['locale'],this['annotationViews'])),'commentsArchive'===_0x30ea30['id']?_0x30ea30['hide']():_0x30ea30['show']({'id':'commentsArchive','title':E(_0x9066d8['locale'],'COMMENTS_ARCHIVE'),'icon':_0x33284a,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x45c3e0['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x17858b,_0x563727=!0x1){const _0x578aff=this['editor']['locale'],_0x18ef7c=this['editor']['plugins']['get']('Dialog'),_0x104cce=new _0x17858b(_0x578aff);return _0x104cce['bind']('isEnabled')['to'](this,'isEnabled'),_0x104cce['bind']('isOn')['to'](_0x18ef7c,'id',_0x3e1103=>'commentsArchive'===_0x3e1103),_0x104cce['set']({'label':E(_0x578aff,'COMMENTS_ARCHIVE'),'icon':_0x33284a,'isToggleable':!0x0}),_0x563727&&(_0x104cce['tooltip']=!0x0),this['listenTo'](_0x104cce,'execute',()=>this['_toggleDialog']()),_0x104cce;}['_hideDialogOnAnnotationEscape']=_0x2f3f71=>{const _0x554d4d=_0x2f3f71['source'];if(!this['annotationViews']['has'](_0x554d4d['view']))return;const _0x40af2a=this['editor']['plugins']['get']('Dialog');_0x40af2a['isOpen']&&'commentsArchive'===_0x40af2a['id']&&(_0x40af2a['hide'](),_0x2f3f71['stop']());};}class p extends _0x4e6ffe{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};
|