@ckeditor/ckeditor5-comments 49.0.0-alpha.7 → 49.0.0-alpha.8

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.
Files changed (75) hide show
  1. package/dist/index.js +11 -11
  2. package/dist/translations/af.umd.js +1 -1
  3. package/dist/translations/ar.umd.js +1 -1
  4. package/dist/translations/ast.umd.js +1 -1
  5. package/dist/translations/az.umd.js +1 -1
  6. package/dist/translations/be.umd.js +1 -1
  7. package/dist/translations/bg.umd.js +1 -1
  8. package/dist/translations/bn.umd.js +1 -1
  9. package/dist/translations/bs.umd.js +1 -1
  10. package/dist/translations/ca.umd.js +1 -1
  11. package/dist/translations/cs.umd.js +1 -1
  12. package/dist/translations/da.umd.js +1 -1
  13. package/dist/translations/de-ch.umd.js +1 -1
  14. package/dist/translations/de.umd.js +1 -1
  15. package/dist/translations/el.umd.js +1 -1
  16. package/dist/translations/en-au.umd.js +1 -1
  17. package/dist/translations/en-gb.umd.js +1 -1
  18. package/dist/translations/en.umd.js +1 -1
  19. package/dist/translations/eo.umd.js +1 -1
  20. package/dist/translations/es-co.umd.js +1 -1
  21. package/dist/translations/es.umd.js +1 -1
  22. package/dist/translations/et.umd.js +1 -1
  23. package/dist/translations/eu.umd.js +1 -1
  24. package/dist/translations/fa.umd.js +1 -1
  25. package/dist/translations/fi.umd.js +1 -1
  26. package/dist/translations/fr.umd.js +1 -1
  27. package/dist/translations/gl.umd.js +1 -1
  28. package/dist/translations/gu.umd.js +1 -1
  29. package/dist/translations/he.umd.js +1 -1
  30. package/dist/translations/hi.umd.js +1 -1
  31. package/dist/translations/hr.umd.js +1 -1
  32. package/dist/translations/hu.umd.js +1 -1
  33. package/dist/translations/hy.umd.js +1 -1
  34. package/dist/translations/id.umd.js +1 -1
  35. package/dist/translations/it.umd.js +1 -1
  36. package/dist/translations/ja.umd.js +1 -1
  37. package/dist/translations/jv.umd.js +1 -1
  38. package/dist/translations/kk.umd.js +1 -1
  39. package/dist/translations/km.umd.js +1 -1
  40. package/dist/translations/kn.umd.js +1 -1
  41. package/dist/translations/ko.umd.js +1 -1
  42. package/dist/translations/ku.umd.js +1 -1
  43. package/dist/translations/lt.umd.js +1 -1
  44. package/dist/translations/lv.umd.js +1 -1
  45. package/dist/translations/ms.umd.js +1 -1
  46. package/dist/translations/nb.umd.js +1 -1
  47. package/dist/translations/ne.umd.js +1 -1
  48. package/dist/translations/nl.umd.js +1 -1
  49. package/dist/translations/no.umd.js +1 -1
  50. package/dist/translations/oc.umd.js +1 -1
  51. package/dist/translations/pl.umd.js +1 -1
  52. package/dist/translations/pt-br.umd.js +1 -1
  53. package/dist/translations/pt.umd.js +1 -1
  54. package/dist/translations/ro.umd.js +1 -1
  55. package/dist/translations/ru.umd.js +1 -1
  56. package/dist/translations/si.umd.js +1 -1
  57. package/dist/translations/sk.umd.js +1 -1
  58. package/dist/translations/sl.umd.js +1 -1
  59. package/dist/translations/sq.umd.js +1 -1
  60. package/dist/translations/sr-latn.umd.js +1 -1
  61. package/dist/translations/sr.umd.js +1 -1
  62. package/dist/translations/sv.umd.js +1 -1
  63. package/dist/translations/th.umd.js +1 -1
  64. package/dist/translations/ti.umd.js +1 -1
  65. package/dist/translations/tk.umd.js +1 -1
  66. package/dist/translations/tr.umd.js +1 -1
  67. package/dist/translations/tt.umd.js +1 -1
  68. package/dist/translations/ug.umd.js +1 -1
  69. package/dist/translations/uk.umd.js +1 -1
  70. package/dist/translations/ur.umd.js +1 -1
  71. package/dist/translations/uz.umd.js +1 -1
  72. package/dist/translations/vi.umd.js +1 -1
  73. package/dist/translations/zh-cn.umd.js +1 -1
  74. package/dist/translations/zh.umd.js +1 -1
  75. package/package.json +16 -16
package/dist/index.js CHANGED
@@ -20,14 +20,14 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Command as _0x656305,Context as _0x34fe97,ContextPlugin as _0x11bb03,Editor as _0x164495,PendingActions as _0xd2cfcb,Plugin as _0x3e22c6}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x11a517,Collection as _0x5d3b53,DomEmitterMixin as _0x46fc5b,FocusTracker as _0x1d34e2,KeystrokeHandler as _0x2b8ee7,ObservableMixin as _0x5adef3,Rect as _0xa06a55,containsNode as _0x4639b8,diff as _0x1eb1dc,first as _0x583041,getEnvKeystrokeText as _0xbc567,getOverlayMountRoot as _0x228363,keyCodes as _0x1eccb2,priorities as _0x231137,scrollViewportToShowTarget as _0x480205,toUnit as _0x3f1e89,trustedHtml as _0x4f9e71,uid as _0x3edcb5}from'@ckeditor/ckeditor5-utils';import{AriaDescriptionView as _0xa63f3a,ConfirmMixin as _0x37b5e9,FOCUS_ANNOTATION_KEYSTROKE as _0x57ecbb,LateFocusButtonView as _0x352688,LateFocusDropdownButtonView as _0x22ee5c,UserView as _0x20132e,Users as _0x18879d,getAllMarkersDomElementsSorted as _0x4f6c32,getDateTimeFormatter as _0x54ce00,hashObject as _0x5d87b6,setupThreadKeyboardNavigation as _0x2327bc,surroundingMarkersDetector as _0x326a71,trimHtml as _0x9def27}from'@ckeditor/ckeditor5-collaboration-core';import{cloneDeep as _0x35446b,debounce as _0x48da56,isEqual as _0x1fd42a,set as _0x5c8642,throttle as _0x494a40,unset as _0x2c0b06}from'es-toolkit/compat';import{IconAddComment as _0x504c09,IconCheck as _0xf9f218,IconComments as _0x3fb11b,IconCommentsArchive as _0x22cd11,IconDropdownArrow as _0x2f6b3f,IconPencil as _0x4db5af,IconRemoveComment as _0x1abaef,IconThreeVerticalDots as _0x5c02c4,IconTrackChanges as _0x25ae74,IconUndo as _0x228c7f}from'@ckeditor/ckeditor5-icons';import{BalloonPanelView as tt,ButtonView as et,ContextualBalloon as it,Dialog as st,DialogViewPosition as nt,EditorUI as ot,EditorUIView as rt,FocusCycler as ht,InlineEditableUIView as at,ListItemView as ct,ListView as dt,MenuBarMenuListItemButtonView as lt,OverlayHost as mt,View as ut,ViewCollection as ft,clickOutsideHandler as pt,createDropdown as wt,focusChildOnDropdownOpen as gt}from'@ckeditor/ckeditor5-ui';import{MouseObserver as _t,disableViewPlaceholder as At,enableViewPlaceholder as vt}from'@ckeditor/ckeditor5-engine';import{Clipboard as yt,ClipboardMarkersUtils as Ct,ClipboardPipeline as Tt}from'@ckeditor/ckeditor5-clipboard';import{Enter as It,ShiftEnter as bt}from'@ckeditor/ckeditor5-enter';import{SelectAll as Et}from'@ckeditor/ckeditor5-select-all';import{Typing as kt}from'@ckeditor/ckeditor5-typing';import{Undo as Nt}from'@ckeditor/ckeditor5-undo';import{Paragraph as Ot}from'@ckeditor/ckeditor5-paragraph';import{toWidget as Mt}from'@ckeditor/ckeditor5-widget';const Rt=/* #__PURE__ -- @preserve */
24
- _0x5adef3();var xt=class extends Rt{['model'];['view'];constructor(_0x5edad7,_0x529acd){super(),this['model']=_0x5edad7,this['model']['_isAttached']=!0x0,this['view']=_0x529acd,this['listenTo'](_0x529acd,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x529acd,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x529acd,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x529acd,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x529acd,'addComment',(_0xa7128e,_0x1aef57)=>this['addComment'](_0x1aef57)),this['listenTo'](_0x529acd,'updateComment',(_0x2ffba4,_0x1689bd,_0x5a1c9f)=>this['updateComment'](_0x1689bd,_0x5a1c9f)),this['listenTo'](_0x529acd,'removeComment',(_0x138c74,_0x34e1ef)=>this['removeComment'](_0x34e1ef));}submit(){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}addComment(_0x5c3738){this['model']['addComment']({'content':_0x5c3738,'authorId':this['view']['_localUser']['id']});}updateComment(_0x1c98e0,_0x1f4127){this['model']['getComment'](_0x1c98e0)['update']({'content':_0x1f4127});}removeComment(_0x3c59d0){this['model']['getComment'](_0x3c59d0)['remove']();}destroy(){this['stopListening'](),this['model']['_isAttached']=!0x1;}};function St(_0x215f1c,_0x5f2f01,_0x36b17a){const t=_0x215f1c['t'];switch(_0x5f2f01){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'},_0x36b17a);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%0\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x36b17a);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'},_0x36b17a);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'},_0x36b17a);case'NUMBER_OF_COMMENTS':return t({'string':'Show\x20%0\x20comment','plural':'Show\x20%0\x20comments','id':'NUMBER_OF_COMMENTS'},_0x36b17a);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'},_0x36b17a);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'},_0x36b17a);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'},_0x36b17a);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'';}}var Pt=class extends rt{['main'];editable;constructor(_0x27db39,_0x181e36){super(_0x27db39);const _0x43b665=_0x3edcb5();this['main']=this['createCollection'](),this['editable']=new at(_0x27db39,_0x181e36,void 0x0,{'label':()=>St(_0x27db39,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x27db39['uiLanguageDirection'],'lang':_0x27db39['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x43b665},'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']();}},Lt=class extends ot{['view'];constructor(_0x4b9443){super(_0x4b9443),this['view']=new Pt(_0x4b9443['locale'],_0x4b9443['editing']['view']);}get element(){return this['view']['element'];}init(){const _0x3124ca=this['editor']['editing']['view'],_0x1e8116=this['view']['editable'];_0x1e8116['name']=_0x3124ca['document']['getRoot']()['rootName'],this['view']['render']();const _0x3bfa4f=_0x1e8116['element'];this['setEditableElement'](_0x1e8116['name'],_0x3bfa4f),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x3124ca['attachDomRoot'](_0x3bfa4f),this['fire']('ready');}destroy(){super['destroy'](),this['view']['destroy']();}};const Dt=[yt,It,bt,Et,kt,Nt,Ot],Vt=/* #__PURE__ -- @preserve */
25
- _0x5adef3(_0x164495);var Bt=class CommentEditor extends Vt{static defaultPlugins=/* #__PURE__ -- @preserve */
26
- ((()=>Dt)());constructor(_0x378452={}){(_0x378452=Object['assign']({},_0x378452))['plugins']||(_0x378452['plugins']=CommentEditor['defaultPlugins']),super(_0x378452),this['ui']=new Lt(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this['editing']['view']['_overlayModeHint']='auto',this['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}create(){const _0x3fdbed=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x3fdbed))['then'](()=>this['fire']('ready'));}destroy(){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x3045d4=>{const _0x4386be=this['model']['document']['getRoot'](),_0x23145f=_0x4386be&&_0x4386be['getChild'](_0x4386be['childCount']-0x1);_0x3045d4['setSelection'](_0x23145f,'end'),this['editing']['view']['focus']();});}_updatePlaceholder(){const _0x49509=this['editing']['view'],_0x5c03a1=_0x49509['document']['getRoot'](),_0x553763=_0x5c03a1['getChild'](0x0);_0x5c03a1['childCount']>0x1||!_0x553763||'p'!=_0x553763['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(At(_0x49509,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x553763['placeholder']=this['placeholder']),vt({'view':_0x49509,'element':_0x553763,'keepOnFocus':!0x0}),this['placeholderElement']=_0x553763);}},Ht=class extends ut{keystrokes;['focusTracker'];['focusables'];['focusCycler'];submitButtonView;cancelButtonView;_editorConfig;constructor(_0x255049,_0x312627={}){super(_0x255049),this['editor']=null,this['_editorConfig']=_0x312627,this['set']('value',_0x312627['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',St(_0x255049,'Reply...')),this['set']('submitLabel',St(_0x255049,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['cancelButtonView'],this['submitButtonView']]),this['keystrokes']=new _0x2b8ee7(),this['focusTracker']=new _0x1d34e2(),this['focusCycler']=new ht({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x10ae22=>!_0x10ae22['defaultPrevented']},'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['cancelButtonView'],this['submitButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x5a77f5,_0x40c4f2)=>{this['cancelButtonView']['fire']('execute'),_0x40c4f2();}),this['keystrokes']['set']('Ctrl+Enter',(_0x9f9480,_0x3d2dcf)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x3d2dcf());}),this['on']('submit',(_0x168f66,_0x3fafa5)=>{_0x3fafa5['length']>0xfde8?(alert(St(_0x255049,'TOO_LONG_COMMENT_ALERT',[_0x3fafa5['length'],0xfde8])),_0x168f66['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}createEditor(){return this['editor']||(this['editor']=new Bt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x263ae0=this['editor'];this['element']['insertBefore'](_0x263ae0['ui']['element'],this['element']['firstChild']),_0x263ae0['model']['document']['on']('change',()=>this['value']=_0x263ae0['getData']()),_0x263ae0['bind']('placeholder')['to'](this),this['focusables']['add'](_0x263ae0['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x50b84a){-0x1===_0x50b84a?(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:_0x506d30}=this,_0x58a6b6=new et(_0x506d30);return _0x58a6b6['extendTemplate']({'attributes':{'class':['ck-button-action','ck-comment__input-actions--submit']}}),_0x58a6b6['withText']=!0x0,_0x58a6b6['bind']('label')['to'](this,'submitLabel'),_0x58a6b6['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x58a6b6['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x242b8b,_0x31ba4d)=>!_0x31ba4d&&!!_0x242b8b['trim']()),_0x58a6b6;}_createCancelButton(){const {locale:_0x488010}=this,_0x17af5a=new et(_0x488010);return _0x17af5a['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x17af5a['label']=St(_0x488010,'Cancel'),_0x17af5a['withText']=!0x0,_0x17af5a['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x17af5a;}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x41c710=>{this['focusTracker']['add'](_0x41c710['element']);}),this['focusables']['on']('change',(_0x1a0be2,_0xa16495)=>{for(const _0x5557f5 of Array['from'](_0xa16495['added'])['reverse']())this['focusTracker']['add'](_0x5557f5['element']);});}},Ut=class extends ut{constructor(_0x5bb2bb,_0x53b1b8,_0xd2c2be){super(_0x5bb2bb),this['commentInputView']=new Ht(_0x5bb2bb,_0xd2c2be),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x278155,_0x224242)=>_0x278155||!!_0x224242),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 _0x20132e(_0x5bb2bb,_0x53b1b8),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'](_0xfad1d9){this['commentInputView']['focus'](_0xfad1d9);}_focusOnNonInteractiveMouseDown(){this['listenTo'](this['element'],'mousedown',(_0x4ea600,_0x2f90db)=>{const {submitButtonView:_0x22cdb7,cancelButtonView:_0x475904,editor:_0x33e000}=this['commentInputView'];[_0x22cdb7['element'],_0x475904['element'],_0x33e000?_0x33e000['editing']['view']['getDomRoot']():null]['filter'](_0x4a5171=>_0x4a5171)['some'](_0x4fa222=>_0x4639b8(_0x4fa222,_0x2f90db['target']))||(this['focus'](),_0x2f90db['preventDefault']());});}},Ft=class extends ut{revealButtonView;constructor(_0x39b149){super(_0x39b149),this['set']('count',void 0x0);const _0x25601d=this['revealButtonView']=new et(_0x39b149);_0x25601d['icon']=_0x2f6b3f,_0x25601d['withText']=!0x0,_0x25601d['bind']('label')['to'](this,'count',_0x107710=>St(_0x39b149,'NUMBER_OF_COMMENTS',_0x107710)),_0x25601d['extendTemplate']({'attributes':{'class':'ck-button_small'}}),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[_0x25601d]});}},Wt=class extends ut{commentViews;resolvedCommentView;['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];_collapsedCommentsView;constructor(_0x5f539f,_0x167e6f,_0x3337a2){super(_0x5f539f);const _0x55d3c8=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x167e6f['comments']['length']),this['set']('isActive',!0x1),this['set']('isExpandedByUser',!0x1),this['_model']=_0x167e6f,this['_config']=_0x3337a2,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x1d34e2(),this['keystrokes']=new _0x2b8ee7(),this['focusCycler']=new ht({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x477322=>this['commentViews']['map'](_0x198548=>_0x198548['element'])['includes'](_0x477322['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Ft(_0x5f539f),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x422cf2=>_0x422cf2-this['_config']['maxCommentsWhenCollapsed']),this['listenTo'](this['_collapsedCommentsView']['revealButtonView'],'execute',()=>{this['isExpandedByUser']=!0x0;});for(const _0x2cb2f2 of _0x167e6f['comments'])this['_handleNewCommentModel'](_0x2cb2f2);this['_handleInfoComment'](),this['listenTo'](_0x167e6f['comments'],'add',(_0x1313e3,_0x2a2b9f)=>{const _0x15e5dc=this['_calculatePosition'](_0x2a2b9f);this['length']++,this['_handleNewCommentModel'](_0x2a2b9f,_0x15e5dc),this['refreshVisibleViews']();}),this['listenTo'](_0x167e6f['comments'],'remove',(_0x375d09,_0x576e8f)=>{this['length']--,this['_handleRemoveCommentModel'](_0x576e8f),this['refreshVisibleViews']();}),this['listenTo'](_0x167e6f,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x167e6f,'change:isResolved',()=>this['_handleInfoComment']()),this['on']('change:isActive',(_0x31ad0e,_0x3bde2c,_0x3084cd)=>{_0x3084cd||(this['isExpandedByUser']=!0x1),this['refreshVisibleViews']();}),this['on']('change:hasDirtyComment',()=>this['refreshVisibleViews']()),this['on']('change:isExpandedByUser',()=>this['refreshVisibleViews']()),this['setTemplate']({'tag':'ul','attributes':{'class':['ck-thread__comments',_0x55d3c8['if']('length','ck-hidden',_0x5a3cd0=>!_0x5a3cd0)],'aria-label':St(_0x5f539f,'Thread\x20comments')},'children':this['visibleViews']});}get['_shouldCollapse'](){return this['_model']['weight']>this['_config']['maxThreadTotalWeight']&&!this['isActive']&&!this['hasDirtyComment']&&!this['isExpandedByUser'];}['render'](){super['render'](),this['refreshVisibleViews'](),this['_setupKeyboardNavigation']();}['focus'](_0x103121){-0x1===_0x103121?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}destroy(){this['_collapsedCommentsView']['destroy']();for(const _0x5cd860 of this['commentViews'])_0x5cd860['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}_handleNewCommentModel(_0x56a5d2,_0x13b71f){const _0x4e5382=new this['_config']['CommentView'](this['locale'],_0x56a5d2,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x4e5382['viewUid']=_0x56a5d2['id'],_0x4e5382['delegate']('removeComment')['to'](this),_0x4e5382['delegate']('updateComment')['to'](this),_0x4e5382['delegate']('resolveCommentThread')['to'](this),_0x4e5382['delegate']('editorReady')['to'](this),_0x4e5382['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x4e5382,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x4e5382,_0x13b71f);}_calculatePosition(_0x419952){const _0x5197f4=this['_model']['_findOptimalIndex'](_0x419952);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x419952['authoredAt']?_0x5197f4-0x1:_0x5197f4:_0x5197f4-0x1;}_handleInfoComment(){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x178fbd={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':St(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x178fbd,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x178fbd));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}_handleRemoveCommentModel(_0x1ddbcc){const _0x5c0fb4=this['commentViews']['remove'](_0x1ddbcc['id']);this['stopListening'](_0x5c0fb4),_0x5c0fb4['isEditMode']&&this['_updateHasDirtyComment'](),_0x5c0fb4['destroy']();}_updateHasDirtyComment(){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x4c0b69=>_0x4c0b69['isEditMode']);}['_rearrangeCollapse'](){const _0x5bf4bc=function(_0x55962f){const _0x325c70=new _0x5d3b53();for(const _0x20cbc5 of _0x55962f)_0x325c70['add'](_0x20cbc5);return _0x325c70;}(this['commentViews']),_0x5c2150=this['_collapsedCommentsView']['count'];for(let _0x35d997=0x1;_0x35d997<=_0x5c2150;_0x35d997++)_0x5bf4bc['remove'](0x1);for(const _0x4801e2 of _0x5bf4bc)_0x4801e2['collapse']();_0x5c2150>0x0&&_0x5bf4bc['add'](this['_collapsedCommentsView'],0x1),Kt(_0x1eb1dc(Array['from'](this['visibleViews']),Array['from'](_0x5bf4bc)),this['visibleViews'],_0x5bf4bc);}['_rearrangeExpand'](){Kt(_0x1eb1dc(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x5f1ec0 of this['visibleViews'])_0x5f1ec0['expand']();}_setupKeyboardNavigation(){this['commentViews']['forEach'](_0x45b453=>{this['focusTracker']['add'](_0x45b453['element']),this['keystrokes']['listenTo'](_0x45b453['element']);}),this['commentViews']['on']('change',(_0x4c7d32,_0x3a5e46)=>{for(const _0x315c4a of _0x3a5e46['removed'])this['focusTracker']['remove'](_0x315c4a['element']),this['keystrokes']['stopListening'](_0x315c4a['element']);for(const _0x154cee of Array['from'](_0x3a5e46['added'])['reverse']())this['focusTracker']['add'](_0x154cee['element']),this['keystrokes']['listenTo'](_0x154cee['element']);});const _0x2b8943=_0x4328da=>{const _0x4acd5d=this['_collapsedCommentsView']['revealButtonView']['element'];_0x4acd5d&&(_0x4328da?(this['focusTracker']['add'](_0x4acd5d),this['keystrokes']['listenTo'](_0x4acd5d)):(this['focusTracker']['remove'](_0x4acd5d),this['keystrokes']['stopListening'](_0x4acd5d)));};this['listenTo'](this['visibleViews'],'add',(_0x1e3852,_0x372b08)=>{_0x372b08===this['_collapsedCommentsView']&&_0x2b8943(!0x0);}),this['listenTo'](this['visibleViews'],'remove',(_0x30be80,_0x42c996)=>{_0x42c996===this['_collapsedCommentsView']&&_0x2b8943(!0x1);}),this['visibleViews']['has'](this['_collapsedCommentsView'])&&_0x2b8943(!0x0);}};function Kt(_0x46ed5c,_0x48b518,_0x19fc0f){let _0x3169b9=0x0;for(const _0x710090 of _0x46ed5c)switch(_0x710090){case'insert':_0x48b518['add'](_0x19fc0f['get'](_0x3169b9),_0x3169b9),_0x3169b9++;break;case'delete':_0x48b518['remove'](_0x3169b9);break;case'equal':_0x3169b9++;}}function Gt(_0x2b9db0,_0x33f8b2){const _0x412761=_0x33f8b2-0x1;if(_0x2b9db0['length']<_0x33f8b2)return _0x2b9db0;const _0x2ce8d5=_0x2b9db0['lastIndexOf']('\x20',_0x412761);return _0x2b9db0['substring'](0x0,_0x2ce8d5>-0x1?_0x2ce8d5:_0x412761)+'…';}var Yt=class extends ut{constructor(_0x5ae8b2){super(_0x5ae8b2);const _0x4ef95=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x4ef95['to']('contextValue',_0x542349=>St(_0x5ae8b2,'THREAD_CONTEXT_LABEL',_0x542349)),'tabindex':-0x1},'children':[{'text':_0x4ef95['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Xt=class extends ut{['_model'];reopenButtonView;contextView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0xaf058f,_0x5142d3){super(_0xaf058f);const _0x31ca5a=this['bindTemplate'];this['_model']=_0x5142d3,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x1d34e2(),this['keystrokes']=new _0x2b8ee7(),this['focusCycler']=new ht({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x21efe1=>!!_0x21efe1),this['bind']('contextValue')['to'](this['_model'],'context',_0x22522e=>_0x22522e&&_0x22522e['value']?Gt(_0x22522e['value'],0x96):St(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',_0x31ca5a['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 _0x5073f5=new et(this['locale']);return _0x5073f5['label']=St(this['locale'],'Reopen'),_0x5073f5['tooltip']=St(this['locale'],'Reopen'),_0x5073f5['icon']=_0x228c7f,_0x5073f5['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x258890=>!_0x258890),_0x5073f5['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x5776fd,_0x59584d)=>_0x5776fd&&_0x59584d),_0x5073f5['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x5073f5;}_attachContextActions(){const _0x8df52c=this['element']['querySelector']('.ck-context'),_0x16a4e0=_0x8df52c['querySelector']('.ck-context__value');this['listenTo'](_0x8df52c,'mouseenter',()=>{_0x16a4e0['offsetWidth']<_0x16a4e0['scrollWidth']&&_0x8df52c['classList']['add']('overlay');}),this['listenTo'](_0x8df52c,'mouseleave',()=>{_0x8df52c['classList']['remove']('overlay');});}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']);for(const _0x58c7b2 of this['focusables'])this['focusTracker']['add'](_0x58c7b2['element']),this['keystrokes']['listenTo'](_0x58c7b2['element']);}_createContextView(){const _0xe7ae5c=new Yt(this['locale']);return _0xe7ae5c['bind']('contextValue')['to'](this),_0xe7ae5c;}},qt=class extends ut{['_model'];['_config'];commentThreadHeaderView;commentThreadInputView;ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x43ea15,_0x1c46ce,_0x2edc4d,_0x2e191e){super(_0x43ea15),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x1c46ce,this['_localUser']=_0x2edc4d,this['_config']=_0x2e191e,this['commentThreadHeaderView']=new Xt(_0x43ea15,_0x1c46ce),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0xa63f3a(_0x43ea15,St(_0x43ea15,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Wt(_0x43ea15,_0x1c46ce,Object['assign']({'CommentView':this['_config']['CommentView']},_0x2e191e)),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',(_0x4e4613,_0x182cf1)=>_0x4e4613||!!_0x182cf1),this['bind']('isUnlinked')['to'](_0x1c46ce,'unlinkedAt',_0x324c42=>!!_0x324c42);let _0x59221f=null;const _0xe5a0f5=()=>{const _0xc7c0a7=this['_model']['comments']['first']||null;_0xc7c0a7!==_0x59221f&&(_0x59221f&&this['stopListening'](_0x59221f,'change:content'),_0x59221f=_0xc7c0a7,_0xc7c0a7&&this['listenTo'](_0xc7c0a7,'change:content',_0xe5a0f5));const _0x5466a3=_0xc7c0a7?_0xc7c0a7['author']['name']:this['_localUser']['name'],_0x98508d=_0xc7c0a7?new DOMParser()['parseFromString'](_0x4f9e71(_0x9def27(_0xc7c0a7['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']})),'text/html')['body']['textContent']:'',_0x315277=St(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x5466a3]);this['set']('ariaLabel',_0x98508d?_0x315277+'\x20'+_0x98508d:_0x315277);};this['listenTo'](this['_model']['comments'],'change',_0xe5a0f5),_0xe5a0f5(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x1d34e2(),this['keystrokes']=new _0x2b8ee7(),this['focusCycler']=new ht({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2d8535=>_0x2d8535['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x2327bc(this,this['focusables']);}async destroy(){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}_createCommentThreadInputView(){const _0x281e04=new Ut(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0xb01b66=_0x281e04['commentInputView'];return _0x281e04['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0xb01b66,'value',(_0x142695,_0x250377,_0x2f30b3,_0x3852ee,_0x683d86)=>!!_0x683d86||!!_0x3852ee&&_0x2f30b3&&!_0x250377||_0x142695&&_0x2f30b3&&!_0x250377),_0xb01b66['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x5890ba,_0x4ed9ec,_0x2a88db)=>{let _0x45caaf;return _0x45caaf=_0x2a88db&&_0x4ed9ec?'Reply\x20to\x20reopen\x20discussion...':_0x5890ba?'Reply...':'Write\x20a\x20comment...',St(this['locale'],_0x45caaf);}),_0xb01b66['bind']('submitLabel')['to'](this,'length',_0x321bf7=>St(this['locale'],_0x321bf7?'Reply':'Comment')),_0xb01b66['on']('submit',(_0x398abc,_0x2a9114)=>{this['fire']('addComment',_0x2a9114),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0xb01b66['on']('cancel',()=>{this['focus']();}),_0xb01b66['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0xb01b66['on']('cancel',_0x9a6461=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x9a6461['stop']());}),this['on']('change:isActive',(_0x14a9ec,_0x52c6e7,_0x411609)=>{_0x411609||this['length']||_0xb01b66['value']||this['fire']('removeCommentThread');}),_0x281e04;}};const jt=/* #__PURE__ -- @preserve */
27
- _0x37b5e9(qt);var $t=class extends jt{commentThreadChildren;containerElement;resolveButton;_boundFirstCommentView;constructor(_0x2dcc55,_0x5def76,_0x11d5ef,_0x592324){super(_0x2dcc55,_0x5def76,_0x11d5ef,_0x592324),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x2dcc55,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x3343b0,_0x4ba4ce,_0x129e66)=>{_0x129e66||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x56881f,_0x533b47,_0x303f5a)=>{_0x303f5a&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}getTemplate(){const _0x19ade8=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x19ade8['if']('isActive','ck-thread--active'),_0x19ade8['if']('isUnlinked','ck-thread--unlinked'),_0x19ade8['to']('actionIndicator',_0x50dc69=>_0x50dc69?'ck-thread--'+_0x50dc69:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x19ade8['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 _0x4eadd5 of this['commentsListView']['commentViews'])_0x4eadd5['cancelConfirm']();}_bindFirstCommentView(){const {locale:_0x4dd5b7}=this,_0x452a86=this['commentsListView']['commentViews']['get'](0x0);_0x452a86===this['_boundFirstCommentView']||_0x452a86['isSystemComment']||(this['_boundFirstCommentView']=_0x452a86,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x452a86,'actionIndicator',_0x49807f=>'remove'===_0x49807f?'remove':null),_0x452a86['placeholder']=St(_0x4dd5b7,'Write\x20a\x20comment...'),_0x452a86['bind']('contextValue')['to'](this['_model'],'context',this['_model'],'archivedAt',(_0x55918c,_0x1762fa)=>_0x1762fa||!_0x55918c?null:'string'==typeof _0x55918c['value']&&_0x55918c['value']?Gt(_0x55918c['value'],0x2a):St(_0x4dd5b7,'Comment\x20was\x20made\x20on\x20an\x20element')),_0x452a86['removeButton']['on']('execute',_0x24e374=>{_0x24e374['stop'](),this['showConfirm'](St(_0x4dd5b7,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x452a86['focus']();}),_0x452a86['actionBar']['add'](this['resolveButton'],0x0),_0x452a86['focusables']['add'](this['resolveButton'],0x0));}_createResolveButton(){const _0x536d70=new _0x352688(this['locale']);return _0x536d70['label']=St(this['locale'],'Resolve'),_0x536d70['tooltip']=St(this['locale'],'Resolve'),_0x536d70['icon']=_0xf9f218,_0x536d70['extendTemplate']({'attributes':{'class':['ck-comment--resolve','ck-button_small']}}),_0x536d70['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x447130=>!_0x447130),_0x536d70['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4f26e8,_0x2d3282)=>_0x4f26e8&&!_0x2d3282),_0x536d70['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x536d70;}_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']));}},zt=class extends ut{constructor(_0x26a0ea){super(_0x26a0ea),this['set']('content',''),this['set']('contextValue',null),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',()=>this['_renderContent']()),this['on']('change:contextValue',()=>this['_renderContent']()),this['_renderContent']();}_renderContent(){const _0x693ddf=this['element'];_0x693ddf['innerHTML']=_0x4f9e71(this['content']);const _0x46a905=this['contextValue']?.['trim']();if(_0x46a905){const _0x1ce569=document['createElement']('div'),_0x10e0ff=document['createElement']('p');_0x1ce569['classList']['add']('ck-comment__context'),_0x10e0ff['textContent']=_0x46a905,_0x1ce569['append'](_0x10e0ff),_0x693ddf['prepend'](_0x1ce569);}}},Jt=class extends ut{['visibleView'];ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];constructor(_0x3fa9ad,_0x2bb0c0,_0x44b479){super(_0x3fa9ad),this['_model']=_0x2bb0c0,this['_config']=_0x44b479,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['set']('contextValue',null),this['bind']('ariaLabel')['to'](_0x2bb0c0,'content',_0x2bb0c0,'authoredAt',(_0x29d807,_0x1df214)=>St(_0x3fa9ad,'COMMENT_ARIA_LABEL',[_0x2bb0c0['author']['name'],_0x44b479['formatDateTime'](_0x1df214),new DOMParser()['parseFromString'](_0x4f9e71(_0x29d807),'text/html')['body']['textContent'],_0x2bb0c0['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0xa63f3a(_0x3fa9ad,St(_0x3fa9ad,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new ft(),this['focusTracker']=new _0x1d34e2(),this['keystrokes']=new _0x2b8ee7(),this['focusCycler']=new ht({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x39cdfd=>_0x39cdfd['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']?St(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):St(this['locale'],'EXTERNAL_COMMENT');}getUserViewNotificationText(){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?St(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):St(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}_createCommentContentView(){const _0x473096=new zt(this['locale']);return _0x473096['bind']('contextValue')['to'](this),_0x473096['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x498e8a,_0x2bc185)=>_0x2bc185?_0x9def27(_0x498e8a,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x498e8a),_0x473096;}_createCommentInputView(){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x15ac6a=new Ht(this['locale'],this['_config']['editorConfig']);return _0x15ac6a['value']=this['_model']['content'],_0x15ac6a['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x15ac6a['submitLabel']=St(this['locale'],'Save'),_0x15ac6a['on']('submit',(_0x3715ef,_0x404a39)=>{this['fire']('updateComment',this['_model']['id'],_0x404a39),this['switchToDisplayMode'](),this['focus']();}),_0x15ac6a['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x15ac6a['once']('editorReady',()=>{_0x15ac6a['focus']();}),_0x15ac6a['createEditor'](),_0x15ac6a['delegate']('editorReady')['to'](this),_0x15ac6a['delegate']('editorDestroyed')['to'](this),_0x15ac6a;}_setupKeyboardNavigation(){const _0x2d3dc8=this['element'];this['keystrokes']['listenTo'](_0x2d3dc8);for(const _0x23fb14 of this['focusables'])this['focusTracker']['add'](_0x23fb14['element']),this['keystrokes']['listenTo'](_0x23fb14['element']);this['focusables']['on']('change',(_0x4e05ea,_0x4fd442)=>{for(const _0x399d37 of _0x4fd442['removed'])this['focusTracker']['remove'](_0x399d37['element']),this['keystrokes']['stopListening'](_0x399d37['element']);for(const _0x2a4197 of _0x4fd442['added'])this['focusTracker']['add'](_0x2a4197['element']),this['keystrokes']['listenTo'](_0x2a4197['element']);}),this['keystrokes']['set']('enter',(_0xb3ed8b,_0x5d138d)=>{_0x2d3dc8===_0xb3ed8b['target']&&(this['focusCycler']['focusFirst'](),_0x5d138d());}),this['keystrokes']['set']('esc',(_0x238d4c,_0x2f360e)=>{_0x2d3dc8!==_0x238d4c['target']&&(this['focus'](),_0x2f360e());});}};const Qt=/* #__PURE__ -- @preserve */
28
- _0x37b5e9(Jt);var Zt=class extends Qt{actionBar;['userView'];constructor(_0x5a3fb2,_0x56c4b1,_0x9f3598){super(_0x5a3fb2,_0x56c4b1,_0x9f3598),this['set']('actionIndicator',null),this['set']('placeholder',St(_0x5a3fb2,'Reply...')),this['bind']('authoredAt')['to'](_0x56c4b1),this['bind']('resolvedAt')['to'](_0x56c4b1),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 _0x20132e(_0x5a3fb2,_0x56c4b1['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x56c4b1,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}getTemplate(){const _0xac1084=this['bindTemplate'],_0x9c775e=[{'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']}},{'tag':'time','attributes':{'datetime':_0xac1084['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0xac1084['to']('authoredAt',_0x121f55=>this['_config']['formatDateTime'](_0x121f55))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0xac1084['if']('isEditMode','ck-comment__actions--hidden'),_0xac1084['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']&&_0x9c775e['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0xac1084['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0xac1084['if']('isEditMode','ck-comment--edit'),_0xac1084['if']('isSystemComment','ck-comment--info'),_0xac1084['to']('actionIndicator',_0x3cc66b=>_0x3cc66b?'ck-comment--'+_0x3cc66b:'')],'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':_0x9c775e}]}]};}_createEditButton(){const _0x376bf0=new et(this['locale']);return _0x376bf0['label']=St(this['locale'],'Edit'),_0x376bf0['icon']=_0x4db5af,_0x376bf0['withText']=!0x0,_0x376bf0['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x376bf0['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x289f93=>!_0x289f93),_0x376bf0['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x376bf0['on']('execute',()=>this['switchToEditMode']()),_0x376bf0;}_createRemoveButton(){const _0x1d701b=new et(this['locale']);return _0x1d701b['label']=St(this['locale'],'Remove'),_0x1d701b['icon']=_0x1abaef,_0x1d701b['withText']=!0x0,_0x1d701b['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x1d701b['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x516389=>!_0x516389),_0x1d701b['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x1d701b['on']('execute',()=>{this['showConfirm'](St(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x1d701b;}_createDropdown(){const _0x5bf3ed=wt(this['locale'],_0x22ee5c),_0x514bab=_0x5bf3ed['panelView']['children'],_0x2403b1=new dt(this['locale']),_0x53161f=_0x5bf3ed['bindTemplate'];gt(_0x5bf3ed,()=>this['items']['find'](_0x5872b1=>_0x5872b1['isVisible'])),_0x5bf3ed['extendTemplate']({'attributes':{'class':[_0x53161f['if']('isVisible','ck-hidden',_0x171f09=>!_0x171f09)]}});const _0x1a29f2=(_0x17fe25,_0x373d70=-0x1)=>{const _0x4a8b4c=new ct(this['locale']);_0x4a8b4c['children']['add'](_0x17fe25);const _0x3629d6=_0x373d70>-0x1?_0x373d70:_0x2403b1['items']['length'];_0x2403b1['items']['add'](_0x4a8b4c,_0x3629d6);const _0x5cee7c=Array['from'](this['items']);_0x5bf3ed['unbind']('isEnabled','isVisible'),_0x5bf3ed['bind']('isEnabled')['toMany'](_0x5cee7c,'isEnabled',(..._0x42f917)=>_0x42f917['some'](_0x412e1c=>_0x412e1c)),_0x5bf3ed['bind']('isVisible')['toMany'](_0x5cee7c,'isVisible',(..._0x3ad4fc)=>_0x3ad4fc['some'](_0xbe46b1=>_0xbe46b1));};_0x5bf3ed['panelPosition']='sw',_0x5bf3ed['buttonView']['set']({'label':St(this['locale'],'Show\x20more\x20items'),'icon':_0x5c02c4}),_0x5bf3ed['buttonView']['extendTemplate']({'attributes':{'class':'ck-button_small'}});for(const _0x17bbdc of this['items'])_0x1a29f2(_0x17bbdc);return _0x514bab['add'](_0x2403b1),_0x5bf3ed['listenTo'](this['items'],'add',(_0x54ff30,_0x95b230,_0x4b35a1)=>{_0x1a29f2(_0x95b230,_0x4b35a1);}),_0x5bf3ed['listenTo'](this['items'],'remove',(_0xc52c3a,_0x41143e,_0x30bb2e)=>{_0x2403b1['items']['remove'](_0x30bb2e);}),_0x5bf3ed;}_attachActions(_0x4e1d11,_0x171241){const _0xc8e2e5=_0x4e1d11&&_0x4e1d11['element'];_0xc8e2e5&&(this['listenTo'](_0xc8e2e5,'mouseenter',()=>this['actionIndicator']=_0x171241),this['listenTo'](_0xc8e2e5,'focus',()=>this['actionIndicator']=_0x171241),this['listenTo'](_0xc8e2e5,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0xc8e2e5,'blur',()=>this['actionIndicator']=null));}_createCommentInputView(){const _0x55f7fa=super['_createCommentInputView']();return _0x55f7fa['bind']('placeholder')['to'](this),_0x55f7fa;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}};function te(_0x302026){const _0x476bf3=_0x494a40(_0x302026,0x1e),_0x305451=new MutationObserver(_0x3b1518=>{for(const _0x5dc404 of _0x3b1518)('attributes'==_0x5dc404['type']&&'class'==_0x5dc404['attributeName']||'childList'==_0x5dc404['type']||'characterData'==_0x5dc404['type'])&&_0x476bf3();});return{'attach'(_0x3234e1){_0x305451['observe'](_0x3234e1,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x305451['disconnect'](),_0x476bf3['cancel']();}};}var ee=class extends ut{['focusTracker'];['id'];keystrokes;content;['mainView'];_mutationObserver;constructor(_0x494e5b,_0x51e9a6){super(_0x494e5b),this['id']=_0x3edcb5(),this['focusTracker']=new _0x1d34e2(),this['keystrokes']=new _0x2b8ee7(),this['keystrokes']['set']('Esc',(_0x43837e,_0x1c7216)=>this['fire']('Esc',_0x1c7216)),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']=te(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x51e9a6),this['mainView']=_0x51e9a6;const _0x57387c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x57387c['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 _0x1ccdf5=this['element']['clientHeight'];_0x1ccdf5&&(this['height']=_0x1ccdf5);}};const ie=/* #__PURE__ -- @preserve */
29
- _0x5adef3();var se=class Annotation extends ie{['view'];focusableElements;_type;_target;constructor({view:_0x37eced,target:_0x43593c,type:_0xd209eb,isVisible:_0x5bbcf2=!0x0}){super(),this['view']=_0x37eced,this['view']['element']||this['view']['render'](),this['_type']=_0xd209eb,this['_target']=_0x43593c,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x5d3b53([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x52dc20,_0xa13da6)=>{this['view']['focusTracker']['add'](_0xa13da6);}),this['focusableElements']['on']('remove',(_0x291939,_0x1c2310)=>{this['view']['focusTracker']['remove'](_0x1c2310);}),this['set']('isVisible',_0x5bbcf2);}get type(){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get target(){const _0x1e7c96=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x1e7c96),_0x1e7c96;}get targetRect(){const _0x353adc=this['target'];if(null===_0x353adc)return null;if(_0x353adc instanceof _0xa06a55)return _0x353adc;const _0x4b55b0=_0x353adc['filter'](_0x3969c5=>function(_0x27f0a1){return!!_0x27f0a1['offsetParent']||!!_0x27f0a1['getClientRects']()['item'](0x0);}(_0x3969c5));return 0x0===_0x4b55b0['length']?null:_0xa06a55['getDomElementRects'](_0x4b55b0[0x0])[0x0];}get isActive(){return this['view']['isActive'];}set isActive(_0x5d4cb2){this['view']['isActive']=_0x5d4cb2,this['view']['mainView']['isActive']=_0x5d4cb2;}updateTargetRect(){this['view']['targetRect']=this['targetRect'];}destroy(){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}refreshVisibility(){this['isVisible']=!!this['targetRect'];}static _assertCorrectTarget(_0x2820f6){if(!(null===_0x2820f6||_0x2820f6 instanceof _0xa06a55||Array['isArray'](_0x2820f6)&&_0x2820f6['every'](_0x209e57=>ne(_0x209e57))))throw new _0x11a517('annotation-invalid-target',null,{'target':_0x2820f6});}_getNormalizedTarget(){const _0x33b16e='function'==typeof this['_target']?this['_target']():this['_target'];return ne(_0x33b16e)?[_0x33b16e]:_0x33b16e;}};function ne(_0x1c7fce){return null!==_0x1c7fce&&'object'==typeof _0x1c7fce&&'nodeType'in _0x1c7fce&&0x1===_0x1c7fce['nodeType'];}var oe=class extends _0x5d3b53{_innerViewToAnnotation;_viewToAnnotation;['_focusTracker'];constructor(_0xf50c8b=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x1d34e2(),this['_focusTracker']['on']('change:isFocused',(_0x19afb1,_0x26e789,_0x498737)=>{_0x498737||this['fire']('blur');});for(const _0x48c869 of _0xf50c8b)this['add'](_0x48c869);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x2508df){if(this['has'](_0x2508df))throw new _0x11a517('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x2508df['innerView'],_0x2508df),this['_viewToAnnotation']['set'](_0x2508df['view'],_0x2508df);for(const _0xc07b05 of _0x2508df['focusableElements'])this['_focusTracker']['add'](_0xc07b05);if(this['listenTo'](_0x2508df['focusableElements'],'add',(_0x2944f4,_0x26227d)=>{this['_focusTracker']['add'](_0x26227d);}),this['listenTo'](_0x2508df['focusableElements'],'remove',(_0x419b2a,_0x43f174)=>{this['_focusTracker']['remove'](_0x43f174);}),this['listenTo'](_0x2508df['view']['focusTracker'],'change:isFocused',(_0x22ddd0,_0x566061,_0x1fa19b)=>{_0x1fa19b&&this['fire']('focus',_0x2508df);}),_0x2508df['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x8b81bb of this)_0x8b81bb['updateTargetRect']();}const _0x10476b=this['_getOrderInContent'](_0x2508df['view']['targetRect']);return super['add'](_0x2508df,_0x10476b);}['remove'](_0x566839){if(!this['has'](_0x566839))throw new _0x11a517('annotationcollection-not-existing-item',null);this['stopListening'](_0x566839['view']['focusTracker']),this['stopListening'](_0x566839['focusableElements']);for(const _0x5312a5 of _0x566839['focusableElements'])this['_focusTracker']['remove'](_0x5312a5);return this['_viewToAnnotation']['delete'](_0x566839['view']),this['_innerViewToAnnotation']['delete'](_0x566839['innerView']),super['remove'](_0x566839);}getByInnerView(_0x45180b){return this['_innerViewToAnnotation']['get'](_0x45180b);}getByView(_0x28c06d){return this['_viewToAnnotation']['get'](_0x28c06d);}destroy(){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}refreshPositioning(){for(const _0x54f083 of this)_0x54f083['updateTargetRect']();this['_sort']();}_sort(){const _0x27290e=Array['from'](this)['sort']((_0x549e9e,_0xb23c10)=>he(_0x549e9e['view']['targetRect'],_0xb23c10['view']['targetRect']));for(let _0x33e36a=_0x27290e['length']-0x1;_0x33e36a>0x0;_0x33e36a--){const _0x218b19=_0x27290e[_0x33e36a];_0x33e36a!==this['getIndex'](_0x218b19)&&(this['remove'](_0x218b19),this['add'](_0x218b19));}}_getOrderInContent(_0x460469){let _0x549faf=0x0;if(!_0x460469)return this['length'];for(const _0x103607 of this){const _0x15037b=_0x103607['view']['targetRect'];if(_0x15037b){if(he(_0x460469,_0x15037b)<0x0)return _0x549faf;_0x549faf++;}}return _0x549faf;}_areCachedRectsStale(){const _0x526e2c=this['get'](0x0);if(!_0x526e2c)return!0x1;const _0x4f4dbf=_0x526e2c['view']['targetRect'],_0x1c2a63=_0x526e2c['targetRect'];return!(!_0x4f4dbf||!_0x1c2a63)&&(_0x4f4dbf['top']!==_0x1c2a63['top']||_0x4f4dbf['left']!==_0x1c2a63['left']);}};function re({source:_0x5944bc,target:_0x3ad29b,filter:_0x395e5d}){for(const _0x34053d of _0x5944bc)_0x395e5d(_0x34053d)&&_0x3ad29b['add'](_0x34053d);_0x3ad29b['listenTo'](_0x5944bc,'add',(_0x1089d4,_0x5aaca3)=>{_0x395e5d(_0x5aaca3)&&_0x3ad29b['add'](_0x5aaca3);}),_0x3ad29b['listenTo'](_0x5944bc,'remove',(_0x1b4aad,_0x4d0a06)=>{_0x3ad29b['has'](_0x4d0a06)&&_0x3ad29b['remove'](_0x4d0a06);});}function he(_0x52ab1d,_0x144253){if(null===_0x52ab1d&&null===_0x144253)return 0x0;if(null===_0x52ab1d)return-0x1;if(null===_0x144253)return 0x1;const _0xd305f3=_0x52ab1d['top']-_0x144253['top'];return 0x0==_0xd305f3?_0x52ab1d['left']-_0x144253['left']:_0xd305f3;}var ae=class extends _0x11bb03{collection;_visibleAnnotations;static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x11bf45){if(super(_0x11bf45),this['collection']=new oe(),this['_visibleAnnotations']=new oe(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x11bf45 instanceof _0x164495){const _0x5a5a69=_0x11bf45['locale'];_0x11bf45['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':St(_0x5a5a69,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':St(_0x5a5a69,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':St(_0x5a5a69,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':St(_0x5a5a69,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':St(_0x5a5a69,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':St(_0x5a5a69,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':St(_0x5a5a69,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x17e9ec){this['collection']['add'](_0x17e9ec);}['remove'](_0x412088){this['collection']['remove'](_0x412088),_0x412088['destroy']();}refreshVisibility(){for(const _0xfcc9fd of this['collection'])_0xfcc9fd['refreshVisibility']();}refreshPositioning(){this['_visibleAnnotations']['refreshPositioning']();}getByInnerView(_0x283124){return this['collection']['getByInnerView'](_0x283124);}deactivateAll(){this['fire']('_deactivateAllAnnotations');}destroy(){for(const _0x148d26 of this['collection'])_0x148d26['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}activate(_0x369644){this['fire']('_activateAnnotation',_0x369644);}createAnnotation(_0x4ac27e){return new se(_0x4ac27e);}createAnnotationView(_0x3ef91d,_0x42c4de){return new ee(_0x3ef91d,_0x42c4de);}_addActiveAnnotation(_0x1db775){const _0x2e58c6=new Set(this['activeAnnotations']);_0x2e58c6['add'](_0x1db775),this['activeAnnotations']=_0x2e58c6;}_removeActiveAnnotation(_0x468821){const _0x1d2497=new Set(this['activeAnnotations']);_0x1d2497['delete'](_0x468821),this['activeAnnotations']=_0x1d2497;}_bindAnnotationsToVisibleAnnotations(){const _0x4f3dd0=this['collection'],_0x11cf51=this['_visibleAnnotations'];function _0x2576aa(_0x374bdc){const _0x59fd98=_0x374bdc['source'];_0x59fd98['isVisible']&&!_0x11cf51['has'](_0x59fd98)?_0x11cf51['add'](_0x59fd98):!_0x59fd98['isVisible']&&_0x11cf51['has'](_0x59fd98)&&_0x11cf51['remove'](_0x59fd98),_0x59fd98['view']['focusTracker']['remove'](_0x59fd98['view']['element']),_0x59fd98['view']['focusTracker']['add'](_0x59fd98['view']['element']);}this['listenTo'](_0x4f3dd0,'add',(_0x1f524d,_0x59a45b)=>{_0x59a45b['isVisible']&&_0x11cf51['add'](_0x59a45b),this['listenTo'](_0x59a45b,'change:isVisible',_0x2576aa);}),this['listenTo'](_0x4f3dd0,'remove',(_0x85d860,_0x178b24)=>{_0x11cf51['has'](_0x178b24)&&_0x11cf51['remove'](_0x178b24),this['stopListening'](_0x178b24,'change:isVisible',_0x2576aa);});}_setupEnterAnnotationKeystroke(){const _0x58c5ea=_0x8f3535=>{_0x8f3535['on']('ready',()=>{_0x8f3535['keystrokes']['set'](_0x57ecbb,(_0x26ff1e,_0xb3bb9)=>{const _0x4d5132=_0x583041(this['activeAnnotations']['values']());_0x4d5132&&(_0x4d5132['view']['focus'](),_0xb3bb9());});});};this['context']instanceof _0x164495?_0x58c5ea(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x3acb99,_0x46894f)=>{_0x58c5ea(_0x46894f);});}_setupEscapeAnnotationHandling(){const _0x4347c7=_0x14507a=>{const _0x469c2c=_0x14507a['source'],_0x117586=[];let _0x2a2eca;if(Array['isArray'](_0x469c2c['target'])){_0x2a2eca=_0x469c2c['target'][0x0],this['context']instanceof _0x164495?_0x117586['push'](this['context']):this['context']['editors']&&_0x117586['push'](...this['context']['editors']);for(const _0x34c615 of _0x117586)for(const _0x5e8c0c of _0x34c615['editing']['view']['domRoots']['values']())if(_0x4639b8(_0x5e8c0c,_0x2a2eca))return void _0x34c615['editing']['view']['focus']();_0x2a2eca['focus']();}};this['listenTo'](this['collection'],'add',(_0x1c9407,_0x50916a)=>{this['listenTo'](_0x50916a,'escape',_0x4347c7,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x47ebe1,_0x4bd02e)=>{this['stopListening'](_0x4bd02e,'escape',_0x4347c7);});}};const ce=Symbol('noChannel'),de={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},le=/* #__PURE__ -- @preserve */
30
- _0x5adef3(),me=/* #__PURE__ -- @preserve */
31
- _0x5adef3();var ue=class extends _0x11bb03{_threads;_threadToController;_viewToController;static get requires(){return[ae,_0xd2cfcb,_0x18879d];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2e411d){super(_0x2e411d),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x9d4b3c=this['context']['config'];_0x9d4b3c['define']('comments.maxCommentsWhenCollapsed',0x2),_0x9d4b3c['define']('comments.maxThreadTotalWeight',0x1f4),_0x9d4b3c['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x9d4b3c['define']('comments.CommentThreadView',$t),_0x9d4b3c['define']('comments.CommentView',Zt),_0x9d4b3c['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}init(){const _0x45e393=this['context']['plugins']['get'](ae);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x5c6be4,_0x4b7ac5)=>this['_addCommentThread'](_0x4b7ac5)),this['on']('submitCommentThread',(_0x505488,_0x4b7562)=>this['_submitCommentThread'](_0x4b7562)),this['on']('resolveCommentThread',(_0x408d40,_0x33e734)=>this['_resolveCommentThread'](_0x33e734)),this['on']('resolveCommentThread',(_0x2e62c0,_0x573749)=>this['_updateActiveAnnotation'](_0x573749),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x33e1bd,_0x386313)=>this['_reopenCommentThread'](_0x386313)),this['on']('reopenCommentThread',(_0x2306ae,_0x54e7a1)=>this['_updateActiveAnnotation'](_0x54e7a1),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x1a24b0,_0x1e3119)=>this['_removeCommentThread'](_0x1e3119)),this['on']('updateCommentThread',(_0x333ef4,_0x34691b)=>this['_updateCommentThread'](_0x34691b)),this['on']('updateCommentThread',(_0x14c901,_0x51fa3a)=>this['_updateActiveAnnotation'](_0x51fa3a),{'priority':'lowest'}),this['on']('addComment',(_0x5add6d,_0x4a0705)=>this['_addComment'](_0x4a0705)),this['on']('updateComment',(_0x2ac979,_0x1dcc7a)=>this['_updateComment'](_0x1dcc7a)),this['on']('removeComment',(_0x370eb0,_0x20ba27)=>this['_removeComment'](_0x20ba27)),this['on']('addComment',(_0x9732a3,{threadId:_0x32d5cc,isFromAdapter:_0x4e85d3})=>{if(_0x4e85d3)return;const _0x4fe531=this['getCommentThread'](_0x32d5cc),_0x395e69=_0x4fe531&&this['_threadToController']['get'](_0x4fe531);_0x395e69&&_0x395e69['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x45e393,'change:activeAnnotations',(_0x409624,_0x5ed83c,_0x2918d1)=>{const _0x3b2a75=Array['from'](_0x2918d1)['map'](_0x4cc86b=>this['_viewToController']['get'](_0x4cc86b['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x3b2a75?_0x3b2a75['model']:null;});}set adapter(_0x11eae8){if(this['_adapter'])throw new _0x11a517('commentsrepository-adapter-already-set');this['_adapter']=_0x11eae8;}get adapter(){return this['_adapter'];}addCommentThread({channelId:_0x12943e=ce,threadId:_0x5d853d=_0x3edcb5(),comments:_0x2d053e=[],unlinkedAt:_0x21efab=null,resolvedAt:_0x5c5b52=null,resolvedBy:_0x23ab05=null,target:_0x41eecb=null,context:_0x465bad=null,attributes:_0x1bbb49={},isResolvable:_0x144b42=!0x0,isSubmitted:_0x45ce9c=!0x1,isFromAdapter:_0x564878=!0x1}={}){return this['fire'](we('addCommentThread',_0x12943e),{'channelId':_0x12943e,'threadId':_0x5d853d,'comments':_0x2d053e,'unlinkedAt':_0x21efab,'resolvedAt':_0x5c5b52,'resolvedBy':_0x23ab05,'target':_0x41eecb,'context':_0x465bad,'attributes':_0x1bbb49,'isFromAdapter':_0x564878,'isResolvable':_0x144b42,'isSubmitted':_0x45ce9c}),this['getCommentThread'](_0x5d853d);}openNewCommentThread({channelId:_0x24f39b=ce,threadId:_0x22d614=_0x3edcb5(),target:_0x3eb516,context:_0x4e7e56=null,isResolvable:_0x31c638=!0x0}){if(this['_readOnlyChannels']['has'](_0x24f39b)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x3eb516)throw new _0x11a517('commentsrepository-missing-target');const _0x14cd7e=this['addCommentThread']({'channelId':_0x24f39b,'threadId':_0x22d614,'target':_0x3eb516,'context':_0x4e7e56,'isResolvable':_0x31c638});if(!_0x14cd7e)return null;const _0x290756=this['_threadToController']['get'](_0x14cd7e),_0x11e08e=_0x290756['view']['commentThreadInputView']['commentInputView'],_0xfbefb9=this['context']['plugins']['get'](ae),_0x3461df=_0xfbefb9['getByInnerView'](_0x290756['view']);return _0xfbefb9['activate'](_0x3461df),_0x11e08e['once']('editorReady',()=>_0x11e08e['focus']()),_0x14cd7e;}hasCommentThread(_0x36cce9){if('string'!=typeof _0x36cce9)throw new _0x11a517('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x36cce9);}updateCommentThread({channelId:_0x5bb6d8=ce,threadId:_0x66c92c,context:_0x4c5329,unlinkedAt:_0x17f493,attributes:_0x5385ac,isFromAdapter:_0x1fd9fa=!0x1}){return this['fire'](we('updateCommentThread',_0x5bb6d8),{'channelId':_0x5bb6d8,'threadId':_0x66c92c,'context':_0x4c5329,'unlinkedAt':_0x17f493,'attributes':_0x5385ac,'isFromAdapter':_0x1fd9fa}),this['getCommentThread'](_0x66c92c);}getCommentThread(_0x225223){if('string'!=typeof _0x225223)throw new _0x11a517('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x225223);}fetchCommentThread({channelId:_0x444e20,threadId:_0x50855f}={}){const _0x23adec=this['getCommentThread'](_0x50855f);if(_0x23adec)return Promise['resolve'](_0x23adec);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x11a517('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x444e20,'threadId':_0x50855f})['then'](_0x3d75c0=>this['hasCommentThread'](_0x50855f)?this['getCommentThread'](_0x50855f):_0x3d75c0?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x444e20},_0x3d75c0)):void 0x0)['catch'](_0x5aa22d=>{throw console['error'](_0x5aa22d),new _0x11a517('commentsrepository-fetch-comment-thread',this['context']);});}getCommentThreads({channelId:_0x4d8762,skipNotAttached:_0x26ca4a=!0x1,skipEmpty:_0x57d010=!0x1,toJSON:_0x529c80=!0x1}={}){const _0x286ffd=[];for(const _0x39ff97 of this['_threads']['values']())_0x4d8762&&_0x39ff97['channelId']!==_0x4d8762||_0x26ca4a&&!_0x39ff97['isAttached']||_0x57d010&&0x0===_0x39ff97['length']||_0x286ffd['push'](_0x39ff97);return _0x529c80?_0x286ffd['map'](_0x5cae78=>_0x5cae78['toJSON']()):_0x286ffd;}getAnnotationForCommentThread(_0x4be4ce){const _0x43c96c=this['_threadToController']['get'](_0x4be4ce);return _0x43c96c&&this['context']['plugins']['get'](ae)['getByInnerView'](_0x43c96c['view'])||null;}getCommentThreadForAnnotation(_0x37116c){const _0x4c0613=this['_viewToController']['get'](_0x37116c['innerView']);return _0x4c0613?_0x4c0613['model']:null;}setActiveCommentThread(_0x544840){const _0x12f054=this['context']['plugins']['get'](ae);if(!_0x544840)return void(this['activeCommentThread']&&_0x12f054['deactivateAll']());const _0x511da2=this['getCommentThread'](_0x544840);if(!_0x511da2)throw new _0x11a517('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x544840});if(!this['_threadToController']['has'](_0x511da2))throw new _0x11a517('commentsrepository-active-not-attached',null,{'threadId':_0x544840});const _0x57d2ab=_0x12f054['getByInnerView'](this['_threadToController']['get'](_0x511da2)['view']);_0x12f054['activate'](_0x57d2ab);}switchReadOnly(_0x5c2da4,_0x1b125e){_0x5c2da4?this['_readOnlyChannels']['add'](_0x1b125e):this['_readOnlyChannels']['delete'](_0x1b125e),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x128215){return this['_readOnlyChannels']['has'](_0x128215)||this['_readOnlyChannels']['has'](void 0x0);}createCommentThreadController(_0x38ca57,_0x8d8f69){return new xt(_0x38ca57,_0x8d8f69);}setPermissions(_0x46e3bc,_0x4cf0f8=ce){this['_permissions']['set'](_0x4cf0f8,_0x46e3bc),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}getPermissions(_0x47b13b=ce){return this['_permissions']['has'](_0x47b13b)?this['_permissions']['get'](_0x47b13b):de;}_addCommentThread({channelId:_0x10017c,threadId:_0x309b5a,comments:_0x3cbe48,unlinkedAt:_0x19e567,resolvedAt:_0x52c48c,resolvedBy:_0x2a5adb,target:_0x3a01a0,context:_0xb69b66,attributes:_0x7221c4,isFromAdapter:_0x37784f,isResolvable:_0x4d90d1,isSubmitted:_0x4721c3}){if('string'!=typeof _0x309b5a)throw new _0x11a517('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x309b5a});if(this['hasCommentThread'](_0x309b5a))throw new _0x11a517('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x309b5a});const _0x50b068=new fe(this,{'channelId':_0x10017c,'id':_0x309b5a,'context':_0xb69b66,'attributes':_0x7221c4,'unlinkedAt':_0x19e567,'resolvedAt':_0x52c48c,'resolvedBy':_0x2a5adb?this['context']['plugins']['get'](_0x18879d)['getUser'](_0x2a5adb):null,'isResolvable':_0x4d90d1,'isSubmitted':_0x4721c3||_0x37784f});this['_threads']['set'](_0x309b5a,_0x50b068);for(const _0x4c919b of _0x3cbe48)_0x50b068['_add'](this['_createNewComment']({'threadId':_0x309b5a,..._0x4c919b}));return _0x3a01a0&&_0x50b068['attachTo'](_0x3a01a0),_0x37784f||!_0x50b068['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x10017c,'threadId':_0x309b5a});}_submitCommentThread({channelId:_0x540730,threadId:_0x163ed9}){if(!this['hasCommentThread'](_0x163ed9))throw new _0x11a517('commentsrepository-missing-comment-thread',this);const _0x5f89f4=this['getCommentThread'](_0x163ed9);if(_0x5f89f4['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x4247f6,comments:_0x41a170,resolvedAt:_0x4a8fac,resolvedBy:_0x4ef66b,context:_0x26c2ff,attributes:_0xadd00e}=_0x5f89f4,_0x12d270=this['context']['plugins']['get']('PendingActions'),_0x61f2ee=_0x12d270['add'](St(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x540730,'threadId':_0x4247f6,'comments':_0x41a170['map'](_0x520557=>_0x520557['toJSON']()),'resolvedAt':_0x4a8fac,'resolvedBy':_0x4ef66b?_0x4ef66b['id']:_0x4ef66b,'context':_0x26c2ff,'attributes':_0xadd00e})['then'](({comments:_0x78faed})=>{_0x12d270['remove'](_0x61f2ee);for(const _0x49a2be of _0x78faed)this['_updateComment']({'channelId':_0x540730,'threadId':_0x163ed9,'commentId':_0x49a2be['commentId'],'createdAt':_0x49a2be['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x5956f7=>{throw console['error'](_0x5956f7),new _0x11a517('commentsrepository-add-comment-thread-internal-error',this);});}_attachCommentThread({threadId:_0x347c1c,target:_0x5a8f7d}){const _0x3a7696=this['getCommentThread'](_0x347c1c);if(!_0x3a7696)throw new _0x11a517('commentsrepository-attach-missing-comment-thread',this);const _0x467726=this['context']['plugins']['get']('PendingActions'),_0x2f7b42=this['context']['plugins']['get'](ae),_0x16d0b6=this['_createCommentThreadView'](_0x3a7696),_0x4c1dce=new xt(_0x3a7696,_0x16d0b6);let _0xdc546d=null;_0x16d0b6['on']('change:isDirty',(_0x5a126e,_0x2d79b7,_0x214672)=>{_0x214672?_0xdc546d=_0x467726['add'](St(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0xdc546d&&(_0x467726['remove'](_0xdc546d),_0xdc546d=null);}),this['_threadToController']['set'](_0x3a7696,_0x4c1dce),this['_viewToController']['set'](_0x16d0b6,_0x4c1dce);const _0x35633b=new ee(this['context']['locale'],_0x16d0b6);_0x35633b['bind']('length')['to'](_0x16d0b6),_0x35633b['bind']('isDirty')['to'](_0x16d0b6,'isDirty',_0x16d0b6,'length',(_0x105b64,_0x2bbe01)=>_0x105b64||!_0x2bbe01),_0x35633b['bind']('isActive')['to'](_0x16d0b6),_0x35633b['type']='comment';const _0x2036d6=new se({'view':_0x35633b,'target':_0x5a8f7d,'type':'comment','isVisible':!_0x3a7696['archivedAt']&&!!('function'==typeof _0x5a8f7d?_0x5a8f7d():_0x5a8f7d)});return _0x16d0b6['on']('escape',()=>{_0x2036d6['fire']('escape');}),this['_bindAnnotationToEditors'](_0x16d0b6,_0x2036d6),_0x2f7b42['add'](_0x2036d6),_0x2036d6;}_bindAnnotationToEditors(_0x1546f3,_0x441a9a){this['listenTo'](_0x1546f3,'editorReady',(_0x28dd09,_0x2217be)=>{const _0x48f90b=_0x2217be['ui']['view']['body']['bodyCollectionContainer'];_0x441a9a['focusableElements']['add'](_0x48f90b),this['context']instanceof _0x164495&&this['context']['ui']['focusTracker']['add'](_0x48f90b);},{'priority':'highest'}),this['listenTo'](_0x1546f3,'editorDestroyed',(_0x21de79,_0x3ffcb5)=>{const _0x407062=_0x3ffcb5['ui']['view']['body']['bodyCollectionContainer'];_0x441a9a['focusableElements']['has'](_0x407062)&&_0x441a9a['focusableElements']['remove'](_0x407062),this['context']instanceof _0x164495&&this['context']['ui']['focusTracker']['remove'](_0x407062);});}_unbindEditors(_0x4ca48d){this['stopListening'](_0x4ca48d,'editorReady'),this['stopListening'](_0x4ca48d,'editorDestroyed');}_createCommentThreadView(_0x3c94a3){const _0x156e08=this['context']['plugins']['get'](_0x18879d),{config:_0x219079,locale:_0x2370ea}=this['context'],_0x20ee56=_0x54ce00(_0x219079['get']('locale'),_0x2370ea);return new(0x0,(_0x219079['get']('comments'))['CommentThreadView'])(_0x2370ea,_0x3c94a3,_0x156e08['me'],{'editorConfig':{..._0x219079['get']('comments.editorConfig'),...this['_getCommentEditorOverlayConfig'](),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x219079['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x219079['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x219079['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x219079['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x20ee56,'CommentView':_0x219079['get']('comments')['CommentView']});}_getCommentEditorOverlayConfig(){const _0x2ebf3f=this['context']['config'],_0x4bb247=_0x2ebf3f['get']('comments.editorConfig'),_0x34eb81=_0x4bb247?.['ui']?.['overlayContainer']||_0x2ebf3f['get']('sidebar.overlayContainer')||_0x2ebf3f['get']('ui.overlayContainer');return _0x34eb81?{'ui':{..._0x4bb247?.['ui'],'overlayContainer':_0x34eb81}}:{};}_resolveCommentThread({threadId:_0x40aa4f,channelId:_0x3fc639,resolvedAt:_0x399fa8,resolvedBy:_0x36385f,isFromAdapter:_0x3b7cd3}){if(!this['hasCommentThread'](_0x40aa4f))throw new _0x11a517('commentsrepository-missing-comment-thread',null,{'threadId':_0x40aa4f});const _0x77c4ef=this['getCommentThread'](_0x40aa4f);if(_0x77c4ef['isResolved'])throw new _0x11a517('commentsrepository-resolved-comment-thread',null,{'threadId':_0x40aa4f});const _0x141d02=this['context']['plugins']['get'](_0x18879d);if(_0x77c4ef['resolvedBy']=_0x141d02['getUser'](_0x36385f),_0x77c4ef['resolvedAt']=_0x399fa8,_0x3b7cd3||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x1b9cf6=this['context']['plugins']['get']('PendingActions'),_0x494261=_0x1b9cf6['add'](St(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x3fc639,'threadId':_0x40aa4f})['then'](({resolvedAt:_0x1a6e36,resolvedBy:_0x2ff164})=>{_0x1b9cf6['remove'](_0x494261),_0x77c4ef['resolvedBy']['id']!==_0x2ff164&&(_0x77c4ef['resolvedBy']=_0x141d02['getUser'](_0x2ff164)),_0x77c4ef['resolvedAt']=_0x1a6e36;})['catch'](_0x154c35=>{throw console['error'](_0x154c35),new _0x11a517('commentsrepository-resolve-comment-thread-internal-error',this);});}_reopenCommentThread({threadId:_0xb2f6b8,channelId:_0x149b0c,isFromAdapter:_0x2a146f}){if(!this['hasCommentThread'](_0xb2f6b8))throw new _0x11a517('commentsrepository-missing-comment-thread',null,{'threadId':_0xb2f6b8});const _0x38d853=this['getCommentThread'](_0xb2f6b8);if(!_0x38d853['isResolved'])throw new _0x11a517('commentsrepository-reopen-comment-thread',null,{'threadId':_0xb2f6b8});if(_0x38d853['resolvedBy']=null,_0x38d853['resolvedAt']=null,_0x2a146f||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x1f09fc=this['context']['plugins']['get']('PendingActions'),_0xf6c9e2=_0x1f09fc['add'](St(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x149b0c,'threadId':_0xb2f6b8})['then'](()=>_0x1f09fc['remove'](_0xf6c9e2))['catch'](_0x5c50e7=>{throw console['error'](_0x5c50e7),new _0x11a517('commentsrepository-reopen-comment-thread-internal-error',this);});}_removeCommentThread({threadId:_0x286af2,isFromAdapter:_0x5b1c23}){const _0x16319c=this['getCommentThread'](_0x286af2);if(!_0x16319c)throw new _0x11a517('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x286af2),this['_threads']['delete'](_0x286af2),!_0x16319c['isSubmitted']||_0x5b1c23||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x2928b6=this['context']['plugins']['get']('PendingActions'),{channelId:_0x360089}=_0x16319c,_0x31cb7a=_0x2928b6['add'](St(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x360089,'threadId':_0x286af2})['then'](()=>_0x2928b6['remove'](_0x31cb7a))['catch'](_0x1ebe89=>{throw console['error'](_0x1ebe89),new _0x11a517('commentsrepository-remove-comment-thread-internal-error',this);});}_updateCommentThread({threadId:_0x595025,unlinkedAt:_0x5da900,context:_0x22ad5a,attributes:_0x44ae5e,isFromAdapter:_0x261236}){if('string'!=typeof _0x595025)throw new _0x11a517('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x595025});if(!this['hasCommentThread'](_0x595025))throw new _0x11a517('commentsrepository-missing-comment-thread',null,{'threadId':_0x595025});const _0x3c7e70=this['getCommentThread'](_0x595025);let _0x5d09be=!0x1;if(void 0x0!==_0x22ad5a&&_0x3c7e70['context']!==_0x22ad5a&&(_0x3c7e70['context']=_0x22ad5a,_0x5d09be=!0x0),void 0x0!==_0x5da900&&_0x3c7e70['unlinkedAt']!==_0x5da900&&(_0x3c7e70['unlinkedAt']=_0x5da900,_0x5d09be=!0x0),_0x44ae5e&&!_0x1fd42a(_0x44ae5e,_0x3c7e70['attributes'])&&(_0x3c7e70['attributes']=_0x44ae5e,_0x5d09be=!0x0),!_0x5d09be)return Promise['resolve']();if(!_0x3c7e70['isSubmitted']||_0x261236||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x419355=this['context']['plugins']['get']('PendingActions'),{channelId:_0x25e601}=_0x3c7e70,_0x4abd3f=_0x419355['add'](St(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x25e601,'threadId':_0x595025,'context':_0x22ad5a,'unlinkedAt':_0x5da900,'attributes':_0x44ae5e})['then'](()=>_0x419355['remove'](_0x4abd3f))['catch'](_0x3f881e=>{throw console['error'](_0x3f881e),new _0x11a517('commentsrepository-update-comment-thread-internal-error',this);});}_detachCommentThread(_0x4579c1){const _0x49adfe=this['context']['plugins']['get'](ae),_0x57a509=this['getCommentThread'](_0x4579c1);if(_0x57a509['_isAttached']=!0x1,this['_threadToController']['has'](_0x57a509)){const _0x524960=this['_threadToController']['get'](_0x57a509),_0x22e196=_0x524960['view'],_0x192ee6=_0x49adfe['getByInnerView'](_0x22e196);this['_threadToController']['delete'](_0x57a509),this['_viewToController']['delete'](_0x22e196),_0x192ee6&&_0x49adfe['remove'](_0x192ee6),_0x524960['destroy'](),_0x22e196['destroy']()['then'](()=>{this['_unbindEditors'](_0x22e196);});}}_updateActiveAnnotation({threadId:_0x340a7b,resolvedAt:_0x476f8c,unlinkedAt:_0x265d64}){const _0x554f4c=!!_0x476f8c,_0xb937bc=this['context']['plugins']['get'](ae),_0x47c638=this['getCommentThread'](_0x340a7b);if(this['_threadToController']['has'](_0x47c638)){const _0x2527f4=this['_threadToController']['get'](_0x47c638)['view'],_0x2042b8=_0xb937bc['getByInnerView'](_0x2527f4);_0x2042b8&&(_0x554f4c&&_0xb937bc['_removeActiveAnnotation'](_0x2042b8),_0x265d64?_0x2042b8['isVisible']=!0x1:_0x2042b8['refreshVisibility']());}}_getExternalAuthor(_0x1954eb){const _0x3269a3=this['context']['plugins']['get'](_0x18879d),_0x12e557=_0x5d87b6('external:'+_0x1954eb),_0x4c0191=_0x3269a3['getUser'](_0x12e557);return _0x4c0191||_0x3269a3['addUser']({'id':_0x12e557,'name':_0x1954eb});}_createNewComment({threadId:_0x290a34,commentId:_0xb3bdc1=_0x3edcb5(),content:_0x1eb248,authorId:_0x50d2f7,createdAt:_0xe07f6,attributes:_0x567fe6}){if('string'!=typeof _0xb3bdc1)throw new _0x11a517('commentsrepository-invalid-commentid');if('string'!=typeof _0x50d2f7)throw new _0x11a517('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x1eb248||!_0x1eb248['trim']())throw new _0x11a517('commentsrepository-invalid-comment-content');const _0x1cb388=this['context']['plugins']['get'](_0x18879d)['getUser'](_0x50d2f7);if(!_0x1cb388)throw new _0x11a517('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x50d2f7});let _0x5b0ea7=null,_0x2f9893=_0xe07f6;return _0x567fe6?.['@external']&&(_0x5b0ea7=this['_getExternalAuthor'](_0x567fe6['@external']['authorName']),_0x2f9893=new Date(_0x567fe6['@external']['createdAt'])),new pe(this,{'threadId':_0x290a34,'id':_0xb3bdc1,'author':_0x5b0ea7||_0x1cb388,'creator':_0x1cb388,'content':_0x1eb248,'createdAt':_0xe07f6,'authoredAt':_0x2f9893,'attributes':_0x567fe6});}_addComment(_0x13acbb){let {threadId:_0x1c19d1,content:_0x1e194,attributes:_0x3d9e62,isFromAdapter:_0x40ea02}=_0x13acbb;const _0x21b2ac=this['getCommentThread'](_0x13acbb['threadId']);if(!_0x21b2ac)throw new _0x11a517('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x1bfad9=this['_createNewComment'](_0x13acbb),{id:_0x5186a9}=_0x1bfad9;if(_0x21b2ac['_add'](_0x1bfad9),_0x40ea02||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x21b2ac['isSubmitted'])return Promise['resolve']();const _0x5ac923=this['context']['plugins']['get']('PendingActions'),{channelId:_0x42c214}=_0x21b2ac,_0x18ded2=_0x5ac923['add'](St(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x3d9e62||(_0x3d9e62={}),this['adapter']['addComment']({'channelId':_0x42c214,'threadId':_0x1c19d1,'commentId':_0x5186a9,'content':_0x1e194,'attributes':_0x3d9e62})['then'](_0x2c29fc=>{_0x5ac923['remove'](_0x18ded2),_0x2c29fc&&this['_updateComment']({'channelId':_0x42c214,'threadId':_0x1c19d1,'commentId':_0x5186a9,'createdAt':_0x2c29fc['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4bd53a=>{throw console['error'](_0x4bd53a),new _0x11a517('commentsrepository-add-comment-internal-error',this);});}_updateComment({threadId:_0xadb90b,commentId:_0x56783c,content:_0x2a1fe6,createdAt:_0x15646,attributes:_0x5819f5,isFromAdapter:_0x1baa79}){if(void 0x0!==_0x2a1fe6&&('string'!=typeof _0x2a1fe6||!_0x2a1fe6['trim']()['length']))throw new _0x11a517('commentsrepository-update-comment-invalid-content');const _0x110236=this['getCommentThread'](_0xadb90b),_0x5e5b5f=_0x110236['getComment'](_0x56783c);if(!_0x5e5b5f)throw new _0x11a517('commentsrepository-update-missing-comment',this);let _0x33d107=!0x1;if(_0x2a1fe6&&_0x2a1fe6!==_0x5e5b5f['content']&&(_0x5e5b5f['isEditable']||_0x1baa79)&&(_0x5e5b5f['content']=_0x2a1fe6,_0x33d107=!0x0),_0x15646&&_0x15646!==_0x5e5b5f['createdAt']&&(_0x5e5b5f['createdAt']=_0x15646,_0x5e5b5f['isExternal']||(_0x5e5b5f['authoredAt']=_0x15646),_0x33d107=!0x0),_0x5819f5&&!_0x1fd42a(_0x5819f5,_0x5e5b5f['attributes'])&&(_0x5e5b5f['attributes']=_0x5819f5,_0x33d107=!0x0),!_0x33d107)return Promise['resolve']();if(_0x110236['fire']('commentUpdated'),_0x1baa79||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x509c38=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3eac2f}=this['getCommentThread'](_0x5e5b5f['threadId']),_0x3e0e13=_0x509c38['add'](St(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x3eac2f,'threadId':_0xadb90b,'commentId':_0x56783c,'content':_0x2a1fe6,'attributes':_0x5819f5})['then'](()=>_0x509c38['remove'](_0x3e0e13))['catch'](_0x31b932=>{throw console['error'](_0x31b932),new _0x11a517('commentsrepository-update-comment-internal-error',this);});}_removeComment({threadId:_0x3d2d0f,commentId:_0x1dcf42,isFromAdapter:_0x285c0a}){const _0x47cad2=this['getCommentThread'](_0x3d2d0f),_0x3583ba=_0x47cad2['getComment'](_0x1dcf42);if(!_0x3583ba)throw new _0x11a517('commentsrepository-remove-missing-comment',this);if(_0x47cad2['_remove'](_0x3583ba),_0x285c0a||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x11c85f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x53200f}=_0x47cad2,_0x550716=_0x11c85f['add'](St(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x53200f,'threadId':_0x3d2d0f,'commentId':_0x1dcf42})['then'](()=>_0x11c85f['remove'](_0x550716))['catch'](_0x4997c7=>{throw console['error'](_0x4997c7),new _0x11a517('commentsrepository-remove-comment-internal-error',this);});}},fe=class extends le{['channelId'];['id'];_isAttached;_isSubmitted;comments;_repository;constructor(_0x434a95,_0x11f8cf){super();const _0x2cd1c5=_0x11f8cf['isResolvable'];this['channelId']=_0x11f8cf['channelId'],this['id']=_0x11f8cf['id'],this['comments']=new _0x5d3b53(),this['_repository']=_0x434a95,this['_isAttached']=!0x1,this['_isSubmitted']=_0x11f8cf['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x434a95,'_permissions',_0x434a95,'_readOnlyChannels',()=>_0x434a95['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x434a95,'_permissions',()=>_0x434a95['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x434a95,'_permissions',()=>{const _0x1af5b1=_0x434a95['getPermissions'](this['channelId']);return _0x1af5b1['write']||_0x1af5b1['admin'];}),this['bind']('isResolvable')['to'](_0x434a95,'_permissions',()=>_0x2cd1c5&&_0x434a95['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x11f8cf['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x2b4c45,_0x4edeff)=>_0x2b4c45?_0x4edeff?_0x2b4c45<_0x4edeff?_0x2b4c45:_0x4edeff:_0x2b4c45:_0x4edeff),this['set']('unlinkedAt',_0x11f8cf['unlinkedAt']||null),this['set']('resolvedAt',_0x11f8cf['resolvedAt']||null),this['set']('resolvedBy',_0x11f8cf['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x3c5194=>!!_0x3c5194),this['set']('attributes',_0x11f8cf['attributes']||{});}get weight(){return Array['from'](this['comments'])['reduce']((_0x40b568,_0xdfdde4)=>_0x40b568+_0xdfdde4['weight'],0x0);}get length(){return this['comments']['length'];}get isAttached(){return this['_isAttached'];}get isSubmitted(){return this['_isSubmitted'];}submit(){const {channelId:_0x4f2be4,id:_0x4be4f8}=this;this['_repository']['fire'](we('submitCommentThread',_0x4f2be4),{'channelId':_0x4f2be4,'threadId':_0x4be4f8});}setUnlinkedAt(_0x36abeb){this['_update']({'unlinkedAt':_0x36abeb});}['resolve']({resolvedAt:_0x3e9c3f=new Date(),resolvedBy:_0x17caf7='',isFromAdapter:_0x198eeb=!0x1}={}){const _0x3331a0=this['_repository']['context']['plugins']['get'](_0x18879d)['me'],{channelId:_0x1f9dd7,id:_0x2329b5}=this;this['_repository']['fire'](we('resolveCommentThread',_0x1f9dd7),{'channelId':_0x1f9dd7,'threadId':_0x2329b5,'resolvedAt':_0x3e9c3f,'resolvedBy':_0x17caf7||_0x3331a0['id'],'isFromAdapter':_0x198eeb});}['reopen']({isFromAdapter:_0x5a0abd=!0x1}={}){const {channelId:_0x56a883,id:_0xadff3f}=this;this['_repository']['fire'](we('reopenCommentThread',_0x56a883),{'channelId':_0x56a883,'threadId':_0xadff3f,'isFromAdapter':_0x5a0abd});}setContext(_0x2e77ac){this['context']||this['_update']({'context':_0x2e77ac});}setAttribute(_0x2ccbef,_0xc9ff1c){const _0x47814a=_0x35446b(this['attributes']);_0x5c8642(_0x47814a,_0x2ccbef,_0xc9ff1c),this['_update']({'attributes':_0x47814a});}removeAttribute(_0x5cafb8){const _0x3b755c=_0x35446b(this['attributes']);_0x2c0b06(_0x3b755c,_0x5cafb8),this['_update']({'attributes':_0x3b755c});}['remove']({isFromAdapter:_0x3a3e3a=!0x1}={}){const {channelId:_0x56b3f8,id:_0x2152e5}=this;this['_repository']['fire'](we('removeCommentThread',_0x56b3f8),{'channelId':_0x56b3f8,'threadId':_0x2152e5,'isFromAdapter':_0x3a3e3a});}attachTo(_0x2ce129){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x2ce129});}addComment(_0x11a527){const {channelId:_0x9ed641,id:_0x29f96a}=this;this['_repository']['fire'](we('addComment',_0x9ed641,_0x29f96a),Object['assign']({'channelId':_0x9ed641,'threadId':_0x29f96a},_0x11a527));}getComment(_0x258d93){if('string'!=typeof _0x258d93)throw new _0x11a517('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x258d93});return this['comments']['get'](_0x258d93);}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'](_0x510711=>_0x510711['toJSON']()),'attributes':this['attributes']};}['_add'](_0x1c7698){return this['listenTo'](_0x1c7698,'change:authoredAt',()=>{const _0x1d76e5=this['_findOptimalIndex'](_0x1c7698),_0x11d179=this['comments'];_0x1d76e5-0x1!=_0x11d179['getIndex'](_0x1c7698)&&_0x1d76e5+0x1!=_0x11d179['getIndex'](_0x1c7698)&&(this['_remove'](_0x1c7698),this['_add'](_0x1c7698));}),this['comments']['add'](_0x1c7698,this['_findOptimalIndex'](_0x1c7698));}_update(_0x3219fa){const {channelId:_0x18a6ea,id:_0x75b0de}=this;this['_repository']['fire'](we('updateCommentThread',_0x18a6ea),{..._0x3219fa,'channelId':_0x18a6ea,'threadId':_0x75b0de});}['_remove'](_0x2bafd1){return this['stopListening'](_0x2bafd1),_0x2bafd1['destroy'](),this['comments']['remove'](_0x2bafd1);}_findOptimalIndex(_0x22c3cf){const _0x90ccf4=this['comments']['find'](_0x17f182=>new Date(_0x17f182['authoredAt'])['getTime']()>new Date(_0x22c3cf['authoredAt'])['getTime']());return _0x90ccf4?this['comments']['getIndex'](_0x90ccf4):this['length'];}},pe=class extends me{['id'];threadId;author;creator;createdAt;_repository;constructor(_0x1321ba,_0x4e6a5b){super();const _0x16b467=_0x1321ba['context']['plugins']['get'](_0x18879d)['me'],_0x45ad29=_0x1321ba['getCommentThread'](_0x4e6a5b['threadId']),_0x1ebc85=0x0===_0x45ad29['comments']['length'],_0x185109=_0x16b467===_0x4e6a5b['author'];this['id']=_0x4e6a5b['id'],this['threadId']=_0x4e6a5b['threadId'],this['author']=_0x4e6a5b['author'],this['creator']=_0x4e6a5b['creator'],this['set']('content',_0x4e6a5b['content']),this['createdAt']=_0x4e6a5b['createdAt']||new Date(),this['set']('authoredAt',_0x4e6a5b['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x45ad29,'resolvedAt'),this['set']('attributes',_0x4e6a5b['attributes']||{}),this['bind']('isEditable')['to'](_0x1321ba,'_permissions',()=>{const _0x36edda=_0x1321ba['getPermissions'](_0x45ad29['channelId'])['write'],_0x57ece8=_0x1321ba['getPermissions'](_0x45ad29['channelId'])['modifyAll'];return _0x185109&&_0x36edda||!_0x185109&&_0x57ece8;}),this['bind']('isRemovable')['to'](_0x45ad29,'isRemovable',_0x1321ba,'_permissions',_0x1ce613=>{const _0x40fb8b=_0x1321ba['getPermissions'](_0x45ad29['channelId'])['write'],_0x37c000=_0x1321ba['getPermissions'](_0x45ad29['channelId'])['modifyAll'];return _0x185109&&_0x40fb8b||_0x1ce613&&_0x1ebc85||!_0x185109&&_0x37c000&&!_0x1ebc85;}),this['bind']('isReadOnly')['to'](_0x45ad29,'isReadOnly'),this['_repository']=_0x1321ba;}get isExternal(){return Boolean(this['attributes']&&this['attributes']['@external']);}get weight(){return Math['max'](function(_0x109ea2){const _0x6b9044=document['createElement']('div');return _0x6b9044['innerHTML']=_0x4f9e71(_0x109ea2),_0x6b9044['textContent']['length'];}(this['content']),0xc8);}update(_0x400869){const {threadId:_0x427101,id:_0xd497bb}=this;if(!this['_repository']['hasCommentThread'](_0x427101))throw new _0x11a517('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x26812b}=this['_repository']['getCommentThread'](_0x427101);this['_repository']['fire'](we('updateComment',_0x26812b,_0x427101),{'channelId':_0x26812b,'threadId':_0x427101,'commentId':_0xd497bb,..._0x400869});}setAttribute(_0x2f7375,_0x4bb80b){const _0x55536a=_0x35446b(this['attributes']);_0x5c8642(_0x55536a,_0x2f7375,_0x4bb80b),this['update']({'attributes':_0x55536a});}removeAttribute(_0x5d9ffd){const _0x5a1178=_0x35446b(this['attributes']);_0x2c0b06(_0x5a1178,_0x5d9ffd),this['update']({'attributes':_0x5a1178});}['remove'](_0x58dffe={}){if(!_0x58dffe['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x31ca25,id:_0xa8851e}=this;if(!this['_repository']['hasCommentThread'](_0x31ca25))throw new _0x11a517('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x1f4eb4}=this['_repository']['getCommentThread'](_0x31ca25);this['_repository']['fire'](we('removeComment',_0x1f4eb4,_0x31ca25),{'channelId':_0x1f4eb4,'threadId':_0x31ca25,'commentId':_0xa8851e,..._0x58dffe});}toJSON(){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}destroy(){this['stopListening']();}};function we(_0x260b86,..._0x26d608){for(const _0x289066 of _0x26d608)void 0x0!==_0x289066&&(_0x260b86+=':'+String(_0x289066));return _0x260b86;}var ge=class extends _0x656305{constructor(_0x543a9c){super(_0x543a9c),this['set']('hasContent',!0x1);}['refresh'](){const _0x27a23d=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x1c2069 of _0x27a23d['getRanges']())if(this['_hasContent'](_0x1c2069))return void(this['hasContent']=!0x0);}execute({threadId:_0x5c013a=_0x3edcb5(),ranges:_0x59f38d,comment:_0x58a9a5}={}){const _0x3ae535=this['editor']['model'],_0x5a938e=_0x59f38d??Array['from'](_0x3ae535['document']['selection']['getRanges']()),_0x4653ef=[];for(const _0x4407f2 of _0x5a938e)this['_hasContent'](_0x4407f2)&&_0x4653ef['push'](this['_trimToContent'](_0x4407f2));if(!_0x4653ef['length'])throw new _0x11a517('addcommentthreadcommand-incorrect-ranges',null);_0x58a9a5&&this['_createCommentThread'](_0x5c013a,_0x58a9a5),this['_createMarkersFromRanges'](_0x5c013a,_0x4653ef,!!_0x58a9a5);}_createMarkersFromRanges(_0x2c074c,_0x43a3e5,_0x23b788){this['editor']['model']['change'](_0x390e03=>{for(const _0x4e3840 of _0x43a3e5){const _0x30c584='comment:'+_0x2c074c+':'+_0x3edcb5()['substr'](0x1,0x5);_0x390e03['addMarker'](_0x30c584,{'range':_0x4e3840,'usingOperation':_0x23b788,'affectsData':_0x23b788});}});}_createCommentThread(_0x3480c2,_0xe4a308){const _0x90808e=this['editor']['plugins']['get']('CommentsRepository'),_0xf74a4b=this['editor']['config']['get']('collaboration.channelId'),_0x5e96f9=this['editor']['plugins']['get']('Users')['me'];if(!_0x5e96f9)throw new _0x11a517('addcommentthreadcommand-user-not-found',null);_0x90808e['addCommentThread']({'threadId':_0x3480c2,'channelId':_0xf74a4b,'comments':[{'authorId':_0x5e96f9['id'],'content':_0xe4a308,'createdAt':new Date(),'attributes':{}}]});}_hasContent(_0x23856){for(const _0x5ecbb8 of _0x23856['getItems']())if(this['_itemIsContent'](_0x5ecbb8))return!0x0;return!0x1;}_itemIsContent(_0x3c73ce){return _0x3c73ce['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x3c73ce)&&!_0x3c73ce['is']('element','tableCell');}_trimToContent(_0x4e3f16){const _0x5456c0=_0x3ed276=>!this['_itemIsContent'](_0x3ed276['item']),_0x1adaf9=_0x4e3f16['start']['getLastMatchingPosition'](_0x5456c0),_0x428dd9=_0x4e3f16['end']['getLastMatchingPosition'](_0x5456c0,{'direction':'backward'});return this['editor']['model']['createRange'](_0x1adaf9,_0x428dd9);}},_e=class extends _0x3e22c6{_dataCollectors;_editorAnnotations;static get requires(){return[ae];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x975d1c){super(_0x975d1c),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}init(){const _0x294be4=this['editor'],_0x38aec1=_0x294be4['model']['document']['selection'],_0x4a415a=_0x48da56(()=>this['refreshSelectedViews'](),0xa);_0x38aec1['on']('change:range',(_0x5b78fc,_0x37856a)=>{_0x37856a['directChange']&&(_0x4a415a['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x294be4['editing']['view']['document'],'change:isFocused',(_0x5b7fc3,_0x351240,_0x3141c5)=>{_0x3141c5&&_0x4a415a();}),this['listenTo'](_0x294be4['ui']['focusTracker'],'change:isFocused',(_0x14dcba,_0x30c85a,_0xa6024e)=>{_0xa6024e||this['fire']('blur',{'isAnnotationTracked':_0x37cd8e=>this['_editorAnnotationsData']['has'](_0x37cd8e['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}registerAnnotation(_0x311d04){if(this['_editorAnnotations']['has'](_0x311d04['view']))return;this['_editorAnnotations']['add'](_0x311d04['view']),this['editor']['ui']['focusTracker']['add'](_0x311d04['view']['element']);const _0x50007c=this['editor']['plugins']['get'](ae);this['listenTo'](_0x50007c['collection'],'remove',(_0x5b3325,_0x1fcba4)=>{this['editor']['ui']['focusTracker']['remove'](_0x1fcba4['view']['element']),this['_editorAnnotations']['delete'](_0x1fcba4['view']);});}hasDomSelection(){return this['editor']['editing']['view']['hasDomSelection'];}addSourceCollector(_0x36e85c){if('function'!=typeof _0x36e85c)throw new _0x11a517('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x36e85c);}refreshSelectedViews(){this['fire']('refresh');}getOrderedSelectedAnnotations({activeAnnotation:_0x55e0fd,annotations:_0x2d5e29}){const _0x3beb95=[],_0x35107a=this['editor']['model']['document']['selection'],_0x32d313=Array['from'](_0x35107a['getRanges']());for(const [_0x48f371,_0x45d324]of this['_editorAnnotationsData']){const _0x342c9d=_0x116b58(_0x45d324),_0x2b3ba9=_0x2d5e29['getByInnerView'](_0x48f371);_0x342c9d&&_0x2b3ba9&&_0x3beb95['push']({'annotation':_0x2b3ba9,'range':_0x342c9d});}function _0x116b58(_0x504287){for(const _0x50ee58 of _0x504287)for(const _0x571264 of _0x32d313)if(_0x50ee58['containsRange'](_0x571264,!_0x35107a['isCollapsed']))return _0x50ee58;return null;}const _0x1c60ea=new Map(Array['from'](_0x2d5e29,(_0x360413,_0x3d5819)=>[_0x360413,_0x3d5819]));return _0x3beb95['sort']((_0x1f6996,_0x52f843)=>{const _0x524098=_0x1f6996['range'],_0x5a843a=_0x52f843['range'];if(!_0x524098['start']['isTouching'](_0x5a843a['start'])||!_0x524098['end']['isTouching'](_0x5a843a['end'])){if(_0x524098['containsRange'](_0x5a843a,!0x0))return 0x1;if(_0x5a843a['containsRange'](_0x524098,!0x0))return-0x1;}return _0x1f6996['annotation']==_0x55e0fd?-0x1:_0x52f843['annotation']==_0x55e0fd?0x1:(_0x1c60ea['get'](_0x1f6996['annotation'])??0x0)-(_0x1c60ea['get'](_0x52f843['annotation'])??0x0);})['map'](_0x4a9297=>_0x4a9297['annotation']);}get _editorAnnotationsData(){const _0x1ecc13=new Map();for(const _0x42192b of Array['from'](this['_dataCollectors']))for(const [_0x11dafe,_0x28685c]of _0x42192b())_0x1ecc13['set'](_0x11dafe,_0x28685c);return _0x1ecc13;}},Ae=class extends _0x3e22c6{afterInit(){const _0x429bc8=this['editor'];_0x429bc8['plugins']['has']('RestrictedEditingModeEditing')&&_0x429bc8['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},ve=class extends _0x3e22c6{constructor(_0x3e94c3){super(_0x3e94c3),this['editor']['config']['define']('importWord.formatting.comments','basic');}afterInit(){const _0x5bb1a7=this['editor'],_0x1863c7=_0x5bb1a7['commands']['get']('importWord'),_0x43b510=_0x5bb1a7['plugins']['get'](_0x18879d);_0x1863c7&&(_0x1863c7['on']('execute',(_0x4802dc,[,_0x358f81])=>{_0x358f81['collaboration_features']={'comments':!0x0,'user_id':_0x43b510['me']['id']};},{'priority':_0x231137['high']+0xa}),this['listenTo'](_0x1863c7,'dataInsert',this['_handleImportedData']));}_handleImportedData(_0x464dc3,_0x3239f2){const {comment_threads:_0x31990c}=_0x3239f2;_0x31990c&&_0x31990c['forEach'](({thread_id:_0x23e7d2,comments:_0x4425ce,is_resolved:_0xc4fae5})=>{const _0x267f92=new Date(),_0x23542e=_0x4425ce['map'](({author:_0x1f7c3f,content:_0x2cb4cd,created_at:_0x56d256})=>({'content':_0x2cb4cd,'authorId':this['editor']['plugins']['get'](_0x18879d)['me']['id'],'createdAt':_0x267f92,'attributes':{'@external':{'authorName':_0x1f7c3f,'createdAt':_0x56d256?new Date(_0x56d256):new Date(),'source':'importWord'}}})),_0x45fae3=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](ue)['addCommentThread']({'channelId':_0x45fae3,'threadId':_0x23e7d2,'comments':_0x23542e,'resolvedAt':_0xc4fae5?_0x267f92:null});});}},ye=class extends _0x3e22c6{constructor(_0xfa6a6a){super(_0xfa6a6a),this['editor']['config']['define']('comments.copyMarkers','default');}static get requires(){return[Ct,Tt];}afterInit(){const _0xf2bb4a=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0xf2bb4a,'contentInsertion',(_0x161686,_0x4729fe)=>this['_removeMarkersWithoutThreads'](_0x4729fe['content']['markers']),{'priority':'highest'});}_removeMarkersWithoutThreads(_0x42d97){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x42d97;const _0x56e354=this['editor']['plugins']['get']('CommentsRepository');for(const _0x40c5b6 of _0x42d97['keys']()){const [_0x55cfeb,_0x105e56]=_0x40c5b6['split'](':');'comment'!=_0x55cfeb||_0x56e354['hasCommentThread'](_0x105e56)||_0x42d97['delete'](_0x40c5b6);}return _0x42d97;}_registerMarkerInClipboardPipeline(){const _0x924826=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x1f9804=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x1f9804&&_0x924826['_registerMarkerToCopy']('comment',_0x1f9804);}_mapCommentsCopyConfigToRegisterConfiguration(_0x33d2a7){switch(_0x33d2a7){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function Ce(_0x140b36){const _0x1d23fd=_0x140b36['split'](':');return{'group':_0x1d23fd[0x0],'id':_0x1d23fd[0x1],'part':_0x1d23fd[0x2]};}var Te=class extends _0x3e22c6{init(){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}overrideMarkerConverters(){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x5c732d,_0x37d4f7)=>{if(!_0x37d4f7['options']['showCommentHighlights'])return null;if(_0x37d4f7['options']['ignoreResolvedComments']){const {id:_0x5bf4f4}=Ce(_0x5c732d['markerName']);if(this['editor']['plugins']['get'](ue)['getCommentThread'](_0x5bf4f4)?.['isResolved']&&_0x5c732d['item'])return _0x37d4f7['consumable']['consume'](_0x5c732d['item'],'addMarker:'+_0x5c732d['markerName']),_0x37d4f7['consumable']['consume'](_0x5c732d['item'],'removeMarker:'+_0x5c732d['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x221eb7=>{_0x221eb7['on']('addMarker:comment',(_0x496571,_0x538902,_0x52c15c)=>{if(!_0x52c15c['options']['showCommentHighlights'])return;const _0x4ef2cb=_0x538902['item'];if(!_0x4ef2cb)return;const _0x4d0f23=_0x52c15c['mapper']['toViewElement'](_0x4ef2cb);this['editor']['model']['schema']['isObject'](_0x4ef2cb)&&_0x4d0f23&&!_0x4d0f23['getCustomProperty']('widget')&&_0x4d0f23['is']('containerElement')&&Mt(_0x4d0f23,_0x52c15c['writer']);},{'priority':'high'});});}overrideHorizontalRuleConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x1e3ba5,{writer:_0x12fb10,options:_0xb513de})=>{if(!_0xb513de['showCommentHighlights'])return null;const _0x47cf01=_0x12fb10['createContainerElement']('div'),_0x2ef10f=_0x12fb10['createEmptyElement']('hr');return _0x12fb10['addClass']('ck-horizontal-line',_0x47cf01),_0x12fb10['insert'](_0x12fb10['createPositionAt'](_0x47cf01,0x0),_0x2ef10f),_0x47cf01;},'converterPriority':'high'});}overrideImageInlineConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x5607ff,{writer:_0x2e8d86,options:_0xfd5c01})=>{if(!_0xfd5c01['showCommentHighlights'])return null;const _0x28409e=_0x2e8d86['createContainerElement']('span'),_0x18c1fc=_0x2e8d86['createEmptyElement']('img');return _0x2e8d86['addClass']('image-inline',_0x28409e),_0x2e8d86['insert'](_0x2e8d86['createPositionAt'](_0x28409e,0x0),_0x18c1fc),_0x28409e;},'converterPriority':'high'});}overrideMediaEmbedConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x4080b2,{writer:_0x41187e,options:_0x5b58e9})=>{if(_0x5b58e9['showCommentHighlights'])return _0x41187e['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x4e640f,_0x19e86b,_0x1cd858)=>{_0x1cd858['options']['showCommentHighlights']&&_0x4e640f['stop']();},{'priority':'high'});}},Ie=class extends _0x3e22c6{static get requires(){return[ue,_e,_0x18879d,Ae,ve,ye,Te];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1cd7c0){super(_0x1cd7c0),this['set']('isThreadsLoadingPaused',!0x0),_0x1cd7c0['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0xebb6a0,_0x17aba5,_0x5e9de3,_0x255f3b)=>{const _0x194b2b=_0x1cd7c0['plugins']['get'](ue),_0x339547=_0x5e9de3?Ce(_0x5e9de3)['id']:null;_0x1cd7c0['model']['change'](()=>{if(_0x339547){const _0x224ebf=this['getAllMarkersForId'](_0x339547);for(const _0x2e079d of _0x224ebf)_0x1cd7c0['editing']['reconvertMarker'](_0x2e079d);}if(_0x255f3b){const {id:_0x1e69e0}=Ce(_0x255f3b),_0x24f7c4=_0x194b2b['getCommentThread'](_0x1e69e0);if(_0x24f7c4&&_0x24f7c4['unlinkedAt'])return;if(_0x24f7c4&&!_0x24f7c4['isAttached'])return;const _0x283ea7=this['getAllMarkersForId'](_0x1e69e0);for(const _0x7d619d of _0x283ea7)_0x1cd7c0['editing']['reconvertMarker'](_0x7d619d);}}),_0x339547&&this['scrollToThreadMarker'](_0x339547);}),this['_initAriaMarkerChangeAnnouncements']();}init(){const _0xc771cd=this['editor'],_0x4911f6=_0xc771cd['plugins']['get'](ue),_0x1d8d71=_0xc771cd['config']['get']('collaboration.channelId'),_0x425bf7=_0x4911f6['getCommentThreads']()['filter'](_0x14ea6e=>_0x14ea6e['channelId']!==_0x1d8d71);_0xc771cd['commands']['add']('addCommentThread',new ge(_0xc771cd)),this['listenTo'](_0xc771cd,'change:isReadOnly',(_0x21bf38,_0x41396e,_0x4d4da7)=>{_0x4911f6['switchReadOnly'](_0x4d4da7,_0xc771cd['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x4911f6,be('addCommentThread',_0x1d8d71),(_0xef329e,{threadId:_0x148fa1})=>{this['editor']['plugins']['get'](ue)['getCommentThread'](_0x148fa1)?.['unlinkedAt']&&this['_attachArchivedThread'](_0x148fa1);}),this['listenTo'](_0x4911f6,be('removeCommentThread',_0x1d8d71),(_0x4cf6a6,{threadId:_0x2231e6})=>{_0xc771cd['model']['enqueueChange']({'isUndoable':!0x1},_0x5c178a=>{const _0x289c22=this['getAllMarkersForId'](_0x2231e6);for(const _0x5b8b9a of _0x289c22)_0x5c178a['removeMarker'](_0x5b8b9a);});}),this['listenTo'](_0x4911f6,be('resolveCommentThread',_0x1d8d71),(_0x11220c,{threadId:_0x276e12})=>{this['_reconvertMarkers'](_0x276e12);const _0xd3ba4a=this['editor']['plugins']['get'](ae);(this['editor']['editing']['view']['hasDomSelection']||_0xd3ba4a['collection']['isFocused'])&&(this['editor']['plugins']['get'](ue)['getCommentThread'](_0x276e12)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x4911f6,be('reopenCommentThread',_0x1d8d71),(_0x2e2ece,{threadId:_0x2ca02e})=>{this['_reconvertMarkers'](_0x2ca02e);},{'priority':'low'}),this['listenTo'](_0x4911f6,be('addComment',_0x1d8d71),(_0x300ef6,{threadId:_0x2fe916,isFromAdapter:_0x5d8c2a})=>{const _0x1f1c95=this['getAllMarkersForId'](_0x2fe916);!_0x5d8c2a&&0x0!=_0x1f1c95['length']&&_0x4911f6['hasCommentThread'](_0x2fe916)&&0x1===_0x4911f6['getCommentThread'](_0x2fe916)['length']&&_0xc771cd['model']['enqueueChange']({'isUndoable':!0x1},_0x51ba2b=>{for(const _0x36352a of _0x1f1c95)_0x51ba2b['updateMarker'](_0x36352a,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x425bf7);}afterInit(){!async function(_0x25fa51){const _0x336846='mr4z2yakM3x0phtD7jBw1T6qRfeUuZcOLNKVgQSPE9iGIHoXlJW8YsCb5AndFv',_0x59a3df=0x797a0,_0xca3f40={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x1b8aaf(_0x51c38c){const _0x3f4e44=new window['Promise'](_0x55a8d6=>{_0x51c38c['once']('ready',_0x55a8d6);}),_0x2b648b=window['Date']['now'](),_0x228aeb=_0x51c38c['config']['get']('licenseKey');async function _0x38566d(){let _0x46b76f,_0x3d2fb4=null,_0x3bebff=null;try{return'GPL'==_0x228aeb?'NotAllowed':(_0x46b76f=_0x48cd36(),_0x46b76f?(_0x46b76f['usageEndpoint']&&(_0x3bebff=_0x223c02(_0x46b76f['usageEndpoint'],_0x46b76f['jti'])),await _0x2e352f()?_0xc4b3ca()?_0x142908()?'Expired':_0x52e496()?('evaluation'==_0x46b76f['licenseType']&&(_0x3d2fb4=_0x3f1a7f('EvaluationLimit')),await _0x176101()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x142908(){const _0x6e371=['evaluation','trial']['includes'](_0x46b76f['licenseType'])?_0x2b648b/0x3e8:0xe10*_0x59a3df;return _0x46b76f['exp']<_0x6e371;}function _0xc4b3ca(){const _0x40e1a9=_0x46b76f['features'];if(!_0x40e1a9)return!0x1;if(_0x40e1a9['includes']('*'))return!0x0;if(_0x40e1a9['includes']('CMT'))return!0x0;if(_0x40e1a9['includes']('TRILIUM')&&_0x759dde())return!0x0;if(_0x40e1a9['includes']('RCMT')){if(_0x337a5b())return!0x0;if(_0x4d2a1c()||_0x2ea7d3())return!0x0;}return!0x1;}function _0x52e496(){const _0x2ffa6f=_0x46b76f['licensedHosts'];if(!_0x2ffa6f||0x0==_0x2ffa6f['length'])return!0x0;const {hostname:_0x41767b}=new URL(window['location']['href']);if(_0x2ffa6f['includes'](_0x41767b))return!0x0;const _0x201b32=_0x41767b['split']('.');return _0x2ffa6f['filter'](_0x45cd66=>_0x45cd66['includes']('*'))['map'](_0x15c69b=>_0x15c69b['split']('.'))['filter'](_0x389c55=>_0x389c55['length']<=_0x201b32['length'])['map'](_0x3d74ba=>Array(_0x201b32['length']-_0x3d74ba['length'])['fill']('*'===_0x3d74ba[0x0]?'*':'')['concat'](_0x3d74ba))['some'](_0x55d82d=>_0x201b32['every']((_0x128ecb,_0x1db2c9)=>_0x55d82d[_0x1db2c9]===_0x128ecb||'*'===_0x55d82d[_0x1db2c9]));}function _0x176101(){return _0x3d2fb4&&_0x3bebff?new window['Promise']((_0x346b80,_0x2edf1e)=>{_0x3d2fb4['then'](_0x346b80,_0x2edf1e),_0x3bebff['then'](_0x4c6261=>{'Valid'!=_0x4c6261&&_0x346b80(_0x4c6261);},_0x2edf1e);}):_0x3d2fb4||_0x3bebff||'Valid';}}function _0x223c02(_0x267742,_0x243a4a){return new window['Promise'](_0x142f46=>{if(_0xd3eea7())return _0x142f46('Valid');_0x38904a(),_0x51c38c['decorate']('_sendUsageRequest');let _0xf3ae1a=!0x1;const _0x2b7b8a=_0x3edcb5();function _0x2eb652(_0x1766f8){return!!_0x1766f8&&('object'==typeof _0x1766f8||'function'==typeof _0x1766f8)&&'function'==typeof _0x1766f8['then']&&'function'==typeof _0x1766f8['catch'];}function _0x1770b8(_0x25648f){_0x49897a(_0x25648f)['then'](_0x4731bf=>_0x4731bf&&'ok'==_0x4731bf['status']?_0x1a8ff1(_0x26cc53(_0x2b7b8a+_0x243a4a))!=_0x4731bf['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0xf15590=>(_0x2a6355(),_0xf15590),()=>{const _0x3ade09=_0x5b8c79();return null==_0x3ade09?(_0x2a6355(),'Valid'):_0x2b648b-_0x3ade09>0x240c8400?'UsageLimit':'Valid';})['then'](_0x142f46)['catch'](()=>{_0x142f46('UsageLimit');});const _0x22a905=0x36ee80;function _0x2a6355(){const _0x404c91='llct-'+_0x1a8ff1(_0x26cc53(_0x267742)),_0x55e24e=_0x33d9f8(_0x1a8ff1(window['Math']['ceil'](_0x2b648b/_0x22a905)));window['localStorage']['setItem'](_0x404c91,_0x55e24e);}function _0x5b8c79(){const _0x261f87='llct-'+_0x1a8ff1(_0x26cc53(_0x267742)),_0x51b56a=window['localStorage']['getItem'](_0x261f87);return _0x51b56a?window['parseInt'](_0x33d9f8(_0x51b56a),0x10)*_0x22a905:null;}function _0x49897a(_0x40ff3a){return new window['Promise']((_0xbeec63,_0xb58e9c)=>{_0x40ff3a['then'](_0xbeec63,_0xb58e9c),window['setTimeout'](_0xb58e9c,0x1d4c0);});}}_0x51c38c['on']('_sendUsageRequest',(_0x143b2d,_0x3b3870)=>{if(_0x3b3870[0x0]!=_0x267742)return _0x142f46('UsageLimit');_0x3b3870[0x1]={..._0x3b3870[0x1],'requestId':_0x2b7b8a};},{'priority':'high'}),_0x51c38c['on']('_sendUsageRequest',_0x293134=>{_0x2eb652(_0x293134['return'])&&(_0xf3ae1a=!0x0,_0x1770b8(_0x293134['return']));},{'priority':'low'}),_0x3f4e44['then'](()=>{_0xf3ae1a||_0x142f46('UsageLimit');});});function _0xd3eea7(){return'auto'==_0x51c38c['editing']['view']['_overlayModeHint'];}function _0x38904a(){_0x51c38c['editing']['view']['_overlayModeHint']='auto';}}function _0x3f1a7f(_0x1aaed8){const _0x4175c3=[new window['Promise'](_0x2f78a4=>setTimeout(_0x2f78a4,0x93ecc)),_0x3f4e44['then'](()=>new window['Promise'](_0x5b350b=>{let _0x36257a=0x0;_0x51c38c['model']['on']('applyOperation',(_0x45aec4,_0x28d00a)=>{_0x28d00a[0x0]['isDocumentOperation']&&_0x36257a++,0x5e8==_0x36257a&&(_0x5b350b(),_0x45aec4['off']());});}))];return window['Promise']['race'](_0x4175c3)['then'](()=>_0x1aaed8);}async function _0x2f0ebf(){await _0x3f4e44,_0x51c38c['model']['change']=_0x32f626,_0x51c38c['model']['enqueueChange']=_0x32f626,_0x51c38c['enableReadOnlyMode']('model');}function _0x759dde(){return window['glob']&&window['glob']['triliumVersion'];}function _0x337a5b(){return _0x5a6f0c('WebSocketGateway')&&'connected'==_0x4b2208('WebSocketGateway')['state'];}function _0x4d2a1c(){return _0x5a6f0c('RevisionViewerIntegration');}function _0x2ea7d3(){return _0x5a6f0c('TrackChangesDataGetter');}function _0x126ab1(_0x346e7f){const _0x538a10=_0x352456();_0x51c38c[_0x538a10]='commentsLicenseKey'+_0x346e7f,'Valid'!=_0x346e7f&&_0x2f0ebf();}function _0x352456(){const _0x417849=window['String'](window['performance']['now']())['replace']('.','');let _0x108cd9='m';for(let _0x345bb8=0x0;_0x345bb8<_0x417849['length'];_0x345bb8+=0x2){let _0x211372=window['parseInt'](_0x417849['substring'](_0x345bb8,_0x345bb8+0x2));_0x211372>=0x3e&&(_0x211372-=0x3e),_0x108cd9+=_0x336846[_0x211372];}return _0x108cd9;}function _0x48cd36(){const _0x2c1556=_0x228aeb['split']('.');if(0x3!=_0x2c1556['length'])return null;return _0x323e75(_0x2c1556[0x1]);function _0x323e75(_0x222277){const _0x33b1b1=_0x4d5788(_0x222277);return _0x33b1b1&&_0x49978b()?_0x33b1b1:null;function _0x49978b(){const _0x138302=_0x33b1b1['jti'],_0x4da051=window['parseInt'](_0x138302['substring'](_0x138302['length']-0x8),0x10),_0x4f679a={..._0x33b1b1,'jti':_0x138302['substring'](0x0,_0x138302['length']-0x8)};return delete _0x4f679a['vc'],_0x26cc53(_0x4f679a)==_0x4da051;}}}async function _0x2e352f(){let _0x43d690=!0x0;try{const [_0x52a7c7,_0x7346a1,_0x5b1838]=_0x228aeb['split']('.');return _0x50db19(_0x52a7c7),await _0x282f7c(_0x52a7c7,_0x7346a1,_0x5b1838),_0x43d690;}catch{return!0x1;}function _0x50db19(_0x34a86d){const _0x596b00=_0x4d5788(_0x34a86d);_0x596b00&&'ES256'==_0x596b00['alg']||(_0x43d690=!0x1);}async function _0x282f7c(_0xfebe07,_0x104c2d,_0x38977a){const _0x43b7ec=window['Uint8Array']['from'](_0x21a601(_0x38977a),_0x642c83=>_0x642c83['charCodeAt'](0x0)),_0x3e50c4=new window['TextEncoder']()['encode'](_0xfebe07+'.'+_0x104c2d),_0x4db2a5=window['crypto']['subtle'];if(!_0x4db2a5)return;const _0x2a718e=await _0x4db2a5['importKey']('jwk',_0xca3f40,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x4db2a5['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x2a718e,_0x43b7ec,_0x3e50c4)||(_0x43d690=!0x1);}}function _0x4d5788(_0x570c13){return _0x570c13['startsWith']('ey')?JSON['parse'](_0x21a601(_0x570c13)):null;}function _0x21a601(_0x3c79af){return window['atob'](_0x3c79af['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x26cc53(_0x52a69a){let _0x19d564=0x1505;function _0x106877(_0x1eebea){for(let _0x58d908=0x0;_0x58d908<_0x1eebea['length'];_0x58d908++){const _0x25e5bd=_0x1eebea['charCodeAt'](_0x58d908);_0x19d564=(_0x19d564<<0x5)+_0x19d564+_0x25e5bd,_0x19d564&=_0x19d564;}}function _0x1923a5(_0x38b0c6){Array['isArray'](_0x38b0c6)?_0x38b0c6['forEach'](_0x1923a5):_0x38b0c6&&'object'==typeof _0x38b0c6?Object['entries'](_0x38b0c6)['sort']()['forEach'](([_0x19c6fa,_0x56ab94])=>{_0x106877(_0x19c6fa),_0x1923a5(_0x56ab94);}):_0x106877(window['String'](_0x38b0c6));}return _0x1923a5(_0x52a69a),_0x19d564>>>0x0;}function _0x1a8ff1(_0x54110e){return _0x54110e['toString'](0x10)['padStart'](0x8,'0');}function _0x33d9f8(_0x51b312){return _0x51b312['split']('')['reverse']()['join']('');}function _0x5a6f0c(_0x5550a3){return _0x51c38c['plugins']['has'](_0x5550a3);}function _0x4b2208(_0x33a60d){return _0x51c38c['plugins']['get'](_0x33a60d);}function _0x32f626(){}_0x126ab1(await _0x38566d());}_0x1b8aaf(_0x25fa51['editor']);}(this);}destroy(){const _0x1efa91=this['editor']['plugins']['get'](ue),_0x193847=this['editor']['config']['get']('collaboration.channelId');for(const _0x45151c of _0x1efa91['getCommentThreads']({'channelId':_0x193847}))_0x1efa91['_detachCommentThread'](_0x45151c['id']),_0x1efa91['_threads']['delete'](_0x45151c['id']);super['destroy']();}['hasMarkerForId'](_0x33d087){return this['getAllMarkersForId'](_0x33d087)['length']>0x0;}getAllMarkersForId(_0x50ff0a){const _0x4b8c10=[];for(const _0x198551 of this['editor']['model']['markers'])_0x198551['name']['startsWith']('comment:'+_0x50ff0a)&&_0x4b8c10['push'](_0x198551);return _0x4b8c10;}['scrollToThreadMarker'](_0x4a53d5){setTimeout(()=>{const _0x22b7c0=this['_getTargetForId'](_0x4a53d5);_0x22b7c0&&this['activeMarker']&&Ce(this['activeMarker'])['id']===_0x4a53d5&&_0x480205({'target':_0x22b7c0[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}_reconvertMarkers(_0xaa01b0){this['editor']['model']['change'](()=>{for(const _0x17b948 of this['getAllMarkersForId'](_0xaa01b0))this['editor']['editing']['reconvertMarker'](_0x17b948);});}_attachArchivedThread(_0x1cc2e7){const _0x5169dd=this['editor']['plugins']['get'](ue),_0x26f974=this['editor']['plugins']['get'](_e),_0x110246=_0x5169dd['getCommentThread'](_0x1cc2e7);if(!_0x110246['isAttached']){const _0x38db90=_0x110246['attachTo'](()=>this['_getTargetForId'](_0x110246['id']));_0x26f974['registerAnnotation'](_0x38db90),_0x110246['_hasTargetInContent']=!0x1;}}_initializeMarkerConverters(){const _0x48a77e=this['editor'],_0x261c78=_0x48a77e['plugins']['get'](_0x18879d);_0x48a77e['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x21ab4c,_0x2ead9a)=>{const {id:_0x1d7ae3}=Ce(_0x21ab4c['markerName']),_0x17fa0e=_0x48a77e['plugins']['get'](ue)['getCommentThread'](_0x1d7ae3),_0x211552=this['activeMarker']&&Ce(this['activeMarker'])['id']===_0x1d7ae3;let _0x24a2e1;if(_0x17fa0e&&_0x17fa0e['isResolved']&&!_0x211552&&_0x21ab4c['item'])return _0x2ead9a['consumable']['consume'](_0x21ab4c['item'],'addMarker:'+_0x21ab4c['markerName']),_0x2ead9a['consumable']['consume'](_0x21ab4c['item'],'removeMarker:'+_0x21ab4c['markerName']),null;const _0x29372a=['ck-comment-marker'];return _0x211552&&_0x29372a['push']('ck-comment-marker--active'),_0x24a2e1=_0x17fa0e?.['length']?_0x17fa0e['comments']['first']['author']['id']:_0x261c78['me']['id'],{'classes':_0x29372a,'attributes':{'data-comment':_0x1d7ae3,'data-author-id':_0x24a2e1}};}}),_0x48a77e['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x3515d3,{options:_0x43f589})=>{if(_0x43f589['showCommentHighlights'])return null;const _0x1a62dc=_0x48a77e['plugins']['get'](ue),_0x2a60a5=_0x48a77e['model']['markers']['get'](_0x3515d3),{id:_0x1e2771,part:_0x2f4d6f}=Ce(_0x3515d3);return _0x2a60a5&&!_0x2a60a5['affectsData']||_0x43f589['ignoreResolvedComments']&&_0x1a62dc['getCommentThread'](_0x1e2771)?.['isResolved']?null:{'group':'comment','name':_0x2f4d6f?_0x1e2771+':'+_0x2f4d6f:_0x1e2771};}}),_0x48a77e['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x3ff180,{writer:_0x2d7864})=>_0x2d7864['createElement']('$marker',{'data-name':'comment:'+_0x3ff180['getAttribute']('id')})}),_0x48a77e['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x4f2ed1=this['editor'],_0x182b1b=_0x4f2ed1['plugins']['get'](ue),_0x1af21f=new Set(),_0x6ba03d=new Set();_0x4f2ed1['model']['document']['registerPostFixer'](_0x6df2dc=>{let _0x518722=!0x1;for(const {name:_0x64ebc1,data:_0x26cd1c}of _0x4f2ed1['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3c29fb,id:_0x5a5a3a}=Ce(_0x64ebc1);let _0x2de573=_0x26cd1c['newRange'];if('comment'!==_0x3c29fb||!_0x2de573)continue;const _0x42fab6='$graveyard'===_0x2de573['root']['rootName'];_0x42fab6||(_0x2de573=Ee(_0x2de573,_0x4f2ed1['model']),!_0x2de573||_0x2de573['isCollapsed']||!_0x26cd1c['newRange']||_0x2de573['isEqual'](_0x26cd1c['newRange']))?_0x4f2ed1['model']['hasContent'](_0x2de573)&&!_0x42fab6?this['isThreadsLoadingPaused']?_0x1af21f['add'](_0x64ebc1):this['_handleThreadMarker'](_0x64ebc1,_0x5a5a3a):(_0x6ba03d['add'](_0x64ebc1),_0x1af21f['delete'](_0x64ebc1),_0x6df2dc['removeMarker'](_0x64ebc1),_0x518722=!0x0):(_0x6df2dc['updateMarker'](_0x64ebc1,{'range':_0x2de573}),_0x518722=!0x0);}return _0x518722;}),this['on']('change:isThreadsLoadingPaused',(_0x1a837a,_0xe3d3db,_0x9548ae)=>{if(!_0x9548ae&&_0x1af21f['size'])for(const _0xf35977 of _0x1af21f){const {id:_0x419a4d}=Ce(_0xf35977);_0x1af21f['delete'](_0xf35977),_0x4f2ed1['model']['markers']['get'](_0xf35977)&&this['_handleThreadMarker'](_0xf35977,_0x419a4d);}}),this['listenTo'](_0x4f2ed1['model']['document'],'change',()=>{for(const {name:_0x4f8568,data:{newRange:_0x1f280e}}of _0x4f2ed1['model']['document']['differ']['getChangedMarkers']()){const {group:_0x185a55,id:_0x5e77b2}=Ce(_0x4f8568);if('comment'!==_0x185a55)continue;const _0xef5e0f=_0x182b1b['getCommentThread'](_0x5e77b2),_0xd7e5ed=this['hasMarkerForId'](_0x5e77b2);_0xef5e0f&&(!_0xef5e0f['_hasTargetInContent']&&_0x1f280e&&_0x4f2ed1['editing']['view']['once']('render',()=>{const _0x33b4e7=_0x4f2ed1['plugins']['get'](ae),_0x23ad01=_0x182b1b['_threadToController']['get'](_0xef5e0f)['view'];_0x33b4e7['getByInnerView'](_0x23ad01)['refreshVisibility']();},{'priority':'low'}),_0xef5e0f['_hasTargetInContent']=_0xd7e5ed||!!_0x1f280e),_0x1f280e||(_0x6ba03d['add'](_0x4f8568),_0x1af21f['delete'](_0x4f8568));}for(const _0x1800c6 of _0x6ba03d){const {id:_0x16de94}=Ce(_0x1800c6),_0x4494f8=_0x182b1b['getCommentThread'](_0x16de94);if(_0x1af21f['delete'](_0x1800c6),!_0x4494f8)continue;const _0x5bbd50=this['hasMarkerForId'](_0x16de94);_0x5bbd50||_0x4494f8['isSubmitted']?_0x5bbd50||_0x4494f8['unlinkedAt']||_0x4494f8['setUnlinkedAt'](new Date()):_0x4494f8['remove']();}_0x6ba03d['clear']();});}_handleInitialThreads(_0x477baf){_0x477baf['forEach'](_0x543614=>{_0x543614['unlinkedAt']&&this['_attachArchivedThread'](_0x543614['id']);});}_getTargetForId(_0x392f28){const _0x185139=this['editor'],_0x4a7063=this['getAllMarkersForId'](_0x392f28);return _0x4f6c32(_0x185139['editing'],_0x4a7063);}_getTextContext(_0x1fca18){const _0x32bc04=this['getAllMarkersForId'](_0x1fca18);let _0x8159a6='',_0x123a21=!0x1;for(const _0x5e9f46 of _0x32bc04){const _0x24d982=_0x5e9f46['getRange']();for(const _0x33c562 of Array['from'](_0x24d982['getItems']()))_0x33c562['is']('$textProxy')?(_0x8159a6&&_0x123a21&&(_0x8159a6+='\x20',_0x123a21=!0x1),_0x8159a6+=_0x33c562['data']):_0x123a21=!0x0;_0x123a21=!0x0;}return _0x8159a6['substring'](0x0,0x96);}_attachMarkerToThread(_0x16a5f4,_0x410e40){const _0x52db58=this['editor'],_0x58b843=_0x52db58['plugins']['get'](ue);let _0x130d22=_0x58b843['getCommentThread'](_0x410e40);const _0x3aa0c9=_0x52db58['config']['get']('collaboration.channelId'),_0x3cab5c=_0x52db58['plugins']['get'](_e);return _0x130d22&&(_0x130d22['unlinkedAt']&&_0x130d22['setUnlinkedAt'](null),_0x130d22['isAttached'])||(this['getAllMarkersForId'](_0x410e40)[0x0]['managedUsingOperations']?_0x58b843['fetchCommentThread']({'channelId':_0x3aa0c9,'threadId':_0x410e40})['then'](_0xf0780e=>{if('destroyed'!==_0x52db58['state']){if(_0x130d22=_0xf0780e,_0x130d22&&!_0x130d22['isAttached']){const _0x371c24=_0x130d22['attachTo'](()=>this['_getTargetForId'](_0x410e40));_0x3cab5c['registerAnnotation'](_0x371c24),_0x130d22['isResolved']&&this['_reconvertMarkers'](_0x410e40);}else{if(!_0x130d22){const _0x535d39=this['getAllMarkersForId'](_0x410e40);_0x52db58['model']['change'](_0x1e62f7=>{for(const _0x2eae7c of _0x535d39)_0x1e62f7['removeMarker'](_0x2eae7c);});}}}}):_0x52db58['editing']['view']['once']('render',()=>{if(_0x58b843['getCommentThread'](_0x410e40))return;const _0x2e9d75=_0x52db58['plugins']['get'](ae);_0x130d22=_0x58b843['openNewCommentThread']({'channelId':_0x3aa0c9,'threadId':_0x410e40,'target':()=>this['_getTargetForId'](_0x410e40),'context':{'type':'text','value':this['_getTextContext'](_0x410e40)}});const _0x5d8a15=_0x58b843['_threadToController']['get'](_0x130d22)['view'],_0x5049e0=_0x2e9d75['getByInnerView'](_0x5d8a15);_0x5049e0&&_0x3cab5c['registerAnnotation'](_0x5049e0);},{'priority':'low'})),_0x130d22;}['_handleThreadMarker'](_0x14bd50,_0x2641a6){const _0x42044c=this['_attachMarkerToThread'](_0x14bd50,_0x2641a6);_0x42044c&&!_0x42044c['context']&&_0x42044c['setContext']({'type':'text','value':this['_getTextContext'](_0x2641a6)});}_initAriaMarkerChangeAnnouncements(){const _0x38781c=this['editor'];_0x326a71(_0x38781c['model'],({left:_0x42f9e6,entered:_0x4733dc})=>{for(const _0x50d577 of _0x42f9e6)if(ke(_0x50d577)){_0x38781c['ui']['ariaLiveAnnouncer']['announce'](St(_0x38781c['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x2f487e of _0x4733dc)if(ke(_0x2f487e)){_0x38781c['ui']['ariaLiveAnnouncer']['announce'](St(_0x38781c['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0xbc567(_0x57ecbb)));break;}});}};function be(_0x14ae19,_0x18800e){return _0x18800e?_0x14ae19+':'+_0x18800e:_0x14ae19;}function Ee(_0x4c53df,_0x1f2308){const _0x29758f=_0x1f2308['schema'],_0x8eca87=_0x1f2308['createRange'](_0x4c53df['start']);for(const _0x53c30d of _0x4c53df['getWalker']()){const {type:_0x5d8358,item:_0x4515ce,nextPosition:_0x2e523b}=_0x53c30d;if('text'===_0x5d8358||_0x29758f['isObject'](_0x4515ce)){const _0x382894=_0x1f2308['createPositionBefore'](_0x4515ce);_0x8eca87['isCollapsed']&&(_0x8eca87['start']=_0x382894),_0x8eca87['end']=_0x2e523b;}}return _0x8eca87;}function ke(_0x1c13d8){return'comment'===Ce(_0x1c13d8['name'])['group'];}var Ne=class extends _0x3e22c6{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[ue,Ie,_e,ae];}get CommentsListView(){return Wt;}get CommentThreadInputView(){return Ut;}init(){const _0x3a00a1=this['editor'],_0x8509fe=_0x3a00a1['plugins']['get'](ue),_0x5b90dc=_0x3a00a1['plugins']['get'](Ie),_0x44ada4=_0x3a00a1['plugins']['get'](ae),_0x4c7581=_0x3a00a1['plugins']['get'](_e);_0x3a00a1['ui']['componentFactory']['add']('comment',()=>{const _0x56ee6=this['_createUIButton'](et);return _0x56ee6['tooltip']=!0x0,_0x56ee6;}),_0x3a00a1['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](lt)),_0x4c7581['addSourceCollector'](()=>{const _0x2fdbd0=[];for(const [_0x2c2821,_0x11e950]of _0x8509fe['_threadToController']){const _0x2d2af0=_0x5b90dc['getAllMarkersForId'](_0x2c2821['id']),_0x134e59=_0x2d2af0['map'](_0x45e8fe=>_0x45e8fe['getRange']());_0x2d2af0['length']>0x0&&_0x2fdbd0['push']([_0x11e950['view'],_0x134e59]);}return _0x2fdbd0;}),this['listenTo'](_0x44ada4,'change:activeAnnotations',(_0x35c417,_0x1cc5a3,_0x3bd20c)=>{const _0x2e487e=Array['from'](_0x3bd20c)['map'](_0x1bb1d5=>_0x1bb1d5['innerView'])['find'](_0x96eac0=>_0x8509fe['_viewToController']['has'](_0x96eac0));if(!_0x2e487e)return void(_0x5b90dc['activeMarker']=null);const _0x542cb4=_0x8509fe['_viewToController']['get'](_0x2e487e)['model']['id'],_0x458bbb='comment:'+_0x542cb4;_0x542cb4&&_0x5b90dc['hasMarkerForId'](_0x542cb4)?_0x5b90dc['activeMarker']=_0x458bbb:_0x5b90dc['activeMarker']&&(_0x5b90dc['activeMarker']=null);}),this['listenTo'](_0x8509fe,'removeCommentThread',(_0x479a03,{threadId:_0x473b1a,isFromAdapter:_0x512b5a})=>{!_0x512b5a&&_0x3a00a1['ui']['focusTracker']['isFocused']&&_0x5b90dc['hasMarkerForId'](_0x473b1a)&&_0x3a00a1['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x8509fe,'addComment',(_0x31ae9e,{threadId:_0x3bda7f,isFromAdapter:_0x27b7ad})=>{!_0x27b7ad&&_0x5b90dc['hasMarkerForId'](_0x3bda7f)&&_0x8509fe['hasCommentThread'](_0x3bda7f)&&0x1===_0x8509fe['getCommentThread'](_0x3bda7f)['length']&&(_0x3a00a1['editing']['view']['focus'](),_0x31ae9e['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x32a9d3=[this['editor']];for(const _0x24222d of _0x32a9d3){let _0x4272d1;for(const _0x3397ea in _0x24222d){const _0x1eb66b=_0x3397ea,_0x5d0ed1=_0x24222d[_0x1eb66b];if('commentsLicenseKeyValid'==_0x5d0ed1||'commentsLicenseKeyInvalid'==_0x5d0ed1||'commentsLicenseKeyExpired'==_0x5d0ed1||'commentsLicenseKeyDomainLimit'==_0x5d0ed1||'commentsLicenseKeyNotAllowed'==_0x5d0ed1||'commentsLicenseKeyEvaluationLimit'==_0x5d0ed1||'commentsLicenseKeyUsageLimit'==_0x5d0ed1){delete _0x24222d[_0x1eb66b],_0x4272d1=_0x5d0ed1,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x4272d1&&_0x24222d['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x4272d1&&_0x24222d['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x4272d1&&_0x24222d['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x4272d1&&_0x24222d['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x4272d1&&_0x24222d['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x4272d1&&_0x24222d['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_createUIButton(_0x34093a){const _0x445c2f=this['editor'],_0x4dceb5=new _0x34093a(_0x445c2f['locale']),_0x318914=_0x445c2f['commands']['get']('addCommentThread');return _0x4dceb5['set']({'label':St(_0x445c2f['locale'],'Comment'),'icon':_0x504c09}),_0x4dceb5['bind']('isEnabled')['to'](_0x318914,'isEnabled',_0x318914,'hasContent',(_0x145d8d,_0x5a9f31)=>_0x145d8d&&_0x5a9f31),this['listenTo'](_0x4dceb5,'execute',()=>{_0x318914['execute']();}),_0x4dceb5;}},Oe=class extends _0x3e22c6{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Ie];}constructor(_0xb2723c){super(_0xb2723c),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x49de02,_0x3a6a79,_0x5dbe66)=>{_0x5dbe66?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}afterInit(){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}_enableCommentsOnlyMode(){for(const [_0x1516ab,_0x42ad72]of this['editor']['commands'])_0x42ad72['affectsData']&&'addCommentThread'!==_0x1516ab&&_0x42ad72['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x5344b4=this['editor']['editing']['view']['document'];this['listenTo'](_0x5344b4,'cut',_0x328f83=>_0x328f83['stop'](),{'priority':'highest'}),this['listenTo'](_0x5344b4,'clipboardInput',_0x39d84c=>_0x39d84c['stop'](),{'priority':'highest'}),this['listenTo'](_0x5344b4,'delete',_0x197b7a=>_0x197b7a['stop'](),{'priority':'highest'});}_disableCommentsOnlyMode(){for(const [_0x5d8e7f,_0x68a367]of this['editor']['commands'])_0x68a367['affectsData']&&'addCommentThread'!==_0x5d8e7f&&_0x68a367['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['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']);}},Me=class extends _0x11bb03{activeUIs;uisData;['_uis'];static get requires(){return[ae];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x44ff2f){super(_0x44ff2f),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}init(){const _0x272901=this['context']['plugins']['get'](ae);this['listenTo'](_0x272901,'_activateAnnotation',(_0xb6cdfc,_0x30947b)=>{for(const _0x4716d1 of this['activeUIs']){const _0xb834d3=this['_uis']['get'](_0x4716d1);(0x0,this['uisData']['get'](_0x4716d1)['filter'])(_0x30947b)&&_0xb834d3['setActiveAnnotation'](_0x30947b);}}),this['listenTo'](_0x272901,'_deactivateAllAnnotations',()=>{for(const _0x203a03 of this['activeUIs'])this['_uis']['get'](_0x203a03)['setActiveAnnotation'](null);}),this['listenTo'](_0x272901['_visibleAnnotations'],'add',(_0x5b80aa,_0x190029)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x190029);});}hasActive(){return this['activeUIs']['size']>0x0;}isActive(_0x15b58e){return this['activeUIs']['has'](_0x15b58e);}activate(_0x53d32e,_0xe7f4b=this['defaultFilter']){const _0x566edc=this['context']['plugins']['get'](ae);if(!this['_uis']['has'](_0x53d32e))throw new _0x11a517('annotationsuis-missing-ui',this,{'uiName':_0x53d32e});this['isActive'](_0x53d32e)&&this['deactivate'](_0x53d32e),this['activeUIs']['add'](_0x53d32e);const _0x3245dd=new oe();re({'source':_0x566edc['_visibleAnnotations'],'target':_0x3245dd,'filter':_0xe7f4b}),this['uisData']['set'](_0x53d32e,{'collection':_0x3245dd,'filter':_0xe7f4b});const _0x2ee4b9=this['_uis']['get'](_0x53d32e);_0x2ee4b9['attach'](_0x3245dd),this['listenTo'](_0x2ee4b9,'change:activeAnnotation',(_0xda6ddf,_0x2dc3ba,_0x814cb6,_0x26ad6c)=>{_0x26ad6c&&_0x566edc['_removeActiveAnnotation'](_0x26ad6c),_0x814cb6&&_0x566edc['_addActiveAnnotation'](_0x814cb6);});}deactivate(_0x32f716){if(this['activeUIs']['delete'](_0x32f716),!this['_uis']['has'](_0x32f716))throw new _0x11a517('annotationsuis-missing-ui',this,{'uiName':_0x32f716});const _0x4ea3d0=this['_uis']['get'](_0x32f716);_0x4ea3d0['detach'](),this['stopListening'](_0x4ea3d0),this['uisData']['get'](_0x32f716)['collection']['destroy'](),this['uisData']['delete'](_0x32f716);}switchTo(_0xb01441){if(!this['_uis']['has'](_0xb01441))throw new _0x11a517('annotationsuis-missing-ui',this,{'uiName':_0xb01441});const _0x85a9ca=this['context']['plugins']['get'](ae),_0x5770c7=Array['from'](_0x85a9ca['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0xb01441);const _0x271342=this['_uis']['get'](_0xb01441);_0x271342['setActiveAnnotation'](_0x5770c7),_0x271342['_setSelectedAnnotations']&&_0x5770c7&&_0x271342['_setSelectedAnnotations']([_0x5770c7]);}deactivateAll(){for(const _0x3e135d of this['activeUIs'])this['deactivate'](_0x3e135d);}register(_0xd41b1b,_0x2490a5){if(this['_uis']['has'](_0xd41b1b))throw new _0x11a517('annotationsuis-register-already-registered');if('function'!=typeof _0x2490a5['attach']||'function'!=typeof _0x2490a5['detach']||'function'!=typeof _0x2490a5['setActiveAnnotation'])throw new _0x11a517('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0xd41b1b,_0x2490a5);}refilterAnnotations(){const _0xd930be=this['context']['plugins']['get'](ae)['collection'],_0x207298=new Map(),_0x24953b=Array['from'](this['activeUIs']);for(const _0x5e8dec of this['activeUIs']){const _0x6ccc47=this['uisData']['get'](_0x5e8dec)['collection'];for(const _0xa3c4d6 of _0x6ccc47)_0x207298['set'](_0xa3c4d6,_0x5e8dec);}for(const _0x20a4ed of _0xd930be){const _0x134ae8=_0x207298['get'](_0x20a4ed);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x20a4ed);const _0x3ff240=_0x24953b['find'](_0x50479f=>this['uisData']['get'](_0x50479f)['filter'](_0x20a4ed));_0x134ae8!==_0x3ff240&&(_0x134ae8&&this['uisData']['get'](_0x134ae8)['collection']['remove'](_0x20a4ed),_0x3ff240&&this['uisData']['get'](_0x3ff240)['collection']['add'](_0x20a4ed));}}destroy(){this['deactivateAll'](),super['destroy']();}defaultFilter(){return!0x0;}_assertAnnotationDoesNotBelongToMultipleUIs(_0x128820){const _0x51895f=[];for(const _0x219f3d of this['activeUIs']){(0x0,this['uisData']['get'](_0x219f3d)['filter'])(_0x128820)&&_0x51895f['push'](_0x219f3d);}if(_0x51895f['length']>0x1)throw new _0x11a517('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x51895f,'annotationType':_0x128820['type']});}};const Re=/* #__PURE__ -- @preserve */
32
- _0x3f1e89('px');var xe=class extends ut{list;['focusables'];['focusTracker'];['focusCycler'];constructor(_0xca6b5){super(_0xca6b5);const _0x21c64b=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 _0x1d34e2(),this['focusCycler']=new ht({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x21c64b['to']('class')],'style':{'minHeight':_0x21c64b['to']('minHeight',_0x45db2f=>'number'==typeof _0x45db2f?Re(_0x45db2f+0xa):null)},'dir':_0xca6b5['uiLanguageDirection'],'role':'application','aria-label':St(_0xca6b5,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':St(_0xca6b5,'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',_0xe9bd7a=>{this['_updateItemPositionInFocusables'](_0xe9bd7a['source']);}),this['list']['forEach'](_0x5c5373=>{this['focusTracker']['add'](_0x5c5373['element']),this['_updateItemPositionInFocusables'](_0x5c5373);}),this['list']['on']('change',(_0xc3bfcf,_0x536639)=>{for(const _0x4a9b70 of _0x536639['removed'])this['focusTracker']['remove'](_0x4a9b70['element']),this['focusables']['remove'](_0x4a9b70);for(const _0x5c171c of _0x536639['added'])this['focusTracker']['add'](_0x5c171c['element']),this['_updateItemPositionInFocusables'](_0x5c171c);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}_updateItemPositionInFocusables(_0x3b03c7){const _0x51ebb4=this['focusables']['getIndex'](_0x3b03c7);let _0xcd29ea,_0x4524b9;for(const _0x49f9a4 of this['focusables'])if(_0x3b03c7['top']<_0x49f9a4['top']){_0xcd29ea=_0x49f9a4;break;}if(_0x4524b9=_0xcd29ea?this['focusables']['getIndex'](_0xcd29ea):this['focusables']['length'],-0x1!==_0x51ebb4){if(_0x51ebb4===_0x4524b9-0x1)return;this['focusables']['remove'](_0x3b03c7),_0x4524b9=_0xcd29ea?this['focusables']['getIndex'](_0xcd29ea):this['focusables']['length'];}this['focusables']['add'](_0x3b03c7,_0x4524b9);}};const Se=/* #__PURE__ -- @preserve */
33
- _0x3f1e89('px');var Pe=class extends ut{content;_targetTop;_mutationObserver;constructor(_0x5705a0){super(_0x5705a0),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x389f13,_0x4d9eda)=>_0x389f13+_0x4d9eda),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=te(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x485d2e=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x485d2e['to']('isAnimationDisabled',_0x2e11e3=>_0x2e11e3?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x485d2e['to']('top',_0x9c69a=>Se(_0x9c69a))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}updateHeight(){const _0x3bfeb6=this['element']['clientHeight'];_0x3bfeb6&&(this['height']=_0x3bfeb6);}destroy(){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},Le=class extends _0x11bb03{['view'];_activeAnnotation;_annotations;_spaceBetweenItems;_sidebarItemViewToAnnotation;_annotationToSidebarItemView;_recalculateBuffer;static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2a5605){super(_0x2a5605),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 _0x2d5237=this['context']['config']['get']('sidebar.container');_0x2d5237&&this['setContainer'](_0x2d5237);}setContainer(_0x3fea0c){if(!Ve(_0x3fea0c))throw new _0x11a517('sidebar-setcontainer-invalid-element');this['container']=_0x3fea0c;}_attachToContainer({viewClass:_0x47a391='',spaceBetweenItems:_0x175866=0x19}={}){if(!Ve(this['container']))throw new _0x11a517('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x47a391,this['_spaceBetweenItems']=_0x175866;}['rearrange']({removedAnnotation:_0x595f59,previousAnnotation:_0x420b80,nextAnnotation:_0x24ac94}){const _0x2cadc4=this['getSidebarItemView'](_0x595f59);this['view']['list']['remove'](_0x2cadc4),this['_destroySidebarItemView'](_0x595f59),_0x420b80&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x420b80)),_0x24ac94&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x24ac94)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x28f65d,activatedAnnotation:_0x5c4329,disableAnimationOnActivatedAnnotation:_0x5ad589}){if(this['_activeAnnotation']=_0x5c4329,_0x28f65d){_0x28f65d['isActive']=!0x1;const _0x5a2dd3=this['getSidebarItemView'](_0x28f65d);_0x5a2dd3&&_0x5ad589&&(_0x5a2dd3['isAnimationDisabled']=!0x1);}if(_0x5c4329){const _0x5c694b=this['getSidebarItemView'](_0x5c4329);_0x5c694b&&(_0x5c4329['isActive']=!0x0,_0x5ad589&&(_0x5c694b['isAnimationDisabled']=!0x0,_0x5c694b['top']+=0x1),this['_alignToTargetRect'](_0x5c694b));}}_detachFromContainer(_0x392e29){if(this['view']['element']['remove'](),_0x392e29){for(const _0xad2ad7 of _0x392e29)this['_destroySidebarItemView'](_0xad2ad7);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}addAnnotation(_0x3abd62,_0x28a5de){_0x28a5de||(_0x28a5de=_0x3abd62['view']);const _0x75f869=new Pe(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x75f869,_0x3abd62),this['_annotationToSidebarItemView']['set'](_0x3abd62,_0x75f869),_0x75f869['content']['add'](_0x28a5de),this['listenTo'](_0x3abd62['view'],'change:targetRect',(_0x4196ac,_0x16b9a8,_0x2ed164)=>{const _0x145e4d=this['_getTargetTop'](_0x3abd62,_0x2ed164);_0x75f869['_targetTop']!=_0x145e4d&&(_0x75f869['_targetTop']=_0x145e4d,this['_setItemTop'](_0x75f869,_0x145e4d));}),this['listenTo'](_0x75f869,'change:top',()=>{this['_recalculate'](_0x75f869,'top');}),this['listenTo'](_0x75f869,'change:bottom',()=>{this['_recalculate'](_0x75f869,'bottom');}),this['_alignToTargetRect'](_0x75f869);const _0x2c88f6=this['_getItemBefore'](_0x75f869);return _0x2c88f6&&this['_alignAfterItem'](_0x2c88f6,_0x75f869)||this['_alignToTargetRect'](_0x75f869),this['_updateLastItem'](),this['view']['list']['add'](_0x75f869),_0x75f869;}['_alignForTopChange'](_0x28cad9){if(!_0x28cad9['content']['length'])return;const _0x18e8a0=this['_getItemBefore'](_0x28cad9);if(!_0x18e8a0)return;const _0x4483e3=this['_sidebarItemViewToAnnotation']['get'](_0x18e8a0),_0x551fb4=this['_activeAnnotation'];_0x551fb4&&_0x551fb4===_0x4483e3?this['_alignAfterItem'](_0x18e8a0,_0x28cad9):this['_alignBeforeItem'](_0x28cad9,_0x18e8a0);}_alignForBottomChange(_0xe68210){if(!_0xe68210['content']['length'])return;const _0x2e8319=this['_getItemAfter'](_0xe68210);if(!_0x2e8319)return;const _0x4a0a1b=this['_sidebarItemViewToAnnotation']['get'](_0x2e8319),_0x2d06b9=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x34b2d4=this['_activeAnnotation'];_0x34b2d4&&_0x34b2d4===_0x4a0a1b&&_0x2d06b9?(this['_alignBeforeItem'](_0x2e8319,_0xe68210),this['_alignAfterItem'](_0xe68210,_0x2e8319)):_0x34b2d4&&_0x34b2d4===_0x4a0a1b?this['_alignBeforeItem'](_0x2e8319,_0xe68210):this['_alignAfterItem'](_0xe68210,_0x2e8319);}_recalculate(_0x12334d,_0x2c3246){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0xafed8c,changedProp:_0x160d64}of this['_recalculateBuffer'])'top'===_0x160d64?this['_alignForTopChange'](_0xafed8c):this['_alignForBottomChange'](_0xafed8c);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x12334d,'changedProp':_0x2c3246});}getSidebarItemView(_0xcec7af){return this['_annotationToSidebarItemView']['get'](_0xcec7af);}destroy(){this['stopListening'](),this['view']['destroy']();}_destroySidebarItemView(_0x1ffc7b){const _0x2e403b=this['getSidebarItemView'](_0x1ffc7b);this['stopListening'](_0x2e403b),this['stopListening'](_0x1ffc7b['view']),_0x2e403b['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x1ffc7b),this['_sidebarItemViewToAnnotation']['delete'](_0x2e403b);}_createSidebarView(){const _0x25ddf6=new xe(this['context']['locale']);return _0x25ddf6['render'](),this['on']('change:_lastItem',(_0x3c0b61,_0xc9eab4,_0x1c67ab,_0x3ccf77)=>{_0x3ccf77&&_0x25ddf6['unbind']('minHeight'),_0x1c67ab?_0x25ddf6['bind']('minHeight')['to'](_0x1c67ab,'bottom'):_0x25ddf6['minHeight']=null;}),_0x25ddf6;}_updateLastItem(){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}_getItemBefore(_0x29e8bb){const _0x85ee53=this['_sidebarItemViewToAnnotation']['get'](_0x29e8bb),_0x2c6027=_0x85ee53&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x85ee53)-0x1);return _0x2c6027&&this['getSidebarItemView'](_0x2c6027)||null;}_getItemAfter(_0x4cd898){const _0x1a4c0c=this['_sidebarItemViewToAnnotation']['get'](_0x4cd898),_0x1bf71a=_0x1a4c0c&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x1a4c0c)+0x1);return _0x1bf71a&&this['getSidebarItemView'](_0x1bf71a)||null;}_alignBeforeItem(_0x9c5fe9,_0x5290c4){_0x9c5fe9['updateHeight']();const _0x5e24ba=De(_0x5290c4['bottom']+this['_spaceBetweenItems'],_0x9c5fe9['top']);return!!_0x5e24ba&&(this['_setItemTop'](_0x5290c4,_0x5290c4['top']-_0x5e24ba),!0x0);}_alignAfterItem(_0x2e5e2b,_0x5a677e){_0x2e5e2b['updateHeight']();const _0x4c2c15=De(_0x2e5e2b['bottom']+this['_spaceBetweenItems'],_0x5a677e['top']);return!!_0x4c2c15&&(this['_setItemTop'](_0x5a677e,_0x5a677e['top']+_0x4c2c15,!0x1),!0x0);}_alignToTargetRect(_0x55f376){const _0x8aac02=this['_sidebarItemViewToAnnotation']['get'](_0x55f376);if(!_0x8aac02||!_0x8aac02['target']||!_0x8aac02['targetRect'])return;const _0x33f0f3=this['_getTargetTop'](_0x8aac02,_0x8aac02['targetRect']);this['_setItemTop'](_0x55f376,_0x33f0f3);}_getTargetTop(_0x134ff2,_0x123698){if(null===_0x123698)return 0x0;if(_0x134ff2['target']instanceof _0xa06a55)return _0x123698['top'];{const _0x592291=new _0xa06a55(this['view']['element'])['top'];return _0x123698['top']-_0x592291;}}_setItemTop(_0x799d05,_0xd417d4,_0x1e56e6=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x1e56e6&&(_0xd417d4=Math['max'](_0xd417d4,this['_getMaxAvailableTop'](_0x799d05))),_0x799d05['top']=_0xd417d4;}_getMaxAvailableTop(_0x488061){let _0x1c25cc=this['_getItemBefore'](_0x488061),_0x5af0ea=0x0;for(;_0x1c25cc;)_0x1c25cc['updateHeight'](),_0x5af0ea+=this['_spaceBetweenItems']+_0x1c25cc['height'],_0x1c25cc=this['_getItemBefore'](_0x1c25cc);return _0x5af0ea;}};function De(_0x579564,_0x55eec6){return Math['max'](_0x579564-_0x55eec6,0x0);}function Ve(_0x4bb0d6){return null!==_0x4bb0d6&&'object'==typeof _0x4bb0d6&&0x1===_0x4bb0d6['nodeType'];}var Be=class extends _0x11bb03{isAttached;annotations;_editorAnnotations;_refreshPositioningDebounced;static get requires(){return[Le,Me];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x57ed2b){super(_0x57ed2b),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x5d3b53(),this['_refreshPositioningDebounced']=_0x48da56(()=>{_0x57ed2b['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}init(){const _0x34bf2b=this['context']['plugins']['get'](Me),_0x4ffd47=this['context']['plugins']['get'](Le);_0x34bf2b['register']('wideSidebar',this),_0x4ffd47['container']&&_0x34bf2b['switchTo']('wideSidebar');}setActiveAnnotation(_0x2d2b5b){if(_0x2d2b5b===this['activeAnnotation'])return;const _0x581edb=this['context']['plugins']['get'](Le);_0x581edb['_activeAnnotation']=_0x2d2b5b;const _0x5e2aef=this['activeAnnotation'];_0x581edb['refresh']({'blurredAnnotation':_0x5e2aef,'activatedAnnotation':_0x2d2b5b}),this['activeAnnotation']=_0x2d2b5b;}attach(_0x4ed0b9){this['annotations']=_0x4ed0b9;const _0x224ffa=this['context']['plugins']['get'](Le);if(_0x224ffa['_annotations']=_0x4ed0b9,this['isAttached'])throw new _0x11a517('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x224ffa,'set:container',()=>{this['detach'](),this['listenTo'](_0x224ffa,'change:container',_0x9b200c=>{_0x9b200c['off'](),this['attach'](_0x4ed0b9);});}),_0x224ffa['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x1217da=_0x280556=>{_0x280556['updateTargetRect'](),_0x224ffa['addAnnotation'](_0x280556);};for(const _0x2b43a8 of _0x4ed0b9)_0x1217da(_0x2b43a8);this['listenTo'](_0x4ed0b9,'add',(_0x2a5831,_0x1d84c2)=>{_0x1217da(_0x1d84c2);}),this['listenTo'](_0x4ed0b9,'remove',(_0x2832a9,_0x151abb,_0x20bc50)=>{_0x224ffa['rearrange']({'removedAnnotation':_0x151abb,'previousAnnotation':_0x4ed0b9['get'](_0x20bc50-0x1),'nextAnnotation':_0x4ed0b9['get'](_0x20bc50+0x1)}),_0x151abb===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x4ed0b9,'focus',(_0x3282ec,_0x16c2f1)=>{this['setActiveAnnotation'](_0x16c2f1);}),this['listenTo'](_0x4ed0b9,'blur',()=>{this['setActiveAnnotation'](null);});const _0x22c938=this['context']instanceof _0x34fe97?this['context']['editors']:new _0x5d3b53([this['context']]);for(const _0x3aa1ef of _0x22c938)this['_integrateWithEditorAnnotations'](_0x3aa1ef);this['listenTo'](_0x22c938,'add',(_0x1178ee,_0x26e6fa)=>{this['listenTo'](_0x26e6fa,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x26e6fa);});}),this['listenTo'](_0x22c938,'remove',(_0x30415a,_0x5df437)=>{_0x5df437['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x5df437['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}detach(){if(!this['isAttached'])throw new _0x11a517('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x2239e7=this['context']['plugins']['get'](Le);_0x2239e7['_detachFromContainer'](this['annotations']),this['stopListening'](_0x2239e7),this['stopListening'](this['annotations']),this['context']instanceof _0x34fe97&&this['stopListening'](this['context']['editors']);for(const _0x1c26ba of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x1c26ba);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach']();}_integrateWithEditorAnnotations(_0x46cc3b){if(!_0x46cc3b['plugins']['has']('EditorAnnotations'))return;const _0x2a1852=_0x46cc3b['plugins']['get']('EditorAnnotations'),_0x4b3113=()=>{const _0x22ed65=_0x2a1852['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x22ed65[0x0]||null);};this['listenTo'](_0x2a1852,'refresh',_0x4b3113),this['listenTo'](_0x2a1852,'blur',(_0x331c26,{isAnnotationTracked:_0x479a92})=>{this['activeAnnotation']&&_0x479a92(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x2a1852,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x129c9c=>{_0x2a1852['hasDomSelection']()&&(_0x4b3113(),_0x129c9c['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2a1852);}_destroyEditorAnnotationsIntegration(_0x3b3857){this['stopListening'](_0x3b3857),this['_editorAnnotations']['remove'](_0x3b3857);}},He=class extends et{counterView;constructor(_0x252fee){super(_0x252fee);const _0x3707fa=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x4e936c,_0x52718f)=>_0x4e936c?'…':_0x52718f['toString']()),this['set']('annotationType',''),this['bind']('icon')['to'](this,'annotationType',_0x35a030=>'comment'===_0x35a030?_0x3fb11b:_0x25ae74),this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new ut(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x3707fa['to']('annotationType',_0x456c62=>'ck-annotation-counter__badge--'+_0x456c62),_0x3707fa['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x3707fa['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Ue=class extends _0x11bb03{isAttached;annotations;_manuallyClosedAnnotationViews;_domEmitter;_annotationToNarrowView;_selectedAnnotations;_editorAnnotations;_refreshPositioningDebounced;static get requires(){return[Le,Me];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x426205){super(_0x426205),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x46fc5b())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x5d3b53(),this['_refreshPositioningDebounced']=_0x48da56(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}init(){this['context']['plugins']['get'](Me)['register']('narrowSidebar',this),this['_overlayHost']=new mt(this['context']['locale'],{'resolveMountTarget':()=>this['_resolveOverlayTarget'](),'resolveInlineContainer':()=>this['context']['plugins']['get'](Le)['container']}),this['_overlayHost']['sync'](),this['bodyCollection']=this['_overlayHost']['bodyCollection'],this['balloonPanelView']=new tt(this['context']['locale']),this['bodyCollection']['add'](this['balloonPanelView']);}attach(_0x1b8731){this['annotations']=_0x1b8731;const _0x11fa2f=this['context']['plugins']['get'](Le),_0x3fef56=this['balloonPanelView'];if(_0x11fa2f['_annotations']=_0x1b8731,this['isAttached'])throw new _0x11a517('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x11fa2f,'set:container',()=>{this['detach'](),this['listenTo'](_0x11fa2f,'change:container',_0x4e46cc=>{_0x4e46cc['off'](),this['attach'](_0x1b8731);});}),_0x11fa2f['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5}),this['_overlayHost']['sync']();const _0xed4ed9=_0x5649bc=>{const _0x5d72f9=new He(this['context']['locale']);_0x11fa2f['addAnnotation'](_0x5649bc,_0x5d72f9),this['_annotationToNarrowView']['set'](_0x5649bc,_0x5d72f9),_0x5d72f9['bind']('isDirty','annotationType','number')['to'](_0x5649bc['view'],'isDirty','type','length'),_0x5d72f9['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x3fef56['content']['first']!==_0x5649bc['view']?(this['_showBalloon'](_0x5649bc),_0x5649bc['view']['element']['focus'](),this['setActiveAnnotation'](_0x5649bc)):this['setActiveAnnotation'](null);});};for(const _0x5c3ad0 of _0x1b8731)_0xed4ed9(_0x5c3ad0);this['listenTo'](_0x1b8731,'add',(_0x5d498d,_0x54a619)=>{_0xed4ed9(_0x54a619);}),this['listenTo'](_0x1b8731,'remove',(_0xbde8e1,_0x1107d6,_0x498f9d)=>{this['_annotationToNarrowView']['get'](_0x1107d6)['destroy'](),this['_annotationToNarrowView']['delete'](_0x1107d6),_0x11fa2f['rearrange']({'removedAnnotation':_0x1107d6,'previousAnnotation':_0x1b8731['get'](_0x498f9d-0x1),'nextAnnotation':_0x1b8731['get'](_0x498f9d+0x1)}),_0x1107d6===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x1b8731,'focus',(_0x5c32f0,_0x2bd8f8)=>{this['setActiveAnnotation'](_0x2bd8f8);}),this['listenTo'](_0x1b8731,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x3129b3,_0x12fb14)=>{_0x12fb14['keyCode']===_0x1eccb2['esc']&&_0x3fef56['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x3fef56['content']['first']),this['_hideBalloon'](),_0x12fb14['stopPropagation'](),_0x12fb14['preventDefault']());}),pt({'emitter':this['_domEmitter'],'activator':()=>_0x3fef56['isVisible']&&!this['_hasEditorDomSelection'](),'contextElements':()=>{const _0x4c1d10=[_0x11fa2f['view']['element']];return _0x3fef56['isVisible']&&_0x4c1d10['push'](_0x3fef56['element']),this['activeAnnotation']&&_0x4c1d10['push'](...this['activeAnnotation']['focusableElements']),_0x4c1d10;},'callback':()=>{this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null);}});const _0x4b61db=this['context']instanceof _0x34fe97?this['context']['editors']:new _0x5d3b53([this['context']]);for(const _0x328322 of _0x4b61db)this['_integrateWithEditorAnnotations'](_0x328322);this['listenTo'](_0x4b61db,'add',(_0x1900a4,_0x2d45f1)=>{this['listenTo'](_0x2d45f1,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x2d45f1);});}),this['listenTo'](_0x4b61db,'remove',(_0xe95475,_0x290f3d)=>{_0x290f3d['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x290f3d['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}setActiveAnnotation(_0x4944aa){if(_0x4944aa===this['activeAnnotation'])return;const _0x2e35ec=this['context']['plugins']['get'](Le);_0x2e35ec['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x4944aa,'disableAnimationOnActivatedAnnotation':!0x0}),_0x4944aa&&_0x2e35ec['getSidebarItemView'](_0x4944aa)?this['_showBalloon'](_0x4944aa):this['_hideBalloon'](),this['activeAnnotation']=_0x4944aa;}detach(){if(!this['isAttached'])throw new _0x11a517('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x2eba60=this['context']['plugins']['get'](Le);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x54c0ad=>_0x54c0ad['destroy']()),this['_annotationToNarrowView']['clear'](),_0x2eba60['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x34fe97&&this['stopListening'](this['context']['editors']);for(const _0x376a52 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x376a52);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['_selectedAnnotations']=[],this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach'](),this['_overlayHost']['destroy']();}_integrateWithEditorAnnotations(_0x41be25){if(!_0x41be25['plugins']['has']('EditorAnnotations'))return;const _0xf067ae=_0x41be25['plugins']['get']('EditorAnnotations'),_0x2d3d10=this['context']['plugins']['get'](Le),_0x66da5=this['annotations'],_0x283cc1=this['balloonPanelView'],_0x352b2d=()=>{const _0x24f457=_0xf067ae['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x24f457),this['setActiveAnnotation'](_0x24f457[0x0]||null);};this['listenTo'](_0xf067ae,'refresh',_0x352b2d),this['listenTo'](_0xf067ae,'blur',(_0x11df7a,{isAnnotationTracked:_0xa7ae85})=>{this['activeAnnotation']&&_0xa7ae85(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0xf067ae,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x66da5,'blur',_0x47a68a=>{_0xf067ae['hasDomSelection']()&&_0x47a68a['stop']();},{'priority':'high'}),pt({'emitter':this['_domEmitter'],'activator':()=>!!this['activeAnnotation'],'contextElements':()=>{const _0xb3528d=[_0x2d3d10['view']['element']];return _0x283cc1['isVisible']&&_0xb3528d['push'](_0x283cc1['element']),_0xb3528d;},'callback':()=>{_0xf067ae['hasDomSelection']()&&_0x352b2d();}}),this['_editorAnnotations']['add'](_0xf067ae),this['_overlayHost']['sync']();}_destroyEditorAnnotationsIntegration(_0x25dac1){_0x25dac1&&(this['stopListening'](_0x25dac1),this['_editorAnnotations']['remove'](_0x25dac1));}_hasEditorDomSelection(){return Array['from'](this['_editorAnnotations'])['some'](_0x5059c5=>_0x5059c5['hasDomSelection']());}_setSelectedAnnotations(_0x1ca5ad){for(const _0x1c0844 of this['_selectedAnnotations'])_0x1ca5ad['includes'](_0x1c0844)||this['_manuallyClosedAnnotationViews']['delete'](_0x1c0844['view']);this['_selectedAnnotations']=_0x1ca5ad;}_refreshPositioning(){const _0x222e5c=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x222e5c['isVisible']&&this['_updateBalloonPosition']();}_resolveOverlayTarget(){const _0x2eccb8=this['context']['config']['get']('sidebar.overlayContainer')||this['context']['config']['get']('ui.overlayContainer');if(_0x2eccb8)return _0x2eccb8;const _0x55532b=this['context']['plugins']['get'](Le)['container'];return _0x55532b?_0x228363(_0x55532b):null;}['_showBalloon'](_0x476c06){if(this['_manuallyClosedAnnotationViews']['has'](_0x476c06['view']))return;const _0x4c03f2=this['balloonPanelView']['content']['first'];_0x4c03f2!==_0x476c06['view']?(_0x4c03f2&&this['_detachListeners'](_0x4c03f2),this['_overlayHost']['sync'](),this['_attachListeners'](_0x476c06['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x476c06['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}_updateBalloonPosition(){const _0x2a2416=this['balloonPanelView']['content']['first'],_0x471961=_0x2a2416&&this['annotations']['getByView'](_0x2a2416);if(!_0x471961||!this['_annotationToNarrowView']['has'](_0x471961))return;const _0x49dbd8=this['_annotationToNarrowView']['get'](_0x471961)['element'],_0xfc1fbb=(function(){const _0x400e66=tt['defaultPositions'];return[_0x400e66['southArrowNorthEast'],_0x400e66['northArrowSouthEast'],_0x400e66['southArrowNorth'],_0x400e66['northArrowSouth'],_0x400e66['southArrowNorthWest'],_0x400e66['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x49dbd8,'positions':_0xfc1fbb});}['_hideBalloon'](){const _0x3a0977=this['balloonPanelView'],_0x2a9deb=_0x3a0977['content']['first'];_0x2a9deb&&(this['_detachListeners'](_0x2a9deb),_0x3a0977['unpin'](),_0x3a0977['content']['clear']());}_attachListeners(_0x593d48){this['listenTo'](_0x593d48,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x593d48,'Esc',(_0x49afae,_0x243d38)=>{this['_manuallyClosedAnnotationViews']['add'](_0x593d48),this['_hideBalloon'](),_0x243d38();});}_detachListeners(_0x310471){this['stopListening'](_0x310471);}},Fe=class extends _0x3e22c6{isAttached;annotations;['_manuallyClosed'];['_balloon'];_addedAnnotations;_selectedAnnotations;['_forceRefresh'];_refreshVisibilityDebounced;static get requires(){return[_e,it,Me];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1189eb){super(_0x1189eb),_0x1189eb['editing']['view']['addObserver'](_t),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x1189eb['plugins']['get'](it),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x48da56(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}init(){const _0x5a649c=this['editor']['plugins']['get'](Me);_0x5a649c['context']===this['editor']&&(_0x5a649c['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x43cf54,_0x4706fd)=>{const _0x161a72=this['_balloon'];if(this['isAttached']&&_0x161a72['visibleView']){const _0x2df4f1=this['annotations']['getByView'](_0x161a72['visibleView']);_0x2df4f1&&this['_closeAnnotation'](_0x2df4f1),_0x4706fd();}}));}afterInit(){const _0x3c225b=this['editor']['plugins']['get'](Me);_0x3c225b['context']===this['editor']&&(_0x3c225b['hasActive']()||_0x3c225b['switchTo']('inline'));}setActiveAnnotation(_0x5cc98e){_0x5cc98e!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x5cc98e&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x5cc98e)&&this['_addAnnotationToBalloon'](_0x5cc98e,!0x0),_0x5cc98e['isActive']=!0x0),_0x5cc98e||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x5cc98e);}attach(_0x581b4d){this['annotations']=_0x581b4d;const _0x30e84a=this['editor']['plugins']['get'](Me),_0x257db9=this['_balloon'];if(this['isAttached'])throw new _0x11a517('inlineannotations-attach-already-attached',this);if(_0x30e84a['context']!==this['editor'])throw new _0x11a517('inlineannotations-not-allowed-with-context',this);const _0x55a6c4=this['editor']['plugins']['get'](_e);this['listenTo'](_0x55a6c4,'refresh',()=>{const _0x452b72=_0x55a6c4['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x40ce1a,_0x294ba0;!this['_forceRefresh']&&(_0x40ce1a=_0x452b72,_0x294ba0=this['_selectedAnnotations'],_0x40ce1a['length']===_0x294ba0['length']&&_0x40ce1a['every'](_0x31d0f5=>_0x294ba0['includes'](_0x31d0f5)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x452b72),this['setActiveAnnotation'](_0x452b72[0x0]||null));}),this['listenTo'](_0x55a6c4,'blur',(_0x2657af,{isAnnotationTracked:_0x3c2fc4})=>{this['activeAnnotation']&&_0x3c2fc4(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x55a6c4,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x24a33d,_0x128fbf,_0x1c7dee)=>{_0x1c7dee||this['setActiveAnnotation'](null);}),this['listenTo'](_0x581b4d,'remove',(_0x4f63a0,_0x3eba7d)=>{this['_removeAnnotationFromBalloon'](_0x3eba7d),_0x3eba7d===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x257db9,'change:visibleView',(_0x53b019,_0x42d1df,_0x344d90,_0x163640)=>{_0x163640&&this['stopListening'](_0x163640);const _0x17c537=_0x581b4d['getByView'](_0x344d90);_0x344d90&&_0x17c537&&(this['listenTo'](_0x344d90,'change:height',()=>{_0x257db9['updatePosition']();}),this['listenTo'](_0x344d90,'Esc',()=>{this['_closeAnnotation'](_0x17c537),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x17c537&&this['setActiveAnnotation'](_0x17c537));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x257db9['visibleView']&&_0x581b4d['getByView'](_0x257db9['visibleView'])&&_0x257db9['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 _0x11a517('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x50ca30 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x50ca30);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}_setSelectedAnnotations(_0x368262){for(const _0x2fa7ad of this['_selectedAnnotations'])_0x368262['includes'](_0x2fa7ad)||this['_manuallyClosed']['delete'](_0x2fa7ad);for(const _0xc05dd1 of this['annotations'])_0x368262['includes'](_0xc05dd1)||this['_removeAnnotationFromBalloon'](_0xc05dd1);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x385776 of _0x368262)this['_addAnnotationToBalloon'](_0x385776);}this['_selectedAnnotations']=_0x368262;}_addAnnotationToBalloon(_0x97efc8,_0x226e06=!0x1){this['_manuallyClosed']['has'](_0x97efc8)||(this['_addedAnnotations']['has'](_0x97efc8)||this['_balloon']['hasView'](_0x97efc8['view'])||(this['_addedAnnotations']['add'](_0x97efc8),this['_balloon']['add']({'stackId':_0x97efc8['view']['id'],'view':_0x97efc8['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x97efc8)}})),_0x226e06&&this['_balloon']['showStack'](_0x97efc8['view']['id']));}_getBalloonTargetForAnnotation(_0x3f7631){const _0x4ea39d=_0x3f7631['target'],_0x33fea4=this['editor']['editing']['view'],_0x3f7906=_0x33fea4['document']['selection']['getFirstRange'](),_0x3f0570=_0x33fea4['domConverter']['viewRangeToDom'](_0x3f7906);if(_0x3f0570['collapse'](!0x0),_0x4ea39d){if(_0x4ea39d instanceof _0xa06a55)return _0x4ea39d;let _0x466db5=[];for(const _0x14e146 of _0x4ea39d)_0x466db5['push'](..._0xa06a55['getDomElementRects'](_0x14e146));_0x466db5=function(_0x1a00fe){const _0x5ef093=[];let _0x34c904=_0x1a00fe[0x0];for(let _0x4d3837=0x1;_0x4d3837<_0x1a00fe['length'];_0x4d3837++)if(We(_0x34c904,_0x1a00fe[_0x4d3837])){const _0x81aa9=_0x1a00fe[_0x4d3837]['width'];_0x34c904['width']+=_0x81aa9,_0x34c904['right']+=_0x81aa9;}else _0x5ef093['push'](_0x34c904),_0x34c904=_0x1a00fe[_0x4d3837];return _0x5ef093['push'](_0x34c904),_0x5ef093;}(_0x466db5);const _0x54b167=_0x3f0570['getBoundingClientRect']();return _0x466db5['find'](_0x4ceda3=>_0x4ceda3['top']<=_0x54b167['top']&&_0x4ceda3['bottom']>=_0x54b167['bottom']&&_0x4ceda3['left']<=_0x54b167['left']&&_0x4ceda3['right']>=_0x54b167['right'])||_0x466db5[0x0];}return _0x3f7631['targetRect']||_0x3f0570;}_removeAnnotationFromBalloon(_0x5e1333){this['_addedAnnotations']['has'](_0x5e1333)&&this['_balloon']['hasView'](_0x5e1333['view'])&&(this['_addedAnnotations']['delete'](_0x5e1333),this['_balloon']['remove'](_0x5e1333['view']));}_closeAnnotation(_0x2ce77b){this['_manuallyClosed']['add'](_0x2ce77b),this['_removeAnnotationFromBalloon'](_0x2ce77b);}};function We(_0x4e4d14,_0x427ef8){return _0x4e4d14['top']===_0x427ef8['top']&&_0x4e4d14['bottom']===_0x427ef8['bottom']&&_0x4e4d14['right']===_0x427ef8['left'];}var Ke=class extends ut{['focusTracker'];['focusCycler'];_annotationViews;constructor(_0x1212e0,_0x5be203){super(_0x1212e0),this['set']('isEmpty',!_0x5be203['length']),this['focusTracker']=new _0x1d34e2(),this['_annotationViews']=_0x5be203,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new ht({'focusables':_0x5be203,'focusTracker':this['focusTracker']}),this['listenTo'](_0x5be203,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x5be203,'remove',(_0x7f6532,_0x1e48f8)=>{_0x1e48f8['isActive']&&this['focus'](),_0x5be203['length']||(this['isEmpty']=!0x0);});const _0x173683=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':St(_0x1212e0,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x5be203},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x173683['if']('isEmpty','ck-hidden',_0x37dd69=>!_0x37dd69)]},'children':[{'text':St(_0x1212e0,'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 _0xd37525 of this['_annotationViews'])this['focusTracker']['add'](_0xd37525['element']);this['_annotationViews']['on']('change',(_0x2f5953,{added:_0x23b375,removed:_0x3f24b7})=>{for(const _0x3a4afa of _0x23b375)this['focusTracker']['add'](_0x3a4afa['element']);for(const _0x2aaa40 of _0x3f24b7)this['focusTracker']['remove'](_0x2aaa40['element']);});}},Ge=class extends _0x11bb03{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[ue,ae];}constructor(_0x3306dd){super(_0x3306dd),this['archivedThreads']=new _0x5d3b53();}init(){const _0x4efa78=this['context'],_0x1a68cf=_0x4efa78['plugins']['get'](ue),_0x313db7=_0x4efa78['plugins']['get'](ae);this['listenTo'](_0x1a68cf,'addCommentThread',(_0xe46870,{threadId:_0x218181})=>{const _0x5b86c0=_0x1a68cf['getCommentThread'](_0x218181);_0x5b86c0['archivedAt']&&this['archivedThreads']['add'](_0x5b86c0,this['_calculatePosition'](_0x5b86c0['archivedAt'])),this['listenTo'](_0x5b86c0,'change:archivedAt',(_0x397886,_0x591540,_0x234867)=>{_0x234867?this['archivedThreads']['has'](_0x5b86c0)||this['archivedThreads']['add'](_0x5b86c0,this['_calculatePosition'](_0x5b86c0['archivedAt'])):this['archivedThreads']['has'](_0x5b86c0)&&this['archivedThreads']['remove'](_0x5b86c0);});}),this['listenTo'](_0x1a68cf,'removeCommentThread',(_0x234e70,{threadId:_0x18ed2e})=>{const _0xbe6e77=_0x1a68cf['getCommentThread'](_0x18ed2e);this['stopListening'](_0xbe6e77),this['archivedThreads']['has'](_0xbe6e77)&&this['archivedThreads']['remove'](_0xbe6e77);},{'priority':'highest'}),this['listenTo'](_0x313db7['collection'],'focus',(_0x4462d1,_0x131f6a)=>{_0x131f6a['isVisible']||(_0x131f6a['isActive']=!0x0,_0x313db7['activate'](_0x131f6a));});}_calculatePosition(_0x49c8cc){const _0x2d4d64=[...this['archivedThreads']]['findIndex'](_0x3501ca=>_0x3501ca['archivedAt']<_0x49c8cc);return _0x2d4d64>-0x1?_0x2d4d64:this['archivedThreads']['length'];}},Ye=class extends _0x3e22c6{commentsArchiveView;annotationViews;['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Ge,st];}constructor(_0x22f8d6){super(_0x22f8d6),this['annotationViews']=new ft(),this['_pendingThreads']=[];}init(){const _0x571fe3=this['editor'],_0x2af168=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x571fe3['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](et,!0x0)),_0x571fe3['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x4b6238=this['_createCommentsArchiveButton'](lt);return _0x4b6238['set']({'role':'menuitemcheckbox'}),_0x4b6238;});const _0x177d91=_0x571fe3['plugins']['get'](Ge),_0x3e83b9=_0x571fe3['plugins']['get']('Annotations'),_0x1dda94=_0x571fe3['plugins']['get']('CommentsRepository');_0x177d91['archivedThreads']['forEach'](_0xa520fc=>{this['_handleNewThread'](_0xa520fc);}),this['listenTo'](_0x177d91['archivedThreads'],'add',(_0x363477,_0x4c6b50)=>{this['_handleNewThread'](_0x4c6b50);}),this['listenTo'](_0x3e83b9['collection'],'add',(_0x3aecea,_0x4f754a)=>{const _0x5d6d61=this['_pendingThreads']['find'](_0x2eea77=>{const _0x47d5be=_0x1dda94['_threadToController']['get'](_0x2eea77);return _0x47d5be&&_0x4f754a['innerView']===_0x47d5be['view'];});if(_0x5d6d61){const _0x17c85e=this['_calculatePosition'](_0x5d6d61['archivedAt']);this['_addAnnotationToArchive'](_0x4f754a,_0x17c85e),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x5d6d61),0x1);}}),this['listenTo'](_0x177d91['archivedThreads'],'remove',(_0x4310bc,_0x5861b6)=>{const _0xe58f75=_0x571fe3['config']['get']('collaboration.channelId');if(!_0xe58f75||_0x5861b6['channelId']===_0xe58f75){if(this['_pendingThreads']['includes'](_0x5861b6))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x5861b6),0x1);else{const _0x5b77d9=_0x1dda94['_threadToController']['get'](_0x5861b6),_0x29c107=_0x3e83b9['getByInnerView'](_0x5b77d9['view']);this['annotationViews']['remove'](_0x29c107['view']),this['stopListening'](_0x29c107),this['stopListening'](_0x29c107['focusableElements']);}}}),this['listenTo'](_0x3e83b9['collection'],'add',(_0x461408,_0x20cb7e)=>{this['listenTo'](_0x20cb7e,'escape',_0x2af168);}),this['listenTo'](_0x3e83b9['collection'],'remove',(_0x33b138,_0x32019e)=>{this['stopListening'](_0x32019e,'escape',_0x2af168);});}_addAnnotationToArchive(_0x4142da,_0x293be8){this['listenTo'](_0x4142da,'set:isVisible',_0x2ead50=>{_0x2ead50['return']=!0x1,_0x2ead50['stop']();}),this['annotationViews']['add'](_0x4142da['view'],_0x293be8);}['_handleNewThread'](_0x24b5ec){const _0x419563=this['editor']['plugins']['get']('CommentsRepository'),_0x63b3e2=this['editor']['plugins']['get']('Annotations'),_0x52f3be=this['editor']['config']['get']('collaboration.channelId');if(!_0x52f3be||_0x24b5ec['channelId']===_0x52f3be){const _0x4cd4ef=_0x419563['_threadToController']['get'](_0x24b5ec);if(!_0x4cd4ef)return void this['_pendingThreads']['push'](_0x24b5ec);const _0x2d7c9f=this['_calculatePosition'](_0x24b5ec['archivedAt']),_0x30cbd9=_0x63b3e2['getByInnerView'](_0x4cd4ef['view']);_0x30cbd9['isVisible']&&_0x63b3e2['_visibleAnnotations']['remove'](_0x30cbd9),this['_addAnnotationToArchive'](_0x30cbd9,_0x2d7c9f);}}_calculatePosition(_0x4d94c8){const _0x4d57e2=this['editor']['config']['get']('collaboration.channelId'),_0x4f604a=[...this['editor']['plugins']['get'](Ge)['archivedThreads']]['filter'](_0x393c2a=>_0x393c2a['channelId']===_0x4d57e2)['findIndex'](_0x19adcb=>_0x19adcb['archivedAt']<_0x4d94c8);return _0x4f604a<0x0||_0x4f604a>this['annotationViews']['length']?this['annotationViews']['length']:_0x4f604a-0x1;}_toggleDialog(){const _0x3d4a06=this['editor'],_0x1eab3c=_0x3d4a06['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Ke(_0x3d4a06['locale'],this['annotationViews'])),'commentsArchive'===_0x1eab3c['id']?_0x1eab3c['hide']():_0x1eab3c['show']({'id':'commentsArchive','title':St(_0x3d4a06['locale'],'COMMENTS_ARCHIVE'),'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':nt['EDITOR_TOP_SIDE']});}_createCommentsArchiveButton(_0xc56df9,_0x378e81=!0x1){const _0x3c5f15=this['editor']['locale'],_0x53a8ca=this['editor']['plugins']['get']('Dialog'),_0x4b6032=new _0xc56df9(_0x3c5f15);return _0x4b6032['bind']('isEnabled')['to'](this,'isEnabled'),_0x4b6032['bind']('isOn')['to'](_0x53a8ca,'id',_0x586a04=>'commentsArchive'===_0x586a04),_0x4b6032['set']({'label':St(_0x3c5f15,'COMMENTS_ARCHIVE'),'icon':_0x22cd11,'isToggleable':!0x0}),_0x378e81&&(_0x4b6032['tooltip']=!0x0),this['listenTo'](_0x4b6032,'execute',()=>this['_toggleDialog']()),_0x4b6032;}_hideDialogOnAnnotationEscape=_0x343c7d=>{const _0x3dc769=_0x343c7d['source'];if(!this['annotationViews']['has'](_0x3dc769['view']))return;const _0x3db006=this['editor']['plugins']['get']('Dialog');_0x3db006['isOpen']&&'commentsArchive'===_0x3db006['id']&&(_0x3db006['hide'](),_0x343c7d['stop']());};},Xe=class extends _0x3e22c6{static get requires(){return[ue,Ie,Ne,Ge,Ye,Oe,Be,Ue,Fe];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{ge as AddCommentThreadCommand,se as Annotation,oe as AnnotationCollection,He as AnnotationCounterButtonView,ee as AnnotationView,ae as Annotations,Pe as AnnotationsSidebarItemView,xe as AnnotationsSidebarView,Me as AnnotationsUIs,qt as BaseCommentThreadView,Jt as BaseCommentView,pe as Comment,fe as CommentThread,xt as CommentThreadController,Ut as CommentThreadInputView,$t as CommentThreadView,Zt as CommentView,Xe as Comments,Ge as CommentsArchive,Ye as CommentsArchiveUI,Ie as CommentsEditing,Wt as CommentsListView,Oe as CommentsOnly,ue as CommentsRepository,Ne as CommentsUI,_e as EditorAnnotations,Fe as InlineAnnotations,Ue as NarrowSidebar,Le as Sidebar,Be as WideSidebar,re as bindAnnotationCollections};
23
+ import{Command as _0x2883af,Context as _0x274b82,ContextPlugin as _0x49d18b,Editor as _0x2e8dd0,PendingActions as _0x37860f,Plugin as _0x3cd9f9}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x3e0d28,Collection as _0x49bb96,DomEmitterMixin as _0x1d5bf9,FocusTracker as _0x38a73f,KeystrokeHandler as _0x15a0f3,ObservableMixin as _0x5c32ab,Rect as _0x416a59,containsNode as _0x4cf8d3,diff as _0x5853b8,first as _0x520ecf,getEnvKeystrokeText as _0x198bcf,getOverlayMountRoot as _0x3dfb64,keyCodes as _0x2a3630,priorities as _0x48c2ba,scrollViewportToShowTarget as _0x18f994,toUnit as _0x603364,trustedHtml as _0x2d0a81,uid as _0x2f6db9}from'@ckeditor/ckeditor5-utils';import{AriaDescriptionView as _0x4625a0,ConfirmMixin as _0x208d1a,FOCUS_ANNOTATION_KEYSTROKE as _0x16c825,LateFocusButtonView as _0x58562b,LateFocusDropdownButtonView as _0x1e288c,UserView as _0x4e4fe3,Users as _0x131f9d,getAllMarkersDomElementsSorted as _0x108d59,getDateTimeFormatter as _0x792941,hashObject as _0x5245da,setupThreadKeyboardNavigation as _0x3803a1,surroundingMarkersDetector as _0x1354df,trimHtml as _0x5f27d8}from'@ckeditor/ckeditor5-collaboration-core';import{cloneDeep as _0x443a77,debounce as _0x31a136,isEqual as _0x76a3e5,set as _0x2af30b,throttle as _0x195ae3,unset as _0x293c76}from'es-toolkit/compat';import{IconAddComment as _0x5c9bee,IconCheck as _0x5cc95c,IconComments as _0x13f9dc,IconCommentsArchive as _0x25480b,IconDropdownArrow as _0x1202c7,IconPencil as _0xa0f495,IconRemoveComment as _0x241a26,IconThreeVerticalDots as _0x56a027,IconTrackChanges as _0x50b486,IconUndo as _0x1cd43e}from'@ckeditor/ckeditor5-icons';import{BalloonPanelView as tt,ButtonView as et,ContextualBalloon as it,Dialog as st,DialogViewPosition as nt,EditorUI as ot,EditorUIView as rt,FocusCycler as ht,InlineEditableUIView as at,ListItemView as ct,ListView as dt,MenuBarMenuListItemButtonView as lt,OverlayHost as mt,View as ut,ViewCollection as ft,clickOutsideHandler as pt,createDropdown as wt,focusChildOnDropdownOpen as gt}from'@ckeditor/ckeditor5-ui';import{MouseObserver as _t,disableViewPlaceholder as At,enableViewPlaceholder as vt}from'@ckeditor/ckeditor5-engine';import{Clipboard as yt,ClipboardMarkersUtils as Ct,ClipboardPipeline as Tt}from'@ckeditor/ckeditor5-clipboard';import{Enter as It,ShiftEnter as bt}from'@ckeditor/ckeditor5-enter';import{SelectAll as Et}from'@ckeditor/ckeditor5-select-all';import{Typing as kt}from'@ckeditor/ckeditor5-typing';import{Undo as Nt}from'@ckeditor/ckeditor5-undo';import{Paragraph as Ot}from'@ckeditor/ckeditor5-paragraph';import{toWidget as Mt}from'@ckeditor/ckeditor5-widget';const Rt=/* #__PURE__ -- @preserve */
24
+ _0x5c32ab();var xt=class extends Rt{['model'];['view'];constructor(_0x623179,_0x165416){super(),this['model']=_0x623179,this['model']['_isAttached']=!0x0,this['view']=_0x165416,this['listenTo'](_0x165416,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x165416,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x165416,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x165416,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x165416,'addComment',(_0x502c3b,_0x34214a)=>this['addComment'](_0x34214a)),this['listenTo'](_0x165416,'updateComment',(_0x19bc0d,_0x39ca16,_0x29b4e8)=>this['updateComment'](_0x39ca16,_0x29b4e8)),this['listenTo'](_0x165416,'removeComment',(_0x494d4c,_0x5d1c50)=>this['removeComment'](_0x5d1c50));}submit(){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}addComment(_0x480284){this['model']['addComment']({'content':_0x480284,'authorId':this['view']['_localUser']['id']});}updateComment(_0x22b654,_0x19c6b4){this['model']['getComment'](_0x22b654)['update']({'content':_0x19c6b4});}removeComment(_0x432cd2){this['model']['getComment'](_0x432cd2)['remove']();}destroy(){this['stopListening'](),this['model']['_isAttached']=!0x1;}};function St(_0x1d6b79,_0x3040e5,_0x49632f){const t=_0x1d6b79['t'];switch(_0x3040e5){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'},_0x49632f);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%0\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x49632f);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'},_0x49632f);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'},_0x49632f);case'NUMBER_OF_COMMENTS':return t({'string':'Show\x20%0\x20comment','plural':'Show\x20%0\x20comments','id':'NUMBER_OF_COMMENTS'},_0x49632f);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'},_0x49632f);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'},_0x49632f);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'},_0x49632f);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'';}}var Pt=class extends rt{['main'];editable;constructor(_0x38a271,_0x154a2b){super(_0x38a271);const _0x399cac=_0x2f6db9();this['main']=this['createCollection'](),this['editable']=new at(_0x38a271,_0x154a2b,void 0x0,{'label':()=>St(_0x38a271,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x38a271['uiLanguageDirection'],'lang':_0x38a271['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x399cac},'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']();}},Lt=class extends ot{['view'];constructor(_0x2ca8da){super(_0x2ca8da),this['view']=new Pt(_0x2ca8da['locale'],_0x2ca8da['editing']['view']);}get element(){return this['view']['element'];}init(){const _0x57da14=this['editor']['editing']['view'],_0x755ce=this['view']['editable'];_0x755ce['name']=_0x57da14['document']['getRoot']()['rootName'],this['view']['render']();const _0x326e10=_0x755ce['element'];this['setEditableElement'](_0x755ce['name'],_0x326e10),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x57da14['attachDomRoot'](_0x326e10),this['fire']('ready');}destroy(){super['destroy'](),this['view']['destroy']();}};const Dt=[yt,It,bt,Et,kt,Nt,Ot],Vt=/* #__PURE__ -- @preserve */
25
+ _0x5c32ab(_0x2e8dd0);var Bt=class CommentEditor extends Vt{static defaultPlugins=/* #__PURE__ -- @preserve */
26
+ ((()=>Dt)());constructor(_0x516374={}){(_0x516374=Object['assign']({},_0x516374))['plugins']||(_0x516374['plugins']=CommentEditor['defaultPlugins']),super(_0x516374),this['ui']=new Lt(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this['editing']['view']['_overlayModeHint']='auto',this['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}create(){const _0x3e39fc=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x3e39fc))['then'](()=>this['fire']('ready'));}destroy(){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x1f0d73=>{const _0x54c750=this['model']['document']['getRoot'](),_0x2d7e62=_0x54c750&&_0x54c750['getChild'](_0x54c750['childCount']-0x1);_0x1f0d73['setSelection'](_0x2d7e62,'end'),this['editing']['view']['focus']();});}_updatePlaceholder(){const _0x2fc529=this['editing']['view'],_0x168d75=_0x2fc529['document']['getRoot'](),_0x48085c=_0x168d75['getChild'](0x0);_0x168d75['childCount']>0x1||!_0x48085c||'p'!=_0x48085c['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(At(_0x2fc529,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x48085c['placeholder']=this['placeholder']),vt({'view':_0x2fc529,'element':_0x48085c,'keepOnFocus':!0x0}),this['placeholderElement']=_0x48085c);}},Ht=class extends ut{keystrokes;['focusTracker'];['focusables'];['focusCycler'];submitButtonView;cancelButtonView;_editorConfig;constructor(_0x3b6c52,_0x31279d={}){super(_0x3b6c52),this['editor']=null,this['_editorConfig']=_0x31279d,this['set']('value',_0x31279d['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',St(_0x3b6c52,'Reply...')),this['set']('submitLabel',St(_0x3b6c52,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['cancelButtonView'],this['submitButtonView']]),this['keystrokes']=new _0x15a0f3(),this['focusTracker']=new _0x38a73f(),this['focusCycler']=new ht({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xf12bb9=>!_0xf12bb9['defaultPrevented']},'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['cancelButtonView'],this['submitButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x5a3e8a,_0x49216)=>{this['cancelButtonView']['fire']('execute'),_0x49216();}),this['keystrokes']['set']('Ctrl+Enter',(_0x38a54d,_0x54ac4e)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x54ac4e());}),this['on']('submit',(_0x5208ba,_0x4a1359)=>{_0x4a1359['length']>0xfde8?(alert(St(_0x3b6c52,'TOO_LONG_COMMENT_ALERT',[_0x4a1359['length'],0xfde8])),_0x5208ba['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}createEditor(){return this['editor']||(this['editor']=new Bt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x3ca41f=this['editor'];this['element']['insertBefore'](_0x3ca41f['ui']['element'],this['element']['firstChild']),_0x3ca41f['model']['document']['on']('change',()=>this['value']=_0x3ca41f['getData']()),_0x3ca41f['bind']('placeholder')['to'](this),this['focusables']['add'](_0x3ca41f['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x1d2b1c){-0x1===_0x1d2b1c?(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:_0x53e7f1}=this,_0x29335d=new et(_0x53e7f1);return _0x29335d['extendTemplate']({'attributes':{'class':['ck-button-action','ck-comment__input-actions--submit']}}),_0x29335d['withText']=!0x0,_0x29335d['bind']('label')['to'](this,'submitLabel'),_0x29335d['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x29335d['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x2f2e5,_0x315915)=>!_0x315915&&!!_0x2f2e5['trim']()),_0x29335d;}_createCancelButton(){const {locale:_0x592bf9}=this,_0x4091f0=new et(_0x592bf9);return _0x4091f0['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x4091f0['label']=St(_0x592bf9,'Cancel'),_0x4091f0['withText']=!0x0,_0x4091f0['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x4091f0;}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x3a9d28=>{this['focusTracker']['add'](_0x3a9d28['element']);}),this['focusables']['on']('change',(_0x286d41,_0x82b5c)=>{for(const _0x4a8502 of Array['from'](_0x82b5c['added'])['reverse']())this['focusTracker']['add'](_0x4a8502['element']);});}},Ut=class extends ut{constructor(_0xbc66f8,_0x550af8,_0x22779c){super(_0xbc66f8),this['commentInputView']=new Ht(_0xbc66f8,_0x22779c),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0xe9810,_0x161e8c)=>_0xe9810||!!_0x161e8c),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 _0x4e4fe3(_0xbc66f8,_0x550af8),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'](_0x11f4b7){this['commentInputView']['focus'](_0x11f4b7);}_focusOnNonInteractiveMouseDown(){this['listenTo'](this['element'],'mousedown',(_0xd17f3c,_0x286f2a)=>{const {submitButtonView:_0xa63573,cancelButtonView:_0x38f4cc,editor:_0x8c5182}=this['commentInputView'];[_0xa63573['element'],_0x38f4cc['element'],_0x8c5182?_0x8c5182['editing']['view']['getDomRoot']():null]['filter'](_0x59a13b=>_0x59a13b)['some'](_0x20ef9e=>_0x4cf8d3(_0x20ef9e,_0x286f2a['target']))||(this['focus'](),_0x286f2a['preventDefault']());});}},Ft=class extends ut{revealButtonView;constructor(_0x5c4e32){super(_0x5c4e32),this['set']('count',void 0x0);const _0x474fce=this['revealButtonView']=new et(_0x5c4e32);_0x474fce['icon']=_0x1202c7,_0x474fce['withText']=!0x0,_0x474fce['bind']('label')['to'](this,'count',_0x686134=>St(_0x5c4e32,'NUMBER_OF_COMMENTS',_0x686134)),_0x474fce['extendTemplate']({'attributes':{'class':'ck-button_small'}}),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[_0x474fce]});}},Wt=class extends ut{commentViews;resolvedCommentView;['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];_collapsedCommentsView;constructor(_0x33408d,_0x4ff690,_0x59cbb2){super(_0x33408d);const _0x305f63=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x4ff690['comments']['length']),this['set']('isActive',!0x1),this['set']('isExpandedByUser',!0x1),this['_model']=_0x4ff690,this['_config']=_0x59cbb2,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x38a73f(),this['keystrokes']=new _0x15a0f3(),this['focusCycler']=new ht({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1a1d15=>this['commentViews']['map'](_0x2d4859=>_0x2d4859['element'])['includes'](_0x1a1d15['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Ft(_0x33408d),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x322e58=>_0x322e58-this['_config']['maxCommentsWhenCollapsed']),this['listenTo'](this['_collapsedCommentsView']['revealButtonView'],'execute',()=>{this['isExpandedByUser']=!0x0;});for(const _0x44d793 of _0x4ff690['comments'])this['_handleNewCommentModel'](_0x44d793);this['_handleInfoComment'](),this['listenTo'](_0x4ff690['comments'],'add',(_0x127c84,_0x24019c)=>{const _0x35b3b4=this['_calculatePosition'](_0x24019c);this['length']++,this['_handleNewCommentModel'](_0x24019c,_0x35b3b4),this['refreshVisibleViews']();}),this['listenTo'](_0x4ff690['comments'],'remove',(_0x37d84e,_0x12a075)=>{this['length']--,this['_handleRemoveCommentModel'](_0x12a075),this['refreshVisibleViews']();}),this['listenTo'](_0x4ff690,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x4ff690,'change:isResolved',()=>this['_handleInfoComment']()),this['on']('change:isActive',(_0x514fe5,_0x1851fc,_0x3bb114)=>{_0x3bb114||(this['isExpandedByUser']=!0x1),this['refreshVisibleViews']();}),this['on']('change:hasDirtyComment',()=>this['refreshVisibleViews']()),this['on']('change:isExpandedByUser',()=>this['refreshVisibleViews']()),this['setTemplate']({'tag':'ul','attributes':{'class':['ck-thread__comments',_0x305f63['if']('length','ck-hidden',_0x266929=>!_0x266929)],'aria-label':St(_0x33408d,'Thread\x20comments')},'children':this['visibleViews']});}get['_shouldCollapse'](){return this['_model']['weight']>this['_config']['maxThreadTotalWeight']&&!this['isActive']&&!this['hasDirtyComment']&&!this['isExpandedByUser'];}['render'](){super['render'](),this['refreshVisibleViews'](),this['_setupKeyboardNavigation']();}['focus'](_0x28ce2c){-0x1===_0x28ce2c?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}destroy(){this['_collapsedCommentsView']['destroy']();for(const _0x4f266e of this['commentViews'])_0x4f266e['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}_handleNewCommentModel(_0x57ce8c,_0x5cbed2){const _0x1f47ea=new this['_config']['CommentView'](this['locale'],_0x57ce8c,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x1f47ea['viewUid']=_0x57ce8c['id'],_0x1f47ea['delegate']('removeComment')['to'](this),_0x1f47ea['delegate']('updateComment')['to'](this),_0x1f47ea['delegate']('resolveCommentThread')['to'](this),_0x1f47ea['delegate']('editorReady')['to'](this),_0x1f47ea['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x1f47ea,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x1f47ea,_0x5cbed2);}_calculatePosition(_0x213012){const _0x23862f=this['_model']['_findOptimalIndex'](_0x213012);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x213012['authoredAt']?_0x23862f-0x1:_0x23862f:_0x23862f-0x1;}_handleInfoComment(){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x40aba1={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':St(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x40aba1,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x40aba1));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}_handleRemoveCommentModel(_0x51d1ef){const _0x229e57=this['commentViews']['remove'](_0x51d1ef['id']);this['stopListening'](_0x229e57),_0x229e57['isEditMode']&&this['_updateHasDirtyComment'](),_0x229e57['destroy']();}_updateHasDirtyComment(){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x5ecff5=>_0x5ecff5['isEditMode']);}['_rearrangeCollapse'](){const _0x15cc85=function(_0x5c6741){const _0x4c1c87=new _0x49bb96();for(const _0x26517b of _0x5c6741)_0x4c1c87['add'](_0x26517b);return _0x4c1c87;}(this['commentViews']),_0x5311fd=this['_collapsedCommentsView']['count'];for(let _0x24f89e=0x1;_0x24f89e<=_0x5311fd;_0x24f89e++)_0x15cc85['remove'](0x1);for(const _0x35673c of _0x15cc85)_0x35673c['collapse']();_0x5311fd>0x0&&_0x15cc85['add'](this['_collapsedCommentsView'],0x1),Kt(_0x5853b8(Array['from'](this['visibleViews']),Array['from'](_0x15cc85)),this['visibleViews'],_0x15cc85);}['_rearrangeExpand'](){Kt(_0x5853b8(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x5ce5ce of this['visibleViews'])_0x5ce5ce['expand']();}_setupKeyboardNavigation(){this['commentViews']['forEach'](_0x269e20=>{this['focusTracker']['add'](_0x269e20['element']),this['keystrokes']['listenTo'](_0x269e20['element']);}),this['commentViews']['on']('change',(_0x1444e5,_0x505239)=>{for(const _0x2a3650 of _0x505239['removed'])this['focusTracker']['remove'](_0x2a3650['element']),this['keystrokes']['stopListening'](_0x2a3650['element']);for(const _0x53e580 of Array['from'](_0x505239['added'])['reverse']())this['focusTracker']['add'](_0x53e580['element']),this['keystrokes']['listenTo'](_0x53e580['element']);});const _0x408422=_0x328ce2=>{const _0x38150a=this['_collapsedCommentsView']['revealButtonView']['element'];_0x38150a&&(_0x328ce2?(this['focusTracker']['add'](_0x38150a),this['keystrokes']['listenTo'](_0x38150a)):(this['focusTracker']['remove'](_0x38150a),this['keystrokes']['stopListening'](_0x38150a)));};this['listenTo'](this['visibleViews'],'add',(_0x13e02f,_0x32bc53)=>{_0x32bc53===this['_collapsedCommentsView']&&_0x408422(!0x0);}),this['listenTo'](this['visibleViews'],'remove',(_0x5643a4,_0x4267ec)=>{_0x4267ec===this['_collapsedCommentsView']&&_0x408422(!0x1);}),this['visibleViews']['has'](this['_collapsedCommentsView'])&&_0x408422(!0x0);}};function Kt(_0x5e3555,_0x16f48e,_0x123611){let _0xca0085=0x0;for(const _0xd4446 of _0x5e3555)switch(_0xd4446){case'insert':_0x16f48e['add'](_0x123611['get'](_0xca0085),_0xca0085),_0xca0085++;break;case'delete':_0x16f48e['remove'](_0xca0085);break;case'equal':_0xca0085++;}}function Gt(_0x463f03,_0x5db6c5){const _0x63a53=_0x5db6c5-0x1;if(_0x463f03['length']<_0x5db6c5)return _0x463f03;const _0x4e6792=_0x463f03['lastIndexOf']('\x20',_0x63a53);return _0x463f03['substring'](0x0,_0x4e6792>-0x1?_0x4e6792:_0x63a53)+'…';}var Yt=class extends ut{constructor(_0x55e459){super(_0x55e459);const _0x1d991f=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x1d991f['to']('contextValue',_0x318332=>St(_0x55e459,'THREAD_CONTEXT_LABEL',_0x318332)),'tabindex':-0x1},'children':[{'text':_0x1d991f['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Xt=class extends ut{['_model'];reopenButtonView;contextView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x43736e,_0x2a29e0){super(_0x43736e);const _0x2fcac3=this['bindTemplate'];this['_model']=_0x2a29e0,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x38a73f(),this['keystrokes']=new _0x15a0f3(),this['focusCycler']=new ht({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x5cad62=>!!_0x5cad62),this['bind']('contextValue')['to'](this['_model'],'context',_0x1b56a2=>_0x1b56a2&&_0x1b56a2['value']?Gt(_0x1b56a2['value'],0x96):St(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',_0x2fcac3['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 _0x2aef17=new et(this['locale']);return _0x2aef17['label']=St(this['locale'],'Reopen'),_0x2aef17['tooltip']=St(this['locale'],'Reopen'),_0x2aef17['icon']=_0x1cd43e,_0x2aef17['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x35b707=>!_0x35b707),_0x2aef17['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x5f0a59,_0x3ee6f9)=>_0x5f0a59&&_0x3ee6f9),_0x2aef17['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x2aef17;}_attachContextActions(){const _0x1ee317=this['element']['querySelector']('.ck-context'),_0x319e67=_0x1ee317['querySelector']('.ck-context__value');this['listenTo'](_0x1ee317,'mouseenter',()=>{_0x319e67['offsetWidth']<_0x319e67['scrollWidth']&&_0x1ee317['classList']['add']('overlay');}),this['listenTo'](_0x1ee317,'mouseleave',()=>{_0x1ee317['classList']['remove']('overlay');});}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']);for(const _0x3fb62e of this['focusables'])this['focusTracker']['add'](_0x3fb62e['element']),this['keystrokes']['listenTo'](_0x3fb62e['element']);}_createContextView(){const _0x186dc3=new Yt(this['locale']);return _0x186dc3['bind']('contextValue')['to'](this),_0x186dc3;}},qt=class extends ut{['_model'];['_config'];commentThreadHeaderView;commentThreadInputView;ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x26d3dc,_0x174327,_0x1e78d0,_0x320b72){super(_0x26d3dc),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x174327,this['_localUser']=_0x1e78d0,this['_config']=_0x320b72,this['commentThreadHeaderView']=new Xt(_0x26d3dc,_0x174327),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x4625a0(_0x26d3dc,St(_0x26d3dc,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Wt(_0x26d3dc,_0x174327,Object['assign']({'CommentView':this['_config']['CommentView']},_0x320b72)),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',(_0xf6ac5e,_0x1a58ee)=>_0xf6ac5e||!!_0x1a58ee),this['bind']('isUnlinked')['to'](_0x174327,'unlinkedAt',_0x32d96b=>!!_0x32d96b);let _0x14bebd=null;const _0x2d9249=()=>{const _0x420895=this['_model']['comments']['first']||null;_0x420895!==_0x14bebd&&(_0x14bebd&&this['stopListening'](_0x14bebd,'change:content'),_0x14bebd=_0x420895,_0x420895&&this['listenTo'](_0x420895,'change:content',_0x2d9249));const _0x49927c=_0x420895?_0x420895['author']['name']:this['_localUser']['name'],_0x32d6c8=_0x420895?new DOMParser()['parseFromString'](_0x2d0a81(_0x5f27d8(_0x420895['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']})),'text/html')['body']['textContent']:'',_0x232af1=St(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x49927c]);this['set']('ariaLabel',_0x32d6c8?_0x232af1+'\x20'+_0x32d6c8:_0x232af1);};this['listenTo'](this['_model']['comments'],'change',_0x2d9249),_0x2d9249(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x38a73f(),this['keystrokes']=new _0x15a0f3(),this['focusCycler']=new ht({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x45c668=>_0x45c668['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x3803a1(this,this['focusables']);}async destroy(){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}_createCommentThreadInputView(){const _0x2b40a8=new Ut(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0xe93868=_0x2b40a8['commentInputView'];return _0x2b40a8['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0xe93868,'value',(_0x36ec0f,_0x87665e,_0x59dd9d,_0x46efac,_0x5971f3)=>!!_0x5971f3||!!_0x46efac&&_0x59dd9d&&!_0x87665e||_0x36ec0f&&_0x59dd9d&&!_0x87665e),_0xe93868['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x203472,_0x372d9b,_0x46e97e)=>{let _0x5bb854;return _0x5bb854=_0x46e97e&&_0x372d9b?'Reply\x20to\x20reopen\x20discussion...':_0x203472?'Reply...':'Write\x20a\x20comment...',St(this['locale'],_0x5bb854);}),_0xe93868['bind']('submitLabel')['to'](this,'length',_0x18c66f=>St(this['locale'],_0x18c66f?'Reply':'Comment')),_0xe93868['on']('submit',(_0x1bdde0,_0x1e7b79)=>{this['fire']('addComment',_0x1e7b79),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0xe93868['on']('cancel',()=>{this['focus']();}),_0xe93868['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0xe93868['on']('cancel',_0x3b131e=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x3b131e['stop']());}),this['on']('change:isActive',(_0x3f5ca5,_0x1bd58b,_0x58a23f)=>{_0x58a23f||this['length']||_0xe93868['value']||this['fire']('removeCommentThread');}),_0x2b40a8;}};const jt=/* #__PURE__ -- @preserve */
27
+ _0x208d1a(qt);var $t=class extends jt{commentThreadChildren;containerElement;resolveButton;_boundFirstCommentView;constructor(_0xddd835,_0x3ba8a7,_0x33b6df,_0x23dc11){super(_0xddd835,_0x3ba8a7,_0x33b6df,_0x23dc11),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0xddd835,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x2efe28,_0xf4c159,_0x3dfbfb)=>{_0x3dfbfb||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x3f91bf,_0xbd15b1,_0x127009)=>{_0x127009&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}getTemplate(){const _0x123b6f=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x123b6f['if']('isActive','ck-thread--active'),_0x123b6f['if']('isUnlinked','ck-thread--unlinked'),_0x123b6f['to']('actionIndicator',_0x1b35f1=>_0x1b35f1?'ck-thread--'+_0x1b35f1:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x123b6f['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 _0x5d3755 of this['commentsListView']['commentViews'])_0x5d3755['cancelConfirm']();}_bindFirstCommentView(){const {locale:_0x4cf2e5}=this,_0x8ea2f=this['commentsListView']['commentViews']['get'](0x0);_0x8ea2f===this['_boundFirstCommentView']||_0x8ea2f['isSystemComment']||(this['_boundFirstCommentView']=_0x8ea2f,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x8ea2f,'actionIndicator',_0x344cfe=>'remove'===_0x344cfe?'remove':null),_0x8ea2f['placeholder']=St(_0x4cf2e5,'Write\x20a\x20comment...'),_0x8ea2f['bind']('contextValue')['to'](this['_model'],'context',this['_model'],'archivedAt',(_0x2f4992,_0x298243)=>_0x298243||!_0x2f4992?null:'string'==typeof _0x2f4992['value']&&_0x2f4992['value']?Gt(_0x2f4992['value'],0x2a):St(_0x4cf2e5,'Comment\x20was\x20made\x20on\x20an\x20element')),_0x8ea2f['removeButton']['on']('execute',_0x58d9d9=>{_0x58d9d9['stop'](),this['showConfirm'](St(_0x4cf2e5,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x8ea2f['focus']();}),_0x8ea2f['actionBar']['add'](this['resolveButton'],0x0),_0x8ea2f['focusables']['add'](this['resolveButton'],0x0));}_createResolveButton(){const _0x5d3fa6=new _0x58562b(this['locale']);return _0x5d3fa6['label']=St(this['locale'],'Resolve'),_0x5d3fa6['tooltip']=St(this['locale'],'Resolve'),_0x5d3fa6['icon']=_0x5cc95c,_0x5d3fa6['extendTemplate']({'attributes':{'class':['ck-comment--resolve','ck-button_small']}}),_0x5d3fa6['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4f8b73=>!_0x4f8b73),_0x5d3fa6['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x51e2a6,_0x1455bc)=>_0x51e2a6&&!_0x1455bc),_0x5d3fa6['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x5d3fa6;}_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']));}},zt=class extends ut{constructor(_0x54b1ed){super(_0x54b1ed),this['set']('content',''),this['set']('contextValue',null),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',()=>this['_renderContent']()),this['on']('change:contextValue',()=>this['_renderContent']()),this['_renderContent']();}_renderContent(){const _0x2ba9e4=this['element'];_0x2ba9e4['innerHTML']=_0x2d0a81(this['content']);const _0x34cb0e=this['contextValue']?.['trim']();if(_0x34cb0e){const _0x7872e3=document['createElement']('div'),_0xd4f280=document['createElement']('p');_0x7872e3['classList']['add']('ck-comment__context'),_0xd4f280['textContent']=_0x34cb0e,_0x7872e3['append'](_0xd4f280),_0x2ba9e4['prepend'](_0x7872e3);}}},Jt=class extends ut{['visibleView'];ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];constructor(_0x2c0f95,_0xd8ca8e,_0x3cae90){super(_0x2c0f95),this['_model']=_0xd8ca8e,this['_config']=_0x3cae90,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['set']('contextValue',null),this['bind']('ariaLabel')['to'](_0xd8ca8e,'content',_0xd8ca8e,'authoredAt',(_0x44b4d2,_0x20f595)=>St(_0x2c0f95,'COMMENT_ARIA_LABEL',[_0xd8ca8e['author']['name'],_0x3cae90['formatDateTime'](_0x20f595),new DOMParser()['parseFromString'](_0x2d0a81(_0x44b4d2),'text/html')['body']['textContent'],_0xd8ca8e['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x4625a0(_0x2c0f95,St(_0x2c0f95,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new ft(),this['focusTracker']=new _0x38a73f(),this['keystrokes']=new _0x15a0f3(),this['focusCycler']=new ht({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x39b734=>_0x39b734['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']?St(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):St(this['locale'],'EXTERNAL_COMMENT');}getUserViewNotificationText(){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?St(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):St(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}_createCommentContentView(){const _0x245cc5=new zt(this['locale']);return _0x245cc5['bind']('contextValue')['to'](this),_0x245cc5['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x5efa9c,_0x1f7be6)=>_0x1f7be6?_0x5f27d8(_0x5efa9c,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x5efa9c),_0x245cc5;}_createCommentInputView(){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x221bd1=new Ht(this['locale'],this['_config']['editorConfig']);return _0x221bd1['value']=this['_model']['content'],_0x221bd1['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x221bd1['submitLabel']=St(this['locale'],'Save'),_0x221bd1['on']('submit',(_0x1deefc,_0x28bcc0)=>{this['fire']('updateComment',this['_model']['id'],_0x28bcc0),this['switchToDisplayMode'](),this['focus']();}),_0x221bd1['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x221bd1['once']('editorReady',()=>{_0x221bd1['focus']();}),_0x221bd1['createEditor'](),_0x221bd1['delegate']('editorReady')['to'](this),_0x221bd1['delegate']('editorDestroyed')['to'](this),_0x221bd1;}_setupKeyboardNavigation(){const _0x2c0250=this['element'];this['keystrokes']['listenTo'](_0x2c0250);for(const _0x4b8813 of this['focusables'])this['focusTracker']['add'](_0x4b8813['element']),this['keystrokes']['listenTo'](_0x4b8813['element']);this['focusables']['on']('change',(_0x50ed1e,_0x368c42)=>{for(const _0xd1fb3f of _0x368c42['removed'])this['focusTracker']['remove'](_0xd1fb3f['element']),this['keystrokes']['stopListening'](_0xd1fb3f['element']);for(const _0xe61f7e of _0x368c42['added'])this['focusTracker']['add'](_0xe61f7e['element']),this['keystrokes']['listenTo'](_0xe61f7e['element']);}),this['keystrokes']['set']('enter',(_0x4fd7f2,_0x3f62b3)=>{_0x2c0250===_0x4fd7f2['target']&&(this['focusCycler']['focusFirst'](),_0x3f62b3());}),this['keystrokes']['set']('esc',(_0x5cdcc9,_0xc9f7cd)=>{_0x2c0250!==_0x5cdcc9['target']&&(this['focus'](),_0xc9f7cd());});}};const Qt=/* #__PURE__ -- @preserve */
28
+ _0x208d1a(Jt);var Zt=class extends Qt{actionBar;['userView'];constructor(_0x4cd6b0,_0x1b3dd8,_0x12ef31){super(_0x4cd6b0,_0x1b3dd8,_0x12ef31),this['set']('actionIndicator',null),this['set']('placeholder',St(_0x4cd6b0,'Reply...')),this['bind']('authoredAt')['to'](_0x1b3dd8),this['bind']('resolvedAt')['to'](_0x1b3dd8),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 _0x4e4fe3(_0x4cd6b0,_0x1b3dd8['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x1b3dd8,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}getTemplate(){const _0x12a822=this['bindTemplate'],_0x2af5dc=[{'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']}},{'tag':'time','attributes':{'datetime':_0x12a822['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x12a822['to']('authoredAt',_0x1458c4=>this['_config']['formatDateTime'](_0x1458c4))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x12a822['if']('isEditMode','ck-comment__actions--hidden'),_0x12a822['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']&&_0x2af5dc['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x12a822['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x12a822['if']('isEditMode','ck-comment--edit'),_0x12a822['if']('isSystemComment','ck-comment--info'),_0x12a822['to']('actionIndicator',_0x40db1c=>_0x40db1c?'ck-comment--'+_0x40db1c:'')],'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':_0x2af5dc}]}]};}_createEditButton(){const _0x55bb8a=new et(this['locale']);return _0x55bb8a['label']=St(this['locale'],'Edit'),_0x55bb8a['icon']=_0xa0f495,_0x55bb8a['withText']=!0x0,_0x55bb8a['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x55bb8a['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x329063=>!_0x329063),_0x55bb8a['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x55bb8a['on']('execute',()=>this['switchToEditMode']()),_0x55bb8a;}_createRemoveButton(){const _0x1c1a0d=new et(this['locale']);return _0x1c1a0d['label']=St(this['locale'],'Remove'),_0x1c1a0d['icon']=_0x241a26,_0x1c1a0d['withText']=!0x0,_0x1c1a0d['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x1c1a0d['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x52f2fc=>!_0x52f2fc),_0x1c1a0d['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x1c1a0d['on']('execute',()=>{this['showConfirm'](St(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x1c1a0d;}_createDropdown(){const _0x48be8d=wt(this['locale'],_0x1e288c),_0x4d091e=_0x48be8d['panelView']['children'],_0x144770=new dt(this['locale']),_0x30a8c1=_0x48be8d['bindTemplate'];gt(_0x48be8d,()=>this['items']['find'](_0x575f96=>_0x575f96['isVisible'])),_0x48be8d['extendTemplate']({'attributes':{'class':[_0x30a8c1['if']('isVisible','ck-hidden',_0x15caac=>!_0x15caac)]}});const _0x3a225a=(_0x349ed3,_0x3cb8cd=-0x1)=>{const _0x357e7b=new ct(this['locale']);_0x357e7b['children']['add'](_0x349ed3);const _0x1da7cb=_0x3cb8cd>-0x1?_0x3cb8cd:_0x144770['items']['length'];_0x144770['items']['add'](_0x357e7b,_0x1da7cb);const _0x5763fb=Array['from'](this['items']);_0x48be8d['unbind']('isEnabled','isVisible'),_0x48be8d['bind']('isEnabled')['toMany'](_0x5763fb,'isEnabled',(..._0x33e545)=>_0x33e545['some'](_0x54bc80=>_0x54bc80)),_0x48be8d['bind']('isVisible')['toMany'](_0x5763fb,'isVisible',(..._0x59b18e)=>_0x59b18e['some'](_0x1690d4=>_0x1690d4));};_0x48be8d['panelPosition']='sw',_0x48be8d['buttonView']['set']({'label':St(this['locale'],'Show\x20more\x20items'),'icon':_0x56a027}),_0x48be8d['buttonView']['extendTemplate']({'attributes':{'class':'ck-button_small'}});for(const _0x3ea64f of this['items'])_0x3a225a(_0x3ea64f);return _0x4d091e['add'](_0x144770),_0x48be8d['listenTo'](this['items'],'add',(_0x5e408e,_0x5ac1b7,_0x3822cb)=>{_0x3a225a(_0x5ac1b7,_0x3822cb);}),_0x48be8d['listenTo'](this['items'],'remove',(_0x4d38cd,_0x460155,_0x4fb271)=>{_0x144770['items']['remove'](_0x4fb271);}),_0x48be8d;}_attachActions(_0x1983b8,_0x566319){const _0x46445f=_0x1983b8&&_0x1983b8['element'];_0x46445f&&(this['listenTo'](_0x46445f,'mouseenter',()=>this['actionIndicator']=_0x566319),this['listenTo'](_0x46445f,'focus',()=>this['actionIndicator']=_0x566319),this['listenTo'](_0x46445f,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x46445f,'blur',()=>this['actionIndicator']=null));}_createCommentInputView(){const _0x5bb9a7=super['_createCommentInputView']();return _0x5bb9a7['bind']('placeholder')['to'](this),_0x5bb9a7;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}};function te(_0x20fbfc){const _0x3be985=_0x195ae3(_0x20fbfc,0x1e),_0x233acd=new MutationObserver(_0x4a88bf=>{for(const _0x5119da of _0x4a88bf)('attributes'==_0x5119da['type']&&'class'==_0x5119da['attributeName']||'childList'==_0x5119da['type']||'characterData'==_0x5119da['type'])&&_0x3be985();});return{'attach'(_0x1b6047){_0x233acd['observe'](_0x1b6047,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x233acd['disconnect'](),_0x3be985['cancel']();}};}var ee=class extends ut{['focusTracker'];['id'];keystrokes;content;['mainView'];_mutationObserver;constructor(_0x3fdf1b,_0x330cde){super(_0x3fdf1b),this['id']=_0x2f6db9(),this['focusTracker']=new _0x38a73f(),this['keystrokes']=new _0x15a0f3(),this['keystrokes']['set']('Esc',(_0x5c6ae7,_0x5a1bff)=>this['fire']('Esc',_0x5a1bff)),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']=te(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x330cde),this['mainView']=_0x330cde;const _0xa3ac06=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0xa3ac06['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 _0x5bd180=this['element']['clientHeight'];_0x5bd180&&(this['height']=_0x5bd180);}};const ie=/* #__PURE__ -- @preserve */
29
+ _0x5c32ab();var se=class Annotation extends ie{['view'];focusableElements;_type;_target;constructor({view:_0x583c68,target:_0x24895e,type:_0x5cfe4c,isVisible:_0x2935ea=!0x0}){super(),this['view']=_0x583c68,this['view']['element']||this['view']['render'](),this['_type']=_0x5cfe4c,this['_target']=_0x24895e,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x49bb96([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x4aa469,_0x42c45f)=>{this['view']['focusTracker']['add'](_0x42c45f);}),this['focusableElements']['on']('remove',(_0x5ae310,_0xd9aab3)=>{this['view']['focusTracker']['remove'](_0xd9aab3);}),this['set']('isVisible',_0x2935ea);}get type(){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get target(){const _0x2dab47=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x2dab47),_0x2dab47;}get targetRect(){const _0x325dfa=this['target'];if(null===_0x325dfa)return null;if(_0x325dfa instanceof _0x416a59)return _0x325dfa;const _0x5910d2=_0x325dfa['filter'](_0x55f441=>function(_0x2bcb92){return!!_0x2bcb92['offsetParent']||!!_0x2bcb92['getClientRects']()['item'](0x0);}(_0x55f441));return 0x0===_0x5910d2['length']?null:_0x416a59['getDomElementRects'](_0x5910d2[0x0])[0x0];}get isActive(){return this['view']['isActive'];}set isActive(_0x31aedb){this['view']['isActive']=_0x31aedb,this['view']['mainView']['isActive']=_0x31aedb;}updateTargetRect(){this['view']['targetRect']=this['targetRect'];}destroy(){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}refreshVisibility(){this['isVisible']=!!this['targetRect'];}static _assertCorrectTarget(_0xc8925b){if(!(null===_0xc8925b||_0xc8925b instanceof _0x416a59||Array['isArray'](_0xc8925b)&&_0xc8925b['every'](_0x56c326=>ne(_0x56c326))))throw new _0x3e0d28('annotation-invalid-target',null,{'target':_0xc8925b});}_getNormalizedTarget(){const _0x12f712='function'==typeof this['_target']?this['_target']():this['_target'];return ne(_0x12f712)?[_0x12f712]:_0x12f712;}};function ne(_0x3ab2ed){return null!==_0x3ab2ed&&'object'==typeof _0x3ab2ed&&'nodeType'in _0x3ab2ed&&0x1===_0x3ab2ed['nodeType'];}var oe=class extends _0x49bb96{_innerViewToAnnotation;_viewToAnnotation;['_focusTracker'];constructor(_0x3ed7b4=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x38a73f(),this['_focusTracker']['on']('change:isFocused',(_0x12366d,_0x249bf8,_0x5a30e2)=>{_0x5a30e2||this['fire']('blur');});for(const _0x5ed0d7 of _0x3ed7b4)this['add'](_0x5ed0d7);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x407677){if(this['has'](_0x407677))throw new _0x3e0d28('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x407677['innerView'],_0x407677),this['_viewToAnnotation']['set'](_0x407677['view'],_0x407677);for(const _0x36e4f4 of _0x407677['focusableElements'])this['_focusTracker']['add'](_0x36e4f4);if(this['listenTo'](_0x407677['focusableElements'],'add',(_0x2d3674,_0x2ea273)=>{this['_focusTracker']['add'](_0x2ea273);}),this['listenTo'](_0x407677['focusableElements'],'remove',(_0x3655e9,_0x5a6b59)=>{this['_focusTracker']['remove'](_0x5a6b59);}),this['listenTo'](_0x407677['view']['focusTracker'],'change:isFocused',(_0x111cf6,_0x3fc2bf,_0x3abcac)=>{_0x3abcac&&this['fire']('focus',_0x407677);}),_0x407677['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x50ec02 of this)_0x50ec02['updateTargetRect']();}const _0x47d354=this['_getOrderInContent'](_0x407677['view']['targetRect']);return super['add'](_0x407677,_0x47d354);}['remove'](_0x38f423){if(!this['has'](_0x38f423))throw new _0x3e0d28('annotationcollection-not-existing-item',null);this['stopListening'](_0x38f423['view']['focusTracker']),this['stopListening'](_0x38f423['focusableElements']);for(const _0x5afd6c of _0x38f423['focusableElements'])this['_focusTracker']['remove'](_0x5afd6c);return this['_viewToAnnotation']['delete'](_0x38f423['view']),this['_innerViewToAnnotation']['delete'](_0x38f423['innerView']),super['remove'](_0x38f423);}getByInnerView(_0x5f064c){return this['_innerViewToAnnotation']['get'](_0x5f064c);}getByView(_0x540c02){return this['_viewToAnnotation']['get'](_0x540c02);}destroy(){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}refreshPositioning(){for(const _0xf0086f of this)_0xf0086f['updateTargetRect']();this['_sort']();}_sort(){const _0x15a848=Array['from'](this)['sort']((_0x2f3461,_0xe3ba9a)=>he(_0x2f3461['view']['targetRect'],_0xe3ba9a['view']['targetRect']));for(let _0x19cf9c=_0x15a848['length']-0x1;_0x19cf9c>0x0;_0x19cf9c--){const _0x58c967=_0x15a848[_0x19cf9c];_0x19cf9c!==this['getIndex'](_0x58c967)&&(this['remove'](_0x58c967),this['add'](_0x58c967));}}_getOrderInContent(_0x147530){let _0x52dce3=0x0;if(!_0x147530)return this['length'];for(const _0x368d1e of this){const _0x52fc06=_0x368d1e['view']['targetRect'];if(_0x52fc06){if(he(_0x147530,_0x52fc06)<0x0)return _0x52dce3;_0x52dce3++;}}return _0x52dce3;}_areCachedRectsStale(){const _0x3d8fc3=this['get'](0x0);if(!_0x3d8fc3)return!0x1;const _0x4f3a4e=_0x3d8fc3['view']['targetRect'],_0x4e13c2=_0x3d8fc3['targetRect'];return!(!_0x4f3a4e||!_0x4e13c2)&&(_0x4f3a4e['top']!==_0x4e13c2['top']||_0x4f3a4e['left']!==_0x4e13c2['left']);}};function re({source:_0x29a088,target:_0x28d937,filter:_0x2c667a}){for(const _0x233176 of _0x29a088)_0x2c667a(_0x233176)&&_0x28d937['add'](_0x233176);_0x28d937['listenTo'](_0x29a088,'add',(_0x4792df,_0x9dd101)=>{_0x2c667a(_0x9dd101)&&_0x28d937['add'](_0x9dd101);}),_0x28d937['listenTo'](_0x29a088,'remove',(_0x4ac1e4,_0x327acb)=>{_0x28d937['has'](_0x327acb)&&_0x28d937['remove'](_0x327acb);});}function he(_0x40cf53,_0x224a86){if(null===_0x40cf53&&null===_0x224a86)return 0x0;if(null===_0x40cf53)return-0x1;if(null===_0x224a86)return 0x1;const _0x2c1535=_0x40cf53['top']-_0x224a86['top'];return 0x0==_0x2c1535?_0x40cf53['left']-_0x224a86['left']:_0x2c1535;}var ae=class extends _0x49d18b{collection;_visibleAnnotations;static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2de3bb){if(super(_0x2de3bb),this['collection']=new oe(),this['_visibleAnnotations']=new oe(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x2de3bb instanceof _0x2e8dd0){const _0x52626e=_0x2de3bb['locale'];_0x2de3bb['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':St(_0x52626e,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':St(_0x52626e,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':St(_0x52626e,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':St(_0x52626e,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':St(_0x52626e,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':St(_0x52626e,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':St(_0x52626e,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x41b47a){this['collection']['add'](_0x41b47a);}['remove'](_0x20256e){this['collection']['remove'](_0x20256e),_0x20256e['destroy']();}refreshVisibility(){for(const _0x55727c of this['collection'])_0x55727c['refreshVisibility']();}refreshPositioning(){this['_visibleAnnotations']['refreshPositioning']();}getByInnerView(_0x3bc5ee){return this['collection']['getByInnerView'](_0x3bc5ee);}deactivateAll(){this['fire']('_deactivateAllAnnotations');}destroy(){for(const _0x54599b of this['collection'])_0x54599b['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}activate(_0x4580dd){this['fire']('_activateAnnotation',_0x4580dd);}createAnnotation(_0xb36627){return new se(_0xb36627);}createAnnotationView(_0x2a7776,_0x4f2f11){return new ee(_0x2a7776,_0x4f2f11);}_addActiveAnnotation(_0xdea2f0){const _0x3616cf=new Set(this['activeAnnotations']);_0x3616cf['add'](_0xdea2f0),this['activeAnnotations']=_0x3616cf;}_removeActiveAnnotation(_0xb1f2e6){const _0x92e26d=new Set(this['activeAnnotations']);_0x92e26d['delete'](_0xb1f2e6),this['activeAnnotations']=_0x92e26d;}_bindAnnotationsToVisibleAnnotations(){const _0x219773=this['collection'],_0x5198e9=this['_visibleAnnotations'];function _0x4d28a5(_0x403dbd){const _0xed50d7=_0x403dbd['source'];_0xed50d7['isVisible']&&!_0x5198e9['has'](_0xed50d7)?_0x5198e9['add'](_0xed50d7):!_0xed50d7['isVisible']&&_0x5198e9['has'](_0xed50d7)&&_0x5198e9['remove'](_0xed50d7),_0xed50d7['view']['focusTracker']['remove'](_0xed50d7['view']['element']),_0xed50d7['view']['focusTracker']['add'](_0xed50d7['view']['element']);}this['listenTo'](_0x219773,'add',(_0x469c0e,_0x4a5e09)=>{_0x4a5e09['isVisible']&&_0x5198e9['add'](_0x4a5e09),this['listenTo'](_0x4a5e09,'change:isVisible',_0x4d28a5);}),this['listenTo'](_0x219773,'remove',(_0x5b01a7,_0xcf37f4)=>{_0x5198e9['has'](_0xcf37f4)&&_0x5198e9['remove'](_0xcf37f4),this['stopListening'](_0xcf37f4,'change:isVisible',_0x4d28a5);});}_setupEnterAnnotationKeystroke(){const _0x1b634d=_0x250956=>{_0x250956['on']('ready',()=>{_0x250956['keystrokes']['set'](_0x16c825,(_0x16bd68,_0x87fa79)=>{const _0x402f27=_0x520ecf(this['activeAnnotations']['values']());_0x402f27&&(_0x402f27['view']['focus'](),_0x87fa79());});});};this['context']instanceof _0x2e8dd0?_0x1b634d(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x3aa2d5,_0x4232ec)=>{_0x1b634d(_0x4232ec);});}_setupEscapeAnnotationHandling(){const _0x91b805=_0x5b0726=>{const _0x556a65=_0x5b0726['source'],_0x3597f1=[];let _0x1f83ac;if(Array['isArray'](_0x556a65['target'])){_0x1f83ac=_0x556a65['target'][0x0],this['context']instanceof _0x2e8dd0?_0x3597f1['push'](this['context']):this['context']['editors']&&_0x3597f1['push'](...this['context']['editors']);for(const _0x129474 of _0x3597f1)for(const _0x2e5626 of _0x129474['editing']['view']['domRoots']['values']())if(_0x4cf8d3(_0x2e5626,_0x1f83ac))return void _0x129474['editing']['view']['focus']();_0x1f83ac['focus']();}};this['listenTo'](this['collection'],'add',(_0x2cf91a,_0x4e12e8)=>{this['listenTo'](_0x4e12e8,'escape',_0x91b805,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x294617,_0x3fb66c)=>{this['stopListening'](_0x3fb66c,'escape',_0x91b805);});}};const ce=Symbol('noChannel'),de={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},le=/* #__PURE__ -- @preserve */
30
+ _0x5c32ab(),me=/* #__PURE__ -- @preserve */
31
+ _0x5c32ab();var ue=class extends _0x49d18b{_threads;_threadToController;_viewToController;static get requires(){return[ae,_0x37860f,_0x131f9d];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1fe548){super(_0x1fe548),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x54694c=this['context']['config'];_0x54694c['define']('comments.maxCommentsWhenCollapsed',0x2),_0x54694c['define']('comments.maxThreadTotalWeight',0x1f4),_0x54694c['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x54694c['define']('comments.CommentThreadView',$t),_0x54694c['define']('comments.CommentView',Zt),_0x54694c['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}init(){const _0x45ea02=this['context']['plugins']['get'](ae);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x5d5ed9,_0x54c301)=>this['_addCommentThread'](_0x54c301)),this['on']('submitCommentThread',(_0x14e70f,_0x2642bd)=>this['_submitCommentThread'](_0x2642bd)),this['on']('resolveCommentThread',(_0x2f6ee4,_0x463d2e)=>this['_resolveCommentThread'](_0x463d2e)),this['on']('resolveCommentThread',(_0x49d670,_0x3a7884)=>this['_updateActiveAnnotation'](_0x3a7884),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x24b3fc,_0x374d9f)=>this['_reopenCommentThread'](_0x374d9f)),this['on']('reopenCommentThread',(_0x57f3f0,_0x802fc2)=>this['_updateActiveAnnotation'](_0x802fc2),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x1d2786,_0x2bd0da)=>this['_removeCommentThread'](_0x2bd0da)),this['on']('updateCommentThread',(_0x1af061,_0x17ad2a)=>this['_updateCommentThread'](_0x17ad2a)),this['on']('updateCommentThread',(_0x4a38b7,_0x3c2469)=>this['_updateActiveAnnotation'](_0x3c2469),{'priority':'lowest'}),this['on']('addComment',(_0x4aaaa3,_0x31d0eb)=>this['_addComment'](_0x31d0eb)),this['on']('updateComment',(_0x42f5b5,_0x26ee6a)=>this['_updateComment'](_0x26ee6a)),this['on']('removeComment',(_0x5f1056,_0x579361)=>this['_removeComment'](_0x579361)),this['on']('addComment',(_0x3a3011,{threadId:_0x5a86bb,isFromAdapter:_0x414303})=>{if(_0x414303)return;const _0x490b0a=this['getCommentThread'](_0x5a86bb),_0x3476c1=_0x490b0a&&this['_threadToController']['get'](_0x490b0a);_0x3476c1&&_0x3476c1['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x45ea02,'change:activeAnnotations',(_0x192e5b,_0x425925,_0x117dc3)=>{const _0x163d0e=Array['from'](_0x117dc3)['map'](_0x22b534=>this['_viewToController']['get'](_0x22b534['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x163d0e?_0x163d0e['model']:null;});}set adapter(_0x567d9f){if(this['_adapter'])throw new _0x3e0d28('commentsrepository-adapter-already-set');this['_adapter']=_0x567d9f;}get adapter(){return this['_adapter'];}addCommentThread({channelId:_0xe9800f=ce,threadId:_0x114d02=_0x2f6db9(),comments:_0xf7fff2=[],unlinkedAt:_0x35b764=null,resolvedAt:_0x10c12a=null,resolvedBy:_0x19f687=null,target:_0x4afa40=null,context:_0x2db75d=null,attributes:_0xbf1adc={},isResolvable:_0x130ef8=!0x0,isSubmitted:_0x5804eb=!0x1,isFromAdapter:_0x336193=!0x1}={}){return this['fire'](we('addCommentThread',_0xe9800f),{'channelId':_0xe9800f,'threadId':_0x114d02,'comments':_0xf7fff2,'unlinkedAt':_0x35b764,'resolvedAt':_0x10c12a,'resolvedBy':_0x19f687,'target':_0x4afa40,'context':_0x2db75d,'attributes':_0xbf1adc,'isFromAdapter':_0x336193,'isResolvable':_0x130ef8,'isSubmitted':_0x5804eb}),this['getCommentThread'](_0x114d02);}openNewCommentThread({channelId:_0x258dfb=ce,threadId:_0x14e69e=_0x2f6db9(),target:_0x452cda,context:_0x5e53bb=null,isResolvable:_0xbd8f10=!0x0}){if(this['_readOnlyChannels']['has'](_0x258dfb)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x452cda)throw new _0x3e0d28('commentsrepository-missing-target');const _0x2694e6=this['addCommentThread']({'channelId':_0x258dfb,'threadId':_0x14e69e,'target':_0x452cda,'context':_0x5e53bb,'isResolvable':_0xbd8f10});if(!_0x2694e6)return null;const _0x3606e6=this['_threadToController']['get'](_0x2694e6),_0x225074=_0x3606e6['view']['commentThreadInputView']['commentInputView'],_0x555180=this['context']['plugins']['get'](ae),_0x477849=_0x555180['getByInnerView'](_0x3606e6['view']);return _0x555180['activate'](_0x477849),_0x225074['once']('editorReady',()=>_0x225074['focus']()),_0x2694e6;}hasCommentThread(_0x3e0dcb){if('string'!=typeof _0x3e0dcb)throw new _0x3e0d28('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x3e0dcb);}updateCommentThread({channelId:_0x3547b0=ce,threadId:_0x4f796c,context:_0x2b5a48,unlinkedAt:_0x18f737,attributes:_0x2be641,isFromAdapter:_0x34769e=!0x1}){return this['fire'](we('updateCommentThread',_0x3547b0),{'channelId':_0x3547b0,'threadId':_0x4f796c,'context':_0x2b5a48,'unlinkedAt':_0x18f737,'attributes':_0x2be641,'isFromAdapter':_0x34769e}),this['getCommentThread'](_0x4f796c);}getCommentThread(_0x3f3a9b){if('string'!=typeof _0x3f3a9b)throw new _0x3e0d28('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x3f3a9b);}fetchCommentThread({channelId:_0x4d0971,threadId:_0x342110}={}){const _0x1fc425=this['getCommentThread'](_0x342110);if(_0x1fc425)return Promise['resolve'](_0x1fc425);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x3e0d28('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x4d0971,'threadId':_0x342110})['then'](_0xccbd21=>this['hasCommentThread'](_0x342110)?this['getCommentThread'](_0x342110):_0xccbd21?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x4d0971},_0xccbd21)):void 0x0)['catch'](_0x6dc978=>{throw console['error'](_0x6dc978),new _0x3e0d28('commentsrepository-fetch-comment-thread',this['context']);});}getCommentThreads({channelId:_0x44780d,skipNotAttached:_0x4a7968=!0x1,skipEmpty:_0x4bc24f=!0x1,toJSON:_0x5a41e5=!0x1}={}){const _0x2acc7c=[];for(const _0x51a529 of this['_threads']['values']())_0x44780d&&_0x51a529['channelId']!==_0x44780d||_0x4a7968&&!_0x51a529['isAttached']||_0x4bc24f&&0x0===_0x51a529['length']||_0x2acc7c['push'](_0x51a529);return _0x5a41e5?_0x2acc7c['map'](_0x1cf5fc=>_0x1cf5fc['toJSON']()):_0x2acc7c;}getAnnotationForCommentThread(_0x43053a){const _0x93f52b=this['_threadToController']['get'](_0x43053a);return _0x93f52b&&this['context']['plugins']['get'](ae)['getByInnerView'](_0x93f52b['view'])||null;}getCommentThreadForAnnotation(_0x5b0573){const _0x1bcc5c=this['_viewToController']['get'](_0x5b0573['innerView']);return _0x1bcc5c?_0x1bcc5c['model']:null;}setActiveCommentThread(_0xf36fc1){const _0x845020=this['context']['plugins']['get'](ae);if(!_0xf36fc1)return void(this['activeCommentThread']&&_0x845020['deactivateAll']());const _0x254084=this['getCommentThread'](_0xf36fc1);if(!_0x254084)throw new _0x3e0d28('commentsrepository-active-missing-comment-thread',null,{'threadId':_0xf36fc1});if(!this['_threadToController']['has'](_0x254084))throw new _0x3e0d28('commentsrepository-active-not-attached',null,{'threadId':_0xf36fc1});const _0x3d409b=_0x845020['getByInnerView'](this['_threadToController']['get'](_0x254084)['view']);_0x845020['activate'](_0x3d409b);}switchReadOnly(_0x1c03b5,_0xac4f25){_0x1c03b5?this['_readOnlyChannels']['add'](_0xac4f25):this['_readOnlyChannels']['delete'](_0xac4f25),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x5669b3){return this['_readOnlyChannels']['has'](_0x5669b3)||this['_readOnlyChannels']['has'](void 0x0);}createCommentThreadController(_0x1eeedb,_0x25e711){return new xt(_0x1eeedb,_0x25e711);}setPermissions(_0x2656c2,_0x5224ca=ce){this['_permissions']['set'](_0x5224ca,_0x2656c2),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}getPermissions(_0x4318d5=ce){return this['_permissions']['has'](_0x4318d5)?this['_permissions']['get'](_0x4318d5):de;}_addCommentThread({channelId:_0x58ee67,threadId:_0x278166,comments:_0x216a22,unlinkedAt:_0x49bcce,resolvedAt:_0x2a9df2,resolvedBy:_0x3c6c35,target:_0x4eaf68,context:_0x109b04,attributes:_0x56ad24,isFromAdapter:_0x182770,isResolvable:_0x56e439,isSubmitted:_0x362330}){if('string'!=typeof _0x278166)throw new _0x3e0d28('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x278166});if(this['hasCommentThread'](_0x278166))throw new _0x3e0d28('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x278166});const _0x2d726c=new fe(this,{'channelId':_0x58ee67,'id':_0x278166,'context':_0x109b04,'attributes':_0x56ad24,'unlinkedAt':_0x49bcce,'resolvedAt':_0x2a9df2,'resolvedBy':_0x3c6c35?this['context']['plugins']['get'](_0x131f9d)['getUser'](_0x3c6c35):null,'isResolvable':_0x56e439,'isSubmitted':_0x362330||_0x182770});this['_threads']['set'](_0x278166,_0x2d726c);for(const _0x354012 of _0x216a22)_0x2d726c['_add'](this['_createNewComment']({'threadId':_0x278166,..._0x354012}));return _0x4eaf68&&_0x2d726c['attachTo'](_0x4eaf68),_0x182770||!_0x2d726c['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x58ee67,'threadId':_0x278166});}_submitCommentThread({channelId:_0x46d4df,threadId:_0x4f74c7}){if(!this['hasCommentThread'](_0x4f74c7))throw new _0x3e0d28('commentsrepository-missing-comment-thread',this);const _0x1bed73=this['getCommentThread'](_0x4f74c7);if(_0x1bed73['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x2005df,comments:_0x5c76dd,resolvedAt:_0x26a08f,resolvedBy:_0x117ebd,context:_0x20799d,attributes:_0x2444cb}=_0x1bed73,_0x5e3f55=this['context']['plugins']['get']('PendingActions'),_0x48104b=_0x5e3f55['add'](St(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x46d4df,'threadId':_0x2005df,'comments':_0x5c76dd['map'](_0x4cf5e4=>_0x4cf5e4['toJSON']()),'resolvedAt':_0x26a08f,'resolvedBy':_0x117ebd?_0x117ebd['id']:_0x117ebd,'context':_0x20799d,'attributes':_0x2444cb})['then'](({comments:_0x41fb0f})=>{_0x5e3f55['remove'](_0x48104b);for(const _0x4b5303 of _0x41fb0f)this['_updateComment']({'channelId':_0x46d4df,'threadId':_0x4f74c7,'commentId':_0x4b5303['commentId'],'createdAt':_0x4b5303['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x1cac69=>{throw console['error'](_0x1cac69),new _0x3e0d28('commentsrepository-add-comment-thread-internal-error',this);});}_attachCommentThread({threadId:_0x20b862,target:_0x224304}){const _0xcc97f9=this['getCommentThread'](_0x20b862);if(!_0xcc97f9)throw new _0x3e0d28('commentsrepository-attach-missing-comment-thread',this);const _0x2b5ac9=this['context']['plugins']['get']('PendingActions'),_0x339427=this['context']['plugins']['get'](ae),_0x2bc6a9=this['_createCommentThreadView'](_0xcc97f9),_0x1d2e2b=new xt(_0xcc97f9,_0x2bc6a9);let _0x22153e=null;_0x2bc6a9['on']('change:isDirty',(_0x46ebfd,_0x522c22,_0x563bdc)=>{_0x563bdc?_0x22153e=_0x2b5ac9['add'](St(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x22153e&&(_0x2b5ac9['remove'](_0x22153e),_0x22153e=null);}),this['_threadToController']['set'](_0xcc97f9,_0x1d2e2b),this['_viewToController']['set'](_0x2bc6a9,_0x1d2e2b);const _0x24fd26=new ee(this['context']['locale'],_0x2bc6a9);_0x24fd26['bind']('length')['to'](_0x2bc6a9),_0x24fd26['bind']('isDirty')['to'](_0x2bc6a9,'isDirty',_0x2bc6a9,'length',(_0xe47528,_0x4a5d23)=>_0xe47528||!_0x4a5d23),_0x24fd26['bind']('isActive')['to'](_0x2bc6a9),_0x24fd26['type']='comment';const _0x59eb21=new se({'view':_0x24fd26,'target':_0x224304,'type':'comment','isVisible':!_0xcc97f9['archivedAt']&&!!('function'==typeof _0x224304?_0x224304():_0x224304)});return _0x2bc6a9['on']('escape',()=>{_0x59eb21['fire']('escape');}),this['_bindAnnotationToEditors'](_0x2bc6a9,_0x59eb21),_0x339427['add'](_0x59eb21),_0x59eb21;}_bindAnnotationToEditors(_0x15507f,_0x34c568){this['listenTo'](_0x15507f,'editorReady',(_0xce8a5c,_0x720725)=>{const _0x4067d2=_0x720725['ui']['view']['body']['bodyCollectionContainer'];_0x34c568['focusableElements']['add'](_0x4067d2),this['context']instanceof _0x2e8dd0&&this['context']['ui']['focusTracker']['add'](_0x4067d2);},{'priority':'highest'}),this['listenTo'](_0x15507f,'editorDestroyed',(_0x593133,_0x5b0550)=>{const _0x195c48=_0x5b0550['ui']['view']['body']['bodyCollectionContainer'];_0x34c568['focusableElements']['has'](_0x195c48)&&_0x34c568['focusableElements']['remove'](_0x195c48),this['context']instanceof _0x2e8dd0&&this['context']['ui']['focusTracker']['remove'](_0x195c48);});}_unbindEditors(_0x938833){this['stopListening'](_0x938833,'editorReady'),this['stopListening'](_0x938833,'editorDestroyed');}_createCommentThreadView(_0x58202e){const _0xce694d=this['context']['plugins']['get'](_0x131f9d),{config:_0x2bfa7a,locale:_0x55915c}=this['context'],_0x597d62=_0x792941(_0x2bfa7a['get']('locale'),_0x55915c);return new(0x0,(_0x2bfa7a['get']('comments'))['CommentThreadView'])(_0x55915c,_0x58202e,_0xce694d['me'],{'editorConfig':{..._0x2bfa7a['get']('comments.editorConfig'),...this['_getCommentEditorOverlayConfig'](),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x2bfa7a['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x2bfa7a['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x2bfa7a['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x2bfa7a['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x597d62,'CommentView':_0x2bfa7a['get']('comments')['CommentView']});}_getCommentEditorOverlayConfig(){const _0x49c3de=this['context']['config'],_0x592bc8=_0x49c3de['get']('comments.editorConfig'),_0x58a781=_0x592bc8?.['ui']?.['overlayContainer']||_0x49c3de['get']('sidebar.overlayContainer')||_0x49c3de['get']('ui.overlayContainer');return _0x58a781?{'ui':{..._0x592bc8?.['ui'],'overlayContainer':_0x58a781}}:{};}_resolveCommentThread({threadId:_0xfaa7ab,channelId:_0x423801,resolvedAt:_0xb7158f,resolvedBy:_0x5a3f66,isFromAdapter:_0x109af8}){if(!this['hasCommentThread'](_0xfaa7ab))throw new _0x3e0d28('commentsrepository-missing-comment-thread',null,{'threadId':_0xfaa7ab});const _0x4f58da=this['getCommentThread'](_0xfaa7ab);if(_0x4f58da['isResolved'])throw new _0x3e0d28('commentsrepository-resolved-comment-thread',null,{'threadId':_0xfaa7ab});const _0x576bac=this['context']['plugins']['get'](_0x131f9d);if(_0x4f58da['resolvedBy']=_0x576bac['getUser'](_0x5a3f66),_0x4f58da['resolvedAt']=_0xb7158f,_0x109af8||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x14efce=this['context']['plugins']['get']('PendingActions'),_0x54c6d0=_0x14efce['add'](St(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x423801,'threadId':_0xfaa7ab})['then'](({resolvedAt:_0x470820,resolvedBy:_0x3aabc6})=>{_0x14efce['remove'](_0x54c6d0),_0x4f58da['resolvedBy']['id']!==_0x3aabc6&&(_0x4f58da['resolvedBy']=_0x576bac['getUser'](_0x3aabc6)),_0x4f58da['resolvedAt']=_0x470820;})['catch'](_0x145142=>{throw console['error'](_0x145142),new _0x3e0d28('commentsrepository-resolve-comment-thread-internal-error',this);});}_reopenCommentThread({threadId:_0x5c5f2c,channelId:_0x26eba2,isFromAdapter:_0xb5d1ad}){if(!this['hasCommentThread'](_0x5c5f2c))throw new _0x3e0d28('commentsrepository-missing-comment-thread',null,{'threadId':_0x5c5f2c});const _0x495dd4=this['getCommentThread'](_0x5c5f2c);if(!_0x495dd4['isResolved'])throw new _0x3e0d28('commentsrepository-reopen-comment-thread',null,{'threadId':_0x5c5f2c});if(_0x495dd4['resolvedBy']=null,_0x495dd4['resolvedAt']=null,_0xb5d1ad||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x12a457=this['context']['plugins']['get']('PendingActions'),_0x14cae1=_0x12a457['add'](St(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x26eba2,'threadId':_0x5c5f2c})['then'](()=>_0x12a457['remove'](_0x14cae1))['catch'](_0x32fc22=>{throw console['error'](_0x32fc22),new _0x3e0d28('commentsrepository-reopen-comment-thread-internal-error',this);});}_removeCommentThread({threadId:_0x1bacf8,isFromAdapter:_0x3fc309}){const _0x4f58ed=this['getCommentThread'](_0x1bacf8);if(!_0x4f58ed)throw new _0x3e0d28('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x1bacf8),this['_threads']['delete'](_0x1bacf8),!_0x4f58ed['isSubmitted']||_0x3fc309||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x1a50a4=this['context']['plugins']['get']('PendingActions'),{channelId:_0xed1bc6}=_0x4f58ed,_0x59981b=_0x1a50a4['add'](St(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0xed1bc6,'threadId':_0x1bacf8})['then'](()=>_0x1a50a4['remove'](_0x59981b))['catch'](_0x5eabe3=>{throw console['error'](_0x5eabe3),new _0x3e0d28('commentsrepository-remove-comment-thread-internal-error',this);});}_updateCommentThread({threadId:_0x2490df,unlinkedAt:_0x15c3fb,context:_0x4cb58e,attributes:_0xf71dea,isFromAdapter:_0x295d2b}){if('string'!=typeof _0x2490df)throw new _0x3e0d28('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x2490df});if(!this['hasCommentThread'](_0x2490df))throw new _0x3e0d28('commentsrepository-missing-comment-thread',null,{'threadId':_0x2490df});const _0x1ae950=this['getCommentThread'](_0x2490df);let _0x143437=!0x1;if(void 0x0!==_0x4cb58e&&_0x1ae950['context']!==_0x4cb58e&&(_0x1ae950['context']=_0x4cb58e,_0x143437=!0x0),void 0x0!==_0x15c3fb&&_0x1ae950['unlinkedAt']!==_0x15c3fb&&(_0x1ae950['unlinkedAt']=_0x15c3fb,_0x143437=!0x0),_0xf71dea&&!_0x76a3e5(_0xf71dea,_0x1ae950['attributes'])&&(_0x1ae950['attributes']=_0xf71dea,_0x143437=!0x0),!_0x143437)return Promise['resolve']();if(!_0x1ae950['isSubmitted']||_0x295d2b||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x589f51=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1b9506}=_0x1ae950,_0x296e9e=_0x589f51['add'](St(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x1b9506,'threadId':_0x2490df,'context':_0x4cb58e,'unlinkedAt':_0x15c3fb,'attributes':_0xf71dea})['then'](()=>_0x589f51['remove'](_0x296e9e))['catch'](_0x1d9a83=>{throw console['error'](_0x1d9a83),new _0x3e0d28('commentsrepository-update-comment-thread-internal-error',this);});}_detachCommentThread(_0x212097){const _0x4142aa=this['context']['plugins']['get'](ae),_0x47277b=this['getCommentThread'](_0x212097);if(_0x47277b['_isAttached']=!0x1,this['_threadToController']['has'](_0x47277b)){const _0x298565=this['_threadToController']['get'](_0x47277b),_0xa60135=_0x298565['view'],_0x53a964=_0x4142aa['getByInnerView'](_0xa60135);this['_threadToController']['delete'](_0x47277b),this['_viewToController']['delete'](_0xa60135),_0x53a964&&_0x4142aa['remove'](_0x53a964),_0x298565['destroy'](),_0xa60135['destroy']()['then'](()=>{this['_unbindEditors'](_0xa60135);});}}_updateActiveAnnotation({threadId:_0x163b02,resolvedAt:_0x5795b6,unlinkedAt:_0x542c60}){const _0x2e9448=!!_0x5795b6,_0x7011c8=this['context']['plugins']['get'](ae),_0x148b04=this['getCommentThread'](_0x163b02);if(this['_threadToController']['has'](_0x148b04)){const _0x446528=this['_threadToController']['get'](_0x148b04)['view'],_0x250084=_0x7011c8['getByInnerView'](_0x446528);_0x250084&&(_0x2e9448&&_0x7011c8['_removeActiveAnnotation'](_0x250084),_0x542c60?_0x250084['isVisible']=!0x1:_0x250084['refreshVisibility']());}}_getExternalAuthor(_0x18927c){const _0x4326b5=this['context']['plugins']['get'](_0x131f9d),_0xc4fa6a=_0x5245da('external:'+_0x18927c),_0x36f7d0=_0x4326b5['getUser'](_0xc4fa6a);return _0x36f7d0||_0x4326b5['addUser']({'id':_0xc4fa6a,'name':_0x18927c});}_createNewComment({threadId:_0x4f302f,commentId:_0x155144=_0x2f6db9(),content:_0x575ec5,authorId:_0x44a66c,createdAt:_0x26edba,attributes:_0x2ab8de}){if('string'!=typeof _0x155144)throw new _0x3e0d28('commentsrepository-invalid-commentid');if('string'!=typeof _0x44a66c)throw new _0x3e0d28('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x575ec5||!_0x575ec5['trim']())throw new _0x3e0d28('commentsrepository-invalid-comment-content');const _0x594ce4=this['context']['plugins']['get'](_0x131f9d)['getUser'](_0x44a66c);if(!_0x594ce4)throw new _0x3e0d28('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x44a66c});let _0x5c19ae=null,_0x3f6986=_0x26edba;return _0x2ab8de?.['@external']&&(_0x5c19ae=this['_getExternalAuthor'](_0x2ab8de['@external']['authorName']),_0x3f6986=new Date(_0x2ab8de['@external']['createdAt'])),new pe(this,{'threadId':_0x4f302f,'id':_0x155144,'author':_0x5c19ae||_0x594ce4,'creator':_0x594ce4,'content':_0x575ec5,'createdAt':_0x26edba,'authoredAt':_0x3f6986,'attributes':_0x2ab8de});}_addComment(_0x330766){let {threadId:_0x163a9c,content:_0x20573a,attributes:_0x670ccd,isFromAdapter:_0x5c24a4}=_0x330766;const _0x12a09f=this['getCommentThread'](_0x330766['threadId']);if(!_0x12a09f)throw new _0x3e0d28('commentsrepository-add-comment-to-missing-comment-thread',this);const _0xbc6c7c=this['_createNewComment'](_0x330766),{id:_0x424dd3}=_0xbc6c7c;if(_0x12a09f['_add'](_0xbc6c7c),_0x5c24a4||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x12a09f['isSubmitted'])return Promise['resolve']();const _0x3fa0c3=this['context']['plugins']['get']('PendingActions'),{channelId:_0x363e7b}=_0x12a09f,_0x567de9=_0x3fa0c3['add'](St(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x670ccd||(_0x670ccd={}),this['adapter']['addComment']({'channelId':_0x363e7b,'threadId':_0x163a9c,'commentId':_0x424dd3,'content':_0x20573a,'attributes':_0x670ccd})['then'](_0x438f27=>{_0x3fa0c3['remove'](_0x567de9),_0x438f27&&this['_updateComment']({'channelId':_0x363e7b,'threadId':_0x163a9c,'commentId':_0x424dd3,'createdAt':_0x438f27['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x329bc2=>{throw console['error'](_0x329bc2),new _0x3e0d28('commentsrepository-add-comment-internal-error',this);});}_updateComment({threadId:_0x3b0dd2,commentId:_0x397076,content:_0x575435,createdAt:_0x513202,attributes:_0x1c554b,isFromAdapter:_0x4b3049}){if(void 0x0!==_0x575435&&('string'!=typeof _0x575435||!_0x575435['trim']()['length']))throw new _0x3e0d28('commentsrepository-update-comment-invalid-content');const _0x5d8757=this['getCommentThread'](_0x3b0dd2),_0x1c992b=_0x5d8757['getComment'](_0x397076);if(!_0x1c992b)throw new _0x3e0d28('commentsrepository-update-missing-comment',this);let _0x3fe5bc=!0x1;if(_0x575435&&_0x575435!==_0x1c992b['content']&&(_0x1c992b['isEditable']||_0x4b3049)&&(_0x1c992b['content']=_0x575435,_0x3fe5bc=!0x0),_0x513202&&_0x513202!==_0x1c992b['createdAt']&&(_0x1c992b['createdAt']=_0x513202,_0x1c992b['isExternal']||(_0x1c992b['authoredAt']=_0x513202),_0x3fe5bc=!0x0),_0x1c554b&&!_0x76a3e5(_0x1c554b,_0x1c992b['attributes'])&&(_0x1c992b['attributes']=_0x1c554b,_0x3fe5bc=!0x0),!_0x3fe5bc)return Promise['resolve']();if(_0x5d8757['fire']('commentUpdated'),_0x4b3049||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x21c5d9=this['context']['plugins']['get']('PendingActions'),{channelId:_0x50d887}=this['getCommentThread'](_0x1c992b['threadId']),_0x4bd1ae=_0x21c5d9['add'](St(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x50d887,'threadId':_0x3b0dd2,'commentId':_0x397076,'content':_0x575435,'attributes':_0x1c554b})['then'](()=>_0x21c5d9['remove'](_0x4bd1ae))['catch'](_0x510be2=>{throw console['error'](_0x510be2),new _0x3e0d28('commentsrepository-update-comment-internal-error',this);});}_removeComment({threadId:_0x3821d6,commentId:_0x36c4f4,isFromAdapter:_0x27fd7c}){const _0x3bc29f=this['getCommentThread'](_0x3821d6),_0x118fc7=_0x3bc29f['getComment'](_0x36c4f4);if(!_0x118fc7)throw new _0x3e0d28('commentsrepository-remove-missing-comment',this);if(_0x3bc29f['_remove'](_0x118fc7),_0x27fd7c||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x1a10b4=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5bfa24}=_0x3bc29f,_0x5c9679=_0x1a10b4['add'](St(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x5bfa24,'threadId':_0x3821d6,'commentId':_0x36c4f4})['then'](()=>_0x1a10b4['remove'](_0x5c9679))['catch'](_0x5896e1=>{throw console['error'](_0x5896e1),new _0x3e0d28('commentsrepository-remove-comment-internal-error',this);});}},fe=class extends le{['channelId'];['id'];_isAttached;_isSubmitted;comments;_repository;constructor(_0x30ac49,_0x1f72b6){super();const _0x63b86d=_0x1f72b6['isResolvable'];this['channelId']=_0x1f72b6['channelId'],this['id']=_0x1f72b6['id'],this['comments']=new _0x49bb96(),this['_repository']=_0x30ac49,this['_isAttached']=!0x1,this['_isSubmitted']=_0x1f72b6['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x30ac49,'_permissions',_0x30ac49,'_readOnlyChannels',()=>_0x30ac49['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x30ac49,'_permissions',()=>_0x30ac49['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x30ac49,'_permissions',()=>{const _0x2c6588=_0x30ac49['getPermissions'](this['channelId']);return _0x2c6588['write']||_0x2c6588['admin'];}),this['bind']('isResolvable')['to'](_0x30ac49,'_permissions',()=>_0x63b86d&&_0x30ac49['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x1f72b6['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x258dec,_0x2d671d)=>_0x258dec?_0x2d671d?_0x258dec<_0x2d671d?_0x258dec:_0x2d671d:_0x258dec:_0x2d671d),this['set']('unlinkedAt',_0x1f72b6['unlinkedAt']||null),this['set']('resolvedAt',_0x1f72b6['resolvedAt']||null),this['set']('resolvedBy',_0x1f72b6['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x4e6bc7=>!!_0x4e6bc7),this['set']('attributes',_0x1f72b6['attributes']||{});}get weight(){return Array['from'](this['comments'])['reduce']((_0x49bfc2,_0x12c3a2)=>_0x49bfc2+_0x12c3a2['weight'],0x0);}get length(){return this['comments']['length'];}get isAttached(){return this['_isAttached'];}get isSubmitted(){return this['_isSubmitted'];}submit(){const {channelId:_0x29fc06,id:_0x426547}=this;this['_repository']['fire'](we('submitCommentThread',_0x29fc06),{'channelId':_0x29fc06,'threadId':_0x426547});}setUnlinkedAt(_0x2a7041){this['_update']({'unlinkedAt':_0x2a7041});}['resolve']({resolvedAt:_0x468163=new Date(),resolvedBy:_0x2f06ab='',isFromAdapter:_0x5d5207=!0x1}={}){const _0x1d1dc1=this['_repository']['context']['plugins']['get'](_0x131f9d)['me'],{channelId:_0x245a5c,id:_0x1ccf88}=this;this['_repository']['fire'](we('resolveCommentThread',_0x245a5c),{'channelId':_0x245a5c,'threadId':_0x1ccf88,'resolvedAt':_0x468163,'resolvedBy':_0x2f06ab||_0x1d1dc1['id'],'isFromAdapter':_0x5d5207});}['reopen']({isFromAdapter:_0x47527a=!0x1}={}){const {channelId:_0x4bccd8,id:_0x2e5e74}=this;this['_repository']['fire'](we('reopenCommentThread',_0x4bccd8),{'channelId':_0x4bccd8,'threadId':_0x2e5e74,'isFromAdapter':_0x47527a});}setContext(_0x166cb1){this['context']||this['_update']({'context':_0x166cb1});}setAttribute(_0x37bd37,_0x5e25a9){const _0x2e1c73=_0x443a77(this['attributes']);_0x2af30b(_0x2e1c73,_0x37bd37,_0x5e25a9),this['_update']({'attributes':_0x2e1c73});}removeAttribute(_0x4c18ac){const _0x8a514f=_0x443a77(this['attributes']);_0x293c76(_0x8a514f,_0x4c18ac),this['_update']({'attributes':_0x8a514f});}['remove']({isFromAdapter:_0x3f7674=!0x1}={}){const {channelId:_0x3bb52a,id:_0x1a3de2}=this;this['_repository']['fire'](we('removeCommentThread',_0x3bb52a),{'channelId':_0x3bb52a,'threadId':_0x1a3de2,'isFromAdapter':_0x3f7674});}attachTo(_0x49d544){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x49d544});}addComment(_0x12b6fd){const {channelId:_0x1c16e7,id:_0x47c884}=this;this['_repository']['fire'](we('addComment',_0x1c16e7,_0x47c884),Object['assign']({'channelId':_0x1c16e7,'threadId':_0x47c884},_0x12b6fd));}getComment(_0x90d43a){if('string'!=typeof _0x90d43a)throw new _0x3e0d28('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x90d43a});return this['comments']['get'](_0x90d43a);}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'](_0xbd07e1=>_0xbd07e1['toJSON']()),'attributes':this['attributes']};}['_add'](_0x5229ea){return this['listenTo'](_0x5229ea,'change:authoredAt',()=>{const _0x4c646a=this['_findOptimalIndex'](_0x5229ea),_0x3ff4fc=this['comments'];_0x4c646a-0x1!=_0x3ff4fc['getIndex'](_0x5229ea)&&_0x4c646a+0x1!=_0x3ff4fc['getIndex'](_0x5229ea)&&(this['_remove'](_0x5229ea),this['_add'](_0x5229ea));}),this['comments']['add'](_0x5229ea,this['_findOptimalIndex'](_0x5229ea));}_update(_0x4d85ea){const {channelId:_0x3dd23b,id:_0x2f4768}=this;this['_repository']['fire'](we('updateCommentThread',_0x3dd23b),{..._0x4d85ea,'channelId':_0x3dd23b,'threadId':_0x2f4768});}['_remove'](_0x5129d6){return this['stopListening'](_0x5129d6),_0x5129d6['destroy'](),this['comments']['remove'](_0x5129d6);}_findOptimalIndex(_0x2a11c0){const _0x2c0ea1=this['comments']['find'](_0x4d0d1f=>new Date(_0x4d0d1f['authoredAt'])['getTime']()>new Date(_0x2a11c0['authoredAt'])['getTime']());return _0x2c0ea1?this['comments']['getIndex'](_0x2c0ea1):this['length'];}},pe=class extends me{['id'];threadId;author;creator;createdAt;_repository;constructor(_0x53378a,_0x311230){super();const _0xc4e85c=_0x53378a['context']['plugins']['get'](_0x131f9d)['me'],_0x492eac=_0x53378a['getCommentThread'](_0x311230['threadId']),_0x21e6cd=0x0===_0x492eac['comments']['length'],_0x59a1f1=_0xc4e85c===_0x311230['author'];this['id']=_0x311230['id'],this['threadId']=_0x311230['threadId'],this['author']=_0x311230['author'],this['creator']=_0x311230['creator'],this['set']('content',_0x311230['content']),this['createdAt']=_0x311230['createdAt']||new Date(),this['set']('authoredAt',_0x311230['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x492eac,'resolvedAt'),this['set']('attributes',_0x311230['attributes']||{}),this['bind']('isEditable')['to'](_0x53378a,'_permissions',()=>{const _0x1d1b6a=_0x53378a['getPermissions'](_0x492eac['channelId'])['write'],_0x384b2d=_0x53378a['getPermissions'](_0x492eac['channelId'])['modifyAll'];return _0x59a1f1&&_0x1d1b6a||!_0x59a1f1&&_0x384b2d;}),this['bind']('isRemovable')['to'](_0x492eac,'isRemovable',_0x53378a,'_permissions',_0x3d269b=>{const _0x4b39d7=_0x53378a['getPermissions'](_0x492eac['channelId'])['write'],_0x3e9bd3=_0x53378a['getPermissions'](_0x492eac['channelId'])['modifyAll'];return _0x59a1f1&&_0x4b39d7||_0x3d269b&&_0x21e6cd||!_0x59a1f1&&_0x3e9bd3&&!_0x21e6cd;}),this['bind']('isReadOnly')['to'](_0x492eac,'isReadOnly'),this['_repository']=_0x53378a;}get isExternal(){return Boolean(this['attributes']&&this['attributes']['@external']);}get weight(){return Math['max'](function(_0x5fa2ea){const _0x4e0a12=document['createElement']('div');return _0x4e0a12['innerHTML']=_0x2d0a81(_0x5fa2ea),_0x4e0a12['textContent']['length'];}(this['content']),0xc8);}update(_0x9b9355){const {threadId:_0x21676b,id:_0xd67917}=this;if(!this['_repository']['hasCommentThread'](_0x21676b))throw new _0x3e0d28('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x42414c}=this['_repository']['getCommentThread'](_0x21676b);this['_repository']['fire'](we('updateComment',_0x42414c,_0x21676b),{'channelId':_0x42414c,'threadId':_0x21676b,'commentId':_0xd67917,..._0x9b9355});}setAttribute(_0x1b9966,_0x440203){const _0x1d71ba=_0x443a77(this['attributes']);_0x2af30b(_0x1d71ba,_0x1b9966,_0x440203),this['update']({'attributes':_0x1d71ba});}removeAttribute(_0x2fe059){const _0x2da75f=_0x443a77(this['attributes']);_0x293c76(_0x2da75f,_0x2fe059),this['update']({'attributes':_0x2da75f});}['remove'](_0x5450ca={}){if(!_0x5450ca['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0xdd6d94,id:_0x190919}=this;if(!this['_repository']['hasCommentThread'](_0xdd6d94))throw new _0x3e0d28('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x3d87bb}=this['_repository']['getCommentThread'](_0xdd6d94);this['_repository']['fire'](we('removeComment',_0x3d87bb,_0xdd6d94),{'channelId':_0x3d87bb,'threadId':_0xdd6d94,'commentId':_0x190919,..._0x5450ca});}toJSON(){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}destroy(){this['stopListening']();}};function we(_0x4a5dbe,..._0x5435dc){for(const _0x2aa2f1 of _0x5435dc)void 0x0!==_0x2aa2f1&&(_0x4a5dbe+=':'+String(_0x2aa2f1));return _0x4a5dbe;}var ge=class extends _0x2883af{constructor(_0x1f4799){super(_0x1f4799),this['set']('hasContent',!0x1);}['refresh'](){const _0x208800=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x57e1eb of _0x208800['getRanges']())if(this['_hasContent'](_0x57e1eb))return void(this['hasContent']=!0x0);}execute({threadId:_0x580734=_0x2f6db9(),ranges:_0x44751c,comment:_0x2d4841}={}){const _0x12b903=this['editor']['model'],_0x29ba6a=_0x44751c??Array['from'](_0x12b903['document']['selection']['getRanges']()),_0x7a542d=[];for(const _0xf728ae of _0x29ba6a)this['_hasContent'](_0xf728ae)&&_0x7a542d['push'](this['_trimToContent'](_0xf728ae));if(!_0x7a542d['length'])throw new _0x3e0d28('addcommentthreadcommand-incorrect-ranges',null);_0x2d4841&&this['_createCommentThread'](_0x580734,_0x2d4841),this['_createMarkersFromRanges'](_0x580734,_0x7a542d,!!_0x2d4841);}_createMarkersFromRanges(_0x3496d0,_0x1b2e4,_0x56f4ef){this['editor']['model']['change'](_0x58c1ac=>{for(const _0x44f693 of _0x1b2e4){const _0x16145f='comment:'+_0x3496d0+':'+_0x2f6db9()['substr'](0x1,0x5);_0x58c1ac['addMarker'](_0x16145f,{'range':_0x44f693,'usingOperation':_0x56f4ef,'affectsData':_0x56f4ef});}});}_createCommentThread(_0x3a755c,_0x2599c9){const _0x3575df=this['editor']['plugins']['get']('CommentsRepository'),_0x14e012=this['editor']['config']['get']('collaboration.channelId'),_0x480baa=this['editor']['plugins']['get']('Users')['me'];if(!_0x480baa)throw new _0x3e0d28('addcommentthreadcommand-user-not-found',null);_0x3575df['addCommentThread']({'threadId':_0x3a755c,'channelId':_0x14e012,'comments':[{'authorId':_0x480baa['id'],'content':_0x2599c9,'createdAt':new Date(),'attributes':{}}]});}_hasContent(_0xc9f2bc){for(const _0x1b8c15 of _0xc9f2bc['getItems']())if(this['_itemIsContent'](_0x1b8c15))return!0x0;return!0x1;}_itemIsContent(_0x33bc59){return _0x33bc59['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x33bc59)&&!_0x33bc59['is']('element','tableCell');}_trimToContent(_0x522819){const _0x34b883=_0x5d865f=>!this['_itemIsContent'](_0x5d865f['item']),_0x1c1b5f=_0x522819['start']['getLastMatchingPosition'](_0x34b883),_0x355bda=_0x522819['end']['getLastMatchingPosition'](_0x34b883,{'direction':'backward'});return this['editor']['model']['createRange'](_0x1c1b5f,_0x355bda);}},_e=class extends _0x3cd9f9{_dataCollectors;_editorAnnotations;static get requires(){return[ae];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xac1960){super(_0xac1960),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}init(){const _0x1158fb=this['editor'],_0x3f7743=_0x1158fb['model']['document']['selection'],_0x2c8f95=_0x31a136(()=>this['refreshSelectedViews'](),0xa);_0x3f7743['on']('change:range',(_0x179ae8,_0x551e6c)=>{_0x551e6c['directChange']&&(_0x2c8f95['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x1158fb['editing']['view']['document'],'change:isFocused',(_0x59827e,_0x53f0e7,_0x3a8047)=>{_0x3a8047&&_0x2c8f95();}),this['listenTo'](_0x1158fb['ui']['focusTracker'],'change:isFocused',(_0x51f2c2,_0x57a71b,_0x484d4a)=>{_0x484d4a||this['fire']('blur',{'isAnnotationTracked':_0x1fd11b=>this['_editorAnnotationsData']['has'](_0x1fd11b['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}registerAnnotation(_0x32334f){if(this['_editorAnnotations']['has'](_0x32334f['view']))return;this['_editorAnnotations']['add'](_0x32334f['view']),this['editor']['ui']['focusTracker']['add'](_0x32334f['view']['element']);const _0x5c3cf4=this['editor']['plugins']['get'](ae);this['listenTo'](_0x5c3cf4['collection'],'remove',(_0x287c55,_0x3d7972)=>{this['editor']['ui']['focusTracker']['remove'](_0x3d7972['view']['element']),this['_editorAnnotations']['delete'](_0x3d7972['view']);});}hasDomSelection(){return this['editor']['editing']['view']['hasDomSelection'];}addSourceCollector(_0x45cbfd){if('function'!=typeof _0x45cbfd)throw new _0x3e0d28('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x45cbfd);}refreshSelectedViews(){this['fire']('refresh');}getOrderedSelectedAnnotations({activeAnnotation:_0x5ef9d6,annotations:_0x45a5e8}){const _0x5b11e6=[],_0x59d57f=this['editor']['model']['document']['selection'],_0x3ded15=Array['from'](_0x59d57f['getRanges']());for(const [_0x1097eb,_0x25bcd3]of this['_editorAnnotationsData']){const _0x4fb74e=_0x44a36d(_0x25bcd3),_0x2c2f3f=_0x45a5e8['getByInnerView'](_0x1097eb);_0x4fb74e&&_0x2c2f3f&&_0x5b11e6['push']({'annotation':_0x2c2f3f,'range':_0x4fb74e});}function _0x44a36d(_0x1f8093){for(const _0x32a7d1 of _0x1f8093)for(const _0x776979 of _0x3ded15)if(_0x32a7d1['containsRange'](_0x776979,!_0x59d57f['isCollapsed']))return _0x32a7d1;return null;}const _0x323544=new Map(Array['from'](_0x45a5e8,(_0x5b8882,_0x4de3bb)=>[_0x5b8882,_0x4de3bb]));return _0x5b11e6['sort']((_0x184154,_0x4d4396)=>{const _0x2019cf=_0x184154['range'],_0x5eac92=_0x4d4396['range'];if(!_0x2019cf['start']['isTouching'](_0x5eac92['start'])||!_0x2019cf['end']['isTouching'](_0x5eac92['end'])){if(_0x2019cf['containsRange'](_0x5eac92,!0x0))return 0x1;if(_0x5eac92['containsRange'](_0x2019cf,!0x0))return-0x1;}return _0x184154['annotation']==_0x5ef9d6?-0x1:_0x4d4396['annotation']==_0x5ef9d6?0x1:(_0x323544['get'](_0x184154['annotation'])??0x0)-(_0x323544['get'](_0x4d4396['annotation'])??0x0);})['map'](_0x5da906=>_0x5da906['annotation']);}get _editorAnnotationsData(){const _0x49fa7c=new Map();for(const _0x4a6203 of Array['from'](this['_dataCollectors']))for(const [_0x4eb973,_0x17a63b]of _0x4a6203())_0x49fa7c['set'](_0x4eb973,_0x17a63b);return _0x49fa7c;}},Ae=class extends _0x3cd9f9{afterInit(){const _0x28a4c9=this['editor'];_0x28a4c9['plugins']['has']('RestrictedEditingModeEditing')&&_0x28a4c9['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},ve=class extends _0x3cd9f9{constructor(_0xb3848b){super(_0xb3848b),this['editor']['config']['define']('importWord.formatting.comments','basic');}afterInit(){const _0x375106=this['editor'],_0x5c0caf=_0x375106['commands']['get']('importWord'),_0x1ca8c3=_0x375106['plugins']['get'](_0x131f9d);_0x5c0caf&&(_0x5c0caf['on']('execute',(_0x2f4487,[,_0x1952d2])=>{_0x1952d2['collaboration_features']={'comments':!0x0,'user_id':_0x1ca8c3['me']['id']};},{'priority':_0x48c2ba['high']+0xa}),this['listenTo'](_0x5c0caf,'dataInsert',this['_handleImportedData']));}_handleImportedData(_0x1d3d09,_0x336e21){const {comment_threads:_0x4eb3a1}=_0x336e21;_0x4eb3a1&&_0x4eb3a1['forEach'](({thread_id:_0x15f5fd,comments:_0x20f1cc,is_resolved:_0x2ea132})=>{const _0x40d022=new Date(),_0xc862dc=_0x20f1cc['map'](({author:_0x427ba4,content:_0x5461b1,created_at:_0x41fe08})=>({'content':_0x5461b1,'authorId':this['editor']['plugins']['get'](_0x131f9d)['me']['id'],'createdAt':_0x40d022,'attributes':{'@external':{'authorName':_0x427ba4,'createdAt':_0x41fe08?new Date(_0x41fe08):new Date(),'source':'importWord'}}})),_0x4e1709=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](ue)['addCommentThread']({'channelId':_0x4e1709,'threadId':_0x15f5fd,'comments':_0xc862dc,'resolvedAt':_0x2ea132?_0x40d022:null});});}},ye=class extends _0x3cd9f9{constructor(_0x1126ed){super(_0x1126ed),this['editor']['config']['define']('comments.copyMarkers','default');}static get requires(){return[Ct,Tt];}afterInit(){const _0x4616ce=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x4616ce,'contentInsertion',(_0x45eb0c,_0x404714)=>this['_removeMarkersWithoutThreads'](_0x404714['content']['markers']),{'priority':'highest'});}_removeMarkersWithoutThreads(_0x12524d){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x12524d;const _0x5929ca=this['editor']['plugins']['get']('CommentsRepository');for(const _0x15b30e of _0x12524d['keys']()){const [_0x2b1048,_0x13d3b3]=_0x15b30e['split'](':');'comment'!=_0x2b1048||_0x5929ca['hasCommentThread'](_0x13d3b3)||_0x12524d['delete'](_0x15b30e);}return _0x12524d;}_registerMarkerInClipboardPipeline(){const _0x375d4e=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x40eb7c=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x40eb7c&&_0x375d4e['_registerMarkerToCopy']('comment',_0x40eb7c);}_mapCommentsCopyConfigToRegisterConfiguration(_0xd51620){switch(_0xd51620){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function Ce(_0x5e6f6f){const _0x511f82=_0x5e6f6f['split'](':');return{'group':_0x511f82[0x0],'id':_0x511f82[0x1],'part':_0x511f82[0x2]};}var Te=class extends _0x3cd9f9{init(){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}overrideMarkerConverters(){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x50d8e5,_0x5b34cd)=>{if(!_0x5b34cd['options']['showCommentHighlights'])return null;if(_0x5b34cd['options']['ignoreResolvedComments']){const {id:_0x22bcdc}=Ce(_0x50d8e5['markerName']);if(this['editor']['plugins']['get'](ue)['getCommentThread'](_0x22bcdc)?.['isResolved']&&_0x50d8e5['item'])return _0x5b34cd['consumable']['consume'](_0x50d8e5['item'],'addMarker:'+_0x50d8e5['markerName']),_0x5b34cd['consumable']['consume'](_0x50d8e5['item'],'removeMarker:'+_0x50d8e5['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x2f6530=>{_0x2f6530['on']('addMarker:comment',(_0x1fde46,_0x220f9d,_0x4f3fcb)=>{if(!_0x4f3fcb['options']['showCommentHighlights'])return;const _0x2af881=_0x220f9d['item'];if(!_0x2af881)return;const _0x5636a4=_0x4f3fcb['mapper']['toViewElement'](_0x2af881);this['editor']['model']['schema']['isObject'](_0x2af881)&&_0x5636a4&&!_0x5636a4['getCustomProperty']('widget')&&_0x5636a4['is']('containerElement')&&Mt(_0x5636a4,_0x4f3fcb['writer']);},{'priority':'high'});});}overrideHorizontalRuleConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x3859e6,{writer:_0x524644,options:_0x161759})=>{if(!_0x161759['showCommentHighlights'])return null;const _0x22f9cc=_0x524644['createContainerElement']('div'),_0x15e7e1=_0x524644['createEmptyElement']('hr');return _0x524644['addClass']('ck-horizontal-line',_0x22f9cc),_0x524644['insert'](_0x524644['createPositionAt'](_0x22f9cc,0x0),_0x15e7e1),_0x22f9cc;},'converterPriority':'high'});}overrideImageInlineConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x45b562,{writer:_0x49524a,options:_0x53c2f9})=>{if(!_0x53c2f9['showCommentHighlights'])return null;const _0x10be6b=_0x49524a['createContainerElement']('span'),_0x237efb=_0x49524a['createEmptyElement']('img');return _0x49524a['addClass']('image-inline',_0x10be6b),_0x49524a['insert'](_0x49524a['createPositionAt'](_0x10be6b,0x0),_0x237efb),_0x10be6b;},'converterPriority':'high'});}overrideMediaEmbedConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x16e092,{writer:_0x3bacbf,options:_0x26adfb})=>{if(_0x26adfb['showCommentHighlights'])return _0x3bacbf['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x108cf4,_0x3aca9d,_0x393ce4)=>{_0x393ce4['options']['showCommentHighlights']&&_0x108cf4['stop']();},{'priority':'high'});}},Ie=class extends _0x3cd9f9{static get requires(){return[ue,_e,_0x131f9d,Ae,ve,ye,Te];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3a5882){super(_0x3a5882),this['set']('isThreadsLoadingPaused',!0x0),_0x3a5882['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x48df24,_0x57b1d0,_0x9eebaa,_0x3c2838)=>{const _0x7af479=_0x3a5882['plugins']['get'](ue),_0x41fadf=_0x9eebaa?Ce(_0x9eebaa)['id']:null;_0x3a5882['model']['change'](()=>{if(_0x41fadf){const _0x39be86=this['getAllMarkersForId'](_0x41fadf);for(const _0x506cf5 of _0x39be86)_0x3a5882['editing']['reconvertMarker'](_0x506cf5);}if(_0x3c2838){const {id:_0x606d7a}=Ce(_0x3c2838),_0x47e4a2=_0x7af479['getCommentThread'](_0x606d7a);if(_0x47e4a2&&_0x47e4a2['unlinkedAt'])return;if(_0x47e4a2&&!_0x47e4a2['isAttached'])return;const _0x1866dd=this['getAllMarkersForId'](_0x606d7a);for(const _0x568fe5 of _0x1866dd)_0x3a5882['editing']['reconvertMarker'](_0x568fe5);}}),_0x41fadf&&this['scrollToThreadMarker'](_0x41fadf);}),this['_initAriaMarkerChangeAnnouncements']();}init(){const _0x4012d6=this['editor'],_0x208f58=_0x4012d6['plugins']['get'](ue),_0x2cf1e5=_0x4012d6['config']['get']('collaboration.channelId'),_0x517570=_0x208f58['getCommentThreads']()['filter'](_0x358422=>_0x358422['channelId']!==_0x2cf1e5);_0x4012d6['commands']['add']('addCommentThread',new ge(_0x4012d6)),this['listenTo'](_0x4012d6,'change:isReadOnly',(_0x323af3,_0x49318f,_0x5e2e96)=>{_0x208f58['switchReadOnly'](_0x5e2e96,_0x4012d6['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x208f58,be('addCommentThread',_0x2cf1e5),(_0x3faf26,{threadId:_0x4dbe4f})=>{this['editor']['plugins']['get'](ue)['getCommentThread'](_0x4dbe4f)?.['unlinkedAt']&&this['_attachArchivedThread'](_0x4dbe4f);}),this['listenTo'](_0x208f58,be('removeCommentThread',_0x2cf1e5),(_0x3b9844,{threadId:_0xbd6339})=>{_0x4012d6['model']['enqueueChange']({'isUndoable':!0x1},_0x4fcce1=>{const _0x4bfe37=this['getAllMarkersForId'](_0xbd6339);for(const _0xdad25b of _0x4bfe37)_0x4fcce1['removeMarker'](_0xdad25b);});}),this['listenTo'](_0x208f58,be('resolveCommentThread',_0x2cf1e5),(_0xc6325a,{threadId:_0x5f575c})=>{this['_reconvertMarkers'](_0x5f575c);const _0x1d2924=this['editor']['plugins']['get'](ae);(this['editor']['editing']['view']['hasDomSelection']||_0x1d2924['collection']['isFocused'])&&(this['editor']['plugins']['get'](ue)['getCommentThread'](_0x5f575c)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x208f58,be('reopenCommentThread',_0x2cf1e5),(_0x12c9c8,{threadId:_0x272d72})=>{this['_reconvertMarkers'](_0x272d72);},{'priority':'low'}),this['listenTo'](_0x208f58,be('addComment',_0x2cf1e5),(_0x333ff5,{threadId:_0x362253,isFromAdapter:_0x6d0588})=>{const _0x48955c=this['getAllMarkersForId'](_0x362253);!_0x6d0588&&0x0!=_0x48955c['length']&&_0x208f58['hasCommentThread'](_0x362253)&&0x1===_0x208f58['getCommentThread'](_0x362253)['length']&&_0x4012d6['model']['enqueueChange']({'isUndoable':!0x1},_0x7c4d12=>{for(const _0x52defb of _0x48955c)_0x7c4d12['updateMarker'](_0x52defb,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x517570);}afterInit(){!async function(_0x449b49){const _0x284e11='mr4z2yakM3x0phtD7jBw1T6qRfeUuZcOLNKVgQSPE9iGIHoXlJW8YsCb5AndFv',_0x4861f6=0x797b8,_0x23c16a={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x1e676d(_0x5b124b){const _0x562ac9=new window['Promise'](_0x59e584=>{_0x5b124b['once']('ready',_0x59e584);}),_0x1503a2=window['Date']['now'](),_0x12a4cc=_0x5b124b['config']['get']('licenseKey');async function _0x5893ac(){let _0x22f27c,_0x1b09fc=null,_0x2befb7=null;try{return'GPL'==_0x12a4cc?'NotAllowed':(_0x22f27c=_0x257f0d(),_0x22f27c?(_0x22f27c['usageEndpoint']&&(_0x2befb7=_0x389a37(_0x22f27c['usageEndpoint'],_0x22f27c['jti'])),await _0x4cc277()?_0x2ce71c()?_0x58d57f()?'Expired':_0x7086d()?('evaluation'==_0x22f27c['licenseType']&&(_0x1b09fc=_0x2f7dd6('EvaluationLimit')),await _0x4047fd()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x58d57f(){const _0x2ded12=['evaluation','trial']['includes'](_0x22f27c['licenseType'])?_0x1503a2/0x3e8:0xe10*_0x4861f6;return _0x22f27c['exp']<_0x2ded12;}function _0x2ce71c(){const _0xc5b697=_0x22f27c['features'];if(!_0xc5b697)return!0x1;if(_0xc5b697['includes']('*'))return!0x0;if(_0xc5b697['includes']('CMT'))return!0x0;if(_0xc5b697['includes']('TRILIUM')&&_0x55eb09())return!0x0;if(_0xc5b697['includes']('RCMT')){if(_0x3fa676())return!0x0;if(_0x356b56()||_0x5e7497())return!0x0;}return!0x1;}function _0x7086d(){const _0x4d5b82=_0x22f27c['licensedHosts'];if(!_0x4d5b82||0x0==_0x4d5b82['length'])return!0x0;const {hostname:_0x3986ec}=new URL(window['location']['href']);if(_0x4d5b82['includes'](_0x3986ec))return!0x0;const _0x17b8b1=_0x3986ec['split']('.');return _0x4d5b82['filter'](_0x1569c0=>_0x1569c0['includes']('*'))['map'](_0x289c6b=>_0x289c6b['split']('.'))['filter'](_0x145ac0=>_0x145ac0['length']<=_0x17b8b1['length'])['map'](_0x37d1cf=>Array(_0x17b8b1['length']-_0x37d1cf['length'])['fill']('*'===_0x37d1cf[0x0]?'*':'')['concat'](_0x37d1cf))['some'](_0x127bb0=>_0x17b8b1['every']((_0x5af6d2,_0x5dc271)=>_0x127bb0[_0x5dc271]===_0x5af6d2||'*'===_0x127bb0[_0x5dc271]));}function _0x4047fd(){return _0x1b09fc&&_0x2befb7?new window['Promise']((_0x315d87,_0x146c79)=>{_0x1b09fc['then'](_0x315d87,_0x146c79),_0x2befb7['then'](_0x23881b=>{'Valid'!=_0x23881b&&_0x315d87(_0x23881b);},_0x146c79);}):_0x1b09fc||_0x2befb7||'Valid';}}function _0x389a37(_0x12d1c8,_0x184c4e){return new window['Promise'](_0x5112d2=>{if(_0x30127c())return _0x5112d2('Valid');_0x46dfbd(),_0x5b124b['decorate']('_sendUsageRequest');let _0x4e0c00=!0x1;const _0x3f5ee5=_0x2f6db9();function _0x5413a1(_0x3bda8a){return!!_0x3bda8a&&('object'==typeof _0x3bda8a||'function'==typeof _0x3bda8a)&&'function'==typeof _0x3bda8a['then']&&'function'==typeof _0x3bda8a['catch'];}function _0x59a9df(_0x27c16f){_0x273028(_0x27c16f)['then'](_0x87aa8b=>_0x87aa8b&&'ok'==_0x87aa8b['status']?_0x4a6f8b(_0x1b49cf(_0x3f5ee5+_0x184c4e))!=_0x87aa8b['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x561442=>(_0xc76a12(),_0x561442),()=>{const _0x3a6549=_0x676227();return null==_0x3a6549?(_0xc76a12(),'Valid'):_0x1503a2-_0x3a6549>0x240c8400?'UsageLimit':'Valid';})['then'](_0x5112d2)['catch'](()=>{_0x5112d2('UsageLimit');});const _0x1cb286=0x36ee80;function _0xc76a12(){const _0x3e788b='llct-'+_0x4a6f8b(_0x1b49cf(_0x12d1c8)),_0x460c1f=_0x4427a1(_0x4a6f8b(window['Math']['ceil'](_0x1503a2/_0x1cb286)));window['localStorage']['setItem'](_0x3e788b,_0x460c1f);}function _0x676227(){const _0x1e8b4b='llct-'+_0x4a6f8b(_0x1b49cf(_0x12d1c8)),_0x1a86de=window['localStorage']['getItem'](_0x1e8b4b);return _0x1a86de?window['parseInt'](_0x4427a1(_0x1a86de),0x10)*_0x1cb286:null;}function _0x273028(_0x4933f2){return new window['Promise']((_0x2af581,_0x40fc0a)=>{_0x4933f2['then'](_0x2af581,_0x40fc0a),window['setTimeout'](_0x40fc0a,0x1d4c0);});}}_0x5b124b['on']('_sendUsageRequest',(_0x302e9c,_0xaefa56)=>{if(_0xaefa56[0x0]!=_0x12d1c8)return _0x5112d2('UsageLimit');_0xaefa56[0x1]={..._0xaefa56[0x1],'requestId':_0x3f5ee5};},{'priority':'high'}),_0x5b124b['on']('_sendUsageRequest',_0x1a5bdd=>{_0x5413a1(_0x1a5bdd['return'])&&(_0x4e0c00=!0x0,_0x59a9df(_0x1a5bdd['return']));},{'priority':'low'}),_0x562ac9['then'](()=>{_0x4e0c00||_0x5112d2('UsageLimit');});});function _0x30127c(){return'auto'==_0x5b124b['editing']['view']['_overlayModeHint'];}function _0x46dfbd(){_0x5b124b['editing']['view']['_overlayModeHint']='auto';}}function _0x2f7dd6(_0x82d542){const _0x1f8b86=[new window['Promise'](_0x5ecd96=>setTimeout(_0x5ecd96,0x93ecc)),_0x562ac9['then'](()=>new window['Promise'](_0x1abe92=>{let _0x120516=0x0;_0x5b124b['model']['on']('applyOperation',(_0x28233a,_0x3fe1a2)=>{_0x3fe1a2[0x0]['isDocumentOperation']&&_0x120516++,0x5e8==_0x120516&&(_0x1abe92(),_0x28233a['off']());});}))];return window['Promise']['race'](_0x1f8b86)['then'](()=>_0x82d542);}async function _0x4a01ef(){await _0x562ac9,_0x5b124b['model']['change']=_0x2fb082,_0x5b124b['model']['enqueueChange']=_0x2fb082,_0x5b124b['enableReadOnlyMode']('model');}function _0x55eb09(){return window['glob']&&window['glob']['triliumVersion'];}function _0x3fa676(){return _0x1b8c88('WebSocketGateway')&&'connected'==_0x85dc96('WebSocketGateway')['state'];}function _0x356b56(){return _0x1b8c88('RevisionViewerIntegration');}function _0x5e7497(){return _0x1b8c88('TrackChangesDataGetter');}function _0x9784ae(_0x2eade8){const _0x3cacf7=_0x334978();_0x5b124b[_0x3cacf7]='commentsLicenseKey'+_0x2eade8,'Valid'!=_0x2eade8&&_0x4a01ef();}function _0x334978(){const _0x53021b=window['String'](window['performance']['now']())['replace']('.','');let _0x557c76='m';for(let _0x543ccf=0x0;_0x543ccf<_0x53021b['length'];_0x543ccf+=0x2){let _0x2955f3=window['parseInt'](_0x53021b['substring'](_0x543ccf,_0x543ccf+0x2));_0x2955f3>=0x3e&&(_0x2955f3-=0x3e),_0x557c76+=_0x284e11[_0x2955f3];}return _0x557c76;}function _0x257f0d(){const _0xacd179=_0x12a4cc['split']('.');if(0x3!=_0xacd179['length'])return null;return _0x270fa0(_0xacd179[0x1]);function _0x270fa0(_0x200dbd){const _0x384c5e=_0x2795c9(_0x200dbd);return _0x384c5e&&_0x17ac1e()?_0x384c5e:null;function _0x17ac1e(){const _0x1153b5=_0x384c5e['jti'],_0x4a318c=window['parseInt'](_0x1153b5['substring'](_0x1153b5['length']-0x8),0x10),_0x1d458d={..._0x384c5e,'jti':_0x1153b5['substring'](0x0,_0x1153b5['length']-0x8)};return delete _0x1d458d['vc'],_0x1b49cf(_0x1d458d)==_0x4a318c;}}}async function _0x4cc277(){let _0x5497c8=!0x0;try{const [_0x906448,_0x5cb588,_0x3e8dd2]=_0x12a4cc['split']('.');return _0x15e46d(_0x906448),await _0x4c4093(_0x906448,_0x5cb588,_0x3e8dd2),_0x5497c8;}catch{return!0x1;}function _0x15e46d(_0x44947d){const _0x1c2f8c=_0x2795c9(_0x44947d);_0x1c2f8c&&'ES256'==_0x1c2f8c['alg']||(_0x5497c8=!0x1);}async function _0x4c4093(_0x587c1b,_0x5b7556,_0x1c6425){const _0x166858=window['Uint8Array']['from'](_0x5700ea(_0x1c6425),_0x2d4b7a=>_0x2d4b7a['charCodeAt'](0x0)),_0x4adc44=new window['TextEncoder']()['encode'](_0x587c1b+'.'+_0x5b7556),_0xf69d28=window['crypto']['subtle'];if(!_0xf69d28)return;const _0x122ac0=await _0xf69d28['importKey']('jwk',_0x23c16a,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0xf69d28['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x122ac0,_0x166858,_0x4adc44)||(_0x5497c8=!0x1);}}function _0x2795c9(_0x4d090f){return _0x4d090f['startsWith']('ey')?JSON['parse'](_0x5700ea(_0x4d090f)):null;}function _0x5700ea(_0x159673){return window['atob'](_0x159673['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x1b49cf(_0x44e92a){let _0xaad0a7=0x1505;function _0x30470f(_0x1e54fb){for(let _0x3854eb=0x0;_0x3854eb<_0x1e54fb['length'];_0x3854eb++){const _0x3dffff=_0x1e54fb['charCodeAt'](_0x3854eb);_0xaad0a7=(_0xaad0a7<<0x5)+_0xaad0a7+_0x3dffff,_0xaad0a7&=_0xaad0a7;}}function _0x40c139(_0x131921){Array['isArray'](_0x131921)?_0x131921['forEach'](_0x40c139):_0x131921&&'object'==typeof _0x131921?Object['entries'](_0x131921)['sort']()['forEach'](([_0x17ff77,_0x206ba9])=>{_0x30470f(_0x17ff77),_0x40c139(_0x206ba9);}):_0x30470f(window['String'](_0x131921));}return _0x40c139(_0x44e92a),_0xaad0a7>>>0x0;}function _0x4a6f8b(_0x53402e){return _0x53402e['toString'](0x10)['padStart'](0x8,'0');}function _0x4427a1(_0x18e350){return _0x18e350['split']('')['reverse']()['join']('');}function _0x1b8c88(_0x13a1e5){return _0x5b124b['plugins']['has'](_0x13a1e5);}function _0x85dc96(_0x308a90){return _0x5b124b['plugins']['get'](_0x308a90);}function _0x2fb082(){}_0x9784ae(await _0x5893ac());}_0x1e676d(_0x449b49['editor']);}(this);}destroy(){const _0x30ddb9=this['editor']['plugins']['get'](ue),_0x3692c1=this['editor']['config']['get']('collaboration.channelId');for(const _0x20e3e6 of _0x30ddb9['getCommentThreads']({'channelId':_0x3692c1}))_0x30ddb9['_detachCommentThread'](_0x20e3e6['id']),_0x30ddb9['_threads']['delete'](_0x20e3e6['id']);super['destroy']();}['hasMarkerForId'](_0x58cc3e){return this['getAllMarkersForId'](_0x58cc3e)['length']>0x0;}getAllMarkersForId(_0x547393){const _0x3fdf2c=[];for(const _0x2492cc of this['editor']['model']['markers'])_0x2492cc['name']['startsWith']('comment:'+_0x547393)&&_0x3fdf2c['push'](_0x2492cc);return _0x3fdf2c;}['scrollToThreadMarker'](_0x4bdaa1){setTimeout(()=>{const _0x28652a=this['_getTargetForId'](_0x4bdaa1);_0x28652a&&this['activeMarker']&&Ce(this['activeMarker'])['id']===_0x4bdaa1&&_0x18f994({'target':_0x28652a[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}_reconvertMarkers(_0x426428){this['editor']['model']['change'](()=>{for(const _0x57c351 of this['getAllMarkersForId'](_0x426428))this['editor']['editing']['reconvertMarker'](_0x57c351);});}_attachArchivedThread(_0x16ed6c){const _0x1f2790=this['editor']['plugins']['get'](ue),_0x548faf=this['editor']['plugins']['get'](_e),_0x5dde23=_0x1f2790['getCommentThread'](_0x16ed6c);if(!_0x5dde23['isAttached']){const _0x149549=_0x5dde23['attachTo'](()=>this['_getTargetForId'](_0x5dde23['id']));_0x548faf['registerAnnotation'](_0x149549),_0x5dde23['_hasTargetInContent']=!0x1;}}_initializeMarkerConverters(){const _0x560e88=this['editor'],_0x58b9c6=_0x560e88['plugins']['get'](_0x131f9d);_0x560e88['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x4f0393,_0x295e0b)=>{const {id:_0x38a70f}=Ce(_0x4f0393['markerName']),_0x240222=_0x560e88['plugins']['get'](ue)['getCommentThread'](_0x38a70f),_0x1e96c7=this['activeMarker']&&Ce(this['activeMarker'])['id']===_0x38a70f;let _0x534920;if(_0x240222&&_0x240222['isResolved']&&!_0x1e96c7&&_0x4f0393['item'])return _0x295e0b['consumable']['consume'](_0x4f0393['item'],'addMarker:'+_0x4f0393['markerName']),_0x295e0b['consumable']['consume'](_0x4f0393['item'],'removeMarker:'+_0x4f0393['markerName']),null;const _0x55a193=['ck-comment-marker'];return _0x1e96c7&&_0x55a193['push']('ck-comment-marker--active'),_0x534920=_0x240222?.['length']?_0x240222['comments']['first']['author']['id']:_0x58b9c6['me']['id'],{'classes':_0x55a193,'attributes':{'data-comment':_0x38a70f,'data-author-id':_0x534920}};}}),_0x560e88['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x164958,{options:_0x1ebb9f})=>{if(_0x1ebb9f['showCommentHighlights'])return null;const _0x13a71f=_0x560e88['plugins']['get'](ue),_0x2e3b5c=_0x560e88['model']['markers']['get'](_0x164958),{id:_0x423162,part:_0xf4fc87}=Ce(_0x164958);return _0x2e3b5c&&!_0x2e3b5c['affectsData']||_0x1ebb9f['ignoreResolvedComments']&&_0x13a71f['getCommentThread'](_0x423162)?.['isResolved']?null:{'group':'comment','name':_0xf4fc87?_0x423162+':'+_0xf4fc87:_0x423162};}}),_0x560e88['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x1bbd70,{writer:_0x517c6a})=>_0x517c6a['createElement']('$marker',{'data-name':'comment:'+_0x1bbd70['getAttribute']('id')})}),_0x560e88['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x5633b3=this['editor'],_0xb62b3c=_0x5633b3['plugins']['get'](ue),_0x548568=new Set(),_0x4e968a=new Set();_0x5633b3['model']['document']['registerPostFixer'](_0x4b5369=>{let _0x3de159=!0x1;for(const {name:_0x266799,data:_0x5d2165}of _0x5633b3['model']['document']['differ']['getChangedMarkers']()){const {group:_0x2031c0,id:_0x8ac555}=Ce(_0x266799);let _0x4b8032=_0x5d2165['newRange'];if('comment'!==_0x2031c0||!_0x4b8032)continue;const _0x3e68b0='$graveyard'===_0x4b8032['root']['rootName'];_0x3e68b0||(_0x4b8032=Ee(_0x4b8032,_0x5633b3['model']),!_0x4b8032||_0x4b8032['isCollapsed']||!_0x5d2165['newRange']||_0x4b8032['isEqual'](_0x5d2165['newRange']))?_0x5633b3['model']['hasContent'](_0x4b8032)&&!_0x3e68b0?this['isThreadsLoadingPaused']?_0x548568['add'](_0x266799):this['_handleThreadMarker'](_0x266799,_0x8ac555):(_0x4e968a['add'](_0x266799),_0x548568['delete'](_0x266799),_0x4b5369['removeMarker'](_0x266799),_0x3de159=!0x0):(_0x4b5369['updateMarker'](_0x266799,{'range':_0x4b8032}),_0x3de159=!0x0);}return _0x3de159;}),this['on']('change:isThreadsLoadingPaused',(_0x11fcf4,_0x355165,_0x485907)=>{if(!_0x485907&&_0x548568['size'])for(const _0x422017 of _0x548568){const {id:_0x62a98e}=Ce(_0x422017);_0x548568['delete'](_0x422017),_0x5633b3['model']['markers']['get'](_0x422017)&&this['_handleThreadMarker'](_0x422017,_0x62a98e);}}),this['listenTo'](_0x5633b3['model']['document'],'change',()=>{for(const {name:_0xc41c1,data:{newRange:_0x101f9d}}of _0x5633b3['model']['document']['differ']['getChangedMarkers']()){const {group:_0x336300,id:_0x480933}=Ce(_0xc41c1);if('comment'!==_0x336300)continue;const _0x54cc3c=_0xb62b3c['getCommentThread'](_0x480933),_0x31a1b4=this['hasMarkerForId'](_0x480933);_0x54cc3c&&(!_0x54cc3c['_hasTargetInContent']&&_0x101f9d&&_0x5633b3['editing']['view']['once']('render',()=>{const _0x4203e1=_0x5633b3['plugins']['get'](ae),_0x28f7ed=_0xb62b3c['_threadToController']['get'](_0x54cc3c)['view'];_0x4203e1['getByInnerView'](_0x28f7ed)['refreshVisibility']();},{'priority':'low'}),_0x54cc3c['_hasTargetInContent']=_0x31a1b4||!!_0x101f9d),_0x101f9d||(_0x4e968a['add'](_0xc41c1),_0x548568['delete'](_0xc41c1));}for(const _0x318ba9 of _0x4e968a){const {id:_0x2f95ee}=Ce(_0x318ba9),_0x4196bf=_0xb62b3c['getCommentThread'](_0x2f95ee);if(_0x548568['delete'](_0x318ba9),!_0x4196bf)continue;const _0x2abdbe=this['hasMarkerForId'](_0x2f95ee);_0x2abdbe||_0x4196bf['isSubmitted']?_0x2abdbe||_0x4196bf['unlinkedAt']||_0x4196bf['setUnlinkedAt'](new Date()):_0x4196bf['remove']();}_0x4e968a['clear']();});}_handleInitialThreads(_0x89469e){_0x89469e['forEach'](_0x150aa8=>{_0x150aa8['unlinkedAt']&&this['_attachArchivedThread'](_0x150aa8['id']);});}_getTargetForId(_0x24f678){const _0x45dd0d=this['editor'],_0x4e670a=this['getAllMarkersForId'](_0x24f678);return _0x108d59(_0x45dd0d['editing'],_0x4e670a);}_getTextContext(_0x515462){const _0x124cb6=this['getAllMarkersForId'](_0x515462);let _0x5250ec='',_0x1919eb=!0x1;for(const _0x4b1660 of _0x124cb6){const _0x45104d=_0x4b1660['getRange']();for(const _0x548e36 of Array['from'](_0x45104d['getItems']()))_0x548e36['is']('$textProxy')?(_0x5250ec&&_0x1919eb&&(_0x5250ec+='\x20',_0x1919eb=!0x1),_0x5250ec+=_0x548e36['data']):_0x1919eb=!0x0;_0x1919eb=!0x0;}return _0x5250ec['substring'](0x0,0x96);}_attachMarkerToThread(_0x539df3,_0x2446ad){const _0x787a62=this['editor'],_0x5687ce=_0x787a62['plugins']['get'](ue);let _0xdf716e=_0x5687ce['getCommentThread'](_0x2446ad);const _0x36447a=_0x787a62['config']['get']('collaboration.channelId'),_0x1b4d09=_0x787a62['plugins']['get'](_e);return _0xdf716e&&(_0xdf716e['unlinkedAt']&&_0xdf716e['setUnlinkedAt'](null),_0xdf716e['isAttached'])||(this['getAllMarkersForId'](_0x2446ad)[0x0]['managedUsingOperations']?_0x5687ce['fetchCommentThread']({'channelId':_0x36447a,'threadId':_0x2446ad})['then'](_0x52e07e=>{if('destroyed'!==_0x787a62['state']){if(_0xdf716e=_0x52e07e,_0xdf716e&&!_0xdf716e['isAttached']){const _0x57e773=_0xdf716e['attachTo'](()=>this['_getTargetForId'](_0x2446ad));_0x1b4d09['registerAnnotation'](_0x57e773),_0xdf716e['isResolved']&&this['_reconvertMarkers'](_0x2446ad);}else{if(!_0xdf716e){const _0x305063=this['getAllMarkersForId'](_0x2446ad);_0x787a62['model']['change'](_0x1edc1e=>{for(const _0x23e1eb of _0x305063)_0x1edc1e['removeMarker'](_0x23e1eb);});}}}}):_0x787a62['editing']['view']['once']('render',()=>{if(_0x5687ce['getCommentThread'](_0x2446ad))return;const _0x205af9=_0x787a62['plugins']['get'](ae);_0xdf716e=_0x5687ce['openNewCommentThread']({'channelId':_0x36447a,'threadId':_0x2446ad,'target':()=>this['_getTargetForId'](_0x2446ad),'context':{'type':'text','value':this['_getTextContext'](_0x2446ad)}});const _0x45930e=_0x5687ce['_threadToController']['get'](_0xdf716e)['view'],_0x56df8a=_0x205af9['getByInnerView'](_0x45930e);_0x56df8a&&_0x1b4d09['registerAnnotation'](_0x56df8a);},{'priority':'low'})),_0xdf716e;}['_handleThreadMarker'](_0x51a803,_0x5723a0){const _0x37fd38=this['_attachMarkerToThread'](_0x51a803,_0x5723a0);_0x37fd38&&!_0x37fd38['context']&&_0x37fd38['setContext']({'type':'text','value':this['_getTextContext'](_0x5723a0)});}_initAriaMarkerChangeAnnouncements(){const _0x1519fd=this['editor'];_0x1354df(_0x1519fd['model'],({left:_0x48f485,entered:_0x5a4db3})=>{for(const _0x14b73a of _0x48f485)if(ke(_0x14b73a)){_0x1519fd['ui']['ariaLiveAnnouncer']['announce'](St(_0x1519fd['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0xf3493b of _0x5a4db3)if(ke(_0xf3493b)){_0x1519fd['ui']['ariaLiveAnnouncer']['announce'](St(_0x1519fd['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x198bcf(_0x16c825)));break;}});}};function be(_0xf25ea4,_0x3445bc){return _0x3445bc?_0xf25ea4+':'+_0x3445bc:_0xf25ea4;}function Ee(_0x3be31e,_0x2b0ef5){const _0x57d87d=_0x2b0ef5['schema'],_0x1f1416=_0x2b0ef5['createRange'](_0x3be31e['start']);for(const _0x3aba7a of _0x3be31e['getWalker']()){const {type:_0x1b73b1,item:_0x359772,nextPosition:_0x165e40}=_0x3aba7a;if('text'===_0x1b73b1||_0x57d87d['isObject'](_0x359772)){const _0x11e085=_0x2b0ef5['createPositionBefore'](_0x359772);_0x1f1416['isCollapsed']&&(_0x1f1416['start']=_0x11e085),_0x1f1416['end']=_0x165e40;}}return _0x1f1416;}function ke(_0xdb4228){return'comment'===Ce(_0xdb4228['name'])['group'];}var Ne=class extends _0x3cd9f9{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[ue,Ie,_e,ae];}get CommentsListView(){return Wt;}get CommentThreadInputView(){return Ut;}init(){const _0x3afa25=this['editor'],_0x576580=_0x3afa25['plugins']['get'](ue),_0x2f7045=_0x3afa25['plugins']['get'](Ie),_0x3da52f=_0x3afa25['plugins']['get'](ae),_0x114443=_0x3afa25['plugins']['get'](_e);_0x3afa25['ui']['componentFactory']['add']('comment',()=>{const _0x192b76=this['_createUIButton'](et);return _0x192b76['tooltip']=!0x0,_0x192b76;}),_0x3afa25['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](lt)),_0x114443['addSourceCollector'](()=>{const _0x2a8cc7=[];for(const [_0x3d694a,_0x3b3dfa]of _0x576580['_threadToController']){const _0x4a56ca=_0x2f7045['getAllMarkersForId'](_0x3d694a['id']),_0x2c8b02=_0x4a56ca['map'](_0x34994e=>_0x34994e['getRange']());_0x4a56ca['length']>0x0&&_0x2a8cc7['push']([_0x3b3dfa['view'],_0x2c8b02]);}return _0x2a8cc7;}),this['listenTo'](_0x3da52f,'change:activeAnnotations',(_0x5d5309,_0x57116f,_0x12bf65)=>{const _0x247eb4=Array['from'](_0x12bf65)['map'](_0x107a03=>_0x107a03['innerView'])['find'](_0x13e373=>_0x576580['_viewToController']['has'](_0x13e373));if(!_0x247eb4)return void(_0x2f7045['activeMarker']=null);const _0x1f04eb=_0x576580['_viewToController']['get'](_0x247eb4)['model']['id'],_0x2d33a5='comment:'+_0x1f04eb;_0x1f04eb&&_0x2f7045['hasMarkerForId'](_0x1f04eb)?_0x2f7045['activeMarker']=_0x2d33a5:_0x2f7045['activeMarker']&&(_0x2f7045['activeMarker']=null);}),this['listenTo'](_0x576580,'removeCommentThread',(_0x4c1aaa,{threadId:_0xd64184,isFromAdapter:_0x16c070})=>{!_0x16c070&&_0x3afa25['ui']['focusTracker']['isFocused']&&_0x2f7045['hasMarkerForId'](_0xd64184)&&_0x3afa25['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x576580,'addComment',(_0x1064c9,{threadId:_0x134446,isFromAdapter:_0x232688})=>{!_0x232688&&_0x2f7045['hasMarkerForId'](_0x134446)&&_0x576580['hasCommentThread'](_0x134446)&&0x1===_0x576580['getCommentThread'](_0x134446)['length']&&(_0x3afa25['editing']['view']['focus'](),_0x1064c9['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x5e6ce0=[this['editor']];for(const _0x4d713a of _0x5e6ce0){let _0xef67ac;for(const _0x4695d3 in _0x4d713a){const _0x7e2ba6=_0x4695d3,_0x12f7d0=_0x4d713a[_0x7e2ba6];if('commentsLicenseKeyValid'==_0x12f7d0||'commentsLicenseKeyInvalid'==_0x12f7d0||'commentsLicenseKeyExpired'==_0x12f7d0||'commentsLicenseKeyDomainLimit'==_0x12f7d0||'commentsLicenseKeyNotAllowed'==_0x12f7d0||'commentsLicenseKeyEvaluationLimit'==_0x12f7d0||'commentsLicenseKeyUsageLimit'==_0x12f7d0){delete _0x4d713a[_0x7e2ba6],_0xef67ac=_0x12f7d0,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0xef67ac&&_0x4d713a['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0xef67ac&&_0x4d713a['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0xef67ac&&_0x4d713a['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0xef67ac&&_0x4d713a['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0xef67ac&&_0x4d713a['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0xef67ac&&_0x4d713a['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_createUIButton(_0x484d72){const _0x2b52d8=this['editor'],_0x486f5a=new _0x484d72(_0x2b52d8['locale']),_0x1b5847=_0x2b52d8['commands']['get']('addCommentThread');return _0x486f5a['set']({'label':St(_0x2b52d8['locale'],'Comment'),'icon':_0x5c9bee}),_0x486f5a['bind']('isEnabled')['to'](_0x1b5847,'isEnabled',_0x1b5847,'hasContent',(_0x3bfc41,_0x3c3da1)=>_0x3bfc41&&_0x3c3da1),this['listenTo'](_0x486f5a,'execute',()=>{_0x1b5847['execute']();}),_0x486f5a;}},Oe=class extends _0x3cd9f9{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Ie];}constructor(_0x47a176){super(_0x47a176),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x54a1f3,_0x5aa09b,_0x5c5977)=>{_0x5c5977?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}afterInit(){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}_enableCommentsOnlyMode(){for(const [_0xfb08a3,_0x27b565]of this['editor']['commands'])_0x27b565['affectsData']&&'addCommentThread'!==_0xfb08a3&&_0x27b565['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x2c63fe=this['editor']['editing']['view']['document'];this['listenTo'](_0x2c63fe,'cut',_0x23528f=>_0x23528f['stop'](),{'priority':'highest'}),this['listenTo'](_0x2c63fe,'clipboardInput',_0x1bb9f0=>_0x1bb9f0['stop'](),{'priority':'highest'}),this['listenTo'](_0x2c63fe,'delete',_0x3dda44=>_0x3dda44['stop'](),{'priority':'highest'});}_disableCommentsOnlyMode(){for(const [_0x3be27f,_0x47ece2]of this['editor']['commands'])_0x47ece2['affectsData']&&'addCommentThread'!==_0x3be27f&&_0x47ece2['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['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']);}},Me=class extends _0x49d18b{activeUIs;uisData;['_uis'];static get requires(){return[ae];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x350d06){super(_0x350d06),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}init(){const _0x54a0b0=this['context']['plugins']['get'](ae);this['listenTo'](_0x54a0b0,'_activateAnnotation',(_0xd434dc,_0x74fdb5)=>{for(const _0x4ea14c of this['activeUIs']){const _0x4da3a0=this['_uis']['get'](_0x4ea14c);(0x0,this['uisData']['get'](_0x4ea14c)['filter'])(_0x74fdb5)&&_0x4da3a0['setActiveAnnotation'](_0x74fdb5);}}),this['listenTo'](_0x54a0b0,'_deactivateAllAnnotations',()=>{for(const _0x4901c0 of this['activeUIs'])this['_uis']['get'](_0x4901c0)['setActiveAnnotation'](null);}),this['listenTo'](_0x54a0b0['_visibleAnnotations'],'add',(_0x47fff5,_0x81ca36)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x81ca36);});}hasActive(){return this['activeUIs']['size']>0x0;}isActive(_0x1198bd){return this['activeUIs']['has'](_0x1198bd);}activate(_0x47db54,_0x299c24=this['defaultFilter']){const _0x5a3a80=this['context']['plugins']['get'](ae);if(!this['_uis']['has'](_0x47db54))throw new _0x3e0d28('annotationsuis-missing-ui',this,{'uiName':_0x47db54});this['isActive'](_0x47db54)&&this['deactivate'](_0x47db54),this['activeUIs']['add'](_0x47db54);const _0xe15f6f=new oe();re({'source':_0x5a3a80['_visibleAnnotations'],'target':_0xe15f6f,'filter':_0x299c24}),this['uisData']['set'](_0x47db54,{'collection':_0xe15f6f,'filter':_0x299c24});const _0xe25170=this['_uis']['get'](_0x47db54);_0xe25170['attach'](_0xe15f6f),this['listenTo'](_0xe25170,'change:activeAnnotation',(_0x16a805,_0x551272,_0x2dc67a,_0x254de0)=>{_0x254de0&&_0x5a3a80['_removeActiveAnnotation'](_0x254de0),_0x2dc67a&&_0x5a3a80['_addActiveAnnotation'](_0x2dc67a);});}deactivate(_0x43dd35){if(this['activeUIs']['delete'](_0x43dd35),!this['_uis']['has'](_0x43dd35))throw new _0x3e0d28('annotationsuis-missing-ui',this,{'uiName':_0x43dd35});const _0x23494e=this['_uis']['get'](_0x43dd35);_0x23494e['detach'](),this['stopListening'](_0x23494e),this['uisData']['get'](_0x43dd35)['collection']['destroy'](),this['uisData']['delete'](_0x43dd35);}switchTo(_0x35ce62){if(!this['_uis']['has'](_0x35ce62))throw new _0x3e0d28('annotationsuis-missing-ui',this,{'uiName':_0x35ce62});const _0x3aa60d=this['context']['plugins']['get'](ae),_0x2dd4f1=Array['from'](_0x3aa60d['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x35ce62);const _0x461845=this['_uis']['get'](_0x35ce62);_0x461845['setActiveAnnotation'](_0x2dd4f1),_0x461845['_setSelectedAnnotations']&&_0x2dd4f1&&_0x461845['_setSelectedAnnotations']([_0x2dd4f1]);}deactivateAll(){for(const _0x3ff8f5 of this['activeUIs'])this['deactivate'](_0x3ff8f5);}register(_0x2630e3,_0x168450){if(this['_uis']['has'](_0x2630e3))throw new _0x3e0d28('annotationsuis-register-already-registered');if('function'!=typeof _0x168450['attach']||'function'!=typeof _0x168450['detach']||'function'!=typeof _0x168450['setActiveAnnotation'])throw new _0x3e0d28('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x2630e3,_0x168450);}refilterAnnotations(){const _0x208ff7=this['context']['plugins']['get'](ae)['collection'],_0xf2526f=new Map(),_0x309b8e=Array['from'](this['activeUIs']);for(const _0x2bd778 of this['activeUIs']){const _0x3cc190=this['uisData']['get'](_0x2bd778)['collection'];for(const _0x282847 of _0x3cc190)_0xf2526f['set'](_0x282847,_0x2bd778);}for(const _0x26a5a7 of _0x208ff7){const _0x1fc72d=_0xf2526f['get'](_0x26a5a7);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x26a5a7);const _0x3c2d14=_0x309b8e['find'](_0x144ba8=>this['uisData']['get'](_0x144ba8)['filter'](_0x26a5a7));_0x1fc72d!==_0x3c2d14&&(_0x1fc72d&&this['uisData']['get'](_0x1fc72d)['collection']['remove'](_0x26a5a7),_0x3c2d14&&this['uisData']['get'](_0x3c2d14)['collection']['add'](_0x26a5a7));}}destroy(){this['deactivateAll'](),super['destroy']();}defaultFilter(){return!0x0;}_assertAnnotationDoesNotBelongToMultipleUIs(_0x5225bd){const _0x7d661d=[];for(const _0x23260f of this['activeUIs']){(0x0,this['uisData']['get'](_0x23260f)['filter'])(_0x5225bd)&&_0x7d661d['push'](_0x23260f);}if(_0x7d661d['length']>0x1)throw new _0x3e0d28('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x7d661d,'annotationType':_0x5225bd['type']});}};const Re=/* #__PURE__ -- @preserve */
32
+ _0x603364('px');var xe=class extends ut{list;['focusables'];['focusTracker'];['focusCycler'];constructor(_0x3268f6){super(_0x3268f6);const _0x53bdce=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 _0x38a73f(),this['focusCycler']=new ht({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x53bdce['to']('class')],'style':{'minHeight':_0x53bdce['to']('minHeight',_0x4b6e19=>'number'==typeof _0x4b6e19?Re(_0x4b6e19+0xa):null)},'dir':_0x3268f6['uiLanguageDirection'],'role':'application','aria-label':St(_0x3268f6,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':St(_0x3268f6,'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',_0xafe081=>{this['_updateItemPositionInFocusables'](_0xafe081['source']);}),this['list']['forEach'](_0xfed9d0=>{this['focusTracker']['add'](_0xfed9d0['element']),this['_updateItemPositionInFocusables'](_0xfed9d0);}),this['list']['on']('change',(_0x24ea94,_0x3cc9f2)=>{for(const _0x6a216 of _0x3cc9f2['removed'])this['focusTracker']['remove'](_0x6a216['element']),this['focusables']['remove'](_0x6a216);for(const _0x15133a of _0x3cc9f2['added'])this['focusTracker']['add'](_0x15133a['element']),this['_updateItemPositionInFocusables'](_0x15133a);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}_updateItemPositionInFocusables(_0x14e8ee){const _0x322128=this['focusables']['getIndex'](_0x14e8ee);let _0x204141,_0x550192;for(const _0x389c7e of this['focusables'])if(_0x14e8ee['top']<_0x389c7e['top']){_0x204141=_0x389c7e;break;}if(_0x550192=_0x204141?this['focusables']['getIndex'](_0x204141):this['focusables']['length'],-0x1!==_0x322128){if(_0x322128===_0x550192-0x1)return;this['focusables']['remove'](_0x14e8ee),_0x550192=_0x204141?this['focusables']['getIndex'](_0x204141):this['focusables']['length'];}this['focusables']['add'](_0x14e8ee,_0x550192);}};const Se=/* #__PURE__ -- @preserve */
33
+ _0x603364('px');var Pe=class extends ut{content;_targetTop;_mutationObserver;constructor(_0x2808cf){super(_0x2808cf),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0xd80414,_0x4ecfba)=>_0xd80414+_0x4ecfba),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=te(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x5694eb=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x5694eb['to']('isAnimationDisabled',_0x4ff5ac=>_0x4ff5ac?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x5694eb['to']('top',_0xd0d17d=>Se(_0xd0d17d))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}updateHeight(){const _0x45196f=this['element']['clientHeight'];_0x45196f&&(this['height']=_0x45196f);}destroy(){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},Le=class extends _0x49d18b{['view'];_activeAnnotation;_annotations;_spaceBetweenItems;_sidebarItemViewToAnnotation;_annotationToSidebarItemView;_recalculateBuffer;static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3c737c){super(_0x3c737c),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 _0x4b58b7=this['context']['config']['get']('sidebar.container');_0x4b58b7&&this['setContainer'](_0x4b58b7);}setContainer(_0x4e517e){if(!Ve(_0x4e517e))throw new _0x3e0d28('sidebar-setcontainer-invalid-element');this['container']=_0x4e517e;}_attachToContainer({viewClass:_0x3aa96f='',spaceBetweenItems:_0x3fcdab=0x19}={}){if(!Ve(this['container']))throw new _0x3e0d28('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x3aa96f,this['_spaceBetweenItems']=_0x3fcdab;}['rearrange']({removedAnnotation:_0x3e80d9,previousAnnotation:_0x23323c,nextAnnotation:_0x1b336d}){const _0x10f44d=this['getSidebarItemView'](_0x3e80d9);this['view']['list']['remove'](_0x10f44d),this['_destroySidebarItemView'](_0x3e80d9),_0x23323c&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x23323c)),_0x1b336d&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x1b336d)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0xb87d39,activatedAnnotation:_0x2c64a6,disableAnimationOnActivatedAnnotation:_0x156606}){if(this['_activeAnnotation']=_0x2c64a6,_0xb87d39){_0xb87d39['isActive']=!0x1;const _0x1271a7=this['getSidebarItemView'](_0xb87d39);_0x1271a7&&_0x156606&&(_0x1271a7['isAnimationDisabled']=!0x1);}if(_0x2c64a6){const _0x3a3867=this['getSidebarItemView'](_0x2c64a6);_0x3a3867&&(_0x2c64a6['isActive']=!0x0,_0x156606&&(_0x3a3867['isAnimationDisabled']=!0x0,_0x3a3867['top']+=0x1),this['_alignToTargetRect'](_0x3a3867));}}_detachFromContainer(_0x3796a1){if(this['view']['element']['remove'](),_0x3796a1){for(const _0x4ff113 of _0x3796a1)this['_destroySidebarItemView'](_0x4ff113);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}addAnnotation(_0x2c1520,_0x90f17b){_0x90f17b||(_0x90f17b=_0x2c1520['view']);const _0x50a989=new Pe(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x50a989,_0x2c1520),this['_annotationToSidebarItemView']['set'](_0x2c1520,_0x50a989),_0x50a989['content']['add'](_0x90f17b),this['listenTo'](_0x2c1520['view'],'change:targetRect',(_0x48e4bc,_0x244462,_0x1b41ad)=>{const _0x2f71f8=this['_getTargetTop'](_0x2c1520,_0x1b41ad);_0x50a989['_targetTop']!=_0x2f71f8&&(_0x50a989['_targetTop']=_0x2f71f8,this['_setItemTop'](_0x50a989,_0x2f71f8));}),this['listenTo'](_0x50a989,'change:top',()=>{this['_recalculate'](_0x50a989,'top');}),this['listenTo'](_0x50a989,'change:bottom',()=>{this['_recalculate'](_0x50a989,'bottom');}),this['_alignToTargetRect'](_0x50a989);const _0x20f01e=this['_getItemBefore'](_0x50a989);return _0x20f01e&&this['_alignAfterItem'](_0x20f01e,_0x50a989)||this['_alignToTargetRect'](_0x50a989),this['_updateLastItem'](),this['view']['list']['add'](_0x50a989),_0x50a989;}['_alignForTopChange'](_0x281e92){if(!_0x281e92['content']['length'])return;const _0x2e71f4=this['_getItemBefore'](_0x281e92);if(!_0x2e71f4)return;const _0x2873d6=this['_sidebarItemViewToAnnotation']['get'](_0x2e71f4),_0x2a85e9=this['_activeAnnotation'];_0x2a85e9&&_0x2a85e9===_0x2873d6?this['_alignAfterItem'](_0x2e71f4,_0x281e92):this['_alignBeforeItem'](_0x281e92,_0x2e71f4);}_alignForBottomChange(_0x19b8c9){if(!_0x19b8c9['content']['length'])return;const _0x44661e=this['_getItemAfter'](_0x19b8c9);if(!_0x44661e)return;const _0x3a941b=this['_sidebarItemViewToAnnotation']['get'](_0x44661e),_0x119409=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x2f36ac=this['_activeAnnotation'];_0x2f36ac&&_0x2f36ac===_0x3a941b&&_0x119409?(this['_alignBeforeItem'](_0x44661e,_0x19b8c9),this['_alignAfterItem'](_0x19b8c9,_0x44661e)):_0x2f36ac&&_0x2f36ac===_0x3a941b?this['_alignBeforeItem'](_0x44661e,_0x19b8c9):this['_alignAfterItem'](_0x19b8c9,_0x44661e);}_recalculate(_0x153e3c,_0x3498e7){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x5ce4ab,changedProp:_0x558903}of this['_recalculateBuffer'])'top'===_0x558903?this['_alignForTopChange'](_0x5ce4ab):this['_alignForBottomChange'](_0x5ce4ab);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x153e3c,'changedProp':_0x3498e7});}getSidebarItemView(_0x536c89){return this['_annotationToSidebarItemView']['get'](_0x536c89);}destroy(){this['stopListening'](),this['view']['destroy']();}_destroySidebarItemView(_0x65b027){const _0x57cb12=this['getSidebarItemView'](_0x65b027);this['stopListening'](_0x57cb12),this['stopListening'](_0x65b027['view']),_0x57cb12['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x65b027),this['_sidebarItemViewToAnnotation']['delete'](_0x57cb12);}_createSidebarView(){const _0x5d065b=new xe(this['context']['locale']);return _0x5d065b['render'](),this['on']('change:_lastItem',(_0x58d774,_0x1e049f,_0x1d4421,_0x304a37)=>{_0x304a37&&_0x5d065b['unbind']('minHeight'),_0x1d4421?_0x5d065b['bind']('minHeight')['to'](_0x1d4421,'bottom'):_0x5d065b['minHeight']=null;}),_0x5d065b;}_updateLastItem(){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}_getItemBefore(_0x5c0638){const _0x49422e=this['_sidebarItemViewToAnnotation']['get'](_0x5c0638),_0x344fe8=_0x49422e&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x49422e)-0x1);return _0x344fe8&&this['getSidebarItemView'](_0x344fe8)||null;}_getItemAfter(_0x2a9aa8){const _0x14fef6=this['_sidebarItemViewToAnnotation']['get'](_0x2a9aa8),_0x944d5=_0x14fef6&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x14fef6)+0x1);return _0x944d5&&this['getSidebarItemView'](_0x944d5)||null;}_alignBeforeItem(_0x1571e7,_0x4a0be7){_0x1571e7['updateHeight']();const _0x55da65=De(_0x4a0be7['bottom']+this['_spaceBetweenItems'],_0x1571e7['top']);return!!_0x55da65&&(this['_setItemTop'](_0x4a0be7,_0x4a0be7['top']-_0x55da65),!0x0);}_alignAfterItem(_0x544425,_0x4fa620){_0x544425['updateHeight']();const _0x26e9f8=De(_0x544425['bottom']+this['_spaceBetweenItems'],_0x4fa620['top']);return!!_0x26e9f8&&(this['_setItemTop'](_0x4fa620,_0x4fa620['top']+_0x26e9f8,!0x1),!0x0);}_alignToTargetRect(_0x5c6ebc){const _0x42f74a=this['_sidebarItemViewToAnnotation']['get'](_0x5c6ebc);if(!_0x42f74a||!_0x42f74a['target']||!_0x42f74a['targetRect'])return;const _0x3befb3=this['_getTargetTop'](_0x42f74a,_0x42f74a['targetRect']);this['_setItemTop'](_0x5c6ebc,_0x3befb3);}_getTargetTop(_0x2d2490,_0x2b0700){if(null===_0x2b0700)return 0x0;if(_0x2d2490['target']instanceof _0x416a59)return _0x2b0700['top'];{const _0x5569bc=new _0x416a59(this['view']['element'])['top'];return _0x2b0700['top']-_0x5569bc;}}_setItemTop(_0x5e802f,_0x1fb153,_0x114a5c=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x114a5c&&(_0x1fb153=Math['max'](_0x1fb153,this['_getMaxAvailableTop'](_0x5e802f))),_0x5e802f['top']=_0x1fb153;}_getMaxAvailableTop(_0x51828a){let _0xc855f4=this['_getItemBefore'](_0x51828a),_0x15fe6b=0x0;for(;_0xc855f4;)_0xc855f4['updateHeight'](),_0x15fe6b+=this['_spaceBetweenItems']+_0xc855f4['height'],_0xc855f4=this['_getItemBefore'](_0xc855f4);return _0x15fe6b;}};function De(_0x495932,_0x5cf20f){return Math['max'](_0x495932-_0x5cf20f,0x0);}function Ve(_0x19bbea){return null!==_0x19bbea&&'object'==typeof _0x19bbea&&0x1===_0x19bbea['nodeType'];}var Be=class extends _0x49d18b{isAttached;annotations;_editorAnnotations;_refreshPositioningDebounced;static get requires(){return[Le,Me];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xede6c6){super(_0xede6c6),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x49bb96(),this['_refreshPositioningDebounced']=_0x31a136(()=>{_0xede6c6['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}init(){const _0x2f55f2=this['context']['plugins']['get'](Me),_0x196d43=this['context']['plugins']['get'](Le);_0x2f55f2['register']('wideSidebar',this),_0x196d43['container']&&_0x2f55f2['switchTo']('wideSidebar');}setActiveAnnotation(_0x420e19){if(_0x420e19===this['activeAnnotation'])return;const _0x22e358=this['context']['plugins']['get'](Le);_0x22e358['_activeAnnotation']=_0x420e19;const _0x584fe6=this['activeAnnotation'];_0x22e358['refresh']({'blurredAnnotation':_0x584fe6,'activatedAnnotation':_0x420e19}),this['activeAnnotation']=_0x420e19;}attach(_0x483a8b){this['annotations']=_0x483a8b;const _0x34af47=this['context']['plugins']['get'](Le);if(_0x34af47['_annotations']=_0x483a8b,this['isAttached'])throw new _0x3e0d28('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x34af47,'set:container',()=>{this['detach'](),this['listenTo'](_0x34af47,'change:container',_0x3ed005=>{_0x3ed005['off'](),this['attach'](_0x483a8b);});}),_0x34af47['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x3e2a67=_0x1af655=>{_0x1af655['updateTargetRect'](),_0x34af47['addAnnotation'](_0x1af655);};for(const _0x4a0c9d of _0x483a8b)_0x3e2a67(_0x4a0c9d);this['listenTo'](_0x483a8b,'add',(_0x1fe865,_0x197681)=>{_0x3e2a67(_0x197681);}),this['listenTo'](_0x483a8b,'remove',(_0x58a6f7,_0x59cb63,_0x2db360)=>{_0x34af47['rearrange']({'removedAnnotation':_0x59cb63,'previousAnnotation':_0x483a8b['get'](_0x2db360-0x1),'nextAnnotation':_0x483a8b['get'](_0x2db360+0x1)}),_0x59cb63===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x483a8b,'focus',(_0x5e3136,_0x35693a)=>{this['setActiveAnnotation'](_0x35693a);}),this['listenTo'](_0x483a8b,'blur',()=>{this['setActiveAnnotation'](null);});const _0x139c8e=this['context']instanceof _0x274b82?this['context']['editors']:new _0x49bb96([this['context']]);for(const _0x4822b1 of _0x139c8e)this['_integrateWithEditorAnnotations'](_0x4822b1);this['listenTo'](_0x139c8e,'add',(_0x1de4fa,_0x4bf5db)=>{this['listenTo'](_0x4bf5db,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x4bf5db);});}),this['listenTo'](_0x139c8e,'remove',(_0x4871e1,_0x41a7a6)=>{_0x41a7a6['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x41a7a6['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}detach(){if(!this['isAttached'])throw new _0x3e0d28('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x6e2bc9=this['context']['plugins']['get'](Le);_0x6e2bc9['_detachFromContainer'](this['annotations']),this['stopListening'](_0x6e2bc9),this['stopListening'](this['annotations']),this['context']instanceof _0x274b82&&this['stopListening'](this['context']['editors']);for(const _0xaf0034 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0xaf0034);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach']();}_integrateWithEditorAnnotations(_0x5b897d){if(!_0x5b897d['plugins']['has']('EditorAnnotations'))return;const _0x46943a=_0x5b897d['plugins']['get']('EditorAnnotations'),_0x58c5fa=()=>{const _0x1ca5fd=_0x46943a['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x1ca5fd[0x0]||null);};this['listenTo'](_0x46943a,'refresh',_0x58c5fa),this['listenTo'](_0x46943a,'blur',(_0x5945c6,{isAnnotationTracked:_0x5ab276})=>{this['activeAnnotation']&&_0x5ab276(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x46943a,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x36d711=>{_0x46943a['hasDomSelection']()&&(_0x58c5fa(),_0x36d711['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x46943a);}_destroyEditorAnnotationsIntegration(_0x541cac){this['stopListening'](_0x541cac),this['_editorAnnotations']['remove'](_0x541cac);}},He=class extends et{counterView;constructor(_0x1ca008){super(_0x1ca008);const _0x17d42c=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x275176,_0x7f7a9d)=>_0x275176?'…':_0x7f7a9d['toString']()),this['set']('annotationType',''),this['bind']('icon')['to'](this,'annotationType',_0x356fe7=>'comment'===_0x356fe7?_0x13f9dc:_0x50b486),this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new ut(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x17d42c['to']('annotationType',_0xbfaeba=>'ck-annotation-counter__badge--'+_0xbfaeba),_0x17d42c['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x17d42c['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Ue=class extends _0x49d18b{isAttached;annotations;_manuallyClosedAnnotationViews;_domEmitter;_annotationToNarrowView;_selectedAnnotations;_editorAnnotations;_refreshPositioningDebounced;static get requires(){return[Le,Me];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2529aa){super(_0x2529aa),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x1d5bf9())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x49bb96(),this['_refreshPositioningDebounced']=_0x31a136(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}init(){this['context']['plugins']['get'](Me)['register']('narrowSidebar',this),this['_overlayHost']=new mt(this['context']['locale'],{'resolveMountTarget':()=>this['_resolveOverlayTarget'](),'resolveInlineContainer':()=>this['context']['plugins']['get'](Le)['container']}),this['_overlayHost']['sync'](),this['bodyCollection']=this['_overlayHost']['bodyCollection'],this['balloonPanelView']=new tt(this['context']['locale']),this['bodyCollection']['add'](this['balloonPanelView']);}attach(_0x324043){this['annotations']=_0x324043;const _0x31ccbd=this['context']['plugins']['get'](Le),_0x44d208=this['balloonPanelView'];if(_0x31ccbd['_annotations']=_0x324043,this['isAttached'])throw new _0x3e0d28('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x31ccbd,'set:container',()=>{this['detach'](),this['listenTo'](_0x31ccbd,'change:container',_0x167917=>{_0x167917['off'](),this['attach'](_0x324043);});}),_0x31ccbd['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5}),this['_overlayHost']['sync']();const _0xea109a=_0x2e2af4=>{const _0x25cd72=new He(this['context']['locale']);_0x31ccbd['addAnnotation'](_0x2e2af4,_0x25cd72),this['_annotationToNarrowView']['set'](_0x2e2af4,_0x25cd72),_0x25cd72['bind']('isDirty','annotationType','number')['to'](_0x2e2af4['view'],'isDirty','type','length'),_0x25cd72['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x44d208['content']['first']!==_0x2e2af4['view']?(this['_showBalloon'](_0x2e2af4),_0x2e2af4['view']['element']['focus'](),this['setActiveAnnotation'](_0x2e2af4)):this['setActiveAnnotation'](null);});};for(const _0x3023a2 of _0x324043)_0xea109a(_0x3023a2);this['listenTo'](_0x324043,'add',(_0x2b661d,_0x46523b)=>{_0xea109a(_0x46523b);}),this['listenTo'](_0x324043,'remove',(_0xa8cb7a,_0x5dcbd2,_0x2476c1)=>{this['_annotationToNarrowView']['get'](_0x5dcbd2)['destroy'](),this['_annotationToNarrowView']['delete'](_0x5dcbd2),_0x31ccbd['rearrange']({'removedAnnotation':_0x5dcbd2,'previousAnnotation':_0x324043['get'](_0x2476c1-0x1),'nextAnnotation':_0x324043['get'](_0x2476c1+0x1)}),_0x5dcbd2===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x324043,'focus',(_0x41cf57,_0x33bc92)=>{this['setActiveAnnotation'](_0x33bc92);}),this['listenTo'](_0x324043,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x40cf7a,_0x14ed9b)=>{_0x14ed9b['keyCode']===_0x2a3630['esc']&&_0x44d208['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x44d208['content']['first']),this['_hideBalloon'](),_0x14ed9b['stopPropagation'](),_0x14ed9b['preventDefault']());}),pt({'emitter':this['_domEmitter'],'activator':()=>_0x44d208['isVisible']&&!this['_hasEditorDomSelection'](),'contextElements':()=>{const _0x1050c2=[_0x31ccbd['view']['element']];return _0x44d208['isVisible']&&_0x1050c2['push'](_0x44d208['element']),this['activeAnnotation']&&_0x1050c2['push'](...this['activeAnnotation']['focusableElements']),_0x1050c2;},'callback':()=>{this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null);}});const _0x161199=this['context']instanceof _0x274b82?this['context']['editors']:new _0x49bb96([this['context']]);for(const _0xb26da8 of _0x161199)this['_integrateWithEditorAnnotations'](_0xb26da8);this['listenTo'](_0x161199,'add',(_0x365918,_0x4ca446)=>{this['listenTo'](_0x4ca446,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x4ca446);});}),this['listenTo'](_0x161199,'remove',(_0x4d1029,_0x4aaf1e)=>{_0x4aaf1e['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4aaf1e['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}setActiveAnnotation(_0x217c29){if(_0x217c29===this['activeAnnotation'])return;const _0x5c4780=this['context']['plugins']['get'](Le);_0x5c4780['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x217c29,'disableAnimationOnActivatedAnnotation':!0x0}),_0x217c29&&_0x5c4780['getSidebarItemView'](_0x217c29)?this['_showBalloon'](_0x217c29):this['_hideBalloon'](),this['activeAnnotation']=_0x217c29;}detach(){if(!this['isAttached'])throw new _0x3e0d28('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3a4a9a=this['context']['plugins']['get'](Le);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x443fa3=>_0x443fa3['destroy']()),this['_annotationToNarrowView']['clear'](),_0x3a4a9a['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x274b82&&this['stopListening'](this['context']['editors']);for(const _0x52c60b of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x52c60b);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['_selectedAnnotations']=[],this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach'](),this['_overlayHost']['destroy']();}_integrateWithEditorAnnotations(_0x28f22a){if(!_0x28f22a['plugins']['has']('EditorAnnotations'))return;const _0x206d2d=_0x28f22a['plugins']['get']('EditorAnnotations'),_0x33a639=this['context']['plugins']['get'](Le),_0x298a13=this['annotations'],_0x4d8d3e=this['balloonPanelView'],_0x156382=()=>{const _0x5c7534=_0x206d2d['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x5c7534),this['setActiveAnnotation'](_0x5c7534[0x0]||null);};this['listenTo'](_0x206d2d,'refresh',_0x156382),this['listenTo'](_0x206d2d,'blur',(_0x5d01ea,{isAnnotationTracked:_0x3da7a8})=>{this['activeAnnotation']&&_0x3da7a8(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x206d2d,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x298a13,'blur',_0x34a376=>{_0x206d2d['hasDomSelection']()&&_0x34a376['stop']();},{'priority':'high'}),pt({'emitter':this['_domEmitter'],'activator':()=>!!this['activeAnnotation'],'contextElements':()=>{const _0x2a5be4=[_0x33a639['view']['element']];return _0x4d8d3e['isVisible']&&_0x2a5be4['push'](_0x4d8d3e['element']),_0x2a5be4;},'callback':()=>{_0x206d2d['hasDomSelection']()&&_0x156382();}}),this['_editorAnnotations']['add'](_0x206d2d),this['_overlayHost']['sync']();}_destroyEditorAnnotationsIntegration(_0x5c25a4){_0x5c25a4&&(this['stopListening'](_0x5c25a4),this['_editorAnnotations']['remove'](_0x5c25a4));}_hasEditorDomSelection(){return Array['from'](this['_editorAnnotations'])['some'](_0x565758=>_0x565758['hasDomSelection']());}_setSelectedAnnotations(_0x2c63af){for(const _0x45decc of this['_selectedAnnotations'])_0x2c63af['includes'](_0x45decc)||this['_manuallyClosedAnnotationViews']['delete'](_0x45decc['view']);this['_selectedAnnotations']=_0x2c63af;}_refreshPositioning(){const _0x5ec041=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x5ec041['isVisible']&&this['_updateBalloonPosition']();}_resolveOverlayTarget(){const _0x2c9239=this['context']['config']['get']('sidebar.overlayContainer')||this['context']['config']['get']('ui.overlayContainer');if(_0x2c9239)return _0x2c9239;const _0x5c3345=this['context']['plugins']['get'](Le)['container'];return _0x5c3345?_0x3dfb64(_0x5c3345):null;}['_showBalloon'](_0x162631){if(this['_manuallyClosedAnnotationViews']['has'](_0x162631['view']))return;const _0x3d4494=this['balloonPanelView']['content']['first'];_0x3d4494!==_0x162631['view']?(_0x3d4494&&this['_detachListeners'](_0x3d4494),this['_overlayHost']['sync'](),this['_attachListeners'](_0x162631['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x162631['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}_updateBalloonPosition(){const _0x502ff0=this['balloonPanelView']['content']['first'],_0x49b47e=_0x502ff0&&this['annotations']['getByView'](_0x502ff0);if(!_0x49b47e||!this['_annotationToNarrowView']['has'](_0x49b47e))return;const _0x1898d4=this['_annotationToNarrowView']['get'](_0x49b47e)['element'],_0x44c08d=(function(){const _0x5e398a=tt['defaultPositions'];return[_0x5e398a['southArrowNorthEast'],_0x5e398a['northArrowSouthEast'],_0x5e398a['southArrowNorth'],_0x5e398a['northArrowSouth'],_0x5e398a['southArrowNorthWest'],_0x5e398a['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x1898d4,'positions':_0x44c08d});}['_hideBalloon'](){const _0x1de13f=this['balloonPanelView'],_0x4bea33=_0x1de13f['content']['first'];_0x4bea33&&(this['_detachListeners'](_0x4bea33),_0x1de13f['unpin'](),_0x1de13f['content']['clear']());}_attachListeners(_0xce3474){this['listenTo'](_0xce3474,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0xce3474,'Esc',(_0x519ea1,_0x293bd4)=>{this['_manuallyClosedAnnotationViews']['add'](_0xce3474),this['_hideBalloon'](),_0x293bd4();});}_detachListeners(_0x1bc236){this['stopListening'](_0x1bc236);}},Fe=class extends _0x3cd9f9{isAttached;annotations;['_manuallyClosed'];['_balloon'];_addedAnnotations;_selectedAnnotations;['_forceRefresh'];_refreshVisibilityDebounced;static get requires(){return[_e,it,Me];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x24cf19){super(_0x24cf19),_0x24cf19['editing']['view']['addObserver'](_t),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x24cf19['plugins']['get'](it),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x31a136(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}init(){const _0x52881c=this['editor']['plugins']['get'](Me);_0x52881c['context']===this['editor']&&(_0x52881c['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x239c0f,_0x203844)=>{const _0x58fc72=this['_balloon'];if(this['isAttached']&&_0x58fc72['visibleView']){const _0x48d95a=this['annotations']['getByView'](_0x58fc72['visibleView']);_0x48d95a&&this['_closeAnnotation'](_0x48d95a),_0x203844();}}));}afterInit(){const _0x55b72f=this['editor']['plugins']['get'](Me);_0x55b72f['context']===this['editor']&&(_0x55b72f['hasActive']()||_0x55b72f['switchTo']('inline'));}setActiveAnnotation(_0x5792ab){_0x5792ab!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x5792ab&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x5792ab)&&this['_addAnnotationToBalloon'](_0x5792ab,!0x0),_0x5792ab['isActive']=!0x0),_0x5792ab||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x5792ab);}attach(_0x18e15d){this['annotations']=_0x18e15d;const _0x4af842=this['editor']['plugins']['get'](Me),_0x6b5518=this['_balloon'];if(this['isAttached'])throw new _0x3e0d28('inlineannotations-attach-already-attached',this);if(_0x4af842['context']!==this['editor'])throw new _0x3e0d28('inlineannotations-not-allowed-with-context',this);const _0x23e711=this['editor']['plugins']['get'](_e);this['listenTo'](_0x23e711,'refresh',()=>{const _0x259860=_0x23e711['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x5e4936,_0x46f280;!this['_forceRefresh']&&(_0x5e4936=_0x259860,_0x46f280=this['_selectedAnnotations'],_0x5e4936['length']===_0x46f280['length']&&_0x5e4936['every'](_0x4294b8=>_0x46f280['includes'](_0x4294b8)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x259860),this['setActiveAnnotation'](_0x259860[0x0]||null));}),this['listenTo'](_0x23e711,'blur',(_0x15ac2b,{isAnnotationTracked:_0x4bcbf7})=>{this['activeAnnotation']&&_0x4bcbf7(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x23e711,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x2035af,_0x234243,_0x36a877)=>{_0x36a877||this['setActiveAnnotation'](null);}),this['listenTo'](_0x18e15d,'remove',(_0x479e87,_0x1af840)=>{this['_removeAnnotationFromBalloon'](_0x1af840),_0x1af840===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x6b5518,'change:visibleView',(_0x1f5062,_0x499ce6,_0x271008,_0x4bebb1)=>{_0x4bebb1&&this['stopListening'](_0x4bebb1);const _0x1b2b33=_0x18e15d['getByView'](_0x271008);_0x271008&&_0x1b2b33&&(this['listenTo'](_0x271008,'change:height',()=>{_0x6b5518['updatePosition']();}),this['listenTo'](_0x271008,'Esc',()=>{this['_closeAnnotation'](_0x1b2b33),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x1b2b33&&this['setActiveAnnotation'](_0x1b2b33));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x6b5518['visibleView']&&_0x18e15d['getByView'](_0x6b5518['visibleView'])&&_0x6b5518['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 _0x3e0d28('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x5ecb3c of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x5ecb3c);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}_setSelectedAnnotations(_0xbc22ad){for(const _0x1d6850 of this['_selectedAnnotations'])_0xbc22ad['includes'](_0x1d6850)||this['_manuallyClosed']['delete'](_0x1d6850);for(const _0x68dd28 of this['annotations'])_0xbc22ad['includes'](_0x68dd28)||this['_removeAnnotationFromBalloon'](_0x68dd28);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x22a517 of _0xbc22ad)this['_addAnnotationToBalloon'](_0x22a517);}this['_selectedAnnotations']=_0xbc22ad;}_addAnnotationToBalloon(_0x326d44,_0xc78054=!0x1){this['_manuallyClosed']['has'](_0x326d44)||(this['_addedAnnotations']['has'](_0x326d44)||this['_balloon']['hasView'](_0x326d44['view'])||(this['_addedAnnotations']['add'](_0x326d44),this['_balloon']['add']({'stackId':_0x326d44['view']['id'],'view':_0x326d44['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x326d44)}})),_0xc78054&&this['_balloon']['showStack'](_0x326d44['view']['id']));}_getBalloonTargetForAnnotation(_0x231eff){const _0xba8f86=_0x231eff['target'],_0x4e8542=this['editor']['editing']['view'],_0x6de15e=_0x4e8542['document']['selection']['getFirstRange'](),_0x26036b=_0x4e8542['domConverter']['viewRangeToDom'](_0x6de15e);if(_0x26036b['collapse'](!0x0),_0xba8f86){if(_0xba8f86 instanceof _0x416a59)return _0xba8f86;let _0x29ec08=[];for(const _0x4d1430 of _0xba8f86)_0x29ec08['push'](..._0x416a59['getDomElementRects'](_0x4d1430));_0x29ec08=function(_0x35f300){const _0x123921=[];let _0x27de65=_0x35f300[0x0];for(let _0x2c2108=0x1;_0x2c2108<_0x35f300['length'];_0x2c2108++)if(We(_0x27de65,_0x35f300[_0x2c2108])){const _0x388fb5=_0x35f300[_0x2c2108]['width'];_0x27de65['width']+=_0x388fb5,_0x27de65['right']+=_0x388fb5;}else _0x123921['push'](_0x27de65),_0x27de65=_0x35f300[_0x2c2108];return _0x123921['push'](_0x27de65),_0x123921;}(_0x29ec08);const _0x32655e=_0x26036b['getBoundingClientRect']();return _0x29ec08['find'](_0x578173=>_0x578173['top']<=_0x32655e['top']&&_0x578173['bottom']>=_0x32655e['bottom']&&_0x578173['left']<=_0x32655e['left']&&_0x578173['right']>=_0x32655e['right'])||_0x29ec08[0x0];}return _0x231eff['targetRect']||_0x26036b;}_removeAnnotationFromBalloon(_0x2605b9){this['_addedAnnotations']['has'](_0x2605b9)&&this['_balloon']['hasView'](_0x2605b9['view'])&&(this['_addedAnnotations']['delete'](_0x2605b9),this['_balloon']['remove'](_0x2605b9['view']));}_closeAnnotation(_0x2a0098){this['_manuallyClosed']['add'](_0x2a0098),this['_removeAnnotationFromBalloon'](_0x2a0098);}};function We(_0x2710a7,_0xae7ac7){return _0x2710a7['top']===_0xae7ac7['top']&&_0x2710a7['bottom']===_0xae7ac7['bottom']&&_0x2710a7['right']===_0xae7ac7['left'];}var Ke=class extends ut{['focusTracker'];['focusCycler'];_annotationViews;constructor(_0x1f5409,_0x4c3d1c){super(_0x1f5409),this['set']('isEmpty',!_0x4c3d1c['length']),this['focusTracker']=new _0x38a73f(),this['_annotationViews']=_0x4c3d1c,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new ht({'focusables':_0x4c3d1c,'focusTracker':this['focusTracker']}),this['listenTo'](_0x4c3d1c,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x4c3d1c,'remove',(_0xd55248,_0xd0a15)=>{_0xd0a15['isActive']&&this['focus'](),_0x4c3d1c['length']||(this['isEmpty']=!0x0);});const _0x1c1286=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':St(_0x1f5409,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x4c3d1c},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x1c1286['if']('isEmpty','ck-hidden',_0x161469=>!_0x161469)]},'children':[{'text':St(_0x1f5409,'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 _0x3f0f75 of this['_annotationViews'])this['focusTracker']['add'](_0x3f0f75['element']);this['_annotationViews']['on']('change',(_0x542d2e,{added:_0x4834d3,removed:_0xc4b0c1})=>{for(const _0x20ea31 of _0x4834d3)this['focusTracker']['add'](_0x20ea31['element']);for(const _0x26e25c of _0xc4b0c1)this['focusTracker']['remove'](_0x26e25c['element']);});}},Ge=class extends _0x49d18b{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[ue,ae];}constructor(_0x341029){super(_0x341029),this['archivedThreads']=new _0x49bb96();}init(){const _0xdc59ae=this['context'],_0x2dabae=_0xdc59ae['plugins']['get'](ue),_0x22be70=_0xdc59ae['plugins']['get'](ae);this['listenTo'](_0x2dabae,'addCommentThread',(_0x3dc98e,{threadId:_0x121385})=>{const _0x509b11=_0x2dabae['getCommentThread'](_0x121385);_0x509b11['archivedAt']&&this['archivedThreads']['add'](_0x509b11,this['_calculatePosition'](_0x509b11['archivedAt'])),this['listenTo'](_0x509b11,'change:archivedAt',(_0xdc67c0,_0x327b7a,_0x5aa74c)=>{_0x5aa74c?this['archivedThreads']['has'](_0x509b11)||this['archivedThreads']['add'](_0x509b11,this['_calculatePosition'](_0x509b11['archivedAt'])):this['archivedThreads']['has'](_0x509b11)&&this['archivedThreads']['remove'](_0x509b11);});}),this['listenTo'](_0x2dabae,'removeCommentThread',(_0x172f65,{threadId:_0x1a4e12})=>{const _0x3e3980=_0x2dabae['getCommentThread'](_0x1a4e12);this['stopListening'](_0x3e3980),this['archivedThreads']['has'](_0x3e3980)&&this['archivedThreads']['remove'](_0x3e3980);},{'priority':'highest'}),this['listenTo'](_0x22be70['collection'],'focus',(_0x3803da,_0x18ccef)=>{_0x18ccef['isVisible']||(_0x18ccef['isActive']=!0x0,_0x22be70['activate'](_0x18ccef));});}_calculatePosition(_0x4051ec){const _0x2f3509=[...this['archivedThreads']]['findIndex'](_0x73d51f=>_0x73d51f['archivedAt']<_0x4051ec);return _0x2f3509>-0x1?_0x2f3509:this['archivedThreads']['length'];}},Ye=class extends _0x3cd9f9{commentsArchiveView;annotationViews;['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Ge,st];}constructor(_0x895537){super(_0x895537),this['annotationViews']=new ft(),this['_pendingThreads']=[];}init(){const _0x7a2c80=this['editor'],_0x4ba3d6=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x7a2c80['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](et,!0x0)),_0x7a2c80['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x10482c=this['_createCommentsArchiveButton'](lt);return _0x10482c['set']({'role':'menuitemcheckbox'}),_0x10482c;});const _0x539b6e=_0x7a2c80['plugins']['get'](Ge),_0x12088b=_0x7a2c80['plugins']['get']('Annotations'),_0x324c30=_0x7a2c80['plugins']['get']('CommentsRepository');_0x539b6e['archivedThreads']['forEach'](_0x105b47=>{this['_handleNewThread'](_0x105b47);}),this['listenTo'](_0x539b6e['archivedThreads'],'add',(_0x260bd3,_0x593d3a)=>{this['_handleNewThread'](_0x593d3a);}),this['listenTo'](_0x12088b['collection'],'add',(_0xa828ab,_0x3e2117)=>{const _0x2b1171=this['_pendingThreads']['find'](_0x21c99a=>{const _0x45508e=_0x324c30['_threadToController']['get'](_0x21c99a);return _0x45508e&&_0x3e2117['innerView']===_0x45508e['view'];});if(_0x2b1171){const _0x155b71=this['_calculatePosition'](_0x2b1171['archivedAt']);this['_addAnnotationToArchive'](_0x3e2117,_0x155b71),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2b1171),0x1);}}),this['listenTo'](_0x539b6e['archivedThreads'],'remove',(_0x466c5d,_0x52271b)=>{const _0x1a2780=_0x7a2c80['config']['get']('collaboration.channelId');if(!_0x1a2780||_0x52271b['channelId']===_0x1a2780){if(this['_pendingThreads']['includes'](_0x52271b))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x52271b),0x1);else{const _0x11f787=_0x324c30['_threadToController']['get'](_0x52271b),_0x213583=_0x12088b['getByInnerView'](_0x11f787['view']);this['annotationViews']['remove'](_0x213583['view']),this['stopListening'](_0x213583),this['stopListening'](_0x213583['focusableElements']);}}}),this['listenTo'](_0x12088b['collection'],'add',(_0x2be3eb,_0x56bbf3)=>{this['listenTo'](_0x56bbf3,'escape',_0x4ba3d6);}),this['listenTo'](_0x12088b['collection'],'remove',(_0x3031d9,_0x1d9fcb)=>{this['stopListening'](_0x1d9fcb,'escape',_0x4ba3d6);});}_addAnnotationToArchive(_0xd610d,_0x52a771){this['listenTo'](_0xd610d,'set:isVisible',_0x597b8a=>{_0x597b8a['return']=!0x1,_0x597b8a['stop']();}),this['annotationViews']['add'](_0xd610d['view'],_0x52a771);}['_handleNewThread'](_0x235e6e){const _0x26b2b5=this['editor']['plugins']['get']('CommentsRepository'),_0x4bb6e7=this['editor']['plugins']['get']('Annotations'),_0xf200e5=this['editor']['config']['get']('collaboration.channelId');if(!_0xf200e5||_0x235e6e['channelId']===_0xf200e5){const _0x534000=_0x26b2b5['_threadToController']['get'](_0x235e6e);if(!_0x534000)return void this['_pendingThreads']['push'](_0x235e6e);const _0x34997a=this['_calculatePosition'](_0x235e6e['archivedAt']),_0x2ec466=_0x4bb6e7['getByInnerView'](_0x534000['view']);_0x2ec466['isVisible']&&_0x4bb6e7['_visibleAnnotations']['remove'](_0x2ec466),this['_addAnnotationToArchive'](_0x2ec466,_0x34997a);}}_calculatePosition(_0x285e4a){const _0x586fba=this['editor']['config']['get']('collaboration.channelId'),_0x2ceb29=[...this['editor']['plugins']['get'](Ge)['archivedThreads']]['filter'](_0x4dbf1b=>_0x4dbf1b['channelId']===_0x586fba)['findIndex'](_0x30d485=>_0x30d485['archivedAt']<_0x285e4a);return _0x2ceb29<0x0||_0x2ceb29>this['annotationViews']['length']?this['annotationViews']['length']:_0x2ceb29-0x1;}_toggleDialog(){const _0x2616ea=this['editor'],_0x39e56a=_0x2616ea['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Ke(_0x2616ea['locale'],this['annotationViews'])),'commentsArchive'===_0x39e56a['id']?_0x39e56a['hide']():_0x39e56a['show']({'id':'commentsArchive','title':St(_0x2616ea['locale'],'COMMENTS_ARCHIVE'),'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':nt['EDITOR_TOP_SIDE']});}_createCommentsArchiveButton(_0x328d40,_0x4d2b22=!0x1){const _0x60e303=this['editor']['locale'],_0x144b60=this['editor']['plugins']['get']('Dialog'),_0x345ebc=new _0x328d40(_0x60e303);return _0x345ebc['bind']('isEnabled')['to'](this,'isEnabled'),_0x345ebc['bind']('isOn')['to'](_0x144b60,'id',_0x1ef29e=>'commentsArchive'===_0x1ef29e),_0x345ebc['set']({'label':St(_0x60e303,'COMMENTS_ARCHIVE'),'icon':_0x25480b,'isToggleable':!0x0}),_0x4d2b22&&(_0x345ebc['tooltip']=!0x0),this['listenTo'](_0x345ebc,'execute',()=>this['_toggleDialog']()),_0x345ebc;}_hideDialogOnAnnotationEscape=_0x37e0eb=>{const _0x392227=_0x37e0eb['source'];if(!this['annotationViews']['has'](_0x392227['view']))return;const _0x1c3726=this['editor']['plugins']['get']('Dialog');_0x1c3726['isOpen']&&'commentsArchive'===_0x1c3726['id']&&(_0x1c3726['hide'](),_0x37e0eb['stop']());};},Xe=class extends _0x3cd9f9{static get requires(){return[ue,Ie,Ne,Ge,Ye,Oe,Be,Ue,Fe];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{ge as AddCommentThreadCommand,se as Annotation,oe as AnnotationCollection,He as AnnotationCounterButtonView,ee as AnnotationView,ae as Annotations,Pe as AnnotationsSidebarItemView,xe as AnnotationsSidebarView,Me as AnnotationsUIs,qt as BaseCommentThreadView,Jt as BaseCommentView,pe as Comment,fe as CommentThread,xt as CommentThreadController,Ut as CommentThreadInputView,$t as CommentThreadView,Zt as CommentView,Xe as Comments,Ge as CommentsArchive,Ye as CommentsArchiveUI,Ie as CommentsEditing,Wt as CommentsListView,Oe as CommentsOnly,ue as CommentsRepository,Ne as CommentsUI,_e as EditorAnnotations,Fe as InlineAnnotations,Ue as NarrowSidebar,Le as Sidebar,Be as WideSidebar,re as bindAnnotationCollections};