@ckeditor/ckeditor5-track-changes 32.0.0 → 33.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +1 -1
  3. package/build/track-changes.js +5 -0
  4. package/build/translations/cs.js +1 -0
  5. package/build/translations/da.js +1 -0
  6. package/build/translations/de.js +1 -0
  7. package/build/translations/el.js +1 -0
  8. package/build/translations/en-au.js +1 -0
  9. package/build/translations/es.js +1 -0
  10. package/build/translations/et.js +1 -0
  11. package/build/translations/fr.js +1 -0
  12. package/build/translations/gl.js +1 -0
  13. package/build/translations/hi.js +1 -0
  14. package/build/translations/hr.js +1 -0
  15. package/build/translations/it.js +1 -0
  16. package/build/translations/nl.js +1 -0
  17. package/build/translations/pl.js +1 -0
  18. package/build/translations/pt-br.js +1 -0
  19. package/build/translations/sk.js +1 -0
  20. package/build/translations/sr-latn.js +1 -0
  21. package/build/translations/sr.js +1 -0
  22. package/build/translations/tk.js +1 -0
  23. package/build/translations/tr.js +1 -0
  24. package/build/translations/zh-cn.js +1 -0
  25. package/build/translations/zh.js +1 -0
  26. package/ckeditor5-metadata.json +3 -0
  27. package/lang/translations/cs.po +3 -3
  28. package/lang/translations/da.po +1 -1
  29. package/lang/translations/de.po +1 -1
  30. package/lang/translations/el.po +387 -0
  31. package/lang/translations/en-au.po +1 -1
  32. package/lang/translations/es.po +35 -35
  33. package/lang/translations/fr.po +1 -1
  34. package/lang/translations/gl.po +1 -1
  35. package/lang/translations/hi.po +1 -1
  36. package/lang/translations/hr.po +1 -1
  37. package/lang/translations/it.po +1 -1
  38. package/lang/translations/pl.po +1 -1
  39. package/lang/translations/pt-br.po +1 -1
  40. package/lang/translations/sk.po +1 -1
  41. package/lang/translations/sr-latn.po +3 -3
  42. package/lang/translations/sr.po +3 -3
  43. package/lang/translations/tk.po +1 -1
  44. package/lang/translations/tr.po +1 -1
  45. package/lang/translations/zh-cn.po +1 -1
  46. package/package.json +4 -7
  47. package/src/commands/acceptallsuggestionscommand.js +1 -1
  48. package/src/commands/acceptselectedsuggestionscommand.js +1 -1
  49. package/src/commands/acceptsuggestioncommand.js +1 -1
  50. package/src/commands/discardallsuggestionscommand.js +1 -1
  51. package/src/commands/discardselectedsuggestionscommand.js +1 -1
  52. package/src/commands/discardsuggestioncommand.js +1 -1
  53. package/src/commands/trackchangescommand.js +1 -1
  54. package/src/index.js +23 -0
  55. package/src/integrations/alignment.js +1 -1
  56. package/src/integrations/basicstyles.js +1 -1
  57. package/src/integrations/blockquote.js +1 -1
  58. package/src/integrations/codeblock.js +1 -1
  59. package/src/integrations/comments.js +1 -1
  60. package/src/integrations/deletecommand.js +1 -1
  61. package/src/integrations/entercommand.js +1 -1
  62. package/src/integrations/font.js +1 -1
  63. package/src/integrations/heading.js +1 -1
  64. package/src/integrations/highlight.js +1 -1
  65. package/src/integrations/horizontalline.js +1 -1
  66. package/src/integrations/image.js +1 -1
  67. package/src/integrations/indent.js +1 -1
  68. package/src/integrations/inputcommand.js +1 -1
  69. package/src/integrations/link.js +1 -1
  70. package/src/integrations/list.js +1 -1
  71. package/src/integrations/mediaembed.js +1 -1
  72. package/src/integrations/mention.js +1 -1
  73. package/src/integrations/pagebreak.js +1 -1
  74. package/src/integrations/paragraph.js +1 -1
  75. package/src/integrations/removeformat.js +1 -1
  76. package/src/integrations/restrictededitingmode.js +1 -1
  77. package/src/integrations/shiftentercommand.js +1 -1
  78. package/src/integrations/standardeditingmode.js +1 -1
  79. package/src/integrations/table.js +1 -1
  80. package/src/integrations/tableclipboard.js +1 -1
  81. package/src/integrations/tableheadings.js +1 -1
  82. package/src/integrations/tablemergesplit.js +1 -1
  83. package/src/integrations/title.js +1 -1
  84. package/src/integrations/undo.js +1 -1
  85. package/src/integrations/utils.js +1 -1
  86. package/src/suggestion.js +1 -1
  87. package/src/suggestiondescriptionfactory.js +1 -1
  88. package/src/trackchanges.js +1 -1
  89. package/src/trackchangesdata.js +1 -1
  90. package/src/trackchangesediting.js +1 -1
  91. package/src/trackchangesui.js +1 -1
  92. package/src/ui/suggestioncontroller.js +1 -1
  93. package/src/ui/view/basesuggestionthreadview.js +1 -1
  94. package/src/ui/view/suggestionthreadview.js +1 -1
  95. package/src/utils/getselectedsuggestions.js +1 -1
  96. package/src/utils/hashobject.js +1 -1
  97. package/src/utils/normalizedescription.js +1 -1
  98. package/src/utils/sortsuggestions.js +1 -1
  99. package/theme/icons/track-changes-accept.svg +1 -1
  100. package/theme/icons/track-changes-discard.svg +1 -1
  101. package/theme/icons/track-changes.svg +1 -1
  102. package/theme/suggestionmarker.css +1 -1
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x2f8a06,PendingActions as _0x4b7d91}from'ckeditor5/src/core';import _0x463fa2 from'@ckeditor/ckeditor5-collaboration-core/src/users';import{LiveRange as _0x2dbd60}from'ckeditor5/src/engine';import{CKEditorError as _0x6684a1,uid as _0x17e38b,priorities as _0x8da7fc,EmitterMixin as _0x37c232,mix as _0x3e6840}from'ckeditor5/src/utils';import _0x2b993d from'@ckeditor/ckeditor5-comments/src/comments/commentsrepository';import _0x126243 from'./commands/trackchangescommand';import _0x506a57 from'./commands/acceptsuggestioncommand';import _0x4900ca from'./commands/discardsuggestioncommand';import _0x5535ee from'./commands/acceptallsuggestionscommand';import _0x2e6d55 from'./commands/acceptselectedsuggestionscommand';import _0x2a8010 from'./commands/discardallsuggestionscommand';import _0x49fbcd from'./commands/discardselectedsuggestionscommand';import _0xf23b9 from'./suggestion';import _0x23bbe5 from'./suggestiondescriptionfactory';import'../theme/suggestion.css';import'../theme/suggestionmarker.css';import _0x35184d from'./integrations/alignment';import _0x24f559 from'./integrations/basicstyles';import _0x5cee8b from'./integrations/blockquote';import _0x5c67f5 from'./integrations/codeblock';import _0x37befb from'./integrations/comments';import _0x4df444 from'./integrations/deletecommand';import _0x49d216 from'./integrations/entercommand';import _0x5d06e6 from'./integrations/font';import _0x2bc64d from'./integrations/heading';import _0x2bc3f8 from'./integrations/highlight';import _0x133b11 from'./integrations/horizontalline';import _0x289993 from'./integrations/image';import _0x1bf309 from'./integrations/indent';import _0x1a5409 from'./integrations/inputcommand';import _0xe3e460 from'./integrations/link';import tt from'./integrations/list';import it from'./integrations/mediaembed';import st from'./integrations/mention';import nt from'./integrations/pagebreak';import et from'./integrations/paragraph';import ot from'./integrations/removeformat';import rt from'./integrations/restrictededitingmode';import at from'./integrations/shiftentercommand';import ct from'./integrations/standardeditingmode';import ht from'./integrations/table';import ut from'./integrations/tablemergesplit';import ft from'./integrations/tableheadings';import gt from'./integrations/tableclipboard';import lt from'./integrations/title';import dt from'./integrations/undo';import mt from'./utils/hashobject.js';import{toWidget as pt}from'ckeditor5/src/widget';export default class l extends _0x2f8a06{static get['requires'](){return[_0x463fa2,_0x4b7d91,_0x2b993d,_0x35184d,_0x24f559,_0x5cee8b,_0x5c67f5,_0x37befb,_0x4df444,_0x49d216,_0x5d06e6,_0x2bc64d,_0x2bc3f8,_0x133b11,_0x289993,_0x1bf309,_0x1a5409,_0xe3e460,tt,it,st,nt,et,ot,rt,at,ct,ht,ut,ft,gt,lt,dt];}static get['pluginName'](){return'TrackChangesEditing';}constructor(_0x58aae7){function _0x1f7655(_0x3992a6){return _0x3992a6['map'](_0x1c53ac=>String['fromCharCode'](_0x1c53ac))['join']('');}super(_0x58aae7),this['set']('activeMarkers',[]),this['on']('change:activeMarkers',(_0x2959cf,_0x48b3d1,_0x1096f4,_0x5ee122)=>{this['_model']['change'](_0x1983e3=>{for(const _0x502847 of[..._0x5ee122,..._0x1096f4])this['_model']['markers']['has'](_0x502847)&&_0x1983e3['updateMarker'](_0x502847);});}),this['_descriptionFactory']=new _0x23bbe5(this['editor']['model']['schema'],this['editor']['locale']),this['_adapter']=null,this['_suggestionFactory']=new kt(this['editor']),this['_suggestions']=new Map(),this['_commentsRepository']=_0x58aae7['plugins']['get'](_0x2b993d),this['_enabledCommands']=new Set(),this['_model']=this['editor']['model'],this['_suggestionState']=new WeakMap(),this['_isForcedDefaultExecutionBlock']=!0x1,this[_0x1f7655([0x5f,0x65,0x78,0x65,0x63,0x75,0x74,0x65,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x69,0x6f,0x6e])]=_0x1f7655([0x34,0x30,0x34,0x34,0x30,0x32,0x36,0x32]);}['init'](){const _0x42fa62=this['editor'];_0x42fa62['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'suggestion','view':_0x4ddf01=>{const {id:_0x1e90d9,type:_0x3fcc3d}=this['_splitMarkerName'](_0x4ddf01['markerName']),_0x53c230=['ck-suggestion-marker','ck-suggestion-marker-'+_0x3fcc3d];let _0x1815ad=0xbb8;return this['activeMarkers']['includes'](_0x4ddf01['markerName'])&&(_0x53c230['push']('ck-suggestion-marker--active'),_0x1815ad=0xbc2),'deletion'==_0x3fcc3d&&(_0x1815ad+=0x5),{'classes':_0x53c230,'attributes':{'data-suggestion':_0x1e90d9},'priority':_0x1815ad};}}),_0x42fa62['conversion']['for']('dataDowncast')['add'](_0x182082=>{_0x182082['on']('addMarker:suggestion',(_0x9e99d1,_0x241fa9,_0x38cc55)=>{if(!_0x38cc55['options']['showSuggestionHighlights'])return;const _0x3f09f5=_0x241fa9['item'];if(!_0x3f09f5)return;const _0x4ae082=_0x38cc55['mapper']['toViewElement'](_0x3f09f5);_0x42fa62['model']['schema']['isObject'](_0x3f09f5)&&_0x4ae082&&!_0x4ae082['getCustomProperty']('widget')&&_0x4ae082['is']('containerElement')&&pt(_0x4ae082,_0x38cc55['writer']);},{'priority':'high'});}),_0x42fa62['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'suggestion','view':(_0x53cc57,_0x1b4798)=>{if(!_0x1b4798['options']['showSuggestionHighlights'])return null;const {type:_0x46ddb5}=this['_splitMarkerName'](_0x53cc57['markerName']);return{'classes':['ck-suggestion-marker','ck-suggestion-marker-'+_0x46ddb5],'priority':0xbb8};}});const _0x3bdd06=({showActiveMarkers:_0x59ff34=!0x0}={})=>(_0x24739e,_0x3231e1,_0x3f3f28)=>{if(!_0x3231e1['item'])return;if(_0x3231e1['item']['is']('selection'))return void _0x3f3f28['consumable']['consume'](_0x3231e1['item'],_0x24739e['name']);const _0xee5aa1=_0x3f3f28['mapper']['toViewElement'](_0x3231e1['item']);if(!(_0x3231e1['item']['is']('element')&&_0x42fa62['model']['schema']['isBlock'](_0x3231e1['item'])&&!_0xee5aa1['getCustomProperty']('addHighlight')))return;const {id:_0x2245e4}=this['_splitMarkerName'](_0x3231e1['markerName']);_0x3f3f28['writer']['addClass'](['ck-suggestion-marker','ck-suggestion-marker-formatBlock'],_0xee5aa1),_0x3f3f28['writer']['setAttribute']('data-suggestion',_0x2245e4,_0xee5aa1),_0x3f3f28['mapper']['bindElementToMarker'](_0xee5aa1,_0x3231e1['markerName']),_0x59ff34&&(this['activeMarkers']['includes'](_0x3231e1['markerName'])?_0x3f3f28['writer']['addClass']('ck-suggestion-marker--active',_0xee5aa1):_0x3f3f28['writer']['removeClass']('ck-suggestion-marker--active',_0xee5aa1));for(const _0x2383ce of _0x42fa62['model']['createRangeIn'](_0x3231e1['item'])['getItems']())_0x3f3f28['consumable']['consume'](_0x2383ce,_0x24739e['name']);_0x3f3f28['consumable']['consume'](_0x3231e1['item'],_0x24739e['name']);};_0x42fa62['conversion']['for']('dataDowncast')['add'](_0x27b4a8=>{_0x27b4a8['on']('addMarker:suggestion:formatBlock',(_0x5041ab,_0x290fd7,_0x27fa13)=>{_0x27fa13['options']['showSuggestionHighlights']&&_0x3bdd06({'showActiveMarkers':!0x1})(_0x5041ab,_0x290fd7,_0x27fa13);},{'priority':'highest'});}),_0x42fa62['conversion']['for']('dataDowncast')['markerToData']({'model':'suggestion','view':(_0x5b2b7d,_0x2f254d)=>_0x2f254d['options']['showSuggestionHighlights']?null:{'group':'suggestion','name':_0x5b2b7d['substr']('suggestion'['length']+0x1)}}),_0x42fa62['conversion']['for']('upcast')['elementToElement']({'view':{'name':'suggestion','attribute':{'id':/^\w/,'suggestionType':/^\w/}},'model':(_0x3a359f,{writer:_0x42d325})=>{let _0x27d6d3='suggestion:'+_0x3a359f['getAttribute']('suggestion-type')+':'+_0x3a359f['getAttribute']('id');return _0x3a359f['getAttribute']('marker-count')&&(_0x27d6d3+=':'+_0x3a359f['getAttribute']('marker-count')),_0x42d325['createElement']('$marker',{'data-name':_0x27d6d3});}}),_0x42fa62['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion'}),_0x42fa62['conversion']['for']('editingDowncast')['add'](_0x50e4f3=>{_0x50e4f3['on']('addMarker:suggestion:formatBlock',_0x3bdd06(),{'priority':'high'});}),_0x42fa62['conversion']['for']('editingDowncast')['add'](_0xb1b1eb=>{_0xb1b1eb['on']('removeMarker:suggestion:formatBlock',(_0x1905eb,_0x4c05b7,_0x319004)=>{const _0x332c0f=_0x319004['mapper']['markerNameToElements'](_0x4c05b7['markerName']);if(_0x332c0f)for(const _0x4a1b14 of _0x332c0f)_0x4a1b14['getCustomProperty']('addHighlight')||(_0x319004['writer']['removeClass'](['ck-suggestion-marker','ck-suggestion-marker-formatBlock','ck-suggestion-marker--active'],_0x4a1b14),_0x319004['writer']['removeAttribute']('data-suggestion',_0x4a1b14),_0x319004['mapper']['unbindElementFromMarkerName'](_0x4a1b14,_0x4c05b7['markerName']));},{'priority':'high'});}),_0x42fa62['model']['document']['registerPostFixer'](_0x2a085d=>{let _0x3718de=!0x1;const _0x30d924=Array['from'](_0x42fa62['model']['document']['differ']['getChangedMarkers']());for(const {name:_0x4f28d7,data:_0x189727}of _0x30d924){const {group:_0xd7a53d,type:_0x40f83e,id:_0x2f8ab2}=this['_splitMarkerName'](_0x4f28d7);if('suggestion'!==_0xd7a53d)continue;const _0x159c60=this['_suggestions']['get'](_0x2f8ab2);if(null!=_0x189727['newRange']){'formatInline'==_0x40f83e&&(_0x3718de=_0x3718de||St(_0x189727['newRange'],_0x4f28d7,_0x2a085d,_0x42fa62['model']['schema']));if(_0x189727['newRange']['isCollapsed']||'$graveyard'==_0x189727['newRange']['root']['rootName']||'formatBlock'==_0x40f83e&&!It(_0x189727['newRange'])||'deletion'==_0x40f83e&&!(!yt(_0x247bf3=_0x189727['newRange'])&&!function(_0x2f05a7){return _0x2f05a7['start']['parent']==_0x2f05a7['end']['nodeBefore']&&_0x2f05a7['start']['isAtEnd'];}(_0x247bf3)))_0x2a085d['removeMarker'](_0x4f28d7),_0x3718de=!0x0;else{if(!_0x159c60||!_0x159c60['isInContent'])continue;_0x3718de=!!this['_joinWithAdjacentSuggestions'](_0x159c60)||_0x3718de;}}}var _0x247bf3;return _0x3718de;}),_0x42fa62['model']['document']['registerPostFixer'](_0x51e6d9=>{let _0x122d05=!0x1;for(const _0x2fc011 of _0x42fa62['model']['document']['differ']['getChanges']()){if('insert'!=_0x2fc011['type'])continue;const _0x9db5b0=_0x2fc011['position']['getShiftedBy'](_0x2fc011['length']);if(_0x9db5b0['isAtEnd'])for(const _0x11eba9 of this['_suggestions']['values']()){if(_0x11eba9['isMultiRange']||!_0x11eba9['isInContent'])continue;if('formatBlock'!=_0x11eba9['type'])continue;const _0x5e4f30=_0x11eba9['getFirstRange']();if(_0x5e4f30['start']['parent']!=_0x5e4f30['end']['parent']&&_0x5e4f30['end']['isEqual'](_0x2fc011['position'])){const _0x518327=_0x42fa62['model']['createRange'](_0x5e4f30['start'],_0x9db5b0);_0x51e6d9['updateMarker'](_0x11eba9['getFirstMarker'](),{'range':_0x518327}),_0x122d05=!0x0;}}}return _0x122d05;}),_0x42fa62['model']['markers']['on']('update:suggestion',(_0x4c6dd9,_0x5477d7,_0x35332e)=>{if(null==_0x35332e){const {id:_0x38ab35}=this['_splitMarkerName'](_0x5477d7['name']),_0x436a96=this['_suggestions']['get'](_0x38ab35);_0x436a96&&_0x436a96['addMarkerName'](_0x5477d7['name']);}}),_0x42fa62['model']['document']['on']('change:data',()=>{const _0x4be4d2=Array['from'](_0x42fa62['model']['document']['differ']['getChangedMarkers']());_0x4be4d2['sort']((_0x5dd3e0,_0xb9cb51)=>{const _0x9ee2df=_0x5dd3e0['data']['oldRange'],_0x195be8=_0xb9cb51['data']['oldRange'];return null===_0x9ee2df&&null===_0x195be8?0x0:null===_0x9ee2df&&null!==_0x195be8?-0x1:null!==_0x9ee2df&&null===_0x195be8?0x1:_0x9ee2df['start']['isBefore'](_0x195be8['start'])?-0x1:0x1;});const _0x40c04f=new Set();for(const {name:_0x4b7797,data:_0x2eea5d}of _0x4be4d2){const {group:_0x29cf6a,id:_0x12f46d}=this['_splitMarkerName'](_0x4b7797);if('suggestion'===_0x29cf6a&&(null===_0x2eea5d['oldRange']&&this['_handleNewSuggestionMarker'](_0x4b7797),null===_0x2eea5d['newRange'])){const _0x3ab62a=this['_suggestions']['get'](_0x12f46d);_0x3ab62a['isInContent']?_0x40c04f['add'](_0x3ab62a):this['_removeSuggestion'](_0x3ab62a);}}for(const {name:_0x15b152,data:_0x63b77d}of _0x4be4d2){const {group:_0x5edc6e,id:_0x1194f2}=this['_splitMarkerName'](_0x15b152);if('suggestion'!==_0x5edc6e)continue;const _0x5b4681=this['_suggestions']['get'](_0x1194f2);null!=_0x63b77d['newRange']&&null!=_0x63b77d['oldRange']&&(this['_refreshSuggestionsChain'](_0x5b4681),_0x40c04f['add'](_0x5b4681['head']));}for(const _0x2b9e16 of _0x40c04f)this['fire']('suggestionChanged',_0x2b9e16);_0x40c04f['clear']();}),_0x42fa62['model']['on']('applyOperation',(_0x4b773f,_0x21e4ac)=>{const _0x3a48cd=_0x21e4ac[0x0];if(!this['_suggestions']['size'])return;if(!_0x3a48cd['isDocumentOperation'])return;if(_0x3a48cd['batch']['isUndo']||!_0x3a48cd['batch']['isLocal'])return;let _0x2133f9,_0x3b4791;switch(_0x3a48cd['type']){case'insert':_0x2133f9=_0x42fa62['model']['createPositionAt'](_0x3a48cd['position']),_0x3b4791=_0x2133f9['getShiftedBy'](_0x3a48cd['howMany']);break;case'split':_0x2133f9=_0x42fa62['model']['createPositionAt'](_0x3a48cd['splitPosition']),_0x3b4791=_0x42fa62['model']['createPositionAt'](_0x3a48cd['moveTargetPosition']);break;case'move':_0x2133f9=_0x42fa62['model']['createPositionAt'](_0x3a48cd['targetPosition']),_0x3b4791=_0x2133f9['getShiftedBy'](_0x3a48cd['howMany']);break;default:return;}const _0xc4e2eb=_0x42fa62['model']['createRange'](_0x2133f9,_0x3b4791);_0x42fa62['model']['change'](()=>{for(const {suggestion:_0x1019f3,meta:_0x2676a9}of this['_findSuggestions'](_0xc4e2eb)){if(_0x1019f3['isMultiRange'])continue;if('formatInline'==_0x1019f3['type'])continue;const _0xd1fa6d=_0x1019f3['data']&&_0x1019f3['data']['multipleBlocks'];('formatBlock'!=_0x1019f3['type']||'split'==_0x3a48cd['type']&&!_0xd1fa6d)&&(_0x2676a9['containsRangeInObject']||'insertion'==_0x1019f3['type']&&_0x2676a9['isOwn']||_0x1019f3['getFirstRange']()['containsRange'](_0xc4e2eb)&&this['_breakSuggestionMarker'](_0x1019f3,_0x2133f9,_0x3b4791));}});},{'priority':'lowest'}),_0x42fa62['model']['on']('deleteContent',(_0x237ac1,_0xd84a44)=>{const _0x53ee51=_0xd84a44[0x0],_0x3a8e55=_0xd84a44[0x1];if(_0x3a8e55&&_0x3a8e55['forceDefaultExecution'])return;if(this['_isForcedDefaultExecutionBlock'])return;if(!this['trackChangesCommand']['value'])return;if(_0x53ee51['isCollapsed'])return;const _0x37f76e=_0x42fa62['model']['schema'],{start:_0x3d99f5,end:_0x53db90}=_0x53ee51['getFirstRange'](),_0x4bc695=_0x3d99f5['nodeAfter']&&_0x37f76e['isObject'](_0x3d99f5['nodeAfter'])?null:_0x37f76e['getNearestSelectionRange'](_0x3d99f5,'forward'),_0x3f4307=_0x53db90['nodeBefore']&&_0x37f76e['isObject'](_0x53db90['nodeBefore'])?null:_0x37f76e['getNearestSelectionRange'](_0x53db90,'backward'),_0x2a6674=_0x42fa62['model']['createRange'](_0x4bc695?_0x4bc695['start']:_0x3d99f5,_0x3f4307?_0x3f4307['end']:_0x53db90);_0x42fa62['model']['change'](_0x33bce3=>{this['markDeletion'](_0x2a6674);const _0x3bf743=_0x42fa62['model']['schema']['getNearestSelectionRange'](_0x2a6674['start']);_0x53ee51['is']('documentSelection')?_0x33bce3['setSelection'](_0x3bf743):_0x53ee51['setTo'](_0x3bf743);}),_0x237ac1['stop']();},{'priority':_0x8da7fc['normal']+0xa}),_0x42fa62['model']['on']('insertContent',(_0x10c195,_0x377067)=>{const _0x4aa63b=_0x377067[_0x377067['length']-0x1];_0x4aa63b&&_0x4aa63b['forceDefaultExecution']||this['_isForcedDefaultExecutionBlock']||this['trackChangesCommand']['value']&&(_0x42fa62['model']['change'](()=>{let _0x4882f8=_0x42fa62['model']['insertContent'](_0x377067[0x0],_0x377067[0x1],_0x377067[0x2],_0x377067[0x3],{'forceDefaultExecution':!0x0});if(!_0x4882f8)return;_0x10c195['return']=_0x4882f8['clone']();const _0x38de2c=_0x4882f8['end']['nodeBefore'],_0x41f8c1=_0x42fa62['model']['schema'];_0x38de2c&&_0x41f8c1['isBlock'](_0x38de2c)&&!_0x41f8c1['isObject'](_0x38de2c)&&(_0x4882f8=_0x42fa62['model']['createRange'](_0x4882f8['start'],_0x42fa62['model']['createPositionAt'](_0x38de2c,'end'))),this['markInsertion'](_0x4882f8);}),_0x10c195['stop']());},{'priority':'high'}),this['trackChangesCommand']=new _0x126243(_0x42fa62,this['_enabledCommands']),this['editor']['commands']['add']('trackChanges',this['trackChangesCommand']),this['enableCommand']('trackChanges');const _0x21faf8=new _0x506a57(_0x42fa62,this['_suggestions']);_0x42fa62['commands']['add']('acceptSuggestion',_0x21faf8),this['enableCommand']('acceptSuggestion');const _0x24f027=new _0x4900ca(_0x42fa62,this['_suggestions']);_0x42fa62['commands']['add']('discardSuggestion',_0x24f027),this['enableCommand']('discardSuggestion'),_0x42fa62['commands']['add']('acceptAllSuggestions',new _0x5535ee(_0x42fa62,_0x21faf8,this['_suggestions'])),this['enableCommand']('acceptAllSuggestions'),_0x42fa62['commands']['add']('discardAllSuggestions',new _0x2a8010(_0x42fa62,_0x24f027,this['_suggestions'])),this['enableCommand']('discardAllSuggestions'),_0x42fa62['commands']['add']('acceptSelectedSuggestions',new _0x2e6d55(_0x42fa62,_0x21faf8,this['_suggestions'])),this['enableCommand']('acceptSelectedSuggestions'),_0x42fa62['commands']['add']('discardSelectedSuggestions',new _0x49fbcd(_0x42fa62,_0x24f027,this['_suggestions'])),this['enableCommand']('discardSelectedSuggestions');const _0x4bfc61=_0x42fa62['plugins']['get'](_0x2b993d);this['listenTo'](_0x4bfc61,'addComment',(_0x39d0df,{threadId:_0x29eea8})=>{const _0x4a7729=this['_suggestions']['get'](_0x29eea8);_0x4a7729&&_0x4a7729['commentThread']&&0x1===_0x4a7729['commentThread']['length']&&this['_updateSuggestionData'](_0x29eea8,{'hasComments':!0x0});},{'priority':'low'}),this['listenTo'](_0x4bfc61,'removeComment',(_0x594514,{threadId:_0x3b18b7})=>{const _0x41f2e1=this['_suggestions']['get'](_0x3b18b7);_0x41f2e1&&_0x41f2e1['commentThread']&&!_0x41f2e1['commentThread']['length']&&this['_updateSuggestionData'](_0x3b18b7,{'hasComments':!0x1});},{'priority':'low'});}set['adapter'](_0x5d709d){if(this['_adapter'])throw new _0x6684a1('track-changes-adapter-already-set',this);this['_adapter']=_0x5d709d;}get['adapter'](){return this['_adapter'];}['getSuggestions']({skipNotAttached:_0x1a1236=!0x1,toJSON:_0x2ed47e=!0x1}={}){const _0x466e4c=[];for(const _0x523cf1 of this['_suggestions']['values']())_0x1a1236&&!_0x523cf1['isInContent']||_0x466e4c['push'](_0x523cf1);return _0x2ed47e?_0x466e4c['map'](_0x37df42=>_0x37df42['toJSON']()):_0x466e4c;}['getSuggestion'](_0x36dd8c){const _0x516fbe=this['_suggestions']['get'](_0x36dd8c);if(!_0x516fbe)throw new _0x6684a1('track-changes-suggestion-not-found',this);return _0x516fbe;}['hasSuggestion'](_0x12dcf5){return this['_suggestions']['has'](_0x12dcf5);}['addSuggestionData'](_0x58dd29){const {id:_0x3a7e16,authorId:_0x2de73e}=_0x58dd29,[_0x8caa16,_0x4bac32]=_0x58dd29['type']['split'](':'),_0x1521a0=this['_suggestions']['get'](_0x3a7e16)||this['_createSuggestion'](_0x8caa16,_0x4bac32,_0x3a7e16,_0x2de73e);switch(this['_addThreadToSuggestion'](_0x1521a0),this['_checkSuggestionCorrectness'](_0x1521a0,_0x8caa16,_0x4bac32||null,_0x2de73e),_0x1521a0['createdAt']=_0x58dd29['createdAt'],_0x58dd29['data']&&(_0x1521a0['data']=_0x58dd29['data']),_0x58dd29['attributes']&&(_0x1521a0['attributes']=_0x58dd29['attributes']),this['_adapter']&&this['_adapter']['addSuggestion']||(_0x1521a0['_saved']=!0x0),this['_suggestionState']['get'](_0x1521a0)){case'notReady':this['_suggestionState']['set'](_0x1521a0,'dataReady');break;case'markerReady':_0x1521a0['isInContent']?(this['_suggestionState']['set'](_0x1521a0,'ready'),this['fire']('suggestionLoaded',_0x1521a0)):this['_suggestionState']['set'](_0x1521a0,'removed');}return _0x1521a0;}['acceptSuggestion'](_0x407621){this['forceDefaultExecution'](()=>{this['editor']['model']['change'](()=>{for(const _0x5a6d15 of _0x407621['getAllAdjacentSuggestions']())_0x5a6d15['accept']();});});}['discardSuggestion'](_0x47fdbe){this['forceDefaultExecution'](()=>{this['editor']['model']['change'](()=>{for(const _0xbe55e2 of _0x47fdbe['getAllAdjacentSuggestions']())_0xbe55e2['discard']();});});}['enableCommand'](_0x40631a,_0x192cc8){const _0x39aa2b=this['editor']['commands']['get'](_0x40631a);if(!_0x39aa2b)throw new _0x6684a1('track-changes-command-not-found',this,{'commandName':_0x40631a});this['_enabledCommands']['add'](_0x39aa2b),_0x192cc8&&_0x39aa2b['on']('execute',(_0x4c361c,_0x2ff267)=>{this['trackChangesCommand']['value']&&(this['_isForcedDefaultExecutionBlock']||_0x2ff267['length']>0x0&&_0x2ff267[_0x2ff267['length']-0x1]&&_0x2ff267[_0x2ff267['length']-0x1]['forceDefaultExecution']||(_0x192cc8((..._0x5ade1a)=>_0x39aa2b['execute'](..._0x5ade1a,{'forceDefaultExecution':!0x0}),..._0x2ff267),_0x4c361c['stop']()));},{'priority':'high'});}['forceDefaultExecution'](_0x479767){let _0x55409f,_0x518c0c;const _0x4bb145=this['_isForcedDefaultExecutionBlock'];this['_isForcedDefaultExecutionBlock']=!0x0;try{_0x55409f=_0x479767();}catch(_0x7049a3){_0x518c0c=_0x7049a3;}return _0x4bb145||(this['_isForcedDefaultExecutionBlock']=!0x1),_0x518c0c&&_0x6684a1['rethrowUnexpectedError'](_0x518c0c,this),_0x55409f;}['markInsertion'](_0x5a790e,_0x17208d=null,_0xfca3bc={}){if(_0x5a790e['isCollapsed'])return null;const _0x4b4331=this['editor']['plugins']['get']('Users')['me'];for(const {suggestion:_0x30aae4,meta:_0x76902a}of this['_findSuggestions'](_0x5a790e,'insertion'))if(_0x76902a['isOwn']){if(!_0x76902a['isNextTo'])return _0x30aae4;if(_0x17208d==_0x30aae4['subType']){const _0x1d35d7=_0x30aae4['getFirstRange']();return _0x1d35d7['start']['isEqual'](_0x5a790e['end'])?this['_setSuggestionRange'](_0x30aae4,this['_model']['createRange'](_0x5a790e['start'],_0x1d35d7['end'])):this['_setSuggestionRange'](_0x30aae4,this['_model']['createRange'](_0x1d35d7['start'],_0x5a790e['end'])),_0x30aae4;}}const _0x552a9f=_0x17e38b(),_0x5f40ad=_0x4b4331['id'],_0xc0ddbd=_0x17208d?'insertion:'+_0x17208d:'insertion',_0x1021a9=this['_setSuggestionData']({'id':_0x552a9f,'type':_0xc0ddbd,'createdAt':new Date(),'authorId':_0x5f40ad,'attributes':_0xfca3bc});return this['_addSuggestionMarker'](_0xc0ddbd,_0x552a9f,_0x5f40ad,_0x5a790e),_0x1021a9;}['markMultiRangeInsertion'](_0x59e029,_0x34380b='multi',_0x8c0762={}){const _0x44448a=this['editor']['plugins']['get']('Users')['me'],_0x2d681a=this['_suggestionFactory']['getSuggestionCallback']('insertion',_0x34380b,'join');for(const _0x23df7f of this['getSuggestions']())if(_0x23df7f['author']['id']==_0x44448a['id']&&'insertion'==_0x23df7f['type']&&_0x23df7f['subType']==_0x34380b&&(_0x2d681a(_0x23df7f['getRanges'](),_0x59e029)||_0x2d681a(_0x59e029,_0x23df7f['getRanges']()))){for(const _0x32c6a of _0x59e029)_0x23df7f['addRange'](_0x32c6a);return _0x23df7f;}for(const _0x8cf6c2 of _0x59e029)for(const {suggestion:_0x26c12a,meta:_0x3671ae}of this['_findSuggestions'](_0x8cf6c2,'insertion')){if(!_0x3671ae['isOwn'])continue;let _0x2773b7=!0x0;for(const _0x4b1e4a of _0x26c12a['getRanges']())for(const _0x33cab0 of _0x59e029)if(!_0x4b1e4a['containsRange'](_0x33cab0)){_0x2773b7=!0x1;break;}if(_0x2773b7)return _0x26c12a;}const _0x123618=_0x17e38b(),_0x3c007e=_0x44448a['id'],_0x468956='insertion:'+_0x34380b,_0x280e99=this['_setSuggestionData']({'id':_0x123618,'type':_0x468956,'createdAt':new Date(),'authorId':_0x3c007e,'attributes':_0x8c0762});for(const _0x2c13a2 of _0x59e029)this['_addSuggestionMarker'](_0x468956,_0x123618,_0x3c007e,_0x2c13a2,_0xf23b9['getMultiRangeId']());return _0x280e99;}['markInlineFormat'](_0x23bf4f,_0x5c4c0e,_0x49c25d=null,_0x3f8b2d={}){if(_0x49c25d=_0x49c25d||bt(_0x5c4c0e),_0x23bf4f['isCollapsed'])return;const _0x333777=this['editor']['plugins']['get']('Users')['me'],_0x2cb0c3=[];for(const {suggestion:_0x23bc7a,meta:_0x527527}of this['_findSuggestions'](_0x23bf4f,'insertion'))_0x527527['isOwn']&&!_0x527527['isInsideObject']&&_0x2cb0c3['push'](..._0x23bc7a['getRanges']());const _0x3e33ab=function(_0x3253a0,_0x2943ea){const _0x53936e=[];for(const _0x301c0c of _0x2943ea){const _0x51642e=_0x3253a0['getIntersection'](_0x301c0c);_0x51642e&&_0x53936e['push'](_0x51642e);}return _0x53936e;}(_0x23bf4f,_0x2cb0c3),_0x20267b=function(_0x376b0f,_0x32c782){const _0x367be1=[_0x376b0f];for(const _0x2f4ba4 of _0x32c782){let _0x57f184=0x0;for(;_0x57f184<_0x367be1['length'];){const _0x2eb06f=_0x367be1[_0x57f184]['getDifference'](_0x2f4ba4);_0x367be1['splice'](_0x57f184,0x1,..._0x2eb06f),_0x57f184+=_0x2eb06f['length'];}}return _0x367be1;}(_0x23bf4f,_0x2cb0c3);_0x3e33ab['length']&&this['_model']['change'](()=>{for(const _0x42813c of _0x3e33ab){const _0xdf07c1=this['_suggestionFactory']['getSuggestionCallback']('formatInline',_0x49c25d,'accept');this['forceDefaultExecution'](()=>_0xdf07c1([_0x42813c],_0x5c4c0e,_0x3f8b2d));}});for(const _0x39ac39 of _0x20267b){let _0x1d60fd=null,_0x92935c=_0x39ac39['start'],_0x449ff7=_0x39ac39['end'];for(const {suggestion:_0x4c298b,meta:_0xa8d47d}of this['_findSuggestions'](_0x39ac39,'formatInline')){if(!_0xa8d47d['isOwn'])continue;if(_0x4c298b['subType']!=_0x49c25d)continue;const _0x137dfd=_0x4c298b['getFirstRange']();if(_0x137dfd['containsRange'](_0x39ac39,!0x0))return;_0x92935c=_0x92935c['isBefore'](_0x137dfd['start'])?_0x92935c:_0x137dfd['start'],_0x449ff7=_0x449ff7['isAfter'](_0x137dfd['end'])?_0x449ff7:_0x137dfd['end'],_0x1d60fd?_0x137dfd['start']['isBefore'](_0x1d60fd['getFirstRange']()['start'])?(_0x1d60fd['removeMarkers'](),_0x1d60fd=_0x4c298b):_0x4c298b['removeMarkers']():_0x1d60fd=_0x4c298b;}const _0x287cc7=this['_model']['createRange'](_0x92935c,_0x449ff7);if(_0x1d60fd)this['_setSuggestionRange'](_0x1d60fd,_0x287cc7);else{const _0x1eb230=_0x17e38b(),_0x50cb2b=_0x333777['id'];this['_setSuggestionData']({'id':_0x1eb230,'type':'formatInline:'+_0x49c25d,'data':_0x5c4c0e,'createdAt':new Date(),'authorId':_0x50cb2b,'attributes':_0x3f8b2d}),this['_addSuggestionMarker']('formatInline:'+_0x49c25d,_0x1eb230,_0x50cb2b,_0x287cc7);}}}['markBlockFormat'](_0xb62f15,_0x1240d9,_0x15c34b=[],_0xde4303=null,_0x1cdb94={}){_0x1240d9['formatGroupId']||(_0x1240d9['formatGroupId']=_0x1240d9['commandName']),_0x1240d9['multipleBlocks']=_0xb62f15['is']('range'),_0xde4303=_0xde4303||bt(_0x1240d9);const _0x44e1fb=_0x15c34b['map'](_0x1ebb4e=>vt(_0x1ebb4e,this['_model'])),_0x5d6689=_0xb62f15['is']('range')?_0xb62f15:vt(_0xb62f15,this['_model']);_0x44e1fb['push'](_0x5d6689);let _0x4718c6=!0x0;for(const _0x2fa1aa of _0x44e1fb)if(!this['_rangeIsInLocalUserInsertion'](_0x2fa1aa)){_0x4718c6=!0x1;break;}if(_0x4718c6){const _0x52e5b6=this['_suggestionFactory']['getSuggestionCallback']('formatBlock',_0xde4303,'accept');return void this['forceDefaultExecution'](()=>_0x52e5b6([_0x5d6689],_0x1240d9,_0x1cdb94));}let _0x56b8b1=null,_0x1832d1=_0x5d6689['start'],_0x24ab53=_0x5d6689['end'];for(const {suggestion:_0x1d2611,meta:_0x3ca441}of this['_findSuggestions'](_0x5d6689,'formatBlock')){if(!_0x3ca441['isOwn']||_0x3ca441['isNextTo']||_0x3ca441['containsRangeInObject']||_0x3ca441['isInsideObject'])continue;if(_0x1d2611['data']['formatGroupId']!=_0x1240d9['formatGroupId'])continue;const _0x293a80=_0x1d2611['getFirstRange']();if(_0x1d2611['subType']==_0xde4303){if(_0x293a80['containsRange'](_0x5d6689,!0x0))return;_0x1832d1=_0x1832d1['isBefore'](_0x293a80['start'])?_0x1832d1:_0x293a80['start'],_0x24ab53=_0x24ab53['isAfter'](_0x293a80['end'])?_0x24ab53:_0x293a80['end'],_0x56b8b1?_0x293a80['start']['isBefore'](_0x56b8b1['getFirstRange']()['start'])?(_0x56b8b1['removeMarkers'](),_0x56b8b1=_0x1d2611):_0x1d2611['removeMarkers']():_0x56b8b1=_0x1d2611;}else{const _0x24804c=_0x5d6689['getIntersection'](_0x293a80);this['_cutOutSuggestionMarker'](_0x1d2611,_0x24804c);}}const _0x222713=this['editor']['plugins']['get']('Users')['me'],_0x34fc9b=_0x17e38b(),_0x2feb2a=_0x222713['id'];_0x56b8b1?this['_setSuggestionRange'](_0x56b8b1,this['_model']['createRange'](_0x1832d1,_0x24ab53)):(this['_setSuggestionData']({'id':_0x34fc9b,'type':'formatBlock:'+_0xde4303,'data':_0x1240d9,'createdAt':new Date(),'authorId':_0x2feb2a,'attributes':_0x1cdb94}),this['_addSuggestionMarker']('formatBlock:'+_0xde4303,_0x34fc9b,_0x2feb2a,this['_model']['createRange'](_0x1832d1,_0x24ab53)));}['markMultiRangeBlockFormat'](_0x533f3c,_0xd40695,_0x587f9c=[],_0x104a8e=null,_0x39b7d5={}){_0xd40695['formatGroupId']||(_0xd40695['formatGroupId']=_0xd40695['commandName']),_0xd40695['multipleBlocks']=!0x1,_0x104a8e=_0x104a8e||bt(_0xd40695);const _0x54c478=_0x587f9c['map'](_0x17eb1c=>vt(_0x17eb1c,this['_model'])),_0x4dad25=_0x533f3c['map'](_0x5b7203=>vt(_0x5b7203,this['_model']));_0x54c478['push'](..._0x4dad25);let _0x4ff165=!0x0;for(const _0x4c5b58 of _0x54c478)if(!this['_rangeIsInLocalUserInsertion'](_0x4c5b58)){_0x4ff165=!0x1;break;}if(_0x4ff165){const _0x15e887=this['_suggestionFactory']['getSuggestionCallback']('formatBlock',_0x104a8e,'accept');return void this['forceDefaultExecution'](()=>_0x15e887(_0x4dad25,_0xd40695,_0x39b7d5));}const _0x5d4a32=this['editor']['plugins']['get']('Users')['me'];for(const _0x17a37a of this['getSuggestions']()){if(_0x17a37a['author']['id']!=_0x5d4a32['id'])continue;if('formatBlock'!=_0x17a37a['type']||_0x17a37a['data']['formatGroupId']!=_0xd40695['formatGroupId'])continue;const _0x48e720=_0x17a37a['subType']==_0x104a8e;for(let _0x344715=0x0;_0x344715<_0x4dad25['length'];_0x344715++){const _0x2303e1=_0x4dad25[_0x344715];for(const _0x4609a6 of _0x17a37a['getMarkers']()){const _0x48099d=_0x4609a6['getRange']();if(_0x2303e1['isEqual'](_0x48099d)){_0x48e720?(_0x4dad25['splice'](_0x344715,0x1),_0x344715--):_0x17a37a['removeMarker'](_0x4609a6['name']);break;}}}}if(0x0==_0x4dad25['length'])return;const _0x180430=this['_suggestionFactory']['getSuggestionCallback']('formatBlock',_0x104a8e,'join');for(const _0x4966d1 of this['getSuggestions']())if(_0x4966d1['author']['id']==_0x5d4a32['id']&&'formatBlock'==_0x4966d1['type']&&_0x4966d1['data']['formatGroupId']==_0xd40695['formatGroupId']&&_0x4966d1['subType']==_0x104a8e&&(_0x180430(_0x4966d1['getRanges'](),_0x4dad25)||_0x180430(_0x4dad25,_0x4966d1['getRanges']()))){for(const _0x2ebaa0 of _0x4dad25)_0x4966d1['addRange'](_0x2ebaa0);return _0x4966d1;}const _0x4f60a2=_0x17e38b(),_0x51598f=_0x5d4a32['id'],_0x51a8e2='formatBlock:'+_0x104a8e,_0x24e3cf=this['_setSuggestionData']({'id':_0x4f60a2,'type':_0x51a8e2,'data':_0xd40695,'createdAt':new Date(),'authorId':_0x51598f,'attributes':_0x39b7d5});for(const _0x3397fd of _0x4dad25)this['_addSuggestionMarker'](_0x51a8e2,_0x4f60a2,_0x51598f,_0x3397fd,_0xf23b9['getMultiRangeId']());return _0x24e3cf;}['markDeletion'](_0x232ba9,_0x45f6f2=null,_0x4b39f7={}){if(_0x232ba9['isCollapsed'])return null;const _0x1fd91e=this['editor']['plugins']['get']('Users')['me'],_0x363480=new _0x2dbd60(_0x232ba9['start'],_0x232ba9['end']);for(const {suggestion:_0x1183a1,meta:_0x440adc}of this['_findSuggestions'](_0x363480,'insertion'))if(_0x440adc['isOwn']&&!_0x440adc['isNextTo']){if(_0x1183a1['isMultiRange']){const _0x1e35c8=_0x1183a1['getRanges']()['filter'](_0x479d72=>'$graveyard'!=_0x479d72['root']['rootName']);_0x1e35c8['every'](_0x193912=>_0x363480['containsRange'](_0x193912,!0x0))&&_0x1183a1['discard']();if(_0x1e35c8['some'](_0x170a5d=>_0x170a5d['containsRange'](_0x363480,!0x0))){const _0x21c294=this['_suggestionFactory']['getSuggestionCallback']('deletion',_0x45f6f2,'accept');return this['forceDefaultExecution'](()=>_0x21c294([_0x363480],null,_0x4b39f7)),null;}}else{const _0x2fdf31=_0x363480['getIntersection'](_0x1183a1['getFirstRange']());_0x1183a1['_onDiscard']([_0x2fdf31],null,_0x4b39f7);}}if(_0x363480['detach'](),_0x363480['isCollapsed']||'$graveyard'==_0x363480['root']['rootName'])return null;let _0x170491=null,_0x39d46a=_0x363480['start'],_0x59ca7a=_0x363480['end'];for(const {suggestion:_0x2c268a,meta:_0x53eb9d}of this['_findSuggestions'](_0x363480,'deletion'))if(_0x53eb9d['isOwn']){if(_0x2c268a['isMultiRange']){let _0xcc17e2=!0x0;for(const _0x5ce8ff of _0x2c268a['getRanges']()){if(_0x5ce8ff['containsRange'](_0x363480,!0x0))return _0x2c268a;_0x363480['containsRange'](_0x5ce8ff)||(_0xcc17e2=!0x1);}_0xcc17e2&&_0x2c268a['discard']();}else{const _0x40092b=_0x2c268a['getFirstRange']();if(_0x40092b['containsRange'](_0x363480,!0x0))return _0x2c268a;_0x39d46a=_0x39d46a['isBefore'](_0x40092b['start'])?_0x39d46a:_0x40092b['start'],_0x59ca7a=_0x59ca7a['isAfter'](_0x40092b['end'])?_0x59ca7a:_0x40092b['end'],_0x170491?_0x40092b['start']['isBefore'](_0x170491['getFirstRange']()['start'])?(_0x170491['removeMarkers'](),_0x170491=_0x2c268a):_0x2c268a['removeMarkers']():_0x170491=_0x2c268a;}}if(_0x170491)return this['_setSuggestionRange'](_0x170491,this['_model']['createRange'](_0x39d46a,_0x59ca7a)),_0x170491;{const _0x242dd4=_0x17e38b(),_0x44aba6=this['_model']['createRange'](_0x39d46a,_0x59ca7a),_0x4c1797=_0x1fd91e['id'],_0x2abb58=_0x45f6f2?'deletion:'+_0x45f6f2:'deletion',_0x19fb77=this['_setSuggestionData']({'id':_0x242dd4,'type':_0x2abb58,'createdAt':new Date(),'authorId':_0x4c1797,'attributes':_0x4b39f7});return this['_addSuggestionMarker'](_0x2abb58,_0x242dd4,_0x4c1797,_0x44aba6),_0x19fb77;}}['markMultiRangeDeletion'](_0x44e7c5,_0x50b54a='multi',_0x173c9d={}){const _0x1e9a9c=this['editor']['plugins']['get']('Users')['me'],_0x1fec1c=_0x44e7c5['map'](_0x34e15f=>new _0x2dbd60(_0x34e15f['start'],_0x34e15f['end'])),_0x3e17bf=new Set();for(const _0x4f874a of _0x1fec1c)for(const {suggestion:_0x8aae87,meta:_0x281434}of this['_findSuggestions'](_0x4f874a,'insertion'))_0x281434['isOwn']&&!_0x281434['isNextTo']&&_0x3e17bf['add'](_0x8aae87);for(const _0xc8fba2 of _0x3e17bf)if(_0xc8fba2['isMultiRange']){const _0x3cc98c=_0xc8fba2['getRanges']();(!_0xc8fba2['attributes']||!_0xc8fba2['attributes']['skipNestingCheck'])&&(_0x3cc98c['every'](_0x4a1df0=>_0x1fec1c['some'](_0x4a1c61=>_0x4a1c61['containsRange'](_0x4a1df0,!0x0)))&&_0xc8fba2['discard']());if(_0x1fec1c['every'](_0x53509=>_0x3cc98c['some'](_0x2247f2=>_0x2247f2['containsRange'](_0x53509,!0x0)))){const _0x48cbf5=this['_suggestionFactory']['getSuggestionCallback']('deletion',_0x50b54a,'accept');return this['forceDefaultExecution'](()=>_0x48cbf5(_0x44e7c5,null,_0x173c9d)),null;}}else{const _0x5431c8=_0xc8fba2['getFirstRange']();_0x1fec1c['some'](_0x34cfcb=>_0x34cfcb['containsRange'](_0x5431c8,!0x0))&&_0xc8fba2['discard']();if(_0x1fec1c['every'](_0x340f1e=>_0x5431c8['containsRange'](_0x340f1e,!0x0))){const _0x47288b=this['_suggestionFactory']['getSuggestionCallback']('deletion',_0x50b54a,'accept');return this['forceDefaultExecution'](()=>_0x47288b(_0x1fec1c,null,_0x173c9d)),null;}}const _0x1f878b=this['_suggestionFactory']['getSuggestionCallback']('deletion',_0x50b54a,'join');let _0x1ce7db=null;for(const _0x2e6d5f of this['getSuggestions']())if(_0x2e6d5f['author']['id']==_0x1e9a9c['id']&&_0x2e6d5f['isInContent']&&'deletion'==_0x2e6d5f['type']&&_0x2e6d5f['subType']==_0x50b54a&&(_0x1f878b(_0x2e6d5f['getRanges'](),_0x1fec1c)||_0x1f878b(_0x1fec1c,_0x2e6d5f['getRanges']()))){if(_0x1ce7db){if(_0x2e6d5f['commentThread']&&_0x2e6d5f['commentThread']['length'])continue;for(const _0x5dbd8e of _0x2e6d5f['getRanges']())_0x1ce7db['isIntersectingWithRange'](_0x5dbd8e)||_0x1ce7db['addRange'](_0x5dbd8e);_0x2e6d5f['removeMarkers']();}else{_0x1ce7db=_0x2e6d5f;for(const _0x4bfdf6 of _0x1fec1c)_0x2e6d5f['isIntersectingWithRange'](_0x4bfdf6)||_0x2e6d5f['addRange'](_0x4bfdf6);}}if(_0x1ce7db)return _0x1ce7db;_0x3e17bf['clear']();for(const _0x1fb32e of _0x1fec1c)for(const {suggestion:_0x43e980,meta:_0x564e14}of this['_findSuggestions'](_0x1fb32e,'deletion'))_0x564e14['isOwn']&&_0x3e17bf['add'](_0x43e980);for(const _0x509dbc of _0x3e17bf){const _0x12b5c6=_0x509dbc['getRanges']();if(!_0x173c9d||!_0x173c9d['skipNestingCheck']){if(_0x1fec1c['every'](_0x4dabb0=>_0x12b5c6['some'](_0x24a394=>_0x24a394['containsRange'](_0x4dabb0,!0x0))))return _0x509dbc;}(!_0x509dbc['attributes']||!_0x509dbc['attributes']['skipNestingCheck'])&&(_0x12b5c6['every'](_0x58e6b1=>_0x1fec1c['some'](_0x10a87f=>_0x10a87f['containsRange'](_0x58e6b1,!0x0)))&&_0x509dbc['discard']());}const _0x2f7ddf=_0x17e38b(),_0x3c35d8=_0x1e9a9c['id'],_0x26aade='deletion:'+_0x50b54a,_0x46e89e=this['_setSuggestionData']({'id':_0x2f7ddf,'type':_0x26aade,'createdAt':new Date(),'authorId':_0x3c35d8,'attributes':_0x173c9d});for(const _0x43e9e4 of _0x1fec1c)_0x43e9e4['detach'](),_0x43e9e4['isCollapsed']||'$graveyard'==_0x43e9e4['root']['rootName']||this['_addSuggestionMarker'](_0x26aade,_0x2f7ddf,_0x3c35d8,_0x43e9e4,_0xf23b9['getMultiRangeId']());return _0x46e89e;}['_setSuggestionRange'](_0x71f8c7,_0x223ea){const _0x503cc8=_0x71f8c7['getFirstMarker']();this['_model']['change'](_0x39694b=>{_0x39694b['updateMarker'](_0x503cc8,{'range':_0x223ea});});}['_addThreadToSuggestion'](_0x4fa740){const _0x36cd90=_0x4fa740['id'],_0x6f68e2=this['editor']['config']['get']('collaboration.channelId');this['_commentsRepository']['hasCommentThread'](_0x36cd90)||this['_commentsRepository']['addCommentThread']({'channelId':_0x6f68e2,'threadId':_0x36cd90});const _0x2a1cde=this['_commentsRepository']['getCommentThread'](_0x36cd90);_0x2a1cde['unbind']('isRemovable'),_0x2a1cde['isRemovable']=!0x1,_0x4fa740['commentThread']=_0x2a1cde;}['_checkSuggestionCorrectness'](_0x5688fe,_0x101651,_0x2955d5,_0x1ba06b){if(_0x5688fe['type']!=_0x101651||_0x5688fe['subType']!=_0x2955d5||_0x5688fe['author']['id']!=_0x1ba06b)throw this['editor']['isReadOnly']=!0x0,new _0x6684a1('track-changes-suggestion-data-mismatch',this);}['_cutOutSuggestionMarker'](_0x13d14f,_0x9222e1){const _0x11eabe=_0x13d14f['getFirstRange']();if(_0x9222e1['isEqual'](_0x11eabe))_0x13d14f['removeMarkers']();else{if(_0x11eabe['containsRange'](_0x9222e1)){const _0x2caf21=this['_model']['createPositionAt'](_0x9222e1['start']['nodeBefore'],'end');this['_setSuggestionRange'](_0x13d14f,this['_model']['createRange'](_0x11eabe['start'],_0x2caf21));const _0x4442cf=_0x17e38b(),_0xd4b89=_0x13d14f['author']['id'],_0x32bb56=_0x13d14f['type']+':'+_0x13d14f['subType'];this['_setSuggestionData']({'id':_0x4442cf,'type':_0x32bb56,'createdAt':new Date(),'authorId':_0xd4b89,'data':_0x13d14f['data'],'attributes':_0x13d14f['attributes']});const _0x2db088=this['_model']['createPositionAt'](_0x9222e1['end']['parent'],'after'),_0x52fe5b=this['_model']['createRange'](_0x2db088,_0x11eabe['end']);this['_addSuggestionMarker'](_0x32bb56,_0x4442cf,_0xd4b89,_0x52fe5b);}else{if(_0x11eabe['containsPosition'](_0x9222e1['start'])){const _0x2d160b=this['_model']['createPositionAt'](_0x9222e1['start']['nodeBefore'],'end');this['_setSuggestionRange'](_0x13d14f,this['_model']['createRange'](_0x11eabe['start'],_0x2d160b));}else{const _0x51dccc=this['_model']['createPositionAt'](_0x9222e1['end']['parent'],'after');this['_setSuggestionRange'](_0x13d14f,this['_model']['createRange'](_0x51dccc,_0x11eabe['end']));}}}}['_rangeIsInLocalUserInsertion'](_0x586078){for(const {suggestion:_0x20b49a,meta:_0x4f00ad}of this['_findSuggestions'](_0x586078,'insertion')){if(!_0x4f00ad['isOwn'])continue;const _0x5691e5=_0x20b49a['getRanges']();for(const _0x8ef39d of _0x5691e5)if(!_0x586078['getDifference'](_0x8ef39d)['length'])return!0x0;}return!0x1;}['_getAuthorFromId'](_0x4dc5b5){const _0x1023da=this['editor']['plugins']['get']('Users')['getUser'](_0x4dc5b5);if(!_0x1023da)throw new _0x6684a1('track-changes-user-not-found',this);return _0x1023da;}['_createSuggestion'](_0x538b07,_0x135111,_0x413e17,_0x141c9e){const _0x46c3c8=this['_getAuthorFromId'](_0x141c9e),_0x275ec3=this['_suggestionFactory']['buildSuggestion'](_0x538b07,_0x135111,_0x413e17,_0x46c3c8,_0x42754e=>this['_updateSuggestionData'](_0x413e17,{'attributes':_0x42754e}));return this['listenTo'](_0x275ec3,'accept',()=>{this['_updateSuggestionData'](_0x413e17,{'state':'accepted'});},{'priority':'high'}),this['listenTo'](_0x275ec3,'discard',()=>{this['_updateSuggestionData'](_0x413e17,{'state':'rejected'});},{'priority':'high'}),this['_suggestions']['set'](_0x413e17,_0x275ec3),this['_suggestionState']['set'](_0x275ec3,'notReady'),_0x275ec3;}['_splitMarkerName'](_0x11d171){const _0x3a9085=_0x11d171['split'](':');return{'group':_0x3a9085[0x0],'type':_0x3a9085[0x1],'subType':_0x3a9085['length']>=0x5?_0x3a9085[0x2]:null,'id':_0x3a9085['length']<0x5?_0x3a9085[0x2]:_0x3a9085[0x3],'authorId':_0x3a9085['length']<0x5?_0x3a9085[0x3]:_0x3a9085[0x4],'markerCount':0x6==_0x3a9085['length']?_0x3a9085[0x5]:null};}['_breakSuggestionMarker'](_0x35a922,_0x340f83,_0x1a3903){const _0x125753=_0x35a922['getFirstRange'](),_0x3a5ba9=_0x125753['start'],_0x4c359e=_0x125753['end'];this['_setSuggestionRange'](_0x35a922,this['_model']['createRange'](_0x3a5ba9,_0x340f83));const _0x432d1e=_0x17e38b(),_0x3643d8=_0x35a922['author']['id'],_0x2609da=_0x35a922['type']+(_0x35a922['subType']?':'+_0x35a922['subType']:'');this['_setSuggestionData']({'id':_0x432d1e,'type':_0x2609da,'createdAt':new Date(),'authorId':_0x3643d8,'originalSuggestionId':_0x35a922['id'],'data':_0x35a922['data']}),'formatBlock'==_0x35a922['type']&&(_0x1a3903=this['_model']['createPositionBefore'](_0x1a3903['parent'])),this['_addSuggestionMarker'](_0x2609da,_0x432d1e,_0x3643d8,this['_model']['createRange'](_0x1a3903,_0x4c359e));}['_findSuggestions'](_0x2b94b1,_0x3d1d74=null){const _0x3713c5=[],_0x4fd53e=this['_model']['schema'],_0x57dfbb=this['editor']['plugins']['get']('Users')['me'];for(const _0xcf2331 of this['getSuggestions']())if(_0xcf2331['isInContent']&&(!_0x3d1d74||_0xcf2331['type']==_0x3d1d74))for(const _0x3c5bb2 of _0xcf2331['getRanges']()){const _0x4b0392=_0x2b94b1['start']['isEqual'](_0x3c5bb2['end'])||_0x2b94b1['end']['isEqual'](_0x3c5bb2['start']);if(_0x4b0392||_0x2b94b1['getIntersection'](_0x3c5bb2)){const _0x28bf3c=_0x2b94b1['containsRange'](_0x3c5bb2)&&wt(_0x4fd53e,_0x3c5bb2['start'],_0x2b94b1),_0x1cbff0=_0x3c5bb2['containsRange'](_0x2b94b1)&&wt(_0x4fd53e,_0x2b94b1['start'],_0x3c5bb2);_0x3713c5['push']({'suggestion':_0xcf2331,'meta':{'isOwn':_0x57dfbb==_0xcf2331['author'],'isNextTo':_0x4b0392,'isInsideObject':_0x28bf3c,'containsRangeInObject':_0x1cbff0}});break;}}return _0x3713c5;}['_addSuggestionMarker'](_0x4f1f9e,_0xa46949,_0x33399f,_0x59a4e1,_0x288e24=null){this['_model']['change'](_0x69b90=>{let _0x13d422='suggestion:'+_0x4f1f9e+':'+_0xa46949+':'+_0x33399f;_0x288e24&&(_0x13d422=_0x13d422+':'+_0x288e24),_0x69b90['addMarker'](_0x13d422,{'range':_0x59a4e1,'usingOperation':!0x0,'affectsData':!0x0});});}['_removeSuggestion'](_0x4d10f5){const _0x3c656f=_0x4d10f5['previous'],_0x39f93f=_0x4d10f5['next'];_0x4d10f5['previous']=null,null!=_0x3c656f&&(_0x3c656f['next']=null),_0x4d10f5['next']=null,null!=_0x39f93f&&(_0x39f93f['previous']=null),'ready'==this['_suggestionState']['get'](_0x4d10f5)&&(this['_suggestionState']['set'](_0x4d10f5,'removed'),this['fire']('suggestionUnloaded',_0x4d10f5,_0x3c656f,_0x39f93f));}['_setSuggestionData'](_0x96d786){const _0x34ce6e=_0x96d786['id'],_0x3512b6=this['addSuggestionData'](_0x96d786);if(this['_adapter']&&this['_adapter']['addSuggestion']){const _0x129120=this['editor']['plugins']['get']('PendingActions'),_0x53ec1c=_0x3512b6['hasComments'],_0x1b8d40=_0x3512b6['subType']?_0x3512b6['type']+':'+_0x3512b6['subType']:_0x3512b6['type'],t=this['editor']['locale']['t'],_0x55c38a=_0x129120['add'](t({'string':'Unsaved\x20change\x20in\x20suggestion.','id':'PENDING_ACTION_SUGGESTION'})),_0x405e78={'id':_0x34ce6e,'type':_0x1b8d40,'hasComments':_0x53ec1c,'data':_0x96d786['data']||null,'originalSuggestionId':_0x96d786['originalSuggestionId']||null,'attributes':_0x3512b6['attributes']};this['_adapter']['addSuggestion'](_0x405e78)['then'](_0x3f6209=>{_0x3512b6['_saved']=!0x0,_0x129120['remove'](_0x55c38a),_0x3f6209&&_0x3f6209['createdAt']&&(this['_suggestions']['get'](_0x34ce6e)['createdAt']=_0x3f6209['createdAt']);});}return _0x3512b6;}['_updateSuggestionData'](_0x16181b,_0x485dbd){const _0x28689a=this['editor']['plugins']['get']('PendingActions'),_0x4a2ec3=this['_suggestions']['get'](_0x16181b);if(this['_adapter']&&this['_adapter']['updateSuggestion']){if(_0x4a2ec3['_saved']){const t=this['editor']['locale']['t'],_0x1fbbd7=_0x28689a['add'](t({'string':'Unsaved\x20change\x20in\x20suggestion.','id':'PENDING_ACTION_SUGGESTION'}));this['_adapter']['updateSuggestion'](_0x16181b,_0x485dbd)['then'](()=>{_0x28689a['remove'](_0x1fbbd7);});}else _0x4a2ec3['on']('change:_saved',()=>{this['_updateSuggestionData'](_0x16181b,_0x485dbd);});}}['_getSuggestionData'](_0x4b911f){if(!this['_adapter']||!this['_adapter']['getSuggestion'])throw new _0x6684a1('track-changes-adapter-missing-getsuggestion',this);return this['_adapter']['getSuggestion'](_0x4b911f);}['_handleNewSuggestionMarker'](_0x424044){const {id:_0x6090b4,type:_0x45bb78,subType:_0x550832,authorId:_0x161e46}=this['_splitMarkerName'](_0x424044),_0x21c565=this['_suggestions']['get'](_0x6090b4)||this['_createSuggestion'](_0x45bb78,_0x550832,_0x6090b4,_0x161e46);switch(this['_checkSuggestionCorrectness'](_0x21c565,_0x45bb78,_0x550832,_0x161e46),this['_suggestionState']['get'](_0x21c565)){case'notReady':this['_getSuggestionData'](_0x6090b4)['then'](_0x24bf35=>{let _0x1952b4=Promise['resolve']();_0x24bf35['hasComments']&&(_0x1952b4=this['_commentsRepository']['fetchCommentThread']({'channelId':this['editor']['config']['get']('collaboration.channelId'),'threadId':_0x6090b4})),_0x1952b4['then'](()=>{this['addSuggestionData'](_0x24bf35)['_saved']=!0x0;});}),this['_suggestionState']['set'](_0x21c565,'markerReady');break;case'removed':this['_updateSuggestionData'](_0x6090b4,{'state':'open'});case'dataReady':this['_suggestionState']['set'](_0x21c565,'ready'),this['fire']('suggestionLoaded',_0x21c565);break;case'ready':this['fire']('suggestionChanged',_0x21c565);}_0x21c565['addMarkerName'](_0x424044),this['_refreshSuggestionsChain'](_0x21c565);}['_refreshSuggestionsChain'](_0x25a272){if(_0x25a272['isMultiRange'])return;let _0x1fe28e=!0x0,_0x54ea95=!0x0;for(const _0x139afb of this['getSuggestions']()){if(_0x139afb['isMultiRange'])continue;if(_0x139afb==_0x25a272||!_0x139afb['isInContent'])continue;if(_0x139afb['author']['id']!=_0x25a272['author']['id'])continue;const _0x52e87f=this['_suggestionFactory']['getSuggestionCallback'](_0x25a272['type'],_0x25a272['subType'],'chain'),_0x3bc02b=this['_suggestionFactory']['getSuggestionCallback'](_0x139afb['type'],_0x139afb['subType'],'chain'),_0x2eaf40=_0x52e87f(_0x25a272,_0x139afb),_0x234d23=_0x3bc02b(_0x25a272,_0x139afb);_0x2eaf40&&_0x234d23&&(_0x2eaf40[0x1]['commentThread']&&_0x2eaf40[0x1]['commentThread']['length']||(_0x2eaf40[0x0]['next']=_0x2eaf40[0x1],_0x2eaf40[0x1]['previous']=_0x2eaf40[0x0],_0x2eaf40[0x0]==_0x25a272?_0x54ea95=!0x1:_0x1fe28e=!0x1));}_0x25a272['previous']&&_0x1fe28e&&(_0x25a272['previous']['next']=null,_0x25a272['previous']=null),_0x25a272['next']&&_0x54ea95&&(_0x25a272['next']['previous']=null,_0x25a272['next']=null);}['_joinWithAdjacentSuggestions'](_0x3e1e59){for(const _0x262297 of this['_suggestions']['values']()){if(_0x262297==_0x3e1e59||!_0x262297['isInContent'])continue;if(_0x262297['type']!=_0x3e1e59['type']||_0x262297['author']['id']!=_0x3e1e59['author']['id']||_0x262297['subType']!=_0x3e1e59['subType'])continue;const _0x1487a1=this['_suggestionFactory']['getSuggestionCallback'](_0x3e1e59['type'],_0x3e1e59['subType'],'join');if(_0x1487a1(_0x262297['getRanges'](),_0x3e1e59['getRanges']())){if(_0x3e1e59['commentThread']&&_0x3e1e59['commentThread']['length'])continue;return this['_joinSuggestions'](_0x262297,_0x3e1e59),!0x0;}if(_0x1487a1(_0x3e1e59['getRanges'](),_0x262297['getRanges']())){if(_0x262297['commentThread']&&_0x262297['commentThread']['length'])continue;return this['_joinSuggestions'](_0x3e1e59,_0x262297),!0x0;}}return!0x1;}['_joinSuggestions'](_0x23864a,_0x55d54a){if(_0x23864a['isMultiRange'])for(const _0x17012f of _0x55d54a['getRanges']())_0x23864a['addRange'](_0x17012f);else{const _0x246f8c=_0x55d54a['getFirstRange']()['end'];this['_setSuggestionRange'](_0x23864a,this['_model']['createRange'](_0x23864a['getFirstRange']()['start'],_0x246f8c));}_0x55d54a['removeMarkers']();}}_0x3e6840(l,_0x37c232);class kt{constructor(_0x3504b2){this['_editor']=_0x3504b2,this['_model']=_0x3504b2['model'],this['_customCallbacks']=new Map(),this['_defaultCallbacks']=new Map(),this['_registerDefaultCallbacks']();}['buildSuggestion'](_0x2c1eaf,_0x586ebf,_0x2ef4f4,_0x29da36,_0x328f65){return new _0xf23b9(this['_model'],{'type':_0x2c1eaf,'subType':_0x586ebf,'id':_0x2ef4f4,'author':_0x29da36,'onAttributesChange':_0x328f65,'onAccept':(..._0x2e0eb6)=>this['getSuggestionCallback'](_0x2c1eaf,_0x586ebf,'accept')(..._0x2e0eb6),'onDiscard':(..._0xbc3a41)=>this['getSuggestionCallback'](_0x2c1eaf,_0x586ebf,'discard')(..._0xbc3a41)});}['registerCustomCallback'](_0x1f9d30,_0x48c22e,_0x4a37aa,_0x51861d){const _0x4262ff=_0x1f9d30+':'+_0x48c22e+':'+_0x4a37aa;this['_customCallbacks']['set'](_0x4262ff,_0x51861d);}['getSuggestionCallback'](_0x45b291,_0x2d26bc,_0x1e7129){const _0x1b7996=_0x45b291+':'+_0x2d26bc+':'+_0x1e7129;return this['_customCallbacks']['get'](_0x1b7996)||this['_defaultCallbacks']['get'](_0x45b291+':'+_0x1e7129);}['_registerDefaultCallbacks'](){const _0x328a70=()=>{},_0x1948ef=_0x23688=>{_0x23688['sort']((_0x5c5ffb,_0x41f69c)=>_0x5c5ffb['start']['isBefore'](_0x41f69c['start'])?0x1:-0x1),this['_model']['change'](_0x48487b=>{for(const _0x3047a6 of _0x23688){let _0x2cc38a;_0x2cc38a=_0x3047a6['end']['isAtEnd']&&_0x3047a6['end']['parent']==_0x3047a6['start']['nodeAfter']?_0x48487b['createSelection'](_0x3047a6['start']['nodeAfter'],'on'):_0x48487b['createSelection'](_0x3047a6),this['_model']['deleteContent'](_0x2cc38a,{'forceDefaultExecution':!0x0,'doNotAutoparagraph':!0x0});}});},_0xf95ee6=(_0x17277e,_0x5bd8da)=>{this['_model']['change'](_0x37017f=>{const {commandName:_0x466d15,commandParams:_0x284632=[]}=_0x5bd8da,_0x173709=_0x17277e[0x0];if('$graveyard'==_0x173709['root']['rootName'])return;const _0x483514=Array['from'](this['_model']['document']['selection']['getRanges']())['map'](_0x5a08b7=>_0x2dbd60['fromRange'](_0x5a08b7));yt(_0x173709)?_0x37017f['setSelection'](this['_model']['createRange'](_0x173709['end'])):_0x37017f['setSelection'](_0x173709);for(const _0x2fdbe3 of this['_editor']['commands']['commands']())_0x2fdbe3['refresh']();_0x284632['push']({'forceDefaultExecution':!0x0}),this['_editor']['execute'](_0x466d15,..._0x284632);const _0x1f5e28=_0x483514['filter'](_0x30c1ec=>'$graveyard'!=_0x30c1ec['root']['rootName']);_0x1f5e28['length']>0x0&&_0x37017f['setSelection'](_0x1f5e28);for(const _0x52d29b of _0x483514)_0x52d29b['detach']();});},_0x3b0e7e=(_0x30f0b9,_0x2277f9)=>0x1==_0x30f0b9['length']&&0x1==_0x2277f9['length']&&_0x30f0b9[0x0]['end']['isEqual'](_0x2277f9[0x0]['start']),_0x42724c=(_0x4b1e48,_0x5cace1)=>Dt(_0x4b1e48,_0x5cace1,this['_model'])?[_0x4b1e48,_0x5cace1]:Dt(_0x5cace1,_0x4b1e48,this['_model'])?[_0x5cace1,_0x4b1e48]:null;this['_defaultCallbacks']['set']('insertion:accept',_0x328a70),this['_defaultCallbacks']['set']('insertion:discard',_0x1948ef),this['_defaultCallbacks']['set']('insertion:join',_0x3b0e7e),this['_defaultCallbacks']['set']('insertion:chain',_0x42724c),this['_defaultCallbacks']['set']('deletion:accept',_0x1948ef),this['_defaultCallbacks']['set']('deletion:discard',_0x328a70),this['_defaultCallbacks']['set']('deletion:join',_0x3b0e7e),this['_defaultCallbacks']['set']('deletion:chain',_0x42724c),this['_defaultCallbacks']['set']('formatInline:accept',_0xf95ee6),this['_defaultCallbacks']['set']('formatInline:discard',_0x328a70),this['_defaultCallbacks']['set']('formatInline:join',_0x3b0e7e),this['_defaultCallbacks']['set']('formatInline:chain',_0x328a70),this['_defaultCallbacks']['set']('formatBlock:accept',_0xf95ee6),this['_defaultCallbacks']['set']('formatBlock:discard',_0x328a70),this['_defaultCallbacks']['set']('formatBlock:join',_0x3b0e7e),this['_defaultCallbacks']['set']('formatBlock:chain',_0x328a70);}}function wt(_0x4caf58,_0x119ed0,_0x11eea5){for(const _0x3ccffa of _0x119ed0['parent']['getAncestors']({'includeSelf':!0x0,'parentFirst':!0x0})){if(_0x3ccffa['root']==_0x3ccffa)return!0x1;if(!_0x11eea5['containsItem'](_0x3ccffa))return!0x1;if(_0x4caf58['isObject'](_0x3ccffa)||_0x4caf58['isLimit'](_0x3ccffa))return!0x0;}}function yt(_0x746e09){return _0x746e09['end']['parent']==_0x746e09['start']['nodeAfter']&&_0x746e09['end']['isAtStart'];}function St(_0xc12e94,_0xdaedba,_0x17c7b3,_0x308c28){const _0x1de82f=_0x193961=>!_0x193961['item']['is']('textProxy')&&!_0x308c28['isObject'](_0x193961['item']),_0x4de93f=_0xc12e94['start']['getLastMatchingPosition'](_0x1de82f),_0x249edb=_0xc12e94['end']['getLastMatchingPosition'](_0x1de82f,{'direction':'backward'});return(!_0xc12e94['start']['isEqual'](_0x4de93f)||!_0xc12e94['end']['isEqual'](_0x249edb))&&(_0x4de93f['isBefore'](_0x249edb)?_0x17c7b3['updateMarker'](_0xdaedba,{'range':_0x17c7b3['createRange'](_0x4de93f,_0x249edb)}):_0x17c7b3['removeMarker'](_0xdaedba),!0x0);}function bt(_0x42234a){return mt(_0x42234a);}function It(_0x2539e5){const _0x3eea91=_0x2539e5['start']['nodeAfter'];return _0x3eea91&&_0x3eea91['is']('element');}function vt(_0x304e67,_0x6f7cf1){const _0x23c093=_0x6f7cf1['schema']['isObject'](_0x304e67)||_0x6f7cf1['schema']['isSelectable'](_0x304e67);return _0x6f7cf1['createRange'](_0x6f7cf1['createPositionAt'](_0x304e67,'before'),_0x23c093?_0x6f7cf1['createPositionAfter'](_0x304e67):_0x6f7cf1['createPositionAt'](_0x304e67,'end'));}function Dt(_0x1f0d78,_0x446244,_0x573da5){const _0x5f13ae=_0x1f0d78['getFirstRange'](),_0x1c8d9e=_0x446244['getFirstRange']();if(_0x5f13ae['end']['isEqual'](_0x1c8d9e['start']))return!0x0;if(_0x1f0d78['type']!=_0x446244['type'])return!0x1;if(!_0x5f13ae['end']['isTouching'](_0x1c8d9e['start']))return!0x1;const _0x451686=_0x573da5['createRange'](_0x5f13ae['end'],_0x1c8d9e['start'])['getWalker']();for(const _0x1bb75e of _0x451686)if(['elementStart','elementEnd']['includes'](_0x1bb75e['type'])&&_0x573da5['schema']['isLimit'](_0x1bb75e['item']))return!0x1;return!0x0;}
23
+ import{Plugin as _0x31e4a5,PendingActions as _0x1a7bc1}from'ckeditor5/src/core';import{LiveRange as _0x5cdb}from'ckeditor5/src/engine';import{CKEditorError as _0x3a6ec5,uid as _0xd9a6f1,priorities as _0x2fbfb7,EmitterMixin as _0x16d268,mix as _0x5d0173}from'ckeditor5/src/utils';import{toWidget as _0xcbf382}from'ckeditor5/src/widget';import{Users as _0x518140}from'ckeditor5-collaboration/src/collaboration-core';import _0x432ef2 from'./commands/trackchangescommand';import _0x1f0bf4 from'./commands/acceptsuggestioncommand';import _0x53071d from'./commands/discardsuggestioncommand';import _0x240242 from'./commands/acceptallsuggestionscommand';import _0x40b5e6 from'./commands/acceptselectedsuggestionscommand';import _0x71b4e4 from'./commands/discardallsuggestionscommand';import _0x22cf8f from'./commands/discardselectedsuggestionscommand';import _0x11fe95 from'./suggestion';import _0x29a674 from'./suggestiondescriptionfactory';import'../theme/suggestion.css';import'../theme/suggestionmarker.css';import _0x3dceff from'./integrations/alignment';import _0x291702 from'./integrations/basicstyles';import _0x28b3fe from'./integrations/blockquote';import _0x271903 from'./integrations/codeblock';import _0x4e2d01 from'./integrations/comments';import _0x500745 from'./integrations/deletecommand';import _0x8ab3f5 from'./integrations/entercommand';import _0x5a7cb3 from'./integrations/font';import _0x2ba5a1 from'./integrations/heading';import _0x33c9af from'./integrations/highlight';import _0x1baad9 from'./integrations/horizontalline';import _0x547ccd from'./integrations/image';import _0x150002 from'./integrations/indent';import _0x452183 from'./integrations/inputcommand';import _0x2b1804 from'./integrations/link';import _0x35da6c from'./integrations/list';import _0x26ab64 from'./integrations/mediaembed';import _0x348abe from'./integrations/mention';import _0x16a12c from'./integrations/pagebreak';import tt from'./integrations/paragraph';import it from'./integrations/removeformat';import st from'./integrations/restrictededitingmode';import nt from'./integrations/shiftentercommand';import et from'./integrations/standardeditingmode';import ot from'./integrations/table';import rt from'./integrations/tablemergesplit';import at from'./integrations/tableheadings';import ct from'./integrations/tableclipboard';import ht from'./integrations/title';import ut from'./integrations/undo';import ft from'./utils/hashobject.js';export default class p extends _0x31e4a5{static get['requires'](){return['CommentsRepository',_0x518140,_0x1a7bc1,_0x3dceff,_0x291702,_0x28b3fe,_0x271903,_0x4e2d01,_0x500745,_0x8ab3f5,_0x5a7cb3,_0x2ba5a1,_0x33c9af,_0x1baad9,_0x547ccd,_0x150002,_0x452183,_0x2b1804,_0x35da6c,_0x26ab64,_0x348abe,_0x16a12c,tt,it,st,nt,et,ot,rt,at,ct,ht,ut];}static get['pluginName'](){return'TrackChangesEditing';}constructor(_0x21d8c6){function _0x5e4206(_0x25e45b){return _0x25e45b['map'](_0x57cf12=>String['fromCharCode'](_0x57cf12))['join']('');}super(_0x21d8c6),this['set']('activeMarkers',[]),this['on']('change:activeMarkers',(_0x861532,_0x401045,_0x4bef47,_0x3cf902)=>{this['_model']['change'](()=>{for(const _0x368353 of[..._0x3cf902,..._0x4bef47])this['_model']['markers']['has'](_0x368353)&&_0x21d8c6['editing']['reconvertMarker'](_0x368353);});}),this['_descriptionFactory']=new _0x29a674(this['editor']['model']['schema'],this['editor']['locale']),this['_adapter']=null,this['_suggestionFactory']=new gt(this['editor']),this['_suggestions']=new Map(),this['_commentsRepository']=_0x21d8c6['plugins']['get']('CommentsRepository'),this['_enabledCommands']=new Set(),this['_model']=this['editor']['model'],this['_suggestionState']=new WeakMap(),this['_isForcedDefaultExecutionBlock']=!0x1,this[_0x5e4206([0x5f,0x65,0x78,0x65,0x63,0x75,0x74,0x65,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x69,0x6f,0x6e])]=_0x5e4206([0x34,0x30,0x34,0x34,0x30,0x36,0x31,0x38]);}['init'](){const _0x2ccde8=this['editor'];_0x2ccde8['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'suggestion','view':_0x44f237=>{const {id:_0x13274e,type:_0x45fb7d}=this['_splitMarkerName'](_0x44f237['markerName']),_0x2466a2=['ck-suggestion-marker','ck-suggestion-marker-'+_0x45fb7d];let _0x534524=0xbb8;return this['activeMarkers']['includes'](_0x44f237['markerName'])&&(_0x2466a2['push']('ck-suggestion-marker--active'),_0x534524=0xbc2),'deletion'==_0x45fb7d&&(_0x534524+=0x5),{'classes':_0x2466a2,'attributes':{'data-suggestion':_0x13274e},'priority':_0x534524};}}),_0x2ccde8['conversion']['for']('dataDowncast')['add'](_0x6e3d29=>{_0x6e3d29['on']('addMarker:suggestion',(_0x8aa05b,_0x514a34,_0x270186)=>{if(!_0x270186['options']['showSuggestionHighlights'])return;const _0x4d6ecf=_0x514a34['item'];if(!_0x4d6ecf)return;const _0x7fa20a=_0x270186['mapper']['toViewElement'](_0x4d6ecf);_0x2ccde8['model']['schema']['isObject'](_0x4d6ecf)&&_0x7fa20a&&!_0x7fa20a['getCustomProperty']('widget')&&_0x7fa20a['is']('containerElement')&&_0xcbf382(_0x7fa20a,_0x270186['writer']);},{'priority':'high'});}),_0x2ccde8['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'suggestion','view':(_0x517e89,_0x1d7976)=>{if(!_0x1d7976['options']['showSuggestionHighlights'])return null;const {type:_0xb48810}=this['_splitMarkerName'](_0x517e89['markerName']);return{'classes':['ck-suggestion-marker','ck-suggestion-marker-'+_0xb48810],'priority':0xbb8};}});const _0x20d39b=({showActiveMarkers:_0x146056=!0x0}={})=>(_0x145951,_0x268d21,_0x378f78)=>{if(!_0x268d21['item'])return;if(_0x268d21['item']['is']('selection'))return void _0x378f78['consumable']['consume'](_0x268d21['item'],_0x145951['name']);const _0x100822=_0x378f78['mapper']['toViewElement'](_0x268d21['item']);if(!(_0x268d21['item']['is']('element')&&_0x2ccde8['model']['schema']['isBlock'](_0x268d21['item'])&&!_0x100822['getCustomProperty']('addHighlight')))return;const {id:_0x505d30}=this['_splitMarkerName'](_0x268d21['markerName']);_0x378f78['writer']['addClass'](['ck-suggestion-marker','ck-suggestion-marker-formatBlock'],_0x100822),_0x378f78['writer']['setAttribute']('data-suggestion',_0x505d30,_0x100822),_0x378f78['mapper']['bindElementToMarker'](_0x100822,_0x268d21['markerName']),_0x146056&&(this['activeMarkers']['includes'](_0x268d21['markerName'])?_0x378f78['writer']['addClass']('ck-suggestion-marker--active',_0x100822):_0x378f78['writer']['removeClass']('ck-suggestion-marker--active',_0x100822));for(const _0x1e4c98 of _0x2ccde8['model']['createRangeIn'](_0x268d21['item'])['getItems']())_0x378f78['consumable']['consume'](_0x1e4c98,_0x145951['name']);_0x378f78['consumable']['consume'](_0x268d21['item'],_0x145951['name']);};_0x2ccde8['conversion']['for']('dataDowncast')['add'](_0x2943e9=>{_0x2943e9['on']('addMarker:suggestion:formatBlock',(_0x4647a3,_0x54259e,_0x24a220)=>{_0x24a220['options']['showSuggestionHighlights']&&_0x20d39b({'showActiveMarkers':!0x1})(_0x4647a3,_0x54259e,_0x24a220);},{'priority':'highest'});}),_0x2ccde8['conversion']['for']('dataDowncast')['markerToData']({'model':'suggestion','view':(_0x1e368e,_0x181faa)=>_0x181faa['options']['showSuggestionHighlights']?null:{'group':'suggestion','name':_0x1e368e['substr']('suggestion'['length']+0x1)}}),_0x2ccde8['conversion']['for']('upcast')['elementToElement']({'view':{'name':'suggestion','attribute':{'id':/^\w/,'suggestionType':/^\w/}},'model':(_0x41f62e,{writer:_0x18383a})=>{let _0x31daf9='suggestion:'+_0x41f62e['getAttribute']('suggestion-type')+':'+_0x41f62e['getAttribute']('id');return _0x41f62e['getAttribute']('marker-count')&&(_0x31daf9+=':'+_0x41f62e['getAttribute']('marker-count')),_0x18383a['createElement']('$marker',{'data-name':_0x31daf9});}}),_0x2ccde8['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion'}),_0x2ccde8['conversion']['for']('editingDowncast')['add'](_0x262bc0=>{_0x262bc0['on']('addMarker:suggestion:formatBlock',_0x20d39b(),{'priority':'high'});}),_0x2ccde8['conversion']['for']('editingDowncast')['add'](_0x3f7319=>{_0x3f7319['on']('removeMarker:suggestion:formatBlock',(_0x32bed8,_0x69a0f5,_0x335fe7)=>{const _0x23f62=_0x335fe7['mapper']['markerNameToElements'](_0x69a0f5['markerName']);if(_0x23f62)for(const _0x2a2c55 of _0x23f62)_0x2a2c55['getCustomProperty']('addHighlight')||(_0x335fe7['writer']['removeClass'](['ck-suggestion-marker','ck-suggestion-marker-formatBlock','ck-suggestion-marker--active'],_0x2a2c55),_0x335fe7['writer']['removeAttribute']('data-suggestion',_0x2a2c55),_0x335fe7['mapper']['unbindElementFromMarkerName'](_0x2a2c55,_0x69a0f5['markerName']));},{'priority':'high'});}),_0x2ccde8['model']['document']['registerPostFixer'](_0x2b4e72=>{let _0x10a7fc=!0x1;const _0xba03a4=Array['from'](_0x2ccde8['model']['document']['differ']['getChangedMarkers']());for(const {name:_0x8c7df3,data:_0x1a304e}of _0xba03a4){const {group:_0x44b8ab,type:_0x432b75,id:_0x44456b}=this['_splitMarkerName'](_0x8c7df3);if('suggestion'!==_0x44b8ab)continue;const _0x402a36=this['_suggestions']['get'](_0x44456b);if(null!=_0x1a304e['newRange']){'formatInline'==_0x432b75&&(_0x10a7fc=_0x10a7fc||mt(_0x1a304e['newRange'],_0x8c7df3,_0x2b4e72,_0x2ccde8['model']['schema']));if(_0x1a304e['newRange']['isCollapsed']||'$graveyard'==_0x1a304e['newRange']['root']['rootName']||'formatBlock'==_0x432b75&&!kt(_0x1a304e['newRange'])||'deletion'==_0x432b75&&!(!dt(_0xad3994=_0x1a304e['newRange'])&&!function(_0x3c3785){return _0x3c3785['start']['parent']==_0x3c3785['end']['nodeBefore']&&_0x3c3785['start']['isAtEnd'];}(_0xad3994)))_0x2b4e72['removeMarker'](_0x8c7df3),_0x10a7fc=!0x0;else{if(!_0x402a36||!_0x402a36['isInContent'])continue;_0x10a7fc=!!this['_joinWithAdjacentSuggestions'](_0x402a36)||_0x10a7fc;}}}var _0xad3994;return _0x10a7fc;}),_0x2ccde8['model']['document']['registerPostFixer'](_0x25eba5=>{let _0x26fb0c=!0x1;for(const _0x3ad2c5 of _0x2ccde8['model']['document']['differ']['getChanges']()){if('insert'!=_0x3ad2c5['type'])continue;const _0x18ff50=_0x3ad2c5['position']['getShiftedBy'](_0x3ad2c5['length']);if(_0x18ff50['isAtEnd'])for(const _0x26211c of this['_suggestions']['values']()){if(_0x26211c['isMultiRange']||!_0x26211c['isInContent'])continue;if('formatBlock'!=_0x26211c['type'])continue;const _0x10319b=_0x26211c['getFirstRange']();if(_0x10319b['start']['parent']!=_0x10319b['end']['parent']&&_0x10319b['end']['isEqual'](_0x3ad2c5['position'])){const _0x443536=_0x2ccde8['model']['createRange'](_0x10319b['start'],_0x18ff50);_0x25eba5['updateMarker'](_0x26211c['getFirstMarker'](),{'range':_0x443536}),_0x26fb0c=!0x0;}}}return _0x26fb0c;}),_0x2ccde8['model']['markers']['on']('update:suggestion',(_0x5a9b26,_0x48cd6e,_0x916fde)=>{if(null==_0x916fde){const {id:_0x1e7e14}=this['_splitMarkerName'](_0x48cd6e['name']),_0x17beb3=this['_suggestions']['get'](_0x1e7e14);_0x17beb3&&_0x17beb3['addMarkerName'](_0x48cd6e['name']);}}),_0x2ccde8['model']['document']['on']('change:data',()=>{const _0x5e4733=Array['from'](_0x2ccde8['model']['document']['differ']['getChangedMarkers']());_0x5e4733['sort']((_0x264aa8,_0x20ea25)=>{const _0x2a9070=_0x264aa8['data']['oldRange'],_0x4fed45=_0x20ea25['data']['oldRange'];return null===_0x2a9070&&null===_0x4fed45?0x0:null===_0x2a9070&&null!==_0x4fed45?-0x1:null!==_0x2a9070&&null===_0x4fed45?0x1:_0x2a9070['start']['isBefore'](_0x4fed45['start'])?-0x1:0x1;});const _0x39e3c7=new Set();for(const {name:_0x153f12,data:_0x430fbd}of _0x5e4733){const {group:_0x5eaaa5,id:_0x12b6ff}=this['_splitMarkerName'](_0x153f12);if('suggestion'===_0x5eaaa5&&(null===_0x430fbd['oldRange']&&this['_handleNewSuggestionMarker'](_0x153f12),null===_0x430fbd['newRange'])){const _0x4cdb26=this['_suggestions']['get'](_0x12b6ff);_0x4cdb26['isInContent']?_0x39e3c7['add'](_0x4cdb26):this['_removeSuggestion'](_0x4cdb26);}}for(const {name:_0x1206d2,data:_0x2e44c6}of _0x5e4733){const {group:_0x1dd3b5,id:_0xc87538}=this['_splitMarkerName'](_0x1206d2);if('suggestion'!==_0x1dd3b5)continue;const _0x46e98f=this['_suggestions']['get'](_0xc87538);null!=_0x2e44c6['newRange']&&null!=_0x2e44c6['oldRange']&&(this['_refreshSuggestionsChain'](_0x46e98f),_0x39e3c7['add'](_0x46e98f['head']));}for(const _0x530b29 of _0x39e3c7)this['fire']('suggestionChanged',_0x530b29);_0x39e3c7['clear']();}),_0x2ccde8['model']['on']('applyOperation',(_0x2d4023,_0x47351f)=>{const _0x4372e3=_0x47351f[0x0];if(!this['_suggestions']['size'])return;if(!_0x4372e3['isDocumentOperation'])return;if(_0x4372e3['batch']['isUndo']||!_0x4372e3['batch']['isLocal'])return;let _0x257e84,_0x43afb0;switch(_0x4372e3['type']){case'insert':_0x257e84=_0x2ccde8['model']['createPositionAt'](_0x4372e3['position']),_0x43afb0=_0x257e84['getShiftedBy'](_0x4372e3['howMany']);break;case'split':_0x257e84=_0x2ccde8['model']['createPositionAt'](_0x4372e3['splitPosition']),_0x43afb0=_0x2ccde8['model']['createPositionAt'](_0x4372e3['moveTargetPosition']);break;case'move':_0x257e84=_0x2ccde8['model']['createPositionAt'](_0x4372e3['targetPosition']),_0x43afb0=_0x257e84['getShiftedBy'](_0x4372e3['howMany']);break;default:return;}const _0x821aaf=_0x2ccde8['model']['createRange'](_0x257e84,_0x43afb0);_0x2ccde8['model']['change'](()=>{for(const {suggestion:_0x47175d,meta:_0x52306e}of this['_findSuggestions'](_0x821aaf)){if(_0x47175d['isMultiRange'])continue;if('formatInline'==_0x47175d['type'])continue;const _0x37db70=_0x47175d['data']&&_0x47175d['data']['multipleBlocks'];('formatBlock'!=_0x47175d['type']||'split'==_0x4372e3['type']&&!_0x37db70)&&(_0x52306e['containsRangeInObject']||'insertion'==_0x47175d['type']&&_0x52306e['isOwn']||_0x47175d['getFirstRange']()['containsRange'](_0x821aaf)&&this['_breakSuggestionMarker'](_0x47175d,_0x257e84,_0x43afb0));}});},{'priority':'lowest'}),_0x2ccde8['model']['on']('deleteContent',(_0x5d84be,_0x3f3606)=>{const _0x54085f=_0x3f3606[0x0],_0x381313=_0x3f3606[0x1];if(_0x381313&&_0x381313['forceDefaultExecution'])return;if(this['_isForcedDefaultExecutionBlock'])return;if(!this['trackChangesCommand']['value'])return;if(_0x54085f['isCollapsed'])return;const _0xe8a5c5=_0x2ccde8['model']['schema'],{start:_0x1b00b5,end:_0x2c8200}=_0x54085f['getFirstRange'](),_0x174162=_0x1b00b5['nodeAfter']&&_0xe8a5c5['isObject'](_0x1b00b5['nodeAfter'])?null:_0xe8a5c5['getNearestSelectionRange'](_0x1b00b5,'forward'),_0x2b7ea7=_0x2c8200['nodeBefore']&&_0xe8a5c5['isObject'](_0x2c8200['nodeBefore'])?null:_0xe8a5c5['getNearestSelectionRange'](_0x2c8200,'backward'),_0x3af516=_0x2ccde8['model']['createRange'](_0x174162?_0x174162['start']:_0x1b00b5,_0x2b7ea7?_0x2b7ea7['end']:_0x2c8200);_0x2ccde8['model']['change'](_0x41afb1=>{this['markDeletion'](_0x3af516);const _0x402ffd=_0x2ccde8['model']['schema']['getNearestSelectionRange'](_0x3af516['start']);_0x54085f['is']('documentSelection')?_0x41afb1['setSelection'](_0x402ffd):_0x54085f['setTo'](_0x402ffd);}),_0x5d84be['stop']();},{'priority':_0x2fbfb7['normal']+0xa}),_0x2ccde8['model']['on']('insertContent',(_0x1c77d1,_0x320ccb)=>{const _0x7d28a3=_0x320ccb[_0x320ccb['length']-0x1];_0x7d28a3&&_0x7d28a3['forceDefaultExecution']||this['_isForcedDefaultExecutionBlock']||this['trackChangesCommand']['value']&&(_0x2ccde8['model']['change'](()=>{let _0x352932=_0x2ccde8['model']['insertContent'](_0x320ccb[0x0],_0x320ccb[0x1],_0x320ccb[0x2],_0x320ccb[0x3],{'forceDefaultExecution':!0x0});if(!_0x352932)return;_0x1c77d1['return']=_0x352932['clone']();const _0x5d3d51=_0x352932['end']['nodeBefore'],_0x53c66f=_0x2ccde8['model']['schema'];_0x5d3d51&&_0x53c66f['isBlock'](_0x5d3d51)&&!_0x53c66f['isObject'](_0x5d3d51)&&(_0x352932=_0x2ccde8['model']['createRange'](_0x352932['start'],_0x2ccde8['model']['createPositionAt'](_0x5d3d51,'end'))),this['markInsertion'](_0x352932);}),_0x1c77d1['stop']());},{'priority':'high'}),this['trackChangesCommand']=new _0x432ef2(_0x2ccde8,this['_enabledCommands']),this['editor']['commands']['add']('trackChanges',this['trackChangesCommand']),this['enableCommand']('trackChanges');const _0xc75fcf=new _0x1f0bf4(_0x2ccde8,this['_suggestions']);_0x2ccde8['commands']['add']('acceptSuggestion',_0xc75fcf),this['enableCommand']('acceptSuggestion');const _0x585426=new _0x53071d(_0x2ccde8,this['_suggestions']);_0x2ccde8['commands']['add']('discardSuggestion',_0x585426),this['enableCommand']('discardSuggestion'),_0x2ccde8['commands']['add']('acceptAllSuggestions',new _0x240242(_0x2ccde8,_0xc75fcf,this['_suggestions'])),this['enableCommand']('acceptAllSuggestions'),_0x2ccde8['commands']['add']('discardAllSuggestions',new _0x71b4e4(_0x2ccde8,_0x585426,this['_suggestions'])),this['enableCommand']('discardAllSuggestions'),_0x2ccde8['commands']['add']('acceptSelectedSuggestions',new _0x40b5e6(_0x2ccde8,_0xc75fcf,this['_suggestions'])),this['enableCommand']('acceptSelectedSuggestions'),_0x2ccde8['commands']['add']('discardSelectedSuggestions',new _0x22cf8f(_0x2ccde8,_0x585426,this['_suggestions'])),this['enableCommand']('discardSelectedSuggestions');const _0xc4bdba=_0x2ccde8['plugins']['get']('CommentsRepository');this['listenTo'](_0xc4bdba,'addComment',(_0x511596,{threadId:_0x2a37e4})=>{const _0x43c806=this['_suggestions']['get'](_0x2a37e4);_0x43c806&&_0x43c806['commentThread']&&0x1===_0x43c806['commentThread']['length']&&this['_updateSuggestionData'](_0x2a37e4,{'hasComments':!0x0});},{'priority':'low'}),this['listenTo'](_0xc4bdba,'removeComment',(_0x4e587a,{threadId:_0x32b5b9})=>{const _0x430a83=this['_suggestions']['get'](_0x32b5b9);_0x430a83&&_0x430a83['commentThread']&&!_0x430a83['commentThread']['length']&&this['_updateSuggestionData'](_0x32b5b9,{'hasComments':!0x1});},{'priority':'low'});}set['adapter'](_0x103cfe){if(this['_adapter'])throw new _0x3a6ec5('track-changes-adapter-already-set',this);this['_adapter']=_0x103cfe;}get['adapter'](){return this['_adapter'];}['getSuggestions']({skipNotAttached:_0x2f9225=!0x1,toJSON:_0x1c6012=!0x1}={}){const _0x3fb2e5=[];for(const _0x53546c of this['_suggestions']['values']())_0x2f9225&&!_0x53546c['isInContent']||_0x3fb2e5['push'](_0x53546c);return _0x1c6012?_0x3fb2e5['map'](_0x1c107f=>_0x1c107f['toJSON']()):_0x3fb2e5;}['getSuggestion'](_0x6a535d){const _0x2d54e4=this['_suggestions']['get'](_0x6a535d);if(!_0x2d54e4)throw new _0x3a6ec5('track-changes-suggestion-not-found',this);return _0x2d54e4;}['hasSuggestion'](_0x16edc2){return this['_suggestions']['has'](_0x16edc2);}['addSuggestionData'](_0x1e263b){const {id:_0x12b4ad,authorId:_0x2d8e29}=_0x1e263b,[_0x1ff4e9,_0x160e35]=_0x1e263b['type']['split'](':'),_0x46e1e5=this['_suggestions']['get'](_0x12b4ad)||this['_createSuggestion'](_0x1ff4e9,_0x160e35,_0x12b4ad,_0x2d8e29);switch(this['_addThreadToSuggestion'](_0x46e1e5),this['_checkSuggestionCorrectness'](_0x46e1e5,_0x1ff4e9,_0x160e35||null,_0x2d8e29),_0x46e1e5['createdAt']=_0x1e263b['createdAt'],_0x1e263b['data']&&(_0x46e1e5['data']=_0x1e263b['data']),_0x1e263b['attributes']&&(_0x46e1e5['attributes']=_0x1e263b['attributes']),this['_adapter']&&this['_adapter']['addSuggestion']||(_0x46e1e5['_saved']=!0x0),this['_suggestionState']['get'](_0x46e1e5)){case'notReady':this['_suggestionState']['set'](_0x46e1e5,'dataReady');break;case'markerReady':_0x46e1e5['isInContent']?(this['_suggestionState']['set'](_0x46e1e5,'ready'),this['fire']('suggestionLoaded',_0x46e1e5)):this['_suggestionState']['set'](_0x46e1e5,'removed');}return _0x46e1e5;}['acceptSuggestion'](_0x23ae3c){this['forceDefaultExecution'](()=>{this['editor']['model']['change'](()=>{for(const _0xd780a4 of _0x23ae3c['getAllAdjacentSuggestions']())_0xd780a4['accept']();});});}['discardSuggestion'](_0x45d821){this['forceDefaultExecution'](()=>{this['editor']['model']['change'](()=>{for(const _0x28e8af of _0x45d821['getAllAdjacentSuggestions']())_0x28e8af['discard']();});});}['enableCommand'](_0x5e07f2,_0x35768b){const _0x1907b3=this['editor']['commands']['get'](_0x5e07f2);if(!_0x1907b3)throw new _0x3a6ec5('track-changes-command-not-found',this,{'commandName':_0x5e07f2});this['_enabledCommands']['add'](_0x1907b3),_0x35768b&&_0x1907b3['on']('execute',(_0x483cc3,_0x592c06)=>{this['trackChangesCommand']['value']&&(this['_isForcedDefaultExecutionBlock']||_0x592c06['length']>0x0&&_0x592c06[_0x592c06['length']-0x1]&&_0x592c06[_0x592c06['length']-0x1]['forceDefaultExecution']||(_0x35768b((..._0x436ae6)=>_0x1907b3['execute'](..._0x436ae6,{'forceDefaultExecution':!0x0}),..._0x592c06),_0x483cc3['stop']()));},{'priority':'high'});}['forceDefaultExecution'](_0x367aba){let _0x3076a4,_0xa54689;const _0x4f6b1d=this['_isForcedDefaultExecutionBlock'];this['_isForcedDefaultExecutionBlock']=!0x0;try{_0x3076a4=_0x367aba();}catch(_0x3fd3ad){_0xa54689=_0x3fd3ad;}return _0x4f6b1d||(this['_isForcedDefaultExecutionBlock']=!0x1),_0xa54689&&_0x3a6ec5['rethrowUnexpectedError'](_0xa54689,this),_0x3076a4;}['markInsertion'](_0xcf699b,_0x18b4f8=null,_0x4a58de={}){if(_0xcf699b['isCollapsed'])return null;const _0x371482=this['editor']['plugins']['get']('Users')['me'];for(const {suggestion:_0x5414df,meta:_0x33c00c}of this['_findSuggestions'](_0xcf699b,'insertion'))if(_0x33c00c['isOwn']){if(!_0x33c00c['isNextTo'])return _0x5414df;if(_0x18b4f8==_0x5414df['subType']){const _0x46e34e=_0x5414df['getFirstRange']();return _0x46e34e['start']['isEqual'](_0xcf699b['end'])?this['_setSuggestionRange'](_0x5414df,this['_model']['createRange'](_0xcf699b['start'],_0x46e34e['end'])):this['_setSuggestionRange'](_0x5414df,this['_model']['createRange'](_0x46e34e['start'],_0xcf699b['end'])),_0x5414df;}}const _0x239f50=_0xd9a6f1(),_0x298b0c=_0x371482['id'],_0x13a4ed=_0x18b4f8?'insertion:'+_0x18b4f8:'insertion',_0x459e90=this['_setSuggestionData']({'id':_0x239f50,'type':_0x13a4ed,'createdAt':new Date(),'authorId':_0x298b0c,'attributes':_0x4a58de});return this['_addSuggestionMarker'](_0x13a4ed,_0x239f50,_0x298b0c,_0xcf699b),_0x459e90;}['markMultiRangeInsertion'](_0xb6c7be,_0x3e3d88='multi',_0x4d5b84={}){const _0x539bb6=this['editor']['plugins']['get']('Users')['me'],_0x2e9eda=this['_suggestionFactory']['getSuggestionCallback']('insertion',_0x3e3d88,'join');for(const _0x28efe5 of this['getSuggestions']())if(_0x28efe5['author']['id']==_0x539bb6['id']&&'insertion'==_0x28efe5['type']&&_0x28efe5['subType']==_0x3e3d88&&(_0x2e9eda(_0x28efe5['getRanges'](),_0xb6c7be)||_0x2e9eda(_0xb6c7be,_0x28efe5['getRanges']()))){for(const _0x3679c8 of _0xb6c7be)_0x28efe5['addRange'](_0x3679c8);return _0x28efe5;}for(const _0x236148 of _0xb6c7be)for(const {suggestion:_0xaed298,meta:_0x43fc94}of this['_findSuggestions'](_0x236148,'insertion')){if(!_0x43fc94['isOwn'])continue;let _0x1a97fd=!0x0;for(const _0x4b2aa4 of _0xaed298['getRanges']())for(const _0x360794 of _0xb6c7be)if(!_0x4b2aa4['containsRange'](_0x360794)){_0x1a97fd=!0x1;break;}if(_0x1a97fd)return _0xaed298;}const _0xe9fee5=_0xd9a6f1(),_0x5b0d14=_0x539bb6['id'],_0x57bdd4='insertion:'+_0x3e3d88,_0x4b9967=this['_setSuggestionData']({'id':_0xe9fee5,'type':_0x57bdd4,'createdAt':new Date(),'authorId':_0x5b0d14,'attributes':_0x4d5b84});for(const _0x16233a of _0xb6c7be)this['_addSuggestionMarker'](_0x57bdd4,_0xe9fee5,_0x5b0d14,_0x16233a,_0x11fe95['getMultiRangeId']());return _0x4b9967;}['markInlineFormat'](_0x4d9d20,_0x3a9aa2,_0x6a7a51=null,_0x36cf5a={}){if(_0x6a7a51=_0x6a7a51||pt(_0x3a9aa2),_0x4d9d20['isCollapsed'])return;const _0x12f1a0=this['editor']['plugins']['get']('Users')['me'],_0x3d2ff3=[];for(const {suggestion:_0x12c788,meta:_0x358deb}of this['_findSuggestions'](_0x4d9d20,'insertion'))_0x358deb['isOwn']&&!_0x358deb['isInsideObject']&&_0x3d2ff3['push'](..._0x12c788['getRanges']());const _0x1e1960=function(_0x3a8da4,_0x5025c0){const _0x42320f=[];for(const _0x3e51f0 of _0x5025c0){const _0x39bbe5=_0x3a8da4['getIntersection'](_0x3e51f0);_0x39bbe5&&_0x42320f['push'](_0x39bbe5);}return _0x42320f;}(_0x4d9d20,_0x3d2ff3),_0x3746cd=function(_0x43465,_0x31deda){const _0x2d22ae=[_0x43465];for(const _0x44f80b of _0x31deda){let _0x27e797=0x0;for(;_0x27e797<_0x2d22ae['length'];){const _0x552fe4=_0x2d22ae[_0x27e797]['getDifference'](_0x44f80b);_0x2d22ae['splice'](_0x27e797,0x1,..._0x552fe4),_0x27e797+=_0x552fe4['length'];}}return _0x2d22ae;}(_0x4d9d20,_0x3d2ff3);_0x1e1960['length']&&this['_model']['change'](()=>{for(const _0x1d13a8 of _0x1e1960){const _0x3033c3=this['_suggestionFactory']['getSuggestionCallback']('formatInline',_0x6a7a51,'accept');this['forceDefaultExecution'](()=>_0x3033c3([_0x1d13a8],_0x3a9aa2,_0x36cf5a));}});for(const _0x449508 of _0x3746cd){let _0x46cf2d=null,_0x3e4eb7=_0x449508['start'],_0x3bd991=_0x449508['end'];for(const {suggestion:_0x5096e9,meta:_0x26ca16}of this['_findSuggestions'](_0x449508,'formatInline')){if(!_0x26ca16['isOwn'])continue;if(_0x5096e9['subType']!=_0x6a7a51)continue;const _0x3e4e72=_0x5096e9['getFirstRange']();if(_0x3e4e72['containsRange'](_0x449508,!0x0))return;_0x3e4eb7=_0x3e4eb7['isBefore'](_0x3e4e72['start'])?_0x3e4eb7:_0x3e4e72['start'],_0x3bd991=_0x3bd991['isAfter'](_0x3e4e72['end'])?_0x3bd991:_0x3e4e72['end'],_0x46cf2d?_0x3e4e72['start']['isBefore'](_0x46cf2d['getFirstRange']()['start'])?(_0x46cf2d['removeMarkers'](),_0x46cf2d=_0x5096e9):_0x5096e9['removeMarkers']():_0x46cf2d=_0x5096e9;}const _0x5a5199=this['_model']['createRange'](_0x3e4eb7,_0x3bd991);if(_0x46cf2d)this['_setSuggestionRange'](_0x46cf2d,_0x5a5199);else{const _0x4aebdd=_0xd9a6f1(),_0x356388=_0x12f1a0['id'];this['_setSuggestionData']({'id':_0x4aebdd,'type':'formatInline:'+_0x6a7a51,'data':_0x3a9aa2,'createdAt':new Date(),'authorId':_0x356388,'attributes':_0x36cf5a}),this['_addSuggestionMarker']('formatInline:'+_0x6a7a51,_0x4aebdd,_0x356388,_0x5a5199);}}}['markBlockFormat'](_0x4832a2,_0x26ab8e,_0x209b88=[],_0x42acf4=null,_0x7fdfc9={}){_0x26ab8e['formatGroupId']||(_0x26ab8e['formatGroupId']=_0x26ab8e['commandName']),_0x26ab8e['multipleBlocks']=_0x4832a2['is']('range'),_0x42acf4=_0x42acf4||pt(_0x26ab8e);const _0x50787c=_0x209b88['map'](_0xd90115=>wt(_0xd90115,this['_model'])),_0x15ef42=_0x4832a2['is']('range')?_0x4832a2:wt(_0x4832a2,this['_model']);_0x50787c['push'](_0x15ef42);let _0xa494bb=!0x0;for(const _0x1078aa of _0x50787c)if(!this['_rangeIsInLocalUserInsertion'](_0x1078aa)){_0xa494bb=!0x1;break;}if(_0xa494bb){const _0x399fc8=this['_suggestionFactory']['getSuggestionCallback']('formatBlock',_0x42acf4,'accept');return void this['forceDefaultExecution'](()=>_0x399fc8([_0x15ef42],_0x26ab8e,_0x7fdfc9));}let _0x3e3bbb=null,_0x4de924=_0x15ef42['start'],_0xe85155=_0x15ef42['end'];for(const {suggestion:_0x495c7e,meta:_0x4a997e}of this['_findSuggestions'](_0x15ef42,'formatBlock')){if(!_0x4a997e['isOwn']||_0x4a997e['isNextTo']||_0x4a997e['containsRangeInObject']||_0x4a997e['isInsideObject'])continue;if(_0x495c7e['data']['formatGroupId']!=_0x26ab8e['formatGroupId'])continue;const _0x221e47=_0x495c7e['getFirstRange']();if(_0x495c7e['subType']==_0x42acf4){if(_0x221e47['containsRange'](_0x15ef42,!0x0))return;_0x4de924=_0x4de924['isBefore'](_0x221e47['start'])?_0x4de924:_0x221e47['start'],_0xe85155=_0xe85155['isAfter'](_0x221e47['end'])?_0xe85155:_0x221e47['end'],_0x3e3bbb?_0x221e47['start']['isBefore'](_0x3e3bbb['getFirstRange']()['start'])?(_0x3e3bbb['removeMarkers'](),_0x3e3bbb=_0x495c7e):_0x495c7e['removeMarkers']():_0x3e3bbb=_0x495c7e;}else{const _0x494632=_0x15ef42['getIntersection'](_0x221e47);this['_cutOutSuggestionMarker'](_0x495c7e,_0x494632);}}const _0x1b67bc=this['editor']['plugins']['get']('Users')['me'],_0x6b1b8f=_0xd9a6f1(),_0x59879d=_0x1b67bc['id'];_0x3e3bbb?this['_setSuggestionRange'](_0x3e3bbb,this['_model']['createRange'](_0x4de924,_0xe85155)):(this['_setSuggestionData']({'id':_0x6b1b8f,'type':'formatBlock:'+_0x42acf4,'data':_0x26ab8e,'createdAt':new Date(),'authorId':_0x59879d,'attributes':_0x7fdfc9}),this['_addSuggestionMarker']('formatBlock:'+_0x42acf4,_0x6b1b8f,_0x59879d,this['_model']['createRange'](_0x4de924,_0xe85155)));}['markMultiRangeBlockFormat'](_0x347e3e,_0x50cdf6,_0x5d49cc=[],_0x2c5fb5=null,_0xe96a17={}){_0x50cdf6['formatGroupId']||(_0x50cdf6['formatGroupId']=_0x50cdf6['commandName']),_0x50cdf6['multipleBlocks']=!0x1,_0x2c5fb5=_0x2c5fb5||pt(_0x50cdf6);const _0x3b788c=_0x5d49cc['map'](_0x114263=>wt(_0x114263,this['_model'])),_0x491aee=_0x347e3e['map'](_0xf6960c=>wt(_0xf6960c,this['_model']));_0x3b788c['push'](..._0x491aee);let _0x1a30d4=!0x0;for(const _0x43876c of _0x3b788c)if(!this['_rangeIsInLocalUserInsertion'](_0x43876c)){_0x1a30d4=!0x1;break;}if(_0x1a30d4){const _0x3cee54=this['_suggestionFactory']['getSuggestionCallback']('formatBlock',_0x2c5fb5,'accept');return void this['forceDefaultExecution'](()=>_0x3cee54(_0x491aee,_0x50cdf6,_0xe96a17));}const _0x215d29=this['editor']['plugins']['get']('Users')['me'];for(const _0x1e91c4 of this['getSuggestions']()){if(_0x1e91c4['author']['id']!=_0x215d29['id'])continue;if('formatBlock'!=_0x1e91c4['type']||_0x1e91c4['data']['formatGroupId']!=_0x50cdf6['formatGroupId'])continue;const _0x495fb5=_0x1e91c4['subType']==_0x2c5fb5;for(let _0x3290c0=0x0;_0x3290c0<_0x491aee['length'];_0x3290c0++){const _0x115c0f=_0x491aee[_0x3290c0];for(const _0x3aa3b5 of _0x1e91c4['getMarkers']()){const _0x84804=_0x3aa3b5['getRange']();if(_0x115c0f['isEqual'](_0x84804)){_0x495fb5?(_0x491aee['splice'](_0x3290c0,0x1),_0x3290c0--):_0x1e91c4['removeMarker'](_0x3aa3b5['name']);break;}}}}if(0x0==_0x491aee['length'])return;const _0x5b47aa=this['_suggestionFactory']['getSuggestionCallback']('formatBlock',_0x2c5fb5,'join');for(const _0x1900b1 of this['getSuggestions']())if(_0x1900b1['author']['id']==_0x215d29['id']&&'formatBlock'==_0x1900b1['type']&&_0x1900b1['data']['formatGroupId']==_0x50cdf6['formatGroupId']&&_0x1900b1['subType']==_0x2c5fb5&&(_0x5b47aa(_0x1900b1['getRanges'](),_0x491aee)||_0x5b47aa(_0x491aee,_0x1900b1['getRanges']()))){for(const _0x4c1d48 of _0x491aee)_0x1900b1['addRange'](_0x4c1d48);return _0x1900b1;}const _0x312a02=_0xd9a6f1(),_0x4a2bfd=_0x215d29['id'],_0x5a53e2='formatBlock:'+_0x2c5fb5,_0x4eeca8=this['_setSuggestionData']({'id':_0x312a02,'type':_0x5a53e2,'data':_0x50cdf6,'createdAt':new Date(),'authorId':_0x4a2bfd,'attributes':_0xe96a17});for(const _0x5aa980 of _0x491aee)this['_addSuggestionMarker'](_0x5a53e2,_0x312a02,_0x4a2bfd,_0x5aa980,_0x11fe95['getMultiRangeId']());return _0x4eeca8;}['markDeletion'](_0x2c5f86,_0x242237=null,_0x1df399={}){if(_0x2c5f86['isCollapsed'])return null;const _0x1b2520=this['editor']['plugins']['get']('Users')['me'],_0xbfc867=new _0x5cdb(_0x2c5f86['start'],_0x2c5f86['end']);for(const {suggestion:_0x585ed8,meta:_0xef824d}of this['_findSuggestions'](_0xbfc867,'insertion'))if(_0xef824d['isOwn']&&!_0xef824d['isNextTo']){if(_0x585ed8['isMultiRange']){const _0x523bb2=_0x585ed8['getRanges']()['filter'](_0x1646d5=>'$graveyard'!=_0x1646d5['root']['rootName']);_0x523bb2['every'](_0x17b9ef=>_0xbfc867['containsRange'](_0x17b9ef,!0x0))&&_0x585ed8['discard']();if(_0x523bb2['some'](_0x42784d=>_0x42784d['containsRange'](_0xbfc867,!0x0))){const _0x3d73f2=this['_suggestionFactory']['getSuggestionCallback']('deletion',_0x242237,'accept');return this['forceDefaultExecution'](()=>_0x3d73f2([_0xbfc867],null,_0x1df399)),null;}}else{const _0x5a11f3=_0xbfc867['getIntersection'](_0x585ed8['getFirstRange']());_0x585ed8['_onDiscard']([_0x5a11f3],null,_0x1df399);}}if(_0xbfc867['detach'](),_0xbfc867['isCollapsed']||'$graveyard'==_0xbfc867['root']['rootName'])return null;let _0x2f9485=null,_0x123e5c=_0xbfc867['start'],_0x23f11a=_0xbfc867['end'];for(const {suggestion:_0xda4e99,meta:_0x81e3d3}of this['_findSuggestions'](_0xbfc867,'deletion'))if(_0x81e3d3['isOwn']){if(_0xda4e99['isMultiRange']){let _0x5154f4=!0x0;for(const _0x56232c of _0xda4e99['getRanges']()){if(_0x56232c['containsRange'](_0xbfc867,!0x0))return _0xda4e99;_0xbfc867['containsRange'](_0x56232c)||(_0x5154f4=!0x1);}_0x5154f4&&_0xda4e99['discard']();}else{const _0x101a7d=_0xda4e99['getFirstRange']();if(_0x101a7d['containsRange'](_0xbfc867,!0x0))return _0xda4e99;_0x123e5c=_0x123e5c['isBefore'](_0x101a7d['start'])?_0x123e5c:_0x101a7d['start'],_0x23f11a=_0x23f11a['isAfter'](_0x101a7d['end'])?_0x23f11a:_0x101a7d['end'],_0x2f9485?_0x101a7d['start']['isBefore'](_0x2f9485['getFirstRange']()['start'])?(_0x2f9485['removeMarkers'](),_0x2f9485=_0xda4e99):_0xda4e99['removeMarkers']():_0x2f9485=_0xda4e99;}}if(_0x2f9485)return this['_setSuggestionRange'](_0x2f9485,this['_model']['createRange'](_0x123e5c,_0x23f11a)),_0x2f9485;{const _0x36ed90=_0xd9a6f1(),_0x45008e=this['_model']['createRange'](_0x123e5c,_0x23f11a),_0x2829b6=_0x1b2520['id'],_0x4e33b4=_0x242237?'deletion:'+_0x242237:'deletion',_0x28e4df=this['_setSuggestionData']({'id':_0x36ed90,'type':_0x4e33b4,'createdAt':new Date(),'authorId':_0x2829b6,'attributes':_0x1df399});return this['_addSuggestionMarker'](_0x4e33b4,_0x36ed90,_0x2829b6,_0x45008e),_0x28e4df;}}['markMultiRangeDeletion'](_0x5111fd,_0x4ff38c='multi',_0x2f2a07={}){const _0x499294=this['editor']['plugins']['get']('Users')['me'],_0x166779=_0x5111fd['map'](_0x30a224=>new _0x5cdb(_0x30a224['start'],_0x30a224['end'])),_0x18e0c1=new Set();for(const _0x5b48c2 of _0x166779)for(const {suggestion:_0x179cc4,meta:_0x2f53bf}of this['_findSuggestions'](_0x5b48c2,'insertion'))_0x2f53bf['isOwn']&&!_0x2f53bf['isNextTo']&&_0x18e0c1['add'](_0x179cc4);for(const _0xdd3b23 of _0x18e0c1)if(_0xdd3b23['isMultiRange']){const _0x2f5967=_0xdd3b23['getRanges']();(!_0xdd3b23['attributes']||!_0xdd3b23['attributes']['skipNestingCheck'])&&(_0x2f5967['every'](_0x15622a=>_0x166779['some'](_0x1bf5db=>_0x1bf5db['containsRange'](_0x15622a,!0x0)))&&_0xdd3b23['discard']());if(_0x166779['every'](_0x2728d1=>_0x2f5967['some'](_0x2adac9=>_0x2adac9['containsRange'](_0x2728d1,!0x0)))){const _0x2fddda=this['_suggestionFactory']['getSuggestionCallback']('deletion',_0x4ff38c,'accept');return this['forceDefaultExecution'](()=>_0x2fddda(_0x5111fd,null,_0x2f2a07)),null;}}else{const _0x59557b=_0xdd3b23['getFirstRange']();_0x166779['some'](_0x4d83fe=>_0x4d83fe['containsRange'](_0x59557b,!0x0))&&_0xdd3b23['discard']();if(_0x166779['every'](_0x82b90e=>_0x59557b['containsRange'](_0x82b90e,!0x0))){const _0x1437f7=this['_suggestionFactory']['getSuggestionCallback']('deletion',_0x4ff38c,'accept');return this['forceDefaultExecution'](()=>_0x1437f7(_0x166779,null,_0x2f2a07)),null;}}const _0x13556c=this['_suggestionFactory']['getSuggestionCallback']('deletion',_0x4ff38c,'join');let _0x376213=null;for(const _0x1a2033 of this['getSuggestions']())if(_0x1a2033['author']['id']==_0x499294['id']&&_0x1a2033['isInContent']&&'deletion'==_0x1a2033['type']&&_0x1a2033['subType']==_0x4ff38c&&(_0x13556c(_0x1a2033['getRanges'](),_0x166779)||_0x13556c(_0x166779,_0x1a2033['getRanges']()))){if(_0x376213){if(_0x1a2033['commentThread']&&_0x1a2033['commentThread']['length'])continue;for(const _0xdf429e of _0x1a2033['getRanges']())_0x376213['isIntersectingWithRange'](_0xdf429e)||_0x376213['addRange'](_0xdf429e);_0x1a2033['removeMarkers']();}else{_0x376213=_0x1a2033;for(const _0x800231 of _0x166779)_0x1a2033['isIntersectingWithRange'](_0x800231)||_0x1a2033['addRange'](_0x800231);}}if(_0x376213)return _0x376213;_0x18e0c1['clear']();for(const _0x40eb15 of _0x166779)for(const {suggestion:_0x230ae0,meta:_0x1541fd}of this['_findSuggestions'](_0x40eb15,'deletion'))_0x1541fd['isOwn']&&_0x18e0c1['add'](_0x230ae0);for(const _0x4d3443 of _0x18e0c1){const _0x342d4c=_0x4d3443['getRanges']();if(!_0x2f2a07||!_0x2f2a07['skipNestingCheck']){if(_0x166779['every'](_0x428884=>_0x342d4c['some'](_0x236b33=>_0x236b33['containsRange'](_0x428884,!0x0))))return _0x4d3443;}(!_0x4d3443['attributes']||!_0x4d3443['attributes']['skipNestingCheck'])&&(_0x342d4c['every'](_0x4580aa=>_0x166779['some'](_0x4378e0=>_0x4378e0['containsRange'](_0x4580aa,!0x0)))&&_0x4d3443['discard']());}const _0x423862=_0xd9a6f1(),_0x12f715=_0x499294['id'],_0x68696b='deletion:'+_0x4ff38c,_0xee6078=this['_setSuggestionData']({'id':_0x423862,'type':_0x68696b,'createdAt':new Date(),'authorId':_0x12f715,'attributes':_0x2f2a07});for(const _0x315cf9 of _0x166779)_0x315cf9['detach'](),_0x315cf9['isCollapsed']||'$graveyard'==_0x315cf9['root']['rootName']||this['_addSuggestionMarker'](_0x68696b,_0x423862,_0x12f715,_0x315cf9,_0x11fe95['getMultiRangeId']());return _0xee6078;}['_setSuggestionRange'](_0x454701,_0x37817e){const _0x51a1d2=_0x454701['getFirstMarker']();this['_model']['change'](_0x5e4b7a=>{_0x5e4b7a['updateMarker'](_0x51a1d2,{'range':_0x37817e});});}['_addThreadToSuggestion'](_0xe765d6){const _0x30dbd6=_0xe765d6['id'],_0x51515e=this['editor']['config']['get']('collaboration.channelId');this['_commentsRepository']['hasCommentThread'](_0x30dbd6)||this['_commentsRepository']['addCommentThread']({'channelId':_0x51515e,'threadId':_0x30dbd6});const _0x537f4f=this['_commentsRepository']['getCommentThread'](_0x30dbd6);_0x537f4f['unbind']('isRemovable'),_0x537f4f['isRemovable']=!0x1,_0xe765d6['commentThread']=_0x537f4f;}['_checkSuggestionCorrectness'](_0x35efa5,_0x334d58,_0xa4e1d6,_0x5ac2a5){if(_0x35efa5['type']!=_0x334d58||_0x35efa5['subType']!=_0xa4e1d6||_0x35efa5['author']['id']!=_0x5ac2a5)throw this['editor']['isReadOnly']=!0x0,new _0x3a6ec5('track-changes-suggestion-data-mismatch',this);}['_cutOutSuggestionMarker'](_0x211b94,_0x422d21){const _0x1a34e3=_0x211b94['getFirstRange']();if(_0x422d21['isEqual'](_0x1a34e3))_0x211b94['removeMarkers']();else{if(_0x1a34e3['containsRange'](_0x422d21)){const _0x172191=this['_model']['createPositionAt'](_0x422d21['start']['nodeBefore'],'end');this['_setSuggestionRange'](_0x211b94,this['_model']['createRange'](_0x1a34e3['start'],_0x172191));const _0x24dfbe=_0xd9a6f1(),_0x34d76c=_0x211b94['author']['id'],_0x211bf7=_0x211b94['type']+':'+_0x211b94['subType'];this['_setSuggestionData']({'id':_0x24dfbe,'type':_0x211bf7,'createdAt':new Date(),'authorId':_0x34d76c,'data':_0x211b94['data'],'attributes':_0x211b94['attributes']});const _0x62aacd=this['_model']['createPositionAt'](_0x422d21['end']['parent'],'after'),_0x1de402=this['_model']['createRange'](_0x62aacd,_0x1a34e3['end']);this['_addSuggestionMarker'](_0x211bf7,_0x24dfbe,_0x34d76c,_0x1de402);}else{if(_0x1a34e3['containsPosition'](_0x422d21['start'])){const _0x51f3b3=this['_model']['createPositionAt'](_0x422d21['start']['nodeBefore'],'end');this['_setSuggestionRange'](_0x211b94,this['_model']['createRange'](_0x1a34e3['start'],_0x51f3b3));}else{const _0x1ec924=this['_model']['createPositionAt'](_0x422d21['end']['parent'],'after');this['_setSuggestionRange'](_0x211b94,this['_model']['createRange'](_0x1ec924,_0x1a34e3['end']));}}}}['_rangeIsInLocalUserInsertion'](_0x1b59e1){for(const {suggestion:_0x30934b,meta:_0x3c6b4f}of this['_findSuggestions'](_0x1b59e1,'insertion')){if(!_0x3c6b4f['isOwn'])continue;const _0x333efc=_0x30934b['getRanges']();for(const _0x421270 of _0x333efc)if(!_0x1b59e1['getDifference'](_0x421270)['length'])return!0x0;}return!0x1;}['_getAuthorFromId'](_0x1734d9){const _0x2d5baa=this['editor']['plugins']['get']('Users')['getUser'](_0x1734d9);if(!_0x2d5baa)throw new _0x3a6ec5('track-changes-user-not-found',this);return _0x2d5baa;}['_createSuggestion'](_0xe02d2,_0x142e7f,_0x279bf0,_0x16bc48){const _0x5b997b=this['_getAuthorFromId'](_0x16bc48),_0x5c0e73=this['_suggestionFactory']['buildSuggestion'](_0xe02d2,_0x142e7f,_0x279bf0,_0x5b997b,_0x525161=>this['_updateSuggestionData'](_0x279bf0,{'attributes':_0x525161}));return this['listenTo'](_0x5c0e73,'accept',()=>{this['_updateSuggestionData'](_0x279bf0,{'state':'accepted'});},{'priority':'high'}),this['listenTo'](_0x5c0e73,'discard',()=>{this['_updateSuggestionData'](_0x279bf0,{'state':'rejected'});},{'priority':'high'}),this['_suggestions']['set'](_0x279bf0,_0x5c0e73),this['_suggestionState']['set'](_0x5c0e73,'notReady'),_0x5c0e73;}['_splitMarkerName'](_0x545665){const _0x154b5d=_0x545665['split'](':');return{'group':_0x154b5d[0x0],'type':_0x154b5d[0x1],'subType':_0x154b5d['length']>=0x5?_0x154b5d[0x2]:null,'id':_0x154b5d['length']<0x5?_0x154b5d[0x2]:_0x154b5d[0x3],'authorId':_0x154b5d['length']<0x5?_0x154b5d[0x3]:_0x154b5d[0x4],'markerCount':0x6==_0x154b5d['length']?_0x154b5d[0x5]:null};}['_breakSuggestionMarker'](_0x308dde,_0xe35d28,_0x457da4){const _0x38021d=_0x308dde['getFirstRange'](),_0x180c71=_0x38021d['start'],_0x215032=_0x38021d['end'];this['_setSuggestionRange'](_0x308dde,this['_model']['createRange'](_0x180c71,_0xe35d28));const _0x5e49b3=_0xd9a6f1(),_0x235155=_0x308dde['author']['id'],_0x2e4589=_0x308dde['type']+(_0x308dde['subType']?':'+_0x308dde['subType']:'');this['_setSuggestionData']({'id':_0x5e49b3,'type':_0x2e4589,'createdAt':new Date(),'authorId':_0x235155,'originalSuggestionId':_0x308dde['id'],'data':_0x308dde['data']}),'formatBlock'==_0x308dde['type']&&(_0x457da4=this['_model']['createPositionBefore'](_0x457da4['parent'])),this['_addSuggestionMarker'](_0x2e4589,_0x5e49b3,_0x235155,this['_model']['createRange'](_0x457da4,_0x215032));}['_findSuggestions'](_0xa1e439,_0x987da3=null){const _0x5da698=[],_0x515fa6=this['_model']['schema'],_0x5af483=this['editor']['plugins']['get']('Users')['me'];for(const _0x40b6e4 of this['getSuggestions']())if(_0x40b6e4['isInContent']&&(!_0x987da3||_0x40b6e4['type']==_0x987da3))for(const _0x39cb33 of _0x40b6e4['getRanges']()){const _0x3286ab=_0xa1e439['start']['isEqual'](_0x39cb33['end'])||_0xa1e439['end']['isEqual'](_0x39cb33['start']);if(_0x3286ab||_0xa1e439['getIntersection'](_0x39cb33)){const _0x5688ee=_0xa1e439['containsRange'](_0x39cb33)&&lt(_0x515fa6,_0x39cb33['start'],_0xa1e439),_0x40a3f4=_0x39cb33['containsRange'](_0xa1e439)&&lt(_0x515fa6,_0xa1e439['start'],_0x39cb33);_0x5da698['push']({'suggestion':_0x40b6e4,'meta':{'isOwn':_0x5af483==_0x40b6e4['author'],'isNextTo':_0x3286ab,'isInsideObject':_0x5688ee,'containsRangeInObject':_0x40a3f4}});break;}}return _0x5da698;}['_addSuggestionMarker'](_0xc60fe7,_0x3a270f,_0x5c846f,_0x438aa9,_0x8952fc=null){this['_model']['change'](_0x256f86=>{let _0x38af61='suggestion:'+_0xc60fe7+':'+_0x3a270f+':'+_0x5c846f;_0x8952fc&&(_0x38af61=_0x38af61+':'+_0x8952fc),_0x256f86['addMarker'](_0x38af61,{'range':_0x438aa9,'usingOperation':!0x0,'affectsData':!0x0});});}['_removeSuggestion'](_0x3aaa2e){const _0x212b65=_0x3aaa2e['previous'],_0x1257e3=_0x3aaa2e['next'];_0x3aaa2e['previous']=null,null!=_0x212b65&&(_0x212b65['next']=null),_0x3aaa2e['next']=null,null!=_0x1257e3&&(_0x1257e3['previous']=null),'ready'==this['_suggestionState']['get'](_0x3aaa2e)&&(this['_suggestionState']['set'](_0x3aaa2e,'removed'),this['fire']('suggestionUnloaded',_0x3aaa2e,_0x212b65,_0x1257e3));}['_setSuggestionData'](_0x2eb81f){const _0x2bba74=_0x2eb81f['id'],_0x14e7e0=this['addSuggestionData'](_0x2eb81f);if(this['_adapter']&&this['_adapter']['addSuggestion']){const _0x2a27b4=this['editor']['plugins']['get']('PendingActions'),_0x3c043c=_0x14e7e0['hasComments'],_0x46a6b7=_0x14e7e0['subType']?_0x14e7e0['type']+':'+_0x14e7e0['subType']:_0x14e7e0['type'],t=this['editor']['locale']['t'],_0x465349=_0x2a27b4['add'](t({'string':'Unsaved\x20change\x20in\x20suggestion.','id':'PENDING_ACTION_SUGGESTION'})),_0x17a4ff={'id':_0x2bba74,'type':_0x46a6b7,'hasComments':_0x3c043c,'data':_0x2eb81f['data']||null,'originalSuggestionId':_0x2eb81f['originalSuggestionId']||null,'attributes':_0x14e7e0['attributes']};this['_adapter']['addSuggestion'](_0x17a4ff)['then'](_0x43d02d=>{_0x14e7e0['_saved']=!0x0,_0x2a27b4['remove'](_0x465349),_0x43d02d&&_0x43d02d['createdAt']&&(this['_suggestions']['get'](_0x2bba74)['createdAt']=_0x43d02d['createdAt']);});}return _0x14e7e0;}['_updateSuggestionData'](_0x2afc56,_0x505465){const _0x2c641f=this['editor']['plugins']['get']('PendingActions'),_0x37a0ca=this['_suggestions']['get'](_0x2afc56);if(this['_adapter']&&this['_adapter']['updateSuggestion']){if(_0x37a0ca['_saved']){const t=this['editor']['locale']['t'],_0x2c39a3=_0x2c641f['add'](t({'string':'Unsaved\x20change\x20in\x20suggestion.','id':'PENDING_ACTION_SUGGESTION'}));this['_adapter']['updateSuggestion'](_0x2afc56,_0x505465)['then'](()=>{_0x2c641f['remove'](_0x2c39a3);});}else _0x37a0ca['on']('change:_saved',()=>{this['_updateSuggestionData'](_0x2afc56,_0x505465);});}}['_getSuggestionData'](_0x3298d0){if(!this['_adapter']||!this['_adapter']['getSuggestion'])throw new _0x3a6ec5('track-changes-adapter-missing-getsuggestion',this);return this['_adapter']['getSuggestion'](_0x3298d0);}['_handleNewSuggestionMarker'](_0x1b2e41){const {id:_0x3c3810,type:_0x57abd3,subType:_0x4601aa,authorId:_0x91c5f2}=this['_splitMarkerName'](_0x1b2e41),_0x3dc213=this['_suggestions']['get'](_0x3c3810)||this['_createSuggestion'](_0x57abd3,_0x4601aa,_0x3c3810,_0x91c5f2);switch(this['_checkSuggestionCorrectness'](_0x3dc213,_0x57abd3,_0x4601aa,_0x91c5f2),this['_suggestionState']['get'](_0x3dc213)){case'notReady':this['_getSuggestionData'](_0x3c3810)['then'](_0x981d0e=>{let _0x25c39b=Promise['resolve']();_0x981d0e['hasComments']&&(_0x25c39b=this['_commentsRepository']['fetchCommentThread']({'channelId':this['editor']['config']['get']('collaboration.channelId'),'threadId':_0x3c3810})),_0x25c39b['then'](()=>{this['addSuggestionData'](_0x981d0e)['_saved']=!0x0;});}),this['_suggestionState']['set'](_0x3dc213,'markerReady');break;case'removed':this['_updateSuggestionData'](_0x3c3810,{'state':'open'});case'dataReady':this['_suggestionState']['set'](_0x3dc213,'ready'),this['fire']('suggestionLoaded',_0x3dc213);break;case'ready':this['fire']('suggestionChanged',_0x3dc213);}_0x3dc213['addMarkerName'](_0x1b2e41),this['_refreshSuggestionsChain'](_0x3dc213);}['_refreshSuggestionsChain'](_0x493643){if(_0x493643['isMultiRange'])return;let _0x474e7b=!0x0,_0x1dfad5=!0x0;for(const _0x338114 of this['getSuggestions']()){if(_0x338114['isMultiRange'])continue;if(_0x338114==_0x493643||!_0x338114['isInContent'])continue;if(_0x338114['author']['id']!=_0x493643['author']['id'])continue;const _0x22854f=this['_suggestionFactory']['getSuggestionCallback'](_0x493643['type'],_0x493643['subType'],'chain'),_0x14abac=this['_suggestionFactory']['getSuggestionCallback'](_0x338114['type'],_0x338114['subType'],'chain'),_0x4ef21c=_0x22854f(_0x493643,_0x338114),_0x335438=_0x14abac(_0x493643,_0x338114);_0x4ef21c&&_0x335438&&(_0x4ef21c[0x1]['commentThread']&&_0x4ef21c[0x1]['commentThread']['length']||(_0x4ef21c[0x0]['next']=_0x4ef21c[0x1],_0x4ef21c[0x1]['previous']=_0x4ef21c[0x0],_0x4ef21c[0x0]==_0x493643?_0x1dfad5=!0x1:_0x474e7b=!0x1));}_0x493643['previous']&&_0x474e7b&&(_0x493643['previous']['next']=null,_0x493643['previous']=null),_0x493643['next']&&_0x1dfad5&&(_0x493643['next']['previous']=null,_0x493643['next']=null);}['_joinWithAdjacentSuggestions'](_0x5b7ad0){for(const _0x4b8bf7 of this['_suggestions']['values']()){if(_0x4b8bf7==_0x5b7ad0||!_0x4b8bf7['isInContent'])continue;if(_0x4b8bf7['type']!=_0x5b7ad0['type']||_0x4b8bf7['author']['id']!=_0x5b7ad0['author']['id']||_0x4b8bf7['subType']!=_0x5b7ad0['subType'])continue;const _0x2550ab=this['_suggestionFactory']['getSuggestionCallback'](_0x5b7ad0['type'],_0x5b7ad0['subType'],'join');if(_0x2550ab(_0x4b8bf7['getRanges'](),_0x5b7ad0['getRanges']())){if(_0x5b7ad0['commentThread']&&_0x5b7ad0['commentThread']['length'])continue;return this['_joinSuggestions'](_0x4b8bf7,_0x5b7ad0),!0x0;}if(_0x2550ab(_0x5b7ad0['getRanges'](),_0x4b8bf7['getRanges']())){if(_0x4b8bf7['commentThread']&&_0x4b8bf7['commentThread']['length'])continue;return this['_joinSuggestions'](_0x5b7ad0,_0x4b8bf7),!0x0;}}return!0x1;}['_joinSuggestions'](_0x5da2ce,_0xbd5439){if(_0x5da2ce['isMultiRange'])for(const _0x1d5505 of _0xbd5439['getRanges']())_0x5da2ce['addRange'](_0x1d5505);else{const _0x5c4af0=_0xbd5439['getFirstRange']()['end'];this['_setSuggestionRange'](_0x5da2ce,this['_model']['createRange'](_0x5da2ce['getFirstRange']()['start'],_0x5c4af0));}_0xbd5439['removeMarkers']();}}_0x5d0173(p,_0x16d268);class gt{constructor(_0x29cbd6){this['_editor']=_0x29cbd6,this['_model']=_0x29cbd6['model'],this['_customCallbacks']=new Map(),this['_defaultCallbacks']=new Map(),this['_registerDefaultCallbacks']();}['buildSuggestion'](_0x2c131c,_0x25bec6,_0x10c8bd,_0x5c498f,_0x44736c){return new _0x11fe95(this['_model'],{'type':_0x2c131c,'subType':_0x25bec6,'id':_0x10c8bd,'author':_0x5c498f,'onAttributesChange':_0x44736c,'onAccept':(..._0x43ccaa)=>this['getSuggestionCallback'](_0x2c131c,_0x25bec6,'accept')(..._0x43ccaa),'onDiscard':(..._0x4b148b)=>this['getSuggestionCallback'](_0x2c131c,_0x25bec6,'discard')(..._0x4b148b)});}['registerCustomCallback'](_0x424c86,_0x858512,_0x310ad7,_0x7275fe){const _0x2c2991=_0x424c86+':'+_0x858512+':'+_0x310ad7;this['_customCallbacks']['set'](_0x2c2991,_0x7275fe);}['getSuggestionCallback'](_0x3cfa9c,_0x2e9dbc,_0x4990e2){const _0x44bdfa=_0x3cfa9c+':'+_0x2e9dbc+':'+_0x4990e2;return this['_customCallbacks']['get'](_0x44bdfa)||this['_defaultCallbacks']['get'](_0x3cfa9c+':'+_0x4990e2);}['_registerDefaultCallbacks'](){const _0x1927a8=()=>{},_0x2623b5=_0x25fbf3=>{_0x25fbf3['sort']((_0x46efc4,_0x34dabb)=>_0x46efc4['start']['isBefore'](_0x34dabb['start'])?0x1:-0x1),this['_model']['change'](_0x3f0fce=>{for(const _0x335369 of _0x25fbf3){let _0x4003a7;_0x4003a7=_0x335369['end']['isAtEnd']&&_0x335369['end']['parent']==_0x335369['start']['nodeAfter']?_0x3f0fce['createSelection'](_0x335369['start']['nodeAfter'],'on'):_0x3f0fce['createSelection'](_0x335369),this['_model']['deleteContent'](_0x4003a7,{'forceDefaultExecution':!0x0,'doNotAutoparagraph':!0x0});}});},_0x595a4b=(_0x5f5097,_0x430e4d)=>{this['_model']['change'](_0x3fce2f=>{const {commandName:_0x3654cb,commandParams:_0x376ee8=[]}=_0x430e4d,_0x95feba=_0x5f5097[0x0];if('$graveyard'==_0x95feba['root']['rootName'])return;const _0x5c2bbf=Array['from'](this['_model']['document']['selection']['getRanges']())['map'](_0x13405a=>_0x5cdb['fromRange'](_0x13405a));dt(_0x95feba)?_0x3fce2f['setSelection'](this['_model']['createRange'](_0x95feba['end'])):_0x3fce2f['setSelection'](_0x95feba);for(const _0x380816 of this['_editor']['commands']['commands']())_0x380816['refresh']();_0x376ee8['push']({'forceDefaultExecution':!0x0}),this['_editor']['execute'](_0x3654cb,..._0x376ee8);const _0xc207a8=_0x5c2bbf['filter'](_0x5f6dd0=>'$graveyard'!=_0x5f6dd0['root']['rootName']);_0xc207a8['length']>0x0&&_0x3fce2f['setSelection'](_0xc207a8);for(const _0x2078bd of _0x5c2bbf)_0x2078bd['detach']();});},_0x241fd4=(_0x45644b,_0x5b2456)=>0x1==_0x45644b['length']&&0x1==_0x5b2456['length']&&_0x45644b[0x0]['end']['isEqual'](_0x5b2456[0x0]['start']),_0x278314=(_0x3d516f,_0x1aac0b)=>yt(_0x3d516f,_0x1aac0b,this['_model'])?[_0x3d516f,_0x1aac0b]:yt(_0x1aac0b,_0x3d516f,this['_model'])?[_0x1aac0b,_0x3d516f]:null;this['_defaultCallbacks']['set']('insertion:accept',_0x1927a8),this['_defaultCallbacks']['set']('insertion:discard',_0x2623b5),this['_defaultCallbacks']['set']('insertion:join',_0x241fd4),this['_defaultCallbacks']['set']('insertion:chain',_0x278314),this['_defaultCallbacks']['set']('deletion:accept',_0x2623b5),this['_defaultCallbacks']['set']('deletion:discard',_0x1927a8),this['_defaultCallbacks']['set']('deletion:join',_0x241fd4),this['_defaultCallbacks']['set']('deletion:chain',_0x278314),this['_defaultCallbacks']['set']('formatInline:accept',_0x595a4b),this['_defaultCallbacks']['set']('formatInline:discard',_0x1927a8),this['_defaultCallbacks']['set']('formatInline:join',_0x241fd4),this['_defaultCallbacks']['set']('formatInline:chain',_0x1927a8),this['_defaultCallbacks']['set']('formatBlock:accept',_0x595a4b),this['_defaultCallbacks']['set']('formatBlock:discard',_0x1927a8),this['_defaultCallbacks']['set']('formatBlock:join',_0x241fd4),this['_defaultCallbacks']['set']('formatBlock:chain',_0x1927a8);}}function lt(_0x59f1ef,_0xd7bffb,_0x438b21){for(const _0x424500 of _0xd7bffb['parent']['getAncestors']({'includeSelf':!0x0,'parentFirst':!0x0})){if(_0x424500['root']==_0x424500)return!0x1;if(!_0x438b21['containsItem'](_0x424500))return!0x1;if(_0x59f1ef['isObject'](_0x424500)||_0x59f1ef['isLimit'](_0x424500))return!0x0;}}function dt(_0xa677b9){return _0xa677b9['end']['parent']==_0xa677b9['start']['nodeAfter']&&_0xa677b9['end']['isAtStart'];}function mt(_0x185337,_0x367409,_0x22b55f,_0x4ba0e8){const _0x4969e6=_0x572aff=>!_0x572aff['item']['is']('textProxy')&&!_0x4ba0e8['isObject'](_0x572aff['item']),_0x3c8457=_0x185337['start']['getLastMatchingPosition'](_0x4969e6),_0x549587=_0x185337['end']['getLastMatchingPosition'](_0x4969e6,{'direction':'backward'});return(!_0x185337['start']['isEqual'](_0x3c8457)||!_0x185337['end']['isEqual'](_0x549587))&&(_0x3c8457['isBefore'](_0x549587)?_0x22b55f['updateMarker'](_0x367409,{'range':_0x22b55f['createRange'](_0x3c8457,_0x549587)}):_0x22b55f['removeMarker'](_0x367409),!0x0);}function pt(_0x1457a3){return ft(_0x1457a3);}function kt(_0x2f8c7c){const _0x57cf43=_0x2f8c7c['start']['nodeAfter'];return _0x57cf43&&_0x57cf43['is']('element');}function wt(_0x2f71f3,_0x34630e){const _0x49e2b2=_0x34630e['schema']['isObject'](_0x2f71f3)||_0x34630e['schema']['isSelectable'](_0x2f71f3);return _0x34630e['createRange'](_0x34630e['createPositionAt'](_0x2f71f3,'before'),_0x49e2b2?_0x34630e['createPositionAfter'](_0x2f71f3):_0x34630e['createPositionAt'](_0x2f71f3,'end'));}function yt(_0x2a9922,_0x2a16b8,_0x1d275e){const _0x3fc574=_0x2a9922['getFirstRange'](),_0x3bb58d=_0x2a16b8['getFirstRange']();if(_0x3fc574['end']['isEqual'](_0x3bb58d['start']))return!0x0;if(_0x2a9922['type']!=_0x2a16b8['type'])return!0x1;if(!_0x3fc574['end']['isTouching'](_0x3bb58d['start']))return!0x1;const _0xd57c0f=_0x1d275e['createRange'](_0x3fc574['end'],_0x3bb58d['start'])['getWalker']();for(const _0x59d7f9 of _0xd57c0f)if(['elementStart','elementEnd']['includes'](_0x59d7f9['type'])&&_0x1d275e['schema']['isLimit'](_0x59d7f9['item']))return!0x1;return!0x0;}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x3a01cf}from'ckeditor5/src/core';import _0x202257 from'./trackchangesediting';import _0x173eac from'@ckeditor/ckeditor5-comments/src/comments/commentsrepository';import Ct from'./ui/suggestioncontroller';import Tt from'./ui/view/suggestionthreadview';import _0xdd9095 from'@ckeditor/ckeditor5-collaboration-core/src/users';import xt from'@ckeditor/ckeditor5-comments/src/annotations/editorannotations';import{Collection as Et}from'ckeditor5/src/utils';import{Model as At,SplitButtonView as Nt,createDropdown as Ut,addListToDropdown as Wt}from'ckeditor5/src/ui';import _t from'@ckeditor/ckeditor5-comments/src/utils/getdatetimeformatter';import Ot from'@ckeditor/ckeditor5-comments/src/utils/getmarkerdomelement';import Gt from'../theme/icons/track-changes.svg';import{debounce as Mt}from'lodash-es';import Pt from'@ckeditor/ckeditor5-comments/src/annotations/view/annotationview';import Vt from'@ckeditor/ckeditor5-comments/src/annotations/annotation';import qt from'@ckeditor/ckeditor5-comments/src/annotations/annotations';export default class f extends _0x3a01cf{static get['requires'](){return[qt,xt,_0x202257,_0x173eac,_0xdd9095];}static get['pluginName'](){return'TrackChangesUI';}constructor(_0x7a1337){super(_0x7a1337),this['_suggestionToController']=new Map(),this['_viewToController']=new Map(),this['_debouncedHandlers']=new Map();const _0x4096df=this['editor']['config'];_0x4096df['define']('trackChanges.SuggestionThreadView',Tt),_0x4096df['define']('trackChanges.disableComments',!0x1),this['_disableComments']=_0x4096df['get']('trackChanges.disableComments');}['init'](){const _0x14b82b=this['editor'],_0x28231b=_0x14b82b['plugins']['get'](_0x202257),_0xf842a5=_0x14b82b['plugins']['get'](qt),_0x5c3fa0=_0x14b82b['plugins']['get'](xt),_0x2de147=_0x14b82b['plugins']['get'](_0x173eac);_0x14b82b['ui']['componentFactory']['add']('trackChanges',_0x637294=>this['_createUIButton'](_0x637294)),_0x5c3fa0['addSourceCollector'](()=>{const _0x1a98ff=[];for(const [_0x2335dc,_0x5aa22a]of Array['from'](this['_suggestionToController'])){const _0x1d62e2=_0x2335dc['getAllAdjacentSuggestions'](),_0x45ace0=[];for(const _0x3f3748 of _0x1d62e2){if(!_0x3f3748['isInContent'])continue;if(_0x3f3748['isMultiRange']){_0x45ace0['push'](..._0x3f3748['getRanges']());continue;}const _0x23f9c0=_0x3f3748['getFirstRange']();if(_0x45ace0['length']>0x0){const _0x5e0924=_0x45ace0[0x0]['getJoined'](_0x23f9c0);if(_0x5e0924){_0x45ace0[0x0]=_0x5e0924;continue;}}_0x45ace0['push'](_0x23f9c0);}_0x1a98ff['push']([_0x5aa22a['view'],_0x45ace0]);}return _0x1a98ff;}),this['listenTo'](_0x28231b,'suggestionLoaded',(_0x22ddd5,_0x2de540)=>{let _0x197cfb=!0x1;const _0x184916=Mt(_0x56402c=>{_0x197cfb||_0x56402c?_0x197cfb&&_0x56402c&&(this['_destroyController'](_0x2de540),_0x5c3fa0['refreshSelectedViews'](),_0x197cfb=!0x1):(this['_initializeController'](_0x2de540),_0x5c3fa0['refreshSelectedViews'](),_0x197cfb=!0x0);},0xa);this['_debouncedHandlers']['set'](_0x2de540,_0x184916),this['listenTo'](_0x2de540,'change:previous',(_0xe1280f,_0xa70a3f,_0xd07789,_0x16220e)=>{_0x2de540['isInContent']&&(null==_0xd07789?(this['_updateController'](_0x16220e['head']),_0x184916(!0x1)):(this['_updateController'](_0xd07789['head']),_0x184916(!0x0)));}),null===_0x2de540['previous']?_0x184916(!0x1):this['_updateController'](_0x2de540['head']);}),this['listenTo'](_0x28231b,'suggestionUnloaded',(_0xb67bf4,_0x1bebb7,_0x491275)=>{this['stopListening'](_0x1bebb7,'change:previous'),this['_debouncedHandlers']['get'](_0x1bebb7)['cancel'](),this['_debouncedHandlers']['delete'](_0x1bebb7);const _0x53fb7c=_0x491275?_0x491275['head']:_0x1bebb7,_0x26c73f=this['_suggestionToController']['get'](_0x53fb7c);null!==_0x491275&&this['_updateController'](_0x53fb7c),null===_0x491275&&_0x26c73f&&this['_destroyController'](_0x1bebb7);}),this['listenTo'](_0x28231b,'suggestionChanged',(_0x3b30cd,_0x54ce96)=>{this['_updateController'](_0x54ce96);}),this['listenTo'](_0xf842a5,'change:activeAnnotations',(_0x38bcb6,_0x1ea370,_0x3048f6)=>{const _0x37fba8=Array['from'](_0x3048f6,_0x588ad9=>_0x588ad9['innerView'])['filter'](_0x20a78e=>this['_viewToController']['has'](_0x20a78e)),_0x468aac=[];for(const _0x359e7a of _0x37fba8){const _0x3042ec=this['_viewToController']['get'](_0x359e7a)['model']['getAllAdjacentSuggestions']();_0x468aac['push'](..._0x3042ec['reduce']((_0x3d2648,_0x4e7977)=>[..._0x3d2648,..._0x4e7977['getMarkerNames']()],[]));}_0x28231b['activeMarkers']=_0x468aac;}),this['listenTo'](_0x2de147,'addComment',(_0x3c1b2f,{threadId:_0x55240e,isFromAdapter:_0x2724d7})=>{if(_0x2724d7||!_0x28231b['hasSuggestion'](_0x55240e))return;const _0x1829b0=_0x28231b['getSuggestion'](_0x55240e);this['_suggestionToController']['get'](_0x1829b0)['view']['focus']();},{'priority':'lowest'});}['_createUIButton'](_0x1f0171){const _0x13bed8=Ut(_0x1f0171,Nt),_0x1c0b7f=this['editor']['commands']['get']('trackChanges'),{t:t}=this['editor'];_0x13bed8['buttonView']['set']({'tooltip':t('Track\x20changes'),'label':t('Track\x20changes'),'icon':Gt}),_0x13bed8['buttonView']['bind']('isOn')['to'](_0x1c0b7f,'value'),_0x13bed8['buttonView']['on']('execute',()=>_0x1c0b7f['execute']());const _0x9f77bd=new Et(),_0x39c2fa=[{'type':'switchbutton','model':{'withText':!0x0,'label':t('Track\x20changes'),'commandName':'trackChanges'}},{'type':'separator'},{'type':'button','model':{'withText':!0x0,'label':t('Accept\x20all\x20suggestions'),'commandName':'acceptAllSuggestions'}},{'type':'button','model':{'withText':!0x0,'label':t('Accept\x20all\x20selected\x20suggestions'),'commandName':'acceptSelectedSuggestions'}},{'type':'button','model':{'withText':!0x0,'label':t('Discard\x20all\x20suggestions'),'commandName':'discardAllSuggestions'}},{'type':'button','model':{'withText':!0x0,'label':t('Discard\x20all\x20selected\x20suggestions'),'commandName':'discardSelectedSuggestions'}}];for(const _0x10c7ba of _0x39c2fa){const _0x56e9c7={'type':_0x10c7ba['type']};if(_0x10c7ba['model']){const _0x231dd8=new At(_0x10c7ba['model']),_0x1745a3=this['editor']['commands']['get'](_0x231dd8['commandName']);_0x231dd8['bind']('isOn','isEnabled')['to'](_0x1745a3,'value','isEnabled'),_0x56e9c7['model']=_0x231dd8;}_0x9f77bd['add'](_0x56e9c7);}Wt(_0x13bed8,_0x9f77bd);const _0x5cfc9a=_0x39c2fa['filter'](_0x3a0d91=>null!=_0x3a0d91['model'])['map'](_0x23161a=>this['editor']['commands']['get'](_0x23161a['model']['commandName']));return _0x13bed8['buttonView']['actionView']['unbind']('isEnabled'),_0x13bed8['buttonView']['arrowView']['unbind']('isEnabled'),_0x13bed8['buttonView']['actionView']['bind']('isEnabled')['to'](_0x1c0b7f,'isEnabled'),_0x13bed8['buttonView']['arrowView']['bind']('isEnabled')['toMany'](_0x5cfc9a,'isEnabled',(..._0x34ee32)=>_0x34ee32['some'](_0x5cb8b8=>_0x5cb8b8)),_0x13bed8['on']('execute',_0x3e7f4b=>this['editor']['execute'](_0x3e7f4b['source']['commandName'])),_0x13bed8;}['_initializeController'](_0x2ed806){const _0x25f2c2=this['editor'],_0x107698=_0x25f2c2['config'],_0x3f2783=_0x25f2c2['plugins']['get'](qt),_0x10d8f9=_0x2ed806['getAllAdjacentSuggestions']()['filter'](_0x58f54d=>_0x58f54d['isInContent']),_0x4abaf5=_0x25f2c2['plugins']['get']('Users')['me'],_0x50883d=_0x25f2c2['commands']['get']('acceptSuggestion'),_0x42060b=_0x25f2c2['commands']['get']('discardSuggestion'),_0x3e5e59=new(0x0,(_0x107698['get']('trackChanges'))['SuggestionThreadView'])(_0x25f2c2['locale'],_0x2ed806,_0x4abaf5,{'disableComments':this['_disableComments'],'editorConfig':_0x107698['get']('comments.editorConfig'),'maxCommentsWhenCollapsed':_0x107698['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x107698['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x107698['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_t(_0x107698['get']('locale')),'CommentView':_0x107698['get']('comments')['CommentView']}),_0x44f559=new Ct(_0x2ed806,_0x3e5e59,_0x50883d,_0x42060b);_0x3e5e59['descriptionParts']=_0x25f2c2['plugins']['get']('TrackChangesEditing')['_descriptionFactory']['getDescriptions'](_0x10d8f9),this['_suggestionToController']['set'](_0x2ed806,_0x44f559),this['_viewToController']['set'](_0x3e5e59,_0x44f559);const _0x314a75=new Pt(this['editor']['locale'],_0x3e5e59);_0x314a75['bind']('isDirty')['to'](_0x3e5e59,'isDirty'),_0x314a75['bind']('length')['to'](_0x3e5e59),_0x314a75['bind']('type')['to'](_0x3e5e59,'type',_0x320c73=>'suggestion-'+_0x320c73);const _0x51dfe1=new Vt({'view':_0x314a75,'target':()=>{const _0x42faa8=_0x10d8f9[0x0]['getFirstMarker']();if(!_0x42faa8)return null;const _0x24034b=_0x42faa8['getRange']()['getContainedElement']();return _0x24034b&&!_0x25f2c2['editing']['mapper']['toViewElement'](_0x24034b)?null:Ot(_0x25f2c2['editing'],_0x42faa8)||null;},'type':()=>'suggestion-'+_0x44f559['view']['type']});_0x3f2783['add'](_0x51dfe1);const _0x2d9605=_0x25f2c2['plugins']['get']('PendingActions');let _0x18c16a;_0x3e5e59['on']('change:isDirty',(_0x2c6be1,_0x351ef0,_0x4003ea)=>{if(_0x4003ea){const t=this['editor']['locale']['t'];_0x18c16a=_0x2d9605['add'](t({'string':'Unsaved\x20change\x20in\x20suggestion.','id':'PENDING_ACTION_SUGGESTION'}));}else _0x2d9605['remove'](_0x18c16a),_0x18c16a=null;});}['_destroyController'](_0x10f2e3){const _0x317147=this['editor']['plugins']['get']('Annotations'),_0x696471=this['_suggestionToController']['get'](_0x10f2e3),_0x35f333=_0x696471['view'],_0x3e2e9d=_0x317147['getByInnerView'](_0x35f333);_0x3e2e9d&&_0x317147['remove'](_0x3e2e9d),this['_suggestionToController']['delete'](_0x10f2e3),this['_viewToController']['delete'](_0x35f333),_0x696471['destroy'](),_0x35f333['destroy']();}['_updateController'](_0x1e9026){if(!_0x1e9026['isInContent']||!this['_suggestionToController']['has'](_0x1e9026))return;const _0x45de29=this['editor']['plugins']['get']('TrackChangesEditing'),_0x57ee97=this['_suggestionToController']['get'](_0x1e9026),_0x13e839=_0x1e9026['getAllAdjacentSuggestions']();_0x57ee97['view']['descriptionParts']=_0x45de29['_descriptionFactory']['getDescriptions'](_0x13e839);}['destroy'](){super['destroy']();for(const _0x209643 of this['_suggestionToController']['keys']())this['_destroyController'](_0x209643);for(const _0x2e800d of this['_debouncedHandlers']['values']())_0x2e800d['cancel']();this['_debouncedHandlers']['clear']();}}
23
+ import{Plugin as _0x55ca1d}from'ckeditor5/src/core';import{Collection as Ct}from'ckeditor5/src/utils';import{Model as bt,SplitButtonView as Tt,createDropdown as At,addListToDropdown as xt}from'ckeditor5/src/ui';import{Users as _0x7113d2,getDateTimeFormatter as Et,getMarkerDomElement as St}from'ckeditor5-collaboration/src/collaboration-core';import _0x3d2550 from'./trackchangesediting';import vt from'./ui/suggestioncontroller';import Nt from'./ui/view/suggestionthreadview';import It from'../theme/icons/track-changes.svg';import{debounce as Dt}from'lodash-es';export default class m extends _0x55ca1d{static get['requires'](){return[_0x3d2550,_0x7113d2,'CommentsRepository','Annotations','EditorAnnotations'];}static get['pluginName'](){return'TrackChangesUI';}constructor(_0x21683c){super(_0x21683c),this['_suggestionToController']=new Map(),this['_viewToController']=new Map(),this['_debouncedHandlers']=new Map();const _0x1a95bb=this['editor']['config'];_0x1a95bb['define']('trackChanges.SuggestionThreadView',Nt),_0x1a95bb['define']('trackChanges.disableComments',!0x1),this['_disableComments']=_0x1a95bb['get']('trackChanges.disableComments');}['init'](){const _0x2420d4=this['editor'],_0x2beb6a=_0x2420d4['plugins']['get'](_0x3d2550),_0x1a5600=_0x2420d4['plugins']['get']('Annotations'),_0x15a4d3=_0x2420d4['plugins']['get']('EditorAnnotations'),_0x3b3a80=_0x2420d4['plugins']['get']('CommentsRepository');_0x2420d4['ui']['componentFactory']['add']('trackChanges',_0x1f8adc=>this['_createUIButton'](_0x1f8adc)),_0x15a4d3['addSourceCollector'](()=>{const _0x3e2be6=[];for(const [_0x4649d1,_0x21cd0e]of Array['from'](this['_suggestionToController'])){const _0x4a475f=_0x4649d1['getAllAdjacentSuggestions'](),_0x556173=[];for(const _0x3ba956 of _0x4a475f){if(!_0x3ba956['isInContent'])continue;if(_0x3ba956['isMultiRange']){_0x556173['push'](..._0x3ba956['getRanges']());continue;}const _0x49371f=_0x3ba956['getFirstRange']();if(_0x556173['length']>0x0){const _0xc5160e=_0x556173[0x0]['getJoined'](_0x49371f);if(_0xc5160e){_0x556173[0x0]=_0xc5160e;continue;}}_0x556173['push'](_0x49371f);}_0x3e2be6['push']([_0x21cd0e['view'],_0x556173]);}return _0x3e2be6;}),this['listenTo'](_0x2beb6a,'suggestionLoaded',(_0x2e21f7,_0x1bf71b)=>{let _0x4fe29a=!0x1;const _0x5848a0=Dt(_0x3863de=>{_0x4fe29a||_0x3863de?_0x4fe29a&&_0x3863de&&(this['_destroyController'](_0x1bf71b),_0x15a4d3['refreshSelectedViews'](),_0x4fe29a=!0x1):(this['_initializeController'](_0x1bf71b),_0x15a4d3['refreshSelectedViews'](),_0x4fe29a=!0x0);},0xa);this['_debouncedHandlers']['set'](_0x1bf71b,_0x5848a0),this['listenTo'](_0x1bf71b,'change:previous',(_0xf4cd6d,_0x2f749f,_0x55f398,_0x3d2a21)=>{_0x1bf71b['isInContent']&&(null==_0x55f398?(this['_updateController'](_0x3d2a21['head']),_0x5848a0(!0x1)):(this['_updateController'](_0x55f398['head']),_0x5848a0(!0x0)));}),null===_0x1bf71b['previous']?_0x5848a0(!0x1):this['_updateController'](_0x1bf71b['head']);}),this['listenTo'](_0x2beb6a,'suggestionUnloaded',(_0x1c6a63,_0x6e7bec,_0x4c6976)=>{this['stopListening'](_0x6e7bec,'change:previous'),this['_debouncedHandlers']['get'](_0x6e7bec)['cancel'](),this['_debouncedHandlers']['delete'](_0x6e7bec);const _0x528a4b=_0x4c6976?_0x4c6976['head']:_0x6e7bec,_0x5985a4=this['_suggestionToController']['get'](_0x528a4b);null!==_0x4c6976&&this['_updateController'](_0x528a4b),null===_0x4c6976&&_0x5985a4&&this['_destroyController'](_0x6e7bec);}),this['listenTo'](_0x2beb6a,'suggestionChanged',(_0x45f29f,_0xcb25e5)=>{this['_updateController'](_0xcb25e5);}),this['listenTo'](_0x1a5600,'change:activeAnnotations',(_0x127996,_0x6d60a3,_0x4296df)=>{const _0x2163fe=Array['from'](_0x4296df,_0x10249e=>_0x10249e['innerView'])['filter'](_0x394002=>this['_viewToController']['has'](_0x394002)),_0x2d661f=[];for(const _0x5caefc of _0x2163fe){const _0x3c7179=this['_viewToController']['get'](_0x5caefc)['model']['getAllAdjacentSuggestions']();_0x2d661f['push'](..._0x3c7179['reduce']((_0x5b87ee,_0x52486d)=>[..._0x5b87ee,..._0x52486d['getMarkerNames']()],[]));}_0x2beb6a['activeMarkers']=_0x2d661f;}),this['listenTo'](_0x3b3a80,'addComment',(_0xb1adea,{threadId:_0x25cfb0,isFromAdapter:_0x560c48})=>{if(_0x560c48||!_0x2beb6a['hasSuggestion'](_0x25cfb0))return;const _0x24c36a=_0x2beb6a['getSuggestion'](_0x25cfb0);this['_suggestionToController']['get'](_0x24c36a)['view']['focus']();},{'priority':'lowest'});}['_createUIButton'](_0x1e4d52){const _0x53e5ea=At(_0x1e4d52,Tt),_0x439127=this['editor']['commands']['get']('trackChanges'),{t:t}=this['editor'];_0x53e5ea['buttonView']['set']({'tooltip':t('Track\x20changes'),'label':t('Track\x20changes'),'icon':It}),_0x53e5ea['buttonView']['bind']('isOn')['to'](_0x439127,'value'),_0x53e5ea['buttonView']['on']('execute',()=>_0x439127['execute']());const _0x1e3dd9=new Ct(),_0x4a5394=[{'type':'switchbutton','model':{'withText':!0x0,'label':t('Track\x20changes'),'commandName':'trackChanges'}},{'type':'separator'},{'type':'button','model':{'withText':!0x0,'label':t('Accept\x20all\x20suggestions'),'commandName':'acceptAllSuggestions'}},{'type':'button','model':{'withText':!0x0,'label':t('Accept\x20all\x20selected\x20suggestions'),'commandName':'acceptSelectedSuggestions'}},{'type':'button','model':{'withText':!0x0,'label':t('Discard\x20all\x20suggestions'),'commandName':'discardAllSuggestions'}},{'type':'button','model':{'withText':!0x0,'label':t('Discard\x20all\x20selected\x20suggestions'),'commandName':'discardSelectedSuggestions'}}];for(const _0x1291ea of _0x4a5394){const _0x45ddf4={'type':_0x1291ea['type']};if(_0x1291ea['model']){const _0x268c75=new bt(_0x1291ea['model']),_0x175984=this['editor']['commands']['get'](_0x268c75['commandName']);_0x268c75['bind']('isOn','isEnabled')['to'](_0x175984,'value','isEnabled'),_0x45ddf4['model']=_0x268c75;}_0x1e3dd9['add'](_0x45ddf4);}xt(_0x53e5ea,_0x1e3dd9);const _0x2757ac=_0x4a5394['filter'](_0x2408b1=>null!=_0x2408b1['model'])['map'](_0x27e9b2=>this['editor']['commands']['get'](_0x27e9b2['model']['commandName']));return _0x53e5ea['buttonView']['actionView']['unbind']('isEnabled'),_0x53e5ea['buttonView']['arrowView']['unbind']('isEnabled'),_0x53e5ea['buttonView']['actionView']['bind']('isEnabled')['to'](_0x439127,'isEnabled'),_0x53e5ea['buttonView']['arrowView']['bind']('isEnabled')['toMany'](_0x2757ac,'isEnabled',(..._0x8cc447)=>_0x8cc447['some'](_0x2b9399=>_0x2b9399)),_0x53e5ea['on']('execute',_0x458858=>this['editor']['execute'](_0x458858['source']['commandName'])),_0x53e5ea;}['_initializeController'](_0xdb0cd){const _0x315e7b=this['editor'],_0x27c82f=_0x315e7b['config'],_0x91d998=_0x315e7b['plugins']['get']('Annotations'),_0x3762a4=_0x315e7b['plugins']['get']('CommentsRepository'),_0x402e20=_0xdb0cd['getAllAdjacentSuggestions']()['filter'](_0x590ceb=>_0x590ceb['isInContent']),_0x1d128c=_0x315e7b['plugins']['get'](_0x7113d2)['me'],_0x64e3f9=_0x315e7b['commands']['get']('acceptSuggestion'),_0x229502=_0x315e7b['commands']['get']('discardSuggestion'),_0x385b0e=_0x27c82f['get']('trackChanges')['SuggestionThreadView'],{CommentsListView:_0x328863,CommentThreadInputView:_0x43f2f5}=_0x315e7b['plugins']['get']('CommentsUI'),_0x2217b0=new _0x385b0e(_0x315e7b['locale'],_0xdb0cd,_0x1d128c,{'disableComments':this['_disableComments'],'editorConfig':_0x27c82f['get']('comments.editorConfig'),'maxCommentsWhenCollapsed':_0x27c82f['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x27c82f['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x27c82f['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':Et(_0x27c82f['get']('locale')),'CommentView':_0x27c82f['get']('comments')['CommentView'],'CommentsListView':_0x328863,'CommentThreadInputView':_0x43f2f5}),_0x133b44=_0x3762a4['createCommentThreadController'](_0xdb0cd['commentThread'],_0x2217b0),_0x4b262f=new vt(_0xdb0cd,_0x2217b0,_0x64e3f9,_0x229502,_0x133b44);_0x2217b0['descriptionParts']=_0x315e7b['plugins']['get']('TrackChangesEditing')['_descriptionFactory']['getDescriptions'](_0x402e20),this['_suggestionToController']['set'](_0xdb0cd,_0x4b262f),this['_viewToController']['set'](_0x2217b0,_0x4b262f);const _0xad6752=_0x91d998['createAnnotationView'](this['editor']['locale'],_0x2217b0);_0xad6752['bind']('isDirty')['to'](_0x2217b0,'isDirty'),_0xad6752['bind']('length')['to'](_0x2217b0),_0xad6752['bind']('type')['to'](_0x2217b0,'type',_0x297505=>'suggestion-'+_0x297505);const _0x4ebe8d=_0x91d998['createAnnotation']({'view':_0xad6752,'target':()=>{const _0xbb5e9a=_0x402e20[0x0]['getFirstMarker']();if(!_0xbb5e9a)return null;const _0x5955d3=_0xbb5e9a['getRange']()['getContainedElement']();return _0x5955d3&&!_0x315e7b['editing']['mapper']['toViewElement'](_0x5955d3)?null:St(_0x315e7b['editing'],_0xbb5e9a)||null;},'type':()=>'suggestion-'+_0x4b262f['view']['type']});_0x91d998['add'](_0x4ebe8d);const _0x444901=_0x315e7b['plugins']['get']('PendingActions');let _0x43c7b5;_0x2217b0['on']('change:isDirty',(_0x465b4a,_0x116877,_0x5cfcd9)=>{if(_0x5cfcd9){const t=this['editor']['locale']['t'];_0x43c7b5=_0x444901['add'](t({'string':'Unsaved\x20change\x20in\x20suggestion.','id':'PENDING_ACTION_SUGGESTION'}));}else _0x444901['remove'](_0x43c7b5),_0x43c7b5=null;});}['_destroyController'](_0x3a3be6){const _0x34c6b0=this['editor']['plugins']['get']('Annotations'),_0x2ba787=this['_suggestionToController']['get'](_0x3a3be6),_0x3ca7d0=_0x2ba787['view'],_0x4aba9a=_0x34c6b0['getByInnerView'](_0x3ca7d0);_0x4aba9a&&_0x34c6b0['remove'](_0x4aba9a),this['_suggestionToController']['delete'](_0x3a3be6),this['_viewToController']['delete'](_0x3ca7d0),_0x2ba787['destroy'](),_0x3ca7d0['destroy']();}['_updateController'](_0x1e1ec3){if(!_0x1e1ec3['isInContent']||!this['_suggestionToController']['has'](_0x1e1ec3))return;const _0x7849e1=this['editor']['plugins']['get']('TrackChangesEditing'),_0x1fa193=this['_suggestionToController']['get'](_0x1e1ec3),_0x3713b8=_0x1e1ec3['getAllAdjacentSuggestions']();_0x1fa193['view']['descriptionParts']=_0x7849e1['_descriptionFactory']['getDescriptions'](_0x3713b8);}['destroy'](){super['destroy']();for(const _0x236329 of this['_suggestionToController']['keys']())this['_destroyController'](_0x236329);for(const _0x5823ed of this['_debouncedHandlers']['values']())_0x5823ed['cancel']();this['_debouncedHandlers']['clear']();}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x17fd=['bind','view','destroy','discardSuggestion','commentThread','stopListening','acceptSuggestion','model','isEnabled','_acceptCommand','unbind','execute','_discardCommand','commentThreadController','listenTo'];(function(_0x1458cd,_0x17fd1a){var _0x58f556=function(_0x463e46){while(--_0x463e46){_0x1458cd['push'](_0x1458cd['shift']());}};_0x58f556(++_0x17fd1a);}(_0x17fd,0xb9));var _0x58f5=function(_0x1458cd,_0x17fd1a){_0x1458cd=_0x1458cd-0x0;var _0x58f556=_0x17fd[_0x1458cd];return _0x58f556;};import{ObservableMixin as _0x486f86,mix as _0x4558d8}from'ckeditor5/src/utils';import _0x555f11 from'@ckeditor/ckeditor5-comments/src/comments/ui/commentthreadcontroller';export default class Ct{constructor(_0x4b6600,_0x5dde1a,_0x154a33,_0x1249ad){this[_0x58f5('0x2')]=_0x4b6600,this[_0x58f5('0xb')]=_0x5dde1a,this[_0x58f5('0x8')]=new _0x555f11(_0x4b6600[_0x58f5('0xe')],_0x5dde1a),this[_0x58f5('0x4')]=_0x154a33,this[_0x58f5('0x7')]=_0x1249ad,this['view'][_0x58f5('0xa')]('isEnabled')['to'](this[_0x58f5('0x4')]),this['listenTo'](_0x5dde1a,'acceptSuggestion',()=>this[_0x58f5('0x1')]()),this[_0x58f5('0x9')](_0x5dde1a,'discardSuggestion',()=>this[_0x58f5('0xd')]());}[_0x58f5('0x1')](){this[_0x58f5('0x4')]['execute'](this[_0x58f5('0x2')]['id']);}[_0x58f5('0xd')](){this[_0x58f5('0x7')][_0x58f5('0x6')](this[_0x58f5('0x2')]['id']);}['destroy'](){this[_0x58f5('0xb')][_0x58f5('0x5')](_0x58f5('0x3')),this[_0x58f5('0x0')](),this['commentThreadController'][_0x58f5('0xc')]();}}_0x4558d8(Ct,_0x486f86);
23
+ var _0xbb6c=['isEnabled','unbind','destroy','listenTo','_acceptCommand','_discardCommand','discardSuggestion','model','execute','acceptSuggestion','commentThreadController','bind','view','stopListening'];(function(_0xdf551b,_0xbb6ce8){var _0x1e0a99=function(_0x438b81){while(--_0x438b81){_0xdf551b['push'](_0xdf551b['shift']());}};_0x1e0a99(++_0xbb6ce8);}(_0xbb6c,0x9e));var _0x1e0a=function(_0xdf551b,_0xbb6ce8){_0xdf551b=_0xdf551b-0x0;var _0x1e0a99=_0xbb6c[_0xdf551b];return _0x1e0a99;};import{ObservableMixin as _0x46aa6f,mix as _0x1033ca}from'ckeditor5/src/utils';export default class vt{constructor(_0x501884,_0x1fa053,_0x30c6d1,_0x2d8355,_0x16d74c){this[_0x1e0a('0x3')]=_0x501884,this[_0x1e0a('0x8')]=_0x1fa053,this[_0x1e0a('0x6')]=_0x16d74c,this[_0x1e0a('0x0')]=_0x30c6d1,this['_discardCommand']=_0x2d8355,this[_0x1e0a('0x8')][_0x1e0a('0x7')](_0x1e0a('0xa'))['to'](this['_acceptCommand']),this['listenTo'](_0x1fa053,_0x1e0a('0x5'),()=>this[_0x1e0a('0x5')]()),this[_0x1e0a('0xd')](_0x1fa053,'discardSuggestion',()=>this[_0x1e0a('0x2')]());}['acceptSuggestion'](){this[_0x1e0a('0x0')][_0x1e0a('0x4')](this[_0x1e0a('0x3')]['id']);}[_0x1e0a('0x2')](){this[_0x1e0a('0x1')]['execute'](this['model']['id']);}[_0x1e0a('0xc')](){this[_0x1e0a('0x8')][_0x1e0a('0xb')](_0x1e0a('0xa')),this[_0x1e0a('0x9')](),this[_0x1e0a('0x6')][_0x1e0a('0xc')]();}}_0x1033ca(vt,_0x46aa6f);
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x4159=['_localUser','hasDirtyComment','value','isActive','editorConfig','_createCommentThreadInputView','commentThreadInputView','isReadOnly','disableComments','commentsListView','_config','locale','cancel','bind','set','assign','fire','destroy','_model','element','commentThread','_createCommentViews','isEnabled','length','focus','delegate','addComment','isDirty','commentInputView','createdAt','removeComment'];(function(_0x4bdc4b,_0x4159e8){const _0x4172db=function(_0x3d11ab){while(--_0x3d11ab){_0x4bdc4b['push'](_0x4bdc4b['shift']());}};_0x4172db(++_0x4159e8);}(_0x4159,0x1a2));const _0x4172=function(_0x4bdc4b,_0x4159e8){_0x4bdc4b=_0x4bdc4b-0x0;let _0x4172db=_0x4159[_0x4bdc4b];return _0x4172db;};import{View as _0xfe8413}from'ckeditor5/src/ui';import _0x171e23 from'@ckeditor/ckeditor5-comments/src/comments/ui/view/commentslistview';import _0x4a81ba from'@ckeditor/ckeditor5-comments/src/comments/ui/view/commentthreadinputview';export default class ei extends _0xfe8413{constructor(_0x427268,_0x13bb28,_0x3be3fa,_0x3d1244){super(_0x427268),this['commentsListView']=null,this[_0x4172('0x16')]=null,this[_0x4172('0x1e')](_0x4172('0x13'),!0x1),this['set'](_0x4172('0xe'),_0x13bb28[_0x4172('0xe')]),this[_0x4172('0x1d')](_0x4172('0xe'))['to'](_0x13bb28),this[_0x4172('0x1e')]('descriptionParts',[]),this['set'](_0x4172('0xc'),!0x1),this[_0x4172('0x1e')](_0x4172('0x7'),!0x1),this[_0x4172('0x3')]=_0x13bb28,this[_0x4172('0x10')]=_0x3be3fa,this[_0x4172('0x1a')]=_0x3d1244,_0x3d1244[_0x4172('0x18')]?this[_0x4172('0x1e')](_0x4172('0x8'),0x1):this['_createCommentViews']();}[_0x4172('0x9')](){this[_0x4172('0x4')][_0x4172('0x9')]();}[_0x4172('0x2')](){this['isDirty']=!0x1,this['commentsListView']&&this['commentsListView'][_0x4172('0x2')](),this[_0x4172('0x16')]&&this['commentThreadInputView'][_0x4172('0x2')](),super['destroy']();}[_0x4172('0x6')](){this[_0x4172('0x19')]=new _0x171e23(this[_0x4172('0x1b')],this[_0x4172('0x3')][_0x4172('0x5')],Object[_0x4172('0x0')]({'CommentView':this[_0x4172('0x1a')]['CommentView']},this['_config'])),this['commentsListView'][_0x4172('0xa')](_0x4172('0xf'))['to'](this),this[_0x4172('0x19')][_0x4172('0xa')]('updateComment')['to'](this),this[_0x4172('0x19')][_0x4172('0x1d')]('isActive')['to'](this),this['set'](_0x4172('0x8'),this['commentsListView'][_0x4172('0x8')]+0x1),this['bind'](_0x4172('0x8'))['to'](this['commentsListView'],'length',_0x4ab2d4=>_0x4ab2d4+0x1),this[_0x4172('0x16')]=this[_0x4172('0x15')](),this['on'](_0x4172('0xf'),()=>this[_0x4172('0x9')]()),this['bind']('isDirty')['to'](this['commentsListView'],_0x4172('0x11'),this[_0x4172('0x16')][_0x4172('0xd')],_0x4172('0x12'),(_0x41c374,_0x2ff5ac)=>_0x41c374||!!_0x2ff5ac);}[_0x4172('0x15')](){const _0x5b6e99=new _0x4a81ba(this[_0x4172('0x1b')],this[_0x4172('0x10')],this['_config'][_0x4172('0x14')]),_0x130fba=_0x5b6e99[_0x4172('0xd')];return _0x5b6e99[_0x4172('0x1d')]('showInput')['to'](this,'isActive',this[_0x4172('0x3')][_0x4172('0x5')],_0x4172('0x17'),_0x130fba,_0x4172('0x12'),(_0x16c65c,_0xae5bdd,_0x26ee81)=>!!_0x26ee81||_0x16c65c&&!_0xae5bdd),_0x130fba['on']('submit',(_0x4c95e5,_0x48f994)=>{this[_0x4172('0x1')](_0x4172('0xb'),_0x48f994),_0x130fba['editor']['setData']('');}),_0x130fba['on'](_0x4172('0x1c'),()=>this[_0x4172('0x9')]()),_0x130fba['bind']('disabledSubmit')['to'](this[_0x4172('0x3')][_0x4172('0x5')],_0x4172('0x17')),_0x5b6e99;}}
23
+ const _0x5e27=['element','locale','_localUser','_createCommentViews','isReadOnly','delegate','isActive','fire','editor','destroy','isDirty','CommentView','addComment','cancel','focus','_config','commentsListView','commentThread','showInput','updateComment','set','value','length','disabledSubmit','assign','bind','_createCommentThreadInputView','isEnabled','commentThreadInputView','disableComments','removeComment','_model','createdAt','hasDirtyComment','editorConfig'];(function(_0x365d84,_0x5e27b8){const _0x397490=function(_0x3aa728){while(--_0x3aa728){_0x365d84['push'](_0x365d84['shift']());}};_0x397490(++_0x5e27b8);}(_0x5e27,0x148));const _0x3974=function(_0x365d84,_0x5e27b8){_0x365d84=_0x365d84-0x0;let _0x397490=_0x5e27[_0x365d84];return _0x397490;};import{View as _0x8c03cd}from'ckeditor5/src/ui';export default class Ht extends _0x8c03cd{constructor(_0x18dd83,_0xf4da9f,_0x169b92,_0x3bfd70){super(_0x18dd83),this[_0x3974('0x3')]=null,this[_0x3974('0xf')]=null,this[_0x3974('0x7')](_0x3974('0x1c'),!0x1),this[_0x3974('0x7')](_0x3974('0x13'),_0xf4da9f['createdAt']),this[_0x3974('0xc')](_0x3974('0x13'))['to'](_0xf4da9f),this[_0x3974('0x7')]('descriptionParts',[]),this['set'](_0x3974('0x20'),!0x1),this['set'](_0x3974('0xe'),!0x1),this['_model']=_0xf4da9f,this[_0x3974('0x18')]=_0x169b92,this[_0x3974('0x2')]=_0x3bfd70,_0x3bfd70[_0x3974('0x10')]?this[_0x3974('0x7')](_0x3974('0x9'),0x1):this[_0x3974('0x19')]();}['focus'](){this[_0x3974('0x16')][_0x3974('0x1')]();}[_0x3974('0x1f')](){this[_0x3974('0x20')]=!0x1,this[_0x3974('0x3')]&&this[_0x3974('0x3')][_0x3974('0x1f')](),this[_0x3974('0xf')]&&this[_0x3974('0xf')][_0x3974('0x1f')](),super[_0x3974('0x1f')]();}[_0x3974('0x19')](){const {CommentsListView:_0x80f247}=this['_config'];this[_0x3974('0x3')]=new _0x80f247(this[_0x3974('0x17')],this[_0x3974('0x12')][_0x3974('0x4')],Object[_0x3974('0xb')]({'CommentView':this[_0x3974('0x2')][_0x3974('0x21')]},this[_0x3974('0x2')])),this['commentsListView'][_0x3974('0x1b')](_0x3974('0x11'))['to'](this),this[_0x3974('0x3')][_0x3974('0x1b')](_0x3974('0x6'))['to'](this),this[_0x3974('0x3')][_0x3974('0xc')](_0x3974('0x1c'))['to'](this),this[_0x3974('0x7')](_0x3974('0x9'),this[_0x3974('0x3')]['length']+0x1),this[_0x3974('0xc')](_0x3974('0x9'))['to'](this[_0x3974('0x3')],_0x3974('0x9'),_0x372d00=>_0x372d00+0x1),this[_0x3974('0xf')]=this[_0x3974('0xd')](),this['on'](_0x3974('0x11'),()=>this[_0x3974('0x1')]()),this[_0x3974('0xc')]('isDirty')['to'](this[_0x3974('0x3')],_0x3974('0x14'),this['commentThreadInputView']['commentInputView'],_0x3974('0x8'),(_0x5cadf3,_0x47bd1c)=>_0x5cadf3||!!_0x47bd1c);}[_0x3974('0xd')](){const {CommentThreadInputView:_0x5cf1a7}=this[_0x3974('0x2')],_0x1dd1b5=new _0x5cf1a7(this[_0x3974('0x17')],this[_0x3974('0x18')],this['_config'][_0x3974('0x15')]),_0x2e635c=_0x1dd1b5['commentInputView'];return _0x1dd1b5[_0x3974('0xc')](_0x3974('0x5'))['to'](this,'isActive',this[_0x3974('0x12')][_0x3974('0x4')],_0x3974('0x1a'),_0x2e635c,_0x3974('0x8'),(_0x1c47de,_0x405cd6,_0xec0916)=>!!_0xec0916||_0x1c47de&&!_0x405cd6),_0x2e635c['on']('submit',(_0x24002a,_0x3b6b72)=>{this[_0x3974('0x1d')](_0x3974('0x22'),_0x3b6b72),_0x2e635c[_0x3974('0x1e')]['setData']('');}),_0x2e635c['on'](_0x3974('0x0'),()=>this[_0x3974('0x1')]()),_0x2e635c[_0x3974('0xc')](_0x3974('0xa'))['to'](this[_0x3974('0x12')][_0x3974('0x4')],_0x3974('0x1a')),_0x1dd1b5;}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import _0x1d55b7 from'./basesuggestionthreadview';import _0x2071f3 from'@ckeditor/ckeditor5-collaboration-core/src/users/view/userview';import{ButtonView as _0x196e73}from'ckeditor5/src/ui';import{icons as _0x3ca3c6}from'ckeditor5/src/core';import _0x148c82 from'@ckeditor/ckeditor5-comments/src/utils/trim-html';export default class Tt extends _0x1d55b7{constructor(_0x12cb46,_0x55eed0,_0xa372cb,_0x20b3f8){super(_0x12cb46,_0x55eed0,_0xa372cb,_0x20b3f8);const {t:t}=_0x12cb46;this['set']('type',''),this['bind']('type')['to'](this,'descriptionParts',_0x29059d=>_0x29059d&&_0x29059d[0x0]?_0x29059d[0x0]['type']:''),this['bind']('description')['to'](this,'descriptionParts',this,'isActive',(_0xe7d2dc,_0x202855)=>{let _0xb91f0c='';for(const _0x3f5239 of _0xe7d2dc)_0xb91f0c+='<p>'+as(_0x3f5239['content'],_0x3f5239['color'])+'</p>';return _0x202855?_0xb91f0c:_0x148c82(_0xb91f0c,{'limit':0x8c});}),this['_descriptionElement']=null,this['acceptButton']=this['_createButton'](t('Accept\x20suggestion'),_0x3ca3c6['check'],'ck-suggestion--accept','acceptSuggestion'),this['discardButton']=this['_createButton'](t('Discard\x20suggestion'),_0x3ca3c6['cancel'],'ck-suggestion--discard','discardSuggestion'),this['userView']=new _0x2071f3(_0x12cb46,this['_model']['author']),this['userView']['extendTemplate']({'attributes':{'class':['ck-suggestion__user','ck-annotation__user']}}),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x26554d=this['bindTemplate'],_0x3fbd2c={'tag':'div','attributes':{'class':['ck-suggestion-wrapper',_0x26554d['if']('isActive','ck-suggestion-wrapper--active'),_0x26554d['to']('type',_0x25b637=>'ck-suggestion-'+_0x25b637),this['_config']['disableComments']&&'ck-suggestion--disabled-comments'],'data-suggestion-id':this['_model']['id'],'data-thread-id':this['_model']['commentThread']['id'],'data-author-id':this['_model']['author']['id'],'tabindex':-0x1},'children':[{'tag':'div','attributes':{'class':['ck-suggestion','ck-annotation']},'children':[this['userView'],{'tag':'div','attributes':{'class':['ck-suggestion__main','ck-annotation__main']},'children':[{'tag':'div','attributes':{'class':['ck-suggestion__info','ck-annotation__info']},'children':[{'tag':'span','children':[{'text':this['userView']['name']}],'attributes':{'class':['ck-suggestion__info-name','ck-annotation__info-name']}},{'tag':'time','attributes':{'datetime':_0x26554d['to']('createdAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x26554d['to']('createdAt',_0xb4c971=>this['_config']['formatDateTime'](_0xb4c971))}]}]},{'tag':'div','attributes':{'class':['ck-suggestion__actions','ck-annotation__actions']},'children':[this['acceptButton'],this['discardButton']]},{'tag':'div','attributes':{'class':['ck-annotation__content-wrapper']}}]}]}]};return this['commentsListView']&&this['commentThreadInputView']&&_0x3fbd2c['children']['push'](this['commentsListView'],this['commentThreadInputView']),_0x3fbd2c;}['render'](){super['render'](),this['_descriptionElement']=this['element']['querySelector']('.ck-annotation__content-wrapper'),this['_descriptionElement']['innerHTML']=this['description'],this['on']('change:description',(_0x4fb8b5,_0x579330,_0x3a67e4)=>{this['_descriptionElement']['innerHTML']=_0x3a67e4;});}['_createButton'](_0x5d8225,_0x4cbdc5,_0x41e9ec,_0x2c4d68){const _0x28762a=new _0x196e73(this['locale']);return _0x28762a['set']({'label':_0x5d8225,'icon':_0x4cbdc5,'tooltip':!0x0}),_0x28762a['extendTemplate']({'attributes':{'class':_0x41e9ec}}),_0x28762a['on']('execute',()=>{this['fire'](_0x2c4d68,this['_model']['id']);}),_0x28762a['bind']('isEnabled')['to'](this),_0x28762a;}}function as(_0x54cf37,_0x90e7f8){let _0x3cb14b='';return _0x3cb14b+=_0x54cf37['split']('*')['map']((_0xe95f3a,_0x1f635c)=>_0x1f635c%0x2!=0x0?'<span\x20class=\x22ck-suggestion-type\x22>'+rs(_0xe95f3a)+'</span>':rs(_0xe95f3a))['join'](''),_0x90e7f8&&(_0x3cb14b+='<span\x20class=\x22ck-suggestion-color\x22\x20style=\x22background-color:\x20'+_0x90e7f8['value']+'\x22\x20title=\x22'+_0x90e7f8['title']+'\x22></span>'),_0x3cb14b;}function rs(_0x43d042){const _0x2bcf5b=document['createElement']('span');return _0x2bcf5b['innerText']=_0x43d042,_0x2bcf5b['innerHTML'];}
23
+ import Ht from'./basesuggestionthreadview';import{ButtonView as Jt}from'ckeditor5/src/ui';import{icons as Kt}from'ckeditor5/src/core';import{trimHtml as Ut,UserView as Xt}from'ckeditor5-collaboration/src/collaboration-core';export default class Nt extends Ht{constructor(_0x37fa3b,_0x2374ba,_0x405c25,_0x59d331){super(_0x37fa3b,_0x2374ba,_0x405c25,_0x59d331);const {t:t}=_0x37fa3b;this['set']('type',''),this['bind']('type')['to'](this,'descriptionParts',_0x2962dd=>_0x2962dd&&_0x2962dd[0x0]?_0x2962dd[0x0]['type']:''),this['bind']('description')['to'](this,'descriptionParts',this,'isActive',(_0x4391aa,_0x4d2190)=>{let _0x8666ca='';for(const _0x5dc7ec of _0x4391aa)_0x8666ca+='<p>'+Yt(_0x5dc7ec['content'],_0x5dc7ec['color'])+'</p>';return _0x4d2190?_0x8666ca:Ut(_0x8666ca,{'limit':0x8c});}),this['_descriptionElement']=null,this['acceptButton']=this['_createButton'](t('Accept\x20suggestion'),Kt['check'],'ck-suggestion--accept','acceptSuggestion'),this['discardButton']=this['_createButton'](t('Discard\x20suggestion'),Kt['cancel'],'ck-suggestion--discard','discardSuggestion'),this['userView']=new Xt(_0x37fa3b,this['_model']['author']),this['userView']['extendTemplate']({'attributes':{'class':['ck-suggestion__user','ck-annotation__user']}}),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x401180=this['bindTemplate'],_0x274c8d={'tag':'div','attributes':{'class':['ck-suggestion-wrapper',_0x401180['if']('isActive','ck-suggestion-wrapper--active'),_0x401180['to']('type',_0x4f1d05=>'ck-suggestion-'+_0x4f1d05),this['_config']['disableComments']&&'ck-suggestion--disabled-comments'],'data-suggestion-id':this['_model']['id'],'data-thread-id':this['_model']['commentThread']['id'],'data-author-id':this['_model']['author']['id'],'tabindex':-0x1},'children':[{'tag':'div','attributes':{'class':['ck-suggestion','ck-annotation']},'children':[this['userView'],{'tag':'div','attributes':{'class':['ck-suggestion__main','ck-annotation__main']},'children':[{'tag':'div','attributes':{'class':['ck-suggestion__info','ck-annotation__info']},'children':[{'tag':'span','children':[{'text':this['userView']['name']}],'attributes':{'class':['ck-suggestion__info-name','ck-annotation__info-name']}},{'tag':'time','attributes':{'datetime':_0x401180['to']('createdAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x401180['to']('createdAt',_0x5150dd=>this['_config']['formatDateTime'](_0x5150dd))}]}]},{'tag':'div','attributes':{'class':['ck-suggestion__actions','ck-annotation__actions']},'children':[this['acceptButton'],this['discardButton']]},{'tag':'div','attributes':{'class':['ck-annotation__content-wrapper']}}]}]}]};return this['commentsListView']&&this['commentThreadInputView']&&_0x274c8d['children']['push'](this['commentsListView'],this['commentThreadInputView']),_0x274c8d;}['render'](){super['render'](),this['_descriptionElement']=this['element']['querySelector']('.ck-annotation__content-wrapper'),this['_descriptionElement']['innerHTML']=this['description'],this['on']('change:description',(_0x8282f2,_0x3f9892,_0x2974fd)=>{this['_descriptionElement']['innerHTML']=_0x2974fd;});}['_createButton'](_0x1338c0,_0x576e1e,_0x5441d8,_0x3ce402){const _0x1efe9a=new Jt(this['locale']);return _0x1efe9a['set']({'label':_0x1338c0,'icon':_0x576e1e,'tooltip':!0x0}),_0x1efe9a['extendTemplate']({'attributes':{'class':_0x5441d8}}),_0x1efe9a['on']('execute',()=>{this['fire'](_0x3ce402,this['_model']['id']);}),_0x1efe9a['bind']('isEnabled')['to'](this),_0x1efe9a;}}function Yt(_0xdf4386,_0x5edcd1){let _0x5a5b7c='';return _0x5a5b7c+=_0xdf4386['split']('*')['map']((_0xa3d00e,_0x585e02)=>_0x585e02%0x2!=0x0?'<span\x20class=\x22ck-suggestion-type\x22>'+Zt(_0xa3d00e)+'</span>':Zt(_0xa3d00e))['join'](''),_0x5edcd1&&(_0x5a5b7c+='<span\x20class=\x22ck-suggestion-color\x22\x20style=\x22background-color:\x20'+_0x5edcd1['value']+'\x22\x20title=\x22'+_0x5edcd1['title']+'\x22></span>'),_0x5a5b7c;}function Zt(_0x54ed44){const _0x538e26=document['createElement']('span');return _0x538e26['innerText']=_0x54ed44,_0x538e26['innerHTML'];}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x1354=['start','next','isIntersecting','isInContent','add','isCollapsed','getRanges','getRange','isMultiRange'];(function(_0x4c7608,_0x1354b0){const _0x53441c=function(_0x159587){while(--_0x159587){_0x4c7608['push'](_0x4c7608['shift']());}};_0x53441c(++_0x1354b0);}(_0x1354,0x1a5));const _0x5344=function(_0x4c7608,_0x1354b0){_0x4c7608=_0x4c7608-0x0;let _0x53441c=_0x1354[_0x4c7608];return _0x53441c;};export default function jt(_0x5b2ca0,_0x290b27){const _0x335af7=Array['from'](_0x5b2ca0[_0x5344('0x8')]()),_0x515d7e=new Set();for(const _0x55eae4 of _0x290b27)if(_0x55eae4[_0x5344('0x5')])for(const _0x5be2fb of _0x335af7)for(const _0x5fee11 of _0x55eae4['getMarkers']()){const _0x4cd447=_0x5fee11[_0x5344('0x0')]();(_0x5be2fb[_0x5344('0x4')](_0x4cd447)||_0x5b2ca0[_0x5344('0x7')]&&!_0x55eae4[_0x5344('0x1')]&&_0x55eae4[_0x5344('0x3')]&&_0x4cd447['end']['isTouching'](_0x5be2fb[_0x5344('0x2')]))&&_0x515d7e[_0x5344('0x6')](_0x55eae4);}return _0x515d7e;}
23
+ const _0x5bca=['getRanges','getRange','add','isInContent','isCollapsed','isIntersecting','from','start','next','isTouching','getMarkers'];(function(_0x3caaae,_0x5bcaf2){const _0x29b38d=function(_0x26ead9){while(--_0x26ead9){_0x3caaae['push'](_0x3caaae['shift']());}};_0x29b38d(++_0x5bcaf2);}(_0x5bca,0x163));const _0x29b3=function(_0x3caaae,_0x5bcaf2){_0x3caaae=_0x3caaae-0x0;let _0x29b38d=_0x5bca[_0x3caaae];return _0x29b38d;};export default function jt(_0x2fe10f,_0x4414a5){const _0x24b5b0=Array[_0x29b3('0x3')](_0x2fe10f[_0x29b3('0x8')]()),_0x5c1d2f=new Set();for(const _0x6c639d of _0x4414a5)if(_0x6c639d[_0x29b3('0x0')])for(const _0x2df726 of _0x24b5b0)for(const _0x5a15d2 of _0x6c639d[_0x29b3('0x7')]()){const _0xccf28b=_0x5a15d2[_0x29b3('0x9')]();(_0x2df726[_0x29b3('0x2')](_0xccf28b)||_0x2fe10f[_0x29b3('0x1')]&&!_0x6c639d['isMultiRange']&&_0x6c639d[_0x29b3('0x5')]&&_0xccf28b['end'][_0x29b3('0x6')](_0x2df726[_0x29b3('0x4')]))&&_0x5c1d2f[_0x29b3('0xa')](_0x6c639d);}return _0x5c1d2f;}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0xf334=['isArray','toString','string','boolean','sort','object','charCodeAt'];(function(_0x61a3b9,_0xf334ca){const _0x3bdf6f=function(_0x113550){while(--_0x113550){_0x61a3b9['push'](_0x61a3b9['shift']());}};_0x3bdf6f(++_0xf334ca);}(_0xf334,0x7d));const _0x3bdf=function(_0x61a3b9,_0xf334ca){_0x61a3b9=_0x61a3b9-0x0;let _0x3bdf6f=_0xf334[_0x61a3b9];return _0x3bdf6f;};export default function mt(_0x3e9c39){let _0x271537=0x0,_0x4a8f24=0x0;for(const _0xe80aa4 of pe(_0x3e9c39))_0x271537=(_0x271537<<0x5)-_0x271537+_0xe80aa4,_0x271537&=_0x271537,[_0x271537,_0x4a8f24]=[_0x4a8f24,_0x271537];return xe(_0x271537)+xe(_0x4a8f24);}function*ye(_0x4f8b29){_0x4f8b29?_0x3bdf('0x4')==typeof _0x4f8b29?yield 0x1:Array[_0x3bdf('0x1')](_0x4f8b29)?yield*function*(_0x522cfa){for(const _0x435b35 of _0x522cfa)yield*ye(_0x435b35);}(_0x4f8b29):_0x3bdf('0x6')==typeof _0x4f8b29?yield*pe(_0x4f8b29):_0x3bdf('0x3')==typeof _0x4f8b29?yield*je(_0x4f8b29):'number'==typeof _0x4f8b29&&(yield _0x4f8b29):yield 0x0;}function*pe(_0x1245ef){if(yield he('{'),_0x1245ef){const _0x29074d=Object['keys'](_0x1245ef)[_0x3bdf('0x5')]();for(const _0x4586a9 of _0x29074d){yield*je(_0x4586a9),yield he(':');const _0x54f515=_0x1245ef[_0x4586a9];yield*ye(_0x54f515);}}yield he('}');}function*je(_0x38ada8){yield he('\x22');for(const _0x3edf8f of _0x38ada8)yield he(_0x3edf8f);yield he('\x22');}function he(_0x4965fb){return _0x4965fb[_0x3bdf('0x0')](0x0);}function xe(_0xc29554){return(_0xc29554*=Math['sign'](_0xc29554))[_0x3bdf('0x2')](0x24);}
23
+ const _0xb1c5=['object','charCodeAt','sign','keys','number','sort','isArray'];(function(_0x1901ab,_0xb1c568){const _0x29ee3e=function(_0x471fd3){while(--_0x471fd3){_0x1901ab['push'](_0x1901ab['shift']());}};_0x29ee3e(++_0xb1c568);}(_0xb1c5,0xcd));const _0x29ee=function(_0x1901ab,_0xb1c568){_0x1901ab=_0x1901ab-0x0;let _0x29ee3e=_0xb1c5[_0x1901ab];return _0x29ee3e;};export default function ft(_0x5d5c83){let _0xc774a1=0x0,_0x18ab16=0x0;for(const _0x5ab5d7 of ye(_0x5d5c83))_0xc774a1=(_0xc774a1<<0x5)-_0xc774a1+_0x5ab5d7,_0xc774a1&=_0xc774a1,[_0xc774a1,_0x18ab16]=[_0x18ab16,_0xc774a1];return ue(_0xc774a1)+ue(_0x18ab16);}function*fe(_0x553344){_0x553344?'boolean'==typeof _0x553344?yield 0x1:Array[_0x29ee('0x4')](_0x553344)?yield*function*(_0x2037c0){for(const _0xcd6fa9 of _0x2037c0)yield*fe(_0xcd6fa9);}(_0x553344):_0x29ee('0x5')==typeof _0x553344?yield*ye(_0x553344):'string'==typeof _0x553344?yield*de(_0x553344):_0x29ee('0x2')==typeof _0x553344&&(yield _0x553344):yield 0x0;}function*ye(_0x54dbe4){if(yield ce('{'),_0x54dbe4){const _0x23c9ac=Object[_0x29ee('0x1')](_0x54dbe4)[_0x29ee('0x3')]();for(const _0xc21f87 of _0x23c9ac){yield*de(_0xc21f87),yield ce(':');const _0x82bfe6=_0x54dbe4[_0xc21f87];yield*fe(_0x82bfe6);}}yield ce('}');}function*de(_0x4699ae){yield ce('\x22');for(const _0x2641b4 of _0x4699ae)yield ce(_0x2641b4);yield ce('\x22');}function ce(_0x4e6efb){return _0x4e6efb[_0x29ee('0x6')](0x0);}function ue(_0x2e05f3){return(_0x2e05f3*=Math[_0x29ee('0x0')](_0x2e05f3))['toString'](0x24);}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0xb44d=['replace','join','value','color','type','isArray'];(function(_0x283f17,_0xb44dde){const _0x1f2eef=function(_0x4d3b06){while(--_0x4d3b06){_0x283f17['push'](_0x283f17['shift']());}};_0x1f2eef(++_0xb44dde);}(_0xb44d,0x6e));const _0x1f2e=function(_0x283f17,_0xb44dde){_0x283f17=_0x283f17-0x0;let _0x1f2eef=_0xb44d[_0x283f17];return _0x1f2eef;};export function normalizeDescription(_0x2679ff){return Array[_0x1f2e('0x3')](_0x2679ff)||(_0x2679ff=[_0x2679ff]),_0x2679ff['map'](_0xe6e92a=>{const _0x6c4595=_0xe6e92a['content'][_0x1f2e('0x4')](/\*/g,''),_0x1ef5b1=_0xe6e92a['color']?'\x20[color\x20'+_0xe6e92a[_0x1f2e('0x1')][_0x1f2e('0x0')]+']':'';return'['+_0xe6e92a[_0x1f2e('0x2')]+']\x20'+_0x6c4595+_0x1ef5b1;})[_0x1f2e('0x5')](';\x20');}
23
+ const _0x5633=['color','replace','isArray','map','\x20[color\x20','content','type','value'];(function(_0x48eb06,_0x563341){const _0x6b2b3f=function(_0x4e077f){while(--_0x4e077f){_0x48eb06['push'](_0x48eb06['shift']());}};_0x6b2b3f(++_0x563341);}(_0x5633,0x77));const _0x6b2b=function(_0x48eb06,_0x563341){_0x48eb06=_0x48eb06-0x0;let _0x6b2b3f=_0x5633[_0x48eb06];return _0x6b2b3f;};export function normalizeDescription(_0x37d046){return Array[_0x6b2b('0x3')](_0x37d046)||(_0x37d046=[_0x37d046]),_0x37d046[_0x6b2b('0x4')](_0x19093c=>{const _0x3cbc16=_0x19093c[_0x6b2b('0x6')][_0x6b2b('0x2')](/\*/g,''),_0x356f45=_0x19093c[_0x6b2b('0x1')]?_0x6b2b('0x5')+_0x19093c[_0x6b2b('0x1')][_0x6b2b('0x0')]+']':'';return'['+_0x19093c[_0x6b2b('0x7')]+']\x20'+_0x3cbc16+_0x356f45;})['join'](';\x20');}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x5233=['type','sort','deletion'];(function(_0x5bb7dc,_0x5233f7){var _0x1f1d05=function(_0x3d95d1){while(--_0x3d95d1){_0x5bb7dc['push'](_0x5bb7dc['shift']());}};_0x1f1d05(++_0x5233f7);}(_0x5233,0x1e5));var _0x1f1d=function(_0x5bb7dc,_0x5233f7){_0x5bb7dc=_0x5bb7dc-0x0;var _0x1f1d05=_0x5233[_0x5bb7dc];return _0x1f1d05;};export default function ts(_0x98aac9){return _0x98aac9[_0x1f1d('0x2')]((_0x283f44,_0x48ca66)=>'deletion'==_0x283f44[_0x1f1d('0x1')]&&_0x1f1d('0x0')!=_0x48ca66[_0x1f1d('0x1')]?-0x1:_0x1f1d('0x0')!=_0x283f44[_0x1f1d('0x1')]&&'deletion'==_0x48ca66[_0x1f1d('0x1')]?0x1:0x0);}
23
+ var _0x3f2c=['sort','deletion','type'];(function(_0x4513c7,_0x3f2ca7){var _0x454677=function(_0x35dfca){while(--_0x35dfca){_0x4513c7['push'](_0x4513c7['shift']());}};_0x454677(++_0x3f2ca7);}(_0x3f2c,0x186));var _0x4546=function(_0x4513c7,_0x3f2ca7){_0x4513c7=_0x4513c7-0x0;var _0x454677=_0x3f2c[_0x4513c7];return _0x454677;};export default function ts(_0x30a516){return _0x30a516[_0x4546('0x0')]((_0x7385a1,_0x4f09d7)=>_0x4546('0x1')==_0x7385a1[_0x4546('0x2')]&&_0x4546('0x1')!=_0x4f09d7[_0x4546('0x2')]?-0x1:'deletion'!=_0x7385a1['type']&&_0x4546('0x1')==_0x4f09d7[_0x4546('0x2')]?0x1:0x0);}
@@ -4,7 +4,7 @@
4
4
  CKEditor 5 Collaboration is licensed under a commercial license and protected by copyright law. Where not otherwise indicated,
5
5
  all CKEditor 5 Collaboration content is authored by CKSource engineers and consists of CKSource-owned intellectual property.
6
6
 
7
- Copyright (c) 2003-2021, CKSource Holding sp. z o.o. All rights reserved.
7
+ Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
8
8
 
9
9
  !-->
10
10
 
@@ -4,7 +4,7 @@
4
4
  CKEditor 5 Collaboration is licensed under a commercial license and protected by copyright law. Where not otherwise indicated,
5
5
  all CKEditor 5 Collaboration content is authored by CKSource engineers and consists of CKSource-owned intellectual property.
6
6
 
7
- Copyright (c) 2003-2021, CKSource Holding sp. z o.o. All rights reserved.
7
+ Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
8
8
 
9
9
  !-->
10
10