@ckeditor/ckeditor5-revision-history 47.7.2 → 47.7.3-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. package/build/revision-history.js +1 -1
  2. package/dist/index.js +7 -7
  3. package/dist/translations/af.js +1 -1
  4. package/dist/translations/af.umd.js +1 -1
  5. package/dist/translations/ar.js +1 -1
  6. package/dist/translations/ar.umd.js +1 -1
  7. package/dist/translations/ast.js +1 -1
  8. package/dist/translations/ast.umd.js +1 -1
  9. package/dist/translations/az.js +1 -1
  10. package/dist/translations/az.umd.js +1 -1
  11. package/dist/translations/be.js +1 -1
  12. package/dist/translations/be.umd.js +1 -1
  13. package/dist/translations/bg.js +1 -1
  14. package/dist/translations/bg.umd.js +1 -1
  15. package/dist/translations/bn.js +1 -1
  16. package/dist/translations/bn.umd.js +1 -1
  17. package/dist/translations/bs.js +1 -1
  18. package/dist/translations/bs.umd.js +1 -1
  19. package/dist/translations/ca.js +1 -1
  20. package/dist/translations/ca.umd.js +1 -1
  21. package/dist/translations/cs.js +1 -1
  22. package/dist/translations/cs.umd.js +1 -1
  23. package/dist/translations/da.js +1 -1
  24. package/dist/translations/da.umd.js +1 -1
  25. package/dist/translations/de-ch.js +1 -1
  26. package/dist/translations/de-ch.umd.js +1 -1
  27. package/dist/translations/de.js +1 -1
  28. package/dist/translations/de.umd.js +1 -1
  29. package/dist/translations/el.js +1 -1
  30. package/dist/translations/el.umd.js +1 -1
  31. package/dist/translations/en-au.js +1 -1
  32. package/dist/translations/en-au.umd.js +1 -1
  33. package/dist/translations/en-gb.js +1 -1
  34. package/dist/translations/en-gb.umd.js +1 -1
  35. package/dist/translations/en.js +1 -1
  36. package/dist/translations/en.umd.js +1 -1
  37. package/dist/translations/eo.js +1 -1
  38. package/dist/translations/eo.umd.js +1 -1
  39. package/dist/translations/es-co.js +1 -1
  40. package/dist/translations/es-co.umd.js +1 -1
  41. package/dist/translations/es.js +1 -1
  42. package/dist/translations/es.umd.js +1 -1
  43. package/dist/translations/et.js +1 -1
  44. package/dist/translations/et.umd.js +1 -1
  45. package/dist/translations/eu.js +1 -1
  46. package/dist/translations/eu.umd.js +1 -1
  47. package/dist/translations/fa.js +1 -1
  48. package/dist/translations/fa.umd.js +1 -1
  49. package/dist/translations/fi.js +1 -1
  50. package/dist/translations/fi.umd.js +1 -1
  51. package/dist/translations/fr.js +1 -1
  52. package/dist/translations/fr.umd.js +1 -1
  53. package/dist/translations/gl.js +1 -1
  54. package/dist/translations/gl.umd.js +1 -1
  55. package/dist/translations/gu.js +1 -1
  56. package/dist/translations/gu.umd.js +1 -1
  57. package/dist/translations/he.js +1 -1
  58. package/dist/translations/he.umd.js +1 -1
  59. package/dist/translations/hi.js +1 -1
  60. package/dist/translations/hi.umd.js +1 -1
  61. package/dist/translations/hr.js +1 -1
  62. package/dist/translations/hr.umd.js +1 -1
  63. package/dist/translations/hu.js +1 -1
  64. package/dist/translations/hu.umd.js +1 -1
  65. package/dist/translations/hy.js +1 -1
  66. package/dist/translations/hy.umd.js +1 -1
  67. package/dist/translations/id.js +1 -1
  68. package/dist/translations/id.umd.js +1 -1
  69. package/dist/translations/it.js +1 -1
  70. package/dist/translations/it.umd.js +1 -1
  71. package/dist/translations/ja.js +1 -1
  72. package/dist/translations/ja.umd.js +1 -1
  73. package/dist/translations/jv.js +1 -1
  74. package/dist/translations/jv.umd.js +1 -1
  75. package/dist/translations/kk.js +1 -1
  76. package/dist/translations/kk.umd.js +1 -1
  77. package/dist/translations/km.js +1 -1
  78. package/dist/translations/km.umd.js +1 -1
  79. package/dist/translations/kn.js +1 -1
  80. package/dist/translations/kn.umd.js +1 -1
  81. package/dist/translations/ko.js +1 -1
  82. package/dist/translations/ko.umd.js +1 -1
  83. package/dist/translations/ku.js +1 -1
  84. package/dist/translations/ku.umd.js +1 -1
  85. package/dist/translations/lt.js +1 -1
  86. package/dist/translations/lt.umd.js +1 -1
  87. package/dist/translations/lv.js +1 -1
  88. package/dist/translations/lv.umd.js +1 -1
  89. package/dist/translations/ms.js +1 -1
  90. package/dist/translations/ms.umd.js +1 -1
  91. package/dist/translations/nb.js +1 -1
  92. package/dist/translations/nb.umd.js +1 -1
  93. package/dist/translations/ne.js +1 -1
  94. package/dist/translations/ne.umd.js +1 -1
  95. package/dist/translations/nl.js +1 -1
  96. package/dist/translations/nl.umd.js +1 -1
  97. package/dist/translations/no.js +1 -1
  98. package/dist/translations/no.umd.js +1 -1
  99. package/dist/translations/oc.js +1 -1
  100. package/dist/translations/oc.umd.js +1 -1
  101. package/dist/translations/pl.js +1 -1
  102. package/dist/translations/pl.umd.js +1 -1
  103. package/dist/translations/pt-br.js +1 -1
  104. package/dist/translations/pt-br.umd.js +1 -1
  105. package/dist/translations/pt.js +1 -1
  106. package/dist/translations/pt.umd.js +1 -1
  107. package/dist/translations/ro.js +1 -1
  108. package/dist/translations/ro.umd.js +1 -1
  109. package/dist/translations/ru.js +1 -1
  110. package/dist/translations/ru.umd.js +1 -1
  111. package/dist/translations/si.js +1 -1
  112. package/dist/translations/si.umd.js +1 -1
  113. package/dist/translations/sk.js +1 -1
  114. package/dist/translations/sk.umd.js +1 -1
  115. package/dist/translations/sl.js +1 -1
  116. package/dist/translations/sl.umd.js +1 -1
  117. package/dist/translations/sq.js +1 -1
  118. package/dist/translations/sq.umd.js +1 -1
  119. package/dist/translations/sr-latn.js +1 -1
  120. package/dist/translations/sr-latn.umd.js +1 -1
  121. package/dist/translations/sr.js +1 -1
  122. package/dist/translations/sr.umd.js +1 -1
  123. package/dist/translations/sv.js +1 -1
  124. package/dist/translations/sv.umd.js +1 -1
  125. package/dist/translations/th.js +1 -1
  126. package/dist/translations/th.umd.js +1 -1
  127. package/dist/translations/ti.js +1 -1
  128. package/dist/translations/ti.umd.js +1 -1
  129. package/dist/translations/tk.js +1 -1
  130. package/dist/translations/tk.umd.js +1 -1
  131. package/dist/translations/tr.js +1 -1
  132. package/dist/translations/tr.umd.js +1 -1
  133. package/dist/translations/tt.js +1 -1
  134. package/dist/translations/tt.umd.js +1 -1
  135. package/dist/translations/ug.js +1 -1
  136. package/dist/translations/ug.umd.js +1 -1
  137. package/dist/translations/uk.js +1 -1
  138. package/dist/translations/uk.umd.js +1 -1
  139. package/dist/translations/ur.js +1 -1
  140. package/dist/translations/ur.umd.js +1 -1
  141. package/dist/translations/uz.js +1 -1
  142. package/dist/translations/uz.umd.js +1 -1
  143. package/dist/translations/vi.js +1 -1
  144. package/dist/translations/vi.umd.js +1 -1
  145. package/dist/translations/zh-cn.js +1 -1
  146. package/dist/translations/zh-cn.umd.js +1 -1
  147. package/dist/translations/zh.js +1 -1
  148. package/dist/translations/zh.umd.js +1 -1
  149. package/package.json +12 -12
  150. package/src/changeitem.js +2 -2
  151. package/src/editor/revisionviewereditor.js +2 -2
  152. package/src/editor/revisionviewereditorui.js +1 -1
  153. package/src/editor/revisionviewereditoruiview.js +1 -1
  154. package/src/index.js +1 -1
  155. package/src/revision.js +2 -2
  156. package/src/revisiondiff.js +1 -1
  157. package/src/revisionhistory.js +1 -1
  158. package/src/revisionhistoryutils.js +1 -1
  159. package/src/revisionsrepository.js +1 -1
  160. package/src/revisiontracker.js +1 -1
  161. package/src/revisionviewer.js +1 -1
  162. package/src/ui/revision/createrevisionactionsdropdown.js +1 -1
  163. package/src/ui/revision/revisionauthorview.js +1 -1
  164. package/src/ui/revision/revisionnameview.js +1 -1
  165. package/src/ui/revision/revisionview.js +2 -2
  166. package/src/ui/revision/subrevisioncollapserview.js +1 -1
  167. package/src/ui/revision/subrevisionview.js +1 -1
  168. package/src/ui/revision/utils.js +1 -1
  169. package/src/ui/revisionhistory/revisionhistorysaverevisionformview.js +2 -2
  170. package/src/ui/revisionhistory/revisionhistoryui.js +1 -1
  171. package/src/ui/revisionssidebar/revisionssidebar.js +1 -1
  172. package/src/ui/revisionssidebar/revisionssidebarheaderview.js +1 -1
  173. package/src/ui/revisionssidebar/revisionssidebartimeperiodview.js +1 -1
  174. package/src/ui/revisionssidebar/revisionssidebarview.js +1 -1
  175. package/src/ui/revisionssidebar/utils.js +1 -1
  176. package/src/ui/revisionviewer/changedetailsview.js +1 -1
  177. package/src/ui/revisionviewer/changesnavigationview.js +1 -1
  178. package/src/ui/revisionviewer/revisionviewerloadingoverlay.js +1 -1
  179. package/src/ui/revisionviewer/revisionviewerui.js +1 -1
  180. package/src/utils/common-translations.js +1 -1
package/dist/index.js CHANGED
@@ -20,11 +20,11 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{ObservableMixin as _0x8df1b4,uid as _0xefa39,Collection as _0x4fc9f6,logWarning as _0x28dcdd,FocusTracker as _0x1e7ab2,KeystrokeHandler as _0x248400,scrollViewportToShowTarget as _0x5bc707,ResizeObserver as ot,ElementReplacer as it,CKEditorError as _0x2fd89f}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0xadda3d,set as _0x5a4877,unset as _0x281fc9,isEqual as _0x21fc28}from'es-toolkit/compat';import{Plugin as _0xde4b58,PendingActions as _0xa7f6d0,Command as _0x5c344b,ElementApiMixin as _0x1bf367,Editor as _0x5a3aa2}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x405575,getMarkerDomElement as _0xcc7916,ConfirmMixin as _0x635858,sanitizeEditorConfig as _0x3f3d11}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0x1d2e44,ViewAttributeElement as _0x594ba8,ViewEmptyElement as _0x475abc,ViewRawElement as _0x36f97a,ViewUIElement as _0x53adbf,ViewDocumentFragment as _0x263cbd,ViewText as _0x14b755,ViewElement as _0x33d88c,ModelElement as _0x39812c,ModelRange as _0x1474a8,ModelPosition as _0x5273bc,ModelDocumentFragment as _0xa6ead0,ModelText as _0x58927f}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x173b8e,IconChevronUp as _0xf8e6f0,IconChevronDown as _0x532e88,IconUndo as _0x13d588,IconUser as _0x4e060a,IconThreeVerticalDots as _0x14f165}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x2e53b2,View as _0x584d23,submitHandler as _0x4935d8,LabeledFieldView as et,createLabeledInputText as ti,createDropdown as _0x4c9aaf,ListView as _0x277762,ListItemView as _0x9334aa,ButtonView as _0x56b48b,MenuBarMenuView as _0x27668a,MenuBarMenuListView as _0x432d32,MenuBarMenuListItemView as _0x594efc,MenuBarMenuListItemButtonView as _0x426818,ContextualBalloon as _0x5f3958,ToolbarSeparatorView as _0x4be757,IconView as _0x5649b5,addListToDropdown as _0x35149e,UIModel as to,EditorUI as tt,normalizeToolbarConfig as st,BoxedEditorUIView as _0x2af41,StickyPanelView as _0x1e83cf,ToolbarView as _0x8564d3,InlineEditableUIView as te}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x156a48}from'luxon';class I extends/* #__PURE__ -- @preserve */
24
- _0x8df1b4(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x445e39){super(),this['id']=_0x445e39['id']||_0xefa39(),this['creator']=_0x445e39['creator']||null,this['authors']=_0x445e39['authors']||[],this['diffData']=_0x445e39['diffData']||null,this['toVersion']=_0x445e39['toVersion']||0x0,this['fromVersion']=_0x445e39['fromVersion']||0x0,this['set']('name',_0x445e39['name']||''),this['set']('createdAt',_0x445e39['createdAt']||new Date()),this['set']('attributes',_0x445e39['attributes']||{});}['setName'](_0x557063){this['_update']({'name':_0x557063});}['setAttribute'](_0x29c2e9,_0x58903e){const _0x57113b=_0xadda3d(this['attributes']);_0x5a4877(_0x57113b,_0x29c2e9,_0x58903e),this['_update']({'attributes':_0x57113b});}['removeAttribute'](_0x40ccb8){const _0x593580=_0xadda3d(this['attributes']);_0x281fc9(_0x593580,_0x40ccb8),this['_update']({'attributes':_0x593580});}['_update'](_0x2de636,_0x53b07a=!0x1){let _0x4be27b=!0x1;const _0xdf86e2={'id':this['id']},_0x457c3f=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x5da00f of _0x457c3f){const _0x3a1608=_0x2de636[_0x5da00f];void 0x0!==_0x3a1608&&_0x3a1608!==this[_0x5da00f]&&(this[_0x5da00f]=_0x3a1608,_0xdf86e2[_0x5da00f]=_0x3a1608,_0x4be27b=!0x0);}_0x4be27b&&(_0xdf86e2['authors']&&(_0xdf86e2['authorsIds']=_0xdf86e2['authors']['map'](_0xec4aa7=>_0xec4aa7['id']),delete _0xdf86e2['authors']),this['fire']('_update',_0xdf86e2,_0x53b07a));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x48aa05=>_0x48aa05['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class S extends _0xde4b58{['_revisions'];static get['requires'](){return[_0x405575];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0xe93777){super(_0xe93777),this['_revisions']=new _0x4fc9f6();}['afterInit'](){!async function(_0x89b19f){const _0x2a0cd4=_0x274a2d([0x76,0x73,0x6d,0x4c,0x34,0x54,0x50,0x70,0x75,0x52,0x35,0x33,0x4d,0x6c,0x71,0x53,0x6a,0x32,0x56,0x58,0x77,0x48,0x39,0x6f,0x45,0x41,0x4e,0x38,0x46,0x78,0x4a,0x74,0x47,0x55,0x4f,0x64,0x62,0x44,0x43,0x5a,0x30,0x31,0x69,0x68,0x79,0x66,0x6b,0x42,0x51,0x59,0x36,0x61,0x63,0x67,0x7a,0x37,0x72,0x49,0x65,0x57,0x4b,0x6e]),_0x1be935=0xeb829,_0xe7bdd6=0x359e09b0,_0x46907b=0x359983d8^_0xe7bdd6,_0x3d1fa8=window[_0x274a2d([0x44,0x61,0x74,0x65])][_0x274a2d([0x6e,0x6f,0x77])](),_0x40c97d=_0x89b19f[_0x274a2d([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2fb214=new window[(_0x274a2d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4e4379=>{_0x40c97d[_0x274a2d([0x6f,0x6e,0x63,0x65])](_0x274a2d([0x72,0x65,0x61,0x64,0x79]),_0x4e4379);}),_0x57d0e4={[_0x274a2d([0x6b,0x74,0x79])]:_0x274a2d([0x45,0x43]),[_0x274a2d([0x75,0x73,0x65])]:_0x274a2d([0x73,0x69,0x67]),[_0x274a2d([0x63,0x72,0x76])]:_0x274a2d([0x50,0x2d,0x32,0x35,0x36]),[_0x274a2d([0x78])]:_0x274a2d([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x274a2d([0x79])]:_0x274a2d([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x274a2d([0x61,0x6c,0x67])]:_0x274a2d([0x45,0x53,0x32,0x35,0x36])},_0x52579c=_0x40c97d[_0x274a2d([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x274a2d([0x67,0x65,0x74])](_0x274a2d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x4b60db(){let _0xf300b5,_0x374cb9=null,_0x46f256=null;try{if(_0x52579c==_0x274a2d([0x47,0x50,0x4c]))return _0x274a2d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xf300b5=_0x3aeacb(),!_0xf300b5)return _0x274a2d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xf300b5[_0x274a2d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x46f256=_0xac709a(_0xf300b5[_0x274a2d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xf300b5[_0x274a2d([0x6a,0x74,0x69])])),await _0x105df1()?_0x5707be()?_0x325375()?_0x274a2d([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x42fe6d()?(_0xf300b5[_0x274a2d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x274a2d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x374cb9=_0x173f21(_0x274a2d([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x13f770()):_0x274a2d([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x274a2d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x274a2d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x274a2d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x325375(){const _0x54170e=[_0x274a2d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x274a2d([0x74,0x72,0x69,0x61,0x6c])][_0x274a2d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xf300b5[_0x274a2d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x3d1fa8/0x3e8:0xe10*_0x46907b;return _0xf300b5[_0x274a2d([0x65,0x78,0x70])]<_0x54170e;}function _0x5707be(){const _0x2d0593=_0xf300b5[_0x274a2d([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x2d0593)return!0x1;if(_0x2d0593[_0x274a2d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x274a2d([0x2a])))return!0x0;if(_0x2d0593[_0x274a2d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x274a2d([0x52,0x48])))return!0x0;if(_0x2d0593[_0x274a2d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x274a2d([0x52,0x52,0x48]))){if(_0xab4c6c())return!0x0;if(_0x225569()||_0x6e20a5())return!0x0;}return!0x1;}function _0x42fe6d(){const _0x602e4d=_0xf300b5[_0x274a2d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x602e4d||0x0==_0x602e4d[_0x274a2d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x27836c}=new URL(window[_0x274a2d([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x602e4d[_0x274a2d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x27836c))return!0x0;const _0x4f7002=_0x27836c[_0x274a2d([0x73,0x70,0x6c,0x69,0x74])](_0x274a2d([0x2e]));return _0x602e4d[_0x274a2d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3476ba=>_0x3476ba[_0x274a2d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x274a2d([0x2a])))[_0x274a2d([0x6d,0x61,0x70])](_0x1af132=>_0x1af132[_0x274a2d([0x73,0x70,0x6c,0x69,0x74])](_0x274a2d([0x2e])))[_0x274a2d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x116329=>_0x116329[_0x274a2d([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4f7002[_0x274a2d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x274a2d([0x6d,0x61,0x70])](_0x327b65=>Array(_0x4f7002[_0x274a2d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x327b65[_0x274a2d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x274a2d([0x66,0x69,0x6c,0x6c])](_0x327b65[0x0]===_0x274a2d([0x2a])?_0x274a2d([0x2a]):'')[_0x274a2d([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x327b65))[_0x274a2d([0x73,0x6f,0x6d,0x65])](_0x3e5bc1=>_0x4f7002[_0x274a2d([0x65,0x76,0x65,0x72,0x79])]((_0x1f1ab7,_0x517577)=>_0x3e5bc1[_0x517577]===_0x1f1ab7||_0x3e5bc1[_0x517577]===_0x274a2d([0x2a])));}function _0x13f770(){return _0x374cb9&&_0x46f256?new window[(_0x274a2d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2fa9df,_0x11d356)=>{_0x374cb9[_0x274a2d([0x74,0x68,0x65,0x6e])](_0x2fa9df,_0x11d356),_0x46f256[_0x274a2d([0x74,0x68,0x65,0x6e])](_0xd1acb5=>{_0xd1acb5!=_0x274a2d([0x56,0x61,0x6c,0x69,0x64])&&_0x2fa9df(_0xd1acb5);},_0x11d356);}):_0x374cb9||_0x46f256||_0x274a2d([0x56,0x61,0x6c,0x69,0x64]);}}function _0xac709a(_0x6c56bc,_0x36a860){return new window[(_0x274a2d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x52712e=>{if(_0x124306())return _0x52712e(_0x274a2d([0x56,0x61,0x6c,0x69,0x64]));_0x4dc0ed(),_0x40c97d[_0x274a2d([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x274a2d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x530320=!0x1;const _0x1c73ed=_0xefa39();function _0x37eeef(_0x1b08b7){return!!_0x1b08b7&&(typeof _0x1b08b7===_0x274a2d([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1b08b7===_0x274a2d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1b08b7[_0x274a2d([0x74,0x68,0x65,0x6e])]===_0x274a2d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1b08b7[_0x274a2d([0x63,0x61,0x74,0x63,0x68])]===_0x274a2d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1b64bb(_0x14b166){_0x5e3cae(_0x14b166)[_0x274a2d([0x74,0x68,0x65,0x6e])](_0x5d686c=>{if(!_0x5d686c||_0x5d686c[_0x274a2d([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x274a2d([0x6f,0x6b]))return _0x274a2d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x572f9e(_0x5cab68(_0x1c73ed+_0x36a860))!=_0x5d686c[_0x274a2d([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x274a2d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x274a2d([0x56,0x61,0x6c,0x69,0x64]);})[_0x274a2d([0x74,0x68,0x65,0x6e])](_0x4ef0f6=>(_0x2e4dcd(),_0x4ef0f6),()=>{const _0xd8fcea=_0x1a8595();return null==_0xd8fcea?(_0x2e4dcd(),_0x274a2d([0x56,0x61,0x6c,0x69,0x64])):_0x274a2d(_0x3d1fa8-_0xd8fcea>(0x11928db0^_0xe7bdd6)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x274a2d([0x74,0x68,0x65,0x6e])](_0x52712e)[_0x274a2d([0x63,0x61,0x74,0x63,0x68])](()=>{_0x52712e(_0x274a2d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x48282=0x35a8e730^_0xe7bdd6;function _0x2e4dcd(){const _0x1f53ed=_0x274a2d([0x6c,0x6c,0x63,0x74,0x2d])+_0x572f9e(_0x5cab68(_0x6c56bc)),_0x24e72b=_0x166a64(_0x572f9e(window[_0x274a2d([0x4d,0x61,0x74,0x68])][_0x274a2d([0x63,0x65,0x69,0x6c])](_0x3d1fa8/_0x48282)));window[_0x274a2d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x274a2d([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1f53ed,_0x24e72b);}function _0x1a8595(){const _0x36e015=_0x274a2d([0x6c,0x6c,0x63,0x74,0x2d])+_0x572f9e(_0x5cab68(_0x6c56bc)),_0x3777bf=window[_0x274a2d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x274a2d([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x36e015);return _0x3777bf?window[_0x274a2d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x166a64(_0x3777bf),0x10)*_0x48282:null;}function _0x5e3cae(_0x1ae478){return new window[(_0x274a2d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x37e41e,_0x257cc0)=>{_0x1ae478[_0x274a2d([0x74,0x68,0x65,0x6e])](_0x37e41e,_0x257cc0),window[_0x274a2d([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x257cc0,0x359fdd70^_0xe7bdd6);});}}_0x40c97d[_0x274a2d([0x6f,0x6e])](_0x274a2d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x25ef96,_0x32b6a7)=>{if(_0x32b6a7[0x0]!=_0x6c56bc)return _0x52712e(_0x274a2d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x32b6a7[0x1]={..._0x32b6a7[0x1],[_0x274a2d([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1c73ed};},{[_0x274a2d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x274a2d([0x68,0x69,0x67,0x68])}),_0x40c97d[_0x274a2d([0x6f,0x6e])](_0x274a2d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x305a0b=>{_0x37eeef(_0x305a0b[_0x274a2d([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x530320=!0x0,_0x1b64bb(_0x305a0b[_0x274a2d([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x274a2d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x274a2d([0x6c,0x6f,0x77])}),_0x2fb214[_0x274a2d([0x74,0x68,0x65,0x6e])](()=>{_0x530320||_0x52712e(_0x274a2d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x124306(){return _0x40c97d[_0x274a2d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x274a2d([0x76,0x69,0x65,0x77])][_0x274a2d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x274a2d([0x61,0x75,0x74,0x6f]);}function _0x4dc0ed(){_0x40c97d[_0x274a2d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x274a2d([0x76,0x69,0x65,0x77])][_0x274a2d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x274a2d([0x61,0x75,0x74,0x6f]);}}function _0x173f21(_0x4d77a6){const _0x242c57=[new window[(_0x274a2d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x476bef=>setTimeout(_0x476bef,0x3597377c^_0xe7bdd6)),_0x2fb214[_0x274a2d([0x74,0x68,0x65,0x6e])](()=>new window[(_0x274a2d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x145e83=>{const _0x3babe0=0x359e09b7^_0xe7bdd6,_0x27415b=_0x89b19f[_0x274a2d([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x4fc00c(){_0x27415b[_0x274a2d([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x3babe0&&_0x145e83();}_0x4fc00c(),_0x27415b[_0x274a2d([0x6f,0x6e])](_0x274a2d([0x61,0x64,0x64]),_0x4fc00c);})),new window[(_0x274a2d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x484a08=>{function _0x233c77(){for(const _0x3702bf in window)if(window[_0x274a2d([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x274a2d([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x3702bf))&&window[_0x3702bf]==_0x1be935)return _0x484a08();_0x40c97d[_0x274a2d([0x73,0x74,0x61,0x74,0x65])]!=_0x274a2d([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x274a2d([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x233c77,0x359e1a38^_0xe7bdd6);}_0x553444(_0x274a2d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x233c77();})];return window[_0x274a2d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x274a2d([0x72,0x61,0x63,0x65])](_0x242c57)[_0x274a2d([0x74,0x68,0x65,0x6e])](()=>_0x4d77a6);}async function _0x5fb0f8(){if(await _0x2fb214,_0x553444(_0x274a2d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x3cc9fd=_0x89b19f[_0x274a2d([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x1e5270=_0x89b19f[_0x274a2d([0x67,0x65,0x74,0x45,0x61,0x72,0x6c,0x69,0x65,0x72,0x56,0x69,0x73,0x69,0x62,0x6c,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](_0x3cc9fd[_0x274a2d([0x69,0x64])]),_0x38acc9=_0x3af929(_0x274a2d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x38acc9[_0x274a2d([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x3cc9fd['id'],_0x1e5270?_0x1e5270['id']:null,!0x0),_0x38acc9[_0x274a2d([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x274a2d([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x38acc9[_0x274a2d([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x38acc9[_0x274a2d([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x524d64,void(_0x38acc9[_0x274a2d([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x524d64);}if(_0x553444(_0x274a2d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0xeeee43=_0x3af929(_0x274a2d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0xeeee43[_0x274a2d([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x274a2d([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0xeeee43[_0x274a2d([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0xeeee43[_0x274a2d([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x524d64,_0xeeee43[_0x274a2d([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x524d64;}_0x40c97d[_0x274a2d([0x6d,0x6f,0x64,0x65,0x6c])][_0x274a2d([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x524d64,_0x40c97d[_0x274a2d([0x6d,0x6f,0x64,0x65,0x6c])][_0x274a2d([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x524d64,_0x40c97d[_0x274a2d([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x274a2d([0x6d,0x6f,0x64,0x65,0x6c]));}function _0xab4c6c(){return _0x553444(_0x274a2d([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x3af929(_0x274a2d([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x274a2d([0x73,0x74,0x61,0x74,0x65])]==_0x274a2d([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x225569(){return _0x553444(_0x274a2d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x6e20a5(){return _0x553444(_0x274a2d([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x5ca9c1(_0x57a697){const _0x30e666=_0x1b7049();_0x40c97d[_0x30e666]=_0x274a2d([0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x48,0x69,0x73,0x74,0x6f,0x72,0x79,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x57a697,_0x57a697[_0x274a2d([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x274a2d([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x1b7049()]=_0x1be935),_0x57a697!=_0x274a2d([0x56,0x61,0x6c,0x69,0x64])&&_0x5fb0f8();}function _0x1b7049(){const _0x2bdcd7=window[_0x274a2d([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x274a2d([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x274a2d([0x6e,0x6f,0x77])]())[_0x274a2d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x274a2d([0x2e]),'');let _0x51d203=_0x274a2d([0x76]);for(let _0x4454cb=0x0;_0x4454cb<_0x2bdcd7[_0x274a2d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4454cb+=0x2){let _0x1a27e1=window[_0x274a2d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2bdcd7[_0x274a2d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4454cb,_0x4454cb+0x2));_0x1a27e1>=_0x2a0cd4[_0x274a2d([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x1a27e1-=_0x2a0cd4[_0x274a2d([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x51d203+=_0x2a0cd4[_0x1a27e1];}return _0x51d203;}function _0x3aeacb(){const _0x5a87c8=_0x52579c[_0x274a2d([0x73,0x70,0x6c,0x69,0x74])](_0x274a2d([0x2e]));if(0x3!=_0x5a87c8[_0x274a2d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x47c0c1(_0x5a87c8[0x1]);function _0x47c0c1(_0x39c620){const _0x3c87a2=_0x5db9cd(_0x39c620);return _0x3c87a2&&_0x425369()?_0x3c87a2:null;function _0x425369(){const _0x4828a4=_0x3c87a2[_0x274a2d([0x6a,0x74,0x69])],_0x34399e=window[_0x274a2d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4828a4[_0x274a2d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4828a4[_0x274a2d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0xc27958={..._0x3c87a2,[_0x274a2d([0x6a,0x74,0x69])]:_0x4828a4[_0x274a2d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4828a4[_0x274a2d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0xc27958[_0x274a2d([0x76,0x63])],_0x5cab68(_0xc27958)==_0x34399e;}}}async function _0x105df1(){let _0x2baa86=!0x0;try{const _0x5eabc9=_0x52579c[_0x274a2d([0x73,0x70,0x6c,0x69,0x74])](_0x274a2d([0x2e])),[_0x4f3b0e,_0x3e3e9e,_0x433b34]=_0x5eabc9;return _0x34a2c8(_0x4f3b0e),await _0x382697(_0x4f3b0e,_0x3e3e9e,_0x433b34),_0x2baa86;}catch{return!0x1;}function _0x34a2c8(_0x195d0b){const _0x3867bb=_0x5db9cd(_0x195d0b);_0x3867bb&&_0x3867bb[_0x274a2d([0x61,0x6c,0x67])]==_0x274a2d([0x45,0x53,0x32,0x35,0x36])||(_0x2baa86=!0x1);}async function _0x382697(_0xd4425e,_0x1fb35e,_0x20ca30){const _0x1ce6e8=window[_0x274a2d([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x274a2d([0x66,0x72,0x6f,0x6d])](_0x59c287(_0x20ca30),_0x48db4b=>_0x48db4b[_0x274a2d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4171c0=new window[(_0x274a2d([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x274a2d([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0xd4425e+_0x274a2d([0x2e])+_0x1fb35e),_0x486888=window[_0x274a2d([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x274a2d([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x486888)return;const _0xd9b566=await _0x486888[_0x274a2d([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x274a2d([0x6a,0x77,0x6b]),_0x57d0e4,{[_0x274a2d([0x6e,0x61,0x6d,0x65])]:_0x274a2d([0x45,0x43,0x44,0x53,0x41]),[_0x274a2d([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x274a2d([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x274a2d([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x486888[_0x274a2d([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x274a2d([0x6e,0x61,0x6d,0x65])]:_0x274a2d([0x45,0x43,0x44,0x53,0x41]),[_0x274a2d([0x68,0x61,0x73,0x68])]:{[_0x274a2d([0x6e,0x61,0x6d,0x65])]:_0x274a2d([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0xd9b566,_0x1ce6e8,_0x4171c0)||(_0x2baa86=!0x1);}}function _0x5db9cd(_0x3b19f8){return _0x3b19f8[_0x274a2d([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x274a2d([0x65,0x79]))?JSON[_0x274a2d([0x70,0x61,0x72,0x73,0x65])](_0x59c287(_0x3b19f8)):null;}function _0x59c287(_0x2f75dc){return window[_0x274a2d([0x61,0x74,0x6f,0x62])](_0x2f75dc[_0x274a2d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x274a2d([0x2b]))[_0x274a2d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x274a2d([0x2f])));}function _0x5cab68(_0x4dc278){let _0x4d5660=0x1505;function _0x1367e1(_0x507ba5){for(let _0x28c07c=0x0;_0x28c07c<_0x507ba5[_0x274a2d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x28c07c++){const _0xf1e31f=_0x507ba5[_0x274a2d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x28c07c);_0x4d5660=(_0x4d5660<<0x5)+_0x4d5660+_0xf1e31f,_0x4d5660&=_0x4d5660;}}function _0x58eb84(_0x5cf2a3){Array[_0x274a2d([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5cf2a3)?_0x5cf2a3[_0x274a2d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x58eb84):_0x5cf2a3&&typeof _0x5cf2a3==_0x274a2d([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x274a2d([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5cf2a3)[_0x274a2d([0x73,0x6f,0x72,0x74])]()[_0x274a2d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5e86cc,_0x18aa7b])=>{_0x1367e1(_0x5e86cc),_0x58eb84(_0x18aa7b);}):_0x1367e1(window[_0x274a2d([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5cf2a3));}return _0x58eb84(_0x4dc278),_0x4d5660>>>0x0;}function _0x572f9e(_0x31472c){return _0x31472c[_0x274a2d([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x274a2d([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x274a2d([0x30]));}function _0x166a64(_0x3b0632){return _0x3b0632[_0x274a2d([0x73,0x70,0x6c,0x69,0x74])]('')[_0x274a2d([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x274a2d([0x6a,0x6f,0x69,0x6e])]('');}function _0x553444(_0x115a10){return _0x40c97d[_0x274a2d([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x274a2d([0x68,0x61,0x73])](_0x115a10);}function _0x3af929(_0x5178d4){return _0x40c97d[_0x274a2d([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x274a2d([0x67,0x65,0x74])](_0x5178d4);}function _0x524d64(){}function _0x274a2d(_0x15a050){return _0x15a050['map'](_0x1f2744=>String['fromCharCode'](_0x1f2744))['join']('');}_0x5ca9c1(await _0x4b60db());}(this);}['createRevision'](_0x57cd67){const _0x500981=this['editor']['plugins']['get']('Users');return new I({'id':_0x57cd67['id'],'name':_0x57cd67['name'],'creator':_0x57cd67['creatorId']?_0x500981['getUser'](_0x57cd67['creatorId']):null,'diffData':_0x57cd67['diffData']||_0x57cd67['data'],'authors':_0x57cd67['authorsIds']['map'](_0x5a4a60=>_0x500981['getUser'](_0x5a4a60)),'createdAt':new Date(_0x57cd67['createdAt']),'attributes':_0x57cd67['attributes'],'fromVersion':_0x57cd67['fromVersion'],'toVersion':_0x57cd67['toVersion']});}['addRevision'](_0x5c941,_0x3d24c5=0x0){this['_revisions']['add'](_0x5c941,_0x3d24c5);}['getRevision'](_0x479b04){return this['_revisions']['get'](_0x479b04);}['getRevisions'](_0x531792={'toJSON':!0x1}){const _0x1051a6=Array['from'](this['_revisions']);return _0x1051a6['reverse'](),_0x531792['toJSON']?_0x1051a6['map'](_0x1e7c97=>_0x1e7c97['toJSON']()):_0x1051a6;}['getIndex'](_0x3f8986){return this['_revisions']['getIndex'](_0x3f8986);}['getEarlierVisibleRevision'](_0x1938d9){const [,_0x563ca5]=this['getRevisionsIterator'](_0x1938d9,{'direction':'earlier'});return _0x563ca5;}['getLaterVisibleRevision'](_0x59346d){const [,_0x29e489]=this['getRevisionsIterator'](_0x59346d,{'direction':'later'});return _0x29e489;}['getRevisionsInDiff'](_0x16d5f9){const _0x583e8b=[];for(const _0x56690e of this['getRevisionsIterator'](_0x16d5f9['newRevisionId']))if(_0x583e8b['push'](_0x56690e),_0x56690e['id']===_0x16d5f9['oldRevisionId'])break;return _0x583e8b;}*['getRevisionsIterator'](_0x4f2734,{direction:_0x2f9bf7='earlier',filter:_0x35c646=()=>!0x0}={}){const _0x106f50='earlier'===_0x2f9bf7?0x1:-0x1;let _0x12d643=this['_revisions']['get'](_0x4f2734),_0x9ffebc=this['getIndex'](_0x12d643);for(yield _0x12d643;_0x12d643;){if(_0x9ffebc+=_0x106f50,_0x12d643=this['getRevision'](_0x9ffebc),!_0x12d643)return;_0x35c646(_0x12d643)&&(yield _0x12d643);}}}class $ extends _0xde4b58{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x1d2e44,'c'],[_0x594ba8,'a'],[_0x475abc,'e'],[_0x36f97a,'r'],[_0x53adbf,'u']]);['_typeCharToViewClass']=new Map([['c',_0x1d2e44],['a',_0x594ba8],['e',_0x475abc],['r',_0x36f97a],['u',_0x53adbf]]);async['loadRevisionData'](_0xc8bcf1,_0x2e5a87){if(_0xc8bcf1['diffData']||!_0x2e5a87)return;const _0x323034=this['editor']['config']['get']('collaboration.channelId'),_0x1e846d=await _0x2e5a87['getRevision']({'channelId':_0x323034,'revisionId':_0xc8bcf1['id']});_0xc8bcf1['diffData']=_0x1e846d['diffData'];}['getRevisionDocumentData'](_0x5f2ebb){const _0x4f9af8={};for(const _0x31747c in _0x5f2ebb['diffData']){if(_0x5f2ebb['diffData'][_0x31747c]['attachChange']&&!_0x5f2ebb['diffData'][_0x31747c]['attachChange']['isAttached'])continue;const _0x11c6dc=this['_removeRevisionMarkers'](JSON['parse'](_0x5f2ebb['diffData'][_0x31747c]['insertions'])),_0x1ce308=this['editor']['editing']['view']['document'],_0xcb3da6=new _0x263cbd(_0x1ce308,_0x11c6dc['map'](_0x167b4f=>this['_getViewFromDiffObj'](_0x167b4f,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x4f9af8[_0x31747c]=this['editor']['data']['processor']['toData'](_0xcb3da6),this['editor']['data']['processor']['useFillerType']('default');}return _0x4f9af8;}['getRevisionRootsAttributes'](_0x19b2c0){const _0x4e5fec={};for(const _0x21c072 in _0x19b2c0['diffData'])_0x19b2c0['diffData'][_0x21c072]['attachChange']&&!_0x19b2c0['diffData'][_0x21c072]['attachChange']['isAttached']||(_0x4e5fec[_0x21c072]=_0x19b2c0['diffData'][_0x21c072]['attributesAfter']||{});return _0x4e5fec;}['_getTypeCharForViewElement'](_0x14a8a9){return this['_viewClassToTypeChar']['get'](_0x14a8a9['constructor']);}['_getViewFromDiffObj'](_0x4f4089,_0x3354ff){const _0x24a836=this['editor']['editing']['view']['document'];if('string'==typeof _0x4f4089)return new _0x14b755(_0x24a836,_0x4f4089);{let _0x5bb1ee,_0x48732a;_0x48732a='u'==_0x4f4089['type']||'r'==_0x4f4089['type']?[]:_0x4f4089['children']['map'](_0x4e2217=>this['_getViewFromDiffObj'](_0x4e2217,_0x3354ff));const _0x285396=this['_typeCharToViewClass']['get'](_0x4f4089['type'])||_0x33d88c,_0x5e3290=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x5bb1ee=new _0x285396(_0x24a836,_0x4f4089['name'],_0x4f4089['attributes'],_0x48732a),'u'==_0x4f4089['type']&&_0x4f4089['children'][0x0]){const _0x40252a=_0x4f4089['children'][0x0];if(_0x5bb1ee['render']=function(_0x6d199a){const _0x17e8ac=_0x6d199a['createElement']('div');return _0x17e8ac['innerHTML']=_0x40252a,_0x17e8ac['childNodes'][0x0];},_0x3354ff){const _0x483f2a=new _0x263cbd(_0x24a836);_0x483f2a['_appendChild'](_0x5bb1ee);const _0xfb0061=Array['from'](_0x5e3290['viewChildrenToDom'](_0x483f2a,{'bind':!0x1})),_0x2c95d3=_0x5e3290['domDocument']['createElement']('div');_0x2c95d3['append'](..._0xfb0061),_0x5bb1ee=Array['from'](_0x5e3290['domChildrenToView'](_0x2c95d3))[0x0];}}else{if('r'==_0x4f4089['type']&&_0x4f4089['children'][0x0]){const _0x10cfa2=_0x4f4089['children'][0x0];if(_0x5bb1ee['render']=function(_0x5555df){_0x5555df['innerHTML']=_0x10cfa2;},_0x3354ff){const _0x3a3470=new _0x263cbd(_0x24a836);_0x3a3470['_appendChild'](_0x5bb1ee);const _0x2afba3=Array['from'](_0x5e3290['viewChildrenToDom'](_0x3a3470,{'bind':!0x1})),_0x1ee551=_0x5e3290['domDocument']['createElement']('div');_0x1ee551['append'](..._0x2afba3);const _0x29ccf7=Array['from'](_0x5e3290['domChildrenToView'](_0x1ee551));_0x29ccf7['length']>0x1?_0x5bb1ee['_appendChild'](_0x29ccf7):_0x5bb1ee=_0x29ccf7[0x0];}}}if(_0x4f4089['customProperties']){for(const [_0x5100ac,_0x379d02]of _0x4f4089['customProperties'])_0x5bb1ee['_setCustomProperty'](_0x5100ac,_0x379d02);}const _0x3b8bcc=void 0x0===_0x4f4089['fillerOffset']?null:_0x4f4089['fillerOffset'];return null!==_0x3b8bcc&&(_0x5bb1ee['getFillerOffset']=()=>_0x3b8bcc),_0x5bb1ee;}}['_makeModelFromViewString'](_0x56d67b){const _0x2d1239=JSON['parse'](_0x56d67b),_0x41f91e=this['editor']['editing']['view']['document'],_0x5e2264=new _0x263cbd(_0x41f91e,_0x2d1239['map'](_0x3e0311=>this['_getViewFromDiffObj'](_0x3e0311,!0x0)));return this['editor']['data']['toModel'](_0x5e2264);}['_removeRevisionMarkers'](_0x20cbf2){return(_0x20cbf2=_0x20cbf2['filter'](_0x186dcd=>!_0x186dcd['name']||'revision-start'!==_0x186dcd['name']&&'revision-end'!==_0x186dcd['name']))['forEach'](_0x369be3=>{'string'!=typeof _0x369be3&&(_0x369be3['children']=this['_removeRevisionMarkers'](_0x369be3['children']),_0x369be3['attributes']=_0x369be3['attributes']['filter'](_0x230eca=>!_0x230eca[0x0]['startsWith']('data-revision-')));}),_0x20cbf2;}}function m(_0x451335,_0x28824e,_0x4eb934){const t=_0x451335['t'];switch(_0x28824e){case'Revision\x20history':return t('Revision\x20history');case'Open\x20revision\x20history':return t('Open\x20revision\x20history');case'Restored':return t('Restored');case'Empty\x20document':return t('Empty\x20document');case'Initial\x20revision':return t('Initial\x20revision');case'Suggested\x20by':return t('Suggested\x20by');case'Added\x20by':return t('Added\x20by');case'Removed\x20by':return t('Removed\x20by');case'Show\x20more\x20items':return t('Show\x20more\x20items');case'Compare\x20against\x20selected':return t('Compare\x20against\x20selected');case'Name\x20this\x20revision':return t('Name\x20this\x20revision');case'Restore\x20this\x20revision':return t('Restore\x20this\x20revision');case'Back\x20to\x20editing':return t('Back\x20to\x20editing');case'Loading...':return t('Loading...');case'No\x20changes':return t('No\x20changes');case'NUMBER_OF_CHANGES':return t({'string':'%0\x20change','plural':'%0\x20changes','id':'NUMBER_OF_CHANGES'},_0x4eb934);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x4eb934);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}class h extends _0xde4b58{['licenseKey'];['_licenseKeyCheckInterval'];['currentRevision']=null;['repository'];['adapter']=null;['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_utils'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x405575,S,$,_0xa7f6d0];}constructor(_0x27a8ae){super(_0x27a8ae),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new RevisionDataBuilder(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x36e07d=_0xefa39();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x36e07d},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}['init'](){this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x5abac9=this['repository']['getRevision'](0x0),_0x53e5bd=_0x5abac9&&null===_0x5abac9['creator']?_0x5abac9:null;if(this['_continueCurrentRevision']=!!_0x53e5bd&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x4f8632=this['_source']['getCurrentRevisionId'](),_0x311c0b=this['repository']['getRevision'](_0x4f8632);if(_0x311c0b)this['_startingVersion']=_0x311c0b['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x4cee2e=this['_source']['history']['_operations']['find'](_0x17f2cc=>!_0x17f2cc['_isInit']),_0x141b09=_0x4cee2e?_0x4cee2e['baseVersion']:this['_source']['history']['version'];_0x5abac9?(_0x5abac9['toVersion']<_0x141b09&&_0x5abac9['_update']({'toVersion':_0x141b09}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x53e5bd['id'],this['_startingVersion']=_0x53e5bd['fromVersion']):(this['_startingVersion']=_0x5abac9['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x141b09,this['_continueCurrentRevision']=!0x1);}}else _0x53e5bd&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x53e5bd['toVersion'],this['editor']['model']['document']['history']['version']),_0x53e5bd['fromVersion']===_0x53e5bd['toVersion']?(0x0!==_0x53e5bd['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x53e5bd['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x53e5bd['id'],this['_startingVersion']=_0x53e5bd['fromVersion'])),this['_continueCurrentRevision']||(this['_startingVersion']=this['editor']['model']['document']['version']);this['_revisionDataBuilder']['init'](this['_source']['history']),this['_createInitialRevision'](this['_startingVersion']),this['_createCurrentRevision'](this['_startingVersion']),this['adapter']&&this['sendBufferedUpdates']();}),this['bind']('isReady')['to'](this,'_isPendingUpdate',_0x4d4ba3=>!_0x4d4ba3),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x4d774a=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4cde37;for(const _0x47fa3f in _0x4d774a){const _0x10a5a1=_0x47fa3f,_0x5252d0=_0x4d774a[_0x10a5a1];if('revisionHistoryLicenseKeyValid'==_0x5252d0||'revisionHistoryLicenseKeyInvalid'==_0x5252d0||'revisionHistoryLicenseKeyExpired'==_0x5252d0||'revisionHistoryLicenseKeyDomainLimit'==_0x5252d0||'revisionHistoryLicenseKeyNotAllowed'==_0x5252d0||'revisionHistoryLicenseKeyEvaluationLimit'==_0x5252d0||'revisionHistoryLicenseKeyUsageLimit'==_0x5252d0){delete _0x4d774a[_0x10a5a1],_0x4cde37=_0x5252d0,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x4cde37&&_0x4d774a['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x4cde37&&_0x4d774a['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x4cde37&&_0x4d774a['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x4cde37&&_0x4d774a['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x4cde37&&_0x4d774a['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x4cde37&&_0x4d774a['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x243892=this['repository']['getRevision'](0x0),_0x3640d7=await this['getRevisionDocumentData'](_0x243892),_0xed130e=await this['getRevisionRootsAttributes'](_0x243892);this['_replaceEditorDataWithRevisionData'](_0x3640d7,_0xed130e);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x339994){this['_source']=_0x339994;}async['update'](){const _0x1ea8e5=await this['_source']['getLatestVersion']();if(_0x1ea8e5>this['currentRevision']['toVersion']){await this['_loadState']();const _0x15a71e=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x1ea8e5});_0x15a71e['authors']=_0x15a71e['authorsIds']['map'](_0x56c8ae=>this['editor']['plugins']['get']('Users')['getUser'](_0x56c8ae)),this['currentRevision']['_update'](_0x15a71e);}}async['saveRevision'](_0x4ef420={},_0x559d42=null){const _0x4c5413=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x559d42>this['currentRevision']['toVersion']&&(_0x559d42=null),null===_0x559d42&&(_0x559d42=await this['_source']['getLatestVersion']());const _0x528fef=this['_getFromVersion'](_0x559d42),_0x29ce71=this['buildRevisionData']({'from':_0x528fef,'to':_0x559d42});if(this['currentRevision']['toVersion']<_0x559d42){const _0x521b37=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x559d42,'to':_0x559d42});_0x521b37['authors']=[],_0x521b37['authorsIds']=[],_0x521b37['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x521b37,!0x0),delete _0x521b37['authors'],_0x4c5413['push'](_0x521b37);}_0x4ef420['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x4ef420['name']=_0x4ef420['name']||null,_0x4ef420['id']=_0x4ef420['id']||_0xefa39(),_0x4ef420={..._0x4ef420,..._0x29ce71};const _0x320bcc=this['addRevisionData'](_0x4ef420);_0x4c5413['push'](_0x4ef420);const _0x224583=this['repository']['getIndex'](_0x320bcc);if(0x0!==_0x224583){const _0x4cae7c=this['repository']['getRevision'](_0x224583-0x1);if(_0x4cae7c['fromVersion']!==_0x559d42){const _0x362d9c=this['_revisionDataBuilder']['getData'](_0x559d42,_0x4cae7c['toVersion']),_0x145b35={'id':_0x4cae7c['id'],'diffData':_0x362d9c['diffData'],'authorsIds':_0x362d9c['authorsIds'],'authors':_0x362d9c['authorsIds']['map'](_0x467c03=>this['editor']['plugins']['get']('Users')['getUser'](_0x467c03)),'fromVersion':_0x559d42};_0x4cae7c===this['currentRevision']&&(_0x145b35['createdAt']=new Date(_0x4ef420['createdAt']['getTime']()+0xa)),_0x4cae7c['_update'](_0x145b35,!0x0),delete _0x145b35['authors'],_0x4c5413['push'](_0x145b35);}}if(this['adapter']){for(const _0x81e4b8 of _0x4c5413)this['_bufferUpdate'](_0x81e4b8['id'],_0x81e4b8,!0x0);this['sendBufferedUpdates']();}return _0x320bcc;}['addRevisionData'](_0x4124b0){const _0x5e27be=this['repository']['createRevision'](_0x4124b0);return this['adapter']&&_0x5e27be['on']('_update',(_0x59c2fd,_0xdc164e,_0x2ef9fa)=>{_0x2ef9fa||(this['_bufferUpdate'](_0xdc164e['id'],_0xdc164e,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x5e27be,this['_findInsertionIndex'](_0x5e27be)),_0x5e27be;}async['getRevisionDocumentData'](_0x57ebc1){return await this['_utils']['loadRevisionData'](_0x57ebc1,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x57ebc1);}async['getRevisionRootsAttributes'](_0x16fe12){return await this['_utils']['loadRevisionData'](_0x16fe12,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x16fe12);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x20f00f=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x5e47c5=0x0;_0x5e47c5<_0x20f00f['length'];_0x5e47c5++){const _0x15727f=_0x20f00f[_0x5e47c5];let _0x33949f=!0x1;for(const _0x2ec992 of Object['keys'](_0x15727f))void 0x0===_0x15727f[_0x2ec992]?delete _0x15727f[_0x2ec992]:'id'!==_0x2ec992&&(_0x33949f=!0x0);_0x33949f||(_0x20f00f[_0x5e47c5]=null);}if(_0x20f00f=_0x20f00f['filter'](_0x28cd8b=>null!==_0x28cd8b),!_0x20f00f['length'])return;for(let _0x5976c4=0x0;_0x5976c4<_0x20f00f['length'];_0x5976c4++){const _0x380fe1=_0x20f00f[_0x5976c4];void 0x0!==_0x380fe1['fromVersion']&&void 0x0===_0x380fe1['toVersion']&&(_0x380fe1['toVersion']=this['repository']['getRevision'](_0x380fe1['id'])['toVersion']),void 0x0!==_0x380fe1['toVersion']&&void 0x0===_0x380fe1['fromVersion']&&(_0x380fe1['fromVersion']=this['repository']['getRevision'](_0x380fe1['id'])['fromVersion']);}const _0x1d1034=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x20f00f,_0x1d1034)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x52d56f=>{if(_0x52d56f){for(const _0x4bd7b1 of _0x52d56f)this['setRevisionData']({'id':_0x4bd7b1['id'],'createdAt':_0x4bd7b1['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x4ee428=null,from:_0x3eb486=null,to:_0x40c57b=null}){_0x3eb486=null!==_0x3eb486?_0x3eb486:_0x4ee428['fromVersion'],_0x40c57b=null!==_0x40c57b?_0x40c57b:_0x4ee428['toVersion'];const _0x13ad2e=this['_revisionDataBuilder']['getData'](_0x3eb486,_0x40c57b),_0x2f2bd6={'diffData':_0x13ad2e['diffData'],'authorsIds':_0x13ad2e['authorsIds'],'fromVersion':_0x3eb486,'toVersion':_0x40c57b};if(!_0x4ee428||_0x40c57b!==_0x4ee428['toVersion']){const _0x2801fe=_0x40c57b-0x1,_0x2e135a=this['_source']['history']['getOperation'](_0x2801fe);_0x2f2bd6['createdAt']=_0x2e135a&&_0x2e135a['createdAt']||new Date();}if(this['_loadedStateData']&&_0x3eb486===this['_loadedStateData']['fromVersion']){for(const _0xc8de72 of this['_loadedStateData']['authors'])_0x2f2bd6['authorsIds']['includes'](_0xc8de72['id'])||_0x2f2bd6['authorsIds']['push'](_0xc8de72['id']);}return _0x2f2bd6;}['_bufferUpdate'](_0x17aebd,_0x401c7e,_0x2663f6){if(this['_bufferedUpdates']['has'](_0x17aebd)){const _0x3fedc7=this['_bufferedUpdates']['get'](_0x17aebd);_0x401c7e=_0x2663f6?{..._0x3fedc7,..._0x401c7e}:{..._0x401c7e,..._0x3fedc7};}this['_bufferedUpdates']['set'](_0x17aebd,_0x401c7e);}['setRevisionData'](_0x4c8e29){const _0x3f0a1e=this['repository']['getRevision'](_0x4c8e29['id']);if(_0x4c8e29['createdAt']&&(_0x4c8e29['createdAt']=new Date(_0x4c8e29['createdAt'])),_0x4c8e29['authorsIds']){const _0x456c77=this['editor']['plugins']['get']('Users');_0x4c8e29['authors']=_0x4c8e29['authorsIds']['map'](_0x311aa1=>_0x456c77['getUser'](_0x311aa1));}_0x3f0a1e['_update'](_0x4c8e29,!0x0);}['_createInitialRevision'](_0x26e75f){const _0x3c5af4=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x3c5af4)this['_initialRevisionId']=_0x3c5af4['id'];else{const _0x1e1555=!this['editor']['model']['document']['roots']['find'](_0x31260a=>this['editor']['model']['hasContent'](_0x31260a)),_0x11e933=this['editor']['plugins']['get']('Users')['me']['id'],_0x2faf52=m(this['editor']['locale'],_0x1e1555?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x26e75f,'to':_0x26e75f,'id':this['_initialRevisionId'],'name':_0x2faf52,'creatorId':_0x11e933});}}['_createCurrentRevision'](_0x2052cc){const _0xa54ff0=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0xa54ff0),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x2052cc,'to':_0x2052cc,'id':_0xa54ff0,'name':'','creatorId':null}));}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_utils']['loadRevisionData'](this['currentRevision'],this['adapter']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}['_replaceEditorDataWithRevisionData'](_0xbf5154,_0x5d83bb){let _0x2f84e5=this['editor']['config']['get']('initialData'),_0x58d250=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x2f84e5){_0x2f84e5={};for(const _0x1802b6 of this['editor']['model']['document']['getRootNames']())_0x2f84e5[_0x1802b6]='';}if('string'==typeof _0x2f84e5&&(_0x2f84e5={'main':_0x2f84e5}),void 0x0===_0x58d250){_0x58d250={};for(const _0x48543a of this['editor']['model']['document']['getRootNames']())_0x58d250[_0x48543a]={};}let _0x4f5a66=!0x1;const _0xde5694=Object['keys'](_0x2f84e5),_0x233ec4=Object['keys'](_0xbf5154);for(const _0x117c1f of _0xde5694){if(_0x2f84e5[_0x117c1f]!==_0xbf5154[_0x117c1f]&&''!==_0x2f84e5[_0x117c1f]['trim']()){_0x4f5a66=!0x0;break;}if(!_0x21fc28(_0x58d250[_0x117c1f],_0x5d83bb[_0x117c1f])&&Object['keys'](_0x58d250[_0x117c1f])['length']>0x0){_0x4f5a66=!0x0;break;}}_0x4f5a66||(_0x4f5a66=_0x233ec4['some'](_0x111577=>!this['editor']['model']['document']['getRoot'](_0x111577))),_0x4f5a66&&_0x28dcdd('editor-initial-data-replaced-with-revision-data',{'editorData':_0x2f84e5,'editorRootsAttributes':_0x58d250,'revisionData':_0xbf5154,'revisionRootsAttributes':_0x5d83bb}),this['editor']['config']['set']('initialData',_0xbf5154),this['editor']['config']['set']('rootsAttributes',_0x5d83bb);}['_addPendingAction'](){if(!this['_pendingAction']){const _0xc7726e=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0xc7726e['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x1603ca){const _0x40c754=this['repository']['getRevisions']();_0x40c754['reverse']();let _0x4c4ab4=0x0;for(;_0x4c4ab4<_0x40c754['length'];){const _0x5e6c9c=_0x40c754[_0x4c4ab4];if(_0x5e6c9c===this['currentRevision']){_0x4c4ab4++;continue;}if(_0x5e6c9c['id']===this['_initialRevisionId'])break;const _0x291a15=_0x1603ca['toVersion']-_0x5e6c9c['toVersion']||_0x1603ca['fromVersion']-_0x5e6c9c['fromVersion'];if(_0x291a15>0x0)break;if(_0x291a15<0x0)_0x4c4ab4++;else{if(!_0x1603ca['creator']&&_0x5e6c9c['creator'])break;if(_0x5e6c9c['creator']||!_0x1603ca['creator']){if(_0x1603ca['createdAt']>_0x5e6c9c['createdAt'])break;_0x4c4ab4++;}else _0x4c4ab4++;}}return _0x4c4ab4;}['_getFromVersion'](_0x354fad){const _0x9df09d=this['repository']['getRevisions']();_0x9df09d['reverse'](),_0x9df09d['shift']();const _0x4469c1=_0x9df09d['find'](_0x425ef3=>_0x425ef3['toVersion']<=_0x354fad)['toVersion'];return _0x4469c1<this['_startingVersion']?this['_startingVersion']:_0x4469c1;}['_makeRevision']({name:_0x48cb2b,from:_0x176bba,to:_0x43a149,creatorId:_0x2ae5bd,id:_0x167bed}){const _0x1fc7ff=this['buildRevisionData']({'from':_0x176bba,'to':_0x43a149});_0x1fc7ff['name']=_0x48cb2b,_0x1fc7ff['creatorId']=_0x2ae5bd,_0x1fc7ff['id']=_0x167bed;const _0x2b2f9e=this['addRevisionData'](_0x1fc7ff);return this['adapter']&&this['_bufferUpdate'](_0x1fc7ff['id'],_0x1fc7ff,!0x0),_0x2b2f9e;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class RevisionDataBuilder{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x26ea60){this['editor']=_0x26ea60,this['_savedMetaData']=new Map(),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_markers']=new Map(),this['_diffRoots']=new Map(),this['_diffRootsAttributes']=new Map(),this['_baseRoots']=new Map(),this['_baseRootsAttributes']=new Map(),this['_idsRoots']=new Map(),this['_baseIdsRoots']=new Map(),this['_touched']=new Map(),this['_touchedMarkers']=new Map(),this['_touchedRoots']=new Map(),this['_revisionId']=0x1;}['init'](_0x4f1123){this['source']=_0x4f1123;const _0x1643b9=new Map(),_0x16c1a3=new Map(),_0x3229d5=this['editor']['model']['document']['roots']['map'](_0x1a79e7=>_0x1a79e7['rootName']);for(const _0x479c77 of _0x3229d5){const _0x53bb12=this['editor']['model']['document']['getRoot'](_0x479c77),_0x9fbe40=x(_0x53bb12);_0x1643b9['set'](_0x479c77,_0x9fbe40),_0x16c1a3['set'](_0x479c77,Object['fromEntries'](_0x53bb12['getAttributes']()));}const _0x19f898=Array['from'](this['editor']['model']['markers'])['map'](_0x4f7772=>[_0x4f7772['name'],_0x4f7772['getRange']()]),_0x986bfb=this['source']['version'];this['_saveMetaData'](_0x986bfb,_0x1643b9,_0x19f898,_0x16c1a3),this['_startingRevisionId']=this['_revisionId'];const _0x141668=new Map(),_0x5c90e5=new Map();for(const _0x386cdb of _0x3229d5){const _0x571cab=K(_0x386cdb);_0x141668['set'](_0x386cdb,_0x571cab),_0x5c90e5['set'](_0x386cdb,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x141668,[],_0x5c90e5);}['getData'](_0x482aaa,_0x185ac4){if(this['_lastFrom']===_0x482aaa&&this['_lastTo']<=_0x185ac4)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x185ac4,!0x0);else{if(!this['_savedMetaData']['has'](_0x482aaa)){const _0xf218b2=this['_getPreviousFrom'](_0x482aaa);this['_calculateMetaData'](_0xf218b2,_0x482aaa,!0x1);}this['_calculateMetaData'](_0x482aaa,_0x185ac4,!0x0);}return this['_lastFrom']=_0x482aaa,this['_lastTo']=_0x185ac4,this['_getState']();}['loadState'](_0x3b91ff){if(!this['_savedMetaData']['has'](_0x3b91ff['fromVersion'])){const _0x2ec08f=this['_getPreviousFrom'](_0x3b91ff['fromVersion']);this['_calculateMetaData'](_0x2ec08f,_0x3b91ff['fromVersion'],!0x1);}this['_calculateMetaData'](_0x3b91ff['fromVersion'],_0x3b91ff['toVersion'],!0x1);const _0x88e899=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x3b91ff['fromVersion'],this['_lastTo']=_0x3b91ff['toVersion'];for(const _0x45139d in _0x3b91ff['diffData']){const _0x157302=_0x3b91ff['diffData'][_0x45139d]['attachChange'],_0x255a24=_0xadda3d(_0x3b91ff['diffData'][_0x45139d]['attributesBefore'])||{},_0xe6fc24=_0x88e899['_makeModelFromViewString'](_0x3b91ff['diffData'][_0x45139d]['deletions']);_0xe6fc24['rootName']=_0x45139d,_0xe6fc24['_isAttached']=!_0x157302||!_0x157302['isAttached'],_0xe6fc24['isAttached']=()=>_0xe6fc24['_isAttached'],this['_baseRoots']['set'](_0x45139d,_0xe6fc24),this['_baseRootsAttributes']['set'](_0x45139d,_0x255a24),_0x157302&&this['_touchedRoots']['set'](_0x45139d,_0x157302);const _0x340d0e=this['_makeIdsRoot'](_0xe6fc24);this['_baseIdsRoots']['set'](_0x45139d,_0x340d0e);for(const [_0x2733f4,_0x45c48d]of _0xe6fc24['markers']){if(!_0x2733f4['startsWith']('revision:'))continue;const _0x40e2b9=_0x2733f4['split'](':')[0x2];for(const _0x48cc9a of _0x45c48d['getWalker']({'singleCharacters':!0x0})){const _0x52c477=this['_getVidAttributeName'](_0x48cc9a),_0x3c490c='elementEnd'==_0x48cc9a['type']?_0x48cc9a['previousPosition']['path']['slice'](0x0,-0x1):_0x48cc9a['previousPosition']['path'],_0x5b6962=_0x340d0e['getNodeByPath'](_0x3c490c)['getAttribute'](_0x52c477);this['_touched']['set'](_0x5b6962,{'userId':_0x40e2b9});}_0xe6fc24['markers']['delete'](_0x2733f4);}}this['_startingRevisionId']=this['_revisionId'];const _0x523abb=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x393daf=>!this['_touched']['has'](_0x393daf));let _0x591b86=0x0;const _0x1112db=new Map();for(const _0x4877f7 in _0x3b91ff['diffData']){const _0x5390c5=_0x3b91ff['diffData'][_0x4877f7]['attachChange'],_0x5ac59f=_0xadda3d(_0x3b91ff['diffData'][_0x4877f7]['attributesAfter'])||{},_0x4c85c9=_0x88e899['_makeModelFromViewString'](_0x3b91ff['diffData'][_0x4877f7]['insertions']);_0x4c85c9['rootName']=_0x4877f7,_0x4c85c9['_isAttached']=!_0x5390c5||_0x5390c5['isAttached'],_0x4c85c9['isAttached']=()=>_0x4c85c9['_isAttached'],this['_diffRoots']['set'](_0x4877f7,_0x4c85c9),this['_diffRootsAttributes']['set'](_0x4877f7,_0x5ac59f);const _0x284541=this['_makeIdsRoot'](_0x4c85c9,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x4877f7,_0x284541),_0x1112db['set'](_0x4877f7,_0x4c85c9['isAttached']()?_0x5ac59f:{});for(const [_0x5b613a,_0x54912a]of _0x4c85c9['markers']){if(!_0x5b613a['startsWith']('revision:'))continue;const _0x5d4903=_0x5b613a['split'](':')[0x2];for(const _0xae3a65 of _0x54912a['getWalker']({'singleCharacters':!0x0})){const _0x2a6919=this['_getVidAttributeName'](_0xae3a65),_0x37c532=this['_revisionId']++,_0x417639='elementEnd'==_0xae3a65['type']?_0xae3a65['previousPosition']['path']['slice'](0x0,-0x1):_0xae3a65['previousPosition']['path'];_0x284541['getNodeByPath'](_0x417639)['_setAttribute'](_0x2a6919,_0x37c532),this['_touched']['set'](_0x37c532,{'userId':_0x5d4903});}_0x4c85c9['markers']['delete'](_0x5b613a);}for(const _0x278ae0 of this['editor']['model']['createRangeIn'](_0x4c85c9)['getWalker']({'singleCharacters':!0x0})){const _0x55ab07=this['_getVidAttributeName'](_0x278ae0),_0xac09bf='elementEnd'==_0x278ae0['type']?_0x278ae0['previousPosition']['path']['slice'](0x0,-0x1):_0x278ae0['previousPosition']['path'],_0x474aef=_0x284541['getNodeByPath'](_0xac09bf);_0x474aef['getAttribute'](_0x55ab07)>0x0||_0x474aef['_setAttribute'](_0x55ab07,_0x523abb[_0x591b86++]);}for(const [_0x358366,_0x1fd9de]of _0x4c85c9['markers'])_0x358366['startsWith']('revision:')||this['_markers']['set'](_0x358366,_0x1fd9de);}const {roots:_0x499f94}=this['_savedMetaData']['get'](_0x3b91ff['fromVersion']),{roots:_0x193a02}=this['_savedMetaData']['get'](_0x3b91ff['toVersion']),_0x535749=x(_0x499f94['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x535749),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x535749,Number['NEGATIVE_INFINITY']));const _0x51b3e3=x(_0x193a02['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x51b3e3),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x51b3e3));const _0xacd9a0=Array['from'](this['_diffRoots'])['map'](([_0x357228,_0x656044])=>[_0x357228,x(_0x656044)]);this['_saveMetaData'](this['_lastTo'],_0xacd9a0,this['_markers'],_0x1112db);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x1cb157,_0x15052c,_0x495e02,_0x1a3e5d){const _0x226027=new Map(_0x15052c),_0x1146a4=new Map(_0xadda3d(_0x1a3e5d)),_0xb0241c=new Map();for(const [_0x423568,_0x220d9f]of _0x495e02)_0xb0241c['set'](_0x423568,{'start':_0x220d9f['start']['clone'](),'end':_0x220d9f['end']['clone'](),'rootName':_0x220d9f['root']['rootName']});this['_savedMetaData']['set'](_0x1cb157,{'roots':_0x226027,'markers':_0xb0241c,'rootsAttributes':_0x1146a4});}['_removeMetaData'](_0x3fc7d7){this['_savedMetaData']['delete'](_0x3fc7d7);}['_reset'](){this['_touched']['clear'](),this['_touchedMarkers']['clear'](),this['_touchedRoots']['clear'](),this['_diffRoots']['clear'](),this['_diffRootsAttributes']['clear'](),this['_baseRoots']['clear'](),this['_baseRootsAttributes']['clear'](),this['_idsRoots']['clear'](),this['_baseIdsRoots']['clear'](),this['_markers']['clear'](),this['_revisionId']=0x1,this['_startingRevisionId']=this['_revisionId'];}['_makeIdsRoot'](_0x237755,_0x3cd596=null){let _0x5721fa=null;_0x237755['is']('documentFragment')||(_0x5721fa=new _0x39812c(_0x237755['name'],{'vid_start':null===_0x3cd596?this['_revisionId']++:_0x3cd596++}));const _0x28c8ec=[];for(const _0x3dab47 of _0x237755['getChildren']())if(_0x3dab47['is']('element')){_0x28c8ec['push'](this['_makeIdsRoot'](_0x3dab47,_0x3cd596));const _0x3ad0ae=_0x28c8ec[_0x28c8ec['length']-0x1];null!==_0x3cd596&&(_0x3cd596=_0x3ad0ae['is']('element','$text')?_0x3ad0ae['getAttribute']('vid')+0x1:_0x3ad0ae['getAttribute']('vid_end')+0x1);}else{for(let _0x197f07=0x0;_0x197f07<_0x3dab47['offsetSize'];_0x197f07++)_0x28c8ec['push'](new _0x39812c('$text',{'vid':null===_0x3cd596?this['_revisionId']++:_0x3cd596++}));}if(_0x237755['is']('documentFragment')){const _0x992e82=K(_0x237755['rootName']);return _0x992e82['_insertChild'](0x0,_0x28c8ec),_0x992e82;}return _0x5721fa['_setAttribute']('vid_end',null===_0x3cd596?this['_revisionId']++:_0x3cd596++),_0x5721fa['_insertChild'](0x0,_0x28c8ec),_0x5721fa;}['_calculateMetaData'](_0x4ee247,_0x5e3095,_0x1b1751){this['_reset']();const {roots:_0x25f46e,markers:_0x35c3d5,rootsAttributes:_0x1a2827}=this['_savedMetaData']['get'](_0x4ee247);this['_baseRoots']=new Map(_0x25f46e),this['_baseRootsAttributes']=new Map(_0xadda3d(_0x1a2827));for(const [_0x55edb,_0x1ea9f0]of this['_baseRoots'])if('$graveyard'!==_0x55edb&&(this['_diffRoots']['set'](_0x55edb,x(_0x1ea9f0)),this['_diffRootsAttributes']=new Map(_0xadda3d(_0x1a2827)),_0x1b1751)){const _0x7c5689=this['_revisionId'];this['_idsRoots']['set'](_0x55edb,this['_makeIdsRoot'](_0x1ea9f0)),this['_baseIdsRoots']['set'](_0x55edb,this['_makeIdsRoot'](_0x1ea9f0,_0x7c5689));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',x(this['_baseRoots']['get']('$graveyard'))),_0x1b1751&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x1ade6e,_0x403bcc]of _0x35c3d5){const _0x9ae3b2=this['_baseRoots']['get'](_0x403bcc['rootName']),_0x31f0ea=this['_diffRoots']['get'](_0x403bcc['rootName']),_0x46fd7f=new _0x1474a8(this['_fixPosition'](_0x403bcc['start'],_0x9ae3b2),this['_fixPosition'](_0x403bcc['end'],_0x9ae3b2)),_0x187bd9=this['_fixRange'](_0x46fd7f,_0x31f0ea);_0x9ae3b2['markers']['set'](_0x1ade6e,_0x46fd7f),this['_markers']['set'](_0x1ade6e,_0x187bd9);}this['_applyOperations'](_0x4ee247,_0x5e3095,_0x1b1751);}['_applyOperations'](_0x19ead7,_0x9a391e,_0x17f493){for(const _0x4fb365 of this['source']['getOperations'](_0x19ead7,_0x9a391e))this['_handleOperation'](_0x4fb365,_0x17f493);for(const _0x52872b of this['_diffRoots']['values']())_0x52872b['markers']['clear']();for(const [_0x2edd06,_0xeb9ae9]of this['_markers']){this['_diffRoots']['get'](_0xeb9ae9['root']['rootName'])['markers']['set'](_0x2edd06,_0xeb9ae9['clone']());}const _0x36240f=new Map(),_0x44bf85=new Map();for(const [_0x472e28,_0xd31f59]of this['_diffRoots'])_0x36240f['set'](_0x472e28,x(_0xd31f59)),_0x44bf85['set'](_0x472e28,this['_diffRootsAttributes']['get'](_0x472e28));this['_saveMetaData'](_0x9a391e,_0x36240f,this['_markers'],_0x44bf85);}['_getPreviousFrom'](_0x46496b){const _0x251d3e=Array['from'](this['_savedMetaData']['keys']());_0x251d3e['sort']((_0x3076e3,_0x15f2d7)=>_0x3076e3-_0x15f2d7),_0x251d3e['reverse']();for(const _0x1c46b5 of _0x251d3e)if(_0x1c46b5<_0x46496b)return _0x1c46b5;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x1ecba8,_0x3eb11a){const _0x94f920=Array['from'](_0x3eb11a['markers'])['map'](([_0x1bd74f,_0x4ce912])=>[_0x1bd74f,this['_fixRange'](_0x4ce912,_0x1ecba8)]);_0x1ecba8['markers']=new Map(_0x94f920);}['_transformMarkers'](_0x38106f){for(const _0x68519b of this['_markers']['values']()){const _0x259bca=_0x68519b['getTransformedByOperation'](_0x38106f),_0x5c7637=_0x1474a8['_createFromRanges'](_0x259bca);_0x68519b['start']=_0x5c7637['start'],_0x68519b['end']=_0x5c7637['end'];}}['_handleOperation'](_0x55a5e0,_0x4a23ba){if('addRoot'!=_0x55a5e0['type']&&'detachRoot'!=_0x55a5e0['type']){if('insert'==_0x55a5e0['type']){const _0x51bf3c=_0x55a5e0['position']['root']['rootName'];this['_diffRoots']['has'](_0x51bf3c)||(this['_diffRoots']['set'](_0x51bf3c,K(_0x51bf3c,!0x0)),this['_diffRootsAttributes']['set'](_0x51bf3c,{}),_0x4a23ba&&this['_idsRoots']['set'](_0x51bf3c,K(_0x51bf3c,!0x0)));}else{if('addRootAttribute'==_0x55a5e0['type']||'removeRootAttribute'==_0x55a5e0['type']||'changeRootAttribute'==_0x55a5e0['type'])return void this['_handleRootAttributeOperation'](_0x55a5e0);'marker'==_0x55a5e0['type']&&this['_handleMarkerOperation'](_0x55a5e0);}if('marker'!==_0x55a5e0['type']){const _0x3948eb=this['_cloneOperation'](_0x55a5e0,this['_diffRoots']);_0x3948eb['_execute'](),this['_transformMarkers'](_0x3948eb);}if(_0x4a23ba)switch(_0x55a5e0['type']){case'insert':this['_handleInsertOperation'](_0x55a5e0);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x55a5e0);break;case'merge':this['_handleMergeOperation'](_0x55a5e0);break;case'split':this['_handleSplitOperation'](_0x55a5e0);}}else this['_handleRootOperation'](_0x55a5e0,_0x4a23ba);}['_cloneOperation'](_0x31bd35,_0x17cca7){const _0x43ba33=_0x31bd35['clone']();return _0x43ba33['_authorId']=_0x31bd35['_authorId'],this['_fixOperation'](_0x43ba33,_0x17cca7),_0x43ba33;}['_getBaseVids'](_0x526fe9){return _0x526fe9['map'](_0x3f059b=>{const _0x3a07c1=this['_getVidAttributeName'](_0x3f059b);return Number(_0x3f059b['item']['getAttribute'](_0x3a07c1));});}['_generateTape'](_0x2ae66d,_0x4a2c7d){if(_0x2ae66d['is']('element','$text'))_0x4a2c7d['push']({'item':_0x2ae66d,'type':'text'});else{_0x2ae66d['is']('element')&&_0x4a2c7d['push']({'item':_0x2ae66d,'type':'elementStart'});for(const _0x3edc24 of _0x2ae66d['getChildren']())this['_generateTape'](_0x3edc24,_0x4a2c7d);_0x2ae66d['is']('element')&&_0x4a2c7d['push']({'item':_0x2ae66d,'type':'elementEnd'});}return _0x4a2c7d;}['_getState'](){const _0xfa4b63=new Map(this['_touched']),_0x479f5e=new Map(_0xfa4b63),_0x475d86=new Map(),_0x581f9e={'insertions':{},'deletions':{}},_0x1c13ba={'insertions':{},'deletions':{}},_0x3d3a6b=new Map(),_0xffb8eb=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0xffb8eb['delete']('$graveyard');for(const _0x3356f2 of _0xffb8eb){const _0x23201c=this['_diffRoots']['get'](_0x3356f2)||K(_0x3356f2,!0x1),_0x43d5e3=this['_baseRoots']['get'](_0x3356f2)||K(_0x3356f2,!0x1);_0x23201c['isAttached']()||_0x43d5e3['isAttached']()?(_0x581f9e['insertions'][_0x3356f2]=x(_0x23201c),_0x581f9e['deletions'][_0x3356f2]=x(_0x43d5e3),this['_copyMarkers'](_0x581f9e['deletions'][_0x3356f2],_0x43d5e3),this['_copyMarkers'](_0x581f9e['insertions'][_0x3356f2],_0x23201c),_0x1c13ba['insertions'][_0x3356f2]=this['_generateTape'](this['_idsRoots']['get'](_0x3356f2),[]),_0x1c13ba['deletions'][_0x3356f2]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x3356f2)||K(_0x3356f2,!0x1),[])):_0xffb8eb['delete'](_0x3356f2);}for(const _0x2c2794 of _0xffb8eb){const _0x2833d0=_0x1c13ba['insertions'][_0x2c2794];for(const _0x2dc0ea of _0x2833d0){const _0x53b45b=this['_getVidAttributeName'](_0x2dc0ea),_0x4fd530=_0x2dc0ea['item']['getAttribute'](_0x53b45b);_0x479f5e['delete'](_0x4fd530),_0x4fd530>=this['_startingRevisionId']&&_0x475d86['set'](_0x4fd530,_0xfa4b63['get'](_0x4fd530));}}for(const _0x2af78f of _0xffb8eb){const _0x31c382=_0x1c13ba['insertions'][_0x2af78f],_0x2486d5=this['_getBaseVids'](_0x1c13ba['deletions'][_0x2af78f]);let _0xf6af98=0x0;for(const _0x5db13b of _0x31c382){const _0x264edc=this['_getVidAttributeName'](_0x5db13b),_0x1ef0b3=_0x5db13b['item']['getAttribute'](_0x264edc);if(!_0x475d86['has'](_0x1ef0b3)&&!_0x3d3a6b['has'](_0x1ef0b3)){if(_0x479f5e['has'](_0x1ef0b3))_0xf6af98++;else{if(_0x1ef0b3!=_0x2486d5[_0xf6af98]){const _0x203328=_0xfa4b63['get'](_0x1ef0b3)||_0xfa4b63['get'](_0x2486d5[_0xf6af98]);for(;_0x1ef0b3!=_0x2486d5[_0xf6af98];)_0x479f5e['has'](_0x2486d5[_0xf6af98])||(_0x3d3a6b['set'](_0x2486d5[_0xf6af98],_0x203328),_0xfa4b63['set'](_0x2486d5[_0xf6af98],_0x203328)),_0xf6af98++;}_0xf6af98++;}}}}for(const _0x11ab80 of _0xffb8eb){const _0x4c9b8c=_0x1c13ba['insertions'][_0x11ab80];for(const _0x223af0 of _0x4c9b8c){const _0xe202f1=this['_getVidAttributeName'](_0x223af0),_0x5e1490=_0x223af0['item']['getAttribute'](_0xe202f1);if(_0x3d3a6b['has'](_0x5e1490)){const _0xc40e8c=_0x3d3a6b['get'](_0x5e1490);_0x479f5e['has'](_0x5e1490)||_0x479f5e['set'](_0x5e1490,{..._0xc40e8c}),_0x475d86['set'](_0x5e1490,{..._0xc40e8c});}}}for(const _0x584ca2 of _0x479f5e['keys']())_0x584ca2>=this['_startingRevisionId']&&_0x479f5e['delete'](_0x584ca2);const _0x12021d=new Map();for(const _0x1e658d of _0xffb8eb){let _0x126a25=_0x1c13ba['insertions'][_0x1e658d];for(const _0x226e68 of _0x126a25)if(_0x226e68['item']['is']('element','tableCell')){const _0x6018d2=this['_getVidAttributeName'](_0x226e68),_0x2950eb=_0x226e68['item']['getAttribute'](_0x6018d2);if(_0x475d86['has'](_0x2950eb)){const _0x277865=_0x226e68['item']['parent']['parent']['getAttribute']('vid_start'),_0x20a32b=_0x12021d['get'](_0x277865)||new Set();_0x20a32b['add'](_0x475d86['get'](_0x2950eb)['userId']),_0x12021d['set'](_0x277865,_0x20a32b);}}_0x126a25=_0x1c13ba['deletions'][_0x1e658d];for(const _0xcae134 of _0x126a25)if(_0xcae134['item']['is']('element','tableCell')){const _0x5e87c0=this['_getVidAttributeName'](_0xcae134),_0x461cc4=_0xcae134['item']['getAttribute'](_0x5e87c0);if(_0x479f5e['has'](_0x461cc4)){const _0x4434d6=_0xcae134['item']['parent']['parent']['getAttribute']('vid_start'),_0x5c769a=_0x12021d['get'](_0x4434d6)||new Set();_0x5c769a['add'](_0x479f5e['get'](_0x461cc4)['userId']),_0x12021d['set'](_0x4434d6,_0x5c769a);}}for(const _0x189e86 of _0x12021d['keys']())(_0x475d86['has'](_0x189e86)||_0x479f5e['has'](_0x189e86))&&_0x12021d['delete'](_0x189e86);}for(const _0x39f488 of _0xffb8eb){const _0x581eec=_0x1c13ba['insertions'][_0x39f488];let _0x3e317b=null,_0x4ad4ea=null;for(const _0x344283 of _0x581eec){const _0x9ada8e=this['_getVidAttributeName'](_0x344283),_0x57de65=_0x344283['item']['getAttribute'](_0x9ada8e),_0x14485d=_0x12021d['get'](_0x57de65);_0x14485d&&'elementStart'==_0x344283['type']&&(_0x3e317b=Array['from'](_0x14485d)[0x0],_0x4ad4ea=_0x344283['item']['getAttribute']('vid_end')),_0x3e317b&&(_0x479f5e['set'](_0x57de65,{'userId':_0x3e317b}),_0x475d86['set'](_0x57de65,{'userId':_0x3e317b})),_0x57de65==_0x4ad4ea&&(_0x3e317b=null,_0x4ad4ea=null);}}const _0x315e5c={},_0x4fd422=new Set();for(const _0x2345f1 of _0xffb8eb){const _0x538297=_0x581f9e['deletions'][_0x2345f1],_0x2cc6b1=_0x581f9e['insertions'][_0x2345f1];for(const {userId:_0x3e62e0}of this['_touchedMarkers']['values']())null!==_0x3e62e0&&_0x4fd422['add'](_0x3e62e0);for(const {userId:_0x4424fe}of this['_touchedRoots']['values']())null!==_0x4424fe&&_0x4fd422['add'](_0x4424fe);this['_markChanges'](_0x2cc6b1,_0x1c13ba['insertions'][_0x2345f1],_0x475d86,'insertion',_0x4fd422),this['_markChanges'](_0x538297,_0x1c13ba['deletions'][_0x2345f1],_0x479f5e,'deletion',_0x4fd422),_0x315e5c[_0x2345f1]={'insertions':this['_prepareViewToSave'](_0x2cc6b1),'deletions':this['_prepareViewToSave'](_0x538297),'attachChange':this['_touchedRoots']['get'](_0x2345f1)||null,'attributesBefore':_0xadda3d(this['_baseRootsAttributes']['get'](_0x2345f1))||{},'attributesAfter':_0xadda3d(this['_diffRootsAttributes']['get'](_0x2345f1))};}return{'diffData':_0x315e5c,'authorsIds':Array['from'](_0x4fd422)};}['_processRootBeforeSave'](_0x530d82){for(const [,_0x399e50]of _0x530d82['markers']){const _0x5aa8b9=_0x399e50['start']['getAncestors']()['filter'](_0x1c1056=>'tableCell'==_0x1c1056['name']);for(const _0x5cceb5 of _0x5aa8b9)0x1==_0x5cceb5['childCount']&&_0x5cceb5['getChild'](0x0)['is']('element','paragraph')&&_0x5cceb5['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x5d711c){this['_processRootBeforeSave'](_0x5d711c);const _0x2103f8=this['editor']['data']['toView'](_0x5d711c,{}),_0x5dfc9d=Array['from'](_0x2103f8['getChildren']())['map'](_0x75ae56=>this['_getViewJson'](_0x75ae56));return JSON['stringify'](_0x5dfc9d);}['_getViewJson'](_0x31e5b5){if(_0x31e5b5['is']('$text'))return _0x31e5b5['data'];{const _0x38f5a2=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x40b711=_0x31e5b5,_0x461bb2=this['editor']['data']['htmlProcessor']['domConverter'],_0x5e99bb={'type':_0x38f5a2['_getTypeCharForViewElement'](_0x40b711),'name':_0x40b711['name'],'attributes':Array['from'](_0x40b711['getAttributes']()),'children':Array['from'](_0x40b711['getChildren']())['map'](_0x37c71e=>this['_getViewJson'](_0x37c71e))};if(_0x31e5b5['is']('uiElement')&&'$comment'!=_0x31e5b5['name']){const _0x9d1ea8=_0x31e5b5['render'](_0x461bb2['domDocument'],_0x461bb2);_0x5e99bb['children']['push'](_0x9d1ea8['outerHTML']);}else{if(_0x31e5b5['is']('rawElement')){const _0x433dd1=_0x461bb2['domDocument']['createElement'](_0x40b711['name']);_0x31e5b5['render'](_0x433dd1,_0x461bb2),_0x5e99bb['children']['push'](_0x433dd1['innerHTML']);}}const _0x4a2399=Array['from'](_0x40b711['getCustomProperties']());_0x4a2399['length']>0x0&&(_0x5e99bb['customProperties']=_0x4a2399);const _0x576c62=_0x40b711['getFillerOffset']();return null!==_0x576c62&&(_0x5e99bb['fillerOffset']=_0x576c62),_0x5e99bb;}}['_markChanges'](_0x595801,_0x4d0195,_0x1b2ecc,_0xaa40de,_0x5d8655){let _0xb5e926=null,_0x58aa89=null,_0x1540c2=0x0;const _0x5a7ad8=this['editor']['model'];for(let _0x58e0bb=0x0;_0x58e0bb<_0x4d0195['length'];_0x58e0bb++){const _0x50375e=this['_getVidAttributeName'](_0x4d0195[_0x58e0bb]),_0x247b9d=_0x4d0195[_0x58e0bb]['item']['getAttribute'](_0x50375e),_0x1f859f=_0x1b2ecc['get'](_0x247b9d),_0x3a5ef3=_0x58e0bb==_0x4d0195['length']-0x1;(!_0xb5e926&&_0x1f859f&&(_0xb5e926=_0x1f859f,_0x58aa89=_0x4d0195[_0x58e0bb]),_0xb5e926&&(!_0x1f859f||_0x1f859f['userId']!=_0xb5e926['userId']))&&(_0x3ed823(_0x1f859f,N(_0x58aa89,_0x595801,_0x5a7ad8),N(_0x4d0195[_0x58e0bb],_0x595801,_0x5a7ad8)),_0xb5e926=_0x1f859f||null,_0x58aa89=_0x1f859f?_0x4d0195[_0x58e0bb]:null),_0xb5e926&&_0x3a5ef3&&_0x3ed823(_0x1f859f,N(_0x58aa89,_0x595801,_0x5a7ad8),P(_0x4d0195[_0x58e0bb],_0x595801,_0x5a7ad8));}function _0x3ed823(_0x353536,_0x40b5b9,_0x16eb5c){const _0x46c8c3=_0xb5e926['userId'],_0x18dab6='revision:'+_0xaa40de+':'+_0x46c8c3+':'+_0x1540c2++,_0x2a10ff=_0x5a7ad8['createRange'](_0x40b5b9,_0x16eb5c);_0x595801['markers']['set'](_0x18dab6,_0x2a10ff),null!==_0x46c8c3&&_0x5d8655['add'](_0x46c8c3);}}['_getVidAttributeName'](_0x319d77){switch(_0x319d77['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x53ddd8,_0xdb2f54){_0x53ddd8['baseVersion']=null;for(const _0x2a8749 in _0x53ddd8){const _0x43cd15=_0x53ddd8[_0x2a8749];if(_0x43cd15 instanceof _0x5273bc){const _0x3155a5=_0xdb2f54['get'](_0x43cd15['root']['rootName']);_0x53ddd8[_0x2a8749]=this['_fixPosition'](_0x43cd15,_0x3155a5);}if(_0x43cd15 instanceof _0x1474a8){const _0x1d85fd=_0xdb2f54['get'](_0x43cd15['root']['rootName']);_0x53ddd8[_0x2a8749]=this['_fixRange'](_0x43cd15,_0x1d85fd);}'root'===_0x2a8749&&(_0x53ddd8['root']=_0xdb2f54['get'](_0x53ddd8['root']['rootName']));}}['_fixRange'](_0x214fad,_0x4aa16a){return this['editor']['model']['createRange'](this['_fixPosition'](_0x214fad['start'],_0x4aa16a),this['_fixPosition'](_0x214fad['end'],_0x4aa16a));}['_fixPosition'](_0x5d3109,_0x744f6a){return this['editor']['model']['createPositionFromPath'](_0x744f6a,_0x5d3109['path'],_0x5d3109['stickiness']);}['_handleInsertOperation'](_0x5edc0c){const _0x2b703f=this['_idsRoots']['get'](_0x5edc0c['position']['root']['rootName']),_0x4b273e=this['_fixPosition'](_0x5edc0c['position'],_0x2b703f),_0x52e2f3=null===_0x5edc0c['_authorId']?null:_0x5edc0c['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1edb1a=_0x4b273e['parent'],_0x13be3a=this['_revisionId'],_0x44a51e=[];for(const _0x5aa8d1 of _0x5edc0c['nodes'])if(_0x5aa8d1['is']('element'))_0x44a51e['push'](this['_makeIdsRoot'](_0x5aa8d1));else{for(let _0x5e322c=0x0;_0x5e322c<_0x5aa8d1['offsetSize'];_0x5e322c++)_0x44a51e['push'](new _0x39812c('$text',{'vid':this['_revisionId']++}));}const _0x11da70=this['_revisionId'];for(let _0x2fea9c=_0x13be3a;_0x2fea9c<_0x11da70;_0x2fea9c++)this['_touched']['set'](_0x2fea9c,{'userId':_0x52e2f3});_0x1edb1a['_insertChild'](_0x4b273e['offset'],_0x44a51e);}['_handleMoveOperation'](_0x24af5f){(_0x24af5f=this['_cloneOperation'](_0x24af5f,this['_idsRoots']))['_execute']();const _0x1b3091=null===_0x24af5f['_authorId']?null:_0x24af5f['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1b103a=_0x24af5f['getMovedRangeStart'](),_0x3b5434=_0x1b103a['parent'],_0x3fb061=_0x1b103a['offset'];!function _0x314b1d(_0x546819,_0x4ec841,_0x5e74ef,_0x43ec29){for(let _0x582575=_0x5e74ef;_0x582575<_0x43ec29;_0x582575++){const _0xc66710=_0x4ec841['getChild'](_0x582575);_0xc66710['is']('element','$text')?_0x546819['set'](_0xc66710['getAttribute']('vid'),{'userId':_0x1b3091}):(_0x546819['set'](_0xc66710['getAttribute']('vid_start'),{'userId':_0x1b3091}),_0x314b1d(_0x546819,_0xc66710,0x0,_0xc66710['childCount']),_0x546819['set'](_0xc66710['getAttribute']('vid_end'),{'userId':_0x1b3091}));}}(this['_touched'],_0x3b5434,_0x3fb061,_0x3fb061+_0x24af5f['howMany']);}['_handleMergeOperation'](_0x4bd4cc){const _0x2b0983=null===(_0x4bd4cc=this['_cloneOperation'](_0x4bd4cc,this['_idsRoots']))['_authorId']?null:_0x4bd4cc['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1848ac=_0x4bd4cc['targetPosition']['parent'],_0x4c5d65=_0x4bd4cc['sourcePosition']['parent'],_0x59f4f1=_0x1848ac['getAttribute']('vid_end'),_0x4f5c8e=_0x4c5d65['getAttribute']('vid_start');_0x1848ac['_setAttribute']('vid_end',_0x4c5d65['getAttribute']('vid_end')),_0x4c5d65['_setAttribute']('vid_end',_0x59f4f1),this['_touched']['set'](_0x4f5c8e,{'userId':_0x2b0983}),this['_touched']['set'](_0x59f4f1,{'userId':_0x2b0983}),_0x4bd4cc['_execute']();}['_handleSplitOperation'](_0x322727){const _0x366a4a=null===(_0x322727=this['_cloneOperation'](_0x322727,this['_idsRoots']))['_authorId']?null:_0x322727['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xdb4b33=_0x322727['graveyardPosition'],_0x63e1b7=_0x322727['splitPosition']['parent'];_0x322727['_execute']();const _0x36670e=_0x63e1b7['getAttribute']('vid_end'),_0x481996=_0x322727['insertionPosition']['nodeAfter'];if(_0xdb4b33){const _0x27741d=_0x481996['getAttribute']('vid_end'),_0x16174e=_0x63e1b7['getAttribute']('vid_end');_0x63e1b7['_setAttribute']('vid_end',_0x27741d),_0x481996['_setAttribute']('vid_end',_0x16174e),this['_touched']['set'](_0x63e1b7['getAttribute']('vid_end'),{'userId':_0x366a4a}),this['_touched']['set'](_0x481996['getAttribute']('vid_start'),{'userId':_0x366a4a});}else{const _0x23c1c3=this['_revisionId']++,_0x48a760=this['_revisionId']++;_0x63e1b7['_setAttribute']('vid_end',_0x23c1c3),_0x481996['_setAttribute']('vid_start',_0x48a760),_0x481996['_setAttribute']('vid_end',_0x36670e),this['_touched']['set'](_0x23c1c3,{'userId':_0x366a4a}),this['_touched']['set'](_0x48a760,{'userId':_0x366a4a});}}['_handleMarkerOperation'](_0x33c16b){if(!_0x33c16b['affectsData'])return;const _0x2a7872=(_0x33c16b=this['_cloneOperation'](_0x33c16b,this['_diffRoots']))['oldRange']?_0x33c16b['oldRange']['root']:null,_0x2022e5=_0x33c16b['newRange']?_0x33c16b['newRange']['root']:null;_0x2a7872&&this['_markers']['delete'](_0x33c16b['name']),_0x2022e5&&this['_markers']['set'](_0x33c16b['name'],_0x33c16b['newRange']['clone']());const _0x4d6d1a=null===_0x33c16b['_authorId']?null:_0x33c16b['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x9aa64=_0x33c16b['name'];if(!this['_touchedMarkers']['has'](_0x9aa64))return void this['_touchedMarkers']['set'](_0x9aa64,{'range':_0x33c16b['oldRange'],'userId':_0x4d6d1a});const _0xb3a1ec=this['_touchedMarkers']['get'](_0x9aa64),_0x34cf19=_0xb3a1ec['range'],_0x49ce3a=_0x33c16b['newRange'];null==_0x34cf19&&null==_0x49ce3a||_0x34cf19&&_0x49ce3a&&_0x34cf19['isEqual'](_0x49ce3a)?this['_touchedMarkers']['delete'](_0x33c16b['name']):_0xb3a1ec['userId']=_0x4d6d1a;}['_handleRootOperation'](_0x496230,_0x15169a){this['_diffRoots']['has'](_0x496230['rootName'])?this['_diffRoots']['get'](_0x496230['rootName'])['_isAttached']=_0x496230['isAdd']:(this['_diffRoots']['set'](_0x496230['rootName'],K(_0x496230['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x496230['rootName'],{}),_0x15169a&&this['_idsRoots']['set'](_0x496230['rootName'],K(_0x496230['rootName'],!0x0)));const _0x5d625b=null===_0x496230['_authorId']?null:_0x496230['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x55cba9=this['_touchedRoots']['get'](_0x496230['rootName']);_0x55cba9&&_0x55cba9['userId']===_0x5d625b?this['_touchedRoots']['delete'](_0x496230['rootName']):this['_touchedRoots']['set'](_0x496230['rootName'],{'userId':_0x5d625b,'isAttached':_0x496230['isAdd']});}['_handleRootAttributeOperation'](_0x1b7a74){const _0x116918=this['_diffRootsAttributes']['get'](_0x1b7a74['root']['rootName']);null===_0x1b7a74['newValue']?delete _0x116918[_0x1b7a74['key']]:_0x116918[_0x1b7a74['key']]=_0x1b7a74['newValue'];}}function x(_0x18c186){const _0x48b675=K(_0x18c186['rootName'],_0x18c186['isAttached']());for(const _0x4e7424 of _0x18c186['getChildren']()){const _0x505965=_0x4e7424['_clone'](!0x0);_0x48b675['_appendChild'](_0x505965);}return _0x48b675;}function K(_0x442c0d,_0x38c3fc=!0x0){const _0xa1adfc=new _0xa6ead0();return _0xa1adfc['rootName']=_0x442c0d,_0xa1adfc['_isAttached']=_0x38c3fc,_0xa1adfc['isAttached']=()=>_0xa1adfc['_isAttached'],_0xa1adfc;}function N(_0x295a82,_0xf66722,_0x198310){const _0x28f14e='elementEnd'==_0x295a82['type']?_0x198310['createPositionAt'](_0x295a82['item'],'end'):_0x198310['createPositionBefore'](_0x295a82['item']);return _0x198310['createPositionFromPath'](_0xf66722,_0x28f14e['path'],_0x28f14e['stickiness']);}function P(_0x2c0175,_0x2513b6,_0x2e522c){const _0x291c4d='elementStart'==_0x2c0175['type']?_0x2e522c['createPositionAt'](_0x2c0175['item'],0x0):_0x2e522c['createPositionAfter'](_0x2c0175['item']);return _0x2e522c['createPositionFromPath'](_0x2513b6,_0x291c4d['path'],_0x291c4d['stickiness']);}class he extends/* #__PURE__ -- @preserve */
25
- _0x2e53b2(_0x584d23){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x125920,_0x4678f8){super(_0x125920),this['focusTracker']=new _0x1e7ab2(),this['keystrokes']=new _0x248400(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x4678f8),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),this['initializeCssTransitionDisablerMixin']();}['render'](){super['render'](),_0x4935d8({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x525d77=_0x4637e9=>_0x4637e9['stopPropagation']();this['keystrokes']['set']('arrowright',_0x525d77),this['keystrokes']['set']('arrowleft',_0x525d77),this['keystrokes']['set']('arrowup',_0x525d77),this['keystrokes']['set']('arrowdown',_0x525d77);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0xcbadb0){this['revisionNameInputView']['fieldView']['element']['value']=_0xcbadb0['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x4f5458){const _0x235a9f=new et(this['locale'],ti),_0x70fa8a=_0x235a9f['fieldView'];_0x70fa8a['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x1b4d29=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0x4f5458&&(_0x1b4d29+='\x20('+m(this['locale'],'optional')+')'),(_0x235a9f['label']=_0x1b4d29,_0x70fa8a['on']('input',()=>{this['revisionNameInputValue']=_0x70fa8a['element']['value']['trim']();}),_0x235a9f);}}class l extends _0xde4b58{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h];}['_saveRevisionFormView'];['init'](){const _0x5b72d3=this['editor'],_0x33a4af=_0x5b72d3['plugins']['get']('RevisionTracker');_0x5b72d3['ui']['componentFactory']['add']('revisionHistory',_0x5707aa=>{const _0x309d26=_0x4c9aaf(_0x5707aa),_0x2972df=_0x309d26['panelView']['children'],_0x456669=new _0x277762(_0x5707aa),_0x14a9c2=new _0x9334aa(_0x5707aa),_0xac83c5=this['_createSaveRevisionButton'](_0x56b48b),_0xe3385=new _0x9334aa(_0x5707aa),_0x3c3546=this['_createOpenRevisionButton'](_0x56b48b);return _0x309d26['bind']('isEnabled')['to'](_0x33a4af,'isReady',_0x33a4af,'isEnabled',_0x5b72d3,'isReadOnly',(_0x41cdea,_0x1020f1,_0x3fc69e)=>_0x41cdea&&_0x1020f1&&!_0x3fc69e),_0x309d26['buttonView']['set']({'icon':_0x173b8e,'label':m(_0x5707aa,'Revision\x20history'),'tooltip':!0x0}),_0xac83c5['set']({'withText':!0x0,'role':'menuitem'}),_0x3c3546['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x3c3546,'execute',()=>{_0x309d26['isOpen']=!0x1,_0x5b72d3['editing']['view']['focus']();},{'priority':'low'}),_0x14a9c2['children']['add'](_0xac83c5),_0xe3385['children']['add'](_0x3c3546),_0x456669['role']='menu',_0x456669['items']['addMany']([_0x14a9c2,_0xe3385]),_0x2972df['add'](_0x456669),_0x309d26;}),_0x5b72d3['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x228d40=this['editor'],_0x4d2d0c=_0x228d40['locale'],_0x50227b=_0x228d40['plugins']['get']('RevisionTracker'),_0x49c996=new _0x27668a(_0x4d2d0c),_0x4f67cd=new _0x432d32(_0x4d2d0c);_0x49c996['bind']('isEnabled')['to'](_0x50227b,'isReady',_0x50227b,'isEnabled',_0x228d40,'isReadOnly',(_0x2a3d3c,_0x100d82,_0x47cceb)=>_0x2a3d3c&&_0x100d82&&!_0x47cceb),_0x49c996['buttonView']['set']({'icon':_0x173b8e,'label':m(_0x4d2d0c,'Revision\x20history')});const _0x405a57=new _0x594efc(_0x4d2d0c,_0x49c996),_0x5d9f9e=this['_createSaveRevisionButton'](_0x426818);_0x5d9f9e['delegate']('execute')['to'](_0x49c996),_0x405a57['children']['add'](_0x5d9f9e),_0x4f67cd['items']['add'](_0x405a57);const _0x1657fb=new _0x594efc(_0x4d2d0c,_0x49c996),_0x1bfdb8=this['_createOpenRevisionButton'](_0x426818);return _0x1bfdb8['delegate']('execute')['to'](_0x49c996),_0x1657fb['children']['add'](_0x1bfdb8),_0x4f67cd['items']['add'](_0x1657fb),_0x49c996['panelView']['children']['add'](_0x4f67cd),_0x49c996;}['_createSaveRevisionButton'](_0x19764a){const _0x241a9a=this['editor'],_0x321f2d=_0x241a9a['plugins']['get']('RevisionTracker'),_0x2559a8=new _0x19764a(_0x241a9a['locale']);return _0x2559a8['set']({'label':m(_0x241a9a['locale'],'Save\x20current\x20revision')}),_0x2559a8['bind']('isEnabled')['to'](_0x321f2d,'isReady',_0x321f2d,'isEnabled',_0x241a9a,'isReadOnly',(_0x3c3017,_0x2286c4,_0x1d297b)=>_0x3c3017&&_0x2286c4&&!_0x1d297b),this['listenTo'](_0x2559a8,'execute',()=>{this['_showDialog']();}),_0x2559a8;}['_createOpenRevisionButton'](_0x40a1bc){const _0x429738=this['editor'],_0x4ee8d6=_0x429738['plugins']['get']('RevisionTracker'),_0x8199cc=new _0x40a1bc(_0x429738['locale']);return _0x8199cc['set']({'label':m(_0x429738['locale'],'Open\x20revision\x20history')}),_0x8199cc['bind']('isEnabled')['to'](_0x4ee8d6,'isReady',_0x429738,'isReadOnly',(_0xa5baf7,_0x403c54)=>_0xa5baf7&&!_0x403c54),this['listenTo'](_0x8199cc,'execute',()=>{_0x429738['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x8199cc;}['_showDialog'](){const _0x318cda=this['editor'],_0xfeede7=_0x318cda['locale'],_0x5499d1=_0x318cda['plugins']['get']('Dialog'),_0x20942a=_0x318cda['plugins']['get']('RevisionTracker');function _0x229143(_0x431bb2){_0x318cda['config']['get']('revisionHistory.requireRevisionName')&&''===_0x431bb2['revisionName']?_0x431bb2['revisionNameInputView']['errorText']=m(_0xfeede7,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x318cda['plugins']['get'](h)['saveRevision']({'name':_0x431bb2['revisionName']}),_0x5499d1['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x229143(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x5499d1['show']({'id':'revisionSave','title':m(_0xfeede7,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0x318cda['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x5499d1['hide']()},{'label':m(_0x318cda['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x268d97){_0x268d97['bind']('isEnabled')['to'](_0x20942a,'isReady',_0x20942a,'isEnabled',_0x318cda,'isReadOnly',(_0x4c9daf,_0x37822e,_0x567b40)=>_0x4c9daf&&_0x37822e&&!_0x567b40);},'onExecute':()=>_0x229143(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x30b69a=this['editor'],_0x2cb2d0=_0x30b69a['locale'];this['_saveRevisionFormView']=new he(_0x2cb2d0,_0x30b69a['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class q extends _0x584d23{['changeId'];['_model'];constructor(_0x3c9781,_0x904145){super(_0x3c9781),this['_model']=_0x904145,this['changeId']=_0x904145['id'];const _0x4f031b=this['bindTemplate'],_0x278dce=m(_0x3c9781,_0x904145['data']['isSuggestion']?'Suggested\x20by':'add'==_0x904145['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x904145['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x4f031b['to']('type',_0x33e6fe=>'ck-revision-change__'+_0x33e6fe)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x278dce}]},{'text':'\x20'+_0x904145['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class z extends/* #__PURE__ -- @preserve */
26
- _0x8df1b4(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x2335c1){super(),this['id']=_0x2335c1['id']||_0xefa39(),this['author']=_0x2335c1['author'],this['type']=_0x2335c1['type'],this['data']=_0x2335c1['data']||{},this['rootName']=_0x2335c1['rootName'],this['set']('createdAt',_0x2335c1['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class G{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x501f75,_0x47a27a){this['newRevisionId']=_0x501f75,this['oldRevisionId']=_0x47a27a,this['changes']=new _0x4fc9f6();}['_setChanges'](_0x392fba){for(const _0x4e515a of _0x392fba)this['changes']['add'](_0x4e515a);}}class u extends _0xde4b58{['repository'];['adapter']=null;['_utils'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x405575,_0x5f3958,S,$];}constructor(_0x4188bc){super(_0x4188bc),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0x47d235,_0x527f0c,_0x254b88)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x5a2136=>{for(const _0x288a7e of this['editor']['editing']['view']['document']['roots'])_0x254b88?_0x5a2136['removeClass']('ck-editor__editable__overlay',_0x288a7e):_0x5a2136['addClass']('ck-editor__editable__overlay',_0x288a7e);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0xddfbea=>null!==_0xddfbea),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x2e101d,_0x2b2153,_0x45acfd)=>_0x2e101d&&_0x45acfd?_0x2b2153['changes']['getIndex'](_0x45acfd):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x15c572,_0x1be50d)=>_0x15c572?_0x1be50d['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x5f3958);}['init'](){const _0x57aacf=this['editor'],_0x59b423=new ShowChangeCommand(_0x57aacf,{'direction':'backward'}),_0x2d60f1=new ShowChangeCommand(_0x57aacf,{'direction':'forward'});(_0x57aacf['commands']['add']('showPreviousChange',_0x59b423),_0x57aacf['commands']['add']('showNextChange',_0x2d60f1),_0x57aacf['commands']['add']('restoreRevision',new RestoreRevisionCommand(_0x57aacf)),this['on']('change:numberOfChanges',()=>{_0x59b423['refresh'](),_0x2d60f1['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x57aacf['enableReadOnlyMode']('revision-viewer'),_0x57aacf['plugins']['has']('WidgetToolbarRepository'))&&_0x57aacf['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x4500f9){return await this['_utils']['loadRevisionData'](_0x4500f9,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x4500f9);}async['getRevisionRootsAttributes'](_0x27eda5){return await this['_utils']['loadRevisionData'](_0x27eda5,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x27eda5);}async['compare'](_0x50ab96,_0x502465,_0x234530=!0x1){if(!this['isEnabled'])return;const _0x595c4b=this['diff'],_0x2f2b5a=this['repository'],_0x38f289='string'==typeof _0x50ab96?_0x2f2b5a['getRevision'](_0x50ab96):_0x50ab96,_0x54fb7e='string'==typeof _0x502465?_0x2f2b5a['getRevision'](_0x502465):_0x502465,_0x1c19a5=_0x38f289['id'],_0x51fdd4=_0x54fb7e?_0x54fb7e['id']:null;if(!_0x234530&&this['diff']&&this['diff']['newRevisionId']===_0x1c19a5&&this['diff']['oldRevisionId']===_0x51fdd4)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new G(_0x1c19a5,_0x51fdd4);const _0x1895ce=this['_getRevisionsRange'](_0x38f289,_0x54fb7e,!0x0)['map'](_0x3c676e=>this['_utils']['loadRevisionData'](_0x3c676e,this['adapter']));return _0x1895ce['push'](new Promise(_0x57958d=>{setTimeout(_0x57958d,0x14);})),Promise['all'](_0x1895ce)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x19e0d9=this['_getDiff'](_0x1c19a5,_0x51fdd4);for(const _0x3580f0 of _0x19e0d9['changes'])this['_changeIdToChange']['set'](_0x3580f0['id'],_0x3580f0);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x95e9f2=>{for(const _0x1da430 of this['editor']['model']['document']['getRootNames']())_0x95e9f2['detachRoot'](_0x1da430);for(const _0x34aa93 of Object['keys'](_0x19e0d9['model'])){const _0x55fbed=_0x95e9f2['addRoot'](_0x34aa93);for(const _0x127eb9 of Object['keys'](_0x19e0d9['attributes'][_0x34aa93]))_0x95e9f2['setAttribute'](_0x127eb9,_0x19e0d9['attributes'][_0x34aa93][_0x127eb9],_0x55fbed);_0x95e9f2['insert'](_0x19e0d9['model'][_0x34aa93],_0x55fbed,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x19e0d9['changes'])),this['isReady']=!0x0;})['catch'](_0x3f0142=>{console['error'](_0x3f0142),this['_cleanUp'](),_0x595c4b&&(this['diff']=_0x595c4b),this['isReady']=!0x0;});}['addRevisionData'](_0x259723,_0x1764b2){const _0x750d20=this['repository']['createRevision'](_0x259723);return _0x750d20['on']('_update',(_0x36ef9c,_0x3c2e84,_0x506de0)=>_0x1764b2(_0x3c2e84,_0x506de0,_0x750d20)),this['repository']['addRevision'](_0x750d20),_0x750d20;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x3e148c=>{for(const _0x5c23a5 of this['editor']['model']['document']['getRootNames']())_0x3e148c['detachRoot'](_0x5c23a5);});}['_sortAndFilterDiffChanges'](_0x14163a){const _0x505de3=[],_0x47a5c3=new Map();for(const _0x569403 of this['editor']['model']['document']['getRootNames']()){const _0x493fdd=this['editor']['editing']['view']['getDomRoot'](_0x569403);if(!_0x493fdd)continue;const _0x2327d8=_0x493fdd['getClientRects']()['item'](0x0);_0x2327d8&&(_0x505de3['push'](_0x569403),_0x47a5c3['set'](_0x569403,_0x2327d8));}return _0x505de3['sort']((_0x39bbc1,_0x3f161e)=>{const _0x170fc2=_0x47a5c3['get'](_0x39bbc1),_0xb4741d=_0x47a5c3['get'](_0x3f161e);return _0x170fc2['y']-_0xb4741d['y']||_0x170fc2['x']-_0xb4741d['x'];}),(_0x14163a=_0x14163a['filter'](_0x169d5a=>_0x505de3['includes'](_0x169d5a['rootName'])))['sort']((_0x3685dd,_0x271223)=>_0x505de3['indexOf'](_0x3685dd['rootName'])-_0x505de3['indexOf'](_0x271223['rootName'])),_0x14163a;}['_makeTape'](_0xabb255){const _0x38f6e3=Array['from'](_0xabb255['markers'])['filter'](([_0x893df,_0x540d3d])=>_0x893df['startsWith']('revision:')&&!_0x540d3d['isCollapsed']),_0x399fea=Array['from'](this['editor']['model']['createRangeIn'](_0xabb255)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x38f6e3['length'])for(const _0x487ef7 of _0x399fea){const [_0x396bb9,_0x2ed1f3]=_0x38f6e3[0x0],[,_0x1f91cb,_0x229aa9]=_0x396bb9['split'](':');if(_0x2ed1f3['end']['isEqual'](_0x487ef7['nextPosition'])&&_0x38f6e3['shift'](),(_0x487ef7['previousPosition']['isEqual'](_0x2ed1f3['start'])||_0x487ef7['previousPosition']['isAfter'](_0x2ed1f3['start']))&&('insertion'==_0x1f91cb?_0x487ef7['isAdded']={'userId':_0x229aa9}:'deletion'==_0x1f91cb&&(_0x487ef7['isRemoved']={'userId':_0x229aa9})),0x0==_0x38f6e3['length'])break;}return _0x399fea;}['_refreshStartEndIndex'](_0x63f346){const _0x26e232=new Map();for(let _0xf7deb6=0x0;_0xf7deb6<_0x63f346['length'];_0xf7deb6++)'text'===_0x63f346[_0xf7deb6]['type']?(_0x63f346[_0xf7deb6]['item']['startIndex']=_0xf7deb6,_0x63f346[_0xf7deb6]['item']['endIndex']=_0xf7deb6):('elementStart'===_0x63f346[_0xf7deb6]['type']?_0x63f346[_0xf7deb6]['item']['startIndex']=_0xf7deb6:'elementEnd'===_0x63f346[_0xf7deb6]['type']&&(_0x63f346[_0xf7deb6]['item']['endIndex']=_0xf7deb6),_0x26e232['set'](_0x63f346[_0xf7deb6]['id'],_0xf7deb6));for(const _0x305516 of _0x26e232['values']())'elementStart'===_0x63f346[_0x305516]['type']?_0x63f346[_0x305516]['item']['endIndex']=_0x26e232['get'](_0x63f346[_0x305516]['pairId']):'elementEnd'===_0x63f346[_0x305516]['type']&&(_0x63f346[_0x305516]['item']['startIndex']=_0x26e232['get'](_0x63f346[_0x305516]['pairId']));}['_processTape'](_0x266076){for(let _0x3384ce=0x0;_0x3384ce<_0x266076['length'];_0x3384ce++){if('elementStart'===_0x266076[_0x3384ce]['type'])_0x266076[_0x3384ce]['item']['startIndex']=_0x3384ce;else{if('elementEnd'===_0x266076[_0x3384ce]['type']){_0x266076[_0x3384ce]['item']['endIndex']=_0x3384ce;const _0x72d8fc=_0x266076[_0x3384ce]['item']['startIndex'];_0x266076[_0x72d8fc]['pairId']=_0x266076[_0x3384ce]['id'],_0x266076[_0x3384ce]['pairId']=_0x266076[_0x72d8fc]['id'];}else _0x266076[_0x3384ce]['item']['startIndex']=_0x3384ce,_0x266076[_0x3384ce]['item']['endIndex']=_0x3384ce,_0x266076[_0x3384ce]['pairId']=null;}_0x266076[_0x3384ce]['markersStart']||(_0x266076[_0x3384ce]['markersStart']=[],_0x266076[_0x3384ce]['markersEnd']=[]);}}['_markInsertions'](_0x2cb660,_0x26217b){const _0xe1805e=_0x2cb660['filter'](_0x39823a=>!_0x39823a['isAdded']);for(let _0x2c39a7=0x0;_0x2c39a7<_0x26217b['length'];_0x2c39a7++)_0x26217b[_0x2c39a7]['isAdded']&&(_0xe1805e[_0x2c39a7]['isAdded']=_0x26217b[_0x2c39a7]['isAdded']);}['_getDiff'](_0x3d93b8,_0x402e6b=null){const _0x1b8483=this['repository']['getRevision'](_0x3d93b8),_0x3a824b=_0x402e6b?this['repository']['getRevision'](_0x402e6b):null,_0x224e8a=this['_getRevisionsRange'](_0x1b8483,_0x3a824b),_0x19d501=_0x224e8a[_0x224e8a['length']-0x1],_0x29f267=new Map(),_0x58b754={'model':{},'attributes':{},'changes':[]},_0x541a20=new Set(),_0x473096=new Map();for(let _0x223fcb=_0x224e8a['length']-0x1;_0x223fcb>=0x0;_0x223fcb--){const _0x445b35=_0x224e8a[_0x223fcb];for(const _0x261009 of Object['keys'](_0x445b35['diffData']))if(_0x445b35['diffData'][_0x261009]['attachChange']){const _0x1face7=_0x445b35['diffData'][_0x261009]['attachChange'];_0x1face7['isAttached']?(_0x541a20['add'](_0x261009),_0x473096['has'](_0x261009)&&_0x473096['get'](_0x261009)['userId']==_0x1face7['userId']?_0x473096['delete'](_0x261009):_0x473096['set'](_0x261009,_0x1face7)):_0x473096['has'](_0x261009)?(_0x541a20['delete'](_0x261009),_0x473096['delete'](_0x261009)):(_0x541a20['add'](_0x261009),_0x473096['set'](_0x261009,_0x1face7));}else _0x541a20['add'](_0x261009);}for(const _0x1e2396 of _0x541a20){const _0x2f0008=_0x473096['has'](_0x1e2396)&&!_0x473096['get'](_0x1e2396)['isAttached'];let _0x226db7=_0x2f0008?_0x224e8a['length']-0x1:0x0;const _0x84437b=_0x2f0008?-0x1:0x1;for(;_0x224e8a[_0x226db7];){const _0xd65d93=_0x224e8a[_0x226db7];if(_0xd65d93['diffData'][_0x1e2396]){const _0x46b24b=_0x2f0008?_0xd65d93['diffData'][_0x1e2396]['attributesBefore']:_0xd65d93['diffData'][_0x1e2396]['attributesAfter'];_0x58b754['attributes'][_0x1e2396]=_0x46b24b?_0xadda3d(_0x46b24b):{};break;}_0x226db7+=_0x84437b;}}for(const _0x293370 of _0x224e8a){_0x293370['model']={};for(const _0x33ecf3 of _0x293370['authors'])_0x29f267['set'](_0x33ecf3['id'],_0x33ecf3);for(const _0x1b7ec4 of _0x541a20){const _0x3b5d35=_0x293370['diffData'][_0x1b7ec4]?_0x293370['diffData'][_0x1b7ec4]['insertions']:'[]',_0x46ac88=_0x293370['diffData'][_0x1b7ec4]?_0x293370['diffData'][_0x1b7ec4]['deletions']:'[]';_0x293370['model'][_0x1b7ec4]={'insertions':this['_utils']['_makeModelFromViewString'](_0x3b5d35),'deletions':this['_utils']['_makeModelFromViewString'](_0x46ac88)};}}for(const _0x4efa68 of _0x541a20){let _0x575dd3=null,_0x13d893=0x0;const _0x4f21a1=new Map(Array['from'](_0x1b8483['model'][_0x4efa68]['insertions']['markers'])['filter'](([_0x2bf6da])=>!_0x2bf6da['startsWith']('revision:')));let _0x242c9b=0x0;for(const _0x1ccadd of _0x224e8a){const _0x567d68=this['_makeTape'](_0x1ccadd['model'][_0x4efa68]['insertions']);_0x1ccadd==_0x1b8483?(_0x575dd3=_0x567d68,_0x13d893=_0x575dd3['length'],_0x575dd3['forEach'](_0x4959e9=>{_0x4959e9['id']=_0x242c9b++;}),this['_processTape'](_0x575dd3)):this['_markInsertions'](_0x575dd3,_0x567d68);const _0x364edb=_0x575dd3['filter'](_0x29c16f=>!_0x29c16f['isAdded'])['map'](_0x3cc407=>_0x3cc407['id']);let _0x443177=0x0;const _0x39ac40=this['_makeTape'](_0x1ccadd['model'][_0x4efa68]['deletions']);_0x39ac40['forEach'](_0x4ded40=>{_0x4ded40['isRemoved']?_0x4ded40['id']=_0x13d893++:_0x4ded40['id']=_0x364edb[_0x443177++];}),this['_processTape'](_0x39ac40),this['_setDistance'](_0x575dd3,'isAdded'),this['_setDistance'](_0x39ac40,'isRemoved'),_0x1ccadd==_0x1b8483&&this['_markMarkers'](_0x575dd3,_0x4f21a1),_0x575dd3=this['_joinTapes'](_0x575dd3,_0x39ac40),this['_refreshStartEndIndex'](_0x575dd3),this['_setDistance'](_0x575dd3,'isRemoved');}_0x575dd3=_0x575dd3['filter'](_0x5687dd=>!(_0x5687dd['isAdded']&&_0x5687dd['isRemoved']));const _0x4ae3e6=new Map(_0x19d501['model'][_0x4efa68]['deletions']['markers']),_0x59e87a=new Set(_0x4f21a1['keys']());for(const _0xca55b7 of _0x4ae3e6['keys']())_0x59e87a['delete'](_0xca55b7);this['_markSuggestions'](_0x575dd3,_0x59e87a),this['_fixObsoleteTags'](_0x575dd3),_0x575dd3=this['_removeMissingPairs'](_0x575dd3),_0x575dd3=this['_markMismatchedRemovedTags'](_0x575dd3),_0x575dd3=this['_removeUnsupportedChanges'](_0x575dd3);const {root:_0x2c04d1,changes:_0x466373}=this['_makeModelFromTape'](_0x575dd3,_0x29f267,_0x4efa68);_0x58b754['model'][_0x4efa68]=_0x2c04d1;const _0x53a74c=_0x473096['get'](_0x4efa68);if(_0x53a74c){const _0x532ef6=_0x29f267['get'](_0x53a74c['userId']),_0x3b2fde=new z({'author':_0x532ef6,'type':_0x53a74c['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x4efa68});_0x466373['unshift'](_0x3b2fde),_0x58b754['attributes'][_0x4efa68]['revisionHistoryAttachChange']=_0x3b2fde['id'];}_0x58b754['changes']=_0x58b754['changes']['concat'](_0x466373);}return _0x58b754;}['_markMarkers'](_0x3c257a,_0x405059){for(let _0x4e9bee=0x0;_0x4e9bee<_0x3c257a['length'];_0x4e9bee++)for(const [_0x237fea,_0x7b17a5]of _0x405059)!_0x7b17a5['isCollapsed']&&_0x7b17a5['start']['isEqual'](_0x3c257a[_0x4e9bee]['previousPosition'])&&_0x3c257a[_0x4e9bee]['markersStart']['push'](_0x237fea),_0x7b17a5['end']['isEqual'](_0x3c257a[_0x4e9bee]['nextPosition'])&&_0x3c257a[_0x4e9bee]['markersEnd']['push'](_0x237fea);}['_joinTapes'](_0x3349c6,_0x5155d2){let _0x19274d=[],_0x432015=0x0,_0x2be771=0x0;for(;_0x432015<_0x3349c6['length']||_0x2be771<_0x5155d2['length'];){const _0x4ac142=_0x3349c6[_0x432015]||{},_0x41a95c=_0x5155d2[_0x2be771]||{};if(_0x4ac142['id']==_0x41a95c['id'])_0x432015++,_0x2be771++,_0x19274d['push'](_0x4ac142);else{if(_0x41a95c['isRemoved']&&_0x4ac142['isAdded']){const {commonTape:_0x162940,iEnd:_0x50352a,jEnd:_0x505f2d}=this['_threeWayMerge'](_0x3349c6,_0x432015,_0x5155d2,_0x2be771);_0x19274d=_0x19274d['concat'](_0x162940),_0x432015=_0x50352a,_0x2be771=_0x505f2d;}else _0x41a95c['isRemoved']?(_0x2be771++,_0x19274d['push'](_0x41a95c)):(_0x432015++,_0x19274d['push'](_0x4ac142));}}return _0x19274d;}['_markSuggestions'](_0x3a281c,_0x4eccfd){const _0x2a518b=[];for(let _0x30d06d=0x0;_0x30d06d<_0x3a281c['length'];_0x30d06d++){for(let _0x5c4543=0x0;_0x5c4543<_0x3a281c[_0x30d06d]['markersStart']['length'];_0x5c4543++){const _0xffcaac=_0x3a281c[_0x30d06d]['markersStart'][_0x5c4543];if(!_0x4eccfd['has'](_0xffcaac))continue;const {group:_0x4eaeac,type:_0x52f94e,authorId:_0x156f9a}=_0x5a5e50(_0xffcaac);'revision-suggestion'!=_0x4eaeac||'insertion'!=_0x52f94e&&'deletion'!=_0x52f94e||(_0x2a518b['unshift']({'type':_0x52f94e,'name':_0xffcaac,'userId':_0x156f9a}),_0x3a281c[_0x30d06d]['markersStart']['splice'](_0x5c4543,0x1),_0x5c4543--);}_0x1ada5f(_0x3a281c[_0x30d06d]);for(let _0xd9bc2a=0x0;_0xd9bc2a<_0x3a281c[_0x30d06d]['markersEnd']['length'];_0xd9bc2a++){const _0x5d0999=_0x3a281c[_0x30d06d]['markersEnd'][_0xd9bc2a];if(!_0x4eccfd['has'](_0x5d0999))continue;const {group:_0x3902a9,type:_0x3437d5}=_0x5a5e50(_0x5d0999);if('revision-suggestion'!=_0x3902a9||'insertion'!=_0x3437d5&&'deletion'!=_0x3437d5)continue;_0x3a281c[_0x30d06d]['markersEnd']['splice'](_0xd9bc2a,0x1),_0xd9bc2a--;const _0x244fdf=_0x2a518b['findIndex'](_0x253592=>_0x253592['name']==_0x5d0999);_0x244fdf>-0x1&&_0x2a518b['splice'](_0x244fdf,0x1);}}function _0x5a5e50(_0x267212){const _0x3cc075=_0x267212['split'](':');return{'group':_0x3cc075[0x0],'type':_0x3cc075[0x1],'subType':_0x3cc075['length']>=0x5?_0x3cc075[0x2]:null,'id':_0x3cc075['length']<0x5?_0x3cc075[0x2]:_0x3cc075[0x3],'authorId':_0x3cc075['length']<0x5?_0x3cc075[0x3]:_0x3cc075[0x4],'markerCount':0x6==_0x3cc075['length']?_0x3cc075[0x5]:null};}function _0x1ada5f(_0x5dfccb){for(let _0x4a4093=0x0;_0x4a4093<_0x2a518b['length'];_0x4a4093++){if(_0x5dfccb['isAdded']&&'insertion'==_0x2a518b[_0x4a4093]['type']&&_0x5dfccb['isAdded']['userId']==_0x2a518b[_0x4a4093]['userId'])return _0x5dfccb['isAddSuggestion']=_0x2a518b[_0x4a4093],void delete _0x5dfccb['isAdded'];if(!_0x5dfccb['isAdded']&&!_0x5dfccb['isRemoved']&&'deletion'==_0x2a518b[_0x4a4093]['type'])return void(_0x5dfccb['isRemoveSuggestion']=_0x2a518b[_0x4a4093]);}}}['_setDistance'](_0x4e5387,_0x23067e){let _0x1b4805=0x0,_0x1d0857=!0x1;const _0x5a1d0d=new Map();for(const _0x31ef9d of _0x4e5387)_0x31ef9d[_0x23067e]?_0x1d0857&&(_0x1b4805++,_0x1d0857=!0x1):(_0x1b4805++,_0x1d0857=!0x0),_0x5a1d0d['set'](_0x31ef9d['id'],_0x1b4805);for(let _0x4d5fae=0x0;_0x4d5fae<_0x4e5387['length'];_0x4d5fae++){if('isRemoved'==_0x23067e&&_0x4e5387[_0x4d5fae]['isAdded']||'isAdded'==_0x23067e&&_0x4e5387[_0x4d5fae]['isRemoved'])continue;if('text'==_0x4e5387[_0x4d5fae]['type']){_0x4e5387[_0x4d5fae]['distance']=0x0;continue;}const _0x2fdcd6=_0x5a1d0d['get'](_0x4e5387[_0x4d5fae]['pairId']),_0x4f90e1=_0x5a1d0d['get'](_0x4e5387[_0x4d5fae]['id']);_0x4e5387[_0x4d5fae]['distance']=_0x2fdcd6-_0x4f90e1;}}['_getRevisionsRange'](_0x46b6d5,_0xaaadda,_0x19c1bc=!0x1){const _0x340f92=[];let _0x380c93=this['repository']['getIndex'](_0x46b6d5),_0xfa9a9c=this['repository']['getIndex'](_0xaaadda);for(-0x1==_0xfa9a9c&&(_0xfa9a9c=this['repository']['_revisions']['length'],_0x19c1bc=!0x1);_0x380c93<_0xfa9a9c;)_0x340f92['push'](this['repository']['getRevision'](_0x380c93)),_0x380c93++;return _0x19c1bc&&_0x340f92['push'](this['repository']['getRevision'](_0x380c93)),_0x340f92;}['_threeWayMerge'](_0x1db2d6,_0x5035d4,_0x39ef38,_0x1c1b42){const _0x2f866a=this['editor']['model']['schema'];let _0x5093df=_0x5035d4;for(;_0x1db2d6[_0x5093df]&&_0x1db2d6[_0x5093df]['isAdded'];)_0x5093df++;let _0xabd3a3=_0x1c1b42;for(;_0x39ef38[_0xabd3a3]&&_0x39ef38[_0xabd3a3]['isRemoved'];)_0xabd3a3++;_0x16b88d(_0x1db2d6,_0x5035d4,_0x5093df),_0x16b88d(_0x39ef38,_0x1c1b42,_0xabd3a3);const _0x588bb4=_0x39ef38['slice'](_0x1c1b42,_0xabd3a3)['concat'](_0x1db2d6['slice'](_0x5035d4,_0x5093df));return _0x588bb4['sort']((_0x3212b6,_0xe1f872)=>_0x3212b6['side']!=_0xe1f872['side']?_0x3212b6['side']-_0xe1f872['side']:_0x3212b6['level']!=_0xe1f872['level']?_0x3212b6['level']-_0xe1f872['level']:_0x3212b6['distance']!=_0xe1f872['distance']?_0xe1f872['distance']-_0x3212b6['distance']:!!_0x3212b6['isAdded']!=!!_0xe1f872['isAdded']?-0x1==_0x3212b6['side']||0x0==_0x3212b6['side']?_0x3212b6['isAdded']?-0x1:0x1:_0x3212b6['isAdded']?0x1:-0x1:_0x3212b6['index']-_0xe1f872['index']),{'commonTape':_0x588bb4,'iEnd':_0x5093df,'jEnd':_0xabd3a3};function _0x16b88d(_0x526a23,_0x366b09,_0x944a86){let _0x5ae45c=-0x1,_0x215716=Number['POSITIVE_INFINITY'],_0x1bfd3e=!0x0;for(let _0x27ed7b=_0x366b09;_0x27ed7b<_0x944a86;_0x27ed7b++)if(_0x2f866a['isInline'](_0x526a23[_0x27ed7b]['item'])||(_0x1bfd3e=!0x1),_0x526a23[_0x27ed7b]['item']['startIndex']<_0x366b09&&(_0x5ae45c=_0x27ed7b),_0x526a23[_0x27ed7b]['item']['endIndex']>=_0x944a86){_0x215716=_0x27ed7b;break;}_0x1bfd3e&&(_0x5ae45c=_0x944a86-0x1);for(let _0x2c9427=_0x366b09;_0x2c9427<_0x944a86;_0x2c9427++)_0x526a23[_0x2c9427]['side']=_0x2c9427<=_0x5ae45c?-0x1:_0x2c9427<_0x215716?0x0:0x1,_0x526a23[_0x2c9427]['index']=_0x2c9427;let _0x1cc9e5=0x0;for(let _0x186283=_0x366b09;_0x186283<=_0x5ae45c;_0x186283++)0x0==_0x526a23[_0x186283]['distance']?_0x526a23[_0x186283]['level']=_0x1cc9e5:(_0x1cc9e5++,_0x526a23[_0x186283]['level']=_0x1cc9e5,_0x1cc9e5++);for(let _0x30bfd9=_0x366b09;_0x30bfd9<_0x944a86;_0x30bfd9++)0x0==_0x526a23[_0x30bfd9]['side']&&(_0x526a23[_0x30bfd9]['level']=_0x1cc9e5);_0x1cc9e5=0x0;for(let _0x1b5b83=_0x944a86-0x1;_0x1b5b83>=_0x215716;_0x1b5b83--)0x0==_0x526a23[_0x1b5b83]['distance']?_0x526a23[_0x1b5b83]['level']=_0x1cc9e5:(_0x1cc9e5--,_0x526a23[_0x1b5b83]['level']=_0x1cc9e5,_0x1cc9e5--);}}['_fixObsoleteTags'](_0x48d975){const _0x1ade8c=new Map(),_0xa2e947=this['editor']['model']['schema'];for(let _0x2869a3=0x1;_0x2869a3<_0x48d975['length'];_0x2869a3++){let _0x3e3fd1,_0x1499df,_0x40f521;const _0x45f183=_0x48d975[_0x2869a3],_0x5a3b93=_0x48d975[_0x2869a3-0x1];if('text'==_0x45f183['type'])continue;if(_0x45f183['type']!=_0x5a3b93['type'])continue;if(!_0xa2e947['isBlock'](_0x5a3b93['item'])||_0xa2e947['isLimit'](_0x5a3b93['item']))continue;if(!_0xa2e947['isBlock'](_0x45f183['item'])||_0xa2e947['isLimit'](_0x45f183['item']))continue;if((_0x48d975[_0x2869a3]['isAdded']||_0x48d975[_0x2869a3]['isAddSuggestion'])&&_0x48d975[_0x2869a3-0x1]['isRemoved'])_0x3e3fd1=_0x48d975[_0x2869a3],_0x1499df=_0x48d975[_0x2869a3-0x1],_0x40f521=_0x2869a3-0x1;else{if(!_0x48d975[_0x2869a3]['isRemoved']||!_0x48d975[_0x2869a3-0x1]['isAdded']&&!_0x48d975[_0x2869a3-0x1]['isAddSuggestion'])continue;_0x3e3fd1=_0x48d975[_0x2869a3-0x1],_0x1499df=_0x48d975[_0x2869a3],_0x40f521=_0x2869a3;}const _0x223561=_0x3e3fd1['level']==_0x1499df['level'],_0x5dcec6=Math['abs'](_0x3e3fd1['level'])<Math['abs'](_0x1499df['level'])&&0x0==_0x1499df['distance'];(_0x223561||_0x5dcec6)&&(_0x1ade8c['set'](_0x1499df['id'],_0x3e3fd1['id']),_0x48d975['splice'](_0x40f521,0x1),_0x2869a3--,_0x3e3fd1['isAdded']=!0x1);}for(let _0x3dac13=0x0;_0x3dac13<_0x48d975['length'];_0x3dac13++)_0x1ade8c['has'](_0x48d975[_0x3dac13]['pairId'])&&(_0x48d975[_0x3dac13]['pairId']=_0x1ade8c['get'](_0x48d975[_0x3dac13]['pairId']));}['_removeMissingPairs'](_0x1ae0cb){const _0x4b7b33=new Set(_0x1ae0cb['map'](_0x520ffc=>_0x520ffc['id']));for(let _0x1779c6=0x0;_0x1779c6<_0x1ae0cb['length'];_0x1779c6++)_0x4b7b33['has'](_0x1ae0cb[_0x1779c6]['pairId'])||0x0==_0x1ae0cb[_0x1779c6]['distance']||(_0x1ae0cb[_0x1779c6]['isIncorrect']=!0x0);return _0x1ae0cb['filter'](_0x1daba5=>!_0x1daba5['isIncorrect']);}['_markMismatchedRemovedTags'](_0x3a7b50){const _0x713e1b=new Set();for(let _0x49c1c9=0x0;_0x49c1c9<_0x3a7b50['length'];_0x49c1c9++){if(_0x713e1b['has'](_0x3a7b50[_0x49c1c9]['id'])&&_0x3a7b50[_0x49c1c9]['isRemoved']&&(_0x3a7b50[_0x49c1c9]['isIncorrect']=!0x0),_0x3a7b50[_0x49c1c9]['isIncorrect'])continue;if(0x0==_0x3a7b50[_0x49c1c9]['distance'])continue;if('elementStart'!=_0x3a7b50[_0x49c1c9]['type'])continue;if(null==_0x3a7b50[_0x49c1c9]['pairId'])continue;let _0x3fe499=_0x49c1c9+0x1,_0x597b25=0x0;for(;_0x3a7b50[_0x3fe499]['id']!=_0x3a7b50[_0x49c1c9]['pairId'];)'elementStart'==_0x3a7b50[_0x3fe499]['type']?_0x597b25++:'elementEnd'==_0x3a7b50[_0x3fe499]['type']&&_0x597b25--,_0x3fe499++;if(0x0!=_0x597b25){if(_0x3a7b50[_0x49c1c9]['isRemoved'])_0x3a7b50[_0x49c1c9]['isIncorrect']=!0x0;else{for(;_0x3fe499!=_0x49c1c9;)_0x3a7b50[_0x3fe499]['isRemoved']&&0x0!=_0x3a7b50[_0x3fe499]['distance']&&(_0x3a7b50[_0x3fe499]['isIncorrect']=!0x0,_0x713e1b['add'](_0x3a7b50[_0x3fe499]['pairId'])),_0x3fe499--;}}}return _0x3a7b50['filter'](_0x5de244=>!_0x5de244['isIncorrect']);}['_removeUnsupportedChanges'](_0x515b41){const _0x1aff8e=this['editor']['model']['schema'];for(let _0x5187e9=0x0;_0x5187e9<_0x515b41['length'];_0x5187e9++){if(!(_0x515b41[_0x5187e9]['isAdded']||_0x515b41[_0x5187e9]['isAddSuggestion']||_0x515b41[_0x5187e9]['isRemoved']||_0x515b41[_0x5187e9]['isRemoveSuggestion']))continue;if(0x0==_0x515b41[_0x5187e9]['distance'])continue;const _0x8a9d7=_0x515b41[_0x5187e9]['item'];_0x1aff8e['isBlock'](_0x8a9d7)||_0x1aff8e['isLimit'](_0x8a9d7)||(_0x515b41[_0x5187e9]['isAdded']&&delete _0x515b41[_0x5187e9]['isAdded'],_0x515b41[_0x5187e9]['isAddSuggestion']&&delete _0x515b41[_0x5187e9]['isAddSuggestion'],_0x515b41[_0x5187e9]['isRemoveSuggestion']&&delete _0x515b41[_0x5187e9]['isRemoveSuggestion'],_0x515b41[_0x5187e9]['isRemoved']&&(_0x515b41[_0x5187e9]['isIncorrect']=!0x0));}return _0x515b41['filter'](_0x14c85f=>!_0x14c85f['isIncorrect']);}['_makeModelFromTape'](_0x587e55,_0x5a4b6f,_0x64dd3c){const _0x5dcfb0=new _0xa6ead0(),_0x4dd24f=[],_0x2ae8cc=new Map(),_0x3a8c9d=this['editor']['model'],_0x21c71c=_0x3a8c9d['schema'],_0x2946e3=[_0x5dcfb0],_0x5a7f01={},_0x1b400a={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x2ce3c7=null;const _0x41ba2f=[0x0];for(let _0x330cbc=0x0;_0x330cbc<_0x587e55['length'];_0x330cbc++)if('elementStart'===_0x587e55[_0x330cbc]['type']){_0x587e55[_0x330cbc]['previousPosition']=_0x3a8c9d['createPositionFromPath'](_0x5dcfb0,_0x41ba2f);const _0x9c82ca=new _0x39812c(_0x587e55[_0x330cbc]['item']['name'],_0x587e55[_0x330cbc]['item']['getAttributes']());_0x2946e3[0x0]['_appendChild'](_0x9c82ca),_0x41ba2f['push'](0x0),_0x2946e3['unshift'](_0x9c82ca),_0x587e55[_0x330cbc]['nextPosition']=_0x3a8c9d['createPositionFromPath'](_0x5dcfb0,_0x41ba2f);}else'elementEnd'===_0x587e55[_0x330cbc]['type']?(_0x2946e3['shift'](),_0x587e55[_0x330cbc]['previousPosition']=_0x3a8c9d['createPositionFromPath'](_0x5dcfb0,_0x41ba2f),_0x41ba2f['pop'](),_0x41ba2f[_0x41ba2f['length']-0x1]++,_0x587e55[_0x330cbc]['nextPosition']=_0x3a8c9d['createPositionFromPath'](_0x5dcfb0,_0x41ba2f)):(_0x587e55[_0x330cbc]['previousPosition']=_0x3a8c9d['createPositionFromPath'](_0x5dcfb0,_0x41ba2f),_0x2ce3c7?_0x2ce3c7['_data']+=_0x587e55[_0x330cbc]['item']['data']:_0x2ce3c7=new _0x58927f(_0x587e55[_0x330cbc]['item']['data'],_0x587e55[_0x330cbc]['item']['getAttributes']()),_0x587e55[_0x330cbc+0x1]&&'text'===_0x587e55[_0x330cbc+0x1]['type']&&_0x4cea60(_0x2ce3c7,_0x587e55[_0x330cbc+0x1]['item'])||(_0x2946e3[0x0]['_appendChild'](_0x2ce3c7),_0x2ce3c7=null),_0x41ba2f[_0x41ba2f['length']-0x1]+=_0x587e55[_0x330cbc]['item']['offsetSize'],_0x587e55[_0x330cbc]['nextPosition']=_0x3a8c9d['createPositionFromPath'](_0x5dcfb0,_0x41ba2f));for(let _0x47d089=0x0;_0x47d089<_0x587e55['length'];_0x47d089++){const _0x8541d7=_0x587e55[_0x47d089]['previousPosition'],_0x25be19=_0x587e55[_0x47d089]['nextPosition'];for(const _0x3043e4 of _0x587e55[_0x47d089]['markersStart'])_0x2ae8cc['set'](_0x3043e4,{'start':_0x8541d7,'end':null});_0x46af74('isRemoveSuggestion',_0x47d089,_0x8541d7,_0x25be19),_0x46af74('isAddSuggestion',_0x47d089,_0x8541d7,_0x25be19),_0x46af74('isRemoved',_0x47d089,_0x8541d7,_0x25be19),_0x46af74('isAdded',_0x47d089,_0x8541d7,_0x25be19);for(const _0x3c220c of _0x587e55[_0x47d089]['markersEnd']){const _0x31a57a=_0x2ae8cc['get'](_0x3c220c);_0x31a57a?_0x31a57a['end']=_0x25be19:_0x2ae8cc['set'](_0x3c220c,{'start':_0x25be19,'end':_0x25be19});}}for(const [_0x27f326,_0x5bed66]of _0x2ae8cc){const _0x159f85=this['editor']['model']['createRange'](_0x5bed66['start'],_0x5bed66['end']);_0x5dcfb0['markers']['set'](_0x27f326,_0x159f85);}return _0x4dd24f['sort']((_0x144661,_0x1e5e1f)=>{const _0x510d5d=_0x5dcfb0['markers']['get']('revision:'+_0x144661['id']),_0x2bc5d2=_0x5dcfb0['markers']['get']('revision:'+_0x1e5e1f['id']);return _0x510d5d['start']['isBefore'](_0x2bc5d2['start'])?-0x1:_0x510d5d['start']['isAfter'](_0x2bc5d2['start'])?0x1:_0x510d5d['end']['isBefore'](_0x2bc5d2['end'])?-0x1:_0x510d5d['end']['isAfter'](_0x2bc5d2['end'])?0x1:'add'===_0x144661['type']?-0x1:0x1;}),{'root':_0x5dcfb0,'changes':_0x4dd24f};function _0x46af74(_0x49db35,_0x85049,_0x3e3cf5,_0x12f4b8){const _0x3921c2=!!_0x587e55[_0x85049][_0x49db35],_0x44dc6e=_0x3921c2?_0x587e55[_0x85049][_0x49db35]['userId']:null,_0x28a4e9=_0x85049===_0x587e55['length']-0x1,_0x2144ff=_0x1b400a[_0x49db35][0x0],_0x472ff9=_0x21c71c['isObject'](_0x587e55[_0x85049]['item']);!_0x5a7f01[_0x49db35]&&_0x3921c2?_0x5a7f01[_0x49db35]={'start':_0x3e3cf5,'tapeItem':_0x587e55[_0x85049],'userId':_0x44dc6e,'type':_0x49db35}:_0x5a7f01[_0x49db35]&&!_0x3921c2?(_0x5a7f01[_0x49db35]['end']=_0x3e3cf5,_0x2e6ce9(_0x5a7f01[_0x49db35]),_0x5a7f01[_0x49db35]=null):_0x5a7f01[_0x49db35]&&_0x3921c2&&_0x5a7f01[_0x49db35]['userId']!==_0x44dc6e&&(_0x5a7f01[_0x49db35]['end']=_0x3e3cf5,_0x2144ff&&_0x2144ff['userId']===_0x5a7f01[_0x49db35]['userId']||_0x2e6ce9(_0x5a7f01[_0x49db35]),_0x5a7f01[_0x49db35]={'start':_0x3e3cf5,'tapeItem':_0x587e55[_0x85049],'userId':_0x44dc6e,'type':_0x49db35}),_0x5a7f01[_0x49db35]&&_0x472ff9&&('elementStart'!==_0x587e55[_0x85049]['type']||_0x2144ff&&_0x2144ff['userId']===_0x44dc6e||_0x1b400a[_0x49db35]['unshift']({'userId':_0x44dc6e,'object':_0x587e55[_0x85049]['item'],'change':_0x5a7f01[_0x49db35]}),'elementEnd'===_0x587e55[_0x85049]['type']&&_0x2144ff&&_0x2144ff['object']===_0x587e55[_0x85049]['item']&&(_0x1b400a[_0x49db35]['shift'](),_0x5a7f01[_0x49db35]=_0x2144ff['change'])),_0x5a7f01[_0x49db35]&&_0x28a4e9&&(_0x5a7f01[_0x49db35]['end']=_0x12f4b8,_0x2e6ce9(_0x5a7f01[_0x49db35]),_0x5a7f01[_0x49db35]=null);}function _0x2e6ce9({start:_0x243d1a,end:_0x160776,tapeItem:_0x2995e8,userId:_0x414401,type:_0x2c7755}){const _0x36ba15=_0x2995e8['item'],_0x30a6ce=_0x3a8c9d['schema']['isBlock'](_0x36ba15)&&!_0x3a8c9d['schema']['isLimit'](_0x36ba15),_0x5ebf8a=_0x243d1a['nodeAfter']==_0x160776['parent']&&_0x160776['isAtStart'];if(_0x30a6ce&&_0x5ebf8a)return;const _0x16afa4=_0x3a8c9d['createRange'](_0x243d1a,_0x160776),_0x16994a=_0x5a4b6f['get'](_0x414401),_0x524806=new z({'author':_0x16994a,'type':'isAdded'==_0x2c7755||'isAddSuggestion'==_0x2c7755?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x2c7755||'isRemoveSuggestion'==_0x2c7755},'createdAt':new Date(),'rootName':_0x64dd3c});_0x4dd24f['push'](_0x524806),_0x5dcfb0['markers']['set']('revision:'+_0x524806['id'],_0x16afa4);}function _0x4cea60(_0x13ac3b,_0x3091bd){const _0x47ead2=_0x13ac3b['getAttributes'](),_0x13e630=_0x3091bd['getAttributes']();for(const _0x419f93 of _0x47ead2){if(_0x419f93[0x1]!==_0x3091bd['getAttribute'](_0x419f93[0x0]))return!0x1;_0x13e630['next']();}return _0x13e630['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x986e32=>{const _0xae71c=_0x986e32['markerName']['split'](':')[0x1],_0x145123=this['_getChangeFromId'](_0xae71c);if(!_0x145123)return null;const _0x545d55='add'==_0x145123['type']?'insertion':'deletion',_0x529696=['ck-suggestion-marker','ck-suggestion-marker-'+_0x545d55];return _0x145123['data']['isSuggestion']&&_0x529696['push']('ck-suggestion-marker-'+_0x545d55+'-new'),this['activeChange']==_0x145123&&_0x529696['push']('ck-suggestion-marker--active'),{'classes':_0x529696,'attributes':{'data-change-id':_0xae71c}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x104279=>{_0x104279['on']('element:pre',(_0x484060,_0x53be68,_0x215fde)=>{const _0x5b5f21=_0x53be68['viewItem']['getChild'](0x0);if(!_0x5b5f21||!_0x5b5f21['is']('element','code'))return;if(!_0x215fde['consumable']['consume'](_0x5b5f21,{'attributes':['vid_start','vid_end']}))return;const _0x3d3e27=_0x53be68['modelRange']['start']['nodeAfter'];_0x215fde['writer']['setAttribute']('vid_start',_0x5b5f21['getAttribute']('vid_start'),_0x3d3e27),_0x215fde['writer']['setAttribute']('vid_end',_0x5b5f21['getAttribute']('vid_end'),_0x3d3e27);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x37576f=>{_0x37576f['on']('element',(_0x4f96fd,_0x18a30c,_0x4bfbfc)=>{if(!_0x4bfbfc['consumable']['consume'](_0x18a30c['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x18a30c['modelRange']['isCollapsed'])return;const _0x1f1ea6=_0x18a30c['modelRange']['start']['nodeAfter'];_0x1f1ea6['hasAttribute']('vid_start')||_0x1f1ea6['hasAttribute']('vid')||(_0x4bfbfc['writer']['setAttribute']('vid_start',_0x18a30c['viewItem']['getAttribute']('vid_start'),_0x1f1ea6),_0x4bfbfc['writer']['setAttribute']('vid_end',_0x18a30c['viewItem']['getAttribute']('vid_end'),_0x1f1ea6));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x10af3c=>_0x10af3c['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x5e6df0,[,_0xbdeb60])=>{['vid_start','vid_end','vid']['includes'](_0xbdeb60)&&(_0x5e6df0['return']=!0x0,_0x5e6df0['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x2127b9=>{_0x2127b9['on']('attribute:vid',(_0x43a43a,_0x521727,_0x593855)=>{if('\x20'!=_0x521727['item']['data']||_0x521727['item']['parent']['maxOffset']>0x1)return;if(!_0x593855['consumable']['consume'](_0x521727['item'],_0x43a43a['name']))return;const _0x110284=_0x593855['writer'],_0x2ce7b8=_0x593855['mapper']['toViewRange'](_0x521727['range']);_0x110284['wrap'](_0x2ce7b8,_0x110284['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x152f2c){const _0x914b93=_0x152f2c['plugins']['get']('RevisionViewer');return(_0x1d3a3a,_0x1ab433,_0x305c2b)=>{const _0x261d8a=_0x1ab433['markerName']['split'](':')[0x1],_0x17cd28=_0x914b93['_getChangeFromId'](_0x261d8a);if(!_0x17cd28)return null;const _0x3ef76d='add'==_0x17cd28['type']?'split':'merge';if(!_0x305c2b['consumable']['test'](_0x1ab433['markerRange'],_0x1d3a3a['name']))return;const _0x8d48a4=_0x1ab433['markerRange']['getWalker'](),_0x8fc5c3=_0x1ab433['markerRange']['start'],_0x277122=_0x152f2c['model']['schema'];let _0x550329=null,_0x3f8a7f=null,_0x1275f9=!0x1,_0x212d02=!0x1;for(const _0x48e68f of _0x8d48a4){const _0xebe208=_0x48e68f['item'];_0x1275f9=_0x1275f9||_0x277122['isContent'](_0xebe208);const _0x4b3e6c=_0x305c2b['mapper']['toViewElement'](_0xebe208);if(_0x4b3e6c&&_0x4b3e6c['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x48e68f['type']&&(_0x277122['isBlock'](_0xebe208)&&!_0x277122['isLimit'](_0xebe208)&&(_0xebe208['nextSibling']||_0x8fc5c3['isAtEnd']?_0x550329&&_0x550329['parent']==_0xebe208||(_0x550329=_0xebe208,_0x10c187(_0x48e68f['previousPosition']),_0x212d02=!0x0):_0x3f8a7f=_0x3f8a7f||_0x48e68f['previousPosition']));}function _0x10c187(_0xf7fd28){const _0x2d1d55=_0x305c2b['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x3ef76d}),_0x22bee1=_0x305c2b['mapper']['toViewPosition'](_0xf7fd28);_0x17cd28['data']['isSuggestion']&&_0x305c2b['writer']['addClass']('ck-suggestion-marker-'+_0x3ef76d+'-new',_0x2d1d55),_0x914b93['activeChange']==_0x17cd28&&_0x305c2b['writer']['addClass']('ck-suggestion-marker--active',_0x2d1d55),_0x305c2b['writer']['insert'](_0x22bee1,_0x2d1d55),_0x305c2b['mapper']['bindElementToMarker'](_0x2d1d55,_0x1ab433['markerName']);}_0x1275f9||_0x212d02||!_0x3f8a7f||_0x10c187(_0x3f8a7f);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x39d5fe,_0x49695c,_0xf5d037)=>{const _0x11c387=_0xf5d037['mapper']['markerNameToElements'](_0x49695c['markerName']);if(_0x11c387){for(const _0x2f34f4 of _0x11c387)(_0x2f34f4['hasClass']('ck-suggestion-marker-split')||_0x2f34f4['hasClass']('ck-suggestion-marker-merge'))&&(_0xf5d037['mapper']['unbindElementFromMarkerName'](_0x2f34f4,_0x49695c['markerName']),_0xf5d037['writer']['remove'](_0x2f34f4));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x96b40e,_0xa10d7e,_0x7fee52)=>{const _0x101ca3=_0xa10d7e['markerName']['split'](':')[0x1],_0x2e14ae=this['_getChangeFromId'](_0x101ca3);if(!_0x2e14ae)return null;const _0x471db6='add'==_0x2e14ae['type']?'split':'merge';if(_0x7fee52['consumable']['test'](_0xa10d7e['markerRange'],_0x96b40e['name']))for(const _0x558f4d of _0xa10d7e['markerRange']['getItems']()){if(!_0x558f4d['is']('element','softBreak'))continue;const _0x45bb9f=_0x7fee52['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x471db6}),_0x422889=_0x7fee52['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x558f4d));_0x2e14ae['data']['isSuggestion']&&_0x7fee52['writer']['addClass']('ck-suggestion-marker-'+_0x471db6+'-new',_0x45bb9f),this['activeChange']==_0x2e14ae&&_0x7fee52['writer']['addClass']('ck-suggestion-marker--active',_0x45bb9f),_0x7fee52['writer']['insert'](_0x422889,_0x45bb9f),_0x7fee52['mapper']['bindElementToMarker'](_0x45bb9f,_0xa10d7e['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x43bc1f=>{for(const _0x4148f6 of this['editor']['model']['document']['getRootNames']()){const _0x33d59e=this['editor']['model']['document']['getRoot'](_0x4148f6),_0x7dd3be=this['editor']['editing']['view']['document']['getRoot'](_0x4148f6);if(_0x7dd3be){const _0xb15caa=_0x33d59e['getAttribute']('revisionHistoryAttachChange');if(_0x43bc1f['removeAttribute']('data-change-id',_0x7dd3be),_0x43bc1f['removeClass']('ck-revision-history-root-add',_0x7dd3be),_0x43bc1f['removeClass']('ck-revision-history-root-remove',_0x7dd3be),_0x43bc1f['removeClass']('ck-revision-history-root--active',_0x7dd3be),_0xb15caa){const _0x345092=this['_getChangeFromId'](_0xb15caa);if(!_0x345092)return null;_0x43bc1f['setAttribute']('data-change-id',_0xb15caa,_0x7dd3be),_0x43bc1f['addClass']('ck-revision-history-root-'+_0x345092['type'],_0x7dd3be),this['activeChange']==_0x345092&&_0x43bc1f['addClass']('ck-revision-history-root--active',_0x7dd3be);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x12b850=>'revision-comment:'+_0x12b850,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x2cd961=>'revision-suggestion:'+_0x2cd961,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x15781e=>({'name':'suggestion:'+_0x15781e,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x16ac05=>{const _0x9d1c=_0x16ac05['markerName']['split'](':')[0x1];return'insertion'!=_0x9d1c&&'deletion'!=_0x9d1c?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x9d1c]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',J(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',J(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x54fb05,_0x588b49,_0x5180cb)=>{const _0x4f5f04=_0x5180cb['mapper']['markerNameToElements'](_0x588b49['markerName']);if(_0x4f5f04){for(const _0x229d2a of _0x4f5f04)_0x229d2a['is']('uiElement')&&(_0x5180cb['mapper']['unbindElementFromMarkerName'](_0x229d2a,_0x588b49['markerName']),_0x5180cb['writer']['remove'](_0x229d2a));}},{'priority':'high'});}['_getChangeFromId'](_0x2f768d){return this['_changeIdToChange']['get'](_0x2f768d);}['_getViewForChange'](_0x2a66ea){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new q(this['editor']['locale'],_0x2a66ea),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x515d92,_0x3fe225,_0x386e2c,_0x5548df)=>{_0x5548df&&this['_balloon']['remove'](_0x5548df),_0x386e2c&&(this['_balloon']['add']({'view':_0x386e2c,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x403b02=this['editor']['editing'],_0x13cd7a=this['_getChangeFromId'](_0x386e2c['changeId']);let _0x561e47;if(_0x13cd7a['data']['isOnRoot']){const _0x12b9df=_0x403b02['view']['getDomRoot'](_0x13cd7a['rootName']);_0x561e47=Array['from'](_0x12b9df['getClientRects']());}else{const _0x3bc540=this['editor']['model']['markers']['get']('revision:'+_0x386e2c['changeId']);_0x561e47=Array['from'](_0x403b02['mapper']['markerNameToElements'](_0x3bc540['name']))['map'](_0x235082=>_0x403b02['view']['domConverter']['mapViewToDom'](_0x235082))['map'](_0x2eb365=>Array['from'](_0x2eb365['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x561e47[0x0];return _0x561e47['find'](_0x3f449d=>_0x3f449d['top']-0x3<=this['_activeViewTarget']['y']&&_0x3f449d['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x3f449d['left']-0x3<=this['_activeViewTarget']['x']&&_0x3f449d['right']+0x3>=this['_activeViewTarget']['x'])||_0x561e47[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x50c388,_0x293b59,_0x263ed7,_0x2c4196)=>{this['activeView']=_0x263ed7?this['_getViewForChange'](_0x263ed7):null,this['editor']['model']['change'](()=>{const _0x454500=this['editor']['editing'];_0x2c4196&&(_0x2c4196['data']['isOnRoot']?_0x454500['view']['change'](_0x49bfa8=>{_0x49bfa8['removeClass']('ck-revision-history-root--active',_0x454500['view']['document']['getRoot'](_0x2c4196['rootName']));}):_0x454500['reconvertMarker']('revision:'+_0x2c4196['id'])),_0x263ed7&&(_0x263ed7['data']['isOnRoot']?_0x454500['view']['change'](_0x53a8e1=>{_0x53a8e1['addClass']('ck-revision-history-root--active',_0x454500['view']['document']['getRoot'](_0x263ed7['rootName']));}):_0x454500['reconvertMarker']('revision:'+_0x263ed7['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x5dfd6a,_0x5258b1)=>{if(this['activeChange'])return;const _0x1598ad=this['_findChangeIdFromDomTarget'](_0x5258b1['target']),_0x514c92=this['_changeIdToChange']['get'](_0x1598ad);_0x514c92?(this['_activeViewTarget']={'x':_0x5258b1['domEvent']['x'],'y':_0x5258b1['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x514c92)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x395716,_0x46f4e1)=>{const _0x26c823=this['_findChangeIdFromDomTarget'](_0x46f4e1['target']),_0x163d52=this['_changeIdToChange']['get'](_0x26c823);_0x163d52?(this['_activeViewTarget']={'x':_0x46f4e1['domEvent']['x'],'y':_0x46f4e1['domEvent']['y']},_0x163d52===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x163d52):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x1bdd41){do{const _0x52298d=_0x1bdd41['getAttribute']('data-change-id');if(_0x52298d)return _0x52298d;_0x1bdd41=_0x1bdd41['parent'];}while(_0x1bdd41);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x1d5508=>{for(const _0x3f9b54 of this['editor']['model']['markers'])_0x1d5508['removeMarker'](_0x3f9b54);});}}function J(_0x12f743,_0x2a541e){return(_0x4c9dbe,_0x5db29d,_0x41261e)=>{if(!_0x41261e['consumable']['test'](_0x5db29d['markerRange'],_0x4c9dbe['name']))return;const _0x128640=_0x5db29d['markerRange']['getWalker'](),_0x7ada83=_0x5db29d['markerRange']['start'],_0x3bbf8c=_0x12f743['model']['schema'];let _0x20afed=null,_0x5876c9=null,_0x133116=!0x1,_0x4fb599=!0x1;for(const _0xde1f22 of _0x128640){const _0x55a8d1=_0xde1f22['item'];_0x133116=_0x133116||_0x3bbf8c['isContent'](_0x55a8d1);const _0x2d785f=_0x41261e['mapper']['toViewElement'](_0x55a8d1);if(_0x2d785f&&_0x2d785f['getCustomProperty']('addHighlight'))return;'elementEnd'==_0xde1f22['type']&&(_0x3bbf8c['isBlock'](_0x55a8d1)&&!_0x3bbf8c['isLimit'](_0x55a8d1)&&(_0x55a8d1['nextSibling']||_0x7ada83['isAtEnd']?_0x20afed&&_0x20afed['parent']==_0x55a8d1||(_0x20afed=_0x55a8d1,_0x5c8740(_0xde1f22['previousPosition']),_0x4fb599=!0x0):_0x5876c9=_0x5876c9||_0xde1f22['previousPosition']));}function _0x5c8740(_0x26b9bb){const _0x36c7c5=_0x41261e['mapper']['toViewPosition'](_0x26b9bb),_0x251a71=_0x41261e['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x2a541e});_0x41261e['writer']['insert'](_0x36c7c5,_0x251a71),_0x41261e['mapper']['bindElementToMarker'](_0x251a71,_0x5db29d['markerName']);}_0x133116||_0x4fb599||!_0x5876c9||_0x5c8740(_0x5876c9);};}class RestoreRevisionCommand extends _0x5c344b{constructor(_0x184cb0){super(_0x184cb0);const _0x4fb37e=_0x184cb0['plugins']['get'](u);this['affectsData']=!0x1,this['listenTo'](_0x4fb37e,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x4fb37e,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0xaffa08=this['editor'],_0x52cdff=_0xaffa08['plugins']['get'](u),_0x372155=_0x52cdff['isReady']?_0x52cdff['diff']['newRevisionId']:null;_0xaffa08['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x372155);}['refresh'](){const {isReady:_0xd6960a,isEnabled:_0x2de3f6,repository:_0x50d16d,diff:_0x3aaf3a}=this['editor']['plugins']['get'](u),_0x524cc3=_0x3aaf3a&&_0x50d16d['getLaterVisibleRevision'](_0x3aaf3a['newRevisionId']);this['isEnabled']=_0xd6960a&&_0x2de3f6&&Boolean(_0x524cc3);}}class ShowChangeCommand extends _0x5c344b{['_step'];constructor(_0xfa6684,{direction:_0x5b7f31}){super(_0xfa6684);const _0x1a6731=_0xfa6684['plugins']['get'](u);this['affectsData']=!0x1,this['_step']='forward'===_0x5b7f31?0x1:-0x1,this['listenTo'](_0x1a6731,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x1a6731,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x1a6731,'change:activeChange',()=>this['refresh']());}['execute'](){const _0xf44fb5=this['editor'],_0x31d662=_0xf44fb5['plugins']['get'](u),{isNavigationMode:_0x1d8f78,currentChangeNumber:_0x5a5463}=_0x31d662;let _0x462bdd;if(_0x31d662['activeChange']=_0x1d8f78?_0x31d662['diff']['changes']['get'](_0x5a5463+this['_step']):_0x31d662['diff']['changes']['first'],_0x31d662['activeChange']['data']['isOnRoot'])_0x462bdd=_0xf44fb5['editing']['view']['getDomRoot'](_0x31d662['activeChange']['rootName']);else{const _0x450b43=_0xf44fb5['model']['markers']['get']('revision:'+_0x31d662['activeChange']['id']);_0x462bdd=_0xcc7916(_0xf44fb5['editing'],_0x450b43);}_0x5bc707({'target':_0x462bdd,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x4cc27b,currentChangeNumber:_0x25134b,numberOfChanges:_0x1e31be,isReady:_0x3d150c,isEnabled:_0xadba43}=this['editor']['plugins']['get'](u);this['isEnabled']=!!(_0xadba43&&_0x3d150c&&_0x1e31be)&&(!_0x4cc27b||(0x1===this['_step']?_0x25134b<_0x1e31be-0x1:_0x25134b>0x0));}}class xi extends _0x584d23{constructor(_0x2cfdaa){super(_0x2cfdaa);const _0x3e6be6=this['bindTemplate'],_0x9d3d7a=new _0x56b48b(_0x2cfdaa),_0x1ce0d2=new _0x56b48b(_0x2cfdaa);this['set']('isNavigationMode',!0x1),this['set']('isReady',!0x1),this['set']('currentChangeNumber',0x0),this['set']('numberOfChanges',0x0),this['set']('isForwardNavigationEnabled',!0x1),this['set']('isBackwardNavigationEnabled',!0x1),this['bind']('_isStatusLabelVisible')['to'](this,'isReady',this,'numberOfChanges',(_0x44afec,_0x576530)=>_0x44afec&&_0x576530>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x2e600d,_0x1a3b3f,_0x1a2207,_0x5baa71)=>{if(!_0x2e600d)return m(_0x2cfdaa,'Loading...');if(!_0x1a2207)return m(_0x2cfdaa,'No\x20changes');const _0x1f5466=m(_0x2cfdaa,'NUMBER_OF_CHANGES',_0x1a2207);return _0x5baa71?m(_0x2cfdaa,'X_OF_Y_CHANGES',[_0x1a3b3f+0x1,_0x1a2207]):_0x1f5466;}),_0x9d3d7a['set']({'label':m(_0x2cfdaa,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0xf8e6f0}),_0x1ce0d2['set']({'label':m(_0x2cfdaa,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x532e88}),_0x9d3d7a['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x1ce0d2['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x9d3d7a['on']('execute',()=>this['fire']('execute','backward')),_0x1ce0d2['on']('execute',()=>this['fire']('execute','forward')),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-revision-history-ui','ck-revision-history-ui__changes-navigation']},'children':[{'tag':'span','attributes':{'class':['ck-revision-history-ui__changes-navigation__wrapper']},'children':[{'tag':'span','attributes':{'class':['ck-revision-history-ui__changes-navigation__label',_0x3e6be6['if']('_isStatusLabelVisible','ck-hidden',_0x411b5e=>!_0x411b5e)]},'children':[{'text':_0x3e6be6['to']('isNavigationMode',_0x454704=>_0x454704?m(_0x2cfdaa,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x2cfdaa,'Total')+':\x20')}]},{'text':_0x3e6be6['to']('_statusText')}]},new _0x4be757(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x9d3d7a,_0x1ce0d2]}]});}}const ge='ck-editor__editable__loading-overlay';class Ri extends _0xde4b58{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x5ecf49=this['editor']['editing']['view'];_0x5ecf49['change'](_0x22e7fc=>{for(const _0x3384ad of _0x5ecf49['document']['roots'])_0x22e7fc['addClass'](ge,_0x3384ad);});}['hide'](){const _0x17f29a=this['editor']['editing']['view'];_0x17f29a['change'](_0x181a8e=>{for(const _0x203613 of _0x17f29a['document']['roots'])_0x181a8e['removeClass'](ge,_0x203613);});}}class v extends _0xde4b58{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,Ri];}['init'](){const _0x7947a4=this['editor'],_0xec57d0=_0x7947a4['plugins']['get'](u),_0x3dee91=_0x7947a4['plugins']['get'](Ri);_0x7947a4['ui']['componentFactory']['add']('exitToEditing',_0xa96691=>{const _0x5cf08c=new _0x56b48b(_0xa96691);return _0x5cf08c['set']({'label':m(_0xa96691,'Back\x20to\x20editing'),'icon':_0x13d588,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x5cf08c,'execute',()=>{_0x7947a4['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x5cf08c;}),_0x7947a4['ui']['componentFactory']['add']('restoreRevision',_0x491fce=>{const _0x37d6b4=new _0x56b48b(_0x491fce);return _0x37d6b4['set']({'label':m(_0x491fce,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x37d6b4['bind']('isEnabled')['to'](_0x7947a4['commands']['get']('restoreRevision')),this['listenTo'](_0x37d6b4,'execute',()=>_0x7947a4['execute']('restoreRevision')),_0x37d6b4;}),_0x7947a4['ui']['componentFactory']['add']('changesNavigation',_0x231abd=>{const _0x3ed9f6=new xi(_0x231abd),_0x786a4=_0x7947a4['commands']['get']('showPreviousChange'),_0xfd272e=_0x7947a4['commands']['get']('showNextChange');return _0x3ed9f6['bind']('isBackwardNavigationEnabled')['to'](_0x786a4,'isEnabled'),_0x3ed9f6['bind']('isForwardNavigationEnabled')['to'](_0xfd272e,'isEnabled'),_0x3ed9f6['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0xec57d0),this['listenTo'](_0x3ed9f6,'execute',(_0x3a24af,_0x5c8ab7)=>{_0x7947a4['execute']('forward'===_0x5c8ab7?'showNextChange':'showPreviousChange');}),_0x3ed9f6;}),_0x3dee91['show'](),_0xec57d0['on']('change:isReady',(_0x223f77,_0x14b3ef,_0x5ef9c3)=>{_0x5ef9c3?_0x3dee91['hide']():_0x3dee91['show']();});}}class oi extends et{['_resizeObserver']=null;constructor(_0x11b090,_0x259ada){super(_0x11b090,_0x259ada);const _0x292a09=this['bindTemplate'];this['set']({'label':m(_0x11b090,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x11b090,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x292a09['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new ot(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x38c930=this['fieldView']['element'];this['_tooltipString']=_0x38c930['scrollWidth']>_0x38c930['clientWidth']&&_0x38c930['value']||'';}}class hi extends _0x584d23{constructor(_0x460a09,_0x33f9ba,_0x1a73ed){super(_0x460a09);const _0x45e1cf=new _0x5649b5();_0x45e1cf['set']({'content':_0x4e060a,'viewBox':'0\x200\x2011\x2010'});const _0x2fa30c=['ck','ck-revision-history-sidebar__revision-author'];_0x1a73ed&&_0x2fa30c['push']('ck-revision-history-sidebar__revision-author_creator');const _0x3d4f6c=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x460a09,_0x1a73ed?'Revision\x20creator':'Revision\x20author')},'children':[_0x45e1cf,_0x33f9ba['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x2fa30c},'children':_0x3d4f6c});}}function ci(_0x241a7b,_0x14130e){const _0x20999b=_0x241a7b['bindTemplate'],_0x9517c3=_0x241a7b['locale'],_0x48c831=_0x4c9aaf(_0x9517c3);_0x48c831['panelPosition']='sw';const _0x4d0389=function(_0x407266,_0xa7a917){const _0x191ced=function(_0x1d90f8,_0x4cbcf1){const _0x4fdaf5=_0x1d90f8['locale'],_0x1e2a0b={'Compare\x20against\x20selected':m(_0x4fdaf5,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x4fdaf5,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x4fdaf5,'Restore\x20this\x20revision')};return _0x4cbcf1['map'](_0x180bcb=>{const _0x20dc3a=_0x1e2a0b[_0x180bcb['name']];return _0x20dc3a&&_0x20dc3a!==_0x180bcb['name']&&(_0x180bcb['name']=_0x20dc3a),_0x180bcb;});}(_0x407266,_0xa7a917),_0x452e45=new _0x4fc9f6();for(const _0x282ee1 of _0x191ced){const _0x431cc4={'type':'button','model':new to({'label':_0x282ee1['name'],'class':_0x282ee1['class'],'withText':!0x0,'role':'menuitem','_action':_0x282ee1['action']})};_0x431cc4['model']['bind']('isEnabled')['to'](_0x407266,'isActionsDropdownOpen',_0x33d9eb=>'function'!=typeof _0x282ee1['isEnabled']||(!_0x33d9eb||_0x282ee1['isEnabled'](_0x407266))),_0x452e45['add'](_0x431cc4);}return _0x452e45;}(_0x241a7b,_0x14130e);return _0x241a7b['bind']('isActionsDropdownOpen')['to'](_0x48c831,'isOpen'),_0x48c831['buttonView']['set']({'label':m(_0x9517c3,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x14f165}),_0x48c831['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x20999b['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x20999b['to'](_0x26e90c=>_0x26e90c['stopPropagation']())}}),_0x48c831['on']('execute',_0x3dd8a4=>{_0x241a7b['isReady']&&'function'==typeof _0x3dd8a4['source']['_action']&&_0x3dd8a4['source']['_action'](_0x241a7b);}),_0x35149e(_0x48c831,_0x4d0389,{'role':'menu'}),_0x48c831['listenTo'](_0x241a7b,'change:isActionsDropdownOpen',(_0x507fc5,_0x227520,_0x35cd25)=>{if(_0x35cd25)for(const _0x463f4a of _0x48c831['listView']['items']){const _0x363b6a=_0x463f4a['children']['first'],_0x8602bb=_0x14130e['find'](_0x162117=>_0x162117['action']===_0x363b6a['_action'])['isVisible'];_0x463f4a['isVisible']=void 0x0===_0x8602bb||_0x8602bb(_0x241a7b);}}),_0x48c831;}class _i extends/* #__PURE__ -- @preserve */
27
- _0x635858(_0x584d23){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x3a039e,_0x22c720,_0x50516b,_0x379e7f){super(_0x3a039e);const _0x19d3ba=this['bindTemplate'],_0x516369=function(_0x59f3aa,_0x362190){const _0x4e6510=Array['from'](_0x362190['authors'])['filter'](_0x1828ca=>_0x1828ca!=_0x362190['creator']);return _0x362190['creator']&&_0x4e6510['unshift'](_0x362190['creator']),_0x4e6510['map'](_0x10ca5c=>new hi(_0x59f3aa,_0x10ca5c,_0x10ca5c==_0x362190['creator']));}(_0x3a039e,_0x22c720);this['id']=_0x22c720['id'],this['_revision']=_0x22c720,this['_requireRevisionName']=_0x379e7f,this['bind']('name','createdAt')['to'](_0x22c720),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x44c539=>{return _0x3dff72=_0x3a039e['uiLanguage'],(_0x2c173b=_0x44c539)['toLocaleDateString'](_0x3dff72,{'month':'long','day':'numeric'})+',\x20'+_0x2c173b['toLocaleTimeString'](_0x3dff72,{'hour':'numeric','minute':'numeric'});var _0x3dff72,_0x2c173b;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new oi(_0x3a039e,ti),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x35f00d=>_0x35f00d||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0xe2a3a4,_0x46db64)=>_0xe2a3a4&&_0x46db64),this['revisionActionsView']=_0x50516b&&_0x50516b['length']?ci(this,_0x50516b):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x19d3ba['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x19d3ba['if']('isEnabled','ck-disabled',_0x1beeea=>!_0x1beeea),_0x19d3ba['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x19d3ba['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x19d3ba['if']('isActionsDropdownOpen','ck-revision-history-sidebar__actions_dropdown_open')]},'children':[this['revisionNameView'],{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision__date']},'children':[{'text':_0x19d3ba['to']('_createdAtFormatted')}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__revision__controls-wrapper']},'children':[{'tag':'ul','attributes':{'class':['ck','ck-revision-history-sidebar__revision-authors']},'children':_0x516369}]},this['revisionActionsView']],'on':{'click':_0x19d3ba['to'](_0x5c9428=>{_0x5c9428['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x1d588b=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x1d588b,'change',()=>{this['_requireRevisionName']&&!_0x1d588b['value']||this['fire']('setName',{'id':this['id'],'name':_0x1d588b['value']}),_0x1d588b['value']||(_0x1d588b['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function li(_0x5b2b69,_0x1faa8c){const _0x322e7c=_0x156a48['fromJSDate'](_0x5b2b69)['setLocale'](_0x1faa8c),_0x1d394b=_0x156a48['local'](),_0x323b38=_0x1d394b['minus']({'days':0x1})['startOf']('day');let _0x279bb6,_0x3c1dce;return _0x322e7c['hasSame'](_0x1d394b,'day')?(_0x279bb6=_0x322e7c['startOf']('day')['toJSDate'](),_0x3c1dce=_0x322e7c['toRelativeCalendar']()):_0x322e7c['hasSame'](_0x323b38,'day')?(_0x279bb6=_0x323b38['toJSDate'](),_0x3c1dce=_0x322e7c['toRelativeCalendar']()):_0x322e7c['hasSame'](_0x1d394b,'week')?(_0x279bb6=_0x322e7c['startOf']('week')['toJSDate'](),_0x3c1dce=_0x322e7c['weekdayLong']||''):_0x322e7c['hasSame'](_0x1d394b,'year')?(_0x279bb6=_0x322e7c['startOf']('month')['toJSDate'](),_0x3c1dce=_0x322e7c['monthLong']||''):(_0x279bb6=_0x322e7c['startOf']('year')['toJSDate'](),_0x3c1dce=String(_0x322e7c['year'])),{'startDate':_0x279bb6,'localizedPeriodName':_0x3c1dce};}class bi extends _0x584d23{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x279ca5,_0x433b44,_0x1f2b6c,_0x231012){super(_0x279ca5);const _0x13ab7b=li(_0x433b44,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x433b44,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x1f2b6c,this['_requireRevisionName']=_0x231012,this['revisionViews']['delegate']('select')['to'](this),this['revisionViews']['delegate']('setName')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period']},'children':[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__label']},'children':[{'text':_0x13ab7b}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x27bd7c){const _0xaddd9d=new _i(this['locale'],_0x27bd7c,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0xaddd9d);}['removeRevision'](_0x1067ac){const _0x158812=this['revisionViews']['find'](_0x5b320e=>_0x5b320e['id']===_0x1067ac['id']);this['revisionViews']['remove'](_0x158812);}}class fi extends _0x584d23{constructor(_0x1ec3ff){super(_0x1ec3ff);const _0x3243ab=new _0x5649b5();_0x3243ab['content']=_0x173b8e,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x3243ab,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[m(_0x1ec3ff,'Revision\x20history')]}]});}}class di extends _0x584d23{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x4e3718,_0x1c05e9,_0x21a9d7,_0x5bce30){super(_0x4e3718);const _0x169c00=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x1c05e9,this['_revisionActions']=_0x21a9d7,this['_requireRevisionName']=_0x5bce30,this['on']('select',(_0x269cef,_0x136262)=>{this['fire']('revisionSelected',_0x136262);}),this['on']('setName',(_0x20de6c,_0x3f00ee)=>{this['fire']('revisionSetName',_0x3f00ee);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new fi(_0x4e3718),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x169c00['if']('isEnabled','ck-disabled',_0x1935ea=>!_0x1935ea)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x37b427 of this['_revisions'])this['_addRevision'](_0x37b427);this['_revisions']['on']('add',(_0x13dde0,_0x304b5c)=>{this['_addRevision'](_0x304b5c);}),this['_revisions']['on']('remove',(_0x4d4922,_0x3e9b03)=>{this['_removeRevision'](_0x3e9b03);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x1383b9=>_0x1383b9['revisionViews']['map'](_0x36f64d=>_0x36f64d))['flat']();}['selectRevision'](_0x244e86){for(const _0x52908f of this['revisionViews'])_0x244e86&&_0x244e86['id']===_0x52908f['id']?_0x52908f['select']():_0x52908f['deselect']();}['highlightRevisions'](_0x56ddc2){for(const _0x396214 of this['revisionViews'])_0x56ddc2['some'](({id:_0x2d3815})=>_0x2d3815===_0x396214['id'])?_0x396214['highlight']():_0x396214['unhighlight']();}['_addRevision'](_0x5ba493){const _0x3694ca=li(_0x5ba493['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x40a096=this['timePeriodViews']['get'](0x0);_0x40a096&&_0x40a096['startDate']['getTime']()===_0x3694ca['getTime']()||(_0x40a096=new bi(this['locale'],_0x3694ca,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x40a096)),_0x40a096['addRevision'](_0x5ba493);}['_removeRevision'](_0x476940){const _0x2745f2=li(_0x476940['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x2745f2)['removeRevision'](_0x476940);}['_getTimePeriodViewByStartDate'](_0x2184d9){return this['timePeriodViews']['find'](_0x44588c=>_0x44588c['startDate']['getTime']()===_0x2184d9['getTime']());}}class d extends _0xde4b58{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
23
+ import{ObservableMixin as _0x243d52,uid as _0x3d9671,Collection as _0xa9c085,logWarning as _0x1270e7,FocusTracker as _0x11152e,KeystrokeHandler as _0x48dd8b,scrollViewportToShowTarget as _0x374391,ResizeObserver as ot,ElementReplacer as it,CKEditorError as _0x540bc9}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0xb23e18,set as _0x6926cf,unset as _0x22b066,isEqual as _0x386a00}from'es-toolkit/compat';import{Plugin as _0x87a842,PendingActions as _0x35a381,Command as _0x11ff94,ElementApiMixin as _0x26fec2,Editor as _0x20711e}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x1342b0,getMarkerDomElement as _0x854659,ConfirmMixin as _0x2e4f0b,sanitizeEditorConfig as _0x274797}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0x9e82a0,ViewAttributeElement as _0x519f60,ViewEmptyElement as _0x442bb5,ViewRawElement as _0x369af2,ViewUIElement as _0x4cb351,ViewDocumentFragment as _0x239bee,ViewText as _0x30c9ef,ViewElement as _0x452b51,ModelElement as _0x4e1429,ModelRange as _0x34f7bf,ModelPosition as _0x291a0b,ModelDocumentFragment as _0x33b2e5,ModelText as _0x1acbe0}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x4f868d,IconChevronUp as _0x18ea23,IconChevronDown as _0x1268c6,IconUndo as _0x68bc5e,IconUser as _0x59f32c,IconThreeVerticalDots as _0x37b76d}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x5705d6,View as _0x395725,submitHandler as _0x2af211,LabeledFieldView as et,createLabeledInputText as ti,createDropdown as _0x43a564,ListView as _0x42a250,ListItemView as _0x129054,ButtonView as _0x409039,MenuBarMenuView as _0x47b961,MenuBarMenuListView as _0x287d0a,MenuBarMenuListItemView as _0x440c74,MenuBarMenuListItemButtonView as _0x465bd8,ContextualBalloon as _0x6f82f5,ToolbarSeparatorView as _0x59396d,IconView as _0x302be9,addListToDropdown as _0x385744,UIModel as to,EditorUI as tt,normalizeToolbarConfig as st,BoxedEditorUIView as _0xcf5b0f,StickyPanelView as _0x28f9b0,ToolbarView as _0x5b821d,InlineEditableUIView as te}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x148f3c}from'luxon';class I extends/* #__PURE__ -- @preserve */
24
+ _0x243d52(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x2b415a){super(),this['id']=_0x2b415a['id']||_0x3d9671(),this['creator']=_0x2b415a['creator']||null,this['authors']=_0x2b415a['authors']||[],this['diffData']=_0x2b415a['diffData']||null,this['toVersion']=_0x2b415a['toVersion']||0x0,this['fromVersion']=_0x2b415a['fromVersion']||0x0,this['set']('name',_0x2b415a['name']||''),this['set']('createdAt',_0x2b415a['createdAt']||new Date()),this['set']('attributes',_0x2b415a['attributes']||{});}['setName'](_0x121396){this['_update']({'name':_0x121396});}['setAttribute'](_0x651940,_0x4ce7da){const _0x28cee0=_0xb23e18(this['attributes']);_0x6926cf(_0x28cee0,_0x651940,_0x4ce7da),this['_update']({'attributes':_0x28cee0});}['removeAttribute'](_0x746485){const _0x543aba=_0xb23e18(this['attributes']);_0x22b066(_0x543aba,_0x746485),this['_update']({'attributes':_0x543aba});}['_update'](_0x2eec09,_0x416adb=!0x1){let _0x4e9675=!0x1;const _0x465c75={'id':this['id']},_0x44051b=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x111881 of _0x44051b){const _0x228cff=_0x2eec09[_0x111881];void 0x0!==_0x228cff&&_0x228cff!==this[_0x111881]&&(this[_0x111881]=_0x228cff,_0x465c75[_0x111881]=_0x228cff,_0x4e9675=!0x0);}_0x4e9675&&(_0x465c75['authors']&&(_0x465c75['authorsIds']=_0x465c75['authors']['map'](_0x5eb42c=>_0x5eb42c['id']),delete _0x465c75['authors']),this['fire']('_update',_0x465c75,_0x416adb));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x285128=>_0x285128['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class S extends _0x87a842{['_revisions'];static get['requires'](){return[_0x1342b0];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x488e9b){super(_0x488e9b),this['_revisions']=new _0xa9c085();}['afterInit'](){!async function(_0xe81149){const _0x1d4f65=_0x172418([0x76,0x73,0x6d,0x4c,0x34,0x54,0x50,0x70,0x75,0x52,0x35,0x33,0x4d,0x6c,0x71,0x53,0x6a,0x32,0x56,0x58,0x77,0x48,0x39,0x6f,0x45,0x41,0x4e,0x38,0x46,0x78,0x4a,0x74,0x47,0x55,0x4f,0x64,0x62,0x44,0x43,0x5a,0x30,0x31,0x69,0x68,0x79,0x66,0x6b,0x42,0x51,0x59,0x36,0x61,0x63,0x67,0x7a,0x37,0x72,0x49,0x65,0x57,0x4b,0x6e]),_0x133109=0xeb829,_0x40db75=0x359e09b0,_0xd7f79d=0x35998670^_0x40db75,_0x3a3b1c=window[_0x172418([0x44,0x61,0x74,0x65])][_0x172418([0x6e,0x6f,0x77])](),_0x8c9fd4=_0xe81149[_0x172418([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x108056=new window[(_0x172418([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5b6817=>{_0x8c9fd4[_0x172418([0x6f,0x6e,0x63,0x65])](_0x172418([0x72,0x65,0x61,0x64,0x79]),_0x5b6817);}),_0x593d66={[_0x172418([0x6b,0x74,0x79])]:_0x172418([0x45,0x43]),[_0x172418([0x75,0x73,0x65])]:_0x172418([0x73,0x69,0x67]),[_0x172418([0x63,0x72,0x76])]:_0x172418([0x50,0x2d,0x32,0x35,0x36]),[_0x172418([0x78])]:_0x172418([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x172418([0x79])]:_0x172418([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x172418([0x61,0x6c,0x67])]:_0x172418([0x45,0x53,0x32,0x35,0x36])},_0x5d24ee=_0x8c9fd4[_0x172418([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x172418([0x67,0x65,0x74])](_0x172418([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3eda72(){let _0x33d33,_0xfe06b8=null,_0x5313e7=null;try{if(_0x5d24ee==_0x172418([0x47,0x50,0x4c]))return _0x172418([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x33d33=_0xfd870e(),!_0x33d33)return _0x172418([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x33d33[_0x172418([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5313e7=_0x8a9037(_0x33d33[_0x172418([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x33d33[_0x172418([0x6a,0x74,0x69])])),await _0x272912()?_0x3eaddd()?_0x114821()?_0x172418([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1bf01a()?(_0x33d33[_0x172418([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x172418([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0xfe06b8=_0x4be5bb(_0x172418([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x35bfc2()):_0x172418([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x172418([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x172418([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x172418([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x114821(){const _0x51b628=[_0x172418([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x172418([0x74,0x72,0x69,0x61,0x6c])][_0x172418([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x33d33[_0x172418([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x3a3b1c/0x3e8:0xe10*_0xd7f79d;return _0x33d33[_0x172418([0x65,0x78,0x70])]<_0x51b628;}function _0x3eaddd(){const _0x29589b=_0x33d33[_0x172418([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x29589b)return!0x1;if(_0x29589b[_0x172418([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x172418([0x2a])))return!0x0;if(_0x29589b[_0x172418([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x172418([0x52,0x48])))return!0x0;if(_0x29589b[_0x172418([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x172418([0x52,0x52,0x48]))){if(_0x2e6d36())return!0x0;if(_0x55f4c6()||_0x28e9f7())return!0x0;}return!0x1;}function _0x1bf01a(){const _0x48b3f5=_0x33d33[_0x172418([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x48b3f5||0x0==_0x48b3f5[_0x172418([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x329790}=new URL(window[_0x172418([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x48b3f5[_0x172418([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x329790))return!0x0;const _0x31c70b=_0x329790[_0x172418([0x73,0x70,0x6c,0x69,0x74])](_0x172418([0x2e]));return _0x48b3f5[_0x172418([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x41db1f=>_0x41db1f[_0x172418([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x172418([0x2a])))[_0x172418([0x6d,0x61,0x70])](_0x5b8f47=>_0x5b8f47[_0x172418([0x73,0x70,0x6c,0x69,0x74])](_0x172418([0x2e])))[_0x172418([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3a2a4f=>_0x3a2a4f[_0x172418([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x31c70b[_0x172418([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x172418([0x6d,0x61,0x70])](_0x198825=>Array(_0x31c70b[_0x172418([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x198825[_0x172418([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x172418([0x66,0x69,0x6c,0x6c])](_0x198825[0x0]===_0x172418([0x2a])?_0x172418([0x2a]):'')[_0x172418([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x198825))[_0x172418([0x73,0x6f,0x6d,0x65])](_0x596864=>_0x31c70b[_0x172418([0x65,0x76,0x65,0x72,0x79])]((_0x15171d,_0x1cd215)=>_0x596864[_0x1cd215]===_0x15171d||_0x596864[_0x1cd215]===_0x172418([0x2a])));}function _0x35bfc2(){return _0xfe06b8&&_0x5313e7?new window[(_0x172418([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2b2d80,_0xc9ec86)=>{_0xfe06b8[_0x172418([0x74,0x68,0x65,0x6e])](_0x2b2d80,_0xc9ec86),_0x5313e7[_0x172418([0x74,0x68,0x65,0x6e])](_0x2c68a9=>{_0x2c68a9!=_0x172418([0x56,0x61,0x6c,0x69,0x64])&&_0x2b2d80(_0x2c68a9);},_0xc9ec86);}):_0xfe06b8||_0x5313e7||_0x172418([0x56,0x61,0x6c,0x69,0x64]);}}function _0x8a9037(_0x322838,_0x4dccf4){return new window[(_0x172418([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5917bc=>{if(_0x507679())return _0x5917bc(_0x172418([0x56,0x61,0x6c,0x69,0x64]));_0x2eb260(),_0x8c9fd4[_0x172418([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x172418([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x249c50=!0x1;const _0x78352a=_0x3d9671();function _0x4039c8(_0x11dac5){return!!_0x11dac5&&(typeof _0x11dac5===_0x172418([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x11dac5===_0x172418([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x11dac5[_0x172418([0x74,0x68,0x65,0x6e])]===_0x172418([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x11dac5[_0x172418([0x63,0x61,0x74,0x63,0x68])]===_0x172418([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4d7a0e(_0x22e073){_0x54d899(_0x22e073)[_0x172418([0x74,0x68,0x65,0x6e])](_0x1caec7=>{if(!_0x1caec7||_0x1caec7[_0x172418([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x172418([0x6f,0x6b]))return _0x172418([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x2eae99(_0xd93594(_0x78352a+_0x4dccf4))!=_0x1caec7[_0x172418([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x172418([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x172418([0x56,0x61,0x6c,0x69,0x64]);})[_0x172418([0x74,0x68,0x65,0x6e])](_0x196720=>(_0x3b599d(),_0x196720),()=>{const _0xc92c67=_0x59fd40();return null==_0xc92c67?(_0x3b599d(),_0x172418([0x56,0x61,0x6c,0x69,0x64])):_0x172418(_0x3a3b1c-_0xc92c67>(0x11928db0^_0x40db75)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x172418([0x74,0x68,0x65,0x6e])](_0x5917bc)[_0x172418([0x63,0x61,0x74,0x63,0x68])](()=>{_0x5917bc(_0x172418([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5b0102=0x35a8e730^_0x40db75;function _0x3b599d(){const _0xb730fa=_0x172418([0x6c,0x6c,0x63,0x74,0x2d])+_0x2eae99(_0xd93594(_0x322838)),_0xd18d17=_0x5630ac(_0x2eae99(window[_0x172418([0x4d,0x61,0x74,0x68])][_0x172418([0x63,0x65,0x69,0x6c])](_0x3a3b1c/_0x5b0102)));window[_0x172418([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x172418([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xb730fa,_0xd18d17);}function _0x59fd40(){const _0x30e236=_0x172418([0x6c,0x6c,0x63,0x74,0x2d])+_0x2eae99(_0xd93594(_0x322838)),_0x4dd816=window[_0x172418([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x172418([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x30e236);return _0x4dd816?window[_0x172418([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5630ac(_0x4dd816),0x10)*_0x5b0102:null;}function _0x54d899(_0x1b2fb0){return new window[(_0x172418([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2b4224,_0x4e96d1)=>{_0x1b2fb0[_0x172418([0x74,0x68,0x65,0x6e])](_0x2b4224,_0x4e96d1),window[_0x172418([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4e96d1,0x359fdd70^_0x40db75);});}}_0x8c9fd4[_0x172418([0x6f,0x6e])](_0x172418([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5bac76,_0x3303f3)=>{if(_0x3303f3[0x0]!=_0x322838)return _0x5917bc(_0x172418([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3303f3[0x1]={..._0x3303f3[0x1],[_0x172418([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x78352a};},{[_0x172418([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x172418([0x68,0x69,0x67,0x68])}),_0x8c9fd4[_0x172418([0x6f,0x6e])](_0x172418([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x415f39=>{_0x4039c8(_0x415f39[_0x172418([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x249c50=!0x0,_0x4d7a0e(_0x415f39[_0x172418([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x172418([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x172418([0x6c,0x6f,0x77])}),_0x108056[_0x172418([0x74,0x68,0x65,0x6e])](()=>{_0x249c50||_0x5917bc(_0x172418([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x507679(){return _0x8c9fd4[_0x172418([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x172418([0x76,0x69,0x65,0x77])][_0x172418([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x172418([0x61,0x75,0x74,0x6f]);}function _0x2eb260(){_0x8c9fd4[_0x172418([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x172418([0x76,0x69,0x65,0x77])][_0x172418([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x172418([0x61,0x75,0x74,0x6f]);}}function _0x4be5bb(_0x4ae839){const _0x1e7a85=[new window[(_0x172418([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2b171d=>setTimeout(_0x2b171d,0x3597377c^_0x40db75)),_0x108056[_0x172418([0x74,0x68,0x65,0x6e])](()=>new window[(_0x172418([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x9e4619=>{const _0x3d4a83=0x359e09b7^_0x40db75,_0x14f5ce=_0xe81149[_0x172418([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x400622(){_0x14f5ce[_0x172418([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x3d4a83&&_0x9e4619();}_0x400622(),_0x14f5ce[_0x172418([0x6f,0x6e])](_0x172418([0x61,0x64,0x64]),_0x400622);})),new window[(_0x172418([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xc64cb9=>{function _0x3c69cc(){for(const _0x3ee3a8 in window)if(window[_0x172418([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x172418([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x3ee3a8))&&window[_0x3ee3a8]==_0x133109)return _0xc64cb9();_0x8c9fd4[_0x172418([0x73,0x74,0x61,0x74,0x65])]!=_0x172418([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x172418([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3c69cc,0x359e1a38^_0x40db75);}_0x53b647(_0x172418([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x3c69cc();})];return window[_0x172418([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x172418([0x72,0x61,0x63,0x65])](_0x1e7a85)[_0x172418([0x74,0x68,0x65,0x6e])](()=>_0x4ae839);}async function _0x38fc5a(){if(await _0x108056,_0x53b647(_0x172418([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x57fa9c=_0xe81149[_0x172418([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x1a9e00=_0xe81149[_0x172418([0x67,0x65,0x74,0x45,0x61,0x72,0x6c,0x69,0x65,0x72,0x56,0x69,0x73,0x69,0x62,0x6c,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](_0x57fa9c[_0x172418([0x69,0x64])]),_0x1e36e9=_0x1eaaae(_0x172418([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x1e36e9[_0x172418([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x57fa9c['id'],_0x1a9e00?_0x1a9e00['id']:null,!0x0),_0x1e36e9[_0x172418([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x172418([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x1e36e9[_0x172418([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x1e36e9[_0x172418([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x576589,void(_0x1e36e9[_0x172418([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x576589);}if(_0x53b647(_0x172418([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x2556ff=_0x1eaaae(_0x172418([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x2556ff[_0x172418([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x172418([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x2556ff[_0x172418([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x2556ff[_0x172418([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x576589,_0x2556ff[_0x172418([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x576589;}_0x8c9fd4[_0x172418([0x6d,0x6f,0x64,0x65,0x6c])][_0x172418([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x576589,_0x8c9fd4[_0x172418([0x6d,0x6f,0x64,0x65,0x6c])][_0x172418([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x576589,_0x8c9fd4[_0x172418([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x172418([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2e6d36(){return _0x53b647(_0x172418([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x1eaaae(_0x172418([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x172418([0x73,0x74,0x61,0x74,0x65])]==_0x172418([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x55f4c6(){return _0x53b647(_0x172418([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x28e9f7(){return _0x53b647(_0x172418([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x1b0630(_0x41a734){const _0x1f66b7=_0xec4bf8();_0x8c9fd4[_0x1f66b7]=_0x172418([0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x48,0x69,0x73,0x74,0x6f,0x72,0x79,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x41a734,_0x41a734[_0x172418([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x172418([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0xec4bf8()]=_0x133109),_0x41a734!=_0x172418([0x56,0x61,0x6c,0x69,0x64])&&_0x38fc5a();}function _0xec4bf8(){const _0x348eb7=window[_0x172418([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x172418([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x172418([0x6e,0x6f,0x77])]())[_0x172418([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x172418([0x2e]),'');let _0x3458e0=_0x172418([0x76]);for(let _0x4a5f68=0x0;_0x4a5f68<_0x348eb7[_0x172418([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4a5f68+=0x2){let _0x1535a3=window[_0x172418([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x348eb7[_0x172418([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4a5f68,_0x4a5f68+0x2));_0x1535a3>=_0x1d4f65[_0x172418([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x1535a3-=_0x1d4f65[_0x172418([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3458e0+=_0x1d4f65[_0x1535a3];}return _0x3458e0;}function _0xfd870e(){const _0xacdff9=_0x5d24ee[_0x172418([0x73,0x70,0x6c,0x69,0x74])](_0x172418([0x2e]));if(0x3!=_0xacdff9[_0x172418([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2981ff(_0xacdff9[0x1]);function _0x2981ff(_0x41120a){const _0x49ca7f=_0x4bad22(_0x41120a);return _0x49ca7f&&_0x5afea8()?_0x49ca7f:null;function _0x5afea8(){const _0x6ae974=_0x49ca7f[_0x172418([0x6a,0x74,0x69])],_0x34f5d1=window[_0x172418([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x6ae974[_0x172418([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x6ae974[_0x172418([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x465ae4={..._0x49ca7f,[_0x172418([0x6a,0x74,0x69])]:_0x6ae974[_0x172418([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x6ae974[_0x172418([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x465ae4[_0x172418([0x76,0x63])],_0xd93594(_0x465ae4)==_0x34f5d1;}}}async function _0x272912(){let _0x2dfc6d=!0x0;try{const _0x52ae1a=_0x5d24ee[_0x172418([0x73,0x70,0x6c,0x69,0x74])](_0x172418([0x2e])),[_0x4cd238,_0x33b213,_0x526a42]=_0x52ae1a;return _0x58ec4f(_0x4cd238),await _0x11850e(_0x4cd238,_0x33b213,_0x526a42),_0x2dfc6d;}catch{return!0x1;}function _0x58ec4f(_0x3ea344){const _0x37206e=_0x4bad22(_0x3ea344);_0x37206e&&_0x37206e[_0x172418([0x61,0x6c,0x67])]==_0x172418([0x45,0x53,0x32,0x35,0x36])||(_0x2dfc6d=!0x1);}async function _0x11850e(_0x55b150,_0x54d0e1,_0x4a9f34){const _0x48f50a=window[_0x172418([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x172418([0x66,0x72,0x6f,0x6d])](_0x5af691(_0x4a9f34),_0x1ce512=>_0x1ce512[_0x172418([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x40d2a6=new window[(_0x172418([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x172418([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x55b150+_0x172418([0x2e])+_0x54d0e1),_0x2022c9=window[_0x172418([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x172418([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x2022c9)return;const _0x147afd=await _0x2022c9[_0x172418([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x172418([0x6a,0x77,0x6b]),_0x593d66,{[_0x172418([0x6e,0x61,0x6d,0x65])]:_0x172418([0x45,0x43,0x44,0x53,0x41]),[_0x172418([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x172418([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x172418([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x2022c9[_0x172418([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x172418([0x6e,0x61,0x6d,0x65])]:_0x172418([0x45,0x43,0x44,0x53,0x41]),[_0x172418([0x68,0x61,0x73,0x68])]:{[_0x172418([0x6e,0x61,0x6d,0x65])]:_0x172418([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x147afd,_0x48f50a,_0x40d2a6)||(_0x2dfc6d=!0x1);}}function _0x4bad22(_0x239ca6){return _0x239ca6[_0x172418([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x172418([0x65,0x79]))?JSON[_0x172418([0x70,0x61,0x72,0x73,0x65])](_0x5af691(_0x239ca6)):null;}function _0x5af691(_0x4236d8){return window[_0x172418([0x61,0x74,0x6f,0x62])](_0x4236d8[_0x172418([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x172418([0x2b]))[_0x172418([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x172418([0x2f])));}function _0xd93594(_0x532e0c){let _0x3655=0x1505;function _0x41b513(_0x5da0ee){for(let _0x2eb05f=0x0;_0x2eb05f<_0x5da0ee[_0x172418([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2eb05f++){const _0x4192e1=_0x5da0ee[_0x172418([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2eb05f);_0x3655=(_0x3655<<0x5)+_0x3655+_0x4192e1,_0x3655&=_0x3655;}}function _0x5c765b(_0x279015){Array[_0x172418([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x279015)?_0x279015[_0x172418([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5c765b):_0x279015&&typeof _0x279015==_0x172418([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x172418([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x279015)[_0x172418([0x73,0x6f,0x72,0x74])]()[_0x172418([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x43faa5,_0x5d8a04])=>{_0x41b513(_0x43faa5),_0x5c765b(_0x5d8a04);}):_0x41b513(window[_0x172418([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x279015));}return _0x5c765b(_0x532e0c),_0x3655>>>0x0;}function _0x2eae99(_0x316053){return _0x316053[_0x172418([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x172418([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x172418([0x30]));}function _0x5630ac(_0x183eed){return _0x183eed[_0x172418([0x73,0x70,0x6c,0x69,0x74])]('')[_0x172418([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x172418([0x6a,0x6f,0x69,0x6e])]('');}function _0x53b647(_0xe259e1){return _0x8c9fd4[_0x172418([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x172418([0x68,0x61,0x73])](_0xe259e1);}function _0x1eaaae(_0x45e04f){return _0x8c9fd4[_0x172418([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x172418([0x67,0x65,0x74])](_0x45e04f);}function _0x576589(){}function _0x172418(_0x5d3e7f){return _0x5d3e7f['map'](_0x339cbb=>String['fromCharCode'](_0x339cbb))['join']('');}_0x1b0630(await _0x3eda72());}(this);}['createRevision'](_0x48867f){const _0x168c82=this['editor']['plugins']['get']('Users');return new I({'id':_0x48867f['id'],'name':_0x48867f['name'],'creator':_0x48867f['creatorId']?_0x168c82['getUser'](_0x48867f['creatorId']):null,'diffData':_0x48867f['diffData']||_0x48867f['data'],'authors':_0x48867f['authorsIds']['map'](_0x3d54a0=>_0x168c82['getUser'](_0x3d54a0)),'createdAt':new Date(_0x48867f['createdAt']),'attributes':_0x48867f['attributes'],'fromVersion':_0x48867f['fromVersion'],'toVersion':_0x48867f['toVersion']});}['addRevision'](_0x36ca6f,_0x4e31bb=0x0){this['_revisions']['add'](_0x36ca6f,_0x4e31bb);}['getRevision'](_0x5f488c){return this['_revisions']['get'](_0x5f488c);}['getRevisions'](_0x8be297={'toJSON':!0x1}){const _0x1e0b57=Array['from'](this['_revisions']);return _0x1e0b57['reverse'](),_0x8be297['toJSON']?_0x1e0b57['map'](_0xa69cc8=>_0xa69cc8['toJSON']()):_0x1e0b57;}['getIndex'](_0x2a31a9){return this['_revisions']['getIndex'](_0x2a31a9);}['getEarlierVisibleRevision'](_0x3a3434){const [,_0xf1510c]=this['getRevisionsIterator'](_0x3a3434,{'direction':'earlier'});return _0xf1510c;}['getLaterVisibleRevision'](_0x56df23){const [,_0x51f9e5]=this['getRevisionsIterator'](_0x56df23,{'direction':'later'});return _0x51f9e5;}['getRevisionsInDiff'](_0x389189){const _0x175772=[];for(const _0x10fdba of this['getRevisionsIterator'](_0x389189['newRevisionId']))if(_0x175772['push'](_0x10fdba),_0x10fdba['id']===_0x389189['oldRevisionId'])break;return _0x175772;}*['getRevisionsIterator'](_0x249b07,{direction:_0x5f0e9d='earlier',filter:_0x22f1c=()=>!0x0}={}){const _0x2d03ac='earlier'===_0x5f0e9d?0x1:-0x1;let _0x3726cb=this['_revisions']['get'](_0x249b07),_0x15ad99=this['getIndex'](_0x3726cb);for(yield _0x3726cb;_0x3726cb;){if(_0x15ad99+=_0x2d03ac,_0x3726cb=this['getRevision'](_0x15ad99),!_0x3726cb)return;_0x22f1c(_0x3726cb)&&(yield _0x3726cb);}}}class $ extends _0x87a842{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x9e82a0,'c'],[_0x519f60,'a'],[_0x442bb5,'e'],[_0x369af2,'r'],[_0x4cb351,'u']]);['_typeCharToViewClass']=new Map([['c',_0x9e82a0],['a',_0x519f60],['e',_0x442bb5],['r',_0x369af2],['u',_0x4cb351]]);async['loadRevisionData'](_0x5897fe,_0x3c4e70){if(_0x5897fe['diffData']||!_0x3c4e70)return;const _0x452f40=this['editor']['config']['get']('collaboration.channelId'),_0x2626a1=await _0x3c4e70['getRevision']({'channelId':_0x452f40,'revisionId':_0x5897fe['id']});_0x5897fe['diffData']=_0x2626a1['diffData'];}['getRevisionDocumentData'](_0x432a9d){const _0x1dd1c5={};for(const _0x45b24a in _0x432a9d['diffData']){if(_0x432a9d['diffData'][_0x45b24a]['attachChange']&&!_0x432a9d['diffData'][_0x45b24a]['attachChange']['isAttached'])continue;const _0x4dcfa7=this['_removeRevisionMarkers'](JSON['parse'](_0x432a9d['diffData'][_0x45b24a]['insertions'])),_0x150156=this['editor']['editing']['view']['document'],_0x179e49=new _0x239bee(_0x150156,_0x4dcfa7['map'](_0x4ca261=>this['_getViewFromDiffObj'](_0x4ca261,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x1dd1c5[_0x45b24a]=this['editor']['data']['processor']['toData'](_0x179e49),this['editor']['data']['processor']['useFillerType']('default');}return _0x1dd1c5;}['getRevisionRootsAttributes'](_0x5ccc64){const _0x338aed={};for(const _0x112633 in _0x5ccc64['diffData'])_0x5ccc64['diffData'][_0x112633]['attachChange']&&!_0x5ccc64['diffData'][_0x112633]['attachChange']['isAttached']||(_0x338aed[_0x112633]=_0x5ccc64['diffData'][_0x112633]['attributesAfter']||{});return _0x338aed;}['_getTypeCharForViewElement'](_0x1c07d7){return this['_viewClassToTypeChar']['get'](_0x1c07d7['constructor']);}['_getViewFromDiffObj'](_0x3e63b1,_0x1852a5){const _0x36652a=this['editor']['editing']['view']['document'];if('string'==typeof _0x3e63b1)return new _0x30c9ef(_0x36652a,_0x3e63b1);{let _0x571b3d,_0x139d26;_0x139d26='u'==_0x3e63b1['type']||'r'==_0x3e63b1['type']?[]:_0x3e63b1['children']['map'](_0x42e094=>this['_getViewFromDiffObj'](_0x42e094,_0x1852a5));const _0x25e710=this['_typeCharToViewClass']['get'](_0x3e63b1['type'])||_0x452b51,_0x56d1da=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x571b3d=new _0x25e710(_0x36652a,_0x3e63b1['name'],_0x3e63b1['attributes'],_0x139d26),'u'==_0x3e63b1['type']&&_0x3e63b1['children'][0x0]){const _0x318599=_0x3e63b1['children'][0x0];if(_0x571b3d['render']=function(_0xb95873){const _0x488db6=_0xb95873['createElement']('div');return _0x488db6['innerHTML']=_0x318599,_0x488db6['childNodes'][0x0];},_0x1852a5){const _0x83a6f=new _0x239bee(_0x36652a);_0x83a6f['_appendChild'](_0x571b3d);const _0x110c1b=Array['from'](_0x56d1da['viewChildrenToDom'](_0x83a6f,{'bind':!0x1})),_0x507b17=_0x56d1da['domDocument']['createElement']('div');_0x507b17['append'](..._0x110c1b),_0x571b3d=Array['from'](_0x56d1da['domChildrenToView'](_0x507b17))[0x0];}}else{if('r'==_0x3e63b1['type']&&_0x3e63b1['children'][0x0]){const _0x1ac24f=_0x3e63b1['children'][0x0];if(_0x571b3d['render']=function(_0x2e40a1){_0x2e40a1['innerHTML']=_0x1ac24f;},_0x1852a5){const _0x438de8=new _0x239bee(_0x36652a);_0x438de8['_appendChild'](_0x571b3d);const _0x44f0d7=Array['from'](_0x56d1da['viewChildrenToDom'](_0x438de8,{'bind':!0x1})),_0x1eb817=_0x56d1da['domDocument']['createElement']('div');_0x1eb817['append'](..._0x44f0d7);const _0x487ec7=Array['from'](_0x56d1da['domChildrenToView'](_0x1eb817));_0x487ec7['length']>0x1?_0x571b3d['_appendChild'](_0x487ec7):_0x571b3d=_0x487ec7[0x0];}}}if(_0x3e63b1['customProperties']){for(const [_0x17f727,_0x4bdd96]of _0x3e63b1['customProperties'])_0x571b3d['_setCustomProperty'](_0x17f727,_0x4bdd96);}const _0x28a7ef=void 0x0===_0x3e63b1['fillerOffset']?null:_0x3e63b1['fillerOffset'];return null!==_0x28a7ef&&(_0x571b3d['getFillerOffset']=()=>_0x28a7ef),_0x571b3d;}}['_makeModelFromViewString'](_0x5248d4){const _0x6105b=JSON['parse'](_0x5248d4),_0x5b07bc=this['editor']['editing']['view']['document'],_0xaafa1c=new _0x239bee(_0x5b07bc,_0x6105b['map'](_0x581ba4=>this['_getViewFromDiffObj'](_0x581ba4,!0x0)));return this['editor']['data']['toModel'](_0xaafa1c);}['_removeRevisionMarkers'](_0x4fe36f){return(_0x4fe36f=_0x4fe36f['filter'](_0xa08a47=>!_0xa08a47['name']||'revision-start'!==_0xa08a47['name']&&'revision-end'!==_0xa08a47['name']))['forEach'](_0x3b0120=>{'string'!=typeof _0x3b0120&&(_0x3b0120['children']=this['_removeRevisionMarkers'](_0x3b0120['children']),_0x3b0120['attributes']=_0x3b0120['attributes']['filter'](_0x361ef4=>!_0x361ef4[0x0]['startsWith']('data-revision-')));}),_0x4fe36f;}}function m(_0x8a0ff,_0x18b659,_0x3cbbd7){const t=_0x8a0ff['t'];switch(_0x18b659){case'Revision\x20history':return t('Revision\x20history');case'Open\x20revision\x20history':return t('Open\x20revision\x20history');case'Restored':return t('Restored');case'Empty\x20document':return t('Empty\x20document');case'Initial\x20revision':return t('Initial\x20revision');case'Suggested\x20by':return t('Suggested\x20by');case'Added\x20by':return t('Added\x20by');case'Removed\x20by':return t('Removed\x20by');case'Show\x20more\x20items':return t('Show\x20more\x20items');case'Compare\x20against\x20selected':return t('Compare\x20against\x20selected');case'Name\x20this\x20revision':return t('Name\x20this\x20revision');case'Restore\x20this\x20revision':return t('Restore\x20this\x20revision');case'Back\x20to\x20editing':return t('Back\x20to\x20editing');case'Loading...':return t('Loading...');case'No\x20changes':return t('No\x20changes');case'NUMBER_OF_CHANGES':return t({'string':'%0\x20change','plural':'%0\x20changes','id':'NUMBER_OF_CHANGES'},_0x3cbbd7);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x3cbbd7);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}class h extends _0x87a842{['licenseKey'];['_licenseKeyCheckInterval'];['currentRevision']=null;['repository'];['adapter']=null;['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_utils'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x1342b0,S,$,_0x35a381];}constructor(_0x22c985){super(_0x22c985),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new RevisionDataBuilder(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x3fe865=_0x3d9671();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x3fe865},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}['init'](){this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x930501=this['repository']['getRevision'](0x0),_0x15e331=_0x930501&&null===_0x930501['creator']?_0x930501:null;if(this['_continueCurrentRevision']=!!_0x15e331&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x15c8b6=this['_source']['getCurrentRevisionId'](),_0x21554d=this['repository']['getRevision'](_0x15c8b6);if(_0x21554d)this['_startingVersion']=_0x21554d['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x24fbc9=this['_source']['history']['_operations']['find'](_0x579463=>!_0x579463['_isInit']),_0x557506=_0x24fbc9?_0x24fbc9['baseVersion']:this['_source']['history']['version'];_0x930501?(_0x930501['toVersion']<_0x557506&&_0x930501['_update']({'toVersion':_0x557506}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x15e331['id'],this['_startingVersion']=_0x15e331['fromVersion']):(this['_startingVersion']=_0x930501['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x557506,this['_continueCurrentRevision']=!0x1);}}else _0x15e331&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x15e331['toVersion'],this['editor']['model']['document']['history']['version']),_0x15e331['fromVersion']===_0x15e331['toVersion']?(0x0!==_0x15e331['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x15e331['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x15e331['id'],this['_startingVersion']=_0x15e331['fromVersion'])),this['_continueCurrentRevision']||(this['_startingVersion']=this['editor']['model']['document']['version']);this['_revisionDataBuilder']['init'](this['_source']['history']),this['_createInitialRevision'](this['_startingVersion']),this['_createCurrentRevision'](this['_startingVersion']),this['adapter']&&this['sendBufferedUpdates']();}),this['bind']('isReady')['to'](this,'_isPendingUpdate',_0x3d163a=>!_0x3d163a),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x57efeb=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x322584;for(const _0x921800 in _0x57efeb){const _0x10458f=_0x921800,_0x549c18=_0x57efeb[_0x10458f];if('revisionHistoryLicenseKeyValid'==_0x549c18||'revisionHistoryLicenseKeyInvalid'==_0x549c18||'revisionHistoryLicenseKeyExpired'==_0x549c18||'revisionHistoryLicenseKeyDomainLimit'==_0x549c18||'revisionHistoryLicenseKeyNotAllowed'==_0x549c18||'revisionHistoryLicenseKeyEvaluationLimit'==_0x549c18||'revisionHistoryLicenseKeyUsageLimit'==_0x549c18){delete _0x57efeb[_0x10458f],_0x322584=_0x549c18,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x322584&&_0x57efeb['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x322584&&_0x57efeb['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x322584&&_0x57efeb['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x322584&&_0x57efeb['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x322584&&_0x57efeb['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x322584&&_0x57efeb['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x479d49=this['repository']['getRevision'](0x0),_0x27b754=await this['getRevisionDocumentData'](_0x479d49),_0x4bc672=await this['getRevisionRootsAttributes'](_0x479d49);this['_replaceEditorDataWithRevisionData'](_0x27b754,_0x4bc672);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x19475b){this['_source']=_0x19475b;}async['update'](){const _0x3a9b65=await this['_source']['getLatestVersion']();if(_0x3a9b65>this['currentRevision']['toVersion']){await this['_loadState']();const _0x4ff000=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x3a9b65});_0x4ff000['authors']=_0x4ff000['authorsIds']['map'](_0x2ea993=>this['editor']['plugins']['get']('Users')['getUser'](_0x2ea993)),this['currentRevision']['_update'](_0x4ff000);}}async['saveRevision'](_0x1af78b={},_0x2402f3=null){const _0x176eb2=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x2402f3>this['currentRevision']['toVersion']&&(_0x2402f3=null),null===_0x2402f3&&(_0x2402f3=await this['_source']['getLatestVersion']());const _0x234b29=this['_getFromVersion'](_0x2402f3),_0x56624c=this['buildRevisionData']({'from':_0x234b29,'to':_0x2402f3});if(this['currentRevision']['toVersion']<_0x2402f3){const _0x5d15e6=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x2402f3,'to':_0x2402f3});_0x5d15e6['authors']=[],_0x5d15e6['authorsIds']=[],_0x5d15e6['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x5d15e6,!0x0),delete _0x5d15e6['authors'],_0x176eb2['push'](_0x5d15e6);}_0x1af78b['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x1af78b['name']=_0x1af78b['name']||null,_0x1af78b['id']=_0x1af78b['id']||_0x3d9671(),_0x1af78b={..._0x1af78b,..._0x56624c};const _0x2d1413=this['addRevisionData'](_0x1af78b);_0x176eb2['push'](_0x1af78b);const _0x1d55c9=this['repository']['getIndex'](_0x2d1413);if(0x0!==_0x1d55c9){const _0x16cdfe=this['repository']['getRevision'](_0x1d55c9-0x1);if(_0x16cdfe['fromVersion']!==_0x2402f3){const _0x42901f=this['_revisionDataBuilder']['getData'](_0x2402f3,_0x16cdfe['toVersion']),_0x3f3025={'id':_0x16cdfe['id'],'diffData':_0x42901f['diffData'],'authorsIds':_0x42901f['authorsIds'],'authors':_0x42901f['authorsIds']['map'](_0x5cbb98=>this['editor']['plugins']['get']('Users')['getUser'](_0x5cbb98)),'fromVersion':_0x2402f3};_0x16cdfe===this['currentRevision']&&(_0x3f3025['createdAt']=new Date(_0x1af78b['createdAt']['getTime']()+0xa)),_0x16cdfe['_update'](_0x3f3025,!0x0),delete _0x3f3025['authors'],_0x176eb2['push'](_0x3f3025);}}if(this['adapter']){for(const _0xf80514 of _0x176eb2)this['_bufferUpdate'](_0xf80514['id'],_0xf80514,!0x0);this['sendBufferedUpdates']();}return _0x2d1413;}['addRevisionData'](_0x1f5db2){const _0x13c99b=this['repository']['createRevision'](_0x1f5db2);return this['adapter']&&_0x13c99b['on']('_update',(_0x36a9ce,_0x4781d7,_0x48b26e)=>{_0x48b26e||(this['_bufferUpdate'](_0x4781d7['id'],_0x4781d7,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x13c99b,this['_findInsertionIndex'](_0x13c99b)),_0x13c99b;}async['getRevisionDocumentData'](_0x24a452){return await this['_utils']['loadRevisionData'](_0x24a452,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x24a452);}async['getRevisionRootsAttributes'](_0x4d818a){return await this['_utils']['loadRevisionData'](_0x4d818a,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x4d818a);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x269a1c=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x4bcb49=0x0;_0x4bcb49<_0x269a1c['length'];_0x4bcb49++){const _0x5e13ca=_0x269a1c[_0x4bcb49];let _0xd460ed=!0x1;for(const _0x176168 of Object['keys'](_0x5e13ca))void 0x0===_0x5e13ca[_0x176168]?delete _0x5e13ca[_0x176168]:'id'!==_0x176168&&(_0xd460ed=!0x0);_0xd460ed||(_0x269a1c[_0x4bcb49]=null);}if(_0x269a1c=_0x269a1c['filter'](_0x5cc1e2=>null!==_0x5cc1e2),!_0x269a1c['length'])return;for(let _0x26b2b9=0x0;_0x26b2b9<_0x269a1c['length'];_0x26b2b9++){const _0x501950=_0x269a1c[_0x26b2b9];void 0x0!==_0x501950['fromVersion']&&void 0x0===_0x501950['toVersion']&&(_0x501950['toVersion']=this['repository']['getRevision'](_0x501950['id'])['toVersion']),void 0x0!==_0x501950['toVersion']&&void 0x0===_0x501950['fromVersion']&&(_0x501950['fromVersion']=this['repository']['getRevision'](_0x501950['id'])['fromVersion']);}const _0x1c3632=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x269a1c,_0x1c3632)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x9502d7=>{if(_0x9502d7){for(const _0x290b7c of _0x9502d7)this['setRevisionData']({'id':_0x290b7c['id'],'createdAt':_0x290b7c['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x2f170a=null,from:_0x494edd=null,to:_0x124af4=null}){_0x494edd=null!==_0x494edd?_0x494edd:_0x2f170a['fromVersion'],_0x124af4=null!==_0x124af4?_0x124af4:_0x2f170a['toVersion'];const _0x5ea046=this['_revisionDataBuilder']['getData'](_0x494edd,_0x124af4),_0x54c333={'diffData':_0x5ea046['diffData'],'authorsIds':_0x5ea046['authorsIds'],'fromVersion':_0x494edd,'toVersion':_0x124af4};if(!_0x2f170a||_0x124af4!==_0x2f170a['toVersion']){const _0x5c61dc=_0x124af4-0x1,_0x267550=this['_source']['history']['getOperation'](_0x5c61dc);_0x54c333['createdAt']=_0x267550&&_0x267550['createdAt']||new Date();}if(this['_loadedStateData']&&_0x494edd===this['_loadedStateData']['fromVersion']){for(const _0x126ed0 of this['_loadedStateData']['authors'])_0x54c333['authorsIds']['includes'](_0x126ed0['id'])||_0x54c333['authorsIds']['push'](_0x126ed0['id']);}return _0x54c333;}['_bufferUpdate'](_0x495a81,_0x63dac4,_0x50e8d3){if(this['_bufferedUpdates']['has'](_0x495a81)){const _0x55079f=this['_bufferedUpdates']['get'](_0x495a81);_0x63dac4=_0x50e8d3?{..._0x55079f,..._0x63dac4}:{..._0x63dac4,..._0x55079f};}this['_bufferedUpdates']['set'](_0x495a81,_0x63dac4);}['setRevisionData'](_0x15c7c2){const _0x3839dc=this['repository']['getRevision'](_0x15c7c2['id']);if(_0x15c7c2['createdAt']&&(_0x15c7c2['createdAt']=new Date(_0x15c7c2['createdAt'])),_0x15c7c2['authorsIds']){const _0x2d9aa9=this['editor']['plugins']['get']('Users');_0x15c7c2['authors']=_0x15c7c2['authorsIds']['map'](_0x456898=>_0x2d9aa9['getUser'](_0x456898));}_0x3839dc['_update'](_0x15c7c2,!0x0);}['_createInitialRevision'](_0x567d05){const _0x37f268=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x37f268)this['_initialRevisionId']=_0x37f268['id'];else{const _0xd58121=!this['editor']['model']['document']['roots']['find'](_0x990ea2=>this['editor']['model']['hasContent'](_0x990ea2)),_0x5e0881=this['editor']['plugins']['get']('Users')['me']['id'],_0x337e19=m(this['editor']['locale'],_0xd58121?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x567d05,'to':_0x567d05,'id':this['_initialRevisionId'],'name':_0x337e19,'creatorId':_0x5e0881});}}['_createCurrentRevision'](_0x5293eb){const _0x4d1f7b=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x4d1f7b),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x5293eb,'to':_0x5293eb,'id':_0x4d1f7b,'name':'','creatorId':null}));}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_utils']['loadRevisionData'](this['currentRevision'],this['adapter']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}['_replaceEditorDataWithRevisionData'](_0x295ab3,_0x3088ce){let _0x46dee8=this['editor']['config']['get']('initialData'),_0x5dd9e4=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x46dee8){_0x46dee8={};for(const _0x4534b4 of this['editor']['model']['document']['getRootNames']())_0x46dee8[_0x4534b4]='';}if('string'==typeof _0x46dee8&&(_0x46dee8={'main':_0x46dee8}),void 0x0===_0x5dd9e4){_0x5dd9e4={};for(const _0x31db93 of this['editor']['model']['document']['getRootNames']())_0x5dd9e4[_0x31db93]={};}let _0x19bf4a=!0x1;const _0x44833a=Object['keys'](_0x46dee8),_0x5dca2c=Object['keys'](_0x295ab3);for(const _0xc2beb9 of _0x44833a){if(_0x46dee8[_0xc2beb9]!==_0x295ab3[_0xc2beb9]&&''!==_0x46dee8[_0xc2beb9]['trim']()){_0x19bf4a=!0x0;break;}if(!_0x386a00(_0x5dd9e4[_0xc2beb9],_0x3088ce[_0xc2beb9])&&Object['keys'](_0x5dd9e4[_0xc2beb9])['length']>0x0){_0x19bf4a=!0x0;break;}}_0x19bf4a||(_0x19bf4a=_0x5dca2c['some'](_0x48a51a=>!this['editor']['model']['document']['getRoot'](_0x48a51a))),_0x19bf4a&&_0x1270e7('editor-initial-data-replaced-with-revision-data',{'editorData':_0x46dee8,'editorRootsAttributes':_0x5dd9e4,'revisionData':_0x295ab3,'revisionRootsAttributes':_0x3088ce}),this['editor']['config']['set']('initialData',_0x295ab3),this['editor']['config']['set']('rootsAttributes',_0x3088ce);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x4ac40d=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x4ac40d['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x48bca0){const _0x5f0e7d=this['repository']['getRevisions']();_0x5f0e7d['reverse']();let _0x26ecef=0x0;for(;_0x26ecef<_0x5f0e7d['length'];){const _0x1c5589=_0x5f0e7d[_0x26ecef];if(_0x1c5589===this['currentRevision']){_0x26ecef++;continue;}if(_0x1c5589['id']===this['_initialRevisionId'])break;const _0x45b665=_0x48bca0['toVersion']-_0x1c5589['toVersion']||_0x48bca0['fromVersion']-_0x1c5589['fromVersion'];if(_0x45b665>0x0)break;if(_0x45b665<0x0)_0x26ecef++;else{if(!_0x48bca0['creator']&&_0x1c5589['creator'])break;if(_0x1c5589['creator']||!_0x48bca0['creator']){if(_0x48bca0['createdAt']>_0x1c5589['createdAt'])break;_0x26ecef++;}else _0x26ecef++;}}return _0x26ecef;}['_getFromVersion'](_0xedf570){const _0x4c2ba4=this['repository']['getRevisions']();_0x4c2ba4['reverse'](),_0x4c2ba4['shift']();const _0x4c3802=_0x4c2ba4['find'](_0x560022=>_0x560022['toVersion']<=_0xedf570)['toVersion'];return _0x4c3802<this['_startingVersion']?this['_startingVersion']:_0x4c3802;}['_makeRevision']({name:_0x175918,from:_0x12e72d,to:_0x201dbb,creatorId:_0xd664f4,id:_0x16a361}){const _0x20282e=this['buildRevisionData']({'from':_0x12e72d,'to':_0x201dbb});_0x20282e['name']=_0x175918,_0x20282e['creatorId']=_0xd664f4,_0x20282e['id']=_0x16a361;const _0x2c5f83=this['addRevisionData'](_0x20282e);return this['adapter']&&this['_bufferUpdate'](_0x20282e['id'],_0x20282e,!0x0),_0x2c5f83;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class RevisionDataBuilder{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x5b6534){this['editor']=_0x5b6534,this['_savedMetaData']=new Map(),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_markers']=new Map(),this['_diffRoots']=new Map(),this['_diffRootsAttributes']=new Map(),this['_baseRoots']=new Map(),this['_baseRootsAttributes']=new Map(),this['_idsRoots']=new Map(),this['_baseIdsRoots']=new Map(),this['_touched']=new Map(),this['_touchedMarkers']=new Map(),this['_touchedRoots']=new Map(),this['_revisionId']=0x1;}['init'](_0x57c7fd){this['source']=_0x57c7fd;const _0x38d281=new Map(),_0x2a0b91=new Map(),_0x1341db=this['editor']['model']['document']['roots']['map'](_0x1f1064=>_0x1f1064['rootName']);for(const _0x388c89 of _0x1341db){const _0xe7d5b7=this['editor']['model']['document']['getRoot'](_0x388c89),_0x35619a=x(_0xe7d5b7);_0x38d281['set'](_0x388c89,_0x35619a),_0x2a0b91['set'](_0x388c89,Object['fromEntries'](_0xe7d5b7['getAttributes']()));}const _0x54b481=Array['from'](this['editor']['model']['markers'])['map'](_0x57075d=>[_0x57075d['name'],_0x57075d['getRange']()]),_0x38cae8=this['source']['version'];this['_saveMetaData'](_0x38cae8,_0x38d281,_0x54b481,_0x2a0b91),this['_startingRevisionId']=this['_revisionId'];const _0x5f1719=new Map(),_0x3088a9=new Map();for(const _0x90c16e of _0x1341db){const _0x576584=K(_0x90c16e);_0x5f1719['set'](_0x90c16e,_0x576584),_0x3088a9['set'](_0x90c16e,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x5f1719,[],_0x3088a9);}['getData'](_0xc3d910,_0x1aba25){if(this['_lastFrom']===_0xc3d910&&this['_lastTo']<=_0x1aba25)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x1aba25,!0x0);else{if(!this['_savedMetaData']['has'](_0xc3d910)){const _0x36adaf=this['_getPreviousFrom'](_0xc3d910);this['_calculateMetaData'](_0x36adaf,_0xc3d910,!0x1);}this['_calculateMetaData'](_0xc3d910,_0x1aba25,!0x0);}return this['_lastFrom']=_0xc3d910,this['_lastTo']=_0x1aba25,this['_getState']();}['loadState'](_0x5c4d1c){if(!this['_savedMetaData']['has'](_0x5c4d1c['fromVersion'])){const _0x3d7da6=this['_getPreviousFrom'](_0x5c4d1c['fromVersion']);this['_calculateMetaData'](_0x3d7da6,_0x5c4d1c['fromVersion'],!0x1);}this['_calculateMetaData'](_0x5c4d1c['fromVersion'],_0x5c4d1c['toVersion'],!0x1);const _0x1c5ac6=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x5c4d1c['fromVersion'],this['_lastTo']=_0x5c4d1c['toVersion'];for(const _0x1901c3 in _0x5c4d1c['diffData']){const _0xb04d41=_0x5c4d1c['diffData'][_0x1901c3]['attachChange'],_0x508eb=_0xb23e18(_0x5c4d1c['diffData'][_0x1901c3]['attributesBefore'])||{},_0x4283e1=_0x1c5ac6['_makeModelFromViewString'](_0x5c4d1c['diffData'][_0x1901c3]['deletions']);_0x4283e1['rootName']=_0x1901c3,_0x4283e1['_isAttached']=!_0xb04d41||!_0xb04d41['isAttached'],_0x4283e1['isAttached']=()=>_0x4283e1['_isAttached'],this['_baseRoots']['set'](_0x1901c3,_0x4283e1),this['_baseRootsAttributes']['set'](_0x1901c3,_0x508eb),_0xb04d41&&this['_touchedRoots']['set'](_0x1901c3,_0xb04d41);const _0x1062d4=this['_makeIdsRoot'](_0x4283e1);this['_baseIdsRoots']['set'](_0x1901c3,_0x1062d4);for(const [_0x5a6d14,_0x509a17]of _0x4283e1['markers']){if(!_0x5a6d14['startsWith']('revision:'))continue;const _0x2e9d34=_0x5a6d14['split'](':')[0x2];for(const _0x4b8b78 of _0x509a17['getWalker']({'singleCharacters':!0x0})){const _0x43d4ab=this['_getVidAttributeName'](_0x4b8b78),_0x215aa3='elementEnd'==_0x4b8b78['type']?_0x4b8b78['previousPosition']['path']['slice'](0x0,-0x1):_0x4b8b78['previousPosition']['path'],_0x391c9e=_0x1062d4['getNodeByPath'](_0x215aa3)['getAttribute'](_0x43d4ab);this['_touched']['set'](_0x391c9e,{'userId':_0x2e9d34});}_0x4283e1['markers']['delete'](_0x5a6d14);}}this['_startingRevisionId']=this['_revisionId'];const _0x3ce682=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x177d38=>!this['_touched']['has'](_0x177d38));let _0x557825=0x0;const _0x4dc42a=new Map();for(const _0x5c88f0 in _0x5c4d1c['diffData']){const _0x219874=_0x5c4d1c['diffData'][_0x5c88f0]['attachChange'],_0x374e9e=_0xb23e18(_0x5c4d1c['diffData'][_0x5c88f0]['attributesAfter'])||{},_0x1d07ec=_0x1c5ac6['_makeModelFromViewString'](_0x5c4d1c['diffData'][_0x5c88f0]['insertions']);_0x1d07ec['rootName']=_0x5c88f0,_0x1d07ec['_isAttached']=!_0x219874||_0x219874['isAttached'],_0x1d07ec['isAttached']=()=>_0x1d07ec['_isAttached'],this['_diffRoots']['set'](_0x5c88f0,_0x1d07ec),this['_diffRootsAttributes']['set'](_0x5c88f0,_0x374e9e);const _0x35e7cd=this['_makeIdsRoot'](_0x1d07ec,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x5c88f0,_0x35e7cd),_0x4dc42a['set'](_0x5c88f0,_0x1d07ec['isAttached']()?_0x374e9e:{});for(const [_0x36aa4a,_0x20d6b6]of _0x1d07ec['markers']){if(!_0x36aa4a['startsWith']('revision:'))continue;const _0x2d3150=_0x36aa4a['split'](':')[0x2];for(const _0x2208a5 of _0x20d6b6['getWalker']({'singleCharacters':!0x0})){const _0x5824a9=this['_getVidAttributeName'](_0x2208a5),_0x5743f3=this['_revisionId']++,_0x4a329e='elementEnd'==_0x2208a5['type']?_0x2208a5['previousPosition']['path']['slice'](0x0,-0x1):_0x2208a5['previousPosition']['path'];_0x35e7cd['getNodeByPath'](_0x4a329e)['_setAttribute'](_0x5824a9,_0x5743f3),this['_touched']['set'](_0x5743f3,{'userId':_0x2d3150});}_0x1d07ec['markers']['delete'](_0x36aa4a);}for(const _0x3f13ba of this['editor']['model']['createRangeIn'](_0x1d07ec)['getWalker']({'singleCharacters':!0x0})){const _0x1c28cb=this['_getVidAttributeName'](_0x3f13ba),_0x5f60d7='elementEnd'==_0x3f13ba['type']?_0x3f13ba['previousPosition']['path']['slice'](0x0,-0x1):_0x3f13ba['previousPosition']['path'],_0x37639b=_0x35e7cd['getNodeByPath'](_0x5f60d7);_0x37639b['getAttribute'](_0x1c28cb)>0x0||_0x37639b['_setAttribute'](_0x1c28cb,_0x3ce682[_0x557825++]);}for(const [_0x57952a,_0x677179]of _0x1d07ec['markers'])_0x57952a['startsWith']('revision:')||this['_markers']['set'](_0x57952a,_0x677179);}const {roots:_0x2c3c51}=this['_savedMetaData']['get'](_0x5c4d1c['fromVersion']),{roots:_0x2b70fd}=this['_savedMetaData']['get'](_0x5c4d1c['toVersion']),_0xa110c6=x(_0x2c3c51['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0xa110c6),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0xa110c6,Number['NEGATIVE_INFINITY']));const _0x54a2f7=x(_0x2b70fd['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x54a2f7),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x54a2f7));const _0x2ad262=Array['from'](this['_diffRoots'])['map'](([_0xacc587,_0x16e41e])=>[_0xacc587,x(_0x16e41e)]);this['_saveMetaData'](this['_lastTo'],_0x2ad262,this['_markers'],_0x4dc42a);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x395c15,_0x537d68,_0x154eec,_0x141582){const _0x3fcc2b=new Map(_0x537d68),_0x507be6=new Map(_0xb23e18(_0x141582)),_0x5b9dff=new Map();for(const [_0x132c4a,_0x4d5102]of _0x154eec)_0x5b9dff['set'](_0x132c4a,{'start':_0x4d5102['start']['clone'](),'end':_0x4d5102['end']['clone'](),'rootName':_0x4d5102['root']['rootName']});this['_savedMetaData']['set'](_0x395c15,{'roots':_0x3fcc2b,'markers':_0x5b9dff,'rootsAttributes':_0x507be6});}['_removeMetaData'](_0x30a191){this['_savedMetaData']['delete'](_0x30a191);}['_reset'](){this['_touched']['clear'](),this['_touchedMarkers']['clear'](),this['_touchedRoots']['clear'](),this['_diffRoots']['clear'](),this['_diffRootsAttributes']['clear'](),this['_baseRoots']['clear'](),this['_baseRootsAttributes']['clear'](),this['_idsRoots']['clear'](),this['_baseIdsRoots']['clear'](),this['_markers']['clear'](),this['_revisionId']=0x1,this['_startingRevisionId']=this['_revisionId'];}['_makeIdsRoot'](_0x20568a,_0x5735b6=null){let _0x49e328=null;_0x20568a['is']('documentFragment')||(_0x49e328=new _0x4e1429(_0x20568a['name'],{'vid_start':null===_0x5735b6?this['_revisionId']++:_0x5735b6++}));const _0x48f4c5=[];for(const _0x5b0dab of _0x20568a['getChildren']())if(_0x5b0dab['is']('element')){_0x48f4c5['push'](this['_makeIdsRoot'](_0x5b0dab,_0x5735b6));const _0x52172a=_0x48f4c5[_0x48f4c5['length']-0x1];null!==_0x5735b6&&(_0x5735b6=_0x52172a['is']('element','$text')?_0x52172a['getAttribute']('vid')+0x1:_0x52172a['getAttribute']('vid_end')+0x1);}else{for(let _0x3c1ac1=0x0;_0x3c1ac1<_0x5b0dab['offsetSize'];_0x3c1ac1++)_0x48f4c5['push'](new _0x4e1429('$text',{'vid':null===_0x5735b6?this['_revisionId']++:_0x5735b6++}));}if(_0x20568a['is']('documentFragment')){const _0x37753b=K(_0x20568a['rootName']);return _0x37753b['_insertChild'](0x0,_0x48f4c5),_0x37753b;}return _0x49e328['_setAttribute']('vid_end',null===_0x5735b6?this['_revisionId']++:_0x5735b6++),_0x49e328['_insertChild'](0x0,_0x48f4c5),_0x49e328;}['_calculateMetaData'](_0x38e2d9,_0x579920,_0x3eb95a){this['_reset']();const {roots:_0x19d5f2,markers:_0x25cd76,rootsAttributes:_0xa21916}=this['_savedMetaData']['get'](_0x38e2d9);this['_baseRoots']=new Map(_0x19d5f2),this['_baseRootsAttributes']=new Map(_0xb23e18(_0xa21916));for(const [_0xba091b,_0x2d36cf]of this['_baseRoots'])if('$graveyard'!==_0xba091b&&(this['_diffRoots']['set'](_0xba091b,x(_0x2d36cf)),this['_diffRootsAttributes']=new Map(_0xb23e18(_0xa21916)),_0x3eb95a)){const _0x4ecc81=this['_revisionId'];this['_idsRoots']['set'](_0xba091b,this['_makeIdsRoot'](_0x2d36cf)),this['_baseIdsRoots']['set'](_0xba091b,this['_makeIdsRoot'](_0x2d36cf,_0x4ecc81));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',x(this['_baseRoots']['get']('$graveyard'))),_0x3eb95a&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x3b834c,_0x2a2265]of _0x25cd76){const _0x5df932=this['_baseRoots']['get'](_0x2a2265['rootName']),_0x3b5880=this['_diffRoots']['get'](_0x2a2265['rootName']),_0x41cf38=new _0x34f7bf(this['_fixPosition'](_0x2a2265['start'],_0x5df932),this['_fixPosition'](_0x2a2265['end'],_0x5df932)),_0x3de9bf=this['_fixRange'](_0x41cf38,_0x3b5880);_0x5df932['markers']['set'](_0x3b834c,_0x41cf38),this['_markers']['set'](_0x3b834c,_0x3de9bf);}this['_applyOperations'](_0x38e2d9,_0x579920,_0x3eb95a);}['_applyOperations'](_0x337830,_0x576777,_0x55df02){for(const _0x26f9ba of this['source']['getOperations'](_0x337830,_0x576777))this['_handleOperation'](_0x26f9ba,_0x55df02);for(const _0x503c64 of this['_diffRoots']['values']())_0x503c64['markers']['clear']();for(const [_0x46844c,_0xb91dc8]of this['_markers']){this['_diffRoots']['get'](_0xb91dc8['root']['rootName'])['markers']['set'](_0x46844c,_0xb91dc8['clone']());}const _0x1f3e7c=new Map(),_0x83147f=new Map();for(const [_0x1a4c1d,_0x573cf4]of this['_diffRoots'])_0x1f3e7c['set'](_0x1a4c1d,x(_0x573cf4)),_0x83147f['set'](_0x1a4c1d,this['_diffRootsAttributes']['get'](_0x1a4c1d));this['_saveMetaData'](_0x576777,_0x1f3e7c,this['_markers'],_0x83147f);}['_getPreviousFrom'](_0x2a0008){const _0x296ed3=Array['from'](this['_savedMetaData']['keys']());_0x296ed3['sort']((_0x33ec97,_0x156bc2)=>_0x33ec97-_0x156bc2),_0x296ed3['reverse']();for(const _0x4a2d27 of _0x296ed3)if(_0x4a2d27<_0x2a0008)return _0x4a2d27;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x1274f1,_0x1f0ac7){const _0x304eae=Array['from'](_0x1f0ac7['markers'])['map'](([_0x1f34de,_0x584022])=>[_0x1f34de,this['_fixRange'](_0x584022,_0x1274f1)]);_0x1274f1['markers']=new Map(_0x304eae);}['_transformMarkers'](_0x1208d2){for(const _0x35d71b of this['_markers']['values']()){const _0x19b78a=_0x35d71b['getTransformedByOperation'](_0x1208d2),_0x206edf=_0x34f7bf['_createFromRanges'](_0x19b78a);_0x35d71b['start']=_0x206edf['start'],_0x35d71b['end']=_0x206edf['end'];}}['_handleOperation'](_0x22c43e,_0x1cde78){if('addRoot'!=_0x22c43e['type']&&'detachRoot'!=_0x22c43e['type']){if('insert'==_0x22c43e['type']){const _0x19612e=_0x22c43e['position']['root']['rootName'];this['_diffRoots']['has'](_0x19612e)||(this['_diffRoots']['set'](_0x19612e,K(_0x19612e,!0x0)),this['_diffRootsAttributes']['set'](_0x19612e,{}),_0x1cde78&&this['_idsRoots']['set'](_0x19612e,K(_0x19612e,!0x0)));}else{if('addRootAttribute'==_0x22c43e['type']||'removeRootAttribute'==_0x22c43e['type']||'changeRootAttribute'==_0x22c43e['type'])return void this['_handleRootAttributeOperation'](_0x22c43e);'marker'==_0x22c43e['type']&&this['_handleMarkerOperation'](_0x22c43e);}if('marker'!==_0x22c43e['type']){const _0x5e4747=this['_cloneOperation'](_0x22c43e,this['_diffRoots']);_0x5e4747['_execute'](),this['_transformMarkers'](_0x5e4747);}if(_0x1cde78)switch(_0x22c43e['type']){case'insert':this['_handleInsertOperation'](_0x22c43e);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x22c43e);break;case'merge':this['_handleMergeOperation'](_0x22c43e);break;case'split':this['_handleSplitOperation'](_0x22c43e);}}else this['_handleRootOperation'](_0x22c43e,_0x1cde78);}['_cloneOperation'](_0x1016bd,_0x4e21a1){const _0x3bb23c=_0x1016bd['clone']();return _0x3bb23c['_authorId']=_0x1016bd['_authorId'],this['_fixOperation'](_0x3bb23c,_0x4e21a1),_0x3bb23c;}['_getBaseVids'](_0x47ef4c){return _0x47ef4c['map'](_0x359177=>{const _0x73c3e0=this['_getVidAttributeName'](_0x359177);return Number(_0x359177['item']['getAttribute'](_0x73c3e0));});}['_generateTape'](_0x1b287f,_0x245f2c){if(_0x1b287f['is']('element','$text'))_0x245f2c['push']({'item':_0x1b287f,'type':'text'});else{_0x1b287f['is']('element')&&_0x245f2c['push']({'item':_0x1b287f,'type':'elementStart'});for(const _0x559288 of _0x1b287f['getChildren']())this['_generateTape'](_0x559288,_0x245f2c);_0x1b287f['is']('element')&&_0x245f2c['push']({'item':_0x1b287f,'type':'elementEnd'});}return _0x245f2c;}['_getState'](){const _0x5cf38b=new Map(this['_touched']),_0x4be38e=new Map(_0x5cf38b),_0x4ba02e=new Map(),_0x442d01={'insertions':{},'deletions':{}},_0x42e640={'insertions':{},'deletions':{}},_0x32f06f=new Map(),_0x3c6c36=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x3c6c36['delete']('$graveyard');for(const _0x30a5a6 of _0x3c6c36){const _0x17dfa0=this['_diffRoots']['get'](_0x30a5a6)||K(_0x30a5a6,!0x1),_0x2e5fc8=this['_baseRoots']['get'](_0x30a5a6)||K(_0x30a5a6,!0x1);_0x17dfa0['isAttached']()||_0x2e5fc8['isAttached']()?(_0x442d01['insertions'][_0x30a5a6]=x(_0x17dfa0),_0x442d01['deletions'][_0x30a5a6]=x(_0x2e5fc8),this['_copyMarkers'](_0x442d01['deletions'][_0x30a5a6],_0x2e5fc8),this['_copyMarkers'](_0x442d01['insertions'][_0x30a5a6],_0x17dfa0),_0x42e640['insertions'][_0x30a5a6]=this['_generateTape'](this['_idsRoots']['get'](_0x30a5a6),[]),_0x42e640['deletions'][_0x30a5a6]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x30a5a6)||K(_0x30a5a6,!0x1),[])):_0x3c6c36['delete'](_0x30a5a6);}for(const _0x435910 of _0x3c6c36){const _0x331fd4=_0x42e640['insertions'][_0x435910];for(const _0x1dcb7e of _0x331fd4){const _0x525d40=this['_getVidAttributeName'](_0x1dcb7e),_0x4debc3=_0x1dcb7e['item']['getAttribute'](_0x525d40);_0x4be38e['delete'](_0x4debc3),_0x4debc3>=this['_startingRevisionId']&&_0x4ba02e['set'](_0x4debc3,_0x5cf38b['get'](_0x4debc3));}}for(const _0x1f3ff9 of _0x3c6c36){const _0x511a73=_0x42e640['insertions'][_0x1f3ff9],_0x2b2390=this['_getBaseVids'](_0x42e640['deletions'][_0x1f3ff9]);let _0x1cdb22=0x0;for(const _0x4eb59a of _0x511a73){const _0x12a7f9=this['_getVidAttributeName'](_0x4eb59a),_0x34d30c=_0x4eb59a['item']['getAttribute'](_0x12a7f9);if(!_0x4ba02e['has'](_0x34d30c)&&!_0x32f06f['has'](_0x34d30c)){if(_0x4be38e['has'](_0x34d30c))_0x1cdb22++;else{if(_0x34d30c!=_0x2b2390[_0x1cdb22]){const _0x26efe8=_0x5cf38b['get'](_0x34d30c)||_0x5cf38b['get'](_0x2b2390[_0x1cdb22]);for(;_0x34d30c!=_0x2b2390[_0x1cdb22];)_0x4be38e['has'](_0x2b2390[_0x1cdb22])||(_0x32f06f['set'](_0x2b2390[_0x1cdb22],_0x26efe8),_0x5cf38b['set'](_0x2b2390[_0x1cdb22],_0x26efe8)),_0x1cdb22++;}_0x1cdb22++;}}}}for(const _0x5a99c1 of _0x3c6c36){const _0x593388=_0x42e640['insertions'][_0x5a99c1];for(const _0x362d01 of _0x593388){const _0xcd02be=this['_getVidAttributeName'](_0x362d01),_0x2d166a=_0x362d01['item']['getAttribute'](_0xcd02be);if(_0x32f06f['has'](_0x2d166a)){const _0x4c2578=_0x32f06f['get'](_0x2d166a);_0x4be38e['has'](_0x2d166a)||_0x4be38e['set'](_0x2d166a,{..._0x4c2578}),_0x4ba02e['set'](_0x2d166a,{..._0x4c2578});}}}for(const _0xdb5776 of _0x4be38e['keys']())_0xdb5776>=this['_startingRevisionId']&&_0x4be38e['delete'](_0xdb5776);const _0x35fc3a=new Map();for(const _0x26de90 of _0x3c6c36){let _0x2c6027=_0x42e640['insertions'][_0x26de90];for(const _0x5de6ac of _0x2c6027)if(_0x5de6ac['item']['is']('element','tableCell')){const _0xdddb1f=this['_getVidAttributeName'](_0x5de6ac),_0x3f0839=_0x5de6ac['item']['getAttribute'](_0xdddb1f);if(_0x4ba02e['has'](_0x3f0839)){const _0x262bb1=_0x5de6ac['item']['parent']['parent']['getAttribute']('vid_start'),_0x2d1d48=_0x35fc3a['get'](_0x262bb1)||new Set();_0x2d1d48['add'](_0x4ba02e['get'](_0x3f0839)['userId']),_0x35fc3a['set'](_0x262bb1,_0x2d1d48);}}_0x2c6027=_0x42e640['deletions'][_0x26de90];for(const _0xa50ac6 of _0x2c6027)if(_0xa50ac6['item']['is']('element','tableCell')){const _0x538b03=this['_getVidAttributeName'](_0xa50ac6),_0x4f5337=_0xa50ac6['item']['getAttribute'](_0x538b03);if(_0x4be38e['has'](_0x4f5337)){const _0x567cc9=_0xa50ac6['item']['parent']['parent']['getAttribute']('vid_start'),_0x9b4782=_0x35fc3a['get'](_0x567cc9)||new Set();_0x9b4782['add'](_0x4be38e['get'](_0x4f5337)['userId']),_0x35fc3a['set'](_0x567cc9,_0x9b4782);}}for(const _0x5840fd of _0x35fc3a['keys']())(_0x4ba02e['has'](_0x5840fd)||_0x4be38e['has'](_0x5840fd))&&_0x35fc3a['delete'](_0x5840fd);}for(const _0x12df88 of _0x3c6c36){const _0x2967a5=_0x42e640['insertions'][_0x12df88];let _0x56c03b=null,_0x24c17f=null;for(const _0x26d664 of _0x2967a5){const _0x10e6de=this['_getVidAttributeName'](_0x26d664),_0x362f97=_0x26d664['item']['getAttribute'](_0x10e6de),_0x4d10ee=_0x35fc3a['get'](_0x362f97);_0x4d10ee&&'elementStart'==_0x26d664['type']&&(_0x56c03b=Array['from'](_0x4d10ee)[0x0],_0x24c17f=_0x26d664['item']['getAttribute']('vid_end')),_0x56c03b&&(_0x4be38e['set'](_0x362f97,{'userId':_0x56c03b}),_0x4ba02e['set'](_0x362f97,{'userId':_0x56c03b})),_0x362f97==_0x24c17f&&(_0x56c03b=null,_0x24c17f=null);}}const _0x150287={},_0x1ff593=new Set();for(const _0x5a267b of _0x3c6c36){const _0x265674=_0x442d01['deletions'][_0x5a267b],_0x189627=_0x442d01['insertions'][_0x5a267b];for(const {userId:_0x2b1754}of this['_touchedMarkers']['values']())null!==_0x2b1754&&_0x1ff593['add'](_0x2b1754);for(const {userId:_0xe8c5d7}of this['_touchedRoots']['values']())null!==_0xe8c5d7&&_0x1ff593['add'](_0xe8c5d7);this['_markChanges'](_0x189627,_0x42e640['insertions'][_0x5a267b],_0x4ba02e,'insertion',_0x1ff593),this['_markChanges'](_0x265674,_0x42e640['deletions'][_0x5a267b],_0x4be38e,'deletion',_0x1ff593),_0x150287[_0x5a267b]={'insertions':this['_prepareViewToSave'](_0x189627),'deletions':this['_prepareViewToSave'](_0x265674),'attachChange':this['_touchedRoots']['get'](_0x5a267b)||null,'attributesBefore':_0xb23e18(this['_baseRootsAttributes']['get'](_0x5a267b))||{},'attributesAfter':_0xb23e18(this['_diffRootsAttributes']['get'](_0x5a267b))};}return{'diffData':_0x150287,'authorsIds':Array['from'](_0x1ff593)};}['_processRootBeforeSave'](_0x426c4d){for(const [,_0x295e26]of _0x426c4d['markers']){const _0x2fd77d=_0x295e26['start']['getAncestors']()['filter'](_0x3ee2c2=>'tableCell'==_0x3ee2c2['name']);for(const _0x5970f0 of _0x2fd77d)0x1==_0x5970f0['childCount']&&_0x5970f0['getChild'](0x0)['is']('element','paragraph')&&_0x5970f0['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x175d64){this['_processRootBeforeSave'](_0x175d64);const _0x421f84=this['editor']['data']['toView'](_0x175d64,{}),_0x140a3b=Array['from'](_0x421f84['getChildren']())['map'](_0x4daf05=>this['_getViewJson'](_0x4daf05));return JSON['stringify'](_0x140a3b);}['_getViewJson'](_0x2a890b){if(_0x2a890b['is']('$text'))return _0x2a890b['data'];{const _0x5bd0ad=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x401f7c=_0x2a890b,_0xcff45c=this['editor']['data']['htmlProcessor']['domConverter'],_0x1fce6a={'type':_0x5bd0ad['_getTypeCharForViewElement'](_0x401f7c),'name':_0x401f7c['name'],'attributes':Array['from'](_0x401f7c['getAttributes']()),'children':Array['from'](_0x401f7c['getChildren']())['map'](_0x1218cd=>this['_getViewJson'](_0x1218cd))};if(_0x2a890b['is']('uiElement')&&'$comment'!=_0x2a890b['name']){const _0x5a7378=_0x2a890b['render'](_0xcff45c['domDocument'],_0xcff45c);_0x1fce6a['children']['push'](_0x5a7378['outerHTML']);}else{if(_0x2a890b['is']('rawElement')){const _0x437146=_0xcff45c['domDocument']['createElement'](_0x401f7c['name']);_0x2a890b['render'](_0x437146,_0xcff45c),_0x1fce6a['children']['push'](_0x437146['innerHTML']);}}const _0x50e4c3=Array['from'](_0x401f7c['getCustomProperties']());_0x50e4c3['length']>0x0&&(_0x1fce6a['customProperties']=_0x50e4c3);const _0x4ef86b=_0x401f7c['getFillerOffset']();return null!==_0x4ef86b&&(_0x1fce6a['fillerOffset']=_0x4ef86b),_0x1fce6a;}}['_markChanges'](_0x5e93d7,_0x255ed2,_0x14e55f,_0x123d75,_0x515098){let _0xadd0fa=null,_0x455634=null,_0x350681=0x0;const _0x30b654=this['editor']['model'];for(let _0x851221=0x0;_0x851221<_0x255ed2['length'];_0x851221++){const _0x5396ae=this['_getVidAttributeName'](_0x255ed2[_0x851221]),_0x4e112f=_0x255ed2[_0x851221]['item']['getAttribute'](_0x5396ae),_0x3f8dd6=_0x14e55f['get'](_0x4e112f),_0x97ae1b=_0x851221==_0x255ed2['length']-0x1;(!_0xadd0fa&&_0x3f8dd6&&(_0xadd0fa=_0x3f8dd6,_0x455634=_0x255ed2[_0x851221]),_0xadd0fa&&(!_0x3f8dd6||_0x3f8dd6['userId']!=_0xadd0fa['userId']))&&(_0x33cd26(_0x3f8dd6,N(_0x455634,_0x5e93d7,_0x30b654),N(_0x255ed2[_0x851221],_0x5e93d7,_0x30b654)),_0xadd0fa=_0x3f8dd6||null,_0x455634=_0x3f8dd6?_0x255ed2[_0x851221]:null),_0xadd0fa&&_0x97ae1b&&_0x33cd26(_0x3f8dd6,N(_0x455634,_0x5e93d7,_0x30b654),P(_0x255ed2[_0x851221],_0x5e93d7,_0x30b654));}function _0x33cd26(_0x375545,_0x51bffe,_0x52f76d){const _0x15ac07=_0xadd0fa['userId'],_0xc1def8='revision:'+_0x123d75+':'+_0x15ac07+':'+_0x350681++,_0x43347b=_0x30b654['createRange'](_0x51bffe,_0x52f76d);_0x5e93d7['markers']['set'](_0xc1def8,_0x43347b),null!==_0x15ac07&&_0x515098['add'](_0x15ac07);}}['_getVidAttributeName'](_0x25a4ef){switch(_0x25a4ef['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x5ca931,_0xb2719c){_0x5ca931['baseVersion']=null;for(const _0x5471a6 in _0x5ca931){const _0x557fda=_0x5ca931[_0x5471a6];if(_0x557fda instanceof _0x291a0b){const _0x454a7d=_0xb2719c['get'](_0x557fda['root']['rootName']);_0x5ca931[_0x5471a6]=this['_fixPosition'](_0x557fda,_0x454a7d);}if(_0x557fda instanceof _0x34f7bf){const _0x5c2ef3=_0xb2719c['get'](_0x557fda['root']['rootName']);_0x5ca931[_0x5471a6]=this['_fixRange'](_0x557fda,_0x5c2ef3);}'root'===_0x5471a6&&(_0x5ca931['root']=_0xb2719c['get'](_0x5ca931['root']['rootName']));}}['_fixRange'](_0x859c7,_0x56f7b8){return this['editor']['model']['createRange'](this['_fixPosition'](_0x859c7['start'],_0x56f7b8),this['_fixPosition'](_0x859c7['end'],_0x56f7b8));}['_fixPosition'](_0x4b302f,_0x3792ae){return this['editor']['model']['createPositionFromPath'](_0x3792ae,_0x4b302f['path'],_0x4b302f['stickiness']);}['_handleInsertOperation'](_0x42e071){const _0xa841c8=this['_idsRoots']['get'](_0x42e071['position']['root']['rootName']),_0x2c956c=this['_fixPosition'](_0x42e071['position'],_0xa841c8),_0x354bb3=null===_0x42e071['_authorId']?null:_0x42e071['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4fb11a=_0x2c956c['parent'],_0x5ab067=this['_revisionId'],_0x3bc65c=[];for(const _0x22df1f of _0x42e071['nodes'])if(_0x22df1f['is']('element'))_0x3bc65c['push'](this['_makeIdsRoot'](_0x22df1f));else{for(let _0x1fda0e=0x0;_0x1fda0e<_0x22df1f['offsetSize'];_0x1fda0e++)_0x3bc65c['push'](new _0x4e1429('$text',{'vid':this['_revisionId']++}));}const _0x5cb2bf=this['_revisionId'];for(let _0x53bd23=_0x5ab067;_0x53bd23<_0x5cb2bf;_0x53bd23++)this['_touched']['set'](_0x53bd23,{'userId':_0x354bb3});_0x4fb11a['_insertChild'](_0x2c956c['offset'],_0x3bc65c);}['_handleMoveOperation'](_0x1d4dca){(_0x1d4dca=this['_cloneOperation'](_0x1d4dca,this['_idsRoots']))['_execute']();const _0x42cede=null===_0x1d4dca['_authorId']?null:_0x1d4dca['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5d45e5=_0x1d4dca['getMovedRangeStart'](),_0x2775d6=_0x5d45e5['parent'],_0x1fed99=_0x5d45e5['offset'];!function _0x2cad09(_0x424c5a,_0x553873,_0x132eb1,_0x404326){for(let _0x1a5974=_0x132eb1;_0x1a5974<_0x404326;_0x1a5974++){const _0x57b786=_0x553873['getChild'](_0x1a5974);_0x57b786['is']('element','$text')?_0x424c5a['set'](_0x57b786['getAttribute']('vid'),{'userId':_0x42cede}):(_0x424c5a['set'](_0x57b786['getAttribute']('vid_start'),{'userId':_0x42cede}),_0x2cad09(_0x424c5a,_0x57b786,0x0,_0x57b786['childCount']),_0x424c5a['set'](_0x57b786['getAttribute']('vid_end'),{'userId':_0x42cede}));}}(this['_touched'],_0x2775d6,_0x1fed99,_0x1fed99+_0x1d4dca['howMany']);}['_handleMergeOperation'](_0x462811){const _0x18484d=null===(_0x462811=this['_cloneOperation'](_0x462811,this['_idsRoots']))['_authorId']?null:_0x462811['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x325c5a=_0x462811['targetPosition']['parent'],_0x5b5798=_0x462811['sourcePosition']['parent'],_0x1deb68=_0x325c5a['getAttribute']('vid_end'),_0xe97961=_0x5b5798['getAttribute']('vid_start');_0x325c5a['_setAttribute']('vid_end',_0x5b5798['getAttribute']('vid_end')),_0x5b5798['_setAttribute']('vid_end',_0x1deb68),this['_touched']['set'](_0xe97961,{'userId':_0x18484d}),this['_touched']['set'](_0x1deb68,{'userId':_0x18484d}),_0x462811['_execute']();}['_handleSplitOperation'](_0x420f3c){const _0x2a905e=null===(_0x420f3c=this['_cloneOperation'](_0x420f3c,this['_idsRoots']))['_authorId']?null:_0x420f3c['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2c11f1=_0x420f3c['graveyardPosition'],_0x2f405c=_0x420f3c['splitPosition']['parent'];_0x420f3c['_execute']();const _0x4f494a=_0x2f405c['getAttribute']('vid_end'),_0x8892d8=_0x420f3c['insertionPosition']['nodeAfter'];if(_0x2c11f1){const _0x469923=_0x8892d8['getAttribute']('vid_end'),_0x1c3735=_0x2f405c['getAttribute']('vid_end');_0x2f405c['_setAttribute']('vid_end',_0x469923),_0x8892d8['_setAttribute']('vid_end',_0x1c3735),this['_touched']['set'](_0x2f405c['getAttribute']('vid_end'),{'userId':_0x2a905e}),this['_touched']['set'](_0x8892d8['getAttribute']('vid_start'),{'userId':_0x2a905e});}else{const _0x23acc4=this['_revisionId']++,_0x32ad4d=this['_revisionId']++;_0x2f405c['_setAttribute']('vid_end',_0x23acc4),_0x8892d8['_setAttribute']('vid_start',_0x32ad4d),_0x8892d8['_setAttribute']('vid_end',_0x4f494a),this['_touched']['set'](_0x23acc4,{'userId':_0x2a905e}),this['_touched']['set'](_0x32ad4d,{'userId':_0x2a905e});}}['_handleMarkerOperation'](_0x4bdfc2){if(!_0x4bdfc2['affectsData'])return;const _0x5565d9=(_0x4bdfc2=this['_cloneOperation'](_0x4bdfc2,this['_diffRoots']))['oldRange']?_0x4bdfc2['oldRange']['root']:null,_0x3f5723=_0x4bdfc2['newRange']?_0x4bdfc2['newRange']['root']:null;_0x5565d9&&this['_markers']['delete'](_0x4bdfc2['name']),_0x3f5723&&this['_markers']['set'](_0x4bdfc2['name'],_0x4bdfc2['newRange']['clone']());const _0x9e4d09=null===_0x4bdfc2['_authorId']?null:_0x4bdfc2['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4be28e=_0x4bdfc2['name'];if(!this['_touchedMarkers']['has'](_0x4be28e))return void this['_touchedMarkers']['set'](_0x4be28e,{'range':_0x4bdfc2['oldRange'],'userId':_0x9e4d09});const _0x5d9a16=this['_touchedMarkers']['get'](_0x4be28e),_0x8b05c2=_0x5d9a16['range'],_0x510da9=_0x4bdfc2['newRange'];null==_0x8b05c2&&null==_0x510da9||_0x8b05c2&&_0x510da9&&_0x8b05c2['isEqual'](_0x510da9)?this['_touchedMarkers']['delete'](_0x4bdfc2['name']):_0x5d9a16['userId']=_0x9e4d09;}['_handleRootOperation'](_0x1e7c0e,_0x26ceb7){this['_diffRoots']['has'](_0x1e7c0e['rootName'])?this['_diffRoots']['get'](_0x1e7c0e['rootName'])['_isAttached']=_0x1e7c0e['isAdd']:(this['_diffRoots']['set'](_0x1e7c0e['rootName'],K(_0x1e7c0e['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x1e7c0e['rootName'],{}),_0x26ceb7&&this['_idsRoots']['set'](_0x1e7c0e['rootName'],K(_0x1e7c0e['rootName'],!0x0)));const _0x37a902=null===_0x1e7c0e['_authorId']?null:_0x1e7c0e['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5a9fa5=this['_touchedRoots']['get'](_0x1e7c0e['rootName']);_0x5a9fa5&&_0x5a9fa5['userId']===_0x37a902?this['_touchedRoots']['delete'](_0x1e7c0e['rootName']):this['_touchedRoots']['set'](_0x1e7c0e['rootName'],{'userId':_0x37a902,'isAttached':_0x1e7c0e['isAdd']});}['_handleRootAttributeOperation'](_0x5bbac1){const _0x191b36=this['_diffRootsAttributes']['get'](_0x5bbac1['root']['rootName']);null===_0x5bbac1['newValue']?delete _0x191b36[_0x5bbac1['key']]:_0x191b36[_0x5bbac1['key']]=_0x5bbac1['newValue'];}}function x(_0x352f3d){const _0x5b3d1c=K(_0x352f3d['rootName'],_0x352f3d['isAttached']());for(const _0x9e1e7a of _0x352f3d['getChildren']()){const _0x43dd6d=_0x9e1e7a['_clone'](!0x0);_0x5b3d1c['_appendChild'](_0x43dd6d);}return _0x5b3d1c;}function K(_0x48c494,_0x19190a=!0x0){const _0x3c78e2=new _0x33b2e5();return _0x3c78e2['rootName']=_0x48c494,_0x3c78e2['_isAttached']=_0x19190a,_0x3c78e2['isAttached']=()=>_0x3c78e2['_isAttached'],_0x3c78e2;}function N(_0x4a3863,_0x19c604,_0x197b39){const _0x47687e='elementEnd'==_0x4a3863['type']?_0x197b39['createPositionAt'](_0x4a3863['item'],'end'):_0x197b39['createPositionBefore'](_0x4a3863['item']);return _0x197b39['createPositionFromPath'](_0x19c604,_0x47687e['path'],_0x47687e['stickiness']);}function P(_0x42a644,_0x4c9e94,_0x4f0470){const _0x379a27='elementStart'==_0x42a644['type']?_0x4f0470['createPositionAt'](_0x42a644['item'],0x0):_0x4f0470['createPositionAfter'](_0x42a644['item']);return _0x4f0470['createPositionFromPath'](_0x4c9e94,_0x379a27['path'],_0x379a27['stickiness']);}class he extends/* #__PURE__ -- @preserve */
25
+ _0x5705d6(_0x395725){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x5916ae,_0xabbf6c){super(_0x5916ae),this['focusTracker']=new _0x11152e(),this['keystrokes']=new _0x48dd8b(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0xabbf6c),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),this['initializeCssTransitionDisablerMixin']();}['render'](){super['render'](),_0x2af211({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x19dd23=_0x30cb98=>_0x30cb98['stopPropagation']();this['keystrokes']['set']('arrowright',_0x19dd23),this['keystrokes']['set']('arrowleft',_0x19dd23),this['keystrokes']['set']('arrowup',_0x19dd23),this['keystrokes']['set']('arrowdown',_0x19dd23);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0xd742e){this['revisionNameInputView']['fieldView']['element']['value']=_0xd742e['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x2c924f){const _0x414cfc=new et(this['locale'],ti),_0x48828f=_0x414cfc['fieldView'];_0x48828f['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x158585=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0x2c924f&&(_0x158585+='\x20('+m(this['locale'],'optional')+')'),(_0x414cfc['label']=_0x158585,_0x48828f['on']('input',()=>{this['revisionNameInputValue']=_0x48828f['element']['value']['trim']();}),_0x414cfc);}}class l extends _0x87a842{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h];}['_saveRevisionFormView'];['init'](){const _0x2bdfb2=this['editor'],_0x30f2a5=_0x2bdfb2['plugins']['get']('RevisionTracker');_0x2bdfb2['ui']['componentFactory']['add']('revisionHistory',_0x279f34=>{const _0x54d7e9=_0x43a564(_0x279f34),_0x1385e5=_0x54d7e9['panelView']['children'],_0x3df0d3=new _0x42a250(_0x279f34),_0xd966bb=new _0x129054(_0x279f34),_0x4cfb56=this['_createSaveRevisionButton'](_0x409039),_0x4ff651=new _0x129054(_0x279f34),_0x42f095=this['_createOpenRevisionButton'](_0x409039);return _0x54d7e9['bind']('isEnabled')['to'](_0x30f2a5,'isReady',_0x30f2a5,'isEnabled',_0x2bdfb2,'isReadOnly',(_0x12ba60,_0x4cdd41,_0x2e1ba6)=>_0x12ba60&&_0x4cdd41&&!_0x2e1ba6),_0x54d7e9['buttonView']['set']({'icon':_0x4f868d,'label':m(_0x279f34,'Revision\x20history'),'tooltip':!0x0}),_0x4cfb56['set']({'withText':!0x0,'role':'menuitem'}),_0x42f095['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x42f095,'execute',()=>{_0x54d7e9['isOpen']=!0x1,_0x2bdfb2['editing']['view']['focus']();},{'priority':'low'}),_0xd966bb['children']['add'](_0x4cfb56),_0x4ff651['children']['add'](_0x42f095),_0x3df0d3['role']='menu',_0x3df0d3['items']['addMany']([_0xd966bb,_0x4ff651]),_0x1385e5['add'](_0x3df0d3),_0x54d7e9;}),_0x2bdfb2['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x2e11e1=this['editor'],_0x2aa5a6=_0x2e11e1['locale'],_0x37d831=_0x2e11e1['plugins']['get']('RevisionTracker'),_0x142652=new _0x47b961(_0x2aa5a6),_0x22f19c=new _0x287d0a(_0x2aa5a6);_0x142652['bind']('isEnabled')['to'](_0x37d831,'isReady',_0x37d831,'isEnabled',_0x2e11e1,'isReadOnly',(_0x4362b4,_0x450eb2,_0x3dc3e9)=>_0x4362b4&&_0x450eb2&&!_0x3dc3e9),_0x142652['buttonView']['set']({'icon':_0x4f868d,'label':m(_0x2aa5a6,'Revision\x20history')});const _0x2b1941=new _0x440c74(_0x2aa5a6,_0x142652),_0xf449fc=this['_createSaveRevisionButton'](_0x465bd8);_0xf449fc['delegate']('execute')['to'](_0x142652),_0x2b1941['children']['add'](_0xf449fc),_0x22f19c['items']['add'](_0x2b1941);const _0x224099=new _0x440c74(_0x2aa5a6,_0x142652),_0x48daf7=this['_createOpenRevisionButton'](_0x465bd8);return _0x48daf7['delegate']('execute')['to'](_0x142652),_0x224099['children']['add'](_0x48daf7),_0x22f19c['items']['add'](_0x224099),_0x142652['panelView']['children']['add'](_0x22f19c),_0x142652;}['_createSaveRevisionButton'](_0x1fe914){const _0xf42a06=this['editor'],_0x3f7623=_0xf42a06['plugins']['get']('RevisionTracker'),_0x3cbbbf=new _0x1fe914(_0xf42a06['locale']);return _0x3cbbbf['set']({'label':m(_0xf42a06['locale'],'Save\x20current\x20revision')}),_0x3cbbbf['bind']('isEnabled')['to'](_0x3f7623,'isReady',_0x3f7623,'isEnabled',_0xf42a06,'isReadOnly',(_0x5964fa,_0x2ea3c1,_0x21fd12)=>_0x5964fa&&_0x2ea3c1&&!_0x21fd12),this['listenTo'](_0x3cbbbf,'execute',()=>{this['_showDialog']();}),_0x3cbbbf;}['_createOpenRevisionButton'](_0x13984c){const _0xb1bc5d=this['editor'],_0x2d56a9=_0xb1bc5d['plugins']['get']('RevisionTracker'),_0x508e3c=new _0x13984c(_0xb1bc5d['locale']);return _0x508e3c['set']({'label':m(_0xb1bc5d['locale'],'Open\x20revision\x20history')}),_0x508e3c['bind']('isEnabled')['to'](_0x2d56a9,'isReady',_0xb1bc5d,'isReadOnly',(_0x4b3e1d,_0x303318)=>_0x4b3e1d&&!_0x303318),this['listenTo'](_0x508e3c,'execute',()=>{_0xb1bc5d['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x508e3c;}['_showDialog'](){const _0x53cef9=this['editor'],_0x39e8e2=_0x53cef9['locale'],_0x435f56=_0x53cef9['plugins']['get']('Dialog'),_0x1188cc=_0x53cef9['plugins']['get']('RevisionTracker');function _0x5144e3(_0x3ea821){_0x53cef9['config']['get']('revisionHistory.requireRevisionName')&&''===_0x3ea821['revisionName']?_0x3ea821['revisionNameInputView']['errorText']=m(_0x39e8e2,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x53cef9['plugins']['get'](h)['saveRevision']({'name':_0x3ea821['revisionName']}),_0x435f56['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x5144e3(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x435f56['show']({'id':'revisionSave','title':m(_0x39e8e2,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0x53cef9['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x435f56['hide']()},{'label':m(_0x53cef9['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x355290){_0x355290['bind']('isEnabled')['to'](_0x1188cc,'isReady',_0x1188cc,'isEnabled',_0x53cef9,'isReadOnly',(_0x3c821e,_0x340861,_0x41a94a)=>_0x3c821e&&_0x340861&&!_0x41a94a);},'onExecute':()=>_0x5144e3(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x329f2e=this['editor'],_0x3cc5c4=_0x329f2e['locale'];this['_saveRevisionFormView']=new he(_0x3cc5c4,_0x329f2e['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class q extends _0x395725{['changeId'];['_model'];constructor(_0x1b0b89,_0x562546){super(_0x1b0b89),this['_model']=_0x562546,this['changeId']=_0x562546['id'];const _0x5281fa=this['bindTemplate'],_0x138515=m(_0x1b0b89,_0x562546['data']['isSuggestion']?'Suggested\x20by':'add'==_0x562546['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x562546['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x5281fa['to']('type',_0x4caed8=>'ck-revision-change__'+_0x4caed8)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x138515}]},{'text':'\x20'+_0x562546['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class z extends/* #__PURE__ -- @preserve */
26
+ _0x243d52(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x148641){super(),this['id']=_0x148641['id']||_0x3d9671(),this['author']=_0x148641['author'],this['type']=_0x148641['type'],this['data']=_0x148641['data']||{},this['rootName']=_0x148641['rootName'],this['set']('createdAt',_0x148641['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class G{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x2c6566,_0x2f7f02){this['newRevisionId']=_0x2c6566,this['oldRevisionId']=_0x2f7f02,this['changes']=new _0xa9c085();}['_setChanges'](_0x44f923){for(const _0x192176 of _0x44f923)this['changes']['add'](_0x192176);}}class u extends _0x87a842{['repository'];['adapter']=null;['_utils'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x1342b0,_0x6f82f5,S,$];}constructor(_0x58310f){super(_0x58310f),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0x3cd321,_0x40dfd7,_0x5c1a05)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x3b2884=>{for(const _0x2408a2 of this['editor']['editing']['view']['document']['roots'])_0x5c1a05?_0x3b2884['removeClass']('ck-editor__editable__overlay',_0x2408a2):_0x3b2884['addClass']('ck-editor__editable__overlay',_0x2408a2);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x39c025=>null!==_0x39c025),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x50adfd,_0x34507b,_0x482b6d)=>_0x50adfd&&_0x482b6d?_0x34507b['changes']['getIndex'](_0x482b6d):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x2ef074,_0x86236e)=>_0x2ef074?_0x86236e['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x6f82f5);}['init'](){const _0x5f7155=this['editor'],_0x2a261c=new ShowChangeCommand(_0x5f7155,{'direction':'backward'}),_0xeb08ac=new ShowChangeCommand(_0x5f7155,{'direction':'forward'});(_0x5f7155['commands']['add']('showPreviousChange',_0x2a261c),_0x5f7155['commands']['add']('showNextChange',_0xeb08ac),_0x5f7155['commands']['add']('restoreRevision',new RestoreRevisionCommand(_0x5f7155)),this['on']('change:numberOfChanges',()=>{_0x2a261c['refresh'](),_0xeb08ac['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x5f7155['enableReadOnlyMode']('revision-viewer'),_0x5f7155['plugins']['has']('WidgetToolbarRepository'))&&_0x5f7155['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x51c665){return await this['_utils']['loadRevisionData'](_0x51c665,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x51c665);}async['getRevisionRootsAttributes'](_0x142370){return await this['_utils']['loadRevisionData'](_0x142370,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x142370);}async['compare'](_0x4d7917,_0x87f74,_0x4dde9a=!0x1){if(!this['isEnabled'])return;const _0x398b1e=this['diff'],_0x226a4e=this['repository'],_0x5ae9ae='string'==typeof _0x4d7917?_0x226a4e['getRevision'](_0x4d7917):_0x4d7917,_0x2b9c69='string'==typeof _0x87f74?_0x226a4e['getRevision'](_0x87f74):_0x87f74,_0x583445=_0x5ae9ae['id'],_0x44c460=_0x2b9c69?_0x2b9c69['id']:null;if(!_0x4dde9a&&this['diff']&&this['diff']['newRevisionId']===_0x583445&&this['diff']['oldRevisionId']===_0x44c460)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new G(_0x583445,_0x44c460);const _0x120265=this['_getRevisionsRange'](_0x5ae9ae,_0x2b9c69,!0x0)['map'](_0x17b0b4=>this['_utils']['loadRevisionData'](_0x17b0b4,this['adapter']));return _0x120265['push'](new Promise(_0x10e67d=>{setTimeout(_0x10e67d,0x14);})),Promise['all'](_0x120265)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x3efc91=this['_getDiff'](_0x583445,_0x44c460);for(const _0x2b2c5c of _0x3efc91['changes'])this['_changeIdToChange']['set'](_0x2b2c5c['id'],_0x2b2c5c);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x36c53c=>{for(const _0x44d773 of this['editor']['model']['document']['getRootNames']())_0x36c53c['detachRoot'](_0x44d773);for(const _0x4d3335 of Object['keys'](_0x3efc91['model'])){const _0x43ca17=_0x36c53c['addRoot'](_0x4d3335);for(const _0x55b1d0 of Object['keys'](_0x3efc91['attributes'][_0x4d3335]))_0x36c53c['setAttribute'](_0x55b1d0,_0x3efc91['attributes'][_0x4d3335][_0x55b1d0],_0x43ca17);_0x36c53c['insert'](_0x3efc91['model'][_0x4d3335],_0x43ca17,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x3efc91['changes'])),this['isReady']=!0x0;})['catch'](_0x9dcff7=>{console['error'](_0x9dcff7),this['_cleanUp'](),_0x398b1e&&(this['diff']=_0x398b1e),this['isReady']=!0x0;});}['addRevisionData'](_0x24e167,_0x1a3478){const _0x4881b9=this['repository']['createRevision'](_0x24e167);return _0x4881b9['on']('_update',(_0x342776,_0xea8f2,_0x273c6f)=>_0x1a3478(_0xea8f2,_0x273c6f,_0x4881b9)),this['repository']['addRevision'](_0x4881b9),_0x4881b9;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x444ef4=>{for(const _0x576bf2 of this['editor']['model']['document']['getRootNames']())_0x444ef4['detachRoot'](_0x576bf2);});}['_sortAndFilterDiffChanges'](_0x31b050){const _0x730064=[],_0x6e6a75=new Map();for(const _0x3566e9 of this['editor']['model']['document']['getRootNames']()){const _0x3b1d4b=this['editor']['editing']['view']['getDomRoot'](_0x3566e9);if(!_0x3b1d4b)continue;const _0x498fe0=_0x3b1d4b['getClientRects']()['item'](0x0);_0x498fe0&&(_0x730064['push'](_0x3566e9),_0x6e6a75['set'](_0x3566e9,_0x498fe0));}return _0x730064['sort']((_0x2e2250,_0x69d7bd)=>{const _0x49e22c=_0x6e6a75['get'](_0x2e2250),_0x29c512=_0x6e6a75['get'](_0x69d7bd);return _0x49e22c['y']-_0x29c512['y']||_0x49e22c['x']-_0x29c512['x'];}),(_0x31b050=_0x31b050['filter'](_0x20c6d7=>_0x730064['includes'](_0x20c6d7['rootName'])))['sort']((_0x5a6a47,_0x383e8f)=>_0x730064['indexOf'](_0x5a6a47['rootName'])-_0x730064['indexOf'](_0x383e8f['rootName'])),_0x31b050;}['_makeTape'](_0x260b4b){const _0x2a4cd5=Array['from'](_0x260b4b['markers'])['filter'](([_0x513b61,_0x2f70ba])=>_0x513b61['startsWith']('revision:')&&!_0x2f70ba['isCollapsed']),_0x521565=Array['from'](this['editor']['model']['createRangeIn'](_0x260b4b)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x2a4cd5['length'])for(const _0x45047a of _0x521565){const [_0x58c57e,_0x4f018d]=_0x2a4cd5[0x0],[,_0x3861c1,_0xd79745]=_0x58c57e['split'](':');if(_0x4f018d['end']['isEqual'](_0x45047a['nextPosition'])&&_0x2a4cd5['shift'](),(_0x45047a['previousPosition']['isEqual'](_0x4f018d['start'])||_0x45047a['previousPosition']['isAfter'](_0x4f018d['start']))&&('insertion'==_0x3861c1?_0x45047a['isAdded']={'userId':_0xd79745}:'deletion'==_0x3861c1&&(_0x45047a['isRemoved']={'userId':_0xd79745})),0x0==_0x2a4cd5['length'])break;}return _0x521565;}['_refreshStartEndIndex'](_0x245952){const _0x506954=new Map();for(let _0x4fa672=0x0;_0x4fa672<_0x245952['length'];_0x4fa672++)'text'===_0x245952[_0x4fa672]['type']?(_0x245952[_0x4fa672]['item']['startIndex']=_0x4fa672,_0x245952[_0x4fa672]['item']['endIndex']=_0x4fa672):('elementStart'===_0x245952[_0x4fa672]['type']?_0x245952[_0x4fa672]['item']['startIndex']=_0x4fa672:'elementEnd'===_0x245952[_0x4fa672]['type']&&(_0x245952[_0x4fa672]['item']['endIndex']=_0x4fa672),_0x506954['set'](_0x245952[_0x4fa672]['id'],_0x4fa672));for(const _0x440b28 of _0x506954['values']())'elementStart'===_0x245952[_0x440b28]['type']?_0x245952[_0x440b28]['item']['endIndex']=_0x506954['get'](_0x245952[_0x440b28]['pairId']):'elementEnd'===_0x245952[_0x440b28]['type']&&(_0x245952[_0x440b28]['item']['startIndex']=_0x506954['get'](_0x245952[_0x440b28]['pairId']));}['_processTape'](_0x3ef3d6){for(let _0x8eeb51=0x0;_0x8eeb51<_0x3ef3d6['length'];_0x8eeb51++){if('elementStart'===_0x3ef3d6[_0x8eeb51]['type'])_0x3ef3d6[_0x8eeb51]['item']['startIndex']=_0x8eeb51;else{if('elementEnd'===_0x3ef3d6[_0x8eeb51]['type']){_0x3ef3d6[_0x8eeb51]['item']['endIndex']=_0x8eeb51;const _0x541f78=_0x3ef3d6[_0x8eeb51]['item']['startIndex'];_0x3ef3d6[_0x541f78]['pairId']=_0x3ef3d6[_0x8eeb51]['id'],_0x3ef3d6[_0x8eeb51]['pairId']=_0x3ef3d6[_0x541f78]['id'];}else _0x3ef3d6[_0x8eeb51]['item']['startIndex']=_0x8eeb51,_0x3ef3d6[_0x8eeb51]['item']['endIndex']=_0x8eeb51,_0x3ef3d6[_0x8eeb51]['pairId']=null;}_0x3ef3d6[_0x8eeb51]['markersStart']||(_0x3ef3d6[_0x8eeb51]['markersStart']=[],_0x3ef3d6[_0x8eeb51]['markersEnd']=[]);}}['_markInsertions'](_0x1c2be2,_0x281967){const _0x3eb53a=_0x1c2be2['filter'](_0x5220ae=>!_0x5220ae['isAdded']);for(let _0x232774=0x0;_0x232774<_0x281967['length'];_0x232774++)_0x281967[_0x232774]['isAdded']&&(_0x3eb53a[_0x232774]['isAdded']=_0x281967[_0x232774]['isAdded']);}['_getDiff'](_0x1a0cc4,_0x56b526=null){const _0x391120=this['repository']['getRevision'](_0x1a0cc4),_0xe95f29=_0x56b526?this['repository']['getRevision'](_0x56b526):null,_0x7b1493=this['_getRevisionsRange'](_0x391120,_0xe95f29),_0x43f9fe=_0x7b1493[_0x7b1493['length']-0x1],_0x2a18cb=new Map(),_0x5b09cb={'model':{},'attributes':{},'changes':[]},_0x48bed8=new Set(),_0x3ebfe8=new Map();for(let _0x3702e9=_0x7b1493['length']-0x1;_0x3702e9>=0x0;_0x3702e9--){const _0x59c74c=_0x7b1493[_0x3702e9];for(const _0x55702c of Object['keys'](_0x59c74c['diffData']))if(_0x59c74c['diffData'][_0x55702c]['attachChange']){const _0x12de68=_0x59c74c['diffData'][_0x55702c]['attachChange'];_0x12de68['isAttached']?(_0x48bed8['add'](_0x55702c),_0x3ebfe8['has'](_0x55702c)&&_0x3ebfe8['get'](_0x55702c)['userId']==_0x12de68['userId']?_0x3ebfe8['delete'](_0x55702c):_0x3ebfe8['set'](_0x55702c,_0x12de68)):_0x3ebfe8['has'](_0x55702c)?(_0x48bed8['delete'](_0x55702c),_0x3ebfe8['delete'](_0x55702c)):(_0x48bed8['add'](_0x55702c),_0x3ebfe8['set'](_0x55702c,_0x12de68));}else _0x48bed8['add'](_0x55702c);}for(const _0x3f9922 of _0x48bed8){const _0x473ea9=_0x3ebfe8['has'](_0x3f9922)&&!_0x3ebfe8['get'](_0x3f9922)['isAttached'];let _0x3cd88a=_0x473ea9?_0x7b1493['length']-0x1:0x0;const _0xa60b1a=_0x473ea9?-0x1:0x1;for(;_0x7b1493[_0x3cd88a];){const _0xa1ec1b=_0x7b1493[_0x3cd88a];if(_0xa1ec1b['diffData'][_0x3f9922]){const _0x4a1b8d=_0x473ea9?_0xa1ec1b['diffData'][_0x3f9922]['attributesBefore']:_0xa1ec1b['diffData'][_0x3f9922]['attributesAfter'];_0x5b09cb['attributes'][_0x3f9922]=_0x4a1b8d?_0xb23e18(_0x4a1b8d):{};break;}_0x3cd88a+=_0xa60b1a;}}for(const _0x5cefe1 of _0x7b1493){_0x5cefe1['model']={};for(const _0x3e10fd of _0x5cefe1['authors'])_0x2a18cb['set'](_0x3e10fd['id'],_0x3e10fd);for(const _0x1eb650 of _0x48bed8){const _0x12c906=_0x5cefe1['diffData'][_0x1eb650]?_0x5cefe1['diffData'][_0x1eb650]['insertions']:'[]',_0x18e7c6=_0x5cefe1['diffData'][_0x1eb650]?_0x5cefe1['diffData'][_0x1eb650]['deletions']:'[]';_0x5cefe1['model'][_0x1eb650]={'insertions':this['_utils']['_makeModelFromViewString'](_0x12c906),'deletions':this['_utils']['_makeModelFromViewString'](_0x18e7c6)};}}for(const _0x5b07a4 of _0x48bed8){let _0x1ee160=null,_0x2d96e9=0x0;const _0x1e7fbf=new Map(Array['from'](_0x391120['model'][_0x5b07a4]['insertions']['markers'])['filter'](([_0xd10c68])=>!_0xd10c68['startsWith']('revision:')));let _0x2bb5ce=0x0;for(const _0x91b38f of _0x7b1493){const _0x166054=this['_makeTape'](_0x91b38f['model'][_0x5b07a4]['insertions']);_0x91b38f==_0x391120?(_0x1ee160=_0x166054,_0x2d96e9=_0x1ee160['length'],_0x1ee160['forEach'](_0x16e297=>{_0x16e297['id']=_0x2bb5ce++;}),this['_processTape'](_0x1ee160)):this['_markInsertions'](_0x1ee160,_0x166054);const _0x36718e=_0x1ee160['filter'](_0x3933e6=>!_0x3933e6['isAdded'])['map'](_0x547058=>_0x547058['id']);let _0x370743=0x0;const _0x5a70b7=this['_makeTape'](_0x91b38f['model'][_0x5b07a4]['deletions']);_0x5a70b7['forEach'](_0x35b0da=>{_0x35b0da['isRemoved']?_0x35b0da['id']=_0x2d96e9++:_0x35b0da['id']=_0x36718e[_0x370743++];}),this['_processTape'](_0x5a70b7),this['_setDistance'](_0x1ee160,'isAdded'),this['_setDistance'](_0x5a70b7,'isRemoved'),_0x91b38f==_0x391120&&this['_markMarkers'](_0x1ee160,_0x1e7fbf),_0x1ee160=this['_joinTapes'](_0x1ee160,_0x5a70b7),this['_refreshStartEndIndex'](_0x1ee160),this['_setDistance'](_0x1ee160,'isRemoved');}_0x1ee160=_0x1ee160['filter'](_0x20fafe=>!(_0x20fafe['isAdded']&&_0x20fafe['isRemoved']));const _0xc18890=new Map(_0x43f9fe['model'][_0x5b07a4]['deletions']['markers']),_0x483043=new Set(_0x1e7fbf['keys']());for(const _0x326d6e of _0xc18890['keys']())_0x483043['delete'](_0x326d6e);this['_markSuggestions'](_0x1ee160,_0x483043),this['_fixObsoleteTags'](_0x1ee160),_0x1ee160=this['_removeMissingPairs'](_0x1ee160),_0x1ee160=this['_markMismatchedRemovedTags'](_0x1ee160),_0x1ee160=this['_removeUnsupportedChanges'](_0x1ee160);const {root:_0x21699c,changes:_0x351913}=this['_makeModelFromTape'](_0x1ee160,_0x2a18cb,_0x5b07a4);_0x5b09cb['model'][_0x5b07a4]=_0x21699c;const _0x5d26b6=_0x3ebfe8['get'](_0x5b07a4);if(_0x5d26b6){const _0x208d1b=_0x2a18cb['get'](_0x5d26b6['userId']),_0x3ac08e=new z({'author':_0x208d1b,'type':_0x5d26b6['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x5b07a4});_0x351913['unshift'](_0x3ac08e),_0x5b09cb['attributes'][_0x5b07a4]['revisionHistoryAttachChange']=_0x3ac08e['id'];}_0x5b09cb['changes']=_0x5b09cb['changes']['concat'](_0x351913);}return _0x5b09cb;}['_markMarkers'](_0x22580b,_0x3eca83){for(let _0x186d6d=0x0;_0x186d6d<_0x22580b['length'];_0x186d6d++)for(const [_0xe8f1a6,_0x4294e2]of _0x3eca83)!_0x4294e2['isCollapsed']&&_0x4294e2['start']['isEqual'](_0x22580b[_0x186d6d]['previousPosition'])&&_0x22580b[_0x186d6d]['markersStart']['push'](_0xe8f1a6),_0x4294e2['end']['isEqual'](_0x22580b[_0x186d6d]['nextPosition'])&&_0x22580b[_0x186d6d]['markersEnd']['push'](_0xe8f1a6);}['_joinTapes'](_0x4b99de,_0x14cff5){let _0x12ffa0=[],_0xdc3008=0x0,_0x5df1c5=0x0;for(;_0xdc3008<_0x4b99de['length']||_0x5df1c5<_0x14cff5['length'];){const _0x8096ea=_0x4b99de[_0xdc3008]||{},_0xe4c9f4=_0x14cff5[_0x5df1c5]||{};if(_0x8096ea['id']==_0xe4c9f4['id'])_0xdc3008++,_0x5df1c5++,_0x12ffa0['push'](_0x8096ea);else{if(_0xe4c9f4['isRemoved']&&_0x8096ea['isAdded']){const {commonTape:_0x527eed,iEnd:_0x5ee9bc,jEnd:_0x579c94}=this['_threeWayMerge'](_0x4b99de,_0xdc3008,_0x14cff5,_0x5df1c5);_0x12ffa0=_0x12ffa0['concat'](_0x527eed),_0xdc3008=_0x5ee9bc,_0x5df1c5=_0x579c94;}else _0xe4c9f4['isRemoved']?(_0x5df1c5++,_0x12ffa0['push'](_0xe4c9f4)):(_0xdc3008++,_0x12ffa0['push'](_0x8096ea));}}return _0x12ffa0;}['_markSuggestions'](_0x4a2cfd,_0x6a2e7e){const _0x5c4c62=[];for(let _0x18eef5=0x0;_0x18eef5<_0x4a2cfd['length'];_0x18eef5++){for(let _0x28319b=0x0;_0x28319b<_0x4a2cfd[_0x18eef5]['markersStart']['length'];_0x28319b++){const _0xb8b9ee=_0x4a2cfd[_0x18eef5]['markersStart'][_0x28319b];if(!_0x6a2e7e['has'](_0xb8b9ee))continue;const {group:_0x288bc9,type:_0x3583ae,authorId:_0x2560c9}=_0x54ada6(_0xb8b9ee);'revision-suggestion'!=_0x288bc9||'insertion'!=_0x3583ae&&'deletion'!=_0x3583ae||(_0x5c4c62['unshift']({'type':_0x3583ae,'name':_0xb8b9ee,'userId':_0x2560c9}),_0x4a2cfd[_0x18eef5]['markersStart']['splice'](_0x28319b,0x1),_0x28319b--);}_0x200c4e(_0x4a2cfd[_0x18eef5]);for(let _0x41f590=0x0;_0x41f590<_0x4a2cfd[_0x18eef5]['markersEnd']['length'];_0x41f590++){const _0x598126=_0x4a2cfd[_0x18eef5]['markersEnd'][_0x41f590];if(!_0x6a2e7e['has'](_0x598126))continue;const {group:_0xfab75b,type:_0x54396e}=_0x54ada6(_0x598126);if('revision-suggestion'!=_0xfab75b||'insertion'!=_0x54396e&&'deletion'!=_0x54396e)continue;_0x4a2cfd[_0x18eef5]['markersEnd']['splice'](_0x41f590,0x1),_0x41f590--;const _0x4e5be5=_0x5c4c62['findIndex'](_0x23ea38=>_0x23ea38['name']==_0x598126);_0x4e5be5>-0x1&&_0x5c4c62['splice'](_0x4e5be5,0x1);}}function _0x54ada6(_0x473f82){const _0x33e9cf=_0x473f82['split'](':');return{'group':_0x33e9cf[0x0],'type':_0x33e9cf[0x1],'subType':_0x33e9cf['length']>=0x5?_0x33e9cf[0x2]:null,'id':_0x33e9cf['length']<0x5?_0x33e9cf[0x2]:_0x33e9cf[0x3],'authorId':_0x33e9cf['length']<0x5?_0x33e9cf[0x3]:_0x33e9cf[0x4],'markerCount':0x6==_0x33e9cf['length']?_0x33e9cf[0x5]:null};}function _0x200c4e(_0x2d054f){for(let _0x3b68e0=0x0;_0x3b68e0<_0x5c4c62['length'];_0x3b68e0++){if(_0x2d054f['isAdded']&&'insertion'==_0x5c4c62[_0x3b68e0]['type']&&_0x2d054f['isAdded']['userId']==_0x5c4c62[_0x3b68e0]['userId'])return _0x2d054f['isAddSuggestion']=_0x5c4c62[_0x3b68e0],void delete _0x2d054f['isAdded'];if(!_0x2d054f['isAdded']&&!_0x2d054f['isRemoved']&&'deletion'==_0x5c4c62[_0x3b68e0]['type'])return void(_0x2d054f['isRemoveSuggestion']=_0x5c4c62[_0x3b68e0]);}}}['_setDistance'](_0x43a9d9,_0x420608){let _0xa96162=0x0,_0x4992d7=!0x1;const _0x39b861=new Map();for(const _0x51895f of _0x43a9d9)_0x51895f[_0x420608]?_0x4992d7&&(_0xa96162++,_0x4992d7=!0x1):(_0xa96162++,_0x4992d7=!0x0),_0x39b861['set'](_0x51895f['id'],_0xa96162);for(let _0x500749=0x0;_0x500749<_0x43a9d9['length'];_0x500749++){if('isRemoved'==_0x420608&&_0x43a9d9[_0x500749]['isAdded']||'isAdded'==_0x420608&&_0x43a9d9[_0x500749]['isRemoved'])continue;if('text'==_0x43a9d9[_0x500749]['type']){_0x43a9d9[_0x500749]['distance']=0x0;continue;}const _0x163dda=_0x39b861['get'](_0x43a9d9[_0x500749]['pairId']),_0x34c89f=_0x39b861['get'](_0x43a9d9[_0x500749]['id']);_0x43a9d9[_0x500749]['distance']=_0x163dda-_0x34c89f;}}['_getRevisionsRange'](_0x331b07,_0x3a89b8,_0x9c2e37=!0x1){const _0x54e8b6=[];let _0x4de6d6=this['repository']['getIndex'](_0x331b07),_0x49f0be=this['repository']['getIndex'](_0x3a89b8);for(-0x1==_0x49f0be&&(_0x49f0be=this['repository']['_revisions']['length'],_0x9c2e37=!0x1);_0x4de6d6<_0x49f0be;)_0x54e8b6['push'](this['repository']['getRevision'](_0x4de6d6)),_0x4de6d6++;return _0x9c2e37&&_0x54e8b6['push'](this['repository']['getRevision'](_0x4de6d6)),_0x54e8b6;}['_threeWayMerge'](_0x5c1282,_0x4dafb7,_0xde0d04,_0x1adc6e){const _0x1d2ba4=this['editor']['model']['schema'];let _0x2c987d=_0x4dafb7;for(;_0x5c1282[_0x2c987d]&&_0x5c1282[_0x2c987d]['isAdded'];)_0x2c987d++;let _0x28129b=_0x1adc6e;for(;_0xde0d04[_0x28129b]&&_0xde0d04[_0x28129b]['isRemoved'];)_0x28129b++;_0x386bb7(_0x5c1282,_0x4dafb7,_0x2c987d),_0x386bb7(_0xde0d04,_0x1adc6e,_0x28129b);const _0x486239=_0xde0d04['slice'](_0x1adc6e,_0x28129b)['concat'](_0x5c1282['slice'](_0x4dafb7,_0x2c987d));return _0x486239['sort']((_0x10d6c8,_0x569383)=>_0x10d6c8['side']!=_0x569383['side']?_0x10d6c8['side']-_0x569383['side']:_0x10d6c8['level']!=_0x569383['level']?_0x10d6c8['level']-_0x569383['level']:_0x10d6c8['distance']!=_0x569383['distance']?_0x569383['distance']-_0x10d6c8['distance']:!!_0x10d6c8['isAdded']!=!!_0x569383['isAdded']?-0x1==_0x10d6c8['side']||0x0==_0x10d6c8['side']?_0x10d6c8['isAdded']?-0x1:0x1:_0x10d6c8['isAdded']?0x1:-0x1:_0x10d6c8['index']-_0x569383['index']),{'commonTape':_0x486239,'iEnd':_0x2c987d,'jEnd':_0x28129b};function _0x386bb7(_0x43ce35,_0xca15f,_0x301bff){let _0x2b677a=-0x1,_0x1ff2c6=Number['POSITIVE_INFINITY'],_0x4a5330=!0x0;for(let _0x504d2d=_0xca15f;_0x504d2d<_0x301bff;_0x504d2d++)if(_0x1d2ba4['isInline'](_0x43ce35[_0x504d2d]['item'])||(_0x4a5330=!0x1),_0x43ce35[_0x504d2d]['item']['startIndex']<_0xca15f&&(_0x2b677a=_0x504d2d),_0x43ce35[_0x504d2d]['item']['endIndex']>=_0x301bff){_0x1ff2c6=_0x504d2d;break;}_0x4a5330&&(_0x2b677a=_0x301bff-0x1);for(let _0x1b78cd=_0xca15f;_0x1b78cd<_0x301bff;_0x1b78cd++)_0x43ce35[_0x1b78cd]['side']=_0x1b78cd<=_0x2b677a?-0x1:_0x1b78cd<_0x1ff2c6?0x0:0x1,_0x43ce35[_0x1b78cd]['index']=_0x1b78cd;let _0x429f81=0x0;for(let _0x4ad472=_0xca15f;_0x4ad472<=_0x2b677a;_0x4ad472++)0x0==_0x43ce35[_0x4ad472]['distance']?_0x43ce35[_0x4ad472]['level']=_0x429f81:(_0x429f81++,_0x43ce35[_0x4ad472]['level']=_0x429f81,_0x429f81++);for(let _0x185c33=_0xca15f;_0x185c33<_0x301bff;_0x185c33++)0x0==_0x43ce35[_0x185c33]['side']&&(_0x43ce35[_0x185c33]['level']=_0x429f81);_0x429f81=0x0;for(let _0x2abef5=_0x301bff-0x1;_0x2abef5>=_0x1ff2c6;_0x2abef5--)0x0==_0x43ce35[_0x2abef5]['distance']?_0x43ce35[_0x2abef5]['level']=_0x429f81:(_0x429f81--,_0x43ce35[_0x2abef5]['level']=_0x429f81,_0x429f81--);}}['_fixObsoleteTags'](_0x4909e4){const _0x264590=new Map(),_0x6b5480=this['editor']['model']['schema'];for(let _0x408d8=0x1;_0x408d8<_0x4909e4['length'];_0x408d8++){let _0x5685ff,_0x30dafc,_0xb03c34;const _0x4b48dd=_0x4909e4[_0x408d8],_0x37c597=_0x4909e4[_0x408d8-0x1];if('text'==_0x4b48dd['type'])continue;if(_0x4b48dd['type']!=_0x37c597['type'])continue;if(!_0x6b5480['isBlock'](_0x37c597['item'])||_0x6b5480['isLimit'](_0x37c597['item']))continue;if(!_0x6b5480['isBlock'](_0x4b48dd['item'])||_0x6b5480['isLimit'](_0x4b48dd['item']))continue;if((_0x4909e4[_0x408d8]['isAdded']||_0x4909e4[_0x408d8]['isAddSuggestion'])&&_0x4909e4[_0x408d8-0x1]['isRemoved'])_0x5685ff=_0x4909e4[_0x408d8],_0x30dafc=_0x4909e4[_0x408d8-0x1],_0xb03c34=_0x408d8-0x1;else{if(!_0x4909e4[_0x408d8]['isRemoved']||!_0x4909e4[_0x408d8-0x1]['isAdded']&&!_0x4909e4[_0x408d8-0x1]['isAddSuggestion'])continue;_0x5685ff=_0x4909e4[_0x408d8-0x1],_0x30dafc=_0x4909e4[_0x408d8],_0xb03c34=_0x408d8;}const _0x3903d2=_0x5685ff['level']==_0x30dafc['level'],_0xf2ddf5=Math['abs'](_0x5685ff['level'])<Math['abs'](_0x30dafc['level'])&&0x0==_0x30dafc['distance'];(_0x3903d2||_0xf2ddf5)&&(_0x264590['set'](_0x30dafc['id'],_0x5685ff['id']),_0x4909e4['splice'](_0xb03c34,0x1),_0x408d8--,_0x5685ff['isAdded']=!0x1);}for(let _0x564f01=0x0;_0x564f01<_0x4909e4['length'];_0x564f01++)_0x264590['has'](_0x4909e4[_0x564f01]['pairId'])&&(_0x4909e4[_0x564f01]['pairId']=_0x264590['get'](_0x4909e4[_0x564f01]['pairId']));}['_removeMissingPairs'](_0x1dc415){const _0xb9977c=new Set(_0x1dc415['map'](_0x19c749=>_0x19c749['id']));for(let _0x44ad43=0x0;_0x44ad43<_0x1dc415['length'];_0x44ad43++)_0xb9977c['has'](_0x1dc415[_0x44ad43]['pairId'])||0x0==_0x1dc415[_0x44ad43]['distance']||(_0x1dc415[_0x44ad43]['isIncorrect']=!0x0);return _0x1dc415['filter'](_0x233215=>!_0x233215['isIncorrect']);}['_markMismatchedRemovedTags'](_0x110634){const _0x385b24=new Set();for(let _0x53aa79=0x0;_0x53aa79<_0x110634['length'];_0x53aa79++){if(_0x385b24['has'](_0x110634[_0x53aa79]['id'])&&_0x110634[_0x53aa79]['isRemoved']&&(_0x110634[_0x53aa79]['isIncorrect']=!0x0),_0x110634[_0x53aa79]['isIncorrect'])continue;if(0x0==_0x110634[_0x53aa79]['distance'])continue;if('elementStart'!=_0x110634[_0x53aa79]['type'])continue;if(null==_0x110634[_0x53aa79]['pairId'])continue;let _0x3785bf=_0x53aa79+0x1,_0x726f=0x0;for(;_0x110634[_0x3785bf]['id']!=_0x110634[_0x53aa79]['pairId'];)'elementStart'==_0x110634[_0x3785bf]['type']?_0x726f++:'elementEnd'==_0x110634[_0x3785bf]['type']&&_0x726f--,_0x3785bf++;if(0x0!=_0x726f){if(_0x110634[_0x53aa79]['isRemoved'])_0x110634[_0x53aa79]['isIncorrect']=!0x0;else{for(;_0x3785bf!=_0x53aa79;)_0x110634[_0x3785bf]['isRemoved']&&0x0!=_0x110634[_0x3785bf]['distance']&&(_0x110634[_0x3785bf]['isIncorrect']=!0x0,_0x385b24['add'](_0x110634[_0x3785bf]['pairId'])),_0x3785bf--;}}}return _0x110634['filter'](_0x2cb8b6=>!_0x2cb8b6['isIncorrect']);}['_removeUnsupportedChanges'](_0x159eea){const _0x59dde7=this['editor']['model']['schema'];for(let _0x2f76bb=0x0;_0x2f76bb<_0x159eea['length'];_0x2f76bb++){if(!(_0x159eea[_0x2f76bb]['isAdded']||_0x159eea[_0x2f76bb]['isAddSuggestion']||_0x159eea[_0x2f76bb]['isRemoved']||_0x159eea[_0x2f76bb]['isRemoveSuggestion']))continue;if(0x0==_0x159eea[_0x2f76bb]['distance'])continue;const _0x52377d=_0x159eea[_0x2f76bb]['item'];_0x59dde7['isBlock'](_0x52377d)||_0x59dde7['isLimit'](_0x52377d)||(_0x159eea[_0x2f76bb]['isAdded']&&delete _0x159eea[_0x2f76bb]['isAdded'],_0x159eea[_0x2f76bb]['isAddSuggestion']&&delete _0x159eea[_0x2f76bb]['isAddSuggestion'],_0x159eea[_0x2f76bb]['isRemoveSuggestion']&&delete _0x159eea[_0x2f76bb]['isRemoveSuggestion'],_0x159eea[_0x2f76bb]['isRemoved']&&(_0x159eea[_0x2f76bb]['isIncorrect']=!0x0));}return _0x159eea['filter'](_0x4fb48c=>!_0x4fb48c['isIncorrect']);}['_makeModelFromTape'](_0x27fc08,_0x38906b,_0x24ecfe){const _0x3f2dd9=new _0x33b2e5(),_0xd040a6=[],_0x558699=new Map(),_0x4009d8=this['editor']['model'],_0xd4dca8=_0x4009d8['schema'],_0xc118ce=[_0x3f2dd9],_0x321714={},_0x1c51b5={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x5323c1=null;const _0x40fdcc=[0x0];for(let _0x40f1cc=0x0;_0x40f1cc<_0x27fc08['length'];_0x40f1cc++)if('elementStart'===_0x27fc08[_0x40f1cc]['type']){_0x27fc08[_0x40f1cc]['previousPosition']=_0x4009d8['createPositionFromPath'](_0x3f2dd9,_0x40fdcc);const _0x529926=new _0x4e1429(_0x27fc08[_0x40f1cc]['item']['name'],_0x27fc08[_0x40f1cc]['item']['getAttributes']());_0xc118ce[0x0]['_appendChild'](_0x529926),_0x40fdcc['push'](0x0),_0xc118ce['unshift'](_0x529926),_0x27fc08[_0x40f1cc]['nextPosition']=_0x4009d8['createPositionFromPath'](_0x3f2dd9,_0x40fdcc);}else'elementEnd'===_0x27fc08[_0x40f1cc]['type']?(_0xc118ce['shift'](),_0x27fc08[_0x40f1cc]['previousPosition']=_0x4009d8['createPositionFromPath'](_0x3f2dd9,_0x40fdcc),_0x40fdcc['pop'](),_0x40fdcc[_0x40fdcc['length']-0x1]++,_0x27fc08[_0x40f1cc]['nextPosition']=_0x4009d8['createPositionFromPath'](_0x3f2dd9,_0x40fdcc)):(_0x27fc08[_0x40f1cc]['previousPosition']=_0x4009d8['createPositionFromPath'](_0x3f2dd9,_0x40fdcc),_0x5323c1?_0x5323c1['_data']+=_0x27fc08[_0x40f1cc]['item']['data']:_0x5323c1=new _0x1acbe0(_0x27fc08[_0x40f1cc]['item']['data'],_0x27fc08[_0x40f1cc]['item']['getAttributes']()),_0x27fc08[_0x40f1cc+0x1]&&'text'===_0x27fc08[_0x40f1cc+0x1]['type']&&_0x2cc7de(_0x5323c1,_0x27fc08[_0x40f1cc+0x1]['item'])||(_0xc118ce[0x0]['_appendChild'](_0x5323c1),_0x5323c1=null),_0x40fdcc[_0x40fdcc['length']-0x1]+=_0x27fc08[_0x40f1cc]['item']['offsetSize'],_0x27fc08[_0x40f1cc]['nextPosition']=_0x4009d8['createPositionFromPath'](_0x3f2dd9,_0x40fdcc));for(let _0x47894b=0x0;_0x47894b<_0x27fc08['length'];_0x47894b++){const _0x58f9d4=_0x27fc08[_0x47894b]['previousPosition'],_0x5521ea=_0x27fc08[_0x47894b]['nextPosition'];for(const _0x5b7919 of _0x27fc08[_0x47894b]['markersStart'])_0x558699['set'](_0x5b7919,{'start':_0x58f9d4,'end':null});_0x3fe702('isRemoveSuggestion',_0x47894b,_0x58f9d4,_0x5521ea),_0x3fe702('isAddSuggestion',_0x47894b,_0x58f9d4,_0x5521ea),_0x3fe702('isRemoved',_0x47894b,_0x58f9d4,_0x5521ea),_0x3fe702('isAdded',_0x47894b,_0x58f9d4,_0x5521ea);for(const _0x43df71 of _0x27fc08[_0x47894b]['markersEnd']){const _0x39bfdd=_0x558699['get'](_0x43df71);_0x39bfdd?_0x39bfdd['end']=_0x5521ea:_0x558699['set'](_0x43df71,{'start':_0x5521ea,'end':_0x5521ea});}}for(const [_0x406c84,_0x3cdc0b]of _0x558699){const _0x22d8a5=this['editor']['model']['createRange'](_0x3cdc0b['start'],_0x3cdc0b['end']);_0x3f2dd9['markers']['set'](_0x406c84,_0x22d8a5);}return _0xd040a6['sort']((_0x33510c,_0x260403)=>{const _0x11e375=_0x3f2dd9['markers']['get']('revision:'+_0x33510c['id']),_0x53cc03=_0x3f2dd9['markers']['get']('revision:'+_0x260403['id']);return _0x11e375['start']['isBefore'](_0x53cc03['start'])?-0x1:_0x11e375['start']['isAfter'](_0x53cc03['start'])?0x1:_0x11e375['end']['isBefore'](_0x53cc03['end'])?-0x1:_0x11e375['end']['isAfter'](_0x53cc03['end'])?0x1:'add'===_0x33510c['type']?-0x1:0x1;}),{'root':_0x3f2dd9,'changes':_0xd040a6};function _0x3fe702(_0x47acf3,_0x31824d,_0x53a263,_0x1e640e){const _0xfddf9=!!_0x27fc08[_0x31824d][_0x47acf3],_0x343d2d=_0xfddf9?_0x27fc08[_0x31824d][_0x47acf3]['userId']:null,_0x5a14a9=_0x31824d===_0x27fc08['length']-0x1,_0x45748f=_0x1c51b5[_0x47acf3][0x0],_0x2bac41=_0xd4dca8['isObject'](_0x27fc08[_0x31824d]['item']);!_0x321714[_0x47acf3]&&_0xfddf9?_0x321714[_0x47acf3]={'start':_0x53a263,'tapeItem':_0x27fc08[_0x31824d],'userId':_0x343d2d,'type':_0x47acf3}:_0x321714[_0x47acf3]&&!_0xfddf9?(_0x321714[_0x47acf3]['end']=_0x53a263,_0x23f899(_0x321714[_0x47acf3]),_0x321714[_0x47acf3]=null):_0x321714[_0x47acf3]&&_0xfddf9&&_0x321714[_0x47acf3]['userId']!==_0x343d2d&&(_0x321714[_0x47acf3]['end']=_0x53a263,_0x45748f&&_0x45748f['userId']===_0x321714[_0x47acf3]['userId']||_0x23f899(_0x321714[_0x47acf3]),_0x321714[_0x47acf3]={'start':_0x53a263,'tapeItem':_0x27fc08[_0x31824d],'userId':_0x343d2d,'type':_0x47acf3}),_0x321714[_0x47acf3]&&_0x2bac41&&('elementStart'!==_0x27fc08[_0x31824d]['type']||_0x45748f&&_0x45748f['userId']===_0x343d2d||_0x1c51b5[_0x47acf3]['unshift']({'userId':_0x343d2d,'object':_0x27fc08[_0x31824d]['item'],'change':_0x321714[_0x47acf3]}),'elementEnd'===_0x27fc08[_0x31824d]['type']&&_0x45748f&&_0x45748f['object']===_0x27fc08[_0x31824d]['item']&&(_0x1c51b5[_0x47acf3]['shift'](),_0x321714[_0x47acf3]=_0x45748f['change'])),_0x321714[_0x47acf3]&&_0x5a14a9&&(_0x321714[_0x47acf3]['end']=_0x1e640e,_0x23f899(_0x321714[_0x47acf3]),_0x321714[_0x47acf3]=null);}function _0x23f899({start:_0x2cc5b3,end:_0xf2ddc9,tapeItem:_0x5c2c32,userId:_0x49b342,type:_0x5a9c04}){const _0x408843=_0x5c2c32['item'],_0x94e790=_0x4009d8['schema']['isBlock'](_0x408843)&&!_0x4009d8['schema']['isLimit'](_0x408843),_0xb608f8=_0x2cc5b3['nodeAfter']==_0xf2ddc9['parent']&&_0xf2ddc9['isAtStart'];if(_0x94e790&&_0xb608f8)return;const _0x2393c1=_0x4009d8['createRange'](_0x2cc5b3,_0xf2ddc9),_0x71a50c=_0x38906b['get'](_0x49b342),_0x4b5099=new z({'author':_0x71a50c,'type':'isAdded'==_0x5a9c04||'isAddSuggestion'==_0x5a9c04?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x5a9c04||'isRemoveSuggestion'==_0x5a9c04},'createdAt':new Date(),'rootName':_0x24ecfe});_0xd040a6['push'](_0x4b5099),_0x3f2dd9['markers']['set']('revision:'+_0x4b5099['id'],_0x2393c1);}function _0x2cc7de(_0x17bb3d,_0x26713a){const _0x5bdcef=_0x17bb3d['getAttributes'](),_0x5d59a8=_0x26713a['getAttributes']();for(const _0x579579 of _0x5bdcef){if(_0x579579[0x1]!==_0x26713a['getAttribute'](_0x579579[0x0]))return!0x1;_0x5d59a8['next']();}return _0x5d59a8['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0xdd4d61=>{const _0x51153e=_0xdd4d61['markerName']['split'](':')[0x1],_0x267b95=this['_getChangeFromId'](_0x51153e);if(!_0x267b95)return null;const _0x4e614f='add'==_0x267b95['type']?'insertion':'deletion',_0x2b2b31=['ck-suggestion-marker','ck-suggestion-marker-'+_0x4e614f];return _0x267b95['data']['isSuggestion']&&_0x2b2b31['push']('ck-suggestion-marker-'+_0x4e614f+'-new'),this['activeChange']==_0x267b95&&_0x2b2b31['push']('ck-suggestion-marker--active'),{'classes':_0x2b2b31,'attributes':{'data-change-id':_0x51153e}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x2957d2=>{_0x2957d2['on']('element:pre',(_0x4cb72f,_0x426c51,_0x2bfb8b)=>{const _0x4efd2a=_0x426c51['viewItem']['getChild'](0x0);if(!_0x4efd2a||!_0x4efd2a['is']('element','code'))return;if(!_0x2bfb8b['consumable']['consume'](_0x4efd2a,{'attributes':['vid_start','vid_end']}))return;const _0x3638fa=_0x426c51['modelRange']['start']['nodeAfter'];_0x2bfb8b['writer']['setAttribute']('vid_start',_0x4efd2a['getAttribute']('vid_start'),_0x3638fa),_0x2bfb8b['writer']['setAttribute']('vid_end',_0x4efd2a['getAttribute']('vid_end'),_0x3638fa);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x3e928c=>{_0x3e928c['on']('element',(_0x217f00,_0x4f7cd5,_0x28c727)=>{if(!_0x28c727['consumable']['consume'](_0x4f7cd5['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x4f7cd5['modelRange']['isCollapsed'])return;const _0x2e8f3a=_0x4f7cd5['modelRange']['start']['nodeAfter'];_0x2e8f3a['hasAttribute']('vid_start')||_0x2e8f3a['hasAttribute']('vid')||(_0x28c727['writer']['setAttribute']('vid_start',_0x4f7cd5['viewItem']['getAttribute']('vid_start'),_0x2e8f3a),_0x28c727['writer']['setAttribute']('vid_end',_0x4f7cd5['viewItem']['getAttribute']('vid_end'),_0x2e8f3a));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x512597=>_0x512597['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x526f86,[,_0x57bc25])=>{['vid_start','vid_end','vid']['includes'](_0x57bc25)&&(_0x526f86['return']=!0x0,_0x526f86['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x5da971=>{_0x5da971['on']('attribute:vid',(_0x3d15c8,_0x2f5ed7,_0x4b31f3)=>{if('\x20'!=_0x2f5ed7['item']['data']||_0x2f5ed7['item']['parent']['maxOffset']>0x1)return;if(!_0x4b31f3['consumable']['consume'](_0x2f5ed7['item'],_0x3d15c8['name']))return;const _0x3bfdaa=_0x4b31f3['writer'],_0x4f04a2=_0x4b31f3['mapper']['toViewRange'](_0x2f5ed7['range']);_0x3bfdaa['wrap'](_0x4f04a2,_0x3bfdaa['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x1f975b){const _0x5d651a=_0x1f975b['plugins']['get']('RevisionViewer');return(_0x3b3db1,_0x5ca576,_0x7f747a)=>{const _0x163652=_0x5ca576['markerName']['split'](':')[0x1],_0x476a09=_0x5d651a['_getChangeFromId'](_0x163652);if(!_0x476a09)return null;const _0x2e4e4a='add'==_0x476a09['type']?'split':'merge';if(!_0x7f747a['consumable']['test'](_0x5ca576['markerRange'],_0x3b3db1['name']))return;const _0x12749a=_0x5ca576['markerRange']['getWalker'](),_0x47e57e=_0x5ca576['markerRange']['start'],_0xf67db6=_0x1f975b['model']['schema'];let _0x1715c2=null,_0xb7079b=null,_0x4ae76a=!0x1,_0x5b6d23=!0x1;for(const _0x113d96 of _0x12749a){const _0x500979=_0x113d96['item'];_0x4ae76a=_0x4ae76a||_0xf67db6['isContent'](_0x500979);const _0x130a9a=_0x7f747a['mapper']['toViewElement'](_0x500979);if(_0x130a9a&&_0x130a9a['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x113d96['type']&&(_0xf67db6['isBlock'](_0x500979)&&!_0xf67db6['isLimit'](_0x500979)&&(_0x500979['nextSibling']||_0x47e57e['isAtEnd']?_0x1715c2&&_0x1715c2['parent']==_0x500979||(_0x1715c2=_0x500979,_0x106aef(_0x113d96['previousPosition']),_0x5b6d23=!0x0):_0xb7079b=_0xb7079b||_0x113d96['previousPosition']));}function _0x106aef(_0x13fb35){const _0x2ca10a=_0x7f747a['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x2e4e4a}),_0xafebc9=_0x7f747a['mapper']['toViewPosition'](_0x13fb35);_0x476a09['data']['isSuggestion']&&_0x7f747a['writer']['addClass']('ck-suggestion-marker-'+_0x2e4e4a+'-new',_0x2ca10a),_0x5d651a['activeChange']==_0x476a09&&_0x7f747a['writer']['addClass']('ck-suggestion-marker--active',_0x2ca10a),_0x7f747a['writer']['insert'](_0xafebc9,_0x2ca10a),_0x7f747a['mapper']['bindElementToMarker'](_0x2ca10a,_0x5ca576['markerName']);}_0x4ae76a||_0x5b6d23||!_0xb7079b||_0x106aef(_0xb7079b);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x5ecf7e,_0x292feb,_0x5e2c77)=>{const _0x304b7a=_0x5e2c77['mapper']['markerNameToElements'](_0x292feb['markerName']);if(_0x304b7a){for(const _0x4f39b5 of _0x304b7a)(_0x4f39b5['hasClass']('ck-suggestion-marker-split')||_0x4f39b5['hasClass']('ck-suggestion-marker-merge'))&&(_0x5e2c77['mapper']['unbindElementFromMarkerName'](_0x4f39b5,_0x292feb['markerName']),_0x5e2c77['writer']['remove'](_0x4f39b5));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x4e5e0a,_0x501104,_0xbccff)=>{const _0x3c3920=_0x501104['markerName']['split'](':')[0x1],_0x5b31c2=this['_getChangeFromId'](_0x3c3920);if(!_0x5b31c2)return null;const _0x3e802b='add'==_0x5b31c2['type']?'split':'merge';if(_0xbccff['consumable']['test'](_0x501104['markerRange'],_0x4e5e0a['name']))for(const _0x3c51fb of _0x501104['markerRange']['getItems']()){if(!_0x3c51fb['is']('element','softBreak'))continue;const _0x41744a=_0xbccff['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x3e802b}),_0x25a4e8=_0xbccff['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x3c51fb));_0x5b31c2['data']['isSuggestion']&&_0xbccff['writer']['addClass']('ck-suggestion-marker-'+_0x3e802b+'-new',_0x41744a),this['activeChange']==_0x5b31c2&&_0xbccff['writer']['addClass']('ck-suggestion-marker--active',_0x41744a),_0xbccff['writer']['insert'](_0x25a4e8,_0x41744a),_0xbccff['mapper']['bindElementToMarker'](_0x41744a,_0x501104['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x3a2321=>{for(const _0x384d53 of this['editor']['model']['document']['getRootNames']()){const _0x25e423=this['editor']['model']['document']['getRoot'](_0x384d53),_0x2ea939=this['editor']['editing']['view']['document']['getRoot'](_0x384d53);if(_0x2ea939){const _0x24da6d=_0x25e423['getAttribute']('revisionHistoryAttachChange');if(_0x3a2321['removeAttribute']('data-change-id',_0x2ea939),_0x3a2321['removeClass']('ck-revision-history-root-add',_0x2ea939),_0x3a2321['removeClass']('ck-revision-history-root-remove',_0x2ea939),_0x3a2321['removeClass']('ck-revision-history-root--active',_0x2ea939),_0x24da6d){const _0x229d17=this['_getChangeFromId'](_0x24da6d);if(!_0x229d17)return null;_0x3a2321['setAttribute']('data-change-id',_0x24da6d,_0x2ea939),_0x3a2321['addClass']('ck-revision-history-root-'+_0x229d17['type'],_0x2ea939),this['activeChange']==_0x229d17&&_0x3a2321['addClass']('ck-revision-history-root--active',_0x2ea939);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x572126=>'revision-comment:'+_0x572126,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x1c152c=>'revision-suggestion:'+_0x1c152c,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x2aa0f5=>({'name':'suggestion:'+_0x2aa0f5,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x5396e2=>{const _0x3f0ea6=_0x5396e2['markerName']['split'](':')[0x1];return'insertion'!=_0x3f0ea6&&'deletion'!=_0x3f0ea6?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x3f0ea6]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',J(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',J(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x22e23d,_0x50e792,_0x2dabb1)=>{const _0x4707f6=_0x2dabb1['mapper']['markerNameToElements'](_0x50e792['markerName']);if(_0x4707f6){for(const _0x41eda2 of _0x4707f6)_0x41eda2['is']('uiElement')&&(_0x2dabb1['mapper']['unbindElementFromMarkerName'](_0x41eda2,_0x50e792['markerName']),_0x2dabb1['writer']['remove'](_0x41eda2));}},{'priority':'high'});}['_getChangeFromId'](_0x2ba966){return this['_changeIdToChange']['get'](_0x2ba966);}['_getViewForChange'](_0x3d580a){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new q(this['editor']['locale'],_0x3d580a),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0xca9495,_0x303053,_0x22c63c,_0x3209a2)=>{_0x3209a2&&this['_balloon']['remove'](_0x3209a2),_0x22c63c&&(this['_balloon']['add']({'view':_0x22c63c,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x1c90f3=this['editor']['editing'],_0x33ebe6=this['_getChangeFromId'](_0x22c63c['changeId']);let _0x2e418c;if(_0x33ebe6['data']['isOnRoot']){const _0x1e7d78=_0x1c90f3['view']['getDomRoot'](_0x33ebe6['rootName']);_0x2e418c=Array['from'](_0x1e7d78['getClientRects']());}else{const _0x2e06e7=this['editor']['model']['markers']['get']('revision:'+_0x22c63c['changeId']);_0x2e418c=Array['from'](_0x1c90f3['mapper']['markerNameToElements'](_0x2e06e7['name']))['map'](_0x47fb0c=>_0x1c90f3['view']['domConverter']['mapViewToDom'](_0x47fb0c))['map'](_0x4a9ff8=>Array['from'](_0x4a9ff8['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x2e418c[0x0];return _0x2e418c['find'](_0x1b670a=>_0x1b670a['top']-0x3<=this['_activeViewTarget']['y']&&_0x1b670a['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x1b670a['left']-0x3<=this['_activeViewTarget']['x']&&_0x1b670a['right']+0x3>=this['_activeViewTarget']['x'])||_0x2e418c[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x3b2827,_0x39682c,_0x149fff,_0x475421)=>{this['activeView']=_0x149fff?this['_getViewForChange'](_0x149fff):null,this['editor']['model']['change'](()=>{const _0x1b8430=this['editor']['editing'];_0x475421&&(_0x475421['data']['isOnRoot']?_0x1b8430['view']['change'](_0x970bf3=>{_0x970bf3['removeClass']('ck-revision-history-root--active',_0x1b8430['view']['document']['getRoot'](_0x475421['rootName']));}):_0x1b8430['reconvertMarker']('revision:'+_0x475421['id'])),_0x149fff&&(_0x149fff['data']['isOnRoot']?_0x1b8430['view']['change'](_0x2b776f=>{_0x2b776f['addClass']('ck-revision-history-root--active',_0x1b8430['view']['document']['getRoot'](_0x149fff['rootName']));}):_0x1b8430['reconvertMarker']('revision:'+_0x149fff['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x1d3ebc,_0x314c53)=>{if(this['activeChange'])return;const _0xacdd1=this['_findChangeIdFromDomTarget'](_0x314c53['target']),_0x2f9ab6=this['_changeIdToChange']['get'](_0xacdd1);_0x2f9ab6?(this['_activeViewTarget']={'x':_0x314c53['domEvent']['x'],'y':_0x314c53['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x2f9ab6)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x484c72,_0x41799f)=>{const _0x5b484f=this['_findChangeIdFromDomTarget'](_0x41799f['target']),_0x1a59e1=this['_changeIdToChange']['get'](_0x5b484f);_0x1a59e1?(this['_activeViewTarget']={'x':_0x41799f['domEvent']['x'],'y':_0x41799f['domEvent']['y']},_0x1a59e1===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x1a59e1):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x14565c){do{const _0x58fcec=_0x14565c['getAttribute']('data-change-id');if(_0x58fcec)return _0x58fcec;_0x14565c=_0x14565c['parent'];}while(_0x14565c);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0xdccfa2=>{for(const _0x132f1e of this['editor']['model']['markers'])_0xdccfa2['removeMarker'](_0x132f1e);});}}function J(_0x206f33,_0xd6418f){return(_0x2ae188,_0x358581,_0xc250b9)=>{if(!_0xc250b9['consumable']['test'](_0x358581['markerRange'],_0x2ae188['name']))return;const _0x4e951a=_0x358581['markerRange']['getWalker'](),_0x24b7da=_0x358581['markerRange']['start'],_0xe5e385=_0x206f33['model']['schema'];let _0x28bd48=null,_0x3fcf9b=null,_0x4857b6=!0x1,_0x5bb756=!0x1;for(const _0x3625b5 of _0x4e951a){const _0xb852c9=_0x3625b5['item'];_0x4857b6=_0x4857b6||_0xe5e385['isContent'](_0xb852c9);const _0x348046=_0xc250b9['mapper']['toViewElement'](_0xb852c9);if(_0x348046&&_0x348046['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x3625b5['type']&&(_0xe5e385['isBlock'](_0xb852c9)&&!_0xe5e385['isLimit'](_0xb852c9)&&(_0xb852c9['nextSibling']||_0x24b7da['isAtEnd']?_0x28bd48&&_0x28bd48['parent']==_0xb852c9||(_0x28bd48=_0xb852c9,_0xdfeedf(_0x3625b5['previousPosition']),_0x5bb756=!0x0):_0x3fcf9b=_0x3fcf9b||_0x3625b5['previousPosition']));}function _0xdfeedf(_0x3bab84){const _0x2c1dc3=_0xc250b9['mapper']['toViewPosition'](_0x3bab84),_0x3ba866=_0xc250b9['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0xd6418f});_0xc250b9['writer']['insert'](_0x2c1dc3,_0x3ba866),_0xc250b9['mapper']['bindElementToMarker'](_0x3ba866,_0x358581['markerName']);}_0x4857b6||_0x5bb756||!_0x3fcf9b||_0xdfeedf(_0x3fcf9b);};}class RestoreRevisionCommand extends _0x11ff94{constructor(_0x50c0b8){super(_0x50c0b8);const _0x450530=_0x50c0b8['plugins']['get'](u);this['affectsData']=!0x1,this['listenTo'](_0x450530,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x450530,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x415e0d=this['editor'],_0x41aefd=_0x415e0d['plugins']['get'](u),_0xf79e4b=_0x41aefd['isReady']?_0x41aefd['diff']['newRevisionId']:null;_0x415e0d['config']['get']('revisionHistory')['restoreRevisionCallback'](_0xf79e4b);}['refresh'](){const {isReady:_0x1a12f8,isEnabled:_0x1f46ab,repository:_0x3a50ef,diff:_0x21e6a6}=this['editor']['plugins']['get'](u),_0x2fdf24=_0x21e6a6&&_0x3a50ef['getLaterVisibleRevision'](_0x21e6a6['newRevisionId']);this['isEnabled']=_0x1a12f8&&_0x1f46ab&&Boolean(_0x2fdf24);}}class ShowChangeCommand extends _0x11ff94{['_step'];constructor(_0x2eb106,{direction:_0x22f1c0}){super(_0x2eb106);const _0x1ecc0d=_0x2eb106['plugins']['get'](u);this['affectsData']=!0x1,this['_step']='forward'===_0x22f1c0?0x1:-0x1,this['listenTo'](_0x1ecc0d,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x1ecc0d,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x1ecc0d,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x3ef96f=this['editor'],_0x42df72=_0x3ef96f['plugins']['get'](u),{isNavigationMode:_0x3605d4,currentChangeNumber:_0x10ba01}=_0x42df72;let _0x4cbe6c;if(_0x42df72['activeChange']=_0x3605d4?_0x42df72['diff']['changes']['get'](_0x10ba01+this['_step']):_0x42df72['diff']['changes']['first'],_0x42df72['activeChange']['data']['isOnRoot'])_0x4cbe6c=_0x3ef96f['editing']['view']['getDomRoot'](_0x42df72['activeChange']['rootName']);else{const _0x2024b1=_0x3ef96f['model']['markers']['get']('revision:'+_0x42df72['activeChange']['id']);_0x4cbe6c=_0x854659(_0x3ef96f['editing'],_0x2024b1);}_0x374391({'target':_0x4cbe6c,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x566572,currentChangeNumber:_0x121069,numberOfChanges:_0x232138,isReady:_0x4a9367,isEnabled:_0x4142a7}=this['editor']['plugins']['get'](u);this['isEnabled']=!!(_0x4142a7&&_0x4a9367&&_0x232138)&&(!_0x566572||(0x1===this['_step']?_0x121069<_0x232138-0x1:_0x121069>0x0));}}class xi extends _0x395725{constructor(_0x1160bb){super(_0x1160bb);const _0x9a76bc=this['bindTemplate'],_0x9f4eed=new _0x409039(_0x1160bb),_0x54b749=new _0x409039(_0x1160bb);this['set']('isNavigationMode',!0x1),this['set']('isReady',!0x1),this['set']('currentChangeNumber',0x0),this['set']('numberOfChanges',0x0),this['set']('isForwardNavigationEnabled',!0x1),this['set']('isBackwardNavigationEnabled',!0x1),this['bind']('_isStatusLabelVisible')['to'](this,'isReady',this,'numberOfChanges',(_0x66eee,_0x582a0e)=>_0x66eee&&_0x582a0e>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x332a1e,_0x448cfb,_0x1cef23,_0x2af71e)=>{if(!_0x332a1e)return m(_0x1160bb,'Loading...');if(!_0x1cef23)return m(_0x1160bb,'No\x20changes');const _0x4fb2e1=m(_0x1160bb,'NUMBER_OF_CHANGES',_0x1cef23);return _0x2af71e?m(_0x1160bb,'X_OF_Y_CHANGES',[_0x448cfb+0x1,_0x1cef23]):_0x4fb2e1;}),_0x9f4eed['set']({'label':m(_0x1160bb,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x18ea23}),_0x54b749['set']({'label':m(_0x1160bb,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x1268c6}),_0x9f4eed['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x54b749['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x9f4eed['on']('execute',()=>this['fire']('execute','backward')),_0x54b749['on']('execute',()=>this['fire']('execute','forward')),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-revision-history-ui','ck-revision-history-ui__changes-navigation']},'children':[{'tag':'span','attributes':{'class':['ck-revision-history-ui__changes-navigation__wrapper']},'children':[{'tag':'span','attributes':{'class':['ck-revision-history-ui__changes-navigation__label',_0x9a76bc['if']('_isStatusLabelVisible','ck-hidden',_0x463b78=>!_0x463b78)]},'children':[{'text':_0x9a76bc['to']('isNavigationMode',_0x33a683=>_0x33a683?m(_0x1160bb,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x1160bb,'Total')+':\x20')}]},{'text':_0x9a76bc['to']('_statusText')}]},new _0x59396d(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x9f4eed,_0x54b749]}]});}}const ge='ck-editor__editable__loading-overlay';class Ri extends _0x87a842{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x26d48d=this['editor']['editing']['view'];_0x26d48d['change'](_0x3e572f=>{for(const _0x13cb78 of _0x26d48d['document']['roots'])_0x3e572f['addClass'](ge,_0x13cb78);});}['hide'](){const _0x152b75=this['editor']['editing']['view'];_0x152b75['change'](_0xdadb4e=>{for(const _0x331d67 of _0x152b75['document']['roots'])_0xdadb4e['removeClass'](ge,_0x331d67);});}}class v extends _0x87a842{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,Ri];}['init'](){const _0x1d006b=this['editor'],_0x338c15=_0x1d006b['plugins']['get'](u),_0xbc0d64=_0x1d006b['plugins']['get'](Ri);_0x1d006b['ui']['componentFactory']['add']('exitToEditing',_0x399986=>{const _0x1cab0b=new _0x409039(_0x399986);return _0x1cab0b['set']({'label':m(_0x399986,'Back\x20to\x20editing'),'icon':_0x68bc5e,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x1cab0b,'execute',()=>{_0x1d006b['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x1cab0b;}),_0x1d006b['ui']['componentFactory']['add']('restoreRevision',_0x24d408=>{const _0x5c5e3a=new _0x409039(_0x24d408);return _0x5c5e3a['set']({'label':m(_0x24d408,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x5c5e3a['bind']('isEnabled')['to'](_0x1d006b['commands']['get']('restoreRevision')),this['listenTo'](_0x5c5e3a,'execute',()=>_0x1d006b['execute']('restoreRevision')),_0x5c5e3a;}),_0x1d006b['ui']['componentFactory']['add']('changesNavigation',_0x1024fe=>{const _0x2df099=new xi(_0x1024fe),_0x5f476e=_0x1d006b['commands']['get']('showPreviousChange'),_0x1ad659=_0x1d006b['commands']['get']('showNextChange');return _0x2df099['bind']('isBackwardNavigationEnabled')['to'](_0x5f476e,'isEnabled'),_0x2df099['bind']('isForwardNavigationEnabled')['to'](_0x1ad659,'isEnabled'),_0x2df099['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x338c15),this['listenTo'](_0x2df099,'execute',(_0xb0284d,_0x51c28c)=>{_0x1d006b['execute']('forward'===_0x51c28c?'showNextChange':'showPreviousChange');}),_0x2df099;}),_0xbc0d64['show'](),_0x338c15['on']('change:isReady',(_0x58e3d8,_0x1e3385,_0x15a033)=>{_0x15a033?_0xbc0d64['hide']():_0xbc0d64['show']();});}}class oi extends et{['_resizeObserver']=null;constructor(_0x6dcde,_0x17a58a){super(_0x6dcde,_0x17a58a);const _0x3bb55c=this['bindTemplate'];this['set']({'label':m(_0x6dcde,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x6dcde,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x3bb55c['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new ot(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x4266fa=this['fieldView']['element'];this['_tooltipString']=_0x4266fa['scrollWidth']>_0x4266fa['clientWidth']&&_0x4266fa['value']||'';}}class hi extends _0x395725{constructor(_0x21ac1e,_0x2e7ff0,_0x51228e){super(_0x21ac1e);const _0x2dd599=new _0x302be9();_0x2dd599['set']({'content':_0x59f32c,'viewBox':'0\x200\x2011\x2010'});const _0x1a8994=['ck','ck-revision-history-sidebar__revision-author'];_0x51228e&&_0x1a8994['push']('ck-revision-history-sidebar__revision-author_creator');const _0x47997e=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x21ac1e,_0x51228e?'Revision\x20creator':'Revision\x20author')},'children':[_0x2dd599,_0x2e7ff0['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x1a8994},'children':_0x47997e});}}function ci(_0x1b5f5d,_0x38b66e){const _0x1fe638=_0x1b5f5d['bindTemplate'],_0x90bd3d=_0x1b5f5d['locale'],_0x41918a=_0x43a564(_0x90bd3d);_0x41918a['panelPosition']='sw';const _0xe56bbb=function(_0x2f26c1,_0x2068c0){const _0xdaaf65=function(_0x341307,_0x40f721){const _0x5d9090=_0x341307['locale'],_0x32a330={'Compare\x20against\x20selected':m(_0x5d9090,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x5d9090,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x5d9090,'Restore\x20this\x20revision')};return _0x40f721['map'](_0x18a23e=>{const _0x3eb8eb=_0x32a330[_0x18a23e['name']];return _0x3eb8eb&&_0x3eb8eb!==_0x18a23e['name']&&(_0x18a23e['name']=_0x3eb8eb),_0x18a23e;});}(_0x2f26c1,_0x2068c0),_0xf42b40=new _0xa9c085();for(const _0x4ff507 of _0xdaaf65){const _0x11e8da={'type':'button','model':new to({'label':_0x4ff507['name'],'class':_0x4ff507['class'],'withText':!0x0,'role':'menuitem','_action':_0x4ff507['action']})};_0x11e8da['model']['bind']('isEnabled')['to'](_0x2f26c1,'isActionsDropdownOpen',_0x11d517=>'function'!=typeof _0x4ff507['isEnabled']||(!_0x11d517||_0x4ff507['isEnabled'](_0x2f26c1))),_0xf42b40['add'](_0x11e8da);}return _0xf42b40;}(_0x1b5f5d,_0x38b66e);return _0x1b5f5d['bind']('isActionsDropdownOpen')['to'](_0x41918a,'isOpen'),_0x41918a['buttonView']['set']({'label':m(_0x90bd3d,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x37b76d}),_0x41918a['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x1fe638['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x1fe638['to'](_0x1c6eb4=>_0x1c6eb4['stopPropagation']())}}),_0x41918a['on']('execute',_0x9157=>{_0x1b5f5d['isReady']&&'function'==typeof _0x9157['source']['_action']&&_0x9157['source']['_action'](_0x1b5f5d);}),_0x385744(_0x41918a,_0xe56bbb,{'role':'menu'}),_0x41918a['listenTo'](_0x1b5f5d,'change:isActionsDropdownOpen',(_0x16f756,_0x330a71,_0x46f85d)=>{if(_0x46f85d)for(const _0x1bc263 of _0x41918a['listView']['items']){const _0x1d17d7=_0x1bc263['children']['first'],_0x56c75e=_0x38b66e['find'](_0x17beb3=>_0x17beb3['action']===_0x1d17d7['_action'])['isVisible'];_0x1bc263['isVisible']=void 0x0===_0x56c75e||_0x56c75e(_0x1b5f5d);}}),_0x41918a;}class _i extends/* #__PURE__ -- @preserve */
27
+ _0x2e4f0b(_0x395725){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x52dcb5,_0x431719,_0x52ee33,_0x530058){super(_0x52dcb5);const _0x501df0=this['bindTemplate'],_0x157d67=function(_0x7fb8c6,_0x71c784){const _0x44e731=Array['from'](_0x71c784['authors'])['filter'](_0x522aa1=>_0x522aa1!=_0x71c784['creator']);return _0x71c784['creator']&&_0x44e731['unshift'](_0x71c784['creator']),_0x44e731['map'](_0x5dd3cd=>new hi(_0x7fb8c6,_0x5dd3cd,_0x5dd3cd==_0x71c784['creator']));}(_0x52dcb5,_0x431719);this['id']=_0x431719['id'],this['_revision']=_0x431719,this['_requireRevisionName']=_0x530058,this['bind']('name','createdAt')['to'](_0x431719),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0xa5c7cc=>{return _0x1af13f=_0x52dcb5['uiLanguage'],(_0x3cdd3e=_0xa5c7cc)['toLocaleDateString'](_0x1af13f,{'month':'long','day':'numeric'})+',\x20'+_0x3cdd3e['toLocaleTimeString'](_0x1af13f,{'hour':'numeric','minute':'numeric'});var _0x1af13f,_0x3cdd3e;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new oi(_0x52dcb5,ti),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x5f5ddc=>_0x5f5ddc||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x58949d,_0x3d0727)=>_0x58949d&&_0x3d0727),this['revisionActionsView']=_0x52ee33&&_0x52ee33['length']?ci(this,_0x52ee33):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x501df0['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x501df0['if']('isEnabled','ck-disabled',_0x32a083=>!_0x32a083),_0x501df0['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x501df0['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x501df0['if']('isActionsDropdownOpen','ck-revision-history-sidebar__actions_dropdown_open')]},'children':[this['revisionNameView'],{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision__date']},'children':[{'text':_0x501df0['to']('_createdAtFormatted')}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__revision__controls-wrapper']},'children':[{'tag':'ul','attributes':{'class':['ck','ck-revision-history-sidebar__revision-authors']},'children':_0x157d67}]},this['revisionActionsView']],'on':{'click':_0x501df0['to'](_0x57f3e6=>{_0x57f3e6['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x554eae=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x554eae,'change',()=>{this['_requireRevisionName']&&!_0x554eae['value']||this['fire']('setName',{'id':this['id'],'name':_0x554eae['value']}),_0x554eae['value']||(_0x554eae['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function li(_0x3e9704,_0x28fbb1){const _0x368474=_0x148f3c['fromJSDate'](_0x3e9704)['setLocale'](_0x28fbb1),_0x49f6ac=_0x148f3c['local'](),_0x174e92=_0x49f6ac['minus']({'days':0x1})['startOf']('day');let _0x421c6b,_0x5e116f;return _0x368474['hasSame'](_0x49f6ac,'day')?(_0x421c6b=_0x368474['startOf']('day')['toJSDate'](),_0x5e116f=_0x368474['toRelativeCalendar']()):_0x368474['hasSame'](_0x174e92,'day')?(_0x421c6b=_0x174e92['toJSDate'](),_0x5e116f=_0x368474['toRelativeCalendar']()):_0x368474['hasSame'](_0x49f6ac,'week')?(_0x421c6b=_0x368474['startOf']('week')['toJSDate'](),_0x5e116f=_0x368474['weekdayLong']||''):_0x368474['hasSame'](_0x49f6ac,'year')?(_0x421c6b=_0x368474['startOf']('month')['toJSDate'](),_0x5e116f=_0x368474['monthLong']||''):(_0x421c6b=_0x368474['startOf']('year')['toJSDate'](),_0x5e116f=String(_0x368474['year'])),{'startDate':_0x421c6b,'localizedPeriodName':_0x5e116f};}class bi extends _0x395725{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x42f9db,_0x5ec51a,_0x364f38,_0x5e75a3){super(_0x42f9db);const _0x45697e=li(_0x5ec51a,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x5ec51a,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x364f38,this['_requireRevisionName']=_0x5e75a3,this['revisionViews']['delegate']('select')['to'](this),this['revisionViews']['delegate']('setName')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period']},'children':[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__label']},'children':[{'text':_0x45697e}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x231adc){const _0x4abb79=new _i(this['locale'],_0x231adc,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x4abb79);}['removeRevision'](_0xdf5bf6){const _0x11c9bb=this['revisionViews']['find'](_0x4a6e78=>_0x4a6e78['id']===_0xdf5bf6['id']);this['revisionViews']['remove'](_0x11c9bb);}}class fi extends _0x395725{constructor(_0x3bacef){super(_0x3bacef);const _0x4e9959=new _0x302be9();_0x4e9959['content']=_0x4f868d,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x4e9959,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[m(_0x3bacef,'Revision\x20history')]}]});}}class di extends _0x395725{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x15f206,_0x1d5a0c,_0x37cfd7,_0x5a784b){super(_0x15f206);const _0x15cc64=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x1d5a0c,this['_revisionActions']=_0x37cfd7,this['_requireRevisionName']=_0x5a784b,this['on']('select',(_0x592284,_0x3d7522)=>{this['fire']('revisionSelected',_0x3d7522);}),this['on']('setName',(_0x4add56,_0x126ae5)=>{this['fire']('revisionSetName',_0x126ae5);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new fi(_0x15f206),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x15cc64['if']('isEnabled','ck-disabled',_0x22cb7b=>!_0x22cb7b)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x473edc of this['_revisions'])this['_addRevision'](_0x473edc);this['_revisions']['on']('add',(_0xf09390,_0x4c17cc)=>{this['_addRevision'](_0x4c17cc);}),this['_revisions']['on']('remove',(_0x5917ae,_0x42dfa9)=>{this['_removeRevision'](_0x42dfa9);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x402948=>_0x402948['revisionViews']['map'](_0x24889c=>_0x24889c))['flat']();}['selectRevision'](_0x5d8bd6){for(const _0x150fc4 of this['revisionViews'])_0x5d8bd6&&_0x5d8bd6['id']===_0x150fc4['id']?_0x150fc4['select']():_0x150fc4['deselect']();}['highlightRevisions'](_0x4e4ae9){for(const _0x21818f of this['revisionViews'])_0x4e4ae9['some'](({id:_0xc67602})=>_0xc67602===_0x21818f['id'])?_0x21818f['highlight']():_0x21818f['unhighlight']();}['_addRevision'](_0x35b7d7){const _0x19fdea=li(_0x35b7d7['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x42b6aa=this['timePeriodViews']['get'](0x0);_0x42b6aa&&_0x42b6aa['startDate']['getTime']()===_0x19fdea['getTime']()||(_0x42b6aa=new bi(this['locale'],_0x19fdea,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x42b6aa)),_0x42b6aa['addRevision'](_0x35b7d7);}['_removeRevision'](_0x265b71){const _0x359f58=li(_0x265b71['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x359f58)['removeRevision'](_0x265b71);}['_getTimePeriodViewByStartDate'](_0x100afe){return this['timePeriodViews']['find'](_0x4abe87=>_0x4abe87['startDate']['getTime']()===_0x100afe['getTime']());}}class d extends _0x87a842{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
28
28
  ((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
29
- nt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}constructor(_0x1deea9){super(_0x1deea9),this['_revisionViewer']=_0x1deea9['plugins']['get'](u),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x5873f9=this['_revisionsRepository']['_revisions'],_0x4f633a=this['_createRevisionActions'](),_0x1598be=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new di(this['editor']['locale'],_0x5873f9,_0x4f633a,this['editor']['config']['get']('revisionHistory.requireRevisionName')),this['_sidebarView']['on']('revisionSelected',this['_handleRevisionSelected']['bind'](this)),this['_sidebarView']['on']('revisionSetName',this['_handleRevisionSetName']['bind'](this)),this['_sidebarView']['bind']('isEnabled')['to'](this['_revisionViewer']),this['_sidebarView']['timePeriodViews']['on']('add',(_0x54d1fb,_0x11c022)=>{_0x11c022['revisionViews']['on']('add',(_0x533d01,_0x437334)=>{_0x437334['bind']('isEnabled','isReady')['to'](this['_revisionViewer']);});}),this['_sidebarView']['render'](),this['listenTo'](this['editor']['data'],'ready',this['_handleEditorDataReady']['bind'](this)),this['listenTo'](this['_revisionViewer'],'change:diff',this['_handleDiffChange']['bind'](this)),_0x1598be['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x29b80f=this['_revisionsRepository']['getRevision'](0x0);if(_0x29b80f){const _0x369041=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x29b80f['id']);this['_revisionViewer']['compare'](_0x29b80f,_0x369041);}}['_handleRevisionSelected'](_0x1000e3,_0x4f9fd9){const _0x2e74a8=this['_revisionsRepository']['getRevision'](_0x4f9fd9['id']),_0x505cc9=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x2e74a8['id']);this['_revisionViewer']['compare'](_0x2e74a8,_0x505cc9);}['_handleRevisionSetName'](_0x527088,_0x35b563){this['_revisionsRepository']['getRevision'](_0x35b563['id'])['setName'](_0x35b563['name']);}['_handleDiffChange'](_0x4eb2a8,_0x46ee57,_0x2b2337){const _0x31d459=this['_revisionsRepository']['getRevisionsInDiff'](_0x2b2337);_0x31d459['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x31d459),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x31d459[0x0]));}['_createRevisionActions'](){const _0x3a218f=this['editor'],_0x28c93f=d['availableRevisionActions'],_0x29ee58=_0x3a218f['config']['get']('revisionHistory.revisionActions')||d['defaultRevisionActions'];if(_0x29ee58['length'])return _0x29ee58['map'](_0x55ce93=>{const _0x57442e='string'==typeof _0x55ce93?Object['assign']({},_0x28c93f[_0x55ce93]):_0x55ce93;return _0x57442e['action']=_0x57442e['action']['bind'](this,_0x3a218f),_0x57442e['isVisible']&&(_0x57442e['isVisible']=_0x57442e['isVisible']['bind'](this,_0x3a218f)),_0x57442e;});}}function nt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x340133},_0x51a092)=>{const _0xbb0924=_0x340133['get'](u),_0x54c0d6=_0xbb0924['repository'];let _0x3ea9eb=_0xbb0924['diff']['newRevisionId'],_0x39724e=_0x51a092['id'];_0x54c0d6['getIndex'](_0x3ea9eb)>_0x54c0d6['getIndex'](_0x39724e)&&([_0x3ea9eb,_0x39724e]=[_0x39724e,_0x3ea9eb]),_0xbb0924['compare'](_0x3ea9eb,_0x39724e);},'isVisible':({plugins:_0x26f10f},_0x506ec2)=>{const _0x31a185=_0x26f10f['get'](u);return!(_0x31a185['repository']['getRevisionsInDiff'](_0x31a185['diff'])['length']>0x2)&&!_0x506ec2['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0xaa1952,{id:_0xa073c9})=>{_0xaa1952['config']['get']('revisionHistory')['restoreRevisionCallback'](_0xa073c9);},'isVisible':({plugins:_0x4c9435},_0x196a56)=>!!_0x4c9435['get'](u)['repository']['getLaterVisibleRevision'](_0x196a56['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x3dc11c},{id:_0x52cb56,revisionNameView:_0x236c70})=>{const _0x56093f=_0x3dc11c['get'](u),_0xa55268=_0x56093f['repository']['getEarlierVisibleRevision'](_0x52cb56);_0x56093f['compare'](_0x52cb56,_0xa55268),_0x236c70['focus'](),_0x236c70['fieldView']['select']();}}};}class Y extends tt{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x2dc5a7,_0x2444c3){super(_0x2dc5a7),this['_view']=_0x2444c3,this['_toolbarConfig']=st(_0x2dc5a7['config']['get']('toolbar')),this['_elementReplacer']=new it();}get['element'](){return this['view']['element'];}['init'](_0x341b6f){const _0x188206=this['editor'],_0x386139=this['view'],_0xb9da2e=_0x188206['editing']['view'],_0x21a361=_0x386139['editable'],_0x1af3bf=_0xb9da2e['document']['getRoot']();_0x21a361['name']=_0x1af3bf['rootName'],_0x386139['render']();const _0x3f93f4=_0x21a361['element'];this['setEditableElement'](_0x21a361['name'],_0x3f93f4),_0x386139['editable']['bind']('isFocused')['to'](this['focusTracker']),_0xb9da2e['attachDomRoot'](_0x3f93f4),this['_elementReplacer']['replace'](_0x341b6f,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x5a9036=this['view'],_0x55e57e=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x55e57e['detachDomRoot'](_0x5a9036['editable']['name']),_0x5a9036['destroy']();}['_initToolbar'](){const _0x3b070d=this['view'];_0x3b070d['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x3b070d['stickyPanel']['limiterElement']=_0x3b070d['element'],_0x3b070d['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x28a8b2})=>_0x28a8b2),_0x3b070d['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x3b070d['toolbar']);}}class Z extends _0x2af41{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x240382,_0x5a4e02,_0x32d369={}){super(_0x240382),this['stickyPanel']=new _0x1e83cf(_0x240382),this['toolbar']=new _0x8564d3(_0x240382,{'shouldGroupWhenFull':_0x32d369['shouldToolbarGroupWhenFull']}),this['_editable']=new te(_0x240382,_0x5a4e02);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class f extends/* #__PURE__ -- @preserve */
30
- _0x1bf367(_0x5a3aa2){['_ui'];get['ui'](){return this['_ui'];}constructor(_0xd33cf4,_0x1b12a8){super(_0x1b12a8),this['sourceElement']=_0xd33cf4,this['model']['document']['createRoot']();const _0x3aafc2=new Z(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Y(this,_0x3aafc2);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x7cca60,_0x4bc95c){const _0x41c65b=new this(_0x7cca60,_0x4bc95c);return await _0x41c65b['initPlugins'](),await _0x41c65b['ui']['init'](_0x7cca60),await _0x41c65b['data']['init'](_0x41c65b['config']['get']('initialData')||''),_0x41c65b['fire']('ready'),_0x41c65b;}}const p=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];class RevisionViewerIntegration extends _0xde4b58{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x10a1ee){function _0x36b4e3(_0xeafd88){return _0xeafd88['map'](_0x4cf5e7=>String['fromCharCode'](_0x4cf5e7))['join']('');}super(_0x10a1ee),this['result']='end',_0x10a1ee[_0x36b4e3([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x36b4e3([0x76,0x69,0x65,0x77])][_0x36b4e3([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x36b4e3([0x61,0x75,0x74,0x6f]),_0x10a1ee[_0x36b4e3([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x36b4e3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x36b4e3([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x36b4e3([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x36b4e3([0x6f,0x6b])});}}class RevisionHistory extends _0xde4b58{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h,l];}constructor(_0x56fb59){if(super(_0x56fb59),!this['editor']['config']['get']('revisionHistory'))throw new _0x2fd89f('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x2d11f0=>this['_showRevisionViewer']({..._0x2d11f0,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x39e9f8=>this['_closeRevisionViewer'](_0x39e9f8)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x11ca94=>this['_restoreRevision'](_0x11ca94)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x2bdd63){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x2bdd63;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x4693a2){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x4693a2);}['getRevision'](_0x99087f){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x99087f);}['getRevisions'](_0x2016d9){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x2016d9||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0xb0e21c=this['editor'],_0x3eed13=_0x3f3d11(_0xb0e21c,p),_0x470edd=_0xb0e21c['plugins']['get']('RevisionTracker'),_0x383ac2=_0xb0e21c['plugins']['get']('Users')['users'];return _0x3eed13['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x3eed13['lazyRoots'],(_0x3eed13['plugins']['push'](RevisionViewerIntegration,u,v,class RevisionViewerInit extends _0xde4b58{static get['requires'](){return[u,'Users'];}['init'](){const _0x58a5af=this['editor']['plugins']['get']('Users');for(const _0xf320a6 of _0x383ac2)_0xf320a6['isAnonymous']||_0x58a5af['getUser'](_0xf320a6['id'])||_0x58a5af['addUser'](_0xf320a6);const _0xbbb359=_0x470edd['repository']['getRevisions']();let _0x40cea0=null;const _0x3662d8=this['editor']['plugins']['get']('RevisionViewer');_0x3662d8['adapter']=_0x470edd['adapter'],_0x3662d8['bind']('isEnabled')['to'](_0x470edd),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0xb0e21c,'isReadOnly',_0x4353f1=>!_0x4353f1);for(const _0x9f4da6 of _0xbbb359){const _0x51df37=null===_0x9f4da6['creator'];if(_0x51df37&&_0x9f4da6['toVersion']===_0x9f4da6['fromVersion'])continue;const _0x511f3b=_0x9f4da6['toJSON']();_0x3662d8['addRevisionData'](_0x511f3b,(_0x54d319,_0x340e2c,_0x30ea1b)=>{if(_0x51df37){if(_0x40cea0)_0x40cea0['_update'](_0x54d319,_0x340e2c);else{if(!_0x340e2c){const _0x51f5a2=_0x30ea1b['toJSON']();_0x51f5a2['id']=_0xefa39(),_0x470edd['saveRevision'](_0x51f5a2,_0x30ea1b['toVersion'])['then'](_0x1a279c=>{_0x40cea0=_0x1a279c;});}}}else _0x9f4da6['_update'](_0x54d319,_0x340e2c);});}}},d),_0x3eed13);}['_enhanceShowRevisionViewerCallback'](){const _0x5978dc=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x5a937f=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x552b33=this['editor']['plugins']['get']('Autosave');await _0x552b33['save']();}else await _0x5a937f['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x1728c1=this['editor']['plugins']['get']('Dialog');_0x1728c1['isOpen']&&_0x1728c1['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0xac2d2d=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x3bc176 of _0xac2d2d)_0x3bc176['class']=_0x3bc176['class']?_0x3bc176['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x12d880=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x12d880&&_0x12d880['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x357c5e=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x357c5e&&_0x357c5e['setAttribute']('tabindex','-1');}}const _0x27da1f=this['_getRevisionViewerEditorConfig']();return _0x5978dc(_0x27da1f)['then'](_0x4b5bde=>{return(this['_viewerEditor']=_0x4b5bde,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),(this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']='none'),_0x4b5bde);})['catch'](_0x4fca9e=>(console['error'](_0x4fca9e),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0xa741ea=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>{if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['editor']['plugins']['has']('AITabs')){const _0x4b643b=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0xeb8d0e of _0x4b643b)_0xeb8d0e['class']='ck-tab-panel_disabled'===_0xeb8d0e['class']?'':_0xeb8d0e['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x46e95f=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x46e95f&&_0x46e95f['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x52e2d0=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x52e2d0&&_0x52e2d0['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0xa741ea(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x4b2904=this['editor']['plugins']['get']('Annotations');_0x4b2904['refreshVisibility'](),_0x4b2904['refreshPositioning']();}});});}['_showRevisionViewer'](_0xce72ef){const _0x3355b1=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x584313=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x235184=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return f['create'](_0x235184,_0xce72ef)['then'](_0x291ca9=>(_0x584313['style']['display']='block',_0x3355b1['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x291ca9));}['_closeRevisionViewer'](_0x25b953){const _0xa7e474=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0xa7e474['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x25b953['destroy']();}async['_restoreRevision'](_0x45b73e){const _0x2ad9f2=this['editor'],_0x45143b=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x573069=_0x2ad9f2['plugins']['get']('RevisionTracker'),_0x2c9ccb=_0x2ad9f2['plugins']['get']('RevisionHistoryUtils'),_0x46f86f=_0x45143b['repository']['getRevision'](_0x45b73e);let _0x3e4630,_0x20e647,_0x254973;try{await _0x2c9ccb['loadRevisionData'](_0x46f86f,this['adapter']),_0x3e4630=_0x2c9ccb['getRevisionDocumentData'](_0x46f86f),_0x20e647=_0x2c9ccb['getRevisionRootsAttributes'](_0x46f86f);}catch(_0x33418d){return void console['error'](_0x33418d);}_0x2ad9f2['model']['change'](_0x5547d4=>{for(const _0x2c7db2 of Array['from'](_0x2ad9f2['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x5547d4['removeMarker'](_0x2c7db2);}),_0x45143b['isReady']=!0x1,_0x2ad9f2['model']['enqueueChange'](_0x387ddf=>{_0x387ddf['setSelection'](null),_0x387ddf['removeSelectionAttribute'](_0x2ad9f2['model']['document']['selection']['getAttributeKeys']());const _0x440516=Object['keys'](_0x3e4630);for(const _0x3da25e of _0x2ad9f2['model']['document']['roots'])'$graveyard'!=_0x3da25e['rootName']&&_0x3da25e['isAttached']()&&!_0x440516['includes'](_0x3da25e['rootName'])&&_0x387ddf['detachRoot'](_0x3da25e);for(const _0x112070 of _0x440516){let _0x2b2f60=_0x2ad9f2['model']['document']['getRoot'](_0x112070);_0x2b2f60&&_0x2b2f60['isAttached']()||(_0x2b2f60=_0x387ddf['addRoot'](_0x112070));const _0x5dd270=_0x20e647[_0x112070],_0x1e77e4=Object['keys'](_0x5dd270),_0x69aecc=_0x3e4630[_0x112070];for(const _0x195799 of _0x2b2f60['getAttributeKeys']())_0x1e77e4['includes'](_0x195799)||_0x387ddf['removeAttribute'](_0x195799,_0x2b2f60);for(const _0x199726 of _0x1e77e4)_0x387ddf['setAttribute'](_0x199726,_0x20e647[_0x112070][_0x199726],_0x2b2f60);_0x387ddf['remove'](_0x387ddf['createRangeIn'](_0x2b2f60)),_0x387ddf['insert'](_0x2ad9f2['data']['parse'](_0x69aecc,_0x2b2f60),_0x2b2f60,0x0);}});const _0xe42191=m(_0x2ad9f2['locale'],'Restored');if(_0x46f86f['name'])_0x254973=-0x1==_0x46f86f['name']['indexOf'](_0xe42191)?_0xe42191+':\x20'+_0x46f86f['name']:_0x46f86f['name'];else _0x254973=_0xe42191+':\x20'+(_0x46f86f['createdAt']['toLocaleDateString'](_0x2ad9f2['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x46f86f['createdAt']['toLocaleTimeString'](_0x2ad9f2['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x573069['saveRevision']({'name':_0x254973}),_0x45143b['isReady']=!0x0,_0x2ad9f2['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{RestoreRevisionCommand,I as Revision,RevisionHistory,l as RevisionHistoryUI,$ as RevisionHistoryUtils,h as RevisionTracker,u as RevisionViewer,f as RevisionViewerEditor,RevisionViewerIntegration,Ri as RevisionViewerLoadingOverlay,v as RevisionViewerUI,S as RevisionsRepository,d as RevisionsSidebar,ShowChangeCommand};
29
+ nt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}constructor(_0x2769ad){super(_0x2769ad),this['_revisionViewer']=_0x2769ad['plugins']['get'](u),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x56f45d=this['_revisionsRepository']['_revisions'],_0x20d6ad=this['_createRevisionActions'](),_0x3d6b20=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new di(this['editor']['locale'],_0x56f45d,_0x20d6ad,this['editor']['config']['get']('revisionHistory.requireRevisionName')),this['_sidebarView']['on']('revisionSelected',this['_handleRevisionSelected']['bind'](this)),this['_sidebarView']['on']('revisionSetName',this['_handleRevisionSetName']['bind'](this)),this['_sidebarView']['bind']('isEnabled')['to'](this['_revisionViewer']),this['_sidebarView']['timePeriodViews']['on']('add',(_0x3f5d8b,_0x12065a)=>{_0x12065a['revisionViews']['on']('add',(_0x51abd6,_0x203797)=>{_0x203797['bind']('isEnabled','isReady')['to'](this['_revisionViewer']);});}),this['_sidebarView']['render'](),this['listenTo'](this['editor']['data'],'ready',this['_handleEditorDataReady']['bind'](this)),this['listenTo'](this['_revisionViewer'],'change:diff',this['_handleDiffChange']['bind'](this)),_0x3d6b20['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x403a32=this['_revisionsRepository']['getRevision'](0x0);if(_0x403a32){const _0x45f2b6=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x403a32['id']);this['_revisionViewer']['compare'](_0x403a32,_0x45f2b6);}}['_handleRevisionSelected'](_0x23dbc7,_0x37ca28){const _0xac4809=this['_revisionsRepository']['getRevision'](_0x37ca28['id']),_0x4d27ad=this['_revisionsRepository']['getEarlierVisibleRevision'](_0xac4809['id']);this['_revisionViewer']['compare'](_0xac4809,_0x4d27ad);}['_handleRevisionSetName'](_0x4bb051,_0x457dcb){this['_revisionsRepository']['getRevision'](_0x457dcb['id'])['setName'](_0x457dcb['name']);}['_handleDiffChange'](_0x3df817,_0x736cfe,_0xf58285){const _0xd5a897=this['_revisionsRepository']['getRevisionsInDiff'](_0xf58285);_0xd5a897['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0xd5a897),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0xd5a897[0x0]));}['_createRevisionActions'](){const _0x5944a9=this['editor'],_0x29f7a7=d['availableRevisionActions'],_0x4c9292=_0x5944a9['config']['get']('revisionHistory.revisionActions')||d['defaultRevisionActions'];if(_0x4c9292['length'])return _0x4c9292['map'](_0x526fbb=>{const _0x39329d='string'==typeof _0x526fbb?Object['assign']({},_0x29f7a7[_0x526fbb]):_0x526fbb;return _0x39329d['action']=_0x39329d['action']['bind'](this,_0x5944a9),_0x39329d['isVisible']&&(_0x39329d['isVisible']=_0x39329d['isVisible']['bind'](this,_0x5944a9)),_0x39329d;});}}function nt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x4b32ca},_0x30f138)=>{const _0x20e2bf=_0x4b32ca['get'](u),_0x3411e4=_0x20e2bf['repository'];let _0x414d33=_0x20e2bf['diff']['newRevisionId'],_0x170ef3=_0x30f138['id'];_0x3411e4['getIndex'](_0x414d33)>_0x3411e4['getIndex'](_0x170ef3)&&([_0x414d33,_0x170ef3]=[_0x170ef3,_0x414d33]),_0x20e2bf['compare'](_0x414d33,_0x170ef3);},'isVisible':({plugins:_0xeb8124},_0x4f3ab5)=>{const _0x2ce283=_0xeb8124['get'](u);return!(_0x2ce283['repository']['getRevisionsInDiff'](_0x2ce283['diff'])['length']>0x2)&&!_0x4f3ab5['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x2d1972,{id:_0xb5e199})=>{_0x2d1972['config']['get']('revisionHistory')['restoreRevisionCallback'](_0xb5e199);},'isVisible':({plugins:_0x1fdede},_0x455db9)=>!!_0x1fdede['get'](u)['repository']['getLaterVisibleRevision'](_0x455db9['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0xf1de76},{id:_0x57bf03,revisionNameView:_0x122715})=>{const _0x28e875=_0xf1de76['get'](u),_0x27fe5c=_0x28e875['repository']['getEarlierVisibleRevision'](_0x57bf03);_0x28e875['compare'](_0x57bf03,_0x27fe5c),_0x122715['focus'](),_0x122715['fieldView']['select']();}}};}class Y extends tt{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x4a6a47,_0x127b21){super(_0x4a6a47),this['_view']=_0x127b21,this['_toolbarConfig']=st(_0x4a6a47['config']['get']('toolbar')),this['_elementReplacer']=new it();}get['element'](){return this['view']['element'];}['init'](_0x2a9554){const _0x3f1ecf=this['editor'],_0x58116e=this['view'],_0x15d3d9=_0x3f1ecf['editing']['view'],_0x1cf4f1=_0x58116e['editable'],_0x26db21=_0x15d3d9['document']['getRoot']();_0x1cf4f1['name']=_0x26db21['rootName'],_0x58116e['render']();const _0x4f5c5a=_0x1cf4f1['element'];this['setEditableElement'](_0x1cf4f1['name'],_0x4f5c5a),_0x58116e['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x15d3d9['attachDomRoot'](_0x4f5c5a),this['_elementReplacer']['replace'](_0x2a9554,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x8c5ed2=this['view'],_0x5e3303=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x5e3303['detachDomRoot'](_0x8c5ed2['editable']['name']),_0x8c5ed2['destroy']();}['_initToolbar'](){const _0x4c4e93=this['view'];_0x4c4e93['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x4c4e93['stickyPanel']['limiterElement']=_0x4c4e93['element'],_0x4c4e93['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x36e723})=>_0x36e723),_0x4c4e93['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x4c4e93['toolbar']);}}class Z extends _0xcf5b0f{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x466d06,_0x13e810,_0x372a0a={}){super(_0x466d06),this['stickyPanel']=new _0x28f9b0(_0x466d06),this['toolbar']=new _0x5b821d(_0x466d06,{'shouldGroupWhenFull':_0x372a0a['shouldToolbarGroupWhenFull']}),this['_editable']=new te(_0x466d06,_0x13e810);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class f extends/* #__PURE__ -- @preserve */
30
+ _0x26fec2(_0x20711e){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x5b718d,_0x94cd3c){super(_0x94cd3c),this['sourceElement']=_0x5b718d,this['model']['document']['createRoot']();const _0x582a2f=new Z(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Y(this,_0x582a2f);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x178cc2,_0x26aecb){const _0x3a0872=new this(_0x178cc2,_0x26aecb);return await _0x3a0872['initPlugins'](),await _0x3a0872['ui']['init'](_0x178cc2),await _0x3a0872['data']['init'](_0x3a0872['config']['get']('initialData')||''),_0x3a0872['fire']('ready'),_0x3a0872;}}const p=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];class RevisionViewerIntegration extends _0x87a842{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xe0b14d){function _0x580cd3(_0x54c623){return _0x54c623['map'](_0x59625c=>String['fromCharCode'](_0x59625c))['join']('');}super(_0xe0b14d),this['result']='end',_0xe0b14d[_0x580cd3([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x580cd3([0x76,0x69,0x65,0x77])][_0x580cd3([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x580cd3([0x61,0x75,0x74,0x6f]),_0xe0b14d[_0x580cd3([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x580cd3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x580cd3([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x580cd3([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x580cd3([0x6f,0x6b])});}}class RevisionHistory extends _0x87a842{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h,l];}constructor(_0x5011d1){if(super(_0x5011d1),!this['editor']['config']['get']('revisionHistory'))throw new _0x540bc9('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0xb4305f=>this['_showRevisionViewer']({..._0xb4305f,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x44362c=>this['_closeRevisionViewer'](_0x44362c)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x4be899=>this['_restoreRevision'](_0x4be899)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x207f95){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x207f95;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x3188e9){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x3188e9);}['getRevision'](_0x201d32){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x201d32);}['getRevisions'](_0x3c4ac9){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x3c4ac9||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x46de93=this['editor'],_0x44a101=_0x274797(_0x46de93,p),_0x5632d2=_0x46de93['plugins']['get']('RevisionTracker'),_0xcc66e7=_0x46de93['plugins']['get']('Users')['users'];return _0x44a101['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x44a101['lazyRoots'],(_0x44a101['plugins']['push'](RevisionViewerIntegration,u,v,class RevisionViewerInit extends _0x87a842{static get['requires'](){return[u,'Users'];}['init'](){const _0x2e343c=this['editor']['plugins']['get']('Users');for(const _0x77fc16 of _0xcc66e7)_0x77fc16['isAnonymous']||_0x2e343c['getUser'](_0x77fc16['id'])||_0x2e343c['addUser'](_0x77fc16);const _0x54e410=_0x5632d2['repository']['getRevisions']();let _0x8070c7=null;const _0x23949d=this['editor']['plugins']['get']('RevisionViewer');_0x23949d['adapter']=_0x5632d2['adapter'],_0x23949d['bind']('isEnabled')['to'](_0x5632d2),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x46de93,'isReadOnly',_0x217bcd=>!_0x217bcd);for(const _0x3bd8ee of _0x54e410){const _0x279a97=null===_0x3bd8ee['creator'];if(_0x279a97&&_0x3bd8ee['toVersion']===_0x3bd8ee['fromVersion'])continue;const _0x37dd11=_0x3bd8ee['toJSON']();_0x23949d['addRevisionData'](_0x37dd11,(_0x5ce1c1,_0x621b7c,_0x7635d)=>{if(_0x279a97){if(_0x8070c7)_0x8070c7['_update'](_0x5ce1c1,_0x621b7c);else{if(!_0x621b7c){const _0x5b2510=_0x7635d['toJSON']();_0x5b2510['id']=_0x3d9671(),_0x5632d2['saveRevision'](_0x5b2510,_0x7635d['toVersion'])['then'](_0x1dfe45=>{_0x8070c7=_0x1dfe45;});}}}else _0x3bd8ee['_update'](_0x5ce1c1,_0x621b7c);});}}},d),_0x44a101);}['_enhanceShowRevisionViewerCallback'](){const _0x3da93c=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x51f9e0=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x18b585=this['editor']['plugins']['get']('Autosave');await _0x18b585['save']();}else await _0x51f9e0['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x17755c=this['editor']['plugins']['get']('Dialog');_0x17755c['isOpen']&&_0x17755c['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x27bbf8=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x46cb17 of _0x27bbf8)_0x46cb17['class']=_0x46cb17['class']?_0x46cb17['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x4a2196=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x4a2196&&_0x4a2196['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0xf2f274=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0xf2f274&&_0xf2f274['setAttribute']('tabindex','-1');}}const _0x51ea88=this['_getRevisionViewerEditorConfig']();return _0x3da93c(_0x51ea88)['then'](_0x342920=>{return(this['_viewerEditor']=_0x342920,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),(this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']='none'),_0x342920);})['catch'](_0x552674=>(console['error'](_0x552674),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x40af8f=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>{if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['editor']['plugins']['has']('AITabs')){const _0x5202ef=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x459e9c of _0x5202ef)_0x459e9c['class']='ck-tab-panel_disabled'===_0x459e9c['class']?'':_0x459e9c['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x4f01ee=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x4f01ee&&_0x4f01ee['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x389d9f=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x389d9f&&_0x389d9f['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x40af8f(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x2b39ff=this['editor']['plugins']['get']('Annotations');_0x2b39ff['refreshVisibility'](),_0x2b39ff['refreshPositioning']();}});});}['_showRevisionViewer'](_0x48aff2){const _0x2a9b08=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x21a403=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x9c822f=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return f['create'](_0x9c822f,_0x48aff2)['then'](_0x139572=>(_0x21a403['style']['display']='block',_0x2a9b08['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x139572));}['_closeRevisionViewer'](_0x9155ab){const _0x4c9295=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x4c9295['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x9155ab['destroy']();}async['_restoreRevision'](_0xef0b8d){const _0x5b49a1=this['editor'],_0xccb127=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x71fd11=_0x5b49a1['plugins']['get']('RevisionTracker'),_0x111b4a=_0x5b49a1['plugins']['get']('RevisionHistoryUtils'),_0x16aace=_0xccb127['repository']['getRevision'](_0xef0b8d);let _0x31e18c,_0x11888d,_0x4c0168;try{await _0x111b4a['loadRevisionData'](_0x16aace,this['adapter']),_0x31e18c=_0x111b4a['getRevisionDocumentData'](_0x16aace),_0x11888d=_0x111b4a['getRevisionRootsAttributes'](_0x16aace);}catch(_0x4e56ed){return void console['error'](_0x4e56ed);}_0x5b49a1['model']['change'](_0x591295=>{for(const _0x3532d5 of Array['from'](_0x5b49a1['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x591295['removeMarker'](_0x3532d5);}),_0xccb127['isReady']=!0x1,_0x5b49a1['model']['enqueueChange'](_0x2734c2=>{_0x2734c2['setSelection'](null),_0x2734c2['removeSelectionAttribute'](_0x5b49a1['model']['document']['selection']['getAttributeKeys']());const _0x4e2d78=Object['keys'](_0x31e18c);for(const _0x39ac10 of _0x5b49a1['model']['document']['roots'])'$graveyard'!=_0x39ac10['rootName']&&_0x39ac10['isAttached']()&&!_0x4e2d78['includes'](_0x39ac10['rootName'])&&_0x2734c2['detachRoot'](_0x39ac10);for(const _0x5a0b42 of _0x4e2d78){let _0x58397e=_0x5b49a1['model']['document']['getRoot'](_0x5a0b42);_0x58397e&&_0x58397e['isAttached']()||(_0x58397e=_0x2734c2['addRoot'](_0x5a0b42));const _0x2a18ac=_0x11888d[_0x5a0b42],_0x4870a7=Object['keys'](_0x2a18ac),_0x5c2a47=_0x31e18c[_0x5a0b42];for(const _0xb0442b of _0x58397e['getAttributeKeys']())_0x4870a7['includes'](_0xb0442b)||_0x2734c2['removeAttribute'](_0xb0442b,_0x58397e);for(const _0x264961 of _0x4870a7)_0x2734c2['setAttribute'](_0x264961,_0x11888d[_0x5a0b42][_0x264961],_0x58397e);_0x2734c2['remove'](_0x2734c2['createRangeIn'](_0x58397e)),_0x2734c2['insert'](_0x5b49a1['data']['parse'](_0x5c2a47,_0x58397e),_0x58397e,0x0);}});const _0x203860=m(_0x5b49a1['locale'],'Restored');if(_0x16aace['name'])_0x4c0168=-0x1==_0x16aace['name']['indexOf'](_0x203860)?_0x203860+':\x20'+_0x16aace['name']:_0x16aace['name'];else _0x4c0168=_0x203860+':\x20'+(_0x16aace['createdAt']['toLocaleDateString'](_0x5b49a1['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x16aace['createdAt']['toLocaleTimeString'](_0x5b49a1['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x71fd11['saveRevision']({'name':_0x4c0168}),_0xccb127['isReady']=!0x0,_0x5b49a1['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{RestoreRevisionCommand,I as Revision,RevisionHistory,l as RevisionHistoryUI,$ as RevisionHistoryUtils,h as RevisionTracker,u as RevisionViewer,f as RevisionViewerEditor,RevisionViewerIntegration,Ri as RevisionViewerLoadingOverlay,v as RevisionViewerUI,S as RevisionsRepository,d as RevisionsSidebar,ShowChangeCommand};