@ckeditor/ckeditor5-comments 45.2.1-alpha.1 → 45.2.1-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/comments.js +1 -1
- package/dist/index.js +9 -9
- package/package.json +18 -18
- package/src/comments/commentsediting.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Nt)());constructor(_0x221111={}){function _0x2c0d27(_0x628f55){return _0x628f55['map'](_0x28abe3=>String['fromCharCode'](_0x28abe3))['join']('');}(_0x221111=Object['assign']({},_0x221111))['plugins']||(_0x221111['plugins']=Qt['defaultPlugins']),super(_0x221111),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[_0x2c0d27([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2c0d27([0x76,0x69,0x65,0x77])][_0x2c0d27([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2c0d27([0x61,0x75,0x74,0x6f]),this[_0x2c0d27([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x2c0d27([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2c0d27([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x2c0d27([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x2c0d27([0x6f,0x6b])});}['create'](){const _0x59395f=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x59395f))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x15d831=>{const _0x265e0b=this['model']['document']['getRoot'](),_0x2dcb45=_0x265e0b&&_0x265e0b['getChild'](_0x265e0b['childCount']-0x1);_0x15d831['setSelection'](_0x2dcb45,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0xe0b2e2=this['editing']['view'],_0x20812a=_0xe0b2e2['document']['getRoot'](),_0x179231=_0x20812a['getChild'](0x0);_0x20812a['childCount']>0x1||!_0x179231||'p'!=_0x179231['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0xe0b2e2,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x179231['placeholder']=this['placeholder']),Ft({'view':_0xe0b2e2,'element':_0x179231,'keepOnFocus':!0x0}),this['placeholderElement']=_0x179231);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x2563f3,_0x512a05={}){super(_0x2563f3),this['editor']=null,this['_editorConfig']=_0x512a05,this['set']('value',_0x512a05['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',E(_0x2563f3,'Reply...')),this['set']('submitLabel',E(_0x2563f3,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x29f230(),this['focusCycler']=new _0x8029a4({'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',(_0x4f8761,_0x84fdcf)=>{this['cancelButtonView']['fire']('execute'),_0x84fdcf();}),this['keystrokes']['set']('Ctrl+Enter',(_0x4b74dd,_0x1c2b4c)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x1c2b4c());}),this['on']('submit',(_0x4026c9,_0x1dc56e)=>{_0x1dc56e['length']>0xfde8?(alert(E(_0x2563f3,'TOO_LONG_COMMENT_ALERT',[_0x1dc56e['length'],0xfde8])),_0x4026c9['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 _0xd114ff=this['editor'];this['element']['insertBefore'](_0xd114ff['ui']['element'],this['element']['firstChild']),_0xd114ff['model']['document']['on']('change',()=>this['value']=_0xd114ff['getData']()),_0xd114ff['bind']('placeholder')['to'](this),this['focusables']['add'](_0xd114ff['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x578f27){-0x1===_0x578f27?(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:_0x54de78}=this,_0x92c8f6=new _0x3f387b(_0x54de78);return _0x92c8f6['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x92c8f6['withText']=!0x0,_0x92c8f6['bind']('label')['to'](this,'submitLabel'),_0x92c8f6['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x92c8f6['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x4e7959,_0x88eea3)=>!_0x88eea3&&!!_0x4e7959['trim']()),_0x92c8f6;}['_createCancelButton'](){const {locale:_0xa300ff}=this,_0x7af1ac=new _0x3f387b(_0xa300ff);return _0x7af1ac['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x7af1ac['label']=E(_0xa300ff,'Cancel'),_0x7af1ac['withText']=!0x0,_0x7af1ac['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x7af1ac;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0xe793c0=>{this['focusTracker']['add'](_0xe793c0['element']);}),this['focusables']['on']('change',(_0x33b10c,_0x22db9d)=>{for(const _0x4a3804 of Array['from'](_0x22db9d['added'])['reverse']())this['focusTracker']['add'](_0x4a3804['element']);});}}class ie extends kt{constructor(_0x140d46,_0x38a970,_0x536df1){super(_0x140d46),this['commentInputView']=new os(_0x140d46,_0x536df1),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x391159,_0x3753b7)=>_0x391159||!!_0x3753b7),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 _0x122288(_0x140d46,_0x38a970),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'](_0x5850a6){this['commentInputView']['focus'](_0x5850a6);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x449d54,_0x57db24)=>{const {submitButtonView:_0x54f36b,cancelButtonView:_0x50365e,editor:_0x25934c}=this['commentInputView'];[_0x54f36b['element'],_0x50365e['element'],_0x25934c?_0x25934c['editing']['view']['getDomRoot']():null]['filter'](_0x513661=>_0x513661)['some'](_0x2c08c2=>_0x2c08c2['contains'](_0x57db24['target']))||(this['focus'](),_0x57db24['preventDefault']());});}}class cs extends kt{constructor(_0x3a99cc){super(_0x3a99cc);const _0x51a5a7=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x51a5a7['to']('count',_0x201134=>E(_0x3a99cc,'NUMBER_OF_COMMENTS',_0x201134))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x9d6632,_0x485cad,_0x1427a5){super(_0x9d6632);const _0x3f2d4f=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x485cad['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x485cad,this['_config']=_0x1427a5,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x29f230(),this['keystrokes']=new jt(),this['focusCycler']=new _0x8029a4({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4298ff=>this['commentViews']['map'](_0x142eb3=>_0x142eb3['element'])['includes'](_0x4298ff['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x9d6632),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x2de9c2=>_0x2de9c2-this['_config']['maxCommentsWhenCollapsed']);for(const _0x44e37c of _0x485cad['comments'])this['_handleNewCommentModel'](_0x44e37c);this['_handleInfoComment'](),this['listenTo'](_0x485cad['comments'],'add',(_0x4d65a9,_0xd45f83)=>{const _0x17aa89=this['_calculatePosition'](_0xd45f83);this['length']++,this['_handleNewCommentModel'](_0xd45f83,_0x17aa89),this['refreshVisibleViews']();}),this['listenTo'](_0x485cad['comments'],'remove',(_0x351a85,_0x8a6039)=>{this['length']--,this['_handleRemoveCommentModel'](_0x8a6039),this['refreshVisibleViews']();}),this['listenTo'](_0x485cad,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x485cad,'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',_0x3f2d4f['if']('length','ck-hidden',_0x228142=>!_0x228142)],'aria-label':E(_0x9d6632,'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'](_0x1fbb78){-0x1===_0x1fbb78?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x4f81a1 of this['commentViews'])_0x4f81a1['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x76109b,_0x4b017f){const _0x3576a0=new this['_config']['CommentView'](this['locale'],_0x76109b,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x3576a0['viewUid']=_0x76109b['id'],_0x3576a0['delegate']('removeComment')['to'](this),_0x3576a0['delegate']('updateComment')['to'](this),_0x3576a0['delegate']('resolveCommentThread')['to'](this),_0x3576a0['delegate']('editorReady')['to'](this),_0x3576a0['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x3576a0,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x3576a0,_0x4b017f);}['_calculatePosition'](_0xef91dc){const _0x387534=this['_model']['_findOptimalIndex'](_0xef91dc);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0xef91dc['authoredAt']?_0x387534-0x1:_0x387534:_0x387534-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x44abec={'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'],_0x44abec,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x44abec));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x2f8e9d){const _0x3c1df9=this['commentViews']['remove'](_0x2f8e9d['id']);this['stopListening'](_0x3c1df9),_0x3c1df9['isEditMode']&&this['_updateHasDirtyComment'](),_0x3c1df9['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0xd31d58=>_0xd31d58['isEditMode']);}['_rearrangeCollapse'](){const _0x5e30fd=function(_0x31f4fc){const _0x19ed78=new _0x3eedb8();for(const _0x1c7052 of _0x31f4fc)_0x19ed78['add'](_0x1c7052);return _0x19ed78;}(this['commentViews']),_0x319efa=this['_collapsedCommentsView']['count'];for(let _0x4a9eaa=0x1;_0x4a9eaa<=_0x319efa;_0x4a9eaa++)_0x5e30fd['remove'](0x1);for(const _0x28b743 of _0x5e30fd)_0x28b743['collapse']();_0x319efa>0x0&&_0x5e30fd['add'](this['_collapsedCommentsView'],0x1),ns(_0x4d771c(Array['from'](this['visibleViews']),Array['from'](_0x5e30fd)),this['visibleViews'],_0x5e30fd);}['_rearrangeExpand'](){ns(_0x4d771c(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x1ca275 of this['visibleViews'])_0x1ca275['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x3b8479=>{this['focusTracker']['add'](_0x3b8479['element']),this['keystrokes']['listenTo'](_0x3b8479['element']);}),this['commentViews']['on']('change',(_0x20afc4,_0x41b321)=>{for(const _0x6b718b of _0x41b321['removed'])this['focusTracker']['remove'](_0x6b718b['element']),this['keystrokes']['stopListening'](_0x6b718b['element']);for(const _0x40739a of Array['from'](_0x41b321['added'])['reverse']())this['focusTracker']['add'](_0x40739a['element']),this['keystrokes']['listenTo'](_0x40739a['element']);});}}function ns(_0x2842b5,_0x37a49e,_0x3c5a1e){let _0x3ff8c1=0x0;for(const _0x3b9d1e of _0x2842b5)switch(_0x3b9d1e){case'insert':_0x37a49e['add'](_0x3c5a1e['get'](_0x3ff8c1),_0x3ff8c1),_0x3ff8c1++;break;case'delete':_0x37a49e['remove'](_0x3ff8c1);break;case'equal':_0x3ff8c1++;}}class as extends kt{constructor(_0x1ff495){super(_0x1ff495);const _0x3d4199=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x3d4199['to']('contextValue',_0xb5e6a8=>E(_0x1ff495,'THREAD_CONTEXT_LABEL',_0xb5e6a8)),'tabindex':-0x1},'children':[{'text':_0x3d4199['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x117071,_0x48a5f9){super(_0x117071);const _0x54e91d=this['bindTemplate'];this['_model']=_0x48a5f9,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x29f230(),this['keystrokes']=new jt(),this['focusCycler']=new _0x8029a4({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0xde9a75=>!!_0xde9a75),this['bind']('contextValue')['to'](this['_model'],'context',_0x5bfcfb=>_0x5bfcfb&&_0x5bfcfb['value']?this['_trimContextValue'](_0x5bfcfb['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',_0x54e91d['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 _0x4394eb=new _0x3f387b(this['locale']);return _0x4394eb['label']=E(this['locale'],'Reopen'),_0x4394eb['tooltip']=E(this['locale'],'Reopen'),_0x4394eb['icon']=_0x2b5243,_0x4394eb['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3966da=>!_0x3966da),_0x4394eb['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x588f3a,_0xe10b2f)=>_0x588f3a&&_0xe10b2f),_0x4394eb['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x4394eb;}['_trimContextValue'](_0x14ecec){if(_0x14ecec['length']<0x96)return _0x14ecec;const _0x1dae7e=_0x14ecec['lastIndexOf']('\x20',0x93);return _0x14ecec['substring'](0x0,_0x1dae7e>-0x1?_0x1dae7e:0x93)+'...';}['_attachContextActions'](){const _0x177e14=this['element']['querySelector']('.ck-context'),_0x255d00=_0x177e14['querySelector']('.ck-context__value');this['listenTo'](_0x177e14,'mouseenter',()=>{_0x255d00['offsetWidth']<_0x255d00['scrollWidth']&&_0x177e14['classList']['add']('overlay');}),this['listenTo'](_0x177e14,'mouseleave',()=>{_0x177e14['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x11f958 of this['focusables'])this['focusTracker']['add'](_0x11f958['element']),this['keystrokes']['listenTo'](_0x11f958['element']);}['_createContextView'](){const _0x48b291=new as(this['locale']);return _0x48b291['bind']('contextValue')['to'](this),_0x48b291;}}class ts extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x17fc43,_0x219994,_0x5b6eb3,_0x54fc14){super(_0x17fc43),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x219994,this['_localUser']=_0x5b6eb3,this['_config']=_0x54fc14,this['commentThreadHeaderView']=new Xt(_0x17fc43,_0x219994),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x17fc43,E(_0x17fc43,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x17fc43,_0x219994,Object['assign']({'CommentView':this['_config']['CommentView']},_0x54fc14)),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',(_0x192362,_0x4a1783)=>_0x192362||!!_0x4a1783),this['bind']('isUnlinked')['to'](_0x219994,'unlinkedAt',_0x449889=>!!_0x449889),this['bind']('ariaLabel')['to'](this,'length',_0x430dab=>{const _0x3c0a90=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return E(this['locale'],'COMMENT_THREAD_LABEL',[_0x430dab,_0x3c0a90]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x29f230(),this['keystrokes']=new jt(),this['focusCycler']=new _0x8029a4({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x19e47d=>_0x19e47d['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 _0x6dc012=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x51902c=_0x6dc012['commentInputView'];return _0x6dc012['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x51902c,'value',(_0x55597d,_0x37ea60,_0x1a4d27,_0x5532b5,_0x319b16)=>!!_0x319b16||!!_0x5532b5&&_0x1a4d27&&!_0x37ea60||_0x55597d&&_0x1a4d27&&!_0x37ea60),_0x51902c['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x177b66,_0x5a1c83,_0x1d004c)=>{let _0x4d19ff;return _0x4d19ff=_0x1d004c&&_0x5a1c83?'Reply\x20to\x20reopen\x20discussion...':_0x177b66?'Reply...':'Write\x20a\x20comment...',E(this['locale'],_0x4d19ff);}),_0x51902c['bind']('submitLabel')['to'](this,'length',_0x20089f=>E(this['locale'],_0x20089f?'Reply':'Comment')),_0x51902c['on']('submit',(_0x19be7e,_0x29001b)=>{this['fire']('addComment',_0x29001b),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x51902c['on']('cancel',()=>{this['focus']();}),_0x51902c['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x51902c['on']('cancel',_0x55d048=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x55d048['stop']());}),this['on']('change:isActive',(_0x101c46,_0x237d2c,_0x29b50a)=>{_0x29b50a||this['length']||_0x51902c['value']||this['fire']('removeCommentThread');}),_0x6dc012;}}class vt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(ts){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(hs){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x434faf(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x53af5c,target:_0x44f590,type:_0x17e4c1,isVisible:_0xbb9d4d=!0x0}){super(),this['view']=_0x53af5c,this['view']['element']||this['view']['render'](),this['_type']=_0x17e4c1,this['_target']=_0x44f590,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x3eedb8([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x5ab584,_0x3ae0c0)=>{this['view']['focusTracker']['add'](_0x3ae0c0);}),this['focusableElements']['on']('remove',(_0x526b17,_0x106997)=>{this['view']['focusTracker']['remove'](_0x106997);}),this['set']('isVisible',_0xbb9d4d);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x3d0bc9=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x3d0bc9),_0x3d0bc9;}get['targetRect'](){const _0x5ce8f9=this['target'];if(null===_0x5ce8f9)return null;if(_0x5ce8f9 instanceof _0x597a13)return _0x5ce8f9;const _0x417646=_0x5ce8f9['filter'](_0x710811=>function(_0x245798){const _0x37e980=_0x245798['offsetParent'];if(_0x37e980)return!0x0;const _0x212d3e=_0x245798['getClientRects']()['item'](0x0);return!!_0x212d3e;}(_0x710811));return 0x0===_0x417646['length']?null:new _0x597a13(_0x417646[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x3fb75b){this['view']['isActive']=_0x3fb75b,this['view']['mainView']['isActive']=_0x3fb75b;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x472437){if(!(null===_0x472437||_0x472437 instanceof _0x597a13||Array['isArray'](_0x472437)&&_0x472437['every'](_0x1947e8=>li(_0x1947e8))))throw new _0x3b0292('annotation-invalid-target',null,{'target':_0x472437});}['_getNormalizedTarget'](){const _0x1a6705='function'==typeof this['_target']?this['_target']():this['_target'];return li(_0x1a6705)?[_0x1a6705]:_0x1a6705;}}function li(_0x2ca505){return null!==_0x2ca505&&'object'==typeof _0x2ca505&&'nodeType'in _0x2ca505&&0x1===_0x2ca505['nodeType'];}class _ extends _0x3eedb8{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x26a062=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x29f230(),this['_focusTracker']['on']('change:isFocused',(_0x849020,_0xe7873c,_0x174cdb)=>{_0x174cdb||this['fire']('blur');});for(const _0x151cff of _0x26a062)this['add'](_0x151cff);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x403c59){if(this['has'](_0x403c59))throw new _0x3b0292('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x403c59['innerView'],_0x403c59),this['_viewToAnnotation']['set'](_0x403c59['view'],_0x403c59);for(const _0x4c857f of _0x403c59['focusableElements'])this['_focusTracker']['add'](_0x4c857f);this['listenTo'](_0x403c59['focusableElements'],'add',(_0xa9e048,_0x1cc3b8)=>{this['_focusTracker']['add'](_0x1cc3b8);}),this['listenTo'](_0x403c59['focusableElements'],'remove',(_0x596a96,_0x15d9a8)=>{this['_focusTracker']['remove'](_0x15d9a8);}),this['listenTo'](_0x403c59['view']['focusTracker'],'change:isFocused',(_0x1ddadd,_0x17e8bb,_0x560f7c)=>{_0x560f7c&&this['fire']('focus',_0x403c59);}),_0x403c59['updateTargetRect']();const _0x11b4d4=this['_getOrderInContent'](_0x403c59['view']['targetRect']);return super['add'](_0x403c59,_0x11b4d4);}['remove'](_0x423f29){if(!this['has'](_0x423f29))throw new _0x3b0292('annotationcollection-not-existing-item',null);this['stopListening'](_0x423f29['view']['focusTracker']),this['stopListening'](_0x423f29['focusableElements']);for(const _0x19d256 of _0x423f29['focusableElements'])this['_focusTracker']['remove'](_0x19d256);return this['_viewToAnnotation']['delete'](_0x423f29['view']),this['_innerViewToAnnotation']['delete'](_0x423f29['innerView']),super['remove'](_0x423f29);}['getByInnerView'](_0x26e798){return this['_innerViewToAnnotation']['get'](_0x26e798);}['getByView'](_0x57188b){return this['_viewToAnnotation']['get'](_0x57188b);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x5cfbcc of this)_0x5cfbcc['updateTargetRect']();this['_sort']();}['_sort'](){const _0x57851d=Array['from'](this)['sort']((_0x35a32d,_0x3794e1)=>v(_0x35a32d['view']['targetRect'],_0x3794e1['view']['targetRect']));for(let _0x4581f7=_0x57851d['length']-0x1;_0x4581f7>0x0;_0x4581f7--){const _0x46e94d=_0x57851d[_0x4581f7];_0x4581f7!==this['getIndex'](_0x46e94d)&&(this['remove'](_0x46e94d),this['add'](_0x46e94d));}}['_getOrderInContent'](_0x5cd320){let _0x2b5acb=0x0;if(!_0x5cd320)return this['length'];for(const _0x8389d4 of this){const _0x275024=_0x8389d4['view']['targetRect'];if(_0x275024){if(v(_0x5cd320,_0x275024)<0x0)return _0x2b5acb;_0x2b5acb++;}}return _0x2b5acb;}}function v(_0xe0658f,_0x336e85){if(null===_0xe0658f&&null===_0x336e85)return 0x0;if(null===_0xe0658f)return-0x1;if(null===_0x336e85)return 0x1;const _0x2c7f17=_0xe0658f['top']-_0x336e85['top'];return 0x0==_0x2c7f17?_0xe0658f['left']-_0x336e85['left']:_0x2c7f17;}class O extends _0x4d0391{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x391ded){if(super(_0x391ded),this['collection']=new _(),this['_visibleAnnotations']=new _(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x391ded instanceof _0x53b75b){const _0x500eb2=_0x391ded['locale'];_0x391ded['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':E(_0x500eb2,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':E(_0x500eb2,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':E(_0x500eb2,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':E(_0x500eb2,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':E(_0x500eb2,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':E(_0x500eb2,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':E(_0x500eb2,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x5af26d){this['collection']['add'](_0x5af26d);}['remove'](_0x37d9fa){this['collection']['remove'](_0x37d9fa),_0x37d9fa['destroy']();}['refreshVisibility'](){for(const _0x1fdd5c of this['collection'])_0x1fdd5c['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x450ada){return this['collection']['getByInnerView'](_0x450ada);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x31b0bf of this['collection'])_0x31b0bf['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x7e635b){this['fire']('_activateAnnotation',_0x7e635b);}['createAnnotation'](_0x133eb4){return new d(_0x133eb4);}['createAnnotationView'](_0x506052,_0x51313d){return new S(_0x506052,_0x51313d);}['_addActiveAnnotation'](_0x160373){const _0x959734=new Set(this['activeAnnotations']);_0x959734['add'](_0x160373),this['activeAnnotations']=_0x959734;}['_removeActiveAnnotation'](_0x477071){const _0x46d24d=new Set(this['activeAnnotations']);_0x46d24d['delete'](_0x477071),this['activeAnnotations']=_0x46d24d;}['_bindAnnotationsToVisibleAnnotations'](){const _0x1e05df=this['collection'],_0x46ae5e=this['_visibleAnnotations'];function _0x5aa12e(_0x15dd6c){const _0x3c4b46=_0x15dd6c['source'];_0x3c4b46['isVisible']&&!_0x46ae5e['has'](_0x3c4b46)?_0x46ae5e['add'](_0x3c4b46):!_0x3c4b46['isVisible']&&_0x46ae5e['has'](_0x3c4b46)&&_0x46ae5e['remove'](_0x3c4b46),_0x3c4b46['view']['focusTracker']['remove'](_0x3c4b46['view']['element']),_0x3c4b46['view']['focusTracker']['add'](_0x3c4b46['view']['element']);}this['listenTo'](_0x1e05df,'add',(_0x381f4d,_0x1d3850)=>{_0x1d3850['isVisible']&&_0x46ae5e['add'](_0x1d3850),this['listenTo'](_0x1d3850,'change:isVisible',_0x5aa12e);}),this['listenTo'](_0x1e05df,'remove',(_0x52cb3e,_0x4123de)=>{_0x46ae5e['has'](_0x4123de)&&_0x46ae5e['remove'](_0x4123de),this['stopListening'](_0x4123de,'change:isVisible',_0x5aa12e);});}['_setupEnterAnnotationKeystroke'](){const _0x2d4882=_0x287cba=>{_0x287cba['on']('ready',()=>{_0x287cba['keystrokes']['set'](_0x52545c,(_0x90847a,_0x5a20c0)=>{const _0x5c0646=_0x185237(this['activeAnnotations']['values']());_0x5c0646&&(_0x5c0646['view']['focus'](),_0x5a20c0());});});};this['context']instanceof _0x53b75b?_0x2d4882(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x57106c,_0x4aad8e)=>{_0x2d4882(_0x4aad8e);});}['_setupEscapeAnnotationHandling'](){const _0x231919=_0x25ccb4=>{const _0x5736f2=_0x25ccb4['source'],_0x9774e3=[];let _0x54d93e;if(Array['isArray'](_0x5736f2['target'])){_0x54d93e=_0x5736f2['target'][0x0],this['context']instanceof _0x53b75b?_0x9774e3['push'](this['context']):this['context']['editors']&&_0x9774e3['push'](...this['context']['editors']);for(const _0x562df8 of _0x9774e3)for(const _0x574049 of _0x562df8['editing']['view']['domRoots']['values']())if(_0x574049['contains'](_0x54d93e))return void _0x562df8['editing']['view']['focus']();_0x54d93e['focus']();}};this['listenTo'](this['collection'],'add',(_0x195136,_0x15eaf5)=>{this['listenTo'](_0x15eaf5,'escape',_0x231919,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x516791,_0x159bd1)=>{this['stopListening'](_0x159bd1,'escape',_0x231919);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x4d0391{['_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(_0x226edb){super(_0x226edb),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x19375d=this['context']['config'];_0x19375d['define']('comments.maxCommentsWhenCollapsed',0x2),_0x19375d['define']('comments.maxThreadTotalWeight',0x1f4),_0x19375d['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x19375d['define']('comments.CommentThreadView',vt),_0x19375d['define']('comments.CommentView',gt),_0x19375d['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x25d9fa=this['context']['plugins']['get'](O);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x3fadc8,_0x1c148b)=>this['_addCommentThread'](_0x1c148b)),this['on']('submitCommentThread',(_0x29d26e,_0x1b1987)=>this['_submitCommentThread'](_0x1b1987)),this['on']('resolveCommentThread',(_0x576225,_0x28ad78)=>this['_resolveCommentThread'](_0x28ad78)),this['on']('resolveCommentThread',(_0x2b04d4,_0x5f2bea)=>this['_updateActiveAnnotation'](_0x5f2bea),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x507073,_0x2f9ee9)=>this['_reopenCommentThread'](_0x2f9ee9)),this['on']('reopenCommentThread',(_0x2517c8,_0x40342a)=>this['_updateActiveAnnotation'](_0x40342a),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x390322,_0x1ec34a)=>this['_removeCommentThread'](_0x1ec34a)),this['on']('updateCommentThread',(_0x577485,_0x1f469b)=>this['_updateCommentThread'](_0x1f469b)),this['on']('updateCommentThread',(_0x479fde,_0x52fd3e)=>this['_updateActiveAnnotation'](_0x52fd3e),{'priority':'lowest'}),this['on']('addComment',(_0x6c804d,_0x43db61)=>this['_addComment'](_0x43db61)),this['on']('updateComment',(_0x4fb704,_0x3a959d)=>this['_updateComment'](_0x3a959d)),this['on']('removeComment',(_0x5ee52d,_0x3b4705)=>this['_removeComment'](_0x3b4705)),this['on']('addComment',(_0x2b3076,{threadId:_0x3ff66f,isFromAdapter:_0x2c2aba})=>{if(_0x2c2aba)return;const _0x4faee1=this['getCommentThread'](_0x3ff66f),_0x1c3b7a=_0x4faee1&&this['_threadToController']['get'](_0x4faee1);_0x1c3b7a&&_0x1c3b7a['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x25d9fa,'change:activeAnnotations',(_0x533997,_0x32dd2f,_0x337976)=>{const _0x3393e4=Array['from'](_0x337976)['map'](_0x11eaaa=>this['_viewToController']['get'](_0x11eaaa['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x3393e4?_0x3393e4['model']:null;});}set['adapter'](_0x3d9f17){if(this['_adapter'])throw new _0x3b0292('commentsrepository-adapter-already-set');this['_adapter']=_0x3d9f17;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x3242b2=Tt,threadId:_0x8a6e23=_0x356753(),comments:_0x14022c=[],unlinkedAt:_0x350b8e=null,resolvedAt:_0xe73360=null,resolvedBy:_0x5f37e7=null,target:_0x56f101=null,context:_0x170d85=null,attributes:_0x7b88ad={},isResolvable:_0x5b888e=!0x0,isSubmitted:_0x32c216=!0x1,isFromAdapter:_0x3c2428=!0x1}={}){return this['fire'](bt('addCommentThread',_0x3242b2),{'channelId':_0x3242b2,'threadId':_0x8a6e23,'comments':_0x14022c,'unlinkedAt':_0x350b8e,'resolvedAt':_0xe73360,'resolvedBy':_0x5f37e7,'target':_0x56f101,'context':_0x170d85,'attributes':_0x7b88ad,'isFromAdapter':_0x3c2428,'isResolvable':_0x5b888e,'isSubmitted':_0x32c216}),this['getCommentThread'](_0x8a6e23);}['openNewCommentThread']({channelId:_0x5f4fea=Tt,threadId:_0x1fcd4b=_0x356753(),target:_0x473c4f,context:_0x1c9c3e=null,isResolvable:_0x294e29=!0x0}){if(this['_readOnlyChannels']['has'](_0x5f4fea)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x473c4f)throw new _0x3b0292('commentsrepository-missing-target');const _0x54f8b3=this['addCommentThread']({'channelId':_0x5f4fea,'threadId':_0x1fcd4b,'target':_0x473c4f,'context':_0x1c9c3e,'isResolvable':_0x294e29});if(!_0x54f8b3)return null;const _0x1570b7=this['_threadToController']['get'](_0x54f8b3),_0x555fc5=_0x1570b7['view']['commentThreadInputView']['commentInputView'],_0xa734a3=this['context']['plugins']['get'](O),_0x7808b1=_0xa734a3['getByInnerView'](_0x1570b7['view']);return _0xa734a3['activate'](_0x7808b1),_0x555fc5['once']('editorReady',()=>_0x555fc5['focus']()),_0x54f8b3;}['hasCommentThread'](_0x234c92){if('string'!=typeof _0x234c92)throw new _0x3b0292('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x234c92);}['updateCommentThread']({channelId:_0x56f5cc=Tt,threadId:_0x506e81,context:_0x173f92,unlinkedAt:_0x40e6e5,attributes:_0x291789,isFromAdapter:_0x58fe4c=!0x1}){return this['fire'](bt('updateCommentThread',_0x56f5cc),{'channelId':_0x56f5cc,'threadId':_0x506e81,'context':_0x173f92,'unlinkedAt':_0x40e6e5,'attributes':_0x291789,'isFromAdapter':_0x58fe4c}),this['getCommentThread'](_0x506e81);}['getCommentThread'](_0x255095){if('string'!=typeof _0x255095)throw new _0x3b0292('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x255095);}['fetchCommentThread']({channelId:_0x561423,threadId:_0x11c8bb}={}){const _0x3d62e0=this['getCommentThread'](_0x11c8bb);if(_0x3d62e0)return Promise['resolve'](_0x3d62e0);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x3b0292('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x561423,'threadId':_0x11c8bb})['then'](_0x1ecaf8=>this['hasCommentThread'](_0x11c8bb)?this['getCommentThread'](_0x11c8bb):_0x1ecaf8?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x561423},_0x1ecaf8)):void 0x0)['catch'](_0x4a2413=>{throw console['error'](_0x4a2413),new _0x3b0292('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x23ae56,skipNotAttached:_0x2323b7=!0x1,skipEmpty:_0x3d8572=!0x1,toJSON:_0x262727=!0x1}={}){const _0x12eb3f=[];for(const _0x5d054a of this['_threads']['values']())_0x23ae56&&_0x5d054a['channelId']!==_0x23ae56||_0x2323b7&&!_0x5d054a['isAttached']||_0x3d8572&&0x0===_0x5d054a['length']||_0x12eb3f['push'](_0x5d054a);return _0x262727?_0x12eb3f['map'](_0x14a72d=>_0x14a72d['toJSON']()):_0x12eb3f;}['setActiveCommentThread'](_0x4c0c99){const _0x362977=this['context']['plugins']['get'](O);if(!_0x4c0c99)return void(this['activeCommentThread']&&_0x362977['deactivateAll']());const _0x5e39c9=this['getCommentThread'](_0x4c0c99);if(!_0x5e39c9)throw new _0x3b0292('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x4c0c99});if(!this['_threadToController']['has'](_0x5e39c9))throw new _0x3b0292('commentsrepository-active-not-attached',null,{'threadId':_0x4c0c99});const _0x502b1b=_0x362977['getByInnerView'](this['_threadToController']['get'](_0x5e39c9)['view']);_0x362977['activate'](_0x502b1b);}['switchReadOnly'](_0x21ec62,_0x2464ed){_0x21ec62?this['_readOnlyChannels']['add'](_0x2464ed):this['_readOnlyChannels']['delete'](_0x2464ed),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x407a38){return this['_readOnlyChannels']['has'](_0x407a38)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x13665a,_0x2dada5){return new Ct(_0x13665a,_0x2dada5);}['setPermissions'](_0x14cd4a,_0x455743=Tt){this['_permissions']['set'](_0x455743,_0x14cd4a),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x39cc72=Tt){return this['_permissions']['has'](_0x39cc72)?this['_permissions']['get'](_0x39cc72):_t;}['_addCommentThread']({channelId:_0x140de0,threadId:_0x8f91e0,comments:_0x2cbf8d,unlinkedAt:_0x43ae81,resolvedAt:_0x506c09,resolvedBy:_0x1eb70d,target:_0x47302d,context:_0x2f88f9,attributes:_0x5e8bf6,isFromAdapter:_0x1419e9,isResolvable:_0x539126,isSubmitted:_0x3f7fc7}){if('string'!=typeof _0x8f91e0)throw new _0x3b0292('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x8f91e0});if(this['hasCommentThread'](_0x8f91e0))throw new _0x3b0292('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x8f91e0});const _0xcf754c=new ui(this,{'channelId':_0x140de0,'id':_0x8f91e0,'context':_0x2f88f9,'attributes':_0x5e8bf6,'unlinkedAt':_0x43ae81,'resolvedAt':_0x506c09,'resolvedBy':_0x1eb70d?this['context']['plugins']['get'](it)['getUser'](_0x1eb70d):null,'isResolvable':_0x539126,'isSubmitted':_0x3f7fc7||_0x1419e9});this['_threads']['set'](_0x8f91e0,_0xcf754c);for(const _0xf9b612 of _0x2cbf8d)_0xcf754c['_add'](this['_createNewComment']({'threadId':_0x8f91e0,..._0xf9b612}));return _0x47302d&&_0xcf754c['attachTo'](_0x47302d),_0x1419e9||!_0xcf754c['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x140de0,'threadId':_0x8f91e0});}['_submitCommentThread']({channelId:_0x3804ca,threadId:_0x4d5da5}){if(!this['hasCommentThread'](_0x4d5da5))throw new _0x3b0292('commentsrepository-missing-comment-thread',this);const _0x43e799=this['getCommentThread'](_0x4d5da5);if(_0x43e799['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x4effe3,comments:_0x4ef263,resolvedAt:_0x3df856,resolvedBy:_0x3e1937,context:_0x4009af,attributes:_0x19946a}=_0x43e799,_0x59cd6f=this['context']['plugins']['get']('PendingActions'),_0x2c7140=_0x59cd6f['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x3804ca,'threadId':_0x4effe3,'comments':_0x4ef263['map'](_0x29d097=>_0x29d097['toJSON']()),'resolvedAt':_0x3df856,'resolvedBy':_0x3e1937?_0x3e1937['id']:_0x3e1937,'context':_0x4009af,'attributes':_0x19946a})['then'](({comments:_0x52f563})=>{_0x59cd6f['remove'](_0x2c7140);for(const _0x2468ef of _0x52f563)this['_updateComment']({'channelId':_0x3804ca,'threadId':_0x4d5da5,'commentId':_0x2468ef['commentId'],'createdAt':_0x2468ef['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x3d5edc=>{throw console['error'](_0x3d5edc),new _0x3b0292('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x55edb9,target:_0x190334}){const _0x566061=this['getCommentThread'](_0x55edb9);if(!_0x566061)throw new _0x3b0292('commentsrepository-attach-missing-comment-thread',this);const _0x9d7601=this['context']['plugins']['get']('PendingActions'),_0x23cde8=this['context']['plugins']['get'](O),_0x5b4ff5=this['_createCommentThreadView'](_0x566061),_0x1100b7=new Ct(_0x566061,_0x5b4ff5);let _0x887291=null;_0x5b4ff5['on']('change:isDirty',(_0xdb7a71,_0x3c6bb6,_0x27fadf)=>{_0x27fadf?_0x887291=_0x9d7601['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x887291&&(_0x9d7601['remove'](_0x887291),_0x887291=null);}),this['_threadToController']['set'](_0x566061,_0x1100b7),this['_viewToController']['set'](_0x5b4ff5,_0x1100b7);const _0x58d435=new S(this['context']['locale'],_0x5b4ff5);_0x58d435['bind']('length')['to'](_0x5b4ff5),_0x58d435['bind']('isDirty')['to'](_0x5b4ff5,'isDirty',_0x5b4ff5,'length',(_0x13d254,_0x9ecfd4)=>_0x13d254||!_0x9ecfd4),_0x58d435['bind']('isActive')['to'](_0x5b4ff5),_0x58d435['type']='comment';const _0x97001e=new d({'view':_0x58d435,'target':_0x190334,'type':'comment','isVisible':!_0x566061['archivedAt']});return _0x5b4ff5['on']('escape',()=>{_0x97001e['fire']('escape');}),this['_bindAnnotationToEditors'](_0x5b4ff5,_0x97001e),_0x23cde8['add'](_0x97001e),_0x97001e;}['_bindAnnotationToEditors'](_0x5f2fa4,_0x173f6b){this['listenTo'](_0x5f2fa4,'editorReady',(_0x1496e8,_0x47c066)=>{const _0x48d4c4=_0x47c066['ui']['view']['body']['bodyCollectionContainer'];_0x173f6b['focusableElements']['add'](_0x48d4c4),this['context']instanceof _0x53b75b&&this['context']['ui']['focusTracker']['add'](_0x48d4c4);},{'priority':'highest'}),this['listenTo'](_0x5f2fa4,'editorDestroyed',(_0x4e4277,_0x16db9c)=>{const _0x4cd3d2=_0x16db9c['ui']['view']['body']['bodyCollectionContainer'];_0x173f6b['focusableElements']['has'](_0x4cd3d2)&&_0x173f6b['focusableElements']['remove'](_0x4cd3d2),this['context']instanceof _0x53b75b&&this['context']['ui']['focusTracker']['remove'](_0x4cd3d2);});}['_unbindEditors'](_0x4910c6){this['stopListening'](_0x4910c6,'editorReady'),this['stopListening'](_0x4910c6,'editorDestroyed');}['_createCommentThreadView'](_0x4ff492){const _0x8d938=this['context']['plugins']['get'](it),{config:_0x57e054,locale:_0x4939da}=this['context'],_0x4f19ca=lt(_0x57e054['get']('locale'),_0x4939da);return new(0x0,(_0x57e054['get']('comments'))['CommentThreadView'])(_0x4939da,_0x4ff492,_0x8d938['me'],{'editorConfig':{..._0x57e054['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x57e054['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x57e054['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x57e054['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x57e054['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x4f19ca,'CommentView':_0x57e054['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x54f5c5,channelId:_0xdae903,resolvedAt:_0x28c205,resolvedBy:_0x256aba,isFromAdapter:_0x5d7922}){if(!this['hasCommentThread'](_0x54f5c5))throw new _0x3b0292('commentsrepository-missing-comment-thread',null,{'threadId':_0x54f5c5});const _0x2a1e03=this['getCommentThread'](_0x54f5c5);if(_0x2a1e03['isResolved'])throw new _0x3b0292('commentsrepository-resolved-comment-thread',null,{'threadId':_0x54f5c5});const _0x2cddb3=this['context']['plugins']['get'](it);if(_0x2a1e03['resolvedBy']=_0x2cddb3['getUser'](_0x256aba),_0x2a1e03['resolvedAt']=_0x28c205,_0x5d7922||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x13affe=this['context']['plugins']['get']('PendingActions'),_0x249f06=_0x13affe['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0xdae903,'threadId':_0x54f5c5})['then'](({resolvedAt:_0xe64139,resolvedBy:_0x44a1a1})=>{_0x13affe['remove'](_0x249f06),_0x2a1e03['resolvedBy']['id']!==_0x44a1a1&&(_0x2a1e03['resolvedBy']=_0x2cddb3['getUser'](_0x44a1a1)),_0x2a1e03['resolvedAt']=_0xe64139;})['catch'](_0x479c69=>{throw console['error'](_0x479c69),new _0x3b0292('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0xee1401,channelId:_0x453eed,isFromAdapter:_0x3a90f1}){if(!this['hasCommentThread'](_0xee1401))throw new _0x3b0292('commentsrepository-missing-comment-thread',null,{'threadId':_0xee1401});const _0x508c11=this['getCommentThread'](_0xee1401);if(!_0x508c11['isResolved'])throw new _0x3b0292('commentsrepository-reopen-comment-thread',null,{'threadId':_0xee1401});if(_0x508c11['resolvedBy']=null,_0x508c11['resolvedAt']=null,_0x3a90f1||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x1de527=this['context']['plugins']['get']('PendingActions'),_0x3ffa36=_0x1de527['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x453eed,'threadId':_0xee1401})['then'](()=>_0x1de527['remove'](_0x3ffa36))['catch'](_0x2f70cf=>{throw console['error'](_0x2f70cf),new _0x3b0292('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x8e1ea7,isFromAdapter:_0x59a761}){const _0x42d475=this['getCommentThread'](_0x8e1ea7);if(!_0x42d475)throw new _0x3b0292('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x8e1ea7),this['_threads']['delete'](_0x8e1ea7),!_0x42d475['isSubmitted']||_0x59a761||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x4a5465=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4104fc}=_0x42d475,_0xe89402=_0x4a5465['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x4104fc,'threadId':_0x8e1ea7})['then'](()=>_0x4a5465['remove'](_0xe89402))['catch'](_0x19e3d4=>{throw console['error'](_0x19e3d4),new _0x3b0292('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x13ea1b,unlinkedAt:_0x43d0c0,context:_0x2a5f77,attributes:_0x34e187,isFromAdapter:_0x204df4}){if('string'!=typeof _0x13ea1b)throw new _0x3b0292('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x13ea1b});if(!this['hasCommentThread'](_0x13ea1b))throw new _0x3b0292('commentsrepository-missing-comment-thread',null,{'threadId':_0x13ea1b});const _0x573ed1=this['getCommentThread'](_0x13ea1b);let _0x5121f1=!0x1;if(void 0x0!==_0x2a5f77&&_0x573ed1['context']!==_0x2a5f77&&(_0x573ed1['context']=_0x2a5f77,_0x5121f1=!0x0),void 0x0!==_0x43d0c0&&_0x573ed1['unlinkedAt']!==_0x43d0c0&&(_0x573ed1['unlinkedAt']=_0x43d0c0,_0x5121f1=!0x0),_0x34e187&&!wt(_0x34e187,_0x573ed1['attributes'])&&(_0x573ed1['attributes']=_0x34e187,_0x5121f1=!0x0),!_0x5121f1)return Promise['resolve']();if(!_0x573ed1['isSubmitted']||_0x204df4||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x44df17=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1f47b4}=_0x573ed1,_0x155615=_0x44df17['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x1f47b4,'threadId':_0x13ea1b,'context':_0x2a5f77,'unlinkedAt':_0x43d0c0,'attributes':_0x34e187})['then'](()=>_0x44df17['remove'](_0x155615))['catch'](_0x1106c4=>{throw console['error'](_0x1106c4),new _0x3b0292('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x4e2c22){const _0x2210c6=this['context']['plugins']['get'](O),_0x41247f=this['getCommentThread'](_0x4e2c22);if(_0x41247f['_isAttached']=!0x1,this['_threadToController']['has'](_0x41247f)){const _0x54f2a5=this['_threadToController']['get'](_0x41247f),_0x4b7e49=_0x54f2a5['view'],_0x2e3ac0=_0x2210c6['getByInnerView'](_0x4b7e49);this['_threadToController']['delete'](_0x41247f),this['_viewToController']['delete'](_0x4b7e49),_0x2e3ac0&&_0x2210c6['remove'](_0x2e3ac0),_0x54f2a5['destroy'](),_0x4b7e49['destroy']()['then'](()=>{this['_unbindEditors'](_0x4b7e49);});}}['_updateActiveAnnotation']({threadId:_0x5d5fb9,resolvedAt:_0x27d19e,unlinkedAt:_0xfdc290}){const _0x10dcd1=!!_0x27d19e,_0x508677=this['context']['plugins']['get'](O),_0x4a0027=this['getCommentThread'](_0x5d5fb9);if(this['_threadToController']['has'](_0x4a0027)){const _0x1d6ffa=this['_threadToController']['get'](_0x4a0027)['view'],_0x1054e1=_0x508677['getByInnerView'](_0x1d6ffa);_0x1054e1&&(_0x10dcd1&&_0x508677['_removeActiveAnnotation'](_0x1054e1),_0xfdc290?_0x1054e1['isVisible']=!0x1:_0x1054e1['refreshVisibility']());}}['_getExternalAuthor'](_0xa8b81f){const _0x4325ee=this['context']['plugins']['get'](it),_0x1580e5=pt('external:'+_0xa8b81f),_0x23b737=_0x4325ee['getUser'](_0x1580e5);return _0x23b737||_0x4325ee['addUser']({'id':_0x1580e5,'name':_0xa8b81f});}['_createNewComment']({threadId:_0xb2acf4,commentId:_0x511e93=_0x356753(),content:_0x9952ff,authorId:_0x1a5cf5,createdAt:_0x2b7402,attributes:_0x4587bb}){if('string'!=typeof _0x511e93)throw new _0x3b0292('commentsrepository-invalid-commentid');if('string'!=typeof _0x1a5cf5)throw new _0x3b0292('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x9952ff||!_0x9952ff['trim']())throw new _0x3b0292('commentsrepository-invalid-comment-content');const _0x413ec4=this['context']['plugins']['get'](it)['getUser'](_0x1a5cf5);if(!_0x413ec4)throw new _0x3b0292('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x1a5cf5});let _0xb7c976=null,_0x5044a6=_0x2b7402;return _0x4587bb?.['@external']&&(_0xb7c976=this['_getExternalAuthor'](_0x4587bb['@external']['authorName']),_0x5044a6=new Date(_0x4587bb['@external']['createdAt'])),new fi(this,{'threadId':_0xb2acf4,'id':_0x511e93,'author':_0xb7c976||_0x413ec4,'creator':_0x413ec4,'content':_0x9952ff,'createdAt':_0x2b7402,'authoredAt':_0x5044a6,'attributes':_0x4587bb});}['_addComment'](_0x40e7da){let {threadId:_0x1e5b73,content:_0x39b79a,attributes:_0x5e48df,isFromAdapter:_0x149a45}=_0x40e7da;const _0x22057d=this['getCommentThread'](_0x40e7da['threadId']);if(!_0x22057d)throw new _0x3b0292('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x37858f=this['_createNewComment'](_0x40e7da),{id:_0x237afe}=_0x37858f;if(_0x22057d['_add'](_0x37858f),_0x149a45||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x22057d['isSubmitted'])return Promise['resolve']();const _0x5089c6=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2db981}=_0x22057d,_0x446741=_0x5089c6['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x5e48df||(_0x5e48df={}),this['adapter']['addComment']({'channelId':_0x2db981,'threadId':_0x1e5b73,'commentId':_0x237afe,'content':_0x39b79a,'attributes':_0x5e48df})['then'](_0x3d7cbe=>{_0x5089c6['remove'](_0x446741),_0x3d7cbe&&this['_updateComment']({'channelId':_0x2db981,'threadId':_0x1e5b73,'commentId':_0x237afe,'createdAt':_0x3d7cbe['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x9779c2=>{throw console['error'](_0x9779c2),new _0x3b0292('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x36e757,commentId:_0x44d428,content:_0x1eaf69,createdAt:_0x2699f9,attributes:_0x111cd8,isFromAdapter:_0xca95d9}){if(void 0x0!==_0x1eaf69&&('string'!=typeof _0x1eaf69||!_0x1eaf69['trim']()['length']))throw new _0x3b0292('commentsrepository-update-comment-invalid-content');const _0x480874=this['getCommentThread'](_0x36e757),_0x8b175a=_0x480874['getComment'](_0x44d428);if(!_0x8b175a)throw new _0x3b0292('commentsrepository-update-missing-comment',this);let _0x547a5f=!0x1;if(_0x1eaf69&&_0x1eaf69!==_0x8b175a['content']&&(_0x8b175a['isEditable']||_0xca95d9)&&(_0x8b175a['content']=_0x1eaf69,_0x547a5f=!0x0),_0x2699f9&&_0x2699f9!==_0x8b175a['createdAt']&&(_0x8b175a['createdAt']=_0x2699f9,_0x8b175a['attributes']&&_0x8b175a['attributes']['@external']||(_0x8b175a['authoredAt']=_0x2699f9),_0x547a5f=!0x0),_0x111cd8&&!wt(_0x111cd8,_0x8b175a['attributes'])&&(_0x8b175a['attributes']=_0x111cd8,_0x547a5f=!0x0),!_0x547a5f)return Promise['resolve']();if(_0x480874['fire']('commentUpdated'),_0xca95d9||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x343480=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1fe9df}=this['getCommentThread'](_0x8b175a['threadId']),_0x4bbef8=_0x343480['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x1fe9df,'threadId':_0x36e757,'commentId':_0x44d428,'content':_0x1eaf69,'attributes':_0x111cd8})['then'](()=>_0x343480['remove'](_0x4bbef8))['catch'](_0xf252e8=>{throw console['error'](_0xf252e8),new _0x3b0292('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x135136,commentId:_0x2a0237,isFromAdapter:_0x43d5e7}){const _0x487ece=this['getCommentThread'](_0x135136),_0x1d7ae3=_0x487ece['getComment'](_0x2a0237);if(!_0x1d7ae3)throw new _0x3b0292('commentsrepository-remove-missing-comment',this);if(_0x487ece['_remove'](_0x1d7ae3),_0x43d5e7||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x15e508=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1798bb}=_0x487ece,_0x21ab31=_0x15e508['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x1798bb,'threadId':_0x135136,'commentId':_0x2a0237})['then'](()=>_0x15e508['remove'](_0x21ab31))['catch'](_0x5446b6=>{throw console['error'](_0x5446b6),new _0x3b0292('commentsrepository-remove-comment-internal-error',this);});}}class ui extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x434faf(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x4b1868,_0x1649dc){super();const _0x4f5eaf=_0x4b1868['context']['plugins']['get'](it)['me'],_0x9f82b=_0x4b1868['getCommentThread'](_0x1649dc['threadId']),_0x1a6601=0x0===_0x9f82b['comments']['length'],_0x42430a=_0x4f5eaf===_0x1649dc['author'];this['id']=_0x1649dc['id'],this['threadId']=_0x1649dc['threadId'],this['author']=_0x1649dc['author'],this['creator']=_0x1649dc['creator'],this['isExternal']=Boolean(_0x1649dc['attributes']&&_0x1649dc['attributes']['@external']),this['set']('content',_0x1649dc['content']),this['createdAt']=_0x1649dc['createdAt']||new Date(),this['set']('authoredAt',_0x1649dc['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x9f82b,'resolvedAt'),this['set']('attributes',_0x1649dc['attributes']||{}),this['bind']('isEditable')['to'](_0x4b1868,'_permissions',()=>{const _0x5f4e5a=_0x4b1868['getPermissions'](_0x9f82b['channelId'])['write'],_0x53f21f=_0x4b1868['getPermissions'](_0x9f82b['channelId'])['modifyAll'];return _0x42430a&&_0x5f4e5a||!_0x42430a&&_0x53f21f;}),this['bind']('isRemovable')['to'](_0x9f82b,'isRemovable',_0x4b1868,'_permissions',_0x3a8474=>{const _0x180bc9=_0x4b1868['getPermissions'](_0x9f82b['channelId'])['write'],_0x3c46e3=_0x4b1868['getPermissions'](_0x9f82b['channelId'])['modifyAll'];return _0x42430a&&_0x180bc9||_0x3a8474&&_0x1a6601||!_0x42430a&&_0x3c46e3&&!_0x1a6601;}),this['bind']('isReadOnly')['to'](_0x9f82b,'isReadOnly'),this['_repository']=_0x4b1868;}get['weight'](){return Math['max'](function(_0x55a866){const _0x132b3d=document['createElement']('div');return _0x132b3d['innerHTML']=_0x55a866,_0x132b3d['textContent']['length'];}(this['content']),0xc8);}['update'](_0x171ca6){const {threadId:_0x516751,id:_0x187ec6}=this;if(!this['_repository']['hasCommentThread'](_0x516751))throw new _0x3b0292('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0xd4e650}=this['_repository']['getCommentThread'](_0x516751);this['_repository']['fire'](bt('updateComment',_0xd4e650,_0x516751),{'channelId':_0xd4e650,'threadId':_0x516751,'commentId':_0x187ec6,..._0x171ca6});}['setAttribute'](_0xabe0e,_0x4f4dd1){const _0x3f0a82=It(this['attributes']);At(_0x3f0a82,_0xabe0e,_0x4f4dd1),this['update']({'attributes':_0x3f0a82});}['removeAttribute'](_0x31e507){const _0x157447=It(this['attributes']);yt(_0x157447,_0x31e507),this['update']({'attributes':_0x157447});}['remove'](_0x3c6eef={}){if(!_0x3c6eef['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x63227e,id:_0x4639f3}=this;if(!this['_repository']['hasCommentThread'](_0x63227e))throw new _0x3b0292('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x5f0c84}=this['_repository']['getCommentThread'](_0x63227e);this['_repository']['fire'](bt('removeComment',_0x5f0c84,_0x63227e),{'channelId':_0x5f0c84,'threadId':_0x63227e,'commentId':_0x4639f3,..._0x3c6eef});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0x1b6546,..._0x364999){for(const _0x5a256e of _0x364999)void 0x0!==_0x5a256e&&(_0x1b6546+=':'+String(_0x5a256e));return _0x1b6546;}class J extends _0x1c82f3{['refresh'](){const _0x38fedc=this['editor']['model']['document']['selection'];for(const _0xfed6dd of _0x38fedc['getRanges']())if(this['_hasContent'](_0xfed6dd))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x41c8e7=_0x356753()}={}){const _0x575479=this['editor']['model'],_0x2de668=[];for(const _0x5dc4f4 of _0x575479['document']['selection']['getRanges']())this['_hasContent'](_0x5dc4f4)&&_0x2de668['push'](this['_trimToContent'](_0x5dc4f4));_0x575479['change'](_0x11be9e=>{for(const _0x537dc3 of _0x2de668){const _0x540496=_0x356753()['substr'](0x1,0x5),_0x49feb6='comment:'+_0x41c8e7+':'+_0x540496;_0x11be9e['addMarker'](_0x49feb6,{'range':_0x537dc3,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x5c0c59){for(const _0x5a296d of _0x5c0c59['getItems']())if(this['_itemIsContent'](_0x5a296d))return!0x0;return!0x1;}['_itemIsContent'](_0x5c6ee9){return _0x5c6ee9['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x5c6ee9)&&!_0x5c6ee9['is']('element','tableCell');}['_trimToContent'](_0x48c9f3){const _0x8408c=_0x1808f4=>!this['_itemIsContent'](_0x1808f4['item']),_0x266701=_0x48c9f3['start']['getLastMatchingPosition'](_0x8408c),_0xde1db3=_0x48c9f3['end']['getLastMatchingPosition'](_0x8408c,{'direction':'backward'});return this['editor']['model']['createRange'](_0x266701,_0xde1db3);}}class P extends _0x51209d{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[O];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x7d74c6){super(_0x7d74c6),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x3b7c27=this['editor'],_0x2b4619=_0x3b7c27['model']['document']['selection'],_0x150d52=_0x4724d7(()=>this['refreshSelectedViews'](),0xa);_0x2b4619['on']('change:range',(_0x171aee,_0x5c33f7)=>{_0x5c33f7['directChange']&&(_0x150d52['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x3b7c27['editing']['view']['document'],'change:isFocused',(_0x473fdb,_0x38402e,_0x3e0833)=>{_0x3e0833&&_0x150d52();}),this['listenTo'](_0x3b7c27['ui']['focusTracker'],'change:isFocused',(_0x38d4de,_0x4d5b17,_0x4101a8)=>{_0x4101a8||_0x3b7c27['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x399ede=>this['_editorAnnotationsData']['has'](_0x399ede['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x2b7ab1){if(this['_editorAnnotations']['has'](_0x2b7ab1['view']))return;this['_editorAnnotations']['add'](_0x2b7ab1['view']),this['editor']['ui']['focusTracker']['add'](_0x2b7ab1['view']['element']);const _0x5c86a7=this['editor']['plugins']['get'](O);this['listenTo'](_0x5c86a7['collection'],'remove',(_0x206775,_0x3d746d)=>{this['editor']['ui']['focusTracker']['remove'](_0x3d746d['view']['element']),this['_editorAnnotations']['delete'](_0x3d746d['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x1143a4){if('function'!=typeof _0x1143a4)throw new _0x3b0292('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x1143a4);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x4a3e9d,annotations:_0xcfe9d}){const _0x2aca15=[],_0x49a014=this['editor']['model']['document']['selection'],_0xed396b=Array['from'](_0x49a014['getRanges']());for(const [_0xea38dc,_0x574aef]of this['_editorAnnotationsData']){const _0x118471=_0x2a16b7(_0x574aef),_0x33a7f1=_0xcfe9d['getByInnerView'](_0xea38dc);_0x118471&&_0x33a7f1&&_0x2aca15['push']({'annotation':_0x33a7f1,'range':_0x118471});}function _0x2a16b7(_0x14ec64){for(const _0x49b4ff of _0x14ec64)for(const _0x43a1bb of _0xed396b)if(_0x49b4ff['containsRange'](_0x43a1bb,!_0x49a014['isCollapsed']))return _0x49b4ff;return null;}return _0x2aca15['sort']((_0x5c83f3,_0x4f973d)=>{const _0x30dc36=_0x5c83f3['range'],_0x5bf836=_0x4f973d['range'];if(!_0x30dc36['isEqual'](_0x5bf836)){if(_0x30dc36['containsRange'](_0x5bf836,!0x0))return 0x1;if(_0x5bf836['containsRange'](_0x30dc36,!0x0))return-0x1;}return _0x5c83f3['annotation']==_0x4a3e9d?-0x1:_0x4f973d['annotation']==_0x4a3e9d?0x1:0x0;})['map'](_0x4f438a=>_0x4f438a['annotation']);}get['_editorAnnotationsData'](){const _0x3e9638=new Map();for(const _0x30aec2 of Array['from'](this['_dataCollectors']))for(const [_0x2f1623,_0x5d6816]of _0x30aec2())_0x3e9638['set'](_0x2f1623,_0x5d6816);return _0x3e9638;}}class st extends _0x51209d{['afterInit'](){const _0x56f9a8=this['editor'];if(!_0x56f9a8['plugins']['has']('RestrictedEditingModeEditing'))return;_0x56f9a8['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x51209d{constructor(_0x1fa6c3){super(_0x1fa6c3),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x614af8=this['editor'],_0x463fc5=_0x614af8['commands']['get']('importWord'),_0x264fef=_0x614af8['plugins']['get'](it);_0x463fc5&&(_0x463fc5['on']('execute',(_0x55a432,[,_0x57b4a1])=>{_0x57b4a1['collaboration_features']={'comments':!0x0,'user_id':_0x264fef['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x463fc5,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x281d77,_0x5a50ec){const {comment_threads:_0x2c96a3}=_0x5a50ec;_0x2c96a3&&_0x2c96a3['forEach'](({thread_id:_0x274d5f,comments:_0x217571,is_resolved:_0x3f4792})=>{const _0x228900=new Date(),_0x5e8e44=_0x217571['map'](({author:_0x593a31,content:_0x19dcb2,created_at:_0x4e509c})=>({'content':_0x19dcb2,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x228900,'attributes':{'@external':{'authorName':_0x593a31,'createdAt':_0x4e509c?new Date(_0x4e509c):new Date(),'source':'importWord'}}})),_0x1af6e8=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x1af6e8,'threadId':_0x274d5f,'comments':_0x5e8e44,'resolvedAt':_0x3f4792?_0x228900:null});});}}class at extends _0x51209d{constructor(_0x176235){super(_0x176235),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x47dfa6=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x47dfa6,'contentInsertion',(_0x271a7f,_0x5a22a5)=>this['_removeMarkersWithoutThreads'](_0x5a22a5['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x4b051b){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x4b051b;const _0x5450ea=this['editor']['plugins']['get']('CommentsRepository');for(const _0x1ecce5 of _0x4b051b['keys']()){const [_0x5447d9,_0x224799]=_0x1ecce5['split'](':');'comment'!=_0x5447d9||_0x5450ea['hasCommentThread'](_0x224799)||_0x4b051b['delete'](_0x1ecce5);}return _0x4b051b;}['_registerMarkerInClipboardPipeline'](){const _0x169ea1=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x1c6229=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x1c6229&&_0x169ea1['_registerMarkerToCopy']('comment',_0x1c6229);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x44da7f){switch(_0x44da7f){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 _0x51209d{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x4db678,_0x3f1525)=>{if(!_0x3f1525['options']['showCommentHighlights'])return null;if(_0x3f1525['options']['ignoreResolvedComments']){const {id:_0x27c55b}=er(_0x4db678['markerName']),_0x15e6b1=this['editor']['plugins']['get'](o);if(_0x15e6b1['getCommentThread'](_0x27c55b)?.['isResolved']&&_0x4db678['item'])return _0x3f1525['consumable']['consume'](_0x4db678['item'],'addMarker:'+_0x4db678['markerName']),_0x3f1525['consumable']['consume'](_0x4db678['item'],'removeMarker:'+_0x4db678['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x5fa7c3=>{_0x5fa7c3['on']('addMarker:comment',(_0x87f81,_0x53e66f,_0x83b7d9)=>{if(!_0x83b7d9['options']['showCommentHighlights'])return;const _0xb0565f=_0x53e66f['item'];if(!_0xb0565f)return;const _0x55a6ed=_0x83b7d9['mapper']['toViewElement'](_0xb0565f);this['editor']['model']['schema']['isObject'](_0xb0565f)&&_0x55a6ed&&!_0x55a6ed['getCustomProperty']('widget')&&_0x55a6ed['is']('containerElement')&&_0x264321(_0x55a6ed,_0x83b7d9['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x24e010,{writer:_0x24e954,options:_0x2af17b})=>{if(!_0x2af17b['showCommentHighlights'])return null;const _0x39b85a=_0x24e954['createContainerElement']('div'),_0x473a19=_0x24e954['createEmptyElement']('hr');return _0x24e954['addClass']('ck-horizontal-line',_0x39b85a),_0x24e954['insert'](_0x24e954['createPositionAt'](_0x39b85a,0x0),_0x473a19),_0x39b85a;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x4bd256,{writer:_0xeb6ad7,options:_0x880365})=>{if(!_0x880365['showCommentHighlights'])return null;const _0x4ad095=_0xeb6ad7['createContainerElement']('span'),_0x1fdce4=_0xeb6ad7['createEmptyElement']('img');return _0xeb6ad7['addClass']('image-inline',_0x4ad095),_0xeb6ad7['insert'](_0xeb6ad7['createPositionAt'](_0x4ad095,0x0),_0x1fdce4),_0x4ad095;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x2fb23e,{writer:_0x3e2c73,options:_0x173daa})=>{if(_0x173daa['showCommentHighlights'])return _0x3e2c73['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x4494d4,_0x59692a,_0x182b92)=>{_0x182b92['options']['showCommentHighlights']&&_0x4494d4['stop']();},{'priority':'high'});}}class r extends _0x51209d{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(_0x183971){super(_0x183971),this['set']('isThreadsLoadingPaused',!0x0),_0x183971['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x412634,_0x30b90d,_0x5dc325,_0x5216d2)=>{const _0x1da6f4=_0x183971['plugins']['get'](o),_0x4d2683=_0x5dc325?er(_0x5dc325)['id']:null;_0x183971['model']['change'](()=>{if(_0x4d2683){const _0x3c3c90=this['getAllMarkersForId'](_0x4d2683);for(const _0x28f6df of _0x3c3c90)_0x183971['editing']['reconvertMarker'](_0x28f6df);}if(_0x5216d2){const {id:_0x47a613}=er(_0x5216d2),_0x1f417f=_0x1da6f4['getCommentThread'](_0x47a613);if(_0x1f417f&&_0x1f417f['unlinkedAt'])return;if(_0x1f417f&&!_0x1f417f['isAttached'])return;const _0x1f61f2=this['getAllMarkersForId'](_0x47a613);for(const _0x51c21e of _0x1f61f2)_0x183971['editing']['reconvertMarker'](_0x51c21e);}}),_0x4d2683&&this['scrollToThreadMarker'](_0x4d2683);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x805efe=this['editor'],_0x2d8d80=_0x805efe['plugins']['get'](o),_0x30c112=_0x805efe['config']['get']('collaboration.channelId'),_0xc01981=_0x2d8d80['getCommentThreads']()['filter'](_0x1214d7=>_0x1214d7['channelId']!==_0x30c112);_0x805efe['commands']['add']('addCommentThread',new J(_0x805efe)),this['listenTo'](_0x805efe,'change:isReadOnly',(_0x59a727,_0x23f981,_0x1902da)=>{_0x2d8d80['switchReadOnly'](_0x1902da,_0x805efe['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x2d8d80,ft('addCommentThread',_0x30c112),(_0x280560,{threadId:_0x4e0495})=>{const _0x2533f2=this['editor']['plugins']['get'](o)['getCommentThread'](_0x4e0495);_0x2533f2?.['unlinkedAt']&&this['_attachArchivedThread'](_0x4e0495);}),this['listenTo'](_0x2d8d80,ft('removeCommentThread',_0x30c112),(_0x42d463,{threadId:_0x20352c})=>{_0x805efe['model']['enqueueChange']({'isUndoable':!0x1},_0x5652a7=>{const _0x2a92b2=this['getAllMarkersForId'](_0x20352c);for(const _0xa4fce of _0x2a92b2)_0x5652a7['removeMarker'](_0xa4fce);});}),this['listenTo'](_0x2d8d80,ft('resolveCommentThread',_0x30c112),(_0x3f065b,{threadId:_0xe98075})=>{(this['_reconvertMarkers'](_0xe98075),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0xe98075)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x2d8d80,ft('reopenCommentThread',_0x30c112),(_0x40b9df,{threadId:_0x2dc27b})=>{this['_reconvertMarkers'](_0x2dc27b);},{'priority':'low'}),this['listenTo'](_0x2d8d80,ft('addComment',_0x30c112),(_0x36b168,{threadId:_0x111bd2,isFromAdapter:_0x187d49})=>{const _0x1eba47=this['getAllMarkersForId'](_0x111bd2);if(_0x187d49||0x0==_0x1eba47['length']||!_0x2d8d80['hasCommentThread'](_0x111bd2))return;0x1===_0x2d8d80['getCommentThread'](_0x111bd2)['length']&&_0x805efe['model']['enqueueChange']({'isUndoable':!0x1},_0x1daf8f=>{for(const _0x2b3a44 of _0x1eba47)_0x1daf8f['updateMarker'](_0x2b3a44,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0xc01981);}['afterInit'](){!async function(_0x32a754){const _0x5d17a7=_0x2d8e6e([0x50,0x6f,0x71,0x7a,0x47,0x31,0x79,0x52,0x41,0x66,0x6e,0x61,0x42,0x33,0x77,0x48,0x75,0x6a,0x38,0x56,0x4f,0x74,0x30,0x76,0x35,0x73,0x4b,0x55,0x72,0x62,0x45,0x6d,0x37,0x6c,0x32,0x69,0x6b,0x67,0x4d,0x43,0x51,0x44,0x63,0x68,0x5a,0x54,0x78,0x49,0x53,0x4e,0x58,0x65,0x34,0x70,0x4c,0x36,0x39,0x57,0x4a,0x59,0x64,0x46]),_0x227753=0x32bda18b,_0x49fd93=0x32bacb33^_0x227753,_0x5afd8b=window[_0x2d8e6e([0x44,0x61,0x74,0x65])][_0x2d8e6e([0x6e,0x6f,0x77])](),_0xdccdc5=_0x32a754[_0x2d8e6e([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x44d3c9=new window[(_0x2d8e6e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xe7024=>{_0xdccdc5[_0x2d8e6e([0x6f,0x6e,0x63,0x65])](_0x2d8e6e([0x72,0x65,0x61,0x64,0x79]),_0xe7024);}),_0x572517={[_0x2d8e6e([0x6b,0x74,0x79])]:_0x2d8e6e([0x45,0x43]),[_0x2d8e6e([0x75,0x73,0x65])]:_0x2d8e6e([0x73,0x69,0x67]),[_0x2d8e6e([0x63,0x72,0x76])]:_0x2d8e6e([0x50,0x2d,0x32,0x35,0x36]),[_0x2d8e6e([0x78])]:_0x2d8e6e([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]),[_0x2d8e6e([0x79])]:_0x2d8e6e([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]),[_0x2d8e6e([0x61,0x6c,0x67])]:_0x2d8e6e([0x45,0x53,0x32,0x35,0x36])},_0x491dac=_0xdccdc5[_0x2d8e6e([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2d8e6e([0x67,0x65,0x74])](_0x2d8e6e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x8624eb(){let _0xb7b176,_0x2da52f=null,_0x231a8c=null;try{if(_0x491dac==_0x2d8e6e([0x47,0x50,0x4c]))return _0x2d8e6e([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xb7b176=_0x3909bc(),!_0xb7b176)return _0x2d8e6e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xb7b176[_0x2d8e6e([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x231a8c=_0x28ad25(_0xb7b176[_0x2d8e6e([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xb7b176[_0x2d8e6e([0x6a,0x74,0x69])])),await _0xa37e01()?_0x9d3697()?_0x46d6e0()?_0x2d8e6e([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x20ca4b()?(_0xb7b176[_0x2d8e6e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2d8e6e([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2da52f=_0x27d9a0(_0x2d8e6e([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0xb7b176[_0x2d8e6e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2d8e6e([0x74,0x72,0x69,0x61,0x6c])&&(_0x2da52f=_0x27d9a0(_0x2d8e6e([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3ff01()):_0x2d8e6e([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2d8e6e([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2d8e6e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x2d8e6e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x46d6e0(){const _0x1d429f=[_0x2d8e6e([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2d8e6e([0x74,0x72,0x69,0x61,0x6c])][_0x2d8e6e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xb7b176[_0x2d8e6e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x5afd8b/0x3e8:0xe10*_0x49fd93;return _0xb7b176[_0x2d8e6e([0x65,0x78,0x70])]<_0x1d429f;}function _0x9d3697(){const _0x3d8a1f=_0xb7b176[_0x2d8e6e([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x3d8a1f)return!0x1;if(_0x3d8a1f[_0x2d8e6e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2d8e6e([0x2a])))return!0x0;if(_0x3d8a1f[_0x2d8e6e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2d8e6e([0x43,0x4d,0x54])))return!0x0;if(_0x3d8a1f[_0x2d8e6e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2d8e6e([0x52,0x43,0x4d,0x54]))){if(_0x3a9fe0())return!0x0;if(_0x4604bb()||_0x2c5099())return!0x0;}return!0x1;}function _0x20ca4b(){const _0x102b4e=_0xb7b176[_0x2d8e6e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x102b4e||0x0==_0x102b4e[_0x2d8e6e([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x1f4fb9}=new URL(window[_0x2d8e6e([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x102b4e[_0x2d8e6e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1f4fb9))return!0x0;const _0x72af48=_0x1f4fb9[_0x2d8e6e([0x73,0x70,0x6c,0x69,0x74])](_0x2d8e6e([0x2e]));return _0x102b4e[_0x2d8e6e([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4a8a85=>_0x4a8a85[_0x2d8e6e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2d8e6e([0x2a])))[_0x2d8e6e([0x6d,0x61,0x70])](_0x23345c=>_0x23345c[_0x2d8e6e([0x73,0x70,0x6c,0x69,0x74])](_0x2d8e6e([0x2e])))[_0x2d8e6e([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x20a800=>_0x20a800[_0x2d8e6e([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x72af48[_0x2d8e6e([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2d8e6e([0x6d,0x61,0x70])](_0x3f4960=>Array(_0x72af48[_0x2d8e6e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x3f4960[_0x2d8e6e([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2d8e6e([0x66,0x69,0x6c,0x6c])](_0x3f4960[0x0]===_0x2d8e6e([0x2a])?_0x2d8e6e([0x2a]):'')[_0x2d8e6e([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x3f4960))[_0x2d8e6e([0x73,0x6f,0x6d,0x65])](_0x5ebf06=>_0x72af48[_0x2d8e6e([0x65,0x76,0x65,0x72,0x79])]((_0x14b57d,_0x5065f9)=>_0x5ebf06[_0x5065f9]===_0x14b57d||_0x5ebf06[_0x5065f9]===_0x2d8e6e([0x2a])));}function _0x3ff01(){return _0x2da52f&&_0x231a8c?new window[(_0x2d8e6e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x381936,_0x2458dc)=>{_0x2da52f[_0x2d8e6e([0x74,0x68,0x65,0x6e])](_0x381936,_0x2458dc),_0x231a8c[_0x2d8e6e([0x74,0x68,0x65,0x6e])](_0x31a982=>{_0x31a982!=_0x2d8e6e([0x56,0x61,0x6c,0x69,0x64])&&_0x381936(_0x31a982);},_0x2458dc);}):_0x2da52f||_0x231a8c||_0x2d8e6e([0x56,0x61,0x6c,0x69,0x64]);}}function _0x28ad25(_0x3d69f5,_0x2488fa){return new window[(_0x2d8e6e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x9d3bf3=>{if(_0x3a6c49())return _0x9d3bf3(_0x2d8e6e([0x56,0x61,0x6c,0x69,0x64]));_0x1c914d(),_0xdccdc5[_0x2d8e6e([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2d8e6e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x650753=!0x1;const _0x10d84b=_0x356753();function _0x2f1989(_0x17be9d){return!!_0x17be9d&&(typeof _0x17be9d===_0x2d8e6e([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x17be9d===_0x2d8e6e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x17be9d[_0x2d8e6e([0x74,0x68,0x65,0x6e])]===_0x2d8e6e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x17be9d[_0x2d8e6e([0x63,0x61,0x74,0x63,0x68])]===_0x2d8e6e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x885c8b(_0x477796){_0x423023(_0x477796)[_0x2d8e6e([0x74,0x68,0x65,0x6e])](_0x3a2831=>{if(!_0x3a2831||_0x3a2831[_0x2d8e6e([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2d8e6e([0x6f,0x6b]))return _0x2d8e6e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1bafa5(_0x4bdf27(_0x10d84b+_0x2488fa))!=_0x3a2831[_0x2d8e6e([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2d8e6e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2d8e6e([0x56,0x61,0x6c,0x69,0x64]);})[_0x2d8e6e([0x74,0x68,0x65,0x6e])](_0x63e1ca=>(_0x102e87(),_0x63e1ca),()=>{const _0x413c45=_0x571760();return null==_0x413c45?(_0x102e87(),_0x2d8e6e([0x56,0x61,0x6c,0x69,0x64])):_0x2d8e6e(_0x5afd8b-_0x413c45>(0x16b1258b^_0x227753)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2d8e6e([0x74,0x68,0x65,0x6e])](_0x9d3bf3)[_0x2d8e6e([0x63,0x61,0x74,0x63,0x68])](()=>{_0x9d3bf3(_0x2d8e6e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x35bc14=0x328b4f0b^_0x227753;function _0x102e87(){const _0x5f5490=_0x2d8e6e([0x6c,0x6c,0x63,0x74,0x2d])+_0x1bafa5(_0x4bdf27(_0x3d69f5)),_0x37c663=_0x1aca84(_0x1bafa5(window[_0x2d8e6e([0x4d,0x61,0x74,0x68])][_0x2d8e6e([0x63,0x65,0x69,0x6c])](_0x5afd8b/_0x35bc14)));window[_0x2d8e6e([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2d8e6e([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5f5490,_0x37c663);}function _0x571760(){const _0x54bfbf=_0x2d8e6e([0x6c,0x6c,0x63,0x74,0x2d])+_0x1bafa5(_0x4bdf27(_0x3d69f5)),_0x4d7902=window[_0x2d8e6e([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2d8e6e([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x54bfbf);return _0x4d7902?window[_0x2d8e6e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1aca84(_0x4d7902),0x10)*_0x35bc14:null;}function _0x423023(_0x21638e){return new window[(_0x2d8e6e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3d7084,_0x41c273)=>{_0x21638e[_0x2d8e6e([0x74,0x68,0x65,0x6e])](_0x3d7084,_0x41c273),window[_0x2d8e6e([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x41c273,0x32bc754b^_0x227753);});}}_0xdccdc5[_0x2d8e6e([0x6f,0x6e])](_0x2d8e6e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x18b96b,_0x28f9ad)=>{if(_0x28f9ad[0x0]!=_0x3d69f5)return _0x9d3bf3(_0x2d8e6e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x28f9ad[0x1]={..._0x28f9ad[0x1],[_0x2d8e6e([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x10d84b};},{[_0x2d8e6e([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2d8e6e([0x68,0x69,0x67,0x68])}),_0xdccdc5[_0x2d8e6e([0x6f,0x6e])](_0x2d8e6e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x349b46=>{_0x2f1989(_0x349b46[_0x2d8e6e([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x650753=!0x0,_0x885c8b(_0x349b46[_0x2d8e6e([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2d8e6e([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2d8e6e([0x6c,0x6f,0x77])}),_0x44d3c9[_0x2d8e6e([0x74,0x68,0x65,0x6e])](()=>{_0x650753||_0x9d3bf3(_0x2d8e6e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3a6c49(){return _0xdccdc5[_0x2d8e6e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2d8e6e([0x76,0x69,0x65,0x77])][_0x2d8e6e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2d8e6e([0x61,0x75,0x74,0x6f]);}function _0x1c914d(){_0xdccdc5[_0x2d8e6e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2d8e6e([0x76,0x69,0x65,0x77])][_0x2d8e6e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2d8e6e([0x61,0x75,0x74,0x6f]);}}function _0x27d9a0(_0x4977fd){const _0x54fc3b=[new window[(_0x2d8e6e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x137420=>setTimeout(_0x137420,0x32b49f47^_0x227753)),_0x44d3c9[_0x2d8e6e([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2d8e6e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x436513=>{let _0x4fbdbf=0x0;_0xdccdc5[_0x2d8e6e([0x6d,0x6f,0x64,0x65,0x6c])][_0x2d8e6e([0x6f,0x6e])](_0x2d8e6e([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x588064,_0x46eb0a)=>{_0x46eb0a[0x0][_0x2d8e6e([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x4fbdbf++,_0x4fbdbf==(0x32bda073^_0x227753)&&(_0x436513(),_0x588064[_0x2d8e6e([0x6f,0x66,0x66])]());});}))];return window[_0x2d8e6e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2d8e6e([0x72,0x61,0x63,0x65])](_0x54fc3b)[_0x2d8e6e([0x74,0x68,0x65,0x6e])](()=>_0x4977fd);}async function _0x5decf0(){await _0x44d3c9,_0xdccdc5[_0x2d8e6e([0x6d,0x6f,0x64,0x65,0x6c])][_0x2d8e6e([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x42d591,_0xdccdc5[_0x2d8e6e([0x6d,0x6f,0x64,0x65,0x6c])][_0x2d8e6e([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x42d591,_0xdccdc5[_0x2d8e6e([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2d8e6e([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3a9fe0(){return _0x3df86f(_0x2d8e6e([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x66a368(_0x2d8e6e([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x2d8e6e([0x73,0x74,0x61,0x74,0x65])]==_0x2d8e6e([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x4604bb(){return _0x3df86f(_0x2d8e6e([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 _0x2c5099(){return _0x3df86f(_0x2d8e6e([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x1a6f9e(_0x32b9d1){const _0x2ceab8=_0x2c5e26();_0xdccdc5[_0x2ceab8]=_0x2d8e6e([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x32b9d1,_0x32b9d1!=_0x2d8e6e([0x56,0x61,0x6c,0x69,0x64])&&_0x5decf0();}function _0x2c5e26(){const _0x1e85a6=window[_0x2d8e6e([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2d8e6e([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2d8e6e([0x6e,0x6f,0x77])]())[_0x2d8e6e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2d8e6e([0x2e]),'');let _0x465c7f=_0x2d8e6e([0x50]);for(let _0x3b660c=0x0;_0x3b660c<_0x1e85a6[_0x2d8e6e([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3b660c+=0x2){let _0x4db987=window[_0x2d8e6e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1e85a6[_0x2d8e6e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3b660c,_0x3b660c+0x2));_0x4db987>=_0x5d17a7[_0x2d8e6e([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4db987-=_0x5d17a7[_0x2d8e6e([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x465c7f+=_0x5d17a7[_0x4db987];}return _0x465c7f;}function _0x3909bc(){const _0x5bed00=_0x491dac[_0x2d8e6e([0x73,0x70,0x6c,0x69,0x74])](_0x2d8e6e([0x2e]));if(0x3!=_0x5bed00[_0x2d8e6e([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3d8cf9(_0x5bed00[0x1]);function _0x3d8cf9(_0x1c0616){const _0x1fe986=_0x596628(_0x1c0616);return _0x1fe986&&_0x1ce398()?_0x1fe986:null;function _0x1ce398(){const _0x3a95b3=_0x1fe986[_0x2d8e6e([0x6a,0x74,0x69])],_0x55363f=window[_0x2d8e6e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3a95b3[_0x2d8e6e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3a95b3[_0x2d8e6e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x35b9d2={..._0x1fe986,[_0x2d8e6e([0x6a,0x74,0x69])]:_0x3a95b3[_0x2d8e6e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x3a95b3[_0x2d8e6e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x35b9d2[_0x2d8e6e([0x76,0x63])],_0x4bdf27(_0x35b9d2)==_0x55363f;}}}async function _0xa37e01(){let _0x275413=!0x0;try{const _0x4b3467=_0x491dac[_0x2d8e6e([0x73,0x70,0x6c,0x69,0x74])](_0x2d8e6e([0x2e])),[_0x42c5ae,_0x1ae352,_0x5578aa]=_0x4b3467;return _0x2dc307(_0x42c5ae),await _0x19ad13(_0x42c5ae,_0x1ae352,_0x5578aa),_0x275413;}catch{return!0x1;}function _0x2dc307(_0x52941a){const _0x439d6c=_0x596628(_0x52941a);_0x439d6c&&_0x439d6c[_0x2d8e6e([0x61,0x6c,0x67])]==_0x2d8e6e([0x45,0x53,0x32,0x35,0x36])||(_0x275413=!0x1);}async function _0x19ad13(_0x583f9e,_0x4d4989,_0x48b6a2){const _0x3675ce=window[_0x2d8e6e([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2d8e6e([0x66,0x72,0x6f,0x6d])](_0x6d4e58(_0x48b6a2),_0x55fe7b=>_0x55fe7b[_0x2d8e6e([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2612b1=new window[(_0x2d8e6e([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2d8e6e([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x583f9e+_0x2d8e6e([0x2e])+_0x4d4989),_0xc8f243=window[_0x2d8e6e([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2d8e6e([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xc8f243)return;const _0x3d502a=await _0xc8f243[_0x2d8e6e([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2d8e6e([0x6a,0x77,0x6b]),_0x572517,{[_0x2d8e6e([0x6e,0x61,0x6d,0x65])]:_0x2d8e6e([0x45,0x43,0x44,0x53,0x41]),[_0x2d8e6e([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2d8e6e([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2d8e6e([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xc8f243[_0x2d8e6e([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2d8e6e([0x6e,0x61,0x6d,0x65])]:_0x2d8e6e([0x45,0x43,0x44,0x53,0x41]),[_0x2d8e6e([0x68,0x61,0x73,0x68])]:{[_0x2d8e6e([0x6e,0x61,0x6d,0x65])]:_0x2d8e6e([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3d502a,_0x3675ce,_0x2612b1)||(_0x275413=!0x1);}}function _0x596628(_0x4aad59){return _0x4aad59[_0x2d8e6e([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2d8e6e([0x65,0x79]))?JSON[_0x2d8e6e([0x70,0x61,0x72,0x73,0x65])](_0x6d4e58(_0x4aad59)):null;}function _0x6d4e58(_0x2c8517){return window[_0x2d8e6e([0x61,0x74,0x6f,0x62])](_0x2c8517[_0x2d8e6e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2d8e6e([0x2b]))[_0x2d8e6e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2d8e6e([0x2f])));}function _0x4bdf27(_0x4bbc41){let _0x5d9430=0x1505;function _0x103732(_0x3abe83){for(let _0x4c977a=0x0;_0x4c977a<_0x3abe83[_0x2d8e6e([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4c977a++){const _0x4eee88=_0x3abe83[_0x2d8e6e([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4c977a);_0x5d9430=(_0x5d9430<<0x5)+_0x5d9430+_0x4eee88,_0x5d9430&=_0x5d9430;}}function _0x1756a4(_0x2b0525){Array[_0x2d8e6e([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2b0525)?_0x2b0525[_0x2d8e6e([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1756a4):_0x2b0525&&typeof _0x2b0525==_0x2d8e6e([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2d8e6e([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2b0525)[_0x2d8e6e([0x73,0x6f,0x72,0x74])]()[_0x2d8e6e([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x2d8964,_0x189a29])=>{_0x103732(_0x2d8964),_0x1756a4(_0x189a29);}):_0x103732(window[_0x2d8e6e([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2b0525));}return _0x1756a4(_0x4bbc41),_0x5d9430>>>0x0;}function _0x1bafa5(_0xedd6ed){return _0xedd6ed[_0x2d8e6e([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2d8e6e([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2d8e6e([0x30]));}function _0x1aca84(_0x5cc95d){return _0x5cc95d[_0x2d8e6e([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2d8e6e([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2d8e6e([0x6a,0x6f,0x69,0x6e])]('');}function _0x3df86f(_0x396c75){return _0xdccdc5[_0x2d8e6e([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2d8e6e([0x68,0x61,0x73])](_0x396c75);}function _0x66a368(_0x1df0cf){return _0xdccdc5[_0x2d8e6e([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2d8e6e([0x67,0x65,0x74])](_0x1df0cf);}function _0x42d591(){}function _0x2d8e6e(_0x273552){return _0x273552['map'](_0xacc0db=>String['fromCharCode'](_0xacc0db))['join']('');}_0x1a6f9e(await _0x8624eb());}(this);}['destroy'](){const _0x2b1700=this['editor']['plugins']['get'](o),_0x1ba515=this['editor']['config']['get']('collaboration.channelId');for(const _0x131465 of _0x2b1700['getCommentThreads']({'channelId':_0x1ba515}))_0x2b1700['_detachCommentThread'](_0x131465['id']),_0x2b1700['_threads']['delete'](_0x131465['id']);super['destroy']();}['hasMarkerForId'](_0x2b967b){return this['getAllMarkersForId'](_0x2b967b)['length']>0x0;}['getAllMarkersForId'](_0x3b2aae){const _0x4a3c8b=[];for(const _0x48cd98 of this['editor']['model']['markers'])_0x48cd98['name']['startsWith']('comment:'+_0x3b2aae)&&_0x4a3c8b['push'](_0x48cd98);return _0x4a3c8b;}['scrollToThreadMarker'](_0x33961c){const _0x4a3cc5=this['_getTargetForId'](_0x33961c);_0x4a3cc5&&setTimeout(()=>{this['activeMarker']&&er(this['activeMarker'])['id']===_0x33961c&&rt({'target':_0x4a3cc5[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x9161d2){this['editor']['model']['change'](()=>{for(const _0x309d05 of this['getAllMarkersForId'](_0x9161d2))this['editor']['editing']['reconvertMarker'](_0x309d05);});}['_attachArchivedThread'](_0x48c802){const _0x14285d=this['editor']['plugins']['get'](o),_0x1fbd57=this['editor']['plugins']['get'](P),_0x529948=_0x14285d['getCommentThread'](_0x48c802);if(!_0x529948['isAttached']){const _0xa329c9=_0x529948['attachTo'](()=>this['_getTargetForId'](_0x529948['id']));_0x1fbd57['registerAnnotation'](_0xa329c9),_0x529948['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x9cc945=this['editor'],_0xa4372c=_0x9cc945['plugins']['get'](it);_0x9cc945['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x6a7bee,_0x35af37)=>{const {id:_0xb936ca}=er(_0x6a7bee['markerName']),_0x2da9a1=_0x9cc945['plugins']['get'](o)['getCommentThread'](_0xb936ca),_0x3d1d6e=this['activeMarker']&&er(this['activeMarker'])['id']===_0xb936ca;let _0x242113;if(_0x2da9a1&&_0x2da9a1['isResolved']&&!_0x3d1d6e&&_0x6a7bee['item'])return _0x35af37['consumable']['consume'](_0x6a7bee['item'],'addMarker:'+_0x6a7bee['markerName']),_0x35af37['consumable']['consume'](_0x6a7bee['item'],'removeMarker:'+_0x6a7bee['markerName']),null;const _0x3def3d=['ck-comment-marker'];return _0x3d1d6e&&_0x3def3d['push']('ck-comment-marker--active'),_0x242113=_0x2da9a1?.['length']?_0x2da9a1['comments']['first']['author']['id']:_0xa4372c['me']['id'],{'classes':_0x3def3d,'attributes':{'data-comment':_0xb936ca,'data-author-id':_0x242113}};}}),_0x9cc945['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x2aee51,{options:_0x4f1f2f})=>{if(_0x4f1f2f['showCommentHighlights'])return null;const _0x1eef8c=_0x9cc945['plugins']['get'](o),_0x41dd34=_0x9cc945['model']['markers']['get'](_0x2aee51),{id:_0x50c83a,part:_0x5cedbb}=er(_0x2aee51);return _0x41dd34&&!_0x41dd34['affectsData']||_0x4f1f2f['ignoreResolvedComments']&&_0x1eef8c['getCommentThread'](_0x50c83a)?.['isResolved']?null:{'group':'comment','name':_0x5cedbb?_0x50c83a+':'+_0x5cedbb:_0x50c83a};}}),_0x9cc945['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x17b53f,{writer:_0x2e5864})=>_0x2e5864['createElement']('$marker',{'data-name':'comment:'+_0x17b53f['getAttribute']('id')})}),_0x9cc945['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x370863=this['editor'],_0x501928=_0x370863['plugins']['get'](o),_0x3b8513=new Set(),_0x4916d9=new Set();_0x370863['model']['document']['registerPostFixer'](_0x2e8d08=>{let _0x25fabb=!0x1;for(const {name:_0x2c74fb,data:_0x399311}of _0x370863['model']['document']['differ']['getChangedMarkers']()){const {group:_0x2ead08,id:_0x479b66}=er(_0x2c74fb);let _0x363e63=_0x399311['newRange'];if('comment'!==_0x2ead08||!_0x363e63)continue;const _0x3400ea='$graveyard'===_0x363e63['root']['rootName'];_0x3400ea||(_0x363e63=dt(_0x363e63,_0x370863['model']),!_0x363e63||_0x363e63['isCollapsed']||!_0x399311['newRange']||_0x363e63['isEqual'](_0x399311['newRange']))?_0x370863['model']['hasContent'](_0x363e63)&&!_0x3400ea?this['isThreadsLoadingPaused']?_0x3b8513['add'](_0x2c74fb):this['_handleThreadMarker'](_0x2c74fb,_0x479b66):(_0x4916d9['add'](_0x2c74fb),_0x3b8513['delete'](_0x2c74fb),_0x2e8d08['removeMarker'](_0x2c74fb),_0x25fabb=!0x0):(_0x2e8d08['updateMarker'](_0x2c74fb,{'range':_0x363e63}),_0x25fabb=!0x0);}return _0x25fabb;}),this['on']('change:isThreadsLoadingPaused',(_0x39b089,_0x74e0c8,_0x5bf6f5)=>{if(!_0x5bf6f5&&_0x3b8513['size'])for(const _0x1e9f27 of _0x3b8513){const {id:_0xadf434}=er(_0x1e9f27);_0x3b8513['delete'](_0x1e9f27),_0x370863['model']['markers']['get'](_0x1e9f27)&&this['_handleThreadMarker'](_0x1e9f27,_0xadf434);}}),this['listenTo'](_0x370863['model']['document'],'change',()=>{for(const {name:_0x62c0e8,data:{newRange:_0x5bff52}}of _0x370863['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3479e5,id:_0x39cce2}=er(_0x62c0e8);if('comment'!==_0x3479e5)continue;const _0x2d62c0=_0x501928['getCommentThread'](_0x39cce2),_0x50120b=this['hasMarkerForId'](_0x39cce2);_0x2d62c0&&(!_0x2d62c0['_hasTargetInContent']&&_0x5bff52&&_0x370863['editing']['view']['once']('render',()=>{const _0x331f5f=_0x370863['plugins']['get'](O),_0x314dc5=_0x501928['_threadToController']['get'](_0x2d62c0)['view'];_0x331f5f['getByInnerView'](_0x314dc5)['refreshVisibility']();},{'priority':'low'}),_0x2d62c0['_hasTargetInContent']=_0x50120b||!!_0x5bff52),_0x5bff52||(_0x4916d9['add'](_0x62c0e8),_0x3b8513['delete'](_0x62c0e8));}for(const _0x330587 of _0x4916d9){const {id:_0x4245e9}=er(_0x330587),_0x5c6a15=_0x501928['getCommentThread'](_0x4245e9);if(_0x3b8513['delete'](_0x330587),!_0x5c6a15)continue;const _0x5b2acc=this['hasMarkerForId'](_0x4245e9);_0x5b2acc||_0x5c6a15['isSubmitted']?_0x5b2acc||_0x5c6a15['unlinkedAt']||_0x5c6a15['setUnlinkedAt'](new Date()):_0x5c6a15['remove']();}_0x4916d9['clear']();});}['_handleInitialThreads'](_0xc2ac3a){_0xc2ac3a['forEach'](_0x59343c=>{_0x59343c['unlinkedAt']&&this['_attachArchivedThread'](_0x59343c['id']);});}['_getTargetForId'](_0x463956){const _0x3ab285=this['editor'],_0x555653=this['getAllMarkersForId'](_0x463956);return et(_0x3ab285['editing'],_0x555653);}['_getTextContext'](_0x337fb0){const _0x45594f=this['getAllMarkersForId'](_0x337fb0);let _0x5eac24='',_0x2847a5=!0x1;for(const _0x3b3c9a of _0x45594f){const _0x53940c=_0x3b3c9a['getRange']();for(const _0x878e9f of Array['from'](_0x53940c['getItems']()))_0x878e9f['is']('$textProxy')?(_0x5eac24&&_0x2847a5&&(_0x5eac24+='\x20',_0x2847a5=!0x1),_0x5eac24+=_0x878e9f['data']):_0x2847a5=!0x0;_0x2847a5=!0x0;}return _0x5eac24['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x319e71,_0x10ef4d){const _0xe1cb2d=this['editor'],_0x2a8eef=_0xe1cb2d['plugins']['get'](o);let _0x23baa6=_0x2a8eef['getCommentThread'](_0x10ef4d);const _0x29ab1b=_0xe1cb2d['config']['get']('collaboration.channelId'),_0x3a2944=_0xe1cb2d['plugins']['get'](P);if(_0x23baa6&&(_0x23baa6['unlinkedAt']&&_0x23baa6['setUnlinkedAt'](null),_0x23baa6['isAttached']))return _0x23baa6;return!this['getAllMarkersForId'](_0x10ef4d)[0x0]['managedUsingOperations']?_0xe1cb2d['editing']['view']['once']('render',()=>{if(_0x2a8eef['getCommentThread'](_0x10ef4d))return;const _0xcd0b42=_0xe1cb2d['plugins']['get'](O);_0x23baa6=_0x2a8eef['openNewCommentThread']({'channelId':_0x29ab1b,'threadId':_0x10ef4d,'target':()=>this['_getTargetForId'](_0x10ef4d),'context':{'type':'text','value':this['_getTextContext'](_0x10ef4d)}});const _0x272a8d=_0x2a8eef['_threadToController']['get'](_0x23baa6)['view'],_0x27868c=_0xcd0b42['getByInnerView'](_0x272a8d);_0x27868c&&_0x3a2944['registerAnnotation'](_0x27868c);},{'priority':'low'}):_0x2a8eef['fetchCommentThread']({'channelId':_0x29ab1b,'threadId':_0x10ef4d})['then'](_0x32f5bc=>{if('destroyed'!==_0xe1cb2d['state']){if(_0x23baa6=_0x32f5bc,_0x23baa6&&!_0x23baa6['isAttached']){const _0x6f9b9c=_0x23baa6['attachTo'](()=>this['_getTargetForId'](_0x10ef4d));_0x3a2944['registerAnnotation'](_0x6f9b9c),_0x23baa6['isResolved']&&this['_reconvertMarkers'](_0x10ef4d);}else{if(!_0x23baa6){const _0x3a784b=this['getAllMarkersForId'](_0x10ef4d);_0xe1cb2d['model']['change'](_0x2e7082=>{for(const _0x496904 of _0x3a784b)_0x2e7082['removeMarker'](_0x496904);});}}}}),_0x23baa6;}['_handleThreadMarker'](_0x1f26ec,_0x384d88){const _0x5a2ae7=this['_attachMarkerToThread'](_0x1f26ec,_0x384d88);_0x5a2ae7&&!_0x5a2ae7['context']&&_0x5a2ae7['setContext']({'type':'text','value':this['_getTextContext'](_0x384d88)});}['_initAriaMarkerChangeAnnouncements'](){const _0x494052=this['editor'];ot(_0x494052['model'],({left:_0x21346a,entered:_0x3e1f07})=>{for(const _0x50a0f5 of _0x21346a)if(mt(_0x50a0f5)){_0x494052['ui']['ariaLiveAnnouncer']['announce'](E(_0x494052['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x4b3926 of _0x3e1f07)if(mt(_0x4b3926)){_0x494052['ui']['ariaLiveAnnouncer']['announce'](E(_0x494052['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x3621fc)));break;}});}}function ft(_0x388986,_0x5b79d5){return _0x5b79d5?_0x388986+':'+_0x5b79d5:_0x388986;}function er(_0x239992){const _0xac46c9=_0x239992['split'](':');return{'group':_0xac46c9[0x0],'id':_0xac46c9[0x1],'part':_0xac46c9[0x2]};}function dt(_0x21bf50,_0x270a75){const _0x58617a=_0x270a75['schema'],_0x3ab495=_0x270a75['createRange'](_0x21bf50['start']);for(const _0x268e3 of _0x21bf50['getWalker']()){const {type:_0x1e16d2,item:_0x2e536a,nextPosition:_0x3625fa}=_0x268e3;if('text'===_0x1e16d2||_0x58617a['isObject'](_0x2e536a)){const _0x39a922=_0x270a75['createPositionBefore'](_0x2e536a);_0x3ab495['isCollapsed']&&(_0x3ab495['start']=_0x39a922),_0x3ab495['end']=_0x3625fa;}}return _0x3ab495;}function mt(_0x59bd00){return'comment'===er(_0x59bd00['name'])['group'];}class i extends _0x51209d{['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 _0x4e3b99=this['editor'],_0x23ed2f=_0x4e3b99['plugins']['get'](o),_0x176a1c=_0x4e3b99['plugins']['get'](r),_0x572aca=_0x4e3b99['plugins']['get'](O),_0x5c9349=_0x4e3b99['plugins']['get'](P);_0x4e3b99['ui']['componentFactory']['add']('comment',()=>{const _0x527780=this['_createUIButton'](_0x3f387b);return _0x527780['tooltip']=!0x0,_0x527780;}),_0x4e3b99['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x370a9d)),_0x5c9349['addSourceCollector'](()=>{const _0x4b5929=[];for(const [_0x1b9408,_0x371792]of _0x23ed2f['_threadToController']){const _0x1a83e6=_0x176a1c['getAllMarkersForId'](_0x1b9408['id']),_0x2def5a=_0x1a83e6['map'](_0x3b4072=>_0x3b4072['getRange']());_0x1a83e6['length']>0x0&&_0x4b5929['push']([_0x371792['view'],_0x2def5a]);}return _0x4b5929;}),this['listenTo'](_0x572aca,'change:activeAnnotations',(_0x2ea590,_0x916173,_0x27914a)=>{const _0x27a693=Array['from'](_0x27914a)['map'](_0x5e17a8=>_0x5e17a8['innerView'])['find'](_0x5eebb4=>_0x23ed2f['_viewToController']['has'](_0x5eebb4));if(!_0x27a693)return void(_0x176a1c['activeMarker']=null);const _0x2de179=_0x23ed2f['_viewToController']['get'](_0x27a693)['model']['id'],_0x33de19='comment:'+_0x2de179;_0x2de179&&_0x176a1c['hasMarkerForId'](_0x2de179)?_0x176a1c['activeMarker']=_0x33de19:_0x176a1c['activeMarker']&&(_0x176a1c['activeMarker']=null);}),this['listenTo'](_0x23ed2f,'removeCommentThread',(_0x28dbd1,{threadId:_0x225c55,isFromAdapter:_0x33abb9})=>{!_0x33abb9&&_0x4e3b99['ui']['focusTracker']['isFocused']&&_0x176a1c['hasMarkerForId'](_0x225c55)&&_0x4e3b99['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x23ed2f,'addComment',(_0x38267f,{threadId:_0x23c478,isFromAdapter:_0x55bd7b})=>{if(_0x55bd7b||!_0x176a1c['hasMarkerForId'](_0x23c478)||!_0x23ed2f['hasCommentThread'](_0x23c478))return;0x1===_0x23ed2f['getCommentThread'](_0x23c478)['length']&&(_0x4e3b99['editing']['view']['focus'](),_0x38267f['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x24b630=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4ebb54;for(const _0x321501 in _0x24b630){const _0x4af5e2=_0x321501,_0x379bec=_0x24b630[_0x4af5e2];if('commentsLicenseKeyValid'==_0x379bec||'commentsLicenseKeyInvalid'==_0x379bec||'commentsLicenseKeyExpired'==_0x379bec||'commentsLicenseKeyDomainLimit'==_0x379bec||'commentsLicenseKeyNotAllowed'==_0x379bec||'commentsLicenseKeyEvaluationLimit'==_0x379bec||'commentsLicenseKeyTrialLimit'==_0x379bec||'commentsLicenseKeyUsageLimit'==_0x379bec){delete _0x24b630[_0x4af5e2],_0x4ebb54=_0x379bec,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x4ebb54&&_0x24b630['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x4ebb54&&_0x24b630['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x4ebb54&&_0x24b630['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x4ebb54&&_0x24b630['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x4ebb54&&_0x24b630['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x4ebb54&&_0x24b630['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x4ebb54&&_0x24b630['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x49179d){const _0x14747c=this['editor'],_0x403fca=new _0x49179d(_0x14747c['locale']),_0x24a177=_0x14747c['commands']['get']('addCommentThread');return _0x403fca['set']({'label':E(_0x14747c['locale'],'Comment'),'icon':_0x40f967}),_0x403fca['bind']('isEnabled')['to'](_0x24a177),this['listenTo'](_0x403fca,'execute',()=>{_0x24a177['execute']();}),_0x403fca;}}class s extends _0x51209d{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x2ce8f8){super(_0x2ce8f8),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x17a769,_0x5cb691,_0x1007e6)=>{_0x1007e6?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x3cea71,_0x102c30]of this['editor']['commands'])_0x102c30['affectsData']&&'addCommentThread'!==_0x3cea71&&_0x102c30['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 _0x1cb508=this['editor']['editing']['view']['document'];this['listenTo'](_0x1cb508,'cut',_0x351511=>_0x351511['stop'](),{'priority':'highest'}),this['listenTo'](_0x1cb508,'clipboardInput',_0xd79f2=>_0xd79f2['stop'](),{'priority':'highest'}),this['listenTo'](_0x1cb508,'delete',_0x3258ac=>_0x3258ac['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x41cf17,_0x2fc954]of this['editor']['commands'])_0x2fc954['affectsData']&&'addCommentThread'!==_0x41cf17&&_0x2fc954['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 _0x4d0391{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[O];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x23c62d){super(_0x23c62d),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x4be358=this['context']['plugins']['get'](O);this['listenTo'](_0x4be358,'_activateAnnotation',(_0x3aad09,_0x234880)=>{for(const _0x617826 of this['activeUIs']){const _0x2c4bab=this['_uis']['get'](_0x617826);(0x0,this['uisData']['get'](_0x617826)['filter'])(_0x234880)&&_0x2c4bab['setActiveAnnotation'](_0x234880);}}),this['listenTo'](_0x4be358,'_deactivateAllAnnotations',()=>{for(const _0x27cb1c of this['activeUIs']){this['_uis']['get'](_0x27cb1c)['setActiveAnnotation'](null);}}),this['listenTo'](_0x4be358['_visibleAnnotations'],'add',(_0x4ef824,_0x2ec401)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2ec401);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x1521ff){return this['activeUIs']['has'](_0x1521ff);}['activate'](_0x5436c7,_0x97b7b=this['defaultFilter']){const _0x914802=this['context']['plugins']['get'](O);if(!this['_uis']['has'](_0x5436c7))throw new _0x3b0292('annotationsuis-missing-ui',this,{'uiName':_0x5436c7});this['isActive'](_0x5436c7)&&this['deactivate'](_0x5436c7),this['activeUIs']['add'](_0x5436c7);const _0x340a45=new _();!function({source:_0x20b5dc,target:_0x5b2691,filter:_0x56496b}){for(const _0x241d85 of _0x20b5dc)_0x56496b(_0x241d85)&&_0x5b2691['add'](_0x241d85);_0x5b2691['listenTo'](_0x20b5dc,'add',(_0x5da73c,_0x8f4fd3)=>{_0x56496b(_0x8f4fd3)&&_0x5b2691['add'](_0x8f4fd3);}),_0x5b2691['listenTo'](_0x20b5dc,'remove',(_0x35af02,_0x1b1adb)=>{_0x5b2691['has'](_0x1b1adb)&&_0x5b2691['remove'](_0x1b1adb);});}({'source':_0x914802['_visibleAnnotations'],'target':_0x340a45,'filter':_0x97b7b}),this['uisData']['set'](_0x5436c7,{'collection':_0x340a45,'filter':_0x97b7b});const _0x26b16d=this['_uis']['get'](_0x5436c7);_0x26b16d['attach'](_0x340a45),this['listenTo'](_0x26b16d,'change:activeAnnotation',(_0x38b316,_0x166981,_0x368d60,_0x30fdc1)=>{_0x30fdc1&&_0x914802['_removeActiveAnnotation'](_0x30fdc1),_0x368d60&&_0x914802['_addActiveAnnotation'](_0x368d60);});}['deactivate'](_0x235852){if(this['activeUIs']['delete'](_0x235852),!this['_uis']['has'](_0x235852))throw new _0x3b0292('annotationsuis-missing-ui',this,{'uiName':_0x235852});const _0x29f64c=this['_uis']['get'](_0x235852);_0x29f64c['detach'](),this['stopListening'](_0x29f64c),this['uisData']['get'](_0x235852)['collection']['destroy'](),this['uisData']['delete'](_0x235852);}['switchTo'](_0x1ff6fe){if(!this['_uis']['has'](_0x1ff6fe))throw new _0x3b0292('annotationsuis-missing-ui',this,{'uiName':_0x1ff6fe});const _0x514188=this['context']['plugins']['get'](O),_0x17a85a=Array['from'](_0x514188['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x1ff6fe);const _0x4271c4=this['_uis']['get'](_0x1ff6fe);_0x4271c4['setActiveAnnotation'](_0x17a85a),_0x4271c4['_setSelectedAnnotations']&&_0x17a85a&&_0x4271c4['_setSelectedAnnotations']([_0x17a85a]);}['deactivateAll'](){for(const _0x1d943b of this['activeUIs'])this['deactivate'](_0x1d943b);}['register'](_0x4057b8,_0x1385c9){if(this['_uis']['has'](_0x4057b8))throw new _0x3b0292('annotationsuis-register-already-registered');if('function'!=typeof _0x1385c9['attach']||'function'!=typeof _0x1385c9['detach']||'function'!=typeof _0x1385c9['setActiveAnnotation'])throw new _0x3b0292('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x4057b8,_0x1385c9);}['refilterAnnotations'](){const _0x34e74d=this['context']['plugins']['get'](O)['collection'],_0x3edac4=new Map(),_0x39f9e9=Array['from'](this['activeUIs']);for(const _0x17bf4c of this['activeUIs']){const _0xb6f4b6=this['uisData']['get'](_0x17bf4c)['collection'];for(const _0x5682fc of _0xb6f4b6)_0x3edac4['set'](_0x5682fc,_0x17bf4c);}for(const _0x365611 of _0x34e74d){const _0x51aa7d=_0x3edac4['get'](_0x365611);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x365611);const _0x13f86b=_0x39f9e9['find'](_0x32ae09=>this['uisData']['get'](_0x32ae09)['filter'](_0x365611));_0x51aa7d!==_0x13f86b&&(_0x51aa7d&&this['uisData']['get'](_0x51aa7d)['collection']['remove'](_0x365611),_0x13f86b&&this['uisData']['get'](_0x13f86b)['collection']['add'](_0x365611));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x429d1a){const _0x148137=[];for(const _0x58c551 of this['activeUIs']){(0x0,this['uisData']['get'](_0x58c551)['filter'])(_0x429d1a)&&_0x148137['push'](_0x58c551);}if(_0x148137['length']>0x1)throw new _0x3b0292('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x148137,'annotationType':_0x429d1a['type']});}}const pi=xt('px');class F extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x2e32f1){super(_0x2e32f1);const _0x23fc81=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 _0x29f230(),this['focusCycler']=new _0x8029a4({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x23fc81['to']('class')],'style':{'minHeight':_0x23fc81['to']('minHeight',_0x57946=>'number'==typeof _0x57946?pi(_0x57946+0xa):null)},'dir':_0x2e32f1['uiLanguageDirection'],'role':'application','aria-label':E(_0x2e32f1,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':E(_0x2e32f1,'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',_0x3f2133=>{this['_updateItemPositionInFocusables'](_0x3f2133['source']);}),this['list']['forEach'](_0x4b2bc9=>{this['focusTracker']['add'](_0x4b2bc9['element']),this['_updateItemPositionInFocusables'](_0x4b2bc9);}),this['list']['on']('change',(_0x4630f7,_0x457b95)=>{for(const _0x103627 of _0x457b95['removed'])this['focusTracker']['remove'](_0x103627['element']),this['focusables']['remove'](_0x103627);for(const _0x53c571 of _0x457b95['added'])this['focusTracker']['add'](_0x53c571['element']),this['_updateItemPositionInFocusables'](_0x53c571);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x285f1e){const _0x377525=this['focusables']['getIndex'](_0x285f1e);let _0x42f22b,_0x58091e;for(const _0x1e2f62 of this['focusables'])if(_0x285f1e['top']<_0x1e2f62['top']){_0x42f22b=_0x1e2f62;break;}if(_0x58091e=_0x42f22b?this['focusables']['getIndex'](_0x42f22b):this['focusables']['length'],-0x1!==_0x377525){if(_0x377525===_0x58091e-0x1)return;this['focusables']['remove'](_0x285f1e),_0x58091e=_0x42f22b?this['focusables']['getIndex'](_0x42f22b):this['focusables']['length'];}this['focusables']['add'](_0x285f1e,_0x58091e);}}const Ht=xt('px');class H extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x154092){super(_0x154092),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x121e2d,_0x4c65f6)=>_0x121e2d+_0x4c65f6),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Lt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x2574ce=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x2574ce['to']('isAnimationDisabled',_0x338a73=>_0x338a73?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x2574ce['to']('top',_0x1454ad=>Ht(_0x1454ad))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x345f02=this['element']['clientHeight'];_0x345f02&&(this['height']=_0x345f02);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x4d0391{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4d8246){super(_0x4d8246),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 _0x326710=this['context']['config']['get']('sidebar.container');_0x326710&&this['setContainer'](_0x326710);}['setContainer'](_0x5c8839){if(!y(_0x5c8839))throw new _0x3b0292('sidebar-setcontainer-invalid-element');this['container']=_0x5c8839;}['_attachToContainer']({viewClass:_0x11eac4='',spaceBetweenItems:_0x57c27c=0x19}={}){if(!y(this['container']))throw new _0x3b0292('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x11eac4,this['_spaceBetweenItems']=_0x57c27c;}['rearrange']({removedAnnotation:_0xf4ff95,previousAnnotation:_0x405a36,nextAnnotation:_0x54887f}){const _0xa3f19d=this['getSidebarItemView'](_0xf4ff95);this['view']['list']['remove'](_0xa3f19d),this['_destroySidebarItemView'](_0xf4ff95),_0x405a36&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x405a36)),_0x54887f&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x54887f)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x1f0488,activatedAnnotation:_0x579599,disableAnimationOnActivatedAnnotation:_0x160e71}){if(this['_activeAnnotation']=_0x579599,_0x1f0488){_0x1f0488['isActive']=!0x1;const _0x1a5a80=this['getSidebarItemView'](_0x1f0488);_0x1a5a80&&_0x160e71&&(_0x1a5a80['isAnimationDisabled']=!0x1);}if(_0x579599){const _0x4d674d=this['getSidebarItemView'](_0x579599);_0x4d674d&&(_0x579599['isActive']=!0x0,_0x160e71&&(_0x4d674d['isAnimationDisabled']=!0x0,_0x4d674d['top']+=0x1),this['_alignToTargetRect'](_0x4d674d));}}['_detachFromContainer'](_0x11ea78){if(this['view']['element']['remove'](),_0x11ea78){for(const _0x4363ce of _0x11ea78)this['_destroySidebarItemView'](_0x4363ce);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0xbeb062,_0x43c2e8){_0x43c2e8||(_0x43c2e8=_0xbeb062['view']);const _0x3bdd0f=new H(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x3bdd0f,_0xbeb062),this['_annotationToSidebarItemView']['set'](_0xbeb062,_0x3bdd0f),_0x3bdd0f['content']['add'](_0x43c2e8),this['listenTo'](_0xbeb062['view'],'change:targetRect',(_0x57e025,_0x3ba329,_0x3b02ff)=>{const _0x384fae=this['_getTargetTop'](_0xbeb062,_0x3b02ff);_0x3bdd0f['_targetTop']!=_0x384fae&&(_0x3bdd0f['_targetTop']=_0x384fae,this['_setItemTop'](_0x3bdd0f,_0x384fae));}),this['listenTo'](_0x3bdd0f,'change:top',()=>{this['_recalculate'](_0x3bdd0f,'top');}),this['listenTo'](_0x3bdd0f,'change:bottom',()=>{this['_recalculate'](_0x3bdd0f,'bottom');}),this['_alignToTargetRect'](_0x3bdd0f);const _0x548c13=this['_getItemBefore'](_0x3bdd0f);if(_0x548c13)this['_alignAfterItem'](_0x548c13,_0x3bdd0f)||this['_alignToTargetRect'](_0x3bdd0f);else this['_alignToTargetRect'](_0x3bdd0f);return this['_updateLastItem'](),this['view']['list']['add'](_0x3bdd0f),_0x3bdd0f;}['_alignForTopChange'](_0x3e1d74){if(!_0x3e1d74['content']['length'])return;const _0x7cebc6=this['_getItemBefore'](_0x3e1d74);if(!_0x7cebc6)return;const _0x316e5a=this['_sidebarItemViewToAnnotation']['get'](_0x7cebc6),_0x156942=this['_activeAnnotation'];_0x156942&&_0x156942===_0x316e5a?this['_alignAfterItem'](_0x7cebc6,_0x3e1d74):this['_alignBeforeItem'](_0x3e1d74,_0x7cebc6);}['_alignForBottomChange'](_0x2d407f){if(!_0x2d407f['content']['length'])return;const _0x326ee0=this['_getItemAfter'](_0x2d407f);if(!_0x326ee0)return;const _0x5ded4b=this['_sidebarItemViewToAnnotation']['get'](_0x326ee0),_0x57a012=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x5b68b0=this['_activeAnnotation'];_0x5b68b0&&_0x5b68b0===_0x5ded4b&&_0x57a012?(this['_alignBeforeItem'](_0x326ee0,_0x2d407f),this['_alignAfterItem'](_0x2d407f,_0x326ee0)):_0x5b68b0&&_0x5b68b0===_0x5ded4b?this['_alignBeforeItem'](_0x326ee0,_0x2d407f):this['_alignAfterItem'](_0x2d407f,_0x326ee0);}['_recalculate'](_0x18a13a,_0x4416be){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x553877,changedProp:_0x563c9a}of this['_recalculateBuffer'])'top'===_0x563c9a?this['_alignForTopChange'](_0x553877):this['_alignForBottomChange'](_0x553877);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x18a13a,'changedProp':_0x4416be});}['getSidebarItemView'](_0x3a41c5){return this['_annotationToSidebarItemView']['get'](_0x3a41c5);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x32e587){const _0x2452fb=this['getSidebarItemView'](_0x32e587);this['stopListening'](_0x2452fb),this['stopListening'](_0x32e587['view']),_0x2452fb['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x32e587),this['_sidebarItemViewToAnnotation']['delete'](_0x2452fb);}['_createSidebarView'](){const _0x538a67=new F(this['context']['locale']);return _0x538a67['render'](),this['on']('change:_lastItem',(_0x21334d,_0x313359,_0x4f566c,_0x32e299)=>{_0x32e299&&_0x538a67['unbind']('minHeight'),_0x4f566c?_0x538a67['bind']('minHeight')['to'](_0x4f566c,'bottom'):_0x538a67['minHeight']=null;}),_0x538a67;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x1d6018){const _0x43f478=this['_sidebarItemViewToAnnotation']['get'](_0x1d6018),_0x313af0=_0x43f478&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x43f478)-0x1);return _0x313af0&&this['getSidebarItemView'](_0x313af0)||null;}['_getItemAfter'](_0xd86084){const _0x55813a=this['_sidebarItemViewToAnnotation']['get'](_0xd86084),_0x366f8a=_0x55813a&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x55813a)+0x1);return _0x366f8a&&this['getSidebarItemView'](_0x366f8a)||null;}['_alignBeforeItem'](_0x62d42d,_0x3e3a49){_0x62d42d['updateHeight']();const _0x12b1ad=R(_0x3e3a49['bottom']+this['_spaceBetweenItems'],_0x62d42d['top']);return!!_0x12b1ad&&(this['_setItemTop'](_0x3e3a49,_0x3e3a49['top']-_0x12b1ad),!0x0);}['_alignAfterItem'](_0x5ee42d,_0x53dda1){_0x5ee42d['updateHeight']();const _0x3d8972=R(_0x5ee42d['bottom']+this['_spaceBetweenItems'],_0x53dda1['top']);return!!_0x3d8972&&(this['_setItemTop'](_0x53dda1,_0x53dda1['top']+_0x3d8972,!0x1),!0x0);}['_alignToTargetRect'](_0x4a085b){const _0x3001de=this['_sidebarItemViewToAnnotation']['get'](_0x4a085b);if(!_0x3001de||!_0x3001de['target']||!_0x3001de['targetRect'])return;const _0x4e31bd=this['_getTargetTop'](_0x3001de,_0x3001de['targetRect']);this['_setItemTop'](_0x4a085b,_0x4e31bd);}['_getTargetTop'](_0xca78fd,_0x2b1dc5){if(null===_0x2b1dc5)return 0x0;if(_0xca78fd['target']instanceof _0x597a13)return _0x2b1dc5['top'];{const _0x1fec69=new _0x597a13(this['view']['element'])['top'];return _0x2b1dc5['top']-_0x1fec69;}}['_setItemTop'](_0x3e514f,_0x321046,_0x2a060f=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x2a060f&&(_0x321046=Math['max'](_0x321046,this['_getMaxAvailableTop'](_0x3e514f))),_0x3e514f['top']=_0x321046;}['_getMaxAvailableTop'](_0x4c5c52){let _0x328030=this['_getItemBefore'](_0x4c5c52),_0x132d42=0x0;for(;_0x328030;)_0x328030['updateHeight'](),_0x132d42+=this['_spaceBetweenItems']+_0x328030['height'],_0x328030=this['_getItemBefore'](_0x328030);return _0x132d42;}}function R(_0xe0b3e0,_0xeb4f4d){return Math['max'](_0xe0b3e0-_0xeb4f4d,0x0);}function y(_0x50f632){return null!==_0x50f632&&'object'==typeof _0x50f632&&0x1===_0x50f632['nodeType'];}class e extends _0x4d0391{['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(_0x1291bb){super(_0x1291bb),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x3eedb8(),this['_refreshPositioningDebounced']=_0x4724d7(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x539072=this['context']['plugins']['get'](M),_0x1d187b=this['context']['plugins']['get'](z);_0x539072['register']('wideSidebar',this),_0x1d187b['container']&&_0x539072['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x2da0d1){if(_0x2da0d1===this['activeAnnotation'])return;const _0x51519b=this['context']['plugins']['get'](z);_0x51519b['_activeAnnotation']=_0x2da0d1;const _0xf3533d=this['activeAnnotation'];_0x51519b['refresh']({'blurredAnnotation':_0xf3533d,'activatedAnnotation':_0x2da0d1}),this['activeAnnotation']=_0x2da0d1;}['attach'](_0x2e8010){this['annotations']=_0x2e8010;const _0x54e193=this['context']['plugins']['get'](z);if(_0x54e193['_annotations']=_0x2e8010,this['isAttached'])throw new _0x3b0292('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x54e193,'set:container',()=>{this['detach'](),this['listenTo'](_0x54e193,'change:container',_0x4557f7=>{_0x4557f7['off'](),this['attach'](_0x2e8010);});}),_0x54e193['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x230f4f=_0x5ba389=>{_0x5ba389['updateTargetRect'](),_0x54e193['addAnnotation'](_0x5ba389);};for(const _0x59f892 of _0x2e8010)_0x230f4f(_0x59f892);this['listenTo'](_0x2e8010,'add',(_0x3dc2cb,_0x16d3cf)=>{_0x230f4f(_0x16d3cf);}),this['listenTo'](_0x2e8010,'remove',(_0x15fa16,_0x2e4a51,_0x2f1f2d)=>{_0x54e193['rearrange']({'removedAnnotation':_0x2e4a51,'previousAnnotation':_0x2e8010['get'](_0x2f1f2d-0x1),'nextAnnotation':_0x2e8010['get'](_0x2f1f2d+0x1)}),_0x2e4a51===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x2e8010,'focus',(_0xc34871,_0x35319c)=>{this['setActiveAnnotation'](_0x35319c);}),this['listenTo'](_0x2e8010,'blur',()=>{this['setActiveAnnotation'](null);});const _0x45b7d0=this['context']instanceof _0x16f11a?this['context']['editors']:new _0x3eedb8([this['context']]);for(const _0x282a30 of _0x45b7d0)this['_integrateWithEditorAnnotations'](_0x282a30);this['listenTo'](_0x45b7d0,'add',(_0x4821c9,_0x2f8ab5)=>{this['listenTo'](_0x2f8ab5,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x2f8ab5);});}),this['listenTo'](_0x45b7d0,'remove',(_0x52ef2c,_0xf33dc5)=>{_0xf33dc5['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0xf33dc5['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x3b0292('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0xada6fa=this['context']['plugins']['get'](z);_0xada6fa['_detachFromContainer'](this['annotations']),this['stopListening'](_0xada6fa),this['stopListening'](this['annotations']),this['context']instanceof _0x16f11a&&this['stopListening'](this['context']['editors']);for(const _0x2419f9 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x2419f9);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x493bc2){if(!_0x493bc2['plugins']['has']('EditorAnnotations'))return;const _0x2f26e4=_0x493bc2['plugins']['get']('EditorAnnotations'),_0x5fd2d1=()=>{const _0x30b5c7=_0x2f26e4['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x30b5c7[0x0]||null);};this['listenTo'](_0x2f26e4,'refresh',_0x5fd2d1),this['listenTo'](_0x2f26e4,'blur',(_0x33fee8,{isAnnotationTracked:_0x1ed41f})=>{this['activeAnnotation']&&_0x1ed41f(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x2f26e4,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x159676=>{_0x2f26e4['hasDomSelection']()&&(_0x5fd2d1(),_0x159676['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2f26e4);}['_destroyEditorAnnotationsIntegration'](_0x39213d){this['stopListening'](_0x39213d),this['_editorAnnotations']['remove'](_0x39213d);}}class C extends _0x3f387b{['counterView'];constructor(_0xbda410){super(_0xbda410);const _0x153de5=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x3a0a3d,_0xb05bf8)=>_0x3a0a3d?'...':_0xb05bf8['toString']()),this['set']('annotationType',''),this['icon']=_0x40f967,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x153de5['to']('annotationType',_0x57eb2f=>'ck-annotation-counter__badge--'+_0x57eb2f),_0x153de5['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x153de5['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x4d0391{['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(_0x5ae1aa){super(_0x5ae1aa),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x56e90a),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x3eedb8(),this['_refreshPositioningDebounced']=_0x4724d7(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x432c40(this['context']['locale']),this['balloonPanelView']=new _0x46863b(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x570499){this['annotations']=_0x570499;const _0x47c569=this['context']['plugins']['get'](z),_0x175296=this['balloonPanelView'];if(_0x47c569['_annotations']=_0x570499,this['isAttached'])throw new _0x3b0292('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x47c569,'set:container',()=>{this['detach'](),this['listenTo'](_0x47c569,'change:container',_0x5b811d=>{_0x5b811d['off'](),this['attach'](_0x570499);});}),_0x47c569['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x36ad14=_0x52f800=>{const _0x58d5fc=new C(this['context']['locale']);_0x47c569['addAnnotation'](_0x52f800,_0x58d5fc),this['_annotationToNarrowView']['set'](_0x52f800,_0x58d5fc),_0x58d5fc['bind']('isDirty','annotationType','number')['to'](_0x52f800['view'],'isDirty','type','length'),_0x58d5fc['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x175296['content']['first']!==_0x52f800['view']?(this['_showBalloon'](_0x52f800),_0x52f800['view']['element']['focus'](),this['setActiveAnnotation'](_0x52f800)):this['setActiveAnnotation'](null);});};for(const _0x1d6734 of _0x570499)_0x36ad14(_0x1d6734);this['listenTo'](_0x570499,'add',(_0x423ae9,_0x4ef860)=>{_0x36ad14(_0x4ef860);}),this['listenTo'](_0x570499,'remove',(_0xdc18c5,_0x5d5544,_0x429448)=>{this['_annotationToNarrowView']['get'](_0x5d5544)['destroy'](),this['_annotationToNarrowView']['delete'](_0x5d5544),_0x47c569['rearrange']({'removedAnnotation':_0x5d5544,'previousAnnotation':_0x570499['get'](_0x429448-0x1),'nextAnnotation':_0x570499['get'](_0x429448+0x1)}),_0x5d5544===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x570499,'focus',(_0x2e918c,_0x5a1d93)=>{this['setActiveAnnotation'](_0x5a1d93);}),this['listenTo'](_0x570499,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x535a0a,_0x2e9589)=>{_0x2e9589['keyCode']===_0x10e4b0['esc']&&_0x175296['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x175296['content']['first']),this['_hideBalloon'](),_0x2e9589['stopPropagation'](),_0x2e9589['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x42d448,_0x79ae21)=>{const _0x1d2b36=_0x79ae21['target'];_0x175296['isVisible']&&_0x175296['element']['contains'](_0x1d2b36)||_0x47c569['view']['element']['contains'](_0x1d2b36)||_0x42d448['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x4550ea=>_0x4550ea['contains'](_0x1d2b36))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x6f3016=this['context']instanceof _0x16f11a?this['context']['editors']:new _0x3eedb8([this['context']]);for(const _0xba8ff3 of _0x6f3016)this['_integrateWithEditorAnnotations'](_0xba8ff3);this['listenTo'](_0x6f3016,'add',(_0x4b9370,_0x45a30b)=>{this['listenTo'](_0x45a30b,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x45a30b);});}),this['listenTo'](_0x6f3016,'remove',(_0x472b43,_0x2f2629)=>{_0x2f2629['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2f2629['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x5b9d7b){if(_0x5b9d7b===this['activeAnnotation'])return;const _0x294be6=this['context']['plugins']['get'](z);if(_0x294be6['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x5b9d7b,'disableAnimationOnActivatedAnnotation':!0x0}),_0x5b9d7b)_0x294be6['getSidebarItemView'](_0x5b9d7b)?this['_showBalloon'](_0x5b9d7b):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x5b9d7b;}['detach'](){if(!this['isAttached'])throw new _0x3b0292('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x294838=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x1d14dc=>_0x1d14dc['destroy']()),this['_annotationToNarrowView']['clear'](),_0x294838['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x16f11a&&this['stopListening'](this['context']['editors']);for(const _0x1453cd of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x1453cd);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'](_0x2fadf6){if(!_0x2fadf6['plugins']['has']('EditorAnnotations'))return;const _0x2ed371=_0x2fadf6['plugins']['get']('EditorAnnotations'),_0x1eeca9=this['context']['plugins']['get'](z),_0x1e14ff=this['annotations'],_0x3312bb=this['balloonPanelView'],_0x10d2f2=()=>{const _0x556380=_0x2ed371['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x556380),this['setActiveAnnotation'](_0x556380[0x0]||null);};this['listenTo'](_0x2ed371,'refresh',_0x10d2f2),this['listenTo'](_0x2ed371,'blur',(_0x264dc0,{isAnnotationTracked:_0x40f976})=>{this['activeAnnotation']&&_0x40f976(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x2ed371,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x1e14ff,'blur',_0x1c7847=>{_0x2ed371['hasDomSelection']()&&_0x1c7847['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x4d33e6,_0x1629a3)=>{const _0x1d3d0b=_0x1629a3['target'];_0x3312bb['isVisible']&&_0x3312bb['element']['contains'](_0x1d3d0b)||_0x1eeca9['view']['element']['contains'](_0x1d3d0b)||this['activeAnnotation']&&_0x2ed371['hasDomSelection']()&&(_0x10d2f2(),_0x4d33e6['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2ed371);}['_destroyEditorAnnotationsIntegration'](_0x4b4cb0){_0x4b4cb0&&(this['stopListening'](_0x4b4cb0),this['_editorAnnotations']['remove'](_0x4b4cb0));}['_setSelectedAnnotations'](_0x2a473d){for(const _0xf8c0d of this['_selectedAnnotations'])_0x2a473d['includes'](_0xf8c0d)||this['_manuallyClosedAnnotationViews']['delete'](_0xf8c0d['view']);this['_selectedAnnotations']=_0x2a473d;}['_refreshPositioning'](){const _0x34e58a=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x34e58a['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x3a7994){if(this['_manuallyClosedAnnotationViews']['has'](_0x3a7994['view']))return;const _0x5cf204=this['balloonPanelView']['content']['first'];_0x5cf204!==_0x3a7994['view']?(_0x5cf204&&this['_detachListeners'](_0x5cf204),this['_attachListeners'](_0x3a7994['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x3a7994['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x250d0c=this['balloonPanelView']['content']['first'],_0x41f48d=_0x250d0c&&this['annotations']['getByView'](_0x250d0c);if(!_0x41f48d||!this['_annotationToNarrowView']['has'](_0x41f48d))return;const _0x51aab7=this['_annotationToNarrowView']['get'](_0x41f48d)['element'],_0x715e55=(function(){const _0x28753b=_0x46863b['defaultPositions'];return[_0x28753b['southArrowNorthEast'],_0x28753b['northArrowSouthEast'],_0x28753b['southArrowNorth'],_0x28753b['northArrowSouth'],_0x28753b['southArrowNorthWest'],_0x28753b['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x51aab7,'positions':_0x715e55});}['_hideBalloon'](){const _0x31d493=this['balloonPanelView'],_0x159fdf=_0x31d493['content']['first'];_0x159fdf&&(this['_detachListeners'](_0x159fdf),_0x31d493['unpin'](),_0x31d493['content']['clear']());}['_attachListeners'](_0x3cee2c){this['listenTo'](_0x3cee2c,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x3cee2c,'Esc',(_0x212383,_0x2baa8a)=>{this['_manuallyClosedAnnotationViews']['add'](_0x3cee2c),this['_hideBalloon'](),_0x2baa8a();});}['_detachListeners'](_0x356d01){this['stopListening'](_0x356d01);}}class c extends _0x51209d{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x4831a8,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xfb5a2e){super(_0xfb5a2e),_0xfb5a2e['editing']['view']['addObserver'](_0x1d8e6f),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0xfb5a2e['plugins']['get'](_0x4831a8),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x5f381c=this['editor']['plugins']['get'](M);_0x5f381c['context']===this['editor']&&(_0x5f381c['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x41b912,_0x135825)=>{const _0x34bc21=this['_balloon'];if(this['isAttached']&&_0x34bc21['visibleView']){const _0x3ae432=this['annotations']['getByView'](_0x34bc21['visibleView']);_0x3ae432&&this['_closeAnnotation'](_0x3ae432),_0x135825();}}));}['afterInit'](){const _0x2d7de0=this['editor']['plugins']['get'](M);_0x2d7de0['context']===this['editor']&&(_0x2d7de0['hasActive']()||_0x2d7de0['switchTo']('inline'));}['setActiveAnnotation'](_0x531788){_0x531788!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x531788&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x531788)&&this['_addAnnotationToBalloon'](_0x531788,!0x0),_0x531788['isActive']=!0x0),_0x531788||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x531788);}['attach'](_0xc8e95){this['annotations']=_0xc8e95;const _0x355324=this['editor']['plugins']['get'](M),_0x5ba547=this['_balloon'];if(this['isAttached'])throw new _0x3b0292('inlineannotations-attach-already-attached',this);if(_0x355324['context']!==this['editor'])throw new _0x3b0292('inlineannotations-not-allowed-with-context',this);const _0x2e2168=this['editor']['plugins']['get'](P);this['listenTo'](_0x2e2168,'refresh',()=>{const _0x2956df=_0x2e2168['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x539c26,_0x562c77;!this['_forceRefresh']&&(_0x539c26=_0x2956df,_0x562c77=this['_selectedAnnotations'],_0x539c26['length']===_0x562c77['length']&&_0x539c26['every'](_0x54e469=>_0x562c77['includes'](_0x54e469)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x2956df),this['setActiveAnnotation'](_0x2956df[0x0]||null));}),this['listenTo'](_0x2e2168,'blur',(_0x36ad36,{isAnnotationTracked:_0x262eaf})=>{this['activeAnnotation']&&_0x262eaf(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x2a23c6,_0x3df146,_0x26b5fb)=>{_0x26b5fb||this['setActiveAnnotation'](null);}),this['listenTo'](_0xc8e95,'remove',(_0x23502a,_0x160008)=>{this['_removeAnnotationFromBalloon'](_0x160008),_0x160008===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x5ba547,'change:visibleView',(_0x5d566c,_0x1426fb,_0x4ed8b6,_0x5b53f6)=>{_0x5b53f6&&this['stopListening'](_0x5b53f6);const _0x19b5a2=_0xc8e95['getByView'](_0x4ed8b6);_0x4ed8b6&&_0x19b5a2&&(this['listenTo'](_0x4ed8b6,'change:height',()=>{_0x5ba547['updatePosition']();}),this['listenTo'](_0x4ed8b6,'Esc',()=>{this['_closeAnnotation'](_0x19b5a2),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x19b5a2&&this['setActiveAnnotation'](_0x19b5a2));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x5ba547['visibleView']&&(_0xc8e95['getByView'](_0x5ba547['visibleView'])&&_0x5ba547['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 _0x3b0292('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x4bb69f of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x4bb69f);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x2a0e71){for(const _0x519b37 of this['_selectedAnnotations'])_0x2a0e71['includes'](_0x519b37)||this['_manuallyClosed']['delete'](_0x519b37);for(const _0x40d2e4 of this['annotations'])_0x2a0e71['includes'](_0x40d2e4)||this['_removeAnnotationFromBalloon'](_0x40d2e4);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x50b4ee of _0x2a0e71)this['_addAnnotationToBalloon'](_0x50b4ee);}this['_selectedAnnotations']=_0x2a0e71;}['_addAnnotationToBalloon'](_0x1b2ad1,_0x3e247a=!0x1){this['_manuallyClosed']['has'](_0x1b2ad1)||(this['_addedAnnotations']['has'](_0x1b2ad1)||this['_balloon']['hasView'](_0x1b2ad1['view'])||(this['_addedAnnotations']['add'](_0x1b2ad1),this['_balloon']['add']({'stackId':_0x1b2ad1['view']['id'],'view':_0x1b2ad1['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x1b2ad1)}})),_0x3e247a&&this['_balloon']['showStack'](_0x1b2ad1['view']['id']));}['_getBalloonTargetForAnnotation'](_0x437b6a){const _0x3f8a00=_0x437b6a['target'],_0x16a359=this['editor']['editing']['view'],_0x97b586=_0x16a359['document']['selection']['getFirstRange'](),_0x57ba77=_0x16a359['domConverter']['viewRangeToDom'](_0x97b586);if(_0x57ba77['collapse'](!0x0),_0x3f8a00){if(_0x3f8a00 instanceof _0x597a13)return _0x3f8a00;let _0x629451=[];for(const _0x3e3e3f of _0x3f8a00)_0x629451['push'](...(_0xb4170d=_0x3e3e3f['getClientRects'](),Array['from'](_0xb4170d)['map'](DOMRect['fromRect'])));_0x629451=function(_0x1d2987){const _0x126a9e=[];let _0x270187=_0x1d2987[0x0];for(let _0x2e31a5=0x1;_0x2e31a5<_0x1d2987['length'];_0x2e31a5++)B(_0x270187,_0x1d2987[_0x2e31a5])?_0x270187['width']+=_0x1d2987[_0x2e31a5]['width']:(_0x126a9e['push'](_0x270187),_0x270187=_0x1d2987[_0x2e31a5]);return _0x126a9e['push'](_0x270187),_0x126a9e;}(_0x629451);const _0x47053d=_0x57ba77['getBoundingClientRect']();return _0x629451['find'](_0x5c9e87=>_0x5c9e87['top']<=_0x47053d['top']&&_0x5c9e87['bottom']>=_0x47053d['bottom']&&_0x5c9e87['left']<=_0x47053d['left']&&_0x5c9e87['right']>=_0x47053d['right'])||_0x629451[0x0];}var _0xb4170d;return _0x437b6a['targetRect']||_0x57ba77;}['_removeAnnotationFromBalloon'](_0xae6a33){this['_addedAnnotations']['has'](_0xae6a33)&&this['_balloon']['hasView'](_0xae6a33['view'])&&(this['_addedAnnotations']['delete'](_0xae6a33),this['_balloon']['remove'](_0xae6a33['view']));}['_closeAnnotation'](_0x18d866){this['_manuallyClosed']['add'](_0x18d866),this['_removeAnnotationFromBalloon'](_0x18d866);}}function B(_0xd4f41a,_0x40174d){return _0xd4f41a['top']===_0x40174d['top']&&_0xd4f41a['bottom']===_0x40174d['bottom']&&_0xd4f41a['right']===_0x40174d['left'];}class tt extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x10f876,_0x396638){super(_0x10f876),this['set']('isEmpty',!_0x396638['length']),this['focusTracker']=new _0x29f230(),this['_annotationViews']=_0x396638,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x8029a4({'focusables':_0x396638,'focusTracker':this['focusTracker']}),this['listenTo'](_0x396638,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x396638,'remove',(_0x2d9b5c,_0x1e66f5)=>{_0x1e66f5['isActive']&&this['focus'](),_0x396638['length']||(this['isEmpty']=!0x0);});const _0x1a3007=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':E(_0x10f876,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x396638},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x1a3007['if']('isEmpty','ck-hidden',_0x27a8ab=>!_0x27a8ab)]},'children':[{'text':E(_0x10f876,'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 _0x1ef59b of this['_annotationViews'])this['focusTracker']['add'](_0x1ef59b['element']);this['_annotationViews']['on']('change',(_0x4409bd,{added:_0x1559b0,removed:_0x4430f6})=>{for(const _0x253c7c of _0x1559b0)this['focusTracker']['add'](_0x253c7c['element']);for(const _0x47a161 of _0x4430f6)this['focusTracker']['remove'](_0x47a161['element']);});}}class f extends _0x4d0391{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,O];}constructor(_0x1c0e0b){super(_0x1c0e0b),this['archivedThreads']=new _0x3eedb8();}['init'](){const _0x2bd4a2=this['context'],_0x37c3cb=_0x2bd4a2['plugins']['get'](o),_0x1623e9=_0x2bd4a2['plugins']['get'](O);this['listenTo'](_0x37c3cb,'addCommentThread',(_0x1d784a,{threadId:_0x819e41})=>{const _0x378673=_0x37c3cb['getCommentThread'](_0x819e41);_0x378673['archivedAt']&&this['archivedThreads']['add'](_0x378673,this['_calculatePosition'](_0x378673['archivedAt'])),this['listenTo'](_0x378673,'change:archivedAt',(_0x1f1a7b,_0x4c7e66,_0x3a416d)=>{_0x3a416d?this['archivedThreads']['has'](_0x378673)||this['archivedThreads']['add'](_0x378673,this['_calculatePosition'](_0x378673['archivedAt'])):this['archivedThreads']['has'](_0x378673)&&this['archivedThreads']['remove'](_0x378673);});}),this['listenTo'](_0x37c3cb,'removeCommentThread',(_0x21d68b,{threadId:_0x29328d})=>{const _0x5c9331=_0x37c3cb['getCommentThread'](_0x29328d);this['stopListening'](_0x5c9331),this['archivedThreads']['has'](_0x5c9331)&&this['archivedThreads']['remove'](_0x5c9331);},{'priority':'highest'}),this['listenTo'](_0x1623e9['collection'],'focus',(_0x330444,_0x2a0a27)=>{_0x2a0a27['isVisible']||(_0x2a0a27['isActive']=!0x0,_0x1623e9['activate'](_0x2a0a27));});}['_calculatePosition'](_0xcab64c){const _0x3115bb=[...this['archivedThreads']]['findIndex'](_0x4acee2=>_0x4acee2['archivedAt']<_0xcab64c);return _0x3115bb>-0x1?_0x3115bb:this['archivedThreads']['length'];}}class a extends _0x51209d{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,_0x36c7ab];}constructor(_0x38bac2){super(_0x38bac2),this['annotationViews']=new _0x3ce2be(),this['_pendingThreads']=[];}['init'](){const _0x18d870=this['editor'],_0x12e8a4=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x18d870['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x3f387b,!0x0)),_0x18d870['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x7301b=this['_createCommentsArchiveButton'](_0x370a9d);return _0x7301b['set']({'role':'menuitemcheckbox'}),_0x7301b;});const _0x421d7c=_0x18d870['plugins']['get'](f),_0x27de58=_0x18d870['plugins']['get']('Annotations'),_0x26d177=_0x18d870['plugins']['get']('CommentsRepository');_0x421d7c['archivedThreads']['forEach'](_0xfddd39=>{this['_handleNewThread'](_0xfddd39);}),this['listenTo'](_0x421d7c['archivedThreads'],'add',(_0x59405b,_0x530c6b)=>{this['_handleNewThread'](_0x530c6b);}),this['listenTo'](_0x27de58['collection'],'add',(_0x4c8b7b,_0x39ec31)=>{const _0x43430e=this['_pendingThreads']['find'](_0xf020d7=>{const _0x911630=_0x26d177['_threadToController']['get'](_0xf020d7);return _0x911630&&_0x39ec31['innerView']===_0x911630['view'];});if(_0x43430e){const _0x2d6944=this['_calculatePosition'](_0x43430e['archivedAt']);this['annotationViews']['add'](_0x39ec31['view'],_0x2d6944),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x43430e),0x1);}}),this['listenTo'](_0x421d7c['archivedThreads'],'remove',(_0x3f4884,_0x133427)=>{const _0x595b95=_0x18d870['config']['get']('collaboration.channelId');if(!_0x595b95||_0x133427['channelId']===_0x595b95){if(this['_pendingThreads']['includes'](_0x133427))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x133427),0x1);else{const _0x41f0ca=_0x26d177['_threadToController']['get'](_0x133427),_0x290dae=_0x27de58['getByInnerView'](_0x41f0ca['view']);this['annotationViews']['remove'](_0x290dae['view']),this['stopListening'](_0x290dae['focusableElements']);}}}),this['listenTo'](_0x27de58['collection'],'add',(_0x230ecd,_0x54a5b7)=>{this['listenTo'](_0x54a5b7,'escape',_0x12e8a4);}),this['listenTo'](_0x27de58['collection'],'remove',(_0x350c43,_0x1db637)=>{this['stopListening'](_0x1db637,'escape',_0x12e8a4);});}['_handleNewThread'](_0x5cac44){const _0x2184bb=this['editor']['plugins']['get']('CommentsRepository'),_0x3fa2f0=this['editor']['plugins']['get']('Annotations'),_0x2cfd14=this['editor']['config']['get']('collaboration.channelId');if(!_0x2cfd14||_0x5cac44['channelId']===_0x2cfd14){const _0x331aaf=_0x2184bb['_threadToController']['get'](_0x5cac44);if(!_0x331aaf)return void this['_pendingThreads']['push'](_0x5cac44);const _0x53f428=this['_calculatePosition'](_0x5cac44['archivedAt']),_0x254dc6=_0x3fa2f0['getByInnerView'](_0x331aaf['view']);_0x254dc6['isVisible']&&_0x3fa2f0['_visibleAnnotations']['remove'](_0x254dc6),this['annotationViews']['add'](_0x254dc6['view'],_0x53f428);}}['_calculatePosition'](_0xb0452d){const _0x556777=this['editor']['config']['get']('collaboration.channelId'),_0x4778ac=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0x2e0d03=>_0x2e0d03['channelId']===_0x556777)['findIndex'](_0x1bcc3d=>_0x1bcc3d['archivedAt']<_0xb0452d);return _0x4778ac<0x0||_0x4778ac>this['annotationViews']['length']?this['annotationViews']['length']:_0x4778ac-0x1;}['_toggleDialog'](){const _0x535f8a=this['editor'],_0x499a35=_0x535f8a['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new tt(_0x535f8a['locale'],this['annotationViews'])),'commentsArchive'===_0x499a35['id']?_0x499a35['hide']():_0x499a35['show']({'id':'commentsArchive','title':E(_0x535f8a['locale'],'COMMENTS_ARCHIVE'),'icon':_0x1442de,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x3e1e67['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x180206,_0x4364e7=!0x1){const _0x1c40f5=this['editor']['locale'],_0x5c610e=this['editor']['plugins']['get']('Dialog'),_0x3d8475=new _0x180206(_0x1c40f5);return _0x3d8475['bind']('isEnabled')['to'](this,'isEnabled'),_0x3d8475['bind']('isOn')['to'](_0x5c610e,'id',_0xb9992=>'commentsArchive'===_0xb9992),_0x3d8475['set']({'label':E(_0x1c40f5,'COMMENTS_ARCHIVE'),'icon':_0x1442de,'isToggleable':!0x0}),_0x4364e7&&(_0x3d8475['tooltip']=!0x0),this['listenTo'](_0x3d8475,'execute',()=>this['_toggleDialog']()),_0x3d8475;}['_hideDialogOnAnnotationEscape']=_0x54e56f=>{const _0x7790ed=_0x54e56f['source'];if(!this['annotationViews']['has'](_0x7790ed['view']))return;const _0x2d56ec=this['editor']['plugins']['get']('Dialog');_0x2d56ec['isOpen']&&'commentsArchive'===_0x2d56ec['id']&&(_0x2d56ec['hide'](),_0x54e56f['stop']());};}class p extends _0x51209d{static get['requires'](){return[o,r,i,f,a,s,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{d as Annotation,_ as AnnotationCollection,S as AnnotationView,O as Annotations,M as AnnotationsUIs,ts as BaseCommentThreadView,hs as BaseCommentView,fi as Comment,ui as CommentThread,Ct as CommentThreadController,ie as CommentThreadInputView,vt as CommentThreadView,gt as CommentView,p as Comments,f as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,s as CommentsOnly,o as CommentsRepository,i as CommentsUI,P as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar};
|
|
23
|
+
import{Editor as _0x116930,ContextPlugin as _0x1eed03,PendingActions as ht,Command as _0x14584c,Plugin as _0x411e57,Context as _0x269721}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x29df45,uid as _0x35b195,KeystrokeHandler as jt,FocusTracker as _0x358b9a,diff as _0x3780b2,Collection as _0x41b195,Rect as _0x1cb979,CKEditorError as _0x50ccf8,first as _0x4d5d74,priorities as Wt,scrollViewportToShowTarget as rt,getEnvKeystrokeText as nt,toUnit as xt,DomEmitterMixin as _0x170599,keyCodes as _0x4c0db0}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x3a5655,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0xe39490,trimHtml as _0x5988ab,LateFocusDropdownButtonView as _0x55f230,Users as it,getDateTimeFormatter as lt,hashObject as pt,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as ot,FOCUS_ANNOTATION_KEYSTROKE as _0x3160c7}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as wt,cloneDeep as It,set as At,unset as yt,debounce as _0x2aa444}from'es-toolkit/compat';import{IconUndo as _0x2082f1,IconCheck as _0x54d341,IconPencil as _0x422398,IconRemoveComment as _0x2fa214,IconThreeVerticalDots as _0x21fcae,IconAddComment as _0x3924b4,IconCommentsArchive as _0x5da95b}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Vt,InlineEditableUIView as $t,EditorUI as Rt,View as kt,FocusCycler as _0x473434,ButtonView as _0x6a7993,ViewCollection as _0x5d7c38,createDropdown as _0x22aefc,ListView as _0x33f7d5,focusChildOnDropdownOpen as _0x53fc0d,ListItemView as _0x29bbd3,MenuBarMenuListItemButtonView as _0xb8bbcc,BodyCollection as _0xdebb5c,BalloonPanelView as _0x4392a2,ContextualBalloon as _0x224a4c,Dialog as _0x4d4ba0,DialogViewPosition as _0x20b93c}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disablePlaceholder as St,enablePlaceholder as Ft,MouseObserver as _0xc8bdfe}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 _0x10c482}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x189508}from'@ckeditor/ckeditor5-widget/dist/index.js';class Ct extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x29df45(){['model'];['view'];constructor(_0x330a66,_0x31f367){super(),this['model']=_0x330a66,this['model']['_isAttached']=!0x0,this['view']=_0x31f367,this['listenTo'](_0x31f367,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x31f367,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x31f367,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x31f367,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x31f367,'addComment',(_0x5642d4,_0x1628a6)=>this['addComment'](_0x1628a6)),this['listenTo'](_0x31f367,'updateComment',(_0x323606,_0x48a946,_0x23124c)=>this['updateComment'](_0x48a946,_0x23124c)),this['listenTo'](_0x31f367,'removeComment',(_0x56cc5d,_0x5a1e9b)=>this['removeComment'](_0x5a1e9b));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x3ec3cd){this['model']['addComment']({'content':_0x3ec3cd,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x2c2f81,_0x291f12){this['model']['getComment'](_0x2c2f81)['update']({'content':_0x291f12});}['removeComment'](_0x16869a){this['model']['getComment'](_0x16869a)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function E(_0x3c7d4d,_0x23d50f,_0x3e4dc7){const t=_0x3c7d4d['t'];switch(_0x23d50f){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'},_0x3e4dc7);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'},_0x3e4dc7);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'},_0x3e4dc7);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'},_0x3e4dc7);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x3e4dc7);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'},_0x3e4dc7);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'},_0x3e4dc7);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'},_0x3e4dc7);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(_0x5ae4df,_0x193c6c){super(_0x5ae4df);const _0xcda584=_0x35b195();this['main']=this['createCollection'](),this['editable']=new $t(_0x5ae4df,_0x193c6c,void 0x0,{'label':()=>E(_0x5ae4df,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x5ae4df['uiLanguageDirection'],'lang':_0x5ae4df['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0xcda584},'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(_0x3160e4){super(_0x3160e4),this['view']=new Ut(_0x3160e4['locale'],_0x3160e4['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x2e40a5=this['editor']['editing']['view'],_0x2e5347=this['view']['editable'],_0x211054=_0x2e40a5['document']['getRoot']();_0x2e5347['name']=_0x211054['rootName'],this['view']['render']();const _0x58ad67=_0x2e5347['element'];this['setEditableElement'](_0x2e5347['name'],_0x58ad67),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x2e40a5['attachDomRoot'](_0x58ad67),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Nt=[qt,zt,Bt,Et,Gt,Jt,Kt];class Qt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x29df45(_0x116930){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Nt)());constructor(_0x27d580={}){function _0x19f313(_0x35fa59){return _0x35fa59['map'](_0x242d99=>String['fromCharCode'](_0x242d99))['join']('');}(_0x27d580=Object['assign']({},_0x27d580))['plugins']||(_0x27d580['plugins']=Qt['defaultPlugins']),super(_0x27d580),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[_0x19f313([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x19f313([0x76,0x69,0x65,0x77])][_0x19f313([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x19f313([0x61,0x75,0x74,0x6f]),this[_0x19f313([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x19f313([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x19f313([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x19f313([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x19f313([0x6f,0x6b])});}['create'](){const _0xe46b06=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0xe46b06))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x5aad8b=>{const _0x50dc46=this['model']['document']['getRoot'](),_0x300bcb=_0x50dc46&&_0x50dc46['getChild'](_0x50dc46['childCount']-0x1);_0x5aad8b['setSelection'](_0x300bcb,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x34c719=this['editing']['view'],_0x4b6670=_0x34c719['document']['getRoot'](),_0x52c516=_0x4b6670['getChild'](0x0);_0x4b6670['childCount']>0x1||!_0x52c516||'p'!=_0x52c516['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x34c719,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x52c516['placeholder']=this['placeholder']),Ft({'view':_0x34c719,'element':_0x52c516,'keepOnFocus':!0x0}),this['placeholderElement']=_0x52c516);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x1a6543,_0x319705={}){super(_0x1a6543),this['editor']=null,this['_editorConfig']=_0x319705,this['set']('value',_0x319705['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',E(_0x1a6543,'Reply...')),this['set']('submitLabel',E(_0x1a6543,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x358b9a(),this['focusCycler']=new _0x473434({'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',(_0x42bfe0,_0x123aa3)=>{this['cancelButtonView']['fire']('execute'),_0x123aa3();}),this['keystrokes']['set']('Ctrl+Enter',(_0x4bac87,_0x1a898d)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x1a898d());}),this['on']('submit',(_0x320853,_0x475502)=>{_0x475502['length']>0xfde8?(alert(E(_0x1a6543,'TOO_LONG_COMMENT_ALERT',[_0x475502['length'],0xfde8])),_0x320853['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 _0x1c7ee9=this['editor'];this['element']['insertBefore'](_0x1c7ee9['ui']['element'],this['element']['firstChild']),_0x1c7ee9['model']['document']['on']('change',()=>this['value']=_0x1c7ee9['getData']()),_0x1c7ee9['bind']('placeholder')['to'](this),this['focusables']['add'](_0x1c7ee9['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x570804){-0x1===_0x570804?(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:_0x198439}=this,_0x55a1e4=new _0x6a7993(_0x198439);return _0x55a1e4['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x55a1e4['withText']=!0x0,_0x55a1e4['bind']('label')['to'](this,'submitLabel'),_0x55a1e4['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x55a1e4['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x2f93f3,_0x4ac0c0)=>!_0x4ac0c0&&!!_0x2f93f3['trim']()),_0x55a1e4;}['_createCancelButton'](){const {locale:_0x5efd86}=this,_0x50e4f2=new _0x6a7993(_0x5efd86);return _0x50e4f2['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x50e4f2['label']=E(_0x5efd86,'Cancel'),_0x50e4f2['withText']=!0x0,_0x50e4f2['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x50e4f2;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x2e7b4f=>{this['focusTracker']['add'](_0x2e7b4f['element']);}),this['focusables']['on']('change',(_0x30cf7b,_0xd629ba)=>{for(const _0x2cc31b of Array['from'](_0xd629ba['added'])['reverse']())this['focusTracker']['add'](_0x2cc31b['element']);});}}class ie extends kt{constructor(_0x1e4515,_0x539c37,_0x4e4e34){super(_0x1e4515),this['commentInputView']=new os(_0x1e4515,_0x4e4e34),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x71f21c,_0x52b28b)=>_0x71f21c||!!_0x52b28b),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 _0x3a5655(_0x1e4515,_0x539c37),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'](_0x464404){this['commentInputView']['focus'](_0x464404);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x986def,_0xa737f1)=>{const {submitButtonView:_0x35dbe0,cancelButtonView:_0x135f43,editor:_0x2f00dd}=this['commentInputView'];[_0x35dbe0['element'],_0x135f43['element'],_0x2f00dd?_0x2f00dd['editing']['view']['getDomRoot']():null]['filter'](_0x32e6a5=>_0x32e6a5)['some'](_0x3d5a41=>_0x3d5a41['contains'](_0xa737f1['target']))||(this['focus'](),_0xa737f1['preventDefault']());});}}class cs extends kt{constructor(_0x323274){super(_0x323274);const _0x9145d2=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x9145d2['to']('count',_0x161cd6=>E(_0x323274,'NUMBER_OF_COMMENTS',_0x161cd6))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x1e062e,_0x52796a,_0x1882c1){super(_0x1e062e);const _0x2f9824=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x52796a['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x52796a,this['_config']=_0x1882c1,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x358b9a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x473434({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x52de44=>this['commentViews']['map'](_0x564d9b=>_0x564d9b['element'])['includes'](_0x52de44['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x1e062e),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x5a546f=>_0x5a546f-this['_config']['maxCommentsWhenCollapsed']);for(const _0x57c2d9 of _0x52796a['comments'])this['_handleNewCommentModel'](_0x57c2d9);this['_handleInfoComment'](),this['listenTo'](_0x52796a['comments'],'add',(_0x1a6593,_0xb243b3)=>{const _0x32520e=this['_calculatePosition'](_0xb243b3);this['length']++,this['_handleNewCommentModel'](_0xb243b3,_0x32520e),this['refreshVisibleViews']();}),this['listenTo'](_0x52796a['comments'],'remove',(_0x3a66af,_0x13e049)=>{this['length']--,this['_handleRemoveCommentModel'](_0x13e049),this['refreshVisibleViews']();}),this['listenTo'](_0x52796a,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x52796a,'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',_0x2f9824['if']('length','ck-hidden',_0x33642e=>!_0x33642e)],'aria-label':E(_0x1e062e,'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'](_0x5c016b){-0x1===_0x5c016b?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x350555 of this['commentViews'])_0x350555['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x14031d,_0xf3d2bc){const _0x189290=new this['_config']['CommentView'](this['locale'],_0x14031d,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x189290['viewUid']=_0x14031d['id'],_0x189290['delegate']('removeComment')['to'](this),_0x189290['delegate']('updateComment')['to'](this),_0x189290['delegate']('resolveCommentThread')['to'](this),_0x189290['delegate']('editorReady')['to'](this),_0x189290['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x189290,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x189290,_0xf3d2bc);}['_calculatePosition'](_0x449421){const _0x2b95d2=this['_model']['_findOptimalIndex'](_0x449421);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x449421['authoredAt']?_0x2b95d2-0x1:_0x2b95d2:_0x2b95d2-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x510dd8={'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'],_0x510dd8,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x510dd8));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x2dd393){const _0x181dd3=this['commentViews']['remove'](_0x2dd393['id']);this['stopListening'](_0x181dd3),_0x181dd3['isEditMode']&&this['_updateHasDirtyComment'](),_0x181dd3['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x4dbd41=>_0x4dbd41['isEditMode']);}['_rearrangeCollapse'](){const _0x236372=function(_0x52f912){const _0x495652=new _0x41b195();for(const _0x28d60e of _0x52f912)_0x495652['add'](_0x28d60e);return _0x495652;}(this['commentViews']),_0x602d1b=this['_collapsedCommentsView']['count'];for(let _0x3d18d9=0x1;_0x3d18d9<=_0x602d1b;_0x3d18d9++)_0x236372['remove'](0x1);for(const _0x1e770d of _0x236372)_0x1e770d['collapse']();_0x602d1b>0x0&&_0x236372['add'](this['_collapsedCommentsView'],0x1),ns(_0x3780b2(Array['from'](this['visibleViews']),Array['from'](_0x236372)),this['visibleViews'],_0x236372);}['_rearrangeExpand'](){ns(_0x3780b2(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x2d607e of this['visibleViews'])_0x2d607e['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x24ec59=>{this['focusTracker']['add'](_0x24ec59['element']),this['keystrokes']['listenTo'](_0x24ec59['element']);}),this['commentViews']['on']('change',(_0x124f91,_0xe93edb)=>{for(const _0x254bb1 of _0xe93edb['removed'])this['focusTracker']['remove'](_0x254bb1['element']),this['keystrokes']['stopListening'](_0x254bb1['element']);for(const _0x1d4b6d of Array['from'](_0xe93edb['added'])['reverse']())this['focusTracker']['add'](_0x1d4b6d['element']),this['keystrokes']['listenTo'](_0x1d4b6d['element']);});}}function ns(_0x470485,_0x4bfd23,_0x54d4ef){let _0x239753=0x0;for(const _0x4af877 of _0x470485)switch(_0x4af877){case'insert':_0x4bfd23['add'](_0x54d4ef['get'](_0x239753),_0x239753),_0x239753++;break;case'delete':_0x4bfd23['remove'](_0x239753);break;case'equal':_0x239753++;}}class as extends kt{constructor(_0x162677){super(_0x162677);const _0x25b26c=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x25b26c['to']('contextValue',_0x995360=>E(_0x162677,'THREAD_CONTEXT_LABEL',_0x995360)),'tabindex':-0x1},'children':[{'text':_0x25b26c['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x4841b7,_0x3606c6){super(_0x4841b7);const _0x2ad684=this['bindTemplate'];this['_model']=_0x3606c6,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x358b9a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x473434({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x4f209b=>!!_0x4f209b),this['bind']('contextValue')['to'](this['_model'],'context',_0x2b0964=>_0x2b0964&&_0x2b0964['value']?this['_trimContextValue'](_0x2b0964['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',_0x2ad684['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 _0x2fe99a=new _0x6a7993(this['locale']);return _0x2fe99a['label']=E(this['locale'],'Reopen'),_0x2fe99a['tooltip']=E(this['locale'],'Reopen'),_0x2fe99a['icon']=_0x2082f1,_0x2fe99a['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x43166f=>!_0x43166f),_0x2fe99a['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0xa87d0b,_0x29cf55)=>_0xa87d0b&&_0x29cf55),_0x2fe99a['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x2fe99a;}['_trimContextValue'](_0x2f388a){if(_0x2f388a['length']<0x96)return _0x2f388a;const _0x84d1ee=_0x2f388a['lastIndexOf']('\x20',0x93);return _0x2f388a['substring'](0x0,_0x84d1ee>-0x1?_0x84d1ee:0x93)+'...';}['_attachContextActions'](){const _0x87b2b3=this['element']['querySelector']('.ck-context'),_0x249f4e=_0x87b2b3['querySelector']('.ck-context__value');this['listenTo'](_0x87b2b3,'mouseenter',()=>{_0x249f4e['offsetWidth']<_0x249f4e['scrollWidth']&&_0x87b2b3['classList']['add']('overlay');}),this['listenTo'](_0x87b2b3,'mouseleave',()=>{_0x87b2b3['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0xfc6005 of this['focusables'])this['focusTracker']['add'](_0xfc6005['element']),this['keystrokes']['listenTo'](_0xfc6005['element']);}['_createContextView'](){const _0x381035=new as(this['locale']);return _0x381035['bind']('contextValue')['to'](this),_0x381035;}}class ts extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5b3ebd,_0x14c564,_0x5351af,_0xd4da10){super(_0x5b3ebd),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x14c564,this['_localUser']=_0x5351af,this['_config']=_0xd4da10,this['commentThreadHeaderView']=new Xt(_0x5b3ebd,_0x14c564),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x5b3ebd,E(_0x5b3ebd,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x5b3ebd,_0x14c564,Object['assign']({'CommentView':this['_config']['CommentView']},_0xd4da10)),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',(_0x24f745,_0x120c3c)=>_0x24f745||!!_0x120c3c),this['bind']('isUnlinked')['to'](_0x14c564,'unlinkedAt',_0x286ad6=>!!_0x286ad6),this['bind']('ariaLabel')['to'](this,'length',_0x11b08c=>{const _0x5c3392=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return E(this['locale'],'COMMENT_THREAD_LABEL',[_0x11b08c,_0x5c3392]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x358b9a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x473434({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4af0bf=>_0x4af0bf['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 _0x289f06=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x4d63a0=_0x289f06['commentInputView'];return _0x289f06['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x4d63a0,'value',(_0x2c67d2,_0x38e8a3,_0x34c0e7,_0xdbfca9,_0x1d2aca)=>!!_0x1d2aca||!!_0xdbfca9&&_0x34c0e7&&!_0x38e8a3||_0x2c67d2&&_0x34c0e7&&!_0x38e8a3),_0x4d63a0['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3eed88,_0x240e01,_0x1b1d5c)=>{let _0x25e880;return _0x25e880=_0x1b1d5c&&_0x240e01?'Reply\x20to\x20reopen\x20discussion...':_0x3eed88?'Reply...':'Write\x20a\x20comment...',E(this['locale'],_0x25e880);}),_0x4d63a0['bind']('submitLabel')['to'](this,'length',_0x15e23a=>E(this['locale'],_0x15e23a?'Reply':'Comment')),_0x4d63a0['on']('submit',(_0x19e4fc,_0xb6070c)=>{this['fire']('addComment',_0xb6070c),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x4d63a0['on']('cancel',()=>{this['focus']();}),_0x4d63a0['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x4d63a0['on']('cancel',_0x549da6=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x549da6['stop']());}),this['on']('change:isActive',(_0x2c89d1,_0x1e2444,_0x247f99)=>{_0x247f99||this['length']||_0x4d63a0['value']||this['fire']('removeCommentThread');}),_0x289f06;}}class vt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(ts){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x4315f2,_0x3badf5,_0x38bddf,_0x29ddfd){super(_0x4315f2,_0x3badf5,_0x38bddf,_0x29ddfd),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x4315f2,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x3fb4e9,_0xb3e9a,_0x5a6f20)=>{_0x5a6f20||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x1dc2c1,_0x51c93e,_0x421c36)=>{_0x421c36&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x41bd51=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x41bd51['if']('isActive','ck-thread--active'),_0x41bd51['if']('isUnlinked','ck-thread--unlinked'),_0x41bd51['if']('isConfirm','ck-thread--remove-confirmation'),_0x41bd51['to']('actionIndicator',_0x5bc026=>_0x5bc026?'ck-thread--'+_0x5bc026:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x41bd51['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 _0x226bca of this['commentsListView']['commentViews'])_0x226bca['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x154de3}=this,_0x2b8549=this['commentsListView']['commentViews']['get'](0x0);_0x2b8549===this['_boundFirstCommentView']||_0x2b8549['isSystemComment']||(this['_boundFirstCommentView']=_0x2b8549,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x2b8549,'actionIndicator',_0x15bbf5=>'remove'===_0x15bbf5?'remove':null),_0x2b8549['placeholder']=E(_0x154de3,'Write\x20a\x20comment...'),_0x2b8549['removeButton']['on']('execute',_0x3e3840=>{_0x3e3840['stop'](),this['showConfirm'](E(_0x154de3,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x2b8549['focus']();}),_0x2b8549['actionBar']['add'](this['resolveButton'],0x0),_0x2b8549['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x5e89a0=new _0xe39490(this['locale']);return _0x5e89a0['label']=E(this['locale'],'Resolve'),_0x5e89a0['tooltip']=E(this['locale'],'Resolve'),_0x5e89a0['icon']=_0x54d341,_0x5e89a0['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x5e89a0['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4a68ba=>!_0x4a68ba),_0x5e89a0['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x49e42b,_0x528f5d)=>_0x49e42b&&!_0x528f5d),_0x5e89a0['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x5e89a0;}['_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(_0x532e75){super(_0x532e75),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x333d4d,_0xd5266b,_0xb2438d)=>{this['element']['innerHTML']=_0xb2438d;}),this['element']['innerHTML']=this['content'];}}class hs extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x5820f7,_0x44eabc,_0x25c3a5){super(_0x5820f7),this['_model']=_0x44eabc,this['_config']=_0x25c3a5,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x44eabc,'content',_0x44eabc,'authoredAt',(_0x149c9f,_0x1910a3)=>E(_0x5820f7,'COMMENT_ARIA_LABEL',[_0x44eabc['author']['name'],_0x25c3a5['formatDateTime'](_0x1910a3),new DOMParser()['parseFromString'](_0x149c9f,'text/html')['body']['textContent'],_0x44eabc['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x5820f7,E(_0x5820f7,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x5d7c38(),this['focusTracker']=new _0x358b9a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x473434({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x7d2656=>_0x7d2656['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 _0x2a5f97=new es(this['locale']);return _0x2a5f97['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x476d42,_0x32739b)=>_0x32739b?_0x5988ab(_0x476d42,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x476d42),_0x2a5f97;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x29af60=new os(this['locale'],this['_config']['editorConfig']);return _0x29af60['value']=this['_model']['content'],_0x29af60['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x29af60['submitLabel']=E(this['locale'],'Save'),_0x29af60['on']('submit',(_0x5cd8bb,_0xca5870)=>{this['fire']('updateComment',this['_model']['id'],_0xca5870),this['switchToDisplayMode'](),this['focus']();}),_0x29af60['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x29af60['once']('editorReady',()=>{_0x29af60['focus']();}),_0x29af60['createEditor'](),_0x29af60['delegate']('editorReady')['to'](this),_0x29af60['delegate']('editorDestroyed')['to'](this),_0x29af60;}['_setupKeyboardNavigation'](){const _0x1ae99c=this['element'];this['keystrokes']['listenTo'](_0x1ae99c);for(const _0x3ffdfc of this['focusables'])this['focusTracker']['add'](_0x3ffdfc['element']),this['keystrokes']['listenTo'](_0x3ffdfc['element']);this['focusables']['on']('change',(_0x2d686a,_0xb81f5c)=>{for(const _0x3b2503 of _0xb81f5c['removed'])this['focusTracker']['remove'](_0x3b2503['element']),this['keystrokes']['stopListening'](_0x3b2503['element']);for(const _0x2a9571 of _0xb81f5c['added'])this['focusTracker']['add'](_0x2a9571['element']),this['keystrokes']['listenTo'](_0x2a9571['element']);}),this['keystrokes']['set']('enter',(_0x25a125,_0x5a8a8d)=>{_0x1ae99c===_0x25a125['target']&&(this['focusCycler']['focusFirst'](),_0x5a8a8d());}),this['keystrokes']['set']('esc',(_0x3ec9e0,_0x3f52e2)=>{_0x1ae99c!==_0x3ec9e0['target']&&(this['focus'](),_0x3f52e2());});}}class gt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(hs){['actionBar'];['userView'];constructor(_0x3a65c8,_0x53b891,_0x2860cb){super(_0x3a65c8,_0x53b891,_0x2860cb),this['set']('actionIndicator',null),this['set']('placeholder',E(_0x3a65c8,'Reply...')),this['bind']('authoredAt')['to'](_0x53b891),this['bind']('resolvedAt')['to'](_0x53b891),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 _0x3a5655(_0x3a65c8,_0x53b891['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x53b891,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x82cb9a=this['bindTemplate'],_0x2d82ec=[{'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':_0x82cb9a['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x82cb9a['to']('authoredAt',_0x17913c=>this['_config']['formatDateTime'](_0x17913c))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x82cb9a['if']('isEditMode','ck-comment__actions--hidden'),_0x82cb9a['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']&&_0x2d82ec['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x82cb9a['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x82cb9a['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x82cb9a['if']('isEditMode','ck-comment--edit'),_0x82cb9a['if']('isSystemComment','ck-comment--info'),_0x82cb9a['to']('actionIndicator',_0x1547c7=>_0x1547c7?'ck-comment--'+_0x1547c7:'')],'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':_0x2d82ec}]}]};}['_createEditButton'](){const _0x31f1cf=new _0x6a7993(this['locale']);return _0x31f1cf['label']=E(this['locale'],'Edit'),_0x31f1cf['icon']=_0x422398,_0x31f1cf['withText']=!0x0,_0x31f1cf['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x31f1cf['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3131df=>!_0x3131df),_0x31f1cf['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x31f1cf['on']('execute',()=>this['switchToEditMode']()),_0x31f1cf;}['_createRemoveButton'](){const _0x40745c=new _0x6a7993(this['locale']);return _0x40745c['label']=E(this['locale'],'Remove'),_0x40745c['icon']=_0x2fa214,_0x40745c['withText']=!0x0,_0x40745c['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x40745c['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3cb0e7=>!_0x3cb0e7),_0x40745c['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x40745c['on']('execute',()=>{this['showConfirm'](E(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x40745c;}['_createDropdown'](){const _0x2b0459=_0x22aefc(this['locale'],_0x55f230),_0x115632=_0x2b0459['panelView']['children'],_0x26368c=new _0x33f7d5(this['locale']),_0x21075a=_0x2b0459['bindTemplate'];_0x53fc0d(_0x2b0459,()=>this['items']['find'](_0x6e36c2=>_0x6e36c2['isVisible'])),_0x2b0459['extendTemplate']({'attributes':{'class':[_0x21075a['if']('isVisible','ck-hidden',_0x39afa3=>!_0x39afa3)]}});const _0x23e2bd=(_0x186827,_0x4aa113=-0x1)=>{const _0x46aef6=new _0x29bbd3(this['locale']);_0x46aef6['children']['add'](_0x186827);const _0x5d197a=_0x4aa113>-0x1?_0x4aa113:_0x26368c['items']['length'];_0x26368c['items']['add'](_0x46aef6,_0x5d197a);const _0x306363=Array['from'](this['items']);_0x2b0459['unbind']('isEnabled','isVisible'),_0x2b0459['bind']('isEnabled')['toMany'](_0x306363,'isEnabled',(..._0x30f851)=>_0x30f851['some'](_0xa8fa37=>_0xa8fa37)),_0x2b0459['bind']('isVisible')['toMany'](_0x306363,'isVisible',(..._0x3dc73b)=>_0x3dc73b['some'](_0x5c25be=>_0x5c25be));};_0x2b0459['panelPosition']='sw',_0x2b0459['buttonView']['set']({'label':E(this['locale'],'Show\x20more\x20items'),'icon':_0x21fcae});for(const _0xf83abb of this['items'])_0x23e2bd(_0xf83abb);return _0x115632['add'](_0x26368c),_0x2b0459['listenTo'](this['items'],'add',(_0x4e959f,_0x164034,_0x1c87a4)=>{_0x23e2bd(_0x164034,_0x1c87a4);}),_0x2b0459['listenTo'](this['items'],'remove',(_0x7c69ed,_0x4682e1,_0x5e77bd)=>{_0x26368c['items']['remove'](_0x5e77bd);}),_0x2b0459;}['_attachActions'](_0x50cf97,_0x39a5d4){const _0x4929a2=_0x50cf97&&_0x50cf97['element'];_0x4929a2&&(this['listenTo'](_0x4929a2,'mouseenter',()=>this['actionIndicator']=_0x39a5d4),this['listenTo'](_0x4929a2,'focus',()=>this['actionIndicator']=_0x39a5d4),this['listenTo'](_0x4929a2,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x4929a2,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x38a2a5=super['_createCommentInputView']();return _0x38a2a5['bind']('placeholder')['to'](this),_0x38a2a5;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Lt(_0x3cd289){const _0xf17666=Dt(_0x3cd289,0x1e),_0x15262f=new MutationObserver(_0x5ec2a1=>{for(const _0x476a71 of _0x5ec2a1)('attributes'==_0x476a71['type']&&'class'==_0x476a71['attributeName']||'childList'==_0x476a71['type']||'characterData'==_0x476a71['type'])&&_0xf17666();});return{'attach'(_0x55fddf){_0x15262f['observe'](_0x55fddf,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x15262f['disconnect'](),_0xf17666['cancel']();}};}class S extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x48a53d,_0x5e6c1e){super(_0x48a53d),this['id']=_0x35b195(),this['focusTracker']=new _0x358b9a(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x47711f,_0x55f3e1)=>this['fire']('Esc',_0x55f3e1)),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'](_0x5e6c1e),this['mainView']=_0x5e6c1e;const _0x4d09a4=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x4d09a4['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 _0xdd3c58=this['element']['clientHeight'];_0xdd3c58&&(this['height']=_0xdd3c58);}}class d extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x29df45(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x5982a4,target:_0x2ef22a,type:_0x1fc893,isVisible:_0x3834ba=!0x0}){super(),this['view']=_0x5982a4,this['view']['element']||this['view']['render'](),this['_type']=_0x1fc893,this['_target']=_0x2ef22a,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x41b195([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x1b9455,_0x499cfd)=>{this['view']['focusTracker']['add'](_0x499cfd);}),this['focusableElements']['on']('remove',(_0x497f83,_0xe38264)=>{this['view']['focusTracker']['remove'](_0xe38264);}),this['set']('isVisible',_0x3834ba);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x48cc19=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x48cc19),_0x48cc19;}get['targetRect'](){const _0x3de37c=this['target'];if(null===_0x3de37c)return null;if(_0x3de37c instanceof _0x1cb979)return _0x3de37c;const _0x534fe4=_0x3de37c['filter'](_0x102d10=>function(_0x212627){const _0x418a76=_0x212627['offsetParent'];if(_0x418a76)return!0x0;const _0x152f2b=_0x212627['getClientRects']()['item'](0x0);return!!_0x152f2b;}(_0x102d10));return 0x0===_0x534fe4['length']?null:new _0x1cb979(_0x534fe4[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x333f03){this['view']['isActive']=_0x333f03,this['view']['mainView']['isActive']=_0x333f03;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x192bcd){if(!(null===_0x192bcd||_0x192bcd instanceof _0x1cb979||Array['isArray'](_0x192bcd)&&_0x192bcd['every'](_0x4feb52=>li(_0x4feb52))))throw new _0x50ccf8('annotation-invalid-target',null,{'target':_0x192bcd});}['_getNormalizedTarget'](){const _0x42a666='function'==typeof this['_target']?this['_target']():this['_target'];return li(_0x42a666)?[_0x42a666]:_0x42a666;}}function li(_0x14a0c0){return null!==_0x14a0c0&&'object'==typeof _0x14a0c0&&'nodeType'in _0x14a0c0&&0x1===_0x14a0c0['nodeType'];}class _ extends _0x41b195{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x3eae40=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x358b9a(),this['_focusTracker']['on']('change:isFocused',(_0x302c30,_0xb16036,_0x3b9d9c)=>{_0x3b9d9c||this['fire']('blur');});for(const _0x45f95a of _0x3eae40)this['add'](_0x45f95a);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x149b7b){if(this['has'](_0x149b7b))throw new _0x50ccf8('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x149b7b['innerView'],_0x149b7b),this['_viewToAnnotation']['set'](_0x149b7b['view'],_0x149b7b);for(const _0x19a589 of _0x149b7b['focusableElements'])this['_focusTracker']['add'](_0x19a589);this['listenTo'](_0x149b7b['focusableElements'],'add',(_0x3f5bb1,_0x31f6f6)=>{this['_focusTracker']['add'](_0x31f6f6);}),this['listenTo'](_0x149b7b['focusableElements'],'remove',(_0x5c0117,_0x535258)=>{this['_focusTracker']['remove'](_0x535258);}),this['listenTo'](_0x149b7b['view']['focusTracker'],'change:isFocused',(_0x59ccbe,_0x1873e2,_0x3430fd)=>{_0x3430fd&&this['fire']('focus',_0x149b7b);}),_0x149b7b['updateTargetRect']();const _0x4db14a=this['_getOrderInContent'](_0x149b7b['view']['targetRect']);return super['add'](_0x149b7b,_0x4db14a);}['remove'](_0x1565b6){if(!this['has'](_0x1565b6))throw new _0x50ccf8('annotationcollection-not-existing-item',null);this['stopListening'](_0x1565b6['view']['focusTracker']),this['stopListening'](_0x1565b6['focusableElements']);for(const _0x4071fa of _0x1565b6['focusableElements'])this['_focusTracker']['remove'](_0x4071fa);return this['_viewToAnnotation']['delete'](_0x1565b6['view']),this['_innerViewToAnnotation']['delete'](_0x1565b6['innerView']),super['remove'](_0x1565b6);}['getByInnerView'](_0xc2b1bd){return this['_innerViewToAnnotation']['get'](_0xc2b1bd);}['getByView'](_0x4d81ed){return this['_viewToAnnotation']['get'](_0x4d81ed);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x3aa00e of this)_0x3aa00e['updateTargetRect']();this['_sort']();}['_sort'](){const _0x295ec5=Array['from'](this)['sort']((_0x3479c0,_0x579f41)=>v(_0x3479c0['view']['targetRect'],_0x579f41['view']['targetRect']));for(let _0x2cea9f=_0x295ec5['length']-0x1;_0x2cea9f>0x0;_0x2cea9f--){const _0x317c7a=_0x295ec5[_0x2cea9f];_0x2cea9f!==this['getIndex'](_0x317c7a)&&(this['remove'](_0x317c7a),this['add'](_0x317c7a));}}['_getOrderInContent'](_0x1044bd){let _0x3f99d6=0x0;if(!_0x1044bd)return this['length'];for(const _0x187a14 of this){const _0x1c9a7d=_0x187a14['view']['targetRect'];if(_0x1c9a7d){if(v(_0x1044bd,_0x1c9a7d)<0x0)return _0x3f99d6;_0x3f99d6++;}}return _0x3f99d6;}}function v(_0x1a0072,_0x45c682){if(null===_0x1a0072&&null===_0x45c682)return 0x0;if(null===_0x1a0072)return-0x1;if(null===_0x45c682)return 0x1;const _0x41c6d8=_0x1a0072['top']-_0x45c682['top'];return 0x0==_0x41c6d8?_0x1a0072['left']-_0x45c682['left']:_0x41c6d8;}class O extends _0x1eed03{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x55817c){if(super(_0x55817c),this['collection']=new _(),this['_visibleAnnotations']=new _(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x55817c instanceof _0x116930){const _0x19b0db=_0x55817c['locale'];_0x55817c['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':E(_0x19b0db,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':E(_0x19b0db,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':E(_0x19b0db,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':E(_0x19b0db,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':E(_0x19b0db,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':E(_0x19b0db,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':E(_0x19b0db,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x9c90bc){this['collection']['add'](_0x9c90bc);}['remove'](_0x12b706){this['collection']['remove'](_0x12b706),_0x12b706['destroy']();}['refreshVisibility'](){for(const _0x21eaf6 of this['collection'])_0x21eaf6['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x12e18a){return this['collection']['getByInnerView'](_0x12e18a);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x27f2f6 of this['collection'])_0x27f2f6['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x41d5d6){this['fire']('_activateAnnotation',_0x41d5d6);}['createAnnotation'](_0x3c56b8){return new d(_0x3c56b8);}['createAnnotationView'](_0x1b3756,_0x1395d9){return new S(_0x1b3756,_0x1395d9);}['_addActiveAnnotation'](_0x57a1b6){const _0x123624=new Set(this['activeAnnotations']);_0x123624['add'](_0x57a1b6),this['activeAnnotations']=_0x123624;}['_removeActiveAnnotation'](_0x2a966c){const _0x3a092d=new Set(this['activeAnnotations']);_0x3a092d['delete'](_0x2a966c),this['activeAnnotations']=_0x3a092d;}['_bindAnnotationsToVisibleAnnotations'](){const _0xd5cdaa=this['collection'],_0x336b5a=this['_visibleAnnotations'];function _0x3c73af(_0x49beb6){const _0x16e24b=_0x49beb6['source'];_0x16e24b['isVisible']&&!_0x336b5a['has'](_0x16e24b)?_0x336b5a['add'](_0x16e24b):!_0x16e24b['isVisible']&&_0x336b5a['has'](_0x16e24b)&&_0x336b5a['remove'](_0x16e24b),_0x16e24b['view']['focusTracker']['remove'](_0x16e24b['view']['element']),_0x16e24b['view']['focusTracker']['add'](_0x16e24b['view']['element']);}this['listenTo'](_0xd5cdaa,'add',(_0x37211f,_0x5249d7)=>{_0x5249d7['isVisible']&&_0x336b5a['add'](_0x5249d7),this['listenTo'](_0x5249d7,'change:isVisible',_0x3c73af);}),this['listenTo'](_0xd5cdaa,'remove',(_0x4f10f8,_0x17a688)=>{_0x336b5a['has'](_0x17a688)&&_0x336b5a['remove'](_0x17a688),this['stopListening'](_0x17a688,'change:isVisible',_0x3c73af);});}['_setupEnterAnnotationKeystroke'](){const _0x1d52e1=_0x404b55=>{_0x404b55['on']('ready',()=>{_0x404b55['keystrokes']['set'](_0x10c482,(_0x1d7de2,_0x2df67b)=>{const _0x59eb6e=_0x4d5d74(this['activeAnnotations']['values']());_0x59eb6e&&(_0x59eb6e['view']['focus'](),_0x2df67b());});});};this['context']instanceof _0x116930?_0x1d52e1(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x486a0c,_0x5d1052)=>{_0x1d52e1(_0x5d1052);});}['_setupEscapeAnnotationHandling'](){const _0x1a69c1=_0x4771ef=>{const _0x292679=_0x4771ef['source'],_0x59af75=[];let _0x699338;if(Array['isArray'](_0x292679['target'])){_0x699338=_0x292679['target'][0x0],this['context']instanceof _0x116930?_0x59af75['push'](this['context']):this['context']['editors']&&_0x59af75['push'](...this['context']['editors']);for(const _0x58929c of _0x59af75)for(const _0x28c2f6 of _0x58929c['editing']['view']['domRoots']['values']())if(_0x28c2f6['contains'](_0x699338))return void _0x58929c['editing']['view']['focus']();_0x699338['focus']();}};this['listenTo'](this['collection'],'add',(_0x5d3cb9,_0x138c5e)=>{this['listenTo'](_0x138c5e,'escape',_0x1a69c1,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x461010,_0x42e7fd)=>{this['stopListening'](_0x42e7fd,'escape',_0x1a69c1);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x1eed03{['_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(_0x5d8916){super(_0x5d8916),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x3546c5=this['context']['config'];_0x3546c5['define']('comments.maxCommentsWhenCollapsed',0x2),_0x3546c5['define']('comments.maxThreadTotalWeight',0x1f4),_0x3546c5['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x3546c5['define']('comments.CommentThreadView',vt),_0x3546c5['define']('comments.CommentView',gt),_0x3546c5['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x3267a8=this['context']['plugins']['get'](O);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x2a6147,_0xdc16fd)=>this['_addCommentThread'](_0xdc16fd)),this['on']('submitCommentThread',(_0x5ac9de,_0x316af8)=>this['_submitCommentThread'](_0x316af8)),this['on']('resolveCommentThread',(_0x4657a2,_0x3c350f)=>this['_resolveCommentThread'](_0x3c350f)),this['on']('resolveCommentThread',(_0x468836,_0x181140)=>this['_updateActiveAnnotation'](_0x181140),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x49063d,_0x13bcd1)=>this['_reopenCommentThread'](_0x13bcd1)),this['on']('reopenCommentThread',(_0xae73aa,_0x51824f)=>this['_updateActiveAnnotation'](_0x51824f),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x171306,_0x32085d)=>this['_removeCommentThread'](_0x32085d)),this['on']('updateCommentThread',(_0x499b6e,_0x52598a)=>this['_updateCommentThread'](_0x52598a)),this['on']('updateCommentThread',(_0x23227f,_0xef52b6)=>this['_updateActiveAnnotation'](_0xef52b6),{'priority':'lowest'}),this['on']('addComment',(_0x2ae271,_0x431325)=>this['_addComment'](_0x431325)),this['on']('updateComment',(_0x11a720,_0x111113)=>this['_updateComment'](_0x111113)),this['on']('removeComment',(_0x55d0f3,_0x2de285)=>this['_removeComment'](_0x2de285)),this['on']('addComment',(_0x239033,{threadId:_0x540429,isFromAdapter:_0x5d40d7})=>{if(_0x5d40d7)return;const _0x3363af=this['getCommentThread'](_0x540429),_0x983ea7=_0x3363af&&this['_threadToController']['get'](_0x3363af);_0x983ea7&&_0x983ea7['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x3267a8,'change:activeAnnotations',(_0x2dd215,_0x3c3e99,_0x59c0bb)=>{const _0x331eff=Array['from'](_0x59c0bb)['map'](_0x3297b4=>this['_viewToController']['get'](_0x3297b4['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x331eff?_0x331eff['model']:null;});}set['adapter'](_0x206104){if(this['_adapter'])throw new _0x50ccf8('commentsrepository-adapter-already-set');this['_adapter']=_0x206104;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x563b33=Tt,threadId:_0x2b332e=_0x35b195(),comments:_0x447249=[],unlinkedAt:_0x183ccc=null,resolvedAt:_0xfc3b21=null,resolvedBy:_0x2cf607=null,target:_0x44d684=null,context:_0x12c2d3=null,attributes:_0x566191={},isResolvable:_0xd825e8=!0x0,isSubmitted:_0x177106=!0x1,isFromAdapter:_0x3ca8f9=!0x1}={}){return this['fire'](bt('addCommentThread',_0x563b33),{'channelId':_0x563b33,'threadId':_0x2b332e,'comments':_0x447249,'unlinkedAt':_0x183ccc,'resolvedAt':_0xfc3b21,'resolvedBy':_0x2cf607,'target':_0x44d684,'context':_0x12c2d3,'attributes':_0x566191,'isFromAdapter':_0x3ca8f9,'isResolvable':_0xd825e8,'isSubmitted':_0x177106}),this['getCommentThread'](_0x2b332e);}['openNewCommentThread']({channelId:_0x290704=Tt,threadId:_0x32cf49=_0x35b195(),target:_0x25b2bf,context:_0x557bec=null,isResolvable:_0x578378=!0x0}){if(this['_readOnlyChannels']['has'](_0x290704)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x25b2bf)throw new _0x50ccf8('commentsrepository-missing-target');const _0x196f9f=this['addCommentThread']({'channelId':_0x290704,'threadId':_0x32cf49,'target':_0x25b2bf,'context':_0x557bec,'isResolvable':_0x578378});if(!_0x196f9f)return null;const _0xf1ded8=this['_threadToController']['get'](_0x196f9f),_0x6671f1=_0xf1ded8['view']['commentThreadInputView']['commentInputView'],_0x6fe7fd=this['context']['plugins']['get'](O),_0x1e401e=_0x6fe7fd['getByInnerView'](_0xf1ded8['view']);return _0x6fe7fd['activate'](_0x1e401e),_0x6671f1['once']('editorReady',()=>_0x6671f1['focus']()),_0x196f9f;}['hasCommentThread'](_0x50ded3){if('string'!=typeof _0x50ded3)throw new _0x50ccf8('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x50ded3);}['updateCommentThread']({channelId:_0x39ef9d=Tt,threadId:_0x332241,context:_0x4729de,unlinkedAt:_0x206af9,attributes:_0x1d070a,isFromAdapter:_0x2eaf06=!0x1}){return this['fire'](bt('updateCommentThread',_0x39ef9d),{'channelId':_0x39ef9d,'threadId':_0x332241,'context':_0x4729de,'unlinkedAt':_0x206af9,'attributes':_0x1d070a,'isFromAdapter':_0x2eaf06}),this['getCommentThread'](_0x332241);}['getCommentThread'](_0x3144df){if('string'!=typeof _0x3144df)throw new _0x50ccf8('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x3144df);}['fetchCommentThread']({channelId:_0x25b525,threadId:_0x4b11b3}={}){const _0x3a02a8=this['getCommentThread'](_0x4b11b3);if(_0x3a02a8)return Promise['resolve'](_0x3a02a8);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x50ccf8('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x25b525,'threadId':_0x4b11b3})['then'](_0x2a2167=>this['hasCommentThread'](_0x4b11b3)?this['getCommentThread'](_0x4b11b3):_0x2a2167?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x25b525},_0x2a2167)):void 0x0)['catch'](_0x5264e3=>{throw console['error'](_0x5264e3),new _0x50ccf8('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x3484c1,skipNotAttached:_0x38256b=!0x1,skipEmpty:_0x34fab1=!0x1,toJSON:_0x3bd5b6=!0x1}={}){const _0x38081b=[];for(const _0x4c12b4 of this['_threads']['values']())_0x3484c1&&_0x4c12b4['channelId']!==_0x3484c1||_0x38256b&&!_0x4c12b4['isAttached']||_0x34fab1&&0x0===_0x4c12b4['length']||_0x38081b['push'](_0x4c12b4);return _0x3bd5b6?_0x38081b['map'](_0x4486f4=>_0x4486f4['toJSON']()):_0x38081b;}['setActiveCommentThread'](_0x663ecf){const _0x2bec57=this['context']['plugins']['get'](O);if(!_0x663ecf)return void(this['activeCommentThread']&&_0x2bec57['deactivateAll']());const _0x59344a=this['getCommentThread'](_0x663ecf);if(!_0x59344a)throw new _0x50ccf8('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x663ecf});if(!this['_threadToController']['has'](_0x59344a))throw new _0x50ccf8('commentsrepository-active-not-attached',null,{'threadId':_0x663ecf});const _0x106306=_0x2bec57['getByInnerView'](this['_threadToController']['get'](_0x59344a)['view']);_0x2bec57['activate'](_0x106306);}['switchReadOnly'](_0x1d31e0,_0x2b0eac){_0x1d31e0?this['_readOnlyChannels']['add'](_0x2b0eac):this['_readOnlyChannels']['delete'](_0x2b0eac),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x1915ba){return this['_readOnlyChannels']['has'](_0x1915ba)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x26463e,_0x452f85){return new Ct(_0x26463e,_0x452f85);}['setPermissions'](_0x3a01db,_0x2c0e44=Tt){this['_permissions']['set'](_0x2c0e44,_0x3a01db),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x5c92cf=Tt){return this['_permissions']['has'](_0x5c92cf)?this['_permissions']['get'](_0x5c92cf):_t;}['_addCommentThread']({channelId:_0x25b0fe,threadId:_0x44df14,comments:_0x3bd235,unlinkedAt:_0x52c177,resolvedAt:_0x33b8ec,resolvedBy:_0x2831a4,target:_0x3f1729,context:_0x13e279,attributes:_0x32c3a6,isFromAdapter:_0x6d4756,isResolvable:_0xb41d50,isSubmitted:_0x6d45c8}){if('string'!=typeof _0x44df14)throw new _0x50ccf8('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x44df14});if(this['hasCommentThread'](_0x44df14))throw new _0x50ccf8('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x44df14});const _0x3d9978=new ui(this,{'channelId':_0x25b0fe,'id':_0x44df14,'context':_0x13e279,'attributes':_0x32c3a6,'unlinkedAt':_0x52c177,'resolvedAt':_0x33b8ec,'resolvedBy':_0x2831a4?this['context']['plugins']['get'](it)['getUser'](_0x2831a4):null,'isResolvable':_0xb41d50,'isSubmitted':_0x6d45c8||_0x6d4756});this['_threads']['set'](_0x44df14,_0x3d9978);for(const _0x243d93 of _0x3bd235)_0x3d9978['_add'](this['_createNewComment']({'threadId':_0x44df14,..._0x243d93}));return _0x3f1729&&_0x3d9978['attachTo'](_0x3f1729),_0x6d4756||!_0x3d9978['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x25b0fe,'threadId':_0x44df14});}['_submitCommentThread']({channelId:_0x38ac02,threadId:_0x156797}){if(!this['hasCommentThread'](_0x156797))throw new _0x50ccf8('commentsrepository-missing-comment-thread',this);const _0x162059=this['getCommentThread'](_0x156797);if(_0x162059['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x43ff40,comments:_0xbe47ae,resolvedAt:_0x5d09dc,resolvedBy:_0x5d28a2,context:_0x3a8263,attributes:_0x4ef3af}=_0x162059,_0x1d6c02=this['context']['plugins']['get']('PendingActions'),_0x5a1fd0=_0x1d6c02['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x38ac02,'threadId':_0x43ff40,'comments':_0xbe47ae['map'](_0x4c8151=>_0x4c8151['toJSON']()),'resolvedAt':_0x5d09dc,'resolvedBy':_0x5d28a2?_0x5d28a2['id']:_0x5d28a2,'context':_0x3a8263,'attributes':_0x4ef3af})['then'](({comments:_0x486703})=>{_0x1d6c02['remove'](_0x5a1fd0);for(const _0x1081a3 of _0x486703)this['_updateComment']({'channelId':_0x38ac02,'threadId':_0x156797,'commentId':_0x1081a3['commentId'],'createdAt':_0x1081a3['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x161284=>{throw console['error'](_0x161284),new _0x50ccf8('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x51cd28,target:_0xfd310a}){const _0x10d41c=this['getCommentThread'](_0x51cd28);if(!_0x10d41c)throw new _0x50ccf8('commentsrepository-attach-missing-comment-thread',this);const _0x58306f=this['context']['plugins']['get']('PendingActions'),_0x26d339=this['context']['plugins']['get'](O),_0x17be1c=this['_createCommentThreadView'](_0x10d41c),_0x4bed81=new Ct(_0x10d41c,_0x17be1c);let _0x4c1890=null;_0x17be1c['on']('change:isDirty',(_0xe75e01,_0x46ab4b,_0x4f6569)=>{_0x4f6569?_0x4c1890=_0x58306f['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x4c1890&&(_0x58306f['remove'](_0x4c1890),_0x4c1890=null);}),this['_threadToController']['set'](_0x10d41c,_0x4bed81),this['_viewToController']['set'](_0x17be1c,_0x4bed81);const _0x114fa1=new S(this['context']['locale'],_0x17be1c);_0x114fa1['bind']('length')['to'](_0x17be1c),_0x114fa1['bind']('isDirty')['to'](_0x17be1c,'isDirty',_0x17be1c,'length',(_0x68e574,_0x8b1598)=>_0x68e574||!_0x8b1598),_0x114fa1['bind']('isActive')['to'](_0x17be1c),_0x114fa1['type']='comment';const _0x1a2342=new d({'view':_0x114fa1,'target':_0xfd310a,'type':'comment','isVisible':!_0x10d41c['archivedAt']});return _0x17be1c['on']('escape',()=>{_0x1a2342['fire']('escape');}),this['_bindAnnotationToEditors'](_0x17be1c,_0x1a2342),_0x26d339['add'](_0x1a2342),_0x1a2342;}['_bindAnnotationToEditors'](_0x211461,_0x3db305){this['listenTo'](_0x211461,'editorReady',(_0xaf2542,_0x3048b3)=>{const _0x435b0f=_0x3048b3['ui']['view']['body']['bodyCollectionContainer'];_0x3db305['focusableElements']['add'](_0x435b0f),this['context']instanceof _0x116930&&this['context']['ui']['focusTracker']['add'](_0x435b0f);},{'priority':'highest'}),this['listenTo'](_0x211461,'editorDestroyed',(_0x3d1171,_0x37c626)=>{const _0x246266=_0x37c626['ui']['view']['body']['bodyCollectionContainer'];_0x3db305['focusableElements']['has'](_0x246266)&&_0x3db305['focusableElements']['remove'](_0x246266),this['context']instanceof _0x116930&&this['context']['ui']['focusTracker']['remove'](_0x246266);});}['_unbindEditors'](_0x53d043){this['stopListening'](_0x53d043,'editorReady'),this['stopListening'](_0x53d043,'editorDestroyed');}['_createCommentThreadView'](_0x4a8668){const _0x2fe5ad=this['context']['plugins']['get'](it),{config:_0x1120df,locale:_0x4f8cf3}=this['context'],_0x4b1f73=lt(_0x1120df['get']('locale'),_0x4f8cf3);return new(0x0,(_0x1120df['get']('comments'))['CommentThreadView'])(_0x4f8cf3,_0x4a8668,_0x2fe5ad['me'],{'editorConfig':{..._0x1120df['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x1120df['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x1120df['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x1120df['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x1120df['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x4b1f73,'CommentView':_0x1120df['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x2ee49d,channelId:_0x4dbd16,resolvedAt:_0xa064c3,resolvedBy:_0x259fb7,isFromAdapter:_0x372d8f}){if(!this['hasCommentThread'](_0x2ee49d))throw new _0x50ccf8('commentsrepository-missing-comment-thread',null,{'threadId':_0x2ee49d});const _0x155462=this['getCommentThread'](_0x2ee49d);if(_0x155462['isResolved'])throw new _0x50ccf8('commentsrepository-resolved-comment-thread',null,{'threadId':_0x2ee49d});const _0x2b75e9=this['context']['plugins']['get'](it);if(_0x155462['resolvedBy']=_0x2b75e9['getUser'](_0x259fb7),_0x155462['resolvedAt']=_0xa064c3,_0x372d8f||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x37f38e=this['context']['plugins']['get']('PendingActions'),_0x4e69bf=_0x37f38e['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x4dbd16,'threadId':_0x2ee49d})['then'](({resolvedAt:_0x23cc76,resolvedBy:_0x10826a})=>{_0x37f38e['remove'](_0x4e69bf),_0x155462['resolvedBy']['id']!==_0x10826a&&(_0x155462['resolvedBy']=_0x2b75e9['getUser'](_0x10826a)),_0x155462['resolvedAt']=_0x23cc76;})['catch'](_0x582b52=>{throw console['error'](_0x582b52),new _0x50ccf8('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x24e54d,channelId:_0x12cb3b,isFromAdapter:_0x3e1398}){if(!this['hasCommentThread'](_0x24e54d))throw new _0x50ccf8('commentsrepository-missing-comment-thread',null,{'threadId':_0x24e54d});const _0x59a427=this['getCommentThread'](_0x24e54d);if(!_0x59a427['isResolved'])throw new _0x50ccf8('commentsrepository-reopen-comment-thread',null,{'threadId':_0x24e54d});if(_0x59a427['resolvedBy']=null,_0x59a427['resolvedAt']=null,_0x3e1398||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0xb9a68=this['context']['plugins']['get']('PendingActions'),_0x55c996=_0xb9a68['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x12cb3b,'threadId':_0x24e54d})['then'](()=>_0xb9a68['remove'](_0x55c996))['catch'](_0x1deaa3=>{throw console['error'](_0x1deaa3),new _0x50ccf8('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x577df4,isFromAdapter:_0x46433e}){const _0x5a0d99=this['getCommentThread'](_0x577df4);if(!_0x5a0d99)throw new _0x50ccf8('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x577df4),this['_threads']['delete'](_0x577df4),!_0x5a0d99['isSubmitted']||_0x46433e||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x16c4a1=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2c4be9}=_0x5a0d99,_0x573f49=_0x16c4a1['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x2c4be9,'threadId':_0x577df4})['then'](()=>_0x16c4a1['remove'](_0x573f49))['catch'](_0x1915a3=>{throw console['error'](_0x1915a3),new _0x50ccf8('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x42cc6f,unlinkedAt:_0x2757cb,context:_0x302fa1,attributes:_0x18573c,isFromAdapter:_0xbc2381}){if('string'!=typeof _0x42cc6f)throw new _0x50ccf8('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x42cc6f});if(!this['hasCommentThread'](_0x42cc6f))throw new _0x50ccf8('commentsrepository-missing-comment-thread',null,{'threadId':_0x42cc6f});const _0x4ef73a=this['getCommentThread'](_0x42cc6f);let _0x45fcb9=!0x1;if(void 0x0!==_0x302fa1&&_0x4ef73a['context']!==_0x302fa1&&(_0x4ef73a['context']=_0x302fa1,_0x45fcb9=!0x0),void 0x0!==_0x2757cb&&_0x4ef73a['unlinkedAt']!==_0x2757cb&&(_0x4ef73a['unlinkedAt']=_0x2757cb,_0x45fcb9=!0x0),_0x18573c&&!wt(_0x18573c,_0x4ef73a['attributes'])&&(_0x4ef73a['attributes']=_0x18573c,_0x45fcb9=!0x0),!_0x45fcb9)return Promise['resolve']();if(!_0x4ef73a['isSubmitted']||_0xbc2381||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x1b93f5=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4e4c1b}=_0x4ef73a,_0x15102f=_0x1b93f5['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x4e4c1b,'threadId':_0x42cc6f,'context':_0x302fa1,'unlinkedAt':_0x2757cb,'attributes':_0x18573c})['then'](()=>_0x1b93f5['remove'](_0x15102f))['catch'](_0x464ede=>{throw console['error'](_0x464ede),new _0x50ccf8('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x11e705){const _0x33bcc2=this['context']['plugins']['get'](O),_0x9fee2d=this['getCommentThread'](_0x11e705);if(_0x9fee2d['_isAttached']=!0x1,this['_threadToController']['has'](_0x9fee2d)){const _0x4fe20e=this['_threadToController']['get'](_0x9fee2d),_0x453b66=_0x4fe20e['view'],_0x36b183=_0x33bcc2['getByInnerView'](_0x453b66);this['_threadToController']['delete'](_0x9fee2d),this['_viewToController']['delete'](_0x453b66),_0x36b183&&_0x33bcc2['remove'](_0x36b183),_0x4fe20e['destroy'](),_0x453b66['destroy']()['then'](()=>{this['_unbindEditors'](_0x453b66);});}}['_updateActiveAnnotation']({threadId:_0x5cd019,resolvedAt:_0x21c9d8,unlinkedAt:_0x441f02}){const _0x2591a9=!!_0x21c9d8,_0x188da6=this['context']['plugins']['get'](O),_0x3d7f81=this['getCommentThread'](_0x5cd019);if(this['_threadToController']['has'](_0x3d7f81)){const _0x54fe79=this['_threadToController']['get'](_0x3d7f81)['view'],_0x293c5e=_0x188da6['getByInnerView'](_0x54fe79);_0x293c5e&&(_0x2591a9&&_0x188da6['_removeActiveAnnotation'](_0x293c5e),_0x441f02?_0x293c5e['isVisible']=!0x1:_0x293c5e['refreshVisibility']());}}['_getExternalAuthor'](_0x3a4917){const _0x59a17b=this['context']['plugins']['get'](it),_0x26b50e=pt('external:'+_0x3a4917),_0x5503e8=_0x59a17b['getUser'](_0x26b50e);return _0x5503e8||_0x59a17b['addUser']({'id':_0x26b50e,'name':_0x3a4917});}['_createNewComment']({threadId:_0x1948d3,commentId:_0x16381c=_0x35b195(),content:_0xb3f238,authorId:_0xc656b4,createdAt:_0x2ee7b2,attributes:_0x34f4fc}){if('string'!=typeof _0x16381c)throw new _0x50ccf8('commentsrepository-invalid-commentid');if('string'!=typeof _0xc656b4)throw new _0x50ccf8('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0xb3f238||!_0xb3f238['trim']())throw new _0x50ccf8('commentsrepository-invalid-comment-content');const _0x555da8=this['context']['plugins']['get'](it)['getUser'](_0xc656b4);if(!_0x555da8)throw new _0x50ccf8('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0xc656b4});let _0x206b13=null,_0x56ce8d=_0x2ee7b2;return _0x34f4fc?.['@external']&&(_0x206b13=this['_getExternalAuthor'](_0x34f4fc['@external']['authorName']),_0x56ce8d=new Date(_0x34f4fc['@external']['createdAt'])),new fi(this,{'threadId':_0x1948d3,'id':_0x16381c,'author':_0x206b13||_0x555da8,'creator':_0x555da8,'content':_0xb3f238,'createdAt':_0x2ee7b2,'authoredAt':_0x56ce8d,'attributes':_0x34f4fc});}['_addComment'](_0x36feda){let {threadId:_0x26c799,content:_0xb4097b,attributes:_0x52e531,isFromAdapter:_0xf7d66a}=_0x36feda;const _0xfe09ff=this['getCommentThread'](_0x36feda['threadId']);if(!_0xfe09ff)throw new _0x50ccf8('commentsrepository-add-comment-to-missing-comment-thread',this);const _0xc8de5f=this['_createNewComment'](_0x36feda),{id:_0x40a542}=_0xc8de5f;if(_0xfe09ff['_add'](_0xc8de5f),_0xf7d66a||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0xfe09ff['isSubmitted'])return Promise['resolve']();const _0x49155d=this['context']['plugins']['get']('PendingActions'),{channelId:_0x439cce}=_0xfe09ff,_0x42f938=_0x49155d['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x52e531||(_0x52e531={}),this['adapter']['addComment']({'channelId':_0x439cce,'threadId':_0x26c799,'commentId':_0x40a542,'content':_0xb4097b,'attributes':_0x52e531})['then'](_0x3d8cf5=>{_0x49155d['remove'](_0x42f938),_0x3d8cf5&&this['_updateComment']({'channelId':_0x439cce,'threadId':_0x26c799,'commentId':_0x40a542,'createdAt':_0x3d8cf5['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x35890c=>{throw console['error'](_0x35890c),new _0x50ccf8('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x45c25f,commentId:_0x317e1f,content:_0x43935d,createdAt:_0x39bdb0,attributes:_0x1d79b3,isFromAdapter:_0x266a1f}){if(void 0x0!==_0x43935d&&('string'!=typeof _0x43935d||!_0x43935d['trim']()['length']))throw new _0x50ccf8('commentsrepository-update-comment-invalid-content');const _0x1ae777=this['getCommentThread'](_0x45c25f),_0x1e508f=_0x1ae777['getComment'](_0x317e1f);if(!_0x1e508f)throw new _0x50ccf8('commentsrepository-update-missing-comment',this);let _0xda90d2=!0x1;if(_0x43935d&&_0x43935d!==_0x1e508f['content']&&(_0x1e508f['isEditable']||_0x266a1f)&&(_0x1e508f['content']=_0x43935d,_0xda90d2=!0x0),_0x39bdb0&&_0x39bdb0!==_0x1e508f['createdAt']&&(_0x1e508f['createdAt']=_0x39bdb0,_0x1e508f['attributes']&&_0x1e508f['attributes']['@external']||(_0x1e508f['authoredAt']=_0x39bdb0),_0xda90d2=!0x0),_0x1d79b3&&!wt(_0x1d79b3,_0x1e508f['attributes'])&&(_0x1e508f['attributes']=_0x1d79b3,_0xda90d2=!0x0),!_0xda90d2)return Promise['resolve']();if(_0x1ae777['fire']('commentUpdated'),_0x266a1f||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x24f3a7=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4d1e4c}=this['getCommentThread'](_0x1e508f['threadId']),_0x2d9bac=_0x24f3a7['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x4d1e4c,'threadId':_0x45c25f,'commentId':_0x317e1f,'content':_0x43935d,'attributes':_0x1d79b3})['then'](()=>_0x24f3a7['remove'](_0x2d9bac))['catch'](_0x4ef99c=>{throw console['error'](_0x4ef99c),new _0x50ccf8('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x2ab57c,commentId:_0x39b020,isFromAdapter:_0x51ca05}){const _0x183a20=this['getCommentThread'](_0x2ab57c),_0x10ab77=_0x183a20['getComment'](_0x39b020);if(!_0x10ab77)throw new _0x50ccf8('commentsrepository-remove-missing-comment',this);if(_0x183a20['_remove'](_0x10ab77),_0x51ca05||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x7b3785=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1fe0cc}=_0x183a20,_0x377f6d=_0x7b3785['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x1fe0cc,'threadId':_0x2ab57c,'commentId':_0x39b020})['then'](()=>_0x7b3785['remove'](_0x377f6d))['catch'](_0x28347f=>{throw console['error'](_0x28347f),new _0x50ccf8('commentsrepository-remove-comment-internal-error',this);});}}class ui extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x29df45(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x40a141,_0x26c157){super();const _0x32eada=_0x26c157['isResolvable'];this['channelId']=_0x26c157['channelId'],this['id']=_0x26c157['id'],this['comments']=new _0x41b195(),this['_repository']=_0x40a141,this['_isAttached']=!0x1,this['_isSubmitted']=_0x26c157['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x40a141,'_permissions',_0x40a141,'_readOnlyChannels',()=>_0x40a141['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x40a141,'_permissions',()=>_0x40a141['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x40a141,'_permissions',()=>{const _0x51208d=_0x40a141['getPermissions'](this['channelId']);return _0x51208d['write']||_0x51208d['admin'];}),this['bind']('isResolvable')['to'](_0x40a141,'_permissions',()=>_0x32eada&&_0x40a141['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x26c157['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0xc1b3b1,_0x266c19)=>_0xc1b3b1?_0x266c19?_0xc1b3b1<_0x266c19?_0xc1b3b1:_0x266c19:_0xc1b3b1:_0x266c19),this['set']('unlinkedAt',_0x26c157['unlinkedAt']||null),this['set']('resolvedAt',_0x26c157['resolvedAt']||null),this['set']('resolvedBy',_0x26c157['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x1e2eb1=>!!_0x1e2eb1),this['set']('attributes',_0x26c157['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x3f16a3,_0x3b65e0)=>_0x3f16a3+_0x3b65e0['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x557917,id:_0xed577c}=this;this['_repository']['fire'](bt('submitCommentThread',_0x557917),{'channelId':_0x557917,'threadId':_0xed577c});}['setUnlinkedAt'](_0x3c681e){this['_update']({'unlinkedAt':_0x3c681e});}['resolve']({resolvedAt:_0x12a2ed=new Date(),resolvedBy:_0x4a3df7=null,isFromAdapter:_0x31f04e=!0x1}={}){const _0x5b1c22=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x4d6d79,id:_0x346bc6}=this;this['_repository']['fire'](bt('resolveCommentThread',_0x4d6d79),{'channelId':_0x4d6d79,'threadId':_0x346bc6,'resolvedAt':_0x12a2ed,'resolvedBy':_0x4a3df7||_0x5b1c22['id'],'isFromAdapter':_0x31f04e});}['reopen']({isFromAdapter:_0x9342a8=!0x1}={}){const {channelId:_0x20798b,id:_0x2ee52d}=this;this['_repository']['fire'](bt('reopenCommentThread',_0x20798b),{'channelId':_0x20798b,'threadId':_0x2ee52d,'isFromAdapter':_0x9342a8});}['setContext'](_0x495d5f){this['context']||this['_update']({'context':_0x495d5f});}['setAttribute'](_0x9fd8fa,_0x422ae5){const _0x16b9dd=It(this['attributes']);At(_0x16b9dd,_0x9fd8fa,_0x422ae5),this['_update']({'attributes':_0x16b9dd});}['removeAttribute'](_0x550956){const _0x379f17=It(this['attributes']);yt(_0x379f17,_0x550956),this['_update']({'attributes':_0x379f17});}['remove']({isFromAdapter:_0x90840c=!0x1}={}){const {channelId:_0x54772f,id:_0x357294}=this;this['_repository']['fire'](bt('removeCommentThread',_0x54772f),{'channelId':_0x54772f,'threadId':_0x357294,'isFromAdapter':_0x90840c});}['attachTo'](_0x50aa81){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x50aa81});}['addComment'](_0x35d102){const {channelId:_0x33611f,id:_0x50b2ff}=this;this['_repository']['fire'](bt('addComment',_0x33611f,_0x50b2ff),Object['assign']({'channelId':_0x33611f,'threadId':_0x50b2ff},_0x35d102));}['getComment'](_0x38f3ac){if('string'!=typeof _0x38f3ac)throw new _0x50ccf8('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x38f3ac});return this['comments']['get'](_0x38f3ac);}['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'](_0x5dc202=>_0x5dc202['toJSON']()),'attributes':this['attributes']};}['_add'](_0x445367){return this['listenTo'](_0x445367,'change:authoredAt',()=>{const _0x42c877=this['_findOptimalIndex'](_0x445367),_0x417550=this['comments'];_0x42c877-0x1!=_0x417550['getIndex'](_0x445367)&&_0x42c877+0x1!=_0x417550['getIndex'](_0x445367)&&(this['_remove'](_0x445367),this['_add'](_0x445367));}),this['comments']['add'](_0x445367,this['_findOptimalIndex'](_0x445367));}['_update'](_0x469521){const {channelId:_0xce671c,id:_0x1aa12f}=this;this['_repository']['fire'](bt('updateCommentThread',_0xce671c),{..._0x469521,'channelId':_0xce671c,'threadId':_0x1aa12f});}['_remove'](_0x183a0a){return this['stopListening'](_0x183a0a),_0x183a0a['destroy'](),this['comments']['remove'](_0x183a0a);}['_findOptimalIndex'](_0x303c2e){const _0x3a7eed=this['comments']['find'](_0x14fbfa=>new Date(_0x14fbfa['authoredAt'])['getTime']()>new Date(_0x303c2e['authoredAt'])['getTime']());return _0x3a7eed?this['comments']['getIndex'](_0x3a7eed):this['length'];}}class fi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x29df45(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x518b3a,_0x1badf5){super();const _0xe34b8b=_0x518b3a['context']['plugins']['get'](it)['me'],_0x5277c5=_0x518b3a['getCommentThread'](_0x1badf5['threadId']),_0x59c476=0x0===_0x5277c5['comments']['length'],_0x2a1489=_0xe34b8b===_0x1badf5['author'];this['id']=_0x1badf5['id'],this['threadId']=_0x1badf5['threadId'],this['author']=_0x1badf5['author'],this['creator']=_0x1badf5['creator'],this['isExternal']=Boolean(_0x1badf5['attributes']&&_0x1badf5['attributes']['@external']),this['set']('content',_0x1badf5['content']),this['createdAt']=_0x1badf5['createdAt']||new Date(),this['set']('authoredAt',_0x1badf5['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x5277c5,'resolvedAt'),this['set']('attributes',_0x1badf5['attributes']||{}),this['bind']('isEditable')['to'](_0x518b3a,'_permissions',()=>{const _0x463988=_0x518b3a['getPermissions'](_0x5277c5['channelId'])['write'],_0x57ee65=_0x518b3a['getPermissions'](_0x5277c5['channelId'])['modifyAll'];return _0x2a1489&&_0x463988||!_0x2a1489&&_0x57ee65;}),this['bind']('isRemovable')['to'](_0x5277c5,'isRemovable',_0x518b3a,'_permissions',_0x240f68=>{const _0x275e83=_0x518b3a['getPermissions'](_0x5277c5['channelId'])['write'],_0x316cfb=_0x518b3a['getPermissions'](_0x5277c5['channelId'])['modifyAll'];return _0x2a1489&&_0x275e83||_0x240f68&&_0x59c476||!_0x2a1489&&_0x316cfb&&!_0x59c476;}),this['bind']('isReadOnly')['to'](_0x5277c5,'isReadOnly'),this['_repository']=_0x518b3a;}get['weight'](){return Math['max'](function(_0x2c69be){const _0x54087c=document['createElement']('div');return _0x54087c['innerHTML']=_0x2c69be,_0x54087c['textContent']['length'];}(this['content']),0xc8);}['update'](_0x15f5dc){const {threadId:_0x9047f3,id:_0x352cf1}=this;if(!this['_repository']['hasCommentThread'](_0x9047f3))throw new _0x50ccf8('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x42404d}=this['_repository']['getCommentThread'](_0x9047f3);this['_repository']['fire'](bt('updateComment',_0x42404d,_0x9047f3),{'channelId':_0x42404d,'threadId':_0x9047f3,'commentId':_0x352cf1,..._0x15f5dc});}['setAttribute'](_0x3d9fb2,_0x1ae056){const _0x48b948=It(this['attributes']);At(_0x48b948,_0x3d9fb2,_0x1ae056),this['update']({'attributes':_0x48b948});}['removeAttribute'](_0x1d119f){const _0x3c408d=It(this['attributes']);yt(_0x3c408d,_0x1d119f),this['update']({'attributes':_0x3c408d});}['remove'](_0x4fb86b={}){if(!_0x4fb86b['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x3d2544,id:_0x555cae}=this;if(!this['_repository']['hasCommentThread'](_0x3d2544))throw new _0x50ccf8('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x34fcc0}=this['_repository']['getCommentThread'](_0x3d2544);this['_repository']['fire'](bt('removeComment',_0x34fcc0,_0x3d2544),{'channelId':_0x34fcc0,'threadId':_0x3d2544,'commentId':_0x555cae,..._0x4fb86b});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0x144b51,..._0x50020d){for(const _0x4e6100 of _0x50020d)void 0x0!==_0x4e6100&&(_0x144b51+=':'+String(_0x4e6100));return _0x144b51;}class J extends _0x14584c{['refresh'](){const _0x407cda=this['editor']['model']['document']['selection'];for(const _0x3687f3 of _0x407cda['getRanges']())if(this['_hasContent'](_0x3687f3))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x1c0fc6=_0x35b195()}={}){const _0x161b1d=this['editor']['model'],_0x4d619a=[];for(const _0x19f931 of _0x161b1d['document']['selection']['getRanges']())this['_hasContent'](_0x19f931)&&_0x4d619a['push'](this['_trimToContent'](_0x19f931));_0x161b1d['change'](_0x4df876=>{for(const _0x114576 of _0x4d619a){const _0x195d95=_0x35b195()['substr'](0x1,0x5),_0x566770='comment:'+_0x1c0fc6+':'+_0x195d95;_0x4df876['addMarker'](_0x566770,{'range':_0x114576,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x1685a6){for(const _0x12fa3b of _0x1685a6['getItems']())if(this['_itemIsContent'](_0x12fa3b))return!0x0;return!0x1;}['_itemIsContent'](_0x1ef386){return _0x1ef386['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x1ef386)&&!_0x1ef386['is']('element','tableCell');}['_trimToContent'](_0x27417f){const _0x5c6faf=_0x47ca69=>!this['_itemIsContent'](_0x47ca69['item']),_0x3c7e83=_0x27417f['start']['getLastMatchingPosition'](_0x5c6faf),_0x5448ff=_0x27417f['end']['getLastMatchingPosition'](_0x5c6faf,{'direction':'backward'});return this['editor']['model']['createRange'](_0x3c7e83,_0x5448ff);}}class P extends _0x411e57{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[O];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x79ee05){super(_0x79ee05),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x4c08ed=this['editor'],_0x2a46a5=_0x4c08ed['model']['document']['selection'],_0x310cb1=_0x2aa444(()=>this['refreshSelectedViews'](),0xa);_0x2a46a5['on']('change:range',(_0x5e6563,_0x2a0254)=>{_0x2a0254['directChange']&&(_0x310cb1['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x4c08ed['editing']['view']['document'],'change:isFocused',(_0x126723,_0x453b13,_0x5b74cd)=>{_0x5b74cd&&_0x310cb1();}),this['listenTo'](_0x4c08ed['ui']['focusTracker'],'change:isFocused',(_0x272f46,_0x4356df,_0x2f44a5)=>{_0x2f44a5||_0x4c08ed['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x5c7dd9=>this['_editorAnnotationsData']['has'](_0x5c7dd9['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x587ce6){if(this['_editorAnnotations']['has'](_0x587ce6['view']))return;this['_editorAnnotations']['add'](_0x587ce6['view']),this['editor']['ui']['focusTracker']['add'](_0x587ce6['view']['element']);const _0x5b09b4=this['editor']['plugins']['get'](O);this['listenTo'](_0x5b09b4['collection'],'remove',(_0x50bec9,_0x4713a9)=>{this['editor']['ui']['focusTracker']['remove'](_0x4713a9['view']['element']),this['_editorAnnotations']['delete'](_0x4713a9['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x1dfaec){if('function'!=typeof _0x1dfaec)throw new _0x50ccf8('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x1dfaec);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x9477a3,annotations:_0x245796}){const _0x4bbcd2=[],_0x97d5bb=this['editor']['model']['document']['selection'],_0x287c34=Array['from'](_0x97d5bb['getRanges']());for(const [_0x239d16,_0x173ff8]of this['_editorAnnotationsData']){const _0x5bcaa9=_0x5d47ea(_0x173ff8),_0x5731f1=_0x245796['getByInnerView'](_0x239d16);_0x5bcaa9&&_0x5731f1&&_0x4bbcd2['push']({'annotation':_0x5731f1,'range':_0x5bcaa9});}function _0x5d47ea(_0x17ce08){for(const _0x45df50 of _0x17ce08)for(const _0x3ab89b of _0x287c34)if(_0x45df50['containsRange'](_0x3ab89b,!_0x97d5bb['isCollapsed']))return _0x45df50;return null;}return _0x4bbcd2['sort']((_0x299761,_0x4c80ad)=>{const _0x30f534=_0x299761['range'],_0x16527f=_0x4c80ad['range'];if(!_0x30f534['isEqual'](_0x16527f)){if(_0x30f534['containsRange'](_0x16527f,!0x0))return 0x1;if(_0x16527f['containsRange'](_0x30f534,!0x0))return-0x1;}return _0x299761['annotation']==_0x9477a3?-0x1:_0x4c80ad['annotation']==_0x9477a3?0x1:0x0;})['map'](_0x574eac=>_0x574eac['annotation']);}get['_editorAnnotationsData'](){const _0xea620f=new Map();for(const _0x488d6a of Array['from'](this['_dataCollectors']))for(const [_0xbc4f1e,_0xc82ff7]of _0x488d6a())_0xea620f['set'](_0xbc4f1e,_0xc82ff7);return _0xea620f;}}class st extends _0x411e57{['afterInit'](){const _0x378915=this['editor'];if(!_0x378915['plugins']['has']('RestrictedEditingModeEditing'))return;_0x378915['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x411e57{constructor(_0x4841c6){super(_0x4841c6),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x323391=this['editor'],_0xd56209=_0x323391['commands']['get']('importWord'),_0x474496=_0x323391['plugins']['get'](it);_0xd56209&&(_0xd56209['on']('execute',(_0xd1107a,[,_0x245459])=>{_0x245459['collaboration_features']={'comments':!0x0,'user_id':_0x474496['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0xd56209,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x130631,_0x275fb8){const {comment_threads:_0x2fabab}=_0x275fb8;_0x2fabab&&_0x2fabab['forEach'](({thread_id:_0x2c04a9,comments:_0x24617a,is_resolved:_0x340658})=>{const _0x102fee=new Date(),_0x450547=_0x24617a['map'](({author:_0x30d029,content:_0x8af741,created_at:_0x3fd383})=>({'content':_0x8af741,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x102fee,'attributes':{'@external':{'authorName':_0x30d029,'createdAt':_0x3fd383?new Date(_0x3fd383):new Date(),'source':'importWord'}}})),_0x11e361=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x11e361,'threadId':_0x2c04a9,'comments':_0x450547,'resolvedAt':_0x340658?_0x102fee:null});});}}class at extends _0x411e57{constructor(_0x1bf582){super(_0x1bf582),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x2063a9=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x2063a9,'contentInsertion',(_0x3a63ff,_0x5f1947)=>this['_removeMarkersWithoutThreads'](_0x5f1947['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x261532){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x261532;const _0x120351=this['editor']['plugins']['get']('CommentsRepository');for(const _0xf20c00 of _0x261532['keys']()){const [_0x4cbfa9,_0x5958f6]=_0xf20c00['split'](':');'comment'!=_0x4cbfa9||_0x120351['hasCommentThread'](_0x5958f6)||_0x261532['delete'](_0xf20c00);}return _0x261532;}['_registerMarkerInClipboardPipeline'](){const _0x47a98f=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x27c8d4=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x27c8d4&&_0x47a98f['_registerMarkerToCopy']('comment',_0x27c8d4);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x2b878e){switch(_0x2b878e){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 _0x411e57{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x4c7598,_0x1a96e2)=>{if(!_0x1a96e2['options']['showCommentHighlights'])return null;if(_0x1a96e2['options']['ignoreResolvedComments']){const {id:_0x2ac192}=er(_0x4c7598['markerName']),_0x2fda04=this['editor']['plugins']['get'](o);if(_0x2fda04['getCommentThread'](_0x2ac192)?.['isResolved']&&_0x4c7598['item'])return _0x1a96e2['consumable']['consume'](_0x4c7598['item'],'addMarker:'+_0x4c7598['markerName']),_0x1a96e2['consumable']['consume'](_0x4c7598['item'],'removeMarker:'+_0x4c7598['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x5e3503=>{_0x5e3503['on']('addMarker:comment',(_0x2e5614,_0x39a828,_0x436e94)=>{if(!_0x436e94['options']['showCommentHighlights'])return;const _0x65845e=_0x39a828['item'];if(!_0x65845e)return;const _0x3651ad=_0x436e94['mapper']['toViewElement'](_0x65845e);this['editor']['model']['schema']['isObject'](_0x65845e)&&_0x3651ad&&!_0x3651ad['getCustomProperty']('widget')&&_0x3651ad['is']('containerElement')&&_0x189508(_0x3651ad,_0x436e94['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x59055a,{writer:_0x25c35b,options:_0x4a272c})=>{if(!_0x4a272c['showCommentHighlights'])return null;const _0x52c481=_0x25c35b['createContainerElement']('div'),_0x40aa78=_0x25c35b['createEmptyElement']('hr');return _0x25c35b['addClass']('ck-horizontal-line',_0x52c481),_0x25c35b['insert'](_0x25c35b['createPositionAt'](_0x52c481,0x0),_0x40aa78),_0x52c481;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x49fd95,{writer:_0x4ce5d,options:_0x64f497})=>{if(!_0x64f497['showCommentHighlights'])return null;const _0x2ede0b=_0x4ce5d['createContainerElement']('span'),_0x3977ca=_0x4ce5d['createEmptyElement']('img');return _0x4ce5d['addClass']('image-inline',_0x2ede0b),_0x4ce5d['insert'](_0x4ce5d['createPositionAt'](_0x2ede0b,0x0),_0x3977ca),_0x2ede0b;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x39a5a6,{writer:_0x5b7751,options:_0x188c4b})=>{if(_0x188c4b['showCommentHighlights'])return _0x5b7751['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x4ec0d2,_0x49d0e6,_0x210720)=>{_0x210720['options']['showCommentHighlights']&&_0x4ec0d2['stop']();},{'priority':'high'});}}class r extends _0x411e57{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(_0x28d7a7){super(_0x28d7a7),this['set']('isThreadsLoadingPaused',!0x0),_0x28d7a7['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x44c3ed,_0x11b64d,_0x3d13eb,_0x3ec132)=>{const _0x39d62c=_0x28d7a7['plugins']['get'](o),_0x1b6f82=_0x3d13eb?er(_0x3d13eb)['id']:null;_0x28d7a7['model']['change'](()=>{if(_0x1b6f82){const _0x41ffa5=this['getAllMarkersForId'](_0x1b6f82);for(const _0x3c83bf of _0x41ffa5)_0x28d7a7['editing']['reconvertMarker'](_0x3c83bf);}if(_0x3ec132){const {id:_0x3d7a30}=er(_0x3ec132),_0x170cc8=_0x39d62c['getCommentThread'](_0x3d7a30);if(_0x170cc8&&_0x170cc8['unlinkedAt'])return;if(_0x170cc8&&!_0x170cc8['isAttached'])return;const _0x4a36fd=this['getAllMarkersForId'](_0x3d7a30);for(const _0x85b955 of _0x4a36fd)_0x28d7a7['editing']['reconvertMarker'](_0x85b955);}}),_0x1b6f82&&this['scrollToThreadMarker'](_0x1b6f82);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x329297=this['editor'],_0x2f96ab=_0x329297['plugins']['get'](o),_0x4c657e=_0x329297['config']['get']('collaboration.channelId'),_0x4591a7=_0x2f96ab['getCommentThreads']()['filter'](_0x32754d=>_0x32754d['channelId']!==_0x4c657e);_0x329297['commands']['add']('addCommentThread',new J(_0x329297)),this['listenTo'](_0x329297,'change:isReadOnly',(_0x3349ed,_0x53055f,_0x2c4498)=>{_0x2f96ab['switchReadOnly'](_0x2c4498,_0x329297['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x2f96ab,ft('addCommentThread',_0x4c657e),(_0x2963e2,{threadId:_0x58e766})=>{const _0x39d422=this['editor']['plugins']['get'](o)['getCommentThread'](_0x58e766);_0x39d422?.['unlinkedAt']&&this['_attachArchivedThread'](_0x58e766);}),this['listenTo'](_0x2f96ab,ft('removeCommentThread',_0x4c657e),(_0x495cf5,{threadId:_0x2efead})=>{_0x329297['model']['enqueueChange']({'isUndoable':!0x1},_0x167cd8=>{const _0x4e273b=this['getAllMarkersForId'](_0x2efead);for(const _0xcfea2f of _0x4e273b)_0x167cd8['removeMarker'](_0xcfea2f);});}),this['listenTo'](_0x2f96ab,ft('resolveCommentThread',_0x4c657e),(_0x226d71,{threadId:_0x21de49})=>{(this['_reconvertMarkers'](_0x21de49),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x21de49)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x2f96ab,ft('reopenCommentThread',_0x4c657e),(_0x1629bf,{threadId:_0x262e4e})=>{this['_reconvertMarkers'](_0x262e4e);},{'priority':'low'}),this['listenTo'](_0x2f96ab,ft('addComment',_0x4c657e),(_0x36af62,{threadId:_0x122708,isFromAdapter:_0x1bfd5a})=>{const _0x39c106=this['getAllMarkersForId'](_0x122708);if(_0x1bfd5a||0x0==_0x39c106['length']||!_0x2f96ab['hasCommentThread'](_0x122708))return;0x1===_0x2f96ab['getCommentThread'](_0x122708)['length']&&_0x329297['model']['enqueueChange']({'isUndoable':!0x1},_0x4e8c10=>{for(const _0x19ad19 of _0x39c106)_0x4e8c10['updateMarker'](_0x19ad19,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x4591a7);}['afterInit'](){!async function(_0x3bea5b){const _0x10ff57=_0x409c80([0x31,0x44,0x4f,0x50,0x62,0x72,0x45,0x6b,0x55,0x65,0x70,0x4b,0x6d,0x7a,0x77,0x71,0x75,0x61,0x4c,0x49,0x66,0x43,0x63,0x74,0x48,0x58,0x6e,0x41,0x73,0x79,0x52,0x47,0x69,0x38,0x4d,0x32,0x33,0x78,0x30,0x59,0x54,0x53,0x36,0x6f,0x76,0x6a,0x68,0x56,0x64,0x35,0x6c,0x51,0x37,0x39,0x57,0x34,0x67,0x46,0x4e,0x5a,0x4a,0x42]),_0x2af3fe=0x7e52cd89,_0x265820=0x7e55a759^_0x2af3fe,_0x24080d=window[_0x409c80([0x44,0x61,0x74,0x65])][_0x409c80([0x6e,0x6f,0x77])](),_0x24214a=_0x3bea5b[_0x409c80([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4b535c=new window[(_0x409c80([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x52ad76=>{_0x24214a[_0x409c80([0x6f,0x6e,0x63,0x65])](_0x409c80([0x72,0x65,0x61,0x64,0x79]),_0x52ad76);}),_0x212ecb={[_0x409c80([0x6b,0x74,0x79])]:_0x409c80([0x45,0x43]),[_0x409c80([0x75,0x73,0x65])]:_0x409c80([0x73,0x69,0x67]),[_0x409c80([0x63,0x72,0x76])]:_0x409c80([0x50,0x2d,0x32,0x35,0x36]),[_0x409c80([0x78])]:_0x409c80([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]),[_0x409c80([0x79])]:_0x409c80([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]),[_0x409c80([0x61,0x6c,0x67])]:_0x409c80([0x45,0x53,0x32,0x35,0x36])},_0x10ebaf=_0x24214a[_0x409c80([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x409c80([0x67,0x65,0x74])](_0x409c80([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x42111d(){let _0x16dbb4,_0x12d9a6=null,_0x2078a6=null;try{if(_0x10ebaf==_0x409c80([0x47,0x50,0x4c]))return _0x409c80([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x16dbb4=_0x1c8645(),!_0x16dbb4)return _0x409c80([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x16dbb4[_0x409c80([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2078a6=_0x3bd47e(_0x16dbb4[_0x409c80([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x16dbb4[_0x409c80([0x6a,0x74,0x69])])),await _0x3ac262()?_0xe94de8()?_0xc91c87()?_0x409c80([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x8a5b0f()?(_0x16dbb4[_0x409c80([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x409c80([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x12d9a6=_0x212c65(_0x409c80([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x16dbb4[_0x409c80([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x409c80([0x74,0x72,0x69,0x61,0x6c])&&(_0x12d9a6=_0x212c65(_0x409c80([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x78ef02()):_0x409c80([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x409c80([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x409c80([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x409c80([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0xc91c87(){const _0x361377=[_0x409c80([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x409c80([0x74,0x72,0x69,0x61,0x6c])][_0x409c80([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x16dbb4[_0x409c80([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x24080d/0x3e8:0xe10*_0x265820;return _0x16dbb4[_0x409c80([0x65,0x78,0x70])]<_0x361377;}function _0xe94de8(){const _0xe3bc75=_0x16dbb4[_0x409c80([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0xe3bc75)return!0x1;if(_0xe3bc75[_0x409c80([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x409c80([0x2a])))return!0x0;if(_0xe3bc75[_0x409c80([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x409c80([0x43,0x4d,0x54])))return!0x0;if(_0xe3bc75[_0x409c80([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x409c80([0x52,0x43,0x4d,0x54]))){if(_0x5cfd5e())return!0x0;if(_0x59380e()||_0x862d15())return!0x0;}return!0x1;}function _0x8a5b0f(){const _0x3237eb=_0x16dbb4[_0x409c80([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3237eb||0x0==_0x3237eb[_0x409c80([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3343ae}=new URL(window[_0x409c80([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x3237eb[_0x409c80([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3343ae))return!0x0;const _0x1206f4=_0x3343ae[_0x409c80([0x73,0x70,0x6c,0x69,0x74])](_0x409c80([0x2e]));return _0x3237eb[_0x409c80([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x62dfac=>_0x62dfac[_0x409c80([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x409c80([0x2a])))[_0x409c80([0x6d,0x61,0x70])](_0x1df57c=>_0x1df57c[_0x409c80([0x73,0x70,0x6c,0x69,0x74])](_0x409c80([0x2e])))[_0x409c80([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3d5324=>_0x3d5324[_0x409c80([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x1206f4[_0x409c80([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x409c80([0x6d,0x61,0x70])](_0x3ca590=>Array(_0x1206f4[_0x409c80([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x3ca590[_0x409c80([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x409c80([0x66,0x69,0x6c,0x6c])](_0x3ca590[0x0]===_0x409c80([0x2a])?_0x409c80([0x2a]):'')[_0x409c80([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x3ca590))[_0x409c80([0x73,0x6f,0x6d,0x65])](_0x19943f=>_0x1206f4[_0x409c80([0x65,0x76,0x65,0x72,0x79])]((_0x29918a,_0x70c8ba)=>_0x19943f[_0x70c8ba]===_0x29918a||_0x19943f[_0x70c8ba]===_0x409c80([0x2a])));}function _0x78ef02(){return _0x12d9a6&&_0x2078a6?new window[(_0x409c80([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3f24ae,_0x2999c5)=>{_0x12d9a6[_0x409c80([0x74,0x68,0x65,0x6e])](_0x3f24ae,_0x2999c5),_0x2078a6[_0x409c80([0x74,0x68,0x65,0x6e])](_0x9f41aa=>{_0x9f41aa!=_0x409c80([0x56,0x61,0x6c,0x69,0x64])&&_0x3f24ae(_0x9f41aa);},_0x2999c5);}):_0x12d9a6||_0x2078a6||_0x409c80([0x56,0x61,0x6c,0x69,0x64]);}}function _0x3bd47e(_0x1ff169,_0x565e3f){return new window[(_0x409c80([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x213f9e=>{if(_0x58c223())return _0x213f9e(_0x409c80([0x56,0x61,0x6c,0x69,0x64]));_0x4c0faf(),_0x24214a[_0x409c80([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x409c80([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3f2356=!0x1;const _0x938219=_0x35b195();function _0x440726(_0x1fee2a){return!!_0x1fee2a&&(typeof _0x1fee2a===_0x409c80([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1fee2a===_0x409c80([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1fee2a[_0x409c80([0x74,0x68,0x65,0x6e])]===_0x409c80([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1fee2a[_0x409c80([0x63,0x61,0x74,0x63,0x68])]===_0x409c80([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x827594(_0x2cd7db){_0x25973c(_0x2cd7db)[_0x409c80([0x74,0x68,0x65,0x6e])](_0x77163b=>{if(!_0x77163b||_0x77163b[_0x409c80([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x409c80([0x6f,0x6b]))return _0x409c80([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x839a74(_0x17b222(_0x938219+_0x565e3f))!=_0x77163b[_0x409c80([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x409c80([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x409c80([0x56,0x61,0x6c,0x69,0x64]);})[_0x409c80([0x74,0x68,0x65,0x6e])](_0x3c4f07=>(_0x36ab61(),_0x3c4f07),()=>{const _0x14fd25=_0x5bc9d7();return null==_0x14fd25?(_0x36ab61(),_0x409c80([0x56,0x61,0x6c,0x69,0x64])):_0x409c80(_0x24080d-_0x14fd25>(0x5a5e4989^_0x2af3fe)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x409c80([0x74,0x68,0x65,0x6e])](_0x213f9e)[_0x409c80([0x63,0x61,0x74,0x63,0x68])](()=>{_0x213f9e(_0x409c80([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x245179=0x7e642309^_0x2af3fe;function _0x36ab61(){const _0xa7db48=_0x409c80([0x6c,0x6c,0x63,0x74,0x2d])+_0x839a74(_0x17b222(_0x1ff169)),_0x3eeafa=_0x31b897(_0x839a74(window[_0x409c80([0x4d,0x61,0x74,0x68])][_0x409c80([0x63,0x65,0x69,0x6c])](_0x24080d/_0x245179)));window[_0x409c80([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x409c80([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xa7db48,_0x3eeafa);}function _0x5bc9d7(){const _0x289f6e=_0x409c80([0x6c,0x6c,0x63,0x74,0x2d])+_0x839a74(_0x17b222(_0x1ff169)),_0x2a6a1f=window[_0x409c80([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x409c80([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x289f6e);return _0x2a6a1f?window[_0x409c80([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x31b897(_0x2a6a1f),0x10)*_0x245179:null;}function _0x25973c(_0x57f166){return new window[(_0x409c80([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x349346,_0x2edc11)=>{_0x57f166[_0x409c80([0x74,0x68,0x65,0x6e])](_0x349346,_0x2edc11),window[_0x409c80([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2edc11,0x7e531949^_0x2af3fe);});}}_0x24214a[_0x409c80([0x6f,0x6e])](_0x409c80([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x341bcb,_0x56c3fa)=>{if(_0x56c3fa[0x0]!=_0x1ff169)return _0x213f9e(_0x409c80([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x56c3fa[0x1]={..._0x56c3fa[0x1],[_0x409c80([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x938219};},{[_0x409c80([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x409c80([0x68,0x69,0x67,0x68])}),_0x24214a[_0x409c80([0x6f,0x6e])](_0x409c80([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x41e33c=>{_0x440726(_0x41e33c[_0x409c80([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3f2356=!0x0,_0x827594(_0x41e33c[_0x409c80([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x409c80([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x409c80([0x6c,0x6f,0x77])}),_0x4b535c[_0x409c80([0x74,0x68,0x65,0x6e])](()=>{_0x3f2356||_0x213f9e(_0x409c80([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x58c223(){return _0x24214a[_0x409c80([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x409c80([0x76,0x69,0x65,0x77])][_0x409c80([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x409c80([0x61,0x75,0x74,0x6f]);}function _0x4c0faf(){_0x24214a[_0x409c80([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x409c80([0x76,0x69,0x65,0x77])][_0x409c80([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x409c80([0x61,0x75,0x74,0x6f]);}}function _0x212c65(_0x2f4b9f){const _0x3486c6=[new window[(_0x409c80([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x347e27=>setTimeout(_0x347e27,0x7e5bf345^_0x2af3fe)),_0x4b535c[_0x409c80([0x74,0x68,0x65,0x6e])](()=>new window[(_0x409c80([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x14e488=>{let _0x54cd48=0x0;_0x24214a[_0x409c80([0x6d,0x6f,0x64,0x65,0x6c])][_0x409c80([0x6f,0x6e])](_0x409c80([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x4161cb,_0x4a97b5)=>{_0x4a97b5[0x0][_0x409c80([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x54cd48++,_0x54cd48==(0x7e52cc71^_0x2af3fe)&&(_0x14e488(),_0x4161cb[_0x409c80([0x6f,0x66,0x66])]());});}))];return window[_0x409c80([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x409c80([0x72,0x61,0x63,0x65])](_0x3486c6)[_0x409c80([0x74,0x68,0x65,0x6e])](()=>_0x2f4b9f);}async function _0x40826f(){await _0x4b535c,_0x24214a[_0x409c80([0x6d,0x6f,0x64,0x65,0x6c])][_0x409c80([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x219f59,_0x24214a[_0x409c80([0x6d,0x6f,0x64,0x65,0x6c])][_0x409c80([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x219f59,_0x24214a[_0x409c80([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x409c80([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x5cfd5e(){return _0xcea335(_0x409c80([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x2c7c47(_0x409c80([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x409c80([0x73,0x74,0x61,0x74,0x65])]==_0x409c80([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x59380e(){return _0xcea335(_0x409c80([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 _0x862d15(){return _0xcea335(_0x409c80([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x23a8b9(_0x2c4d69){const _0x5ea185=_0x39952c();_0x24214a[_0x5ea185]=_0x409c80([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2c4d69,_0x2c4d69!=_0x409c80([0x56,0x61,0x6c,0x69,0x64])&&_0x40826f();}function _0x39952c(){const _0x1ebfae=window[_0x409c80([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x409c80([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x409c80([0x6e,0x6f,0x77])]())[_0x409c80([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x409c80([0x2e]),'');let _0x1d7464=_0x409c80([0x44]);for(let _0x2f30e2=0x0;_0x2f30e2<_0x1ebfae[_0x409c80([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2f30e2+=0x2){let _0x3d032f=window[_0x409c80([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1ebfae[_0x409c80([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2f30e2,_0x2f30e2+0x2));_0x3d032f>=_0x10ff57[_0x409c80([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x3d032f-=_0x10ff57[_0x409c80([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1d7464+=_0x10ff57[_0x3d032f];}return _0x1d7464;}function _0x1c8645(){const _0x469300=_0x10ebaf[_0x409c80([0x73,0x70,0x6c,0x69,0x74])](_0x409c80([0x2e]));if(0x3!=_0x469300[_0x409c80([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x475483(_0x469300[0x1]);function _0x475483(_0x5e4ee7){const _0x458bbc=_0x37b5bb(_0x5e4ee7);return _0x458bbc&&_0x31599d()?_0x458bbc:null;function _0x31599d(){const _0x2e4ab5=_0x458bbc[_0x409c80([0x6a,0x74,0x69])],_0x183096=window[_0x409c80([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2e4ab5[_0x409c80([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2e4ab5[_0x409c80([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x3529e3={..._0x458bbc,[_0x409c80([0x6a,0x74,0x69])]:_0x2e4ab5[_0x409c80([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2e4ab5[_0x409c80([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x3529e3[_0x409c80([0x76,0x63])],_0x17b222(_0x3529e3)==_0x183096;}}}async function _0x3ac262(){let _0x28970d=!0x0;try{const _0x89bc5b=_0x10ebaf[_0x409c80([0x73,0x70,0x6c,0x69,0x74])](_0x409c80([0x2e])),[_0x47ec08,_0x269d4c,_0x511eaf]=_0x89bc5b;return _0x4ebcd8(_0x47ec08),await _0x47d041(_0x47ec08,_0x269d4c,_0x511eaf),_0x28970d;}catch{return!0x1;}function _0x4ebcd8(_0x144399){const _0x3533a6=_0x37b5bb(_0x144399);_0x3533a6&&_0x3533a6[_0x409c80([0x61,0x6c,0x67])]==_0x409c80([0x45,0x53,0x32,0x35,0x36])||(_0x28970d=!0x1);}async function _0x47d041(_0x22dae7,_0x540a8d,_0x24c32a){const _0x5db1ec=window[_0x409c80([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x409c80([0x66,0x72,0x6f,0x6d])](_0x10a46f(_0x24c32a),_0x653181=>_0x653181[_0x409c80([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1899df=new window[(_0x409c80([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x409c80([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x22dae7+_0x409c80([0x2e])+_0x540a8d),_0x50c0a5=window[_0x409c80([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x409c80([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x50c0a5)return;const _0x2526a6=await _0x50c0a5[_0x409c80([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x409c80([0x6a,0x77,0x6b]),_0x212ecb,{[_0x409c80([0x6e,0x61,0x6d,0x65])]:_0x409c80([0x45,0x43,0x44,0x53,0x41]),[_0x409c80([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x409c80([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x409c80([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x50c0a5[_0x409c80([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x409c80([0x6e,0x61,0x6d,0x65])]:_0x409c80([0x45,0x43,0x44,0x53,0x41]),[_0x409c80([0x68,0x61,0x73,0x68])]:{[_0x409c80([0x6e,0x61,0x6d,0x65])]:_0x409c80([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x2526a6,_0x5db1ec,_0x1899df)||(_0x28970d=!0x1);}}function _0x37b5bb(_0x4a401a){return _0x4a401a[_0x409c80([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x409c80([0x65,0x79]))?JSON[_0x409c80([0x70,0x61,0x72,0x73,0x65])](_0x10a46f(_0x4a401a)):null;}function _0x10a46f(_0x4c447d){return window[_0x409c80([0x61,0x74,0x6f,0x62])](_0x4c447d[_0x409c80([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x409c80([0x2b]))[_0x409c80([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x409c80([0x2f])));}function _0x17b222(_0x4e4dab){let _0x282878=0x1505;function _0x1a09a4(_0x426878){for(let _0x169c8a=0x0;_0x169c8a<_0x426878[_0x409c80([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x169c8a++){const _0x1103b1=_0x426878[_0x409c80([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x169c8a);_0x282878=(_0x282878<<0x5)+_0x282878+_0x1103b1,_0x282878&=_0x282878;}}function _0x54c66e(_0x5b8dd9){Array[_0x409c80([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5b8dd9)?_0x5b8dd9[_0x409c80([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x54c66e):_0x5b8dd9&&typeof _0x5b8dd9==_0x409c80([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x409c80([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5b8dd9)[_0x409c80([0x73,0x6f,0x72,0x74])]()[_0x409c80([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1476fc,_0x375e5f])=>{_0x1a09a4(_0x1476fc),_0x54c66e(_0x375e5f);}):_0x1a09a4(window[_0x409c80([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5b8dd9));}return _0x54c66e(_0x4e4dab),_0x282878>>>0x0;}function _0x839a74(_0x4b82d8){return _0x4b82d8[_0x409c80([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x409c80([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x409c80([0x30]));}function _0x31b897(_0x266061){return _0x266061[_0x409c80([0x73,0x70,0x6c,0x69,0x74])]('')[_0x409c80([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x409c80([0x6a,0x6f,0x69,0x6e])]('');}function _0xcea335(_0xa0da6e){return _0x24214a[_0x409c80([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x409c80([0x68,0x61,0x73])](_0xa0da6e);}function _0x2c7c47(_0x46ac4a){return _0x24214a[_0x409c80([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x409c80([0x67,0x65,0x74])](_0x46ac4a);}function _0x219f59(){}function _0x409c80(_0x50e847){return _0x50e847['map'](_0x30ead6=>String['fromCharCode'](_0x30ead6))['join']('');}_0x23a8b9(await _0x42111d());}(this);}['destroy'](){const _0x3ec9cc=this['editor']['plugins']['get'](o),_0x2b9564=this['editor']['config']['get']('collaboration.channelId');for(const _0x2ad199 of _0x3ec9cc['getCommentThreads']({'channelId':_0x2b9564}))_0x3ec9cc['_detachCommentThread'](_0x2ad199['id']),_0x3ec9cc['_threads']['delete'](_0x2ad199['id']);super['destroy']();}['hasMarkerForId'](_0x2e18b1){return this['getAllMarkersForId'](_0x2e18b1)['length']>0x0;}['getAllMarkersForId'](_0xe6505e){const _0x74a207=[];for(const _0x5ec6c of this['editor']['model']['markers'])_0x5ec6c['name']['startsWith']('comment:'+_0xe6505e)&&_0x74a207['push'](_0x5ec6c);return _0x74a207;}['scrollToThreadMarker'](_0x101daf){const _0x23a900=this['_getTargetForId'](_0x101daf);_0x23a900&&setTimeout(()=>{this['activeMarker']&&er(this['activeMarker'])['id']===_0x101daf&&rt({'target':_0x23a900[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x2d11b2){this['editor']['model']['change'](()=>{for(const _0x4d1728 of this['getAllMarkersForId'](_0x2d11b2))this['editor']['editing']['reconvertMarker'](_0x4d1728);});}['_attachArchivedThread'](_0x363fe1){const _0x498f3a=this['editor']['plugins']['get'](o),_0xee5f43=this['editor']['plugins']['get'](P),_0x1abbc5=_0x498f3a['getCommentThread'](_0x363fe1);if(!_0x1abbc5['isAttached']){const _0xbd6725=_0x1abbc5['attachTo'](()=>this['_getTargetForId'](_0x1abbc5['id']));_0xee5f43['registerAnnotation'](_0xbd6725),_0x1abbc5['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x44c004=this['editor'],_0x1ceaea=_0x44c004['plugins']['get'](it);_0x44c004['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x426fb3,_0x1f1b95)=>{const {id:_0x27e5cd}=er(_0x426fb3['markerName']),_0x54ca27=_0x44c004['plugins']['get'](o)['getCommentThread'](_0x27e5cd),_0x21c9ac=this['activeMarker']&&er(this['activeMarker'])['id']===_0x27e5cd;let _0x11c4e7;if(_0x54ca27&&_0x54ca27['isResolved']&&!_0x21c9ac&&_0x426fb3['item'])return _0x1f1b95['consumable']['consume'](_0x426fb3['item'],'addMarker:'+_0x426fb3['markerName']),_0x1f1b95['consumable']['consume'](_0x426fb3['item'],'removeMarker:'+_0x426fb3['markerName']),null;const _0x4c8cfc=['ck-comment-marker'];return _0x21c9ac&&_0x4c8cfc['push']('ck-comment-marker--active'),_0x11c4e7=_0x54ca27?.['length']?_0x54ca27['comments']['first']['author']['id']:_0x1ceaea['me']['id'],{'classes':_0x4c8cfc,'attributes':{'data-comment':_0x27e5cd,'data-author-id':_0x11c4e7}};}}),_0x44c004['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x4bc8d9,{options:_0x117c9f})=>{if(_0x117c9f['showCommentHighlights'])return null;const _0x405a1d=_0x44c004['plugins']['get'](o),_0x303cdf=_0x44c004['model']['markers']['get'](_0x4bc8d9),{id:_0x27c666,part:_0x591cdb}=er(_0x4bc8d9);return _0x303cdf&&!_0x303cdf['affectsData']||_0x117c9f['ignoreResolvedComments']&&_0x405a1d['getCommentThread'](_0x27c666)?.['isResolved']?null:{'group':'comment','name':_0x591cdb?_0x27c666+':'+_0x591cdb:_0x27c666};}}),_0x44c004['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x31a88c,{writer:_0x35add3})=>_0x35add3['createElement']('$marker',{'data-name':'comment:'+_0x31a88c['getAttribute']('id')})}),_0x44c004['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x223896=this['editor'],_0x5983a7=_0x223896['plugins']['get'](o),_0x72e506=new Set(),_0x172df5=new Set();_0x223896['model']['document']['registerPostFixer'](_0x6630df=>{let _0x623934=!0x1;for(const {name:_0x30ee84,data:_0x2c1aae}of _0x223896['model']['document']['differ']['getChangedMarkers']()){const {group:_0xcba618,id:_0x59d590}=er(_0x30ee84);let _0x30e374=_0x2c1aae['newRange'];if('comment'!==_0xcba618||!_0x30e374)continue;const _0x8a1caa='$graveyard'===_0x30e374['root']['rootName'];_0x8a1caa||(_0x30e374=dt(_0x30e374,_0x223896['model']),!_0x30e374||_0x30e374['isCollapsed']||!_0x2c1aae['newRange']||_0x30e374['isEqual'](_0x2c1aae['newRange']))?_0x223896['model']['hasContent'](_0x30e374)&&!_0x8a1caa?this['isThreadsLoadingPaused']?_0x72e506['add'](_0x30ee84):this['_handleThreadMarker'](_0x30ee84,_0x59d590):(_0x172df5['add'](_0x30ee84),_0x72e506['delete'](_0x30ee84),_0x6630df['removeMarker'](_0x30ee84),_0x623934=!0x0):(_0x6630df['updateMarker'](_0x30ee84,{'range':_0x30e374}),_0x623934=!0x0);}return _0x623934;}),this['on']('change:isThreadsLoadingPaused',(_0x26e3ab,_0x1ee197,_0x4ba45d)=>{if(!_0x4ba45d&&_0x72e506['size'])for(const _0x4d821f of _0x72e506){const {id:_0x3021bd}=er(_0x4d821f);_0x72e506['delete'](_0x4d821f),_0x223896['model']['markers']['get'](_0x4d821f)&&this['_handleThreadMarker'](_0x4d821f,_0x3021bd);}}),this['listenTo'](_0x223896['model']['document'],'change',()=>{for(const {name:_0x305ac6,data:{newRange:_0x83b41e}}of _0x223896['model']['document']['differ']['getChangedMarkers']()){const {group:_0x84ebfd,id:_0x2d1867}=er(_0x305ac6);if('comment'!==_0x84ebfd)continue;const _0xf97f06=_0x5983a7['getCommentThread'](_0x2d1867),_0xc8685d=this['hasMarkerForId'](_0x2d1867);_0xf97f06&&(!_0xf97f06['_hasTargetInContent']&&_0x83b41e&&_0x223896['editing']['view']['once']('render',()=>{const _0x4ff46d=_0x223896['plugins']['get'](O),_0xdc0943=_0x5983a7['_threadToController']['get'](_0xf97f06)['view'];_0x4ff46d['getByInnerView'](_0xdc0943)['refreshVisibility']();},{'priority':'low'}),_0xf97f06['_hasTargetInContent']=_0xc8685d||!!_0x83b41e),_0x83b41e||(_0x172df5['add'](_0x305ac6),_0x72e506['delete'](_0x305ac6));}for(const _0x4d6391 of _0x172df5){const {id:_0x45c12a}=er(_0x4d6391),_0x1f93e3=_0x5983a7['getCommentThread'](_0x45c12a);if(_0x72e506['delete'](_0x4d6391),!_0x1f93e3)continue;const _0x571534=this['hasMarkerForId'](_0x45c12a);_0x571534||_0x1f93e3['isSubmitted']?_0x571534||_0x1f93e3['unlinkedAt']||_0x1f93e3['setUnlinkedAt'](new Date()):_0x1f93e3['remove']();}_0x172df5['clear']();});}['_handleInitialThreads'](_0x1d0710){_0x1d0710['forEach'](_0x36567f=>{_0x36567f['unlinkedAt']&&this['_attachArchivedThread'](_0x36567f['id']);});}['_getTargetForId'](_0x5b7ad6){const _0x507fb6=this['editor'],_0x304f08=this['getAllMarkersForId'](_0x5b7ad6);return et(_0x507fb6['editing'],_0x304f08);}['_getTextContext'](_0x449e13){const _0x2953d0=this['getAllMarkersForId'](_0x449e13);let _0x25f372='',_0x45a966=!0x1;for(const _0x1b38c7 of _0x2953d0){const _0x1ee8b1=_0x1b38c7['getRange']();for(const _0x3d2f8f of Array['from'](_0x1ee8b1['getItems']()))_0x3d2f8f['is']('$textProxy')?(_0x25f372&&_0x45a966&&(_0x25f372+='\x20',_0x45a966=!0x1),_0x25f372+=_0x3d2f8f['data']):_0x45a966=!0x0;_0x45a966=!0x0;}return _0x25f372['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x23b206,_0x569f23){const _0xb6092f=this['editor'],_0x1e2f06=_0xb6092f['plugins']['get'](o);let _0x8ab955=_0x1e2f06['getCommentThread'](_0x569f23);const _0x3cabca=_0xb6092f['config']['get']('collaboration.channelId'),_0x2626b0=_0xb6092f['plugins']['get'](P);if(_0x8ab955&&(_0x8ab955['unlinkedAt']&&_0x8ab955['setUnlinkedAt'](null),_0x8ab955['isAttached']))return _0x8ab955;return!this['getAllMarkersForId'](_0x569f23)[0x0]['managedUsingOperations']?_0xb6092f['editing']['view']['once']('render',()=>{if(_0x1e2f06['getCommentThread'](_0x569f23))return;const _0x9c31bc=_0xb6092f['plugins']['get'](O);_0x8ab955=_0x1e2f06['openNewCommentThread']({'channelId':_0x3cabca,'threadId':_0x569f23,'target':()=>this['_getTargetForId'](_0x569f23),'context':{'type':'text','value':this['_getTextContext'](_0x569f23)}});const _0x3f2fde=_0x1e2f06['_threadToController']['get'](_0x8ab955)['view'],_0x4234d9=_0x9c31bc['getByInnerView'](_0x3f2fde);_0x4234d9&&_0x2626b0['registerAnnotation'](_0x4234d9);},{'priority':'low'}):_0x1e2f06['fetchCommentThread']({'channelId':_0x3cabca,'threadId':_0x569f23})['then'](_0x5706bb=>{if('destroyed'!==_0xb6092f['state']){if(_0x8ab955=_0x5706bb,_0x8ab955&&!_0x8ab955['isAttached']){const _0xebd616=_0x8ab955['attachTo'](()=>this['_getTargetForId'](_0x569f23));_0x2626b0['registerAnnotation'](_0xebd616),_0x8ab955['isResolved']&&this['_reconvertMarkers'](_0x569f23);}else{if(!_0x8ab955){const _0x44ca27=this['getAllMarkersForId'](_0x569f23);_0xb6092f['model']['change'](_0x11c4a2=>{for(const _0x2308a4 of _0x44ca27)_0x11c4a2['removeMarker'](_0x2308a4);});}}}}),_0x8ab955;}['_handleThreadMarker'](_0x30d29e,_0x3e0a8d){const _0x1bb188=this['_attachMarkerToThread'](_0x30d29e,_0x3e0a8d);_0x1bb188&&!_0x1bb188['context']&&_0x1bb188['setContext']({'type':'text','value':this['_getTextContext'](_0x3e0a8d)});}['_initAriaMarkerChangeAnnouncements'](){const _0x42a801=this['editor'];ot(_0x42a801['model'],({left:_0x10da15,entered:_0x29394a})=>{for(const _0x188dd2 of _0x10da15)if(mt(_0x188dd2)){_0x42a801['ui']['ariaLiveAnnouncer']['announce'](E(_0x42a801['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x9d7798 of _0x29394a)if(mt(_0x9d7798)){_0x42a801['ui']['ariaLiveAnnouncer']['announce'](E(_0x42a801['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x3160c7)));break;}});}}function ft(_0x80c2d,_0x54d403){return _0x54d403?_0x80c2d+':'+_0x54d403:_0x80c2d;}function er(_0x21d915){const _0x5b043b=_0x21d915['split'](':');return{'group':_0x5b043b[0x0],'id':_0x5b043b[0x1],'part':_0x5b043b[0x2]};}function dt(_0x3cdac5,_0x165847){const _0x3791db=_0x165847['schema'],_0xe1c26a=_0x165847['createRange'](_0x3cdac5['start']);for(const _0x3f0088 of _0x3cdac5['getWalker']()){const {type:_0x41f02a,item:_0x376050,nextPosition:_0x433b16}=_0x3f0088;if('text'===_0x41f02a||_0x3791db['isObject'](_0x376050)){const _0x37461d=_0x165847['createPositionBefore'](_0x376050);_0xe1c26a['isCollapsed']&&(_0xe1c26a['start']=_0x37461d),_0xe1c26a['end']=_0x433b16;}}return _0xe1c26a;}function mt(_0x5c245c){return'comment'===er(_0x5c245c['name'])['group'];}class i extends _0x411e57{['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 _0x41448d=this['editor'],_0x1cdfea=_0x41448d['plugins']['get'](o),_0x1e14c6=_0x41448d['plugins']['get'](r),_0x4cac51=_0x41448d['plugins']['get'](O),_0x263c83=_0x41448d['plugins']['get'](P);_0x41448d['ui']['componentFactory']['add']('comment',()=>{const _0x7510d2=this['_createUIButton'](_0x6a7993);return _0x7510d2['tooltip']=!0x0,_0x7510d2;}),_0x41448d['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0xb8bbcc)),_0x263c83['addSourceCollector'](()=>{const _0x3264e5=[];for(const [_0x2a6a50,_0x57556a]of _0x1cdfea['_threadToController']){const _0x52b1bc=_0x1e14c6['getAllMarkersForId'](_0x2a6a50['id']),_0x1a8f37=_0x52b1bc['map'](_0x49f611=>_0x49f611['getRange']());_0x52b1bc['length']>0x0&&_0x3264e5['push']([_0x57556a['view'],_0x1a8f37]);}return _0x3264e5;}),this['listenTo'](_0x4cac51,'change:activeAnnotations',(_0x37c184,_0x270a18,_0xddc8f)=>{const _0xf7d612=Array['from'](_0xddc8f)['map'](_0xbfeef8=>_0xbfeef8['innerView'])['find'](_0x4f5df9=>_0x1cdfea['_viewToController']['has'](_0x4f5df9));if(!_0xf7d612)return void(_0x1e14c6['activeMarker']=null);const _0x4882ab=_0x1cdfea['_viewToController']['get'](_0xf7d612)['model']['id'],_0x2a0be9='comment:'+_0x4882ab;_0x4882ab&&_0x1e14c6['hasMarkerForId'](_0x4882ab)?_0x1e14c6['activeMarker']=_0x2a0be9:_0x1e14c6['activeMarker']&&(_0x1e14c6['activeMarker']=null);}),this['listenTo'](_0x1cdfea,'removeCommentThread',(_0x5721b3,{threadId:_0x2fa847,isFromAdapter:_0x36f8ce})=>{!_0x36f8ce&&_0x41448d['ui']['focusTracker']['isFocused']&&_0x1e14c6['hasMarkerForId'](_0x2fa847)&&_0x41448d['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x1cdfea,'addComment',(_0x16481d,{threadId:_0x57bf09,isFromAdapter:_0x22770b})=>{if(_0x22770b||!_0x1e14c6['hasMarkerForId'](_0x57bf09)||!_0x1cdfea['hasCommentThread'](_0x57bf09))return;0x1===_0x1cdfea['getCommentThread'](_0x57bf09)['length']&&(_0x41448d['editing']['view']['focus'](),_0x16481d['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x272930=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4c5fdd;for(const _0x28c0aa in _0x272930){const _0xee3b90=_0x28c0aa,_0x46de68=_0x272930[_0xee3b90];if('commentsLicenseKeyValid'==_0x46de68||'commentsLicenseKeyInvalid'==_0x46de68||'commentsLicenseKeyExpired'==_0x46de68||'commentsLicenseKeyDomainLimit'==_0x46de68||'commentsLicenseKeyNotAllowed'==_0x46de68||'commentsLicenseKeyEvaluationLimit'==_0x46de68||'commentsLicenseKeyTrialLimit'==_0x46de68||'commentsLicenseKeyUsageLimit'==_0x46de68){delete _0x272930[_0xee3b90],_0x4c5fdd=_0x46de68,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x4c5fdd&&_0x272930['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x4c5fdd&&_0x272930['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x4c5fdd&&_0x272930['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x4c5fdd&&_0x272930['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x4c5fdd&&_0x272930['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x4c5fdd&&_0x272930['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x4c5fdd&&_0x272930['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x51dbca){const _0x4ab1c8=this['editor'],_0x18fee3=new _0x51dbca(_0x4ab1c8['locale']),_0x360c3b=_0x4ab1c8['commands']['get']('addCommentThread');return _0x18fee3['set']({'label':E(_0x4ab1c8['locale'],'Comment'),'icon':_0x3924b4}),_0x18fee3['bind']('isEnabled')['to'](_0x360c3b),this['listenTo'](_0x18fee3,'execute',()=>{_0x360c3b['execute']();}),_0x18fee3;}}class s extends _0x411e57{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x3c24ac){super(_0x3c24ac),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x4f2054,_0x180af3,_0x5ae1ef)=>{_0x5ae1ef?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x222bc2,_0x3874e6]of this['editor']['commands'])_0x3874e6['affectsData']&&'addCommentThread'!==_0x222bc2&&_0x3874e6['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 _0x174e1e=this['editor']['editing']['view']['document'];this['listenTo'](_0x174e1e,'cut',_0x5a5a43=>_0x5a5a43['stop'](),{'priority':'highest'}),this['listenTo'](_0x174e1e,'clipboardInput',_0xffdfc=>_0xffdfc['stop'](),{'priority':'highest'}),this['listenTo'](_0x174e1e,'delete',_0x1427a6=>_0x1427a6['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x261d68,_0x346a35]of this['editor']['commands'])_0x346a35['affectsData']&&'addCommentThread'!==_0x261d68&&_0x346a35['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 _0x1eed03{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[O];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3f1144){super(_0x3f1144),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x147646=this['context']['plugins']['get'](O);this['listenTo'](_0x147646,'_activateAnnotation',(_0x5ad17a,_0x569561)=>{for(const _0x542fed of this['activeUIs']){const _0x3864af=this['_uis']['get'](_0x542fed);(0x0,this['uisData']['get'](_0x542fed)['filter'])(_0x569561)&&_0x3864af['setActiveAnnotation'](_0x569561);}}),this['listenTo'](_0x147646,'_deactivateAllAnnotations',()=>{for(const _0x9138ea of this['activeUIs']){this['_uis']['get'](_0x9138ea)['setActiveAnnotation'](null);}}),this['listenTo'](_0x147646['_visibleAnnotations'],'add',(_0x2887fd,_0x442cfe)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x442cfe);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x49ba75){return this['activeUIs']['has'](_0x49ba75);}['activate'](_0x49af27,_0x548719=this['defaultFilter']){const _0x188b4e=this['context']['plugins']['get'](O);if(!this['_uis']['has'](_0x49af27))throw new _0x50ccf8('annotationsuis-missing-ui',this,{'uiName':_0x49af27});this['isActive'](_0x49af27)&&this['deactivate'](_0x49af27),this['activeUIs']['add'](_0x49af27);const _0x218cc7=new _();!function({source:_0x3ffba5,target:_0x2c5fb7,filter:_0x421727}){for(const _0x2823e0 of _0x3ffba5)_0x421727(_0x2823e0)&&_0x2c5fb7['add'](_0x2823e0);_0x2c5fb7['listenTo'](_0x3ffba5,'add',(_0x5ecf90,_0x2590da)=>{_0x421727(_0x2590da)&&_0x2c5fb7['add'](_0x2590da);}),_0x2c5fb7['listenTo'](_0x3ffba5,'remove',(_0x3006e5,_0x30b403)=>{_0x2c5fb7['has'](_0x30b403)&&_0x2c5fb7['remove'](_0x30b403);});}({'source':_0x188b4e['_visibleAnnotations'],'target':_0x218cc7,'filter':_0x548719}),this['uisData']['set'](_0x49af27,{'collection':_0x218cc7,'filter':_0x548719});const _0x360a06=this['_uis']['get'](_0x49af27);_0x360a06['attach'](_0x218cc7),this['listenTo'](_0x360a06,'change:activeAnnotation',(_0x30c5d8,_0x45386c,_0x2cee22,_0x191479)=>{_0x191479&&_0x188b4e['_removeActiveAnnotation'](_0x191479),_0x2cee22&&_0x188b4e['_addActiveAnnotation'](_0x2cee22);});}['deactivate'](_0x587119){if(this['activeUIs']['delete'](_0x587119),!this['_uis']['has'](_0x587119))throw new _0x50ccf8('annotationsuis-missing-ui',this,{'uiName':_0x587119});const _0xe0249a=this['_uis']['get'](_0x587119);_0xe0249a['detach'](),this['stopListening'](_0xe0249a),this['uisData']['get'](_0x587119)['collection']['destroy'](),this['uisData']['delete'](_0x587119);}['switchTo'](_0x1b98b1){if(!this['_uis']['has'](_0x1b98b1))throw new _0x50ccf8('annotationsuis-missing-ui',this,{'uiName':_0x1b98b1});const _0x164be7=this['context']['plugins']['get'](O),_0x495fad=Array['from'](_0x164be7['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x1b98b1);const _0x1283ba=this['_uis']['get'](_0x1b98b1);_0x1283ba['setActiveAnnotation'](_0x495fad),_0x1283ba['_setSelectedAnnotations']&&_0x495fad&&_0x1283ba['_setSelectedAnnotations']([_0x495fad]);}['deactivateAll'](){for(const _0x79cd55 of this['activeUIs'])this['deactivate'](_0x79cd55);}['register'](_0x255344,_0x2c8ce4){if(this['_uis']['has'](_0x255344))throw new _0x50ccf8('annotationsuis-register-already-registered');if('function'!=typeof _0x2c8ce4['attach']||'function'!=typeof _0x2c8ce4['detach']||'function'!=typeof _0x2c8ce4['setActiveAnnotation'])throw new _0x50ccf8('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x255344,_0x2c8ce4);}['refilterAnnotations'](){const _0x1033ff=this['context']['plugins']['get'](O)['collection'],_0x294623=new Map(),_0x1f90fe=Array['from'](this['activeUIs']);for(const _0x239edb of this['activeUIs']){const _0x59d388=this['uisData']['get'](_0x239edb)['collection'];for(const _0x5d2296 of _0x59d388)_0x294623['set'](_0x5d2296,_0x239edb);}for(const _0x2ff71c of _0x1033ff){const _0x417e03=_0x294623['get'](_0x2ff71c);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2ff71c);const _0x4d3d7b=_0x1f90fe['find'](_0x1df1cf=>this['uisData']['get'](_0x1df1cf)['filter'](_0x2ff71c));_0x417e03!==_0x4d3d7b&&(_0x417e03&&this['uisData']['get'](_0x417e03)['collection']['remove'](_0x2ff71c),_0x4d3d7b&&this['uisData']['get'](_0x4d3d7b)['collection']['add'](_0x2ff71c));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xd3fd9){const _0x1d3cbb=[];for(const _0x2a009b of this['activeUIs']){(0x0,this['uisData']['get'](_0x2a009b)['filter'])(_0xd3fd9)&&_0x1d3cbb['push'](_0x2a009b);}if(_0x1d3cbb['length']>0x1)throw new _0x50ccf8('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x1d3cbb,'annotationType':_0xd3fd9['type']});}}const pi=xt('px');class F extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x265449){super(_0x265449);const _0x3735ee=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 _0x358b9a(),this['focusCycler']=new _0x473434({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x3735ee['to']('class')],'style':{'minHeight':_0x3735ee['to']('minHeight',_0x27ea0f=>'number'==typeof _0x27ea0f?pi(_0x27ea0f+0xa):null)},'dir':_0x265449['uiLanguageDirection'],'role':'application','aria-label':E(_0x265449,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':E(_0x265449,'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',_0x23ed34=>{this['_updateItemPositionInFocusables'](_0x23ed34['source']);}),this['list']['forEach'](_0x1044ee=>{this['focusTracker']['add'](_0x1044ee['element']),this['_updateItemPositionInFocusables'](_0x1044ee);}),this['list']['on']('change',(_0x5af0d9,_0x27857b)=>{for(const _0x4bfaa2 of _0x27857b['removed'])this['focusTracker']['remove'](_0x4bfaa2['element']),this['focusables']['remove'](_0x4bfaa2);for(const _0x336bfd of _0x27857b['added'])this['focusTracker']['add'](_0x336bfd['element']),this['_updateItemPositionInFocusables'](_0x336bfd);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x29d24f){const _0x213e7b=this['focusables']['getIndex'](_0x29d24f);let _0x109d61,_0x2db6ee;for(const _0x144dee of this['focusables'])if(_0x29d24f['top']<_0x144dee['top']){_0x109d61=_0x144dee;break;}if(_0x2db6ee=_0x109d61?this['focusables']['getIndex'](_0x109d61):this['focusables']['length'],-0x1!==_0x213e7b){if(_0x213e7b===_0x2db6ee-0x1)return;this['focusables']['remove'](_0x29d24f),_0x2db6ee=_0x109d61?this['focusables']['getIndex'](_0x109d61):this['focusables']['length'];}this['focusables']['add'](_0x29d24f,_0x2db6ee);}}const Ht=xt('px');class H extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x392430){super(_0x392430),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x2b1049,_0x556684)=>_0x2b1049+_0x556684),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Lt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x3977c2=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x3977c2['to']('isAnimationDisabled',_0x491193=>_0x491193?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x3977c2['to']('top',_0x5a0715=>Ht(_0x5a0715))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x25ba01=this['element']['clientHeight'];_0x25ba01&&(this['height']=_0x25ba01);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x1eed03{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x224a8c){super(_0x224a8c),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 _0x343450=this['context']['config']['get']('sidebar.container');_0x343450&&this['setContainer'](_0x343450);}['setContainer'](_0x2ce02a){if(!y(_0x2ce02a))throw new _0x50ccf8('sidebar-setcontainer-invalid-element');this['container']=_0x2ce02a;}['_attachToContainer']({viewClass:_0x12292e='',spaceBetweenItems:_0x49643e=0x19}={}){if(!y(this['container']))throw new _0x50ccf8('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x12292e,this['_spaceBetweenItems']=_0x49643e;}['rearrange']({removedAnnotation:_0x1ec0b0,previousAnnotation:_0x5d6ed6,nextAnnotation:_0x74dea5}){const _0x2cca4d=this['getSidebarItemView'](_0x1ec0b0);this['view']['list']['remove'](_0x2cca4d),this['_destroySidebarItemView'](_0x1ec0b0),_0x5d6ed6&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x5d6ed6)),_0x74dea5&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x74dea5)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x1c1ae7,activatedAnnotation:_0x2dc3b4,disableAnimationOnActivatedAnnotation:_0x37368b}){if(this['_activeAnnotation']=_0x2dc3b4,_0x1c1ae7){_0x1c1ae7['isActive']=!0x1;const _0x4fcffd=this['getSidebarItemView'](_0x1c1ae7);_0x4fcffd&&_0x37368b&&(_0x4fcffd['isAnimationDisabled']=!0x1);}if(_0x2dc3b4){const _0x1efe29=this['getSidebarItemView'](_0x2dc3b4);_0x1efe29&&(_0x2dc3b4['isActive']=!0x0,_0x37368b&&(_0x1efe29['isAnimationDisabled']=!0x0,_0x1efe29['top']+=0x1),this['_alignToTargetRect'](_0x1efe29));}}['_detachFromContainer'](_0x19026b){if(this['view']['element']['remove'](),_0x19026b){for(const _0x519c60 of _0x19026b)this['_destroySidebarItemView'](_0x519c60);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x2c0141,_0x10f670){_0x10f670||(_0x10f670=_0x2c0141['view']);const _0x2fa221=new H(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x2fa221,_0x2c0141),this['_annotationToSidebarItemView']['set'](_0x2c0141,_0x2fa221),_0x2fa221['content']['add'](_0x10f670),this['listenTo'](_0x2c0141['view'],'change:targetRect',(_0x4ccbed,_0x21ab32,_0x16daf7)=>{const _0xbf7bbf=this['_getTargetTop'](_0x2c0141,_0x16daf7);_0x2fa221['_targetTop']!=_0xbf7bbf&&(_0x2fa221['_targetTop']=_0xbf7bbf,this['_setItemTop'](_0x2fa221,_0xbf7bbf));}),this['listenTo'](_0x2fa221,'change:top',()=>{this['_recalculate'](_0x2fa221,'top');}),this['listenTo'](_0x2fa221,'change:bottom',()=>{this['_recalculate'](_0x2fa221,'bottom');}),this['_alignToTargetRect'](_0x2fa221);const _0x4d5f58=this['_getItemBefore'](_0x2fa221);if(_0x4d5f58)this['_alignAfterItem'](_0x4d5f58,_0x2fa221)||this['_alignToTargetRect'](_0x2fa221);else this['_alignToTargetRect'](_0x2fa221);return this['_updateLastItem'](),this['view']['list']['add'](_0x2fa221),_0x2fa221;}['_alignForTopChange'](_0x2cb4ad){if(!_0x2cb4ad['content']['length'])return;const _0x15b997=this['_getItemBefore'](_0x2cb4ad);if(!_0x15b997)return;const _0x6dde4c=this['_sidebarItemViewToAnnotation']['get'](_0x15b997),_0x395656=this['_activeAnnotation'];_0x395656&&_0x395656===_0x6dde4c?this['_alignAfterItem'](_0x15b997,_0x2cb4ad):this['_alignBeforeItem'](_0x2cb4ad,_0x15b997);}['_alignForBottomChange'](_0x10e1d8){if(!_0x10e1d8['content']['length'])return;const _0x545b03=this['_getItemAfter'](_0x10e1d8);if(!_0x545b03)return;const _0x39c8b6=this['_sidebarItemViewToAnnotation']['get'](_0x545b03),_0x489033=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x53a84d=this['_activeAnnotation'];_0x53a84d&&_0x53a84d===_0x39c8b6&&_0x489033?(this['_alignBeforeItem'](_0x545b03,_0x10e1d8),this['_alignAfterItem'](_0x10e1d8,_0x545b03)):_0x53a84d&&_0x53a84d===_0x39c8b6?this['_alignBeforeItem'](_0x545b03,_0x10e1d8):this['_alignAfterItem'](_0x10e1d8,_0x545b03);}['_recalculate'](_0x459790,_0x11d3d0){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x57acd4,changedProp:_0x331ce6}of this['_recalculateBuffer'])'top'===_0x331ce6?this['_alignForTopChange'](_0x57acd4):this['_alignForBottomChange'](_0x57acd4);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x459790,'changedProp':_0x11d3d0});}['getSidebarItemView'](_0x38bc27){return this['_annotationToSidebarItemView']['get'](_0x38bc27);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x15e7b8){const _0x1f4737=this['getSidebarItemView'](_0x15e7b8);this['stopListening'](_0x1f4737),this['stopListening'](_0x15e7b8['view']),_0x1f4737['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x15e7b8),this['_sidebarItemViewToAnnotation']['delete'](_0x1f4737);}['_createSidebarView'](){const _0x4d46f4=new F(this['context']['locale']);return _0x4d46f4['render'](),this['on']('change:_lastItem',(_0xbebec6,_0x4365e5,_0x32ca9e,_0xb6be09)=>{_0xb6be09&&_0x4d46f4['unbind']('minHeight'),_0x32ca9e?_0x4d46f4['bind']('minHeight')['to'](_0x32ca9e,'bottom'):_0x4d46f4['minHeight']=null;}),_0x4d46f4;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x239787){const _0x2d67f7=this['_sidebarItemViewToAnnotation']['get'](_0x239787),_0x475f4c=_0x2d67f7&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2d67f7)-0x1);return _0x475f4c&&this['getSidebarItemView'](_0x475f4c)||null;}['_getItemAfter'](_0x490571){const _0x3cd438=this['_sidebarItemViewToAnnotation']['get'](_0x490571),_0xbf24fe=_0x3cd438&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x3cd438)+0x1);return _0xbf24fe&&this['getSidebarItemView'](_0xbf24fe)||null;}['_alignBeforeItem'](_0x13a230,_0xd579a5){_0x13a230['updateHeight']();const _0x2ec752=R(_0xd579a5['bottom']+this['_spaceBetweenItems'],_0x13a230['top']);return!!_0x2ec752&&(this['_setItemTop'](_0xd579a5,_0xd579a5['top']-_0x2ec752),!0x0);}['_alignAfterItem'](_0x5e6191,_0x2a5292){_0x5e6191['updateHeight']();const _0x177f26=R(_0x5e6191['bottom']+this['_spaceBetweenItems'],_0x2a5292['top']);return!!_0x177f26&&(this['_setItemTop'](_0x2a5292,_0x2a5292['top']+_0x177f26,!0x1),!0x0);}['_alignToTargetRect'](_0x47f7cb){const _0x12471f=this['_sidebarItemViewToAnnotation']['get'](_0x47f7cb);if(!_0x12471f||!_0x12471f['target']||!_0x12471f['targetRect'])return;const _0x14e9cc=this['_getTargetTop'](_0x12471f,_0x12471f['targetRect']);this['_setItemTop'](_0x47f7cb,_0x14e9cc);}['_getTargetTop'](_0x54d784,_0x2e038b){if(null===_0x2e038b)return 0x0;if(_0x54d784['target']instanceof _0x1cb979)return _0x2e038b['top'];{const _0x397382=new _0x1cb979(this['view']['element'])['top'];return _0x2e038b['top']-_0x397382;}}['_setItemTop'](_0x47fe38,_0x2c932a,_0x17add1=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x17add1&&(_0x2c932a=Math['max'](_0x2c932a,this['_getMaxAvailableTop'](_0x47fe38))),_0x47fe38['top']=_0x2c932a;}['_getMaxAvailableTop'](_0x3860e8){let _0x460d2d=this['_getItemBefore'](_0x3860e8),_0x133c37=0x0;for(;_0x460d2d;)_0x460d2d['updateHeight'](),_0x133c37+=this['_spaceBetweenItems']+_0x460d2d['height'],_0x460d2d=this['_getItemBefore'](_0x460d2d);return _0x133c37;}}function R(_0x1eb937,_0x1f4e4a){return Math['max'](_0x1eb937-_0x1f4e4a,0x0);}function y(_0x58776c){return null!==_0x58776c&&'object'==typeof _0x58776c&&0x1===_0x58776c['nodeType'];}class e extends _0x1eed03{['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(_0x39f8c3){super(_0x39f8c3),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x41b195(),this['_refreshPositioningDebounced']=_0x2aa444(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x129a37=this['context']['plugins']['get'](M),_0x3ef798=this['context']['plugins']['get'](z);_0x129a37['register']('wideSidebar',this),_0x3ef798['container']&&_0x129a37['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x118e19){if(_0x118e19===this['activeAnnotation'])return;const _0xdefdf5=this['context']['plugins']['get'](z);_0xdefdf5['_activeAnnotation']=_0x118e19;const _0x3794bc=this['activeAnnotation'];_0xdefdf5['refresh']({'blurredAnnotation':_0x3794bc,'activatedAnnotation':_0x118e19}),this['activeAnnotation']=_0x118e19;}['attach'](_0x33bbef){this['annotations']=_0x33bbef;const _0x58c4fc=this['context']['plugins']['get'](z);if(_0x58c4fc['_annotations']=_0x33bbef,this['isAttached'])throw new _0x50ccf8('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x58c4fc,'set:container',()=>{this['detach'](),this['listenTo'](_0x58c4fc,'change:container',_0x43993a=>{_0x43993a['off'](),this['attach'](_0x33bbef);});}),_0x58c4fc['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x3c8fb8=_0x1f6b32=>{_0x1f6b32['updateTargetRect'](),_0x58c4fc['addAnnotation'](_0x1f6b32);};for(const _0x1a4afd of _0x33bbef)_0x3c8fb8(_0x1a4afd);this['listenTo'](_0x33bbef,'add',(_0x13ca64,_0x5673a4)=>{_0x3c8fb8(_0x5673a4);}),this['listenTo'](_0x33bbef,'remove',(_0x1d5a11,_0x48eb63,_0x21cb3d)=>{_0x58c4fc['rearrange']({'removedAnnotation':_0x48eb63,'previousAnnotation':_0x33bbef['get'](_0x21cb3d-0x1),'nextAnnotation':_0x33bbef['get'](_0x21cb3d+0x1)}),_0x48eb63===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x33bbef,'focus',(_0x519fd2,_0x26a285)=>{this['setActiveAnnotation'](_0x26a285);}),this['listenTo'](_0x33bbef,'blur',()=>{this['setActiveAnnotation'](null);});const _0xa9bbb=this['context']instanceof _0x269721?this['context']['editors']:new _0x41b195([this['context']]);for(const _0x18165e of _0xa9bbb)this['_integrateWithEditorAnnotations'](_0x18165e);this['listenTo'](_0xa9bbb,'add',(_0x558d5b,_0x39b869)=>{this['listenTo'](_0x39b869,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x39b869);});}),this['listenTo'](_0xa9bbb,'remove',(_0x2c52d3,_0x19d2ec)=>{_0x19d2ec['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x19d2ec['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x50ccf8('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x33bf6e=this['context']['plugins']['get'](z);_0x33bf6e['_detachFromContainer'](this['annotations']),this['stopListening'](_0x33bf6e),this['stopListening'](this['annotations']),this['context']instanceof _0x269721&&this['stopListening'](this['context']['editors']);for(const _0x19c991 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x19c991);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x5d7bba){if(!_0x5d7bba['plugins']['has']('EditorAnnotations'))return;const _0x1b56b4=_0x5d7bba['plugins']['get']('EditorAnnotations'),_0x392707=()=>{const _0x113b22=_0x1b56b4['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x113b22[0x0]||null);};this['listenTo'](_0x1b56b4,'refresh',_0x392707),this['listenTo'](_0x1b56b4,'blur',(_0x1fc6c8,{isAnnotationTracked:_0x315787})=>{this['activeAnnotation']&&_0x315787(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x1b56b4,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0xfab7f9=>{_0x1b56b4['hasDomSelection']()&&(_0x392707(),_0xfab7f9['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x1b56b4);}['_destroyEditorAnnotationsIntegration'](_0x31a0c8){this['stopListening'](_0x31a0c8),this['_editorAnnotations']['remove'](_0x31a0c8);}}class C extends _0x6a7993{['counterView'];constructor(_0x216408){super(_0x216408);const _0x289ca1=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0xc1c964,_0x54f1b2)=>_0xc1c964?'...':_0x54f1b2['toString']()),this['set']('annotationType',''),this['icon']=_0x3924b4,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x289ca1['to']('annotationType',_0x5039a8=>'ck-annotation-counter__badge--'+_0x5039a8),_0x289ca1['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x289ca1['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x1eed03{['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(_0x2340fc){super(_0x2340fc),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x170599),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x41b195(),this['_refreshPositioningDebounced']=_0x2aa444(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0xdebb5c(this['context']['locale']),this['balloonPanelView']=new _0x4392a2(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x5313ca){this['annotations']=_0x5313ca;const _0x56aab2=this['context']['plugins']['get'](z),_0x5ee31e=this['balloonPanelView'];if(_0x56aab2['_annotations']=_0x5313ca,this['isAttached'])throw new _0x50ccf8('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x56aab2,'set:container',()=>{this['detach'](),this['listenTo'](_0x56aab2,'change:container',_0x57de50=>{_0x57de50['off'](),this['attach'](_0x5313ca);});}),_0x56aab2['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x364e05=_0x4bc576=>{const _0x306d9b=new C(this['context']['locale']);_0x56aab2['addAnnotation'](_0x4bc576,_0x306d9b),this['_annotationToNarrowView']['set'](_0x4bc576,_0x306d9b),_0x306d9b['bind']('isDirty','annotationType','number')['to'](_0x4bc576['view'],'isDirty','type','length'),_0x306d9b['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x5ee31e['content']['first']!==_0x4bc576['view']?(this['_showBalloon'](_0x4bc576),_0x4bc576['view']['element']['focus'](),this['setActiveAnnotation'](_0x4bc576)):this['setActiveAnnotation'](null);});};for(const _0x55cf30 of _0x5313ca)_0x364e05(_0x55cf30);this['listenTo'](_0x5313ca,'add',(_0xd87507,_0x2f7b76)=>{_0x364e05(_0x2f7b76);}),this['listenTo'](_0x5313ca,'remove',(_0x646f24,_0x34a509,_0x3a0f0b)=>{this['_annotationToNarrowView']['get'](_0x34a509)['destroy'](),this['_annotationToNarrowView']['delete'](_0x34a509),_0x56aab2['rearrange']({'removedAnnotation':_0x34a509,'previousAnnotation':_0x5313ca['get'](_0x3a0f0b-0x1),'nextAnnotation':_0x5313ca['get'](_0x3a0f0b+0x1)}),_0x34a509===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x5313ca,'focus',(_0x418379,_0x24f459)=>{this['setActiveAnnotation'](_0x24f459);}),this['listenTo'](_0x5313ca,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x430e4b,_0x55ba47)=>{_0x55ba47['keyCode']===_0x4c0db0['esc']&&_0x5ee31e['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x5ee31e['content']['first']),this['_hideBalloon'](),_0x55ba47['stopPropagation'](),_0x55ba47['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x2e39ce,_0x45c7aa)=>{const _0x2d08a3=_0x45c7aa['target'];_0x5ee31e['isVisible']&&_0x5ee31e['element']['contains'](_0x2d08a3)||_0x56aab2['view']['element']['contains'](_0x2d08a3)||_0x2e39ce['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x3cbfc3=>_0x3cbfc3['contains'](_0x2d08a3))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x1d272f=this['context']instanceof _0x269721?this['context']['editors']:new _0x41b195([this['context']]);for(const _0x17c89e of _0x1d272f)this['_integrateWithEditorAnnotations'](_0x17c89e);this['listenTo'](_0x1d272f,'add',(_0x48706f,_0x34e638)=>{this['listenTo'](_0x34e638,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x34e638);});}),this['listenTo'](_0x1d272f,'remove',(_0x323c35,_0x3e63f7)=>{_0x3e63f7['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3e63f7['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x1e4881){if(_0x1e4881===this['activeAnnotation'])return;const _0x374290=this['context']['plugins']['get'](z);if(_0x374290['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x1e4881,'disableAnimationOnActivatedAnnotation':!0x0}),_0x1e4881)_0x374290['getSidebarItemView'](_0x1e4881)?this['_showBalloon'](_0x1e4881):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x1e4881;}['detach'](){if(!this['isAttached'])throw new _0x50ccf8('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x164ddb=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x33f89b=>_0x33f89b['destroy']()),this['_annotationToNarrowView']['clear'](),_0x164ddb['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x269721&&this['stopListening'](this['context']['editors']);for(const _0x45d915 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x45d915);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'](_0x56b853){if(!_0x56b853['plugins']['has']('EditorAnnotations'))return;const _0x55a9f3=_0x56b853['plugins']['get']('EditorAnnotations'),_0x3ee76d=this['context']['plugins']['get'](z),_0x588fc6=this['annotations'],_0x1a0967=this['balloonPanelView'],_0x488bcc=()=>{const _0x24ba46=_0x55a9f3['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x24ba46),this['setActiveAnnotation'](_0x24ba46[0x0]||null);};this['listenTo'](_0x55a9f3,'refresh',_0x488bcc),this['listenTo'](_0x55a9f3,'blur',(_0x586099,{isAnnotationTracked:_0x563797})=>{this['activeAnnotation']&&_0x563797(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x55a9f3,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x588fc6,'blur',_0x338abc=>{_0x55a9f3['hasDomSelection']()&&_0x338abc['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x1b5223,_0x10e8f4)=>{const _0x5c9cc3=_0x10e8f4['target'];_0x1a0967['isVisible']&&_0x1a0967['element']['contains'](_0x5c9cc3)||_0x3ee76d['view']['element']['contains'](_0x5c9cc3)||this['activeAnnotation']&&_0x55a9f3['hasDomSelection']()&&(_0x488bcc(),_0x1b5223['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x55a9f3);}['_destroyEditorAnnotationsIntegration'](_0x29a325){_0x29a325&&(this['stopListening'](_0x29a325),this['_editorAnnotations']['remove'](_0x29a325));}['_setSelectedAnnotations'](_0x5780a3){for(const _0x9f3e32 of this['_selectedAnnotations'])_0x5780a3['includes'](_0x9f3e32)||this['_manuallyClosedAnnotationViews']['delete'](_0x9f3e32['view']);this['_selectedAnnotations']=_0x5780a3;}['_refreshPositioning'](){const _0x5bf203=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x5bf203['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x4e60df){if(this['_manuallyClosedAnnotationViews']['has'](_0x4e60df['view']))return;const _0x295cfa=this['balloonPanelView']['content']['first'];_0x295cfa!==_0x4e60df['view']?(_0x295cfa&&this['_detachListeners'](_0x295cfa),this['_attachListeners'](_0x4e60df['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x4e60df['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x22916f=this['balloonPanelView']['content']['first'],_0x5be57b=_0x22916f&&this['annotations']['getByView'](_0x22916f);if(!_0x5be57b||!this['_annotationToNarrowView']['has'](_0x5be57b))return;const _0x46a4e1=this['_annotationToNarrowView']['get'](_0x5be57b)['element'],_0x297540=(function(){const _0x1d85ff=_0x4392a2['defaultPositions'];return[_0x1d85ff['southArrowNorthEast'],_0x1d85ff['northArrowSouthEast'],_0x1d85ff['southArrowNorth'],_0x1d85ff['northArrowSouth'],_0x1d85ff['southArrowNorthWest'],_0x1d85ff['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x46a4e1,'positions':_0x297540});}['_hideBalloon'](){const _0x2b2b3f=this['balloonPanelView'],_0x470e3b=_0x2b2b3f['content']['first'];_0x470e3b&&(this['_detachListeners'](_0x470e3b),_0x2b2b3f['unpin'](),_0x2b2b3f['content']['clear']());}['_attachListeners'](_0x478995){this['listenTo'](_0x478995,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x478995,'Esc',(_0x3cf56b,_0x3151c9)=>{this['_manuallyClosedAnnotationViews']['add'](_0x478995),this['_hideBalloon'](),_0x3151c9();});}['_detachListeners'](_0x1247f3){this['stopListening'](_0x1247f3);}}class c extends _0x411e57{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x224a4c,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5ac96f){super(_0x5ac96f),_0x5ac96f['editing']['view']['addObserver'](_0xc8bdfe),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x5ac96f['plugins']['get'](_0x224a4c),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x2dbd4c=this['editor']['plugins']['get'](M);_0x2dbd4c['context']===this['editor']&&(_0x2dbd4c['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x4de934,_0x17df7e)=>{const _0x37dd8c=this['_balloon'];if(this['isAttached']&&_0x37dd8c['visibleView']){const _0x42ac8b=this['annotations']['getByView'](_0x37dd8c['visibleView']);_0x42ac8b&&this['_closeAnnotation'](_0x42ac8b),_0x17df7e();}}));}['afterInit'](){const _0x9be9a=this['editor']['plugins']['get'](M);_0x9be9a['context']===this['editor']&&(_0x9be9a['hasActive']()||_0x9be9a['switchTo']('inline'));}['setActiveAnnotation'](_0x5d51f7){_0x5d51f7!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x5d51f7&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x5d51f7)&&this['_addAnnotationToBalloon'](_0x5d51f7,!0x0),_0x5d51f7['isActive']=!0x0),_0x5d51f7||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x5d51f7);}['attach'](_0x3f70ef){this['annotations']=_0x3f70ef;const _0xd05f53=this['editor']['plugins']['get'](M),_0x486c64=this['_balloon'];if(this['isAttached'])throw new _0x50ccf8('inlineannotations-attach-already-attached',this);if(_0xd05f53['context']!==this['editor'])throw new _0x50ccf8('inlineannotations-not-allowed-with-context',this);const _0x4dba0a=this['editor']['plugins']['get'](P);this['listenTo'](_0x4dba0a,'refresh',()=>{const _0x5174f8=_0x4dba0a['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x44f4e4,_0x294920;!this['_forceRefresh']&&(_0x44f4e4=_0x5174f8,_0x294920=this['_selectedAnnotations'],_0x44f4e4['length']===_0x294920['length']&&_0x44f4e4['every'](_0xea982c=>_0x294920['includes'](_0xea982c)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x5174f8),this['setActiveAnnotation'](_0x5174f8[0x0]||null));}),this['listenTo'](_0x4dba0a,'blur',(_0x430131,{isAnnotationTracked:_0x374cfd})=>{this['activeAnnotation']&&_0x374cfd(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x5c0d84,_0xa360f0,_0x4fa434)=>{_0x4fa434||this['setActiveAnnotation'](null);}),this['listenTo'](_0x3f70ef,'remove',(_0x2c4345,_0x5981f7)=>{this['_removeAnnotationFromBalloon'](_0x5981f7),_0x5981f7===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x486c64,'change:visibleView',(_0x31267f,_0x38b55,_0x4ca19d,_0x526434)=>{_0x526434&&this['stopListening'](_0x526434);const _0x256ef4=_0x3f70ef['getByView'](_0x4ca19d);_0x4ca19d&&_0x256ef4&&(this['listenTo'](_0x4ca19d,'change:height',()=>{_0x486c64['updatePosition']();}),this['listenTo'](_0x4ca19d,'Esc',()=>{this['_closeAnnotation'](_0x256ef4),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x256ef4&&this['setActiveAnnotation'](_0x256ef4));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x486c64['visibleView']&&(_0x3f70ef['getByView'](_0x486c64['visibleView'])&&_0x486c64['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 _0x50ccf8('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x116b83 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x116b83);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x465985){for(const _0x591e1c of this['_selectedAnnotations'])_0x465985['includes'](_0x591e1c)||this['_manuallyClosed']['delete'](_0x591e1c);for(const _0x1fdbff of this['annotations'])_0x465985['includes'](_0x1fdbff)||this['_removeAnnotationFromBalloon'](_0x1fdbff);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x59e62f of _0x465985)this['_addAnnotationToBalloon'](_0x59e62f);}this['_selectedAnnotations']=_0x465985;}['_addAnnotationToBalloon'](_0x2c8a52,_0x53f0f8=!0x1){this['_manuallyClosed']['has'](_0x2c8a52)||(this['_addedAnnotations']['has'](_0x2c8a52)||this['_balloon']['hasView'](_0x2c8a52['view'])||(this['_addedAnnotations']['add'](_0x2c8a52),this['_balloon']['add']({'stackId':_0x2c8a52['view']['id'],'view':_0x2c8a52['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x2c8a52)}})),_0x53f0f8&&this['_balloon']['showStack'](_0x2c8a52['view']['id']));}['_getBalloonTargetForAnnotation'](_0x19de71){const _0x34ad35=_0x19de71['target'],_0x401970=this['editor']['editing']['view'],_0x2c1c16=_0x401970['document']['selection']['getFirstRange'](),_0x15d289=_0x401970['domConverter']['viewRangeToDom'](_0x2c1c16);if(_0x15d289['collapse'](!0x0),_0x34ad35){if(_0x34ad35 instanceof _0x1cb979)return _0x34ad35;let _0x21c3b2=[];for(const _0x68cf1f of _0x34ad35)_0x21c3b2['push'](...(_0x1f9117=_0x68cf1f['getClientRects'](),Array['from'](_0x1f9117)['map'](DOMRect['fromRect'])));_0x21c3b2=function(_0x28756d){const _0x5819a7=[];let _0xb39047=_0x28756d[0x0];for(let _0x4e896b=0x1;_0x4e896b<_0x28756d['length'];_0x4e896b++)B(_0xb39047,_0x28756d[_0x4e896b])?_0xb39047['width']+=_0x28756d[_0x4e896b]['width']:(_0x5819a7['push'](_0xb39047),_0xb39047=_0x28756d[_0x4e896b]);return _0x5819a7['push'](_0xb39047),_0x5819a7;}(_0x21c3b2);const _0x5c456f=_0x15d289['getBoundingClientRect']();return _0x21c3b2['find'](_0x4c239e=>_0x4c239e['top']<=_0x5c456f['top']&&_0x4c239e['bottom']>=_0x5c456f['bottom']&&_0x4c239e['left']<=_0x5c456f['left']&&_0x4c239e['right']>=_0x5c456f['right'])||_0x21c3b2[0x0];}var _0x1f9117;return _0x19de71['targetRect']||_0x15d289;}['_removeAnnotationFromBalloon'](_0x4d8caa){this['_addedAnnotations']['has'](_0x4d8caa)&&this['_balloon']['hasView'](_0x4d8caa['view'])&&(this['_addedAnnotations']['delete'](_0x4d8caa),this['_balloon']['remove'](_0x4d8caa['view']));}['_closeAnnotation'](_0x538e73){this['_manuallyClosed']['add'](_0x538e73),this['_removeAnnotationFromBalloon'](_0x538e73);}}function B(_0x9bcb1b,_0x2d6695){return _0x9bcb1b['top']===_0x2d6695['top']&&_0x9bcb1b['bottom']===_0x2d6695['bottom']&&_0x9bcb1b['right']===_0x2d6695['left'];}class tt extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0xe7161a,_0x679984){super(_0xe7161a),this['set']('isEmpty',!_0x679984['length']),this['focusTracker']=new _0x358b9a(),this['_annotationViews']=_0x679984,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x473434({'focusables':_0x679984,'focusTracker':this['focusTracker']}),this['listenTo'](_0x679984,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x679984,'remove',(_0xa52c64,_0x29823c)=>{_0x29823c['isActive']&&this['focus'](),_0x679984['length']||(this['isEmpty']=!0x0);});const _0x484826=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':E(_0xe7161a,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x679984},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x484826['if']('isEmpty','ck-hidden',_0x5aac11=>!_0x5aac11)]},'children':[{'text':E(_0xe7161a,'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 _0x549256 of this['_annotationViews'])this['focusTracker']['add'](_0x549256['element']);this['_annotationViews']['on']('change',(_0x322141,{added:_0x3100cb,removed:_0x57d68a})=>{for(const _0xd5474b of _0x3100cb)this['focusTracker']['add'](_0xd5474b['element']);for(const _0x271bf7 of _0x57d68a)this['focusTracker']['remove'](_0x271bf7['element']);});}}class f extends _0x1eed03{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,O];}constructor(_0x12f315){super(_0x12f315),this['archivedThreads']=new _0x41b195();}['init'](){const _0x2787bc=this['context'],_0x4ec873=_0x2787bc['plugins']['get'](o),_0x2335ba=_0x2787bc['plugins']['get'](O);this['listenTo'](_0x4ec873,'addCommentThread',(_0x28d48b,{threadId:_0x4ef3a7})=>{const _0x3d7d1b=_0x4ec873['getCommentThread'](_0x4ef3a7);_0x3d7d1b['archivedAt']&&this['archivedThreads']['add'](_0x3d7d1b,this['_calculatePosition'](_0x3d7d1b['archivedAt'])),this['listenTo'](_0x3d7d1b,'change:archivedAt',(_0x41f3b8,_0x5df4b2,_0x30e901)=>{_0x30e901?this['archivedThreads']['has'](_0x3d7d1b)||this['archivedThreads']['add'](_0x3d7d1b,this['_calculatePosition'](_0x3d7d1b['archivedAt'])):this['archivedThreads']['has'](_0x3d7d1b)&&this['archivedThreads']['remove'](_0x3d7d1b);});}),this['listenTo'](_0x4ec873,'removeCommentThread',(_0x3bd9b5,{threadId:_0xba3ba0})=>{const _0x12b230=_0x4ec873['getCommentThread'](_0xba3ba0);this['stopListening'](_0x12b230),this['archivedThreads']['has'](_0x12b230)&&this['archivedThreads']['remove'](_0x12b230);},{'priority':'highest'}),this['listenTo'](_0x2335ba['collection'],'focus',(_0x14ae72,_0x291697)=>{_0x291697['isVisible']||(_0x291697['isActive']=!0x0,_0x2335ba['activate'](_0x291697));});}['_calculatePosition'](_0x10e531){const _0x72087c=[...this['archivedThreads']]['findIndex'](_0x5ef370=>_0x5ef370['archivedAt']<_0x10e531);return _0x72087c>-0x1?_0x72087c:this['archivedThreads']['length'];}}class a extends _0x411e57{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,_0x4d4ba0];}constructor(_0x478483){super(_0x478483),this['annotationViews']=new _0x5d7c38(),this['_pendingThreads']=[];}['init'](){const _0x42951a=this['editor'],_0x4548d6=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x42951a['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x6a7993,!0x0)),_0x42951a['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x33db1a=this['_createCommentsArchiveButton'](_0xb8bbcc);return _0x33db1a['set']({'role':'menuitemcheckbox'}),_0x33db1a;});const _0x4ad80d=_0x42951a['plugins']['get'](f),_0xd6860c=_0x42951a['plugins']['get']('Annotations'),_0x27a4c1=_0x42951a['plugins']['get']('CommentsRepository');_0x4ad80d['archivedThreads']['forEach'](_0x4dc0e8=>{this['_handleNewThread'](_0x4dc0e8);}),this['listenTo'](_0x4ad80d['archivedThreads'],'add',(_0x5d9c24,_0x4409e8)=>{this['_handleNewThread'](_0x4409e8);}),this['listenTo'](_0xd6860c['collection'],'add',(_0x133257,_0x18c50a)=>{const _0x3f6de2=this['_pendingThreads']['find'](_0x1393c6=>{const _0x108203=_0x27a4c1['_threadToController']['get'](_0x1393c6);return _0x108203&&_0x18c50a['innerView']===_0x108203['view'];});if(_0x3f6de2){const _0x33446b=this['_calculatePosition'](_0x3f6de2['archivedAt']);this['annotationViews']['add'](_0x18c50a['view'],_0x33446b),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x3f6de2),0x1);}}),this['listenTo'](_0x4ad80d['archivedThreads'],'remove',(_0x139330,_0x27e97d)=>{const _0x3eaaf0=_0x42951a['config']['get']('collaboration.channelId');if(!_0x3eaaf0||_0x27e97d['channelId']===_0x3eaaf0){if(this['_pendingThreads']['includes'](_0x27e97d))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x27e97d),0x1);else{const _0x2d8e95=_0x27a4c1['_threadToController']['get'](_0x27e97d),_0xfdd2ef=_0xd6860c['getByInnerView'](_0x2d8e95['view']);this['annotationViews']['remove'](_0xfdd2ef['view']),this['stopListening'](_0xfdd2ef['focusableElements']);}}}),this['listenTo'](_0xd6860c['collection'],'add',(_0x2ca846,_0x54f7e4)=>{this['listenTo'](_0x54f7e4,'escape',_0x4548d6);}),this['listenTo'](_0xd6860c['collection'],'remove',(_0x5d8768,_0x5db427)=>{this['stopListening'](_0x5db427,'escape',_0x4548d6);});}['_handleNewThread'](_0x546ea0){const _0x48f901=this['editor']['plugins']['get']('CommentsRepository'),_0x1194ab=this['editor']['plugins']['get']('Annotations'),_0x551629=this['editor']['config']['get']('collaboration.channelId');if(!_0x551629||_0x546ea0['channelId']===_0x551629){const _0x39d17e=_0x48f901['_threadToController']['get'](_0x546ea0);if(!_0x39d17e)return void this['_pendingThreads']['push'](_0x546ea0);const _0x5bab6b=this['_calculatePosition'](_0x546ea0['archivedAt']),_0x3ec4dd=_0x1194ab['getByInnerView'](_0x39d17e['view']);_0x3ec4dd['isVisible']&&_0x1194ab['_visibleAnnotations']['remove'](_0x3ec4dd),this['annotationViews']['add'](_0x3ec4dd['view'],_0x5bab6b);}}['_calculatePosition'](_0x32d095){const _0x35d778=this['editor']['config']['get']('collaboration.channelId'),_0x23209a=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0x427531=>_0x427531['channelId']===_0x35d778)['findIndex'](_0x5ac8d5=>_0x5ac8d5['archivedAt']<_0x32d095);return _0x23209a<0x0||_0x23209a>this['annotationViews']['length']?this['annotationViews']['length']:_0x23209a-0x1;}['_toggleDialog'](){const _0x21d469=this['editor'],_0x2087a9=_0x21d469['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new tt(_0x21d469['locale'],this['annotationViews'])),'commentsArchive'===_0x2087a9['id']?_0x2087a9['hide']():_0x2087a9['show']({'id':'commentsArchive','title':E(_0x21d469['locale'],'COMMENTS_ARCHIVE'),'icon':_0x5da95b,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x20b93c['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x599f3c,_0x159c91=!0x1){const _0x22e140=this['editor']['locale'],_0xeba7ef=this['editor']['plugins']['get']('Dialog'),_0xacb2e6=new _0x599f3c(_0x22e140);return _0xacb2e6['bind']('isEnabled')['to'](this,'isEnabled'),_0xacb2e6['bind']('isOn')['to'](_0xeba7ef,'id',_0x3d0713=>'commentsArchive'===_0x3d0713),_0xacb2e6['set']({'label':E(_0x22e140,'COMMENTS_ARCHIVE'),'icon':_0x5da95b,'isToggleable':!0x0}),_0x159c91&&(_0xacb2e6['tooltip']=!0x0),this['listenTo'](_0xacb2e6,'execute',()=>this['_toggleDialog']()),_0xacb2e6;}['_hideDialogOnAnnotationEscape']=_0x4b90e0=>{const _0x54aa92=_0x4b90e0['source'];if(!this['annotationViews']['has'](_0x54aa92['view']))return;const _0x4a6d06=this['editor']['plugins']['get']('Dialog');_0x4a6d06['isOpen']&&'commentsArchive'===_0x4a6d06['id']&&(_0x4a6d06['hide'](),_0x4b90e0['stop']());};}class p extends _0x411e57{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};
|