@ckeditor/ckeditor5-revision-history 0.0.0-nightly-20250210.0 → 0.0.0-nightly-next-20250211.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 (183) hide show
  1. package/LICENSE.md +1 -1
  2. package/build/revision-history.js +1 -1
  3. package/ckeditor5-metadata.json +1 -1
  4. package/dist/index.js +6 -6
  5. package/dist/translations/af.js +1 -1
  6. package/dist/translations/af.umd.js +1 -1
  7. package/dist/translations/ar.js +1 -1
  8. package/dist/translations/ar.umd.js +1 -1
  9. package/dist/translations/ast.js +1 -1
  10. package/dist/translations/ast.umd.js +1 -1
  11. package/dist/translations/az.js +1 -1
  12. package/dist/translations/az.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 -11
  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/revisionsrepository.js +1 -1
  159. package/src/revisiontracker.js +1 -1
  160. package/src/revisionviewer.js +1 -1
  161. package/src/ui/revision/createrevisionactionsdropdown.js +1 -1
  162. package/src/ui/revision/revisionauthorview.js +1 -1
  163. package/src/ui/revision/revisionnameview.js +1 -1
  164. package/src/ui/revision/revisionview.js +2 -2
  165. package/src/ui/revision/subrevisioncollapserview.js +1 -1
  166. package/src/ui/revision/subrevisionview.js +1 -1
  167. package/src/ui/revision/utils.js +1 -1
  168. package/src/ui/revisionhistory/revisionhistorysaverevisionformview.js +1 -1
  169. package/src/ui/revisionhistory/revisionhistoryui.js +1 -1
  170. package/src/ui/revisionssidebar/revisionssidebar.js +1 -1
  171. package/src/ui/revisionssidebar/revisionssidebarheaderview.js +1 -1
  172. package/src/ui/revisionssidebar/revisionssidebartimeperiodview.js +1 -1
  173. package/src/ui/revisionssidebar/revisionssidebarview.js +1 -1
  174. package/src/ui/revisionssidebar/utils.js +1 -1
  175. package/src/ui/revisionviewer/changedetailsview.js +1 -1
  176. package/src/ui/revisionviewer/changesnavigationview.js +1 -1
  177. package/src/ui/revisionviewer/revisionviewerloadingoverlay.js +1 -1
  178. package/src/ui/revisionviewer/revisionviewerui.js +1 -1
  179. package/src/utils/common-translations.js +1 -1
  180. package/theme/icons/arrow-down.svg +0 -1
  181. package/theme/icons/arrow-up.svg +0 -1
  182. package/theme/icons/revision-history.svg +0 -1
  183. package/theme/icons/user.svg +0 -1
package/dist/index.js CHANGED
@@ -20,10 +20,10 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{ObservableMixin as _0x11050d,uid as _0x2afce3,Collection as _0x4043e7,logWarning as _0x427f80,FocusTracker as _0x32c628,KeystrokeHandler as _0x29befb,scrollViewportToShowTarget as _0x2b0941,ResizeObserver as at,ElementReplacer as ht,CKEditorError as _0x3a4067}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0xf117d4,set as _0x2b284e,unset as _0xd56d5a,isEqual as _0x442ae4}from'lodash-es';import{Plugin as _0x21f9a0,PendingActions as _0x44da30,icons as _0x7e0d0d,Command as _0x24f189,ElementApiMixin as it,Editor as tt}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x36bdfa,getMarkerDomElement as _0x93a8c4,ConfirmMixin as _0x27f092,sanitizeEditorConfig as _0x31b91b}from'ckeditor5-collaboration/dist/index.js';import{ViewDocumentFragment as _0x35a7c1,Element as ft,Range as vt,ViewUIElement as _0x3c991b,ViewRawElement as _0x4126a5,ViewEmptyElement as _0x2e2901,ViewAttributeElement as _0x2d478c,ViewContainerElement as _0x40e8e0,Position as gt,ViewText as _0xd0ebb3,ViewElement as _0x1fc26e,DocumentFragment as mt,Text as wt}from'@ckeditor/ckeditor5-engine/dist/index.js';import{View as _0x16162e,injectCssTransitionDisabler as ts,submitHandler as _0x4f1d3f,LabeledFieldView as nt,createLabeledInputText as _0x194c4c,createDropdown as _0x18051a,ListView as te,ListItemView as _0x3cf401,ButtonView as _0x280a4e,MenuBarMenuView as _0x1ae8fc,MenuBarMenuListView as _0x1e1704,MenuBarMenuListItemView as _0xe81ca7,MenuBarMenuListItemButtonView as _0x3601a1,ContextualBalloon as _0x24fa0b,ToolbarSeparatorView as _0x5d7297,IconView as _0x191733,addListToDropdown as _0x2f39dd,ViewModel as to,EditorUI as st,normalizeToolbarConfig as ot,BoxedEditorUIView as ct,StickyPanelView as ut,ToolbarView as lt,InlineEditableUIView as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x313a70}from'luxon';class a extends/* #__PURE__ -- @preserve */
24
- _0x11050d(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x5acba8){super(),this['id']=_0x5acba8['id']||_0x2afce3(),this['creator']=_0x5acba8['creator']||null,this['authors']=_0x5acba8['authors']||[],this['diffData']=_0x5acba8['diffData']||null,this['toVersion']=_0x5acba8['toVersion']||0x0,this['fromVersion']=_0x5acba8['fromVersion']||0x0,this['set']('name',_0x5acba8['name']||''),this['set']('createdAt',_0x5acba8['createdAt']||new Date()),this['set']('attributes',_0x5acba8['attributes']||{});}['setName'](_0x34b3bf){this['_update']({'name':_0x34b3bf});}['setAttribute'](_0x357e23,_0x346792){const _0x3f4320=_0xf117d4(this['attributes']);_0x2b284e(_0x3f4320,_0x357e23,_0x346792),this['_update']({'attributes':_0x3f4320});}['removeAttribute'](_0x298a44){const _0x4eab7f=_0xf117d4(this['attributes']);_0xd56d5a(_0x4eab7f,_0x298a44),this['_update']({'attributes':_0x4eab7f});}['_update'](_0x575870,_0x34f41e=!0x1){let _0x18accb=!0x1;const _0x9f9a={'id':this['id']},_0x1c68a7=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x36a000 of _0x1c68a7){const _0x4cd782=_0x575870[_0x36a000];void 0x0!==_0x4cd782&&_0x4cd782!==this[_0x36a000]&&(this[_0x36a000]=_0x4cd782,_0x9f9a[_0x36a000]=_0x4cd782,_0x18accb=!0x0);}_0x18accb&&(_0x9f9a['authors']&&(_0x9f9a['authorsIds']=_0x9f9a['authors']['map'](_0x1e0fef=>_0x1e0fef['id']),delete _0x9f9a['authors']),this['fire']('_update',_0x9f9a,_0x34f41e));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x3933ef=>_0x3933ef['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class j extends _0x21f9a0{['_revisions'];static get['requires'](){return[_0x36bdfa];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x7d2863){super(_0x7d2863),this['_revisions']=new _0x4043e7();}['afterInit'](){!async function(_0x1a7981){const _0x42ff66=_0x5f8285([0x52,0x6a,0x47,0x48,0x4b,0x39,0x46,0x4d,0x4c,0x45,0x59,0x49,0x75,0x56,0x76,0x31,0x68,0x6e,0x6c,0x77,0x51,0x33,0x78,0x73,0x41,0x6b,0x55,0x50,0x38,0x6f,0x79,0x6d,0x67,0x37,0x63,0x62,0x4e,0x71,0x44,0x58,0x64,0x72,0x54,0x69,0x61,0x43,0x65,0x57,0x74,0x30,0x32,0x70,0x4a,0x4f,0x66,0x34,0x36,0x5a,0x53,0x35,0x7a,0x42]),_0x2bc433=0xeb829,_0xbfa087=0x207f3ad7,_0x5de85b=0x207865cf^_0xbfa087,_0x27fcbf=window[_0x5f8285([0x44,0x61,0x74,0x65])][_0x5f8285([0x6e,0x6f,0x77])](),_0x2a6b37=_0x1a7981[_0x5f8285([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x5bc7f9=new window[(_0x5f8285([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x58a3ed=>{_0x2a6b37[_0x5f8285([0x6f,0x6e,0x63,0x65])](_0x5f8285([0x72,0x65,0x61,0x64,0x79]),_0x58a3ed);}),_0x21fbff={[_0x5f8285([0x6b,0x74,0x79])]:_0x5f8285([0x45,0x43]),[_0x5f8285([0x75,0x73,0x65])]:_0x5f8285([0x73,0x69,0x67]),[_0x5f8285([0x63,0x72,0x76])]:_0x5f8285([0x50,0x2d,0x32,0x35,0x36]),[_0x5f8285([0x78])]:_0x5f8285([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]),[_0x5f8285([0x79])]:_0x5f8285([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]),[_0x5f8285([0x61,0x6c,0x67])]:_0x5f8285([0x45,0x53,0x32,0x35,0x36])},_0x39fab8=_0x2a6b37[_0x5f8285([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5f8285([0x67,0x65,0x74])](_0x5f8285([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3fb5ff(){let _0x114742,_0x3eef79=null,_0x1731c7=null;try{if(_0x39fab8==_0x5f8285([0x47,0x50,0x4c]))return _0x5f8285([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x114742=_0x5498bb(),!_0x114742)return _0x5f8285([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x114742[_0x5f8285([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1731c7=_0x777b4(_0x114742[_0x5f8285([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x114742[_0x5f8285([0x6a,0x74,0x69])])),await _0xfb13f3()?_0x3f1c17()?_0x4e5dfd()?_0x5f8285([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x3c7985()?(_0x114742[_0x5f8285([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5f8285([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x3eef79=_0x4db6a5(_0x5f8285([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x114742[_0x5f8285([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5f8285([0x74,0x72,0x69,0x61,0x6c])&&(_0x3eef79=_0x4db6a5(_0x5f8285([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x40b424()):_0x5f8285([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5f8285([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5f8285([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x4db6f9){return _0x5f8285([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4e5dfd(){const _0x4cb7ad=[_0x5f8285([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5f8285([0x74,0x72,0x69,0x61,0x6c])][_0x5f8285([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x114742[_0x5f8285([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x27fcbf/0x3e8:0xe10*_0x5de85b;return _0x114742[_0x5f8285([0x65,0x78,0x70])]<_0x4cb7ad;}function _0x3f1c17(){const _0x29c4d0=_0x114742[_0x5f8285([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x29c4d0)return!0x1;if(_0x29c4d0[_0x5f8285([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5f8285([0x2a])))return!0x0;if(_0x29c4d0[_0x5f8285([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5f8285([0x52,0x48])))return!0x0;if(_0x29c4d0[_0x5f8285([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5f8285([0x52,0x52,0x48]))){if(_0x572395())return!0x0;if(_0x3ab80e()||_0x1b4eef())return!0x0;}return!0x1;}function _0x3c7985(){const _0x10b519=_0x114742[_0x5f8285([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x10b519||0x0==_0x10b519[_0x5f8285([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2aa469}=new URL(window[_0x5f8285([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x10b519[_0x5f8285([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2aa469))return!0x0;const _0x333b3a=_0x2aa469[_0x5f8285([0x73,0x70,0x6c,0x69,0x74])](_0x5f8285([0x2e]));return _0x10b519[_0x5f8285([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5f4651=>_0x5f4651[_0x5f8285([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5f8285([0x2a])))[_0x5f8285([0x6d,0x61,0x70])](_0x36c58c=>_0x36c58c[_0x5f8285([0x73,0x70,0x6c,0x69,0x74])](_0x5f8285([0x2e])))[_0x5f8285([0x73,0x6f,0x6d,0x65])](_0x1f9075=>_0x333b3a[_0x5f8285([0x65,0x76,0x65,0x72,0x79])]((_0x264bc0,_0x82d40c)=>_0x1f9075[_0x82d40c]===_0x264bc0||_0x1f9075[_0x82d40c]===_0x5f8285([0x2a])));}function _0x40b424(){return _0x3eef79&&_0x1731c7?new window[(_0x5f8285([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x22b7de,_0x3b41ed)=>{_0x3eef79[_0x5f8285([0x74,0x68,0x65,0x6e])](_0x22b7de,_0x3b41ed),_0x1731c7[_0x5f8285([0x74,0x68,0x65,0x6e])](_0x33ebcd=>{_0x33ebcd!=_0x5f8285([0x56,0x61,0x6c,0x69,0x64])&&_0x22b7de(_0x33ebcd);},_0x3b41ed);}):_0x3eef79||_0x1731c7||_0x5f8285([0x56,0x61,0x6c,0x69,0x64]);}}function _0x777b4(_0x582906,_0x145509){return new window[(_0x5f8285([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1e31ff=>{if(_0x2472ed())return _0x1e31ff(_0x5f8285([0x56,0x61,0x6c,0x69,0x64]));_0x200e95(),_0x2a6b37[_0x5f8285([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5f8285([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x40fa96=!0x1;const _0x25dd4e=_0x2afce3();function _0x302151(_0x8f54b6){return!!_0x8f54b6&&(typeof _0x8f54b6===_0x5f8285([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x8f54b6===_0x5f8285([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x8f54b6[_0x5f8285([0x74,0x68,0x65,0x6e])]===_0x5f8285([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x8f54b6[_0x5f8285([0x63,0x61,0x74,0x63,0x68])]===_0x5f8285([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xdc749(_0xd85fb1){_0xd8beda(_0xd85fb1)[_0x5f8285([0x74,0x68,0x65,0x6e])](_0x5dcd01=>{if(!_0x5dcd01||_0x5dcd01[_0x5f8285([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5f8285([0x6f,0x6b]))return _0x5f8285([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4a578a(_0x28ea82(_0x25dd4e+_0x145509))!=_0x5dcd01[_0x5f8285([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5f8285([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5f8285([0x56,0x61,0x6c,0x69,0x64]);})[_0x5f8285([0x74,0x68,0x65,0x6e])](_0x57417d=>(_0x4e12d8(),_0x57417d),()=>{const _0xce7aeb=_0x2ce165();return null==_0xce7aeb?(_0x4e12d8(),_0x5f8285([0x56,0x61,0x6c,0x69,0x64])):_0x5f8285(_0x27fcbf-_0xce7aeb>(0x473bed7^_0xbfa087)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5f8285([0x74,0x68,0x65,0x6e])](_0x1e31ff)[_0x5f8285([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1e31ff(_0x5f8285([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x200f1f=0x2049d457^_0xbfa087;function _0x4e12d8(){const _0x22cd92=_0x5f8285([0x6c,0x6c,0x63,0x74,0x2d])+_0x4a578a(_0x28ea82(_0x582906)),_0x21615f=_0x4a80e2(_0x4a578a(window[_0x5f8285([0x4d,0x61,0x74,0x68])][_0x5f8285([0x63,0x65,0x69,0x6c])](_0x27fcbf/_0x200f1f)));window[_0x5f8285([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5f8285([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x22cd92,_0x21615f);}function _0x2ce165(){const _0x2f1f96=_0x5f8285([0x6c,0x6c,0x63,0x74,0x2d])+_0x4a578a(_0x28ea82(_0x582906)),_0x4549f9=window[_0x5f8285([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5f8285([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2f1f96);return _0x4549f9?window[_0x5f8285([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4a80e2(_0x4549f9),0x10)*_0x200f1f:null;}function _0xd8beda(_0x41c7d4){return new window[(_0x5f8285([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x43dccd,_0x26b417)=>{_0x41c7d4[_0x5f8285([0x74,0x68,0x65,0x6e])](_0x43dccd,_0x26b417),window[_0x5f8285([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x26b417,0x207eee17^_0xbfa087);});}}_0x2a6b37[_0x5f8285([0x6f,0x6e])](_0x5f8285([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x11fb2c,_0x44c66f)=>{if(_0x44c66f[0x0]!=_0x582906)return _0x1e31ff(_0x5f8285([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x44c66f[0x1]={..._0x44c66f[0x1],[_0x5f8285([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x25dd4e};},{[_0x5f8285([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5f8285([0x68,0x69,0x67,0x68])}),_0x2a6b37[_0x5f8285([0x6f,0x6e])](_0x5f8285([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2059f5=>{_0x302151(_0x2059f5[_0x5f8285([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x40fa96=!0x0,_0xdc749(_0x2059f5[_0x5f8285([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5f8285([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5f8285([0x6c,0x6f,0x77])}),_0x5bc7f9[_0x5f8285([0x74,0x68,0x65,0x6e])](()=>{_0x40fa96||_0x1e31ff(_0x5f8285([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2472ed(){return _0x2a6b37[_0x5f8285([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5f8285([0x76,0x69,0x65,0x77])][_0x5f8285([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5f8285([0x61,0x75,0x74,0x6f]);}function _0x200e95(){_0x2a6b37[_0x5f8285([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5f8285([0x76,0x69,0x65,0x77])][_0x5f8285([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5f8285([0x61,0x75,0x74,0x6f]);}}function _0x4db6a5(_0x4e9c53){const _0x1d9c4f=[new window[(_0x5f8285([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3ba2e3=>setTimeout(_0x3ba2e3,0x2076041b^_0xbfa087)),_0x5bc7f9[_0x5f8285([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5f8285([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x568280=>{const _0x21d653=0x207f3ad0^_0xbfa087,_0x692b05=_0x1a7981[_0x5f8285([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x27f2c9(){_0x692b05[_0x5f8285([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x21d653&&_0x568280();}_0x27f2c9(),_0x692b05[_0x5f8285([0x6f,0x6e])](_0x5f8285([0x61,0x64,0x64]),_0x27f2c9);})),new window[(_0x5f8285([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x347931=>{function _0x443518(){for(const _0x576c12 in window)if(window[_0x5f8285([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x5f8285([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x576c12))&&window[_0x576c12]==_0x2bc433)return _0x347931();_0x2a6b37[_0x5f8285([0x73,0x74,0x61,0x74,0x65])]!=_0x5f8285([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x5f8285([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x443518,0x207f295f^_0xbfa087);}_0x5b68df(_0x5f8285([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x443518();})];return window[_0x5f8285([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5f8285([0x72,0x61,0x63,0x65])](_0x1d9c4f)[_0x5f8285([0x74,0x68,0x65,0x6e])](()=>_0x4e9c53);}async function _0x1c1026(){if(await _0x5bc7f9,_0x5b68df(_0x5f8285([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x56c5ca=_0x1a7981[_0x5f8285([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0xfda0d9=_0x1a7981[_0x5f8285([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])](_0x56c5ca[_0x5f8285([0x69,0x64])]),_0x1b87e7=_0x4dd246(_0x5f8285([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x1b87e7[_0x5f8285([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x56c5ca['id'],_0xfda0d9?_0xfda0d9['id']:null,!0x0),_0x1b87e7[_0x5f8285([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x5f8285([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x1b87e7[_0x5f8285([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x1b87e7[_0x5f8285([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x463fc9,void(_0x1b87e7[_0x5f8285([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x463fc9);}if(_0x5b68df(_0x5f8285([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x261621=_0x4dd246(_0x5f8285([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x261621[_0x5f8285([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x5f8285([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x261621[_0x5f8285([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x261621[_0x5f8285([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x463fc9,_0x261621[_0x5f8285([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x463fc9;}_0x2a6b37[_0x5f8285([0x6d,0x6f,0x64,0x65,0x6c])][_0x5f8285([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x463fc9,_0x2a6b37[_0x5f8285([0x6d,0x6f,0x64,0x65,0x6c])][_0x5f8285([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x463fc9,_0x2a6b37[_0x5f8285([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5f8285([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x572395(){return _0x5b68df(_0x5f8285([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x4dd246(_0x5f8285([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x5f8285([0x73,0x74,0x61,0x74,0x65])]==_0x5f8285([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x3ab80e(){return _0x5b68df(_0x5f8285([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 _0x1b4eef(){return _0x5b68df(_0x5f8285([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x59952b(_0xacc09a){const _0x4e58e7=_0x2e6f99();_0x2a6b37[_0x4e58e7]=_0x5f8285([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])+_0xacc09a,_0xacc09a[_0x5f8285([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x5f8285([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x2e6f99()]=_0x2bc433),_0xacc09a!=_0x5f8285([0x56,0x61,0x6c,0x69,0x64])&&_0x1c1026();}function _0x2e6f99(){const _0x3c3ffa=window[_0x5f8285([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5f8285([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5f8285([0x6e,0x6f,0x77])]())[_0x5f8285([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5f8285([0x2e]),'');let _0x71152f=_0x5f8285([0x52]);for(let _0x5beb3a=0x0;_0x5beb3a<_0x3c3ffa[_0x5f8285([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5beb3a+=0x2){let _0x581edd=window[_0x5f8285([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3c3ffa[_0x5f8285([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5beb3a,_0x5beb3a+0x2));_0x581edd>=_0x42ff66[_0x5f8285([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x581edd-=_0x42ff66[_0x5f8285([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x71152f+=_0x42ff66[_0x581edd];}return _0x71152f;}function _0x5498bb(){const _0x5d80d3=_0x39fab8[_0x5f8285([0x73,0x70,0x6c,0x69,0x74])](_0x5f8285([0x2e]));if(0x3!=_0x5d80d3[_0x5f8285([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2e707e(_0x5d80d3[0x1]);function _0x2e707e(_0x2b29f7){const _0x33fefb=_0x569122(_0x2b29f7);return _0x33fefb&&_0x48fc06()?_0x33fefb:null;function _0x48fc06(){const _0x5151d2=_0x33fefb[_0x5f8285([0x6a,0x74,0x69])],_0x366f8a=window[_0x5f8285([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5151d2[_0x5f8285([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5151d2[_0x5f8285([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x35f40e={..._0x33fefb,[_0x5f8285([0x6a,0x74,0x69])]:_0x5151d2[_0x5f8285([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x5151d2[_0x5f8285([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x35f40e[_0x5f8285([0x76,0x63])],_0x28ea82(_0x35f40e)==_0x366f8a;}}}async function _0xfb13f3(){let _0x1a915a=!0x0;try{const _0x1cb655=_0x39fab8[_0x5f8285([0x73,0x70,0x6c,0x69,0x74])](_0x5f8285([0x2e])),[_0x462ec4,_0x4bf3ff,_0x1870cf]=_0x1cb655;return _0x537ff6(_0x462ec4),await _0x332787(_0x462ec4,_0x4bf3ff,_0x1870cf),_0x1a915a;}catch(_0x4a9334){return!0x1;}function _0x537ff6(_0x16c9ab){const _0x1d965b=_0x569122(_0x16c9ab);_0x1d965b&&_0x1d965b[_0x5f8285([0x61,0x6c,0x67])]==_0x5f8285([0x45,0x53,0x32,0x35,0x36])||(_0x1a915a=!0x1);}async function _0x332787(_0xde3f37,_0x3b4aad,_0x4ffde2){const _0x38a55c=window[_0x5f8285([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5f8285([0x66,0x72,0x6f,0x6d])](_0x514988(_0x4ffde2),_0x4a40aa=>_0x4a40aa[_0x5f8285([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x9bee26=new window[(_0x5f8285([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5f8285([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0xde3f37+_0x5f8285([0x2e])+_0x3b4aad),_0x4c3ca6=window[_0x5f8285([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5f8285([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x4c3ca6)return;const _0x5be419=await _0x4c3ca6[_0x5f8285([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5f8285([0x6a,0x77,0x6b]),_0x21fbff,{[_0x5f8285([0x6e,0x61,0x6d,0x65])]:_0x5f8285([0x45,0x43,0x44,0x53,0x41]),[_0x5f8285([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5f8285([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5f8285([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x4c3ca6[_0x5f8285([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5f8285([0x6e,0x61,0x6d,0x65])]:_0x5f8285([0x45,0x43,0x44,0x53,0x41]),[_0x5f8285([0x68,0x61,0x73,0x68])]:{[_0x5f8285([0x6e,0x61,0x6d,0x65])]:_0x5f8285([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x5be419,_0x38a55c,_0x9bee26)||(_0x1a915a=!0x1);}}function _0x569122(_0x223c60){return _0x223c60[_0x5f8285([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5f8285([0x65,0x79]))?JSON[_0x5f8285([0x70,0x61,0x72,0x73,0x65])](_0x514988(_0x223c60)):null;}function _0x514988(_0x166779){return window[_0x5f8285([0x61,0x74,0x6f,0x62])](_0x166779[_0x5f8285([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5f8285([0x2b]))[_0x5f8285([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5f8285([0x2f])));}function _0x28ea82(_0x53816a){let _0x64407b=0x1505;function _0x1a0967(_0x8a5b25){for(let _0x54caa3=0x0;_0x54caa3<_0x8a5b25[_0x5f8285([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x54caa3++){const _0x5608d0=_0x8a5b25[_0x5f8285([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x54caa3);_0x64407b=(_0x64407b<<0x5)+_0x64407b+_0x5608d0,_0x64407b&=_0x64407b;}}function _0x2daf96(_0x3aa445){Array[_0x5f8285([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x3aa445)?_0x3aa445[_0x5f8285([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2daf96):_0x3aa445&&typeof _0x3aa445==_0x5f8285([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5f8285([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x3aa445)[_0x5f8285([0x73,0x6f,0x72,0x74])]()[_0x5f8285([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x367b32,_0x3b077e])=>{_0x1a0967(_0x367b32),_0x2daf96(_0x3b077e);}):_0x1a0967(window[_0x5f8285([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x3aa445));}return _0x2daf96(_0x53816a),_0x64407b>>>0x0;}function _0x4a578a(_0x476ce5){return _0x476ce5[_0x5f8285([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5f8285([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5f8285([0x30]));}function _0x4a80e2(_0x2c24bf){return _0x2c24bf[_0x5f8285([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5f8285([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5f8285([0x6a,0x6f,0x69,0x6e])]('');}function _0x5b68df(_0x2aa96b){return _0x2a6b37[_0x5f8285([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5f8285([0x68,0x61,0x73])](_0x2aa96b);}function _0x4dd246(_0x343c71){return _0x2a6b37[_0x5f8285([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5f8285([0x67,0x65,0x74])](_0x343c71);}function _0x463fc9(){}function _0x5f8285(_0x5e2a10){return _0x5e2a10['map'](_0x335fd3=>String['fromCharCode'](_0x335fd3))['join']('');}_0x59952b(await _0x3fb5ff());}(this);}['createRevision'](_0x5b7537){const _0x104c6d=this['editor']['plugins']['get']('Users');return new a({'id':_0x5b7537['id'],'name':_0x5b7537['name'],'creator':_0x5b7537['creatorId']?_0x104c6d['getUser'](_0x5b7537['creatorId']):null,'diffData':_0x5b7537['diffData']||_0x5b7537['data'],'authors':_0x5b7537['authorsIds']['map'](_0x5d6153=>_0x104c6d['getUser'](_0x5d6153)),'createdAt':new Date(_0x5b7537['createdAt']),'attributes':_0x5b7537['attributes'],'fromVersion':_0x5b7537['fromVersion'],'toVersion':_0x5b7537['toVersion']});}['addRevision'](_0x378478,_0x11fb7c=0x0){this['_revisions']['add'](_0x378478,_0x11fb7c);}['getRevision'](_0x1881be){return this['_revisions']['get'](_0x1881be);}['getRevisions'](_0x281efa={'toJSON':!0x1}){const _0x4b9648=Array['from'](this['_revisions']);return _0x4b9648['reverse'](),_0x281efa['toJSON']?_0x4b9648['map'](_0x4d0a4f=>_0x4d0a4f['toJSON']()):_0x4b9648;}['getIndex'](_0x3b64f0){return this['_revisions']['getIndex'](_0x3b64f0);}['getEarlierVisibleRevision'](_0x1ea831){const [,_0x15a7e7]=this['getRevisionsIterator'](_0x1ea831,{'direction':'earlier'});return _0x15a7e7;}['getLaterVisibleRevision'](_0x265d90){const [,_0x2e5386]=this['getRevisionsIterator'](_0x265d90,{'direction':'later'});return _0x2e5386;}['getRevisionsInDiff'](_0x542d2c){const _0x4be37d=[];for(const _0x4bd504 of this['getRevisionsIterator'](_0x542d2c['newRevisionId']))if(_0x4be37d['push'](_0x4bd504),_0x4bd504['id']===_0x542d2c['oldRevisionId'])break;return _0x4be37d;}*['getRevisionsIterator'](_0x4f6c8c,{direction:_0x5be6fc='earlier',filter:_0x20aff3=()=>!0x0}={}){const _0x67caba='earlier'===_0x5be6fc?0x1:-0x1;let _0x43759f=this['_revisions']['get'](_0x4f6c8c),_0x2613d9=this['getIndex'](_0x43759f);for(yield _0x43759f;_0x43759f;){if(_0x2613d9+=_0x67caba,_0x43759f=this['getRevision'](_0x2613d9),!_0x43759f)return;_0x20aff3(_0x43759f)&&(yield _0x43759f);}}}function m(_0x33d9e3,_0x2e19cd,_0x461b18){const t=_0x33d9e3['t'];switch(_0x2e19cd){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'},_0x461b18);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x461b18);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'';}}const P={'c':_0x40e8e0,'a':_0x2d478c,'e':_0x2e2901,'r':_0x4126a5,'u':_0x3c991b};class l extends _0x21f9a0{['licenseKey'];['_licenseKeyCheckInterval'];['adapter'];['currentRevision'];['repository'];['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x36bdfa,j,_0x44da30];}constructor(_0x184e7b){super(_0x184e7b),this['adapter']=null,this['currentRevision']=null,this['_revisionDataBuilder']=new V(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x38f307=_0x2afce3();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x38f307},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['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x2f327d=this['repository']['getRevision'](0x0),_0x3b1d1c=_0x2f327d&&null===_0x2f327d['creator']?_0x2f327d:null;if(this['_continueCurrentRevision']=!!_0x3b1d1c&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x5aa583=this['_source']['getCurrentRevisionId'](),_0x4c1e6e=this['repository']['getRevision'](_0x5aa583);if(_0x4c1e6e)this['_startingVersion']=_0x4c1e6e['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x1a0c2d=this['_source']['history']['_operations']['find'](_0x1c52a8=>!_0x1c52a8['_isInit']),_0x8221b1=_0x1a0c2d?_0x1a0c2d['baseVersion']:this['_source']['history']['version'];_0x2f327d?(_0x2f327d['toVersion']<_0x8221b1&&_0x2f327d['_update']({'toVersion':_0x8221b1}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x3b1d1c['id'],this['_startingVersion']=_0x3b1d1c['fromVersion']):(this['_startingVersion']=_0x2f327d['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x8221b1,this['_continueCurrentRevision']=!0x1);}}else _0x3b1d1c&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x3b1d1c['toVersion'],this['editor']['model']['document']['history']['version']),_0x3b1d1c['fromVersion']===_0x3b1d1c['toVersion']?(0x0!==_0x3b1d1c['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x3b1d1c['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x3b1d1c['id'],this['_startingVersion']=_0x3b1d1c['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',_0x58cc47=>!_0x58cc47),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0xdc193e=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2cd9fd;for(const _0x4e108b in _0xdc193e){const _0x4dfbe4=_0x4e108b,_0x371a26=_0xdc193e[_0x4dfbe4];if('revisionHistoryLicenseKeyValid'==_0x371a26||'revisionHistoryLicenseKeyInvalid'==_0x371a26||'revisionHistoryLicenseKeyExpired'==_0x371a26||'revisionHistoryLicenseKeyDomainLimit'==_0x371a26||'revisionHistoryLicenseKeyNotAllowed'==_0x371a26||'revisionHistoryLicenseKeyEvaluationLimit'==_0x371a26||'revisionHistoryLicenseKeyTrialLimit'==_0x371a26||'revisionHistoryLicenseKeyUsageLimit'==_0x371a26){delete _0xdc193e[_0x4dfbe4],_0x2cd9fd=_0x371a26,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x2cd9fd&&_0xdc193e['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x2cd9fd&&_0xdc193e['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x2cd9fd&&_0xdc193e['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x2cd9fd&&_0xdc193e['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x2cd9fd&&_0xdc193e['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x2cd9fd&&_0xdc193e['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x2cd9fd&&_0xdc193e['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x1a005c=this['repository']['getRevision'](0x0),_0x3cc503=await this['getRevisionDocumentData'](_0x1a005c),_0x5d4889=await this['getRevisionRootsAttributes'](_0x1a005c);this['_replaceEditorDataWithRevisionData'](_0x3cc503,_0x5d4889);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0xe7798){this['_source']=_0xe7798;}async['update'](){const _0x427918=await this['_source']['getLatestVersion']();if(_0x427918>this['currentRevision']['toVersion']){await this['_loadState']();const _0x4c1c7f=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x427918});_0x4c1c7f['authors']=_0x4c1c7f['authorsIds']['map'](_0x4aee79=>this['editor']['plugins']['get']('Users')['getUser'](_0x4aee79)),this['currentRevision']['_update'](_0x4c1c7f);}}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_loadRevisionData'](this['currentRevision']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}async['saveRevision'](_0x4feea0={},_0xe590ac=null){const _0x228e24=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0xe590ac>this['currentRevision']['toVersion']&&(_0xe590ac=null),null===_0xe590ac&&(_0xe590ac=await this['_source']['getLatestVersion']());const _0x2f3dcf=this['_getFromVersion'](_0xe590ac),_0xb97693=this['buildRevisionData']({'from':_0x2f3dcf,'to':_0xe590ac});if(this['currentRevision']['toVersion']<_0xe590ac){const _0xc6c30a=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0xe590ac,'to':_0xe590ac});_0xc6c30a['authors']=[],_0xc6c30a['authorsIds']=[],_0xc6c30a['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0xc6c30a,!0x0),delete _0xc6c30a['authors'],_0x228e24['push'](_0xc6c30a);}_0x4feea0['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x4feea0['name']=_0x4feea0['name']||null,_0x4feea0['id']=_0x4feea0['id']||_0x2afce3(),_0x4feea0={..._0x4feea0,..._0xb97693};const _0x57297b=this['addRevisionData'](_0x4feea0);_0x228e24['push'](_0x4feea0);const _0x598575=this['repository']['getIndex'](_0x57297b);if(0x0!==_0x598575){const _0x4f1542=this['repository']['getRevision'](_0x598575-0x1);if(_0x4f1542['fromVersion']!==_0xe590ac){const _0x2d04b2=this['_revisionDataBuilder']['getData'](_0xe590ac,_0x4f1542['toVersion']),_0xc089a8={'id':_0x4f1542['id'],'diffData':_0x2d04b2['diffData'],'authorsIds':_0x2d04b2['authorsIds'],'authors':_0x2d04b2['authorsIds']['map'](_0x3de654=>this['editor']['plugins']['get']('Users')['getUser'](_0x3de654)),'fromVersion':_0xe590ac};_0x4f1542===this['currentRevision']&&(_0xc089a8['createdAt']=new Date(_0x4feea0['createdAt']['getTime']()+0xa)),_0x4f1542['_update'](_0xc089a8,!0x0),delete _0xc089a8['authors'],_0x228e24['push'](_0xc089a8);}}if(this['adapter']){for(const _0x390e33 of _0x228e24)this['_bufferUpdate'](_0x390e33['id'],_0x390e33,!0x0);this['sendBufferedUpdates']();}return _0x57297b;}['addRevisionData'](_0x2d7be7){const _0x1c5fb9=this['repository']['createRevision'](_0x2d7be7);return this['adapter']&&_0x1c5fb9['on']('_update',(_0x399d85,_0x1bcfb2,_0x5abc09)=>{_0x5abc09||(this['_bufferUpdate'](_0x1bcfb2['id'],_0x1bcfb2,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x1c5fb9,this['_findInsertionIndex'](_0x1c5fb9)),_0x1c5fb9;}async['getRevisionDocumentData'](_0x1b6709){await this['_loadRevisionData'](_0x1b6709);const _0x349b38={};for(const _0x2425d5 in _0x1b6709['diffData']){if(_0x1b6709['diffData'][_0x2425d5]['attachChange']&&!_0x1b6709['diffData'][_0x2425d5]['attachChange']['isAttached'])continue;const _0x3d3146=this['_removeRevisionMarkers'](JSON['parse'](_0x1b6709['diffData'][_0x2425d5]['insertions'])),_0x45f1d6=this['editor']['editing']['view']['document'],_0x43157f=new _0x35a7c1(_0x45f1d6,_0x3d3146['map'](_0x4b0b18=>C(_0x4b0b18,this['editor'])));this['editor']['data']['processor']['useFillerType']('marked'),_0x349b38[_0x2425d5]=this['editor']['data']['processor']['toData'](_0x43157f),this['editor']['data']['processor']['useFillerType']('default');}return _0x349b38;}async['getRevisionRootsAttributes'](_0x3126a1){await this['_loadRevisionData'](_0x3126a1);const _0x3c7bf6={};for(const _0xb809f in _0x3126a1['diffData'])_0x3126a1['diffData'][_0xb809f]['attachChange']&&!_0x3126a1['diffData'][_0xb809f]['attachChange']['isAttached']||(_0x3c7bf6[_0xb809f]=_0x3126a1['diffData'][_0xb809f]['attributesAfter']||{});return _0x3c7bf6;}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x1673e9=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x3ef876=0x0;_0x3ef876<_0x1673e9['length'];_0x3ef876++){const _0xda850=_0x1673e9[_0x3ef876];let _0x4bef2a=!0x1;for(const _0x5c87ec of Object['keys'](_0xda850))void 0x0===_0xda850[_0x5c87ec]?delete _0xda850[_0x5c87ec]:'id'!==_0x5c87ec&&(_0x4bef2a=!0x0);_0x4bef2a||(_0x1673e9[_0x3ef876]=null);}if(_0x1673e9=_0x1673e9['filter'](_0x32027b=>null!==_0x32027b),!_0x1673e9['length'])return;for(let _0x57b093=0x0;_0x57b093<_0x1673e9['length'];_0x57b093++){const _0x1b833d=_0x1673e9[_0x57b093];void 0x0!==_0x1b833d['fromVersion']&&void 0x0===_0x1b833d['toVersion']&&(_0x1b833d['toVersion']=this['repository']['getRevision'](_0x1b833d['id'])['toVersion']),void 0x0!==_0x1b833d['toVersion']&&void 0x0===_0x1b833d['fromVersion']&&(_0x1b833d['fromVersion']=this['repository']['getRevision'](_0x1b833d['id'])['fromVersion']);}const _0x5ef201=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x1673e9,_0x5ef201)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x2cd4ad=>{if(_0x2cd4ad){for(const _0x137cf2 of _0x2cd4ad)this['setRevisionData']({'id':_0x137cf2['id'],'createdAt':_0x137cf2['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['_replaceEditorDataWithRevisionData'](_0x4d163e,_0xf81b58){let _0x4756c1=this['editor']['config']['get']('initialData'),_0x5e592f=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x4756c1){_0x4756c1={};for(const _0x434cbc of this['editor']['model']['document']['getRootNames']())_0x4756c1[_0x434cbc]='';}if('string'==typeof _0x4756c1&&(_0x4756c1={'main':_0x4756c1}),void 0x0===_0x5e592f){_0x5e592f={};for(const _0x4f39b3 of this['editor']['model']['document']['getRootNames']())_0x5e592f[_0x4f39b3]={};}let _0x264daf=!0x1;const _0x415f76=Object['keys'](_0x4756c1),_0xcd1209=Object['keys'](_0x4d163e);for(const _0x406b84 of _0x415f76){if(_0x4756c1[_0x406b84]!==_0x4d163e[_0x406b84]&&''!==_0x4756c1[_0x406b84]['trim']()){_0x264daf=!0x0;break;}if(!_0x442ae4(_0x5e592f[_0x406b84],_0xf81b58[_0x406b84])&&Object['keys'](_0x5e592f[_0x406b84])['length']>0x0){_0x264daf=!0x0;break;}}_0x264daf||(_0x264daf=_0xcd1209['some'](_0x1d51ea=>!this['editor']['model']['document']['getRoot'](_0x1d51ea))),_0x264daf&&_0x427f80('editor-initial-data-replaced-with-revision-data',{'editorData':_0x4756c1,'editorRootsAttributes':_0x5e592f,'revisionData':_0x4d163e,'revisionRootsAttributes':_0xf81b58}),this['editor']['config']['set']('initialData',_0x4d163e),this['editor']['config']['set']('rootsAttributes',_0xf81b58);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x333124=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x333124['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x413b0d){const _0x402e92=this['repository']['getRevisions']();_0x402e92['reverse']();let _0x7c665=0x0;for(;_0x7c665<_0x402e92['length'];){const _0x73e567=_0x402e92[_0x7c665];if(_0x73e567===this['currentRevision']){_0x7c665++;continue;}if(_0x73e567['id']===this['_initialRevisionId'])break;const _0x1434f9=_0x413b0d['toVersion']-_0x73e567['toVersion']||_0x413b0d['fromVersion']-_0x73e567['fromVersion'];if(_0x1434f9>0x0)break;if(_0x1434f9<0x0)_0x7c665++;else{if(!_0x413b0d['creator']&&_0x73e567['creator'])break;if(_0x73e567['creator']||!_0x413b0d['creator']){if(_0x413b0d['createdAt']>_0x73e567['createdAt'])break;_0x7c665++;}else _0x7c665++;}}return _0x7c665;}['setRevisionData'](_0x13e3ed){const _0x21d818=this['repository']['getRevision'](_0x13e3ed['id']);if(_0x13e3ed['createdAt']&&(_0x13e3ed['createdAt']=new Date(_0x13e3ed['createdAt'])),_0x13e3ed['authorsIds']){const _0x1d0861=this['editor']['plugins']['get']('Users');_0x13e3ed['authors']=_0x13e3ed['authorsIds']['map'](_0x553773=>_0x1d0861['getUser'](_0x553773));}_0x21d818['_update'](_0x13e3ed,!0x0);}['buildRevisionData']({revision:_0xb92e60=null,from:_0x2fc71f=null,to:_0x161a8b=null}){_0x2fc71f=null!==_0x2fc71f?_0x2fc71f:_0xb92e60['fromVersion'],_0x161a8b=null!==_0x161a8b?_0x161a8b:_0xb92e60['toVersion'];const _0x15e952=this['_revisionDataBuilder']['getData'](_0x2fc71f,_0x161a8b),_0x4ea7f3={'diffData':_0x15e952['diffData'],'authorsIds':_0x15e952['authorsIds'],'fromVersion':_0x2fc71f,'toVersion':_0x161a8b};if(!_0xb92e60||_0x161a8b!==_0xb92e60['toVersion']){const _0x523daa=_0x161a8b-0x1,_0x226e8f=this['_source']['history']['getOperation'](_0x523daa);_0x4ea7f3['createdAt']=_0x226e8f&&_0x226e8f['createdAt']||new Date();}if(this['_loadedStateData']&&_0x2fc71f===this['_loadedStateData']['fromVersion']){for(const _0x3a0430 of this['_loadedStateData']['authors'])_0x4ea7f3['authorsIds']['includes'](_0x3a0430['id'])||_0x4ea7f3['authorsIds']['push'](_0x3a0430['id']);}return _0x4ea7f3;}['_loadRevisionData'](_0x2752b3){if(!_0x2752b3||_0x2752b3['diffData'])return Promise['resolve']();{const _0x3dd866=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x3dd866,'revisionId':_0x2752b3['id']})['then'](_0x4bf064=>{_0x2752b3['diffData']=_0x4bf064['diffData'];});}}['_bufferUpdate'](_0x353e33,_0x3faed1,_0x64fdb){if(this['_bufferedUpdates']['has'](_0x353e33)){const _0x52bedc=this['_bufferedUpdates']['get'](_0x353e33);_0x3faed1=_0x64fdb?{..._0x52bedc,..._0x3faed1}:{..._0x3faed1,..._0x52bedc};}this['_bufferedUpdates']['set'](_0x353e33,_0x3faed1);}['_getFromVersion'](_0x38de01){const _0x1fdd78=this['repository']['getRevisions']();_0x1fdd78['reverse'](),_0x1fdd78['shift']();const _0x38d697=_0x1fdd78['find'](_0x486d60=>_0x486d60['toVersion']<=_0x38de01)['toVersion'];return _0x38d697<this['_startingVersion']?this['_startingVersion']:_0x38d697;}['_createInitialRevision'](_0x35008e){const _0x3639ba=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x3639ba)this['_initialRevisionId']=_0x3639ba['id'];else{const _0x185107=!this['editor']['model']['document']['roots']['find'](_0x2c6937=>this['editor']['model']['hasContent'](_0x2c6937)),_0x528234=this['editor']['plugins']['get']('Users')['me']['id'],_0xca2345=m(this['editor']['locale'],_0x185107?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x35008e,'to':_0x35008e,'id':this['_initialRevisionId'],'name':_0xca2345,'creatorId':_0x528234});}}['_createCurrentRevision'](_0x27a2d0){const _0x233d49=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x233d49),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x27a2d0,'to':_0x27a2d0,'id':_0x233d49,'name':'','creatorId':null}));}['_makeRevision']({name:_0x1bca4a,from:_0x326dc0,to:_0x9725b,creatorId:_0x2e2fa1,id:_0x571120}){const _0x56800d=this['buildRevisionData']({'from':_0x326dc0,'to':_0x9725b});_0x56800d['name']=_0x1bca4a,_0x56800d['creatorId']=_0x2e2fa1,_0x56800d['id']=_0x571120;const _0x122e4a=this['addRevisionData'](_0x56800d);return this['adapter']&&this['_bufferUpdate'](_0x56800d['id'],_0x56800d,!0x0),_0x122e4a;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}['_removeRevisionMarkers'](_0x1d6efb){return(_0x1d6efb=_0x1d6efb['filter'](_0x4dfc4d=>!_0x4dfc4d['name']||'revision-start'!==_0x4dfc4d['name']&&'revision-end'!==_0x4dfc4d['name']))['forEach'](_0x2242f0=>{'string'!=typeof _0x2242f0&&(_0x2242f0['children']=this['_removeRevisionMarkers'](_0x2242f0['children']),_0x2242f0['attributes']=_0x2242f0['attributes']['filter'](_0x341efd=>!_0x341efd[0x0]['startsWith']('data-revision-')));}),_0x1d6efb;}}function C(_0x3434e3,_0x2d6982){const _0x2849d2=_0x2d6982['editing']['view']['document'];if('string'==typeof _0x3434e3)return new _0xd0ebb3(_0x2849d2,_0x3434e3);{const _0x5457bd=_0x3434e3['children']['map'](_0x7d2643=>C(_0x7d2643,_0x2d6982));return new(P[_0x3434e3['type']]||_0x1fc26e)(_0x2849d2,_0x3434e3['name'],_0x3434e3['attributes'],_0x5457bd);}}class V{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0xe81f99){this['editor']=_0xe81f99,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'](_0x5d69e9){this['source']=_0x5d69e9;const _0x5b1511=new Map(),_0x45c76d=new Map(),_0x436d49=this['editor']['model']['document']['roots']['map'](_0x3a4ae4=>_0x3a4ae4['rootName']);for(const _0x400e3b of _0x436d49){const _0x5b3cca=this['editor']['model']['document']['getRoot'](_0x400e3b),_0x3e8072=T(_0x5b3cca);_0x5b1511['set'](_0x400e3b,_0x3e8072),_0x45c76d['set'](_0x400e3b,Object['fromEntries'](_0x5b3cca['getAttributes']()));}const _0x464ab2=Array['from'](this['editor']['model']['markers'])['map'](_0x591f01=>[_0x591f01['name'],_0x591f01['getRange']()]),_0x30b133=this['source']['version'];this['_saveMetaData'](_0x30b133,_0x5b1511,_0x464ab2,_0x45c76d),this['_startingRevisionId']=this['_revisionId'];const _0x2697dd=new Map(),_0x509321=new Map();for(const _0x18d85e of _0x436d49){const _0x538454=F(_0x18d85e);_0x2697dd['set'](_0x18d85e,_0x538454),_0x509321['set'](_0x18d85e,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x2697dd,[],_0x509321);}['getData'](_0x2cf5e1,_0x1b1eb8){if(this['_lastFrom']===_0x2cf5e1&&this['_lastTo']<=_0x1b1eb8)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x1b1eb8,!0x0);else{if(!this['_savedMetaData']['has'](_0x2cf5e1)){const _0x230e51=this['_getPreviousFrom'](_0x2cf5e1);this['_calculateMetaData'](_0x230e51,_0x2cf5e1,!0x1);}this['_calculateMetaData'](_0x2cf5e1,_0x1b1eb8,!0x0);}return this['_lastFrom']=_0x2cf5e1,this['_lastTo']=_0x1b1eb8,this['_getState']();}['loadState'](_0x4886f2){this['_reset'](),this['_lastFrom']=_0x4886f2['fromVersion'],this['_lastTo']=_0x4886f2['toVersion'];for(const _0x225373 in _0x4886f2['diffData']){const _0x5ce1f8=_0x4886f2['diffData'][_0x225373]['attachChange'],_0x1b399d=_0xf117d4(_0x4886f2['diffData'][_0x225373]['attributesBefore'])||{},_0x31768b=this['_makeModelFromViewString'](_0x4886f2['diffData'][_0x225373]['deletions']);_0x31768b['rootName']=_0x225373,_0x31768b['_isAttached']=!_0x5ce1f8||!_0x5ce1f8['isAttached'],_0x31768b['isAttached']=()=>_0x31768b['_isAttached'],this['_baseRoots']['set'](_0x225373,_0x31768b),this['_baseRootsAttributes']['set'](_0x225373,_0x1b399d),_0x5ce1f8&&this['_touchedRoots']['set'](_0x225373,_0x5ce1f8);const _0x386858=this['_makeIdsRoot'](_0x31768b);this['_baseIdsRoots']['set'](_0x225373,_0x386858);for(const [_0x14da91,_0x168078]of _0x31768b['markers']){if(!_0x14da91['startsWith']('revision:'))continue;const _0x2a1d33=_0x14da91['split'](':')[0x2];for(const _0x3aa3a6 of _0x168078['getWalker']({'singleCharacters':!0x0})){const _0x4d2010=this['_getVidAttributeName'](_0x3aa3a6),_0x5ab78e='elementEnd'==_0x3aa3a6['type']?_0x3aa3a6['previousPosition']['path']['slice'](0x0,-0x1):_0x3aa3a6['previousPosition']['path'],_0x222323=_0x386858['getNodeByPath'](_0x5ab78e)['getAttribute'](_0x4d2010);this['_touched']['set'](_0x222323,{'userId':_0x2a1d33});}}}this['_startingRevisionId']=this['_revisionId'];const _0x4ea92a=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x5ce349=>!this['_touched']['has'](_0x5ce349));let _0x55af7f=0x0;const _0x3aa298=new Map();for(const _0x281eb1 in _0x4886f2['diffData']){const _0x3377d5=_0x4886f2['diffData'][_0x281eb1]['attachChange'],_0x4087d6=_0xf117d4(_0x4886f2['diffData'][_0x281eb1]['attributesAfter'])||{},_0x458931=this['_makeModelFromViewString'](_0x4886f2['diffData'][_0x281eb1]['insertions']);_0x458931['rootName']=_0x281eb1,_0x458931['_isAttached']=!_0x3377d5||_0x3377d5['isAttached'],_0x458931['isAttached']=()=>_0x458931['_isAttached'],this['_diffRoots']['set'](_0x281eb1,_0x458931),this['_diffRootsAttributes']['set'](_0x281eb1,_0x4087d6);const _0xeb92df=this['_makeIdsRoot'](_0x458931,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x281eb1,_0xeb92df),_0x3aa298['set'](_0x281eb1,_0x458931['isAttached']()?_0x4087d6:{});for(const [_0x574c02,_0x3988dd]of _0x458931['markers']){if(!_0x574c02['startsWith']('revision:'))continue;const _0xbe8f51=_0x574c02['split'](':')[0x2];for(const _0x5b3027 of _0x3988dd['getWalker']({'singleCharacters':!0x0})){const _0x5bdcc4=this['_getVidAttributeName'](_0x5b3027),_0x267455=this['_revisionId']++,_0x3a5e4f='elementEnd'==_0x5b3027['type']?_0x5b3027['previousPosition']['path']['slice'](0x0,-0x1):_0x5b3027['previousPosition']['path'];_0xeb92df['getNodeByPath'](_0x3a5e4f)['_setAttribute'](_0x5bdcc4,_0x267455),this['_touched']['set'](_0x267455,{'userId':_0xbe8f51});}}for(const _0x2f7ac4 of this['editor']['model']['createRangeIn'](_0x458931)['getWalker']({'singleCharacters':!0x0})){const _0x5d53c5=this['_getVidAttributeName'](_0x2f7ac4),_0x3054b6='elementEnd'==_0x2f7ac4['type']?_0x2f7ac4['previousPosition']['path']['slice'](0x0,-0x1):_0x2f7ac4['previousPosition']['path'],_0x2d7d98=_0xeb92df['getNodeByPath'](_0x3054b6);_0x2d7d98['getAttribute'](_0x5d53c5)>0x0||_0x2d7d98['_setAttribute'](_0x5d53c5,_0x4ea92a[_0x55af7f++]);}for(const [_0x467d4d,_0x4d0c3d]of _0x458931['markers'])_0x467d4d['startsWith']('revision:')||this['_markers']['set'](_0x467d4d,_0x4d0c3d);}const _0x2998a4=F('$graveyard');this['_baseRoots']['set']('$graveyard',_0x2998a4),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x2998a4,0x1));const _0x42a373=F('$graveyard');this['_diffRoots']['set']('$graveyard',_0x42a373),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x42a373,0x1));const _0x16e3e8=Array['from'](this['_diffRoots'])['map'](([_0x319ba0,_0x3f207e])=>[_0x319ba0,T(_0x3f207e)]);this['_saveMetaData'](this['_lastTo'],_0x16e3e8,this['_markers'],_0x3aa298);}['_makeModelFromViewString'](_0x4c1659){const _0x5032c5=JSON['parse'](_0x4c1659),_0x37f326=this['editor']['editing']['view']['document'],_0x232534=new _0x35a7c1(_0x37f326,_0x5032c5['map'](_0x2db68a=>C(_0x2db68a,this['editor'])));return this['editor']['data']['toModel'](_0x232534);}['_saveMetaData'](_0x6c8068,_0x30589e,_0x58c067,_0x3c2edb){const _0x29f2b5=new Map(_0x30589e),_0x133ff5=new Map(_0xf117d4(_0x3c2edb)),_0x6f57db=new Map();for(const [_0xce37bc,_0x38088a]of _0x58c067)_0x6f57db['set'](_0xce37bc,{'start':_0x38088a['start']['clone'](),'end':_0x38088a['end']['clone'](),'rootName':_0x38088a['root']['rootName']});this['_savedMetaData']['set'](_0x6c8068,{'roots':_0x29f2b5,'markers':_0x6f57db,'rootsAttributes':_0x133ff5});}['_removeMetaData'](_0x12a2a3){this['_savedMetaData']['delete'](_0x12a2a3);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_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'](_0x4b1646,_0x152d1a=null){let _0x5d0de5=null;_0x4b1646['is']('documentFragment')||(_0x5d0de5=new ft(_0x4b1646['name'],{'vid_start':null===_0x152d1a?this['_revisionId']++:_0x152d1a++}));const _0x7f4ac=[];for(const _0x35047f of _0x4b1646['getChildren']())if(_0x35047f['is']('element')){_0x7f4ac['push'](this['_makeIdsRoot'](_0x35047f,_0x152d1a));const _0x6a3c4b=_0x7f4ac[_0x7f4ac['length']-0x1];null!==_0x152d1a&&(_0x152d1a=_0x6a3c4b['is']('element','$text')?_0x6a3c4b['getAttribute']('vid')+0x1:_0x6a3c4b['getAttribute']('vid_end')+0x1);}else{for(let _0x2bf1f8=0x0;_0x2bf1f8<_0x35047f['offsetSize'];_0x2bf1f8++)_0x7f4ac['push'](new ft('$text',{'vid':null===_0x152d1a?this['_revisionId']++:_0x152d1a++}));}if(_0x4b1646['is']('documentFragment')){const _0x151f2f=F(_0x4b1646['rootName']);return _0x151f2f['_insertChild'](0x0,_0x7f4ac),_0x151f2f;}return _0x5d0de5['_setAttribute']('vid_end',null===_0x152d1a?this['_revisionId']++:_0x152d1a++),_0x5d0de5['_insertChild'](0x0,_0x7f4ac),_0x5d0de5;}['_calculateMetaData'](_0x560788,_0x2ebe02,_0x3a84bc){this['_reset']();const {roots:_0xeaafdb,markers:_0x58012e,rootsAttributes:_0x2b3ed9}=this['_savedMetaData']['get'](_0x560788);this['_baseRoots']=new Map(_0xeaafdb),this['_baseRootsAttributes']=new Map(_0xf117d4(_0x2b3ed9));for(const [_0x47e8d6,_0x4835ff]of this['_baseRoots'])if('$graveyard'!==_0x47e8d6&&(this['_diffRoots']['set'](_0x47e8d6,T(_0x4835ff)),this['_diffRootsAttributes']=new Map(_0xf117d4(_0x2b3ed9)),_0x3a84bc)){const _0x1a7df9=this['_revisionId'];this['_idsRoots']['set'](_0x47e8d6,this['_makeIdsRoot'](_0x4835ff)),this['_baseIdsRoots']['set'](_0x47e8d6,this['_makeIdsRoot'](_0x4835ff,_0x1a7df9));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',T(this['_baseRoots']['get']('$graveyard'))),_0x3a84bc&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x3ca4af,_0xa5dd90]of _0x58012e){const _0x2e0659=this['_baseRoots']['get'](_0xa5dd90['rootName']),_0x445f27=this['_diffRoots']['get'](_0xa5dd90['rootName']),_0x2596d8=new vt(this['_fixPosition'](_0xa5dd90['start'],_0x2e0659),this['_fixPosition'](_0xa5dd90['end'],_0x2e0659)),_0x58ded2=this['_fixRange'](_0x2596d8,_0x445f27);_0x2e0659['markers']['set'](_0x3ca4af,_0x2596d8),this['_markers']['set'](_0x3ca4af,_0x58ded2);}this['_applyOperations'](_0x560788,_0x2ebe02,_0x3a84bc);}['_applyOperations'](_0x3b2371,_0xe3ba45,_0x25dbde){for(const _0x4065e0 of this['source']['getOperations'](_0x3b2371,_0xe3ba45))this['_handleOperation'](_0x4065e0,_0x25dbde);for(const _0x44c028 of this['_diffRoots']['values']())_0x44c028['markers']['clear']();for(const [_0x3167c7,_0x259294]of this['_markers']){this['_diffRoots']['get'](_0x259294['root']['rootName'])['markers']['set'](_0x3167c7,_0x259294['clone']());}const _0xa58aec=new Map(),_0x56b896=new Map();for(const [_0x101f4d,_0x1cfd80]of this['_diffRoots'])_0xa58aec['set'](_0x101f4d,T(_0x1cfd80)),_0x56b896['set'](_0x101f4d,this['_diffRootsAttributes']['get'](_0x101f4d));this['_saveMetaData'](_0xe3ba45,_0xa58aec,this['_markers'],_0x56b896);}['_getPreviousFrom'](_0x2ef72d){const _0x4de641=Array['from'](this['_savedMetaData']['keys']());_0x4de641['sort']((_0x36dd66,_0x169f58)=>_0x36dd66-_0x169f58),_0x4de641['reverse']();for(const _0x9a5314 of _0x4de641)if(_0x9a5314<_0x2ef72d)return _0x9a5314;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x2c9176,_0x22157c){const _0x4b80e7=Array['from'](_0x22157c['markers'])['map'](([_0x55835e,_0x4006f9])=>[_0x55835e,this['_fixRange'](_0x4006f9,_0x2c9176)]);_0x2c9176['markers']=new Map(_0x4b80e7);}['_transformMarkers'](_0x30ba1f){for(const _0x19173f of this['_markers']['values']()){const _0x35f9ce=_0x19173f['getTransformedByOperation'](_0x30ba1f),_0xffeca0=vt['_createFromRanges'](_0x35f9ce);_0x19173f['start']=_0xffeca0['start'],_0x19173f['end']=_0xffeca0['end'];}}['_handleOperation'](_0xb68c00,_0x3ec89a){if('addRoot'!=_0xb68c00['type']&&'detachRoot'!=_0xb68c00['type']){if('insert'==_0xb68c00['type']){const _0x4221e4=_0xb68c00['position']['root']['rootName'];this['_diffRoots']['has'](_0x4221e4)||(this['_diffRoots']['set'](_0x4221e4,F(_0x4221e4,!0x0)),this['_diffRootsAttributes']['set'](_0x4221e4,{}),_0x3ec89a&&this['_idsRoots']['set'](_0x4221e4,F(_0x4221e4,!0x0)));}else{if('addRootAttribute'==_0xb68c00['type']||'removeRootAttribute'==_0xb68c00['type']||'changeRootAttribute'==_0xb68c00['type'])return void this['_handleRootAttributeOperation'](_0xb68c00);'marker'==_0xb68c00['type']&&this['_handleMarkerOperation'](_0xb68c00);}if('marker'!==_0xb68c00['type']){const _0x13d7a1=this['_cloneOperation'](_0xb68c00,this['_diffRoots']);_0x13d7a1['_execute'](),this['_transformMarkers'](_0x13d7a1);}if(_0x3ec89a)switch(_0xb68c00['type']){case'insert':this['_handleInsertOperation'](_0xb68c00);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0xb68c00);break;case'merge':this['_handleMergeOperation'](_0xb68c00);break;case'split':this['_handleSplitOperation'](_0xb68c00);}}else this['_handleRootOperation'](_0xb68c00,_0x3ec89a);}['_cloneOperation'](_0x116b80,_0xb22c18){const _0x67599d=_0x116b80['clone']();return _0x67599d['_authorId']=_0x116b80['_authorId'],this['_fixOperation'](_0x67599d,_0xb22c18),_0x67599d;}['_getBaseVids'](_0x502ac9){return _0x502ac9['map'](_0x2baf89=>{const _0x196ddc=this['_getVidAttributeName'](_0x2baf89);return Number(_0x2baf89['item']['getAttribute'](_0x196ddc));});}['_generateTape'](_0x1cbd05,_0x5cce66){if(_0x1cbd05['is']('element','$text'))_0x5cce66['push']({'item':_0x1cbd05,'type':'text'});else{_0x1cbd05['is']('element')&&_0x5cce66['push']({'item':_0x1cbd05,'type':'elementStart'});for(const _0x4016ff of _0x1cbd05['getChildren']())this['_generateTape'](_0x4016ff,_0x5cce66);_0x1cbd05['is']('element')&&_0x5cce66['push']({'item':_0x1cbd05,'type':'elementEnd'});}return _0x5cce66;}['_getState'](){const _0x2f5c4a=new Map(this['_touched']),_0x5cf4e0=new Map(_0x2f5c4a),_0x54e144=new Map(),_0x3cb033={'insertions':{},'deletions':{}},_0x4014a2={'insertions':{},'deletions':{}},_0x217f1a=new Map(),_0x10416d=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x10416d['delete']('$graveyard');for(const _0x531a25 of _0x10416d){const _0x4ef8ab=this['_diffRoots']['get'](_0x531a25)||F(_0x531a25,!0x1),_0x2a1198=this['_baseRoots']['get'](_0x531a25)||F(_0x531a25,!0x1);_0x4ef8ab['isAttached']()||_0x2a1198['isAttached']()?(_0x3cb033['insertions'][_0x531a25]=T(_0x4ef8ab),_0x3cb033['deletions'][_0x531a25]=T(_0x2a1198),this['_copyMarkers'](_0x3cb033['deletions'][_0x531a25],_0x2a1198),this['_copyMarkers'](_0x3cb033['insertions'][_0x531a25],_0x4ef8ab),_0x4014a2['insertions'][_0x531a25]=this['_generateTape'](this['_idsRoots']['get'](_0x531a25),[]),_0x4014a2['deletions'][_0x531a25]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x531a25)||F(_0x531a25,!0x1),[])):_0x10416d['delete'](_0x531a25);}for(const _0xce50da of _0x10416d){const _0x8d0b10=_0x4014a2['insertions'][_0xce50da];for(const _0x2a852b of _0x8d0b10){const _0x435fc0=this['_getVidAttributeName'](_0x2a852b),_0x2ab369=_0x2a852b['item']['getAttribute'](_0x435fc0);_0x5cf4e0['delete'](_0x2ab369),_0x2ab369>=this['_startingRevisionId']&&_0x54e144['set'](_0x2ab369,_0x2f5c4a['get'](_0x2ab369));}}for(const _0x2eb7c8 of _0x10416d){const _0x47bf12=_0x4014a2['insertions'][_0x2eb7c8],_0x21ac3d=this['_getBaseVids'](_0x4014a2['deletions'][_0x2eb7c8]);let _0x519d0f=0x0;for(const _0x463cbc of _0x47bf12){const _0x98b382=this['_getVidAttributeName'](_0x463cbc),_0x5d9350=_0x463cbc['item']['getAttribute'](_0x98b382);if(!_0x54e144['has'](_0x5d9350)&&!_0x217f1a['has'](_0x5d9350)){if(_0x5cf4e0['has'](_0x5d9350))_0x519d0f++;else{if(_0x5d9350!=_0x21ac3d[_0x519d0f]){const _0x53b2bb=_0x2f5c4a['get'](_0x5d9350)||_0x2f5c4a['get'](_0x21ac3d[_0x519d0f]);for(;_0x5d9350!=_0x21ac3d[_0x519d0f];)_0x5cf4e0['has'](_0x21ac3d[_0x519d0f])||(_0x217f1a['set'](_0x21ac3d[_0x519d0f],_0x53b2bb),_0x2f5c4a['set'](_0x21ac3d[_0x519d0f],_0x53b2bb)),_0x519d0f++;}_0x519d0f++;}}}}for(const _0x55134f of _0x10416d){const _0x104f54=_0x4014a2['insertions'][_0x55134f];for(const _0x49e1bf of _0x104f54){const _0x4f7db6=this['_getVidAttributeName'](_0x49e1bf),_0x213bb5=_0x49e1bf['item']['getAttribute'](_0x4f7db6);if(_0x217f1a['has'](_0x213bb5)){const _0x2cc183=_0x217f1a['get'](_0x213bb5);_0x5cf4e0['has'](_0x213bb5)||_0x5cf4e0['set'](_0x213bb5,{..._0x2cc183}),_0x54e144['set'](_0x213bb5,{..._0x2cc183});}}}for(const _0xf19864 of _0x5cf4e0['keys']())_0xf19864>=this['_startingRevisionId']&&_0x5cf4e0['delete'](_0xf19864);const _0x3fb100=new Map();for(const _0x5e1061 of _0x10416d){let _0x1387a8=_0x4014a2['insertions'][_0x5e1061];for(const _0x347c3a of _0x1387a8)if(_0x347c3a['item']['is']('element','tableCell')){const _0x3ebb94=this['_getVidAttributeName'](_0x347c3a),_0x512f7b=_0x347c3a['item']['getAttribute'](_0x3ebb94);if(_0x54e144['has'](_0x512f7b)){const _0x51ea27=_0x347c3a['item']['parent']['parent']['getAttribute']('vid_start'),_0x55665a=_0x3fb100['get'](_0x51ea27)||new Set();_0x55665a['add'](_0x54e144['get'](_0x512f7b)['userId']),_0x3fb100['set'](_0x51ea27,_0x55665a);}}_0x1387a8=_0x4014a2['deletions'][_0x5e1061];for(const _0x4a3bca of _0x1387a8)if(_0x4a3bca['item']['is']('element','tableCell')){const _0x510f58=this['_getVidAttributeName'](_0x4a3bca),_0x2b0d6a=_0x4a3bca['item']['getAttribute'](_0x510f58);if(_0x5cf4e0['has'](_0x2b0d6a)){const _0x2e86be=_0x4a3bca['item']['parent']['parent']['getAttribute']('vid_start'),_0x5e3d62=_0x3fb100['get'](_0x2e86be)||new Set();_0x5e3d62['add'](_0x5cf4e0['get'](_0x2b0d6a)['userId']),_0x3fb100['set'](_0x2e86be,_0x5e3d62);}}for(const _0x6a6f9e of _0x3fb100['keys']())(_0x54e144['has'](_0x6a6f9e)||_0x5cf4e0['has'](_0x6a6f9e))&&_0x3fb100['delete'](_0x6a6f9e);}for(const _0x1a33d8 of _0x10416d){const _0x38d0a8=_0x4014a2['insertions'][_0x1a33d8];let _0x211cbe=null,_0x1882d2=null;for(const _0x5ee357 of _0x38d0a8){const _0xf170fd=this['_getVidAttributeName'](_0x5ee357),_0x2e523e=_0x5ee357['item']['getAttribute'](_0xf170fd),_0x9c58dc=_0x3fb100['get'](_0x2e523e);_0x9c58dc&&'elementStart'==_0x5ee357['type']&&(_0x211cbe=Array['from'](_0x9c58dc)[0x0],_0x1882d2=_0x5ee357['item']['getAttribute']('vid_end')),_0x211cbe&&(_0x5cf4e0['set'](_0x2e523e,{'userId':_0x211cbe}),_0x54e144['set'](_0x2e523e,{'userId':_0x211cbe})),_0x2e523e==_0x1882d2&&(_0x211cbe=null,_0x1882d2=null);}}const _0x137349={},_0x7bfb3f=new Set();for(const _0x36ef6e of _0x10416d){const _0x43bf6b=_0x3cb033['deletions'][_0x36ef6e],_0x3e5cff=_0x3cb033['insertions'][_0x36ef6e];for(const {userId:_0x5b6665}of this['_touchedMarkers']['values']())null!==_0x5b6665&&_0x7bfb3f['add'](_0x5b6665);for(const {userId:_0x4aab53}of this['_touchedRoots']['values']())null!==_0x4aab53&&_0x7bfb3f['add'](_0x4aab53);this['_markChanges'](_0x3e5cff,_0x4014a2['insertions'][_0x36ef6e],_0x54e144,'insertion',_0x7bfb3f),this['_markChanges'](_0x43bf6b,_0x4014a2['deletions'][_0x36ef6e],_0x5cf4e0,'deletion',_0x7bfb3f),_0x137349[_0x36ef6e]={'insertions':this['_prepareViewToSave'](_0x3e5cff),'deletions':this['_prepareViewToSave'](_0x43bf6b),'attachChange':this['_touchedRoots']['get'](_0x36ef6e)||null,'attributesBefore':_0xf117d4(this['_baseRootsAttributes']['get'](_0x36ef6e))||{},'attributesAfter':_0xf117d4(this['_diffRootsAttributes']['get'](_0x36ef6e))};}return{'diffData':_0x137349,'authorsIds':Array['from'](_0x7bfb3f)};}['_processRootBeforeSave'](_0x186636){for(const [,_0x17f1d3]of _0x186636['markers']){const _0x3e851c=_0x17f1d3['start']['getAncestors']()['filter'](_0x317b3c=>'tableCell'==_0x317b3c['name']);for(const _0x2632bc of _0x3e851c)0x1==_0x2632bc['childCount']&&_0x2632bc['getChild'](0x0)['is']('element','paragraph')&&_0x2632bc['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x558e61){this['_processRootBeforeSave'](_0x558e61);const _0x2be7d7=this['editor']['data']['toView'](_0x558e61,{}),_0x3c3edc=Array['from'](_0x2be7d7['getChildren']())['map'](_0x50beed=>this['_getViewJson'](_0x50beed));return JSON['stringify'](_0x3c3edc);}['_getViewJson'](_0x5d6a89){if(_0x5d6a89['is']('$text'))return _0x5d6a89['data'];{const _0x20c901=_0x5d6a89;return{'type':Object['keys'](P)['find'](_0x17ab1a=>_0x5d6a89 instanceof P[_0x17ab1a]),'name':_0x20c901['name'],'attributes':Array['from'](_0x20c901['getAttributes']()),'children':Array['from'](_0x20c901['getChildren']())['map'](_0x5d7be0=>this['_getViewJson'](_0x5d7be0))};}}['_markChanges'](_0x4110c4,_0x3954f5,_0x5ee15b,_0x426b54,_0x905917){let _0x516f0c=null,_0x34db58=null,_0x129acf=0x0;const _0x2fce2e=this['editor']['model'];for(let _0xfd7336=0x0;_0xfd7336<_0x3954f5['length'];_0xfd7336++){const _0xaafe8a=this['_getVidAttributeName'](_0x3954f5[_0xfd7336]),_0x1f53f=_0x3954f5[_0xfd7336]['item']['getAttribute'](_0xaafe8a),_0x180f2a=_0x5ee15b['get'](_0x1f53f),_0x17d56b=_0xfd7336==_0x3954f5['length']-0x1;(!_0x516f0c&&_0x180f2a&&(_0x516f0c=_0x180f2a,_0x34db58=_0x3954f5[_0xfd7336]),_0x516f0c&&(!_0x180f2a||_0x180f2a['userId']!=_0x516f0c['userId']))&&(_0x12bb3f(_0x180f2a,B(_0x34db58,_0x4110c4,_0x2fce2e),B(_0x3954f5[_0xfd7336],_0x4110c4,_0x2fce2e)),_0x516f0c=_0x180f2a||null,_0x34db58=_0x180f2a?_0x3954f5[_0xfd7336]:null),_0x516f0c&&_0x17d56b&&_0x12bb3f(_0x180f2a,B(_0x34db58,_0x4110c4,_0x2fce2e),J(_0x3954f5[_0xfd7336],_0x4110c4,_0x2fce2e));}function _0x12bb3f(_0x5b8faa,_0x382cc8,_0x21d066){const _0x53d718=_0x516f0c['userId'],_0x5089b0='revision:'+_0x426b54+':'+_0x53d718+':'+_0x129acf++,_0x28f655=_0x2fce2e['createRange'](_0x382cc8,_0x21d066);_0x4110c4['markers']['set'](_0x5089b0,_0x28f655),null!==_0x53d718&&_0x905917['add'](_0x53d718);}}['_getVidAttributeName'](_0x59284f){switch(_0x59284f['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x35a22d,_0x481d34){_0x35a22d['baseVersion']=null;for(const _0x32d6db in _0x35a22d){const _0x24a5d5=_0x35a22d[_0x32d6db];if(_0x24a5d5 instanceof gt){const _0xf32f1=_0x481d34['get'](_0x24a5d5['root']['rootName']);_0x35a22d[_0x32d6db]=this['_fixPosition'](_0x24a5d5,_0xf32f1);}if(_0x24a5d5 instanceof vt){const _0x343f3e=_0x481d34['get'](_0x24a5d5['root']['rootName']);_0x35a22d[_0x32d6db]=this['_fixRange'](_0x24a5d5,_0x343f3e);}'root'===_0x32d6db&&(_0x35a22d['root']=_0x481d34['get'](_0x35a22d['root']['rootName']));}}['_fixRange'](_0x3babc3,_0x1f23e0){return this['editor']['model']['createRange'](this['_fixPosition'](_0x3babc3['start'],_0x1f23e0),this['_fixPosition'](_0x3babc3['end'],_0x1f23e0));}['_fixPosition'](_0x3750f6,_0x1094bf){return this['editor']['model']['createPositionFromPath'](_0x1094bf,_0x3750f6['path'],_0x3750f6['stickiness']);}['_handleInsertOperation'](_0x2a965f){const _0xa8a03c=this['_idsRoots']['get'](_0x2a965f['position']['root']['rootName']),_0x2c8682=this['_fixPosition'](_0x2a965f['position'],_0xa8a03c),_0x5d8659=null===_0x2a965f['_authorId']?null:_0x2a965f['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x57e3a4=_0x2c8682['parent'],_0x168c3b=this['_revisionId'],_0x123a02=[];for(const _0x174635 of _0x2a965f['nodes'])if(_0x174635['is']('element'))_0x123a02['push'](this['_makeIdsRoot'](_0x174635));else{for(let _0x46335d=0x0;_0x46335d<_0x174635['offsetSize'];_0x46335d++)_0x123a02['push'](new ft('$text',{'vid':this['_revisionId']++}));}const _0x1a0a69=this['_revisionId'];for(let _0x4cb3d4=_0x168c3b;_0x4cb3d4<_0x1a0a69;_0x4cb3d4++)this['_touched']['set'](_0x4cb3d4,{'userId':_0x5d8659});_0x57e3a4['_insertChild'](_0x2c8682['offset'],_0x123a02);}['_handleMoveOperation'](_0x4df1c7){(_0x4df1c7=this['_cloneOperation'](_0x4df1c7,this['_idsRoots']))['_execute']();const _0xd7ef73=null===_0x4df1c7['_authorId']?null:_0x4df1c7['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2224db=_0x4df1c7['getMovedRangeStart'](),_0x1ff783=_0x2224db['parent'],_0x56f871=_0x2224db['offset'];!function _0x11723d(_0x49c70b,_0x5bc5fb,_0x2390f5,_0x5d3ea5){for(let _0x5e87f3=_0x2390f5;_0x5e87f3<_0x5d3ea5;_0x5e87f3++){const _0x1a1c8e=_0x5bc5fb['getChild'](_0x5e87f3);_0x1a1c8e['is']('element','$text')?_0x49c70b['set'](_0x1a1c8e['getAttribute']('vid'),{'userId':_0xd7ef73}):(_0x49c70b['set'](_0x1a1c8e['getAttribute']('vid_start'),{'userId':_0xd7ef73}),_0x11723d(_0x49c70b,_0x1a1c8e,0x0,_0x1a1c8e['childCount']),_0x49c70b['set'](_0x1a1c8e['getAttribute']('vid_end'),{'userId':_0xd7ef73}));}}(this['_touched'],_0x1ff783,_0x56f871,_0x56f871+_0x4df1c7['howMany']);}['_handleMergeOperation'](_0x4ee501){const _0xb9a58a=null===(_0x4ee501=this['_cloneOperation'](_0x4ee501,this['_idsRoots']))['_authorId']?null:_0x4ee501['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x490819=_0x4ee501['targetPosition']['parent'],_0x5ca6a7=_0x4ee501['sourcePosition']['parent'],_0x5dec5c=_0x490819['getAttribute']('vid_end'),_0x1c916f=_0x5ca6a7['getAttribute']('vid_start');_0x490819['_setAttribute']('vid_end',_0x5ca6a7['getAttribute']('vid_end')),_0x5ca6a7['_setAttribute']('vid_end',_0x5dec5c),this['_touched']['set'](_0x1c916f,{'userId':_0xb9a58a}),this['_touched']['set'](_0x5dec5c,{'userId':_0xb9a58a}),_0x4ee501['_execute']();}['_handleSplitOperation'](_0x3c4a8d){const _0x33c800=null===(_0x3c4a8d=this['_cloneOperation'](_0x3c4a8d,this['_idsRoots']))['_authorId']?null:_0x3c4a8d['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x523396=_0x3c4a8d['graveyardPosition'],_0x138736=_0x3c4a8d['splitPosition']['parent'];_0x3c4a8d['_execute']();const _0x3f6308=_0x138736['getAttribute']('vid_end'),_0x32801e=_0x3c4a8d['insertionPosition']['nodeAfter'];if(_0x523396){const _0x599d77=_0x32801e['getAttribute']('vid_end'),_0x5d6549=_0x138736['getAttribute']('vid_end');_0x138736['_setAttribute']('vid_end',_0x599d77),_0x32801e['_setAttribute']('vid_end',_0x5d6549),this['_touched']['set'](_0x138736['getAttribute']('vid_end'),{'userId':_0x33c800}),this['_touched']['set'](_0x32801e['getAttribute']('vid_start'),{'userId':_0x33c800});}else{const _0x2ad05f=this['_revisionId']++,_0x18a4a5=this['_revisionId']++;_0x138736['_setAttribute']('vid_end',_0x2ad05f),_0x32801e['_setAttribute']('vid_start',_0x18a4a5),_0x32801e['_setAttribute']('vid_end',_0x3f6308),this['_touched']['set'](_0x2ad05f,{'userId':_0x33c800}),this['_touched']['set'](_0x18a4a5,{'userId':_0x33c800});}}['_handleMarkerOperation'](_0x3f7478){if(!_0x3f7478['affectsData'])return;const _0x4bef93=(_0x3f7478=this['_cloneOperation'](_0x3f7478,this['_diffRoots']))['oldRange']?_0x3f7478['oldRange']['root']:null,_0x4f1637=_0x3f7478['newRange']?_0x3f7478['newRange']['root']:null;_0x4bef93&&this['_markers']['delete'](_0x3f7478['name']),_0x4f1637&&this['_markers']['set'](_0x3f7478['name'],_0x3f7478['newRange']['clone']());const _0x763697=null===_0x3f7478['_authorId']?null:_0x3f7478['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4cff13=_0x3f7478['name'];if(!this['_touchedMarkers']['has'](_0x4cff13))return void this['_touchedMarkers']['set'](_0x4cff13,{'range':_0x3f7478['oldRange'],'userId':_0x763697});const _0x1018f2=this['_touchedMarkers']['get'](_0x4cff13),_0x32f4c7=_0x1018f2['range'],_0x3a08f9=_0x3f7478['newRange'];null==_0x32f4c7&&null==_0x3a08f9||_0x32f4c7&&_0x3a08f9&&_0x32f4c7['isEqual'](_0x3a08f9)?this['_touchedMarkers']['delete'](_0x3f7478['name']):_0x1018f2['userId']=_0x763697;}['_handleRootOperation'](_0x3c288b,_0x4d2374){this['_diffRoots']['has'](_0x3c288b['rootName'])?this['_diffRoots']['get'](_0x3c288b['rootName'])['_isAttached']=_0x3c288b['isAdd']:(this['_diffRoots']['set'](_0x3c288b['rootName'],F(_0x3c288b['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x3c288b['rootName'],{}),_0x4d2374&&this['_idsRoots']['set'](_0x3c288b['rootName'],F(_0x3c288b['rootName'],!0x0)));const _0x215711=null===_0x3c288b['_authorId']?null:_0x3c288b['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1a41b5=this['_touchedRoots']['get'](_0x3c288b['rootName']);_0x1a41b5&&_0x1a41b5['userId']===_0x215711?this['_touchedRoots']['delete'](_0x3c288b['rootName']):this['_touchedRoots']['set'](_0x3c288b['rootName'],{'userId':_0x215711,'isAttached':_0x3c288b['isAdd']});}['_handleRootAttributeOperation'](_0x55af01){const _0x59512d=this['_diffRootsAttributes']['get'](_0x55af01['root']['rootName']);null===_0x55af01['newValue']?delete _0x59512d[_0x55af01['key']]:_0x59512d[_0x55af01['key']]=_0x55af01['newValue'];}}function T(_0x23b03e){const _0x39f6bc=F(_0x23b03e['rootName'],_0x23b03e['isAttached']());for(const _0x23ac21 of _0x23b03e['getChildren']()){const _0x1f7ff9=_0x23ac21['_clone'](!0x0);_0x39f6bc['_appendChild'](_0x1f7ff9);}return _0x39f6bc;}function F(_0xaf229,_0x3151d1=!0x0){const _0x2df401=new mt();return _0x2df401['rootName']=_0xaf229,_0x2df401['_isAttached']=_0x3151d1,_0x2df401['isAttached']=()=>_0x2df401['_isAttached'],_0x2df401;}function B(_0x46e31e,_0x277328,_0x40a1ba){const _0x4c4fae='elementEnd'==_0x46e31e['type']?_0x40a1ba['createPositionAt'](_0x46e31e['item'],'end'):_0x40a1ba['createPositionBefore'](_0x46e31e['item']);return _0x40a1ba['createPositionFromPath'](_0x277328,_0x4c4fae['path'],_0x4c4fae['stickiness']);}function J(_0x459e51,_0x4f7d39,_0x468714){const _0x4b65ba='elementStart'==_0x459e51['type']?_0x468714['createPositionAt'](_0x459e51['item'],0x0):_0x468714['createPositionAfter'](_0x459e51['item']);return _0x468714['createPositionFromPath'](_0x4f7d39,_0x4b65ba['path'],_0x4b65ba['stickiness']);}class ns extends _0x16162e{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x230e7c,_0x2b76db){super(_0x230e7c),this['focusTracker']=new _0x32c628(),this['keystrokes']=new _0x29befb(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x2b76db),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),ts(this);}['render'](){super['render'](),_0x4f1d3f({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x4bc9fe=_0x437908=>_0x437908['stopPropagation']();this['keystrokes']['set']('arrowright',_0x4bc9fe),this['keystrokes']['set']('arrowleft',_0x4bc9fe),this['keystrokes']['set']('arrowup',_0x4bc9fe),this['keystrokes']['set']('arrowdown',_0x4bc9fe);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x5a88cd){this['revisionNameInputView']['fieldView']['element']['value']=_0x5a88cd['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x4756df){const _0x4453f8=new nt(this['locale'],_0x194c4c),_0xad2a81=_0x4453f8['fieldView'];_0xad2a81['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x4feec1=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0x4756df&&(_0x4feec1+='\x20('+m(this['locale'],'optional')+')'),(_0x4453f8['label']=_0x4feec1,_0xad2a81['on']('input',()=>{this['revisionNameInputValue']=_0xad2a81['element']['value']['trim']();}),_0x4453f8);}}class u extends _0x21f9a0{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l];}['_saveRevisionFormView'];['init'](){const _0x770192=this['editor'],_0x1d144f=_0x770192['plugins']['get']('RevisionTracker');_0x770192['ui']['componentFactory']['add']('revisionHistory',_0x655e8e=>{const _0x2fbbf7=_0x18051a(_0x655e8e),_0x60a9b=_0x2fbbf7['panelView']['children'],_0x19fa7d=new te(_0x655e8e),_0x34ed5e=new _0x3cf401(_0x655e8e),_0x667f6b=new _0x280a4e(_0x655e8e),_0x36cf8b=new _0x3cf401(_0x655e8e),_0xb088cd=new _0x280a4e(_0x655e8e);return _0x2fbbf7['bind']('isEnabled')['to'](_0x1d144f,'isReady',_0x1d144f,'isEnabled',_0x770192,'isReadOnly',(_0x1f656a,_0x18cdf5,_0x4a3236)=>_0x1f656a&&_0x18cdf5&&!_0x4a3236),_0x2fbbf7['buttonView']['set']({'icon':_0x7e0d0d['history'],'label':m(_0x655e8e,'Revision\x20history'),'tooltip':!0x0}),_0x667f6b['set']({'label':m(_0x655e8e,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x667f6b['bind']('isEnabled')['to'](_0x1d144f,'isReady',_0x1d144f,'isEnabled',_0x770192,'isReadOnly',(_0x1a00d7,_0x140252,_0x4697a9)=>_0x1a00d7&&_0x140252&&!_0x4697a9),_0x667f6b['on']('execute',()=>this['_showDialog']()),_0xb088cd['set']({'label':m(_0x655e8e,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0xb088cd['bind']('isEnabled')['to'](_0x1d144f,'isReady',_0x770192,'isReadOnly',(_0x1b2174,_0x6ecc45)=>_0x1b2174&&!_0x6ecc45),_0xb088cd['on']('execute',()=>{_0x770192['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x2fbbf7['isOpen']=!0x1,_0x770192['editing']['view']['focus']();}),_0x34ed5e['children']['add'](_0x667f6b),_0x36cf8b['children']['add'](_0xb088cd),_0x19fa7d['role']='menu',_0x19fa7d['items']['addMany']([_0x34ed5e,_0x36cf8b]),_0x60a9b['add'](_0x19fa7d),_0x2fbbf7;}),_0x770192['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x40fc84=this['editor'],_0x170b52=_0x40fc84['locale'],_0x372b33=new _0x1ae8fc(_0x170b52),_0x19c6db=new _0x1e1704(_0x170b52);_0x372b33['buttonView']['set']({'icon':_0x7e0d0d['history'],'label':m(_0x170b52,'Revision\x20history')});const _0x44a44a=new _0xe81ca7(_0x170b52,_0x372b33),_0x133701=new _0x3601a1(_0x170b52);_0x133701['set']({'label':m(_0x170b52,'Save\x20current\x20revision')}),_0x133701['delegate']('execute')['to'](_0x372b33),_0x133701['on']('execute',()=>{this['_showDialog']();}),_0x44a44a['children']['add'](_0x133701),_0x19c6db['items']['add'](_0x44a44a);const _0x38bfd6=new _0xe81ca7(_0x170b52,_0x372b33),_0xbec84d=new _0x3601a1(_0x170b52);return _0xbec84d['set']({'label':m(_0x170b52,'Open\x20revision\x20history')}),_0xbec84d['delegate']('execute')['to'](_0x372b33),_0xbec84d['on']('execute',()=>{_0x40fc84['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x38bfd6['children']['add'](_0xbec84d),_0x19c6db['items']['add'](_0x38bfd6),_0x372b33['panelView']['children']['add'](_0x19c6db),_0x372b33;}['_showDialog'](){const _0xaf8ee5=this['editor'],_0x583ff9=_0xaf8ee5['locale'],_0x4b479e=_0xaf8ee5['plugins']['get']('Dialog'),_0x218357=_0xaf8ee5['plugins']['get']('RevisionTracker');function _0xa43ff8(_0x48a92d){_0xaf8ee5['config']['get']('revisionHistory.requireRevisionName')&&''===_0x48a92d['revisionName']?_0x48a92d['revisionNameInputView']['errorText']=m(_0x583ff9,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0xaf8ee5['plugins']['get'](l)['saveRevision']({'name':_0x48a92d['revisionName']}),_0x4b479e['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0xa43ff8(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x4b479e['show']({'id':'revisionSave','title':m(_0x583ff9,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0xaf8ee5['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x4b479e['hide']()},{'label':m(_0xaf8ee5['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x4afa61){_0x4afa61['bind']('isEnabled')['to'](_0x218357,'isReady',_0x218357,'isEnabled',_0xaf8ee5,'isReadOnly',(_0x197a97,_0x4bab92,_0x551c25)=>_0x197a97&&_0x4bab92&&!_0x551c25);},'onExecute':()=>_0xa43ff8(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x473683=this['editor'],_0xfd06bd=_0x473683['locale'];this['_saveRevisionFormView']=new ns(_0xfd06bd,_0x473683['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class X extends _0x16162e{['changeId'];['_model'];constructor(_0x5c14c4,_0x2aba45){super(_0x5c14c4),this['_model']=_0x2aba45,this['changeId']=_0x2aba45['id'];const _0x170960=this['bindTemplate'],_0x9cb4f4=m(_0x5c14c4,_0x2aba45['data']['isSuggestion']?'Suggested\x20by':'add'==_0x2aba45['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x2aba45['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x170960['to']('type',_0x522ca4=>'ck-revision-change__'+_0x522ca4)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x9cb4f4}]},{'text':'\x20'+_0x2aba45['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
25
- _0x11050d(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x5d9564){super(),this['id']=_0x5d9564['id']||_0x2afce3(),this['author']=_0x5d9564['author'],this['type']=_0x5d9564['type'],this['data']=_0x5d9564['data']||{},this['rootName']=_0x5d9564['rootName'],this['set']('createdAt',_0x5d9564['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class f{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x41a40f,_0x275f1a){this['newRevisionId']=_0x41a40f,this['oldRevisionId']=_0x275f1a,this['changes']=new _0x4043e7();}['_setChanges'](_0x4f3118){for(const _0x50c1ad of _0x4f3118)this['changes']['add'](_0x50c1ad);}}const Y={'c':_0x40e8e0,'a':_0x2d478c,'e':_0x2e2901,'r':_0x4126a5,'u':_0x3c991b};class d extends _0x21f9a0{['repository'];['adapter'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x36bdfa,_0x24fa0b,j];}constructor(_0x338ad6){super(_0x338ad6),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),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',(_0x348a20,_0x3a36a4,_0x4827e4)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x22dd88=>{for(const _0x4cfde9 of this['editor']['editing']['view']['document']['roots'])_0x4827e4?_0x22dd88['removeClass']('ck-editor__editable__overlay',_0x4cfde9):_0x22dd88['addClass']('ck-editor__editable__overlay',_0x4cfde9);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x6a624e=>null!==_0x6a624e),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x55aa3d,_0x2deb24,_0x2fcfc2)=>_0x55aa3d&&_0x2fcfc2?_0x2deb24['changes']['getIndex'](_0x2fcfc2):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x360d01,_0x57a60f)=>_0x360d01?_0x57a60f['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['adapter']=null,this['_balloon']=this['editor']['plugins']['get'](_0x24fa0b);}['init'](){const _0x343aaf=this['editor'],_0x20b9d2=new yt(_0x343aaf,{'direction':'backward'}),_0x29407c=new yt(_0x343aaf,{'direction':'forward'});(_0x343aaf['commands']['add']('showPreviousChange',_0x20b9d2),_0x343aaf['commands']['add']('showNextChange',_0x29407c),_0x343aaf['commands']['add']('restoreRevision',new _t(_0x343aaf)),this['on']('change:numberOfChanges',()=>{_0x20b9d2['refresh'](),_0x29407c['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x343aaf['enableReadOnlyMode']('revision-viewer'),_0x343aaf['plugins']['has']('WidgetToolbarRepository'))&&_0x343aaf['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionData'](_0x39033b){await this['loadRevisionData'](_0x39033b);const _0x2d4f98={};for(const _0x319b74 in _0x39033b['diffData']){if(_0x39033b['diffData'][_0x319b74]['attachChange']&&!_0x39033b['diffData'][_0x319b74]['attachChange']['isAttached'])continue;const _0x13c4f2=this['_removeRevisionMarkers'](JSON['parse'](_0x39033b['diffData'][_0x319b74]['insertions'])),_0x530d51=this['editor']['editing']['view']['document'],_0x417031=new _0x35a7c1(_0x530d51,_0x13c4f2['map'](_0x439b06=>this['_getViewObj'](_0x439b06)));this['editor']['data']['processor']['useFillerType']('marked'),_0x2d4f98[_0x319b74]=this['editor']['data']['processor']['toData'](_0x417031),this['editor']['data']['processor']['useFillerType']('default');}return _0x2d4f98;}async['getRevisionRootsAttributes'](_0x33d9e2){await this['loadRevisionData'](_0x33d9e2);const _0x3900ff={};for(const _0x15024f in _0x33d9e2['diffData'])_0x33d9e2['diffData'][_0x15024f]['attachChange']&&!_0x33d9e2['diffData'][_0x15024f]['attachChange']['isAttached']||(_0x3900ff[_0x15024f]=_0x33d9e2['diffData'][_0x15024f]['attributesAfter']||{});return _0x3900ff;}['_removeRevisionMarkers'](_0x57258a){return(_0x57258a=_0x57258a['filter'](_0x46cd2c=>!_0x46cd2c['name']||'revision-start'!==_0x46cd2c['name']&&'revision-end'!==_0x46cd2c['name']))['forEach'](_0x354b31=>{'string'!=typeof _0x354b31&&(_0x354b31['children']=this['_removeRevisionMarkers'](_0x354b31['children']),_0x354b31['attributes']=_0x354b31['attributes']['filter'](_0xaac6bc=>!_0xaac6bc[0x0]['startsWith']('data-revision-')));}),_0x57258a;}async['compare'](_0x364ea9,_0xc2d106,_0x514382=!0x1){if(!this['isEnabled'])return;const _0x56ff67=this['diff'],_0x2f4c13=this['repository'],_0x5658ad='string'==typeof _0x364ea9?_0x2f4c13['getRevision'](_0x364ea9):_0x364ea9,_0x189532='string'==typeof _0xc2d106?_0x2f4c13['getRevision'](_0xc2d106):_0xc2d106,_0x4ea062=_0x5658ad['id'],_0x2a1de0=_0x189532?_0x189532['id']:null;if(!_0x514382&&this['diff']&&this['diff']['newRevisionId']===_0x4ea062&&this['diff']['oldRevisionId']===_0x2a1de0)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new f(_0x4ea062,_0x2a1de0);const _0x353b98=this['_getRevisionsRange'](_0x5658ad,_0x189532,!0x0)['map'](_0x18380b=>this['loadRevisionData'](_0x18380b));return _0x353b98['push'](new Promise(_0x51238a=>{setTimeout(_0x51238a,0x14);})),Promise['all'](_0x353b98)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x1c2802=this['_getDiff'](_0x4ea062,_0x2a1de0);for(const _0x1ddc8e of _0x1c2802['changes'])this['_changeIdToChange']['set'](_0x1ddc8e['id'],_0x1ddc8e);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x5f39ae=>{for(const _0x4cf2d0 of this['editor']['model']['document']['getRootNames']())_0x5f39ae['detachRoot'](_0x4cf2d0);for(const _0x22e8a3 of Object['keys'](_0x1c2802['model'])){const _0x3d658b=_0x5f39ae['addRoot'](_0x22e8a3);for(const _0x317b5a of Object['keys'](_0x1c2802['attributes'][_0x22e8a3]))_0x5f39ae['setAttribute'](_0x317b5a,_0x1c2802['attributes'][_0x22e8a3][_0x317b5a],_0x3d658b);_0x5f39ae['insert'](_0x1c2802['model'][_0x22e8a3],_0x3d658b,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x1c2802['changes'])),this['isReady']=!0x0;})['catch'](_0x24c306=>{console['error'](_0x24c306),this['_cleanUp'](),_0x56ff67&&(this['diff']=_0x56ff67),this['isReady']=!0x0;});}['addRevisionData'](_0x114df4,_0x4e670d){const _0x102c78=this['repository']['createRevision'](_0x114df4);return _0x102c78['on']('_update',(_0x439da2,_0x699ac1,_0x31cc2b)=>_0x4e670d(_0x699ac1,_0x31cc2b,_0x102c78)),this['repository']['addRevision'](_0x102c78),_0x102c78;}['loadRevisionData'](_0x9aa3dc){if(!_0x9aa3dc||_0x9aa3dc['diffData'])return Promise['resolve']();{const _0x52c182=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x52c182,'revisionId':_0x9aa3dc['id']})['then'](_0xa39ee=>{_0x9aa3dc['_update']({'diffData':_0xa39ee['diffData']},!0x0);});}}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x3c5ddb=>{for(const _0x149fef of this['editor']['model']['document']['getRootNames']())_0x3c5ddb['detachRoot'](_0x149fef);});}['_sortAndFilterDiffChanges'](_0x2b1d9b){const _0x34dbbd=[],_0x4e78a9=new Map();for(const _0x3e21b8 of this['editor']['model']['document']['getRootNames']()){const _0x42d7c5=this['editor']['editing']['view']['getDomRoot'](_0x3e21b8);if(!_0x42d7c5)continue;const _0xd82334=_0x42d7c5['getClientRects']()['item'](0x0);_0xd82334&&(_0x34dbbd['push'](_0x3e21b8),_0x4e78a9['set'](_0x3e21b8,_0xd82334));}return _0x34dbbd['sort']((_0x237300,_0x3ae4dd)=>{const _0x1c3e92=_0x4e78a9['get'](_0x237300),_0x3df89f=_0x4e78a9['get'](_0x3ae4dd);return _0x1c3e92['y']-_0x3df89f['y']||_0x1c3e92['x']-_0x3df89f['x'];}),(_0x2b1d9b=_0x2b1d9b['filter'](_0x19d8bd=>_0x34dbbd['includes'](_0x19d8bd['rootName'])))['sort']((_0x4940b2,_0x31bd76)=>_0x34dbbd['indexOf'](_0x4940b2['rootName'])-_0x34dbbd['indexOf'](_0x31bd76['rootName'])),_0x2b1d9b;}['_makeTape'](_0x551fd2){const _0x510874=Array['from'](_0x551fd2['markers'])['filter'](([_0x1677c9,_0x35de24])=>_0x1677c9['startsWith']('revision:')&&!_0x35de24['isCollapsed']),_0xd3d7ad=Array['from'](this['editor']['model']['createRangeIn'](_0x551fd2)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x510874['length'])for(const _0x4bb108 of _0xd3d7ad){const [_0x2fd3cc,_0x17e944]=_0x510874[0x0],[,_0x13ebae,_0x1058fd]=_0x2fd3cc['split'](':');if(_0x17e944['end']['isEqual'](_0x4bb108['nextPosition'])&&_0x510874['shift'](),(_0x4bb108['previousPosition']['isEqual'](_0x17e944['start'])||_0x4bb108['previousPosition']['isAfter'](_0x17e944['start']))&&('insertion'==_0x13ebae?_0x4bb108['isAdded']={'userId':_0x1058fd}:'deletion'==_0x13ebae&&(_0x4bb108['isRemoved']={'userId':_0x1058fd})),0x0==_0x510874['length'])break;}return _0xd3d7ad;}['_refreshStartEndIndex'](_0x367393){const _0x516e27=new Map();for(let _0x2618fb=0x0;_0x2618fb<_0x367393['length'];_0x2618fb++)'text'===_0x367393[_0x2618fb]['type']?(_0x367393[_0x2618fb]['item']['startIndex']=_0x2618fb,_0x367393[_0x2618fb]['item']['endIndex']=_0x2618fb):('elementStart'===_0x367393[_0x2618fb]['type']?_0x367393[_0x2618fb]['item']['startIndex']=_0x2618fb:'elementEnd'===_0x367393[_0x2618fb]['type']&&(_0x367393[_0x2618fb]['item']['endIndex']=_0x2618fb),_0x516e27['set'](_0x367393[_0x2618fb]['id'],_0x2618fb));for(const _0x2d9b1c of _0x516e27['values']())'elementStart'===_0x367393[_0x2d9b1c]['type']?_0x367393[_0x2d9b1c]['item']['endIndex']=_0x516e27['get'](_0x367393[_0x2d9b1c]['pairId']):'elementEnd'===_0x367393[_0x2d9b1c]['type']&&(_0x367393[_0x2d9b1c]['item']['startIndex']=_0x516e27['get'](_0x367393[_0x2d9b1c]['pairId']));}['_processTape'](_0x1ce754){for(let _0x4dedc8=0x0;_0x4dedc8<_0x1ce754['length'];_0x4dedc8++){if('elementStart'===_0x1ce754[_0x4dedc8]['type'])_0x1ce754[_0x4dedc8]['item']['startIndex']=_0x4dedc8;else{if('elementEnd'===_0x1ce754[_0x4dedc8]['type']){_0x1ce754[_0x4dedc8]['item']['endIndex']=_0x4dedc8;const _0x1e56ce=_0x1ce754[_0x4dedc8]['item']['startIndex'];_0x1ce754[_0x1e56ce]['pairId']=_0x1ce754[_0x4dedc8]['id'],_0x1ce754[_0x4dedc8]['pairId']=_0x1ce754[_0x1e56ce]['id'];}else _0x1ce754[_0x4dedc8]['item']['startIndex']=_0x4dedc8,_0x1ce754[_0x4dedc8]['item']['endIndex']=_0x4dedc8,_0x1ce754[_0x4dedc8]['pairId']=null;}_0x1ce754[_0x4dedc8]['markersStart']||(_0x1ce754[_0x4dedc8]['markersStart']=[],_0x1ce754[_0x4dedc8]['markersEnd']=[]);}}['_markInsertions'](_0x5c7496,_0x328eb8){const _0x4789af=_0x5c7496['filter'](_0x45cd1e=>!_0x45cd1e['isAdded']);for(let _0x1c135d=0x0;_0x1c135d<_0x328eb8['length'];_0x1c135d++)_0x328eb8[_0x1c135d]['isAdded']&&(_0x4789af[_0x1c135d]['isAdded']=_0x328eb8[_0x1c135d]['isAdded']);}['_makeModelFromViewString'](_0x134078){const _0x34b15c=JSON['parse'](_0x134078),_0x3ba9e4=this['editor']['editing']['view']['document'],_0x30c524=new _0x35a7c1(_0x3ba9e4,_0x34b15c['map'](_0x5463ba=>this['_getViewObj'](_0x5463ba)));return this['editor']['data']['toModel'](_0x30c524);}['_getViewObj'](_0x591729){const _0xaf3f4d=this['editor']['editing']['view']['document'];if('string'==typeof _0x591729)return new _0xd0ebb3(_0xaf3f4d,_0x591729);{const _0xd01608=_0x591729['children']['map'](_0x3c8fe4=>this['_getViewObj'](_0x3c8fe4));return new(Y[_0x591729['type']]||_0x1fc26e)(_0xaf3f4d,_0x591729['name'],_0x591729['attributes'],_0xd01608);}}['_getDiff'](_0x5194eb,_0x57acc0=null){const _0x585dd8=this['repository']['getRevision'](_0x5194eb),_0x4aa6ad=_0x57acc0?this['repository']['getRevision'](_0x57acc0):null,_0x244a33=this['_getRevisionsRange'](_0x585dd8,_0x4aa6ad),_0x4781b7=_0x244a33[_0x244a33['length']-0x1],_0xb1b073=new Map(),_0x2c8ad2={'model':{},'attributes':{},'changes':[]},_0x5e9929=new Set(),_0x45fee6=new Map();for(let _0x5c771f=_0x244a33['length']-0x1;_0x5c771f>=0x0;_0x5c771f--){const _0x1b5a03=_0x244a33[_0x5c771f];for(const _0x4122d7 of Object['keys'](_0x1b5a03['diffData']))if(_0x1b5a03['diffData'][_0x4122d7]['attachChange']){const _0x16ce41=_0x1b5a03['diffData'][_0x4122d7]['attachChange'];_0x16ce41['isAttached']?(_0x5e9929['add'](_0x4122d7),_0x45fee6['has'](_0x4122d7)&&_0x45fee6['get'](_0x4122d7)['userId']==_0x16ce41['userId']?_0x45fee6['delete'](_0x4122d7):_0x45fee6['set'](_0x4122d7,_0x16ce41)):_0x45fee6['has'](_0x4122d7)?(_0x5e9929['delete'](_0x4122d7),_0x45fee6['delete'](_0x4122d7)):(_0x5e9929['add'](_0x4122d7),_0x45fee6['set'](_0x4122d7,_0x16ce41));}else _0x5e9929['add'](_0x4122d7);}for(const _0x462f35 of _0x5e9929){const _0x3a31a6=_0x45fee6['has'](_0x462f35)&&!_0x45fee6['get'](_0x462f35)['isAttached'];let _0x11aa8e=_0x3a31a6?_0x244a33['length']-0x1:0x0;const _0x44c4a0=_0x3a31a6?-0x1:0x1;for(;_0x244a33[_0x11aa8e];){const _0x159afe=_0x244a33[_0x11aa8e];if(_0x159afe['diffData'][_0x462f35]){const _0x3749f4=_0x3a31a6?_0x159afe['diffData'][_0x462f35]['attributesBefore']:_0x159afe['diffData'][_0x462f35]['attributesAfter'];_0x2c8ad2['attributes'][_0x462f35]=_0x3749f4?_0xf117d4(_0x3749f4):{};break;}_0x11aa8e+=_0x44c4a0;}}for(const _0x2355cf of _0x244a33){_0x2355cf['model']={};for(const _0x49391a of _0x2355cf['authors'])_0xb1b073['set'](_0x49391a['id'],_0x49391a);for(const _0x51497d of _0x5e9929){const _0x433379=_0x2355cf['diffData'][_0x51497d]?_0x2355cf['diffData'][_0x51497d]['insertions']:'[]',_0x5040b1=_0x2355cf['diffData'][_0x51497d]?_0x2355cf['diffData'][_0x51497d]['deletions']:'[]';_0x2355cf['model'][_0x51497d]={'insertions':this['_makeModelFromViewString'](_0x433379),'deletions':this['_makeModelFromViewString'](_0x5040b1)};}}for(const _0x58f069 of _0x5e9929){let _0x4e984a=null,_0x266715=0x0;const _0x1f1f30=new Map(Array['from'](_0x585dd8['model'][_0x58f069]['insertions']['markers'])['filter'](([_0x506e19])=>!_0x506e19['startsWith']('revision:')));let _0x10222b=0x0;for(const _0x45daf2 of _0x244a33){const _0x6ee7c2=this['_makeTape'](_0x45daf2['model'][_0x58f069]['insertions']);_0x45daf2==_0x585dd8?(_0x4e984a=_0x6ee7c2,_0x266715=_0x4e984a['length'],_0x4e984a['forEach'](_0x3ebf52=>{_0x3ebf52['id']=_0x10222b++;}),this['_processTape'](_0x4e984a)):this['_markInsertions'](_0x4e984a,_0x6ee7c2);const _0x371fae=_0x4e984a['filter'](_0x142871=>!_0x142871['isAdded'])['map'](_0x1a29ef=>_0x1a29ef['id']);let _0x3e06db=0x0;const _0x1b9259=this['_makeTape'](_0x45daf2['model'][_0x58f069]['deletions']);_0x1b9259['forEach'](_0x43ddd0=>{_0x43ddd0['isRemoved']?_0x43ddd0['id']=_0x266715++:_0x43ddd0['id']=_0x371fae[_0x3e06db++];}),this['_processTape'](_0x1b9259),this['_setDistance'](_0x4e984a,'isAdded'),this['_setDistance'](_0x1b9259,'isRemoved'),_0x45daf2==_0x585dd8&&this['_markMarkers'](_0x4e984a,_0x1f1f30),_0x4e984a=this['_joinTapes'](_0x4e984a,_0x1b9259),this['_refreshStartEndIndex'](_0x4e984a),this['_setDistance'](_0x4e984a,'isRemoved');}_0x4e984a=_0x4e984a['filter'](_0x2b1272=>!(_0x2b1272['isAdded']&&_0x2b1272['isRemoved']));const _0x2277b3=new Map(_0x4781b7['model'][_0x58f069]['deletions']['markers']),_0x42a228=new Set(_0x1f1f30['keys']());for(const _0x21662b of _0x2277b3['keys']())_0x42a228['delete'](_0x21662b);this['_markSuggestions'](_0x4e984a,_0x42a228),this['_fixObsoleteTags'](_0x4e984a),_0x4e984a=this['_removeMissingPairs'](_0x4e984a),_0x4e984a=this['_markMismatchedRemovedTags'](_0x4e984a),_0x4e984a=this['_removeUnsupportedChanges'](_0x4e984a);const {root:_0x3926b7,changes:_0x3fa2e5}=this['_makeModelFromTape'](_0x4e984a,_0xb1b073,_0x58f069);_0x2c8ad2['model'][_0x58f069]=_0x3926b7;const _0x5d96d6=_0x45fee6['get'](_0x58f069);if(_0x5d96d6){const _0x8cfdf=_0xb1b073['get'](_0x5d96d6['userId']),_0x4ed38d=new r({'author':_0x8cfdf,'type':_0x5d96d6['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x58f069});_0x3fa2e5['unshift'](_0x4ed38d),_0x2c8ad2['attributes'][_0x58f069]['revisionHistoryAttachChange']=_0x4ed38d['id'];}_0x2c8ad2['changes']=_0x2c8ad2['changes']['concat'](_0x3fa2e5);}return _0x2c8ad2;}['_markMarkers'](_0x2f9446,_0x446f0b){for(let _0x1336c0=0x0;_0x1336c0<_0x2f9446['length'];_0x1336c0++)for(const [_0x3f07ed,_0x396b0b]of _0x446f0b)_0x396b0b['start']['isEqual'](_0x2f9446[_0x1336c0]['previousPosition'])&&_0x2f9446[_0x1336c0]['markersStart']['push'](_0x3f07ed),_0x396b0b['end']['isEqual'](_0x2f9446[_0x1336c0]['nextPosition'])&&_0x2f9446[_0x1336c0]['markersEnd']['push'](_0x3f07ed);}['_joinTapes'](_0x2cb244,_0x320a3e){let _0x4c2f1e=[],_0x2ab320=0x0,_0x50e131=0x0;for(;_0x2ab320<_0x2cb244['length']||_0x50e131<_0x320a3e['length'];){const _0x5b8ba1=_0x2cb244[_0x2ab320]||{},_0x1a1d6a=_0x320a3e[_0x50e131]||{};if(_0x5b8ba1['id']==_0x1a1d6a['id'])_0x2ab320++,_0x50e131++,_0x4c2f1e['push'](_0x5b8ba1);else{if(_0x1a1d6a['isRemoved']&&_0x5b8ba1['isAdded']){const {commonTape:_0x30cb84,iEnd:_0x261708,jEnd:_0x1fb743}=this['_threeWayMerge'](_0x2cb244,_0x2ab320,_0x320a3e,_0x50e131);_0x4c2f1e=_0x4c2f1e['concat'](_0x30cb84),_0x2ab320=_0x261708,_0x50e131=_0x1fb743;}else _0x1a1d6a['isRemoved']?(_0x50e131++,_0x4c2f1e['push'](_0x1a1d6a)):(_0x2ab320++,_0x4c2f1e['push'](_0x5b8ba1));}}return _0x4c2f1e;}['_markSuggestions'](_0x11e5c6,_0x6b3c1){const _0x1d362c=[];for(let _0x30d445=0x0;_0x30d445<_0x11e5c6['length'];_0x30d445++){for(let _0x4146f1=0x0;_0x4146f1<_0x11e5c6[_0x30d445]['markersStart']['length'];_0x4146f1++){const _0x49a1f3=_0x11e5c6[_0x30d445]['markersStart'][_0x4146f1];if(!_0x6b3c1['has'](_0x49a1f3))continue;const {group:_0x1057fc,type:_0x5471ca,authorId:_0x40c3a2}=_0x529de3(_0x49a1f3);'revision-suggestion'!=_0x1057fc||'insertion'!=_0x5471ca&&'deletion'!=_0x5471ca||(_0x1d362c['unshift']({'type':_0x5471ca,'name':_0x49a1f3,'userId':_0x40c3a2}),_0x11e5c6[_0x30d445]['markersStart']['splice'](_0x4146f1,0x1),_0x4146f1--);}_0x163930(_0x11e5c6[_0x30d445]);for(let _0x5eef9f=0x0;_0x5eef9f<_0x11e5c6[_0x30d445]['markersEnd']['length'];_0x5eef9f++){const _0x543669=_0x11e5c6[_0x30d445]['markersEnd'][_0x5eef9f];if(!_0x6b3c1['has'](_0x543669))continue;const {group:_0xf65b7c,type:_0x567115}=_0x529de3(_0x543669);if('revision-suggestion'!=_0xf65b7c||'insertion'!=_0x567115&&'deletion'!=_0x567115)continue;_0x11e5c6[_0x30d445]['markersEnd']['splice'](_0x5eef9f,0x1),_0x5eef9f--;const _0x345279=_0x1d362c['findIndex'](_0x4700af=>_0x4700af['name']==_0x543669);_0x345279>-0x1&&_0x1d362c['splice'](_0x345279,0x1);}}function _0x529de3(_0xc9ca4a){const _0x75cfc2=_0xc9ca4a['split'](':');return{'group':_0x75cfc2[0x0],'type':_0x75cfc2[0x1],'subType':_0x75cfc2['length']>=0x5?_0x75cfc2[0x2]:null,'id':_0x75cfc2['length']<0x5?_0x75cfc2[0x2]:_0x75cfc2[0x3],'authorId':_0x75cfc2['length']<0x5?_0x75cfc2[0x3]:_0x75cfc2[0x4],'markerCount':0x6==_0x75cfc2['length']?_0x75cfc2[0x5]:null};}function _0x163930(_0x301be4){for(let _0x2873e5=0x0;_0x2873e5<_0x1d362c['length'];_0x2873e5++){if(_0x301be4['isAdded']&&'insertion'==_0x1d362c[_0x2873e5]['type'])return _0x301be4['isAddSuggestion']=_0x1d362c[_0x2873e5],void delete _0x301be4['isAdded'];if(!_0x301be4['isAdded']&&!_0x301be4['isRemoved']&&'deletion'==_0x1d362c[_0x2873e5]['type'])return void(_0x301be4['isRemoveSuggestion']=_0x1d362c[_0x2873e5]);}}}['_setDistance'](_0x2b4c18,_0x535214){let _0x2a7f99=0x0,_0x4a61cf=!0x1;const _0x53e458=new Map();for(const _0x12a81c of _0x2b4c18)_0x12a81c[_0x535214]?_0x4a61cf&&(_0x2a7f99++,_0x4a61cf=!0x1):(_0x2a7f99++,_0x4a61cf=!0x0),_0x53e458['set'](_0x12a81c['id'],_0x2a7f99);for(let _0x363365=0x0;_0x363365<_0x2b4c18['length'];_0x363365++){if('isRemoved'==_0x535214&&_0x2b4c18[_0x363365]['isAdded']||'isAdded'==_0x535214&&_0x2b4c18[_0x363365]['isRemoved'])continue;if('text'==_0x2b4c18[_0x363365]['type']){_0x2b4c18[_0x363365]['distance']=0x0;continue;}const _0x31e83b=_0x53e458['get'](_0x2b4c18[_0x363365]['pairId']),_0x4f65bd=_0x53e458['get'](_0x2b4c18[_0x363365]['id']);_0x2b4c18[_0x363365]['distance']=_0x31e83b-_0x4f65bd;}}['_getRevisionsRange'](_0x5ab434,_0x3ca9b9,_0xf9a948=!0x1){const _0x5a9fb3=[];let _0x566b78=this['repository']['getIndex'](_0x5ab434),_0xc560d1=this['repository']['getIndex'](_0x3ca9b9);for(-0x1==_0xc560d1&&(_0xc560d1=this['repository']['_revisions']['length'],_0xf9a948=!0x1);_0x566b78<_0xc560d1;)_0x5a9fb3['push'](this['repository']['getRevision'](_0x566b78)),_0x566b78++;return _0xf9a948&&_0x5a9fb3['push'](this['repository']['getRevision'](_0x566b78)),_0x5a9fb3;}['_threeWayMerge'](_0x10b571,_0x15f40,_0x127b6b,_0x4eb9ec){const _0x576db1=this['editor']['model']['schema'];let _0x2bf0d1=_0x15f40;for(;_0x10b571[_0x2bf0d1]&&_0x10b571[_0x2bf0d1]['isAdded'];)_0x2bf0d1++;let _0x659e16=_0x4eb9ec;for(;_0x127b6b[_0x659e16]&&_0x127b6b[_0x659e16]['isRemoved'];)_0x659e16++;_0x4ab4bc(_0x10b571,_0x15f40,_0x2bf0d1),_0x4ab4bc(_0x127b6b,_0x4eb9ec,_0x659e16);const _0x12970a=_0x127b6b['slice'](_0x4eb9ec,_0x659e16)['concat'](_0x10b571['slice'](_0x15f40,_0x2bf0d1));return _0x12970a['sort']((_0x14d480,_0x3de384)=>_0x14d480['side']!=_0x3de384['side']?_0x14d480['side']-_0x3de384['side']:_0x14d480['level']!=_0x3de384['level']?_0x14d480['level']-_0x3de384['level']:_0x14d480['distance']!=_0x3de384['distance']?_0x3de384['distance']-_0x14d480['distance']:!!_0x14d480['isAdded']!=!!_0x3de384['isAdded']?-0x1==_0x14d480['side']||0x0==_0x14d480['side']?_0x14d480['isAdded']?-0x1:0x1:_0x14d480['isAdded']?0x1:-0x1:_0x14d480['index']-_0x3de384['index']),{'commonTape':_0x12970a,'iEnd':_0x2bf0d1,'jEnd':_0x659e16};function _0x4ab4bc(_0x2288af,_0x4e4802,_0x2a8ae1){let _0x1f209b=-0x1,_0x458982=Number['POSITIVE_INFINITY'],_0x1237f6=!0x0;for(let _0x28b9bd=_0x4e4802;_0x28b9bd<_0x2a8ae1;_0x28b9bd++)if(_0x576db1['isInline'](_0x2288af[_0x28b9bd]['item'])||(_0x1237f6=!0x1),_0x2288af[_0x28b9bd]['item']['startIndex']<_0x4e4802&&(_0x1f209b=_0x28b9bd),_0x2288af[_0x28b9bd]['item']['endIndex']>=_0x2a8ae1){_0x458982=_0x28b9bd;break;}_0x1237f6&&(_0x1f209b=_0x2a8ae1-0x1);for(let _0x25c810=_0x4e4802;_0x25c810<_0x2a8ae1;_0x25c810++)_0x2288af[_0x25c810]['side']=_0x25c810<=_0x1f209b?-0x1:_0x25c810<_0x458982?0x0:0x1,_0x2288af[_0x25c810]['index']=_0x25c810;let _0x51876e=0x0;for(let _0x13d229=_0x4e4802;_0x13d229<=_0x1f209b;_0x13d229++)0x0==_0x2288af[_0x13d229]['distance']?_0x2288af[_0x13d229]['level']=_0x51876e:(_0x51876e++,_0x2288af[_0x13d229]['level']=_0x51876e,_0x51876e++);for(let _0x3cbcde=_0x4e4802;_0x3cbcde<_0x2a8ae1;_0x3cbcde++)0x0==_0x2288af[_0x3cbcde]['side']&&(_0x2288af[_0x3cbcde]['level']=_0x51876e);_0x51876e=0x0;for(let _0x5e4728=_0x2a8ae1-0x1;_0x5e4728>=_0x458982;_0x5e4728--)0x0==_0x2288af[_0x5e4728]['distance']?_0x2288af[_0x5e4728]['level']=_0x51876e:(_0x51876e--,_0x2288af[_0x5e4728]['level']=_0x51876e,_0x51876e--);}}['_fixObsoleteTags'](_0x525608){const _0x3712c0=new Map(),_0x558118=this['editor']['model']['schema'];for(let _0x4ff9b5=0x1;_0x4ff9b5<_0x525608['length'];_0x4ff9b5++){let _0x51bdf2,_0x44f2ed,_0x4c2b9d;const _0x53a5fc=_0x525608[_0x4ff9b5],_0x3a771c=_0x525608[_0x4ff9b5-0x1];if('text'==_0x53a5fc['type'])continue;if(_0x53a5fc['type']!=_0x3a771c['type'])continue;if(!_0x558118['isBlock'](_0x3a771c['item'])||_0x558118['isLimit'](_0x3a771c['item']))continue;if(!_0x558118['isBlock'](_0x53a5fc['item'])||_0x558118['isLimit'](_0x53a5fc['item']))continue;if((_0x525608[_0x4ff9b5]['isAdded']||_0x525608[_0x4ff9b5]['isAddSuggestion'])&&_0x525608[_0x4ff9b5-0x1]['isRemoved'])_0x51bdf2=_0x525608[_0x4ff9b5],_0x44f2ed=_0x525608[_0x4ff9b5-0x1],_0x4c2b9d=_0x4ff9b5-0x1;else{if(!_0x525608[_0x4ff9b5]['isRemoved']||!_0x525608[_0x4ff9b5-0x1]['isAdded']&&!_0x525608[_0x4ff9b5-0x1]['isAddSuggestion'])continue;_0x51bdf2=_0x525608[_0x4ff9b5-0x1],_0x44f2ed=_0x525608[_0x4ff9b5],_0x4c2b9d=_0x4ff9b5;}const _0x4fe2ea=_0x51bdf2['level']==_0x44f2ed['level'],_0x171ddd=Math['abs'](_0x51bdf2['level'])<Math['abs'](_0x44f2ed['level'])&&0x0==_0x44f2ed['distance'];(_0x4fe2ea||_0x171ddd)&&(_0x3712c0['set'](_0x44f2ed['id'],_0x51bdf2['id']),_0x525608['splice'](_0x4c2b9d,0x1),_0x4ff9b5--,_0x51bdf2['isAdded']=!0x1);}for(let _0xeff805=0x0;_0xeff805<_0x525608['length'];_0xeff805++)_0x3712c0['has'](_0x525608[_0xeff805]['pairId'])&&(_0x525608[_0xeff805]['pairId']=_0x3712c0['get'](_0x525608[_0xeff805]['pairId']));}['_removeMissingPairs'](_0x5662bc){const _0x518820=new Set(_0x5662bc['map'](_0xa8ea75=>_0xa8ea75['id']));for(let _0x5291e8=0x0;_0x5291e8<_0x5662bc['length'];_0x5291e8++)_0x518820['has'](_0x5662bc[_0x5291e8]['pairId'])||0x0==_0x5662bc[_0x5291e8]['distance']||(_0x5662bc[_0x5291e8]['isIncorrect']=!0x0);return _0x5662bc['filter'](_0x29c217=>!_0x29c217['isIncorrect']);}['_markMismatchedRemovedTags'](_0xceb8a0){const _0x43d5a4=new Set();for(let _0x3262f7=0x0;_0x3262f7<_0xceb8a0['length'];_0x3262f7++){if(_0x43d5a4['has'](_0xceb8a0[_0x3262f7]['id'])&&_0xceb8a0[_0x3262f7]['isRemoved']&&(_0xceb8a0[_0x3262f7]['isIncorrect']=!0x0),_0xceb8a0[_0x3262f7]['isIncorrect'])continue;if(0x0==_0xceb8a0[_0x3262f7]['distance'])continue;if('elementStart'!=_0xceb8a0[_0x3262f7]['type'])continue;if(null==_0xceb8a0[_0x3262f7]['pairId'])continue;let _0x386947=_0x3262f7+0x1,_0x3554ff=0x0;for(;_0xceb8a0[_0x386947]['id']!=_0xceb8a0[_0x3262f7]['pairId'];)'elementStart'==_0xceb8a0[_0x386947]['type']?_0x3554ff++:'elementEnd'==_0xceb8a0[_0x386947]['type']&&_0x3554ff--,_0x386947++;if(0x0!=_0x3554ff){if(_0xceb8a0[_0x3262f7]['isRemoved'])_0xceb8a0[_0x3262f7]['isIncorrect']=!0x0;else{for(;_0x386947!=_0x3262f7;)_0xceb8a0[_0x386947]['isRemoved']&&0x0!=_0xceb8a0[_0x386947]['distance']&&(_0xceb8a0[_0x386947]['isIncorrect']=!0x0,_0x43d5a4['add'](_0xceb8a0[_0x386947]['pairId'])),_0x386947--;}}}return _0xceb8a0['filter'](_0xc9b313=>!_0xc9b313['isIncorrect']);}['_removeUnsupportedChanges'](_0x5b35e9){const _0x28247b=this['editor']['model']['schema'];for(let _0x14e00a=0x0;_0x14e00a<_0x5b35e9['length'];_0x14e00a++){if(!(_0x5b35e9[_0x14e00a]['isAdded']||_0x5b35e9[_0x14e00a]['isAddSuggestion']||_0x5b35e9[_0x14e00a]['isRemoved']||_0x5b35e9[_0x14e00a]['isRemoveSuggestion']))continue;if(0x0==_0x5b35e9[_0x14e00a]['distance'])continue;const _0x50ad29=_0x5b35e9[_0x14e00a]['item'];_0x28247b['isBlock'](_0x50ad29)||_0x28247b['isLimit'](_0x50ad29)||(_0x5b35e9[_0x14e00a]['isAdded']&&delete _0x5b35e9[_0x14e00a]['isAdded'],_0x5b35e9[_0x14e00a]['isAddSuggestion']&&delete _0x5b35e9[_0x14e00a]['isAddSuggestion'],_0x5b35e9[_0x14e00a]['isRemoveSuggestion']&&delete _0x5b35e9[_0x14e00a]['isRemoveSuggestion'],_0x5b35e9[_0x14e00a]['isRemoved']&&(_0x5b35e9[_0x14e00a]['isIncorrect']=!0x0));}return _0x5b35e9['filter'](_0x20f9b=>!_0x20f9b['isIncorrect']);}['_makeModelFromTape'](_0x5c42d8,_0x3020e7,_0x4fea73){const _0x597f56=new mt(),_0xf2ec39=[],_0x3dcb83=new Map(),_0x41684d=this['editor']['model'],_0x4a144e=_0x41684d['schema'],_0x4bd87b=[_0x597f56],_0x382d5a={},_0x5cd380={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x2f41a1=null;const _0x524ec8=[0x0];for(let _0x2905a0=0x0;_0x2905a0<_0x5c42d8['length'];_0x2905a0++)if('elementStart'===_0x5c42d8[_0x2905a0]['type']){_0x5c42d8[_0x2905a0]['previousPosition']=_0x41684d['createPositionFromPath'](_0x597f56,_0x524ec8);const _0x440895=new ft(_0x5c42d8[_0x2905a0]['item']['name'],_0x5c42d8[_0x2905a0]['item']['getAttributes']());_0x4bd87b[0x0]['_appendChild'](_0x440895),_0x524ec8['push'](0x0),_0x4bd87b['unshift'](_0x440895),_0x5c42d8[_0x2905a0]['nextPosition']=_0x41684d['createPositionFromPath'](_0x597f56,_0x524ec8);}else'elementEnd'===_0x5c42d8[_0x2905a0]['type']?(_0x4bd87b['shift'](),_0x5c42d8[_0x2905a0]['previousPosition']=_0x41684d['createPositionFromPath'](_0x597f56,_0x524ec8),_0x524ec8['pop'](),_0x524ec8[_0x524ec8['length']-0x1]++,_0x5c42d8[_0x2905a0]['nextPosition']=_0x41684d['createPositionFromPath'](_0x597f56,_0x524ec8)):(_0x5c42d8[_0x2905a0]['previousPosition']=_0x41684d['createPositionFromPath'](_0x597f56,_0x524ec8),_0x2f41a1?_0x2f41a1['_data']+=_0x5c42d8[_0x2905a0]['item']['data']:_0x2f41a1=new wt(_0x5c42d8[_0x2905a0]['item']['data'],_0x5c42d8[_0x2905a0]['item']['getAttributes']()),_0x5c42d8[_0x2905a0+0x1]&&'text'===_0x5c42d8[_0x2905a0+0x1]['type']&&_0x1db70d(_0x2f41a1,_0x5c42d8[_0x2905a0+0x1]['item'])||(_0x4bd87b[0x0]['_appendChild'](_0x2f41a1),_0x2f41a1=null),_0x524ec8[_0x524ec8['length']-0x1]+=_0x5c42d8[_0x2905a0]['item']['offsetSize'],_0x5c42d8[_0x2905a0]['nextPosition']=_0x41684d['createPositionFromPath'](_0x597f56,_0x524ec8));for(let _0x5171d4=0x0;_0x5171d4<_0x5c42d8['length'];_0x5171d4++){const _0x20f884=_0x5c42d8[_0x5171d4]['previousPosition'],_0x18022d=_0x5c42d8[_0x5171d4]['nextPosition'];for(const _0x5c2292 of _0x5c42d8[_0x5171d4]['markersStart'])_0x3dcb83['set'](_0x5c2292,{'start':_0x20f884,'end':null});_0x1addd1('isRemoveSuggestion',_0x5171d4,_0x20f884,_0x18022d),_0x1addd1('isAddSuggestion',_0x5171d4,_0x20f884,_0x18022d),_0x1addd1('isRemoved',_0x5171d4,_0x20f884,_0x18022d),_0x1addd1('isAdded',_0x5171d4,_0x20f884,_0x18022d);for(const _0x10ed72 of _0x5c42d8[_0x5171d4]['markersEnd']){_0x3dcb83['get'](_0x10ed72)['end']=_0x18022d;}}for(const [_0x389bcd,_0x91bc6f]of _0x3dcb83){const _0x48e552=this['editor']['model']['createRange'](_0x91bc6f['start'],_0x91bc6f['end']);_0x597f56['markers']['set'](_0x389bcd,_0x48e552);}return _0xf2ec39['sort']((_0x3b8cc9,_0x1ba7ce)=>{const _0x387d93=_0x597f56['markers']['get']('revision:'+_0x3b8cc9['id']),_0x8a29ef=_0x597f56['markers']['get']('revision:'+_0x1ba7ce['id']);return _0x387d93['start']['isBefore'](_0x8a29ef['start'])?-0x1:_0x387d93['start']['isAfter'](_0x8a29ef['start'])?0x1:_0x387d93['end']['isBefore'](_0x8a29ef['end'])?-0x1:_0x387d93['end']['isAfter'](_0x8a29ef['end'])?0x1:'add'===_0x3b8cc9['type']?-0x1:0x1;}),{'root':_0x597f56,'changes':_0xf2ec39};function _0x1addd1(_0x43e704,_0x359a7a,_0x229110,_0x597596){const _0x14e5c5=!!_0x5c42d8[_0x359a7a][_0x43e704],_0x58b339=_0x14e5c5?_0x5c42d8[_0x359a7a][_0x43e704]['userId']:null,_0x547584=_0x359a7a===_0x5c42d8['length']-0x1,_0x19ea4b=_0x5cd380[_0x43e704][0x0],_0x234e27=_0x4a144e['isObject'](_0x5c42d8[_0x359a7a]['item']);!_0x382d5a[_0x43e704]&&_0x14e5c5?_0x382d5a[_0x43e704]={'start':_0x229110,'tapeItem':_0x5c42d8[_0x359a7a],'userId':_0x58b339,'type':_0x43e704}:_0x382d5a[_0x43e704]&&!_0x14e5c5?(_0x382d5a[_0x43e704]['end']=_0x229110,_0x293715(_0x382d5a[_0x43e704]),_0x382d5a[_0x43e704]=null):_0x382d5a[_0x43e704]&&_0x14e5c5&&_0x382d5a[_0x43e704]['userId']!==_0x58b339&&(_0x382d5a[_0x43e704]['end']=_0x229110,_0x19ea4b&&_0x19ea4b['userId']===_0x382d5a[_0x43e704]['userId']||_0x293715(_0x382d5a[_0x43e704]),_0x382d5a[_0x43e704]={'start':_0x229110,'tapeItem':_0x5c42d8[_0x359a7a],'userId':_0x58b339,'type':_0x43e704}),_0x382d5a[_0x43e704]&&_0x234e27&&('elementStart'!==_0x5c42d8[_0x359a7a]['type']||_0x19ea4b&&_0x19ea4b['userId']===_0x58b339||_0x5cd380[_0x43e704]['unshift']({'userId':_0x58b339,'object':_0x5c42d8[_0x359a7a]['item'],'change':_0x382d5a[_0x43e704]}),'elementEnd'===_0x5c42d8[_0x359a7a]['type']&&_0x19ea4b&&_0x19ea4b['object']===_0x5c42d8[_0x359a7a]['item']&&(_0x5cd380[_0x43e704]['shift'](),_0x382d5a[_0x43e704]=_0x19ea4b['change'])),_0x382d5a[_0x43e704]&&_0x547584&&(_0x382d5a[_0x43e704]['end']=_0x597596,_0x293715(_0x382d5a[_0x43e704]),_0x382d5a[_0x43e704]=null);}function _0x293715({start:_0x3c446f,end:_0x30cb76,tapeItem:_0x2f3095,userId:_0x4169d6,type:_0x2b6fa4}){const _0x5bba02=_0x2f3095['item'],_0x46b168=_0x41684d['schema']['isBlock'](_0x5bba02)&&!_0x41684d['schema']['isLimit'](_0x5bba02),_0x16352b=_0x3c446f['nodeAfter']==_0x30cb76['parent']&&_0x30cb76['isAtStart'];if(_0x46b168&&_0x16352b)return;const _0x106bc6=_0x41684d['createRange'](_0x3c446f,_0x30cb76),_0x319df2=_0x3020e7['get'](_0x4169d6),_0x54c1a0=new r({'author':_0x319df2,'type':'isAdded'==_0x2b6fa4||'isAddSuggestion'==_0x2b6fa4?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x2b6fa4||'isRemoveSuggestion'==_0x2b6fa4},'createdAt':new Date(),'rootName':_0x4fea73});_0xf2ec39['push'](_0x54c1a0),_0x597f56['markers']['set']('revision:'+_0x54c1a0['id'],_0x106bc6);}function _0x1db70d(_0x1d8ea5,_0x1c0633){const _0x5501c8=_0x1d8ea5['getAttributes'](),_0x445658=_0x1c0633['getAttributes']();for(const _0x214fb4 of _0x5501c8){if(_0x214fb4[0x1]!==_0x1c0633['getAttribute'](_0x214fb4[0x0]))return!0x1;_0x445658['next']();}return _0x445658['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x36ea18=>{const _0x339ad5=_0x36ea18['markerName']['split'](':')[0x1],_0x74d65d=this['_getChangeFromId'](_0x339ad5);if(!_0x74d65d)return null;const _0x54ed01='add'==_0x74d65d['type']?'insertion':'deletion',_0x2cbb5d=['ck-suggestion-marker','ck-suggestion-marker-'+_0x54ed01];return _0x74d65d['data']['isSuggestion']&&_0x2cbb5d['push']('ck-suggestion-marker-'+_0x54ed01+'-new'),this['activeChange']==_0x74d65d&&_0x2cbb5d['push']('ck-suggestion-marker--active'),{'classes':_0x2cbb5d,'attributes':{'data-change-id':_0x339ad5}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x5c637f=>{_0x5c637f['on']('element:pre',(_0x334951,_0x1ae369,_0x3abedc)=>{const _0x5dcb14=_0x1ae369['viewItem']['getChild'](0x0);if(!_0x5dcb14||!_0x5dcb14['is']('element','code'))return;if(!_0x3abedc['consumable']['consume'](_0x5dcb14,{'attributes':['vid_start','vid_end']}))return;const _0x238da0=_0x1ae369['modelRange']['start']['nodeAfter'];_0x3abedc['writer']['setAttribute']('vid_start',_0x5dcb14['getAttribute']('vid_start'),_0x238da0),_0x3abedc['writer']['setAttribute']('vid_end',_0x5dcb14['getAttribute']('vid_end'),_0x238da0);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x3713e9=>{_0x3713e9['on']('element',(_0x1d678c,_0x35062c,_0x3bf9a6)=>{if(!_0x3bf9a6['consumable']['consume'](_0x35062c['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x35062c['modelRange']['isCollapsed'])return;const _0x35c618=_0x35062c['modelRange']['start']['nodeAfter'];_0x35c618['hasAttribute']('vid_start')||_0x35c618['hasAttribute']('vid')||(_0x3bf9a6['writer']['setAttribute']('vid_start',_0x35062c['viewItem']['getAttribute']('vid_start'),_0x35c618),_0x3bf9a6['writer']['setAttribute']('vid_end',_0x35062c['viewItem']['getAttribute']('vid_end'),_0x35c618));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x41d489=>_0x41d489['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x43864c,[,_0x38c421])=>{['vid_start','vid_end','vid']['includes'](_0x38c421)&&(_0x43864c['return']=!0x0,_0x43864c['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x1953bb=>{_0x1953bb['on']('attribute:vid',(_0x39a3ee,_0x1f0a97,_0x5baeb0)=>{if('\x20'!=_0x1f0a97['item']['data']||_0x1f0a97['item']['parent']['maxOffset']>0x1)return;if(!_0x5baeb0['consumable']['consume'](_0x1f0a97['item'],_0x39a3ee['name']))return;const _0x38f19c=_0x5baeb0['writer'],_0x2306fe=_0x5baeb0['mapper']['toViewRange'](_0x1f0a97['range']);_0x38f19c['wrap'](_0x2306fe,_0x38f19c['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x524f83){const _0x15bdc2=_0x524f83['plugins']['get']('RevisionViewer');return(_0x3c559a,_0x4ba6fa,_0x9b5f23)=>{const _0x1460ab=_0x4ba6fa['markerName']['split'](':')[0x1],_0x4dfb7c=_0x15bdc2['_getChangeFromId'](_0x1460ab);if(!_0x4dfb7c)return null;const _0x201973='add'==_0x4dfb7c['type']?'split':'merge';if(!_0x9b5f23['consumable']['test'](_0x4ba6fa['markerRange'],_0x3c559a['name']))return;const _0x10efa5=_0x4ba6fa['markerRange']['getWalker'](),_0x12edc9=_0x4ba6fa['markerRange']['start'],_0x3f0f1f=_0x524f83['model']['schema'];let _0x49c857=null,_0xdf9e11=null,_0xa27ae4=!0x1,_0x424e95=!0x1;for(const _0x335dee of _0x10efa5){const _0x5427a6=_0x335dee['item'];_0xa27ae4=_0xa27ae4||_0x3f0f1f['isContent'](_0x5427a6);const _0x2d6dcc=_0x9b5f23['mapper']['toViewElement'](_0x5427a6);if(_0x2d6dcc&&_0x2d6dcc['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x335dee['type']&&(_0x3f0f1f['isBlock'](_0x5427a6)&&!_0x3f0f1f['isLimit'](_0x5427a6)&&(_0x5427a6['nextSibling']||_0x12edc9['isAtEnd']?_0x49c857&&_0x49c857['parent']==_0x5427a6||(_0x49c857=_0x5427a6,_0x34192e(_0x335dee['previousPosition']),_0x424e95=!0x0):_0xdf9e11=_0xdf9e11||_0x335dee['previousPosition']));}function _0x34192e(_0x4fa3c8){const _0x3b27f0=_0x9b5f23['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x201973}),_0x26c4e9=_0x9b5f23['mapper']['toViewPosition'](_0x4fa3c8);_0x4dfb7c['data']['isSuggestion']&&_0x9b5f23['writer']['addClass']('ck-suggestion-marker-'+_0x201973+'-new',_0x3b27f0),_0x15bdc2['activeChange']==_0x4dfb7c&&_0x9b5f23['writer']['addClass']('ck-suggestion-marker--active',_0x3b27f0),_0x9b5f23['writer']['insert'](_0x26c4e9,_0x3b27f0),_0x9b5f23['mapper']['bindElementToMarker'](_0x3b27f0,_0x4ba6fa['markerName']);}_0xa27ae4||_0x424e95||!_0xdf9e11||_0x34192e(_0xdf9e11);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x3935d3,_0x2436b8,_0x167543)=>{const _0x40c754=_0x167543['mapper']['markerNameToElements'](_0x2436b8['markerName']);if(_0x40c754){for(const _0x263eac of _0x40c754)(_0x263eac['hasClass']('ck-suggestion-marker-split')||_0x263eac['hasClass']('ck-suggestion-marker-merge'))&&(_0x167543['mapper']['unbindElementFromMarkerName'](_0x263eac,_0x2436b8['markerName']),_0x167543['writer']['remove'](_0x263eac));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x42ddf8,_0x591e00,_0x313730)=>{const _0x3060f6=_0x591e00['markerName']['split'](':')[0x1],_0x3112ed=this['_getChangeFromId'](_0x3060f6);if(!_0x3112ed)return null;const _0x281fbe='add'==_0x3112ed['type']?'split':'merge';if(_0x313730['consumable']['test'](_0x591e00['markerRange'],_0x42ddf8['name']))for(const _0x59252c of _0x591e00['markerRange']['getItems']()){if(!_0x59252c['is']('element','softBreak'))continue;const _0x1c369b=_0x313730['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x281fbe}),_0x3312fd=_0x313730['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x59252c));_0x3112ed['data']['isSuggestion']&&_0x313730['writer']['addClass']('ck-suggestion-marker-'+_0x281fbe+'-new',_0x1c369b),this['activeChange']==_0x3112ed&&_0x313730['writer']['addClass']('ck-suggestion-marker--active',_0x1c369b),_0x313730['writer']['insert'](_0x3312fd,_0x1c369b),_0x313730['mapper']['bindElementToMarker'](_0x1c369b,_0x591e00['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x5db30a=>{for(const _0x40e2bb of this['editor']['model']['document']['getRootNames']()){const _0x4a70dc=this['editor']['model']['document']['getRoot'](_0x40e2bb),_0xa25094=this['editor']['editing']['view']['document']['getRoot'](_0x40e2bb);if(_0xa25094){const _0x28466f=_0x4a70dc['getAttribute']('revisionHistoryAttachChange');if(_0x5db30a['removeAttribute']('data-change-id',_0xa25094),_0x5db30a['removeClass']('ck-revision-history-root-add',_0xa25094),_0x5db30a['removeClass']('ck-revision-history-root-remove',_0xa25094),_0x5db30a['removeClass']('ck-revision-history-root--active',_0xa25094),_0x28466f){const _0x19d2ae=this['_getChangeFromId'](_0x28466f);if(!_0x19d2ae)return null;_0x5db30a['setAttribute']('data-change-id',_0x28466f,_0xa25094),_0x5db30a['addClass']('ck-revision-history-root-'+_0x19d2ae['type'],_0xa25094),this['activeChange']==_0x19d2ae&&_0x5db30a['addClass']('ck-revision-history-root--active',_0xa25094);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x3d860f=>'revision-comment:'+_0x3d860f,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x4b176c=>'revision-suggestion:'+_0x4b176c,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x11d993=>({'name':'suggestion:'+_0x11d993,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x36146f=>{const _0x3f86b8=_0x36146f['markerName']['split'](':')[0x1];return'insertion'!=_0x3f86b8&&'deletion'!=_0x3f86b8?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x3f86b8]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Z(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Z(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x57d842,_0x316ee4,_0x42099a)=>{const _0x135dd8=_0x42099a['mapper']['markerNameToElements'](_0x316ee4['markerName']);if(_0x135dd8){for(const _0x37047a of _0x135dd8)_0x37047a['is']('uiElement')&&(_0x42099a['mapper']['unbindElementFromMarkerName'](_0x37047a,_0x316ee4['markerName']),_0x42099a['writer']['remove'](_0x37047a));}},{'priority':'high'});}['_getChangeFromId'](_0x56447e){return this['_changeIdToChange']['get'](_0x56447e);}['_getViewForChange'](_0x14e364){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new X(this['editor']['locale'],_0x14e364),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x377d78,_0x282718,_0x16ea82,_0x3c8ce6)=>{_0x3c8ce6&&this['_balloon']['remove'](_0x3c8ce6),_0x16ea82&&(this['_balloon']['add']({'view':_0x16ea82,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x13970d=this['editor']['editing'],_0x1348a3=this['_getChangeFromId'](_0x16ea82['changeId']);let _0x49a811;if(_0x1348a3['data']['isOnRoot']){const _0x82e131=_0x13970d['view']['getDomRoot'](_0x1348a3['rootName']);_0x49a811=Array['from'](_0x82e131['getClientRects']());}else{const _0xe4af6c=this['editor']['model']['markers']['get']('revision:'+_0x16ea82['changeId']);_0x49a811=Array['from'](_0x13970d['mapper']['markerNameToElements'](_0xe4af6c['name']))['map'](_0x1ac7d5=>_0x13970d['view']['domConverter']['mapViewToDom'](_0x1ac7d5))['map'](_0x50dfe3=>Array['from'](_0x50dfe3['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x49a811[0x0];return _0x49a811['find'](_0x3a8803=>_0x3a8803['top']-0x3<=this['_activeViewTarget']['y']&&_0x3a8803['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x3a8803['left']-0x3<=this['_activeViewTarget']['x']&&_0x3a8803['right']+0x3>=this['_activeViewTarget']['x'])||_0x49a811[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x5824bb,_0x44374c,_0x3fb08e,_0xa4e576)=>{this['activeView']=_0x3fb08e?this['_getViewForChange'](_0x3fb08e):null,this['editor']['model']['change'](()=>{const _0x118c5a=this['editor']['editing'];_0xa4e576&&(_0xa4e576['data']['isOnRoot']?_0x118c5a['view']['change'](_0x4ba6bd=>{_0x4ba6bd['removeClass']('ck-revision-history-root--active',_0x118c5a['view']['document']['getRoot'](_0xa4e576['rootName']));}):_0x118c5a['reconvertMarker']('revision:'+_0xa4e576['id'])),_0x3fb08e&&(_0x3fb08e['data']['isOnRoot']?_0x118c5a['view']['change'](_0x3f2298=>{_0x3f2298['addClass']('ck-revision-history-root--active',_0x118c5a['view']['document']['getRoot'](_0x3fb08e['rootName']));}):_0x118c5a['reconvertMarker']('revision:'+_0x3fb08e['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x4cbaff,_0x582df5)=>{if(this['activeChange'])return;const _0x57e1e4=this['_findChangeIdFromDomTarget'](_0x582df5['target']),_0x2170ec=this['_changeIdToChange']['get'](_0x57e1e4);_0x2170ec?(this['_activeViewTarget']={'x':_0x582df5['domEvent']['x'],'y':_0x582df5['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x2170ec)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x2a75c3,_0x23736d)=>{const _0x188235=this['_findChangeIdFromDomTarget'](_0x23736d['target']),_0x5e912b=this['_changeIdToChange']['get'](_0x188235);_0x5e912b?(this['_activeViewTarget']={'x':_0x23736d['domEvent']['x'],'y':_0x23736d['domEvent']['y']},_0x5e912b===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x5e912b):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x32192c){do{const _0x88ba7a=_0x32192c['getAttribute']('data-change-id');if(_0x88ba7a)return _0x88ba7a;_0x32192c=_0x32192c['parent'];}while(_0x32192c);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x591364=>{for(const _0x498d03 of this['editor']['model']['markers'])_0x591364['removeMarker'](_0x498d03);});}}function Z(_0x319672,_0x3ca4a3){return(_0x2d7413,_0x10debe,_0x4b4660)=>{if(!_0x4b4660['consumable']['test'](_0x10debe['markerRange'],_0x2d7413['name']))return;const _0x2f3c93=_0x10debe['markerRange']['getWalker'](),_0x4eb49a=_0x10debe['markerRange']['start'],_0x43b868=_0x319672['model']['schema'];let _0x314d40=null,_0x4d0fff=null,_0x4a533a=!0x1,_0x577566=!0x1;for(const _0x1d5ffd of _0x2f3c93){const _0xfb159b=_0x1d5ffd['item'];_0x4a533a=_0x4a533a||_0x43b868['isContent'](_0xfb159b);const _0x48f01a=_0x4b4660['mapper']['toViewElement'](_0xfb159b);if(_0x48f01a&&_0x48f01a['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x1d5ffd['type']&&(_0x43b868['isBlock'](_0xfb159b)&&!_0x43b868['isLimit'](_0xfb159b)&&(_0xfb159b['nextSibling']||_0x4eb49a['isAtEnd']?_0x314d40&&_0x314d40['parent']==_0xfb159b||(_0x314d40=_0xfb159b,_0x160d78(_0x1d5ffd['previousPosition']),_0x577566=!0x0):_0x4d0fff=_0x4d0fff||_0x1d5ffd['previousPosition']));}function _0x160d78(_0x3268a1){const _0x5d7bc9=_0x4b4660['mapper']['toViewPosition'](_0x3268a1),_0x208121=_0x4b4660['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x3ca4a3});_0x4b4660['writer']['insert'](_0x5d7bc9,_0x208121),_0x4b4660['mapper']['bindElementToMarker'](_0x208121,_0x10debe['markerName']);}_0x4a533a||_0x577566||!_0x4d0fff||_0x160d78(_0x4d0fff);};}class _t extends _0x24f189{constructor(_0x192dcf){super(_0x192dcf);const _0x3ff222=_0x192dcf['plugins']['get'](d);this['affectsData']=!0x1,this['listenTo'](_0x3ff222,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x3ff222,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x3d6991=this['editor'],_0x2a7572=_0x3d6991['plugins']['get'](d),_0x4adfcf=_0x2a7572['isReady']?_0x2a7572['diff']['newRevisionId']:null;_0x3d6991['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x4adfcf);}['refresh'](){const {isReady:_0x1ae8f6,isEnabled:_0x349351,repository:_0xd7b591,diff:_0x4d297d}=this['editor']['plugins']['get'](d),_0x590046=_0x4d297d&&_0xd7b591['getLaterVisibleRevision'](_0x4d297d['newRevisionId']);this['isEnabled']=_0x1ae8f6&&_0x349351&&Boolean(_0x590046);}}class yt extends _0x24f189{['_step'];constructor(_0x51477e,{direction:_0xa80de4}){super(_0x51477e);const _0x5c02e1=_0x51477e['plugins']['get'](d);this['affectsData']=!0x1,this['_step']='forward'===_0xa80de4?0x1:-0x1,this['listenTo'](_0x5c02e1,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x5c02e1,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x5c02e1,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x3b7f0d=this['editor'],_0x506e9f=_0x3b7f0d['plugins']['get'](d),{isNavigationMode:_0x21fa15,currentChangeNumber:_0x436020}=_0x506e9f;let _0x3fc919;if(_0x506e9f['activeChange']=_0x21fa15?_0x506e9f['diff']['changes']['get'](_0x436020+this['_step']):_0x506e9f['diff']['changes']['first'],_0x506e9f['activeChange']['data']['isOnRoot'])_0x3fc919=_0x3b7f0d['editing']['view']['getDomRoot'](_0x506e9f['activeChange']['rootName']);else{const _0x54040a=_0x3b7f0d['model']['markers']['get']('revision:'+_0x506e9f['activeChange']['id']);_0x3fc919=_0x93a8c4(_0x3b7f0d['editing'],_0x54040a);}_0x2b0941({'target':_0x3fc919,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x37f0a6,currentChangeNumber:_0x6d3414,numberOfChanges:_0x943ed4,isReady:_0x1f73c8,isEnabled:_0x890047}=this['editor']['plugins']['get'](d);this['isEnabled']=!!(_0x890047&&_0x1f73c8&&_0x943ed4)&&(!_0x37f0a6||(0x1===this['_step']?_0x6d3414<_0x943ed4-0x1:_0x6d3414>0x0));}}class _i extends _0x16162e{constructor(_0x2f7ed0){super(_0x2f7ed0);const _0x211b61=this['bindTemplate'],_0x3727d8=new _0x280a4e(_0x2f7ed0),_0x360af6=new _0x280a4e(_0x2f7ed0);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',(_0x3d3e08,_0x3f01af)=>_0x3d3e08&&_0x3f01af>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x2cc707,_0x1fa843,_0x55dfea,_0x1fe35c)=>{if(!_0x2cc707)return m(_0x2f7ed0,'Loading...');if(!_0x55dfea)return m(_0x2f7ed0,'No\x20changes');const _0x2afeed=m(_0x2f7ed0,'NUMBER_OF_CHANGES',_0x55dfea);return _0x1fe35c?m(_0x2f7ed0,'X_OF_Y_CHANGES',[_0x1fa843+0x1,_0x55dfea]):_0x2afeed;}),_0x3727d8['set']({'label':m(_0x2f7ed0,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':'<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M16.435\x2014.494a.75.75\x200\x200\x200\x201.197-.899l-.067-.089-6.992-8a.75.75\x200\x200\x200-1.05-.078l-.079.078-7.008\x208a.75.75\x200\x200\x200\x201.049\x201.066l.08-.078\x206.442-7.354\x206.428\x207.354z\x22/></svg>\x0a'}),_0x360af6['set']({'label':m(_0x2f7ed0,'Show\x20next\x20change'),'tooltip':!0x0,'icon':'<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M16.435\x205.506a.75.75\x200\x200\x201\x201.197.899l-.067.089-6.992\x208a.75.75\x200\x200\x201-1.05.078l-.079-.078-7.008-8a.75.75\x200\x200\x201\x201.049-1.066l.08.078\x206.442\x207.354\x206.428-7.354z\x22/></svg>\x0a'}),_0x3727d8['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x360af6['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x3727d8['on']('execute',()=>this['fire']('execute','backward')),_0x360af6['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',_0x211b61['if']('_isStatusLabelVisible','ck-hidden',_0x4c14ad=>!_0x4c14ad)]},'children':[{'text':_0x211b61['to']('isNavigationMode',_0x481c7d=>_0x481c7d?m(_0x2f7ed0,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x2f7ed0,'Total')+':\x20')}]},{'text':_0x211b61['to']('_statusText')}]},new _0x5d7297(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x3727d8,_0x360af6]}]});}}const ce='ck-editor__editable__loading-overlay';class le extends _0x21f9a0{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x556c46=this['editor']['editing']['view'];_0x556c46['change'](_0x48b0e5=>{for(const _0x26f6d8 of _0x556c46['document']['roots'])_0x48b0e5['addClass'](ce,_0x26f6d8);});}['hide'](){const _0x51e4bd=this['editor']['editing']['view'];_0x51e4bd['change'](_0x1097c6=>{for(const _0x30ac4a of _0x51e4bd['document']['roots'])_0x1097c6['removeClass'](ce,_0x30ac4a);});}}class g extends _0x21f9a0{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d,le];}['init'](){const _0x3713df=this['editor'],_0x2d0dba=_0x3713df['plugins']['get'](d),_0x31efd5=_0x3713df['plugins']['get'](le);_0x3713df['ui']['componentFactory']['add']('exitToEditing',_0x5b1081=>{const _0x5e4594=new _0x280a4e(_0x5b1081);return _0x5e4594['set']({'label':m(_0x5b1081,'Back\x20to\x20editing'),'icon':_0x7e0d0d['undo'],'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x5e4594,'execute',()=>{_0x3713df['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x5e4594;}),_0x3713df['ui']['componentFactory']['add']('restoreRevision',_0x2ef3a3=>{const _0x20e049=new _0x280a4e(_0x2ef3a3);return _0x20e049['set']({'label':m(_0x2ef3a3,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x20e049['bind']('isEnabled')['to'](_0x3713df['commands']['get']('restoreRevision')),this['listenTo'](_0x20e049,'execute',()=>_0x3713df['execute']('restoreRevision')),_0x20e049;}),_0x3713df['ui']['componentFactory']['add']('changesNavigation',_0xeba9e9=>{const _0x527e67=new _i(_0xeba9e9),_0x35a9bf=_0x3713df['commands']['get']('showPreviousChange'),_0x518afb=_0x3713df['commands']['get']('showNextChange');return _0x527e67['bind']('isBackwardNavigationEnabled')['to'](_0x35a9bf,'isEnabled'),_0x527e67['bind']('isForwardNavigationEnabled')['to'](_0x518afb,'isEnabled'),_0x527e67['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x2d0dba),this['listenTo'](_0x527e67,'execute',(_0x412bea,_0x2c108b)=>{_0x3713df['execute']('forward'===_0x2c108b?'showNextChange':'showPreviousChange');}),_0x527e67;}),_0x31efd5['show'](),_0x2d0dba['on']('change:isReady',(_0x4117a5,_0x3600cc,_0x2ded96)=>{_0x2ded96?_0x31efd5['hide']():_0x31efd5['show']();});}}class pt extends nt{['_resizeObserver']=null;constructor(_0x45c0ed,_0x61652d){super(_0x45c0ed,_0x61652d);const _0x4e3428=this['bindTemplate'];this['set']({'label':m(_0x45c0ed,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x45c0ed,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x4e3428['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new at(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x559a33=this['fieldView']['element'];this['_tooltipString']=_0x559a33['scrollWidth']>_0x559a33['clientWidth']&&_0x559a33['value']||'';}}class ti extends _0x16162e{constructor(_0x32eecf,_0x5eb765,_0x33f6a6){super(_0x32eecf);const _0x4c5533=new _0x191733();_0x4c5533['set']({'content':'<svg\x20viewBox=\x220\x200\x2011\x2010\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20xmlns:xlink=\x22http://www.w3.org/1999/xlink\x22><path\x20d=\x22M5.5\x205C8.538\x205\x2011\x207.015\x2011\x209.5c0\x20.17-.011.336-.034.5H.034A3.732\x203.732\x200\x200\x201\x200\x209.5C0\x207.015\x202.462\x205\x205.5\x205zm0-5a2.5\x202.5\x200\x201\x201\x200\x205\x202.5\x202.5\x200\x200\x201\x200-5z\x22\x20/></svg>\x0a','viewBox':'0\x200\x2011\x2010'});const _0x39bc95=['ck','ck-revision-history-sidebar__revision-author'];_0x33f6a6&&_0x39bc95['push']('ck-revision-history-sidebar__revision-author_creator');const _0x46b705=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x32eecf,_0x33f6a6?'Revision\x20creator':'Revision\x20author')},'children':[_0x4c5533,_0x5eb765['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x39bc95},'children':_0x46b705});}}function ni(_0x91e94,_0x18f390){const _0x593668=_0x91e94['bindTemplate'],_0x2815c3=_0x91e94['locale'],_0x415727=_0x18051a(_0x2815c3);_0x415727['panelPosition']='sw';const _0x461bd5=function(_0x3959d7,_0x11682c){const _0x34a6f6=function(_0x3e72bd,_0x1651f2){const _0x2cb098=_0x3e72bd['locale'],_0x2d7cc5={'Compare\x20against\x20selected':m(_0x2cb098,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x2cb098,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x2cb098,'Restore\x20this\x20revision')};return _0x1651f2['map'](_0x1f0c77=>{const _0x38163b=_0x2d7cc5[_0x1f0c77['name']];return _0x38163b&&_0x38163b!==_0x1f0c77['name']&&(_0x1f0c77['name']=_0x38163b),_0x1f0c77;});}(_0x3959d7,_0x11682c),_0x19a0c4=new _0x4043e7();for(const _0x4755f4 of _0x34a6f6){const _0x21a1ed={'type':'button','model':new to({'label':_0x4755f4['name'],'class':_0x4755f4['class'],'withText':!0x0,'role':'menuitem','_action':_0x4755f4['action']})};_0x21a1ed['model']['bind']('isEnabled')['to'](_0x3959d7,'isActionsDropdownOpen',_0x19d502=>'function'!=typeof _0x4755f4['isEnabled']||(!_0x19d502||_0x4755f4['isEnabled'](_0x3959d7))),_0x19a0c4['add'](_0x21a1ed);}return _0x19a0c4;}(_0x91e94,_0x18f390);return _0x91e94['bind']('isActionsDropdownOpen')['to'](_0x415727,'isOpen'),_0x415727['buttonView']['set']({'label':m(_0x2815c3,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x7e0d0d['threeVerticalDots']}),_0x415727['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x593668['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x593668['to'](_0x308542=>_0x308542['stopPropagation']())}}),_0x415727['on']('execute',_0x1c4d17=>{_0x91e94['isReady']&&'function'==typeof _0x1c4d17['source']['_action']&&_0x1c4d17['source']['_action'](_0x91e94);}),_0x2f39dd(_0x415727,_0x461bd5,{'role':'menu'}),_0x415727['listenTo'](_0x91e94,'change:isActionsDropdownOpen',(_0x354ace,_0x13cdac,_0x5d92af)=>{if(_0x5d92af)for(const _0x3a93ec of _0x415727['listView']['items']){const _0xc06b7d=_0x3a93ec['children']['first'],_0x5af667=_0x18f390['find'](_0x1c3ff2=>_0x1c3ff2['action']===_0xc06b7d['_action'])['isVisible'];_0x3a93ec['isVisible']=void 0x0===_0x5af667||_0x5af667(_0x91e94);}}),_0x415727;}class ai extends/* #__PURE__ -- @preserve */
26
- _0x27f092(_0x16162e){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x20e083,_0x33cd09,_0x13fd58,_0x5e5fce){super(_0x20e083);const _0x2d6500=this['bindTemplate'],_0x571fa3=function(_0x3fb806,_0x15ce09){const _0x482ff0=Array['from'](_0x15ce09['authors'])['filter'](_0x55f01f=>_0x55f01f!=_0x15ce09['creator']);return _0x15ce09['creator']&&_0x482ff0['unshift'](_0x15ce09['creator']),_0x482ff0['map'](_0x2a28f3=>new ti(_0x3fb806,_0x2a28f3,_0x2a28f3==_0x15ce09['creator']));}(_0x20e083,_0x33cd09);this['id']=_0x33cd09['id'],this['_revision']=_0x33cd09,this['_requireRevisionName']=_0x5e5fce,this['bind']('name','createdAt')['to'](_0x33cd09),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x3a576b=>{return _0x2466ae=_0x20e083['uiLanguage'],(_0x437c50=_0x3a576b)['toLocaleDateString'](_0x2466ae,{'month':'long','day':'numeric'})+',\x20'+_0x437c50['toLocaleTimeString'](_0x2466ae,{'hour':'numeric','minute':'numeric'});var _0x2466ae,_0x437c50;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new pt(_0x20e083,_0x194c4c),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x2c1bc7=>_0x2c1bc7||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x5b401e,_0x20357e)=>_0x5b401e&&_0x20357e),this['revisionActionsView']=_0x13fd58&&_0x13fd58['length']?ni(this,_0x13fd58):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x2d6500['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x2d6500['if']('isEnabled','ck-disabled',_0x3f3edc=>!_0x3f3edc),_0x2d6500['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x2d6500['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x2d6500['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':_0x2d6500['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':_0x571fa3}]},this['revisionActionsView']],'on':{'click':_0x2d6500['to'](_0x1dfc27=>{_0x1dfc27['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x157837=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x157837,'change',()=>{this['_requireRevisionName']&&!_0x157837['value']||this['fire']('setName',{'id':this['id'],'name':_0x157837['value']}),_0x157837['value']||(_0x157837['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function di(_0x405950,_0xf601aa){const _0x5051b2=_0x313a70['fromJSDate'](_0x405950)['setLocale'](_0xf601aa),_0x16b3c0=_0x313a70['local'](),_0x28811e=_0x16b3c0['minus']({'days':0x1})['startOf']('day');let _0x28271b,_0xfb2b5f;return _0x5051b2['hasSame'](_0x16b3c0,'day')?(_0x28271b=_0x5051b2['startOf']('day')['toJSDate'](),_0xfb2b5f=_0x5051b2['toRelativeCalendar']()):_0x5051b2['hasSame'](_0x28811e,'day')?(_0x28271b=_0x28811e['toJSDate'](),_0xfb2b5f=_0x5051b2['toRelativeCalendar']()):_0x5051b2['hasSame'](_0x16b3c0,'week')?(_0x28271b=_0x5051b2['startOf']('week')['toJSDate'](),_0xfb2b5f=_0x5051b2['weekdayLong']||''):_0x5051b2['hasSame'](_0x16b3c0,'year')?(_0x28271b=_0x5051b2['startOf']('month')['toJSDate'](),_0xfb2b5f=_0x5051b2['monthLong']||''):(_0x28271b=_0x5051b2['startOf']('year')['toJSDate'](),_0xfb2b5f=String(_0x5051b2['year'])),{'startDate':_0x28271b,'localizedPeriodName':_0xfb2b5f};}class mi extends _0x16162e{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x2a4859,_0x7966d5,_0x160d92,_0x4168dc){super(_0x2a4859);const _0x10bee3=di(_0x7966d5,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x7966d5,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x160d92,this['_requireRevisionName']=_0x4168dc,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':_0x10bee3}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x322577){const _0x138af1=new ai(this['locale'],_0x322577,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x138af1);}['removeRevision'](_0x3470b6){const _0x21492a=this['revisionViews']['find'](_0x49029f=>_0x49029f['id']===_0x3470b6['id']);this['revisionViews']['remove'](_0x21492a);}}class as extends _0x16162e{constructor(_0x46ad7b){super(_0x46ad7b);const _0xc5af5c=new _0x191733();_0xc5af5c['content']=_0x7e0d0d['history'],this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0xc5af5c,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[m(_0x46ad7b,'Revision\x20history')]}]});}}class ci extends _0x16162e{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x2d690c,_0x1e8e01,_0x586ffb,_0xa472c7){super(_0x2d690c);const _0x34caf8=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x1e8e01,this['_revisionActions']=_0x586ffb,this['_requireRevisionName']=_0xa472c7,this['on']('select',(_0x47a2ac,_0x15a62a)=>{this['fire']('revisionSelected',_0x15a62a);}),this['on']('setName',(_0x4629eb,_0x423d72)=>{this['fire']('revisionSetName',_0x423d72);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new as(_0x2d690c),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x34caf8['if']('isEnabled','ck-disabled',_0x52e94a=>!_0x52e94a)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x389116 of this['_revisions'])this['_addRevision'](_0x389116);this['_revisions']['on']('add',(_0x1e136f,_0x1b390a)=>{this['_addRevision'](_0x1b390a);}),this['_revisions']['on']('remove',(_0x2dc8d8,_0x241acb)=>{this['_removeRevision'](_0x241acb);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x28c642=>_0x28c642['revisionViews']['map'](_0x352d0c=>_0x352d0c))['flat']();}['selectRevision'](_0x28a0de){for(const _0x3d8351 of this['revisionViews'])_0x28a0de&&_0x28a0de['id']===_0x3d8351['id']?_0x3d8351['select']():_0x3d8351['deselect']();}['highlightRevisions'](_0x3f6ae3){for(const _0x535ac6 of this['revisionViews'])_0x3f6ae3['some'](({id:_0x499c82})=>_0x499c82===_0x535ac6['id'])?_0x535ac6['highlight']():_0x535ac6['unhighlight']();}['_addRevision'](_0x33294c){const _0x56dd75=di(_0x33294c['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x2b66d1=this['timePeriodViews']['get'](0x0);_0x2b66d1&&_0x2b66d1['startDate']['getTime']()===_0x56dd75['getTime']()||(_0x2b66d1=new mi(this['locale'],_0x56dd75,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x2b66d1)),_0x2b66d1['addRevision'](_0x33294c);}['_removeRevision'](_0x371fd8){const _0x4607ad=di(_0x371fd8['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x4607ad)['removeRevision'](_0x371fd8);}['_getTimePeriodViewByStartDate'](_0x4526d7){return this['timePeriodViews']['find'](_0x1d95ed=>_0x1d95ed['startDate']['getTime']()===_0x4526d7['getTime']());}}class w extends _0x21f9a0{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
23
+ import{ObservableMixin as _0x33b2e5,uid as _0x3facc5,Collection as _0x12f74d,logWarning as _0x3e52c3,FocusTracker as _0x8dd88d,KeystrokeHandler as _0x501707,scrollViewportToShowTarget as _0x356aef,ResizeObserver as pt,ElementReplacer as ht,CKEditorError as _0x9e8044}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x5c9543,set as _0x3a54d6,unset as _0x15efb3,isEqual as _0x16ab5a}from'es-toolkit/compat';import{Plugin as _0x6878ef,PendingActions as _0x59e4ca,Command as _0x14e675,ElementApiMixin as it,Editor as tt}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x3e0391,getMarkerDomElement as _0x6880b8,ConfirmMixin as _0x26fcc7,sanitizeEditorConfig as _0x4d6844}from'ckeditor5-collaboration/dist/index.js';import{ViewDocumentFragment as _0x15885f,Element as ut,Range as ft,ViewUIElement as _0x151d6e,ViewRawElement as _0x101b60,ViewEmptyElement as _0x2255d2,ViewAttributeElement as _0x58f15a,ViewContainerElement as _0x783e3f,Position as vt,ViewText as _0x5c17c1,ViewElement as _0x43d47e,DocumentFragment as gt,Text as wt}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x3427a3,IconChevronUp as _0x2a850c,IconChevronDown as _0x541ed3,IconUndo as _0x52efde,IconUser as _0x4828a2,IconThreeVerticalDots as _0x49d23b}from'@ckeditor/ckeditor5-icons/dist/index.js';import{View as _0x572c6d,injectCssTransitionDisabler as ts,submitHandler as _0x1576d1,LabeledFieldView as at,createLabeledInputText as ti,createDropdown as _0xef6b9b,ListView as _0x999761,ListItemView as te,ButtonView as _0x5c9eb1,MenuBarMenuView as _0x4de212,MenuBarMenuListView as _0x3007fb,MenuBarMenuListItemView as _0x7508de,MenuBarMenuListItemButtonView as _0x29b0b9,ContextualBalloon as _0x1b54bd,ToolbarSeparatorView as _0x54b919,IconView as _0x3c8e1e,addListToDropdown as _0x3dccd9,ViewModel as to,EditorUI as st,normalizeToolbarConfig as ot,BoxedEditorUIView as ct,StickyPanelView as lt,ToolbarView as nt,InlineEditableUIView as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x1e67d1}from'luxon';class h extends/* #__PURE__ -- @preserve */
24
+ _0x33b2e5(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x160864){super(),this['id']=_0x160864['id']||_0x3facc5(),this['creator']=_0x160864['creator']||null,this['authors']=_0x160864['authors']||[],this['diffData']=_0x160864['diffData']||null,this['toVersion']=_0x160864['toVersion']||0x0,this['fromVersion']=_0x160864['fromVersion']||0x0,this['set']('name',_0x160864['name']||''),this['set']('createdAt',_0x160864['createdAt']||new Date()),this['set']('attributes',_0x160864['attributes']||{});}['setName'](_0x5d0e5c){this['_update']({'name':_0x5d0e5c});}['setAttribute'](_0x1a556d,_0x552d0e){const _0x3e0d67=_0x5c9543(this['attributes']);_0x3a54d6(_0x3e0d67,_0x1a556d,_0x552d0e),this['_update']({'attributes':_0x3e0d67});}['removeAttribute'](_0x181e4f){const _0x106165=_0x5c9543(this['attributes']);_0x15efb3(_0x106165,_0x181e4f),this['_update']({'attributes':_0x106165});}['_update'](_0x3c7ab2,_0x390e3d=!0x1){let _0x18037d=!0x1;const _0x4ef6c6={'id':this['id']},_0x193510=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0xcb0ee8 of _0x193510){const _0x1a1609=_0x3c7ab2[_0xcb0ee8];void 0x0!==_0x1a1609&&_0x1a1609!==this[_0xcb0ee8]&&(this[_0xcb0ee8]=_0x1a1609,_0x4ef6c6[_0xcb0ee8]=_0x1a1609,_0x18037d=!0x0);}_0x18037d&&(_0x4ef6c6['authors']&&(_0x4ef6c6['authorsIds']=_0x4ef6c6['authors']['map'](_0x369c4d=>_0x369c4d['id']),delete _0x4ef6c6['authors']),this['fire']('_update',_0x4ef6c6,_0x390e3d));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x24ba4f=>_0x24ba4f['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class j extends _0x6878ef{['_revisions'];static get['requires'](){return[_0x3e0391];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x5b42d6){super(_0x5b42d6),this['_revisions']=new _0x12f74d();}['afterInit'](){!async function(_0x5d632f){const _0x426656=_0x310022([0x4b,0x64,0x4e,0x5a,0x68,0x71,0x4d,0x78,0x4f,0x31,0x48,0x6c,0x50,0x37,0x46,0x54,0x59,0x43,0x73,0x63,0x58,0x4c,0x55,0x6b,0x36,0x6f,0x32,0x7a,0x38,0x6e,0x77,0x51,0x6a,0x69,0x53,0x66,0x35,0x49,0x30,0x70,0x6d,0x61,0x45,0x74,0x41,0x72,0x67,0x34,0x4a,0x76,0x65,0x57,0x75,0x56,0x33,0x47,0x39,0x62,0x44,0x42,0x79,0x52]),_0x42a337=0xeb829,_0x225ab7=0x5a1b75d5,_0x2dc0a0=0x5a1c2ae5^_0x225ab7,_0x5ee868=window[_0x310022([0x44,0x61,0x74,0x65])][_0x310022([0x6e,0x6f,0x77])](),_0x325781=_0x5d632f[_0x310022([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x117386=new window[(_0x310022([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3b8c43=>{_0x325781[_0x310022([0x6f,0x6e,0x63,0x65])](_0x310022([0x72,0x65,0x61,0x64,0x79]),_0x3b8c43);}),_0x23d130={[_0x310022([0x6b,0x74,0x79])]:_0x310022([0x45,0x43]),[_0x310022([0x75,0x73,0x65])]:_0x310022([0x73,0x69,0x67]),[_0x310022([0x63,0x72,0x76])]:_0x310022([0x50,0x2d,0x32,0x35,0x36]),[_0x310022([0x78])]:_0x310022([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]),[_0x310022([0x79])]:_0x310022([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]),[_0x310022([0x61,0x6c,0x67])]:_0x310022([0x45,0x53,0x32,0x35,0x36])},_0xb7896b=_0x325781[_0x310022([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x310022([0x67,0x65,0x74])](_0x310022([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0xa954eb(){let _0x270d53,_0x1840f4=null,_0x408a82=null;try{if(_0xb7896b==_0x310022([0x47,0x50,0x4c]))return _0x310022([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x270d53=_0x547fbd(),!_0x270d53)return _0x310022([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x270d53[_0x310022([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x408a82=_0x5a70b7(_0x270d53[_0x310022([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x270d53[_0x310022([0x6a,0x74,0x69])])),await _0x51e123()?_0x49a98c()?_0x103318()?_0x310022([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x233f98()?(_0x270d53[_0x310022([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x310022([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1840f4=_0x22741f(_0x310022([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x270d53[_0x310022([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x310022([0x74,0x72,0x69,0x61,0x6c])&&(_0x1840f4=_0x22741f(_0x310022([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x343802()):_0x310022([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x310022([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x310022([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x1c9abb){return _0x310022([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x103318(){const _0x1a9d15=[_0x310022([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x310022([0x74,0x72,0x69,0x61,0x6c])][_0x310022([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x270d53[_0x310022([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x5ee868/0x3e8:0xe10*_0x2dc0a0;return _0x270d53[_0x310022([0x65,0x78,0x70])]<_0x1a9d15;}function _0x49a98c(){const _0x44e7e2=_0x270d53[_0x310022([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x44e7e2)return!0x1;if(_0x44e7e2[_0x310022([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x310022([0x2a])))return!0x0;if(_0x44e7e2[_0x310022([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x310022([0x52,0x48])))return!0x0;if(_0x44e7e2[_0x310022([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x310022([0x52,0x52,0x48]))){if(_0x11f509())return!0x0;if(_0x34d4a8()||_0x438a57())return!0x0;}return!0x1;}function _0x233f98(){const _0x5d56b8=_0x270d53[_0x310022([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x5d56b8||0x0==_0x5d56b8[_0x310022([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3abfde}=new URL(window[_0x310022([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x5d56b8[_0x310022([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3abfde))return!0x0;const _0x4c6ee0=_0x3abfde[_0x310022([0x73,0x70,0x6c,0x69,0x74])](_0x310022([0x2e]));return _0x5d56b8[_0x310022([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x53aedf=>_0x53aedf[_0x310022([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x310022([0x2a])))[_0x310022([0x6d,0x61,0x70])](_0x3c1960=>_0x3c1960[_0x310022([0x73,0x70,0x6c,0x69,0x74])](_0x310022([0x2e])))[_0x310022([0x73,0x6f,0x6d,0x65])](_0x330a63=>_0x4c6ee0[_0x310022([0x65,0x76,0x65,0x72,0x79])]((_0x120139,_0x227920)=>_0x330a63[_0x227920]===_0x120139||_0x330a63[_0x227920]===_0x310022([0x2a])));}function _0x343802(){return _0x1840f4&&_0x408a82?new window[(_0x310022([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x14e42d,_0x196cac)=>{_0x1840f4[_0x310022([0x74,0x68,0x65,0x6e])](_0x14e42d,_0x196cac),_0x408a82[_0x310022([0x74,0x68,0x65,0x6e])](_0x2704e2=>{_0x2704e2!=_0x310022([0x56,0x61,0x6c,0x69,0x64])&&_0x14e42d(_0x2704e2);},_0x196cac);}):_0x1840f4||_0x408a82||_0x310022([0x56,0x61,0x6c,0x69,0x64]);}}function _0x5a70b7(_0x16f8e4,_0x1aba86){return new window[(_0x310022([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x45fd67=>{if(_0x5eacff())return _0x45fd67(_0x310022([0x56,0x61,0x6c,0x69,0x64]));_0x3e0402(),_0x325781[_0x310022([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x310022([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3ea966=!0x1;const _0x3743f4=_0x3facc5();function _0x5dce0c(_0x1401cf){return!!_0x1401cf&&(typeof _0x1401cf===_0x310022([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1401cf===_0x310022([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1401cf[_0x310022([0x74,0x68,0x65,0x6e])]===_0x310022([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1401cf[_0x310022([0x63,0x61,0x74,0x63,0x68])]===_0x310022([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x5b2e58(_0x462aba){_0x3a9aa1(_0x462aba)[_0x310022([0x74,0x68,0x65,0x6e])](_0x41745a=>{if(!_0x41745a||_0x41745a[_0x310022([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x310022([0x6f,0x6b]))return _0x310022([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5801cf(_0x5fab08(_0x3743f4+_0x1aba86))!=_0x41745a[_0x310022([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x310022([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x310022([0x56,0x61,0x6c,0x69,0x64]);})[_0x310022([0x74,0x68,0x65,0x6e])](_0x1eec27=>(_0x3b0c0a(),_0x1eec27),()=>{const _0x416f12=_0x566498();return null==_0x416f12?(_0x3b0c0a(),_0x310022([0x56,0x61,0x6c,0x69,0x64])):_0x310022(_0x5ee868-_0x416f12>(0x7e17f1d5^_0x225ab7)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x310022([0x74,0x68,0x65,0x6e])](_0x45fd67)[_0x310022([0x63,0x61,0x74,0x63,0x68])](()=>{_0x45fd67(_0x310022([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1335c2=0x5a2d9b55^_0x225ab7;function _0x3b0c0a(){const _0x191bd7=_0x310022([0x6c,0x6c,0x63,0x74,0x2d])+_0x5801cf(_0x5fab08(_0x16f8e4)),_0x4e89dc=_0x2e3798(_0x5801cf(window[_0x310022([0x4d,0x61,0x74,0x68])][_0x310022([0x63,0x65,0x69,0x6c])](_0x5ee868/_0x1335c2)));window[_0x310022([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x310022([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x191bd7,_0x4e89dc);}function _0x566498(){const _0x1afa15=_0x310022([0x6c,0x6c,0x63,0x74,0x2d])+_0x5801cf(_0x5fab08(_0x16f8e4)),_0x5d7df2=window[_0x310022([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x310022([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1afa15);return _0x5d7df2?window[_0x310022([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2e3798(_0x5d7df2),0x10)*_0x1335c2:null;}function _0x3a9aa1(_0x87fd4d){return new window[(_0x310022([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x116e71,_0x1ed862)=>{_0x87fd4d[_0x310022([0x74,0x68,0x65,0x6e])](_0x116e71,_0x1ed862),window[_0x310022([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1ed862,0x5a1aa115^_0x225ab7);});}}_0x325781[_0x310022([0x6f,0x6e])](_0x310022([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x34f290,_0x3dc8d4)=>{if(_0x3dc8d4[0x0]!=_0x16f8e4)return _0x45fd67(_0x310022([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3dc8d4[0x1]={..._0x3dc8d4[0x1],[_0x310022([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x3743f4};},{[_0x310022([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x310022([0x68,0x69,0x67,0x68])}),_0x325781[_0x310022([0x6f,0x6e])](_0x310022([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x906640=>{_0x5dce0c(_0x906640[_0x310022([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3ea966=!0x0,_0x5b2e58(_0x906640[_0x310022([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x310022([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x310022([0x6c,0x6f,0x77])}),_0x117386[_0x310022([0x74,0x68,0x65,0x6e])](()=>{_0x3ea966||_0x45fd67(_0x310022([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x5eacff(){return _0x325781[_0x310022([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x310022([0x76,0x69,0x65,0x77])][_0x310022([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x310022([0x61,0x75,0x74,0x6f]);}function _0x3e0402(){_0x325781[_0x310022([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x310022([0x76,0x69,0x65,0x77])][_0x310022([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x310022([0x61,0x75,0x74,0x6f]);}}function _0x22741f(_0x333d83){const _0x11bc72=[new window[(_0x310022([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4a2186=>setTimeout(_0x4a2186,0x5a124b19^_0x225ab7)),_0x117386[_0x310022([0x74,0x68,0x65,0x6e])](()=>new window[(_0x310022([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x528056=>{const _0x9dc238=0x5a1b75d2^_0x225ab7,_0x2c7da0=_0x5d632f[_0x310022([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x258025(){_0x2c7da0[_0x310022([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x9dc238&&_0x528056();}_0x258025(),_0x2c7da0[_0x310022([0x6f,0x6e])](_0x310022([0x61,0x64,0x64]),_0x258025);})),new window[(_0x310022([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3a876e=>{function _0x23943b(){for(const _0xa631b4 in window)if(window[_0x310022([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x310022([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0xa631b4))&&window[_0xa631b4]==_0x42a337)return _0x3a876e();_0x325781[_0x310022([0x73,0x74,0x61,0x74,0x65])]!=_0x310022([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x310022([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x23943b,0x5a1b665d^_0x225ab7);}_0x1d75cb(_0x310022([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x23943b();})];return window[_0x310022([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x310022([0x72,0x61,0x63,0x65])](_0x11bc72)[_0x310022([0x74,0x68,0x65,0x6e])](()=>_0x333d83);}async function _0x26450c(){if(await _0x117386,_0x1d75cb(_0x310022([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0xe661fd=_0x5d632f[_0x310022([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x56ebb1=_0x5d632f[_0x310022([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])](_0xe661fd[_0x310022([0x69,0x64])]),_0x2364c3=_0x31dbd2(_0x310022([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x2364c3[_0x310022([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0xe661fd['id'],_0x56ebb1?_0x56ebb1['id']:null,!0x0),_0x2364c3[_0x310022([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x310022([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x2364c3[_0x310022([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x2364c3[_0x310022([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x2a71c7,void(_0x2364c3[_0x310022([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x2a71c7);}if(_0x1d75cb(_0x310022([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x4488b1=_0x31dbd2(_0x310022([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x4488b1[_0x310022([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x310022([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x4488b1[_0x310022([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x4488b1[_0x310022([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x2a71c7,_0x4488b1[_0x310022([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x2a71c7;}_0x325781[_0x310022([0x6d,0x6f,0x64,0x65,0x6c])][_0x310022([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x2a71c7,_0x325781[_0x310022([0x6d,0x6f,0x64,0x65,0x6c])][_0x310022([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x2a71c7,_0x325781[_0x310022([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x310022([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x11f509(){return _0x1d75cb(_0x310022([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x31dbd2(_0x310022([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x310022([0x73,0x74,0x61,0x74,0x65])]==_0x310022([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x34d4a8(){return _0x1d75cb(_0x310022([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 _0x438a57(){return _0x1d75cb(_0x310022([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x51834e(_0x2fd8ec){const _0x4ef4be=_0x4584f4();_0x325781[_0x4ef4be]=_0x310022([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])+_0x2fd8ec,_0x2fd8ec[_0x310022([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x310022([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x4584f4()]=_0x42a337),_0x2fd8ec!=_0x310022([0x56,0x61,0x6c,0x69,0x64])&&_0x26450c();}function _0x4584f4(){const _0x3caf1f=window[_0x310022([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x310022([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x310022([0x6e,0x6f,0x77])]())[_0x310022([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x310022([0x2e]),'');let _0x3681e5=_0x310022([0x4b]);for(let _0xbbe78b=0x0;_0xbbe78b<_0x3caf1f[_0x310022([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xbbe78b+=0x2){let _0xfb9828=window[_0x310022([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3caf1f[_0x310022([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xbbe78b,_0xbbe78b+0x2));_0xfb9828>=_0x426656[_0x310022([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0xfb9828-=_0x426656[_0x310022([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3681e5+=_0x426656[_0xfb9828];}return _0x3681e5;}function _0x547fbd(){const _0x513c82=_0xb7896b[_0x310022([0x73,0x70,0x6c,0x69,0x74])](_0x310022([0x2e]));if(0x3!=_0x513c82[_0x310022([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x5779bb(_0x513c82[0x1]);function _0x5779bb(_0x3cc998){const _0x4b40d1=_0x485145(_0x3cc998);return _0x4b40d1&&_0x25762a()?_0x4b40d1:null;function _0x25762a(){const _0x5bea69=_0x4b40d1[_0x310022([0x6a,0x74,0x69])],_0x19073f=window[_0x310022([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5bea69[_0x310022([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5bea69[_0x310022([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x3a6c22={..._0x4b40d1,[_0x310022([0x6a,0x74,0x69])]:_0x5bea69[_0x310022([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x5bea69[_0x310022([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x3a6c22[_0x310022([0x76,0x63])],_0x5fab08(_0x3a6c22)==_0x19073f;}}}async function _0x51e123(){let _0x2cd17d=!0x0;try{const _0x438cda=_0xb7896b[_0x310022([0x73,0x70,0x6c,0x69,0x74])](_0x310022([0x2e])),[_0x49b3e3,_0x1c2847,_0x4f992a]=_0x438cda;return _0x1994a5(_0x49b3e3),await _0x6f3498(_0x49b3e3,_0x1c2847,_0x4f992a),_0x2cd17d;}catch(_0x30769f){return!0x1;}function _0x1994a5(_0x2702a6){const _0x41310e=_0x485145(_0x2702a6);_0x41310e&&_0x41310e[_0x310022([0x61,0x6c,0x67])]==_0x310022([0x45,0x53,0x32,0x35,0x36])||(_0x2cd17d=!0x1);}async function _0x6f3498(_0x3402a1,_0x4c85e1,_0x3c83de){const _0x5dae26=window[_0x310022([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x310022([0x66,0x72,0x6f,0x6d])](_0x42a1de(_0x3c83de),_0x41d16a=>_0x41d16a[_0x310022([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x12e36a=new window[(_0x310022([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x310022([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x3402a1+_0x310022([0x2e])+_0x4c85e1),_0x42ef91=window[_0x310022([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x310022([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x42ef91)return;const _0x1126bd=await _0x42ef91[_0x310022([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x310022([0x6a,0x77,0x6b]),_0x23d130,{[_0x310022([0x6e,0x61,0x6d,0x65])]:_0x310022([0x45,0x43,0x44,0x53,0x41]),[_0x310022([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x310022([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x310022([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x42ef91[_0x310022([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x310022([0x6e,0x61,0x6d,0x65])]:_0x310022([0x45,0x43,0x44,0x53,0x41]),[_0x310022([0x68,0x61,0x73,0x68])]:{[_0x310022([0x6e,0x61,0x6d,0x65])]:_0x310022([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1126bd,_0x5dae26,_0x12e36a)||(_0x2cd17d=!0x1);}}function _0x485145(_0x17b002){return _0x17b002[_0x310022([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x310022([0x65,0x79]))?JSON[_0x310022([0x70,0x61,0x72,0x73,0x65])](_0x42a1de(_0x17b002)):null;}function _0x42a1de(_0x4a1d93){return window[_0x310022([0x61,0x74,0x6f,0x62])](_0x4a1d93[_0x310022([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x310022([0x2b]))[_0x310022([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x310022([0x2f])));}function _0x5fab08(_0x334e35){let _0x49ca5f=0x1505;function _0x269398(_0xfc9895){for(let _0x1fe650=0x0;_0x1fe650<_0xfc9895[_0x310022([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1fe650++){const _0x4b574d=_0xfc9895[_0x310022([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1fe650);_0x49ca5f=(_0x49ca5f<<0x5)+_0x49ca5f+_0x4b574d,_0x49ca5f&=_0x49ca5f;}}function _0x3d9834(_0x1bf4fd){Array[_0x310022([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1bf4fd)?_0x1bf4fd[_0x310022([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3d9834):_0x1bf4fd&&typeof _0x1bf4fd==_0x310022([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x310022([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1bf4fd)[_0x310022([0x73,0x6f,0x72,0x74])]()[_0x310022([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x220250,_0x19c1da])=>{_0x269398(_0x220250),_0x3d9834(_0x19c1da);}):_0x269398(window[_0x310022([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1bf4fd));}return _0x3d9834(_0x334e35),_0x49ca5f>>>0x0;}function _0x5801cf(_0x2881dd){return _0x2881dd[_0x310022([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x310022([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x310022([0x30]));}function _0x2e3798(_0x560b56){return _0x560b56[_0x310022([0x73,0x70,0x6c,0x69,0x74])]('')[_0x310022([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x310022([0x6a,0x6f,0x69,0x6e])]('');}function _0x1d75cb(_0x507303){return _0x325781[_0x310022([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x310022([0x68,0x61,0x73])](_0x507303);}function _0x31dbd2(_0xcb8e41){return _0x325781[_0x310022([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x310022([0x67,0x65,0x74])](_0xcb8e41);}function _0x2a71c7(){}function _0x310022(_0x2ee26f){return _0x2ee26f['map'](_0xe5dd5f=>String['fromCharCode'](_0xe5dd5f))['join']('');}_0x51834e(await _0xa954eb());}(this);}['createRevision'](_0x3d39e9){const _0x580d5a=this['editor']['plugins']['get']('Users');return new h({'id':_0x3d39e9['id'],'name':_0x3d39e9['name'],'creator':_0x3d39e9['creatorId']?_0x580d5a['getUser'](_0x3d39e9['creatorId']):null,'diffData':_0x3d39e9['diffData']||_0x3d39e9['data'],'authors':_0x3d39e9['authorsIds']['map'](_0x4b6d74=>_0x580d5a['getUser'](_0x4b6d74)),'createdAt':new Date(_0x3d39e9['createdAt']),'attributes':_0x3d39e9['attributes'],'fromVersion':_0x3d39e9['fromVersion'],'toVersion':_0x3d39e9['toVersion']});}['addRevision'](_0x36b514,_0x576371=0x0){this['_revisions']['add'](_0x36b514,_0x576371);}['getRevision'](_0xc47761){return this['_revisions']['get'](_0xc47761);}['getRevisions'](_0x538e6e={'toJSON':!0x1}){const _0x6669be=Array['from'](this['_revisions']);return _0x6669be['reverse'](),_0x538e6e['toJSON']?_0x6669be['map'](_0xd0d639=>_0xd0d639['toJSON']()):_0x6669be;}['getIndex'](_0x1cce55){return this['_revisions']['getIndex'](_0x1cce55);}['getEarlierVisibleRevision'](_0x24a9b3){const [,_0x511476]=this['getRevisionsIterator'](_0x24a9b3,{'direction':'earlier'});return _0x511476;}['getLaterVisibleRevision'](_0x282abe){const [,_0x1f9c5]=this['getRevisionsIterator'](_0x282abe,{'direction':'later'});return _0x1f9c5;}['getRevisionsInDiff'](_0x5901c4){const _0x31e507=[];for(const _0x279864 of this['getRevisionsIterator'](_0x5901c4['newRevisionId']))if(_0x31e507['push'](_0x279864),_0x279864['id']===_0x5901c4['oldRevisionId'])break;return _0x31e507;}*['getRevisionsIterator'](_0xf97efa,{direction:_0xc8e96e='earlier',filter:_0x18ed44=()=>!0x0}={}){const _0x2eecc5='earlier'===_0xc8e96e?0x1:-0x1;let _0x4a96fc=this['_revisions']['get'](_0xf97efa),_0x2c0a68=this['getIndex'](_0x4a96fc);for(yield _0x4a96fc;_0x4a96fc;){if(_0x2c0a68+=_0x2eecc5,_0x4a96fc=this['getRevision'](_0x2c0a68),!_0x4a96fc)return;_0x18ed44(_0x4a96fc)&&(yield _0x4a96fc);}}}function m(_0x4e7f1b,_0x5d854e,_0x1ef5b3){const t=_0x4e7f1b['t'];switch(_0x5d854e){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'},_0x1ef5b3);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x1ef5b3);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'';}}const E={'c':_0x783e3f,'a':_0x58f15a,'e':_0x2255d2,'r':_0x101b60,'u':_0x151d6e};class u extends _0x6878ef{['licenseKey'];['_licenseKeyCheckInterval'];['adapter'];['currentRevision'];['repository'];['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x3e0391,j,_0x59e4ca];}constructor(_0xdd8f5e){super(_0xdd8f5e),this['adapter']=null,this['currentRevision']=null,this['_revisionDataBuilder']=new V(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x289f4e=_0x3facc5();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x289f4e},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['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x14d09e=this['repository']['getRevision'](0x0),_0x31e185=_0x14d09e&&null===_0x14d09e['creator']?_0x14d09e:null;if(this['_continueCurrentRevision']=!!_0x31e185&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x552550=this['_source']['getCurrentRevisionId'](),_0x241866=this['repository']['getRevision'](_0x552550);if(_0x241866)this['_startingVersion']=_0x241866['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x4b3a65=this['_source']['history']['_operations']['find'](_0x26451f=>!_0x26451f['_isInit']),_0x4bfd61=_0x4b3a65?_0x4b3a65['baseVersion']:this['_source']['history']['version'];_0x14d09e?(_0x14d09e['toVersion']<_0x4bfd61&&_0x14d09e['_update']({'toVersion':_0x4bfd61}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x31e185['id'],this['_startingVersion']=_0x31e185['fromVersion']):(this['_startingVersion']=_0x14d09e['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x4bfd61,this['_continueCurrentRevision']=!0x1);}}else _0x31e185&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x31e185['toVersion'],this['editor']['model']['document']['history']['version']),_0x31e185['fromVersion']===_0x31e185['toVersion']?(0x0!==_0x31e185['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x31e185['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x31e185['id'],this['_startingVersion']=_0x31e185['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',_0x22d2ce=>!_0x22d2ce),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x2d8867=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x5c9b06;for(const _0xb5e0d6 in _0x2d8867){const _0x55aa8b=_0xb5e0d6,_0x2dd008=_0x2d8867[_0x55aa8b];if('revisionHistoryLicenseKeyValid'==_0x2dd008||'revisionHistoryLicenseKeyInvalid'==_0x2dd008||'revisionHistoryLicenseKeyExpired'==_0x2dd008||'revisionHistoryLicenseKeyDomainLimit'==_0x2dd008||'revisionHistoryLicenseKeyNotAllowed'==_0x2dd008||'revisionHistoryLicenseKeyEvaluationLimit'==_0x2dd008||'revisionHistoryLicenseKeyTrialLimit'==_0x2dd008||'revisionHistoryLicenseKeyUsageLimit'==_0x2dd008){delete _0x2d8867[_0x55aa8b],_0x5c9b06=_0x2dd008,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x5c9b06&&_0x2d8867['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x5c9b06&&_0x2d8867['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x5c9b06&&_0x2d8867['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x5c9b06&&_0x2d8867['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x5c9b06&&_0x2d8867['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x5c9b06&&_0x2d8867['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x5c9b06&&_0x2d8867['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x29eca7=this['repository']['getRevision'](0x0),_0x1c022c=await this['getRevisionDocumentData'](_0x29eca7),_0x1cb960=await this['getRevisionRootsAttributes'](_0x29eca7);this['_replaceEditorDataWithRevisionData'](_0x1c022c,_0x1cb960);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x11277b){this['_source']=_0x11277b;}async['update'](){const _0x43d3c8=await this['_source']['getLatestVersion']();if(_0x43d3c8>this['currentRevision']['toVersion']){await this['_loadState']();const _0x5516a2=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x43d3c8});_0x5516a2['authors']=_0x5516a2['authorsIds']['map'](_0x19ccab=>this['editor']['plugins']['get']('Users')['getUser'](_0x19ccab)),this['currentRevision']['_update'](_0x5516a2);}}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_loadRevisionData'](this['currentRevision']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}async['saveRevision'](_0x28ad3b={},_0x2ca418=null){const _0x2de235=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x2ca418>this['currentRevision']['toVersion']&&(_0x2ca418=null),null===_0x2ca418&&(_0x2ca418=await this['_source']['getLatestVersion']());const _0xa757e2=this['_getFromVersion'](_0x2ca418),_0x391ccf=this['buildRevisionData']({'from':_0xa757e2,'to':_0x2ca418});if(this['currentRevision']['toVersion']<_0x2ca418){const _0xb95a36=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x2ca418,'to':_0x2ca418});_0xb95a36['authors']=[],_0xb95a36['authorsIds']=[],_0xb95a36['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0xb95a36,!0x0),delete _0xb95a36['authors'],_0x2de235['push'](_0xb95a36);}_0x28ad3b['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x28ad3b['name']=_0x28ad3b['name']||null,_0x28ad3b['id']=_0x28ad3b['id']||_0x3facc5(),_0x28ad3b={..._0x28ad3b,..._0x391ccf};const _0x1a070f=this['addRevisionData'](_0x28ad3b);_0x2de235['push'](_0x28ad3b);const _0x2eed6b=this['repository']['getIndex'](_0x1a070f);if(0x0!==_0x2eed6b){const _0x37858a=this['repository']['getRevision'](_0x2eed6b-0x1);if(_0x37858a['fromVersion']!==_0x2ca418){const _0x5300ea=this['_revisionDataBuilder']['getData'](_0x2ca418,_0x37858a['toVersion']),_0x4b7efc={'id':_0x37858a['id'],'diffData':_0x5300ea['diffData'],'authorsIds':_0x5300ea['authorsIds'],'authors':_0x5300ea['authorsIds']['map'](_0x163e37=>this['editor']['plugins']['get']('Users')['getUser'](_0x163e37)),'fromVersion':_0x2ca418};_0x37858a===this['currentRevision']&&(_0x4b7efc['createdAt']=new Date(_0x28ad3b['createdAt']['getTime']()+0xa)),_0x37858a['_update'](_0x4b7efc,!0x0),delete _0x4b7efc['authors'],_0x2de235['push'](_0x4b7efc);}}if(this['adapter']){for(const _0x4fa0a0 of _0x2de235)this['_bufferUpdate'](_0x4fa0a0['id'],_0x4fa0a0,!0x0);this['sendBufferedUpdates']();}return _0x1a070f;}['addRevisionData'](_0x184d55){const _0x2982c1=this['repository']['createRevision'](_0x184d55);return this['adapter']&&_0x2982c1['on']('_update',(_0x3803ca,_0x45560d,_0x2690b4)=>{_0x2690b4||(this['_bufferUpdate'](_0x45560d['id'],_0x45560d,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x2982c1,this['_findInsertionIndex'](_0x2982c1)),_0x2982c1;}async['getRevisionDocumentData'](_0x51a897){await this['_loadRevisionData'](_0x51a897);const _0x3c3b18={};for(const _0x20b750 in _0x51a897['diffData']){if(_0x51a897['diffData'][_0x20b750]['attachChange']&&!_0x51a897['diffData'][_0x20b750]['attachChange']['isAttached'])continue;const _0x81c701=this['_removeRevisionMarkers'](JSON['parse'](_0x51a897['diffData'][_0x20b750]['insertions'])),_0x30c982=this['editor']['editing']['view']['document'],_0x1f2f72=new _0x15885f(_0x30c982,_0x81c701['map'](_0xf923b4=>P(_0xf923b4,this['editor'])));this['editor']['data']['processor']['useFillerType']('marked'),_0x3c3b18[_0x20b750]=this['editor']['data']['processor']['toData'](_0x1f2f72),this['editor']['data']['processor']['useFillerType']('default');}return _0x3c3b18;}async['getRevisionRootsAttributes'](_0x472958){await this['_loadRevisionData'](_0x472958);const _0x3ea663={};for(const _0x448a86 in _0x472958['diffData'])_0x472958['diffData'][_0x448a86]['attachChange']&&!_0x472958['diffData'][_0x448a86]['attachChange']['isAttached']||(_0x3ea663[_0x448a86]=_0x472958['diffData'][_0x448a86]['attributesAfter']||{});return _0x3ea663;}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x561234=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x1e8ffa=0x0;_0x1e8ffa<_0x561234['length'];_0x1e8ffa++){const _0x23079d=_0x561234[_0x1e8ffa];let _0xcedeaf=!0x1;for(const _0xc414c2 of Object['keys'](_0x23079d))void 0x0===_0x23079d[_0xc414c2]?delete _0x23079d[_0xc414c2]:'id'!==_0xc414c2&&(_0xcedeaf=!0x0);_0xcedeaf||(_0x561234[_0x1e8ffa]=null);}if(_0x561234=_0x561234['filter'](_0x2fd333=>null!==_0x2fd333),!_0x561234['length'])return;for(let _0x36be43=0x0;_0x36be43<_0x561234['length'];_0x36be43++){const _0x5c1177=_0x561234[_0x36be43];void 0x0!==_0x5c1177['fromVersion']&&void 0x0===_0x5c1177['toVersion']&&(_0x5c1177['toVersion']=this['repository']['getRevision'](_0x5c1177['id'])['toVersion']),void 0x0!==_0x5c1177['toVersion']&&void 0x0===_0x5c1177['fromVersion']&&(_0x5c1177['fromVersion']=this['repository']['getRevision'](_0x5c1177['id'])['fromVersion']);}const _0x395d82=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x561234,_0x395d82)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x52b8db=>{if(_0x52b8db){for(const _0x4757bc of _0x52b8db)this['setRevisionData']({'id':_0x4757bc['id'],'createdAt':_0x4757bc['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['_replaceEditorDataWithRevisionData'](_0x31797e,_0x29ec8f){let _0x58f847=this['editor']['config']['get']('initialData'),_0xf0d4c8=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x58f847){_0x58f847={};for(const _0x508111 of this['editor']['model']['document']['getRootNames']())_0x58f847[_0x508111]='';}if('string'==typeof _0x58f847&&(_0x58f847={'main':_0x58f847}),void 0x0===_0xf0d4c8){_0xf0d4c8={};for(const _0x6e033b of this['editor']['model']['document']['getRootNames']())_0xf0d4c8[_0x6e033b]={};}let _0x2b71bc=!0x1;const _0x587a00=Object['keys'](_0x58f847),_0x5e8a5b=Object['keys'](_0x31797e);for(const _0x352252 of _0x587a00){if(_0x58f847[_0x352252]!==_0x31797e[_0x352252]&&''!==_0x58f847[_0x352252]['trim']()){_0x2b71bc=!0x0;break;}if(!_0x16ab5a(_0xf0d4c8[_0x352252],_0x29ec8f[_0x352252])&&Object['keys'](_0xf0d4c8[_0x352252])['length']>0x0){_0x2b71bc=!0x0;break;}}_0x2b71bc||(_0x2b71bc=_0x5e8a5b['some'](_0x5dcea2=>!this['editor']['model']['document']['getRoot'](_0x5dcea2))),_0x2b71bc&&_0x3e52c3('editor-initial-data-replaced-with-revision-data',{'editorData':_0x58f847,'editorRootsAttributes':_0xf0d4c8,'revisionData':_0x31797e,'revisionRootsAttributes':_0x29ec8f}),this['editor']['config']['set']('initialData',_0x31797e),this['editor']['config']['set']('rootsAttributes',_0x29ec8f);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x22aac5=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x22aac5['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x2584cf){const _0x597a54=this['repository']['getRevisions']();_0x597a54['reverse']();let _0x41ffcd=0x0;for(;_0x41ffcd<_0x597a54['length'];){const _0x386ba0=_0x597a54[_0x41ffcd];if(_0x386ba0===this['currentRevision']){_0x41ffcd++;continue;}if(_0x386ba0['id']===this['_initialRevisionId'])break;const _0x5aff88=_0x2584cf['toVersion']-_0x386ba0['toVersion']||_0x2584cf['fromVersion']-_0x386ba0['fromVersion'];if(_0x5aff88>0x0)break;if(_0x5aff88<0x0)_0x41ffcd++;else{if(!_0x2584cf['creator']&&_0x386ba0['creator'])break;if(_0x386ba0['creator']||!_0x2584cf['creator']){if(_0x2584cf['createdAt']>_0x386ba0['createdAt'])break;_0x41ffcd++;}else _0x41ffcd++;}}return _0x41ffcd;}['setRevisionData'](_0x58c0f9){const _0x79110f=this['repository']['getRevision'](_0x58c0f9['id']);if(_0x58c0f9['createdAt']&&(_0x58c0f9['createdAt']=new Date(_0x58c0f9['createdAt'])),_0x58c0f9['authorsIds']){const _0x24972a=this['editor']['plugins']['get']('Users');_0x58c0f9['authors']=_0x58c0f9['authorsIds']['map'](_0x57c6a1=>_0x24972a['getUser'](_0x57c6a1));}_0x79110f['_update'](_0x58c0f9,!0x0);}['buildRevisionData']({revision:_0x32414d=null,from:_0x57341e=null,to:_0x49c309=null}){_0x57341e=null!==_0x57341e?_0x57341e:_0x32414d['fromVersion'],_0x49c309=null!==_0x49c309?_0x49c309:_0x32414d['toVersion'];const _0x1f34c6=this['_revisionDataBuilder']['getData'](_0x57341e,_0x49c309),_0x8737c2={'diffData':_0x1f34c6['diffData'],'authorsIds':_0x1f34c6['authorsIds'],'fromVersion':_0x57341e,'toVersion':_0x49c309};if(!_0x32414d||_0x49c309!==_0x32414d['toVersion']){const _0x51ab32=_0x49c309-0x1,_0x4c09ed=this['_source']['history']['getOperation'](_0x51ab32);_0x8737c2['createdAt']=_0x4c09ed&&_0x4c09ed['createdAt']||new Date();}if(this['_loadedStateData']&&_0x57341e===this['_loadedStateData']['fromVersion']){for(const _0x2b4003 of this['_loadedStateData']['authors'])_0x8737c2['authorsIds']['includes'](_0x2b4003['id'])||_0x8737c2['authorsIds']['push'](_0x2b4003['id']);}return _0x8737c2;}['_loadRevisionData'](_0x3d78ad){if(!_0x3d78ad||_0x3d78ad['diffData'])return Promise['resolve']();{const _0x442d72=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x442d72,'revisionId':_0x3d78ad['id']})['then'](_0x18f9b0=>{_0x3d78ad['diffData']=_0x18f9b0['diffData'];});}}['_bufferUpdate'](_0x3d7215,_0x16b4fa,_0x34dfba){if(this['_bufferedUpdates']['has'](_0x3d7215)){const _0x156027=this['_bufferedUpdates']['get'](_0x3d7215);_0x16b4fa=_0x34dfba?{..._0x156027,..._0x16b4fa}:{..._0x16b4fa,..._0x156027};}this['_bufferedUpdates']['set'](_0x3d7215,_0x16b4fa);}['_getFromVersion'](_0x3b029c){const _0x395778=this['repository']['getRevisions']();_0x395778['reverse'](),_0x395778['shift']();const _0x386fa1=_0x395778['find'](_0xda0689=>_0xda0689['toVersion']<=_0x3b029c)['toVersion'];return _0x386fa1<this['_startingVersion']?this['_startingVersion']:_0x386fa1;}['_createInitialRevision'](_0x5996da){const _0x150b45=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x150b45)this['_initialRevisionId']=_0x150b45['id'];else{const _0x5a4e48=!this['editor']['model']['document']['roots']['find'](_0x1c9d8c=>this['editor']['model']['hasContent'](_0x1c9d8c)),_0x27e0ec=this['editor']['plugins']['get']('Users')['me']['id'],_0x28ee81=m(this['editor']['locale'],_0x5a4e48?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x5996da,'to':_0x5996da,'id':this['_initialRevisionId'],'name':_0x28ee81,'creatorId':_0x27e0ec});}}['_createCurrentRevision'](_0x4c3130){const _0x49a3bc=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x49a3bc),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x4c3130,'to':_0x4c3130,'id':_0x49a3bc,'name':'','creatorId':null}));}['_makeRevision']({name:_0x306576,from:_0x5bd555,to:_0x7ff48,creatorId:_0x51a86f,id:_0x4e472e}){const _0x5f34b8=this['buildRevisionData']({'from':_0x5bd555,'to':_0x7ff48});_0x5f34b8['name']=_0x306576,_0x5f34b8['creatorId']=_0x51a86f,_0x5f34b8['id']=_0x4e472e;const _0x3cd1f5=this['addRevisionData'](_0x5f34b8);return this['adapter']&&this['_bufferUpdate'](_0x5f34b8['id'],_0x5f34b8,!0x0),_0x3cd1f5;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}['_removeRevisionMarkers'](_0x524150){return(_0x524150=_0x524150['filter'](_0x33bfbf=>!_0x33bfbf['name']||'revision-start'!==_0x33bfbf['name']&&'revision-end'!==_0x33bfbf['name']))['forEach'](_0x4d8a4a=>{'string'!=typeof _0x4d8a4a&&(_0x4d8a4a['children']=this['_removeRevisionMarkers'](_0x4d8a4a['children']),_0x4d8a4a['attributes']=_0x4d8a4a['attributes']['filter'](_0x219d23=>!_0x219d23[0x0]['startsWith']('data-revision-')));}),_0x524150;}}function P(_0x10dac5,_0x1e8a8e){const _0x4d8914=_0x1e8a8e['editing']['view']['document'];if('string'==typeof _0x10dac5)return new _0x5c17c1(_0x4d8914,_0x10dac5);{const _0x2f2b1e=_0x10dac5['children']['map'](_0x5c64bf=>P(_0x5c64bf,_0x1e8a8e));return new(E[_0x10dac5['type']]||_0x43d47e)(_0x4d8914,_0x10dac5['name'],_0x10dac5['attributes'],_0x2f2b1e);}}class V{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x445e12){this['editor']=_0x445e12,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'](_0x1a30c8){this['source']=_0x1a30c8;const _0x45083f=new Map(),_0x3f3fd6=new Map(),_0x4099d1=this['editor']['model']['document']['roots']['map'](_0x375d50=>_0x375d50['rootName']);for(const _0x4c8f4e of _0x4099d1){const _0x39a006=this['editor']['model']['document']['getRoot'](_0x4c8f4e),_0x57b149=T(_0x39a006);_0x45083f['set'](_0x4c8f4e,_0x57b149),_0x3f3fd6['set'](_0x4c8f4e,Object['fromEntries'](_0x39a006['getAttributes']()));}const _0x5ef510=Array['from'](this['editor']['model']['markers'])['map'](_0x518d92=>[_0x518d92['name'],_0x518d92['getRange']()]),_0x299152=this['source']['version'];this['_saveMetaData'](_0x299152,_0x45083f,_0x5ef510,_0x3f3fd6),this['_startingRevisionId']=this['_revisionId'];const _0x3610af=new Map(),_0x277c90=new Map();for(const _0x1f0f98 of _0x4099d1){const _0x4b9616=F(_0x1f0f98);_0x3610af['set'](_0x1f0f98,_0x4b9616),_0x277c90['set'](_0x1f0f98,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x3610af,[],_0x277c90);}['getData'](_0x7ffbea,_0x11eb9f){if(this['_lastFrom']===_0x7ffbea&&this['_lastTo']<=_0x11eb9f)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x11eb9f,!0x0);else{if(!this['_savedMetaData']['has'](_0x7ffbea)){const _0x37af62=this['_getPreviousFrom'](_0x7ffbea);this['_calculateMetaData'](_0x37af62,_0x7ffbea,!0x1);}this['_calculateMetaData'](_0x7ffbea,_0x11eb9f,!0x0);}return this['_lastFrom']=_0x7ffbea,this['_lastTo']=_0x11eb9f,this['_getState']();}['loadState'](_0x212c98){this['_reset'](),this['_lastFrom']=_0x212c98['fromVersion'],this['_lastTo']=_0x212c98['toVersion'];for(const _0x14f994 in _0x212c98['diffData']){const _0x254f47=_0x212c98['diffData'][_0x14f994]['attachChange'],_0x5ad3a9=_0x5c9543(_0x212c98['diffData'][_0x14f994]['attributesBefore'])||{},_0x3f5f96=this['_makeModelFromViewString'](_0x212c98['diffData'][_0x14f994]['deletions']);_0x3f5f96['rootName']=_0x14f994,_0x3f5f96['_isAttached']=!_0x254f47||!_0x254f47['isAttached'],_0x3f5f96['isAttached']=()=>_0x3f5f96['_isAttached'],this['_baseRoots']['set'](_0x14f994,_0x3f5f96),this['_baseRootsAttributes']['set'](_0x14f994,_0x5ad3a9),_0x254f47&&this['_touchedRoots']['set'](_0x14f994,_0x254f47);const _0x4023d9=this['_makeIdsRoot'](_0x3f5f96);this['_baseIdsRoots']['set'](_0x14f994,_0x4023d9);for(const [_0x2f58b3,_0x2d59c7]of _0x3f5f96['markers']){if(!_0x2f58b3['startsWith']('revision:'))continue;const _0x36ce32=_0x2f58b3['split'](':')[0x2];for(const _0x19f407 of _0x2d59c7['getWalker']({'singleCharacters':!0x0})){const _0x545cd3=this['_getVidAttributeName'](_0x19f407),_0x57b65b='elementEnd'==_0x19f407['type']?_0x19f407['previousPosition']['path']['slice'](0x0,-0x1):_0x19f407['previousPosition']['path'],_0x1daf60=_0x4023d9['getNodeByPath'](_0x57b65b)['getAttribute'](_0x545cd3);this['_touched']['set'](_0x1daf60,{'userId':_0x36ce32});}}}this['_startingRevisionId']=this['_revisionId'];const _0x10b550=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x11e2fa=>!this['_touched']['has'](_0x11e2fa));let _0x358e37=0x0;const _0x152ce1=new Map();for(const _0xf2a6a5 in _0x212c98['diffData']){const _0x4d3e94=_0x212c98['diffData'][_0xf2a6a5]['attachChange'],_0x3d7e12=_0x5c9543(_0x212c98['diffData'][_0xf2a6a5]['attributesAfter'])||{},_0x38ee13=this['_makeModelFromViewString'](_0x212c98['diffData'][_0xf2a6a5]['insertions']);_0x38ee13['rootName']=_0xf2a6a5,_0x38ee13['_isAttached']=!_0x4d3e94||_0x4d3e94['isAttached'],_0x38ee13['isAttached']=()=>_0x38ee13['_isAttached'],this['_diffRoots']['set'](_0xf2a6a5,_0x38ee13),this['_diffRootsAttributes']['set'](_0xf2a6a5,_0x3d7e12);const _0x1b6787=this['_makeIdsRoot'](_0x38ee13,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0xf2a6a5,_0x1b6787),_0x152ce1['set'](_0xf2a6a5,_0x38ee13['isAttached']()?_0x3d7e12:{});for(const [_0x4848f9,_0x34699f]of _0x38ee13['markers']){if(!_0x4848f9['startsWith']('revision:'))continue;const _0x4a97ed=_0x4848f9['split'](':')[0x2];for(const _0x19ef7b of _0x34699f['getWalker']({'singleCharacters':!0x0})){const _0x4a86d4=this['_getVidAttributeName'](_0x19ef7b),_0x12588f=this['_revisionId']++,_0x32c5fa='elementEnd'==_0x19ef7b['type']?_0x19ef7b['previousPosition']['path']['slice'](0x0,-0x1):_0x19ef7b['previousPosition']['path'];_0x1b6787['getNodeByPath'](_0x32c5fa)['_setAttribute'](_0x4a86d4,_0x12588f),this['_touched']['set'](_0x12588f,{'userId':_0x4a97ed});}}for(const _0x904753 of this['editor']['model']['createRangeIn'](_0x38ee13)['getWalker']({'singleCharacters':!0x0})){const _0x4294c6=this['_getVidAttributeName'](_0x904753),_0x15e2ab='elementEnd'==_0x904753['type']?_0x904753['previousPosition']['path']['slice'](0x0,-0x1):_0x904753['previousPosition']['path'],_0x21cbae=_0x1b6787['getNodeByPath'](_0x15e2ab);_0x21cbae['getAttribute'](_0x4294c6)>0x0||_0x21cbae['_setAttribute'](_0x4294c6,_0x10b550[_0x358e37++]);}for(const [_0x188852,_0x452477]of _0x38ee13['markers'])_0x188852['startsWith']('revision:')||this['_markers']['set'](_0x188852,_0x452477);}const _0x4503af=F('$graveyard');this['_baseRoots']['set']('$graveyard',_0x4503af),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x4503af,0x1));const _0x467f12=F('$graveyard');this['_diffRoots']['set']('$graveyard',_0x467f12),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x467f12,0x1));const _0x5c7344=Array['from'](this['_diffRoots'])['map'](([_0x20c255,_0x3ad56b])=>[_0x20c255,T(_0x3ad56b)]);this['_saveMetaData'](this['_lastTo'],_0x5c7344,this['_markers'],_0x152ce1);}['_makeModelFromViewString'](_0x547c06){const _0x53a8b2=JSON['parse'](_0x547c06),_0x1acfc7=this['editor']['editing']['view']['document'],_0x45214a=new _0x15885f(_0x1acfc7,_0x53a8b2['map'](_0x2af015=>P(_0x2af015,this['editor'])));return this['editor']['data']['toModel'](_0x45214a);}['_saveMetaData'](_0x4cd89c,_0x4bd13c,_0x57e868,_0x5b0d82){const _0x291fb5=new Map(_0x4bd13c),_0x51be70=new Map(_0x5c9543(_0x5b0d82)),_0x2803c0=new Map();for(const [_0x2f4ae3,_0x5ace73]of _0x57e868)_0x2803c0['set'](_0x2f4ae3,{'start':_0x5ace73['start']['clone'](),'end':_0x5ace73['end']['clone'](),'rootName':_0x5ace73['root']['rootName']});this['_savedMetaData']['set'](_0x4cd89c,{'roots':_0x291fb5,'markers':_0x2803c0,'rootsAttributes':_0x51be70});}['_removeMetaData'](_0x3d5483){this['_savedMetaData']['delete'](_0x3d5483);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_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'](_0x187d32,_0x4ce8fb=null){let _0x265568=null;_0x187d32['is']('documentFragment')||(_0x265568=new ut(_0x187d32['name'],{'vid_start':null===_0x4ce8fb?this['_revisionId']++:_0x4ce8fb++}));const _0x33a4c9=[];for(const _0xc5faea of _0x187d32['getChildren']())if(_0xc5faea['is']('element')){_0x33a4c9['push'](this['_makeIdsRoot'](_0xc5faea,_0x4ce8fb));const _0x384419=_0x33a4c9[_0x33a4c9['length']-0x1];null!==_0x4ce8fb&&(_0x4ce8fb=_0x384419['is']('element','$text')?_0x384419['getAttribute']('vid')+0x1:_0x384419['getAttribute']('vid_end')+0x1);}else{for(let _0x5344a8=0x0;_0x5344a8<_0xc5faea['offsetSize'];_0x5344a8++)_0x33a4c9['push'](new ut('$text',{'vid':null===_0x4ce8fb?this['_revisionId']++:_0x4ce8fb++}));}if(_0x187d32['is']('documentFragment')){const _0x16c523=F(_0x187d32['rootName']);return _0x16c523['_insertChild'](0x0,_0x33a4c9),_0x16c523;}return _0x265568['_setAttribute']('vid_end',null===_0x4ce8fb?this['_revisionId']++:_0x4ce8fb++),_0x265568['_insertChild'](0x0,_0x33a4c9),_0x265568;}['_calculateMetaData'](_0x3f3df4,_0x3dddbd,_0x2cc230){this['_reset']();const {roots:_0x146ee4,markers:_0xa06461,rootsAttributes:_0x7c962}=this['_savedMetaData']['get'](_0x3f3df4);this['_baseRoots']=new Map(_0x146ee4),this['_baseRootsAttributes']=new Map(_0x5c9543(_0x7c962));for(const [_0x1930b9,_0x2d14ca]of this['_baseRoots'])if('$graveyard'!==_0x1930b9&&(this['_diffRoots']['set'](_0x1930b9,T(_0x2d14ca)),this['_diffRootsAttributes']=new Map(_0x5c9543(_0x7c962)),_0x2cc230)){const _0x816610=this['_revisionId'];this['_idsRoots']['set'](_0x1930b9,this['_makeIdsRoot'](_0x2d14ca)),this['_baseIdsRoots']['set'](_0x1930b9,this['_makeIdsRoot'](_0x2d14ca,_0x816610));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',T(this['_baseRoots']['get']('$graveyard'))),_0x2cc230&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x4e2c11,_0x544b8d]of _0xa06461){const _0x2c2b8c=this['_baseRoots']['get'](_0x544b8d['rootName']),_0x337380=this['_diffRoots']['get'](_0x544b8d['rootName']),_0x4dc13e=new ft(this['_fixPosition'](_0x544b8d['start'],_0x2c2b8c),this['_fixPosition'](_0x544b8d['end'],_0x2c2b8c)),_0x17d838=this['_fixRange'](_0x4dc13e,_0x337380);_0x2c2b8c['markers']['set'](_0x4e2c11,_0x4dc13e),this['_markers']['set'](_0x4e2c11,_0x17d838);}this['_applyOperations'](_0x3f3df4,_0x3dddbd,_0x2cc230);}['_applyOperations'](_0x140c63,_0x595839,_0x1ff02e){for(const _0x569a18 of this['source']['getOperations'](_0x140c63,_0x595839))this['_handleOperation'](_0x569a18,_0x1ff02e);for(const _0x20b02d of this['_diffRoots']['values']())_0x20b02d['markers']['clear']();for(const [_0x49f07a,_0x22a1eb]of this['_markers']){this['_diffRoots']['get'](_0x22a1eb['root']['rootName'])['markers']['set'](_0x49f07a,_0x22a1eb['clone']());}const _0x240ca3=new Map(),_0x24ed2a=new Map();for(const [_0x48dc77,_0x231eed]of this['_diffRoots'])_0x240ca3['set'](_0x48dc77,T(_0x231eed)),_0x24ed2a['set'](_0x48dc77,this['_diffRootsAttributes']['get'](_0x48dc77));this['_saveMetaData'](_0x595839,_0x240ca3,this['_markers'],_0x24ed2a);}['_getPreviousFrom'](_0x15ce8e){const _0x1a7844=Array['from'](this['_savedMetaData']['keys']());_0x1a7844['sort']((_0x1f6b38,_0x50a110)=>_0x1f6b38-_0x50a110),_0x1a7844['reverse']();for(const _0x601631 of _0x1a7844)if(_0x601631<_0x15ce8e)return _0x601631;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x2f3c1c,_0x559b91){const _0x4e1f4=Array['from'](_0x559b91['markers'])['map'](([_0x2fe2ce,_0x28de49])=>[_0x2fe2ce,this['_fixRange'](_0x28de49,_0x2f3c1c)]);_0x2f3c1c['markers']=new Map(_0x4e1f4);}['_transformMarkers'](_0x17c4f8){for(const _0xfd9f62 of this['_markers']['values']()){const _0x6d4f0b=_0xfd9f62['getTransformedByOperation'](_0x17c4f8),_0x3790c8=ft['_createFromRanges'](_0x6d4f0b);_0xfd9f62['start']=_0x3790c8['start'],_0xfd9f62['end']=_0x3790c8['end'];}}['_handleOperation'](_0x5d0a80,_0x15464b){if('addRoot'!=_0x5d0a80['type']&&'detachRoot'!=_0x5d0a80['type']){if('insert'==_0x5d0a80['type']){const _0x1b4ed5=_0x5d0a80['position']['root']['rootName'];this['_diffRoots']['has'](_0x1b4ed5)||(this['_diffRoots']['set'](_0x1b4ed5,F(_0x1b4ed5,!0x0)),this['_diffRootsAttributes']['set'](_0x1b4ed5,{}),_0x15464b&&this['_idsRoots']['set'](_0x1b4ed5,F(_0x1b4ed5,!0x0)));}else{if('addRootAttribute'==_0x5d0a80['type']||'removeRootAttribute'==_0x5d0a80['type']||'changeRootAttribute'==_0x5d0a80['type'])return void this['_handleRootAttributeOperation'](_0x5d0a80);'marker'==_0x5d0a80['type']&&this['_handleMarkerOperation'](_0x5d0a80);}if('marker'!==_0x5d0a80['type']){const _0x80b15c=this['_cloneOperation'](_0x5d0a80,this['_diffRoots']);_0x80b15c['_execute'](),this['_transformMarkers'](_0x80b15c);}if(_0x15464b)switch(_0x5d0a80['type']){case'insert':this['_handleInsertOperation'](_0x5d0a80);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x5d0a80);break;case'merge':this['_handleMergeOperation'](_0x5d0a80);break;case'split':this['_handleSplitOperation'](_0x5d0a80);}}else this['_handleRootOperation'](_0x5d0a80,_0x15464b);}['_cloneOperation'](_0x6a9460,_0x1ba2e9){const _0x2a7fb=_0x6a9460['clone']();return _0x2a7fb['_authorId']=_0x6a9460['_authorId'],this['_fixOperation'](_0x2a7fb,_0x1ba2e9),_0x2a7fb;}['_getBaseVids'](_0x3fabe2){return _0x3fabe2['map'](_0x21b01b=>{const _0x2bb5f0=this['_getVidAttributeName'](_0x21b01b);return Number(_0x21b01b['item']['getAttribute'](_0x2bb5f0));});}['_generateTape'](_0x814f7e,_0x5d6c89){if(_0x814f7e['is']('element','$text'))_0x5d6c89['push']({'item':_0x814f7e,'type':'text'});else{_0x814f7e['is']('element')&&_0x5d6c89['push']({'item':_0x814f7e,'type':'elementStart'});for(const _0xf460ef of _0x814f7e['getChildren']())this['_generateTape'](_0xf460ef,_0x5d6c89);_0x814f7e['is']('element')&&_0x5d6c89['push']({'item':_0x814f7e,'type':'elementEnd'});}return _0x5d6c89;}['_getState'](){const _0xd3a2d3=new Map(this['_touched']),_0xaf637b=new Map(_0xd3a2d3),_0x4eeb87=new Map(),_0x2f03a3={'insertions':{},'deletions':{}},_0x19b6e0={'insertions':{},'deletions':{}},_0x530153=new Map(),_0x5419cb=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x5419cb['delete']('$graveyard');for(const _0x4816d0 of _0x5419cb){const _0x3b22d9=this['_diffRoots']['get'](_0x4816d0)||F(_0x4816d0,!0x1),_0x405bee=this['_baseRoots']['get'](_0x4816d0)||F(_0x4816d0,!0x1);_0x3b22d9['isAttached']()||_0x405bee['isAttached']()?(_0x2f03a3['insertions'][_0x4816d0]=T(_0x3b22d9),_0x2f03a3['deletions'][_0x4816d0]=T(_0x405bee),this['_copyMarkers'](_0x2f03a3['deletions'][_0x4816d0],_0x405bee),this['_copyMarkers'](_0x2f03a3['insertions'][_0x4816d0],_0x3b22d9),_0x19b6e0['insertions'][_0x4816d0]=this['_generateTape'](this['_idsRoots']['get'](_0x4816d0),[]),_0x19b6e0['deletions'][_0x4816d0]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x4816d0)||F(_0x4816d0,!0x1),[])):_0x5419cb['delete'](_0x4816d0);}for(const _0x5c2620 of _0x5419cb){const _0x3c6b16=_0x19b6e0['insertions'][_0x5c2620];for(const _0x50db6d of _0x3c6b16){const _0x4113fc=this['_getVidAttributeName'](_0x50db6d),_0x2ff95b=_0x50db6d['item']['getAttribute'](_0x4113fc);_0xaf637b['delete'](_0x2ff95b),_0x2ff95b>=this['_startingRevisionId']&&_0x4eeb87['set'](_0x2ff95b,_0xd3a2d3['get'](_0x2ff95b));}}for(const _0x45c58a of _0x5419cb){const _0x1b2758=_0x19b6e0['insertions'][_0x45c58a],_0x86fdfc=this['_getBaseVids'](_0x19b6e0['deletions'][_0x45c58a]);let _0x32998b=0x0;for(const _0x434206 of _0x1b2758){const _0x7ab853=this['_getVidAttributeName'](_0x434206),_0xa41fb8=_0x434206['item']['getAttribute'](_0x7ab853);if(!_0x4eeb87['has'](_0xa41fb8)&&!_0x530153['has'](_0xa41fb8)){if(_0xaf637b['has'](_0xa41fb8))_0x32998b++;else{if(_0xa41fb8!=_0x86fdfc[_0x32998b]){const _0x27f891=_0xd3a2d3['get'](_0xa41fb8)||_0xd3a2d3['get'](_0x86fdfc[_0x32998b]);for(;_0xa41fb8!=_0x86fdfc[_0x32998b];)_0xaf637b['has'](_0x86fdfc[_0x32998b])||(_0x530153['set'](_0x86fdfc[_0x32998b],_0x27f891),_0xd3a2d3['set'](_0x86fdfc[_0x32998b],_0x27f891)),_0x32998b++;}_0x32998b++;}}}}for(const _0x197501 of _0x5419cb){const _0x5c6896=_0x19b6e0['insertions'][_0x197501];for(const _0xc3c6c of _0x5c6896){const _0x110344=this['_getVidAttributeName'](_0xc3c6c),_0x322787=_0xc3c6c['item']['getAttribute'](_0x110344);if(_0x530153['has'](_0x322787)){const _0x1467c5=_0x530153['get'](_0x322787);_0xaf637b['has'](_0x322787)||_0xaf637b['set'](_0x322787,{..._0x1467c5}),_0x4eeb87['set'](_0x322787,{..._0x1467c5});}}}for(const _0xa7fae8 of _0xaf637b['keys']())_0xa7fae8>=this['_startingRevisionId']&&_0xaf637b['delete'](_0xa7fae8);const _0x208425=new Map();for(const _0xe2d01a of _0x5419cb){let _0x389b0c=_0x19b6e0['insertions'][_0xe2d01a];for(const _0x356a75 of _0x389b0c)if(_0x356a75['item']['is']('element','tableCell')){const _0x52f123=this['_getVidAttributeName'](_0x356a75),_0x40511e=_0x356a75['item']['getAttribute'](_0x52f123);if(_0x4eeb87['has'](_0x40511e)){const _0x3ace31=_0x356a75['item']['parent']['parent']['getAttribute']('vid_start'),_0x51fa27=_0x208425['get'](_0x3ace31)||new Set();_0x51fa27['add'](_0x4eeb87['get'](_0x40511e)['userId']),_0x208425['set'](_0x3ace31,_0x51fa27);}}_0x389b0c=_0x19b6e0['deletions'][_0xe2d01a];for(const _0x130488 of _0x389b0c)if(_0x130488['item']['is']('element','tableCell')){const _0x58a056=this['_getVidAttributeName'](_0x130488),_0x20fff8=_0x130488['item']['getAttribute'](_0x58a056);if(_0xaf637b['has'](_0x20fff8)){const _0xe6d2f2=_0x130488['item']['parent']['parent']['getAttribute']('vid_start'),_0x1df03b=_0x208425['get'](_0xe6d2f2)||new Set();_0x1df03b['add'](_0xaf637b['get'](_0x20fff8)['userId']),_0x208425['set'](_0xe6d2f2,_0x1df03b);}}for(const _0x49d7ff of _0x208425['keys']())(_0x4eeb87['has'](_0x49d7ff)||_0xaf637b['has'](_0x49d7ff))&&_0x208425['delete'](_0x49d7ff);}for(const _0x447df8 of _0x5419cb){const _0x2db5dc=_0x19b6e0['insertions'][_0x447df8];let _0x515c26=null,_0x625dfa=null;for(const _0x1789b7 of _0x2db5dc){const _0x2fcf7c=this['_getVidAttributeName'](_0x1789b7),_0x526803=_0x1789b7['item']['getAttribute'](_0x2fcf7c),_0x11e03b=_0x208425['get'](_0x526803);_0x11e03b&&'elementStart'==_0x1789b7['type']&&(_0x515c26=Array['from'](_0x11e03b)[0x0],_0x625dfa=_0x1789b7['item']['getAttribute']('vid_end')),_0x515c26&&(_0xaf637b['set'](_0x526803,{'userId':_0x515c26}),_0x4eeb87['set'](_0x526803,{'userId':_0x515c26})),_0x526803==_0x625dfa&&(_0x515c26=null,_0x625dfa=null);}}const _0x325ac2={},_0x63851b=new Set();for(const _0x503d2d of _0x5419cb){const _0x1d77d3=_0x2f03a3['deletions'][_0x503d2d],_0x4564b0=_0x2f03a3['insertions'][_0x503d2d];for(const {userId:_0x3c6d08}of this['_touchedMarkers']['values']())null!==_0x3c6d08&&_0x63851b['add'](_0x3c6d08);for(const {userId:_0x56c91e}of this['_touchedRoots']['values']())null!==_0x56c91e&&_0x63851b['add'](_0x56c91e);this['_markChanges'](_0x4564b0,_0x19b6e0['insertions'][_0x503d2d],_0x4eeb87,'insertion',_0x63851b),this['_markChanges'](_0x1d77d3,_0x19b6e0['deletions'][_0x503d2d],_0xaf637b,'deletion',_0x63851b),_0x325ac2[_0x503d2d]={'insertions':this['_prepareViewToSave'](_0x4564b0),'deletions':this['_prepareViewToSave'](_0x1d77d3),'attachChange':this['_touchedRoots']['get'](_0x503d2d)||null,'attributesBefore':_0x5c9543(this['_baseRootsAttributes']['get'](_0x503d2d))||{},'attributesAfter':_0x5c9543(this['_diffRootsAttributes']['get'](_0x503d2d))};}return{'diffData':_0x325ac2,'authorsIds':Array['from'](_0x63851b)};}['_processRootBeforeSave'](_0x311aa5){for(const [,_0x139398]of _0x311aa5['markers']){const _0x5e1a4a=_0x139398['start']['getAncestors']()['filter'](_0x273a5b=>'tableCell'==_0x273a5b['name']);for(const _0x7662a4 of _0x5e1a4a)0x1==_0x7662a4['childCount']&&_0x7662a4['getChild'](0x0)['is']('element','paragraph')&&_0x7662a4['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x3149b5){this['_processRootBeforeSave'](_0x3149b5);const _0x48f3b1=this['editor']['data']['toView'](_0x3149b5,{}),_0x26c4fc=Array['from'](_0x48f3b1['getChildren']())['map'](_0x1bfcd2=>this['_getViewJson'](_0x1bfcd2));return JSON['stringify'](_0x26c4fc);}['_getViewJson'](_0x1a852c){if(_0x1a852c['is']('$text'))return _0x1a852c['data'];{const _0x26c722=_0x1a852c;return{'type':Object['keys'](E)['find'](_0x5c9ecd=>_0x1a852c instanceof E[_0x5c9ecd]),'name':_0x26c722['name'],'attributes':Array['from'](_0x26c722['getAttributes']()),'children':Array['from'](_0x26c722['getChildren']())['map'](_0x109af8=>this['_getViewJson'](_0x109af8))};}}['_markChanges'](_0x4b3cd7,_0x453229,_0x432721,_0x17a6b9,_0x577172){let _0x8bd0ea=null,_0x326013=null,_0x1fe158=0x0;const _0x550bc6=this['editor']['model'];for(let _0xa06480=0x0;_0xa06480<_0x453229['length'];_0xa06480++){const _0x445c2a=this['_getVidAttributeName'](_0x453229[_0xa06480]),_0x3c2de8=_0x453229[_0xa06480]['item']['getAttribute'](_0x445c2a),_0x2429b9=_0x432721['get'](_0x3c2de8),_0x4dba26=_0xa06480==_0x453229['length']-0x1;(!_0x8bd0ea&&_0x2429b9&&(_0x8bd0ea=_0x2429b9,_0x326013=_0x453229[_0xa06480]),_0x8bd0ea&&(!_0x2429b9||_0x2429b9['userId']!=_0x8bd0ea['userId']))&&(_0x47d111(_0x2429b9,B(_0x326013,_0x4b3cd7,_0x550bc6),B(_0x453229[_0xa06480],_0x4b3cd7,_0x550bc6)),_0x8bd0ea=_0x2429b9||null,_0x326013=_0x2429b9?_0x453229[_0xa06480]:null),_0x8bd0ea&&_0x4dba26&&_0x47d111(_0x2429b9,B(_0x326013,_0x4b3cd7,_0x550bc6),J(_0x453229[_0xa06480],_0x4b3cd7,_0x550bc6));}function _0x47d111(_0x1a81b2,_0x53b2a2,_0x183a01){const _0xe9eeea=_0x8bd0ea['userId'],_0x331185='revision:'+_0x17a6b9+':'+_0xe9eeea+':'+_0x1fe158++,_0x1f2f8d=_0x550bc6['createRange'](_0x53b2a2,_0x183a01);_0x4b3cd7['markers']['set'](_0x331185,_0x1f2f8d),null!==_0xe9eeea&&_0x577172['add'](_0xe9eeea);}}['_getVidAttributeName'](_0x27972f){switch(_0x27972f['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x24d98c,_0x3df0fd){_0x24d98c['baseVersion']=null;for(const _0x346a2d in _0x24d98c){const _0x1bd4da=_0x24d98c[_0x346a2d];if(_0x1bd4da instanceof vt){const _0x23528d=_0x3df0fd['get'](_0x1bd4da['root']['rootName']);_0x24d98c[_0x346a2d]=this['_fixPosition'](_0x1bd4da,_0x23528d);}if(_0x1bd4da instanceof ft){const _0x492595=_0x3df0fd['get'](_0x1bd4da['root']['rootName']);_0x24d98c[_0x346a2d]=this['_fixRange'](_0x1bd4da,_0x492595);}'root'===_0x346a2d&&(_0x24d98c['root']=_0x3df0fd['get'](_0x24d98c['root']['rootName']));}}['_fixRange'](_0x182d8e,_0x1bc9bf){return this['editor']['model']['createRange'](this['_fixPosition'](_0x182d8e['start'],_0x1bc9bf),this['_fixPosition'](_0x182d8e['end'],_0x1bc9bf));}['_fixPosition'](_0x9aaa0c,_0x300299){return this['editor']['model']['createPositionFromPath'](_0x300299,_0x9aaa0c['path'],_0x9aaa0c['stickiness']);}['_handleInsertOperation'](_0x5d092d){const _0x19115c=this['_idsRoots']['get'](_0x5d092d['position']['root']['rootName']),_0x94af95=this['_fixPosition'](_0x5d092d['position'],_0x19115c),_0x338c79=null===_0x5d092d['_authorId']?null:_0x5d092d['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x32208c=_0x94af95['parent'],_0x383fcf=this['_revisionId'],_0x50c782=[];for(const _0x76443b of _0x5d092d['nodes'])if(_0x76443b['is']('element'))_0x50c782['push'](this['_makeIdsRoot'](_0x76443b));else{for(let _0x4ff42f=0x0;_0x4ff42f<_0x76443b['offsetSize'];_0x4ff42f++)_0x50c782['push'](new ut('$text',{'vid':this['_revisionId']++}));}const _0x3c42dc=this['_revisionId'];for(let _0x281655=_0x383fcf;_0x281655<_0x3c42dc;_0x281655++)this['_touched']['set'](_0x281655,{'userId':_0x338c79});_0x32208c['_insertChild'](_0x94af95['offset'],_0x50c782);}['_handleMoveOperation'](_0x36c1a3){(_0x36c1a3=this['_cloneOperation'](_0x36c1a3,this['_idsRoots']))['_execute']();const _0x39e693=null===_0x36c1a3['_authorId']?null:_0x36c1a3['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x31cb4c=_0x36c1a3['getMovedRangeStart'](),_0x1acbf3=_0x31cb4c['parent'],_0x4b2af9=_0x31cb4c['offset'];!function _0x53d892(_0xfaa8b9,_0x3990b9,_0x49ada4,_0x452dfe){for(let _0x35b03c=_0x49ada4;_0x35b03c<_0x452dfe;_0x35b03c++){const _0x4766ab=_0x3990b9['getChild'](_0x35b03c);_0x4766ab['is']('element','$text')?_0xfaa8b9['set'](_0x4766ab['getAttribute']('vid'),{'userId':_0x39e693}):(_0xfaa8b9['set'](_0x4766ab['getAttribute']('vid_start'),{'userId':_0x39e693}),_0x53d892(_0xfaa8b9,_0x4766ab,0x0,_0x4766ab['childCount']),_0xfaa8b9['set'](_0x4766ab['getAttribute']('vid_end'),{'userId':_0x39e693}));}}(this['_touched'],_0x1acbf3,_0x4b2af9,_0x4b2af9+_0x36c1a3['howMany']);}['_handleMergeOperation'](_0x5dbd6d){const _0x1ecfaa=null===(_0x5dbd6d=this['_cloneOperation'](_0x5dbd6d,this['_idsRoots']))['_authorId']?null:_0x5dbd6d['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x105fd0=_0x5dbd6d['targetPosition']['parent'],_0x3a1074=_0x5dbd6d['sourcePosition']['parent'],_0x109333=_0x105fd0['getAttribute']('vid_end'),_0x4ec794=_0x3a1074['getAttribute']('vid_start');_0x105fd0['_setAttribute']('vid_end',_0x3a1074['getAttribute']('vid_end')),_0x3a1074['_setAttribute']('vid_end',_0x109333),this['_touched']['set'](_0x4ec794,{'userId':_0x1ecfaa}),this['_touched']['set'](_0x109333,{'userId':_0x1ecfaa}),_0x5dbd6d['_execute']();}['_handleSplitOperation'](_0x3db2c0){const _0x7d8363=null===(_0x3db2c0=this['_cloneOperation'](_0x3db2c0,this['_idsRoots']))['_authorId']?null:_0x3db2c0['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4d7ceb=_0x3db2c0['graveyardPosition'],_0x4dbac6=_0x3db2c0['splitPosition']['parent'];_0x3db2c0['_execute']();const _0x4646d5=_0x4dbac6['getAttribute']('vid_end'),_0x519024=_0x3db2c0['insertionPosition']['nodeAfter'];if(_0x4d7ceb){const _0x21328c=_0x519024['getAttribute']('vid_end'),_0x2f3ffd=_0x4dbac6['getAttribute']('vid_end');_0x4dbac6['_setAttribute']('vid_end',_0x21328c),_0x519024['_setAttribute']('vid_end',_0x2f3ffd),this['_touched']['set'](_0x4dbac6['getAttribute']('vid_end'),{'userId':_0x7d8363}),this['_touched']['set'](_0x519024['getAttribute']('vid_start'),{'userId':_0x7d8363});}else{const _0x2ded97=this['_revisionId']++,_0x583d15=this['_revisionId']++;_0x4dbac6['_setAttribute']('vid_end',_0x2ded97),_0x519024['_setAttribute']('vid_start',_0x583d15),_0x519024['_setAttribute']('vid_end',_0x4646d5),this['_touched']['set'](_0x2ded97,{'userId':_0x7d8363}),this['_touched']['set'](_0x583d15,{'userId':_0x7d8363});}}['_handleMarkerOperation'](_0xc68d67){if(!_0xc68d67['affectsData'])return;const _0x4c0ff9=(_0xc68d67=this['_cloneOperation'](_0xc68d67,this['_diffRoots']))['oldRange']?_0xc68d67['oldRange']['root']:null,_0xde75e4=_0xc68d67['newRange']?_0xc68d67['newRange']['root']:null;_0x4c0ff9&&this['_markers']['delete'](_0xc68d67['name']),_0xde75e4&&this['_markers']['set'](_0xc68d67['name'],_0xc68d67['newRange']['clone']());const _0x3e9217=null===_0xc68d67['_authorId']?null:_0xc68d67['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3b43a5=_0xc68d67['name'];if(!this['_touchedMarkers']['has'](_0x3b43a5))return void this['_touchedMarkers']['set'](_0x3b43a5,{'range':_0xc68d67['oldRange'],'userId':_0x3e9217});const _0x4927e9=this['_touchedMarkers']['get'](_0x3b43a5),_0x561129=_0x4927e9['range'],_0x355f13=_0xc68d67['newRange'];null==_0x561129&&null==_0x355f13||_0x561129&&_0x355f13&&_0x561129['isEqual'](_0x355f13)?this['_touchedMarkers']['delete'](_0xc68d67['name']):_0x4927e9['userId']=_0x3e9217;}['_handleRootOperation'](_0x3d1f4d,_0x438684){this['_diffRoots']['has'](_0x3d1f4d['rootName'])?this['_diffRoots']['get'](_0x3d1f4d['rootName'])['_isAttached']=_0x3d1f4d['isAdd']:(this['_diffRoots']['set'](_0x3d1f4d['rootName'],F(_0x3d1f4d['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x3d1f4d['rootName'],{}),_0x438684&&this['_idsRoots']['set'](_0x3d1f4d['rootName'],F(_0x3d1f4d['rootName'],!0x0)));const _0x1c0a2a=null===_0x3d1f4d['_authorId']?null:_0x3d1f4d['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2e9580=this['_touchedRoots']['get'](_0x3d1f4d['rootName']);_0x2e9580&&_0x2e9580['userId']===_0x1c0a2a?this['_touchedRoots']['delete'](_0x3d1f4d['rootName']):this['_touchedRoots']['set'](_0x3d1f4d['rootName'],{'userId':_0x1c0a2a,'isAttached':_0x3d1f4d['isAdd']});}['_handleRootAttributeOperation'](_0x494350){const _0x1fe011=this['_diffRootsAttributes']['get'](_0x494350['root']['rootName']);null===_0x494350['newValue']?delete _0x1fe011[_0x494350['key']]:_0x1fe011[_0x494350['key']]=_0x494350['newValue'];}}function T(_0x50b298){const _0x1bf53b=F(_0x50b298['rootName'],_0x50b298['isAttached']());for(const _0x32ee5c of _0x50b298['getChildren']()){const _0x4bd64e=_0x32ee5c['_clone'](!0x0);_0x1bf53b['_appendChild'](_0x4bd64e);}return _0x1bf53b;}function F(_0x288173,_0x28740f=!0x0){const _0x9b56e9=new gt();return _0x9b56e9['rootName']=_0x288173,_0x9b56e9['_isAttached']=_0x28740f,_0x9b56e9['isAttached']=()=>_0x9b56e9['_isAttached'],_0x9b56e9;}function B(_0x469174,_0x3dfc36,_0x253a95){const _0x366128='elementEnd'==_0x469174['type']?_0x253a95['createPositionAt'](_0x469174['item'],'end'):_0x253a95['createPositionBefore'](_0x469174['item']);return _0x253a95['createPositionFromPath'](_0x3dfc36,_0x366128['path'],_0x366128['stickiness']);}function J(_0x1fd53b,_0x3f3f9d,_0x8caa57){const _0x4b21bd='elementStart'==_0x1fd53b['type']?_0x8caa57['createPositionAt'](_0x1fd53b['item'],0x0):_0x8caa57['createPositionAfter'](_0x1fd53b['item']);return _0x8caa57['createPositionFromPath'](_0x3f3f9d,_0x4b21bd['path'],_0x4b21bd['stickiness']);}class os extends _0x572c6d{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x2e8c69,_0x2747dd){super(_0x2e8c69),this['focusTracker']=new _0x8dd88d(),this['keystrokes']=new _0x501707(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x2747dd),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),ts(this);}['render'](){super['render'](),_0x1576d1({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x3e04ef=_0x162973=>_0x162973['stopPropagation']();this['keystrokes']['set']('arrowright',_0x3e04ef),this['keystrokes']['set']('arrowleft',_0x3e04ef),this['keystrokes']['set']('arrowup',_0x3e04ef),this['keystrokes']['set']('arrowdown',_0x3e04ef);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0xe74f67){this['revisionNameInputView']['fieldView']['element']['value']=_0xe74f67['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x1b3b6f){const _0x4ced9b=new at(this['locale'],ti),_0x1879a3=_0x4ced9b['fieldView'];_0x1879a3['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x4dc0e8=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0x1b3b6f&&(_0x4dc0e8+='\x20('+m(this['locale'],'optional')+')'),(_0x4ced9b['label']=_0x4dc0e8,_0x1879a3['on']('input',()=>{this['revisionNameInputValue']=_0x1879a3['element']['value']['trim']();}),_0x4ced9b);}}class f extends _0x6878ef{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}['_saveRevisionFormView'];['init'](){const _0xd7d872=this['editor'],_0x1f3c35=_0xd7d872['plugins']['get']('RevisionTracker');_0xd7d872['ui']['componentFactory']['add']('revisionHistory',_0x474aec=>{const _0x456281=_0xef6b9b(_0x474aec),_0x4e05e4=_0x456281['panelView']['children'],_0x2dd03a=new _0x999761(_0x474aec),_0xa8c077=new te(_0x474aec),_0x2b1c9f=new _0x5c9eb1(_0x474aec),_0x5250fc=new te(_0x474aec),_0x54be12=new _0x5c9eb1(_0x474aec);return _0x456281['bind']('isEnabled')['to'](_0x1f3c35,'isReady',_0x1f3c35,'isEnabled',_0xd7d872,'isReadOnly',(_0x3f84e3,_0x32fb8b,_0x3eed1f)=>_0x3f84e3&&_0x32fb8b&&!_0x3eed1f),_0x456281['buttonView']['set']({'icon':_0x3427a3,'label':m(_0x474aec,'Revision\x20history'),'tooltip':!0x0}),_0x2b1c9f['set']({'label':m(_0x474aec,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x2b1c9f['bind']('isEnabled')['to'](_0x1f3c35,'isReady',_0x1f3c35,'isEnabled',_0xd7d872,'isReadOnly',(_0x128912,_0x1dc204,_0x34e622)=>_0x128912&&_0x1dc204&&!_0x34e622),_0x2b1c9f['on']('execute',()=>this['_showDialog']()),_0x54be12['set']({'label':m(_0x474aec,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x54be12['bind']('isEnabled')['to'](_0x1f3c35,'isReady',_0xd7d872,'isReadOnly',(_0x4765d9,_0x31c154)=>_0x4765d9&&!_0x31c154),_0x54be12['on']('execute',()=>{_0xd7d872['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x456281['isOpen']=!0x1,_0xd7d872['editing']['view']['focus']();}),_0xa8c077['children']['add'](_0x2b1c9f),_0x5250fc['children']['add'](_0x54be12),_0x2dd03a['role']='menu',_0x2dd03a['items']['addMany']([_0xa8c077,_0x5250fc]),_0x4e05e4['add'](_0x2dd03a),_0x456281;}),_0xd7d872['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x2a6a2d=this['editor'],_0x4ba400=_0x2a6a2d['locale'],_0xd2e1f0=new _0x4de212(_0x4ba400),_0x11e8b0=new _0x3007fb(_0x4ba400);_0xd2e1f0['buttonView']['set']({'icon':_0x3427a3,'label':m(_0x4ba400,'Revision\x20history')});const _0x57468f=new _0x7508de(_0x4ba400,_0xd2e1f0),_0x2cc4c0=new _0x29b0b9(_0x4ba400);_0x2cc4c0['set']({'label':m(_0x4ba400,'Save\x20current\x20revision')}),_0x2cc4c0['delegate']('execute')['to'](_0xd2e1f0),_0x2cc4c0['on']('execute',()=>{this['_showDialog']();}),_0x57468f['children']['add'](_0x2cc4c0),_0x11e8b0['items']['add'](_0x57468f);const _0x25a2b1=new _0x7508de(_0x4ba400,_0xd2e1f0),_0x4916eb=new _0x29b0b9(_0x4ba400);return _0x4916eb['set']({'label':m(_0x4ba400,'Open\x20revision\x20history')}),_0x4916eb['delegate']('execute')['to'](_0xd2e1f0),_0x4916eb['on']('execute',()=>{_0x2a6a2d['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x25a2b1['children']['add'](_0x4916eb),_0x11e8b0['items']['add'](_0x25a2b1),_0xd2e1f0['panelView']['children']['add'](_0x11e8b0),_0xd2e1f0;}['_showDialog'](){const _0x3b5cdd=this['editor'],_0x1ee40a=_0x3b5cdd['locale'],_0x299a29=_0x3b5cdd['plugins']['get']('Dialog'),_0x57d290=_0x3b5cdd['plugins']['get']('RevisionTracker');function _0x1be997(_0xf47b75){_0x3b5cdd['config']['get']('revisionHistory.requireRevisionName')&&''===_0xf47b75['revisionName']?_0xf47b75['revisionNameInputView']['errorText']=m(_0x1ee40a,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x3b5cdd['plugins']['get'](u)['saveRevision']({'name':_0xf47b75['revisionName']}),_0x299a29['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x1be997(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x299a29['show']({'id':'revisionSave','title':m(_0x1ee40a,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0x3b5cdd['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x299a29['hide']()},{'label':m(_0x3b5cdd['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x4f70af){_0x4f70af['bind']('isEnabled')['to'](_0x57d290,'isReady',_0x57d290,'isEnabled',_0x3b5cdd,'isReadOnly',(_0x2d4360,_0x475788,_0x172f97)=>_0x2d4360&&_0x475788&&!_0x172f97);},'onExecute':()=>_0x1be997(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x55f631=this['editor'],_0x32263b=_0x55f631['locale'];this['_saveRevisionFormView']=new os(_0x32263b,_0x55f631['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class X extends _0x572c6d{['changeId'];['_model'];constructor(_0x21c576,_0xca92ac){super(_0x21c576),this['_model']=_0xca92ac,this['changeId']=_0xca92ac['id'];const _0x1da713=this['bindTemplate'],_0x5552bd=m(_0x21c576,_0xca92ac['data']['isSuggestion']?'Suggested\x20by':'add'==_0xca92ac['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0xca92ac['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x1da713['to']('type',_0x520c50=>'ck-revision-change__'+_0x520c50)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x5552bd}]},{'text':'\x20'+_0xca92ac['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
25
+ _0x33b2e5(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x26f35f){super(),this['id']=_0x26f35f['id']||_0x3facc5(),this['author']=_0x26f35f['author'],this['type']=_0x26f35f['type'],this['data']=_0x26f35f['data']||{},this['rootName']=_0x26f35f['rootName'],this['set']('createdAt',_0x26f35f['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class c{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x9fd03,_0x94b048){this['newRevisionId']=_0x9fd03,this['oldRevisionId']=_0x94b048,this['changes']=new _0x12f74d();}['_setChanges'](_0x3d191a){for(const _0x5ac073 of _0x3d191a)this['changes']['add'](_0x5ac073);}}const Y={'c':_0x783e3f,'a':_0x58f15a,'e':_0x2255d2,'r':_0x101b60,'u':_0x151d6e};class d extends _0x6878ef{['repository'];['adapter'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x3e0391,_0x1b54bd,j];}constructor(_0xf630eb){super(_0xf630eb),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),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',(_0x584eb2,_0x242b2f,_0x350fbc)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x4f253e=>{for(const _0x16f4a3 of this['editor']['editing']['view']['document']['roots'])_0x350fbc?_0x4f253e['removeClass']('ck-editor__editable__overlay',_0x16f4a3):_0x4f253e['addClass']('ck-editor__editable__overlay',_0x16f4a3);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x5cf770=>null!==_0x5cf770),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x77deb4,_0x24da16,_0x4ac1ee)=>_0x77deb4&&_0x4ac1ee?_0x24da16['changes']['getIndex'](_0x4ac1ee):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x4b5f11,_0x273af5)=>_0x4b5f11?_0x273af5['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['adapter']=null,this['_balloon']=this['editor']['plugins']['get'](_0x1b54bd);}['init'](){const _0x490ffb=this['editor'],_0x24b545=new yt(_0x490ffb,{'direction':'backward'}),_0x2a401d=new yt(_0x490ffb,{'direction':'forward'});(_0x490ffb['commands']['add']('showPreviousChange',_0x24b545),_0x490ffb['commands']['add']('showNextChange',_0x2a401d),_0x490ffb['commands']['add']('restoreRevision',new _t(_0x490ffb)),this['on']('change:numberOfChanges',()=>{_0x24b545['refresh'](),_0x2a401d['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x490ffb['enableReadOnlyMode']('revision-viewer'),_0x490ffb['plugins']['has']('WidgetToolbarRepository'))&&_0x490ffb['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionData'](_0xec9472){await this['loadRevisionData'](_0xec9472);const _0x43cc5a={};for(const _0x24e17 in _0xec9472['diffData']){if(_0xec9472['diffData'][_0x24e17]['attachChange']&&!_0xec9472['diffData'][_0x24e17]['attachChange']['isAttached'])continue;const _0x3ef4e7=this['_removeRevisionMarkers'](JSON['parse'](_0xec9472['diffData'][_0x24e17]['insertions'])),_0x3f9f73=this['editor']['editing']['view']['document'],_0x2e14ce=new _0x15885f(_0x3f9f73,_0x3ef4e7['map'](_0x7a0a57=>this['_getViewObj'](_0x7a0a57)));this['editor']['data']['processor']['useFillerType']('marked'),_0x43cc5a[_0x24e17]=this['editor']['data']['processor']['toData'](_0x2e14ce),this['editor']['data']['processor']['useFillerType']('default');}return _0x43cc5a;}async['getRevisionRootsAttributes'](_0x576232){await this['loadRevisionData'](_0x576232);const _0x658722={};for(const _0x56ac00 in _0x576232['diffData'])_0x576232['diffData'][_0x56ac00]['attachChange']&&!_0x576232['diffData'][_0x56ac00]['attachChange']['isAttached']||(_0x658722[_0x56ac00]=_0x576232['diffData'][_0x56ac00]['attributesAfter']||{});return _0x658722;}['_removeRevisionMarkers'](_0x270171){return(_0x270171=_0x270171['filter'](_0x1bc66b=>!_0x1bc66b['name']||'revision-start'!==_0x1bc66b['name']&&'revision-end'!==_0x1bc66b['name']))['forEach'](_0x1cd9cc=>{'string'!=typeof _0x1cd9cc&&(_0x1cd9cc['children']=this['_removeRevisionMarkers'](_0x1cd9cc['children']),_0x1cd9cc['attributes']=_0x1cd9cc['attributes']['filter'](_0x11c3ce=>!_0x11c3ce[0x0]['startsWith']('data-revision-')));}),_0x270171;}async['compare'](_0x2a1473,_0x4962ef,_0x4617a3=!0x1){if(!this['isEnabled'])return;const _0xe9345f=this['diff'],_0x44adba=this['repository'],_0x7d9213='string'==typeof _0x2a1473?_0x44adba['getRevision'](_0x2a1473):_0x2a1473,_0x3c8f2a='string'==typeof _0x4962ef?_0x44adba['getRevision'](_0x4962ef):_0x4962ef,_0x359927=_0x7d9213['id'],_0x5256c7=_0x3c8f2a?_0x3c8f2a['id']:null;if(!_0x4617a3&&this['diff']&&this['diff']['newRevisionId']===_0x359927&&this['diff']['oldRevisionId']===_0x5256c7)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new c(_0x359927,_0x5256c7);const _0x5ed0ba=this['_getRevisionsRange'](_0x7d9213,_0x3c8f2a,!0x0)['map'](_0x37a4fa=>this['loadRevisionData'](_0x37a4fa));return _0x5ed0ba['push'](new Promise(_0x40afb0=>{setTimeout(_0x40afb0,0x14);})),Promise['all'](_0x5ed0ba)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x40523b=this['_getDiff'](_0x359927,_0x5256c7);for(const _0x2fcda3 of _0x40523b['changes'])this['_changeIdToChange']['set'](_0x2fcda3['id'],_0x2fcda3);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x30f082=>{for(const _0xbb9172 of this['editor']['model']['document']['getRootNames']())_0x30f082['detachRoot'](_0xbb9172);for(const _0x427c41 of Object['keys'](_0x40523b['model'])){const _0x542ee2=_0x30f082['addRoot'](_0x427c41);for(const _0x5b55db of Object['keys'](_0x40523b['attributes'][_0x427c41]))_0x30f082['setAttribute'](_0x5b55db,_0x40523b['attributes'][_0x427c41][_0x5b55db],_0x542ee2);_0x30f082['insert'](_0x40523b['model'][_0x427c41],_0x542ee2,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x40523b['changes'])),this['isReady']=!0x0;})['catch'](_0x30ab02=>{console['error'](_0x30ab02),this['_cleanUp'](),_0xe9345f&&(this['diff']=_0xe9345f),this['isReady']=!0x0;});}['addRevisionData'](_0x1de373,_0x34d369){const _0xef365e=this['repository']['createRevision'](_0x1de373);return _0xef365e['on']('_update',(_0x55d470,_0x292ce3,_0x52cae1)=>_0x34d369(_0x292ce3,_0x52cae1,_0xef365e)),this['repository']['addRevision'](_0xef365e),_0xef365e;}['loadRevisionData'](_0x4bb027){if(!_0x4bb027||_0x4bb027['diffData'])return Promise['resolve']();{const _0x30f65a=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x30f65a,'revisionId':_0x4bb027['id']})['then'](_0x21f6df=>{_0x4bb027['_update']({'diffData':_0x21f6df['diffData']},!0x0);});}}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x27a295=>{for(const _0x417dae of this['editor']['model']['document']['getRootNames']())_0x27a295['detachRoot'](_0x417dae);});}['_sortAndFilterDiffChanges'](_0x2420f8){const _0x17c6c4=[],_0x545fa8=new Map();for(const _0x440737 of this['editor']['model']['document']['getRootNames']()){const _0x4a6d0f=this['editor']['editing']['view']['getDomRoot'](_0x440737);if(!_0x4a6d0f)continue;const _0x43eba1=_0x4a6d0f['getClientRects']()['item'](0x0);_0x43eba1&&(_0x17c6c4['push'](_0x440737),_0x545fa8['set'](_0x440737,_0x43eba1));}return _0x17c6c4['sort']((_0x4f2057,_0x481482)=>{const _0x4ca2f5=_0x545fa8['get'](_0x4f2057),_0x50f272=_0x545fa8['get'](_0x481482);return _0x4ca2f5['y']-_0x50f272['y']||_0x4ca2f5['x']-_0x50f272['x'];}),(_0x2420f8=_0x2420f8['filter'](_0x29697b=>_0x17c6c4['includes'](_0x29697b['rootName'])))['sort']((_0x494b8d,_0x26864a)=>_0x17c6c4['indexOf'](_0x494b8d['rootName'])-_0x17c6c4['indexOf'](_0x26864a['rootName'])),_0x2420f8;}['_makeTape'](_0x299567){const _0x54ed4f=Array['from'](_0x299567['markers'])['filter'](([_0x1cdbee,_0x22e482])=>_0x1cdbee['startsWith']('revision:')&&!_0x22e482['isCollapsed']),_0x312c9d=Array['from'](this['editor']['model']['createRangeIn'](_0x299567)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x54ed4f['length'])for(const _0x1e8c37 of _0x312c9d){const [_0xa179c3,_0x411613]=_0x54ed4f[0x0],[,_0x24b52b,_0x2bb897]=_0xa179c3['split'](':');if(_0x411613['end']['isEqual'](_0x1e8c37['nextPosition'])&&_0x54ed4f['shift'](),(_0x1e8c37['previousPosition']['isEqual'](_0x411613['start'])||_0x1e8c37['previousPosition']['isAfter'](_0x411613['start']))&&('insertion'==_0x24b52b?_0x1e8c37['isAdded']={'userId':_0x2bb897}:'deletion'==_0x24b52b&&(_0x1e8c37['isRemoved']={'userId':_0x2bb897})),0x0==_0x54ed4f['length'])break;}return _0x312c9d;}['_refreshStartEndIndex'](_0x58c1a6){const _0x697b0=new Map();for(let _0x3c7160=0x0;_0x3c7160<_0x58c1a6['length'];_0x3c7160++)'text'===_0x58c1a6[_0x3c7160]['type']?(_0x58c1a6[_0x3c7160]['item']['startIndex']=_0x3c7160,_0x58c1a6[_0x3c7160]['item']['endIndex']=_0x3c7160):('elementStart'===_0x58c1a6[_0x3c7160]['type']?_0x58c1a6[_0x3c7160]['item']['startIndex']=_0x3c7160:'elementEnd'===_0x58c1a6[_0x3c7160]['type']&&(_0x58c1a6[_0x3c7160]['item']['endIndex']=_0x3c7160),_0x697b0['set'](_0x58c1a6[_0x3c7160]['id'],_0x3c7160));for(const _0x58346b of _0x697b0['values']())'elementStart'===_0x58c1a6[_0x58346b]['type']?_0x58c1a6[_0x58346b]['item']['endIndex']=_0x697b0['get'](_0x58c1a6[_0x58346b]['pairId']):'elementEnd'===_0x58c1a6[_0x58346b]['type']&&(_0x58c1a6[_0x58346b]['item']['startIndex']=_0x697b0['get'](_0x58c1a6[_0x58346b]['pairId']));}['_processTape'](_0x7e3d43){for(let _0x50617d=0x0;_0x50617d<_0x7e3d43['length'];_0x50617d++){if('elementStart'===_0x7e3d43[_0x50617d]['type'])_0x7e3d43[_0x50617d]['item']['startIndex']=_0x50617d;else{if('elementEnd'===_0x7e3d43[_0x50617d]['type']){_0x7e3d43[_0x50617d]['item']['endIndex']=_0x50617d;const _0x5eb75f=_0x7e3d43[_0x50617d]['item']['startIndex'];_0x7e3d43[_0x5eb75f]['pairId']=_0x7e3d43[_0x50617d]['id'],_0x7e3d43[_0x50617d]['pairId']=_0x7e3d43[_0x5eb75f]['id'];}else _0x7e3d43[_0x50617d]['item']['startIndex']=_0x50617d,_0x7e3d43[_0x50617d]['item']['endIndex']=_0x50617d,_0x7e3d43[_0x50617d]['pairId']=null;}_0x7e3d43[_0x50617d]['markersStart']||(_0x7e3d43[_0x50617d]['markersStart']=[],_0x7e3d43[_0x50617d]['markersEnd']=[]);}}['_markInsertions'](_0x281b8e,_0x55e684){const _0x4df7ff=_0x281b8e['filter'](_0x55bf18=>!_0x55bf18['isAdded']);for(let _0x23b3fa=0x0;_0x23b3fa<_0x55e684['length'];_0x23b3fa++)_0x55e684[_0x23b3fa]['isAdded']&&(_0x4df7ff[_0x23b3fa]['isAdded']=_0x55e684[_0x23b3fa]['isAdded']);}['_makeModelFromViewString'](_0x19ca9b){const _0x46d2a9=JSON['parse'](_0x19ca9b),_0x2694ea=this['editor']['editing']['view']['document'],_0x32a163=new _0x15885f(_0x2694ea,_0x46d2a9['map'](_0x32a276=>this['_getViewObj'](_0x32a276)));return this['editor']['data']['toModel'](_0x32a163);}['_getViewObj'](_0x885a85){const _0x73d85=this['editor']['editing']['view']['document'];if('string'==typeof _0x885a85)return new _0x5c17c1(_0x73d85,_0x885a85);{const _0x330f2d=_0x885a85['children']['map'](_0x13ccbb=>this['_getViewObj'](_0x13ccbb));return new(Y[_0x885a85['type']]||_0x43d47e)(_0x73d85,_0x885a85['name'],_0x885a85['attributes'],_0x330f2d);}}['_getDiff'](_0x20eb34,_0x3d07e4=null){const _0x2d95c6=this['repository']['getRevision'](_0x20eb34),_0x43c792=_0x3d07e4?this['repository']['getRevision'](_0x3d07e4):null,_0x364377=this['_getRevisionsRange'](_0x2d95c6,_0x43c792),_0x5b7a1f=_0x364377[_0x364377['length']-0x1],_0x3d9f06=new Map(),_0x1176b9={'model':{},'attributes':{},'changes':[]},_0xfc95d=new Set(),_0x2ef4da=new Map();for(let _0x3738bb=_0x364377['length']-0x1;_0x3738bb>=0x0;_0x3738bb--){const _0x5eb955=_0x364377[_0x3738bb];for(const _0x41d2ee of Object['keys'](_0x5eb955['diffData']))if(_0x5eb955['diffData'][_0x41d2ee]['attachChange']){const _0x1792a5=_0x5eb955['diffData'][_0x41d2ee]['attachChange'];_0x1792a5['isAttached']?(_0xfc95d['add'](_0x41d2ee),_0x2ef4da['has'](_0x41d2ee)&&_0x2ef4da['get'](_0x41d2ee)['userId']==_0x1792a5['userId']?_0x2ef4da['delete'](_0x41d2ee):_0x2ef4da['set'](_0x41d2ee,_0x1792a5)):_0x2ef4da['has'](_0x41d2ee)?(_0xfc95d['delete'](_0x41d2ee),_0x2ef4da['delete'](_0x41d2ee)):(_0xfc95d['add'](_0x41d2ee),_0x2ef4da['set'](_0x41d2ee,_0x1792a5));}else _0xfc95d['add'](_0x41d2ee);}for(const _0x115165 of _0xfc95d){const _0x178d03=_0x2ef4da['has'](_0x115165)&&!_0x2ef4da['get'](_0x115165)['isAttached'];let _0x50dd64=_0x178d03?_0x364377['length']-0x1:0x0;const _0x53e2ff=_0x178d03?-0x1:0x1;for(;_0x364377[_0x50dd64];){const _0x289613=_0x364377[_0x50dd64];if(_0x289613['diffData'][_0x115165]){const _0x4130bc=_0x178d03?_0x289613['diffData'][_0x115165]['attributesBefore']:_0x289613['diffData'][_0x115165]['attributesAfter'];_0x1176b9['attributes'][_0x115165]=_0x4130bc?_0x5c9543(_0x4130bc):{};break;}_0x50dd64+=_0x53e2ff;}}for(const _0x3d070e of _0x364377){_0x3d070e['model']={};for(const _0x4e2384 of _0x3d070e['authors'])_0x3d9f06['set'](_0x4e2384['id'],_0x4e2384);for(const _0x24cb40 of _0xfc95d){const _0x57f7df=_0x3d070e['diffData'][_0x24cb40]?_0x3d070e['diffData'][_0x24cb40]['insertions']:'[]',_0x2f7b20=_0x3d070e['diffData'][_0x24cb40]?_0x3d070e['diffData'][_0x24cb40]['deletions']:'[]';_0x3d070e['model'][_0x24cb40]={'insertions':this['_makeModelFromViewString'](_0x57f7df),'deletions':this['_makeModelFromViewString'](_0x2f7b20)};}}for(const _0x184c65 of _0xfc95d){let _0x2f33ba=null,_0x1f98cb=0x0;const _0x2e3b27=new Map(Array['from'](_0x2d95c6['model'][_0x184c65]['insertions']['markers'])['filter'](([_0x155da9])=>!_0x155da9['startsWith']('revision:')));let _0x20ab73=0x0;for(const _0x1bced2 of _0x364377){const _0x19dc07=this['_makeTape'](_0x1bced2['model'][_0x184c65]['insertions']);_0x1bced2==_0x2d95c6?(_0x2f33ba=_0x19dc07,_0x1f98cb=_0x2f33ba['length'],_0x2f33ba['forEach'](_0x9877da=>{_0x9877da['id']=_0x20ab73++;}),this['_processTape'](_0x2f33ba)):this['_markInsertions'](_0x2f33ba,_0x19dc07);const _0x4e64a8=_0x2f33ba['filter'](_0x1eec20=>!_0x1eec20['isAdded'])['map'](_0x580734=>_0x580734['id']);let _0x2023fd=0x0;const _0x534444=this['_makeTape'](_0x1bced2['model'][_0x184c65]['deletions']);_0x534444['forEach'](_0x9f2783=>{_0x9f2783['isRemoved']?_0x9f2783['id']=_0x1f98cb++:_0x9f2783['id']=_0x4e64a8[_0x2023fd++];}),this['_processTape'](_0x534444),this['_setDistance'](_0x2f33ba,'isAdded'),this['_setDistance'](_0x534444,'isRemoved'),_0x1bced2==_0x2d95c6&&this['_markMarkers'](_0x2f33ba,_0x2e3b27),_0x2f33ba=this['_joinTapes'](_0x2f33ba,_0x534444),this['_refreshStartEndIndex'](_0x2f33ba),this['_setDistance'](_0x2f33ba,'isRemoved');}_0x2f33ba=_0x2f33ba['filter'](_0x4efec1=>!(_0x4efec1['isAdded']&&_0x4efec1['isRemoved']));const _0x3493f8=new Map(_0x5b7a1f['model'][_0x184c65]['deletions']['markers']),_0x3e9dfa=new Set(_0x2e3b27['keys']());for(const _0x37da41 of _0x3493f8['keys']())_0x3e9dfa['delete'](_0x37da41);this['_markSuggestions'](_0x2f33ba,_0x3e9dfa),this['_fixObsoleteTags'](_0x2f33ba),_0x2f33ba=this['_removeMissingPairs'](_0x2f33ba),_0x2f33ba=this['_markMismatchedRemovedTags'](_0x2f33ba),_0x2f33ba=this['_removeUnsupportedChanges'](_0x2f33ba);const {root:_0x1ca872,changes:_0x4693b2}=this['_makeModelFromTape'](_0x2f33ba,_0x3d9f06,_0x184c65);_0x1176b9['model'][_0x184c65]=_0x1ca872;const _0xe3c70b=_0x2ef4da['get'](_0x184c65);if(_0xe3c70b){const _0x3049af=_0x3d9f06['get'](_0xe3c70b['userId']),_0x506b7d=new r({'author':_0x3049af,'type':_0xe3c70b['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x184c65});_0x4693b2['unshift'](_0x506b7d),_0x1176b9['attributes'][_0x184c65]['revisionHistoryAttachChange']=_0x506b7d['id'];}_0x1176b9['changes']=_0x1176b9['changes']['concat'](_0x4693b2);}return _0x1176b9;}['_markMarkers'](_0x697af3,_0x43a1bd){for(let _0x35f6d1=0x0;_0x35f6d1<_0x697af3['length'];_0x35f6d1++)for(const [_0x89c4cf,_0x5c6bb4]of _0x43a1bd)_0x5c6bb4['start']['isEqual'](_0x697af3[_0x35f6d1]['previousPosition'])&&_0x697af3[_0x35f6d1]['markersStart']['push'](_0x89c4cf),_0x5c6bb4['end']['isEqual'](_0x697af3[_0x35f6d1]['nextPosition'])&&_0x697af3[_0x35f6d1]['markersEnd']['push'](_0x89c4cf);}['_joinTapes'](_0xd5c8ec,_0x5db295){let _0x2a0ff9=[],_0x2429b0=0x0,_0x357ac4=0x0;for(;_0x2429b0<_0xd5c8ec['length']||_0x357ac4<_0x5db295['length'];){const _0x9abfb2=_0xd5c8ec[_0x2429b0]||{},_0x546c9f=_0x5db295[_0x357ac4]||{};if(_0x9abfb2['id']==_0x546c9f['id'])_0x2429b0++,_0x357ac4++,_0x2a0ff9['push'](_0x9abfb2);else{if(_0x546c9f['isRemoved']&&_0x9abfb2['isAdded']){const {commonTape:_0x399c34,iEnd:_0x5d7289,jEnd:_0x16c6ca}=this['_threeWayMerge'](_0xd5c8ec,_0x2429b0,_0x5db295,_0x357ac4);_0x2a0ff9=_0x2a0ff9['concat'](_0x399c34),_0x2429b0=_0x5d7289,_0x357ac4=_0x16c6ca;}else _0x546c9f['isRemoved']?(_0x357ac4++,_0x2a0ff9['push'](_0x546c9f)):(_0x2429b0++,_0x2a0ff9['push'](_0x9abfb2));}}return _0x2a0ff9;}['_markSuggestions'](_0xe17e22,_0x251f83){const _0x1b6870=[];for(let _0x2444d5=0x0;_0x2444d5<_0xe17e22['length'];_0x2444d5++){for(let _0x4d9928=0x0;_0x4d9928<_0xe17e22[_0x2444d5]['markersStart']['length'];_0x4d9928++){const _0x4a3381=_0xe17e22[_0x2444d5]['markersStart'][_0x4d9928];if(!_0x251f83['has'](_0x4a3381))continue;const {group:_0x17f66c,type:_0x132dc3,authorId:_0x414a37}=_0x2c3800(_0x4a3381);'revision-suggestion'!=_0x17f66c||'insertion'!=_0x132dc3&&'deletion'!=_0x132dc3||(_0x1b6870['unshift']({'type':_0x132dc3,'name':_0x4a3381,'userId':_0x414a37}),_0xe17e22[_0x2444d5]['markersStart']['splice'](_0x4d9928,0x1),_0x4d9928--);}_0x57cf69(_0xe17e22[_0x2444d5]);for(let _0x5c5fe1=0x0;_0x5c5fe1<_0xe17e22[_0x2444d5]['markersEnd']['length'];_0x5c5fe1++){const _0x58948b=_0xe17e22[_0x2444d5]['markersEnd'][_0x5c5fe1];if(!_0x251f83['has'](_0x58948b))continue;const {group:_0x389f1e,type:_0xc681c7}=_0x2c3800(_0x58948b);if('revision-suggestion'!=_0x389f1e||'insertion'!=_0xc681c7&&'deletion'!=_0xc681c7)continue;_0xe17e22[_0x2444d5]['markersEnd']['splice'](_0x5c5fe1,0x1),_0x5c5fe1--;const _0xcafe65=_0x1b6870['findIndex'](_0x537497=>_0x537497['name']==_0x58948b);_0xcafe65>-0x1&&_0x1b6870['splice'](_0xcafe65,0x1);}}function _0x2c3800(_0x5580f1){const _0x5a6563=_0x5580f1['split'](':');return{'group':_0x5a6563[0x0],'type':_0x5a6563[0x1],'subType':_0x5a6563['length']>=0x5?_0x5a6563[0x2]:null,'id':_0x5a6563['length']<0x5?_0x5a6563[0x2]:_0x5a6563[0x3],'authorId':_0x5a6563['length']<0x5?_0x5a6563[0x3]:_0x5a6563[0x4],'markerCount':0x6==_0x5a6563['length']?_0x5a6563[0x5]:null};}function _0x57cf69(_0x5a4ee7){for(let _0x2b3688=0x0;_0x2b3688<_0x1b6870['length'];_0x2b3688++){if(_0x5a4ee7['isAdded']&&'insertion'==_0x1b6870[_0x2b3688]['type'])return _0x5a4ee7['isAddSuggestion']=_0x1b6870[_0x2b3688],void delete _0x5a4ee7['isAdded'];if(!_0x5a4ee7['isAdded']&&!_0x5a4ee7['isRemoved']&&'deletion'==_0x1b6870[_0x2b3688]['type'])return void(_0x5a4ee7['isRemoveSuggestion']=_0x1b6870[_0x2b3688]);}}}['_setDistance'](_0x38621b,_0x50e2ee){let _0x157775=0x0,_0x47143d=!0x1;const _0x2c6f55=new Map();for(const _0x3ee4bb of _0x38621b)_0x3ee4bb[_0x50e2ee]?_0x47143d&&(_0x157775++,_0x47143d=!0x1):(_0x157775++,_0x47143d=!0x0),_0x2c6f55['set'](_0x3ee4bb['id'],_0x157775);for(let _0x22104b=0x0;_0x22104b<_0x38621b['length'];_0x22104b++){if('isRemoved'==_0x50e2ee&&_0x38621b[_0x22104b]['isAdded']||'isAdded'==_0x50e2ee&&_0x38621b[_0x22104b]['isRemoved'])continue;if('text'==_0x38621b[_0x22104b]['type']){_0x38621b[_0x22104b]['distance']=0x0;continue;}const _0x6ec0e1=_0x2c6f55['get'](_0x38621b[_0x22104b]['pairId']),_0x435a25=_0x2c6f55['get'](_0x38621b[_0x22104b]['id']);_0x38621b[_0x22104b]['distance']=_0x6ec0e1-_0x435a25;}}['_getRevisionsRange'](_0x4ec4ee,_0x1a654d,_0x277323=!0x1){const _0x4a638c=[];let _0x3901ca=this['repository']['getIndex'](_0x4ec4ee),_0x3e8098=this['repository']['getIndex'](_0x1a654d);for(-0x1==_0x3e8098&&(_0x3e8098=this['repository']['_revisions']['length'],_0x277323=!0x1);_0x3901ca<_0x3e8098;)_0x4a638c['push'](this['repository']['getRevision'](_0x3901ca)),_0x3901ca++;return _0x277323&&_0x4a638c['push'](this['repository']['getRevision'](_0x3901ca)),_0x4a638c;}['_threeWayMerge'](_0x18894c,_0xb4b327,_0x16fcab,_0x25423a){const _0x21c810=this['editor']['model']['schema'];let _0x8f04da=_0xb4b327;for(;_0x18894c[_0x8f04da]&&_0x18894c[_0x8f04da]['isAdded'];)_0x8f04da++;let _0x46a859=_0x25423a;for(;_0x16fcab[_0x46a859]&&_0x16fcab[_0x46a859]['isRemoved'];)_0x46a859++;_0x288a80(_0x18894c,_0xb4b327,_0x8f04da),_0x288a80(_0x16fcab,_0x25423a,_0x46a859);const _0x4b4fa7=_0x16fcab['slice'](_0x25423a,_0x46a859)['concat'](_0x18894c['slice'](_0xb4b327,_0x8f04da));return _0x4b4fa7['sort']((_0xc15253,_0x478e4c)=>_0xc15253['side']!=_0x478e4c['side']?_0xc15253['side']-_0x478e4c['side']:_0xc15253['level']!=_0x478e4c['level']?_0xc15253['level']-_0x478e4c['level']:_0xc15253['distance']!=_0x478e4c['distance']?_0x478e4c['distance']-_0xc15253['distance']:!!_0xc15253['isAdded']!=!!_0x478e4c['isAdded']?-0x1==_0xc15253['side']||0x0==_0xc15253['side']?_0xc15253['isAdded']?-0x1:0x1:_0xc15253['isAdded']?0x1:-0x1:_0xc15253['index']-_0x478e4c['index']),{'commonTape':_0x4b4fa7,'iEnd':_0x8f04da,'jEnd':_0x46a859};function _0x288a80(_0x2b059b,_0x3adc17,_0x2092be){let _0x339083=-0x1,_0x4fdbd4=Number['POSITIVE_INFINITY'],_0x39158e=!0x0;for(let _0xe4cbbc=_0x3adc17;_0xe4cbbc<_0x2092be;_0xe4cbbc++)if(_0x21c810['isInline'](_0x2b059b[_0xe4cbbc]['item'])||(_0x39158e=!0x1),_0x2b059b[_0xe4cbbc]['item']['startIndex']<_0x3adc17&&(_0x339083=_0xe4cbbc),_0x2b059b[_0xe4cbbc]['item']['endIndex']>=_0x2092be){_0x4fdbd4=_0xe4cbbc;break;}_0x39158e&&(_0x339083=_0x2092be-0x1);for(let _0x2bab2f=_0x3adc17;_0x2bab2f<_0x2092be;_0x2bab2f++)_0x2b059b[_0x2bab2f]['side']=_0x2bab2f<=_0x339083?-0x1:_0x2bab2f<_0x4fdbd4?0x0:0x1,_0x2b059b[_0x2bab2f]['index']=_0x2bab2f;let _0x3b556a=0x0;for(let _0x58b655=_0x3adc17;_0x58b655<=_0x339083;_0x58b655++)0x0==_0x2b059b[_0x58b655]['distance']?_0x2b059b[_0x58b655]['level']=_0x3b556a:(_0x3b556a++,_0x2b059b[_0x58b655]['level']=_0x3b556a,_0x3b556a++);for(let _0x2d6278=_0x3adc17;_0x2d6278<_0x2092be;_0x2d6278++)0x0==_0x2b059b[_0x2d6278]['side']&&(_0x2b059b[_0x2d6278]['level']=_0x3b556a);_0x3b556a=0x0;for(let _0x3bbe8b=_0x2092be-0x1;_0x3bbe8b>=_0x4fdbd4;_0x3bbe8b--)0x0==_0x2b059b[_0x3bbe8b]['distance']?_0x2b059b[_0x3bbe8b]['level']=_0x3b556a:(_0x3b556a--,_0x2b059b[_0x3bbe8b]['level']=_0x3b556a,_0x3b556a--);}}['_fixObsoleteTags'](_0x174696){const _0x22b854=new Map(),_0x2d593f=this['editor']['model']['schema'];for(let _0x4eb064=0x1;_0x4eb064<_0x174696['length'];_0x4eb064++){let _0x3f847a,_0x5bba51,_0x529d33;const _0x598436=_0x174696[_0x4eb064],_0x4082c4=_0x174696[_0x4eb064-0x1];if('text'==_0x598436['type'])continue;if(_0x598436['type']!=_0x4082c4['type'])continue;if(!_0x2d593f['isBlock'](_0x4082c4['item'])||_0x2d593f['isLimit'](_0x4082c4['item']))continue;if(!_0x2d593f['isBlock'](_0x598436['item'])||_0x2d593f['isLimit'](_0x598436['item']))continue;if((_0x174696[_0x4eb064]['isAdded']||_0x174696[_0x4eb064]['isAddSuggestion'])&&_0x174696[_0x4eb064-0x1]['isRemoved'])_0x3f847a=_0x174696[_0x4eb064],_0x5bba51=_0x174696[_0x4eb064-0x1],_0x529d33=_0x4eb064-0x1;else{if(!_0x174696[_0x4eb064]['isRemoved']||!_0x174696[_0x4eb064-0x1]['isAdded']&&!_0x174696[_0x4eb064-0x1]['isAddSuggestion'])continue;_0x3f847a=_0x174696[_0x4eb064-0x1],_0x5bba51=_0x174696[_0x4eb064],_0x529d33=_0x4eb064;}const _0x1e1e01=_0x3f847a['level']==_0x5bba51['level'],_0x8169ea=Math['abs'](_0x3f847a['level'])<Math['abs'](_0x5bba51['level'])&&0x0==_0x5bba51['distance'];(_0x1e1e01||_0x8169ea)&&(_0x22b854['set'](_0x5bba51['id'],_0x3f847a['id']),_0x174696['splice'](_0x529d33,0x1),_0x4eb064--,_0x3f847a['isAdded']=!0x1);}for(let _0x11b76b=0x0;_0x11b76b<_0x174696['length'];_0x11b76b++)_0x22b854['has'](_0x174696[_0x11b76b]['pairId'])&&(_0x174696[_0x11b76b]['pairId']=_0x22b854['get'](_0x174696[_0x11b76b]['pairId']));}['_removeMissingPairs'](_0x5196c5){const _0x5ed032=new Set(_0x5196c5['map'](_0x18aa36=>_0x18aa36['id']));for(let _0x343921=0x0;_0x343921<_0x5196c5['length'];_0x343921++)_0x5ed032['has'](_0x5196c5[_0x343921]['pairId'])||0x0==_0x5196c5[_0x343921]['distance']||(_0x5196c5[_0x343921]['isIncorrect']=!0x0);return _0x5196c5['filter'](_0x159e21=>!_0x159e21['isIncorrect']);}['_markMismatchedRemovedTags'](_0x26143d){const _0x559777=new Set();for(let _0x504a5c=0x0;_0x504a5c<_0x26143d['length'];_0x504a5c++){if(_0x559777['has'](_0x26143d[_0x504a5c]['id'])&&_0x26143d[_0x504a5c]['isRemoved']&&(_0x26143d[_0x504a5c]['isIncorrect']=!0x0),_0x26143d[_0x504a5c]['isIncorrect'])continue;if(0x0==_0x26143d[_0x504a5c]['distance'])continue;if('elementStart'!=_0x26143d[_0x504a5c]['type'])continue;if(null==_0x26143d[_0x504a5c]['pairId'])continue;let _0x341bff=_0x504a5c+0x1,_0x9050e4=0x0;for(;_0x26143d[_0x341bff]['id']!=_0x26143d[_0x504a5c]['pairId'];)'elementStart'==_0x26143d[_0x341bff]['type']?_0x9050e4++:'elementEnd'==_0x26143d[_0x341bff]['type']&&_0x9050e4--,_0x341bff++;if(0x0!=_0x9050e4){if(_0x26143d[_0x504a5c]['isRemoved'])_0x26143d[_0x504a5c]['isIncorrect']=!0x0;else{for(;_0x341bff!=_0x504a5c;)_0x26143d[_0x341bff]['isRemoved']&&0x0!=_0x26143d[_0x341bff]['distance']&&(_0x26143d[_0x341bff]['isIncorrect']=!0x0,_0x559777['add'](_0x26143d[_0x341bff]['pairId'])),_0x341bff--;}}}return _0x26143d['filter'](_0x2331ce=>!_0x2331ce['isIncorrect']);}['_removeUnsupportedChanges'](_0x44f1f2){const _0x565f06=this['editor']['model']['schema'];for(let _0x45af1d=0x0;_0x45af1d<_0x44f1f2['length'];_0x45af1d++){if(!(_0x44f1f2[_0x45af1d]['isAdded']||_0x44f1f2[_0x45af1d]['isAddSuggestion']||_0x44f1f2[_0x45af1d]['isRemoved']||_0x44f1f2[_0x45af1d]['isRemoveSuggestion']))continue;if(0x0==_0x44f1f2[_0x45af1d]['distance'])continue;const _0x53e208=_0x44f1f2[_0x45af1d]['item'];_0x565f06['isBlock'](_0x53e208)||_0x565f06['isLimit'](_0x53e208)||(_0x44f1f2[_0x45af1d]['isAdded']&&delete _0x44f1f2[_0x45af1d]['isAdded'],_0x44f1f2[_0x45af1d]['isAddSuggestion']&&delete _0x44f1f2[_0x45af1d]['isAddSuggestion'],_0x44f1f2[_0x45af1d]['isRemoveSuggestion']&&delete _0x44f1f2[_0x45af1d]['isRemoveSuggestion'],_0x44f1f2[_0x45af1d]['isRemoved']&&(_0x44f1f2[_0x45af1d]['isIncorrect']=!0x0));}return _0x44f1f2['filter'](_0x31ad9f=>!_0x31ad9f['isIncorrect']);}['_makeModelFromTape'](_0x5d2617,_0x29076e,_0x1a2c6e){const _0x1920e2=new gt(),_0x4b798c=[],_0x16930e=new Map(),_0x248f94=this['editor']['model'],_0x3a9b56=_0x248f94['schema'],_0x2854c8=[_0x1920e2],_0x220f9c={},_0x2f7396={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0xd26f82=null;const _0x350571=[0x0];for(let _0x7ac6eb=0x0;_0x7ac6eb<_0x5d2617['length'];_0x7ac6eb++)if('elementStart'===_0x5d2617[_0x7ac6eb]['type']){_0x5d2617[_0x7ac6eb]['previousPosition']=_0x248f94['createPositionFromPath'](_0x1920e2,_0x350571);const _0x1ac931=new ut(_0x5d2617[_0x7ac6eb]['item']['name'],_0x5d2617[_0x7ac6eb]['item']['getAttributes']());_0x2854c8[0x0]['_appendChild'](_0x1ac931),_0x350571['push'](0x0),_0x2854c8['unshift'](_0x1ac931),_0x5d2617[_0x7ac6eb]['nextPosition']=_0x248f94['createPositionFromPath'](_0x1920e2,_0x350571);}else'elementEnd'===_0x5d2617[_0x7ac6eb]['type']?(_0x2854c8['shift'](),_0x5d2617[_0x7ac6eb]['previousPosition']=_0x248f94['createPositionFromPath'](_0x1920e2,_0x350571),_0x350571['pop'](),_0x350571[_0x350571['length']-0x1]++,_0x5d2617[_0x7ac6eb]['nextPosition']=_0x248f94['createPositionFromPath'](_0x1920e2,_0x350571)):(_0x5d2617[_0x7ac6eb]['previousPosition']=_0x248f94['createPositionFromPath'](_0x1920e2,_0x350571),_0xd26f82?_0xd26f82['_data']+=_0x5d2617[_0x7ac6eb]['item']['data']:_0xd26f82=new wt(_0x5d2617[_0x7ac6eb]['item']['data'],_0x5d2617[_0x7ac6eb]['item']['getAttributes']()),_0x5d2617[_0x7ac6eb+0x1]&&'text'===_0x5d2617[_0x7ac6eb+0x1]['type']&&_0x5aa8fc(_0xd26f82,_0x5d2617[_0x7ac6eb+0x1]['item'])||(_0x2854c8[0x0]['_appendChild'](_0xd26f82),_0xd26f82=null),_0x350571[_0x350571['length']-0x1]+=_0x5d2617[_0x7ac6eb]['item']['offsetSize'],_0x5d2617[_0x7ac6eb]['nextPosition']=_0x248f94['createPositionFromPath'](_0x1920e2,_0x350571));for(let _0x455ed2=0x0;_0x455ed2<_0x5d2617['length'];_0x455ed2++){const _0x20f3a0=_0x5d2617[_0x455ed2]['previousPosition'],_0x6f0e35=_0x5d2617[_0x455ed2]['nextPosition'];for(const _0x3250b7 of _0x5d2617[_0x455ed2]['markersStart'])_0x16930e['set'](_0x3250b7,{'start':_0x20f3a0,'end':null});_0xe71ae0('isRemoveSuggestion',_0x455ed2,_0x20f3a0,_0x6f0e35),_0xe71ae0('isAddSuggestion',_0x455ed2,_0x20f3a0,_0x6f0e35),_0xe71ae0('isRemoved',_0x455ed2,_0x20f3a0,_0x6f0e35),_0xe71ae0('isAdded',_0x455ed2,_0x20f3a0,_0x6f0e35);for(const _0x3ac8e0 of _0x5d2617[_0x455ed2]['markersEnd']){_0x16930e['get'](_0x3ac8e0)['end']=_0x6f0e35;}}for(const [_0x5f59e,_0x5c796f]of _0x16930e){const _0xb79be3=this['editor']['model']['createRange'](_0x5c796f['start'],_0x5c796f['end']);_0x1920e2['markers']['set'](_0x5f59e,_0xb79be3);}return _0x4b798c['sort']((_0x53e5be,_0x334d99)=>{const _0x2cae4b=_0x1920e2['markers']['get']('revision:'+_0x53e5be['id']),_0x28a3d6=_0x1920e2['markers']['get']('revision:'+_0x334d99['id']);return _0x2cae4b['start']['isBefore'](_0x28a3d6['start'])?-0x1:_0x2cae4b['start']['isAfter'](_0x28a3d6['start'])?0x1:_0x2cae4b['end']['isBefore'](_0x28a3d6['end'])?-0x1:_0x2cae4b['end']['isAfter'](_0x28a3d6['end'])?0x1:'add'===_0x53e5be['type']?-0x1:0x1;}),{'root':_0x1920e2,'changes':_0x4b798c};function _0xe71ae0(_0x26f787,_0x544849,_0xda3f52,_0x20732f){const _0x48160d=!!_0x5d2617[_0x544849][_0x26f787],_0x211e5e=_0x48160d?_0x5d2617[_0x544849][_0x26f787]['userId']:null,_0x3f6b3b=_0x544849===_0x5d2617['length']-0x1,_0x41cd83=_0x2f7396[_0x26f787][0x0],_0x4d9c93=_0x3a9b56['isObject'](_0x5d2617[_0x544849]['item']);!_0x220f9c[_0x26f787]&&_0x48160d?_0x220f9c[_0x26f787]={'start':_0xda3f52,'tapeItem':_0x5d2617[_0x544849],'userId':_0x211e5e,'type':_0x26f787}:_0x220f9c[_0x26f787]&&!_0x48160d?(_0x220f9c[_0x26f787]['end']=_0xda3f52,_0x3cb7c4(_0x220f9c[_0x26f787]),_0x220f9c[_0x26f787]=null):_0x220f9c[_0x26f787]&&_0x48160d&&_0x220f9c[_0x26f787]['userId']!==_0x211e5e&&(_0x220f9c[_0x26f787]['end']=_0xda3f52,_0x41cd83&&_0x41cd83['userId']===_0x220f9c[_0x26f787]['userId']||_0x3cb7c4(_0x220f9c[_0x26f787]),_0x220f9c[_0x26f787]={'start':_0xda3f52,'tapeItem':_0x5d2617[_0x544849],'userId':_0x211e5e,'type':_0x26f787}),_0x220f9c[_0x26f787]&&_0x4d9c93&&('elementStart'!==_0x5d2617[_0x544849]['type']||_0x41cd83&&_0x41cd83['userId']===_0x211e5e||_0x2f7396[_0x26f787]['unshift']({'userId':_0x211e5e,'object':_0x5d2617[_0x544849]['item'],'change':_0x220f9c[_0x26f787]}),'elementEnd'===_0x5d2617[_0x544849]['type']&&_0x41cd83&&_0x41cd83['object']===_0x5d2617[_0x544849]['item']&&(_0x2f7396[_0x26f787]['shift'](),_0x220f9c[_0x26f787]=_0x41cd83['change'])),_0x220f9c[_0x26f787]&&_0x3f6b3b&&(_0x220f9c[_0x26f787]['end']=_0x20732f,_0x3cb7c4(_0x220f9c[_0x26f787]),_0x220f9c[_0x26f787]=null);}function _0x3cb7c4({start:_0x186c8e,end:_0x2399e4,tapeItem:_0x22017d,userId:_0x5c6abf,type:_0x467cbc}){const _0x22f635=_0x22017d['item'],_0x5bbe1e=_0x248f94['schema']['isBlock'](_0x22f635)&&!_0x248f94['schema']['isLimit'](_0x22f635),_0x4b915d=_0x186c8e['nodeAfter']==_0x2399e4['parent']&&_0x2399e4['isAtStart'];if(_0x5bbe1e&&_0x4b915d)return;const _0x3e0d79=_0x248f94['createRange'](_0x186c8e,_0x2399e4),_0x5b01cb=_0x29076e['get'](_0x5c6abf),_0x36f622=new r({'author':_0x5b01cb,'type':'isAdded'==_0x467cbc||'isAddSuggestion'==_0x467cbc?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x467cbc||'isRemoveSuggestion'==_0x467cbc},'createdAt':new Date(),'rootName':_0x1a2c6e});_0x4b798c['push'](_0x36f622),_0x1920e2['markers']['set']('revision:'+_0x36f622['id'],_0x3e0d79);}function _0x5aa8fc(_0x1abdec,_0x54a299){const _0x554893=_0x1abdec['getAttributes'](),_0x55d754=_0x54a299['getAttributes']();for(const _0x435b4f of _0x554893){if(_0x435b4f[0x1]!==_0x54a299['getAttribute'](_0x435b4f[0x0]))return!0x1;_0x55d754['next']();}return _0x55d754['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x58e36f=>{const _0x513367=_0x58e36f['markerName']['split'](':')[0x1],_0x2a675c=this['_getChangeFromId'](_0x513367);if(!_0x2a675c)return null;const _0x3a17a3='add'==_0x2a675c['type']?'insertion':'deletion',_0x1aebc3=['ck-suggestion-marker','ck-suggestion-marker-'+_0x3a17a3];return _0x2a675c['data']['isSuggestion']&&_0x1aebc3['push']('ck-suggestion-marker-'+_0x3a17a3+'-new'),this['activeChange']==_0x2a675c&&_0x1aebc3['push']('ck-suggestion-marker--active'),{'classes':_0x1aebc3,'attributes':{'data-change-id':_0x513367}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x131af3=>{_0x131af3['on']('element:pre',(_0x4e8dcd,_0x7ae702,_0xe2e1d)=>{const _0x27e594=_0x7ae702['viewItem']['getChild'](0x0);if(!_0x27e594||!_0x27e594['is']('element','code'))return;if(!_0xe2e1d['consumable']['consume'](_0x27e594,{'attributes':['vid_start','vid_end']}))return;const _0x4d9e6b=_0x7ae702['modelRange']['start']['nodeAfter'];_0xe2e1d['writer']['setAttribute']('vid_start',_0x27e594['getAttribute']('vid_start'),_0x4d9e6b),_0xe2e1d['writer']['setAttribute']('vid_end',_0x27e594['getAttribute']('vid_end'),_0x4d9e6b);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x23462b=>{_0x23462b['on']('element',(_0x34de4f,_0x582347,_0xa21cd1)=>{if(!_0xa21cd1['consumable']['consume'](_0x582347['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x582347['modelRange']['isCollapsed'])return;const _0x3884aa=_0x582347['modelRange']['start']['nodeAfter'];_0x3884aa['hasAttribute']('vid_start')||_0x3884aa['hasAttribute']('vid')||(_0xa21cd1['writer']['setAttribute']('vid_start',_0x582347['viewItem']['getAttribute']('vid_start'),_0x3884aa),_0xa21cd1['writer']['setAttribute']('vid_end',_0x582347['viewItem']['getAttribute']('vid_end'),_0x3884aa));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x120bfd=>_0x120bfd['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x520fdf,[,_0x18d675])=>{['vid_start','vid_end','vid']['includes'](_0x18d675)&&(_0x520fdf['return']=!0x0,_0x520fdf['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x58fd29=>{_0x58fd29['on']('attribute:vid',(_0x40a219,_0xd6d3bd,_0x3ec64e)=>{if('\x20'!=_0xd6d3bd['item']['data']||_0xd6d3bd['item']['parent']['maxOffset']>0x1)return;if(!_0x3ec64e['consumable']['consume'](_0xd6d3bd['item'],_0x40a219['name']))return;const _0x3ea0f0=_0x3ec64e['writer'],_0x8fcdac=_0x3ec64e['mapper']['toViewRange'](_0xd6d3bd['range']);_0x3ea0f0['wrap'](_0x8fcdac,_0x3ea0f0['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x1ed0a6){const _0x4740bb=_0x1ed0a6['plugins']['get']('RevisionViewer');return(_0x48d5ac,_0xc7c0df,_0x5aeac0)=>{const _0x2825e8=_0xc7c0df['markerName']['split'](':')[0x1],_0x53d563=_0x4740bb['_getChangeFromId'](_0x2825e8);if(!_0x53d563)return null;const _0x22f00a='add'==_0x53d563['type']?'split':'merge';if(!_0x5aeac0['consumable']['test'](_0xc7c0df['markerRange'],_0x48d5ac['name']))return;const _0x21a2bf=_0xc7c0df['markerRange']['getWalker'](),_0x3b4ab1=_0xc7c0df['markerRange']['start'],_0x2f8bbb=_0x1ed0a6['model']['schema'];let _0x78f693=null,_0x557cf5=null,_0x38011a=!0x1,_0x1dd6ad=!0x1;for(const _0x1df762 of _0x21a2bf){const _0x7573fd=_0x1df762['item'];_0x38011a=_0x38011a||_0x2f8bbb['isContent'](_0x7573fd);const _0x4f0484=_0x5aeac0['mapper']['toViewElement'](_0x7573fd);if(_0x4f0484&&_0x4f0484['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x1df762['type']&&(_0x2f8bbb['isBlock'](_0x7573fd)&&!_0x2f8bbb['isLimit'](_0x7573fd)&&(_0x7573fd['nextSibling']||_0x3b4ab1['isAtEnd']?_0x78f693&&_0x78f693['parent']==_0x7573fd||(_0x78f693=_0x7573fd,_0x12baa0(_0x1df762['previousPosition']),_0x1dd6ad=!0x0):_0x557cf5=_0x557cf5||_0x1df762['previousPosition']));}function _0x12baa0(_0x1a87cc){const _0x7f7937=_0x5aeac0['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x22f00a}),_0x137e7f=_0x5aeac0['mapper']['toViewPosition'](_0x1a87cc);_0x53d563['data']['isSuggestion']&&_0x5aeac0['writer']['addClass']('ck-suggestion-marker-'+_0x22f00a+'-new',_0x7f7937),_0x4740bb['activeChange']==_0x53d563&&_0x5aeac0['writer']['addClass']('ck-suggestion-marker--active',_0x7f7937),_0x5aeac0['writer']['insert'](_0x137e7f,_0x7f7937),_0x5aeac0['mapper']['bindElementToMarker'](_0x7f7937,_0xc7c0df['markerName']);}_0x38011a||_0x1dd6ad||!_0x557cf5||_0x12baa0(_0x557cf5);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x1dfed7,_0x19af60,_0x152d64)=>{const _0xf955e3=_0x152d64['mapper']['markerNameToElements'](_0x19af60['markerName']);if(_0xf955e3){for(const _0x48ddf2 of _0xf955e3)(_0x48ddf2['hasClass']('ck-suggestion-marker-split')||_0x48ddf2['hasClass']('ck-suggestion-marker-merge'))&&(_0x152d64['mapper']['unbindElementFromMarkerName'](_0x48ddf2,_0x19af60['markerName']),_0x152d64['writer']['remove'](_0x48ddf2));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x355847,_0x2a5b81,_0x2e01eb)=>{const _0x149872=_0x2a5b81['markerName']['split'](':')[0x1],_0x4e33ba=this['_getChangeFromId'](_0x149872);if(!_0x4e33ba)return null;const _0x122870='add'==_0x4e33ba['type']?'split':'merge';if(_0x2e01eb['consumable']['test'](_0x2a5b81['markerRange'],_0x355847['name']))for(const _0x139031 of _0x2a5b81['markerRange']['getItems']()){if(!_0x139031['is']('element','softBreak'))continue;const _0x530a77=_0x2e01eb['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x122870}),_0x13a653=_0x2e01eb['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x139031));_0x4e33ba['data']['isSuggestion']&&_0x2e01eb['writer']['addClass']('ck-suggestion-marker-'+_0x122870+'-new',_0x530a77),this['activeChange']==_0x4e33ba&&_0x2e01eb['writer']['addClass']('ck-suggestion-marker--active',_0x530a77),_0x2e01eb['writer']['insert'](_0x13a653,_0x530a77),_0x2e01eb['mapper']['bindElementToMarker'](_0x530a77,_0x2a5b81['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x1e0ce5=>{for(const _0x4df5e6 of this['editor']['model']['document']['getRootNames']()){const _0xa3d578=this['editor']['model']['document']['getRoot'](_0x4df5e6),_0x176a68=this['editor']['editing']['view']['document']['getRoot'](_0x4df5e6);if(_0x176a68){const _0x45e29e=_0xa3d578['getAttribute']('revisionHistoryAttachChange');if(_0x1e0ce5['removeAttribute']('data-change-id',_0x176a68),_0x1e0ce5['removeClass']('ck-revision-history-root-add',_0x176a68),_0x1e0ce5['removeClass']('ck-revision-history-root-remove',_0x176a68),_0x1e0ce5['removeClass']('ck-revision-history-root--active',_0x176a68),_0x45e29e){const _0x440289=this['_getChangeFromId'](_0x45e29e);if(!_0x440289)return null;_0x1e0ce5['setAttribute']('data-change-id',_0x45e29e,_0x176a68),_0x1e0ce5['addClass']('ck-revision-history-root-'+_0x440289['type'],_0x176a68),this['activeChange']==_0x440289&&_0x1e0ce5['addClass']('ck-revision-history-root--active',_0x176a68);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x4b459e=>'revision-comment:'+_0x4b459e,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x24273c=>'revision-suggestion:'+_0x24273c,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x1e7ba5=>({'name':'suggestion:'+_0x1e7ba5,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x486c2d=>{const _0x2a54c6=_0x486c2d['markerName']['split'](':')[0x1];return'insertion'!=_0x2a54c6&&'deletion'!=_0x2a54c6?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x2a54c6]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Z(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Z(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x3818bf,_0xe163ea,_0x28234d)=>{const _0x599868=_0x28234d['mapper']['markerNameToElements'](_0xe163ea['markerName']);if(_0x599868){for(const _0x27fe56 of _0x599868)_0x27fe56['is']('uiElement')&&(_0x28234d['mapper']['unbindElementFromMarkerName'](_0x27fe56,_0xe163ea['markerName']),_0x28234d['writer']['remove'](_0x27fe56));}},{'priority':'high'});}['_getChangeFromId'](_0x891276){return this['_changeIdToChange']['get'](_0x891276);}['_getViewForChange'](_0x19952c){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new X(this['editor']['locale'],_0x19952c),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x99a1cc,_0x19c740,_0x4c33a0,_0x1ea125)=>{_0x1ea125&&this['_balloon']['remove'](_0x1ea125),_0x4c33a0&&(this['_balloon']['add']({'view':_0x4c33a0,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x582fcf=this['editor']['editing'],_0xfcf887=this['_getChangeFromId'](_0x4c33a0['changeId']);let _0x2ad392;if(_0xfcf887['data']['isOnRoot']){const _0x302f8d=_0x582fcf['view']['getDomRoot'](_0xfcf887['rootName']);_0x2ad392=Array['from'](_0x302f8d['getClientRects']());}else{const _0x21aed0=this['editor']['model']['markers']['get']('revision:'+_0x4c33a0['changeId']);_0x2ad392=Array['from'](_0x582fcf['mapper']['markerNameToElements'](_0x21aed0['name']))['map'](_0x18fe58=>_0x582fcf['view']['domConverter']['mapViewToDom'](_0x18fe58))['map'](_0xea32e2=>Array['from'](_0xea32e2['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x2ad392[0x0];return _0x2ad392['find'](_0x36d5af=>_0x36d5af['top']-0x3<=this['_activeViewTarget']['y']&&_0x36d5af['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x36d5af['left']-0x3<=this['_activeViewTarget']['x']&&_0x36d5af['right']+0x3>=this['_activeViewTarget']['x'])||_0x2ad392[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x2fd490,_0x237dbe,_0x47f21f,_0x6b9ec)=>{this['activeView']=_0x47f21f?this['_getViewForChange'](_0x47f21f):null,this['editor']['model']['change'](()=>{const _0x566002=this['editor']['editing'];_0x6b9ec&&(_0x6b9ec['data']['isOnRoot']?_0x566002['view']['change'](_0x454b88=>{_0x454b88['removeClass']('ck-revision-history-root--active',_0x566002['view']['document']['getRoot'](_0x6b9ec['rootName']));}):_0x566002['reconvertMarker']('revision:'+_0x6b9ec['id'])),_0x47f21f&&(_0x47f21f['data']['isOnRoot']?_0x566002['view']['change'](_0x19cc1b=>{_0x19cc1b['addClass']('ck-revision-history-root--active',_0x566002['view']['document']['getRoot'](_0x47f21f['rootName']));}):_0x566002['reconvertMarker']('revision:'+_0x47f21f['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x275e3c,_0x442089)=>{if(this['activeChange'])return;const _0x3ca56a=this['_findChangeIdFromDomTarget'](_0x442089['target']),_0x5786c8=this['_changeIdToChange']['get'](_0x3ca56a);_0x5786c8?(this['_activeViewTarget']={'x':_0x442089['domEvent']['x'],'y':_0x442089['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x5786c8)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x3df3b5,_0x475e33)=>{const _0x9f1c3d=this['_findChangeIdFromDomTarget'](_0x475e33['target']),_0x96e823=this['_changeIdToChange']['get'](_0x9f1c3d);_0x96e823?(this['_activeViewTarget']={'x':_0x475e33['domEvent']['x'],'y':_0x475e33['domEvent']['y']},_0x96e823===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x96e823):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x28e5e4){do{const _0x32860d=_0x28e5e4['getAttribute']('data-change-id');if(_0x32860d)return _0x32860d;_0x28e5e4=_0x28e5e4['parent'];}while(_0x28e5e4);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x493e2d=>{for(const _0x89168f of this['editor']['model']['markers'])_0x493e2d['removeMarker'](_0x89168f);});}}function Z(_0x3ed61a,_0x5d8ed7){return(_0x3296f4,_0x1bb344,_0x5f0f84)=>{if(!_0x5f0f84['consumable']['test'](_0x1bb344['markerRange'],_0x3296f4['name']))return;const _0xadfbf0=_0x1bb344['markerRange']['getWalker'](),_0x4a6e31=_0x1bb344['markerRange']['start'],_0xc948c8=_0x3ed61a['model']['schema'];let _0x200f64=null,_0x554f9b=null,_0xeea25d=!0x1,_0x46aef2=!0x1;for(const _0x5dbee9 of _0xadfbf0){const _0xb4a4dc=_0x5dbee9['item'];_0xeea25d=_0xeea25d||_0xc948c8['isContent'](_0xb4a4dc);const _0x2436dd=_0x5f0f84['mapper']['toViewElement'](_0xb4a4dc);if(_0x2436dd&&_0x2436dd['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x5dbee9['type']&&(_0xc948c8['isBlock'](_0xb4a4dc)&&!_0xc948c8['isLimit'](_0xb4a4dc)&&(_0xb4a4dc['nextSibling']||_0x4a6e31['isAtEnd']?_0x200f64&&_0x200f64['parent']==_0xb4a4dc||(_0x200f64=_0xb4a4dc,_0x503d8b(_0x5dbee9['previousPosition']),_0x46aef2=!0x0):_0x554f9b=_0x554f9b||_0x5dbee9['previousPosition']));}function _0x503d8b(_0x47f7b8){const _0x24f5bc=_0x5f0f84['mapper']['toViewPosition'](_0x47f7b8),_0xddcccd=_0x5f0f84['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x5d8ed7});_0x5f0f84['writer']['insert'](_0x24f5bc,_0xddcccd),_0x5f0f84['mapper']['bindElementToMarker'](_0xddcccd,_0x1bb344['markerName']);}_0xeea25d||_0x46aef2||!_0x554f9b||_0x503d8b(_0x554f9b);};}class _t extends _0x14e675{constructor(_0x144eca){super(_0x144eca);const _0x1f8f70=_0x144eca['plugins']['get'](d);this['affectsData']=!0x1,this['listenTo'](_0x1f8f70,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x1f8f70,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x2e7ac4=this['editor'],_0x9ddcb4=_0x2e7ac4['plugins']['get'](d),_0x1e77b0=_0x9ddcb4['isReady']?_0x9ddcb4['diff']['newRevisionId']:null;_0x2e7ac4['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x1e77b0);}['refresh'](){const {isReady:_0x13830c,isEnabled:_0x59c5c1,repository:_0x371760,diff:_0x9d726c}=this['editor']['plugins']['get'](d),_0x253df4=_0x9d726c&&_0x371760['getLaterVisibleRevision'](_0x9d726c['newRevisionId']);this['isEnabled']=_0x13830c&&_0x59c5c1&&Boolean(_0x253df4);}}class yt extends _0x14e675{['_step'];constructor(_0x26848b,{direction:_0x5be19b}){super(_0x26848b);const _0x1d3869=_0x26848b['plugins']['get'](d);this['affectsData']=!0x1,this['_step']='forward'===_0x5be19b?0x1:-0x1,this['listenTo'](_0x1d3869,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x1d3869,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x1d3869,'change:activeChange',()=>this['refresh']());}['execute'](){const _0xb8b9a3=this['editor'],_0x525b24=_0xb8b9a3['plugins']['get'](d),{isNavigationMode:_0x103b38,currentChangeNumber:_0x245ea3}=_0x525b24;let _0x37eeec;if(_0x525b24['activeChange']=_0x103b38?_0x525b24['diff']['changes']['get'](_0x245ea3+this['_step']):_0x525b24['diff']['changes']['first'],_0x525b24['activeChange']['data']['isOnRoot'])_0x37eeec=_0xb8b9a3['editing']['view']['getDomRoot'](_0x525b24['activeChange']['rootName']);else{const _0x912e10=_0xb8b9a3['model']['markers']['get']('revision:'+_0x525b24['activeChange']['id']);_0x37eeec=_0x6880b8(_0xb8b9a3['editing'],_0x912e10);}_0x356aef({'target':_0x37eeec,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x67fb95,currentChangeNumber:_0x1f07ae,numberOfChanges:_0x341d58,isReady:_0x434b20,isEnabled:_0x3f1188}=this['editor']['plugins']['get'](d);this['isEnabled']=!!(_0x3f1188&&_0x434b20&&_0x341d58)&&(!_0x67fb95||(0x1===this['_step']?_0x1f07ae<_0x341d58-0x1:_0x1f07ae>0x0));}}class li extends _0x572c6d{constructor(_0x507ed4){super(_0x507ed4);const _0x193f32=this['bindTemplate'],_0x257a46=new _0x5c9eb1(_0x507ed4),_0x39f083=new _0x5c9eb1(_0x507ed4);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',(_0x5ea07f,_0x24d14b)=>_0x5ea07f&&_0x24d14b>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x3bf618,_0x39a306,_0x4fe6c4,_0x36e836)=>{if(!_0x3bf618)return m(_0x507ed4,'Loading...');if(!_0x4fe6c4)return m(_0x507ed4,'No\x20changes');const _0x432fab=m(_0x507ed4,'NUMBER_OF_CHANGES',_0x4fe6c4);return _0x36e836?m(_0x507ed4,'X_OF_Y_CHANGES',[_0x39a306+0x1,_0x4fe6c4]):_0x432fab;}),_0x257a46['set']({'label':m(_0x507ed4,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x2a850c}),_0x39f083['set']({'label':m(_0x507ed4,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x541ed3}),_0x257a46['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x39f083['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x257a46['on']('execute',()=>this['fire']('execute','backward')),_0x39f083['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',_0x193f32['if']('_isStatusLabelVisible','ck-hidden',_0xba71f8=>!_0xba71f8)]},'children':[{'text':_0x193f32['to']('isNavigationMode',_0x5e93e7=>_0x5e93e7?m(_0x507ed4,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x507ed4,'Total')+':\x20')}]},{'text':_0x193f32['to']('_statusText')}]},new _0x54b919(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x257a46,_0x39f083]}]});}}const ce='ck-editor__editable__loading-overlay';class le extends _0x6878ef{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x1689f2=this['editor']['editing']['view'];_0x1689f2['change'](_0x254492=>{for(const _0x38103c of _0x1689f2['document']['roots'])_0x254492['addClass'](ce,_0x38103c);});}['hide'](){const _0x887147=this['editor']['editing']['view'];_0x887147['change'](_0x48a393=>{for(const _0x33845f of _0x887147['document']['roots'])_0x48a393['removeClass'](ce,_0x33845f);});}}class w extends _0x6878ef{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d,le];}['init'](){const _0xcc99c1=this['editor'],_0x14ac5e=_0xcc99c1['plugins']['get'](d),_0x2b5833=_0xcc99c1['plugins']['get'](le);_0xcc99c1['ui']['componentFactory']['add']('exitToEditing',_0x8bf7d4=>{const _0x536060=new _0x5c9eb1(_0x8bf7d4);return _0x536060['set']({'label':m(_0x8bf7d4,'Back\x20to\x20editing'),'icon':_0x52efde,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x536060,'execute',()=>{_0xcc99c1['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x536060;}),_0xcc99c1['ui']['componentFactory']['add']('restoreRevision',_0x1c3f88=>{const _0x3c3a53=new _0x5c9eb1(_0x1c3f88);return _0x3c3a53['set']({'label':m(_0x1c3f88,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x3c3a53['bind']('isEnabled')['to'](_0xcc99c1['commands']['get']('restoreRevision')),this['listenTo'](_0x3c3a53,'execute',()=>_0xcc99c1['execute']('restoreRevision')),_0x3c3a53;}),_0xcc99c1['ui']['componentFactory']['add']('changesNavigation',_0x4c8e70=>{const _0x53969a=new li(_0x4c8e70),_0x35ec73=_0xcc99c1['commands']['get']('showPreviousChange'),_0x2d4a3f=_0xcc99c1['commands']['get']('showNextChange');return _0x53969a['bind']('isBackwardNavigationEnabled')['to'](_0x35ec73,'isEnabled'),_0x53969a['bind']('isForwardNavigationEnabled')['to'](_0x2d4a3f,'isEnabled'),_0x53969a['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x14ac5e),this['listenTo'](_0x53969a,'execute',(_0x5dc04f,_0x44d981)=>{_0xcc99c1['execute']('forward'===_0x44d981?'showNextChange':'showPreviousChange');}),_0x53969a;}),_0x2b5833['show'](),_0x14ac5e['on']('change:isReady',(_0x3cb403,_0x4572b1,_0x3b55d0)=>{_0x3b55d0?_0x2b5833['hide']():_0x2b5833['show']();});}}class mt extends at{['_resizeObserver']=null;constructor(_0x2ff11c,_0x227fc5){super(_0x2ff11c,_0x227fc5);const _0x44199f=this['bindTemplate'];this['set']({'label':m(_0x2ff11c,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x2ff11c,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x44199f['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new pt(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0xf42e39=this['fieldView']['element'];this['_tooltipString']=_0xf42e39['scrollWidth']>_0xf42e39['clientWidth']&&_0xf42e39['value']||'';}}class oi extends _0x572c6d{constructor(_0x272914,_0x1118bb,_0x3ff8a3){super(_0x272914);const _0x28e343=new _0x3c8e1e();_0x28e343['set']({'content':_0x4828a2,'viewBox':'0\x200\x2011\x2010'});const _0x40aefb=['ck','ck-revision-history-sidebar__revision-author'];_0x3ff8a3&&_0x40aefb['push']('ck-revision-history-sidebar__revision-author_creator');const _0x2caa2c=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x272914,_0x3ff8a3?'Revision\x20creator':'Revision\x20author')},'children':[_0x28e343,_0x1118bb['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x40aefb},'children':_0x2caa2c});}}function ni(_0x2e49da,_0x5aed8f){const _0x54bdbe=_0x2e49da['bindTemplate'],_0x4b06db=_0x2e49da['locale'],_0x78e39d=_0xef6b9b(_0x4b06db);_0x78e39d['panelPosition']='sw';const _0x27609b=function(_0x150937,_0x24c548){const _0x43971f=function(_0x547edc,_0x5c2562){const _0x1edee6=_0x547edc['locale'],_0x396af9={'Compare\x20against\x20selected':m(_0x1edee6,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x1edee6,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x1edee6,'Restore\x20this\x20revision')};return _0x5c2562['map'](_0x45e58f=>{const _0x1f06ea=_0x396af9[_0x45e58f['name']];return _0x1f06ea&&_0x1f06ea!==_0x45e58f['name']&&(_0x45e58f['name']=_0x1f06ea),_0x45e58f;});}(_0x150937,_0x24c548),_0x4e73ac=new _0x12f74d();for(const _0x5cf8c2 of _0x43971f){const _0x56d46c={'type':'button','model':new to({'label':_0x5cf8c2['name'],'class':_0x5cf8c2['class'],'withText':!0x0,'role':'menuitem','_action':_0x5cf8c2['action']})};_0x56d46c['model']['bind']('isEnabled')['to'](_0x150937,'isActionsDropdownOpen',_0x20d485=>'function'!=typeof _0x5cf8c2['isEnabled']||(!_0x20d485||_0x5cf8c2['isEnabled'](_0x150937))),_0x4e73ac['add'](_0x56d46c);}return _0x4e73ac;}(_0x2e49da,_0x5aed8f);return _0x2e49da['bind']('isActionsDropdownOpen')['to'](_0x78e39d,'isOpen'),_0x78e39d['buttonView']['set']({'label':m(_0x4b06db,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x49d23b}),_0x78e39d['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x54bdbe['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x54bdbe['to'](_0x1b2798=>_0x1b2798['stopPropagation']())}}),_0x78e39d['on']('execute',_0x456692=>{_0x2e49da['isReady']&&'function'==typeof _0x456692['source']['_action']&&_0x456692['source']['_action'](_0x2e49da);}),_0x3dccd9(_0x78e39d,_0x27609b,{'role':'menu'}),_0x78e39d['listenTo'](_0x2e49da,'change:isActionsDropdownOpen',(_0x427f95,_0x2f1e47,_0x5a607d)=>{if(_0x5a607d)for(const _0x4c2225 of _0x78e39d['listView']['items']){const _0x467ac7=_0x4c2225['children']['first'],_0x55826a=_0x5aed8f['find'](_0x1df2a7=>_0x1df2a7['action']===_0x467ac7['_action'])['isVisible'];_0x4c2225['isVisible']=void 0x0===_0x55826a||_0x55826a(_0x2e49da);}}),_0x78e39d;}class ai extends/* #__PURE__ -- @preserve */
26
+ _0x26fcc7(_0x572c6d){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x23254e,_0x47a22f,_0x5be9ab,_0x6bb04f){super(_0x23254e);const _0x393159=this['bindTemplate'],_0x49bdbc=function(_0x460d44,_0x29c85c){const _0x121b57=Array['from'](_0x29c85c['authors'])['filter'](_0x2ff8fc=>_0x2ff8fc!=_0x29c85c['creator']);return _0x29c85c['creator']&&_0x121b57['unshift'](_0x29c85c['creator']),_0x121b57['map'](_0x5e5f98=>new oi(_0x460d44,_0x5e5f98,_0x5e5f98==_0x29c85c['creator']));}(_0x23254e,_0x47a22f);this['id']=_0x47a22f['id'],this['_revision']=_0x47a22f,this['_requireRevisionName']=_0x6bb04f,this['bind']('name','createdAt')['to'](_0x47a22f),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x56f0e3=>{return _0x4800f5=_0x23254e['uiLanguage'],(_0x108a3a=_0x56f0e3)['toLocaleDateString'](_0x4800f5,{'month':'long','day':'numeric'})+',\x20'+_0x108a3a['toLocaleTimeString'](_0x4800f5,{'hour':'numeric','minute':'numeric'});var _0x4800f5,_0x108a3a;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new mt(_0x23254e,ti),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x487fd3=>_0x487fd3||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x2c2ab5,_0x35a011)=>_0x2c2ab5&&_0x35a011),this['revisionActionsView']=_0x5be9ab&&_0x5be9ab['length']?ni(this,_0x5be9ab):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x393159['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x393159['if']('isEnabled','ck-disabled',_0x57e901=>!_0x57e901),_0x393159['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x393159['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x393159['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':_0x393159['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':_0x49bdbc}]},this['revisionActionsView']],'on':{'click':_0x393159['to'](_0x1c69b0=>{_0x1c69b0['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x117841=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x117841,'change',()=>{this['_requireRevisionName']&&!_0x117841['value']||this['fire']('setName',{'id':this['id'],'name':_0x117841['value']}),_0x117841['value']||(_0x117841['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function mi(_0x33e837,_0x54532d){const _0x2c0647=_0x1e67d1['fromJSDate'](_0x33e837)['setLocale'](_0x54532d),_0x3ccfe1=_0x1e67d1['local'](),_0x1e79b7=_0x3ccfe1['minus']({'days':0x1})['startOf']('day');let _0x3f081a,_0xf4d0;return _0x2c0647['hasSame'](_0x3ccfe1,'day')?(_0x3f081a=_0x2c0647['startOf']('day')['toJSDate'](),_0xf4d0=_0x2c0647['toRelativeCalendar']()):_0x2c0647['hasSame'](_0x1e79b7,'day')?(_0x3f081a=_0x1e79b7['toJSDate'](),_0xf4d0=_0x2c0647['toRelativeCalendar']()):_0x2c0647['hasSame'](_0x3ccfe1,'week')?(_0x3f081a=_0x2c0647['startOf']('week')['toJSDate'](),_0xf4d0=_0x2c0647['weekdayLong']||''):_0x2c0647['hasSame'](_0x3ccfe1,'year')?(_0x3f081a=_0x2c0647['startOf']('month')['toJSDate'](),_0xf4d0=_0x2c0647['monthLong']||''):(_0x3f081a=_0x2c0647['startOf']('year')['toJSDate'](),_0xf4d0=String(_0x2c0647['year'])),{'startDate':_0x3f081a,'localizedPeriodName':_0xf4d0};}class _i extends _0x572c6d{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x40eeba,_0x1cab9f,_0x4f4de8,_0x2f1f85){super(_0x40eeba);const _0x4ece03=mi(_0x1cab9f,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x1cab9f,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x4f4de8,this['_requireRevisionName']=_0x2f1f85,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':_0x4ece03}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x1e1348){const _0x1357c6=new ai(this['locale'],_0x1e1348,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x1357c6);}['removeRevision'](_0x1492de){const _0x26fd8a=this['revisionViews']['find'](_0x41f9c2=>_0x41f9c2['id']===_0x1492de['id']);this['revisionViews']['remove'](_0x26fd8a);}}class as extends _0x572c6d{constructor(_0xac5ec3){super(_0xac5ec3);const _0x2e4579=new _0x3c8e1e();_0x2e4579['content']=_0x3427a3,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x2e4579,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[m(_0xac5ec3,'Revision\x20history')]}]});}}class vi extends _0x572c6d{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x818dd4,_0x58fc2c,_0x43e62c,_0x277d60){super(_0x818dd4);const _0x3f72bb=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x58fc2c,this['_revisionActions']=_0x43e62c,this['_requireRevisionName']=_0x277d60,this['on']('select',(_0x3dd995,_0x26605b)=>{this['fire']('revisionSelected',_0x26605b);}),this['on']('setName',(_0x5643b3,_0x23fe5f)=>{this['fire']('revisionSetName',_0x23fe5f);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new as(_0x818dd4),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x3f72bb['if']('isEnabled','ck-disabled',_0x35bc3f=>!_0x35bc3f)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x448c42 of this['_revisions'])this['_addRevision'](_0x448c42);this['_revisions']['on']('add',(_0x36616a,_0x10ff62)=>{this['_addRevision'](_0x10ff62);}),this['_revisions']['on']('remove',(_0x5dbfc0,_0x7bf6ce)=>{this['_removeRevision'](_0x7bf6ce);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x50bdd2=>_0x50bdd2['revisionViews']['map'](_0x5439b1=>_0x5439b1))['flat']();}['selectRevision'](_0xe90fb9){for(const _0x595cb6 of this['revisionViews'])_0xe90fb9&&_0xe90fb9['id']===_0x595cb6['id']?_0x595cb6['select']():_0x595cb6['deselect']();}['highlightRevisions'](_0x109ff5){for(const _0x24c688 of this['revisionViews'])_0x109ff5['some'](({id:_0xe734c3})=>_0xe734c3===_0x24c688['id'])?_0x24c688['highlight']():_0x24c688['unhighlight']();}['_addRevision'](_0x53c5f1){const _0x5948e0=mi(_0x53c5f1['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x513650=this['timePeriodViews']['get'](0x0);_0x513650&&_0x513650['startDate']['getTime']()===_0x5948e0['getTime']()||(_0x513650=new _i(this['locale'],_0x5948e0,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x513650)),_0x513650['addRevision'](_0x53c5f1);}['_removeRevision'](_0x49e7ee){const _0x3468cc=mi(_0x49e7ee['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x3468cc)['removeRevision'](_0x49e7ee);}['_getTimePeriodViewByStartDate'](_0x5134c3){return this['timePeriodViews']['find'](_0x47a3d5=>_0x47a3d5['startDate']['getTime']()===_0x5134c3['getTime']());}}class g extends _0x6878ef{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
27
27
  ((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
28
- bt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d];}constructor(_0x3ae2f4){super(_0x3ae2f4),this['_revisionViewer']=_0x3ae2f4['plugins']['get'](d),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x5d8a97=this['_revisionsRepository']['_revisions'],_0x4e9bff=this['_createRevisionActions'](),_0xfc0240=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new ci(this['editor']['locale'],_0x5d8a97,_0x4e9bff,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',(_0x1e0c6d,_0x216c3e)=>{_0x216c3e['revisionViews']['on']('add',(_0x18a833,_0x208511)=>{_0x208511['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)),_0xfc0240['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x476f8b=this['_revisionsRepository']['getRevision'](0x0);if(_0x476f8b){const _0x12a7e6=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x476f8b['id']);this['_revisionViewer']['compare'](_0x476f8b,_0x12a7e6);}}['_handleRevisionSelected'](_0x57ea53,_0x1686ed){const _0x47c71b=this['_revisionsRepository']['getRevision'](_0x1686ed['id']),_0x464e3f=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x47c71b['id']);this['_revisionViewer']['compare'](_0x47c71b,_0x464e3f);}['_handleRevisionSetName'](_0x222b29,_0x2710e0){this['_revisionsRepository']['getRevision'](_0x2710e0['id'])['setName'](_0x2710e0['name']);}['_handleDiffChange'](_0x310d73,_0x8e49d2,_0x575139){const _0x496801=this['_revisionsRepository']['getRevisionsInDiff'](_0x575139);_0x496801['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x496801),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x496801[0x0]));}['_createRevisionActions'](){const _0x373fd0=this['editor'],_0x5b0ae7=w['availableRevisionActions'],_0x5d7979=_0x373fd0['config']['get']('revisionHistory.revisionActions')||w['defaultRevisionActions'];if(_0x5d7979['length'])return _0x5d7979['map'](_0x5a098e=>{const _0x434869='string'==typeof _0x5a098e?Object['assign']({},_0x5b0ae7[_0x5a098e]):_0x5a098e;return _0x434869['action']=_0x434869['action']['bind'](this,_0x373fd0),_0x434869['isVisible']&&(_0x434869['isVisible']=_0x434869['isVisible']['bind'](this,_0x373fd0)),_0x434869;});}}function bt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x37a271},_0x20ec5e)=>{const _0x4cfd25=_0x37a271['get'](d),_0x553811=_0x4cfd25['repository'];let _0x4b8696=_0x4cfd25['diff']['newRevisionId'],_0x342d7b=_0x20ec5e['id'];_0x553811['getIndex'](_0x4b8696)>_0x553811['getIndex'](_0x342d7b)&&([_0x4b8696,_0x342d7b]=[_0x342d7b,_0x4b8696]),_0x4cfd25['compare'](_0x4b8696,_0x342d7b);},'isVisible':({plugins:_0x500980},_0x22c193)=>{const _0x1830d4=_0x500980['get'](d);return!(_0x1830d4['repository']['getRevisionsInDiff'](_0x1830d4['diff'])['length']>0x2)&&!_0x22c193['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x271a3e,{id:_0x5fcbce})=>{_0x271a3e['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x5fcbce);},'isVisible':({plugins:_0x511d3e},_0x1d7e5c)=>!!_0x511d3e['get'](d)['repository']['getLaterVisibleRevision'](_0x1d7e5c['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x4cdec1},{id:_0x1bec4e,revisionNameView:_0x1efc2a})=>{const _0x575b36=_0x4cdec1['get'](d),_0x14d61d=_0x575b36['repository']['getEarlierVisibleRevision'](_0x1bec4e);_0x575b36['compare'](_0x1bec4e,_0x14d61d),_0x1efc2a['focus'](),_0x1efc2a['fieldView']['select']();}}};}class rt extends st{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x200ad0,_0x407e0e){super(_0x200ad0),this['_view']=_0x407e0e,this['_toolbarConfig']=ot(_0x200ad0['config']['get']('toolbar')),this['_elementReplacer']=new ht();}get['element'](){return this['view']['element'];}['init'](_0x319a94){const _0x260a91=this['editor'],_0x379465=this['view'],_0x271e07=_0x260a91['editing']['view'],_0x2b178b=_0x379465['editable'],_0x47d4a7=_0x271e07['document']['getRoot']();_0x2b178b['name']=_0x47d4a7['rootName'],_0x379465['render']();const _0xe78778=_0x2b178b['element'];this['setEditableElement'](_0x2b178b['name'],_0xe78778),_0x379465['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x271e07['attachDomRoot'](_0xe78778),this['_elementReplacer']['replace'](_0x319a94,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x23d0b9=this['view'],_0x4f9bd7=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x4f9bd7['detachDomRoot'](_0x23d0b9['editable']['name']),_0x23d0b9['destroy']();}['_initToolbar'](){const _0x1881cc=this['view'];_0x1881cc['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x1881cc['stickyPanel']['limiterElement']=_0x1881cc['element'],_0x1881cc['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x5ef61c})=>_0x5ef61c),_0x1881cc['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x1881cc['toolbar']);}}class et extends ct{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x3fede1,_0x19f5c2,_0x28f6cf={}){super(_0x3fede1),this['stickyPanel']=new ut(_0x3fede1),this['toolbar']=new lt(_0x3fede1,{'shouldGroupWhenFull':_0x28f6cf['shouldToolbarGroupWhenFull']}),this['_editable']=new dt(_0x3fede1,_0x19f5c2);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class R extends/* #__PURE__ -- @preserve */
29
- it(tt){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x34f31c,_0x4a9b20){super(_0x4a9b20),this['sourceElement']=_0x34f31c,this['model']['document']['createRoot']();const _0x538e6e=new et(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new rt(this,_0x538e6e);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x3c4b33,_0x4351e1){const _0x5eebc6=new this(_0x3c4b33,_0x4351e1);return await _0x5eebc6['initPlugins'](),await _0x5eebc6['ui']['init'](_0x3c4b33),await _0x5eebc6['data']['init'](_0x5eebc6['config']['get']('initialData')||''),_0x5eebc6['fire']('ready'),_0x5eebc6;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class Rt extends _0x21f9a0{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2899f0){function _0x3ade81(_0x2f66ae){return _0x2f66ae['map'](_0x30c840=>String['fromCharCode'](_0x30c840))['join']('');}super(_0x2899f0),this['result']='end',_0x2899f0[_0x3ade81([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3ade81([0x76,0x69,0x65,0x77])][_0x3ade81([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3ade81([0x61,0x75,0x74,0x6f]),_0x2899f0[_0x3ade81([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x3ade81([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3ade81([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x3ade81([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x3ade81([0x6f,0x6b])});}}class k extends _0x21f9a0{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l,u];}constructor(_0x528228){if(super(_0x528228),!this['editor']['config']['get']('revisionHistory'))throw new _0x3a4067('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x442518=>this['_showRevisionViewer']({..._0x442518,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x2b29d0=>this['_closeRevisionViewer'](_0x2b29d0)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x50c8bc=>this['_restoreRevision'](_0x50c8bc)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x542e51){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x542e51;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x13c6c3){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x13c6c3);}['getRevision'](_0x1c10ba){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x1c10ba);}['getRevisions'](_0x302707){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x302707||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x31411a=this['editor'],_0x35b9e4=_0x31b91b(_0x31411a,p),_0x58298c=_0x31411a['plugins']['get']('RevisionTracker'),_0x379420=_0x31411a['plugins']['get']('Users')['users'];return _0x35b9e4['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x35b9e4['lazyRoots'],(_0x35b9e4['plugins']['push'](Rt,d,g,class extends _0x21f9a0{static get['requires'](){return[d,'Users'];}['init'](){const _0x3f23f5=this['editor']['plugins']['get']('Users');for(const _0x1bcb85 of _0x379420)_0x1bcb85['isAnonymous']||_0x3f23f5['getUser'](_0x1bcb85['id'])||_0x3f23f5['addUser'](_0x1bcb85);const _0x6ca20d=_0x58298c['repository']['getRevisions']();let _0x50446e=null;const _0x9829f4=this['editor']['plugins']['get']('RevisionViewer');_0x9829f4['adapter']=_0x58298c['adapter'],_0x9829f4['bind']('isEnabled')['to'](_0x58298c),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x31411a,'isReadOnly',_0x25aacf=>!_0x25aacf);for(const _0x11593c of _0x6ca20d){const _0x1ec9cc=null===_0x11593c['creator'];if(_0x1ec9cc&&_0x11593c['toVersion']===_0x11593c['fromVersion'])continue;const _0x203344=_0x11593c['toJSON']();_0x9829f4['addRevisionData'](_0x203344,(_0x1bb155,_0x404b44,_0x5a92c1)=>{if(_0x1ec9cc){if(_0x50446e)_0x50446e['_update'](_0x1bb155,_0x404b44);else{if(!_0x404b44){const _0x4d8580=_0x5a92c1['toJSON']();_0x4d8580['id']=_0x2afce3(),_0x58298c['saveRevision'](_0x4d8580,_0x5a92c1['toVersion'])['then'](_0x4b52e9=>{_0x50446e=_0x4b52e9;});}}}else _0x11593c['_update'](_0x1bb155,_0x404b44);});}}},w),_0x35b9e4);}['_enhanceShowRevisionViewerCallback'](){const _0x30139c=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x2e7145=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x5872e8=this['editor']['plugins']['get']('Autosave');await _0x5872e8['save']();}else await _0x2e7145['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x3f76c=this['editor']['plugins']['get']('Dialog');_0x3f76c['isOpen']&&_0x3f76c['hide']();}const _0x35fb5c=this['_getRevisionViewerEditorConfig']();return _0x30139c(_0x35fb5c)['then'](_0x4d91a8=>{return(this['_viewerEditor']=_0x4d91a8,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),_0x4d91a8;})['catch'](_0x2ff44c=>(console['error'](_0x2ff44c),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x1aa371=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x1aa371(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x37ebec=this['editor']['plugins']['get']('Annotations');_0x37ebec['refreshVisibility'](),_0x37ebec['refreshPositioning']();}})));}['_showRevisionViewer'](_0x56e645){const _0x5a9826=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x535b4c=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x2ff545=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return R['create'](_0x2ff545,_0x56e645)['then'](_0x42ff8d=>(_0x535b4c['style']['display']='block',_0x5a9826['style']['display']='none',_0x42ff8d));}['_closeRevisionViewer'](_0x476267){const _0x431080=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x431080['style']['display']='',_0x476267['destroy']();}async['_restoreRevision'](_0x3320ad){const _0x46da23=this['editor'],_0x31049a=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x47e46b=_0x46da23['plugins']['get']('RevisionTracker'),_0x4c0db2=_0x31049a['repository']['getRevision'](_0x3320ad);let _0x56cdaf,_0x21e0c3,_0xa7a075;try{_0x56cdaf=await _0x31049a['getRevisionData'](_0x4c0db2),_0x21e0c3=await _0x31049a['getRevisionRootsAttributes'](_0x4c0db2);}catch(_0x1e775a){return void console['error'](_0x1e775a);}_0x46da23['model']['change'](_0x5f0265=>{for(const _0x380e1a of Array['from'](_0x46da23['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x5f0265['removeMarker'](_0x380e1a);}),_0x31049a['isReady']=!0x1,_0x46da23['model']['enqueueChange'](_0x317c71=>{_0x317c71['setSelection'](null),_0x317c71['removeSelectionAttribute'](_0x46da23['model']['document']['selection']['getAttributeKeys']());const _0x3e1fa2=Object['keys'](_0x56cdaf);for(const _0x50e6a0 of _0x46da23['model']['document']['roots'])'$graveyard'!=_0x50e6a0['rootName']&&_0x50e6a0['isAttached']()&&!_0x3e1fa2['includes'](_0x50e6a0['rootName'])&&_0x317c71['detachRoot'](_0x50e6a0);for(const _0x46c097 of _0x3e1fa2){let _0x4f46a5=_0x46da23['model']['document']['getRoot'](_0x46c097);_0x4f46a5&&_0x4f46a5['isAttached']()||(_0x4f46a5=_0x317c71['addRoot'](_0x46c097));const _0x55d62c=_0x21e0c3[_0x46c097],_0x5ed653=Object['keys'](_0x55d62c),_0x4a9f4c=_0x56cdaf[_0x46c097];for(const _0x3ab991 of _0x4f46a5['getAttributeKeys']())_0x5ed653['includes'](_0x3ab991)||_0x317c71['removeAttribute'](_0x3ab991,_0x4f46a5);for(const _0x33a390 of _0x5ed653)_0x317c71['setAttribute'](_0x33a390,_0x21e0c3[_0x46c097][_0x33a390],_0x4f46a5);_0x317c71['remove'](_0x317c71['createRangeIn'](_0x4f46a5)),_0x317c71['insert'](_0x46da23['data']['parse'](_0x4a9f4c,_0x4f46a5),_0x4f46a5,0x0);}});const _0x20dc47=m(_0x46da23['locale'],'Restored');if(_0x4c0db2['name'])_0xa7a075=-0x1==_0x4c0db2['name']['indexOf'](_0x20dc47)?_0x20dc47+':\x20'+_0x4c0db2['name']:_0x4c0db2['name'];else _0xa7a075=_0x20dc47+':\x20'+(_0x4c0db2['createdAt']['toLocaleDateString'](_0x46da23['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x4c0db2['createdAt']['toLocaleTimeString'](_0x46da23['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x47e46b['saveRevision']({'name':_0xa7a075}),_0x31049a['isReady']=!0x0,_0x46da23['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{a as Revision,k as RevisionHistory,u as RevisionHistoryUI,l as RevisionTracker,d as RevisionViewer,le as RevisionViewerLoadingOverlay,g as RevisionViewerUI,j as RevisionsRepository,w as RevisionsSidebar};
28
+ bt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d];}constructor(_0x1aac90){super(_0x1aac90),this['_revisionViewer']=_0x1aac90['plugins']['get'](d),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x5d3405=this['_revisionsRepository']['_revisions'],_0x171fbc=this['_createRevisionActions'](),_0xebe0cc=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new vi(this['editor']['locale'],_0x5d3405,_0x171fbc,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',(_0x41ee38,_0x1c4a69)=>{_0x1c4a69['revisionViews']['on']('add',(_0x50bce3,_0x58e827)=>{_0x58e827['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)),_0xebe0cc['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x220ef5=this['_revisionsRepository']['getRevision'](0x0);if(_0x220ef5){const _0x1346b6=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x220ef5['id']);this['_revisionViewer']['compare'](_0x220ef5,_0x1346b6);}}['_handleRevisionSelected'](_0x40218f,_0x532915){const _0x51afcd=this['_revisionsRepository']['getRevision'](_0x532915['id']),_0x525511=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x51afcd['id']);this['_revisionViewer']['compare'](_0x51afcd,_0x525511);}['_handleRevisionSetName'](_0x3cdc0a,_0x2ee554){this['_revisionsRepository']['getRevision'](_0x2ee554['id'])['setName'](_0x2ee554['name']);}['_handleDiffChange'](_0x9cb695,_0x47c6cc,_0x483ad8){const _0x3e6628=this['_revisionsRepository']['getRevisionsInDiff'](_0x483ad8);_0x3e6628['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x3e6628),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x3e6628[0x0]));}['_createRevisionActions'](){const _0x377e9e=this['editor'],_0xb36ff3=g['availableRevisionActions'],_0x21907b=_0x377e9e['config']['get']('revisionHistory.revisionActions')||g['defaultRevisionActions'];if(_0x21907b['length'])return _0x21907b['map'](_0x360fe9=>{const _0x492c94='string'==typeof _0x360fe9?Object['assign']({},_0xb36ff3[_0x360fe9]):_0x360fe9;return _0x492c94['action']=_0x492c94['action']['bind'](this,_0x377e9e),_0x492c94['isVisible']&&(_0x492c94['isVisible']=_0x492c94['isVisible']['bind'](this,_0x377e9e)),_0x492c94;});}}function bt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x52aebf},_0x2ce8b2)=>{const _0x2c8822=_0x52aebf['get'](d),_0x40df2b=_0x2c8822['repository'];let _0x51ac1d=_0x2c8822['diff']['newRevisionId'],_0x361c10=_0x2ce8b2['id'];_0x40df2b['getIndex'](_0x51ac1d)>_0x40df2b['getIndex'](_0x361c10)&&([_0x51ac1d,_0x361c10]=[_0x361c10,_0x51ac1d]),_0x2c8822['compare'](_0x51ac1d,_0x361c10);},'isVisible':({plugins:_0x8c6779},_0x1ace09)=>{const _0x2050bd=_0x8c6779['get'](d);return!(_0x2050bd['repository']['getRevisionsInDiff'](_0x2050bd['diff'])['length']>0x2)&&!_0x1ace09['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x5c3ace,{id:_0x2a1cf0})=>{_0x5c3ace['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x2a1cf0);},'isVisible':({plugins:_0x37a508},_0x1b0820)=>!!_0x37a508['get'](d)['repository']['getLaterVisibleRevision'](_0x1b0820['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x5881a5},{id:_0x7b69fc,revisionNameView:_0x56814c})=>{const _0x6da884=_0x5881a5['get'](d),_0xabf031=_0x6da884['repository']['getEarlierVisibleRevision'](_0x7b69fc);_0x6da884['compare'](_0x7b69fc,_0xabf031),_0x56814c['focus'](),_0x56814c['fieldView']['select']();}}};}class rt extends st{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x56daa9,_0x3797ad){super(_0x56daa9),this['_view']=_0x3797ad,this['_toolbarConfig']=ot(_0x56daa9['config']['get']('toolbar')),this['_elementReplacer']=new ht();}get['element'](){return this['view']['element'];}['init'](_0x3acd0b){const _0x3d330f=this['editor'],_0xfc03b1=this['view'],_0xd690ce=_0x3d330f['editing']['view'],_0x3ab298=_0xfc03b1['editable'],_0x5418b6=_0xd690ce['document']['getRoot']();_0x3ab298['name']=_0x5418b6['rootName'],_0xfc03b1['render']();const _0x18e9a3=_0x3ab298['element'];this['setEditableElement'](_0x3ab298['name'],_0x18e9a3),_0xfc03b1['editable']['bind']('isFocused')['to'](this['focusTracker']),_0xd690ce['attachDomRoot'](_0x18e9a3),this['_elementReplacer']['replace'](_0x3acd0b,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x3def78=this['view'],_0x12af15=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x12af15['detachDomRoot'](_0x3def78['editable']['name']),_0x3def78['destroy']();}['_initToolbar'](){const _0x4dbe71=this['view'];_0x4dbe71['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x4dbe71['stickyPanel']['limiterElement']=_0x4dbe71['element'],_0x4dbe71['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x5c8dfd})=>_0x5c8dfd),_0x4dbe71['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x4dbe71['toolbar']);}}class et extends ct{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x443f9b,_0x113704,_0x2f90c5={}){super(_0x443f9b),this['stickyPanel']=new lt(_0x443f9b),this['toolbar']=new nt(_0x443f9b,{'shouldGroupWhenFull':_0x2f90c5['shouldToolbarGroupWhenFull']}),this['_editable']=new dt(_0x443f9b,_0x113704);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class R extends/* #__PURE__ -- @preserve */
29
+ it(tt){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x5ca13a,_0x5b53e4){super(_0x5b53e4),this['sourceElement']=_0x5ca13a,this['model']['document']['createRoot']();const _0x3308d6=new et(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new rt(this,_0x3308d6);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x2ac6d2,_0x5f3f73){const _0xc18cdb=new this(_0x2ac6d2,_0x5f3f73);return await _0xc18cdb['initPlugins'](),await _0xc18cdb['ui']['init'](_0x2ac6d2),await _0xc18cdb['data']['init'](_0xc18cdb['config']['get']('initialData')||''),_0xc18cdb['fire']('ready'),_0xc18cdb;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class Rt extends _0x6878ef{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x19a47e){function _0x3bb61e(_0x192fe3){return _0x192fe3['map'](_0x191bd2=>String['fromCharCode'](_0x191bd2))['join']('');}super(_0x19a47e),this['result']='end',_0x19a47e[_0x3bb61e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3bb61e([0x76,0x69,0x65,0x77])][_0x3bb61e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3bb61e([0x61,0x75,0x74,0x6f]),_0x19a47e[_0x3bb61e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x3bb61e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3bb61e([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x3bb61e([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x3bb61e([0x6f,0x6b])});}}class k extends _0x6878ef{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,f];}constructor(_0x427c5d){if(super(_0x427c5d),!this['editor']['config']['get']('revisionHistory'))throw new _0x9e8044('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x108415=>this['_showRevisionViewer']({..._0x108415,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x546ac8=>this['_closeRevisionViewer'](_0x546ac8)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x1f4f88=>this['_restoreRevision'](_0x1f4f88)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x1bf068){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x1bf068;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x417f15){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x417f15);}['getRevision'](_0xa3a27f){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0xa3a27f);}['getRevisions'](_0x4cac1a){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x4cac1a||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x193f79=this['editor'],_0x2dffcf=_0x4d6844(_0x193f79,p),_0x4326d6=_0x193f79['plugins']['get']('RevisionTracker'),_0x4c9ad5=_0x193f79['plugins']['get']('Users')['users'];return _0x2dffcf['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x2dffcf['lazyRoots'],(_0x2dffcf['plugins']['push'](Rt,d,w,class extends _0x6878ef{static get['requires'](){return[d,'Users'];}['init'](){const _0x356156=this['editor']['plugins']['get']('Users');for(const _0x2730e3 of _0x4c9ad5)_0x2730e3['isAnonymous']||_0x356156['getUser'](_0x2730e3['id'])||_0x356156['addUser'](_0x2730e3);const _0x510986=_0x4326d6['repository']['getRevisions']();let _0x59cbfb=null;const _0x557cd9=this['editor']['plugins']['get']('RevisionViewer');_0x557cd9['adapter']=_0x4326d6['adapter'],_0x557cd9['bind']('isEnabled')['to'](_0x4326d6),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x193f79,'isReadOnly',_0x2786cf=>!_0x2786cf);for(const _0x3da0d2 of _0x510986){const _0x5c60a3=null===_0x3da0d2['creator'];if(_0x5c60a3&&_0x3da0d2['toVersion']===_0x3da0d2['fromVersion'])continue;const _0x530122=_0x3da0d2['toJSON']();_0x557cd9['addRevisionData'](_0x530122,(_0x1b0254,_0x5e375d,_0x5f1bfd)=>{if(_0x5c60a3){if(_0x59cbfb)_0x59cbfb['_update'](_0x1b0254,_0x5e375d);else{if(!_0x5e375d){const _0x2ff5cd=_0x5f1bfd['toJSON']();_0x2ff5cd['id']=_0x3facc5(),_0x4326d6['saveRevision'](_0x2ff5cd,_0x5f1bfd['toVersion'])['then'](_0x30e61a=>{_0x59cbfb=_0x30e61a;});}}}else _0x3da0d2['_update'](_0x1b0254,_0x5e375d);});}}},g),_0x2dffcf);}['_enhanceShowRevisionViewerCallback'](){const _0x189de4=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x11f226=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x793fc6=this['editor']['plugins']['get']('Autosave');await _0x793fc6['save']();}else await _0x11f226['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x4e6aa1=this['editor']['plugins']['get']('Dialog');_0x4e6aa1['isOpen']&&_0x4e6aa1['hide']();}const _0x350c7=this['_getRevisionViewerEditorConfig']();return _0x189de4(_0x350c7)['then'](_0x51f7dc=>{return(this['_viewerEditor']=_0x51f7dc,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),_0x51f7dc;})['catch'](_0x108c85=>(console['error'](_0x108c85),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x1bfe0e=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x1bfe0e(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x3fcef8=this['editor']['plugins']['get']('Annotations');_0x3fcef8['refreshVisibility'](),_0x3fcef8['refreshPositioning']();}})));}['_showRevisionViewer'](_0x4839f5){const _0x3bf13a=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x4051ea=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x38b2bc=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return R['create'](_0x38b2bc,_0x4839f5)['then'](_0x2f9edf=>(_0x4051ea['style']['display']='block',_0x3bf13a['style']['display']='none',_0x2f9edf));}['_closeRevisionViewer'](_0x376bb0){const _0x381723=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x381723['style']['display']='',_0x376bb0['destroy']();}async['_restoreRevision'](_0x5e9e91){const _0x40c1a2=this['editor'],_0x532eca=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x513e2c=_0x40c1a2['plugins']['get']('RevisionTracker'),_0x57baec=_0x532eca['repository']['getRevision'](_0x5e9e91);let _0x1bc1e3,_0x4762f2,_0x4a304d;try{_0x1bc1e3=await _0x532eca['getRevisionData'](_0x57baec),_0x4762f2=await _0x532eca['getRevisionRootsAttributes'](_0x57baec);}catch(_0x4e4d2c){return void console['error'](_0x4e4d2c);}_0x40c1a2['model']['change'](_0x382ac0=>{for(const _0x283c6b of Array['from'](_0x40c1a2['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x382ac0['removeMarker'](_0x283c6b);}),_0x532eca['isReady']=!0x1,_0x40c1a2['model']['enqueueChange'](_0x1bff06=>{_0x1bff06['setSelection'](null),_0x1bff06['removeSelectionAttribute'](_0x40c1a2['model']['document']['selection']['getAttributeKeys']());const _0x38c258=Object['keys'](_0x1bc1e3);for(const _0x1474dd of _0x40c1a2['model']['document']['roots'])'$graveyard'!=_0x1474dd['rootName']&&_0x1474dd['isAttached']()&&!_0x38c258['includes'](_0x1474dd['rootName'])&&_0x1bff06['detachRoot'](_0x1474dd);for(const _0x57ccfa of _0x38c258){let _0x2ac6b7=_0x40c1a2['model']['document']['getRoot'](_0x57ccfa);_0x2ac6b7&&_0x2ac6b7['isAttached']()||(_0x2ac6b7=_0x1bff06['addRoot'](_0x57ccfa));const _0xfe51df=_0x4762f2[_0x57ccfa],_0x2b5549=Object['keys'](_0xfe51df),_0x5e9347=_0x1bc1e3[_0x57ccfa];for(const _0x5bd906 of _0x2ac6b7['getAttributeKeys']())_0x2b5549['includes'](_0x5bd906)||_0x1bff06['removeAttribute'](_0x5bd906,_0x2ac6b7);for(const _0x58ac8c of _0x2b5549)_0x1bff06['setAttribute'](_0x58ac8c,_0x4762f2[_0x57ccfa][_0x58ac8c],_0x2ac6b7);_0x1bff06['remove'](_0x1bff06['createRangeIn'](_0x2ac6b7)),_0x1bff06['insert'](_0x40c1a2['data']['parse'](_0x5e9347,_0x2ac6b7),_0x2ac6b7,0x0);}});const _0x13fab6=m(_0x40c1a2['locale'],'Restored');if(_0x57baec['name'])_0x4a304d=-0x1==_0x57baec['name']['indexOf'](_0x13fab6)?_0x13fab6+':\x20'+_0x57baec['name']:_0x57baec['name'];else _0x4a304d=_0x13fab6+':\x20'+(_0x57baec['createdAt']['toLocaleDateString'](_0x40c1a2['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x57baec['createdAt']['toLocaleTimeString'](_0x40c1a2['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x513e2c['saveRevision']({'name':_0x4a304d}),_0x532eca['isReady']=!0x0,_0x40c1a2['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{h as Revision,k as RevisionHistory,f as RevisionHistoryUI,u as RevisionTracker,d as RevisionViewer,le as RevisionViewerLoadingOverlay,w as RevisionViewerUI,j as RevisionsRepository,g as RevisionsSidebar};