@ckeditor/ckeditor5-comments 46.0.1-alpha.4 → 46.0.1-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/comments.js +1 -1
- package/dist/index.js +11 -11
- package/package.json +18 -18
- package/src/comments/commentsediting.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Qt)());constructor(_0x1d29c2={}){function _0x1ccb21(_0x106e6a){return _0x106e6a['map'](_0x529015=>String['fromCharCode'](_0x529015))['join']('');}(_0x1d29c2=Object['assign']({},_0x1d29c2))['plugins']||(_0x1d29c2['plugins']=Rt['defaultPlugins']),super(_0x1d29c2),this['ui']=new Ft(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x1ccb21([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1ccb21([0x76,0x69,0x65,0x77])][_0x1ccb21([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1ccb21([0x61,0x75,0x74,0x6f]),this[_0x1ccb21([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x1ccb21([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1ccb21([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x1ccb21([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x1ccb21([0x6f,0x6b])});}['create'](){const _0x3405d2=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x3405d2))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x7efe49=>{const _0x6fa86=this['model']['document']['getRoot'](),_0x1a86e5=_0x6fa86&&_0x6fa86['getChild'](_0x6fa86['childCount']-0x1);_0x7efe49['setSelection'](_0x1a86e5,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x294c13=this['editing']['view'],_0x549d01=_0x294c13['document']['getRoot'](),_0x5237f3=_0x549d01['getChild'](0x0);_0x549d01['childCount']>0x1||!_0x5237f3||'p'!=_0x5237f3['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x294c13,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x5237f3['placeholder']=this['placeholder']),St({'view':_0x294c13,'element':_0x5237f3,'keepOnFocus':!0x0}),this['placeholderElement']=_0x5237f3);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x24cb3d,_0x5583de={}){super(_0x24cb3d),this['editor']=null,this['_editorConfig']=_0x5583de,this['set']('value',_0x5583de['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x24cb3d,'Reply...')),this['set']('submitLabel',N(_0x24cb3d,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x336e57(),this['focusCycler']=new _0x2fdf0a({'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',(_0x59b64a,_0x588232)=>{this['cancelButtonView']['fire']('execute'),_0x588232();}),this['keystrokes']['set']('Ctrl+Enter',(_0x1947ae,_0x26f288)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x26f288());}),this['on']('submit',(_0x54f750,_0x5a337b)=>{_0x5a337b['length']>0xfde8?(alert(N(_0x24cb3d,'TOO_LONG_COMMENT_ALERT',[_0x5a337b['length'],0xfde8])),_0x54f750['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x36c7e8=this['editor'];this['element']['insertBefore'](_0x36c7e8['ui']['element'],this['element']['firstChild']),_0x36c7e8['model']['document']['on']('change',()=>this['value']=_0x36c7e8['getData']()),_0x36c7e8['bind']('placeholder')['to'](this),this['focusables']['add'](_0x36c7e8['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x2d56d7){-0x1===_0x2d56d7?(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:_0x3857e7}=this,_0x44887f=new _0x75c5a1(_0x3857e7);return _0x44887f['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x44887f['withText']=!0x0,_0x44887f['bind']('label')['to'](this,'submitLabel'),_0x44887f['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x44887f['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x11afb4,_0x4325dd)=>!_0x4325dd&&!!_0x11afb4['trim']()),_0x44887f;}['_createCancelButton'](){const {locale:_0x4dae9d}=this,_0x297ad0=new _0x75c5a1(_0x4dae9d);return _0x297ad0['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x297ad0['label']=N(_0x4dae9d,'Cancel'),_0x297ad0['withText']=!0x0,_0x297ad0['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x297ad0;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x266cf8=>{this['focusTracker']['add'](_0x266cf8['element']);}),this['focusables']['on']('change',(_0x16c804,_0x383752)=>{for(const _0x5587c7 of Array['from'](_0x383752['added'])['reverse']())this['focusTracker']['add'](_0x5587c7['element']);});}}class ie extends kt{constructor(_0x3e7fd1,_0x4ff455,_0x50e74d){super(_0x3e7fd1),this['commentInputView']=new os(_0x3e7fd1,_0x50e74d),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x54459c,_0xe36df1)=>_0x54459c||!!_0xe36df1),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 _0x38aed4(_0x3e7fd1,_0x4ff455),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'](_0x23e599){this['commentInputView']['focus'](_0x23e599);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x515088,_0x4c3926)=>{const {submitButtonView:_0x3e31c0,cancelButtonView:_0x9bac91,editor:_0x2b5c81}=this['commentInputView'];[_0x3e31c0['element'],_0x9bac91['element'],_0x2b5c81?_0x2b5c81['editing']['view']['getDomRoot']():null]['filter'](_0x30199e=>_0x30199e)['some'](_0x19dc1f=>_0x19dc1f['contains'](_0x4c3926['target']))||(this['focus'](),_0x4c3926['preventDefault']());});}}class rs extends kt{constructor(_0x1e4b07){super(_0x1e4b07);const _0x25ee1e=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x25ee1e['to']('count',_0x1a166b=>N(_0x1e4b07,'NUMBER_OF_COMMENTS',_0x1a166b))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x265522,_0x219d44,_0xb0995c){super(_0x265522);const _0x54d168=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x219d44['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x219d44,this['_config']=_0xb0995c,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x336e57(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2fdf0a({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x599b68=>this['commentViews']['map'](_0x218f29=>_0x218f29['element'])['includes'](_0x599b68['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x265522),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x2332c1=>_0x2332c1-this['_config']['maxCommentsWhenCollapsed']);for(const _0x4021b1 of _0x219d44['comments'])this['_handleNewCommentModel'](_0x4021b1);this['_handleInfoComment'](),this['listenTo'](_0x219d44['comments'],'add',(_0x16f15b,_0x4a9acc)=>{const _0x244f55=this['_calculatePosition'](_0x4a9acc);this['length']++,this['_handleNewCommentModel'](_0x4a9acc,_0x244f55),this['refreshVisibleViews']();}),this['listenTo'](_0x219d44['comments'],'remove',(_0x1a7025,_0xed0d4b)=>{this['length']--,this['_handleRemoveCommentModel'](_0xed0d4b),this['refreshVisibleViews']();}),this['listenTo'](_0x219d44,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x219d44,'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',_0x54d168['if']('length','ck-hidden',_0x46f183=>!_0x46f183)],'aria-label':N(_0x265522,'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'](_0x3a6960){-0x1===_0x3a6960?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x2495ed of this['commentViews'])_0x2495ed['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x4cc088,_0x4b82be){const _0x15ce35=new this['_config']['CommentView'](this['locale'],_0x4cc088,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x15ce35['viewUid']=_0x4cc088['id'],_0x15ce35['delegate']('removeComment')['to'](this),_0x15ce35['delegate']('updateComment')['to'](this),_0x15ce35['delegate']('resolveCommentThread')['to'](this),_0x15ce35['delegate']('editorReady')['to'](this),_0x15ce35['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x15ce35,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x15ce35,_0x4b82be);}['_calculatePosition'](_0x33c8c7){const _0x47e4d1=this['_model']['_findOptimalIndex'](_0x33c8c7);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x33c8c7['authoredAt']?_0x47e4d1-0x1:_0x47e4d1:_0x47e4d1-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x550a89={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x550a89,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x550a89));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x234214){const _0x3cc345=this['commentViews']['remove'](_0x234214['id']);this['stopListening'](_0x3cc345),_0x3cc345['isEditMode']&&this['_updateHasDirtyComment'](),_0x3cc345['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x554a97=>_0x554a97['isEditMode']);}['_rearrangeCollapse'](){const _0x535b50=function(_0x4f6a89){const _0x38e746=new _0x1ed765();for(const _0x27241e of _0x4f6a89)_0x38e746['add'](_0x27241e);return _0x38e746;}(this['commentViews']),_0x56b940=this['_collapsedCommentsView']['count'];for(let _0x840702=0x1;_0x840702<=_0x56b940;_0x840702++)_0x535b50['remove'](0x1);for(const _0x5caf49 of _0x535b50)_0x5caf49['collapse']();_0x56b940>0x0&&_0x535b50['add'](this['_collapsedCommentsView'],0x1),ns(_0x2f1ce2(Array['from'](this['visibleViews']),Array['from'](_0x535b50)),this['visibleViews'],_0x535b50);}['_rearrangeExpand'](){ns(_0x2f1ce2(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0xd9e63f of this['visibleViews'])_0xd9e63f['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x1b175e=>{this['focusTracker']['add'](_0x1b175e['element']),this['keystrokes']['listenTo'](_0x1b175e['element']);}),this['commentViews']['on']('change',(_0x3f0f8b,_0xb1696c)=>{for(const _0x11d14c of _0xb1696c['removed'])this['focusTracker']['remove'](_0x11d14c['element']),this['keystrokes']['stopListening'](_0x11d14c['element']);for(const _0xdfb3b6 of Array['from'](_0xb1696c['added'])['reverse']())this['focusTracker']['add'](_0xdfb3b6['element']),this['keystrokes']['listenTo'](_0xdfb3b6['element']);});}}function ns(_0xa01ce2,_0x373bf4,_0x6e7034){let _0x201f85=0x0;for(const _0x2f53d4 of _0xa01ce2)switch(_0x2f53d4){case'insert':_0x373bf4['add'](_0x6e7034['get'](_0x201f85),_0x201f85),_0x201f85++;break;case'delete':_0x373bf4['remove'](_0x201f85);break;case'equal':_0x201f85++;}}class oe extends kt{constructor(_0xff139c){super(_0xff139c);const _0x5d8058=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x5d8058['to']('contextValue',_0x1e9ad6=>N(_0xff139c,'THREAD_CONTEXT_LABEL',_0x1e9ad6)),'tabindex':-0x1},'children':[{'text':_0x5d8058['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x125f04,_0x3eb1b7){super(_0x125f04);const _0x402672=this['bindTemplate'];this['_model']=_0x3eb1b7,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x336e57(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2fdf0a({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x57aa55=>!!_0x57aa55),this['bind']('contextValue')['to'](this['_model'],'context',_0x47a855=>_0x47a855&&_0x47a855['value']?this['_trimContextValue'](_0x47a855['value']):N(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x402672['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 _0x20cd9b=new _0x75c5a1(this['locale']);return _0x20cd9b['label']=N(this['locale'],'Reopen'),_0x20cd9b['tooltip']=N(this['locale'],'Reopen'),_0x20cd9b['icon']=_0x1e6eac,_0x20cd9b['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x21fdd8=>!_0x21fdd8),_0x20cd9b['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3732c5,_0x22c760)=>_0x3732c5&&_0x22c760),_0x20cd9b['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x20cd9b;}['_trimContextValue'](_0x5badaa){if(_0x5badaa['length']<0x96)return _0x5badaa;const _0x4f8d94=_0x5badaa['lastIndexOf']('\x20',0x93);return _0x5badaa['substring'](0x0,_0x4f8d94>-0x1?_0x4f8d94:0x93)+'...';}['_attachContextActions'](){const _0x3fc920=this['element']['querySelector']('.ck-context'),_0x2497e5=_0x3fc920['querySelector']('.ck-context__value');this['listenTo'](_0x3fc920,'mouseenter',()=>{_0x2497e5['offsetWidth']<_0x2497e5['scrollWidth']&&_0x3fc920['classList']['add']('overlay');}),this['listenTo'](_0x3fc920,'mouseleave',()=>{_0x3fc920['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x133720 of this['focusables'])this['focusTracker']['add'](_0x133720['element']),this['keystrokes']['listenTo'](_0x133720['element']);}['_createContextView'](){const _0x30f55a=new oe(this['locale']);return _0x30f55a['bind']('contextValue')['to'](this),_0x30f55a;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5df21c,_0x1f1355,_0x469f45,_0x347fba){super(_0x5df21c),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x1f1355,this['_localUser']=_0x469f45,this['_config']=_0x347fba,this['commentThreadHeaderView']=new Yt(_0x5df21c,_0x1f1355),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x5df21c,N(_0x5df21c,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x5df21c,_0x1f1355,Object['assign']({'CommentView':this['_config']['CommentView']},_0x347fba)),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',(_0xa2b323,_0x269b57)=>_0xa2b323||!!_0x269b57),this['bind']('isUnlinked')['to'](_0x1f1355,'unlinkedAt',_0xb437c=>!!_0xb437c),this['bind']('ariaLabel')['to'](this,'length',_0x21b707=>{const _0x3243a0=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x21b707,_0x3243a0]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x336e57(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2fdf0a({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x343dd2=>_0x343dd2['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),ts(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x1f5d27=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x18569d=_0x1f5d27['commentInputView'];return _0x1f5d27['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x18569d,'value',(_0xe8949d,_0x15a08b,_0x469a14,_0x4e2de4,_0x5227c2)=>!!_0x5227c2||!!_0x4e2de4&&_0x469a14&&!_0x15a08b||_0xe8949d&&_0x469a14&&!_0x15a08b),_0x18569d['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x30b9a0,_0x3d4469,_0x1f44bc)=>{let _0x31259c;return _0x31259c=_0x1f44bc&&_0x3d4469?'Reply\x20to\x20reopen\x20discussion...':_0x30b9a0?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x31259c);}),_0x18569d['bind']('submitLabel')['to'](this,'length',_0x42b364=>N(this['locale'],_0x42b364?'Reply':'Comment')),_0x18569d['on']('submit',(_0x479489,_0x14f4cf)=>{this['fire']('addComment',_0x14f4cf),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x18569d['on']('cancel',()=>{this['focus']();}),_0x18569d['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x18569d['on']('cancel',_0x30ae1e=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x30ae1e['stop']());}),this['on']('change:isActive',(_0x1e7cdd,_0x196211,_0x19281d)=>{_0x19281d||this['length']||_0x18569d['value']||this['fire']('removeCommentThread');}),_0x1f5d27;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(di){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x3d6921(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x59f459,target:_0xe29a73,type:_0x2ddda2,isVisible:_0xa0bcf8=!0x0}){super(),this['view']=_0x59f459,this['view']['element']||this['view']['render'](),this['_type']=_0x2ddda2,this['_target']=_0xe29a73,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x1ed765([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x1be175,_0x65a7a8)=>{this['view']['focusTracker']['add'](_0x65a7a8);}),this['focusableElements']['on']('remove',(_0x1d38a6,_0x4fc520)=>{this['view']['focusTracker']['remove'](_0x4fc520);}),this['set']('isVisible',_0xa0bcf8);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x8df51c=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x8df51c),_0x8df51c;}get['targetRect'](){const _0x4a2a98=this['target'];if(null===_0x4a2a98)return null;if(_0x4a2a98 instanceof _0x29c0c7)return _0x4a2a98;const _0x3d1bc7=_0x4a2a98['filter'](_0x5d1dee=>function(_0x31b9d7){const _0x4fdd4d=_0x31b9d7['offsetParent'];if(_0x4fdd4d)return!0x0;const _0xa78424=_0x31b9d7['getClientRects']()['item'](0x0);return!!_0xa78424;}(_0x5d1dee));return 0x0===_0x3d1bc7['length']?null:new _0x29c0c7(_0x3d1bc7[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x35d5d8){this['view']['isActive']=_0x35d5d8,this['view']['mainView']['isActive']=_0x35d5d8;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x20f1b4){if(!(null===_0x20f1b4||_0x20f1b4 instanceof _0x29c0c7||Array['isArray'](_0x20f1b4)&&_0x20f1b4['every'](_0x5721f2=>fi(_0x5721f2))))throw new _0x59f856('annotation-invalid-target',null,{'target':_0x20f1b4});}['_getNormalizedTarget'](){const _0x5ded65='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x5ded65)?[_0x5ded65]:_0x5ded65;}}function fi(_0x270903){return null!==_0x270903&&'object'==typeof _0x270903&&'nodeType'in _0x270903&&0x1===_0x270903['nodeType'];}class S extends _0x1ed765{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x46db6b=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x336e57(),this['_focusTracker']['on']('change:isFocused',(_0x4d1569,_0x53af99,_0x227823)=>{_0x227823||this['fire']('blur');});for(const _0x3daa21 of _0x46db6b)this['add'](_0x3daa21);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x3771c4){if(this['has'](_0x3771c4))throw new _0x59f856('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x3771c4['innerView'],_0x3771c4),this['_viewToAnnotation']['set'](_0x3771c4['view'],_0x3771c4);for(const _0x55f936 of _0x3771c4['focusableElements'])this['_focusTracker']['add'](_0x55f936);this['listenTo'](_0x3771c4['focusableElements'],'add',(_0x3dbba6,_0x51137a)=>{this['_focusTracker']['add'](_0x51137a);}),this['listenTo'](_0x3771c4['focusableElements'],'remove',(_0x197dd8,_0x5ee6d0)=>{this['_focusTracker']['remove'](_0x5ee6d0);}),this['listenTo'](_0x3771c4['view']['focusTracker'],'change:isFocused',(_0x1e1a7a,_0x43ff72,_0x293066)=>{_0x293066&&this['fire']('focus',_0x3771c4);}),_0x3771c4['updateTargetRect']();const _0x30cc43=this['_getOrderInContent'](_0x3771c4['view']['targetRect']);return super['add'](_0x3771c4,_0x30cc43);}['remove'](_0x34a44c){if(!this['has'](_0x34a44c))throw new _0x59f856('annotationcollection-not-existing-item',null);this['stopListening'](_0x34a44c['view']['focusTracker']),this['stopListening'](_0x34a44c['focusableElements']);for(const _0x665194 of _0x34a44c['focusableElements'])this['_focusTracker']['remove'](_0x665194);return this['_viewToAnnotation']['delete'](_0x34a44c['view']),this['_innerViewToAnnotation']['delete'](_0x34a44c['innerView']),super['remove'](_0x34a44c);}['getByInnerView'](_0x3c15f0){return this['_innerViewToAnnotation']['get'](_0x3c15f0);}['getByView'](_0x274918){return this['_viewToAnnotation']['get'](_0x274918);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x2afe67 of this)_0x2afe67['updateTargetRect']();this['_sort']();}['_sort'](){const _0x31362a=Array['from'](this)['sort']((_0x4fe4ee,_0x597602)=>w(_0x4fe4ee['view']['targetRect'],_0x597602['view']['targetRect']));for(let _0x14e101=_0x31362a['length']-0x1;_0x14e101>0x0;_0x14e101--){const _0x5795d3=_0x31362a[_0x14e101];_0x14e101!==this['getIndex'](_0x5795d3)&&(this['remove'](_0x5795d3),this['add'](_0x5795d3));}}['_getOrderInContent'](_0x14fed3){let _0x2dde8a=0x0;if(!_0x14fed3)return this['length'];for(const _0x2806ce of this){const _0x285aa3=_0x2806ce['view']['targetRect'];if(_0x285aa3){if(w(_0x14fed3,_0x285aa3)<0x0)return _0x2dde8a;_0x2dde8a++;}}return _0x2dde8a;}}function v({source:_0x35dc90,target:_0x309e22,filter:_0x4cc054}){for(const _0xca494a of _0x35dc90)_0x4cc054(_0xca494a)&&_0x309e22['add'](_0xca494a);_0x309e22['listenTo'](_0x35dc90,'add',(_0x146847,_0x176f53)=>{_0x4cc054(_0x176f53)&&_0x309e22['add'](_0x176f53);}),_0x309e22['listenTo'](_0x35dc90,'remove',(_0x2fdc57,_0x25609d)=>{_0x309e22['has'](_0x25609d)&&_0x309e22['remove'](_0x25609d);});}function w(_0x1f8544,_0x22134a){if(null===_0x1f8544&&null===_0x22134a)return 0x0;if(null===_0x1f8544)return-0x1;if(null===_0x22134a)return 0x1;const _0x820c29=_0x1f8544['top']-_0x22134a['top'];return 0x0==_0x820c29?_0x1f8544['left']-_0x22134a['left']:_0x820c29;}class y extends _0x35edc8{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2f8d7e){if(super(_0x2f8d7e),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x2f8d7e instanceof _0x27ecd2){const _0x1f4791=_0x2f8d7e['locale'];_0x2f8d7e['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x1f4791,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x1f4791,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x1f4791,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x1f4791,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x1f4791,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x1f4791,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x1f4791,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x4e61ae){this['collection']['add'](_0x4e61ae);}['remove'](_0x5e193e){this['collection']['remove'](_0x5e193e),_0x5e193e['destroy']();}['refreshVisibility'](){for(const _0x419b00 of this['collection'])_0x419b00['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x18ba62){return this['collection']['getByInnerView'](_0x18ba62);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x1740ec of this['collection'])_0x1740ec['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x411945){this['fire']('_activateAnnotation',_0x411945);}['createAnnotation'](_0x1f4eff){return new T(_0x1f4eff);}['createAnnotationView'](_0x3bb07c,_0x5bc853){return new E(_0x3bb07c,_0x5bc853);}['_addActiveAnnotation'](_0x24f410){const _0x16f68e=new Set(this['activeAnnotations']);_0x16f68e['add'](_0x24f410),this['activeAnnotations']=_0x16f68e;}['_removeActiveAnnotation'](_0x145e5e){const _0x469141=new Set(this['activeAnnotations']);_0x469141['delete'](_0x145e5e),this['activeAnnotations']=_0x469141;}['_bindAnnotationsToVisibleAnnotations'](){const _0x4fff6d=this['collection'],_0x39bd07=this['_visibleAnnotations'];function _0x2f4a63(_0x5abf83){const _0x22ef53=_0x5abf83['source'];_0x22ef53['isVisible']&&!_0x39bd07['has'](_0x22ef53)?_0x39bd07['add'](_0x22ef53):!_0x22ef53['isVisible']&&_0x39bd07['has'](_0x22ef53)&&_0x39bd07['remove'](_0x22ef53),_0x22ef53['view']['focusTracker']['remove'](_0x22ef53['view']['element']),_0x22ef53['view']['focusTracker']['add'](_0x22ef53['view']['element']);}this['listenTo'](_0x4fff6d,'add',(_0x664b6f,_0x502f08)=>{_0x502f08['isVisible']&&_0x39bd07['add'](_0x502f08),this['listenTo'](_0x502f08,'change:isVisible',_0x2f4a63);}),this['listenTo'](_0x4fff6d,'remove',(_0x37eb15,_0x1987ea)=>{_0x39bd07['has'](_0x1987ea)&&_0x39bd07['remove'](_0x1987ea),this['stopListening'](_0x1987ea,'change:isVisible',_0x2f4a63);});}['_setupEnterAnnotationKeystroke'](){const _0x4fcabd=_0x35b890=>{_0x35b890['on']('ready',()=>{_0x35b890['keystrokes']['set'](_0x1434a2,(_0x104999,_0x85772b)=>{const _0x57b9bb=_0x1a7d5e(this['activeAnnotations']['values']());_0x57b9bb&&(_0x57b9bb['view']['focus'](),_0x85772b());});});};this['context']instanceof _0x27ecd2?_0x4fcabd(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0xe7582e,_0xd7bc4b)=>{_0x4fcabd(_0xd7bc4b);});}['_setupEscapeAnnotationHandling'](){const _0x5d542d=_0x21c53f=>{const _0x10d867=_0x21c53f['source'],_0x443e1e=[];let _0x5b0b51;if(Array['isArray'](_0x10d867['target'])){_0x5b0b51=_0x10d867['target'][0x0],this['context']instanceof _0x27ecd2?_0x443e1e['push'](this['context']):this['context']['editors']&&_0x443e1e['push'](...this['context']['editors']);for(const _0x4bf68b of _0x443e1e)for(const _0xee3034 of _0x4bf68b['editing']['view']['domRoots']['values']())if(_0xee3034['contains'](_0x5b0b51))return void _0x4bf68b['editing']['view']['focus']();_0x5b0b51['focus']();}};this['listenTo'](this['collection'],'add',(_0x1bf9f9,_0x280fa6)=>{this['listenTo'](_0x280fa6,'escape',_0x5d542d,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x4016f2,_0x53eb88)=>{this['stopListening'](_0x53eb88,'escape',_0x5d542d);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x35edc8{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2ebb64){super(_0x2ebb64),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x15fd65=this['context']['config'];_0x15fd65['define']('comments.maxCommentsWhenCollapsed',0x2),_0x15fd65['define']('comments.maxThreadTotalWeight',0x1f4),_0x15fd65['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x15fd65['define']('comments.CommentThreadView',gt),_0x15fd65['define']('comments.CommentView',Tt),_0x15fd65['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x575029=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x523525,_0x590a2b)=>this['_addCommentThread'](_0x590a2b)),this['on']('submitCommentThread',(_0x156a27,_0x4b5b17)=>this['_submitCommentThread'](_0x4b5b17)),this['on']('resolveCommentThread',(_0x5ac5a6,_0x58f6dc)=>this['_resolveCommentThread'](_0x58f6dc)),this['on']('resolveCommentThread',(_0x1fe6b7,_0x58bf6f)=>this['_updateActiveAnnotation'](_0x58bf6f),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x34c5a7,_0x6759ba)=>this['_reopenCommentThread'](_0x6759ba)),this['on']('reopenCommentThread',(_0x3892ec,_0xc5c211)=>this['_updateActiveAnnotation'](_0xc5c211),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x443124,_0x3a30fb)=>this['_removeCommentThread'](_0x3a30fb)),this['on']('updateCommentThread',(_0x59810d,_0xc37803)=>this['_updateCommentThread'](_0xc37803)),this['on']('updateCommentThread',(_0x3ae95f,_0x7d4955)=>this['_updateActiveAnnotation'](_0x7d4955),{'priority':'lowest'}),this['on']('addComment',(_0x194499,_0x389e71)=>this['_addComment'](_0x389e71)),this['on']('updateComment',(_0x52a5de,_0x1c8deb)=>this['_updateComment'](_0x1c8deb)),this['on']('removeComment',(_0x2e3901,_0x1fbde4)=>this['_removeComment'](_0x1fbde4)),this['on']('addComment',(_0xf53c4c,{threadId:_0x42a16d,isFromAdapter:_0xdc2bf0})=>{if(_0xdc2bf0)return;const _0x3c5422=this['getCommentThread'](_0x42a16d),_0x2b4f55=_0x3c5422&&this['_threadToController']['get'](_0x3c5422);_0x2b4f55&&_0x2b4f55['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x575029,'change:activeAnnotations',(_0x5af11f,_0x20a7e9,_0x5b076d)=>{const _0x50d153=Array['from'](_0x5b076d)['map'](_0x546ef5=>this['_viewToController']['get'](_0x546ef5['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x50d153?_0x50d153['model']:null;});}set['adapter'](_0x4c9d34){if(this['_adapter'])throw new _0x59f856('commentsrepository-adapter-already-set');this['_adapter']=_0x4c9d34;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x33ecfc=_t,threadId:_0x177604=_0xf51739(),comments:_0x249fb2=[],unlinkedAt:_0x473eb4=null,resolvedAt:_0x315f60=null,resolvedBy:_0x97262c=null,target:_0x3dda98=null,context:_0x19076d=null,attributes:_0x518c58={},isResolvable:_0x39c552=!0x0,isSubmitted:_0x4b4006=!0x1,isFromAdapter:_0x281ab6=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x33ecfc),{'channelId':_0x33ecfc,'threadId':_0x177604,'comments':_0x249fb2,'unlinkedAt':_0x473eb4,'resolvedAt':_0x315f60,'resolvedBy':_0x97262c,'target':_0x3dda98,'context':_0x19076d,'attributes':_0x518c58,'isFromAdapter':_0x281ab6,'isResolvable':_0x39c552,'isSubmitted':_0x4b4006}),this['getCommentThread'](_0x177604);}['openNewCommentThread']({channelId:_0x5d102e=_t,threadId:_0x94ce7f=_0xf51739(),target:_0x62c3c4,context:_0x408e34=null,isResolvable:_0x55338d=!0x0}){if(this['_readOnlyChannels']['has'](_0x5d102e)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x62c3c4)throw new _0x59f856('commentsrepository-missing-target');const _0xa5a061=this['addCommentThread']({'channelId':_0x5d102e,'threadId':_0x94ce7f,'target':_0x62c3c4,'context':_0x408e34,'isResolvable':_0x55338d});if(!_0xa5a061)return null;const _0x5a9f46=this['_threadToController']['get'](_0xa5a061),_0x36650f=_0x5a9f46['view']['commentThreadInputView']['commentInputView'],_0x125755=this['context']['plugins']['get'](y),_0x52544f=_0x125755['getByInnerView'](_0x5a9f46['view']);return _0x125755['activate'](_0x52544f),_0x36650f['once']('editorReady',()=>_0x36650f['focus']()),_0xa5a061;}['hasCommentThread'](_0xfd108d){if('string'!=typeof _0xfd108d)throw new _0x59f856('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0xfd108d);}['updateCommentThread']({channelId:_0x4e44fd=_t,threadId:_0x659221,context:_0x165f2c,unlinkedAt:_0x1f12ef,attributes:_0x17758d,isFromAdapter:_0x27d9e0=!0x1}){return this['fire'](Nt('updateCommentThread',_0x4e44fd),{'channelId':_0x4e44fd,'threadId':_0x659221,'context':_0x165f2c,'unlinkedAt':_0x1f12ef,'attributes':_0x17758d,'isFromAdapter':_0x27d9e0}),this['getCommentThread'](_0x659221);}['getCommentThread'](_0x180e95){if('string'!=typeof _0x180e95)throw new _0x59f856('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x180e95);}['fetchCommentThread']({channelId:_0x1e9b1a,threadId:_0x1bad33}={}){const _0x31fe1d=this['getCommentThread'](_0x1bad33);if(_0x31fe1d)return Promise['resolve'](_0x31fe1d);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x59f856('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x1e9b1a,'threadId':_0x1bad33})['then'](_0x47dcea=>this['hasCommentThread'](_0x1bad33)?this['getCommentThread'](_0x1bad33):_0x47dcea?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x1e9b1a},_0x47dcea)):void 0x0)['catch'](_0x71e1c2=>{throw console['error'](_0x71e1c2),new _0x59f856('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x280a27,skipNotAttached:_0x434672=!0x1,skipEmpty:_0x5c22af=!0x1,toJSON:_0x5cd4ac=!0x1}={}){const _0x3afaa9=[];for(const _0x196c91 of this['_threads']['values']())_0x280a27&&_0x196c91['channelId']!==_0x280a27||_0x434672&&!_0x196c91['isAttached']||_0x5c22af&&0x0===_0x196c91['length']||_0x3afaa9['push'](_0x196c91);return _0x5cd4ac?_0x3afaa9['map'](_0x2783ec=>_0x2783ec['toJSON']()):_0x3afaa9;}['getAnnotationForCommentThread'](_0x2059da){const _0x3db28b=this['_threadToController']['get'](_0x2059da);if(!_0x3db28b)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x3db28b['view'])||null;}['getCommentThreadForAnnotation'](_0x52726a){const _0x36f163=this['_viewToController']['get'](_0x52726a['innerView']);return _0x36f163?_0x36f163['model']:null;}['setActiveCommentThread'](_0xa3a255){const _0x4cefe0=this['context']['plugins']['get'](y);if(!_0xa3a255)return void(this['activeCommentThread']&&_0x4cefe0['deactivateAll']());const _0x24f98a=this['getCommentThread'](_0xa3a255);if(!_0x24f98a)throw new _0x59f856('commentsrepository-active-missing-comment-thread',null,{'threadId':_0xa3a255});if(!this['_threadToController']['has'](_0x24f98a))throw new _0x59f856('commentsrepository-active-not-attached',null,{'threadId':_0xa3a255});const _0x5216a5=_0x4cefe0['getByInnerView'](this['_threadToController']['get'](_0x24f98a)['view']);_0x4cefe0['activate'](_0x5216a5);}['switchReadOnly'](_0x550317,_0x4e8947){_0x550317?this['_readOnlyChannels']['add'](_0x4e8947):this['_readOnlyChannels']['delete'](_0x4e8947),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x182b17){return this['_readOnlyChannels']['has'](_0x182b17)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0xcba4f3,_0xe7ea65){return new vt(_0xcba4f3,_0xe7ea65);}['setPermissions'](_0xba8b38,_0x24d212=_t){this['_permissions']['set'](_0x24d212,_0xba8b38),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x15e8ae=_t){return this['_permissions']['has'](_0x15e8ae)?this['_permissions']['get'](_0x15e8ae):bt;}['_addCommentThread']({channelId:_0x11a41c,threadId:_0xae1802,comments:_0x242497,unlinkedAt:_0x3a296f,resolvedAt:_0x50e397,resolvedBy:_0x37f059,target:_0x2eee15,context:_0x156c2b,attributes:_0x538399,isFromAdapter:_0x2a862f,isResolvable:_0x8ab6df,isSubmitted:_0x1fee56}){if('string'!=typeof _0xae1802)throw new _0x59f856('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0xae1802});if(this['hasCommentThread'](_0xae1802))throw new _0x59f856('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0xae1802});const _0x4b5ca5=new pi(this,{'channelId':_0x11a41c,'id':_0xae1802,'context':_0x156c2b,'attributes':_0x538399,'unlinkedAt':_0x3a296f,'resolvedAt':_0x50e397,'resolvedBy':_0x37f059?this['context']['plugins']['get'](it)['getUser'](_0x37f059):null,'isResolvable':_0x8ab6df,'isSubmitted':_0x1fee56||_0x2a862f});this['_threads']['set'](_0xae1802,_0x4b5ca5);for(const _0x575c88 of _0x242497)_0x4b5ca5['_add'](this['_createNewComment']({'threadId':_0xae1802,..._0x575c88}));return _0x2eee15&&_0x4b5ca5['attachTo'](_0x2eee15),_0x2a862f||!_0x4b5ca5['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x11a41c,'threadId':_0xae1802});}['_submitCommentThread']({channelId:_0x3d75ed,threadId:_0xa81c09}){if(!this['hasCommentThread'](_0xa81c09))throw new _0x59f856('commentsrepository-missing-comment-thread',this);const _0x5a7db7=this['getCommentThread'](_0xa81c09);if(_0x5a7db7['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x1bf3ed,comments:_0x2fa7f2,resolvedAt:_0x444ab1,resolvedBy:_0x2a9f70,context:_0x4d843f,attributes:_0x549ef7}=_0x5a7db7,_0x5c8551=this['context']['plugins']['get']('PendingActions'),_0x3a43c0=_0x5c8551['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x3d75ed,'threadId':_0x1bf3ed,'comments':_0x2fa7f2['map'](_0x2cb12b=>_0x2cb12b['toJSON']()),'resolvedAt':_0x444ab1,'resolvedBy':_0x2a9f70?_0x2a9f70['id']:_0x2a9f70,'context':_0x4d843f,'attributes':_0x549ef7})['then'](({comments:_0x4ce7c7})=>{_0x5c8551['remove'](_0x3a43c0);for(const _0x5adebe of _0x4ce7c7)this['_updateComment']({'channelId':_0x3d75ed,'threadId':_0xa81c09,'commentId':_0x5adebe['commentId'],'createdAt':_0x5adebe['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x247bac=>{throw console['error'](_0x247bac),new _0x59f856('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x4627dc,target:_0x52ba77}){const _0x2944bc=this['getCommentThread'](_0x4627dc);if(!_0x2944bc)throw new _0x59f856('commentsrepository-attach-missing-comment-thread',this);const _0x4c32cd=this['context']['plugins']['get']('PendingActions'),_0x165700=this['context']['plugins']['get'](y),_0x9b131=this['_createCommentThreadView'](_0x2944bc),_0x13919e=new vt(_0x2944bc,_0x9b131);let _0x2b97a2=null;_0x9b131['on']('change:isDirty',(_0x3dd858,_0x3d57e1,_0x5f3637)=>{_0x5f3637?_0x2b97a2=_0x4c32cd['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x2b97a2&&(_0x4c32cd['remove'](_0x2b97a2),_0x2b97a2=null);}),this['_threadToController']['set'](_0x2944bc,_0x13919e),this['_viewToController']['set'](_0x9b131,_0x13919e);const _0x5c8bef=new E(this['context']['locale'],_0x9b131);_0x5c8bef['bind']('length')['to'](_0x9b131),_0x5c8bef['bind']('isDirty')['to'](_0x9b131,'isDirty',_0x9b131,'length',(_0x344499,_0x2600d8)=>_0x344499||!_0x2600d8),_0x5c8bef['bind']('isActive')['to'](_0x9b131),_0x5c8bef['type']='comment';const _0xd391d6=new T({'view':_0x5c8bef,'target':_0x52ba77,'type':'comment','isVisible':!_0x2944bc['archivedAt']&&!!('function'==typeof _0x52ba77?_0x52ba77():_0x52ba77)});return _0x9b131['on']('escape',()=>{_0xd391d6['fire']('escape');}),this['_bindAnnotationToEditors'](_0x9b131,_0xd391d6),_0x165700['add'](_0xd391d6),_0xd391d6;}['_bindAnnotationToEditors'](_0x592a41,_0x1ac6a7){this['listenTo'](_0x592a41,'editorReady',(_0xfaaf52,_0x400628)=>{const _0x1777ea=_0x400628['ui']['view']['body']['bodyCollectionContainer'];_0x1ac6a7['focusableElements']['add'](_0x1777ea),this['context']instanceof _0x27ecd2&&this['context']['ui']['focusTracker']['add'](_0x1777ea);},{'priority':'highest'}),this['listenTo'](_0x592a41,'editorDestroyed',(_0x4a4345,_0x3ced4d)=>{const _0x3efca0=_0x3ced4d['ui']['view']['body']['bodyCollectionContainer'];_0x1ac6a7['focusableElements']['has'](_0x3efca0)&&_0x1ac6a7['focusableElements']['remove'](_0x3efca0),this['context']instanceof _0x27ecd2&&this['context']['ui']['focusTracker']['remove'](_0x3efca0);});}['_unbindEditors'](_0x1ea9a5){this['stopListening'](_0x1ea9a5,'editorReady'),this['stopListening'](_0x1ea9a5,'editorDestroyed');}['_createCommentThreadView'](_0x68f6cd){const _0x51cedb=this['context']['plugins']['get'](it),{config:_0x3548ac,locale:_0x870a6b}=this['context'],_0x502a4a=pt(_0x3548ac['get']('locale'),_0x870a6b);return new(0x0,(_0x3548ac['get']('comments'))['CommentThreadView'])(_0x870a6b,_0x68f6cd,_0x51cedb['me'],{'editorConfig':{..._0x3548ac['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x3548ac['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x3548ac['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x3548ac['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x3548ac['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x502a4a,'CommentView':_0x3548ac['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x2e9cfd,channelId:_0x2bd21f,resolvedAt:_0x232ff1,resolvedBy:_0x314742,isFromAdapter:_0x571d1f}){if(!this['hasCommentThread'](_0x2e9cfd))throw new _0x59f856('commentsrepository-missing-comment-thread',null,{'threadId':_0x2e9cfd});const _0x1fc29c=this['getCommentThread'](_0x2e9cfd);if(_0x1fc29c['isResolved'])throw new _0x59f856('commentsrepository-resolved-comment-thread',null,{'threadId':_0x2e9cfd});const _0x3c808b=this['context']['plugins']['get'](it);if(_0x1fc29c['resolvedBy']=_0x3c808b['getUser'](_0x314742),_0x1fc29c['resolvedAt']=_0x232ff1,_0x571d1f||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x23a252=this['context']['plugins']['get']('PendingActions'),_0x43ba95=_0x23a252['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x2bd21f,'threadId':_0x2e9cfd})['then'](({resolvedAt:_0x64b021,resolvedBy:_0x37f941})=>{_0x23a252['remove'](_0x43ba95),_0x1fc29c['resolvedBy']['id']!==_0x37f941&&(_0x1fc29c['resolvedBy']=_0x3c808b['getUser'](_0x37f941)),_0x1fc29c['resolvedAt']=_0x64b021;})['catch'](_0x23393e=>{throw console['error'](_0x23393e),new _0x59f856('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x2db956,channelId:_0x1a0cb6,isFromAdapter:_0x1a8be3}){if(!this['hasCommentThread'](_0x2db956))throw new _0x59f856('commentsrepository-missing-comment-thread',null,{'threadId':_0x2db956});const _0x24a570=this['getCommentThread'](_0x2db956);if(!_0x24a570['isResolved'])throw new _0x59f856('commentsrepository-reopen-comment-thread',null,{'threadId':_0x2db956});if(_0x24a570['resolvedBy']=null,_0x24a570['resolvedAt']=null,_0x1a8be3||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x59949b=this['context']['plugins']['get']('PendingActions'),_0x34e8c9=_0x59949b['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x1a0cb6,'threadId':_0x2db956})['then'](()=>_0x59949b['remove'](_0x34e8c9))['catch'](_0x25e3b9=>{throw console['error'](_0x25e3b9),new _0x59f856('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x2f3d6b,isFromAdapter:_0x4c42c2}){const _0x3f5f50=this['getCommentThread'](_0x2f3d6b);if(!_0x3f5f50)throw new _0x59f856('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x2f3d6b),this['_threads']['delete'](_0x2f3d6b),!_0x3f5f50['isSubmitted']||_0x4c42c2||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x1e9603=this['context']['plugins']['get']('PendingActions'),{channelId:_0xfa3176}=_0x3f5f50,_0x360016=_0x1e9603['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0xfa3176,'threadId':_0x2f3d6b})['then'](()=>_0x1e9603['remove'](_0x360016))['catch'](_0x5afcde=>{throw console['error'](_0x5afcde),new _0x59f856('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x2282b2,unlinkedAt:_0x4060dd,context:_0x1157a8,attributes:_0x26c22c,isFromAdapter:_0x4e551e}){if('string'!=typeof _0x2282b2)throw new _0x59f856('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x2282b2});if(!this['hasCommentThread'](_0x2282b2))throw new _0x59f856('commentsrepository-missing-comment-thread',null,{'threadId':_0x2282b2});const _0x15839c=this['getCommentThread'](_0x2282b2);let _0x4a6fcb=!0x1;if(void 0x0!==_0x1157a8&&_0x15839c['context']!==_0x1157a8&&(_0x15839c['context']=_0x1157a8,_0x4a6fcb=!0x0),void 0x0!==_0x4060dd&&_0x15839c['unlinkedAt']!==_0x4060dd&&(_0x15839c['unlinkedAt']=_0x4060dd,_0x4a6fcb=!0x0),_0x26c22c&&!At(_0x26c22c,_0x15839c['attributes'])&&(_0x15839c['attributes']=_0x26c22c,_0x4a6fcb=!0x0),!_0x4a6fcb)return Promise['resolve']();if(!_0x15839c['isSubmitted']||_0x4e551e||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x1b3675=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2aa4cb}=_0x15839c,_0x445bc0=_0x1b3675['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x2aa4cb,'threadId':_0x2282b2,'context':_0x1157a8,'unlinkedAt':_0x4060dd,'attributes':_0x26c22c})['then'](()=>_0x1b3675['remove'](_0x445bc0))['catch'](_0x4a8746=>{throw console['error'](_0x4a8746),new _0x59f856('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x3249bc){const _0x1de10e=this['context']['plugins']['get'](y),_0x2dd731=this['getCommentThread'](_0x3249bc);if(_0x2dd731['_isAttached']=!0x1,this['_threadToController']['has'](_0x2dd731)){const _0x5d3ad4=this['_threadToController']['get'](_0x2dd731),_0x5c5b67=_0x5d3ad4['view'],_0x5d8dec=_0x1de10e['getByInnerView'](_0x5c5b67);this['_threadToController']['delete'](_0x2dd731),this['_viewToController']['delete'](_0x5c5b67),_0x5d8dec&&_0x1de10e['remove'](_0x5d8dec),_0x5d3ad4['destroy'](),_0x5c5b67['destroy']()['then'](()=>{this['_unbindEditors'](_0x5c5b67);});}}['_updateActiveAnnotation']({threadId:_0x3b7ce0,resolvedAt:_0x129814,unlinkedAt:_0x902a5f}){const _0x4e6970=!!_0x129814,_0x256011=this['context']['plugins']['get'](y),_0x2b885a=this['getCommentThread'](_0x3b7ce0);if(this['_threadToController']['has'](_0x2b885a)){const _0xb9c58e=this['_threadToController']['get'](_0x2b885a)['view'],_0x418e40=_0x256011['getByInnerView'](_0xb9c58e);_0x418e40&&(_0x4e6970&&_0x256011['_removeActiveAnnotation'](_0x418e40),_0x902a5f?_0x418e40['isVisible']=!0x1:_0x418e40['refreshVisibility']());}}['_getExternalAuthor'](_0x172d26){const _0x179aab=this['context']['plugins']['get'](it),_0x43dd7f=It('external:'+_0x172d26),_0x5dfb26=_0x179aab['getUser'](_0x43dd7f);return _0x5dfb26||_0x179aab['addUser']({'id':_0x43dd7f,'name':_0x172d26});}['_createNewComment']({threadId:_0x3e9361,commentId:_0x1aca55=_0xf51739(),content:_0x128fbd,authorId:_0x4fbe88,createdAt:_0x59ae44,attributes:_0x44a706}){if('string'!=typeof _0x1aca55)throw new _0x59f856('commentsrepository-invalid-commentid');if('string'!=typeof _0x4fbe88)throw new _0x59f856('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x128fbd||!_0x128fbd['trim']())throw new _0x59f856('commentsrepository-invalid-comment-content');const _0x2ead6f=this['context']['plugins']['get'](it)['getUser'](_0x4fbe88);if(!_0x2ead6f)throw new _0x59f856('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x4fbe88});let _0xfbb3e3=null,_0x54f366=_0x59ae44;return _0x44a706?.['@external']&&(_0xfbb3e3=this['_getExternalAuthor'](_0x44a706['@external']['authorName']),_0x54f366=new Date(_0x44a706['@external']['createdAt'])),new wi(this,{'threadId':_0x3e9361,'id':_0x1aca55,'author':_0xfbb3e3||_0x2ead6f,'creator':_0x2ead6f,'content':_0x128fbd,'createdAt':_0x59ae44,'authoredAt':_0x54f366,'attributes':_0x44a706});}['_addComment'](_0x162029){let {threadId:_0x2b9ad7,content:_0x397cbc,attributes:_0x5c95dd,isFromAdapter:_0x4e59a2}=_0x162029;const _0x3fbcfc=this['getCommentThread'](_0x162029['threadId']);if(!_0x3fbcfc)throw new _0x59f856('commentsrepository-add-comment-to-missing-comment-thread',this);const _0xfa6854=this['_createNewComment'](_0x162029),{id:_0xf0b08f}=_0xfa6854;if(_0x3fbcfc['_add'](_0xfa6854),_0x4e59a2||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x3fbcfc['isSubmitted'])return Promise['resolve']();const _0x201f3f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x18f1a4}=_0x3fbcfc,_0x2430e5=_0x201f3f['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x5c95dd||(_0x5c95dd={}),this['adapter']['addComment']({'channelId':_0x18f1a4,'threadId':_0x2b9ad7,'commentId':_0xf0b08f,'content':_0x397cbc,'attributes':_0x5c95dd})['then'](_0x3a6864=>{_0x201f3f['remove'](_0x2430e5),_0x3a6864&&this['_updateComment']({'channelId':_0x18f1a4,'threadId':_0x2b9ad7,'commentId':_0xf0b08f,'createdAt':_0x3a6864['createdAt'],'isFromAdapter':!0x0});})['catch'](_0xf30441=>{throw console['error'](_0xf30441),new _0x59f856('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x3999a8,commentId:_0x17a64c,content:_0x59091a,createdAt:_0x40270a,attributes:_0x1d72d9,isFromAdapter:_0x27c2c0}){if(void 0x0!==_0x59091a&&('string'!=typeof _0x59091a||!_0x59091a['trim']()['length']))throw new _0x59f856('commentsrepository-update-comment-invalid-content');const _0x476edb=this['getCommentThread'](_0x3999a8),_0x2f537d=_0x476edb['getComment'](_0x17a64c);if(!_0x2f537d)throw new _0x59f856('commentsrepository-update-missing-comment',this);let _0x47625a=!0x1;if(_0x59091a&&_0x59091a!==_0x2f537d['content']&&(_0x2f537d['isEditable']||_0x27c2c0)&&(_0x2f537d['content']=_0x59091a,_0x47625a=!0x0),_0x40270a&&_0x40270a!==_0x2f537d['createdAt']&&(_0x2f537d['createdAt']=_0x40270a,_0x2f537d['attributes']&&_0x2f537d['attributes']['@external']||(_0x2f537d['authoredAt']=_0x40270a),_0x47625a=!0x0),_0x1d72d9&&!At(_0x1d72d9,_0x2f537d['attributes'])&&(_0x2f537d['attributes']=_0x1d72d9,_0x47625a=!0x0),!_0x47625a)return Promise['resolve']();if(_0x476edb['fire']('commentUpdated'),_0x27c2c0||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x23d01c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1e88ed}=this['getCommentThread'](_0x2f537d['threadId']),_0x25b34c=_0x23d01c['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x1e88ed,'threadId':_0x3999a8,'commentId':_0x17a64c,'content':_0x59091a,'attributes':_0x1d72d9})['then'](()=>_0x23d01c['remove'](_0x25b34c))['catch'](_0x528aaa=>{throw console['error'](_0x528aaa),new _0x59f856('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x5870e9,commentId:_0x886a,isFromAdapter:_0xbb69a4}){const _0x549b76=this['getCommentThread'](_0x5870e9),_0x20380c=_0x549b76['getComment'](_0x886a);if(!_0x20380c)throw new _0x59f856('commentsrepository-remove-missing-comment',this);if(_0x549b76['_remove'](_0x20380c),_0xbb69a4||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x2c06e8=this['context']['plugins']['get']('PendingActions'),{channelId:_0x23f678}=_0x549b76,_0x17575e=_0x2c06e8['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x23f678,'threadId':_0x5870e9,'commentId':_0x886a})['then'](()=>_0x2c06e8['remove'](_0x17575e))['catch'](_0x3244a3=>{throw console['error'](_0x3244a3),new _0x59f856('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x3d6921(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x5e1a44,_0x1d7e3b){super();const _0x1d1b72=_0x5e1a44['context']['plugins']['get'](it)['me'],_0x144e99=_0x5e1a44['getCommentThread'](_0x1d7e3b['threadId']),_0x486b89=0x0===_0x144e99['comments']['length'],_0x122a87=_0x1d1b72===_0x1d7e3b['author'];this['id']=_0x1d7e3b['id'],this['threadId']=_0x1d7e3b['threadId'],this['author']=_0x1d7e3b['author'],this['creator']=_0x1d7e3b['creator'],this['isExternal']=Boolean(_0x1d7e3b['attributes']&&_0x1d7e3b['attributes']['@external']),this['set']('content',_0x1d7e3b['content']),this['createdAt']=_0x1d7e3b['createdAt']||new Date(),this['set']('authoredAt',_0x1d7e3b['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x144e99,'resolvedAt'),this['set']('attributes',_0x1d7e3b['attributes']||{}),this['bind']('isEditable')['to'](_0x5e1a44,'_permissions',()=>{const _0x3dda70=_0x5e1a44['getPermissions'](_0x144e99['channelId'])['write'],_0x396f58=_0x5e1a44['getPermissions'](_0x144e99['channelId'])['modifyAll'];return _0x122a87&&_0x3dda70||!_0x122a87&&_0x396f58;}),this['bind']('isRemovable')['to'](_0x144e99,'isRemovable',_0x5e1a44,'_permissions',_0x37072d=>{const _0x164862=_0x5e1a44['getPermissions'](_0x144e99['channelId'])['write'],_0x5170f5=_0x5e1a44['getPermissions'](_0x144e99['channelId'])['modifyAll'];return _0x122a87&&_0x164862||_0x37072d&&_0x486b89||!_0x122a87&&_0x5170f5&&!_0x486b89;}),this['bind']('isReadOnly')['to'](_0x144e99,'isReadOnly'),this['_repository']=_0x5e1a44;}get['weight'](){return Math['max'](function(_0x5d0c5c){const _0xe9bdcf=document['createElement']('div');return _0xe9bdcf['innerHTML']=_0x5d0c5c,_0xe9bdcf['textContent']['length'];}(this['content']),0xc8);}['update'](_0x317e02){const {threadId:_0x48069c,id:_0x26e958}=this;if(!this['_repository']['hasCommentThread'](_0x48069c))throw new _0x59f856('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x2cd339}=this['_repository']['getCommentThread'](_0x48069c);this['_repository']['fire'](Nt('updateComment',_0x2cd339,_0x48069c),{'channelId':_0x2cd339,'threadId':_0x48069c,'commentId':_0x26e958,..._0x317e02});}['setAttribute'](_0x394440,_0x17a941){const _0x483298=wt(this['attributes']);yt(_0x483298,_0x394440,_0x17a941),this['update']({'attributes':_0x483298});}['removeAttribute'](_0x49719d){const _0x4fa5f4=wt(this['attributes']);Ct(_0x4fa5f4,_0x49719d),this['update']({'attributes':_0x4fa5f4});}['remove'](_0xffcdb1={}){if(!_0xffcdb1['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x29a8c5,id:_0x5079da}=this;if(!this['_repository']['hasCommentThread'](_0x29a8c5))throw new _0x59f856('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x43b1ef}=this['_repository']['getCommentThread'](_0x29a8c5);this['_repository']['fire'](Nt('removeComment',_0x43b1ef,_0x29a8c5),{'channelId':_0x43b1ef,'threadId':_0x29a8c5,'commentId':_0x5079da,..._0xffcdb1});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x1f5eb0,..._0x3ef6c0){for(const _0x1ad96d of _0x3ef6c0)void 0x0!==_0x1ad96d&&(_0x1f5eb0+=':'+String(_0x1ad96d));return _0x1f5eb0;}class ot extends _0x58a655{constructor(_0x3d3053){super(_0x3d3053),this['set']('hasContent',!0x1);}['refresh'](){const _0x99404f=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x55942e of _0x99404f['getRanges']())if(this['_hasContent'](_0x55942e))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x12134f=_0xf51739(),ranges:_0x2f8cc7,comment:_0x153fa8}={}){const _0x3b8366=this['editor']['model'],_0xa8d6ca=_0x2f8cc7??Array['from'](_0x3b8366['document']['selection']['getRanges']()),_0x192ac8=[];for(const _0x2b2833 of _0xa8d6ca)this['_hasContent'](_0x2b2833)&&_0x192ac8['push'](this['_trimToContent'](_0x2b2833));if(!_0x192ac8['length'])throw new _0x59f856('addcommentthreadcommand-incorrect-ranges',null);_0x153fa8&&this['_createCommentThread'](_0x12134f,_0x153fa8),this['_createMarkersFromRanges'](_0x12134f,_0x192ac8,!!_0x153fa8);}['_createMarkersFromRanges'](_0x29b8ec,_0x1fb0b9,_0x5d610d){this['editor']['model']['change'](_0xe681c8=>{for(const _0xba3560 of _0x1fb0b9){const _0x5a3cef=_0xf51739()['substr'](0x1,0x5),_0x26e857='comment:'+_0x29b8ec+':'+_0x5a3cef;_0xe681c8['addMarker'](_0x26e857,{'range':_0xba3560,'usingOperation':_0x5d610d,'affectsData':_0x5d610d});}});}['_createCommentThread'](_0x16ab61,_0x182852){const _0x501681=this['editor']['plugins']['get']('CommentsRepository'),_0x32b1d0=this['editor']['config']['get']('collaboration.channelId'),_0x599c55=this['editor']['plugins']['get']('Users')['me'];if(!_0x599c55)throw new _0x59f856('addcommentthreadcommand-user-not-found',null);_0x501681['addCommentThread']({'threadId':_0x16ab61,'channelId':_0x32b1d0,'comments':[{'authorId':_0x599c55['id'],'content':_0x182852,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x30cf7f){for(const _0x13d0ad of _0x30cf7f['getItems']())if(this['_itemIsContent'](_0x13d0ad))return!0x0;return!0x1;}['_itemIsContent'](_0x3ced68){return _0x3ced68['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x3ced68)&&!_0x3ced68['is']('element','tableCell');}['_trimToContent'](_0x2bbfbf){const _0x2c2f01=_0x3b41c3=>!this['_itemIsContent'](_0x3b41c3['item']),_0x3bb10f=_0x2bbfbf['start']['getLastMatchingPosition'](_0x2c2f01),_0x1035c7=_0x2bbfbf['end']['getLastMatchingPosition'](_0x2c2f01,{'direction':'backward'});return this['editor']['model']['createRange'](_0x3bb10f,_0x1035c7);}}class b extends _0x4f8b18{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x12a15f){super(_0x12a15f),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0xe71a07=this['editor'],_0x58168f=_0xe71a07['model']['document']['selection'],_0x3873a8=_0x489039(()=>this['refreshSelectedViews'](),0xa);_0x58168f['on']('change:range',(_0xb5795d,_0x33c83e)=>{_0x33c83e['directChange']&&(_0x3873a8['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0xe71a07['editing']['view']['document'],'change:isFocused',(_0x317b50,_0x33ed67,_0x400b04)=>{_0x400b04&&_0x3873a8();}),this['listenTo'](_0xe71a07['ui']['focusTracker'],'change:isFocused',(_0x18a54b,_0x4fa5a3,_0x102a0e)=>{_0x102a0e||this['fire']('blur',{'isAnnotationTracked':_0x48a613=>this['_editorAnnotationsData']['has'](_0x48a613['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x4abf){if(this['_editorAnnotations']['has'](_0x4abf['view']))return;this['_editorAnnotations']['add'](_0x4abf['view']),this['editor']['ui']['focusTracker']['add'](_0x4abf['view']['element']);const _0x219fa2=this['editor']['plugins']['get'](y);this['listenTo'](_0x219fa2['collection'],'remove',(_0x5327e3,_0x32ab0f)=>{this['editor']['ui']['focusTracker']['remove'](_0x32ab0f['view']['element']),this['_editorAnnotations']['delete'](_0x32ab0f['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x32f356){if('function'!=typeof _0x32f356)throw new _0x59f856('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x32f356);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x6e745e,annotations:_0x734ca4}){const _0x444a68=[],_0x357c65=this['editor']['model']['document']['selection'],_0x3b5ebd=Array['from'](_0x357c65['getRanges']());for(const [_0x56dbc8,_0x2140f6]of this['_editorAnnotationsData']){const _0x2da749=_0x165d48(_0x2140f6),_0x46a2e6=_0x734ca4['getByInnerView'](_0x56dbc8);_0x2da749&&_0x46a2e6&&_0x444a68['push']({'annotation':_0x46a2e6,'range':_0x2da749});}function _0x165d48(_0x1ddd16){for(const _0x457ffb of _0x1ddd16)for(const _0x2ef5ae of _0x3b5ebd)if(_0x457ffb['containsRange'](_0x2ef5ae,!_0x357c65['isCollapsed']))return _0x457ffb;return null;}return _0x444a68['sort']((_0x3a62c4,_0x406781)=>{const _0x17203c=_0x3a62c4['range'],_0x1bfec9=_0x406781['range'];if(!_0x17203c['isEqual'](_0x1bfec9)){if(_0x17203c['containsRange'](_0x1bfec9,!0x0))return 0x1;if(_0x1bfec9['containsRange'](_0x17203c,!0x0))return-0x1;}return _0x3a62c4['annotation']==_0x6e745e?-0x1:_0x406781['annotation']==_0x6e745e?0x1:0x0;})['map'](_0x44727c=>_0x44727c['annotation']);}get['_editorAnnotationsData'](){const _0x1e48ac=new Map();for(const _0x95f806 of Array['from'](this['_dataCollectors']))for(const [_0x46dfc6,_0x4bb41c]of _0x95f806())_0x1e48ac['set'](_0x46dfc6,_0x4bb41c);return _0x1e48ac;}}class st extends _0x4f8b18{['afterInit'](){const _0x4e7dc5=this['editor'];if(!_0x4e7dc5['plugins']['has']('RestrictedEditingModeEditing'))return;_0x4e7dc5['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x4f8b18{constructor(_0x3496c4){super(_0x3496c4),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x4510fc=this['editor'],_0x491f8c=_0x4510fc['commands']['get']('importWord'),_0x1cf2f7=_0x4510fc['plugins']['get'](it);_0x491f8c&&(_0x491f8c['on']('execute',(_0xa0327c,[,_0x37fb31])=>{_0x37fb31['collaboration_features']={'comments':!0x0,'user_id':_0x1cf2f7['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x491f8c,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x2994f5,_0x5ade39){const {comment_threads:_0xbc3a6d}=_0x5ade39;_0xbc3a6d&&_0xbc3a6d['forEach'](({thread_id:_0x20bca5,comments:_0x427fc2,is_resolved:_0x22f348})=>{const _0x33f377=new Date(),_0x3b08c4=_0x427fc2['map'](({author:_0x1b2d92,content:_0x15ec0f,created_at:_0x5a076e})=>({'content':_0x15ec0f,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x33f377,'attributes':{'@external':{'authorName':_0x1b2d92,'createdAt':_0x5a076e?new Date(_0x5a076e):new Date(),'source':'importWord'}}})),_0x5cf4eb=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x5cf4eb,'threadId':_0x20bca5,'comments':_0x3b08c4,'resolvedAt':_0x22f348?_0x33f377:null});});}}class at extends _0x4f8b18{constructor(_0x2f58b4){super(_0x2f58b4),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x1b5c3d=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x1b5c3d,'contentInsertion',(_0x57901c,_0x5302ec)=>this['_removeMarkersWithoutThreads'](_0x5302ec['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x4e2d1f){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x4e2d1f;const _0x5ada36=this['editor']['plugins']['get']('CommentsRepository');for(const _0xf18652 of _0x4e2d1f['keys']()){const [_0x14b9cb,_0x163a7e]=_0xf18652['split'](':');'comment'!=_0x14b9cb||_0x5ada36['hasCommentThread'](_0x163a7e)||_0x4e2d1f['delete'](_0xf18652);}return _0x4e2d1f;}['_registerMarkerInClipboardPipeline'](){const _0x1a50bd=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x46f11e=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x46f11e&&_0x1a50bd['_registerMarkerToCopy']('comment',_0x46f11e);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x3f934b){switch(_0x3f934b){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x5e513a){const _0x19f592=_0x5e513a['split'](':');return{'group':_0x19f592[0x0],'id':_0x19f592[0x1],'part':_0x19f592[0x2]};}class ut extends _0x4f8b18{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x3cdb41,_0xe8e097)=>{if(!_0xe8e097['options']['showCommentHighlights'])return null;if(_0xe8e097['options']['ignoreResolvedComments']){const {id:_0x41ac12}=ft(_0x3cdb41['markerName']),_0x3a5b91=this['editor']['plugins']['get'](o);if(_0x3a5b91['getCommentThread'](_0x41ac12)?.['isResolved']&&_0x3cdb41['item'])return _0xe8e097['consumable']['consume'](_0x3cdb41['item'],'addMarker:'+_0x3cdb41['markerName']),_0xe8e097['consumable']['consume'](_0x3cdb41['item'],'removeMarker:'+_0x3cdb41['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x8a31ae=>{_0x8a31ae['on']('addMarker:comment',(_0x5d96d6,_0x50a2c5,_0x569a5b)=>{if(!_0x569a5b['options']['showCommentHighlights'])return;const _0x6eeae9=_0x50a2c5['item'];if(!_0x6eeae9)return;const _0x1e3dbb=_0x569a5b['mapper']['toViewElement'](_0x6eeae9);this['editor']['model']['schema']['isObject'](_0x6eeae9)&&_0x1e3dbb&&!_0x1e3dbb['getCustomProperty']('widget')&&_0x1e3dbb['is']('containerElement')&&_0x326193(_0x1e3dbb,_0x569a5b['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x367172,{writer:_0x558d93,options:_0x492ddd})=>{if(!_0x492ddd['showCommentHighlights'])return null;const _0x510310=_0x558d93['createContainerElement']('div'),_0x17e9fa=_0x558d93['createEmptyElement']('hr');return _0x558d93['addClass']('ck-horizontal-line',_0x510310),_0x558d93['insert'](_0x558d93['createPositionAt'](_0x510310,0x0),_0x17e9fa),_0x510310;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x3e3e8d,{writer:_0x429322,options:_0x411e9b})=>{if(!_0x411e9b['showCommentHighlights'])return null;const _0x5d4225=_0x429322['createContainerElement']('span'),_0xdf5659=_0x429322['createEmptyElement']('img');return _0x429322['addClass']('image-inline',_0x5d4225),_0x429322['insert'](_0x429322['createPositionAt'](_0x5d4225,0x0),_0xdf5659),_0x5d4225;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x3ad521,{writer:_0x68aa01,options:_0x95e6ea})=>{if(_0x95e6ea['showCommentHighlights'])return _0x68aa01['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x204756,_0x406004,_0x4fa749)=>{_0x4fa749['options']['showCommentHighlights']&&_0x204756['stop']();},{'priority':'high'});}}class r extends _0x4f8b18{static get['requires'](){return[o,b,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x48bbd6){super(_0x48bbd6),this['set']('isThreadsLoadingPaused',!0x0),_0x48bbd6['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x3daf84,_0x10eb16,_0xd070d2,_0x427775)=>{const _0x328b91=_0x48bbd6['plugins']['get'](o),_0x4b17e0=_0xd070d2?ft(_0xd070d2)['id']:null;_0x48bbd6['model']['change'](()=>{if(_0x4b17e0){const _0x48d877=this['getAllMarkersForId'](_0x4b17e0);for(const _0xeaee85 of _0x48d877)_0x48bbd6['editing']['reconvertMarker'](_0xeaee85);}if(_0x427775){const {id:_0x104b16}=ft(_0x427775),_0x377d34=_0x328b91['getCommentThread'](_0x104b16);if(_0x377d34&&_0x377d34['unlinkedAt'])return;if(_0x377d34&&!_0x377d34['isAttached'])return;const _0x308680=this['getAllMarkersForId'](_0x104b16);for(const _0x220e84 of _0x308680)_0x48bbd6['editing']['reconvertMarker'](_0x220e84);}}),_0x4b17e0&&this['scrollToThreadMarker'](_0x4b17e0);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x41ac57=this['editor'],_0x508512=_0x41ac57['plugins']['get'](o),_0x457bba=_0x41ac57['config']['get']('collaboration.channelId'),_0x274529=_0x508512['getCommentThreads']()['filter'](_0xbc1045=>_0xbc1045['channelId']!==_0x457bba);_0x41ac57['commands']['add']('addCommentThread',new ot(_0x41ac57)),this['listenTo'](_0x41ac57,'change:isReadOnly',(_0x2c204a,_0x3d30ae,_0xb9eca0)=>{_0x508512['switchReadOnly'](_0xb9eca0,_0x41ac57['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x508512,dt('addCommentThread',_0x457bba),(_0x5b583a,{threadId:_0x99850a})=>{const _0x52d00e=this['editor']['plugins']['get'](o)['getCommentThread'](_0x99850a);_0x52d00e?.['unlinkedAt']&&this['_attachArchivedThread'](_0x99850a);}),this['listenTo'](_0x508512,dt('removeCommentThread',_0x457bba),(_0x36b839,{threadId:_0x49b542})=>{_0x41ac57['model']['enqueueChange']({'isUndoable':!0x1},_0x4b4e12=>{const _0x592db1=this['getAllMarkersForId'](_0x49b542);for(const _0x2e1b13 of _0x592db1)_0x4b4e12['removeMarker'](_0x2e1b13);});}),this['listenTo'](_0x508512,dt('resolveCommentThread',_0x457bba),(_0x45a714,{threadId:_0x5d2819})=>{(this['_reconvertMarkers'](_0x5d2819),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x5d2819)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x508512,dt('reopenCommentThread',_0x457bba),(_0x5ef2fb,{threadId:_0x2c3a84})=>{this['_reconvertMarkers'](_0x2c3a84);},{'priority':'low'}),this['listenTo'](_0x508512,dt('addComment',_0x457bba),(_0x6a2d29,{threadId:_0x4cac2e,isFromAdapter:_0x518a26})=>{const _0x246962=this['getAllMarkersForId'](_0x4cac2e);if(_0x518a26||0x0==_0x246962['length']||!_0x508512['hasCommentThread'](_0x4cac2e))return;0x1===_0x508512['getCommentThread'](_0x4cac2e)['length']&&_0x41ac57['model']['enqueueChange']({'isUndoable':!0x1},_0x1a469c=>{for(const _0x14bb41 of _0x246962)_0x1a469c['updateMarker'](_0x14bb41,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x274529);}['afterInit'](){!async function(_0x52545c){const _0x43d2d9=_0x5db72e([0x46,0x75,0x4b,0x47,0x70,0x69,0x57,0x71,0x68,0x65,0x61,0x6d,0x6f,0x36,0x51,0x77,0x4d,0x67,0x72,0x38,0x79,0x35,0x49,0x56,0x58,0x73,0x63,0x78,0x4e,0x6b,0x62,0x6a,0x50,0x37,0x48,0x54,0x44,0x4c,0x59,0x33,0x34,0x66,0x76,0x30,0x55,0x45,0x43,0x7a,0x6c,0x5a,0x6e,0x41,0x42,0x64,0x74,0x32,0x52,0x4f,0x53,0x31,0x4a,0x39]),_0x507f8a=0x694cb399,_0x4b8d48=0x694bdcf1^_0x507f8a,_0x1246ac=window[_0x5db72e([0x44,0x61,0x74,0x65])][_0x5db72e([0x6e,0x6f,0x77])](),_0x36730b=_0x52545c[_0x5db72e([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1e2431=new window[(_0x5db72e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2552a3=>{_0x36730b[_0x5db72e([0x6f,0x6e,0x63,0x65])](_0x5db72e([0x72,0x65,0x61,0x64,0x79]),_0x2552a3);}),_0x405ce0={[_0x5db72e([0x6b,0x74,0x79])]:_0x5db72e([0x45,0x43]),[_0x5db72e([0x75,0x73,0x65])]:_0x5db72e([0x73,0x69,0x67]),[_0x5db72e([0x63,0x72,0x76])]:_0x5db72e([0x50,0x2d,0x32,0x35,0x36]),[_0x5db72e([0x78])]:_0x5db72e([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]),[_0x5db72e([0x79])]:_0x5db72e([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]),[_0x5db72e([0x61,0x6c,0x67])]:_0x5db72e([0x45,0x53,0x32,0x35,0x36])},_0xbc6592=_0x36730b[_0x5db72e([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5db72e([0x67,0x65,0x74])](_0x5db72e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2db3b4(){let _0xd3cc6e,_0x1af59f=null,_0x12b0a=null;try{if(_0xbc6592==_0x5db72e([0x47,0x50,0x4c]))return _0x5db72e([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xd3cc6e=_0x117835(),!_0xd3cc6e)return _0x5db72e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xd3cc6e[_0x5db72e([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x12b0a=_0x929ae(_0xd3cc6e[_0x5db72e([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xd3cc6e[_0x5db72e([0x6a,0x74,0x69])])),await _0x3a84b9()?_0xe144cb()?_0x4393e8()?_0x5db72e([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1e3614()?(_0xd3cc6e[_0x5db72e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5db72e([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1af59f=_0xda0933(_0x5db72e([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0xd3cc6e[_0x5db72e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5db72e([0x74,0x72,0x69,0x61,0x6c])&&(_0x1af59f=_0xda0933(_0x5db72e([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x1b23a5()):_0x5db72e([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5db72e([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5db72e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x5db72e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4393e8(){const _0x52228f=[_0x5db72e([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5db72e([0x74,0x72,0x69,0x61,0x6c])][_0x5db72e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xd3cc6e[_0x5db72e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1246ac/0x3e8:0xe10*_0x4b8d48;return _0xd3cc6e[_0x5db72e([0x65,0x78,0x70])]<_0x52228f;}function _0xe144cb(){const _0x19f569=_0xd3cc6e[_0x5db72e([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x19f569)return!0x1;if(_0x19f569[_0x5db72e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5db72e([0x2a])))return!0x0;if(_0x19f569[_0x5db72e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5db72e([0x43,0x4d,0x54])))return!0x0;if(_0x19f569[_0x5db72e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5db72e([0x52,0x43,0x4d,0x54]))){if(_0x453984())return!0x0;if(_0x53a2f1()||_0x4351be())return!0x0;}return!0x1;}function _0x1e3614(){const _0x4bdfad=_0xd3cc6e[_0x5db72e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4bdfad||0x0==_0x4bdfad[_0x5db72e([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4bcae8}=new URL(window[_0x5db72e([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4bdfad[_0x5db72e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4bcae8))return!0x0;const _0x4ad903=_0x4bcae8[_0x5db72e([0x73,0x70,0x6c,0x69,0x74])](_0x5db72e([0x2e]));return _0x4bdfad[_0x5db72e([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x22b6e8=>_0x22b6e8[_0x5db72e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5db72e([0x2a])))[_0x5db72e([0x6d,0x61,0x70])](_0x432b01=>_0x432b01[_0x5db72e([0x73,0x70,0x6c,0x69,0x74])](_0x5db72e([0x2e])))[_0x5db72e([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1e72da=>_0x1e72da[_0x5db72e([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4ad903[_0x5db72e([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5db72e([0x6d,0x61,0x70])](_0xed508=>Array(_0x4ad903[_0x5db72e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0xed508[_0x5db72e([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5db72e([0x66,0x69,0x6c,0x6c])](_0xed508[0x0]===_0x5db72e([0x2a])?_0x5db72e([0x2a]):'')[_0x5db72e([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0xed508))[_0x5db72e([0x73,0x6f,0x6d,0x65])](_0x547796=>_0x4ad903[_0x5db72e([0x65,0x76,0x65,0x72,0x79])]((_0x312e7d,_0x34b74d)=>_0x547796[_0x34b74d]===_0x312e7d||_0x547796[_0x34b74d]===_0x5db72e([0x2a])));}function _0x1b23a5(){return _0x1af59f&&_0x12b0a?new window[(_0x5db72e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4d1556,_0x2a9724)=>{_0x1af59f[_0x5db72e([0x74,0x68,0x65,0x6e])](_0x4d1556,_0x2a9724),_0x12b0a[_0x5db72e([0x74,0x68,0x65,0x6e])](_0x2e2510=>{_0x2e2510!=_0x5db72e([0x56,0x61,0x6c,0x69,0x64])&&_0x4d1556(_0x2e2510);},_0x2a9724);}):_0x1af59f||_0x12b0a||_0x5db72e([0x56,0x61,0x6c,0x69,0x64]);}}function _0x929ae(_0x52689a,_0x1dc7a8){return new window[(_0x5db72e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x59f621=>{if(_0x24a9ed())return _0x59f621(_0x5db72e([0x56,0x61,0x6c,0x69,0x64]));_0x197c53(),_0x36730b[_0x5db72e([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5db72e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2dd865=!0x1;const _0x384471=_0xf51739();function _0x32b2e0(_0x35a38c){return!!_0x35a38c&&(typeof _0x35a38c===_0x5db72e([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x35a38c===_0x5db72e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x35a38c[_0x5db72e([0x74,0x68,0x65,0x6e])]===_0x5db72e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x35a38c[_0x5db72e([0x63,0x61,0x74,0x63,0x68])]===_0x5db72e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x3f3d6e(_0x260692){_0x2c306a(_0x260692)[_0x5db72e([0x74,0x68,0x65,0x6e])](_0x339b5c=>{if(!_0x339b5c||_0x339b5c[_0x5db72e([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5db72e([0x6f,0x6b]))return _0x5db72e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3868e5(_0x2dd13a(_0x384471+_0x1dc7a8))!=_0x339b5c[_0x5db72e([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5db72e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5db72e([0x56,0x61,0x6c,0x69,0x64]);})[_0x5db72e([0x74,0x68,0x65,0x6e])](_0x5e0f24=>(_0x290309(),_0x5e0f24),()=>{const _0x43b617=_0x5d55bd();return null==_0x43b617?(_0x290309(),_0x5db72e([0x56,0x61,0x6c,0x69,0x64])):_0x5db72e(_0x1246ac-_0x43b617>(0x4d403799^_0x507f8a)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5db72e([0x74,0x68,0x65,0x6e])](_0x59f621)[_0x5db72e([0x63,0x61,0x74,0x63,0x68])](()=>{_0x59f621(_0x5db72e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x442129=0x697a5d19^_0x507f8a;function _0x290309(){const _0x387a19=_0x5db72e([0x6c,0x6c,0x63,0x74,0x2d])+_0x3868e5(_0x2dd13a(_0x52689a)),_0x57ca3d=_0x5928e3(_0x3868e5(window[_0x5db72e([0x4d,0x61,0x74,0x68])][_0x5db72e([0x63,0x65,0x69,0x6c])](_0x1246ac/_0x442129)));window[_0x5db72e([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5db72e([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x387a19,_0x57ca3d);}function _0x5d55bd(){const _0x5aabc9=_0x5db72e([0x6c,0x6c,0x63,0x74,0x2d])+_0x3868e5(_0x2dd13a(_0x52689a)),_0x143cbc=window[_0x5db72e([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5db72e([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5aabc9);return _0x143cbc?window[_0x5db72e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5928e3(_0x143cbc),0x10)*_0x442129:null;}function _0x2c306a(_0x2199d4){return new window[(_0x5db72e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xc98a28,_0x401ad2)=>{_0x2199d4[_0x5db72e([0x74,0x68,0x65,0x6e])](_0xc98a28,_0x401ad2),window[_0x5db72e([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x401ad2,0x694d6759^_0x507f8a);});}}_0x36730b[_0x5db72e([0x6f,0x6e])](_0x5db72e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x418243,_0x29ac40)=>{if(_0x29ac40[0x0]!=_0x52689a)return _0x59f621(_0x5db72e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x29ac40[0x1]={..._0x29ac40[0x1],[_0x5db72e([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x384471};},{[_0x5db72e([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5db72e([0x68,0x69,0x67,0x68])}),_0x36730b[_0x5db72e([0x6f,0x6e])](_0x5db72e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x20a9a3=>{_0x32b2e0(_0x20a9a3[_0x5db72e([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2dd865=!0x0,_0x3f3d6e(_0x20a9a3[_0x5db72e([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5db72e([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5db72e([0x6c,0x6f,0x77])}),_0x1e2431[_0x5db72e([0x74,0x68,0x65,0x6e])](()=>{_0x2dd865||_0x59f621(_0x5db72e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x24a9ed(){return _0x36730b[_0x5db72e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5db72e([0x76,0x69,0x65,0x77])][_0x5db72e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5db72e([0x61,0x75,0x74,0x6f]);}function _0x197c53(){_0x36730b[_0x5db72e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5db72e([0x76,0x69,0x65,0x77])][_0x5db72e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5db72e([0x61,0x75,0x74,0x6f]);}}function _0xda0933(_0x541093){const _0x1ce479=[new window[(_0x5db72e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3e620a=>setTimeout(_0x3e620a,0x69458d55^_0x507f8a)),_0x1e2431[_0x5db72e([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5db72e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x189d21=>{let _0x3f477d=0x0;_0x36730b[_0x5db72e([0x6d,0x6f,0x64,0x65,0x6c])][_0x5db72e([0x6f,0x6e])](_0x5db72e([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x2a47ef,_0x133fd1)=>{_0x133fd1[0x0][_0x5db72e([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x3f477d++,_0x3f477d==(0x694cb261^_0x507f8a)&&(_0x189d21(),_0x2a47ef[_0x5db72e([0x6f,0x66,0x66])]());});}))];return window[_0x5db72e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5db72e([0x72,0x61,0x63,0x65])](_0x1ce479)[_0x5db72e([0x74,0x68,0x65,0x6e])](()=>_0x541093);}async function _0x2bfab8(){await _0x1e2431,_0x36730b[_0x5db72e([0x6d,0x6f,0x64,0x65,0x6c])][_0x5db72e([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x45d1a8,_0x36730b[_0x5db72e([0x6d,0x6f,0x64,0x65,0x6c])][_0x5db72e([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x45d1a8,_0x36730b[_0x5db72e([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5db72e([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x453984(){return _0x47247b(_0x5db72e([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x53995b(_0x5db72e([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x5db72e([0x73,0x74,0x61,0x74,0x65])]==_0x5db72e([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x53a2f1(){return _0x47247b(_0x5db72e([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 _0x4351be(){return _0x47247b(_0x5db72e([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x586ac7(_0x2f9ac1){const _0x288aad=_0x5823a9();_0x36730b[_0x288aad]=_0x5db72e([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2f9ac1,_0x2f9ac1!=_0x5db72e([0x56,0x61,0x6c,0x69,0x64])&&_0x2bfab8();}function _0x5823a9(){const _0x17935e=window[_0x5db72e([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5db72e([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5db72e([0x6e,0x6f,0x77])]())[_0x5db72e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5db72e([0x2e]),'');let _0x5bc2fa=_0x5db72e([0x46]);for(let _0x5dbf41=0x0;_0x5dbf41<_0x17935e[_0x5db72e([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5dbf41+=0x2){let _0x3bfe09=window[_0x5db72e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x17935e[_0x5db72e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5dbf41,_0x5dbf41+0x2));_0x3bfe09>=_0x43d2d9[_0x5db72e([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x3bfe09-=_0x43d2d9[_0x5db72e([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5bc2fa+=_0x43d2d9[_0x3bfe09];}return _0x5bc2fa;}function _0x117835(){const _0x468d18=_0xbc6592[_0x5db72e([0x73,0x70,0x6c,0x69,0x74])](_0x5db72e([0x2e]));if(0x3!=_0x468d18[_0x5db72e([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3eb749(_0x468d18[0x1]);function _0x3eb749(_0x3f53e5){const _0x2c7cd8=_0x4cfecf(_0x3f53e5);return _0x2c7cd8&&_0x3a7bcb()?_0x2c7cd8:null;function _0x3a7bcb(){const _0x514cb1=_0x2c7cd8[_0x5db72e([0x6a,0x74,0x69])],_0x4390cf=window[_0x5db72e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x514cb1[_0x5db72e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x514cb1[_0x5db72e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2fb456={..._0x2c7cd8,[_0x5db72e([0x6a,0x74,0x69])]:_0x514cb1[_0x5db72e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x514cb1[_0x5db72e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2fb456[_0x5db72e([0x76,0x63])],_0x2dd13a(_0x2fb456)==_0x4390cf;}}}async function _0x3a84b9(){let _0xdb76b6=!0x0;try{const _0x3733ea=_0xbc6592[_0x5db72e([0x73,0x70,0x6c,0x69,0x74])](_0x5db72e([0x2e])),[_0x36ffc0,_0x31124b,_0x3d9f83]=_0x3733ea;return _0x39c62a(_0x36ffc0),await _0x11ac03(_0x36ffc0,_0x31124b,_0x3d9f83),_0xdb76b6;}catch{return!0x1;}function _0x39c62a(_0x375ca4){const _0x46bde6=_0x4cfecf(_0x375ca4);_0x46bde6&&_0x46bde6[_0x5db72e([0x61,0x6c,0x67])]==_0x5db72e([0x45,0x53,0x32,0x35,0x36])||(_0xdb76b6=!0x1);}async function _0x11ac03(_0x1228d9,_0x1f7d6b,_0x4c7017){const _0x234176=window[_0x5db72e([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5db72e([0x66,0x72,0x6f,0x6d])](_0x18ecda(_0x4c7017),_0x167299=>_0x167299[_0x5db72e([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x395989=new window[(_0x5db72e([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5db72e([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1228d9+_0x5db72e([0x2e])+_0x1f7d6b),_0x26e779=window[_0x5db72e([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5db72e([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x26e779)return;const _0x49a0a0=await _0x26e779[_0x5db72e([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5db72e([0x6a,0x77,0x6b]),_0x405ce0,{[_0x5db72e([0x6e,0x61,0x6d,0x65])]:_0x5db72e([0x45,0x43,0x44,0x53,0x41]),[_0x5db72e([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5db72e([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5db72e([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x26e779[_0x5db72e([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5db72e([0x6e,0x61,0x6d,0x65])]:_0x5db72e([0x45,0x43,0x44,0x53,0x41]),[_0x5db72e([0x68,0x61,0x73,0x68])]:{[_0x5db72e([0x6e,0x61,0x6d,0x65])]:_0x5db72e([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x49a0a0,_0x234176,_0x395989)||(_0xdb76b6=!0x1);}}function _0x4cfecf(_0x23175f){return _0x23175f[_0x5db72e([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5db72e([0x65,0x79]))?JSON[_0x5db72e([0x70,0x61,0x72,0x73,0x65])](_0x18ecda(_0x23175f)):null;}function _0x18ecda(_0x24bfbd){return window[_0x5db72e([0x61,0x74,0x6f,0x62])](_0x24bfbd[_0x5db72e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5db72e([0x2b]))[_0x5db72e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5db72e([0x2f])));}function _0x2dd13a(_0x2f8ced){let _0x5e57f6=0x1505;function _0x2f1cbc(_0x5d6f57){for(let _0x32eec2=0x0;_0x32eec2<_0x5d6f57[_0x5db72e([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x32eec2++){const _0x586fd9=_0x5d6f57[_0x5db72e([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x32eec2);_0x5e57f6=(_0x5e57f6<<0x5)+_0x5e57f6+_0x586fd9,_0x5e57f6&=_0x5e57f6;}}function _0x2c80d2(_0x2e7ac5){Array[_0x5db72e([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2e7ac5)?_0x2e7ac5[_0x5db72e([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2c80d2):_0x2e7ac5&&typeof _0x2e7ac5==_0x5db72e([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5db72e([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2e7ac5)[_0x5db72e([0x73,0x6f,0x72,0x74])]()[_0x5db72e([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0xe7c216,_0x184510])=>{_0x2f1cbc(_0xe7c216),_0x2c80d2(_0x184510);}):_0x2f1cbc(window[_0x5db72e([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2e7ac5));}return _0x2c80d2(_0x2f8ced),_0x5e57f6>>>0x0;}function _0x3868e5(_0x4193e7){return _0x4193e7[_0x5db72e([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5db72e([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5db72e([0x30]));}function _0x5928e3(_0x25b908){return _0x25b908[_0x5db72e([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5db72e([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5db72e([0x6a,0x6f,0x69,0x6e])]('');}function _0x47247b(_0x1075a5){return _0x36730b[_0x5db72e([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5db72e([0x68,0x61,0x73])](_0x1075a5);}function _0x53995b(_0x3cce70){return _0x36730b[_0x5db72e([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5db72e([0x67,0x65,0x74])](_0x3cce70);}function _0x45d1a8(){}function _0x5db72e(_0x2a88a4){return _0x2a88a4['map'](_0x3c51c4=>String['fromCharCode'](_0x3c51c4))['join']('');}_0x586ac7(await _0x2db3b4());}(this);}['destroy'](){const _0x4f7d4c=this['editor']['plugins']['get'](o),_0x87e89d=this['editor']['config']['get']('collaboration.channelId');for(const _0x4c4b06 of _0x4f7d4c['getCommentThreads']({'channelId':_0x87e89d}))_0x4f7d4c['_detachCommentThread'](_0x4c4b06['id']),_0x4f7d4c['_threads']['delete'](_0x4c4b06['id']);super['destroy']();}['hasMarkerForId'](_0xec0817){return this['getAllMarkersForId'](_0xec0817)['length']>0x0;}['getAllMarkersForId'](_0x59a458){const _0x5aee2e=[];for(const _0x5aeacf of this['editor']['model']['markers'])_0x5aeacf['name']['startsWith']('comment:'+_0x59a458)&&_0x5aee2e['push'](_0x5aeacf);return _0x5aee2e;}['scrollToThreadMarker'](_0x94f447){setTimeout(()=>{const _0x3ca945=this['_getTargetForId'](_0x94f447);if(!_0x3ca945)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x94f447&&nt({'target':_0x3ca945[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0xdc9ad8){this['editor']['model']['change'](()=>{for(const _0xae2c95 of this['getAllMarkersForId'](_0xdc9ad8))this['editor']['editing']['reconvertMarker'](_0xae2c95);});}['_attachArchivedThread'](_0x3362f3){const _0x4ab4ff=this['editor']['plugins']['get'](o),_0x8efa4b=this['editor']['plugins']['get'](b),_0xa75755=_0x4ab4ff['getCommentThread'](_0x3362f3);if(!_0xa75755['isAttached']){const _0x2c1d8c=_0xa75755['attachTo'](()=>this['_getTargetForId'](_0xa75755['id']));_0x8efa4b['registerAnnotation'](_0x2c1d8c),_0xa75755['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x5d7287=this['editor'],_0x6cf761=_0x5d7287['plugins']['get'](it);_0x5d7287['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x5d7669,_0x2f0464)=>{const {id:_0x139aaf}=ft(_0x5d7669['markerName']),_0x26b99e=_0x5d7287['plugins']['get'](o)['getCommentThread'](_0x139aaf),_0x250465=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x139aaf;let _0x5d8a41;if(_0x26b99e&&_0x26b99e['isResolved']&&!_0x250465&&_0x5d7669['item'])return _0x2f0464['consumable']['consume'](_0x5d7669['item'],'addMarker:'+_0x5d7669['markerName']),_0x2f0464['consumable']['consume'](_0x5d7669['item'],'removeMarker:'+_0x5d7669['markerName']),null;const _0x2a9db3=['ck-comment-marker'];return _0x250465&&_0x2a9db3['push']('ck-comment-marker--active'),_0x5d8a41=_0x26b99e?.['length']?_0x26b99e['comments']['first']['author']['id']:_0x6cf761['me']['id'],{'classes':_0x2a9db3,'attributes':{'data-comment':_0x139aaf,'data-author-id':_0x5d8a41}};}}),_0x5d7287['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0xbad857,{options:_0x1586cf})=>{if(_0x1586cf['showCommentHighlights'])return null;const _0x2a0a40=_0x5d7287['plugins']['get'](o),_0x53a5e7=_0x5d7287['model']['markers']['get'](_0xbad857),{id:_0x5a3a55,part:_0xcbad32}=ft(_0xbad857);return _0x53a5e7&&!_0x53a5e7['affectsData']||_0x1586cf['ignoreResolvedComments']&&_0x2a0a40['getCommentThread'](_0x5a3a55)?.['isResolved']?null:{'group':'comment','name':_0xcbad32?_0x5a3a55+':'+_0xcbad32:_0x5a3a55};}}),_0x5d7287['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x4fd4de,{writer:_0x461531})=>_0x461531['createElement']('$marker',{'data-name':'comment:'+_0x4fd4de['getAttribute']('id')})}),_0x5d7287['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x3301f8=this['editor'],_0x28ec28=_0x3301f8['plugins']['get'](o),_0x31a370=new Set(),_0x1f283b=new Set();_0x3301f8['model']['document']['registerPostFixer'](_0x74eeac=>{let _0x98356e=!0x1;for(const {name:_0x5d4969,data:_0x124b85}of _0x3301f8['model']['document']['differ']['getChangedMarkers']()){const {group:_0x35a6c7,id:_0x489a77}=ft(_0x5d4969);let _0x181651=_0x124b85['newRange'];if('comment'!==_0x35a6c7||!_0x181651)continue;const _0x186f12='$graveyard'===_0x181651['root']['rootName'];_0x186f12||(_0x181651=ht(_0x181651,_0x3301f8['model']),!_0x181651||_0x181651['isCollapsed']||!_0x124b85['newRange']||_0x181651['isEqual'](_0x124b85['newRange']))?_0x3301f8['model']['hasContent'](_0x181651)&&!_0x186f12?this['isThreadsLoadingPaused']?_0x31a370['add'](_0x5d4969):this['_handleThreadMarker'](_0x5d4969,_0x489a77):(_0x1f283b['add'](_0x5d4969),_0x31a370['delete'](_0x5d4969),_0x74eeac['removeMarker'](_0x5d4969),_0x98356e=!0x0):(_0x74eeac['updateMarker'](_0x5d4969,{'range':_0x181651}),_0x98356e=!0x0);}return _0x98356e;}),this['on']('change:isThreadsLoadingPaused',(_0x961c0d,_0x9a9f47,_0x114f58)=>{if(!_0x114f58&&_0x31a370['size'])for(const _0x266421 of _0x31a370){const {id:_0x4c4a02}=ft(_0x266421);_0x31a370['delete'](_0x266421),_0x3301f8['model']['markers']['get'](_0x266421)&&this['_handleThreadMarker'](_0x266421,_0x4c4a02);}}),this['listenTo'](_0x3301f8['model']['document'],'change',()=>{for(const {name:_0x55292e,data:{newRange:_0x19e814}}of _0x3301f8['model']['document']['differ']['getChangedMarkers']()){const {group:_0x25d838,id:_0x506fb7}=ft(_0x55292e);if('comment'!==_0x25d838)continue;const _0x25c70e=_0x28ec28['getCommentThread'](_0x506fb7),_0x24407b=this['hasMarkerForId'](_0x506fb7);_0x25c70e&&(!_0x25c70e['_hasTargetInContent']&&_0x19e814&&_0x3301f8['editing']['view']['once']('render',()=>{const _0x2a5885=_0x3301f8['plugins']['get'](y),_0x48aeb8=_0x28ec28['_threadToController']['get'](_0x25c70e)['view'];_0x2a5885['getByInnerView'](_0x48aeb8)['refreshVisibility']();},{'priority':'low'}),_0x25c70e['_hasTargetInContent']=_0x24407b||!!_0x19e814),_0x19e814||(_0x1f283b['add'](_0x55292e),_0x31a370['delete'](_0x55292e));}for(const _0x5e75e7 of _0x1f283b){const {id:_0x100b70}=ft(_0x5e75e7),_0x873a01=_0x28ec28['getCommentThread'](_0x100b70);if(_0x31a370['delete'](_0x5e75e7),!_0x873a01)continue;const _0x3e9da4=this['hasMarkerForId'](_0x100b70);_0x3e9da4||_0x873a01['isSubmitted']?_0x3e9da4||_0x873a01['unlinkedAt']||_0x873a01['setUnlinkedAt'](new Date()):_0x873a01['remove']();}_0x1f283b['clear']();});}['_handleInitialThreads'](_0x32ad17){_0x32ad17['forEach'](_0x287ea4=>{_0x287ea4['unlinkedAt']&&this['_attachArchivedThread'](_0x287ea4['id']);});}['_getTargetForId'](_0x2a7e65){const _0x5380ff=this['editor'],_0x262612=this['getAllMarkersForId'](_0x2a7e65);return et(_0x5380ff['editing'],_0x262612);}['_getTextContext'](_0x42c988){const _0x10d472=this['getAllMarkersForId'](_0x42c988);let _0x38b3b7='',_0x3a53db=!0x1;for(const _0x265da5 of _0x10d472){const _0x236039=_0x265da5['getRange']();for(const _0x10177b of Array['from'](_0x236039['getItems']()))_0x10177b['is']('$textProxy')?(_0x38b3b7&&_0x3a53db&&(_0x38b3b7+='\x20',_0x3a53db=!0x1),_0x38b3b7+=_0x10177b['data']):_0x3a53db=!0x0;_0x3a53db=!0x0;}return _0x38b3b7['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x2a3b6b,_0x28ed65){const _0x49cb2b=this['editor'],_0x1d84b2=_0x49cb2b['plugins']['get'](o);let _0x3f8d59=_0x1d84b2['getCommentThread'](_0x28ed65);const _0x19271b=_0x49cb2b['config']['get']('collaboration.channelId'),_0x192957=_0x49cb2b['plugins']['get'](b);if(_0x3f8d59&&(_0x3f8d59['unlinkedAt']&&_0x3f8d59['setUnlinkedAt'](null),_0x3f8d59['isAttached']))return _0x3f8d59;return!this['getAllMarkersForId'](_0x28ed65)[0x0]['managedUsingOperations']?_0x49cb2b['editing']['view']['once']('render',()=>{if(_0x1d84b2['getCommentThread'](_0x28ed65))return;const _0x5d05e3=_0x49cb2b['plugins']['get'](y);_0x3f8d59=_0x1d84b2['openNewCommentThread']({'channelId':_0x19271b,'threadId':_0x28ed65,'target':()=>this['_getTargetForId'](_0x28ed65),'context':{'type':'text','value':this['_getTextContext'](_0x28ed65)}});const _0x4a25d4=_0x1d84b2['_threadToController']['get'](_0x3f8d59)['view'],_0x499187=_0x5d05e3['getByInnerView'](_0x4a25d4);_0x499187&&_0x192957['registerAnnotation'](_0x499187);},{'priority':'low'}):_0x1d84b2['fetchCommentThread']({'channelId':_0x19271b,'threadId':_0x28ed65})['then'](_0x2912bd=>{if('destroyed'!==_0x49cb2b['state']){if(_0x3f8d59=_0x2912bd,_0x3f8d59&&!_0x3f8d59['isAttached']){const _0x5b1304=_0x3f8d59['attachTo'](()=>this['_getTargetForId'](_0x28ed65));_0x192957['registerAnnotation'](_0x5b1304),_0x3f8d59['isResolved']&&this['_reconvertMarkers'](_0x28ed65);}else{if(!_0x3f8d59){const _0x566255=this['getAllMarkersForId'](_0x28ed65);_0x49cb2b['model']['change'](_0x1b4c8a=>{for(const _0x19a9e4 of _0x566255)_0x1b4c8a['removeMarker'](_0x19a9e4);});}}}}),_0x3f8d59;}['_handleThreadMarker'](_0x19440c,_0x45a27a){const _0x11fc63=this['_attachMarkerToThread'](_0x19440c,_0x45a27a);_0x11fc63&&!_0x11fc63['context']&&_0x11fc63['setContext']({'type':'text','value':this['_getTextContext'](_0x45a27a)});}['_initAriaMarkerChangeAnnouncements'](){const _0x5617fe=this['editor'];rt(_0x5617fe['model'],({left:_0x141bb5,entered:_0x598c21})=>{for(const _0x2a1739 of _0x141bb5)if(mt(_0x2a1739)){_0x5617fe['ui']['ariaLiveAnnouncer']['announce'](N(_0x5617fe['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x46b6dc of _0x598c21)if(mt(_0x46b6dc)){_0x5617fe['ui']['ariaLiveAnnouncer']['announce'](N(_0x5617fe['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0xecbc2a)));break;}});}}function dt(_0x26cc28,_0x1ab5ed){return _0x1ab5ed?_0x26cc28+':'+_0x1ab5ed:_0x26cc28;}function ht(_0x3148b5,_0x2ccc61){const _0x50fcc6=_0x2ccc61['schema'],_0x152384=_0x2ccc61['createRange'](_0x3148b5['start']);for(const _0x573c87 of _0x3148b5['getWalker']()){const {type:_0x5e1a5d,item:_0x31dccf,nextPosition:_0x3e1935}=_0x573c87;if('text'===_0x5e1a5d||_0x50fcc6['isObject'](_0x31dccf)){const _0x4f583c=_0x2ccc61['createPositionBefore'](_0x31dccf);_0x152384['isCollapsed']&&(_0x152384['start']=_0x4f583c),_0x152384['end']=_0x3e1935;}}return _0x152384;}function mt(_0x36f778){return'comment'===ft(_0x36f778['name'])['group'];}class s extends _0x4f8b18{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x45cae0=this['editor'],_0x2b60bc=_0x45cae0['plugins']['get'](o),_0x553f93=_0x45cae0['plugins']['get'](r),_0x59cb6a=_0x45cae0['plugins']['get'](y),_0xb8aada=_0x45cae0['plugins']['get'](b);_0x45cae0['ui']['componentFactory']['add']('comment',()=>{const _0x54cae0=this['_createUIButton'](_0x75c5a1);return _0x54cae0['tooltip']=!0x0,_0x54cae0;}),_0x45cae0['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x5086db)),_0xb8aada['addSourceCollector'](()=>{const _0x3ddac3=[];for(const [_0x1741a0,_0x57342b]of _0x2b60bc['_threadToController']){const _0x49cb09=_0x553f93['getAllMarkersForId'](_0x1741a0['id']),_0xb446f7=_0x49cb09['map'](_0xf8d273=>_0xf8d273['getRange']());_0x49cb09['length']>0x0&&_0x3ddac3['push']([_0x57342b['view'],_0xb446f7]);}return _0x3ddac3;}),this['listenTo'](_0x59cb6a,'change:activeAnnotations',(_0x546cdb,_0x3b5d95,_0x3811b3)=>{const _0x43d5cb=Array['from'](_0x3811b3)['map'](_0x411179=>_0x411179['innerView'])['find'](_0x3df845=>_0x2b60bc['_viewToController']['has'](_0x3df845));if(!_0x43d5cb)return void(_0x553f93['activeMarker']=null);const _0xb2dee9=_0x2b60bc['_viewToController']['get'](_0x43d5cb)['model']['id'],_0x365592='comment:'+_0xb2dee9;_0xb2dee9&&_0x553f93['hasMarkerForId'](_0xb2dee9)?_0x553f93['activeMarker']=_0x365592:_0x553f93['activeMarker']&&(_0x553f93['activeMarker']=null);}),this['listenTo'](_0x2b60bc,'removeCommentThread',(_0x119830,{threadId:_0x478c9f,isFromAdapter:_0x65c914})=>{!_0x65c914&&_0x45cae0['ui']['focusTracker']['isFocused']&&_0x553f93['hasMarkerForId'](_0x478c9f)&&_0x45cae0['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x2b60bc,'addComment',(_0x583156,{threadId:_0x6e247c,isFromAdapter:_0x47c336})=>{if(_0x47c336||!_0x553f93['hasMarkerForId'](_0x6e247c)||!_0x2b60bc['hasCommentThread'](_0x6e247c))return;0x1===_0x2b60bc['getCommentThread'](_0x6e247c)['length']&&(_0x45cae0['editing']['view']['focus'](),_0x583156['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x34efba=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x27dcf6;for(const _0x4ade61 in _0x34efba){const _0x8befcc=_0x4ade61,_0x3d9445=_0x34efba[_0x8befcc];if('commentsLicenseKeyValid'==_0x3d9445||'commentsLicenseKeyInvalid'==_0x3d9445||'commentsLicenseKeyExpired'==_0x3d9445||'commentsLicenseKeyDomainLimit'==_0x3d9445||'commentsLicenseKeyNotAllowed'==_0x3d9445||'commentsLicenseKeyEvaluationLimit'==_0x3d9445||'commentsLicenseKeyTrialLimit'==_0x3d9445||'commentsLicenseKeyUsageLimit'==_0x3d9445){delete _0x34efba[_0x8befcc],_0x27dcf6=_0x3d9445,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x27dcf6&&_0x34efba['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x27dcf6&&_0x34efba['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x27dcf6&&_0x34efba['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x27dcf6&&_0x34efba['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x27dcf6&&_0x34efba['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x27dcf6&&_0x34efba['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x27dcf6&&_0x34efba['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x441894){const _0x35f301=this['editor'],_0x225def=new _0x441894(_0x35f301['locale']),_0x21bb95=_0x35f301['commands']['get']('addCommentThread');return _0x225def['set']({'label':N(_0x35f301['locale'],'Comment'),'icon':_0x550872}),_0x225def['bind']('isEnabled')['to'](_0x21bb95,'hasContent'),this['listenTo'](_0x225def,'execute',()=>{_0x21bb95['execute']();}),_0x225def;}}class i extends _0x4f8b18{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x1cfef2){super(_0x1cfef2),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x566119,_0x4d285e,_0x7ed5d0)=>{_0x7ed5d0?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x4f04da,_0x51f8c9]of this['editor']['commands'])_0x51f8c9['affectsData']&&'addCommentThread'!==_0x4f04da&&_0x51f8c9['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 _0x3f4d51=this['editor']['editing']['view']['document'];this['listenTo'](_0x3f4d51,'cut',_0x1d940a=>_0x1d940a['stop'](),{'priority':'highest'}),this['listenTo'](_0x3f4d51,'clipboardInput',_0x36c02d=>_0x36c02d['stop'](),{'priority':'highest'}),this['listenTo'](_0x3f4d51,'delete',_0x4db27b=>_0x4db27b['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x373d91,_0x43199d]of this['editor']['commands'])_0x43199d['affectsData']&&'addCommentThread'!==_0x373d91&&_0x43199d['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x35edc8{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xe55bf9){super(_0xe55bf9),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x3323c4=this['context']['plugins']['get'](y);this['listenTo'](_0x3323c4,'_activateAnnotation',(_0x575de2,_0x462ace)=>{for(const _0x3b104c of this['activeUIs']){const _0x5ad031=this['_uis']['get'](_0x3b104c);(0x0,this['uisData']['get'](_0x3b104c)['filter'])(_0x462ace)&&_0x5ad031['setActiveAnnotation'](_0x462ace);}}),this['listenTo'](_0x3323c4,'_deactivateAllAnnotations',()=>{for(const _0x30e66b of this['activeUIs']){this['_uis']['get'](_0x30e66b)['setActiveAnnotation'](null);}}),this['listenTo'](_0x3323c4['_visibleAnnotations'],'add',(_0x24f77d,_0x412db7)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x412db7);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x517dd3){return this['activeUIs']['has'](_0x517dd3);}['activate'](_0x3746ed,_0x421178=this['defaultFilter']){const _0x46e961=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x3746ed))throw new _0x59f856('annotationsuis-missing-ui',this,{'uiName':_0x3746ed});this['isActive'](_0x3746ed)&&this['deactivate'](_0x3746ed),this['activeUIs']['add'](_0x3746ed);const _0x554049=new S();v({'source':_0x46e961['_visibleAnnotations'],'target':_0x554049,'filter':_0x421178}),this['uisData']['set'](_0x3746ed,{'collection':_0x554049,'filter':_0x421178});const _0x535451=this['_uis']['get'](_0x3746ed);_0x535451['attach'](_0x554049),this['listenTo'](_0x535451,'change:activeAnnotation',(_0x4b47b6,_0x13ce5f,_0x5b5991,_0x96a50e)=>{_0x96a50e&&_0x46e961['_removeActiveAnnotation'](_0x96a50e),_0x5b5991&&_0x46e961['_addActiveAnnotation'](_0x5b5991);});}['deactivate'](_0x1790ed){if(this['activeUIs']['delete'](_0x1790ed),!this['_uis']['has'](_0x1790ed))throw new _0x59f856('annotationsuis-missing-ui',this,{'uiName':_0x1790ed});const _0x395274=this['_uis']['get'](_0x1790ed);_0x395274['detach'](),this['stopListening'](_0x395274),this['uisData']['get'](_0x1790ed)['collection']['destroy'](),this['uisData']['delete'](_0x1790ed);}['switchTo'](_0x7fea4d){if(!this['_uis']['has'](_0x7fea4d))throw new _0x59f856('annotationsuis-missing-ui',this,{'uiName':_0x7fea4d});const _0x45f887=this['context']['plugins']['get'](y),_0x45bb0c=Array['from'](_0x45f887['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x7fea4d);const _0x57a678=this['_uis']['get'](_0x7fea4d);_0x57a678['setActiveAnnotation'](_0x45bb0c),_0x57a678['_setSelectedAnnotations']&&_0x45bb0c&&_0x57a678['_setSelectedAnnotations']([_0x45bb0c]);}['deactivateAll'](){for(const _0xac55ff of this['activeUIs'])this['deactivate'](_0xac55ff);}['register'](_0x4e9e6e,_0x5660d6){if(this['_uis']['has'](_0x4e9e6e))throw new _0x59f856('annotationsuis-register-already-registered');if('function'!=typeof _0x5660d6['attach']||'function'!=typeof _0x5660d6['detach']||'function'!=typeof _0x5660d6['setActiveAnnotation'])throw new _0x59f856('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x4e9e6e,_0x5660d6);}['refilterAnnotations'](){const _0x618731=this['context']['plugins']['get'](y)['collection'],_0x52db98=new Map(),_0x21665a=Array['from'](this['activeUIs']);for(const _0x549b2c of this['activeUIs']){const _0x4fcd65=this['uisData']['get'](_0x549b2c)['collection'];for(const _0x284ec5 of _0x4fcd65)_0x52db98['set'](_0x284ec5,_0x549b2c);}for(const _0x14bb4e of _0x618731){const _0x379c58=_0x52db98['get'](_0x14bb4e);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x14bb4e);const _0x39138d=_0x21665a['find'](_0x57f8c2=>this['uisData']['get'](_0x57f8c2)['filter'](_0x14bb4e));_0x379c58!==_0x39138d&&(_0x379c58&&this['uisData']['get'](_0x379c58)['collection']['remove'](_0x14bb4e),_0x39138d&&this['uisData']['get'](_0x39138d)['collection']['add'](_0x14bb4e));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5474c0){const _0x4b3a29=[];for(const _0x4e1930 of this['activeUIs']){(0x0,this['uisData']['get'](_0x4e1930)['filter'])(_0x5474c0)&&_0x4b3a29['push'](_0x4e1930);}if(_0x4b3a29['length']>0x1)throw new _0x59f856('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x4b3a29,'annotationType':_0x5474c0['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
-
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(
|
|
33
|
-
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x1a135a){super(_0x1a135a),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x4df518,_0x31974f)=>_0x4df518+_0x31974f),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x29b4e8=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x29b4e8['to']('isAnimationDisabled',_0x46a6d4=>_0x46a6d4?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x29b4e8['to']('top',_0x147b5f=>Ot(_0x147b5f))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x2494cb=this['element']['clientHeight'];_0x2494cb&&(this['height']=_0x2494cb);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x35edc8{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3c8afc){super(_0x3c8afc),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 _0x59a0aa=this['context']['config']['get']('sidebar.container');_0x59a0aa&&this['setContainer'](_0x59a0aa);}['setContainer'](_0x207df2){if(!g(_0x207df2))throw new _0x59f856('sidebar-setcontainer-invalid-element');this['container']=_0x207df2;}['_attachToContainer']({viewClass:_0x35e48f='',spaceBetweenItems:_0x9882b3=0x19}={}){if(!g(this['container']))throw new _0x59f856('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x35e48f,this['_spaceBetweenItems']=_0x9882b3;}['rearrange']({removedAnnotation:_0x49a212,previousAnnotation:_0x367afc,nextAnnotation:_0x439c23}){const _0x13345a=this['getSidebarItemView'](_0x49a212);this['view']['list']['remove'](_0x13345a),this['_destroySidebarItemView'](_0x49a212),_0x367afc&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x367afc)),_0x439c23&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x439c23)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x168d31,activatedAnnotation:_0x26ee98,disableAnimationOnActivatedAnnotation:_0x5c75e6}){if(this['_activeAnnotation']=_0x26ee98,_0x168d31){_0x168d31['isActive']=!0x1;const _0x732306=this['getSidebarItemView'](_0x168d31);_0x732306&&_0x5c75e6&&(_0x732306['isAnimationDisabled']=!0x1);}if(_0x26ee98){const _0x4398d8=this['getSidebarItemView'](_0x26ee98);_0x4398d8&&(_0x26ee98['isActive']=!0x0,_0x5c75e6&&(_0x4398d8['isAnimationDisabled']=!0x0,_0x4398d8['top']+=0x1),this['_alignToTargetRect'](_0x4398d8));}}['_detachFromContainer'](_0x3ad196){if(this['view']['element']['remove'](),_0x3ad196){for(const _0x535a02 of _0x3ad196)this['_destroySidebarItemView'](_0x535a02);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x31198e,_0x46300a){_0x46300a||(_0x46300a=_0x31198e['view']);const _0x309f06=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x309f06,_0x31198e),this['_annotationToSidebarItemView']['set'](_0x31198e,_0x309f06),_0x309f06['content']['add'](_0x46300a),this['listenTo'](_0x31198e['view'],'change:targetRect',(_0x5cfa31,_0x26b825,_0x335621)=>{const _0x41b353=this['_getTargetTop'](_0x31198e,_0x335621);_0x309f06['_targetTop']!=_0x41b353&&(_0x309f06['_targetTop']=_0x41b353,this['_setItemTop'](_0x309f06,_0x41b353));}),this['listenTo'](_0x309f06,'change:top',()=>{this['_recalculate'](_0x309f06,'top');}),this['listenTo'](_0x309f06,'change:bottom',()=>{this['_recalculate'](_0x309f06,'bottom');}),this['_alignToTargetRect'](_0x309f06);const _0x59e6cb=this['_getItemBefore'](_0x309f06);if(_0x59e6cb)this['_alignAfterItem'](_0x59e6cb,_0x309f06)||this['_alignToTargetRect'](_0x309f06);else this['_alignToTargetRect'](_0x309f06);return this['_updateLastItem'](),this['view']['list']['add'](_0x309f06),_0x309f06;}['_alignForTopChange'](_0xf53cf9){if(!_0xf53cf9['content']['length'])return;const _0x5d3e6b=this['_getItemBefore'](_0xf53cf9);if(!_0x5d3e6b)return;const _0x12f79e=this['_sidebarItemViewToAnnotation']['get'](_0x5d3e6b),_0x4dec4a=this['_activeAnnotation'];_0x4dec4a&&_0x4dec4a===_0x12f79e?this['_alignAfterItem'](_0x5d3e6b,_0xf53cf9):this['_alignBeforeItem'](_0xf53cf9,_0x5d3e6b);}['_alignForBottomChange'](_0x12c29c){if(!_0x12c29c['content']['length'])return;const _0x435b23=this['_getItemAfter'](_0x12c29c);if(!_0x435b23)return;const _0x4b3878=this['_sidebarItemViewToAnnotation']['get'](_0x435b23),_0x32d017=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x53b221=this['_activeAnnotation'];_0x53b221&&_0x53b221===_0x4b3878&&_0x32d017?(this['_alignBeforeItem'](_0x435b23,_0x12c29c),this['_alignAfterItem'](_0x12c29c,_0x435b23)):_0x53b221&&_0x53b221===_0x4b3878?this['_alignBeforeItem'](_0x435b23,_0x12c29c):this['_alignAfterItem'](_0x12c29c,_0x435b23);}['_recalculate'](_0x36ae25,_0x1e8512){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x6211af,changedProp:_0x230324}of this['_recalculateBuffer'])'top'===_0x230324?this['_alignForTopChange'](_0x6211af):this['_alignForBottomChange'](_0x6211af);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x36ae25,'changedProp':_0x1e8512});}['getSidebarItemView'](_0x139eb9){return this['_annotationToSidebarItemView']['get'](_0x139eb9);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x5f08ab){const _0x270ee8=this['getSidebarItemView'](_0x5f08ab);this['stopListening'](_0x270ee8),this['stopListening'](_0x5f08ab['view']),_0x270ee8['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x5f08ab),this['_sidebarItemViewToAnnotation']['delete'](_0x270ee8);}['_createSidebarView'](){const _0x239696=new H(this['context']['locale']);return _0x239696['render'](),this['on']('change:_lastItem',(_0x16371a,_0x453a4d,_0x59a422,_0x42be33)=>{_0x42be33&&_0x239696['unbind']('minHeight'),_0x59a422?_0x239696['bind']('minHeight')['to'](_0x59a422,'bottom'):_0x239696['minHeight']=null;}),_0x239696;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x42f339){const _0x4a3cbb=this['_sidebarItemViewToAnnotation']['get'](_0x42f339),_0x14c0b9=_0x4a3cbb&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x4a3cbb)-0x1);return _0x14c0b9&&this['getSidebarItemView'](_0x14c0b9)||null;}['_getItemAfter'](_0x1f2902){const _0x2da587=this['_sidebarItemViewToAnnotation']['get'](_0x1f2902),_0x4d413b=_0x2da587&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2da587)+0x1);return _0x4d413b&&this['getSidebarItemView'](_0x4d413b)||null;}['_alignBeforeItem'](_0x1a2257,_0x15fa62){_0x1a2257['updateHeight']();const _0xd2705b=G(_0x15fa62['bottom']+this['_spaceBetweenItems'],_0x1a2257['top']);return!!_0xd2705b&&(this['_setItemTop'](_0x15fa62,_0x15fa62['top']-_0xd2705b),!0x0);}['_alignAfterItem'](_0x3945d8,_0x178254){_0x3945d8['updateHeight']();const _0x8f7b31=G(_0x3945d8['bottom']+this['_spaceBetweenItems'],_0x178254['top']);return!!_0x8f7b31&&(this['_setItemTop'](_0x178254,_0x178254['top']+_0x8f7b31,!0x1),!0x0);}['_alignToTargetRect'](_0xa0b04f){const _0x45de9a=this['_sidebarItemViewToAnnotation']['get'](_0xa0b04f);if(!_0x45de9a||!_0x45de9a['target']||!_0x45de9a['targetRect'])return;const _0x26d79e=this['_getTargetTop'](_0x45de9a,_0x45de9a['targetRect']);this['_setItemTop'](_0xa0b04f,_0x26d79e);}['_getTargetTop'](_0x3bb611,_0x1dece1){if(null===_0x1dece1)return 0x0;if(_0x3bb611['target']instanceof _0x29c0c7)return _0x1dece1['top'];{const _0x67b0a7=new _0x29c0c7(this['view']['element'])['top'];return _0x1dece1['top']-_0x67b0a7;}}['_setItemTop'](_0x53ee9c,_0x661be5,_0xa847cf=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0xa847cf&&(_0x661be5=Math['max'](_0x661be5,this['_getMaxAvailableTop'](_0x53ee9c))),_0x53ee9c['top']=_0x661be5;}['_getMaxAvailableTop'](_0x450c49){let _0x14af56=this['_getItemBefore'](_0x450c49),_0x54116b=0x0;for(;_0x14af56;)_0x14af56['updateHeight'](),_0x54116b+=this['_spaceBetweenItems']+_0x14af56['height'],_0x14af56=this['_getItemBefore'](_0x14af56);return _0x54116b;}}function G(_0x39a87a,_0x38d63c){return Math['max'](_0x39a87a-_0x38d63c,0x0);}function g(_0x52e4b4){return null!==_0x52e4b4&&'object'==typeof _0x52e4b4&&0x1===_0x52e4b4['nodeType'];}class e extends _0x35edc8{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x585f5a){super(_0x585f5a),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x1ed765(),this['_refreshPositioningDebounced']=_0x489039(()=>{_0x585f5a['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x2df489=this['context']['plugins']['get'](j),_0x365fd9=this['context']['plugins']['get'](z);_0x2df489['register']('wideSidebar',this),_0x365fd9['container']&&_0x2df489['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x2049b0){if(_0x2049b0===this['activeAnnotation'])return;const _0x3106dd=this['context']['plugins']['get'](z);_0x3106dd['_activeAnnotation']=_0x2049b0;const _0xcad301=this['activeAnnotation'];_0x3106dd['refresh']({'blurredAnnotation':_0xcad301,'activatedAnnotation':_0x2049b0}),this['activeAnnotation']=_0x2049b0;}['attach'](_0x39d5bd){this['annotations']=_0x39d5bd;const _0x52a108=this['context']['plugins']['get'](z);if(_0x52a108['_annotations']=_0x39d5bd,this['isAttached'])throw new _0x59f856('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x52a108,'set:container',()=>{this['detach'](),this['listenTo'](_0x52a108,'change:container',_0x5be774=>{_0x5be774['off'](),this['attach'](_0x39d5bd);});}),_0x52a108['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x284eeb=_0x549792=>{_0x549792['updateTargetRect'](),_0x52a108['addAnnotation'](_0x549792);};for(const _0x33c546 of _0x39d5bd)_0x284eeb(_0x33c546);this['listenTo'](_0x39d5bd,'add',(_0x3d79fe,_0x2bb9b1)=>{_0x284eeb(_0x2bb9b1);}),this['listenTo'](_0x39d5bd,'remove',(_0xb96bc0,_0x22757a,_0xb05f43)=>{_0x52a108['rearrange']({'removedAnnotation':_0x22757a,'previousAnnotation':_0x39d5bd['get'](_0xb05f43-0x1),'nextAnnotation':_0x39d5bd['get'](_0xb05f43+0x1)}),_0x22757a===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x39d5bd,'focus',(_0x231d85,_0x2d0f4d)=>{this['setActiveAnnotation'](_0x2d0f4d);}),this['listenTo'](_0x39d5bd,'blur',()=>{this['setActiveAnnotation'](null);});const _0x1b8235=this['context']instanceof _0x2dec0a?this['context']['editors']:new _0x1ed765([this['context']]);for(const _0x539764 of _0x1b8235)this['_integrateWithEditorAnnotations'](_0x539764);this['listenTo'](_0x1b8235,'add',(_0x21bd29,_0x5f1f09)=>{this['listenTo'](_0x5f1f09,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x5f1f09);});}),this['listenTo'](_0x1b8235,'remove',(_0xf73d08,_0x7302a9)=>{_0x7302a9['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x7302a9['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x59f856('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x113700=this['context']['plugins']['get'](z);_0x113700['_detachFromContainer'](this['annotations']),this['stopListening'](_0x113700),this['stopListening'](this['annotations']),this['context']instanceof _0x2dec0a&&this['stopListening'](this['context']['editors']);for(const _0x5517fe of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x5517fe);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x1b9352){if(!_0x1b9352['plugins']['has']('EditorAnnotations'))return;const _0x4cfeb9=_0x1b9352['plugins']['get']('EditorAnnotations'),_0xd1cc15=()=>{const _0x3bf1e0=_0x4cfeb9['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x3bf1e0[0x0]||null);};this['listenTo'](_0x4cfeb9,'refresh',_0xd1cc15),this['listenTo'](_0x4cfeb9,'blur',(_0x3bd2d6,{isAnnotationTracked:_0x5f37ae})=>{this['activeAnnotation']&&_0x5f37ae(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x4cfeb9,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x1e7778=>{_0x4cfeb9['hasDomSelection']()&&(_0xd1cc15(),_0x1e7778['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x4cfeb9);}['_destroyEditorAnnotationsIntegration'](_0xd958e4){this['stopListening'](_0xd958e4),this['_editorAnnotations']['remove'](_0xd958e4);}}class C extends _0x75c5a1{['counterView'];constructor(_0x229f38){super(_0x229f38);const _0x523d6d=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x52b6d3,_0x3e2317)=>_0x52b6d3?'...':_0x3e2317['toString']()),this['set']('annotationType',''),this['icon']=_0x550872,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x523d6d['to']('annotationType',_0x41055e=>'ck-annotation-counter__badge--'+_0x41055e),_0x523d6d['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x523d6d['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x35edc8{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x39341e){super(_0x39341e),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x428cc8())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x1ed765(),this['_refreshPositioningDebounced']=_0x489039(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x276dde(this['context']['locale']),this['balloonPanelView']=new _0x375243(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x577359){this['annotations']=_0x577359;const _0x288b53=this['context']['plugins']['get'](z),_0x3bfd5a=this['balloonPanelView'];if(_0x288b53['_annotations']=_0x577359,this['isAttached'])throw new _0x59f856('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x288b53,'set:container',()=>{this['detach'](),this['listenTo'](_0x288b53,'change:container',_0x21a46c=>{_0x21a46c['off'](),this['attach'](_0x577359);});}),_0x288b53['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x39efee=_0x164bc8=>{const _0xd602b9=new C(this['context']['locale']);_0x288b53['addAnnotation'](_0x164bc8,_0xd602b9),this['_annotationToNarrowView']['set'](_0x164bc8,_0xd602b9),_0xd602b9['bind']('isDirty','annotationType','number')['to'](_0x164bc8['view'],'isDirty','type','length'),_0xd602b9['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x3bfd5a['content']['first']!==_0x164bc8['view']?(this['_showBalloon'](_0x164bc8),_0x164bc8['view']['element']['focus'](),this['setActiveAnnotation'](_0x164bc8)):this['setActiveAnnotation'](null);});};for(const _0x33f930 of _0x577359)_0x39efee(_0x33f930);this['listenTo'](_0x577359,'add',(_0x2bb60a,_0x546aa4)=>{_0x39efee(_0x546aa4);}),this['listenTo'](_0x577359,'remove',(_0x12e315,_0x23e0f9,_0x57bc9c)=>{this['_annotationToNarrowView']['get'](_0x23e0f9)['destroy'](),this['_annotationToNarrowView']['delete'](_0x23e0f9),_0x288b53['rearrange']({'removedAnnotation':_0x23e0f9,'previousAnnotation':_0x577359['get'](_0x57bc9c-0x1),'nextAnnotation':_0x577359['get'](_0x57bc9c+0x1)}),_0x23e0f9===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x577359,'focus',(_0x4a456a,_0x7a594c)=>{this['setActiveAnnotation'](_0x7a594c);}),this['listenTo'](_0x577359,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x429567,_0x25cb20)=>{_0x25cb20['keyCode']===_0x457aae['esc']&&_0x3bfd5a['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x3bfd5a['content']['first']),this['_hideBalloon'](),_0x25cb20['stopPropagation'](),_0x25cb20['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x52d92e,_0x221b99)=>{const _0x4ff9c2=_0x221b99['target'];_0x3bfd5a['isVisible']&&_0x3bfd5a['element']['contains'](_0x4ff9c2)||_0x288b53['view']['element']['contains'](_0x4ff9c2)||_0x52d92e['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x30d92b=>_0x30d92b['contains'](_0x4ff9c2))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x472fb5=this['context']instanceof _0x2dec0a?this['context']['editors']:new _0x1ed765([this['context']]);for(const _0x2645cc of _0x472fb5)this['_integrateWithEditorAnnotations'](_0x2645cc);this['listenTo'](_0x472fb5,'add',(_0x19e79d,_0x41af93)=>{this['listenTo'](_0x41af93,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x41af93);});}),this['listenTo'](_0x472fb5,'remove',(_0x13a1b9,_0x29fac8)=>{_0x29fac8['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x29fac8['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x37d111){if(_0x37d111===this['activeAnnotation'])return;const _0x5cb80f=this['context']['plugins']['get'](z);if(_0x5cb80f['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x37d111,'disableAnimationOnActivatedAnnotation':!0x0}),_0x37d111)_0x5cb80f['getSidebarItemView'](_0x37d111)?this['_showBalloon'](_0x37d111):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x37d111;}['detach'](){if(!this['isAttached'])throw new _0x59f856('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x15b4f6=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x873c12=>_0x873c12['destroy']()),this['_annotationToNarrowView']['clear'](),_0x15b4f6['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x2dec0a&&this['stopListening'](this['context']['editors']);for(const _0x494206 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x494206);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'](_0x2c59aa){if(!_0x2c59aa['plugins']['has']('EditorAnnotations'))return;const _0x136018=_0x2c59aa['plugins']['get']('EditorAnnotations'),_0x58b15e=this['context']['plugins']['get'](z),_0x2c0357=this['annotations'],_0x5c98aa=this['balloonPanelView'],_0x43cae7=()=>{const _0x3f1a8e=_0x136018['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x3f1a8e),this['setActiveAnnotation'](_0x3f1a8e[0x0]||null);};this['listenTo'](_0x136018,'refresh',_0x43cae7),this['listenTo'](_0x136018,'blur',(_0x1bb041,{isAnnotationTracked:_0x563904})=>{this['activeAnnotation']&&_0x563904(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x136018,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x2c0357,'blur',_0x5b1f08=>{_0x136018['hasDomSelection']()&&_0x5b1f08['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x35dc8a,_0x53d6ea)=>{const _0x2b6ac5=_0x53d6ea['target'];_0x5c98aa['isVisible']&&_0x5c98aa['element']['contains'](_0x2b6ac5)||_0x58b15e['view']['element']['contains'](_0x2b6ac5)||this['activeAnnotation']&&_0x136018['hasDomSelection']()&&(_0x43cae7(),_0x35dc8a['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x136018);}['_destroyEditorAnnotationsIntegration'](_0x562874){_0x562874&&(this['stopListening'](_0x562874),this['_editorAnnotations']['remove'](_0x562874));}['_setSelectedAnnotations'](_0x4a6bbc){for(const _0x4e040c of this['_selectedAnnotations'])_0x4a6bbc['includes'](_0x4e040c)||this['_manuallyClosedAnnotationViews']['delete'](_0x4e040c['view']);this['_selectedAnnotations']=_0x4a6bbc;}['_refreshPositioning'](){const _0x4a4c2e=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x4a4c2e['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x30f21b){if(this['_manuallyClosedAnnotationViews']['has'](_0x30f21b['view']))return;const _0x392519=this['balloonPanelView']['content']['first'];_0x392519!==_0x30f21b['view']?(_0x392519&&this['_detachListeners'](_0x392519),this['_attachListeners'](_0x30f21b['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x30f21b['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x5ab495=this['balloonPanelView']['content']['first'],_0x1ea66e=_0x5ab495&&this['annotations']['getByView'](_0x5ab495);if(!_0x1ea66e||!this['_annotationToNarrowView']['has'](_0x1ea66e))return;const _0xbd736e=this['_annotationToNarrowView']['get'](_0x1ea66e)['element'],_0xfc7130=(function(){const _0x13a0ad=_0x375243['defaultPositions'];return[_0x13a0ad['southArrowNorthEast'],_0x13a0ad['northArrowSouthEast'],_0x13a0ad['southArrowNorth'],_0x13a0ad['northArrowSouth'],_0x13a0ad['southArrowNorthWest'],_0x13a0ad['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0xbd736e,'positions':_0xfc7130});}['_hideBalloon'](){const _0x175904=this['balloonPanelView'],_0xbc0414=_0x175904['content']['first'];_0xbc0414&&(this['_detachListeners'](_0xbc0414),_0x175904['unpin'](),_0x175904['content']['clear']());}['_attachListeners'](_0xbd58c8){this['listenTo'](_0xbd58c8,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0xbd58c8,'Esc',(_0x3f8296,_0x1b5518)=>{this['_manuallyClosedAnnotationViews']['add'](_0xbd58c8),this['_hideBalloon'](),_0x1b5518();});}['_detachListeners'](_0x156792){this['stopListening'](_0x156792);}}class c extends _0x4f8b18{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x4ca3ae,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x354146){super(_0x354146),_0x354146['editing']['view']['addObserver'](_0x1c3042),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x354146['plugins']['get'](_0x4ca3ae),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x234b30=this['editor']['plugins']['get'](j);_0x234b30['context']===this['editor']&&(_0x234b30['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x3c8b81,_0x2b205c)=>{const _0x1821ac=this['_balloon'];if(this['isAttached']&&_0x1821ac['visibleView']){const _0x5c04d1=this['annotations']['getByView'](_0x1821ac['visibleView']);_0x5c04d1&&this['_closeAnnotation'](_0x5c04d1),_0x2b205c();}}));}['afterInit'](){const _0x4deb7f=this['editor']['plugins']['get'](j);_0x4deb7f['context']===this['editor']&&(_0x4deb7f['hasActive']()||_0x4deb7f['switchTo']('inline'));}['setActiveAnnotation'](_0x334fe0){_0x334fe0!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x334fe0&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x334fe0)&&this['_addAnnotationToBalloon'](_0x334fe0,!0x0),_0x334fe0['isActive']=!0x0),_0x334fe0||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x334fe0);}['attach'](_0x39fab8){this['annotations']=_0x39fab8;const _0x132832=this['editor']['plugins']['get'](j),_0x46a7c4=this['_balloon'];if(this['isAttached'])throw new _0x59f856('inlineannotations-attach-already-attached',this);if(_0x132832['context']!==this['editor'])throw new _0x59f856('inlineannotations-not-allowed-with-context',this);const _0x35169d=this['editor']['plugins']['get'](b);this['listenTo'](_0x35169d,'refresh',()=>{const _0x5f5573=_0x35169d['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x17fd6b,_0x75e8d;!this['_forceRefresh']&&(_0x17fd6b=_0x5f5573,_0x75e8d=this['_selectedAnnotations'],_0x17fd6b['length']===_0x75e8d['length']&&_0x17fd6b['every'](_0x3de819=>_0x75e8d['includes'](_0x3de819)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x5f5573),this['setActiveAnnotation'](_0x5f5573[0x0]||null));}),this['listenTo'](_0x35169d,'blur',(_0x227068,{isAnnotationTracked:_0x1a7e9d})=>{this['activeAnnotation']&&_0x1a7e9d(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x3a7fe6,_0x5252a3,_0xb95f36)=>{_0xb95f36||this['setActiveAnnotation'](null);}),this['listenTo'](_0x39fab8,'remove',(_0x46dcb7,_0x3bcf21)=>{this['_removeAnnotationFromBalloon'](_0x3bcf21),_0x3bcf21===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x46a7c4,'change:visibleView',(_0x347b22,_0x2dea56,_0x395ab1,_0x53a87a)=>{_0x53a87a&&this['stopListening'](_0x53a87a);const _0x5f5577=_0x39fab8['getByView'](_0x395ab1);_0x395ab1&&_0x5f5577&&(this['listenTo'](_0x395ab1,'change:height',()=>{_0x46a7c4['updatePosition']();}),this['listenTo'](_0x395ab1,'Esc',()=>{this['_closeAnnotation'](_0x5f5577),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x5f5577&&this['setActiveAnnotation'](_0x5f5577));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x46a7c4['visibleView']&&(_0x39fab8['getByView'](_0x46a7c4['visibleView'])&&_0x46a7c4['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 _0x59f856('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x103946 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x103946);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x3c5960){for(const _0x133368 of this['_selectedAnnotations'])_0x3c5960['includes'](_0x133368)||this['_manuallyClosed']['delete'](_0x133368);for(const _0x4324c4 of this['annotations'])_0x3c5960['includes'](_0x4324c4)||this['_removeAnnotationFromBalloon'](_0x4324c4);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x3e9adb of _0x3c5960)this['_addAnnotationToBalloon'](_0x3e9adb);}this['_selectedAnnotations']=_0x3c5960;}['_addAnnotationToBalloon'](_0x79dfd0,_0x162d7=!0x1){this['_manuallyClosed']['has'](_0x79dfd0)||(this['_addedAnnotations']['has'](_0x79dfd0)||this['_balloon']['hasView'](_0x79dfd0['view'])||(this['_addedAnnotations']['add'](_0x79dfd0),this['_balloon']['add']({'stackId':_0x79dfd0['view']['id'],'view':_0x79dfd0['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x79dfd0)}})),_0x162d7&&this['_balloon']['showStack'](_0x79dfd0['view']['id']));}['_getBalloonTargetForAnnotation'](_0x220a0d){const _0x4af6d2=_0x220a0d['target'],_0x5bf3c5=this['editor']['editing']['view'],_0x344878=_0x5bf3c5['document']['selection']['getFirstRange'](),_0x59067b=_0x5bf3c5['domConverter']['viewRangeToDom'](_0x344878);if(_0x59067b['collapse'](!0x0),_0x4af6d2){if(_0x4af6d2 instanceof _0x29c0c7)return _0x4af6d2;let _0x309139=[];for(const _0x23205f of _0x4af6d2)_0x309139['push'](...F(_0x23205f['getClientRects']()));_0x309139=function(_0x6fc323){const _0x553e4a=[];let _0x17f345=_0x6fc323[0x0];for(let _0x404994=0x1;_0x404994<_0x6fc323['length'];_0x404994++)P(_0x17f345,_0x6fc323[_0x404994])?_0x17f345['width']+=_0x6fc323[_0x404994]['width']:(_0x553e4a['push'](_0x17f345),_0x17f345=_0x6fc323[_0x404994]);return _0x553e4a['push'](_0x17f345),_0x553e4a;}(_0x309139);const _0x332d3a=_0x59067b['getBoundingClientRect']();return _0x309139['find'](_0x59a5e0=>_0x59a5e0['top']<=_0x332d3a['top']&&_0x59a5e0['bottom']>=_0x332d3a['bottom']&&_0x59a5e0['left']<=_0x332d3a['left']&&_0x59a5e0['right']>=_0x332d3a['right'])||_0x309139[0x0];}return _0x220a0d['targetRect']||_0x59067b;}['_removeAnnotationFromBalloon'](_0x35097c){this['_addedAnnotations']['has'](_0x35097c)&&this['_balloon']['hasView'](_0x35097c['view'])&&(this['_addedAnnotations']['delete'](_0x35097c),this['_balloon']['remove'](_0x35097c['view']));}['_closeAnnotation'](_0x2ffe65){this['_manuallyClosed']['add'](_0x2ffe65),this['_removeAnnotationFromBalloon'](_0x2ffe65);}}function F(_0x51bd64){return Array['from'](_0x51bd64)['map'](DOMRect['fromRect']);}function P(_0x1073f7,_0x702dbb){return _0x1073f7['top']===_0x702dbb['top']&&_0x1073f7['bottom']===_0x702dbb['bottom']&&_0x1073f7['right']===_0x702dbb['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x424dfa,_0x1efbbd){super(_0x424dfa),this['set']('isEmpty',!_0x1efbbd['length']),this['focusTracker']=new _0x336e57(),this['_annotationViews']=_0x1efbbd,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x2fdf0a({'focusables':_0x1efbbd,'focusTracker':this['focusTracker']}),this['listenTo'](_0x1efbbd,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x1efbbd,'remove',(_0x4afdb8,_0x54d321)=>{_0x54d321['isActive']&&this['focus'](),_0x1efbbd['length']||(this['isEmpty']=!0x0);});const _0x1521d5=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x424dfa,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x1efbbd},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x1521d5['if']('isEmpty','ck-hidden',_0x361256=>!_0x361256)]},'children':[{'text':N(_0x424dfa,'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 _0x1a7d57 of this['_annotationViews'])this['focusTracker']['add'](_0x1a7d57['element']);this['_annotationViews']['on']('change',(_0x14edbd,{added:_0x48984e,removed:_0x3daaf6})=>{for(const _0x43d2be of _0x48984e)this['focusTracker']['add'](_0x43d2be['element']);for(const _0x32f070 of _0x3daaf6)this['focusTracker']['remove'](_0x32f070['element']);});}}class p extends _0x35edc8{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x4fcf33){super(_0x4fcf33),this['archivedThreads']=new _0x1ed765();}['init'](){const _0x5b2e77=this['context'],_0x8c5982=_0x5b2e77['plugins']['get'](o),_0x6ecdbd=_0x5b2e77['plugins']['get'](y);this['listenTo'](_0x8c5982,'addCommentThread',(_0x238266,{threadId:_0x581511})=>{const _0x3ee452=_0x8c5982['getCommentThread'](_0x581511);_0x3ee452['archivedAt']&&this['archivedThreads']['add'](_0x3ee452,this['_calculatePosition'](_0x3ee452['archivedAt'])),this['listenTo'](_0x3ee452,'change:archivedAt',(_0x2e165f,_0x5513e6,_0x3a9975)=>{_0x3a9975?this['archivedThreads']['has'](_0x3ee452)||this['archivedThreads']['add'](_0x3ee452,this['_calculatePosition'](_0x3ee452['archivedAt'])):this['archivedThreads']['has'](_0x3ee452)&&this['archivedThreads']['remove'](_0x3ee452);});}),this['listenTo'](_0x8c5982,'removeCommentThread',(_0x122d40,{threadId:_0x21b661})=>{const _0x5ad014=_0x8c5982['getCommentThread'](_0x21b661);this['stopListening'](_0x5ad014),this['archivedThreads']['has'](_0x5ad014)&&this['archivedThreads']['remove'](_0x5ad014);},{'priority':'highest'}),this['listenTo'](_0x6ecdbd['collection'],'focus',(_0x356e84,_0x400f9d)=>{_0x400f9d['isVisible']||(_0x400f9d['isActive']=!0x0,_0x6ecdbd['activate'](_0x400f9d));});}['_calculatePosition'](_0x37a8a4){const _0x2b5887=[...this['archivedThreads']]['findIndex'](_0xfadd56=>_0xfadd56['archivedAt']<_0x37a8a4);return _0x2b5887>-0x1?_0x2b5887:this['archivedThreads']['length'];}}class a extends _0x4f8b18{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x16b75d];}constructor(_0x5b1c0b){super(_0x5b1c0b),this['annotationViews']=new _0xb7b669(),this['_pendingThreads']=[];}['init'](){const _0x55464e=this['editor'],_0x25f99e=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x55464e['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x75c5a1,!0x0)),_0x55464e['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x2f9f33=this['_createCommentsArchiveButton'](_0x5086db);return _0x2f9f33['set']({'role':'menuitemcheckbox'}),_0x2f9f33;});const _0x2c3b21=_0x55464e['plugins']['get'](p),_0x5628ad=_0x55464e['plugins']['get']('Annotations'),_0x3abe19=_0x55464e['plugins']['get']('CommentsRepository');_0x2c3b21['archivedThreads']['forEach'](_0x4b4155=>{this['_handleNewThread'](_0x4b4155);}),this['listenTo'](_0x2c3b21['archivedThreads'],'add',(_0x225070,_0x3b31e6)=>{this['_handleNewThread'](_0x3b31e6);}),this['listenTo'](_0x5628ad['collection'],'add',(_0x39a920,_0x31e38e)=>{const _0x58fcaf=this['_pendingThreads']['find'](_0x1609ba=>{const _0x667168=_0x3abe19['_threadToController']['get'](_0x1609ba);return _0x667168&&_0x31e38e['innerView']===_0x667168['view'];});if(_0x58fcaf){const _0x14cd27=this['_calculatePosition'](_0x58fcaf['archivedAt']);this['annotationViews']['add'](_0x31e38e['view'],_0x14cd27),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x58fcaf),0x1);}}),this['listenTo'](_0x2c3b21['archivedThreads'],'remove',(_0x141788,_0x8e1010)=>{const _0x44f0f8=_0x55464e['config']['get']('collaboration.channelId');if(!_0x44f0f8||_0x8e1010['channelId']===_0x44f0f8){if(this['_pendingThreads']['includes'](_0x8e1010))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x8e1010),0x1);else{const _0x3d2619=_0x3abe19['_threadToController']['get'](_0x8e1010),_0x53287b=_0x5628ad['getByInnerView'](_0x3d2619['view']);this['annotationViews']['remove'](_0x53287b['view']),this['stopListening'](_0x53287b['focusableElements']);}}}),this['listenTo'](_0x5628ad['collection'],'add',(_0x21ab6e,_0x47c5f5)=>{this['listenTo'](_0x47c5f5,'escape',_0x25f99e);}),this['listenTo'](_0x5628ad['collection'],'remove',(_0x25170b,_0x4e3528)=>{this['stopListening'](_0x4e3528,'escape',_0x25f99e);});}['_handleNewThread'](_0x44fd4e){const _0x56312c=this['editor']['plugins']['get']('CommentsRepository'),_0x2465aa=this['editor']['plugins']['get']('Annotations'),_0x1bfa46=this['editor']['config']['get']('collaboration.channelId');if(!_0x1bfa46||_0x44fd4e['channelId']===_0x1bfa46){const _0x2517d8=_0x56312c['_threadToController']['get'](_0x44fd4e);if(!_0x2517d8)return void this['_pendingThreads']['push'](_0x44fd4e);const _0x1686aa=this['_calculatePosition'](_0x44fd4e['archivedAt']),_0x1c9355=_0x2465aa['getByInnerView'](_0x2517d8['view']);_0x1c9355['isVisible']&&_0x2465aa['_visibleAnnotations']['remove'](_0x1c9355),this['annotationViews']['add'](_0x1c9355['view'],_0x1686aa);}}['_calculatePosition'](_0x33e263){const _0x548534=this['editor']['config']['get']('collaboration.channelId'),_0x3a8018=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x2dd037=>_0x2dd037['channelId']===_0x548534)['findIndex'](_0x5d0a36=>_0x5d0a36['archivedAt']<_0x33e263);return _0x3a8018<0x0||_0x3a8018>this['annotationViews']['length']?this['annotationViews']['length']:_0x3a8018-0x1;}['_toggleDialog'](){const _0x347684=this['editor'],_0x4c9826=_0x347684['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x347684['locale'],this['annotationViews'])),'commentsArchive'===_0x4c9826['id']?_0x4c9826['hide']():_0x4c9826['show']({'id':'commentsArchive','title':N(_0x347684['locale'],'COMMENTS_ARCHIVE'),'icon':_0x1bd544,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x284766['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x610ee7,_0x20e747=!0x1){const _0x300c9e=this['editor']['locale'],_0x6dab26=this['editor']['plugins']['get']('Dialog'),_0x4c3975=new _0x610ee7(_0x300c9e);return _0x4c3975['bind']('isEnabled')['to'](this,'isEnabled'),_0x4c3975['bind']('isOn')['to'](_0x6dab26,'id',_0x1ecabc=>'commentsArchive'===_0x1ecabc),_0x4c3975['set']({'label':N(_0x300c9e,'COMMENTS_ARCHIVE'),'icon':_0x1bd544,'isToggleable':!0x0}),_0x20e747&&(_0x4c3975['tooltip']=!0x0),this['listenTo'](_0x4c3975,'execute',()=>this['_toggleDialog']()),_0x4c3975;}['_hideDialogOnAnnotationEscape']=_0x40564b=>{const _0x44a3d1=_0x40564b['source'];if(!this['annotationViews']['has'](_0x44a3d1['view']))return;const _0x1e139e=this['editor']['plugins']['get']('Dialog');_0x1e139e['isOpen']&&'commentsArchive'===_0x1e139e['id']&&(_0x1e139e['hide'](),_0x40564b['stop']());};}class gi extends _0x4f8b18{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|
|
23
|
+
import{Editor as _0x128edd,ContextPlugin as _0x80d5c4,PendingActions as lt,Command as _0x579a2a,Plugin as _0x226390,Context as _0x3cbf37}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x3b7d3e,uid as _0x214e59,KeystrokeHandler as jt,FocusTracker as _0x3ada3a,diff as _0x3cea0c,Collection as _0x4ca5b9,Rect as _0x329766,CKEditorError as _0x47ee64,first as _0x804c8,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x48908c,keyCodes as _0x19dddc}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x3f9ffa,AriaDescriptionView as Zt,setupThreadKeyboardNavigation as ts,ConfirmMixin as ti,LateFocusButtonView as _0x5f4d98,trimHtml as _0x219427,LateFocusDropdownButtonView as _0x80e42c,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x5dada0}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x241c19}from'es-toolkit/compat';import{IconUndo as _0x1833db,IconCheck as _0x4a246a,IconPencil as _0x5e9e87,IconRemoveComment as _0x43426c,IconThreeVerticalDots as _0x48821f,IconAddComment as _0x1e356c,IconCommentsArchive as _0x1d60e9}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Xt,InlineEditableUIView as $t,EditorUI as Ut,View as kt,FocusCycler as _0x16ebe1,ButtonView as _0x1a5bd1,ViewCollection as _0xb4f04b,createDropdown as _0x8fa235,ListView as _0x33eace,focusChildOnDropdownOpen as _0xe2841f,ListItemView as _0x43576a,MenuBarMenuListItemButtonView as _0x189f4e,BodyCollection as _0x158ef7,BalloonPanelView as _0xeefad1,ContextualBalloon as _0x2e29f3,Dialog as _0x21aea1,DialogViewPosition as _0x16088a}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as qt,enableViewPlaceholder as St,MouseObserver as _0x28044f}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as zt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as Bt,ShiftEnter as Et}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Gt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Jt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Kt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Lt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x217e08}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x2ab450}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x3b7d3e(){['model'];['view'];constructor(_0x590cc9,_0x518cce){super(),this['model']=_0x590cc9,this['model']['_isAttached']=!0x0,this['view']=_0x518cce,this['listenTo'](_0x518cce,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x518cce,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x518cce,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x518cce,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x518cce,'addComment',(_0x3dfd23,_0x45ba94)=>this['addComment'](_0x45ba94)),this['listenTo'](_0x518cce,'updateComment',(_0x41da5e,_0x12c7e7,_0x64e92)=>this['updateComment'](_0x12c7e7,_0x64e92)),this['listenTo'](_0x518cce,'removeComment',(_0x33f50e,_0x8add35)=>this['removeComment'](_0x8add35));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x3c9f3c){this['model']['addComment']({'content':_0x3c9f3c,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x57cfad,_0x5cdcae){this['model']['getComment'](_0x57cfad)['update']({'content':_0x5cdcae});}['removeComment'](_0x800a2){this['model']['getComment'](_0x800a2)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x1086f7,_0x47030b,_0x2125d2){const t=_0x1086f7['t'];switch(_0x47030b){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'},_0x2125d2);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'},_0x2125d2);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'},_0x2125d2);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'},_0x2125d2);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x2125d2);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'},_0x2125d2);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'},_0x2125d2);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'},_0x2125d2);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Vt extends Xt{['main'];['editable'];constructor(_0x1c2826,_0x52e103){super(_0x1c2826);const _0x53ec81=_0x214e59();this['main']=this['createCollection'](),this['editable']=new $t(_0x1c2826,_0x52e103,void 0x0,{'label':()=>N(_0x1c2826,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x1c2826['uiLanguageDirection'],'lang':_0x1c2826['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x53ec81},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Ft extends Ut{['view'];constructor(_0x593de9){super(_0x593de9),this['view']=new Vt(_0x593de9['locale'],_0x593de9['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x4c136c=this['editor']['editing']['view'],_0x582909=this['view']['editable'],_0x2550fc=_0x4c136c['document']['getRoot']();_0x582909['name']=_0x2550fc['rootName'],this['view']['render']();const _0x15e667=_0x582909['element'];this['setEditableElement'](_0x582909['name'],_0x15e667),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x4c136c['attachDomRoot'](_0x15e667),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[zt,Bt,Et,Gt,Jt,Kt,Lt];class Rt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x3b7d3e(_0x128edd){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Qt)());constructor(_0x2b8c3a={}){function _0x2b94de(_0x5c5ff1){return _0x5c5ff1['map'](_0x1ae4f9=>String['fromCharCode'](_0x1ae4f9))['join']('');}(_0x2b8c3a=Object['assign']({},_0x2b8c3a))['plugins']||(_0x2b8c3a['plugins']=Rt['defaultPlugins']),super(_0x2b8c3a),this['ui']=new Ft(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x2b94de([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2b94de([0x76,0x69,0x65,0x77])][_0x2b94de([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2b94de([0x61,0x75,0x74,0x6f]),this[_0x2b94de([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x2b94de([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2b94de([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x2b94de([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x2b94de([0x6f,0x6b])});}['create'](){const _0x355815=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x355815))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x4bffc6=>{const _0x2131a4=this['model']['document']['getRoot'](),_0x398556=_0x2131a4&&_0x2131a4['getChild'](_0x2131a4['childCount']-0x1);_0x4bffc6['setSelection'](_0x398556,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x3938bc=this['editing']['view'],_0x39e0e0=_0x3938bc['document']['getRoot'](),_0x4287d2=_0x39e0e0['getChild'](0x0);_0x39e0e0['childCount']>0x1||!_0x4287d2||'p'!=_0x4287d2['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x3938bc,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x4287d2['placeholder']=this['placeholder']),St({'view':_0x3938bc,'element':_0x4287d2,'keepOnFocus':!0x0}),this['placeholderElement']=_0x4287d2);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x2244d5,_0x470fd1={}){super(_0x2244d5),this['editor']=null,this['_editorConfig']=_0x470fd1,this['set']('value',_0x470fd1['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x2244d5,'Reply...')),this['set']('submitLabel',N(_0x2244d5,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x3ada3a(),this['focusCycler']=new _0x16ebe1({'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',(_0x57f788,_0x2a72f4)=>{this['cancelButtonView']['fire']('execute'),_0x2a72f4();}),this['keystrokes']['set']('Ctrl+Enter',(_0x327884,_0x292698)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x292698());}),this['on']('submit',(_0x54a991,_0x494e03)=>{_0x494e03['length']>0xfde8?(alert(N(_0x2244d5,'TOO_LONG_COMMENT_ALERT',[_0x494e03['length'],0xfde8])),_0x54a991['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x1848c4=this['editor'];this['element']['insertBefore'](_0x1848c4['ui']['element'],this['element']['firstChild']),_0x1848c4['model']['document']['on']('change',()=>this['value']=_0x1848c4['getData']()),_0x1848c4['bind']('placeholder')['to'](this),this['focusables']['add'](_0x1848c4['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x56c2ea){-0x1===_0x56c2ea?(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:_0x1f2cca}=this,_0x1e1bf4=new _0x1a5bd1(_0x1f2cca);return _0x1e1bf4['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x1e1bf4['withText']=!0x0,_0x1e1bf4['bind']('label')['to'](this,'submitLabel'),_0x1e1bf4['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x1e1bf4['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x2ffa20,_0x134c85)=>!_0x134c85&&!!_0x2ffa20['trim']()),_0x1e1bf4;}['_createCancelButton'](){const {locale:_0x3dcf6b}=this,_0x453926=new _0x1a5bd1(_0x3dcf6b);return _0x453926['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x453926['label']=N(_0x3dcf6b,'Cancel'),_0x453926['withText']=!0x0,_0x453926['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x453926;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x2b814d=>{this['focusTracker']['add'](_0x2b814d['element']);}),this['focusables']['on']('change',(_0x2ba4f7,_0x438e59)=>{for(const _0x1b2c52 of Array['from'](_0x438e59['added'])['reverse']())this['focusTracker']['add'](_0x1b2c52['element']);});}}class ie extends kt{constructor(_0x27b365,_0x1017b3,_0x3e5bf4){super(_0x27b365),this['commentInputView']=new os(_0x27b365,_0x3e5bf4),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x255c4d,_0xae410f)=>_0x255c4d||!!_0xae410f),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 _0x3f9ffa(_0x27b365,_0x1017b3),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'](_0x1ef6de){this['commentInputView']['focus'](_0x1ef6de);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x1dc154,_0x223c19)=>{const {submitButtonView:_0x3e14db,cancelButtonView:_0x4b7217,editor:_0x3b3986}=this['commentInputView'];[_0x3e14db['element'],_0x4b7217['element'],_0x3b3986?_0x3b3986['editing']['view']['getDomRoot']():null]['filter'](_0x43f28d=>_0x43f28d)['some'](_0x165ce0=>_0x165ce0['contains'](_0x223c19['target']))||(this['focus'](),_0x223c19['preventDefault']());});}}class rs extends kt{constructor(_0x465e22){super(_0x465e22);const _0x518dc6=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x518dc6['to']('count',_0xbfa197=>N(_0x465e22,'NUMBER_OF_COMMENTS',_0xbfa197))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x36ba56,_0x37e68c,_0x5a2940){super(_0x36ba56);const _0x5e1b3c=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x37e68c['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x37e68c,this['_config']=_0x5a2940,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x3ada3a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x16ebe1({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x52972b=>this['commentViews']['map'](_0xe11d4d=>_0xe11d4d['element'])['includes'](_0x52972b['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x36ba56),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x4f52b0=>_0x4f52b0-this['_config']['maxCommentsWhenCollapsed']);for(const _0xd28af5 of _0x37e68c['comments'])this['_handleNewCommentModel'](_0xd28af5);this['_handleInfoComment'](),this['listenTo'](_0x37e68c['comments'],'add',(_0x5e5a93,_0xf17471)=>{const _0x5f07c3=this['_calculatePosition'](_0xf17471);this['length']++,this['_handleNewCommentModel'](_0xf17471,_0x5f07c3),this['refreshVisibleViews']();}),this['listenTo'](_0x37e68c['comments'],'remove',(_0x4a9332,_0x358033)=>{this['length']--,this['_handleRemoveCommentModel'](_0x358033),this['refreshVisibleViews']();}),this['listenTo'](_0x37e68c,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x37e68c,'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',_0x5e1b3c['if']('length','ck-hidden',_0x2120a0=>!_0x2120a0)],'aria-label':N(_0x36ba56,'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'](_0x4af8fd){-0x1===_0x4af8fd?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x54ef7d of this['commentViews'])_0x54ef7d['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x291c5b,_0xfc803d){const _0x390ed2=new this['_config']['CommentView'](this['locale'],_0x291c5b,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x390ed2['viewUid']=_0x291c5b['id'],_0x390ed2['delegate']('removeComment')['to'](this),_0x390ed2['delegate']('updateComment')['to'](this),_0x390ed2['delegate']('resolveCommentThread')['to'](this),_0x390ed2['delegate']('editorReady')['to'](this),_0x390ed2['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x390ed2,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x390ed2,_0xfc803d);}['_calculatePosition'](_0x379d6c){const _0x177afe=this['_model']['_findOptimalIndex'](_0x379d6c);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x379d6c['authoredAt']?_0x177afe-0x1:_0x177afe:_0x177afe-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x202bee={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x202bee,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x202bee));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x26df51){const _0x4b3900=this['commentViews']['remove'](_0x26df51['id']);this['stopListening'](_0x4b3900),_0x4b3900['isEditMode']&&this['_updateHasDirtyComment'](),_0x4b3900['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x41d703=>_0x41d703['isEditMode']);}['_rearrangeCollapse'](){const _0x2221ee=function(_0x3ca90d){const _0x247058=new _0x4ca5b9();for(const _0x3a2fc4 of _0x3ca90d)_0x247058['add'](_0x3a2fc4);return _0x247058;}(this['commentViews']),_0x5888b5=this['_collapsedCommentsView']['count'];for(let _0x4f01e5=0x1;_0x4f01e5<=_0x5888b5;_0x4f01e5++)_0x2221ee['remove'](0x1);for(const _0x2721df of _0x2221ee)_0x2721df['collapse']();_0x5888b5>0x0&&_0x2221ee['add'](this['_collapsedCommentsView'],0x1),ns(_0x3cea0c(Array['from'](this['visibleViews']),Array['from'](_0x2221ee)),this['visibleViews'],_0x2221ee);}['_rearrangeExpand'](){ns(_0x3cea0c(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x4b3ae5 of this['visibleViews'])_0x4b3ae5['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x4f6802=>{this['focusTracker']['add'](_0x4f6802['element']),this['keystrokes']['listenTo'](_0x4f6802['element']);}),this['commentViews']['on']('change',(_0x1fddcb,_0x2e5136)=>{for(const _0x545b99 of _0x2e5136['removed'])this['focusTracker']['remove'](_0x545b99['element']),this['keystrokes']['stopListening'](_0x545b99['element']);for(const _0x4217a8 of Array['from'](_0x2e5136['added'])['reverse']())this['focusTracker']['add'](_0x4217a8['element']),this['keystrokes']['listenTo'](_0x4217a8['element']);});}}function ns(_0x3f4b87,_0x1e5566,_0x3c86e4){let _0x1c70aa=0x0;for(const _0x2c4738 of _0x3f4b87)switch(_0x2c4738){case'insert':_0x1e5566['add'](_0x3c86e4['get'](_0x1c70aa),_0x1c70aa),_0x1c70aa++;break;case'delete':_0x1e5566['remove'](_0x1c70aa);break;case'equal':_0x1c70aa++;}}class oe extends kt{constructor(_0x2111cd){super(_0x2111cd);const _0x1be009=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x1be009['to']('contextValue',_0x56888d=>N(_0x2111cd,'THREAD_CONTEXT_LABEL',_0x56888d)),'tabindex':-0x1},'children':[{'text':_0x1be009['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x25885a,_0x29c9e7){super(_0x25885a);const _0x1b63d2=this['bindTemplate'];this['_model']=_0x29c9e7,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x3ada3a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x16ebe1({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x523f94=>!!_0x523f94),this['bind']('contextValue')['to'](this['_model'],'context',_0x36cb0f=>_0x36cb0f&&_0x36cb0f['value']?this['_trimContextValue'](_0x36cb0f['value']):N(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x1b63d2['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 _0x4ad058=new _0x1a5bd1(this['locale']);return _0x4ad058['label']=N(this['locale'],'Reopen'),_0x4ad058['tooltip']=N(this['locale'],'Reopen'),_0x4ad058['icon']=_0x1833db,_0x4ad058['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2d9d81=>!_0x2d9d81),_0x4ad058['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4e20d8,_0xd7c158)=>_0x4e20d8&&_0xd7c158),_0x4ad058['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x4ad058;}['_trimContextValue'](_0x2bb96c){if(_0x2bb96c['length']<0x96)return _0x2bb96c;const _0x24f6f4=_0x2bb96c['lastIndexOf']('\x20',0x93);return _0x2bb96c['substring'](0x0,_0x24f6f4>-0x1?_0x24f6f4:0x93)+'...';}['_attachContextActions'](){const _0x30a584=this['element']['querySelector']('.ck-context'),_0x379774=_0x30a584['querySelector']('.ck-context__value');this['listenTo'](_0x30a584,'mouseenter',()=>{_0x379774['offsetWidth']<_0x379774['scrollWidth']&&_0x30a584['classList']['add']('overlay');}),this['listenTo'](_0x30a584,'mouseleave',()=>{_0x30a584['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0xabcbd0 of this['focusables'])this['focusTracker']['add'](_0xabcbd0['element']),this['keystrokes']['listenTo'](_0xabcbd0['element']);}['_createContextView'](){const _0x147886=new oe(this['locale']);return _0x147886['bind']('contextValue')['to'](this),_0x147886;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3ef8b1,_0x27e660,_0x303f1f,_0x230a8f){super(_0x3ef8b1),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x27e660,this['_localUser']=_0x303f1f,this['_config']=_0x230a8f,this['commentThreadHeaderView']=new Yt(_0x3ef8b1,_0x27e660),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x3ef8b1,N(_0x3ef8b1,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x3ef8b1,_0x27e660,Object['assign']({'CommentView':this['_config']['CommentView']},_0x230a8f)),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',(_0x50f456,_0x1ecac8)=>_0x50f456||!!_0x1ecac8),this['bind']('isUnlinked')['to'](_0x27e660,'unlinkedAt',_0x4de54f=>!!_0x4de54f),this['bind']('ariaLabel')['to'](this,'length',_0x5bd551=>{const _0x533586=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x5bd551,_0x533586]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x3ada3a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x16ebe1({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x40160b=>_0x40160b['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),ts(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x14ced6=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x5cb8fb=_0x14ced6['commentInputView'];return _0x14ced6['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x5cb8fb,'value',(_0xcc1d9e,_0x1bc0ae,_0x129955,_0x500eaa,_0x1e3d40)=>!!_0x1e3d40||!!_0x500eaa&&_0x129955&&!_0x1bc0ae||_0xcc1d9e&&_0x129955&&!_0x1bc0ae),_0x5cb8fb['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0xb01332,_0x5241fb,_0x3f8131)=>{let _0x5834fa;return _0x5834fa=_0x3f8131&&_0x5241fb?'Reply\x20to\x20reopen\x20discussion...':_0xb01332?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x5834fa);}),_0x5cb8fb['bind']('submitLabel')['to'](this,'length',_0xb0bb94=>N(this['locale'],_0xb0bb94?'Reply':'Comment')),_0x5cb8fb['on']('submit',(_0x485722,_0x159f98)=>{this['fire']('addComment',_0x159f98),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x5cb8fb['on']('cancel',()=>{this['focus']();}),_0x5cb8fb['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x5cb8fb['on']('cancel',_0x511297=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x511297['stop']());}),this['on']('change:isActive',(_0x4527f1,_0x3afb07,_0x18f318)=>{_0x18f318||this['length']||_0x5cb8fb['value']||this['fire']('removeCommentThread');}),_0x14ced6;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x4438ca,_0x3ebad6,_0x3ed62b,_0x3fe86f){super(_0x4438ca,_0x3ebad6,_0x3ed62b,_0x3fe86f),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x4438ca,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x31be81,_0x3174c0,_0x30e5a6)=>{_0x30e5a6||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x513874,_0x2a91a5,_0x56c158)=>{_0x56c158&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x2acebc=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x2acebc['if']('isActive','ck-thread--active'),_0x2acebc['if']('isUnlinked','ck-thread--unlinked'),_0x2acebc['if']('isConfirm','ck-thread--remove-confirmation'),_0x2acebc['to']('actionIndicator',_0x36c6c1=>_0x36c6c1?'ck-thread--'+_0x36c6c1:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x2acebc['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 _0x4edc7d of this['commentsListView']['commentViews'])_0x4edc7d['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0xd5ab95}=this,_0x367e01=this['commentsListView']['commentViews']['get'](0x0);_0x367e01===this['_boundFirstCommentView']||_0x367e01['isSystemComment']||(this['_boundFirstCommentView']=_0x367e01,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x367e01,'actionIndicator',_0x3a5a06=>'remove'===_0x3a5a06?'remove':null),_0x367e01['placeholder']=N(_0xd5ab95,'Write\x20a\x20comment...'),_0x367e01['removeButton']['on']('execute',_0x58885f=>{_0x58885f['stop'](),this['showConfirm'](N(_0xd5ab95,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x367e01['focus']();}),_0x367e01['actionBar']['add'](this['resolveButton'],0x0),_0x367e01['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x4407c5=new _0x5f4d98(this['locale']);return _0x4407c5['label']=N(this['locale'],'Resolve'),_0x4407c5['tooltip']=N(this['locale'],'Resolve'),_0x4407c5['icon']=_0x4a246a,_0x4407c5['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x4407c5['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x599160=>!_0x599160),_0x4407c5['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x5a9104,_0x4ec317)=>_0x5a9104&&!_0x4ec317),_0x4407c5['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x4407c5;}['_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(_0x17c131){super(_0x17c131),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x3e8222,_0x857685,_0xc1d2ae)=>{this['element']['innerHTML']=_0xc1d2ae;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x59d7a7,_0x354284,_0x4154d1){super(_0x59d7a7),this['_model']=_0x354284,this['_config']=_0x4154d1,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x354284,'content',_0x354284,'authoredAt',(_0x1a23c7,_0x460930)=>N(_0x59d7a7,'COMMENT_ARIA_LABEL',[_0x354284['author']['name'],_0x4154d1['formatDateTime'](_0x460930),new DOMParser()['parseFromString'](_0x1a23c7,'text/html')['body']['textContent'],_0x354284['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Zt(_0x59d7a7,N(_0x59d7a7,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0xb4f04b(),this['focusTracker']=new _0x3ada3a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x16ebe1({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xe2398b=>_0xe2398b['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):N(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):N(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x585a09=new es(this['locale']);return _0x585a09['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x45aaf2,_0x289ee0)=>_0x289ee0?_0x219427(_0x45aaf2,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x45aaf2),_0x585a09;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0xb6760c=new os(this['locale'],this['_config']['editorConfig']);return _0xb6760c['value']=this['_model']['content'],_0xb6760c['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0xb6760c['submitLabel']=N(this['locale'],'Save'),_0xb6760c['on']('submit',(_0x37dd65,_0x35e40b)=>{this['fire']('updateComment',this['_model']['id'],_0x35e40b),this['switchToDisplayMode'](),this['focus']();}),_0xb6760c['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0xb6760c['once']('editorReady',()=>{_0xb6760c['focus']();}),_0xb6760c['createEditor'](),_0xb6760c['delegate']('editorReady')['to'](this),_0xb6760c['delegate']('editorDestroyed')['to'](this),_0xb6760c;}['_setupKeyboardNavigation'](){const _0x41ee9c=this['element'];this['keystrokes']['listenTo'](_0x41ee9c);for(const _0x4bc097 of this['focusables'])this['focusTracker']['add'](_0x4bc097['element']),this['keystrokes']['listenTo'](_0x4bc097['element']);this['focusables']['on']('change',(_0xeb4ab4,_0x20d090)=>{for(const _0x53fb78 of _0x20d090['removed'])this['focusTracker']['remove'](_0x53fb78['element']),this['keystrokes']['stopListening'](_0x53fb78['element']);for(const _0x14750b of _0x20d090['added'])this['focusTracker']['add'](_0x14750b['element']),this['keystrokes']['listenTo'](_0x14750b['element']);}),this['keystrokes']['set']('enter',(_0xfc24bf,_0x32bea4)=>{_0x41ee9c===_0xfc24bf['target']&&(this['focusCycler']['focusFirst'](),_0x32bea4());}),this['keystrokes']['set']('esc',(_0x1d4298,_0x3aae0e)=>{_0x41ee9c!==_0x1d4298['target']&&(this['focus'](),_0x3aae0e());});}}class Tt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(di){['actionBar'];['userView'];constructor(_0x501012,_0x1d5662,_0x386baa){super(_0x501012,_0x1d5662,_0x386baa),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x501012,'Reply...')),this['bind']('authoredAt')['to'](_0x1d5662),this['bind']('resolvedAt')['to'](_0x1d5662),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 _0x3f9ffa(_0x501012,_0x1d5662['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x1d5662,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x515a12=this['bindTemplate'],_0x33952b=[{'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':_0x515a12['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x515a12['to']('authoredAt',_0x33d5b6=>this['_config']['formatDateTime'](_0x33d5b6))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x515a12['if']('isEditMode','ck-comment__actions--hidden'),_0x515a12['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']&&_0x33952b['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x515a12['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x515a12['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x515a12['if']('isEditMode','ck-comment--edit'),_0x515a12['if']('isSystemComment','ck-comment--info'),_0x515a12['to']('actionIndicator',_0x530396=>_0x530396?'ck-comment--'+_0x530396:'')],'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':_0x33952b}]}]};}['_createEditButton'](){const _0x88754d=new _0x1a5bd1(this['locale']);return _0x88754d['label']=N(this['locale'],'Edit'),_0x88754d['icon']=_0x5e9e87,_0x88754d['withText']=!0x0,_0x88754d['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x88754d['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x534030=>!_0x534030),_0x88754d['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x88754d['on']('execute',()=>this['switchToEditMode']()),_0x88754d;}['_createRemoveButton'](){const _0x3d8241=new _0x1a5bd1(this['locale']);return _0x3d8241['label']=N(this['locale'],'Remove'),_0x3d8241['icon']=_0x43426c,_0x3d8241['withText']=!0x0,_0x3d8241['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x3d8241['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x113233=>!_0x113233),_0x3d8241['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x3d8241['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x3d8241;}['_createDropdown'](){const _0x3b0d2b=_0x8fa235(this['locale'],_0x80e42c),_0x25f746=_0x3b0d2b['panelView']['children'],_0x408d5d=new _0x33eace(this['locale']),_0x407453=_0x3b0d2b['bindTemplate'];_0xe2841f(_0x3b0d2b,()=>this['items']['find'](_0x161f2a=>_0x161f2a['isVisible'])),_0x3b0d2b['extendTemplate']({'attributes':{'class':[_0x407453['if']('isVisible','ck-hidden',_0x1a5eb9=>!_0x1a5eb9)]}});const _0x2cca56=(_0x121760,_0x156f9a=-0x1)=>{const _0x2037c1=new _0x43576a(this['locale']);_0x2037c1['children']['add'](_0x121760);const _0x4f322d=_0x156f9a>-0x1?_0x156f9a:_0x408d5d['items']['length'];_0x408d5d['items']['add'](_0x2037c1,_0x4f322d);const _0x5e02e2=Array['from'](this['items']);_0x3b0d2b['unbind']('isEnabled','isVisible'),_0x3b0d2b['bind']('isEnabled')['toMany'](_0x5e02e2,'isEnabled',(..._0x40de14)=>_0x40de14['some'](_0x3fbb2a=>_0x3fbb2a)),_0x3b0d2b['bind']('isVisible')['toMany'](_0x5e02e2,'isVisible',(..._0x26d54d)=>_0x26d54d['some'](_0x17d457=>_0x17d457));};_0x3b0d2b['panelPosition']='sw',_0x3b0d2b['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x48821f});for(const _0x16b8bf of this['items'])_0x2cca56(_0x16b8bf);return _0x25f746['add'](_0x408d5d),_0x3b0d2b['listenTo'](this['items'],'add',(_0x5c02ac,_0x1da61d,_0x1d4d68)=>{_0x2cca56(_0x1da61d,_0x1d4d68);}),_0x3b0d2b['listenTo'](this['items'],'remove',(_0x4bf447,_0x26d816,_0x44d786)=>{_0x408d5d['items']['remove'](_0x44d786);}),_0x3b0d2b;}['_attachActions'](_0xa0ff3f,_0x2b3279){const _0x2f81f3=_0xa0ff3f&&_0xa0ff3f['element'];_0x2f81f3&&(this['listenTo'](_0x2f81f3,'mouseenter',()=>this['actionIndicator']=_0x2b3279),this['listenTo'](_0x2f81f3,'focus',()=>this['actionIndicator']=_0x2b3279),this['listenTo'](_0x2f81f3,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x2f81f3,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x5a2aea=super['_createCommentInputView']();return _0x5a2aea['bind']('placeholder')['to'](this),_0x5a2aea;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x512ea2){const _0x19fcbd=Dt(_0x512ea2,0x1e),_0x43d45c=new MutationObserver(_0x1dd5e9=>{for(const _0x113437 of _0x1dd5e9)('attributes'==_0x113437['type']&&'class'==_0x113437['attributeName']||'childList'==_0x113437['type']||'characterData'==_0x113437['type'])&&_0x19fcbd();});return{'attach'(_0xdb9c5b){_0x43d45c['observe'](_0xdb9c5b,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x43d45c['disconnect'](),_0x19fcbd['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x1e6cb2,_0x19ac59){super(_0x1e6cb2),this['id']=_0x214e59(),this['focusTracker']=new _0x3ada3a(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x347635,_0x211251)=>this['fire']('Esc',_0x211251)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=xt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x19ac59),this['mainView']=_0x19ac59;const _0x135ecb=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x135ecb['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 _0x35d243=this['element']['clientHeight'];_0x35d243&&(this['height']=_0x35d243);}}class T extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x3b7d3e(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0xffc852,target:_0x5e7dad,type:_0x59d4a8,isVisible:_0x1bd2d5=!0x0}){super(),this['view']=_0xffc852,this['view']['element']||this['view']['render'](),this['_type']=_0x59d4a8,this['_target']=_0x5e7dad,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x4ca5b9([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x4f2939,_0x4252b4)=>{this['view']['focusTracker']['add'](_0x4252b4);}),this['focusableElements']['on']('remove',(_0x1f625c,_0x2b905c)=>{this['view']['focusTracker']['remove'](_0x2b905c);}),this['set']('isVisible',_0x1bd2d5);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x33bbbb=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x33bbbb),_0x33bbbb;}get['targetRect'](){const _0x2ac5ab=this['target'];if(null===_0x2ac5ab)return null;if(_0x2ac5ab instanceof _0x329766)return _0x2ac5ab;const _0x3d69af=_0x2ac5ab['filter'](_0x28bdfb=>function(_0x13c6ef){const _0x2f70cc=_0x13c6ef['offsetParent'];if(_0x2f70cc)return!0x0;const _0x42597b=_0x13c6ef['getClientRects']()['item'](0x0);return!!_0x42597b;}(_0x28bdfb));return 0x0===_0x3d69af['length']?null:new _0x329766(_0x3d69af[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x5604ff){this['view']['isActive']=_0x5604ff,this['view']['mainView']['isActive']=_0x5604ff;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x5767f3){if(!(null===_0x5767f3||_0x5767f3 instanceof _0x329766||Array['isArray'](_0x5767f3)&&_0x5767f3['every'](_0x92f225=>fi(_0x92f225))))throw new _0x47ee64('annotation-invalid-target',null,{'target':_0x5767f3});}['_getNormalizedTarget'](){const _0x3a823c='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x3a823c)?[_0x3a823c]:_0x3a823c;}}function fi(_0x31f85f){return null!==_0x31f85f&&'object'==typeof _0x31f85f&&'nodeType'in _0x31f85f&&0x1===_0x31f85f['nodeType'];}class S extends _0x4ca5b9{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x54685f=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x3ada3a(),this['_focusTracker']['on']('change:isFocused',(_0x44ce8d,_0x350eea,_0x173f37)=>{_0x173f37||this['fire']('blur');});for(const _0x407e3d of _0x54685f)this['add'](_0x407e3d);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x10e152){if(this['has'](_0x10e152))throw new _0x47ee64('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x10e152['innerView'],_0x10e152),this['_viewToAnnotation']['set'](_0x10e152['view'],_0x10e152);for(const _0x130494 of _0x10e152['focusableElements'])this['_focusTracker']['add'](_0x130494);this['listenTo'](_0x10e152['focusableElements'],'add',(_0x3449b1,_0x396271)=>{this['_focusTracker']['add'](_0x396271);}),this['listenTo'](_0x10e152['focusableElements'],'remove',(_0x3dcb15,_0x5c5458)=>{this['_focusTracker']['remove'](_0x5c5458);}),this['listenTo'](_0x10e152['view']['focusTracker'],'change:isFocused',(_0x1de707,_0x2bdc41,_0x58083e)=>{_0x58083e&&this['fire']('focus',_0x10e152);}),_0x10e152['updateTargetRect']();const _0x58feb7=this['_getOrderInContent'](_0x10e152['view']['targetRect']);return super['add'](_0x10e152,_0x58feb7);}['remove'](_0x1c7f23){if(!this['has'](_0x1c7f23))throw new _0x47ee64('annotationcollection-not-existing-item',null);this['stopListening'](_0x1c7f23['view']['focusTracker']),this['stopListening'](_0x1c7f23['focusableElements']);for(const _0x4466ac of _0x1c7f23['focusableElements'])this['_focusTracker']['remove'](_0x4466ac);return this['_viewToAnnotation']['delete'](_0x1c7f23['view']),this['_innerViewToAnnotation']['delete'](_0x1c7f23['innerView']),super['remove'](_0x1c7f23);}['getByInnerView'](_0x167119){return this['_innerViewToAnnotation']['get'](_0x167119);}['getByView'](_0x380572){return this['_viewToAnnotation']['get'](_0x380572);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x32ccd4 of this)_0x32ccd4['updateTargetRect']();this['_sort']();}['_sort'](){const _0x3ff433=Array['from'](this)['sort']((_0xe8356b,_0x14a536)=>w(_0xe8356b['view']['targetRect'],_0x14a536['view']['targetRect']));for(let _0x3c8e86=_0x3ff433['length']-0x1;_0x3c8e86>0x0;_0x3c8e86--){const _0x481f8a=_0x3ff433[_0x3c8e86];_0x3c8e86!==this['getIndex'](_0x481f8a)&&(this['remove'](_0x481f8a),this['add'](_0x481f8a));}}['_getOrderInContent'](_0x3b5e0b){let _0x1a6c79=0x0;if(!_0x3b5e0b)return this['length'];for(const _0x5fbd2d of this){const _0x471a6c=_0x5fbd2d['view']['targetRect'];if(_0x471a6c){if(w(_0x3b5e0b,_0x471a6c)<0x0)return _0x1a6c79;_0x1a6c79++;}}return _0x1a6c79;}}function v({source:_0x8ce9f4,target:_0x1fa31f,filter:_0x14016c}){for(const _0x1e2a0e of _0x8ce9f4)_0x14016c(_0x1e2a0e)&&_0x1fa31f['add'](_0x1e2a0e);_0x1fa31f['listenTo'](_0x8ce9f4,'add',(_0x257bce,_0x53a732)=>{_0x14016c(_0x53a732)&&_0x1fa31f['add'](_0x53a732);}),_0x1fa31f['listenTo'](_0x8ce9f4,'remove',(_0x28baae,_0x3ebf4f)=>{_0x1fa31f['has'](_0x3ebf4f)&&_0x1fa31f['remove'](_0x3ebf4f);});}function w(_0x22c5e0,_0x36aebe){if(null===_0x22c5e0&&null===_0x36aebe)return 0x0;if(null===_0x22c5e0)return-0x1;if(null===_0x36aebe)return 0x1;const _0xc04a82=_0x22c5e0['top']-_0x36aebe['top'];return 0x0==_0xc04a82?_0x22c5e0['left']-_0x36aebe['left']:_0xc04a82;}class y extends _0x80d5c4{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1e50a0){if(super(_0x1e50a0),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x1e50a0 instanceof _0x128edd){const _0x55bd1c=_0x1e50a0['locale'];_0x1e50a0['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x55bd1c,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x55bd1c,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x55bd1c,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x55bd1c,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x55bd1c,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x55bd1c,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x55bd1c,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x4f3d0d){this['collection']['add'](_0x4f3d0d);}['remove'](_0x4b3303){this['collection']['remove'](_0x4b3303),_0x4b3303['destroy']();}['refreshVisibility'](){for(const _0xe2b484 of this['collection'])_0xe2b484['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x1c6a5e){return this['collection']['getByInnerView'](_0x1c6a5e);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x4e8cb7 of this['collection'])_0x4e8cb7['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x587531){this['fire']('_activateAnnotation',_0x587531);}['createAnnotation'](_0x4801d8){return new T(_0x4801d8);}['createAnnotationView'](_0x4b7a7d,_0x141a7e){return new E(_0x4b7a7d,_0x141a7e);}['_addActiveAnnotation'](_0x537ce2){const _0x30069f=new Set(this['activeAnnotations']);_0x30069f['add'](_0x537ce2),this['activeAnnotations']=_0x30069f;}['_removeActiveAnnotation'](_0x5d6d5a){const _0x107608=new Set(this['activeAnnotations']);_0x107608['delete'](_0x5d6d5a),this['activeAnnotations']=_0x107608;}['_bindAnnotationsToVisibleAnnotations'](){const _0x123190=this['collection'],_0x29679c=this['_visibleAnnotations'];function _0x2e40e6(_0x248dfd){const _0x448b46=_0x248dfd['source'];_0x448b46['isVisible']&&!_0x29679c['has'](_0x448b46)?_0x29679c['add'](_0x448b46):!_0x448b46['isVisible']&&_0x29679c['has'](_0x448b46)&&_0x29679c['remove'](_0x448b46),_0x448b46['view']['focusTracker']['remove'](_0x448b46['view']['element']),_0x448b46['view']['focusTracker']['add'](_0x448b46['view']['element']);}this['listenTo'](_0x123190,'add',(_0x335a94,_0x3144bd)=>{_0x3144bd['isVisible']&&_0x29679c['add'](_0x3144bd),this['listenTo'](_0x3144bd,'change:isVisible',_0x2e40e6);}),this['listenTo'](_0x123190,'remove',(_0x5a91a7,_0x15d396)=>{_0x29679c['has'](_0x15d396)&&_0x29679c['remove'](_0x15d396),this['stopListening'](_0x15d396,'change:isVisible',_0x2e40e6);});}['_setupEnterAnnotationKeystroke'](){const _0x8e973a=_0xe87b64=>{_0xe87b64['on']('ready',()=>{_0xe87b64['keystrokes']['set'](_0x217e08,(_0x22ebf9,_0x9b4da0)=>{const _0x58fbaf=_0x804c8(this['activeAnnotations']['values']());_0x58fbaf&&(_0x58fbaf['view']['focus'](),_0x9b4da0());});});};this['context']instanceof _0x128edd?_0x8e973a(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x38774e,_0x359e9d)=>{_0x8e973a(_0x359e9d);});}['_setupEscapeAnnotationHandling'](){const _0x25a829=_0x4fa5ae=>{const _0xfac939=_0x4fa5ae['source'],_0x2528ae=[];let _0x2c0c1a;if(Array['isArray'](_0xfac939['target'])){_0x2c0c1a=_0xfac939['target'][0x0],this['context']instanceof _0x128edd?_0x2528ae['push'](this['context']):this['context']['editors']&&_0x2528ae['push'](...this['context']['editors']);for(const _0x30f78a of _0x2528ae)for(const _0x4553a6 of _0x30f78a['editing']['view']['domRoots']['values']())if(_0x4553a6['contains'](_0x2c0c1a))return void _0x30f78a['editing']['view']['focus']();_0x2c0c1a['focus']();}};this['listenTo'](this['collection'],'add',(_0x38571d,_0x1731f)=>{this['listenTo'](_0x1731f,'escape',_0x25a829,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x4ee905,_0x1db7e6)=>{this['stopListening'](_0x1db7e6,'escape',_0x25a829);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x80d5c4{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x34748d){super(_0x34748d),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x1c52f1=this['context']['config'];_0x1c52f1['define']('comments.maxCommentsWhenCollapsed',0x2),_0x1c52f1['define']('comments.maxThreadTotalWeight',0x1f4),_0x1c52f1['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x1c52f1['define']('comments.CommentThreadView',gt),_0x1c52f1['define']('comments.CommentView',Tt),_0x1c52f1['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x29b616=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x18b56c,_0x114c43)=>this['_addCommentThread'](_0x114c43)),this['on']('submitCommentThread',(_0x25f73a,_0x16664d)=>this['_submitCommentThread'](_0x16664d)),this['on']('resolveCommentThread',(_0x4f8552,_0x323dd6)=>this['_resolveCommentThread'](_0x323dd6)),this['on']('resolveCommentThread',(_0x492160,_0x32e798)=>this['_updateActiveAnnotation'](_0x32e798),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x1d9a42,_0x31757b)=>this['_reopenCommentThread'](_0x31757b)),this['on']('reopenCommentThread',(_0x3b5c3f,_0x5b6f10)=>this['_updateActiveAnnotation'](_0x5b6f10),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x1ae5b2,_0x21e74d)=>this['_removeCommentThread'](_0x21e74d)),this['on']('updateCommentThread',(_0x24c196,_0x19645f)=>this['_updateCommentThread'](_0x19645f)),this['on']('updateCommentThread',(_0x111d06,_0x4d38d4)=>this['_updateActiveAnnotation'](_0x4d38d4),{'priority':'lowest'}),this['on']('addComment',(_0x1b7d86,_0x2434ae)=>this['_addComment'](_0x2434ae)),this['on']('updateComment',(_0x2f7a28,_0x749785)=>this['_updateComment'](_0x749785)),this['on']('removeComment',(_0x5487ac,_0x5ce862)=>this['_removeComment'](_0x5ce862)),this['on']('addComment',(_0x55f023,{threadId:_0x4a0321,isFromAdapter:_0x56c0a8})=>{if(_0x56c0a8)return;const _0x469bd4=this['getCommentThread'](_0x4a0321),_0x3049e3=_0x469bd4&&this['_threadToController']['get'](_0x469bd4);_0x3049e3&&_0x3049e3['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x29b616,'change:activeAnnotations',(_0x4917d2,_0x963520,_0x135c19)=>{const _0xab2bed=Array['from'](_0x135c19)['map'](_0x954b66=>this['_viewToController']['get'](_0x954b66['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0xab2bed?_0xab2bed['model']:null;});}set['adapter'](_0x514631){if(this['_adapter'])throw new _0x47ee64('commentsrepository-adapter-already-set');this['_adapter']=_0x514631;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x4356a7=_t,threadId:_0x420f0f=_0x214e59(),comments:_0x11e205=[],unlinkedAt:_0x1efae6=null,resolvedAt:_0x531ea7=null,resolvedBy:_0x22ce5a=null,target:_0x2660b1=null,context:_0x109184=null,attributes:_0x3929d8={},isResolvable:_0x567892=!0x0,isSubmitted:_0x1fe9ef=!0x1,isFromAdapter:_0x572147=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x4356a7),{'channelId':_0x4356a7,'threadId':_0x420f0f,'comments':_0x11e205,'unlinkedAt':_0x1efae6,'resolvedAt':_0x531ea7,'resolvedBy':_0x22ce5a,'target':_0x2660b1,'context':_0x109184,'attributes':_0x3929d8,'isFromAdapter':_0x572147,'isResolvable':_0x567892,'isSubmitted':_0x1fe9ef}),this['getCommentThread'](_0x420f0f);}['openNewCommentThread']({channelId:_0x1268e4=_t,threadId:_0x4cd5e5=_0x214e59(),target:_0x37d3b9,context:_0x17c55e=null,isResolvable:_0x168bc0=!0x0}){if(this['_readOnlyChannels']['has'](_0x1268e4)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x37d3b9)throw new _0x47ee64('commentsrepository-missing-target');const _0x162d52=this['addCommentThread']({'channelId':_0x1268e4,'threadId':_0x4cd5e5,'target':_0x37d3b9,'context':_0x17c55e,'isResolvable':_0x168bc0});if(!_0x162d52)return null;const _0x42ce55=this['_threadToController']['get'](_0x162d52),_0x30fa2c=_0x42ce55['view']['commentThreadInputView']['commentInputView'],_0x516301=this['context']['plugins']['get'](y),_0x1cb9c8=_0x516301['getByInnerView'](_0x42ce55['view']);return _0x516301['activate'](_0x1cb9c8),_0x30fa2c['once']('editorReady',()=>_0x30fa2c['focus']()),_0x162d52;}['hasCommentThread'](_0x1fcbe4){if('string'!=typeof _0x1fcbe4)throw new _0x47ee64('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x1fcbe4);}['updateCommentThread']({channelId:_0x41a9f8=_t,threadId:_0x2b6138,context:_0x57c3c1,unlinkedAt:_0x220a93,attributes:_0x8d45cc,isFromAdapter:_0x52dae6=!0x1}){return this['fire'](Nt('updateCommentThread',_0x41a9f8),{'channelId':_0x41a9f8,'threadId':_0x2b6138,'context':_0x57c3c1,'unlinkedAt':_0x220a93,'attributes':_0x8d45cc,'isFromAdapter':_0x52dae6}),this['getCommentThread'](_0x2b6138);}['getCommentThread'](_0x470261){if('string'!=typeof _0x470261)throw new _0x47ee64('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x470261);}['fetchCommentThread']({channelId:_0x4957ea,threadId:_0x412c06}={}){const _0x4c6c3d=this['getCommentThread'](_0x412c06);if(_0x4c6c3d)return Promise['resolve'](_0x4c6c3d);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x47ee64('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x4957ea,'threadId':_0x412c06})['then'](_0x4ddbb0=>this['hasCommentThread'](_0x412c06)?this['getCommentThread'](_0x412c06):_0x4ddbb0?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x4957ea},_0x4ddbb0)):void 0x0)['catch'](_0x3ce84f=>{throw console['error'](_0x3ce84f),new _0x47ee64('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x1f347c,skipNotAttached:_0x3c6807=!0x1,skipEmpty:_0x2f1d28=!0x1,toJSON:_0x4edc72=!0x1}={}){const _0x1a2b89=[];for(const _0x2da0b9 of this['_threads']['values']())_0x1f347c&&_0x2da0b9['channelId']!==_0x1f347c||_0x3c6807&&!_0x2da0b9['isAttached']||_0x2f1d28&&0x0===_0x2da0b9['length']||_0x1a2b89['push'](_0x2da0b9);return _0x4edc72?_0x1a2b89['map'](_0xd08f3a=>_0xd08f3a['toJSON']()):_0x1a2b89;}['getAnnotationForCommentThread'](_0x316a74){const _0x2b16d4=this['_threadToController']['get'](_0x316a74);if(!_0x2b16d4)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x2b16d4['view'])||null;}['getCommentThreadForAnnotation'](_0x34e8f0){const _0x41032e=this['_viewToController']['get'](_0x34e8f0['innerView']);return _0x41032e?_0x41032e['model']:null;}['setActiveCommentThread'](_0x21c57e){const _0x445f6d=this['context']['plugins']['get'](y);if(!_0x21c57e)return void(this['activeCommentThread']&&_0x445f6d['deactivateAll']());const _0x3c07e4=this['getCommentThread'](_0x21c57e);if(!_0x3c07e4)throw new _0x47ee64('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x21c57e});if(!this['_threadToController']['has'](_0x3c07e4))throw new _0x47ee64('commentsrepository-active-not-attached',null,{'threadId':_0x21c57e});const _0x2d9e40=_0x445f6d['getByInnerView'](this['_threadToController']['get'](_0x3c07e4)['view']);_0x445f6d['activate'](_0x2d9e40);}['switchReadOnly'](_0x4620ae,_0x4f3904){_0x4620ae?this['_readOnlyChannels']['add'](_0x4f3904):this['_readOnlyChannels']['delete'](_0x4f3904),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x134450){return this['_readOnlyChannels']['has'](_0x134450)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x37f295,_0x3af4d1){return new vt(_0x37f295,_0x3af4d1);}['setPermissions'](_0x51a992,_0x5eb959=_t){this['_permissions']['set'](_0x5eb959,_0x51a992),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x126549=_t){return this['_permissions']['has'](_0x126549)?this['_permissions']['get'](_0x126549):bt;}['_addCommentThread']({channelId:_0x14ef46,threadId:_0x145daa,comments:_0x4126d5,unlinkedAt:_0x2fbe60,resolvedAt:_0x1261d5,resolvedBy:_0x54e219,target:_0x51fafe,context:_0x269158,attributes:_0x4ff9f0,isFromAdapter:_0x2af8b3,isResolvable:_0x389584,isSubmitted:_0x2582de}){if('string'!=typeof _0x145daa)throw new _0x47ee64('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x145daa});if(this['hasCommentThread'](_0x145daa))throw new _0x47ee64('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x145daa});const _0x26194e=new pi(this,{'channelId':_0x14ef46,'id':_0x145daa,'context':_0x269158,'attributes':_0x4ff9f0,'unlinkedAt':_0x2fbe60,'resolvedAt':_0x1261d5,'resolvedBy':_0x54e219?this['context']['plugins']['get'](it)['getUser'](_0x54e219):null,'isResolvable':_0x389584,'isSubmitted':_0x2582de||_0x2af8b3});this['_threads']['set'](_0x145daa,_0x26194e);for(const _0x81fe88 of _0x4126d5)_0x26194e['_add'](this['_createNewComment']({'threadId':_0x145daa,..._0x81fe88}));return _0x51fafe&&_0x26194e['attachTo'](_0x51fafe),_0x2af8b3||!_0x26194e['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x14ef46,'threadId':_0x145daa});}['_submitCommentThread']({channelId:_0x5594fb,threadId:_0x2da8fa}){if(!this['hasCommentThread'](_0x2da8fa))throw new _0x47ee64('commentsrepository-missing-comment-thread',this);const _0xcaa227=this['getCommentThread'](_0x2da8fa);if(_0xcaa227['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x1d6987,comments:_0x51c8f4,resolvedAt:_0xaee91e,resolvedBy:_0x1c3cfd,context:_0x18a7e6,attributes:_0x349acc}=_0xcaa227,_0x5bc944=this['context']['plugins']['get']('PendingActions'),_0x1e050d=_0x5bc944['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x5594fb,'threadId':_0x1d6987,'comments':_0x51c8f4['map'](_0x57f616=>_0x57f616['toJSON']()),'resolvedAt':_0xaee91e,'resolvedBy':_0x1c3cfd?_0x1c3cfd['id']:_0x1c3cfd,'context':_0x18a7e6,'attributes':_0x349acc})['then'](({comments:_0x31b211})=>{_0x5bc944['remove'](_0x1e050d);for(const _0x209043 of _0x31b211)this['_updateComment']({'channelId':_0x5594fb,'threadId':_0x2da8fa,'commentId':_0x209043['commentId'],'createdAt':_0x209043['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x54d21f=>{throw console['error'](_0x54d21f),new _0x47ee64('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x535387,target:_0x1757a0}){const _0x4a16a1=this['getCommentThread'](_0x535387);if(!_0x4a16a1)throw new _0x47ee64('commentsrepository-attach-missing-comment-thread',this);const _0x5f442d=this['context']['plugins']['get']('PendingActions'),_0x374f20=this['context']['plugins']['get'](y),_0x15fb47=this['_createCommentThreadView'](_0x4a16a1),_0x113975=new vt(_0x4a16a1,_0x15fb47);let _0x1f2d37=null;_0x15fb47['on']('change:isDirty',(_0x101383,_0x559cac,_0x13228e)=>{_0x13228e?_0x1f2d37=_0x5f442d['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x1f2d37&&(_0x5f442d['remove'](_0x1f2d37),_0x1f2d37=null);}),this['_threadToController']['set'](_0x4a16a1,_0x113975),this['_viewToController']['set'](_0x15fb47,_0x113975);const _0x32bc91=new E(this['context']['locale'],_0x15fb47);_0x32bc91['bind']('length')['to'](_0x15fb47),_0x32bc91['bind']('isDirty')['to'](_0x15fb47,'isDirty',_0x15fb47,'length',(_0x154cd3,_0x2b9129)=>_0x154cd3||!_0x2b9129),_0x32bc91['bind']('isActive')['to'](_0x15fb47),_0x32bc91['type']='comment';const _0x226335=new T({'view':_0x32bc91,'target':_0x1757a0,'type':'comment','isVisible':!_0x4a16a1['archivedAt']&&!!('function'==typeof _0x1757a0?_0x1757a0():_0x1757a0)});return _0x15fb47['on']('escape',()=>{_0x226335['fire']('escape');}),this['_bindAnnotationToEditors'](_0x15fb47,_0x226335),_0x374f20['add'](_0x226335),_0x226335;}['_bindAnnotationToEditors'](_0xf257,_0x1cc332){this['listenTo'](_0xf257,'editorReady',(_0xf1900d,_0x155a8f)=>{const _0x475b51=_0x155a8f['ui']['view']['body']['bodyCollectionContainer'];_0x1cc332['focusableElements']['add'](_0x475b51),this['context']instanceof _0x128edd&&this['context']['ui']['focusTracker']['add'](_0x475b51);},{'priority':'highest'}),this['listenTo'](_0xf257,'editorDestroyed',(_0x5d7f21,_0x42d5b7)=>{const _0x376eec=_0x42d5b7['ui']['view']['body']['bodyCollectionContainer'];_0x1cc332['focusableElements']['has'](_0x376eec)&&_0x1cc332['focusableElements']['remove'](_0x376eec),this['context']instanceof _0x128edd&&this['context']['ui']['focusTracker']['remove'](_0x376eec);});}['_unbindEditors'](_0x4ceaf7){this['stopListening'](_0x4ceaf7,'editorReady'),this['stopListening'](_0x4ceaf7,'editorDestroyed');}['_createCommentThreadView'](_0x323875){const _0x133cd1=this['context']['plugins']['get'](it),{config:_0x1602ea,locale:_0x5e084c}=this['context'],_0x6af9d6=pt(_0x1602ea['get']('locale'),_0x5e084c);return new(0x0,(_0x1602ea['get']('comments'))['CommentThreadView'])(_0x5e084c,_0x323875,_0x133cd1['me'],{'editorConfig':{..._0x1602ea['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x1602ea['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x1602ea['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x1602ea['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x1602ea['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x6af9d6,'CommentView':_0x1602ea['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x28bcf4,channelId:_0x9a99ac,resolvedAt:_0x391621,resolvedBy:_0x19f334,isFromAdapter:_0x173ca1}){if(!this['hasCommentThread'](_0x28bcf4))throw new _0x47ee64('commentsrepository-missing-comment-thread',null,{'threadId':_0x28bcf4});const _0x46acc3=this['getCommentThread'](_0x28bcf4);if(_0x46acc3['isResolved'])throw new _0x47ee64('commentsrepository-resolved-comment-thread',null,{'threadId':_0x28bcf4});const _0x117529=this['context']['plugins']['get'](it);if(_0x46acc3['resolvedBy']=_0x117529['getUser'](_0x19f334),_0x46acc3['resolvedAt']=_0x391621,_0x173ca1||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x2c31a8=this['context']['plugins']['get']('PendingActions'),_0x235b57=_0x2c31a8['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x9a99ac,'threadId':_0x28bcf4})['then'](({resolvedAt:_0xbf273,resolvedBy:_0x417a4d})=>{_0x2c31a8['remove'](_0x235b57),_0x46acc3['resolvedBy']['id']!==_0x417a4d&&(_0x46acc3['resolvedBy']=_0x117529['getUser'](_0x417a4d)),_0x46acc3['resolvedAt']=_0xbf273;})['catch'](_0x5252b2=>{throw console['error'](_0x5252b2),new _0x47ee64('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x3556b1,channelId:_0x187e8f,isFromAdapter:_0x10fa62}){if(!this['hasCommentThread'](_0x3556b1))throw new _0x47ee64('commentsrepository-missing-comment-thread',null,{'threadId':_0x3556b1});const _0xbf2faa=this['getCommentThread'](_0x3556b1);if(!_0xbf2faa['isResolved'])throw new _0x47ee64('commentsrepository-reopen-comment-thread',null,{'threadId':_0x3556b1});if(_0xbf2faa['resolvedBy']=null,_0xbf2faa['resolvedAt']=null,_0x10fa62||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x293318=this['context']['plugins']['get']('PendingActions'),_0x223454=_0x293318['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x187e8f,'threadId':_0x3556b1})['then'](()=>_0x293318['remove'](_0x223454))['catch'](_0x2f1dbc=>{throw console['error'](_0x2f1dbc),new _0x47ee64('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x2eae7a,isFromAdapter:_0x10f26e}){const _0x303917=this['getCommentThread'](_0x2eae7a);if(!_0x303917)throw new _0x47ee64('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x2eae7a),this['_threads']['delete'](_0x2eae7a),!_0x303917['isSubmitted']||_0x10f26e||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x42d8b3=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1de91c}=_0x303917,_0x216db3=_0x42d8b3['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x1de91c,'threadId':_0x2eae7a})['then'](()=>_0x42d8b3['remove'](_0x216db3))['catch'](_0x3afcb3=>{throw console['error'](_0x3afcb3),new _0x47ee64('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x215b7b,unlinkedAt:_0x380f36,context:_0x44c504,attributes:_0x2e8a71,isFromAdapter:_0x53943c}){if('string'!=typeof _0x215b7b)throw new _0x47ee64('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x215b7b});if(!this['hasCommentThread'](_0x215b7b))throw new _0x47ee64('commentsrepository-missing-comment-thread',null,{'threadId':_0x215b7b});const _0x4e9c61=this['getCommentThread'](_0x215b7b);let _0x5c1ee3=!0x1;if(void 0x0!==_0x44c504&&_0x4e9c61['context']!==_0x44c504&&(_0x4e9c61['context']=_0x44c504,_0x5c1ee3=!0x0),void 0x0!==_0x380f36&&_0x4e9c61['unlinkedAt']!==_0x380f36&&(_0x4e9c61['unlinkedAt']=_0x380f36,_0x5c1ee3=!0x0),_0x2e8a71&&!At(_0x2e8a71,_0x4e9c61['attributes'])&&(_0x4e9c61['attributes']=_0x2e8a71,_0x5c1ee3=!0x0),!_0x5c1ee3)return Promise['resolve']();if(!_0x4e9c61['isSubmitted']||_0x53943c||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x3c7b68=this['context']['plugins']['get']('PendingActions'),{channelId:_0x26e2e0}=_0x4e9c61,_0x964376=_0x3c7b68['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x26e2e0,'threadId':_0x215b7b,'context':_0x44c504,'unlinkedAt':_0x380f36,'attributes':_0x2e8a71})['then'](()=>_0x3c7b68['remove'](_0x964376))['catch'](_0x96f5fa=>{throw console['error'](_0x96f5fa),new _0x47ee64('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x330633){const _0x209e48=this['context']['plugins']['get'](y),_0xc00ae4=this['getCommentThread'](_0x330633);if(_0xc00ae4['_isAttached']=!0x1,this['_threadToController']['has'](_0xc00ae4)){const _0x18dba7=this['_threadToController']['get'](_0xc00ae4),_0x49d61a=_0x18dba7['view'],_0x56cedc=_0x209e48['getByInnerView'](_0x49d61a);this['_threadToController']['delete'](_0xc00ae4),this['_viewToController']['delete'](_0x49d61a),_0x56cedc&&_0x209e48['remove'](_0x56cedc),_0x18dba7['destroy'](),_0x49d61a['destroy']()['then'](()=>{this['_unbindEditors'](_0x49d61a);});}}['_updateActiveAnnotation']({threadId:_0x1db991,resolvedAt:_0x60f7de,unlinkedAt:_0x36f1b7}){const _0x4d68fd=!!_0x60f7de,_0x57b0f1=this['context']['plugins']['get'](y),_0x39bcd3=this['getCommentThread'](_0x1db991);if(this['_threadToController']['has'](_0x39bcd3)){const _0x348c53=this['_threadToController']['get'](_0x39bcd3)['view'],_0x1f17d7=_0x57b0f1['getByInnerView'](_0x348c53);_0x1f17d7&&(_0x4d68fd&&_0x57b0f1['_removeActiveAnnotation'](_0x1f17d7),_0x36f1b7?_0x1f17d7['isVisible']=!0x1:_0x1f17d7['refreshVisibility']());}}['_getExternalAuthor'](_0x277912){const _0x1f4fa8=this['context']['plugins']['get'](it),_0x447641=It('external:'+_0x277912),_0x5e46fc=_0x1f4fa8['getUser'](_0x447641);return _0x5e46fc||_0x1f4fa8['addUser']({'id':_0x447641,'name':_0x277912});}['_createNewComment']({threadId:_0x56de18,commentId:_0x50d808=_0x214e59(),content:_0xb1298a,authorId:_0x4010fb,createdAt:_0x196439,attributes:_0x358e57}){if('string'!=typeof _0x50d808)throw new _0x47ee64('commentsrepository-invalid-commentid');if('string'!=typeof _0x4010fb)throw new _0x47ee64('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0xb1298a||!_0xb1298a['trim']())throw new _0x47ee64('commentsrepository-invalid-comment-content');const _0xc9d6fa=this['context']['plugins']['get'](it)['getUser'](_0x4010fb);if(!_0xc9d6fa)throw new _0x47ee64('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x4010fb});let _0x335c6b=null,_0xdf2a08=_0x196439;return _0x358e57?.['@external']&&(_0x335c6b=this['_getExternalAuthor'](_0x358e57['@external']['authorName']),_0xdf2a08=new Date(_0x358e57['@external']['createdAt'])),new wi(this,{'threadId':_0x56de18,'id':_0x50d808,'author':_0x335c6b||_0xc9d6fa,'creator':_0xc9d6fa,'content':_0xb1298a,'createdAt':_0x196439,'authoredAt':_0xdf2a08,'attributes':_0x358e57});}['_addComment'](_0x579a65){let {threadId:_0x4992e2,content:_0x8a2a20,attributes:_0x13c1c0,isFromAdapter:_0x2ad035}=_0x579a65;const _0xe7e811=this['getCommentThread'](_0x579a65['threadId']);if(!_0xe7e811)throw new _0x47ee64('commentsrepository-add-comment-to-missing-comment-thread',this);const _0xe0414b=this['_createNewComment'](_0x579a65),{id:_0x36fbd2}=_0xe0414b;if(_0xe7e811['_add'](_0xe0414b),_0x2ad035||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0xe7e811['isSubmitted'])return Promise['resolve']();const _0x2e0708=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5a87fa}=_0xe7e811,_0x466375=_0x2e0708['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x13c1c0||(_0x13c1c0={}),this['adapter']['addComment']({'channelId':_0x5a87fa,'threadId':_0x4992e2,'commentId':_0x36fbd2,'content':_0x8a2a20,'attributes':_0x13c1c0})['then'](_0x4e4528=>{_0x2e0708['remove'](_0x466375),_0x4e4528&&this['_updateComment']({'channelId':_0x5a87fa,'threadId':_0x4992e2,'commentId':_0x36fbd2,'createdAt':_0x4e4528['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x26dea0=>{throw console['error'](_0x26dea0),new _0x47ee64('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x40094d,commentId:_0x4cca36,content:_0x62a40b,createdAt:_0x50de94,attributes:_0x1ee6cf,isFromAdapter:_0x182338}){if(void 0x0!==_0x62a40b&&('string'!=typeof _0x62a40b||!_0x62a40b['trim']()['length']))throw new _0x47ee64('commentsrepository-update-comment-invalid-content');const _0x10fc8a=this['getCommentThread'](_0x40094d),_0x4039ca=_0x10fc8a['getComment'](_0x4cca36);if(!_0x4039ca)throw new _0x47ee64('commentsrepository-update-missing-comment',this);let _0x320d10=!0x1;if(_0x62a40b&&_0x62a40b!==_0x4039ca['content']&&(_0x4039ca['isEditable']||_0x182338)&&(_0x4039ca['content']=_0x62a40b,_0x320d10=!0x0),_0x50de94&&_0x50de94!==_0x4039ca['createdAt']&&(_0x4039ca['createdAt']=_0x50de94,_0x4039ca['attributes']&&_0x4039ca['attributes']['@external']||(_0x4039ca['authoredAt']=_0x50de94),_0x320d10=!0x0),_0x1ee6cf&&!At(_0x1ee6cf,_0x4039ca['attributes'])&&(_0x4039ca['attributes']=_0x1ee6cf,_0x320d10=!0x0),!_0x320d10)return Promise['resolve']();if(_0x10fc8a['fire']('commentUpdated'),_0x182338||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x5e06a7=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3275f2}=this['getCommentThread'](_0x4039ca['threadId']),_0x4d07db=_0x5e06a7['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x3275f2,'threadId':_0x40094d,'commentId':_0x4cca36,'content':_0x62a40b,'attributes':_0x1ee6cf})['then'](()=>_0x5e06a7['remove'](_0x4d07db))['catch'](_0x930f45=>{throw console['error'](_0x930f45),new _0x47ee64('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x1b4976,commentId:_0x5739d9,isFromAdapter:_0xe10555}){const _0x343480=this['getCommentThread'](_0x1b4976),_0x5c8604=_0x343480['getComment'](_0x5739d9);if(!_0x5c8604)throw new _0x47ee64('commentsrepository-remove-missing-comment',this);if(_0x343480['_remove'](_0x5c8604),_0xe10555||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x80996d=this['context']['plugins']['get']('PendingActions'),{channelId:_0x53c0cd}=_0x343480,_0x35a78a=_0x80996d['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x53c0cd,'threadId':_0x1b4976,'commentId':_0x5739d9})['then'](()=>_0x80996d['remove'](_0x35a78a))['catch'](_0x1d9857=>{throw console['error'](_0x1d9857),new _0x47ee64('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x3b7d3e(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x3a9c4b,_0x15e536){super();const _0x3370cd=_0x15e536['isResolvable'];this['channelId']=_0x15e536['channelId'],this['id']=_0x15e536['id'],this['comments']=new _0x4ca5b9(),this['_repository']=_0x3a9c4b,this['_isAttached']=!0x1,this['_isSubmitted']=_0x15e536['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x3a9c4b,'_permissions',_0x3a9c4b,'_readOnlyChannels',()=>_0x3a9c4b['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x3a9c4b,'_permissions',()=>_0x3a9c4b['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x3a9c4b,'_permissions',()=>{const _0x2a25b0=_0x3a9c4b['getPermissions'](this['channelId']);return _0x2a25b0['write']||_0x2a25b0['admin'];}),this['bind']('isResolvable')['to'](_0x3a9c4b,'_permissions',()=>_0x3370cd&&_0x3a9c4b['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x15e536['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x5ae325,_0xe45fb5)=>_0x5ae325?_0xe45fb5?_0x5ae325<_0xe45fb5?_0x5ae325:_0xe45fb5:_0x5ae325:_0xe45fb5),this['set']('unlinkedAt',_0x15e536['unlinkedAt']||null),this['set']('resolvedAt',_0x15e536['resolvedAt']||null),this['set']('resolvedBy',_0x15e536['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x1e8e34=>!!_0x1e8e34),this['set']('attributes',_0x15e536['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x358848,_0x2c39bc)=>_0x358848+_0x2c39bc['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x270572,id:_0x597d7d}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x270572),{'channelId':_0x270572,'threadId':_0x597d7d});}['setUnlinkedAt'](_0x37182c){this['_update']({'unlinkedAt':_0x37182c});}['resolve']({resolvedAt:_0x1ce1b4=new Date(),resolvedBy:_0x348eaf=null,isFromAdapter:_0x52cb95=!0x1}={}){const _0x52c12c=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x3ab858,id:_0x120853}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x3ab858),{'channelId':_0x3ab858,'threadId':_0x120853,'resolvedAt':_0x1ce1b4,'resolvedBy':_0x348eaf||_0x52c12c['id'],'isFromAdapter':_0x52cb95});}['reopen']({isFromAdapter:_0x160425=!0x1}={}){const {channelId:_0x2d8d3c,id:_0x4f34db}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x2d8d3c),{'channelId':_0x2d8d3c,'threadId':_0x4f34db,'isFromAdapter':_0x160425});}['setContext'](_0x33da2d){this['context']||this['_update']({'context':_0x33da2d});}['setAttribute'](_0x4b8056,_0xed4ea3){const _0x18752b=wt(this['attributes']);yt(_0x18752b,_0x4b8056,_0xed4ea3),this['_update']({'attributes':_0x18752b});}['removeAttribute'](_0x39e263){const _0x22dbeb=wt(this['attributes']);Ct(_0x22dbeb,_0x39e263),this['_update']({'attributes':_0x22dbeb});}['remove']({isFromAdapter:_0xc54db5=!0x1}={}){const {channelId:_0x211f47,id:_0x286b2d}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x211f47),{'channelId':_0x211f47,'threadId':_0x286b2d,'isFromAdapter':_0xc54db5});}['attachTo'](_0x542f89){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x542f89});}['addComment'](_0x3320fd){const {channelId:_0x4177b6,id:_0x2010ab}=this;this['_repository']['fire'](Nt('addComment',_0x4177b6,_0x2010ab),Object['assign']({'channelId':_0x4177b6,'threadId':_0x2010ab},_0x3320fd));}['getComment'](_0xefc76c){if('string'!=typeof _0xefc76c)throw new _0x47ee64('commentsrepository-get-comment-invalid-id',null,{'commentId':_0xefc76c});return this['comments']['get'](_0xefc76c);}['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'](_0x5b3b43=>_0x5b3b43['toJSON']()),'attributes':this['attributes']};}['_add'](_0x498073){return this['listenTo'](_0x498073,'change:authoredAt',()=>{const _0x483951=this['_findOptimalIndex'](_0x498073),_0x5f3f6d=this['comments'];_0x483951-0x1!=_0x5f3f6d['getIndex'](_0x498073)&&_0x483951+0x1!=_0x5f3f6d['getIndex'](_0x498073)&&(this['_remove'](_0x498073),this['_add'](_0x498073));}),this['comments']['add'](_0x498073,this['_findOptimalIndex'](_0x498073));}['_update'](_0x480c44){const {channelId:_0x4c3fed,id:_0x46a3b1}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x4c3fed),{..._0x480c44,'channelId':_0x4c3fed,'threadId':_0x46a3b1});}['_remove'](_0x4754d7){return this['stopListening'](_0x4754d7),_0x4754d7['destroy'](),this['comments']['remove'](_0x4754d7);}['_findOptimalIndex'](_0x168cc9){const _0x11e98f=this['comments']['find'](_0xe04328=>new Date(_0xe04328['authoredAt'])['getTime']()>new Date(_0x168cc9['authoredAt'])['getTime']());return _0x11e98f?this['comments']['getIndex'](_0x11e98f):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x3b7d3e(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x3be1c3,_0x5024d9){super();const _0x549539=_0x3be1c3['context']['plugins']['get'](it)['me'],_0x56da46=_0x3be1c3['getCommentThread'](_0x5024d9['threadId']),_0x1cf6c3=0x0===_0x56da46['comments']['length'],_0xbfbfe6=_0x549539===_0x5024d9['author'];this['id']=_0x5024d9['id'],this['threadId']=_0x5024d9['threadId'],this['author']=_0x5024d9['author'],this['creator']=_0x5024d9['creator'],this['isExternal']=Boolean(_0x5024d9['attributes']&&_0x5024d9['attributes']['@external']),this['set']('content',_0x5024d9['content']),this['createdAt']=_0x5024d9['createdAt']||new Date(),this['set']('authoredAt',_0x5024d9['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x56da46,'resolvedAt'),this['set']('attributes',_0x5024d9['attributes']||{}),this['bind']('isEditable')['to'](_0x3be1c3,'_permissions',()=>{const _0x30574f=_0x3be1c3['getPermissions'](_0x56da46['channelId'])['write'],_0x190a51=_0x3be1c3['getPermissions'](_0x56da46['channelId'])['modifyAll'];return _0xbfbfe6&&_0x30574f||!_0xbfbfe6&&_0x190a51;}),this['bind']('isRemovable')['to'](_0x56da46,'isRemovable',_0x3be1c3,'_permissions',_0x590cea=>{const _0x4254c3=_0x3be1c3['getPermissions'](_0x56da46['channelId'])['write'],_0x16a879=_0x3be1c3['getPermissions'](_0x56da46['channelId'])['modifyAll'];return _0xbfbfe6&&_0x4254c3||_0x590cea&&_0x1cf6c3||!_0xbfbfe6&&_0x16a879&&!_0x1cf6c3;}),this['bind']('isReadOnly')['to'](_0x56da46,'isReadOnly'),this['_repository']=_0x3be1c3;}get['weight'](){return Math['max'](function(_0x155633){const _0xa7093a=document['createElement']('div');return _0xa7093a['innerHTML']=_0x155633,_0xa7093a['textContent']['length'];}(this['content']),0xc8);}['update'](_0x382632){const {threadId:_0x38caf0,id:_0x2b49b3}=this;if(!this['_repository']['hasCommentThread'](_0x38caf0))throw new _0x47ee64('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x546236}=this['_repository']['getCommentThread'](_0x38caf0);this['_repository']['fire'](Nt('updateComment',_0x546236,_0x38caf0),{'channelId':_0x546236,'threadId':_0x38caf0,'commentId':_0x2b49b3,..._0x382632});}['setAttribute'](_0x3ac7ab,_0x2bafa9){const _0x26850a=wt(this['attributes']);yt(_0x26850a,_0x3ac7ab,_0x2bafa9),this['update']({'attributes':_0x26850a});}['removeAttribute'](_0x2d1150){const _0x358226=wt(this['attributes']);Ct(_0x358226,_0x2d1150),this['update']({'attributes':_0x358226});}['remove'](_0xcfe980={}){if(!_0xcfe980['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x425bc2,id:_0x2fc725}=this;if(!this['_repository']['hasCommentThread'](_0x425bc2))throw new _0x47ee64('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x14b41c}=this['_repository']['getCommentThread'](_0x425bc2);this['_repository']['fire'](Nt('removeComment',_0x14b41c,_0x425bc2),{'channelId':_0x14b41c,'threadId':_0x425bc2,'commentId':_0x2fc725,..._0xcfe980});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x122ad2,..._0x4623bf){for(const _0x356ec6 of _0x4623bf)void 0x0!==_0x356ec6&&(_0x122ad2+=':'+String(_0x356ec6));return _0x122ad2;}class ot extends _0x579a2a{constructor(_0x1eff04){super(_0x1eff04),this['set']('hasContent',!0x1);}['refresh'](){const _0x53e842=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x37f309 of _0x53e842['getRanges']())if(this['_hasContent'](_0x37f309))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x3a57dd=_0x214e59(),ranges:_0x193d1c,comment:_0x114e1a}={}){const _0x400392=this['editor']['model'],_0x963783=_0x193d1c??Array['from'](_0x400392['document']['selection']['getRanges']()),_0x1eeb73=[];for(const _0x4312e1 of _0x963783)this['_hasContent'](_0x4312e1)&&_0x1eeb73['push'](this['_trimToContent'](_0x4312e1));if(!_0x1eeb73['length'])throw new _0x47ee64('addcommentthreadcommand-incorrect-ranges',null);_0x114e1a&&this['_createCommentThread'](_0x3a57dd,_0x114e1a),this['_createMarkersFromRanges'](_0x3a57dd,_0x1eeb73,!!_0x114e1a);}['_createMarkersFromRanges'](_0x420229,_0x5188cc,_0x244b57){this['editor']['model']['change'](_0x4e3c82=>{for(const _0x50baee of _0x5188cc){const _0x83baf5=_0x214e59()['substr'](0x1,0x5),_0x39aa92='comment:'+_0x420229+':'+_0x83baf5;_0x4e3c82['addMarker'](_0x39aa92,{'range':_0x50baee,'usingOperation':_0x244b57,'affectsData':_0x244b57});}});}['_createCommentThread'](_0x3e93d9,_0x2627be){const _0x4fc4a0=this['editor']['plugins']['get']('CommentsRepository'),_0x3d6327=this['editor']['config']['get']('collaboration.channelId'),_0x54aa55=this['editor']['plugins']['get']('Users')['me'];if(!_0x54aa55)throw new _0x47ee64('addcommentthreadcommand-user-not-found',null);_0x4fc4a0['addCommentThread']({'threadId':_0x3e93d9,'channelId':_0x3d6327,'comments':[{'authorId':_0x54aa55['id'],'content':_0x2627be,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x25295){for(const _0x29339d of _0x25295['getItems']())if(this['_itemIsContent'](_0x29339d))return!0x0;return!0x1;}['_itemIsContent'](_0x47ea49){return _0x47ea49['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x47ea49)&&!_0x47ea49['is']('element','tableCell');}['_trimToContent'](_0x1a0089){const _0x5f493d=_0x511249=>!this['_itemIsContent'](_0x511249['item']),_0x1d59f7=_0x1a0089['start']['getLastMatchingPosition'](_0x5f493d),_0x14fdd1=_0x1a0089['end']['getLastMatchingPosition'](_0x5f493d,{'direction':'backward'});return this['editor']['model']['createRange'](_0x1d59f7,_0x14fdd1);}}class b extends _0x226390{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4e9fd6){super(_0x4e9fd6),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x2e70d9=this['editor'],_0x17dc61=_0x2e70d9['model']['document']['selection'],_0x44908b=_0x241c19(()=>this['refreshSelectedViews'](),0xa);_0x17dc61['on']('change:range',(_0x54d4ed,_0x4f854b)=>{_0x4f854b['directChange']&&(_0x44908b['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x2e70d9['editing']['view']['document'],'change:isFocused',(_0x2b72ee,_0x5649e2,_0x105859)=>{_0x105859&&_0x44908b();}),this['listenTo'](_0x2e70d9['ui']['focusTracker'],'change:isFocused',(_0x28ef2f,_0x23c51e,_0x520069)=>{_0x520069||this['fire']('blur',{'isAnnotationTracked':_0xc78ba1=>this['_editorAnnotationsData']['has'](_0xc78ba1['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0xf2baa9){if(this['_editorAnnotations']['has'](_0xf2baa9['view']))return;this['_editorAnnotations']['add'](_0xf2baa9['view']),this['editor']['ui']['focusTracker']['add'](_0xf2baa9['view']['element']);const _0x4e0e18=this['editor']['plugins']['get'](y);this['listenTo'](_0x4e0e18['collection'],'remove',(_0x5cd343,_0x4464e9)=>{this['editor']['ui']['focusTracker']['remove'](_0x4464e9['view']['element']),this['_editorAnnotations']['delete'](_0x4464e9['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x39aee4){if('function'!=typeof _0x39aee4)throw new _0x47ee64('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x39aee4);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x3f2215,annotations:_0x47f575}){const _0x3512fc=[],_0x144037=this['editor']['model']['document']['selection'],_0x104f26=Array['from'](_0x144037['getRanges']());for(const [_0x2f32ed,_0x2fc98f]of this['_editorAnnotationsData']){const _0x82024e=_0x54e5d2(_0x2fc98f),_0x44322a=_0x47f575['getByInnerView'](_0x2f32ed);_0x82024e&&_0x44322a&&_0x3512fc['push']({'annotation':_0x44322a,'range':_0x82024e});}function _0x54e5d2(_0x449713){for(const _0x385ac1 of _0x449713)for(const _0x4bb574 of _0x104f26)if(_0x385ac1['containsRange'](_0x4bb574,!_0x144037['isCollapsed']))return _0x385ac1;return null;}return _0x3512fc['sort']((_0x24e36e,_0x1e0816)=>{const _0x3aad1b=_0x24e36e['range'],_0x18bff1=_0x1e0816['range'];if(!_0x3aad1b['isEqual'](_0x18bff1)){if(_0x3aad1b['containsRange'](_0x18bff1,!0x0))return 0x1;if(_0x18bff1['containsRange'](_0x3aad1b,!0x0))return-0x1;}return _0x24e36e['annotation']==_0x3f2215?-0x1:_0x1e0816['annotation']==_0x3f2215?0x1:0x0;})['map'](_0xff3e81=>_0xff3e81['annotation']);}get['_editorAnnotationsData'](){const _0x3937b2=new Map();for(const _0x3a2c43 of Array['from'](this['_dataCollectors']))for(const [_0x9209a4,_0x36139a]of _0x3a2c43())_0x3937b2['set'](_0x9209a4,_0x36139a);return _0x3937b2;}}class st extends _0x226390{['afterInit'](){const _0x35c93e=this['editor'];if(!_0x35c93e['plugins']['has']('RestrictedEditingModeEditing'))return;_0x35c93e['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x226390{constructor(_0x344806){super(_0x344806),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x4634d5=this['editor'],_0x42b891=_0x4634d5['commands']['get']('importWord'),_0xccfd58=_0x4634d5['plugins']['get'](it);_0x42b891&&(_0x42b891['on']('execute',(_0x4886bb,[,_0x4aea52])=>{_0x4aea52['collaboration_features']={'comments':!0x0,'user_id':_0xccfd58['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x42b891,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x191c32,_0x25f4e2){const {comment_threads:_0x4e2095}=_0x25f4e2;_0x4e2095&&_0x4e2095['forEach'](({thread_id:_0x3c4c01,comments:_0x53819d,is_resolved:_0x2209f1})=>{const _0x147187=new Date(),_0xd9936d=_0x53819d['map'](({author:_0x248f93,content:_0xcfac06,created_at:_0x35b31f})=>({'content':_0xcfac06,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x147187,'attributes':{'@external':{'authorName':_0x248f93,'createdAt':_0x35b31f?new Date(_0x35b31f):new Date(),'source':'importWord'}}})),_0x1c9e4f=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x1c9e4f,'threadId':_0x3c4c01,'comments':_0xd9936d,'resolvedAt':_0x2209f1?_0x147187:null});});}}class at extends _0x226390{constructor(_0x188f5b){super(_0x188f5b),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x3ca07a=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x3ca07a,'contentInsertion',(_0x10cba9,_0x1977cb)=>this['_removeMarkersWithoutThreads'](_0x1977cb['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x3e3f66){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x3e3f66;const _0x3b4c5f=this['editor']['plugins']['get']('CommentsRepository');for(const _0x349e06 of _0x3e3f66['keys']()){const [_0x3ff627,_0x120b9c]=_0x349e06['split'](':');'comment'!=_0x3ff627||_0x3b4c5f['hasCommentThread'](_0x120b9c)||_0x3e3f66['delete'](_0x349e06);}return _0x3e3f66;}['_registerMarkerInClipboardPipeline'](){const _0xbdb3b5=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x390c5b=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x390c5b&&_0xbdb3b5['_registerMarkerToCopy']('comment',_0x390c5b);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x111ae0){switch(_0x111ae0){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x28dbc4){const _0x55e365=_0x28dbc4['split'](':');return{'group':_0x55e365[0x0],'id':_0x55e365[0x1],'part':_0x55e365[0x2]};}class ut extends _0x226390{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x3e4d43,_0x22285e)=>{if(!_0x22285e['options']['showCommentHighlights'])return null;if(_0x22285e['options']['ignoreResolvedComments']){const {id:_0x18553e}=ft(_0x3e4d43['markerName']),_0x2c83cc=this['editor']['plugins']['get'](o);if(_0x2c83cc['getCommentThread'](_0x18553e)?.['isResolved']&&_0x3e4d43['item'])return _0x22285e['consumable']['consume'](_0x3e4d43['item'],'addMarker:'+_0x3e4d43['markerName']),_0x22285e['consumable']['consume'](_0x3e4d43['item'],'removeMarker:'+_0x3e4d43['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x355e86=>{_0x355e86['on']('addMarker:comment',(_0x5e6514,_0x26f2c4,_0x572830)=>{if(!_0x572830['options']['showCommentHighlights'])return;const _0x298ffb=_0x26f2c4['item'];if(!_0x298ffb)return;const _0x2192b5=_0x572830['mapper']['toViewElement'](_0x298ffb);this['editor']['model']['schema']['isObject'](_0x298ffb)&&_0x2192b5&&!_0x2192b5['getCustomProperty']('widget')&&_0x2192b5['is']('containerElement')&&_0x2ab450(_0x2192b5,_0x572830['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x414a18,{writer:_0x206782,options:_0x2b0d96})=>{if(!_0x2b0d96['showCommentHighlights'])return null;const _0x52a7c1=_0x206782['createContainerElement']('div'),_0x41cb7f=_0x206782['createEmptyElement']('hr');return _0x206782['addClass']('ck-horizontal-line',_0x52a7c1),_0x206782['insert'](_0x206782['createPositionAt'](_0x52a7c1,0x0),_0x41cb7f),_0x52a7c1;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x1a41d2,{writer:_0x4bd68d,options:_0x1459e6})=>{if(!_0x1459e6['showCommentHighlights'])return null;const _0x3b6ac9=_0x4bd68d['createContainerElement']('span'),_0x18ee19=_0x4bd68d['createEmptyElement']('img');return _0x4bd68d['addClass']('image-inline',_0x3b6ac9),_0x4bd68d['insert'](_0x4bd68d['createPositionAt'](_0x3b6ac9,0x0),_0x18ee19),_0x3b6ac9;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x44e32e,{writer:_0x418645,options:_0x3c3dc2})=>{if(_0x3c3dc2['showCommentHighlights'])return _0x418645['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x485c4b,_0xe64cb6,_0xe6bfad)=>{_0xe6bfad['options']['showCommentHighlights']&&_0x485c4b['stop']();},{'priority':'high'});}}class r extends _0x226390{static get['requires'](){return[o,b,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5d5261){super(_0x5d5261),this['set']('isThreadsLoadingPaused',!0x0),_0x5d5261['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x5ae2a3,_0x3013aa,_0x104b4d,_0x5a43b6)=>{const _0x19eb1c=_0x5d5261['plugins']['get'](o),_0x442381=_0x104b4d?ft(_0x104b4d)['id']:null;_0x5d5261['model']['change'](()=>{if(_0x442381){const _0x2abddd=this['getAllMarkersForId'](_0x442381);for(const _0x3e29d0 of _0x2abddd)_0x5d5261['editing']['reconvertMarker'](_0x3e29d0);}if(_0x5a43b6){const {id:_0x1867ff}=ft(_0x5a43b6),_0x4cf3ca=_0x19eb1c['getCommentThread'](_0x1867ff);if(_0x4cf3ca&&_0x4cf3ca['unlinkedAt'])return;if(_0x4cf3ca&&!_0x4cf3ca['isAttached'])return;const _0x55a854=this['getAllMarkersForId'](_0x1867ff);for(const _0x17dcaa of _0x55a854)_0x5d5261['editing']['reconvertMarker'](_0x17dcaa);}}),_0x442381&&this['scrollToThreadMarker'](_0x442381);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x48eb04=this['editor'],_0x3c5ef6=_0x48eb04['plugins']['get'](o),_0x4aa199=_0x48eb04['config']['get']('collaboration.channelId'),_0x43c5b6=_0x3c5ef6['getCommentThreads']()['filter'](_0x256733=>_0x256733['channelId']!==_0x4aa199);_0x48eb04['commands']['add']('addCommentThread',new ot(_0x48eb04)),this['listenTo'](_0x48eb04,'change:isReadOnly',(_0x4263a4,_0x382cb1,_0x40e549)=>{_0x3c5ef6['switchReadOnly'](_0x40e549,_0x48eb04['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x3c5ef6,dt('addCommentThread',_0x4aa199),(_0x4eae53,{threadId:_0x4363e5})=>{const _0x4a27af=this['editor']['plugins']['get'](o)['getCommentThread'](_0x4363e5);_0x4a27af?.['unlinkedAt']&&this['_attachArchivedThread'](_0x4363e5);}),this['listenTo'](_0x3c5ef6,dt('removeCommentThread',_0x4aa199),(_0x27c8e5,{threadId:_0x50135c})=>{_0x48eb04['model']['enqueueChange']({'isUndoable':!0x1},_0x260798=>{const _0x2322ed=this['getAllMarkersForId'](_0x50135c);for(const _0x26b8f2 of _0x2322ed)_0x260798['removeMarker'](_0x26b8f2);});}),this['listenTo'](_0x3c5ef6,dt('resolveCommentThread',_0x4aa199),(_0x413815,{threadId:_0x1a9559})=>{(this['_reconvertMarkers'](_0x1a9559),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x1a9559)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x3c5ef6,dt('reopenCommentThread',_0x4aa199),(_0x5ab113,{threadId:_0x375220})=>{this['_reconvertMarkers'](_0x375220);},{'priority':'low'}),this['listenTo'](_0x3c5ef6,dt('addComment',_0x4aa199),(_0x2a3792,{threadId:_0x12fd0a,isFromAdapter:_0x6d73cd})=>{const _0x5b173c=this['getAllMarkersForId'](_0x12fd0a);if(_0x6d73cd||0x0==_0x5b173c['length']||!_0x3c5ef6['hasCommentThread'](_0x12fd0a))return;0x1===_0x3c5ef6['getCommentThread'](_0x12fd0a)['length']&&_0x48eb04['model']['enqueueChange']({'isUndoable':!0x1},_0x34d1fd=>{for(const _0x5ce5d2 of _0x5b173c)_0x34d1fd['updateMarker'](_0x5ce5d2,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x43c5b6);}['afterInit'](){!async function(_0x34c7b6){const _0x11f3fd=_0x42d102([0x68,0x67,0x77,0x41,0x37,0x76,0x4c,0x47,0x71,0x62,0x75,0x59,0x56,0x78,0x61,0x34,0x4e,0x74,0x54,0x31,0x50,0x48,0x36,0x55,0x73,0x4a,0x66,0x4f,0x38,0x63,0x72,0x7a,0x45,0x65,0x70,0x35,0x6c,0x69,0x32,0x44,0x4d,0x52,0x6a,0x39,0x57,0x6f,0x6b,0x64,0x4b,0x33,0x46,0x5a,0x79,0x49,0x53,0x58,0x51,0x43,0x30,0x42,0x6e,0x6d]),_0x407142=0x1b3853a7,_0x1e6803=0x1b3f3c27^_0x407142,_0x58ff51=window[_0x42d102([0x44,0x61,0x74,0x65])][_0x42d102([0x6e,0x6f,0x77])](),_0x5cf43f=_0x34c7b6[_0x42d102([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3eb362=new window[(_0x42d102([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3ae7cc=>{_0x5cf43f[_0x42d102([0x6f,0x6e,0x63,0x65])](_0x42d102([0x72,0x65,0x61,0x64,0x79]),_0x3ae7cc);}),_0x42491c={[_0x42d102([0x6b,0x74,0x79])]:_0x42d102([0x45,0x43]),[_0x42d102([0x75,0x73,0x65])]:_0x42d102([0x73,0x69,0x67]),[_0x42d102([0x63,0x72,0x76])]:_0x42d102([0x50,0x2d,0x32,0x35,0x36]),[_0x42d102([0x78])]:_0x42d102([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]),[_0x42d102([0x79])]:_0x42d102([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]),[_0x42d102([0x61,0x6c,0x67])]:_0x42d102([0x45,0x53,0x32,0x35,0x36])},_0x2924a8=_0x5cf43f[_0x42d102([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x42d102([0x67,0x65,0x74])](_0x42d102([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3c90b3(){let _0x1cb33f,_0x8205ee=null,_0x1d0596=null;try{if(_0x2924a8==_0x42d102([0x47,0x50,0x4c]))return _0x42d102([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1cb33f=_0x220caf(),!_0x1cb33f)return _0x42d102([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1cb33f[_0x42d102([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1d0596=_0x6bd9fe(_0x1cb33f[_0x42d102([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1cb33f[_0x42d102([0x6a,0x74,0x69])])),await _0x1cfa66()?_0x4dd0e4()?_0x299fa8()?_0x42d102([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x585265()?(_0x1cb33f[_0x42d102([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x42d102([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x8205ee=_0x28b855(_0x42d102([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1cb33f[_0x42d102([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x42d102([0x74,0x72,0x69,0x61,0x6c])&&(_0x8205ee=_0x28b855(_0x42d102([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3d6ef8()):_0x42d102([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x42d102([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x42d102([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x42d102([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x299fa8(){const _0x2ac53b=[_0x42d102([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x42d102([0x74,0x72,0x69,0x61,0x6c])][_0x42d102([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1cb33f[_0x42d102([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x58ff51/0x3e8:0xe10*_0x1e6803;return _0x1cb33f[_0x42d102([0x65,0x78,0x70])]<_0x2ac53b;}function _0x4dd0e4(){const _0x4729ed=_0x1cb33f[_0x42d102([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x4729ed)return!0x1;if(_0x4729ed[_0x42d102([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x42d102([0x2a])))return!0x0;if(_0x4729ed[_0x42d102([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x42d102([0x43,0x4d,0x54])))return!0x0;if(_0x4729ed[_0x42d102([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x42d102([0x52,0x43,0x4d,0x54]))){if(_0x44f3c0())return!0x0;if(_0x3aabc1()||_0x28af5f())return!0x0;}return!0x1;}function _0x585265(){const _0x10acb2=_0x1cb33f[_0x42d102([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x10acb2||0x0==_0x10acb2[_0x42d102([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x175f0d}=new URL(window[_0x42d102([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x10acb2[_0x42d102([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x175f0d))return!0x0;const _0x3c276d=_0x175f0d[_0x42d102([0x73,0x70,0x6c,0x69,0x74])](_0x42d102([0x2e]));return _0x10acb2[_0x42d102([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x514de7=>_0x514de7[_0x42d102([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x42d102([0x2a])))[_0x42d102([0x6d,0x61,0x70])](_0x15e221=>_0x15e221[_0x42d102([0x73,0x70,0x6c,0x69,0x74])](_0x42d102([0x2e])))[_0x42d102([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x16a5f7=>_0x16a5f7[_0x42d102([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x3c276d[_0x42d102([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x42d102([0x6d,0x61,0x70])](_0xa1e6fa=>Array(_0x3c276d[_0x42d102([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0xa1e6fa[_0x42d102([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x42d102([0x66,0x69,0x6c,0x6c])](_0xa1e6fa[0x0]===_0x42d102([0x2a])?_0x42d102([0x2a]):'')[_0x42d102([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0xa1e6fa))[_0x42d102([0x73,0x6f,0x6d,0x65])](_0x1a211b=>_0x3c276d[_0x42d102([0x65,0x76,0x65,0x72,0x79])]((_0x337133,_0x18c829)=>_0x1a211b[_0x18c829]===_0x337133||_0x1a211b[_0x18c829]===_0x42d102([0x2a])));}function _0x3d6ef8(){return _0x8205ee&&_0x1d0596?new window[(_0x42d102([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3592d1,_0x262e75)=>{_0x8205ee[_0x42d102([0x74,0x68,0x65,0x6e])](_0x3592d1,_0x262e75),_0x1d0596[_0x42d102([0x74,0x68,0x65,0x6e])](_0x75a9c5=>{_0x75a9c5!=_0x42d102([0x56,0x61,0x6c,0x69,0x64])&&_0x3592d1(_0x75a9c5);},_0x262e75);}):_0x8205ee||_0x1d0596||_0x42d102([0x56,0x61,0x6c,0x69,0x64]);}}function _0x6bd9fe(_0x24976f,_0x15898d){return new window[(_0x42d102([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4c1ff2=>{if(_0x1251fb())return _0x4c1ff2(_0x42d102([0x56,0x61,0x6c,0x69,0x64]));_0x2cd2b5(),_0x5cf43f[_0x42d102([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x42d102([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x9d7b71=!0x1;const _0x288930=_0x214e59();function _0x4fcb0c(_0x179db1){return!!_0x179db1&&(typeof _0x179db1===_0x42d102([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x179db1===_0x42d102([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x179db1[_0x42d102([0x74,0x68,0x65,0x6e])]===_0x42d102([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x179db1[_0x42d102([0x63,0x61,0x74,0x63,0x68])]===_0x42d102([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x5953a9(_0xff0ba3){_0x31b467(_0xff0ba3)[_0x42d102([0x74,0x68,0x65,0x6e])](_0x17699f=>{if(!_0x17699f||_0x17699f[_0x42d102([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x42d102([0x6f,0x6b]))return _0x42d102([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4ed80d(_0x3efbbe(_0x288930+_0x15898d))!=_0x17699f[_0x42d102([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x42d102([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x42d102([0x56,0x61,0x6c,0x69,0x64]);})[_0x42d102([0x74,0x68,0x65,0x6e])](_0x47f567=>(_0x1e50bd(),_0x47f567),()=>{const _0x44f5b4=_0x56fcf6();return null==_0x44f5b4?(_0x1e50bd(),_0x42d102([0x56,0x61,0x6c,0x69,0x64])):_0x42d102(_0x58ff51-_0x44f5b4>(0x3f34d7a7^_0x407142)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x42d102([0x74,0x68,0x65,0x6e])](_0x4c1ff2)[_0x42d102([0x63,0x61,0x74,0x63,0x68])](()=>{_0x4c1ff2(_0x42d102([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x55fead=0x1b0ebd27^_0x407142;function _0x1e50bd(){const _0x19ec33=_0x42d102([0x6c,0x6c,0x63,0x74,0x2d])+_0x4ed80d(_0x3efbbe(_0x24976f)),_0x330cb2=_0x2d33b7(_0x4ed80d(window[_0x42d102([0x4d,0x61,0x74,0x68])][_0x42d102([0x63,0x65,0x69,0x6c])](_0x58ff51/_0x55fead)));window[_0x42d102([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x42d102([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x19ec33,_0x330cb2);}function _0x56fcf6(){const _0x324fc8=_0x42d102([0x6c,0x6c,0x63,0x74,0x2d])+_0x4ed80d(_0x3efbbe(_0x24976f)),_0x2f3c2d=window[_0x42d102([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x42d102([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x324fc8);return _0x2f3c2d?window[_0x42d102([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2d33b7(_0x2f3c2d),0x10)*_0x55fead:null;}function _0x31b467(_0x3148d2){return new window[(_0x42d102([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x249608,_0x137199)=>{_0x3148d2[_0x42d102([0x74,0x68,0x65,0x6e])](_0x249608,_0x137199),window[_0x42d102([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x137199,0x1b398767^_0x407142);});}}_0x5cf43f[_0x42d102([0x6f,0x6e])](_0x42d102([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x25fea8,_0x50c421)=>{if(_0x50c421[0x0]!=_0x24976f)return _0x4c1ff2(_0x42d102([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x50c421[0x1]={..._0x50c421[0x1],[_0x42d102([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x288930};},{[_0x42d102([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x42d102([0x68,0x69,0x67,0x68])}),_0x5cf43f[_0x42d102([0x6f,0x6e])](_0x42d102([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5da96f=>{_0x4fcb0c(_0x5da96f[_0x42d102([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x9d7b71=!0x0,_0x5953a9(_0x5da96f[_0x42d102([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x42d102([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x42d102([0x6c,0x6f,0x77])}),_0x3eb362[_0x42d102([0x74,0x68,0x65,0x6e])](()=>{_0x9d7b71||_0x4c1ff2(_0x42d102([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x1251fb(){return _0x5cf43f[_0x42d102([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x42d102([0x76,0x69,0x65,0x77])][_0x42d102([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x42d102([0x61,0x75,0x74,0x6f]);}function _0x2cd2b5(){_0x5cf43f[_0x42d102([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x42d102([0x76,0x69,0x65,0x77])][_0x42d102([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x42d102([0x61,0x75,0x74,0x6f]);}}function _0x28b855(_0x459d08){const _0x97e296=[new window[(_0x42d102([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4802b7=>setTimeout(_0x4802b7,0x1b316d6b^_0x407142)),_0x3eb362[_0x42d102([0x74,0x68,0x65,0x6e])](()=>new window[(_0x42d102([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x31083a=>{let _0x35dbfe=0x0;_0x5cf43f[_0x42d102([0x6d,0x6f,0x64,0x65,0x6c])][_0x42d102([0x6f,0x6e])](_0x42d102([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x43cb40,_0x31eb54)=>{_0x31eb54[0x0][_0x42d102([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x35dbfe++,_0x35dbfe==(0x1b38525f^_0x407142)&&(_0x31083a(),_0x43cb40[_0x42d102([0x6f,0x66,0x66])]());});}))];return window[_0x42d102([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x42d102([0x72,0x61,0x63,0x65])](_0x97e296)[_0x42d102([0x74,0x68,0x65,0x6e])](()=>_0x459d08);}async function _0x248b0e(){await _0x3eb362,_0x5cf43f[_0x42d102([0x6d,0x6f,0x64,0x65,0x6c])][_0x42d102([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x39007f,_0x5cf43f[_0x42d102([0x6d,0x6f,0x64,0x65,0x6c])][_0x42d102([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x39007f,_0x5cf43f[_0x42d102([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x42d102([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x44f3c0(){return _0x4472ef(_0x42d102([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x345987(_0x42d102([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x42d102([0x73,0x74,0x61,0x74,0x65])]==_0x42d102([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x3aabc1(){return _0x4472ef(_0x42d102([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 _0x28af5f(){return _0x4472ef(_0x42d102([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x1eb8ef(_0x1d0d47){const _0x2fa055=_0xdede06();_0x5cf43f[_0x2fa055]=_0x42d102([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1d0d47,_0x1d0d47!=_0x42d102([0x56,0x61,0x6c,0x69,0x64])&&_0x248b0e();}function _0xdede06(){const _0x5caf1b=window[_0x42d102([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x42d102([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x42d102([0x6e,0x6f,0x77])]())[_0x42d102([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x42d102([0x2e]),'');let _0x1823ee=_0x42d102([0x68]);for(let _0x31c96e=0x0;_0x31c96e<_0x5caf1b[_0x42d102([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x31c96e+=0x2){let _0x21e9dd=window[_0x42d102([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5caf1b[_0x42d102([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x31c96e,_0x31c96e+0x2));_0x21e9dd>=_0x11f3fd[_0x42d102([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x21e9dd-=_0x11f3fd[_0x42d102([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1823ee+=_0x11f3fd[_0x21e9dd];}return _0x1823ee;}function _0x220caf(){const _0x213370=_0x2924a8[_0x42d102([0x73,0x70,0x6c,0x69,0x74])](_0x42d102([0x2e]));if(0x3!=_0x213370[_0x42d102([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x536083(_0x213370[0x1]);function _0x536083(_0x424a78){const _0x1347d6=_0x2170ab(_0x424a78);return _0x1347d6&&_0x5ab3e4()?_0x1347d6:null;function _0x5ab3e4(){const _0xc6b6d6=_0x1347d6[_0x42d102([0x6a,0x74,0x69])],_0x5815be=window[_0x42d102([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xc6b6d6[_0x42d102([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xc6b6d6[_0x42d102([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x272b4f={..._0x1347d6,[_0x42d102([0x6a,0x74,0x69])]:_0xc6b6d6[_0x42d102([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0xc6b6d6[_0x42d102([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x272b4f[_0x42d102([0x76,0x63])],_0x3efbbe(_0x272b4f)==_0x5815be;}}}async function _0x1cfa66(){let _0x407206=!0x0;try{const _0x18cc9d=_0x2924a8[_0x42d102([0x73,0x70,0x6c,0x69,0x74])](_0x42d102([0x2e])),[_0x5e5263,_0x535d16,_0x375a39]=_0x18cc9d;return _0x45ec00(_0x5e5263),await _0x1e494a(_0x5e5263,_0x535d16,_0x375a39),_0x407206;}catch{return!0x1;}function _0x45ec00(_0x2a8287){const _0x413ce8=_0x2170ab(_0x2a8287);_0x413ce8&&_0x413ce8[_0x42d102([0x61,0x6c,0x67])]==_0x42d102([0x45,0x53,0x32,0x35,0x36])||(_0x407206=!0x1);}async function _0x1e494a(_0x388bf8,_0x6dea77,_0x10f00f){const _0x589636=window[_0x42d102([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x42d102([0x66,0x72,0x6f,0x6d])](_0x44d331(_0x10f00f),_0x320b10=>_0x320b10[_0x42d102([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2fe9b6=new window[(_0x42d102([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x42d102([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x388bf8+_0x42d102([0x2e])+_0x6dea77),_0x29961b=window[_0x42d102([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x42d102([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x29961b)return;const _0x12ccdc=await _0x29961b[_0x42d102([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x42d102([0x6a,0x77,0x6b]),_0x42491c,{[_0x42d102([0x6e,0x61,0x6d,0x65])]:_0x42d102([0x45,0x43,0x44,0x53,0x41]),[_0x42d102([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x42d102([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x42d102([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x29961b[_0x42d102([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x42d102([0x6e,0x61,0x6d,0x65])]:_0x42d102([0x45,0x43,0x44,0x53,0x41]),[_0x42d102([0x68,0x61,0x73,0x68])]:{[_0x42d102([0x6e,0x61,0x6d,0x65])]:_0x42d102([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x12ccdc,_0x589636,_0x2fe9b6)||(_0x407206=!0x1);}}function _0x2170ab(_0x1d009a){return _0x1d009a[_0x42d102([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x42d102([0x65,0x79]))?JSON[_0x42d102([0x70,0x61,0x72,0x73,0x65])](_0x44d331(_0x1d009a)):null;}function _0x44d331(_0x55415c){return window[_0x42d102([0x61,0x74,0x6f,0x62])](_0x55415c[_0x42d102([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x42d102([0x2b]))[_0x42d102([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x42d102([0x2f])));}function _0x3efbbe(_0x5e702b){let _0x36493d=0x1505;function _0x52e501(_0x1cdd2f){for(let _0x2e05fa=0x0;_0x2e05fa<_0x1cdd2f[_0x42d102([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2e05fa++){const _0x1ba86b=_0x1cdd2f[_0x42d102([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2e05fa);_0x36493d=(_0x36493d<<0x5)+_0x36493d+_0x1ba86b,_0x36493d&=_0x36493d;}}function _0x49f253(_0x5d1335){Array[_0x42d102([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5d1335)?_0x5d1335[_0x42d102([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x49f253):_0x5d1335&&typeof _0x5d1335==_0x42d102([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x42d102([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5d1335)[_0x42d102([0x73,0x6f,0x72,0x74])]()[_0x42d102([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1a17c5,_0x52561f])=>{_0x52e501(_0x1a17c5),_0x49f253(_0x52561f);}):_0x52e501(window[_0x42d102([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5d1335));}return _0x49f253(_0x5e702b),_0x36493d>>>0x0;}function _0x4ed80d(_0x5c0d50){return _0x5c0d50[_0x42d102([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x42d102([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x42d102([0x30]));}function _0x2d33b7(_0x33e944){return _0x33e944[_0x42d102([0x73,0x70,0x6c,0x69,0x74])]('')[_0x42d102([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x42d102([0x6a,0x6f,0x69,0x6e])]('');}function _0x4472ef(_0x559c6e){return _0x5cf43f[_0x42d102([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x42d102([0x68,0x61,0x73])](_0x559c6e);}function _0x345987(_0x37bcf1){return _0x5cf43f[_0x42d102([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x42d102([0x67,0x65,0x74])](_0x37bcf1);}function _0x39007f(){}function _0x42d102(_0x4233eb){return _0x4233eb['map'](_0x19d211=>String['fromCharCode'](_0x19d211))['join']('');}_0x1eb8ef(await _0x3c90b3());}(this);}['destroy'](){const _0x21d675=this['editor']['plugins']['get'](o),_0x25d691=this['editor']['config']['get']('collaboration.channelId');for(const _0x5a0ae1 of _0x21d675['getCommentThreads']({'channelId':_0x25d691}))_0x21d675['_detachCommentThread'](_0x5a0ae1['id']),_0x21d675['_threads']['delete'](_0x5a0ae1['id']);super['destroy']();}['hasMarkerForId'](_0x2d53ab){return this['getAllMarkersForId'](_0x2d53ab)['length']>0x0;}['getAllMarkersForId'](_0x128579){const _0x2cb3ad=[];for(const _0x5d5072 of this['editor']['model']['markers'])_0x5d5072['name']['startsWith']('comment:'+_0x128579)&&_0x2cb3ad['push'](_0x5d5072);return _0x2cb3ad;}['scrollToThreadMarker'](_0x5961bb){setTimeout(()=>{const _0x120ce6=this['_getTargetForId'](_0x5961bb);if(!_0x120ce6)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x5961bb&&nt({'target':_0x120ce6[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x4f8380){this['editor']['model']['change'](()=>{for(const _0x19960a of this['getAllMarkersForId'](_0x4f8380))this['editor']['editing']['reconvertMarker'](_0x19960a);});}['_attachArchivedThread'](_0x41529b){const _0xe5d6e5=this['editor']['plugins']['get'](o),_0x9ac697=this['editor']['plugins']['get'](b),_0xd1fcf1=_0xe5d6e5['getCommentThread'](_0x41529b);if(!_0xd1fcf1['isAttached']){const _0xcf193f=_0xd1fcf1['attachTo'](()=>this['_getTargetForId'](_0xd1fcf1['id']));_0x9ac697['registerAnnotation'](_0xcf193f),_0xd1fcf1['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x2be425=this['editor'],_0xf6e4b5=_0x2be425['plugins']['get'](it);_0x2be425['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x29b88f,_0x3d82ff)=>{const {id:_0x973a2d}=ft(_0x29b88f['markerName']),_0xa7cc06=_0x2be425['plugins']['get'](o)['getCommentThread'](_0x973a2d),_0xa45bad=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x973a2d;let _0x377338;if(_0xa7cc06&&_0xa7cc06['isResolved']&&!_0xa45bad&&_0x29b88f['item'])return _0x3d82ff['consumable']['consume'](_0x29b88f['item'],'addMarker:'+_0x29b88f['markerName']),_0x3d82ff['consumable']['consume'](_0x29b88f['item'],'removeMarker:'+_0x29b88f['markerName']),null;const _0x5c8ad5=['ck-comment-marker'];return _0xa45bad&&_0x5c8ad5['push']('ck-comment-marker--active'),_0x377338=_0xa7cc06?.['length']?_0xa7cc06['comments']['first']['author']['id']:_0xf6e4b5['me']['id'],{'classes':_0x5c8ad5,'attributes':{'data-comment':_0x973a2d,'data-author-id':_0x377338}};}}),_0x2be425['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x32bd55,{options:_0x1faac7})=>{if(_0x1faac7['showCommentHighlights'])return null;const _0x5a9204=_0x2be425['plugins']['get'](o),_0x3cb07b=_0x2be425['model']['markers']['get'](_0x32bd55),{id:_0x254397,part:_0x20720e}=ft(_0x32bd55);return _0x3cb07b&&!_0x3cb07b['affectsData']||_0x1faac7['ignoreResolvedComments']&&_0x5a9204['getCommentThread'](_0x254397)?.['isResolved']?null:{'group':'comment','name':_0x20720e?_0x254397+':'+_0x20720e:_0x254397};}}),_0x2be425['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x1cbe90,{writer:_0x4db818})=>_0x4db818['createElement']('$marker',{'data-name':'comment:'+_0x1cbe90['getAttribute']('id')})}),_0x2be425['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x22287c=this['editor'],_0x285bb6=_0x22287c['plugins']['get'](o),_0x4abd96=new Set(),_0xb7b05b=new Set();_0x22287c['model']['document']['registerPostFixer'](_0x1b6d5a=>{let _0x1fa685=!0x1;for(const {name:_0x2adf22,data:_0x314648}of _0x22287c['model']['document']['differ']['getChangedMarkers']()){const {group:_0x56f62d,id:_0xf7c0c7}=ft(_0x2adf22);let _0x439b89=_0x314648['newRange'];if('comment'!==_0x56f62d||!_0x439b89)continue;const _0x39b12d='$graveyard'===_0x439b89['root']['rootName'];_0x39b12d||(_0x439b89=ht(_0x439b89,_0x22287c['model']),!_0x439b89||_0x439b89['isCollapsed']||!_0x314648['newRange']||_0x439b89['isEqual'](_0x314648['newRange']))?_0x22287c['model']['hasContent'](_0x439b89)&&!_0x39b12d?this['isThreadsLoadingPaused']?_0x4abd96['add'](_0x2adf22):this['_handleThreadMarker'](_0x2adf22,_0xf7c0c7):(_0xb7b05b['add'](_0x2adf22),_0x4abd96['delete'](_0x2adf22),_0x1b6d5a['removeMarker'](_0x2adf22),_0x1fa685=!0x0):(_0x1b6d5a['updateMarker'](_0x2adf22,{'range':_0x439b89}),_0x1fa685=!0x0);}return _0x1fa685;}),this['on']('change:isThreadsLoadingPaused',(_0x55d4df,_0x5c1b87,_0x34b70d)=>{if(!_0x34b70d&&_0x4abd96['size'])for(const _0x14711c of _0x4abd96){const {id:_0x4fc0e8}=ft(_0x14711c);_0x4abd96['delete'](_0x14711c),_0x22287c['model']['markers']['get'](_0x14711c)&&this['_handleThreadMarker'](_0x14711c,_0x4fc0e8);}}),this['listenTo'](_0x22287c['model']['document'],'change',()=>{for(const {name:_0x58cc85,data:{newRange:_0x15dcea}}of _0x22287c['model']['document']['differ']['getChangedMarkers']()){const {group:_0x129d41,id:_0x1c9f4c}=ft(_0x58cc85);if('comment'!==_0x129d41)continue;const _0x33539c=_0x285bb6['getCommentThread'](_0x1c9f4c),_0x41d20e=this['hasMarkerForId'](_0x1c9f4c);_0x33539c&&(!_0x33539c['_hasTargetInContent']&&_0x15dcea&&_0x22287c['editing']['view']['once']('render',()=>{const _0x3c822a=_0x22287c['plugins']['get'](y),_0x1e1f96=_0x285bb6['_threadToController']['get'](_0x33539c)['view'];_0x3c822a['getByInnerView'](_0x1e1f96)['refreshVisibility']();},{'priority':'low'}),_0x33539c['_hasTargetInContent']=_0x41d20e||!!_0x15dcea),_0x15dcea||(_0xb7b05b['add'](_0x58cc85),_0x4abd96['delete'](_0x58cc85));}for(const _0x14c762 of _0xb7b05b){const {id:_0x137cd2}=ft(_0x14c762),_0x27ce3c=_0x285bb6['getCommentThread'](_0x137cd2);if(_0x4abd96['delete'](_0x14c762),!_0x27ce3c)continue;const _0xb084ca=this['hasMarkerForId'](_0x137cd2);_0xb084ca||_0x27ce3c['isSubmitted']?_0xb084ca||_0x27ce3c['unlinkedAt']||_0x27ce3c['setUnlinkedAt'](new Date()):_0x27ce3c['remove']();}_0xb7b05b['clear']();});}['_handleInitialThreads'](_0x5e1e85){_0x5e1e85['forEach'](_0x4bd815=>{_0x4bd815['unlinkedAt']&&this['_attachArchivedThread'](_0x4bd815['id']);});}['_getTargetForId'](_0x2f33aa){const _0x528438=this['editor'],_0x4dc105=this['getAllMarkersForId'](_0x2f33aa);return et(_0x528438['editing'],_0x4dc105);}['_getTextContext'](_0x386c1d){const _0x2b6d70=this['getAllMarkersForId'](_0x386c1d);let _0x2d0bc8='',_0x24ee79=!0x1;for(const _0x1e562c of _0x2b6d70){const _0x1977ab=_0x1e562c['getRange']();for(const _0x46eb0f of Array['from'](_0x1977ab['getItems']()))_0x46eb0f['is']('$textProxy')?(_0x2d0bc8&&_0x24ee79&&(_0x2d0bc8+='\x20',_0x24ee79=!0x1),_0x2d0bc8+=_0x46eb0f['data']):_0x24ee79=!0x0;_0x24ee79=!0x0;}return _0x2d0bc8['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x115782,_0x382b5d){const _0x4e18d2=this['editor'],_0x3b321e=_0x4e18d2['plugins']['get'](o);let _0x57fb00=_0x3b321e['getCommentThread'](_0x382b5d);const _0x3f7e39=_0x4e18d2['config']['get']('collaboration.channelId'),_0x4c87e9=_0x4e18d2['plugins']['get'](b);if(_0x57fb00&&(_0x57fb00['unlinkedAt']&&_0x57fb00['setUnlinkedAt'](null),_0x57fb00['isAttached']))return _0x57fb00;return!this['getAllMarkersForId'](_0x382b5d)[0x0]['managedUsingOperations']?_0x4e18d2['editing']['view']['once']('render',()=>{if(_0x3b321e['getCommentThread'](_0x382b5d))return;const _0x4496d9=_0x4e18d2['plugins']['get'](y);_0x57fb00=_0x3b321e['openNewCommentThread']({'channelId':_0x3f7e39,'threadId':_0x382b5d,'target':()=>this['_getTargetForId'](_0x382b5d),'context':{'type':'text','value':this['_getTextContext'](_0x382b5d)}});const _0x202251=_0x3b321e['_threadToController']['get'](_0x57fb00)['view'],_0x18238d=_0x4496d9['getByInnerView'](_0x202251);_0x18238d&&_0x4c87e9['registerAnnotation'](_0x18238d);},{'priority':'low'}):_0x3b321e['fetchCommentThread']({'channelId':_0x3f7e39,'threadId':_0x382b5d})['then'](_0x2b159a=>{if('destroyed'!==_0x4e18d2['state']){if(_0x57fb00=_0x2b159a,_0x57fb00&&!_0x57fb00['isAttached']){const _0x346be0=_0x57fb00['attachTo'](()=>this['_getTargetForId'](_0x382b5d));_0x4c87e9['registerAnnotation'](_0x346be0),_0x57fb00['isResolved']&&this['_reconvertMarkers'](_0x382b5d);}else{if(!_0x57fb00){const _0xa4f68c=this['getAllMarkersForId'](_0x382b5d);_0x4e18d2['model']['change'](_0x4b04dd=>{for(const _0x59ff5e of _0xa4f68c)_0x4b04dd['removeMarker'](_0x59ff5e);});}}}}),_0x57fb00;}['_handleThreadMarker'](_0xf031eb,_0x503fa2){const _0x5ba090=this['_attachMarkerToThread'](_0xf031eb,_0x503fa2);_0x5ba090&&!_0x5ba090['context']&&_0x5ba090['setContext']({'type':'text','value':this['_getTextContext'](_0x503fa2)});}['_initAriaMarkerChangeAnnouncements'](){const _0x176777=this['editor'];rt(_0x176777['model'],({left:_0x56661e,entered:_0x579643})=>{for(const _0x54101c of _0x56661e)if(mt(_0x54101c)){_0x176777['ui']['ariaLiveAnnouncer']['announce'](N(_0x176777['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x3573a9 of _0x579643)if(mt(_0x3573a9)){_0x176777['ui']['ariaLiveAnnouncer']['announce'](N(_0x176777['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x5dada0)));break;}});}}function dt(_0x4d9b10,_0xdd7cef){return _0xdd7cef?_0x4d9b10+':'+_0xdd7cef:_0x4d9b10;}function ht(_0x5aa522,_0x19f744){const _0x1f1c84=_0x19f744['schema'],_0x16d577=_0x19f744['createRange'](_0x5aa522['start']);for(const _0x224cb2 of _0x5aa522['getWalker']()){const {type:_0x2e6f47,item:_0x37b7c1,nextPosition:_0x5eb1df}=_0x224cb2;if('text'===_0x2e6f47||_0x1f1c84['isObject'](_0x37b7c1)){const _0x19d290=_0x19f744['createPositionBefore'](_0x37b7c1);_0x16d577['isCollapsed']&&(_0x16d577['start']=_0x19d290),_0x16d577['end']=_0x5eb1df;}}return _0x16d577;}function mt(_0x9fd0ba){return'comment'===ft(_0x9fd0ba['name'])['group'];}class s extends _0x226390{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x351cb8=this['editor'],_0x9f0e34=_0x351cb8['plugins']['get'](o),_0x3f20e4=_0x351cb8['plugins']['get'](r),_0x1d3675=_0x351cb8['plugins']['get'](y),_0x5f1ec1=_0x351cb8['plugins']['get'](b);_0x351cb8['ui']['componentFactory']['add']('comment',()=>{const _0x30df01=this['_createUIButton'](_0x1a5bd1);return _0x30df01['tooltip']=!0x0,_0x30df01;}),_0x351cb8['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x189f4e)),_0x5f1ec1['addSourceCollector'](()=>{const _0x39bbfe=[];for(const [_0xea2e42,_0xdf921a]of _0x9f0e34['_threadToController']){const _0x4a7097=_0x3f20e4['getAllMarkersForId'](_0xea2e42['id']),_0x41c055=_0x4a7097['map'](_0x482d35=>_0x482d35['getRange']());_0x4a7097['length']>0x0&&_0x39bbfe['push']([_0xdf921a['view'],_0x41c055]);}return _0x39bbfe;}),this['listenTo'](_0x1d3675,'change:activeAnnotations',(_0x153a4e,_0x155c0e,_0x48b08b)=>{const _0x1fea77=Array['from'](_0x48b08b)['map'](_0x3c3f7a=>_0x3c3f7a['innerView'])['find'](_0x3a7ee0=>_0x9f0e34['_viewToController']['has'](_0x3a7ee0));if(!_0x1fea77)return void(_0x3f20e4['activeMarker']=null);const _0x24cf39=_0x9f0e34['_viewToController']['get'](_0x1fea77)['model']['id'],_0x131577='comment:'+_0x24cf39;_0x24cf39&&_0x3f20e4['hasMarkerForId'](_0x24cf39)?_0x3f20e4['activeMarker']=_0x131577:_0x3f20e4['activeMarker']&&(_0x3f20e4['activeMarker']=null);}),this['listenTo'](_0x9f0e34,'removeCommentThread',(_0x4448be,{threadId:_0x5a0113,isFromAdapter:_0x3bb66a})=>{!_0x3bb66a&&_0x351cb8['ui']['focusTracker']['isFocused']&&_0x3f20e4['hasMarkerForId'](_0x5a0113)&&_0x351cb8['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x9f0e34,'addComment',(_0x433497,{threadId:_0x199e6f,isFromAdapter:_0x239fbe})=>{if(_0x239fbe||!_0x3f20e4['hasMarkerForId'](_0x199e6f)||!_0x9f0e34['hasCommentThread'](_0x199e6f))return;0x1===_0x9f0e34['getCommentThread'](_0x199e6f)['length']&&(_0x351cb8['editing']['view']['focus'](),_0x433497['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x2ea4ab=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x32ab8f;for(const _0x47a4b3 in _0x2ea4ab){const _0x19399b=_0x47a4b3,_0x1c58a7=_0x2ea4ab[_0x19399b];if('commentsLicenseKeyValid'==_0x1c58a7||'commentsLicenseKeyInvalid'==_0x1c58a7||'commentsLicenseKeyExpired'==_0x1c58a7||'commentsLicenseKeyDomainLimit'==_0x1c58a7||'commentsLicenseKeyNotAllowed'==_0x1c58a7||'commentsLicenseKeyEvaluationLimit'==_0x1c58a7||'commentsLicenseKeyTrialLimit'==_0x1c58a7||'commentsLicenseKeyUsageLimit'==_0x1c58a7){delete _0x2ea4ab[_0x19399b],_0x32ab8f=_0x1c58a7,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x32ab8f&&_0x2ea4ab['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x32ab8f&&_0x2ea4ab['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x32ab8f&&_0x2ea4ab['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x32ab8f&&_0x2ea4ab['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x32ab8f&&_0x2ea4ab['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x32ab8f&&_0x2ea4ab['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x32ab8f&&_0x2ea4ab['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x1486b8){const _0x5895a3=this['editor'],_0x1a417c=new _0x1486b8(_0x5895a3['locale']),_0x20b29d=_0x5895a3['commands']['get']('addCommentThread');return _0x1a417c['set']({'label':N(_0x5895a3['locale'],'Comment'),'icon':_0x1e356c}),_0x1a417c['bind']('isEnabled')['to'](_0x20b29d,'hasContent'),this['listenTo'](_0x1a417c,'execute',()=>{_0x20b29d['execute']();}),_0x1a417c;}}class i extends _0x226390{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x530022){super(_0x530022),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x356696,_0x4dbbf5,_0x48c6e3)=>{_0x48c6e3?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x4f8f5c,_0x2b5b21]of this['editor']['commands'])_0x2b5b21['affectsData']&&'addCommentThread'!==_0x4f8f5c&&_0x2b5b21['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 _0x38ec5e=this['editor']['editing']['view']['document'];this['listenTo'](_0x38ec5e,'cut',_0x41a7d8=>_0x41a7d8['stop'](),{'priority':'highest'}),this['listenTo'](_0x38ec5e,'clipboardInput',_0x1c6abb=>_0x1c6abb['stop'](),{'priority':'highest'}),this['listenTo'](_0x38ec5e,'delete',_0x4b579d=>_0x4b579d['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x35cf69,_0x481e91]of this['editor']['commands'])_0x481e91['affectsData']&&'addCommentThread'!==_0x35cf69&&_0x481e91['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x80d5c4{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x143637){super(_0x143637),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x150a4b=this['context']['plugins']['get'](y);this['listenTo'](_0x150a4b,'_activateAnnotation',(_0x2e9b27,_0x5e9cd7)=>{for(const _0x2ded99 of this['activeUIs']){const _0x10d214=this['_uis']['get'](_0x2ded99);(0x0,this['uisData']['get'](_0x2ded99)['filter'])(_0x5e9cd7)&&_0x10d214['setActiveAnnotation'](_0x5e9cd7);}}),this['listenTo'](_0x150a4b,'_deactivateAllAnnotations',()=>{for(const _0x41035f of this['activeUIs']){this['_uis']['get'](_0x41035f)['setActiveAnnotation'](null);}}),this['listenTo'](_0x150a4b['_visibleAnnotations'],'add',(_0xd1d8b9,_0x35c020)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x35c020);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x120233){return this['activeUIs']['has'](_0x120233);}['activate'](_0x2fd010,_0x5af2dc=this['defaultFilter']){const _0x3d9b11=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x2fd010))throw new _0x47ee64('annotationsuis-missing-ui',this,{'uiName':_0x2fd010});this['isActive'](_0x2fd010)&&this['deactivate'](_0x2fd010),this['activeUIs']['add'](_0x2fd010);const _0x2e983d=new S();v({'source':_0x3d9b11['_visibleAnnotations'],'target':_0x2e983d,'filter':_0x5af2dc}),this['uisData']['set'](_0x2fd010,{'collection':_0x2e983d,'filter':_0x5af2dc});const _0x18b5e5=this['_uis']['get'](_0x2fd010);_0x18b5e5['attach'](_0x2e983d),this['listenTo'](_0x18b5e5,'change:activeAnnotation',(_0x56412b,_0x3db8d9,_0x5ad409,_0x35ec12)=>{_0x35ec12&&_0x3d9b11['_removeActiveAnnotation'](_0x35ec12),_0x5ad409&&_0x3d9b11['_addActiveAnnotation'](_0x5ad409);});}['deactivate'](_0x3899ad){if(this['activeUIs']['delete'](_0x3899ad),!this['_uis']['has'](_0x3899ad))throw new _0x47ee64('annotationsuis-missing-ui',this,{'uiName':_0x3899ad});const _0x376d4a=this['_uis']['get'](_0x3899ad);_0x376d4a['detach'](),this['stopListening'](_0x376d4a),this['uisData']['get'](_0x3899ad)['collection']['destroy'](),this['uisData']['delete'](_0x3899ad);}['switchTo'](_0x523394){if(!this['_uis']['has'](_0x523394))throw new _0x47ee64('annotationsuis-missing-ui',this,{'uiName':_0x523394});const _0x57cb23=this['context']['plugins']['get'](y),_0xa13cd6=Array['from'](_0x57cb23['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x523394);const _0x225b0f=this['_uis']['get'](_0x523394);_0x225b0f['setActiveAnnotation'](_0xa13cd6),_0x225b0f['_setSelectedAnnotations']&&_0xa13cd6&&_0x225b0f['_setSelectedAnnotations']([_0xa13cd6]);}['deactivateAll'](){for(const _0x1b3687 of this['activeUIs'])this['deactivate'](_0x1b3687);}['register'](_0xc81754,_0x97b312){if(this['_uis']['has'](_0xc81754))throw new _0x47ee64('annotationsuis-register-already-registered');if('function'!=typeof _0x97b312['attach']||'function'!=typeof _0x97b312['detach']||'function'!=typeof _0x97b312['setActiveAnnotation'])throw new _0x47ee64('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0xc81754,_0x97b312);}['refilterAnnotations'](){const _0x191871=this['context']['plugins']['get'](y)['collection'],_0x140516=new Map(),_0x382f11=Array['from'](this['activeUIs']);for(const _0x547824 of this['activeUIs']){const _0x855279=this['uisData']['get'](_0x547824)['collection'];for(const _0x3e579a of _0x855279)_0x140516['set'](_0x3e579a,_0x547824);}for(const _0x2e59ba of _0x191871){const _0x1e7acc=_0x140516['get'](_0x2e59ba);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2e59ba);const _0x4e41a7=_0x382f11['find'](_0x2a6e50=>this['uisData']['get'](_0x2a6e50)['filter'](_0x2e59ba));_0x1e7acc!==_0x4e41a7&&(_0x1e7acc&&this['uisData']['get'](_0x1e7acc)['collection']['remove'](_0x2e59ba),_0x4e41a7&&this['uisData']['get'](_0x4e41a7)['collection']['add'](_0x2e59ba));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3455bf){const _0x27a102=[];for(const _0x2904dc of this['activeUIs']){(0x0,this['uisData']['get'](_0x2904dc)['filter'])(_0x3455bf)&&_0x27a102['push'](_0x2904dc);}if(_0x27a102['length']>0x1)throw new _0x47ee64('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x27a102,'annotationType':_0x3455bf['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
+
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x947527){super(_0x947527);const _0x46f7bf=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 _0x3ada3a(),this['focusCycler']=new _0x16ebe1({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x46f7bf['to']('class')],'style':{'minHeight':_0x46f7bf['to']('minHeight',_0x1ccde3=>'number'==typeof _0x1ccde3?_i(_0x1ccde3+0xa):null)},'dir':_0x947527['uiLanguageDirection'],'role':'application','aria-label':N(_0x947527,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x947527,'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',_0x338bce=>{this['_updateItemPositionInFocusables'](_0x338bce['source']);}),this['list']['forEach'](_0x44a859=>{this['focusTracker']['add'](_0x44a859['element']),this['_updateItemPositionInFocusables'](_0x44a859);}),this['list']['on']('change',(_0x5696d4,_0x191629)=>{for(const _0x28c1b6 of _0x191629['removed'])this['focusTracker']['remove'](_0x28c1b6['element']),this['focusables']['remove'](_0x28c1b6);for(const _0x105a6f of _0x191629['added'])this['focusTracker']['add'](_0x105a6f['element']),this['_updateItemPositionInFocusables'](_0x105a6f);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x1a5f88){const _0x4136e4=this['focusables']['getIndex'](_0x1a5f88);let _0x570283,_0x1cbc11;for(const _0xa305af of this['focusables'])if(_0x1a5f88['top']<_0xa305af['top']){_0x570283=_0xa305af;break;}if(_0x1cbc11=_0x570283?this['focusables']['getIndex'](_0x570283):this['focusables']['length'],-0x1!==_0x4136e4){if(_0x4136e4===_0x1cbc11-0x1)return;this['focusables']['remove'](_0x1a5f88),_0x1cbc11=_0x570283?this['focusables']['getIndex'](_0x570283):this['focusables']['length'];}this['focusables']['add'](_0x1a5f88,_0x1cbc11);}}const Ot=/* #__PURE__ -- @preserve */
|
|
33
|
+
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x3ea6c2){super(_0x3ea6c2),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x1f6017,_0x10b3c2)=>_0x1f6017+_0x10b3c2),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x1bdea8=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x1bdea8['to']('isAnimationDisabled',_0x4fe009=>_0x4fe009?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x1bdea8['to']('top',_0x79adeb=>Ot(_0x79adeb))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x419cce=this['element']['clientHeight'];_0x419cce&&(this['height']=_0x419cce);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x80d5c4{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3bd88b){super(_0x3bd88b),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 _0x587b56=this['context']['config']['get']('sidebar.container');_0x587b56&&this['setContainer'](_0x587b56);}['setContainer'](_0x8bed16){if(!g(_0x8bed16))throw new _0x47ee64('sidebar-setcontainer-invalid-element');this['container']=_0x8bed16;}['_attachToContainer']({viewClass:_0x40a06f='',spaceBetweenItems:_0x47c4b2=0x19}={}){if(!g(this['container']))throw new _0x47ee64('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x40a06f,this['_spaceBetweenItems']=_0x47c4b2;}['rearrange']({removedAnnotation:_0x227b74,previousAnnotation:_0x4b9e15,nextAnnotation:_0x3432af}){const _0x452b36=this['getSidebarItemView'](_0x227b74);this['view']['list']['remove'](_0x452b36),this['_destroySidebarItemView'](_0x227b74),_0x4b9e15&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x4b9e15)),_0x3432af&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3432af)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x705deb,activatedAnnotation:_0x1dd5db,disableAnimationOnActivatedAnnotation:_0x136c5e}){if(this['_activeAnnotation']=_0x1dd5db,_0x705deb){_0x705deb['isActive']=!0x1;const _0x3e20f7=this['getSidebarItemView'](_0x705deb);_0x3e20f7&&_0x136c5e&&(_0x3e20f7['isAnimationDisabled']=!0x1);}if(_0x1dd5db){const _0x1051d9=this['getSidebarItemView'](_0x1dd5db);_0x1051d9&&(_0x1dd5db['isActive']=!0x0,_0x136c5e&&(_0x1051d9['isAnimationDisabled']=!0x0,_0x1051d9['top']+=0x1),this['_alignToTargetRect'](_0x1051d9));}}['_detachFromContainer'](_0x1e4c1c){if(this['view']['element']['remove'](),_0x1e4c1c){for(const _0x146b32 of _0x1e4c1c)this['_destroySidebarItemView'](_0x146b32);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x37243d,_0x28ba3b){_0x28ba3b||(_0x28ba3b=_0x37243d['view']);const _0x2ff0ab=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x2ff0ab,_0x37243d),this['_annotationToSidebarItemView']['set'](_0x37243d,_0x2ff0ab),_0x2ff0ab['content']['add'](_0x28ba3b),this['listenTo'](_0x37243d['view'],'change:targetRect',(_0x4adcbc,_0xa0a918,_0x773f20)=>{const _0x596635=this['_getTargetTop'](_0x37243d,_0x773f20);_0x2ff0ab['_targetTop']!=_0x596635&&(_0x2ff0ab['_targetTop']=_0x596635,this['_setItemTop'](_0x2ff0ab,_0x596635));}),this['listenTo'](_0x2ff0ab,'change:top',()=>{this['_recalculate'](_0x2ff0ab,'top');}),this['listenTo'](_0x2ff0ab,'change:bottom',()=>{this['_recalculate'](_0x2ff0ab,'bottom');}),this['_alignToTargetRect'](_0x2ff0ab);const _0xaae2f6=this['_getItemBefore'](_0x2ff0ab);if(_0xaae2f6)this['_alignAfterItem'](_0xaae2f6,_0x2ff0ab)||this['_alignToTargetRect'](_0x2ff0ab);else this['_alignToTargetRect'](_0x2ff0ab);return this['_updateLastItem'](),this['view']['list']['add'](_0x2ff0ab),_0x2ff0ab;}['_alignForTopChange'](_0x559218){if(!_0x559218['content']['length'])return;const _0x229d89=this['_getItemBefore'](_0x559218);if(!_0x229d89)return;const _0x543525=this['_sidebarItemViewToAnnotation']['get'](_0x229d89),_0x27e215=this['_activeAnnotation'];_0x27e215&&_0x27e215===_0x543525?this['_alignAfterItem'](_0x229d89,_0x559218):this['_alignBeforeItem'](_0x559218,_0x229d89);}['_alignForBottomChange'](_0x533921){if(!_0x533921['content']['length'])return;const _0x4bb123=this['_getItemAfter'](_0x533921);if(!_0x4bb123)return;const _0x388e95=this['_sidebarItemViewToAnnotation']['get'](_0x4bb123),_0x2619bc=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x220c97=this['_activeAnnotation'];_0x220c97&&_0x220c97===_0x388e95&&_0x2619bc?(this['_alignBeforeItem'](_0x4bb123,_0x533921),this['_alignAfterItem'](_0x533921,_0x4bb123)):_0x220c97&&_0x220c97===_0x388e95?this['_alignBeforeItem'](_0x4bb123,_0x533921):this['_alignAfterItem'](_0x533921,_0x4bb123);}['_recalculate'](_0x322a3f,_0x33e20b){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0xe26b65,changedProp:_0x33d302}of this['_recalculateBuffer'])'top'===_0x33d302?this['_alignForTopChange'](_0xe26b65):this['_alignForBottomChange'](_0xe26b65);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x322a3f,'changedProp':_0x33e20b});}['getSidebarItemView'](_0x3c54cc){return this['_annotationToSidebarItemView']['get'](_0x3c54cc);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x566a81){const _0x568100=this['getSidebarItemView'](_0x566a81);this['stopListening'](_0x568100),this['stopListening'](_0x566a81['view']),_0x568100['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x566a81),this['_sidebarItemViewToAnnotation']['delete'](_0x568100);}['_createSidebarView'](){const _0x54ca3f=new H(this['context']['locale']);return _0x54ca3f['render'](),this['on']('change:_lastItem',(_0xd2495a,_0x3896e2,_0x36032b,_0x110a25)=>{_0x110a25&&_0x54ca3f['unbind']('minHeight'),_0x36032b?_0x54ca3f['bind']('minHeight')['to'](_0x36032b,'bottom'):_0x54ca3f['minHeight']=null;}),_0x54ca3f;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x5e5d1e){const _0x42cc35=this['_sidebarItemViewToAnnotation']['get'](_0x5e5d1e),_0x4e3a07=_0x42cc35&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x42cc35)-0x1);return _0x4e3a07&&this['getSidebarItemView'](_0x4e3a07)||null;}['_getItemAfter'](_0x10a614){const _0x4dac5f=this['_sidebarItemViewToAnnotation']['get'](_0x10a614),_0x55ee05=_0x4dac5f&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x4dac5f)+0x1);return _0x55ee05&&this['getSidebarItemView'](_0x55ee05)||null;}['_alignBeforeItem'](_0x5d816a,_0x129145){_0x5d816a['updateHeight']();const _0x5a6413=G(_0x129145['bottom']+this['_spaceBetweenItems'],_0x5d816a['top']);return!!_0x5a6413&&(this['_setItemTop'](_0x129145,_0x129145['top']-_0x5a6413),!0x0);}['_alignAfterItem'](_0x4d4cc7,_0x383a22){_0x4d4cc7['updateHeight']();const _0x2affcb=G(_0x4d4cc7['bottom']+this['_spaceBetweenItems'],_0x383a22['top']);return!!_0x2affcb&&(this['_setItemTop'](_0x383a22,_0x383a22['top']+_0x2affcb,!0x1),!0x0);}['_alignToTargetRect'](_0x14c26b){const _0x3c3be8=this['_sidebarItemViewToAnnotation']['get'](_0x14c26b);if(!_0x3c3be8||!_0x3c3be8['target']||!_0x3c3be8['targetRect'])return;const _0x9a26b2=this['_getTargetTop'](_0x3c3be8,_0x3c3be8['targetRect']);this['_setItemTop'](_0x14c26b,_0x9a26b2);}['_getTargetTop'](_0x463714,_0x2434b8){if(null===_0x2434b8)return 0x0;if(_0x463714['target']instanceof _0x329766)return _0x2434b8['top'];{const _0x5f3c05=new _0x329766(this['view']['element'])['top'];return _0x2434b8['top']-_0x5f3c05;}}['_setItemTop'](_0x41e386,_0x3affe5,_0x18cd61=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x18cd61&&(_0x3affe5=Math['max'](_0x3affe5,this['_getMaxAvailableTop'](_0x41e386))),_0x41e386['top']=_0x3affe5;}['_getMaxAvailableTop'](_0x421621){let _0x16a076=this['_getItemBefore'](_0x421621),_0x54bbfd=0x0;for(;_0x16a076;)_0x16a076['updateHeight'](),_0x54bbfd+=this['_spaceBetweenItems']+_0x16a076['height'],_0x16a076=this['_getItemBefore'](_0x16a076);return _0x54bbfd;}}function G(_0x3a7fbd,_0x48a465){return Math['max'](_0x3a7fbd-_0x48a465,0x0);}function g(_0x14bdb7){return null!==_0x14bdb7&&'object'==typeof _0x14bdb7&&0x1===_0x14bdb7['nodeType'];}class e extends _0x80d5c4{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xfdfd71){super(_0xfdfd71),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x4ca5b9(),this['_refreshPositioningDebounced']=_0x241c19(()=>{_0xfdfd71['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x540912=this['context']['plugins']['get'](j),_0x20dd69=this['context']['plugins']['get'](z);_0x540912['register']('wideSidebar',this),_0x20dd69['container']&&_0x540912['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x381c9){if(_0x381c9===this['activeAnnotation'])return;const _0x186b0d=this['context']['plugins']['get'](z);_0x186b0d['_activeAnnotation']=_0x381c9;const _0x17d274=this['activeAnnotation'];_0x186b0d['refresh']({'blurredAnnotation':_0x17d274,'activatedAnnotation':_0x381c9}),this['activeAnnotation']=_0x381c9;}['attach'](_0x30c20e){this['annotations']=_0x30c20e;const _0x259290=this['context']['plugins']['get'](z);if(_0x259290['_annotations']=_0x30c20e,this['isAttached'])throw new _0x47ee64('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x259290,'set:container',()=>{this['detach'](),this['listenTo'](_0x259290,'change:container',_0x5de345=>{_0x5de345['off'](),this['attach'](_0x30c20e);});}),_0x259290['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x5089e0=_0x39d0cf=>{_0x39d0cf['updateTargetRect'](),_0x259290['addAnnotation'](_0x39d0cf);};for(const _0x498ac2 of _0x30c20e)_0x5089e0(_0x498ac2);this['listenTo'](_0x30c20e,'add',(_0x1be914,_0x4f17f4)=>{_0x5089e0(_0x4f17f4);}),this['listenTo'](_0x30c20e,'remove',(_0x2bbe77,_0x108cf8,_0x450de2)=>{_0x259290['rearrange']({'removedAnnotation':_0x108cf8,'previousAnnotation':_0x30c20e['get'](_0x450de2-0x1),'nextAnnotation':_0x30c20e['get'](_0x450de2+0x1)}),_0x108cf8===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x30c20e,'focus',(_0x55b9fa,_0x20b9be)=>{this['setActiveAnnotation'](_0x20b9be);}),this['listenTo'](_0x30c20e,'blur',()=>{this['setActiveAnnotation'](null);});const _0x36b7b0=this['context']instanceof _0x3cbf37?this['context']['editors']:new _0x4ca5b9([this['context']]);for(const _0x4492bb of _0x36b7b0)this['_integrateWithEditorAnnotations'](_0x4492bb);this['listenTo'](_0x36b7b0,'add',(_0x305d98,_0x4078c8)=>{this['listenTo'](_0x4078c8,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x4078c8);});}),this['listenTo'](_0x36b7b0,'remove',(_0x6bc8bb,_0x3e4dcb)=>{_0x3e4dcb['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3e4dcb['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x47ee64('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x4e5422=this['context']['plugins']['get'](z);_0x4e5422['_detachFromContainer'](this['annotations']),this['stopListening'](_0x4e5422),this['stopListening'](this['annotations']),this['context']instanceof _0x3cbf37&&this['stopListening'](this['context']['editors']);for(const _0x56cf81 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x56cf81);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x37a069){if(!_0x37a069['plugins']['has']('EditorAnnotations'))return;const _0x173876=_0x37a069['plugins']['get']('EditorAnnotations'),_0x457836=()=>{const _0x44ab3a=_0x173876['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x44ab3a[0x0]||null);};this['listenTo'](_0x173876,'refresh',_0x457836),this['listenTo'](_0x173876,'blur',(_0x472f04,{isAnnotationTracked:_0x17448e})=>{this['activeAnnotation']&&_0x17448e(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x173876,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x26aac6=>{_0x173876['hasDomSelection']()&&(_0x457836(),_0x26aac6['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x173876);}['_destroyEditorAnnotationsIntegration'](_0x41d55a){this['stopListening'](_0x41d55a),this['_editorAnnotations']['remove'](_0x41d55a);}}class C extends _0x1a5bd1{['counterView'];constructor(_0x2c228c){super(_0x2c228c);const _0x5dca2f=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0xe6bf34,_0x1832f9)=>_0xe6bf34?'...':_0x1832f9['toString']()),this['set']('annotationType',''),this['icon']=_0x1e356c,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x5dca2f['to']('annotationType',_0x14bccf=>'ck-annotation-counter__badge--'+_0x14bccf),_0x5dca2f['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x5dca2f['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x80d5c4{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1c765d){super(_0x1c765d),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x48908c())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x4ca5b9(),this['_refreshPositioningDebounced']=_0x241c19(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x158ef7(this['context']['locale']),this['balloonPanelView']=new _0xeefad1(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x309c60){this['annotations']=_0x309c60;const _0x18fc84=this['context']['plugins']['get'](z),_0x482066=this['balloonPanelView'];if(_0x18fc84['_annotations']=_0x309c60,this['isAttached'])throw new _0x47ee64('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x18fc84,'set:container',()=>{this['detach'](),this['listenTo'](_0x18fc84,'change:container',_0x50ec48=>{_0x50ec48['off'](),this['attach'](_0x309c60);});}),_0x18fc84['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x2b2d12=_0xdca863=>{const _0x1751ff=new C(this['context']['locale']);_0x18fc84['addAnnotation'](_0xdca863,_0x1751ff),this['_annotationToNarrowView']['set'](_0xdca863,_0x1751ff),_0x1751ff['bind']('isDirty','annotationType','number')['to'](_0xdca863['view'],'isDirty','type','length'),_0x1751ff['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x482066['content']['first']!==_0xdca863['view']?(this['_showBalloon'](_0xdca863),_0xdca863['view']['element']['focus'](),this['setActiveAnnotation'](_0xdca863)):this['setActiveAnnotation'](null);});};for(const _0x26a01d of _0x309c60)_0x2b2d12(_0x26a01d);this['listenTo'](_0x309c60,'add',(_0x140563,_0x226ef6)=>{_0x2b2d12(_0x226ef6);}),this['listenTo'](_0x309c60,'remove',(_0x28567a,_0x2a7aef,_0x16b392)=>{this['_annotationToNarrowView']['get'](_0x2a7aef)['destroy'](),this['_annotationToNarrowView']['delete'](_0x2a7aef),_0x18fc84['rearrange']({'removedAnnotation':_0x2a7aef,'previousAnnotation':_0x309c60['get'](_0x16b392-0x1),'nextAnnotation':_0x309c60['get'](_0x16b392+0x1)}),_0x2a7aef===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x309c60,'focus',(_0x11b442,_0x5cf07c)=>{this['setActiveAnnotation'](_0x5cf07c);}),this['listenTo'](_0x309c60,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x14d727,_0x1e2ba1)=>{_0x1e2ba1['keyCode']===_0x19dddc['esc']&&_0x482066['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x482066['content']['first']),this['_hideBalloon'](),_0x1e2ba1['stopPropagation'](),_0x1e2ba1['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x142c94,_0x10014f)=>{const _0x131d8f=_0x10014f['target'];_0x482066['isVisible']&&_0x482066['element']['contains'](_0x131d8f)||_0x18fc84['view']['element']['contains'](_0x131d8f)||_0x142c94['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0xd69957=>_0xd69957['contains'](_0x131d8f))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x1e90cb=this['context']instanceof _0x3cbf37?this['context']['editors']:new _0x4ca5b9([this['context']]);for(const _0x427b7b of _0x1e90cb)this['_integrateWithEditorAnnotations'](_0x427b7b);this['listenTo'](_0x1e90cb,'add',(_0x2d1a1a,_0x28ebf5)=>{this['listenTo'](_0x28ebf5,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x28ebf5);});}),this['listenTo'](_0x1e90cb,'remove',(_0x3d7fe8,_0x40b3ea)=>{_0x40b3ea['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x40b3ea['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x733932){if(_0x733932===this['activeAnnotation'])return;const _0x249b3b=this['context']['plugins']['get'](z);if(_0x249b3b['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x733932,'disableAnimationOnActivatedAnnotation':!0x0}),_0x733932)_0x249b3b['getSidebarItemView'](_0x733932)?this['_showBalloon'](_0x733932):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x733932;}['detach'](){if(!this['isAttached'])throw new _0x47ee64('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x115f67=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0xd66d27=>_0xd66d27['destroy']()),this['_annotationToNarrowView']['clear'](),_0x115f67['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x3cbf37&&this['stopListening'](this['context']['editors']);for(const _0x52be78 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x52be78);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'](_0x519f39){if(!_0x519f39['plugins']['has']('EditorAnnotations'))return;const _0x376e17=_0x519f39['plugins']['get']('EditorAnnotations'),_0x1084d9=this['context']['plugins']['get'](z),_0x2de254=this['annotations'],_0x2f864d=this['balloonPanelView'],_0x1d8e41=()=>{const _0x254c42=_0x376e17['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x254c42),this['setActiveAnnotation'](_0x254c42[0x0]||null);};this['listenTo'](_0x376e17,'refresh',_0x1d8e41),this['listenTo'](_0x376e17,'blur',(_0x2058e1,{isAnnotationTracked:_0x2c6fe5})=>{this['activeAnnotation']&&_0x2c6fe5(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x376e17,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x2de254,'blur',_0x4097f1=>{_0x376e17['hasDomSelection']()&&_0x4097f1['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x3af462,_0xb8b709)=>{const _0x3862af=_0xb8b709['target'];_0x2f864d['isVisible']&&_0x2f864d['element']['contains'](_0x3862af)||_0x1084d9['view']['element']['contains'](_0x3862af)||this['activeAnnotation']&&_0x376e17['hasDomSelection']()&&(_0x1d8e41(),_0x3af462['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x376e17);}['_destroyEditorAnnotationsIntegration'](_0x4eba78){_0x4eba78&&(this['stopListening'](_0x4eba78),this['_editorAnnotations']['remove'](_0x4eba78));}['_setSelectedAnnotations'](_0x4f2665){for(const _0x342532 of this['_selectedAnnotations'])_0x4f2665['includes'](_0x342532)||this['_manuallyClosedAnnotationViews']['delete'](_0x342532['view']);this['_selectedAnnotations']=_0x4f2665;}['_refreshPositioning'](){const _0x418c30=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x418c30['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x207a40){if(this['_manuallyClosedAnnotationViews']['has'](_0x207a40['view']))return;const _0x3c77b8=this['balloonPanelView']['content']['first'];_0x3c77b8!==_0x207a40['view']?(_0x3c77b8&&this['_detachListeners'](_0x3c77b8),this['_attachListeners'](_0x207a40['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x207a40['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x4a2381=this['balloonPanelView']['content']['first'],_0x4853ca=_0x4a2381&&this['annotations']['getByView'](_0x4a2381);if(!_0x4853ca||!this['_annotationToNarrowView']['has'](_0x4853ca))return;const _0x94f052=this['_annotationToNarrowView']['get'](_0x4853ca)['element'],_0x213c29=(function(){const _0x49aaaf=_0xeefad1['defaultPositions'];return[_0x49aaaf['southArrowNorthEast'],_0x49aaaf['northArrowSouthEast'],_0x49aaaf['southArrowNorth'],_0x49aaaf['northArrowSouth'],_0x49aaaf['southArrowNorthWest'],_0x49aaaf['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x94f052,'positions':_0x213c29});}['_hideBalloon'](){const _0x431871=this['balloonPanelView'],_0x17a45a=_0x431871['content']['first'];_0x17a45a&&(this['_detachListeners'](_0x17a45a),_0x431871['unpin'](),_0x431871['content']['clear']());}['_attachListeners'](_0x3a733c){this['listenTo'](_0x3a733c,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x3a733c,'Esc',(_0x22df3f,_0x5d87ee)=>{this['_manuallyClosedAnnotationViews']['add'](_0x3a733c),this['_hideBalloon'](),_0x5d87ee();});}['_detachListeners'](_0x27d828){this['stopListening'](_0x27d828);}}class c extends _0x226390{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x2e29f3,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xe41d8b){super(_0xe41d8b),_0xe41d8b['editing']['view']['addObserver'](_0x28044f),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0xe41d8b['plugins']['get'](_0x2e29f3),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0xb0f365=this['editor']['plugins']['get'](j);_0xb0f365['context']===this['editor']&&(_0xb0f365['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x37451a,_0x263e62)=>{const _0x4e6cd6=this['_balloon'];if(this['isAttached']&&_0x4e6cd6['visibleView']){const _0x3de031=this['annotations']['getByView'](_0x4e6cd6['visibleView']);_0x3de031&&this['_closeAnnotation'](_0x3de031),_0x263e62();}}));}['afterInit'](){const _0x2f4600=this['editor']['plugins']['get'](j);_0x2f4600['context']===this['editor']&&(_0x2f4600['hasActive']()||_0x2f4600['switchTo']('inline'));}['setActiveAnnotation'](_0x27dcb3){_0x27dcb3!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x27dcb3&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x27dcb3)&&this['_addAnnotationToBalloon'](_0x27dcb3,!0x0),_0x27dcb3['isActive']=!0x0),_0x27dcb3||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x27dcb3);}['attach'](_0x56c8ee){this['annotations']=_0x56c8ee;const _0x5f0fc4=this['editor']['plugins']['get'](j),_0x57d267=this['_balloon'];if(this['isAttached'])throw new _0x47ee64('inlineannotations-attach-already-attached',this);if(_0x5f0fc4['context']!==this['editor'])throw new _0x47ee64('inlineannotations-not-allowed-with-context',this);const _0xa4fd27=this['editor']['plugins']['get'](b);this['listenTo'](_0xa4fd27,'refresh',()=>{const _0x3aa87a=_0xa4fd27['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x5143c8,_0x4f42c0;!this['_forceRefresh']&&(_0x5143c8=_0x3aa87a,_0x4f42c0=this['_selectedAnnotations'],_0x5143c8['length']===_0x4f42c0['length']&&_0x5143c8['every'](_0x548a37=>_0x4f42c0['includes'](_0x548a37)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x3aa87a),this['setActiveAnnotation'](_0x3aa87a[0x0]||null));}),this['listenTo'](_0xa4fd27,'blur',(_0x2feef9,{isAnnotationTracked:_0x3ac260})=>{this['activeAnnotation']&&_0x3ac260(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x202344,_0x1b67de,_0x32ce04)=>{_0x32ce04||this['setActiveAnnotation'](null);}),this['listenTo'](_0x56c8ee,'remove',(_0x546975,_0x4a7a02)=>{this['_removeAnnotationFromBalloon'](_0x4a7a02),_0x4a7a02===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x57d267,'change:visibleView',(_0x3755e,_0x5de3ab,_0x1d6ad5,_0x31d65f)=>{_0x31d65f&&this['stopListening'](_0x31d65f);const _0x2bedf9=_0x56c8ee['getByView'](_0x1d6ad5);_0x1d6ad5&&_0x2bedf9&&(this['listenTo'](_0x1d6ad5,'change:height',()=>{_0x57d267['updatePosition']();}),this['listenTo'](_0x1d6ad5,'Esc',()=>{this['_closeAnnotation'](_0x2bedf9),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x2bedf9&&this['setActiveAnnotation'](_0x2bedf9));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x57d267['visibleView']&&(_0x56c8ee['getByView'](_0x57d267['visibleView'])&&_0x57d267['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 _0x47ee64('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x1feab8 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x1feab8);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x339637){for(const _0x523785 of this['_selectedAnnotations'])_0x339637['includes'](_0x523785)||this['_manuallyClosed']['delete'](_0x523785);for(const _0x34705c of this['annotations'])_0x339637['includes'](_0x34705c)||this['_removeAnnotationFromBalloon'](_0x34705c);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x3f0d6e of _0x339637)this['_addAnnotationToBalloon'](_0x3f0d6e);}this['_selectedAnnotations']=_0x339637;}['_addAnnotationToBalloon'](_0x508f99,_0x1fc3ea=!0x1){this['_manuallyClosed']['has'](_0x508f99)||(this['_addedAnnotations']['has'](_0x508f99)||this['_balloon']['hasView'](_0x508f99['view'])||(this['_addedAnnotations']['add'](_0x508f99),this['_balloon']['add']({'stackId':_0x508f99['view']['id'],'view':_0x508f99['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x508f99)}})),_0x1fc3ea&&this['_balloon']['showStack'](_0x508f99['view']['id']));}['_getBalloonTargetForAnnotation'](_0x4ec9e2){const _0x13e634=_0x4ec9e2['target'],_0x5bec1b=this['editor']['editing']['view'],_0x3e504b=_0x5bec1b['document']['selection']['getFirstRange'](),_0x37e282=_0x5bec1b['domConverter']['viewRangeToDom'](_0x3e504b);if(_0x37e282['collapse'](!0x0),_0x13e634){if(_0x13e634 instanceof _0x329766)return _0x13e634;let _0x4db6f1=[];for(const _0x32e75d of _0x13e634)_0x4db6f1['push'](...F(_0x32e75d['getClientRects']()));_0x4db6f1=function(_0x4fefe9){const _0x4aa2a7=[];let _0x1ce460=_0x4fefe9[0x0];for(let _0x4aec28=0x1;_0x4aec28<_0x4fefe9['length'];_0x4aec28++)P(_0x1ce460,_0x4fefe9[_0x4aec28])?_0x1ce460['width']+=_0x4fefe9[_0x4aec28]['width']:(_0x4aa2a7['push'](_0x1ce460),_0x1ce460=_0x4fefe9[_0x4aec28]);return _0x4aa2a7['push'](_0x1ce460),_0x4aa2a7;}(_0x4db6f1);const _0x265a04=_0x37e282['getBoundingClientRect']();return _0x4db6f1['find'](_0x599b3e=>_0x599b3e['top']<=_0x265a04['top']&&_0x599b3e['bottom']>=_0x265a04['bottom']&&_0x599b3e['left']<=_0x265a04['left']&&_0x599b3e['right']>=_0x265a04['right'])||_0x4db6f1[0x0];}return _0x4ec9e2['targetRect']||_0x37e282;}['_removeAnnotationFromBalloon'](_0x554ede){this['_addedAnnotations']['has'](_0x554ede)&&this['_balloon']['hasView'](_0x554ede['view'])&&(this['_addedAnnotations']['delete'](_0x554ede),this['_balloon']['remove'](_0x554ede['view']));}['_closeAnnotation'](_0x25811c){this['_manuallyClosed']['add'](_0x25811c),this['_removeAnnotationFromBalloon'](_0x25811c);}}function F(_0x3f3e8b){return Array['from'](_0x3f3e8b)['map'](DOMRect['fromRect']);}function P(_0x451ef3,_0x25aa5d){return _0x451ef3['top']===_0x25aa5d['top']&&_0x451ef3['bottom']===_0x25aa5d['bottom']&&_0x451ef3['right']===_0x25aa5d['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x23a46d,_0x3f45df){super(_0x23a46d),this['set']('isEmpty',!_0x3f45df['length']),this['focusTracker']=new _0x3ada3a(),this['_annotationViews']=_0x3f45df,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x16ebe1({'focusables':_0x3f45df,'focusTracker':this['focusTracker']}),this['listenTo'](_0x3f45df,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x3f45df,'remove',(_0x2c7e5b,_0x15d743)=>{_0x15d743['isActive']&&this['focus'](),_0x3f45df['length']||(this['isEmpty']=!0x0);});const _0x702673=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x23a46d,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x3f45df},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x702673['if']('isEmpty','ck-hidden',_0x1e4d4f=>!_0x1e4d4f)]},'children':[{'text':N(_0x23a46d,'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 _0x375fa4 of this['_annotationViews'])this['focusTracker']['add'](_0x375fa4['element']);this['_annotationViews']['on']('change',(_0x5c0510,{added:_0x13825b,removed:_0x5b8d43})=>{for(const _0xc2dec4 of _0x13825b)this['focusTracker']['add'](_0xc2dec4['element']);for(const _0x3e7727 of _0x5b8d43)this['focusTracker']['remove'](_0x3e7727['element']);});}}class p extends _0x80d5c4{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x1086e5){super(_0x1086e5),this['archivedThreads']=new _0x4ca5b9();}['init'](){const _0x4047df=this['context'],_0x5f2866=_0x4047df['plugins']['get'](o),_0x12d0be=_0x4047df['plugins']['get'](y);this['listenTo'](_0x5f2866,'addCommentThread',(_0x4784a5,{threadId:_0x359ffc})=>{const _0x4478d1=_0x5f2866['getCommentThread'](_0x359ffc);_0x4478d1['archivedAt']&&this['archivedThreads']['add'](_0x4478d1,this['_calculatePosition'](_0x4478d1['archivedAt'])),this['listenTo'](_0x4478d1,'change:archivedAt',(_0x1c669a,_0x41256c,_0x32fc30)=>{_0x32fc30?this['archivedThreads']['has'](_0x4478d1)||this['archivedThreads']['add'](_0x4478d1,this['_calculatePosition'](_0x4478d1['archivedAt'])):this['archivedThreads']['has'](_0x4478d1)&&this['archivedThreads']['remove'](_0x4478d1);});}),this['listenTo'](_0x5f2866,'removeCommentThread',(_0x5a31e4,{threadId:_0x1d8a44})=>{const _0x2eb56f=_0x5f2866['getCommentThread'](_0x1d8a44);this['stopListening'](_0x2eb56f),this['archivedThreads']['has'](_0x2eb56f)&&this['archivedThreads']['remove'](_0x2eb56f);},{'priority':'highest'}),this['listenTo'](_0x12d0be['collection'],'focus',(_0x18ec93,_0x2bfe12)=>{_0x2bfe12['isVisible']||(_0x2bfe12['isActive']=!0x0,_0x12d0be['activate'](_0x2bfe12));});}['_calculatePosition'](_0x2780b7){const _0x5559e9=[...this['archivedThreads']]['findIndex'](_0x48cd3e=>_0x48cd3e['archivedAt']<_0x2780b7);return _0x5559e9>-0x1?_0x5559e9:this['archivedThreads']['length'];}}class a extends _0x226390{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x21aea1];}constructor(_0x37ce81){super(_0x37ce81),this['annotationViews']=new _0xb4f04b(),this['_pendingThreads']=[];}['init'](){const _0x33133d=this['editor'],_0x5bd0d=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x33133d['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x1a5bd1,!0x0)),_0x33133d['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x41666c=this['_createCommentsArchiveButton'](_0x189f4e);return _0x41666c['set']({'role':'menuitemcheckbox'}),_0x41666c;});const _0x60578f=_0x33133d['plugins']['get'](p),_0x2f4bf1=_0x33133d['plugins']['get']('Annotations'),_0x343463=_0x33133d['plugins']['get']('CommentsRepository');_0x60578f['archivedThreads']['forEach'](_0x479625=>{this['_handleNewThread'](_0x479625);}),this['listenTo'](_0x60578f['archivedThreads'],'add',(_0x143173,_0x1d9c13)=>{this['_handleNewThread'](_0x1d9c13);}),this['listenTo'](_0x2f4bf1['collection'],'add',(_0x407cb4,_0x354fbb)=>{const _0x586ea7=this['_pendingThreads']['find'](_0x275008=>{const _0x264029=_0x343463['_threadToController']['get'](_0x275008);return _0x264029&&_0x354fbb['innerView']===_0x264029['view'];});if(_0x586ea7){const _0x15e0c7=this['_calculatePosition'](_0x586ea7['archivedAt']);this['annotationViews']['add'](_0x354fbb['view'],_0x15e0c7),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x586ea7),0x1);}}),this['listenTo'](_0x60578f['archivedThreads'],'remove',(_0x253f90,_0x3dd931)=>{const _0x555b00=_0x33133d['config']['get']('collaboration.channelId');if(!_0x555b00||_0x3dd931['channelId']===_0x555b00){if(this['_pendingThreads']['includes'](_0x3dd931))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x3dd931),0x1);else{const _0x46f0f9=_0x343463['_threadToController']['get'](_0x3dd931),_0x45af7c=_0x2f4bf1['getByInnerView'](_0x46f0f9['view']);this['annotationViews']['remove'](_0x45af7c['view']),this['stopListening'](_0x45af7c['focusableElements']);}}}),this['listenTo'](_0x2f4bf1['collection'],'add',(_0x11e81b,_0x903742)=>{this['listenTo'](_0x903742,'escape',_0x5bd0d);}),this['listenTo'](_0x2f4bf1['collection'],'remove',(_0x8a6303,_0x5eca4a)=>{this['stopListening'](_0x5eca4a,'escape',_0x5bd0d);});}['_handleNewThread'](_0x2761d4){const _0x3af496=this['editor']['plugins']['get']('CommentsRepository'),_0x4e1e58=this['editor']['plugins']['get']('Annotations'),_0x5b33e1=this['editor']['config']['get']('collaboration.channelId');if(!_0x5b33e1||_0x2761d4['channelId']===_0x5b33e1){const _0x49d403=_0x3af496['_threadToController']['get'](_0x2761d4);if(!_0x49d403)return void this['_pendingThreads']['push'](_0x2761d4);const _0x22b55c=this['_calculatePosition'](_0x2761d4['archivedAt']),_0x4a616c=_0x4e1e58['getByInnerView'](_0x49d403['view']);_0x4a616c['isVisible']&&_0x4e1e58['_visibleAnnotations']['remove'](_0x4a616c),this['annotationViews']['add'](_0x4a616c['view'],_0x22b55c);}}['_calculatePosition'](_0x260d57){const _0x345fff=this['editor']['config']['get']('collaboration.channelId'),_0x3f9b34=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x3f1c49=>_0x3f1c49['channelId']===_0x345fff)['findIndex'](_0x825a6d=>_0x825a6d['archivedAt']<_0x260d57);return _0x3f9b34<0x0||_0x3f9b34>this['annotationViews']['length']?this['annotationViews']['length']:_0x3f9b34-0x1;}['_toggleDialog'](){const _0x118732=this['editor'],_0x15e8a8=_0x118732['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x118732['locale'],this['annotationViews'])),'commentsArchive'===_0x15e8a8['id']?_0x15e8a8['hide']():_0x15e8a8['show']({'id':'commentsArchive','title':N(_0x118732['locale'],'COMMENTS_ARCHIVE'),'icon':_0x1d60e9,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x16088a['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x252052,_0x96ac01=!0x1){const _0x46cd2f=this['editor']['locale'],_0x403544=this['editor']['plugins']['get']('Dialog'),_0xf0a435=new _0x252052(_0x46cd2f);return _0xf0a435['bind']('isEnabled')['to'](this,'isEnabled'),_0xf0a435['bind']('isOn')['to'](_0x403544,'id',_0xee6e47=>'commentsArchive'===_0xee6e47),_0xf0a435['set']({'label':N(_0x46cd2f,'COMMENTS_ARCHIVE'),'icon':_0x1d60e9,'isToggleable':!0x0}),_0x96ac01&&(_0xf0a435['tooltip']=!0x0),this['listenTo'](_0xf0a435,'execute',()=>this['_toggleDialog']()),_0xf0a435;}['_hideDialogOnAnnotationEscape']=_0x558090=>{const _0x38e0a0=_0x558090['source'];if(!this['annotationViews']['has'](_0x38e0a0['view']))return;const _0x1b7565=this['editor']['plugins']['get']('Dialog');_0x1b7565['isOpen']&&'commentsArchive'===_0x1b7565['id']&&(_0x1b7565['hide'](),_0x558090['stop']());};}class gi extends _0x226390{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|