@ckeditor/ckeditor5-comments 48.4.0-alpha.1 → 48.4.0-alpha.3

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 (148) hide show
  1. package/dist/index.js +11 -11
  2. package/dist/translations/af.js +1 -1
  3. package/dist/translations/af.umd.js +1 -1
  4. package/dist/translations/ar.js +1 -1
  5. package/dist/translations/ar.umd.js +1 -1
  6. package/dist/translations/ast.js +1 -1
  7. package/dist/translations/ast.umd.js +1 -1
  8. package/dist/translations/az.js +1 -1
  9. package/dist/translations/az.umd.js +1 -1
  10. package/dist/translations/be.js +1 -1
  11. package/dist/translations/be.umd.js +1 -1
  12. package/dist/translations/bg.js +1 -1
  13. package/dist/translations/bg.umd.js +1 -1
  14. package/dist/translations/bn.js +1 -1
  15. package/dist/translations/bn.umd.js +1 -1
  16. package/dist/translations/bs.js +1 -1
  17. package/dist/translations/bs.umd.js +1 -1
  18. package/dist/translations/ca.js +1 -1
  19. package/dist/translations/ca.umd.js +1 -1
  20. package/dist/translations/cs.js +1 -1
  21. package/dist/translations/cs.umd.js +1 -1
  22. package/dist/translations/da.js +1 -1
  23. package/dist/translations/da.umd.js +1 -1
  24. package/dist/translations/de-ch.js +1 -1
  25. package/dist/translations/de-ch.umd.js +1 -1
  26. package/dist/translations/de.js +1 -1
  27. package/dist/translations/de.umd.js +1 -1
  28. package/dist/translations/el.js +1 -1
  29. package/dist/translations/el.umd.js +1 -1
  30. package/dist/translations/en-au.js +1 -1
  31. package/dist/translations/en-au.umd.js +1 -1
  32. package/dist/translations/en-gb.js +1 -1
  33. package/dist/translations/en-gb.umd.js +1 -1
  34. package/dist/translations/en.js +1 -1
  35. package/dist/translations/en.umd.js +1 -1
  36. package/dist/translations/eo.js +1 -1
  37. package/dist/translations/eo.umd.js +1 -1
  38. package/dist/translations/es-co.js +1 -1
  39. package/dist/translations/es-co.umd.js +1 -1
  40. package/dist/translations/es.js +1 -1
  41. package/dist/translations/es.umd.js +1 -1
  42. package/dist/translations/et.js +1 -1
  43. package/dist/translations/et.umd.js +1 -1
  44. package/dist/translations/eu.js +1 -1
  45. package/dist/translations/eu.umd.js +1 -1
  46. package/dist/translations/fa.js +1 -1
  47. package/dist/translations/fa.umd.js +1 -1
  48. package/dist/translations/fi.js +1 -1
  49. package/dist/translations/fi.umd.js +1 -1
  50. package/dist/translations/fr.js +1 -1
  51. package/dist/translations/fr.umd.js +1 -1
  52. package/dist/translations/gl.js +1 -1
  53. package/dist/translations/gl.umd.js +1 -1
  54. package/dist/translations/gu.js +1 -1
  55. package/dist/translations/gu.umd.js +1 -1
  56. package/dist/translations/he.js +1 -1
  57. package/dist/translations/he.umd.js +1 -1
  58. package/dist/translations/hi.js +1 -1
  59. package/dist/translations/hi.umd.js +1 -1
  60. package/dist/translations/hr.js +1 -1
  61. package/dist/translations/hr.umd.js +1 -1
  62. package/dist/translations/hu.js +1 -1
  63. package/dist/translations/hu.umd.js +1 -1
  64. package/dist/translations/hy.js +1 -1
  65. package/dist/translations/hy.umd.js +1 -1
  66. package/dist/translations/id.js +1 -1
  67. package/dist/translations/id.umd.js +1 -1
  68. package/dist/translations/it.js +1 -1
  69. package/dist/translations/it.umd.js +1 -1
  70. package/dist/translations/ja.js +1 -1
  71. package/dist/translations/ja.umd.js +1 -1
  72. package/dist/translations/jv.js +1 -1
  73. package/dist/translations/jv.umd.js +1 -1
  74. package/dist/translations/kk.js +1 -1
  75. package/dist/translations/kk.umd.js +1 -1
  76. package/dist/translations/km.js +1 -1
  77. package/dist/translations/km.umd.js +1 -1
  78. package/dist/translations/kn.js +1 -1
  79. package/dist/translations/kn.umd.js +1 -1
  80. package/dist/translations/ko.js +1 -1
  81. package/dist/translations/ko.umd.js +1 -1
  82. package/dist/translations/ku.js +1 -1
  83. package/dist/translations/ku.umd.js +1 -1
  84. package/dist/translations/lt.js +1 -1
  85. package/dist/translations/lt.umd.js +1 -1
  86. package/dist/translations/lv.js +1 -1
  87. package/dist/translations/lv.umd.js +1 -1
  88. package/dist/translations/ms.js +1 -1
  89. package/dist/translations/ms.umd.js +1 -1
  90. package/dist/translations/nb.js +1 -1
  91. package/dist/translations/nb.umd.js +1 -1
  92. package/dist/translations/ne.js +1 -1
  93. package/dist/translations/ne.umd.js +1 -1
  94. package/dist/translations/nl.js +1 -1
  95. package/dist/translations/nl.umd.js +1 -1
  96. package/dist/translations/no.js +1 -1
  97. package/dist/translations/no.umd.js +1 -1
  98. package/dist/translations/oc.js +1 -1
  99. package/dist/translations/oc.umd.js +1 -1
  100. package/dist/translations/pl.js +1 -1
  101. package/dist/translations/pl.umd.js +1 -1
  102. package/dist/translations/pt-br.js +1 -1
  103. package/dist/translations/pt-br.umd.js +1 -1
  104. package/dist/translations/pt.js +1 -1
  105. package/dist/translations/pt.umd.js +1 -1
  106. package/dist/translations/ro.js +1 -1
  107. package/dist/translations/ro.umd.js +1 -1
  108. package/dist/translations/ru.js +1 -1
  109. package/dist/translations/ru.umd.js +1 -1
  110. package/dist/translations/si.js +1 -1
  111. package/dist/translations/si.umd.js +1 -1
  112. package/dist/translations/sk.js +1 -1
  113. package/dist/translations/sk.umd.js +1 -1
  114. package/dist/translations/sl.js +1 -1
  115. package/dist/translations/sl.umd.js +1 -1
  116. package/dist/translations/sq.js +1 -1
  117. package/dist/translations/sq.umd.js +1 -1
  118. package/dist/translations/sr-latn.js +1 -1
  119. package/dist/translations/sr-latn.umd.js +1 -1
  120. package/dist/translations/sr.js +1 -1
  121. package/dist/translations/sr.umd.js +1 -1
  122. package/dist/translations/sv.js +1 -1
  123. package/dist/translations/sv.umd.js +1 -1
  124. package/dist/translations/th.js +1 -1
  125. package/dist/translations/th.umd.js +1 -1
  126. package/dist/translations/ti.js +1 -1
  127. package/dist/translations/ti.umd.js +1 -1
  128. package/dist/translations/tk.js +1 -1
  129. package/dist/translations/tk.umd.js +1 -1
  130. package/dist/translations/tr.js +1 -1
  131. package/dist/translations/tr.umd.js +1 -1
  132. package/dist/translations/tt.js +1 -1
  133. package/dist/translations/tt.umd.js +1 -1
  134. package/dist/translations/ug.js +1 -1
  135. package/dist/translations/ug.umd.js +1 -1
  136. package/dist/translations/uk.js +1 -1
  137. package/dist/translations/uk.umd.js +1 -1
  138. package/dist/translations/ur.js +1 -1
  139. package/dist/translations/ur.umd.js +1 -1
  140. package/dist/translations/uz.js +1 -1
  141. package/dist/translations/uz.umd.js +1 -1
  142. package/dist/translations/vi.js +1 -1
  143. package/dist/translations/vi.umd.js +1 -1
  144. package/dist/translations/zh-cn.js +1 -1
  145. package/dist/translations/zh-cn.umd.js +1 -1
  146. package/dist/translations/zh.js +1 -1
  147. package/dist/translations/zh.umd.js +1 -1
  148. package/package.json +16 -16
package/dist/index.js CHANGED
@@ -20,14 +20,14 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Command as _0x2d43ae,Context as _0x2545f7,ContextPlugin as _0x294fbc,Editor as _0x30ed75,PendingActions as _0xfa5115,Plugin as _0x479b71}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x2e165a,Collection as _0x5b969f,DomEmitterMixin as _0x45b7dc,FocusTracker as _0x8cfb02,KeystrokeHandler as _0x2830c2,ObservableMixin as _0x50a872,Rect as _0x429aef,diff as _0x42000f,first as _0x28cbc5,getEnvKeystrokeText as _0x38a1f4,keyCodes as _0x5cd2c9,priorities as _0x2b5acd,scrollViewportToShowTarget as _0x3d03ae,toUnit as _0x82701f,uid as _0x3a3e70}from'@ckeditor/ckeditor5-utils';import{AriaDescriptionView as _0x492c81,ConfirmMixin as _0x3b6d67,FOCUS_ANNOTATION_KEYSTROKE as _0x24b6ae,LateFocusButtonView as _0xa4f096,LateFocusDropdownButtonView as _0x419431,UserView as _0x12bb9f,Users as _0x22cb09,getAllMarkersDomElementsSorted as _0x564cea,getDateTimeFormatter as _0x4ad7b7,hashObject as _0xf4c31f,setupThreadKeyboardNavigation as _0x3afec8,surroundingMarkersDetector as _0x132571,trimHtml as _0x3e619d}from'@ckeditor/ckeditor5-collaboration-core';import{cloneDeep as _0xf7f2a0,debounce as _0x14ec54,isEqual as _0x169581,set as _0x39ebb6,throttle as _0x7fc266,unset as _0x35a747}from'es-toolkit/compat';import{IconAddComment as _0x2ea43a,IconCheck as _0x44764f,IconCommentsArchive as _0x5a2249,IconPencil as _0x351b42,IconRemoveComment as _0x220ba6,IconThreeVerticalDots as _0x206807,IconUndo as _0x18c3b3}from'@ckeditor/ckeditor5-icons';import{BalloonPanelView as _0x264bb3,BodyCollection as _0x4bd546,ButtonView as _0x9183d3,ContextualBalloon as _0x187251,Dialog as _0x44c8bf,DialogViewPosition as _0x5b717c,EditorUI as tt,EditorUIView as it,FocusCycler as et,InlineEditableUIView as st,ListItemView as nt,ListView as ot,MenuBarMenuListItemButtonView as rt,View as ht,ViewCollection as at,createDropdown as ct,focusChildOnDropdownOpen as dt}from'@ckeditor/ckeditor5-ui';import{MouseObserver as lt,disableViewPlaceholder as mt,enableViewPlaceholder as ut}from'@ckeditor/ckeditor5-engine';import{Clipboard as ft,ClipboardMarkersUtils as pt,ClipboardPipeline as wt}from'@ckeditor/ckeditor5-clipboard';import{Enter as gt,ShiftEnter as _t}from'@ckeditor/ckeditor5-enter';import{SelectAll as At}from'@ckeditor/ckeditor5-select-all';import{Typing as vt}from'@ckeditor/ckeditor5-typing';import{Undo as yt}from'@ckeditor/ckeditor5-undo';import{Paragraph as Tt}from'@ckeditor/ckeditor5-paragraph';import{toWidget as Ct}from'@ckeditor/ckeditor5-widget';const It=/* #__PURE__ -- @preserve */
24
- _0x50a872();var bt=class extends It{['model'];['view'];constructor(_0x6d6afc,_0x1a70de){super(),this['model']=_0x6d6afc,this['model']['_isAttached']=!0x0,this['view']=_0x1a70de,this['listenTo'](_0x1a70de,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x1a70de,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x1a70de,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x1a70de,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x1a70de,'addComment',(_0x3687bf,_0x3e5fd5)=>this['addComment'](_0x3e5fd5)),this['listenTo'](_0x1a70de,'updateComment',(_0xb50e15,_0x43b1fa,_0xbcb254)=>this['updateComment'](_0x43b1fa,_0xbcb254)),this['listenTo'](_0x1a70de,'removeComment',(_0x7e1189,_0x40170c)=>this['removeComment'](_0x40170c));}submit(){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}addComment(_0x585585){this['model']['addComment']({'content':_0x585585,'authorId':this['view']['_localUser']['id']});}updateComment(_0x1d9b90,_0x13838a){this['model']['getComment'](_0x1d9b90)['update']({'content':_0x13838a});}removeComment(_0xd07cb5){this['model']['getComment'](_0xd07cb5)['remove']();}destroy(){this['stopListening'](),this['model']['_isAttached']=!0x1;}};function Et(_0x3f13e5,_0x45b02a,_0x1774a2){const t=_0x3f13e5['t'];switch(_0x45b02a){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'},_0x1774a2);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'},_0x1774a2);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'},_0x1774a2);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'},_0x1774a2);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x1774a2);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'},_0x1774a2);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'},_0x1774a2);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'},_0x1774a2);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 kt=class extends it{['main'];editable;constructor(_0x36616f,_0xb3ab4d){super(_0x36616f);const _0x4ec70c=_0x3a3e70();this['main']=this['createCollection'](),this['editable']=new st(_0x36616f,_0xb3ab4d,void 0x0,{'label':()=>Et(_0x36616f,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x36616f['uiLanguageDirection'],'lang':_0x36616f['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x4ec70c},'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']();}},Nt=class extends tt{['view'];constructor(_0x5963cc){super(_0x5963cc),this['view']=new kt(_0x5963cc['locale'],_0x5963cc['editing']['view']);}get element(){return this['view']['element'];}init(){const _0x51990a=this['editor']['editing']['view'],_0x15e2d4=this['view']['editable'];_0x15e2d4['name']=_0x51990a['document']['getRoot']()['rootName'],this['view']['render']();const _0x20d5d1=_0x15e2d4['element'];this['setEditableElement'](_0x15e2d4['name'],_0x20d5d1),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x51990a['attachDomRoot'](_0x20d5d1),this['fire']('ready');}destroy(){super['destroy'](),this['view']['destroy']();}};const Ot=[ft,gt,_t,At,vt,yt,Tt],Mt=/* #__PURE__ -- @preserve */
25
- _0x50a872(_0x30ed75);var Rt=class CommentEditor extends Mt{static defaultPlugins=/* #__PURE__ -- @preserve */
26
- ((()=>Ot)());constructor(_0xbf2745={}){(_0xbf2745=Object['assign']({},_0xbf2745))['plugins']||(_0xbf2745['plugins']=CommentEditor['defaultPlugins']),super(_0xbf2745),this['ui']=new Nt(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 _0x23b4eb=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x23b4eb))['then'](()=>this['fire']('ready'));}destroy(){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x20c117=>{const _0xb09ab5=this['model']['document']['getRoot'](),_0x5ea718=_0xb09ab5&&_0xb09ab5['getChild'](_0xb09ab5['childCount']-0x1);_0x20c117['setSelection'](_0x5ea718,'end'),this['editing']['view']['focus']();});}_updatePlaceholder(){const _0x22c2ae=this['editing']['view'],_0x15ff86=_0x22c2ae['document']['getRoot'](),_0x51a6b3=_0x15ff86['getChild'](0x0);_0x15ff86['childCount']>0x1||!_0x51a6b3||'p'!=_0x51a6b3['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x22c2ae,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x51a6b3['placeholder']=this['placeholder']),ut({'view':_0x22c2ae,'element':_0x51a6b3,'keepOnFocus':!0x0}),this['placeholderElement']=_0x51a6b3);}},St=class extends ht{keystrokes;['focusTracker'];['focusables'];['focusCycler'];submitButtonView;cancelButtonView;_editorConfig;constructor(_0x23215d,_0x3cd331={}){super(_0x23215d),this['editor']=null,this['_editorConfig']=_0x3cd331,this['set']('value',_0x3cd331['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',Et(_0x23215d,'Reply...')),this['set']('submitLabel',Et(_0x23215d,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x2830c2(),this['focusTracker']=new _0x8cfb02(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x47bdb2=>!_0x47bdb2['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['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x3df379,_0x5ec30f)=>{this['cancelButtonView']['fire']('execute'),_0x5ec30f();}),this['keystrokes']['set']('Ctrl+Enter',(_0x4b512e,_0x54c2ab)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x54c2ab());}),this['on']('submit',(_0x292fb7,_0xec4118)=>{_0xec4118['length']>0xfde8?(alert(Et(_0x23215d,'TOO_LONG_COMMENT_ALERT',[_0xec4118['length'],0xfde8])),_0x292fb7['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}createEditor(){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x1e410a=this['editor'];this['element']['insertBefore'](_0x1e410a['ui']['element'],this['element']['firstChild']),_0x1e410a['model']['document']['on']('change',()=>this['value']=_0x1e410a['getData']()),_0x1e410a['bind']('placeholder')['to'](this),this['focusables']['add'](_0x1e410a['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x17b44d){-0x1===_0x17b44d?(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:_0x4eedb0}=this,_0x3d8e58=new _0x9183d3(_0x4eedb0);return _0x3d8e58['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x3d8e58['withText']=!0x0,_0x3d8e58['bind']('label')['to'](this,'submitLabel'),_0x3d8e58['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x3d8e58['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x574170,_0x3ce516)=>!_0x3ce516&&!!_0x574170['trim']()),_0x3d8e58;}_createCancelButton(){const {locale:_0x56c1b3}=this,_0x159ba5=new _0x9183d3(_0x56c1b3);return _0x159ba5['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x159ba5['label']=Et(_0x56c1b3,'Cancel'),_0x159ba5['withText']=!0x0,_0x159ba5['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x159ba5;}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x243ab5=>{this['focusTracker']['add'](_0x243ab5['element']);}),this['focusables']['on']('change',(_0x3914d4,_0x20089b)=>{for(const _0x2a1c01 of Array['from'](_0x20089b['added'])['reverse']())this['focusTracker']['add'](_0x2a1c01['element']);});}},xt=class extends ht{constructor(_0x20a036,_0x193701,_0x29d668){super(_0x20a036),this['commentInputView']=new St(_0x20a036,_0x29d668),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x148637,_0x224dfc)=>_0x148637||!!_0x224dfc),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 _0x12bb9f(_0x20a036,_0x193701),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'](_0x16dfaf){this['commentInputView']['focus'](_0x16dfaf);}_focusOnNonInteractiveMouseDown(){this['listenTo'](this['element'],'mousedown',(_0x310a63,_0x48e8fe)=>{const {submitButtonView:_0x19762c,cancelButtonView:_0x3caf4e,editor:_0x1c36e0}=this['commentInputView'];[_0x19762c['element'],_0x3caf4e['element'],_0x1c36e0?_0x1c36e0['editing']['view']['getDomRoot']():null]['filter'](_0x306b1a=>_0x306b1a)['some'](_0x5be19e=>_0x5be19e['contains'](_0x48e8fe['target']))||(this['focus'](),_0x48e8fe['preventDefault']());});}},Pt=class extends ht{constructor(_0x30b5ca){super(_0x30b5ca);const _0x4339c1=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x4339c1['to']('count',_0x3980a3=>Et(_0x30b5ca,'NUMBER_OF_COMMENTS',_0x3980a3))}]});}},Lt=class extends ht{commentViews;resolvedCommentView;['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];_collapsedCommentsView;constructor(_0x133541,_0x238557,_0x3b99a7){super(_0x133541);const _0x1f78ca=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x238557['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x238557,this['_config']=_0x3b99a7,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x8cfb02(),this['keystrokes']=new _0x2830c2(),this['focusCycler']=new et({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x20ad5b=>this['commentViews']['map'](_0x1ab323=>_0x1ab323['element'])['includes'](_0x20ad5b['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Pt(_0x133541),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0xfcfe5d=>_0xfcfe5d-this['_config']['maxCommentsWhenCollapsed']);for(const _0x246a61 of _0x238557['comments'])this['_handleNewCommentModel'](_0x246a61);this['_handleInfoComment'](),this['listenTo'](_0x238557['comments'],'add',(_0x373588,_0x39c4e3)=>{const _0x235af2=this['_calculatePosition'](_0x39c4e3);this['length']++,this['_handleNewCommentModel'](_0x39c4e3,_0x235af2),this['refreshVisibleViews']();}),this['listenTo'](_0x238557['comments'],'remove',(_0x51b8a3,_0x1bb4c2)=>{this['length']--,this['_handleRemoveCommentModel'](_0x1bb4c2),this['refreshVisibleViews']();}),this['listenTo'](_0x238557,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x238557,'change:isResolved',()=>this['_handleInfoComment']()),this['on']('change:isActive',()=>this['refreshVisibleViews']()),this['on']('change:hasDirtyComment',()=>this['refreshVisibleViews']()),this['setTemplate']({'tag':'ul','attributes':{'class':['ck-thread__comments',_0x1f78ca['if']('length','ck-hidden',_0x21f2f7=>!_0x21f2f7)],'aria-label':Et(_0x133541,'Thread\x20comments')},'children':this['visibleViews']});}get['_shouldCollapse'](){return this['_model']['weight']>this['_config']['maxThreadTotalWeight']&&!this['isActive']&&!this['hasDirtyComment'];}['render'](){super['render'](),this['refreshVisibleViews'](),this['_setupKeyboardNavigation']();}['focus'](_0x528aa6){-0x1===_0x528aa6?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}destroy(){this['_collapsedCommentsView']['destroy']();for(const _0x29162a of this['commentViews'])_0x29162a['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}_handleNewCommentModel(_0x53b174,_0x2bbc10){const _0x320ee8=new this['_config']['CommentView'](this['locale'],_0x53b174,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x320ee8['viewUid']=_0x53b174['id'],_0x320ee8['delegate']('removeComment')['to'](this),_0x320ee8['delegate']('updateComment')['to'](this),_0x320ee8['delegate']('resolveCommentThread')['to'](this),_0x320ee8['delegate']('editorReady')['to'](this),_0x320ee8['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x320ee8,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x320ee8,_0x2bbc10);}_calculatePosition(_0x10587b){const _0x139337=this['_model']['_findOptimalIndex'](_0x10587b);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x10587b['authoredAt']?_0x139337-0x1:_0x139337:_0x139337-0x1;}_handleInfoComment(){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x96f094={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':Et(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x96f094,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x96f094));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}_handleRemoveCommentModel(_0x146da1){const _0x43b1e3=this['commentViews']['remove'](_0x146da1['id']);this['stopListening'](_0x43b1e3),_0x43b1e3['isEditMode']&&this['_updateHasDirtyComment'](),_0x43b1e3['destroy']();}_updateHasDirtyComment(){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x1b0bf9=>_0x1b0bf9['isEditMode']);}['_rearrangeCollapse'](){const _0x406396=function(_0x55767c){const _0x4293dd=new _0x5b969f();for(const _0x2cba18 of _0x55767c)_0x4293dd['add'](_0x2cba18);return _0x4293dd;}(this['commentViews']),_0x2a896e=this['_collapsedCommentsView']['count'];for(let _0x2c4112=0x1;_0x2c4112<=_0x2a896e;_0x2c4112++)_0x406396['remove'](0x1);for(const _0x39f800 of _0x406396)_0x39f800['collapse']();_0x2a896e>0x0&&_0x406396['add'](this['_collapsedCommentsView'],0x1),Dt(_0x42000f(Array['from'](this['visibleViews']),Array['from'](_0x406396)),this['visibleViews'],_0x406396);}['_rearrangeExpand'](){Dt(_0x42000f(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x53512b of this['visibleViews'])_0x53512b['expand']();}_setupKeyboardNavigation(){this['commentViews']['forEach'](_0x40d4e0=>{this['focusTracker']['add'](_0x40d4e0['element']),this['keystrokes']['listenTo'](_0x40d4e0['element']);}),this['commentViews']['on']('change',(_0x35baa8,_0x2538d5)=>{for(const _0x44774a of _0x2538d5['removed'])this['focusTracker']['remove'](_0x44774a['element']),this['keystrokes']['stopListening'](_0x44774a['element']);for(const _0x3b5ba0 of Array['from'](_0x2538d5['added'])['reverse']())this['focusTracker']['add'](_0x3b5ba0['element']),this['keystrokes']['listenTo'](_0x3b5ba0['element']);});}};function Dt(_0x5ee3ed,_0x183baf,_0x532fca){let _0x5aaad2=0x0;for(const _0x5d8110 of _0x5ee3ed)switch(_0x5d8110){case'insert':_0x183baf['add'](_0x532fca['get'](_0x5aaad2),_0x5aaad2),_0x5aaad2++;break;case'delete':_0x183baf['remove'](_0x5aaad2);break;case'equal':_0x5aaad2++;}}var Vt=class extends ht{constructor(_0x32b044){super(_0x32b044);const _0x578ebb=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x578ebb['to']('contextValue',_0x1e6023=>Et(_0x32b044,'THREAD_CONTEXT_LABEL',_0x1e6023)),'tabindex':-0x1},'children':[{'text':_0x578ebb['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Bt=class extends ht{['_model'];reopenButtonView;contextView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x22033d,_0x29b125){super(_0x22033d);const _0x255290=this['bindTemplate'];this['_model']=_0x29b125,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x8cfb02(),this['keystrokes']=new _0x2830c2(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x476902=>!!_0x476902),this['bind']('contextValue')['to'](this['_model'],'context',_0x49e61f=>_0x49e61f&&_0x49e61f['value']?this['_trimContextValue'](_0x49e61f['value']):Et(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',_0x255290['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 _0x58bbc8=new _0x9183d3(this['locale']);return _0x58bbc8['label']=Et(this['locale'],'Reopen'),_0x58bbc8['tooltip']=Et(this['locale'],'Reopen'),_0x58bbc8['icon']=_0x18c3b3,_0x58bbc8['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2e519d=>!_0x2e519d),_0x58bbc8['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x37e237,_0x3f588c)=>_0x37e237&&_0x3f588c),_0x58bbc8['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x58bbc8;}_trimContextValue(_0x5da278){if(_0x5da278['length']<0x96)return _0x5da278;const _0x5cbbbf=_0x5da278['lastIndexOf']('\x20',0x93);return _0x5da278['substring'](0x0,_0x5cbbbf>-0x1?_0x5cbbbf:0x93)+'...';}_attachContextActions(){const _0x545857=this['element']['querySelector']('.ck-context'),_0x97de14=_0x545857['querySelector']('.ck-context__value');this['listenTo'](_0x545857,'mouseenter',()=>{_0x97de14['offsetWidth']<_0x97de14['scrollWidth']&&_0x545857['classList']['add']('overlay');}),this['listenTo'](_0x545857,'mouseleave',()=>{_0x545857['classList']['remove']('overlay');});}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']);for(const _0x3e4da4 of this['focusables'])this['focusTracker']['add'](_0x3e4da4['element']),this['keystrokes']['listenTo'](_0x3e4da4['element']);}_createContextView(){const _0x5771b8=new Vt(this['locale']);return _0x5771b8['bind']('contextValue')['to'](this),_0x5771b8;}},Ht=class extends ht{['_model'];['_config'];commentThreadHeaderView;commentThreadInputView;ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x1d016a,_0x554a09,_0x444a02,_0x40ef27){super(_0x1d016a),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x554a09,this['_localUser']=_0x444a02,this['_config']=_0x40ef27,this['commentThreadHeaderView']=new Bt(_0x1d016a,_0x554a09),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x492c81(_0x1d016a,Et(_0x1d016a,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Lt(_0x1d016a,_0x554a09,Object['assign']({'CommentView':this['_config']['CommentView']},_0x40ef27)),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',(_0x30808e,_0x3ead60)=>_0x30808e||!!_0x3ead60),this['bind']('isUnlinked')['to'](_0x554a09,'unlinkedAt',_0x234891=>!!_0x234891);let _0x182ee3=null;const _0x443e39=()=>{const _0x1e57f9=this['_model']['comments']['first']||null;_0x1e57f9!==_0x182ee3&&(_0x182ee3&&this['stopListening'](_0x182ee3,'change:content'),_0x182ee3=_0x1e57f9,_0x1e57f9&&this['listenTo'](_0x1e57f9,'change:content',_0x443e39));const _0x452ef7=_0x1e57f9?_0x1e57f9['author']['name']:this['_localUser']['name'],_0x34d3e8=_0x1e57f9?new DOMParser()['parseFromString'](_0x3e619d(_0x1e57f9['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']}),'text/html')['body']['textContent']:'',_0x32f6ef=Et(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x452ef7]);this['set']('ariaLabel',_0x34d3e8?_0x32f6ef+'\x20'+_0x34d3e8:_0x32f6ef);};this['listenTo'](this['_model']['comments'],'change',_0x443e39),_0x443e39(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x8cfb02(),this['keystrokes']=new _0x2830c2(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2e121f=>_0x2e121f['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x3afec8(this,this['focusables']);}async destroy(){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}_createCommentThreadInputView(){const _0x14e6ba=new xt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0xfd5759=_0x14e6ba['commentInputView'];return _0x14e6ba['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0xfd5759,'value',(_0x34190d,_0x526e09,_0x1b20df,_0xe56718,_0x42760d)=>!!_0x42760d||!!_0xe56718&&_0x1b20df&&!_0x526e09||_0x34190d&&_0x1b20df&&!_0x526e09),_0xfd5759['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x222d1e,_0x54f3e1,_0x478fbe)=>{let _0x394bcd;return _0x394bcd=_0x478fbe&&_0x54f3e1?'Reply\x20to\x20reopen\x20discussion...':_0x222d1e?'Reply...':'Write\x20a\x20comment...',Et(this['locale'],_0x394bcd);}),_0xfd5759['bind']('submitLabel')['to'](this,'length',_0x4992d1=>Et(this['locale'],_0x4992d1?'Reply':'Comment')),_0xfd5759['on']('submit',(_0x4fcf4c,_0x37dd4a)=>{this['fire']('addComment',_0x37dd4a),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0xfd5759['on']('cancel',()=>{this['focus']();}),_0xfd5759['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0xfd5759['on']('cancel',_0x58398d=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x58398d['stop']());}),this['on']('change:isActive',(_0x594510,_0x34b879,_0x58041d)=>{_0x58041d||this['length']||_0xfd5759['value']||this['fire']('removeCommentThread');}),_0x14e6ba;}};const Ft=/* #__PURE__ -- @preserve */
27
- _0x3b6d67(Ht);var Ut=class extends Ft{commentThreadChildren;containerElement;resolveButton;_boundFirstCommentView;constructor(_0x6ed68b,_0x3a18e2,_0x657a7b,_0x2d39b8){super(_0x6ed68b,_0x3a18e2,_0x657a7b,_0x2d39b8),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x6ed68b,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x44af5d,_0x18fbb9,_0x30fc69)=>{_0x30fc69||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x19545f,_0x2b43c8,_0x4e3b8d)=>{_0x4e3b8d&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}getTemplate(){const _0x2d57b9=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x2d57b9['if']('isActive','ck-thread--active'),_0x2d57b9['if']('isUnlinked','ck-thread--unlinked'),_0x2d57b9['to']('actionIndicator',_0x597528=>_0x597528?'ck-thread--'+_0x597528:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x2d57b9['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 _0x1d3795 of this['commentsListView']['commentViews'])_0x1d3795['cancelConfirm']();}_bindFirstCommentView(){const {locale:_0x49fad8}=this,_0x1ca66f=this['commentsListView']['commentViews']['get'](0x0);_0x1ca66f===this['_boundFirstCommentView']||_0x1ca66f['isSystemComment']||(this['_boundFirstCommentView']=_0x1ca66f,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x1ca66f,'actionIndicator',_0x5adcc7=>'remove'===_0x5adcc7?'remove':null),_0x1ca66f['placeholder']=Et(_0x49fad8,'Write\x20a\x20comment...'),_0x1ca66f['removeButton']['on']('execute',_0x49dc4d=>{_0x49dc4d['stop'](),this['showConfirm'](Et(_0x49fad8,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x1ca66f['focus']();}),_0x1ca66f['actionBar']['add'](this['resolveButton'],0x0),_0x1ca66f['focusables']['add'](this['resolveButton'],0x0));}_createResolveButton(){const _0x4371cf=new _0xa4f096(this['locale']);return _0x4371cf['label']=Et(this['locale'],'Resolve'),_0x4371cf['tooltip']=Et(this['locale'],'Resolve'),_0x4371cf['icon']=_0x44764f,_0x4371cf['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x4371cf['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x72f9ab=>!_0x72f9ab),_0x4371cf['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x2f8dd0,_0x280292)=>_0x2f8dd0&&!_0x280292),_0x4371cf['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x4371cf;}_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']));}},Wt=class extends ht{constructor(_0x1f1f1d){super(_0x1f1f1d),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x258dc4,_0x3b985e,_0x3a6438)=>{this['element']['innerHTML']=_0x3a6438;}),this['element']['innerHTML']=this['content'];}},Kt=class extends ht{['visibleView'];ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];constructor(_0x350725,_0x5abcff,_0xd5b3e8){super(_0x350725),this['_model']=_0x5abcff,this['_config']=_0xd5b3e8,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x5abcff,'content',_0x5abcff,'authoredAt',(_0x520987,_0x3e877d)=>Et(_0x350725,'COMMENT_ARIA_LABEL',[_0x5abcff['author']['name'],_0xd5b3e8['formatDateTime'](_0x3e877d),new DOMParser()['parseFromString'](_0x520987,'text/html')['body']['textContent'],_0x5abcff['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x492c81(_0x350725,Et(_0x350725,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new at(),this['focusTracker']=new _0x8cfb02(),this['keystrokes']=new _0x2830c2(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x12818c=>_0x12818c['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']?Et(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):Et(this['locale'],'EXTERNAL_COMMENT');}getUserViewNotificationText(){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?Et(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):Et(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}_createCommentContentView(){const _0x1ae501=new Wt(this['locale']);return _0x1ae501['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x4d4263,_0x41844b)=>_0x41844b?_0x3e619d(_0x4d4263,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x4d4263),_0x1ae501;}_createCommentInputView(){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x396bb1=new St(this['locale'],this['_config']['editorConfig']);return _0x396bb1['value']=this['_model']['content'],_0x396bb1['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x396bb1['submitLabel']=Et(this['locale'],'Save'),_0x396bb1['on']('submit',(_0x2a4a4d,_0x2f3257)=>{this['fire']('updateComment',this['_model']['id'],_0x2f3257),this['switchToDisplayMode'](),this['focus']();}),_0x396bb1['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x396bb1['once']('editorReady',()=>{_0x396bb1['focus']();}),_0x396bb1['createEditor'](),_0x396bb1['delegate']('editorReady')['to'](this),_0x396bb1['delegate']('editorDestroyed')['to'](this),_0x396bb1;}_setupKeyboardNavigation(){const _0x5abdd3=this['element'];this['keystrokes']['listenTo'](_0x5abdd3);for(const _0x146fc5 of this['focusables'])this['focusTracker']['add'](_0x146fc5['element']),this['keystrokes']['listenTo'](_0x146fc5['element']);this['focusables']['on']('change',(_0x21c492,_0x4a50c4)=>{for(const _0x35ee56 of _0x4a50c4['removed'])this['focusTracker']['remove'](_0x35ee56['element']),this['keystrokes']['stopListening'](_0x35ee56['element']);for(const _0x26d8f9 of _0x4a50c4['added'])this['focusTracker']['add'](_0x26d8f9['element']),this['keystrokes']['listenTo'](_0x26d8f9['element']);}),this['keystrokes']['set']('enter',(_0x1e904a,_0x1cc98f)=>{_0x5abdd3===_0x1e904a['target']&&(this['focusCycler']['focusFirst'](),_0x1cc98f());}),this['keystrokes']['set']('esc',(_0x739e67,_0x4cd480)=>{_0x5abdd3!==_0x739e67['target']&&(this['focus'](),_0x4cd480());});}};const Gt=/* #__PURE__ -- @preserve */
28
- _0x3b6d67(Kt);var Yt=class extends Gt{actionBar;['userView'];constructor(_0x33182b,_0x23d9ff,_0xc67058){super(_0x33182b,_0x23d9ff,_0xc67058),this['set']('actionIndicator',null),this['set']('placeholder',Et(_0x33182b,'Reply...')),this['bind']('authoredAt')['to'](_0x23d9ff),this['bind']('resolvedAt')['to'](_0x23d9ff),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 _0x12bb9f(_0x33182b,_0x23d9ff['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x23d9ff,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}getTemplate(){const _0x52b746=this['bindTemplate'],_0x176f81=[{'tag':'div','attributes':{'class':['ck-comment__info','ck-annotation__info']},'children':[{'tag':'span','children':[{'text':this['userView']['name']}],'attributes':{'class':['ck-comment__info-name','ck-annotation__info-name'],'data-cke-tooltip-text':this['userView']['name']}},{'tag':'time','attributes':{'datetime':_0x52b746['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x52b746['to']('authoredAt',_0x241cae=>this['_config']['formatDateTime'](_0x241cae))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x52b746['if']('isEditMode','ck-comment__actions--hidden'),_0x52b746['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']&&_0x176f81['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x52b746['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x52b746['if']('isEditMode','ck-comment--edit'),_0x52b746['if']('isSystemComment','ck-comment--info'),_0x52b746['to']('actionIndicator',_0x42e879=>_0x42e879?'ck-comment--'+_0x42e879:'')],'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':_0x176f81}]}]};}_createEditButton(){const _0x3a2f93=new _0x9183d3(this['locale']);return _0x3a2f93['label']=Et(this['locale'],'Edit'),_0x3a2f93['icon']=_0x351b42,_0x3a2f93['withText']=!0x0,_0x3a2f93['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x3a2f93['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1057ae=>!_0x1057ae),_0x3a2f93['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x3a2f93['on']('execute',()=>this['switchToEditMode']()),_0x3a2f93;}_createRemoveButton(){const _0x5cc998=new _0x9183d3(this['locale']);return _0x5cc998['label']=Et(this['locale'],'Remove'),_0x5cc998['icon']=_0x220ba6,_0x5cc998['withText']=!0x0,_0x5cc998['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x5cc998['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3da1db=>!_0x3da1db),_0x5cc998['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x5cc998['on']('execute',()=>{this['showConfirm'](Et(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x5cc998;}_createDropdown(){const _0x33b230=ct(this['locale'],_0x419431),_0x549a40=_0x33b230['panelView']['children'],_0x2c2c4e=new ot(this['locale']),_0x58a86d=_0x33b230['bindTemplate'];dt(_0x33b230,()=>this['items']['find'](_0x493a2a=>_0x493a2a['isVisible'])),_0x33b230['extendTemplate']({'attributes':{'class':[_0x58a86d['if']('isVisible','ck-hidden',_0x5a3192=>!_0x5a3192)]}});const _0x25ffb0=(_0x1aeabd,_0x5cee8a=-0x1)=>{const _0x1530ab=new nt(this['locale']);_0x1530ab['children']['add'](_0x1aeabd);const _0x1ca534=_0x5cee8a>-0x1?_0x5cee8a:_0x2c2c4e['items']['length'];_0x2c2c4e['items']['add'](_0x1530ab,_0x1ca534);const _0x228854=Array['from'](this['items']);_0x33b230['unbind']('isEnabled','isVisible'),_0x33b230['bind']('isEnabled')['toMany'](_0x228854,'isEnabled',(..._0x548303)=>_0x548303['some'](_0x2d69be=>_0x2d69be)),_0x33b230['bind']('isVisible')['toMany'](_0x228854,'isVisible',(..._0xe807f2)=>_0xe807f2['some'](_0x167e46=>_0x167e46));};_0x33b230['panelPosition']='sw',_0x33b230['buttonView']['set']({'label':Et(this['locale'],'Show\x20more\x20items'),'icon':_0x206807});for(const _0x1392eb of this['items'])_0x25ffb0(_0x1392eb);return _0x549a40['add'](_0x2c2c4e),_0x33b230['listenTo'](this['items'],'add',(_0x5243e6,_0x50c8df,_0x37897b)=>{_0x25ffb0(_0x50c8df,_0x37897b);}),_0x33b230['listenTo'](this['items'],'remove',(_0xf81f5e,_0x36e3b8,_0x31a039)=>{_0x2c2c4e['items']['remove'](_0x31a039);}),_0x33b230;}_attachActions(_0x5e0142,_0x17eb83){const _0x36043e=_0x5e0142&&_0x5e0142['element'];_0x36043e&&(this['listenTo'](_0x36043e,'mouseenter',()=>this['actionIndicator']=_0x17eb83),this['listenTo'](_0x36043e,'focus',()=>this['actionIndicator']=_0x17eb83),this['listenTo'](_0x36043e,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x36043e,'blur',()=>this['actionIndicator']=null));}_createCommentInputView(){const _0x2af7f3=super['_createCommentInputView']();return _0x2af7f3['bind']('placeholder')['to'](this),_0x2af7f3;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}};function Xt(_0x1a756a){const _0x43a735=_0x7fc266(_0x1a756a,0x1e),_0x234012=new MutationObserver(_0x188ef6=>{for(const _0x3ebf4a of _0x188ef6)('attributes'==_0x3ebf4a['type']&&'class'==_0x3ebf4a['attributeName']||'childList'==_0x3ebf4a['type']||'characterData'==_0x3ebf4a['type'])&&_0x43a735();});return{'attach'(_0xbc30b0){_0x234012['observe'](_0xbc30b0,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x234012['disconnect'](),_0x43a735['cancel']();}};}var qt=class extends ht{['focusTracker'];['id'];keystrokes;content;['mainView'];_mutationObserver;constructor(_0x43029c,_0x552175){super(_0x43029c),this['id']=_0x3a3e70(),this['focusTracker']=new _0x8cfb02(),this['keystrokes']=new _0x2830c2(),this['keystrokes']['set']('Esc',(_0x14ca89,_0x5c5911)=>this['fire']('Esc',_0x5c5911)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=Xt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x552175),this['mainView']=_0x552175;const _0x3ed5b9=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x3ed5b9['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 _0x5652f1=this['element']['clientHeight'];_0x5652f1&&(this['height']=_0x5652f1);}};const jt=/* #__PURE__ -- @preserve */
29
- _0x50a872();var $t=class Annotation extends jt{['view'];focusableElements;_type;_target;constructor({view:_0x5b985f,target:_0x3e3eee,type:_0x5cc3c6,isVisible:_0x2d726d=!0x0}){super(),this['view']=_0x5b985f,this['view']['element']||this['view']['render'](),this['_type']=_0x5cc3c6,this['_target']=_0x3e3eee,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x5b969f([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x10c1c3,_0x18b174)=>{this['view']['focusTracker']['add'](_0x18b174);}),this['focusableElements']['on']('remove',(_0x168779,_0x1dadef)=>{this['view']['focusTracker']['remove'](_0x1dadef);}),this['set']('isVisible',_0x2d726d);}get type(){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get target(){const _0x45dc13=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x45dc13),_0x45dc13;}get targetRect(){const _0x22bb1a=this['target'];if(null===_0x22bb1a)return null;if(_0x22bb1a instanceof _0x429aef)return _0x22bb1a;const _0x3690f9=_0x22bb1a['filter'](_0x25d48d=>function(_0x31727f){return!!_0x31727f['offsetParent']||!!_0x31727f['getClientRects']()['item'](0x0);}(_0x25d48d));return 0x0===_0x3690f9['length']?null:_0x429aef['getDomElementRects'](_0x3690f9[0x0])[0x0];}get isActive(){return this['view']['isActive'];}set isActive(_0x3f1b62){this['view']['isActive']=_0x3f1b62,this['view']['mainView']['isActive']=_0x3f1b62;}updateTargetRect(){this['view']['targetRect']=this['targetRect'];}destroy(){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}refreshVisibility(){this['isVisible']=!!this['targetRect'];}static _assertCorrectTarget(_0x237485){if(!(null===_0x237485||_0x237485 instanceof _0x429aef||Array['isArray'](_0x237485)&&_0x237485['every'](_0x30e387=>zt(_0x30e387))))throw new _0x2e165a('annotation-invalid-target',null,{'target':_0x237485});}_getNormalizedTarget(){const _0x50fe35='function'==typeof this['_target']?this['_target']():this['_target'];return zt(_0x50fe35)?[_0x50fe35]:_0x50fe35;}};function zt(_0x52bfb1){return null!==_0x52bfb1&&'object'==typeof _0x52bfb1&&'nodeType'in _0x52bfb1&&0x1===_0x52bfb1['nodeType'];}var Jt=class extends _0x5b969f{_innerViewToAnnotation;_viewToAnnotation;['_focusTracker'];constructor(_0x91b59c=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x8cfb02(),this['_focusTracker']['on']('change:isFocused',(_0x5a7f16,_0x41b87f,_0x336e4b)=>{_0x336e4b||this['fire']('blur');});for(const _0x18c974 of _0x91b59c)this['add'](_0x18c974);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x735b95){if(this['has'](_0x735b95))throw new _0x2e165a('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x735b95['innerView'],_0x735b95),this['_viewToAnnotation']['set'](_0x735b95['view'],_0x735b95);for(const _0x4c6328 of _0x735b95['focusableElements'])this['_focusTracker']['add'](_0x4c6328);if(this['listenTo'](_0x735b95['focusableElements'],'add',(_0x49d7d2,_0x48ee7c)=>{this['_focusTracker']['add'](_0x48ee7c);}),this['listenTo'](_0x735b95['focusableElements'],'remove',(_0x4c33f1,_0x5a0ea1)=>{this['_focusTracker']['remove'](_0x5a0ea1);}),this['listenTo'](_0x735b95['view']['focusTracker'],'change:isFocused',(_0xae2c87,_0x126ed0,_0x4353f3)=>{_0x4353f3&&this['fire']('focus',_0x735b95);}),_0x735b95['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0xccf7c0 of this)_0xccf7c0['updateTargetRect']();}const _0x5d2d51=this['_getOrderInContent'](_0x735b95['view']['targetRect']);return super['add'](_0x735b95,_0x5d2d51);}['remove'](_0x1459f6){if(!this['has'](_0x1459f6))throw new _0x2e165a('annotationcollection-not-existing-item',null);this['stopListening'](_0x1459f6['view']['focusTracker']),this['stopListening'](_0x1459f6['focusableElements']);for(const _0x296cff of _0x1459f6['focusableElements'])this['_focusTracker']['remove'](_0x296cff);return this['_viewToAnnotation']['delete'](_0x1459f6['view']),this['_innerViewToAnnotation']['delete'](_0x1459f6['innerView']),super['remove'](_0x1459f6);}getByInnerView(_0x4918a4){return this['_innerViewToAnnotation']['get'](_0x4918a4);}getByView(_0x2d9d37){return this['_viewToAnnotation']['get'](_0x2d9d37);}destroy(){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}refreshPositioning(){for(const _0x2db3b3 of this)_0x2db3b3['updateTargetRect']();this['_sort']();}_sort(){const _0x56681c=Array['from'](this)['sort']((_0x26d5e2,_0x29831d)=>Zt(_0x26d5e2['view']['targetRect'],_0x29831d['view']['targetRect']));for(let _0x58141f=_0x56681c['length']-0x1;_0x58141f>0x0;_0x58141f--){const _0x5a612e=_0x56681c[_0x58141f];_0x58141f!==this['getIndex'](_0x5a612e)&&(this['remove'](_0x5a612e),this['add'](_0x5a612e));}}_getOrderInContent(_0x2ae6c1){let _0xb042e=0x0;if(!_0x2ae6c1)return this['length'];for(const _0x437286 of this){const _0x3d2b3f=_0x437286['view']['targetRect'];if(_0x3d2b3f){if(Zt(_0x2ae6c1,_0x3d2b3f)<0x0)return _0xb042e;_0xb042e++;}}return _0xb042e;}_areCachedRectsStale(){const _0x7c661c=this['get'](0x0);if(!_0x7c661c)return!0x1;const _0x3e4688=_0x7c661c['view']['targetRect'],_0x4d83fe=_0x7c661c['targetRect'];return!(!_0x3e4688||!_0x4d83fe)&&(_0x3e4688['top']!==_0x4d83fe['top']||_0x3e4688['left']!==_0x4d83fe['left']);}};function Qt({source:_0x2da6b3,target:_0x35e84f,filter:_0x140d5e}){for(const _0x5bfa17 of _0x2da6b3)_0x140d5e(_0x5bfa17)&&_0x35e84f['add'](_0x5bfa17);_0x35e84f['listenTo'](_0x2da6b3,'add',(_0xcd3126,_0x1d9d95)=>{_0x140d5e(_0x1d9d95)&&_0x35e84f['add'](_0x1d9d95);}),_0x35e84f['listenTo'](_0x2da6b3,'remove',(_0x599d2c,_0x501b4e)=>{_0x35e84f['has'](_0x501b4e)&&_0x35e84f['remove'](_0x501b4e);});}function Zt(_0x492c32,_0xdf2b3c){if(null===_0x492c32&&null===_0xdf2b3c)return 0x0;if(null===_0x492c32)return-0x1;if(null===_0xdf2b3c)return 0x1;const _0x53736c=_0x492c32['top']-_0xdf2b3c['top'];return 0x0==_0x53736c?_0x492c32['left']-_0xdf2b3c['left']:_0x53736c;}var ti=class extends _0x294fbc{collection;_visibleAnnotations;static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x511c50){if(super(_0x511c50),this['collection']=new Jt(),this['_visibleAnnotations']=new Jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x511c50 instanceof _0x30ed75){const _0x3a5819=_0x511c50['locale'];_0x511c50['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':Et(_0x3a5819,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':Et(_0x3a5819,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':Et(_0x3a5819,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':Et(_0x3a5819,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':Et(_0x3a5819,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':Et(_0x3a5819,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':Et(_0x3a5819,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x1e1bd0){this['collection']['add'](_0x1e1bd0);}['remove'](_0x4e0310){this['collection']['remove'](_0x4e0310),_0x4e0310['destroy']();}refreshVisibility(){for(const _0x573eb7 of this['collection'])_0x573eb7['refreshVisibility']();}refreshPositioning(){this['_visibleAnnotations']['refreshPositioning']();}getByInnerView(_0x4c4981){return this['collection']['getByInnerView'](_0x4c4981);}deactivateAll(){this['fire']('_deactivateAllAnnotations');}destroy(){for(const _0x9842c0 of this['collection'])_0x9842c0['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}activate(_0x11ac67){this['fire']('_activateAnnotation',_0x11ac67);}createAnnotation(_0x310ca0){return new $t(_0x310ca0);}createAnnotationView(_0x2a6bff,_0x4af31f){return new qt(_0x2a6bff,_0x4af31f);}_addActiveAnnotation(_0x352b8a){const _0x335b3b=new Set(this['activeAnnotations']);_0x335b3b['add'](_0x352b8a),this['activeAnnotations']=_0x335b3b;}_removeActiveAnnotation(_0x37745e){const _0x18952f=new Set(this['activeAnnotations']);_0x18952f['delete'](_0x37745e),this['activeAnnotations']=_0x18952f;}_bindAnnotationsToVisibleAnnotations(){const _0x443d37=this['collection'],_0x58904c=this['_visibleAnnotations'];function _0x5b089d(_0x5efe98){const _0x493b96=_0x5efe98['source'];_0x493b96['isVisible']&&!_0x58904c['has'](_0x493b96)?_0x58904c['add'](_0x493b96):!_0x493b96['isVisible']&&_0x58904c['has'](_0x493b96)&&_0x58904c['remove'](_0x493b96),_0x493b96['view']['focusTracker']['remove'](_0x493b96['view']['element']),_0x493b96['view']['focusTracker']['add'](_0x493b96['view']['element']);}this['listenTo'](_0x443d37,'add',(_0x3b695e,_0x148c16)=>{_0x148c16['isVisible']&&_0x58904c['add'](_0x148c16),this['listenTo'](_0x148c16,'change:isVisible',_0x5b089d);}),this['listenTo'](_0x443d37,'remove',(_0x34edcc,_0x21349e)=>{_0x58904c['has'](_0x21349e)&&_0x58904c['remove'](_0x21349e),this['stopListening'](_0x21349e,'change:isVisible',_0x5b089d);});}_setupEnterAnnotationKeystroke(){const _0x10a1c6=_0x1452d5=>{_0x1452d5['on']('ready',()=>{_0x1452d5['keystrokes']['set'](_0x24b6ae,(_0x4aee35,_0x384502)=>{const _0x499b1e=_0x28cbc5(this['activeAnnotations']['values']());_0x499b1e&&(_0x499b1e['view']['focus'](),_0x384502());});});};this['context']instanceof _0x30ed75?_0x10a1c6(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x2b719a,_0xcfd15a)=>{_0x10a1c6(_0xcfd15a);});}_setupEscapeAnnotationHandling(){const _0x3983eb=_0x388709=>{const _0x57b3c3=_0x388709['source'],_0x583f4f=[];let _0x77f569;if(Array['isArray'](_0x57b3c3['target'])){_0x77f569=_0x57b3c3['target'][0x0],this['context']instanceof _0x30ed75?_0x583f4f['push'](this['context']):this['context']['editors']&&_0x583f4f['push'](...this['context']['editors']);for(const _0x28686c of _0x583f4f)for(const _0x1e1bcc of _0x28686c['editing']['view']['domRoots']['values']())if(_0x1e1bcc['contains'](_0x77f569))return void _0x28686c['editing']['view']['focus']();_0x77f569['focus']();}};this['listenTo'](this['collection'],'add',(_0x3bd832,_0x458b08)=>{this['listenTo'](_0x458b08,'escape',_0x3983eb,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x2fc335,_0x4a4b66)=>{this['stopListening'](_0x4a4b66,'escape',_0x3983eb);});}};const ii=Symbol('noChannel'),ei={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},si=/* #__PURE__ -- @preserve */
30
- _0x50a872(),ni=/* #__PURE__ -- @preserve */
31
- _0x50a872();var oi=class extends _0x294fbc{_threads;_threadToController;_viewToController;static get requires(){return[ti,_0xfa5115,_0x22cb09];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xe309b4){super(_0xe309b4),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x4c1340=this['context']['config'];_0x4c1340['define']('comments.maxCommentsWhenCollapsed',0x2),_0x4c1340['define']('comments.maxThreadTotalWeight',0x1f4),_0x4c1340['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x4c1340['define']('comments.CommentThreadView',Ut),_0x4c1340['define']('comments.CommentView',Yt),_0x4c1340['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}init(){const _0x4742c7=this['context']['plugins']['get'](ti);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x647c1c,_0x1a71d9)=>this['_addCommentThread'](_0x1a71d9)),this['on']('submitCommentThread',(_0x50d659,_0x54f364)=>this['_submitCommentThread'](_0x54f364)),this['on']('resolveCommentThread',(_0x180891,_0x4a0581)=>this['_resolveCommentThread'](_0x4a0581)),this['on']('resolveCommentThread',(_0x2b973d,_0x3bd36)=>this['_updateActiveAnnotation'](_0x3bd36),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x5dfd75,_0x1be35a)=>this['_reopenCommentThread'](_0x1be35a)),this['on']('reopenCommentThread',(_0x545d60,_0x1a96cf)=>this['_updateActiveAnnotation'](_0x1a96cf),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x4cb997,_0x385782)=>this['_removeCommentThread'](_0x385782)),this['on']('updateCommentThread',(_0x572d52,_0x125f96)=>this['_updateCommentThread'](_0x125f96)),this['on']('updateCommentThread',(_0x32c0fa,_0x31e7e4)=>this['_updateActiveAnnotation'](_0x31e7e4),{'priority':'lowest'}),this['on']('addComment',(_0x430bc6,_0x3564ef)=>this['_addComment'](_0x3564ef)),this['on']('updateComment',(_0x4856b8,_0x7443d8)=>this['_updateComment'](_0x7443d8)),this['on']('removeComment',(_0x520176,_0x1f4807)=>this['_removeComment'](_0x1f4807)),this['on']('addComment',(_0x499d2f,{threadId:_0x22a25c,isFromAdapter:_0x4c20f3})=>{if(_0x4c20f3)return;const _0xce7828=this['getCommentThread'](_0x22a25c),_0x23cd93=_0xce7828&&this['_threadToController']['get'](_0xce7828);_0x23cd93&&_0x23cd93['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x4742c7,'change:activeAnnotations',(_0x3eb3ff,_0x13a473,_0x700954)=>{const _0xf49a0c=Array['from'](_0x700954)['map'](_0x11f97a=>this['_viewToController']['get'](_0x11f97a['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0xf49a0c?_0xf49a0c['model']:null;});}set adapter(_0x209254){if(this['_adapter'])throw new _0x2e165a('commentsrepository-adapter-already-set');this['_adapter']=_0x209254;}get adapter(){return this['_adapter'];}addCommentThread({channelId:_0x19d6c9=ii,threadId:_0x602b40=_0x3a3e70(),comments:_0x524223=[],unlinkedAt:_0x221fda=null,resolvedAt:_0x48d948=null,resolvedBy:_0x26227e=null,target:_0x39a259=null,context:_0x519d85=null,attributes:_0x24d21f={},isResolvable:_0x56888b=!0x0,isSubmitted:_0x9b54ee=!0x1,isFromAdapter:_0x3727d5=!0x1}={}){return this['fire'](ai('addCommentThread',_0x19d6c9),{'channelId':_0x19d6c9,'threadId':_0x602b40,'comments':_0x524223,'unlinkedAt':_0x221fda,'resolvedAt':_0x48d948,'resolvedBy':_0x26227e,'target':_0x39a259,'context':_0x519d85,'attributes':_0x24d21f,'isFromAdapter':_0x3727d5,'isResolvable':_0x56888b,'isSubmitted':_0x9b54ee}),this['getCommentThread'](_0x602b40);}openNewCommentThread({channelId:_0x5999d4=ii,threadId:_0x8ed958=_0x3a3e70(),target:_0x4d6aeb,context:_0x4ca1a9=null,isResolvable:_0x4d9201=!0x0}){if(this['_readOnlyChannels']['has'](_0x5999d4)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x4d6aeb)throw new _0x2e165a('commentsrepository-missing-target');const _0x5e3ee9=this['addCommentThread']({'channelId':_0x5999d4,'threadId':_0x8ed958,'target':_0x4d6aeb,'context':_0x4ca1a9,'isResolvable':_0x4d9201});if(!_0x5e3ee9)return null;const _0x23b974=this['_threadToController']['get'](_0x5e3ee9),_0x2652ab=_0x23b974['view']['commentThreadInputView']['commentInputView'],_0x5bf51c=this['context']['plugins']['get'](ti),_0xca4b=_0x5bf51c['getByInnerView'](_0x23b974['view']);return _0x5bf51c['activate'](_0xca4b),_0x2652ab['once']('editorReady',()=>_0x2652ab['focus']()),_0x5e3ee9;}hasCommentThread(_0x1c0ee0){if('string'!=typeof _0x1c0ee0)throw new _0x2e165a('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x1c0ee0);}updateCommentThread({channelId:_0x45f1ca=ii,threadId:_0x40eef1,context:_0x468261,unlinkedAt:_0x37f06b,attributes:_0x42b31d,isFromAdapter:_0x147d3b=!0x1}){return this['fire'](ai('updateCommentThread',_0x45f1ca),{'channelId':_0x45f1ca,'threadId':_0x40eef1,'context':_0x468261,'unlinkedAt':_0x37f06b,'attributes':_0x42b31d,'isFromAdapter':_0x147d3b}),this['getCommentThread'](_0x40eef1);}getCommentThread(_0x106f0d){if('string'!=typeof _0x106f0d)throw new _0x2e165a('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x106f0d);}fetchCommentThread({channelId:_0x59d841,threadId:_0x437d2f}={}){const _0x1fd4d4=this['getCommentThread'](_0x437d2f);if(_0x1fd4d4)return Promise['resolve'](_0x1fd4d4);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x2e165a('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x59d841,'threadId':_0x437d2f})['then'](_0x481c16=>this['hasCommentThread'](_0x437d2f)?this['getCommentThread'](_0x437d2f):_0x481c16?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x59d841},_0x481c16)):void 0x0)['catch'](_0xf43be0=>{throw console['error'](_0xf43be0),new _0x2e165a('commentsrepository-fetch-comment-thread',this['context']);});}getCommentThreads({channelId:_0x541123,skipNotAttached:_0x17d827=!0x1,skipEmpty:_0x3fcb46=!0x1,toJSON:_0x23e503=!0x1}={}){const _0x3ecf0d=[];for(const _0x5352c5 of this['_threads']['values']())_0x541123&&_0x5352c5['channelId']!==_0x541123||_0x17d827&&!_0x5352c5['isAttached']||_0x3fcb46&&0x0===_0x5352c5['length']||_0x3ecf0d['push'](_0x5352c5);return _0x23e503?_0x3ecf0d['map'](_0x34e82d=>_0x34e82d['toJSON']()):_0x3ecf0d;}getAnnotationForCommentThread(_0x329374){const _0x404dab=this['_threadToController']['get'](_0x329374);return _0x404dab&&this['context']['plugins']['get'](ti)['getByInnerView'](_0x404dab['view'])||null;}getCommentThreadForAnnotation(_0x3beb50){const _0x107058=this['_viewToController']['get'](_0x3beb50['innerView']);return _0x107058?_0x107058['model']:null;}setActiveCommentThread(_0x47cf76){const _0x251ce3=this['context']['plugins']['get'](ti);if(!_0x47cf76)return void(this['activeCommentThread']&&_0x251ce3['deactivateAll']());const _0x32c352=this['getCommentThread'](_0x47cf76);if(!_0x32c352)throw new _0x2e165a('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x47cf76});if(!this['_threadToController']['has'](_0x32c352))throw new _0x2e165a('commentsrepository-active-not-attached',null,{'threadId':_0x47cf76});const _0x32fee8=_0x251ce3['getByInnerView'](this['_threadToController']['get'](_0x32c352)['view']);_0x251ce3['activate'](_0x32fee8);}switchReadOnly(_0x103182,_0x4b8e8c){_0x103182?this['_readOnlyChannels']['add'](_0x4b8e8c):this['_readOnlyChannels']['delete'](_0x4b8e8c),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0xb4906b){return this['_readOnlyChannels']['has'](_0xb4906b)||this['_readOnlyChannels']['has'](void 0x0);}createCommentThreadController(_0x570631,_0x3cb070){return new bt(_0x570631,_0x3cb070);}setPermissions(_0x3ce6d2,_0x2aeb9b=ii){this['_permissions']['set'](_0x2aeb9b,_0x3ce6d2),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}getPermissions(_0x68645a=ii){return this['_permissions']['has'](_0x68645a)?this['_permissions']['get'](_0x68645a):ei;}_addCommentThread({channelId:_0x284162,threadId:_0x238369,comments:_0x5ca1c6,unlinkedAt:_0x412a35,resolvedAt:_0x1a8e0c,resolvedBy:_0x5b479b,target:_0x32475e,context:_0x13f2b7,attributes:_0x23be6f,isFromAdapter:_0x2bb495,isResolvable:_0x4ea4f4,isSubmitted:_0x2ce412}){if('string'!=typeof _0x238369)throw new _0x2e165a('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x238369});if(this['hasCommentThread'](_0x238369))throw new _0x2e165a('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x238369});const _0x23bf49=new ri(this,{'channelId':_0x284162,'id':_0x238369,'context':_0x13f2b7,'attributes':_0x23be6f,'unlinkedAt':_0x412a35,'resolvedAt':_0x1a8e0c,'resolvedBy':_0x5b479b?this['context']['plugins']['get'](_0x22cb09)['getUser'](_0x5b479b):null,'isResolvable':_0x4ea4f4,'isSubmitted':_0x2ce412||_0x2bb495});this['_threads']['set'](_0x238369,_0x23bf49);for(const _0x294c13 of _0x5ca1c6)_0x23bf49['_add'](this['_createNewComment']({'threadId':_0x238369,..._0x294c13}));return _0x32475e&&_0x23bf49['attachTo'](_0x32475e),_0x2bb495||!_0x23bf49['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x284162,'threadId':_0x238369});}_submitCommentThread({channelId:_0x539c4e,threadId:_0x4b9adb}){if(!this['hasCommentThread'](_0x4b9adb))throw new _0x2e165a('commentsrepository-missing-comment-thread',this);const _0x166b1e=this['getCommentThread'](_0x4b9adb);if(_0x166b1e['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x40c4f9,comments:_0x5acf3a,resolvedAt:_0xe946d2,resolvedBy:_0x478c95,context:_0x2a3b00,attributes:_0x51123c}=_0x166b1e,_0x14727a=this['context']['plugins']['get']('PendingActions'),_0x3e97ce=_0x14727a['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x539c4e,'threadId':_0x40c4f9,'comments':_0x5acf3a['map'](_0x33c99d=>_0x33c99d['toJSON']()),'resolvedAt':_0xe946d2,'resolvedBy':_0x478c95?_0x478c95['id']:_0x478c95,'context':_0x2a3b00,'attributes':_0x51123c})['then'](({comments:_0x400ee5})=>{_0x14727a['remove'](_0x3e97ce);for(const _0x17d454 of _0x400ee5)this['_updateComment']({'channelId':_0x539c4e,'threadId':_0x4b9adb,'commentId':_0x17d454['commentId'],'createdAt':_0x17d454['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x34e707=>{throw console['error'](_0x34e707),new _0x2e165a('commentsrepository-add-comment-thread-internal-error',this);});}_attachCommentThread({threadId:_0x358e5f,target:_0x1c92da}){const _0x52852e=this['getCommentThread'](_0x358e5f);if(!_0x52852e)throw new _0x2e165a('commentsrepository-attach-missing-comment-thread',this);const _0xdcd33e=this['context']['plugins']['get']('PendingActions'),_0x33a567=this['context']['plugins']['get'](ti),_0x29c6bd=this['_createCommentThreadView'](_0x52852e),_0x243811=new bt(_0x52852e,_0x29c6bd);let _0x24a916=null;_0x29c6bd['on']('change:isDirty',(_0x57847d,_0x4e7a09,_0x4b64d4)=>{_0x4b64d4?_0x24a916=_0xdcd33e['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x24a916&&(_0xdcd33e['remove'](_0x24a916),_0x24a916=null);}),this['_threadToController']['set'](_0x52852e,_0x243811),this['_viewToController']['set'](_0x29c6bd,_0x243811);const _0x19336a=new qt(this['context']['locale'],_0x29c6bd);_0x19336a['bind']('length')['to'](_0x29c6bd),_0x19336a['bind']('isDirty')['to'](_0x29c6bd,'isDirty',_0x29c6bd,'length',(_0x4cdeb7,_0x2cf74a)=>_0x4cdeb7||!_0x2cf74a),_0x19336a['bind']('isActive')['to'](_0x29c6bd),_0x19336a['type']='comment';const _0x3778fc=new $t({'view':_0x19336a,'target':_0x1c92da,'type':'comment','isVisible':!_0x52852e['archivedAt']&&!!('function'==typeof _0x1c92da?_0x1c92da():_0x1c92da)});return _0x29c6bd['on']('escape',()=>{_0x3778fc['fire']('escape');}),this['_bindAnnotationToEditors'](_0x29c6bd,_0x3778fc),_0x33a567['add'](_0x3778fc),_0x3778fc;}_bindAnnotationToEditors(_0x2b32b4,_0x2dd605){this['listenTo'](_0x2b32b4,'editorReady',(_0x224213,_0x4bd48f)=>{const _0x5f2d35=_0x4bd48f['ui']['view']['body']['bodyCollectionContainer'];_0x2dd605['focusableElements']['add'](_0x5f2d35),this['context']instanceof _0x30ed75&&this['context']['ui']['focusTracker']['add'](_0x5f2d35);},{'priority':'highest'}),this['listenTo'](_0x2b32b4,'editorDestroyed',(_0x279733,_0x4eacac)=>{const _0x14c054=_0x4eacac['ui']['view']['body']['bodyCollectionContainer'];_0x2dd605['focusableElements']['has'](_0x14c054)&&_0x2dd605['focusableElements']['remove'](_0x14c054),this['context']instanceof _0x30ed75&&this['context']['ui']['focusTracker']['remove'](_0x14c054);});}_unbindEditors(_0x1d748b){this['stopListening'](_0x1d748b,'editorReady'),this['stopListening'](_0x1d748b,'editorDestroyed');}_createCommentThreadView(_0x305955){const _0x483e09=this['context']['plugins']['get'](_0x22cb09),{config:_0x250d8c,locale:_0x2e7130}=this['context'],_0x5eda9e=_0x4ad7b7(_0x250d8c['get']('locale'),_0x2e7130);return new(0x0,(_0x250d8c['get']('comments'))['CommentThreadView'])(_0x2e7130,_0x305955,_0x483e09['me'],{'editorConfig':{..._0x250d8c['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x250d8c['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x250d8c['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x250d8c['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x250d8c['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x5eda9e,'CommentView':_0x250d8c['get']('comments')['CommentView']});}_resolveCommentThread({threadId:_0x5319de,channelId:_0x8de270,resolvedAt:_0x2c3bca,resolvedBy:_0x19533b,isFromAdapter:_0x153124}){if(!this['hasCommentThread'](_0x5319de))throw new _0x2e165a('commentsrepository-missing-comment-thread',null,{'threadId':_0x5319de});const _0x5e3699=this['getCommentThread'](_0x5319de);if(_0x5e3699['isResolved'])throw new _0x2e165a('commentsrepository-resolved-comment-thread',null,{'threadId':_0x5319de});const _0x41ec71=this['context']['plugins']['get'](_0x22cb09);if(_0x5e3699['resolvedBy']=_0x41ec71['getUser'](_0x19533b),_0x5e3699['resolvedAt']=_0x2c3bca,_0x153124||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x33856a=this['context']['plugins']['get']('PendingActions'),_0xda8c53=_0x33856a['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x8de270,'threadId':_0x5319de})['then'](({resolvedAt:_0x3aba09,resolvedBy:_0x36430c})=>{_0x33856a['remove'](_0xda8c53),_0x5e3699['resolvedBy']['id']!==_0x36430c&&(_0x5e3699['resolvedBy']=_0x41ec71['getUser'](_0x36430c)),_0x5e3699['resolvedAt']=_0x3aba09;})['catch'](_0x581c83=>{throw console['error'](_0x581c83),new _0x2e165a('commentsrepository-resolve-comment-thread-internal-error',this);});}_reopenCommentThread({threadId:_0x836a0f,channelId:_0x1cb78b,isFromAdapter:_0x27faeb}){if(!this['hasCommentThread'](_0x836a0f))throw new _0x2e165a('commentsrepository-missing-comment-thread',null,{'threadId':_0x836a0f});const _0x5d26be=this['getCommentThread'](_0x836a0f);if(!_0x5d26be['isResolved'])throw new _0x2e165a('commentsrepository-reopen-comment-thread',null,{'threadId':_0x836a0f});if(_0x5d26be['resolvedBy']=null,_0x5d26be['resolvedAt']=null,_0x27faeb||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x3d1906=this['context']['plugins']['get']('PendingActions'),_0x518f19=_0x3d1906['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x1cb78b,'threadId':_0x836a0f})['then'](()=>_0x3d1906['remove'](_0x518f19))['catch'](_0x2f8c43=>{throw console['error'](_0x2f8c43),new _0x2e165a('commentsrepository-reopen-comment-thread-internal-error',this);});}_removeCommentThread({threadId:_0x211871,isFromAdapter:_0x31f1fb}){const _0x33ae68=this['getCommentThread'](_0x211871);if(!_0x33ae68)throw new _0x2e165a('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x211871),this['_threads']['delete'](_0x211871),!_0x33ae68['isSubmitted']||_0x31f1fb||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x2ed360=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1ae7c4}=_0x33ae68,_0x9d4a66=_0x2ed360['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x1ae7c4,'threadId':_0x211871})['then'](()=>_0x2ed360['remove'](_0x9d4a66))['catch'](_0x1682c6=>{throw console['error'](_0x1682c6),new _0x2e165a('commentsrepository-remove-comment-thread-internal-error',this);});}_updateCommentThread({threadId:_0x250f09,unlinkedAt:_0x55a6b9,context:_0x13e7a3,attributes:_0x359f4d,isFromAdapter:_0x34e060}){if('string'!=typeof _0x250f09)throw new _0x2e165a('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x250f09});if(!this['hasCommentThread'](_0x250f09))throw new _0x2e165a('commentsrepository-missing-comment-thread',null,{'threadId':_0x250f09});const _0x430771=this['getCommentThread'](_0x250f09);let _0x2378ba=!0x1;if(void 0x0!==_0x13e7a3&&_0x430771['context']!==_0x13e7a3&&(_0x430771['context']=_0x13e7a3,_0x2378ba=!0x0),void 0x0!==_0x55a6b9&&_0x430771['unlinkedAt']!==_0x55a6b9&&(_0x430771['unlinkedAt']=_0x55a6b9,_0x2378ba=!0x0),_0x359f4d&&!_0x169581(_0x359f4d,_0x430771['attributes'])&&(_0x430771['attributes']=_0x359f4d,_0x2378ba=!0x0),!_0x2378ba)return Promise['resolve']();if(!_0x430771['isSubmitted']||_0x34e060||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x15d929=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1934ae}=_0x430771,_0x2e2d36=_0x15d929['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x1934ae,'threadId':_0x250f09,'context':_0x13e7a3,'unlinkedAt':_0x55a6b9,'attributes':_0x359f4d})['then'](()=>_0x15d929['remove'](_0x2e2d36))['catch'](_0x420776=>{throw console['error'](_0x420776),new _0x2e165a('commentsrepository-update-comment-thread-internal-error',this);});}_detachCommentThread(_0xd5a303){const _0x4551fb=this['context']['plugins']['get'](ti),_0x5454d2=this['getCommentThread'](_0xd5a303);if(_0x5454d2['_isAttached']=!0x1,this['_threadToController']['has'](_0x5454d2)){const _0x31e435=this['_threadToController']['get'](_0x5454d2),_0x523013=_0x31e435['view'],_0x3ff4e6=_0x4551fb['getByInnerView'](_0x523013);this['_threadToController']['delete'](_0x5454d2),this['_viewToController']['delete'](_0x523013),_0x3ff4e6&&_0x4551fb['remove'](_0x3ff4e6),_0x31e435['destroy'](),_0x523013['destroy']()['then'](()=>{this['_unbindEditors'](_0x523013);});}}_updateActiveAnnotation({threadId:_0x4eb59d,resolvedAt:_0x2eda90,unlinkedAt:_0x3f6322}){const _0x503771=!!_0x2eda90,_0x248d62=this['context']['plugins']['get'](ti),_0xb3ac0b=this['getCommentThread'](_0x4eb59d);if(this['_threadToController']['has'](_0xb3ac0b)){const _0x502420=this['_threadToController']['get'](_0xb3ac0b)['view'],_0x4c8066=_0x248d62['getByInnerView'](_0x502420);_0x4c8066&&(_0x503771&&_0x248d62['_removeActiveAnnotation'](_0x4c8066),_0x3f6322?_0x4c8066['isVisible']=!0x1:_0x4c8066['refreshVisibility']());}}_getExternalAuthor(_0x2441f2){const _0x551a8c=this['context']['plugins']['get'](_0x22cb09),_0x334946=_0xf4c31f('external:'+_0x2441f2),_0x3b1abe=_0x551a8c['getUser'](_0x334946);return _0x3b1abe||_0x551a8c['addUser']({'id':_0x334946,'name':_0x2441f2});}_createNewComment({threadId:_0x2a1b97,commentId:_0x3e5760=_0x3a3e70(),content:_0x41c741,authorId:_0x3b6ee6,createdAt:_0x2875f5,attributes:_0x5bf278}){if('string'!=typeof _0x3e5760)throw new _0x2e165a('commentsrepository-invalid-commentid');if('string'!=typeof _0x3b6ee6)throw new _0x2e165a('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x41c741||!_0x41c741['trim']())throw new _0x2e165a('commentsrepository-invalid-comment-content');const _0x118e90=this['context']['plugins']['get'](_0x22cb09)['getUser'](_0x3b6ee6);if(!_0x118e90)throw new _0x2e165a('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x3b6ee6});let _0x1f283d=null,_0x92e197=_0x2875f5;return _0x5bf278?.['@external']&&(_0x1f283d=this['_getExternalAuthor'](_0x5bf278['@external']['authorName']),_0x92e197=new Date(_0x5bf278['@external']['createdAt'])),new hi(this,{'threadId':_0x2a1b97,'id':_0x3e5760,'author':_0x1f283d||_0x118e90,'creator':_0x118e90,'content':_0x41c741,'createdAt':_0x2875f5,'authoredAt':_0x92e197,'attributes':_0x5bf278});}_addComment(_0x27fe82){let {threadId:_0x90a13e,content:_0x510c51,attributes:_0x5b2cda,isFromAdapter:_0x240d8f}=_0x27fe82;const _0x12e3c8=this['getCommentThread'](_0x27fe82['threadId']);if(!_0x12e3c8)throw new _0x2e165a('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x292c02=this['_createNewComment'](_0x27fe82),{id:_0x45a26d}=_0x292c02;if(_0x12e3c8['_add'](_0x292c02),_0x240d8f||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x12e3c8['isSubmitted'])return Promise['resolve']();const _0x6718ed=this['context']['plugins']['get']('PendingActions'),{channelId:_0x334d20}=_0x12e3c8,_0x206ffc=_0x6718ed['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x5b2cda||(_0x5b2cda={}),this['adapter']['addComment']({'channelId':_0x334d20,'threadId':_0x90a13e,'commentId':_0x45a26d,'content':_0x510c51,'attributes':_0x5b2cda})['then'](_0x54eb10=>{_0x6718ed['remove'](_0x206ffc),_0x54eb10&&this['_updateComment']({'channelId':_0x334d20,'threadId':_0x90a13e,'commentId':_0x45a26d,'createdAt':_0x54eb10['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x15974b=>{throw console['error'](_0x15974b),new _0x2e165a('commentsrepository-add-comment-internal-error',this);});}_updateComment({threadId:_0xbb7648,commentId:_0x29592b,content:_0x5f06e4,createdAt:_0x108c7f,attributes:_0x17e20e,isFromAdapter:_0x15ed65}){if(void 0x0!==_0x5f06e4&&('string'!=typeof _0x5f06e4||!_0x5f06e4['trim']()['length']))throw new _0x2e165a('commentsrepository-update-comment-invalid-content');const _0x5302d1=this['getCommentThread'](_0xbb7648),_0x5d319c=_0x5302d1['getComment'](_0x29592b);if(!_0x5d319c)throw new _0x2e165a('commentsrepository-update-missing-comment',this);let _0x20c816=!0x1;if(_0x5f06e4&&_0x5f06e4!==_0x5d319c['content']&&(_0x5d319c['isEditable']||_0x15ed65)&&(_0x5d319c['content']=_0x5f06e4,_0x20c816=!0x0),_0x108c7f&&_0x108c7f!==_0x5d319c['createdAt']&&(_0x5d319c['createdAt']=_0x108c7f,_0x5d319c['isExternal']||(_0x5d319c['authoredAt']=_0x108c7f),_0x20c816=!0x0),_0x17e20e&&!_0x169581(_0x17e20e,_0x5d319c['attributes'])&&(_0x5d319c['attributes']=_0x17e20e,_0x20c816=!0x0),!_0x20c816)return Promise['resolve']();if(_0x5302d1['fire']('commentUpdated'),_0x15ed65||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x11a06e=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1e524d}=this['getCommentThread'](_0x5d319c['threadId']),_0x373d7a=_0x11a06e['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x1e524d,'threadId':_0xbb7648,'commentId':_0x29592b,'content':_0x5f06e4,'attributes':_0x17e20e})['then'](()=>_0x11a06e['remove'](_0x373d7a))['catch'](_0x8e84cb=>{throw console['error'](_0x8e84cb),new _0x2e165a('commentsrepository-update-comment-internal-error',this);});}_removeComment({threadId:_0x3ae1b2,commentId:_0x3cefc8,isFromAdapter:_0x5eb492}){const _0x5c91d5=this['getCommentThread'](_0x3ae1b2),_0xf40186=_0x5c91d5['getComment'](_0x3cefc8);if(!_0xf40186)throw new _0x2e165a('commentsrepository-remove-missing-comment',this);if(_0x5c91d5['_remove'](_0xf40186),_0x5eb492||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x117f2a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x216217}=_0x5c91d5,_0x232c29=_0x117f2a['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x216217,'threadId':_0x3ae1b2,'commentId':_0x3cefc8})['then'](()=>_0x117f2a['remove'](_0x232c29))['catch'](_0x146696=>{throw console['error'](_0x146696),new _0x2e165a('commentsrepository-remove-comment-internal-error',this);});}},ri=class extends si{['channelId'];['id'];_isAttached;_isSubmitted;comments;_repository;constructor(_0x5b9d24,_0x3fa85c){super();const _0x51ee37=_0x3fa85c['isResolvable'];this['channelId']=_0x3fa85c['channelId'],this['id']=_0x3fa85c['id'],this['comments']=new _0x5b969f(),this['_repository']=_0x5b9d24,this['_isAttached']=!0x1,this['_isSubmitted']=_0x3fa85c['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x5b9d24,'_permissions',_0x5b9d24,'_readOnlyChannels',()=>_0x5b9d24['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x5b9d24,'_permissions',()=>_0x5b9d24['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x5b9d24,'_permissions',()=>{const _0x1efa2b=_0x5b9d24['getPermissions'](this['channelId']);return _0x1efa2b['write']||_0x1efa2b['admin'];}),this['bind']('isResolvable')['to'](_0x5b9d24,'_permissions',()=>_0x51ee37&&_0x5b9d24['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x3fa85c['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x51a730,_0x298d7b)=>_0x51a730?_0x298d7b?_0x51a730<_0x298d7b?_0x51a730:_0x298d7b:_0x51a730:_0x298d7b),this['set']('unlinkedAt',_0x3fa85c['unlinkedAt']||null),this['set']('resolvedAt',_0x3fa85c['resolvedAt']||null),this['set']('resolvedBy',_0x3fa85c['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x13c57e=>!!_0x13c57e),this['set']('attributes',_0x3fa85c['attributes']||{});}get weight(){return Array['from'](this['comments'])['reduce']((_0x234f41,_0x24b754)=>_0x234f41+_0x24b754['weight'],0x0);}get length(){return this['comments']['length'];}get isAttached(){return this['_isAttached'];}get isSubmitted(){return this['_isSubmitted'];}submit(){const {channelId:_0x1148ff,id:_0xf23da2}=this;this['_repository']['fire'](ai('submitCommentThread',_0x1148ff),{'channelId':_0x1148ff,'threadId':_0xf23da2});}setUnlinkedAt(_0x45f6e9){this['_update']({'unlinkedAt':_0x45f6e9});}['resolve']({resolvedAt:_0x12d726=new Date(),resolvedBy:_0x3212cd='',isFromAdapter:_0x5a69f4=!0x1}={}){const _0x26c066=this['_repository']['context']['plugins']['get'](_0x22cb09)['me'],{channelId:_0x48e4d0,id:_0x1a2bda}=this;this['_repository']['fire'](ai('resolveCommentThread',_0x48e4d0),{'channelId':_0x48e4d0,'threadId':_0x1a2bda,'resolvedAt':_0x12d726,'resolvedBy':_0x3212cd||_0x26c066['id'],'isFromAdapter':_0x5a69f4});}['reopen']({isFromAdapter:_0x4d9f40=!0x1}={}){const {channelId:_0x56e075,id:_0x3ac892}=this;this['_repository']['fire'](ai('reopenCommentThread',_0x56e075),{'channelId':_0x56e075,'threadId':_0x3ac892,'isFromAdapter':_0x4d9f40});}setContext(_0x416d87){this['context']||this['_update']({'context':_0x416d87});}setAttribute(_0x3e0e79,_0x1cd8db){const _0x58e37f=_0xf7f2a0(this['attributes']);_0x39ebb6(_0x58e37f,_0x3e0e79,_0x1cd8db),this['_update']({'attributes':_0x58e37f});}removeAttribute(_0x1127a0){const _0x461a37=_0xf7f2a0(this['attributes']);_0x35a747(_0x461a37,_0x1127a0),this['_update']({'attributes':_0x461a37});}['remove']({isFromAdapter:_0x2972ab=!0x1}={}){const {channelId:_0x2835af,id:_0x2e3601}=this;this['_repository']['fire'](ai('removeCommentThread',_0x2835af),{'channelId':_0x2835af,'threadId':_0x2e3601,'isFromAdapter':_0x2972ab});}attachTo(_0x24eb99){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x24eb99});}addComment(_0x3bd88d){const {channelId:_0xb06d8d,id:_0x4f470d}=this;this['_repository']['fire'](ai('addComment',_0xb06d8d,_0x4f470d),Object['assign']({'channelId':_0xb06d8d,'threadId':_0x4f470d},_0x3bd88d));}getComment(_0x3f9d61){if('string'!=typeof _0x3f9d61)throw new _0x2e165a('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x3f9d61});return this['comments']['get'](_0x3f9d61);}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'](_0x318df8=>_0x318df8['toJSON']()),'attributes':this['attributes']};}['_add'](_0x17de5e){return this['listenTo'](_0x17de5e,'change:authoredAt',()=>{const _0x2ea237=this['_findOptimalIndex'](_0x17de5e),_0x5abadc=this['comments'];_0x2ea237-0x1!=_0x5abadc['getIndex'](_0x17de5e)&&_0x2ea237+0x1!=_0x5abadc['getIndex'](_0x17de5e)&&(this['_remove'](_0x17de5e),this['_add'](_0x17de5e));}),this['comments']['add'](_0x17de5e,this['_findOptimalIndex'](_0x17de5e));}_update(_0x6f611a){const {channelId:_0x5b604c,id:_0x184cb3}=this;this['_repository']['fire'](ai('updateCommentThread',_0x5b604c),{..._0x6f611a,'channelId':_0x5b604c,'threadId':_0x184cb3});}['_remove'](_0xb62fb1){return this['stopListening'](_0xb62fb1),_0xb62fb1['destroy'](),this['comments']['remove'](_0xb62fb1);}_findOptimalIndex(_0x3dbbc5){const _0x7c03a2=this['comments']['find'](_0x28818e=>new Date(_0x28818e['authoredAt'])['getTime']()>new Date(_0x3dbbc5['authoredAt'])['getTime']());return _0x7c03a2?this['comments']['getIndex'](_0x7c03a2):this['length'];}},hi=class extends ni{['id'];threadId;author;creator;createdAt;_repository;constructor(_0x2caf0e,_0x4edef8){super();const _0x133cd7=_0x2caf0e['context']['plugins']['get'](_0x22cb09)['me'],_0x4059e1=_0x2caf0e['getCommentThread'](_0x4edef8['threadId']),_0x168aea=0x0===_0x4059e1['comments']['length'],_0xbf06ea=_0x133cd7===_0x4edef8['author'];this['id']=_0x4edef8['id'],this['threadId']=_0x4edef8['threadId'],this['author']=_0x4edef8['author'],this['creator']=_0x4edef8['creator'],this['set']('content',_0x4edef8['content']),this['createdAt']=_0x4edef8['createdAt']||new Date(),this['set']('authoredAt',_0x4edef8['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x4059e1,'resolvedAt'),this['set']('attributes',_0x4edef8['attributes']||{}),this['bind']('isEditable')['to'](_0x2caf0e,'_permissions',()=>{const _0x170e6d=_0x2caf0e['getPermissions'](_0x4059e1['channelId'])['write'],_0x5c294c=_0x2caf0e['getPermissions'](_0x4059e1['channelId'])['modifyAll'];return _0xbf06ea&&_0x170e6d||!_0xbf06ea&&_0x5c294c;}),this['bind']('isRemovable')['to'](_0x4059e1,'isRemovable',_0x2caf0e,'_permissions',_0x153470=>{const _0x5f1b6f=_0x2caf0e['getPermissions'](_0x4059e1['channelId'])['write'],_0x4f1f89=_0x2caf0e['getPermissions'](_0x4059e1['channelId'])['modifyAll'];return _0xbf06ea&&_0x5f1b6f||_0x153470&&_0x168aea||!_0xbf06ea&&_0x4f1f89&&!_0x168aea;}),this['bind']('isReadOnly')['to'](_0x4059e1,'isReadOnly'),this['_repository']=_0x2caf0e;}get isExternal(){return Boolean(this['attributes']&&this['attributes']['@external']);}get weight(){return Math['max'](function(_0x3a6108){const _0x987892=document['createElement']('div');return _0x987892['innerHTML']=_0x3a6108,_0x987892['textContent']['length'];}(this['content']),0xc8);}update(_0x8f183a){const {threadId:_0x53d266,id:_0xc1ce22}=this;if(!this['_repository']['hasCommentThread'](_0x53d266))throw new _0x2e165a('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x2e1ad6}=this['_repository']['getCommentThread'](_0x53d266);this['_repository']['fire'](ai('updateComment',_0x2e1ad6,_0x53d266),{'channelId':_0x2e1ad6,'threadId':_0x53d266,'commentId':_0xc1ce22,..._0x8f183a});}setAttribute(_0x1ae01e,_0x285404){const _0x6770b4=_0xf7f2a0(this['attributes']);_0x39ebb6(_0x6770b4,_0x1ae01e,_0x285404),this['update']({'attributes':_0x6770b4});}removeAttribute(_0x17ddeb){const _0x2bbc8c=_0xf7f2a0(this['attributes']);_0x35a747(_0x2bbc8c,_0x17ddeb),this['update']({'attributes':_0x2bbc8c});}['remove'](_0x23ffe3={}){if(!_0x23ffe3['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x36b62c,id:_0x2c002a}=this;if(!this['_repository']['hasCommentThread'](_0x36b62c))throw new _0x2e165a('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x2699f5}=this['_repository']['getCommentThread'](_0x36b62c);this['_repository']['fire'](ai('removeComment',_0x2699f5,_0x36b62c),{'channelId':_0x2699f5,'threadId':_0x36b62c,'commentId':_0x2c002a,..._0x23ffe3});}toJSON(){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}destroy(){this['stopListening']();}};function ai(_0x1d6fd2,..._0x33a50f){for(const _0x104a19 of _0x33a50f)void 0x0!==_0x104a19&&(_0x1d6fd2+=':'+String(_0x104a19));return _0x1d6fd2;}var ci=class extends _0x2d43ae{constructor(_0x1a489b){super(_0x1a489b),this['set']('hasContent',!0x1);}['refresh'](){const _0x21a60e=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x31e93a of _0x21a60e['getRanges']())if(this['_hasContent'](_0x31e93a))return void(this['hasContent']=!0x0);}execute({threadId:_0x3500f7=_0x3a3e70(),ranges:_0x537950,comment:_0x23b331}={}){const _0x516abd=this['editor']['model'],_0x2568cc=_0x537950??Array['from'](_0x516abd['document']['selection']['getRanges']()),_0x1c3718=[];for(const _0x3de3a7 of _0x2568cc)this['_hasContent'](_0x3de3a7)&&_0x1c3718['push'](this['_trimToContent'](_0x3de3a7));if(!_0x1c3718['length'])throw new _0x2e165a('addcommentthreadcommand-incorrect-ranges',null);_0x23b331&&this['_createCommentThread'](_0x3500f7,_0x23b331),this['_createMarkersFromRanges'](_0x3500f7,_0x1c3718,!!_0x23b331);}_createMarkersFromRanges(_0x3ad19e,_0x39c5d1,_0x575c5d){this['editor']['model']['change'](_0x5a204c=>{for(const _0x5bb8eb of _0x39c5d1){const _0x434554='comment:'+_0x3ad19e+':'+_0x3a3e70()['substr'](0x1,0x5);_0x5a204c['addMarker'](_0x434554,{'range':_0x5bb8eb,'usingOperation':_0x575c5d,'affectsData':_0x575c5d});}});}_createCommentThread(_0x48ce39,_0x3edd3f){const _0x1cb0cd=this['editor']['plugins']['get']('CommentsRepository'),_0x426f80=this['editor']['config']['get']('collaboration.channelId'),_0x27075a=this['editor']['plugins']['get']('Users')['me'];if(!_0x27075a)throw new _0x2e165a('addcommentthreadcommand-user-not-found',null);_0x1cb0cd['addCommentThread']({'threadId':_0x48ce39,'channelId':_0x426f80,'comments':[{'authorId':_0x27075a['id'],'content':_0x3edd3f,'createdAt':new Date(),'attributes':{}}]});}_hasContent(_0x182afd){for(const _0x44fd17 of _0x182afd['getItems']())if(this['_itemIsContent'](_0x44fd17))return!0x0;return!0x1;}_itemIsContent(_0x8b0158){return _0x8b0158['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x8b0158)&&!_0x8b0158['is']('element','tableCell');}_trimToContent(_0x3bc22b){const _0x19c751=_0x11b45e=>!this['_itemIsContent'](_0x11b45e['item']),_0x707d66=_0x3bc22b['start']['getLastMatchingPosition'](_0x19c751),_0x21cab6=_0x3bc22b['end']['getLastMatchingPosition'](_0x19c751,{'direction':'backward'});return this['editor']['model']['createRange'](_0x707d66,_0x21cab6);}},di=class extends _0x479b71{_dataCollectors;_editorAnnotations;static get requires(){return[ti];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x38265e){super(_0x38265e),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}init(){const _0x523696=this['editor'],_0x26a323=_0x523696['model']['document']['selection'],_0x4db4d7=_0x14ec54(()=>this['refreshSelectedViews'](),0xa);_0x26a323['on']('change:range',(_0x507a7e,_0x50f6c4)=>{_0x50f6c4['directChange']&&(_0x4db4d7['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x523696['editing']['view']['document'],'change:isFocused',(_0x18e693,_0x183c68,_0x4c3be2)=>{_0x4c3be2&&_0x4db4d7();}),this['listenTo'](_0x523696['ui']['focusTracker'],'change:isFocused',(_0x3ea48d,_0x431eee,_0x332140)=>{_0x332140||this['fire']('blur',{'isAnnotationTracked':_0x1201a3=>this['_editorAnnotationsData']['has'](_0x1201a3['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}registerAnnotation(_0x55ff3f){if(this['_editorAnnotations']['has'](_0x55ff3f['view']))return;this['_editorAnnotations']['add'](_0x55ff3f['view']),this['editor']['ui']['focusTracker']['add'](_0x55ff3f['view']['element']);const _0x1403d5=this['editor']['plugins']['get'](ti);this['listenTo'](_0x1403d5['collection'],'remove',(_0x4e76ab,_0x2acf3d)=>{this['editor']['ui']['focusTracker']['remove'](_0x2acf3d['view']['element']),this['_editorAnnotations']['delete'](_0x2acf3d['view']);});}hasDomSelection(){return this['editor']['editing']['view']['hasDomSelection'];}addSourceCollector(_0x4004e3){if('function'!=typeof _0x4004e3)throw new _0x2e165a('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x4004e3);}refreshSelectedViews(){this['fire']('refresh');}getOrderedSelectedAnnotations({activeAnnotation:_0x4a33b0,annotations:_0x369924}){const _0x4a2803=[],_0x198aae=this['editor']['model']['document']['selection'],_0x3e9676=Array['from'](_0x198aae['getRanges']());for(const [_0x5eea7a,_0x5b97b9]of this['_editorAnnotationsData']){const _0x1e0723=_0x4accaa(_0x5b97b9),_0x27d558=_0x369924['getByInnerView'](_0x5eea7a);_0x1e0723&&_0x27d558&&_0x4a2803['push']({'annotation':_0x27d558,'range':_0x1e0723});}function _0x4accaa(_0x2c0d63){for(const _0x12e253 of _0x2c0d63)for(const _0x12c6e3 of _0x3e9676)if(_0x12e253['containsRange'](_0x12c6e3,!_0x198aae['isCollapsed']))return _0x12e253;return null;}return _0x4a2803['sort']((_0x2b8a0f,_0x1d6373)=>{const _0x192aa7=_0x2b8a0f['range'],_0xdfd7d0=_0x1d6373['range'];if(!_0x192aa7['isEqual'](_0xdfd7d0)){if(_0x192aa7['containsRange'](_0xdfd7d0,!0x0))return 0x1;if(_0xdfd7d0['containsRange'](_0x192aa7,!0x0))return-0x1;}return _0x2b8a0f['annotation']==_0x4a33b0?-0x1:_0x1d6373['annotation']==_0x4a33b0?0x1:0x0;})['map'](_0x3b0a06=>_0x3b0a06['annotation']);}get _editorAnnotationsData(){const _0x1498fe=new Map();for(const _0x556281 of Array['from'](this['_dataCollectors']))for(const [_0x4a74c3,_0x5736ee]of _0x556281())_0x1498fe['set'](_0x4a74c3,_0x5736ee);return _0x1498fe;}},li=class extends _0x479b71{afterInit(){const _0x4686b7=this['editor'];_0x4686b7['plugins']['has']('RestrictedEditingModeEditing')&&_0x4686b7['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},mi=class extends _0x479b71{constructor(_0x4086b6){super(_0x4086b6),this['editor']['config']['define']('importWord.formatting.comments','basic');}afterInit(){const _0xda1a5b=this['editor'],_0x228bf0=_0xda1a5b['commands']['get']('importWord'),_0x147f93=_0xda1a5b['plugins']['get'](_0x22cb09);_0x228bf0&&(_0x228bf0['on']('execute',(_0x2f8985,[,_0x18c2e7])=>{_0x18c2e7['collaboration_features']={'comments':!0x0,'user_id':_0x147f93['me']['id']};},{'priority':_0x2b5acd['high']+0xa}),this['listenTo'](_0x228bf0,'dataInsert',this['_handleImportedData']));}_handleImportedData(_0x3681d4,_0x34e69b){const {comment_threads:_0x327efc}=_0x34e69b;_0x327efc&&_0x327efc['forEach'](({thread_id:_0x48de79,comments:_0x38b61f,is_resolved:_0x1b53a6})=>{const _0x3257ce=new Date(),_0x101793=_0x38b61f['map'](({author:_0x5c8039,content:_0x5bd695,created_at:_0x323e80})=>({'content':_0x5bd695,'authorId':this['editor']['plugins']['get'](_0x22cb09)['me']['id'],'createdAt':_0x3257ce,'attributes':{'@external':{'authorName':_0x5c8039,'createdAt':_0x323e80?new Date(_0x323e80):new Date(),'source':'importWord'}}})),_0x190060=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](oi)['addCommentThread']({'channelId':_0x190060,'threadId':_0x48de79,'comments':_0x101793,'resolvedAt':_0x1b53a6?_0x3257ce:null});});}},ui=class extends _0x479b71{constructor(_0xea39e2){super(_0xea39e2),this['editor']['config']['define']('comments.copyMarkers','default');}static get requires(){return[pt,wt];}afterInit(){const _0x46e98f=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x46e98f,'contentInsertion',(_0x59aa84,_0x21c3ef)=>this['_removeMarkersWithoutThreads'](_0x21c3ef['content']['markers']),{'priority':'highest'});}_removeMarkersWithoutThreads(_0x38f4dc){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x38f4dc;const _0x436dd2=this['editor']['plugins']['get']('CommentsRepository');for(const _0x39d5f6 of _0x38f4dc['keys']()){const [_0x5d97b0,_0x543fa2]=_0x39d5f6['split'](':');'comment'!=_0x5d97b0||_0x436dd2['hasCommentThread'](_0x543fa2)||_0x38f4dc['delete'](_0x39d5f6);}return _0x38f4dc;}_registerMarkerInClipboardPipeline(){const _0x34d5a9=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x24d3b0=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x24d3b0&&_0x34d5a9['_registerMarkerToCopy']('comment',_0x24d3b0);}_mapCommentsCopyConfigToRegisterConfiguration(_0x4f4492){switch(_0x4f4492){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function fi(_0x4430d5){const _0x3abb5d=_0x4430d5['split'](':');return{'group':_0x3abb5d[0x0],'id':_0x3abb5d[0x1],'part':_0x3abb5d[0x2]};}var pi=class extends _0x479b71{init(){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}overrideMarkerConverters(){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x5a7509,_0xfaabfe)=>{if(!_0xfaabfe['options']['showCommentHighlights'])return null;if(_0xfaabfe['options']['ignoreResolvedComments']){const {id:_0x42a6e1}=fi(_0x5a7509['markerName']);if(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x42a6e1)?.['isResolved']&&_0x5a7509['item'])return _0xfaabfe['consumable']['consume'](_0x5a7509['item'],'addMarker:'+_0x5a7509['markerName']),_0xfaabfe['consumable']['consume'](_0x5a7509['item'],'removeMarker:'+_0x5a7509['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x849718=>{_0x849718['on']('addMarker:comment',(_0x39b6e7,_0x2afc54,_0x18c03b)=>{if(!_0x18c03b['options']['showCommentHighlights'])return;const _0x1d982d=_0x2afc54['item'];if(!_0x1d982d)return;const _0x250f63=_0x18c03b['mapper']['toViewElement'](_0x1d982d);this['editor']['model']['schema']['isObject'](_0x1d982d)&&_0x250f63&&!_0x250f63['getCustomProperty']('widget')&&_0x250f63['is']('containerElement')&&Ct(_0x250f63,_0x18c03b['writer']);},{'priority':'high'});});}overrideHorizontalRuleConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x357070,{writer:_0x32adb1,options:_0x174dfe})=>{if(!_0x174dfe['showCommentHighlights'])return null;const _0x25574a=_0x32adb1['createContainerElement']('div'),_0xc114ac=_0x32adb1['createEmptyElement']('hr');return _0x32adb1['addClass']('ck-horizontal-line',_0x25574a),_0x32adb1['insert'](_0x32adb1['createPositionAt'](_0x25574a,0x0),_0xc114ac),_0x25574a;},'converterPriority':'high'});}overrideImageInlineConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x3ef374,{writer:_0x4cc366,options:_0x40e8a9})=>{if(!_0x40e8a9['showCommentHighlights'])return null;const _0x41069a=_0x4cc366['createContainerElement']('span'),_0x5d6608=_0x4cc366['createEmptyElement']('img');return _0x4cc366['addClass']('image-inline',_0x41069a),_0x4cc366['insert'](_0x4cc366['createPositionAt'](_0x41069a,0x0),_0x5d6608),_0x41069a;},'converterPriority':'high'});}overrideMediaEmbedConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x61b530,{writer:_0x341af1,options:_0x593201})=>{if(_0x593201['showCommentHighlights'])return _0x341af1['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x44c0f1,_0x5c67d2,_0x1741d5)=>{_0x1741d5['options']['showCommentHighlights']&&_0x44c0f1['stop']();},{'priority':'high'});}},wi=class extends _0x479b71{static get requires(){return[oi,di,_0x22cb09,li,mi,ui,pi];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1a73b5){super(_0x1a73b5),this['set']('isThreadsLoadingPaused',!0x0),_0x1a73b5['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x31d8e5,_0x218276,_0xeafe1b,_0x3a9384)=>{const _0x231f23=_0x1a73b5['plugins']['get'](oi),_0x3217e2=_0xeafe1b?fi(_0xeafe1b)['id']:null;_0x1a73b5['model']['change'](()=>{if(_0x3217e2){const _0x3a478a=this['getAllMarkersForId'](_0x3217e2);for(const _0x1e5be6 of _0x3a478a)_0x1a73b5['editing']['reconvertMarker'](_0x1e5be6);}if(_0x3a9384){const {id:_0x201750}=fi(_0x3a9384),_0x1fe01f=_0x231f23['getCommentThread'](_0x201750);if(_0x1fe01f&&_0x1fe01f['unlinkedAt'])return;if(_0x1fe01f&&!_0x1fe01f['isAttached'])return;const _0x39d7c5=this['getAllMarkersForId'](_0x201750);for(const _0x49ec4f of _0x39d7c5)_0x1a73b5['editing']['reconvertMarker'](_0x49ec4f);}}),_0x3217e2&&this['scrollToThreadMarker'](_0x3217e2);}),this['_initAriaMarkerChangeAnnouncements']();}init(){const _0x30bba2=this['editor'],_0x1d13c0=_0x30bba2['plugins']['get'](oi),_0x236844=_0x30bba2['config']['get']('collaboration.channelId'),_0x4dc111=_0x1d13c0['getCommentThreads']()['filter'](_0x4dc317=>_0x4dc317['channelId']!==_0x236844);_0x30bba2['commands']['add']('addCommentThread',new ci(_0x30bba2)),this['listenTo'](_0x30bba2,'change:isReadOnly',(_0x5cea9e,_0x4f7e45,_0x142d42)=>{_0x1d13c0['switchReadOnly'](_0x142d42,_0x30bba2['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x1d13c0,gi('addCommentThread',_0x236844),(_0x380f39,{threadId:_0xd025a8})=>{this['editor']['plugins']['get'](oi)['getCommentThread'](_0xd025a8)?.['unlinkedAt']&&this['_attachArchivedThread'](_0xd025a8);}),this['listenTo'](_0x1d13c0,gi('removeCommentThread',_0x236844),(_0x2fa73a,{threadId:_0x427afb})=>{_0x30bba2['model']['enqueueChange']({'isUndoable':!0x1},_0x376362=>{const _0x2640b3=this['getAllMarkersForId'](_0x427afb);for(const _0x462886 of _0x2640b3)_0x376362['removeMarker'](_0x462886);});}),this['listenTo'](_0x1d13c0,gi('resolveCommentThread',_0x236844),(_0x54306c,{threadId:_0x28ee10})=>{this['_reconvertMarkers'](_0x28ee10);const _0x4eecaf=this['editor']['plugins']['get'](ti);(this['editor']['editing']['view']['hasDomSelection']||_0x4eecaf['collection']['isFocused'])&&(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x28ee10)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x1d13c0,gi('reopenCommentThread',_0x236844),(_0x3f59a9,{threadId:_0x479d0a})=>{this['_reconvertMarkers'](_0x479d0a);},{'priority':'low'}),this['listenTo'](_0x1d13c0,gi('addComment',_0x236844),(_0x53b86a,{threadId:_0xef7eeb,isFromAdapter:_0x34e8d2})=>{const _0x45b76d=this['getAllMarkersForId'](_0xef7eeb);!_0x34e8d2&&0x0!=_0x45b76d['length']&&_0x1d13c0['hasCommentThread'](_0xef7eeb)&&0x1===_0x1d13c0['getCommentThread'](_0xef7eeb)['length']&&_0x30bba2['model']['enqueueChange']({'isUndoable':!0x1},_0x202807=>{for(const _0x422cce of _0x45b76d)_0x202807['updateMarker'](_0x422cce,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x4dc111);}afterInit(){!async function(_0x43a4dc){const _0x211064='KpOBJGNSEgqCyfVF1kZ8lbnRjM7eIzAsDQHw9aThu6rcYi05UmPL4d3X2Wotvx',_0x458947=0x79140,_0x59726d=window['Date']['now'](),_0x143d02=_0x43a4dc['editor'],_0x20e866=new window['Promise'](_0x4f0c4e=>{_0x143d02['once']('ready',_0x4f0c4e);}),_0x5bf2a0={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x278049=_0x143d02['config']['get']('licenseKey');async function _0x82be3f(){let _0x1b0513,_0x258f0a=null,_0x165b6d=null;try{return'GPL'==_0x278049?'NotAllowed':(_0x1b0513=_0x2a9147(),_0x1b0513?(_0x1b0513['usageEndpoint']&&(_0x165b6d=_0x418a30(_0x1b0513['usageEndpoint'],_0x1b0513['jti'])),await _0x69949d()?_0xc31a01()?_0x492a45()?'Expired':_0x2e8b0c()?('evaluation'==_0x1b0513['licenseType']&&(_0x258f0a=_0x3a3dd5('EvaluationLimit')),await _0x48525e()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x492a45(){const _0x1a7380=['evaluation','trial']['includes'](_0x1b0513['licenseType'])?_0x59726d/0x3e8:0xe10*_0x458947;return _0x1b0513['exp']<_0x1a7380;}function _0xc31a01(){const _0x1b5c85=_0x1b0513['features'];if(!_0x1b5c85)return!0x1;if(_0x1b5c85['includes']('*'))return!0x0;if(_0x1b5c85['includes']('CMT'))return!0x0;if(_0x1b5c85['includes']('TRILIUM')&&_0x3d5e7d())return!0x0;if(_0x1b5c85['includes']('RCMT')){if(_0x1aa095())return!0x0;if(_0x458059()||_0x472595())return!0x0;}return!0x1;}function _0x2e8b0c(){const _0xafa3ac=_0x1b0513['licensedHosts'];if(!_0xafa3ac||0x0==_0xafa3ac['length'])return!0x0;const {hostname:_0x3aabe0}=new URL(window['location']['href']);if(_0xafa3ac['includes'](_0x3aabe0))return!0x0;const _0x3c7a5c=_0x3aabe0['split']('.');return _0xafa3ac['filter'](_0x5568fb=>_0x5568fb['includes']('*'))['map'](_0x5e29f2=>_0x5e29f2['split']('.'))['filter'](_0x186d99=>_0x186d99['length']<=_0x3c7a5c['length'])['map'](_0xa38649=>Array(_0x3c7a5c['length']-_0xa38649['length'])['fill']('*'===_0xa38649[0x0]?'*':'')['concat'](_0xa38649))['some'](_0x502fdc=>_0x3c7a5c['every']((_0x64cf09,_0x2e6794)=>_0x502fdc[_0x2e6794]===_0x64cf09||'*'===_0x502fdc[_0x2e6794]));}function _0x48525e(){return _0x258f0a&&_0x165b6d?new window['Promise']((_0x3aba6b,_0x11eecc)=>{_0x258f0a['then'](_0x3aba6b,_0x11eecc),_0x165b6d['then'](_0x13ce9e=>{'Valid'!=_0x13ce9e&&_0x3aba6b(_0x13ce9e);},_0x11eecc);}):_0x258f0a||_0x165b6d||'Valid';}}function _0x418a30(_0x1eb1e0,_0x2d220f){return new window['Promise'](_0xb56d38=>{if(_0x566e83())return _0xb56d38('Valid');_0x2fde12(),_0x143d02['decorate']('_sendUsageRequest');let _0x3ea104=!0x1;const _0x3cd077=_0x3a3e70();function _0x28ddc9(_0xfec0d4){return!!_0xfec0d4&&('object'==typeof _0xfec0d4||'function'==typeof _0xfec0d4)&&'function'==typeof _0xfec0d4['then']&&'function'==typeof _0xfec0d4['catch'];}function _0x36306d(_0x4e617b){_0x35fa7a(_0x4e617b)['then'](_0x3c32a5=>_0x3c32a5&&'ok'==_0x3c32a5['status']?_0xd57a6a(_0x21c025(_0x3cd077+_0x2d220f))!=_0x3c32a5['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x2b2ca5=>(_0x3e6a6d(),_0x2b2ca5),()=>{const _0x164679=_0xed610f();return null==_0x164679?(_0x3e6a6d(),'Valid'):_0x59726d-_0x164679>0x240c8400?'UsageLimit':'Valid';})['then'](_0xb56d38)['catch'](()=>{_0xb56d38('UsageLimit');});const _0x302fb4=0x36ee80;function _0x3e6a6d(){const _0x15becd='llct-'+_0xd57a6a(_0x21c025(_0x1eb1e0)),_0x1d5b42=_0x4a7c1d(_0xd57a6a(window['Math']['ceil'](_0x59726d/_0x302fb4)));window['localStorage']['setItem'](_0x15becd,_0x1d5b42);}function _0xed610f(){const _0x137ccc='llct-'+_0xd57a6a(_0x21c025(_0x1eb1e0)),_0x292ffc=window['localStorage']['getItem'](_0x137ccc);return _0x292ffc?window['parseInt'](_0x4a7c1d(_0x292ffc),0x10)*_0x302fb4:null;}function _0x35fa7a(_0x395f5b){return new window['Promise']((_0x212beb,_0x358019)=>{_0x395f5b['then'](_0x212beb,_0x358019),window['setTimeout'](_0x358019,0x1d4c0);});}}_0x143d02['on']('_sendUsageRequest',(_0x30f08f,_0x500640)=>{if(_0x500640[0x0]!=_0x1eb1e0)return _0xb56d38('UsageLimit');_0x500640[0x1]={..._0x500640[0x1],'requestId':_0x3cd077};},{'priority':'high'}),_0x143d02['on']('_sendUsageRequest',_0x504d7a=>{_0x28ddc9(_0x504d7a['return'])&&(_0x3ea104=!0x0,_0x36306d(_0x504d7a['return']));},{'priority':'low'}),_0x20e866['then'](()=>{_0x3ea104||_0xb56d38('UsageLimit');});});function _0x566e83(){return'auto'==_0x143d02['editing']['view']['_overlayModeHint'];}function _0x2fde12(){_0x143d02['editing']['view']['_overlayModeHint']='auto';}}function _0x3a3dd5(_0x489949){const _0x19b382=[new window['Promise'](_0x432955=>setTimeout(_0x432955,0x93ecc)),_0x20e866['then'](()=>new window['Promise'](_0x50c457=>{let _0x2d8919=0x0;_0x143d02['model']['on']('applyOperation',(_0x5e23d4,_0x1a0581)=>{_0x1a0581[0x0]['isDocumentOperation']&&_0x2d8919++,0x5e8==_0x2d8919&&(_0x50c457(),_0x5e23d4['off']());});}))];return window['Promise']['race'](_0x19b382)['then'](()=>_0x489949);}async function _0x2e4091(){await _0x20e866,_0x143d02['model']['change']=_0x72f6a2,_0x143d02['model']['enqueueChange']=_0x72f6a2,_0x143d02['enableReadOnlyMode']('model');}function _0x3d5e7d(){return window['glob']&&window['glob']['triliumVersion'];}function _0x1aa095(){return _0x5e7dd9('WebSocketGateway')&&'connected'==_0x3f7081('WebSocketGateway')['state'];}function _0x458059(){return _0x5e7dd9('RevisionViewerIntegration');}function _0x472595(){return _0x5e7dd9('TrackChangesDataGetter');}function _0x3c11c4(_0xd94273){const _0x2d2de6=_0x4c1aab();_0x143d02[_0x2d2de6]='commentsLicenseKey'+_0xd94273,'Valid'!=_0xd94273&&_0x2e4091();}function _0x4c1aab(){const _0x531056=window['String'](window['performance']['now']())['replace']('.','');let _0x260b1f='K';for(let _0x1982fe=0x0;_0x1982fe<_0x531056['length'];_0x1982fe+=0x2){let _0x4ebada=window['parseInt'](_0x531056['substring'](_0x1982fe,_0x1982fe+0x2));_0x4ebada>=0x3e&&(_0x4ebada-=0x3e),_0x260b1f+=_0x211064[_0x4ebada];}return _0x260b1f;}function _0x2a9147(){const _0x1d395c=_0x278049['split']('.');if(0x3!=_0x1d395c['length'])return null;return _0x24c937(_0x1d395c[0x1]);function _0x24c937(_0x584119){const _0x596576=_0x4d51a0(_0x584119);return _0x596576&&_0x509f6e()?_0x596576:null;function _0x509f6e(){const _0x487079=_0x596576['jti'],_0x40db41=window['parseInt'](_0x487079['substring'](_0x487079['length']-0x8),0x10),_0x444df1={..._0x596576,'jti':_0x487079['substring'](0x0,_0x487079['length']-0x8)};return delete _0x444df1['vc'],_0x21c025(_0x444df1)==_0x40db41;}}}async function _0x69949d(){let _0x3ea850=!0x0;try{const [_0x23ebda,_0x976a3,_0x30e7ca]=_0x278049['split']('.');return _0x81bdda(_0x23ebda),await _0x2af92f(_0x23ebda,_0x976a3,_0x30e7ca),_0x3ea850;}catch{return!0x1;}function _0x81bdda(_0x509357){const _0x5e69b7=_0x4d51a0(_0x509357);_0x5e69b7&&'ES256'==_0x5e69b7['alg']||(_0x3ea850=!0x1);}async function _0x2af92f(_0x38c65f,_0x3a86c9,_0x9f4a89){const _0x213db8=window['Uint8Array']['from'](_0x4eae31(_0x9f4a89),_0x593b0d=>_0x593b0d['charCodeAt'](0x0)),_0x37c890=new window['TextEncoder']()['encode'](_0x38c65f+'.'+_0x3a86c9),_0xa4437d=window['crypto']['subtle'];if(!_0xa4437d)return;const _0x446f21=await _0xa4437d['importKey']('jwk',_0x5bf2a0,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0xa4437d['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x446f21,_0x213db8,_0x37c890)||(_0x3ea850=!0x1);}}function _0x4d51a0(_0x47f138){return _0x47f138['startsWith']('ey')?JSON['parse'](_0x4eae31(_0x47f138)):null;}function _0x4eae31(_0x505d59){return window['atob'](_0x505d59['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x21c025(_0x3be380){let _0x240400=0x1505;function _0x44251d(_0x16f323){for(let _0x477ceb=0x0;_0x477ceb<_0x16f323['length'];_0x477ceb++){const _0x43c7f8=_0x16f323['charCodeAt'](_0x477ceb);_0x240400=(_0x240400<<0x5)+_0x240400+_0x43c7f8,_0x240400&=_0x240400;}}function _0x450e6f(_0x5a959a){Array['isArray'](_0x5a959a)?_0x5a959a['forEach'](_0x450e6f):_0x5a959a&&'object'==typeof _0x5a959a?Object['entries'](_0x5a959a)['sort']()['forEach'](([_0x2bb9fe,_0x162b5d])=>{_0x44251d(_0x2bb9fe),_0x450e6f(_0x162b5d);}):_0x44251d(window['String'](_0x5a959a));}return _0x450e6f(_0x3be380),_0x240400>>>0x0;}function _0xd57a6a(_0x83f633){return _0x83f633['toString'](0x10)['padStart'](0x8,'0');}function _0x4a7c1d(_0x2c08fb){return _0x2c08fb['split']('')['reverse']()['join']('');}function _0x5e7dd9(_0x11521f){return _0x143d02['plugins']['has'](_0x11521f);}function _0x3f7081(_0x4eafd6){return _0x143d02['plugins']['get'](_0x4eafd6);}function _0x72f6a2(){}_0x3c11c4(await _0x82be3f());}(this);}destroy(){const _0x2394b7=this['editor']['plugins']['get'](oi),_0x46359b=this['editor']['config']['get']('collaboration.channelId');for(const _0x31fd7f of _0x2394b7['getCommentThreads']({'channelId':_0x46359b}))_0x2394b7['_detachCommentThread'](_0x31fd7f['id']),_0x2394b7['_threads']['delete'](_0x31fd7f['id']);super['destroy']();}['hasMarkerForId'](_0x2ce255){return this['getAllMarkersForId'](_0x2ce255)['length']>0x0;}getAllMarkersForId(_0x535e32){const _0x484673=[];for(const _0x45c9fa of this['editor']['model']['markers'])_0x45c9fa['name']['startsWith']('comment:'+_0x535e32)&&_0x484673['push'](_0x45c9fa);return _0x484673;}['scrollToThreadMarker'](_0x4867a9){setTimeout(()=>{const _0x2f69ae=this['_getTargetForId'](_0x4867a9);_0x2f69ae&&this['activeMarker']&&fi(this['activeMarker'])['id']===_0x4867a9&&_0x3d03ae({'target':_0x2f69ae[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}_reconvertMarkers(_0x33f912){this['editor']['model']['change'](()=>{for(const _0x79f830 of this['getAllMarkersForId'](_0x33f912))this['editor']['editing']['reconvertMarker'](_0x79f830);});}_attachArchivedThread(_0x4dd3be){const _0x1ce28e=this['editor']['plugins']['get'](oi),_0x4017b6=this['editor']['plugins']['get'](di),_0x2a70b3=_0x1ce28e['getCommentThread'](_0x4dd3be);if(!_0x2a70b3['isAttached']){const _0x4d978b=_0x2a70b3['attachTo'](()=>this['_getTargetForId'](_0x2a70b3['id']));_0x4017b6['registerAnnotation'](_0x4d978b),_0x2a70b3['_hasTargetInContent']=!0x1;}}_initializeMarkerConverters(){const _0xd185e9=this['editor'],_0x4173b5=_0xd185e9['plugins']['get'](_0x22cb09);_0xd185e9['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x42686d,_0x2014a2)=>{const {id:_0x25fbf5}=fi(_0x42686d['markerName']),_0x293a1e=_0xd185e9['plugins']['get'](oi)['getCommentThread'](_0x25fbf5),_0x1e6c06=this['activeMarker']&&fi(this['activeMarker'])['id']===_0x25fbf5;let _0x2720dd;if(_0x293a1e&&_0x293a1e['isResolved']&&!_0x1e6c06&&_0x42686d['item'])return _0x2014a2['consumable']['consume'](_0x42686d['item'],'addMarker:'+_0x42686d['markerName']),_0x2014a2['consumable']['consume'](_0x42686d['item'],'removeMarker:'+_0x42686d['markerName']),null;const _0x28fdad=['ck-comment-marker'];return _0x1e6c06&&_0x28fdad['push']('ck-comment-marker--active'),_0x2720dd=_0x293a1e?.['length']?_0x293a1e['comments']['first']['author']['id']:_0x4173b5['me']['id'],{'classes':_0x28fdad,'attributes':{'data-comment':_0x25fbf5,'data-author-id':_0x2720dd}};}}),_0xd185e9['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x2a8777,{options:_0x36bde5})=>{if(_0x36bde5['showCommentHighlights'])return null;const _0x245c9f=_0xd185e9['plugins']['get'](oi),_0x5a1ef3=_0xd185e9['model']['markers']['get'](_0x2a8777),{id:_0x125b5f,part:_0x2ff6a2}=fi(_0x2a8777);return _0x5a1ef3&&!_0x5a1ef3['affectsData']||_0x36bde5['ignoreResolvedComments']&&_0x245c9f['getCommentThread'](_0x125b5f)?.['isResolved']?null:{'group':'comment','name':_0x2ff6a2?_0x125b5f+':'+_0x2ff6a2:_0x125b5f};}}),_0xd185e9['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x13e977,{writer:_0x10292e})=>_0x10292e['createElement']('$marker',{'data-name':'comment:'+_0x13e977['getAttribute']('id')})}),_0xd185e9['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x548b8d=this['editor'],_0x46ad02=_0x548b8d['plugins']['get'](oi),_0x170bfe=new Set(),_0x15b1ae=new Set();_0x548b8d['model']['document']['registerPostFixer'](_0x5277da=>{let _0x10bcc3=!0x1;for(const {name:_0x599a80,data:_0xebc8ca}of _0x548b8d['model']['document']['differ']['getChangedMarkers']()){const {group:_0x5e3185,id:_0xecd58e}=fi(_0x599a80);let _0x31fc50=_0xebc8ca['newRange'];if('comment'!==_0x5e3185||!_0x31fc50)continue;const _0x49a046='$graveyard'===_0x31fc50['root']['rootName'];_0x49a046||(_0x31fc50=_i(_0x31fc50,_0x548b8d['model']),!_0x31fc50||_0x31fc50['isCollapsed']||!_0xebc8ca['newRange']||_0x31fc50['isEqual'](_0xebc8ca['newRange']))?_0x548b8d['model']['hasContent'](_0x31fc50)&&!_0x49a046?this['isThreadsLoadingPaused']?_0x170bfe['add'](_0x599a80):this['_handleThreadMarker'](_0x599a80,_0xecd58e):(_0x15b1ae['add'](_0x599a80),_0x170bfe['delete'](_0x599a80),_0x5277da['removeMarker'](_0x599a80),_0x10bcc3=!0x0):(_0x5277da['updateMarker'](_0x599a80,{'range':_0x31fc50}),_0x10bcc3=!0x0);}return _0x10bcc3;}),this['on']('change:isThreadsLoadingPaused',(_0x2b97bf,_0x30bb45,_0x405a87)=>{if(!_0x405a87&&_0x170bfe['size'])for(const _0x2cd1e7 of _0x170bfe){const {id:_0x5f5cb0}=fi(_0x2cd1e7);_0x170bfe['delete'](_0x2cd1e7),_0x548b8d['model']['markers']['get'](_0x2cd1e7)&&this['_handleThreadMarker'](_0x2cd1e7,_0x5f5cb0);}}),this['listenTo'](_0x548b8d['model']['document'],'change',()=>{for(const {name:_0x547131,data:{newRange:_0x496619}}of _0x548b8d['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3a5e9d,id:_0x1b8cff}=fi(_0x547131);if('comment'!==_0x3a5e9d)continue;const _0x15f324=_0x46ad02['getCommentThread'](_0x1b8cff),_0x4a8a4d=this['hasMarkerForId'](_0x1b8cff);_0x15f324&&(!_0x15f324['_hasTargetInContent']&&_0x496619&&_0x548b8d['editing']['view']['once']('render',()=>{const _0x2736e4=_0x548b8d['plugins']['get'](ti),_0x5c4dbb=_0x46ad02['_threadToController']['get'](_0x15f324)['view'];_0x2736e4['getByInnerView'](_0x5c4dbb)['refreshVisibility']();},{'priority':'low'}),_0x15f324['_hasTargetInContent']=_0x4a8a4d||!!_0x496619),_0x496619||(_0x15b1ae['add'](_0x547131),_0x170bfe['delete'](_0x547131));}for(const _0x59c55e of _0x15b1ae){const {id:_0x414163}=fi(_0x59c55e),_0x29d93c=_0x46ad02['getCommentThread'](_0x414163);if(_0x170bfe['delete'](_0x59c55e),!_0x29d93c)continue;const _0x70ae04=this['hasMarkerForId'](_0x414163);_0x70ae04||_0x29d93c['isSubmitted']?_0x70ae04||_0x29d93c['unlinkedAt']||_0x29d93c['setUnlinkedAt'](new Date()):_0x29d93c['remove']();}_0x15b1ae['clear']();});}_handleInitialThreads(_0xb649fc){_0xb649fc['forEach'](_0x201f00=>{_0x201f00['unlinkedAt']&&this['_attachArchivedThread'](_0x201f00['id']);});}_getTargetForId(_0x5c500c){const _0x5f40c5=this['editor'],_0x5c7582=this['getAllMarkersForId'](_0x5c500c);return _0x564cea(_0x5f40c5['editing'],_0x5c7582);}_getTextContext(_0x388beb){const _0x66106c=this['getAllMarkersForId'](_0x388beb);let _0x1a46f3='',_0x3ba9a6=!0x1;for(const _0x341886 of _0x66106c){const _0x16550b=_0x341886['getRange']();for(const _0x129158 of Array['from'](_0x16550b['getItems']()))_0x129158['is']('$textProxy')?(_0x1a46f3&&_0x3ba9a6&&(_0x1a46f3+='\x20',_0x3ba9a6=!0x1),_0x1a46f3+=_0x129158['data']):_0x3ba9a6=!0x0;_0x3ba9a6=!0x0;}return _0x1a46f3['substring'](0x0,0x96);}_attachMarkerToThread(_0x1643d5,_0x13204d){const _0x266a3d=this['editor'],_0x330f25=_0x266a3d['plugins']['get'](oi);let _0x2cdacf=_0x330f25['getCommentThread'](_0x13204d);const _0xde0db9=_0x266a3d['config']['get']('collaboration.channelId'),_0xda3138=_0x266a3d['plugins']['get'](di);return _0x2cdacf&&(_0x2cdacf['unlinkedAt']&&_0x2cdacf['setUnlinkedAt'](null),_0x2cdacf['isAttached'])||(this['getAllMarkersForId'](_0x13204d)[0x0]['managedUsingOperations']?_0x330f25['fetchCommentThread']({'channelId':_0xde0db9,'threadId':_0x13204d})['then'](_0x494406=>{if('destroyed'!==_0x266a3d['state']){if(_0x2cdacf=_0x494406,_0x2cdacf&&!_0x2cdacf['isAttached']){const _0xdcc95a=_0x2cdacf['attachTo'](()=>this['_getTargetForId'](_0x13204d));_0xda3138['registerAnnotation'](_0xdcc95a),_0x2cdacf['isResolved']&&this['_reconvertMarkers'](_0x13204d);}else{if(!_0x2cdacf){const _0x5ac467=this['getAllMarkersForId'](_0x13204d);_0x266a3d['model']['change'](_0x3a8edb=>{for(const _0x1f6543 of _0x5ac467)_0x3a8edb['removeMarker'](_0x1f6543);});}}}}):_0x266a3d['editing']['view']['once']('render',()=>{if(_0x330f25['getCommentThread'](_0x13204d))return;const _0xeceb79=_0x266a3d['plugins']['get'](ti);_0x2cdacf=_0x330f25['openNewCommentThread']({'channelId':_0xde0db9,'threadId':_0x13204d,'target':()=>this['_getTargetForId'](_0x13204d),'context':{'type':'text','value':this['_getTextContext'](_0x13204d)}});const _0x4efed0=_0x330f25['_threadToController']['get'](_0x2cdacf)['view'],_0x174084=_0xeceb79['getByInnerView'](_0x4efed0);_0x174084&&_0xda3138['registerAnnotation'](_0x174084);},{'priority':'low'})),_0x2cdacf;}['_handleThreadMarker'](_0x3cde9b,_0x661377){const _0x2f58e7=this['_attachMarkerToThread'](_0x3cde9b,_0x661377);_0x2f58e7&&!_0x2f58e7['context']&&_0x2f58e7['setContext']({'type':'text','value':this['_getTextContext'](_0x661377)});}_initAriaMarkerChangeAnnouncements(){const _0x381341=this['editor'];_0x132571(_0x381341['model'],({left:_0x4842d2,entered:_0x41f0f7})=>{for(const _0xe0d95f of _0x4842d2)if(Ai(_0xe0d95f)){_0x381341['ui']['ariaLiveAnnouncer']['announce'](Et(_0x381341['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0xce27ce of _0x41f0f7)if(Ai(_0xce27ce)){_0x381341['ui']['ariaLiveAnnouncer']['announce'](Et(_0x381341['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x38a1f4(_0x24b6ae)));break;}});}};function gi(_0x3891e3,_0x1d25c4){return _0x1d25c4?_0x3891e3+':'+_0x1d25c4:_0x3891e3;}function _i(_0x5113f7,_0x19f9e6){const _0x2ca84d=_0x19f9e6['schema'],_0x3cb228=_0x19f9e6['createRange'](_0x5113f7['start']);for(const _0x148913 of _0x5113f7['getWalker']()){const {type:_0x3e78d4,item:_0x3d5db3,nextPosition:_0x211a89}=_0x148913;if('text'===_0x3e78d4||_0x2ca84d['isObject'](_0x3d5db3)){const _0x1f615d=_0x19f9e6['createPositionBefore'](_0x3d5db3);_0x3cb228['isCollapsed']&&(_0x3cb228['start']=_0x1f615d),_0x3cb228['end']=_0x211a89;}}return _0x3cb228;}function Ai(_0xb87f21){return'comment'===fi(_0xb87f21['name'])['group'];}var vi=class extends _0x479b71{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[oi,wi,di,ti];}get CommentsListView(){return Lt;}get CommentThreadInputView(){return xt;}init(){const _0x493bc9=this['editor'],_0xc4ed07=_0x493bc9['plugins']['get'](oi),_0x1dbfc3=_0x493bc9['plugins']['get'](wi),_0x1158ee=_0x493bc9['plugins']['get'](ti),_0x46482b=_0x493bc9['plugins']['get'](di);_0x493bc9['ui']['componentFactory']['add']('comment',()=>{const _0x327654=this['_createUIButton'](_0x9183d3);return _0x327654['tooltip']=!0x0,_0x327654;}),_0x493bc9['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](rt)),_0x46482b['addSourceCollector'](()=>{const _0x2b0034=[];for(const [_0x36001c,_0x43b8c4]of _0xc4ed07['_threadToController']){const _0x2a3ce2=_0x1dbfc3['getAllMarkersForId'](_0x36001c['id']),_0x26ea6a=_0x2a3ce2['map'](_0x159745=>_0x159745['getRange']());_0x2a3ce2['length']>0x0&&_0x2b0034['push']([_0x43b8c4['view'],_0x26ea6a]);}return _0x2b0034;}),this['listenTo'](_0x1158ee,'change:activeAnnotations',(_0x2f7330,_0x4c3492,_0x564c12)=>{const _0x44e324=Array['from'](_0x564c12)['map'](_0x5a6577=>_0x5a6577['innerView'])['find'](_0x261ee6=>_0xc4ed07['_viewToController']['has'](_0x261ee6));if(!_0x44e324)return void(_0x1dbfc3['activeMarker']=null);const _0x22b96c=_0xc4ed07['_viewToController']['get'](_0x44e324)['model']['id'],_0x2ae98b='comment:'+_0x22b96c;_0x22b96c&&_0x1dbfc3['hasMarkerForId'](_0x22b96c)?_0x1dbfc3['activeMarker']=_0x2ae98b:_0x1dbfc3['activeMarker']&&(_0x1dbfc3['activeMarker']=null);}),this['listenTo'](_0xc4ed07,'removeCommentThread',(_0x5d2e6b,{threadId:_0x331b81,isFromAdapter:_0x252229})=>{!_0x252229&&_0x493bc9['ui']['focusTracker']['isFocused']&&_0x1dbfc3['hasMarkerForId'](_0x331b81)&&_0x493bc9['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0xc4ed07,'addComment',(_0x25c4ce,{threadId:_0xaa47b8,isFromAdapter:_0x537bd5})=>{!_0x537bd5&&_0x1dbfc3['hasMarkerForId'](_0xaa47b8)&&_0xc4ed07['hasCommentThread'](_0xaa47b8)&&0x1===_0xc4ed07['getCommentThread'](_0xaa47b8)['length']&&(_0x493bc9['editing']['view']['focus'](),_0x25c4ce['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x5ef99e=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0xd1b1cd;for(const _0x462ec8 in _0x5ef99e){const _0x5cb248=_0x462ec8,_0x196459=_0x5ef99e[_0x5cb248];if('commentsLicenseKeyValid'==_0x196459||'commentsLicenseKeyInvalid'==_0x196459||'commentsLicenseKeyExpired'==_0x196459||'commentsLicenseKeyDomainLimit'==_0x196459||'commentsLicenseKeyNotAllowed'==_0x196459||'commentsLicenseKeyEvaluationLimit'==_0x196459||'commentsLicenseKeyUsageLimit'==_0x196459){delete _0x5ef99e[_0x5cb248],_0xd1b1cd=_0x196459,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0xd1b1cd&&_0x5ef99e['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0xd1b1cd&&_0x5ef99e['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0xd1b1cd&&_0x5ef99e['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0xd1b1cd&&_0x5ef99e['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0xd1b1cd&&_0x5ef99e['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0xd1b1cd&&_0x5ef99e['_showLicenseError']('usageLimit');},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_createUIButton(_0x4c2dea){const _0x362362=this['editor'],_0x2fe36d=new _0x4c2dea(_0x362362['locale']),_0x2545b2=_0x362362['commands']['get']('addCommentThread');return _0x2fe36d['set']({'label':Et(_0x362362['locale'],'Comment'),'icon':_0x2ea43a}),_0x2fe36d['bind']('isEnabled')['to'](_0x2545b2,'isEnabled',_0x2545b2,'hasContent',(_0x22f0a6,_0x2c19f2)=>_0x22f0a6&&_0x2c19f2),this['listenTo'](_0x2fe36d,'execute',()=>{_0x2545b2['execute']();}),_0x2fe36d;}},yi=class extends _0x479b71{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[wi];}constructor(_0x9954e){super(_0x9954e),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x56ebf9,_0x24c5c4,_0xecad7d)=>{_0xecad7d?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}afterInit(){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}_enableCommentsOnlyMode(){for(const [_0x5f96fa,_0x5cbfca]of this['editor']['commands'])_0x5cbfca['affectsData']&&'addCommentThread'!==_0x5f96fa&&_0x5cbfca['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 _0x11f5ad=this['editor']['editing']['view']['document'];this['listenTo'](_0x11f5ad,'cut',_0x1519ae=>_0x1519ae['stop'](),{'priority':'highest'}),this['listenTo'](_0x11f5ad,'clipboardInput',_0x51fda8=>_0x51fda8['stop'](),{'priority':'highest'}),this['listenTo'](_0x11f5ad,'delete',_0xac89b6=>_0xac89b6['stop'](),{'priority':'highest'});}_disableCommentsOnlyMode(){for(const [_0x228a20,_0x344a12]of this['editor']['commands'])_0x344a12['affectsData']&&'addCommentThread'!==_0x228a20&&_0x344a12['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']);}},Ti=class extends _0x294fbc{activeUIs;uisData;['_uis'];static get requires(){return[ti];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x451bcb){super(_0x451bcb),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}init(){const _0x3c6307=this['context']['plugins']['get'](ti);this['listenTo'](_0x3c6307,'_activateAnnotation',(_0x30980a,_0xf9af1f)=>{for(const _0x42c09f of this['activeUIs']){const _0x2b2ef0=this['_uis']['get'](_0x42c09f);(0x0,this['uisData']['get'](_0x42c09f)['filter'])(_0xf9af1f)&&_0x2b2ef0['setActiveAnnotation'](_0xf9af1f);}}),this['listenTo'](_0x3c6307,'_deactivateAllAnnotations',()=>{for(const _0x3164bb of this['activeUIs'])this['_uis']['get'](_0x3164bb)['setActiveAnnotation'](null);}),this['listenTo'](_0x3c6307['_visibleAnnotations'],'add',(_0x2e3315,_0x16219b)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x16219b);});}hasActive(){return this['activeUIs']['size']>0x0;}isActive(_0xf5dde1){return this['activeUIs']['has'](_0xf5dde1);}activate(_0x23437c,_0x7b1bf5=this['defaultFilter']){const _0xcee5d7=this['context']['plugins']['get'](ti);if(!this['_uis']['has'](_0x23437c))throw new _0x2e165a('annotationsuis-missing-ui',this,{'uiName':_0x23437c});this['isActive'](_0x23437c)&&this['deactivate'](_0x23437c),this['activeUIs']['add'](_0x23437c);const _0x13241b=new Jt();Qt({'source':_0xcee5d7['_visibleAnnotations'],'target':_0x13241b,'filter':_0x7b1bf5}),this['uisData']['set'](_0x23437c,{'collection':_0x13241b,'filter':_0x7b1bf5});const _0xd0371b=this['_uis']['get'](_0x23437c);_0xd0371b['attach'](_0x13241b),this['listenTo'](_0xd0371b,'change:activeAnnotation',(_0xdf6d78,_0x425d2f,_0x45ea34,_0x143978)=>{_0x143978&&_0xcee5d7['_removeActiveAnnotation'](_0x143978),_0x45ea34&&_0xcee5d7['_addActiveAnnotation'](_0x45ea34);});}deactivate(_0x27c50f){if(this['activeUIs']['delete'](_0x27c50f),!this['_uis']['has'](_0x27c50f))throw new _0x2e165a('annotationsuis-missing-ui',this,{'uiName':_0x27c50f});const _0x56ab85=this['_uis']['get'](_0x27c50f);_0x56ab85['detach'](),this['stopListening'](_0x56ab85),this['uisData']['get'](_0x27c50f)['collection']['destroy'](),this['uisData']['delete'](_0x27c50f);}switchTo(_0x1c9169){if(!this['_uis']['has'](_0x1c9169))throw new _0x2e165a('annotationsuis-missing-ui',this,{'uiName':_0x1c9169});const _0x2a397a=this['context']['plugins']['get'](ti),_0x245992=Array['from'](_0x2a397a['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x1c9169);const _0x5af095=this['_uis']['get'](_0x1c9169);_0x5af095['setActiveAnnotation'](_0x245992),_0x5af095['_setSelectedAnnotations']&&_0x245992&&_0x5af095['_setSelectedAnnotations']([_0x245992]);}deactivateAll(){for(const _0x5d8e61 of this['activeUIs'])this['deactivate'](_0x5d8e61);}register(_0x36e434,_0x1066e2){if(this['_uis']['has'](_0x36e434))throw new _0x2e165a('annotationsuis-register-already-registered');if('function'!=typeof _0x1066e2['attach']||'function'!=typeof _0x1066e2['detach']||'function'!=typeof _0x1066e2['setActiveAnnotation'])throw new _0x2e165a('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x36e434,_0x1066e2);}refilterAnnotations(){const _0x2ed4d2=this['context']['plugins']['get'](ti)['collection'],_0x4c9372=new Map(),_0x516da9=Array['from'](this['activeUIs']);for(const _0x45c360 of this['activeUIs']){const _0x77e7fd=this['uisData']['get'](_0x45c360)['collection'];for(const _0x2f8118 of _0x77e7fd)_0x4c9372['set'](_0x2f8118,_0x45c360);}for(const _0x4150ef of _0x2ed4d2){const _0x593b4f=_0x4c9372['get'](_0x4150ef);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4150ef);const _0x41daa4=_0x516da9['find'](_0x309a80=>this['uisData']['get'](_0x309a80)['filter'](_0x4150ef));_0x593b4f!==_0x41daa4&&(_0x593b4f&&this['uisData']['get'](_0x593b4f)['collection']['remove'](_0x4150ef),_0x41daa4&&this['uisData']['get'](_0x41daa4)['collection']['add'](_0x4150ef));}}destroy(){this['deactivateAll'](),super['destroy']();}defaultFilter(){return!0x0;}_assertAnnotationDoesNotBelongToMultipleUIs(_0x348d99){const _0x53b3cf=[];for(const _0x3fef83 of this['activeUIs']){(0x0,this['uisData']['get'](_0x3fef83)['filter'])(_0x348d99)&&_0x53b3cf['push'](_0x3fef83);}if(_0x53b3cf['length']>0x1)throw new _0x2e165a('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x53b3cf,'annotationType':_0x348d99['type']});}};const Ci=/* #__PURE__ -- @preserve */
32
- _0x82701f('px');var Ii=class extends ht{list;['focusables'];['focusTracker'];['focusCycler'];constructor(_0x4fa24b){super(_0x4fa24b);const _0x28f535=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 _0x8cfb02(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x28f535['to']('class')],'style':{'minHeight':_0x28f535['to']('minHeight',_0x11a991=>'number'==typeof _0x11a991?Ci(_0x11a991+0xa):null)},'dir':_0x4fa24b['uiLanguageDirection'],'role':'application','aria-label':Et(_0x4fa24b,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':Et(_0x4fa24b,'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',_0x1e522c=>{this['_updateItemPositionInFocusables'](_0x1e522c['source']);}),this['list']['forEach'](_0xde3715=>{this['focusTracker']['add'](_0xde3715['element']),this['_updateItemPositionInFocusables'](_0xde3715);}),this['list']['on']('change',(_0x5a699f,_0x218dc6)=>{for(const _0x4c0d62 of _0x218dc6['removed'])this['focusTracker']['remove'](_0x4c0d62['element']),this['focusables']['remove'](_0x4c0d62);for(const _0x4c9615 of _0x218dc6['added'])this['focusTracker']['add'](_0x4c9615['element']),this['_updateItemPositionInFocusables'](_0x4c9615);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}_updateItemPositionInFocusables(_0x490b7d){const _0x403515=this['focusables']['getIndex'](_0x490b7d);let _0x32f378,_0x116775;for(const _0x262930 of this['focusables'])if(_0x490b7d['top']<_0x262930['top']){_0x32f378=_0x262930;break;}if(_0x116775=_0x32f378?this['focusables']['getIndex'](_0x32f378):this['focusables']['length'],-0x1!==_0x403515){if(_0x403515===_0x116775-0x1)return;this['focusables']['remove'](_0x490b7d),_0x116775=_0x32f378?this['focusables']['getIndex'](_0x32f378):this['focusables']['length'];}this['focusables']['add'](_0x490b7d,_0x116775);}};const bi=/* #__PURE__ -- @preserve */
33
- _0x82701f('px');var Ei=class extends ht{content;_targetTop;_mutationObserver;constructor(_0x4f68b2){super(_0x4f68b2),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x219a43,_0x42c13c)=>_0x219a43+_0x42c13c),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x53c815=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x53c815['to']('isAnimationDisabled',_0x3bfa44=>_0x3bfa44?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x53c815['to']('top',_0x59c58b=>bi(_0x59c58b))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}updateHeight(){const _0x16807a=this['element']['clientHeight'];_0x16807a&&(this['height']=_0x16807a);}destroy(){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},ki=class extends _0x294fbc{['view'];_activeAnnotation;_annotations;_spaceBetweenItems;_sidebarItemViewToAnnotation;_annotationToSidebarItemView;_recalculateBuffer;static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x59d7d9){super(_0x59d7d9),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 _0x43d61f=this['context']['config']['get']('sidebar.container');_0x43d61f&&this['setContainer'](_0x43d61f);}setContainer(_0x34bfad){if(!Oi(_0x34bfad))throw new _0x2e165a('sidebar-setcontainer-invalid-element');this['container']=_0x34bfad;}_attachToContainer({viewClass:_0x498576='',spaceBetweenItems:_0x3b1394=0x19}={}){if(!Oi(this['container']))throw new _0x2e165a('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x498576,this['_spaceBetweenItems']=_0x3b1394;}['rearrange']({removedAnnotation:_0x49102b,previousAnnotation:_0x482439,nextAnnotation:_0x10a206}){const _0x33cd48=this['getSidebarItemView'](_0x49102b);this['view']['list']['remove'](_0x33cd48),this['_destroySidebarItemView'](_0x49102b),_0x482439&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x482439)),_0x10a206&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x10a206)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x1b9ae8,activatedAnnotation:_0xf0651,disableAnimationOnActivatedAnnotation:_0x1b30f0}){if(this['_activeAnnotation']=_0xf0651,_0x1b9ae8){_0x1b9ae8['isActive']=!0x1;const _0x2280da=this['getSidebarItemView'](_0x1b9ae8);_0x2280da&&_0x1b30f0&&(_0x2280da['isAnimationDisabled']=!0x1);}if(_0xf0651){const _0x59170a=this['getSidebarItemView'](_0xf0651);_0x59170a&&(_0xf0651['isActive']=!0x0,_0x1b30f0&&(_0x59170a['isAnimationDisabled']=!0x0,_0x59170a['top']+=0x1),this['_alignToTargetRect'](_0x59170a));}}_detachFromContainer(_0x2df678){if(this['view']['element']['remove'](),_0x2df678){for(const _0x2cde47 of _0x2df678)this['_destroySidebarItemView'](_0x2cde47);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}addAnnotation(_0x3ac30c,_0x3de314){_0x3de314||(_0x3de314=_0x3ac30c['view']);const _0x26f283=new Ei(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x26f283,_0x3ac30c),this['_annotationToSidebarItemView']['set'](_0x3ac30c,_0x26f283),_0x26f283['content']['add'](_0x3de314),this['listenTo'](_0x3ac30c['view'],'change:targetRect',(_0x25227c,_0x3e37e3,_0x37c569)=>{const _0x5c9578=this['_getTargetTop'](_0x3ac30c,_0x37c569);_0x26f283['_targetTop']!=_0x5c9578&&(_0x26f283['_targetTop']=_0x5c9578,this['_setItemTop'](_0x26f283,_0x5c9578));}),this['listenTo'](_0x26f283,'change:top',()=>{this['_recalculate'](_0x26f283,'top');}),this['listenTo'](_0x26f283,'change:bottom',()=>{this['_recalculate'](_0x26f283,'bottom');}),this['_alignToTargetRect'](_0x26f283);const _0x8e3fb=this['_getItemBefore'](_0x26f283);return _0x8e3fb&&this['_alignAfterItem'](_0x8e3fb,_0x26f283)||this['_alignToTargetRect'](_0x26f283),this['_updateLastItem'](),this['view']['list']['add'](_0x26f283),_0x26f283;}['_alignForTopChange'](_0x4fd4fb){if(!_0x4fd4fb['content']['length'])return;const _0x265a64=this['_getItemBefore'](_0x4fd4fb);if(!_0x265a64)return;const _0x571287=this['_sidebarItemViewToAnnotation']['get'](_0x265a64),_0x252552=this['_activeAnnotation'];_0x252552&&_0x252552===_0x571287?this['_alignAfterItem'](_0x265a64,_0x4fd4fb):this['_alignBeforeItem'](_0x4fd4fb,_0x265a64);}_alignForBottomChange(_0x30e41d){if(!_0x30e41d['content']['length'])return;const _0x44a422=this['_getItemAfter'](_0x30e41d);if(!_0x44a422)return;const _0x7d1efc=this['_sidebarItemViewToAnnotation']['get'](_0x44a422),_0x6e8b9b=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x20ee28=this['_activeAnnotation'];_0x20ee28&&_0x20ee28===_0x7d1efc&&_0x6e8b9b?(this['_alignBeforeItem'](_0x44a422,_0x30e41d),this['_alignAfterItem'](_0x30e41d,_0x44a422)):_0x20ee28&&_0x20ee28===_0x7d1efc?this['_alignBeforeItem'](_0x44a422,_0x30e41d):this['_alignAfterItem'](_0x30e41d,_0x44a422);}_recalculate(_0x78e1c5,_0xb7a57c){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x1bfa1f,changedProp:_0xecfff1}of this['_recalculateBuffer'])'top'===_0xecfff1?this['_alignForTopChange'](_0x1bfa1f):this['_alignForBottomChange'](_0x1bfa1f);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x78e1c5,'changedProp':_0xb7a57c});}getSidebarItemView(_0x78e31a){return this['_annotationToSidebarItemView']['get'](_0x78e31a);}destroy(){this['stopListening'](),this['view']['destroy']();}_destroySidebarItemView(_0x17c473){const _0x290a60=this['getSidebarItemView'](_0x17c473);this['stopListening'](_0x290a60),this['stopListening'](_0x17c473['view']),_0x290a60['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x17c473),this['_sidebarItemViewToAnnotation']['delete'](_0x290a60);}_createSidebarView(){const _0x1a3e8f=new Ii(this['context']['locale']);return _0x1a3e8f['render'](),this['on']('change:_lastItem',(_0xae36eb,_0x407467,_0x1ea7b7,_0x10047d)=>{_0x10047d&&_0x1a3e8f['unbind']('minHeight'),_0x1ea7b7?_0x1a3e8f['bind']('minHeight')['to'](_0x1ea7b7,'bottom'):_0x1a3e8f['minHeight']=null;}),_0x1a3e8f;}_updateLastItem(){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}_getItemBefore(_0x54c887){const _0x2f94e5=this['_sidebarItemViewToAnnotation']['get'](_0x54c887),_0x23d8ca=_0x2f94e5&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2f94e5)-0x1);return _0x23d8ca&&this['getSidebarItemView'](_0x23d8ca)||null;}_getItemAfter(_0x26529e){const _0xfba370=this['_sidebarItemViewToAnnotation']['get'](_0x26529e),_0x5bb178=_0xfba370&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0xfba370)+0x1);return _0x5bb178&&this['getSidebarItemView'](_0x5bb178)||null;}_alignBeforeItem(_0x447a2f,_0xe296e3){_0x447a2f['updateHeight']();const _0x3e6b86=Ni(_0xe296e3['bottom']+this['_spaceBetweenItems'],_0x447a2f['top']);return!!_0x3e6b86&&(this['_setItemTop'](_0xe296e3,_0xe296e3['top']-_0x3e6b86),!0x0);}_alignAfterItem(_0x5e8317,_0x358725){_0x5e8317['updateHeight']();const _0x6372ca=Ni(_0x5e8317['bottom']+this['_spaceBetweenItems'],_0x358725['top']);return!!_0x6372ca&&(this['_setItemTop'](_0x358725,_0x358725['top']+_0x6372ca,!0x1),!0x0);}_alignToTargetRect(_0x115e1f){const _0x1e0abb=this['_sidebarItemViewToAnnotation']['get'](_0x115e1f);if(!_0x1e0abb||!_0x1e0abb['target']||!_0x1e0abb['targetRect'])return;const _0x23d37a=this['_getTargetTop'](_0x1e0abb,_0x1e0abb['targetRect']);this['_setItemTop'](_0x115e1f,_0x23d37a);}_getTargetTop(_0x38b1c3,_0x4f0a81){if(null===_0x4f0a81)return 0x0;if(_0x38b1c3['target']instanceof _0x429aef)return _0x4f0a81['top'];{const _0xaeb016=new _0x429aef(this['view']['element'])['top'];return _0x4f0a81['top']-_0xaeb016;}}_setItemTop(_0x430a1f,_0x41301a,_0x45bde3=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x45bde3&&(_0x41301a=Math['max'](_0x41301a,this['_getMaxAvailableTop'](_0x430a1f))),_0x430a1f['top']=_0x41301a;}_getMaxAvailableTop(_0x2b6d5c){let _0x2d60c2=this['_getItemBefore'](_0x2b6d5c),_0x497b96=0x0;for(;_0x2d60c2;)_0x2d60c2['updateHeight'](),_0x497b96+=this['_spaceBetweenItems']+_0x2d60c2['height'],_0x2d60c2=this['_getItemBefore'](_0x2d60c2);return _0x497b96;}};function Ni(_0x4e5af5,_0x3e14b1){return Math['max'](_0x4e5af5-_0x3e14b1,0x0);}function Oi(_0x2d9c56){return null!==_0x2d9c56&&'object'==typeof _0x2d9c56&&0x1===_0x2d9c56['nodeType'];}var Mi=class extends _0x294fbc{isAttached;annotations;_editorAnnotations;_refreshPositioningDebounced;static get requires(){return[ki,Ti];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1919f2){super(_0x1919f2),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x5b969f(),this['_refreshPositioningDebounced']=_0x14ec54(()=>{_0x1919f2['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}init(){const _0x46cbba=this['context']['plugins']['get'](Ti),_0x5525f2=this['context']['plugins']['get'](ki);_0x46cbba['register']('wideSidebar',this),_0x5525f2['container']&&_0x46cbba['switchTo']('wideSidebar');}setActiveAnnotation(_0xf798c){if(_0xf798c===this['activeAnnotation'])return;const _0x43e553=this['context']['plugins']['get'](ki);_0x43e553['_activeAnnotation']=_0xf798c;const _0x27614c=this['activeAnnotation'];_0x43e553['refresh']({'blurredAnnotation':_0x27614c,'activatedAnnotation':_0xf798c}),this['activeAnnotation']=_0xf798c;}attach(_0x4535b4){this['annotations']=_0x4535b4;const _0x413ca6=this['context']['plugins']['get'](ki);if(_0x413ca6['_annotations']=_0x4535b4,this['isAttached'])throw new _0x2e165a('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x413ca6,'set:container',()=>{this['detach'](),this['listenTo'](_0x413ca6,'change:container',_0xa41af3=>{_0xa41af3['off'](),this['attach'](_0x4535b4);});}),_0x413ca6['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x439d83=_0x5a079d=>{_0x5a079d['updateTargetRect'](),_0x413ca6['addAnnotation'](_0x5a079d);};for(const _0x3c1409 of _0x4535b4)_0x439d83(_0x3c1409);this['listenTo'](_0x4535b4,'add',(_0x4e6521,_0x340dd5)=>{_0x439d83(_0x340dd5);}),this['listenTo'](_0x4535b4,'remove',(_0x53b7b8,_0x1c2118,_0x538d5d)=>{_0x413ca6['rearrange']({'removedAnnotation':_0x1c2118,'previousAnnotation':_0x4535b4['get'](_0x538d5d-0x1),'nextAnnotation':_0x4535b4['get'](_0x538d5d+0x1)}),_0x1c2118===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x4535b4,'focus',(_0x494db3,_0x74ca45)=>{this['setActiveAnnotation'](_0x74ca45);}),this['listenTo'](_0x4535b4,'blur',()=>{this['setActiveAnnotation'](null);});const _0x12ac65=this['context']instanceof _0x2545f7?this['context']['editors']:new _0x5b969f([this['context']]);for(const _0x56828c of _0x12ac65)this['_integrateWithEditorAnnotations'](_0x56828c);this['listenTo'](_0x12ac65,'add',(_0x34b60d,_0x37c5e2)=>{this['listenTo'](_0x37c5e2,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x37c5e2);});}),this['listenTo'](_0x12ac65,'remove',(_0x4a1870,_0x27745b)=>{_0x27745b['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x27745b['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}detach(){if(!this['isAttached'])throw new _0x2e165a('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x145abe=this['context']['plugins']['get'](ki);_0x145abe['_detachFromContainer'](this['annotations']),this['stopListening'](_0x145abe),this['stopListening'](this['annotations']),this['context']instanceof _0x2545f7&&this['stopListening'](this['context']['editors']);for(const _0x533966 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x533966);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach']();}_integrateWithEditorAnnotations(_0x2aa0a6){if(!_0x2aa0a6['plugins']['has']('EditorAnnotations'))return;const _0x2b0afd=_0x2aa0a6['plugins']['get']('EditorAnnotations'),_0x5928c4=()=>{const _0x17a877=_0x2b0afd['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x17a877[0x0]||null);};this['listenTo'](_0x2b0afd,'refresh',_0x5928c4),this['listenTo'](_0x2b0afd,'blur',(_0x38cfe8,{isAnnotationTracked:_0x3dd93f})=>{this['activeAnnotation']&&_0x3dd93f(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x2b0afd,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x206a3a=>{_0x2b0afd['hasDomSelection']()&&(_0x5928c4(),_0x206a3a['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2b0afd);}_destroyEditorAnnotationsIntegration(_0x29ee2c){this['stopListening'](_0x29ee2c),this['_editorAnnotations']['remove'](_0x29ee2c);}},Ri=class extends _0x9183d3{counterView;constructor(_0x10dbc2){super(_0x10dbc2);const _0xa964d0=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x3d5d69,_0x3ecf67)=>_0x3d5d69?'...':_0x3ecf67['toString']()),this['set']('annotationType',''),this['icon']=_0x2ea43a,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new ht(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0xa964d0['to']('annotationType',_0x1ce092=>'ck-annotation-counter__badge--'+_0x1ce092),_0xa964d0['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0xa964d0['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Si=class extends _0x294fbc{isAttached;annotations;_manuallyClosedAnnotationViews;_domEmitter;_annotationToNarrowView;_selectedAnnotations;_editorAnnotations;_refreshPositioningDebounced;static get requires(){return[ki,Ti];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x43684e){super(_0x43684e),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x45b7dc())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x5b969f(),this['_refreshPositioningDebounced']=_0x14ec54(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}init(){this['context']['plugins']['get'](Ti)['register']('narrowSidebar',this),this['bodyCollection']=new _0x4bd546(this['context']['locale']),this['balloonPanelView']=new _0x264bb3(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}attach(_0x4e3bc4){this['annotations']=_0x4e3bc4;const _0x331b72=this['context']['plugins']['get'](ki),_0xf56290=this['balloonPanelView'];if(_0x331b72['_annotations']=_0x4e3bc4,this['isAttached'])throw new _0x2e165a('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x331b72,'set:container',()=>{this['detach'](),this['listenTo'](_0x331b72,'change:container',_0x45ac40=>{_0x45ac40['off'](),this['attach'](_0x4e3bc4);});}),_0x331b72['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x5cf5f9=_0x417c3c=>{const _0x37e62d=new Ri(this['context']['locale']);_0x331b72['addAnnotation'](_0x417c3c,_0x37e62d),this['_annotationToNarrowView']['set'](_0x417c3c,_0x37e62d),_0x37e62d['bind']('isDirty','annotationType','number')['to'](_0x417c3c['view'],'isDirty','type','length'),_0x37e62d['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0xf56290['content']['first']!==_0x417c3c['view']?(this['_showBalloon'](_0x417c3c),_0x417c3c['view']['element']['focus'](),this['setActiveAnnotation'](_0x417c3c)):this['setActiveAnnotation'](null);});};for(const _0x1fea37 of _0x4e3bc4)_0x5cf5f9(_0x1fea37);this['listenTo'](_0x4e3bc4,'add',(_0x2ad085,_0x15b4bd)=>{_0x5cf5f9(_0x15b4bd);}),this['listenTo'](_0x4e3bc4,'remove',(_0x7a1f4,_0x300f3f,_0x2def40)=>{this['_annotationToNarrowView']['get'](_0x300f3f)['destroy'](),this['_annotationToNarrowView']['delete'](_0x300f3f),_0x331b72['rearrange']({'removedAnnotation':_0x300f3f,'previousAnnotation':_0x4e3bc4['get'](_0x2def40-0x1),'nextAnnotation':_0x4e3bc4['get'](_0x2def40+0x1)}),_0x300f3f===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x4e3bc4,'focus',(_0x15646a,_0x1cea58)=>{this['setActiveAnnotation'](_0x1cea58);}),this['listenTo'](_0x4e3bc4,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x240877,_0x2c1714)=>{_0x2c1714['keyCode']===_0x5cd2c9['esc']&&_0xf56290['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0xf56290['content']['first']),this['_hideBalloon'](),_0x2c1714['stopPropagation'](),_0x2c1714['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x36df51,_0x2021a4)=>{const _0x3f9516=_0x2021a4['target'];_0xf56290['isVisible']&&_0xf56290['element']['contains'](_0x3f9516)||_0x331b72['view']['element']['contains'](_0x3f9516)||_0x36df51['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x3f21a8=>_0x3f21a8['contains'](_0x3f9516))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x665f3f=this['context']instanceof _0x2545f7?this['context']['editors']:new _0x5b969f([this['context']]);for(const _0x133f65 of _0x665f3f)this['_integrateWithEditorAnnotations'](_0x133f65);this['listenTo'](_0x665f3f,'add',(_0x5c9b19,_0x337c7d)=>{this['listenTo'](_0x337c7d,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x337c7d);});}),this['listenTo'](_0x665f3f,'remove',(_0x1f33e3,_0x4c2bec)=>{_0x4c2bec['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4c2bec['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}setActiveAnnotation(_0x9b9591){if(_0x9b9591===this['activeAnnotation'])return;const _0x28b40a=this['context']['plugins']['get'](ki);_0x28b40a['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x9b9591,'disableAnimationOnActivatedAnnotation':!0x0}),_0x9b9591&&_0x28b40a['getSidebarItemView'](_0x9b9591)?this['_showBalloon'](_0x9b9591):this['_hideBalloon'](),this['activeAnnotation']=_0x9b9591;}detach(){if(!this['isAttached'])throw new _0x2e165a('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5d419f=this['context']['plugins']['get'](ki);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x5877cc=>_0x5877cc['destroy']()),this['_annotationToNarrowView']['clear'](),_0x5d419f['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x2545f7&&this['stopListening'](this['context']['editors']);for(const _0x122bde of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x122bde);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['_selectedAnnotations']=[],this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach'](),this['bodyCollection']['detachFromDom']();}_integrateWithEditorAnnotations(_0x3e4444){if(!_0x3e4444['plugins']['has']('EditorAnnotations'))return;const _0x46bd41=_0x3e4444['plugins']['get']('EditorAnnotations'),_0x5ad800=this['context']['plugins']['get'](ki),_0x42bb6a=this['annotations'],_0x166182=this['balloonPanelView'],_0x53b2cd=()=>{const _0x38c8d9=_0x46bd41['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x38c8d9),this['setActiveAnnotation'](_0x38c8d9[0x0]||null);};this['listenTo'](_0x46bd41,'refresh',_0x53b2cd),this['listenTo'](_0x46bd41,'blur',(_0x59a752,{isAnnotationTracked:_0x2bf23d})=>{this['activeAnnotation']&&_0x2bf23d(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x46bd41,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x42bb6a,'blur',_0x175f47=>{_0x46bd41['hasDomSelection']()&&_0x175f47['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x490962,_0xd0bc5e)=>{const _0x2db6ff=_0xd0bc5e['target'];_0x166182['isVisible']&&_0x166182['element']['contains'](_0x2db6ff)||_0x5ad800['view']['element']['contains'](_0x2db6ff)||this['activeAnnotation']&&_0x46bd41['hasDomSelection']()&&(_0x53b2cd(),_0x490962['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x46bd41);}_destroyEditorAnnotationsIntegration(_0xf7be58){_0xf7be58&&(this['stopListening'](_0xf7be58),this['_editorAnnotations']['remove'](_0xf7be58));}_setSelectedAnnotations(_0x4a85e3){for(const _0x2ee55b of this['_selectedAnnotations'])_0x4a85e3['includes'](_0x2ee55b)||this['_manuallyClosedAnnotationViews']['delete'](_0x2ee55b['view']);this['_selectedAnnotations']=_0x4a85e3;}_refreshPositioning(){const _0x329564=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x329564['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x297622){if(this['_manuallyClosedAnnotationViews']['has'](_0x297622['view']))return;const _0x9731a6=this['balloonPanelView']['content']['first'];_0x9731a6!==_0x297622['view']?(_0x9731a6&&this['_detachListeners'](_0x9731a6),this['_attachListeners'](_0x297622['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x297622['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}_updateBalloonPosition(){const _0x3a5277=this['balloonPanelView']['content']['first'],_0x3a423b=_0x3a5277&&this['annotations']['getByView'](_0x3a5277);if(!_0x3a423b||!this['_annotationToNarrowView']['has'](_0x3a423b))return;const _0x290908=this['_annotationToNarrowView']['get'](_0x3a423b)['element'],_0x4d702e=(function(){const _0x2fa2cd=_0x264bb3['defaultPositions'];return[_0x2fa2cd['southArrowNorthEast'],_0x2fa2cd['northArrowSouthEast'],_0x2fa2cd['southArrowNorth'],_0x2fa2cd['northArrowSouth'],_0x2fa2cd['southArrowNorthWest'],_0x2fa2cd['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x290908,'positions':_0x4d702e});}['_hideBalloon'](){const _0x285767=this['balloonPanelView'],_0x237b78=_0x285767['content']['first'];_0x237b78&&(this['_detachListeners'](_0x237b78),_0x285767['unpin'](),_0x285767['content']['clear']());}_attachListeners(_0x589330){this['listenTo'](_0x589330,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x589330,'Esc',(_0x39fd51,_0x3d9e97)=>{this['_manuallyClosedAnnotationViews']['add'](_0x589330),this['_hideBalloon'](),_0x3d9e97();});}_detachListeners(_0x19c557){this['stopListening'](_0x19c557);}},xi=class extends _0x479b71{isAttached;annotations;['_manuallyClosed'];['_balloon'];_addedAnnotations;_selectedAnnotations;['_forceRefresh'];_refreshVisibilityDebounced;static get requires(){return[di,_0x187251,Ti];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x22f9d5){super(_0x22f9d5),_0x22f9d5['editing']['view']['addObserver'](lt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x22f9d5['plugins']['get'](_0x187251),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x14ec54(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}init(){const _0x3a0abc=this['editor']['plugins']['get'](Ti);_0x3a0abc['context']===this['editor']&&(_0x3a0abc['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x28f1b3,_0x58f23d)=>{const _0x1c4be2=this['_balloon'];if(this['isAttached']&&_0x1c4be2['visibleView']){const _0x4a81b1=this['annotations']['getByView'](_0x1c4be2['visibleView']);_0x4a81b1&&this['_closeAnnotation'](_0x4a81b1),_0x58f23d();}}));}afterInit(){const _0x1eaa63=this['editor']['plugins']['get'](Ti);_0x1eaa63['context']===this['editor']&&(_0x1eaa63['hasActive']()||_0x1eaa63['switchTo']('inline'));}setActiveAnnotation(_0xa1c298){_0xa1c298!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0xa1c298&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0xa1c298)&&this['_addAnnotationToBalloon'](_0xa1c298,!0x0),_0xa1c298['isActive']=!0x0),_0xa1c298||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0xa1c298);}attach(_0x6d162d){this['annotations']=_0x6d162d;const _0x3a678c=this['editor']['plugins']['get'](Ti),_0x4d7b20=this['_balloon'];if(this['isAttached'])throw new _0x2e165a('inlineannotations-attach-already-attached',this);if(_0x3a678c['context']!==this['editor'])throw new _0x2e165a('inlineannotations-not-allowed-with-context',this);const _0x5c56f=this['editor']['plugins']['get'](di);this['listenTo'](_0x5c56f,'refresh',()=>{const _0xc13aba=_0x5c56f['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x48c0b8,_0x5befe2;!this['_forceRefresh']&&(_0x48c0b8=_0xc13aba,_0x5befe2=this['_selectedAnnotations'],_0x48c0b8['length']===_0x5befe2['length']&&_0x48c0b8['every'](_0x2263f7=>_0x5befe2['includes'](_0x2263f7)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0xc13aba),this['setActiveAnnotation'](_0xc13aba[0x0]||null));}),this['listenTo'](_0x5c56f,'blur',(_0x34a274,{isAnnotationTracked:_0x8fabf9})=>{this['activeAnnotation']&&_0x8fabf9(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x5c56f,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x2d8df2,_0x3e9aff,_0x2a09c0)=>{_0x2a09c0||this['setActiveAnnotation'](null);}),this['listenTo'](_0x6d162d,'remove',(_0x56040d,_0x2ba6bb)=>{this['_removeAnnotationFromBalloon'](_0x2ba6bb),_0x2ba6bb===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x4d7b20,'change:visibleView',(_0x5ab3dd,_0x284174,_0x1091f0,_0x223ffa)=>{_0x223ffa&&this['stopListening'](_0x223ffa);const _0x3aaca0=_0x6d162d['getByView'](_0x1091f0);_0x1091f0&&_0x3aaca0&&(this['listenTo'](_0x1091f0,'change:height',()=>{_0x4d7b20['updatePosition']();}),this['listenTo'](_0x1091f0,'Esc',()=>{this['_closeAnnotation'](_0x3aaca0),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x3aaca0&&this['setActiveAnnotation'](_0x3aaca0));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x4d7b20['visibleView']&&_0x6d162d['getByView'](_0x4d7b20['visibleView'])&&_0x4d7b20['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 _0x2e165a('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x1d557f of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x1d557f);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}_setSelectedAnnotations(_0x1e8009){for(const _0x3a70c8 of this['_selectedAnnotations'])_0x1e8009['includes'](_0x3a70c8)||this['_manuallyClosed']['delete'](_0x3a70c8);for(const _0x3cae99 of this['annotations'])_0x1e8009['includes'](_0x3cae99)||this['_removeAnnotationFromBalloon'](_0x3cae99);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x2bcc66 of _0x1e8009)this['_addAnnotationToBalloon'](_0x2bcc66);}this['_selectedAnnotations']=_0x1e8009;}_addAnnotationToBalloon(_0x1a7b31,_0x2f3c8a=!0x1){this['_manuallyClosed']['has'](_0x1a7b31)||(this['_addedAnnotations']['has'](_0x1a7b31)||this['_balloon']['hasView'](_0x1a7b31['view'])||(this['_addedAnnotations']['add'](_0x1a7b31),this['_balloon']['add']({'stackId':_0x1a7b31['view']['id'],'view':_0x1a7b31['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x1a7b31)}})),_0x2f3c8a&&this['_balloon']['showStack'](_0x1a7b31['view']['id']));}_getBalloonTargetForAnnotation(_0x59bd1c){const _0x21f2ca=_0x59bd1c['target'],_0x21b30a=this['editor']['editing']['view'],_0x2dfdfc=_0x21b30a['document']['selection']['getFirstRange'](),_0x274e02=_0x21b30a['domConverter']['viewRangeToDom'](_0x2dfdfc);if(_0x274e02['collapse'](!0x0),_0x21f2ca){if(_0x21f2ca instanceof _0x429aef)return _0x21f2ca;let _0x37846a=[];for(const _0x5d46db of _0x21f2ca)_0x37846a['push'](..._0x429aef['getDomElementRects'](_0x5d46db));_0x37846a=function(_0x38fbc4){const _0x3f2cdf=[];let _0x4da1ee=_0x38fbc4[0x0];for(let _0x134fd3=0x1;_0x134fd3<_0x38fbc4['length'];_0x134fd3++)if(Pi(_0x4da1ee,_0x38fbc4[_0x134fd3])){const _0x4cb181=_0x38fbc4[_0x134fd3]['width'];_0x4da1ee['width']+=_0x4cb181,_0x4da1ee['right']+=_0x4cb181;}else _0x3f2cdf['push'](_0x4da1ee),_0x4da1ee=_0x38fbc4[_0x134fd3];return _0x3f2cdf['push'](_0x4da1ee),_0x3f2cdf;}(_0x37846a);const _0x3754c7=_0x274e02['getBoundingClientRect']();return _0x37846a['find'](_0x59a43e=>_0x59a43e['top']<=_0x3754c7['top']&&_0x59a43e['bottom']>=_0x3754c7['bottom']&&_0x59a43e['left']<=_0x3754c7['left']&&_0x59a43e['right']>=_0x3754c7['right'])||_0x37846a[0x0];}return _0x59bd1c['targetRect']||_0x274e02;}_removeAnnotationFromBalloon(_0x379f89){this['_addedAnnotations']['has'](_0x379f89)&&this['_balloon']['hasView'](_0x379f89['view'])&&(this['_addedAnnotations']['delete'](_0x379f89),this['_balloon']['remove'](_0x379f89['view']));}_closeAnnotation(_0x46ac01){this['_manuallyClosed']['add'](_0x46ac01),this['_removeAnnotationFromBalloon'](_0x46ac01);}};function Pi(_0x1a6af9,_0x19ca1c){return _0x1a6af9['top']===_0x19ca1c['top']&&_0x1a6af9['bottom']===_0x19ca1c['bottom']&&_0x1a6af9['right']===_0x19ca1c['left'];}var Li=class extends ht{['focusTracker'];['focusCycler'];_annotationViews;constructor(_0x6a10db,_0x56960f){super(_0x6a10db),this['set']('isEmpty',!_0x56960f['length']),this['focusTracker']=new _0x8cfb02(),this['_annotationViews']=_0x56960f,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new et({'focusables':_0x56960f,'focusTracker':this['focusTracker']}),this['listenTo'](_0x56960f,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x56960f,'remove',(_0x4ee0b0,_0x484d08)=>{_0x484d08['isActive']&&this['focus'](),_0x56960f['length']||(this['isEmpty']=!0x0);});const _0xa37b97=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':Et(_0x6a10db,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x56960f},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0xa37b97['if']('isEmpty','ck-hidden',_0x421178=>!_0x421178)]},'children':[{'text':Et(_0x6a10db,'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 _0x47b41f of this['_annotationViews'])this['focusTracker']['add'](_0x47b41f['element']);this['_annotationViews']['on']('change',(_0x79fcc3,{added:_0x3776b3,removed:_0x30460e})=>{for(const _0x5dd861 of _0x3776b3)this['focusTracker']['add'](_0x5dd861['element']);for(const _0x27b7ab of _0x30460e)this['focusTracker']['remove'](_0x27b7ab['element']);});}},Di=class extends _0x294fbc{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[oi,ti];}constructor(_0x16b500){super(_0x16b500),this['archivedThreads']=new _0x5b969f();}init(){const _0xaaa00c=this['context'],_0x2f099c=_0xaaa00c['plugins']['get'](oi),_0x15ff02=_0xaaa00c['plugins']['get'](ti);this['listenTo'](_0x2f099c,'addCommentThread',(_0x36c116,{threadId:_0x6e56f})=>{const _0x1678ec=_0x2f099c['getCommentThread'](_0x6e56f);_0x1678ec['archivedAt']&&this['archivedThreads']['add'](_0x1678ec,this['_calculatePosition'](_0x1678ec['archivedAt'])),this['listenTo'](_0x1678ec,'change:archivedAt',(_0x3f4217,_0x2829bc,_0x37a690)=>{_0x37a690?this['archivedThreads']['has'](_0x1678ec)||this['archivedThreads']['add'](_0x1678ec,this['_calculatePosition'](_0x1678ec['archivedAt'])):this['archivedThreads']['has'](_0x1678ec)&&this['archivedThreads']['remove'](_0x1678ec);});}),this['listenTo'](_0x2f099c,'removeCommentThread',(_0x3facef,{threadId:_0x2a44ca})=>{const _0x34f84e=_0x2f099c['getCommentThread'](_0x2a44ca);this['stopListening'](_0x34f84e),this['archivedThreads']['has'](_0x34f84e)&&this['archivedThreads']['remove'](_0x34f84e);},{'priority':'highest'}),this['listenTo'](_0x15ff02['collection'],'focus',(_0x3bf7f7,_0x1fdd9a)=>{_0x1fdd9a['isVisible']||(_0x1fdd9a['isActive']=!0x0,_0x15ff02['activate'](_0x1fdd9a));});}_calculatePosition(_0x5eb587){const _0x83c3ea=[...this['archivedThreads']]['findIndex'](_0x3d6c22=>_0x3d6c22['archivedAt']<_0x5eb587);return _0x83c3ea>-0x1?_0x83c3ea:this['archivedThreads']['length'];}},Vi=class extends _0x479b71{commentsArchiveView;annotationViews;['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Di,_0x44c8bf];}constructor(_0x2f4491){super(_0x2f4491),this['annotationViews']=new at(),this['_pendingThreads']=[];}init(){const _0x129fbf=this['editor'],_0x267f7d=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x129fbf['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x9183d3,!0x0)),_0x129fbf['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x165d5b=this['_createCommentsArchiveButton'](rt);return _0x165d5b['set']({'role':'menuitemcheckbox'}),_0x165d5b;});const _0x1e63ee=_0x129fbf['plugins']['get'](Di),_0x3096c3=_0x129fbf['plugins']['get']('Annotations'),_0x23d57b=_0x129fbf['plugins']['get']('CommentsRepository');_0x1e63ee['archivedThreads']['forEach'](_0x1e3786=>{this['_handleNewThread'](_0x1e3786);}),this['listenTo'](_0x1e63ee['archivedThreads'],'add',(_0x3cf495,_0x4dffb7)=>{this['_handleNewThread'](_0x4dffb7);}),this['listenTo'](_0x3096c3['collection'],'add',(_0x485351,_0x4c1b1d)=>{const _0x1dbc89=this['_pendingThreads']['find'](_0x22b9c2=>{const _0x2af52e=_0x23d57b['_threadToController']['get'](_0x22b9c2);return _0x2af52e&&_0x4c1b1d['innerView']===_0x2af52e['view'];});if(_0x1dbc89){const _0x39b886=this['_calculatePosition'](_0x1dbc89['archivedAt']);this['_addAnnotationToArchive'](_0x4c1b1d,_0x39b886),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x1dbc89),0x1);}}),this['listenTo'](_0x1e63ee['archivedThreads'],'remove',(_0xad703,_0x5f4ddc)=>{const _0x22a8dd=_0x129fbf['config']['get']('collaboration.channelId');if(!_0x22a8dd||_0x5f4ddc['channelId']===_0x22a8dd){if(this['_pendingThreads']['includes'](_0x5f4ddc))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x5f4ddc),0x1);else{const _0x5e3e19=_0x23d57b['_threadToController']['get'](_0x5f4ddc),_0x5657c2=_0x3096c3['getByInnerView'](_0x5e3e19['view']);this['annotationViews']['remove'](_0x5657c2['view']),this['stopListening'](_0x5657c2),this['stopListening'](_0x5657c2['focusableElements']);}}}),this['listenTo'](_0x3096c3['collection'],'add',(_0x2a0298,_0x10c975)=>{this['listenTo'](_0x10c975,'escape',_0x267f7d);}),this['listenTo'](_0x3096c3['collection'],'remove',(_0x33644e,_0x49d97a)=>{this['stopListening'](_0x49d97a,'escape',_0x267f7d);});}_addAnnotationToArchive(_0x4f0526,_0x5da407){this['listenTo'](_0x4f0526,'set:isVisible',_0x35b105=>{_0x35b105['return']=!0x1,_0x35b105['stop']();}),this['annotationViews']['add'](_0x4f0526['view'],_0x5da407);}['_handleNewThread'](_0x5c63df){const _0x3f17c0=this['editor']['plugins']['get']('CommentsRepository'),_0x3aad27=this['editor']['plugins']['get']('Annotations'),_0x4fbd0a=this['editor']['config']['get']('collaboration.channelId');if(!_0x4fbd0a||_0x5c63df['channelId']===_0x4fbd0a){const _0x2ddaf4=_0x3f17c0['_threadToController']['get'](_0x5c63df);if(!_0x2ddaf4)return void this['_pendingThreads']['push'](_0x5c63df);const _0x265ac2=this['_calculatePosition'](_0x5c63df['archivedAt']),_0x1844d6=_0x3aad27['getByInnerView'](_0x2ddaf4['view']);_0x1844d6['isVisible']&&_0x3aad27['_visibleAnnotations']['remove'](_0x1844d6),this['_addAnnotationToArchive'](_0x1844d6,_0x265ac2);}}_calculatePosition(_0x2663ff){const _0x263851=this['editor']['config']['get']('collaboration.channelId'),_0x190213=[...this['editor']['plugins']['get'](Di)['archivedThreads']]['filter'](_0x4ba689=>_0x4ba689['channelId']===_0x263851)['findIndex'](_0x13fc5f=>_0x13fc5f['archivedAt']<_0x2663ff);return _0x190213<0x0||_0x190213>this['annotationViews']['length']?this['annotationViews']['length']:_0x190213-0x1;}_toggleDialog(){const _0xefb56f=this['editor'],_0xb333cf=_0xefb56f['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Li(_0xefb56f['locale'],this['annotationViews'])),'commentsArchive'===_0xb333cf['id']?_0xb333cf['hide']():_0xb333cf['show']({'id':'commentsArchive','title':Et(_0xefb56f['locale'],'COMMENTS_ARCHIVE'),'icon':_0x5a2249,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x5b717c['EDITOR_TOP_SIDE']});}_createCommentsArchiveButton(_0x15e52a,_0x5e3ae3=!0x1){const _0x21ac66=this['editor']['locale'],_0x5b91bf=this['editor']['plugins']['get']('Dialog'),_0x15a2a3=new _0x15e52a(_0x21ac66);return _0x15a2a3['bind']('isEnabled')['to'](this,'isEnabled'),_0x15a2a3['bind']('isOn')['to'](_0x5b91bf,'id',_0x52f780=>'commentsArchive'===_0x52f780),_0x15a2a3['set']({'label':Et(_0x21ac66,'COMMENTS_ARCHIVE'),'icon':_0x5a2249,'isToggleable':!0x0}),_0x5e3ae3&&(_0x15a2a3['tooltip']=!0x0),this['listenTo'](_0x15a2a3,'execute',()=>this['_toggleDialog']()),_0x15a2a3;}_hideDialogOnAnnotationEscape=_0x13e0d0=>{const _0x430597=_0x13e0d0['source'];if(!this['annotationViews']['has'](_0x430597['view']))return;const _0x14a58d=this['editor']['plugins']['get']('Dialog');_0x14a58d['isOpen']&&'commentsArchive'===_0x14a58d['id']&&(_0x14a58d['hide'](),_0x13e0d0['stop']());};},Bi=class extends _0x479b71{static get requires(){return[oi,wi,vi,Di,Vi,yi,Mi,Si,xi];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{ci as AddCommentThreadCommand,$t as Annotation,Jt as AnnotationCollection,Ri as AnnotationCounterButtonView,qt as AnnotationView,ti as Annotations,Ei as AnnotationsSidebarItemView,Ii as AnnotationsSidebarView,Ti as AnnotationsUIs,Ht as BaseCommentThreadView,Kt as BaseCommentView,hi as Comment,ri as CommentThread,bt as CommentThreadController,xt as CommentThreadInputView,Ut as CommentThreadView,Yt as CommentView,Bi as Comments,Di as CommentsArchive,Vi as CommentsArchiveUI,wi as CommentsEditing,Lt as CommentsListView,yi as CommentsOnly,oi as CommentsRepository,vi as CommentsUI,di as EditorAnnotations,xi as InlineAnnotations,Si as NarrowSidebar,ki as Sidebar,Mi as WideSidebar,Qt as bindAnnotationCollections};
23
+ import{Command as _0x2c1906,Context as _0x2ed90d,ContextPlugin as _0x5bc735,Editor as _0x4c61cd,PendingActions as _0x1082ad,Plugin as _0x573609}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x4542a4,Collection as _0x3a878e,DomEmitterMixin as _0x3b6b98,FocusTracker as _0x1bc134,KeystrokeHandler as _0x4d6908,ObservableMixin as _0x4c9f3d,Rect as _0x5b8deb,diff as _0x45fda3,first as _0x1f79f6,getEnvKeystrokeText as _0x26c345,keyCodes as _0x48080c,priorities as _0x4d0af8,scrollViewportToShowTarget as _0x3cbb74,toUnit as _0x16910d,uid as _0x31754c}from'@ckeditor/ckeditor5-utils';import{AriaDescriptionView as _0x3790e4,ConfirmMixin as _0x35f372,FOCUS_ANNOTATION_KEYSTROKE as _0x5bd6c1,LateFocusButtonView as _0x24e2a6,LateFocusDropdownButtonView as _0x496921,UserView as _0x3d8fe9,Users as _0x459e31,getAllMarkersDomElementsSorted as _0xb56ba2,getDateTimeFormatter as _0x167475,hashObject as _0x463e81,setupThreadKeyboardNavigation as _0x2e9506,surroundingMarkersDetector as _0x487256,trimHtml as _0x4effb0}from'@ckeditor/ckeditor5-collaboration-core';import{cloneDeep as _0x271638,debounce as _0x130064,isEqual as _0x3b95fa,set as _0x25aad1,throttle as _0x3ca525,unset as _0x263f15}from'es-toolkit/compat';import{IconAddComment as _0x38462c,IconCheck as _0x3e8464,IconCommentsArchive as _0x4e5e21,IconPencil as _0x4a5bbc,IconRemoveComment as _0x3a211c,IconThreeVerticalDots as _0x289b19,IconUndo as _0x2afc5d}from'@ckeditor/ckeditor5-icons';import{BalloonPanelView as _0x4e0b34,BodyCollection as _0x4a5e13,ButtonView as _0x4695a0,ContextualBalloon as _0x4d63f2,Dialog as _0x5dfd34,DialogViewPosition as _0x10710f,EditorUI as tt,EditorUIView as it,FocusCycler as et,InlineEditableUIView as st,ListItemView as nt,ListView as ot,MenuBarMenuListItemButtonView as rt,View as ht,ViewCollection as at,createDropdown as ct,focusChildOnDropdownOpen as dt}from'@ckeditor/ckeditor5-ui';import{MouseObserver as lt,disableViewPlaceholder as mt,enableViewPlaceholder as ut}from'@ckeditor/ckeditor5-engine';import{Clipboard as ft,ClipboardMarkersUtils as pt,ClipboardPipeline as wt}from'@ckeditor/ckeditor5-clipboard';import{Enter as gt,ShiftEnter as _t}from'@ckeditor/ckeditor5-enter';import{SelectAll as At}from'@ckeditor/ckeditor5-select-all';import{Typing as vt}from'@ckeditor/ckeditor5-typing';import{Undo as yt}from'@ckeditor/ckeditor5-undo';import{Paragraph as Tt}from'@ckeditor/ckeditor5-paragraph';import{toWidget as Ct}from'@ckeditor/ckeditor5-widget';const It=/* #__PURE__ -- @preserve */
24
+ _0x4c9f3d();var bt=class extends It{['model'];['view'];constructor(_0x274157,_0x180789){super(),this['model']=_0x274157,this['model']['_isAttached']=!0x0,this['view']=_0x180789,this['listenTo'](_0x180789,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x180789,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x180789,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x180789,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x180789,'addComment',(_0x18d969,_0x5bf82d)=>this['addComment'](_0x5bf82d)),this['listenTo'](_0x180789,'updateComment',(_0x5e8c6f,_0x3e7ada,_0x4d3504)=>this['updateComment'](_0x3e7ada,_0x4d3504)),this['listenTo'](_0x180789,'removeComment',(_0x1f4c1e,_0x31d0ce)=>this['removeComment'](_0x31d0ce));}submit(){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}addComment(_0x45c33b){this['model']['addComment']({'content':_0x45c33b,'authorId':this['view']['_localUser']['id']});}updateComment(_0x32b35e,_0x348418){this['model']['getComment'](_0x32b35e)['update']({'content':_0x348418});}removeComment(_0x5ca7cd){this['model']['getComment'](_0x5ca7cd)['remove']();}destroy(){this['stopListening'](),this['model']['_isAttached']=!0x1;}};function Et(_0x193458,_0x163e95,_0x1d7206){const t=_0x193458['t'];switch(_0x163e95){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'},_0x1d7206);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'},_0x1d7206);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'},_0x1d7206);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'},_0x1d7206);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x1d7206);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'},_0x1d7206);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'},_0x1d7206);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'},_0x1d7206);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 kt=class extends it{['main'];editable;constructor(_0x1c024f,_0x21004e){super(_0x1c024f);const _0xfd367e=_0x31754c();this['main']=this['createCollection'](),this['editable']=new st(_0x1c024f,_0x21004e,void 0x0,{'label':()=>Et(_0x1c024f,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x1c024f['uiLanguageDirection'],'lang':_0x1c024f['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0xfd367e},'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']();}},Nt=class extends tt{['view'];constructor(_0x515693){super(_0x515693),this['view']=new kt(_0x515693['locale'],_0x515693['editing']['view']);}get element(){return this['view']['element'];}init(){const _0x10566f=this['editor']['editing']['view'],_0x9edc6f=this['view']['editable'];_0x9edc6f['name']=_0x10566f['document']['getRoot']()['rootName'],this['view']['render']();const _0x227719=_0x9edc6f['element'];this['setEditableElement'](_0x9edc6f['name'],_0x227719),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x10566f['attachDomRoot'](_0x227719),this['fire']('ready');}destroy(){super['destroy'](),this['view']['destroy']();}};const Ot=[ft,gt,_t,At,vt,yt,Tt],Mt=/* #__PURE__ -- @preserve */
25
+ _0x4c9f3d(_0x4c61cd);var Rt=class CommentEditor extends Mt{static defaultPlugins=/* #__PURE__ -- @preserve */
26
+ ((()=>Ot)());constructor(_0x532b80={}){(_0x532b80=Object['assign']({},_0x532b80))['plugins']||(_0x532b80['plugins']=CommentEditor['defaultPlugins']),super(_0x532b80),this['ui']=new Nt(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 _0x2b4a5e=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x2b4a5e))['then'](()=>this['fire']('ready'));}destroy(){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x28bbe5=>{const _0x112750=this['model']['document']['getRoot'](),_0x38f415=_0x112750&&_0x112750['getChild'](_0x112750['childCount']-0x1);_0x28bbe5['setSelection'](_0x38f415,'end'),this['editing']['view']['focus']();});}_updatePlaceholder(){const _0x414060=this['editing']['view'],_0x35e9bf=_0x414060['document']['getRoot'](),_0x384c14=_0x35e9bf['getChild'](0x0);_0x35e9bf['childCount']>0x1||!_0x384c14||'p'!=_0x384c14['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x414060,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x384c14['placeholder']=this['placeholder']),ut({'view':_0x414060,'element':_0x384c14,'keepOnFocus':!0x0}),this['placeholderElement']=_0x384c14);}},St=class extends ht{keystrokes;['focusTracker'];['focusables'];['focusCycler'];submitButtonView;cancelButtonView;_editorConfig;constructor(_0x560bd9,_0x17df0d={}){super(_0x560bd9),this['editor']=null,this['_editorConfig']=_0x17df0d,this['set']('value',_0x17df0d['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',Et(_0x560bd9,'Reply...')),this['set']('submitLabel',Et(_0x560bd9,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x4d6908(),this['focusTracker']=new _0x1bc134(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3047d5=>!_0x3047d5['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['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x1f0f42,_0x5e7a9e)=>{this['cancelButtonView']['fire']('execute'),_0x5e7a9e();}),this['keystrokes']['set']('Ctrl+Enter',(_0x5dbd0b,_0xd8a6a1)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0xd8a6a1());}),this['on']('submit',(_0x1bd42e,_0x98a7f3)=>{_0x98a7f3['length']>0xfde8?(alert(Et(_0x560bd9,'TOO_LONG_COMMENT_ALERT',[_0x98a7f3['length'],0xfde8])),_0x1bd42e['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}createEditor(){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x27be2f=this['editor'];this['element']['insertBefore'](_0x27be2f['ui']['element'],this['element']['firstChild']),_0x27be2f['model']['document']['on']('change',()=>this['value']=_0x27be2f['getData']()),_0x27be2f['bind']('placeholder')['to'](this),this['focusables']['add'](_0x27be2f['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x5b6a19){-0x1===_0x5b6a19?(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:_0x5b1b9e}=this,_0x5a8300=new _0x4695a0(_0x5b1b9e);return _0x5a8300['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x5a8300['withText']=!0x0,_0x5a8300['bind']('label')['to'](this,'submitLabel'),_0x5a8300['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x5a8300['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0xf2dd80,_0x36acce)=>!_0x36acce&&!!_0xf2dd80['trim']()),_0x5a8300;}_createCancelButton(){const {locale:_0x414d25}=this,_0x29c256=new _0x4695a0(_0x414d25);return _0x29c256['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x29c256['label']=Et(_0x414d25,'Cancel'),_0x29c256['withText']=!0x0,_0x29c256['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x29c256;}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x468a94=>{this['focusTracker']['add'](_0x468a94['element']);}),this['focusables']['on']('change',(_0x382f7e,_0x167b80)=>{for(const _0x4f2e40 of Array['from'](_0x167b80['added'])['reverse']())this['focusTracker']['add'](_0x4f2e40['element']);});}},xt=class extends ht{constructor(_0x1aa8c1,_0x3c81b9,_0x3c49c8){super(_0x1aa8c1),this['commentInputView']=new St(_0x1aa8c1,_0x3c49c8),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x51eafd,_0x391fc2)=>_0x51eafd||!!_0x391fc2),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 _0x3d8fe9(_0x1aa8c1,_0x3c81b9),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'](_0x4e34a7){this['commentInputView']['focus'](_0x4e34a7);}_focusOnNonInteractiveMouseDown(){this['listenTo'](this['element'],'mousedown',(_0xaa5314,_0x1395d0)=>{const {submitButtonView:_0x483d59,cancelButtonView:_0x2b5368,editor:_0x4088b0}=this['commentInputView'];[_0x483d59['element'],_0x2b5368['element'],_0x4088b0?_0x4088b0['editing']['view']['getDomRoot']():null]['filter'](_0x5cc702=>_0x5cc702)['some'](_0x414928=>_0x414928['contains'](_0x1395d0['target']))||(this['focus'](),_0x1395d0['preventDefault']());});}},Pt=class extends ht{constructor(_0x8f1144){super(_0x8f1144);const _0x343058=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x343058['to']('count',_0x1d1580=>Et(_0x8f1144,'NUMBER_OF_COMMENTS',_0x1d1580))}]});}},Lt=class extends ht{commentViews;resolvedCommentView;['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];_collapsedCommentsView;constructor(_0x125f12,_0x36de7a,_0xd85389){super(_0x125f12);const _0x5c1530=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x36de7a['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x36de7a,this['_config']=_0xd85389,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x1bc134(),this['keystrokes']=new _0x4d6908(),this['focusCycler']=new et({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x20a94a=>this['commentViews']['map'](_0x2184f7=>_0x2184f7['element'])['includes'](_0x20a94a['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Pt(_0x125f12),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x24c52a=>_0x24c52a-this['_config']['maxCommentsWhenCollapsed']);for(const _0xad5fa3 of _0x36de7a['comments'])this['_handleNewCommentModel'](_0xad5fa3);this['_handleInfoComment'](),this['listenTo'](_0x36de7a['comments'],'add',(_0xef8603,_0x327787)=>{const _0x5d863a=this['_calculatePosition'](_0x327787);this['length']++,this['_handleNewCommentModel'](_0x327787,_0x5d863a),this['refreshVisibleViews']();}),this['listenTo'](_0x36de7a['comments'],'remove',(_0x4ce811,_0x2452bc)=>{this['length']--,this['_handleRemoveCommentModel'](_0x2452bc),this['refreshVisibleViews']();}),this['listenTo'](_0x36de7a,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x36de7a,'change:isResolved',()=>this['_handleInfoComment']()),this['on']('change:isActive',()=>this['refreshVisibleViews']()),this['on']('change:hasDirtyComment',()=>this['refreshVisibleViews']()),this['setTemplate']({'tag':'ul','attributes':{'class':['ck-thread__comments',_0x5c1530['if']('length','ck-hidden',_0x40c189=>!_0x40c189)],'aria-label':Et(_0x125f12,'Thread\x20comments')},'children':this['visibleViews']});}get['_shouldCollapse'](){return this['_model']['weight']>this['_config']['maxThreadTotalWeight']&&!this['isActive']&&!this['hasDirtyComment'];}['render'](){super['render'](),this['refreshVisibleViews'](),this['_setupKeyboardNavigation']();}['focus'](_0xcc720a){-0x1===_0xcc720a?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}destroy(){this['_collapsedCommentsView']['destroy']();for(const _0x4c354f of this['commentViews'])_0x4c354f['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}_handleNewCommentModel(_0x27170c,_0xd5875e){const _0x4667c3=new this['_config']['CommentView'](this['locale'],_0x27170c,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x4667c3['viewUid']=_0x27170c['id'],_0x4667c3['delegate']('removeComment')['to'](this),_0x4667c3['delegate']('updateComment')['to'](this),_0x4667c3['delegate']('resolveCommentThread')['to'](this),_0x4667c3['delegate']('editorReady')['to'](this),_0x4667c3['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x4667c3,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x4667c3,_0xd5875e);}_calculatePosition(_0x151ae6){const _0x2dedc2=this['_model']['_findOptimalIndex'](_0x151ae6);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x151ae6['authoredAt']?_0x2dedc2-0x1:_0x2dedc2:_0x2dedc2-0x1;}_handleInfoComment(){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x1dc2b2={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':Et(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x1dc2b2,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x1dc2b2));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}_handleRemoveCommentModel(_0x1d9268){const _0x44a5f3=this['commentViews']['remove'](_0x1d9268['id']);this['stopListening'](_0x44a5f3),_0x44a5f3['isEditMode']&&this['_updateHasDirtyComment'](),_0x44a5f3['destroy']();}_updateHasDirtyComment(){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x4a4674=>_0x4a4674['isEditMode']);}['_rearrangeCollapse'](){const _0x51a7aa=function(_0x1d57d6){const _0x445740=new _0x3a878e();for(const _0x49939b of _0x1d57d6)_0x445740['add'](_0x49939b);return _0x445740;}(this['commentViews']),_0x200860=this['_collapsedCommentsView']['count'];for(let _0x567a3d=0x1;_0x567a3d<=_0x200860;_0x567a3d++)_0x51a7aa['remove'](0x1);for(const _0x1d19a0 of _0x51a7aa)_0x1d19a0['collapse']();_0x200860>0x0&&_0x51a7aa['add'](this['_collapsedCommentsView'],0x1),Dt(_0x45fda3(Array['from'](this['visibleViews']),Array['from'](_0x51a7aa)),this['visibleViews'],_0x51a7aa);}['_rearrangeExpand'](){Dt(_0x45fda3(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x2ea716 of this['visibleViews'])_0x2ea716['expand']();}_setupKeyboardNavigation(){this['commentViews']['forEach'](_0x30d739=>{this['focusTracker']['add'](_0x30d739['element']),this['keystrokes']['listenTo'](_0x30d739['element']);}),this['commentViews']['on']('change',(_0x9030a5,_0x5e808b)=>{for(const _0xd2b518 of _0x5e808b['removed'])this['focusTracker']['remove'](_0xd2b518['element']),this['keystrokes']['stopListening'](_0xd2b518['element']);for(const _0x243ea4 of Array['from'](_0x5e808b['added'])['reverse']())this['focusTracker']['add'](_0x243ea4['element']),this['keystrokes']['listenTo'](_0x243ea4['element']);});}};function Dt(_0x7082d2,_0x598c7f,_0x1794d9){let _0x50a297=0x0;for(const _0x31071d of _0x7082d2)switch(_0x31071d){case'insert':_0x598c7f['add'](_0x1794d9['get'](_0x50a297),_0x50a297),_0x50a297++;break;case'delete':_0x598c7f['remove'](_0x50a297);break;case'equal':_0x50a297++;}}var Vt=class extends ht{constructor(_0x240915){super(_0x240915);const _0x2cc718=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x2cc718['to']('contextValue',_0x539587=>Et(_0x240915,'THREAD_CONTEXT_LABEL',_0x539587)),'tabindex':-0x1},'children':[{'text':_0x2cc718['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Bt=class extends ht{['_model'];reopenButtonView;contextView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x5813e3,_0xf63ab){super(_0x5813e3);const _0x41e91a=this['bindTemplate'];this['_model']=_0xf63ab,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x1bc134(),this['keystrokes']=new _0x4d6908(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x367e53=>!!_0x367e53),this['bind']('contextValue')['to'](this['_model'],'context',_0x397d22=>_0x397d22&&_0x397d22['value']?this['_trimContextValue'](_0x397d22['value']):Et(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',_0x41e91a['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 _0x2815a2=new _0x4695a0(this['locale']);return _0x2815a2['label']=Et(this['locale'],'Reopen'),_0x2815a2['tooltip']=Et(this['locale'],'Reopen'),_0x2815a2['icon']=_0x2afc5d,_0x2815a2['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2e55eb=>!_0x2e55eb),_0x2815a2['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x1417aa,_0x1fd347)=>_0x1417aa&&_0x1fd347),_0x2815a2['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x2815a2;}_trimContextValue(_0x371ba9){if(_0x371ba9['length']<0x96)return _0x371ba9;const _0x5ecfc6=_0x371ba9['lastIndexOf']('\x20',0x93);return _0x371ba9['substring'](0x0,_0x5ecfc6>-0x1?_0x5ecfc6:0x93)+'...';}_attachContextActions(){const _0x40cc10=this['element']['querySelector']('.ck-context'),_0x595484=_0x40cc10['querySelector']('.ck-context__value');this['listenTo'](_0x40cc10,'mouseenter',()=>{_0x595484['offsetWidth']<_0x595484['scrollWidth']&&_0x40cc10['classList']['add']('overlay');}),this['listenTo'](_0x40cc10,'mouseleave',()=>{_0x40cc10['classList']['remove']('overlay');});}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']);for(const _0x3bcd9a of this['focusables'])this['focusTracker']['add'](_0x3bcd9a['element']),this['keystrokes']['listenTo'](_0x3bcd9a['element']);}_createContextView(){const _0x35a519=new Vt(this['locale']);return _0x35a519['bind']('contextValue')['to'](this),_0x35a519;}},Ht=class extends ht{['_model'];['_config'];commentThreadHeaderView;commentThreadInputView;ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x5db4c4,_0x28f995,_0x5d9714,_0x54ce63){super(_0x5db4c4),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x28f995,this['_localUser']=_0x5d9714,this['_config']=_0x54ce63,this['commentThreadHeaderView']=new Bt(_0x5db4c4,_0x28f995),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x3790e4(_0x5db4c4,Et(_0x5db4c4,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Lt(_0x5db4c4,_0x28f995,Object['assign']({'CommentView':this['_config']['CommentView']},_0x54ce63)),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',(_0x48879c,_0x1ffbb2)=>_0x48879c||!!_0x1ffbb2),this['bind']('isUnlinked')['to'](_0x28f995,'unlinkedAt',_0x15d495=>!!_0x15d495);let _0x55151f=null;const _0xbfa803=()=>{const _0xc4e03f=this['_model']['comments']['first']||null;_0xc4e03f!==_0x55151f&&(_0x55151f&&this['stopListening'](_0x55151f,'change:content'),_0x55151f=_0xc4e03f,_0xc4e03f&&this['listenTo'](_0xc4e03f,'change:content',_0xbfa803));const _0x4e037b=_0xc4e03f?_0xc4e03f['author']['name']:this['_localUser']['name'],_0x105ef0=_0xc4e03f?new DOMParser()['parseFromString'](_0x4effb0(_0xc4e03f['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']}),'text/html')['body']['textContent']:'',_0x472de9=Et(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x4e037b]);this['set']('ariaLabel',_0x105ef0?_0x472de9+'\x20'+_0x105ef0:_0x472de9);};this['listenTo'](this['_model']['comments'],'change',_0xbfa803),_0xbfa803(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x1bc134(),this['keystrokes']=new _0x4d6908(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4b5f7b=>_0x4b5f7b['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x2e9506(this,this['focusables']);}async destroy(){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}_createCommentThreadInputView(){const _0x2f9529=new xt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x336203=_0x2f9529['commentInputView'];return _0x2f9529['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x336203,'value',(_0x238571,_0x31fc91,_0x1a886e,_0x1d6da7,_0x5f1c29)=>!!_0x5f1c29||!!_0x1d6da7&&_0x1a886e&&!_0x31fc91||_0x238571&&_0x1a886e&&!_0x31fc91),_0x336203['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0xdd55fa,_0x142fc0,_0x405526)=>{let _0x469b20;return _0x469b20=_0x405526&&_0x142fc0?'Reply\x20to\x20reopen\x20discussion...':_0xdd55fa?'Reply...':'Write\x20a\x20comment...',Et(this['locale'],_0x469b20);}),_0x336203['bind']('submitLabel')['to'](this,'length',_0x18822a=>Et(this['locale'],_0x18822a?'Reply':'Comment')),_0x336203['on']('submit',(_0x5d5cec,_0x15dee3)=>{this['fire']('addComment',_0x15dee3),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x336203['on']('cancel',()=>{this['focus']();}),_0x336203['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x336203['on']('cancel',_0x280e23=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x280e23['stop']());}),this['on']('change:isActive',(_0x8435c3,_0x2ffe38,_0x40be65)=>{_0x40be65||this['length']||_0x336203['value']||this['fire']('removeCommentThread');}),_0x2f9529;}};const Ft=/* #__PURE__ -- @preserve */
27
+ _0x35f372(Ht);var Ut=class extends Ft{commentThreadChildren;containerElement;resolveButton;_boundFirstCommentView;constructor(_0x3cacab,_0x45416d,_0x17717c,_0x23f844){super(_0x3cacab,_0x45416d,_0x17717c,_0x23f844),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x3cacab,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x148982,_0x173b91,_0x1c2d58)=>{_0x1c2d58||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x9e873e,_0xe50d55,_0x58ea06)=>{_0x58ea06&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}getTemplate(){const _0x25a0df=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x25a0df['if']('isActive','ck-thread--active'),_0x25a0df['if']('isUnlinked','ck-thread--unlinked'),_0x25a0df['to']('actionIndicator',_0x55b63c=>_0x55b63c?'ck-thread--'+_0x55b63c:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x25a0df['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 _0x30e0ec of this['commentsListView']['commentViews'])_0x30e0ec['cancelConfirm']();}_bindFirstCommentView(){const {locale:_0x23daae}=this,_0x1c4748=this['commentsListView']['commentViews']['get'](0x0);_0x1c4748===this['_boundFirstCommentView']||_0x1c4748['isSystemComment']||(this['_boundFirstCommentView']=_0x1c4748,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x1c4748,'actionIndicator',_0x3bf9ec=>'remove'===_0x3bf9ec?'remove':null),_0x1c4748['placeholder']=Et(_0x23daae,'Write\x20a\x20comment...'),_0x1c4748['removeButton']['on']('execute',_0x151165=>{_0x151165['stop'](),this['showConfirm'](Et(_0x23daae,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x1c4748['focus']();}),_0x1c4748['actionBar']['add'](this['resolveButton'],0x0),_0x1c4748['focusables']['add'](this['resolveButton'],0x0));}_createResolveButton(){const _0x38fbaa=new _0x24e2a6(this['locale']);return _0x38fbaa['label']=Et(this['locale'],'Resolve'),_0x38fbaa['tooltip']=Et(this['locale'],'Resolve'),_0x38fbaa['icon']=_0x3e8464,_0x38fbaa['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x38fbaa['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2ac0ef=>!_0x2ac0ef),_0x38fbaa['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3b813e,_0x41c490)=>_0x3b813e&&!_0x41c490),_0x38fbaa['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x38fbaa;}_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']));}},Wt=class extends ht{constructor(_0x2b611f){super(_0x2b611f),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x32679e,_0x3b3433,_0x292228)=>{this['element']['innerHTML']=_0x292228;}),this['element']['innerHTML']=this['content'];}},Kt=class extends ht{['visibleView'];ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];constructor(_0x1af212,_0x156137,_0x5ba3c6){super(_0x1af212),this['_model']=_0x156137,this['_config']=_0x5ba3c6,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x156137,'content',_0x156137,'authoredAt',(_0xd96b32,_0xd3419f)=>Et(_0x1af212,'COMMENT_ARIA_LABEL',[_0x156137['author']['name'],_0x5ba3c6['formatDateTime'](_0xd3419f),new DOMParser()['parseFromString'](_0xd96b32,'text/html')['body']['textContent'],_0x156137['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x3790e4(_0x1af212,Et(_0x1af212,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new at(),this['focusTracker']=new _0x1bc134(),this['keystrokes']=new _0x4d6908(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4e563a=>_0x4e563a['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']?Et(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):Et(this['locale'],'EXTERNAL_COMMENT');}getUserViewNotificationText(){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?Et(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):Et(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}_createCommentContentView(){const _0x523b8e=new Wt(this['locale']);return _0x523b8e['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x1c2ef4,_0x868375)=>_0x868375?_0x4effb0(_0x1c2ef4,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x1c2ef4),_0x523b8e;}_createCommentInputView(){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x41d4a9=new St(this['locale'],this['_config']['editorConfig']);return _0x41d4a9['value']=this['_model']['content'],_0x41d4a9['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x41d4a9['submitLabel']=Et(this['locale'],'Save'),_0x41d4a9['on']('submit',(_0x1e7e37,_0x4fe7dd)=>{this['fire']('updateComment',this['_model']['id'],_0x4fe7dd),this['switchToDisplayMode'](),this['focus']();}),_0x41d4a9['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x41d4a9['once']('editorReady',()=>{_0x41d4a9['focus']();}),_0x41d4a9['createEditor'](),_0x41d4a9['delegate']('editorReady')['to'](this),_0x41d4a9['delegate']('editorDestroyed')['to'](this),_0x41d4a9;}_setupKeyboardNavigation(){const _0x472585=this['element'];this['keystrokes']['listenTo'](_0x472585);for(const _0x57620d of this['focusables'])this['focusTracker']['add'](_0x57620d['element']),this['keystrokes']['listenTo'](_0x57620d['element']);this['focusables']['on']('change',(_0x354c98,_0x2c6f38)=>{for(const _0x59657d of _0x2c6f38['removed'])this['focusTracker']['remove'](_0x59657d['element']),this['keystrokes']['stopListening'](_0x59657d['element']);for(const _0x1e322c of _0x2c6f38['added'])this['focusTracker']['add'](_0x1e322c['element']),this['keystrokes']['listenTo'](_0x1e322c['element']);}),this['keystrokes']['set']('enter',(_0x53eaae,_0x20f1e5)=>{_0x472585===_0x53eaae['target']&&(this['focusCycler']['focusFirst'](),_0x20f1e5());}),this['keystrokes']['set']('esc',(_0xaebd1c,_0x188f4c)=>{_0x472585!==_0xaebd1c['target']&&(this['focus'](),_0x188f4c());});}};const Gt=/* #__PURE__ -- @preserve */
28
+ _0x35f372(Kt);var Yt=class extends Gt{actionBar;['userView'];constructor(_0x354444,_0x313509,_0xea7bb5){super(_0x354444,_0x313509,_0xea7bb5),this['set']('actionIndicator',null),this['set']('placeholder',Et(_0x354444,'Reply...')),this['bind']('authoredAt')['to'](_0x313509),this['bind']('resolvedAt')['to'](_0x313509),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 _0x3d8fe9(_0x354444,_0x313509['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x313509,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}getTemplate(){const _0x38bceb=this['bindTemplate'],_0x25043c=[{'tag':'div','attributes':{'class':['ck-comment__info','ck-annotation__info']},'children':[{'tag':'span','children':[{'text':this['userView']['name']}],'attributes':{'class':['ck-comment__info-name','ck-annotation__info-name'],'data-cke-tooltip-text':this['userView']['name']}},{'tag':'time','attributes':{'datetime':_0x38bceb['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x38bceb['to']('authoredAt',_0x2dd92c=>this['_config']['formatDateTime'](_0x2dd92c))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x38bceb['if']('isEditMode','ck-comment__actions--hidden'),_0x38bceb['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']&&_0x25043c['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x38bceb['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x38bceb['if']('isEditMode','ck-comment--edit'),_0x38bceb['if']('isSystemComment','ck-comment--info'),_0x38bceb['to']('actionIndicator',_0x5b752e=>_0x5b752e?'ck-comment--'+_0x5b752e:'')],'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':_0x25043c}]}]};}_createEditButton(){const _0x3fe273=new _0x4695a0(this['locale']);return _0x3fe273['label']=Et(this['locale'],'Edit'),_0x3fe273['icon']=_0x4a5bbc,_0x3fe273['withText']=!0x0,_0x3fe273['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x3fe273['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x18926d=>!_0x18926d),_0x3fe273['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x3fe273['on']('execute',()=>this['switchToEditMode']()),_0x3fe273;}_createRemoveButton(){const _0x6160c6=new _0x4695a0(this['locale']);return _0x6160c6['label']=Et(this['locale'],'Remove'),_0x6160c6['icon']=_0x3a211c,_0x6160c6['withText']=!0x0,_0x6160c6['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x6160c6['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5e32b4=>!_0x5e32b4),_0x6160c6['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x6160c6['on']('execute',()=>{this['showConfirm'](Et(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x6160c6;}_createDropdown(){const _0x26c796=ct(this['locale'],_0x496921),_0x180617=_0x26c796['panelView']['children'],_0x10db0d=new ot(this['locale']),_0x9b534b=_0x26c796['bindTemplate'];dt(_0x26c796,()=>this['items']['find'](_0x52b22a=>_0x52b22a['isVisible'])),_0x26c796['extendTemplate']({'attributes':{'class':[_0x9b534b['if']('isVisible','ck-hidden',_0xb9d8ac=>!_0xb9d8ac)]}});const _0x12fb6e=(_0x312cd8,_0x4f8ac2=-0x1)=>{const _0x4c3124=new nt(this['locale']);_0x4c3124['children']['add'](_0x312cd8);const _0x5d54a4=_0x4f8ac2>-0x1?_0x4f8ac2:_0x10db0d['items']['length'];_0x10db0d['items']['add'](_0x4c3124,_0x5d54a4);const _0x3e9b69=Array['from'](this['items']);_0x26c796['unbind']('isEnabled','isVisible'),_0x26c796['bind']('isEnabled')['toMany'](_0x3e9b69,'isEnabled',(..._0x108807)=>_0x108807['some'](_0x161adb=>_0x161adb)),_0x26c796['bind']('isVisible')['toMany'](_0x3e9b69,'isVisible',(..._0x4ae6d7)=>_0x4ae6d7['some'](_0x412cc8=>_0x412cc8));};_0x26c796['panelPosition']='sw',_0x26c796['buttonView']['set']({'label':Et(this['locale'],'Show\x20more\x20items'),'icon':_0x289b19});for(const _0x11c579 of this['items'])_0x12fb6e(_0x11c579);return _0x180617['add'](_0x10db0d),_0x26c796['listenTo'](this['items'],'add',(_0x471eb2,_0x54532f,_0x345c84)=>{_0x12fb6e(_0x54532f,_0x345c84);}),_0x26c796['listenTo'](this['items'],'remove',(_0xd10dbb,_0x3dcfdd,_0x3e22d2)=>{_0x10db0d['items']['remove'](_0x3e22d2);}),_0x26c796;}_attachActions(_0x3122a1,_0x29c604){const _0x33a2a1=_0x3122a1&&_0x3122a1['element'];_0x33a2a1&&(this['listenTo'](_0x33a2a1,'mouseenter',()=>this['actionIndicator']=_0x29c604),this['listenTo'](_0x33a2a1,'focus',()=>this['actionIndicator']=_0x29c604),this['listenTo'](_0x33a2a1,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x33a2a1,'blur',()=>this['actionIndicator']=null));}_createCommentInputView(){const _0x284531=super['_createCommentInputView']();return _0x284531['bind']('placeholder')['to'](this),_0x284531;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}};function Xt(_0x30ee41){const _0x28a1e5=_0x3ca525(_0x30ee41,0x1e),_0x1a9bdc=new MutationObserver(_0x2631d7=>{for(const _0x20b2be of _0x2631d7)('attributes'==_0x20b2be['type']&&'class'==_0x20b2be['attributeName']||'childList'==_0x20b2be['type']||'characterData'==_0x20b2be['type'])&&_0x28a1e5();});return{'attach'(_0x1d4b1d){_0x1a9bdc['observe'](_0x1d4b1d,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x1a9bdc['disconnect'](),_0x28a1e5['cancel']();}};}var qt=class extends ht{['focusTracker'];['id'];keystrokes;content;['mainView'];_mutationObserver;constructor(_0x541060,_0x11adfb){super(_0x541060),this['id']=_0x31754c(),this['focusTracker']=new _0x1bc134(),this['keystrokes']=new _0x4d6908(),this['keystrokes']['set']('Esc',(_0x661a7e,_0x2861b0)=>this['fire']('Esc',_0x2861b0)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=Xt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x11adfb),this['mainView']=_0x11adfb;const _0xe487a6=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0xe487a6['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 _0x14aa30=this['element']['clientHeight'];_0x14aa30&&(this['height']=_0x14aa30);}};const jt=/* #__PURE__ -- @preserve */
29
+ _0x4c9f3d();var $t=class Annotation extends jt{['view'];focusableElements;_type;_target;constructor({view:_0x1f9670,target:_0x3e828a,type:_0xd3372d,isVisible:_0x5bc7f8=!0x0}){super(),this['view']=_0x1f9670,this['view']['element']||this['view']['render'](),this['_type']=_0xd3372d,this['_target']=_0x3e828a,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x3a878e([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x4cb4e2,_0x827114)=>{this['view']['focusTracker']['add'](_0x827114);}),this['focusableElements']['on']('remove',(_0x18a8d3,_0xbcf8cf)=>{this['view']['focusTracker']['remove'](_0xbcf8cf);}),this['set']('isVisible',_0x5bc7f8);}get type(){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get target(){const _0x11f740=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x11f740),_0x11f740;}get targetRect(){const _0x589a94=this['target'];if(null===_0x589a94)return null;if(_0x589a94 instanceof _0x5b8deb)return _0x589a94;const _0x3febe8=_0x589a94['filter'](_0x1646a8=>function(_0x1aac24){return!!_0x1aac24['offsetParent']||!!_0x1aac24['getClientRects']()['item'](0x0);}(_0x1646a8));return 0x0===_0x3febe8['length']?null:_0x5b8deb['getDomElementRects'](_0x3febe8[0x0])[0x0];}get isActive(){return this['view']['isActive'];}set isActive(_0x5aedcf){this['view']['isActive']=_0x5aedcf,this['view']['mainView']['isActive']=_0x5aedcf;}updateTargetRect(){this['view']['targetRect']=this['targetRect'];}destroy(){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}refreshVisibility(){this['isVisible']=!!this['targetRect'];}static _assertCorrectTarget(_0x208302){if(!(null===_0x208302||_0x208302 instanceof _0x5b8deb||Array['isArray'](_0x208302)&&_0x208302['every'](_0x1b9a35=>zt(_0x1b9a35))))throw new _0x4542a4('annotation-invalid-target',null,{'target':_0x208302});}_getNormalizedTarget(){const _0x549159='function'==typeof this['_target']?this['_target']():this['_target'];return zt(_0x549159)?[_0x549159]:_0x549159;}};function zt(_0xdb71a2){return null!==_0xdb71a2&&'object'==typeof _0xdb71a2&&'nodeType'in _0xdb71a2&&0x1===_0xdb71a2['nodeType'];}var Jt=class extends _0x3a878e{_innerViewToAnnotation;_viewToAnnotation;['_focusTracker'];constructor(_0x3a3788=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x1bc134(),this['_focusTracker']['on']('change:isFocused',(_0x266a63,_0x372b78,_0x4d285d)=>{_0x4d285d||this['fire']('blur');});for(const _0xdc523e of _0x3a3788)this['add'](_0xdc523e);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0xc77968){if(this['has'](_0xc77968))throw new _0x4542a4('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0xc77968['innerView'],_0xc77968),this['_viewToAnnotation']['set'](_0xc77968['view'],_0xc77968);for(const _0x25013b of _0xc77968['focusableElements'])this['_focusTracker']['add'](_0x25013b);if(this['listenTo'](_0xc77968['focusableElements'],'add',(_0x15f31e,_0x5804a8)=>{this['_focusTracker']['add'](_0x5804a8);}),this['listenTo'](_0xc77968['focusableElements'],'remove',(_0x1e2ee2,_0x49c6cf)=>{this['_focusTracker']['remove'](_0x49c6cf);}),this['listenTo'](_0xc77968['view']['focusTracker'],'change:isFocused',(_0x118cf3,_0x3b6d83,_0x31c45c)=>{_0x31c45c&&this['fire']('focus',_0xc77968);}),_0xc77968['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0xcd61b4 of this)_0xcd61b4['updateTargetRect']();}const _0x44cda3=this['_getOrderInContent'](_0xc77968['view']['targetRect']);return super['add'](_0xc77968,_0x44cda3);}['remove'](_0x4f02ff){if(!this['has'](_0x4f02ff))throw new _0x4542a4('annotationcollection-not-existing-item',null);this['stopListening'](_0x4f02ff['view']['focusTracker']),this['stopListening'](_0x4f02ff['focusableElements']);for(const _0x3d84a9 of _0x4f02ff['focusableElements'])this['_focusTracker']['remove'](_0x3d84a9);return this['_viewToAnnotation']['delete'](_0x4f02ff['view']),this['_innerViewToAnnotation']['delete'](_0x4f02ff['innerView']),super['remove'](_0x4f02ff);}getByInnerView(_0x149d34){return this['_innerViewToAnnotation']['get'](_0x149d34);}getByView(_0x2e66ec){return this['_viewToAnnotation']['get'](_0x2e66ec);}destroy(){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}refreshPositioning(){for(const _0x5a3bd7 of this)_0x5a3bd7['updateTargetRect']();this['_sort']();}_sort(){const _0x6ac8b2=Array['from'](this)['sort']((_0x5d6d86,_0x357cd6)=>Zt(_0x5d6d86['view']['targetRect'],_0x357cd6['view']['targetRect']));for(let _0x314f39=_0x6ac8b2['length']-0x1;_0x314f39>0x0;_0x314f39--){const _0x29f50b=_0x6ac8b2[_0x314f39];_0x314f39!==this['getIndex'](_0x29f50b)&&(this['remove'](_0x29f50b),this['add'](_0x29f50b));}}_getOrderInContent(_0x547e42){let _0x390c4f=0x0;if(!_0x547e42)return this['length'];for(const _0x1608cc of this){const _0x25267f=_0x1608cc['view']['targetRect'];if(_0x25267f){if(Zt(_0x547e42,_0x25267f)<0x0)return _0x390c4f;_0x390c4f++;}}return _0x390c4f;}_areCachedRectsStale(){const _0x5e3c2a=this['get'](0x0);if(!_0x5e3c2a)return!0x1;const _0x23d2af=_0x5e3c2a['view']['targetRect'],_0x54fb84=_0x5e3c2a['targetRect'];return!(!_0x23d2af||!_0x54fb84)&&(_0x23d2af['top']!==_0x54fb84['top']||_0x23d2af['left']!==_0x54fb84['left']);}};function Qt({source:_0x41cb6c,target:_0x5ccb19,filter:_0x5e6eac}){for(const _0x4f9087 of _0x41cb6c)_0x5e6eac(_0x4f9087)&&_0x5ccb19['add'](_0x4f9087);_0x5ccb19['listenTo'](_0x41cb6c,'add',(_0xce1f6d,_0x1033a4)=>{_0x5e6eac(_0x1033a4)&&_0x5ccb19['add'](_0x1033a4);}),_0x5ccb19['listenTo'](_0x41cb6c,'remove',(_0x3f68fd,_0x57de17)=>{_0x5ccb19['has'](_0x57de17)&&_0x5ccb19['remove'](_0x57de17);});}function Zt(_0x58511c,_0x17fa0f){if(null===_0x58511c&&null===_0x17fa0f)return 0x0;if(null===_0x58511c)return-0x1;if(null===_0x17fa0f)return 0x1;const _0x5307fd=_0x58511c['top']-_0x17fa0f['top'];return 0x0==_0x5307fd?_0x58511c['left']-_0x17fa0f['left']:_0x5307fd;}var ti=class extends _0x5bc735{collection;_visibleAnnotations;static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2512ff){if(super(_0x2512ff),this['collection']=new Jt(),this['_visibleAnnotations']=new Jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x2512ff instanceof _0x4c61cd){const _0xcd2921=_0x2512ff['locale'];_0x2512ff['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':Et(_0xcd2921,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':Et(_0xcd2921,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':Et(_0xcd2921,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':Et(_0xcd2921,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':Et(_0xcd2921,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':Et(_0xcd2921,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':Et(_0xcd2921,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x1b9585){this['collection']['add'](_0x1b9585);}['remove'](_0xad2df6){this['collection']['remove'](_0xad2df6),_0xad2df6['destroy']();}refreshVisibility(){for(const _0xa3ffa9 of this['collection'])_0xa3ffa9['refreshVisibility']();}refreshPositioning(){this['_visibleAnnotations']['refreshPositioning']();}getByInnerView(_0x1d39f4){return this['collection']['getByInnerView'](_0x1d39f4);}deactivateAll(){this['fire']('_deactivateAllAnnotations');}destroy(){for(const _0x206d31 of this['collection'])_0x206d31['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}activate(_0x447f93){this['fire']('_activateAnnotation',_0x447f93);}createAnnotation(_0x1dbe5e){return new $t(_0x1dbe5e);}createAnnotationView(_0x20d8d7,_0x360ca1){return new qt(_0x20d8d7,_0x360ca1);}_addActiveAnnotation(_0x3f19ba){const _0x403440=new Set(this['activeAnnotations']);_0x403440['add'](_0x3f19ba),this['activeAnnotations']=_0x403440;}_removeActiveAnnotation(_0x2201d0){const _0x3f612c=new Set(this['activeAnnotations']);_0x3f612c['delete'](_0x2201d0),this['activeAnnotations']=_0x3f612c;}_bindAnnotationsToVisibleAnnotations(){const _0x17e3e0=this['collection'],_0x94c73b=this['_visibleAnnotations'];function _0x138ee0(_0x57747a){const _0x3adf45=_0x57747a['source'];_0x3adf45['isVisible']&&!_0x94c73b['has'](_0x3adf45)?_0x94c73b['add'](_0x3adf45):!_0x3adf45['isVisible']&&_0x94c73b['has'](_0x3adf45)&&_0x94c73b['remove'](_0x3adf45),_0x3adf45['view']['focusTracker']['remove'](_0x3adf45['view']['element']),_0x3adf45['view']['focusTracker']['add'](_0x3adf45['view']['element']);}this['listenTo'](_0x17e3e0,'add',(_0x3ab23b,_0x25948c)=>{_0x25948c['isVisible']&&_0x94c73b['add'](_0x25948c),this['listenTo'](_0x25948c,'change:isVisible',_0x138ee0);}),this['listenTo'](_0x17e3e0,'remove',(_0x35280b,_0x5489ad)=>{_0x94c73b['has'](_0x5489ad)&&_0x94c73b['remove'](_0x5489ad),this['stopListening'](_0x5489ad,'change:isVisible',_0x138ee0);});}_setupEnterAnnotationKeystroke(){const _0x5af26c=_0x81a3e0=>{_0x81a3e0['on']('ready',()=>{_0x81a3e0['keystrokes']['set'](_0x5bd6c1,(_0xb51f93,_0x3eaf40)=>{const _0x4fd4cf=_0x1f79f6(this['activeAnnotations']['values']());_0x4fd4cf&&(_0x4fd4cf['view']['focus'](),_0x3eaf40());});});};this['context']instanceof _0x4c61cd?_0x5af26c(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x532751,_0x2fa574)=>{_0x5af26c(_0x2fa574);});}_setupEscapeAnnotationHandling(){const _0x102989=_0x1b30e7=>{const _0xd42ce2=_0x1b30e7['source'],_0x80d673=[];let _0x71dc88;if(Array['isArray'](_0xd42ce2['target'])){_0x71dc88=_0xd42ce2['target'][0x0],this['context']instanceof _0x4c61cd?_0x80d673['push'](this['context']):this['context']['editors']&&_0x80d673['push'](...this['context']['editors']);for(const _0x145b7e of _0x80d673)for(const _0x1e024d of _0x145b7e['editing']['view']['domRoots']['values']())if(_0x1e024d['contains'](_0x71dc88))return void _0x145b7e['editing']['view']['focus']();_0x71dc88['focus']();}};this['listenTo'](this['collection'],'add',(_0x3f05c8,_0x4783e7)=>{this['listenTo'](_0x4783e7,'escape',_0x102989,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x5ac5d3,_0x2c6e7d)=>{this['stopListening'](_0x2c6e7d,'escape',_0x102989);});}};const ii=Symbol('noChannel'),ei={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},si=/* #__PURE__ -- @preserve */
30
+ _0x4c9f3d(),ni=/* #__PURE__ -- @preserve */
31
+ _0x4c9f3d();var oi=class extends _0x5bc735{_threads;_threadToController;_viewToController;static get requires(){return[ti,_0x1082ad,_0x459e31];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x53af7e){super(_0x53af7e),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x4196cb=this['context']['config'];_0x4196cb['define']('comments.maxCommentsWhenCollapsed',0x2),_0x4196cb['define']('comments.maxThreadTotalWeight',0x1f4),_0x4196cb['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x4196cb['define']('comments.CommentThreadView',Ut),_0x4196cb['define']('comments.CommentView',Yt),_0x4196cb['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}init(){const _0x44cbeb=this['context']['plugins']['get'](ti);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x884686,_0xe0a925)=>this['_addCommentThread'](_0xe0a925)),this['on']('submitCommentThread',(_0xc21721,_0xf895bc)=>this['_submitCommentThread'](_0xf895bc)),this['on']('resolveCommentThread',(_0x2af0ac,_0x3a0a12)=>this['_resolveCommentThread'](_0x3a0a12)),this['on']('resolveCommentThread',(_0x2a6a26,_0x15b500)=>this['_updateActiveAnnotation'](_0x15b500),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x23c6e3,_0x501c1d)=>this['_reopenCommentThread'](_0x501c1d)),this['on']('reopenCommentThread',(_0x52f06a,_0xab4097)=>this['_updateActiveAnnotation'](_0xab4097),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x5191e0,_0x4d8b46)=>this['_removeCommentThread'](_0x4d8b46)),this['on']('updateCommentThread',(_0x2c6aa1,_0x1f3d7b)=>this['_updateCommentThread'](_0x1f3d7b)),this['on']('updateCommentThread',(_0xb48083,_0x83b346)=>this['_updateActiveAnnotation'](_0x83b346),{'priority':'lowest'}),this['on']('addComment',(_0x1e2fa5,_0x24b1ae)=>this['_addComment'](_0x24b1ae)),this['on']('updateComment',(_0x2b2b86,_0x4cc2c9)=>this['_updateComment'](_0x4cc2c9)),this['on']('removeComment',(_0x1d9d42,_0x28c4a8)=>this['_removeComment'](_0x28c4a8)),this['on']('addComment',(_0x546df6,{threadId:_0x4e19e4,isFromAdapter:_0x43162b})=>{if(_0x43162b)return;const _0x30f816=this['getCommentThread'](_0x4e19e4),_0x141bf4=_0x30f816&&this['_threadToController']['get'](_0x30f816);_0x141bf4&&_0x141bf4['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x44cbeb,'change:activeAnnotations',(_0x46c48b,_0x509e75,_0x3cc715)=>{const _0x22f6cb=Array['from'](_0x3cc715)['map'](_0x579ed8=>this['_viewToController']['get'](_0x579ed8['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x22f6cb?_0x22f6cb['model']:null;});}set adapter(_0x3cdb73){if(this['_adapter'])throw new _0x4542a4('commentsrepository-adapter-already-set');this['_adapter']=_0x3cdb73;}get adapter(){return this['_adapter'];}addCommentThread({channelId:_0x5767f1=ii,threadId:_0x8ac6a1=_0x31754c(),comments:_0x502282=[],unlinkedAt:_0x43390e=null,resolvedAt:_0x1d9a98=null,resolvedBy:_0x4d4e02=null,target:_0x818bf3=null,context:_0x4dc97c=null,attributes:_0x5b7418={},isResolvable:_0x4f67f2=!0x0,isSubmitted:_0x2d529c=!0x1,isFromAdapter:_0x27f7ed=!0x1}={}){return this['fire'](ai('addCommentThread',_0x5767f1),{'channelId':_0x5767f1,'threadId':_0x8ac6a1,'comments':_0x502282,'unlinkedAt':_0x43390e,'resolvedAt':_0x1d9a98,'resolvedBy':_0x4d4e02,'target':_0x818bf3,'context':_0x4dc97c,'attributes':_0x5b7418,'isFromAdapter':_0x27f7ed,'isResolvable':_0x4f67f2,'isSubmitted':_0x2d529c}),this['getCommentThread'](_0x8ac6a1);}openNewCommentThread({channelId:_0x21a6a3=ii,threadId:_0x4b2832=_0x31754c(),target:_0x556e02,context:_0x487f3a=null,isResolvable:_0xd81f1e=!0x0}){if(this['_readOnlyChannels']['has'](_0x21a6a3)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x556e02)throw new _0x4542a4('commentsrepository-missing-target');const _0x3ac2d8=this['addCommentThread']({'channelId':_0x21a6a3,'threadId':_0x4b2832,'target':_0x556e02,'context':_0x487f3a,'isResolvable':_0xd81f1e});if(!_0x3ac2d8)return null;const _0x3c5e71=this['_threadToController']['get'](_0x3ac2d8),_0x2aea13=_0x3c5e71['view']['commentThreadInputView']['commentInputView'],_0x30da37=this['context']['plugins']['get'](ti),_0x1a92be=_0x30da37['getByInnerView'](_0x3c5e71['view']);return _0x30da37['activate'](_0x1a92be),_0x2aea13['once']('editorReady',()=>_0x2aea13['focus']()),_0x3ac2d8;}hasCommentThread(_0x41b09b){if('string'!=typeof _0x41b09b)throw new _0x4542a4('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x41b09b);}updateCommentThread({channelId:_0x1f3340=ii,threadId:_0x3b719b,context:_0x1d28b5,unlinkedAt:_0x1923af,attributes:_0x4c1a89,isFromAdapter:_0x1626c5=!0x1}){return this['fire'](ai('updateCommentThread',_0x1f3340),{'channelId':_0x1f3340,'threadId':_0x3b719b,'context':_0x1d28b5,'unlinkedAt':_0x1923af,'attributes':_0x4c1a89,'isFromAdapter':_0x1626c5}),this['getCommentThread'](_0x3b719b);}getCommentThread(_0x184721){if('string'!=typeof _0x184721)throw new _0x4542a4('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x184721);}fetchCommentThread({channelId:_0x4eebbd,threadId:_0x6983a0}={}){const _0x3a4094=this['getCommentThread'](_0x6983a0);if(_0x3a4094)return Promise['resolve'](_0x3a4094);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x4542a4('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x4eebbd,'threadId':_0x6983a0})['then'](_0x17ef8f=>this['hasCommentThread'](_0x6983a0)?this['getCommentThread'](_0x6983a0):_0x17ef8f?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x4eebbd},_0x17ef8f)):void 0x0)['catch'](_0x2c4605=>{throw console['error'](_0x2c4605),new _0x4542a4('commentsrepository-fetch-comment-thread',this['context']);});}getCommentThreads({channelId:_0x3e2c0a,skipNotAttached:_0x53ad9a=!0x1,skipEmpty:_0x1a6869=!0x1,toJSON:_0x11121e=!0x1}={}){const _0x5e4106=[];for(const _0x1925af of this['_threads']['values']())_0x3e2c0a&&_0x1925af['channelId']!==_0x3e2c0a||_0x53ad9a&&!_0x1925af['isAttached']||_0x1a6869&&0x0===_0x1925af['length']||_0x5e4106['push'](_0x1925af);return _0x11121e?_0x5e4106['map'](_0x36f20a=>_0x36f20a['toJSON']()):_0x5e4106;}getAnnotationForCommentThread(_0x233c42){const _0x47e979=this['_threadToController']['get'](_0x233c42);return _0x47e979&&this['context']['plugins']['get'](ti)['getByInnerView'](_0x47e979['view'])||null;}getCommentThreadForAnnotation(_0x7e6687){const _0x25b587=this['_viewToController']['get'](_0x7e6687['innerView']);return _0x25b587?_0x25b587['model']:null;}setActiveCommentThread(_0xe9d299){const _0x101ff0=this['context']['plugins']['get'](ti);if(!_0xe9d299)return void(this['activeCommentThread']&&_0x101ff0['deactivateAll']());const _0x278f20=this['getCommentThread'](_0xe9d299);if(!_0x278f20)throw new _0x4542a4('commentsrepository-active-missing-comment-thread',null,{'threadId':_0xe9d299});if(!this['_threadToController']['has'](_0x278f20))throw new _0x4542a4('commentsrepository-active-not-attached',null,{'threadId':_0xe9d299});const _0x1bdefc=_0x101ff0['getByInnerView'](this['_threadToController']['get'](_0x278f20)['view']);_0x101ff0['activate'](_0x1bdefc);}switchReadOnly(_0x4bf63f,_0x590f23){_0x4bf63f?this['_readOnlyChannels']['add'](_0x590f23):this['_readOnlyChannels']['delete'](_0x590f23),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x340d3f){return this['_readOnlyChannels']['has'](_0x340d3f)||this['_readOnlyChannels']['has'](void 0x0);}createCommentThreadController(_0x3bbe08,_0xe015d9){return new bt(_0x3bbe08,_0xe015d9);}setPermissions(_0x548926,_0x281577=ii){this['_permissions']['set'](_0x281577,_0x548926),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}getPermissions(_0x213392=ii){return this['_permissions']['has'](_0x213392)?this['_permissions']['get'](_0x213392):ei;}_addCommentThread({channelId:_0x1061c7,threadId:_0x542844,comments:_0xb714a,unlinkedAt:_0x595df5,resolvedAt:_0x2847fe,resolvedBy:_0x4ab1c7,target:_0x5ade99,context:_0x236453,attributes:_0x1f4cb7,isFromAdapter:_0x2a9498,isResolvable:_0x3aaed3,isSubmitted:_0x44edea}){if('string'!=typeof _0x542844)throw new _0x4542a4('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x542844});if(this['hasCommentThread'](_0x542844))throw new _0x4542a4('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x542844});const _0x42a088=new ri(this,{'channelId':_0x1061c7,'id':_0x542844,'context':_0x236453,'attributes':_0x1f4cb7,'unlinkedAt':_0x595df5,'resolvedAt':_0x2847fe,'resolvedBy':_0x4ab1c7?this['context']['plugins']['get'](_0x459e31)['getUser'](_0x4ab1c7):null,'isResolvable':_0x3aaed3,'isSubmitted':_0x44edea||_0x2a9498});this['_threads']['set'](_0x542844,_0x42a088);for(const _0x3d6a74 of _0xb714a)_0x42a088['_add'](this['_createNewComment']({'threadId':_0x542844,..._0x3d6a74}));return _0x5ade99&&_0x42a088['attachTo'](_0x5ade99),_0x2a9498||!_0x42a088['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x1061c7,'threadId':_0x542844});}_submitCommentThread({channelId:_0x323f05,threadId:_0x549b65}){if(!this['hasCommentThread'](_0x549b65))throw new _0x4542a4('commentsrepository-missing-comment-thread',this);const _0x2bdeaa=this['getCommentThread'](_0x549b65);if(_0x2bdeaa['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x2c3e68,comments:_0x3f5806,resolvedAt:_0x4df91b,resolvedBy:_0x29a877,context:_0x2a8856,attributes:_0x595284}=_0x2bdeaa,_0x56eaa4=this['context']['plugins']['get']('PendingActions'),_0x2fbba6=_0x56eaa4['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x323f05,'threadId':_0x2c3e68,'comments':_0x3f5806['map'](_0x532768=>_0x532768['toJSON']()),'resolvedAt':_0x4df91b,'resolvedBy':_0x29a877?_0x29a877['id']:_0x29a877,'context':_0x2a8856,'attributes':_0x595284})['then'](({comments:_0xf1a121})=>{_0x56eaa4['remove'](_0x2fbba6);for(const _0x241670 of _0xf1a121)this['_updateComment']({'channelId':_0x323f05,'threadId':_0x549b65,'commentId':_0x241670['commentId'],'createdAt':_0x241670['createdAt'],'isFromAdapter':!0x0});})['catch'](_0xcf7d40=>{throw console['error'](_0xcf7d40),new _0x4542a4('commentsrepository-add-comment-thread-internal-error',this);});}_attachCommentThread({threadId:_0x498c3a,target:_0x33c6cb}){const _0x46553d=this['getCommentThread'](_0x498c3a);if(!_0x46553d)throw new _0x4542a4('commentsrepository-attach-missing-comment-thread',this);const _0x44b8bd=this['context']['plugins']['get']('PendingActions'),_0x16e3de=this['context']['plugins']['get'](ti),_0x4f7b38=this['_createCommentThreadView'](_0x46553d),_0x3a27ca=new bt(_0x46553d,_0x4f7b38);let _0x4da5fb=null;_0x4f7b38['on']('change:isDirty',(_0x5e95a8,_0xd82021,_0x50b6e1)=>{_0x50b6e1?_0x4da5fb=_0x44b8bd['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x4da5fb&&(_0x44b8bd['remove'](_0x4da5fb),_0x4da5fb=null);}),this['_threadToController']['set'](_0x46553d,_0x3a27ca),this['_viewToController']['set'](_0x4f7b38,_0x3a27ca);const _0x3398bc=new qt(this['context']['locale'],_0x4f7b38);_0x3398bc['bind']('length')['to'](_0x4f7b38),_0x3398bc['bind']('isDirty')['to'](_0x4f7b38,'isDirty',_0x4f7b38,'length',(_0x5641f1,_0x423b12)=>_0x5641f1||!_0x423b12),_0x3398bc['bind']('isActive')['to'](_0x4f7b38),_0x3398bc['type']='comment';const _0x3eb44a=new $t({'view':_0x3398bc,'target':_0x33c6cb,'type':'comment','isVisible':!_0x46553d['archivedAt']&&!!('function'==typeof _0x33c6cb?_0x33c6cb():_0x33c6cb)});return _0x4f7b38['on']('escape',()=>{_0x3eb44a['fire']('escape');}),this['_bindAnnotationToEditors'](_0x4f7b38,_0x3eb44a),_0x16e3de['add'](_0x3eb44a),_0x3eb44a;}_bindAnnotationToEditors(_0x2791aa,_0x3746d6){this['listenTo'](_0x2791aa,'editorReady',(_0x375ca3,_0x22030c)=>{const _0x29d952=_0x22030c['ui']['view']['body']['bodyCollectionContainer'];_0x3746d6['focusableElements']['add'](_0x29d952),this['context']instanceof _0x4c61cd&&this['context']['ui']['focusTracker']['add'](_0x29d952);},{'priority':'highest'}),this['listenTo'](_0x2791aa,'editorDestroyed',(_0x313cdb,_0x35f76c)=>{const _0x3e85fe=_0x35f76c['ui']['view']['body']['bodyCollectionContainer'];_0x3746d6['focusableElements']['has'](_0x3e85fe)&&_0x3746d6['focusableElements']['remove'](_0x3e85fe),this['context']instanceof _0x4c61cd&&this['context']['ui']['focusTracker']['remove'](_0x3e85fe);});}_unbindEditors(_0x54c647){this['stopListening'](_0x54c647,'editorReady'),this['stopListening'](_0x54c647,'editorDestroyed');}_createCommentThreadView(_0x1dfbef){const _0x476837=this['context']['plugins']['get'](_0x459e31),{config:_0x4f0a31,locale:_0x328552}=this['context'],_0x37376c=_0x167475(_0x4f0a31['get']('locale'),_0x328552);return new(0x0,(_0x4f0a31['get']('comments'))['CommentThreadView'])(_0x328552,_0x1dfbef,_0x476837['me'],{'editorConfig':{..._0x4f0a31['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x4f0a31['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x4f0a31['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x4f0a31['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x4f0a31['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x37376c,'CommentView':_0x4f0a31['get']('comments')['CommentView']});}_resolveCommentThread({threadId:_0x235a6d,channelId:_0x500e70,resolvedAt:_0x2937c4,resolvedBy:_0x40c52f,isFromAdapter:_0x360653}){if(!this['hasCommentThread'](_0x235a6d))throw new _0x4542a4('commentsrepository-missing-comment-thread',null,{'threadId':_0x235a6d});const _0x5e36c9=this['getCommentThread'](_0x235a6d);if(_0x5e36c9['isResolved'])throw new _0x4542a4('commentsrepository-resolved-comment-thread',null,{'threadId':_0x235a6d});const _0x105f8d=this['context']['plugins']['get'](_0x459e31);if(_0x5e36c9['resolvedBy']=_0x105f8d['getUser'](_0x40c52f),_0x5e36c9['resolvedAt']=_0x2937c4,_0x360653||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0xb98fca=this['context']['plugins']['get']('PendingActions'),_0x50e08a=_0xb98fca['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x500e70,'threadId':_0x235a6d})['then'](({resolvedAt:_0x126b3b,resolvedBy:_0x2dd36d})=>{_0xb98fca['remove'](_0x50e08a),_0x5e36c9['resolvedBy']['id']!==_0x2dd36d&&(_0x5e36c9['resolvedBy']=_0x105f8d['getUser'](_0x2dd36d)),_0x5e36c9['resolvedAt']=_0x126b3b;})['catch'](_0x1ca627=>{throw console['error'](_0x1ca627),new _0x4542a4('commentsrepository-resolve-comment-thread-internal-error',this);});}_reopenCommentThread({threadId:_0x8474d4,channelId:_0x14f0b6,isFromAdapter:_0xfbc0ee}){if(!this['hasCommentThread'](_0x8474d4))throw new _0x4542a4('commentsrepository-missing-comment-thread',null,{'threadId':_0x8474d4});const _0x56dabc=this['getCommentThread'](_0x8474d4);if(!_0x56dabc['isResolved'])throw new _0x4542a4('commentsrepository-reopen-comment-thread',null,{'threadId':_0x8474d4});if(_0x56dabc['resolvedBy']=null,_0x56dabc['resolvedAt']=null,_0xfbc0ee||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x17496f=this['context']['plugins']['get']('PendingActions'),_0x508eef=_0x17496f['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x14f0b6,'threadId':_0x8474d4})['then'](()=>_0x17496f['remove'](_0x508eef))['catch'](_0x481f42=>{throw console['error'](_0x481f42),new _0x4542a4('commentsrepository-reopen-comment-thread-internal-error',this);});}_removeCommentThread({threadId:_0x507feb,isFromAdapter:_0x53138a}){const _0x307d63=this['getCommentThread'](_0x507feb);if(!_0x307d63)throw new _0x4542a4('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x507feb),this['_threads']['delete'](_0x507feb),!_0x307d63['isSubmitted']||_0x53138a||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x2c5f1c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x23ab12}=_0x307d63,_0x8392fb=_0x2c5f1c['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x23ab12,'threadId':_0x507feb})['then'](()=>_0x2c5f1c['remove'](_0x8392fb))['catch'](_0x4358dc=>{throw console['error'](_0x4358dc),new _0x4542a4('commentsrepository-remove-comment-thread-internal-error',this);});}_updateCommentThread({threadId:_0x19742d,unlinkedAt:_0x2f9677,context:_0x1de190,attributes:_0x19cf92,isFromAdapter:_0x4aa564}){if('string'!=typeof _0x19742d)throw new _0x4542a4('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x19742d});if(!this['hasCommentThread'](_0x19742d))throw new _0x4542a4('commentsrepository-missing-comment-thread',null,{'threadId':_0x19742d});const _0x1dbab2=this['getCommentThread'](_0x19742d);let _0x36f71e=!0x1;if(void 0x0!==_0x1de190&&_0x1dbab2['context']!==_0x1de190&&(_0x1dbab2['context']=_0x1de190,_0x36f71e=!0x0),void 0x0!==_0x2f9677&&_0x1dbab2['unlinkedAt']!==_0x2f9677&&(_0x1dbab2['unlinkedAt']=_0x2f9677,_0x36f71e=!0x0),_0x19cf92&&!_0x3b95fa(_0x19cf92,_0x1dbab2['attributes'])&&(_0x1dbab2['attributes']=_0x19cf92,_0x36f71e=!0x0),!_0x36f71e)return Promise['resolve']();if(!_0x1dbab2['isSubmitted']||_0x4aa564||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x489a73=this['context']['plugins']['get']('PendingActions'),{channelId:_0x37c5fb}=_0x1dbab2,_0x53a52d=_0x489a73['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x37c5fb,'threadId':_0x19742d,'context':_0x1de190,'unlinkedAt':_0x2f9677,'attributes':_0x19cf92})['then'](()=>_0x489a73['remove'](_0x53a52d))['catch'](_0x129ee1=>{throw console['error'](_0x129ee1),new _0x4542a4('commentsrepository-update-comment-thread-internal-error',this);});}_detachCommentThread(_0x3c4273){const _0x1d3c17=this['context']['plugins']['get'](ti),_0x28a150=this['getCommentThread'](_0x3c4273);if(_0x28a150['_isAttached']=!0x1,this['_threadToController']['has'](_0x28a150)){const _0x119b96=this['_threadToController']['get'](_0x28a150),_0x178c14=_0x119b96['view'],_0x579bbc=_0x1d3c17['getByInnerView'](_0x178c14);this['_threadToController']['delete'](_0x28a150),this['_viewToController']['delete'](_0x178c14),_0x579bbc&&_0x1d3c17['remove'](_0x579bbc),_0x119b96['destroy'](),_0x178c14['destroy']()['then'](()=>{this['_unbindEditors'](_0x178c14);});}}_updateActiveAnnotation({threadId:_0x400cb3,resolvedAt:_0x106d76,unlinkedAt:_0x137cd7}){const _0xe73600=!!_0x106d76,_0x1b2c3f=this['context']['plugins']['get'](ti),_0x57554c=this['getCommentThread'](_0x400cb3);if(this['_threadToController']['has'](_0x57554c)){const _0x5575bf=this['_threadToController']['get'](_0x57554c)['view'],_0x288b29=_0x1b2c3f['getByInnerView'](_0x5575bf);_0x288b29&&(_0xe73600&&_0x1b2c3f['_removeActiveAnnotation'](_0x288b29),_0x137cd7?_0x288b29['isVisible']=!0x1:_0x288b29['refreshVisibility']());}}_getExternalAuthor(_0x14a990){const _0x57c423=this['context']['plugins']['get'](_0x459e31),_0x50963c=_0x463e81('external:'+_0x14a990),_0x2d6f12=_0x57c423['getUser'](_0x50963c);return _0x2d6f12||_0x57c423['addUser']({'id':_0x50963c,'name':_0x14a990});}_createNewComment({threadId:_0x444270,commentId:_0x1d2a91=_0x31754c(),content:_0x215e98,authorId:_0x5f30fc,createdAt:_0x5b6d0e,attributes:_0x545d97}){if('string'!=typeof _0x1d2a91)throw new _0x4542a4('commentsrepository-invalid-commentid');if('string'!=typeof _0x5f30fc)throw new _0x4542a4('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x215e98||!_0x215e98['trim']())throw new _0x4542a4('commentsrepository-invalid-comment-content');const _0x3300d6=this['context']['plugins']['get'](_0x459e31)['getUser'](_0x5f30fc);if(!_0x3300d6)throw new _0x4542a4('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x5f30fc});let _0x3dbb9e=null,_0x2f17b2=_0x5b6d0e;return _0x545d97?.['@external']&&(_0x3dbb9e=this['_getExternalAuthor'](_0x545d97['@external']['authorName']),_0x2f17b2=new Date(_0x545d97['@external']['createdAt'])),new hi(this,{'threadId':_0x444270,'id':_0x1d2a91,'author':_0x3dbb9e||_0x3300d6,'creator':_0x3300d6,'content':_0x215e98,'createdAt':_0x5b6d0e,'authoredAt':_0x2f17b2,'attributes':_0x545d97});}_addComment(_0x550b0c){let {threadId:_0x949e9d,content:_0x27ab51,attributes:_0x214ddf,isFromAdapter:_0x1f4b30}=_0x550b0c;const _0x4ea116=this['getCommentThread'](_0x550b0c['threadId']);if(!_0x4ea116)throw new _0x4542a4('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x4910cc=this['_createNewComment'](_0x550b0c),{id:_0x1fd8ac}=_0x4910cc;if(_0x4ea116['_add'](_0x4910cc),_0x1f4b30||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x4ea116['isSubmitted'])return Promise['resolve']();const _0x332967=this['context']['plugins']['get']('PendingActions'),{channelId:_0x444d62}=_0x4ea116,_0x554844=_0x332967['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x214ddf||(_0x214ddf={}),this['adapter']['addComment']({'channelId':_0x444d62,'threadId':_0x949e9d,'commentId':_0x1fd8ac,'content':_0x27ab51,'attributes':_0x214ddf})['then'](_0x4d01f2=>{_0x332967['remove'](_0x554844),_0x4d01f2&&this['_updateComment']({'channelId':_0x444d62,'threadId':_0x949e9d,'commentId':_0x1fd8ac,'createdAt':_0x4d01f2['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x42a884=>{throw console['error'](_0x42a884),new _0x4542a4('commentsrepository-add-comment-internal-error',this);});}_updateComment({threadId:_0x59ee4d,commentId:_0x21b06a,content:_0x2b3c4b,createdAt:_0x439f84,attributes:_0x56df22,isFromAdapter:_0x5e358d}){if(void 0x0!==_0x2b3c4b&&('string'!=typeof _0x2b3c4b||!_0x2b3c4b['trim']()['length']))throw new _0x4542a4('commentsrepository-update-comment-invalid-content');const _0xa6a7bd=this['getCommentThread'](_0x59ee4d),_0x3d8c27=_0xa6a7bd['getComment'](_0x21b06a);if(!_0x3d8c27)throw new _0x4542a4('commentsrepository-update-missing-comment',this);let _0x618c62=!0x1;if(_0x2b3c4b&&_0x2b3c4b!==_0x3d8c27['content']&&(_0x3d8c27['isEditable']||_0x5e358d)&&(_0x3d8c27['content']=_0x2b3c4b,_0x618c62=!0x0),_0x439f84&&_0x439f84!==_0x3d8c27['createdAt']&&(_0x3d8c27['createdAt']=_0x439f84,_0x3d8c27['isExternal']||(_0x3d8c27['authoredAt']=_0x439f84),_0x618c62=!0x0),_0x56df22&&!_0x3b95fa(_0x56df22,_0x3d8c27['attributes'])&&(_0x3d8c27['attributes']=_0x56df22,_0x618c62=!0x0),!_0x618c62)return Promise['resolve']();if(_0xa6a7bd['fire']('commentUpdated'),_0x5e358d||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x41db69=this['context']['plugins']['get']('PendingActions'),{channelId:_0x546813}=this['getCommentThread'](_0x3d8c27['threadId']),_0x1efb48=_0x41db69['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x546813,'threadId':_0x59ee4d,'commentId':_0x21b06a,'content':_0x2b3c4b,'attributes':_0x56df22})['then'](()=>_0x41db69['remove'](_0x1efb48))['catch'](_0x46a33b=>{throw console['error'](_0x46a33b),new _0x4542a4('commentsrepository-update-comment-internal-error',this);});}_removeComment({threadId:_0x6c3e22,commentId:_0x3f5099,isFromAdapter:_0x3e28af}){const _0x326fdf=this['getCommentThread'](_0x6c3e22),_0x5a8952=_0x326fdf['getComment'](_0x3f5099);if(!_0x5a8952)throw new _0x4542a4('commentsrepository-remove-missing-comment',this);if(_0x326fdf['_remove'](_0x5a8952),_0x3e28af||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0xb46ba3=this['context']['plugins']['get']('PendingActions'),{channelId:_0x137e8b}=_0x326fdf,_0xb9782a=_0xb46ba3['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x137e8b,'threadId':_0x6c3e22,'commentId':_0x3f5099})['then'](()=>_0xb46ba3['remove'](_0xb9782a))['catch'](_0x4bffaf=>{throw console['error'](_0x4bffaf),new _0x4542a4('commentsrepository-remove-comment-internal-error',this);});}},ri=class extends si{['channelId'];['id'];_isAttached;_isSubmitted;comments;_repository;constructor(_0x2e7824,_0x3b75df){super();const _0x2670c3=_0x3b75df['isResolvable'];this['channelId']=_0x3b75df['channelId'],this['id']=_0x3b75df['id'],this['comments']=new _0x3a878e(),this['_repository']=_0x2e7824,this['_isAttached']=!0x1,this['_isSubmitted']=_0x3b75df['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x2e7824,'_permissions',_0x2e7824,'_readOnlyChannels',()=>_0x2e7824['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x2e7824,'_permissions',()=>_0x2e7824['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x2e7824,'_permissions',()=>{const _0x306e92=_0x2e7824['getPermissions'](this['channelId']);return _0x306e92['write']||_0x306e92['admin'];}),this['bind']('isResolvable')['to'](_0x2e7824,'_permissions',()=>_0x2670c3&&_0x2e7824['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x3b75df['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x355755,_0x5eb2b8)=>_0x355755?_0x5eb2b8?_0x355755<_0x5eb2b8?_0x355755:_0x5eb2b8:_0x355755:_0x5eb2b8),this['set']('unlinkedAt',_0x3b75df['unlinkedAt']||null),this['set']('resolvedAt',_0x3b75df['resolvedAt']||null),this['set']('resolvedBy',_0x3b75df['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x103e3c=>!!_0x103e3c),this['set']('attributes',_0x3b75df['attributes']||{});}get weight(){return Array['from'](this['comments'])['reduce']((_0x3a7dd0,_0x20e652)=>_0x3a7dd0+_0x20e652['weight'],0x0);}get length(){return this['comments']['length'];}get isAttached(){return this['_isAttached'];}get isSubmitted(){return this['_isSubmitted'];}submit(){const {channelId:_0x2ff6eb,id:_0x16da74}=this;this['_repository']['fire'](ai('submitCommentThread',_0x2ff6eb),{'channelId':_0x2ff6eb,'threadId':_0x16da74});}setUnlinkedAt(_0xd2dacb){this['_update']({'unlinkedAt':_0xd2dacb});}['resolve']({resolvedAt:_0x235b7c=new Date(),resolvedBy:_0x1b8d97='',isFromAdapter:_0x292cb0=!0x1}={}){const _0x3fac0b=this['_repository']['context']['plugins']['get'](_0x459e31)['me'],{channelId:_0x2eb664,id:_0x453d9c}=this;this['_repository']['fire'](ai('resolveCommentThread',_0x2eb664),{'channelId':_0x2eb664,'threadId':_0x453d9c,'resolvedAt':_0x235b7c,'resolvedBy':_0x1b8d97||_0x3fac0b['id'],'isFromAdapter':_0x292cb0});}['reopen']({isFromAdapter:_0x5eb70a=!0x1}={}){const {channelId:_0x1edf79,id:_0x57d105}=this;this['_repository']['fire'](ai('reopenCommentThread',_0x1edf79),{'channelId':_0x1edf79,'threadId':_0x57d105,'isFromAdapter':_0x5eb70a});}setContext(_0x18a924){this['context']||this['_update']({'context':_0x18a924});}setAttribute(_0x451900,_0x27fa15){const _0x14f7d9=_0x271638(this['attributes']);_0x25aad1(_0x14f7d9,_0x451900,_0x27fa15),this['_update']({'attributes':_0x14f7d9});}removeAttribute(_0x1aec79){const _0x3cab6a=_0x271638(this['attributes']);_0x263f15(_0x3cab6a,_0x1aec79),this['_update']({'attributes':_0x3cab6a});}['remove']({isFromAdapter:_0x34c80a=!0x1}={}){const {channelId:_0x285d72,id:_0x402aeb}=this;this['_repository']['fire'](ai('removeCommentThread',_0x285d72),{'channelId':_0x285d72,'threadId':_0x402aeb,'isFromAdapter':_0x34c80a});}attachTo(_0x2a8df5){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x2a8df5});}addComment(_0x2d08e0){const {channelId:_0x51d4ac,id:_0x44fbc4}=this;this['_repository']['fire'](ai('addComment',_0x51d4ac,_0x44fbc4),Object['assign']({'channelId':_0x51d4ac,'threadId':_0x44fbc4},_0x2d08e0));}getComment(_0x56c842){if('string'!=typeof _0x56c842)throw new _0x4542a4('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x56c842});return this['comments']['get'](_0x56c842);}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'](_0x2709f3=>_0x2709f3['toJSON']()),'attributes':this['attributes']};}['_add'](_0x15d5ac){return this['listenTo'](_0x15d5ac,'change:authoredAt',()=>{const _0x5bb824=this['_findOptimalIndex'](_0x15d5ac),_0x22fa87=this['comments'];_0x5bb824-0x1!=_0x22fa87['getIndex'](_0x15d5ac)&&_0x5bb824+0x1!=_0x22fa87['getIndex'](_0x15d5ac)&&(this['_remove'](_0x15d5ac),this['_add'](_0x15d5ac));}),this['comments']['add'](_0x15d5ac,this['_findOptimalIndex'](_0x15d5ac));}_update(_0x1e93c1){const {channelId:_0x3e175f,id:_0x284d5c}=this;this['_repository']['fire'](ai('updateCommentThread',_0x3e175f),{..._0x1e93c1,'channelId':_0x3e175f,'threadId':_0x284d5c});}['_remove'](_0x20f67a){return this['stopListening'](_0x20f67a),_0x20f67a['destroy'](),this['comments']['remove'](_0x20f67a);}_findOptimalIndex(_0x70445f){const _0xfc3fb0=this['comments']['find'](_0x35da94=>new Date(_0x35da94['authoredAt'])['getTime']()>new Date(_0x70445f['authoredAt'])['getTime']());return _0xfc3fb0?this['comments']['getIndex'](_0xfc3fb0):this['length'];}},hi=class extends ni{['id'];threadId;author;creator;createdAt;_repository;constructor(_0x54c739,_0x13daca){super();const _0x4ba8a1=_0x54c739['context']['plugins']['get'](_0x459e31)['me'],_0x3a77c6=_0x54c739['getCommentThread'](_0x13daca['threadId']),_0x94d852=0x0===_0x3a77c6['comments']['length'],_0x10f44c=_0x4ba8a1===_0x13daca['author'];this['id']=_0x13daca['id'],this['threadId']=_0x13daca['threadId'],this['author']=_0x13daca['author'],this['creator']=_0x13daca['creator'],this['set']('content',_0x13daca['content']),this['createdAt']=_0x13daca['createdAt']||new Date(),this['set']('authoredAt',_0x13daca['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x3a77c6,'resolvedAt'),this['set']('attributes',_0x13daca['attributes']||{}),this['bind']('isEditable')['to'](_0x54c739,'_permissions',()=>{const _0x3e0eb5=_0x54c739['getPermissions'](_0x3a77c6['channelId'])['write'],_0x545d43=_0x54c739['getPermissions'](_0x3a77c6['channelId'])['modifyAll'];return _0x10f44c&&_0x3e0eb5||!_0x10f44c&&_0x545d43;}),this['bind']('isRemovable')['to'](_0x3a77c6,'isRemovable',_0x54c739,'_permissions',_0x4ce203=>{const _0x2265e7=_0x54c739['getPermissions'](_0x3a77c6['channelId'])['write'],_0x11879c=_0x54c739['getPermissions'](_0x3a77c6['channelId'])['modifyAll'];return _0x10f44c&&_0x2265e7||_0x4ce203&&_0x94d852||!_0x10f44c&&_0x11879c&&!_0x94d852;}),this['bind']('isReadOnly')['to'](_0x3a77c6,'isReadOnly'),this['_repository']=_0x54c739;}get isExternal(){return Boolean(this['attributes']&&this['attributes']['@external']);}get weight(){return Math['max'](function(_0x47bc77){const _0x4be1dd=document['createElement']('div');return _0x4be1dd['innerHTML']=_0x47bc77,_0x4be1dd['textContent']['length'];}(this['content']),0xc8);}update(_0x479fe8){const {threadId:_0x39abdf,id:_0x1aa173}=this;if(!this['_repository']['hasCommentThread'](_0x39abdf))throw new _0x4542a4('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x1b2fc1}=this['_repository']['getCommentThread'](_0x39abdf);this['_repository']['fire'](ai('updateComment',_0x1b2fc1,_0x39abdf),{'channelId':_0x1b2fc1,'threadId':_0x39abdf,'commentId':_0x1aa173,..._0x479fe8});}setAttribute(_0x203811,_0x4b236f){const _0x3bdf71=_0x271638(this['attributes']);_0x25aad1(_0x3bdf71,_0x203811,_0x4b236f),this['update']({'attributes':_0x3bdf71});}removeAttribute(_0x47e73b){const _0x598980=_0x271638(this['attributes']);_0x263f15(_0x598980,_0x47e73b),this['update']({'attributes':_0x598980});}['remove'](_0x8a1da2={}){if(!_0x8a1da2['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x492ec1,id:_0x108ccd}=this;if(!this['_repository']['hasCommentThread'](_0x492ec1))throw new _0x4542a4('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x173679}=this['_repository']['getCommentThread'](_0x492ec1);this['_repository']['fire'](ai('removeComment',_0x173679,_0x492ec1),{'channelId':_0x173679,'threadId':_0x492ec1,'commentId':_0x108ccd,..._0x8a1da2});}toJSON(){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}destroy(){this['stopListening']();}};function ai(_0x261cfb,..._0x439a7b){for(const _0x456f8e of _0x439a7b)void 0x0!==_0x456f8e&&(_0x261cfb+=':'+String(_0x456f8e));return _0x261cfb;}var ci=class extends _0x2c1906{constructor(_0x2889c6){super(_0x2889c6),this['set']('hasContent',!0x1);}['refresh'](){const _0x2a34a7=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x34b4e3 of _0x2a34a7['getRanges']())if(this['_hasContent'](_0x34b4e3))return void(this['hasContent']=!0x0);}execute({threadId:_0x409a2b=_0x31754c(),ranges:_0x2ace23,comment:_0x399703}={}){const _0x42378c=this['editor']['model'],_0x4fa47c=_0x2ace23??Array['from'](_0x42378c['document']['selection']['getRanges']()),_0x5a2dc5=[];for(const _0x29d0da of _0x4fa47c)this['_hasContent'](_0x29d0da)&&_0x5a2dc5['push'](this['_trimToContent'](_0x29d0da));if(!_0x5a2dc5['length'])throw new _0x4542a4('addcommentthreadcommand-incorrect-ranges',null);_0x399703&&this['_createCommentThread'](_0x409a2b,_0x399703),this['_createMarkersFromRanges'](_0x409a2b,_0x5a2dc5,!!_0x399703);}_createMarkersFromRanges(_0x15ecee,_0x20d5ec,_0x1afc70){this['editor']['model']['change'](_0x28fff6=>{for(const _0x48e22d of _0x20d5ec){const _0x53978e='comment:'+_0x15ecee+':'+_0x31754c()['substr'](0x1,0x5);_0x28fff6['addMarker'](_0x53978e,{'range':_0x48e22d,'usingOperation':_0x1afc70,'affectsData':_0x1afc70});}});}_createCommentThread(_0x16db8f,_0x267851){const _0x18ab8d=this['editor']['plugins']['get']('CommentsRepository'),_0xd2e29b=this['editor']['config']['get']('collaboration.channelId'),_0x2ccb54=this['editor']['plugins']['get']('Users')['me'];if(!_0x2ccb54)throw new _0x4542a4('addcommentthreadcommand-user-not-found',null);_0x18ab8d['addCommentThread']({'threadId':_0x16db8f,'channelId':_0xd2e29b,'comments':[{'authorId':_0x2ccb54['id'],'content':_0x267851,'createdAt':new Date(),'attributes':{}}]});}_hasContent(_0x206567){for(const _0x5620fd of _0x206567['getItems']())if(this['_itemIsContent'](_0x5620fd))return!0x0;return!0x1;}_itemIsContent(_0x541420){return _0x541420['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x541420)&&!_0x541420['is']('element','tableCell');}_trimToContent(_0x580a96){const _0x817694=_0x1bb6ee=>!this['_itemIsContent'](_0x1bb6ee['item']),_0x55b7e4=_0x580a96['start']['getLastMatchingPosition'](_0x817694),_0x5304e5=_0x580a96['end']['getLastMatchingPosition'](_0x817694,{'direction':'backward'});return this['editor']['model']['createRange'](_0x55b7e4,_0x5304e5);}},di=class extends _0x573609{_dataCollectors;_editorAnnotations;static get requires(){return[ti];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x51a7d0){super(_0x51a7d0),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}init(){const _0x59525a=this['editor'],_0x59743f=_0x59525a['model']['document']['selection'],_0x5c1bd6=_0x130064(()=>this['refreshSelectedViews'](),0xa);_0x59743f['on']('change:range',(_0x4a9ab4,_0x36cbdf)=>{_0x36cbdf['directChange']&&(_0x5c1bd6['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x59525a['editing']['view']['document'],'change:isFocused',(_0x219514,_0x4db1ad,_0x2a2343)=>{_0x2a2343&&_0x5c1bd6();}),this['listenTo'](_0x59525a['ui']['focusTracker'],'change:isFocused',(_0x19a35,_0x38db8e,_0x1cb44f)=>{_0x1cb44f||this['fire']('blur',{'isAnnotationTracked':_0xf29afe=>this['_editorAnnotationsData']['has'](_0xf29afe['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}registerAnnotation(_0x4d716e){if(this['_editorAnnotations']['has'](_0x4d716e['view']))return;this['_editorAnnotations']['add'](_0x4d716e['view']),this['editor']['ui']['focusTracker']['add'](_0x4d716e['view']['element']);const _0x28115b=this['editor']['plugins']['get'](ti);this['listenTo'](_0x28115b['collection'],'remove',(_0x2dc073,_0x501240)=>{this['editor']['ui']['focusTracker']['remove'](_0x501240['view']['element']),this['_editorAnnotations']['delete'](_0x501240['view']);});}hasDomSelection(){return this['editor']['editing']['view']['hasDomSelection'];}addSourceCollector(_0x3058c6){if('function'!=typeof _0x3058c6)throw new _0x4542a4('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x3058c6);}refreshSelectedViews(){this['fire']('refresh');}getOrderedSelectedAnnotations({activeAnnotation:_0x27f56d,annotations:_0x369a70}){const _0x27513b=[],_0x1653a6=this['editor']['model']['document']['selection'],_0x4d9c02=Array['from'](_0x1653a6['getRanges']());for(const [_0x49ed13,_0xec0cad]of this['_editorAnnotationsData']){const _0x41f858=_0x1a9954(_0xec0cad),_0xb3a489=_0x369a70['getByInnerView'](_0x49ed13);_0x41f858&&_0xb3a489&&_0x27513b['push']({'annotation':_0xb3a489,'range':_0x41f858});}function _0x1a9954(_0x52e38a){for(const _0x4befdf of _0x52e38a)for(const _0x315348 of _0x4d9c02)if(_0x4befdf['containsRange'](_0x315348,!_0x1653a6['isCollapsed']))return _0x4befdf;return null;}return _0x27513b['sort']((_0x1d4ea7,_0x3acd5d)=>{const _0x51747d=_0x1d4ea7['range'],_0x37b31e=_0x3acd5d['range'];if(!_0x51747d['isEqual'](_0x37b31e)){if(_0x51747d['containsRange'](_0x37b31e,!0x0))return 0x1;if(_0x37b31e['containsRange'](_0x51747d,!0x0))return-0x1;}return _0x1d4ea7['annotation']==_0x27f56d?-0x1:_0x3acd5d['annotation']==_0x27f56d?0x1:0x0;})['map'](_0x24a2d1=>_0x24a2d1['annotation']);}get _editorAnnotationsData(){const _0x24aefa=new Map();for(const _0x277f11 of Array['from'](this['_dataCollectors']))for(const [_0x10e4b4,_0x1883e8]of _0x277f11())_0x24aefa['set'](_0x10e4b4,_0x1883e8);return _0x24aefa;}},li=class extends _0x573609{afterInit(){const _0x337e87=this['editor'];_0x337e87['plugins']['has']('RestrictedEditingModeEditing')&&_0x337e87['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},mi=class extends _0x573609{constructor(_0x3e16ab){super(_0x3e16ab),this['editor']['config']['define']('importWord.formatting.comments','basic');}afterInit(){const _0x484363=this['editor'],_0x2eb51c=_0x484363['commands']['get']('importWord'),_0xa7f72b=_0x484363['plugins']['get'](_0x459e31);_0x2eb51c&&(_0x2eb51c['on']('execute',(_0x403378,[,_0x25dcf6])=>{_0x25dcf6['collaboration_features']={'comments':!0x0,'user_id':_0xa7f72b['me']['id']};},{'priority':_0x4d0af8['high']+0xa}),this['listenTo'](_0x2eb51c,'dataInsert',this['_handleImportedData']));}_handleImportedData(_0x1037c9,_0x20cf0d){const {comment_threads:_0x7e0ab6}=_0x20cf0d;_0x7e0ab6&&_0x7e0ab6['forEach'](({thread_id:_0x13e2e1,comments:_0x9f1861,is_resolved:_0x38d7f2})=>{const _0x1b8974=new Date(),_0x513b01=_0x9f1861['map'](({author:_0x31e5a1,content:_0x364f81,created_at:_0x4ae5b3})=>({'content':_0x364f81,'authorId':this['editor']['plugins']['get'](_0x459e31)['me']['id'],'createdAt':_0x1b8974,'attributes':{'@external':{'authorName':_0x31e5a1,'createdAt':_0x4ae5b3?new Date(_0x4ae5b3):new Date(),'source':'importWord'}}})),_0x1793d5=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](oi)['addCommentThread']({'channelId':_0x1793d5,'threadId':_0x13e2e1,'comments':_0x513b01,'resolvedAt':_0x38d7f2?_0x1b8974:null});});}},ui=class extends _0x573609{constructor(_0x243b8d){super(_0x243b8d),this['editor']['config']['define']('comments.copyMarkers','default');}static get requires(){return[pt,wt];}afterInit(){const _0x364ccf=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x364ccf,'contentInsertion',(_0x1a6c75,_0x3773d0)=>this['_removeMarkersWithoutThreads'](_0x3773d0['content']['markers']),{'priority':'highest'});}_removeMarkersWithoutThreads(_0x5e4971){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x5e4971;const _0x14527e=this['editor']['plugins']['get']('CommentsRepository');for(const _0x5de0ec of _0x5e4971['keys']()){const [_0x18f910,_0x51759d]=_0x5de0ec['split'](':');'comment'!=_0x18f910||_0x14527e['hasCommentThread'](_0x51759d)||_0x5e4971['delete'](_0x5de0ec);}return _0x5e4971;}_registerMarkerInClipboardPipeline(){const _0x1e67fb=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x2fed27=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x2fed27&&_0x1e67fb['_registerMarkerToCopy']('comment',_0x2fed27);}_mapCommentsCopyConfigToRegisterConfiguration(_0x2493b7){switch(_0x2493b7){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function fi(_0x21ed33){const _0x4d599c=_0x21ed33['split'](':');return{'group':_0x4d599c[0x0],'id':_0x4d599c[0x1],'part':_0x4d599c[0x2]};}var pi=class extends _0x573609{init(){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}overrideMarkerConverters(){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0xfa5c8a,_0x19f55f)=>{if(!_0x19f55f['options']['showCommentHighlights'])return null;if(_0x19f55f['options']['ignoreResolvedComments']){const {id:_0x1ff717}=fi(_0xfa5c8a['markerName']);if(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x1ff717)?.['isResolved']&&_0xfa5c8a['item'])return _0x19f55f['consumable']['consume'](_0xfa5c8a['item'],'addMarker:'+_0xfa5c8a['markerName']),_0x19f55f['consumable']['consume'](_0xfa5c8a['item'],'removeMarker:'+_0xfa5c8a['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x2de0e2=>{_0x2de0e2['on']('addMarker:comment',(_0x19af7b,_0x4e6ffc,_0x3b99a8)=>{if(!_0x3b99a8['options']['showCommentHighlights'])return;const _0x523467=_0x4e6ffc['item'];if(!_0x523467)return;const _0x4f6a62=_0x3b99a8['mapper']['toViewElement'](_0x523467);this['editor']['model']['schema']['isObject'](_0x523467)&&_0x4f6a62&&!_0x4f6a62['getCustomProperty']('widget')&&_0x4f6a62['is']('containerElement')&&Ct(_0x4f6a62,_0x3b99a8['writer']);},{'priority':'high'});});}overrideHorizontalRuleConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x5ae187,{writer:_0x26c923,options:_0x434760})=>{if(!_0x434760['showCommentHighlights'])return null;const _0x1f7fc3=_0x26c923['createContainerElement']('div'),_0x43ad5b=_0x26c923['createEmptyElement']('hr');return _0x26c923['addClass']('ck-horizontal-line',_0x1f7fc3),_0x26c923['insert'](_0x26c923['createPositionAt'](_0x1f7fc3,0x0),_0x43ad5b),_0x1f7fc3;},'converterPriority':'high'});}overrideImageInlineConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x22994d,{writer:_0x2fe4be,options:_0x410552})=>{if(!_0x410552['showCommentHighlights'])return null;const _0x45cc93=_0x2fe4be['createContainerElement']('span'),_0x5002a0=_0x2fe4be['createEmptyElement']('img');return _0x2fe4be['addClass']('image-inline',_0x45cc93),_0x2fe4be['insert'](_0x2fe4be['createPositionAt'](_0x45cc93,0x0),_0x5002a0),_0x45cc93;},'converterPriority':'high'});}overrideMediaEmbedConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x53b98a,{writer:_0x507f50,options:_0x269173})=>{if(_0x269173['showCommentHighlights'])return _0x507f50['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x40313b,_0x54358a,_0x17d6f9)=>{_0x17d6f9['options']['showCommentHighlights']&&_0x40313b['stop']();},{'priority':'high'});}},wi=class extends _0x573609{static get requires(){return[oi,di,_0x459e31,li,mi,ui,pi];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x29900c){super(_0x29900c),this['set']('isThreadsLoadingPaused',!0x0),_0x29900c['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x36d971,_0x10423c,_0x26f58b,_0x67cb2f)=>{const _0xd35346=_0x29900c['plugins']['get'](oi),_0x5c824b=_0x26f58b?fi(_0x26f58b)['id']:null;_0x29900c['model']['change'](()=>{if(_0x5c824b){const _0x428e10=this['getAllMarkersForId'](_0x5c824b);for(const _0x22f63c of _0x428e10)_0x29900c['editing']['reconvertMarker'](_0x22f63c);}if(_0x67cb2f){const {id:_0x1fa972}=fi(_0x67cb2f),_0xc9bdb3=_0xd35346['getCommentThread'](_0x1fa972);if(_0xc9bdb3&&_0xc9bdb3['unlinkedAt'])return;if(_0xc9bdb3&&!_0xc9bdb3['isAttached'])return;const _0x302050=this['getAllMarkersForId'](_0x1fa972);for(const _0x39f213 of _0x302050)_0x29900c['editing']['reconvertMarker'](_0x39f213);}}),_0x5c824b&&this['scrollToThreadMarker'](_0x5c824b);}),this['_initAriaMarkerChangeAnnouncements']();}init(){const _0x32c1c6=this['editor'],_0x4e46cf=_0x32c1c6['plugins']['get'](oi),_0x15ad26=_0x32c1c6['config']['get']('collaboration.channelId'),_0x3156a1=_0x4e46cf['getCommentThreads']()['filter'](_0x3cc0cf=>_0x3cc0cf['channelId']!==_0x15ad26);_0x32c1c6['commands']['add']('addCommentThread',new ci(_0x32c1c6)),this['listenTo'](_0x32c1c6,'change:isReadOnly',(_0xe95329,_0x329910,_0x2db610)=>{_0x4e46cf['switchReadOnly'](_0x2db610,_0x32c1c6['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x4e46cf,gi('addCommentThread',_0x15ad26),(_0x3a36fd,{threadId:_0x39b0e1})=>{this['editor']['plugins']['get'](oi)['getCommentThread'](_0x39b0e1)?.['unlinkedAt']&&this['_attachArchivedThread'](_0x39b0e1);}),this['listenTo'](_0x4e46cf,gi('removeCommentThread',_0x15ad26),(_0x4d0892,{threadId:_0x55ac92})=>{_0x32c1c6['model']['enqueueChange']({'isUndoable':!0x1},_0x236bdc=>{const _0x49e2de=this['getAllMarkersForId'](_0x55ac92);for(const _0x2b6e56 of _0x49e2de)_0x236bdc['removeMarker'](_0x2b6e56);});}),this['listenTo'](_0x4e46cf,gi('resolveCommentThread',_0x15ad26),(_0x554213,{threadId:_0x1095b4})=>{this['_reconvertMarkers'](_0x1095b4);const _0x3f43e2=this['editor']['plugins']['get'](ti);(this['editor']['editing']['view']['hasDomSelection']||_0x3f43e2['collection']['isFocused'])&&(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x1095b4)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x4e46cf,gi('reopenCommentThread',_0x15ad26),(_0x694bb1,{threadId:_0x5bb6dd})=>{this['_reconvertMarkers'](_0x5bb6dd);},{'priority':'low'}),this['listenTo'](_0x4e46cf,gi('addComment',_0x15ad26),(_0x4e9bed,{threadId:_0x22aa64,isFromAdapter:_0x6ef869})=>{const _0xe125fa=this['getAllMarkersForId'](_0x22aa64);!_0x6ef869&&0x0!=_0xe125fa['length']&&_0x4e46cf['hasCommentThread'](_0x22aa64)&&0x1===_0x4e46cf['getCommentThread'](_0x22aa64)['length']&&_0x32c1c6['model']['enqueueChange']({'isUndoable':!0x1},_0x3edf22=>{for(const _0x18c6ae of _0xe125fa)_0x3edf22['updateMarker'](_0x18c6ae,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x3156a1);}afterInit(){!async function(_0x17b537){const _0x4ef5fd='KpOBJGNSEgqCyfVF1kZ8lbnRjM7eIzAsDQHw9aThu6rcYi05UmPL4d3X2Wotvx',_0x49142f=0x79170,_0x37bf2d=window['Date']['now'](),_0xd24a11=_0x17b537['editor'],_0x3d97c2=new window['Promise'](_0x5e30e0=>{_0xd24a11['once']('ready',_0x5e30e0);}),_0x5b8eb9={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x5b4a46=_0xd24a11['config']['get']('licenseKey');async function _0x376e82(){let _0x1d8bd7,_0x1de350=null,_0x24c7e0=null;try{return'GPL'==_0x5b4a46?'NotAllowed':(_0x1d8bd7=_0x2680ff(),_0x1d8bd7?(_0x1d8bd7['usageEndpoint']&&(_0x24c7e0=_0x3335d6(_0x1d8bd7['usageEndpoint'],_0x1d8bd7['jti'])),await _0x79ff71()?_0x48ca0f()?_0x28a476()?'Expired':_0x52dc98()?('evaluation'==_0x1d8bd7['licenseType']&&(_0x1de350=_0x275a54('EvaluationLimit')),await _0x15c68f()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x28a476(){const _0x361b02=['evaluation','trial']['includes'](_0x1d8bd7['licenseType'])?_0x37bf2d/0x3e8:0xe10*_0x49142f;return _0x1d8bd7['exp']<_0x361b02;}function _0x48ca0f(){const _0x214acc=_0x1d8bd7['features'];if(!_0x214acc)return!0x1;if(_0x214acc['includes']('*'))return!0x0;if(_0x214acc['includes']('CMT'))return!0x0;if(_0x214acc['includes']('TRILIUM')&&_0x54ca63())return!0x0;if(_0x214acc['includes']('RCMT')){if(_0x4a9c16())return!0x0;if(_0x4dee5b()||_0x3ee200())return!0x0;}return!0x1;}function _0x52dc98(){const _0x57c12c=_0x1d8bd7['licensedHosts'];if(!_0x57c12c||0x0==_0x57c12c['length'])return!0x0;const {hostname:_0x13c4d3}=new URL(window['location']['href']);if(_0x57c12c['includes'](_0x13c4d3))return!0x0;const _0x1862ce=_0x13c4d3['split']('.');return _0x57c12c['filter'](_0x3d873e=>_0x3d873e['includes']('*'))['map'](_0xc1310c=>_0xc1310c['split']('.'))['filter'](_0xf066f8=>_0xf066f8['length']<=_0x1862ce['length'])['map'](_0x165da3=>Array(_0x1862ce['length']-_0x165da3['length'])['fill']('*'===_0x165da3[0x0]?'*':'')['concat'](_0x165da3))['some'](_0x48764d=>_0x1862ce['every']((_0x24d503,_0x1e7e3e)=>_0x48764d[_0x1e7e3e]===_0x24d503||'*'===_0x48764d[_0x1e7e3e]));}function _0x15c68f(){return _0x1de350&&_0x24c7e0?new window['Promise']((_0x2a01fd,_0x1b0f58)=>{_0x1de350['then'](_0x2a01fd,_0x1b0f58),_0x24c7e0['then'](_0x49daaf=>{'Valid'!=_0x49daaf&&_0x2a01fd(_0x49daaf);},_0x1b0f58);}):_0x1de350||_0x24c7e0||'Valid';}}function _0x3335d6(_0x2d34fd,_0x56434f){return new window['Promise'](_0x2a975d=>{if(_0xcad208())return _0x2a975d('Valid');_0x51eba0(),_0xd24a11['decorate']('_sendUsageRequest');let _0x3e802c=!0x1;const _0x268847=_0x31754c();function _0x2a3530(_0x2511c2){return!!_0x2511c2&&('object'==typeof _0x2511c2||'function'==typeof _0x2511c2)&&'function'==typeof _0x2511c2['then']&&'function'==typeof _0x2511c2['catch'];}function _0x13b2ad(_0x1aaf75){_0x22404e(_0x1aaf75)['then'](_0x5c2873=>_0x5c2873&&'ok'==_0x5c2873['status']?_0x1db13e(_0x43a50f(_0x268847+_0x56434f))!=_0x5c2873['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x5b96b7=>(_0xad5bac(),_0x5b96b7),()=>{const _0x4edc26=_0x30cb84();return null==_0x4edc26?(_0xad5bac(),'Valid'):_0x37bf2d-_0x4edc26>0x240c8400?'UsageLimit':'Valid';})['then'](_0x2a975d)['catch'](()=>{_0x2a975d('UsageLimit');});const _0x353233=0x36ee80;function _0xad5bac(){const _0x7e3770='llct-'+_0x1db13e(_0x43a50f(_0x2d34fd)),_0x447866=_0x452be4(_0x1db13e(window['Math']['ceil'](_0x37bf2d/_0x353233)));window['localStorage']['setItem'](_0x7e3770,_0x447866);}function _0x30cb84(){const _0x524761='llct-'+_0x1db13e(_0x43a50f(_0x2d34fd)),_0x3741a6=window['localStorage']['getItem'](_0x524761);return _0x3741a6?window['parseInt'](_0x452be4(_0x3741a6),0x10)*_0x353233:null;}function _0x22404e(_0x4a0fb7){return new window['Promise']((_0xc9067a,_0x492d16)=>{_0x4a0fb7['then'](_0xc9067a,_0x492d16),window['setTimeout'](_0x492d16,0x1d4c0);});}}_0xd24a11['on']('_sendUsageRequest',(_0x1ff453,_0x4f4491)=>{if(_0x4f4491[0x0]!=_0x2d34fd)return _0x2a975d('UsageLimit');_0x4f4491[0x1]={..._0x4f4491[0x1],'requestId':_0x268847};},{'priority':'high'}),_0xd24a11['on']('_sendUsageRequest',_0xd278e=>{_0x2a3530(_0xd278e['return'])&&(_0x3e802c=!0x0,_0x13b2ad(_0xd278e['return']));},{'priority':'low'}),_0x3d97c2['then'](()=>{_0x3e802c||_0x2a975d('UsageLimit');});});function _0xcad208(){return'auto'==_0xd24a11['editing']['view']['_overlayModeHint'];}function _0x51eba0(){_0xd24a11['editing']['view']['_overlayModeHint']='auto';}}function _0x275a54(_0x8bc2e5){const _0x1a1fcf=[new window['Promise'](_0x577992=>setTimeout(_0x577992,0x93ecc)),_0x3d97c2['then'](()=>new window['Promise'](_0x1c4ef1=>{let _0x1d0912=0x0;_0xd24a11['model']['on']('applyOperation',(_0x5231d0,_0xf7de7)=>{_0xf7de7[0x0]['isDocumentOperation']&&_0x1d0912++,0x5e8==_0x1d0912&&(_0x1c4ef1(),_0x5231d0['off']());});}))];return window['Promise']['race'](_0x1a1fcf)['then'](()=>_0x8bc2e5);}async function _0x4ab1ef(){await _0x3d97c2,_0xd24a11['model']['change']=_0x4ffb5f,_0xd24a11['model']['enqueueChange']=_0x4ffb5f,_0xd24a11['enableReadOnlyMode']('model');}function _0x54ca63(){return window['glob']&&window['glob']['triliumVersion'];}function _0x4a9c16(){return _0x21207f('WebSocketGateway')&&'connected'==_0x169e6f('WebSocketGateway')['state'];}function _0x4dee5b(){return _0x21207f('RevisionViewerIntegration');}function _0x3ee200(){return _0x21207f('TrackChangesDataGetter');}function _0x5b8a35(_0x35e5a0){const _0x4dca0c=_0x3d40d7();_0xd24a11[_0x4dca0c]='commentsLicenseKey'+_0x35e5a0,'Valid'!=_0x35e5a0&&_0x4ab1ef();}function _0x3d40d7(){const _0x4c0fdf=window['String'](window['performance']['now']())['replace']('.','');let _0x4525c1='K';for(let _0x300138=0x0;_0x300138<_0x4c0fdf['length'];_0x300138+=0x2){let _0x2318d2=window['parseInt'](_0x4c0fdf['substring'](_0x300138,_0x300138+0x2));_0x2318d2>=0x3e&&(_0x2318d2-=0x3e),_0x4525c1+=_0x4ef5fd[_0x2318d2];}return _0x4525c1;}function _0x2680ff(){const _0x1cd4fe=_0x5b4a46['split']('.');if(0x3!=_0x1cd4fe['length'])return null;return _0x4de1dc(_0x1cd4fe[0x1]);function _0x4de1dc(_0x5cd260){const _0x396b27=_0xadc68b(_0x5cd260);return _0x396b27&&_0x419160()?_0x396b27:null;function _0x419160(){const _0x36e01e=_0x396b27['jti'],_0x2592b3=window['parseInt'](_0x36e01e['substring'](_0x36e01e['length']-0x8),0x10),_0x223b16={..._0x396b27,'jti':_0x36e01e['substring'](0x0,_0x36e01e['length']-0x8)};return delete _0x223b16['vc'],_0x43a50f(_0x223b16)==_0x2592b3;}}}async function _0x79ff71(){let _0x3effc4=!0x0;try{const [_0x57e916,_0x5c6011,_0x2c7e23]=_0x5b4a46['split']('.');return _0x55b85f(_0x57e916),await _0x487e98(_0x57e916,_0x5c6011,_0x2c7e23),_0x3effc4;}catch{return!0x1;}function _0x55b85f(_0x2b8056){const _0xd64546=_0xadc68b(_0x2b8056);_0xd64546&&'ES256'==_0xd64546['alg']||(_0x3effc4=!0x1);}async function _0x487e98(_0xd8ad8f,_0x570c12,_0x566b52){const _0x3c7007=window['Uint8Array']['from'](_0x389836(_0x566b52),_0x333b64=>_0x333b64['charCodeAt'](0x0)),_0x2083c6=new window['TextEncoder']()['encode'](_0xd8ad8f+'.'+_0x570c12),_0x19603a=window['crypto']['subtle'];if(!_0x19603a)return;const _0x799f54=await _0x19603a['importKey']('jwk',_0x5b8eb9,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x19603a['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x799f54,_0x3c7007,_0x2083c6)||(_0x3effc4=!0x1);}}function _0xadc68b(_0x5a5762){return _0x5a5762['startsWith']('ey')?JSON['parse'](_0x389836(_0x5a5762)):null;}function _0x389836(_0x51a2ed){return window['atob'](_0x51a2ed['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x43a50f(_0x3bb4e7){let _0x476abb=0x1505;function _0x1892c5(_0x585774){for(let _0x46ae48=0x0;_0x46ae48<_0x585774['length'];_0x46ae48++){const _0xeb53f9=_0x585774['charCodeAt'](_0x46ae48);_0x476abb=(_0x476abb<<0x5)+_0x476abb+_0xeb53f9,_0x476abb&=_0x476abb;}}function _0x1dc137(_0x56d585){Array['isArray'](_0x56d585)?_0x56d585['forEach'](_0x1dc137):_0x56d585&&'object'==typeof _0x56d585?Object['entries'](_0x56d585)['sort']()['forEach'](([_0x1176c0,_0x3c9ef9])=>{_0x1892c5(_0x1176c0),_0x1dc137(_0x3c9ef9);}):_0x1892c5(window['String'](_0x56d585));}return _0x1dc137(_0x3bb4e7),_0x476abb>>>0x0;}function _0x1db13e(_0x15b5ab){return _0x15b5ab['toString'](0x10)['padStart'](0x8,'0');}function _0x452be4(_0x411f00){return _0x411f00['split']('')['reverse']()['join']('');}function _0x21207f(_0x4bc2ce){return _0xd24a11['plugins']['has'](_0x4bc2ce);}function _0x169e6f(_0x285eef){return _0xd24a11['plugins']['get'](_0x285eef);}function _0x4ffb5f(){}_0x5b8a35(await _0x376e82());}(this);}destroy(){const _0x13c639=this['editor']['plugins']['get'](oi),_0x2fe933=this['editor']['config']['get']('collaboration.channelId');for(const _0x39184f of _0x13c639['getCommentThreads']({'channelId':_0x2fe933}))_0x13c639['_detachCommentThread'](_0x39184f['id']),_0x13c639['_threads']['delete'](_0x39184f['id']);super['destroy']();}['hasMarkerForId'](_0x36282b){return this['getAllMarkersForId'](_0x36282b)['length']>0x0;}getAllMarkersForId(_0x319302){const _0x28f167=[];for(const _0x562984 of this['editor']['model']['markers'])_0x562984['name']['startsWith']('comment:'+_0x319302)&&_0x28f167['push'](_0x562984);return _0x28f167;}['scrollToThreadMarker'](_0x511407){setTimeout(()=>{const _0x1bcbdf=this['_getTargetForId'](_0x511407);_0x1bcbdf&&this['activeMarker']&&fi(this['activeMarker'])['id']===_0x511407&&_0x3cbb74({'target':_0x1bcbdf[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}_reconvertMarkers(_0x3437c7){this['editor']['model']['change'](()=>{for(const _0x1443cf of this['getAllMarkersForId'](_0x3437c7))this['editor']['editing']['reconvertMarker'](_0x1443cf);});}_attachArchivedThread(_0x32e313){const _0x5ab276=this['editor']['plugins']['get'](oi),_0x4c8d9c=this['editor']['plugins']['get'](di),_0x322d44=_0x5ab276['getCommentThread'](_0x32e313);if(!_0x322d44['isAttached']){const _0x2767ff=_0x322d44['attachTo'](()=>this['_getTargetForId'](_0x322d44['id']));_0x4c8d9c['registerAnnotation'](_0x2767ff),_0x322d44['_hasTargetInContent']=!0x1;}}_initializeMarkerConverters(){const _0x4d5cc6=this['editor'],_0x3bedfb=_0x4d5cc6['plugins']['get'](_0x459e31);_0x4d5cc6['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x5d88e0,_0x410eb7)=>{const {id:_0x23345f}=fi(_0x5d88e0['markerName']),_0x3693d2=_0x4d5cc6['plugins']['get'](oi)['getCommentThread'](_0x23345f),_0x43aacf=this['activeMarker']&&fi(this['activeMarker'])['id']===_0x23345f;let _0x10e19c;if(_0x3693d2&&_0x3693d2['isResolved']&&!_0x43aacf&&_0x5d88e0['item'])return _0x410eb7['consumable']['consume'](_0x5d88e0['item'],'addMarker:'+_0x5d88e0['markerName']),_0x410eb7['consumable']['consume'](_0x5d88e0['item'],'removeMarker:'+_0x5d88e0['markerName']),null;const _0x424995=['ck-comment-marker'];return _0x43aacf&&_0x424995['push']('ck-comment-marker--active'),_0x10e19c=_0x3693d2?.['length']?_0x3693d2['comments']['first']['author']['id']:_0x3bedfb['me']['id'],{'classes':_0x424995,'attributes':{'data-comment':_0x23345f,'data-author-id':_0x10e19c}};}}),_0x4d5cc6['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x16ba70,{options:_0x48de88})=>{if(_0x48de88['showCommentHighlights'])return null;const _0x322334=_0x4d5cc6['plugins']['get'](oi),_0x115585=_0x4d5cc6['model']['markers']['get'](_0x16ba70),{id:_0x54aab2,part:_0x364527}=fi(_0x16ba70);return _0x115585&&!_0x115585['affectsData']||_0x48de88['ignoreResolvedComments']&&_0x322334['getCommentThread'](_0x54aab2)?.['isResolved']?null:{'group':'comment','name':_0x364527?_0x54aab2+':'+_0x364527:_0x54aab2};}}),_0x4d5cc6['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x2aacea,{writer:_0x281da4})=>_0x281da4['createElement']('$marker',{'data-name':'comment:'+_0x2aacea['getAttribute']('id')})}),_0x4d5cc6['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0xb6b49a=this['editor'],_0x506697=_0xb6b49a['plugins']['get'](oi),_0x3a4550=new Set(),_0x1fabbf=new Set();_0xb6b49a['model']['document']['registerPostFixer'](_0x52ce42=>{let _0x47baf7=!0x1;for(const {name:_0x1bfaeb,data:_0x218bb0}of _0xb6b49a['model']['document']['differ']['getChangedMarkers']()){const {group:_0x157d10,id:_0x31b53a}=fi(_0x1bfaeb);let _0x37606f=_0x218bb0['newRange'];if('comment'!==_0x157d10||!_0x37606f)continue;const _0x2afcf5='$graveyard'===_0x37606f['root']['rootName'];_0x2afcf5||(_0x37606f=_i(_0x37606f,_0xb6b49a['model']),!_0x37606f||_0x37606f['isCollapsed']||!_0x218bb0['newRange']||_0x37606f['isEqual'](_0x218bb0['newRange']))?_0xb6b49a['model']['hasContent'](_0x37606f)&&!_0x2afcf5?this['isThreadsLoadingPaused']?_0x3a4550['add'](_0x1bfaeb):this['_handleThreadMarker'](_0x1bfaeb,_0x31b53a):(_0x1fabbf['add'](_0x1bfaeb),_0x3a4550['delete'](_0x1bfaeb),_0x52ce42['removeMarker'](_0x1bfaeb),_0x47baf7=!0x0):(_0x52ce42['updateMarker'](_0x1bfaeb,{'range':_0x37606f}),_0x47baf7=!0x0);}return _0x47baf7;}),this['on']('change:isThreadsLoadingPaused',(_0x222f5a,_0x4cd5b0,_0x21f9f8)=>{if(!_0x21f9f8&&_0x3a4550['size'])for(const _0x141d3a of _0x3a4550){const {id:_0x2795e4}=fi(_0x141d3a);_0x3a4550['delete'](_0x141d3a),_0xb6b49a['model']['markers']['get'](_0x141d3a)&&this['_handleThreadMarker'](_0x141d3a,_0x2795e4);}}),this['listenTo'](_0xb6b49a['model']['document'],'change',()=>{for(const {name:_0x5591a8,data:{newRange:_0x583442}}of _0xb6b49a['model']['document']['differ']['getChangedMarkers']()){const {group:_0x19ced7,id:_0x4733f2}=fi(_0x5591a8);if('comment'!==_0x19ced7)continue;const _0x43d29b=_0x506697['getCommentThread'](_0x4733f2),_0x1e9f59=this['hasMarkerForId'](_0x4733f2);_0x43d29b&&(!_0x43d29b['_hasTargetInContent']&&_0x583442&&_0xb6b49a['editing']['view']['once']('render',()=>{const _0x46d3da=_0xb6b49a['plugins']['get'](ti),_0x2dde72=_0x506697['_threadToController']['get'](_0x43d29b)['view'];_0x46d3da['getByInnerView'](_0x2dde72)['refreshVisibility']();},{'priority':'low'}),_0x43d29b['_hasTargetInContent']=_0x1e9f59||!!_0x583442),_0x583442||(_0x1fabbf['add'](_0x5591a8),_0x3a4550['delete'](_0x5591a8));}for(const _0x2ce60b of _0x1fabbf){const {id:_0x2f5817}=fi(_0x2ce60b),_0x5c5af0=_0x506697['getCommentThread'](_0x2f5817);if(_0x3a4550['delete'](_0x2ce60b),!_0x5c5af0)continue;const _0x351fab=this['hasMarkerForId'](_0x2f5817);_0x351fab||_0x5c5af0['isSubmitted']?_0x351fab||_0x5c5af0['unlinkedAt']||_0x5c5af0['setUnlinkedAt'](new Date()):_0x5c5af0['remove']();}_0x1fabbf['clear']();});}_handleInitialThreads(_0x299a6f){_0x299a6f['forEach'](_0x10097f=>{_0x10097f['unlinkedAt']&&this['_attachArchivedThread'](_0x10097f['id']);});}_getTargetForId(_0x524ec2){const _0x154ae0=this['editor'],_0x50a93c=this['getAllMarkersForId'](_0x524ec2);return _0xb56ba2(_0x154ae0['editing'],_0x50a93c);}_getTextContext(_0x4b69a1){const _0xafe5f7=this['getAllMarkersForId'](_0x4b69a1);let _0x289908='',_0x2af2fe=!0x1;for(const _0x3b4637 of _0xafe5f7){const _0x56410a=_0x3b4637['getRange']();for(const _0x462c38 of Array['from'](_0x56410a['getItems']()))_0x462c38['is']('$textProxy')?(_0x289908&&_0x2af2fe&&(_0x289908+='\x20',_0x2af2fe=!0x1),_0x289908+=_0x462c38['data']):_0x2af2fe=!0x0;_0x2af2fe=!0x0;}return _0x289908['substring'](0x0,0x96);}_attachMarkerToThread(_0x3dcb45,_0x52ff9d){const _0x2485d6=this['editor'],_0x338d14=_0x2485d6['plugins']['get'](oi);let _0xb9eb83=_0x338d14['getCommentThread'](_0x52ff9d);const _0x4028e5=_0x2485d6['config']['get']('collaboration.channelId'),_0x7561f9=_0x2485d6['plugins']['get'](di);return _0xb9eb83&&(_0xb9eb83['unlinkedAt']&&_0xb9eb83['setUnlinkedAt'](null),_0xb9eb83['isAttached'])||(this['getAllMarkersForId'](_0x52ff9d)[0x0]['managedUsingOperations']?_0x338d14['fetchCommentThread']({'channelId':_0x4028e5,'threadId':_0x52ff9d})['then'](_0x16f9d1=>{if('destroyed'!==_0x2485d6['state']){if(_0xb9eb83=_0x16f9d1,_0xb9eb83&&!_0xb9eb83['isAttached']){const _0x17e253=_0xb9eb83['attachTo'](()=>this['_getTargetForId'](_0x52ff9d));_0x7561f9['registerAnnotation'](_0x17e253),_0xb9eb83['isResolved']&&this['_reconvertMarkers'](_0x52ff9d);}else{if(!_0xb9eb83){const _0x141490=this['getAllMarkersForId'](_0x52ff9d);_0x2485d6['model']['change'](_0x2e8ba0=>{for(const _0xba5b33 of _0x141490)_0x2e8ba0['removeMarker'](_0xba5b33);});}}}}):_0x2485d6['editing']['view']['once']('render',()=>{if(_0x338d14['getCommentThread'](_0x52ff9d))return;const _0x59501b=_0x2485d6['plugins']['get'](ti);_0xb9eb83=_0x338d14['openNewCommentThread']({'channelId':_0x4028e5,'threadId':_0x52ff9d,'target':()=>this['_getTargetForId'](_0x52ff9d),'context':{'type':'text','value':this['_getTextContext'](_0x52ff9d)}});const _0x5414c9=_0x338d14['_threadToController']['get'](_0xb9eb83)['view'],_0x58b84c=_0x59501b['getByInnerView'](_0x5414c9);_0x58b84c&&_0x7561f9['registerAnnotation'](_0x58b84c);},{'priority':'low'})),_0xb9eb83;}['_handleThreadMarker'](_0xaff112,_0x240d7f){const _0x36e635=this['_attachMarkerToThread'](_0xaff112,_0x240d7f);_0x36e635&&!_0x36e635['context']&&_0x36e635['setContext']({'type':'text','value':this['_getTextContext'](_0x240d7f)});}_initAriaMarkerChangeAnnouncements(){const _0x14322c=this['editor'];_0x487256(_0x14322c['model'],({left:_0x4efaf6,entered:_0x3d4f45})=>{for(const _0x3ea71d of _0x4efaf6)if(Ai(_0x3ea71d)){_0x14322c['ui']['ariaLiveAnnouncer']['announce'](Et(_0x14322c['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x4dbe42 of _0x3d4f45)if(Ai(_0x4dbe42)){_0x14322c['ui']['ariaLiveAnnouncer']['announce'](Et(_0x14322c['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x26c345(_0x5bd6c1)));break;}});}};function gi(_0x5a63b2,_0x44d6df){return _0x44d6df?_0x5a63b2+':'+_0x44d6df:_0x5a63b2;}function _i(_0x5a4ce7,_0xae659c){const _0x5c6881=_0xae659c['schema'],_0xb955b5=_0xae659c['createRange'](_0x5a4ce7['start']);for(const _0x497272 of _0x5a4ce7['getWalker']()){const {type:_0x3b86d3,item:_0x796a05,nextPosition:_0x29c841}=_0x497272;if('text'===_0x3b86d3||_0x5c6881['isObject'](_0x796a05)){const _0x1cd6f2=_0xae659c['createPositionBefore'](_0x796a05);_0xb955b5['isCollapsed']&&(_0xb955b5['start']=_0x1cd6f2),_0xb955b5['end']=_0x29c841;}}return _0xb955b5;}function Ai(_0x5aaaea){return'comment'===fi(_0x5aaaea['name'])['group'];}var vi=class extends _0x573609{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[oi,wi,di,ti];}get CommentsListView(){return Lt;}get CommentThreadInputView(){return xt;}init(){const _0x3e300c=this['editor'],_0x27076f=_0x3e300c['plugins']['get'](oi),_0x377012=_0x3e300c['plugins']['get'](wi),_0x18d057=_0x3e300c['plugins']['get'](ti),_0x19be59=_0x3e300c['plugins']['get'](di);_0x3e300c['ui']['componentFactory']['add']('comment',()=>{const _0x7f1ea9=this['_createUIButton'](_0x4695a0);return _0x7f1ea9['tooltip']=!0x0,_0x7f1ea9;}),_0x3e300c['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](rt)),_0x19be59['addSourceCollector'](()=>{const _0x298710=[];for(const [_0x56ab48,_0x57330c]of _0x27076f['_threadToController']){const _0x545aa0=_0x377012['getAllMarkersForId'](_0x56ab48['id']),_0x273190=_0x545aa0['map'](_0x27068b=>_0x27068b['getRange']());_0x545aa0['length']>0x0&&_0x298710['push']([_0x57330c['view'],_0x273190]);}return _0x298710;}),this['listenTo'](_0x18d057,'change:activeAnnotations',(_0x2c6853,_0x48b746,_0x51f3a2)=>{const _0x1b4a6a=Array['from'](_0x51f3a2)['map'](_0x1e43ae=>_0x1e43ae['innerView'])['find'](_0x3bba3d=>_0x27076f['_viewToController']['has'](_0x3bba3d));if(!_0x1b4a6a)return void(_0x377012['activeMarker']=null);const _0x396eba=_0x27076f['_viewToController']['get'](_0x1b4a6a)['model']['id'],_0x7a224e='comment:'+_0x396eba;_0x396eba&&_0x377012['hasMarkerForId'](_0x396eba)?_0x377012['activeMarker']=_0x7a224e:_0x377012['activeMarker']&&(_0x377012['activeMarker']=null);}),this['listenTo'](_0x27076f,'removeCommentThread',(_0x8c3c45,{threadId:_0x5bdbe1,isFromAdapter:_0x49ebe5})=>{!_0x49ebe5&&_0x3e300c['ui']['focusTracker']['isFocused']&&_0x377012['hasMarkerForId'](_0x5bdbe1)&&_0x3e300c['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x27076f,'addComment',(_0x22f89c,{threadId:_0x11c733,isFromAdapter:_0x151124})=>{!_0x151124&&_0x377012['hasMarkerForId'](_0x11c733)&&_0x27076f['hasCommentThread'](_0x11c733)&&0x1===_0x27076f['getCommentThread'](_0x11c733)['length']&&(_0x3e300c['editing']['view']['focus'](),_0x22f89c['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x1c735d=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1f4e8a;for(const _0x4c4c93 in _0x1c735d){const _0x33f225=_0x4c4c93,_0x24fe3f=_0x1c735d[_0x33f225];if('commentsLicenseKeyValid'==_0x24fe3f||'commentsLicenseKeyInvalid'==_0x24fe3f||'commentsLicenseKeyExpired'==_0x24fe3f||'commentsLicenseKeyDomainLimit'==_0x24fe3f||'commentsLicenseKeyNotAllowed'==_0x24fe3f||'commentsLicenseKeyEvaluationLimit'==_0x24fe3f||'commentsLicenseKeyUsageLimit'==_0x24fe3f){delete _0x1c735d[_0x33f225],_0x1f4e8a=_0x24fe3f,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x1f4e8a&&_0x1c735d['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x1f4e8a&&_0x1c735d['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x1f4e8a&&_0x1c735d['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x1f4e8a&&_0x1c735d['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x1f4e8a&&_0x1c735d['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x1f4e8a&&_0x1c735d['_showLicenseError']('usageLimit');},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_createUIButton(_0x5e608d){const _0x1161a5=this['editor'],_0x556242=new _0x5e608d(_0x1161a5['locale']),_0x5d5f14=_0x1161a5['commands']['get']('addCommentThread');return _0x556242['set']({'label':Et(_0x1161a5['locale'],'Comment'),'icon':_0x38462c}),_0x556242['bind']('isEnabled')['to'](_0x5d5f14,'isEnabled',_0x5d5f14,'hasContent',(_0x234981,_0x56cbfa)=>_0x234981&&_0x56cbfa),this['listenTo'](_0x556242,'execute',()=>{_0x5d5f14['execute']();}),_0x556242;}},yi=class extends _0x573609{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[wi];}constructor(_0x5d2ef2){super(_0x5d2ef2),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0xc2393a,_0x414a34,_0x18e000)=>{_0x18e000?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}afterInit(){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}_enableCommentsOnlyMode(){for(const [_0x321c86,_0xc44b6c]of this['editor']['commands'])_0xc44b6c['affectsData']&&'addCommentThread'!==_0x321c86&&_0xc44b6c['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 _0x54affc=this['editor']['editing']['view']['document'];this['listenTo'](_0x54affc,'cut',_0x3e93e9=>_0x3e93e9['stop'](),{'priority':'highest'}),this['listenTo'](_0x54affc,'clipboardInput',_0x4de890=>_0x4de890['stop'](),{'priority':'highest'}),this['listenTo'](_0x54affc,'delete',_0x26985a=>_0x26985a['stop'](),{'priority':'highest'});}_disableCommentsOnlyMode(){for(const [_0x42be62,_0x4224b4]of this['editor']['commands'])_0x4224b4['affectsData']&&'addCommentThread'!==_0x42be62&&_0x4224b4['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']);}},Ti=class extends _0x5bc735{activeUIs;uisData;['_uis'];static get requires(){return[ti];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5c9a2a){super(_0x5c9a2a),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}init(){const _0x51e11e=this['context']['plugins']['get'](ti);this['listenTo'](_0x51e11e,'_activateAnnotation',(_0x1d03f4,_0x2f8740)=>{for(const _0x367f8c of this['activeUIs']){const _0xf68f74=this['_uis']['get'](_0x367f8c);(0x0,this['uisData']['get'](_0x367f8c)['filter'])(_0x2f8740)&&_0xf68f74['setActiveAnnotation'](_0x2f8740);}}),this['listenTo'](_0x51e11e,'_deactivateAllAnnotations',()=>{for(const _0x5c06cd of this['activeUIs'])this['_uis']['get'](_0x5c06cd)['setActiveAnnotation'](null);}),this['listenTo'](_0x51e11e['_visibleAnnotations'],'add',(_0x583a85,_0x476936)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x476936);});}hasActive(){return this['activeUIs']['size']>0x0;}isActive(_0xb0e2e3){return this['activeUIs']['has'](_0xb0e2e3);}activate(_0x3d0e93,_0x11f175=this['defaultFilter']){const _0x48f4ce=this['context']['plugins']['get'](ti);if(!this['_uis']['has'](_0x3d0e93))throw new _0x4542a4('annotationsuis-missing-ui',this,{'uiName':_0x3d0e93});this['isActive'](_0x3d0e93)&&this['deactivate'](_0x3d0e93),this['activeUIs']['add'](_0x3d0e93);const _0x1bbe04=new Jt();Qt({'source':_0x48f4ce['_visibleAnnotations'],'target':_0x1bbe04,'filter':_0x11f175}),this['uisData']['set'](_0x3d0e93,{'collection':_0x1bbe04,'filter':_0x11f175});const _0x5f35cd=this['_uis']['get'](_0x3d0e93);_0x5f35cd['attach'](_0x1bbe04),this['listenTo'](_0x5f35cd,'change:activeAnnotation',(_0x194f66,_0x405736,_0x5e79b8,_0x353cb6)=>{_0x353cb6&&_0x48f4ce['_removeActiveAnnotation'](_0x353cb6),_0x5e79b8&&_0x48f4ce['_addActiveAnnotation'](_0x5e79b8);});}deactivate(_0x43c738){if(this['activeUIs']['delete'](_0x43c738),!this['_uis']['has'](_0x43c738))throw new _0x4542a4('annotationsuis-missing-ui',this,{'uiName':_0x43c738});const _0x2b3330=this['_uis']['get'](_0x43c738);_0x2b3330['detach'](),this['stopListening'](_0x2b3330),this['uisData']['get'](_0x43c738)['collection']['destroy'](),this['uisData']['delete'](_0x43c738);}switchTo(_0x3485c8){if(!this['_uis']['has'](_0x3485c8))throw new _0x4542a4('annotationsuis-missing-ui',this,{'uiName':_0x3485c8});const _0x4aa8a3=this['context']['plugins']['get'](ti),_0x304c82=Array['from'](_0x4aa8a3['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x3485c8);const _0x13f9ce=this['_uis']['get'](_0x3485c8);_0x13f9ce['setActiveAnnotation'](_0x304c82),_0x13f9ce['_setSelectedAnnotations']&&_0x304c82&&_0x13f9ce['_setSelectedAnnotations']([_0x304c82]);}deactivateAll(){for(const _0x2a53ee of this['activeUIs'])this['deactivate'](_0x2a53ee);}register(_0x4f637c,_0x3416fe){if(this['_uis']['has'](_0x4f637c))throw new _0x4542a4('annotationsuis-register-already-registered');if('function'!=typeof _0x3416fe['attach']||'function'!=typeof _0x3416fe['detach']||'function'!=typeof _0x3416fe['setActiveAnnotation'])throw new _0x4542a4('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x4f637c,_0x3416fe);}refilterAnnotations(){const _0x24e495=this['context']['plugins']['get'](ti)['collection'],_0x30f62c=new Map(),_0x19ee2c=Array['from'](this['activeUIs']);for(const _0x38a23e of this['activeUIs']){const _0x192267=this['uisData']['get'](_0x38a23e)['collection'];for(const _0x1512e6 of _0x192267)_0x30f62c['set'](_0x1512e6,_0x38a23e);}for(const _0x314b4e of _0x24e495){const _0x435066=_0x30f62c['get'](_0x314b4e);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x314b4e);const _0x372229=_0x19ee2c['find'](_0x5298af=>this['uisData']['get'](_0x5298af)['filter'](_0x314b4e));_0x435066!==_0x372229&&(_0x435066&&this['uisData']['get'](_0x435066)['collection']['remove'](_0x314b4e),_0x372229&&this['uisData']['get'](_0x372229)['collection']['add'](_0x314b4e));}}destroy(){this['deactivateAll'](),super['destroy']();}defaultFilter(){return!0x0;}_assertAnnotationDoesNotBelongToMultipleUIs(_0x21dcc4){const _0x3834d9=[];for(const _0x163ef8 of this['activeUIs']){(0x0,this['uisData']['get'](_0x163ef8)['filter'])(_0x21dcc4)&&_0x3834d9['push'](_0x163ef8);}if(_0x3834d9['length']>0x1)throw new _0x4542a4('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x3834d9,'annotationType':_0x21dcc4['type']});}};const Ci=/* #__PURE__ -- @preserve */
32
+ _0x16910d('px');var Ii=class extends ht{list;['focusables'];['focusTracker'];['focusCycler'];constructor(_0x533913){super(_0x533913);const _0x39d953=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 _0x1bc134(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x39d953['to']('class')],'style':{'minHeight':_0x39d953['to']('minHeight',_0x40ca22=>'number'==typeof _0x40ca22?Ci(_0x40ca22+0xa):null)},'dir':_0x533913['uiLanguageDirection'],'role':'application','aria-label':Et(_0x533913,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':Et(_0x533913,'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',_0x3ffbf7=>{this['_updateItemPositionInFocusables'](_0x3ffbf7['source']);}),this['list']['forEach'](_0x1b5b3a=>{this['focusTracker']['add'](_0x1b5b3a['element']),this['_updateItemPositionInFocusables'](_0x1b5b3a);}),this['list']['on']('change',(_0x1ebc99,_0x4a1c06)=>{for(const _0x5427f1 of _0x4a1c06['removed'])this['focusTracker']['remove'](_0x5427f1['element']),this['focusables']['remove'](_0x5427f1);for(const _0x972368 of _0x4a1c06['added'])this['focusTracker']['add'](_0x972368['element']),this['_updateItemPositionInFocusables'](_0x972368);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}_updateItemPositionInFocusables(_0xdcf840){const _0x2d6e42=this['focusables']['getIndex'](_0xdcf840);let _0x5e32e7,_0x841f08;for(const _0x8cf58b of this['focusables'])if(_0xdcf840['top']<_0x8cf58b['top']){_0x5e32e7=_0x8cf58b;break;}if(_0x841f08=_0x5e32e7?this['focusables']['getIndex'](_0x5e32e7):this['focusables']['length'],-0x1!==_0x2d6e42){if(_0x2d6e42===_0x841f08-0x1)return;this['focusables']['remove'](_0xdcf840),_0x841f08=_0x5e32e7?this['focusables']['getIndex'](_0x5e32e7):this['focusables']['length'];}this['focusables']['add'](_0xdcf840,_0x841f08);}};const bi=/* #__PURE__ -- @preserve */
33
+ _0x16910d('px');var Ei=class extends ht{content;_targetTop;_mutationObserver;constructor(_0x4fe964){super(_0x4fe964),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x9defa1,_0x453f85)=>_0x9defa1+_0x453f85),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0xefe0b9=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0xefe0b9['to']('isAnimationDisabled',_0xd45a95=>_0xd45a95?'ck-sidebar-item--no-animation':'')],'style':{'top':_0xefe0b9['to']('top',_0x2ba194=>bi(_0x2ba194))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}updateHeight(){const _0x13ba0d=this['element']['clientHeight'];_0x13ba0d&&(this['height']=_0x13ba0d);}destroy(){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},ki=class extends _0x5bc735{['view'];_activeAnnotation;_annotations;_spaceBetweenItems;_sidebarItemViewToAnnotation;_annotationToSidebarItemView;_recalculateBuffer;static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x20920d){super(_0x20920d),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 _0x2dc9a7=this['context']['config']['get']('sidebar.container');_0x2dc9a7&&this['setContainer'](_0x2dc9a7);}setContainer(_0x1ea542){if(!Oi(_0x1ea542))throw new _0x4542a4('sidebar-setcontainer-invalid-element');this['container']=_0x1ea542;}_attachToContainer({viewClass:_0x9902a0='',spaceBetweenItems:_0x4be5cc=0x19}={}){if(!Oi(this['container']))throw new _0x4542a4('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x9902a0,this['_spaceBetweenItems']=_0x4be5cc;}['rearrange']({removedAnnotation:_0x2cde28,previousAnnotation:_0x3af23a,nextAnnotation:_0x52fe5c}){const _0x3a967e=this['getSidebarItemView'](_0x2cde28);this['view']['list']['remove'](_0x3a967e),this['_destroySidebarItemView'](_0x2cde28),_0x3af23a&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3af23a)),_0x52fe5c&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x52fe5c)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x160fb6,activatedAnnotation:_0x18f927,disableAnimationOnActivatedAnnotation:_0x18e1d4}){if(this['_activeAnnotation']=_0x18f927,_0x160fb6){_0x160fb6['isActive']=!0x1;const _0x41a1ba=this['getSidebarItemView'](_0x160fb6);_0x41a1ba&&_0x18e1d4&&(_0x41a1ba['isAnimationDisabled']=!0x1);}if(_0x18f927){const _0x192fa1=this['getSidebarItemView'](_0x18f927);_0x192fa1&&(_0x18f927['isActive']=!0x0,_0x18e1d4&&(_0x192fa1['isAnimationDisabled']=!0x0,_0x192fa1['top']+=0x1),this['_alignToTargetRect'](_0x192fa1));}}_detachFromContainer(_0xa78f15){if(this['view']['element']['remove'](),_0xa78f15){for(const _0x8ed238 of _0xa78f15)this['_destroySidebarItemView'](_0x8ed238);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}addAnnotation(_0x440cac,_0x2e3d47){_0x2e3d47||(_0x2e3d47=_0x440cac['view']);const _0x2daffd=new Ei(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x2daffd,_0x440cac),this['_annotationToSidebarItemView']['set'](_0x440cac,_0x2daffd),_0x2daffd['content']['add'](_0x2e3d47),this['listenTo'](_0x440cac['view'],'change:targetRect',(_0x40c4c4,_0x5c5c5d,_0x419b16)=>{const _0x37fbcd=this['_getTargetTop'](_0x440cac,_0x419b16);_0x2daffd['_targetTop']!=_0x37fbcd&&(_0x2daffd['_targetTop']=_0x37fbcd,this['_setItemTop'](_0x2daffd,_0x37fbcd));}),this['listenTo'](_0x2daffd,'change:top',()=>{this['_recalculate'](_0x2daffd,'top');}),this['listenTo'](_0x2daffd,'change:bottom',()=>{this['_recalculate'](_0x2daffd,'bottom');}),this['_alignToTargetRect'](_0x2daffd);const _0x58e295=this['_getItemBefore'](_0x2daffd);return _0x58e295&&this['_alignAfterItem'](_0x58e295,_0x2daffd)||this['_alignToTargetRect'](_0x2daffd),this['_updateLastItem'](),this['view']['list']['add'](_0x2daffd),_0x2daffd;}['_alignForTopChange'](_0x547229){if(!_0x547229['content']['length'])return;const _0x288790=this['_getItemBefore'](_0x547229);if(!_0x288790)return;const _0x1038cc=this['_sidebarItemViewToAnnotation']['get'](_0x288790),_0x21f40d=this['_activeAnnotation'];_0x21f40d&&_0x21f40d===_0x1038cc?this['_alignAfterItem'](_0x288790,_0x547229):this['_alignBeforeItem'](_0x547229,_0x288790);}_alignForBottomChange(_0x382684){if(!_0x382684['content']['length'])return;const _0x306423=this['_getItemAfter'](_0x382684);if(!_0x306423)return;const _0x574d8d=this['_sidebarItemViewToAnnotation']['get'](_0x306423),_0x19b457=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x3cd0b7=this['_activeAnnotation'];_0x3cd0b7&&_0x3cd0b7===_0x574d8d&&_0x19b457?(this['_alignBeforeItem'](_0x306423,_0x382684),this['_alignAfterItem'](_0x382684,_0x306423)):_0x3cd0b7&&_0x3cd0b7===_0x574d8d?this['_alignBeforeItem'](_0x306423,_0x382684):this['_alignAfterItem'](_0x382684,_0x306423);}_recalculate(_0x109879,_0x3cae6b){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x440027,changedProp:_0x3da12a}of this['_recalculateBuffer'])'top'===_0x3da12a?this['_alignForTopChange'](_0x440027):this['_alignForBottomChange'](_0x440027);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x109879,'changedProp':_0x3cae6b});}getSidebarItemView(_0x5aff82){return this['_annotationToSidebarItemView']['get'](_0x5aff82);}destroy(){this['stopListening'](),this['view']['destroy']();}_destroySidebarItemView(_0x36f306){const _0x1be362=this['getSidebarItemView'](_0x36f306);this['stopListening'](_0x1be362),this['stopListening'](_0x36f306['view']),_0x1be362['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x36f306),this['_sidebarItemViewToAnnotation']['delete'](_0x1be362);}_createSidebarView(){const _0x3dfbbf=new Ii(this['context']['locale']);return _0x3dfbbf['render'](),this['on']('change:_lastItem',(_0x39742d,_0x38ff5a,_0x3a7e0b,_0x25d3ae)=>{_0x25d3ae&&_0x3dfbbf['unbind']('minHeight'),_0x3a7e0b?_0x3dfbbf['bind']('minHeight')['to'](_0x3a7e0b,'bottom'):_0x3dfbbf['minHeight']=null;}),_0x3dfbbf;}_updateLastItem(){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}_getItemBefore(_0x54d65d){const _0x49204c=this['_sidebarItemViewToAnnotation']['get'](_0x54d65d),_0x3727c8=_0x49204c&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x49204c)-0x1);return _0x3727c8&&this['getSidebarItemView'](_0x3727c8)||null;}_getItemAfter(_0x2ccb11){const _0x263b36=this['_sidebarItemViewToAnnotation']['get'](_0x2ccb11),_0x264ba2=_0x263b36&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x263b36)+0x1);return _0x264ba2&&this['getSidebarItemView'](_0x264ba2)||null;}_alignBeforeItem(_0x528d11,_0x3c19a4){_0x528d11['updateHeight']();const _0x2c793e=Ni(_0x3c19a4['bottom']+this['_spaceBetweenItems'],_0x528d11['top']);return!!_0x2c793e&&(this['_setItemTop'](_0x3c19a4,_0x3c19a4['top']-_0x2c793e),!0x0);}_alignAfterItem(_0x466076,_0x434f42){_0x466076['updateHeight']();const _0x32b93f=Ni(_0x466076['bottom']+this['_spaceBetweenItems'],_0x434f42['top']);return!!_0x32b93f&&(this['_setItemTop'](_0x434f42,_0x434f42['top']+_0x32b93f,!0x1),!0x0);}_alignToTargetRect(_0x3e8599){const _0x5ebb9d=this['_sidebarItemViewToAnnotation']['get'](_0x3e8599);if(!_0x5ebb9d||!_0x5ebb9d['target']||!_0x5ebb9d['targetRect'])return;const _0x35b452=this['_getTargetTop'](_0x5ebb9d,_0x5ebb9d['targetRect']);this['_setItemTop'](_0x3e8599,_0x35b452);}_getTargetTop(_0xcc032e,_0x3b2f3e){if(null===_0x3b2f3e)return 0x0;if(_0xcc032e['target']instanceof _0x5b8deb)return _0x3b2f3e['top'];{const _0x9beaf2=new _0x5b8deb(this['view']['element'])['top'];return _0x3b2f3e['top']-_0x9beaf2;}}_setItemTop(_0x1e26f9,_0x11689e,_0x32c4d5=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x32c4d5&&(_0x11689e=Math['max'](_0x11689e,this['_getMaxAvailableTop'](_0x1e26f9))),_0x1e26f9['top']=_0x11689e;}_getMaxAvailableTop(_0x5c167e){let _0x44c532=this['_getItemBefore'](_0x5c167e),_0x5d36c7=0x0;for(;_0x44c532;)_0x44c532['updateHeight'](),_0x5d36c7+=this['_spaceBetweenItems']+_0x44c532['height'],_0x44c532=this['_getItemBefore'](_0x44c532);return _0x5d36c7;}};function Ni(_0x21b048,_0x5adb54){return Math['max'](_0x21b048-_0x5adb54,0x0);}function Oi(_0x3df173){return null!==_0x3df173&&'object'==typeof _0x3df173&&0x1===_0x3df173['nodeType'];}var Mi=class extends _0x5bc735{isAttached;annotations;_editorAnnotations;_refreshPositioningDebounced;static get requires(){return[ki,Ti];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2bc63d){super(_0x2bc63d),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x3a878e(),this['_refreshPositioningDebounced']=_0x130064(()=>{_0x2bc63d['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}init(){const _0x31cb63=this['context']['plugins']['get'](Ti),_0xe1d2a9=this['context']['plugins']['get'](ki);_0x31cb63['register']('wideSidebar',this),_0xe1d2a9['container']&&_0x31cb63['switchTo']('wideSidebar');}setActiveAnnotation(_0x5bf809){if(_0x5bf809===this['activeAnnotation'])return;const _0x2b8372=this['context']['plugins']['get'](ki);_0x2b8372['_activeAnnotation']=_0x5bf809;const _0x32a6d4=this['activeAnnotation'];_0x2b8372['refresh']({'blurredAnnotation':_0x32a6d4,'activatedAnnotation':_0x5bf809}),this['activeAnnotation']=_0x5bf809;}attach(_0x33df5a){this['annotations']=_0x33df5a;const _0xdad7ad=this['context']['plugins']['get'](ki);if(_0xdad7ad['_annotations']=_0x33df5a,this['isAttached'])throw new _0x4542a4('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0xdad7ad,'set:container',()=>{this['detach'](),this['listenTo'](_0xdad7ad,'change:container',_0x4e7de0=>{_0x4e7de0['off'](),this['attach'](_0x33df5a);});}),_0xdad7ad['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x2d4083=_0x2d29bd=>{_0x2d29bd['updateTargetRect'](),_0xdad7ad['addAnnotation'](_0x2d29bd);};for(const _0x49dd5a of _0x33df5a)_0x2d4083(_0x49dd5a);this['listenTo'](_0x33df5a,'add',(_0x2c82ed,_0x5a8778)=>{_0x2d4083(_0x5a8778);}),this['listenTo'](_0x33df5a,'remove',(_0x82401d,_0x4fb4fb,_0x2043f6)=>{_0xdad7ad['rearrange']({'removedAnnotation':_0x4fb4fb,'previousAnnotation':_0x33df5a['get'](_0x2043f6-0x1),'nextAnnotation':_0x33df5a['get'](_0x2043f6+0x1)}),_0x4fb4fb===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x33df5a,'focus',(_0xf36192,_0x4c44ed)=>{this['setActiveAnnotation'](_0x4c44ed);}),this['listenTo'](_0x33df5a,'blur',()=>{this['setActiveAnnotation'](null);});const _0x5b6965=this['context']instanceof _0x2ed90d?this['context']['editors']:new _0x3a878e([this['context']]);for(const _0xf2592a of _0x5b6965)this['_integrateWithEditorAnnotations'](_0xf2592a);this['listenTo'](_0x5b6965,'add',(_0x5a0925,_0x14f4b4)=>{this['listenTo'](_0x14f4b4,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x14f4b4);});}),this['listenTo'](_0x5b6965,'remove',(_0x578d9b,_0xb2b32e)=>{_0xb2b32e['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0xb2b32e['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}detach(){if(!this['isAttached'])throw new _0x4542a4('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x1916c7=this['context']['plugins']['get'](ki);_0x1916c7['_detachFromContainer'](this['annotations']),this['stopListening'](_0x1916c7),this['stopListening'](this['annotations']),this['context']instanceof _0x2ed90d&&this['stopListening'](this['context']['editors']);for(const _0x15ffd8 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x15ffd8);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach']();}_integrateWithEditorAnnotations(_0x191703){if(!_0x191703['plugins']['has']('EditorAnnotations'))return;const _0x55479d=_0x191703['plugins']['get']('EditorAnnotations'),_0x5a4f5e=()=>{const _0x428a19=_0x55479d['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x428a19[0x0]||null);};this['listenTo'](_0x55479d,'refresh',_0x5a4f5e),this['listenTo'](_0x55479d,'blur',(_0x584ebc,{isAnnotationTracked:_0x59bdc4})=>{this['activeAnnotation']&&_0x59bdc4(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x55479d,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x1cab1=>{_0x55479d['hasDomSelection']()&&(_0x5a4f5e(),_0x1cab1['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x55479d);}_destroyEditorAnnotationsIntegration(_0x4a0e20){this['stopListening'](_0x4a0e20),this['_editorAnnotations']['remove'](_0x4a0e20);}},Ri=class extends _0x4695a0{counterView;constructor(_0x4c6cd2){super(_0x4c6cd2);const _0x2651c9=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x52aaeb,_0x3847a6)=>_0x52aaeb?'...':_0x3847a6['toString']()),this['set']('annotationType',''),this['icon']=_0x38462c,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new ht(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x2651c9['to']('annotationType',_0x2f7cfa=>'ck-annotation-counter__badge--'+_0x2f7cfa),_0x2651c9['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x2651c9['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Si=class extends _0x5bc735{isAttached;annotations;_manuallyClosedAnnotationViews;_domEmitter;_annotationToNarrowView;_selectedAnnotations;_editorAnnotations;_refreshPositioningDebounced;static get requires(){return[ki,Ti];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x560d4c){super(_0x560d4c),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x3b6b98())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x3a878e(),this['_refreshPositioningDebounced']=_0x130064(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}init(){this['context']['plugins']['get'](Ti)['register']('narrowSidebar',this),this['bodyCollection']=new _0x4a5e13(this['context']['locale']),this['balloonPanelView']=new _0x4e0b34(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}attach(_0x33e23e){this['annotations']=_0x33e23e;const _0x525b27=this['context']['plugins']['get'](ki),_0x42c432=this['balloonPanelView'];if(_0x525b27['_annotations']=_0x33e23e,this['isAttached'])throw new _0x4542a4('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x525b27,'set:container',()=>{this['detach'](),this['listenTo'](_0x525b27,'change:container',_0x4795e8=>{_0x4795e8['off'](),this['attach'](_0x33e23e);});}),_0x525b27['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x2bc84c=_0x159167=>{const _0x324507=new Ri(this['context']['locale']);_0x525b27['addAnnotation'](_0x159167,_0x324507),this['_annotationToNarrowView']['set'](_0x159167,_0x324507),_0x324507['bind']('isDirty','annotationType','number')['to'](_0x159167['view'],'isDirty','type','length'),_0x324507['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x42c432['content']['first']!==_0x159167['view']?(this['_showBalloon'](_0x159167),_0x159167['view']['element']['focus'](),this['setActiveAnnotation'](_0x159167)):this['setActiveAnnotation'](null);});};for(const _0x58ffc2 of _0x33e23e)_0x2bc84c(_0x58ffc2);this['listenTo'](_0x33e23e,'add',(_0x2f7f87,_0x3e42f9)=>{_0x2bc84c(_0x3e42f9);}),this['listenTo'](_0x33e23e,'remove',(_0x488f66,_0x188f81,_0x34823e)=>{this['_annotationToNarrowView']['get'](_0x188f81)['destroy'](),this['_annotationToNarrowView']['delete'](_0x188f81),_0x525b27['rearrange']({'removedAnnotation':_0x188f81,'previousAnnotation':_0x33e23e['get'](_0x34823e-0x1),'nextAnnotation':_0x33e23e['get'](_0x34823e+0x1)}),_0x188f81===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x33e23e,'focus',(_0x32d27e,_0x551840)=>{this['setActiveAnnotation'](_0x551840);}),this['listenTo'](_0x33e23e,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0xcf733e,_0x3f534c)=>{_0x3f534c['keyCode']===_0x48080c['esc']&&_0x42c432['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x42c432['content']['first']),this['_hideBalloon'](),_0x3f534c['stopPropagation'](),_0x3f534c['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x218e0c,_0x498261)=>{const _0x364bc0=_0x498261['target'];_0x42c432['isVisible']&&_0x42c432['element']['contains'](_0x364bc0)||_0x525b27['view']['element']['contains'](_0x364bc0)||_0x218e0c['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x2e5761=>_0x2e5761['contains'](_0x364bc0))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x5eb928=this['context']instanceof _0x2ed90d?this['context']['editors']:new _0x3a878e([this['context']]);for(const _0x2e812c of _0x5eb928)this['_integrateWithEditorAnnotations'](_0x2e812c);this['listenTo'](_0x5eb928,'add',(_0x10263d,_0x5480ab)=>{this['listenTo'](_0x5480ab,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x5480ab);});}),this['listenTo'](_0x5eb928,'remove',(_0x508a3f,_0x128ace)=>{_0x128ace['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x128ace['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}setActiveAnnotation(_0x3fdcce){if(_0x3fdcce===this['activeAnnotation'])return;const _0xd22690=this['context']['plugins']['get'](ki);_0xd22690['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x3fdcce,'disableAnimationOnActivatedAnnotation':!0x0}),_0x3fdcce&&_0xd22690['getSidebarItemView'](_0x3fdcce)?this['_showBalloon'](_0x3fdcce):this['_hideBalloon'](),this['activeAnnotation']=_0x3fdcce;}detach(){if(!this['isAttached'])throw new _0x4542a4('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3611e1=this['context']['plugins']['get'](ki);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x15fe4f=>_0x15fe4f['destroy']()),this['_annotationToNarrowView']['clear'](),_0x3611e1['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x2ed90d&&this['stopListening'](this['context']['editors']);for(const _0x621a68 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x621a68);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['_selectedAnnotations']=[],this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach'](),this['bodyCollection']['detachFromDom']();}_integrateWithEditorAnnotations(_0xbc6677){if(!_0xbc6677['plugins']['has']('EditorAnnotations'))return;const _0x3d8694=_0xbc6677['plugins']['get']('EditorAnnotations'),_0x61207a=this['context']['plugins']['get'](ki),_0x2a308c=this['annotations'],_0x1f37c5=this['balloonPanelView'],_0x539931=()=>{const _0x4ce36b=_0x3d8694['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x4ce36b),this['setActiveAnnotation'](_0x4ce36b[0x0]||null);};this['listenTo'](_0x3d8694,'refresh',_0x539931),this['listenTo'](_0x3d8694,'blur',(_0x537449,{isAnnotationTracked:_0x197b23})=>{this['activeAnnotation']&&_0x197b23(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x3d8694,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x2a308c,'blur',_0x3ed2ee=>{_0x3d8694['hasDomSelection']()&&_0x3ed2ee['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x62b6bc,_0x55311)=>{const _0x35804f=_0x55311['target'];_0x1f37c5['isVisible']&&_0x1f37c5['element']['contains'](_0x35804f)||_0x61207a['view']['element']['contains'](_0x35804f)||this['activeAnnotation']&&_0x3d8694['hasDomSelection']()&&(_0x539931(),_0x62b6bc['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x3d8694);}_destroyEditorAnnotationsIntegration(_0x5be9e9){_0x5be9e9&&(this['stopListening'](_0x5be9e9),this['_editorAnnotations']['remove'](_0x5be9e9));}_setSelectedAnnotations(_0x32fe0f){for(const _0x36a39 of this['_selectedAnnotations'])_0x32fe0f['includes'](_0x36a39)||this['_manuallyClosedAnnotationViews']['delete'](_0x36a39['view']);this['_selectedAnnotations']=_0x32fe0f;}_refreshPositioning(){const _0x45a87=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x45a87['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x45bdb3){if(this['_manuallyClosedAnnotationViews']['has'](_0x45bdb3['view']))return;const _0x5034f1=this['balloonPanelView']['content']['first'];_0x5034f1!==_0x45bdb3['view']?(_0x5034f1&&this['_detachListeners'](_0x5034f1),this['_attachListeners'](_0x45bdb3['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x45bdb3['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}_updateBalloonPosition(){const _0xf2d57b=this['balloonPanelView']['content']['first'],_0x444d84=_0xf2d57b&&this['annotations']['getByView'](_0xf2d57b);if(!_0x444d84||!this['_annotationToNarrowView']['has'](_0x444d84))return;const _0x2effaf=this['_annotationToNarrowView']['get'](_0x444d84)['element'],_0x2fe238=(function(){const _0x12aafe=_0x4e0b34['defaultPositions'];return[_0x12aafe['southArrowNorthEast'],_0x12aafe['northArrowSouthEast'],_0x12aafe['southArrowNorth'],_0x12aafe['northArrowSouth'],_0x12aafe['southArrowNorthWest'],_0x12aafe['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x2effaf,'positions':_0x2fe238});}['_hideBalloon'](){const _0x446623=this['balloonPanelView'],_0x381195=_0x446623['content']['first'];_0x381195&&(this['_detachListeners'](_0x381195),_0x446623['unpin'](),_0x446623['content']['clear']());}_attachListeners(_0x9dfa3a){this['listenTo'](_0x9dfa3a,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x9dfa3a,'Esc',(_0x4dd713,_0x871841)=>{this['_manuallyClosedAnnotationViews']['add'](_0x9dfa3a),this['_hideBalloon'](),_0x871841();});}_detachListeners(_0x3706d1){this['stopListening'](_0x3706d1);}},xi=class extends _0x573609{isAttached;annotations;['_manuallyClosed'];['_balloon'];_addedAnnotations;_selectedAnnotations;['_forceRefresh'];_refreshVisibilityDebounced;static get requires(){return[di,_0x4d63f2,Ti];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4537f6){super(_0x4537f6),_0x4537f6['editing']['view']['addObserver'](lt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x4537f6['plugins']['get'](_0x4d63f2),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x130064(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}init(){const _0x51abdc=this['editor']['plugins']['get'](Ti);_0x51abdc['context']===this['editor']&&(_0x51abdc['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x16053e,_0x2b7be9)=>{const _0x13d806=this['_balloon'];if(this['isAttached']&&_0x13d806['visibleView']){const _0x55698f=this['annotations']['getByView'](_0x13d806['visibleView']);_0x55698f&&this['_closeAnnotation'](_0x55698f),_0x2b7be9();}}));}afterInit(){const _0x40693c=this['editor']['plugins']['get'](Ti);_0x40693c['context']===this['editor']&&(_0x40693c['hasActive']()||_0x40693c['switchTo']('inline'));}setActiveAnnotation(_0x417a76){_0x417a76!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x417a76&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x417a76)&&this['_addAnnotationToBalloon'](_0x417a76,!0x0),_0x417a76['isActive']=!0x0),_0x417a76||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x417a76);}attach(_0xd390f2){this['annotations']=_0xd390f2;const _0x5a397f=this['editor']['plugins']['get'](Ti),_0x10be1a=this['_balloon'];if(this['isAttached'])throw new _0x4542a4('inlineannotations-attach-already-attached',this);if(_0x5a397f['context']!==this['editor'])throw new _0x4542a4('inlineannotations-not-allowed-with-context',this);const _0xd7f6a9=this['editor']['plugins']['get'](di);this['listenTo'](_0xd7f6a9,'refresh',()=>{const _0x59014e=_0xd7f6a9['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x4ce35f,_0x4bc9b9;!this['_forceRefresh']&&(_0x4ce35f=_0x59014e,_0x4bc9b9=this['_selectedAnnotations'],_0x4ce35f['length']===_0x4bc9b9['length']&&_0x4ce35f['every'](_0x5018f0=>_0x4bc9b9['includes'](_0x5018f0)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x59014e),this['setActiveAnnotation'](_0x59014e[0x0]||null));}),this['listenTo'](_0xd7f6a9,'blur',(_0x6b2ec8,{isAnnotationTracked:_0x2eb989})=>{this['activeAnnotation']&&_0x2eb989(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0xd7f6a9,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x1bc314,_0x497044,_0x60e14)=>{_0x60e14||this['setActiveAnnotation'](null);}),this['listenTo'](_0xd390f2,'remove',(_0x4828e7,_0x27609e)=>{this['_removeAnnotationFromBalloon'](_0x27609e),_0x27609e===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x10be1a,'change:visibleView',(_0x5c9f05,_0x48750b,_0x40f373,_0x11f7ac)=>{_0x11f7ac&&this['stopListening'](_0x11f7ac);const _0x496274=_0xd390f2['getByView'](_0x40f373);_0x40f373&&_0x496274&&(this['listenTo'](_0x40f373,'change:height',()=>{_0x10be1a['updatePosition']();}),this['listenTo'](_0x40f373,'Esc',()=>{this['_closeAnnotation'](_0x496274),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x496274&&this['setActiveAnnotation'](_0x496274));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x10be1a['visibleView']&&_0xd390f2['getByView'](_0x10be1a['visibleView'])&&_0x10be1a['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 _0x4542a4('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x49b102 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x49b102);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}_setSelectedAnnotations(_0x1d01fe){for(const _0x3bf067 of this['_selectedAnnotations'])_0x1d01fe['includes'](_0x3bf067)||this['_manuallyClosed']['delete'](_0x3bf067);for(const _0x11fa2a of this['annotations'])_0x1d01fe['includes'](_0x11fa2a)||this['_removeAnnotationFromBalloon'](_0x11fa2a);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x3f6314 of _0x1d01fe)this['_addAnnotationToBalloon'](_0x3f6314);}this['_selectedAnnotations']=_0x1d01fe;}_addAnnotationToBalloon(_0xfcce40,_0x305d81=!0x1){this['_manuallyClosed']['has'](_0xfcce40)||(this['_addedAnnotations']['has'](_0xfcce40)||this['_balloon']['hasView'](_0xfcce40['view'])||(this['_addedAnnotations']['add'](_0xfcce40),this['_balloon']['add']({'stackId':_0xfcce40['view']['id'],'view':_0xfcce40['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0xfcce40)}})),_0x305d81&&this['_balloon']['showStack'](_0xfcce40['view']['id']));}_getBalloonTargetForAnnotation(_0x4ed75f){const _0x2febd7=_0x4ed75f['target'],_0x3270d4=this['editor']['editing']['view'],_0x52b877=_0x3270d4['document']['selection']['getFirstRange'](),_0x1f04ef=_0x3270d4['domConverter']['viewRangeToDom'](_0x52b877);if(_0x1f04ef['collapse'](!0x0),_0x2febd7){if(_0x2febd7 instanceof _0x5b8deb)return _0x2febd7;let _0x2e2d31=[];for(const _0x2ecbfd of _0x2febd7)_0x2e2d31['push'](..._0x5b8deb['getDomElementRects'](_0x2ecbfd));_0x2e2d31=function(_0x5683b0){const _0x1061a8=[];let _0x111284=_0x5683b0[0x0];for(let _0x2f4120=0x1;_0x2f4120<_0x5683b0['length'];_0x2f4120++)if(Pi(_0x111284,_0x5683b0[_0x2f4120])){const _0x30c962=_0x5683b0[_0x2f4120]['width'];_0x111284['width']+=_0x30c962,_0x111284['right']+=_0x30c962;}else _0x1061a8['push'](_0x111284),_0x111284=_0x5683b0[_0x2f4120];return _0x1061a8['push'](_0x111284),_0x1061a8;}(_0x2e2d31);const _0x17459e=_0x1f04ef['getBoundingClientRect']();return _0x2e2d31['find'](_0x59e685=>_0x59e685['top']<=_0x17459e['top']&&_0x59e685['bottom']>=_0x17459e['bottom']&&_0x59e685['left']<=_0x17459e['left']&&_0x59e685['right']>=_0x17459e['right'])||_0x2e2d31[0x0];}return _0x4ed75f['targetRect']||_0x1f04ef;}_removeAnnotationFromBalloon(_0xa5c16b){this['_addedAnnotations']['has'](_0xa5c16b)&&this['_balloon']['hasView'](_0xa5c16b['view'])&&(this['_addedAnnotations']['delete'](_0xa5c16b),this['_balloon']['remove'](_0xa5c16b['view']));}_closeAnnotation(_0x4d3b2b){this['_manuallyClosed']['add'](_0x4d3b2b),this['_removeAnnotationFromBalloon'](_0x4d3b2b);}};function Pi(_0x2b0c76,_0x955fc0){return _0x2b0c76['top']===_0x955fc0['top']&&_0x2b0c76['bottom']===_0x955fc0['bottom']&&_0x2b0c76['right']===_0x955fc0['left'];}var Li=class extends ht{['focusTracker'];['focusCycler'];_annotationViews;constructor(_0x4ee89a,_0x3789b2){super(_0x4ee89a),this['set']('isEmpty',!_0x3789b2['length']),this['focusTracker']=new _0x1bc134(),this['_annotationViews']=_0x3789b2,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new et({'focusables':_0x3789b2,'focusTracker':this['focusTracker']}),this['listenTo'](_0x3789b2,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x3789b2,'remove',(_0x153e0c,_0xa0b9f8)=>{_0xa0b9f8['isActive']&&this['focus'](),_0x3789b2['length']||(this['isEmpty']=!0x0);});const _0x463041=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':Et(_0x4ee89a,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x3789b2},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x463041['if']('isEmpty','ck-hidden',_0x2d3bf5=>!_0x2d3bf5)]},'children':[{'text':Et(_0x4ee89a,'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 _0x57abd1 of this['_annotationViews'])this['focusTracker']['add'](_0x57abd1['element']);this['_annotationViews']['on']('change',(_0x4a715d,{added:_0x1974e6,removed:_0x44c497})=>{for(const _0x17ab9b of _0x1974e6)this['focusTracker']['add'](_0x17ab9b['element']);for(const _0x3f4ffb of _0x44c497)this['focusTracker']['remove'](_0x3f4ffb['element']);});}},Di=class extends _0x5bc735{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[oi,ti];}constructor(_0x531e10){super(_0x531e10),this['archivedThreads']=new _0x3a878e();}init(){const _0x56300a=this['context'],_0x541792=_0x56300a['plugins']['get'](oi),_0x8c07bf=_0x56300a['plugins']['get'](ti);this['listenTo'](_0x541792,'addCommentThread',(_0x23c457,{threadId:_0x3d3ff0})=>{const _0x28dc2e=_0x541792['getCommentThread'](_0x3d3ff0);_0x28dc2e['archivedAt']&&this['archivedThreads']['add'](_0x28dc2e,this['_calculatePosition'](_0x28dc2e['archivedAt'])),this['listenTo'](_0x28dc2e,'change:archivedAt',(_0xad90f,_0x507d37,_0x24ca00)=>{_0x24ca00?this['archivedThreads']['has'](_0x28dc2e)||this['archivedThreads']['add'](_0x28dc2e,this['_calculatePosition'](_0x28dc2e['archivedAt'])):this['archivedThreads']['has'](_0x28dc2e)&&this['archivedThreads']['remove'](_0x28dc2e);});}),this['listenTo'](_0x541792,'removeCommentThread',(_0x3ce167,{threadId:_0x20278f})=>{const _0x1f88dc=_0x541792['getCommentThread'](_0x20278f);this['stopListening'](_0x1f88dc),this['archivedThreads']['has'](_0x1f88dc)&&this['archivedThreads']['remove'](_0x1f88dc);},{'priority':'highest'}),this['listenTo'](_0x8c07bf['collection'],'focus',(_0xeff820,_0xc66128)=>{_0xc66128['isVisible']||(_0xc66128['isActive']=!0x0,_0x8c07bf['activate'](_0xc66128));});}_calculatePosition(_0x2439ec){const _0x540af4=[...this['archivedThreads']]['findIndex'](_0x5054ce=>_0x5054ce['archivedAt']<_0x2439ec);return _0x540af4>-0x1?_0x540af4:this['archivedThreads']['length'];}},Vi=class extends _0x573609{commentsArchiveView;annotationViews;['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Di,_0x5dfd34];}constructor(_0x16de32){super(_0x16de32),this['annotationViews']=new at(),this['_pendingThreads']=[];}init(){const _0x51e336=this['editor'],_0xcb7d7c=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x51e336['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x4695a0,!0x0)),_0x51e336['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x6bb926=this['_createCommentsArchiveButton'](rt);return _0x6bb926['set']({'role':'menuitemcheckbox'}),_0x6bb926;});const _0xc76b4d=_0x51e336['plugins']['get'](Di),_0x5e7c49=_0x51e336['plugins']['get']('Annotations'),_0x5c4033=_0x51e336['plugins']['get']('CommentsRepository');_0xc76b4d['archivedThreads']['forEach'](_0x53968a=>{this['_handleNewThread'](_0x53968a);}),this['listenTo'](_0xc76b4d['archivedThreads'],'add',(_0x17ad7c,_0x31da04)=>{this['_handleNewThread'](_0x31da04);}),this['listenTo'](_0x5e7c49['collection'],'add',(_0x1ee631,_0x303fcf)=>{const _0x16c35f=this['_pendingThreads']['find'](_0x494781=>{const _0x3f91f4=_0x5c4033['_threadToController']['get'](_0x494781);return _0x3f91f4&&_0x303fcf['innerView']===_0x3f91f4['view'];});if(_0x16c35f){const _0x3b659d=this['_calculatePosition'](_0x16c35f['archivedAt']);this['_addAnnotationToArchive'](_0x303fcf,_0x3b659d),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x16c35f),0x1);}}),this['listenTo'](_0xc76b4d['archivedThreads'],'remove',(_0x1e0b71,_0x4b3058)=>{const _0x3c134e=_0x51e336['config']['get']('collaboration.channelId');if(!_0x3c134e||_0x4b3058['channelId']===_0x3c134e){if(this['_pendingThreads']['includes'](_0x4b3058))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x4b3058),0x1);else{const _0xb5ff3a=_0x5c4033['_threadToController']['get'](_0x4b3058),_0x1fc080=_0x5e7c49['getByInnerView'](_0xb5ff3a['view']);this['annotationViews']['remove'](_0x1fc080['view']),this['stopListening'](_0x1fc080),this['stopListening'](_0x1fc080['focusableElements']);}}}),this['listenTo'](_0x5e7c49['collection'],'add',(_0x47da92,_0x545529)=>{this['listenTo'](_0x545529,'escape',_0xcb7d7c);}),this['listenTo'](_0x5e7c49['collection'],'remove',(_0x10801c,_0x336d98)=>{this['stopListening'](_0x336d98,'escape',_0xcb7d7c);});}_addAnnotationToArchive(_0x23b573,_0x4b1383){this['listenTo'](_0x23b573,'set:isVisible',_0x39062b=>{_0x39062b['return']=!0x1,_0x39062b['stop']();}),this['annotationViews']['add'](_0x23b573['view'],_0x4b1383);}['_handleNewThread'](_0x64f4e1){const _0xe8b3c6=this['editor']['plugins']['get']('CommentsRepository'),_0x3b9b01=this['editor']['plugins']['get']('Annotations'),_0x1b6282=this['editor']['config']['get']('collaboration.channelId');if(!_0x1b6282||_0x64f4e1['channelId']===_0x1b6282){const _0x41e204=_0xe8b3c6['_threadToController']['get'](_0x64f4e1);if(!_0x41e204)return void this['_pendingThreads']['push'](_0x64f4e1);const _0xac5bec=this['_calculatePosition'](_0x64f4e1['archivedAt']),_0x382bfc=_0x3b9b01['getByInnerView'](_0x41e204['view']);_0x382bfc['isVisible']&&_0x3b9b01['_visibleAnnotations']['remove'](_0x382bfc),this['_addAnnotationToArchive'](_0x382bfc,_0xac5bec);}}_calculatePosition(_0x2eed1c){const _0x380e35=this['editor']['config']['get']('collaboration.channelId'),_0x32f736=[...this['editor']['plugins']['get'](Di)['archivedThreads']]['filter'](_0x2051d3=>_0x2051d3['channelId']===_0x380e35)['findIndex'](_0x39ab54=>_0x39ab54['archivedAt']<_0x2eed1c);return _0x32f736<0x0||_0x32f736>this['annotationViews']['length']?this['annotationViews']['length']:_0x32f736-0x1;}_toggleDialog(){const _0x15973b=this['editor'],_0x4c35f4=_0x15973b['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Li(_0x15973b['locale'],this['annotationViews'])),'commentsArchive'===_0x4c35f4['id']?_0x4c35f4['hide']():_0x4c35f4['show']({'id':'commentsArchive','title':Et(_0x15973b['locale'],'COMMENTS_ARCHIVE'),'icon':_0x4e5e21,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x10710f['EDITOR_TOP_SIDE']});}_createCommentsArchiveButton(_0x129f37,_0x37654a=!0x1){const _0x68b5be=this['editor']['locale'],_0x335a1a=this['editor']['plugins']['get']('Dialog'),_0x18f438=new _0x129f37(_0x68b5be);return _0x18f438['bind']('isEnabled')['to'](this,'isEnabled'),_0x18f438['bind']('isOn')['to'](_0x335a1a,'id',_0x4054ed=>'commentsArchive'===_0x4054ed),_0x18f438['set']({'label':Et(_0x68b5be,'COMMENTS_ARCHIVE'),'icon':_0x4e5e21,'isToggleable':!0x0}),_0x37654a&&(_0x18f438['tooltip']=!0x0),this['listenTo'](_0x18f438,'execute',()=>this['_toggleDialog']()),_0x18f438;}_hideDialogOnAnnotationEscape=_0x5b2024=>{const _0x4d940e=_0x5b2024['source'];if(!this['annotationViews']['has'](_0x4d940e['view']))return;const _0x32d943=this['editor']['plugins']['get']('Dialog');_0x32d943['isOpen']&&'commentsArchive'===_0x32d943['id']&&(_0x32d943['hide'](),_0x5b2024['stop']());};},Bi=class extends _0x573609{static get requires(){return[oi,wi,vi,Di,Vi,yi,Mi,Si,xi];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{ci as AddCommentThreadCommand,$t as Annotation,Jt as AnnotationCollection,Ri as AnnotationCounterButtonView,qt as AnnotationView,ti as Annotations,Ei as AnnotationsSidebarItemView,Ii as AnnotationsSidebarView,Ti as AnnotationsUIs,Ht as BaseCommentThreadView,Kt as BaseCommentView,hi as Comment,ri as CommentThread,bt as CommentThreadController,xt as CommentThreadInputView,Ut as CommentThreadView,Yt as CommentView,Bi as Comments,Di as CommentsArchive,Vi as CommentsArchiveUI,wi as CommentsEditing,Lt as CommentsListView,yi as CommentsOnly,oi as CommentsRepository,vi as CommentsUI,di as EditorAnnotations,xi as InlineAnnotations,Si as NarrowSidebar,ki as Sidebar,Mi as WideSidebar,Qt as bindAnnotationCollections};