@ckeditor/ckeditor5-comments 48.4.0-alpha.2 → 48.4.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/dist/index.js +11 -11
  2. package/dist/translations/af.js +1 -1
  3. package/dist/translations/af.umd.js +1 -1
  4. package/dist/translations/ar.js +1 -1
  5. package/dist/translations/ar.umd.js +1 -1
  6. package/dist/translations/ast.js +1 -1
  7. package/dist/translations/ast.umd.js +1 -1
  8. package/dist/translations/az.js +1 -1
  9. package/dist/translations/az.umd.js +1 -1
  10. package/dist/translations/be.js +1 -1
  11. package/dist/translations/be.umd.js +1 -1
  12. package/dist/translations/bg.js +1 -1
  13. package/dist/translations/bg.umd.js +1 -1
  14. package/dist/translations/bn.js +1 -1
  15. package/dist/translations/bn.umd.js +1 -1
  16. package/dist/translations/bs.js +1 -1
  17. package/dist/translations/bs.umd.js +1 -1
  18. package/dist/translations/ca.js +1 -1
  19. package/dist/translations/ca.umd.js +1 -1
  20. package/dist/translations/cs.js +1 -1
  21. package/dist/translations/cs.umd.js +1 -1
  22. package/dist/translations/da.js +1 -1
  23. package/dist/translations/da.umd.js +1 -1
  24. package/dist/translations/de-ch.js +1 -1
  25. package/dist/translations/de-ch.umd.js +1 -1
  26. package/dist/translations/de.js +1 -1
  27. package/dist/translations/de.umd.js +1 -1
  28. package/dist/translations/el.js +1 -1
  29. package/dist/translations/el.umd.js +1 -1
  30. package/dist/translations/en-au.js +1 -1
  31. package/dist/translations/en-au.umd.js +1 -1
  32. package/dist/translations/en-gb.js +1 -1
  33. package/dist/translations/en-gb.umd.js +1 -1
  34. package/dist/translations/en.js +1 -1
  35. package/dist/translations/en.umd.js +1 -1
  36. package/dist/translations/eo.js +1 -1
  37. package/dist/translations/eo.umd.js +1 -1
  38. package/dist/translations/es-co.js +1 -1
  39. package/dist/translations/es-co.umd.js +1 -1
  40. package/dist/translations/es.js +1 -1
  41. package/dist/translations/es.umd.js +1 -1
  42. package/dist/translations/et.js +1 -1
  43. package/dist/translations/et.umd.js +1 -1
  44. package/dist/translations/eu.js +1 -1
  45. package/dist/translations/eu.umd.js +1 -1
  46. package/dist/translations/fa.js +1 -1
  47. package/dist/translations/fa.umd.js +1 -1
  48. package/dist/translations/fi.js +1 -1
  49. package/dist/translations/fi.umd.js +1 -1
  50. package/dist/translations/fr.js +1 -1
  51. package/dist/translations/fr.umd.js +1 -1
  52. package/dist/translations/gl.js +1 -1
  53. package/dist/translations/gl.umd.js +1 -1
  54. package/dist/translations/gu.js +1 -1
  55. package/dist/translations/gu.umd.js +1 -1
  56. package/dist/translations/he.js +1 -1
  57. package/dist/translations/he.umd.js +1 -1
  58. package/dist/translations/hi.js +1 -1
  59. package/dist/translations/hi.umd.js +1 -1
  60. package/dist/translations/hr.js +1 -1
  61. package/dist/translations/hr.umd.js +1 -1
  62. package/dist/translations/hu.js +1 -1
  63. package/dist/translations/hu.umd.js +1 -1
  64. package/dist/translations/hy.js +1 -1
  65. package/dist/translations/hy.umd.js +1 -1
  66. package/dist/translations/id.js +1 -1
  67. package/dist/translations/id.umd.js +1 -1
  68. package/dist/translations/it.js +1 -1
  69. package/dist/translations/it.umd.js +1 -1
  70. package/dist/translations/ja.js +1 -1
  71. package/dist/translations/ja.umd.js +1 -1
  72. package/dist/translations/jv.js +1 -1
  73. package/dist/translations/jv.umd.js +1 -1
  74. package/dist/translations/kk.js +1 -1
  75. package/dist/translations/kk.umd.js +1 -1
  76. package/dist/translations/km.js +1 -1
  77. package/dist/translations/km.umd.js +1 -1
  78. package/dist/translations/kn.js +1 -1
  79. package/dist/translations/kn.umd.js +1 -1
  80. package/dist/translations/ko.js +1 -1
  81. package/dist/translations/ko.umd.js +1 -1
  82. package/dist/translations/ku.js +1 -1
  83. package/dist/translations/ku.umd.js +1 -1
  84. package/dist/translations/lt.js +1 -1
  85. package/dist/translations/lt.umd.js +1 -1
  86. package/dist/translations/lv.js +1 -1
  87. package/dist/translations/lv.umd.js +1 -1
  88. package/dist/translations/ms.js +1 -1
  89. package/dist/translations/ms.umd.js +1 -1
  90. package/dist/translations/nb.js +1 -1
  91. package/dist/translations/nb.umd.js +1 -1
  92. package/dist/translations/ne.js +1 -1
  93. package/dist/translations/ne.umd.js +1 -1
  94. package/dist/translations/nl.js +1 -1
  95. package/dist/translations/nl.umd.js +1 -1
  96. package/dist/translations/no.js +1 -1
  97. package/dist/translations/no.umd.js +1 -1
  98. package/dist/translations/oc.js +1 -1
  99. package/dist/translations/oc.umd.js +1 -1
  100. package/dist/translations/pl.js +1 -1
  101. package/dist/translations/pl.umd.js +1 -1
  102. package/dist/translations/pt-br.js +1 -1
  103. package/dist/translations/pt-br.umd.js +1 -1
  104. package/dist/translations/pt.js +1 -1
  105. package/dist/translations/pt.umd.js +1 -1
  106. package/dist/translations/ro.js +1 -1
  107. package/dist/translations/ro.umd.js +1 -1
  108. package/dist/translations/ru.js +1 -1
  109. package/dist/translations/ru.umd.js +1 -1
  110. package/dist/translations/si.js +1 -1
  111. package/dist/translations/si.umd.js +1 -1
  112. package/dist/translations/sk.js +1 -1
  113. package/dist/translations/sk.umd.js +1 -1
  114. package/dist/translations/sl.js +1 -1
  115. package/dist/translations/sl.umd.js +1 -1
  116. package/dist/translations/sq.js +1 -1
  117. package/dist/translations/sq.umd.js +1 -1
  118. package/dist/translations/sr-latn.js +1 -1
  119. package/dist/translations/sr-latn.umd.js +1 -1
  120. package/dist/translations/sr.js +1 -1
  121. package/dist/translations/sr.umd.js +1 -1
  122. package/dist/translations/sv.js +1 -1
  123. package/dist/translations/sv.umd.js +1 -1
  124. package/dist/translations/th.js +1 -1
  125. package/dist/translations/th.umd.js +1 -1
  126. package/dist/translations/ti.js +1 -1
  127. package/dist/translations/ti.umd.js +1 -1
  128. package/dist/translations/tk.js +1 -1
  129. package/dist/translations/tk.umd.js +1 -1
  130. package/dist/translations/tr.js +1 -1
  131. package/dist/translations/tr.umd.js +1 -1
  132. package/dist/translations/tt.js +1 -1
  133. package/dist/translations/tt.umd.js +1 -1
  134. package/dist/translations/ug.js +1 -1
  135. package/dist/translations/ug.umd.js +1 -1
  136. package/dist/translations/uk.js +1 -1
  137. package/dist/translations/uk.umd.js +1 -1
  138. package/dist/translations/ur.js +1 -1
  139. package/dist/translations/ur.umd.js +1 -1
  140. package/dist/translations/uz.js +1 -1
  141. package/dist/translations/uz.umd.js +1 -1
  142. package/dist/translations/vi.js +1 -1
  143. package/dist/translations/vi.umd.js +1 -1
  144. package/dist/translations/zh-cn.js +1 -1
  145. package/dist/translations/zh-cn.umd.js +1 -1
  146. package/dist/translations/zh.js +1 -1
  147. package/dist/translations/zh.umd.js +1 -1
  148. package/package.json +16 -16
package/dist/index.js CHANGED
@@ -20,14 +20,14 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Command as _0x2e378e,Context as _0x105201,ContextPlugin as _0xdeb873,Editor as _0x1ecf96,PendingActions as _0x17ea24,Plugin as _0x5e7fa9}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x5d272e,Collection as _0xf9e025,DomEmitterMixin as _0x4ded3c,FocusTracker as _0xf8949c,KeystrokeHandler as _0x51855f,ObservableMixin as _0x117cb5,Rect as _0x275a65,diff as _0x1c1707,first as _0x1d009b,getEnvKeystrokeText as _0x5ba350,keyCodes as _0x3c0182,priorities as _0x3b02ac,scrollViewportToShowTarget as _0x118fae,toUnit as _0x3a6317,uid as _0x4df11c}from'@ckeditor/ckeditor5-utils';import{AriaDescriptionView as _0x4b01e4,ConfirmMixin as _0x5eeaee,FOCUS_ANNOTATION_KEYSTROKE as _0x41d991,LateFocusButtonView as _0x3ffd3f,LateFocusDropdownButtonView as _0x43e1fb,UserView as _0x49f9c9,Users as _0x4c3234,getAllMarkersDomElementsSorted as _0x585495,getDateTimeFormatter as _0x46d710,hashObject as _0x3cf180,setupThreadKeyboardNavigation as _0x134d51,surroundingMarkersDetector as _0x52ee07,trimHtml as _0x2a51d3}from'@ckeditor/ckeditor5-collaboration-core';import{cloneDeep as _0x202236,debounce as _0x5364de,isEqual as _0x28ef43,set as _0x3e68a1,throttle as _0x4b67e0,unset as _0x1734e3}from'es-toolkit/compat';import{IconAddComment as _0x1f0c12,IconCheck as _0x41dcb2,IconCommentsArchive as _0x3cd58f,IconPencil as _0x57cf4c,IconRemoveComment as _0x301365,IconThreeVerticalDots as _0x454f32,IconUndo as _0x73daa4}from'@ckeditor/ckeditor5-icons';import{BalloonPanelView as _0x3c9681,BodyCollection as _0x11963a,ButtonView as _0x3d0035,ContextualBalloon as _0x2f43a3,Dialog as _0x5f5b49,DialogViewPosition as _0xdf8d97,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
- _0x117cb5();var bt=class extends It{['model'];['view'];constructor(_0x21c4a9,_0x5aa701){super(),this['model']=_0x21c4a9,this['model']['_isAttached']=!0x0,this['view']=_0x5aa701,this['listenTo'](_0x5aa701,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x5aa701,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x5aa701,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x5aa701,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x5aa701,'addComment',(_0x141f16,_0xa5c247)=>this['addComment'](_0xa5c247)),this['listenTo'](_0x5aa701,'updateComment',(_0xb89e57,_0x108ba5,_0x298736)=>this['updateComment'](_0x108ba5,_0x298736)),this['listenTo'](_0x5aa701,'removeComment',(_0x415adf,_0x4fb4c4)=>this['removeComment'](_0x4fb4c4));}submit(){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}addComment(_0x1f6f6c){this['model']['addComment']({'content':_0x1f6f6c,'authorId':this['view']['_localUser']['id']});}updateComment(_0x2ad8ba,_0x26199e){this['model']['getComment'](_0x2ad8ba)['update']({'content':_0x26199e});}removeComment(_0x41372f){this['model']['getComment'](_0x41372f)['remove']();}destroy(){this['stopListening'](),this['model']['_isAttached']=!0x1;}};function Et(_0x308b01,_0x101c45,_0x85ab88){const t=_0x308b01['t'];switch(_0x101c45){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'},_0x85ab88);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'},_0x85ab88);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'},_0x85ab88);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'},_0x85ab88);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x85ab88);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'},_0x85ab88);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'},_0x85ab88);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'},_0x85ab88);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(_0xda7c0d,_0x3db22b){super(_0xda7c0d);const _0x2fafa0=_0x4df11c();this['main']=this['createCollection'](),this['editable']=new st(_0xda7c0d,_0x3db22b,void 0x0,{'label':()=>Et(_0xda7c0d,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0xda7c0d['uiLanguageDirection'],'lang':_0xda7c0d['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x2fafa0},'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(_0x5a6d82){super(_0x5a6d82),this['view']=new kt(_0x5a6d82['locale'],_0x5a6d82['editing']['view']);}get element(){return this['view']['element'];}init(){const _0x33a2fe=this['editor']['editing']['view'],_0x1b9251=this['view']['editable'];_0x1b9251['name']=_0x33a2fe['document']['getRoot']()['rootName'],this['view']['render']();const _0x4bf6e5=_0x1b9251['element'];this['setEditableElement'](_0x1b9251['name'],_0x4bf6e5),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x33a2fe['attachDomRoot'](_0x4bf6e5),this['fire']('ready');}destroy(){super['destroy'](),this['view']['destroy']();}};const Ot=[ft,gt,_t,At,vt,yt,Tt],Mt=/* #__PURE__ -- @preserve */
25
- _0x117cb5(_0x1ecf96);var Rt=class CommentEditor extends Mt{static defaultPlugins=/* #__PURE__ -- @preserve */
26
- ((()=>Ot)());constructor(_0x66fb88={}){(_0x66fb88=Object['assign']({},_0x66fb88))['plugins']||(_0x66fb88['plugins']=CommentEditor['defaultPlugins']),super(_0x66fb88),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 _0x82c24d=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x82c24d))['then'](()=>this['fire']('ready'));}destroy(){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x4fa6d8=>{const _0x48280b=this['model']['document']['getRoot'](),_0x278e9a=_0x48280b&&_0x48280b['getChild'](_0x48280b['childCount']-0x1);_0x4fa6d8['setSelection'](_0x278e9a,'end'),this['editing']['view']['focus']();});}_updatePlaceholder(){const _0x34011b=this['editing']['view'],_0x546d8a=_0x34011b['document']['getRoot'](),_0x110654=_0x546d8a['getChild'](0x0);_0x546d8a['childCount']>0x1||!_0x110654||'p'!=_0x110654['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x34011b,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x110654['placeholder']=this['placeholder']),ut({'view':_0x34011b,'element':_0x110654,'keepOnFocus':!0x0}),this['placeholderElement']=_0x110654);}},St=class extends ht{keystrokes;['focusTracker'];['focusables'];['focusCycler'];submitButtonView;cancelButtonView;_editorConfig;constructor(_0x1b18d3,_0x360b54={}){super(_0x1b18d3),this['editor']=null,this['_editorConfig']=_0x360b54,this['set']('value',_0x360b54['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',Et(_0x1b18d3,'Reply...')),this['set']('submitLabel',Et(_0x1b18d3,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x51855f(),this['focusTracker']=new _0xf8949c(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1bdc74=>!_0x1bdc74['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',(_0x10c211,_0x48285d)=>{this['cancelButtonView']['fire']('execute'),_0x48285d();}),this['keystrokes']['set']('Ctrl+Enter',(_0x490c46,_0x31705e)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x31705e());}),this['on']('submit',(_0x2100b7,_0x10640b)=>{_0x10640b['length']>0xfde8?(alert(Et(_0x1b18d3,'TOO_LONG_COMMENT_ALERT',[_0x10640b['length'],0xfde8])),_0x2100b7['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 _0x3bb359=this['editor'];this['element']['insertBefore'](_0x3bb359['ui']['element'],this['element']['firstChild']),_0x3bb359['model']['document']['on']('change',()=>this['value']=_0x3bb359['getData']()),_0x3bb359['bind']('placeholder')['to'](this),this['focusables']['add'](_0x3bb359['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x3c9903){-0x1===_0x3c9903?(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:_0x406a96}=this,_0x37bd0a=new _0x3d0035(_0x406a96);return _0x37bd0a['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x37bd0a['withText']=!0x0,_0x37bd0a['bind']('label')['to'](this,'submitLabel'),_0x37bd0a['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x37bd0a['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x1fdea4,_0x10afd8)=>!_0x10afd8&&!!_0x1fdea4['trim']()),_0x37bd0a;}_createCancelButton(){const {locale:_0x39bbb6}=this,_0x582a31=new _0x3d0035(_0x39bbb6);return _0x582a31['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x582a31['label']=Et(_0x39bbb6,'Cancel'),_0x582a31['withText']=!0x0,_0x582a31['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x582a31;}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x182e19=>{this['focusTracker']['add'](_0x182e19['element']);}),this['focusables']['on']('change',(_0x4c5400,_0x33faab)=>{for(const _0x194ec5 of Array['from'](_0x33faab['added'])['reverse']())this['focusTracker']['add'](_0x194ec5['element']);});}},xt=class extends ht{constructor(_0x5ef9c9,_0x12e162,_0x22ea91){super(_0x5ef9c9),this['commentInputView']=new St(_0x5ef9c9,_0x22ea91),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x52b288,_0x3ac0d6)=>_0x52b288||!!_0x3ac0d6),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 _0x49f9c9(_0x5ef9c9,_0x12e162),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'](_0x48ea01){this['commentInputView']['focus'](_0x48ea01);}_focusOnNonInteractiveMouseDown(){this['listenTo'](this['element'],'mousedown',(_0x5e89e0,_0x6ddb92)=>{const {submitButtonView:_0x35c63e,cancelButtonView:_0x160c26,editor:_0x300f51}=this['commentInputView'];[_0x35c63e['element'],_0x160c26['element'],_0x300f51?_0x300f51['editing']['view']['getDomRoot']():null]['filter'](_0x1e5b72=>_0x1e5b72)['some'](_0x3fa770=>_0x3fa770['contains'](_0x6ddb92['target']))||(this['focus'](),_0x6ddb92['preventDefault']());});}},Pt=class extends ht{constructor(_0x1bf6ed){super(_0x1bf6ed);const _0x4d7f62=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x4d7f62['to']('count',_0x5b89c4=>Et(_0x1bf6ed,'NUMBER_OF_COMMENTS',_0x5b89c4))}]});}},Lt=class extends ht{commentViews;resolvedCommentView;['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];_collapsedCommentsView;constructor(_0x30040e,_0x353e6d,_0x5a6a26){super(_0x30040e);const _0x11aa09=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x353e6d['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x353e6d,this['_config']=_0x5a6a26,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0xf8949c(),this['keystrokes']=new _0x51855f(),this['focusCycler']=new et({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x575b29=>this['commentViews']['map'](_0x7a3d41=>_0x7a3d41['element'])['includes'](_0x575b29['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Pt(_0x30040e),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x37baf7=>_0x37baf7-this['_config']['maxCommentsWhenCollapsed']);for(const _0x7746b of _0x353e6d['comments'])this['_handleNewCommentModel'](_0x7746b);this['_handleInfoComment'](),this['listenTo'](_0x353e6d['comments'],'add',(_0x3284d3,_0x3e4219)=>{const _0x47b330=this['_calculatePosition'](_0x3e4219);this['length']++,this['_handleNewCommentModel'](_0x3e4219,_0x47b330),this['refreshVisibleViews']();}),this['listenTo'](_0x353e6d['comments'],'remove',(_0x511bb9,_0x5faa20)=>{this['length']--,this['_handleRemoveCommentModel'](_0x5faa20),this['refreshVisibleViews']();}),this['listenTo'](_0x353e6d,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x353e6d,'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',_0x11aa09['if']('length','ck-hidden',_0x2abd5b=>!_0x2abd5b)],'aria-label':Et(_0x30040e,'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'](_0x283bc1){-0x1===_0x283bc1?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}destroy(){this['_collapsedCommentsView']['destroy']();for(const _0x2021ac of this['commentViews'])_0x2021ac['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}_handleNewCommentModel(_0x380864,_0x17bd00){const _0x4ecf4f=new this['_config']['CommentView'](this['locale'],_0x380864,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x4ecf4f['viewUid']=_0x380864['id'],_0x4ecf4f['delegate']('removeComment')['to'](this),_0x4ecf4f['delegate']('updateComment')['to'](this),_0x4ecf4f['delegate']('resolveCommentThread')['to'](this),_0x4ecf4f['delegate']('editorReady')['to'](this),_0x4ecf4f['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x4ecf4f,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x4ecf4f,_0x17bd00);}_calculatePosition(_0x589eaf){const _0x51402a=this['_model']['_findOptimalIndex'](_0x589eaf);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x589eaf['authoredAt']?_0x51402a-0x1:_0x51402a:_0x51402a-0x1;}_handleInfoComment(){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x420089={'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'],_0x420089,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x420089));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}_handleRemoveCommentModel(_0x27e18a){const _0x245c73=this['commentViews']['remove'](_0x27e18a['id']);this['stopListening'](_0x245c73),_0x245c73['isEditMode']&&this['_updateHasDirtyComment'](),_0x245c73['destroy']();}_updateHasDirtyComment(){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0xec631d=>_0xec631d['isEditMode']);}['_rearrangeCollapse'](){const _0x15949b=function(_0xe86311){const _0x278218=new _0xf9e025();for(const _0x66b6ab of _0xe86311)_0x278218['add'](_0x66b6ab);return _0x278218;}(this['commentViews']),_0xe281ea=this['_collapsedCommentsView']['count'];for(let _0x701678=0x1;_0x701678<=_0xe281ea;_0x701678++)_0x15949b['remove'](0x1);for(const _0x926287 of _0x15949b)_0x926287['collapse']();_0xe281ea>0x0&&_0x15949b['add'](this['_collapsedCommentsView'],0x1),Dt(_0x1c1707(Array['from'](this['visibleViews']),Array['from'](_0x15949b)),this['visibleViews'],_0x15949b);}['_rearrangeExpand'](){Dt(_0x1c1707(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x23fcf1 of this['visibleViews'])_0x23fcf1['expand']();}_setupKeyboardNavigation(){this['commentViews']['forEach'](_0x453359=>{this['focusTracker']['add'](_0x453359['element']),this['keystrokes']['listenTo'](_0x453359['element']);}),this['commentViews']['on']('change',(_0x2cfdda,_0x347201)=>{for(const _0x5845d5 of _0x347201['removed'])this['focusTracker']['remove'](_0x5845d5['element']),this['keystrokes']['stopListening'](_0x5845d5['element']);for(const _0x275f66 of Array['from'](_0x347201['added'])['reverse']())this['focusTracker']['add'](_0x275f66['element']),this['keystrokes']['listenTo'](_0x275f66['element']);});}};function Dt(_0x15e46a,_0xbff01a,_0x28da02){let _0x239250=0x0;for(const _0x754e89 of _0x15e46a)switch(_0x754e89){case'insert':_0xbff01a['add'](_0x28da02['get'](_0x239250),_0x239250),_0x239250++;break;case'delete':_0xbff01a['remove'](_0x239250);break;case'equal':_0x239250++;}}var Vt=class extends ht{constructor(_0x328c52){super(_0x328c52);const _0x497ce4=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x497ce4['to']('contextValue',_0x639937=>Et(_0x328c52,'THREAD_CONTEXT_LABEL',_0x639937)),'tabindex':-0x1},'children':[{'text':_0x497ce4['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Bt=class extends ht{['_model'];reopenButtonView;contextView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x2c1510,_0x159f96){super(_0x2c1510);const _0xbff59e=this['bindTemplate'];this['_model']=_0x159f96,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0xf8949c(),this['keystrokes']=new _0x51855f(),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',_0x2410f0=>!!_0x2410f0),this['bind']('contextValue')['to'](this['_model'],'context',_0x1c34c6=>_0x1c34c6&&_0x1c34c6['value']?this['_trimContextValue'](_0x1c34c6['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',_0xbff59e['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 _0xdfa898=new _0x3d0035(this['locale']);return _0xdfa898['label']=Et(this['locale'],'Reopen'),_0xdfa898['tooltip']=Et(this['locale'],'Reopen'),_0xdfa898['icon']=_0x73daa4,_0xdfa898['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4f847b=>!_0x4f847b),_0xdfa898['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x17a2fc,_0x47105c)=>_0x17a2fc&&_0x47105c),_0xdfa898['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0xdfa898;}_trimContextValue(_0x87c750){if(_0x87c750['length']<0x96)return _0x87c750;const _0xd8f65d=_0x87c750['lastIndexOf']('\x20',0x93);return _0x87c750['substring'](0x0,_0xd8f65d>-0x1?_0xd8f65d:0x93)+'...';}_attachContextActions(){const _0x5a85dd=this['element']['querySelector']('.ck-context'),_0x33b661=_0x5a85dd['querySelector']('.ck-context__value');this['listenTo'](_0x5a85dd,'mouseenter',()=>{_0x33b661['offsetWidth']<_0x33b661['scrollWidth']&&_0x5a85dd['classList']['add']('overlay');}),this['listenTo'](_0x5a85dd,'mouseleave',()=>{_0x5a85dd['classList']['remove']('overlay');});}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']);for(const _0x2103a1 of this['focusables'])this['focusTracker']['add'](_0x2103a1['element']),this['keystrokes']['listenTo'](_0x2103a1['element']);}_createContextView(){const _0xc2fff0=new Vt(this['locale']);return _0xc2fff0['bind']('contextValue')['to'](this),_0xc2fff0;}},Ht=class extends ht{['_model'];['_config'];commentThreadHeaderView;commentThreadInputView;ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x2d82ed,_0x36efaf,_0x33606f,_0x29503b){super(_0x2d82ed),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x36efaf,this['_localUser']=_0x33606f,this['_config']=_0x29503b,this['commentThreadHeaderView']=new Bt(_0x2d82ed,_0x36efaf),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x4b01e4(_0x2d82ed,Et(_0x2d82ed,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Lt(_0x2d82ed,_0x36efaf,Object['assign']({'CommentView':this['_config']['CommentView']},_0x29503b)),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',(_0x15d213,_0x523ac9)=>_0x15d213||!!_0x523ac9),this['bind']('isUnlinked')['to'](_0x36efaf,'unlinkedAt',_0xe33e4e=>!!_0xe33e4e);let _0x53c81f=null;const _0x891325=()=>{const _0x552438=this['_model']['comments']['first']||null;_0x552438!==_0x53c81f&&(_0x53c81f&&this['stopListening'](_0x53c81f,'change:content'),_0x53c81f=_0x552438,_0x552438&&this['listenTo'](_0x552438,'change:content',_0x891325));const _0x356306=_0x552438?_0x552438['author']['name']:this['_localUser']['name'],_0x124383=_0x552438?new DOMParser()['parseFromString'](_0x2a51d3(_0x552438['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']}),'text/html')['body']['textContent']:'',_0x5d37ca=Et(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x356306]);this['set']('ariaLabel',_0x124383?_0x5d37ca+'\x20'+_0x124383:_0x5d37ca);};this['listenTo'](this['_model']['comments'],'change',_0x891325),_0x891325(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0xf8949c(),this['keystrokes']=new _0x51855f(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x209c97=>_0x209c97['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x134d51(this,this['focusables']);}async destroy(){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}_createCommentThreadInputView(){const _0x511547=new xt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x4f03df=_0x511547['commentInputView'];return _0x511547['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x4f03df,'value',(_0x351283,_0x290635,_0x2a8466,_0x2c4ddf,_0x488749)=>!!_0x488749||!!_0x2c4ddf&&_0x2a8466&&!_0x290635||_0x351283&&_0x2a8466&&!_0x290635),_0x4f03df['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x17aab9,_0x1cc566,_0x83519f)=>{let _0x43d82c;return _0x43d82c=_0x83519f&&_0x1cc566?'Reply\x20to\x20reopen\x20discussion...':_0x17aab9?'Reply...':'Write\x20a\x20comment...',Et(this['locale'],_0x43d82c);}),_0x4f03df['bind']('submitLabel')['to'](this,'length',_0x3a291a=>Et(this['locale'],_0x3a291a?'Reply':'Comment')),_0x4f03df['on']('submit',(_0x26084e,_0x280112)=>{this['fire']('addComment',_0x280112),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x4f03df['on']('cancel',()=>{this['focus']();}),_0x4f03df['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x4f03df['on']('cancel',_0x2d1af6=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x2d1af6['stop']());}),this['on']('change:isActive',(_0x5805ab,_0x56583b,_0x32eefe)=>{_0x32eefe||this['length']||_0x4f03df['value']||this['fire']('removeCommentThread');}),_0x511547;}};const Ft=/* #__PURE__ -- @preserve */
27
- _0x5eeaee(Ht);var Ut=class extends Ft{commentThreadChildren;containerElement;resolveButton;_boundFirstCommentView;constructor(_0x7e205b,_0x336cb1,_0x4ac768,_0x1dfd82){super(_0x7e205b,_0x336cb1,_0x4ac768,_0x1dfd82),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x7e205b,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x2884b6,_0x2b6431,_0x4d808a)=>{_0x4d808a||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x120935,_0x30a89f,_0x14acc0)=>{_0x14acc0&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}getTemplate(){const _0x22d9fa=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x22d9fa['if']('isActive','ck-thread--active'),_0x22d9fa['if']('isUnlinked','ck-thread--unlinked'),_0x22d9fa['to']('actionIndicator',_0x1afdb0=>_0x1afdb0?'ck-thread--'+_0x1afdb0:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x22d9fa['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 _0x43e4b1 of this['commentsListView']['commentViews'])_0x43e4b1['cancelConfirm']();}_bindFirstCommentView(){const {locale:_0x283f29}=this,_0x3d81ad=this['commentsListView']['commentViews']['get'](0x0);_0x3d81ad===this['_boundFirstCommentView']||_0x3d81ad['isSystemComment']||(this['_boundFirstCommentView']=_0x3d81ad,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x3d81ad,'actionIndicator',_0x12101d=>'remove'===_0x12101d?'remove':null),_0x3d81ad['placeholder']=Et(_0x283f29,'Write\x20a\x20comment...'),_0x3d81ad['removeButton']['on']('execute',_0x3d1a0b=>{_0x3d1a0b['stop'](),this['showConfirm'](Et(_0x283f29,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x3d81ad['focus']();}),_0x3d81ad['actionBar']['add'](this['resolveButton'],0x0),_0x3d81ad['focusables']['add'](this['resolveButton'],0x0));}_createResolveButton(){const _0x4affa3=new _0x3ffd3f(this['locale']);return _0x4affa3['label']=Et(this['locale'],'Resolve'),_0x4affa3['tooltip']=Et(this['locale'],'Resolve'),_0x4affa3['icon']=_0x41dcb2,_0x4affa3['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x4affa3['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x379a95=>!_0x379a95),_0x4affa3['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x24143d,_0x4892b1)=>_0x24143d&&!_0x4892b1),_0x4affa3['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x4affa3;}_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(_0xa7dd19){super(_0xa7dd19),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x4c9bdc,_0x46b643,_0xb98467)=>{this['element']['innerHTML']=_0xb98467;}),this['element']['innerHTML']=this['content'];}},Kt=class extends ht{['visibleView'];ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];constructor(_0x4f5bc7,_0x1277e4,_0x1f649f){super(_0x4f5bc7),this['_model']=_0x1277e4,this['_config']=_0x1f649f,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x1277e4,'content',_0x1277e4,'authoredAt',(_0x5537ca,_0x3900c9)=>Et(_0x4f5bc7,'COMMENT_ARIA_LABEL',[_0x1277e4['author']['name'],_0x1f649f['formatDateTime'](_0x3900c9),new DOMParser()['parseFromString'](_0x5537ca,'text/html')['body']['textContent'],_0x1277e4['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x4b01e4(_0x4f5bc7,Et(_0x4f5bc7,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new at(),this['focusTracker']=new _0xf8949c(),this['keystrokes']=new _0x51855f(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3154cc=>_0x3154cc['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 _0x2a8f70=new Wt(this['locale']);return _0x2a8f70['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x2b3232,_0x425d72)=>_0x425d72?_0x2a51d3(_0x2b3232,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x2b3232),_0x2a8f70;}_createCommentInputView(){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x3c3dc1=new St(this['locale'],this['_config']['editorConfig']);return _0x3c3dc1['value']=this['_model']['content'],_0x3c3dc1['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x3c3dc1['submitLabel']=Et(this['locale'],'Save'),_0x3c3dc1['on']('submit',(_0x34bf49,_0x20e725)=>{this['fire']('updateComment',this['_model']['id'],_0x20e725),this['switchToDisplayMode'](),this['focus']();}),_0x3c3dc1['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x3c3dc1['once']('editorReady',()=>{_0x3c3dc1['focus']();}),_0x3c3dc1['createEditor'](),_0x3c3dc1['delegate']('editorReady')['to'](this),_0x3c3dc1['delegate']('editorDestroyed')['to'](this),_0x3c3dc1;}_setupKeyboardNavigation(){const _0x781d7d=this['element'];this['keystrokes']['listenTo'](_0x781d7d);for(const _0x22f9a6 of this['focusables'])this['focusTracker']['add'](_0x22f9a6['element']),this['keystrokes']['listenTo'](_0x22f9a6['element']);this['focusables']['on']('change',(_0x20914f,_0x2ce293)=>{for(const _0x4a407e of _0x2ce293['removed'])this['focusTracker']['remove'](_0x4a407e['element']),this['keystrokes']['stopListening'](_0x4a407e['element']);for(const _0x2b09b5 of _0x2ce293['added'])this['focusTracker']['add'](_0x2b09b5['element']),this['keystrokes']['listenTo'](_0x2b09b5['element']);}),this['keystrokes']['set']('enter',(_0x1c7c9e,_0x28d00c)=>{_0x781d7d===_0x1c7c9e['target']&&(this['focusCycler']['focusFirst'](),_0x28d00c());}),this['keystrokes']['set']('esc',(_0x138245,_0x37a67d)=>{_0x781d7d!==_0x138245['target']&&(this['focus'](),_0x37a67d());});}};const Gt=/* #__PURE__ -- @preserve */
28
- _0x5eeaee(Kt);var Yt=class extends Gt{actionBar;['userView'];constructor(_0x5148d0,_0x6e8751,_0x1ff57e){super(_0x5148d0,_0x6e8751,_0x1ff57e),this['set']('actionIndicator',null),this['set']('placeholder',Et(_0x5148d0,'Reply...')),this['bind']('authoredAt')['to'](_0x6e8751),this['bind']('resolvedAt')['to'](_0x6e8751),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 _0x49f9c9(_0x5148d0,_0x6e8751['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x6e8751,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}getTemplate(){const _0x2fb05d=this['bindTemplate'],_0x45a8d2=[{'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':_0x2fb05d['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x2fb05d['to']('authoredAt',_0x59fc53=>this['_config']['formatDateTime'](_0x59fc53))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x2fb05d['if']('isEditMode','ck-comment__actions--hidden'),_0x2fb05d['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']&&_0x45a8d2['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x2fb05d['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x2fb05d['if']('isEditMode','ck-comment--edit'),_0x2fb05d['if']('isSystemComment','ck-comment--info'),_0x2fb05d['to']('actionIndicator',_0x417f3d=>_0x417f3d?'ck-comment--'+_0x417f3d:'')],'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':_0x45a8d2}]}]};}_createEditButton(){const _0x1ac463=new _0x3d0035(this['locale']);return _0x1ac463['label']=Et(this['locale'],'Edit'),_0x1ac463['icon']=_0x57cf4c,_0x1ac463['withText']=!0x0,_0x1ac463['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x1ac463['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2d9cec=>!_0x2d9cec),_0x1ac463['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x1ac463['on']('execute',()=>this['switchToEditMode']()),_0x1ac463;}_createRemoveButton(){const _0x4789ee=new _0x3d0035(this['locale']);return _0x4789ee['label']=Et(this['locale'],'Remove'),_0x4789ee['icon']=_0x301365,_0x4789ee['withText']=!0x0,_0x4789ee['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x4789ee['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x16f7a1=>!_0x16f7a1),_0x4789ee['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x4789ee['on']('execute',()=>{this['showConfirm'](Et(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x4789ee;}_createDropdown(){const _0x327b59=ct(this['locale'],_0x43e1fb),_0x4700ed=_0x327b59['panelView']['children'],_0x1d130d=new ot(this['locale']),_0xd4e518=_0x327b59['bindTemplate'];dt(_0x327b59,()=>this['items']['find'](_0x541716=>_0x541716['isVisible'])),_0x327b59['extendTemplate']({'attributes':{'class':[_0xd4e518['if']('isVisible','ck-hidden',_0x59a69c=>!_0x59a69c)]}});const _0x17ba13=(_0x39d4c9,_0x4ea204=-0x1)=>{const _0x39253b=new nt(this['locale']);_0x39253b['children']['add'](_0x39d4c9);const _0x3abfba=_0x4ea204>-0x1?_0x4ea204:_0x1d130d['items']['length'];_0x1d130d['items']['add'](_0x39253b,_0x3abfba);const _0x5301e1=Array['from'](this['items']);_0x327b59['unbind']('isEnabled','isVisible'),_0x327b59['bind']('isEnabled')['toMany'](_0x5301e1,'isEnabled',(..._0x352e71)=>_0x352e71['some'](_0x454174=>_0x454174)),_0x327b59['bind']('isVisible')['toMany'](_0x5301e1,'isVisible',(..._0xf0dc4d)=>_0xf0dc4d['some'](_0x1083b0=>_0x1083b0));};_0x327b59['panelPosition']='sw',_0x327b59['buttonView']['set']({'label':Et(this['locale'],'Show\x20more\x20items'),'icon':_0x454f32});for(const _0x5b3bd2 of this['items'])_0x17ba13(_0x5b3bd2);return _0x4700ed['add'](_0x1d130d),_0x327b59['listenTo'](this['items'],'add',(_0x30f003,_0x5e8063,_0x22b2ea)=>{_0x17ba13(_0x5e8063,_0x22b2ea);}),_0x327b59['listenTo'](this['items'],'remove',(_0x3825ae,_0x155451,_0x4233cb)=>{_0x1d130d['items']['remove'](_0x4233cb);}),_0x327b59;}_attachActions(_0x21eaa9,_0x1b068a){const _0x3680f7=_0x21eaa9&&_0x21eaa9['element'];_0x3680f7&&(this['listenTo'](_0x3680f7,'mouseenter',()=>this['actionIndicator']=_0x1b068a),this['listenTo'](_0x3680f7,'focus',()=>this['actionIndicator']=_0x1b068a),this['listenTo'](_0x3680f7,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x3680f7,'blur',()=>this['actionIndicator']=null));}_createCommentInputView(){const _0x260034=super['_createCommentInputView']();return _0x260034['bind']('placeholder')['to'](this),_0x260034;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}};function Xt(_0x46db4c){const _0xc43ab3=_0x4b67e0(_0x46db4c,0x1e),_0x5d59a3=new MutationObserver(_0x5bf897=>{for(const _0x5f2303 of _0x5bf897)('attributes'==_0x5f2303['type']&&'class'==_0x5f2303['attributeName']||'childList'==_0x5f2303['type']||'characterData'==_0x5f2303['type'])&&_0xc43ab3();});return{'attach'(_0x326f01){_0x5d59a3['observe'](_0x326f01,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x5d59a3['disconnect'](),_0xc43ab3['cancel']();}};}var qt=class extends ht{['focusTracker'];['id'];keystrokes;content;['mainView'];_mutationObserver;constructor(_0x53bf4e,_0x5264cd){super(_0x53bf4e),this['id']=_0x4df11c(),this['focusTracker']=new _0xf8949c(),this['keystrokes']=new _0x51855f(),this['keystrokes']['set']('Esc',(_0x3bb62c,_0x116791)=>this['fire']('Esc',_0x116791)),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'](_0x5264cd),this['mainView']=_0x5264cd;const _0x4b8bdf=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x4b8bdf['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 _0x226e52=this['element']['clientHeight'];_0x226e52&&(this['height']=_0x226e52);}};const jt=/* #__PURE__ -- @preserve */
29
- _0x117cb5();var $t=class Annotation extends jt{['view'];focusableElements;_type;_target;constructor({view:_0x987405,target:_0x50cb41,type:_0x81e088,isVisible:_0x20b3e0=!0x0}){super(),this['view']=_0x987405,this['view']['element']||this['view']['render'](),this['_type']=_0x81e088,this['_target']=_0x50cb41,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0xf9e025([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x5cd59f,_0x333832)=>{this['view']['focusTracker']['add'](_0x333832);}),this['focusableElements']['on']('remove',(_0x3ca443,_0x1711cc)=>{this['view']['focusTracker']['remove'](_0x1711cc);}),this['set']('isVisible',_0x20b3e0);}get type(){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get target(){const _0xdc8624=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0xdc8624),_0xdc8624;}get targetRect(){const _0x4de63e=this['target'];if(null===_0x4de63e)return null;if(_0x4de63e instanceof _0x275a65)return _0x4de63e;const _0x3bfd3e=_0x4de63e['filter'](_0x573933=>function(_0x2b761c){return!!_0x2b761c['offsetParent']||!!_0x2b761c['getClientRects']()['item'](0x0);}(_0x573933));return 0x0===_0x3bfd3e['length']?null:_0x275a65['getDomElementRects'](_0x3bfd3e[0x0])[0x0];}get isActive(){return this['view']['isActive'];}set isActive(_0x1f9014){this['view']['isActive']=_0x1f9014,this['view']['mainView']['isActive']=_0x1f9014;}updateTargetRect(){this['view']['targetRect']=this['targetRect'];}destroy(){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}refreshVisibility(){this['isVisible']=!!this['targetRect'];}static _assertCorrectTarget(_0x321054){if(!(null===_0x321054||_0x321054 instanceof _0x275a65||Array['isArray'](_0x321054)&&_0x321054['every'](_0x1cf032=>zt(_0x1cf032))))throw new _0x5d272e('annotation-invalid-target',null,{'target':_0x321054});}_getNormalizedTarget(){const _0x4b9f0e='function'==typeof this['_target']?this['_target']():this['_target'];return zt(_0x4b9f0e)?[_0x4b9f0e]:_0x4b9f0e;}};function zt(_0x7699d5){return null!==_0x7699d5&&'object'==typeof _0x7699d5&&'nodeType'in _0x7699d5&&0x1===_0x7699d5['nodeType'];}var Jt=class extends _0xf9e025{_innerViewToAnnotation;_viewToAnnotation;['_focusTracker'];constructor(_0x2697bb=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0xf8949c(),this['_focusTracker']['on']('change:isFocused',(_0x464954,_0xb6e4bf,_0x6f8329)=>{_0x6f8329||this['fire']('blur');});for(const _0x1986e8 of _0x2697bb)this['add'](_0x1986e8);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x176b95){if(this['has'](_0x176b95))throw new _0x5d272e('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x176b95['innerView'],_0x176b95),this['_viewToAnnotation']['set'](_0x176b95['view'],_0x176b95);for(const _0x15497f of _0x176b95['focusableElements'])this['_focusTracker']['add'](_0x15497f);if(this['listenTo'](_0x176b95['focusableElements'],'add',(_0x2f867e,_0x3a1a1c)=>{this['_focusTracker']['add'](_0x3a1a1c);}),this['listenTo'](_0x176b95['focusableElements'],'remove',(_0x2c7539,_0x4e68de)=>{this['_focusTracker']['remove'](_0x4e68de);}),this['listenTo'](_0x176b95['view']['focusTracker'],'change:isFocused',(_0x55a672,_0x59fcd2,_0x338dc3)=>{_0x338dc3&&this['fire']('focus',_0x176b95);}),_0x176b95['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x52f7f4 of this)_0x52f7f4['updateTargetRect']();}const _0x3052a4=this['_getOrderInContent'](_0x176b95['view']['targetRect']);return super['add'](_0x176b95,_0x3052a4);}['remove'](_0x5e5fff){if(!this['has'](_0x5e5fff))throw new _0x5d272e('annotationcollection-not-existing-item',null);this['stopListening'](_0x5e5fff['view']['focusTracker']),this['stopListening'](_0x5e5fff['focusableElements']);for(const _0x5e5c17 of _0x5e5fff['focusableElements'])this['_focusTracker']['remove'](_0x5e5c17);return this['_viewToAnnotation']['delete'](_0x5e5fff['view']),this['_innerViewToAnnotation']['delete'](_0x5e5fff['innerView']),super['remove'](_0x5e5fff);}getByInnerView(_0x595c00){return this['_innerViewToAnnotation']['get'](_0x595c00);}getByView(_0x32218e){return this['_viewToAnnotation']['get'](_0x32218e);}destroy(){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}refreshPositioning(){for(const _0x544da9 of this)_0x544da9['updateTargetRect']();this['_sort']();}_sort(){const _0x2dbb7c=Array['from'](this)['sort']((_0x552f56,_0x271cfa)=>Zt(_0x552f56['view']['targetRect'],_0x271cfa['view']['targetRect']));for(let _0x2b9538=_0x2dbb7c['length']-0x1;_0x2b9538>0x0;_0x2b9538--){const _0x3fde23=_0x2dbb7c[_0x2b9538];_0x2b9538!==this['getIndex'](_0x3fde23)&&(this['remove'](_0x3fde23),this['add'](_0x3fde23));}}_getOrderInContent(_0x524db4){let _0x1c829c=0x0;if(!_0x524db4)return this['length'];for(const _0x1a8077 of this){const _0x6b9ad9=_0x1a8077['view']['targetRect'];if(_0x6b9ad9){if(Zt(_0x524db4,_0x6b9ad9)<0x0)return _0x1c829c;_0x1c829c++;}}return _0x1c829c;}_areCachedRectsStale(){const _0x332749=this['get'](0x0);if(!_0x332749)return!0x1;const _0x11e0c4=_0x332749['view']['targetRect'],_0x270240=_0x332749['targetRect'];return!(!_0x11e0c4||!_0x270240)&&(_0x11e0c4['top']!==_0x270240['top']||_0x11e0c4['left']!==_0x270240['left']);}};function Qt({source:_0x78088c,target:_0x3de3fb,filter:_0xd2d8c0}){for(const _0x3d9818 of _0x78088c)_0xd2d8c0(_0x3d9818)&&_0x3de3fb['add'](_0x3d9818);_0x3de3fb['listenTo'](_0x78088c,'add',(_0x110f56,_0x4af28a)=>{_0xd2d8c0(_0x4af28a)&&_0x3de3fb['add'](_0x4af28a);}),_0x3de3fb['listenTo'](_0x78088c,'remove',(_0x535492,_0x1c99af)=>{_0x3de3fb['has'](_0x1c99af)&&_0x3de3fb['remove'](_0x1c99af);});}function Zt(_0x47dc55,_0x20dc59){if(null===_0x47dc55&&null===_0x20dc59)return 0x0;if(null===_0x47dc55)return-0x1;if(null===_0x20dc59)return 0x1;const _0x52ba49=_0x47dc55['top']-_0x20dc59['top'];return 0x0==_0x52ba49?_0x47dc55['left']-_0x20dc59['left']:_0x52ba49;}var ti=class extends _0xdeb873{collection;_visibleAnnotations;static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x59a5f2){if(super(_0x59a5f2),this['collection']=new Jt(),this['_visibleAnnotations']=new Jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x59a5f2 instanceof _0x1ecf96){const _0xef4e3f=_0x59a5f2['locale'];_0x59a5f2['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':Et(_0xef4e3f,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':Et(_0xef4e3f,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':Et(_0xef4e3f,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':Et(_0xef4e3f,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':Et(_0xef4e3f,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':Et(_0xef4e3f,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':Et(_0xef4e3f,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x118357){this['collection']['add'](_0x118357);}['remove'](_0x1dd0b6){this['collection']['remove'](_0x1dd0b6),_0x1dd0b6['destroy']();}refreshVisibility(){for(const _0x39c488 of this['collection'])_0x39c488['refreshVisibility']();}refreshPositioning(){this['_visibleAnnotations']['refreshPositioning']();}getByInnerView(_0x475379){return this['collection']['getByInnerView'](_0x475379);}deactivateAll(){this['fire']('_deactivateAllAnnotations');}destroy(){for(const _0x185349 of this['collection'])_0x185349['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}activate(_0x54ed3d){this['fire']('_activateAnnotation',_0x54ed3d);}createAnnotation(_0x56e8d5){return new $t(_0x56e8d5);}createAnnotationView(_0x196bd6,_0x505b3a){return new qt(_0x196bd6,_0x505b3a);}_addActiveAnnotation(_0x1deb45){const _0x53aab9=new Set(this['activeAnnotations']);_0x53aab9['add'](_0x1deb45),this['activeAnnotations']=_0x53aab9;}_removeActiveAnnotation(_0x3bb6c5){const _0x92f17d=new Set(this['activeAnnotations']);_0x92f17d['delete'](_0x3bb6c5),this['activeAnnotations']=_0x92f17d;}_bindAnnotationsToVisibleAnnotations(){const _0x57668a=this['collection'],_0x3d292b=this['_visibleAnnotations'];function _0x113eb7(_0x341b7e){const _0x44a09c=_0x341b7e['source'];_0x44a09c['isVisible']&&!_0x3d292b['has'](_0x44a09c)?_0x3d292b['add'](_0x44a09c):!_0x44a09c['isVisible']&&_0x3d292b['has'](_0x44a09c)&&_0x3d292b['remove'](_0x44a09c),_0x44a09c['view']['focusTracker']['remove'](_0x44a09c['view']['element']),_0x44a09c['view']['focusTracker']['add'](_0x44a09c['view']['element']);}this['listenTo'](_0x57668a,'add',(_0x5dce3d,_0x23d920)=>{_0x23d920['isVisible']&&_0x3d292b['add'](_0x23d920),this['listenTo'](_0x23d920,'change:isVisible',_0x113eb7);}),this['listenTo'](_0x57668a,'remove',(_0x42d713,_0x1e5445)=>{_0x3d292b['has'](_0x1e5445)&&_0x3d292b['remove'](_0x1e5445),this['stopListening'](_0x1e5445,'change:isVisible',_0x113eb7);});}_setupEnterAnnotationKeystroke(){const _0x395e27=_0x5e6cce=>{_0x5e6cce['on']('ready',()=>{_0x5e6cce['keystrokes']['set'](_0x41d991,(_0x3fa27d,_0x2c3dce)=>{const _0x36da03=_0x1d009b(this['activeAnnotations']['values']());_0x36da03&&(_0x36da03['view']['focus'](),_0x2c3dce());});});};this['context']instanceof _0x1ecf96?_0x395e27(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x2b0161,_0x5b0e61)=>{_0x395e27(_0x5b0e61);});}_setupEscapeAnnotationHandling(){const _0x4923c8=_0x2f6158=>{const _0x54260d=_0x2f6158['source'],_0x1733c4=[];let _0x5c7cf9;if(Array['isArray'](_0x54260d['target'])){_0x5c7cf9=_0x54260d['target'][0x0],this['context']instanceof _0x1ecf96?_0x1733c4['push'](this['context']):this['context']['editors']&&_0x1733c4['push'](...this['context']['editors']);for(const _0x12bd28 of _0x1733c4)for(const _0x4d5936 of _0x12bd28['editing']['view']['domRoots']['values']())if(_0x4d5936['contains'](_0x5c7cf9))return void _0x12bd28['editing']['view']['focus']();_0x5c7cf9['focus']();}};this['listenTo'](this['collection'],'add',(_0x2ea9bc,_0x38da38)=>{this['listenTo'](_0x38da38,'escape',_0x4923c8,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x3c8e55,_0x5a1f74)=>{this['stopListening'](_0x5a1f74,'escape',_0x4923c8);});}};const ii=Symbol('noChannel'),ei={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},si=/* #__PURE__ -- @preserve */
30
- _0x117cb5(),ni=/* #__PURE__ -- @preserve */
31
- _0x117cb5();var oi=class extends _0xdeb873{_threads;_threadToController;_viewToController;static get requires(){return[ti,_0x17ea24,_0x4c3234];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4c7156){super(_0x4c7156),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x2936a2=this['context']['config'];_0x2936a2['define']('comments.maxCommentsWhenCollapsed',0x2),_0x2936a2['define']('comments.maxThreadTotalWeight',0x1f4),_0x2936a2['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x2936a2['define']('comments.CommentThreadView',Ut),_0x2936a2['define']('comments.CommentView',Yt),_0x2936a2['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}init(){const _0x457fbc=this['context']['plugins']['get'](ti);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x72622d,_0x3e7b43)=>this['_addCommentThread'](_0x3e7b43)),this['on']('submitCommentThread',(_0x41ba76,_0x3b935f)=>this['_submitCommentThread'](_0x3b935f)),this['on']('resolveCommentThread',(_0x109617,_0x78e237)=>this['_resolveCommentThread'](_0x78e237)),this['on']('resolveCommentThread',(_0x4839af,_0x4b6dec)=>this['_updateActiveAnnotation'](_0x4b6dec),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x2d9648,_0x46b9e8)=>this['_reopenCommentThread'](_0x46b9e8)),this['on']('reopenCommentThread',(_0x10e330,_0x45e614)=>this['_updateActiveAnnotation'](_0x45e614),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x17cca8,_0x13bade)=>this['_removeCommentThread'](_0x13bade)),this['on']('updateCommentThread',(_0x3b367d,_0x44b3a8)=>this['_updateCommentThread'](_0x44b3a8)),this['on']('updateCommentThread',(_0x219d63,_0x235514)=>this['_updateActiveAnnotation'](_0x235514),{'priority':'lowest'}),this['on']('addComment',(_0x352f2d,_0x14b504)=>this['_addComment'](_0x14b504)),this['on']('updateComment',(_0xe85f09,_0x14fdf2)=>this['_updateComment'](_0x14fdf2)),this['on']('removeComment',(_0x5415ee,_0x3f50f5)=>this['_removeComment'](_0x3f50f5)),this['on']('addComment',(_0x17045b,{threadId:_0x5d69f1,isFromAdapter:_0xebf93d})=>{if(_0xebf93d)return;const _0x339025=this['getCommentThread'](_0x5d69f1),_0x21af7d=_0x339025&&this['_threadToController']['get'](_0x339025);_0x21af7d&&_0x21af7d['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x457fbc,'change:activeAnnotations',(_0x351b84,_0x5bc27a,_0x4e9947)=>{const _0x368939=Array['from'](_0x4e9947)['map'](_0x5c0029=>this['_viewToController']['get'](_0x5c0029['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x368939?_0x368939['model']:null;});}set adapter(_0x4a3d25){if(this['_adapter'])throw new _0x5d272e('commentsrepository-adapter-already-set');this['_adapter']=_0x4a3d25;}get adapter(){return this['_adapter'];}addCommentThread({channelId:_0x5db334=ii,threadId:_0x2b02e4=_0x4df11c(),comments:_0x40c810=[],unlinkedAt:_0x4f1324=null,resolvedAt:_0x5967aa=null,resolvedBy:_0x281053=null,target:_0x8c74c7=null,context:_0x28faa1=null,attributes:_0x5a224b={},isResolvable:_0x29e3a2=!0x0,isSubmitted:_0xd38422=!0x1,isFromAdapter:_0x244a48=!0x1}={}){return this['fire'](ai('addCommentThread',_0x5db334),{'channelId':_0x5db334,'threadId':_0x2b02e4,'comments':_0x40c810,'unlinkedAt':_0x4f1324,'resolvedAt':_0x5967aa,'resolvedBy':_0x281053,'target':_0x8c74c7,'context':_0x28faa1,'attributes':_0x5a224b,'isFromAdapter':_0x244a48,'isResolvable':_0x29e3a2,'isSubmitted':_0xd38422}),this['getCommentThread'](_0x2b02e4);}openNewCommentThread({channelId:_0x5f3acd=ii,threadId:_0x1c290c=_0x4df11c(),target:_0x2b5352,context:_0x444487=null,isResolvable:_0x330911=!0x0}){if(this['_readOnlyChannels']['has'](_0x5f3acd)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x2b5352)throw new _0x5d272e('commentsrepository-missing-target');const _0x551e90=this['addCommentThread']({'channelId':_0x5f3acd,'threadId':_0x1c290c,'target':_0x2b5352,'context':_0x444487,'isResolvable':_0x330911});if(!_0x551e90)return null;const _0x510553=this['_threadToController']['get'](_0x551e90),_0x432604=_0x510553['view']['commentThreadInputView']['commentInputView'],_0x5cb525=this['context']['plugins']['get'](ti),_0x3ae73e=_0x5cb525['getByInnerView'](_0x510553['view']);return _0x5cb525['activate'](_0x3ae73e),_0x432604['once']('editorReady',()=>_0x432604['focus']()),_0x551e90;}hasCommentThread(_0x4b7b14){if('string'!=typeof _0x4b7b14)throw new _0x5d272e('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x4b7b14);}updateCommentThread({channelId:_0x365382=ii,threadId:_0x558fd5,context:_0x5c13c7,unlinkedAt:_0x4fcdc6,attributes:_0x3f41a9,isFromAdapter:_0x22b0f1=!0x1}){return this['fire'](ai('updateCommentThread',_0x365382),{'channelId':_0x365382,'threadId':_0x558fd5,'context':_0x5c13c7,'unlinkedAt':_0x4fcdc6,'attributes':_0x3f41a9,'isFromAdapter':_0x22b0f1}),this['getCommentThread'](_0x558fd5);}getCommentThread(_0x4bed0b){if('string'!=typeof _0x4bed0b)throw new _0x5d272e('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x4bed0b);}fetchCommentThread({channelId:_0x14d088,threadId:_0x41171d}={}){const _0x33e3ce=this['getCommentThread'](_0x41171d);if(_0x33e3ce)return Promise['resolve'](_0x33e3ce);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x5d272e('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x14d088,'threadId':_0x41171d})['then'](_0x5740ea=>this['hasCommentThread'](_0x41171d)?this['getCommentThread'](_0x41171d):_0x5740ea?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x14d088},_0x5740ea)):void 0x0)['catch'](_0x23aec1=>{throw console['error'](_0x23aec1),new _0x5d272e('commentsrepository-fetch-comment-thread',this['context']);});}getCommentThreads({channelId:_0x2e79dc,skipNotAttached:_0xf3cd90=!0x1,skipEmpty:_0x2c9b50=!0x1,toJSON:_0x98b7e1=!0x1}={}){const _0x56a456=[];for(const _0x9e209 of this['_threads']['values']())_0x2e79dc&&_0x9e209['channelId']!==_0x2e79dc||_0xf3cd90&&!_0x9e209['isAttached']||_0x2c9b50&&0x0===_0x9e209['length']||_0x56a456['push'](_0x9e209);return _0x98b7e1?_0x56a456['map'](_0x536591=>_0x536591['toJSON']()):_0x56a456;}getAnnotationForCommentThread(_0x47ce84){const _0x19893f=this['_threadToController']['get'](_0x47ce84);return _0x19893f&&this['context']['plugins']['get'](ti)['getByInnerView'](_0x19893f['view'])||null;}getCommentThreadForAnnotation(_0x35cd89){const _0x307e7d=this['_viewToController']['get'](_0x35cd89['innerView']);return _0x307e7d?_0x307e7d['model']:null;}setActiveCommentThread(_0x2af7bd){const _0x28f776=this['context']['plugins']['get'](ti);if(!_0x2af7bd)return void(this['activeCommentThread']&&_0x28f776['deactivateAll']());const _0x36c0fd=this['getCommentThread'](_0x2af7bd);if(!_0x36c0fd)throw new _0x5d272e('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x2af7bd});if(!this['_threadToController']['has'](_0x36c0fd))throw new _0x5d272e('commentsrepository-active-not-attached',null,{'threadId':_0x2af7bd});const _0x52a21f=_0x28f776['getByInnerView'](this['_threadToController']['get'](_0x36c0fd)['view']);_0x28f776['activate'](_0x52a21f);}switchReadOnly(_0x3c5f39,_0x4481a3){_0x3c5f39?this['_readOnlyChannels']['add'](_0x4481a3):this['_readOnlyChannels']['delete'](_0x4481a3),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x5eeb46){return this['_readOnlyChannels']['has'](_0x5eeb46)||this['_readOnlyChannels']['has'](void 0x0);}createCommentThreadController(_0x4b780a,_0x215944){return new bt(_0x4b780a,_0x215944);}setPermissions(_0x3b658f,_0x1be20f=ii){this['_permissions']['set'](_0x1be20f,_0x3b658f),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}getPermissions(_0x7cae43=ii){return this['_permissions']['has'](_0x7cae43)?this['_permissions']['get'](_0x7cae43):ei;}_addCommentThread({channelId:_0x59ffd2,threadId:_0x7831ed,comments:_0x3514fb,unlinkedAt:_0xcda22,resolvedAt:_0x3d6849,resolvedBy:_0x17909a,target:_0x2d3cb9,context:_0x21e2aa,attributes:_0x2d4455,isFromAdapter:_0x120fe9,isResolvable:_0x5ea03f,isSubmitted:_0x14e5f8}){if('string'!=typeof _0x7831ed)throw new _0x5d272e('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x7831ed});if(this['hasCommentThread'](_0x7831ed))throw new _0x5d272e('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x7831ed});const _0x5bb413=new ri(this,{'channelId':_0x59ffd2,'id':_0x7831ed,'context':_0x21e2aa,'attributes':_0x2d4455,'unlinkedAt':_0xcda22,'resolvedAt':_0x3d6849,'resolvedBy':_0x17909a?this['context']['plugins']['get'](_0x4c3234)['getUser'](_0x17909a):null,'isResolvable':_0x5ea03f,'isSubmitted':_0x14e5f8||_0x120fe9});this['_threads']['set'](_0x7831ed,_0x5bb413);for(const _0x374c7e of _0x3514fb)_0x5bb413['_add'](this['_createNewComment']({'threadId':_0x7831ed,..._0x374c7e}));return _0x2d3cb9&&_0x5bb413['attachTo'](_0x2d3cb9),_0x120fe9||!_0x5bb413['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x59ffd2,'threadId':_0x7831ed});}_submitCommentThread({channelId:_0xdb50fd,threadId:_0x4c3acf}){if(!this['hasCommentThread'](_0x4c3acf))throw new _0x5d272e('commentsrepository-missing-comment-thread',this);const _0x43618b=this['getCommentThread'](_0x4c3acf);if(_0x43618b['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x45aefa,comments:_0x59030a,resolvedAt:_0x57ba0e,resolvedBy:_0x1a58fb,context:_0x56b1bb,attributes:_0x2202d4}=_0x43618b,_0x55efdf=this['context']['plugins']['get']('PendingActions'),_0x298627=_0x55efdf['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0xdb50fd,'threadId':_0x45aefa,'comments':_0x59030a['map'](_0x2b6d80=>_0x2b6d80['toJSON']()),'resolvedAt':_0x57ba0e,'resolvedBy':_0x1a58fb?_0x1a58fb['id']:_0x1a58fb,'context':_0x56b1bb,'attributes':_0x2202d4})['then'](({comments:_0x44e42f})=>{_0x55efdf['remove'](_0x298627);for(const _0x4f8631 of _0x44e42f)this['_updateComment']({'channelId':_0xdb50fd,'threadId':_0x4c3acf,'commentId':_0x4f8631['commentId'],'createdAt':_0x4f8631['createdAt'],'isFromAdapter':!0x0});})['catch'](_0xac58c4=>{throw console['error'](_0xac58c4),new _0x5d272e('commentsrepository-add-comment-thread-internal-error',this);});}_attachCommentThread({threadId:_0x89eb84,target:_0x12a500}){const _0x2133d5=this['getCommentThread'](_0x89eb84);if(!_0x2133d5)throw new _0x5d272e('commentsrepository-attach-missing-comment-thread',this);const _0x5c00ac=this['context']['plugins']['get']('PendingActions'),_0x465871=this['context']['plugins']['get'](ti),_0x487b36=this['_createCommentThreadView'](_0x2133d5),_0x2c906e=new bt(_0x2133d5,_0x487b36);let _0x251a0e=null;_0x487b36['on']('change:isDirty',(_0x143a0a,_0x12f089,_0x14317c)=>{_0x14317c?_0x251a0e=_0x5c00ac['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x251a0e&&(_0x5c00ac['remove'](_0x251a0e),_0x251a0e=null);}),this['_threadToController']['set'](_0x2133d5,_0x2c906e),this['_viewToController']['set'](_0x487b36,_0x2c906e);const _0x278d40=new qt(this['context']['locale'],_0x487b36);_0x278d40['bind']('length')['to'](_0x487b36),_0x278d40['bind']('isDirty')['to'](_0x487b36,'isDirty',_0x487b36,'length',(_0x14eb06,_0x22ea02)=>_0x14eb06||!_0x22ea02),_0x278d40['bind']('isActive')['to'](_0x487b36),_0x278d40['type']='comment';const _0x4e831c=new $t({'view':_0x278d40,'target':_0x12a500,'type':'comment','isVisible':!_0x2133d5['archivedAt']&&!!('function'==typeof _0x12a500?_0x12a500():_0x12a500)});return _0x487b36['on']('escape',()=>{_0x4e831c['fire']('escape');}),this['_bindAnnotationToEditors'](_0x487b36,_0x4e831c),_0x465871['add'](_0x4e831c),_0x4e831c;}_bindAnnotationToEditors(_0x11cb85,_0x4fdeeb){this['listenTo'](_0x11cb85,'editorReady',(_0x50354e,_0x540e17)=>{const _0x51dd8c=_0x540e17['ui']['view']['body']['bodyCollectionContainer'];_0x4fdeeb['focusableElements']['add'](_0x51dd8c),this['context']instanceof _0x1ecf96&&this['context']['ui']['focusTracker']['add'](_0x51dd8c);},{'priority':'highest'}),this['listenTo'](_0x11cb85,'editorDestroyed',(_0x1333e1,_0x431692)=>{const _0x132e1c=_0x431692['ui']['view']['body']['bodyCollectionContainer'];_0x4fdeeb['focusableElements']['has'](_0x132e1c)&&_0x4fdeeb['focusableElements']['remove'](_0x132e1c),this['context']instanceof _0x1ecf96&&this['context']['ui']['focusTracker']['remove'](_0x132e1c);});}_unbindEditors(_0x28ebca){this['stopListening'](_0x28ebca,'editorReady'),this['stopListening'](_0x28ebca,'editorDestroyed');}_createCommentThreadView(_0x5825c2){const _0x308e77=this['context']['plugins']['get'](_0x4c3234),{config:_0x426012,locale:_0x5b9507}=this['context'],_0x1f1583=_0x46d710(_0x426012['get']('locale'),_0x5b9507);return new(0x0,(_0x426012['get']('comments'))['CommentThreadView'])(_0x5b9507,_0x5825c2,_0x308e77['me'],{'editorConfig':{..._0x426012['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x426012['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x426012['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x426012['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x426012['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x1f1583,'CommentView':_0x426012['get']('comments')['CommentView']});}_resolveCommentThread({threadId:_0x486054,channelId:_0x23455f,resolvedAt:_0x3eb118,resolvedBy:_0x2c339a,isFromAdapter:_0x2c6162}){if(!this['hasCommentThread'](_0x486054))throw new _0x5d272e('commentsrepository-missing-comment-thread',null,{'threadId':_0x486054});const _0x384631=this['getCommentThread'](_0x486054);if(_0x384631['isResolved'])throw new _0x5d272e('commentsrepository-resolved-comment-thread',null,{'threadId':_0x486054});const _0x679bd6=this['context']['plugins']['get'](_0x4c3234);if(_0x384631['resolvedBy']=_0x679bd6['getUser'](_0x2c339a),_0x384631['resolvedAt']=_0x3eb118,_0x2c6162||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x1b26fe=this['context']['plugins']['get']('PendingActions'),_0x12c46c=_0x1b26fe['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x23455f,'threadId':_0x486054})['then'](({resolvedAt:_0x16e7c4,resolvedBy:_0x2d72ef})=>{_0x1b26fe['remove'](_0x12c46c),_0x384631['resolvedBy']['id']!==_0x2d72ef&&(_0x384631['resolvedBy']=_0x679bd6['getUser'](_0x2d72ef)),_0x384631['resolvedAt']=_0x16e7c4;})['catch'](_0xabd042=>{throw console['error'](_0xabd042),new _0x5d272e('commentsrepository-resolve-comment-thread-internal-error',this);});}_reopenCommentThread({threadId:_0x5c0751,channelId:_0x4ff89f,isFromAdapter:_0x1bc207}){if(!this['hasCommentThread'](_0x5c0751))throw new _0x5d272e('commentsrepository-missing-comment-thread',null,{'threadId':_0x5c0751});const _0x33c990=this['getCommentThread'](_0x5c0751);if(!_0x33c990['isResolved'])throw new _0x5d272e('commentsrepository-reopen-comment-thread',null,{'threadId':_0x5c0751});if(_0x33c990['resolvedBy']=null,_0x33c990['resolvedAt']=null,_0x1bc207||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x5924d8=this['context']['plugins']['get']('PendingActions'),_0x3c93ee=_0x5924d8['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x4ff89f,'threadId':_0x5c0751})['then'](()=>_0x5924d8['remove'](_0x3c93ee))['catch'](_0x5466b4=>{throw console['error'](_0x5466b4),new _0x5d272e('commentsrepository-reopen-comment-thread-internal-error',this);});}_removeCommentThread({threadId:_0x38d5cc,isFromAdapter:_0x1526af}){const _0x57c700=this['getCommentThread'](_0x38d5cc);if(!_0x57c700)throw new _0x5d272e('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x38d5cc),this['_threads']['delete'](_0x38d5cc),!_0x57c700['isSubmitted']||_0x1526af||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0xfd1d0b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5c5228}=_0x57c700,_0xd39d1a=_0xfd1d0b['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x5c5228,'threadId':_0x38d5cc})['then'](()=>_0xfd1d0b['remove'](_0xd39d1a))['catch'](_0x248196=>{throw console['error'](_0x248196),new _0x5d272e('commentsrepository-remove-comment-thread-internal-error',this);});}_updateCommentThread({threadId:_0x1a4cc3,unlinkedAt:_0x454bd7,context:_0x257f4e,attributes:_0x55e328,isFromAdapter:_0x1fa568}){if('string'!=typeof _0x1a4cc3)throw new _0x5d272e('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x1a4cc3});if(!this['hasCommentThread'](_0x1a4cc3))throw new _0x5d272e('commentsrepository-missing-comment-thread',null,{'threadId':_0x1a4cc3});const _0x2b3520=this['getCommentThread'](_0x1a4cc3);let _0xa55a0f=!0x1;if(void 0x0!==_0x257f4e&&_0x2b3520['context']!==_0x257f4e&&(_0x2b3520['context']=_0x257f4e,_0xa55a0f=!0x0),void 0x0!==_0x454bd7&&_0x2b3520['unlinkedAt']!==_0x454bd7&&(_0x2b3520['unlinkedAt']=_0x454bd7,_0xa55a0f=!0x0),_0x55e328&&!_0x28ef43(_0x55e328,_0x2b3520['attributes'])&&(_0x2b3520['attributes']=_0x55e328,_0xa55a0f=!0x0),!_0xa55a0f)return Promise['resolve']();if(!_0x2b3520['isSubmitted']||_0x1fa568||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x368491=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2d844e}=_0x2b3520,_0x5d71e8=_0x368491['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x2d844e,'threadId':_0x1a4cc3,'context':_0x257f4e,'unlinkedAt':_0x454bd7,'attributes':_0x55e328})['then'](()=>_0x368491['remove'](_0x5d71e8))['catch'](_0xfca7f9=>{throw console['error'](_0xfca7f9),new _0x5d272e('commentsrepository-update-comment-thread-internal-error',this);});}_detachCommentThread(_0x4f99a5){const _0x2ace71=this['context']['plugins']['get'](ti),_0x21ea53=this['getCommentThread'](_0x4f99a5);if(_0x21ea53['_isAttached']=!0x1,this['_threadToController']['has'](_0x21ea53)){const _0x1ee5e7=this['_threadToController']['get'](_0x21ea53),_0x547d44=_0x1ee5e7['view'],_0x588168=_0x2ace71['getByInnerView'](_0x547d44);this['_threadToController']['delete'](_0x21ea53),this['_viewToController']['delete'](_0x547d44),_0x588168&&_0x2ace71['remove'](_0x588168),_0x1ee5e7['destroy'](),_0x547d44['destroy']()['then'](()=>{this['_unbindEditors'](_0x547d44);});}}_updateActiveAnnotation({threadId:_0x39305a,resolvedAt:_0x28dc99,unlinkedAt:_0x1c716d}){const _0x1c1951=!!_0x28dc99,_0x5956f8=this['context']['plugins']['get'](ti),_0x21aab0=this['getCommentThread'](_0x39305a);if(this['_threadToController']['has'](_0x21aab0)){const _0x179b3d=this['_threadToController']['get'](_0x21aab0)['view'],_0x9d3527=_0x5956f8['getByInnerView'](_0x179b3d);_0x9d3527&&(_0x1c1951&&_0x5956f8['_removeActiveAnnotation'](_0x9d3527),_0x1c716d?_0x9d3527['isVisible']=!0x1:_0x9d3527['refreshVisibility']());}}_getExternalAuthor(_0x42a384){const _0x3c4ac3=this['context']['plugins']['get'](_0x4c3234),_0xad9ce1=_0x3cf180('external:'+_0x42a384),_0x17dec4=_0x3c4ac3['getUser'](_0xad9ce1);return _0x17dec4||_0x3c4ac3['addUser']({'id':_0xad9ce1,'name':_0x42a384});}_createNewComment({threadId:_0x104e60,commentId:_0x5f285e=_0x4df11c(),content:_0x314bba,authorId:_0x411a43,createdAt:_0x2fe41f,attributes:_0x261fba}){if('string'!=typeof _0x5f285e)throw new _0x5d272e('commentsrepository-invalid-commentid');if('string'!=typeof _0x411a43)throw new _0x5d272e('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x314bba||!_0x314bba['trim']())throw new _0x5d272e('commentsrepository-invalid-comment-content');const _0x458337=this['context']['plugins']['get'](_0x4c3234)['getUser'](_0x411a43);if(!_0x458337)throw new _0x5d272e('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x411a43});let _0x3a42fc=null,_0x3a3c1a=_0x2fe41f;return _0x261fba?.['@external']&&(_0x3a42fc=this['_getExternalAuthor'](_0x261fba['@external']['authorName']),_0x3a3c1a=new Date(_0x261fba['@external']['createdAt'])),new hi(this,{'threadId':_0x104e60,'id':_0x5f285e,'author':_0x3a42fc||_0x458337,'creator':_0x458337,'content':_0x314bba,'createdAt':_0x2fe41f,'authoredAt':_0x3a3c1a,'attributes':_0x261fba});}_addComment(_0xb2b9bc){let {threadId:_0x5a37dc,content:_0x2566a7,attributes:_0x2c6501,isFromAdapter:_0x4155be}=_0xb2b9bc;const _0x56e784=this['getCommentThread'](_0xb2b9bc['threadId']);if(!_0x56e784)throw new _0x5d272e('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x4fd3bb=this['_createNewComment'](_0xb2b9bc),{id:_0x36c0e4}=_0x4fd3bb;if(_0x56e784['_add'](_0x4fd3bb),_0x4155be||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x56e784['isSubmitted'])return Promise['resolve']();const _0x374493=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3e0e49}=_0x56e784,_0x4c6aba=_0x374493['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x2c6501||(_0x2c6501={}),this['adapter']['addComment']({'channelId':_0x3e0e49,'threadId':_0x5a37dc,'commentId':_0x36c0e4,'content':_0x2566a7,'attributes':_0x2c6501})['then'](_0x33debc=>{_0x374493['remove'](_0x4c6aba),_0x33debc&&this['_updateComment']({'channelId':_0x3e0e49,'threadId':_0x5a37dc,'commentId':_0x36c0e4,'createdAt':_0x33debc['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x142bd2=>{throw console['error'](_0x142bd2),new _0x5d272e('commentsrepository-add-comment-internal-error',this);});}_updateComment({threadId:_0x570b25,commentId:_0x11350c,content:_0x26b07b,createdAt:_0x6fc2ca,attributes:_0x5878d7,isFromAdapter:_0x1c9e4e}){if(void 0x0!==_0x26b07b&&('string'!=typeof _0x26b07b||!_0x26b07b['trim']()['length']))throw new _0x5d272e('commentsrepository-update-comment-invalid-content');const _0x4da660=this['getCommentThread'](_0x570b25),_0x189e52=_0x4da660['getComment'](_0x11350c);if(!_0x189e52)throw new _0x5d272e('commentsrepository-update-missing-comment',this);let _0x2adee5=!0x1;if(_0x26b07b&&_0x26b07b!==_0x189e52['content']&&(_0x189e52['isEditable']||_0x1c9e4e)&&(_0x189e52['content']=_0x26b07b,_0x2adee5=!0x0),_0x6fc2ca&&_0x6fc2ca!==_0x189e52['createdAt']&&(_0x189e52['createdAt']=_0x6fc2ca,_0x189e52['isExternal']||(_0x189e52['authoredAt']=_0x6fc2ca),_0x2adee5=!0x0),_0x5878d7&&!_0x28ef43(_0x5878d7,_0x189e52['attributes'])&&(_0x189e52['attributes']=_0x5878d7,_0x2adee5=!0x0),!_0x2adee5)return Promise['resolve']();if(_0x4da660['fire']('commentUpdated'),_0x1c9e4e||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x31a527=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5f3399}=this['getCommentThread'](_0x189e52['threadId']),_0x3922b2=_0x31a527['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x5f3399,'threadId':_0x570b25,'commentId':_0x11350c,'content':_0x26b07b,'attributes':_0x5878d7})['then'](()=>_0x31a527['remove'](_0x3922b2))['catch'](_0x591b56=>{throw console['error'](_0x591b56),new _0x5d272e('commentsrepository-update-comment-internal-error',this);});}_removeComment({threadId:_0xdd990d,commentId:_0x351cc8,isFromAdapter:_0x4e8962}){const _0x3ec2b4=this['getCommentThread'](_0xdd990d),_0x333805=_0x3ec2b4['getComment'](_0x351cc8);if(!_0x333805)throw new _0x5d272e('commentsrepository-remove-missing-comment',this);if(_0x3ec2b4['_remove'](_0x333805),_0x4e8962||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x367157=this['context']['plugins']['get']('PendingActions'),{channelId:_0x242181}=_0x3ec2b4,_0x3b1d49=_0x367157['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x242181,'threadId':_0xdd990d,'commentId':_0x351cc8})['then'](()=>_0x367157['remove'](_0x3b1d49))['catch'](_0x3fa8d7=>{throw console['error'](_0x3fa8d7),new _0x5d272e('commentsrepository-remove-comment-internal-error',this);});}},ri=class extends si{['channelId'];['id'];_isAttached;_isSubmitted;comments;_repository;constructor(_0x3605b0,_0x9998c2){super();const _0x2a0254=_0x9998c2['isResolvable'];this['channelId']=_0x9998c2['channelId'],this['id']=_0x9998c2['id'],this['comments']=new _0xf9e025(),this['_repository']=_0x3605b0,this['_isAttached']=!0x1,this['_isSubmitted']=_0x9998c2['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x3605b0,'_permissions',_0x3605b0,'_readOnlyChannels',()=>_0x3605b0['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x3605b0,'_permissions',()=>_0x3605b0['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x3605b0,'_permissions',()=>{const _0x2a1379=_0x3605b0['getPermissions'](this['channelId']);return _0x2a1379['write']||_0x2a1379['admin'];}),this['bind']('isResolvable')['to'](_0x3605b0,'_permissions',()=>_0x2a0254&&_0x3605b0['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x9998c2['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x51b14c,_0x2c1e40)=>_0x51b14c?_0x2c1e40?_0x51b14c<_0x2c1e40?_0x51b14c:_0x2c1e40:_0x51b14c:_0x2c1e40),this['set']('unlinkedAt',_0x9998c2['unlinkedAt']||null),this['set']('resolvedAt',_0x9998c2['resolvedAt']||null),this['set']('resolvedBy',_0x9998c2['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x4da35e=>!!_0x4da35e),this['set']('attributes',_0x9998c2['attributes']||{});}get weight(){return Array['from'](this['comments'])['reduce']((_0x18b87c,_0x481b01)=>_0x18b87c+_0x481b01['weight'],0x0);}get length(){return this['comments']['length'];}get isAttached(){return this['_isAttached'];}get isSubmitted(){return this['_isSubmitted'];}submit(){const {channelId:_0x5c4e86,id:_0x14954a}=this;this['_repository']['fire'](ai('submitCommentThread',_0x5c4e86),{'channelId':_0x5c4e86,'threadId':_0x14954a});}setUnlinkedAt(_0x449bb7){this['_update']({'unlinkedAt':_0x449bb7});}['resolve']({resolvedAt:_0x35a0d0=new Date(),resolvedBy:_0x2f077e='',isFromAdapter:_0x40839c=!0x1}={}){const _0x4d8d3d=this['_repository']['context']['plugins']['get'](_0x4c3234)['me'],{channelId:_0x400cc7,id:_0x5b2d2e}=this;this['_repository']['fire'](ai('resolveCommentThread',_0x400cc7),{'channelId':_0x400cc7,'threadId':_0x5b2d2e,'resolvedAt':_0x35a0d0,'resolvedBy':_0x2f077e||_0x4d8d3d['id'],'isFromAdapter':_0x40839c});}['reopen']({isFromAdapter:_0x519d30=!0x1}={}){const {channelId:_0x57eff9,id:_0x256531}=this;this['_repository']['fire'](ai('reopenCommentThread',_0x57eff9),{'channelId':_0x57eff9,'threadId':_0x256531,'isFromAdapter':_0x519d30});}setContext(_0x586413){this['context']||this['_update']({'context':_0x586413});}setAttribute(_0x295892,_0x58b012){const _0x2e984f=_0x202236(this['attributes']);_0x3e68a1(_0x2e984f,_0x295892,_0x58b012),this['_update']({'attributes':_0x2e984f});}removeAttribute(_0x432f74){const _0x56b5f6=_0x202236(this['attributes']);_0x1734e3(_0x56b5f6,_0x432f74),this['_update']({'attributes':_0x56b5f6});}['remove']({isFromAdapter:_0x9719ec=!0x1}={}){const {channelId:_0x2c5bc0,id:_0x3c5a20}=this;this['_repository']['fire'](ai('removeCommentThread',_0x2c5bc0),{'channelId':_0x2c5bc0,'threadId':_0x3c5a20,'isFromAdapter':_0x9719ec});}attachTo(_0x5056e4){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x5056e4});}addComment(_0x59ac47){const {channelId:_0x30b178,id:_0x4781d6}=this;this['_repository']['fire'](ai('addComment',_0x30b178,_0x4781d6),Object['assign']({'channelId':_0x30b178,'threadId':_0x4781d6},_0x59ac47));}getComment(_0x48771d){if('string'!=typeof _0x48771d)throw new _0x5d272e('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x48771d});return this['comments']['get'](_0x48771d);}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'](_0x1ba1fe=>_0x1ba1fe['toJSON']()),'attributes':this['attributes']};}['_add'](_0x32477d){return this['listenTo'](_0x32477d,'change:authoredAt',()=>{const _0xb4656f=this['_findOptimalIndex'](_0x32477d),_0x34e348=this['comments'];_0xb4656f-0x1!=_0x34e348['getIndex'](_0x32477d)&&_0xb4656f+0x1!=_0x34e348['getIndex'](_0x32477d)&&(this['_remove'](_0x32477d),this['_add'](_0x32477d));}),this['comments']['add'](_0x32477d,this['_findOptimalIndex'](_0x32477d));}_update(_0x2c9d41){const {channelId:_0x5cd92c,id:_0xd71215}=this;this['_repository']['fire'](ai('updateCommentThread',_0x5cd92c),{..._0x2c9d41,'channelId':_0x5cd92c,'threadId':_0xd71215});}['_remove'](_0x4e82ee){return this['stopListening'](_0x4e82ee),_0x4e82ee['destroy'](),this['comments']['remove'](_0x4e82ee);}_findOptimalIndex(_0x37e2db){const _0x1947d2=this['comments']['find'](_0x27f7b1=>new Date(_0x27f7b1['authoredAt'])['getTime']()>new Date(_0x37e2db['authoredAt'])['getTime']());return _0x1947d2?this['comments']['getIndex'](_0x1947d2):this['length'];}},hi=class extends ni{['id'];threadId;author;creator;createdAt;_repository;constructor(_0x5be846,_0x13b3f5){super();const _0x282a66=_0x5be846['context']['plugins']['get'](_0x4c3234)['me'],_0xd620e7=_0x5be846['getCommentThread'](_0x13b3f5['threadId']),_0xa871b8=0x0===_0xd620e7['comments']['length'],_0x222e43=_0x282a66===_0x13b3f5['author'];this['id']=_0x13b3f5['id'],this['threadId']=_0x13b3f5['threadId'],this['author']=_0x13b3f5['author'],this['creator']=_0x13b3f5['creator'],this['set']('content',_0x13b3f5['content']),this['createdAt']=_0x13b3f5['createdAt']||new Date(),this['set']('authoredAt',_0x13b3f5['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0xd620e7,'resolvedAt'),this['set']('attributes',_0x13b3f5['attributes']||{}),this['bind']('isEditable')['to'](_0x5be846,'_permissions',()=>{const _0x24cba8=_0x5be846['getPermissions'](_0xd620e7['channelId'])['write'],_0x558f35=_0x5be846['getPermissions'](_0xd620e7['channelId'])['modifyAll'];return _0x222e43&&_0x24cba8||!_0x222e43&&_0x558f35;}),this['bind']('isRemovable')['to'](_0xd620e7,'isRemovable',_0x5be846,'_permissions',_0x439515=>{const _0x437ba6=_0x5be846['getPermissions'](_0xd620e7['channelId'])['write'],_0x1e4476=_0x5be846['getPermissions'](_0xd620e7['channelId'])['modifyAll'];return _0x222e43&&_0x437ba6||_0x439515&&_0xa871b8||!_0x222e43&&_0x1e4476&&!_0xa871b8;}),this['bind']('isReadOnly')['to'](_0xd620e7,'isReadOnly'),this['_repository']=_0x5be846;}get isExternal(){return Boolean(this['attributes']&&this['attributes']['@external']);}get weight(){return Math['max'](function(_0x17a13b){const _0x75fdfc=document['createElement']('div');return _0x75fdfc['innerHTML']=_0x17a13b,_0x75fdfc['textContent']['length'];}(this['content']),0xc8);}update(_0x34e33d){const {threadId:_0x47ad6f,id:_0x1b721f}=this;if(!this['_repository']['hasCommentThread'](_0x47ad6f))throw new _0x5d272e('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x34e642}=this['_repository']['getCommentThread'](_0x47ad6f);this['_repository']['fire'](ai('updateComment',_0x34e642,_0x47ad6f),{'channelId':_0x34e642,'threadId':_0x47ad6f,'commentId':_0x1b721f,..._0x34e33d});}setAttribute(_0x330a10,_0x41c917){const _0x1ba1f6=_0x202236(this['attributes']);_0x3e68a1(_0x1ba1f6,_0x330a10,_0x41c917),this['update']({'attributes':_0x1ba1f6});}removeAttribute(_0x408d28){const _0x551e38=_0x202236(this['attributes']);_0x1734e3(_0x551e38,_0x408d28),this['update']({'attributes':_0x551e38});}['remove'](_0xd3a50f={}){if(!_0xd3a50f['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x3643be,id:_0x58e0a5}=this;if(!this['_repository']['hasCommentThread'](_0x3643be))throw new _0x5d272e('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x57d851}=this['_repository']['getCommentThread'](_0x3643be);this['_repository']['fire'](ai('removeComment',_0x57d851,_0x3643be),{'channelId':_0x57d851,'threadId':_0x3643be,'commentId':_0x58e0a5,..._0xd3a50f});}toJSON(){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}destroy(){this['stopListening']();}};function ai(_0x545847,..._0x182aec){for(const _0x45ff49 of _0x182aec)void 0x0!==_0x45ff49&&(_0x545847+=':'+String(_0x45ff49));return _0x545847;}var ci=class extends _0x2e378e{constructor(_0x427513){super(_0x427513),this['set']('hasContent',!0x1);}['refresh'](){const _0x4a9289=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x18350f of _0x4a9289['getRanges']())if(this['_hasContent'](_0x18350f))return void(this['hasContent']=!0x0);}execute({threadId:_0x5ce5c9=_0x4df11c(),ranges:_0x345b3f,comment:_0x24f2bf}={}){const _0x1dba33=this['editor']['model'],_0x7ecbdf=_0x345b3f??Array['from'](_0x1dba33['document']['selection']['getRanges']()),_0x4ecf5e=[];for(const _0x43b9d0 of _0x7ecbdf)this['_hasContent'](_0x43b9d0)&&_0x4ecf5e['push'](this['_trimToContent'](_0x43b9d0));if(!_0x4ecf5e['length'])throw new _0x5d272e('addcommentthreadcommand-incorrect-ranges',null);_0x24f2bf&&this['_createCommentThread'](_0x5ce5c9,_0x24f2bf),this['_createMarkersFromRanges'](_0x5ce5c9,_0x4ecf5e,!!_0x24f2bf);}_createMarkersFromRanges(_0x17b994,_0x50d2cc,_0x451dfa){this['editor']['model']['change'](_0x56113f=>{for(const _0x587478 of _0x50d2cc){const _0x5adbf3='comment:'+_0x17b994+':'+_0x4df11c()['substr'](0x1,0x5);_0x56113f['addMarker'](_0x5adbf3,{'range':_0x587478,'usingOperation':_0x451dfa,'affectsData':_0x451dfa});}});}_createCommentThread(_0x2c1766,_0x3f0c1a){const _0x18aafa=this['editor']['plugins']['get']('CommentsRepository'),_0x212b6e=this['editor']['config']['get']('collaboration.channelId'),_0x1e68e7=this['editor']['plugins']['get']('Users')['me'];if(!_0x1e68e7)throw new _0x5d272e('addcommentthreadcommand-user-not-found',null);_0x18aafa['addCommentThread']({'threadId':_0x2c1766,'channelId':_0x212b6e,'comments':[{'authorId':_0x1e68e7['id'],'content':_0x3f0c1a,'createdAt':new Date(),'attributes':{}}]});}_hasContent(_0x33748e){for(const _0x41cba5 of _0x33748e['getItems']())if(this['_itemIsContent'](_0x41cba5))return!0x0;return!0x1;}_itemIsContent(_0x121a22){return _0x121a22['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x121a22)&&!_0x121a22['is']('element','tableCell');}_trimToContent(_0x67d3f2){const _0x232c01=_0x3d456c=>!this['_itemIsContent'](_0x3d456c['item']),_0xcf5bf5=_0x67d3f2['start']['getLastMatchingPosition'](_0x232c01),_0x22be7b=_0x67d3f2['end']['getLastMatchingPosition'](_0x232c01,{'direction':'backward'});return this['editor']['model']['createRange'](_0xcf5bf5,_0x22be7b);}},di=class extends _0x5e7fa9{_dataCollectors;_editorAnnotations;static get requires(){return[ti];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4f3565){super(_0x4f3565),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}init(){const _0x49a627=this['editor'],_0x3a6230=_0x49a627['model']['document']['selection'],_0x4aeb83=_0x5364de(()=>this['refreshSelectedViews'](),0xa);_0x3a6230['on']('change:range',(_0x3d15c9,_0x118927)=>{_0x118927['directChange']&&(_0x4aeb83['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x49a627['editing']['view']['document'],'change:isFocused',(_0x246c9a,_0x35e192,_0x378543)=>{_0x378543&&_0x4aeb83();}),this['listenTo'](_0x49a627['ui']['focusTracker'],'change:isFocused',(_0x26e71b,_0x5b7af3,_0x5cc260)=>{_0x5cc260||this['fire']('blur',{'isAnnotationTracked':_0x2d43f4=>this['_editorAnnotationsData']['has'](_0x2d43f4['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}registerAnnotation(_0x4a9ffa){if(this['_editorAnnotations']['has'](_0x4a9ffa['view']))return;this['_editorAnnotations']['add'](_0x4a9ffa['view']),this['editor']['ui']['focusTracker']['add'](_0x4a9ffa['view']['element']);const _0x3e6760=this['editor']['plugins']['get'](ti);this['listenTo'](_0x3e6760['collection'],'remove',(_0x45b6b9,_0x5599f4)=>{this['editor']['ui']['focusTracker']['remove'](_0x5599f4['view']['element']),this['_editorAnnotations']['delete'](_0x5599f4['view']);});}hasDomSelection(){return this['editor']['editing']['view']['hasDomSelection'];}addSourceCollector(_0x201d2e){if('function'!=typeof _0x201d2e)throw new _0x5d272e('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x201d2e);}refreshSelectedViews(){this['fire']('refresh');}getOrderedSelectedAnnotations({activeAnnotation:_0x11135d,annotations:_0x43a059}){const _0x1d32c8=[],_0x86833b=this['editor']['model']['document']['selection'],_0xcbb8a2=Array['from'](_0x86833b['getRanges']());for(const [_0x45f4cd,_0x52e913]of this['_editorAnnotationsData']){const _0x59e31f=_0x5a6a83(_0x52e913),_0x5df274=_0x43a059['getByInnerView'](_0x45f4cd);_0x59e31f&&_0x5df274&&_0x1d32c8['push']({'annotation':_0x5df274,'range':_0x59e31f});}function _0x5a6a83(_0x3807f1){for(const _0x289679 of _0x3807f1)for(const _0x354880 of _0xcbb8a2)if(_0x289679['containsRange'](_0x354880,!_0x86833b['isCollapsed']))return _0x289679;return null;}return _0x1d32c8['sort']((_0x126c0d,_0x5a7d52)=>{const _0x50661c=_0x126c0d['range'],_0x46f603=_0x5a7d52['range'];if(!_0x50661c['isEqual'](_0x46f603)){if(_0x50661c['containsRange'](_0x46f603,!0x0))return 0x1;if(_0x46f603['containsRange'](_0x50661c,!0x0))return-0x1;}return _0x126c0d['annotation']==_0x11135d?-0x1:_0x5a7d52['annotation']==_0x11135d?0x1:0x0;})['map'](_0xdcecef=>_0xdcecef['annotation']);}get _editorAnnotationsData(){const _0x57736d=new Map();for(const _0x109bc6 of Array['from'](this['_dataCollectors']))for(const [_0x4ca198,_0x32df12]of _0x109bc6())_0x57736d['set'](_0x4ca198,_0x32df12);return _0x57736d;}},li=class extends _0x5e7fa9{afterInit(){const _0x2a76fe=this['editor'];_0x2a76fe['plugins']['has']('RestrictedEditingModeEditing')&&_0x2a76fe['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},mi=class extends _0x5e7fa9{constructor(_0x10859c){super(_0x10859c),this['editor']['config']['define']('importWord.formatting.comments','basic');}afterInit(){const _0x55b4eb=this['editor'],_0x59ed79=_0x55b4eb['commands']['get']('importWord'),_0x4ef371=_0x55b4eb['plugins']['get'](_0x4c3234);_0x59ed79&&(_0x59ed79['on']('execute',(_0x1934a0,[,_0x412b20])=>{_0x412b20['collaboration_features']={'comments':!0x0,'user_id':_0x4ef371['me']['id']};},{'priority':_0x3b02ac['high']+0xa}),this['listenTo'](_0x59ed79,'dataInsert',this['_handleImportedData']));}_handleImportedData(_0x49444f,_0xc0e33c){const {comment_threads:_0x1db0b8}=_0xc0e33c;_0x1db0b8&&_0x1db0b8['forEach'](({thread_id:_0xf70f9c,comments:_0x1cefc3,is_resolved:_0x2dd133})=>{const _0x339c13=new Date(),_0x773447=_0x1cefc3['map'](({author:_0x4132b1,content:_0x3a9c09,created_at:_0x5338b2})=>({'content':_0x3a9c09,'authorId':this['editor']['plugins']['get'](_0x4c3234)['me']['id'],'createdAt':_0x339c13,'attributes':{'@external':{'authorName':_0x4132b1,'createdAt':_0x5338b2?new Date(_0x5338b2):new Date(),'source':'importWord'}}})),_0x11b02e=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](oi)['addCommentThread']({'channelId':_0x11b02e,'threadId':_0xf70f9c,'comments':_0x773447,'resolvedAt':_0x2dd133?_0x339c13:null});});}},ui=class extends _0x5e7fa9{constructor(_0xccf08c){super(_0xccf08c),this['editor']['config']['define']('comments.copyMarkers','default');}static get requires(){return[pt,wt];}afterInit(){const _0x5e3cdd=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x5e3cdd,'contentInsertion',(_0x447fcd,_0x5ee005)=>this['_removeMarkersWithoutThreads'](_0x5ee005['content']['markers']),{'priority':'highest'});}_removeMarkersWithoutThreads(_0x279b3d){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x279b3d;const _0x5d0dc4=this['editor']['plugins']['get']('CommentsRepository');for(const _0x3e12d5 of _0x279b3d['keys']()){const [_0x565af9,_0x578eb2]=_0x3e12d5['split'](':');'comment'!=_0x565af9||_0x5d0dc4['hasCommentThread'](_0x578eb2)||_0x279b3d['delete'](_0x3e12d5);}return _0x279b3d;}_registerMarkerInClipboardPipeline(){const _0x3b6c4a=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x4f830a=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x4f830a&&_0x3b6c4a['_registerMarkerToCopy']('comment',_0x4f830a);}_mapCommentsCopyConfigToRegisterConfiguration(_0x2c141c){switch(_0x2c141c){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function fi(_0x1d3547){const _0x1ca90a=_0x1d3547['split'](':');return{'group':_0x1ca90a[0x0],'id':_0x1ca90a[0x1],'part':_0x1ca90a[0x2]};}var pi=class extends _0x5e7fa9{init(){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}overrideMarkerConverters(){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x365599,_0xa4d4e5)=>{if(!_0xa4d4e5['options']['showCommentHighlights'])return null;if(_0xa4d4e5['options']['ignoreResolvedComments']){const {id:_0xbc40f6}=fi(_0x365599['markerName']);if(this['editor']['plugins']['get'](oi)['getCommentThread'](_0xbc40f6)?.['isResolved']&&_0x365599['item'])return _0xa4d4e5['consumable']['consume'](_0x365599['item'],'addMarker:'+_0x365599['markerName']),_0xa4d4e5['consumable']['consume'](_0x365599['item'],'removeMarker:'+_0x365599['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x14dcd6=>{_0x14dcd6['on']('addMarker:comment',(_0x41f18b,_0x5c3491,_0xc03ca)=>{if(!_0xc03ca['options']['showCommentHighlights'])return;const _0x2acd8b=_0x5c3491['item'];if(!_0x2acd8b)return;const _0x35fe75=_0xc03ca['mapper']['toViewElement'](_0x2acd8b);this['editor']['model']['schema']['isObject'](_0x2acd8b)&&_0x35fe75&&!_0x35fe75['getCustomProperty']('widget')&&_0x35fe75['is']('containerElement')&&Ct(_0x35fe75,_0xc03ca['writer']);},{'priority':'high'});});}overrideHorizontalRuleConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x1825c6,{writer:_0x397ca2,options:_0x42c1c2})=>{if(!_0x42c1c2['showCommentHighlights'])return null;const _0x4235ba=_0x397ca2['createContainerElement']('div'),_0x1813a2=_0x397ca2['createEmptyElement']('hr');return _0x397ca2['addClass']('ck-horizontal-line',_0x4235ba),_0x397ca2['insert'](_0x397ca2['createPositionAt'](_0x4235ba,0x0),_0x1813a2),_0x4235ba;},'converterPriority':'high'});}overrideImageInlineConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x54b8be,{writer:_0x5dae09,options:_0xb1a39d})=>{if(!_0xb1a39d['showCommentHighlights'])return null;const _0x2fc0d6=_0x5dae09['createContainerElement']('span'),_0x4c7073=_0x5dae09['createEmptyElement']('img');return _0x5dae09['addClass']('image-inline',_0x2fc0d6),_0x5dae09['insert'](_0x5dae09['createPositionAt'](_0x2fc0d6,0x0),_0x4c7073),_0x2fc0d6;},'converterPriority':'high'});}overrideMediaEmbedConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x553ed0,{writer:_0x504624,options:_0x3414f9})=>{if(_0x3414f9['showCommentHighlights'])return _0x504624['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x4495e8,_0x41bb44,_0x5cb26d)=>{_0x5cb26d['options']['showCommentHighlights']&&_0x4495e8['stop']();},{'priority':'high'});}},wi=class extends _0x5e7fa9{static get requires(){return[oi,di,_0x4c3234,li,mi,ui,pi];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xa1cded){super(_0xa1cded),this['set']('isThreadsLoadingPaused',!0x0),_0xa1cded['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x408d19,_0x4a8914,_0x8bea1b,_0x2e9095)=>{const _0x2fb80f=_0xa1cded['plugins']['get'](oi),_0x3227d7=_0x8bea1b?fi(_0x8bea1b)['id']:null;_0xa1cded['model']['change'](()=>{if(_0x3227d7){const _0x440dfe=this['getAllMarkersForId'](_0x3227d7);for(const _0x2c6d19 of _0x440dfe)_0xa1cded['editing']['reconvertMarker'](_0x2c6d19);}if(_0x2e9095){const {id:_0x4d6d07}=fi(_0x2e9095),_0x1ccc06=_0x2fb80f['getCommentThread'](_0x4d6d07);if(_0x1ccc06&&_0x1ccc06['unlinkedAt'])return;if(_0x1ccc06&&!_0x1ccc06['isAttached'])return;const _0xfb649e=this['getAllMarkersForId'](_0x4d6d07);for(const _0x57de93 of _0xfb649e)_0xa1cded['editing']['reconvertMarker'](_0x57de93);}}),_0x3227d7&&this['scrollToThreadMarker'](_0x3227d7);}),this['_initAriaMarkerChangeAnnouncements']();}init(){const _0x121880=this['editor'],_0x33d126=_0x121880['plugins']['get'](oi),_0x493bc6=_0x121880['config']['get']('collaboration.channelId'),_0x218681=_0x33d126['getCommentThreads']()['filter'](_0x1dc6b8=>_0x1dc6b8['channelId']!==_0x493bc6);_0x121880['commands']['add']('addCommentThread',new ci(_0x121880)),this['listenTo'](_0x121880,'change:isReadOnly',(_0x1f211d,_0x3d7144,_0x52886e)=>{_0x33d126['switchReadOnly'](_0x52886e,_0x121880['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x33d126,gi('addCommentThread',_0x493bc6),(_0x539281,{threadId:_0x48a63b})=>{this['editor']['plugins']['get'](oi)['getCommentThread'](_0x48a63b)?.['unlinkedAt']&&this['_attachArchivedThread'](_0x48a63b);}),this['listenTo'](_0x33d126,gi('removeCommentThread',_0x493bc6),(_0x49c268,{threadId:_0x30c155})=>{_0x121880['model']['enqueueChange']({'isUndoable':!0x1},_0x5b426e=>{const _0x195843=this['getAllMarkersForId'](_0x30c155);for(const _0x2cb331 of _0x195843)_0x5b426e['removeMarker'](_0x2cb331);});}),this['listenTo'](_0x33d126,gi('resolveCommentThread',_0x493bc6),(_0x5e717a,{threadId:_0x341b10})=>{this['_reconvertMarkers'](_0x341b10);const _0x55c562=this['editor']['plugins']['get'](ti);(this['editor']['editing']['view']['hasDomSelection']||_0x55c562['collection']['isFocused'])&&(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x341b10)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x33d126,gi('reopenCommentThread',_0x493bc6),(_0x2e01d3,{threadId:_0x581450})=>{this['_reconvertMarkers'](_0x581450);},{'priority':'low'}),this['listenTo'](_0x33d126,gi('addComment',_0x493bc6),(_0x448f53,{threadId:_0x216a5f,isFromAdapter:_0x3053e5})=>{const _0x3e64d9=this['getAllMarkersForId'](_0x216a5f);!_0x3053e5&&0x0!=_0x3e64d9['length']&&_0x33d126['hasCommentThread'](_0x216a5f)&&0x1===_0x33d126['getCommentThread'](_0x216a5f)['length']&&_0x121880['model']['enqueueChange']({'isUndoable':!0x1},_0x54e02e=>{for(const _0x570c50 of _0x3e64d9)_0x54e02e['updateMarker'](_0x570c50,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x218681);}afterInit(){!async function(_0xa830f4){const _0x48fe66='KpOBJGNSEgqCyfVF1kZ8lbnRjM7eIzAsDQHw9aThu6rcYi05UmPL4d3X2Wotvx',_0x44ddd3=0x79158,_0x254a22=window['Date']['now'](),_0x596bbd=_0xa830f4['editor'],_0x184de7=new window['Promise'](_0x3c1bef=>{_0x596bbd['once']('ready',_0x3c1bef);}),_0x5a2790={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x3af981=_0x596bbd['config']['get']('licenseKey');async function _0x185e00(){let _0x35087c,_0x3f29ae=null,_0x5e1bb8=null;try{return'GPL'==_0x3af981?'NotAllowed':(_0x35087c=_0x431179(),_0x35087c?(_0x35087c['usageEndpoint']&&(_0x5e1bb8=_0x2da7ee(_0x35087c['usageEndpoint'],_0x35087c['jti'])),await _0x47f286()?_0x2b1bca()?_0x24c35d()?'Expired':_0x565a19()?('evaluation'==_0x35087c['licenseType']&&(_0x3f29ae=_0x57e0bb('EvaluationLimit')),await _0xb670dc()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x24c35d(){const _0x4035f4=['evaluation','trial']['includes'](_0x35087c['licenseType'])?_0x254a22/0x3e8:0xe10*_0x44ddd3;return _0x35087c['exp']<_0x4035f4;}function _0x2b1bca(){const _0x45c578=_0x35087c['features'];if(!_0x45c578)return!0x1;if(_0x45c578['includes']('*'))return!0x0;if(_0x45c578['includes']('CMT'))return!0x0;if(_0x45c578['includes']('TRILIUM')&&_0x28df7b())return!0x0;if(_0x45c578['includes']('RCMT')){if(_0x3b4d1d())return!0x0;if(_0xc09034()||_0x34a2e5())return!0x0;}return!0x1;}function _0x565a19(){const _0x51101a=_0x35087c['licensedHosts'];if(!_0x51101a||0x0==_0x51101a['length'])return!0x0;const {hostname:_0x449475}=new URL(window['location']['href']);if(_0x51101a['includes'](_0x449475))return!0x0;const _0x4bff7a=_0x449475['split']('.');return _0x51101a['filter'](_0x2e03ac=>_0x2e03ac['includes']('*'))['map'](_0x500be4=>_0x500be4['split']('.'))['filter'](_0x5b371a=>_0x5b371a['length']<=_0x4bff7a['length'])['map'](_0x4e1265=>Array(_0x4bff7a['length']-_0x4e1265['length'])['fill']('*'===_0x4e1265[0x0]?'*':'')['concat'](_0x4e1265))['some'](_0x2a9c5d=>_0x4bff7a['every']((_0x4e71f5,_0x3eaf20)=>_0x2a9c5d[_0x3eaf20]===_0x4e71f5||'*'===_0x2a9c5d[_0x3eaf20]));}function _0xb670dc(){return _0x3f29ae&&_0x5e1bb8?new window['Promise']((_0x126b44,_0x11ceea)=>{_0x3f29ae['then'](_0x126b44,_0x11ceea),_0x5e1bb8['then'](_0x52e608=>{'Valid'!=_0x52e608&&_0x126b44(_0x52e608);},_0x11ceea);}):_0x3f29ae||_0x5e1bb8||'Valid';}}function _0x2da7ee(_0x19b9cf,_0x440fe1){return new window['Promise'](_0xa83e99=>{if(_0x488f22())return _0xa83e99('Valid');_0x4137f5(),_0x596bbd['decorate']('_sendUsageRequest');let _0x153649=!0x1;const _0x38a1=_0x4df11c();function _0x38e6cb(_0x23d800){return!!_0x23d800&&('object'==typeof _0x23d800||'function'==typeof _0x23d800)&&'function'==typeof _0x23d800['then']&&'function'==typeof _0x23d800['catch'];}function _0xaf2ad2(_0x10aaa5){_0x24280f(_0x10aaa5)['then'](_0x215449=>_0x215449&&'ok'==_0x215449['status']?_0x21fc1c(_0x21d069(_0x38a1+_0x440fe1))!=_0x215449['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x43f509=>(_0x508f98(),_0x43f509),()=>{const _0x4e0b48=_0x43bdfc();return null==_0x4e0b48?(_0x508f98(),'Valid'):_0x254a22-_0x4e0b48>0x240c8400?'UsageLimit':'Valid';})['then'](_0xa83e99)['catch'](()=>{_0xa83e99('UsageLimit');});const _0x36c20c=0x36ee80;function _0x508f98(){const _0x2f11ec='llct-'+_0x21fc1c(_0x21d069(_0x19b9cf)),_0x43c7cb=_0x2d5b2c(_0x21fc1c(window['Math']['ceil'](_0x254a22/_0x36c20c)));window['localStorage']['setItem'](_0x2f11ec,_0x43c7cb);}function _0x43bdfc(){const _0x552b6e='llct-'+_0x21fc1c(_0x21d069(_0x19b9cf)),_0x57636c=window['localStorage']['getItem'](_0x552b6e);return _0x57636c?window['parseInt'](_0x2d5b2c(_0x57636c),0x10)*_0x36c20c:null;}function _0x24280f(_0x1af783){return new window['Promise']((_0x1075c0,_0x122492)=>{_0x1af783['then'](_0x1075c0,_0x122492),window['setTimeout'](_0x122492,0x1d4c0);});}}_0x596bbd['on']('_sendUsageRequest',(_0x26fd1f,_0xf434f0)=>{if(_0xf434f0[0x0]!=_0x19b9cf)return _0xa83e99('UsageLimit');_0xf434f0[0x1]={..._0xf434f0[0x1],'requestId':_0x38a1};},{'priority':'high'}),_0x596bbd['on']('_sendUsageRequest',_0x2d03a7=>{_0x38e6cb(_0x2d03a7['return'])&&(_0x153649=!0x0,_0xaf2ad2(_0x2d03a7['return']));},{'priority':'low'}),_0x184de7['then'](()=>{_0x153649||_0xa83e99('UsageLimit');});});function _0x488f22(){return'auto'==_0x596bbd['editing']['view']['_overlayModeHint'];}function _0x4137f5(){_0x596bbd['editing']['view']['_overlayModeHint']='auto';}}function _0x57e0bb(_0x3a7060){const _0x2d3b3c=[new window['Promise'](_0x422182=>setTimeout(_0x422182,0x93ecc)),_0x184de7['then'](()=>new window['Promise'](_0x20c0d5=>{let _0x3d64a1=0x0;_0x596bbd['model']['on']('applyOperation',(_0x2e4e02,_0x588187)=>{_0x588187[0x0]['isDocumentOperation']&&_0x3d64a1++,0x5e8==_0x3d64a1&&(_0x20c0d5(),_0x2e4e02['off']());});}))];return window['Promise']['race'](_0x2d3b3c)['then'](()=>_0x3a7060);}async function _0x4deb09(){await _0x184de7,_0x596bbd['model']['change']=_0x2a36a7,_0x596bbd['model']['enqueueChange']=_0x2a36a7,_0x596bbd['enableReadOnlyMode']('model');}function _0x28df7b(){return window['glob']&&window['glob']['triliumVersion'];}function _0x3b4d1d(){return _0x181c65('WebSocketGateway')&&'connected'==_0x21fe9b('WebSocketGateway')['state'];}function _0xc09034(){return _0x181c65('RevisionViewerIntegration');}function _0x34a2e5(){return _0x181c65('TrackChangesDataGetter');}function _0x1f5eb1(_0x41cbe3){const _0x38fdf3=_0x23df77();_0x596bbd[_0x38fdf3]='commentsLicenseKey'+_0x41cbe3,'Valid'!=_0x41cbe3&&_0x4deb09();}function _0x23df77(){const _0xf2b8da=window['String'](window['performance']['now']())['replace']('.','');let _0x481683='K';for(let _0x71a85e=0x0;_0x71a85e<_0xf2b8da['length'];_0x71a85e+=0x2){let _0xae6687=window['parseInt'](_0xf2b8da['substring'](_0x71a85e,_0x71a85e+0x2));_0xae6687>=0x3e&&(_0xae6687-=0x3e),_0x481683+=_0x48fe66[_0xae6687];}return _0x481683;}function _0x431179(){const _0x53ac5c=_0x3af981['split']('.');if(0x3!=_0x53ac5c['length'])return null;return _0x4eb84a(_0x53ac5c[0x1]);function _0x4eb84a(_0x434dc6){const _0x378ad9=_0x46d483(_0x434dc6);return _0x378ad9&&_0x1ed9d2()?_0x378ad9:null;function _0x1ed9d2(){const _0x1a4bf2=_0x378ad9['jti'],_0x351619=window['parseInt'](_0x1a4bf2['substring'](_0x1a4bf2['length']-0x8),0x10),_0x432377={..._0x378ad9,'jti':_0x1a4bf2['substring'](0x0,_0x1a4bf2['length']-0x8)};return delete _0x432377['vc'],_0x21d069(_0x432377)==_0x351619;}}}async function _0x47f286(){let _0xd85f6c=!0x0;try{const [_0x26ee01,_0x1c25f0,_0x48635c]=_0x3af981['split']('.');return _0x1f5686(_0x26ee01),await _0x25f80f(_0x26ee01,_0x1c25f0,_0x48635c),_0xd85f6c;}catch{return!0x1;}function _0x1f5686(_0x3bb293){const _0x44de35=_0x46d483(_0x3bb293);_0x44de35&&'ES256'==_0x44de35['alg']||(_0xd85f6c=!0x1);}async function _0x25f80f(_0x1168d9,_0x417df2,_0x22f83f){const _0x274985=window['Uint8Array']['from'](_0x51f883(_0x22f83f),_0x1ddfde=>_0x1ddfde['charCodeAt'](0x0)),_0x3f0f9e=new window['TextEncoder']()['encode'](_0x1168d9+'.'+_0x417df2),_0x1a5500=window['crypto']['subtle'];if(!_0x1a5500)return;const _0x4452eb=await _0x1a5500['importKey']('jwk',_0x5a2790,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x1a5500['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x4452eb,_0x274985,_0x3f0f9e)||(_0xd85f6c=!0x1);}}function _0x46d483(_0x2bc5dd){return _0x2bc5dd['startsWith']('ey')?JSON['parse'](_0x51f883(_0x2bc5dd)):null;}function _0x51f883(_0x393fd4){return window['atob'](_0x393fd4['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x21d069(_0x3489a8){let _0x26a779=0x1505;function _0x5acc4e(_0x1f7255){for(let _0x2eeff7=0x0;_0x2eeff7<_0x1f7255['length'];_0x2eeff7++){const _0x38a7db=_0x1f7255['charCodeAt'](_0x2eeff7);_0x26a779=(_0x26a779<<0x5)+_0x26a779+_0x38a7db,_0x26a779&=_0x26a779;}}function _0x2c1204(_0x3bd52f){Array['isArray'](_0x3bd52f)?_0x3bd52f['forEach'](_0x2c1204):_0x3bd52f&&'object'==typeof _0x3bd52f?Object['entries'](_0x3bd52f)['sort']()['forEach'](([_0x22611a,_0x33e7c4])=>{_0x5acc4e(_0x22611a),_0x2c1204(_0x33e7c4);}):_0x5acc4e(window['String'](_0x3bd52f));}return _0x2c1204(_0x3489a8),_0x26a779>>>0x0;}function _0x21fc1c(_0x407952){return _0x407952['toString'](0x10)['padStart'](0x8,'0');}function _0x2d5b2c(_0x1c7915){return _0x1c7915['split']('')['reverse']()['join']('');}function _0x181c65(_0x326546){return _0x596bbd['plugins']['has'](_0x326546);}function _0x21fe9b(_0x2ed0a3){return _0x596bbd['plugins']['get'](_0x2ed0a3);}function _0x2a36a7(){}_0x1f5eb1(await _0x185e00());}(this);}destroy(){const _0x2e7665=this['editor']['plugins']['get'](oi),_0x4a9e77=this['editor']['config']['get']('collaboration.channelId');for(const _0x17795d of _0x2e7665['getCommentThreads']({'channelId':_0x4a9e77}))_0x2e7665['_detachCommentThread'](_0x17795d['id']),_0x2e7665['_threads']['delete'](_0x17795d['id']);super['destroy']();}['hasMarkerForId'](_0x2bcc51){return this['getAllMarkersForId'](_0x2bcc51)['length']>0x0;}getAllMarkersForId(_0x595fc9){const _0x7d1f2=[];for(const _0x51b05a of this['editor']['model']['markers'])_0x51b05a['name']['startsWith']('comment:'+_0x595fc9)&&_0x7d1f2['push'](_0x51b05a);return _0x7d1f2;}['scrollToThreadMarker'](_0x4fbd7f){setTimeout(()=>{const _0x366c73=this['_getTargetForId'](_0x4fbd7f);_0x366c73&&this['activeMarker']&&fi(this['activeMarker'])['id']===_0x4fbd7f&&_0x118fae({'target':_0x366c73[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}_reconvertMarkers(_0x5974c3){this['editor']['model']['change'](()=>{for(const _0x4941df of this['getAllMarkersForId'](_0x5974c3))this['editor']['editing']['reconvertMarker'](_0x4941df);});}_attachArchivedThread(_0x27bc7c){const _0x5723aa=this['editor']['plugins']['get'](oi),_0x36ff18=this['editor']['plugins']['get'](di),_0x13e1c4=_0x5723aa['getCommentThread'](_0x27bc7c);if(!_0x13e1c4['isAttached']){const _0x53c461=_0x13e1c4['attachTo'](()=>this['_getTargetForId'](_0x13e1c4['id']));_0x36ff18['registerAnnotation'](_0x53c461),_0x13e1c4['_hasTargetInContent']=!0x1;}}_initializeMarkerConverters(){const _0xb17b7e=this['editor'],_0x12b085=_0xb17b7e['plugins']['get'](_0x4c3234);_0xb17b7e['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x1f51b1,_0x5f5d26)=>{const {id:_0x13af6d}=fi(_0x1f51b1['markerName']),_0xc4fa23=_0xb17b7e['plugins']['get'](oi)['getCommentThread'](_0x13af6d),_0x4a2187=this['activeMarker']&&fi(this['activeMarker'])['id']===_0x13af6d;let _0x26c6df;if(_0xc4fa23&&_0xc4fa23['isResolved']&&!_0x4a2187&&_0x1f51b1['item'])return _0x5f5d26['consumable']['consume'](_0x1f51b1['item'],'addMarker:'+_0x1f51b1['markerName']),_0x5f5d26['consumable']['consume'](_0x1f51b1['item'],'removeMarker:'+_0x1f51b1['markerName']),null;const _0x3f0727=['ck-comment-marker'];return _0x4a2187&&_0x3f0727['push']('ck-comment-marker--active'),_0x26c6df=_0xc4fa23?.['length']?_0xc4fa23['comments']['first']['author']['id']:_0x12b085['me']['id'],{'classes':_0x3f0727,'attributes':{'data-comment':_0x13af6d,'data-author-id':_0x26c6df}};}}),_0xb17b7e['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x1021de,{options:_0x1a0264})=>{if(_0x1a0264['showCommentHighlights'])return null;const _0x102ad3=_0xb17b7e['plugins']['get'](oi),_0x23e7f3=_0xb17b7e['model']['markers']['get'](_0x1021de),{id:_0x110476,part:_0x513b}=fi(_0x1021de);return _0x23e7f3&&!_0x23e7f3['affectsData']||_0x1a0264['ignoreResolvedComments']&&_0x102ad3['getCommentThread'](_0x110476)?.['isResolved']?null:{'group':'comment','name':_0x513b?_0x110476+':'+_0x513b:_0x110476};}}),_0xb17b7e['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0xd0e82b,{writer:_0x17aae2})=>_0x17aae2['createElement']('$marker',{'data-name':'comment:'+_0xd0e82b['getAttribute']('id')})}),_0xb17b7e['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x344764=this['editor'],_0x247575=_0x344764['plugins']['get'](oi),_0x1eb612=new Set(),_0x15f5d5=new Set();_0x344764['model']['document']['registerPostFixer'](_0x3d6fb5=>{let _0x2cafb8=!0x1;for(const {name:_0xe31225,data:_0xde42ce}of _0x344764['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3df734,id:_0x3c6b98}=fi(_0xe31225);let _0x66c115=_0xde42ce['newRange'];if('comment'!==_0x3df734||!_0x66c115)continue;const _0x1d7501='$graveyard'===_0x66c115['root']['rootName'];_0x1d7501||(_0x66c115=_i(_0x66c115,_0x344764['model']),!_0x66c115||_0x66c115['isCollapsed']||!_0xde42ce['newRange']||_0x66c115['isEqual'](_0xde42ce['newRange']))?_0x344764['model']['hasContent'](_0x66c115)&&!_0x1d7501?this['isThreadsLoadingPaused']?_0x1eb612['add'](_0xe31225):this['_handleThreadMarker'](_0xe31225,_0x3c6b98):(_0x15f5d5['add'](_0xe31225),_0x1eb612['delete'](_0xe31225),_0x3d6fb5['removeMarker'](_0xe31225),_0x2cafb8=!0x0):(_0x3d6fb5['updateMarker'](_0xe31225,{'range':_0x66c115}),_0x2cafb8=!0x0);}return _0x2cafb8;}),this['on']('change:isThreadsLoadingPaused',(_0x512756,_0x1047a1,_0x219316)=>{if(!_0x219316&&_0x1eb612['size'])for(const _0x1bea7b of _0x1eb612){const {id:_0x412171}=fi(_0x1bea7b);_0x1eb612['delete'](_0x1bea7b),_0x344764['model']['markers']['get'](_0x1bea7b)&&this['_handleThreadMarker'](_0x1bea7b,_0x412171);}}),this['listenTo'](_0x344764['model']['document'],'change',()=>{for(const {name:_0x4329ce,data:{newRange:_0x41c2a8}}of _0x344764['model']['document']['differ']['getChangedMarkers']()){const {group:_0x38d45d,id:_0x216473}=fi(_0x4329ce);if('comment'!==_0x38d45d)continue;const _0x3a4724=_0x247575['getCommentThread'](_0x216473),_0x5b0f91=this['hasMarkerForId'](_0x216473);_0x3a4724&&(!_0x3a4724['_hasTargetInContent']&&_0x41c2a8&&_0x344764['editing']['view']['once']('render',()=>{const _0x54657a=_0x344764['plugins']['get'](ti),_0x30db15=_0x247575['_threadToController']['get'](_0x3a4724)['view'];_0x54657a['getByInnerView'](_0x30db15)['refreshVisibility']();},{'priority':'low'}),_0x3a4724['_hasTargetInContent']=_0x5b0f91||!!_0x41c2a8),_0x41c2a8||(_0x15f5d5['add'](_0x4329ce),_0x1eb612['delete'](_0x4329ce));}for(const _0x51e946 of _0x15f5d5){const {id:_0x5e329a}=fi(_0x51e946),_0xd669=_0x247575['getCommentThread'](_0x5e329a);if(_0x1eb612['delete'](_0x51e946),!_0xd669)continue;const _0x4f68e1=this['hasMarkerForId'](_0x5e329a);_0x4f68e1||_0xd669['isSubmitted']?_0x4f68e1||_0xd669['unlinkedAt']||_0xd669['setUnlinkedAt'](new Date()):_0xd669['remove']();}_0x15f5d5['clear']();});}_handleInitialThreads(_0x47656b){_0x47656b['forEach'](_0x1c9081=>{_0x1c9081['unlinkedAt']&&this['_attachArchivedThread'](_0x1c9081['id']);});}_getTargetForId(_0x51f7ae){const _0x3f02ef=this['editor'],_0x6b9c67=this['getAllMarkersForId'](_0x51f7ae);return _0x585495(_0x3f02ef['editing'],_0x6b9c67);}_getTextContext(_0x4d1411){const _0x2683df=this['getAllMarkersForId'](_0x4d1411);let _0x3379b2='',_0x2d34fc=!0x1;for(const _0x537d1a of _0x2683df){const _0x5f2572=_0x537d1a['getRange']();for(const _0x5b5671 of Array['from'](_0x5f2572['getItems']()))_0x5b5671['is']('$textProxy')?(_0x3379b2&&_0x2d34fc&&(_0x3379b2+='\x20',_0x2d34fc=!0x1),_0x3379b2+=_0x5b5671['data']):_0x2d34fc=!0x0;_0x2d34fc=!0x0;}return _0x3379b2['substring'](0x0,0x96);}_attachMarkerToThread(_0xf1821e,_0x202492){const _0x304a00=this['editor'],_0x1386ef=_0x304a00['plugins']['get'](oi);let _0x2ca14d=_0x1386ef['getCommentThread'](_0x202492);const _0x55e6b9=_0x304a00['config']['get']('collaboration.channelId'),_0x2820a2=_0x304a00['plugins']['get'](di);return _0x2ca14d&&(_0x2ca14d['unlinkedAt']&&_0x2ca14d['setUnlinkedAt'](null),_0x2ca14d['isAttached'])||(this['getAllMarkersForId'](_0x202492)[0x0]['managedUsingOperations']?_0x1386ef['fetchCommentThread']({'channelId':_0x55e6b9,'threadId':_0x202492})['then'](_0x2576e3=>{if('destroyed'!==_0x304a00['state']){if(_0x2ca14d=_0x2576e3,_0x2ca14d&&!_0x2ca14d['isAttached']){const _0xc53f80=_0x2ca14d['attachTo'](()=>this['_getTargetForId'](_0x202492));_0x2820a2['registerAnnotation'](_0xc53f80),_0x2ca14d['isResolved']&&this['_reconvertMarkers'](_0x202492);}else{if(!_0x2ca14d){const _0x29534f=this['getAllMarkersForId'](_0x202492);_0x304a00['model']['change'](_0x20de58=>{for(const _0x2cc8e1 of _0x29534f)_0x20de58['removeMarker'](_0x2cc8e1);});}}}}):_0x304a00['editing']['view']['once']('render',()=>{if(_0x1386ef['getCommentThread'](_0x202492))return;const _0xb88dab=_0x304a00['plugins']['get'](ti);_0x2ca14d=_0x1386ef['openNewCommentThread']({'channelId':_0x55e6b9,'threadId':_0x202492,'target':()=>this['_getTargetForId'](_0x202492),'context':{'type':'text','value':this['_getTextContext'](_0x202492)}});const _0xe835b0=_0x1386ef['_threadToController']['get'](_0x2ca14d)['view'],_0x4ac966=_0xb88dab['getByInnerView'](_0xe835b0);_0x4ac966&&_0x2820a2['registerAnnotation'](_0x4ac966);},{'priority':'low'})),_0x2ca14d;}['_handleThreadMarker'](_0x16358e,_0x1db071){const _0x37c758=this['_attachMarkerToThread'](_0x16358e,_0x1db071);_0x37c758&&!_0x37c758['context']&&_0x37c758['setContext']({'type':'text','value':this['_getTextContext'](_0x1db071)});}_initAriaMarkerChangeAnnouncements(){const _0x122855=this['editor'];_0x52ee07(_0x122855['model'],({left:_0x2532b8,entered:_0x3db35})=>{for(const _0x7836ad of _0x2532b8)if(Ai(_0x7836ad)){_0x122855['ui']['ariaLiveAnnouncer']['announce'](Et(_0x122855['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x31c367 of _0x3db35)if(Ai(_0x31c367)){_0x122855['ui']['ariaLiveAnnouncer']['announce'](Et(_0x122855['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x5ba350(_0x41d991)));break;}});}};function gi(_0x38303f,_0x27d073){return _0x27d073?_0x38303f+':'+_0x27d073:_0x38303f;}function _i(_0x55d809,_0x8f4d2d){const _0x2ce7c6=_0x8f4d2d['schema'],_0x4ef1bb=_0x8f4d2d['createRange'](_0x55d809['start']);for(const _0x586904 of _0x55d809['getWalker']()){const {type:_0x243107,item:_0xf6fd20,nextPosition:_0x207afa}=_0x586904;if('text'===_0x243107||_0x2ce7c6['isObject'](_0xf6fd20)){const _0x3cde20=_0x8f4d2d['createPositionBefore'](_0xf6fd20);_0x4ef1bb['isCollapsed']&&(_0x4ef1bb['start']=_0x3cde20),_0x4ef1bb['end']=_0x207afa;}}return _0x4ef1bb;}function Ai(_0x7914c2){return'comment'===fi(_0x7914c2['name'])['group'];}var vi=class extends _0x5e7fa9{['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 _0x3d4d83=this['editor'],_0x3fdad5=_0x3d4d83['plugins']['get'](oi),_0x4810d5=_0x3d4d83['plugins']['get'](wi),_0x305acf=_0x3d4d83['plugins']['get'](ti),_0x1dd00a=_0x3d4d83['plugins']['get'](di);_0x3d4d83['ui']['componentFactory']['add']('comment',()=>{const _0x31a001=this['_createUIButton'](_0x3d0035);return _0x31a001['tooltip']=!0x0,_0x31a001;}),_0x3d4d83['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](rt)),_0x1dd00a['addSourceCollector'](()=>{const _0x52c0b2=[];for(const [_0x51c841,_0x661229]of _0x3fdad5['_threadToController']){const _0x2df5b1=_0x4810d5['getAllMarkersForId'](_0x51c841['id']),_0x10d909=_0x2df5b1['map'](_0x456c7e=>_0x456c7e['getRange']());_0x2df5b1['length']>0x0&&_0x52c0b2['push']([_0x661229['view'],_0x10d909]);}return _0x52c0b2;}),this['listenTo'](_0x305acf,'change:activeAnnotations',(_0x59d2f8,_0x54ee11,_0x542fe6)=>{const _0x1e5b3b=Array['from'](_0x542fe6)['map'](_0x3860c7=>_0x3860c7['innerView'])['find'](_0x39454a=>_0x3fdad5['_viewToController']['has'](_0x39454a));if(!_0x1e5b3b)return void(_0x4810d5['activeMarker']=null);const _0x5de403=_0x3fdad5['_viewToController']['get'](_0x1e5b3b)['model']['id'],_0x5ea468='comment:'+_0x5de403;_0x5de403&&_0x4810d5['hasMarkerForId'](_0x5de403)?_0x4810d5['activeMarker']=_0x5ea468:_0x4810d5['activeMarker']&&(_0x4810d5['activeMarker']=null);}),this['listenTo'](_0x3fdad5,'removeCommentThread',(_0x365580,{threadId:_0x284aed,isFromAdapter:_0x589e43})=>{!_0x589e43&&_0x3d4d83['ui']['focusTracker']['isFocused']&&_0x4810d5['hasMarkerForId'](_0x284aed)&&_0x3d4d83['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x3fdad5,'addComment',(_0xf4e1b,{threadId:_0x26bb46,isFromAdapter:_0x1e5859})=>{!_0x1e5859&&_0x4810d5['hasMarkerForId'](_0x26bb46)&&_0x3fdad5['hasCommentThread'](_0x26bb46)&&0x1===_0x3fdad5['getCommentThread'](_0x26bb46)['length']&&(_0x3d4d83['editing']['view']['focus'](),_0xf4e1b['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3c7e17=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1f9ea6;for(const _0x3dd215 in _0x3c7e17){const _0x3c3469=_0x3dd215,_0x431d96=_0x3c7e17[_0x3c3469];if('commentsLicenseKeyValid'==_0x431d96||'commentsLicenseKeyInvalid'==_0x431d96||'commentsLicenseKeyExpired'==_0x431d96||'commentsLicenseKeyDomainLimit'==_0x431d96||'commentsLicenseKeyNotAllowed'==_0x431d96||'commentsLicenseKeyEvaluationLimit'==_0x431d96||'commentsLicenseKeyUsageLimit'==_0x431d96){delete _0x3c7e17[_0x3c3469],_0x1f9ea6=_0x431d96,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x1f9ea6&&_0x3c7e17['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x1f9ea6&&_0x3c7e17['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x1f9ea6&&_0x3c7e17['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x1f9ea6&&_0x3c7e17['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x1f9ea6&&_0x3c7e17['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x1f9ea6&&_0x3c7e17['_showLicenseError']('usageLimit');},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_createUIButton(_0x371472){const _0x47329b=this['editor'],_0x3932fa=new _0x371472(_0x47329b['locale']),_0x2259a4=_0x47329b['commands']['get']('addCommentThread');return _0x3932fa['set']({'label':Et(_0x47329b['locale'],'Comment'),'icon':_0x1f0c12}),_0x3932fa['bind']('isEnabled')['to'](_0x2259a4,'isEnabled',_0x2259a4,'hasContent',(_0x4c76aa,_0x1fa49f)=>_0x4c76aa&&_0x1fa49f),this['listenTo'](_0x3932fa,'execute',()=>{_0x2259a4['execute']();}),_0x3932fa;}},yi=class extends _0x5e7fa9{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[wi];}constructor(_0x274281){super(_0x274281),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x229783,_0x3a29cc,_0x983964)=>{_0x983964?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}afterInit(){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}_enableCommentsOnlyMode(){for(const [_0x31d287,_0x1e79ab]of this['editor']['commands'])_0x1e79ab['affectsData']&&'addCommentThread'!==_0x31d287&&_0x1e79ab['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 _0x55b723=this['editor']['editing']['view']['document'];this['listenTo'](_0x55b723,'cut',_0x311ef5=>_0x311ef5['stop'](),{'priority':'highest'}),this['listenTo'](_0x55b723,'clipboardInput',_0x39154b=>_0x39154b['stop'](),{'priority':'highest'}),this['listenTo'](_0x55b723,'delete',_0x331a8d=>_0x331a8d['stop'](),{'priority':'highest'});}_disableCommentsOnlyMode(){for(const [_0x440458,_0x5c4a84]of this['editor']['commands'])_0x5c4a84['affectsData']&&'addCommentThread'!==_0x440458&&_0x5c4a84['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 _0xdeb873{activeUIs;uisData;['_uis'];static get requires(){return[ti];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3998d1){super(_0x3998d1),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}init(){const _0x4a9724=this['context']['plugins']['get'](ti);this['listenTo'](_0x4a9724,'_activateAnnotation',(_0x3a2e8a,_0xf62c4c)=>{for(const _0x55e97c of this['activeUIs']){const _0x44a5bc=this['_uis']['get'](_0x55e97c);(0x0,this['uisData']['get'](_0x55e97c)['filter'])(_0xf62c4c)&&_0x44a5bc['setActiveAnnotation'](_0xf62c4c);}}),this['listenTo'](_0x4a9724,'_deactivateAllAnnotations',()=>{for(const _0x26fa0d of this['activeUIs'])this['_uis']['get'](_0x26fa0d)['setActiveAnnotation'](null);}),this['listenTo'](_0x4a9724['_visibleAnnotations'],'add',(_0x498a19,_0x146dc2)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x146dc2);});}hasActive(){return this['activeUIs']['size']>0x0;}isActive(_0x101fab){return this['activeUIs']['has'](_0x101fab);}activate(_0x5de935,_0x139ade=this['defaultFilter']){const _0x518726=this['context']['plugins']['get'](ti);if(!this['_uis']['has'](_0x5de935))throw new _0x5d272e('annotationsuis-missing-ui',this,{'uiName':_0x5de935});this['isActive'](_0x5de935)&&this['deactivate'](_0x5de935),this['activeUIs']['add'](_0x5de935);const _0x4c8b94=new Jt();Qt({'source':_0x518726['_visibleAnnotations'],'target':_0x4c8b94,'filter':_0x139ade}),this['uisData']['set'](_0x5de935,{'collection':_0x4c8b94,'filter':_0x139ade});const _0x5ece4d=this['_uis']['get'](_0x5de935);_0x5ece4d['attach'](_0x4c8b94),this['listenTo'](_0x5ece4d,'change:activeAnnotation',(_0x3edc84,_0x468aa7,_0x54e082,_0x3c2481)=>{_0x3c2481&&_0x518726['_removeActiveAnnotation'](_0x3c2481),_0x54e082&&_0x518726['_addActiveAnnotation'](_0x54e082);});}deactivate(_0x219698){if(this['activeUIs']['delete'](_0x219698),!this['_uis']['has'](_0x219698))throw new _0x5d272e('annotationsuis-missing-ui',this,{'uiName':_0x219698});const _0x148b20=this['_uis']['get'](_0x219698);_0x148b20['detach'](),this['stopListening'](_0x148b20),this['uisData']['get'](_0x219698)['collection']['destroy'](),this['uisData']['delete'](_0x219698);}switchTo(_0x47820c){if(!this['_uis']['has'](_0x47820c))throw new _0x5d272e('annotationsuis-missing-ui',this,{'uiName':_0x47820c});const _0x196d23=this['context']['plugins']['get'](ti),_0x24fb66=Array['from'](_0x196d23['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x47820c);const _0x86d58e=this['_uis']['get'](_0x47820c);_0x86d58e['setActiveAnnotation'](_0x24fb66),_0x86d58e['_setSelectedAnnotations']&&_0x24fb66&&_0x86d58e['_setSelectedAnnotations']([_0x24fb66]);}deactivateAll(){for(const _0xf89e90 of this['activeUIs'])this['deactivate'](_0xf89e90);}register(_0x439b3a,_0x20fa8c){if(this['_uis']['has'](_0x439b3a))throw new _0x5d272e('annotationsuis-register-already-registered');if('function'!=typeof _0x20fa8c['attach']||'function'!=typeof _0x20fa8c['detach']||'function'!=typeof _0x20fa8c['setActiveAnnotation'])throw new _0x5d272e('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x439b3a,_0x20fa8c);}refilterAnnotations(){const _0x128dc2=this['context']['plugins']['get'](ti)['collection'],_0x48b856=new Map(),_0x467694=Array['from'](this['activeUIs']);for(const _0x34f7b7 of this['activeUIs']){const _0x4ca79b=this['uisData']['get'](_0x34f7b7)['collection'];for(const _0x4e4a85 of _0x4ca79b)_0x48b856['set'](_0x4e4a85,_0x34f7b7);}for(const _0x137fed of _0x128dc2){const _0x194a6d=_0x48b856['get'](_0x137fed);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x137fed);const _0x140a7c=_0x467694['find'](_0x2bee46=>this['uisData']['get'](_0x2bee46)['filter'](_0x137fed));_0x194a6d!==_0x140a7c&&(_0x194a6d&&this['uisData']['get'](_0x194a6d)['collection']['remove'](_0x137fed),_0x140a7c&&this['uisData']['get'](_0x140a7c)['collection']['add'](_0x137fed));}}destroy(){this['deactivateAll'](),super['destroy']();}defaultFilter(){return!0x0;}_assertAnnotationDoesNotBelongToMultipleUIs(_0x2a0de2){const _0x466cdb=[];for(const _0x19954e of this['activeUIs']){(0x0,this['uisData']['get'](_0x19954e)['filter'])(_0x2a0de2)&&_0x466cdb['push'](_0x19954e);}if(_0x466cdb['length']>0x1)throw new _0x5d272e('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x466cdb,'annotationType':_0x2a0de2['type']});}};const Ci=/* #__PURE__ -- @preserve */
32
- _0x3a6317('px');var Ii=class extends ht{list;['focusables'];['focusTracker'];['focusCycler'];constructor(_0x498f4e){super(_0x498f4e);const _0x8fa09=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 _0xf8949c(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x8fa09['to']('class')],'style':{'minHeight':_0x8fa09['to']('minHeight',_0xd7c68f=>'number'==typeof _0xd7c68f?Ci(_0xd7c68f+0xa):null)},'dir':_0x498f4e['uiLanguageDirection'],'role':'application','aria-label':Et(_0x498f4e,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':Et(_0x498f4e,'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',_0x42f7a1=>{this['_updateItemPositionInFocusables'](_0x42f7a1['source']);}),this['list']['forEach'](_0x5cf6bc=>{this['focusTracker']['add'](_0x5cf6bc['element']),this['_updateItemPositionInFocusables'](_0x5cf6bc);}),this['list']['on']('change',(_0x51135a,_0x576ada)=>{for(const _0x546076 of _0x576ada['removed'])this['focusTracker']['remove'](_0x546076['element']),this['focusables']['remove'](_0x546076);for(const _0x5620e1 of _0x576ada['added'])this['focusTracker']['add'](_0x5620e1['element']),this['_updateItemPositionInFocusables'](_0x5620e1);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}_updateItemPositionInFocusables(_0x526f37){const _0xf8fc7e=this['focusables']['getIndex'](_0x526f37);let _0x5389b7,_0x48b8ab;for(const _0x18cabc of this['focusables'])if(_0x526f37['top']<_0x18cabc['top']){_0x5389b7=_0x18cabc;break;}if(_0x48b8ab=_0x5389b7?this['focusables']['getIndex'](_0x5389b7):this['focusables']['length'],-0x1!==_0xf8fc7e){if(_0xf8fc7e===_0x48b8ab-0x1)return;this['focusables']['remove'](_0x526f37),_0x48b8ab=_0x5389b7?this['focusables']['getIndex'](_0x5389b7):this['focusables']['length'];}this['focusables']['add'](_0x526f37,_0x48b8ab);}};const bi=/* #__PURE__ -- @preserve */
33
- _0x3a6317('px');var Ei=class extends ht{content;_targetTop;_mutationObserver;constructor(_0x277b3c){super(_0x277b3c),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x421c10,_0x599363)=>_0x421c10+_0x599363),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x43de3e=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x43de3e['to']('isAnimationDisabled',_0xce8306=>_0xce8306?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x43de3e['to']('top',_0x53e884=>bi(_0x53e884))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}updateHeight(){const _0x374b55=this['element']['clientHeight'];_0x374b55&&(this['height']=_0x374b55);}destroy(){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},ki=class extends _0xdeb873{['view'];_activeAnnotation;_annotations;_spaceBetweenItems;_sidebarItemViewToAnnotation;_annotationToSidebarItemView;_recalculateBuffer;static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x54225c){super(_0x54225c),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 _0x177c67=this['context']['config']['get']('sidebar.container');_0x177c67&&this['setContainer'](_0x177c67);}setContainer(_0x42860e){if(!Oi(_0x42860e))throw new _0x5d272e('sidebar-setcontainer-invalid-element');this['container']=_0x42860e;}_attachToContainer({viewClass:_0x1e7d89='',spaceBetweenItems:_0x1eb03c=0x19}={}){if(!Oi(this['container']))throw new _0x5d272e('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x1e7d89,this['_spaceBetweenItems']=_0x1eb03c;}['rearrange']({removedAnnotation:_0x508884,previousAnnotation:_0x320508,nextAnnotation:_0x2db8c4}){const _0x417241=this['getSidebarItemView'](_0x508884);this['view']['list']['remove'](_0x417241),this['_destroySidebarItemView'](_0x508884),_0x320508&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x320508)),_0x2db8c4&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x2db8c4)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x4cd99c,activatedAnnotation:_0x32868c,disableAnimationOnActivatedAnnotation:_0x1fcbaa}){if(this['_activeAnnotation']=_0x32868c,_0x4cd99c){_0x4cd99c['isActive']=!0x1;const _0x258064=this['getSidebarItemView'](_0x4cd99c);_0x258064&&_0x1fcbaa&&(_0x258064['isAnimationDisabled']=!0x1);}if(_0x32868c){const _0x5ae975=this['getSidebarItemView'](_0x32868c);_0x5ae975&&(_0x32868c['isActive']=!0x0,_0x1fcbaa&&(_0x5ae975['isAnimationDisabled']=!0x0,_0x5ae975['top']+=0x1),this['_alignToTargetRect'](_0x5ae975));}}_detachFromContainer(_0x452e18){if(this['view']['element']['remove'](),_0x452e18){for(const _0x1ff396 of _0x452e18)this['_destroySidebarItemView'](_0x1ff396);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}addAnnotation(_0x3d6d74,_0x308958){_0x308958||(_0x308958=_0x3d6d74['view']);const _0x155cad=new Ei(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x155cad,_0x3d6d74),this['_annotationToSidebarItemView']['set'](_0x3d6d74,_0x155cad),_0x155cad['content']['add'](_0x308958),this['listenTo'](_0x3d6d74['view'],'change:targetRect',(_0x1c2cbd,_0x367586,_0x472c09)=>{const _0x2f62be=this['_getTargetTop'](_0x3d6d74,_0x472c09);_0x155cad['_targetTop']!=_0x2f62be&&(_0x155cad['_targetTop']=_0x2f62be,this['_setItemTop'](_0x155cad,_0x2f62be));}),this['listenTo'](_0x155cad,'change:top',()=>{this['_recalculate'](_0x155cad,'top');}),this['listenTo'](_0x155cad,'change:bottom',()=>{this['_recalculate'](_0x155cad,'bottom');}),this['_alignToTargetRect'](_0x155cad);const _0x5d562c=this['_getItemBefore'](_0x155cad);return _0x5d562c&&this['_alignAfterItem'](_0x5d562c,_0x155cad)||this['_alignToTargetRect'](_0x155cad),this['_updateLastItem'](),this['view']['list']['add'](_0x155cad),_0x155cad;}['_alignForTopChange'](_0x33f56f){if(!_0x33f56f['content']['length'])return;const _0x3cade4=this['_getItemBefore'](_0x33f56f);if(!_0x3cade4)return;const _0x2872df=this['_sidebarItemViewToAnnotation']['get'](_0x3cade4),_0x1bc218=this['_activeAnnotation'];_0x1bc218&&_0x1bc218===_0x2872df?this['_alignAfterItem'](_0x3cade4,_0x33f56f):this['_alignBeforeItem'](_0x33f56f,_0x3cade4);}_alignForBottomChange(_0x5a27dd){if(!_0x5a27dd['content']['length'])return;const _0x3e4212=this['_getItemAfter'](_0x5a27dd);if(!_0x3e4212)return;const _0x5c801d=this['_sidebarItemViewToAnnotation']['get'](_0x3e4212),_0x2c140c=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x52aa56=this['_activeAnnotation'];_0x52aa56&&_0x52aa56===_0x5c801d&&_0x2c140c?(this['_alignBeforeItem'](_0x3e4212,_0x5a27dd),this['_alignAfterItem'](_0x5a27dd,_0x3e4212)):_0x52aa56&&_0x52aa56===_0x5c801d?this['_alignBeforeItem'](_0x3e4212,_0x5a27dd):this['_alignAfterItem'](_0x5a27dd,_0x3e4212);}_recalculate(_0x1c2ccb,_0x3b51f9){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x492fc0,changedProp:_0x595041}of this['_recalculateBuffer'])'top'===_0x595041?this['_alignForTopChange'](_0x492fc0):this['_alignForBottomChange'](_0x492fc0);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x1c2ccb,'changedProp':_0x3b51f9});}getSidebarItemView(_0x2bec10){return this['_annotationToSidebarItemView']['get'](_0x2bec10);}destroy(){this['stopListening'](),this['view']['destroy']();}_destroySidebarItemView(_0x52f3d8){const _0x1a0101=this['getSidebarItemView'](_0x52f3d8);this['stopListening'](_0x1a0101),this['stopListening'](_0x52f3d8['view']),_0x1a0101['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x52f3d8),this['_sidebarItemViewToAnnotation']['delete'](_0x1a0101);}_createSidebarView(){const _0x4d0520=new Ii(this['context']['locale']);return _0x4d0520['render'](),this['on']('change:_lastItem',(_0x1b6374,_0x59d3c1,_0x182734,_0x48460a)=>{_0x48460a&&_0x4d0520['unbind']('minHeight'),_0x182734?_0x4d0520['bind']('minHeight')['to'](_0x182734,'bottom'):_0x4d0520['minHeight']=null;}),_0x4d0520;}_updateLastItem(){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}_getItemBefore(_0x5caaff){const _0x4d34de=this['_sidebarItemViewToAnnotation']['get'](_0x5caaff),_0x4fb0b4=_0x4d34de&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x4d34de)-0x1);return _0x4fb0b4&&this['getSidebarItemView'](_0x4fb0b4)||null;}_getItemAfter(_0x3ef472){const _0x41ae56=this['_sidebarItemViewToAnnotation']['get'](_0x3ef472),_0x33bb7d=_0x41ae56&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x41ae56)+0x1);return _0x33bb7d&&this['getSidebarItemView'](_0x33bb7d)||null;}_alignBeforeItem(_0xb26f55,_0x198dcb){_0xb26f55['updateHeight']();const _0x324c7a=Ni(_0x198dcb['bottom']+this['_spaceBetweenItems'],_0xb26f55['top']);return!!_0x324c7a&&(this['_setItemTop'](_0x198dcb,_0x198dcb['top']-_0x324c7a),!0x0);}_alignAfterItem(_0x346b5f,_0x415a2c){_0x346b5f['updateHeight']();const _0x49a49b=Ni(_0x346b5f['bottom']+this['_spaceBetweenItems'],_0x415a2c['top']);return!!_0x49a49b&&(this['_setItemTop'](_0x415a2c,_0x415a2c['top']+_0x49a49b,!0x1),!0x0);}_alignToTargetRect(_0x5c83db){const _0x59a37a=this['_sidebarItemViewToAnnotation']['get'](_0x5c83db);if(!_0x59a37a||!_0x59a37a['target']||!_0x59a37a['targetRect'])return;const _0x1df17b=this['_getTargetTop'](_0x59a37a,_0x59a37a['targetRect']);this['_setItemTop'](_0x5c83db,_0x1df17b);}_getTargetTop(_0x1fbb7c,_0x32b72d){if(null===_0x32b72d)return 0x0;if(_0x1fbb7c['target']instanceof _0x275a65)return _0x32b72d['top'];{const _0x376f77=new _0x275a65(this['view']['element'])['top'];return _0x32b72d['top']-_0x376f77;}}_setItemTop(_0x2b957b,_0xb6bbe1,_0x28b8a4=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x28b8a4&&(_0xb6bbe1=Math['max'](_0xb6bbe1,this['_getMaxAvailableTop'](_0x2b957b))),_0x2b957b['top']=_0xb6bbe1;}_getMaxAvailableTop(_0x585749){let _0x135c9d=this['_getItemBefore'](_0x585749),_0x5cb469=0x0;for(;_0x135c9d;)_0x135c9d['updateHeight'](),_0x5cb469+=this['_spaceBetweenItems']+_0x135c9d['height'],_0x135c9d=this['_getItemBefore'](_0x135c9d);return _0x5cb469;}};function Ni(_0x9e3a82,_0x1828d8){return Math['max'](_0x9e3a82-_0x1828d8,0x0);}function Oi(_0x1a11ea){return null!==_0x1a11ea&&'object'==typeof _0x1a11ea&&0x1===_0x1a11ea['nodeType'];}var Mi=class extends _0xdeb873{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(_0x170214){super(_0x170214),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0xf9e025(),this['_refreshPositioningDebounced']=_0x5364de(()=>{_0x170214['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}init(){const _0x3d2dc3=this['context']['plugins']['get'](Ti),_0x29f57e=this['context']['plugins']['get'](ki);_0x3d2dc3['register']('wideSidebar',this),_0x29f57e['container']&&_0x3d2dc3['switchTo']('wideSidebar');}setActiveAnnotation(_0x5537ed){if(_0x5537ed===this['activeAnnotation'])return;const _0x205536=this['context']['plugins']['get'](ki);_0x205536['_activeAnnotation']=_0x5537ed;const _0xdc7a24=this['activeAnnotation'];_0x205536['refresh']({'blurredAnnotation':_0xdc7a24,'activatedAnnotation':_0x5537ed}),this['activeAnnotation']=_0x5537ed;}attach(_0x201c78){this['annotations']=_0x201c78;const _0x540bed=this['context']['plugins']['get'](ki);if(_0x540bed['_annotations']=_0x201c78,this['isAttached'])throw new _0x5d272e('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x540bed,'set:container',()=>{this['detach'](),this['listenTo'](_0x540bed,'change:container',_0x5f06d6=>{_0x5f06d6['off'](),this['attach'](_0x201c78);});}),_0x540bed['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x401c9e=_0x23049b=>{_0x23049b['updateTargetRect'](),_0x540bed['addAnnotation'](_0x23049b);};for(const _0x5dc252 of _0x201c78)_0x401c9e(_0x5dc252);this['listenTo'](_0x201c78,'add',(_0x506bc1,_0x2d181b)=>{_0x401c9e(_0x2d181b);}),this['listenTo'](_0x201c78,'remove',(_0x1cd8f5,_0x35533e,_0x9d4e49)=>{_0x540bed['rearrange']({'removedAnnotation':_0x35533e,'previousAnnotation':_0x201c78['get'](_0x9d4e49-0x1),'nextAnnotation':_0x201c78['get'](_0x9d4e49+0x1)}),_0x35533e===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x201c78,'focus',(_0x44cf26,_0x3f171d)=>{this['setActiveAnnotation'](_0x3f171d);}),this['listenTo'](_0x201c78,'blur',()=>{this['setActiveAnnotation'](null);});const _0x1b0b12=this['context']instanceof _0x105201?this['context']['editors']:new _0xf9e025([this['context']]);for(const _0x406db0 of _0x1b0b12)this['_integrateWithEditorAnnotations'](_0x406db0);this['listenTo'](_0x1b0b12,'add',(_0x554323,_0x16372d)=>{this['listenTo'](_0x16372d,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x16372d);});}),this['listenTo'](_0x1b0b12,'remove',(_0xfb7355,_0x417edb)=>{_0x417edb['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x417edb['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}detach(){if(!this['isAttached'])throw new _0x5d272e('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x14d0f2=this['context']['plugins']['get'](ki);_0x14d0f2['_detachFromContainer'](this['annotations']),this['stopListening'](_0x14d0f2),this['stopListening'](this['annotations']),this['context']instanceof _0x105201&&this['stopListening'](this['context']['editors']);for(const _0x22d702 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x22d702);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach']();}_integrateWithEditorAnnotations(_0x176855){if(!_0x176855['plugins']['has']('EditorAnnotations'))return;const _0x19bd6f=_0x176855['plugins']['get']('EditorAnnotations'),_0x33c0b8=()=>{const _0x502cec=_0x19bd6f['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x502cec[0x0]||null);};this['listenTo'](_0x19bd6f,'refresh',_0x33c0b8),this['listenTo'](_0x19bd6f,'blur',(_0x3698bd,{isAnnotationTracked:_0x30e01c})=>{this['activeAnnotation']&&_0x30e01c(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x19bd6f,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0xa3d204=>{_0x19bd6f['hasDomSelection']()&&(_0x33c0b8(),_0xa3d204['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x19bd6f);}_destroyEditorAnnotationsIntegration(_0x81d61b){this['stopListening'](_0x81d61b),this['_editorAnnotations']['remove'](_0x81d61b);}},Ri=class extends _0x3d0035{counterView;constructor(_0x215850){super(_0x215850);const _0xb77d3c=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x3ecd8c,_0x338731)=>_0x3ecd8c?'...':_0x338731['toString']()),this['set']('annotationType',''),this['icon']=_0x1f0c12,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new ht(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0xb77d3c['to']('annotationType',_0x50d115=>'ck-annotation-counter__badge--'+_0x50d115),_0xb77d3c['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0xb77d3c['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Si=class extends _0xdeb873{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(_0x12883f){super(_0x12883f),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x4ded3c())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0xf9e025(),this['_refreshPositioningDebounced']=_0x5364de(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}init(){this['context']['plugins']['get'](Ti)['register']('narrowSidebar',this),this['bodyCollection']=new _0x11963a(this['context']['locale']),this['balloonPanelView']=new _0x3c9681(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}attach(_0x55c9e5){this['annotations']=_0x55c9e5;const _0x411469=this['context']['plugins']['get'](ki),_0x995b53=this['balloonPanelView'];if(_0x411469['_annotations']=_0x55c9e5,this['isAttached'])throw new _0x5d272e('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x411469,'set:container',()=>{this['detach'](),this['listenTo'](_0x411469,'change:container',_0x46d6a2=>{_0x46d6a2['off'](),this['attach'](_0x55c9e5);});}),_0x411469['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x40ddb0=_0x570205=>{const _0x132da0=new Ri(this['context']['locale']);_0x411469['addAnnotation'](_0x570205,_0x132da0),this['_annotationToNarrowView']['set'](_0x570205,_0x132da0),_0x132da0['bind']('isDirty','annotationType','number')['to'](_0x570205['view'],'isDirty','type','length'),_0x132da0['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x995b53['content']['first']!==_0x570205['view']?(this['_showBalloon'](_0x570205),_0x570205['view']['element']['focus'](),this['setActiveAnnotation'](_0x570205)):this['setActiveAnnotation'](null);});};for(const _0x2c0e70 of _0x55c9e5)_0x40ddb0(_0x2c0e70);this['listenTo'](_0x55c9e5,'add',(_0x417b63,_0x3863be)=>{_0x40ddb0(_0x3863be);}),this['listenTo'](_0x55c9e5,'remove',(_0x47cc35,_0x369b10,_0x23c3c7)=>{this['_annotationToNarrowView']['get'](_0x369b10)['destroy'](),this['_annotationToNarrowView']['delete'](_0x369b10),_0x411469['rearrange']({'removedAnnotation':_0x369b10,'previousAnnotation':_0x55c9e5['get'](_0x23c3c7-0x1),'nextAnnotation':_0x55c9e5['get'](_0x23c3c7+0x1)}),_0x369b10===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x55c9e5,'focus',(_0x3c2e16,_0xf9c4b2)=>{this['setActiveAnnotation'](_0xf9c4b2);}),this['listenTo'](_0x55c9e5,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x452c07,_0x2d87b0)=>{_0x2d87b0['keyCode']===_0x3c0182['esc']&&_0x995b53['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x995b53['content']['first']),this['_hideBalloon'](),_0x2d87b0['stopPropagation'](),_0x2d87b0['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x48ad59,_0x1025a6)=>{const _0x1d5cbf=_0x1025a6['target'];_0x995b53['isVisible']&&_0x995b53['element']['contains'](_0x1d5cbf)||_0x411469['view']['element']['contains'](_0x1d5cbf)||_0x48ad59['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x37e0fa=>_0x37e0fa['contains'](_0x1d5cbf))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0xabc034=this['context']instanceof _0x105201?this['context']['editors']:new _0xf9e025([this['context']]);for(const _0x1a2bec of _0xabc034)this['_integrateWithEditorAnnotations'](_0x1a2bec);this['listenTo'](_0xabc034,'add',(_0x117473,_0x4d024f)=>{this['listenTo'](_0x4d024f,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x4d024f);});}),this['listenTo'](_0xabc034,'remove',(_0x1f798e,_0x29b76d)=>{_0x29b76d['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x29b76d['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}setActiveAnnotation(_0x2826ae){if(_0x2826ae===this['activeAnnotation'])return;const _0x158516=this['context']['plugins']['get'](ki);_0x158516['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x2826ae,'disableAnimationOnActivatedAnnotation':!0x0}),_0x2826ae&&_0x158516['getSidebarItemView'](_0x2826ae)?this['_showBalloon'](_0x2826ae):this['_hideBalloon'](),this['activeAnnotation']=_0x2826ae;}detach(){if(!this['isAttached'])throw new _0x5d272e('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x58160b=this['context']['plugins']['get'](ki);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0xf5d454=>_0xf5d454['destroy']()),this['_annotationToNarrowView']['clear'](),_0x58160b['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x105201&&this['stopListening'](this['context']['editors']);for(const _0x37e3df of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x37e3df);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(_0x3d9555){if(!_0x3d9555['plugins']['has']('EditorAnnotations'))return;const _0x26029f=_0x3d9555['plugins']['get']('EditorAnnotations'),_0x4d08f1=this['context']['plugins']['get'](ki),_0x2258ad=this['annotations'],_0x6a75ff=this['balloonPanelView'],_0x157735=()=>{const _0x2d2648=_0x26029f['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x2d2648),this['setActiveAnnotation'](_0x2d2648[0x0]||null);};this['listenTo'](_0x26029f,'refresh',_0x157735),this['listenTo'](_0x26029f,'blur',(_0x3097ef,{isAnnotationTracked:_0x5f331d})=>{this['activeAnnotation']&&_0x5f331d(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x26029f,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x2258ad,'blur',_0x5ac337=>{_0x26029f['hasDomSelection']()&&_0x5ac337['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x5acb5f,_0x2d90b3)=>{const _0x1c02bc=_0x2d90b3['target'];_0x6a75ff['isVisible']&&_0x6a75ff['element']['contains'](_0x1c02bc)||_0x4d08f1['view']['element']['contains'](_0x1c02bc)||this['activeAnnotation']&&_0x26029f['hasDomSelection']()&&(_0x157735(),_0x5acb5f['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x26029f);}_destroyEditorAnnotationsIntegration(_0x216740){_0x216740&&(this['stopListening'](_0x216740),this['_editorAnnotations']['remove'](_0x216740));}_setSelectedAnnotations(_0x4f3089){for(const _0x3c9f8a of this['_selectedAnnotations'])_0x4f3089['includes'](_0x3c9f8a)||this['_manuallyClosedAnnotationViews']['delete'](_0x3c9f8a['view']);this['_selectedAnnotations']=_0x4f3089;}_refreshPositioning(){const _0x2e24d3=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x2e24d3['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x372f9e){if(this['_manuallyClosedAnnotationViews']['has'](_0x372f9e['view']))return;const _0x2ca86c=this['balloonPanelView']['content']['first'];_0x2ca86c!==_0x372f9e['view']?(_0x2ca86c&&this['_detachListeners'](_0x2ca86c),this['_attachListeners'](_0x372f9e['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x372f9e['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}_updateBalloonPosition(){const _0x50e67d=this['balloonPanelView']['content']['first'],_0x16acb6=_0x50e67d&&this['annotations']['getByView'](_0x50e67d);if(!_0x16acb6||!this['_annotationToNarrowView']['has'](_0x16acb6))return;const _0x580d81=this['_annotationToNarrowView']['get'](_0x16acb6)['element'],_0x4b9941=(function(){const _0x2efae5=_0x3c9681['defaultPositions'];return[_0x2efae5['southArrowNorthEast'],_0x2efae5['northArrowSouthEast'],_0x2efae5['southArrowNorth'],_0x2efae5['northArrowSouth'],_0x2efae5['southArrowNorthWest'],_0x2efae5['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x580d81,'positions':_0x4b9941});}['_hideBalloon'](){const _0x1ab158=this['balloonPanelView'],_0x25fad8=_0x1ab158['content']['first'];_0x25fad8&&(this['_detachListeners'](_0x25fad8),_0x1ab158['unpin'](),_0x1ab158['content']['clear']());}_attachListeners(_0x7079f){this['listenTo'](_0x7079f,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x7079f,'Esc',(_0x2a9040,_0x1cb9d0)=>{this['_manuallyClosedAnnotationViews']['add'](_0x7079f),this['_hideBalloon'](),_0x1cb9d0();});}_detachListeners(_0x35eeb1){this['stopListening'](_0x35eeb1);}},xi=class extends _0x5e7fa9{isAttached;annotations;['_manuallyClosed'];['_balloon'];_addedAnnotations;_selectedAnnotations;['_forceRefresh'];_refreshVisibilityDebounced;static get requires(){return[di,_0x2f43a3,Ti];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4a749a){super(_0x4a749a),_0x4a749a['editing']['view']['addObserver'](lt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x4a749a['plugins']['get'](_0x2f43a3),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x5364de(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}init(){const _0x47551e=this['editor']['plugins']['get'](Ti);_0x47551e['context']===this['editor']&&(_0x47551e['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x1f4dcb,_0x14d2da)=>{const _0x42058f=this['_balloon'];if(this['isAttached']&&_0x42058f['visibleView']){const _0x2606d0=this['annotations']['getByView'](_0x42058f['visibleView']);_0x2606d0&&this['_closeAnnotation'](_0x2606d0),_0x14d2da();}}));}afterInit(){const _0x39e2bf=this['editor']['plugins']['get'](Ti);_0x39e2bf['context']===this['editor']&&(_0x39e2bf['hasActive']()||_0x39e2bf['switchTo']('inline'));}setActiveAnnotation(_0x5748f6){_0x5748f6!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x5748f6&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x5748f6)&&this['_addAnnotationToBalloon'](_0x5748f6,!0x0),_0x5748f6['isActive']=!0x0),_0x5748f6||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x5748f6);}attach(_0x2de9f3){this['annotations']=_0x2de9f3;const _0x558559=this['editor']['plugins']['get'](Ti),_0x24533e=this['_balloon'];if(this['isAttached'])throw new _0x5d272e('inlineannotations-attach-already-attached',this);if(_0x558559['context']!==this['editor'])throw new _0x5d272e('inlineannotations-not-allowed-with-context',this);const _0x3d420b=this['editor']['plugins']['get'](di);this['listenTo'](_0x3d420b,'refresh',()=>{const _0x3d1939=_0x3d420b['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x2e4daf,_0x1144cc;!this['_forceRefresh']&&(_0x2e4daf=_0x3d1939,_0x1144cc=this['_selectedAnnotations'],_0x2e4daf['length']===_0x1144cc['length']&&_0x2e4daf['every'](_0x115eec=>_0x1144cc['includes'](_0x115eec)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x3d1939),this['setActiveAnnotation'](_0x3d1939[0x0]||null));}),this['listenTo'](_0x3d420b,'blur',(_0x121beb,{isAnnotationTracked:_0x4860e3})=>{this['activeAnnotation']&&_0x4860e3(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x3d420b,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x1164ea,_0x3f3b17,_0x646b34)=>{_0x646b34||this['setActiveAnnotation'](null);}),this['listenTo'](_0x2de9f3,'remove',(_0x4b06d5,_0x2fc1c4)=>{this['_removeAnnotationFromBalloon'](_0x2fc1c4),_0x2fc1c4===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x24533e,'change:visibleView',(_0x4580e2,_0x2e42fe,_0x3d668a,_0x282790)=>{_0x282790&&this['stopListening'](_0x282790);const _0x47ae5d=_0x2de9f3['getByView'](_0x3d668a);_0x3d668a&&_0x47ae5d&&(this['listenTo'](_0x3d668a,'change:height',()=>{_0x24533e['updatePosition']();}),this['listenTo'](_0x3d668a,'Esc',()=>{this['_closeAnnotation'](_0x47ae5d),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x47ae5d&&this['setActiveAnnotation'](_0x47ae5d));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x24533e['visibleView']&&_0x2de9f3['getByView'](_0x24533e['visibleView'])&&_0x24533e['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 _0x5d272e('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x26656b of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x26656b);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}_setSelectedAnnotations(_0x163ab7){for(const _0x46888e of this['_selectedAnnotations'])_0x163ab7['includes'](_0x46888e)||this['_manuallyClosed']['delete'](_0x46888e);for(const _0x392212 of this['annotations'])_0x163ab7['includes'](_0x392212)||this['_removeAnnotationFromBalloon'](_0x392212);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x49ddf1 of _0x163ab7)this['_addAnnotationToBalloon'](_0x49ddf1);}this['_selectedAnnotations']=_0x163ab7;}_addAnnotationToBalloon(_0x2e27b5,_0x4e3da9=!0x1){this['_manuallyClosed']['has'](_0x2e27b5)||(this['_addedAnnotations']['has'](_0x2e27b5)||this['_balloon']['hasView'](_0x2e27b5['view'])||(this['_addedAnnotations']['add'](_0x2e27b5),this['_balloon']['add']({'stackId':_0x2e27b5['view']['id'],'view':_0x2e27b5['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x2e27b5)}})),_0x4e3da9&&this['_balloon']['showStack'](_0x2e27b5['view']['id']));}_getBalloonTargetForAnnotation(_0x57d860){const _0x188fb8=_0x57d860['target'],_0x4fb390=this['editor']['editing']['view'],_0x5bc6ab=_0x4fb390['document']['selection']['getFirstRange'](),_0x508c34=_0x4fb390['domConverter']['viewRangeToDom'](_0x5bc6ab);if(_0x508c34['collapse'](!0x0),_0x188fb8){if(_0x188fb8 instanceof _0x275a65)return _0x188fb8;let _0x3e35ef=[];for(const _0xb963ab of _0x188fb8)_0x3e35ef['push'](..._0x275a65['getDomElementRects'](_0xb963ab));_0x3e35ef=function(_0x3aa2d0){const _0x4bc4cb=[];let _0xc5fb04=_0x3aa2d0[0x0];for(let _0x495334=0x1;_0x495334<_0x3aa2d0['length'];_0x495334++)if(Pi(_0xc5fb04,_0x3aa2d0[_0x495334])){const _0x28606d=_0x3aa2d0[_0x495334]['width'];_0xc5fb04['width']+=_0x28606d,_0xc5fb04['right']+=_0x28606d;}else _0x4bc4cb['push'](_0xc5fb04),_0xc5fb04=_0x3aa2d0[_0x495334];return _0x4bc4cb['push'](_0xc5fb04),_0x4bc4cb;}(_0x3e35ef);const _0x5c6940=_0x508c34['getBoundingClientRect']();return _0x3e35ef['find'](_0x3972ed=>_0x3972ed['top']<=_0x5c6940['top']&&_0x3972ed['bottom']>=_0x5c6940['bottom']&&_0x3972ed['left']<=_0x5c6940['left']&&_0x3972ed['right']>=_0x5c6940['right'])||_0x3e35ef[0x0];}return _0x57d860['targetRect']||_0x508c34;}_removeAnnotationFromBalloon(_0x36afdf){this['_addedAnnotations']['has'](_0x36afdf)&&this['_balloon']['hasView'](_0x36afdf['view'])&&(this['_addedAnnotations']['delete'](_0x36afdf),this['_balloon']['remove'](_0x36afdf['view']));}_closeAnnotation(_0x4713ce){this['_manuallyClosed']['add'](_0x4713ce),this['_removeAnnotationFromBalloon'](_0x4713ce);}};function Pi(_0x634cc0,_0x2626a9){return _0x634cc0['top']===_0x2626a9['top']&&_0x634cc0['bottom']===_0x2626a9['bottom']&&_0x634cc0['right']===_0x2626a9['left'];}var Li=class extends ht{['focusTracker'];['focusCycler'];_annotationViews;constructor(_0x44fa7d,_0x20ec72){super(_0x44fa7d),this['set']('isEmpty',!_0x20ec72['length']),this['focusTracker']=new _0xf8949c(),this['_annotationViews']=_0x20ec72,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new et({'focusables':_0x20ec72,'focusTracker':this['focusTracker']}),this['listenTo'](_0x20ec72,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x20ec72,'remove',(_0xbd5fb9,_0x1591a8)=>{_0x1591a8['isActive']&&this['focus'](),_0x20ec72['length']||(this['isEmpty']=!0x0);});const _0x380db0=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':Et(_0x44fa7d,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x20ec72},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x380db0['if']('isEmpty','ck-hidden',_0x1768d6=>!_0x1768d6)]},'children':[{'text':Et(_0x44fa7d,'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 _0xd60d4e of this['_annotationViews'])this['focusTracker']['add'](_0xd60d4e['element']);this['_annotationViews']['on']('change',(_0x241482,{added:_0x1cdc77,removed:_0xd186db})=>{for(const _0x3da738 of _0x1cdc77)this['focusTracker']['add'](_0x3da738['element']);for(const _0x3c9c0d of _0xd186db)this['focusTracker']['remove'](_0x3c9c0d['element']);});}},Di=class extends _0xdeb873{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[oi,ti];}constructor(_0x454b61){super(_0x454b61),this['archivedThreads']=new _0xf9e025();}init(){const _0x575327=this['context'],_0xaffee0=_0x575327['plugins']['get'](oi),_0xa6d4f=_0x575327['plugins']['get'](ti);this['listenTo'](_0xaffee0,'addCommentThread',(_0x5916fd,{threadId:_0x3a590f})=>{const _0x207cea=_0xaffee0['getCommentThread'](_0x3a590f);_0x207cea['archivedAt']&&this['archivedThreads']['add'](_0x207cea,this['_calculatePosition'](_0x207cea['archivedAt'])),this['listenTo'](_0x207cea,'change:archivedAt',(_0x41f053,_0x8be41a,_0xf92370)=>{_0xf92370?this['archivedThreads']['has'](_0x207cea)||this['archivedThreads']['add'](_0x207cea,this['_calculatePosition'](_0x207cea['archivedAt'])):this['archivedThreads']['has'](_0x207cea)&&this['archivedThreads']['remove'](_0x207cea);});}),this['listenTo'](_0xaffee0,'removeCommentThread',(_0x366a4f,{threadId:_0x678e57})=>{const _0x43d7bf=_0xaffee0['getCommentThread'](_0x678e57);this['stopListening'](_0x43d7bf),this['archivedThreads']['has'](_0x43d7bf)&&this['archivedThreads']['remove'](_0x43d7bf);},{'priority':'highest'}),this['listenTo'](_0xa6d4f['collection'],'focus',(_0x452f67,_0x1dc982)=>{_0x1dc982['isVisible']||(_0x1dc982['isActive']=!0x0,_0xa6d4f['activate'](_0x1dc982));});}_calculatePosition(_0x7b30f4){const _0x52dfcf=[...this['archivedThreads']]['findIndex'](_0x2fcdfe=>_0x2fcdfe['archivedAt']<_0x7b30f4);return _0x52dfcf>-0x1?_0x52dfcf:this['archivedThreads']['length'];}},Vi=class extends _0x5e7fa9{commentsArchiveView;annotationViews;['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Di,_0x5f5b49];}constructor(_0x540dbb){super(_0x540dbb),this['annotationViews']=new at(),this['_pendingThreads']=[];}init(){const _0x1f92a0=this['editor'],_0x4e8b2c=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x1f92a0['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x3d0035,!0x0)),_0x1f92a0['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x53f5d6=this['_createCommentsArchiveButton'](rt);return _0x53f5d6['set']({'role':'menuitemcheckbox'}),_0x53f5d6;});const _0x579496=_0x1f92a0['plugins']['get'](Di),_0x3988df=_0x1f92a0['plugins']['get']('Annotations'),_0x260e73=_0x1f92a0['plugins']['get']('CommentsRepository');_0x579496['archivedThreads']['forEach'](_0xdc09de=>{this['_handleNewThread'](_0xdc09de);}),this['listenTo'](_0x579496['archivedThreads'],'add',(_0x4922ea,_0x32c26e)=>{this['_handleNewThread'](_0x32c26e);}),this['listenTo'](_0x3988df['collection'],'add',(_0x63dbc3,_0x2a1bd0)=>{const _0x3f4cce=this['_pendingThreads']['find'](_0x7a522f=>{const _0x462b24=_0x260e73['_threadToController']['get'](_0x7a522f);return _0x462b24&&_0x2a1bd0['innerView']===_0x462b24['view'];});if(_0x3f4cce){const _0x31fc97=this['_calculatePosition'](_0x3f4cce['archivedAt']);this['_addAnnotationToArchive'](_0x2a1bd0,_0x31fc97),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x3f4cce),0x1);}}),this['listenTo'](_0x579496['archivedThreads'],'remove',(_0x5170b5,_0x196447)=>{const _0x1797a2=_0x1f92a0['config']['get']('collaboration.channelId');if(!_0x1797a2||_0x196447['channelId']===_0x1797a2){if(this['_pendingThreads']['includes'](_0x196447))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x196447),0x1);else{const _0x1a87a2=_0x260e73['_threadToController']['get'](_0x196447),_0xce888e=_0x3988df['getByInnerView'](_0x1a87a2['view']);this['annotationViews']['remove'](_0xce888e['view']),this['stopListening'](_0xce888e),this['stopListening'](_0xce888e['focusableElements']);}}}),this['listenTo'](_0x3988df['collection'],'add',(_0x31896e,_0xee5354)=>{this['listenTo'](_0xee5354,'escape',_0x4e8b2c);}),this['listenTo'](_0x3988df['collection'],'remove',(_0x3d86bb,_0x5790c4)=>{this['stopListening'](_0x5790c4,'escape',_0x4e8b2c);});}_addAnnotationToArchive(_0x3cad98,_0x3a676f){this['listenTo'](_0x3cad98,'set:isVisible',_0x54bad3=>{_0x54bad3['return']=!0x1,_0x54bad3['stop']();}),this['annotationViews']['add'](_0x3cad98['view'],_0x3a676f);}['_handleNewThread'](_0x1c403a){const _0x4cb7f5=this['editor']['plugins']['get']('CommentsRepository'),_0x542a7c=this['editor']['plugins']['get']('Annotations'),_0xea90b6=this['editor']['config']['get']('collaboration.channelId');if(!_0xea90b6||_0x1c403a['channelId']===_0xea90b6){const _0x11b4ba=_0x4cb7f5['_threadToController']['get'](_0x1c403a);if(!_0x11b4ba)return void this['_pendingThreads']['push'](_0x1c403a);const _0x59822e=this['_calculatePosition'](_0x1c403a['archivedAt']),_0xdbe674=_0x542a7c['getByInnerView'](_0x11b4ba['view']);_0xdbe674['isVisible']&&_0x542a7c['_visibleAnnotations']['remove'](_0xdbe674),this['_addAnnotationToArchive'](_0xdbe674,_0x59822e);}}_calculatePosition(_0x2b04e9){const _0x29b968=this['editor']['config']['get']('collaboration.channelId'),_0x178fe4=[...this['editor']['plugins']['get'](Di)['archivedThreads']]['filter'](_0x1f8504=>_0x1f8504['channelId']===_0x29b968)['findIndex'](_0x1dd883=>_0x1dd883['archivedAt']<_0x2b04e9);return _0x178fe4<0x0||_0x178fe4>this['annotationViews']['length']?this['annotationViews']['length']:_0x178fe4-0x1;}_toggleDialog(){const _0x22caaf=this['editor'],_0x39040c=_0x22caaf['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Li(_0x22caaf['locale'],this['annotationViews'])),'commentsArchive'===_0x39040c['id']?_0x39040c['hide']():_0x39040c['show']({'id':'commentsArchive','title':Et(_0x22caaf['locale'],'COMMENTS_ARCHIVE'),'icon':_0x3cd58f,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0xdf8d97['EDITOR_TOP_SIDE']});}_createCommentsArchiveButton(_0x17385a,_0x111bdb=!0x1){const _0x3b51c6=this['editor']['locale'],_0x228fb2=this['editor']['plugins']['get']('Dialog'),_0x4b28fd=new _0x17385a(_0x3b51c6);return _0x4b28fd['bind']('isEnabled')['to'](this,'isEnabled'),_0x4b28fd['bind']('isOn')['to'](_0x228fb2,'id',_0x21df41=>'commentsArchive'===_0x21df41),_0x4b28fd['set']({'label':Et(_0x3b51c6,'COMMENTS_ARCHIVE'),'icon':_0x3cd58f,'isToggleable':!0x0}),_0x111bdb&&(_0x4b28fd['tooltip']=!0x0),this['listenTo'](_0x4b28fd,'execute',()=>this['_toggleDialog']()),_0x4b28fd;}_hideDialogOnAnnotationEscape=_0x2b040b=>{const _0x27d74c=_0x2b040b['source'];if(!this['annotationViews']['has'](_0x27d74c['view']))return;const _0x4efbce=this['editor']['plugins']['get']('Dialog');_0x4efbce['isOpen']&&'commentsArchive'===_0x4efbce['id']&&(_0x4efbce['hide'](),_0x2b040b['stop']());};},Bi=class extends _0x5e7fa9{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 _0x412ddc,Context as _0x5dcde4,ContextPlugin as _0x333ed9,Editor as _0x25e8b1,PendingActions as _0x2e4006,Plugin as _0x3de2ea}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x50ddc5,Collection as _0x549ed4,DomEmitterMixin as _0x3be4b8,FocusTracker as _0x1d3923,KeystrokeHandler as _0x172e53,ObservableMixin as _0x178707,Rect as _0x2a80a4,diff as _0x218ca2,first as _0x9c8dae,getEnvKeystrokeText as _0x2a76af,keyCodes as _0x30127a,priorities as _0xd25c7d,scrollViewportToShowTarget as _0x47daa2,toUnit as _0x3e4b52,uid as _0x5c5379}from'@ckeditor/ckeditor5-utils';import{AriaDescriptionView as _0x4f8e71,ConfirmMixin as _0x451317,FOCUS_ANNOTATION_KEYSTROKE as _0x2f9b22,LateFocusButtonView as _0x18b828,LateFocusDropdownButtonView as _0x2ec44f,UserView as _0x9b3755,Users as _0x1b2b4f,getAllMarkersDomElementsSorted as _0x3d1e87,getDateTimeFormatter as _0x474445,hashObject as _0x544dfc,setupThreadKeyboardNavigation as _0xb2f554,surroundingMarkersDetector as _0x18a7fa,trimHtml as _0x6448ca}from'@ckeditor/ckeditor5-collaboration-core';import{cloneDeep as _0x267281,debounce as _0x174c5f,isEqual as _0x19f69e,set as _0x5a9c0d,throttle as _0x8dd7ca,unset as _0x43de5a}from'es-toolkit/compat';import{IconAddComment as _0x5e7948,IconCheck as _0x259a04,IconCommentsArchive as _0x48d9e2,IconPencil as _0x3bdce3,IconRemoveComment as _0x22bfcd,IconThreeVerticalDots as _0x13dae8,IconUndo as _0xe2fb2d}from'@ckeditor/ckeditor5-icons';import{BalloonPanelView as _0x44b29b,BodyCollection as _0x3958e2,ButtonView as _0x126747,ContextualBalloon as _0x853866,Dialog as _0x21ea5c,DialogViewPosition as _0x184e59,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
+ _0x178707();var bt=class extends It{['model'];['view'];constructor(_0x53213e,_0xf478bd){super(),this['model']=_0x53213e,this['model']['_isAttached']=!0x0,this['view']=_0xf478bd,this['listenTo'](_0xf478bd,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0xf478bd,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0xf478bd,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0xf478bd,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0xf478bd,'addComment',(_0x4a1584,_0x572ee5)=>this['addComment'](_0x572ee5)),this['listenTo'](_0xf478bd,'updateComment',(_0x30bca9,_0x4ae40b,_0x223350)=>this['updateComment'](_0x4ae40b,_0x223350)),this['listenTo'](_0xf478bd,'removeComment',(_0x5b9aec,_0xcbf180)=>this['removeComment'](_0xcbf180));}submit(){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}addComment(_0x95a59c){this['model']['addComment']({'content':_0x95a59c,'authorId':this['view']['_localUser']['id']});}updateComment(_0x5bd9f7,_0xde99ef){this['model']['getComment'](_0x5bd9f7)['update']({'content':_0xde99ef});}removeComment(_0x3303dc){this['model']['getComment'](_0x3303dc)['remove']();}destroy(){this['stopListening'](),this['model']['_isAttached']=!0x1;}};function Et(_0x5344df,_0x31357c,_0x115921){const t=_0x5344df['t'];switch(_0x31357c){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'},_0x115921);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'},_0x115921);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'},_0x115921);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'},_0x115921);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x115921);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'},_0x115921);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'},_0x115921);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'},_0x115921);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(_0xbcf8ea,_0x2250fd){super(_0xbcf8ea);const _0x9c328f=_0x5c5379();this['main']=this['createCollection'](),this['editable']=new st(_0xbcf8ea,_0x2250fd,void 0x0,{'label':()=>Et(_0xbcf8ea,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0xbcf8ea['uiLanguageDirection'],'lang':_0xbcf8ea['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x9c328f},'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(_0xa15324){super(_0xa15324),this['view']=new kt(_0xa15324['locale'],_0xa15324['editing']['view']);}get element(){return this['view']['element'];}init(){const _0xd3183a=this['editor']['editing']['view'],_0x26f244=this['view']['editable'];_0x26f244['name']=_0xd3183a['document']['getRoot']()['rootName'],this['view']['render']();const _0x1cd5b8=_0x26f244['element'];this['setEditableElement'](_0x26f244['name'],_0x1cd5b8),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0xd3183a['attachDomRoot'](_0x1cd5b8),this['fire']('ready');}destroy(){super['destroy'](),this['view']['destroy']();}};const Ot=[ft,gt,_t,At,vt,yt,Tt],Mt=/* #__PURE__ -- @preserve */
25
+ _0x178707(_0x25e8b1);var Rt=class CommentEditor extends Mt{static defaultPlugins=/* #__PURE__ -- @preserve */
26
+ ((()=>Ot)());constructor(_0x356985={}){(_0x356985=Object['assign']({},_0x356985))['plugins']||(_0x356985['plugins']=CommentEditor['defaultPlugins']),super(_0x356985),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 _0x43dbfb=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x43dbfb))['then'](()=>this['fire']('ready'));}destroy(){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x5f2a30=>{const _0x24fc5f=this['model']['document']['getRoot'](),_0x3d4e63=_0x24fc5f&&_0x24fc5f['getChild'](_0x24fc5f['childCount']-0x1);_0x5f2a30['setSelection'](_0x3d4e63,'end'),this['editing']['view']['focus']();});}_updatePlaceholder(){const _0x3e3eb6=this['editing']['view'],_0x547e0f=_0x3e3eb6['document']['getRoot'](),_0x9e7b46=_0x547e0f['getChild'](0x0);_0x547e0f['childCount']>0x1||!_0x9e7b46||'p'!=_0x9e7b46['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x3e3eb6,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x9e7b46['placeholder']=this['placeholder']),ut({'view':_0x3e3eb6,'element':_0x9e7b46,'keepOnFocus':!0x0}),this['placeholderElement']=_0x9e7b46);}},St=class extends ht{keystrokes;['focusTracker'];['focusables'];['focusCycler'];submitButtonView;cancelButtonView;_editorConfig;constructor(_0x33f204,_0x188ff0={}){super(_0x33f204),this['editor']=null,this['_editorConfig']=_0x188ff0,this['set']('value',_0x188ff0['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',Et(_0x33f204,'Reply...')),this['set']('submitLabel',Et(_0x33f204,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x172e53(),this['focusTracker']=new _0x1d3923(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x34c860=>!_0x34c860['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',(_0xf5bd9d,_0x22538f)=>{this['cancelButtonView']['fire']('execute'),_0x22538f();}),this['keystrokes']['set']('Ctrl+Enter',(_0x43c8dd,_0x1d8a91)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x1d8a91());}),this['on']('submit',(_0x4aade7,_0x319f76)=>{_0x319f76['length']>0xfde8?(alert(Et(_0x33f204,'TOO_LONG_COMMENT_ALERT',[_0x319f76['length'],0xfde8])),_0x4aade7['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 _0x3f3c9e=this['editor'];this['element']['insertBefore'](_0x3f3c9e['ui']['element'],this['element']['firstChild']),_0x3f3c9e['model']['document']['on']('change',()=>this['value']=_0x3f3c9e['getData']()),_0x3f3c9e['bind']('placeholder')['to'](this),this['focusables']['add'](_0x3f3c9e['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x482de8){-0x1===_0x482de8?(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:_0x3dac26}=this,_0x3c931f=new _0x126747(_0x3dac26);return _0x3c931f['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x3c931f['withText']=!0x0,_0x3c931f['bind']('label')['to'](this,'submitLabel'),_0x3c931f['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x3c931f['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x40c8ad,_0x541ae1)=>!_0x541ae1&&!!_0x40c8ad['trim']()),_0x3c931f;}_createCancelButton(){const {locale:_0x2063a5}=this,_0x4dd230=new _0x126747(_0x2063a5);return _0x4dd230['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x4dd230['label']=Et(_0x2063a5,'Cancel'),_0x4dd230['withText']=!0x0,_0x4dd230['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x4dd230;}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x329a44=>{this['focusTracker']['add'](_0x329a44['element']);}),this['focusables']['on']('change',(_0x5e1a05,_0x277aa5)=>{for(const _0x76ddfa of Array['from'](_0x277aa5['added'])['reverse']())this['focusTracker']['add'](_0x76ddfa['element']);});}},xt=class extends ht{constructor(_0x1c2c6e,_0x23a6f4,_0x3aff5e){super(_0x1c2c6e),this['commentInputView']=new St(_0x1c2c6e,_0x3aff5e),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x8fd226,_0xc7af1)=>_0x8fd226||!!_0xc7af1),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 _0x9b3755(_0x1c2c6e,_0x23a6f4),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'](_0x39ae98){this['commentInputView']['focus'](_0x39ae98);}_focusOnNonInteractiveMouseDown(){this['listenTo'](this['element'],'mousedown',(_0x23cbf4,_0x5ebe06)=>{const {submitButtonView:_0x1ca7c5,cancelButtonView:_0x20e305,editor:_0x153901}=this['commentInputView'];[_0x1ca7c5['element'],_0x20e305['element'],_0x153901?_0x153901['editing']['view']['getDomRoot']():null]['filter'](_0x188241=>_0x188241)['some'](_0xe5433c=>_0xe5433c['contains'](_0x5ebe06['target']))||(this['focus'](),_0x5ebe06['preventDefault']());});}},Pt=class extends ht{constructor(_0x256935){super(_0x256935);const _0x6adb78=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x6adb78['to']('count',_0x597af5=>Et(_0x256935,'NUMBER_OF_COMMENTS',_0x597af5))}]});}},Lt=class extends ht{commentViews;resolvedCommentView;['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];_collapsedCommentsView;constructor(_0x1e4668,_0x173914,_0x352714){super(_0x1e4668);const _0x88c700=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x173914['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x173914,this['_config']=_0x352714,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x1d3923(),this['keystrokes']=new _0x172e53(),this['focusCycler']=new et({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2e893e=>this['commentViews']['map'](_0x3f0df6=>_0x3f0df6['element'])['includes'](_0x2e893e['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Pt(_0x1e4668),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0xc08318=>_0xc08318-this['_config']['maxCommentsWhenCollapsed']);for(const _0x5d563d of _0x173914['comments'])this['_handleNewCommentModel'](_0x5d563d);this['_handleInfoComment'](),this['listenTo'](_0x173914['comments'],'add',(_0x4299f1,_0x57e942)=>{const _0x4b1488=this['_calculatePosition'](_0x57e942);this['length']++,this['_handleNewCommentModel'](_0x57e942,_0x4b1488),this['refreshVisibleViews']();}),this['listenTo'](_0x173914['comments'],'remove',(_0x3a4eeb,_0x20a74f)=>{this['length']--,this['_handleRemoveCommentModel'](_0x20a74f),this['refreshVisibleViews']();}),this['listenTo'](_0x173914,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x173914,'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',_0x88c700['if']('length','ck-hidden',_0x5e71c0=>!_0x5e71c0)],'aria-label':Et(_0x1e4668,'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'](_0x3824d7){-0x1===_0x3824d7?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}destroy(){this['_collapsedCommentsView']['destroy']();for(const _0x46ba31 of this['commentViews'])_0x46ba31['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}_handleNewCommentModel(_0x3c9c05,_0x3f2222){const _0xfd57eb=new this['_config']['CommentView'](this['locale'],_0x3c9c05,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0xfd57eb['viewUid']=_0x3c9c05['id'],_0xfd57eb['delegate']('removeComment')['to'](this),_0xfd57eb['delegate']('updateComment')['to'](this),_0xfd57eb['delegate']('resolveCommentThread')['to'](this),_0xfd57eb['delegate']('editorReady')['to'](this),_0xfd57eb['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0xfd57eb,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0xfd57eb,_0x3f2222);}_calculatePosition(_0x5cf3eb){const _0x5cf76e=this['_model']['_findOptimalIndex'](_0x5cf3eb);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x5cf3eb['authoredAt']?_0x5cf76e-0x1:_0x5cf76e:_0x5cf76e-0x1;}_handleInfoComment(){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x5abc7d={'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'],_0x5abc7d,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x5abc7d));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}_handleRemoveCommentModel(_0x5ade3b){const _0x5067b2=this['commentViews']['remove'](_0x5ade3b['id']);this['stopListening'](_0x5067b2),_0x5067b2['isEditMode']&&this['_updateHasDirtyComment'](),_0x5067b2['destroy']();}_updateHasDirtyComment(){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x3f9b3c=>_0x3f9b3c['isEditMode']);}['_rearrangeCollapse'](){const _0x507969=function(_0x5f350b){const _0xdedd0b=new _0x549ed4();for(const _0x510980 of _0x5f350b)_0xdedd0b['add'](_0x510980);return _0xdedd0b;}(this['commentViews']),_0x29ef9f=this['_collapsedCommentsView']['count'];for(let _0x43c7a5=0x1;_0x43c7a5<=_0x29ef9f;_0x43c7a5++)_0x507969['remove'](0x1);for(const _0x95c280 of _0x507969)_0x95c280['collapse']();_0x29ef9f>0x0&&_0x507969['add'](this['_collapsedCommentsView'],0x1),Dt(_0x218ca2(Array['from'](this['visibleViews']),Array['from'](_0x507969)),this['visibleViews'],_0x507969);}['_rearrangeExpand'](){Dt(_0x218ca2(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x19e8d8 of this['visibleViews'])_0x19e8d8['expand']();}_setupKeyboardNavigation(){this['commentViews']['forEach'](_0x33eccb=>{this['focusTracker']['add'](_0x33eccb['element']),this['keystrokes']['listenTo'](_0x33eccb['element']);}),this['commentViews']['on']('change',(_0x2181d9,_0x565e99)=>{for(const _0x956161 of _0x565e99['removed'])this['focusTracker']['remove'](_0x956161['element']),this['keystrokes']['stopListening'](_0x956161['element']);for(const _0x5a58cf of Array['from'](_0x565e99['added'])['reverse']())this['focusTracker']['add'](_0x5a58cf['element']),this['keystrokes']['listenTo'](_0x5a58cf['element']);});}};function Dt(_0x56acfd,_0x312f6,_0x2fe5e5){let _0x5e930b=0x0;for(const _0x37591f of _0x56acfd)switch(_0x37591f){case'insert':_0x312f6['add'](_0x2fe5e5['get'](_0x5e930b),_0x5e930b),_0x5e930b++;break;case'delete':_0x312f6['remove'](_0x5e930b);break;case'equal':_0x5e930b++;}}var Vt=class extends ht{constructor(_0x2ef141){super(_0x2ef141);const _0xba792f=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0xba792f['to']('contextValue',_0x5cbd02=>Et(_0x2ef141,'THREAD_CONTEXT_LABEL',_0x5cbd02)),'tabindex':-0x1},'children':[{'text':_0xba792f['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Bt=class extends ht{['_model'];reopenButtonView;contextView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x5f2482,_0x3905fc){super(_0x5f2482);const _0x1ab844=this['bindTemplate'];this['_model']=_0x3905fc,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x1d3923(),this['keystrokes']=new _0x172e53(),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',_0x4353e9=>!!_0x4353e9),this['bind']('contextValue')['to'](this['_model'],'context',_0x5fc783=>_0x5fc783&&_0x5fc783['value']?this['_trimContextValue'](_0x5fc783['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',_0x1ab844['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 _0x3a4ca1=new _0x126747(this['locale']);return _0x3a4ca1['label']=Et(this['locale'],'Reopen'),_0x3a4ca1['tooltip']=Et(this['locale'],'Reopen'),_0x3a4ca1['icon']=_0xe2fb2d,_0x3a4ca1['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x27c427=>!_0x27c427),_0x3a4ca1['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x1c268e,_0x470c39)=>_0x1c268e&&_0x470c39),_0x3a4ca1['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x3a4ca1;}_trimContextValue(_0x463622){if(_0x463622['length']<0x96)return _0x463622;const _0x5f214d=_0x463622['lastIndexOf']('\x20',0x93);return _0x463622['substring'](0x0,_0x5f214d>-0x1?_0x5f214d:0x93)+'...';}_attachContextActions(){const _0x1b2248=this['element']['querySelector']('.ck-context'),_0x247139=_0x1b2248['querySelector']('.ck-context__value');this['listenTo'](_0x1b2248,'mouseenter',()=>{_0x247139['offsetWidth']<_0x247139['scrollWidth']&&_0x1b2248['classList']['add']('overlay');}),this['listenTo'](_0x1b2248,'mouseleave',()=>{_0x1b2248['classList']['remove']('overlay');});}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']);for(const _0x22a63f of this['focusables'])this['focusTracker']['add'](_0x22a63f['element']),this['keystrokes']['listenTo'](_0x22a63f['element']);}_createContextView(){const _0x4ad32f=new Vt(this['locale']);return _0x4ad32f['bind']('contextValue')['to'](this),_0x4ad32f;}},Ht=class extends ht{['_model'];['_config'];commentThreadHeaderView;commentThreadInputView;ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x184eb2,_0x2c94a1,_0x1ac87b,_0x2598f6){super(_0x184eb2),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x2c94a1,this['_localUser']=_0x1ac87b,this['_config']=_0x2598f6,this['commentThreadHeaderView']=new Bt(_0x184eb2,_0x2c94a1),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x4f8e71(_0x184eb2,Et(_0x184eb2,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Lt(_0x184eb2,_0x2c94a1,Object['assign']({'CommentView':this['_config']['CommentView']},_0x2598f6)),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',(_0x51ba01,_0x73bfd1)=>_0x51ba01||!!_0x73bfd1),this['bind']('isUnlinked')['to'](_0x2c94a1,'unlinkedAt',_0x25b4b8=>!!_0x25b4b8);let _0xfc522c=null;const _0x4a4c9b=()=>{const _0x3ba14e=this['_model']['comments']['first']||null;_0x3ba14e!==_0xfc522c&&(_0xfc522c&&this['stopListening'](_0xfc522c,'change:content'),_0xfc522c=_0x3ba14e,_0x3ba14e&&this['listenTo'](_0x3ba14e,'change:content',_0x4a4c9b));const _0x4cc381=_0x3ba14e?_0x3ba14e['author']['name']:this['_localUser']['name'],_0x59b2b6=_0x3ba14e?new DOMParser()['parseFromString'](_0x6448ca(_0x3ba14e['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']}),'text/html')['body']['textContent']:'',_0x12a7a9=Et(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x4cc381]);this['set']('ariaLabel',_0x59b2b6?_0x12a7a9+'\x20'+_0x59b2b6:_0x12a7a9);};this['listenTo'](this['_model']['comments'],'change',_0x4a4c9b),_0x4a4c9b(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x1d3923(),this['keystrokes']=new _0x172e53(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xfdf1a8=>_0xfdf1a8['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0xb2f554(this,this['focusables']);}async destroy(){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}_createCommentThreadInputView(){const _0x55694f=new xt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x549e86=_0x55694f['commentInputView'];return _0x55694f['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x549e86,'value',(_0x56b504,_0x42cb19,_0x4944ae,_0x3b643e,_0x7cc841)=>!!_0x7cc841||!!_0x3b643e&&_0x4944ae&&!_0x42cb19||_0x56b504&&_0x4944ae&&!_0x42cb19),_0x549e86['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x745be6,_0x242709,_0x46a585)=>{let _0x5330b9;return _0x5330b9=_0x46a585&&_0x242709?'Reply\x20to\x20reopen\x20discussion...':_0x745be6?'Reply...':'Write\x20a\x20comment...',Et(this['locale'],_0x5330b9);}),_0x549e86['bind']('submitLabel')['to'](this,'length',_0xe37e56=>Et(this['locale'],_0xe37e56?'Reply':'Comment')),_0x549e86['on']('submit',(_0x6d6823,_0x7d2392)=>{this['fire']('addComment',_0x7d2392),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x549e86['on']('cancel',()=>{this['focus']();}),_0x549e86['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x549e86['on']('cancel',_0x45a005=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x45a005['stop']());}),this['on']('change:isActive',(_0x40b907,_0xdcf872,_0x36f100)=>{_0x36f100||this['length']||_0x549e86['value']||this['fire']('removeCommentThread');}),_0x55694f;}};const Ft=/* #__PURE__ -- @preserve */
27
+ _0x451317(Ht);var Ut=class extends Ft{commentThreadChildren;containerElement;resolveButton;_boundFirstCommentView;constructor(_0x49afac,_0xd980be,_0x4a4f59,_0x55e05d){super(_0x49afac,_0xd980be,_0x4a4f59,_0x55e05d),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x49afac,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x2eec21,_0x33f3aa,_0x556433)=>{_0x556433||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x584e43,_0x472a6a,_0x3e6390)=>{_0x3e6390&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}getTemplate(){const _0x438458=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x438458['if']('isActive','ck-thread--active'),_0x438458['if']('isUnlinked','ck-thread--unlinked'),_0x438458['to']('actionIndicator',_0x9f337a=>_0x9f337a?'ck-thread--'+_0x9f337a:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x438458['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 _0x16dab3 of this['commentsListView']['commentViews'])_0x16dab3['cancelConfirm']();}_bindFirstCommentView(){const {locale:_0x5847c4}=this,_0x509075=this['commentsListView']['commentViews']['get'](0x0);_0x509075===this['_boundFirstCommentView']||_0x509075['isSystemComment']||(this['_boundFirstCommentView']=_0x509075,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x509075,'actionIndicator',_0x2b4192=>'remove'===_0x2b4192?'remove':null),_0x509075['placeholder']=Et(_0x5847c4,'Write\x20a\x20comment...'),_0x509075['removeButton']['on']('execute',_0x3387c0=>{_0x3387c0['stop'](),this['showConfirm'](Et(_0x5847c4,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x509075['focus']();}),_0x509075['actionBar']['add'](this['resolveButton'],0x0),_0x509075['focusables']['add'](this['resolveButton'],0x0));}_createResolveButton(){const _0x2a5e81=new _0x18b828(this['locale']);return _0x2a5e81['label']=Et(this['locale'],'Resolve'),_0x2a5e81['tooltip']=Et(this['locale'],'Resolve'),_0x2a5e81['icon']=_0x259a04,_0x2a5e81['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x2a5e81['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5b7707=>!_0x5b7707),_0x2a5e81['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x38d97e,_0x315b27)=>_0x38d97e&&!_0x315b27),_0x2a5e81['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x2a5e81;}_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(_0xa7e6c4){super(_0xa7e6c4),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x47c7d3,_0x2a2a91,_0x19f0c7)=>{this['element']['innerHTML']=_0x19f0c7;}),this['element']['innerHTML']=this['content'];}},Kt=class extends ht{['visibleView'];ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];constructor(_0x4923aa,_0x23a52e,_0x32daac){super(_0x4923aa),this['_model']=_0x23a52e,this['_config']=_0x32daac,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x23a52e,'content',_0x23a52e,'authoredAt',(_0x2a24aa,_0x50d8b6)=>Et(_0x4923aa,'COMMENT_ARIA_LABEL',[_0x23a52e['author']['name'],_0x32daac['formatDateTime'](_0x50d8b6),new DOMParser()['parseFromString'](_0x2a24aa,'text/html')['body']['textContent'],_0x23a52e['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x4f8e71(_0x4923aa,Et(_0x4923aa,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new at(),this['focusTracker']=new _0x1d3923(),this['keystrokes']=new _0x172e53(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2e2683=>_0x2e2683['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 _0x290d60=new Wt(this['locale']);return _0x290d60['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x1febcd,_0x2e5e83)=>_0x2e5e83?_0x6448ca(_0x1febcd,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x1febcd),_0x290d60;}_createCommentInputView(){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x22539b=new St(this['locale'],this['_config']['editorConfig']);return _0x22539b['value']=this['_model']['content'],_0x22539b['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x22539b['submitLabel']=Et(this['locale'],'Save'),_0x22539b['on']('submit',(_0x1206c3,_0x2097af)=>{this['fire']('updateComment',this['_model']['id'],_0x2097af),this['switchToDisplayMode'](),this['focus']();}),_0x22539b['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x22539b['once']('editorReady',()=>{_0x22539b['focus']();}),_0x22539b['createEditor'](),_0x22539b['delegate']('editorReady')['to'](this),_0x22539b['delegate']('editorDestroyed')['to'](this),_0x22539b;}_setupKeyboardNavigation(){const _0xa21377=this['element'];this['keystrokes']['listenTo'](_0xa21377);for(const _0x5021a6 of this['focusables'])this['focusTracker']['add'](_0x5021a6['element']),this['keystrokes']['listenTo'](_0x5021a6['element']);this['focusables']['on']('change',(_0x19e00c,_0x556c83)=>{for(const _0x42f316 of _0x556c83['removed'])this['focusTracker']['remove'](_0x42f316['element']),this['keystrokes']['stopListening'](_0x42f316['element']);for(const _0x5637f6 of _0x556c83['added'])this['focusTracker']['add'](_0x5637f6['element']),this['keystrokes']['listenTo'](_0x5637f6['element']);}),this['keystrokes']['set']('enter',(_0x16512e,_0x2c3ca0)=>{_0xa21377===_0x16512e['target']&&(this['focusCycler']['focusFirst'](),_0x2c3ca0());}),this['keystrokes']['set']('esc',(_0x3461f0,_0x501c74)=>{_0xa21377!==_0x3461f0['target']&&(this['focus'](),_0x501c74());});}};const Gt=/* #__PURE__ -- @preserve */
28
+ _0x451317(Kt);var Yt=class extends Gt{actionBar;['userView'];constructor(_0x3303c2,_0x1bada9,_0x1fc5c9){super(_0x3303c2,_0x1bada9,_0x1fc5c9),this['set']('actionIndicator',null),this['set']('placeholder',Et(_0x3303c2,'Reply...')),this['bind']('authoredAt')['to'](_0x1bada9),this['bind']('resolvedAt')['to'](_0x1bada9),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 _0x9b3755(_0x3303c2,_0x1bada9['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x1bada9,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}getTemplate(){const _0x26688f=this['bindTemplate'],_0x2aa7f1=[{'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':_0x26688f['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x26688f['to']('authoredAt',_0x55f933=>this['_config']['formatDateTime'](_0x55f933))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x26688f['if']('isEditMode','ck-comment__actions--hidden'),_0x26688f['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']&&_0x2aa7f1['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x26688f['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x26688f['if']('isEditMode','ck-comment--edit'),_0x26688f['if']('isSystemComment','ck-comment--info'),_0x26688f['to']('actionIndicator',_0x30bf6d=>_0x30bf6d?'ck-comment--'+_0x30bf6d:'')],'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':_0x2aa7f1}]}]};}_createEditButton(){const _0x8f8cfc=new _0x126747(this['locale']);return _0x8f8cfc['label']=Et(this['locale'],'Edit'),_0x8f8cfc['icon']=_0x3bdce3,_0x8f8cfc['withText']=!0x0,_0x8f8cfc['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x8f8cfc['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x41b95c=>!_0x41b95c),_0x8f8cfc['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x8f8cfc['on']('execute',()=>this['switchToEditMode']()),_0x8f8cfc;}_createRemoveButton(){const _0x37dfc4=new _0x126747(this['locale']);return _0x37dfc4['label']=Et(this['locale'],'Remove'),_0x37dfc4['icon']=_0x22bfcd,_0x37dfc4['withText']=!0x0,_0x37dfc4['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x37dfc4['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x539373=>!_0x539373),_0x37dfc4['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x37dfc4['on']('execute',()=>{this['showConfirm'](Et(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x37dfc4;}_createDropdown(){const _0x2ef3fc=ct(this['locale'],_0x2ec44f),_0xcf9445=_0x2ef3fc['panelView']['children'],_0x41f342=new ot(this['locale']),_0x2175b6=_0x2ef3fc['bindTemplate'];dt(_0x2ef3fc,()=>this['items']['find'](_0x2b18de=>_0x2b18de['isVisible'])),_0x2ef3fc['extendTemplate']({'attributes':{'class':[_0x2175b6['if']('isVisible','ck-hidden',_0x39ebba=>!_0x39ebba)]}});const _0x49a6e0=(_0x166242,_0xca0768=-0x1)=>{const _0x3e1a32=new nt(this['locale']);_0x3e1a32['children']['add'](_0x166242);const _0x106d5c=_0xca0768>-0x1?_0xca0768:_0x41f342['items']['length'];_0x41f342['items']['add'](_0x3e1a32,_0x106d5c);const _0x283ecc=Array['from'](this['items']);_0x2ef3fc['unbind']('isEnabled','isVisible'),_0x2ef3fc['bind']('isEnabled')['toMany'](_0x283ecc,'isEnabled',(..._0x55092d)=>_0x55092d['some'](_0x5c0fc1=>_0x5c0fc1)),_0x2ef3fc['bind']('isVisible')['toMany'](_0x283ecc,'isVisible',(..._0x5e946c)=>_0x5e946c['some'](_0x452750=>_0x452750));};_0x2ef3fc['panelPosition']='sw',_0x2ef3fc['buttonView']['set']({'label':Et(this['locale'],'Show\x20more\x20items'),'icon':_0x13dae8});for(const _0x4788ee of this['items'])_0x49a6e0(_0x4788ee);return _0xcf9445['add'](_0x41f342),_0x2ef3fc['listenTo'](this['items'],'add',(_0x581403,_0x18a4e2,_0x3566f0)=>{_0x49a6e0(_0x18a4e2,_0x3566f0);}),_0x2ef3fc['listenTo'](this['items'],'remove',(_0x2cab52,_0x1a4b9e,_0x4cb255)=>{_0x41f342['items']['remove'](_0x4cb255);}),_0x2ef3fc;}_attachActions(_0x50e3c6,_0x432eef){const _0x1ef164=_0x50e3c6&&_0x50e3c6['element'];_0x1ef164&&(this['listenTo'](_0x1ef164,'mouseenter',()=>this['actionIndicator']=_0x432eef),this['listenTo'](_0x1ef164,'focus',()=>this['actionIndicator']=_0x432eef),this['listenTo'](_0x1ef164,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x1ef164,'blur',()=>this['actionIndicator']=null));}_createCommentInputView(){const _0x366f1f=super['_createCommentInputView']();return _0x366f1f['bind']('placeholder')['to'](this),_0x366f1f;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}};function Xt(_0x2988de){const _0x34ad84=_0x8dd7ca(_0x2988de,0x1e),_0x21ca7b=new MutationObserver(_0x2f2f8f=>{for(const _0x7d378 of _0x2f2f8f)('attributes'==_0x7d378['type']&&'class'==_0x7d378['attributeName']||'childList'==_0x7d378['type']||'characterData'==_0x7d378['type'])&&_0x34ad84();});return{'attach'(_0x3becda){_0x21ca7b['observe'](_0x3becda,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x21ca7b['disconnect'](),_0x34ad84['cancel']();}};}var qt=class extends ht{['focusTracker'];['id'];keystrokes;content;['mainView'];_mutationObserver;constructor(_0x2fccca,_0x46a708){super(_0x2fccca),this['id']=_0x5c5379(),this['focusTracker']=new _0x1d3923(),this['keystrokes']=new _0x172e53(),this['keystrokes']['set']('Esc',(_0x560a5a,_0x4a5c74)=>this['fire']('Esc',_0x4a5c74)),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'](_0x46a708),this['mainView']=_0x46a708;const _0xc53aea=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0xc53aea['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 _0xa7560e=this['element']['clientHeight'];_0xa7560e&&(this['height']=_0xa7560e);}};const jt=/* #__PURE__ -- @preserve */
29
+ _0x178707();var $t=class Annotation extends jt{['view'];focusableElements;_type;_target;constructor({view:_0xe21ea2,target:_0x2e3324,type:_0x24c6cc,isVisible:_0x3ad57c=!0x0}){super(),this['view']=_0xe21ea2,this['view']['element']||this['view']['render'](),this['_type']=_0x24c6cc,this['_target']=_0x2e3324,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x549ed4([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x4bf70a,_0x22490b)=>{this['view']['focusTracker']['add'](_0x22490b);}),this['focusableElements']['on']('remove',(_0x150abf,_0x496bd6)=>{this['view']['focusTracker']['remove'](_0x496bd6);}),this['set']('isVisible',_0x3ad57c);}get type(){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get target(){const _0x56ecec=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x56ecec),_0x56ecec;}get targetRect(){const _0x36a1b5=this['target'];if(null===_0x36a1b5)return null;if(_0x36a1b5 instanceof _0x2a80a4)return _0x36a1b5;const _0x413818=_0x36a1b5['filter'](_0x33e439=>function(_0x4f2c56){return!!_0x4f2c56['offsetParent']||!!_0x4f2c56['getClientRects']()['item'](0x0);}(_0x33e439));return 0x0===_0x413818['length']?null:_0x2a80a4['getDomElementRects'](_0x413818[0x0])[0x0];}get isActive(){return this['view']['isActive'];}set isActive(_0x2798ae){this['view']['isActive']=_0x2798ae,this['view']['mainView']['isActive']=_0x2798ae;}updateTargetRect(){this['view']['targetRect']=this['targetRect'];}destroy(){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}refreshVisibility(){this['isVisible']=!!this['targetRect'];}static _assertCorrectTarget(_0x155d44){if(!(null===_0x155d44||_0x155d44 instanceof _0x2a80a4||Array['isArray'](_0x155d44)&&_0x155d44['every'](_0x3269cd=>zt(_0x3269cd))))throw new _0x50ddc5('annotation-invalid-target',null,{'target':_0x155d44});}_getNormalizedTarget(){const _0x181121='function'==typeof this['_target']?this['_target']():this['_target'];return zt(_0x181121)?[_0x181121]:_0x181121;}};function zt(_0x13054a){return null!==_0x13054a&&'object'==typeof _0x13054a&&'nodeType'in _0x13054a&&0x1===_0x13054a['nodeType'];}var Jt=class extends _0x549ed4{_innerViewToAnnotation;_viewToAnnotation;['_focusTracker'];constructor(_0x3343f7=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x1d3923(),this['_focusTracker']['on']('change:isFocused',(_0x1aad2b,_0x3b686f,_0x1b9f59)=>{_0x1b9f59||this['fire']('blur');});for(const _0x1a2091 of _0x3343f7)this['add'](_0x1a2091);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x1a2856){if(this['has'](_0x1a2856))throw new _0x50ddc5('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x1a2856['innerView'],_0x1a2856),this['_viewToAnnotation']['set'](_0x1a2856['view'],_0x1a2856);for(const _0x2d40d8 of _0x1a2856['focusableElements'])this['_focusTracker']['add'](_0x2d40d8);if(this['listenTo'](_0x1a2856['focusableElements'],'add',(_0x26ea0b,_0x3633e1)=>{this['_focusTracker']['add'](_0x3633e1);}),this['listenTo'](_0x1a2856['focusableElements'],'remove',(_0x3fd52c,_0x30f498)=>{this['_focusTracker']['remove'](_0x30f498);}),this['listenTo'](_0x1a2856['view']['focusTracker'],'change:isFocused',(_0x30018c,_0x21cec7,_0x3a0671)=>{_0x3a0671&&this['fire']('focus',_0x1a2856);}),_0x1a2856['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0xb8360a of this)_0xb8360a['updateTargetRect']();}const _0x4f7a6c=this['_getOrderInContent'](_0x1a2856['view']['targetRect']);return super['add'](_0x1a2856,_0x4f7a6c);}['remove'](_0x99c65){if(!this['has'](_0x99c65))throw new _0x50ddc5('annotationcollection-not-existing-item',null);this['stopListening'](_0x99c65['view']['focusTracker']),this['stopListening'](_0x99c65['focusableElements']);for(const _0x40a1e1 of _0x99c65['focusableElements'])this['_focusTracker']['remove'](_0x40a1e1);return this['_viewToAnnotation']['delete'](_0x99c65['view']),this['_innerViewToAnnotation']['delete'](_0x99c65['innerView']),super['remove'](_0x99c65);}getByInnerView(_0x1fa28f){return this['_innerViewToAnnotation']['get'](_0x1fa28f);}getByView(_0x17f56e){return this['_viewToAnnotation']['get'](_0x17f56e);}destroy(){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}refreshPositioning(){for(const _0x2a9494 of this)_0x2a9494['updateTargetRect']();this['_sort']();}_sort(){const _0x1c24a5=Array['from'](this)['sort']((_0xdc59fc,_0x1c4902)=>Zt(_0xdc59fc['view']['targetRect'],_0x1c4902['view']['targetRect']));for(let _0x4e24f7=_0x1c24a5['length']-0x1;_0x4e24f7>0x0;_0x4e24f7--){const _0x4e9b9a=_0x1c24a5[_0x4e24f7];_0x4e24f7!==this['getIndex'](_0x4e9b9a)&&(this['remove'](_0x4e9b9a),this['add'](_0x4e9b9a));}}_getOrderInContent(_0x123bc5){let _0x4af7d0=0x0;if(!_0x123bc5)return this['length'];for(const _0x1cef7d of this){const _0x3beb19=_0x1cef7d['view']['targetRect'];if(_0x3beb19){if(Zt(_0x123bc5,_0x3beb19)<0x0)return _0x4af7d0;_0x4af7d0++;}}return _0x4af7d0;}_areCachedRectsStale(){const _0x2e8358=this['get'](0x0);if(!_0x2e8358)return!0x1;const _0xf677bc=_0x2e8358['view']['targetRect'],_0xdeeb2d=_0x2e8358['targetRect'];return!(!_0xf677bc||!_0xdeeb2d)&&(_0xf677bc['top']!==_0xdeeb2d['top']||_0xf677bc['left']!==_0xdeeb2d['left']);}};function Qt({source:_0x5946ea,target:_0x10bd17,filter:_0x969937}){for(const _0x1b2370 of _0x5946ea)_0x969937(_0x1b2370)&&_0x10bd17['add'](_0x1b2370);_0x10bd17['listenTo'](_0x5946ea,'add',(_0x506ac7,_0x7ff957)=>{_0x969937(_0x7ff957)&&_0x10bd17['add'](_0x7ff957);}),_0x10bd17['listenTo'](_0x5946ea,'remove',(_0x534887,_0x1bf6b4)=>{_0x10bd17['has'](_0x1bf6b4)&&_0x10bd17['remove'](_0x1bf6b4);});}function Zt(_0x3358e7,_0x421ef7){if(null===_0x3358e7&&null===_0x421ef7)return 0x0;if(null===_0x3358e7)return-0x1;if(null===_0x421ef7)return 0x1;const _0x3bb544=_0x3358e7['top']-_0x421ef7['top'];return 0x0==_0x3bb544?_0x3358e7['left']-_0x421ef7['left']:_0x3bb544;}var ti=class extends _0x333ed9{collection;_visibleAnnotations;static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x276be1){if(super(_0x276be1),this['collection']=new Jt(),this['_visibleAnnotations']=new Jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x276be1 instanceof _0x25e8b1){const _0xa4d801=_0x276be1['locale'];_0x276be1['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':Et(_0xa4d801,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':Et(_0xa4d801,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':Et(_0xa4d801,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':Et(_0xa4d801,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':Et(_0xa4d801,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':Et(_0xa4d801,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':Et(_0xa4d801,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x1c877b){this['collection']['add'](_0x1c877b);}['remove'](_0x175916){this['collection']['remove'](_0x175916),_0x175916['destroy']();}refreshVisibility(){for(const _0x4b0bf2 of this['collection'])_0x4b0bf2['refreshVisibility']();}refreshPositioning(){this['_visibleAnnotations']['refreshPositioning']();}getByInnerView(_0x5df193){return this['collection']['getByInnerView'](_0x5df193);}deactivateAll(){this['fire']('_deactivateAllAnnotations');}destroy(){for(const _0x37cf28 of this['collection'])_0x37cf28['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}activate(_0x1c86e4){this['fire']('_activateAnnotation',_0x1c86e4);}createAnnotation(_0x5c1cd1){return new $t(_0x5c1cd1);}createAnnotationView(_0x9704a3,_0x3752a3){return new qt(_0x9704a3,_0x3752a3);}_addActiveAnnotation(_0x4b1834){const _0x400e75=new Set(this['activeAnnotations']);_0x400e75['add'](_0x4b1834),this['activeAnnotations']=_0x400e75;}_removeActiveAnnotation(_0x2f91cc){const _0xa9278=new Set(this['activeAnnotations']);_0xa9278['delete'](_0x2f91cc),this['activeAnnotations']=_0xa9278;}_bindAnnotationsToVisibleAnnotations(){const _0x4863e1=this['collection'],_0x191cd3=this['_visibleAnnotations'];function _0x51bee4(_0x3634c2){const _0x2eb306=_0x3634c2['source'];_0x2eb306['isVisible']&&!_0x191cd3['has'](_0x2eb306)?_0x191cd3['add'](_0x2eb306):!_0x2eb306['isVisible']&&_0x191cd3['has'](_0x2eb306)&&_0x191cd3['remove'](_0x2eb306),_0x2eb306['view']['focusTracker']['remove'](_0x2eb306['view']['element']),_0x2eb306['view']['focusTracker']['add'](_0x2eb306['view']['element']);}this['listenTo'](_0x4863e1,'add',(_0x1afe04,_0x5d17ce)=>{_0x5d17ce['isVisible']&&_0x191cd3['add'](_0x5d17ce),this['listenTo'](_0x5d17ce,'change:isVisible',_0x51bee4);}),this['listenTo'](_0x4863e1,'remove',(_0x131c4f,_0x4cbcd6)=>{_0x191cd3['has'](_0x4cbcd6)&&_0x191cd3['remove'](_0x4cbcd6),this['stopListening'](_0x4cbcd6,'change:isVisible',_0x51bee4);});}_setupEnterAnnotationKeystroke(){const _0x521318=_0x5f3488=>{_0x5f3488['on']('ready',()=>{_0x5f3488['keystrokes']['set'](_0x2f9b22,(_0x1dc778,_0x384e27)=>{const _0x19c88f=_0x9c8dae(this['activeAnnotations']['values']());_0x19c88f&&(_0x19c88f['view']['focus'](),_0x384e27());});});};this['context']instanceof _0x25e8b1?_0x521318(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x1db447,_0x4018d7)=>{_0x521318(_0x4018d7);});}_setupEscapeAnnotationHandling(){const _0x6130de=_0xcd08ed=>{const _0x2a13ef=_0xcd08ed['source'],_0x31d84d=[];let _0x5cd020;if(Array['isArray'](_0x2a13ef['target'])){_0x5cd020=_0x2a13ef['target'][0x0],this['context']instanceof _0x25e8b1?_0x31d84d['push'](this['context']):this['context']['editors']&&_0x31d84d['push'](...this['context']['editors']);for(const _0x724c61 of _0x31d84d)for(const _0x5be50d of _0x724c61['editing']['view']['domRoots']['values']())if(_0x5be50d['contains'](_0x5cd020))return void _0x724c61['editing']['view']['focus']();_0x5cd020['focus']();}};this['listenTo'](this['collection'],'add',(_0x3fa929,_0x2c3296)=>{this['listenTo'](_0x2c3296,'escape',_0x6130de,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x10690c,_0x2bfe83)=>{this['stopListening'](_0x2bfe83,'escape',_0x6130de);});}};const ii=Symbol('noChannel'),ei={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},si=/* #__PURE__ -- @preserve */
30
+ _0x178707(),ni=/* #__PURE__ -- @preserve */
31
+ _0x178707();var oi=class extends _0x333ed9{_threads;_threadToController;_viewToController;static get requires(){return[ti,_0x2e4006,_0x1b2b4f];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x33642){super(_0x33642),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x512b84=this['context']['config'];_0x512b84['define']('comments.maxCommentsWhenCollapsed',0x2),_0x512b84['define']('comments.maxThreadTotalWeight',0x1f4),_0x512b84['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x512b84['define']('comments.CommentThreadView',Ut),_0x512b84['define']('comments.CommentView',Yt),_0x512b84['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}init(){const _0x52bd85=this['context']['plugins']['get'](ti);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x4d5a71,_0x532186)=>this['_addCommentThread'](_0x532186)),this['on']('submitCommentThread',(_0x1bc6d2,_0x4fdd76)=>this['_submitCommentThread'](_0x4fdd76)),this['on']('resolveCommentThread',(_0x110e6a,_0x4e35dc)=>this['_resolveCommentThread'](_0x4e35dc)),this['on']('resolveCommentThread',(_0x485725,_0x39fea2)=>this['_updateActiveAnnotation'](_0x39fea2),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x41318e,_0x196cd7)=>this['_reopenCommentThread'](_0x196cd7)),this['on']('reopenCommentThread',(_0x46288f,_0x47d5f4)=>this['_updateActiveAnnotation'](_0x47d5f4),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x324293,_0x40ad91)=>this['_removeCommentThread'](_0x40ad91)),this['on']('updateCommentThread',(_0x24c0bf,_0x265e14)=>this['_updateCommentThread'](_0x265e14)),this['on']('updateCommentThread',(_0x3ceeb0,_0x3955f0)=>this['_updateActiveAnnotation'](_0x3955f0),{'priority':'lowest'}),this['on']('addComment',(_0x50c202,_0x180089)=>this['_addComment'](_0x180089)),this['on']('updateComment',(_0x3d9b21,_0x37649b)=>this['_updateComment'](_0x37649b)),this['on']('removeComment',(_0x213b87,_0x420c39)=>this['_removeComment'](_0x420c39)),this['on']('addComment',(_0xf73502,{threadId:_0x5092c6,isFromAdapter:_0x86cc00})=>{if(_0x86cc00)return;const _0x51698a=this['getCommentThread'](_0x5092c6),_0x2d1287=_0x51698a&&this['_threadToController']['get'](_0x51698a);_0x2d1287&&_0x2d1287['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x52bd85,'change:activeAnnotations',(_0x3fd12d,_0x365a5d,_0x551e53)=>{const _0xcb9977=Array['from'](_0x551e53)['map'](_0x5b6222=>this['_viewToController']['get'](_0x5b6222['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0xcb9977?_0xcb9977['model']:null;});}set adapter(_0x191cbb){if(this['_adapter'])throw new _0x50ddc5('commentsrepository-adapter-already-set');this['_adapter']=_0x191cbb;}get adapter(){return this['_adapter'];}addCommentThread({channelId:_0x436f4d=ii,threadId:_0x1fa77e=_0x5c5379(),comments:_0x1feecf=[],unlinkedAt:_0xad8076=null,resolvedAt:_0x368d08=null,resolvedBy:_0x5bcdbc=null,target:_0x3211a3=null,context:_0x2aa4a7=null,attributes:_0xc38aa={},isResolvable:_0x1cf366=!0x0,isSubmitted:_0x4bc6f8=!0x1,isFromAdapter:_0x1b8212=!0x1}={}){return this['fire'](ai('addCommentThread',_0x436f4d),{'channelId':_0x436f4d,'threadId':_0x1fa77e,'comments':_0x1feecf,'unlinkedAt':_0xad8076,'resolvedAt':_0x368d08,'resolvedBy':_0x5bcdbc,'target':_0x3211a3,'context':_0x2aa4a7,'attributes':_0xc38aa,'isFromAdapter':_0x1b8212,'isResolvable':_0x1cf366,'isSubmitted':_0x4bc6f8}),this['getCommentThread'](_0x1fa77e);}openNewCommentThread({channelId:_0x2c7ee2=ii,threadId:_0x526625=_0x5c5379(),target:_0xec307,context:_0xebb6e1=null,isResolvable:_0x89012a=!0x0}){if(this['_readOnlyChannels']['has'](_0x2c7ee2)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0xec307)throw new _0x50ddc5('commentsrepository-missing-target');const _0x2cc874=this['addCommentThread']({'channelId':_0x2c7ee2,'threadId':_0x526625,'target':_0xec307,'context':_0xebb6e1,'isResolvable':_0x89012a});if(!_0x2cc874)return null;const _0x4a38b6=this['_threadToController']['get'](_0x2cc874),_0x4c54aa=_0x4a38b6['view']['commentThreadInputView']['commentInputView'],_0x526684=this['context']['plugins']['get'](ti),_0x560839=_0x526684['getByInnerView'](_0x4a38b6['view']);return _0x526684['activate'](_0x560839),_0x4c54aa['once']('editorReady',()=>_0x4c54aa['focus']()),_0x2cc874;}hasCommentThread(_0x5e4e74){if('string'!=typeof _0x5e4e74)throw new _0x50ddc5('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x5e4e74);}updateCommentThread({channelId:_0x23626f=ii,threadId:_0x19d465,context:_0x70c988,unlinkedAt:_0xc2ef6e,attributes:_0xc9b0c8,isFromAdapter:_0x5a7c88=!0x1}){return this['fire'](ai('updateCommentThread',_0x23626f),{'channelId':_0x23626f,'threadId':_0x19d465,'context':_0x70c988,'unlinkedAt':_0xc2ef6e,'attributes':_0xc9b0c8,'isFromAdapter':_0x5a7c88}),this['getCommentThread'](_0x19d465);}getCommentThread(_0x4f1eb4){if('string'!=typeof _0x4f1eb4)throw new _0x50ddc5('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x4f1eb4);}fetchCommentThread({channelId:_0x222a3b,threadId:_0x1c7d50}={}){const _0x4f4c04=this['getCommentThread'](_0x1c7d50);if(_0x4f4c04)return Promise['resolve'](_0x4f4c04);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x50ddc5('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x222a3b,'threadId':_0x1c7d50})['then'](_0x1180d6=>this['hasCommentThread'](_0x1c7d50)?this['getCommentThread'](_0x1c7d50):_0x1180d6?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x222a3b},_0x1180d6)):void 0x0)['catch'](_0x1dda6d=>{throw console['error'](_0x1dda6d),new _0x50ddc5('commentsrepository-fetch-comment-thread',this['context']);});}getCommentThreads({channelId:_0x4a3a21,skipNotAttached:_0x509674=!0x1,skipEmpty:_0x1cc449=!0x1,toJSON:_0x5a7073=!0x1}={}){const _0xaff3af=[];for(const _0x41fe15 of this['_threads']['values']())_0x4a3a21&&_0x41fe15['channelId']!==_0x4a3a21||_0x509674&&!_0x41fe15['isAttached']||_0x1cc449&&0x0===_0x41fe15['length']||_0xaff3af['push'](_0x41fe15);return _0x5a7073?_0xaff3af['map'](_0x3df936=>_0x3df936['toJSON']()):_0xaff3af;}getAnnotationForCommentThread(_0x317883){const _0x27c2f8=this['_threadToController']['get'](_0x317883);return _0x27c2f8&&this['context']['plugins']['get'](ti)['getByInnerView'](_0x27c2f8['view'])||null;}getCommentThreadForAnnotation(_0x5ac887){const _0x3d1ba9=this['_viewToController']['get'](_0x5ac887['innerView']);return _0x3d1ba9?_0x3d1ba9['model']:null;}setActiveCommentThread(_0xd9c8ce){const _0x317ed6=this['context']['plugins']['get'](ti);if(!_0xd9c8ce)return void(this['activeCommentThread']&&_0x317ed6['deactivateAll']());const _0x4c3505=this['getCommentThread'](_0xd9c8ce);if(!_0x4c3505)throw new _0x50ddc5('commentsrepository-active-missing-comment-thread',null,{'threadId':_0xd9c8ce});if(!this['_threadToController']['has'](_0x4c3505))throw new _0x50ddc5('commentsrepository-active-not-attached',null,{'threadId':_0xd9c8ce});const _0x483d96=_0x317ed6['getByInnerView'](this['_threadToController']['get'](_0x4c3505)['view']);_0x317ed6['activate'](_0x483d96);}switchReadOnly(_0x1cee2b,_0x396162){_0x1cee2b?this['_readOnlyChannels']['add'](_0x396162):this['_readOnlyChannels']['delete'](_0x396162),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x53926b){return this['_readOnlyChannels']['has'](_0x53926b)||this['_readOnlyChannels']['has'](void 0x0);}createCommentThreadController(_0x5c9e3b,_0x2ea539){return new bt(_0x5c9e3b,_0x2ea539);}setPermissions(_0x5e35d8,_0x1e1d7a=ii){this['_permissions']['set'](_0x1e1d7a,_0x5e35d8),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}getPermissions(_0xc06acc=ii){return this['_permissions']['has'](_0xc06acc)?this['_permissions']['get'](_0xc06acc):ei;}_addCommentThread({channelId:_0x485aba,threadId:_0x5814c8,comments:_0x591346,unlinkedAt:_0x11ecbb,resolvedAt:_0x289aa7,resolvedBy:_0x31b2d9,target:_0x28b306,context:_0x3cb7ca,attributes:_0xb2ad81,isFromAdapter:_0x5895cf,isResolvable:_0x243efd,isSubmitted:_0x138d1f}){if('string'!=typeof _0x5814c8)throw new _0x50ddc5('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x5814c8});if(this['hasCommentThread'](_0x5814c8))throw new _0x50ddc5('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x5814c8});const _0x5b11a0=new ri(this,{'channelId':_0x485aba,'id':_0x5814c8,'context':_0x3cb7ca,'attributes':_0xb2ad81,'unlinkedAt':_0x11ecbb,'resolvedAt':_0x289aa7,'resolvedBy':_0x31b2d9?this['context']['plugins']['get'](_0x1b2b4f)['getUser'](_0x31b2d9):null,'isResolvable':_0x243efd,'isSubmitted':_0x138d1f||_0x5895cf});this['_threads']['set'](_0x5814c8,_0x5b11a0);for(const _0x77fea of _0x591346)_0x5b11a0['_add'](this['_createNewComment']({'threadId':_0x5814c8,..._0x77fea}));return _0x28b306&&_0x5b11a0['attachTo'](_0x28b306),_0x5895cf||!_0x5b11a0['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x485aba,'threadId':_0x5814c8});}_submitCommentThread({channelId:_0x9146c9,threadId:_0x3c89ab}){if(!this['hasCommentThread'](_0x3c89ab))throw new _0x50ddc5('commentsrepository-missing-comment-thread',this);const _0x2badcf=this['getCommentThread'](_0x3c89ab);if(_0x2badcf['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0xa45a75,comments:_0x68e5e2,resolvedAt:_0x5485d5,resolvedBy:_0x4a760f,context:_0x160e90,attributes:_0x1953e4}=_0x2badcf,_0x3b225f=this['context']['plugins']['get']('PendingActions'),_0xa42b50=_0x3b225f['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x9146c9,'threadId':_0xa45a75,'comments':_0x68e5e2['map'](_0x35c9ff=>_0x35c9ff['toJSON']()),'resolvedAt':_0x5485d5,'resolvedBy':_0x4a760f?_0x4a760f['id']:_0x4a760f,'context':_0x160e90,'attributes':_0x1953e4})['then'](({comments:_0xd22c9e})=>{_0x3b225f['remove'](_0xa42b50);for(const _0x363a93 of _0xd22c9e)this['_updateComment']({'channelId':_0x9146c9,'threadId':_0x3c89ab,'commentId':_0x363a93['commentId'],'createdAt':_0x363a93['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x48bf17=>{throw console['error'](_0x48bf17),new _0x50ddc5('commentsrepository-add-comment-thread-internal-error',this);});}_attachCommentThread({threadId:_0x50ca6c,target:_0x3dba11}){const _0x341d8d=this['getCommentThread'](_0x50ca6c);if(!_0x341d8d)throw new _0x50ddc5('commentsrepository-attach-missing-comment-thread',this);const _0x30f4a9=this['context']['plugins']['get']('PendingActions'),_0x2f29c2=this['context']['plugins']['get'](ti),_0x3322d6=this['_createCommentThreadView'](_0x341d8d),_0x3a2598=new bt(_0x341d8d,_0x3322d6);let _0x32cac2=null;_0x3322d6['on']('change:isDirty',(_0x55f557,_0x5b5842,_0x1c2300)=>{_0x1c2300?_0x32cac2=_0x30f4a9['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x32cac2&&(_0x30f4a9['remove'](_0x32cac2),_0x32cac2=null);}),this['_threadToController']['set'](_0x341d8d,_0x3a2598),this['_viewToController']['set'](_0x3322d6,_0x3a2598);const _0x319a2e=new qt(this['context']['locale'],_0x3322d6);_0x319a2e['bind']('length')['to'](_0x3322d6),_0x319a2e['bind']('isDirty')['to'](_0x3322d6,'isDirty',_0x3322d6,'length',(_0x17eaa6,_0x53325a)=>_0x17eaa6||!_0x53325a),_0x319a2e['bind']('isActive')['to'](_0x3322d6),_0x319a2e['type']='comment';const _0x36ec75=new $t({'view':_0x319a2e,'target':_0x3dba11,'type':'comment','isVisible':!_0x341d8d['archivedAt']&&!!('function'==typeof _0x3dba11?_0x3dba11():_0x3dba11)});return _0x3322d6['on']('escape',()=>{_0x36ec75['fire']('escape');}),this['_bindAnnotationToEditors'](_0x3322d6,_0x36ec75),_0x2f29c2['add'](_0x36ec75),_0x36ec75;}_bindAnnotationToEditors(_0x3b0c3e,_0x12141e){this['listenTo'](_0x3b0c3e,'editorReady',(_0x216c3d,_0x1d3acd)=>{const _0x1af560=_0x1d3acd['ui']['view']['body']['bodyCollectionContainer'];_0x12141e['focusableElements']['add'](_0x1af560),this['context']instanceof _0x25e8b1&&this['context']['ui']['focusTracker']['add'](_0x1af560);},{'priority':'highest'}),this['listenTo'](_0x3b0c3e,'editorDestroyed',(_0xce8c69,_0x271c54)=>{const _0x1cb917=_0x271c54['ui']['view']['body']['bodyCollectionContainer'];_0x12141e['focusableElements']['has'](_0x1cb917)&&_0x12141e['focusableElements']['remove'](_0x1cb917),this['context']instanceof _0x25e8b1&&this['context']['ui']['focusTracker']['remove'](_0x1cb917);});}_unbindEditors(_0x323206){this['stopListening'](_0x323206,'editorReady'),this['stopListening'](_0x323206,'editorDestroyed');}_createCommentThreadView(_0x35f4fe){const _0xf9821b=this['context']['plugins']['get'](_0x1b2b4f),{config:_0x4f9544,locale:_0x3977cd}=this['context'],_0x1148a1=_0x474445(_0x4f9544['get']('locale'),_0x3977cd);return new(0x0,(_0x4f9544['get']('comments'))['CommentThreadView'])(_0x3977cd,_0x35f4fe,_0xf9821b['me'],{'editorConfig':{..._0x4f9544['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x4f9544['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x4f9544['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x4f9544['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x4f9544['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x1148a1,'CommentView':_0x4f9544['get']('comments')['CommentView']});}_resolveCommentThread({threadId:_0x1bd68e,channelId:_0x104b87,resolvedAt:_0x352289,resolvedBy:_0x49cc82,isFromAdapter:_0x2dbc8f}){if(!this['hasCommentThread'](_0x1bd68e))throw new _0x50ddc5('commentsrepository-missing-comment-thread',null,{'threadId':_0x1bd68e});const _0x4f025b=this['getCommentThread'](_0x1bd68e);if(_0x4f025b['isResolved'])throw new _0x50ddc5('commentsrepository-resolved-comment-thread',null,{'threadId':_0x1bd68e});const _0x2e07a6=this['context']['plugins']['get'](_0x1b2b4f);if(_0x4f025b['resolvedBy']=_0x2e07a6['getUser'](_0x49cc82),_0x4f025b['resolvedAt']=_0x352289,_0x2dbc8f||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x1f2311=this['context']['plugins']['get']('PendingActions'),_0x118973=_0x1f2311['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x104b87,'threadId':_0x1bd68e})['then'](({resolvedAt:_0x589154,resolvedBy:_0x475d60})=>{_0x1f2311['remove'](_0x118973),_0x4f025b['resolvedBy']['id']!==_0x475d60&&(_0x4f025b['resolvedBy']=_0x2e07a6['getUser'](_0x475d60)),_0x4f025b['resolvedAt']=_0x589154;})['catch'](_0x32a9e9=>{throw console['error'](_0x32a9e9),new _0x50ddc5('commentsrepository-resolve-comment-thread-internal-error',this);});}_reopenCommentThread({threadId:_0x1f840b,channelId:_0x378c42,isFromAdapter:_0x20ec22}){if(!this['hasCommentThread'](_0x1f840b))throw new _0x50ddc5('commentsrepository-missing-comment-thread',null,{'threadId':_0x1f840b});const _0x556f1e=this['getCommentThread'](_0x1f840b);if(!_0x556f1e['isResolved'])throw new _0x50ddc5('commentsrepository-reopen-comment-thread',null,{'threadId':_0x1f840b});if(_0x556f1e['resolvedBy']=null,_0x556f1e['resolvedAt']=null,_0x20ec22||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x4b6609=this['context']['plugins']['get']('PendingActions'),_0x1e8349=_0x4b6609['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x378c42,'threadId':_0x1f840b})['then'](()=>_0x4b6609['remove'](_0x1e8349))['catch'](_0x304c95=>{throw console['error'](_0x304c95),new _0x50ddc5('commentsrepository-reopen-comment-thread-internal-error',this);});}_removeCommentThread({threadId:_0x116f0a,isFromAdapter:_0xeb3ce4}){const _0x3585fc=this['getCommentThread'](_0x116f0a);if(!_0x3585fc)throw new _0x50ddc5('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x116f0a),this['_threads']['delete'](_0x116f0a),!_0x3585fc['isSubmitted']||_0xeb3ce4||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x464d9b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x557a60}=_0x3585fc,_0x1c56e2=_0x464d9b['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x557a60,'threadId':_0x116f0a})['then'](()=>_0x464d9b['remove'](_0x1c56e2))['catch'](_0x288018=>{throw console['error'](_0x288018),new _0x50ddc5('commentsrepository-remove-comment-thread-internal-error',this);});}_updateCommentThread({threadId:_0x3a0ec6,unlinkedAt:_0xa89629,context:_0x182786,attributes:_0x5c39ca,isFromAdapter:_0x20336d}){if('string'!=typeof _0x3a0ec6)throw new _0x50ddc5('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x3a0ec6});if(!this['hasCommentThread'](_0x3a0ec6))throw new _0x50ddc5('commentsrepository-missing-comment-thread',null,{'threadId':_0x3a0ec6});const _0x104761=this['getCommentThread'](_0x3a0ec6);let _0x5a5f40=!0x1;if(void 0x0!==_0x182786&&_0x104761['context']!==_0x182786&&(_0x104761['context']=_0x182786,_0x5a5f40=!0x0),void 0x0!==_0xa89629&&_0x104761['unlinkedAt']!==_0xa89629&&(_0x104761['unlinkedAt']=_0xa89629,_0x5a5f40=!0x0),_0x5c39ca&&!_0x19f69e(_0x5c39ca,_0x104761['attributes'])&&(_0x104761['attributes']=_0x5c39ca,_0x5a5f40=!0x0),!_0x5a5f40)return Promise['resolve']();if(!_0x104761['isSubmitted']||_0x20336d||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x487166=this['context']['plugins']['get']('PendingActions'),{channelId:_0x53b7b0}=_0x104761,_0x512163=_0x487166['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x53b7b0,'threadId':_0x3a0ec6,'context':_0x182786,'unlinkedAt':_0xa89629,'attributes':_0x5c39ca})['then'](()=>_0x487166['remove'](_0x512163))['catch'](_0x464680=>{throw console['error'](_0x464680),new _0x50ddc5('commentsrepository-update-comment-thread-internal-error',this);});}_detachCommentThread(_0x31882c){const _0x4f7e43=this['context']['plugins']['get'](ti),_0x16471f=this['getCommentThread'](_0x31882c);if(_0x16471f['_isAttached']=!0x1,this['_threadToController']['has'](_0x16471f)){const _0xf3c2bc=this['_threadToController']['get'](_0x16471f),_0x1364b4=_0xf3c2bc['view'],_0x3b4d15=_0x4f7e43['getByInnerView'](_0x1364b4);this['_threadToController']['delete'](_0x16471f),this['_viewToController']['delete'](_0x1364b4),_0x3b4d15&&_0x4f7e43['remove'](_0x3b4d15),_0xf3c2bc['destroy'](),_0x1364b4['destroy']()['then'](()=>{this['_unbindEditors'](_0x1364b4);});}}_updateActiveAnnotation({threadId:_0x17600d,resolvedAt:_0x23d294,unlinkedAt:_0xc0357d}){const _0x5d8ef4=!!_0x23d294,_0x226b1c=this['context']['plugins']['get'](ti),_0x45d3e8=this['getCommentThread'](_0x17600d);if(this['_threadToController']['has'](_0x45d3e8)){const _0x209fff=this['_threadToController']['get'](_0x45d3e8)['view'],_0x12dee9=_0x226b1c['getByInnerView'](_0x209fff);_0x12dee9&&(_0x5d8ef4&&_0x226b1c['_removeActiveAnnotation'](_0x12dee9),_0xc0357d?_0x12dee9['isVisible']=!0x1:_0x12dee9['refreshVisibility']());}}_getExternalAuthor(_0x1b7d3d){const _0x8c8962=this['context']['plugins']['get'](_0x1b2b4f),_0x3ac154=_0x544dfc('external:'+_0x1b7d3d),_0x31e0eb=_0x8c8962['getUser'](_0x3ac154);return _0x31e0eb||_0x8c8962['addUser']({'id':_0x3ac154,'name':_0x1b7d3d});}_createNewComment({threadId:_0x58eb5f,commentId:_0x4200f4=_0x5c5379(),content:_0x196c10,authorId:_0xbeb407,createdAt:_0x3a131f,attributes:_0x360a5e}){if('string'!=typeof _0x4200f4)throw new _0x50ddc5('commentsrepository-invalid-commentid');if('string'!=typeof _0xbeb407)throw new _0x50ddc5('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x196c10||!_0x196c10['trim']())throw new _0x50ddc5('commentsrepository-invalid-comment-content');const _0x4703b5=this['context']['plugins']['get'](_0x1b2b4f)['getUser'](_0xbeb407);if(!_0x4703b5)throw new _0x50ddc5('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0xbeb407});let _0x3e539d=null,_0x59f9f8=_0x3a131f;return _0x360a5e?.['@external']&&(_0x3e539d=this['_getExternalAuthor'](_0x360a5e['@external']['authorName']),_0x59f9f8=new Date(_0x360a5e['@external']['createdAt'])),new hi(this,{'threadId':_0x58eb5f,'id':_0x4200f4,'author':_0x3e539d||_0x4703b5,'creator':_0x4703b5,'content':_0x196c10,'createdAt':_0x3a131f,'authoredAt':_0x59f9f8,'attributes':_0x360a5e});}_addComment(_0x114661){let {threadId:_0x3a8a4c,content:_0xa2837c,attributes:_0x2e74b4,isFromAdapter:_0x515da6}=_0x114661;const _0x42c573=this['getCommentThread'](_0x114661['threadId']);if(!_0x42c573)throw new _0x50ddc5('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x8dd8a8=this['_createNewComment'](_0x114661),{id:_0x1cc62d}=_0x8dd8a8;if(_0x42c573['_add'](_0x8dd8a8),_0x515da6||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x42c573['isSubmitted'])return Promise['resolve']();const _0x1cc0aa=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2d9114}=_0x42c573,_0x5c420a=_0x1cc0aa['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x2e74b4||(_0x2e74b4={}),this['adapter']['addComment']({'channelId':_0x2d9114,'threadId':_0x3a8a4c,'commentId':_0x1cc62d,'content':_0xa2837c,'attributes':_0x2e74b4})['then'](_0x3b799e=>{_0x1cc0aa['remove'](_0x5c420a),_0x3b799e&&this['_updateComment']({'channelId':_0x2d9114,'threadId':_0x3a8a4c,'commentId':_0x1cc62d,'createdAt':_0x3b799e['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x1e55a4=>{throw console['error'](_0x1e55a4),new _0x50ddc5('commentsrepository-add-comment-internal-error',this);});}_updateComment({threadId:_0x3bdc96,commentId:_0x429b55,content:_0x32a95a,createdAt:_0x5d1414,attributes:_0x5b0094,isFromAdapter:_0x1b907f}){if(void 0x0!==_0x32a95a&&('string'!=typeof _0x32a95a||!_0x32a95a['trim']()['length']))throw new _0x50ddc5('commentsrepository-update-comment-invalid-content');const _0x2ac22a=this['getCommentThread'](_0x3bdc96),_0x5e9644=_0x2ac22a['getComment'](_0x429b55);if(!_0x5e9644)throw new _0x50ddc5('commentsrepository-update-missing-comment',this);let _0x7af8e1=!0x1;if(_0x32a95a&&_0x32a95a!==_0x5e9644['content']&&(_0x5e9644['isEditable']||_0x1b907f)&&(_0x5e9644['content']=_0x32a95a,_0x7af8e1=!0x0),_0x5d1414&&_0x5d1414!==_0x5e9644['createdAt']&&(_0x5e9644['createdAt']=_0x5d1414,_0x5e9644['isExternal']||(_0x5e9644['authoredAt']=_0x5d1414),_0x7af8e1=!0x0),_0x5b0094&&!_0x19f69e(_0x5b0094,_0x5e9644['attributes'])&&(_0x5e9644['attributes']=_0x5b0094,_0x7af8e1=!0x0),!_0x7af8e1)return Promise['resolve']();if(_0x2ac22a['fire']('commentUpdated'),_0x1b907f||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x362742=this['context']['plugins']['get']('PendingActions'),{channelId:_0x200790}=this['getCommentThread'](_0x5e9644['threadId']),_0x4b5e54=_0x362742['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x200790,'threadId':_0x3bdc96,'commentId':_0x429b55,'content':_0x32a95a,'attributes':_0x5b0094})['then'](()=>_0x362742['remove'](_0x4b5e54))['catch'](_0xe19846=>{throw console['error'](_0xe19846),new _0x50ddc5('commentsrepository-update-comment-internal-error',this);});}_removeComment({threadId:_0x36dc40,commentId:_0x45c0db,isFromAdapter:_0x196657}){const _0x15eb5f=this['getCommentThread'](_0x36dc40),_0x215ea8=_0x15eb5f['getComment'](_0x45c0db);if(!_0x215ea8)throw new _0x50ddc5('commentsrepository-remove-missing-comment',this);if(_0x15eb5f['_remove'](_0x215ea8),_0x196657||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x2be21f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5c3e5f}=_0x15eb5f,_0x2d1522=_0x2be21f['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x5c3e5f,'threadId':_0x36dc40,'commentId':_0x45c0db})['then'](()=>_0x2be21f['remove'](_0x2d1522))['catch'](_0x230173=>{throw console['error'](_0x230173),new _0x50ddc5('commentsrepository-remove-comment-internal-error',this);});}},ri=class extends si{['channelId'];['id'];_isAttached;_isSubmitted;comments;_repository;constructor(_0x2d240f,_0x49177c){super();const _0x4ad0ee=_0x49177c['isResolvable'];this['channelId']=_0x49177c['channelId'],this['id']=_0x49177c['id'],this['comments']=new _0x549ed4(),this['_repository']=_0x2d240f,this['_isAttached']=!0x1,this['_isSubmitted']=_0x49177c['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x2d240f,'_permissions',_0x2d240f,'_readOnlyChannels',()=>_0x2d240f['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x2d240f,'_permissions',()=>_0x2d240f['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x2d240f,'_permissions',()=>{const _0x5b14d9=_0x2d240f['getPermissions'](this['channelId']);return _0x5b14d9['write']||_0x5b14d9['admin'];}),this['bind']('isResolvable')['to'](_0x2d240f,'_permissions',()=>_0x4ad0ee&&_0x2d240f['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x49177c['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x39625d,_0x1fddc7)=>_0x39625d?_0x1fddc7?_0x39625d<_0x1fddc7?_0x39625d:_0x1fddc7:_0x39625d:_0x1fddc7),this['set']('unlinkedAt',_0x49177c['unlinkedAt']||null),this['set']('resolvedAt',_0x49177c['resolvedAt']||null),this['set']('resolvedBy',_0x49177c['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x251ceb=>!!_0x251ceb),this['set']('attributes',_0x49177c['attributes']||{});}get weight(){return Array['from'](this['comments'])['reduce']((_0x4f9796,_0x111185)=>_0x4f9796+_0x111185['weight'],0x0);}get length(){return this['comments']['length'];}get isAttached(){return this['_isAttached'];}get isSubmitted(){return this['_isSubmitted'];}submit(){const {channelId:_0x54ef40,id:_0x225eaa}=this;this['_repository']['fire'](ai('submitCommentThread',_0x54ef40),{'channelId':_0x54ef40,'threadId':_0x225eaa});}setUnlinkedAt(_0x16228e){this['_update']({'unlinkedAt':_0x16228e});}['resolve']({resolvedAt:_0x398db1=new Date(),resolvedBy:_0x42728a='',isFromAdapter:_0x4f9e82=!0x1}={}){const _0x303f03=this['_repository']['context']['plugins']['get'](_0x1b2b4f)['me'],{channelId:_0x2f7e50,id:_0xd86ce0}=this;this['_repository']['fire'](ai('resolveCommentThread',_0x2f7e50),{'channelId':_0x2f7e50,'threadId':_0xd86ce0,'resolvedAt':_0x398db1,'resolvedBy':_0x42728a||_0x303f03['id'],'isFromAdapter':_0x4f9e82});}['reopen']({isFromAdapter:_0x131426=!0x1}={}){const {channelId:_0x22a8c1,id:_0x20f630}=this;this['_repository']['fire'](ai('reopenCommentThread',_0x22a8c1),{'channelId':_0x22a8c1,'threadId':_0x20f630,'isFromAdapter':_0x131426});}setContext(_0x1285d2){this['context']||this['_update']({'context':_0x1285d2});}setAttribute(_0x5ae314,_0x10ca10){const _0x4fd181=_0x267281(this['attributes']);_0x5a9c0d(_0x4fd181,_0x5ae314,_0x10ca10),this['_update']({'attributes':_0x4fd181});}removeAttribute(_0xbe576){const _0x3e8a7d=_0x267281(this['attributes']);_0x43de5a(_0x3e8a7d,_0xbe576),this['_update']({'attributes':_0x3e8a7d});}['remove']({isFromAdapter:_0x4efb60=!0x1}={}){const {channelId:_0x3edf80,id:_0xd6f7be}=this;this['_repository']['fire'](ai('removeCommentThread',_0x3edf80),{'channelId':_0x3edf80,'threadId':_0xd6f7be,'isFromAdapter':_0x4efb60});}attachTo(_0x3dbbe0){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x3dbbe0});}addComment(_0x2f2094){const {channelId:_0x43c582,id:_0x170008}=this;this['_repository']['fire'](ai('addComment',_0x43c582,_0x170008),Object['assign']({'channelId':_0x43c582,'threadId':_0x170008},_0x2f2094));}getComment(_0x4cafdd){if('string'!=typeof _0x4cafdd)throw new _0x50ddc5('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x4cafdd});return this['comments']['get'](_0x4cafdd);}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'](_0x109ef1=>_0x109ef1['toJSON']()),'attributes':this['attributes']};}['_add'](_0x52ded9){return this['listenTo'](_0x52ded9,'change:authoredAt',()=>{const _0x3f64fc=this['_findOptimalIndex'](_0x52ded9),_0x5c883c=this['comments'];_0x3f64fc-0x1!=_0x5c883c['getIndex'](_0x52ded9)&&_0x3f64fc+0x1!=_0x5c883c['getIndex'](_0x52ded9)&&(this['_remove'](_0x52ded9),this['_add'](_0x52ded9));}),this['comments']['add'](_0x52ded9,this['_findOptimalIndex'](_0x52ded9));}_update(_0x256a77){const {channelId:_0x2cac85,id:_0x424e0f}=this;this['_repository']['fire'](ai('updateCommentThread',_0x2cac85),{..._0x256a77,'channelId':_0x2cac85,'threadId':_0x424e0f});}['_remove'](_0x3708a6){return this['stopListening'](_0x3708a6),_0x3708a6['destroy'](),this['comments']['remove'](_0x3708a6);}_findOptimalIndex(_0x4ee4c3){const _0x27899f=this['comments']['find'](_0x419927=>new Date(_0x419927['authoredAt'])['getTime']()>new Date(_0x4ee4c3['authoredAt'])['getTime']());return _0x27899f?this['comments']['getIndex'](_0x27899f):this['length'];}},hi=class extends ni{['id'];threadId;author;creator;createdAt;_repository;constructor(_0x1eec33,_0xa704b6){super();const _0x357124=_0x1eec33['context']['plugins']['get'](_0x1b2b4f)['me'],_0x394e0b=_0x1eec33['getCommentThread'](_0xa704b6['threadId']),_0x1a0e79=0x0===_0x394e0b['comments']['length'],_0x45edfa=_0x357124===_0xa704b6['author'];this['id']=_0xa704b6['id'],this['threadId']=_0xa704b6['threadId'],this['author']=_0xa704b6['author'],this['creator']=_0xa704b6['creator'],this['set']('content',_0xa704b6['content']),this['createdAt']=_0xa704b6['createdAt']||new Date(),this['set']('authoredAt',_0xa704b6['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x394e0b,'resolvedAt'),this['set']('attributes',_0xa704b6['attributes']||{}),this['bind']('isEditable')['to'](_0x1eec33,'_permissions',()=>{const _0x3006cb=_0x1eec33['getPermissions'](_0x394e0b['channelId'])['write'],_0x2f851b=_0x1eec33['getPermissions'](_0x394e0b['channelId'])['modifyAll'];return _0x45edfa&&_0x3006cb||!_0x45edfa&&_0x2f851b;}),this['bind']('isRemovable')['to'](_0x394e0b,'isRemovable',_0x1eec33,'_permissions',_0x527ff6=>{const _0x3eff5a=_0x1eec33['getPermissions'](_0x394e0b['channelId'])['write'],_0x2cb349=_0x1eec33['getPermissions'](_0x394e0b['channelId'])['modifyAll'];return _0x45edfa&&_0x3eff5a||_0x527ff6&&_0x1a0e79||!_0x45edfa&&_0x2cb349&&!_0x1a0e79;}),this['bind']('isReadOnly')['to'](_0x394e0b,'isReadOnly'),this['_repository']=_0x1eec33;}get isExternal(){return Boolean(this['attributes']&&this['attributes']['@external']);}get weight(){return Math['max'](function(_0x3d9be8){const _0x5936fb=document['createElement']('div');return _0x5936fb['innerHTML']=_0x3d9be8,_0x5936fb['textContent']['length'];}(this['content']),0xc8);}update(_0x3ab0cc){const {threadId:_0x187f27,id:_0x584c52}=this;if(!this['_repository']['hasCommentThread'](_0x187f27))throw new _0x50ddc5('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x4ba58f}=this['_repository']['getCommentThread'](_0x187f27);this['_repository']['fire'](ai('updateComment',_0x4ba58f,_0x187f27),{'channelId':_0x4ba58f,'threadId':_0x187f27,'commentId':_0x584c52,..._0x3ab0cc});}setAttribute(_0x225ce5,_0x4547a9){const _0x1bd838=_0x267281(this['attributes']);_0x5a9c0d(_0x1bd838,_0x225ce5,_0x4547a9),this['update']({'attributes':_0x1bd838});}removeAttribute(_0xcc853c){const _0x4e4b27=_0x267281(this['attributes']);_0x43de5a(_0x4e4b27,_0xcc853c),this['update']({'attributes':_0x4e4b27});}['remove'](_0xf1d06f={}){if(!_0xf1d06f['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x80b0ef,id:_0x15b608}=this;if(!this['_repository']['hasCommentThread'](_0x80b0ef))throw new _0x50ddc5('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x15fa89}=this['_repository']['getCommentThread'](_0x80b0ef);this['_repository']['fire'](ai('removeComment',_0x15fa89,_0x80b0ef),{'channelId':_0x15fa89,'threadId':_0x80b0ef,'commentId':_0x15b608,..._0xf1d06f});}toJSON(){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}destroy(){this['stopListening']();}};function ai(_0x3d8e7a,..._0x5adf08){for(const _0x90c179 of _0x5adf08)void 0x0!==_0x90c179&&(_0x3d8e7a+=':'+String(_0x90c179));return _0x3d8e7a;}var ci=class extends _0x412ddc{constructor(_0x43dd06){super(_0x43dd06),this['set']('hasContent',!0x1);}['refresh'](){const _0x485537=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x310b14 of _0x485537['getRanges']())if(this['_hasContent'](_0x310b14))return void(this['hasContent']=!0x0);}execute({threadId:_0x59d259=_0x5c5379(),ranges:_0x6c412d,comment:_0x444c03}={}){const _0x5bc4ba=this['editor']['model'],_0x20c9f3=_0x6c412d??Array['from'](_0x5bc4ba['document']['selection']['getRanges']()),_0x37d719=[];for(const _0x4b665d of _0x20c9f3)this['_hasContent'](_0x4b665d)&&_0x37d719['push'](this['_trimToContent'](_0x4b665d));if(!_0x37d719['length'])throw new _0x50ddc5('addcommentthreadcommand-incorrect-ranges',null);_0x444c03&&this['_createCommentThread'](_0x59d259,_0x444c03),this['_createMarkersFromRanges'](_0x59d259,_0x37d719,!!_0x444c03);}_createMarkersFromRanges(_0x4587ae,_0x3c13af,_0x1d18ba){this['editor']['model']['change'](_0x527021=>{for(const _0x2f18ce of _0x3c13af){const _0x524893='comment:'+_0x4587ae+':'+_0x5c5379()['substr'](0x1,0x5);_0x527021['addMarker'](_0x524893,{'range':_0x2f18ce,'usingOperation':_0x1d18ba,'affectsData':_0x1d18ba});}});}_createCommentThread(_0x1a6d5f,_0x446a23){const _0x16ab9b=this['editor']['plugins']['get']('CommentsRepository'),_0x695e76=this['editor']['config']['get']('collaboration.channelId'),_0x9120e=this['editor']['plugins']['get']('Users')['me'];if(!_0x9120e)throw new _0x50ddc5('addcommentthreadcommand-user-not-found',null);_0x16ab9b['addCommentThread']({'threadId':_0x1a6d5f,'channelId':_0x695e76,'comments':[{'authorId':_0x9120e['id'],'content':_0x446a23,'createdAt':new Date(),'attributes':{}}]});}_hasContent(_0x2efb66){for(const _0xa20c33 of _0x2efb66['getItems']())if(this['_itemIsContent'](_0xa20c33))return!0x0;return!0x1;}_itemIsContent(_0x32bc8f){return _0x32bc8f['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x32bc8f)&&!_0x32bc8f['is']('element','tableCell');}_trimToContent(_0x2bb3e4){const _0x3c6235=_0x25054a=>!this['_itemIsContent'](_0x25054a['item']),_0x1dc21b=_0x2bb3e4['start']['getLastMatchingPosition'](_0x3c6235),_0x4d3ab6=_0x2bb3e4['end']['getLastMatchingPosition'](_0x3c6235,{'direction':'backward'});return this['editor']['model']['createRange'](_0x1dc21b,_0x4d3ab6);}},di=class extends _0x3de2ea{_dataCollectors;_editorAnnotations;static get requires(){return[ti];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x28ba55){super(_0x28ba55),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}init(){const _0xa6abc=this['editor'],_0x417026=_0xa6abc['model']['document']['selection'],_0x28771b=_0x174c5f(()=>this['refreshSelectedViews'](),0xa);_0x417026['on']('change:range',(_0x14fac3,_0x18bbf5)=>{_0x18bbf5['directChange']&&(_0x28771b['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0xa6abc['editing']['view']['document'],'change:isFocused',(_0xa7f5f9,_0x379c54,_0x24256b)=>{_0x24256b&&_0x28771b();}),this['listenTo'](_0xa6abc['ui']['focusTracker'],'change:isFocused',(_0x460f28,_0x5c821e,_0x1ee2a0)=>{_0x1ee2a0||this['fire']('blur',{'isAnnotationTracked':_0x4085c1=>this['_editorAnnotationsData']['has'](_0x4085c1['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}registerAnnotation(_0x412c90){if(this['_editorAnnotations']['has'](_0x412c90['view']))return;this['_editorAnnotations']['add'](_0x412c90['view']),this['editor']['ui']['focusTracker']['add'](_0x412c90['view']['element']);const _0x59654e=this['editor']['plugins']['get'](ti);this['listenTo'](_0x59654e['collection'],'remove',(_0x274375,_0x59b2f1)=>{this['editor']['ui']['focusTracker']['remove'](_0x59b2f1['view']['element']),this['_editorAnnotations']['delete'](_0x59b2f1['view']);});}hasDomSelection(){return this['editor']['editing']['view']['hasDomSelection'];}addSourceCollector(_0x18e820){if('function'!=typeof _0x18e820)throw new _0x50ddc5('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x18e820);}refreshSelectedViews(){this['fire']('refresh');}getOrderedSelectedAnnotations({activeAnnotation:_0x2506be,annotations:_0x35326a}){const _0x33bf80=[],_0x29615a=this['editor']['model']['document']['selection'],_0x278418=Array['from'](_0x29615a['getRanges']());for(const [_0x236650,_0x5887f4]of this['_editorAnnotationsData']){const _0x324674=_0x3c699d(_0x5887f4),_0x4bff1b=_0x35326a['getByInnerView'](_0x236650);_0x324674&&_0x4bff1b&&_0x33bf80['push']({'annotation':_0x4bff1b,'range':_0x324674});}function _0x3c699d(_0x2e4a30){for(const _0x89ff74 of _0x2e4a30)for(const _0x41ec58 of _0x278418)if(_0x89ff74['containsRange'](_0x41ec58,!_0x29615a['isCollapsed']))return _0x89ff74;return null;}return _0x33bf80['sort']((_0x490229,_0x232b68)=>{const _0x20f993=_0x490229['range'],_0x47ed80=_0x232b68['range'];if(!_0x20f993['isEqual'](_0x47ed80)){if(_0x20f993['containsRange'](_0x47ed80,!0x0))return 0x1;if(_0x47ed80['containsRange'](_0x20f993,!0x0))return-0x1;}return _0x490229['annotation']==_0x2506be?-0x1:_0x232b68['annotation']==_0x2506be?0x1:0x0;})['map'](_0x4dce97=>_0x4dce97['annotation']);}get _editorAnnotationsData(){const _0x4ef9fb=new Map();for(const _0x336895 of Array['from'](this['_dataCollectors']))for(const [_0x24ce3a,_0x44d300]of _0x336895())_0x4ef9fb['set'](_0x24ce3a,_0x44d300);return _0x4ef9fb;}},li=class extends _0x3de2ea{afterInit(){const _0x1f477d=this['editor'];_0x1f477d['plugins']['has']('RestrictedEditingModeEditing')&&_0x1f477d['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},mi=class extends _0x3de2ea{constructor(_0x494ebb){super(_0x494ebb),this['editor']['config']['define']('importWord.formatting.comments','basic');}afterInit(){const _0x5cd082=this['editor'],_0x3f2e25=_0x5cd082['commands']['get']('importWord'),_0x193434=_0x5cd082['plugins']['get'](_0x1b2b4f);_0x3f2e25&&(_0x3f2e25['on']('execute',(_0x204e25,[,_0x145d16])=>{_0x145d16['collaboration_features']={'comments':!0x0,'user_id':_0x193434['me']['id']};},{'priority':_0xd25c7d['high']+0xa}),this['listenTo'](_0x3f2e25,'dataInsert',this['_handleImportedData']));}_handleImportedData(_0x5e6d31,_0x19167b){const {comment_threads:_0x113c9c}=_0x19167b;_0x113c9c&&_0x113c9c['forEach'](({thread_id:_0x2fdc7f,comments:_0x23a47a,is_resolved:_0x163a77})=>{const _0x1d407c=new Date(),_0x15f1b9=_0x23a47a['map'](({author:_0x12f741,content:_0x4f5ef2,created_at:_0x1b008c})=>({'content':_0x4f5ef2,'authorId':this['editor']['plugins']['get'](_0x1b2b4f)['me']['id'],'createdAt':_0x1d407c,'attributes':{'@external':{'authorName':_0x12f741,'createdAt':_0x1b008c?new Date(_0x1b008c):new Date(),'source':'importWord'}}})),_0xe119e1=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](oi)['addCommentThread']({'channelId':_0xe119e1,'threadId':_0x2fdc7f,'comments':_0x15f1b9,'resolvedAt':_0x163a77?_0x1d407c:null});});}},ui=class extends _0x3de2ea{constructor(_0x5ccb13){super(_0x5ccb13),this['editor']['config']['define']('comments.copyMarkers','default');}static get requires(){return[pt,wt];}afterInit(){const _0x57aa64=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x57aa64,'contentInsertion',(_0x351eaf,_0x22c5cc)=>this['_removeMarkersWithoutThreads'](_0x22c5cc['content']['markers']),{'priority':'highest'});}_removeMarkersWithoutThreads(_0x504f41){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x504f41;const _0x2ee7de=this['editor']['plugins']['get']('CommentsRepository');for(const _0x233290 of _0x504f41['keys']()){const [_0x24561b,_0x1491ef]=_0x233290['split'](':');'comment'!=_0x24561b||_0x2ee7de['hasCommentThread'](_0x1491ef)||_0x504f41['delete'](_0x233290);}return _0x504f41;}_registerMarkerInClipboardPipeline(){const _0x203b38=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x5bedac=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x5bedac&&_0x203b38['_registerMarkerToCopy']('comment',_0x5bedac);}_mapCommentsCopyConfigToRegisterConfiguration(_0x253f4d){switch(_0x253f4d){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function fi(_0x205604){const _0x510b6d=_0x205604['split'](':');return{'group':_0x510b6d[0x0],'id':_0x510b6d[0x1],'part':_0x510b6d[0x2]};}var pi=class extends _0x3de2ea{init(){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}overrideMarkerConverters(){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x109ccd,_0x467e84)=>{if(!_0x467e84['options']['showCommentHighlights'])return null;if(_0x467e84['options']['ignoreResolvedComments']){const {id:_0x32d99b}=fi(_0x109ccd['markerName']);if(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x32d99b)?.['isResolved']&&_0x109ccd['item'])return _0x467e84['consumable']['consume'](_0x109ccd['item'],'addMarker:'+_0x109ccd['markerName']),_0x467e84['consumable']['consume'](_0x109ccd['item'],'removeMarker:'+_0x109ccd['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x3ebc64=>{_0x3ebc64['on']('addMarker:comment',(_0x55caae,_0x5d5949,_0x21b05e)=>{if(!_0x21b05e['options']['showCommentHighlights'])return;const _0x36b9da=_0x5d5949['item'];if(!_0x36b9da)return;const _0x51c10f=_0x21b05e['mapper']['toViewElement'](_0x36b9da);this['editor']['model']['schema']['isObject'](_0x36b9da)&&_0x51c10f&&!_0x51c10f['getCustomProperty']('widget')&&_0x51c10f['is']('containerElement')&&Ct(_0x51c10f,_0x21b05e['writer']);},{'priority':'high'});});}overrideHorizontalRuleConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x36a293,{writer:_0x509aaa,options:_0x4d2e82})=>{if(!_0x4d2e82['showCommentHighlights'])return null;const _0x333ec4=_0x509aaa['createContainerElement']('div'),_0x1a2c16=_0x509aaa['createEmptyElement']('hr');return _0x509aaa['addClass']('ck-horizontal-line',_0x333ec4),_0x509aaa['insert'](_0x509aaa['createPositionAt'](_0x333ec4,0x0),_0x1a2c16),_0x333ec4;},'converterPriority':'high'});}overrideImageInlineConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x513021,{writer:_0x57d005,options:_0x4b959a})=>{if(!_0x4b959a['showCommentHighlights'])return null;const _0x55a485=_0x57d005['createContainerElement']('span'),_0x3fc3d4=_0x57d005['createEmptyElement']('img');return _0x57d005['addClass']('image-inline',_0x55a485),_0x57d005['insert'](_0x57d005['createPositionAt'](_0x55a485,0x0),_0x3fc3d4),_0x55a485;},'converterPriority':'high'});}overrideMediaEmbedConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x10126d,{writer:_0x3d76fd,options:_0x1d8960})=>{if(_0x1d8960['showCommentHighlights'])return _0x3d76fd['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x390deb,_0x40c292,_0x3d1be0)=>{_0x3d1be0['options']['showCommentHighlights']&&_0x390deb['stop']();},{'priority':'high'});}},wi=class extends _0x3de2ea{static get requires(){return[oi,di,_0x1b2b4f,li,mi,ui,pi];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x24b134){super(_0x24b134),this['set']('isThreadsLoadingPaused',!0x0),_0x24b134['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0xce3053,_0x5b9e90,_0x1920e4,_0x365c32)=>{const _0x146429=_0x24b134['plugins']['get'](oi),_0x3dd6de=_0x1920e4?fi(_0x1920e4)['id']:null;_0x24b134['model']['change'](()=>{if(_0x3dd6de){const _0x24697c=this['getAllMarkersForId'](_0x3dd6de);for(const _0x2e746f of _0x24697c)_0x24b134['editing']['reconvertMarker'](_0x2e746f);}if(_0x365c32){const {id:_0x12813a}=fi(_0x365c32),_0xb02426=_0x146429['getCommentThread'](_0x12813a);if(_0xb02426&&_0xb02426['unlinkedAt'])return;if(_0xb02426&&!_0xb02426['isAttached'])return;const _0x4b3fda=this['getAllMarkersForId'](_0x12813a);for(const _0x22b8d5 of _0x4b3fda)_0x24b134['editing']['reconvertMarker'](_0x22b8d5);}}),_0x3dd6de&&this['scrollToThreadMarker'](_0x3dd6de);}),this['_initAriaMarkerChangeAnnouncements']();}init(){const _0x447378=this['editor'],_0x3e9975=_0x447378['plugins']['get'](oi),_0x319792=_0x447378['config']['get']('collaboration.channelId'),_0x25eaa4=_0x3e9975['getCommentThreads']()['filter'](_0x3e042e=>_0x3e042e['channelId']!==_0x319792);_0x447378['commands']['add']('addCommentThread',new ci(_0x447378)),this['listenTo'](_0x447378,'change:isReadOnly',(_0x555b70,_0x3f9a80,_0x51126d)=>{_0x3e9975['switchReadOnly'](_0x51126d,_0x447378['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x3e9975,gi('addCommentThread',_0x319792),(_0x52e8bd,{threadId:_0x1acd51})=>{this['editor']['plugins']['get'](oi)['getCommentThread'](_0x1acd51)?.['unlinkedAt']&&this['_attachArchivedThread'](_0x1acd51);}),this['listenTo'](_0x3e9975,gi('removeCommentThread',_0x319792),(_0x2b5ac2,{threadId:_0x13e785})=>{_0x447378['model']['enqueueChange']({'isUndoable':!0x1},_0x1b2531=>{const _0x427ec1=this['getAllMarkersForId'](_0x13e785);for(const _0x545538 of _0x427ec1)_0x1b2531['removeMarker'](_0x545538);});}),this['listenTo'](_0x3e9975,gi('resolveCommentThread',_0x319792),(_0x11ec9f,{threadId:_0x54a8ab})=>{this['_reconvertMarkers'](_0x54a8ab);const _0x3e0393=this['editor']['plugins']['get'](ti);(this['editor']['editing']['view']['hasDomSelection']||_0x3e0393['collection']['isFocused'])&&(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x54a8ab)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x3e9975,gi('reopenCommentThread',_0x319792),(_0x2b79e2,{threadId:_0x2355ae})=>{this['_reconvertMarkers'](_0x2355ae);},{'priority':'low'}),this['listenTo'](_0x3e9975,gi('addComment',_0x319792),(_0x181025,{threadId:_0x41b951,isFromAdapter:_0x2cbf67})=>{const _0x2c260b=this['getAllMarkersForId'](_0x41b951);!_0x2cbf67&&0x0!=_0x2c260b['length']&&_0x3e9975['hasCommentThread'](_0x41b951)&&0x1===_0x3e9975['getCommentThread'](_0x41b951)['length']&&_0x447378['model']['enqueueChange']({'isUndoable':!0x1},_0xbac8ce=>{for(const _0x1ff670 of _0x2c260b)_0xbac8ce['updateMarker'](_0x1ff670,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x25eaa4);}afterInit(){!async function(_0x4d54fb){const _0x42c918='KpOBJGNSEgqCyfVF1kZ8lbnRjM7eIzAsDQHw9aThu6rcYi05UmPL4d3X2Wotvx',_0x4d39b2=0x79188,_0x47c0de=window['Date']['now'](),_0x3405cb=_0x4d54fb['editor'],_0x198b82=new window['Promise'](_0x3888f3=>{_0x3405cb['once']('ready',_0x3888f3);}),_0x1ec23c={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x66aa4d=_0x3405cb['config']['get']('licenseKey');async function _0x30e8b5(){let _0x40160e,_0x46c7f6=null,_0x3e719a=null;try{return'GPL'==_0x66aa4d?'NotAllowed':(_0x40160e=_0x41123e(),_0x40160e?(_0x40160e['usageEndpoint']&&(_0x3e719a=_0x5891bb(_0x40160e['usageEndpoint'],_0x40160e['jti'])),await _0x3d83c3()?_0x1b16d4()?_0x8ab1d8()?'Expired':_0x2a3e79()?('evaluation'==_0x40160e['licenseType']&&(_0x46c7f6=_0x231123('EvaluationLimit')),await _0x60d50d()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x8ab1d8(){const _0x2b4cd2=['evaluation','trial']['includes'](_0x40160e['licenseType'])?_0x47c0de/0x3e8:0xe10*_0x4d39b2;return _0x40160e['exp']<_0x2b4cd2;}function _0x1b16d4(){const _0x20d202=_0x40160e['features'];if(!_0x20d202)return!0x1;if(_0x20d202['includes']('*'))return!0x0;if(_0x20d202['includes']('CMT'))return!0x0;if(_0x20d202['includes']('TRILIUM')&&_0x363ef2())return!0x0;if(_0x20d202['includes']('RCMT')){if(_0x2815a0())return!0x0;if(_0x14cb30()||_0x11ab61())return!0x0;}return!0x1;}function _0x2a3e79(){const _0x4629d1=_0x40160e['licensedHosts'];if(!_0x4629d1||0x0==_0x4629d1['length'])return!0x0;const {hostname:_0x257397}=new URL(window['location']['href']);if(_0x4629d1['includes'](_0x257397))return!0x0;const _0x3be311=_0x257397['split']('.');return _0x4629d1['filter'](_0x5c9362=>_0x5c9362['includes']('*'))['map'](_0x215240=>_0x215240['split']('.'))['filter'](_0x1fa870=>_0x1fa870['length']<=_0x3be311['length'])['map'](_0x312146=>Array(_0x3be311['length']-_0x312146['length'])['fill']('*'===_0x312146[0x0]?'*':'')['concat'](_0x312146))['some'](_0x1fec6a=>_0x3be311['every']((_0x3c0bea,_0x1cdfab)=>_0x1fec6a[_0x1cdfab]===_0x3c0bea||'*'===_0x1fec6a[_0x1cdfab]));}function _0x60d50d(){return _0x46c7f6&&_0x3e719a?new window['Promise']((_0x106fad,_0x4bab83)=>{_0x46c7f6['then'](_0x106fad,_0x4bab83),_0x3e719a['then'](_0x159b77=>{'Valid'!=_0x159b77&&_0x106fad(_0x159b77);},_0x4bab83);}):_0x46c7f6||_0x3e719a||'Valid';}}function _0x5891bb(_0x36108f,_0xe19bc0){return new window['Promise'](_0x42d303=>{if(_0x1bd594())return _0x42d303('Valid');_0x2aaee9(),_0x3405cb['decorate']('_sendUsageRequest');let _0x3a8b4d=!0x1;const _0x33a597=_0x5c5379();function _0x287bc1(_0x1e0cf5){return!!_0x1e0cf5&&('object'==typeof _0x1e0cf5||'function'==typeof _0x1e0cf5)&&'function'==typeof _0x1e0cf5['then']&&'function'==typeof _0x1e0cf5['catch'];}function _0x64706b(_0x4b5f2f){_0x1ba577(_0x4b5f2f)['then'](_0x3ac5fa=>_0x3ac5fa&&'ok'==_0x3ac5fa['status']?_0x2fc028(_0x5918c8(_0x33a597+_0xe19bc0))!=_0x3ac5fa['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x1a07eb=>(_0x26dea3(),_0x1a07eb),()=>{const _0x38840f=_0x493a7f();return null==_0x38840f?(_0x26dea3(),'Valid'):_0x47c0de-_0x38840f>0x240c8400?'UsageLimit':'Valid';})['then'](_0x42d303)['catch'](()=>{_0x42d303('UsageLimit');});const _0x1ce2d2=0x36ee80;function _0x26dea3(){const _0x566c60='llct-'+_0x2fc028(_0x5918c8(_0x36108f)),_0x484bc5=_0x2c4270(_0x2fc028(window['Math']['ceil'](_0x47c0de/_0x1ce2d2)));window['localStorage']['setItem'](_0x566c60,_0x484bc5);}function _0x493a7f(){const _0x26eb80='llct-'+_0x2fc028(_0x5918c8(_0x36108f)),_0xa71e89=window['localStorage']['getItem'](_0x26eb80);return _0xa71e89?window['parseInt'](_0x2c4270(_0xa71e89),0x10)*_0x1ce2d2:null;}function _0x1ba577(_0x260dbb){return new window['Promise']((_0x113418,_0x557f89)=>{_0x260dbb['then'](_0x113418,_0x557f89),window['setTimeout'](_0x557f89,0x1d4c0);});}}_0x3405cb['on']('_sendUsageRequest',(_0x1a550a,_0x15c898)=>{if(_0x15c898[0x0]!=_0x36108f)return _0x42d303('UsageLimit');_0x15c898[0x1]={..._0x15c898[0x1],'requestId':_0x33a597};},{'priority':'high'}),_0x3405cb['on']('_sendUsageRequest',_0x5e2314=>{_0x287bc1(_0x5e2314['return'])&&(_0x3a8b4d=!0x0,_0x64706b(_0x5e2314['return']));},{'priority':'low'}),_0x198b82['then'](()=>{_0x3a8b4d||_0x42d303('UsageLimit');});});function _0x1bd594(){return'auto'==_0x3405cb['editing']['view']['_overlayModeHint'];}function _0x2aaee9(){_0x3405cb['editing']['view']['_overlayModeHint']='auto';}}function _0x231123(_0x3173c8){const _0x1ab79c=[new window['Promise'](_0x2779d8=>setTimeout(_0x2779d8,0x93ecc)),_0x198b82['then'](()=>new window['Promise'](_0x21f324=>{let _0x4c5f72=0x0;_0x3405cb['model']['on']('applyOperation',(_0x3812f9,_0x281cab)=>{_0x281cab[0x0]['isDocumentOperation']&&_0x4c5f72++,0x5e8==_0x4c5f72&&(_0x21f324(),_0x3812f9['off']());});}))];return window['Promise']['race'](_0x1ab79c)['then'](()=>_0x3173c8);}async function _0x319b35(){await _0x198b82,_0x3405cb['model']['change']=_0x12c4e5,_0x3405cb['model']['enqueueChange']=_0x12c4e5,_0x3405cb['enableReadOnlyMode']('model');}function _0x363ef2(){return window['glob']&&window['glob']['triliumVersion'];}function _0x2815a0(){return _0x4113c3('WebSocketGateway')&&'connected'==_0x185c0c('WebSocketGateway')['state'];}function _0x14cb30(){return _0x4113c3('RevisionViewerIntegration');}function _0x11ab61(){return _0x4113c3('TrackChangesDataGetter');}function _0x482285(_0x12d925){const _0x3d0638=_0x1625fb();_0x3405cb[_0x3d0638]='commentsLicenseKey'+_0x12d925,'Valid'!=_0x12d925&&_0x319b35();}function _0x1625fb(){const _0x4e1539=window['String'](window['performance']['now']())['replace']('.','');let _0x224c9f='K';for(let _0x3ebd78=0x0;_0x3ebd78<_0x4e1539['length'];_0x3ebd78+=0x2){let _0x9586dc=window['parseInt'](_0x4e1539['substring'](_0x3ebd78,_0x3ebd78+0x2));_0x9586dc>=0x3e&&(_0x9586dc-=0x3e),_0x224c9f+=_0x42c918[_0x9586dc];}return _0x224c9f;}function _0x41123e(){const _0x599b1e=_0x66aa4d['split']('.');if(0x3!=_0x599b1e['length'])return null;return _0x359b7b(_0x599b1e[0x1]);function _0x359b7b(_0x2c8bf8){const _0x31e746=_0x42ed41(_0x2c8bf8);return _0x31e746&&_0x2315fb()?_0x31e746:null;function _0x2315fb(){const _0x12b087=_0x31e746['jti'],_0x30cfcb=window['parseInt'](_0x12b087['substring'](_0x12b087['length']-0x8),0x10),_0x464bb3={..._0x31e746,'jti':_0x12b087['substring'](0x0,_0x12b087['length']-0x8)};return delete _0x464bb3['vc'],_0x5918c8(_0x464bb3)==_0x30cfcb;}}}async function _0x3d83c3(){let _0x2773e5=!0x0;try{const [_0xa260e9,_0x5fbfc6,_0x3b6a3b]=_0x66aa4d['split']('.');return _0x51a6db(_0xa260e9),await _0x44fecc(_0xa260e9,_0x5fbfc6,_0x3b6a3b),_0x2773e5;}catch{return!0x1;}function _0x51a6db(_0x48ffae){const _0x559bb3=_0x42ed41(_0x48ffae);_0x559bb3&&'ES256'==_0x559bb3['alg']||(_0x2773e5=!0x1);}async function _0x44fecc(_0x25cd29,_0x144365,_0xbdbfdb){const _0x3a1919=window['Uint8Array']['from'](_0x19622f(_0xbdbfdb),_0x665592=>_0x665592['charCodeAt'](0x0)),_0x4fecfc=new window['TextEncoder']()['encode'](_0x25cd29+'.'+_0x144365),_0x214d6e=window['crypto']['subtle'];if(!_0x214d6e)return;const _0x33dd7a=await _0x214d6e['importKey']('jwk',_0x1ec23c,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x214d6e['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x33dd7a,_0x3a1919,_0x4fecfc)||(_0x2773e5=!0x1);}}function _0x42ed41(_0x4eda5e){return _0x4eda5e['startsWith']('ey')?JSON['parse'](_0x19622f(_0x4eda5e)):null;}function _0x19622f(_0x3fe8c4){return window['atob'](_0x3fe8c4['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x5918c8(_0xf662d2){let _0x5f1638=0x1505;function _0x4b62d5(_0x23f83f){for(let _0x32a347=0x0;_0x32a347<_0x23f83f['length'];_0x32a347++){const _0x1ad97b=_0x23f83f['charCodeAt'](_0x32a347);_0x5f1638=(_0x5f1638<<0x5)+_0x5f1638+_0x1ad97b,_0x5f1638&=_0x5f1638;}}function _0x1f2526(_0x303ccb){Array['isArray'](_0x303ccb)?_0x303ccb['forEach'](_0x1f2526):_0x303ccb&&'object'==typeof _0x303ccb?Object['entries'](_0x303ccb)['sort']()['forEach'](([_0x266992,_0x5213d9])=>{_0x4b62d5(_0x266992),_0x1f2526(_0x5213d9);}):_0x4b62d5(window['String'](_0x303ccb));}return _0x1f2526(_0xf662d2),_0x5f1638>>>0x0;}function _0x2fc028(_0x5eab95){return _0x5eab95['toString'](0x10)['padStart'](0x8,'0');}function _0x2c4270(_0x146617){return _0x146617['split']('')['reverse']()['join']('');}function _0x4113c3(_0x477307){return _0x3405cb['plugins']['has'](_0x477307);}function _0x185c0c(_0x37e647){return _0x3405cb['plugins']['get'](_0x37e647);}function _0x12c4e5(){}_0x482285(await _0x30e8b5());}(this);}destroy(){const _0x28ce22=this['editor']['plugins']['get'](oi),_0x52a548=this['editor']['config']['get']('collaboration.channelId');for(const _0x3c57d1 of _0x28ce22['getCommentThreads']({'channelId':_0x52a548}))_0x28ce22['_detachCommentThread'](_0x3c57d1['id']),_0x28ce22['_threads']['delete'](_0x3c57d1['id']);super['destroy']();}['hasMarkerForId'](_0x1c6780){return this['getAllMarkersForId'](_0x1c6780)['length']>0x0;}getAllMarkersForId(_0x384b60){const _0x93bbe9=[];for(const _0x2c2c6c of this['editor']['model']['markers'])_0x2c2c6c['name']['startsWith']('comment:'+_0x384b60)&&_0x93bbe9['push'](_0x2c2c6c);return _0x93bbe9;}['scrollToThreadMarker'](_0x1077f4){setTimeout(()=>{const _0x4f4b0c=this['_getTargetForId'](_0x1077f4);_0x4f4b0c&&this['activeMarker']&&fi(this['activeMarker'])['id']===_0x1077f4&&_0x47daa2({'target':_0x4f4b0c[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}_reconvertMarkers(_0x72631b){this['editor']['model']['change'](()=>{for(const _0x8b12c7 of this['getAllMarkersForId'](_0x72631b))this['editor']['editing']['reconvertMarker'](_0x8b12c7);});}_attachArchivedThread(_0x47207d){const _0x3fa190=this['editor']['plugins']['get'](oi),_0x73538f=this['editor']['plugins']['get'](di),_0x360bda=_0x3fa190['getCommentThread'](_0x47207d);if(!_0x360bda['isAttached']){const _0xc2ec4=_0x360bda['attachTo'](()=>this['_getTargetForId'](_0x360bda['id']));_0x73538f['registerAnnotation'](_0xc2ec4),_0x360bda['_hasTargetInContent']=!0x1;}}_initializeMarkerConverters(){const _0x3a718f=this['editor'],_0x1299de=_0x3a718f['plugins']['get'](_0x1b2b4f);_0x3a718f['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x386a07,_0x513dc2)=>{const {id:_0x2006d5}=fi(_0x386a07['markerName']),_0x5c0f46=_0x3a718f['plugins']['get'](oi)['getCommentThread'](_0x2006d5),_0x30880a=this['activeMarker']&&fi(this['activeMarker'])['id']===_0x2006d5;let _0x29ffc5;if(_0x5c0f46&&_0x5c0f46['isResolved']&&!_0x30880a&&_0x386a07['item'])return _0x513dc2['consumable']['consume'](_0x386a07['item'],'addMarker:'+_0x386a07['markerName']),_0x513dc2['consumable']['consume'](_0x386a07['item'],'removeMarker:'+_0x386a07['markerName']),null;const _0x17b3ab=['ck-comment-marker'];return _0x30880a&&_0x17b3ab['push']('ck-comment-marker--active'),_0x29ffc5=_0x5c0f46?.['length']?_0x5c0f46['comments']['first']['author']['id']:_0x1299de['me']['id'],{'classes':_0x17b3ab,'attributes':{'data-comment':_0x2006d5,'data-author-id':_0x29ffc5}};}}),_0x3a718f['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x2bffcb,{options:_0x232f18})=>{if(_0x232f18['showCommentHighlights'])return null;const _0x3a45db=_0x3a718f['plugins']['get'](oi),_0x5043ab=_0x3a718f['model']['markers']['get'](_0x2bffcb),{id:_0xf37d23,part:_0x2037ab}=fi(_0x2bffcb);return _0x5043ab&&!_0x5043ab['affectsData']||_0x232f18['ignoreResolvedComments']&&_0x3a45db['getCommentThread'](_0xf37d23)?.['isResolved']?null:{'group':'comment','name':_0x2037ab?_0xf37d23+':'+_0x2037ab:_0xf37d23};}}),_0x3a718f['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x4e4382,{writer:_0x27fe52})=>_0x27fe52['createElement']('$marker',{'data-name':'comment:'+_0x4e4382['getAttribute']('id')})}),_0x3a718f['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x4e59bf=this['editor'],_0x26a40d=_0x4e59bf['plugins']['get'](oi),_0x46e437=new Set(),_0x36dd6b=new Set();_0x4e59bf['model']['document']['registerPostFixer'](_0x55d420=>{let _0x25b5e0=!0x1;for(const {name:_0x14e7ed,data:_0x4ea030}of _0x4e59bf['model']['document']['differ']['getChangedMarkers']()){const {group:_0x271a40,id:_0xc97e57}=fi(_0x14e7ed);let _0x225315=_0x4ea030['newRange'];if('comment'!==_0x271a40||!_0x225315)continue;const _0x233496='$graveyard'===_0x225315['root']['rootName'];_0x233496||(_0x225315=_i(_0x225315,_0x4e59bf['model']),!_0x225315||_0x225315['isCollapsed']||!_0x4ea030['newRange']||_0x225315['isEqual'](_0x4ea030['newRange']))?_0x4e59bf['model']['hasContent'](_0x225315)&&!_0x233496?this['isThreadsLoadingPaused']?_0x46e437['add'](_0x14e7ed):this['_handleThreadMarker'](_0x14e7ed,_0xc97e57):(_0x36dd6b['add'](_0x14e7ed),_0x46e437['delete'](_0x14e7ed),_0x55d420['removeMarker'](_0x14e7ed),_0x25b5e0=!0x0):(_0x55d420['updateMarker'](_0x14e7ed,{'range':_0x225315}),_0x25b5e0=!0x0);}return _0x25b5e0;}),this['on']('change:isThreadsLoadingPaused',(_0x3c69c0,_0x5d5d72,_0x258f9a)=>{if(!_0x258f9a&&_0x46e437['size'])for(const _0x2744fc of _0x46e437){const {id:_0x3cee03}=fi(_0x2744fc);_0x46e437['delete'](_0x2744fc),_0x4e59bf['model']['markers']['get'](_0x2744fc)&&this['_handleThreadMarker'](_0x2744fc,_0x3cee03);}}),this['listenTo'](_0x4e59bf['model']['document'],'change',()=>{for(const {name:_0xb44f0c,data:{newRange:_0x3d9521}}of _0x4e59bf['model']['document']['differ']['getChangedMarkers']()){const {group:_0x10e75d,id:_0xa4930c}=fi(_0xb44f0c);if('comment'!==_0x10e75d)continue;const _0x7d99c0=_0x26a40d['getCommentThread'](_0xa4930c),_0x14eaae=this['hasMarkerForId'](_0xa4930c);_0x7d99c0&&(!_0x7d99c0['_hasTargetInContent']&&_0x3d9521&&_0x4e59bf['editing']['view']['once']('render',()=>{const _0x8c1591=_0x4e59bf['plugins']['get'](ti),_0x2d3a3f=_0x26a40d['_threadToController']['get'](_0x7d99c0)['view'];_0x8c1591['getByInnerView'](_0x2d3a3f)['refreshVisibility']();},{'priority':'low'}),_0x7d99c0['_hasTargetInContent']=_0x14eaae||!!_0x3d9521),_0x3d9521||(_0x36dd6b['add'](_0xb44f0c),_0x46e437['delete'](_0xb44f0c));}for(const _0x537da8 of _0x36dd6b){const {id:_0x21da40}=fi(_0x537da8),_0x31e7c8=_0x26a40d['getCommentThread'](_0x21da40);if(_0x46e437['delete'](_0x537da8),!_0x31e7c8)continue;const _0x49a889=this['hasMarkerForId'](_0x21da40);_0x49a889||_0x31e7c8['isSubmitted']?_0x49a889||_0x31e7c8['unlinkedAt']||_0x31e7c8['setUnlinkedAt'](new Date()):_0x31e7c8['remove']();}_0x36dd6b['clear']();});}_handleInitialThreads(_0x38cc85){_0x38cc85['forEach'](_0x4da1c2=>{_0x4da1c2['unlinkedAt']&&this['_attachArchivedThread'](_0x4da1c2['id']);});}_getTargetForId(_0x5a304f){const _0x5630a6=this['editor'],_0x5ed416=this['getAllMarkersForId'](_0x5a304f);return _0x3d1e87(_0x5630a6['editing'],_0x5ed416);}_getTextContext(_0x271a13){const _0x33c036=this['getAllMarkersForId'](_0x271a13);let _0x3968a2='',_0x3c9ff8=!0x1;for(const _0x57cd9b of _0x33c036){const _0x5587e8=_0x57cd9b['getRange']();for(const _0x34c73f of Array['from'](_0x5587e8['getItems']()))_0x34c73f['is']('$textProxy')?(_0x3968a2&&_0x3c9ff8&&(_0x3968a2+='\x20',_0x3c9ff8=!0x1),_0x3968a2+=_0x34c73f['data']):_0x3c9ff8=!0x0;_0x3c9ff8=!0x0;}return _0x3968a2['substring'](0x0,0x96);}_attachMarkerToThread(_0xccd617,_0x452394){const _0x2d0698=this['editor'],_0x4bf897=_0x2d0698['plugins']['get'](oi);let _0x78e103=_0x4bf897['getCommentThread'](_0x452394);const _0x14562e=_0x2d0698['config']['get']('collaboration.channelId'),_0x248a28=_0x2d0698['plugins']['get'](di);return _0x78e103&&(_0x78e103['unlinkedAt']&&_0x78e103['setUnlinkedAt'](null),_0x78e103['isAttached'])||(this['getAllMarkersForId'](_0x452394)[0x0]['managedUsingOperations']?_0x4bf897['fetchCommentThread']({'channelId':_0x14562e,'threadId':_0x452394})['then'](_0x5f49a0=>{if('destroyed'!==_0x2d0698['state']){if(_0x78e103=_0x5f49a0,_0x78e103&&!_0x78e103['isAttached']){const _0x33ca28=_0x78e103['attachTo'](()=>this['_getTargetForId'](_0x452394));_0x248a28['registerAnnotation'](_0x33ca28),_0x78e103['isResolved']&&this['_reconvertMarkers'](_0x452394);}else{if(!_0x78e103){const _0x383099=this['getAllMarkersForId'](_0x452394);_0x2d0698['model']['change'](_0x509cc5=>{for(const _0x2a2761 of _0x383099)_0x509cc5['removeMarker'](_0x2a2761);});}}}}):_0x2d0698['editing']['view']['once']('render',()=>{if(_0x4bf897['getCommentThread'](_0x452394))return;const _0x1c1da0=_0x2d0698['plugins']['get'](ti);_0x78e103=_0x4bf897['openNewCommentThread']({'channelId':_0x14562e,'threadId':_0x452394,'target':()=>this['_getTargetForId'](_0x452394),'context':{'type':'text','value':this['_getTextContext'](_0x452394)}});const _0x462404=_0x4bf897['_threadToController']['get'](_0x78e103)['view'],_0x2cdc87=_0x1c1da0['getByInnerView'](_0x462404);_0x2cdc87&&_0x248a28['registerAnnotation'](_0x2cdc87);},{'priority':'low'})),_0x78e103;}['_handleThreadMarker'](_0x33162e,_0x383abd){const _0x36e01c=this['_attachMarkerToThread'](_0x33162e,_0x383abd);_0x36e01c&&!_0x36e01c['context']&&_0x36e01c['setContext']({'type':'text','value':this['_getTextContext'](_0x383abd)});}_initAriaMarkerChangeAnnouncements(){const _0x3f6d19=this['editor'];_0x18a7fa(_0x3f6d19['model'],({left:_0x19a307,entered:_0x104a55})=>{for(const _0x149789 of _0x19a307)if(Ai(_0x149789)){_0x3f6d19['ui']['ariaLiveAnnouncer']['announce'](Et(_0x3f6d19['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x65a6b2 of _0x104a55)if(Ai(_0x65a6b2)){_0x3f6d19['ui']['ariaLiveAnnouncer']['announce'](Et(_0x3f6d19['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x2a76af(_0x2f9b22)));break;}});}};function gi(_0x4186a8,_0x2c775c){return _0x2c775c?_0x4186a8+':'+_0x2c775c:_0x4186a8;}function _i(_0x89eaa4,_0x2f0233){const _0x542b12=_0x2f0233['schema'],_0x78dfd6=_0x2f0233['createRange'](_0x89eaa4['start']);for(const _0x36173d of _0x89eaa4['getWalker']()){const {type:_0x4b7493,item:_0x197932,nextPosition:_0x29f1ae}=_0x36173d;if('text'===_0x4b7493||_0x542b12['isObject'](_0x197932)){const _0x2e711c=_0x2f0233['createPositionBefore'](_0x197932);_0x78dfd6['isCollapsed']&&(_0x78dfd6['start']=_0x2e711c),_0x78dfd6['end']=_0x29f1ae;}}return _0x78dfd6;}function Ai(_0x583671){return'comment'===fi(_0x583671['name'])['group'];}var vi=class extends _0x3de2ea{['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 _0x188a1e=this['editor'],_0x52fdfa=_0x188a1e['plugins']['get'](oi),_0x40d8c9=_0x188a1e['plugins']['get'](wi),_0x28e3d8=_0x188a1e['plugins']['get'](ti),_0x4557ea=_0x188a1e['plugins']['get'](di);_0x188a1e['ui']['componentFactory']['add']('comment',()=>{const _0x5862b8=this['_createUIButton'](_0x126747);return _0x5862b8['tooltip']=!0x0,_0x5862b8;}),_0x188a1e['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](rt)),_0x4557ea['addSourceCollector'](()=>{const _0x5cfc39=[];for(const [_0x4405c2,_0x48fdae]of _0x52fdfa['_threadToController']){const _0x372db0=_0x40d8c9['getAllMarkersForId'](_0x4405c2['id']),_0x5725d2=_0x372db0['map'](_0x5544bd=>_0x5544bd['getRange']());_0x372db0['length']>0x0&&_0x5cfc39['push']([_0x48fdae['view'],_0x5725d2]);}return _0x5cfc39;}),this['listenTo'](_0x28e3d8,'change:activeAnnotations',(_0x54441a,_0x14fa4b,_0x1616d7)=>{const _0x1b02ca=Array['from'](_0x1616d7)['map'](_0x58a74f=>_0x58a74f['innerView'])['find'](_0x1eb201=>_0x52fdfa['_viewToController']['has'](_0x1eb201));if(!_0x1b02ca)return void(_0x40d8c9['activeMarker']=null);const _0x2b2db0=_0x52fdfa['_viewToController']['get'](_0x1b02ca)['model']['id'],_0x538bc7='comment:'+_0x2b2db0;_0x2b2db0&&_0x40d8c9['hasMarkerForId'](_0x2b2db0)?_0x40d8c9['activeMarker']=_0x538bc7:_0x40d8c9['activeMarker']&&(_0x40d8c9['activeMarker']=null);}),this['listenTo'](_0x52fdfa,'removeCommentThread',(_0x3f22a6,{threadId:_0x174552,isFromAdapter:_0x4cbee7})=>{!_0x4cbee7&&_0x188a1e['ui']['focusTracker']['isFocused']&&_0x40d8c9['hasMarkerForId'](_0x174552)&&_0x188a1e['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x52fdfa,'addComment',(_0x2bf2b6,{threadId:_0x2dd3e8,isFromAdapter:_0x2bae53})=>{!_0x2bae53&&_0x40d8c9['hasMarkerForId'](_0x2dd3e8)&&_0x52fdfa['hasCommentThread'](_0x2dd3e8)&&0x1===_0x52fdfa['getCommentThread'](_0x2dd3e8)['length']&&(_0x188a1e['editing']['view']['focus'](),_0x2bf2b6['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x371fc3=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x27922d;for(const _0x3f85b1 in _0x371fc3){const _0x1afd28=_0x3f85b1,_0x332c9f=_0x371fc3[_0x1afd28];if('commentsLicenseKeyValid'==_0x332c9f||'commentsLicenseKeyInvalid'==_0x332c9f||'commentsLicenseKeyExpired'==_0x332c9f||'commentsLicenseKeyDomainLimit'==_0x332c9f||'commentsLicenseKeyNotAllowed'==_0x332c9f||'commentsLicenseKeyEvaluationLimit'==_0x332c9f||'commentsLicenseKeyUsageLimit'==_0x332c9f){delete _0x371fc3[_0x1afd28],_0x27922d=_0x332c9f,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x27922d&&_0x371fc3['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x27922d&&_0x371fc3['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x27922d&&_0x371fc3['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x27922d&&_0x371fc3['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x27922d&&_0x371fc3['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x27922d&&_0x371fc3['_showLicenseError']('usageLimit');},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_createUIButton(_0x2e52f2){const _0x5070af=this['editor'],_0x1263b6=new _0x2e52f2(_0x5070af['locale']),_0x23f260=_0x5070af['commands']['get']('addCommentThread');return _0x1263b6['set']({'label':Et(_0x5070af['locale'],'Comment'),'icon':_0x5e7948}),_0x1263b6['bind']('isEnabled')['to'](_0x23f260,'isEnabled',_0x23f260,'hasContent',(_0x36fa0c,_0x428241)=>_0x36fa0c&&_0x428241),this['listenTo'](_0x1263b6,'execute',()=>{_0x23f260['execute']();}),_0x1263b6;}},yi=class extends _0x3de2ea{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[wi];}constructor(_0x5c7e84){super(_0x5c7e84),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x433f15,_0x16e6b1,_0x1762d0)=>{_0x1762d0?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}afterInit(){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}_enableCommentsOnlyMode(){for(const [_0x5096ba,_0x14bf0a]of this['editor']['commands'])_0x14bf0a['affectsData']&&'addCommentThread'!==_0x5096ba&&_0x14bf0a['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 _0x4de317=this['editor']['editing']['view']['document'];this['listenTo'](_0x4de317,'cut',_0x1b800b=>_0x1b800b['stop'](),{'priority':'highest'}),this['listenTo'](_0x4de317,'clipboardInput',_0xd3aa6c=>_0xd3aa6c['stop'](),{'priority':'highest'}),this['listenTo'](_0x4de317,'delete',_0x5db564=>_0x5db564['stop'](),{'priority':'highest'});}_disableCommentsOnlyMode(){for(const [_0x34b5d0,_0x12a3c6]of this['editor']['commands'])_0x12a3c6['affectsData']&&'addCommentThread'!==_0x34b5d0&&_0x12a3c6['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 _0x333ed9{activeUIs;uisData;['_uis'];static get requires(){return[ti];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x51f57d){super(_0x51f57d),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}init(){const _0x48d548=this['context']['plugins']['get'](ti);this['listenTo'](_0x48d548,'_activateAnnotation',(_0xb46ffc,_0x2ad97)=>{for(const _0x4b4179 of this['activeUIs']){const _0x1b6891=this['_uis']['get'](_0x4b4179);(0x0,this['uisData']['get'](_0x4b4179)['filter'])(_0x2ad97)&&_0x1b6891['setActiveAnnotation'](_0x2ad97);}}),this['listenTo'](_0x48d548,'_deactivateAllAnnotations',()=>{for(const _0x4c1194 of this['activeUIs'])this['_uis']['get'](_0x4c1194)['setActiveAnnotation'](null);}),this['listenTo'](_0x48d548['_visibleAnnotations'],'add',(_0x913676,_0x6d38b3)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x6d38b3);});}hasActive(){return this['activeUIs']['size']>0x0;}isActive(_0x57b008){return this['activeUIs']['has'](_0x57b008);}activate(_0x45e8bb,_0x445719=this['defaultFilter']){const _0x77d065=this['context']['plugins']['get'](ti);if(!this['_uis']['has'](_0x45e8bb))throw new _0x50ddc5('annotationsuis-missing-ui',this,{'uiName':_0x45e8bb});this['isActive'](_0x45e8bb)&&this['deactivate'](_0x45e8bb),this['activeUIs']['add'](_0x45e8bb);const _0x3cc206=new Jt();Qt({'source':_0x77d065['_visibleAnnotations'],'target':_0x3cc206,'filter':_0x445719}),this['uisData']['set'](_0x45e8bb,{'collection':_0x3cc206,'filter':_0x445719});const _0x594c7d=this['_uis']['get'](_0x45e8bb);_0x594c7d['attach'](_0x3cc206),this['listenTo'](_0x594c7d,'change:activeAnnotation',(_0x3c315c,_0x127018,_0x73788d,_0x4d7c06)=>{_0x4d7c06&&_0x77d065['_removeActiveAnnotation'](_0x4d7c06),_0x73788d&&_0x77d065['_addActiveAnnotation'](_0x73788d);});}deactivate(_0x7077a2){if(this['activeUIs']['delete'](_0x7077a2),!this['_uis']['has'](_0x7077a2))throw new _0x50ddc5('annotationsuis-missing-ui',this,{'uiName':_0x7077a2});const _0x466594=this['_uis']['get'](_0x7077a2);_0x466594['detach'](),this['stopListening'](_0x466594),this['uisData']['get'](_0x7077a2)['collection']['destroy'](),this['uisData']['delete'](_0x7077a2);}switchTo(_0x215b67){if(!this['_uis']['has'](_0x215b67))throw new _0x50ddc5('annotationsuis-missing-ui',this,{'uiName':_0x215b67});const _0x2500a8=this['context']['plugins']['get'](ti),_0x3b7c92=Array['from'](_0x2500a8['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x215b67);const _0x597a2c=this['_uis']['get'](_0x215b67);_0x597a2c['setActiveAnnotation'](_0x3b7c92),_0x597a2c['_setSelectedAnnotations']&&_0x3b7c92&&_0x597a2c['_setSelectedAnnotations']([_0x3b7c92]);}deactivateAll(){for(const _0x11637b of this['activeUIs'])this['deactivate'](_0x11637b);}register(_0x21c653,_0x400228){if(this['_uis']['has'](_0x21c653))throw new _0x50ddc5('annotationsuis-register-already-registered');if('function'!=typeof _0x400228['attach']||'function'!=typeof _0x400228['detach']||'function'!=typeof _0x400228['setActiveAnnotation'])throw new _0x50ddc5('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x21c653,_0x400228);}refilterAnnotations(){const _0x3a2ce0=this['context']['plugins']['get'](ti)['collection'],_0xecbd27=new Map(),_0x8a99a=Array['from'](this['activeUIs']);for(const _0x30084b of this['activeUIs']){const _0x26a0af=this['uisData']['get'](_0x30084b)['collection'];for(const _0x110495 of _0x26a0af)_0xecbd27['set'](_0x110495,_0x30084b);}for(const _0x568240 of _0x3a2ce0){const _0x3d04f0=_0xecbd27['get'](_0x568240);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x568240);const _0x17f510=_0x8a99a['find'](_0x1f454a=>this['uisData']['get'](_0x1f454a)['filter'](_0x568240));_0x3d04f0!==_0x17f510&&(_0x3d04f0&&this['uisData']['get'](_0x3d04f0)['collection']['remove'](_0x568240),_0x17f510&&this['uisData']['get'](_0x17f510)['collection']['add'](_0x568240));}}destroy(){this['deactivateAll'](),super['destroy']();}defaultFilter(){return!0x0;}_assertAnnotationDoesNotBelongToMultipleUIs(_0x1dff6a){const _0x555fb9=[];for(const _0x22f334 of this['activeUIs']){(0x0,this['uisData']['get'](_0x22f334)['filter'])(_0x1dff6a)&&_0x555fb9['push'](_0x22f334);}if(_0x555fb9['length']>0x1)throw new _0x50ddc5('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x555fb9,'annotationType':_0x1dff6a['type']});}};const Ci=/* #__PURE__ -- @preserve */
32
+ _0x3e4b52('px');var Ii=class extends ht{list;['focusables'];['focusTracker'];['focusCycler'];constructor(_0x170057){super(_0x170057);const _0x149de1=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 _0x1d3923(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x149de1['to']('class')],'style':{'minHeight':_0x149de1['to']('minHeight',_0x3727bc=>'number'==typeof _0x3727bc?Ci(_0x3727bc+0xa):null)},'dir':_0x170057['uiLanguageDirection'],'role':'application','aria-label':Et(_0x170057,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':Et(_0x170057,'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',_0xd88871=>{this['_updateItemPositionInFocusables'](_0xd88871['source']);}),this['list']['forEach'](_0x561d58=>{this['focusTracker']['add'](_0x561d58['element']),this['_updateItemPositionInFocusables'](_0x561d58);}),this['list']['on']('change',(_0x230fab,_0x4065d7)=>{for(const _0x29db4d of _0x4065d7['removed'])this['focusTracker']['remove'](_0x29db4d['element']),this['focusables']['remove'](_0x29db4d);for(const _0x38edcb of _0x4065d7['added'])this['focusTracker']['add'](_0x38edcb['element']),this['_updateItemPositionInFocusables'](_0x38edcb);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}_updateItemPositionInFocusables(_0x138c76){const _0x1d1923=this['focusables']['getIndex'](_0x138c76);let _0x4e2643,_0x1b5a9d;for(const _0xa72fa9 of this['focusables'])if(_0x138c76['top']<_0xa72fa9['top']){_0x4e2643=_0xa72fa9;break;}if(_0x1b5a9d=_0x4e2643?this['focusables']['getIndex'](_0x4e2643):this['focusables']['length'],-0x1!==_0x1d1923){if(_0x1d1923===_0x1b5a9d-0x1)return;this['focusables']['remove'](_0x138c76),_0x1b5a9d=_0x4e2643?this['focusables']['getIndex'](_0x4e2643):this['focusables']['length'];}this['focusables']['add'](_0x138c76,_0x1b5a9d);}};const bi=/* #__PURE__ -- @preserve */
33
+ _0x3e4b52('px');var Ei=class extends ht{content;_targetTop;_mutationObserver;constructor(_0x355666){super(_0x355666),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x15811e,_0x121770)=>_0x15811e+_0x121770),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x204b34=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x204b34['to']('isAnimationDisabled',_0x1ea946=>_0x1ea946?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x204b34['to']('top',_0x294967=>bi(_0x294967))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}updateHeight(){const _0x2996da=this['element']['clientHeight'];_0x2996da&&(this['height']=_0x2996da);}destroy(){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},ki=class extends _0x333ed9{['view'];_activeAnnotation;_annotations;_spaceBetweenItems;_sidebarItemViewToAnnotation;_annotationToSidebarItemView;_recalculateBuffer;static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x475c1b){super(_0x475c1b),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 _0x48a3da=this['context']['config']['get']('sidebar.container');_0x48a3da&&this['setContainer'](_0x48a3da);}setContainer(_0x53182c){if(!Oi(_0x53182c))throw new _0x50ddc5('sidebar-setcontainer-invalid-element');this['container']=_0x53182c;}_attachToContainer({viewClass:_0x5dd142='',spaceBetweenItems:_0x4960a9=0x19}={}){if(!Oi(this['container']))throw new _0x50ddc5('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x5dd142,this['_spaceBetweenItems']=_0x4960a9;}['rearrange']({removedAnnotation:_0x1e6b07,previousAnnotation:_0xa6e9cc,nextAnnotation:_0x1d6394}){const _0x471dbd=this['getSidebarItemView'](_0x1e6b07);this['view']['list']['remove'](_0x471dbd),this['_destroySidebarItemView'](_0x1e6b07),_0xa6e9cc&&this['_alignToTargetRect'](this['getSidebarItemView'](_0xa6e9cc)),_0x1d6394&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x1d6394)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0xa52e70,activatedAnnotation:_0x3dcfa0,disableAnimationOnActivatedAnnotation:_0x4d8fd2}){if(this['_activeAnnotation']=_0x3dcfa0,_0xa52e70){_0xa52e70['isActive']=!0x1;const _0x18750f=this['getSidebarItemView'](_0xa52e70);_0x18750f&&_0x4d8fd2&&(_0x18750f['isAnimationDisabled']=!0x1);}if(_0x3dcfa0){const _0x1d1a65=this['getSidebarItemView'](_0x3dcfa0);_0x1d1a65&&(_0x3dcfa0['isActive']=!0x0,_0x4d8fd2&&(_0x1d1a65['isAnimationDisabled']=!0x0,_0x1d1a65['top']+=0x1),this['_alignToTargetRect'](_0x1d1a65));}}_detachFromContainer(_0x517b8e){if(this['view']['element']['remove'](),_0x517b8e){for(const _0x80925b of _0x517b8e)this['_destroySidebarItemView'](_0x80925b);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}addAnnotation(_0x9c0ec2,_0x309a0e){_0x309a0e||(_0x309a0e=_0x9c0ec2['view']);const _0x3ee239=new Ei(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x3ee239,_0x9c0ec2),this['_annotationToSidebarItemView']['set'](_0x9c0ec2,_0x3ee239),_0x3ee239['content']['add'](_0x309a0e),this['listenTo'](_0x9c0ec2['view'],'change:targetRect',(_0x46c7c9,_0x5590b6,_0x4162de)=>{const _0x12086a=this['_getTargetTop'](_0x9c0ec2,_0x4162de);_0x3ee239['_targetTop']!=_0x12086a&&(_0x3ee239['_targetTop']=_0x12086a,this['_setItemTop'](_0x3ee239,_0x12086a));}),this['listenTo'](_0x3ee239,'change:top',()=>{this['_recalculate'](_0x3ee239,'top');}),this['listenTo'](_0x3ee239,'change:bottom',()=>{this['_recalculate'](_0x3ee239,'bottom');}),this['_alignToTargetRect'](_0x3ee239);const _0x3042fe=this['_getItemBefore'](_0x3ee239);return _0x3042fe&&this['_alignAfterItem'](_0x3042fe,_0x3ee239)||this['_alignToTargetRect'](_0x3ee239),this['_updateLastItem'](),this['view']['list']['add'](_0x3ee239),_0x3ee239;}['_alignForTopChange'](_0x2855bf){if(!_0x2855bf['content']['length'])return;const _0xddf46f=this['_getItemBefore'](_0x2855bf);if(!_0xddf46f)return;const _0x270778=this['_sidebarItemViewToAnnotation']['get'](_0xddf46f),_0x500db0=this['_activeAnnotation'];_0x500db0&&_0x500db0===_0x270778?this['_alignAfterItem'](_0xddf46f,_0x2855bf):this['_alignBeforeItem'](_0x2855bf,_0xddf46f);}_alignForBottomChange(_0x299625){if(!_0x299625['content']['length'])return;const _0x1fa845=this['_getItemAfter'](_0x299625);if(!_0x1fa845)return;const _0x45adc1=this['_sidebarItemViewToAnnotation']['get'](_0x1fa845),_0x4eeabe=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0xca1b98=this['_activeAnnotation'];_0xca1b98&&_0xca1b98===_0x45adc1&&_0x4eeabe?(this['_alignBeforeItem'](_0x1fa845,_0x299625),this['_alignAfterItem'](_0x299625,_0x1fa845)):_0xca1b98&&_0xca1b98===_0x45adc1?this['_alignBeforeItem'](_0x1fa845,_0x299625):this['_alignAfterItem'](_0x299625,_0x1fa845);}_recalculate(_0x1ef073,_0x25e60f){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x4f891f,changedProp:_0x5897d0}of this['_recalculateBuffer'])'top'===_0x5897d0?this['_alignForTopChange'](_0x4f891f):this['_alignForBottomChange'](_0x4f891f);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x1ef073,'changedProp':_0x25e60f});}getSidebarItemView(_0x5d4754){return this['_annotationToSidebarItemView']['get'](_0x5d4754);}destroy(){this['stopListening'](),this['view']['destroy']();}_destroySidebarItemView(_0xbf3b83){const _0x244396=this['getSidebarItemView'](_0xbf3b83);this['stopListening'](_0x244396),this['stopListening'](_0xbf3b83['view']),_0x244396['destroy'](),this['_annotationToSidebarItemView']['delete'](_0xbf3b83),this['_sidebarItemViewToAnnotation']['delete'](_0x244396);}_createSidebarView(){const _0x219277=new Ii(this['context']['locale']);return _0x219277['render'](),this['on']('change:_lastItem',(_0x286b6f,_0x248675,_0x564b3f,_0x132d39)=>{_0x132d39&&_0x219277['unbind']('minHeight'),_0x564b3f?_0x219277['bind']('minHeight')['to'](_0x564b3f,'bottom'):_0x219277['minHeight']=null;}),_0x219277;}_updateLastItem(){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}_getItemBefore(_0x3aa4f4){const _0x151ed8=this['_sidebarItemViewToAnnotation']['get'](_0x3aa4f4),_0x4d2438=_0x151ed8&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x151ed8)-0x1);return _0x4d2438&&this['getSidebarItemView'](_0x4d2438)||null;}_getItemAfter(_0x1674db){const _0x5ca647=this['_sidebarItemViewToAnnotation']['get'](_0x1674db),_0xe6cbcb=_0x5ca647&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x5ca647)+0x1);return _0xe6cbcb&&this['getSidebarItemView'](_0xe6cbcb)||null;}_alignBeforeItem(_0x3ff250,_0x28db07){_0x3ff250['updateHeight']();const _0x11fab3=Ni(_0x28db07['bottom']+this['_spaceBetweenItems'],_0x3ff250['top']);return!!_0x11fab3&&(this['_setItemTop'](_0x28db07,_0x28db07['top']-_0x11fab3),!0x0);}_alignAfterItem(_0x4a651b,_0x311d38){_0x4a651b['updateHeight']();const _0x1ce55b=Ni(_0x4a651b['bottom']+this['_spaceBetweenItems'],_0x311d38['top']);return!!_0x1ce55b&&(this['_setItemTop'](_0x311d38,_0x311d38['top']+_0x1ce55b,!0x1),!0x0);}_alignToTargetRect(_0x298aa9){const _0x267da1=this['_sidebarItemViewToAnnotation']['get'](_0x298aa9);if(!_0x267da1||!_0x267da1['target']||!_0x267da1['targetRect'])return;const _0x29b9e5=this['_getTargetTop'](_0x267da1,_0x267da1['targetRect']);this['_setItemTop'](_0x298aa9,_0x29b9e5);}_getTargetTop(_0x50e41c,_0x3b75be){if(null===_0x3b75be)return 0x0;if(_0x50e41c['target']instanceof _0x2a80a4)return _0x3b75be['top'];{const _0x5f0eff=new _0x2a80a4(this['view']['element'])['top'];return _0x3b75be['top']-_0x5f0eff;}}_setItemTop(_0x2692cd,_0x39e4e4,_0x546db8=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x546db8&&(_0x39e4e4=Math['max'](_0x39e4e4,this['_getMaxAvailableTop'](_0x2692cd))),_0x2692cd['top']=_0x39e4e4;}_getMaxAvailableTop(_0x3ada0e){let _0x3ac9ab=this['_getItemBefore'](_0x3ada0e),_0x28266d=0x0;for(;_0x3ac9ab;)_0x3ac9ab['updateHeight'](),_0x28266d+=this['_spaceBetweenItems']+_0x3ac9ab['height'],_0x3ac9ab=this['_getItemBefore'](_0x3ac9ab);return _0x28266d;}};function Ni(_0x333f9e,_0x438174){return Math['max'](_0x333f9e-_0x438174,0x0);}function Oi(_0x15d8b1){return null!==_0x15d8b1&&'object'==typeof _0x15d8b1&&0x1===_0x15d8b1['nodeType'];}var Mi=class extends _0x333ed9{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(_0x5b8c19){super(_0x5b8c19),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x549ed4(),this['_refreshPositioningDebounced']=_0x174c5f(()=>{_0x5b8c19['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}init(){const _0xd6669b=this['context']['plugins']['get'](Ti),_0x1cca2b=this['context']['plugins']['get'](ki);_0xd6669b['register']('wideSidebar',this),_0x1cca2b['container']&&_0xd6669b['switchTo']('wideSidebar');}setActiveAnnotation(_0x134cda){if(_0x134cda===this['activeAnnotation'])return;const _0x40c754=this['context']['plugins']['get'](ki);_0x40c754['_activeAnnotation']=_0x134cda;const _0x4d435a=this['activeAnnotation'];_0x40c754['refresh']({'blurredAnnotation':_0x4d435a,'activatedAnnotation':_0x134cda}),this['activeAnnotation']=_0x134cda;}attach(_0x261af1){this['annotations']=_0x261af1;const _0x5a4b79=this['context']['plugins']['get'](ki);if(_0x5a4b79['_annotations']=_0x261af1,this['isAttached'])throw new _0x50ddc5('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x5a4b79,'set:container',()=>{this['detach'](),this['listenTo'](_0x5a4b79,'change:container',_0x531866=>{_0x531866['off'](),this['attach'](_0x261af1);});}),_0x5a4b79['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x313ed0=_0x1a7dce=>{_0x1a7dce['updateTargetRect'](),_0x5a4b79['addAnnotation'](_0x1a7dce);};for(const _0x58894f of _0x261af1)_0x313ed0(_0x58894f);this['listenTo'](_0x261af1,'add',(_0x4babd7,_0x46f96c)=>{_0x313ed0(_0x46f96c);}),this['listenTo'](_0x261af1,'remove',(_0x5621a6,_0x48457a,_0x50e40b)=>{_0x5a4b79['rearrange']({'removedAnnotation':_0x48457a,'previousAnnotation':_0x261af1['get'](_0x50e40b-0x1),'nextAnnotation':_0x261af1['get'](_0x50e40b+0x1)}),_0x48457a===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x261af1,'focus',(_0x37c0e6,_0x335730)=>{this['setActiveAnnotation'](_0x335730);}),this['listenTo'](_0x261af1,'blur',()=>{this['setActiveAnnotation'](null);});const _0xc00640=this['context']instanceof _0x5dcde4?this['context']['editors']:new _0x549ed4([this['context']]);for(const _0x1b84ff of _0xc00640)this['_integrateWithEditorAnnotations'](_0x1b84ff);this['listenTo'](_0xc00640,'add',(_0xb34b2a,_0x369e0d)=>{this['listenTo'](_0x369e0d,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x369e0d);});}),this['listenTo'](_0xc00640,'remove',(_0x56ee16,_0x56bd42)=>{_0x56bd42['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x56bd42['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}detach(){if(!this['isAttached'])throw new _0x50ddc5('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x44484d=this['context']['plugins']['get'](ki);_0x44484d['_detachFromContainer'](this['annotations']),this['stopListening'](_0x44484d),this['stopListening'](this['annotations']),this['context']instanceof _0x5dcde4&&this['stopListening'](this['context']['editors']);for(const _0x11e471 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x11e471);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach']();}_integrateWithEditorAnnotations(_0x457b31){if(!_0x457b31['plugins']['has']('EditorAnnotations'))return;const _0x13a68d=_0x457b31['plugins']['get']('EditorAnnotations'),_0x3d8547=()=>{const _0x4ac2cc=_0x13a68d['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x4ac2cc[0x0]||null);};this['listenTo'](_0x13a68d,'refresh',_0x3d8547),this['listenTo'](_0x13a68d,'blur',(_0xc0421c,{isAnnotationTracked:_0x58894d})=>{this['activeAnnotation']&&_0x58894d(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x13a68d,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x5299d8=>{_0x13a68d['hasDomSelection']()&&(_0x3d8547(),_0x5299d8['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x13a68d);}_destroyEditorAnnotationsIntegration(_0x2907bc){this['stopListening'](_0x2907bc),this['_editorAnnotations']['remove'](_0x2907bc);}},Ri=class extends _0x126747{counterView;constructor(_0x3b85a2){super(_0x3b85a2);const _0x3c67ea=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x5ba276,_0x4a2936)=>_0x5ba276?'...':_0x4a2936['toString']()),this['set']('annotationType',''),this['icon']=_0x5e7948,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new ht(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x3c67ea['to']('annotationType',_0x469296=>'ck-annotation-counter__badge--'+_0x469296),_0x3c67ea['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x3c67ea['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Si=class extends _0x333ed9{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(_0x49d16f){super(_0x49d16f),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x3be4b8())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x549ed4(),this['_refreshPositioningDebounced']=_0x174c5f(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}init(){this['context']['plugins']['get'](Ti)['register']('narrowSidebar',this),this['bodyCollection']=new _0x3958e2(this['context']['locale']),this['balloonPanelView']=new _0x44b29b(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}attach(_0x561436){this['annotations']=_0x561436;const _0x4f362a=this['context']['plugins']['get'](ki),_0x19e090=this['balloonPanelView'];if(_0x4f362a['_annotations']=_0x561436,this['isAttached'])throw new _0x50ddc5('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x4f362a,'set:container',()=>{this['detach'](),this['listenTo'](_0x4f362a,'change:container',_0xcec8af=>{_0xcec8af['off'](),this['attach'](_0x561436);});}),_0x4f362a['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x15d1b4=_0x53b0eb=>{const _0x2730c6=new Ri(this['context']['locale']);_0x4f362a['addAnnotation'](_0x53b0eb,_0x2730c6),this['_annotationToNarrowView']['set'](_0x53b0eb,_0x2730c6),_0x2730c6['bind']('isDirty','annotationType','number')['to'](_0x53b0eb['view'],'isDirty','type','length'),_0x2730c6['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x19e090['content']['first']!==_0x53b0eb['view']?(this['_showBalloon'](_0x53b0eb),_0x53b0eb['view']['element']['focus'](),this['setActiveAnnotation'](_0x53b0eb)):this['setActiveAnnotation'](null);});};for(const _0x594b77 of _0x561436)_0x15d1b4(_0x594b77);this['listenTo'](_0x561436,'add',(_0x5d62f0,_0x469ff0)=>{_0x15d1b4(_0x469ff0);}),this['listenTo'](_0x561436,'remove',(_0x8fa61f,_0x3855b3,_0x584130)=>{this['_annotationToNarrowView']['get'](_0x3855b3)['destroy'](),this['_annotationToNarrowView']['delete'](_0x3855b3),_0x4f362a['rearrange']({'removedAnnotation':_0x3855b3,'previousAnnotation':_0x561436['get'](_0x584130-0x1),'nextAnnotation':_0x561436['get'](_0x584130+0x1)}),_0x3855b3===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x561436,'focus',(_0x3cd404,_0x206191)=>{this['setActiveAnnotation'](_0x206191);}),this['listenTo'](_0x561436,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x132f19,_0xa250b1)=>{_0xa250b1['keyCode']===_0x30127a['esc']&&_0x19e090['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x19e090['content']['first']),this['_hideBalloon'](),_0xa250b1['stopPropagation'](),_0xa250b1['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x253e48,_0x232cf7)=>{const _0x38cc95=_0x232cf7['target'];_0x19e090['isVisible']&&_0x19e090['element']['contains'](_0x38cc95)||_0x4f362a['view']['element']['contains'](_0x38cc95)||_0x253e48['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x28a707=>_0x28a707['contains'](_0x38cc95))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x52e3f3=this['context']instanceof _0x5dcde4?this['context']['editors']:new _0x549ed4([this['context']]);for(const _0x224f7d of _0x52e3f3)this['_integrateWithEditorAnnotations'](_0x224f7d);this['listenTo'](_0x52e3f3,'add',(_0x43e212,_0x4a4637)=>{this['listenTo'](_0x4a4637,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x4a4637);});}),this['listenTo'](_0x52e3f3,'remove',(_0x74e86b,_0x4703a6)=>{_0x4703a6['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4703a6['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}setActiveAnnotation(_0x36dcdd){if(_0x36dcdd===this['activeAnnotation'])return;const _0x188b6c=this['context']['plugins']['get'](ki);_0x188b6c['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x36dcdd,'disableAnimationOnActivatedAnnotation':!0x0}),_0x36dcdd&&_0x188b6c['getSidebarItemView'](_0x36dcdd)?this['_showBalloon'](_0x36dcdd):this['_hideBalloon'](),this['activeAnnotation']=_0x36dcdd;}detach(){if(!this['isAttached'])throw new _0x50ddc5('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0xcfedf4=this['context']['plugins']['get'](ki);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x42fa2c=>_0x42fa2c['destroy']()),this['_annotationToNarrowView']['clear'](),_0xcfedf4['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x5dcde4&&this['stopListening'](this['context']['editors']);for(const _0x3843e1 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x3843e1);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(_0x125635){if(!_0x125635['plugins']['has']('EditorAnnotations'))return;const _0x4beaad=_0x125635['plugins']['get']('EditorAnnotations'),_0x57a57a=this['context']['plugins']['get'](ki),_0x51a82a=this['annotations'],_0x9c4ac=this['balloonPanelView'],_0x1716c6=()=>{const _0x9d0940=_0x4beaad['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x9d0940),this['setActiveAnnotation'](_0x9d0940[0x0]||null);};this['listenTo'](_0x4beaad,'refresh',_0x1716c6),this['listenTo'](_0x4beaad,'blur',(_0x18d116,{isAnnotationTracked:_0x579aaa})=>{this['activeAnnotation']&&_0x579aaa(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x4beaad,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x51a82a,'blur',_0x22b753=>{_0x4beaad['hasDomSelection']()&&_0x22b753['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x1fcc6f,_0x37e04d)=>{const _0xaba4=_0x37e04d['target'];_0x9c4ac['isVisible']&&_0x9c4ac['element']['contains'](_0xaba4)||_0x57a57a['view']['element']['contains'](_0xaba4)||this['activeAnnotation']&&_0x4beaad['hasDomSelection']()&&(_0x1716c6(),_0x1fcc6f['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x4beaad);}_destroyEditorAnnotationsIntegration(_0x1cd1e6){_0x1cd1e6&&(this['stopListening'](_0x1cd1e6),this['_editorAnnotations']['remove'](_0x1cd1e6));}_setSelectedAnnotations(_0x43dfeb){for(const _0x5d6850 of this['_selectedAnnotations'])_0x43dfeb['includes'](_0x5d6850)||this['_manuallyClosedAnnotationViews']['delete'](_0x5d6850['view']);this['_selectedAnnotations']=_0x43dfeb;}_refreshPositioning(){const _0x338016=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x338016['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x13214c){if(this['_manuallyClosedAnnotationViews']['has'](_0x13214c['view']))return;const _0x37a86f=this['balloonPanelView']['content']['first'];_0x37a86f!==_0x13214c['view']?(_0x37a86f&&this['_detachListeners'](_0x37a86f),this['_attachListeners'](_0x13214c['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x13214c['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}_updateBalloonPosition(){const _0x4717e8=this['balloonPanelView']['content']['first'],_0x49f8a0=_0x4717e8&&this['annotations']['getByView'](_0x4717e8);if(!_0x49f8a0||!this['_annotationToNarrowView']['has'](_0x49f8a0))return;const _0x5e5ca4=this['_annotationToNarrowView']['get'](_0x49f8a0)['element'],_0x27a820=(function(){const _0x43bc8f=_0x44b29b['defaultPositions'];return[_0x43bc8f['southArrowNorthEast'],_0x43bc8f['northArrowSouthEast'],_0x43bc8f['southArrowNorth'],_0x43bc8f['northArrowSouth'],_0x43bc8f['southArrowNorthWest'],_0x43bc8f['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x5e5ca4,'positions':_0x27a820});}['_hideBalloon'](){const _0x25cb77=this['balloonPanelView'],_0x1dd9a1=_0x25cb77['content']['first'];_0x1dd9a1&&(this['_detachListeners'](_0x1dd9a1),_0x25cb77['unpin'](),_0x25cb77['content']['clear']());}_attachListeners(_0x512157){this['listenTo'](_0x512157,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x512157,'Esc',(_0xf0a15b,_0x1ad2cc)=>{this['_manuallyClosedAnnotationViews']['add'](_0x512157),this['_hideBalloon'](),_0x1ad2cc();});}_detachListeners(_0x457438){this['stopListening'](_0x457438);}},xi=class extends _0x3de2ea{isAttached;annotations;['_manuallyClosed'];['_balloon'];_addedAnnotations;_selectedAnnotations;['_forceRefresh'];_refreshVisibilityDebounced;static get requires(){return[di,_0x853866,Ti];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x6f7241){super(_0x6f7241),_0x6f7241['editing']['view']['addObserver'](lt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x6f7241['plugins']['get'](_0x853866),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x174c5f(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}init(){const _0x73a318=this['editor']['plugins']['get'](Ti);_0x73a318['context']===this['editor']&&(_0x73a318['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x56a98a,_0x26a246)=>{const _0x34d90f=this['_balloon'];if(this['isAttached']&&_0x34d90f['visibleView']){const _0x3038f5=this['annotations']['getByView'](_0x34d90f['visibleView']);_0x3038f5&&this['_closeAnnotation'](_0x3038f5),_0x26a246();}}));}afterInit(){const _0x5d3416=this['editor']['plugins']['get'](Ti);_0x5d3416['context']===this['editor']&&(_0x5d3416['hasActive']()||_0x5d3416['switchTo']('inline'));}setActiveAnnotation(_0x2b892e){_0x2b892e!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x2b892e&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x2b892e)&&this['_addAnnotationToBalloon'](_0x2b892e,!0x0),_0x2b892e['isActive']=!0x0),_0x2b892e||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x2b892e);}attach(_0x433024){this['annotations']=_0x433024;const _0x25bfdd=this['editor']['plugins']['get'](Ti),_0x2c579d=this['_balloon'];if(this['isAttached'])throw new _0x50ddc5('inlineannotations-attach-already-attached',this);if(_0x25bfdd['context']!==this['editor'])throw new _0x50ddc5('inlineannotations-not-allowed-with-context',this);const _0x119d4a=this['editor']['plugins']['get'](di);this['listenTo'](_0x119d4a,'refresh',()=>{const _0x71f2fa=_0x119d4a['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0xadc5c2,_0x50e99b;!this['_forceRefresh']&&(_0xadc5c2=_0x71f2fa,_0x50e99b=this['_selectedAnnotations'],_0xadc5c2['length']===_0x50e99b['length']&&_0xadc5c2['every'](_0x1eb0ee=>_0x50e99b['includes'](_0x1eb0ee)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x71f2fa),this['setActiveAnnotation'](_0x71f2fa[0x0]||null));}),this['listenTo'](_0x119d4a,'blur',(_0x3d6d77,{isAnnotationTracked:_0x453323})=>{this['activeAnnotation']&&_0x453323(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x119d4a,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x38ffe2,_0x30b7b2,_0x27d15a)=>{_0x27d15a||this['setActiveAnnotation'](null);}),this['listenTo'](_0x433024,'remove',(_0x430544,_0x5295cd)=>{this['_removeAnnotationFromBalloon'](_0x5295cd),_0x5295cd===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x2c579d,'change:visibleView',(_0x224545,_0x5f0e06,_0x387175,_0x54b914)=>{_0x54b914&&this['stopListening'](_0x54b914);const _0x1276ac=_0x433024['getByView'](_0x387175);_0x387175&&_0x1276ac&&(this['listenTo'](_0x387175,'change:height',()=>{_0x2c579d['updatePosition']();}),this['listenTo'](_0x387175,'Esc',()=>{this['_closeAnnotation'](_0x1276ac),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x1276ac&&this['setActiveAnnotation'](_0x1276ac));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x2c579d['visibleView']&&_0x433024['getByView'](_0x2c579d['visibleView'])&&_0x2c579d['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 _0x50ddc5('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x4041e3 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x4041e3);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}_setSelectedAnnotations(_0x157e98){for(const _0x1dd6b5 of this['_selectedAnnotations'])_0x157e98['includes'](_0x1dd6b5)||this['_manuallyClosed']['delete'](_0x1dd6b5);for(const _0xca814d of this['annotations'])_0x157e98['includes'](_0xca814d)||this['_removeAnnotationFromBalloon'](_0xca814d);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0xac2348 of _0x157e98)this['_addAnnotationToBalloon'](_0xac2348);}this['_selectedAnnotations']=_0x157e98;}_addAnnotationToBalloon(_0xf9f2d0,_0x32db7f=!0x1){this['_manuallyClosed']['has'](_0xf9f2d0)||(this['_addedAnnotations']['has'](_0xf9f2d0)||this['_balloon']['hasView'](_0xf9f2d0['view'])||(this['_addedAnnotations']['add'](_0xf9f2d0),this['_balloon']['add']({'stackId':_0xf9f2d0['view']['id'],'view':_0xf9f2d0['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0xf9f2d0)}})),_0x32db7f&&this['_balloon']['showStack'](_0xf9f2d0['view']['id']));}_getBalloonTargetForAnnotation(_0x40c460){const _0x2d7c60=_0x40c460['target'],_0x5c57f1=this['editor']['editing']['view'],_0xe652ad=_0x5c57f1['document']['selection']['getFirstRange'](),_0x3dee60=_0x5c57f1['domConverter']['viewRangeToDom'](_0xe652ad);if(_0x3dee60['collapse'](!0x0),_0x2d7c60){if(_0x2d7c60 instanceof _0x2a80a4)return _0x2d7c60;let _0x2fa7f6=[];for(const _0x77b801 of _0x2d7c60)_0x2fa7f6['push'](..._0x2a80a4['getDomElementRects'](_0x77b801));_0x2fa7f6=function(_0x4f1a7f){const _0x3eb5e7=[];let _0x2b8d11=_0x4f1a7f[0x0];for(let _0x3ed29c=0x1;_0x3ed29c<_0x4f1a7f['length'];_0x3ed29c++)if(Pi(_0x2b8d11,_0x4f1a7f[_0x3ed29c])){const _0xddde81=_0x4f1a7f[_0x3ed29c]['width'];_0x2b8d11['width']+=_0xddde81,_0x2b8d11['right']+=_0xddde81;}else _0x3eb5e7['push'](_0x2b8d11),_0x2b8d11=_0x4f1a7f[_0x3ed29c];return _0x3eb5e7['push'](_0x2b8d11),_0x3eb5e7;}(_0x2fa7f6);const _0x44f067=_0x3dee60['getBoundingClientRect']();return _0x2fa7f6['find'](_0x34cea4=>_0x34cea4['top']<=_0x44f067['top']&&_0x34cea4['bottom']>=_0x44f067['bottom']&&_0x34cea4['left']<=_0x44f067['left']&&_0x34cea4['right']>=_0x44f067['right'])||_0x2fa7f6[0x0];}return _0x40c460['targetRect']||_0x3dee60;}_removeAnnotationFromBalloon(_0x49d07e){this['_addedAnnotations']['has'](_0x49d07e)&&this['_balloon']['hasView'](_0x49d07e['view'])&&(this['_addedAnnotations']['delete'](_0x49d07e),this['_balloon']['remove'](_0x49d07e['view']));}_closeAnnotation(_0x18d2d6){this['_manuallyClosed']['add'](_0x18d2d6),this['_removeAnnotationFromBalloon'](_0x18d2d6);}};function Pi(_0x1af280,_0x474ea8){return _0x1af280['top']===_0x474ea8['top']&&_0x1af280['bottom']===_0x474ea8['bottom']&&_0x1af280['right']===_0x474ea8['left'];}var Li=class extends ht{['focusTracker'];['focusCycler'];_annotationViews;constructor(_0x2774be,_0x443186){super(_0x2774be),this['set']('isEmpty',!_0x443186['length']),this['focusTracker']=new _0x1d3923(),this['_annotationViews']=_0x443186,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new et({'focusables':_0x443186,'focusTracker':this['focusTracker']}),this['listenTo'](_0x443186,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x443186,'remove',(_0xd253fb,_0x1f4f8a)=>{_0x1f4f8a['isActive']&&this['focus'](),_0x443186['length']||(this['isEmpty']=!0x0);});const _0x46e20d=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':Et(_0x2774be,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x443186},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x46e20d['if']('isEmpty','ck-hidden',_0x58158d=>!_0x58158d)]},'children':[{'text':Et(_0x2774be,'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 _0x48775b of this['_annotationViews'])this['focusTracker']['add'](_0x48775b['element']);this['_annotationViews']['on']('change',(_0x5d3383,{added:_0x333812,removed:_0x296b21})=>{for(const _0x50782a of _0x333812)this['focusTracker']['add'](_0x50782a['element']);for(const _0x57fefa of _0x296b21)this['focusTracker']['remove'](_0x57fefa['element']);});}},Di=class extends _0x333ed9{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[oi,ti];}constructor(_0x2fcd0c){super(_0x2fcd0c),this['archivedThreads']=new _0x549ed4();}init(){const _0x12e196=this['context'],_0x342aa1=_0x12e196['plugins']['get'](oi),_0x17bbe4=_0x12e196['plugins']['get'](ti);this['listenTo'](_0x342aa1,'addCommentThread',(_0x1b2893,{threadId:_0x4d4337})=>{const _0x210810=_0x342aa1['getCommentThread'](_0x4d4337);_0x210810['archivedAt']&&this['archivedThreads']['add'](_0x210810,this['_calculatePosition'](_0x210810['archivedAt'])),this['listenTo'](_0x210810,'change:archivedAt',(_0x48ffb2,_0x3707a9,_0x5622a4)=>{_0x5622a4?this['archivedThreads']['has'](_0x210810)||this['archivedThreads']['add'](_0x210810,this['_calculatePosition'](_0x210810['archivedAt'])):this['archivedThreads']['has'](_0x210810)&&this['archivedThreads']['remove'](_0x210810);});}),this['listenTo'](_0x342aa1,'removeCommentThread',(_0x4e5e12,{threadId:_0x5509f3})=>{const _0xdb3560=_0x342aa1['getCommentThread'](_0x5509f3);this['stopListening'](_0xdb3560),this['archivedThreads']['has'](_0xdb3560)&&this['archivedThreads']['remove'](_0xdb3560);},{'priority':'highest'}),this['listenTo'](_0x17bbe4['collection'],'focus',(_0x377740,_0x4e5f1b)=>{_0x4e5f1b['isVisible']||(_0x4e5f1b['isActive']=!0x0,_0x17bbe4['activate'](_0x4e5f1b));});}_calculatePosition(_0x589589){const _0x39d3ad=[...this['archivedThreads']]['findIndex'](_0x1d9865=>_0x1d9865['archivedAt']<_0x589589);return _0x39d3ad>-0x1?_0x39d3ad:this['archivedThreads']['length'];}},Vi=class extends _0x3de2ea{commentsArchiveView;annotationViews;['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Di,_0x21ea5c];}constructor(_0x33b157){super(_0x33b157),this['annotationViews']=new at(),this['_pendingThreads']=[];}init(){const _0x58a9e3=this['editor'],_0x5e37db=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x58a9e3['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x126747,!0x0)),_0x58a9e3['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x2eebb0=this['_createCommentsArchiveButton'](rt);return _0x2eebb0['set']({'role':'menuitemcheckbox'}),_0x2eebb0;});const _0x3f7880=_0x58a9e3['plugins']['get'](Di),_0x2d42c5=_0x58a9e3['plugins']['get']('Annotations'),_0x1ce703=_0x58a9e3['plugins']['get']('CommentsRepository');_0x3f7880['archivedThreads']['forEach'](_0x4dee88=>{this['_handleNewThread'](_0x4dee88);}),this['listenTo'](_0x3f7880['archivedThreads'],'add',(_0x40630a,_0x1dec3d)=>{this['_handleNewThread'](_0x1dec3d);}),this['listenTo'](_0x2d42c5['collection'],'add',(_0x4d2690,_0x172bf8)=>{const _0x402011=this['_pendingThreads']['find'](_0x757091=>{const _0x2ced10=_0x1ce703['_threadToController']['get'](_0x757091);return _0x2ced10&&_0x172bf8['innerView']===_0x2ced10['view'];});if(_0x402011){const _0x110d51=this['_calculatePosition'](_0x402011['archivedAt']);this['_addAnnotationToArchive'](_0x172bf8,_0x110d51),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x402011),0x1);}}),this['listenTo'](_0x3f7880['archivedThreads'],'remove',(_0x167347,_0x129435)=>{const _0x76d268=_0x58a9e3['config']['get']('collaboration.channelId');if(!_0x76d268||_0x129435['channelId']===_0x76d268){if(this['_pendingThreads']['includes'](_0x129435))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x129435),0x1);else{const _0x4c5297=_0x1ce703['_threadToController']['get'](_0x129435),_0x52f789=_0x2d42c5['getByInnerView'](_0x4c5297['view']);this['annotationViews']['remove'](_0x52f789['view']),this['stopListening'](_0x52f789),this['stopListening'](_0x52f789['focusableElements']);}}}),this['listenTo'](_0x2d42c5['collection'],'add',(_0x4655dc,_0x325fdf)=>{this['listenTo'](_0x325fdf,'escape',_0x5e37db);}),this['listenTo'](_0x2d42c5['collection'],'remove',(_0x394ebd,_0x126ff5)=>{this['stopListening'](_0x126ff5,'escape',_0x5e37db);});}_addAnnotationToArchive(_0x5b9270,_0x388d22){this['listenTo'](_0x5b9270,'set:isVisible',_0x7d942a=>{_0x7d942a['return']=!0x1,_0x7d942a['stop']();}),this['annotationViews']['add'](_0x5b9270['view'],_0x388d22);}['_handleNewThread'](_0x3e8133){const _0x3b7f45=this['editor']['plugins']['get']('CommentsRepository'),_0x58727e=this['editor']['plugins']['get']('Annotations'),_0x533304=this['editor']['config']['get']('collaboration.channelId');if(!_0x533304||_0x3e8133['channelId']===_0x533304){const _0x4775e7=_0x3b7f45['_threadToController']['get'](_0x3e8133);if(!_0x4775e7)return void this['_pendingThreads']['push'](_0x3e8133);const _0x4a59e7=this['_calculatePosition'](_0x3e8133['archivedAt']),_0x193e89=_0x58727e['getByInnerView'](_0x4775e7['view']);_0x193e89['isVisible']&&_0x58727e['_visibleAnnotations']['remove'](_0x193e89),this['_addAnnotationToArchive'](_0x193e89,_0x4a59e7);}}_calculatePosition(_0x239880){const _0x34e8a9=this['editor']['config']['get']('collaboration.channelId'),_0x5b131a=[...this['editor']['plugins']['get'](Di)['archivedThreads']]['filter'](_0x3f8962=>_0x3f8962['channelId']===_0x34e8a9)['findIndex'](_0x270b0f=>_0x270b0f['archivedAt']<_0x239880);return _0x5b131a<0x0||_0x5b131a>this['annotationViews']['length']?this['annotationViews']['length']:_0x5b131a-0x1;}_toggleDialog(){const _0x16eda2=this['editor'],_0x592940=_0x16eda2['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Li(_0x16eda2['locale'],this['annotationViews'])),'commentsArchive'===_0x592940['id']?_0x592940['hide']():_0x592940['show']({'id':'commentsArchive','title':Et(_0x16eda2['locale'],'COMMENTS_ARCHIVE'),'icon':_0x48d9e2,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x184e59['EDITOR_TOP_SIDE']});}_createCommentsArchiveButton(_0x3183d4,_0x227702=!0x1){const _0x4ba976=this['editor']['locale'],_0x48daa9=this['editor']['plugins']['get']('Dialog'),_0x3bb89f=new _0x3183d4(_0x4ba976);return _0x3bb89f['bind']('isEnabled')['to'](this,'isEnabled'),_0x3bb89f['bind']('isOn')['to'](_0x48daa9,'id',_0xb045ed=>'commentsArchive'===_0xb045ed),_0x3bb89f['set']({'label':Et(_0x4ba976,'COMMENTS_ARCHIVE'),'icon':_0x48d9e2,'isToggleable':!0x0}),_0x227702&&(_0x3bb89f['tooltip']=!0x0),this['listenTo'](_0x3bb89f,'execute',()=>this['_toggleDialog']()),_0x3bb89f;}_hideDialogOnAnnotationEscape=_0x341dac=>{const _0x1c81aa=_0x341dac['source'];if(!this['annotationViews']['has'](_0x1c81aa['view']))return;const _0x15d145=this['editor']['plugins']['get']('Dialog');_0x15d145['isOpen']&&'commentsArchive'===_0x15d145['id']&&(_0x15d145['hide'](),_0x341dac['stop']());};},Bi=class extends _0x3de2ea{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};