@ckeditor/ckeditor5-comments 48.3.1 → 48.4.0-alpha.0

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 (158) hide show
  1. package/dist/annotations/inlineannotations.d.ts +0 -1
  2. package/dist/annotations/narrowsidebar.d.ts +0 -1
  3. package/dist/annotations/view/annotationview.d.ts +0 -1
  4. package/dist/annotations/view/sidebarview.d.ts +0 -1
  5. package/dist/comments/commentsarchiveui.d.ts +0 -1
  6. package/dist/comments/commentsediting.d.ts +0 -1
  7. package/dist/comments/commentsrepository.d.ts +0 -3
  8. package/dist/index-content.css +18 -18
  9. package/dist/index-editor.css +490 -494
  10. package/dist/index.d.ts +2 -0
  11. package/dist/index.js +11 -11
  12. package/dist/translations/af.js +1 -1
  13. package/dist/translations/af.umd.js +1 -1
  14. package/dist/translations/ar.js +1 -1
  15. package/dist/translations/ar.umd.js +1 -1
  16. package/dist/translations/ast.js +1 -1
  17. package/dist/translations/ast.umd.js +1 -1
  18. package/dist/translations/az.js +1 -1
  19. package/dist/translations/az.umd.js +1 -1
  20. package/dist/translations/be.js +1 -1
  21. package/dist/translations/be.umd.js +1 -1
  22. package/dist/translations/bg.js +1 -1
  23. package/dist/translations/bg.umd.js +1 -1
  24. package/dist/translations/bn.js +1 -1
  25. package/dist/translations/bn.umd.js +1 -1
  26. package/dist/translations/bs.js +1 -1
  27. package/dist/translations/bs.umd.js +1 -1
  28. package/dist/translations/ca.js +1 -1
  29. package/dist/translations/ca.umd.js +1 -1
  30. package/dist/translations/cs.js +1 -1
  31. package/dist/translations/cs.umd.js +1 -1
  32. package/dist/translations/da.js +1 -1
  33. package/dist/translations/da.umd.js +1 -1
  34. package/dist/translations/de-ch.js +1 -1
  35. package/dist/translations/de-ch.umd.js +1 -1
  36. package/dist/translations/de.js +1 -1
  37. package/dist/translations/de.umd.js +1 -1
  38. package/dist/translations/el.js +1 -1
  39. package/dist/translations/el.umd.js +1 -1
  40. package/dist/translations/en-au.js +1 -1
  41. package/dist/translations/en-au.umd.js +1 -1
  42. package/dist/translations/en-gb.js +1 -1
  43. package/dist/translations/en-gb.umd.js +1 -1
  44. package/dist/translations/en.js +1 -1
  45. package/dist/translations/en.umd.js +1 -1
  46. package/dist/translations/eo.js +1 -1
  47. package/dist/translations/eo.umd.js +1 -1
  48. package/dist/translations/es-co.js +1 -1
  49. package/dist/translations/es-co.umd.js +1 -1
  50. package/dist/translations/es.js +1 -1
  51. package/dist/translations/es.umd.js +1 -1
  52. package/dist/translations/et.js +1 -1
  53. package/dist/translations/et.umd.js +1 -1
  54. package/dist/translations/eu.js +1 -1
  55. package/dist/translations/eu.umd.js +1 -1
  56. package/dist/translations/fa.js +1 -1
  57. package/dist/translations/fa.umd.js +1 -1
  58. package/dist/translations/fi.js +1 -1
  59. package/dist/translations/fi.umd.js +1 -1
  60. package/dist/translations/fr.js +1 -1
  61. package/dist/translations/fr.umd.js +1 -1
  62. package/dist/translations/gl.js +1 -1
  63. package/dist/translations/gl.umd.js +1 -1
  64. package/dist/translations/gu.js +1 -1
  65. package/dist/translations/gu.umd.js +1 -1
  66. package/dist/translations/he.js +1 -1
  67. package/dist/translations/he.umd.js +1 -1
  68. package/dist/translations/hi.js +1 -1
  69. package/dist/translations/hi.umd.js +1 -1
  70. package/dist/translations/hr.js +1 -1
  71. package/dist/translations/hr.umd.js +1 -1
  72. package/dist/translations/hu.js +1 -1
  73. package/dist/translations/hu.umd.js +1 -1
  74. package/dist/translations/hy.js +1 -1
  75. package/dist/translations/hy.umd.js +1 -1
  76. package/dist/translations/id.js +1 -1
  77. package/dist/translations/id.umd.js +1 -1
  78. package/dist/translations/it.js +1 -1
  79. package/dist/translations/it.umd.js +1 -1
  80. package/dist/translations/ja.js +1 -1
  81. package/dist/translations/ja.umd.js +1 -1
  82. package/dist/translations/jv.js +1 -1
  83. package/dist/translations/jv.umd.js +1 -1
  84. package/dist/translations/kk.js +1 -1
  85. package/dist/translations/kk.umd.js +1 -1
  86. package/dist/translations/km.js +1 -1
  87. package/dist/translations/km.umd.js +1 -1
  88. package/dist/translations/kn.js +1 -1
  89. package/dist/translations/kn.umd.js +1 -1
  90. package/dist/translations/ko.js +1 -1
  91. package/dist/translations/ko.umd.js +1 -1
  92. package/dist/translations/ku.js +1 -1
  93. package/dist/translations/ku.umd.js +1 -1
  94. package/dist/translations/lt.js +1 -1
  95. package/dist/translations/lt.umd.js +1 -1
  96. package/dist/translations/lv.js +1 -1
  97. package/dist/translations/lv.umd.js +1 -1
  98. package/dist/translations/ms.js +1 -1
  99. package/dist/translations/ms.umd.js +1 -1
  100. package/dist/translations/nb.js +1 -1
  101. package/dist/translations/nb.umd.js +1 -1
  102. package/dist/translations/ne.js +1 -1
  103. package/dist/translations/ne.umd.js +1 -1
  104. package/dist/translations/nl.js +1 -1
  105. package/dist/translations/nl.umd.js +1 -1
  106. package/dist/translations/no.js +1 -1
  107. package/dist/translations/no.umd.js +1 -1
  108. package/dist/translations/oc.js +1 -1
  109. package/dist/translations/oc.umd.js +1 -1
  110. package/dist/translations/pl.js +1 -1
  111. package/dist/translations/pl.umd.js +1 -1
  112. package/dist/translations/pt-br.js +1 -1
  113. package/dist/translations/pt-br.umd.js +1 -1
  114. package/dist/translations/pt.js +1 -1
  115. package/dist/translations/pt.umd.js +1 -1
  116. package/dist/translations/ro.js +1 -1
  117. package/dist/translations/ro.umd.js +1 -1
  118. package/dist/translations/ru.js +1 -1
  119. package/dist/translations/ru.umd.js +1 -1
  120. package/dist/translations/si.js +1 -1
  121. package/dist/translations/si.umd.js +1 -1
  122. package/dist/translations/sk.js +1 -1
  123. package/dist/translations/sk.umd.js +1 -1
  124. package/dist/translations/sl.js +1 -1
  125. package/dist/translations/sl.umd.js +1 -1
  126. package/dist/translations/sq.js +1 -1
  127. package/dist/translations/sq.umd.js +1 -1
  128. package/dist/translations/sr-latn.js +1 -1
  129. package/dist/translations/sr-latn.umd.js +1 -1
  130. package/dist/translations/sr.js +1 -1
  131. package/dist/translations/sr.umd.js +1 -1
  132. package/dist/translations/sv.js +1 -1
  133. package/dist/translations/sv.umd.js +1 -1
  134. package/dist/translations/th.js +1 -1
  135. package/dist/translations/th.umd.js +1 -1
  136. package/dist/translations/ti.js +1 -1
  137. package/dist/translations/ti.umd.js +1 -1
  138. package/dist/translations/tk.js +1 -1
  139. package/dist/translations/tk.umd.js +1 -1
  140. package/dist/translations/tr.js +1 -1
  141. package/dist/translations/tr.umd.js +1 -1
  142. package/dist/translations/tt.js +1 -1
  143. package/dist/translations/tt.umd.js +1 -1
  144. package/dist/translations/ug.js +1 -1
  145. package/dist/translations/ug.umd.js +1 -1
  146. package/dist/translations/uk.js +1 -1
  147. package/dist/translations/uk.umd.js +1 -1
  148. package/dist/translations/ur.js +1 -1
  149. package/dist/translations/ur.umd.js +1 -1
  150. package/dist/translations/uz.js +1 -1
  151. package/dist/translations/uz.umd.js +1 -1
  152. package/dist/translations/vi.js +1 -1
  153. package/dist/translations/vi.umd.js +1 -1
  154. package/dist/translations/zh-cn.js +1 -1
  155. package/dist/translations/zh-cn.umd.js +1 -1
  156. package/dist/translations/zh.js +1 -1
  157. package/dist/translations/zh.umd.js +1 -1
  158. package/package.json +16 -16
package/dist/index.js CHANGED
@@ -20,14 +20,14 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Command as _0x43a272,Context as _0x227f3d,ContextPlugin as _0x2eb158,Editor as _0x35f7e2,PendingActions as _0x519f4b,Plugin as _0x4ce8d6}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x470dce,Collection as _0x268cc3,DomEmitterMixin as _0x1be5f8,FocusTracker as _0x336630,KeystrokeHandler as _0x5477b5,ObservableMixin as _0x4ecbd8,Rect as _0x6ccfb5,diff as _0x1c4208,first as _0x268dd2,getEnvKeystrokeText as _0x47b6a1,keyCodes as _0x44e3ed,priorities as _0x13b546,scrollViewportToShowTarget as _0x119924,toUnit as _0x38a242,uid as _0x55dcd3}from'@ckeditor/ckeditor5-utils';import{AriaDescriptionView as _0x70bd76,ConfirmMixin as _0x397e7f,FOCUS_ANNOTATION_KEYSTROKE as _0x35057c,LateFocusButtonView as _0x2055a7,LateFocusDropdownButtonView as _0x1e500f,UserView as _0x3f116e,Users as _0x5ce26d,getAllMarkersDomElementsSorted as _0x488b88,getDateTimeFormatter as _0x2f47b1,hashObject as _0x2c8944,setupThreadKeyboardNavigation as _0xd00c94,surroundingMarkersDetector as _0x983eb5,trimHtml as _0x486ae3}from'@ckeditor/ckeditor5-collaboration-core';import{cloneDeep as _0x459977,debounce as _0x38960e,isEqual as _0x1e3430,set as _0x47996a,throttle as _0x35aefe,unset as _0x4b61a1}from'es-toolkit/compat';import{IconAddComment as _0x363df6,IconCheck as _0x213cb6,IconCommentsArchive as _0x58caa7,IconPencil as _0x3fe1c5,IconRemoveComment as _0x34c785,IconThreeVerticalDots as _0xdc1ba7,IconUndo as _0x5a336c}from'@ckeditor/ckeditor5-icons';import{BalloonPanelView as _0x5086ad,BodyCollection as _0x3040e5,ButtonView as _0x504c42,ContextualBalloon as _0x14b5ab,Dialog as _0x182624,DialogViewPosition as _0x583578,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
- _0x4ecbd8();var bt=class extends It{['model'];['view'];constructor(_0x302b73,_0x1e3522){super(),this['model']=_0x302b73,this['model']['_isAttached']=!0x0,this['view']=_0x1e3522,this['listenTo'](_0x1e3522,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x1e3522,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x1e3522,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x1e3522,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x1e3522,'addComment',(_0x4a8e6d,_0x24a928)=>this['addComment'](_0x24a928)),this['listenTo'](_0x1e3522,'updateComment',(_0x4c019c,_0x48d4c0,_0xa0345a)=>this['updateComment'](_0x48d4c0,_0xa0345a)),this['listenTo'](_0x1e3522,'removeComment',(_0x44cc8c,_0x39af1d)=>this['removeComment'](_0x39af1d));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x3f62f5){this['model']['addComment']({'content':_0x3f62f5,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x17aa8d,_0x2e72a7){this['model']['getComment'](_0x17aa8d)['update']({'content':_0x2e72a7});}['removeComment'](_0x52b01f){this['model']['getComment'](_0x52b01f)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}};function Et(_0x5a4c5a,_0x5cf234,_0x4cc7e0){const t=_0x5a4c5a['t'];switch(_0x5cf234){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'},_0x4cc7e0);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'},_0x4cc7e0);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'},_0x4cc7e0);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'},_0x4cc7e0);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x4cc7e0);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'},_0x4cc7e0);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'},_0x4cc7e0);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'},_0x4cc7e0);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(_0x2866c4,_0x4ec84c){super(_0x2866c4);const _0x4a4885=_0x55dcd3();this['main']=this['createCollection'](),this['editable']=new st(_0x2866c4,_0x4ec84c,void 0x0,{'label':()=>Et(_0x2866c4,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x2866c4['uiLanguageDirection'],'lang':_0x2866c4['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x4a4885},'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(_0x2af082){super(_0x2af082),this['view']=new kt(_0x2af082['locale'],_0x2af082['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x41d7=this['editor']['editing']['view'],_0xec6a04=this['view']['editable'];_0xec6a04['name']=_0x41d7['document']['getRoot']()['rootName'],this['view']['render']();const _0x5d17b3=_0xec6a04['element'];this['setEditableElement'](_0xec6a04['name'],_0x5d17b3),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x41d7['attachDomRoot'](_0x5d17b3),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}};const Ot=[ft,gt,_t,At,vt,yt,Tt],Mt=/* #__PURE__ -- @preserve */
25
- _0x4ecbd8(_0x35f7e2);var Rt=class CommentEditor extends Mt{static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
- ((()=>Ot)());constructor(_0x4f01f7={}){(_0x4f01f7=Object['assign']({},_0x4f01f7))['plugins']||(_0x4f01f7['plugins']=CommentEditor['defaultPlugins']),super(_0x4f01f7),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 _0xb9901e=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0xb9901e))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x11a17b=>{const _0x236cb4=this['model']['document']['getRoot'](),_0x2d20fd=_0x236cb4&&_0x236cb4['getChild'](_0x236cb4['childCount']-0x1);_0x11a17b['setSelection'](_0x2d20fd,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x41ab22=this['editing']['view'],_0x1d82ec=_0x41ab22['document']['getRoot'](),_0x44c1c2=_0x1d82ec['getChild'](0x0);_0x1d82ec['childCount']>0x1||!_0x44c1c2||'p'!=_0x44c1c2['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x41ab22,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x44c1c2['placeholder']=this['placeholder']),ut({'view':_0x41ab22,'element':_0x44c1c2,'keepOnFocus':!0x0}),this['placeholderElement']=_0x44c1c2);}},St=class extends ht{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x53d6c7,_0xce7050={}){super(_0x53d6c7),this['editor']=null,this['_editorConfig']=_0xce7050,this['set']('value',_0xce7050['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',Et(_0x53d6c7,'Reply...')),this['set']('submitLabel',Et(_0x53d6c7,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x5477b5(),this['focusTracker']=new _0x336630(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x21080e=>!_0x21080e['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',(_0x5240c1,_0x14b90f)=>{this['cancelButtonView']['fire']('execute'),_0x14b90f();}),this['keystrokes']['set']('Ctrl+Enter',(_0x2af5af,_0x2fc77f)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x2fc77f());}),this['on']('submit',(_0x51f11c,_0x341a5f)=>{_0x341a5f['length']>0xfde8?(alert(Et(_0x53d6c7,'TOO_LONG_COMMENT_ALERT',[_0x341a5f['length'],0xfde8])),_0x51f11c['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 _0x1bf38d=this['editor'];this['element']['insertBefore'](_0x1bf38d['ui']['element'],this['element']['firstChild']),_0x1bf38d['model']['document']['on']('change',()=>this['value']=_0x1bf38d['getData']()),_0x1bf38d['bind']('placeholder')['to'](this),this['focusables']['add'](_0x1bf38d['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x55275d){-0x1===_0x55275d?(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:_0x315028}=this,_0xe7ce82=new _0x504c42(_0x315028);return _0xe7ce82['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0xe7ce82['withText']=!0x0,_0xe7ce82['bind']('label')['to'](this,'submitLabel'),_0xe7ce82['on']('execute',()=>{this['fire']('submit',this['value']);}),_0xe7ce82['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x43f8a7,_0x47be18)=>!_0x47be18&&!!_0x43f8a7['trim']()),_0xe7ce82;}['_createCancelButton'](){const {locale:_0x34cff0}=this,_0x354215=new _0x504c42(_0x34cff0);return _0x354215['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x354215['label']=Et(_0x34cff0,'Cancel'),_0x354215['withText']=!0x0,_0x354215['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x354215;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x22ed3d=>{this['focusTracker']['add'](_0x22ed3d['element']);}),this['focusables']['on']('change',(_0x524744,_0x514b81)=>{for(const _0x19529e of Array['from'](_0x514b81['added'])['reverse']())this['focusTracker']['add'](_0x19529e['element']);});}},xt=class extends ht{constructor(_0x2fd80f,_0x10f040,_0x3eb3a8){super(_0x2fd80f),this['commentInputView']=new St(_0x2fd80f,_0x3eb3a8),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x4023b7,_0x9d543a)=>_0x4023b7||!!_0x9d543a),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 _0x3f116e(_0x2fd80f,_0x10f040),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'](_0x2d6855){this['commentInputView']['focus'](_0x2d6855);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x1b2033,_0x34fa24)=>{const {submitButtonView:_0x524aa3,cancelButtonView:_0x63d52f,editor:_0x3769b6}=this['commentInputView'];[_0x524aa3['element'],_0x63d52f['element'],_0x3769b6?_0x3769b6['editing']['view']['getDomRoot']():null]['filter'](_0x2fd7a9=>_0x2fd7a9)['some'](_0x68e2a5=>_0x68e2a5['contains'](_0x34fa24['target']))||(this['focus'](),_0x34fa24['preventDefault']());});}},Pt=class extends ht{constructor(_0x1c5451){super(_0x1c5451);const _0x33658d=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x33658d['to']('count',_0x4ee605=>Et(_0x1c5451,'NUMBER_OF_COMMENTS',_0x4ee605))}]});}},Lt=class extends ht{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x2cd771,_0x6ab423,_0x507bc0){super(_0x2cd771);const _0x455293=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x6ab423['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x6ab423,this['_config']=_0x507bc0,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x336630(),this['keystrokes']=new _0x5477b5(),this['focusCycler']=new et({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x372e2b=>this['commentViews']['map'](_0x2f901b=>_0x2f901b['element'])['includes'](_0x372e2b['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Pt(_0x2cd771),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x4a527e=>_0x4a527e-this['_config']['maxCommentsWhenCollapsed']);for(const _0x1736bf of _0x6ab423['comments'])this['_handleNewCommentModel'](_0x1736bf);this['_handleInfoComment'](),this['listenTo'](_0x6ab423['comments'],'add',(_0x344138,_0x279d89)=>{const _0x4cfdaa=this['_calculatePosition'](_0x279d89);this['length']++,this['_handleNewCommentModel'](_0x279d89,_0x4cfdaa),this['refreshVisibleViews']();}),this['listenTo'](_0x6ab423['comments'],'remove',(_0x306300,_0x308d1b)=>{this['length']--,this['_handleRemoveCommentModel'](_0x308d1b),this['refreshVisibleViews']();}),this['listenTo'](_0x6ab423,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x6ab423,'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',_0x455293['if']('length','ck-hidden',_0x553920=>!_0x553920)],'aria-label':Et(_0x2cd771,'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'](_0x4593db){-0x1===_0x4593db?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x45a5b2 of this['commentViews'])_0x45a5b2['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x41dbca,_0x308115){const _0x23cd4b=new this['_config']['CommentView'](this['locale'],_0x41dbca,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x23cd4b['viewUid']=_0x41dbca['id'],_0x23cd4b['delegate']('removeComment')['to'](this),_0x23cd4b['delegate']('updateComment')['to'](this),_0x23cd4b['delegate']('resolveCommentThread')['to'](this),_0x23cd4b['delegate']('editorReady')['to'](this),_0x23cd4b['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x23cd4b,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x23cd4b,_0x308115);}['_calculatePosition'](_0x49665d){const _0x292f3f=this['_model']['_findOptimalIndex'](_0x49665d);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x49665d['authoredAt']?_0x292f3f-0x1:_0x292f3f:_0x292f3f-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x44151c={'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'],_0x44151c,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x44151c));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x16e3f5){const _0x2d89ad=this['commentViews']['remove'](_0x16e3f5['id']);this['stopListening'](_0x2d89ad),_0x2d89ad['isEditMode']&&this['_updateHasDirtyComment'](),_0x2d89ad['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x190dbf=>_0x190dbf['isEditMode']);}['_rearrangeCollapse'](){const _0xd57259=function(_0x591804){const _0x1360f9=new _0x268cc3();for(const _0x3a6011 of _0x591804)_0x1360f9['add'](_0x3a6011);return _0x1360f9;}(this['commentViews']),_0x2480aa=this['_collapsedCommentsView']['count'];for(let _0x4dbf20=0x1;_0x4dbf20<=_0x2480aa;_0x4dbf20++)_0xd57259['remove'](0x1);for(const _0x361a95 of _0xd57259)_0x361a95['collapse']();_0x2480aa>0x0&&_0xd57259['add'](this['_collapsedCommentsView'],0x1),Dt(_0x1c4208(Array['from'](this['visibleViews']),Array['from'](_0xd57259)),this['visibleViews'],_0xd57259);}['_rearrangeExpand'](){Dt(_0x1c4208(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x560333 of this['visibleViews'])_0x560333['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x35f0bc=>{this['focusTracker']['add'](_0x35f0bc['element']),this['keystrokes']['listenTo'](_0x35f0bc['element']);}),this['commentViews']['on']('change',(_0x496836,_0x56dfea)=>{for(const _0xca0d19 of _0x56dfea['removed'])this['focusTracker']['remove'](_0xca0d19['element']),this['keystrokes']['stopListening'](_0xca0d19['element']);for(const _0x321735 of Array['from'](_0x56dfea['added'])['reverse']())this['focusTracker']['add'](_0x321735['element']),this['keystrokes']['listenTo'](_0x321735['element']);});}};function Dt(_0x19c233,_0xf1f98c,_0x21453b){let _0x251ec6=0x0;for(const _0x1f6be9 of _0x19c233)switch(_0x1f6be9){case'insert':_0xf1f98c['add'](_0x21453b['get'](_0x251ec6),_0x251ec6),_0x251ec6++;break;case'delete':_0xf1f98c['remove'](_0x251ec6);break;case'equal':_0x251ec6++;}}var Vt=class extends ht{constructor(_0x52f1fa){super(_0x52f1fa);const _0x2c250e=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x2c250e['to']('contextValue',_0x4735d9=>Et(_0x52f1fa,'THREAD_CONTEXT_LABEL',_0x4735d9)),'tabindex':-0x1},'children':[{'text':_0x2c250e['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Bt=class extends ht{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x1dd275,_0x3a70b3){super(_0x1dd275);const _0x4592e4=this['bindTemplate'];this['_model']=_0x3a70b3,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x336630(),this['keystrokes']=new _0x5477b5(),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',_0x5648f5=>!!_0x5648f5),this['bind']('contextValue')['to'](this['_model'],'context',_0xb7bf26=>_0xb7bf26&&_0xb7bf26['value']?this['_trimContextValue'](_0xb7bf26['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',_0x4592e4['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 _0x5f526a=new _0x504c42(this['locale']);return _0x5f526a['label']=Et(this['locale'],'Reopen'),_0x5f526a['tooltip']=Et(this['locale'],'Reopen'),_0x5f526a['icon']=_0x5a336c,_0x5f526a['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2a71b7=>!_0x2a71b7),_0x5f526a['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3cfbbd,_0x5675e5)=>_0x3cfbbd&&_0x5675e5),_0x5f526a['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x5f526a;}['_trimContextValue'](_0x3fc152){if(_0x3fc152['length']<0x96)return _0x3fc152;const _0x5a9129=_0x3fc152['lastIndexOf']('\x20',0x93);return _0x3fc152['substring'](0x0,_0x5a9129>-0x1?_0x5a9129:0x93)+'...';}['_attachContextActions'](){const _0x1a0b98=this['element']['querySelector']('.ck-context'),_0x5657e1=_0x1a0b98['querySelector']('.ck-context__value');this['listenTo'](_0x1a0b98,'mouseenter',()=>{_0x5657e1['offsetWidth']<_0x5657e1['scrollWidth']&&_0x1a0b98['classList']['add']('overlay');}),this['listenTo'](_0x1a0b98,'mouseleave',()=>{_0x1a0b98['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x5e597c of this['focusables'])this['focusTracker']['add'](_0x5e597c['element']),this['keystrokes']['listenTo'](_0x5e597c['element']);}['_createContextView'](){const _0x3d227a=new Vt(this['locale']);return _0x3d227a['bind']('contextValue')['to'](this),_0x3d227a;}},Ht=class extends ht{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x53b667,_0x4edf78,_0x39b9ac,_0x3f0867){super(_0x53b667),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x4edf78,this['_localUser']=_0x39b9ac,this['_config']=_0x3f0867,this['commentThreadHeaderView']=new Bt(_0x53b667,_0x4edf78),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x70bd76(_0x53b667,Et(_0x53b667,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Lt(_0x53b667,_0x4edf78,Object['assign']({'CommentView':this['_config']['CommentView']},_0x3f0867)),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',(_0x1eb09c,_0x5606da)=>_0x1eb09c||!!_0x5606da),this['bind']('isUnlinked')['to'](_0x4edf78,'unlinkedAt',_0x19c21d=>!!_0x19c21d);let _0x176c1b=null;const _0x285cac=()=>{const _0xee8dc2=this['_model']['comments']['first']||null;_0xee8dc2!==_0x176c1b&&(_0x176c1b&&this['stopListening'](_0x176c1b,'change:content'),_0x176c1b=_0xee8dc2,_0xee8dc2&&this['listenTo'](_0xee8dc2,'change:content',_0x285cac));const _0x54e1e4=_0xee8dc2?_0xee8dc2['author']['name']:this['_localUser']['name'],_0x4fe4e0=_0xee8dc2?new DOMParser()['parseFromString'](_0x486ae3(_0xee8dc2['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']}),'text/html')['body']['textContent']:'',_0x2b5309=Et(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x54e1e4]);this['set']('ariaLabel',_0x4fe4e0?_0x2b5309+'\x20'+_0x4fe4e0:_0x2b5309);};this['listenTo'](this['_model']['comments'],'change',_0x285cac),_0x285cac(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x336630(),this['keystrokes']=new _0x5477b5(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2e5a3d=>_0x2e5a3d['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0xd00c94(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x3f97b3=new xt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x92e0a9=_0x3f97b3['commentInputView'];return _0x3f97b3['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x92e0a9,'value',(_0x518832,_0x58af06,_0x508c03,_0x2e7659,_0x1d3726)=>!!_0x1d3726||!!_0x2e7659&&_0x508c03&&!_0x58af06||_0x518832&&_0x508c03&&!_0x58af06),_0x92e0a9['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x2636c5,_0x32af90,_0x5a7670)=>{let _0x276413;return _0x276413=_0x5a7670&&_0x32af90?'Reply\x20to\x20reopen\x20discussion...':_0x2636c5?'Reply...':'Write\x20a\x20comment...',Et(this['locale'],_0x276413);}),_0x92e0a9['bind']('submitLabel')['to'](this,'length',_0x48daf2=>Et(this['locale'],_0x48daf2?'Reply':'Comment')),_0x92e0a9['on']('submit',(_0x1d7075,_0x25701a)=>{this['fire']('addComment',_0x25701a),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x92e0a9['on']('cancel',()=>{this['focus']();}),_0x92e0a9['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x92e0a9['on']('cancel',_0x44d061=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x44d061['stop']());}),this['on']('change:isActive',(_0x50c1bc,_0x61e767,_0x2d1ee9)=>{_0x2d1ee9||this['length']||_0x92e0a9['value']||this['fire']('removeCommentThread');}),_0x3f97b3;}};const Ft=/* #__PURE__ -- @preserve */
27
- _0x397e7f(Ht);var Ut=class extends Ft{['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x1aa5cf,_0x182d4b,_0x475bd3,_0x13e0c1){super(_0x1aa5cf,_0x182d4b,_0x475bd3,_0x13e0c1),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x1aa5cf,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x12c5e3,_0x55b8c9,_0x403eb3)=>{_0x403eb3||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x29db15,_0x53a636,_0xdd4d60)=>{_0xdd4d60&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x33f4dd=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x33f4dd['if']('isActive','ck-thread--active'),_0x33f4dd['if']('isUnlinked','ck-thread--unlinked'),_0x33f4dd['to']('actionIndicator',_0x5dc221=>_0x5dc221?'ck-thread--'+_0x5dc221:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x33f4dd['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 _0x56689 of this['commentsListView']['commentViews'])_0x56689['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x5f474c}=this,_0x1277d4=this['commentsListView']['commentViews']['get'](0x0);_0x1277d4===this['_boundFirstCommentView']||_0x1277d4['isSystemComment']||(this['_boundFirstCommentView']=_0x1277d4,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x1277d4,'actionIndicator',_0x54931b=>'remove'===_0x54931b?'remove':null),_0x1277d4['placeholder']=Et(_0x5f474c,'Write\x20a\x20comment...'),_0x1277d4['removeButton']['on']('execute',_0x2f831d=>{_0x2f831d['stop'](),this['showConfirm'](Et(_0x5f474c,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x1277d4['focus']();}),_0x1277d4['actionBar']['add'](this['resolveButton'],0x0),_0x1277d4['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x94cb95=new _0x2055a7(this['locale']);return _0x94cb95['label']=Et(this['locale'],'Resolve'),_0x94cb95['tooltip']=Et(this['locale'],'Resolve'),_0x94cb95['icon']=_0x213cb6,_0x94cb95['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x94cb95['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x578a0d=>!_0x578a0d),_0x94cb95['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x36a13a,_0x2c5799)=>_0x36a13a&&!_0x2c5799),_0x94cb95['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x94cb95;}['_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(_0x36dd16){super(_0x36dd16),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x322bb5,_0x495a9a,_0x28a58d)=>{this['element']['innerHTML']=_0x28a58d;}),this['element']['innerHTML']=this['content'];}},Kt=class extends ht{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x177b75,_0x418da3,_0x1a5738){super(_0x177b75),this['_model']=_0x418da3,this['_config']=_0x1a5738,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x418da3,'content',_0x418da3,'authoredAt',(_0x51858c,_0x280126)=>Et(_0x177b75,'COMMENT_ARIA_LABEL',[_0x418da3['author']['name'],_0x1a5738['formatDateTime'](_0x280126),new DOMParser()['parseFromString'](_0x51858c,'text/html')['body']['textContent'],_0x418da3['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x70bd76(_0x177b75,Et(_0x177b75,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new at(),this['focusTracker']=new _0x336630(),this['keystrokes']=new _0x5477b5(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xbc7376=>_0xbc7376['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 _0x324bed=new Wt(this['locale']);return _0x324bed['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0xb59248,_0x530a66)=>_0x530a66?_0x486ae3(_0xb59248,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0xb59248),_0x324bed;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x40267b=new St(this['locale'],this['_config']['editorConfig']);return _0x40267b['value']=this['_model']['content'],_0x40267b['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x40267b['submitLabel']=Et(this['locale'],'Save'),_0x40267b['on']('submit',(_0x214a3f,_0x10ece2)=>{this['fire']('updateComment',this['_model']['id'],_0x10ece2),this['switchToDisplayMode'](),this['focus']();}),_0x40267b['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x40267b['once']('editorReady',()=>{_0x40267b['focus']();}),_0x40267b['createEditor'](),_0x40267b['delegate']('editorReady')['to'](this),_0x40267b['delegate']('editorDestroyed')['to'](this),_0x40267b;}['_setupKeyboardNavigation'](){const _0x5626f2=this['element'];this['keystrokes']['listenTo'](_0x5626f2);for(const _0x48ee92 of this['focusables'])this['focusTracker']['add'](_0x48ee92['element']),this['keystrokes']['listenTo'](_0x48ee92['element']);this['focusables']['on']('change',(_0x519570,_0x5c9e94)=>{for(const _0x4bb041 of _0x5c9e94['removed'])this['focusTracker']['remove'](_0x4bb041['element']),this['keystrokes']['stopListening'](_0x4bb041['element']);for(const _0x5e789d of _0x5c9e94['added'])this['focusTracker']['add'](_0x5e789d['element']),this['keystrokes']['listenTo'](_0x5e789d['element']);}),this['keystrokes']['set']('enter',(_0x53b29b,_0x8a3dbc)=>{_0x5626f2===_0x53b29b['target']&&(this['focusCycler']['focusFirst'](),_0x8a3dbc());}),this['keystrokes']['set']('esc',(_0x512c8f,_0x351ec5)=>{_0x5626f2!==_0x512c8f['target']&&(this['focus'](),_0x351ec5());});}};const Gt=/* #__PURE__ -- @preserve */
28
- _0x397e7f(Kt);var Yt=class extends Gt{['actionBar'];['userView'];constructor(_0x2bd278,_0x54118e,_0x505f25){super(_0x2bd278,_0x54118e,_0x505f25),this['set']('actionIndicator',null),this['set']('placeholder',Et(_0x2bd278,'Reply...')),this['bind']('authoredAt')['to'](_0x54118e),this['bind']('resolvedAt')['to'](_0x54118e),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 _0x3f116e(_0x2bd278,_0x54118e['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x54118e,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x383259=this['bindTemplate'],_0x19d38d=[{'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':_0x383259['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x383259['to']('authoredAt',_0x251048=>this['_config']['formatDateTime'](_0x251048))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x383259['if']('isEditMode','ck-comment__actions--hidden'),_0x383259['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']&&_0x19d38d['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x383259['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x383259['if']('isEditMode','ck-comment--edit'),_0x383259['if']('isSystemComment','ck-comment--info'),_0x383259['to']('actionIndicator',_0x282c1b=>_0x282c1b?'ck-comment--'+_0x282c1b:'')],'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':_0x19d38d}]}]};}['_createEditButton'](){const _0x2bf467=new _0x504c42(this['locale']);return _0x2bf467['label']=Et(this['locale'],'Edit'),_0x2bf467['icon']=_0x3fe1c5,_0x2bf467['withText']=!0x0,_0x2bf467['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x2bf467['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x32de85=>!_0x32de85),_0x2bf467['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x2bf467['on']('execute',()=>this['switchToEditMode']()),_0x2bf467;}['_createRemoveButton'](){const _0x45226e=new _0x504c42(this['locale']);return _0x45226e['label']=Et(this['locale'],'Remove'),_0x45226e['icon']=_0x34c785,_0x45226e['withText']=!0x0,_0x45226e['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x45226e['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x52851f=>!_0x52851f),_0x45226e['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x45226e['on']('execute',()=>{this['showConfirm'](Et(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x45226e;}['_createDropdown'](){const _0x1c8818=ct(this['locale'],_0x1e500f),_0x52a0f9=_0x1c8818['panelView']['children'],_0x454dd6=new ot(this['locale']),_0x206c69=_0x1c8818['bindTemplate'];dt(_0x1c8818,()=>this['items']['find'](_0x401988=>_0x401988['isVisible'])),_0x1c8818['extendTemplate']({'attributes':{'class':[_0x206c69['if']('isVisible','ck-hidden',_0x150dd4=>!_0x150dd4)]}});const _0x2f266d=(_0x1e7861,_0x55d386=-0x1)=>{const _0x157546=new nt(this['locale']);_0x157546['children']['add'](_0x1e7861);const _0x127143=_0x55d386>-0x1?_0x55d386:_0x454dd6['items']['length'];_0x454dd6['items']['add'](_0x157546,_0x127143);const _0x58b19c=Array['from'](this['items']);_0x1c8818['unbind']('isEnabled','isVisible'),_0x1c8818['bind']('isEnabled')['toMany'](_0x58b19c,'isEnabled',(..._0x5ca88d)=>_0x5ca88d['some'](_0x22a2c9=>_0x22a2c9)),_0x1c8818['bind']('isVisible')['toMany'](_0x58b19c,'isVisible',(..._0x5a7a15)=>_0x5a7a15['some'](_0x115a5c=>_0x115a5c));};_0x1c8818['panelPosition']='sw',_0x1c8818['buttonView']['set']({'label':Et(this['locale'],'Show\x20more\x20items'),'icon':_0xdc1ba7});for(const _0x1f0cf2 of this['items'])_0x2f266d(_0x1f0cf2);return _0x52a0f9['add'](_0x454dd6),_0x1c8818['listenTo'](this['items'],'add',(_0x5871b8,_0x4f9d46,_0x202437)=>{_0x2f266d(_0x4f9d46,_0x202437);}),_0x1c8818['listenTo'](this['items'],'remove',(_0x1f1259,_0x5d44ec,_0xc522c1)=>{_0x454dd6['items']['remove'](_0xc522c1);}),_0x1c8818;}['_attachActions'](_0x2b0623,_0x4c4f17){const _0x475dbc=_0x2b0623&&_0x2b0623['element'];_0x475dbc&&(this['listenTo'](_0x475dbc,'mouseenter',()=>this['actionIndicator']=_0x4c4f17),this['listenTo'](_0x475dbc,'focus',()=>this['actionIndicator']=_0x4c4f17),this['listenTo'](_0x475dbc,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x475dbc,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x1f6b0f=super['_createCommentInputView']();return _0x1f6b0f['bind']('placeholder')['to'](this),_0x1f6b0f;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}};function Xt(_0x28a7f4){const _0x33c0fa=_0x35aefe(_0x28a7f4,0x1e),_0x2e03ff=new MutationObserver(_0x21b4d3=>{for(const _0x2f3e1c of _0x21b4d3)('attributes'==_0x2f3e1c['type']&&'class'==_0x2f3e1c['attributeName']||'childList'==_0x2f3e1c['type']||'characterData'==_0x2f3e1c['type'])&&_0x33c0fa();});return{'attach'(_0x45b7c1){_0x2e03ff['observe'](_0x45b7c1,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x2e03ff['disconnect'](),_0x33c0fa['cancel']();}};}var qt=class extends ht{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x43aa5e,_0x5caff5){super(_0x43aa5e),this['id']=_0x55dcd3(),this['focusTracker']=new _0x336630(),this['keystrokes']=new _0x5477b5(),this['keystrokes']['set']('Esc',(_0x3316ae,_0x470aac)=>this['fire']('Esc',_0x470aac)),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'](_0x5caff5),this['mainView']=_0x5caff5;const _0x4688da=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x4688da['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 _0x24075f=this['element']['clientHeight'];_0x24075f&&(this['height']=_0x24075f);}};const jt=/* #__PURE__ -- @preserve */
29
- _0x4ecbd8();var $t=class Annotation extends jt{['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x1c73d0,target:_0x538400,type:_0x188c49,isVisible:_0x34faac=!0x0}){super(),this['view']=_0x1c73d0,this['view']['element']||this['view']['render'](),this['_type']=_0x188c49,this['_target']=_0x538400,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x268cc3([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x14d03a,_0x2a7444)=>{this['view']['focusTracker']['add'](_0x2a7444);}),this['focusableElements']['on']('remove',(_0x5d207b,_0x55acdb)=>{this['view']['focusTracker']['remove'](_0x55acdb);}),this['set']('isVisible',_0x34faac);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x5ebabd=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x5ebabd),_0x5ebabd;}get['targetRect'](){const _0xac1a68=this['target'];if(null===_0xac1a68)return null;if(_0xac1a68 instanceof _0x6ccfb5)return _0xac1a68;const _0x52aea1=_0xac1a68['filter'](_0x515d56=>function(_0x5ec33d){return!!_0x5ec33d['offsetParent']||!!_0x5ec33d['getClientRects']()['item'](0x0);}(_0x515d56));return 0x0===_0x52aea1['length']?null:_0x6ccfb5['getDomElementRects'](_0x52aea1[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x410096){this['view']['isActive']=_0x410096,this['view']['mainView']['isActive']=_0x410096;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x426cba){if(!(null===_0x426cba||_0x426cba instanceof _0x6ccfb5||Array['isArray'](_0x426cba)&&_0x426cba['every'](_0x1c78e8=>zt(_0x1c78e8))))throw new _0x470dce('annotation-invalid-target',null,{'target':_0x426cba});}['_getNormalizedTarget'](){const _0x2a3090='function'==typeof this['_target']?this['_target']():this['_target'];return zt(_0x2a3090)?[_0x2a3090]:_0x2a3090;}};function zt(_0x55443e){return null!==_0x55443e&&'object'==typeof _0x55443e&&'nodeType'in _0x55443e&&0x1===_0x55443e['nodeType'];}var Jt=class extends _0x268cc3{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x1e68fc=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x336630(),this['_focusTracker']['on']('change:isFocused',(_0x48bcda,_0x200f84,_0x49a334)=>{_0x49a334||this['fire']('blur');});for(const _0x5647c2 of _0x1e68fc)this['add'](_0x5647c2);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x381759){if(this['has'](_0x381759))throw new _0x470dce('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x381759['innerView'],_0x381759),this['_viewToAnnotation']['set'](_0x381759['view'],_0x381759);for(const _0x10fb71 of _0x381759['focusableElements'])this['_focusTracker']['add'](_0x10fb71);if(this['listenTo'](_0x381759['focusableElements'],'add',(_0x2db417,_0x1a5f93)=>{this['_focusTracker']['add'](_0x1a5f93);}),this['listenTo'](_0x381759['focusableElements'],'remove',(_0x2add49,_0x42c10b)=>{this['_focusTracker']['remove'](_0x42c10b);}),this['listenTo'](_0x381759['view']['focusTracker'],'change:isFocused',(_0x399057,_0x542ffd,_0x39301e)=>{_0x39301e&&this['fire']('focus',_0x381759);}),_0x381759['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x34fcad of this)_0x34fcad['updateTargetRect']();}const _0x5c360d=this['_getOrderInContent'](_0x381759['view']['targetRect']);return super['add'](_0x381759,_0x5c360d);}['remove'](_0xb63136){if(!this['has'](_0xb63136))throw new _0x470dce('annotationcollection-not-existing-item',null);this['stopListening'](_0xb63136['view']['focusTracker']),this['stopListening'](_0xb63136['focusableElements']);for(const _0x4bad7e of _0xb63136['focusableElements'])this['_focusTracker']['remove'](_0x4bad7e);return this['_viewToAnnotation']['delete'](_0xb63136['view']),this['_innerViewToAnnotation']['delete'](_0xb63136['innerView']),super['remove'](_0xb63136);}['getByInnerView'](_0x26e2d4){return this['_innerViewToAnnotation']['get'](_0x26e2d4);}['getByView'](_0x570dfa){return this['_viewToAnnotation']['get'](_0x570dfa);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x57dbc5 of this)_0x57dbc5['updateTargetRect']();this['_sort']();}['_sort'](){const _0x2eba0f=Array['from'](this)['sort']((_0x57eeda,_0x2be6b6)=>Zt(_0x57eeda['view']['targetRect'],_0x2be6b6['view']['targetRect']));for(let _0x4c5f25=_0x2eba0f['length']-0x1;_0x4c5f25>0x0;_0x4c5f25--){const _0x49bae2=_0x2eba0f[_0x4c5f25];_0x4c5f25!==this['getIndex'](_0x49bae2)&&(this['remove'](_0x49bae2),this['add'](_0x49bae2));}}['_getOrderInContent'](_0x1c0d65){let _0x2834e=0x0;if(!_0x1c0d65)return this['length'];for(const _0x1b59a7 of this){const _0x54bb6a=_0x1b59a7['view']['targetRect'];if(_0x54bb6a){if(Zt(_0x1c0d65,_0x54bb6a)<0x0)return _0x2834e;_0x2834e++;}}return _0x2834e;}['_areCachedRectsStale'](){const _0x2eae48=this['get'](0x0);if(!_0x2eae48)return!0x1;const _0x3d99fc=_0x2eae48['view']['targetRect'],_0x4d4943=_0x2eae48['targetRect'];return!(!_0x3d99fc||!_0x4d4943)&&(_0x3d99fc['top']!==_0x4d4943['top']||_0x3d99fc['left']!==_0x4d4943['left']);}};function Qt({source:_0x3dce40,target:_0x40f026,filter:_0xefc1aa}){for(const _0x55cd0a of _0x3dce40)_0xefc1aa(_0x55cd0a)&&_0x40f026['add'](_0x55cd0a);_0x40f026['listenTo'](_0x3dce40,'add',(_0x3ee24c,_0x41ab94)=>{_0xefc1aa(_0x41ab94)&&_0x40f026['add'](_0x41ab94);}),_0x40f026['listenTo'](_0x3dce40,'remove',(_0x564d3f,_0xe08be1)=>{_0x40f026['has'](_0xe08be1)&&_0x40f026['remove'](_0xe08be1);});}function Zt(_0xcb6385,_0x3322ea){if(null===_0xcb6385&&null===_0x3322ea)return 0x0;if(null===_0xcb6385)return-0x1;if(null===_0x3322ea)return 0x1;const _0x4897bb=_0xcb6385['top']-_0x3322ea['top'];return 0x0==_0x4897bb?_0xcb6385['left']-_0x3322ea['left']:_0x4897bb;}var ti=class extends _0x2eb158{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x477d9d){if(super(_0x477d9d),this['collection']=new Jt(),this['_visibleAnnotations']=new Jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x477d9d instanceof _0x35f7e2){const _0x61bb94=_0x477d9d['locale'];_0x477d9d['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':Et(_0x61bb94,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':Et(_0x61bb94,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':Et(_0x61bb94,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':Et(_0x61bb94,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':Et(_0x61bb94,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':Et(_0x61bb94,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':Et(_0x61bb94,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0xf8c44){this['collection']['add'](_0xf8c44);}['remove'](_0xe40e9d){this['collection']['remove'](_0xe40e9d),_0xe40e9d['destroy']();}['refreshVisibility'](){for(const _0x6d9643 of this['collection'])_0x6d9643['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x243da6){return this['collection']['getByInnerView'](_0x243da6);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x4d2c57 of this['collection'])_0x4d2c57['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x5ed922){this['fire']('_activateAnnotation',_0x5ed922);}['createAnnotation'](_0x426bc1){return new $t(_0x426bc1);}['createAnnotationView'](_0x110765,_0x47fbb1){return new qt(_0x110765,_0x47fbb1);}['_addActiveAnnotation'](_0x2ab88a){const _0x599832=new Set(this['activeAnnotations']);_0x599832['add'](_0x2ab88a),this['activeAnnotations']=_0x599832;}['_removeActiveAnnotation'](_0x12a276){const _0x2aec55=new Set(this['activeAnnotations']);_0x2aec55['delete'](_0x12a276),this['activeAnnotations']=_0x2aec55;}['_bindAnnotationsToVisibleAnnotations'](){const _0x1030bc=this['collection'],_0x2f79a0=this['_visibleAnnotations'];function _0x3fed6b(_0x2fbc46){const _0x42e540=_0x2fbc46['source'];_0x42e540['isVisible']&&!_0x2f79a0['has'](_0x42e540)?_0x2f79a0['add'](_0x42e540):!_0x42e540['isVisible']&&_0x2f79a0['has'](_0x42e540)&&_0x2f79a0['remove'](_0x42e540),_0x42e540['view']['focusTracker']['remove'](_0x42e540['view']['element']),_0x42e540['view']['focusTracker']['add'](_0x42e540['view']['element']);}this['listenTo'](_0x1030bc,'add',(_0x11fca6,_0xcda5b)=>{_0xcda5b['isVisible']&&_0x2f79a0['add'](_0xcda5b),this['listenTo'](_0xcda5b,'change:isVisible',_0x3fed6b);}),this['listenTo'](_0x1030bc,'remove',(_0x7b5381,_0x56b6c6)=>{_0x2f79a0['has'](_0x56b6c6)&&_0x2f79a0['remove'](_0x56b6c6),this['stopListening'](_0x56b6c6,'change:isVisible',_0x3fed6b);});}['_setupEnterAnnotationKeystroke'](){const _0x9893fe=_0x1907f2=>{_0x1907f2['on']('ready',()=>{_0x1907f2['keystrokes']['set'](_0x35057c,(_0x295070,_0x22d155)=>{const _0x2be4dc=_0x268dd2(this['activeAnnotations']['values']());_0x2be4dc&&(_0x2be4dc['view']['focus'](),_0x22d155());});});};this['context']instanceof _0x35f7e2?_0x9893fe(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x51bcb4,_0x119d61)=>{_0x9893fe(_0x119d61);});}['_setupEscapeAnnotationHandling'](){const _0x20919a=_0x469322=>{const _0x569dfb=_0x469322['source'],_0x121a0f=[];let _0xceeeda;if(Array['isArray'](_0x569dfb['target'])){_0xceeeda=_0x569dfb['target'][0x0],this['context']instanceof _0x35f7e2?_0x121a0f['push'](this['context']):this['context']['editors']&&_0x121a0f['push'](...this['context']['editors']);for(const _0x2c2d30 of _0x121a0f)for(const _0x1513db of _0x2c2d30['editing']['view']['domRoots']['values']())if(_0x1513db['contains'](_0xceeeda))return void _0x2c2d30['editing']['view']['focus']();_0xceeeda['focus']();}};this['listenTo'](this['collection'],'add',(_0x2680c0,_0x2298ef)=>{this['listenTo'](_0x2298ef,'escape',_0x20919a,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x1de216,_0x462f4b)=>{this['stopListening'](_0x462f4b,'escape',_0x20919a);});}};const ii=Symbol('noChannel'),ei={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},si=/* #__PURE__ -- @preserve */
30
- _0x4ecbd8(),ni=/* #__PURE__ -- @preserve */
31
- _0x4ecbd8();var oi=class extends _0x2eb158{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[ti,_0x519f4b,_0x5ce26d];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1e3705){super(_0x1e3705),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x35feae=this['context']['config'];_0x35feae['define']('comments.maxCommentsWhenCollapsed',0x2),_0x35feae['define']('comments.maxThreadTotalWeight',0x1f4),_0x35feae['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x35feae['define']('comments.CommentThreadView',Ut),_0x35feae['define']('comments.CommentView',Yt),_0x35feae['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x20f330=this['context']['plugins']['get'](ti);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x3323dc,_0x157b80)=>this['_addCommentThread'](_0x157b80)),this['on']('submitCommentThread',(_0x3166af,_0x493229)=>this['_submitCommentThread'](_0x493229)),this['on']('resolveCommentThread',(_0x2557c0,_0xd46ffd)=>this['_resolveCommentThread'](_0xd46ffd)),this['on']('resolveCommentThread',(_0x1549a6,_0x1db69a)=>this['_updateActiveAnnotation'](_0x1db69a),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x59f93e,_0x51cbff)=>this['_reopenCommentThread'](_0x51cbff)),this['on']('reopenCommentThread',(_0x1ab4cc,_0x108662)=>this['_updateActiveAnnotation'](_0x108662),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x180bf3,_0x373064)=>this['_removeCommentThread'](_0x373064)),this['on']('updateCommentThread',(_0x2c2394,_0x2f2911)=>this['_updateCommentThread'](_0x2f2911)),this['on']('updateCommentThread',(_0x1d1012,_0x5e9593)=>this['_updateActiveAnnotation'](_0x5e9593),{'priority':'lowest'}),this['on']('addComment',(_0x512b1b,_0x173b44)=>this['_addComment'](_0x173b44)),this['on']('updateComment',(_0x4e79c0,_0x543ff7)=>this['_updateComment'](_0x543ff7)),this['on']('removeComment',(_0x50b321,_0x365849)=>this['_removeComment'](_0x365849)),this['on']('addComment',(_0x577def,{threadId:_0xd29b3f,isFromAdapter:_0xaa1a59})=>{if(_0xaa1a59)return;const _0x489d55=this['getCommentThread'](_0xd29b3f),_0x59e228=_0x489d55&&this['_threadToController']['get'](_0x489d55);_0x59e228&&_0x59e228['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x20f330,'change:activeAnnotations',(_0x26e351,_0x2094b0,_0x30bb7c)=>{const _0x3d2de6=Array['from'](_0x30bb7c)['map'](_0x39a54f=>this['_viewToController']['get'](_0x39a54f['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x3d2de6?_0x3d2de6['model']:null;});}set['adapter'](_0x3da027){if(this['_adapter'])throw new _0x470dce('commentsrepository-adapter-already-set');this['_adapter']=_0x3da027;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x2c8e3f=ii,threadId:_0x43d205=_0x55dcd3(),comments:_0x53be50=[],unlinkedAt:_0x346e33=null,resolvedAt:_0x1dd863=null,resolvedBy:_0x323f30=null,target:_0x74dbfe=null,context:_0x570406=null,attributes:_0x424645={},isResolvable:_0x3e9b62=!0x0,isSubmitted:_0x1f250c=!0x1,isFromAdapter:_0xbdc2fd=!0x1}={}){return this['fire'](ai('addCommentThread',_0x2c8e3f),{'channelId':_0x2c8e3f,'threadId':_0x43d205,'comments':_0x53be50,'unlinkedAt':_0x346e33,'resolvedAt':_0x1dd863,'resolvedBy':_0x323f30,'target':_0x74dbfe,'context':_0x570406,'attributes':_0x424645,'isFromAdapter':_0xbdc2fd,'isResolvable':_0x3e9b62,'isSubmitted':_0x1f250c}),this['getCommentThread'](_0x43d205);}['openNewCommentThread']({channelId:_0x4844db=ii,threadId:_0xfc967b=_0x55dcd3(),target:_0x199461,context:_0x57e84d=null,isResolvable:_0x820d0e=!0x0}){if(this['_readOnlyChannels']['has'](_0x4844db)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x199461)throw new _0x470dce('commentsrepository-missing-target');const _0x56ee7f=this['addCommentThread']({'channelId':_0x4844db,'threadId':_0xfc967b,'target':_0x199461,'context':_0x57e84d,'isResolvable':_0x820d0e});if(!_0x56ee7f)return null;const _0xd6412f=this['_threadToController']['get'](_0x56ee7f),_0x3440c2=_0xd6412f['view']['commentThreadInputView']['commentInputView'],_0x668d96=this['context']['plugins']['get'](ti),_0x5c2111=_0x668d96['getByInnerView'](_0xd6412f['view']);return _0x668d96['activate'](_0x5c2111),_0x3440c2['once']('editorReady',()=>_0x3440c2['focus']()),_0x56ee7f;}['hasCommentThread'](_0x445f7b){if('string'!=typeof _0x445f7b)throw new _0x470dce('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x445f7b);}['updateCommentThread']({channelId:_0x393d3a=ii,threadId:_0x17875a,context:_0x4f03ad,unlinkedAt:_0x553f94,attributes:_0x498802,isFromAdapter:_0x30ee53=!0x1}){return this['fire'](ai('updateCommentThread',_0x393d3a),{'channelId':_0x393d3a,'threadId':_0x17875a,'context':_0x4f03ad,'unlinkedAt':_0x553f94,'attributes':_0x498802,'isFromAdapter':_0x30ee53}),this['getCommentThread'](_0x17875a);}['getCommentThread'](_0x4b3be0){if('string'!=typeof _0x4b3be0)throw new _0x470dce('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x4b3be0);}['fetchCommentThread']({channelId:_0x5154d2,threadId:_0x4bc98b}={}){const _0x1f7099=this['getCommentThread'](_0x4bc98b);if(_0x1f7099)return Promise['resolve'](_0x1f7099);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x470dce('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x5154d2,'threadId':_0x4bc98b})['then'](_0xabf825=>this['hasCommentThread'](_0x4bc98b)?this['getCommentThread'](_0x4bc98b):_0xabf825?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x5154d2},_0xabf825)):void 0x0)['catch'](_0x404f3f=>{throw console['error'](_0x404f3f),new _0x470dce('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x4bc4fb,skipNotAttached:_0x1ed5b9=!0x1,skipEmpty:_0x190012=!0x1,toJSON:_0x3f91f8=!0x1}={}){const _0x12aca7=[];for(const _0x915736 of this['_threads']['values']())_0x4bc4fb&&_0x915736['channelId']!==_0x4bc4fb||_0x1ed5b9&&!_0x915736['isAttached']||_0x190012&&0x0===_0x915736['length']||_0x12aca7['push'](_0x915736);return _0x3f91f8?_0x12aca7['map'](_0x3e44cf=>_0x3e44cf['toJSON']()):_0x12aca7;}['getAnnotationForCommentThread'](_0x2caecb){const _0x24ab43=this['_threadToController']['get'](_0x2caecb);return _0x24ab43&&this['context']['plugins']['get'](ti)['getByInnerView'](_0x24ab43['view'])||null;}['getCommentThreadForAnnotation'](_0x464147){const _0x326618=this['_viewToController']['get'](_0x464147['innerView']);return _0x326618?_0x326618['model']:null;}['setActiveCommentThread'](_0x5cc3f6){const _0x421f55=this['context']['plugins']['get'](ti);if(!_0x5cc3f6)return void(this['activeCommentThread']&&_0x421f55['deactivateAll']());const _0x52d59e=this['getCommentThread'](_0x5cc3f6);if(!_0x52d59e)throw new _0x470dce('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x5cc3f6});if(!this['_threadToController']['has'](_0x52d59e))throw new _0x470dce('commentsrepository-active-not-attached',null,{'threadId':_0x5cc3f6});const _0x17e53f=_0x421f55['getByInnerView'](this['_threadToController']['get'](_0x52d59e)['view']);_0x421f55['activate'](_0x17e53f);}['switchReadOnly'](_0x28c96b,_0x139ac2){_0x28c96b?this['_readOnlyChannels']['add'](_0x139ac2):this['_readOnlyChannels']['delete'](_0x139ac2),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x20c577){return this['_readOnlyChannels']['has'](_0x20c577)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x1af572,_0x18608a){return new bt(_0x1af572,_0x18608a);}['setPermissions'](_0x805b7f,_0x13e832=ii){this['_permissions']['set'](_0x13e832,_0x805b7f),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0xd38764=ii){return this['_permissions']['has'](_0xd38764)?this['_permissions']['get'](_0xd38764):ei;}['_addCommentThread']({channelId:_0x3f2545,threadId:_0x453456,comments:_0x50a046,unlinkedAt:_0x37cd02,resolvedAt:_0x5db8a5,resolvedBy:_0x229c3e,target:_0xd3240d,context:_0x5de364,attributes:_0x18f300,isFromAdapter:_0x20f391,isResolvable:_0x1e4255,isSubmitted:_0x473bbc}){if('string'!=typeof _0x453456)throw new _0x470dce('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x453456});if(this['hasCommentThread'](_0x453456))throw new _0x470dce('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x453456});const _0x2ca168=new ri(this,{'channelId':_0x3f2545,'id':_0x453456,'context':_0x5de364,'attributes':_0x18f300,'unlinkedAt':_0x37cd02,'resolvedAt':_0x5db8a5,'resolvedBy':_0x229c3e?this['context']['plugins']['get'](_0x5ce26d)['getUser'](_0x229c3e):null,'isResolvable':_0x1e4255,'isSubmitted':_0x473bbc||_0x20f391});this['_threads']['set'](_0x453456,_0x2ca168);for(const _0x3e1646 of _0x50a046)_0x2ca168['_add'](this['_createNewComment']({'threadId':_0x453456,..._0x3e1646}));return _0xd3240d&&_0x2ca168['attachTo'](_0xd3240d),_0x20f391||!_0x2ca168['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x3f2545,'threadId':_0x453456});}['_submitCommentThread']({channelId:_0x20824f,threadId:_0x3a1716}){if(!this['hasCommentThread'](_0x3a1716))throw new _0x470dce('commentsrepository-missing-comment-thread',this);const _0x56eaae=this['getCommentThread'](_0x3a1716);if(_0x56eaae['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x2116a4,comments:_0x15a368,resolvedAt:_0x33219a,resolvedBy:_0xebdde6,context:_0x276797,attributes:_0x15195c}=_0x56eaae,_0x1c8dd2=this['context']['plugins']['get']('PendingActions'),_0x41d0ac=_0x1c8dd2['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x20824f,'threadId':_0x2116a4,'comments':_0x15a368['map'](_0x172205=>_0x172205['toJSON']()),'resolvedAt':_0x33219a,'resolvedBy':_0xebdde6?_0xebdde6['id']:_0xebdde6,'context':_0x276797,'attributes':_0x15195c})['then'](({comments:_0x7e9f1c})=>{_0x1c8dd2['remove'](_0x41d0ac);for(const _0x1662c8 of _0x7e9f1c)this['_updateComment']({'channelId':_0x20824f,'threadId':_0x3a1716,'commentId':_0x1662c8['commentId'],'createdAt':_0x1662c8['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x5cfdc4=>{throw console['error'](_0x5cfdc4),new _0x470dce('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x245674,target:_0x12a2b4}){const _0x4cfb07=this['getCommentThread'](_0x245674);if(!_0x4cfb07)throw new _0x470dce('commentsrepository-attach-missing-comment-thread',this);const _0x300e8f=this['context']['plugins']['get']('PendingActions'),_0x56ae90=this['context']['plugins']['get'](ti),_0x11c655=this['_createCommentThreadView'](_0x4cfb07),_0x5c14e0=new bt(_0x4cfb07,_0x11c655);let _0x97b585=null;_0x11c655['on']('change:isDirty',(_0x14745b,_0x4edd98,_0x5db708)=>{_0x5db708?_0x97b585=_0x300e8f['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x97b585&&(_0x300e8f['remove'](_0x97b585),_0x97b585=null);}),this['_threadToController']['set'](_0x4cfb07,_0x5c14e0),this['_viewToController']['set'](_0x11c655,_0x5c14e0);const _0x4e6b0e=new qt(this['context']['locale'],_0x11c655);_0x4e6b0e['bind']('length')['to'](_0x11c655),_0x4e6b0e['bind']('isDirty')['to'](_0x11c655,'isDirty',_0x11c655,'length',(_0x47e0f2,_0x46a549)=>_0x47e0f2||!_0x46a549),_0x4e6b0e['bind']('isActive')['to'](_0x11c655),_0x4e6b0e['type']='comment';const _0x2b57e4=new $t({'view':_0x4e6b0e,'target':_0x12a2b4,'type':'comment','isVisible':!_0x4cfb07['archivedAt']&&!!('function'==typeof _0x12a2b4?_0x12a2b4():_0x12a2b4)});return _0x11c655['on']('escape',()=>{_0x2b57e4['fire']('escape');}),this['_bindAnnotationToEditors'](_0x11c655,_0x2b57e4),_0x56ae90['add'](_0x2b57e4),_0x2b57e4;}['_bindAnnotationToEditors'](_0x5b89ae,_0xdfe330){this['listenTo'](_0x5b89ae,'editorReady',(_0x3de57c,_0x11bb97)=>{const _0x41d07a=_0x11bb97['ui']['view']['body']['bodyCollectionContainer'];_0xdfe330['focusableElements']['add'](_0x41d07a),this['context']instanceof _0x35f7e2&&this['context']['ui']['focusTracker']['add'](_0x41d07a);},{'priority':'highest'}),this['listenTo'](_0x5b89ae,'editorDestroyed',(_0x5d993f,_0x2c6eff)=>{const _0x5330a5=_0x2c6eff['ui']['view']['body']['bodyCollectionContainer'];_0xdfe330['focusableElements']['has'](_0x5330a5)&&_0xdfe330['focusableElements']['remove'](_0x5330a5),this['context']instanceof _0x35f7e2&&this['context']['ui']['focusTracker']['remove'](_0x5330a5);});}['_unbindEditors'](_0x265c62){this['stopListening'](_0x265c62,'editorReady'),this['stopListening'](_0x265c62,'editorDestroyed');}['_createCommentThreadView'](_0x283460){const _0x23257e=this['context']['plugins']['get'](_0x5ce26d),{config:_0x5a2447,locale:_0x28ba73}=this['context'],_0x33d24b=_0x2f47b1(_0x5a2447['get']('locale'),_0x28ba73);return new(0x0,(_0x5a2447['get']('comments'))['CommentThreadView'])(_0x28ba73,_0x283460,_0x23257e['me'],{'editorConfig':{..._0x5a2447['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x5a2447['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x5a2447['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x5a2447['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x5a2447['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x33d24b,'CommentView':_0x5a2447['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0xd5e02c,channelId:_0x44a041,resolvedAt:_0x22b910,resolvedBy:_0xb44d9,isFromAdapter:_0x49dc85}){if(!this['hasCommentThread'](_0xd5e02c))throw new _0x470dce('commentsrepository-missing-comment-thread',null,{'threadId':_0xd5e02c});const _0x5afe97=this['getCommentThread'](_0xd5e02c);if(_0x5afe97['isResolved'])throw new _0x470dce('commentsrepository-resolved-comment-thread',null,{'threadId':_0xd5e02c});const _0x160f9d=this['context']['plugins']['get'](_0x5ce26d);if(_0x5afe97['resolvedBy']=_0x160f9d['getUser'](_0xb44d9),_0x5afe97['resolvedAt']=_0x22b910,_0x49dc85||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x1e86f0=this['context']['plugins']['get']('PendingActions'),_0x4f8032=_0x1e86f0['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x44a041,'threadId':_0xd5e02c})['then'](({resolvedAt:_0xcb5b9,resolvedBy:_0x662950})=>{_0x1e86f0['remove'](_0x4f8032),_0x5afe97['resolvedBy']['id']!==_0x662950&&(_0x5afe97['resolvedBy']=_0x160f9d['getUser'](_0x662950)),_0x5afe97['resolvedAt']=_0xcb5b9;})['catch'](_0x33068b=>{throw console['error'](_0x33068b),new _0x470dce('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x4f288f,channelId:_0x1cb3de,isFromAdapter:_0x1005b1}){if(!this['hasCommentThread'](_0x4f288f))throw new _0x470dce('commentsrepository-missing-comment-thread',null,{'threadId':_0x4f288f});const _0xc8494f=this['getCommentThread'](_0x4f288f);if(!_0xc8494f['isResolved'])throw new _0x470dce('commentsrepository-reopen-comment-thread',null,{'threadId':_0x4f288f});if(_0xc8494f['resolvedBy']=null,_0xc8494f['resolvedAt']=null,_0x1005b1||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x215648=this['context']['plugins']['get']('PendingActions'),_0x5a9694=_0x215648['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x1cb3de,'threadId':_0x4f288f})['then'](()=>_0x215648['remove'](_0x5a9694))['catch'](_0x5d9666=>{throw console['error'](_0x5d9666),new _0x470dce('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x15548e,isFromAdapter:_0x5438c7}){const _0x25f48d=this['getCommentThread'](_0x15548e);if(!_0x25f48d)throw new _0x470dce('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x15548e),this['_threads']['delete'](_0x15548e),!_0x25f48d['isSubmitted']||_0x5438c7||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x2e1d1a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4281c5}=_0x25f48d,_0x4dcfaf=_0x2e1d1a['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x4281c5,'threadId':_0x15548e})['then'](()=>_0x2e1d1a['remove'](_0x4dcfaf))['catch'](_0x335b8e=>{throw console['error'](_0x335b8e),new _0x470dce('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x28176f,unlinkedAt:_0x375971,context:_0x45cf1d,attributes:_0x318aa2,isFromAdapter:_0x2edd43}){if('string'!=typeof _0x28176f)throw new _0x470dce('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x28176f});if(!this['hasCommentThread'](_0x28176f))throw new _0x470dce('commentsrepository-missing-comment-thread',null,{'threadId':_0x28176f});const _0x242e3d=this['getCommentThread'](_0x28176f);let _0xad1948=!0x1;if(void 0x0!==_0x45cf1d&&_0x242e3d['context']!==_0x45cf1d&&(_0x242e3d['context']=_0x45cf1d,_0xad1948=!0x0),void 0x0!==_0x375971&&_0x242e3d['unlinkedAt']!==_0x375971&&(_0x242e3d['unlinkedAt']=_0x375971,_0xad1948=!0x0),_0x318aa2&&!_0x1e3430(_0x318aa2,_0x242e3d['attributes'])&&(_0x242e3d['attributes']=_0x318aa2,_0xad1948=!0x0),!_0xad1948)return Promise['resolve']();if(!_0x242e3d['isSubmitted']||_0x2edd43||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x23ca4a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3df9fe}=_0x242e3d,_0xf93f18=_0x23ca4a['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x3df9fe,'threadId':_0x28176f,'context':_0x45cf1d,'unlinkedAt':_0x375971,'attributes':_0x318aa2})['then'](()=>_0x23ca4a['remove'](_0xf93f18))['catch'](_0x52b3f5=>{throw console['error'](_0x52b3f5),new _0x470dce('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x390a01){const _0x233965=this['context']['plugins']['get'](ti),_0x3a8863=this['getCommentThread'](_0x390a01);if(_0x3a8863['_isAttached']=!0x1,this['_threadToController']['has'](_0x3a8863)){const _0x12d2f9=this['_threadToController']['get'](_0x3a8863),_0x7fe165=_0x12d2f9['view'],_0x34c665=_0x233965['getByInnerView'](_0x7fe165);this['_threadToController']['delete'](_0x3a8863),this['_viewToController']['delete'](_0x7fe165),_0x34c665&&_0x233965['remove'](_0x34c665),_0x12d2f9['destroy'](),_0x7fe165['destroy']()['then'](()=>{this['_unbindEditors'](_0x7fe165);});}}['_updateActiveAnnotation']({threadId:_0x26ec74,resolvedAt:_0x1f4ba3,unlinkedAt:_0x2434e7}){const _0x39e1e5=!!_0x1f4ba3,_0x38fa08=this['context']['plugins']['get'](ti),_0x43e43d=this['getCommentThread'](_0x26ec74);if(this['_threadToController']['has'](_0x43e43d)){const _0x24c076=this['_threadToController']['get'](_0x43e43d)['view'],_0x2cd424=_0x38fa08['getByInnerView'](_0x24c076);_0x2cd424&&(_0x39e1e5&&_0x38fa08['_removeActiveAnnotation'](_0x2cd424),_0x2434e7?_0x2cd424['isVisible']=!0x1:_0x2cd424['refreshVisibility']());}}['_getExternalAuthor'](_0x4824ee){const _0x358479=this['context']['plugins']['get'](_0x5ce26d),_0x28c2e4=_0x2c8944('external:'+_0x4824ee),_0x14629b=_0x358479['getUser'](_0x28c2e4);return _0x14629b||_0x358479['addUser']({'id':_0x28c2e4,'name':_0x4824ee});}['_createNewComment']({threadId:_0x9664dd,commentId:_0x83b045=_0x55dcd3(),content:_0x3dc204,authorId:_0x104c11,createdAt:_0x4c1b86,attributes:_0x47ef03}){if('string'!=typeof _0x83b045)throw new _0x470dce('commentsrepository-invalid-commentid');if('string'!=typeof _0x104c11)throw new _0x470dce('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x3dc204||!_0x3dc204['trim']())throw new _0x470dce('commentsrepository-invalid-comment-content');const _0x204514=this['context']['plugins']['get'](_0x5ce26d)['getUser'](_0x104c11);if(!_0x204514)throw new _0x470dce('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x104c11});let _0x4af06a=null,_0xb96d8=_0x4c1b86;return _0x47ef03?.['@external']&&(_0x4af06a=this['_getExternalAuthor'](_0x47ef03['@external']['authorName']),_0xb96d8=new Date(_0x47ef03['@external']['createdAt'])),new hi(this,{'threadId':_0x9664dd,'id':_0x83b045,'author':_0x4af06a||_0x204514,'creator':_0x204514,'content':_0x3dc204,'createdAt':_0x4c1b86,'authoredAt':_0xb96d8,'attributes':_0x47ef03});}['_addComment'](_0x43c15b){let {threadId:_0x3fac0c,content:_0x175049,attributes:_0xd0a1ec,isFromAdapter:_0x28d697}=_0x43c15b;const _0x48e2f4=this['getCommentThread'](_0x43c15b['threadId']);if(!_0x48e2f4)throw new _0x470dce('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x542363=this['_createNewComment'](_0x43c15b),{id:_0xa4a8ef}=_0x542363;if(_0x48e2f4['_add'](_0x542363),_0x28d697||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x48e2f4['isSubmitted'])return Promise['resolve']();const _0x41e0ae=this['context']['plugins']['get']('PendingActions'),{channelId:_0x293f6f}=_0x48e2f4,_0x139430=_0x41e0ae['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0xd0a1ec||(_0xd0a1ec={}),this['adapter']['addComment']({'channelId':_0x293f6f,'threadId':_0x3fac0c,'commentId':_0xa4a8ef,'content':_0x175049,'attributes':_0xd0a1ec})['then'](_0x24d992=>{_0x41e0ae['remove'](_0x139430),_0x24d992&&this['_updateComment']({'channelId':_0x293f6f,'threadId':_0x3fac0c,'commentId':_0xa4a8ef,'createdAt':_0x24d992['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x5e20ac=>{throw console['error'](_0x5e20ac),new _0x470dce('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x376696,commentId:_0x118342,content:_0x5325eb,createdAt:_0x9905eb,attributes:_0x219d5f,isFromAdapter:_0xbc0857}){if(void 0x0!==_0x5325eb&&('string'!=typeof _0x5325eb||!_0x5325eb['trim']()['length']))throw new _0x470dce('commentsrepository-update-comment-invalid-content');const _0x203928=this['getCommentThread'](_0x376696),_0x59e13f=_0x203928['getComment'](_0x118342);if(!_0x59e13f)throw new _0x470dce('commentsrepository-update-missing-comment',this);let _0x2dc83a=!0x1;if(_0x5325eb&&_0x5325eb!==_0x59e13f['content']&&(_0x59e13f['isEditable']||_0xbc0857)&&(_0x59e13f['content']=_0x5325eb,_0x2dc83a=!0x0),_0x9905eb&&_0x9905eb!==_0x59e13f['createdAt']&&(_0x59e13f['createdAt']=_0x9905eb,_0x59e13f['isExternal']||(_0x59e13f['authoredAt']=_0x9905eb),_0x2dc83a=!0x0),_0x219d5f&&!_0x1e3430(_0x219d5f,_0x59e13f['attributes'])&&(_0x59e13f['attributes']=_0x219d5f,_0x2dc83a=!0x0),!_0x2dc83a)return Promise['resolve']();if(_0x203928['fire']('commentUpdated'),_0xbc0857||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x446bf1=this['context']['plugins']['get']('PendingActions'),{channelId:_0x47002e}=this['getCommentThread'](_0x59e13f['threadId']),_0x1dde8a=_0x446bf1['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x47002e,'threadId':_0x376696,'commentId':_0x118342,'content':_0x5325eb,'attributes':_0x219d5f})['then'](()=>_0x446bf1['remove'](_0x1dde8a))['catch'](_0x9a5c62=>{throw console['error'](_0x9a5c62),new _0x470dce('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x5e1cf8,commentId:_0x369683,isFromAdapter:_0x3af399}){const _0x33c9be=this['getCommentThread'](_0x5e1cf8),_0xe23759=_0x33c9be['getComment'](_0x369683);if(!_0xe23759)throw new _0x470dce('commentsrepository-remove-missing-comment',this);if(_0x33c9be['_remove'](_0xe23759),_0x3af399||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x368b17=this['context']['plugins']['get']('PendingActions'),{channelId:_0x410dd7}=_0x33c9be,_0x10ee4b=_0x368b17['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x410dd7,'threadId':_0x5e1cf8,'commentId':_0x369683})['then'](()=>_0x368b17['remove'](_0x10ee4b))['catch'](_0x3d6d18=>{throw console['error'](_0x3d6d18),new _0x470dce('commentsrepository-remove-comment-internal-error',this);});}},ri=class extends si{['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x8202e,_0xa83955){super();const _0x28dff0=_0xa83955['isResolvable'];this['channelId']=_0xa83955['channelId'],this['id']=_0xa83955['id'],this['comments']=new _0x268cc3(),this['_repository']=_0x8202e,this['_isAttached']=!0x1,this['_isSubmitted']=_0xa83955['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x8202e,'_permissions',_0x8202e,'_readOnlyChannels',()=>_0x8202e['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x8202e,'_permissions',()=>_0x8202e['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x8202e,'_permissions',()=>{const _0xb5e297=_0x8202e['getPermissions'](this['channelId']);return _0xb5e297['write']||_0xb5e297['admin'];}),this['bind']('isResolvable')['to'](_0x8202e,'_permissions',()=>_0x28dff0&&_0x8202e['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0xa83955['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x3d5b37,_0x1e8a0e)=>_0x3d5b37?_0x1e8a0e?_0x3d5b37<_0x1e8a0e?_0x3d5b37:_0x1e8a0e:_0x3d5b37:_0x1e8a0e),this['set']('unlinkedAt',_0xa83955['unlinkedAt']||null),this['set']('resolvedAt',_0xa83955['resolvedAt']||null),this['set']('resolvedBy',_0xa83955['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x353a27=>!!_0x353a27),this['set']('attributes',_0xa83955['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x50da96,_0x30ce84)=>_0x50da96+_0x30ce84['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0xb5b808,id:_0xea6f3c}=this;this['_repository']['fire'](ai('submitCommentThread',_0xb5b808),{'channelId':_0xb5b808,'threadId':_0xea6f3c});}['setUnlinkedAt'](_0x166ce9){this['_update']({'unlinkedAt':_0x166ce9});}['resolve']({resolvedAt:_0x30d60d=new Date(),resolvedBy:_0x17f441='',isFromAdapter:_0x1f0270=!0x1}={}){const _0x41a6d4=this['_repository']['context']['plugins']['get'](_0x5ce26d)['me'],{channelId:_0x5347eb,id:_0x4d9c65}=this;this['_repository']['fire'](ai('resolveCommentThread',_0x5347eb),{'channelId':_0x5347eb,'threadId':_0x4d9c65,'resolvedAt':_0x30d60d,'resolvedBy':_0x17f441||_0x41a6d4['id'],'isFromAdapter':_0x1f0270});}['reopen']({isFromAdapter:_0x15c37b=!0x1}={}){const {channelId:_0x1fc2d6,id:_0x4df0a1}=this;this['_repository']['fire'](ai('reopenCommentThread',_0x1fc2d6),{'channelId':_0x1fc2d6,'threadId':_0x4df0a1,'isFromAdapter':_0x15c37b});}['setContext'](_0xf7e93c){this['context']||this['_update']({'context':_0xf7e93c});}['setAttribute'](_0x20e2f8,_0x3e27e7){const _0x4c20f4=_0x459977(this['attributes']);_0x47996a(_0x4c20f4,_0x20e2f8,_0x3e27e7),this['_update']({'attributes':_0x4c20f4});}['removeAttribute'](_0x5cf3ff){const _0x1f34d1=_0x459977(this['attributes']);_0x4b61a1(_0x1f34d1,_0x5cf3ff),this['_update']({'attributes':_0x1f34d1});}['remove']({isFromAdapter:_0x23cd23=!0x1}={}){const {channelId:_0x2e3764,id:_0x5b4f2e}=this;this['_repository']['fire'](ai('removeCommentThread',_0x2e3764),{'channelId':_0x2e3764,'threadId':_0x5b4f2e,'isFromAdapter':_0x23cd23});}['attachTo'](_0x4f7ca7){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x4f7ca7});}['addComment'](_0x3be307){const {channelId:_0x2c990a,id:_0x438ebb}=this;this['_repository']['fire'](ai('addComment',_0x2c990a,_0x438ebb),Object['assign']({'channelId':_0x2c990a,'threadId':_0x438ebb},_0x3be307));}['getComment'](_0x44a105){if('string'!=typeof _0x44a105)throw new _0x470dce('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x44a105});return this['comments']['get'](_0x44a105);}['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'](_0x55fbbf=>_0x55fbbf['toJSON']()),'attributes':this['attributes']};}['_add'](_0x5f02e8){return this['listenTo'](_0x5f02e8,'change:authoredAt',()=>{const _0x3073b5=this['_findOptimalIndex'](_0x5f02e8),_0x6ed17f=this['comments'];_0x3073b5-0x1!=_0x6ed17f['getIndex'](_0x5f02e8)&&_0x3073b5+0x1!=_0x6ed17f['getIndex'](_0x5f02e8)&&(this['_remove'](_0x5f02e8),this['_add'](_0x5f02e8));}),this['comments']['add'](_0x5f02e8,this['_findOptimalIndex'](_0x5f02e8));}['_update'](_0x5f5d92){const {channelId:_0x2ad9b7,id:_0x452f85}=this;this['_repository']['fire'](ai('updateCommentThread',_0x2ad9b7),{..._0x5f5d92,'channelId':_0x2ad9b7,'threadId':_0x452f85});}['_remove'](_0x217709){return this['stopListening'](_0x217709),_0x217709['destroy'](),this['comments']['remove'](_0x217709);}['_findOptimalIndex'](_0x301e59){const _0x51f9d8=this['comments']['find'](_0xb77a6e=>new Date(_0xb77a6e['authoredAt'])['getTime']()>new Date(_0x301e59['authoredAt'])['getTime']());return _0x51f9d8?this['comments']['getIndex'](_0x51f9d8):this['length'];}},hi=class extends ni{['id'];['threadId'];['author'];['creator'];['createdAt'];['_repository'];constructor(_0x5ab1f7,_0x5d5405){super();const _0xbcfa89=_0x5ab1f7['context']['plugins']['get'](_0x5ce26d)['me'],_0x5613e2=_0x5ab1f7['getCommentThread'](_0x5d5405['threadId']),_0xd1c707=0x0===_0x5613e2['comments']['length'],_0x8656a9=_0xbcfa89===_0x5d5405['author'];this['id']=_0x5d5405['id'],this['threadId']=_0x5d5405['threadId'],this['author']=_0x5d5405['author'],this['creator']=_0x5d5405['creator'],this['set']('content',_0x5d5405['content']),this['createdAt']=_0x5d5405['createdAt']||new Date(),this['set']('authoredAt',_0x5d5405['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x5613e2,'resolvedAt'),this['set']('attributes',_0x5d5405['attributes']||{}),this['bind']('isEditable')['to'](_0x5ab1f7,'_permissions',()=>{const _0x28b93c=_0x5ab1f7['getPermissions'](_0x5613e2['channelId'])['write'],_0x1a0176=_0x5ab1f7['getPermissions'](_0x5613e2['channelId'])['modifyAll'];return _0x8656a9&&_0x28b93c||!_0x8656a9&&_0x1a0176;}),this['bind']('isRemovable')['to'](_0x5613e2,'isRemovable',_0x5ab1f7,'_permissions',_0x51d64e=>{const _0x1f784d=_0x5ab1f7['getPermissions'](_0x5613e2['channelId'])['write'],_0x504c32=_0x5ab1f7['getPermissions'](_0x5613e2['channelId'])['modifyAll'];return _0x8656a9&&_0x1f784d||_0x51d64e&&_0xd1c707||!_0x8656a9&&_0x504c32&&!_0xd1c707;}),this['bind']('isReadOnly')['to'](_0x5613e2,'isReadOnly'),this['_repository']=_0x5ab1f7;}get['isExternal'](){return Boolean(this['attributes']&&this['attributes']['@external']);}get['weight'](){return Math['max'](function(_0x1afb3f){const _0xd2be50=document['createElement']('div');return _0xd2be50['innerHTML']=_0x1afb3f,_0xd2be50['textContent']['length'];}(this['content']),0xc8);}['update'](_0x1ea552){const {threadId:_0x3a4abc,id:_0x1a1a39}=this;if(!this['_repository']['hasCommentThread'](_0x3a4abc))throw new _0x470dce('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x3c0766}=this['_repository']['getCommentThread'](_0x3a4abc);this['_repository']['fire'](ai('updateComment',_0x3c0766,_0x3a4abc),{'channelId':_0x3c0766,'threadId':_0x3a4abc,'commentId':_0x1a1a39,..._0x1ea552});}['setAttribute'](_0x241f1d,_0x352f13){const _0x4ef6c5=_0x459977(this['attributes']);_0x47996a(_0x4ef6c5,_0x241f1d,_0x352f13),this['update']({'attributes':_0x4ef6c5});}['removeAttribute'](_0x56fed6){const _0x2d42e5=_0x459977(this['attributes']);_0x4b61a1(_0x2d42e5,_0x56fed6),this['update']({'attributes':_0x2d42e5});}['remove'](_0x34950d={}){if(!_0x34950d['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x57ee8c,id:_0xe0e151}=this;if(!this['_repository']['hasCommentThread'](_0x57ee8c))throw new _0x470dce('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0xe7fb10}=this['_repository']['getCommentThread'](_0x57ee8c);this['_repository']['fire'](ai('removeComment',_0xe7fb10,_0x57ee8c),{'channelId':_0xe7fb10,'threadId':_0x57ee8c,'commentId':_0xe0e151,..._0x34950d});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}};function ai(_0x83347c,..._0x40e639){for(const _0x2c24da of _0x40e639)void 0x0!==_0x2c24da&&(_0x83347c+=':'+String(_0x2c24da));return _0x83347c;}var ci=class extends _0x43a272{constructor(_0x35221a){super(_0x35221a),this['set']('hasContent',!0x1);}['refresh'](){const _0x22b301=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x1f59d5 of _0x22b301['getRanges']())if(this['_hasContent'](_0x1f59d5))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x450526=_0x55dcd3(),ranges:_0x48292f,comment:_0x42e153}={}){const _0x418060=this['editor']['model'],_0x46b8ae=_0x48292f??Array['from'](_0x418060['document']['selection']['getRanges']()),_0x43d1ad=[];for(const _0x48116f of _0x46b8ae)this['_hasContent'](_0x48116f)&&_0x43d1ad['push'](this['_trimToContent'](_0x48116f));if(!_0x43d1ad['length'])throw new _0x470dce('addcommentthreadcommand-incorrect-ranges',null);_0x42e153&&this['_createCommentThread'](_0x450526,_0x42e153),this['_createMarkersFromRanges'](_0x450526,_0x43d1ad,!!_0x42e153);}['_createMarkersFromRanges'](_0x18f894,_0x293516,_0x447de8){this['editor']['model']['change'](_0x46e5d3=>{for(const _0x4096c9 of _0x293516){const _0x16ecb4='comment:'+_0x18f894+':'+_0x55dcd3()['substr'](0x1,0x5);_0x46e5d3['addMarker'](_0x16ecb4,{'range':_0x4096c9,'usingOperation':_0x447de8,'affectsData':_0x447de8});}});}['_createCommentThread'](_0x2a4afb,_0xe41d32){const _0x141d05=this['editor']['plugins']['get']('CommentsRepository'),_0x3e7bdb=this['editor']['config']['get']('collaboration.channelId'),_0x5c3e5a=this['editor']['plugins']['get']('Users')['me'];if(!_0x5c3e5a)throw new _0x470dce('addcommentthreadcommand-user-not-found',null);_0x141d05['addCommentThread']({'threadId':_0x2a4afb,'channelId':_0x3e7bdb,'comments':[{'authorId':_0x5c3e5a['id'],'content':_0xe41d32,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0xbf12de){for(const _0x17c653 of _0xbf12de['getItems']())if(this['_itemIsContent'](_0x17c653))return!0x0;return!0x1;}['_itemIsContent'](_0x139c32){return _0x139c32['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x139c32)&&!_0x139c32['is']('element','tableCell');}['_trimToContent'](_0x5da1e9){const _0x56a7d1=_0x572fdc=>!this['_itemIsContent'](_0x572fdc['item']),_0x14f410=_0x5da1e9['start']['getLastMatchingPosition'](_0x56a7d1),_0x55d477=_0x5da1e9['end']['getLastMatchingPosition'](_0x56a7d1,{'direction':'backward'});return this['editor']['model']['createRange'](_0x14f410,_0x55d477);}},di=class extends _0x4ce8d6{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[ti];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3ee088){super(_0x3ee088),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x37f5d0=this['editor'],_0xdc4a08=_0x37f5d0['model']['document']['selection'],_0x458cc7=_0x38960e(()=>this['refreshSelectedViews'](),0xa);_0xdc4a08['on']('change:range',(_0xce9911,_0x22dd28)=>{_0x22dd28['directChange']&&(_0x458cc7['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x37f5d0['editing']['view']['document'],'change:isFocused',(_0x2fb202,_0x1ec9ba,_0xf7d4d6)=>{_0xf7d4d6&&_0x458cc7();}),this['listenTo'](_0x37f5d0['ui']['focusTracker'],'change:isFocused',(_0x46f8a4,_0x5639d6,_0xd3bcb5)=>{_0xd3bcb5||this['fire']('blur',{'isAnnotationTracked':_0x4cf51f=>this['_editorAnnotationsData']['has'](_0x4cf51f['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x5ea5e4){if(this['_editorAnnotations']['has'](_0x5ea5e4['view']))return;this['_editorAnnotations']['add'](_0x5ea5e4['view']),this['editor']['ui']['focusTracker']['add'](_0x5ea5e4['view']['element']);const _0x6de503=this['editor']['plugins']['get'](ti);this['listenTo'](_0x6de503['collection'],'remove',(_0x12a845,_0x455229)=>{this['editor']['ui']['focusTracker']['remove'](_0x455229['view']['element']),this['_editorAnnotations']['delete'](_0x455229['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x4ad8bd){if('function'!=typeof _0x4ad8bd)throw new _0x470dce('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x4ad8bd);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x2e851d,annotations:_0x87667a}){const _0x1833bf=[],_0x4f04d6=this['editor']['model']['document']['selection'],_0x12a922=Array['from'](_0x4f04d6['getRanges']());for(const [_0x1b73db,_0x2bf119]of this['_editorAnnotationsData']){const _0xa5921d=_0x2074ef(_0x2bf119),_0x599071=_0x87667a['getByInnerView'](_0x1b73db);_0xa5921d&&_0x599071&&_0x1833bf['push']({'annotation':_0x599071,'range':_0xa5921d});}function _0x2074ef(_0x514928){for(const _0x2dcb6e of _0x514928)for(const _0x49edc8 of _0x12a922)if(_0x2dcb6e['containsRange'](_0x49edc8,!_0x4f04d6['isCollapsed']))return _0x2dcb6e;return null;}return _0x1833bf['sort']((_0x4056bb,_0x5d76e4)=>{const _0x270def=_0x4056bb['range'],_0x4cf0b7=_0x5d76e4['range'];if(!_0x270def['isEqual'](_0x4cf0b7)){if(_0x270def['containsRange'](_0x4cf0b7,!0x0))return 0x1;if(_0x4cf0b7['containsRange'](_0x270def,!0x0))return-0x1;}return _0x4056bb['annotation']==_0x2e851d?-0x1:_0x5d76e4['annotation']==_0x2e851d?0x1:0x0;})['map'](_0x3e69c3=>_0x3e69c3['annotation']);}get['_editorAnnotationsData'](){const _0x1e6bce=new Map();for(const _0x37a28b of Array['from'](this['_dataCollectors']))for(const [_0x2908fe,_0x553097]of _0x37a28b())_0x1e6bce['set'](_0x2908fe,_0x553097);return _0x1e6bce;}},li=class extends _0x4ce8d6{['afterInit'](){const _0x29b145=this['editor'];_0x29b145['plugins']['has']('RestrictedEditingModeEditing')&&_0x29b145['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},mi=class extends _0x4ce8d6{constructor(_0x3301af){super(_0x3301af),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x2728ef=this['editor'],_0x4551f2=_0x2728ef['commands']['get']('importWord'),_0x58bcdc=_0x2728ef['plugins']['get'](_0x5ce26d);_0x4551f2&&(_0x4551f2['on']('execute',(_0x1fa69a,[,_0x51adf6])=>{_0x51adf6['collaboration_features']={'comments':!0x0,'user_id':_0x58bcdc['me']['id']};},{'priority':_0x13b546['high']+0xa}),this['listenTo'](_0x4551f2,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x292c71,_0x318ac2){const {comment_threads:_0x1355b5}=_0x318ac2;_0x1355b5&&_0x1355b5['forEach'](({thread_id:_0x346430,comments:_0x18d519,is_resolved:_0x38093f})=>{const _0x2d0788=new Date(),_0x4be655=_0x18d519['map'](({author:_0x43bbed,content:_0x24ae4c,created_at:_0x4042b1})=>({'content':_0x24ae4c,'authorId':this['editor']['plugins']['get'](_0x5ce26d)['me']['id'],'createdAt':_0x2d0788,'attributes':{'@external':{'authorName':_0x43bbed,'createdAt':_0x4042b1?new Date(_0x4042b1):new Date(),'source':'importWord'}}})),_0x3b93b9=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](oi)['addCommentThread']({'channelId':_0x3b93b9,'threadId':_0x346430,'comments':_0x4be655,'resolvedAt':_0x38093f?_0x2d0788:null});});}},ui=class extends _0x4ce8d6{constructor(_0x562a82){super(_0x562a82),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0x1b6eb5=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x1b6eb5,'contentInsertion',(_0x23dabe,_0x297cf8)=>this['_removeMarkersWithoutThreads'](_0x297cf8['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x4d93cf){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x4d93cf;const _0x430d72=this['editor']['plugins']['get']('CommentsRepository');for(const _0x551463 of _0x4d93cf['keys']()){const [_0x37fc6d,_0x222dd7]=_0x551463['split'](':');'comment'!=_0x37fc6d||_0x430d72['hasCommentThread'](_0x222dd7)||_0x4d93cf['delete'](_0x551463);}return _0x4d93cf;}['_registerMarkerInClipboardPipeline'](){const _0x126964=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x28a67f=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x28a67f&&_0x126964['_registerMarkerToCopy']('comment',_0x28a67f);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x411f47){switch(_0x411f47){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function fi(_0x28124b){const _0x416351=_0x28124b['split'](':');return{'group':_0x416351[0x0],'id':_0x416351[0x1],'part':_0x416351[0x2]};}var pi=class extends _0x4ce8d6{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x2a3492,_0xfc5d8)=>{if(!_0xfc5d8['options']['showCommentHighlights'])return null;if(_0xfc5d8['options']['ignoreResolvedComments']){const {id:_0x5851d2}=fi(_0x2a3492['markerName']);if(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x5851d2)?.['isResolved']&&_0x2a3492['item'])return _0xfc5d8['consumable']['consume'](_0x2a3492['item'],'addMarker:'+_0x2a3492['markerName']),_0xfc5d8['consumable']['consume'](_0x2a3492['item'],'removeMarker:'+_0x2a3492['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x11aef4=>{_0x11aef4['on']('addMarker:comment',(_0x32acf2,_0x2ac558,_0x33d4cb)=>{if(!_0x33d4cb['options']['showCommentHighlights'])return;const _0x2c360c=_0x2ac558['item'];if(!_0x2c360c)return;const _0x5a3463=_0x33d4cb['mapper']['toViewElement'](_0x2c360c);this['editor']['model']['schema']['isObject'](_0x2c360c)&&_0x5a3463&&!_0x5a3463['getCustomProperty']('widget')&&_0x5a3463['is']('containerElement')&&Ct(_0x5a3463,_0x33d4cb['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x17b512,{writer:_0x1745d7,options:_0x590c78})=>{if(!_0x590c78['showCommentHighlights'])return null;const _0x45cf57=_0x1745d7['createContainerElement']('div'),_0x220799=_0x1745d7['createEmptyElement']('hr');return _0x1745d7['addClass']('ck-horizontal-line',_0x45cf57),_0x1745d7['insert'](_0x1745d7['createPositionAt'](_0x45cf57,0x0),_0x220799),_0x45cf57;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x4c9ffe,{writer:_0x388c2c,options:_0xd5bb97})=>{if(!_0xd5bb97['showCommentHighlights'])return null;const _0x5192b3=_0x388c2c['createContainerElement']('span'),_0x2d4ef4=_0x388c2c['createEmptyElement']('img');return _0x388c2c['addClass']('image-inline',_0x5192b3),_0x388c2c['insert'](_0x388c2c['createPositionAt'](_0x5192b3,0x0),_0x2d4ef4),_0x5192b3;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x2156f8,{writer:_0xfd815a,options:_0x363423})=>{if(_0x363423['showCommentHighlights'])return _0xfd815a['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x4e7882,_0x18b07c,_0x55d2a0)=>{_0x55d2a0['options']['showCommentHighlights']&&_0x4e7882['stop']();},{'priority':'high'});}},wi=class extends _0x4ce8d6{static get['requires'](){return[oi,di,_0x5ce26d,li,mi,ui,pi];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x467fa3){super(_0x467fa3),this['set']('isThreadsLoadingPaused',!0x0),_0x467fa3['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x500adb,_0x359313,_0x2505cb,_0x30127a)=>{const _0x42b98b=_0x467fa3['plugins']['get'](oi),_0x509fc2=_0x2505cb?fi(_0x2505cb)['id']:null;_0x467fa3['model']['change'](()=>{if(_0x509fc2){const _0x322243=this['getAllMarkersForId'](_0x509fc2);for(const _0x3e5afa of _0x322243)_0x467fa3['editing']['reconvertMarker'](_0x3e5afa);}if(_0x30127a){const {id:_0x563ae5}=fi(_0x30127a),_0x4ff6ad=_0x42b98b['getCommentThread'](_0x563ae5);if(_0x4ff6ad&&_0x4ff6ad['unlinkedAt'])return;if(_0x4ff6ad&&!_0x4ff6ad['isAttached'])return;const _0x5219ec=this['getAllMarkersForId'](_0x563ae5);for(const _0xd1d17f of _0x5219ec)_0x467fa3['editing']['reconvertMarker'](_0xd1d17f);}}),_0x509fc2&&this['scrollToThreadMarker'](_0x509fc2);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x36fafb=this['editor'],_0x1549c2=_0x36fafb['plugins']['get'](oi),_0x10aaff=_0x36fafb['config']['get']('collaboration.channelId'),_0x5ecfbc=_0x1549c2['getCommentThreads']()['filter'](_0x3e5998=>_0x3e5998['channelId']!==_0x10aaff);_0x36fafb['commands']['add']('addCommentThread',new ci(_0x36fafb)),this['listenTo'](_0x36fafb,'change:isReadOnly',(_0x173f1f,_0x1bf9e0,_0x2102b7)=>{_0x1549c2['switchReadOnly'](_0x2102b7,_0x36fafb['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x1549c2,gi('addCommentThread',_0x10aaff),(_0x4f2893,{threadId:_0x2bd280})=>{this['editor']['plugins']['get'](oi)['getCommentThread'](_0x2bd280)?.['unlinkedAt']&&this['_attachArchivedThread'](_0x2bd280);}),this['listenTo'](_0x1549c2,gi('removeCommentThread',_0x10aaff),(_0x10bf55,{threadId:_0x28c8fd})=>{_0x36fafb['model']['enqueueChange']({'isUndoable':!0x1},_0x891836=>{const _0x3b3b75=this['getAllMarkersForId'](_0x28c8fd);for(const _0x345162 of _0x3b3b75)_0x891836['removeMarker'](_0x345162);});}),this['listenTo'](_0x1549c2,gi('resolveCommentThread',_0x10aaff),(_0x2c19a0,{threadId:_0x5381a9})=>{this['_reconvertMarkers'](_0x5381a9);const _0x4a0fb3=this['editor']['plugins']['get'](ti);(this['editor']['editing']['view']['hasDomSelection']||_0x4a0fb3['collection']['isFocused'])&&(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x5381a9)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x1549c2,gi('reopenCommentThread',_0x10aaff),(_0x166200,{threadId:_0x28e2b9})=>{this['_reconvertMarkers'](_0x28e2b9);},{'priority':'low'}),this['listenTo'](_0x1549c2,gi('addComment',_0x10aaff),(_0xc033c9,{threadId:_0x5a3917,isFromAdapter:_0x518f80})=>{const _0x3243d3=this['getAllMarkersForId'](_0x5a3917);!_0x518f80&&0x0!=_0x3243d3['length']&&_0x1549c2['hasCommentThread'](_0x5a3917)&&0x1===_0x1549c2['getCommentThread'](_0x5a3917)['length']&&_0x36fafb['model']['enqueueChange']({'isUndoable':!0x1},_0x38b4c0=>{for(const _0x4cf213 of _0x3243d3)_0x38b4c0['updateMarker'](_0x4cf213,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x5ecfbc);}['afterInit'](){!async function(_0x336bfd){const _0x3d490b='KpOBJGNSEgqCyfVF1kZ8lbnRjM7eIzAsDQHw9aThu6rcYi05UmPL4d3X2Wotvx',_0x126947=0x78fc0,_0x2ee743=window['Date']['now'](),_0x344371=_0x336bfd['editor'],_0x13cb69=new window['Promise'](_0x5536c7=>{_0x344371['once']('ready',_0x5536c7);}),_0x2ea43d={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0xfa21ef=_0x344371['config']['get']('licenseKey');async function _0x47b2c1(){let _0x12dd33,_0x3dca9c=null,_0x1c94da=null;try{return'GPL'==_0xfa21ef?'NotAllowed':(_0x12dd33=_0x2772e5(),_0x12dd33?(_0x12dd33['usageEndpoint']&&(_0x1c94da=_0x39c741(_0x12dd33['usageEndpoint'],_0x12dd33['jti'])),await _0x422785()?_0x728dbe()?_0x5efdc2()?'Expired':_0x124356()?('evaluation'==_0x12dd33['licenseType']&&(_0x3dca9c=_0x299c91('EvaluationLimit')),await _0x431025()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x5efdc2(){const _0x3548ed=['evaluation','trial']['includes'](_0x12dd33['licenseType'])?_0x2ee743/0x3e8:0xe10*_0x126947;return _0x12dd33['exp']<_0x3548ed;}function _0x728dbe(){const _0x2f2157=_0x12dd33['features'];if(!_0x2f2157)return!0x1;if(_0x2f2157['includes']('*'))return!0x0;if(_0x2f2157['includes']('CMT'))return!0x0;if(_0x2f2157['includes']('TRILIUM')&&_0x18e68c())return!0x0;if(_0x2f2157['includes']('RCMT')){if(_0x557bd5())return!0x0;if(_0x9cfde6()||_0x2a7051())return!0x0;}return!0x1;}function _0x124356(){const _0x2f1ec4=_0x12dd33['licensedHosts'];if(!_0x2f1ec4||0x0==_0x2f1ec4['length'])return!0x0;const {hostname:_0x476cc4}=new URL(window['location']['href']);if(_0x2f1ec4['includes'](_0x476cc4))return!0x0;const _0x2a6553=_0x476cc4['split']('.');return _0x2f1ec4['filter'](_0x1dc659=>_0x1dc659['includes']('*'))['map'](_0x113de2=>_0x113de2['split']('.'))['filter'](_0x13e7e0=>_0x13e7e0['length']<=_0x2a6553['length'])['map'](_0x130359=>Array(_0x2a6553['length']-_0x130359['length'])['fill']('*'===_0x130359[0x0]?'*':'')['concat'](_0x130359))['some'](_0x21a338=>_0x2a6553['every']((_0x1a6405,_0x46187c)=>_0x21a338[_0x46187c]===_0x1a6405||'*'===_0x21a338[_0x46187c]));}function _0x431025(){return _0x3dca9c&&_0x1c94da?new window['Promise']((_0x30ee31,_0x399b37)=>{_0x3dca9c['then'](_0x30ee31,_0x399b37),_0x1c94da['then'](_0x125942=>{'Valid'!=_0x125942&&_0x30ee31(_0x125942);},_0x399b37);}):_0x3dca9c||_0x1c94da||'Valid';}}function _0x39c741(_0x1d93c9,_0x4da99e){return new window['Promise'](_0x38f47b=>{if(_0x752cdd())return _0x38f47b('Valid');_0x47a196(),_0x344371['decorate']('_sendUsageRequest');let _0x1c268e=!0x1;const _0x5e74f3=_0x55dcd3();function _0x410cf3(_0x5827f3){return!!_0x5827f3&&('object'==typeof _0x5827f3||'function'==typeof _0x5827f3)&&'function'==typeof _0x5827f3['then']&&'function'==typeof _0x5827f3['catch'];}function _0x307ca0(_0x31cefd){_0x5ba18a(_0x31cefd)['then'](_0x31f15c=>_0x31f15c&&'ok'==_0x31f15c['status']?_0x142153(_0xde61fd(_0x5e74f3+_0x4da99e))!=_0x31f15c['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x292dae=>(_0x238846(),_0x292dae),()=>{const _0x1c8e9d=_0x57fa28();return null==_0x1c8e9d?(_0x238846(),'Valid'):_0x2ee743-_0x1c8e9d>0x240c8400?'UsageLimit':'Valid';})['then'](_0x38f47b)['catch'](()=>{_0x38f47b('UsageLimit');});const _0x4fdcfa=0x36ee80;function _0x238846(){const _0x463764='llct-'+_0x142153(_0xde61fd(_0x1d93c9)),_0x50e51f=_0x34abee(_0x142153(window['Math']['ceil'](_0x2ee743/_0x4fdcfa)));window['localStorage']['setItem'](_0x463764,_0x50e51f);}function _0x57fa28(){const _0x3acec5='llct-'+_0x142153(_0xde61fd(_0x1d93c9)),_0x37ec3f=window['localStorage']['getItem'](_0x3acec5);return _0x37ec3f?window['parseInt'](_0x34abee(_0x37ec3f),0x10)*_0x4fdcfa:null;}function _0x5ba18a(_0xb7ca13){return new window['Promise']((_0x4ab29e,_0x385837)=>{_0xb7ca13['then'](_0x4ab29e,_0x385837),window['setTimeout'](_0x385837,0x1d4c0);});}}_0x344371['on']('_sendUsageRequest',(_0x4313ba,_0x32ad6e)=>{if(_0x32ad6e[0x0]!=_0x1d93c9)return _0x38f47b('UsageLimit');_0x32ad6e[0x1]={..._0x32ad6e[0x1],'requestId':_0x5e74f3};},{'priority':'high'}),_0x344371['on']('_sendUsageRequest',_0x21a66e=>{_0x410cf3(_0x21a66e['return'])&&(_0x1c268e=!0x0,_0x307ca0(_0x21a66e['return']));},{'priority':'low'}),_0x13cb69['then'](()=>{_0x1c268e||_0x38f47b('UsageLimit');});});function _0x752cdd(){return'auto'==_0x344371['editing']['view']['_overlayModeHint'];}function _0x47a196(){_0x344371['editing']['view']['_overlayModeHint']='auto';}}function _0x299c91(_0x993f7f){const _0x1e3624=[new window['Promise'](_0x27e89e=>setTimeout(_0x27e89e,0x93ecc)),_0x13cb69['then'](()=>new window['Promise'](_0x3fd9c1=>{let _0x3e3f19=0x0;_0x344371['model']['on']('applyOperation',(_0x5e960d,_0x46949e)=>{_0x46949e[0x0]['isDocumentOperation']&&_0x3e3f19++,0x5e8==_0x3e3f19&&(_0x3fd9c1(),_0x5e960d['off']());});}))];return window['Promise']['race'](_0x1e3624)['then'](()=>_0x993f7f);}async function _0x3e7e83(){await _0x13cb69,_0x344371['model']['change']=_0x513746,_0x344371['model']['enqueueChange']=_0x513746,_0x344371['enableReadOnlyMode']('model');}function _0x18e68c(){return window['glob']&&window['glob']['triliumVersion'];}function _0x557bd5(){return _0x15a4ad('WebSocketGateway')&&'connected'==_0x5c876e('WebSocketGateway')['state'];}function _0x9cfde6(){return _0x15a4ad('RevisionViewerIntegration');}function _0x2a7051(){return _0x15a4ad('TrackChangesDataGetter');}function _0x2d32f0(_0x338747){const _0x36ee0b=_0x3fb323();_0x344371[_0x36ee0b]='commentsLicenseKey'+_0x338747,'Valid'!=_0x338747&&_0x3e7e83();}function _0x3fb323(){const _0x26f4c5=window['String'](window['performance']['now']())['replace']('.','');let _0x2227ec='K';for(let _0x43b382=0x0;_0x43b382<_0x26f4c5['length'];_0x43b382+=0x2){let _0x84e991=window['parseInt'](_0x26f4c5['substring'](_0x43b382,_0x43b382+0x2));_0x84e991>=0x3e&&(_0x84e991-=0x3e),_0x2227ec+=_0x3d490b[_0x84e991];}return _0x2227ec;}function _0x2772e5(){const _0x5d6812=_0xfa21ef['split']('.');if(0x3!=_0x5d6812['length'])return null;return _0x4066c6(_0x5d6812[0x1]);function _0x4066c6(_0x205e2a){const _0x1c4958=_0x1d102f(_0x205e2a);return _0x1c4958&&_0x2f3e29()?_0x1c4958:null;function _0x2f3e29(){const _0x2ecad5=_0x1c4958['jti'],_0x42dd9c=window['parseInt'](_0x2ecad5['substring'](_0x2ecad5['length']-0x8),0x10),_0x138bb8={..._0x1c4958,'jti':_0x2ecad5['substring'](0x0,_0x2ecad5['length']-0x8)};return delete _0x138bb8['vc'],_0xde61fd(_0x138bb8)==_0x42dd9c;}}}async function _0x422785(){let _0x564512=!0x0;try{const [_0x5d8de9,_0x176147,_0x1efb85]=_0xfa21ef['split']('.');return _0x5a87ac(_0x5d8de9),await _0x160c8f(_0x5d8de9,_0x176147,_0x1efb85),_0x564512;}catch{return!0x1;}function _0x5a87ac(_0x3eaf08){const _0x23def1=_0x1d102f(_0x3eaf08);_0x23def1&&'ES256'==_0x23def1['alg']||(_0x564512=!0x1);}async function _0x160c8f(_0x3f6411,_0x558d35,_0x282b8a){const _0x236eb4=window['Uint8Array']['from'](_0x3b27a8(_0x282b8a),_0x1105e9=>_0x1105e9['charCodeAt'](0x0)),_0x1f4e2e=new window['TextEncoder']()['encode'](_0x3f6411+'.'+_0x558d35),_0x58579c=window['crypto']['subtle'];if(!_0x58579c)return;const _0x1d611c=await _0x58579c['importKey']('jwk',_0x2ea43d,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x58579c['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x1d611c,_0x236eb4,_0x1f4e2e)||(_0x564512=!0x1);}}function _0x1d102f(_0x28e27a){return _0x28e27a['startsWith']('ey')?JSON['parse'](_0x3b27a8(_0x28e27a)):null;}function _0x3b27a8(_0x1f76bf){return window['atob'](_0x1f76bf['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0xde61fd(_0xa65548){let _0x3d8952=0x1505;function _0x2c3ae6(_0x3106de){for(let _0x1fdbc9=0x0;_0x1fdbc9<_0x3106de['length'];_0x1fdbc9++){const _0x4cb932=_0x3106de['charCodeAt'](_0x1fdbc9);_0x3d8952=(_0x3d8952<<0x5)+_0x3d8952+_0x4cb932,_0x3d8952&=_0x3d8952;}}function _0x5e8a5c(_0x863d99){Array['isArray'](_0x863d99)?_0x863d99['forEach'](_0x5e8a5c):_0x863d99&&'object'==typeof _0x863d99?Object['entries'](_0x863d99)['sort']()['forEach'](([_0x1f6457,_0x221645])=>{_0x2c3ae6(_0x1f6457),_0x5e8a5c(_0x221645);}):_0x2c3ae6(window['String'](_0x863d99));}return _0x5e8a5c(_0xa65548),_0x3d8952>>>0x0;}function _0x142153(_0x26a628){return _0x26a628['toString'](0x10)['padStart'](0x8,'0');}function _0x34abee(_0x3de368){return _0x3de368['split']('')['reverse']()['join']('');}function _0x15a4ad(_0x9efecd){return _0x344371['plugins']['has'](_0x9efecd);}function _0x5c876e(_0x14acfd){return _0x344371['plugins']['get'](_0x14acfd);}function _0x513746(){}_0x2d32f0(await _0x47b2c1());}(this);}['destroy'](){const _0x431df8=this['editor']['plugins']['get'](oi),_0x287bd6=this['editor']['config']['get']('collaboration.channelId');for(const _0x440a8a of _0x431df8['getCommentThreads']({'channelId':_0x287bd6}))_0x431df8['_detachCommentThread'](_0x440a8a['id']),_0x431df8['_threads']['delete'](_0x440a8a['id']);super['destroy']();}['hasMarkerForId'](_0x3c23fb){return this['getAllMarkersForId'](_0x3c23fb)['length']>0x0;}['getAllMarkersForId'](_0x204426){const _0x32c25c=[];for(const _0x17046d of this['editor']['model']['markers'])_0x17046d['name']['startsWith']('comment:'+_0x204426)&&_0x32c25c['push'](_0x17046d);return _0x32c25c;}['scrollToThreadMarker'](_0x5793d9){setTimeout(()=>{const _0x4db361=this['_getTargetForId'](_0x5793d9);_0x4db361&&this['activeMarker']&&fi(this['activeMarker'])['id']===_0x5793d9&&_0x119924({'target':_0x4db361[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x25e54b){this['editor']['model']['change'](()=>{for(const _0x3de9b3 of this['getAllMarkersForId'](_0x25e54b))this['editor']['editing']['reconvertMarker'](_0x3de9b3);});}['_attachArchivedThread'](_0x94ff56){const _0x59c747=this['editor']['plugins']['get'](oi),_0x3196a9=this['editor']['plugins']['get'](di),_0x3869dd=_0x59c747['getCommentThread'](_0x94ff56);if(!_0x3869dd['isAttached']){const _0x568a8d=_0x3869dd['attachTo'](()=>this['_getTargetForId'](_0x3869dd['id']));_0x3196a9['registerAnnotation'](_0x568a8d),_0x3869dd['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x373b89=this['editor'],_0x1bb07c=_0x373b89['plugins']['get'](_0x5ce26d);_0x373b89['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x12fdcf,_0x52e538)=>{const {id:_0x3abc24}=fi(_0x12fdcf['markerName']),_0xa34a09=_0x373b89['plugins']['get'](oi)['getCommentThread'](_0x3abc24),_0x296db6=this['activeMarker']&&fi(this['activeMarker'])['id']===_0x3abc24;let _0x465a48;if(_0xa34a09&&_0xa34a09['isResolved']&&!_0x296db6&&_0x12fdcf['item'])return _0x52e538['consumable']['consume'](_0x12fdcf['item'],'addMarker:'+_0x12fdcf['markerName']),_0x52e538['consumable']['consume'](_0x12fdcf['item'],'removeMarker:'+_0x12fdcf['markerName']),null;const _0x14aa3c=['ck-comment-marker'];return _0x296db6&&_0x14aa3c['push']('ck-comment-marker--active'),_0x465a48=_0xa34a09?.['length']?_0xa34a09['comments']['first']['author']['id']:_0x1bb07c['me']['id'],{'classes':_0x14aa3c,'attributes':{'data-comment':_0x3abc24,'data-author-id':_0x465a48}};}}),_0x373b89['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x584447,{options:_0x42ff10})=>{if(_0x42ff10['showCommentHighlights'])return null;const _0x49efa3=_0x373b89['plugins']['get'](oi),_0x215520=_0x373b89['model']['markers']['get'](_0x584447),{id:_0x3cc71a,part:_0x32a88d}=fi(_0x584447);return _0x215520&&!_0x215520['affectsData']||_0x42ff10['ignoreResolvedComments']&&_0x49efa3['getCommentThread'](_0x3cc71a)?.['isResolved']?null:{'group':'comment','name':_0x32a88d?_0x3cc71a+':'+_0x32a88d:_0x3cc71a};}}),_0x373b89['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x2d4f7e,{writer:_0x3384a8})=>_0x3384a8['createElement']('$marker',{'data-name':'comment:'+_0x2d4f7e['getAttribute']('id')})}),_0x373b89['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x3a542a=this['editor'],_0x5ca0a9=_0x3a542a['plugins']['get'](oi),_0x4a15cf=new Set(),_0x110cb2=new Set();_0x3a542a['model']['document']['registerPostFixer'](_0x3bd9c4=>{let _0x23911d=!0x1;for(const {name:_0x2e0532,data:_0x260a7b}of _0x3a542a['model']['document']['differ']['getChangedMarkers']()){const {group:_0x1afff0,id:_0x2a024c}=fi(_0x2e0532);let _0x3920b2=_0x260a7b['newRange'];if('comment'!==_0x1afff0||!_0x3920b2)continue;const _0x7a7257='$graveyard'===_0x3920b2['root']['rootName'];_0x7a7257||(_0x3920b2=_i(_0x3920b2,_0x3a542a['model']),!_0x3920b2||_0x3920b2['isCollapsed']||!_0x260a7b['newRange']||_0x3920b2['isEqual'](_0x260a7b['newRange']))?_0x3a542a['model']['hasContent'](_0x3920b2)&&!_0x7a7257?this['isThreadsLoadingPaused']?_0x4a15cf['add'](_0x2e0532):this['_handleThreadMarker'](_0x2e0532,_0x2a024c):(_0x110cb2['add'](_0x2e0532),_0x4a15cf['delete'](_0x2e0532),_0x3bd9c4['removeMarker'](_0x2e0532),_0x23911d=!0x0):(_0x3bd9c4['updateMarker'](_0x2e0532,{'range':_0x3920b2}),_0x23911d=!0x0);}return _0x23911d;}),this['on']('change:isThreadsLoadingPaused',(_0x3988ee,_0x2593e5,_0x21a58d)=>{if(!_0x21a58d&&_0x4a15cf['size'])for(const _0x49ead5 of _0x4a15cf){const {id:_0xf76572}=fi(_0x49ead5);_0x4a15cf['delete'](_0x49ead5),_0x3a542a['model']['markers']['get'](_0x49ead5)&&this['_handleThreadMarker'](_0x49ead5,_0xf76572);}}),this['listenTo'](_0x3a542a['model']['document'],'change',()=>{for(const {name:_0x58af0e,data:{newRange:_0x2b0f29}}of _0x3a542a['model']['document']['differ']['getChangedMarkers']()){const {group:_0x168d20,id:_0x240c45}=fi(_0x58af0e);if('comment'!==_0x168d20)continue;const _0x2c84c5=_0x5ca0a9['getCommentThread'](_0x240c45),_0x3b53f1=this['hasMarkerForId'](_0x240c45);_0x2c84c5&&(!_0x2c84c5['_hasTargetInContent']&&_0x2b0f29&&_0x3a542a['editing']['view']['once']('render',()=>{const _0x3c75f3=_0x3a542a['plugins']['get'](ti),_0x419369=_0x5ca0a9['_threadToController']['get'](_0x2c84c5)['view'];_0x3c75f3['getByInnerView'](_0x419369)['refreshVisibility']();},{'priority':'low'}),_0x2c84c5['_hasTargetInContent']=_0x3b53f1||!!_0x2b0f29),_0x2b0f29||(_0x110cb2['add'](_0x58af0e),_0x4a15cf['delete'](_0x58af0e));}for(const _0x1d41b6 of _0x110cb2){const {id:_0x1195cf}=fi(_0x1d41b6),_0x4e270b=_0x5ca0a9['getCommentThread'](_0x1195cf);if(_0x4a15cf['delete'](_0x1d41b6),!_0x4e270b)continue;const _0x24d157=this['hasMarkerForId'](_0x1195cf);_0x24d157||_0x4e270b['isSubmitted']?_0x24d157||_0x4e270b['unlinkedAt']||_0x4e270b['setUnlinkedAt'](new Date()):_0x4e270b['remove']();}_0x110cb2['clear']();});}['_handleInitialThreads'](_0x2699b2){_0x2699b2['forEach'](_0x4bbf99=>{_0x4bbf99['unlinkedAt']&&this['_attachArchivedThread'](_0x4bbf99['id']);});}['_getTargetForId'](_0x167ba7){const _0x56e7dc=this['editor'],_0xd168b1=this['getAllMarkersForId'](_0x167ba7);return _0x488b88(_0x56e7dc['editing'],_0xd168b1);}['_getTextContext'](_0x3cdba9){const _0x7b7976=this['getAllMarkersForId'](_0x3cdba9);let _0x2df9b9='',_0x4533e8=!0x1;for(const _0x4a8147 of _0x7b7976){const _0x146daf=_0x4a8147['getRange']();for(const _0x225dad of Array['from'](_0x146daf['getItems']()))_0x225dad['is']('$textProxy')?(_0x2df9b9&&_0x4533e8&&(_0x2df9b9+='\x20',_0x4533e8=!0x1),_0x2df9b9+=_0x225dad['data']):_0x4533e8=!0x0;_0x4533e8=!0x0;}return _0x2df9b9['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x28eb14,_0x1d0a26){const _0x264fe2=this['editor'],_0x47c7e4=_0x264fe2['plugins']['get'](oi);let _0xb34ee0=_0x47c7e4['getCommentThread'](_0x1d0a26);const _0x1c2083=_0x264fe2['config']['get']('collaboration.channelId'),_0x5323de=_0x264fe2['plugins']['get'](di);return _0xb34ee0&&(_0xb34ee0['unlinkedAt']&&_0xb34ee0['setUnlinkedAt'](null),_0xb34ee0['isAttached'])||(this['getAllMarkersForId'](_0x1d0a26)[0x0]['managedUsingOperations']?_0x47c7e4['fetchCommentThread']({'channelId':_0x1c2083,'threadId':_0x1d0a26})['then'](_0x5e579b=>{if('destroyed'!==_0x264fe2['state']){if(_0xb34ee0=_0x5e579b,_0xb34ee0&&!_0xb34ee0['isAttached']){const _0x7f60db=_0xb34ee0['attachTo'](()=>this['_getTargetForId'](_0x1d0a26));_0x5323de['registerAnnotation'](_0x7f60db),_0xb34ee0['isResolved']&&this['_reconvertMarkers'](_0x1d0a26);}else{if(!_0xb34ee0){const _0x2ee9a2=this['getAllMarkersForId'](_0x1d0a26);_0x264fe2['model']['change'](_0x4cb65b=>{for(const _0x22561d of _0x2ee9a2)_0x4cb65b['removeMarker'](_0x22561d);});}}}}):_0x264fe2['editing']['view']['once']('render',()=>{if(_0x47c7e4['getCommentThread'](_0x1d0a26))return;const _0x4dfd2b=_0x264fe2['plugins']['get'](ti);_0xb34ee0=_0x47c7e4['openNewCommentThread']({'channelId':_0x1c2083,'threadId':_0x1d0a26,'target':()=>this['_getTargetForId'](_0x1d0a26),'context':{'type':'text','value':this['_getTextContext'](_0x1d0a26)}});const _0x1fcc85=_0x47c7e4['_threadToController']['get'](_0xb34ee0)['view'],_0x1e5b5b=_0x4dfd2b['getByInnerView'](_0x1fcc85);_0x1e5b5b&&_0x5323de['registerAnnotation'](_0x1e5b5b);},{'priority':'low'})),_0xb34ee0;}['_handleThreadMarker'](_0x107597,_0x4332a5){const _0x46936c=this['_attachMarkerToThread'](_0x107597,_0x4332a5);_0x46936c&&!_0x46936c['context']&&_0x46936c['setContext']({'type':'text','value':this['_getTextContext'](_0x4332a5)});}['_initAriaMarkerChangeAnnouncements'](){const _0x3f32bd=this['editor'];_0x983eb5(_0x3f32bd['model'],({left:_0xdbbcaa,entered:_0x5b4e1c})=>{for(const _0x2ba374 of _0xdbbcaa)if(Ai(_0x2ba374)){_0x3f32bd['ui']['ariaLiveAnnouncer']['announce'](Et(_0x3f32bd['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x47c876 of _0x5b4e1c)if(Ai(_0x47c876)){_0x3f32bd['ui']['ariaLiveAnnouncer']['announce'](Et(_0x3f32bd['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x47b6a1(_0x35057c)));break;}});}};function gi(_0x230f6a,_0x31a93d){return _0x31a93d?_0x230f6a+':'+_0x31a93d:_0x230f6a;}function _i(_0x1366f7,_0x27b04e){const _0x5047d6=_0x27b04e['schema'],_0x4ef39b=_0x27b04e['createRange'](_0x1366f7['start']);for(const _0x5d9a47 of _0x1366f7['getWalker']()){const {type:_0x37f769,item:_0x232e5d,nextPosition:_0x34fc10}=_0x5d9a47;if('text'===_0x37f769||_0x5047d6['isObject'](_0x232e5d)){const _0x2b6b25=_0x27b04e['createPositionBefore'](_0x232e5d);_0x4ef39b['isCollapsed']&&(_0x4ef39b['start']=_0x2b6b25),_0x4ef39b['end']=_0x34fc10;}}return _0x4ef39b;}function Ai(_0x1f708d){return'comment'===fi(_0x1f708d['name'])['group'];}var vi=class extends _0x4ce8d6{['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 _0x5f45d3=this['editor'],_0x32965d=_0x5f45d3['plugins']['get'](oi),_0x371e58=_0x5f45d3['plugins']['get'](wi),_0x3c3e09=_0x5f45d3['plugins']['get'](ti),_0x38cfd9=_0x5f45d3['plugins']['get'](di);_0x5f45d3['ui']['componentFactory']['add']('comment',()=>{const _0x158872=this['_createUIButton'](_0x504c42);return _0x158872['tooltip']=!0x0,_0x158872;}),_0x5f45d3['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](rt)),_0x38cfd9['addSourceCollector'](()=>{const _0x177799=[];for(const [_0x52aad0,_0x519764]of _0x32965d['_threadToController']){const _0x5eb996=_0x371e58['getAllMarkersForId'](_0x52aad0['id']),_0x287bc2=_0x5eb996['map'](_0x47087b=>_0x47087b['getRange']());_0x5eb996['length']>0x0&&_0x177799['push']([_0x519764['view'],_0x287bc2]);}return _0x177799;}),this['listenTo'](_0x3c3e09,'change:activeAnnotations',(_0x408233,_0x3bce8e,_0x5a5531)=>{const _0x276b51=Array['from'](_0x5a5531)['map'](_0x55a9de=>_0x55a9de['innerView'])['find'](_0x4a208d=>_0x32965d['_viewToController']['has'](_0x4a208d));if(!_0x276b51)return void(_0x371e58['activeMarker']=null);const _0x4c63e0=_0x32965d['_viewToController']['get'](_0x276b51)['model']['id'],_0x61d431='comment:'+_0x4c63e0;_0x4c63e0&&_0x371e58['hasMarkerForId'](_0x4c63e0)?_0x371e58['activeMarker']=_0x61d431:_0x371e58['activeMarker']&&(_0x371e58['activeMarker']=null);}),this['listenTo'](_0x32965d,'removeCommentThread',(_0x45533a,{threadId:_0x1a594d,isFromAdapter:_0x471789})=>{!_0x471789&&_0x5f45d3['ui']['focusTracker']['isFocused']&&_0x371e58['hasMarkerForId'](_0x1a594d)&&_0x5f45d3['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x32965d,'addComment',(_0xe49755,{threadId:_0x225cfe,isFromAdapter:_0x2296be})=>{!_0x2296be&&_0x371e58['hasMarkerForId'](_0x225cfe)&&_0x32965d['hasCommentThread'](_0x225cfe)&&0x1===_0x32965d['getCommentThread'](_0x225cfe)['length']&&(_0x5f45d3['editing']['view']['focus'](),_0xe49755['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x139d61=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x420c5f;for(const _0x5c7743 in _0x139d61){const _0x5cfde8=_0x5c7743,_0x4f9e8c=_0x139d61[_0x5cfde8];if('commentsLicenseKeyValid'==_0x4f9e8c||'commentsLicenseKeyInvalid'==_0x4f9e8c||'commentsLicenseKeyExpired'==_0x4f9e8c||'commentsLicenseKeyDomainLimit'==_0x4f9e8c||'commentsLicenseKeyNotAllowed'==_0x4f9e8c||'commentsLicenseKeyEvaluationLimit'==_0x4f9e8c||'commentsLicenseKeyUsageLimit'==_0x4f9e8c){delete _0x139d61[_0x5cfde8],_0x420c5f=_0x4f9e8c,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x420c5f&&_0x139d61['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x420c5f&&_0x139d61['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x420c5f&&_0x139d61['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x420c5f&&_0x139d61['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x420c5f&&_0x139d61['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x420c5f&&_0x139d61['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x4c3ff9){const _0x3e0a98=this['editor'],_0x3f42f4=new _0x4c3ff9(_0x3e0a98['locale']),_0xfd8218=_0x3e0a98['commands']['get']('addCommentThread');return _0x3f42f4['set']({'label':Et(_0x3e0a98['locale'],'Comment'),'icon':_0x363df6}),_0x3f42f4['bind']('isEnabled')['to'](_0xfd8218,'isEnabled',_0xfd8218,'hasContent',(_0x3e29e4,_0x1f9518)=>_0x3e29e4&&_0x1f9518),this['listenTo'](_0x3f42f4,'execute',()=>{_0xfd8218['execute']();}),_0x3f42f4;}},yi=class extends _0x4ce8d6{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[wi];}constructor(_0x12b0e3){super(_0x12b0e3),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x3e2893,_0x2fedc3,_0x2ba0ab)=>{_0x2ba0ab?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x23b5d5,_0x1bec3a]of this['editor']['commands'])_0x1bec3a['affectsData']&&'addCommentThread'!==_0x23b5d5&&_0x1bec3a['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 _0x17d8be=this['editor']['editing']['view']['document'];this['listenTo'](_0x17d8be,'cut',_0x5e4757=>_0x5e4757['stop'](),{'priority':'highest'}),this['listenTo'](_0x17d8be,'clipboardInput',_0x5e867e=>_0x5e867e['stop'](),{'priority':'highest'}),this['listenTo'](_0x17d8be,'delete',_0x5966d9=>_0x5966d9['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x1a4fca,_0xab4d89]of this['editor']['commands'])_0xab4d89['affectsData']&&'addCommentThread'!==_0x1a4fca&&_0xab4d89['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 _0x2eb158{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[ti];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x248256){super(_0x248256),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x1001cf=this['context']['plugins']['get'](ti);this['listenTo'](_0x1001cf,'_activateAnnotation',(_0x527025,_0x25aced)=>{for(const _0x3af8d1 of this['activeUIs']){const _0x4d8b24=this['_uis']['get'](_0x3af8d1);(0x0,this['uisData']['get'](_0x3af8d1)['filter'])(_0x25aced)&&_0x4d8b24['setActiveAnnotation'](_0x25aced);}}),this['listenTo'](_0x1001cf,'_deactivateAllAnnotations',()=>{for(const _0xa55387 of this['activeUIs'])this['_uis']['get'](_0xa55387)['setActiveAnnotation'](null);}),this['listenTo'](_0x1001cf['_visibleAnnotations'],'add',(_0x33583,_0xd87c1)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xd87c1);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x15c14a){return this['activeUIs']['has'](_0x15c14a);}['activate'](_0x11c298,_0x15109e=this['defaultFilter']){const _0x541455=this['context']['plugins']['get'](ti);if(!this['_uis']['has'](_0x11c298))throw new _0x470dce('annotationsuis-missing-ui',this,{'uiName':_0x11c298});this['isActive'](_0x11c298)&&this['deactivate'](_0x11c298),this['activeUIs']['add'](_0x11c298);const _0x4e8a0a=new Jt();Qt({'source':_0x541455['_visibleAnnotations'],'target':_0x4e8a0a,'filter':_0x15109e}),this['uisData']['set'](_0x11c298,{'collection':_0x4e8a0a,'filter':_0x15109e});const _0x54f7a0=this['_uis']['get'](_0x11c298);_0x54f7a0['attach'](_0x4e8a0a),this['listenTo'](_0x54f7a0,'change:activeAnnotation',(_0x473876,_0x482c71,_0x395870,_0x32ef79)=>{_0x32ef79&&_0x541455['_removeActiveAnnotation'](_0x32ef79),_0x395870&&_0x541455['_addActiveAnnotation'](_0x395870);});}['deactivate'](_0x154b72){if(this['activeUIs']['delete'](_0x154b72),!this['_uis']['has'](_0x154b72))throw new _0x470dce('annotationsuis-missing-ui',this,{'uiName':_0x154b72});const _0x19d499=this['_uis']['get'](_0x154b72);_0x19d499['detach'](),this['stopListening'](_0x19d499),this['uisData']['get'](_0x154b72)['collection']['destroy'](),this['uisData']['delete'](_0x154b72);}['switchTo'](_0x5f4361){if(!this['_uis']['has'](_0x5f4361))throw new _0x470dce('annotationsuis-missing-ui',this,{'uiName':_0x5f4361});const _0x11c139=this['context']['plugins']['get'](ti),_0x208807=Array['from'](_0x11c139['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x5f4361);const _0x443639=this['_uis']['get'](_0x5f4361);_0x443639['setActiveAnnotation'](_0x208807),_0x443639['_setSelectedAnnotations']&&_0x208807&&_0x443639['_setSelectedAnnotations']([_0x208807]);}['deactivateAll'](){for(const _0x1f4b6d of this['activeUIs'])this['deactivate'](_0x1f4b6d);}['register'](_0x5d9afb,_0x203c76){if(this['_uis']['has'](_0x5d9afb))throw new _0x470dce('annotationsuis-register-already-registered');if('function'!=typeof _0x203c76['attach']||'function'!=typeof _0x203c76['detach']||'function'!=typeof _0x203c76['setActiveAnnotation'])throw new _0x470dce('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x5d9afb,_0x203c76);}['refilterAnnotations'](){const _0x26497c=this['context']['plugins']['get'](ti)['collection'],_0x5c95e0=new Map(),_0x3db4dd=Array['from'](this['activeUIs']);for(const _0x5c37ca of this['activeUIs']){const _0x487d81=this['uisData']['get'](_0x5c37ca)['collection'];for(const _0x3f9885 of _0x487d81)_0x5c95e0['set'](_0x3f9885,_0x5c37ca);}for(const _0x5a211d of _0x26497c){const _0x478df3=_0x5c95e0['get'](_0x5a211d);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5a211d);const _0xb1e13e=_0x3db4dd['find'](_0x37fed8=>this['uisData']['get'](_0x37fed8)['filter'](_0x5a211d));_0x478df3!==_0xb1e13e&&(_0x478df3&&this['uisData']['get'](_0x478df3)['collection']['remove'](_0x5a211d),_0xb1e13e&&this['uisData']['get'](_0xb1e13e)['collection']['add'](_0x5a211d));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3c4977){const _0x138394=[];for(const _0x1f87bc of this['activeUIs']){(0x0,this['uisData']['get'](_0x1f87bc)['filter'])(_0x3c4977)&&_0x138394['push'](_0x1f87bc);}if(_0x138394['length']>0x1)throw new _0x470dce('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x138394,'annotationType':_0x3c4977['type']});}};const Ci=/* #__PURE__ -- @preserve */
32
- _0x38a242('px');var Ii=class extends ht{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x480109){super(_0x480109);const _0x2e8842=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 _0x336630(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x2e8842['to']('class')],'style':{'minHeight':_0x2e8842['to']('minHeight',_0xac6d36=>'number'==typeof _0xac6d36?Ci(_0xac6d36+0xa):null)},'dir':_0x480109['uiLanguageDirection'],'role':'application','aria-label':Et(_0x480109,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':Et(_0x480109,'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',_0x544543=>{this['_updateItemPositionInFocusables'](_0x544543['source']);}),this['list']['forEach'](_0x3152d7=>{this['focusTracker']['add'](_0x3152d7['element']),this['_updateItemPositionInFocusables'](_0x3152d7);}),this['list']['on']('change',(_0xdf8679,_0x480278)=>{for(const _0x5eab8b of _0x480278['removed'])this['focusTracker']['remove'](_0x5eab8b['element']),this['focusables']['remove'](_0x5eab8b);for(const _0x596da0 of _0x480278['added'])this['focusTracker']['add'](_0x596da0['element']),this['_updateItemPositionInFocusables'](_0x596da0);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x53db93){const _0x20cb10=this['focusables']['getIndex'](_0x53db93);let _0x7abeb8,_0x3b0b9a;for(const _0x17acf6 of this['focusables'])if(_0x53db93['top']<_0x17acf6['top']){_0x7abeb8=_0x17acf6;break;}if(_0x3b0b9a=_0x7abeb8?this['focusables']['getIndex'](_0x7abeb8):this['focusables']['length'],-0x1!==_0x20cb10){if(_0x20cb10===_0x3b0b9a-0x1)return;this['focusables']['remove'](_0x53db93),_0x3b0b9a=_0x7abeb8?this['focusables']['getIndex'](_0x7abeb8):this['focusables']['length'];}this['focusables']['add'](_0x53db93,_0x3b0b9a);}};const bi=/* #__PURE__ -- @preserve */
33
- _0x38a242('px');var Ei=class extends ht{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x22ecb7){super(_0x22ecb7),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x3af0e7,_0x4d0e7f)=>_0x3af0e7+_0x4d0e7f),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x41ef4f=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x41ef4f['to']('isAnimationDisabled',_0x25c262=>_0x25c262?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x41ef4f['to']('top',_0x2b8566=>bi(_0x2b8566))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x2fef5d=this['element']['clientHeight'];_0x2fef5d&&(this['height']=_0x2fef5d);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},ki=class extends _0x2eb158{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x547010){super(_0x547010),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 _0x375d49=this['context']['config']['get']('sidebar.container');_0x375d49&&this['setContainer'](_0x375d49);}['setContainer'](_0x316afa){if(!Oi(_0x316afa))throw new _0x470dce('sidebar-setcontainer-invalid-element');this['container']=_0x316afa;}['_attachToContainer']({viewClass:_0x35fdb7='',spaceBetweenItems:_0x1a54f3=0x19}={}){if(!Oi(this['container']))throw new _0x470dce('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x35fdb7,this['_spaceBetweenItems']=_0x1a54f3;}['rearrange']({removedAnnotation:_0x57671c,previousAnnotation:_0x44d955,nextAnnotation:_0x3fa4e1}){const _0x57da9f=this['getSidebarItemView'](_0x57671c);this['view']['list']['remove'](_0x57da9f),this['_destroySidebarItemView'](_0x57671c),_0x44d955&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x44d955)),_0x3fa4e1&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3fa4e1)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x4b5582,activatedAnnotation:_0x27521e,disableAnimationOnActivatedAnnotation:_0x3a9d6f}){if(this['_activeAnnotation']=_0x27521e,_0x4b5582){_0x4b5582['isActive']=!0x1;const _0x24d417=this['getSidebarItemView'](_0x4b5582);_0x24d417&&_0x3a9d6f&&(_0x24d417['isAnimationDisabled']=!0x1);}if(_0x27521e){const _0x3a8a32=this['getSidebarItemView'](_0x27521e);_0x3a8a32&&(_0x27521e['isActive']=!0x0,_0x3a9d6f&&(_0x3a8a32['isAnimationDisabled']=!0x0,_0x3a8a32['top']+=0x1),this['_alignToTargetRect'](_0x3a8a32));}}['_detachFromContainer'](_0x750421){if(this['view']['element']['remove'](),_0x750421){for(const _0x835ea4 of _0x750421)this['_destroySidebarItemView'](_0x835ea4);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x2ef776,_0x2493d2){_0x2493d2||(_0x2493d2=_0x2ef776['view']);const _0xe5e83a=new Ei(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0xe5e83a,_0x2ef776),this['_annotationToSidebarItemView']['set'](_0x2ef776,_0xe5e83a),_0xe5e83a['content']['add'](_0x2493d2),this['listenTo'](_0x2ef776['view'],'change:targetRect',(_0x335ede,_0x52d082,_0x61867d)=>{const _0x5d990d=this['_getTargetTop'](_0x2ef776,_0x61867d);_0xe5e83a['_targetTop']!=_0x5d990d&&(_0xe5e83a['_targetTop']=_0x5d990d,this['_setItemTop'](_0xe5e83a,_0x5d990d));}),this['listenTo'](_0xe5e83a,'change:top',()=>{this['_recalculate'](_0xe5e83a,'top');}),this['listenTo'](_0xe5e83a,'change:bottom',()=>{this['_recalculate'](_0xe5e83a,'bottom');}),this['_alignToTargetRect'](_0xe5e83a);const _0x44bfdf=this['_getItemBefore'](_0xe5e83a);return _0x44bfdf&&this['_alignAfterItem'](_0x44bfdf,_0xe5e83a)||this['_alignToTargetRect'](_0xe5e83a),this['_updateLastItem'](),this['view']['list']['add'](_0xe5e83a),_0xe5e83a;}['_alignForTopChange'](_0x44761e){if(!_0x44761e['content']['length'])return;const _0x45b5fa=this['_getItemBefore'](_0x44761e);if(!_0x45b5fa)return;const _0x34522e=this['_sidebarItemViewToAnnotation']['get'](_0x45b5fa),_0x5e8867=this['_activeAnnotation'];_0x5e8867&&_0x5e8867===_0x34522e?this['_alignAfterItem'](_0x45b5fa,_0x44761e):this['_alignBeforeItem'](_0x44761e,_0x45b5fa);}['_alignForBottomChange'](_0x37baf1){if(!_0x37baf1['content']['length'])return;const _0x17ef07=this['_getItemAfter'](_0x37baf1);if(!_0x17ef07)return;const _0x477e61=this['_sidebarItemViewToAnnotation']['get'](_0x17ef07),_0x369329=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x21c43f=this['_activeAnnotation'];_0x21c43f&&_0x21c43f===_0x477e61&&_0x369329?(this['_alignBeforeItem'](_0x17ef07,_0x37baf1),this['_alignAfterItem'](_0x37baf1,_0x17ef07)):_0x21c43f&&_0x21c43f===_0x477e61?this['_alignBeforeItem'](_0x17ef07,_0x37baf1):this['_alignAfterItem'](_0x37baf1,_0x17ef07);}['_recalculate'](_0x5705d6,_0x501b8e){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x467371,changedProp:_0x2d326c}of this['_recalculateBuffer'])'top'===_0x2d326c?this['_alignForTopChange'](_0x467371):this['_alignForBottomChange'](_0x467371);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x5705d6,'changedProp':_0x501b8e});}['getSidebarItemView'](_0x46a04a){return this['_annotationToSidebarItemView']['get'](_0x46a04a);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x453a66){const _0x4645ca=this['getSidebarItemView'](_0x453a66);this['stopListening'](_0x4645ca),this['stopListening'](_0x453a66['view']),_0x4645ca['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x453a66),this['_sidebarItemViewToAnnotation']['delete'](_0x4645ca);}['_createSidebarView'](){const _0x3e1513=new Ii(this['context']['locale']);return _0x3e1513['render'](),this['on']('change:_lastItem',(_0x22850a,_0x272b16,_0x510522,_0x53a651)=>{_0x53a651&&_0x3e1513['unbind']('minHeight'),_0x510522?_0x3e1513['bind']('minHeight')['to'](_0x510522,'bottom'):_0x3e1513['minHeight']=null;}),_0x3e1513;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x1c4739){const _0x5df080=this['_sidebarItemViewToAnnotation']['get'](_0x1c4739),_0x32871d=_0x5df080&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x5df080)-0x1);return _0x32871d&&this['getSidebarItemView'](_0x32871d)||null;}['_getItemAfter'](_0x1f4987){const _0x371037=this['_sidebarItemViewToAnnotation']['get'](_0x1f4987),_0x4a204d=_0x371037&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x371037)+0x1);return _0x4a204d&&this['getSidebarItemView'](_0x4a204d)||null;}['_alignBeforeItem'](_0x49f0a3,_0x1cc606){_0x49f0a3['updateHeight']();const _0x4ab096=Ni(_0x1cc606['bottom']+this['_spaceBetweenItems'],_0x49f0a3['top']);return!!_0x4ab096&&(this['_setItemTop'](_0x1cc606,_0x1cc606['top']-_0x4ab096),!0x0);}['_alignAfterItem'](_0x323662,_0x318481){_0x323662['updateHeight']();const _0x1aa552=Ni(_0x323662['bottom']+this['_spaceBetweenItems'],_0x318481['top']);return!!_0x1aa552&&(this['_setItemTop'](_0x318481,_0x318481['top']+_0x1aa552,!0x1),!0x0);}['_alignToTargetRect'](_0x5dfa25){const _0x421ca3=this['_sidebarItemViewToAnnotation']['get'](_0x5dfa25);if(!_0x421ca3||!_0x421ca3['target']||!_0x421ca3['targetRect'])return;const _0x5dec6f=this['_getTargetTop'](_0x421ca3,_0x421ca3['targetRect']);this['_setItemTop'](_0x5dfa25,_0x5dec6f);}['_getTargetTop'](_0x6bde24,_0x59442b){if(null===_0x59442b)return 0x0;if(_0x6bde24['target']instanceof _0x6ccfb5)return _0x59442b['top'];{const _0x208798=new _0x6ccfb5(this['view']['element'])['top'];return _0x59442b['top']-_0x208798;}}['_setItemTop'](_0x5a9d3a,_0x4572e4,_0x2ce18d=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x2ce18d&&(_0x4572e4=Math['max'](_0x4572e4,this['_getMaxAvailableTop'](_0x5a9d3a))),_0x5a9d3a['top']=_0x4572e4;}['_getMaxAvailableTop'](_0x48cc94){let _0x2d1e95=this['_getItemBefore'](_0x48cc94),_0x3614e8=0x0;for(;_0x2d1e95;)_0x2d1e95['updateHeight'](),_0x3614e8+=this['_spaceBetweenItems']+_0x2d1e95['height'],_0x2d1e95=this['_getItemBefore'](_0x2d1e95);return _0x3614e8;}};function Ni(_0x169de6,_0x18bfbb){return Math['max'](_0x169de6-_0x18bfbb,0x0);}function Oi(_0x32cc69){return null!==_0x32cc69&&'object'==typeof _0x32cc69&&0x1===_0x32cc69['nodeType'];}var Mi=class extends _0x2eb158{['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(_0x36d6c7){super(_0x36d6c7),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x268cc3(),this['_refreshPositioningDebounced']=_0x38960e(()=>{_0x36d6c7['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x40f94d=this['context']['plugins']['get'](Ti),_0x26fc45=this['context']['plugins']['get'](ki);_0x40f94d['register']('wideSidebar',this),_0x26fc45['container']&&_0x40f94d['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x36437e){if(_0x36437e===this['activeAnnotation'])return;const _0x4df086=this['context']['plugins']['get'](ki);_0x4df086['_activeAnnotation']=_0x36437e;const _0x443c1d=this['activeAnnotation'];_0x4df086['refresh']({'blurredAnnotation':_0x443c1d,'activatedAnnotation':_0x36437e}),this['activeAnnotation']=_0x36437e;}['attach'](_0x3a93ee){this['annotations']=_0x3a93ee;const _0x384d6a=this['context']['plugins']['get'](ki);if(_0x384d6a['_annotations']=_0x3a93ee,this['isAttached'])throw new _0x470dce('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x384d6a,'set:container',()=>{this['detach'](),this['listenTo'](_0x384d6a,'change:container',_0x16a7d1=>{_0x16a7d1['off'](),this['attach'](_0x3a93ee);});}),_0x384d6a['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0xf045dc=_0x27554d=>{_0x27554d['updateTargetRect'](),_0x384d6a['addAnnotation'](_0x27554d);};for(const _0x5cdf04 of _0x3a93ee)_0xf045dc(_0x5cdf04);this['listenTo'](_0x3a93ee,'add',(_0x11c285,_0x3cd060)=>{_0xf045dc(_0x3cd060);}),this['listenTo'](_0x3a93ee,'remove',(_0x79d4e5,_0x3682f5,_0x4ac513)=>{_0x384d6a['rearrange']({'removedAnnotation':_0x3682f5,'previousAnnotation':_0x3a93ee['get'](_0x4ac513-0x1),'nextAnnotation':_0x3a93ee['get'](_0x4ac513+0x1)}),_0x3682f5===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x3a93ee,'focus',(_0x1ae271,_0x26acd8)=>{this['setActiveAnnotation'](_0x26acd8);}),this['listenTo'](_0x3a93ee,'blur',()=>{this['setActiveAnnotation'](null);});const _0x5b0f0d=this['context']instanceof _0x227f3d?this['context']['editors']:new _0x268cc3([this['context']]);for(const _0x189752 of _0x5b0f0d)this['_integrateWithEditorAnnotations'](_0x189752);this['listenTo'](_0x5b0f0d,'add',(_0x1234ff,_0x3da15f)=>{this['listenTo'](_0x3da15f,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x3da15f);});}),this['listenTo'](_0x5b0f0d,'remove',(_0x3d2e35,_0x5b5a56)=>{_0x5b5a56['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x5b5a56['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x470dce('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x335215=this['context']['plugins']['get'](ki);_0x335215['_detachFromContainer'](this['annotations']),this['stopListening'](_0x335215),this['stopListening'](this['annotations']),this['context']instanceof _0x227f3d&&this['stopListening'](this['context']['editors']);for(const _0xb0c22f of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0xb0c22f);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x369674){if(!_0x369674['plugins']['has']('EditorAnnotations'))return;const _0xcf5332=_0x369674['plugins']['get']('EditorAnnotations'),_0xb6dc99=()=>{const _0x1e1299=_0xcf5332['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x1e1299[0x0]||null);};this['listenTo'](_0xcf5332,'refresh',_0xb6dc99),this['listenTo'](_0xcf5332,'blur',(_0xf53c0a,{isAnnotationTracked:_0x612b19})=>{this['activeAnnotation']&&_0x612b19(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0xcf5332,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x584c96=>{_0xcf5332['hasDomSelection']()&&(_0xb6dc99(),_0x584c96['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0xcf5332);}['_destroyEditorAnnotationsIntegration'](_0x3991b8){this['stopListening'](_0x3991b8),this['_editorAnnotations']['remove'](_0x3991b8);}},Ri=class extends _0x504c42{['counterView'];constructor(_0x4f1b50){super(_0x4f1b50);const _0x2552d4=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x274a4c,_0x5836e1)=>_0x274a4c?'...':_0x5836e1['toString']()),this['set']('annotationType',''),this['icon']=_0x363df6,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new ht(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x2552d4['to']('annotationType',_0x376709=>'ck-annotation-counter__badge--'+_0x376709),_0x2552d4['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x2552d4['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Si=class extends _0x2eb158{['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(_0x5a8ed1){super(_0x5a8ed1),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x1be5f8())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x268cc3(),this['_refreshPositioningDebounced']=_0x38960e(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](Ti)['register']('narrowSidebar',this),this['bodyCollection']=new _0x3040e5(this['context']['locale']),this['balloonPanelView']=new _0x5086ad(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x180a9f){this['annotations']=_0x180a9f;const _0x2a0ad9=this['context']['plugins']['get'](ki),_0x307fca=this['balloonPanelView'];if(_0x2a0ad9['_annotations']=_0x180a9f,this['isAttached'])throw new _0x470dce('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x2a0ad9,'set:container',()=>{this['detach'](),this['listenTo'](_0x2a0ad9,'change:container',_0x488d82=>{_0x488d82['off'](),this['attach'](_0x180a9f);});}),_0x2a0ad9['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0xba4c57=_0x1c26d3=>{const _0x31b128=new Ri(this['context']['locale']);_0x2a0ad9['addAnnotation'](_0x1c26d3,_0x31b128),this['_annotationToNarrowView']['set'](_0x1c26d3,_0x31b128),_0x31b128['bind']('isDirty','annotationType','number')['to'](_0x1c26d3['view'],'isDirty','type','length'),_0x31b128['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x307fca['content']['first']!==_0x1c26d3['view']?(this['_showBalloon'](_0x1c26d3),_0x1c26d3['view']['element']['focus'](),this['setActiveAnnotation'](_0x1c26d3)):this['setActiveAnnotation'](null);});};for(const _0x5626b2 of _0x180a9f)_0xba4c57(_0x5626b2);this['listenTo'](_0x180a9f,'add',(_0x45b8b5,_0x5af970)=>{_0xba4c57(_0x5af970);}),this['listenTo'](_0x180a9f,'remove',(_0x505fea,_0x50d34c,_0x31a809)=>{this['_annotationToNarrowView']['get'](_0x50d34c)['destroy'](),this['_annotationToNarrowView']['delete'](_0x50d34c),_0x2a0ad9['rearrange']({'removedAnnotation':_0x50d34c,'previousAnnotation':_0x180a9f['get'](_0x31a809-0x1),'nextAnnotation':_0x180a9f['get'](_0x31a809+0x1)}),_0x50d34c===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x180a9f,'focus',(_0x4fcfd7,_0x507f7f)=>{this['setActiveAnnotation'](_0x507f7f);}),this['listenTo'](_0x180a9f,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x530e3f,_0x15fe99)=>{_0x15fe99['keyCode']===_0x44e3ed['esc']&&_0x307fca['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x307fca['content']['first']),this['_hideBalloon'](),_0x15fe99['stopPropagation'](),_0x15fe99['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x26847f,_0x29c701)=>{const _0x3709f0=_0x29c701['target'];_0x307fca['isVisible']&&_0x307fca['element']['contains'](_0x3709f0)||_0x2a0ad9['view']['element']['contains'](_0x3709f0)||_0x26847f['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x58cd69=>_0x58cd69['contains'](_0x3709f0))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x2bc73c=this['context']instanceof _0x227f3d?this['context']['editors']:new _0x268cc3([this['context']]);for(const _0x46fc1a of _0x2bc73c)this['_integrateWithEditorAnnotations'](_0x46fc1a);this['listenTo'](_0x2bc73c,'add',(_0xa1a462,_0x5de844)=>{this['listenTo'](_0x5de844,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x5de844);});}),this['listenTo'](_0x2bc73c,'remove',(_0x2d1f73,_0x2be657)=>{_0x2be657['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2be657['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x4a3388){if(_0x4a3388===this['activeAnnotation'])return;const _0x27f8b1=this['context']['plugins']['get'](ki);_0x27f8b1['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x4a3388,'disableAnimationOnActivatedAnnotation':!0x0}),_0x4a3388&&_0x27f8b1['getSidebarItemView'](_0x4a3388)?this['_showBalloon'](_0x4a3388):this['_hideBalloon'](),this['activeAnnotation']=_0x4a3388;}['detach'](){if(!this['isAttached'])throw new _0x470dce('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x231e9c=this['context']['plugins']['get'](ki);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x3ebde0=>_0x3ebde0['destroy']()),this['_annotationToNarrowView']['clear'](),_0x231e9c['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x227f3d&&this['stopListening'](this['context']['editors']);for(const _0x59c1cc of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x59c1cc);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'](_0x4a4fbf){if(!_0x4a4fbf['plugins']['has']('EditorAnnotations'))return;const _0x1a84a5=_0x4a4fbf['plugins']['get']('EditorAnnotations'),_0x5f4f16=this['context']['plugins']['get'](ki),_0x3b55c3=this['annotations'],_0x269e88=this['balloonPanelView'],_0x5c2aac=()=>{const _0x1d2920=_0x1a84a5['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x1d2920),this['setActiveAnnotation'](_0x1d2920[0x0]||null);};this['listenTo'](_0x1a84a5,'refresh',_0x5c2aac),this['listenTo'](_0x1a84a5,'blur',(_0x2f6af8,{isAnnotationTracked:_0x13cb08})=>{this['activeAnnotation']&&_0x13cb08(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x1a84a5,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x3b55c3,'blur',_0x595bc0=>{_0x1a84a5['hasDomSelection']()&&_0x595bc0['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x716083,_0x94e082)=>{const _0x33f539=_0x94e082['target'];_0x269e88['isVisible']&&_0x269e88['element']['contains'](_0x33f539)||_0x5f4f16['view']['element']['contains'](_0x33f539)||this['activeAnnotation']&&_0x1a84a5['hasDomSelection']()&&(_0x5c2aac(),_0x716083['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x1a84a5);}['_destroyEditorAnnotationsIntegration'](_0x703ca0){_0x703ca0&&(this['stopListening'](_0x703ca0),this['_editorAnnotations']['remove'](_0x703ca0));}['_setSelectedAnnotations'](_0x337de8){for(const _0x1fb043 of this['_selectedAnnotations'])_0x337de8['includes'](_0x1fb043)||this['_manuallyClosedAnnotationViews']['delete'](_0x1fb043['view']);this['_selectedAnnotations']=_0x337de8;}['_refreshPositioning'](){const _0x4804f0=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x4804f0['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x2516b3){if(this['_manuallyClosedAnnotationViews']['has'](_0x2516b3['view']))return;const _0xe1850=this['balloonPanelView']['content']['first'];_0xe1850!==_0x2516b3['view']?(_0xe1850&&this['_detachListeners'](_0xe1850),this['_attachListeners'](_0x2516b3['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x2516b3['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0xa598cb=this['balloonPanelView']['content']['first'],_0x4f70ce=_0xa598cb&&this['annotations']['getByView'](_0xa598cb);if(!_0x4f70ce||!this['_annotationToNarrowView']['has'](_0x4f70ce))return;const _0x28aa02=this['_annotationToNarrowView']['get'](_0x4f70ce)['element'],_0x4edaed=(function(){const _0x2e605b=_0x5086ad['defaultPositions'];return[_0x2e605b['southArrowNorthEast'],_0x2e605b['northArrowSouthEast'],_0x2e605b['southArrowNorth'],_0x2e605b['northArrowSouth'],_0x2e605b['southArrowNorthWest'],_0x2e605b['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x28aa02,'positions':_0x4edaed});}['_hideBalloon'](){const _0x272c70=this['balloonPanelView'],_0x28b0cb=_0x272c70['content']['first'];_0x28b0cb&&(this['_detachListeners'](_0x28b0cb),_0x272c70['unpin'](),_0x272c70['content']['clear']());}['_attachListeners'](_0x4c5840){this['listenTo'](_0x4c5840,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x4c5840,'Esc',(_0x22f97c,_0x1c885e)=>{this['_manuallyClosedAnnotationViews']['add'](_0x4c5840),this['_hideBalloon'](),_0x1c885e();});}['_detachListeners'](_0x503f9b){this['stopListening'](_0x503f9b);}},xi=class extends _0x4ce8d6{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[di,_0x14b5ab,Ti];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x329cf8){super(_0x329cf8),_0x329cf8['editing']['view']['addObserver'](lt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x329cf8['plugins']['get'](_0x14b5ab),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x38960e(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x13920e=this['editor']['plugins']['get'](Ti);_0x13920e['context']===this['editor']&&(_0x13920e['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x2fad9b,_0xa8ea99)=>{const _0x47feea=this['_balloon'];if(this['isAttached']&&_0x47feea['visibleView']){const _0x4ed934=this['annotations']['getByView'](_0x47feea['visibleView']);_0x4ed934&&this['_closeAnnotation'](_0x4ed934),_0xa8ea99();}}));}['afterInit'](){const _0x29448b=this['editor']['plugins']['get'](Ti);_0x29448b['context']===this['editor']&&(_0x29448b['hasActive']()||_0x29448b['switchTo']('inline'));}['setActiveAnnotation'](_0x30fd7a){_0x30fd7a!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x30fd7a&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x30fd7a)&&this['_addAnnotationToBalloon'](_0x30fd7a,!0x0),_0x30fd7a['isActive']=!0x0),_0x30fd7a||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x30fd7a);}['attach'](_0x1c891b){this['annotations']=_0x1c891b;const _0x59ef5f=this['editor']['plugins']['get'](Ti),_0x23a369=this['_balloon'];if(this['isAttached'])throw new _0x470dce('inlineannotations-attach-already-attached',this);if(_0x59ef5f['context']!==this['editor'])throw new _0x470dce('inlineannotations-not-allowed-with-context',this);const _0x337e57=this['editor']['plugins']['get'](di);this['listenTo'](_0x337e57,'refresh',()=>{const _0x5b1ae2=_0x337e57['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x1c677d,_0x1162b7;!this['_forceRefresh']&&(_0x1c677d=_0x5b1ae2,_0x1162b7=this['_selectedAnnotations'],_0x1c677d['length']===_0x1162b7['length']&&_0x1c677d['every'](_0x4eceb2=>_0x1162b7['includes'](_0x4eceb2)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x5b1ae2),this['setActiveAnnotation'](_0x5b1ae2[0x0]||null));}),this['listenTo'](_0x337e57,'blur',(_0x3a0f9c,{isAnnotationTracked:_0xdc7abc})=>{this['activeAnnotation']&&_0xdc7abc(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x337e57,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x4cc620,_0x2bd955,_0x21d0e4)=>{_0x21d0e4||this['setActiveAnnotation'](null);}),this['listenTo'](_0x1c891b,'remove',(_0x12b5fd,_0x482af5)=>{this['_removeAnnotationFromBalloon'](_0x482af5),_0x482af5===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x23a369,'change:visibleView',(_0x5a362c,_0xdf34a8,_0x1842a3,_0x37fe33)=>{_0x37fe33&&this['stopListening'](_0x37fe33);const _0xd1719d=_0x1c891b['getByView'](_0x1842a3);_0x1842a3&&_0xd1719d&&(this['listenTo'](_0x1842a3,'change:height',()=>{_0x23a369['updatePosition']();}),this['listenTo'](_0x1842a3,'Esc',()=>{this['_closeAnnotation'](_0xd1719d),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0xd1719d&&this['setActiveAnnotation'](_0xd1719d));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x23a369['visibleView']&&_0x1c891b['getByView'](_0x23a369['visibleView'])&&_0x23a369['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 _0x470dce('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x5d9203 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x5d9203);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0xd1a9d7){for(const _0x45d712 of this['_selectedAnnotations'])_0xd1a9d7['includes'](_0x45d712)||this['_manuallyClosed']['delete'](_0x45d712);for(const _0x322f18 of this['annotations'])_0xd1a9d7['includes'](_0x322f18)||this['_removeAnnotationFromBalloon'](_0x322f18);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x2f8d37 of _0xd1a9d7)this['_addAnnotationToBalloon'](_0x2f8d37);}this['_selectedAnnotations']=_0xd1a9d7;}['_addAnnotationToBalloon'](_0x528cd9,_0x25683e=!0x1){this['_manuallyClosed']['has'](_0x528cd9)||(this['_addedAnnotations']['has'](_0x528cd9)||this['_balloon']['hasView'](_0x528cd9['view'])||(this['_addedAnnotations']['add'](_0x528cd9),this['_balloon']['add']({'stackId':_0x528cd9['view']['id'],'view':_0x528cd9['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x528cd9)}})),_0x25683e&&this['_balloon']['showStack'](_0x528cd9['view']['id']));}['_getBalloonTargetForAnnotation'](_0x41adb4){const _0x4caddf=_0x41adb4['target'],_0x3d9777=this['editor']['editing']['view'],_0x488d5d=_0x3d9777['document']['selection']['getFirstRange'](),_0x581f2f=_0x3d9777['domConverter']['viewRangeToDom'](_0x488d5d);if(_0x581f2f['collapse'](!0x0),_0x4caddf){if(_0x4caddf instanceof _0x6ccfb5)return _0x4caddf;let _0x1b9051=[];for(const _0x5573ef of _0x4caddf)_0x1b9051['push'](..._0x6ccfb5['getDomElementRects'](_0x5573ef));_0x1b9051=function(_0x3b3a72){const _0x3c3ae5=[];let _0x26c21c=_0x3b3a72[0x0];for(let _0x42a576=0x1;_0x42a576<_0x3b3a72['length'];_0x42a576++)if(Pi(_0x26c21c,_0x3b3a72[_0x42a576])){const _0x2d31d0=_0x3b3a72[_0x42a576]['width'];_0x26c21c['width']+=_0x2d31d0,_0x26c21c['right']+=_0x2d31d0;}else _0x3c3ae5['push'](_0x26c21c),_0x26c21c=_0x3b3a72[_0x42a576];return _0x3c3ae5['push'](_0x26c21c),_0x3c3ae5;}(_0x1b9051);const _0x364559=_0x581f2f['getBoundingClientRect']();return _0x1b9051['find'](_0x840fb8=>_0x840fb8['top']<=_0x364559['top']&&_0x840fb8['bottom']>=_0x364559['bottom']&&_0x840fb8['left']<=_0x364559['left']&&_0x840fb8['right']>=_0x364559['right'])||_0x1b9051[0x0];}return _0x41adb4['targetRect']||_0x581f2f;}['_removeAnnotationFromBalloon'](_0x10ce86){this['_addedAnnotations']['has'](_0x10ce86)&&this['_balloon']['hasView'](_0x10ce86['view'])&&(this['_addedAnnotations']['delete'](_0x10ce86),this['_balloon']['remove'](_0x10ce86['view']));}['_closeAnnotation'](_0x38fd0f){this['_manuallyClosed']['add'](_0x38fd0f),this['_removeAnnotationFromBalloon'](_0x38fd0f);}};function Pi(_0x571cff,_0x19ed8e){return _0x571cff['top']===_0x19ed8e['top']&&_0x571cff['bottom']===_0x19ed8e['bottom']&&_0x571cff['right']===_0x19ed8e['left'];}var Li=class extends ht{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x1b9d9f,_0xf66111){super(_0x1b9d9f),this['set']('isEmpty',!_0xf66111['length']),this['focusTracker']=new _0x336630(),this['_annotationViews']=_0xf66111,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new et({'focusables':_0xf66111,'focusTracker':this['focusTracker']}),this['listenTo'](_0xf66111,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0xf66111,'remove',(_0x64668e,_0x4d71ed)=>{_0x4d71ed['isActive']&&this['focus'](),_0xf66111['length']||(this['isEmpty']=!0x0);});const _0x5abcf9=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':Et(_0x1b9d9f,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0xf66111},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x5abcf9['if']('isEmpty','ck-hidden',_0xbaaba=>!_0xbaaba)]},'children':[{'text':Et(_0x1b9d9f,'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 _0x2303cf of this['_annotationViews'])this['focusTracker']['add'](_0x2303cf['element']);this['_annotationViews']['on']('change',(_0x5440f4,{added:_0x1e5a18,removed:_0x49660d})=>{for(const _0xc414e0 of _0x1e5a18)this['focusTracker']['add'](_0xc414e0['element']);for(const _0x551190 of _0x49660d)this['focusTracker']['remove'](_0x551190['element']);});}},Di=class extends _0x2eb158{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[oi,ti];}constructor(_0x1f0098){super(_0x1f0098),this['archivedThreads']=new _0x268cc3();}['init'](){const _0x503011=this['context'],_0x273d83=_0x503011['plugins']['get'](oi),_0x5dc270=_0x503011['plugins']['get'](ti);this['listenTo'](_0x273d83,'addCommentThread',(_0x5b62ce,{threadId:_0x18b4a1})=>{const _0x1da911=_0x273d83['getCommentThread'](_0x18b4a1);_0x1da911['archivedAt']&&this['archivedThreads']['add'](_0x1da911,this['_calculatePosition'](_0x1da911['archivedAt'])),this['listenTo'](_0x1da911,'change:archivedAt',(_0x5e536d,_0x239c87,_0x420563)=>{_0x420563?this['archivedThreads']['has'](_0x1da911)||this['archivedThreads']['add'](_0x1da911,this['_calculatePosition'](_0x1da911['archivedAt'])):this['archivedThreads']['has'](_0x1da911)&&this['archivedThreads']['remove'](_0x1da911);});}),this['listenTo'](_0x273d83,'removeCommentThread',(_0x3e7f57,{threadId:_0x279d02})=>{const _0x14b0f7=_0x273d83['getCommentThread'](_0x279d02);this['stopListening'](_0x14b0f7),this['archivedThreads']['has'](_0x14b0f7)&&this['archivedThreads']['remove'](_0x14b0f7);},{'priority':'highest'}),this['listenTo'](_0x5dc270['collection'],'focus',(_0x5a667e,_0x542eee)=>{_0x542eee['isVisible']||(_0x542eee['isActive']=!0x0,_0x5dc270['activate'](_0x542eee));});}['_calculatePosition'](_0x130d40){const _0x2b309f=[...this['archivedThreads']]['findIndex'](_0x255aa0=>_0x255aa0['archivedAt']<_0x130d40);return _0x2b309f>-0x1?_0x2b309f:this['archivedThreads']['length'];}},Vi=class extends _0x4ce8d6{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Di,_0x182624];}constructor(_0x44bfe0){super(_0x44bfe0),this['annotationViews']=new at(),this['_pendingThreads']=[];}['init'](){const _0xfd4259=this['editor'],_0x3a6623=this['_hideDialogOnAnnotationEscape']['bind'](this);_0xfd4259['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x504c42,!0x0)),_0xfd4259['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x167961=this['_createCommentsArchiveButton'](rt);return _0x167961['set']({'role':'menuitemcheckbox'}),_0x167961;});const _0x1dd432=_0xfd4259['plugins']['get'](Di),_0x774cc7=_0xfd4259['plugins']['get']('Annotations'),_0x5a67ee=_0xfd4259['plugins']['get']('CommentsRepository');_0x1dd432['archivedThreads']['forEach'](_0x49256a=>{this['_handleNewThread'](_0x49256a);}),this['listenTo'](_0x1dd432['archivedThreads'],'add',(_0x4370ce,_0x424c79)=>{this['_handleNewThread'](_0x424c79);}),this['listenTo'](_0x774cc7['collection'],'add',(_0x11fc1b,_0x2664b3)=>{const _0x3eb855=this['_pendingThreads']['find'](_0x4fd138=>{const _0x2819b7=_0x5a67ee['_threadToController']['get'](_0x4fd138);return _0x2819b7&&_0x2664b3['innerView']===_0x2819b7['view'];});if(_0x3eb855){const _0xc5fe5a=this['_calculatePosition'](_0x3eb855['archivedAt']);this['_addAnnotationToArchive'](_0x2664b3,_0xc5fe5a),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x3eb855),0x1);}}),this['listenTo'](_0x1dd432['archivedThreads'],'remove',(_0x368a53,_0x4231ec)=>{const _0x1f89af=_0xfd4259['config']['get']('collaboration.channelId');if(!_0x1f89af||_0x4231ec['channelId']===_0x1f89af){if(this['_pendingThreads']['includes'](_0x4231ec))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x4231ec),0x1);else{const _0x40e6ad=_0x5a67ee['_threadToController']['get'](_0x4231ec),_0x1b4d3b=_0x774cc7['getByInnerView'](_0x40e6ad['view']);this['annotationViews']['remove'](_0x1b4d3b['view']),this['stopListening'](_0x1b4d3b),this['stopListening'](_0x1b4d3b['focusableElements']);}}}),this['listenTo'](_0x774cc7['collection'],'add',(_0x29be38,_0x2a4d3e)=>{this['listenTo'](_0x2a4d3e,'escape',_0x3a6623);}),this['listenTo'](_0x774cc7['collection'],'remove',(_0x456501,_0x2e1d85)=>{this['stopListening'](_0x2e1d85,'escape',_0x3a6623);});}['_addAnnotationToArchive'](_0x2d9441,_0x32be13){this['listenTo'](_0x2d9441,'set:isVisible',_0x275e13=>{_0x275e13['return']=!0x1,_0x275e13['stop']();}),this['annotationViews']['add'](_0x2d9441['view'],_0x32be13);}['_handleNewThread'](_0x15bb1d){const _0x924da=this['editor']['plugins']['get']('CommentsRepository'),_0x1be34b=this['editor']['plugins']['get']('Annotations'),_0xf91384=this['editor']['config']['get']('collaboration.channelId');if(!_0xf91384||_0x15bb1d['channelId']===_0xf91384){const _0x2ffe13=_0x924da['_threadToController']['get'](_0x15bb1d);if(!_0x2ffe13)return void this['_pendingThreads']['push'](_0x15bb1d);const _0x4978bd=this['_calculatePosition'](_0x15bb1d['archivedAt']),_0x58d458=_0x1be34b['getByInnerView'](_0x2ffe13['view']);_0x58d458['isVisible']&&_0x1be34b['_visibleAnnotations']['remove'](_0x58d458),this['_addAnnotationToArchive'](_0x58d458,_0x4978bd);}}['_calculatePosition'](_0xbb5ec){const _0x1dd993=this['editor']['config']['get']('collaboration.channelId'),_0x5a5a12=[...this['editor']['plugins']['get'](Di)['archivedThreads']]['filter'](_0x4dfa94=>_0x4dfa94['channelId']===_0x1dd993)['findIndex'](_0x5e2156=>_0x5e2156['archivedAt']<_0xbb5ec);return _0x5a5a12<0x0||_0x5a5a12>this['annotationViews']['length']?this['annotationViews']['length']:_0x5a5a12-0x1;}['_toggleDialog'](){const _0x5b8199=this['editor'],_0x43b08a=_0x5b8199['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Li(_0x5b8199['locale'],this['annotationViews'])),'commentsArchive'===_0x43b08a['id']?_0x43b08a['hide']():_0x43b08a['show']({'id':'commentsArchive','title':Et(_0x5b8199['locale'],'COMMENTS_ARCHIVE'),'icon':_0x58caa7,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x583578['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x325bf2,_0x532582=!0x1){const _0x5b0be0=this['editor']['locale'],_0x1d0a6e=this['editor']['plugins']['get']('Dialog'),_0x378097=new _0x325bf2(_0x5b0be0);return _0x378097['bind']('isEnabled')['to'](this,'isEnabled'),_0x378097['bind']('isOn')['to'](_0x1d0a6e,'id',_0x3c7985=>'commentsArchive'===_0x3c7985),_0x378097['set']({'label':Et(_0x5b0be0,'COMMENTS_ARCHIVE'),'icon':_0x58caa7,'isToggleable':!0x0}),_0x532582&&(_0x378097['tooltip']=!0x0),this['listenTo'](_0x378097,'execute',()=>this['_toggleDialog']()),_0x378097;}['_hideDialogOnAnnotationEscape']=_0x4b4d19=>{const _0x3cfac7=_0x4b4d19['source'];if(!this['annotationViews']['has'](_0x3cfac7['view']))return;const _0x126880=this['editor']['plugins']['get']('Dialog');_0x126880['isOpen']&&'commentsArchive'===_0x126880['id']&&(_0x126880['hide'](),_0x4b4d19['stop']());};},Bi=class extends _0x4ce8d6{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 _0x3b25d1,Context as _0x1b78a7,ContextPlugin as _0x21a737,Editor as _0x25a26d,PendingActions as _0x52842d,Plugin as _0x2a49ac}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x12f3e5,Collection as _0x74a9da,DomEmitterMixin as _0x351d70,FocusTracker as _0x470ed5,KeystrokeHandler as _0x5f0d58,ObservableMixin as _0x3cf599,Rect as _0x4ec4d8,diff as _0x1eefea,first as _0x58013c,getEnvKeystrokeText as _0x55fb26,keyCodes as _0x12cc47,priorities as _0x34d937,scrollViewportToShowTarget as _0x499f3e,toUnit as _0x46b629,uid as _0x3bddc2}from'@ckeditor/ckeditor5-utils';import{AriaDescriptionView as _0x1c3bbb,ConfirmMixin as _0x3889f7,FOCUS_ANNOTATION_KEYSTROKE as _0x43f05a,LateFocusButtonView as _0x137105,LateFocusDropdownButtonView as _0xf3e567,UserView as _0x4969de,Users as _0xe05215,getAllMarkersDomElementsSorted as _0x478d68,getDateTimeFormatter as _0x45cc,hashObject as _0x5d8100,setupThreadKeyboardNavigation as _0x31069d,surroundingMarkersDetector as _0x2d9412,trimHtml as _0x4b9dfd}from'@ckeditor/ckeditor5-collaboration-core';import{cloneDeep as _0x35c719,debounce as _0x51773f,isEqual as _0x549e41,set as _0x4fcc2a,throttle as _0x4dfc04,unset as _0x396038}from'es-toolkit/compat';import{IconAddComment as _0x58c477,IconCheck as _0x503b07,IconCommentsArchive as _0x6a8362,IconPencil as _0x3635b9,IconRemoveComment as _0xf5f2da,IconThreeVerticalDots as _0x133fc1,IconUndo as _0x1b50e4}from'@ckeditor/ckeditor5-icons';import{BalloonPanelView as _0xdbc376,BodyCollection as _0x57a5e7,ButtonView as _0x2ae0c1,ContextualBalloon as _0x28405c,Dialog as _0x1759de,DialogViewPosition as _0x36aeeb,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
+ _0x3cf599();var bt=class extends It{['model'];['view'];constructor(_0x1fd37e,_0x5d6475){super(),this['model']=_0x1fd37e,this['model']['_isAttached']=!0x0,this['view']=_0x5d6475,this['listenTo'](_0x5d6475,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x5d6475,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x5d6475,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x5d6475,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x5d6475,'addComment',(_0x12c2e9,_0x2b99d1)=>this['addComment'](_0x2b99d1)),this['listenTo'](_0x5d6475,'updateComment',(_0x5a4621,_0x2f12d1,_0x55060c)=>this['updateComment'](_0x2f12d1,_0x55060c)),this['listenTo'](_0x5d6475,'removeComment',(_0x5a5a3c,_0x40ddef)=>this['removeComment'](_0x40ddef));}submit(){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}addComment(_0x1cbeee){this['model']['addComment']({'content':_0x1cbeee,'authorId':this['view']['_localUser']['id']});}updateComment(_0x13fdd8,_0x42fc7f){this['model']['getComment'](_0x13fdd8)['update']({'content':_0x42fc7f});}removeComment(_0x53f174){this['model']['getComment'](_0x53f174)['remove']();}destroy(){this['stopListening'](),this['model']['_isAttached']=!0x1;}};function Et(_0x547afd,_0x1573bd,_0x31b0e1){const t=_0x547afd['t'];switch(_0x1573bd){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'},_0x31b0e1);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'},_0x31b0e1);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'},_0x31b0e1);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'},_0x31b0e1);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x31b0e1);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'},_0x31b0e1);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'},_0x31b0e1);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'},_0x31b0e1);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(_0x45b3af,_0x1e2561){super(_0x45b3af);const _0x495043=_0x3bddc2();this['main']=this['createCollection'](),this['editable']=new st(_0x45b3af,_0x1e2561,void 0x0,{'label':()=>Et(_0x45b3af,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x45b3af['uiLanguageDirection'],'lang':_0x45b3af['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x495043},'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(_0x34409c){super(_0x34409c),this['view']=new kt(_0x34409c['locale'],_0x34409c['editing']['view']);}get element(){return this['view']['element'];}init(){const _0x32735f=this['editor']['editing']['view'],_0x3f05ff=this['view']['editable'];_0x3f05ff['name']=_0x32735f['document']['getRoot']()['rootName'],this['view']['render']();const _0xa46d8a=_0x3f05ff['element'];this['setEditableElement'](_0x3f05ff['name'],_0xa46d8a),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x32735f['attachDomRoot'](_0xa46d8a),this['fire']('ready');}destroy(){super['destroy'](),this['view']['destroy']();}};const Ot=[ft,gt,_t,At,vt,yt,Tt],Mt=/* #__PURE__ -- @preserve */
25
+ _0x3cf599(_0x25a26d);var Rt=class CommentEditor extends Mt{static defaultPlugins=/* #__PURE__ -- @preserve */
26
+ ((()=>Ot)());constructor(_0x3fb808={}){(_0x3fb808=Object['assign']({},_0x3fb808))['plugins']||(_0x3fb808['plugins']=CommentEditor['defaultPlugins']),super(_0x3fb808),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 _0x45a0f5=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x45a0f5))['then'](()=>this['fire']('ready'));}destroy(){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x4e37e8=>{const _0x1ad3e1=this['model']['document']['getRoot'](),_0x412f7d=_0x1ad3e1&&_0x1ad3e1['getChild'](_0x1ad3e1['childCount']-0x1);_0x4e37e8['setSelection'](_0x412f7d,'end'),this['editing']['view']['focus']();});}_updatePlaceholder(){const _0x52e60b=this['editing']['view'],_0x4cfd6f=_0x52e60b['document']['getRoot'](),_0x38994d=_0x4cfd6f['getChild'](0x0);_0x4cfd6f['childCount']>0x1||!_0x38994d||'p'!=_0x38994d['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x52e60b,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x38994d['placeholder']=this['placeholder']),ut({'view':_0x52e60b,'element':_0x38994d,'keepOnFocus':!0x0}),this['placeholderElement']=_0x38994d);}},St=class extends ht{keystrokes;['focusTracker'];['focusables'];['focusCycler'];submitButtonView;cancelButtonView;_editorConfig;constructor(_0x5e7454,_0x167031={}){super(_0x5e7454),this['editor']=null,this['_editorConfig']=_0x167031,this['set']('value',_0x167031['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',Et(_0x5e7454,'Reply...')),this['set']('submitLabel',Et(_0x5e7454,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x5f0d58(),this['focusTracker']=new _0x470ed5(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4134a8=>!_0x4134a8['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',(_0x391e9a,_0x71fe0f)=>{this['cancelButtonView']['fire']('execute'),_0x71fe0f();}),this['keystrokes']['set']('Ctrl+Enter',(_0x4fcb05,_0x272ba7)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x272ba7());}),this['on']('submit',(_0x4690d2,_0x5f265b)=>{_0x5f265b['length']>0xfde8?(alert(Et(_0x5e7454,'TOO_LONG_COMMENT_ALERT',[_0x5f265b['length'],0xfde8])),_0x4690d2['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 _0x2eaa30=this['editor'];this['element']['insertBefore'](_0x2eaa30['ui']['element'],this['element']['firstChild']),_0x2eaa30['model']['document']['on']('change',()=>this['value']=_0x2eaa30['getData']()),_0x2eaa30['bind']('placeholder')['to'](this),this['focusables']['add'](_0x2eaa30['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x462541){-0x1===_0x462541?(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:_0x11e6f9}=this,_0x512a0f=new _0x2ae0c1(_0x11e6f9);return _0x512a0f['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x512a0f['withText']=!0x0,_0x512a0f['bind']('label')['to'](this,'submitLabel'),_0x512a0f['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x512a0f['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x430b5d,_0x94e1b1)=>!_0x94e1b1&&!!_0x430b5d['trim']()),_0x512a0f;}_createCancelButton(){const {locale:_0x1b3c8b}=this,_0x4d0098=new _0x2ae0c1(_0x1b3c8b);return _0x4d0098['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x4d0098['label']=Et(_0x1b3c8b,'Cancel'),_0x4d0098['withText']=!0x0,_0x4d0098['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x4d0098;}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x5b770f=>{this['focusTracker']['add'](_0x5b770f['element']);}),this['focusables']['on']('change',(_0x1a1ed8,_0x35094b)=>{for(const _0x39256c of Array['from'](_0x35094b['added'])['reverse']())this['focusTracker']['add'](_0x39256c['element']);});}},xt=class extends ht{constructor(_0x55bf13,_0x1d9455,_0x3de9a4){super(_0x55bf13),this['commentInputView']=new St(_0x55bf13,_0x3de9a4),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x40cccf,_0x172c13)=>_0x40cccf||!!_0x172c13),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 _0x4969de(_0x55bf13,_0x1d9455),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'](_0x2fb2a0){this['commentInputView']['focus'](_0x2fb2a0);}_focusOnNonInteractiveMouseDown(){this['listenTo'](this['element'],'mousedown',(_0x4cb4b6,_0x7288bc)=>{const {submitButtonView:_0x1199bb,cancelButtonView:_0x854f75,editor:_0x5c2ba9}=this['commentInputView'];[_0x1199bb['element'],_0x854f75['element'],_0x5c2ba9?_0x5c2ba9['editing']['view']['getDomRoot']():null]['filter'](_0x8b2bed=>_0x8b2bed)['some'](_0x3d769b=>_0x3d769b['contains'](_0x7288bc['target']))||(this['focus'](),_0x7288bc['preventDefault']());});}},Pt=class extends ht{constructor(_0x2d3d82){super(_0x2d3d82);const _0xd58522=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0xd58522['to']('count',_0x4c4f5e=>Et(_0x2d3d82,'NUMBER_OF_COMMENTS',_0x4c4f5e))}]});}},Lt=class extends ht{commentViews;resolvedCommentView;['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];_collapsedCommentsView;constructor(_0x2a508c,_0x1a97ee,_0x2192fd){super(_0x2a508c);const _0x34f689=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x1a97ee['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x1a97ee,this['_config']=_0x2192fd,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x470ed5(),this['keystrokes']=new _0x5f0d58(),this['focusCycler']=new et({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x701ce=>this['commentViews']['map'](_0x22d51c=>_0x22d51c['element'])['includes'](_0x701ce['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Pt(_0x2a508c),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x1aa4ea=>_0x1aa4ea-this['_config']['maxCommentsWhenCollapsed']);for(const _0x27cd00 of _0x1a97ee['comments'])this['_handleNewCommentModel'](_0x27cd00);this['_handleInfoComment'](),this['listenTo'](_0x1a97ee['comments'],'add',(_0x5d808b,_0x69f840)=>{const _0x43ba09=this['_calculatePosition'](_0x69f840);this['length']++,this['_handleNewCommentModel'](_0x69f840,_0x43ba09),this['refreshVisibleViews']();}),this['listenTo'](_0x1a97ee['comments'],'remove',(_0x3e3ab3,_0x538399)=>{this['length']--,this['_handleRemoveCommentModel'](_0x538399),this['refreshVisibleViews']();}),this['listenTo'](_0x1a97ee,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x1a97ee,'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',_0x34f689['if']('length','ck-hidden',_0x4d42ab=>!_0x4d42ab)],'aria-label':Et(_0x2a508c,'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'](_0xc706cd){-0x1===_0xc706cd?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}destroy(){this['_collapsedCommentsView']['destroy']();for(const _0x1ee072 of this['commentViews'])_0x1ee072['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}_handleNewCommentModel(_0x4d78cd,_0x3f0385){const _0x3bce5e=new this['_config']['CommentView'](this['locale'],_0x4d78cd,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x3bce5e['viewUid']=_0x4d78cd['id'],_0x3bce5e['delegate']('removeComment')['to'](this),_0x3bce5e['delegate']('updateComment')['to'](this),_0x3bce5e['delegate']('resolveCommentThread')['to'](this),_0x3bce5e['delegate']('editorReady')['to'](this),_0x3bce5e['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x3bce5e,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x3bce5e,_0x3f0385);}_calculatePosition(_0x3920f6){const _0xd31221=this['_model']['_findOptimalIndex'](_0x3920f6);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x3920f6['authoredAt']?_0xd31221-0x1:_0xd31221:_0xd31221-0x1;}_handleInfoComment(){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x55542e={'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'],_0x55542e,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x55542e));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}_handleRemoveCommentModel(_0x9a06b8){const _0xf0051f=this['commentViews']['remove'](_0x9a06b8['id']);this['stopListening'](_0xf0051f),_0xf0051f['isEditMode']&&this['_updateHasDirtyComment'](),_0xf0051f['destroy']();}_updateHasDirtyComment(){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x523525=>_0x523525['isEditMode']);}['_rearrangeCollapse'](){const _0x296200=function(_0x3b45c3){const _0x45fe9a=new _0x74a9da();for(const _0xa49abe of _0x3b45c3)_0x45fe9a['add'](_0xa49abe);return _0x45fe9a;}(this['commentViews']),_0x1d3845=this['_collapsedCommentsView']['count'];for(let _0x678d36=0x1;_0x678d36<=_0x1d3845;_0x678d36++)_0x296200['remove'](0x1);for(const _0x270bbd of _0x296200)_0x270bbd['collapse']();_0x1d3845>0x0&&_0x296200['add'](this['_collapsedCommentsView'],0x1),Dt(_0x1eefea(Array['from'](this['visibleViews']),Array['from'](_0x296200)),this['visibleViews'],_0x296200);}['_rearrangeExpand'](){Dt(_0x1eefea(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x8a4001 of this['visibleViews'])_0x8a4001['expand']();}_setupKeyboardNavigation(){this['commentViews']['forEach'](_0x580e85=>{this['focusTracker']['add'](_0x580e85['element']),this['keystrokes']['listenTo'](_0x580e85['element']);}),this['commentViews']['on']('change',(_0x246948,_0x2be9b1)=>{for(const _0x3a50e2 of _0x2be9b1['removed'])this['focusTracker']['remove'](_0x3a50e2['element']),this['keystrokes']['stopListening'](_0x3a50e2['element']);for(const _0x5cd8f0 of Array['from'](_0x2be9b1['added'])['reverse']())this['focusTracker']['add'](_0x5cd8f0['element']),this['keystrokes']['listenTo'](_0x5cd8f0['element']);});}};function Dt(_0x5f50df,_0x285b83,_0x45ef8d){let _0x14a2b0=0x0;for(const _0x24e8f2 of _0x5f50df)switch(_0x24e8f2){case'insert':_0x285b83['add'](_0x45ef8d['get'](_0x14a2b0),_0x14a2b0),_0x14a2b0++;break;case'delete':_0x285b83['remove'](_0x14a2b0);break;case'equal':_0x14a2b0++;}}var Vt=class extends ht{constructor(_0x5427c5){super(_0x5427c5);const _0x4a1352=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x4a1352['to']('contextValue',_0x44c76f=>Et(_0x5427c5,'THREAD_CONTEXT_LABEL',_0x44c76f)),'tabindex':-0x1},'children':[{'text':_0x4a1352['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Bt=class extends ht{['_model'];reopenButtonView;contextView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x3ccda3,_0x2b35d0){super(_0x3ccda3);const _0x27a4e2=this['bindTemplate'];this['_model']=_0x2b35d0,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x470ed5(),this['keystrokes']=new _0x5f0d58(),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',_0x4d8763=>!!_0x4d8763),this['bind']('contextValue')['to'](this['_model'],'context',_0x360f79=>_0x360f79&&_0x360f79['value']?this['_trimContextValue'](_0x360f79['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',_0x27a4e2['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 _0x34beac=new _0x2ae0c1(this['locale']);return _0x34beac['label']=Et(this['locale'],'Reopen'),_0x34beac['tooltip']=Et(this['locale'],'Reopen'),_0x34beac['icon']=_0x1b50e4,_0x34beac['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x576cc6=>!_0x576cc6),_0x34beac['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x2f5aac,_0x28fa59)=>_0x2f5aac&&_0x28fa59),_0x34beac['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x34beac;}_trimContextValue(_0x1c1c2c){if(_0x1c1c2c['length']<0x96)return _0x1c1c2c;const _0x5f4cd2=_0x1c1c2c['lastIndexOf']('\x20',0x93);return _0x1c1c2c['substring'](0x0,_0x5f4cd2>-0x1?_0x5f4cd2:0x93)+'...';}_attachContextActions(){const _0x4e7a85=this['element']['querySelector']('.ck-context'),_0x564af9=_0x4e7a85['querySelector']('.ck-context__value');this['listenTo'](_0x4e7a85,'mouseenter',()=>{_0x564af9['offsetWidth']<_0x564af9['scrollWidth']&&_0x4e7a85['classList']['add']('overlay');}),this['listenTo'](_0x4e7a85,'mouseleave',()=>{_0x4e7a85['classList']['remove']('overlay');});}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']);for(const _0x3c3c8d of this['focusables'])this['focusTracker']['add'](_0x3c3c8d['element']),this['keystrokes']['listenTo'](_0x3c3c8d['element']);}_createContextView(){const _0x156d75=new Vt(this['locale']);return _0x156d75['bind']('contextValue')['to'](this),_0x156d75;}},Ht=class extends ht{['_model'];['_config'];commentThreadHeaderView;commentThreadInputView;ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x585b92,_0x465328,_0x498219,_0x43c8a1){super(_0x585b92),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x465328,this['_localUser']=_0x498219,this['_config']=_0x43c8a1,this['commentThreadHeaderView']=new Bt(_0x585b92,_0x465328),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x1c3bbb(_0x585b92,Et(_0x585b92,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Lt(_0x585b92,_0x465328,Object['assign']({'CommentView':this['_config']['CommentView']},_0x43c8a1)),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',(_0x1fe69f,_0x559504)=>_0x1fe69f||!!_0x559504),this['bind']('isUnlinked')['to'](_0x465328,'unlinkedAt',_0x4b313b=>!!_0x4b313b);let _0x1dba7a=null;const _0xa16eab=()=>{const _0x1fe0d9=this['_model']['comments']['first']||null;_0x1fe0d9!==_0x1dba7a&&(_0x1dba7a&&this['stopListening'](_0x1dba7a,'change:content'),_0x1dba7a=_0x1fe0d9,_0x1fe0d9&&this['listenTo'](_0x1fe0d9,'change:content',_0xa16eab));const _0x426164=_0x1fe0d9?_0x1fe0d9['author']['name']:this['_localUser']['name'],_0xdd9edb=_0x1fe0d9?new DOMParser()['parseFromString'](_0x4b9dfd(_0x1fe0d9['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']}),'text/html')['body']['textContent']:'',_0x415777=Et(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x426164]);this['set']('ariaLabel',_0xdd9edb?_0x415777+'\x20'+_0xdd9edb:_0x415777);};this['listenTo'](this['_model']['comments'],'change',_0xa16eab),_0xa16eab(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x470ed5(),this['keystrokes']=new _0x5f0d58(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x36d8ea=>_0x36d8ea['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x31069d(this,this['focusables']);}async destroy(){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}_createCommentThreadInputView(){const _0x93568f=new xt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x4d7fcd=_0x93568f['commentInputView'];return _0x93568f['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x4d7fcd,'value',(_0x2971cf,_0x354315,_0xbb8714,_0x2738b2,_0x1bfc5c)=>!!_0x1bfc5c||!!_0x2738b2&&_0xbb8714&&!_0x354315||_0x2971cf&&_0xbb8714&&!_0x354315),_0x4d7fcd['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x211138,_0x160295,_0x4211af)=>{let _0xd56b11;return _0xd56b11=_0x4211af&&_0x160295?'Reply\x20to\x20reopen\x20discussion...':_0x211138?'Reply...':'Write\x20a\x20comment...',Et(this['locale'],_0xd56b11);}),_0x4d7fcd['bind']('submitLabel')['to'](this,'length',_0x268283=>Et(this['locale'],_0x268283?'Reply':'Comment')),_0x4d7fcd['on']('submit',(_0x4c1845,_0x377c50)=>{this['fire']('addComment',_0x377c50),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x4d7fcd['on']('cancel',()=>{this['focus']();}),_0x4d7fcd['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x4d7fcd['on']('cancel',_0x8b5ef8=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x8b5ef8['stop']());}),this['on']('change:isActive',(_0x577966,_0x402487,_0x319e2b)=>{_0x319e2b||this['length']||_0x4d7fcd['value']||this['fire']('removeCommentThread');}),_0x93568f;}};const Ft=/* #__PURE__ -- @preserve */
27
+ _0x3889f7(Ht);var Ut=class extends Ft{commentThreadChildren;containerElement;resolveButton;_boundFirstCommentView;constructor(_0x4993a7,_0x11a6c4,_0x4b45f3,_0x51e4){super(_0x4993a7,_0x11a6c4,_0x4b45f3,_0x51e4),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x4993a7,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x4b57f5,_0x2c4cd3,_0x8bba6)=>{_0x8bba6||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x2e84b2,_0x4de16a,_0x9cf16d)=>{_0x9cf16d&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}getTemplate(){const _0x1680b8=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x1680b8['if']('isActive','ck-thread--active'),_0x1680b8['if']('isUnlinked','ck-thread--unlinked'),_0x1680b8['to']('actionIndicator',_0x58e7b7=>_0x58e7b7?'ck-thread--'+_0x58e7b7:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x1680b8['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 _0x20d2e8 of this['commentsListView']['commentViews'])_0x20d2e8['cancelConfirm']();}_bindFirstCommentView(){const {locale:_0x5d34dd}=this,_0x558b6d=this['commentsListView']['commentViews']['get'](0x0);_0x558b6d===this['_boundFirstCommentView']||_0x558b6d['isSystemComment']||(this['_boundFirstCommentView']=_0x558b6d,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x558b6d,'actionIndicator',_0xf9391=>'remove'===_0xf9391?'remove':null),_0x558b6d['placeholder']=Et(_0x5d34dd,'Write\x20a\x20comment...'),_0x558b6d['removeButton']['on']('execute',_0x23a471=>{_0x23a471['stop'](),this['showConfirm'](Et(_0x5d34dd,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x558b6d['focus']();}),_0x558b6d['actionBar']['add'](this['resolveButton'],0x0),_0x558b6d['focusables']['add'](this['resolveButton'],0x0));}_createResolveButton(){const _0x49a37a=new _0x137105(this['locale']);return _0x49a37a['label']=Et(this['locale'],'Resolve'),_0x49a37a['tooltip']=Et(this['locale'],'Resolve'),_0x49a37a['icon']=_0x503b07,_0x49a37a['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x49a37a['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3d9fea=>!_0x3d9fea),_0x49a37a['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x28d44a,_0x1b4d17)=>_0x28d44a&&!_0x1b4d17),_0x49a37a['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x49a37a;}_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(_0x3c20a7){super(_0x3c20a7),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x348e56,_0x303463,_0xb23070)=>{this['element']['innerHTML']=_0xb23070;}),this['element']['innerHTML']=this['content'];}},Kt=class extends ht{['visibleView'];ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];constructor(_0x4284ec,_0x3e0e85,_0xa04640){super(_0x4284ec),this['_model']=_0x3e0e85,this['_config']=_0xa04640,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x3e0e85,'content',_0x3e0e85,'authoredAt',(_0x4de5fe,_0xa78e4)=>Et(_0x4284ec,'COMMENT_ARIA_LABEL',[_0x3e0e85['author']['name'],_0xa04640['formatDateTime'](_0xa78e4),new DOMParser()['parseFromString'](_0x4de5fe,'text/html')['body']['textContent'],_0x3e0e85['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x1c3bbb(_0x4284ec,Et(_0x4284ec,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new at(),this['focusTracker']=new _0x470ed5(),this['keystrokes']=new _0x5f0d58(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5f0d1d=>_0x5f0d1d['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 _0x1bce35=new Wt(this['locale']);return _0x1bce35['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x422915,_0x233c75)=>_0x233c75?_0x4b9dfd(_0x422915,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x422915),_0x1bce35;}_createCommentInputView(){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x5c16e6=new St(this['locale'],this['_config']['editorConfig']);return _0x5c16e6['value']=this['_model']['content'],_0x5c16e6['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x5c16e6['submitLabel']=Et(this['locale'],'Save'),_0x5c16e6['on']('submit',(_0x5572d6,_0xe33597)=>{this['fire']('updateComment',this['_model']['id'],_0xe33597),this['switchToDisplayMode'](),this['focus']();}),_0x5c16e6['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x5c16e6['once']('editorReady',()=>{_0x5c16e6['focus']();}),_0x5c16e6['createEditor'](),_0x5c16e6['delegate']('editorReady')['to'](this),_0x5c16e6['delegate']('editorDestroyed')['to'](this),_0x5c16e6;}_setupKeyboardNavigation(){const _0x50a3fd=this['element'];this['keystrokes']['listenTo'](_0x50a3fd);for(const _0x1d3c29 of this['focusables'])this['focusTracker']['add'](_0x1d3c29['element']),this['keystrokes']['listenTo'](_0x1d3c29['element']);this['focusables']['on']('change',(_0x113749,_0x3092d8)=>{for(const _0x2afe99 of _0x3092d8['removed'])this['focusTracker']['remove'](_0x2afe99['element']),this['keystrokes']['stopListening'](_0x2afe99['element']);for(const _0x57b808 of _0x3092d8['added'])this['focusTracker']['add'](_0x57b808['element']),this['keystrokes']['listenTo'](_0x57b808['element']);}),this['keystrokes']['set']('enter',(_0x146b68,_0x32c5fa)=>{_0x50a3fd===_0x146b68['target']&&(this['focusCycler']['focusFirst'](),_0x32c5fa());}),this['keystrokes']['set']('esc',(_0x4c3aae,_0xa7e62f)=>{_0x50a3fd!==_0x4c3aae['target']&&(this['focus'](),_0xa7e62f());});}};const Gt=/* #__PURE__ -- @preserve */
28
+ _0x3889f7(Kt);var Yt=class extends Gt{actionBar;['userView'];constructor(_0x49bab4,_0x409d7a,_0x34e98f){super(_0x49bab4,_0x409d7a,_0x34e98f),this['set']('actionIndicator',null),this['set']('placeholder',Et(_0x49bab4,'Reply...')),this['bind']('authoredAt')['to'](_0x409d7a),this['bind']('resolvedAt')['to'](_0x409d7a),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 _0x4969de(_0x49bab4,_0x409d7a['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x409d7a,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}getTemplate(){const _0x3e09b2=this['bindTemplate'],_0x4346b0=[{'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':_0x3e09b2['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x3e09b2['to']('authoredAt',_0xc061f8=>this['_config']['formatDateTime'](_0xc061f8))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x3e09b2['if']('isEditMode','ck-comment__actions--hidden'),_0x3e09b2['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']&&_0x4346b0['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x3e09b2['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x3e09b2['if']('isEditMode','ck-comment--edit'),_0x3e09b2['if']('isSystemComment','ck-comment--info'),_0x3e09b2['to']('actionIndicator',_0x2ae63c=>_0x2ae63c?'ck-comment--'+_0x2ae63c:'')],'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':_0x4346b0}]}]};}_createEditButton(){const _0x2c8425=new _0x2ae0c1(this['locale']);return _0x2c8425['label']=Et(this['locale'],'Edit'),_0x2c8425['icon']=_0x3635b9,_0x2c8425['withText']=!0x0,_0x2c8425['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x2c8425['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2c00c5=>!_0x2c00c5),_0x2c8425['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x2c8425['on']('execute',()=>this['switchToEditMode']()),_0x2c8425;}_createRemoveButton(){const _0x5ab5bb=new _0x2ae0c1(this['locale']);return _0x5ab5bb['label']=Et(this['locale'],'Remove'),_0x5ab5bb['icon']=_0xf5f2da,_0x5ab5bb['withText']=!0x0,_0x5ab5bb['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x5ab5bb['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5c3790=>!_0x5c3790),_0x5ab5bb['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x5ab5bb['on']('execute',()=>{this['showConfirm'](Et(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x5ab5bb;}_createDropdown(){const _0x1d8f83=ct(this['locale'],_0xf3e567),_0x5cc025=_0x1d8f83['panelView']['children'],_0x178fb0=new ot(this['locale']),_0x138338=_0x1d8f83['bindTemplate'];dt(_0x1d8f83,()=>this['items']['find'](_0x28e9b7=>_0x28e9b7['isVisible'])),_0x1d8f83['extendTemplate']({'attributes':{'class':[_0x138338['if']('isVisible','ck-hidden',_0x556d24=>!_0x556d24)]}});const _0x29fdc3=(_0x282ea1,_0x358a8f=-0x1)=>{const _0x2595a0=new nt(this['locale']);_0x2595a0['children']['add'](_0x282ea1);const _0x13d4de=_0x358a8f>-0x1?_0x358a8f:_0x178fb0['items']['length'];_0x178fb0['items']['add'](_0x2595a0,_0x13d4de);const _0x3318ef=Array['from'](this['items']);_0x1d8f83['unbind']('isEnabled','isVisible'),_0x1d8f83['bind']('isEnabled')['toMany'](_0x3318ef,'isEnabled',(..._0x5d63af)=>_0x5d63af['some'](_0x4fe6ec=>_0x4fe6ec)),_0x1d8f83['bind']('isVisible')['toMany'](_0x3318ef,'isVisible',(..._0x5757fb)=>_0x5757fb['some'](_0x43ca40=>_0x43ca40));};_0x1d8f83['panelPosition']='sw',_0x1d8f83['buttonView']['set']({'label':Et(this['locale'],'Show\x20more\x20items'),'icon':_0x133fc1});for(const _0x23d8db of this['items'])_0x29fdc3(_0x23d8db);return _0x5cc025['add'](_0x178fb0),_0x1d8f83['listenTo'](this['items'],'add',(_0x24d88a,_0x412b76,_0x1470dc)=>{_0x29fdc3(_0x412b76,_0x1470dc);}),_0x1d8f83['listenTo'](this['items'],'remove',(_0x5515e6,_0x50a973,_0x150dfe)=>{_0x178fb0['items']['remove'](_0x150dfe);}),_0x1d8f83;}_attachActions(_0x67e2e0,_0x3bf26a){const _0xce3c20=_0x67e2e0&&_0x67e2e0['element'];_0xce3c20&&(this['listenTo'](_0xce3c20,'mouseenter',()=>this['actionIndicator']=_0x3bf26a),this['listenTo'](_0xce3c20,'focus',()=>this['actionIndicator']=_0x3bf26a),this['listenTo'](_0xce3c20,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0xce3c20,'blur',()=>this['actionIndicator']=null));}_createCommentInputView(){const _0xf740f2=super['_createCommentInputView']();return _0xf740f2['bind']('placeholder')['to'](this),_0xf740f2;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}};function Xt(_0x5b7852){const _0x1a1357=_0x4dfc04(_0x5b7852,0x1e),_0x2ba81a=new MutationObserver(_0x47691c=>{for(const _0x4e99d2 of _0x47691c)('attributes'==_0x4e99d2['type']&&'class'==_0x4e99d2['attributeName']||'childList'==_0x4e99d2['type']||'characterData'==_0x4e99d2['type'])&&_0x1a1357();});return{'attach'(_0x463e1e){_0x2ba81a['observe'](_0x463e1e,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x2ba81a['disconnect'](),_0x1a1357['cancel']();}};}var qt=class extends ht{['focusTracker'];['id'];keystrokes;content;['mainView'];_mutationObserver;constructor(_0x494998,_0x451048){super(_0x494998),this['id']=_0x3bddc2(),this['focusTracker']=new _0x470ed5(),this['keystrokes']=new _0x5f0d58(),this['keystrokes']['set']('Esc',(_0x4b839e,_0x23e5e8)=>this['fire']('Esc',_0x23e5e8)),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'](_0x451048),this['mainView']=_0x451048;const _0x35519d=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x35519d['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 _0x26e578=this['element']['clientHeight'];_0x26e578&&(this['height']=_0x26e578);}};const jt=/* #__PURE__ -- @preserve */
29
+ _0x3cf599();var $t=class Annotation extends jt{['view'];focusableElements;_type;_target;constructor({view:_0xe87f51,target:_0x1c510f,type:_0x9877d4,isVisible:_0x592921=!0x0}){super(),this['view']=_0xe87f51,this['view']['element']||this['view']['render'](),this['_type']=_0x9877d4,this['_target']=_0x1c510f,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x74a9da([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0xf62cbc,_0x458a8c)=>{this['view']['focusTracker']['add'](_0x458a8c);}),this['focusableElements']['on']('remove',(_0x238fc3,_0x54b1a0)=>{this['view']['focusTracker']['remove'](_0x54b1a0);}),this['set']('isVisible',_0x592921);}get type(){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get target(){const _0x23086e=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x23086e),_0x23086e;}get targetRect(){const _0x33d0bb=this['target'];if(null===_0x33d0bb)return null;if(_0x33d0bb instanceof _0x4ec4d8)return _0x33d0bb;const _0x45e2c7=_0x33d0bb['filter'](_0x4ed19d=>function(_0x4741d6){return!!_0x4741d6['offsetParent']||!!_0x4741d6['getClientRects']()['item'](0x0);}(_0x4ed19d));return 0x0===_0x45e2c7['length']?null:_0x4ec4d8['getDomElementRects'](_0x45e2c7[0x0])[0x0];}get isActive(){return this['view']['isActive'];}set isActive(_0x201fc0){this['view']['isActive']=_0x201fc0,this['view']['mainView']['isActive']=_0x201fc0;}updateTargetRect(){this['view']['targetRect']=this['targetRect'];}destroy(){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}refreshVisibility(){this['isVisible']=!!this['targetRect'];}static _assertCorrectTarget(_0xe5a134){if(!(null===_0xe5a134||_0xe5a134 instanceof _0x4ec4d8||Array['isArray'](_0xe5a134)&&_0xe5a134['every'](_0x11eac6=>zt(_0x11eac6))))throw new _0x12f3e5('annotation-invalid-target',null,{'target':_0xe5a134});}_getNormalizedTarget(){const _0x226c21='function'==typeof this['_target']?this['_target']():this['_target'];return zt(_0x226c21)?[_0x226c21]:_0x226c21;}};function zt(_0x222179){return null!==_0x222179&&'object'==typeof _0x222179&&'nodeType'in _0x222179&&0x1===_0x222179['nodeType'];}var Jt=class extends _0x74a9da{_innerViewToAnnotation;_viewToAnnotation;['_focusTracker'];constructor(_0x2cd4ec=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x470ed5(),this['_focusTracker']['on']('change:isFocused',(_0x1b6ad5,_0x194bb1,_0x1a0da7)=>{_0x1a0da7||this['fire']('blur');});for(const _0x35dc70 of _0x2cd4ec)this['add'](_0x35dc70);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x323349){if(this['has'](_0x323349))throw new _0x12f3e5('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x323349['innerView'],_0x323349),this['_viewToAnnotation']['set'](_0x323349['view'],_0x323349);for(const _0x4f1061 of _0x323349['focusableElements'])this['_focusTracker']['add'](_0x4f1061);if(this['listenTo'](_0x323349['focusableElements'],'add',(_0x44ca18,_0x4fa423)=>{this['_focusTracker']['add'](_0x4fa423);}),this['listenTo'](_0x323349['focusableElements'],'remove',(_0x25000a,_0x43ebaf)=>{this['_focusTracker']['remove'](_0x43ebaf);}),this['listenTo'](_0x323349['view']['focusTracker'],'change:isFocused',(_0x402506,_0x60f636,_0x3c8ff8)=>{_0x3c8ff8&&this['fire']('focus',_0x323349);}),_0x323349['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0xcac9c8 of this)_0xcac9c8['updateTargetRect']();}const _0x481740=this['_getOrderInContent'](_0x323349['view']['targetRect']);return super['add'](_0x323349,_0x481740);}['remove'](_0x4ef011){if(!this['has'](_0x4ef011))throw new _0x12f3e5('annotationcollection-not-existing-item',null);this['stopListening'](_0x4ef011['view']['focusTracker']),this['stopListening'](_0x4ef011['focusableElements']);for(const _0x1307d7 of _0x4ef011['focusableElements'])this['_focusTracker']['remove'](_0x1307d7);return this['_viewToAnnotation']['delete'](_0x4ef011['view']),this['_innerViewToAnnotation']['delete'](_0x4ef011['innerView']),super['remove'](_0x4ef011);}getByInnerView(_0x2d30a5){return this['_innerViewToAnnotation']['get'](_0x2d30a5);}getByView(_0x324134){return this['_viewToAnnotation']['get'](_0x324134);}destroy(){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}refreshPositioning(){for(const _0xbe8cc0 of this)_0xbe8cc0['updateTargetRect']();this['_sort']();}_sort(){const _0x6fb26b=Array['from'](this)['sort']((_0x2ee356,_0x37fcec)=>Zt(_0x2ee356['view']['targetRect'],_0x37fcec['view']['targetRect']));for(let _0x75f7e7=_0x6fb26b['length']-0x1;_0x75f7e7>0x0;_0x75f7e7--){const _0x22eb17=_0x6fb26b[_0x75f7e7];_0x75f7e7!==this['getIndex'](_0x22eb17)&&(this['remove'](_0x22eb17),this['add'](_0x22eb17));}}_getOrderInContent(_0xc99b67){let _0x3a2d08=0x0;if(!_0xc99b67)return this['length'];for(const _0x23047f of this){const _0xc46fde=_0x23047f['view']['targetRect'];if(_0xc46fde){if(Zt(_0xc99b67,_0xc46fde)<0x0)return _0x3a2d08;_0x3a2d08++;}}return _0x3a2d08;}_areCachedRectsStale(){const _0x81574c=this['get'](0x0);if(!_0x81574c)return!0x1;const _0x415a4d=_0x81574c['view']['targetRect'],_0x18c14d=_0x81574c['targetRect'];return!(!_0x415a4d||!_0x18c14d)&&(_0x415a4d['top']!==_0x18c14d['top']||_0x415a4d['left']!==_0x18c14d['left']);}};function Qt({source:_0x53de21,target:_0x322607,filter:_0x4d2364}){for(const _0x5814bb of _0x53de21)_0x4d2364(_0x5814bb)&&_0x322607['add'](_0x5814bb);_0x322607['listenTo'](_0x53de21,'add',(_0x2ac661,_0xc7e8b7)=>{_0x4d2364(_0xc7e8b7)&&_0x322607['add'](_0xc7e8b7);}),_0x322607['listenTo'](_0x53de21,'remove',(_0x321173,_0x5a4339)=>{_0x322607['has'](_0x5a4339)&&_0x322607['remove'](_0x5a4339);});}function Zt(_0x397e75,_0x284a26){if(null===_0x397e75&&null===_0x284a26)return 0x0;if(null===_0x397e75)return-0x1;if(null===_0x284a26)return 0x1;const _0x54cd68=_0x397e75['top']-_0x284a26['top'];return 0x0==_0x54cd68?_0x397e75['left']-_0x284a26['left']:_0x54cd68;}var ti=class extends _0x21a737{collection;_visibleAnnotations;static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1ba6d5){if(super(_0x1ba6d5),this['collection']=new Jt(),this['_visibleAnnotations']=new Jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x1ba6d5 instanceof _0x25a26d){const _0x209530=_0x1ba6d5['locale'];_0x1ba6d5['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':Et(_0x209530,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':Et(_0x209530,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':Et(_0x209530,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':Et(_0x209530,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':Et(_0x209530,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':Et(_0x209530,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':Et(_0x209530,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x5d0cc3){this['collection']['add'](_0x5d0cc3);}['remove'](_0x34aed5){this['collection']['remove'](_0x34aed5),_0x34aed5['destroy']();}refreshVisibility(){for(const _0x24aa84 of this['collection'])_0x24aa84['refreshVisibility']();}refreshPositioning(){this['_visibleAnnotations']['refreshPositioning']();}getByInnerView(_0x366529){return this['collection']['getByInnerView'](_0x366529);}deactivateAll(){this['fire']('_deactivateAllAnnotations');}destroy(){for(const _0x4470c1 of this['collection'])_0x4470c1['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}activate(_0xf82bd7){this['fire']('_activateAnnotation',_0xf82bd7);}createAnnotation(_0x1699ab){return new $t(_0x1699ab);}createAnnotationView(_0x29859d,_0x36da6f){return new qt(_0x29859d,_0x36da6f);}_addActiveAnnotation(_0x2e5b05){const _0x2b809e=new Set(this['activeAnnotations']);_0x2b809e['add'](_0x2e5b05),this['activeAnnotations']=_0x2b809e;}_removeActiveAnnotation(_0x4df7e7){const _0x3528a9=new Set(this['activeAnnotations']);_0x3528a9['delete'](_0x4df7e7),this['activeAnnotations']=_0x3528a9;}_bindAnnotationsToVisibleAnnotations(){const _0x5c87b2=this['collection'],_0x1186fc=this['_visibleAnnotations'];function _0x429392(_0x34cdd7){const _0x14fea4=_0x34cdd7['source'];_0x14fea4['isVisible']&&!_0x1186fc['has'](_0x14fea4)?_0x1186fc['add'](_0x14fea4):!_0x14fea4['isVisible']&&_0x1186fc['has'](_0x14fea4)&&_0x1186fc['remove'](_0x14fea4),_0x14fea4['view']['focusTracker']['remove'](_0x14fea4['view']['element']),_0x14fea4['view']['focusTracker']['add'](_0x14fea4['view']['element']);}this['listenTo'](_0x5c87b2,'add',(_0x581b92,_0x23a337)=>{_0x23a337['isVisible']&&_0x1186fc['add'](_0x23a337),this['listenTo'](_0x23a337,'change:isVisible',_0x429392);}),this['listenTo'](_0x5c87b2,'remove',(_0x4dd4e5,_0x10ab84)=>{_0x1186fc['has'](_0x10ab84)&&_0x1186fc['remove'](_0x10ab84),this['stopListening'](_0x10ab84,'change:isVisible',_0x429392);});}_setupEnterAnnotationKeystroke(){const _0x3adfaa=_0x26b37a=>{_0x26b37a['on']('ready',()=>{_0x26b37a['keystrokes']['set'](_0x43f05a,(_0x595f94,_0x529154)=>{const _0x45578b=_0x58013c(this['activeAnnotations']['values']());_0x45578b&&(_0x45578b['view']['focus'](),_0x529154());});});};this['context']instanceof _0x25a26d?_0x3adfaa(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x53f68d,_0x2c1365)=>{_0x3adfaa(_0x2c1365);});}_setupEscapeAnnotationHandling(){const _0x398c18=_0x1f4ab5=>{const _0x313106=_0x1f4ab5['source'],_0x165cc6=[];let _0x314a53;if(Array['isArray'](_0x313106['target'])){_0x314a53=_0x313106['target'][0x0],this['context']instanceof _0x25a26d?_0x165cc6['push'](this['context']):this['context']['editors']&&_0x165cc6['push'](...this['context']['editors']);for(const _0x1701f1 of _0x165cc6)for(const _0x529ee3 of _0x1701f1['editing']['view']['domRoots']['values']())if(_0x529ee3['contains'](_0x314a53))return void _0x1701f1['editing']['view']['focus']();_0x314a53['focus']();}};this['listenTo'](this['collection'],'add',(_0x465ce5,_0x46885b)=>{this['listenTo'](_0x46885b,'escape',_0x398c18,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x5421e9,_0x2f6490)=>{this['stopListening'](_0x2f6490,'escape',_0x398c18);});}};const ii=Symbol('noChannel'),ei={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},si=/* #__PURE__ -- @preserve */
30
+ _0x3cf599(),ni=/* #__PURE__ -- @preserve */
31
+ _0x3cf599();var oi=class extends _0x21a737{_threads;_threadToController;_viewToController;static get requires(){return[ti,_0x52842d,_0xe05215];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x86ee75){super(_0x86ee75),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0xf8ee89=this['context']['config'];_0xf8ee89['define']('comments.maxCommentsWhenCollapsed',0x2),_0xf8ee89['define']('comments.maxThreadTotalWeight',0x1f4),_0xf8ee89['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0xf8ee89['define']('comments.CommentThreadView',Ut),_0xf8ee89['define']('comments.CommentView',Yt),_0xf8ee89['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}init(){const _0x397e50=this['context']['plugins']['get'](ti);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x559778,_0x245f8e)=>this['_addCommentThread'](_0x245f8e)),this['on']('submitCommentThread',(_0x4e4321,_0x5f595d)=>this['_submitCommentThread'](_0x5f595d)),this['on']('resolveCommentThread',(_0x35f86d,_0x4b149c)=>this['_resolveCommentThread'](_0x4b149c)),this['on']('resolveCommentThread',(_0x2779f5,_0x18cb2b)=>this['_updateActiveAnnotation'](_0x18cb2b),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x16bdf9,_0xe5ac65)=>this['_reopenCommentThread'](_0xe5ac65)),this['on']('reopenCommentThread',(_0x88480a,_0x1b6462)=>this['_updateActiveAnnotation'](_0x1b6462),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x598be5,_0x25997f)=>this['_removeCommentThread'](_0x25997f)),this['on']('updateCommentThread',(_0x1661cf,_0x86201a)=>this['_updateCommentThread'](_0x86201a)),this['on']('updateCommentThread',(_0x4ae8a4,_0x56495f)=>this['_updateActiveAnnotation'](_0x56495f),{'priority':'lowest'}),this['on']('addComment',(_0x4d396d,_0x1f17b0)=>this['_addComment'](_0x1f17b0)),this['on']('updateComment',(_0x404438,_0x294782)=>this['_updateComment'](_0x294782)),this['on']('removeComment',(_0x546c97,_0x23b1dd)=>this['_removeComment'](_0x23b1dd)),this['on']('addComment',(_0x64d18a,{threadId:_0x36c434,isFromAdapter:_0x5eabf2})=>{if(_0x5eabf2)return;const _0x298504=this['getCommentThread'](_0x36c434),_0x220915=_0x298504&&this['_threadToController']['get'](_0x298504);_0x220915&&_0x220915['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x397e50,'change:activeAnnotations',(_0x180bac,_0x3eda77,_0x27a363)=>{const _0x177bca=Array['from'](_0x27a363)['map'](_0x286c06=>this['_viewToController']['get'](_0x286c06['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x177bca?_0x177bca['model']:null;});}set adapter(_0x39fd9d){if(this['_adapter'])throw new _0x12f3e5('commentsrepository-adapter-already-set');this['_adapter']=_0x39fd9d;}get adapter(){return this['_adapter'];}addCommentThread({channelId:_0x5948fc=ii,threadId:_0xb28b6f=_0x3bddc2(),comments:_0x1f346a=[],unlinkedAt:_0x20fa74=null,resolvedAt:_0x4f1ac3=null,resolvedBy:_0x14bb56=null,target:_0xd16780=null,context:_0x589758=null,attributes:_0x914138={},isResolvable:_0x3a3a66=!0x0,isSubmitted:_0x17d253=!0x1,isFromAdapter:_0x3e8b5d=!0x1}={}){return this['fire'](ai('addCommentThread',_0x5948fc),{'channelId':_0x5948fc,'threadId':_0xb28b6f,'comments':_0x1f346a,'unlinkedAt':_0x20fa74,'resolvedAt':_0x4f1ac3,'resolvedBy':_0x14bb56,'target':_0xd16780,'context':_0x589758,'attributes':_0x914138,'isFromAdapter':_0x3e8b5d,'isResolvable':_0x3a3a66,'isSubmitted':_0x17d253}),this['getCommentThread'](_0xb28b6f);}openNewCommentThread({channelId:_0x22de16=ii,threadId:_0x338bc4=_0x3bddc2(),target:_0x242a06,context:_0x1db078=null,isResolvable:_0x2630d6=!0x0}){if(this['_readOnlyChannels']['has'](_0x22de16)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x242a06)throw new _0x12f3e5('commentsrepository-missing-target');const _0x11abd6=this['addCommentThread']({'channelId':_0x22de16,'threadId':_0x338bc4,'target':_0x242a06,'context':_0x1db078,'isResolvable':_0x2630d6});if(!_0x11abd6)return null;const _0x51247a=this['_threadToController']['get'](_0x11abd6),_0x45969c=_0x51247a['view']['commentThreadInputView']['commentInputView'],_0x331e29=this['context']['plugins']['get'](ti),_0x4ef3a8=_0x331e29['getByInnerView'](_0x51247a['view']);return _0x331e29['activate'](_0x4ef3a8),_0x45969c['once']('editorReady',()=>_0x45969c['focus']()),_0x11abd6;}hasCommentThread(_0x44e35a){if('string'!=typeof _0x44e35a)throw new _0x12f3e5('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x44e35a);}updateCommentThread({channelId:_0x2a8d96=ii,threadId:_0x57595c,context:_0xbd458b,unlinkedAt:_0x457d3c,attributes:_0x38ff44,isFromAdapter:_0x28e7cb=!0x1}){return this['fire'](ai('updateCommentThread',_0x2a8d96),{'channelId':_0x2a8d96,'threadId':_0x57595c,'context':_0xbd458b,'unlinkedAt':_0x457d3c,'attributes':_0x38ff44,'isFromAdapter':_0x28e7cb}),this['getCommentThread'](_0x57595c);}getCommentThread(_0x2d0585){if('string'!=typeof _0x2d0585)throw new _0x12f3e5('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x2d0585);}fetchCommentThread({channelId:_0x4b50fc,threadId:_0x422310}={}){const _0x57f29b=this['getCommentThread'](_0x422310);if(_0x57f29b)return Promise['resolve'](_0x57f29b);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x12f3e5('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x4b50fc,'threadId':_0x422310})['then'](_0x5db693=>this['hasCommentThread'](_0x422310)?this['getCommentThread'](_0x422310):_0x5db693?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x4b50fc},_0x5db693)):void 0x0)['catch'](_0x53e400=>{throw console['error'](_0x53e400),new _0x12f3e5('commentsrepository-fetch-comment-thread',this['context']);});}getCommentThreads({channelId:_0x5124b7,skipNotAttached:_0x166182=!0x1,skipEmpty:_0x4ef349=!0x1,toJSON:_0x15a773=!0x1}={}){const _0x58ab42=[];for(const _0x1ce0c2 of this['_threads']['values']())_0x5124b7&&_0x1ce0c2['channelId']!==_0x5124b7||_0x166182&&!_0x1ce0c2['isAttached']||_0x4ef349&&0x0===_0x1ce0c2['length']||_0x58ab42['push'](_0x1ce0c2);return _0x15a773?_0x58ab42['map'](_0x27390e=>_0x27390e['toJSON']()):_0x58ab42;}getAnnotationForCommentThread(_0xe5f8cd){const _0x4a2696=this['_threadToController']['get'](_0xe5f8cd);return _0x4a2696&&this['context']['plugins']['get'](ti)['getByInnerView'](_0x4a2696['view'])||null;}getCommentThreadForAnnotation(_0x1c3b9f){const _0x311706=this['_viewToController']['get'](_0x1c3b9f['innerView']);return _0x311706?_0x311706['model']:null;}setActiveCommentThread(_0x9c4b7){const _0x226f6c=this['context']['plugins']['get'](ti);if(!_0x9c4b7)return void(this['activeCommentThread']&&_0x226f6c['deactivateAll']());const _0xf21fb3=this['getCommentThread'](_0x9c4b7);if(!_0xf21fb3)throw new _0x12f3e5('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x9c4b7});if(!this['_threadToController']['has'](_0xf21fb3))throw new _0x12f3e5('commentsrepository-active-not-attached',null,{'threadId':_0x9c4b7});const _0x21237a=_0x226f6c['getByInnerView'](this['_threadToController']['get'](_0xf21fb3)['view']);_0x226f6c['activate'](_0x21237a);}switchReadOnly(_0x2163cd,_0x3aac7e){_0x2163cd?this['_readOnlyChannels']['add'](_0x3aac7e):this['_readOnlyChannels']['delete'](_0x3aac7e),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x4fa477){return this['_readOnlyChannels']['has'](_0x4fa477)||this['_readOnlyChannels']['has'](void 0x0);}createCommentThreadController(_0x3010f9,_0xb0b07e){return new bt(_0x3010f9,_0xb0b07e);}setPermissions(_0x41fe36,_0xc604f3=ii){this['_permissions']['set'](_0xc604f3,_0x41fe36),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}getPermissions(_0x4e823e=ii){return this['_permissions']['has'](_0x4e823e)?this['_permissions']['get'](_0x4e823e):ei;}_addCommentThread({channelId:_0xb4089b,threadId:_0x26181c,comments:_0x32b370,unlinkedAt:_0x135caf,resolvedAt:_0x3a553,resolvedBy:_0x494ab2,target:_0x4d4fe9,context:_0x2fd668,attributes:_0x54eb44,isFromAdapter:_0x24839b,isResolvable:_0x16f6a1,isSubmitted:_0x32f777}){if('string'!=typeof _0x26181c)throw new _0x12f3e5('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x26181c});if(this['hasCommentThread'](_0x26181c))throw new _0x12f3e5('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x26181c});const _0x500d09=new ri(this,{'channelId':_0xb4089b,'id':_0x26181c,'context':_0x2fd668,'attributes':_0x54eb44,'unlinkedAt':_0x135caf,'resolvedAt':_0x3a553,'resolvedBy':_0x494ab2?this['context']['plugins']['get'](_0xe05215)['getUser'](_0x494ab2):null,'isResolvable':_0x16f6a1,'isSubmitted':_0x32f777||_0x24839b});this['_threads']['set'](_0x26181c,_0x500d09);for(const _0x3df382 of _0x32b370)_0x500d09['_add'](this['_createNewComment']({'threadId':_0x26181c,..._0x3df382}));return _0x4d4fe9&&_0x500d09['attachTo'](_0x4d4fe9),_0x24839b||!_0x500d09['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0xb4089b,'threadId':_0x26181c});}_submitCommentThread({channelId:_0x27af09,threadId:_0x53425b}){if(!this['hasCommentThread'](_0x53425b))throw new _0x12f3e5('commentsrepository-missing-comment-thread',this);const _0x30a44c=this['getCommentThread'](_0x53425b);if(_0x30a44c['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x31cc1a,comments:_0x544851,resolvedAt:_0x45def1,resolvedBy:_0x29fecf,context:_0x2999bb,attributes:_0x2e04a9}=_0x30a44c,_0x44a1ca=this['context']['plugins']['get']('PendingActions'),_0x6d2053=_0x44a1ca['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x27af09,'threadId':_0x31cc1a,'comments':_0x544851['map'](_0x5f64be=>_0x5f64be['toJSON']()),'resolvedAt':_0x45def1,'resolvedBy':_0x29fecf?_0x29fecf['id']:_0x29fecf,'context':_0x2999bb,'attributes':_0x2e04a9})['then'](({comments:_0x712249})=>{_0x44a1ca['remove'](_0x6d2053);for(const _0x39517a of _0x712249)this['_updateComment']({'channelId':_0x27af09,'threadId':_0x53425b,'commentId':_0x39517a['commentId'],'createdAt':_0x39517a['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x323fca=>{throw console['error'](_0x323fca),new _0x12f3e5('commentsrepository-add-comment-thread-internal-error',this);});}_attachCommentThread({threadId:_0x54f645,target:_0xdeea7e}){const _0x4785dd=this['getCommentThread'](_0x54f645);if(!_0x4785dd)throw new _0x12f3e5('commentsrepository-attach-missing-comment-thread',this);const _0x2980b2=this['context']['plugins']['get']('PendingActions'),_0x28a4fe=this['context']['plugins']['get'](ti),_0xa0f823=this['_createCommentThreadView'](_0x4785dd),_0x371377=new bt(_0x4785dd,_0xa0f823);let _0x215afe=null;_0xa0f823['on']('change:isDirty',(_0x1afbef,_0x45481e,_0x32b3bb)=>{_0x32b3bb?_0x215afe=_0x2980b2['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x215afe&&(_0x2980b2['remove'](_0x215afe),_0x215afe=null);}),this['_threadToController']['set'](_0x4785dd,_0x371377),this['_viewToController']['set'](_0xa0f823,_0x371377);const _0x5ba900=new qt(this['context']['locale'],_0xa0f823);_0x5ba900['bind']('length')['to'](_0xa0f823),_0x5ba900['bind']('isDirty')['to'](_0xa0f823,'isDirty',_0xa0f823,'length',(_0x20b8b0,_0x4129b0)=>_0x20b8b0||!_0x4129b0),_0x5ba900['bind']('isActive')['to'](_0xa0f823),_0x5ba900['type']='comment';const _0x115fab=new $t({'view':_0x5ba900,'target':_0xdeea7e,'type':'comment','isVisible':!_0x4785dd['archivedAt']&&!!('function'==typeof _0xdeea7e?_0xdeea7e():_0xdeea7e)});return _0xa0f823['on']('escape',()=>{_0x115fab['fire']('escape');}),this['_bindAnnotationToEditors'](_0xa0f823,_0x115fab),_0x28a4fe['add'](_0x115fab),_0x115fab;}_bindAnnotationToEditors(_0x5e12d7,_0x186338){this['listenTo'](_0x5e12d7,'editorReady',(_0x182051,_0x326361)=>{const _0xbfc578=_0x326361['ui']['view']['body']['bodyCollectionContainer'];_0x186338['focusableElements']['add'](_0xbfc578),this['context']instanceof _0x25a26d&&this['context']['ui']['focusTracker']['add'](_0xbfc578);},{'priority':'highest'}),this['listenTo'](_0x5e12d7,'editorDestroyed',(_0x5f5c27,_0x3997e2)=>{const _0x20d4ec=_0x3997e2['ui']['view']['body']['bodyCollectionContainer'];_0x186338['focusableElements']['has'](_0x20d4ec)&&_0x186338['focusableElements']['remove'](_0x20d4ec),this['context']instanceof _0x25a26d&&this['context']['ui']['focusTracker']['remove'](_0x20d4ec);});}_unbindEditors(_0x40eb8c){this['stopListening'](_0x40eb8c,'editorReady'),this['stopListening'](_0x40eb8c,'editorDestroyed');}_createCommentThreadView(_0x18b003){const _0x59e3ca=this['context']['plugins']['get'](_0xe05215),{config:_0x6cfce,locale:_0x2da68f}=this['context'],_0x526049=_0x45cc(_0x6cfce['get']('locale'),_0x2da68f);return new(0x0,(_0x6cfce['get']('comments'))['CommentThreadView'])(_0x2da68f,_0x18b003,_0x59e3ca['me'],{'editorConfig':{..._0x6cfce['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x6cfce['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x6cfce['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x6cfce['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x6cfce['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x526049,'CommentView':_0x6cfce['get']('comments')['CommentView']});}_resolveCommentThread({threadId:_0x511f28,channelId:_0x5ddfea,resolvedAt:_0xdf72d6,resolvedBy:_0x55fa33,isFromAdapter:_0x17fc1f}){if(!this['hasCommentThread'](_0x511f28))throw new _0x12f3e5('commentsrepository-missing-comment-thread',null,{'threadId':_0x511f28});const _0x3674f8=this['getCommentThread'](_0x511f28);if(_0x3674f8['isResolved'])throw new _0x12f3e5('commentsrepository-resolved-comment-thread',null,{'threadId':_0x511f28});const _0x1ab700=this['context']['plugins']['get'](_0xe05215);if(_0x3674f8['resolvedBy']=_0x1ab700['getUser'](_0x55fa33),_0x3674f8['resolvedAt']=_0xdf72d6,_0x17fc1f||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x4bd259=this['context']['plugins']['get']('PendingActions'),_0x229f89=_0x4bd259['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x5ddfea,'threadId':_0x511f28})['then'](({resolvedAt:_0x15667e,resolvedBy:_0x211dcd})=>{_0x4bd259['remove'](_0x229f89),_0x3674f8['resolvedBy']['id']!==_0x211dcd&&(_0x3674f8['resolvedBy']=_0x1ab700['getUser'](_0x211dcd)),_0x3674f8['resolvedAt']=_0x15667e;})['catch'](_0x1d68ac=>{throw console['error'](_0x1d68ac),new _0x12f3e5('commentsrepository-resolve-comment-thread-internal-error',this);});}_reopenCommentThread({threadId:_0xfd92bc,channelId:_0xa3a147,isFromAdapter:_0xa53bd8}){if(!this['hasCommentThread'](_0xfd92bc))throw new _0x12f3e5('commentsrepository-missing-comment-thread',null,{'threadId':_0xfd92bc});const _0x53b92d=this['getCommentThread'](_0xfd92bc);if(!_0x53b92d['isResolved'])throw new _0x12f3e5('commentsrepository-reopen-comment-thread',null,{'threadId':_0xfd92bc});if(_0x53b92d['resolvedBy']=null,_0x53b92d['resolvedAt']=null,_0xa53bd8||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x1a9bfe=this['context']['plugins']['get']('PendingActions'),_0x531ec1=_0x1a9bfe['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0xa3a147,'threadId':_0xfd92bc})['then'](()=>_0x1a9bfe['remove'](_0x531ec1))['catch'](_0x3433fd=>{throw console['error'](_0x3433fd),new _0x12f3e5('commentsrepository-reopen-comment-thread-internal-error',this);});}_removeCommentThread({threadId:_0x589745,isFromAdapter:_0x50f22b}){const _0x24e29f=this['getCommentThread'](_0x589745);if(!_0x24e29f)throw new _0x12f3e5('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x589745),this['_threads']['delete'](_0x589745),!_0x24e29f['isSubmitted']||_0x50f22b||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x21375f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x599473}=_0x24e29f,_0x5e576e=_0x21375f['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x599473,'threadId':_0x589745})['then'](()=>_0x21375f['remove'](_0x5e576e))['catch'](_0x399cc2=>{throw console['error'](_0x399cc2),new _0x12f3e5('commentsrepository-remove-comment-thread-internal-error',this);});}_updateCommentThread({threadId:_0x5a81af,unlinkedAt:_0x359e94,context:_0x21b174,attributes:_0x1eed06,isFromAdapter:_0x344553}){if('string'!=typeof _0x5a81af)throw new _0x12f3e5('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x5a81af});if(!this['hasCommentThread'](_0x5a81af))throw new _0x12f3e5('commentsrepository-missing-comment-thread',null,{'threadId':_0x5a81af});const _0x598bfb=this['getCommentThread'](_0x5a81af);let _0x2c2c90=!0x1;if(void 0x0!==_0x21b174&&_0x598bfb['context']!==_0x21b174&&(_0x598bfb['context']=_0x21b174,_0x2c2c90=!0x0),void 0x0!==_0x359e94&&_0x598bfb['unlinkedAt']!==_0x359e94&&(_0x598bfb['unlinkedAt']=_0x359e94,_0x2c2c90=!0x0),_0x1eed06&&!_0x549e41(_0x1eed06,_0x598bfb['attributes'])&&(_0x598bfb['attributes']=_0x1eed06,_0x2c2c90=!0x0),!_0x2c2c90)return Promise['resolve']();if(!_0x598bfb['isSubmitted']||_0x344553||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x362c12=this['context']['plugins']['get']('PendingActions'),{channelId:_0x247512}=_0x598bfb,_0x154647=_0x362c12['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x247512,'threadId':_0x5a81af,'context':_0x21b174,'unlinkedAt':_0x359e94,'attributes':_0x1eed06})['then'](()=>_0x362c12['remove'](_0x154647))['catch'](_0x30a4e4=>{throw console['error'](_0x30a4e4),new _0x12f3e5('commentsrepository-update-comment-thread-internal-error',this);});}_detachCommentThread(_0x5e28eb){const _0x183abf=this['context']['plugins']['get'](ti),_0x46bc1d=this['getCommentThread'](_0x5e28eb);if(_0x46bc1d['_isAttached']=!0x1,this['_threadToController']['has'](_0x46bc1d)){const _0x1b7678=this['_threadToController']['get'](_0x46bc1d),_0x69af35=_0x1b7678['view'],_0x4c5797=_0x183abf['getByInnerView'](_0x69af35);this['_threadToController']['delete'](_0x46bc1d),this['_viewToController']['delete'](_0x69af35),_0x4c5797&&_0x183abf['remove'](_0x4c5797),_0x1b7678['destroy'](),_0x69af35['destroy']()['then'](()=>{this['_unbindEditors'](_0x69af35);});}}_updateActiveAnnotation({threadId:_0x470f29,resolvedAt:_0x4b6b10,unlinkedAt:_0x50a283}){const _0x4dc3f6=!!_0x4b6b10,_0x57294f=this['context']['plugins']['get'](ti),_0x4bb5d0=this['getCommentThread'](_0x470f29);if(this['_threadToController']['has'](_0x4bb5d0)){const _0x2b9a68=this['_threadToController']['get'](_0x4bb5d0)['view'],_0x4eccfa=_0x57294f['getByInnerView'](_0x2b9a68);_0x4eccfa&&(_0x4dc3f6&&_0x57294f['_removeActiveAnnotation'](_0x4eccfa),_0x50a283?_0x4eccfa['isVisible']=!0x1:_0x4eccfa['refreshVisibility']());}}_getExternalAuthor(_0x4ea4e7){const _0x1f7ea7=this['context']['plugins']['get'](_0xe05215),_0x16c9fd=_0x5d8100('external:'+_0x4ea4e7),_0x35ed94=_0x1f7ea7['getUser'](_0x16c9fd);return _0x35ed94||_0x1f7ea7['addUser']({'id':_0x16c9fd,'name':_0x4ea4e7});}_createNewComment({threadId:_0x5c4a84,commentId:_0x3c78a4=_0x3bddc2(),content:_0x2ef28a,authorId:_0x3d2dbb,createdAt:_0x177462,attributes:_0x4c0f62}){if('string'!=typeof _0x3c78a4)throw new _0x12f3e5('commentsrepository-invalid-commentid');if('string'!=typeof _0x3d2dbb)throw new _0x12f3e5('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x2ef28a||!_0x2ef28a['trim']())throw new _0x12f3e5('commentsrepository-invalid-comment-content');const _0x499998=this['context']['plugins']['get'](_0xe05215)['getUser'](_0x3d2dbb);if(!_0x499998)throw new _0x12f3e5('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x3d2dbb});let _0x113689=null,_0x3d1638=_0x177462;return _0x4c0f62?.['@external']&&(_0x113689=this['_getExternalAuthor'](_0x4c0f62['@external']['authorName']),_0x3d1638=new Date(_0x4c0f62['@external']['createdAt'])),new hi(this,{'threadId':_0x5c4a84,'id':_0x3c78a4,'author':_0x113689||_0x499998,'creator':_0x499998,'content':_0x2ef28a,'createdAt':_0x177462,'authoredAt':_0x3d1638,'attributes':_0x4c0f62});}_addComment(_0x562bad){let {threadId:_0x30d611,content:_0x2e4a77,attributes:_0x1353cf,isFromAdapter:_0x451873}=_0x562bad;const _0x3b5aae=this['getCommentThread'](_0x562bad['threadId']);if(!_0x3b5aae)throw new _0x12f3e5('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x5d6569=this['_createNewComment'](_0x562bad),{id:_0x18fbb2}=_0x5d6569;if(_0x3b5aae['_add'](_0x5d6569),_0x451873||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x3b5aae['isSubmitted'])return Promise['resolve']();const _0x520d5c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x50d1f6}=_0x3b5aae,_0x457103=_0x520d5c['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x1353cf||(_0x1353cf={}),this['adapter']['addComment']({'channelId':_0x50d1f6,'threadId':_0x30d611,'commentId':_0x18fbb2,'content':_0x2e4a77,'attributes':_0x1353cf})['then'](_0x110b46=>{_0x520d5c['remove'](_0x457103),_0x110b46&&this['_updateComment']({'channelId':_0x50d1f6,'threadId':_0x30d611,'commentId':_0x18fbb2,'createdAt':_0x110b46['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4ba2c6=>{throw console['error'](_0x4ba2c6),new _0x12f3e5('commentsrepository-add-comment-internal-error',this);});}_updateComment({threadId:_0x287672,commentId:_0x1b5aad,content:_0x55ae99,createdAt:_0x576a47,attributes:_0x519057,isFromAdapter:_0x296b1f}){if(void 0x0!==_0x55ae99&&('string'!=typeof _0x55ae99||!_0x55ae99['trim']()['length']))throw new _0x12f3e5('commentsrepository-update-comment-invalid-content');const _0x2af92b=this['getCommentThread'](_0x287672),_0x32e9bf=_0x2af92b['getComment'](_0x1b5aad);if(!_0x32e9bf)throw new _0x12f3e5('commentsrepository-update-missing-comment',this);let _0x7757c7=!0x1;if(_0x55ae99&&_0x55ae99!==_0x32e9bf['content']&&(_0x32e9bf['isEditable']||_0x296b1f)&&(_0x32e9bf['content']=_0x55ae99,_0x7757c7=!0x0),_0x576a47&&_0x576a47!==_0x32e9bf['createdAt']&&(_0x32e9bf['createdAt']=_0x576a47,_0x32e9bf['isExternal']||(_0x32e9bf['authoredAt']=_0x576a47),_0x7757c7=!0x0),_0x519057&&!_0x549e41(_0x519057,_0x32e9bf['attributes'])&&(_0x32e9bf['attributes']=_0x519057,_0x7757c7=!0x0),!_0x7757c7)return Promise['resolve']();if(_0x2af92b['fire']('commentUpdated'),_0x296b1f||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x1a0396=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3f2b76}=this['getCommentThread'](_0x32e9bf['threadId']),_0x5d03a3=_0x1a0396['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x3f2b76,'threadId':_0x287672,'commentId':_0x1b5aad,'content':_0x55ae99,'attributes':_0x519057})['then'](()=>_0x1a0396['remove'](_0x5d03a3))['catch'](_0x423f57=>{throw console['error'](_0x423f57),new _0x12f3e5('commentsrepository-update-comment-internal-error',this);});}_removeComment({threadId:_0x1d6dc7,commentId:_0x15e6a0,isFromAdapter:_0x3b4194}){const _0x4674cb=this['getCommentThread'](_0x1d6dc7),_0x36a16c=_0x4674cb['getComment'](_0x15e6a0);if(!_0x36a16c)throw new _0x12f3e5('commentsrepository-remove-missing-comment',this);if(_0x4674cb['_remove'](_0x36a16c),_0x3b4194||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x30f549=this['context']['plugins']['get']('PendingActions'),{channelId:_0x41f37c}=_0x4674cb,_0x1c1163=_0x30f549['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x41f37c,'threadId':_0x1d6dc7,'commentId':_0x15e6a0})['then'](()=>_0x30f549['remove'](_0x1c1163))['catch'](_0x4c3638=>{throw console['error'](_0x4c3638),new _0x12f3e5('commentsrepository-remove-comment-internal-error',this);});}},ri=class extends si{['channelId'];['id'];_isAttached;_isSubmitted;comments;_repository;constructor(_0x305565,_0x257684){super();const _0x1fbff4=_0x257684['isResolvable'];this['channelId']=_0x257684['channelId'],this['id']=_0x257684['id'],this['comments']=new _0x74a9da(),this['_repository']=_0x305565,this['_isAttached']=!0x1,this['_isSubmitted']=_0x257684['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x305565,'_permissions',_0x305565,'_readOnlyChannels',()=>_0x305565['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x305565,'_permissions',()=>_0x305565['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x305565,'_permissions',()=>{const _0x5bc41e=_0x305565['getPermissions'](this['channelId']);return _0x5bc41e['write']||_0x5bc41e['admin'];}),this['bind']('isResolvable')['to'](_0x305565,'_permissions',()=>_0x1fbff4&&_0x305565['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x257684['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x5f5b6c,_0x4b0340)=>_0x5f5b6c?_0x4b0340?_0x5f5b6c<_0x4b0340?_0x5f5b6c:_0x4b0340:_0x5f5b6c:_0x4b0340),this['set']('unlinkedAt',_0x257684['unlinkedAt']||null),this['set']('resolvedAt',_0x257684['resolvedAt']||null),this['set']('resolvedBy',_0x257684['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x52bba1=>!!_0x52bba1),this['set']('attributes',_0x257684['attributes']||{});}get weight(){return Array['from'](this['comments'])['reduce']((_0x14a92d,_0x86c260)=>_0x14a92d+_0x86c260['weight'],0x0);}get length(){return this['comments']['length'];}get isAttached(){return this['_isAttached'];}get isSubmitted(){return this['_isSubmitted'];}submit(){const {channelId:_0x42c00f,id:_0x10249c}=this;this['_repository']['fire'](ai('submitCommentThread',_0x42c00f),{'channelId':_0x42c00f,'threadId':_0x10249c});}setUnlinkedAt(_0x33dc1b){this['_update']({'unlinkedAt':_0x33dc1b});}['resolve']({resolvedAt:_0x4df7ec=new Date(),resolvedBy:_0x5c5ce7='',isFromAdapter:_0x476da3=!0x1}={}){const _0x37c0b4=this['_repository']['context']['plugins']['get'](_0xe05215)['me'],{channelId:_0xeecb3,id:_0x15b8e6}=this;this['_repository']['fire'](ai('resolveCommentThread',_0xeecb3),{'channelId':_0xeecb3,'threadId':_0x15b8e6,'resolvedAt':_0x4df7ec,'resolvedBy':_0x5c5ce7||_0x37c0b4['id'],'isFromAdapter':_0x476da3});}['reopen']({isFromAdapter:_0x126d09=!0x1}={}){const {channelId:_0x25f19e,id:_0xf0ac9d}=this;this['_repository']['fire'](ai('reopenCommentThread',_0x25f19e),{'channelId':_0x25f19e,'threadId':_0xf0ac9d,'isFromAdapter':_0x126d09});}setContext(_0x4e2b68){this['context']||this['_update']({'context':_0x4e2b68});}setAttribute(_0x1ea1f1,_0x38014b){const _0x599cc7=_0x35c719(this['attributes']);_0x4fcc2a(_0x599cc7,_0x1ea1f1,_0x38014b),this['_update']({'attributes':_0x599cc7});}removeAttribute(_0x1fc009){const _0x4f390b=_0x35c719(this['attributes']);_0x396038(_0x4f390b,_0x1fc009),this['_update']({'attributes':_0x4f390b});}['remove']({isFromAdapter:_0x33774=!0x1}={}){const {channelId:_0x3e141a,id:_0x24e675}=this;this['_repository']['fire'](ai('removeCommentThread',_0x3e141a),{'channelId':_0x3e141a,'threadId':_0x24e675,'isFromAdapter':_0x33774});}attachTo(_0x447d8b){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x447d8b});}addComment(_0x2f9d3b){const {channelId:_0x56d7c0,id:_0x54fe75}=this;this['_repository']['fire'](ai('addComment',_0x56d7c0,_0x54fe75),Object['assign']({'channelId':_0x56d7c0,'threadId':_0x54fe75},_0x2f9d3b));}getComment(_0x391f57){if('string'!=typeof _0x391f57)throw new _0x12f3e5('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x391f57});return this['comments']['get'](_0x391f57);}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'](_0x3a3ac0=>_0x3a3ac0['toJSON']()),'attributes':this['attributes']};}['_add'](_0x4007cd){return this['listenTo'](_0x4007cd,'change:authoredAt',()=>{const _0x292356=this['_findOptimalIndex'](_0x4007cd),_0x48a31a=this['comments'];_0x292356-0x1!=_0x48a31a['getIndex'](_0x4007cd)&&_0x292356+0x1!=_0x48a31a['getIndex'](_0x4007cd)&&(this['_remove'](_0x4007cd),this['_add'](_0x4007cd));}),this['comments']['add'](_0x4007cd,this['_findOptimalIndex'](_0x4007cd));}_update(_0x4ecbb5){const {channelId:_0x8e1cb9,id:_0x40643c}=this;this['_repository']['fire'](ai('updateCommentThread',_0x8e1cb9),{..._0x4ecbb5,'channelId':_0x8e1cb9,'threadId':_0x40643c});}['_remove'](_0x46880c){return this['stopListening'](_0x46880c),_0x46880c['destroy'](),this['comments']['remove'](_0x46880c);}_findOptimalIndex(_0x3dc2d2){const _0x252f62=this['comments']['find'](_0x5241ab=>new Date(_0x5241ab['authoredAt'])['getTime']()>new Date(_0x3dc2d2['authoredAt'])['getTime']());return _0x252f62?this['comments']['getIndex'](_0x252f62):this['length'];}},hi=class extends ni{['id'];threadId;author;creator;createdAt;_repository;constructor(_0x2935c0,_0x419661){super();const _0x340dc0=_0x2935c0['context']['plugins']['get'](_0xe05215)['me'],_0x3d6a46=_0x2935c0['getCommentThread'](_0x419661['threadId']),_0x1408e1=0x0===_0x3d6a46['comments']['length'],_0xc3272e=_0x340dc0===_0x419661['author'];this['id']=_0x419661['id'],this['threadId']=_0x419661['threadId'],this['author']=_0x419661['author'],this['creator']=_0x419661['creator'],this['set']('content',_0x419661['content']),this['createdAt']=_0x419661['createdAt']||new Date(),this['set']('authoredAt',_0x419661['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x3d6a46,'resolvedAt'),this['set']('attributes',_0x419661['attributes']||{}),this['bind']('isEditable')['to'](_0x2935c0,'_permissions',()=>{const _0x192000=_0x2935c0['getPermissions'](_0x3d6a46['channelId'])['write'],_0x244bd7=_0x2935c0['getPermissions'](_0x3d6a46['channelId'])['modifyAll'];return _0xc3272e&&_0x192000||!_0xc3272e&&_0x244bd7;}),this['bind']('isRemovable')['to'](_0x3d6a46,'isRemovable',_0x2935c0,'_permissions',_0x5d7040=>{const _0x380603=_0x2935c0['getPermissions'](_0x3d6a46['channelId'])['write'],_0x42991b=_0x2935c0['getPermissions'](_0x3d6a46['channelId'])['modifyAll'];return _0xc3272e&&_0x380603||_0x5d7040&&_0x1408e1||!_0xc3272e&&_0x42991b&&!_0x1408e1;}),this['bind']('isReadOnly')['to'](_0x3d6a46,'isReadOnly'),this['_repository']=_0x2935c0;}get isExternal(){return Boolean(this['attributes']&&this['attributes']['@external']);}get weight(){return Math['max'](function(_0x166484){const _0x4b7372=document['createElement']('div');return _0x4b7372['innerHTML']=_0x166484,_0x4b7372['textContent']['length'];}(this['content']),0xc8);}update(_0xfe2520){const {threadId:_0x5e5f5b,id:_0x5a76e4}=this;if(!this['_repository']['hasCommentThread'](_0x5e5f5b))throw new _0x12f3e5('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x21f5b9}=this['_repository']['getCommentThread'](_0x5e5f5b);this['_repository']['fire'](ai('updateComment',_0x21f5b9,_0x5e5f5b),{'channelId':_0x21f5b9,'threadId':_0x5e5f5b,'commentId':_0x5a76e4,..._0xfe2520});}setAttribute(_0x1f80a1,_0x46b956){const _0xa8321c=_0x35c719(this['attributes']);_0x4fcc2a(_0xa8321c,_0x1f80a1,_0x46b956),this['update']({'attributes':_0xa8321c});}removeAttribute(_0x182255){const _0x115dc5=_0x35c719(this['attributes']);_0x396038(_0x115dc5,_0x182255),this['update']({'attributes':_0x115dc5});}['remove'](_0x4fa8e6={}){if(!_0x4fa8e6['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x32cfc0,id:_0x4ea543}=this;if(!this['_repository']['hasCommentThread'](_0x32cfc0))throw new _0x12f3e5('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x156e56}=this['_repository']['getCommentThread'](_0x32cfc0);this['_repository']['fire'](ai('removeComment',_0x156e56,_0x32cfc0),{'channelId':_0x156e56,'threadId':_0x32cfc0,'commentId':_0x4ea543,..._0x4fa8e6});}toJSON(){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}destroy(){this['stopListening']();}};function ai(_0x5925ff,..._0x5da66c){for(const _0xec0655 of _0x5da66c)void 0x0!==_0xec0655&&(_0x5925ff+=':'+String(_0xec0655));return _0x5925ff;}var ci=class extends _0x3b25d1{constructor(_0x282fd8){super(_0x282fd8),this['set']('hasContent',!0x1);}['refresh'](){const _0x2ea0ec=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x26ad02 of _0x2ea0ec['getRanges']())if(this['_hasContent'](_0x26ad02))return void(this['hasContent']=!0x0);}execute({threadId:_0x32de53=_0x3bddc2(),ranges:_0x3f97b4,comment:_0x2a7e11}={}){const _0x1fb518=this['editor']['model'],_0x1a551b=_0x3f97b4??Array['from'](_0x1fb518['document']['selection']['getRanges']()),_0x116247=[];for(const _0x29903d of _0x1a551b)this['_hasContent'](_0x29903d)&&_0x116247['push'](this['_trimToContent'](_0x29903d));if(!_0x116247['length'])throw new _0x12f3e5('addcommentthreadcommand-incorrect-ranges',null);_0x2a7e11&&this['_createCommentThread'](_0x32de53,_0x2a7e11),this['_createMarkersFromRanges'](_0x32de53,_0x116247,!!_0x2a7e11);}_createMarkersFromRanges(_0x8cab8e,_0x2b5920,_0x27336d){this['editor']['model']['change'](_0x2ad1ca=>{for(const _0x57fe4d of _0x2b5920){const _0x4d5695='comment:'+_0x8cab8e+':'+_0x3bddc2()['substr'](0x1,0x5);_0x2ad1ca['addMarker'](_0x4d5695,{'range':_0x57fe4d,'usingOperation':_0x27336d,'affectsData':_0x27336d});}});}_createCommentThread(_0x112e95,_0x5b8903){const _0x57ad5b=this['editor']['plugins']['get']('CommentsRepository'),_0xfeae92=this['editor']['config']['get']('collaboration.channelId'),_0x94509a=this['editor']['plugins']['get']('Users')['me'];if(!_0x94509a)throw new _0x12f3e5('addcommentthreadcommand-user-not-found',null);_0x57ad5b['addCommentThread']({'threadId':_0x112e95,'channelId':_0xfeae92,'comments':[{'authorId':_0x94509a['id'],'content':_0x5b8903,'createdAt':new Date(),'attributes':{}}]});}_hasContent(_0xf67c0c){for(const _0x30ed4c of _0xf67c0c['getItems']())if(this['_itemIsContent'](_0x30ed4c))return!0x0;return!0x1;}_itemIsContent(_0x4aa64f){return _0x4aa64f['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x4aa64f)&&!_0x4aa64f['is']('element','tableCell');}_trimToContent(_0x51e96a){const _0xfcecc4=_0x5a825d=>!this['_itemIsContent'](_0x5a825d['item']),_0x541d2e=_0x51e96a['start']['getLastMatchingPosition'](_0xfcecc4),_0x81c9fa=_0x51e96a['end']['getLastMatchingPosition'](_0xfcecc4,{'direction':'backward'});return this['editor']['model']['createRange'](_0x541d2e,_0x81c9fa);}},di=class extends _0x2a49ac{_dataCollectors;_editorAnnotations;static get requires(){return[ti];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x327159){super(_0x327159),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}init(){const _0x54b23d=this['editor'],_0xfe72b8=_0x54b23d['model']['document']['selection'],_0x4bc08a=_0x51773f(()=>this['refreshSelectedViews'](),0xa);_0xfe72b8['on']('change:range',(_0x7f8439,_0x152f70)=>{_0x152f70['directChange']&&(_0x4bc08a['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x54b23d['editing']['view']['document'],'change:isFocused',(_0x418d6b,_0x2e21e0,_0x4bd076)=>{_0x4bd076&&_0x4bc08a();}),this['listenTo'](_0x54b23d['ui']['focusTracker'],'change:isFocused',(_0x1785f8,_0x511c6b,_0x52ab5e)=>{_0x52ab5e||this['fire']('blur',{'isAnnotationTracked':_0x2a923c=>this['_editorAnnotationsData']['has'](_0x2a923c['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}registerAnnotation(_0x5ef5fc){if(this['_editorAnnotations']['has'](_0x5ef5fc['view']))return;this['_editorAnnotations']['add'](_0x5ef5fc['view']),this['editor']['ui']['focusTracker']['add'](_0x5ef5fc['view']['element']);const _0x32c978=this['editor']['plugins']['get'](ti);this['listenTo'](_0x32c978['collection'],'remove',(_0x25d4da,_0x476a6c)=>{this['editor']['ui']['focusTracker']['remove'](_0x476a6c['view']['element']),this['_editorAnnotations']['delete'](_0x476a6c['view']);});}hasDomSelection(){return this['editor']['editing']['view']['hasDomSelection'];}addSourceCollector(_0x5d861c){if('function'!=typeof _0x5d861c)throw new _0x12f3e5('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x5d861c);}refreshSelectedViews(){this['fire']('refresh');}getOrderedSelectedAnnotations({activeAnnotation:_0x1f6da1,annotations:_0xcf708b}){const _0x35f308=[],_0x1bb13a=this['editor']['model']['document']['selection'],_0x516a0f=Array['from'](_0x1bb13a['getRanges']());for(const [_0x2e0c61,_0x456ce3]of this['_editorAnnotationsData']){const _0x8f3537=_0x278edd(_0x456ce3),_0x22b10e=_0xcf708b['getByInnerView'](_0x2e0c61);_0x8f3537&&_0x22b10e&&_0x35f308['push']({'annotation':_0x22b10e,'range':_0x8f3537});}function _0x278edd(_0x3109e9){for(const _0x1c14c1 of _0x3109e9)for(const _0x4735ce of _0x516a0f)if(_0x1c14c1['containsRange'](_0x4735ce,!_0x1bb13a['isCollapsed']))return _0x1c14c1;return null;}return _0x35f308['sort']((_0x342b6b,_0x5f2543)=>{const _0x29f42b=_0x342b6b['range'],_0x5b1813=_0x5f2543['range'];if(!_0x29f42b['isEqual'](_0x5b1813)){if(_0x29f42b['containsRange'](_0x5b1813,!0x0))return 0x1;if(_0x5b1813['containsRange'](_0x29f42b,!0x0))return-0x1;}return _0x342b6b['annotation']==_0x1f6da1?-0x1:_0x5f2543['annotation']==_0x1f6da1?0x1:0x0;})['map'](_0x5c2050=>_0x5c2050['annotation']);}get _editorAnnotationsData(){const _0x1dba50=new Map();for(const _0x38b652 of Array['from'](this['_dataCollectors']))for(const [_0x510af2,_0xdaac67]of _0x38b652())_0x1dba50['set'](_0x510af2,_0xdaac67);return _0x1dba50;}},li=class extends _0x2a49ac{afterInit(){const _0x3dfb64=this['editor'];_0x3dfb64['plugins']['has']('RestrictedEditingModeEditing')&&_0x3dfb64['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},mi=class extends _0x2a49ac{constructor(_0x1cb784){super(_0x1cb784),this['editor']['config']['define']('importWord.formatting.comments','basic');}afterInit(){const _0x131377=this['editor'],_0x4ac05d=_0x131377['commands']['get']('importWord'),_0x6f2d37=_0x131377['plugins']['get'](_0xe05215);_0x4ac05d&&(_0x4ac05d['on']('execute',(_0x4b1c1b,[,_0x12e47c])=>{_0x12e47c['collaboration_features']={'comments':!0x0,'user_id':_0x6f2d37['me']['id']};},{'priority':_0x34d937['high']+0xa}),this['listenTo'](_0x4ac05d,'dataInsert',this['_handleImportedData']));}_handleImportedData(_0x2af249,_0x37e499){const {comment_threads:_0x4b68c5}=_0x37e499;_0x4b68c5&&_0x4b68c5['forEach'](({thread_id:_0x26b3a0,comments:_0x14a64c,is_resolved:_0xfa5397})=>{const _0x2bf986=new Date(),_0x1d0aa4=_0x14a64c['map'](({author:_0x5f42ec,content:_0x362631,created_at:_0xc2dc82})=>({'content':_0x362631,'authorId':this['editor']['plugins']['get'](_0xe05215)['me']['id'],'createdAt':_0x2bf986,'attributes':{'@external':{'authorName':_0x5f42ec,'createdAt':_0xc2dc82?new Date(_0xc2dc82):new Date(),'source':'importWord'}}})),_0x3d2c89=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](oi)['addCommentThread']({'channelId':_0x3d2c89,'threadId':_0x26b3a0,'comments':_0x1d0aa4,'resolvedAt':_0xfa5397?_0x2bf986:null});});}},ui=class extends _0x2a49ac{constructor(_0x563f2a){super(_0x563f2a),this['editor']['config']['define']('comments.copyMarkers','default');}static get requires(){return[pt,wt];}afterInit(){const _0x4165a0=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x4165a0,'contentInsertion',(_0x1f0334,_0x442ef3)=>this['_removeMarkersWithoutThreads'](_0x442ef3['content']['markers']),{'priority':'highest'});}_removeMarkersWithoutThreads(_0x1df7bc){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x1df7bc;const _0x4566a1=this['editor']['plugins']['get']('CommentsRepository');for(const _0x31ea72 of _0x1df7bc['keys']()){const [_0x3a36c9,_0x32ccf1]=_0x31ea72['split'](':');'comment'!=_0x3a36c9||_0x4566a1['hasCommentThread'](_0x32ccf1)||_0x1df7bc['delete'](_0x31ea72);}return _0x1df7bc;}_registerMarkerInClipboardPipeline(){const _0x1e5013=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x4afe1d=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x4afe1d&&_0x1e5013['_registerMarkerToCopy']('comment',_0x4afe1d);}_mapCommentsCopyConfigToRegisterConfiguration(_0x230e30){switch(_0x230e30){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function fi(_0x4320ca){const _0x51e9fb=_0x4320ca['split'](':');return{'group':_0x51e9fb[0x0],'id':_0x51e9fb[0x1],'part':_0x51e9fb[0x2]};}var pi=class extends _0x2a49ac{init(){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}overrideMarkerConverters(){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x3dbb4d,_0x4469fd)=>{if(!_0x4469fd['options']['showCommentHighlights'])return null;if(_0x4469fd['options']['ignoreResolvedComments']){const {id:_0x5f3fca}=fi(_0x3dbb4d['markerName']);if(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x5f3fca)?.['isResolved']&&_0x3dbb4d['item'])return _0x4469fd['consumable']['consume'](_0x3dbb4d['item'],'addMarker:'+_0x3dbb4d['markerName']),_0x4469fd['consumable']['consume'](_0x3dbb4d['item'],'removeMarker:'+_0x3dbb4d['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x123a36=>{_0x123a36['on']('addMarker:comment',(_0x4ba412,_0x27f5bc,_0x509ac5)=>{if(!_0x509ac5['options']['showCommentHighlights'])return;const _0x1b3336=_0x27f5bc['item'];if(!_0x1b3336)return;const _0x27da28=_0x509ac5['mapper']['toViewElement'](_0x1b3336);this['editor']['model']['schema']['isObject'](_0x1b3336)&&_0x27da28&&!_0x27da28['getCustomProperty']('widget')&&_0x27da28['is']('containerElement')&&Ct(_0x27da28,_0x509ac5['writer']);},{'priority':'high'});});}overrideHorizontalRuleConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x3de0f0,{writer:_0x3c933c,options:_0x5d964b})=>{if(!_0x5d964b['showCommentHighlights'])return null;const _0x232031=_0x3c933c['createContainerElement']('div'),_0x46c5e9=_0x3c933c['createEmptyElement']('hr');return _0x3c933c['addClass']('ck-horizontal-line',_0x232031),_0x3c933c['insert'](_0x3c933c['createPositionAt'](_0x232031,0x0),_0x46c5e9),_0x232031;},'converterPriority':'high'});}overrideImageInlineConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x1f12c1,{writer:_0x1d63b3,options:_0x50635f})=>{if(!_0x50635f['showCommentHighlights'])return null;const _0x36b4f0=_0x1d63b3['createContainerElement']('span'),_0x22f8fd=_0x1d63b3['createEmptyElement']('img');return _0x1d63b3['addClass']('image-inline',_0x36b4f0),_0x1d63b3['insert'](_0x1d63b3['createPositionAt'](_0x36b4f0,0x0),_0x22f8fd),_0x36b4f0;},'converterPriority':'high'});}overrideMediaEmbedConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x3b10e3,{writer:_0x4f5dcd,options:_0x14f5f8})=>{if(_0x14f5f8['showCommentHighlights'])return _0x4f5dcd['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x4e8d82,_0x455a3a,_0x5492bb)=>{_0x5492bb['options']['showCommentHighlights']&&_0x4e8d82['stop']();},{'priority':'high'});}},wi=class extends _0x2a49ac{static get requires(){return[oi,di,_0xe05215,li,mi,ui,pi];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xdb31f){super(_0xdb31f),this['set']('isThreadsLoadingPaused',!0x0),_0xdb31f['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x53f5e1,_0x75745a,_0x33e658,_0x588a95)=>{const _0x224c7d=_0xdb31f['plugins']['get'](oi),_0x36e88c=_0x33e658?fi(_0x33e658)['id']:null;_0xdb31f['model']['change'](()=>{if(_0x36e88c){const _0x342b25=this['getAllMarkersForId'](_0x36e88c);for(const _0xae49fa of _0x342b25)_0xdb31f['editing']['reconvertMarker'](_0xae49fa);}if(_0x588a95){const {id:_0x5d77a2}=fi(_0x588a95),_0x38c898=_0x224c7d['getCommentThread'](_0x5d77a2);if(_0x38c898&&_0x38c898['unlinkedAt'])return;if(_0x38c898&&!_0x38c898['isAttached'])return;const _0x51d974=this['getAllMarkersForId'](_0x5d77a2);for(const _0x5745a2 of _0x51d974)_0xdb31f['editing']['reconvertMarker'](_0x5745a2);}}),_0x36e88c&&this['scrollToThreadMarker'](_0x36e88c);}),this['_initAriaMarkerChangeAnnouncements']();}init(){const _0x29b08c=this['editor'],_0xf9e2ac=_0x29b08c['plugins']['get'](oi),_0x46752f=_0x29b08c['config']['get']('collaboration.channelId'),_0x327385=_0xf9e2ac['getCommentThreads']()['filter'](_0x105328=>_0x105328['channelId']!==_0x46752f);_0x29b08c['commands']['add']('addCommentThread',new ci(_0x29b08c)),this['listenTo'](_0x29b08c,'change:isReadOnly',(_0x568529,_0x30126d,_0x30ec2a)=>{_0xf9e2ac['switchReadOnly'](_0x30ec2a,_0x29b08c['config']['get']('collaboration.channelId'));}),this['listenTo'](_0xf9e2ac,gi('addCommentThread',_0x46752f),(_0x1d3131,{threadId:_0xbce75e})=>{this['editor']['plugins']['get'](oi)['getCommentThread'](_0xbce75e)?.['unlinkedAt']&&this['_attachArchivedThread'](_0xbce75e);}),this['listenTo'](_0xf9e2ac,gi('removeCommentThread',_0x46752f),(_0x476d54,{threadId:_0x5cad80})=>{_0x29b08c['model']['enqueueChange']({'isUndoable':!0x1},_0x2be374=>{const _0x5c7a0d=this['getAllMarkersForId'](_0x5cad80);for(const _0x2f9d4a of _0x5c7a0d)_0x2be374['removeMarker'](_0x2f9d4a);});}),this['listenTo'](_0xf9e2ac,gi('resolveCommentThread',_0x46752f),(_0x4ecac3,{threadId:_0x39bdff})=>{this['_reconvertMarkers'](_0x39bdff);const _0xcb98e=this['editor']['plugins']['get'](ti);(this['editor']['editing']['view']['hasDomSelection']||_0xcb98e['collection']['isFocused'])&&(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x39bdff)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0xf9e2ac,gi('reopenCommentThread',_0x46752f),(_0x68dd00,{threadId:_0x17ddcd})=>{this['_reconvertMarkers'](_0x17ddcd);},{'priority':'low'}),this['listenTo'](_0xf9e2ac,gi('addComment',_0x46752f),(_0x2f1260,{threadId:_0xa9e48e,isFromAdapter:_0x360a2c})=>{const _0x37a42f=this['getAllMarkersForId'](_0xa9e48e);!_0x360a2c&&0x0!=_0x37a42f['length']&&_0xf9e2ac['hasCommentThread'](_0xa9e48e)&&0x1===_0xf9e2ac['getCommentThread'](_0xa9e48e)['length']&&_0x29b08c['model']['enqueueChange']({'isUndoable':!0x1},_0x11b845=>{for(const _0x783f8f of _0x37a42f)_0x11b845['updateMarker'](_0x783f8f,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x327385);}afterInit(){!async function(_0x27501b){const _0x104c59='KpOBJGNSEgqCyfVF1kZ8lbnRjM7eIzAsDQHw9aThu6rcYi05UmPL4d3X2Wotvx',_0x3b735d=0x79128,_0x24546c=window['Date']['now'](),_0x1aae0f=_0x27501b['editor'],_0x4a5876=new window['Promise'](_0x3b7832=>{_0x1aae0f['once']('ready',_0x3b7832);}),_0x188c9a={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x424569=_0x1aae0f['config']['get']('licenseKey');async function _0x250d5b(){let _0x48b1c9,_0x4a82e9=null,_0x37f985=null;try{return'GPL'==_0x424569?'NotAllowed':(_0x48b1c9=_0x157bea(),_0x48b1c9?(_0x48b1c9['usageEndpoint']&&(_0x37f985=_0x524a0b(_0x48b1c9['usageEndpoint'],_0x48b1c9['jti'])),await _0x3442a5()?_0xabfec5()?_0x56c3ac()?'Expired':_0x404a21()?('evaluation'==_0x48b1c9['licenseType']&&(_0x4a82e9=_0xd46b54('EvaluationLimit')),await _0x4e84c2()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x56c3ac(){const _0x3ee8b5=['evaluation','trial']['includes'](_0x48b1c9['licenseType'])?_0x24546c/0x3e8:0xe10*_0x3b735d;return _0x48b1c9['exp']<_0x3ee8b5;}function _0xabfec5(){const _0x59ed3e=_0x48b1c9['features'];if(!_0x59ed3e)return!0x1;if(_0x59ed3e['includes']('*'))return!0x0;if(_0x59ed3e['includes']('CMT'))return!0x0;if(_0x59ed3e['includes']('TRILIUM')&&_0xb2e1dc())return!0x0;if(_0x59ed3e['includes']('RCMT')){if(_0x841d42())return!0x0;if(_0x249622()||_0x841342())return!0x0;}return!0x1;}function _0x404a21(){const _0x560555=_0x48b1c9['licensedHosts'];if(!_0x560555||0x0==_0x560555['length'])return!0x0;const {hostname:_0x55cb65}=new URL(window['location']['href']);if(_0x560555['includes'](_0x55cb65))return!0x0;const _0x26dca9=_0x55cb65['split']('.');return _0x560555['filter'](_0x254639=>_0x254639['includes']('*'))['map'](_0x22ad35=>_0x22ad35['split']('.'))['filter'](_0xdffce1=>_0xdffce1['length']<=_0x26dca9['length'])['map'](_0x1d9392=>Array(_0x26dca9['length']-_0x1d9392['length'])['fill']('*'===_0x1d9392[0x0]?'*':'')['concat'](_0x1d9392))['some'](_0x48566f=>_0x26dca9['every']((_0x3f1a1b,_0x57e9cb)=>_0x48566f[_0x57e9cb]===_0x3f1a1b||'*'===_0x48566f[_0x57e9cb]));}function _0x4e84c2(){return _0x4a82e9&&_0x37f985?new window['Promise']((_0x4b9f58,_0x40c6fd)=>{_0x4a82e9['then'](_0x4b9f58,_0x40c6fd),_0x37f985['then'](_0x6d804c=>{'Valid'!=_0x6d804c&&_0x4b9f58(_0x6d804c);},_0x40c6fd);}):_0x4a82e9||_0x37f985||'Valid';}}function _0x524a0b(_0x198da4,_0x89b7e9){return new window['Promise'](_0x5d9a8f=>{if(_0x57c59b())return _0x5d9a8f('Valid');_0x23688c(),_0x1aae0f['decorate']('_sendUsageRequest');let _0x22ea05=!0x1;const _0x272314=_0x3bddc2();function _0x41edf8(_0x113ee7){return!!_0x113ee7&&('object'==typeof _0x113ee7||'function'==typeof _0x113ee7)&&'function'==typeof _0x113ee7['then']&&'function'==typeof _0x113ee7['catch'];}function _0x407505(_0x2e2a8f){_0x18b31c(_0x2e2a8f)['then'](_0x58a350=>_0x58a350&&'ok'==_0x58a350['status']?_0x3a49f5(_0x4c9894(_0x272314+_0x89b7e9))!=_0x58a350['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x3d06ca=>(_0x5a3e51(),_0x3d06ca),()=>{const _0x479372=_0x1092a9();return null==_0x479372?(_0x5a3e51(),'Valid'):_0x24546c-_0x479372>0x240c8400?'UsageLimit':'Valid';})['then'](_0x5d9a8f)['catch'](()=>{_0x5d9a8f('UsageLimit');});const _0x3b49ae=0x36ee80;function _0x5a3e51(){const _0x5680fa='llct-'+_0x3a49f5(_0x4c9894(_0x198da4)),_0x36c87b=_0x2b0139(_0x3a49f5(window['Math']['ceil'](_0x24546c/_0x3b49ae)));window['localStorage']['setItem'](_0x5680fa,_0x36c87b);}function _0x1092a9(){const _0x3176db='llct-'+_0x3a49f5(_0x4c9894(_0x198da4)),_0x13c613=window['localStorage']['getItem'](_0x3176db);return _0x13c613?window['parseInt'](_0x2b0139(_0x13c613),0x10)*_0x3b49ae:null;}function _0x18b31c(_0x4d8fd9){return new window['Promise']((_0x25cd12,_0x493b1e)=>{_0x4d8fd9['then'](_0x25cd12,_0x493b1e),window['setTimeout'](_0x493b1e,0x1d4c0);});}}_0x1aae0f['on']('_sendUsageRequest',(_0x1e9b90,_0x5bf22c)=>{if(_0x5bf22c[0x0]!=_0x198da4)return _0x5d9a8f('UsageLimit');_0x5bf22c[0x1]={..._0x5bf22c[0x1],'requestId':_0x272314};},{'priority':'high'}),_0x1aae0f['on']('_sendUsageRequest',_0x54dbe6=>{_0x41edf8(_0x54dbe6['return'])&&(_0x22ea05=!0x0,_0x407505(_0x54dbe6['return']));},{'priority':'low'}),_0x4a5876['then'](()=>{_0x22ea05||_0x5d9a8f('UsageLimit');});});function _0x57c59b(){return'auto'==_0x1aae0f['editing']['view']['_overlayModeHint'];}function _0x23688c(){_0x1aae0f['editing']['view']['_overlayModeHint']='auto';}}function _0xd46b54(_0x5bd8b5){const _0x4c59fa=[new window['Promise'](_0x2af6e9=>setTimeout(_0x2af6e9,0x93ecc)),_0x4a5876['then'](()=>new window['Promise'](_0x4c41d6=>{let _0x5660c3=0x0;_0x1aae0f['model']['on']('applyOperation',(_0x2d2222,_0x1a08e7)=>{_0x1a08e7[0x0]['isDocumentOperation']&&_0x5660c3++,0x5e8==_0x5660c3&&(_0x4c41d6(),_0x2d2222['off']());});}))];return window['Promise']['race'](_0x4c59fa)['then'](()=>_0x5bd8b5);}async function _0xf9403(){await _0x4a5876,_0x1aae0f['model']['change']=_0x412a47,_0x1aae0f['model']['enqueueChange']=_0x412a47,_0x1aae0f['enableReadOnlyMode']('model');}function _0xb2e1dc(){return window['glob']&&window['glob']['triliumVersion'];}function _0x841d42(){return _0x343ae6('WebSocketGateway')&&'connected'==_0x39b469('WebSocketGateway')['state'];}function _0x249622(){return _0x343ae6('RevisionViewerIntegration');}function _0x841342(){return _0x343ae6('TrackChangesDataGetter');}function _0x2fc93f(_0x100b18){const _0x1513ce=_0x3a498b();_0x1aae0f[_0x1513ce]='commentsLicenseKey'+_0x100b18,'Valid'!=_0x100b18&&_0xf9403();}function _0x3a498b(){const _0x5aefc9=window['String'](window['performance']['now']())['replace']('.','');let _0xb59b93='K';for(let _0x24cebd=0x0;_0x24cebd<_0x5aefc9['length'];_0x24cebd+=0x2){let _0x314e44=window['parseInt'](_0x5aefc9['substring'](_0x24cebd,_0x24cebd+0x2));_0x314e44>=0x3e&&(_0x314e44-=0x3e),_0xb59b93+=_0x104c59[_0x314e44];}return _0xb59b93;}function _0x157bea(){const _0x2698d3=_0x424569['split']('.');if(0x3!=_0x2698d3['length'])return null;return _0x388518(_0x2698d3[0x1]);function _0x388518(_0x14aa94){const _0x1059c6=_0x3b5dbd(_0x14aa94);return _0x1059c6&&_0x48a2cb()?_0x1059c6:null;function _0x48a2cb(){const _0x25af90=_0x1059c6['jti'],_0x540d77=window['parseInt'](_0x25af90['substring'](_0x25af90['length']-0x8),0x10),_0x5886e5={..._0x1059c6,'jti':_0x25af90['substring'](0x0,_0x25af90['length']-0x8)};return delete _0x5886e5['vc'],_0x4c9894(_0x5886e5)==_0x540d77;}}}async function _0x3442a5(){let _0x30d7fc=!0x0;try{const [_0x1f8b3c,_0x130966,_0x396091]=_0x424569['split']('.');return _0x94e089(_0x1f8b3c),await _0x453aa3(_0x1f8b3c,_0x130966,_0x396091),_0x30d7fc;}catch{return!0x1;}function _0x94e089(_0x10dec9){const _0x2dfd51=_0x3b5dbd(_0x10dec9);_0x2dfd51&&'ES256'==_0x2dfd51['alg']||(_0x30d7fc=!0x1);}async function _0x453aa3(_0x9faed5,_0x174160,_0x4def8a){const _0x17d38=window['Uint8Array']['from'](_0x3a37a4(_0x4def8a),_0x16b93e=>_0x16b93e['charCodeAt'](0x0)),_0x1ad53d=new window['TextEncoder']()['encode'](_0x9faed5+'.'+_0x174160),_0x4e1567=window['crypto']['subtle'];if(!_0x4e1567)return;const _0x99e7be=await _0x4e1567['importKey']('jwk',_0x188c9a,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x4e1567['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x99e7be,_0x17d38,_0x1ad53d)||(_0x30d7fc=!0x1);}}function _0x3b5dbd(_0x2fcaec){return _0x2fcaec['startsWith']('ey')?JSON['parse'](_0x3a37a4(_0x2fcaec)):null;}function _0x3a37a4(_0xca6243){return window['atob'](_0xca6243['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x4c9894(_0x5d7fc0){let _0x128e1a=0x1505;function _0x429b2c(_0x1e9bd3){for(let _0x34f7d2=0x0;_0x34f7d2<_0x1e9bd3['length'];_0x34f7d2++){const _0x33b6e0=_0x1e9bd3['charCodeAt'](_0x34f7d2);_0x128e1a=(_0x128e1a<<0x5)+_0x128e1a+_0x33b6e0,_0x128e1a&=_0x128e1a;}}function _0x1fc660(_0xbbf2e6){Array['isArray'](_0xbbf2e6)?_0xbbf2e6['forEach'](_0x1fc660):_0xbbf2e6&&'object'==typeof _0xbbf2e6?Object['entries'](_0xbbf2e6)['sort']()['forEach'](([_0x5905f2,_0x203350])=>{_0x429b2c(_0x5905f2),_0x1fc660(_0x203350);}):_0x429b2c(window['String'](_0xbbf2e6));}return _0x1fc660(_0x5d7fc0),_0x128e1a>>>0x0;}function _0x3a49f5(_0x4fa3ab){return _0x4fa3ab['toString'](0x10)['padStart'](0x8,'0');}function _0x2b0139(_0x1ae32a){return _0x1ae32a['split']('')['reverse']()['join']('');}function _0x343ae6(_0x2e7456){return _0x1aae0f['plugins']['has'](_0x2e7456);}function _0x39b469(_0x353df9){return _0x1aae0f['plugins']['get'](_0x353df9);}function _0x412a47(){}_0x2fc93f(await _0x250d5b());}(this);}destroy(){const _0x2c9761=this['editor']['plugins']['get'](oi),_0x24858a=this['editor']['config']['get']('collaboration.channelId');for(const _0x53802a of _0x2c9761['getCommentThreads']({'channelId':_0x24858a}))_0x2c9761['_detachCommentThread'](_0x53802a['id']),_0x2c9761['_threads']['delete'](_0x53802a['id']);super['destroy']();}['hasMarkerForId'](_0x50ba2f){return this['getAllMarkersForId'](_0x50ba2f)['length']>0x0;}getAllMarkersForId(_0x156d9b){const _0x2d71f6=[];for(const _0x741cb of this['editor']['model']['markers'])_0x741cb['name']['startsWith']('comment:'+_0x156d9b)&&_0x2d71f6['push'](_0x741cb);return _0x2d71f6;}['scrollToThreadMarker'](_0x482e6a){setTimeout(()=>{const _0xcadcbc=this['_getTargetForId'](_0x482e6a);_0xcadcbc&&this['activeMarker']&&fi(this['activeMarker'])['id']===_0x482e6a&&_0x499f3e({'target':_0xcadcbc[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}_reconvertMarkers(_0x1081b3){this['editor']['model']['change'](()=>{for(const _0x4dcf74 of this['getAllMarkersForId'](_0x1081b3))this['editor']['editing']['reconvertMarker'](_0x4dcf74);});}_attachArchivedThread(_0x431bfd){const _0x2bb942=this['editor']['plugins']['get'](oi),_0x482db7=this['editor']['plugins']['get'](di),_0x4897d2=_0x2bb942['getCommentThread'](_0x431bfd);if(!_0x4897d2['isAttached']){const _0x33760e=_0x4897d2['attachTo'](()=>this['_getTargetForId'](_0x4897d2['id']));_0x482db7['registerAnnotation'](_0x33760e),_0x4897d2['_hasTargetInContent']=!0x1;}}_initializeMarkerConverters(){const _0x7d8ed5=this['editor'],_0x5d5d46=_0x7d8ed5['plugins']['get'](_0xe05215);_0x7d8ed5['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x2a3569,_0x1396f5)=>{const {id:_0x2120c9}=fi(_0x2a3569['markerName']),_0x55d225=_0x7d8ed5['plugins']['get'](oi)['getCommentThread'](_0x2120c9),_0x266efc=this['activeMarker']&&fi(this['activeMarker'])['id']===_0x2120c9;let _0x35201e;if(_0x55d225&&_0x55d225['isResolved']&&!_0x266efc&&_0x2a3569['item'])return _0x1396f5['consumable']['consume'](_0x2a3569['item'],'addMarker:'+_0x2a3569['markerName']),_0x1396f5['consumable']['consume'](_0x2a3569['item'],'removeMarker:'+_0x2a3569['markerName']),null;const _0x13fdee=['ck-comment-marker'];return _0x266efc&&_0x13fdee['push']('ck-comment-marker--active'),_0x35201e=_0x55d225?.['length']?_0x55d225['comments']['first']['author']['id']:_0x5d5d46['me']['id'],{'classes':_0x13fdee,'attributes':{'data-comment':_0x2120c9,'data-author-id':_0x35201e}};}}),_0x7d8ed5['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0xfc7e59,{options:_0x22ae36})=>{if(_0x22ae36['showCommentHighlights'])return null;const _0x1f33aa=_0x7d8ed5['plugins']['get'](oi),_0x3125ce=_0x7d8ed5['model']['markers']['get'](_0xfc7e59),{id:_0x10cbc7,part:_0xfaf7e3}=fi(_0xfc7e59);return _0x3125ce&&!_0x3125ce['affectsData']||_0x22ae36['ignoreResolvedComments']&&_0x1f33aa['getCommentThread'](_0x10cbc7)?.['isResolved']?null:{'group':'comment','name':_0xfaf7e3?_0x10cbc7+':'+_0xfaf7e3:_0x10cbc7};}}),_0x7d8ed5['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x34d026,{writer:_0x32f738})=>_0x32f738['createElement']('$marker',{'data-name':'comment:'+_0x34d026['getAttribute']('id')})}),_0x7d8ed5['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x592b19=this['editor'],_0x56ff67=_0x592b19['plugins']['get'](oi),_0x24bd9f=new Set(),_0x506df8=new Set();_0x592b19['model']['document']['registerPostFixer'](_0x31f5b1=>{let _0x136f46=!0x1;for(const {name:_0x57028f,data:_0x525004}of _0x592b19['model']['document']['differ']['getChangedMarkers']()){const {group:_0x2e7233,id:_0x4cab4b}=fi(_0x57028f);let _0x373681=_0x525004['newRange'];if('comment'!==_0x2e7233||!_0x373681)continue;const _0x1fea16='$graveyard'===_0x373681['root']['rootName'];_0x1fea16||(_0x373681=_i(_0x373681,_0x592b19['model']),!_0x373681||_0x373681['isCollapsed']||!_0x525004['newRange']||_0x373681['isEqual'](_0x525004['newRange']))?_0x592b19['model']['hasContent'](_0x373681)&&!_0x1fea16?this['isThreadsLoadingPaused']?_0x24bd9f['add'](_0x57028f):this['_handleThreadMarker'](_0x57028f,_0x4cab4b):(_0x506df8['add'](_0x57028f),_0x24bd9f['delete'](_0x57028f),_0x31f5b1['removeMarker'](_0x57028f),_0x136f46=!0x0):(_0x31f5b1['updateMarker'](_0x57028f,{'range':_0x373681}),_0x136f46=!0x0);}return _0x136f46;}),this['on']('change:isThreadsLoadingPaused',(_0x590488,_0x378809,_0x219182)=>{if(!_0x219182&&_0x24bd9f['size'])for(const _0x33739d of _0x24bd9f){const {id:_0x1d4620}=fi(_0x33739d);_0x24bd9f['delete'](_0x33739d),_0x592b19['model']['markers']['get'](_0x33739d)&&this['_handleThreadMarker'](_0x33739d,_0x1d4620);}}),this['listenTo'](_0x592b19['model']['document'],'change',()=>{for(const {name:_0x5c66cc,data:{newRange:_0x30a886}}of _0x592b19['model']['document']['differ']['getChangedMarkers']()){const {group:_0x55e79c,id:_0x4e9a63}=fi(_0x5c66cc);if('comment'!==_0x55e79c)continue;const _0x259f8c=_0x56ff67['getCommentThread'](_0x4e9a63),_0x21f384=this['hasMarkerForId'](_0x4e9a63);_0x259f8c&&(!_0x259f8c['_hasTargetInContent']&&_0x30a886&&_0x592b19['editing']['view']['once']('render',()=>{const _0x26b8bc=_0x592b19['plugins']['get'](ti),_0x5cdf6e=_0x56ff67['_threadToController']['get'](_0x259f8c)['view'];_0x26b8bc['getByInnerView'](_0x5cdf6e)['refreshVisibility']();},{'priority':'low'}),_0x259f8c['_hasTargetInContent']=_0x21f384||!!_0x30a886),_0x30a886||(_0x506df8['add'](_0x5c66cc),_0x24bd9f['delete'](_0x5c66cc));}for(const _0x461ef3 of _0x506df8){const {id:_0x3012d8}=fi(_0x461ef3),_0x1604a0=_0x56ff67['getCommentThread'](_0x3012d8);if(_0x24bd9f['delete'](_0x461ef3),!_0x1604a0)continue;const _0x5be542=this['hasMarkerForId'](_0x3012d8);_0x5be542||_0x1604a0['isSubmitted']?_0x5be542||_0x1604a0['unlinkedAt']||_0x1604a0['setUnlinkedAt'](new Date()):_0x1604a0['remove']();}_0x506df8['clear']();});}_handleInitialThreads(_0x211fe8){_0x211fe8['forEach'](_0x4840bf=>{_0x4840bf['unlinkedAt']&&this['_attachArchivedThread'](_0x4840bf['id']);});}_getTargetForId(_0x3671a2){const _0x46b2a3=this['editor'],_0x130ae8=this['getAllMarkersForId'](_0x3671a2);return _0x478d68(_0x46b2a3['editing'],_0x130ae8);}_getTextContext(_0x5e8419){const _0x4d4250=this['getAllMarkersForId'](_0x5e8419);let _0x2ef501='',_0x51d149=!0x1;for(const _0x92ac41 of _0x4d4250){const _0xb19354=_0x92ac41['getRange']();for(const _0x453dd1 of Array['from'](_0xb19354['getItems']()))_0x453dd1['is']('$textProxy')?(_0x2ef501&&_0x51d149&&(_0x2ef501+='\x20',_0x51d149=!0x1),_0x2ef501+=_0x453dd1['data']):_0x51d149=!0x0;_0x51d149=!0x0;}return _0x2ef501['substring'](0x0,0x96);}_attachMarkerToThread(_0x349f8f,_0x5be104){const _0x100c34=this['editor'],_0x1ae57f=_0x100c34['plugins']['get'](oi);let _0x5ad790=_0x1ae57f['getCommentThread'](_0x5be104);const _0x5536d4=_0x100c34['config']['get']('collaboration.channelId'),_0x14a42e=_0x100c34['plugins']['get'](di);return _0x5ad790&&(_0x5ad790['unlinkedAt']&&_0x5ad790['setUnlinkedAt'](null),_0x5ad790['isAttached'])||(this['getAllMarkersForId'](_0x5be104)[0x0]['managedUsingOperations']?_0x1ae57f['fetchCommentThread']({'channelId':_0x5536d4,'threadId':_0x5be104})['then'](_0x48b935=>{if('destroyed'!==_0x100c34['state']){if(_0x5ad790=_0x48b935,_0x5ad790&&!_0x5ad790['isAttached']){const _0x528f45=_0x5ad790['attachTo'](()=>this['_getTargetForId'](_0x5be104));_0x14a42e['registerAnnotation'](_0x528f45),_0x5ad790['isResolved']&&this['_reconvertMarkers'](_0x5be104);}else{if(!_0x5ad790){const _0xa3e319=this['getAllMarkersForId'](_0x5be104);_0x100c34['model']['change'](_0x4a99c1=>{for(const _0x4aa227 of _0xa3e319)_0x4a99c1['removeMarker'](_0x4aa227);});}}}}):_0x100c34['editing']['view']['once']('render',()=>{if(_0x1ae57f['getCommentThread'](_0x5be104))return;const _0x3c0e22=_0x100c34['plugins']['get'](ti);_0x5ad790=_0x1ae57f['openNewCommentThread']({'channelId':_0x5536d4,'threadId':_0x5be104,'target':()=>this['_getTargetForId'](_0x5be104),'context':{'type':'text','value':this['_getTextContext'](_0x5be104)}});const _0x4effcc=_0x1ae57f['_threadToController']['get'](_0x5ad790)['view'],_0x29707f=_0x3c0e22['getByInnerView'](_0x4effcc);_0x29707f&&_0x14a42e['registerAnnotation'](_0x29707f);},{'priority':'low'})),_0x5ad790;}['_handleThreadMarker'](_0xfb5be3,_0x398fb3){const _0x751d2b=this['_attachMarkerToThread'](_0xfb5be3,_0x398fb3);_0x751d2b&&!_0x751d2b['context']&&_0x751d2b['setContext']({'type':'text','value':this['_getTextContext'](_0x398fb3)});}_initAriaMarkerChangeAnnouncements(){const _0x16a42a=this['editor'];_0x2d9412(_0x16a42a['model'],({left:_0x349653,entered:_0x861f09})=>{for(const _0x447140 of _0x349653)if(Ai(_0x447140)){_0x16a42a['ui']['ariaLiveAnnouncer']['announce'](Et(_0x16a42a['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x5acaf9 of _0x861f09)if(Ai(_0x5acaf9)){_0x16a42a['ui']['ariaLiveAnnouncer']['announce'](Et(_0x16a42a['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x55fb26(_0x43f05a)));break;}});}};function gi(_0x52126b,_0xacc512){return _0xacc512?_0x52126b+':'+_0xacc512:_0x52126b;}function _i(_0x99cb25,_0x1159ab){const _0x26efe7=_0x1159ab['schema'],_0x403f40=_0x1159ab['createRange'](_0x99cb25['start']);for(const _0x4dbddf of _0x99cb25['getWalker']()){const {type:_0x2a774e,item:_0x1de38e,nextPosition:_0x70a58c}=_0x4dbddf;if('text'===_0x2a774e||_0x26efe7['isObject'](_0x1de38e)){const _0x304ec8=_0x1159ab['createPositionBefore'](_0x1de38e);_0x403f40['isCollapsed']&&(_0x403f40['start']=_0x304ec8),_0x403f40['end']=_0x70a58c;}}return _0x403f40;}function Ai(_0x8cacc){return'comment'===fi(_0x8cacc['name'])['group'];}var vi=class extends _0x2a49ac{['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 _0x5224ec=this['editor'],_0x28a7fd=_0x5224ec['plugins']['get'](oi),_0x16ea2e=_0x5224ec['plugins']['get'](wi),_0x353cc8=_0x5224ec['plugins']['get'](ti),_0x5d5c5d=_0x5224ec['plugins']['get'](di);_0x5224ec['ui']['componentFactory']['add']('comment',()=>{const _0x51ec85=this['_createUIButton'](_0x2ae0c1);return _0x51ec85['tooltip']=!0x0,_0x51ec85;}),_0x5224ec['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](rt)),_0x5d5c5d['addSourceCollector'](()=>{const _0x317f15=[];for(const [_0x408396,_0x588d9d]of _0x28a7fd['_threadToController']){const _0x13f122=_0x16ea2e['getAllMarkersForId'](_0x408396['id']),_0x260d43=_0x13f122['map'](_0x23be0e=>_0x23be0e['getRange']());_0x13f122['length']>0x0&&_0x317f15['push']([_0x588d9d['view'],_0x260d43]);}return _0x317f15;}),this['listenTo'](_0x353cc8,'change:activeAnnotations',(_0x38c558,_0xbdf826,_0x5009d4)=>{const _0x5bcd58=Array['from'](_0x5009d4)['map'](_0x1f4589=>_0x1f4589['innerView'])['find'](_0x4213a8=>_0x28a7fd['_viewToController']['has'](_0x4213a8));if(!_0x5bcd58)return void(_0x16ea2e['activeMarker']=null);const _0xcc86a7=_0x28a7fd['_viewToController']['get'](_0x5bcd58)['model']['id'],_0x5b77d6='comment:'+_0xcc86a7;_0xcc86a7&&_0x16ea2e['hasMarkerForId'](_0xcc86a7)?_0x16ea2e['activeMarker']=_0x5b77d6:_0x16ea2e['activeMarker']&&(_0x16ea2e['activeMarker']=null);}),this['listenTo'](_0x28a7fd,'removeCommentThread',(_0x27f580,{threadId:_0x5b9312,isFromAdapter:_0x5666ba})=>{!_0x5666ba&&_0x5224ec['ui']['focusTracker']['isFocused']&&_0x16ea2e['hasMarkerForId'](_0x5b9312)&&_0x5224ec['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x28a7fd,'addComment',(_0x75f118,{threadId:_0x424522,isFromAdapter:_0x3dd6d4})=>{!_0x3dd6d4&&_0x16ea2e['hasMarkerForId'](_0x424522)&&_0x28a7fd['hasCommentThread'](_0x424522)&&0x1===_0x28a7fd['getCommentThread'](_0x424522)['length']&&(_0x5224ec['editing']['view']['focus'](),_0x75f118['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x1ac735=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x41a5f0;for(const _0x5d9ad4 in _0x1ac735){const _0x33b42a=_0x5d9ad4,_0x2e55b7=_0x1ac735[_0x33b42a];if('commentsLicenseKeyValid'==_0x2e55b7||'commentsLicenseKeyInvalid'==_0x2e55b7||'commentsLicenseKeyExpired'==_0x2e55b7||'commentsLicenseKeyDomainLimit'==_0x2e55b7||'commentsLicenseKeyNotAllowed'==_0x2e55b7||'commentsLicenseKeyEvaluationLimit'==_0x2e55b7||'commentsLicenseKeyUsageLimit'==_0x2e55b7){delete _0x1ac735[_0x33b42a],_0x41a5f0=_0x2e55b7,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x41a5f0&&_0x1ac735['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x41a5f0&&_0x1ac735['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x41a5f0&&_0x1ac735['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x41a5f0&&_0x1ac735['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x41a5f0&&_0x1ac735['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x41a5f0&&_0x1ac735['_showLicenseError']('usageLimit');},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_createUIButton(_0x40b6ef){const _0x5f1a43=this['editor'],_0x23d6ed=new _0x40b6ef(_0x5f1a43['locale']),_0x16569b=_0x5f1a43['commands']['get']('addCommentThread');return _0x23d6ed['set']({'label':Et(_0x5f1a43['locale'],'Comment'),'icon':_0x58c477}),_0x23d6ed['bind']('isEnabled')['to'](_0x16569b,'isEnabled',_0x16569b,'hasContent',(_0x16b2de,_0x52dbca)=>_0x16b2de&&_0x52dbca),this['listenTo'](_0x23d6ed,'execute',()=>{_0x16569b['execute']();}),_0x23d6ed;}},yi=class extends _0x2a49ac{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[wi];}constructor(_0x2f98f6){super(_0x2f98f6),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x5718da,_0x4269f9,_0x6eb984)=>{_0x6eb984?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}afterInit(){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}_enableCommentsOnlyMode(){for(const [_0x96f8de,_0x2e911a]of this['editor']['commands'])_0x2e911a['affectsData']&&'addCommentThread'!==_0x96f8de&&_0x2e911a['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 _0x57f4b6=this['editor']['editing']['view']['document'];this['listenTo'](_0x57f4b6,'cut',_0x509659=>_0x509659['stop'](),{'priority':'highest'}),this['listenTo'](_0x57f4b6,'clipboardInput',_0x5698a6=>_0x5698a6['stop'](),{'priority':'highest'}),this['listenTo'](_0x57f4b6,'delete',_0x5f4324=>_0x5f4324['stop'](),{'priority':'highest'});}_disableCommentsOnlyMode(){for(const [_0x5e83f8,_0x46a158]of this['editor']['commands'])_0x46a158['affectsData']&&'addCommentThread'!==_0x5e83f8&&_0x46a158['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 _0x21a737{activeUIs;uisData;['_uis'];static get requires(){return[ti];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x29041b){super(_0x29041b),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}init(){const _0x3df2e8=this['context']['plugins']['get'](ti);this['listenTo'](_0x3df2e8,'_activateAnnotation',(_0x1bedd6,_0x5acef8)=>{for(const _0xd5a3e6 of this['activeUIs']){const _0x4f3c9c=this['_uis']['get'](_0xd5a3e6);(0x0,this['uisData']['get'](_0xd5a3e6)['filter'])(_0x5acef8)&&_0x4f3c9c['setActiveAnnotation'](_0x5acef8);}}),this['listenTo'](_0x3df2e8,'_deactivateAllAnnotations',()=>{for(const _0x42d12e of this['activeUIs'])this['_uis']['get'](_0x42d12e)['setActiveAnnotation'](null);}),this['listenTo'](_0x3df2e8['_visibleAnnotations'],'add',(_0x28e5f8,_0x40a114)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x40a114);});}hasActive(){return this['activeUIs']['size']>0x0;}isActive(_0x7e1566){return this['activeUIs']['has'](_0x7e1566);}activate(_0x52851c,_0xae87c6=this['defaultFilter']){const _0x145cee=this['context']['plugins']['get'](ti);if(!this['_uis']['has'](_0x52851c))throw new _0x12f3e5('annotationsuis-missing-ui',this,{'uiName':_0x52851c});this['isActive'](_0x52851c)&&this['deactivate'](_0x52851c),this['activeUIs']['add'](_0x52851c);const _0x22caff=new Jt();Qt({'source':_0x145cee['_visibleAnnotations'],'target':_0x22caff,'filter':_0xae87c6}),this['uisData']['set'](_0x52851c,{'collection':_0x22caff,'filter':_0xae87c6});const _0x317d98=this['_uis']['get'](_0x52851c);_0x317d98['attach'](_0x22caff),this['listenTo'](_0x317d98,'change:activeAnnotation',(_0x2490a6,_0x2b9ffe,_0x51d52b,_0x46f999)=>{_0x46f999&&_0x145cee['_removeActiveAnnotation'](_0x46f999),_0x51d52b&&_0x145cee['_addActiveAnnotation'](_0x51d52b);});}deactivate(_0x33b9b7){if(this['activeUIs']['delete'](_0x33b9b7),!this['_uis']['has'](_0x33b9b7))throw new _0x12f3e5('annotationsuis-missing-ui',this,{'uiName':_0x33b9b7});const _0x3196f0=this['_uis']['get'](_0x33b9b7);_0x3196f0['detach'](),this['stopListening'](_0x3196f0),this['uisData']['get'](_0x33b9b7)['collection']['destroy'](),this['uisData']['delete'](_0x33b9b7);}switchTo(_0x537a3){if(!this['_uis']['has'](_0x537a3))throw new _0x12f3e5('annotationsuis-missing-ui',this,{'uiName':_0x537a3});const _0x52ac84=this['context']['plugins']['get'](ti),_0x45a139=Array['from'](_0x52ac84['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x537a3);const _0x22858e=this['_uis']['get'](_0x537a3);_0x22858e['setActiveAnnotation'](_0x45a139),_0x22858e['_setSelectedAnnotations']&&_0x45a139&&_0x22858e['_setSelectedAnnotations']([_0x45a139]);}deactivateAll(){for(const _0x4b4ef9 of this['activeUIs'])this['deactivate'](_0x4b4ef9);}register(_0x2d8b6b,_0x353747){if(this['_uis']['has'](_0x2d8b6b))throw new _0x12f3e5('annotationsuis-register-already-registered');if('function'!=typeof _0x353747['attach']||'function'!=typeof _0x353747['detach']||'function'!=typeof _0x353747['setActiveAnnotation'])throw new _0x12f3e5('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x2d8b6b,_0x353747);}refilterAnnotations(){const _0xc5bf61=this['context']['plugins']['get'](ti)['collection'],_0x20ced6=new Map(),_0x2b1a8b=Array['from'](this['activeUIs']);for(const _0x1518c4 of this['activeUIs']){const _0x11456e=this['uisData']['get'](_0x1518c4)['collection'];for(const _0x2a5c73 of _0x11456e)_0x20ced6['set'](_0x2a5c73,_0x1518c4);}for(const _0x5bf623 of _0xc5bf61){const _0x57ec65=_0x20ced6['get'](_0x5bf623);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5bf623);const _0x4140c9=_0x2b1a8b['find'](_0x36ce96=>this['uisData']['get'](_0x36ce96)['filter'](_0x5bf623));_0x57ec65!==_0x4140c9&&(_0x57ec65&&this['uisData']['get'](_0x57ec65)['collection']['remove'](_0x5bf623),_0x4140c9&&this['uisData']['get'](_0x4140c9)['collection']['add'](_0x5bf623));}}destroy(){this['deactivateAll'](),super['destroy']();}defaultFilter(){return!0x0;}_assertAnnotationDoesNotBelongToMultipleUIs(_0x72d7a2){const _0x448b5d=[];for(const _0x117a88 of this['activeUIs']){(0x0,this['uisData']['get'](_0x117a88)['filter'])(_0x72d7a2)&&_0x448b5d['push'](_0x117a88);}if(_0x448b5d['length']>0x1)throw new _0x12f3e5('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x448b5d,'annotationType':_0x72d7a2['type']});}};const Ci=/* #__PURE__ -- @preserve */
32
+ _0x46b629('px');var Ii=class extends ht{list;['focusables'];['focusTracker'];['focusCycler'];constructor(_0x273c71){super(_0x273c71);const _0x43c122=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 _0x470ed5(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x43c122['to']('class')],'style':{'minHeight':_0x43c122['to']('minHeight',_0x25aed8=>'number'==typeof _0x25aed8?Ci(_0x25aed8+0xa):null)},'dir':_0x273c71['uiLanguageDirection'],'role':'application','aria-label':Et(_0x273c71,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':Et(_0x273c71,'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',_0x4f1b8d=>{this['_updateItemPositionInFocusables'](_0x4f1b8d['source']);}),this['list']['forEach'](_0x6b94=>{this['focusTracker']['add'](_0x6b94['element']),this['_updateItemPositionInFocusables'](_0x6b94);}),this['list']['on']('change',(_0x498077,_0xfa2aa3)=>{for(const _0x30cffb of _0xfa2aa3['removed'])this['focusTracker']['remove'](_0x30cffb['element']),this['focusables']['remove'](_0x30cffb);for(const _0x5f3fb7 of _0xfa2aa3['added'])this['focusTracker']['add'](_0x5f3fb7['element']),this['_updateItemPositionInFocusables'](_0x5f3fb7);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}_updateItemPositionInFocusables(_0x305ad9){const _0xcd5d9a=this['focusables']['getIndex'](_0x305ad9);let _0x308f0f,_0x34b366;for(const _0x94d97 of this['focusables'])if(_0x305ad9['top']<_0x94d97['top']){_0x308f0f=_0x94d97;break;}if(_0x34b366=_0x308f0f?this['focusables']['getIndex'](_0x308f0f):this['focusables']['length'],-0x1!==_0xcd5d9a){if(_0xcd5d9a===_0x34b366-0x1)return;this['focusables']['remove'](_0x305ad9),_0x34b366=_0x308f0f?this['focusables']['getIndex'](_0x308f0f):this['focusables']['length'];}this['focusables']['add'](_0x305ad9,_0x34b366);}};const bi=/* #__PURE__ -- @preserve */
33
+ _0x46b629('px');var Ei=class extends ht{content;_targetTop;_mutationObserver;constructor(_0x5206c1){super(_0x5206c1),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x555444,_0x506597)=>_0x555444+_0x506597),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0xbc0f9f=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0xbc0f9f['to']('isAnimationDisabled',_0x102ad7=>_0x102ad7?'ck-sidebar-item--no-animation':'')],'style':{'top':_0xbc0f9f['to']('top',_0xcb5091=>bi(_0xcb5091))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}updateHeight(){const _0x16e298=this['element']['clientHeight'];_0x16e298&&(this['height']=_0x16e298);}destroy(){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},ki=class extends _0x21a737{['view'];_activeAnnotation;_annotations;_spaceBetweenItems;_sidebarItemViewToAnnotation;_annotationToSidebarItemView;_recalculateBuffer;static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x43606d){super(_0x43606d),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 _0x21a9c6=this['context']['config']['get']('sidebar.container');_0x21a9c6&&this['setContainer'](_0x21a9c6);}setContainer(_0x5c424a){if(!Oi(_0x5c424a))throw new _0x12f3e5('sidebar-setcontainer-invalid-element');this['container']=_0x5c424a;}_attachToContainer({viewClass:_0x5abc5c='',spaceBetweenItems:_0x413303=0x19}={}){if(!Oi(this['container']))throw new _0x12f3e5('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x5abc5c,this['_spaceBetweenItems']=_0x413303;}['rearrange']({removedAnnotation:_0x3ee494,previousAnnotation:_0x269594,nextAnnotation:_0x16a2fd}){const _0x54c0e8=this['getSidebarItemView'](_0x3ee494);this['view']['list']['remove'](_0x54c0e8),this['_destroySidebarItemView'](_0x3ee494),_0x269594&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x269594)),_0x16a2fd&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x16a2fd)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x160bbe,activatedAnnotation:_0x1158ea,disableAnimationOnActivatedAnnotation:_0x345ac6}){if(this['_activeAnnotation']=_0x1158ea,_0x160bbe){_0x160bbe['isActive']=!0x1;const _0x36d8b7=this['getSidebarItemView'](_0x160bbe);_0x36d8b7&&_0x345ac6&&(_0x36d8b7['isAnimationDisabled']=!0x1);}if(_0x1158ea){const _0x3d34cf=this['getSidebarItemView'](_0x1158ea);_0x3d34cf&&(_0x1158ea['isActive']=!0x0,_0x345ac6&&(_0x3d34cf['isAnimationDisabled']=!0x0,_0x3d34cf['top']+=0x1),this['_alignToTargetRect'](_0x3d34cf));}}_detachFromContainer(_0x2bf26a){if(this['view']['element']['remove'](),_0x2bf26a){for(const _0x52231c of _0x2bf26a)this['_destroySidebarItemView'](_0x52231c);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}addAnnotation(_0x55012d,_0x2d39ed){_0x2d39ed||(_0x2d39ed=_0x55012d['view']);const _0x16a081=new Ei(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x16a081,_0x55012d),this['_annotationToSidebarItemView']['set'](_0x55012d,_0x16a081),_0x16a081['content']['add'](_0x2d39ed),this['listenTo'](_0x55012d['view'],'change:targetRect',(_0x953d36,_0x1de510,_0x281c28)=>{const _0x4b868a=this['_getTargetTop'](_0x55012d,_0x281c28);_0x16a081['_targetTop']!=_0x4b868a&&(_0x16a081['_targetTop']=_0x4b868a,this['_setItemTop'](_0x16a081,_0x4b868a));}),this['listenTo'](_0x16a081,'change:top',()=>{this['_recalculate'](_0x16a081,'top');}),this['listenTo'](_0x16a081,'change:bottom',()=>{this['_recalculate'](_0x16a081,'bottom');}),this['_alignToTargetRect'](_0x16a081);const _0x41d2dd=this['_getItemBefore'](_0x16a081);return _0x41d2dd&&this['_alignAfterItem'](_0x41d2dd,_0x16a081)||this['_alignToTargetRect'](_0x16a081),this['_updateLastItem'](),this['view']['list']['add'](_0x16a081),_0x16a081;}['_alignForTopChange'](_0x722f65){if(!_0x722f65['content']['length'])return;const _0x54e685=this['_getItemBefore'](_0x722f65);if(!_0x54e685)return;const _0x99a48d=this['_sidebarItemViewToAnnotation']['get'](_0x54e685),_0x178502=this['_activeAnnotation'];_0x178502&&_0x178502===_0x99a48d?this['_alignAfterItem'](_0x54e685,_0x722f65):this['_alignBeforeItem'](_0x722f65,_0x54e685);}_alignForBottomChange(_0x6bccbc){if(!_0x6bccbc['content']['length'])return;const _0x1dffd5=this['_getItemAfter'](_0x6bccbc);if(!_0x1dffd5)return;const _0x4283bb=this['_sidebarItemViewToAnnotation']['get'](_0x1dffd5),_0x49186c=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x5585a1=this['_activeAnnotation'];_0x5585a1&&_0x5585a1===_0x4283bb&&_0x49186c?(this['_alignBeforeItem'](_0x1dffd5,_0x6bccbc),this['_alignAfterItem'](_0x6bccbc,_0x1dffd5)):_0x5585a1&&_0x5585a1===_0x4283bb?this['_alignBeforeItem'](_0x1dffd5,_0x6bccbc):this['_alignAfterItem'](_0x6bccbc,_0x1dffd5);}_recalculate(_0xdb0901,_0xdfeba0){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x12b688,changedProp:_0x18eff4}of this['_recalculateBuffer'])'top'===_0x18eff4?this['_alignForTopChange'](_0x12b688):this['_alignForBottomChange'](_0x12b688);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0xdb0901,'changedProp':_0xdfeba0});}getSidebarItemView(_0x1dfd4d){return this['_annotationToSidebarItemView']['get'](_0x1dfd4d);}destroy(){this['stopListening'](),this['view']['destroy']();}_destroySidebarItemView(_0x22b1be){const _0x3618d0=this['getSidebarItemView'](_0x22b1be);this['stopListening'](_0x3618d0),this['stopListening'](_0x22b1be['view']),_0x3618d0['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x22b1be),this['_sidebarItemViewToAnnotation']['delete'](_0x3618d0);}_createSidebarView(){const _0x5c04be=new Ii(this['context']['locale']);return _0x5c04be['render'](),this['on']('change:_lastItem',(_0x2b9e6e,_0x5cecba,_0x384df7,_0x504418)=>{_0x504418&&_0x5c04be['unbind']('minHeight'),_0x384df7?_0x5c04be['bind']('minHeight')['to'](_0x384df7,'bottom'):_0x5c04be['minHeight']=null;}),_0x5c04be;}_updateLastItem(){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}_getItemBefore(_0x3c69c0){const _0x24380c=this['_sidebarItemViewToAnnotation']['get'](_0x3c69c0),_0x5abf1c=_0x24380c&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x24380c)-0x1);return _0x5abf1c&&this['getSidebarItemView'](_0x5abf1c)||null;}_getItemAfter(_0xa0bb5f){const _0x4105b8=this['_sidebarItemViewToAnnotation']['get'](_0xa0bb5f),_0x34c421=_0x4105b8&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x4105b8)+0x1);return _0x34c421&&this['getSidebarItemView'](_0x34c421)||null;}_alignBeforeItem(_0x4ac2df,_0x1aa374){_0x4ac2df['updateHeight']();const _0x20a7f2=Ni(_0x1aa374['bottom']+this['_spaceBetweenItems'],_0x4ac2df['top']);return!!_0x20a7f2&&(this['_setItemTop'](_0x1aa374,_0x1aa374['top']-_0x20a7f2),!0x0);}_alignAfterItem(_0x21966e,_0x3e49c4){_0x21966e['updateHeight']();const _0x1dffe9=Ni(_0x21966e['bottom']+this['_spaceBetweenItems'],_0x3e49c4['top']);return!!_0x1dffe9&&(this['_setItemTop'](_0x3e49c4,_0x3e49c4['top']+_0x1dffe9,!0x1),!0x0);}_alignToTargetRect(_0x2014c3){const _0x3d91b2=this['_sidebarItemViewToAnnotation']['get'](_0x2014c3);if(!_0x3d91b2||!_0x3d91b2['target']||!_0x3d91b2['targetRect'])return;const _0x3d7e8b=this['_getTargetTop'](_0x3d91b2,_0x3d91b2['targetRect']);this['_setItemTop'](_0x2014c3,_0x3d7e8b);}_getTargetTop(_0x2d61b1,_0x471831){if(null===_0x471831)return 0x0;if(_0x2d61b1['target']instanceof _0x4ec4d8)return _0x471831['top'];{const _0x14cd7e=new _0x4ec4d8(this['view']['element'])['top'];return _0x471831['top']-_0x14cd7e;}}_setItemTop(_0x4f38b6,_0x4823db,_0x1ef8e4=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x1ef8e4&&(_0x4823db=Math['max'](_0x4823db,this['_getMaxAvailableTop'](_0x4f38b6))),_0x4f38b6['top']=_0x4823db;}_getMaxAvailableTop(_0x5ad9d0){let _0xd36fd7=this['_getItemBefore'](_0x5ad9d0),_0x3f1d9a=0x0;for(;_0xd36fd7;)_0xd36fd7['updateHeight'](),_0x3f1d9a+=this['_spaceBetweenItems']+_0xd36fd7['height'],_0xd36fd7=this['_getItemBefore'](_0xd36fd7);return _0x3f1d9a;}};function Ni(_0x147a2b,_0x5f28af){return Math['max'](_0x147a2b-_0x5f28af,0x0);}function Oi(_0x3780f1){return null!==_0x3780f1&&'object'==typeof _0x3780f1&&0x1===_0x3780f1['nodeType'];}var Mi=class extends _0x21a737{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(_0x586fa5){super(_0x586fa5),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x74a9da(),this['_refreshPositioningDebounced']=_0x51773f(()=>{_0x586fa5['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}init(){const _0xf9355b=this['context']['plugins']['get'](Ti),_0x1c7118=this['context']['plugins']['get'](ki);_0xf9355b['register']('wideSidebar',this),_0x1c7118['container']&&_0xf9355b['switchTo']('wideSidebar');}setActiveAnnotation(_0x14f2b1){if(_0x14f2b1===this['activeAnnotation'])return;const _0x25f5ae=this['context']['plugins']['get'](ki);_0x25f5ae['_activeAnnotation']=_0x14f2b1;const _0x2277ef=this['activeAnnotation'];_0x25f5ae['refresh']({'blurredAnnotation':_0x2277ef,'activatedAnnotation':_0x14f2b1}),this['activeAnnotation']=_0x14f2b1;}attach(_0x1feb34){this['annotations']=_0x1feb34;const _0x5c570c=this['context']['plugins']['get'](ki);if(_0x5c570c['_annotations']=_0x1feb34,this['isAttached'])throw new _0x12f3e5('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x5c570c,'set:container',()=>{this['detach'](),this['listenTo'](_0x5c570c,'change:container',_0xc4813b=>{_0xc4813b['off'](),this['attach'](_0x1feb34);});}),_0x5c570c['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x3672e4=_0x5def54=>{_0x5def54['updateTargetRect'](),_0x5c570c['addAnnotation'](_0x5def54);};for(const _0x47dfd3 of _0x1feb34)_0x3672e4(_0x47dfd3);this['listenTo'](_0x1feb34,'add',(_0x30ed4a,_0x42e727)=>{_0x3672e4(_0x42e727);}),this['listenTo'](_0x1feb34,'remove',(_0x220c87,_0x9f4368,_0x141507)=>{_0x5c570c['rearrange']({'removedAnnotation':_0x9f4368,'previousAnnotation':_0x1feb34['get'](_0x141507-0x1),'nextAnnotation':_0x1feb34['get'](_0x141507+0x1)}),_0x9f4368===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x1feb34,'focus',(_0xfb04bf,_0x201a9c)=>{this['setActiveAnnotation'](_0x201a9c);}),this['listenTo'](_0x1feb34,'blur',()=>{this['setActiveAnnotation'](null);});const _0x4899bb=this['context']instanceof _0x1b78a7?this['context']['editors']:new _0x74a9da([this['context']]);for(const _0x30a7c2 of _0x4899bb)this['_integrateWithEditorAnnotations'](_0x30a7c2);this['listenTo'](_0x4899bb,'add',(_0x1cab51,_0x153ca6)=>{this['listenTo'](_0x153ca6,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x153ca6);});}),this['listenTo'](_0x4899bb,'remove',(_0x22960c,_0x4f47aa)=>{_0x4f47aa['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4f47aa['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}detach(){if(!this['isAttached'])throw new _0x12f3e5('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x8c5538=this['context']['plugins']['get'](ki);_0x8c5538['_detachFromContainer'](this['annotations']),this['stopListening'](_0x8c5538),this['stopListening'](this['annotations']),this['context']instanceof _0x1b78a7&&this['stopListening'](this['context']['editors']);for(const _0x5e12ef of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x5e12ef);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach']();}_integrateWithEditorAnnotations(_0x1dae5b){if(!_0x1dae5b['plugins']['has']('EditorAnnotations'))return;const _0x4056a1=_0x1dae5b['plugins']['get']('EditorAnnotations'),_0x4d94e3=()=>{const _0x29ab69=_0x4056a1['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x29ab69[0x0]||null);};this['listenTo'](_0x4056a1,'refresh',_0x4d94e3),this['listenTo'](_0x4056a1,'blur',(_0xde0602,{isAnnotationTracked:_0xe01b11})=>{this['activeAnnotation']&&_0xe01b11(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x4056a1,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0xe7763b=>{_0x4056a1['hasDomSelection']()&&(_0x4d94e3(),_0xe7763b['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x4056a1);}_destroyEditorAnnotationsIntegration(_0x1f12ec){this['stopListening'](_0x1f12ec),this['_editorAnnotations']['remove'](_0x1f12ec);}},Ri=class extends _0x2ae0c1{counterView;constructor(_0x587d8d){super(_0x587d8d);const _0x41de39=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x37cb43,_0x40c7f9)=>_0x37cb43?'...':_0x40c7f9['toString']()),this['set']('annotationType',''),this['icon']=_0x58c477,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new ht(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x41de39['to']('annotationType',_0x3194bb=>'ck-annotation-counter__badge--'+_0x3194bb),_0x41de39['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x41de39['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Si=class extends _0x21a737{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(_0x3a5ea6){super(_0x3a5ea6),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x351d70())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x74a9da(),this['_refreshPositioningDebounced']=_0x51773f(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}init(){this['context']['plugins']['get'](Ti)['register']('narrowSidebar',this),this['bodyCollection']=new _0x57a5e7(this['context']['locale']),this['balloonPanelView']=new _0xdbc376(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}attach(_0x3a14ba){this['annotations']=_0x3a14ba;const _0x4397f9=this['context']['plugins']['get'](ki),_0x355d52=this['balloonPanelView'];if(_0x4397f9['_annotations']=_0x3a14ba,this['isAttached'])throw new _0x12f3e5('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x4397f9,'set:container',()=>{this['detach'](),this['listenTo'](_0x4397f9,'change:container',_0x480524=>{_0x480524['off'](),this['attach'](_0x3a14ba);});}),_0x4397f9['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x3a9cb0=_0x55756e=>{const _0x438b4a=new Ri(this['context']['locale']);_0x4397f9['addAnnotation'](_0x55756e,_0x438b4a),this['_annotationToNarrowView']['set'](_0x55756e,_0x438b4a),_0x438b4a['bind']('isDirty','annotationType','number')['to'](_0x55756e['view'],'isDirty','type','length'),_0x438b4a['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x355d52['content']['first']!==_0x55756e['view']?(this['_showBalloon'](_0x55756e),_0x55756e['view']['element']['focus'](),this['setActiveAnnotation'](_0x55756e)):this['setActiveAnnotation'](null);});};for(const _0x46ed66 of _0x3a14ba)_0x3a9cb0(_0x46ed66);this['listenTo'](_0x3a14ba,'add',(_0xefe77d,_0xedd7f2)=>{_0x3a9cb0(_0xedd7f2);}),this['listenTo'](_0x3a14ba,'remove',(_0x140559,_0x1cbab1,_0x57c7e5)=>{this['_annotationToNarrowView']['get'](_0x1cbab1)['destroy'](),this['_annotationToNarrowView']['delete'](_0x1cbab1),_0x4397f9['rearrange']({'removedAnnotation':_0x1cbab1,'previousAnnotation':_0x3a14ba['get'](_0x57c7e5-0x1),'nextAnnotation':_0x3a14ba['get'](_0x57c7e5+0x1)}),_0x1cbab1===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x3a14ba,'focus',(_0x546ac3,_0x133203)=>{this['setActiveAnnotation'](_0x133203);}),this['listenTo'](_0x3a14ba,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x188d83,_0x3b8826)=>{_0x3b8826['keyCode']===_0x12cc47['esc']&&_0x355d52['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x355d52['content']['first']),this['_hideBalloon'](),_0x3b8826['stopPropagation'](),_0x3b8826['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x266ac1,_0xf8860c)=>{const _0x186814=_0xf8860c['target'];_0x355d52['isVisible']&&_0x355d52['element']['contains'](_0x186814)||_0x4397f9['view']['element']['contains'](_0x186814)||_0x266ac1['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x4157cd=>_0x4157cd['contains'](_0x186814))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x16d634=this['context']instanceof _0x1b78a7?this['context']['editors']:new _0x74a9da([this['context']]);for(const _0x7fc582 of _0x16d634)this['_integrateWithEditorAnnotations'](_0x7fc582);this['listenTo'](_0x16d634,'add',(_0x3a3f58,_0xea0825)=>{this['listenTo'](_0xea0825,'ready',()=>{this['_integrateWithEditorAnnotations'](_0xea0825);});}),this['listenTo'](_0x16d634,'remove',(_0x2b7fe2,_0x3256cf)=>{_0x3256cf['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3256cf['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}setActiveAnnotation(_0x574421){if(_0x574421===this['activeAnnotation'])return;const _0x1b7cf4=this['context']['plugins']['get'](ki);_0x1b7cf4['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x574421,'disableAnimationOnActivatedAnnotation':!0x0}),_0x574421&&_0x1b7cf4['getSidebarItemView'](_0x574421)?this['_showBalloon'](_0x574421):this['_hideBalloon'](),this['activeAnnotation']=_0x574421;}detach(){if(!this['isAttached'])throw new _0x12f3e5('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5c25ad=this['context']['plugins']['get'](ki);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x4b22b2=>_0x4b22b2['destroy']()),this['_annotationToNarrowView']['clear'](),_0x5c25ad['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x1b78a7&&this['stopListening'](this['context']['editors']);for(const _0x5b4191 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x5b4191);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(_0x314bf3){if(!_0x314bf3['plugins']['has']('EditorAnnotations'))return;const _0x2083c5=_0x314bf3['plugins']['get']('EditorAnnotations'),_0x36d3d0=this['context']['plugins']['get'](ki),_0x1181f4=this['annotations'],_0x31eb07=this['balloonPanelView'],_0x3433bd=()=>{const _0x1324d4=_0x2083c5['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x1324d4),this['setActiveAnnotation'](_0x1324d4[0x0]||null);};this['listenTo'](_0x2083c5,'refresh',_0x3433bd),this['listenTo'](_0x2083c5,'blur',(_0x169426,{isAnnotationTracked:_0x3d54d0})=>{this['activeAnnotation']&&_0x3d54d0(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x2083c5,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x1181f4,'blur',_0x5a4c23=>{_0x2083c5['hasDomSelection']()&&_0x5a4c23['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x34e5df,_0xf4cddf)=>{const _0x56c30b=_0xf4cddf['target'];_0x31eb07['isVisible']&&_0x31eb07['element']['contains'](_0x56c30b)||_0x36d3d0['view']['element']['contains'](_0x56c30b)||this['activeAnnotation']&&_0x2083c5['hasDomSelection']()&&(_0x3433bd(),_0x34e5df['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2083c5);}_destroyEditorAnnotationsIntegration(_0x891f90){_0x891f90&&(this['stopListening'](_0x891f90),this['_editorAnnotations']['remove'](_0x891f90));}_setSelectedAnnotations(_0x3c8204){for(const _0x51b8a4 of this['_selectedAnnotations'])_0x3c8204['includes'](_0x51b8a4)||this['_manuallyClosedAnnotationViews']['delete'](_0x51b8a4['view']);this['_selectedAnnotations']=_0x3c8204;}_refreshPositioning(){const _0xb00733=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0xb00733['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x42f5d3){if(this['_manuallyClosedAnnotationViews']['has'](_0x42f5d3['view']))return;const _0x243889=this['balloonPanelView']['content']['first'];_0x243889!==_0x42f5d3['view']?(_0x243889&&this['_detachListeners'](_0x243889),this['_attachListeners'](_0x42f5d3['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x42f5d3['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}_updateBalloonPosition(){const _0x3e601c=this['balloonPanelView']['content']['first'],_0xae7769=_0x3e601c&&this['annotations']['getByView'](_0x3e601c);if(!_0xae7769||!this['_annotationToNarrowView']['has'](_0xae7769))return;const _0x371474=this['_annotationToNarrowView']['get'](_0xae7769)['element'],_0x5b72bf=(function(){const _0x320458=_0xdbc376['defaultPositions'];return[_0x320458['southArrowNorthEast'],_0x320458['northArrowSouthEast'],_0x320458['southArrowNorth'],_0x320458['northArrowSouth'],_0x320458['southArrowNorthWest'],_0x320458['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x371474,'positions':_0x5b72bf});}['_hideBalloon'](){const _0x471b76=this['balloonPanelView'],_0x441355=_0x471b76['content']['first'];_0x441355&&(this['_detachListeners'](_0x441355),_0x471b76['unpin'](),_0x471b76['content']['clear']());}_attachListeners(_0x1b777b){this['listenTo'](_0x1b777b,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x1b777b,'Esc',(_0x234918,_0xb5516)=>{this['_manuallyClosedAnnotationViews']['add'](_0x1b777b),this['_hideBalloon'](),_0xb5516();});}_detachListeners(_0x27a53e){this['stopListening'](_0x27a53e);}},xi=class extends _0x2a49ac{isAttached;annotations;['_manuallyClosed'];['_balloon'];_addedAnnotations;_selectedAnnotations;['_forceRefresh'];_refreshVisibilityDebounced;static get requires(){return[di,_0x28405c,Ti];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x237443){super(_0x237443),_0x237443['editing']['view']['addObserver'](lt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x237443['plugins']['get'](_0x28405c),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x51773f(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}init(){const _0x523a29=this['editor']['plugins']['get'](Ti);_0x523a29['context']===this['editor']&&(_0x523a29['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x31b6a7,_0x1f787c)=>{const _0x2bd6a0=this['_balloon'];if(this['isAttached']&&_0x2bd6a0['visibleView']){const _0x4be64c=this['annotations']['getByView'](_0x2bd6a0['visibleView']);_0x4be64c&&this['_closeAnnotation'](_0x4be64c),_0x1f787c();}}));}afterInit(){const _0x3ba852=this['editor']['plugins']['get'](Ti);_0x3ba852['context']===this['editor']&&(_0x3ba852['hasActive']()||_0x3ba852['switchTo']('inline'));}setActiveAnnotation(_0x55fbc2){_0x55fbc2!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x55fbc2&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x55fbc2)&&this['_addAnnotationToBalloon'](_0x55fbc2,!0x0),_0x55fbc2['isActive']=!0x0),_0x55fbc2||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x55fbc2);}attach(_0x4a17d9){this['annotations']=_0x4a17d9;const _0x5c6e03=this['editor']['plugins']['get'](Ti),_0x684d86=this['_balloon'];if(this['isAttached'])throw new _0x12f3e5('inlineannotations-attach-already-attached',this);if(_0x5c6e03['context']!==this['editor'])throw new _0x12f3e5('inlineannotations-not-allowed-with-context',this);const _0x2f4b22=this['editor']['plugins']['get'](di);this['listenTo'](_0x2f4b22,'refresh',()=>{const _0x4265a8=_0x2f4b22['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x7739c5,_0x381661;!this['_forceRefresh']&&(_0x7739c5=_0x4265a8,_0x381661=this['_selectedAnnotations'],_0x7739c5['length']===_0x381661['length']&&_0x7739c5['every'](_0xaa6c53=>_0x381661['includes'](_0xaa6c53)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x4265a8),this['setActiveAnnotation'](_0x4265a8[0x0]||null));}),this['listenTo'](_0x2f4b22,'blur',(_0x5dfbe1,{isAnnotationTracked:_0x543775})=>{this['activeAnnotation']&&_0x543775(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x2f4b22,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x1eab73,_0x1c2703,_0x3c1191)=>{_0x3c1191||this['setActiveAnnotation'](null);}),this['listenTo'](_0x4a17d9,'remove',(_0x42a712,_0x518d4a)=>{this['_removeAnnotationFromBalloon'](_0x518d4a),_0x518d4a===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x684d86,'change:visibleView',(_0x55dba7,_0xc89b29,_0x5c98f7,_0x28f0fc)=>{_0x28f0fc&&this['stopListening'](_0x28f0fc);const _0x47cbc7=_0x4a17d9['getByView'](_0x5c98f7);_0x5c98f7&&_0x47cbc7&&(this['listenTo'](_0x5c98f7,'change:height',()=>{_0x684d86['updatePosition']();}),this['listenTo'](_0x5c98f7,'Esc',()=>{this['_closeAnnotation'](_0x47cbc7),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x47cbc7&&this['setActiveAnnotation'](_0x47cbc7));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x684d86['visibleView']&&_0x4a17d9['getByView'](_0x684d86['visibleView'])&&_0x684d86['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 _0x12f3e5('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0xc1fb80 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0xc1fb80);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}_setSelectedAnnotations(_0x4386aa){for(const _0x64e0a4 of this['_selectedAnnotations'])_0x4386aa['includes'](_0x64e0a4)||this['_manuallyClosed']['delete'](_0x64e0a4);for(const _0x3f205f of this['annotations'])_0x4386aa['includes'](_0x3f205f)||this['_removeAnnotationFromBalloon'](_0x3f205f);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x38afaa of _0x4386aa)this['_addAnnotationToBalloon'](_0x38afaa);}this['_selectedAnnotations']=_0x4386aa;}_addAnnotationToBalloon(_0xba019e,_0x29a4ea=!0x1){this['_manuallyClosed']['has'](_0xba019e)||(this['_addedAnnotations']['has'](_0xba019e)||this['_balloon']['hasView'](_0xba019e['view'])||(this['_addedAnnotations']['add'](_0xba019e),this['_balloon']['add']({'stackId':_0xba019e['view']['id'],'view':_0xba019e['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0xba019e)}})),_0x29a4ea&&this['_balloon']['showStack'](_0xba019e['view']['id']));}_getBalloonTargetForAnnotation(_0x4d1cc1){const _0x3dec4c=_0x4d1cc1['target'],_0x4147dc=this['editor']['editing']['view'],_0x17bcd5=_0x4147dc['document']['selection']['getFirstRange'](),_0x1e5fbd=_0x4147dc['domConverter']['viewRangeToDom'](_0x17bcd5);if(_0x1e5fbd['collapse'](!0x0),_0x3dec4c){if(_0x3dec4c instanceof _0x4ec4d8)return _0x3dec4c;let _0x1be8a4=[];for(const _0x41c921 of _0x3dec4c)_0x1be8a4['push'](..._0x4ec4d8['getDomElementRects'](_0x41c921));_0x1be8a4=function(_0x53cd40){const _0x3998e4=[];let _0x379748=_0x53cd40[0x0];for(let _0x2ddc77=0x1;_0x2ddc77<_0x53cd40['length'];_0x2ddc77++)if(Pi(_0x379748,_0x53cd40[_0x2ddc77])){const _0x5b2254=_0x53cd40[_0x2ddc77]['width'];_0x379748['width']+=_0x5b2254,_0x379748['right']+=_0x5b2254;}else _0x3998e4['push'](_0x379748),_0x379748=_0x53cd40[_0x2ddc77];return _0x3998e4['push'](_0x379748),_0x3998e4;}(_0x1be8a4);const _0x2e4af0=_0x1e5fbd['getBoundingClientRect']();return _0x1be8a4['find'](_0x5c0704=>_0x5c0704['top']<=_0x2e4af0['top']&&_0x5c0704['bottom']>=_0x2e4af0['bottom']&&_0x5c0704['left']<=_0x2e4af0['left']&&_0x5c0704['right']>=_0x2e4af0['right'])||_0x1be8a4[0x0];}return _0x4d1cc1['targetRect']||_0x1e5fbd;}_removeAnnotationFromBalloon(_0x3c30c0){this['_addedAnnotations']['has'](_0x3c30c0)&&this['_balloon']['hasView'](_0x3c30c0['view'])&&(this['_addedAnnotations']['delete'](_0x3c30c0),this['_balloon']['remove'](_0x3c30c0['view']));}_closeAnnotation(_0x133ea9){this['_manuallyClosed']['add'](_0x133ea9),this['_removeAnnotationFromBalloon'](_0x133ea9);}};function Pi(_0x1fbecd,_0x11ebee){return _0x1fbecd['top']===_0x11ebee['top']&&_0x1fbecd['bottom']===_0x11ebee['bottom']&&_0x1fbecd['right']===_0x11ebee['left'];}var Li=class extends ht{['focusTracker'];['focusCycler'];_annotationViews;constructor(_0x3703e1,_0x1bf7fb){super(_0x3703e1),this['set']('isEmpty',!_0x1bf7fb['length']),this['focusTracker']=new _0x470ed5(),this['_annotationViews']=_0x1bf7fb,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new et({'focusables':_0x1bf7fb,'focusTracker':this['focusTracker']}),this['listenTo'](_0x1bf7fb,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x1bf7fb,'remove',(_0x519cc0,_0x389dd9)=>{_0x389dd9['isActive']&&this['focus'](),_0x1bf7fb['length']||(this['isEmpty']=!0x0);});const _0x347958=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':Et(_0x3703e1,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x1bf7fb},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x347958['if']('isEmpty','ck-hidden',_0x5f2d18=>!_0x5f2d18)]},'children':[{'text':Et(_0x3703e1,'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 _0x44b253 of this['_annotationViews'])this['focusTracker']['add'](_0x44b253['element']);this['_annotationViews']['on']('change',(_0x4bf4b5,{added:_0x4086d6,removed:_0x57075e})=>{for(const _0x81f5a8 of _0x4086d6)this['focusTracker']['add'](_0x81f5a8['element']);for(const _0x3b22b5 of _0x57075e)this['focusTracker']['remove'](_0x3b22b5['element']);});}},Di=class extends _0x21a737{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[oi,ti];}constructor(_0x14f158){super(_0x14f158),this['archivedThreads']=new _0x74a9da();}init(){const _0x5954b8=this['context'],_0x516926=_0x5954b8['plugins']['get'](oi),_0x5b6837=_0x5954b8['plugins']['get'](ti);this['listenTo'](_0x516926,'addCommentThread',(_0x139b33,{threadId:_0x2efa6d})=>{const _0x2b273b=_0x516926['getCommentThread'](_0x2efa6d);_0x2b273b['archivedAt']&&this['archivedThreads']['add'](_0x2b273b,this['_calculatePosition'](_0x2b273b['archivedAt'])),this['listenTo'](_0x2b273b,'change:archivedAt',(_0x1f40b,_0x47745c,_0x3629bd)=>{_0x3629bd?this['archivedThreads']['has'](_0x2b273b)||this['archivedThreads']['add'](_0x2b273b,this['_calculatePosition'](_0x2b273b['archivedAt'])):this['archivedThreads']['has'](_0x2b273b)&&this['archivedThreads']['remove'](_0x2b273b);});}),this['listenTo'](_0x516926,'removeCommentThread',(_0x5c61c9,{threadId:_0x2cb720})=>{const _0x4fe435=_0x516926['getCommentThread'](_0x2cb720);this['stopListening'](_0x4fe435),this['archivedThreads']['has'](_0x4fe435)&&this['archivedThreads']['remove'](_0x4fe435);},{'priority':'highest'}),this['listenTo'](_0x5b6837['collection'],'focus',(_0x338bae,_0x36230f)=>{_0x36230f['isVisible']||(_0x36230f['isActive']=!0x0,_0x5b6837['activate'](_0x36230f));});}_calculatePosition(_0x51ef3d){const _0x1c9d76=[...this['archivedThreads']]['findIndex'](_0x152519=>_0x152519['archivedAt']<_0x51ef3d);return _0x1c9d76>-0x1?_0x1c9d76:this['archivedThreads']['length'];}},Vi=class extends _0x2a49ac{commentsArchiveView;annotationViews;['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Di,_0x1759de];}constructor(_0x5071f0){super(_0x5071f0),this['annotationViews']=new at(),this['_pendingThreads']=[];}init(){const _0x40e2e0=this['editor'],_0x457ece=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x40e2e0['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x2ae0c1,!0x0)),_0x40e2e0['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x5eff98=this['_createCommentsArchiveButton'](rt);return _0x5eff98['set']({'role':'menuitemcheckbox'}),_0x5eff98;});const _0x21d74c=_0x40e2e0['plugins']['get'](Di),_0x18a2a2=_0x40e2e0['plugins']['get']('Annotations'),_0x268011=_0x40e2e0['plugins']['get']('CommentsRepository');_0x21d74c['archivedThreads']['forEach'](_0x1587fe=>{this['_handleNewThread'](_0x1587fe);}),this['listenTo'](_0x21d74c['archivedThreads'],'add',(_0x3fec01,_0x271733)=>{this['_handleNewThread'](_0x271733);}),this['listenTo'](_0x18a2a2['collection'],'add',(_0xb91e5b,_0x1167d5)=>{const _0x1634ae=this['_pendingThreads']['find'](_0x9b9322=>{const _0x46e424=_0x268011['_threadToController']['get'](_0x9b9322);return _0x46e424&&_0x1167d5['innerView']===_0x46e424['view'];});if(_0x1634ae){const _0x3cdc3d=this['_calculatePosition'](_0x1634ae['archivedAt']);this['_addAnnotationToArchive'](_0x1167d5,_0x3cdc3d),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x1634ae),0x1);}}),this['listenTo'](_0x21d74c['archivedThreads'],'remove',(_0x34f49a,_0x2f50e4)=>{const _0x3bf398=_0x40e2e0['config']['get']('collaboration.channelId');if(!_0x3bf398||_0x2f50e4['channelId']===_0x3bf398){if(this['_pendingThreads']['includes'](_0x2f50e4))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2f50e4),0x1);else{const _0x5aba2c=_0x268011['_threadToController']['get'](_0x2f50e4),_0x5a655=_0x18a2a2['getByInnerView'](_0x5aba2c['view']);this['annotationViews']['remove'](_0x5a655['view']),this['stopListening'](_0x5a655),this['stopListening'](_0x5a655['focusableElements']);}}}),this['listenTo'](_0x18a2a2['collection'],'add',(_0x1df258,_0x1065b5)=>{this['listenTo'](_0x1065b5,'escape',_0x457ece);}),this['listenTo'](_0x18a2a2['collection'],'remove',(_0xdf75f8,_0x4f4042)=>{this['stopListening'](_0x4f4042,'escape',_0x457ece);});}_addAnnotationToArchive(_0x591536,_0x57106e){this['listenTo'](_0x591536,'set:isVisible',_0x573d58=>{_0x573d58['return']=!0x1,_0x573d58['stop']();}),this['annotationViews']['add'](_0x591536['view'],_0x57106e);}['_handleNewThread'](_0x909f7b){const _0x6d1d4c=this['editor']['plugins']['get']('CommentsRepository'),_0x2d6191=this['editor']['plugins']['get']('Annotations'),_0x1b75fd=this['editor']['config']['get']('collaboration.channelId');if(!_0x1b75fd||_0x909f7b['channelId']===_0x1b75fd){const _0x34e6e8=_0x6d1d4c['_threadToController']['get'](_0x909f7b);if(!_0x34e6e8)return void this['_pendingThreads']['push'](_0x909f7b);const _0x10cd15=this['_calculatePosition'](_0x909f7b['archivedAt']),_0x58fc0b=_0x2d6191['getByInnerView'](_0x34e6e8['view']);_0x58fc0b['isVisible']&&_0x2d6191['_visibleAnnotations']['remove'](_0x58fc0b),this['_addAnnotationToArchive'](_0x58fc0b,_0x10cd15);}}_calculatePosition(_0x4400a6){const _0x99f898=this['editor']['config']['get']('collaboration.channelId'),_0x2200d5=[...this['editor']['plugins']['get'](Di)['archivedThreads']]['filter'](_0x21c108=>_0x21c108['channelId']===_0x99f898)['findIndex'](_0x55c2dd=>_0x55c2dd['archivedAt']<_0x4400a6);return _0x2200d5<0x0||_0x2200d5>this['annotationViews']['length']?this['annotationViews']['length']:_0x2200d5-0x1;}_toggleDialog(){const _0x432880=this['editor'],_0xe7250a=_0x432880['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Li(_0x432880['locale'],this['annotationViews'])),'commentsArchive'===_0xe7250a['id']?_0xe7250a['hide']():_0xe7250a['show']({'id':'commentsArchive','title':Et(_0x432880['locale'],'COMMENTS_ARCHIVE'),'icon':_0x6a8362,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x36aeeb['EDITOR_TOP_SIDE']});}_createCommentsArchiveButton(_0x1b2305,_0x57e0a4=!0x1){const _0xa09679=this['editor']['locale'],_0x286c71=this['editor']['plugins']['get']('Dialog'),_0x185db1=new _0x1b2305(_0xa09679);return _0x185db1['bind']('isEnabled')['to'](this,'isEnabled'),_0x185db1['bind']('isOn')['to'](_0x286c71,'id',_0x3270ac=>'commentsArchive'===_0x3270ac),_0x185db1['set']({'label':Et(_0xa09679,'COMMENTS_ARCHIVE'),'icon':_0x6a8362,'isToggleable':!0x0}),_0x57e0a4&&(_0x185db1['tooltip']=!0x0),this['listenTo'](_0x185db1,'execute',()=>this['_toggleDialog']()),_0x185db1;}_hideDialogOnAnnotationEscape=_0x379e4c=>{const _0x4e6d1d=_0x379e4c['source'];if(!this['annotationViews']['has'](_0x4e6d1d['view']))return;const _0x19d92f=this['editor']['plugins']['get']('Dialog');_0x19d92f['isOpen']&&'commentsArchive'===_0x19d92f['id']&&(_0x19d92f['hide'](),_0x379e4c['stop']());};},Bi=class extends _0x2a49ac{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};