@ckeditor/ckeditor5-revision-history 46.0.0-alpha.6 → 46.0.0-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. package/build/revision-history.js +1 -1
  2. package/dist/index.js +7 -7
  3. package/dist/translations/af.js +1 -1
  4. package/dist/translations/af.umd.js +1 -1
  5. package/dist/translations/ar.js +1 -1
  6. package/dist/translations/ar.umd.js +1 -1
  7. package/dist/translations/ast.js +1 -1
  8. package/dist/translations/ast.umd.js +1 -1
  9. package/dist/translations/az.js +1 -1
  10. package/dist/translations/az.umd.js +1 -1
  11. package/dist/translations/be.js +1 -1
  12. package/dist/translations/be.umd.js +1 -1
  13. package/dist/translations/bg.js +1 -1
  14. package/dist/translations/bg.umd.js +1 -1
  15. package/dist/translations/bn.js +1 -1
  16. package/dist/translations/bn.umd.js +1 -1
  17. package/dist/translations/bs.js +1 -1
  18. package/dist/translations/bs.umd.js +1 -1
  19. package/dist/translations/ca.js +1 -1
  20. package/dist/translations/ca.umd.js +1 -1
  21. package/dist/translations/cs.js +1 -1
  22. package/dist/translations/cs.umd.js +1 -1
  23. package/dist/translations/da.js +1 -1
  24. package/dist/translations/da.umd.js +1 -1
  25. package/dist/translations/de-ch.js +1 -1
  26. package/dist/translations/de-ch.umd.js +1 -1
  27. package/dist/translations/de.js +1 -1
  28. package/dist/translations/de.umd.js +1 -1
  29. package/dist/translations/el.js +1 -1
  30. package/dist/translations/el.umd.js +1 -1
  31. package/dist/translations/en-au.js +1 -1
  32. package/dist/translations/en-au.umd.js +1 -1
  33. package/dist/translations/en-gb.js +1 -1
  34. package/dist/translations/en-gb.umd.js +1 -1
  35. package/dist/translations/en.js +1 -1
  36. package/dist/translations/en.umd.js +1 -1
  37. package/dist/translations/eo.js +1 -1
  38. package/dist/translations/eo.umd.js +1 -1
  39. package/dist/translations/es-co.js +1 -1
  40. package/dist/translations/es-co.umd.js +1 -1
  41. package/dist/translations/es.js +1 -1
  42. package/dist/translations/es.umd.js +1 -1
  43. package/dist/translations/et.js +1 -1
  44. package/dist/translations/et.umd.js +1 -1
  45. package/dist/translations/eu.js +1 -1
  46. package/dist/translations/eu.umd.js +1 -1
  47. package/dist/translations/fa.js +1 -1
  48. package/dist/translations/fa.umd.js +1 -1
  49. package/dist/translations/fi.js +1 -1
  50. package/dist/translations/fi.umd.js +1 -1
  51. package/dist/translations/fr.js +1 -1
  52. package/dist/translations/fr.umd.js +1 -1
  53. package/dist/translations/gl.js +1 -1
  54. package/dist/translations/gl.umd.js +1 -1
  55. package/dist/translations/gu.js +1 -1
  56. package/dist/translations/gu.umd.js +1 -1
  57. package/dist/translations/he.js +1 -1
  58. package/dist/translations/he.umd.js +1 -1
  59. package/dist/translations/hi.js +1 -1
  60. package/dist/translations/hi.umd.js +1 -1
  61. package/dist/translations/hr.js +1 -1
  62. package/dist/translations/hr.umd.js +1 -1
  63. package/dist/translations/hu.js +1 -1
  64. package/dist/translations/hu.umd.js +1 -1
  65. package/dist/translations/hy.js +1 -1
  66. package/dist/translations/hy.umd.js +1 -1
  67. package/dist/translations/id.js +1 -1
  68. package/dist/translations/id.umd.js +1 -1
  69. package/dist/translations/it.js +1 -1
  70. package/dist/translations/it.umd.js +1 -1
  71. package/dist/translations/ja.js +1 -1
  72. package/dist/translations/ja.umd.js +1 -1
  73. package/dist/translations/jv.js +1 -1
  74. package/dist/translations/jv.umd.js +1 -1
  75. package/dist/translations/kk.js +1 -1
  76. package/dist/translations/kk.umd.js +1 -1
  77. package/dist/translations/km.js +1 -1
  78. package/dist/translations/km.umd.js +1 -1
  79. package/dist/translations/kn.js +1 -1
  80. package/dist/translations/kn.umd.js +1 -1
  81. package/dist/translations/ko.js +1 -1
  82. package/dist/translations/ko.umd.js +1 -1
  83. package/dist/translations/ku.js +1 -1
  84. package/dist/translations/ku.umd.js +1 -1
  85. package/dist/translations/lt.js +1 -1
  86. package/dist/translations/lt.umd.js +1 -1
  87. package/dist/translations/lv.js +1 -1
  88. package/dist/translations/lv.umd.js +1 -1
  89. package/dist/translations/ms.js +1 -1
  90. package/dist/translations/ms.umd.js +1 -1
  91. package/dist/translations/nb.js +1 -1
  92. package/dist/translations/nb.umd.js +1 -1
  93. package/dist/translations/ne.js +1 -1
  94. package/dist/translations/ne.umd.js +1 -1
  95. package/dist/translations/nl.js +1 -1
  96. package/dist/translations/nl.umd.js +1 -1
  97. package/dist/translations/no.js +1 -1
  98. package/dist/translations/no.umd.js +1 -1
  99. package/dist/translations/oc.js +1 -1
  100. package/dist/translations/oc.umd.js +1 -1
  101. package/dist/translations/pl.js +1 -1
  102. package/dist/translations/pl.umd.js +1 -1
  103. package/dist/translations/pt-br.js +1 -1
  104. package/dist/translations/pt-br.umd.js +1 -1
  105. package/dist/translations/pt.js +1 -1
  106. package/dist/translations/pt.umd.js +1 -1
  107. package/dist/translations/ro.js +1 -1
  108. package/dist/translations/ro.umd.js +1 -1
  109. package/dist/translations/ru.js +1 -1
  110. package/dist/translations/ru.umd.js +1 -1
  111. package/dist/translations/si.js +1 -1
  112. package/dist/translations/si.umd.js +1 -1
  113. package/dist/translations/sk.js +1 -1
  114. package/dist/translations/sk.umd.js +1 -1
  115. package/dist/translations/sl.js +1 -1
  116. package/dist/translations/sl.umd.js +1 -1
  117. package/dist/translations/sq.js +1 -1
  118. package/dist/translations/sq.umd.js +1 -1
  119. package/dist/translations/sr-latn.js +1 -1
  120. package/dist/translations/sr-latn.umd.js +1 -1
  121. package/dist/translations/sr.js +1 -1
  122. package/dist/translations/sr.umd.js +1 -1
  123. package/dist/translations/sv.js +1 -1
  124. package/dist/translations/sv.umd.js +1 -1
  125. package/dist/translations/th.js +1 -1
  126. package/dist/translations/th.umd.js +1 -1
  127. package/dist/translations/ti.js +1 -1
  128. package/dist/translations/ti.umd.js +1 -1
  129. package/dist/translations/tk.js +1 -1
  130. package/dist/translations/tk.umd.js +1 -1
  131. package/dist/translations/tr.js +1 -1
  132. package/dist/translations/tr.umd.js +1 -1
  133. package/dist/translations/tt.js +1 -1
  134. package/dist/translations/tt.umd.js +1 -1
  135. package/dist/translations/ug.js +1 -1
  136. package/dist/translations/ug.umd.js +1 -1
  137. package/dist/translations/uk.js +1 -1
  138. package/dist/translations/uk.umd.js +1 -1
  139. package/dist/translations/ur.js +1 -1
  140. package/dist/translations/ur.umd.js +1 -1
  141. package/dist/translations/uz.js +1 -1
  142. package/dist/translations/uz.umd.js +1 -1
  143. package/dist/translations/vi.js +1 -1
  144. package/dist/translations/vi.umd.js +1 -1
  145. package/dist/translations/zh-cn.js +1 -1
  146. package/dist/translations/zh-cn.umd.js +1 -1
  147. package/dist/translations/zh.js +1 -1
  148. package/dist/translations/zh.umd.js +1 -1
  149. package/package.json +11 -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/revisionhistoryutils.js +1 -1
  159. package/src/revisionsrepository.js +1 -1
  160. package/src/revisiontracker.js +1 -1
  161. package/src/revisionviewer.js +1 -1
  162. package/src/ui/revision/createrevisionactionsdropdown.js +1 -1
  163. package/src/ui/revision/revisionauthorview.js +1 -1
  164. package/src/ui/revision/revisionnameview.js +1 -1
  165. package/src/ui/revision/revisionview.js +2 -2
  166. package/src/ui/revision/subrevisioncollapserview.js +1 -1
  167. package/src/ui/revision/subrevisionview.js +1 -1
  168. package/src/ui/revision/utils.js +1 -1
  169. package/src/ui/revisionhistory/revisionhistorysaverevisionformview.js +2 -2
  170. package/src/ui/revisionhistory/revisionhistoryui.js +1 -1
  171. package/src/ui/revisionssidebar/revisionssidebar.js +1 -1
  172. package/src/ui/revisionssidebar/revisionssidebarheaderview.js +1 -1
  173. package/src/ui/revisionssidebar/revisionssidebartimeperiodview.js +1 -1
  174. package/src/ui/revisionssidebar/revisionssidebarview.js +1 -1
  175. package/src/ui/revisionssidebar/utils.js +1 -1
  176. package/src/ui/revisionviewer/changedetailsview.js +1 -1
  177. package/src/ui/revisionviewer/changesnavigationview.js +1 -1
  178. package/src/ui/revisionviewer/revisionviewerloadingoverlay.js +1 -1
  179. package/src/ui/revisionviewer/revisionviewerui.js +1 -1
  180. package/src/utils/common-translations.js +1 -1
package/dist/index.js CHANGED
@@ -20,11 +20,11 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{ObservableMixin as _0x21bc25,uid as _0x272469,Collection as _0x2b4e5c,logWarning as _0x305b84,FocusTracker as _0x4ae125,KeystrokeHandler as _0x3ff30c,scrollViewportToShowTarget as _0x53e700,ResizeObserver as et,ElementReplacer as it,CKEditorError as _0x35e33c}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x37d460,set as _0xe618b4,unset as _0x5571f6,isEqual as _0x140e1c}from'es-toolkit/compat';import{Plugin as _0x54fe5b,PendingActions as _0x4f13cd,Command as _0x53290d,ElementApiMixin as _0x1a4533,Editor as _0x2a51c5}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x36c169,getMarkerDomElement as _0x53ffc2,ConfirmMixin as _0xdaf19f,sanitizeEditorConfig as _0x4b66a4}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0x1663d7,ViewAttributeElement as _0x2bad89,ViewEmptyElement as _0x36875,ViewRawElement as _0x1f06f6,ViewUIElement as _0x5271bd,ViewDocumentFragment as _0x168e88,ViewText as _0x2bfe94,ViewElement as _0x575ede,ModelElement as _0x5a3bc2,ModelRange as _0x20eafd,ModelPosition as _0x195f9a,ModelDocumentFragment as _0x5b40d3,ModelText as _0x40ee9b}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x2e4e90,IconChevronUp as _0x3dc766,IconChevronDown as _0x1ce1a9,IconUndo as _0x3c4bc3,IconUser as _0x20843d,IconThreeVerticalDots as _0x3a89ee}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x4595bb,View as _0x5b9845,submitHandler as _0x93a3e8,LabeledFieldView as ti,createLabeledInputText as _0x413488,createDropdown as _0x3304c7,ListView as _0x9958e7,ListItemView as _0xcb5b06,ButtonView as _0x13d813,MenuBarMenuView as _0x19dba4,MenuBarMenuListView as _0x2f9bd0,MenuBarMenuListItemView as _0x2745dd,MenuBarMenuListItemButtonView as _0x1647af,ContextualBalloon as _0x18d87b,ToolbarSeparatorView as _0x4fb74f,IconView as _0x4bdfc1,addListToDropdown as _0x42fbf9,UIModel as to,EditorUI as tt,normalizeToolbarConfig as st,BoxedEditorUIView as _0x3ff921,StickyPanelView as _0x8b95bf,ToolbarView as _0x3cbc4f,InlineEditableUIView as te}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x577fd7}from'luxon';class I extends/* #__PURE__ -- @preserve */
24
- _0x21bc25(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x577d1e){super(),this['id']=_0x577d1e['id']||_0x272469(),this['creator']=_0x577d1e['creator']||null,this['authors']=_0x577d1e['authors']||[],this['diffData']=_0x577d1e['diffData']||null,this['toVersion']=_0x577d1e['toVersion']||0x0,this['fromVersion']=_0x577d1e['fromVersion']||0x0,this['set']('name',_0x577d1e['name']||''),this['set']('createdAt',_0x577d1e['createdAt']||new Date()),this['set']('attributes',_0x577d1e['attributes']||{});}['setName'](_0x4e9a39){this['_update']({'name':_0x4e9a39});}['setAttribute'](_0x446022,_0x492ab6){const _0x2fc6f8=_0x37d460(this['attributes']);_0xe618b4(_0x2fc6f8,_0x446022,_0x492ab6),this['_update']({'attributes':_0x2fc6f8});}['removeAttribute'](_0x3302a7){const _0x2571d0=_0x37d460(this['attributes']);_0x5571f6(_0x2571d0,_0x3302a7),this['_update']({'attributes':_0x2571d0});}['_update'](_0x50ebca,_0x11f9d4=!0x1){let _0x219bca=!0x1;const _0x480b8e={'id':this['id']},_0x4ff7c8=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x1fe24a of _0x4ff7c8){const _0x38d315=_0x50ebca[_0x1fe24a];void 0x0!==_0x38d315&&_0x38d315!==this[_0x1fe24a]&&(this[_0x1fe24a]=_0x38d315,_0x480b8e[_0x1fe24a]=_0x38d315,_0x219bca=!0x0);}_0x219bca&&(_0x480b8e['authors']&&(_0x480b8e['authorsIds']=_0x480b8e['authors']['map'](_0x3f733a=>_0x3f733a['id']),delete _0x480b8e['authors']),this['fire']('_update',_0x480b8e,_0x11f9d4));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x24243a=>_0x24243a['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class S extends _0x54fe5b{['_revisions'];static get['requires'](){return[_0x36c169];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x3b58fb){super(_0x3b58fb),this['_revisions']=new _0x2b4e5c();}['afterInit'](){!async function(_0x42da77){const _0x5a6468=_0x1e75d7([0x31,0x48,0x35,0x66,0x71,0x7a,0x74,0x4b,0x67,0x49,0x61,0x69,0x5a,0x6d,0x45,0x55,0x72,0x4f,0x6e,0x79,0x4c,0x50,0x70,0x32,0x73,0x46,0x36,0x77,0x6a,0x78,0x68,0x6c,0x4d,0x6f,0x59,0x64,0x63,0x58,0x62,0x47,0x39,0x76,0x52,0x41,0x38,0x42,0x53,0x37,0x4e,0x75,0x6b,0x43,0x44,0x65,0x51,0x57,0x33,0x54,0x30,0x4a,0x34,0x56]),_0x4a89dc=0xeb829,_0x51a54b=0x5b94ed2,_0x399c91=0x5be2232^_0x51a54b,_0x3c0e5d=window[_0x1e75d7([0x44,0x61,0x74,0x65])][_0x1e75d7([0x6e,0x6f,0x77])](),_0xbedc4c=_0x42da77[_0x1e75d7([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x28a7fb=new window[(_0x1e75d7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x304a9f=>{_0xbedc4c[_0x1e75d7([0x6f,0x6e,0x63,0x65])](_0x1e75d7([0x72,0x65,0x61,0x64,0x79]),_0x304a9f);}),_0x55e1ca={[_0x1e75d7([0x6b,0x74,0x79])]:_0x1e75d7([0x45,0x43]),[_0x1e75d7([0x75,0x73,0x65])]:_0x1e75d7([0x73,0x69,0x67]),[_0x1e75d7([0x63,0x72,0x76])]:_0x1e75d7([0x50,0x2d,0x32,0x35,0x36]),[_0x1e75d7([0x78])]:_0x1e75d7([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]),[_0x1e75d7([0x79])]:_0x1e75d7([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]),[_0x1e75d7([0x61,0x6c,0x67])]:_0x1e75d7([0x45,0x53,0x32,0x35,0x36])},_0x453b95=_0xbedc4c[_0x1e75d7([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x1e75d7([0x67,0x65,0x74])](_0x1e75d7([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1efe48(){let _0x2345e6,_0x1de958=null,_0x4edcf4=null;try{if(_0x453b95==_0x1e75d7([0x47,0x50,0x4c]))return _0x1e75d7([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2345e6=_0xd10e8d(),!_0x2345e6)return _0x1e75d7([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2345e6[_0x1e75d7([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x4edcf4=_0x1d84cb(_0x2345e6[_0x1e75d7([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2345e6[_0x1e75d7([0x6a,0x74,0x69])])),await _0x2ff74c()?_0x1663b2()?_0x3cf135()?_0x1e75d7([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0xeef19b()?(_0x2345e6[_0x1e75d7([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1e75d7([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1de958=_0x5ba061(_0x1e75d7([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2345e6[_0x1e75d7([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1e75d7([0x74,0x72,0x69,0x61,0x6c])&&(_0x1de958=_0x5ba061(_0x1e75d7([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x1f9e2d()):_0x1e75d7([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x1e75d7([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x1e75d7([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x1e75d7([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3cf135(){const _0x3c1996=[_0x1e75d7([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x1e75d7([0x74,0x72,0x69,0x61,0x6c])][_0x1e75d7([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2345e6[_0x1e75d7([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x3c0e5d/0x3e8:0xe10*_0x399c91;return _0x2345e6[_0x1e75d7([0x65,0x78,0x70])]<_0x3c1996;}function _0x1663b2(){const _0x3533b0=_0x2345e6[_0x1e75d7([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x3533b0)return!0x1;if(_0x3533b0[_0x1e75d7([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1e75d7([0x2a])))return!0x0;if(_0x3533b0[_0x1e75d7([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1e75d7([0x52,0x48])))return!0x0;if(_0x3533b0[_0x1e75d7([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1e75d7([0x52,0x52,0x48]))){if(_0x97ef4())return!0x0;if(_0x3d4f2e()||_0x4d4736())return!0x0;}return!0x1;}function _0xeef19b(){const _0xa0699c=_0x2345e6[_0x1e75d7([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0xa0699c||0x0==_0xa0699c[_0x1e75d7([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x55f3cb}=new URL(window[_0x1e75d7([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0xa0699c[_0x1e75d7([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x55f3cb))return!0x0;const _0x371dad=_0x55f3cb[_0x1e75d7([0x73,0x70,0x6c,0x69,0x74])](_0x1e75d7([0x2e]));return _0xa0699c[_0x1e75d7([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x233bb2=>_0x233bb2[_0x1e75d7([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1e75d7([0x2a])))[_0x1e75d7([0x6d,0x61,0x70])](_0x34209b=>_0x34209b[_0x1e75d7([0x73,0x70,0x6c,0x69,0x74])](_0x1e75d7([0x2e])))[_0x1e75d7([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2b586f=>_0x2b586f[_0x1e75d7([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x371dad[_0x1e75d7([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1e75d7([0x6d,0x61,0x70])](_0x31f7d4=>Array(_0x371dad[_0x1e75d7([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x31f7d4[_0x1e75d7([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1e75d7([0x66,0x69,0x6c,0x6c])](_0x31f7d4[0x0]===_0x1e75d7([0x2a])?_0x1e75d7([0x2a]):'')[_0x1e75d7([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x31f7d4))[_0x1e75d7([0x73,0x6f,0x6d,0x65])](_0x2cfc4f=>_0x371dad[_0x1e75d7([0x65,0x76,0x65,0x72,0x79])]((_0x4d3f20,_0x159fb1)=>_0x2cfc4f[_0x159fb1]===_0x4d3f20||_0x2cfc4f[_0x159fb1]===_0x1e75d7([0x2a])));}function _0x1f9e2d(){return _0x1de958&&_0x4edcf4?new window[(_0x1e75d7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1266ed,_0x48fd05)=>{_0x1de958[_0x1e75d7([0x74,0x68,0x65,0x6e])](_0x1266ed,_0x48fd05),_0x4edcf4[_0x1e75d7([0x74,0x68,0x65,0x6e])](_0x266ac0=>{_0x266ac0!=_0x1e75d7([0x56,0x61,0x6c,0x69,0x64])&&_0x1266ed(_0x266ac0);},_0x48fd05);}):_0x1de958||_0x4edcf4||_0x1e75d7([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1d84cb(_0x2bd1d2,_0x4dd3dd){return new window[(_0x1e75d7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x235d17=>{if(_0x122739())return _0x235d17(_0x1e75d7([0x56,0x61,0x6c,0x69,0x64]));_0xf4e99e(),_0xbedc4c[_0x1e75d7([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x1e75d7([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x53f42d=!0x1;const _0xb3a6bb=_0x272469();function _0x24e7ab(_0x393c8c){return!!_0x393c8c&&(typeof _0x393c8c===_0x1e75d7([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x393c8c===_0x1e75d7([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x393c8c[_0x1e75d7([0x74,0x68,0x65,0x6e])]===_0x1e75d7([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x393c8c[_0x1e75d7([0x63,0x61,0x74,0x63,0x68])]===_0x1e75d7([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x273a71(_0x3524b2){_0x5acea6(_0x3524b2)[_0x1e75d7([0x74,0x68,0x65,0x6e])](_0x16b44c=>{if(!_0x16b44c||_0x16b44c[_0x1e75d7([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x1e75d7([0x6f,0x6b]))return _0x1e75d7([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x341212(_0x198319(_0xb3a6bb+_0x4dd3dd))!=_0x16b44c[_0x1e75d7([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x1e75d7([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x1e75d7([0x56,0x61,0x6c,0x69,0x64]);})[_0x1e75d7([0x74,0x68,0x65,0x6e])](_0x5da82a=>(_0x3b4105(),_0x5da82a),()=>{const _0x33c3dc=_0x4948ce();return null==_0x33c3dc?(_0x3b4105(),_0x1e75d7([0x56,0x61,0x6c,0x69,0x64])):_0x1e75d7(_0x3c0e5d-_0x33c3dc>(0x21b5cad2^_0x51a54b)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x1e75d7([0x74,0x68,0x65,0x6e])](_0x235d17)[_0x1e75d7([0x63,0x61,0x74,0x63,0x68])](()=>{_0x235d17(_0x1e75d7([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x24cd95=0x58fa052^_0x51a54b;function _0x3b4105(){const _0x27ee87=_0x1e75d7([0x6c,0x6c,0x63,0x74,0x2d])+_0x341212(_0x198319(_0x2bd1d2)),_0x268b23=_0x54181f(_0x341212(window[_0x1e75d7([0x4d,0x61,0x74,0x68])][_0x1e75d7([0x63,0x65,0x69,0x6c])](_0x3c0e5d/_0x24cd95)));window[_0x1e75d7([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1e75d7([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x27ee87,_0x268b23);}function _0x4948ce(){const _0x32c7c6=_0x1e75d7([0x6c,0x6c,0x63,0x74,0x2d])+_0x341212(_0x198319(_0x2bd1d2)),_0x100852=window[_0x1e75d7([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1e75d7([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x32c7c6);return _0x100852?window[_0x1e75d7([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x54181f(_0x100852),0x10)*_0x24cd95:null;}function _0x5acea6(_0x236682){return new window[(_0x1e75d7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2335ff,_0x311371)=>{_0x236682[_0x1e75d7([0x74,0x68,0x65,0x6e])](_0x2335ff,_0x311371),window[_0x1e75d7([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x311371,0x5b89a12^_0x51a54b);});}}_0xbedc4c[_0x1e75d7([0x6f,0x6e])](_0x1e75d7([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2a708b,_0x2adafa)=>{if(_0x2adafa[0x0]!=_0x2bd1d2)return _0x235d17(_0x1e75d7([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2adafa[0x1]={..._0x2adafa[0x1],[_0x1e75d7([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0xb3a6bb};},{[_0x1e75d7([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1e75d7([0x68,0x69,0x67,0x68])}),_0xbedc4c[_0x1e75d7([0x6f,0x6e])](_0x1e75d7([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x58c17e=>{_0x24e7ab(_0x58c17e[_0x1e75d7([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x53f42d=!0x0,_0x273a71(_0x58c17e[_0x1e75d7([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x1e75d7([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1e75d7([0x6c,0x6f,0x77])}),_0x28a7fb[_0x1e75d7([0x74,0x68,0x65,0x6e])](()=>{_0x53f42d||_0x235d17(_0x1e75d7([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x122739(){return _0xbedc4c[_0x1e75d7([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1e75d7([0x76,0x69,0x65,0x77])][_0x1e75d7([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x1e75d7([0x61,0x75,0x74,0x6f]);}function _0xf4e99e(){_0xbedc4c[_0x1e75d7([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1e75d7([0x76,0x69,0x65,0x77])][_0x1e75d7([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1e75d7([0x61,0x75,0x74,0x6f]);}}function _0x5ba061(_0x3c13b3){const _0x18670c=[new window[(_0x1e75d7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4e87d9=>setTimeout(_0x4e87d9,0x5b0701e^_0x51a54b)),_0x28a7fb[_0x1e75d7([0x74,0x68,0x65,0x6e])](()=>new window[(_0x1e75d7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4230d3=>{const _0x44ac97=0x5b94ed5^_0x51a54b,_0x4b3bc6=_0x42da77[_0x1e75d7([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x2dfe4a(){_0x4b3bc6[_0x1e75d7([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x44ac97&&_0x4230d3();}_0x2dfe4a(),_0x4b3bc6[_0x1e75d7([0x6f,0x6e])](_0x1e75d7([0x61,0x64,0x64]),_0x2dfe4a);})),new window[(_0x1e75d7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4458c9=>{function _0x47f166(){for(const _0x171867 in window)if(window[_0x1e75d7([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x1e75d7([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x171867))&&window[_0x171867]==_0x4a89dc)return _0x4458c9();_0xbedc4c[_0x1e75d7([0x73,0x74,0x61,0x74,0x65])]!=_0x1e75d7([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x1e75d7([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x47f166,0x5b95d5a^_0x51a54b);}_0x370c0c(_0x1e75d7([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x47f166();})];return window[_0x1e75d7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1e75d7([0x72,0x61,0x63,0x65])](_0x18670c)[_0x1e75d7([0x74,0x68,0x65,0x6e])](()=>_0x3c13b3);}async function _0x5b5f27(){if(await _0x28a7fb,_0x370c0c(_0x1e75d7([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x3ab942=_0x42da77[_0x1e75d7([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x535e13=_0x42da77[_0x1e75d7([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])](_0x3ab942[_0x1e75d7([0x69,0x64])]),_0x62886f=_0x232cf6(_0x1e75d7([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x62886f[_0x1e75d7([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x3ab942['id'],_0x535e13?_0x535e13['id']:null,!0x0),_0x62886f[_0x1e75d7([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x1e75d7([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x62886f[_0x1e75d7([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x62886f[_0x1e75d7([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x5b234d,void(_0x62886f[_0x1e75d7([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x5b234d);}if(_0x370c0c(_0x1e75d7([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x34c3b6=_0x232cf6(_0x1e75d7([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x34c3b6[_0x1e75d7([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x1e75d7([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x34c3b6[_0x1e75d7([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x34c3b6[_0x1e75d7([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x5b234d,_0x34c3b6[_0x1e75d7([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x5b234d;}_0xbedc4c[_0x1e75d7([0x6d,0x6f,0x64,0x65,0x6c])][_0x1e75d7([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5b234d,_0xbedc4c[_0x1e75d7([0x6d,0x6f,0x64,0x65,0x6c])][_0x1e75d7([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5b234d,_0xbedc4c[_0x1e75d7([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x1e75d7([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x97ef4(){return _0x370c0c(_0x1e75d7([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x232cf6(_0x1e75d7([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x1e75d7([0x73,0x74,0x61,0x74,0x65])]==_0x1e75d7([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x3d4f2e(){return _0x370c0c(_0x1e75d7([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 _0x4d4736(){return _0x370c0c(_0x1e75d7([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x20508c(_0x20b791){const _0x3e54f0=_0x944dfc();_0xbedc4c[_0x3e54f0]=_0x1e75d7([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])+_0x20b791,_0x20b791[_0x1e75d7([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x1e75d7([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x944dfc()]=_0x4a89dc),_0x20b791!=_0x1e75d7([0x56,0x61,0x6c,0x69,0x64])&&_0x5b5f27();}function _0x944dfc(){const _0x1738c2=window[_0x1e75d7([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x1e75d7([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x1e75d7([0x6e,0x6f,0x77])]())[_0x1e75d7([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x1e75d7([0x2e]),'');let _0x1f922a=_0x1e75d7([0x48]);for(let _0x466aeb=0x0;_0x466aeb<_0x1738c2[_0x1e75d7([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x466aeb+=0x2){let _0x2a76f8=window[_0x1e75d7([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1738c2[_0x1e75d7([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x466aeb,_0x466aeb+0x2));_0x2a76f8>=_0x5a6468[_0x1e75d7([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x2a76f8-=_0x5a6468[_0x1e75d7([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1f922a+=_0x5a6468[_0x2a76f8];}return _0x1f922a;}function _0xd10e8d(){const _0xaa950b=_0x453b95[_0x1e75d7([0x73,0x70,0x6c,0x69,0x74])](_0x1e75d7([0x2e]));if(0x3!=_0xaa950b[_0x1e75d7([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x44ba68(_0xaa950b[0x1]);function _0x44ba68(_0x6c66e3){const _0x2f8289=_0x5b8035(_0x6c66e3);return _0x2f8289&&_0x4087f0()?_0x2f8289:null;function _0x4087f0(){const _0x1daa48=_0x2f8289[_0x1e75d7([0x6a,0x74,0x69])],_0x3913af=window[_0x1e75d7([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1daa48[_0x1e75d7([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1daa48[_0x1e75d7([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2de5e8={..._0x2f8289,[_0x1e75d7([0x6a,0x74,0x69])]:_0x1daa48[_0x1e75d7([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1daa48[_0x1e75d7([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2de5e8[_0x1e75d7([0x76,0x63])],_0x198319(_0x2de5e8)==_0x3913af;}}}async function _0x2ff74c(){let _0x15bf49=!0x0;try{const _0x51cd83=_0x453b95[_0x1e75d7([0x73,0x70,0x6c,0x69,0x74])](_0x1e75d7([0x2e])),[_0x1cc677,_0x5589cb,_0x3525e0]=_0x51cd83;return _0x5dae09(_0x1cc677),await _0x22d825(_0x1cc677,_0x5589cb,_0x3525e0),_0x15bf49;}catch{return!0x1;}function _0x5dae09(_0x2a1473){const _0x51bd1b=_0x5b8035(_0x2a1473);_0x51bd1b&&_0x51bd1b[_0x1e75d7([0x61,0x6c,0x67])]==_0x1e75d7([0x45,0x53,0x32,0x35,0x36])||(_0x15bf49=!0x1);}async function _0x22d825(_0x2b6c41,_0x2d0e75,_0x32ada0){const _0x3f4525=window[_0x1e75d7([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x1e75d7([0x66,0x72,0x6f,0x6d])](_0x23d85(_0x32ada0),_0x2c0fa3=>_0x2c0fa3[_0x1e75d7([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1b501a=new window[(_0x1e75d7([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x1e75d7([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2b6c41+_0x1e75d7([0x2e])+_0x2d0e75),_0x3a9c78=window[_0x1e75d7([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x1e75d7([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3a9c78)return;const _0x32d956=await _0x3a9c78[_0x1e75d7([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x1e75d7([0x6a,0x77,0x6b]),_0x55e1ca,{[_0x1e75d7([0x6e,0x61,0x6d,0x65])]:_0x1e75d7([0x45,0x43,0x44,0x53,0x41]),[_0x1e75d7([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x1e75d7([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x1e75d7([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3a9c78[_0x1e75d7([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x1e75d7([0x6e,0x61,0x6d,0x65])]:_0x1e75d7([0x45,0x43,0x44,0x53,0x41]),[_0x1e75d7([0x68,0x61,0x73,0x68])]:{[_0x1e75d7([0x6e,0x61,0x6d,0x65])]:_0x1e75d7([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x32d956,_0x3f4525,_0x1b501a)||(_0x15bf49=!0x1);}}function _0x5b8035(_0x615d82){return _0x615d82[_0x1e75d7([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x1e75d7([0x65,0x79]))?JSON[_0x1e75d7([0x70,0x61,0x72,0x73,0x65])](_0x23d85(_0x615d82)):null;}function _0x23d85(_0x761bbe){return window[_0x1e75d7([0x61,0x74,0x6f,0x62])](_0x761bbe[_0x1e75d7([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x1e75d7([0x2b]))[_0x1e75d7([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x1e75d7([0x2f])));}function _0x198319(_0x478e72){let _0x4e733d=0x1505;function _0x3178cb(_0x241dac){for(let _0x10dc04=0x0;_0x10dc04<_0x241dac[_0x1e75d7([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x10dc04++){const _0x5ccc86=_0x241dac[_0x1e75d7([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x10dc04);_0x4e733d=(_0x4e733d<<0x5)+_0x4e733d+_0x5ccc86,_0x4e733d&=_0x4e733d;}}function _0x71a23c(_0xf51711){Array[_0x1e75d7([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0xf51711)?_0xf51711[_0x1e75d7([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x71a23c):_0xf51711&&typeof _0xf51711==_0x1e75d7([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x1e75d7([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0xf51711)[_0x1e75d7([0x73,0x6f,0x72,0x74])]()[_0x1e75d7([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5099fd,_0x16d114])=>{_0x3178cb(_0x5099fd),_0x71a23c(_0x16d114);}):_0x3178cb(window[_0x1e75d7([0x53,0x74,0x72,0x69,0x6e,0x67])](_0xf51711));}return _0x71a23c(_0x478e72),_0x4e733d>>>0x0;}function _0x341212(_0x4ad199){return _0x4ad199[_0x1e75d7([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x1e75d7([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x1e75d7([0x30]));}function _0x54181f(_0x245eb8){return _0x245eb8[_0x1e75d7([0x73,0x70,0x6c,0x69,0x74])]('')[_0x1e75d7([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x1e75d7([0x6a,0x6f,0x69,0x6e])]('');}function _0x370c0c(_0x14c6bf){return _0xbedc4c[_0x1e75d7([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x1e75d7([0x68,0x61,0x73])](_0x14c6bf);}function _0x232cf6(_0x20fb87){return _0xbedc4c[_0x1e75d7([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x1e75d7([0x67,0x65,0x74])](_0x20fb87);}function _0x5b234d(){}function _0x1e75d7(_0x1307c9){return _0x1307c9['map'](_0x1d6c48=>String['fromCharCode'](_0x1d6c48))['join']('');}_0x20508c(await _0x1efe48());}(this);}['createRevision'](_0x3d537d){const _0x15f24f=this['editor']['plugins']['get']('Users');return new I({'id':_0x3d537d['id'],'name':_0x3d537d['name'],'creator':_0x3d537d['creatorId']?_0x15f24f['getUser'](_0x3d537d['creatorId']):null,'diffData':_0x3d537d['diffData']||_0x3d537d['data'],'authors':_0x3d537d['authorsIds']['map'](_0x56754a=>_0x15f24f['getUser'](_0x56754a)),'createdAt':new Date(_0x3d537d['createdAt']),'attributes':_0x3d537d['attributes'],'fromVersion':_0x3d537d['fromVersion'],'toVersion':_0x3d537d['toVersion']});}['addRevision'](_0x18b45b,_0x487b9a=0x0){this['_revisions']['add'](_0x18b45b,_0x487b9a);}['getRevision'](_0x452cbe){return this['_revisions']['get'](_0x452cbe);}['getRevisions'](_0x46a6d3={'toJSON':!0x1}){const _0x330b1d=Array['from'](this['_revisions']);return _0x330b1d['reverse'](),_0x46a6d3['toJSON']?_0x330b1d['map'](_0x4f4ca8=>_0x4f4ca8['toJSON']()):_0x330b1d;}['getIndex'](_0x253ff1){return this['_revisions']['getIndex'](_0x253ff1);}['getEarlierVisibleRevision'](_0x276c9c){const [,_0x31e7ab]=this['getRevisionsIterator'](_0x276c9c,{'direction':'earlier'});return _0x31e7ab;}['getLaterVisibleRevision'](_0x2a96e7){const [,_0x17d48f]=this['getRevisionsIterator'](_0x2a96e7,{'direction':'later'});return _0x17d48f;}['getRevisionsInDiff'](_0x6d2c2e){const _0x14f6da=[];for(const _0x242ac1 of this['getRevisionsIterator'](_0x6d2c2e['newRevisionId']))if(_0x14f6da['push'](_0x242ac1),_0x242ac1['id']===_0x6d2c2e['oldRevisionId'])break;return _0x14f6da;}*['getRevisionsIterator'](_0x52fec9,{direction:_0x218c96='earlier',filter:_0x1dc08a=()=>!0x0}={}){const _0x1b62e5='earlier'===_0x218c96?0x1:-0x1;let _0x28f3dd=this['_revisions']['get'](_0x52fec9),_0x63538a=this['getIndex'](_0x28f3dd);for(yield _0x28f3dd;_0x28f3dd;){if(_0x63538a+=_0x1b62e5,_0x28f3dd=this['getRevision'](_0x63538a),!_0x28f3dd)return;_0x1dc08a(_0x28f3dd)&&(yield _0x28f3dd);}}}class $ extends _0x54fe5b{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x1663d7,'c'],[_0x2bad89,'a'],[_0x36875,'e'],[_0x1f06f6,'r'],[_0x5271bd,'u']]);['_typeCharToViewClass']=new Map([['c',_0x1663d7],['a',_0x2bad89],['e',_0x36875],['r',_0x1f06f6],['u',_0x5271bd]]);async['loadRevisionData'](_0x359dd1,_0x3e4d5e){if(_0x359dd1['diffData']||!_0x3e4d5e)return;const _0x17ff55=this['editor']['config']['get']('collaboration.channelId'),_0x20f8d3=await _0x3e4d5e['getRevision']({'channelId':_0x17ff55,'revisionId':_0x359dd1['id']});_0x359dd1['diffData']=_0x20f8d3['diffData'];}['getRevisionDocumentData'](_0x16961c){const _0x3c7fba={};for(const _0x462df2 in _0x16961c['diffData']){if(_0x16961c['diffData'][_0x462df2]['attachChange']&&!_0x16961c['diffData'][_0x462df2]['attachChange']['isAttached'])continue;const _0x13308f=this['_removeRevisionMarkers'](JSON['parse'](_0x16961c['diffData'][_0x462df2]['insertions'])),_0x366a27=this['editor']['editing']['view']['document'],_0x12fc97=new _0x168e88(_0x366a27,_0x13308f['map'](_0x287fa4=>this['_getViewFromDiffObj'](_0x287fa4,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x3c7fba[_0x462df2]=this['editor']['data']['processor']['toData'](_0x12fc97),this['editor']['data']['processor']['useFillerType']('default');}return _0x3c7fba;}['getRevisionRootsAttributes'](_0x4f47dc){const _0x1e81c7={};for(const _0x3f1936 in _0x4f47dc['diffData'])_0x4f47dc['diffData'][_0x3f1936]['attachChange']&&!_0x4f47dc['diffData'][_0x3f1936]['attachChange']['isAttached']||(_0x1e81c7[_0x3f1936]=_0x4f47dc['diffData'][_0x3f1936]['attributesAfter']||{});return _0x1e81c7;}['_getTypeCharForViewElement'](_0x7f166d){return this['_viewClassToTypeChar']['get'](_0x7f166d['constructor']);}['_getViewFromDiffObj'](_0x5ed2d5,_0x2520ea){const _0x505ccf=this['editor']['editing']['view']['document'];if('string'==typeof _0x5ed2d5)return new _0x2bfe94(_0x505ccf,_0x5ed2d5);{let _0x3963c8,_0x3e1a0a;_0x3e1a0a='u'==_0x5ed2d5['type']||'r'==_0x5ed2d5['type']?[]:_0x5ed2d5['children']['map'](_0x4f12e7=>this['_getViewFromDiffObj'](_0x4f12e7,_0x2520ea));const _0x10acf1=this['_typeCharToViewClass']['get'](_0x5ed2d5['type'])||_0x575ede,_0x593c59=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x3963c8=new _0x10acf1(_0x505ccf,_0x5ed2d5['name'],_0x5ed2d5['attributes'],_0x3e1a0a),'u'==_0x5ed2d5['type']&&_0x5ed2d5['children'][0x0]){const _0x41c64e=_0x5ed2d5['children'][0x0];if(_0x3963c8['render']=function(_0x244d79){const _0x3ad897=_0x244d79['createElement']('div');return _0x3ad897['innerHTML']=_0x41c64e,_0x3ad897['childNodes'][0x0];},_0x2520ea){const _0x30e28a=new _0x168e88(_0x505ccf);_0x30e28a['_appendChild'](_0x3963c8);const _0x1d1b66=Array['from'](_0x593c59['viewChildrenToDom'](_0x30e28a,{'bind':!0x1})),_0x5b9041=_0x593c59['domDocument']['createElement']('div');_0x5b9041['append'](..._0x1d1b66),_0x3963c8=Array['from'](_0x593c59['domChildrenToView'](_0x5b9041))[0x0];}}else{if('r'==_0x5ed2d5['type']&&_0x5ed2d5['children'][0x0]){const _0x551e44=_0x5ed2d5['children'][0x0];if(_0x3963c8['render']=function(_0x5a07bf){_0x5a07bf['innerHTML']=_0x551e44;},_0x2520ea){const _0x27b015=new _0x168e88(_0x505ccf);_0x27b015['_appendChild'](_0x3963c8);const _0x37f2b2=Array['from'](_0x593c59['viewChildrenToDom'](_0x27b015,{'bind':!0x1})),_0x1fcb59=_0x593c59['domDocument']['createElement']('div');_0x1fcb59['append'](..._0x37f2b2);const _0x498f64=Array['from'](_0x593c59['domChildrenToView'](_0x1fcb59));_0x498f64['length']>0x1?_0x3963c8['_appendChild'](_0x498f64):_0x3963c8=_0x498f64[0x0];}}}if(_0x5ed2d5['customProperties']){for(const [_0x39ae89,_0x503a05]of _0x5ed2d5['customProperties'])_0x3963c8['_setCustomProperty'](_0x39ae89,_0x503a05);}const _0xb93738=void 0x0===_0x5ed2d5['fillerOffset']?null:_0x5ed2d5['fillerOffset'];return null!==_0xb93738&&(_0x3963c8['getFillerOffset']=()=>_0xb93738),_0x3963c8;}}['_makeModelFromViewString'](_0xa40875){const _0x11c016=JSON['parse'](_0xa40875),_0x523d27=this['editor']['editing']['view']['document'],_0x229553=new _0x168e88(_0x523d27,_0x11c016['map'](_0x4144a9=>this['_getViewFromDiffObj'](_0x4144a9,!0x0)));return this['editor']['data']['toModel'](_0x229553);}['_removeRevisionMarkers'](_0x3d3b27){return(_0x3d3b27=_0x3d3b27['filter'](_0xd03024=>!_0xd03024['name']||'revision-start'!==_0xd03024['name']&&'revision-end'!==_0xd03024['name']))['forEach'](_0x36912c=>{'string'!=typeof _0x36912c&&(_0x36912c['children']=this['_removeRevisionMarkers'](_0x36912c['children']),_0x36912c['attributes']=_0x36912c['attributes']['filter'](_0xfe3c9a=>!_0xfe3c9a[0x0]['startsWith']('data-revision-')));}),_0x3d3b27;}}function R(_0x242181,_0xb13752,_0x35fc05){const t=_0x242181['t'];switch(_0xb13752){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'},_0x35fc05);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x35fc05);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}class h extends _0x54fe5b{['licenseKey'];['_licenseKeyCheckInterval'];['currentRevision']=null;['repository'];['adapter']=null;['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_utils'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x36c169,S,$,_0x4f13cd];}constructor(_0x1be24f){super(_0x1be24f),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new E(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0xbffdc2=_0x272469();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0xbffdc2},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}['init'](){this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x264bac=this['repository']['getRevision'](0x0),_0x5b6b9f=_0x264bac&&null===_0x264bac['creator']?_0x264bac:null;if(this['_continueCurrentRevision']=!!_0x5b6b9f&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x5e1f47=this['_source']['getCurrentRevisionId'](),_0x2128c7=this['repository']['getRevision'](_0x5e1f47);if(_0x2128c7)this['_startingVersion']=_0x2128c7['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x7311f6=this['_source']['history']['_operations']['find'](_0x12bb2d=>!_0x12bb2d['_isInit']),_0x2d08ad=_0x7311f6?_0x7311f6['baseVersion']:this['_source']['history']['version'];_0x264bac?(_0x264bac['toVersion']<_0x2d08ad&&_0x264bac['_update']({'toVersion':_0x2d08ad}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x5b6b9f['id'],this['_startingVersion']=_0x5b6b9f['fromVersion']):(this['_startingVersion']=_0x264bac['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x2d08ad,this['_continueCurrentRevision']=!0x1);}}else _0x5b6b9f&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x5b6b9f['toVersion'],this['editor']['model']['document']['history']['version']),_0x5b6b9f['fromVersion']===_0x5b6b9f['toVersion']?(0x0!==_0x5b6b9f['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x5b6b9f['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x5b6b9f['id'],this['_startingVersion']=_0x5b6b9f['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',_0x46ef=>!_0x46ef),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x45d774=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x166857;for(const _0x2f8c5f in _0x45d774){const _0x49ba4e=_0x2f8c5f,_0x3271df=_0x45d774[_0x49ba4e];if('revisionHistoryLicenseKeyValid'==_0x3271df||'revisionHistoryLicenseKeyInvalid'==_0x3271df||'revisionHistoryLicenseKeyExpired'==_0x3271df||'revisionHistoryLicenseKeyDomainLimit'==_0x3271df||'revisionHistoryLicenseKeyNotAllowed'==_0x3271df||'revisionHistoryLicenseKeyEvaluationLimit'==_0x3271df||'revisionHistoryLicenseKeyTrialLimit'==_0x3271df||'revisionHistoryLicenseKeyUsageLimit'==_0x3271df){delete _0x45d774[_0x49ba4e],_0x166857=_0x3271df,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x166857&&_0x45d774['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x166857&&_0x45d774['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x166857&&_0x45d774['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x166857&&_0x45d774['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x166857&&_0x45d774['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x166857&&_0x45d774['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x166857&&_0x45d774['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x13cdc3=this['repository']['getRevision'](0x0),_0x14a51f=await this['getRevisionDocumentData'](_0x13cdc3),_0x901d75=await this['getRevisionRootsAttributes'](_0x13cdc3);this['_replaceEditorDataWithRevisionData'](_0x14a51f,_0x901d75);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x8d0de0){this['_source']=_0x8d0de0;}async['update'](){const _0x5da65c=await this['_source']['getLatestVersion']();if(_0x5da65c>this['currentRevision']['toVersion']){await this['_loadState']();const _0x221fb0=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x5da65c});_0x221fb0['authors']=_0x221fb0['authorsIds']['map'](_0x2cf430=>this['editor']['plugins']['get']('Users')['getUser'](_0x2cf430)),this['currentRevision']['_update'](_0x221fb0);}}async['saveRevision'](_0x7c34d4={},_0xe603f9=null){const _0xc1ae6d=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0xe603f9>this['currentRevision']['toVersion']&&(_0xe603f9=null),null===_0xe603f9&&(_0xe603f9=await this['_source']['getLatestVersion']());const _0x41f88a=this['_getFromVersion'](_0xe603f9),_0x25cb0f=this['buildRevisionData']({'from':_0x41f88a,'to':_0xe603f9});if(this['currentRevision']['toVersion']<_0xe603f9){const _0x11a926=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0xe603f9,'to':_0xe603f9});_0x11a926['authors']=[],_0x11a926['authorsIds']=[],_0x11a926['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x11a926,!0x0),delete _0x11a926['authors'],_0xc1ae6d['push'](_0x11a926);}_0x7c34d4['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x7c34d4['name']=_0x7c34d4['name']||null,_0x7c34d4['id']=_0x7c34d4['id']||_0x272469(),_0x7c34d4={..._0x7c34d4,..._0x25cb0f};const _0x26af34=this['addRevisionData'](_0x7c34d4);_0xc1ae6d['push'](_0x7c34d4);const _0x108299=this['repository']['getIndex'](_0x26af34);if(0x0!==_0x108299){const _0xc629a7=this['repository']['getRevision'](_0x108299-0x1);if(_0xc629a7['fromVersion']!==_0xe603f9){const _0x2afd17=this['_revisionDataBuilder']['getData'](_0xe603f9,_0xc629a7['toVersion']),_0x1ae6ea={'id':_0xc629a7['id'],'diffData':_0x2afd17['diffData'],'authorsIds':_0x2afd17['authorsIds'],'authors':_0x2afd17['authorsIds']['map'](_0x585090=>this['editor']['plugins']['get']('Users')['getUser'](_0x585090)),'fromVersion':_0xe603f9};_0xc629a7===this['currentRevision']&&(_0x1ae6ea['createdAt']=new Date(_0x7c34d4['createdAt']['getTime']()+0xa)),_0xc629a7['_update'](_0x1ae6ea,!0x0),delete _0x1ae6ea['authors'],_0xc1ae6d['push'](_0x1ae6ea);}}if(this['adapter']){for(const _0x5bd7f6 of _0xc1ae6d)this['_bufferUpdate'](_0x5bd7f6['id'],_0x5bd7f6,!0x0);this['sendBufferedUpdates']();}return _0x26af34;}['addRevisionData'](_0x136fa9){const _0x2ac9a6=this['repository']['createRevision'](_0x136fa9);return this['adapter']&&_0x2ac9a6['on']('_update',(_0x156f54,_0xa6eb07,_0x3d841a)=>{_0x3d841a||(this['_bufferUpdate'](_0xa6eb07['id'],_0xa6eb07,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x2ac9a6,this['_findInsertionIndex'](_0x2ac9a6)),_0x2ac9a6;}async['getRevisionDocumentData'](_0x8b1068){return await this['_utils']['loadRevisionData'](_0x8b1068,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x8b1068);}async['getRevisionRootsAttributes'](_0xd7cce7){return await this['_utils']['loadRevisionData'](_0xd7cce7,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0xd7cce7);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x527d36=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x19a71e=0x0;_0x19a71e<_0x527d36['length'];_0x19a71e++){const _0x48b1ac=_0x527d36[_0x19a71e];let _0x30df10=!0x1;for(const _0x188225 of Object['keys'](_0x48b1ac))void 0x0===_0x48b1ac[_0x188225]?delete _0x48b1ac[_0x188225]:'id'!==_0x188225&&(_0x30df10=!0x0);_0x30df10||(_0x527d36[_0x19a71e]=null);}if(_0x527d36=_0x527d36['filter'](_0x21b6dc=>null!==_0x21b6dc),!_0x527d36['length'])return;for(let _0x2f5d47=0x0;_0x2f5d47<_0x527d36['length'];_0x2f5d47++){const _0x278a0b=_0x527d36[_0x2f5d47];void 0x0!==_0x278a0b['fromVersion']&&void 0x0===_0x278a0b['toVersion']&&(_0x278a0b['toVersion']=this['repository']['getRevision'](_0x278a0b['id'])['toVersion']),void 0x0!==_0x278a0b['toVersion']&&void 0x0===_0x278a0b['fromVersion']&&(_0x278a0b['fromVersion']=this['repository']['getRevision'](_0x278a0b['id'])['fromVersion']);}const _0xea612e=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x527d36,_0xea612e)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0xbd626c=>{if(_0xbd626c){for(const _0x55f0a8 of _0xbd626c)this['setRevisionData']({'id':_0x55f0a8['id'],'createdAt':_0x55f0a8['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x58274b=null,from:_0x2a8812=null,to:_0x183291=null}){_0x2a8812=null!==_0x2a8812?_0x2a8812:_0x58274b['fromVersion'],_0x183291=null!==_0x183291?_0x183291:_0x58274b['toVersion'];const _0x339f33=this['_revisionDataBuilder']['getData'](_0x2a8812,_0x183291),_0x4fc455={'diffData':_0x339f33['diffData'],'authorsIds':_0x339f33['authorsIds'],'fromVersion':_0x2a8812,'toVersion':_0x183291};if(!_0x58274b||_0x183291!==_0x58274b['toVersion']){const _0x8998a9=_0x183291-0x1,_0x1d52ee=this['_source']['history']['getOperation'](_0x8998a9);_0x4fc455['createdAt']=_0x1d52ee&&_0x1d52ee['createdAt']||new Date();}if(this['_loadedStateData']&&_0x2a8812===this['_loadedStateData']['fromVersion']){for(const _0x5393ce of this['_loadedStateData']['authors'])_0x4fc455['authorsIds']['includes'](_0x5393ce['id'])||_0x4fc455['authorsIds']['push'](_0x5393ce['id']);}return _0x4fc455;}['_bufferUpdate'](_0x7f786a,_0x45fd43,_0x544b49){if(this['_bufferedUpdates']['has'](_0x7f786a)){const _0x480e4c=this['_bufferedUpdates']['get'](_0x7f786a);_0x45fd43=_0x544b49?{..._0x480e4c,..._0x45fd43}:{..._0x45fd43,..._0x480e4c};}this['_bufferedUpdates']['set'](_0x7f786a,_0x45fd43);}['setRevisionData'](_0x5b2835){const _0x5a56c0=this['repository']['getRevision'](_0x5b2835['id']);if(_0x5b2835['createdAt']&&(_0x5b2835['createdAt']=new Date(_0x5b2835['createdAt'])),_0x5b2835['authorsIds']){const _0x287ad0=this['editor']['plugins']['get']('Users');_0x5b2835['authors']=_0x5b2835['authorsIds']['map'](_0x259429=>_0x287ad0['getUser'](_0x259429));}_0x5a56c0['_update'](_0x5b2835,!0x0);}['_createInitialRevision'](_0x510d4c){const _0x19fa07=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x19fa07)this['_initialRevisionId']=_0x19fa07['id'];else{const _0x1ba886=!this['editor']['model']['document']['roots']['find'](_0x4230c2=>this['editor']['model']['hasContent'](_0x4230c2)),_0x35c906=this['editor']['plugins']['get']('Users')['me']['id'],_0x1ec76f=R(this['editor']['locale'],_0x1ba886?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x510d4c,'to':_0x510d4c,'id':this['_initialRevisionId'],'name':_0x1ec76f,'creatorId':_0x35c906});}}['_createCurrentRevision'](_0x15ad14){const _0x3a4f30=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x3a4f30),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x15ad14,'to':_0x15ad14,'id':_0x3a4f30,'name':'','creatorId':null}));}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_utils']['loadRevisionData'](this['currentRevision'],this['adapter']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}['_replaceEditorDataWithRevisionData'](_0x59ba1c,_0xfcfd87){let _0x2f26d3=this['editor']['config']['get']('initialData'),_0x47b9ba=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x2f26d3){_0x2f26d3={};for(const _0x22ab82 of this['editor']['model']['document']['getRootNames']())_0x2f26d3[_0x22ab82]='';}if('string'==typeof _0x2f26d3&&(_0x2f26d3={'main':_0x2f26d3}),void 0x0===_0x47b9ba){_0x47b9ba={};for(const _0x158cb4 of this['editor']['model']['document']['getRootNames']())_0x47b9ba[_0x158cb4]={};}let _0x1e55ef=!0x1;const _0x2d45b8=Object['keys'](_0x2f26d3),_0x41c15a=Object['keys'](_0x59ba1c);for(const _0x3a02e7 of _0x2d45b8){if(_0x2f26d3[_0x3a02e7]!==_0x59ba1c[_0x3a02e7]&&''!==_0x2f26d3[_0x3a02e7]['trim']()){_0x1e55ef=!0x0;break;}if(!_0x140e1c(_0x47b9ba[_0x3a02e7],_0xfcfd87[_0x3a02e7])&&Object['keys'](_0x47b9ba[_0x3a02e7])['length']>0x0){_0x1e55ef=!0x0;break;}}_0x1e55ef||(_0x1e55ef=_0x41c15a['some'](_0x1b6869=>!this['editor']['model']['document']['getRoot'](_0x1b6869))),_0x1e55ef&&_0x305b84('editor-initial-data-replaced-with-revision-data',{'editorData':_0x2f26d3,'editorRootsAttributes':_0x47b9ba,'revisionData':_0x59ba1c,'revisionRootsAttributes':_0xfcfd87}),this['editor']['config']['set']('initialData',_0x59ba1c),this['editor']['config']['set']('rootsAttributes',_0xfcfd87);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x1ef376=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x1ef376['add'](R(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x43c2ef){const _0x4854c1=this['repository']['getRevisions']();_0x4854c1['reverse']();let _0x40f2b5=0x0;for(;_0x40f2b5<_0x4854c1['length'];){const _0x6a16ab=_0x4854c1[_0x40f2b5];if(_0x6a16ab===this['currentRevision']){_0x40f2b5++;continue;}if(_0x6a16ab['id']===this['_initialRevisionId'])break;const _0x5f3a9e=_0x43c2ef['toVersion']-_0x6a16ab['toVersion']||_0x43c2ef['fromVersion']-_0x6a16ab['fromVersion'];if(_0x5f3a9e>0x0)break;if(_0x5f3a9e<0x0)_0x40f2b5++;else{if(!_0x43c2ef['creator']&&_0x6a16ab['creator'])break;if(_0x6a16ab['creator']||!_0x43c2ef['creator']){if(_0x43c2ef['createdAt']>_0x6a16ab['createdAt'])break;_0x40f2b5++;}else _0x40f2b5++;}}return _0x40f2b5;}['_getFromVersion'](_0xebaac1){const _0x2ed701=this['repository']['getRevisions']();_0x2ed701['reverse'](),_0x2ed701['shift']();const _0x3b85b9=_0x2ed701['find'](_0xb6bd20=>_0xb6bd20['toVersion']<=_0xebaac1)['toVersion'];return _0x3b85b9<this['_startingVersion']?this['_startingVersion']:_0x3b85b9;}['_makeRevision']({name:_0x33d592,from:_0x1a0c06,to:_0x53cd75,creatorId:_0x1ef32f,id:_0x22f11a}){const _0x44a431=this['buildRevisionData']({'from':_0x1a0c06,'to':_0x53cd75});_0x44a431['name']=_0x33d592,_0x44a431['creatorId']=_0x1ef32f,_0x44a431['id']=_0x22f11a;const _0xe5088a=this['addRevisionData'](_0x44a431);return this['adapter']&&this['_bufferUpdate'](_0x44a431['id'],_0x44a431,!0x0),_0xe5088a;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class E{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x198c4d){this['editor']=_0x198c4d,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'](_0x1399d3){this['source']=_0x1399d3;const _0x247cb5=new Map(),_0x1ad46c=new Map(),_0x2958c9=this['editor']['model']['document']['roots']['map'](_0x2dcc38=>_0x2dcc38['rootName']);for(const _0x2991c1 of _0x2958c9){const _0x2f6b07=this['editor']['model']['document']['getRoot'](_0x2991c1),_0x468d29=x(_0x2f6b07);_0x247cb5['set'](_0x2991c1,_0x468d29),_0x1ad46c['set'](_0x2991c1,Object['fromEntries'](_0x2f6b07['getAttributes']()));}const _0x1a5556=Array['from'](this['editor']['model']['markers'])['map'](_0x34b9fb=>[_0x34b9fb['name'],_0x34b9fb['getRange']()]),_0x46ec61=this['source']['version'];this['_saveMetaData'](_0x46ec61,_0x247cb5,_0x1a5556,_0x1ad46c),this['_startingRevisionId']=this['_revisionId'];const _0x1f5662=new Map(),_0x1b730e=new Map();for(const _0x20c736 of _0x2958c9){const _0x7caa4a=N(_0x20c736);_0x1f5662['set'](_0x20c736,_0x7caa4a),_0x1b730e['set'](_0x20c736,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x1f5662,[],_0x1b730e);}['getData'](_0x2aa37d,_0x4c855d){if(this['_lastFrom']===_0x2aa37d&&this['_lastTo']<=_0x4c855d)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x4c855d,!0x0);else{if(!this['_savedMetaData']['has'](_0x2aa37d)){const _0x411adb=this['_getPreviousFrom'](_0x2aa37d);this['_calculateMetaData'](_0x411adb,_0x2aa37d,!0x1);}this['_calculateMetaData'](_0x2aa37d,_0x4c855d,!0x0);}return this['_lastFrom']=_0x2aa37d,this['_lastTo']=_0x4c855d,this['_getState']();}['loadState'](_0x394797){const _0x140ee0=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x394797['fromVersion'],this['_lastTo']=_0x394797['toVersion'];for(const _0x5e01a5 in _0x394797['diffData']){const _0x43e954=_0x394797['diffData'][_0x5e01a5]['attachChange'],_0x9c4e5a=_0x37d460(_0x394797['diffData'][_0x5e01a5]['attributesBefore'])||{},_0xc04bf8=_0x140ee0['_makeModelFromViewString'](_0x394797['diffData'][_0x5e01a5]['deletions']);_0xc04bf8['rootName']=_0x5e01a5,_0xc04bf8['_isAttached']=!_0x43e954||!_0x43e954['isAttached'],_0xc04bf8['isAttached']=()=>_0xc04bf8['_isAttached'],this['_baseRoots']['set'](_0x5e01a5,_0xc04bf8),this['_baseRootsAttributes']['set'](_0x5e01a5,_0x9c4e5a),_0x43e954&&this['_touchedRoots']['set'](_0x5e01a5,_0x43e954);const _0x12f179=this['_makeIdsRoot'](_0xc04bf8);this['_baseIdsRoots']['set'](_0x5e01a5,_0x12f179);for(const [_0x440d9a,_0x2e0783]of _0xc04bf8['markers']){if(!_0x440d9a['startsWith']('revision:'))continue;const _0x20ccd9=_0x440d9a['split'](':')[0x2];for(const _0x47611d of _0x2e0783['getWalker']({'singleCharacters':!0x0})){const _0x198849=this['_getVidAttributeName'](_0x47611d),_0x19e8b6='elementEnd'==_0x47611d['type']?_0x47611d['previousPosition']['path']['slice'](0x0,-0x1):_0x47611d['previousPosition']['path'],_0x481ac6=_0x12f179['getNodeByPath'](_0x19e8b6)['getAttribute'](_0x198849);this['_touched']['set'](_0x481ac6,{'userId':_0x20ccd9});}}}this['_startingRevisionId']=this['_revisionId'];const _0x4f287a=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x4cb886=>!this['_touched']['has'](_0x4cb886));let _0x32c357=0x0;const _0x257885=new Map();for(const _0x4f1703 in _0x394797['diffData']){const _0x5ee82d=_0x394797['diffData'][_0x4f1703]['attachChange'],_0x25c132=_0x37d460(_0x394797['diffData'][_0x4f1703]['attributesAfter'])||{},_0x18ad1c=_0x140ee0['_makeModelFromViewString'](_0x394797['diffData'][_0x4f1703]['insertions']);_0x18ad1c['rootName']=_0x4f1703,_0x18ad1c['_isAttached']=!_0x5ee82d||_0x5ee82d['isAttached'],_0x18ad1c['isAttached']=()=>_0x18ad1c['_isAttached'],this['_diffRoots']['set'](_0x4f1703,_0x18ad1c),this['_diffRootsAttributes']['set'](_0x4f1703,_0x25c132);const _0x37257b=this['_makeIdsRoot'](_0x18ad1c,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x4f1703,_0x37257b),_0x257885['set'](_0x4f1703,_0x18ad1c['isAttached']()?_0x25c132:{});for(const [_0x4719e2,_0x4e8c8b]of _0x18ad1c['markers']){if(!_0x4719e2['startsWith']('revision:'))continue;const _0x329a3e=_0x4719e2['split'](':')[0x2];for(const _0x41cd65 of _0x4e8c8b['getWalker']({'singleCharacters':!0x0})){const _0x30f877=this['_getVidAttributeName'](_0x41cd65),_0x57b209=this['_revisionId']++,_0x53fef9='elementEnd'==_0x41cd65['type']?_0x41cd65['previousPosition']['path']['slice'](0x0,-0x1):_0x41cd65['previousPosition']['path'];_0x37257b['getNodeByPath'](_0x53fef9)['_setAttribute'](_0x30f877,_0x57b209),this['_touched']['set'](_0x57b209,{'userId':_0x329a3e});}}for(const _0x201b73 of this['editor']['model']['createRangeIn'](_0x18ad1c)['getWalker']({'singleCharacters':!0x0})){const _0x29d4d7=this['_getVidAttributeName'](_0x201b73),_0x3abe1e='elementEnd'==_0x201b73['type']?_0x201b73['previousPosition']['path']['slice'](0x0,-0x1):_0x201b73['previousPosition']['path'],_0x52ba84=_0x37257b['getNodeByPath'](_0x3abe1e);_0x52ba84['getAttribute'](_0x29d4d7)>0x0||_0x52ba84['_setAttribute'](_0x29d4d7,_0x4f287a[_0x32c357++]);}for(const [_0xfc1e2a,_0x564c91]of _0x18ad1c['markers'])_0xfc1e2a['startsWith']('revision:')||this['_markers']['set'](_0xfc1e2a,_0x564c91);}const _0x1ddac9=N('$graveyard');this['_baseRoots']['set']('$graveyard',_0x1ddac9),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x1ddac9,0x1));const _0x31877a=N('$graveyard');this['_diffRoots']['set']('$graveyard',_0x31877a),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x31877a,0x1));const _0x3990a3=Array['from'](this['_diffRoots'])['map'](([_0x546466,_0x2235d1])=>[_0x546466,x(_0x2235d1)]);this['_saveMetaData'](this['_lastTo'],_0x3990a3,this['_markers'],_0x257885);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x313d71,_0x3b12b0,_0x5d6864,_0x308b91){const _0x5a35a2=new Map(_0x3b12b0),_0x303f8b=new Map(_0x37d460(_0x308b91)),_0x987c0=new Map();for(const [_0x14466e,_0x4706d1]of _0x5d6864)_0x987c0['set'](_0x14466e,{'start':_0x4706d1['start']['clone'](),'end':_0x4706d1['end']['clone'](),'rootName':_0x4706d1['root']['rootName']});this['_savedMetaData']['set'](_0x313d71,{'roots':_0x5a35a2,'markers':_0x987c0,'rootsAttributes':_0x303f8b});}['_removeMetaData'](_0x336abf){this['_savedMetaData']['delete'](_0x336abf);}['_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'](_0x25cf2d,_0x19ed55=null){let _0x5687fc=null;_0x25cf2d['is']('documentFragment')||(_0x5687fc=new _0x5a3bc2(_0x25cf2d['name'],{'vid_start':null===_0x19ed55?this['_revisionId']++:_0x19ed55++}));const _0x290a9f=[];for(const _0x966fd4 of _0x25cf2d['getChildren']())if(_0x966fd4['is']('element')){_0x290a9f['push'](this['_makeIdsRoot'](_0x966fd4,_0x19ed55));const _0x11ee0e=_0x290a9f[_0x290a9f['length']-0x1];null!==_0x19ed55&&(_0x19ed55=_0x11ee0e['is']('element','$text')?_0x11ee0e['getAttribute']('vid')+0x1:_0x11ee0e['getAttribute']('vid_end')+0x1);}else{for(let _0xc18a90=0x0;_0xc18a90<_0x966fd4['offsetSize'];_0xc18a90++)_0x290a9f['push'](new _0x5a3bc2('$text',{'vid':null===_0x19ed55?this['_revisionId']++:_0x19ed55++}));}if(_0x25cf2d['is']('documentFragment')){const _0x167198=N(_0x25cf2d['rootName']);return _0x167198['_insertChild'](0x0,_0x290a9f),_0x167198;}return _0x5687fc['_setAttribute']('vid_end',null===_0x19ed55?this['_revisionId']++:_0x19ed55++),_0x5687fc['_insertChild'](0x0,_0x290a9f),_0x5687fc;}['_calculateMetaData'](_0x3fe37c,_0x23ad77,_0x744f96){this['_reset']();const {roots:_0x3a5bb2,markers:_0x4ffcff,rootsAttributes:_0x418fd1}=this['_savedMetaData']['get'](_0x3fe37c);this['_baseRoots']=new Map(_0x3a5bb2),this['_baseRootsAttributes']=new Map(_0x37d460(_0x418fd1));for(const [_0x287de5,_0xd103e7]of this['_baseRoots'])if('$graveyard'!==_0x287de5&&(this['_diffRoots']['set'](_0x287de5,x(_0xd103e7)),this['_diffRootsAttributes']=new Map(_0x37d460(_0x418fd1)),_0x744f96)){const _0x272b0e=this['_revisionId'];this['_idsRoots']['set'](_0x287de5,this['_makeIdsRoot'](_0xd103e7)),this['_baseIdsRoots']['set'](_0x287de5,this['_makeIdsRoot'](_0xd103e7,_0x272b0e));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',x(this['_baseRoots']['get']('$graveyard'))),_0x744f96&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x2c4a90,_0x277957]of _0x4ffcff){const _0x13d55b=this['_baseRoots']['get'](_0x277957['rootName']),_0x2f5a75=this['_diffRoots']['get'](_0x277957['rootName']),_0x5c6099=new _0x20eafd(this['_fixPosition'](_0x277957['start'],_0x13d55b),this['_fixPosition'](_0x277957['end'],_0x13d55b)),_0x1816e9=this['_fixRange'](_0x5c6099,_0x2f5a75);_0x13d55b['markers']['set'](_0x2c4a90,_0x5c6099),this['_markers']['set'](_0x2c4a90,_0x1816e9);}this['_applyOperations'](_0x3fe37c,_0x23ad77,_0x744f96);}['_applyOperations'](_0x3e4fc1,_0x5ad6fc,_0x3c4209){for(const _0x5abf37 of this['source']['getOperations'](_0x3e4fc1,_0x5ad6fc))this['_handleOperation'](_0x5abf37,_0x3c4209);for(const _0x194a4f of this['_diffRoots']['values']())_0x194a4f['markers']['clear']();for(const [_0x688476,_0xd73e52]of this['_markers']){this['_diffRoots']['get'](_0xd73e52['root']['rootName'])['markers']['set'](_0x688476,_0xd73e52['clone']());}const _0x5ccc0c=new Map(),_0x21a253=new Map();for(const [_0x2c0b18,_0x470715]of this['_diffRoots'])_0x5ccc0c['set'](_0x2c0b18,x(_0x470715)),_0x21a253['set'](_0x2c0b18,this['_diffRootsAttributes']['get'](_0x2c0b18));this['_saveMetaData'](_0x5ad6fc,_0x5ccc0c,this['_markers'],_0x21a253);}['_getPreviousFrom'](_0x3f4cde){const _0xe19964=Array['from'](this['_savedMetaData']['keys']());_0xe19964['sort']((_0x44a2b3,_0x4b492b)=>_0x44a2b3-_0x4b492b),_0xe19964['reverse']();for(const _0x444a2c of _0xe19964)if(_0x444a2c<_0x3f4cde)return _0x444a2c;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x5828a9,_0x52068a){const _0x38fd06=Array['from'](_0x52068a['markers'])['map'](([_0x5b1ddc,_0x20cc40])=>[_0x5b1ddc,this['_fixRange'](_0x20cc40,_0x5828a9)]);_0x5828a9['markers']=new Map(_0x38fd06);}['_transformMarkers'](_0x48229e){for(const _0x4698cb of this['_markers']['values']()){const _0x4de481=_0x4698cb['getTransformedByOperation'](_0x48229e),_0x2053bc=_0x20eafd['_createFromRanges'](_0x4de481);_0x4698cb['start']=_0x2053bc['start'],_0x4698cb['end']=_0x2053bc['end'];}}['_handleOperation'](_0x29eaba,_0x3f2da8){if('addRoot'!=_0x29eaba['type']&&'detachRoot'!=_0x29eaba['type']){if('insert'==_0x29eaba['type']){const _0x45b0eb=_0x29eaba['position']['root']['rootName'];this['_diffRoots']['has'](_0x45b0eb)||(this['_diffRoots']['set'](_0x45b0eb,N(_0x45b0eb,!0x0)),this['_diffRootsAttributes']['set'](_0x45b0eb,{}),_0x3f2da8&&this['_idsRoots']['set'](_0x45b0eb,N(_0x45b0eb,!0x0)));}else{if('addRootAttribute'==_0x29eaba['type']||'removeRootAttribute'==_0x29eaba['type']||'changeRootAttribute'==_0x29eaba['type'])return void this['_handleRootAttributeOperation'](_0x29eaba);'marker'==_0x29eaba['type']&&this['_handleMarkerOperation'](_0x29eaba);}if('marker'!==_0x29eaba['type']){const _0x3a4592=this['_cloneOperation'](_0x29eaba,this['_diffRoots']);_0x3a4592['_execute'](),this['_transformMarkers'](_0x3a4592);}if(_0x3f2da8)switch(_0x29eaba['type']){case'insert':this['_handleInsertOperation'](_0x29eaba);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x29eaba);break;case'merge':this['_handleMergeOperation'](_0x29eaba);break;case'split':this['_handleSplitOperation'](_0x29eaba);}}else this['_handleRootOperation'](_0x29eaba,_0x3f2da8);}['_cloneOperation'](_0x146289,_0x3ab4ad){const _0x4b7e97=_0x146289['clone']();return _0x4b7e97['_authorId']=_0x146289['_authorId'],this['_fixOperation'](_0x4b7e97,_0x3ab4ad),_0x4b7e97;}['_getBaseVids'](_0x1dc894){return _0x1dc894['map'](_0x60e884=>{const _0x5ba790=this['_getVidAttributeName'](_0x60e884);return Number(_0x60e884['item']['getAttribute'](_0x5ba790));});}['_generateTape'](_0xe4efe5,_0x58f1ab){if(_0xe4efe5['is']('element','$text'))_0x58f1ab['push']({'item':_0xe4efe5,'type':'text'});else{_0xe4efe5['is']('element')&&_0x58f1ab['push']({'item':_0xe4efe5,'type':'elementStart'});for(const _0x13e17c of _0xe4efe5['getChildren']())this['_generateTape'](_0x13e17c,_0x58f1ab);_0xe4efe5['is']('element')&&_0x58f1ab['push']({'item':_0xe4efe5,'type':'elementEnd'});}return _0x58f1ab;}['_getState'](){const _0x4df542=new Map(this['_touched']),_0x313d12=new Map(_0x4df542),_0x3036d7=new Map(),_0x21af31={'insertions':{},'deletions':{}},_0x4699de={'insertions':{},'deletions':{}},_0x4b5da1=new Map(),_0x6fd214=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x6fd214['delete']('$graveyard');for(const _0x5ea27e of _0x6fd214){const _0x119c59=this['_diffRoots']['get'](_0x5ea27e)||N(_0x5ea27e,!0x1),_0x12534d=this['_baseRoots']['get'](_0x5ea27e)||N(_0x5ea27e,!0x1);_0x119c59['isAttached']()||_0x12534d['isAttached']()?(_0x21af31['insertions'][_0x5ea27e]=x(_0x119c59),_0x21af31['deletions'][_0x5ea27e]=x(_0x12534d),this['_copyMarkers'](_0x21af31['deletions'][_0x5ea27e],_0x12534d),this['_copyMarkers'](_0x21af31['insertions'][_0x5ea27e],_0x119c59),_0x4699de['insertions'][_0x5ea27e]=this['_generateTape'](this['_idsRoots']['get'](_0x5ea27e),[]),_0x4699de['deletions'][_0x5ea27e]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x5ea27e)||N(_0x5ea27e,!0x1),[])):_0x6fd214['delete'](_0x5ea27e);}for(const _0x178d8c of _0x6fd214){const _0x21ef9f=_0x4699de['insertions'][_0x178d8c];for(const _0x5ade98 of _0x21ef9f){const _0x3662d5=this['_getVidAttributeName'](_0x5ade98),_0x588ed1=_0x5ade98['item']['getAttribute'](_0x3662d5);_0x313d12['delete'](_0x588ed1),_0x588ed1>=this['_startingRevisionId']&&_0x3036d7['set'](_0x588ed1,_0x4df542['get'](_0x588ed1));}}for(const _0x575415 of _0x6fd214){const _0x546249=_0x4699de['insertions'][_0x575415],_0x55db96=this['_getBaseVids'](_0x4699de['deletions'][_0x575415]);let _0x14cd75=0x0;for(const _0x7fcb18 of _0x546249){const _0x35cdc2=this['_getVidAttributeName'](_0x7fcb18),_0x5a83b0=_0x7fcb18['item']['getAttribute'](_0x35cdc2);if(!_0x3036d7['has'](_0x5a83b0)&&!_0x4b5da1['has'](_0x5a83b0)){if(_0x313d12['has'](_0x5a83b0))_0x14cd75++;else{if(_0x5a83b0!=_0x55db96[_0x14cd75]){const _0x2ca92a=_0x4df542['get'](_0x5a83b0)||_0x4df542['get'](_0x55db96[_0x14cd75]);for(;_0x5a83b0!=_0x55db96[_0x14cd75];)_0x313d12['has'](_0x55db96[_0x14cd75])||(_0x4b5da1['set'](_0x55db96[_0x14cd75],_0x2ca92a),_0x4df542['set'](_0x55db96[_0x14cd75],_0x2ca92a)),_0x14cd75++;}_0x14cd75++;}}}}for(const _0x4ee737 of _0x6fd214){const _0x59f4b3=_0x4699de['insertions'][_0x4ee737];for(const _0x122566 of _0x59f4b3){const _0x2dd13a=this['_getVidAttributeName'](_0x122566),_0xe04be=_0x122566['item']['getAttribute'](_0x2dd13a);if(_0x4b5da1['has'](_0xe04be)){const _0x386252=_0x4b5da1['get'](_0xe04be);_0x313d12['has'](_0xe04be)||_0x313d12['set'](_0xe04be,{..._0x386252}),_0x3036d7['set'](_0xe04be,{..._0x386252});}}}for(const _0x3413c0 of _0x313d12['keys']())_0x3413c0>=this['_startingRevisionId']&&_0x313d12['delete'](_0x3413c0);const _0xa2cb51=new Map();for(const _0x27576b of _0x6fd214){let _0x33e167=_0x4699de['insertions'][_0x27576b];for(const _0x494cc5 of _0x33e167)if(_0x494cc5['item']['is']('element','tableCell')){const _0x243fff=this['_getVidAttributeName'](_0x494cc5),_0x551f96=_0x494cc5['item']['getAttribute'](_0x243fff);if(_0x3036d7['has'](_0x551f96)){const _0x34ced=_0x494cc5['item']['parent']['parent']['getAttribute']('vid_start'),_0x26485a=_0xa2cb51['get'](_0x34ced)||new Set();_0x26485a['add'](_0x3036d7['get'](_0x551f96)['userId']),_0xa2cb51['set'](_0x34ced,_0x26485a);}}_0x33e167=_0x4699de['deletions'][_0x27576b];for(const _0x1333cd of _0x33e167)if(_0x1333cd['item']['is']('element','tableCell')){const _0x375eaa=this['_getVidAttributeName'](_0x1333cd),_0x583806=_0x1333cd['item']['getAttribute'](_0x375eaa);if(_0x313d12['has'](_0x583806)){const _0x40768f=_0x1333cd['item']['parent']['parent']['getAttribute']('vid_start'),_0x56e5ec=_0xa2cb51['get'](_0x40768f)||new Set();_0x56e5ec['add'](_0x313d12['get'](_0x583806)['userId']),_0xa2cb51['set'](_0x40768f,_0x56e5ec);}}for(const _0x4d9107 of _0xa2cb51['keys']())(_0x3036d7['has'](_0x4d9107)||_0x313d12['has'](_0x4d9107))&&_0xa2cb51['delete'](_0x4d9107);}for(const _0x25df85 of _0x6fd214){const _0x5d3e26=_0x4699de['insertions'][_0x25df85];let _0x49dc95=null,_0x2129bd=null;for(const _0x12ef6d of _0x5d3e26){const _0x1dd6ea=this['_getVidAttributeName'](_0x12ef6d),_0x2e3e57=_0x12ef6d['item']['getAttribute'](_0x1dd6ea),_0x344cca=_0xa2cb51['get'](_0x2e3e57);_0x344cca&&'elementStart'==_0x12ef6d['type']&&(_0x49dc95=Array['from'](_0x344cca)[0x0],_0x2129bd=_0x12ef6d['item']['getAttribute']('vid_end')),_0x49dc95&&(_0x313d12['set'](_0x2e3e57,{'userId':_0x49dc95}),_0x3036d7['set'](_0x2e3e57,{'userId':_0x49dc95})),_0x2e3e57==_0x2129bd&&(_0x49dc95=null,_0x2129bd=null);}}const _0x3ad0da={},_0x14f2f6=new Set();for(const _0x396750 of _0x6fd214){const _0x3009b1=_0x21af31['deletions'][_0x396750],_0x39b19c=_0x21af31['insertions'][_0x396750];for(const {userId:_0x201359}of this['_touchedMarkers']['values']())null!==_0x201359&&_0x14f2f6['add'](_0x201359);for(const {userId:_0x5c1ef9}of this['_touchedRoots']['values']())null!==_0x5c1ef9&&_0x14f2f6['add'](_0x5c1ef9);this['_markChanges'](_0x39b19c,_0x4699de['insertions'][_0x396750],_0x3036d7,'insertion',_0x14f2f6),this['_markChanges'](_0x3009b1,_0x4699de['deletions'][_0x396750],_0x313d12,'deletion',_0x14f2f6),_0x3ad0da[_0x396750]={'insertions':this['_prepareViewToSave'](_0x39b19c),'deletions':this['_prepareViewToSave'](_0x3009b1),'attachChange':this['_touchedRoots']['get'](_0x396750)||null,'attributesBefore':_0x37d460(this['_baseRootsAttributes']['get'](_0x396750))||{},'attributesAfter':_0x37d460(this['_diffRootsAttributes']['get'](_0x396750))};}return{'diffData':_0x3ad0da,'authorsIds':Array['from'](_0x14f2f6)};}['_processRootBeforeSave'](_0x590396){for(const [,_0x104bb2]of _0x590396['markers']){const _0x478fc1=_0x104bb2['start']['getAncestors']()['filter'](_0x5925c3=>'tableCell'==_0x5925c3['name']);for(const _0x33e96 of _0x478fc1)0x1==_0x33e96['childCount']&&_0x33e96['getChild'](0x0)['is']('element','paragraph')&&_0x33e96['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x24f642){this['_processRootBeforeSave'](_0x24f642);const _0xb77960=this['editor']['data']['toView'](_0x24f642,{}),_0x4f0653=Array['from'](_0xb77960['getChildren']())['map'](_0x2e968a=>this['_getViewJson'](_0x2e968a));return JSON['stringify'](_0x4f0653);}['_getViewJson'](_0x3882fb){if(_0x3882fb['is']('$text'))return _0x3882fb['data'];{const _0x29c6a4=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x4ee27b=_0x3882fb,_0x49d584=this['editor']['data']['htmlProcessor']['domConverter'],_0x5b3584={'type':_0x29c6a4['_getTypeCharForViewElement'](_0x4ee27b),'name':_0x4ee27b['name'],'attributes':Array['from'](_0x4ee27b['getAttributes']()),'children':Array['from'](_0x4ee27b['getChildren']())['map'](_0x4cfc71=>this['_getViewJson'](_0x4cfc71))};if(_0x3882fb['is']('uiElement')&&'$comment'!=_0x3882fb['name']){const _0x22f8be=_0x3882fb['render'](_0x49d584['domDocument'],_0x49d584);_0x5b3584['children']['push'](_0x22f8be['outerHTML']);}else{if(_0x3882fb['is']('rawElement')){const _0x375abe=_0x49d584['domDocument']['createElement'](_0x4ee27b['name']);_0x3882fb['render'](_0x375abe,_0x49d584),_0x5b3584['children']['push'](_0x375abe['innerHTML']);}}const _0x13c8f6=Array['from'](_0x4ee27b['getCustomProperties']());_0x13c8f6['length']>0x0&&(_0x5b3584['customProperties']=_0x13c8f6);const _0x31aa45=_0x4ee27b['getFillerOffset']();return null!==_0x31aa45&&(_0x5b3584['fillerOffset']=_0x31aa45),_0x5b3584;}}['_markChanges'](_0x40a6f0,_0x1bad0e,_0x13f0fd,_0x6f56f4,_0x50207e){let _0x11ec75=null,_0x50a77a=null,_0x1c5e90=0x0;const _0x1e6184=this['editor']['model'];for(let _0x2ce6e3=0x0;_0x2ce6e3<_0x1bad0e['length'];_0x2ce6e3++){const _0x4a35b=this['_getVidAttributeName'](_0x1bad0e[_0x2ce6e3]),_0x1fe5ec=_0x1bad0e[_0x2ce6e3]['item']['getAttribute'](_0x4a35b),_0xde789b=_0x13f0fd['get'](_0x1fe5ec),_0x416b97=_0x2ce6e3==_0x1bad0e['length']-0x1;(!_0x11ec75&&_0xde789b&&(_0x11ec75=_0xde789b,_0x50a77a=_0x1bad0e[_0x2ce6e3]),_0x11ec75&&(!_0xde789b||_0xde789b['userId']!=_0x11ec75['userId']))&&(_0x30b3fa(_0xde789b,P(_0x50a77a,_0x40a6f0,_0x1e6184),P(_0x1bad0e[_0x2ce6e3],_0x40a6f0,_0x1e6184)),_0x11ec75=_0xde789b||null,_0x50a77a=_0xde789b?_0x1bad0e[_0x2ce6e3]:null),_0x11ec75&&_0x416b97&&_0x30b3fa(_0xde789b,P(_0x50a77a,_0x40a6f0,_0x1e6184),V(_0x1bad0e[_0x2ce6e3],_0x40a6f0,_0x1e6184));}function _0x30b3fa(_0x1ace27,_0x147b59,_0x4ac26f){const _0x5895e1=_0x11ec75['userId'],_0x239a88='revision:'+_0x6f56f4+':'+_0x5895e1+':'+_0x1c5e90++,_0x2765f2=_0x1e6184['createRange'](_0x147b59,_0x4ac26f);_0x40a6f0['markers']['set'](_0x239a88,_0x2765f2),null!==_0x5895e1&&_0x50207e['add'](_0x5895e1);}}['_getVidAttributeName'](_0x26ab0b){switch(_0x26ab0b['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x466f7d,_0x40d8b3){_0x466f7d['baseVersion']=null;for(const _0x164376 in _0x466f7d){const _0x3f803b=_0x466f7d[_0x164376];if(_0x3f803b instanceof _0x195f9a){const _0x1c9fbc=_0x40d8b3['get'](_0x3f803b['root']['rootName']);_0x466f7d[_0x164376]=this['_fixPosition'](_0x3f803b,_0x1c9fbc);}if(_0x3f803b instanceof _0x20eafd){const _0x11f3f8=_0x40d8b3['get'](_0x3f803b['root']['rootName']);_0x466f7d[_0x164376]=this['_fixRange'](_0x3f803b,_0x11f3f8);}'root'===_0x164376&&(_0x466f7d['root']=_0x40d8b3['get'](_0x466f7d['root']['rootName']));}}['_fixRange'](_0x586247,_0x2ab3eb){return this['editor']['model']['createRange'](this['_fixPosition'](_0x586247['start'],_0x2ab3eb),this['_fixPosition'](_0x586247['end'],_0x2ab3eb));}['_fixPosition'](_0x235052,_0xec995c){return this['editor']['model']['createPositionFromPath'](_0xec995c,_0x235052['path'],_0x235052['stickiness']);}['_handleInsertOperation'](_0x3f2185){const _0x4927ec=this['_idsRoots']['get'](_0x3f2185['position']['root']['rootName']),_0xdd73fb=this['_fixPosition'](_0x3f2185['position'],_0x4927ec),_0x3d42f4=null===_0x3f2185['_authorId']?null:_0x3f2185['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x53e41e=_0xdd73fb['parent'],_0x2b243f=this['_revisionId'],_0x779b5d=[];for(const _0x5b2b47 of _0x3f2185['nodes'])if(_0x5b2b47['is']('element'))_0x779b5d['push'](this['_makeIdsRoot'](_0x5b2b47));else{for(let _0x9fd3a2=0x0;_0x9fd3a2<_0x5b2b47['offsetSize'];_0x9fd3a2++)_0x779b5d['push'](new _0x5a3bc2('$text',{'vid':this['_revisionId']++}));}const _0x25fc8a=this['_revisionId'];for(let _0x1e2226=_0x2b243f;_0x1e2226<_0x25fc8a;_0x1e2226++)this['_touched']['set'](_0x1e2226,{'userId':_0x3d42f4});_0x53e41e['_insertChild'](_0xdd73fb['offset'],_0x779b5d);}['_handleMoveOperation'](_0x5388d7){(_0x5388d7=this['_cloneOperation'](_0x5388d7,this['_idsRoots']))['_execute']();const _0xe722df=null===_0x5388d7['_authorId']?null:_0x5388d7['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5d4ca6=_0x5388d7['getMovedRangeStart'](),_0x2553f5=_0x5d4ca6['parent'],_0x4c6593=_0x5d4ca6['offset'];!function _0x4249d8(_0x39fe5a,_0x4bfe12,_0xd3020d,_0xa1dd28){for(let _0x424c37=_0xd3020d;_0x424c37<_0xa1dd28;_0x424c37++){const _0x4c6541=_0x4bfe12['getChild'](_0x424c37);_0x4c6541['is']('element','$text')?_0x39fe5a['set'](_0x4c6541['getAttribute']('vid'),{'userId':_0xe722df}):(_0x39fe5a['set'](_0x4c6541['getAttribute']('vid_start'),{'userId':_0xe722df}),_0x4249d8(_0x39fe5a,_0x4c6541,0x0,_0x4c6541['childCount']),_0x39fe5a['set'](_0x4c6541['getAttribute']('vid_end'),{'userId':_0xe722df}));}}(this['_touched'],_0x2553f5,_0x4c6593,_0x4c6593+_0x5388d7['howMany']);}['_handleMergeOperation'](_0xfa89b8){const _0x1ebf99=null===(_0xfa89b8=this['_cloneOperation'](_0xfa89b8,this['_idsRoots']))['_authorId']?null:_0xfa89b8['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x17f031=_0xfa89b8['targetPosition']['parent'],_0x288eb3=_0xfa89b8['sourcePosition']['parent'],_0x3fc0d2=_0x17f031['getAttribute']('vid_end'),_0x2bd2e2=_0x288eb3['getAttribute']('vid_start');_0x17f031['_setAttribute']('vid_end',_0x288eb3['getAttribute']('vid_end')),_0x288eb3['_setAttribute']('vid_end',_0x3fc0d2),this['_touched']['set'](_0x2bd2e2,{'userId':_0x1ebf99}),this['_touched']['set'](_0x3fc0d2,{'userId':_0x1ebf99}),_0xfa89b8['_execute']();}['_handleSplitOperation'](_0x76a735){const _0x3f88c0=null===(_0x76a735=this['_cloneOperation'](_0x76a735,this['_idsRoots']))['_authorId']?null:_0x76a735['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x28a787=_0x76a735['graveyardPosition'],_0x54ea9a=_0x76a735['splitPosition']['parent'];_0x76a735['_execute']();const _0x26fd36=_0x54ea9a['getAttribute']('vid_end'),_0x1b37c2=_0x76a735['insertionPosition']['nodeAfter'];if(_0x28a787){const _0x1dbf41=_0x1b37c2['getAttribute']('vid_end'),_0x266923=_0x54ea9a['getAttribute']('vid_end');_0x54ea9a['_setAttribute']('vid_end',_0x1dbf41),_0x1b37c2['_setAttribute']('vid_end',_0x266923),this['_touched']['set'](_0x54ea9a['getAttribute']('vid_end'),{'userId':_0x3f88c0}),this['_touched']['set'](_0x1b37c2['getAttribute']('vid_start'),{'userId':_0x3f88c0});}else{const _0x2507bd=this['_revisionId']++,_0x5a4a01=this['_revisionId']++;_0x54ea9a['_setAttribute']('vid_end',_0x2507bd),_0x1b37c2['_setAttribute']('vid_start',_0x5a4a01),_0x1b37c2['_setAttribute']('vid_end',_0x26fd36),this['_touched']['set'](_0x2507bd,{'userId':_0x3f88c0}),this['_touched']['set'](_0x5a4a01,{'userId':_0x3f88c0});}}['_handleMarkerOperation'](_0x4b80aa){if(!_0x4b80aa['affectsData'])return;const _0x46f3ee=(_0x4b80aa=this['_cloneOperation'](_0x4b80aa,this['_diffRoots']))['oldRange']?_0x4b80aa['oldRange']['root']:null,_0x2209ac=_0x4b80aa['newRange']?_0x4b80aa['newRange']['root']:null;_0x46f3ee&&this['_markers']['delete'](_0x4b80aa['name']),_0x2209ac&&this['_markers']['set'](_0x4b80aa['name'],_0x4b80aa['newRange']['clone']());const _0x1271e5=null===_0x4b80aa['_authorId']?null:_0x4b80aa['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x405a7f=_0x4b80aa['name'];if(!this['_touchedMarkers']['has'](_0x405a7f))return void this['_touchedMarkers']['set'](_0x405a7f,{'range':_0x4b80aa['oldRange'],'userId':_0x1271e5});const _0x381f97=this['_touchedMarkers']['get'](_0x405a7f),_0x5a2adb=_0x381f97['range'],_0x5b61bd=_0x4b80aa['newRange'];null==_0x5a2adb&&null==_0x5b61bd||_0x5a2adb&&_0x5b61bd&&_0x5a2adb['isEqual'](_0x5b61bd)?this['_touchedMarkers']['delete'](_0x4b80aa['name']):_0x381f97['userId']=_0x1271e5;}['_handleRootOperation'](_0x51df60,_0x344705){this['_diffRoots']['has'](_0x51df60['rootName'])?this['_diffRoots']['get'](_0x51df60['rootName'])['_isAttached']=_0x51df60['isAdd']:(this['_diffRoots']['set'](_0x51df60['rootName'],N(_0x51df60['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x51df60['rootName'],{}),_0x344705&&this['_idsRoots']['set'](_0x51df60['rootName'],N(_0x51df60['rootName'],!0x0)));const _0x36c92d=null===_0x51df60['_authorId']?null:_0x51df60['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3e86f8=this['_touchedRoots']['get'](_0x51df60['rootName']);_0x3e86f8&&_0x3e86f8['userId']===_0x36c92d?this['_touchedRoots']['delete'](_0x51df60['rootName']):this['_touchedRoots']['set'](_0x51df60['rootName'],{'userId':_0x36c92d,'isAttached':_0x51df60['isAdd']});}['_handleRootAttributeOperation'](_0x1dc672){const _0x94e1d8=this['_diffRootsAttributes']['get'](_0x1dc672['root']['rootName']);null===_0x1dc672['newValue']?delete _0x94e1d8[_0x1dc672['key']]:_0x94e1d8[_0x1dc672['key']]=_0x1dc672['newValue'];}}function x(_0x39468d){const _0x390f6e=N(_0x39468d['rootName'],_0x39468d['isAttached']());for(const _0x49bfd5 of _0x39468d['getChildren']()){const _0xced0e8=_0x49bfd5['_clone'](!0x0);_0x390f6e['_appendChild'](_0xced0e8);}return _0x390f6e;}function N(_0x42499d,_0x1ade19=!0x0){const _0x29e3ec=new _0x5b40d3();return _0x29e3ec['rootName']=_0x42499d,_0x29e3ec['_isAttached']=_0x1ade19,_0x29e3ec['isAttached']=()=>_0x29e3ec['_isAttached'],_0x29e3ec;}function P(_0x5eb645,_0x2d6811,_0x5d3ddb){const _0x3e1d07='elementEnd'==_0x5eb645['type']?_0x5d3ddb['createPositionAt'](_0x5eb645['item'],'end'):_0x5d3ddb['createPositionBefore'](_0x5eb645['item']);return _0x5d3ddb['createPositionFromPath'](_0x2d6811,_0x3e1d07['path'],_0x3e1d07['stickiness']);}function V(_0x3a2dea,_0x31b84a,_0x3139cf){const _0x1d51eb='elementStart'==_0x3a2dea['type']?_0x3139cf['createPositionAt'](_0x3a2dea['item'],0x0):_0x3139cf['createPositionAfter'](_0x3a2dea['item']);return _0x3139cf['createPositionFromPath'](_0x31b84a,_0x1d51eb['path'],_0x1d51eb['stickiness']);}class he extends/* #__PURE__ -- @preserve */
25
- _0x4595bb(_0x5b9845){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x5d3392,_0x22d37d){super(_0x5d3392),this['focusTracker']=new _0x4ae125(),this['keystrokes']=new _0x3ff30c(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x22d37d),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),this['initializeCssTransitionDisablerMixin']();}['render'](){super['render'](),_0x93a3e8({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x14aab5=_0x361298=>_0x361298['stopPropagation']();this['keystrokes']['set']('arrowright',_0x14aab5),this['keystrokes']['set']('arrowleft',_0x14aab5),this['keystrokes']['set']('arrowup',_0x14aab5),this['keystrokes']['set']('arrowdown',_0x14aab5);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x1ae959){this['revisionNameInputView']['fieldView']['element']['value']=_0x1ae959['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x25574b){const _0x95f9e9=new ti(this['locale'],_0x413488),_0x39c884=_0x95f9e9['fieldView'];_0x39c884['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x479e10=R(this['locale'],'Name\x20of\x20the\x20revision');return!_0x25574b&&(_0x479e10+='\x20('+R(this['locale'],'optional')+')'),(_0x95f9e9['label']=_0x479e10,_0x39c884['on']('input',()=>{this['revisionNameInputValue']=_0x39c884['element']['value']['trim']();}),_0x95f9e9);}}class v extends _0x54fe5b{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h];}['_saveRevisionFormView'];['init'](){const _0x72db8d=this['editor'],_0x3f5b90=_0x72db8d['plugins']['get']('RevisionTracker');_0x72db8d['ui']['componentFactory']['add']('revisionHistory',_0x49f809=>{const _0x20f89c=_0x3304c7(_0x49f809),_0x37392f=_0x20f89c['panelView']['children'],_0x16ab4f=new _0x9958e7(_0x49f809),_0x1f86df=new _0xcb5b06(_0x49f809),_0x36c3b4=new _0x13d813(_0x49f809),_0x3b8872=new _0xcb5b06(_0x49f809),_0x106cd6=new _0x13d813(_0x49f809);return _0x20f89c['bind']('isEnabled')['to'](_0x3f5b90,'isReady',_0x3f5b90,'isEnabled',_0x72db8d,'isReadOnly',(_0x2a75d0,_0x4101ab,_0x4d592e)=>_0x2a75d0&&_0x4101ab&&!_0x4d592e),_0x20f89c['buttonView']['set']({'icon':_0x2e4e90,'label':R(_0x49f809,'Revision\x20history'),'tooltip':!0x0}),_0x36c3b4['set']({'label':R(_0x49f809,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x36c3b4['bind']('isEnabled')['to'](_0x3f5b90,'isReady',_0x3f5b90,'isEnabled',_0x72db8d,'isReadOnly',(_0x40a4ad,_0x442bb2,_0x4264d3)=>_0x40a4ad&&_0x442bb2&&!_0x4264d3),_0x36c3b4['on']('execute',()=>this['_showDialog']()),_0x106cd6['set']({'label':R(_0x49f809,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x106cd6['bind']('isEnabled')['to'](_0x3f5b90,'isReady',_0x72db8d,'isReadOnly',(_0x4de525,_0x57dc09)=>_0x4de525&&!_0x57dc09),_0x106cd6['on']('execute',()=>{_0x72db8d['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x20f89c['isOpen']=!0x1,_0x72db8d['editing']['view']['focus']();}),_0x1f86df['children']['add'](_0x36c3b4),_0x3b8872['children']['add'](_0x106cd6),_0x16ab4f['role']='menu',_0x16ab4f['items']['addMany']([_0x1f86df,_0x3b8872]),_0x37392f['add'](_0x16ab4f),_0x20f89c;}),_0x72db8d['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x4796f2=this['editor'],_0x5a1edc=_0x4796f2['locale'],_0x42b98e=new _0x19dba4(_0x5a1edc),_0x2ccb7c=new _0x2f9bd0(_0x5a1edc);_0x42b98e['buttonView']['set']({'icon':_0x2e4e90,'label':R(_0x5a1edc,'Revision\x20history')});const _0x272f08=new _0x2745dd(_0x5a1edc,_0x42b98e),_0x46cc83=new _0x1647af(_0x5a1edc);_0x46cc83['set']({'label':R(_0x5a1edc,'Save\x20current\x20revision')}),_0x46cc83['delegate']('execute')['to'](_0x42b98e),_0x46cc83['on']('execute',()=>{this['_showDialog']();}),_0x272f08['children']['add'](_0x46cc83),_0x2ccb7c['items']['add'](_0x272f08);const _0x3b7769=new _0x2745dd(_0x5a1edc,_0x42b98e),_0x564250=new _0x1647af(_0x5a1edc);return _0x564250['set']({'label':R(_0x5a1edc,'Open\x20revision\x20history')}),_0x564250['delegate']('execute')['to'](_0x42b98e),_0x564250['on']('execute',()=>{_0x4796f2['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x3b7769['children']['add'](_0x564250),_0x2ccb7c['items']['add'](_0x3b7769),_0x42b98e['panelView']['children']['add'](_0x2ccb7c),_0x42b98e;}['_showDialog'](){const _0x9a7e72=this['editor'],_0x10daf8=_0x9a7e72['locale'],_0x2e32c4=_0x9a7e72['plugins']['get']('Dialog'),_0xe5b805=_0x9a7e72['plugins']['get']('RevisionTracker');function _0x3e9395(_0x27d06a){_0x9a7e72['config']['get']('revisionHistory.requireRevisionName')&&''===_0x27d06a['revisionName']?_0x27d06a['revisionNameInputView']['errorText']=R(_0x10daf8,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x9a7e72['plugins']['get'](h)['saveRevision']({'name':_0x27d06a['revisionName']}),_0x2e32c4['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x3e9395(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x2e32c4['show']({'id':'revisionSave','title':R(_0x10daf8,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':R(_0x9a7e72['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x2e32c4['hide']()},{'label':R(_0x9a7e72['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x1d3985){_0x1d3985['bind']('isEnabled')['to'](_0xe5b805,'isReady',_0xe5b805,'isEnabled',_0x9a7e72,'isReadOnly',(_0x5b4502,_0x2d7cab,_0x3ba23b)=>_0x5b4502&&_0x2d7cab&&!_0x3ba23b);},'onExecute':()=>_0x3e9395(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x57de1b=this['editor'],_0x105ab7=_0x57de1b['locale'];this['_saveRevisionFormView']=new he(_0x105ab7,_0x57de1b['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class z extends _0x5b9845{['changeId'];['_model'];constructor(_0x4a17f0,_0x468fce){super(_0x4a17f0),this['_model']=_0x468fce,this['changeId']=_0x468fce['id'];const _0x458d76=this['bindTemplate'],_0x312783=R(_0x4a17f0,_0x468fce['data']['isSuggestion']?'Suggested\x20by':'add'==_0x468fce['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x468fce['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x458d76['to']('type',_0x50a6f6=>'ck-revision-change__'+_0x50a6f6)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x312783}]},{'text':'\x20'+_0x468fce['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class G extends/* #__PURE__ -- @preserve */
26
- _0x21bc25(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x4bde6c){super(),this['id']=_0x4bde6c['id']||_0x272469(),this['author']=_0x4bde6c['author'],this['type']=_0x4bde6c['type'],this['data']=_0x4bde6c['data']||{},this['rootName']=_0x4bde6c['rootName'],this['set']('createdAt',_0x4bde6c['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class J{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x7deb22,_0x110af7){this['newRevisionId']=_0x7deb22,this['oldRevisionId']=_0x110af7,this['changes']=new _0x2b4e5c();}['_setChanges'](_0x192761){for(const _0x22650c of _0x192761)this['changes']['add'](_0x22650c);}}class l extends _0x54fe5b{['repository'];['adapter']=null;['_utils'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x36c169,_0x18d87b,S,$];}constructor(_0x48fd6a){super(_0x48fd6a),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0x525a77,_0x43eb86,_0x1badda)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x3bc56c=>{for(const _0x13bbe0 of this['editor']['editing']['view']['document']['roots'])_0x1badda?_0x3bc56c['removeClass']('ck-editor__editable__overlay',_0x13bbe0):_0x3bc56c['addClass']('ck-editor__editable__overlay',_0x13bbe0);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x3575f6=>null!==_0x3575f6),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x28e012,_0x595856,_0x168e18)=>_0x28e012&&_0x168e18?_0x595856['changes']['getIndex'](_0x168e18):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x39612c,_0x4feb61)=>_0x39612c?_0x4feb61['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x18d87b);}['init'](){const _0x4dc289=this['editor'],_0x1e966a=new ot(_0x4dc289,{'direction':'backward'}),_0x24b53b=new ot(_0x4dc289,{'direction':'forward'});(_0x4dc289['commands']['add']('showPreviousChange',_0x1e966a),_0x4dc289['commands']['add']('showNextChange',_0x24b53b),_0x4dc289['commands']['add']('restoreRevision',new nt(_0x4dc289)),this['on']('change:numberOfChanges',()=>{_0x1e966a['refresh'](),_0x24b53b['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x4dc289['enableReadOnlyMode']('revision-viewer'),_0x4dc289['plugins']['has']('WidgetToolbarRepository'))&&_0x4dc289['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x2e4e59){return await this['_utils']['loadRevisionData'](_0x2e4e59,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x2e4e59);}async['getRevisionRootsAttributes'](_0x31cc70){return await this['_utils']['loadRevisionData'](_0x31cc70,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x31cc70);}async['compare'](_0x473d96,_0x3b20fd,_0xa2effe=!0x1){if(!this['isEnabled'])return;const _0x49440=this['diff'],_0x1c0ba6=this['repository'],_0x2b3adf='string'==typeof _0x473d96?_0x1c0ba6['getRevision'](_0x473d96):_0x473d96,_0x22d56b='string'==typeof _0x3b20fd?_0x1c0ba6['getRevision'](_0x3b20fd):_0x3b20fd,_0x5453cd=_0x2b3adf['id'],_0x203346=_0x22d56b?_0x22d56b['id']:null;if(!_0xa2effe&&this['diff']&&this['diff']['newRevisionId']===_0x5453cd&&this['diff']['oldRevisionId']===_0x203346)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new J(_0x5453cd,_0x203346);const _0xa92349=this['_getRevisionsRange'](_0x2b3adf,_0x22d56b,!0x0)['map'](_0x223a79=>this['_utils']['loadRevisionData'](_0x223a79,this['adapter']));return _0xa92349['push'](new Promise(_0x4c6717=>{setTimeout(_0x4c6717,0x14);})),Promise['all'](_0xa92349)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x90f64a=this['_getDiff'](_0x5453cd,_0x203346);for(const _0x253a34 of _0x90f64a['changes'])this['_changeIdToChange']['set'](_0x253a34['id'],_0x253a34);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x5a213a=>{for(const _0x5d7efa of this['editor']['model']['document']['getRootNames']())_0x5a213a['detachRoot'](_0x5d7efa);for(const _0x321e16 of Object['keys'](_0x90f64a['model'])){const _0x395ae7=_0x5a213a['addRoot'](_0x321e16);for(const _0x86b9dd of Object['keys'](_0x90f64a['attributes'][_0x321e16]))_0x5a213a['setAttribute'](_0x86b9dd,_0x90f64a['attributes'][_0x321e16][_0x86b9dd],_0x395ae7);_0x5a213a['insert'](_0x90f64a['model'][_0x321e16],_0x395ae7,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x90f64a['changes'])),this['isReady']=!0x0;})['catch'](_0x2010fb=>{console['error'](_0x2010fb),this['_cleanUp'](),_0x49440&&(this['diff']=_0x49440),this['isReady']=!0x0;});}['addRevisionData'](_0xe43c62,_0x57be65){const _0x40d76e=this['repository']['createRevision'](_0xe43c62);return _0x40d76e['on']('_update',(_0x45814b,_0x572b57,_0xa8170c)=>_0x57be65(_0x572b57,_0xa8170c,_0x40d76e)),this['repository']['addRevision'](_0x40d76e),_0x40d76e;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x4d87db=>{for(const _0x306afc of this['editor']['model']['document']['getRootNames']())_0x4d87db['detachRoot'](_0x306afc);});}['_sortAndFilterDiffChanges'](_0x1a3d9c){const _0x583688=[],_0x5363c2=new Map();for(const _0xf87d46 of this['editor']['model']['document']['getRootNames']()){const _0x4087e3=this['editor']['editing']['view']['getDomRoot'](_0xf87d46);if(!_0x4087e3)continue;const _0x55b277=_0x4087e3['getClientRects']()['item'](0x0);_0x55b277&&(_0x583688['push'](_0xf87d46),_0x5363c2['set'](_0xf87d46,_0x55b277));}return _0x583688['sort']((_0x1588dc,_0x1ff7c9)=>{const _0x12b804=_0x5363c2['get'](_0x1588dc),_0x2f9c5c=_0x5363c2['get'](_0x1ff7c9);return _0x12b804['y']-_0x2f9c5c['y']||_0x12b804['x']-_0x2f9c5c['x'];}),(_0x1a3d9c=_0x1a3d9c['filter'](_0x55da48=>_0x583688['includes'](_0x55da48['rootName'])))['sort']((_0x1ad64b,_0x1e5ec6)=>_0x583688['indexOf'](_0x1ad64b['rootName'])-_0x583688['indexOf'](_0x1e5ec6['rootName'])),_0x1a3d9c;}['_makeTape'](_0x369c65){const _0x32204d=Array['from'](_0x369c65['markers'])['filter'](([_0x57ed6b,_0x1c5e3a])=>_0x57ed6b['startsWith']('revision:')&&!_0x1c5e3a['isCollapsed']),_0x1ba23e=Array['from'](this['editor']['model']['createRangeIn'](_0x369c65)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x32204d['length'])for(const _0x2ddacf of _0x1ba23e){const [_0x46be73,_0x273228]=_0x32204d[0x0],[,_0x8ed5b1,_0x5be190]=_0x46be73['split'](':');if(_0x273228['end']['isEqual'](_0x2ddacf['nextPosition'])&&_0x32204d['shift'](),(_0x2ddacf['previousPosition']['isEqual'](_0x273228['start'])||_0x2ddacf['previousPosition']['isAfter'](_0x273228['start']))&&('insertion'==_0x8ed5b1?_0x2ddacf['isAdded']={'userId':_0x5be190}:'deletion'==_0x8ed5b1&&(_0x2ddacf['isRemoved']={'userId':_0x5be190})),0x0==_0x32204d['length'])break;}return _0x1ba23e;}['_refreshStartEndIndex'](_0x14989a){const _0x3fc70a=new Map();for(let _0x4ea551=0x0;_0x4ea551<_0x14989a['length'];_0x4ea551++)'text'===_0x14989a[_0x4ea551]['type']?(_0x14989a[_0x4ea551]['item']['startIndex']=_0x4ea551,_0x14989a[_0x4ea551]['item']['endIndex']=_0x4ea551):('elementStart'===_0x14989a[_0x4ea551]['type']?_0x14989a[_0x4ea551]['item']['startIndex']=_0x4ea551:'elementEnd'===_0x14989a[_0x4ea551]['type']&&(_0x14989a[_0x4ea551]['item']['endIndex']=_0x4ea551),_0x3fc70a['set'](_0x14989a[_0x4ea551]['id'],_0x4ea551));for(const _0x2b59a4 of _0x3fc70a['values']())'elementStart'===_0x14989a[_0x2b59a4]['type']?_0x14989a[_0x2b59a4]['item']['endIndex']=_0x3fc70a['get'](_0x14989a[_0x2b59a4]['pairId']):'elementEnd'===_0x14989a[_0x2b59a4]['type']&&(_0x14989a[_0x2b59a4]['item']['startIndex']=_0x3fc70a['get'](_0x14989a[_0x2b59a4]['pairId']));}['_processTape'](_0x5df79f){for(let _0x144ad9=0x0;_0x144ad9<_0x5df79f['length'];_0x144ad9++){if('elementStart'===_0x5df79f[_0x144ad9]['type'])_0x5df79f[_0x144ad9]['item']['startIndex']=_0x144ad9;else{if('elementEnd'===_0x5df79f[_0x144ad9]['type']){_0x5df79f[_0x144ad9]['item']['endIndex']=_0x144ad9;const _0x18ce83=_0x5df79f[_0x144ad9]['item']['startIndex'];_0x5df79f[_0x18ce83]['pairId']=_0x5df79f[_0x144ad9]['id'],_0x5df79f[_0x144ad9]['pairId']=_0x5df79f[_0x18ce83]['id'];}else _0x5df79f[_0x144ad9]['item']['startIndex']=_0x144ad9,_0x5df79f[_0x144ad9]['item']['endIndex']=_0x144ad9,_0x5df79f[_0x144ad9]['pairId']=null;}_0x5df79f[_0x144ad9]['markersStart']||(_0x5df79f[_0x144ad9]['markersStart']=[],_0x5df79f[_0x144ad9]['markersEnd']=[]);}}['_markInsertions'](_0x564ed3,_0x24868d){const _0x59a0ef=_0x564ed3['filter'](_0x28e692=>!_0x28e692['isAdded']);for(let _0x1bd1e5=0x0;_0x1bd1e5<_0x24868d['length'];_0x1bd1e5++)_0x24868d[_0x1bd1e5]['isAdded']&&(_0x59a0ef[_0x1bd1e5]['isAdded']=_0x24868d[_0x1bd1e5]['isAdded']);}['_getDiff'](_0x105950,_0x2681a1=null){const _0x12c144=this['repository']['getRevision'](_0x105950),_0xa9ce77=_0x2681a1?this['repository']['getRevision'](_0x2681a1):null,_0x3e69ef=this['_getRevisionsRange'](_0x12c144,_0xa9ce77),_0x38426c=_0x3e69ef[_0x3e69ef['length']-0x1],_0x3457b1=new Map(),_0x2c7cba={'model':{},'attributes':{},'changes':[]},_0x4f1e03=new Set(),_0x28c185=new Map();for(let _0x3223c4=_0x3e69ef['length']-0x1;_0x3223c4>=0x0;_0x3223c4--){const _0x2da977=_0x3e69ef[_0x3223c4];for(const _0x394932 of Object['keys'](_0x2da977['diffData']))if(_0x2da977['diffData'][_0x394932]['attachChange']){const _0x23ef90=_0x2da977['diffData'][_0x394932]['attachChange'];_0x23ef90['isAttached']?(_0x4f1e03['add'](_0x394932),_0x28c185['has'](_0x394932)&&_0x28c185['get'](_0x394932)['userId']==_0x23ef90['userId']?_0x28c185['delete'](_0x394932):_0x28c185['set'](_0x394932,_0x23ef90)):_0x28c185['has'](_0x394932)?(_0x4f1e03['delete'](_0x394932),_0x28c185['delete'](_0x394932)):(_0x4f1e03['add'](_0x394932),_0x28c185['set'](_0x394932,_0x23ef90));}else _0x4f1e03['add'](_0x394932);}for(const _0x4197e5 of _0x4f1e03){const _0x523cf9=_0x28c185['has'](_0x4197e5)&&!_0x28c185['get'](_0x4197e5)['isAttached'];let _0x3b22c1=_0x523cf9?_0x3e69ef['length']-0x1:0x0;const _0x5ed9a1=_0x523cf9?-0x1:0x1;for(;_0x3e69ef[_0x3b22c1];){const _0x30aa3c=_0x3e69ef[_0x3b22c1];if(_0x30aa3c['diffData'][_0x4197e5]){const _0x58502a=_0x523cf9?_0x30aa3c['diffData'][_0x4197e5]['attributesBefore']:_0x30aa3c['diffData'][_0x4197e5]['attributesAfter'];_0x2c7cba['attributes'][_0x4197e5]=_0x58502a?_0x37d460(_0x58502a):{};break;}_0x3b22c1+=_0x5ed9a1;}}for(const _0x44d612 of _0x3e69ef){_0x44d612['model']={};for(const _0x129ba6 of _0x44d612['authors'])_0x3457b1['set'](_0x129ba6['id'],_0x129ba6);for(const _0x4dfc0e of _0x4f1e03){const _0x24812c=_0x44d612['diffData'][_0x4dfc0e]?_0x44d612['diffData'][_0x4dfc0e]['insertions']:'[]',_0x565812=_0x44d612['diffData'][_0x4dfc0e]?_0x44d612['diffData'][_0x4dfc0e]['deletions']:'[]';_0x44d612['model'][_0x4dfc0e]={'insertions':this['_utils']['_makeModelFromViewString'](_0x24812c),'deletions':this['_utils']['_makeModelFromViewString'](_0x565812)};}}for(const _0x16991c of _0x4f1e03){let _0x422674=null,_0x12714a=0x0;const _0x4a85f6=new Map(Array['from'](_0x12c144['model'][_0x16991c]['insertions']['markers'])['filter'](([_0x386576])=>!_0x386576['startsWith']('revision:')));let _0x1aba36=0x0;for(const _0xc04a45 of _0x3e69ef){const _0x5d585f=this['_makeTape'](_0xc04a45['model'][_0x16991c]['insertions']);_0xc04a45==_0x12c144?(_0x422674=_0x5d585f,_0x12714a=_0x422674['length'],_0x422674['forEach'](_0x5b6158=>{_0x5b6158['id']=_0x1aba36++;}),this['_processTape'](_0x422674)):this['_markInsertions'](_0x422674,_0x5d585f);const _0x226932=_0x422674['filter'](_0x206d88=>!_0x206d88['isAdded'])['map'](_0x224113=>_0x224113['id']);let _0xe341d9=0x0;const _0x2c010c=this['_makeTape'](_0xc04a45['model'][_0x16991c]['deletions']);_0x2c010c['forEach'](_0x14c330=>{_0x14c330['isRemoved']?_0x14c330['id']=_0x12714a++:_0x14c330['id']=_0x226932[_0xe341d9++];}),this['_processTape'](_0x2c010c),this['_setDistance'](_0x422674,'isAdded'),this['_setDistance'](_0x2c010c,'isRemoved'),_0xc04a45==_0x12c144&&this['_markMarkers'](_0x422674,_0x4a85f6),_0x422674=this['_joinTapes'](_0x422674,_0x2c010c),this['_refreshStartEndIndex'](_0x422674),this['_setDistance'](_0x422674,'isRemoved');}_0x422674=_0x422674['filter'](_0x2c9b90=>!(_0x2c9b90['isAdded']&&_0x2c9b90['isRemoved']));const _0x4dfa99=new Map(_0x38426c['model'][_0x16991c]['deletions']['markers']),_0x4976cc=new Set(_0x4a85f6['keys']());for(const _0x55bbaa of _0x4dfa99['keys']())_0x4976cc['delete'](_0x55bbaa);this['_markSuggestions'](_0x422674,_0x4976cc),this['_fixObsoleteTags'](_0x422674),_0x422674=this['_removeMissingPairs'](_0x422674),_0x422674=this['_markMismatchedRemovedTags'](_0x422674),_0x422674=this['_removeUnsupportedChanges'](_0x422674);const {root:_0x16023d,changes:_0x4e3846}=this['_makeModelFromTape'](_0x422674,_0x3457b1,_0x16991c);_0x2c7cba['model'][_0x16991c]=_0x16023d;const _0x3239a3=_0x28c185['get'](_0x16991c);if(_0x3239a3){const _0x1911ff=_0x3457b1['get'](_0x3239a3['userId']),_0x3b8cca=new G({'author':_0x1911ff,'type':_0x3239a3['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x16991c});_0x4e3846['unshift'](_0x3b8cca),_0x2c7cba['attributes'][_0x16991c]['revisionHistoryAttachChange']=_0x3b8cca['id'];}_0x2c7cba['changes']=_0x2c7cba['changes']['concat'](_0x4e3846);}return _0x2c7cba;}['_markMarkers'](_0x3f1036,_0x4c762d){for(let _0xbc2659=0x0;_0xbc2659<_0x3f1036['length'];_0xbc2659++)for(const [_0x9c0761,_0x58f162]of _0x4c762d)!_0x58f162['isCollapsed']&&_0x58f162['start']['isEqual'](_0x3f1036[_0xbc2659]['previousPosition'])&&_0x3f1036[_0xbc2659]['markersStart']['push'](_0x9c0761),_0x58f162['end']['isEqual'](_0x3f1036[_0xbc2659]['nextPosition'])&&_0x3f1036[_0xbc2659]['markersEnd']['push'](_0x9c0761);}['_joinTapes'](_0x3fbcda,_0xc052ee){let _0x29cf37=[],_0xbb2309=0x0,_0x1a21fa=0x0;for(;_0xbb2309<_0x3fbcda['length']||_0x1a21fa<_0xc052ee['length'];){const _0x5c8f0a=_0x3fbcda[_0xbb2309]||{},_0x4940ce=_0xc052ee[_0x1a21fa]||{};if(_0x5c8f0a['id']==_0x4940ce['id'])_0xbb2309++,_0x1a21fa++,_0x29cf37['push'](_0x5c8f0a);else{if(_0x4940ce['isRemoved']&&_0x5c8f0a['isAdded']){const {commonTape:_0x8f1ad8,iEnd:_0x1a1dda,jEnd:_0x3208f9}=this['_threeWayMerge'](_0x3fbcda,_0xbb2309,_0xc052ee,_0x1a21fa);_0x29cf37=_0x29cf37['concat'](_0x8f1ad8),_0xbb2309=_0x1a1dda,_0x1a21fa=_0x3208f9;}else _0x4940ce['isRemoved']?(_0x1a21fa++,_0x29cf37['push'](_0x4940ce)):(_0xbb2309++,_0x29cf37['push'](_0x5c8f0a));}}return _0x29cf37;}['_markSuggestions'](_0x4054d4,_0x34d2cc){const _0x157aa6=[];for(let _0x280e3d=0x0;_0x280e3d<_0x4054d4['length'];_0x280e3d++){for(let _0x30e9c5=0x0;_0x30e9c5<_0x4054d4[_0x280e3d]['markersStart']['length'];_0x30e9c5++){const _0x1e9efa=_0x4054d4[_0x280e3d]['markersStart'][_0x30e9c5];if(!_0x34d2cc['has'](_0x1e9efa))continue;const {group:_0x419bf8,type:_0x31b803,authorId:_0x4b3332}=_0x2fc0d0(_0x1e9efa);'revision-suggestion'!=_0x419bf8||'insertion'!=_0x31b803&&'deletion'!=_0x31b803||(_0x157aa6['unshift']({'type':_0x31b803,'name':_0x1e9efa,'userId':_0x4b3332}),_0x4054d4[_0x280e3d]['markersStart']['splice'](_0x30e9c5,0x1),_0x30e9c5--);}_0x3fb4b7(_0x4054d4[_0x280e3d]);for(let _0x32951c=0x0;_0x32951c<_0x4054d4[_0x280e3d]['markersEnd']['length'];_0x32951c++){const _0x2c2cad=_0x4054d4[_0x280e3d]['markersEnd'][_0x32951c];if(!_0x34d2cc['has'](_0x2c2cad))continue;const {group:_0x2b51bf,type:_0x458313}=_0x2fc0d0(_0x2c2cad);if('revision-suggestion'!=_0x2b51bf||'insertion'!=_0x458313&&'deletion'!=_0x458313)continue;_0x4054d4[_0x280e3d]['markersEnd']['splice'](_0x32951c,0x1),_0x32951c--;const _0x590c1c=_0x157aa6['findIndex'](_0x14d618=>_0x14d618['name']==_0x2c2cad);_0x590c1c>-0x1&&_0x157aa6['splice'](_0x590c1c,0x1);}}function _0x2fc0d0(_0x47f66c){const _0x508768=_0x47f66c['split'](':');return{'group':_0x508768[0x0],'type':_0x508768[0x1],'subType':_0x508768['length']>=0x5?_0x508768[0x2]:null,'id':_0x508768['length']<0x5?_0x508768[0x2]:_0x508768[0x3],'authorId':_0x508768['length']<0x5?_0x508768[0x3]:_0x508768[0x4],'markerCount':0x6==_0x508768['length']?_0x508768[0x5]:null};}function _0x3fb4b7(_0x192f7a){for(let _0x1d4146=0x0;_0x1d4146<_0x157aa6['length'];_0x1d4146++){if(_0x192f7a['isAdded']&&'insertion'==_0x157aa6[_0x1d4146]['type']&&_0x192f7a['isAdded']['userId']==_0x157aa6[_0x1d4146]['userId'])return _0x192f7a['isAddSuggestion']=_0x157aa6[_0x1d4146],void delete _0x192f7a['isAdded'];if(!_0x192f7a['isAdded']&&!_0x192f7a['isRemoved']&&'deletion'==_0x157aa6[_0x1d4146]['type'])return void(_0x192f7a['isRemoveSuggestion']=_0x157aa6[_0x1d4146]);}}}['_setDistance'](_0x2cd9cb,_0x5bc645){let _0x296156=0x0,_0x35b812=!0x1;const _0x13b822=new Map();for(const _0x3351b0 of _0x2cd9cb)_0x3351b0[_0x5bc645]?_0x35b812&&(_0x296156++,_0x35b812=!0x1):(_0x296156++,_0x35b812=!0x0),_0x13b822['set'](_0x3351b0['id'],_0x296156);for(let _0x3f7a14=0x0;_0x3f7a14<_0x2cd9cb['length'];_0x3f7a14++){if('isRemoved'==_0x5bc645&&_0x2cd9cb[_0x3f7a14]['isAdded']||'isAdded'==_0x5bc645&&_0x2cd9cb[_0x3f7a14]['isRemoved'])continue;if('text'==_0x2cd9cb[_0x3f7a14]['type']){_0x2cd9cb[_0x3f7a14]['distance']=0x0;continue;}const _0x20de80=_0x13b822['get'](_0x2cd9cb[_0x3f7a14]['pairId']),_0x3b0954=_0x13b822['get'](_0x2cd9cb[_0x3f7a14]['id']);_0x2cd9cb[_0x3f7a14]['distance']=_0x20de80-_0x3b0954;}}['_getRevisionsRange'](_0x34821c,_0x281231,_0x4c2565=!0x1){const _0x2c6f86=[];let _0x1b60e3=this['repository']['getIndex'](_0x34821c),_0x35a80c=this['repository']['getIndex'](_0x281231);for(-0x1==_0x35a80c&&(_0x35a80c=this['repository']['_revisions']['length'],_0x4c2565=!0x1);_0x1b60e3<_0x35a80c;)_0x2c6f86['push'](this['repository']['getRevision'](_0x1b60e3)),_0x1b60e3++;return _0x4c2565&&_0x2c6f86['push'](this['repository']['getRevision'](_0x1b60e3)),_0x2c6f86;}['_threeWayMerge'](_0x1f2376,_0x2721bb,_0x8ecfd0,_0x550967){const _0x5b5072=this['editor']['model']['schema'];let _0x3ed30a=_0x2721bb;for(;_0x1f2376[_0x3ed30a]&&_0x1f2376[_0x3ed30a]['isAdded'];)_0x3ed30a++;let _0x367fa9=_0x550967;for(;_0x8ecfd0[_0x367fa9]&&_0x8ecfd0[_0x367fa9]['isRemoved'];)_0x367fa9++;_0x1cf577(_0x1f2376,_0x2721bb,_0x3ed30a),_0x1cf577(_0x8ecfd0,_0x550967,_0x367fa9);const _0x465aa4=_0x8ecfd0['slice'](_0x550967,_0x367fa9)['concat'](_0x1f2376['slice'](_0x2721bb,_0x3ed30a));return _0x465aa4['sort']((_0x5582e2,_0x428ceb)=>_0x5582e2['side']!=_0x428ceb['side']?_0x5582e2['side']-_0x428ceb['side']:_0x5582e2['level']!=_0x428ceb['level']?_0x5582e2['level']-_0x428ceb['level']:_0x5582e2['distance']!=_0x428ceb['distance']?_0x428ceb['distance']-_0x5582e2['distance']:!!_0x5582e2['isAdded']!=!!_0x428ceb['isAdded']?-0x1==_0x5582e2['side']||0x0==_0x5582e2['side']?_0x5582e2['isAdded']?-0x1:0x1:_0x5582e2['isAdded']?0x1:-0x1:_0x5582e2['index']-_0x428ceb['index']),{'commonTape':_0x465aa4,'iEnd':_0x3ed30a,'jEnd':_0x367fa9};function _0x1cf577(_0x41ede0,_0x472f27,_0xe62c53){let _0x3c89ad=-0x1,_0x4fd915=Number['POSITIVE_INFINITY'],_0x1a0477=!0x0;for(let _0x11de54=_0x472f27;_0x11de54<_0xe62c53;_0x11de54++)if(_0x5b5072['isInline'](_0x41ede0[_0x11de54]['item'])||(_0x1a0477=!0x1),_0x41ede0[_0x11de54]['item']['startIndex']<_0x472f27&&(_0x3c89ad=_0x11de54),_0x41ede0[_0x11de54]['item']['endIndex']>=_0xe62c53){_0x4fd915=_0x11de54;break;}_0x1a0477&&(_0x3c89ad=_0xe62c53-0x1);for(let _0x58506e=_0x472f27;_0x58506e<_0xe62c53;_0x58506e++)_0x41ede0[_0x58506e]['side']=_0x58506e<=_0x3c89ad?-0x1:_0x58506e<_0x4fd915?0x0:0x1,_0x41ede0[_0x58506e]['index']=_0x58506e;let _0xebb66=0x0;for(let _0x182ea1=_0x472f27;_0x182ea1<=_0x3c89ad;_0x182ea1++)0x0==_0x41ede0[_0x182ea1]['distance']?_0x41ede0[_0x182ea1]['level']=_0xebb66:(_0xebb66++,_0x41ede0[_0x182ea1]['level']=_0xebb66,_0xebb66++);for(let _0x594aec=_0x472f27;_0x594aec<_0xe62c53;_0x594aec++)0x0==_0x41ede0[_0x594aec]['side']&&(_0x41ede0[_0x594aec]['level']=_0xebb66);_0xebb66=0x0;for(let _0x2f3b51=_0xe62c53-0x1;_0x2f3b51>=_0x4fd915;_0x2f3b51--)0x0==_0x41ede0[_0x2f3b51]['distance']?_0x41ede0[_0x2f3b51]['level']=_0xebb66:(_0xebb66--,_0x41ede0[_0x2f3b51]['level']=_0xebb66,_0xebb66--);}}['_fixObsoleteTags'](_0x1791c9){const _0x50c2bc=new Map(),_0x370444=this['editor']['model']['schema'];for(let _0x49f7a2=0x1;_0x49f7a2<_0x1791c9['length'];_0x49f7a2++){let _0x4f5512,_0x59c275,_0x450363;const _0x837588=_0x1791c9[_0x49f7a2],_0x5ebb11=_0x1791c9[_0x49f7a2-0x1];if('text'==_0x837588['type'])continue;if(_0x837588['type']!=_0x5ebb11['type'])continue;if(!_0x370444['isBlock'](_0x5ebb11['item'])||_0x370444['isLimit'](_0x5ebb11['item']))continue;if(!_0x370444['isBlock'](_0x837588['item'])||_0x370444['isLimit'](_0x837588['item']))continue;if((_0x1791c9[_0x49f7a2]['isAdded']||_0x1791c9[_0x49f7a2]['isAddSuggestion'])&&_0x1791c9[_0x49f7a2-0x1]['isRemoved'])_0x4f5512=_0x1791c9[_0x49f7a2],_0x59c275=_0x1791c9[_0x49f7a2-0x1],_0x450363=_0x49f7a2-0x1;else{if(!_0x1791c9[_0x49f7a2]['isRemoved']||!_0x1791c9[_0x49f7a2-0x1]['isAdded']&&!_0x1791c9[_0x49f7a2-0x1]['isAddSuggestion'])continue;_0x4f5512=_0x1791c9[_0x49f7a2-0x1],_0x59c275=_0x1791c9[_0x49f7a2],_0x450363=_0x49f7a2;}const _0xb5387f=_0x4f5512['level']==_0x59c275['level'],_0x3a8a0d=Math['abs'](_0x4f5512['level'])<Math['abs'](_0x59c275['level'])&&0x0==_0x59c275['distance'];(_0xb5387f||_0x3a8a0d)&&(_0x50c2bc['set'](_0x59c275['id'],_0x4f5512['id']),_0x1791c9['splice'](_0x450363,0x1),_0x49f7a2--,_0x4f5512['isAdded']=!0x1);}for(let _0x4185fd=0x0;_0x4185fd<_0x1791c9['length'];_0x4185fd++)_0x50c2bc['has'](_0x1791c9[_0x4185fd]['pairId'])&&(_0x1791c9[_0x4185fd]['pairId']=_0x50c2bc['get'](_0x1791c9[_0x4185fd]['pairId']));}['_removeMissingPairs'](_0x27621e){const _0x2d81c5=new Set(_0x27621e['map'](_0x5182ed=>_0x5182ed['id']));for(let _0x4e5781=0x0;_0x4e5781<_0x27621e['length'];_0x4e5781++)_0x2d81c5['has'](_0x27621e[_0x4e5781]['pairId'])||0x0==_0x27621e[_0x4e5781]['distance']||(_0x27621e[_0x4e5781]['isIncorrect']=!0x0);return _0x27621e['filter'](_0x410dda=>!_0x410dda['isIncorrect']);}['_markMismatchedRemovedTags'](_0x195210){const _0x2aebe4=new Set();for(let _0x41927b=0x0;_0x41927b<_0x195210['length'];_0x41927b++){if(_0x2aebe4['has'](_0x195210[_0x41927b]['id'])&&_0x195210[_0x41927b]['isRemoved']&&(_0x195210[_0x41927b]['isIncorrect']=!0x0),_0x195210[_0x41927b]['isIncorrect'])continue;if(0x0==_0x195210[_0x41927b]['distance'])continue;if('elementStart'!=_0x195210[_0x41927b]['type'])continue;if(null==_0x195210[_0x41927b]['pairId'])continue;let _0x378770=_0x41927b+0x1,_0xa091d2=0x0;for(;_0x195210[_0x378770]['id']!=_0x195210[_0x41927b]['pairId'];)'elementStart'==_0x195210[_0x378770]['type']?_0xa091d2++:'elementEnd'==_0x195210[_0x378770]['type']&&_0xa091d2--,_0x378770++;if(0x0!=_0xa091d2){if(_0x195210[_0x41927b]['isRemoved'])_0x195210[_0x41927b]['isIncorrect']=!0x0;else{for(;_0x378770!=_0x41927b;)_0x195210[_0x378770]['isRemoved']&&0x0!=_0x195210[_0x378770]['distance']&&(_0x195210[_0x378770]['isIncorrect']=!0x0,_0x2aebe4['add'](_0x195210[_0x378770]['pairId'])),_0x378770--;}}}return _0x195210['filter'](_0x30ecc9=>!_0x30ecc9['isIncorrect']);}['_removeUnsupportedChanges'](_0xaf061e){const _0x51eaec=this['editor']['model']['schema'];for(let _0x3bc5af=0x0;_0x3bc5af<_0xaf061e['length'];_0x3bc5af++){if(!(_0xaf061e[_0x3bc5af]['isAdded']||_0xaf061e[_0x3bc5af]['isAddSuggestion']||_0xaf061e[_0x3bc5af]['isRemoved']||_0xaf061e[_0x3bc5af]['isRemoveSuggestion']))continue;if(0x0==_0xaf061e[_0x3bc5af]['distance'])continue;const _0x21f632=_0xaf061e[_0x3bc5af]['item'];_0x51eaec['isBlock'](_0x21f632)||_0x51eaec['isLimit'](_0x21f632)||(_0xaf061e[_0x3bc5af]['isAdded']&&delete _0xaf061e[_0x3bc5af]['isAdded'],_0xaf061e[_0x3bc5af]['isAddSuggestion']&&delete _0xaf061e[_0x3bc5af]['isAddSuggestion'],_0xaf061e[_0x3bc5af]['isRemoveSuggestion']&&delete _0xaf061e[_0x3bc5af]['isRemoveSuggestion'],_0xaf061e[_0x3bc5af]['isRemoved']&&(_0xaf061e[_0x3bc5af]['isIncorrect']=!0x0));}return _0xaf061e['filter'](_0x295389=>!_0x295389['isIncorrect']);}['_makeModelFromTape'](_0x3982a6,_0x27bc85,_0x252e53){const _0x521a53=new _0x5b40d3(),_0x2983c2=[],_0x18ce96=new Map(),_0x2612cc=this['editor']['model'],_0x3a0223=_0x2612cc['schema'],_0x32301e=[_0x521a53],_0xbb58ad={},_0x1e8b6d={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x12d634=null;const _0x3b002b=[0x0];for(let _0x38cca7=0x0;_0x38cca7<_0x3982a6['length'];_0x38cca7++)if('elementStart'===_0x3982a6[_0x38cca7]['type']){_0x3982a6[_0x38cca7]['previousPosition']=_0x2612cc['createPositionFromPath'](_0x521a53,_0x3b002b);const _0x23fde0=new _0x5a3bc2(_0x3982a6[_0x38cca7]['item']['name'],_0x3982a6[_0x38cca7]['item']['getAttributes']());_0x32301e[0x0]['_appendChild'](_0x23fde0),_0x3b002b['push'](0x0),_0x32301e['unshift'](_0x23fde0),_0x3982a6[_0x38cca7]['nextPosition']=_0x2612cc['createPositionFromPath'](_0x521a53,_0x3b002b);}else'elementEnd'===_0x3982a6[_0x38cca7]['type']?(_0x32301e['shift'](),_0x3982a6[_0x38cca7]['previousPosition']=_0x2612cc['createPositionFromPath'](_0x521a53,_0x3b002b),_0x3b002b['pop'](),_0x3b002b[_0x3b002b['length']-0x1]++,_0x3982a6[_0x38cca7]['nextPosition']=_0x2612cc['createPositionFromPath'](_0x521a53,_0x3b002b)):(_0x3982a6[_0x38cca7]['previousPosition']=_0x2612cc['createPositionFromPath'](_0x521a53,_0x3b002b),_0x12d634?_0x12d634['_data']+=_0x3982a6[_0x38cca7]['item']['data']:_0x12d634=new _0x40ee9b(_0x3982a6[_0x38cca7]['item']['data'],_0x3982a6[_0x38cca7]['item']['getAttributes']()),_0x3982a6[_0x38cca7+0x1]&&'text'===_0x3982a6[_0x38cca7+0x1]['type']&&_0x4b8454(_0x12d634,_0x3982a6[_0x38cca7+0x1]['item'])||(_0x32301e[0x0]['_appendChild'](_0x12d634),_0x12d634=null),_0x3b002b[_0x3b002b['length']-0x1]+=_0x3982a6[_0x38cca7]['item']['offsetSize'],_0x3982a6[_0x38cca7]['nextPosition']=_0x2612cc['createPositionFromPath'](_0x521a53,_0x3b002b));for(let _0x19d4d7=0x0;_0x19d4d7<_0x3982a6['length'];_0x19d4d7++){const _0x5ae0be=_0x3982a6[_0x19d4d7]['previousPosition'],_0x1ae726=_0x3982a6[_0x19d4d7]['nextPosition'];for(const _0x4510df of _0x3982a6[_0x19d4d7]['markersStart'])_0x18ce96['set'](_0x4510df,{'start':_0x5ae0be,'end':null});_0x286520('isRemoveSuggestion',_0x19d4d7,_0x5ae0be,_0x1ae726),_0x286520('isAddSuggestion',_0x19d4d7,_0x5ae0be,_0x1ae726),_0x286520('isRemoved',_0x19d4d7,_0x5ae0be,_0x1ae726),_0x286520('isAdded',_0x19d4d7,_0x5ae0be,_0x1ae726);for(const _0x55f14b of _0x3982a6[_0x19d4d7]['markersEnd']){const _0x53a19a=_0x18ce96['get'](_0x55f14b);_0x53a19a?_0x53a19a['end']=_0x1ae726:_0x18ce96['set'](_0x55f14b,{'start':_0x1ae726,'end':_0x1ae726});}}for(const [_0x415891,_0x1ad802]of _0x18ce96){const _0x38ec8a=this['editor']['model']['createRange'](_0x1ad802['start'],_0x1ad802['end']);_0x521a53['markers']['set'](_0x415891,_0x38ec8a);}return _0x2983c2['sort']((_0x37599d,_0x476812)=>{const _0x56c5cf=_0x521a53['markers']['get']('revision:'+_0x37599d['id']),_0x216d1c=_0x521a53['markers']['get']('revision:'+_0x476812['id']);return _0x56c5cf['start']['isBefore'](_0x216d1c['start'])?-0x1:_0x56c5cf['start']['isAfter'](_0x216d1c['start'])?0x1:_0x56c5cf['end']['isBefore'](_0x216d1c['end'])?-0x1:_0x56c5cf['end']['isAfter'](_0x216d1c['end'])?0x1:'add'===_0x37599d['type']?-0x1:0x1;}),{'root':_0x521a53,'changes':_0x2983c2};function _0x286520(_0x29b877,_0x36cae5,_0x43b8c7,_0x4392d6){const _0x2419c2=!!_0x3982a6[_0x36cae5][_0x29b877],_0x15508e=_0x2419c2?_0x3982a6[_0x36cae5][_0x29b877]['userId']:null,_0x52f0cf=_0x36cae5===_0x3982a6['length']-0x1,_0x2c808b=_0x1e8b6d[_0x29b877][0x0],_0x19de13=_0x3a0223['isObject'](_0x3982a6[_0x36cae5]['item']);!_0xbb58ad[_0x29b877]&&_0x2419c2?_0xbb58ad[_0x29b877]={'start':_0x43b8c7,'tapeItem':_0x3982a6[_0x36cae5],'userId':_0x15508e,'type':_0x29b877}:_0xbb58ad[_0x29b877]&&!_0x2419c2?(_0xbb58ad[_0x29b877]['end']=_0x43b8c7,_0x4f1c19(_0xbb58ad[_0x29b877]),_0xbb58ad[_0x29b877]=null):_0xbb58ad[_0x29b877]&&_0x2419c2&&_0xbb58ad[_0x29b877]['userId']!==_0x15508e&&(_0xbb58ad[_0x29b877]['end']=_0x43b8c7,_0x2c808b&&_0x2c808b['userId']===_0xbb58ad[_0x29b877]['userId']||_0x4f1c19(_0xbb58ad[_0x29b877]),_0xbb58ad[_0x29b877]={'start':_0x43b8c7,'tapeItem':_0x3982a6[_0x36cae5],'userId':_0x15508e,'type':_0x29b877}),_0xbb58ad[_0x29b877]&&_0x19de13&&('elementStart'!==_0x3982a6[_0x36cae5]['type']||_0x2c808b&&_0x2c808b['userId']===_0x15508e||_0x1e8b6d[_0x29b877]['unshift']({'userId':_0x15508e,'object':_0x3982a6[_0x36cae5]['item'],'change':_0xbb58ad[_0x29b877]}),'elementEnd'===_0x3982a6[_0x36cae5]['type']&&_0x2c808b&&_0x2c808b['object']===_0x3982a6[_0x36cae5]['item']&&(_0x1e8b6d[_0x29b877]['shift'](),_0xbb58ad[_0x29b877]=_0x2c808b['change'])),_0xbb58ad[_0x29b877]&&_0x52f0cf&&(_0xbb58ad[_0x29b877]['end']=_0x4392d6,_0x4f1c19(_0xbb58ad[_0x29b877]),_0xbb58ad[_0x29b877]=null);}function _0x4f1c19({start:_0x2a5386,end:_0x55480b,tapeItem:_0x5646a4,userId:_0x2ae208,type:_0x2317fc}){const _0x5f46e=_0x5646a4['item'],_0x310a6a=_0x2612cc['schema']['isBlock'](_0x5f46e)&&!_0x2612cc['schema']['isLimit'](_0x5f46e),_0x150812=_0x2a5386['nodeAfter']==_0x55480b['parent']&&_0x55480b['isAtStart'];if(_0x310a6a&&_0x150812)return;const _0x3eb0db=_0x2612cc['createRange'](_0x2a5386,_0x55480b),_0x4c9739=_0x27bc85['get'](_0x2ae208),_0x1c7456=new G({'author':_0x4c9739,'type':'isAdded'==_0x2317fc||'isAddSuggestion'==_0x2317fc?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x2317fc||'isRemoveSuggestion'==_0x2317fc},'createdAt':new Date(),'rootName':_0x252e53});_0x2983c2['push'](_0x1c7456),_0x521a53['markers']['set']('revision:'+_0x1c7456['id'],_0x3eb0db);}function _0x4b8454(_0x2df1be,_0x3d4553){const _0x3925f5=_0x2df1be['getAttributes'](),_0x551e0e=_0x3d4553['getAttributes']();for(const _0x119ae1 of _0x3925f5){if(_0x119ae1[0x1]!==_0x3d4553['getAttribute'](_0x119ae1[0x0]))return!0x1;_0x551e0e['next']();}return _0x551e0e['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x4ddd42=>{const _0x413afc=_0x4ddd42['markerName']['split'](':')[0x1],_0x1b0f7b=this['_getChangeFromId'](_0x413afc);if(!_0x1b0f7b)return null;const _0x5b8a4c='add'==_0x1b0f7b['type']?'insertion':'deletion',_0x1278fe=['ck-suggestion-marker','ck-suggestion-marker-'+_0x5b8a4c];return _0x1b0f7b['data']['isSuggestion']&&_0x1278fe['push']('ck-suggestion-marker-'+_0x5b8a4c+'-new'),this['activeChange']==_0x1b0f7b&&_0x1278fe['push']('ck-suggestion-marker--active'),{'classes':_0x1278fe,'attributes':{'data-change-id':_0x413afc}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x20e657=>{_0x20e657['on']('element:pre',(_0x143e5e,_0x17005c,_0x39c2fd)=>{const _0x84ae3b=_0x17005c['viewItem']['getChild'](0x0);if(!_0x84ae3b||!_0x84ae3b['is']('element','code'))return;if(!_0x39c2fd['consumable']['consume'](_0x84ae3b,{'attributes':['vid_start','vid_end']}))return;const _0x55ebea=_0x17005c['modelRange']['start']['nodeAfter'];_0x39c2fd['writer']['setAttribute']('vid_start',_0x84ae3b['getAttribute']('vid_start'),_0x55ebea),_0x39c2fd['writer']['setAttribute']('vid_end',_0x84ae3b['getAttribute']('vid_end'),_0x55ebea);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x143f8c=>{_0x143f8c['on']('element',(_0x3cc31e,_0x411c2d,_0x5ca186)=>{if(!_0x5ca186['consumable']['consume'](_0x411c2d['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x411c2d['modelRange']['isCollapsed'])return;const _0x70dbe8=_0x411c2d['modelRange']['start']['nodeAfter'];_0x70dbe8['hasAttribute']('vid_start')||_0x70dbe8['hasAttribute']('vid')||(_0x5ca186['writer']['setAttribute']('vid_start',_0x411c2d['viewItem']['getAttribute']('vid_start'),_0x70dbe8),_0x5ca186['writer']['setAttribute']('vid_end',_0x411c2d['viewItem']['getAttribute']('vid_end'),_0x70dbe8));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x4efde2=>_0x4efde2['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x4ddfc6,[,_0x47e706])=>{['vid_start','vid_end','vid']['includes'](_0x47e706)&&(_0x4ddfc6['return']=!0x0,_0x4ddfc6['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0xb83662=>{_0xb83662['on']('attribute:vid',(_0x1ba793,_0x34e221,_0x5ba8f0)=>{if('\x20'!=_0x34e221['item']['data']||_0x34e221['item']['parent']['maxOffset']>0x1)return;if(!_0x5ba8f0['consumable']['consume'](_0x34e221['item'],_0x1ba793['name']))return;const _0x57fcfc=_0x5ba8f0['writer'],_0x1c8ffa=_0x5ba8f0['mapper']['toViewRange'](_0x34e221['range']);_0x57fcfc['wrap'](_0x1c8ffa,_0x57fcfc['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x525226){const _0x325912=_0x525226['plugins']['get']('RevisionViewer');return(_0x34cc52,_0x412e55,_0xc2c549)=>{const _0xf34ed6=_0x412e55['markerName']['split'](':')[0x1],_0x4f3513=_0x325912['_getChangeFromId'](_0xf34ed6);if(!_0x4f3513)return null;const _0x23ea57='add'==_0x4f3513['type']?'split':'merge';if(!_0xc2c549['consumable']['test'](_0x412e55['markerRange'],_0x34cc52['name']))return;const _0x2b55a0=_0x412e55['markerRange']['getWalker'](),_0x1c6778=_0x412e55['markerRange']['start'],_0x5c77ea=_0x525226['model']['schema'];let _0x3c9329=null,_0x342f00=null,_0x4cb6c7=!0x1,_0x417813=!0x1;for(const _0x1f8736 of _0x2b55a0){const _0x2fe265=_0x1f8736['item'];_0x4cb6c7=_0x4cb6c7||_0x5c77ea['isContent'](_0x2fe265);const _0x3204b8=_0xc2c549['mapper']['toViewElement'](_0x2fe265);if(_0x3204b8&&_0x3204b8['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x1f8736['type']&&(_0x5c77ea['isBlock'](_0x2fe265)&&!_0x5c77ea['isLimit'](_0x2fe265)&&(_0x2fe265['nextSibling']||_0x1c6778['isAtEnd']?_0x3c9329&&_0x3c9329['parent']==_0x2fe265||(_0x3c9329=_0x2fe265,_0x37a59f(_0x1f8736['previousPosition']),_0x417813=!0x0):_0x342f00=_0x342f00||_0x1f8736['previousPosition']));}function _0x37a59f(_0x5b1c32){const _0x207d6c=_0xc2c549['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x23ea57}),_0x418b6e=_0xc2c549['mapper']['toViewPosition'](_0x5b1c32);_0x4f3513['data']['isSuggestion']&&_0xc2c549['writer']['addClass']('ck-suggestion-marker-'+_0x23ea57+'-new',_0x207d6c),_0x325912['activeChange']==_0x4f3513&&_0xc2c549['writer']['addClass']('ck-suggestion-marker--active',_0x207d6c),_0xc2c549['writer']['insert'](_0x418b6e,_0x207d6c),_0xc2c549['mapper']['bindElementToMarker'](_0x207d6c,_0x412e55['markerName']);}_0x4cb6c7||_0x417813||!_0x342f00||_0x37a59f(_0x342f00);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x118db8,_0x1bf2a7,_0x4968c3)=>{const _0x5a05a5=_0x4968c3['mapper']['markerNameToElements'](_0x1bf2a7['markerName']);if(_0x5a05a5){for(const _0x386120 of _0x5a05a5)(_0x386120['hasClass']('ck-suggestion-marker-split')||_0x386120['hasClass']('ck-suggestion-marker-merge'))&&(_0x4968c3['mapper']['unbindElementFromMarkerName'](_0x386120,_0x1bf2a7['markerName']),_0x4968c3['writer']['remove'](_0x386120));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x16bf3a,_0x4b0d11,_0x2b0023)=>{const _0xdca4e0=_0x4b0d11['markerName']['split'](':')[0x1],_0x1471e6=this['_getChangeFromId'](_0xdca4e0);if(!_0x1471e6)return null;const _0x226709='add'==_0x1471e6['type']?'split':'merge';if(_0x2b0023['consumable']['test'](_0x4b0d11['markerRange'],_0x16bf3a['name']))for(const _0x5ca3c4 of _0x4b0d11['markerRange']['getItems']()){if(!_0x5ca3c4['is']('element','softBreak'))continue;const _0x5b2e17=_0x2b0023['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x226709}),_0x311292=_0x2b0023['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x5ca3c4));_0x1471e6['data']['isSuggestion']&&_0x2b0023['writer']['addClass']('ck-suggestion-marker-'+_0x226709+'-new',_0x5b2e17),this['activeChange']==_0x1471e6&&_0x2b0023['writer']['addClass']('ck-suggestion-marker--active',_0x5b2e17),_0x2b0023['writer']['insert'](_0x311292,_0x5b2e17),_0x2b0023['mapper']['bindElementToMarker'](_0x5b2e17,_0x4b0d11['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x144061=>{for(const _0x5d0e7a of this['editor']['model']['document']['getRootNames']()){const _0x1522a7=this['editor']['model']['document']['getRoot'](_0x5d0e7a),_0xa398b3=this['editor']['editing']['view']['document']['getRoot'](_0x5d0e7a);if(_0xa398b3){const _0x2bb4f5=_0x1522a7['getAttribute']('revisionHistoryAttachChange');if(_0x144061['removeAttribute']('data-change-id',_0xa398b3),_0x144061['removeClass']('ck-revision-history-root-add',_0xa398b3),_0x144061['removeClass']('ck-revision-history-root-remove',_0xa398b3),_0x144061['removeClass']('ck-revision-history-root--active',_0xa398b3),_0x2bb4f5){const _0x152cdf=this['_getChangeFromId'](_0x2bb4f5);if(!_0x152cdf)return null;_0x144061['setAttribute']('data-change-id',_0x2bb4f5,_0xa398b3),_0x144061['addClass']('ck-revision-history-root-'+_0x152cdf['type'],_0xa398b3),this['activeChange']==_0x152cdf&&_0x144061['addClass']('ck-revision-history-root--active',_0xa398b3);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0xafad35=>'revision-comment:'+_0xafad35,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x4b0a4c=>'revision-suggestion:'+_0x4b0a4c,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x27b10c=>({'name':'suggestion:'+_0x27b10c,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0xe748a5=>{const _0xa83afd=_0xe748a5['markerName']['split'](':')[0x1];return'insertion'!=_0xa83afd&&'deletion'!=_0xa83afd?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0xa83afd]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Q(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Q(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x1ffd4a,_0x23cd0b,_0x53f5cb)=>{const _0x20b789=_0x53f5cb['mapper']['markerNameToElements'](_0x23cd0b['markerName']);if(_0x20b789){for(const _0x573d2f of _0x20b789)_0x573d2f['is']('uiElement')&&(_0x53f5cb['mapper']['unbindElementFromMarkerName'](_0x573d2f,_0x23cd0b['markerName']),_0x53f5cb['writer']['remove'](_0x573d2f));}},{'priority':'high'});}['_getChangeFromId'](_0xbd1d9f){return this['_changeIdToChange']['get'](_0xbd1d9f);}['_getViewForChange'](_0x596508){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new z(this['editor']['locale'],_0x596508),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x77171d,_0x399fc6,_0x16a01e,_0x1264bc)=>{_0x1264bc&&this['_balloon']['remove'](_0x1264bc),_0x16a01e&&(this['_balloon']['add']({'view':_0x16a01e,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x1d4173=this['editor']['editing'],_0x8a5d1b=this['_getChangeFromId'](_0x16a01e['changeId']);let _0x244ec0;if(_0x8a5d1b['data']['isOnRoot']){const _0x20a939=_0x1d4173['view']['getDomRoot'](_0x8a5d1b['rootName']);_0x244ec0=Array['from'](_0x20a939['getClientRects']());}else{const _0x1148ed=this['editor']['model']['markers']['get']('revision:'+_0x16a01e['changeId']);_0x244ec0=Array['from'](_0x1d4173['mapper']['markerNameToElements'](_0x1148ed['name']))['map'](_0x3bb621=>_0x1d4173['view']['domConverter']['mapViewToDom'](_0x3bb621))['map'](_0x36754d=>Array['from'](_0x36754d['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x244ec0[0x0];return _0x244ec0['find'](_0x4cd364=>_0x4cd364['top']-0x3<=this['_activeViewTarget']['y']&&_0x4cd364['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x4cd364['left']-0x3<=this['_activeViewTarget']['x']&&_0x4cd364['right']+0x3>=this['_activeViewTarget']['x'])||_0x244ec0[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x5aaadf,_0x4e54a0,_0x1a9b0e,_0x5d328a)=>{this['activeView']=_0x1a9b0e?this['_getViewForChange'](_0x1a9b0e):null,this['editor']['model']['change'](()=>{const _0x56abdd=this['editor']['editing'];_0x5d328a&&(_0x5d328a['data']['isOnRoot']?_0x56abdd['view']['change'](_0x1b3f31=>{_0x1b3f31['removeClass']('ck-revision-history-root--active',_0x56abdd['view']['document']['getRoot'](_0x5d328a['rootName']));}):_0x56abdd['reconvertMarker']('revision:'+_0x5d328a['id'])),_0x1a9b0e&&(_0x1a9b0e['data']['isOnRoot']?_0x56abdd['view']['change'](_0x13d92b=>{_0x13d92b['addClass']('ck-revision-history-root--active',_0x56abdd['view']['document']['getRoot'](_0x1a9b0e['rootName']));}):_0x56abdd['reconvertMarker']('revision:'+_0x1a9b0e['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x5decf6,_0xab9463)=>{if(this['activeChange'])return;const _0x3d9ca6=this['_findChangeIdFromDomTarget'](_0xab9463['target']),_0x21c55d=this['_changeIdToChange']['get'](_0x3d9ca6);_0x21c55d?(this['_activeViewTarget']={'x':_0xab9463['domEvent']['x'],'y':_0xab9463['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x21c55d)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x314691,_0x4362b9)=>{const _0x2ed49f=this['_findChangeIdFromDomTarget'](_0x4362b9['target']),_0x42ce05=this['_changeIdToChange']['get'](_0x2ed49f);_0x42ce05?(this['_activeViewTarget']={'x':_0x4362b9['domEvent']['x'],'y':_0x4362b9['domEvent']['y']},_0x42ce05===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x42ce05):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x579067){do{const _0x1c010a=_0x579067['getAttribute']('data-change-id');if(_0x1c010a)return _0x1c010a;_0x579067=_0x579067['parent'];}while(_0x579067);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x3d17ce=>{for(const _0x420424 of this['editor']['model']['markers'])_0x3d17ce['removeMarker'](_0x420424);});}}function Q(_0x35b7f6,_0x386a5f){return(_0x5edc22,_0x2ed360,_0x1f48d2)=>{if(!_0x1f48d2['consumable']['test'](_0x2ed360['markerRange'],_0x5edc22['name']))return;const _0xb2608b=_0x2ed360['markerRange']['getWalker'](),_0x50fc77=_0x2ed360['markerRange']['start'],_0x5459e2=_0x35b7f6['model']['schema'];let _0x36b52a=null,_0x333d4c=null,_0x499354=!0x1,_0x4dac5e=!0x1;for(const _0x1bcda2 of _0xb2608b){const _0x121e26=_0x1bcda2['item'];_0x499354=_0x499354||_0x5459e2['isContent'](_0x121e26);const _0xc49535=_0x1f48d2['mapper']['toViewElement'](_0x121e26);if(_0xc49535&&_0xc49535['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x1bcda2['type']&&(_0x5459e2['isBlock'](_0x121e26)&&!_0x5459e2['isLimit'](_0x121e26)&&(_0x121e26['nextSibling']||_0x50fc77['isAtEnd']?_0x36b52a&&_0x36b52a['parent']==_0x121e26||(_0x36b52a=_0x121e26,_0x53086e(_0x1bcda2['previousPosition']),_0x4dac5e=!0x0):_0x333d4c=_0x333d4c||_0x1bcda2['previousPosition']));}function _0x53086e(_0x348823){const _0x289782=_0x1f48d2['mapper']['toViewPosition'](_0x348823),_0x46f25b=_0x1f48d2['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x386a5f});_0x1f48d2['writer']['insert'](_0x289782,_0x46f25b),_0x1f48d2['mapper']['bindElementToMarker'](_0x46f25b,_0x2ed360['markerName']);}_0x499354||_0x4dac5e||!_0x333d4c||_0x53086e(_0x333d4c);};}class nt extends _0x53290d{constructor(_0x20e498){super(_0x20e498);const _0x22d578=_0x20e498['plugins']['get'](l);this['affectsData']=!0x1,this['listenTo'](_0x22d578,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x22d578,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x587571=this['editor'],_0x3d1128=_0x587571['plugins']['get'](l),_0x55f21e=_0x3d1128['isReady']?_0x3d1128['diff']['newRevisionId']:null;_0x587571['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x55f21e);}['refresh'](){const {isReady:_0x79269a,isEnabled:_0xadd49a,repository:_0x1a8319,diff:_0x24ab77}=this['editor']['plugins']['get'](l),_0x276806=_0x24ab77&&_0x1a8319['getLaterVisibleRevision'](_0x24ab77['newRevisionId']);this['isEnabled']=_0x79269a&&_0xadd49a&&Boolean(_0x276806);}}class ot extends _0x53290d{['_step'];constructor(_0x311d09,{direction:_0xbce999}){super(_0x311d09);const _0x13ea1f=_0x311d09['plugins']['get'](l);this['affectsData']=!0x1,this['_step']='forward'===_0xbce999?0x1:-0x1,this['listenTo'](_0x13ea1f,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x13ea1f,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x13ea1f,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x32811e=this['editor'],_0x1f36a1=_0x32811e['plugins']['get'](l),{isNavigationMode:_0x30bad8,currentChangeNumber:_0x359042}=_0x1f36a1;let _0x59fe51;if(_0x1f36a1['activeChange']=_0x30bad8?_0x1f36a1['diff']['changes']['get'](_0x359042+this['_step']):_0x1f36a1['diff']['changes']['first'],_0x1f36a1['activeChange']['data']['isOnRoot'])_0x59fe51=_0x32811e['editing']['view']['getDomRoot'](_0x1f36a1['activeChange']['rootName']);else{const _0x391cfb=_0x32811e['model']['markers']['get']('revision:'+_0x1f36a1['activeChange']['id']);_0x59fe51=_0x53ffc2(_0x32811e['editing'],_0x391cfb);}_0x53e700({'target':_0x59fe51,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x14da02,currentChangeNumber:_0x355580,numberOfChanges:_0x9c0637,isReady:_0x173d16,isEnabled:_0x6e2a1d}=this['editor']['plugins']['get'](l);this['isEnabled']=!!(_0x6e2a1d&&_0x173d16&&_0x9c0637)&&(!_0x14da02||(0x1===this['_step']?_0x355580<_0x9c0637-0x1:_0x355580>0x0));}}class Ri extends _0x5b9845{constructor(_0x459ca4){super(_0x459ca4);const _0x464669=this['bindTemplate'],_0x2640be=new _0x13d813(_0x459ca4),_0x1ab6ea=new _0x13d813(_0x459ca4);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',(_0x22c59e,_0x230189)=>_0x22c59e&&_0x230189>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x1c22c6,_0x53f1b8,_0x1e0382,_0x33bf3d)=>{if(!_0x1c22c6)return R(_0x459ca4,'Loading...');if(!_0x1e0382)return R(_0x459ca4,'No\x20changes');const _0x18b8d7=R(_0x459ca4,'NUMBER_OF_CHANGES',_0x1e0382);return _0x33bf3d?R(_0x459ca4,'X_OF_Y_CHANGES',[_0x53f1b8+0x1,_0x1e0382]):_0x18b8d7;}),_0x2640be['set']({'label':R(_0x459ca4,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x3dc766}),_0x1ab6ea['set']({'label':R(_0x459ca4,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x1ce1a9}),_0x2640be['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x1ab6ea['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x2640be['on']('execute',()=>this['fire']('execute','backward')),_0x1ab6ea['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',_0x464669['if']('_isStatusLabelVisible','ck-hidden',_0x84faef=>!_0x84faef)]},'children':[{'text':_0x464669['to']('isNavigationMode',_0x4b81c0=>_0x4b81c0?R(_0x459ca4,'EDIT_X_OF_Y_REVISIONS')+':\x20':R(_0x459ca4,'Total')+':\x20')}]},{'text':_0x464669['to']('_statusText')}]},new _0x4fb74f(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x2640be,_0x1ab6ea]}]});}}const ge='ck-editor__editable__loading-overlay';class ji extends _0x54fe5b{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x4670cd=this['editor']['editing']['view'];_0x4670cd['change'](_0x4276da=>{for(const _0x3c2111 of _0x4670cd['document']['roots'])_0x4276da['addClass'](ge,_0x3c2111);});}['hide'](){const _0x1ff79d=this['editor']['editing']['view'];_0x1ff79d['change'](_0xbf6ebc=>{for(const _0x866670 of _0x1ff79d['document']['roots'])_0xbf6ebc['removeClass'](ge,_0x866670);});}}class u extends _0x54fe5b{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l,ji];}['init'](){const _0x4f479e=this['editor'],_0x587315=_0x4f479e['plugins']['get'](l),_0x71749e=_0x4f479e['plugins']['get'](ji);_0x4f479e['ui']['componentFactory']['add']('exitToEditing',_0x4b943f=>{const _0x5db767=new _0x13d813(_0x4b943f);return _0x5db767['set']({'label':R(_0x4b943f,'Back\x20to\x20editing'),'icon':_0x3c4bc3,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x5db767,'execute',()=>{_0x4f479e['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x5db767;}),_0x4f479e['ui']['componentFactory']['add']('restoreRevision',_0x188f1b=>{const _0x9d84ed=new _0x13d813(_0x188f1b);return _0x9d84ed['set']({'label':R(_0x188f1b,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x9d84ed['bind']('isEnabled')['to'](_0x4f479e['commands']['get']('restoreRevision')),this['listenTo'](_0x9d84ed,'execute',()=>_0x4f479e['execute']('restoreRevision')),_0x9d84ed;}),_0x4f479e['ui']['componentFactory']['add']('changesNavigation',_0x45b76e=>{const _0xa769a8=new Ri(_0x45b76e),_0x2087b6=_0x4f479e['commands']['get']('showPreviousChange'),_0x109ede=_0x4f479e['commands']['get']('showNextChange');return _0xa769a8['bind']('isBackwardNavigationEnabled')['to'](_0x2087b6,'isEnabled'),_0xa769a8['bind']('isForwardNavigationEnabled')['to'](_0x109ede,'isEnabled'),_0xa769a8['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x587315),this['listenTo'](_0xa769a8,'execute',(_0x15269d,_0x29146a)=>{_0x4f479e['execute']('forward'===_0x29146a?'showNextChange':'showPreviousChange');}),_0xa769a8;}),_0x71749e['show'](),_0x587315['on']('change:isReady',(_0x603a9b,_0xb9d89b,_0x29267c)=>{_0x29267c?_0x71749e['hide']():_0x71749e['show']();});}}class li extends ti{['_resizeObserver']=null;constructor(_0x526a3d,_0x10a4a2){super(_0x526a3d,_0x10a4a2);const _0x37bb9b=this['bindTemplate'];this['set']({'label':R(_0x526a3d,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=R(_0x526a3d,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x37bb9b['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new et(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x52d239=this['fieldView']['element'];this['_tooltipString']=_0x52d239['scrollWidth']>_0x52d239['clientWidth']&&_0x52d239['value']||'';}}class vi extends _0x5b9845{constructor(_0x50d4ea,_0x3bfffc,_0x3c2fe5){super(_0x50d4ea);const _0x19f88d=new _0x4bdfc1();_0x19f88d['set']({'content':_0x20843d,'viewBox':'0\x200\x2011\x2010'});const _0x4a8bba=['ck','ck-revision-history-sidebar__revision-author'];_0x3c2fe5&&_0x4a8bba['push']('ck-revision-history-sidebar__revision-author_creator');const _0x19e620=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':R(_0x50d4ea,_0x3c2fe5?'Revision\x20creator':'Revision\x20author')},'children':[_0x19f88d,_0x3bfffc['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x4a8bba},'children':_0x19e620});}}function mi(_0x5d86fa,_0x48a236){const _0xaecfe6=_0x5d86fa['bindTemplate'],_0x7f1e3c=_0x5d86fa['locale'],_0x30d90b=_0x3304c7(_0x7f1e3c);_0x30d90b['panelPosition']='sw';const _0x263976=function(_0x24d52b,_0x4dbacb){const _0x227567=function(_0xa33fcb,_0x2f3bf1){const _0x121a29=_0xa33fcb['locale'],_0x66dfbc={'Compare\x20against\x20selected':R(_0x121a29,'Compare\x20against\x20selected'),'Name\x20this\x20revision':R(_0x121a29,'Name\x20this\x20revision'),'Restore\x20this\x20revision':R(_0x121a29,'Restore\x20this\x20revision')};return _0x2f3bf1['map'](_0x502341=>{const _0x4e2770=_0x66dfbc[_0x502341['name']];return _0x4e2770&&_0x4e2770!==_0x502341['name']&&(_0x502341['name']=_0x4e2770),_0x502341;});}(_0x24d52b,_0x4dbacb),_0x5ac694=new _0x2b4e5c();for(const _0x58be36 of _0x227567){const _0xcf8b7c={'type':'button','model':new to({'label':_0x58be36['name'],'class':_0x58be36['class'],'withText':!0x0,'role':'menuitem','_action':_0x58be36['action']})};_0xcf8b7c['model']['bind']('isEnabled')['to'](_0x24d52b,'isActionsDropdownOpen',_0x2bd942=>'function'!=typeof _0x58be36['isEnabled']||(!_0x2bd942||_0x58be36['isEnabled'](_0x24d52b))),_0x5ac694['add'](_0xcf8b7c);}return _0x5ac694;}(_0x5d86fa,_0x48a236);return _0x5d86fa['bind']('isActionsDropdownOpen')['to'](_0x30d90b,'isOpen'),_0x30d90b['buttonView']['set']({'label':R(_0x7f1e3c,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x3a89ee}),_0x30d90b['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0xaecfe6['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0xaecfe6['to'](_0x5ddaae=>_0x5ddaae['stopPropagation']())}}),_0x30d90b['on']('execute',_0x15c6b2=>{_0x5d86fa['isReady']&&'function'==typeof _0x15c6b2['source']['_action']&&_0x15c6b2['source']['_action'](_0x5d86fa);}),_0x42fbf9(_0x30d90b,_0x263976,{'role':'menu'}),_0x30d90b['listenTo'](_0x5d86fa,'change:isActionsDropdownOpen',(_0x39e158,_0x26cc77,_0x39819a)=>{if(_0x39819a)for(const _0x54acc0 of _0x30d90b['listView']['items']){const _0x23d1a2=_0x54acc0['children']['first'],_0x3d2962=_0x48a236['find'](_0x33849e=>_0x33849e['action']===_0x23d1a2['_action'])['isVisible'];_0x54acc0['isVisible']=void 0x0===_0x3d2962||_0x3d2962(_0x5d86fa);}}),_0x30d90b;}class pi extends/* #__PURE__ -- @preserve */
27
- _0xdaf19f(_0x5b9845){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x57d804,_0x20e16e,_0x5f19db,_0x455338){super(_0x57d804);const _0x6cfefa=this['bindTemplate'],_0x30ec11=function(_0x5ad11c,_0x1261fd){const _0x4786f7=Array['from'](_0x1261fd['authors'])['filter'](_0x5ab558=>_0x5ab558!=_0x1261fd['creator']);return _0x1261fd['creator']&&_0x4786f7['unshift'](_0x1261fd['creator']),_0x4786f7['map'](_0x5dddec=>new vi(_0x5ad11c,_0x5dddec,_0x5dddec==_0x1261fd['creator']));}(_0x57d804,_0x20e16e);this['id']=_0x20e16e['id'],this['_revision']=_0x20e16e,this['_requireRevisionName']=_0x455338,this['bind']('name','createdAt')['to'](_0x20e16e),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x1f2160=>{return _0x4a4546=_0x57d804['uiLanguage'],(_0x12a643=_0x1f2160)['toLocaleDateString'](_0x4a4546,{'month':'long','day':'numeric'})+',\x20'+_0x12a643['toLocaleTimeString'](_0x4a4546,{'hour':'numeric','minute':'numeric'});var _0x4a4546,_0x12a643;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new li(_0x57d804,_0x413488),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x4ef05e=>_0x4ef05e||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x4a0cec,_0x30156d)=>_0x4a0cec&&_0x30156d),this['revisionActionsView']=_0x5f19db&&_0x5f19db['length']?mi(this,_0x5f19db):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x6cfefa['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x6cfefa['if']('isEnabled','ck-disabled',_0x113ffc=>!_0x113ffc),_0x6cfefa['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x6cfefa['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x6cfefa['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':_0x6cfefa['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':_0x30ec11}]},this['revisionActionsView']],'on':{'click':_0x6cfefa['to'](_0x3e9f21=>{_0x3e9f21['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x40416c=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x40416c,'change',()=>{this['_requireRevisionName']&&!_0x40416c['value']||this['fire']('setName',{'id':this['id'],'name':_0x40416c['value']}),_0x40416c['value']||(_0x40416c['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function bi(_0x2f2f23,_0x5ae00c){const _0x286f1f=_0x577fd7['fromJSDate'](_0x2f2f23)['setLocale'](_0x5ae00c),_0x4bfb3e=_0x577fd7['local'](),_0x7f4f5e=_0x4bfb3e['minus']({'days':0x1})['startOf']('day');let _0x366969,_0x15edea;return _0x286f1f['hasSame'](_0x4bfb3e,'day')?(_0x366969=_0x286f1f['startOf']('day')['toJSDate'](),_0x15edea=_0x286f1f['toRelativeCalendar']()):_0x286f1f['hasSame'](_0x7f4f5e,'day')?(_0x366969=_0x7f4f5e['toJSDate'](),_0x15edea=_0x286f1f['toRelativeCalendar']()):_0x286f1f['hasSame'](_0x4bfb3e,'week')?(_0x366969=_0x286f1f['startOf']('week')['toJSDate'](),_0x15edea=_0x286f1f['weekdayLong']||''):_0x286f1f['hasSame'](_0x4bfb3e,'year')?(_0x366969=_0x286f1f['startOf']('month')['toJSDate'](),_0x15edea=_0x286f1f['monthLong']||''):(_0x366969=_0x286f1f['startOf']('year')['toJSDate'](),_0x15edea=String(_0x286f1f['year'])),{'startDate':_0x366969,'localizedPeriodName':_0x15edea};}class fi extends _0x5b9845{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0xcdd762,_0x5744b7,_0xb00a05,_0x3488ed){super(_0xcdd762);const _0x5fe87a=bi(_0x5744b7,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x5744b7,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0xb00a05,this['_requireRevisionName']=_0x3488ed,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':_0x5fe87a}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x97d510){const _0x8f238a=new pi(this['locale'],_0x97d510,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x8f238a);}['removeRevision'](_0x2ccbb6){const _0x6e36db=this['revisionViews']['find'](_0x3718ee=>_0x3718ee['id']===_0x2ccbb6['id']);this['revisionViews']['remove'](_0x6e36db);}}class ki extends _0x5b9845{constructor(_0xae6e9a){super(_0xae6e9a);const _0x341118=new _0x4bdfc1();_0x341118['content']=_0x2e4e90,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x341118,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[R(_0xae6e9a,'Revision\x20history')]}]});}}class ui extends _0x5b9845{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x28c3a6,_0x5cdc01,_0x4c6e84,_0x83b95){super(_0x28c3a6);const _0x167b7c=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x5cdc01,this['_revisionActions']=_0x4c6e84,this['_requireRevisionName']=_0x83b95,this['on']('select',(_0x5b57e8,_0x451b85)=>{this['fire']('revisionSelected',_0x451b85);}),this['on']('setName',(_0x2598f4,_0x45389d)=>{this['fire']('revisionSetName',_0x45389d);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new ki(_0x28c3a6),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x167b7c['if']('isEnabled','ck-disabled',_0x2ce8d2=>!_0x2ce8d2)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x54d2fb of this['_revisions'])this['_addRevision'](_0x54d2fb);this['_revisions']['on']('add',(_0x2877cd,_0x5e2891)=>{this['_addRevision'](_0x5e2891);}),this['_revisions']['on']('remove',(_0x11d2f7,_0x453e7d)=>{this['_removeRevision'](_0x453e7d);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x2bbfd7=>_0x2bbfd7['revisionViews']['map'](_0x3351ed=>_0x3351ed))['flat']();}['selectRevision'](_0x24f07e){for(const _0x3a9e99 of this['revisionViews'])_0x24f07e&&_0x24f07e['id']===_0x3a9e99['id']?_0x3a9e99['select']():_0x3a9e99['deselect']();}['highlightRevisions'](_0x4bd3b2){for(const _0xb5e3d5 of this['revisionViews'])_0x4bd3b2['some'](({id:_0x17d67d})=>_0x17d67d===_0xb5e3d5['id'])?_0xb5e3d5['highlight']():_0xb5e3d5['unhighlight']();}['_addRevision'](_0x3fd9e9){const _0x4a7382=bi(_0x3fd9e9['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x21853c=this['timePeriodViews']['get'](0x0);_0x21853c&&_0x21853c['startDate']['getTime']()===_0x4a7382['getTime']()||(_0x21853c=new fi(this['locale'],_0x4a7382,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x21853c)),_0x21853c['addRevision'](_0x3fd9e9);}['_removeRevision'](_0x15f9e0){const _0x2fa6ca=bi(_0x15f9e0['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x2fa6ca)['removeRevision'](_0x15f9e0);}['_getTimePeriodViewByStartDate'](_0xd9de35){return this['timePeriodViews']['find'](_0x4b4559=>_0x4b4559['startDate']['getTime']()===_0xd9de35['getTime']());}}class f extends _0x54fe5b{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
23
+ import{ObservableMixin as _0x409714,uid as _0x36f224,Collection as _0x1024f1,logWarning as _0x4cf3c9,FocusTracker as _0x2c8044,KeystrokeHandler as _0x592331,scrollViewportToShowTarget as _0x5a887a,ResizeObserver as ot,ElementReplacer as it,CKEditorError as _0x3a0f06}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x477256,set as _0x38d64e,unset as _0x2bfd17,isEqual as _0x13ba33}from'es-toolkit/compat';import{Plugin as _0x279b1f,PendingActions as _0x2bb90e,Command as _0xfcc260,ElementApiMixin as _0x58d9e3,Editor as _0x2bf74e}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x5c194e,getMarkerDomElement as _0x28595c,ConfirmMixin as _0x4f8448,sanitizeEditorConfig as _0x5c74eb}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0x32266d,ViewAttributeElement as _0x325bb5,ViewEmptyElement as _0x28020d,ViewRawElement as _0x42890e,ViewUIElement as _0x2dd00d,ViewDocumentFragment as _0x487985,ViewText as _0x1a61d8,ViewElement as _0x51f3d9,ModelElement as _0x45ab54,ModelRange as _0x3e295f,ModelPosition as _0x414fcc,ModelDocumentFragment as _0x4b7f84,ModelText as _0x95c9c7}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x5df96c,IconChevronUp as _0x10b79d,IconChevronDown as _0x2175e8,IconUndo as _0x22d576,IconUser as _0x33aea7,IconThreeVerticalDots as _0x84bf8c}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x515010,View as _0x4755b5,submitHandler as _0x45b763,LabeledFieldView as et,createLabeledInputText as ti,createDropdown as _0x365f78,ListView as _0x1d7b13,ListItemView as _0x554ed8,ButtonView as _0x4bbda8,MenuBarMenuView as _0x462d3d,MenuBarMenuListView as _0xea17a6,MenuBarMenuListItemView as _0x999d71,MenuBarMenuListItemButtonView as _0x157300,ContextualBalloon as _0x4e220a,ToolbarSeparatorView as _0x5d8437,IconView as _0x2876f2,addListToDropdown as _0x15b29e,UIModel as to,EditorUI as tt,normalizeToolbarConfig as st,BoxedEditorUIView as _0x59fb3d,StickyPanelView as _0x3cd25a,ToolbarView as _0x43bb6a,InlineEditableUIView as te}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x3fc25b}from'luxon';class I extends/* #__PURE__ -- @preserve */
24
+ _0x409714(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x7ebd15){super(),this['id']=_0x7ebd15['id']||_0x36f224(),this['creator']=_0x7ebd15['creator']||null,this['authors']=_0x7ebd15['authors']||[],this['diffData']=_0x7ebd15['diffData']||null,this['toVersion']=_0x7ebd15['toVersion']||0x0,this['fromVersion']=_0x7ebd15['fromVersion']||0x0,this['set']('name',_0x7ebd15['name']||''),this['set']('createdAt',_0x7ebd15['createdAt']||new Date()),this['set']('attributes',_0x7ebd15['attributes']||{});}['setName'](_0x490fcf){this['_update']({'name':_0x490fcf});}['setAttribute'](_0x40922e,_0xb25187){const _0x44435a=_0x477256(this['attributes']);_0x38d64e(_0x44435a,_0x40922e,_0xb25187),this['_update']({'attributes':_0x44435a});}['removeAttribute'](_0x38f9e6){const _0x5a81f1=_0x477256(this['attributes']);_0x2bfd17(_0x5a81f1,_0x38f9e6),this['_update']({'attributes':_0x5a81f1});}['_update'](_0x5518ed,_0xcc07cf=!0x1){let _0x394c57=!0x1;const _0x47afdd={'id':this['id']},_0x75e70d=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x4963bf of _0x75e70d){const _0x20b2f9=_0x5518ed[_0x4963bf];void 0x0!==_0x20b2f9&&_0x20b2f9!==this[_0x4963bf]&&(this[_0x4963bf]=_0x20b2f9,_0x47afdd[_0x4963bf]=_0x20b2f9,_0x394c57=!0x0);}_0x394c57&&(_0x47afdd['authors']&&(_0x47afdd['authorsIds']=_0x47afdd['authors']['map'](_0x57ba09=>_0x57ba09['id']),delete _0x47afdd['authors']),this['fire']('_update',_0x47afdd,_0xcc07cf));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0xa2f795=>_0xa2f795['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class S extends _0x279b1f{['_revisions'];static get['requires'](){return[_0x5c194e];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x4184b9){super(_0x4184b9),this['_revisions']=new _0x1024f1();}['afterInit'](){!async function(_0x25a3b1){const _0x31a903=_0x586928([0x43,0x62,0x4d,0x54,0x53,0x67,0x42,0x63,0x49,0x44,0x6b,0x36,0x68,0x59,0x4f,0x48,0x41,0x74,0x4b,0x6c,0x64,0x73,0x5a,0x72,0x30,0x75,0x47,0x4e,0x37,0x6d,0x51,0x6a,0x50,0x77,0x32,0x34,0x57,0x61,0x6e,0x6f,0x33,0x39,0x66,0x70,0x46,0x45,0x58,0x71,0x7a,0x4a,0x38,0x76,0x69,0x52,0x78,0x31,0x79,0x35,0x56,0x65,0x55,0x4c]),_0x10e286=0xeb829,_0x1f40a7=0x733c064b,_0x6700b1=0x733b6ab3^_0x1f40a7,_0x522498=window[_0x586928([0x44,0x61,0x74,0x65])][_0x586928([0x6e,0x6f,0x77])](),_0x5dc177=_0x25a3b1[_0x586928([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x75baf5=new window[(_0x586928([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3c57f9=>{_0x5dc177[_0x586928([0x6f,0x6e,0x63,0x65])](_0x586928([0x72,0x65,0x61,0x64,0x79]),_0x3c57f9);}),_0x626029={[_0x586928([0x6b,0x74,0x79])]:_0x586928([0x45,0x43]),[_0x586928([0x75,0x73,0x65])]:_0x586928([0x73,0x69,0x67]),[_0x586928([0x63,0x72,0x76])]:_0x586928([0x50,0x2d,0x32,0x35,0x36]),[_0x586928([0x78])]:_0x586928([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]),[_0x586928([0x79])]:_0x586928([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]),[_0x586928([0x61,0x6c,0x67])]:_0x586928([0x45,0x53,0x32,0x35,0x36])},_0x551622=_0x5dc177[_0x586928([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x586928([0x67,0x65,0x74])](_0x586928([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2a972d(){let _0x1450f9,_0x307551=null,_0x559be0=null;try{if(_0x551622==_0x586928([0x47,0x50,0x4c]))return _0x586928([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1450f9=_0x1fa2a6(),!_0x1450f9)return _0x586928([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1450f9[_0x586928([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x559be0=_0x4c1514(_0x1450f9[_0x586928([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1450f9[_0x586928([0x6a,0x74,0x69])])),await _0x473dc2()?_0x5ed016()?_0x5d978f()?_0x586928([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x3faebf()?(_0x1450f9[_0x586928([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x586928([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x307551=_0x34882d(_0x586928([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1450f9[_0x586928([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x586928([0x74,0x72,0x69,0x61,0x6c])&&(_0x307551=_0x34882d(_0x586928([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x4fbc41()):_0x586928([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x586928([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x586928([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x586928([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5d978f(){const _0x10c71b=[_0x586928([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x586928([0x74,0x72,0x69,0x61,0x6c])][_0x586928([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1450f9[_0x586928([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x522498/0x3e8:0xe10*_0x6700b1;return _0x1450f9[_0x586928([0x65,0x78,0x70])]<_0x10c71b;}function _0x5ed016(){const _0x3e402f=_0x1450f9[_0x586928([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x3e402f)return!0x1;if(_0x3e402f[_0x586928([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x586928([0x2a])))return!0x0;if(_0x3e402f[_0x586928([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x586928([0x52,0x48])))return!0x0;if(_0x3e402f[_0x586928([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x586928([0x52,0x52,0x48]))){if(_0x47e059())return!0x0;if(_0x59f073()||_0x39667d())return!0x0;}return!0x1;}function _0x3faebf(){const _0x17d937=_0x1450f9[_0x586928([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x17d937||0x0==_0x17d937[_0x586928([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4f22a5}=new URL(window[_0x586928([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x17d937[_0x586928([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f22a5))return!0x0;const _0x26d14c=_0x4f22a5[_0x586928([0x73,0x70,0x6c,0x69,0x74])](_0x586928([0x2e]));return _0x17d937[_0x586928([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x12b4d7=>_0x12b4d7[_0x586928([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x586928([0x2a])))[_0x586928([0x6d,0x61,0x70])](_0x2ac790=>_0x2ac790[_0x586928([0x73,0x70,0x6c,0x69,0x74])](_0x586928([0x2e])))[_0x586928([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xa1d339=>_0xa1d339[_0x586928([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x26d14c[_0x586928([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x586928([0x6d,0x61,0x70])](_0x4806a0=>Array(_0x26d14c[_0x586928([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x4806a0[_0x586928([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x586928([0x66,0x69,0x6c,0x6c])](_0x4806a0[0x0]===_0x586928([0x2a])?_0x586928([0x2a]):'')[_0x586928([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x4806a0))[_0x586928([0x73,0x6f,0x6d,0x65])](_0x281045=>_0x26d14c[_0x586928([0x65,0x76,0x65,0x72,0x79])]((_0x5afee3,_0x1f76fc)=>_0x281045[_0x1f76fc]===_0x5afee3||_0x281045[_0x1f76fc]===_0x586928([0x2a])));}function _0x4fbc41(){return _0x307551&&_0x559be0?new window[(_0x586928([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5a263b,_0x163f6c)=>{_0x307551[_0x586928([0x74,0x68,0x65,0x6e])](_0x5a263b,_0x163f6c),_0x559be0[_0x586928([0x74,0x68,0x65,0x6e])](_0x186ab5=>{_0x186ab5!=_0x586928([0x56,0x61,0x6c,0x69,0x64])&&_0x5a263b(_0x186ab5);},_0x163f6c);}):_0x307551||_0x559be0||_0x586928([0x56,0x61,0x6c,0x69,0x64]);}}function _0x4c1514(_0x40e593,_0x3d19af){return new window[(_0x586928([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2c1793=>{if(_0x192bfc())return _0x2c1793(_0x586928([0x56,0x61,0x6c,0x69,0x64]));_0xbdb990(),_0x5dc177[_0x586928([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x586928([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x530c70=!0x1;const _0x2bdff3=_0x36f224();function _0x12b6c2(_0x139a72){return!!_0x139a72&&(typeof _0x139a72===_0x586928([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x139a72===_0x586928([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x139a72[_0x586928([0x74,0x68,0x65,0x6e])]===_0x586928([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x139a72[_0x586928([0x63,0x61,0x74,0x63,0x68])]===_0x586928([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x506355(_0x2eb58f){_0x25787b(_0x2eb58f)[_0x586928([0x74,0x68,0x65,0x6e])](_0x1dc597=>{if(!_0x1dc597||_0x1dc597[_0x586928([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x586928([0x6f,0x6b]))return _0x586928([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x56fc1a(_0x377157(_0x2bdff3+_0x3d19af))!=_0x1dc597[_0x586928([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x586928([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x586928([0x56,0x61,0x6c,0x69,0x64]);})[_0x586928([0x74,0x68,0x65,0x6e])](_0x381df0=>(_0x2f845b(),_0x381df0),()=>{const _0x3b9eaa=_0x2dee5a();return null==_0x3b9eaa?(_0x2f845b(),_0x586928([0x56,0x61,0x6c,0x69,0x64])):_0x586928(_0x522498-_0x3b9eaa>(0x5730824b^_0x1f40a7)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x586928([0x74,0x68,0x65,0x6e])](_0x2c1793)[_0x586928([0x63,0x61,0x74,0x63,0x68])](()=>{_0x2c1793(_0x586928([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xdbb244=0x730ae8cb^_0x1f40a7;function _0x2f845b(){const _0x4e1648=_0x586928([0x6c,0x6c,0x63,0x74,0x2d])+_0x56fc1a(_0x377157(_0x40e593)),_0x29798f=_0x41af1a(_0x56fc1a(window[_0x586928([0x4d,0x61,0x74,0x68])][_0x586928([0x63,0x65,0x69,0x6c])](_0x522498/_0xdbb244)));window[_0x586928([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x586928([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4e1648,_0x29798f);}function _0x2dee5a(){const _0xc75a61=_0x586928([0x6c,0x6c,0x63,0x74,0x2d])+_0x56fc1a(_0x377157(_0x40e593)),_0x5862e7=window[_0x586928([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x586928([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xc75a61);return _0x5862e7?window[_0x586928([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x41af1a(_0x5862e7),0x10)*_0xdbb244:null;}function _0x25787b(_0x424015){return new window[(_0x586928([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4fd6b6,_0x3961bf)=>{_0x424015[_0x586928([0x74,0x68,0x65,0x6e])](_0x4fd6b6,_0x3961bf),window[_0x586928([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3961bf,0x733dd28b^_0x1f40a7);});}}_0x5dc177[_0x586928([0x6f,0x6e])](_0x586928([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x4456d7,_0x5eafac)=>{if(_0x5eafac[0x0]!=_0x40e593)return _0x2c1793(_0x586928([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5eafac[0x1]={..._0x5eafac[0x1],[_0x586928([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2bdff3};},{[_0x586928([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x586928([0x68,0x69,0x67,0x68])}),_0x5dc177[_0x586928([0x6f,0x6e])](_0x586928([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x34d04f=>{_0x12b6c2(_0x34d04f[_0x586928([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x530c70=!0x0,_0x506355(_0x34d04f[_0x586928([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x586928([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x586928([0x6c,0x6f,0x77])}),_0x75baf5[_0x586928([0x74,0x68,0x65,0x6e])](()=>{_0x530c70||_0x2c1793(_0x586928([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x192bfc(){return _0x5dc177[_0x586928([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x586928([0x76,0x69,0x65,0x77])][_0x586928([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x586928([0x61,0x75,0x74,0x6f]);}function _0xbdb990(){_0x5dc177[_0x586928([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x586928([0x76,0x69,0x65,0x77])][_0x586928([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x586928([0x61,0x75,0x74,0x6f]);}}function _0x34882d(_0x312db0){const _0x28e456=[new window[(_0x586928([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x362168=>setTimeout(_0x362168,0x73353887^_0x1f40a7)),_0x75baf5[_0x586928([0x74,0x68,0x65,0x6e])](()=>new window[(_0x586928([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x156f56=>{const _0x9c0d51=0x733c064c^_0x1f40a7,_0x5d6a3a=_0x25a3b1[_0x586928([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x1f4013(){_0x5d6a3a[_0x586928([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x9c0d51&&_0x156f56();}_0x1f4013(),_0x5d6a3a[_0x586928([0x6f,0x6e])](_0x586928([0x61,0x64,0x64]),_0x1f4013);})),new window[(_0x586928([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x187475=>{function _0x5dcfcd(){for(const _0x10d0cc in window)if(window[_0x586928([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x586928([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x10d0cc))&&window[_0x10d0cc]==_0x10e286)return _0x187475();_0x5dc177[_0x586928([0x73,0x74,0x61,0x74,0x65])]!=_0x586928([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x586928([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5dcfcd,0x733c15c3^_0x1f40a7);}_0x5a83b9(_0x586928([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x5dcfcd();})];return window[_0x586928([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x586928([0x72,0x61,0x63,0x65])](_0x28e456)[_0x586928([0x74,0x68,0x65,0x6e])](()=>_0x312db0);}async function _0x53a129(){if(await _0x75baf5,_0x5a83b9(_0x586928([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x2f1b29=_0x25a3b1[_0x586928([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x76b3a1=_0x25a3b1[_0x586928([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])](_0x2f1b29[_0x586928([0x69,0x64])]),_0x46ba95=_0x3ec766(_0x586928([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x46ba95[_0x586928([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x2f1b29['id'],_0x76b3a1?_0x76b3a1['id']:null,!0x0),_0x46ba95[_0x586928([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x586928([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x46ba95[_0x586928([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x46ba95[_0x586928([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x1660ea,void(_0x46ba95[_0x586928([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x1660ea);}if(_0x5a83b9(_0x586928([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x4d150b=_0x3ec766(_0x586928([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x4d150b[_0x586928([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x586928([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x4d150b[_0x586928([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x4d150b[_0x586928([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x1660ea,_0x4d150b[_0x586928([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x1660ea;}_0x5dc177[_0x586928([0x6d,0x6f,0x64,0x65,0x6c])][_0x586928([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x1660ea,_0x5dc177[_0x586928([0x6d,0x6f,0x64,0x65,0x6c])][_0x586928([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x1660ea,_0x5dc177[_0x586928([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x586928([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x47e059(){return _0x5a83b9(_0x586928([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x3ec766(_0x586928([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x586928([0x73,0x74,0x61,0x74,0x65])]==_0x586928([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x59f073(){return _0x5a83b9(_0x586928([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 _0x39667d(){return _0x5a83b9(_0x586928([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x25edd5(_0x592261){const _0x274707=_0x33b789();_0x5dc177[_0x274707]=_0x586928([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])+_0x592261,_0x592261[_0x586928([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x586928([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x33b789()]=_0x10e286),_0x592261!=_0x586928([0x56,0x61,0x6c,0x69,0x64])&&_0x53a129();}function _0x33b789(){const _0x4fec2f=window[_0x586928([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x586928([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x586928([0x6e,0x6f,0x77])]())[_0x586928([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x586928([0x2e]),'');let _0xb8099d=_0x586928([0x43]);for(let _0x383966=0x0;_0x383966<_0x4fec2f[_0x586928([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x383966+=0x2){let _0xbe43e7=window[_0x586928([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4fec2f[_0x586928([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x383966,_0x383966+0x2));_0xbe43e7>=_0x31a903[_0x586928([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0xbe43e7-=_0x31a903[_0x586928([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0xb8099d+=_0x31a903[_0xbe43e7];}return _0xb8099d;}function _0x1fa2a6(){const _0x223f55=_0x551622[_0x586928([0x73,0x70,0x6c,0x69,0x74])](_0x586928([0x2e]));if(0x3!=_0x223f55[_0x586928([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x98287c(_0x223f55[0x1]);function _0x98287c(_0x971517){const _0xf1f47d=_0x1dcada(_0x971517);return _0xf1f47d&&_0x20c57a()?_0xf1f47d:null;function _0x20c57a(){const _0x6f3dcd=_0xf1f47d[_0x586928([0x6a,0x74,0x69])],_0x556691=window[_0x586928([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x6f3dcd[_0x586928([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x6f3dcd[_0x586928([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2a7dd0={..._0xf1f47d,[_0x586928([0x6a,0x74,0x69])]:_0x6f3dcd[_0x586928([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x6f3dcd[_0x586928([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2a7dd0[_0x586928([0x76,0x63])],_0x377157(_0x2a7dd0)==_0x556691;}}}async function _0x473dc2(){let _0x97dcc5=!0x0;try{const _0x147747=_0x551622[_0x586928([0x73,0x70,0x6c,0x69,0x74])](_0x586928([0x2e])),[_0x485c79,_0x1c8564,_0x3556c0]=_0x147747;return _0xcf54d5(_0x485c79),await _0x5ddba5(_0x485c79,_0x1c8564,_0x3556c0),_0x97dcc5;}catch{return!0x1;}function _0xcf54d5(_0xc1e386){const _0x57a7cc=_0x1dcada(_0xc1e386);_0x57a7cc&&_0x57a7cc[_0x586928([0x61,0x6c,0x67])]==_0x586928([0x45,0x53,0x32,0x35,0x36])||(_0x97dcc5=!0x1);}async function _0x5ddba5(_0x554b68,_0x21419e,_0x4121cf){const _0x164ff2=window[_0x586928([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x586928([0x66,0x72,0x6f,0x6d])](_0x29cf04(_0x4121cf),_0x44fee6=>_0x44fee6[_0x586928([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x47fe5f=new window[(_0x586928([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x586928([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x554b68+_0x586928([0x2e])+_0x21419e),_0x1b9719=window[_0x586928([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x586928([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x1b9719)return;const _0x26ff09=await _0x1b9719[_0x586928([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x586928([0x6a,0x77,0x6b]),_0x626029,{[_0x586928([0x6e,0x61,0x6d,0x65])]:_0x586928([0x45,0x43,0x44,0x53,0x41]),[_0x586928([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x586928([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x586928([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x1b9719[_0x586928([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x586928([0x6e,0x61,0x6d,0x65])]:_0x586928([0x45,0x43,0x44,0x53,0x41]),[_0x586928([0x68,0x61,0x73,0x68])]:{[_0x586928([0x6e,0x61,0x6d,0x65])]:_0x586928([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x26ff09,_0x164ff2,_0x47fe5f)||(_0x97dcc5=!0x1);}}function _0x1dcada(_0x4f969f){return _0x4f969f[_0x586928([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x586928([0x65,0x79]))?JSON[_0x586928([0x70,0x61,0x72,0x73,0x65])](_0x29cf04(_0x4f969f)):null;}function _0x29cf04(_0x3fddc3){return window[_0x586928([0x61,0x74,0x6f,0x62])](_0x3fddc3[_0x586928([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x586928([0x2b]))[_0x586928([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x586928([0x2f])));}function _0x377157(_0x51b5f1){let _0x1cec59=0x1505;function _0x8b48e2(_0x1ee643){for(let _0x109e03=0x0;_0x109e03<_0x1ee643[_0x586928([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x109e03++){const _0x5cadab=_0x1ee643[_0x586928([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x109e03);_0x1cec59=(_0x1cec59<<0x5)+_0x1cec59+_0x5cadab,_0x1cec59&=_0x1cec59;}}function _0x259e20(_0x84cf02){Array[_0x586928([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x84cf02)?_0x84cf02[_0x586928([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x259e20):_0x84cf02&&typeof _0x84cf02==_0x586928([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x586928([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x84cf02)[_0x586928([0x73,0x6f,0x72,0x74])]()[_0x586928([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x37ae20,_0x3de62b])=>{_0x8b48e2(_0x37ae20),_0x259e20(_0x3de62b);}):_0x8b48e2(window[_0x586928([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x84cf02));}return _0x259e20(_0x51b5f1),_0x1cec59>>>0x0;}function _0x56fc1a(_0x31d142){return _0x31d142[_0x586928([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x586928([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x586928([0x30]));}function _0x41af1a(_0x359429){return _0x359429[_0x586928([0x73,0x70,0x6c,0x69,0x74])]('')[_0x586928([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x586928([0x6a,0x6f,0x69,0x6e])]('');}function _0x5a83b9(_0x486efe){return _0x5dc177[_0x586928([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x586928([0x68,0x61,0x73])](_0x486efe);}function _0x3ec766(_0x8352d8){return _0x5dc177[_0x586928([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x586928([0x67,0x65,0x74])](_0x8352d8);}function _0x1660ea(){}function _0x586928(_0x108f79){return _0x108f79['map'](_0x3e2108=>String['fromCharCode'](_0x3e2108))['join']('');}_0x25edd5(await _0x2a972d());}(this);}['createRevision'](_0x100413){const _0x55d42e=this['editor']['plugins']['get']('Users');return new I({'id':_0x100413['id'],'name':_0x100413['name'],'creator':_0x100413['creatorId']?_0x55d42e['getUser'](_0x100413['creatorId']):null,'diffData':_0x100413['diffData']||_0x100413['data'],'authors':_0x100413['authorsIds']['map'](_0x1062fa=>_0x55d42e['getUser'](_0x1062fa)),'createdAt':new Date(_0x100413['createdAt']),'attributes':_0x100413['attributes'],'fromVersion':_0x100413['fromVersion'],'toVersion':_0x100413['toVersion']});}['addRevision'](_0x2b4019,_0x2ab708=0x0){this['_revisions']['add'](_0x2b4019,_0x2ab708);}['getRevision'](_0x52c772){return this['_revisions']['get'](_0x52c772);}['getRevisions'](_0x100643={'toJSON':!0x1}){const _0x23b7c4=Array['from'](this['_revisions']);return _0x23b7c4['reverse'](),_0x100643['toJSON']?_0x23b7c4['map'](_0x405820=>_0x405820['toJSON']()):_0x23b7c4;}['getIndex'](_0x104d4f){return this['_revisions']['getIndex'](_0x104d4f);}['getEarlierVisibleRevision'](_0x580be1){const [,_0xb6a10f]=this['getRevisionsIterator'](_0x580be1,{'direction':'earlier'});return _0xb6a10f;}['getLaterVisibleRevision'](_0x1c9339){const [,_0x44cc0a]=this['getRevisionsIterator'](_0x1c9339,{'direction':'later'});return _0x44cc0a;}['getRevisionsInDiff'](_0x395b2d){const _0x30c766=[];for(const _0x3c646d of this['getRevisionsIterator'](_0x395b2d['newRevisionId']))if(_0x30c766['push'](_0x3c646d),_0x3c646d['id']===_0x395b2d['oldRevisionId'])break;return _0x30c766;}*['getRevisionsIterator'](_0x13acdd,{direction:_0x8269b8='earlier',filter:_0x5325a6=()=>!0x0}={}){const _0x2dc620='earlier'===_0x8269b8?0x1:-0x1;let _0x355640=this['_revisions']['get'](_0x13acdd),_0x404bef=this['getIndex'](_0x355640);for(yield _0x355640;_0x355640;){if(_0x404bef+=_0x2dc620,_0x355640=this['getRevision'](_0x404bef),!_0x355640)return;_0x5325a6(_0x355640)&&(yield _0x355640);}}}class $ extends _0x279b1f{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x32266d,'c'],[_0x325bb5,'a'],[_0x28020d,'e'],[_0x42890e,'r'],[_0x2dd00d,'u']]);['_typeCharToViewClass']=new Map([['c',_0x32266d],['a',_0x325bb5],['e',_0x28020d],['r',_0x42890e],['u',_0x2dd00d]]);async['loadRevisionData'](_0x54e8af,_0x5467fc){if(_0x54e8af['diffData']||!_0x5467fc)return;const _0x34d0ed=this['editor']['config']['get']('collaboration.channelId'),_0x55ab5f=await _0x5467fc['getRevision']({'channelId':_0x34d0ed,'revisionId':_0x54e8af['id']});_0x54e8af['diffData']=_0x55ab5f['diffData'];}['getRevisionDocumentData'](_0xccf6e5){const _0x32b927={};for(const _0x275249 in _0xccf6e5['diffData']){if(_0xccf6e5['diffData'][_0x275249]['attachChange']&&!_0xccf6e5['diffData'][_0x275249]['attachChange']['isAttached'])continue;const _0x45b387=this['_removeRevisionMarkers'](JSON['parse'](_0xccf6e5['diffData'][_0x275249]['insertions'])),_0x3a8b67=this['editor']['editing']['view']['document'],_0x8e10a8=new _0x487985(_0x3a8b67,_0x45b387['map'](_0x13e030=>this['_getViewFromDiffObj'](_0x13e030,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x32b927[_0x275249]=this['editor']['data']['processor']['toData'](_0x8e10a8),this['editor']['data']['processor']['useFillerType']('default');}return _0x32b927;}['getRevisionRootsAttributes'](_0x58fa7b){const _0x4afcc7={};for(const _0x9ed035 in _0x58fa7b['diffData'])_0x58fa7b['diffData'][_0x9ed035]['attachChange']&&!_0x58fa7b['diffData'][_0x9ed035]['attachChange']['isAttached']||(_0x4afcc7[_0x9ed035]=_0x58fa7b['diffData'][_0x9ed035]['attributesAfter']||{});return _0x4afcc7;}['_getTypeCharForViewElement'](_0x28bc93){return this['_viewClassToTypeChar']['get'](_0x28bc93['constructor']);}['_getViewFromDiffObj'](_0x4bac30,_0x579b40){const _0x1eb5d8=this['editor']['editing']['view']['document'];if('string'==typeof _0x4bac30)return new _0x1a61d8(_0x1eb5d8,_0x4bac30);{let _0x2cfa49,_0x79d44a;_0x79d44a='u'==_0x4bac30['type']||'r'==_0x4bac30['type']?[]:_0x4bac30['children']['map'](_0x5829e0=>this['_getViewFromDiffObj'](_0x5829e0,_0x579b40));const _0x34c3ad=this['_typeCharToViewClass']['get'](_0x4bac30['type'])||_0x51f3d9,_0x32ea36=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x2cfa49=new _0x34c3ad(_0x1eb5d8,_0x4bac30['name'],_0x4bac30['attributes'],_0x79d44a),'u'==_0x4bac30['type']&&_0x4bac30['children'][0x0]){const _0x5686ae=_0x4bac30['children'][0x0];if(_0x2cfa49['render']=function(_0x3e008b){const _0x4aa4e9=_0x3e008b['createElement']('div');return _0x4aa4e9['innerHTML']=_0x5686ae,_0x4aa4e9['childNodes'][0x0];},_0x579b40){const _0xe1d6cb=new _0x487985(_0x1eb5d8);_0xe1d6cb['_appendChild'](_0x2cfa49);const _0x960964=Array['from'](_0x32ea36['viewChildrenToDom'](_0xe1d6cb,{'bind':!0x1})),_0x1ad993=_0x32ea36['domDocument']['createElement']('div');_0x1ad993['append'](..._0x960964),_0x2cfa49=Array['from'](_0x32ea36['domChildrenToView'](_0x1ad993))[0x0];}}else{if('r'==_0x4bac30['type']&&_0x4bac30['children'][0x0]){const _0x43acf2=_0x4bac30['children'][0x0];if(_0x2cfa49['render']=function(_0x12b51e){_0x12b51e['innerHTML']=_0x43acf2;},_0x579b40){const _0x37c3e5=new _0x487985(_0x1eb5d8);_0x37c3e5['_appendChild'](_0x2cfa49);const _0x111c56=Array['from'](_0x32ea36['viewChildrenToDom'](_0x37c3e5,{'bind':!0x1})),_0x196076=_0x32ea36['domDocument']['createElement']('div');_0x196076['append'](..._0x111c56);const _0x31d17e=Array['from'](_0x32ea36['domChildrenToView'](_0x196076));_0x31d17e['length']>0x1?_0x2cfa49['_appendChild'](_0x31d17e):_0x2cfa49=_0x31d17e[0x0];}}}if(_0x4bac30['customProperties']){for(const [_0x29377e,_0x284b0f]of _0x4bac30['customProperties'])_0x2cfa49['_setCustomProperty'](_0x29377e,_0x284b0f);}const _0x2e87b4=void 0x0===_0x4bac30['fillerOffset']?null:_0x4bac30['fillerOffset'];return null!==_0x2e87b4&&(_0x2cfa49['getFillerOffset']=()=>_0x2e87b4),_0x2cfa49;}}['_makeModelFromViewString'](_0x3237ed){const _0x55c781=JSON['parse'](_0x3237ed),_0x3b95b1=this['editor']['editing']['view']['document'],_0x400257=new _0x487985(_0x3b95b1,_0x55c781['map'](_0x2d7d1b=>this['_getViewFromDiffObj'](_0x2d7d1b,!0x0)));return this['editor']['data']['toModel'](_0x400257);}['_removeRevisionMarkers'](_0x5f13b4){return(_0x5f13b4=_0x5f13b4['filter'](_0x47fed3=>!_0x47fed3['name']||'revision-start'!==_0x47fed3['name']&&'revision-end'!==_0x47fed3['name']))['forEach'](_0x54a333=>{'string'!=typeof _0x54a333&&(_0x54a333['children']=this['_removeRevisionMarkers'](_0x54a333['children']),_0x54a333['attributes']=_0x54a333['attributes']['filter'](_0x448ddf=>!_0x448ddf[0x0]['startsWith']('data-revision-')));}),_0x5f13b4;}}function R(_0x121279,_0x359ffa,_0x57ab86){const t=_0x121279['t'];switch(_0x359ffa){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'},_0x57ab86);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x57ab86);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}class h extends _0x279b1f{['licenseKey'];['_licenseKeyCheckInterval'];['currentRevision']=null;['repository'];['adapter']=null;['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_utils'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x5c194e,S,$,_0x2bb90e];}constructor(_0x50a124){super(_0x50a124),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new E(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x18c238=_0x36f224();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x18c238},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}['init'](){this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x381298=this['repository']['getRevision'](0x0),_0x7cf1fb=_0x381298&&null===_0x381298['creator']?_0x381298:null;if(this['_continueCurrentRevision']=!!_0x7cf1fb&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x28d9ae=this['_source']['getCurrentRevisionId'](),_0x515984=this['repository']['getRevision'](_0x28d9ae);if(_0x515984)this['_startingVersion']=_0x515984['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x1aeff9=this['_source']['history']['_operations']['find'](_0x21548e=>!_0x21548e['_isInit']),_0x24aaab=_0x1aeff9?_0x1aeff9['baseVersion']:this['_source']['history']['version'];_0x381298?(_0x381298['toVersion']<_0x24aaab&&_0x381298['_update']({'toVersion':_0x24aaab}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x7cf1fb['id'],this['_startingVersion']=_0x7cf1fb['fromVersion']):(this['_startingVersion']=_0x381298['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x24aaab,this['_continueCurrentRevision']=!0x1);}}else _0x7cf1fb&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x7cf1fb['toVersion'],this['editor']['model']['document']['history']['version']),_0x7cf1fb['fromVersion']===_0x7cf1fb['toVersion']?(0x0!==_0x7cf1fb['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x7cf1fb['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x7cf1fb['id'],this['_startingVersion']=_0x7cf1fb['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',_0x48089a=>!_0x48089a),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x53ded4=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x42b060;for(const _0x3ba9a5 in _0x53ded4){const _0x7d36d4=_0x3ba9a5,_0x2a6a46=_0x53ded4[_0x7d36d4];if('revisionHistoryLicenseKeyValid'==_0x2a6a46||'revisionHistoryLicenseKeyInvalid'==_0x2a6a46||'revisionHistoryLicenseKeyExpired'==_0x2a6a46||'revisionHistoryLicenseKeyDomainLimit'==_0x2a6a46||'revisionHistoryLicenseKeyNotAllowed'==_0x2a6a46||'revisionHistoryLicenseKeyEvaluationLimit'==_0x2a6a46||'revisionHistoryLicenseKeyTrialLimit'==_0x2a6a46||'revisionHistoryLicenseKeyUsageLimit'==_0x2a6a46){delete _0x53ded4[_0x7d36d4],_0x42b060=_0x2a6a46,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x42b060&&_0x53ded4['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x42b060&&_0x53ded4['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x42b060&&_0x53ded4['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x42b060&&_0x53ded4['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x42b060&&_0x53ded4['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x42b060&&_0x53ded4['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x42b060&&_0x53ded4['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x5d5e79=this['repository']['getRevision'](0x0),_0x5d79af=await this['getRevisionDocumentData'](_0x5d5e79),_0x3f039e=await this['getRevisionRootsAttributes'](_0x5d5e79);this['_replaceEditorDataWithRevisionData'](_0x5d79af,_0x3f039e);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x347c9c){this['_source']=_0x347c9c;}async['update'](){const _0x4d419c=await this['_source']['getLatestVersion']();if(_0x4d419c>this['currentRevision']['toVersion']){await this['_loadState']();const _0x2f7a7b=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x4d419c});_0x2f7a7b['authors']=_0x2f7a7b['authorsIds']['map'](_0x229147=>this['editor']['plugins']['get']('Users')['getUser'](_0x229147)),this['currentRevision']['_update'](_0x2f7a7b);}}async['saveRevision'](_0x44d906={},_0x2a2d89=null){const _0x3dee93=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x2a2d89>this['currentRevision']['toVersion']&&(_0x2a2d89=null),null===_0x2a2d89&&(_0x2a2d89=await this['_source']['getLatestVersion']());const _0x52ea71=this['_getFromVersion'](_0x2a2d89),_0x37074c=this['buildRevisionData']({'from':_0x52ea71,'to':_0x2a2d89});if(this['currentRevision']['toVersion']<_0x2a2d89){const _0x5debf5=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x2a2d89,'to':_0x2a2d89});_0x5debf5['authors']=[],_0x5debf5['authorsIds']=[],_0x5debf5['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x5debf5,!0x0),delete _0x5debf5['authors'],_0x3dee93['push'](_0x5debf5);}_0x44d906['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x44d906['name']=_0x44d906['name']||null,_0x44d906['id']=_0x44d906['id']||_0x36f224(),_0x44d906={..._0x44d906,..._0x37074c};const _0x26be27=this['addRevisionData'](_0x44d906);_0x3dee93['push'](_0x44d906);const _0x38c154=this['repository']['getIndex'](_0x26be27);if(0x0!==_0x38c154){const _0x898a8a=this['repository']['getRevision'](_0x38c154-0x1);if(_0x898a8a['fromVersion']!==_0x2a2d89){const _0x5bfa6f=this['_revisionDataBuilder']['getData'](_0x2a2d89,_0x898a8a['toVersion']),_0x4bc500={'id':_0x898a8a['id'],'diffData':_0x5bfa6f['diffData'],'authorsIds':_0x5bfa6f['authorsIds'],'authors':_0x5bfa6f['authorsIds']['map'](_0x147785=>this['editor']['plugins']['get']('Users')['getUser'](_0x147785)),'fromVersion':_0x2a2d89};_0x898a8a===this['currentRevision']&&(_0x4bc500['createdAt']=new Date(_0x44d906['createdAt']['getTime']()+0xa)),_0x898a8a['_update'](_0x4bc500,!0x0),delete _0x4bc500['authors'],_0x3dee93['push'](_0x4bc500);}}if(this['adapter']){for(const _0x29f35b of _0x3dee93)this['_bufferUpdate'](_0x29f35b['id'],_0x29f35b,!0x0);this['sendBufferedUpdates']();}return _0x26be27;}['addRevisionData'](_0x4f6283){const _0x48d101=this['repository']['createRevision'](_0x4f6283);return this['adapter']&&_0x48d101['on']('_update',(_0x38d6a7,_0x1ef869,_0x4bce15)=>{_0x4bce15||(this['_bufferUpdate'](_0x1ef869['id'],_0x1ef869,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x48d101,this['_findInsertionIndex'](_0x48d101)),_0x48d101;}async['getRevisionDocumentData'](_0x3ec261){return await this['_utils']['loadRevisionData'](_0x3ec261,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x3ec261);}async['getRevisionRootsAttributes'](_0x4a67ac){return await this['_utils']['loadRevisionData'](_0x4a67ac,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x4a67ac);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x44da92=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x588fa8=0x0;_0x588fa8<_0x44da92['length'];_0x588fa8++){const _0xaa1cdb=_0x44da92[_0x588fa8];let _0x739411=!0x1;for(const _0x43889d of Object['keys'](_0xaa1cdb))void 0x0===_0xaa1cdb[_0x43889d]?delete _0xaa1cdb[_0x43889d]:'id'!==_0x43889d&&(_0x739411=!0x0);_0x739411||(_0x44da92[_0x588fa8]=null);}if(_0x44da92=_0x44da92['filter'](_0x4fb921=>null!==_0x4fb921),!_0x44da92['length'])return;for(let _0x2775f9=0x0;_0x2775f9<_0x44da92['length'];_0x2775f9++){const _0x781c30=_0x44da92[_0x2775f9];void 0x0!==_0x781c30['fromVersion']&&void 0x0===_0x781c30['toVersion']&&(_0x781c30['toVersion']=this['repository']['getRevision'](_0x781c30['id'])['toVersion']),void 0x0!==_0x781c30['toVersion']&&void 0x0===_0x781c30['fromVersion']&&(_0x781c30['fromVersion']=this['repository']['getRevision'](_0x781c30['id'])['fromVersion']);}const _0x5c99bd=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x44da92,_0x5c99bd)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x4864a1=>{if(_0x4864a1){for(const _0x5b767d of _0x4864a1)this['setRevisionData']({'id':_0x5b767d['id'],'createdAt':_0x5b767d['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x3f644a=null,from:_0x54d4b8=null,to:_0x57984d=null}){_0x54d4b8=null!==_0x54d4b8?_0x54d4b8:_0x3f644a['fromVersion'],_0x57984d=null!==_0x57984d?_0x57984d:_0x3f644a['toVersion'];const _0x4148b5=this['_revisionDataBuilder']['getData'](_0x54d4b8,_0x57984d),_0x40ca7e={'diffData':_0x4148b5['diffData'],'authorsIds':_0x4148b5['authorsIds'],'fromVersion':_0x54d4b8,'toVersion':_0x57984d};if(!_0x3f644a||_0x57984d!==_0x3f644a['toVersion']){const _0x4857dc=_0x57984d-0x1,_0x5193f4=this['_source']['history']['getOperation'](_0x4857dc);_0x40ca7e['createdAt']=_0x5193f4&&_0x5193f4['createdAt']||new Date();}if(this['_loadedStateData']&&_0x54d4b8===this['_loadedStateData']['fromVersion']){for(const _0x5e2fcd of this['_loadedStateData']['authors'])_0x40ca7e['authorsIds']['includes'](_0x5e2fcd['id'])||_0x40ca7e['authorsIds']['push'](_0x5e2fcd['id']);}return _0x40ca7e;}['_bufferUpdate'](_0x4b37e5,_0x1053db,_0x28cc8f){if(this['_bufferedUpdates']['has'](_0x4b37e5)){const _0x1c5584=this['_bufferedUpdates']['get'](_0x4b37e5);_0x1053db=_0x28cc8f?{..._0x1c5584,..._0x1053db}:{..._0x1053db,..._0x1c5584};}this['_bufferedUpdates']['set'](_0x4b37e5,_0x1053db);}['setRevisionData'](_0x69718){const _0xdb84e9=this['repository']['getRevision'](_0x69718['id']);if(_0x69718['createdAt']&&(_0x69718['createdAt']=new Date(_0x69718['createdAt'])),_0x69718['authorsIds']){const _0x4d7198=this['editor']['plugins']['get']('Users');_0x69718['authors']=_0x69718['authorsIds']['map'](_0x5ad0f5=>_0x4d7198['getUser'](_0x5ad0f5));}_0xdb84e9['_update'](_0x69718,!0x0);}['_createInitialRevision'](_0x2ea259){const _0x3b6519=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x3b6519)this['_initialRevisionId']=_0x3b6519['id'];else{const _0x55dd10=!this['editor']['model']['document']['roots']['find'](_0x20366f=>this['editor']['model']['hasContent'](_0x20366f)),_0x4cf04d=this['editor']['plugins']['get']('Users')['me']['id'],_0x42340a=R(this['editor']['locale'],_0x55dd10?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x2ea259,'to':_0x2ea259,'id':this['_initialRevisionId'],'name':_0x42340a,'creatorId':_0x4cf04d});}}['_createCurrentRevision'](_0x319418){const _0x233cd7=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x233cd7),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x319418,'to':_0x319418,'id':_0x233cd7,'name':'','creatorId':null}));}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_utils']['loadRevisionData'](this['currentRevision'],this['adapter']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}['_replaceEditorDataWithRevisionData'](_0x52dbd6,_0x3d3de7){let _0x30a11c=this['editor']['config']['get']('initialData'),_0x3c957b=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x30a11c){_0x30a11c={};for(const _0x514eb6 of this['editor']['model']['document']['getRootNames']())_0x30a11c[_0x514eb6]='';}if('string'==typeof _0x30a11c&&(_0x30a11c={'main':_0x30a11c}),void 0x0===_0x3c957b){_0x3c957b={};for(const _0x29086c of this['editor']['model']['document']['getRootNames']())_0x3c957b[_0x29086c]={};}let _0x3829e7=!0x1;const _0x30f5b3=Object['keys'](_0x30a11c),_0x5c9e1c=Object['keys'](_0x52dbd6);for(const _0x2c980c of _0x30f5b3){if(_0x30a11c[_0x2c980c]!==_0x52dbd6[_0x2c980c]&&''!==_0x30a11c[_0x2c980c]['trim']()){_0x3829e7=!0x0;break;}if(!_0x13ba33(_0x3c957b[_0x2c980c],_0x3d3de7[_0x2c980c])&&Object['keys'](_0x3c957b[_0x2c980c])['length']>0x0){_0x3829e7=!0x0;break;}}_0x3829e7||(_0x3829e7=_0x5c9e1c['some'](_0x3c4260=>!this['editor']['model']['document']['getRoot'](_0x3c4260))),_0x3829e7&&_0x4cf3c9('editor-initial-data-replaced-with-revision-data',{'editorData':_0x30a11c,'editorRootsAttributes':_0x3c957b,'revisionData':_0x52dbd6,'revisionRootsAttributes':_0x3d3de7}),this['editor']['config']['set']('initialData',_0x52dbd6),this['editor']['config']['set']('rootsAttributes',_0x3d3de7);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x26cc12=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x26cc12['add'](R(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x31f51b){const _0x3812ea=this['repository']['getRevisions']();_0x3812ea['reverse']();let _0x53b9f6=0x0;for(;_0x53b9f6<_0x3812ea['length'];){const _0x62b48d=_0x3812ea[_0x53b9f6];if(_0x62b48d===this['currentRevision']){_0x53b9f6++;continue;}if(_0x62b48d['id']===this['_initialRevisionId'])break;const _0xf5f573=_0x31f51b['toVersion']-_0x62b48d['toVersion']||_0x31f51b['fromVersion']-_0x62b48d['fromVersion'];if(_0xf5f573>0x0)break;if(_0xf5f573<0x0)_0x53b9f6++;else{if(!_0x31f51b['creator']&&_0x62b48d['creator'])break;if(_0x62b48d['creator']||!_0x31f51b['creator']){if(_0x31f51b['createdAt']>_0x62b48d['createdAt'])break;_0x53b9f6++;}else _0x53b9f6++;}}return _0x53b9f6;}['_getFromVersion'](_0x5c17cf){const _0x55fdf5=this['repository']['getRevisions']();_0x55fdf5['reverse'](),_0x55fdf5['shift']();const _0x43d635=_0x55fdf5['find'](_0x3b2e4b=>_0x3b2e4b['toVersion']<=_0x5c17cf)['toVersion'];return _0x43d635<this['_startingVersion']?this['_startingVersion']:_0x43d635;}['_makeRevision']({name:_0x22f9d9,from:_0x2114bf,to:_0x5b6371,creatorId:_0x3862ec,id:_0x2b7556}){const _0x201614=this['buildRevisionData']({'from':_0x2114bf,'to':_0x5b6371});_0x201614['name']=_0x22f9d9,_0x201614['creatorId']=_0x3862ec,_0x201614['id']=_0x2b7556;const _0x12e077=this['addRevisionData'](_0x201614);return this['adapter']&&this['_bufferUpdate'](_0x201614['id'],_0x201614,!0x0),_0x12e077;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class E{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x4ef1dc){this['editor']=_0x4ef1dc,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'](_0x5bf38e){this['source']=_0x5bf38e;const _0x2f1742=new Map(),_0x32f31d=new Map(),_0x1348fa=this['editor']['model']['document']['roots']['map'](_0x23fe39=>_0x23fe39['rootName']);for(const _0x90763c of _0x1348fa){const _0x40de3d=this['editor']['model']['document']['getRoot'](_0x90763c),_0x145e6a=x(_0x40de3d);_0x2f1742['set'](_0x90763c,_0x145e6a),_0x32f31d['set'](_0x90763c,Object['fromEntries'](_0x40de3d['getAttributes']()));}const _0x5d4434=Array['from'](this['editor']['model']['markers'])['map'](_0x475794=>[_0x475794['name'],_0x475794['getRange']()]),_0x3fc5b1=this['source']['version'];this['_saveMetaData'](_0x3fc5b1,_0x2f1742,_0x5d4434,_0x32f31d),this['_startingRevisionId']=this['_revisionId'];const _0x4fba3e=new Map(),_0x137ffa=new Map();for(const _0x3eb83b of _0x1348fa){const _0x5b85a9=N(_0x3eb83b);_0x4fba3e['set'](_0x3eb83b,_0x5b85a9),_0x137ffa['set'](_0x3eb83b,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x4fba3e,[],_0x137ffa);}['getData'](_0x359f43,_0x434ea0){if(this['_lastFrom']===_0x359f43&&this['_lastTo']<=_0x434ea0)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x434ea0,!0x0);else{if(!this['_savedMetaData']['has'](_0x359f43)){const _0x4827ff=this['_getPreviousFrom'](_0x359f43);this['_calculateMetaData'](_0x4827ff,_0x359f43,!0x1);}this['_calculateMetaData'](_0x359f43,_0x434ea0,!0x0);}return this['_lastFrom']=_0x359f43,this['_lastTo']=_0x434ea0,this['_getState']();}['loadState'](_0x45f59e){const _0x2d18ae=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x45f59e['fromVersion'],this['_lastTo']=_0x45f59e['toVersion'];for(const _0x1d1d4c in _0x45f59e['diffData']){const _0x201517=_0x45f59e['diffData'][_0x1d1d4c]['attachChange'],_0x10a2db=_0x477256(_0x45f59e['diffData'][_0x1d1d4c]['attributesBefore'])||{},_0x59687a=_0x2d18ae['_makeModelFromViewString'](_0x45f59e['diffData'][_0x1d1d4c]['deletions']);_0x59687a['rootName']=_0x1d1d4c,_0x59687a['_isAttached']=!_0x201517||!_0x201517['isAttached'],_0x59687a['isAttached']=()=>_0x59687a['_isAttached'],this['_baseRoots']['set'](_0x1d1d4c,_0x59687a),this['_baseRootsAttributes']['set'](_0x1d1d4c,_0x10a2db),_0x201517&&this['_touchedRoots']['set'](_0x1d1d4c,_0x201517);const _0xdab689=this['_makeIdsRoot'](_0x59687a);this['_baseIdsRoots']['set'](_0x1d1d4c,_0xdab689);for(const [_0x8a9bcf,_0x2439d1]of _0x59687a['markers']){if(!_0x8a9bcf['startsWith']('revision:'))continue;const _0x117b6f=_0x8a9bcf['split'](':')[0x2];for(const _0x2ccd1f of _0x2439d1['getWalker']({'singleCharacters':!0x0})){const _0x199777=this['_getVidAttributeName'](_0x2ccd1f),_0x514d43='elementEnd'==_0x2ccd1f['type']?_0x2ccd1f['previousPosition']['path']['slice'](0x0,-0x1):_0x2ccd1f['previousPosition']['path'],_0x47d190=_0xdab689['getNodeByPath'](_0x514d43)['getAttribute'](_0x199777);this['_touched']['set'](_0x47d190,{'userId':_0x117b6f});}}}this['_startingRevisionId']=this['_revisionId'];const _0x53f5c6=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x52b074=>!this['_touched']['has'](_0x52b074));let _0x57b222=0x0;const _0x40b767=new Map();for(const _0x4746de in _0x45f59e['diffData']){const _0x4de2b8=_0x45f59e['diffData'][_0x4746de]['attachChange'],_0x56a9d8=_0x477256(_0x45f59e['diffData'][_0x4746de]['attributesAfter'])||{},_0x2c049d=_0x2d18ae['_makeModelFromViewString'](_0x45f59e['diffData'][_0x4746de]['insertions']);_0x2c049d['rootName']=_0x4746de,_0x2c049d['_isAttached']=!_0x4de2b8||_0x4de2b8['isAttached'],_0x2c049d['isAttached']=()=>_0x2c049d['_isAttached'],this['_diffRoots']['set'](_0x4746de,_0x2c049d),this['_diffRootsAttributes']['set'](_0x4746de,_0x56a9d8);const _0x35bcef=this['_makeIdsRoot'](_0x2c049d,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x4746de,_0x35bcef),_0x40b767['set'](_0x4746de,_0x2c049d['isAttached']()?_0x56a9d8:{});for(const [_0x127288,_0x49f8da]of _0x2c049d['markers']){if(!_0x127288['startsWith']('revision:'))continue;const _0x484a62=_0x127288['split'](':')[0x2];for(const _0x59be07 of _0x49f8da['getWalker']({'singleCharacters':!0x0})){const _0x4985ec=this['_getVidAttributeName'](_0x59be07),_0x13a036=this['_revisionId']++,_0x333c4e='elementEnd'==_0x59be07['type']?_0x59be07['previousPosition']['path']['slice'](0x0,-0x1):_0x59be07['previousPosition']['path'];_0x35bcef['getNodeByPath'](_0x333c4e)['_setAttribute'](_0x4985ec,_0x13a036),this['_touched']['set'](_0x13a036,{'userId':_0x484a62});}}for(const _0x230e64 of this['editor']['model']['createRangeIn'](_0x2c049d)['getWalker']({'singleCharacters':!0x0})){const _0x30970b=this['_getVidAttributeName'](_0x230e64),_0x4684e4='elementEnd'==_0x230e64['type']?_0x230e64['previousPosition']['path']['slice'](0x0,-0x1):_0x230e64['previousPosition']['path'],_0x3afb2b=_0x35bcef['getNodeByPath'](_0x4684e4);_0x3afb2b['getAttribute'](_0x30970b)>0x0||_0x3afb2b['_setAttribute'](_0x30970b,_0x53f5c6[_0x57b222++]);}for(const [_0x28d2c8,_0x489f8c]of _0x2c049d['markers'])_0x28d2c8['startsWith']('revision:')||this['_markers']['set'](_0x28d2c8,_0x489f8c);}const _0x7c72c9=N('$graveyard');this['_baseRoots']['set']('$graveyard',_0x7c72c9),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x7c72c9,0x1));const _0x22d19f=N('$graveyard');this['_diffRoots']['set']('$graveyard',_0x22d19f),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x22d19f,0x1));const _0x56ae41=Array['from'](this['_diffRoots'])['map'](([_0x3df2ba,_0x4509e1])=>[_0x3df2ba,x(_0x4509e1)]);this['_saveMetaData'](this['_lastTo'],_0x56ae41,this['_markers'],_0x40b767);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x4d2e16,_0x2f0e83,_0xaca768,_0x350d3d){const _0x562279=new Map(_0x2f0e83),_0x2c19ca=new Map(_0x477256(_0x350d3d)),_0x3ff977=new Map();for(const [_0x5b5c1d,_0x3978b6]of _0xaca768)_0x3ff977['set'](_0x5b5c1d,{'start':_0x3978b6['start']['clone'](),'end':_0x3978b6['end']['clone'](),'rootName':_0x3978b6['root']['rootName']});this['_savedMetaData']['set'](_0x4d2e16,{'roots':_0x562279,'markers':_0x3ff977,'rootsAttributes':_0x2c19ca});}['_removeMetaData'](_0x9dee13){this['_savedMetaData']['delete'](_0x9dee13);}['_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'](_0x2eb553,_0xe1b4d3=null){let _0x42111a=null;_0x2eb553['is']('documentFragment')||(_0x42111a=new _0x45ab54(_0x2eb553['name'],{'vid_start':null===_0xe1b4d3?this['_revisionId']++:_0xe1b4d3++}));const _0x5ea7dd=[];for(const _0x4e9bdf of _0x2eb553['getChildren']())if(_0x4e9bdf['is']('element')){_0x5ea7dd['push'](this['_makeIdsRoot'](_0x4e9bdf,_0xe1b4d3));const _0x4d1785=_0x5ea7dd[_0x5ea7dd['length']-0x1];null!==_0xe1b4d3&&(_0xe1b4d3=_0x4d1785['is']('element','$text')?_0x4d1785['getAttribute']('vid')+0x1:_0x4d1785['getAttribute']('vid_end')+0x1);}else{for(let _0x15409c=0x0;_0x15409c<_0x4e9bdf['offsetSize'];_0x15409c++)_0x5ea7dd['push'](new _0x45ab54('$text',{'vid':null===_0xe1b4d3?this['_revisionId']++:_0xe1b4d3++}));}if(_0x2eb553['is']('documentFragment')){const _0x33bffd=N(_0x2eb553['rootName']);return _0x33bffd['_insertChild'](0x0,_0x5ea7dd),_0x33bffd;}return _0x42111a['_setAttribute']('vid_end',null===_0xe1b4d3?this['_revisionId']++:_0xe1b4d3++),_0x42111a['_insertChild'](0x0,_0x5ea7dd),_0x42111a;}['_calculateMetaData'](_0x20b55c,_0x373684,_0x223598){this['_reset']();const {roots:_0x2e71fb,markers:_0x2c955d,rootsAttributes:_0x22d847}=this['_savedMetaData']['get'](_0x20b55c);this['_baseRoots']=new Map(_0x2e71fb),this['_baseRootsAttributes']=new Map(_0x477256(_0x22d847));for(const [_0x327e09,_0x3f0776]of this['_baseRoots'])if('$graveyard'!==_0x327e09&&(this['_diffRoots']['set'](_0x327e09,x(_0x3f0776)),this['_diffRootsAttributes']=new Map(_0x477256(_0x22d847)),_0x223598)){const _0x5a4804=this['_revisionId'];this['_idsRoots']['set'](_0x327e09,this['_makeIdsRoot'](_0x3f0776)),this['_baseIdsRoots']['set'](_0x327e09,this['_makeIdsRoot'](_0x3f0776,_0x5a4804));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',x(this['_baseRoots']['get']('$graveyard'))),_0x223598&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x4e2a3d,_0x2d6bd7]of _0x2c955d){const _0x1f1db0=this['_baseRoots']['get'](_0x2d6bd7['rootName']),_0x1f6114=this['_diffRoots']['get'](_0x2d6bd7['rootName']),_0x9e4c1d=new _0x3e295f(this['_fixPosition'](_0x2d6bd7['start'],_0x1f1db0),this['_fixPosition'](_0x2d6bd7['end'],_0x1f1db0)),_0x26040c=this['_fixRange'](_0x9e4c1d,_0x1f6114);_0x1f1db0['markers']['set'](_0x4e2a3d,_0x9e4c1d),this['_markers']['set'](_0x4e2a3d,_0x26040c);}this['_applyOperations'](_0x20b55c,_0x373684,_0x223598);}['_applyOperations'](_0x32515a,_0x147df0,_0x5a8800){for(const _0x12e814 of this['source']['getOperations'](_0x32515a,_0x147df0))this['_handleOperation'](_0x12e814,_0x5a8800);for(const _0x27e432 of this['_diffRoots']['values']())_0x27e432['markers']['clear']();for(const [_0x585c87,_0x1a825a]of this['_markers']){this['_diffRoots']['get'](_0x1a825a['root']['rootName'])['markers']['set'](_0x585c87,_0x1a825a['clone']());}const _0x5c1f35=new Map(),_0x5dcddb=new Map();for(const [_0x243318,_0x5e9fe6]of this['_diffRoots'])_0x5c1f35['set'](_0x243318,x(_0x5e9fe6)),_0x5dcddb['set'](_0x243318,this['_diffRootsAttributes']['get'](_0x243318));this['_saveMetaData'](_0x147df0,_0x5c1f35,this['_markers'],_0x5dcddb);}['_getPreviousFrom'](_0x5b9ddd){const _0x3cd9f0=Array['from'](this['_savedMetaData']['keys']());_0x3cd9f0['sort']((_0x36383a,_0x606e38)=>_0x36383a-_0x606e38),_0x3cd9f0['reverse']();for(const _0x5aff37 of _0x3cd9f0)if(_0x5aff37<_0x5b9ddd)return _0x5aff37;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x2265d7,_0x2e47b5){const _0x32dbd1=Array['from'](_0x2e47b5['markers'])['map'](([_0x4d3339,_0x429f16])=>[_0x4d3339,this['_fixRange'](_0x429f16,_0x2265d7)]);_0x2265d7['markers']=new Map(_0x32dbd1);}['_transformMarkers'](_0x5b771f){for(const _0x24f3ec of this['_markers']['values']()){const _0x56bd7f=_0x24f3ec['getTransformedByOperation'](_0x5b771f),_0x3f0e69=_0x3e295f['_createFromRanges'](_0x56bd7f);_0x24f3ec['start']=_0x3f0e69['start'],_0x24f3ec['end']=_0x3f0e69['end'];}}['_handleOperation'](_0x47ea2a,_0x267aee){if('addRoot'!=_0x47ea2a['type']&&'detachRoot'!=_0x47ea2a['type']){if('insert'==_0x47ea2a['type']){const _0x564988=_0x47ea2a['position']['root']['rootName'];this['_diffRoots']['has'](_0x564988)||(this['_diffRoots']['set'](_0x564988,N(_0x564988,!0x0)),this['_diffRootsAttributes']['set'](_0x564988,{}),_0x267aee&&this['_idsRoots']['set'](_0x564988,N(_0x564988,!0x0)));}else{if('addRootAttribute'==_0x47ea2a['type']||'removeRootAttribute'==_0x47ea2a['type']||'changeRootAttribute'==_0x47ea2a['type'])return void this['_handleRootAttributeOperation'](_0x47ea2a);'marker'==_0x47ea2a['type']&&this['_handleMarkerOperation'](_0x47ea2a);}if('marker'!==_0x47ea2a['type']){const _0x23bf7e=this['_cloneOperation'](_0x47ea2a,this['_diffRoots']);_0x23bf7e['_execute'](),this['_transformMarkers'](_0x23bf7e);}if(_0x267aee)switch(_0x47ea2a['type']){case'insert':this['_handleInsertOperation'](_0x47ea2a);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x47ea2a);break;case'merge':this['_handleMergeOperation'](_0x47ea2a);break;case'split':this['_handleSplitOperation'](_0x47ea2a);}}else this['_handleRootOperation'](_0x47ea2a,_0x267aee);}['_cloneOperation'](_0x53ae99,_0x4226a2){const _0x16023f=_0x53ae99['clone']();return _0x16023f['_authorId']=_0x53ae99['_authorId'],this['_fixOperation'](_0x16023f,_0x4226a2),_0x16023f;}['_getBaseVids'](_0x16927e){return _0x16927e['map'](_0x560cce=>{const _0x18567d=this['_getVidAttributeName'](_0x560cce);return Number(_0x560cce['item']['getAttribute'](_0x18567d));});}['_generateTape'](_0x5074fc,_0x33b68e){if(_0x5074fc['is']('element','$text'))_0x33b68e['push']({'item':_0x5074fc,'type':'text'});else{_0x5074fc['is']('element')&&_0x33b68e['push']({'item':_0x5074fc,'type':'elementStart'});for(const _0x48dbe6 of _0x5074fc['getChildren']())this['_generateTape'](_0x48dbe6,_0x33b68e);_0x5074fc['is']('element')&&_0x33b68e['push']({'item':_0x5074fc,'type':'elementEnd'});}return _0x33b68e;}['_getState'](){const _0x22b435=new Map(this['_touched']),_0x130752=new Map(_0x22b435),_0x73122b=new Map(),_0x2c4044={'insertions':{},'deletions':{}},_0x26ac18={'insertions':{},'deletions':{}},_0x418e0f=new Map(),_0x5733eb=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x5733eb['delete']('$graveyard');for(const _0x3fc559 of _0x5733eb){const _0x317b95=this['_diffRoots']['get'](_0x3fc559)||N(_0x3fc559,!0x1),_0x410b48=this['_baseRoots']['get'](_0x3fc559)||N(_0x3fc559,!0x1);_0x317b95['isAttached']()||_0x410b48['isAttached']()?(_0x2c4044['insertions'][_0x3fc559]=x(_0x317b95),_0x2c4044['deletions'][_0x3fc559]=x(_0x410b48),this['_copyMarkers'](_0x2c4044['deletions'][_0x3fc559],_0x410b48),this['_copyMarkers'](_0x2c4044['insertions'][_0x3fc559],_0x317b95),_0x26ac18['insertions'][_0x3fc559]=this['_generateTape'](this['_idsRoots']['get'](_0x3fc559),[]),_0x26ac18['deletions'][_0x3fc559]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x3fc559)||N(_0x3fc559,!0x1),[])):_0x5733eb['delete'](_0x3fc559);}for(const _0x5e13fd of _0x5733eb){const _0x4ca207=_0x26ac18['insertions'][_0x5e13fd];for(const _0x638797 of _0x4ca207){const _0x5c8afb=this['_getVidAttributeName'](_0x638797),_0x15ed9f=_0x638797['item']['getAttribute'](_0x5c8afb);_0x130752['delete'](_0x15ed9f),_0x15ed9f>=this['_startingRevisionId']&&_0x73122b['set'](_0x15ed9f,_0x22b435['get'](_0x15ed9f));}}for(const _0x38772e of _0x5733eb){const _0x97f81e=_0x26ac18['insertions'][_0x38772e],_0x53c3ba=this['_getBaseVids'](_0x26ac18['deletions'][_0x38772e]);let _0x33333a=0x0;for(const _0x33732b of _0x97f81e){const _0x1b6c92=this['_getVidAttributeName'](_0x33732b),_0x418d90=_0x33732b['item']['getAttribute'](_0x1b6c92);if(!_0x73122b['has'](_0x418d90)&&!_0x418e0f['has'](_0x418d90)){if(_0x130752['has'](_0x418d90))_0x33333a++;else{if(_0x418d90!=_0x53c3ba[_0x33333a]){const _0x56f99e=_0x22b435['get'](_0x418d90)||_0x22b435['get'](_0x53c3ba[_0x33333a]);for(;_0x418d90!=_0x53c3ba[_0x33333a];)_0x130752['has'](_0x53c3ba[_0x33333a])||(_0x418e0f['set'](_0x53c3ba[_0x33333a],_0x56f99e),_0x22b435['set'](_0x53c3ba[_0x33333a],_0x56f99e)),_0x33333a++;}_0x33333a++;}}}}for(const _0xf5cc2d of _0x5733eb){const _0x4c3e52=_0x26ac18['insertions'][_0xf5cc2d];for(const _0x946e07 of _0x4c3e52){const _0x443c37=this['_getVidAttributeName'](_0x946e07),_0x523d66=_0x946e07['item']['getAttribute'](_0x443c37);if(_0x418e0f['has'](_0x523d66)){const _0x394954=_0x418e0f['get'](_0x523d66);_0x130752['has'](_0x523d66)||_0x130752['set'](_0x523d66,{..._0x394954}),_0x73122b['set'](_0x523d66,{..._0x394954});}}}for(const _0x3df62d of _0x130752['keys']())_0x3df62d>=this['_startingRevisionId']&&_0x130752['delete'](_0x3df62d);const _0x10c21f=new Map();for(const _0x48ad7e of _0x5733eb){let _0x453c9d=_0x26ac18['insertions'][_0x48ad7e];for(const _0x2a5429 of _0x453c9d)if(_0x2a5429['item']['is']('element','tableCell')){const _0x5789f6=this['_getVidAttributeName'](_0x2a5429),_0x509ab6=_0x2a5429['item']['getAttribute'](_0x5789f6);if(_0x73122b['has'](_0x509ab6)){const _0x24705d=_0x2a5429['item']['parent']['parent']['getAttribute']('vid_start'),_0x528dec=_0x10c21f['get'](_0x24705d)||new Set();_0x528dec['add'](_0x73122b['get'](_0x509ab6)['userId']),_0x10c21f['set'](_0x24705d,_0x528dec);}}_0x453c9d=_0x26ac18['deletions'][_0x48ad7e];for(const _0x3e01ee of _0x453c9d)if(_0x3e01ee['item']['is']('element','tableCell')){const _0xa2751e=this['_getVidAttributeName'](_0x3e01ee),_0xa6e726=_0x3e01ee['item']['getAttribute'](_0xa2751e);if(_0x130752['has'](_0xa6e726)){const _0x231837=_0x3e01ee['item']['parent']['parent']['getAttribute']('vid_start'),_0x3755f9=_0x10c21f['get'](_0x231837)||new Set();_0x3755f9['add'](_0x130752['get'](_0xa6e726)['userId']),_0x10c21f['set'](_0x231837,_0x3755f9);}}for(const _0x415282 of _0x10c21f['keys']())(_0x73122b['has'](_0x415282)||_0x130752['has'](_0x415282))&&_0x10c21f['delete'](_0x415282);}for(const _0x401df5 of _0x5733eb){const _0x3f1576=_0x26ac18['insertions'][_0x401df5];let _0x1279fa=null,_0x4a52be=null;for(const _0x1a5a62 of _0x3f1576){const _0x167a5c=this['_getVidAttributeName'](_0x1a5a62),_0xabdbbd=_0x1a5a62['item']['getAttribute'](_0x167a5c),_0x5e18ef=_0x10c21f['get'](_0xabdbbd);_0x5e18ef&&'elementStart'==_0x1a5a62['type']&&(_0x1279fa=Array['from'](_0x5e18ef)[0x0],_0x4a52be=_0x1a5a62['item']['getAttribute']('vid_end')),_0x1279fa&&(_0x130752['set'](_0xabdbbd,{'userId':_0x1279fa}),_0x73122b['set'](_0xabdbbd,{'userId':_0x1279fa})),_0xabdbbd==_0x4a52be&&(_0x1279fa=null,_0x4a52be=null);}}const _0x347ed0={},_0xc70a1=new Set();for(const _0x5f3c19 of _0x5733eb){const _0x225b2e=_0x2c4044['deletions'][_0x5f3c19],_0x18b47a=_0x2c4044['insertions'][_0x5f3c19];for(const {userId:_0x52c208}of this['_touchedMarkers']['values']())null!==_0x52c208&&_0xc70a1['add'](_0x52c208);for(const {userId:_0x227e29}of this['_touchedRoots']['values']())null!==_0x227e29&&_0xc70a1['add'](_0x227e29);this['_markChanges'](_0x18b47a,_0x26ac18['insertions'][_0x5f3c19],_0x73122b,'insertion',_0xc70a1),this['_markChanges'](_0x225b2e,_0x26ac18['deletions'][_0x5f3c19],_0x130752,'deletion',_0xc70a1),_0x347ed0[_0x5f3c19]={'insertions':this['_prepareViewToSave'](_0x18b47a),'deletions':this['_prepareViewToSave'](_0x225b2e),'attachChange':this['_touchedRoots']['get'](_0x5f3c19)||null,'attributesBefore':_0x477256(this['_baseRootsAttributes']['get'](_0x5f3c19))||{},'attributesAfter':_0x477256(this['_diffRootsAttributes']['get'](_0x5f3c19))};}return{'diffData':_0x347ed0,'authorsIds':Array['from'](_0xc70a1)};}['_processRootBeforeSave'](_0x341d44){for(const [,_0x398b83]of _0x341d44['markers']){const _0x485103=_0x398b83['start']['getAncestors']()['filter'](_0x475c3d=>'tableCell'==_0x475c3d['name']);for(const _0xcef80f of _0x485103)0x1==_0xcef80f['childCount']&&_0xcef80f['getChild'](0x0)['is']('element','paragraph')&&_0xcef80f['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x559468){this['_processRootBeforeSave'](_0x559468);const _0x2791b3=this['editor']['data']['toView'](_0x559468,{}),_0x34a896=Array['from'](_0x2791b3['getChildren']())['map'](_0x365df4=>this['_getViewJson'](_0x365df4));return JSON['stringify'](_0x34a896);}['_getViewJson'](_0x39d2a3){if(_0x39d2a3['is']('$text'))return _0x39d2a3['data'];{const _0x3ba34e=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x18b552=_0x39d2a3,_0xeafb47=this['editor']['data']['htmlProcessor']['domConverter'],_0x5a693b={'type':_0x3ba34e['_getTypeCharForViewElement'](_0x18b552),'name':_0x18b552['name'],'attributes':Array['from'](_0x18b552['getAttributes']()),'children':Array['from'](_0x18b552['getChildren']())['map'](_0x5bd9a5=>this['_getViewJson'](_0x5bd9a5))};if(_0x39d2a3['is']('uiElement')&&'$comment'!=_0x39d2a3['name']){const _0x5526b3=_0x39d2a3['render'](_0xeafb47['domDocument'],_0xeafb47);_0x5a693b['children']['push'](_0x5526b3['outerHTML']);}else{if(_0x39d2a3['is']('rawElement')){const _0x158d2c=_0xeafb47['domDocument']['createElement'](_0x18b552['name']);_0x39d2a3['render'](_0x158d2c,_0xeafb47),_0x5a693b['children']['push'](_0x158d2c['innerHTML']);}}const _0x29a56a=Array['from'](_0x18b552['getCustomProperties']());_0x29a56a['length']>0x0&&(_0x5a693b['customProperties']=_0x29a56a);const _0x4a4a33=_0x18b552['getFillerOffset']();return null!==_0x4a4a33&&(_0x5a693b['fillerOffset']=_0x4a4a33),_0x5a693b;}}['_markChanges'](_0x14df83,_0x2b18e1,_0x48c3b5,_0x48eab3,_0x12e483){let _0x5a6245=null,_0x4bdf2b=null,_0x497373=0x0;const _0xead92a=this['editor']['model'];for(let _0x629925=0x0;_0x629925<_0x2b18e1['length'];_0x629925++){const _0x227684=this['_getVidAttributeName'](_0x2b18e1[_0x629925]),_0x1f8e2a=_0x2b18e1[_0x629925]['item']['getAttribute'](_0x227684),_0x51e775=_0x48c3b5['get'](_0x1f8e2a),_0x38a313=_0x629925==_0x2b18e1['length']-0x1;(!_0x5a6245&&_0x51e775&&(_0x5a6245=_0x51e775,_0x4bdf2b=_0x2b18e1[_0x629925]),_0x5a6245&&(!_0x51e775||_0x51e775['userId']!=_0x5a6245['userId']))&&(_0x529e36(_0x51e775,P(_0x4bdf2b,_0x14df83,_0xead92a),P(_0x2b18e1[_0x629925],_0x14df83,_0xead92a)),_0x5a6245=_0x51e775||null,_0x4bdf2b=_0x51e775?_0x2b18e1[_0x629925]:null),_0x5a6245&&_0x38a313&&_0x529e36(_0x51e775,P(_0x4bdf2b,_0x14df83,_0xead92a),V(_0x2b18e1[_0x629925],_0x14df83,_0xead92a));}function _0x529e36(_0x2c08cf,_0x27fa46,_0x528c37){const _0xc617ba=_0x5a6245['userId'],_0x57cc2f='revision:'+_0x48eab3+':'+_0xc617ba+':'+_0x497373++,_0x4e5dd0=_0xead92a['createRange'](_0x27fa46,_0x528c37);_0x14df83['markers']['set'](_0x57cc2f,_0x4e5dd0),null!==_0xc617ba&&_0x12e483['add'](_0xc617ba);}}['_getVidAttributeName'](_0x31040d){switch(_0x31040d['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x17b505,_0x323881){_0x17b505['baseVersion']=null;for(const _0x15498f in _0x17b505){const _0x3134de=_0x17b505[_0x15498f];if(_0x3134de instanceof _0x414fcc){const _0xa637a0=_0x323881['get'](_0x3134de['root']['rootName']);_0x17b505[_0x15498f]=this['_fixPosition'](_0x3134de,_0xa637a0);}if(_0x3134de instanceof _0x3e295f){const _0x17c78e=_0x323881['get'](_0x3134de['root']['rootName']);_0x17b505[_0x15498f]=this['_fixRange'](_0x3134de,_0x17c78e);}'root'===_0x15498f&&(_0x17b505['root']=_0x323881['get'](_0x17b505['root']['rootName']));}}['_fixRange'](_0x3a17dd,_0x51e414){return this['editor']['model']['createRange'](this['_fixPosition'](_0x3a17dd['start'],_0x51e414),this['_fixPosition'](_0x3a17dd['end'],_0x51e414));}['_fixPosition'](_0x134a0b,_0x17b404){return this['editor']['model']['createPositionFromPath'](_0x17b404,_0x134a0b['path'],_0x134a0b['stickiness']);}['_handleInsertOperation'](_0x983367){const _0x3d7cea=this['_idsRoots']['get'](_0x983367['position']['root']['rootName']),_0x3fd691=this['_fixPosition'](_0x983367['position'],_0x3d7cea),_0x1bf9f8=null===_0x983367['_authorId']?null:_0x983367['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xb4cb95=_0x3fd691['parent'],_0x8956e6=this['_revisionId'],_0x2568ef=[];for(const _0x40afe2 of _0x983367['nodes'])if(_0x40afe2['is']('element'))_0x2568ef['push'](this['_makeIdsRoot'](_0x40afe2));else{for(let _0x36d1cc=0x0;_0x36d1cc<_0x40afe2['offsetSize'];_0x36d1cc++)_0x2568ef['push'](new _0x45ab54('$text',{'vid':this['_revisionId']++}));}const _0x239355=this['_revisionId'];for(let _0x49879c=_0x8956e6;_0x49879c<_0x239355;_0x49879c++)this['_touched']['set'](_0x49879c,{'userId':_0x1bf9f8});_0xb4cb95['_insertChild'](_0x3fd691['offset'],_0x2568ef);}['_handleMoveOperation'](_0x36e8fd){(_0x36e8fd=this['_cloneOperation'](_0x36e8fd,this['_idsRoots']))['_execute']();const _0x4d1bf5=null===_0x36e8fd['_authorId']?null:_0x36e8fd['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x53863d=_0x36e8fd['getMovedRangeStart'](),_0xb8cbe9=_0x53863d['parent'],_0x1451e2=_0x53863d['offset'];!function _0x2e3fa7(_0x758886,_0x58d223,_0x375449,_0x42bd9f){for(let _0x58488c=_0x375449;_0x58488c<_0x42bd9f;_0x58488c++){const _0x1ece9e=_0x58d223['getChild'](_0x58488c);_0x1ece9e['is']('element','$text')?_0x758886['set'](_0x1ece9e['getAttribute']('vid'),{'userId':_0x4d1bf5}):(_0x758886['set'](_0x1ece9e['getAttribute']('vid_start'),{'userId':_0x4d1bf5}),_0x2e3fa7(_0x758886,_0x1ece9e,0x0,_0x1ece9e['childCount']),_0x758886['set'](_0x1ece9e['getAttribute']('vid_end'),{'userId':_0x4d1bf5}));}}(this['_touched'],_0xb8cbe9,_0x1451e2,_0x1451e2+_0x36e8fd['howMany']);}['_handleMergeOperation'](_0x85cb34){const _0x3a4237=null===(_0x85cb34=this['_cloneOperation'](_0x85cb34,this['_idsRoots']))['_authorId']?null:_0x85cb34['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x17c069=_0x85cb34['targetPosition']['parent'],_0xd653c9=_0x85cb34['sourcePosition']['parent'],_0x1121e6=_0x17c069['getAttribute']('vid_end'),_0x434ddc=_0xd653c9['getAttribute']('vid_start');_0x17c069['_setAttribute']('vid_end',_0xd653c9['getAttribute']('vid_end')),_0xd653c9['_setAttribute']('vid_end',_0x1121e6),this['_touched']['set'](_0x434ddc,{'userId':_0x3a4237}),this['_touched']['set'](_0x1121e6,{'userId':_0x3a4237}),_0x85cb34['_execute']();}['_handleSplitOperation'](_0x24b020){const _0x266fa3=null===(_0x24b020=this['_cloneOperation'](_0x24b020,this['_idsRoots']))['_authorId']?null:_0x24b020['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2c0a2b=_0x24b020['graveyardPosition'],_0x41cd2=_0x24b020['splitPosition']['parent'];_0x24b020['_execute']();const _0x1179e1=_0x41cd2['getAttribute']('vid_end'),_0x238133=_0x24b020['insertionPosition']['nodeAfter'];if(_0x2c0a2b){const _0x15e39d=_0x238133['getAttribute']('vid_end'),_0x362d7d=_0x41cd2['getAttribute']('vid_end');_0x41cd2['_setAttribute']('vid_end',_0x15e39d),_0x238133['_setAttribute']('vid_end',_0x362d7d),this['_touched']['set'](_0x41cd2['getAttribute']('vid_end'),{'userId':_0x266fa3}),this['_touched']['set'](_0x238133['getAttribute']('vid_start'),{'userId':_0x266fa3});}else{const _0x1105e8=this['_revisionId']++,_0x5ffe24=this['_revisionId']++;_0x41cd2['_setAttribute']('vid_end',_0x1105e8),_0x238133['_setAttribute']('vid_start',_0x5ffe24),_0x238133['_setAttribute']('vid_end',_0x1179e1),this['_touched']['set'](_0x1105e8,{'userId':_0x266fa3}),this['_touched']['set'](_0x5ffe24,{'userId':_0x266fa3});}}['_handleMarkerOperation'](_0x5b5d2d){if(!_0x5b5d2d['affectsData'])return;const _0x4acdb9=(_0x5b5d2d=this['_cloneOperation'](_0x5b5d2d,this['_diffRoots']))['oldRange']?_0x5b5d2d['oldRange']['root']:null,_0x584eb5=_0x5b5d2d['newRange']?_0x5b5d2d['newRange']['root']:null;_0x4acdb9&&this['_markers']['delete'](_0x5b5d2d['name']),_0x584eb5&&this['_markers']['set'](_0x5b5d2d['name'],_0x5b5d2d['newRange']['clone']());const _0x5e8133=null===_0x5b5d2d['_authorId']?null:_0x5b5d2d['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1e5294=_0x5b5d2d['name'];if(!this['_touchedMarkers']['has'](_0x1e5294))return void this['_touchedMarkers']['set'](_0x1e5294,{'range':_0x5b5d2d['oldRange'],'userId':_0x5e8133});const _0x1185df=this['_touchedMarkers']['get'](_0x1e5294),_0x3c5238=_0x1185df['range'],_0x4de6be=_0x5b5d2d['newRange'];null==_0x3c5238&&null==_0x4de6be||_0x3c5238&&_0x4de6be&&_0x3c5238['isEqual'](_0x4de6be)?this['_touchedMarkers']['delete'](_0x5b5d2d['name']):_0x1185df['userId']=_0x5e8133;}['_handleRootOperation'](_0x230f1a,_0x5d9702){this['_diffRoots']['has'](_0x230f1a['rootName'])?this['_diffRoots']['get'](_0x230f1a['rootName'])['_isAttached']=_0x230f1a['isAdd']:(this['_diffRoots']['set'](_0x230f1a['rootName'],N(_0x230f1a['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x230f1a['rootName'],{}),_0x5d9702&&this['_idsRoots']['set'](_0x230f1a['rootName'],N(_0x230f1a['rootName'],!0x0)));const _0x52484a=null===_0x230f1a['_authorId']?null:_0x230f1a['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x539603=this['_touchedRoots']['get'](_0x230f1a['rootName']);_0x539603&&_0x539603['userId']===_0x52484a?this['_touchedRoots']['delete'](_0x230f1a['rootName']):this['_touchedRoots']['set'](_0x230f1a['rootName'],{'userId':_0x52484a,'isAttached':_0x230f1a['isAdd']});}['_handleRootAttributeOperation'](_0xf223a3){const _0x52a028=this['_diffRootsAttributes']['get'](_0xf223a3['root']['rootName']);null===_0xf223a3['newValue']?delete _0x52a028[_0xf223a3['key']]:_0x52a028[_0xf223a3['key']]=_0xf223a3['newValue'];}}function x(_0x3a9bd8){const _0x148e96=N(_0x3a9bd8['rootName'],_0x3a9bd8['isAttached']());for(const _0x277e6a of _0x3a9bd8['getChildren']()){const _0x239925=_0x277e6a['_clone'](!0x0);_0x148e96['_appendChild'](_0x239925);}return _0x148e96;}function N(_0x49f017,_0x345df9=!0x0){const _0x36c937=new _0x4b7f84();return _0x36c937['rootName']=_0x49f017,_0x36c937['_isAttached']=_0x345df9,_0x36c937['isAttached']=()=>_0x36c937['_isAttached'],_0x36c937;}function P(_0x55f61f,_0x1fd2f5,_0x4370e4){const _0x1246ce='elementEnd'==_0x55f61f['type']?_0x4370e4['createPositionAt'](_0x55f61f['item'],'end'):_0x4370e4['createPositionBefore'](_0x55f61f['item']);return _0x4370e4['createPositionFromPath'](_0x1fd2f5,_0x1246ce['path'],_0x1246ce['stickiness']);}function V(_0x35bde0,_0x591269,_0x5314d2){const _0x2b13e8='elementStart'==_0x35bde0['type']?_0x5314d2['createPositionAt'](_0x35bde0['item'],0x0):_0x5314d2['createPositionAfter'](_0x35bde0['item']);return _0x5314d2['createPositionFromPath'](_0x591269,_0x2b13e8['path'],_0x2b13e8['stickiness']);}class me extends/* #__PURE__ -- @preserve */
25
+ _0x515010(_0x4755b5){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x299b9d,_0x4f3881){super(_0x299b9d),this['focusTracker']=new _0x2c8044(),this['keystrokes']=new _0x592331(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x4f3881),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),this['initializeCssTransitionDisablerMixin']();}['render'](){super['render'](),_0x45b763({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x33b5b6=_0x40b923=>_0x40b923['stopPropagation']();this['keystrokes']['set']('arrowright',_0x33b5b6),this['keystrokes']['set']('arrowleft',_0x33b5b6),this['keystrokes']['set']('arrowup',_0x33b5b6),this['keystrokes']['set']('arrowdown',_0x33b5b6);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x331668){this['revisionNameInputView']['fieldView']['element']['value']=_0x331668['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x5dbdef){const _0x1d5e8e=new et(this['locale'],ti),_0x3e870c=_0x1d5e8e['fieldView'];_0x3e870c['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x515ba9=R(this['locale'],'Name\x20of\x20the\x20revision');return!_0x5dbdef&&(_0x515ba9+='\x20('+R(this['locale'],'optional')+')'),(_0x1d5e8e['label']=_0x515ba9,_0x3e870c['on']('input',()=>{this['revisionNameInputValue']=_0x3e870c['element']['value']['trim']();}),_0x1d5e8e);}}class v extends _0x279b1f{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h];}['_saveRevisionFormView'];['init'](){const _0x2af7bb=this['editor'],_0x8f5c5c=_0x2af7bb['plugins']['get']('RevisionTracker');_0x2af7bb['ui']['componentFactory']['add']('revisionHistory',_0x248246=>{const _0x330423=_0x365f78(_0x248246),_0x5a8f50=_0x330423['panelView']['children'],_0x343858=new _0x1d7b13(_0x248246),_0x381cc3=new _0x554ed8(_0x248246),_0x85dfbc=new _0x4bbda8(_0x248246),_0x4ab714=new _0x554ed8(_0x248246),_0x4917b9=new _0x4bbda8(_0x248246);return _0x330423['bind']('isEnabled')['to'](_0x8f5c5c,'isReady',_0x8f5c5c,'isEnabled',_0x2af7bb,'isReadOnly',(_0x23b91e,_0x433098,_0x4e6f5d)=>_0x23b91e&&_0x433098&&!_0x4e6f5d),_0x330423['buttonView']['set']({'icon':_0x5df96c,'label':R(_0x248246,'Revision\x20history'),'tooltip':!0x0}),_0x85dfbc['set']({'label':R(_0x248246,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x85dfbc['bind']('isEnabled')['to'](_0x8f5c5c,'isReady',_0x8f5c5c,'isEnabled',_0x2af7bb,'isReadOnly',(_0x3811c6,_0x1176c9,_0x2bce2a)=>_0x3811c6&&_0x1176c9&&!_0x2bce2a),_0x85dfbc['on']('execute',()=>this['_showDialog']()),_0x4917b9['set']({'label':R(_0x248246,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x4917b9['bind']('isEnabled')['to'](_0x8f5c5c,'isReady',_0x2af7bb,'isReadOnly',(_0x5c2662,_0xabf71c)=>_0x5c2662&&!_0xabf71c),_0x4917b9['on']('execute',()=>{_0x2af7bb['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x330423['isOpen']=!0x1,_0x2af7bb['editing']['view']['focus']();}),_0x381cc3['children']['add'](_0x85dfbc),_0x4ab714['children']['add'](_0x4917b9),_0x343858['role']='menu',_0x343858['items']['addMany']([_0x381cc3,_0x4ab714]),_0x5a8f50['add'](_0x343858),_0x330423;}),_0x2af7bb['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0xdd7900=this['editor'],_0x55e8bf=_0xdd7900['locale'],_0x422b24=new _0x462d3d(_0x55e8bf),_0x280517=new _0xea17a6(_0x55e8bf);_0x422b24['buttonView']['set']({'icon':_0x5df96c,'label':R(_0x55e8bf,'Revision\x20history')});const _0x5180a3=new _0x999d71(_0x55e8bf,_0x422b24),_0x4c2223=new _0x157300(_0x55e8bf);_0x4c2223['set']({'label':R(_0x55e8bf,'Save\x20current\x20revision')}),_0x4c2223['delegate']('execute')['to'](_0x422b24),_0x4c2223['on']('execute',()=>{this['_showDialog']();}),_0x5180a3['children']['add'](_0x4c2223),_0x280517['items']['add'](_0x5180a3);const _0x426483=new _0x999d71(_0x55e8bf,_0x422b24),_0xf014bb=new _0x157300(_0x55e8bf);return _0xf014bb['set']({'label':R(_0x55e8bf,'Open\x20revision\x20history')}),_0xf014bb['delegate']('execute')['to'](_0x422b24),_0xf014bb['on']('execute',()=>{_0xdd7900['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x426483['children']['add'](_0xf014bb),_0x280517['items']['add'](_0x426483),_0x422b24['panelView']['children']['add'](_0x280517),_0x422b24;}['_showDialog'](){const _0x4eedd6=this['editor'],_0xb3a100=_0x4eedd6['locale'],_0x36fcb5=_0x4eedd6['plugins']['get']('Dialog'),_0x8e932a=_0x4eedd6['plugins']['get']('RevisionTracker');function _0x4ef5a3(_0x28d6aa){_0x4eedd6['config']['get']('revisionHistory.requireRevisionName')&&''===_0x28d6aa['revisionName']?_0x28d6aa['revisionNameInputView']['errorText']=R(_0xb3a100,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x4eedd6['plugins']['get'](h)['saveRevision']({'name':_0x28d6aa['revisionName']}),_0x36fcb5['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x4ef5a3(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x36fcb5['show']({'id':'revisionSave','title':R(_0xb3a100,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':R(_0x4eedd6['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x36fcb5['hide']()},{'label':R(_0x4eedd6['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x6f469b){_0x6f469b['bind']('isEnabled')['to'](_0x8e932a,'isReady',_0x8e932a,'isEnabled',_0x4eedd6,'isReadOnly',(_0x8f4e8,_0x5d5809,_0x226da9)=>_0x8f4e8&&_0x5d5809&&!_0x226da9);},'onExecute':()=>_0x4ef5a3(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x4aaa2d=this['editor'],_0x24574f=_0x4aaa2d['locale'];this['_saveRevisionFormView']=new me(_0x24574f,_0x4aaa2d['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class z extends _0x4755b5{['changeId'];['_model'];constructor(_0x314be0,_0x4caf76){super(_0x314be0),this['_model']=_0x4caf76,this['changeId']=_0x4caf76['id'];const _0x463f97=this['bindTemplate'],_0x588887=R(_0x314be0,_0x4caf76['data']['isSuggestion']?'Suggested\x20by':'add'==_0x4caf76['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x4caf76['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x463f97['to']('type',_0x2136aa=>'ck-revision-change__'+_0x2136aa)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x588887}]},{'text':'\x20'+_0x4caf76['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class G extends/* #__PURE__ -- @preserve */
26
+ _0x409714(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x19b276){super(),this['id']=_0x19b276['id']||_0x36f224(),this['author']=_0x19b276['author'],this['type']=_0x19b276['type'],this['data']=_0x19b276['data']||{},this['rootName']=_0x19b276['rootName'],this['set']('createdAt',_0x19b276['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class J{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0xb5ec55,_0x47387b){this['newRevisionId']=_0xb5ec55,this['oldRevisionId']=_0x47387b,this['changes']=new _0x1024f1();}['_setChanges'](_0x2a83a2){for(const _0x4855ba of _0x2a83a2)this['changes']['add'](_0x4855ba);}}class l extends _0x279b1f{['repository'];['adapter']=null;['_utils'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x5c194e,_0x4e220a,S,$];}constructor(_0xc5ab41){super(_0xc5ab41),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0x45367a,_0x1547a6,_0x187458)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x4a777f=>{for(const _0x154cc5 of this['editor']['editing']['view']['document']['roots'])_0x187458?_0x4a777f['removeClass']('ck-editor__editable__overlay',_0x154cc5):_0x4a777f['addClass']('ck-editor__editable__overlay',_0x154cc5);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x4ec47c=>null!==_0x4ec47c),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x4ee618,_0x1ca5de,_0x3add19)=>_0x4ee618&&_0x3add19?_0x1ca5de['changes']['getIndex'](_0x3add19):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x140be2,_0x1d92be)=>_0x140be2?_0x1d92be['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x4e220a);}['init'](){const _0x1735b9=this['editor'],_0x102900=new rt(_0x1735b9,{'direction':'backward'}),_0x420158=new rt(_0x1735b9,{'direction':'forward'});(_0x1735b9['commands']['add']('showPreviousChange',_0x102900),_0x1735b9['commands']['add']('showNextChange',_0x420158),_0x1735b9['commands']['add']('restoreRevision',new nt(_0x1735b9)),this['on']('change:numberOfChanges',()=>{_0x102900['refresh'](),_0x420158['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x1735b9['enableReadOnlyMode']('revision-viewer'),_0x1735b9['plugins']['has']('WidgetToolbarRepository'))&&_0x1735b9['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x54b283){return await this['_utils']['loadRevisionData'](_0x54b283,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x54b283);}async['getRevisionRootsAttributes'](_0x3c2f52){return await this['_utils']['loadRevisionData'](_0x3c2f52,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x3c2f52);}async['compare'](_0x20d27d,_0xb3e4c3,_0x3865d8=!0x1){if(!this['isEnabled'])return;const _0xb59215=this['diff'],_0x48a8d5=this['repository'],_0x507334='string'==typeof _0x20d27d?_0x48a8d5['getRevision'](_0x20d27d):_0x20d27d,_0x425090='string'==typeof _0xb3e4c3?_0x48a8d5['getRevision'](_0xb3e4c3):_0xb3e4c3,_0x31bed7=_0x507334['id'],_0x131b60=_0x425090?_0x425090['id']:null;if(!_0x3865d8&&this['diff']&&this['diff']['newRevisionId']===_0x31bed7&&this['diff']['oldRevisionId']===_0x131b60)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new J(_0x31bed7,_0x131b60);const _0x5156c5=this['_getRevisionsRange'](_0x507334,_0x425090,!0x0)['map'](_0x400563=>this['_utils']['loadRevisionData'](_0x400563,this['adapter']));return _0x5156c5['push'](new Promise(_0x830ca3=>{setTimeout(_0x830ca3,0x14);})),Promise['all'](_0x5156c5)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x198709=this['_getDiff'](_0x31bed7,_0x131b60);for(const _0x48f201 of _0x198709['changes'])this['_changeIdToChange']['set'](_0x48f201['id'],_0x48f201);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x44fc16=>{for(const _0x1f736d of this['editor']['model']['document']['getRootNames']())_0x44fc16['detachRoot'](_0x1f736d);for(const _0x1f5897 of Object['keys'](_0x198709['model'])){const _0x2b0781=_0x44fc16['addRoot'](_0x1f5897);for(const _0x45e198 of Object['keys'](_0x198709['attributes'][_0x1f5897]))_0x44fc16['setAttribute'](_0x45e198,_0x198709['attributes'][_0x1f5897][_0x45e198],_0x2b0781);_0x44fc16['insert'](_0x198709['model'][_0x1f5897],_0x2b0781,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x198709['changes'])),this['isReady']=!0x0;})['catch'](_0x2b3c18=>{console['error'](_0x2b3c18),this['_cleanUp'](),_0xb59215&&(this['diff']=_0xb59215),this['isReady']=!0x0;});}['addRevisionData'](_0x3d8a0b,_0x705797){const _0x82bbda=this['repository']['createRevision'](_0x3d8a0b);return _0x82bbda['on']('_update',(_0x3e5ef7,_0x135c3f,_0x852ed6)=>_0x705797(_0x135c3f,_0x852ed6,_0x82bbda)),this['repository']['addRevision'](_0x82bbda),_0x82bbda;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x355d89=>{for(const _0x300a4c of this['editor']['model']['document']['getRootNames']())_0x355d89['detachRoot'](_0x300a4c);});}['_sortAndFilterDiffChanges'](_0x32aad8){const _0xc22572=[],_0x38c90c=new Map();for(const _0x3118d0 of this['editor']['model']['document']['getRootNames']()){const _0x3af968=this['editor']['editing']['view']['getDomRoot'](_0x3118d0);if(!_0x3af968)continue;const _0x4720b2=_0x3af968['getClientRects']()['item'](0x0);_0x4720b2&&(_0xc22572['push'](_0x3118d0),_0x38c90c['set'](_0x3118d0,_0x4720b2));}return _0xc22572['sort']((_0x4cb6e1,_0xf1b31c)=>{const _0x4f076b=_0x38c90c['get'](_0x4cb6e1),_0x340f85=_0x38c90c['get'](_0xf1b31c);return _0x4f076b['y']-_0x340f85['y']||_0x4f076b['x']-_0x340f85['x'];}),(_0x32aad8=_0x32aad8['filter'](_0x5a4f54=>_0xc22572['includes'](_0x5a4f54['rootName'])))['sort']((_0x425926,_0x4f4cf5)=>_0xc22572['indexOf'](_0x425926['rootName'])-_0xc22572['indexOf'](_0x4f4cf5['rootName'])),_0x32aad8;}['_makeTape'](_0x232e0b){const _0x3d85d2=Array['from'](_0x232e0b['markers'])['filter'](([_0x4c8334,_0x2468b9])=>_0x4c8334['startsWith']('revision:')&&!_0x2468b9['isCollapsed']),_0xaa5fa3=Array['from'](this['editor']['model']['createRangeIn'](_0x232e0b)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x3d85d2['length'])for(const _0x5ac507 of _0xaa5fa3){const [_0x2d3c2c,_0x476412]=_0x3d85d2[0x0],[,_0x2ea284,_0x47559c]=_0x2d3c2c['split'](':');if(_0x476412['end']['isEqual'](_0x5ac507['nextPosition'])&&_0x3d85d2['shift'](),(_0x5ac507['previousPosition']['isEqual'](_0x476412['start'])||_0x5ac507['previousPosition']['isAfter'](_0x476412['start']))&&('insertion'==_0x2ea284?_0x5ac507['isAdded']={'userId':_0x47559c}:'deletion'==_0x2ea284&&(_0x5ac507['isRemoved']={'userId':_0x47559c})),0x0==_0x3d85d2['length'])break;}return _0xaa5fa3;}['_refreshStartEndIndex'](_0x25bd77){const _0x318a55=new Map();for(let _0x3b9e69=0x0;_0x3b9e69<_0x25bd77['length'];_0x3b9e69++)'text'===_0x25bd77[_0x3b9e69]['type']?(_0x25bd77[_0x3b9e69]['item']['startIndex']=_0x3b9e69,_0x25bd77[_0x3b9e69]['item']['endIndex']=_0x3b9e69):('elementStart'===_0x25bd77[_0x3b9e69]['type']?_0x25bd77[_0x3b9e69]['item']['startIndex']=_0x3b9e69:'elementEnd'===_0x25bd77[_0x3b9e69]['type']&&(_0x25bd77[_0x3b9e69]['item']['endIndex']=_0x3b9e69),_0x318a55['set'](_0x25bd77[_0x3b9e69]['id'],_0x3b9e69));for(const _0x37a684 of _0x318a55['values']())'elementStart'===_0x25bd77[_0x37a684]['type']?_0x25bd77[_0x37a684]['item']['endIndex']=_0x318a55['get'](_0x25bd77[_0x37a684]['pairId']):'elementEnd'===_0x25bd77[_0x37a684]['type']&&(_0x25bd77[_0x37a684]['item']['startIndex']=_0x318a55['get'](_0x25bd77[_0x37a684]['pairId']));}['_processTape'](_0x188bb8){for(let _0x41a04f=0x0;_0x41a04f<_0x188bb8['length'];_0x41a04f++){if('elementStart'===_0x188bb8[_0x41a04f]['type'])_0x188bb8[_0x41a04f]['item']['startIndex']=_0x41a04f;else{if('elementEnd'===_0x188bb8[_0x41a04f]['type']){_0x188bb8[_0x41a04f]['item']['endIndex']=_0x41a04f;const _0x4a29af=_0x188bb8[_0x41a04f]['item']['startIndex'];_0x188bb8[_0x4a29af]['pairId']=_0x188bb8[_0x41a04f]['id'],_0x188bb8[_0x41a04f]['pairId']=_0x188bb8[_0x4a29af]['id'];}else _0x188bb8[_0x41a04f]['item']['startIndex']=_0x41a04f,_0x188bb8[_0x41a04f]['item']['endIndex']=_0x41a04f,_0x188bb8[_0x41a04f]['pairId']=null;}_0x188bb8[_0x41a04f]['markersStart']||(_0x188bb8[_0x41a04f]['markersStart']=[],_0x188bb8[_0x41a04f]['markersEnd']=[]);}}['_markInsertions'](_0x2dfac4,_0x31e7d8){const _0x256a2d=_0x2dfac4['filter'](_0x53c72b=>!_0x53c72b['isAdded']);for(let _0x19bdd6=0x0;_0x19bdd6<_0x31e7d8['length'];_0x19bdd6++)_0x31e7d8[_0x19bdd6]['isAdded']&&(_0x256a2d[_0x19bdd6]['isAdded']=_0x31e7d8[_0x19bdd6]['isAdded']);}['_getDiff'](_0x3eef1b,_0x3226c7=null){const _0xa41e2f=this['repository']['getRevision'](_0x3eef1b),_0x5c5d35=_0x3226c7?this['repository']['getRevision'](_0x3226c7):null,_0x195598=this['_getRevisionsRange'](_0xa41e2f,_0x5c5d35),_0x36694e=_0x195598[_0x195598['length']-0x1],_0x2e7a1f=new Map(),_0x597760={'model':{},'attributes':{},'changes':[]},_0x15a4c3=new Set(),_0x4f6ba3=new Map();for(let _0x52a550=_0x195598['length']-0x1;_0x52a550>=0x0;_0x52a550--){const _0x5776c7=_0x195598[_0x52a550];for(const _0x19ced6 of Object['keys'](_0x5776c7['diffData']))if(_0x5776c7['diffData'][_0x19ced6]['attachChange']){const _0x11a403=_0x5776c7['diffData'][_0x19ced6]['attachChange'];_0x11a403['isAttached']?(_0x15a4c3['add'](_0x19ced6),_0x4f6ba3['has'](_0x19ced6)&&_0x4f6ba3['get'](_0x19ced6)['userId']==_0x11a403['userId']?_0x4f6ba3['delete'](_0x19ced6):_0x4f6ba3['set'](_0x19ced6,_0x11a403)):_0x4f6ba3['has'](_0x19ced6)?(_0x15a4c3['delete'](_0x19ced6),_0x4f6ba3['delete'](_0x19ced6)):(_0x15a4c3['add'](_0x19ced6),_0x4f6ba3['set'](_0x19ced6,_0x11a403));}else _0x15a4c3['add'](_0x19ced6);}for(const _0x3db4fd of _0x15a4c3){const _0x287c84=_0x4f6ba3['has'](_0x3db4fd)&&!_0x4f6ba3['get'](_0x3db4fd)['isAttached'];let _0x573a34=_0x287c84?_0x195598['length']-0x1:0x0;const _0x1f7185=_0x287c84?-0x1:0x1;for(;_0x195598[_0x573a34];){const _0x4140c8=_0x195598[_0x573a34];if(_0x4140c8['diffData'][_0x3db4fd]){const _0x3e2aef=_0x287c84?_0x4140c8['diffData'][_0x3db4fd]['attributesBefore']:_0x4140c8['diffData'][_0x3db4fd]['attributesAfter'];_0x597760['attributes'][_0x3db4fd]=_0x3e2aef?_0x477256(_0x3e2aef):{};break;}_0x573a34+=_0x1f7185;}}for(const _0x21aa13 of _0x195598){_0x21aa13['model']={};for(const _0x47596b of _0x21aa13['authors'])_0x2e7a1f['set'](_0x47596b['id'],_0x47596b);for(const _0x437254 of _0x15a4c3){const _0x5a2a8b=_0x21aa13['diffData'][_0x437254]?_0x21aa13['diffData'][_0x437254]['insertions']:'[]',_0x16c46d=_0x21aa13['diffData'][_0x437254]?_0x21aa13['diffData'][_0x437254]['deletions']:'[]';_0x21aa13['model'][_0x437254]={'insertions':this['_utils']['_makeModelFromViewString'](_0x5a2a8b),'deletions':this['_utils']['_makeModelFromViewString'](_0x16c46d)};}}for(const _0x1eee26 of _0x15a4c3){let _0x481bea=null,_0x1ab4e2=0x0;const _0x5b715d=new Map(Array['from'](_0xa41e2f['model'][_0x1eee26]['insertions']['markers'])['filter'](([_0x59d798])=>!_0x59d798['startsWith']('revision:')));let _0x42eb8b=0x0;for(const _0x34dbe3 of _0x195598){const _0x3ab23c=this['_makeTape'](_0x34dbe3['model'][_0x1eee26]['insertions']);_0x34dbe3==_0xa41e2f?(_0x481bea=_0x3ab23c,_0x1ab4e2=_0x481bea['length'],_0x481bea['forEach'](_0x572fa5=>{_0x572fa5['id']=_0x42eb8b++;}),this['_processTape'](_0x481bea)):this['_markInsertions'](_0x481bea,_0x3ab23c);const _0x4d852c=_0x481bea['filter'](_0x13af6a=>!_0x13af6a['isAdded'])['map'](_0x1e2c79=>_0x1e2c79['id']);let _0x40486d=0x0;const _0x542ffe=this['_makeTape'](_0x34dbe3['model'][_0x1eee26]['deletions']);_0x542ffe['forEach'](_0x2c123b=>{_0x2c123b['isRemoved']?_0x2c123b['id']=_0x1ab4e2++:_0x2c123b['id']=_0x4d852c[_0x40486d++];}),this['_processTape'](_0x542ffe),this['_setDistance'](_0x481bea,'isAdded'),this['_setDistance'](_0x542ffe,'isRemoved'),_0x34dbe3==_0xa41e2f&&this['_markMarkers'](_0x481bea,_0x5b715d),_0x481bea=this['_joinTapes'](_0x481bea,_0x542ffe),this['_refreshStartEndIndex'](_0x481bea),this['_setDistance'](_0x481bea,'isRemoved');}_0x481bea=_0x481bea['filter'](_0x35c873=>!(_0x35c873['isAdded']&&_0x35c873['isRemoved']));const _0x1442ce=new Map(_0x36694e['model'][_0x1eee26]['deletions']['markers']),_0x4c9695=new Set(_0x5b715d['keys']());for(const _0x245d09 of _0x1442ce['keys']())_0x4c9695['delete'](_0x245d09);this['_markSuggestions'](_0x481bea,_0x4c9695),this['_fixObsoleteTags'](_0x481bea),_0x481bea=this['_removeMissingPairs'](_0x481bea),_0x481bea=this['_markMismatchedRemovedTags'](_0x481bea),_0x481bea=this['_removeUnsupportedChanges'](_0x481bea);const {root:_0x1d95ab,changes:_0x1dd0df}=this['_makeModelFromTape'](_0x481bea,_0x2e7a1f,_0x1eee26);_0x597760['model'][_0x1eee26]=_0x1d95ab;const _0x1fdd66=_0x4f6ba3['get'](_0x1eee26);if(_0x1fdd66){const _0x375b97=_0x2e7a1f['get'](_0x1fdd66['userId']),_0x33edac=new G({'author':_0x375b97,'type':_0x1fdd66['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x1eee26});_0x1dd0df['unshift'](_0x33edac),_0x597760['attributes'][_0x1eee26]['revisionHistoryAttachChange']=_0x33edac['id'];}_0x597760['changes']=_0x597760['changes']['concat'](_0x1dd0df);}return _0x597760;}['_markMarkers'](_0x3f2e1d,_0x2a1de1){for(let _0x18c811=0x0;_0x18c811<_0x3f2e1d['length'];_0x18c811++)for(const [_0x541624,_0x4dc04f]of _0x2a1de1)!_0x4dc04f['isCollapsed']&&_0x4dc04f['start']['isEqual'](_0x3f2e1d[_0x18c811]['previousPosition'])&&_0x3f2e1d[_0x18c811]['markersStart']['push'](_0x541624),_0x4dc04f['end']['isEqual'](_0x3f2e1d[_0x18c811]['nextPosition'])&&_0x3f2e1d[_0x18c811]['markersEnd']['push'](_0x541624);}['_joinTapes'](_0x2d98cc,_0x465a9d){let _0x212e26=[],_0x1f0f6e=0x0,_0x394356=0x0;for(;_0x1f0f6e<_0x2d98cc['length']||_0x394356<_0x465a9d['length'];){const _0x2fecb8=_0x2d98cc[_0x1f0f6e]||{},_0x112bfb=_0x465a9d[_0x394356]||{};if(_0x2fecb8['id']==_0x112bfb['id'])_0x1f0f6e++,_0x394356++,_0x212e26['push'](_0x2fecb8);else{if(_0x112bfb['isRemoved']&&_0x2fecb8['isAdded']){const {commonTape:_0xb5a75f,iEnd:_0x1037e3,jEnd:_0x3393bc}=this['_threeWayMerge'](_0x2d98cc,_0x1f0f6e,_0x465a9d,_0x394356);_0x212e26=_0x212e26['concat'](_0xb5a75f),_0x1f0f6e=_0x1037e3,_0x394356=_0x3393bc;}else _0x112bfb['isRemoved']?(_0x394356++,_0x212e26['push'](_0x112bfb)):(_0x1f0f6e++,_0x212e26['push'](_0x2fecb8));}}return _0x212e26;}['_markSuggestions'](_0x868277,_0x290fcd){const _0x1ec2a2=[];for(let _0x550a56=0x0;_0x550a56<_0x868277['length'];_0x550a56++){for(let _0x4de873=0x0;_0x4de873<_0x868277[_0x550a56]['markersStart']['length'];_0x4de873++){const _0xb41ae1=_0x868277[_0x550a56]['markersStart'][_0x4de873];if(!_0x290fcd['has'](_0xb41ae1))continue;const {group:_0x12a992,type:_0x3844c0,authorId:_0x582f2a}=_0x563793(_0xb41ae1);'revision-suggestion'!=_0x12a992||'insertion'!=_0x3844c0&&'deletion'!=_0x3844c0||(_0x1ec2a2['unshift']({'type':_0x3844c0,'name':_0xb41ae1,'userId':_0x582f2a}),_0x868277[_0x550a56]['markersStart']['splice'](_0x4de873,0x1),_0x4de873--);}_0x4d8198(_0x868277[_0x550a56]);for(let _0x42823d=0x0;_0x42823d<_0x868277[_0x550a56]['markersEnd']['length'];_0x42823d++){const _0x452f76=_0x868277[_0x550a56]['markersEnd'][_0x42823d];if(!_0x290fcd['has'](_0x452f76))continue;const {group:_0x94defd,type:_0x20835f}=_0x563793(_0x452f76);if('revision-suggestion'!=_0x94defd||'insertion'!=_0x20835f&&'deletion'!=_0x20835f)continue;_0x868277[_0x550a56]['markersEnd']['splice'](_0x42823d,0x1),_0x42823d--;const _0x190ced=_0x1ec2a2['findIndex'](_0x50410b=>_0x50410b['name']==_0x452f76);_0x190ced>-0x1&&_0x1ec2a2['splice'](_0x190ced,0x1);}}function _0x563793(_0x3443c8){const _0x39633c=_0x3443c8['split'](':');return{'group':_0x39633c[0x0],'type':_0x39633c[0x1],'subType':_0x39633c['length']>=0x5?_0x39633c[0x2]:null,'id':_0x39633c['length']<0x5?_0x39633c[0x2]:_0x39633c[0x3],'authorId':_0x39633c['length']<0x5?_0x39633c[0x3]:_0x39633c[0x4],'markerCount':0x6==_0x39633c['length']?_0x39633c[0x5]:null};}function _0x4d8198(_0x30753a){for(let _0x411c8a=0x0;_0x411c8a<_0x1ec2a2['length'];_0x411c8a++){if(_0x30753a['isAdded']&&'insertion'==_0x1ec2a2[_0x411c8a]['type']&&_0x30753a['isAdded']['userId']==_0x1ec2a2[_0x411c8a]['userId'])return _0x30753a['isAddSuggestion']=_0x1ec2a2[_0x411c8a],void delete _0x30753a['isAdded'];if(!_0x30753a['isAdded']&&!_0x30753a['isRemoved']&&'deletion'==_0x1ec2a2[_0x411c8a]['type'])return void(_0x30753a['isRemoveSuggestion']=_0x1ec2a2[_0x411c8a]);}}}['_setDistance'](_0x3e3f12,_0x1088cd){let _0x11763b=0x0,_0x10c57a=!0x1;const _0x118888=new Map();for(const _0x3721cb of _0x3e3f12)_0x3721cb[_0x1088cd]?_0x10c57a&&(_0x11763b++,_0x10c57a=!0x1):(_0x11763b++,_0x10c57a=!0x0),_0x118888['set'](_0x3721cb['id'],_0x11763b);for(let _0x5556c0=0x0;_0x5556c0<_0x3e3f12['length'];_0x5556c0++){if('isRemoved'==_0x1088cd&&_0x3e3f12[_0x5556c0]['isAdded']||'isAdded'==_0x1088cd&&_0x3e3f12[_0x5556c0]['isRemoved'])continue;if('text'==_0x3e3f12[_0x5556c0]['type']){_0x3e3f12[_0x5556c0]['distance']=0x0;continue;}const _0xde1c25=_0x118888['get'](_0x3e3f12[_0x5556c0]['pairId']),_0x5be983=_0x118888['get'](_0x3e3f12[_0x5556c0]['id']);_0x3e3f12[_0x5556c0]['distance']=_0xde1c25-_0x5be983;}}['_getRevisionsRange'](_0x52845f,_0x18d0b5,_0x11a787=!0x1){const _0x216f2a=[];let _0x51a39b=this['repository']['getIndex'](_0x52845f),_0x2f084e=this['repository']['getIndex'](_0x18d0b5);for(-0x1==_0x2f084e&&(_0x2f084e=this['repository']['_revisions']['length'],_0x11a787=!0x1);_0x51a39b<_0x2f084e;)_0x216f2a['push'](this['repository']['getRevision'](_0x51a39b)),_0x51a39b++;return _0x11a787&&_0x216f2a['push'](this['repository']['getRevision'](_0x51a39b)),_0x216f2a;}['_threeWayMerge'](_0x2fa37d,_0x345cbb,_0x43f756,_0x1f6d52){const _0x5351e8=this['editor']['model']['schema'];let _0x2b3ad9=_0x345cbb;for(;_0x2fa37d[_0x2b3ad9]&&_0x2fa37d[_0x2b3ad9]['isAdded'];)_0x2b3ad9++;let _0x13516a=_0x1f6d52;for(;_0x43f756[_0x13516a]&&_0x43f756[_0x13516a]['isRemoved'];)_0x13516a++;_0x50b9a5(_0x2fa37d,_0x345cbb,_0x2b3ad9),_0x50b9a5(_0x43f756,_0x1f6d52,_0x13516a);const _0x5e786c=_0x43f756['slice'](_0x1f6d52,_0x13516a)['concat'](_0x2fa37d['slice'](_0x345cbb,_0x2b3ad9));return _0x5e786c['sort']((_0x42fdb9,_0x3606b3)=>_0x42fdb9['side']!=_0x3606b3['side']?_0x42fdb9['side']-_0x3606b3['side']:_0x42fdb9['level']!=_0x3606b3['level']?_0x42fdb9['level']-_0x3606b3['level']:_0x42fdb9['distance']!=_0x3606b3['distance']?_0x3606b3['distance']-_0x42fdb9['distance']:!!_0x42fdb9['isAdded']!=!!_0x3606b3['isAdded']?-0x1==_0x42fdb9['side']||0x0==_0x42fdb9['side']?_0x42fdb9['isAdded']?-0x1:0x1:_0x42fdb9['isAdded']?0x1:-0x1:_0x42fdb9['index']-_0x3606b3['index']),{'commonTape':_0x5e786c,'iEnd':_0x2b3ad9,'jEnd':_0x13516a};function _0x50b9a5(_0x137f92,_0x241a18,_0x3da2f7){let _0x539215=-0x1,_0x4afa0a=Number['POSITIVE_INFINITY'],_0x549f5a=!0x0;for(let _0x3c51d0=_0x241a18;_0x3c51d0<_0x3da2f7;_0x3c51d0++)if(_0x5351e8['isInline'](_0x137f92[_0x3c51d0]['item'])||(_0x549f5a=!0x1),_0x137f92[_0x3c51d0]['item']['startIndex']<_0x241a18&&(_0x539215=_0x3c51d0),_0x137f92[_0x3c51d0]['item']['endIndex']>=_0x3da2f7){_0x4afa0a=_0x3c51d0;break;}_0x549f5a&&(_0x539215=_0x3da2f7-0x1);for(let _0x25198a=_0x241a18;_0x25198a<_0x3da2f7;_0x25198a++)_0x137f92[_0x25198a]['side']=_0x25198a<=_0x539215?-0x1:_0x25198a<_0x4afa0a?0x0:0x1,_0x137f92[_0x25198a]['index']=_0x25198a;let _0xc9408e=0x0;for(let _0xd76124=_0x241a18;_0xd76124<=_0x539215;_0xd76124++)0x0==_0x137f92[_0xd76124]['distance']?_0x137f92[_0xd76124]['level']=_0xc9408e:(_0xc9408e++,_0x137f92[_0xd76124]['level']=_0xc9408e,_0xc9408e++);for(let _0x3d271d=_0x241a18;_0x3d271d<_0x3da2f7;_0x3d271d++)0x0==_0x137f92[_0x3d271d]['side']&&(_0x137f92[_0x3d271d]['level']=_0xc9408e);_0xc9408e=0x0;for(let _0x42afe5=_0x3da2f7-0x1;_0x42afe5>=_0x4afa0a;_0x42afe5--)0x0==_0x137f92[_0x42afe5]['distance']?_0x137f92[_0x42afe5]['level']=_0xc9408e:(_0xc9408e--,_0x137f92[_0x42afe5]['level']=_0xc9408e,_0xc9408e--);}}['_fixObsoleteTags'](_0x36623f){const _0x57d95b=new Map(),_0x572ab2=this['editor']['model']['schema'];for(let _0x32fb0a=0x1;_0x32fb0a<_0x36623f['length'];_0x32fb0a++){let _0x408341,_0x3b7ec3,_0x4057b8;const _0x1b981c=_0x36623f[_0x32fb0a],_0xce894b=_0x36623f[_0x32fb0a-0x1];if('text'==_0x1b981c['type'])continue;if(_0x1b981c['type']!=_0xce894b['type'])continue;if(!_0x572ab2['isBlock'](_0xce894b['item'])||_0x572ab2['isLimit'](_0xce894b['item']))continue;if(!_0x572ab2['isBlock'](_0x1b981c['item'])||_0x572ab2['isLimit'](_0x1b981c['item']))continue;if((_0x36623f[_0x32fb0a]['isAdded']||_0x36623f[_0x32fb0a]['isAddSuggestion'])&&_0x36623f[_0x32fb0a-0x1]['isRemoved'])_0x408341=_0x36623f[_0x32fb0a],_0x3b7ec3=_0x36623f[_0x32fb0a-0x1],_0x4057b8=_0x32fb0a-0x1;else{if(!_0x36623f[_0x32fb0a]['isRemoved']||!_0x36623f[_0x32fb0a-0x1]['isAdded']&&!_0x36623f[_0x32fb0a-0x1]['isAddSuggestion'])continue;_0x408341=_0x36623f[_0x32fb0a-0x1],_0x3b7ec3=_0x36623f[_0x32fb0a],_0x4057b8=_0x32fb0a;}const _0x501066=_0x408341['level']==_0x3b7ec3['level'],_0x56461e=Math['abs'](_0x408341['level'])<Math['abs'](_0x3b7ec3['level'])&&0x0==_0x3b7ec3['distance'];(_0x501066||_0x56461e)&&(_0x57d95b['set'](_0x3b7ec3['id'],_0x408341['id']),_0x36623f['splice'](_0x4057b8,0x1),_0x32fb0a--,_0x408341['isAdded']=!0x1);}for(let _0x24c909=0x0;_0x24c909<_0x36623f['length'];_0x24c909++)_0x57d95b['has'](_0x36623f[_0x24c909]['pairId'])&&(_0x36623f[_0x24c909]['pairId']=_0x57d95b['get'](_0x36623f[_0x24c909]['pairId']));}['_removeMissingPairs'](_0x2b9371){const _0x5272ce=new Set(_0x2b9371['map'](_0x152d27=>_0x152d27['id']));for(let _0x1d4dfb=0x0;_0x1d4dfb<_0x2b9371['length'];_0x1d4dfb++)_0x5272ce['has'](_0x2b9371[_0x1d4dfb]['pairId'])||0x0==_0x2b9371[_0x1d4dfb]['distance']||(_0x2b9371[_0x1d4dfb]['isIncorrect']=!0x0);return _0x2b9371['filter'](_0xc6c901=>!_0xc6c901['isIncorrect']);}['_markMismatchedRemovedTags'](_0x4f2e4a){const _0x4d730c=new Set();for(let _0x11da71=0x0;_0x11da71<_0x4f2e4a['length'];_0x11da71++){if(_0x4d730c['has'](_0x4f2e4a[_0x11da71]['id'])&&_0x4f2e4a[_0x11da71]['isRemoved']&&(_0x4f2e4a[_0x11da71]['isIncorrect']=!0x0),_0x4f2e4a[_0x11da71]['isIncorrect'])continue;if(0x0==_0x4f2e4a[_0x11da71]['distance'])continue;if('elementStart'!=_0x4f2e4a[_0x11da71]['type'])continue;if(null==_0x4f2e4a[_0x11da71]['pairId'])continue;let _0xac0ef1=_0x11da71+0x1,_0xd25cb1=0x0;for(;_0x4f2e4a[_0xac0ef1]['id']!=_0x4f2e4a[_0x11da71]['pairId'];)'elementStart'==_0x4f2e4a[_0xac0ef1]['type']?_0xd25cb1++:'elementEnd'==_0x4f2e4a[_0xac0ef1]['type']&&_0xd25cb1--,_0xac0ef1++;if(0x0!=_0xd25cb1){if(_0x4f2e4a[_0x11da71]['isRemoved'])_0x4f2e4a[_0x11da71]['isIncorrect']=!0x0;else{for(;_0xac0ef1!=_0x11da71;)_0x4f2e4a[_0xac0ef1]['isRemoved']&&0x0!=_0x4f2e4a[_0xac0ef1]['distance']&&(_0x4f2e4a[_0xac0ef1]['isIncorrect']=!0x0,_0x4d730c['add'](_0x4f2e4a[_0xac0ef1]['pairId'])),_0xac0ef1--;}}}return _0x4f2e4a['filter'](_0xfe5353=>!_0xfe5353['isIncorrect']);}['_removeUnsupportedChanges'](_0x34a91c){const _0x4c2c8d=this['editor']['model']['schema'];for(let _0x257648=0x0;_0x257648<_0x34a91c['length'];_0x257648++){if(!(_0x34a91c[_0x257648]['isAdded']||_0x34a91c[_0x257648]['isAddSuggestion']||_0x34a91c[_0x257648]['isRemoved']||_0x34a91c[_0x257648]['isRemoveSuggestion']))continue;if(0x0==_0x34a91c[_0x257648]['distance'])continue;const _0x88b362=_0x34a91c[_0x257648]['item'];_0x4c2c8d['isBlock'](_0x88b362)||_0x4c2c8d['isLimit'](_0x88b362)||(_0x34a91c[_0x257648]['isAdded']&&delete _0x34a91c[_0x257648]['isAdded'],_0x34a91c[_0x257648]['isAddSuggestion']&&delete _0x34a91c[_0x257648]['isAddSuggestion'],_0x34a91c[_0x257648]['isRemoveSuggestion']&&delete _0x34a91c[_0x257648]['isRemoveSuggestion'],_0x34a91c[_0x257648]['isRemoved']&&(_0x34a91c[_0x257648]['isIncorrect']=!0x0));}return _0x34a91c['filter'](_0x17d700=>!_0x17d700['isIncorrect']);}['_makeModelFromTape'](_0x4c416c,_0x2c5adb,_0x2f11c0){const _0xca61a0=new _0x4b7f84(),_0x136946=[],_0x40869b=new Map(),_0x1f2c9d=this['editor']['model'],_0x26b194=_0x1f2c9d['schema'],_0x1d9b14=[_0xca61a0],_0x254742={},_0x5b1fca={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x111f99=null;const _0x5f013b=[0x0];for(let _0x55cfd1=0x0;_0x55cfd1<_0x4c416c['length'];_0x55cfd1++)if('elementStart'===_0x4c416c[_0x55cfd1]['type']){_0x4c416c[_0x55cfd1]['previousPosition']=_0x1f2c9d['createPositionFromPath'](_0xca61a0,_0x5f013b);const _0x4337b4=new _0x45ab54(_0x4c416c[_0x55cfd1]['item']['name'],_0x4c416c[_0x55cfd1]['item']['getAttributes']());_0x1d9b14[0x0]['_appendChild'](_0x4337b4),_0x5f013b['push'](0x0),_0x1d9b14['unshift'](_0x4337b4),_0x4c416c[_0x55cfd1]['nextPosition']=_0x1f2c9d['createPositionFromPath'](_0xca61a0,_0x5f013b);}else'elementEnd'===_0x4c416c[_0x55cfd1]['type']?(_0x1d9b14['shift'](),_0x4c416c[_0x55cfd1]['previousPosition']=_0x1f2c9d['createPositionFromPath'](_0xca61a0,_0x5f013b),_0x5f013b['pop'](),_0x5f013b[_0x5f013b['length']-0x1]++,_0x4c416c[_0x55cfd1]['nextPosition']=_0x1f2c9d['createPositionFromPath'](_0xca61a0,_0x5f013b)):(_0x4c416c[_0x55cfd1]['previousPosition']=_0x1f2c9d['createPositionFromPath'](_0xca61a0,_0x5f013b),_0x111f99?_0x111f99['_data']+=_0x4c416c[_0x55cfd1]['item']['data']:_0x111f99=new _0x95c9c7(_0x4c416c[_0x55cfd1]['item']['data'],_0x4c416c[_0x55cfd1]['item']['getAttributes']()),_0x4c416c[_0x55cfd1+0x1]&&'text'===_0x4c416c[_0x55cfd1+0x1]['type']&&_0x528c61(_0x111f99,_0x4c416c[_0x55cfd1+0x1]['item'])||(_0x1d9b14[0x0]['_appendChild'](_0x111f99),_0x111f99=null),_0x5f013b[_0x5f013b['length']-0x1]+=_0x4c416c[_0x55cfd1]['item']['offsetSize'],_0x4c416c[_0x55cfd1]['nextPosition']=_0x1f2c9d['createPositionFromPath'](_0xca61a0,_0x5f013b));for(let _0x14fda8=0x0;_0x14fda8<_0x4c416c['length'];_0x14fda8++){const _0x3ae8cc=_0x4c416c[_0x14fda8]['previousPosition'],_0x44e840=_0x4c416c[_0x14fda8]['nextPosition'];for(const _0x4f8c79 of _0x4c416c[_0x14fda8]['markersStart'])_0x40869b['set'](_0x4f8c79,{'start':_0x3ae8cc,'end':null});_0x436636('isRemoveSuggestion',_0x14fda8,_0x3ae8cc,_0x44e840),_0x436636('isAddSuggestion',_0x14fda8,_0x3ae8cc,_0x44e840),_0x436636('isRemoved',_0x14fda8,_0x3ae8cc,_0x44e840),_0x436636('isAdded',_0x14fda8,_0x3ae8cc,_0x44e840);for(const _0x59da2b of _0x4c416c[_0x14fda8]['markersEnd']){const _0x16f4f0=_0x40869b['get'](_0x59da2b);_0x16f4f0?_0x16f4f0['end']=_0x44e840:_0x40869b['set'](_0x59da2b,{'start':_0x44e840,'end':_0x44e840});}}for(const [_0x450715,_0x42558f]of _0x40869b){const _0x1feb57=this['editor']['model']['createRange'](_0x42558f['start'],_0x42558f['end']);_0xca61a0['markers']['set'](_0x450715,_0x1feb57);}return _0x136946['sort']((_0x18f438,_0x2a4f4c)=>{const _0x4d1096=_0xca61a0['markers']['get']('revision:'+_0x18f438['id']),_0xc2559e=_0xca61a0['markers']['get']('revision:'+_0x2a4f4c['id']);return _0x4d1096['start']['isBefore'](_0xc2559e['start'])?-0x1:_0x4d1096['start']['isAfter'](_0xc2559e['start'])?0x1:_0x4d1096['end']['isBefore'](_0xc2559e['end'])?-0x1:_0x4d1096['end']['isAfter'](_0xc2559e['end'])?0x1:'add'===_0x18f438['type']?-0x1:0x1;}),{'root':_0xca61a0,'changes':_0x136946};function _0x436636(_0x27c9a5,_0x429449,_0x48da76,_0xaf9b80){const _0x444873=!!_0x4c416c[_0x429449][_0x27c9a5],_0x127f82=_0x444873?_0x4c416c[_0x429449][_0x27c9a5]['userId']:null,_0x31453b=_0x429449===_0x4c416c['length']-0x1,_0x4b1024=_0x5b1fca[_0x27c9a5][0x0],_0x332cd0=_0x26b194['isObject'](_0x4c416c[_0x429449]['item']);!_0x254742[_0x27c9a5]&&_0x444873?_0x254742[_0x27c9a5]={'start':_0x48da76,'tapeItem':_0x4c416c[_0x429449],'userId':_0x127f82,'type':_0x27c9a5}:_0x254742[_0x27c9a5]&&!_0x444873?(_0x254742[_0x27c9a5]['end']=_0x48da76,_0x3fa947(_0x254742[_0x27c9a5]),_0x254742[_0x27c9a5]=null):_0x254742[_0x27c9a5]&&_0x444873&&_0x254742[_0x27c9a5]['userId']!==_0x127f82&&(_0x254742[_0x27c9a5]['end']=_0x48da76,_0x4b1024&&_0x4b1024['userId']===_0x254742[_0x27c9a5]['userId']||_0x3fa947(_0x254742[_0x27c9a5]),_0x254742[_0x27c9a5]={'start':_0x48da76,'tapeItem':_0x4c416c[_0x429449],'userId':_0x127f82,'type':_0x27c9a5}),_0x254742[_0x27c9a5]&&_0x332cd0&&('elementStart'!==_0x4c416c[_0x429449]['type']||_0x4b1024&&_0x4b1024['userId']===_0x127f82||_0x5b1fca[_0x27c9a5]['unshift']({'userId':_0x127f82,'object':_0x4c416c[_0x429449]['item'],'change':_0x254742[_0x27c9a5]}),'elementEnd'===_0x4c416c[_0x429449]['type']&&_0x4b1024&&_0x4b1024['object']===_0x4c416c[_0x429449]['item']&&(_0x5b1fca[_0x27c9a5]['shift'](),_0x254742[_0x27c9a5]=_0x4b1024['change'])),_0x254742[_0x27c9a5]&&_0x31453b&&(_0x254742[_0x27c9a5]['end']=_0xaf9b80,_0x3fa947(_0x254742[_0x27c9a5]),_0x254742[_0x27c9a5]=null);}function _0x3fa947({start:_0x2b8ffa,end:_0x4fd4ca,tapeItem:_0x4b8067,userId:_0x4f20a4,type:_0x59c704}){const _0x8411fe=_0x4b8067['item'],_0xc279af=_0x1f2c9d['schema']['isBlock'](_0x8411fe)&&!_0x1f2c9d['schema']['isLimit'](_0x8411fe),_0x340afa=_0x2b8ffa['nodeAfter']==_0x4fd4ca['parent']&&_0x4fd4ca['isAtStart'];if(_0xc279af&&_0x340afa)return;const _0x37004c=_0x1f2c9d['createRange'](_0x2b8ffa,_0x4fd4ca),_0x4eaff9=_0x2c5adb['get'](_0x4f20a4),_0x2c6061=new G({'author':_0x4eaff9,'type':'isAdded'==_0x59c704||'isAddSuggestion'==_0x59c704?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x59c704||'isRemoveSuggestion'==_0x59c704},'createdAt':new Date(),'rootName':_0x2f11c0});_0x136946['push'](_0x2c6061),_0xca61a0['markers']['set']('revision:'+_0x2c6061['id'],_0x37004c);}function _0x528c61(_0x13d4cf,_0x5b37cd){const _0xf4f079=_0x13d4cf['getAttributes'](),_0x3e77d5=_0x5b37cd['getAttributes']();for(const _0x2dd966 of _0xf4f079){if(_0x2dd966[0x1]!==_0x5b37cd['getAttribute'](_0x2dd966[0x0]))return!0x1;_0x3e77d5['next']();}return _0x3e77d5['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x3d6ea0=>{const _0x5e2e9a=_0x3d6ea0['markerName']['split'](':')[0x1],_0x438329=this['_getChangeFromId'](_0x5e2e9a);if(!_0x438329)return null;const _0x4fdd5f='add'==_0x438329['type']?'insertion':'deletion',_0x23e4c2=['ck-suggestion-marker','ck-suggestion-marker-'+_0x4fdd5f];return _0x438329['data']['isSuggestion']&&_0x23e4c2['push']('ck-suggestion-marker-'+_0x4fdd5f+'-new'),this['activeChange']==_0x438329&&_0x23e4c2['push']('ck-suggestion-marker--active'),{'classes':_0x23e4c2,'attributes':{'data-change-id':_0x5e2e9a}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x203be4=>{_0x203be4['on']('element:pre',(_0x389530,_0x4f2e63,_0x4fbbde)=>{const _0x111ee2=_0x4f2e63['viewItem']['getChild'](0x0);if(!_0x111ee2||!_0x111ee2['is']('element','code'))return;if(!_0x4fbbde['consumable']['consume'](_0x111ee2,{'attributes':['vid_start','vid_end']}))return;const _0xf86cac=_0x4f2e63['modelRange']['start']['nodeAfter'];_0x4fbbde['writer']['setAttribute']('vid_start',_0x111ee2['getAttribute']('vid_start'),_0xf86cac),_0x4fbbde['writer']['setAttribute']('vid_end',_0x111ee2['getAttribute']('vid_end'),_0xf86cac);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x108d3f=>{_0x108d3f['on']('element',(_0x9b9d4b,_0xc06284,_0x2ab8d8)=>{if(!_0x2ab8d8['consumable']['consume'](_0xc06284['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0xc06284['modelRange']['isCollapsed'])return;const _0x5bd7d9=_0xc06284['modelRange']['start']['nodeAfter'];_0x5bd7d9['hasAttribute']('vid_start')||_0x5bd7d9['hasAttribute']('vid')||(_0x2ab8d8['writer']['setAttribute']('vid_start',_0xc06284['viewItem']['getAttribute']('vid_start'),_0x5bd7d9),_0x2ab8d8['writer']['setAttribute']('vid_end',_0xc06284['viewItem']['getAttribute']('vid_end'),_0x5bd7d9));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x28aa40=>_0x28aa40['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x51918b,[,_0x396ee7])=>{['vid_start','vid_end','vid']['includes'](_0x396ee7)&&(_0x51918b['return']=!0x0,_0x51918b['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x174552=>{_0x174552['on']('attribute:vid',(_0x5c2aeb,_0x85e87f,_0x1c6f57)=>{if('\x20'!=_0x85e87f['item']['data']||_0x85e87f['item']['parent']['maxOffset']>0x1)return;if(!_0x1c6f57['consumable']['consume'](_0x85e87f['item'],_0x5c2aeb['name']))return;const _0x44e355=_0x1c6f57['writer'],_0x172ca9=_0x1c6f57['mapper']['toViewRange'](_0x85e87f['range']);_0x44e355['wrap'](_0x172ca9,_0x44e355['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x4a120a){const _0x4c475a=_0x4a120a['plugins']['get']('RevisionViewer');return(_0x6f913d,_0x4e8b25,_0x2b4bda)=>{const _0x23b4dc=_0x4e8b25['markerName']['split'](':')[0x1],_0x1fb972=_0x4c475a['_getChangeFromId'](_0x23b4dc);if(!_0x1fb972)return null;const _0x2df60b='add'==_0x1fb972['type']?'split':'merge';if(!_0x2b4bda['consumable']['test'](_0x4e8b25['markerRange'],_0x6f913d['name']))return;const _0x27168c=_0x4e8b25['markerRange']['getWalker'](),_0x599677=_0x4e8b25['markerRange']['start'],_0x32dc31=_0x4a120a['model']['schema'];let _0x3c8618=null,_0x28c86c=null,_0x3f2935=!0x1,_0x4e5631=!0x1;for(const _0x2f36c4 of _0x27168c){const _0x465780=_0x2f36c4['item'];_0x3f2935=_0x3f2935||_0x32dc31['isContent'](_0x465780);const _0x15477f=_0x2b4bda['mapper']['toViewElement'](_0x465780);if(_0x15477f&&_0x15477f['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x2f36c4['type']&&(_0x32dc31['isBlock'](_0x465780)&&!_0x32dc31['isLimit'](_0x465780)&&(_0x465780['nextSibling']||_0x599677['isAtEnd']?_0x3c8618&&_0x3c8618['parent']==_0x465780||(_0x3c8618=_0x465780,_0x1a2a5a(_0x2f36c4['previousPosition']),_0x4e5631=!0x0):_0x28c86c=_0x28c86c||_0x2f36c4['previousPosition']));}function _0x1a2a5a(_0x265718){const _0x36c7be=_0x2b4bda['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x2df60b}),_0x3295d2=_0x2b4bda['mapper']['toViewPosition'](_0x265718);_0x1fb972['data']['isSuggestion']&&_0x2b4bda['writer']['addClass']('ck-suggestion-marker-'+_0x2df60b+'-new',_0x36c7be),_0x4c475a['activeChange']==_0x1fb972&&_0x2b4bda['writer']['addClass']('ck-suggestion-marker--active',_0x36c7be),_0x2b4bda['writer']['insert'](_0x3295d2,_0x36c7be),_0x2b4bda['mapper']['bindElementToMarker'](_0x36c7be,_0x4e8b25['markerName']);}_0x3f2935||_0x4e5631||!_0x28c86c||_0x1a2a5a(_0x28c86c);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x14a584,_0x1799c7,_0x3ac424)=>{const _0x454df8=_0x3ac424['mapper']['markerNameToElements'](_0x1799c7['markerName']);if(_0x454df8){for(const _0x456eba of _0x454df8)(_0x456eba['hasClass']('ck-suggestion-marker-split')||_0x456eba['hasClass']('ck-suggestion-marker-merge'))&&(_0x3ac424['mapper']['unbindElementFromMarkerName'](_0x456eba,_0x1799c7['markerName']),_0x3ac424['writer']['remove'](_0x456eba));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x26482f,_0x1398b8,_0x53b300)=>{const _0x33eea=_0x1398b8['markerName']['split'](':')[0x1],_0x5e725a=this['_getChangeFromId'](_0x33eea);if(!_0x5e725a)return null;const _0x7fd809='add'==_0x5e725a['type']?'split':'merge';if(_0x53b300['consumable']['test'](_0x1398b8['markerRange'],_0x26482f['name']))for(const _0x1524bb of _0x1398b8['markerRange']['getItems']()){if(!_0x1524bb['is']('element','softBreak'))continue;const _0x57d1e2=_0x53b300['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x7fd809}),_0x446f49=_0x53b300['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x1524bb));_0x5e725a['data']['isSuggestion']&&_0x53b300['writer']['addClass']('ck-suggestion-marker-'+_0x7fd809+'-new',_0x57d1e2),this['activeChange']==_0x5e725a&&_0x53b300['writer']['addClass']('ck-suggestion-marker--active',_0x57d1e2),_0x53b300['writer']['insert'](_0x446f49,_0x57d1e2),_0x53b300['mapper']['bindElementToMarker'](_0x57d1e2,_0x1398b8['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0xe88e96=>{for(const _0x4715c4 of this['editor']['model']['document']['getRootNames']()){const _0x2ae11d=this['editor']['model']['document']['getRoot'](_0x4715c4),_0x477190=this['editor']['editing']['view']['document']['getRoot'](_0x4715c4);if(_0x477190){const _0x550f04=_0x2ae11d['getAttribute']('revisionHistoryAttachChange');if(_0xe88e96['removeAttribute']('data-change-id',_0x477190),_0xe88e96['removeClass']('ck-revision-history-root-add',_0x477190),_0xe88e96['removeClass']('ck-revision-history-root-remove',_0x477190),_0xe88e96['removeClass']('ck-revision-history-root--active',_0x477190),_0x550f04){const _0x1ee0ac=this['_getChangeFromId'](_0x550f04);if(!_0x1ee0ac)return null;_0xe88e96['setAttribute']('data-change-id',_0x550f04,_0x477190),_0xe88e96['addClass']('ck-revision-history-root-'+_0x1ee0ac['type'],_0x477190),this['activeChange']==_0x1ee0ac&&_0xe88e96['addClass']('ck-revision-history-root--active',_0x477190);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0xda0d66=>'revision-comment:'+_0xda0d66,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x1c433d=>'revision-suggestion:'+_0x1c433d,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x1874ac=>({'name':'suggestion:'+_0x1874ac,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x470fb6=>{const _0x354049=_0x470fb6['markerName']['split'](':')[0x1];return'insertion'!=_0x354049&&'deletion'!=_0x354049?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x354049]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Q(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Q(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x285a51,_0x311544,_0x5b4865)=>{const _0x8bcf36=_0x5b4865['mapper']['markerNameToElements'](_0x311544['markerName']);if(_0x8bcf36){for(const _0x1a42db of _0x8bcf36)_0x1a42db['is']('uiElement')&&(_0x5b4865['mapper']['unbindElementFromMarkerName'](_0x1a42db,_0x311544['markerName']),_0x5b4865['writer']['remove'](_0x1a42db));}},{'priority':'high'});}['_getChangeFromId'](_0x4bc5d4){return this['_changeIdToChange']['get'](_0x4bc5d4);}['_getViewForChange'](_0x581afc){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new z(this['editor']['locale'],_0x581afc),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x22dbf4,_0x57c420,_0x43cee3,_0x4f0b1b)=>{_0x4f0b1b&&this['_balloon']['remove'](_0x4f0b1b),_0x43cee3&&(this['_balloon']['add']({'view':_0x43cee3,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x2eba70=this['editor']['editing'],_0x4eb43e=this['_getChangeFromId'](_0x43cee3['changeId']);let _0x2e89ab;if(_0x4eb43e['data']['isOnRoot']){const _0x4512da=_0x2eba70['view']['getDomRoot'](_0x4eb43e['rootName']);_0x2e89ab=Array['from'](_0x4512da['getClientRects']());}else{const _0x568ea8=this['editor']['model']['markers']['get']('revision:'+_0x43cee3['changeId']);_0x2e89ab=Array['from'](_0x2eba70['mapper']['markerNameToElements'](_0x568ea8['name']))['map'](_0x3e310b=>_0x2eba70['view']['domConverter']['mapViewToDom'](_0x3e310b))['map'](_0x453741=>Array['from'](_0x453741['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x2e89ab[0x0];return _0x2e89ab['find'](_0x422a5e=>_0x422a5e['top']-0x3<=this['_activeViewTarget']['y']&&_0x422a5e['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x422a5e['left']-0x3<=this['_activeViewTarget']['x']&&_0x422a5e['right']+0x3>=this['_activeViewTarget']['x'])||_0x2e89ab[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x4ef166,_0x541420,_0x40efc2,_0x484259)=>{this['activeView']=_0x40efc2?this['_getViewForChange'](_0x40efc2):null,this['editor']['model']['change'](()=>{const _0x5c6c26=this['editor']['editing'];_0x484259&&(_0x484259['data']['isOnRoot']?_0x5c6c26['view']['change'](_0x24bd95=>{_0x24bd95['removeClass']('ck-revision-history-root--active',_0x5c6c26['view']['document']['getRoot'](_0x484259['rootName']));}):_0x5c6c26['reconvertMarker']('revision:'+_0x484259['id'])),_0x40efc2&&(_0x40efc2['data']['isOnRoot']?_0x5c6c26['view']['change'](_0x1199a3=>{_0x1199a3['addClass']('ck-revision-history-root--active',_0x5c6c26['view']['document']['getRoot'](_0x40efc2['rootName']));}):_0x5c6c26['reconvertMarker']('revision:'+_0x40efc2['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x3baecb,_0x23a51b)=>{if(this['activeChange'])return;const _0xcf2945=this['_findChangeIdFromDomTarget'](_0x23a51b['target']),_0x424df3=this['_changeIdToChange']['get'](_0xcf2945);_0x424df3?(this['_activeViewTarget']={'x':_0x23a51b['domEvent']['x'],'y':_0x23a51b['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x424df3)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x4c551d,_0x50efd0)=>{const _0x2878ab=this['_findChangeIdFromDomTarget'](_0x50efd0['target']),_0xdf96e=this['_changeIdToChange']['get'](_0x2878ab);_0xdf96e?(this['_activeViewTarget']={'x':_0x50efd0['domEvent']['x'],'y':_0x50efd0['domEvent']['y']},_0xdf96e===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0xdf96e):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x372a18){do{const _0x176ad8=_0x372a18['getAttribute']('data-change-id');if(_0x176ad8)return _0x176ad8;_0x372a18=_0x372a18['parent'];}while(_0x372a18);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x3d14b9=>{for(const _0x5851c7 of this['editor']['model']['markers'])_0x3d14b9['removeMarker'](_0x5851c7);});}}function Q(_0x30d82a,_0x164c42){return(_0x43c5b1,_0x3f9d38,_0xb27438)=>{if(!_0xb27438['consumable']['test'](_0x3f9d38['markerRange'],_0x43c5b1['name']))return;const _0x438cc8=_0x3f9d38['markerRange']['getWalker'](),_0xd5632e=_0x3f9d38['markerRange']['start'],_0x396699=_0x30d82a['model']['schema'];let _0x4a45c7=null,_0x4ae9dd=null,_0x1f90a8=!0x1,_0x46b987=!0x1;for(const _0x29ace5 of _0x438cc8){const _0x5c3b04=_0x29ace5['item'];_0x1f90a8=_0x1f90a8||_0x396699['isContent'](_0x5c3b04);const _0x523109=_0xb27438['mapper']['toViewElement'](_0x5c3b04);if(_0x523109&&_0x523109['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x29ace5['type']&&(_0x396699['isBlock'](_0x5c3b04)&&!_0x396699['isLimit'](_0x5c3b04)&&(_0x5c3b04['nextSibling']||_0xd5632e['isAtEnd']?_0x4a45c7&&_0x4a45c7['parent']==_0x5c3b04||(_0x4a45c7=_0x5c3b04,_0x582cb9(_0x29ace5['previousPosition']),_0x46b987=!0x0):_0x4ae9dd=_0x4ae9dd||_0x29ace5['previousPosition']));}function _0x582cb9(_0x55914f){const _0x1f234b=_0xb27438['mapper']['toViewPosition'](_0x55914f),_0x22c55f=_0xb27438['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x164c42});_0xb27438['writer']['insert'](_0x1f234b,_0x22c55f),_0xb27438['mapper']['bindElementToMarker'](_0x22c55f,_0x3f9d38['markerName']);}_0x1f90a8||_0x46b987||!_0x4ae9dd||_0x582cb9(_0x4ae9dd);};}class nt extends _0xfcc260{constructor(_0xa387a4){super(_0xa387a4);const _0x4d2bf1=_0xa387a4['plugins']['get'](l);this['affectsData']=!0x1,this['listenTo'](_0x4d2bf1,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x4d2bf1,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x487178=this['editor'],_0x607164=_0x487178['plugins']['get'](l),_0x113949=_0x607164['isReady']?_0x607164['diff']['newRevisionId']:null;_0x487178['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x113949);}['refresh'](){const {isReady:_0x4117d9,isEnabled:_0x135925,repository:_0xf4172f,diff:_0x2497e6}=this['editor']['plugins']['get'](l),_0xc579f7=_0x2497e6&&_0xf4172f['getLaterVisibleRevision'](_0x2497e6['newRevisionId']);this['isEnabled']=_0x4117d9&&_0x135925&&Boolean(_0xc579f7);}}class rt extends _0xfcc260{['_step'];constructor(_0x5dacde,{direction:_0x5a6072}){super(_0x5dacde);const _0x4bf569=_0x5dacde['plugins']['get'](l);this['affectsData']=!0x1,this['_step']='forward'===_0x5a6072?0x1:-0x1,this['listenTo'](_0x4bf569,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x4bf569,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x4bf569,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x367a23=this['editor'],_0x5f71be=_0x367a23['plugins']['get'](l),{isNavigationMode:_0x12f3e8,currentChangeNumber:_0x32add9}=_0x5f71be;let _0x340ee2;if(_0x5f71be['activeChange']=_0x12f3e8?_0x5f71be['diff']['changes']['get'](_0x32add9+this['_step']):_0x5f71be['diff']['changes']['first'],_0x5f71be['activeChange']['data']['isOnRoot'])_0x340ee2=_0x367a23['editing']['view']['getDomRoot'](_0x5f71be['activeChange']['rootName']);else{const _0x1fbc4d=_0x367a23['model']['markers']['get']('revision:'+_0x5f71be['activeChange']['id']);_0x340ee2=_0x28595c(_0x367a23['editing'],_0x1fbc4d);}_0x5a887a({'target':_0x340ee2,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x2cc645,currentChangeNumber:_0x371b2a,numberOfChanges:_0x4eb6cb,isReady:_0xbb4f31,isEnabled:_0x6d5639}=this['editor']['plugins']['get'](l);this['isEnabled']=!!(_0x6d5639&&_0xbb4f31&&_0x4eb6cb)&&(!_0x2cc645||(0x1===this['_step']?_0x371b2a<_0x4eb6cb-0x1:_0x371b2a>0x0));}}class Ri extends _0x4755b5{constructor(_0x19a67f){super(_0x19a67f);const _0x129e54=this['bindTemplate'],_0x2b3cfe=new _0x4bbda8(_0x19a67f),_0x2bd65d=new _0x4bbda8(_0x19a67f);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',(_0x3cc959,_0x306605)=>_0x3cc959&&_0x306605>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x3ea41f,_0x29ccd4,_0x56da34,_0x5e9239)=>{if(!_0x3ea41f)return R(_0x19a67f,'Loading...');if(!_0x56da34)return R(_0x19a67f,'No\x20changes');const _0x324e77=R(_0x19a67f,'NUMBER_OF_CHANGES',_0x56da34);return _0x5e9239?R(_0x19a67f,'X_OF_Y_CHANGES',[_0x29ccd4+0x1,_0x56da34]):_0x324e77;}),_0x2b3cfe['set']({'label':R(_0x19a67f,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x10b79d}),_0x2bd65d['set']({'label':R(_0x19a67f,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x2175e8}),_0x2b3cfe['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x2bd65d['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x2b3cfe['on']('execute',()=>this['fire']('execute','backward')),_0x2bd65d['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',_0x129e54['if']('_isStatusLabelVisible','ck-hidden',_0x5234d1=>!_0x5234d1)]},'children':[{'text':_0x129e54['to']('isNavigationMode',_0x48d2b3=>_0x48d2b3?R(_0x19a67f,'EDIT_X_OF_Y_REVISIONS')+':\x20':R(_0x19a67f,'Total')+':\x20')}]},{'text':_0x129e54['to']('_statusText')}]},new _0x5d8437(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x2b3cfe,_0x2bd65d]}]});}}const ge='ck-editor__editable__loading-overlay';class ji extends _0x279b1f{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x3d44ee=this['editor']['editing']['view'];_0x3d44ee['change'](_0x59ffa2=>{for(const _0x495d11 of _0x3d44ee['document']['roots'])_0x59ffa2['addClass'](ge,_0x495d11);});}['hide'](){const _0x5d0beb=this['editor']['editing']['view'];_0x5d0beb['change'](_0x5d9d98=>{for(const _0x315736 of _0x5d0beb['document']['roots'])_0x5d9d98['removeClass'](ge,_0x315736);});}}class u extends _0x279b1f{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l,ji];}['init'](){const _0x25fa52=this['editor'],_0x466052=_0x25fa52['plugins']['get'](l),_0x2bc156=_0x25fa52['plugins']['get'](ji);_0x25fa52['ui']['componentFactory']['add']('exitToEditing',_0x11ea7d=>{const _0x2d4821=new _0x4bbda8(_0x11ea7d);return _0x2d4821['set']({'label':R(_0x11ea7d,'Back\x20to\x20editing'),'icon':_0x22d576,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x2d4821,'execute',()=>{_0x25fa52['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x2d4821;}),_0x25fa52['ui']['componentFactory']['add']('restoreRevision',_0x5672b8=>{const _0x2b343f=new _0x4bbda8(_0x5672b8);return _0x2b343f['set']({'label':R(_0x5672b8,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x2b343f['bind']('isEnabled')['to'](_0x25fa52['commands']['get']('restoreRevision')),this['listenTo'](_0x2b343f,'execute',()=>_0x25fa52['execute']('restoreRevision')),_0x2b343f;}),_0x25fa52['ui']['componentFactory']['add']('changesNavigation',_0x1d3da4=>{const _0x14361=new Ri(_0x1d3da4),_0x366ced=_0x25fa52['commands']['get']('showPreviousChange'),_0x55280b=_0x25fa52['commands']['get']('showNextChange');return _0x14361['bind']('isBackwardNavigationEnabled')['to'](_0x366ced,'isEnabled'),_0x14361['bind']('isForwardNavigationEnabled')['to'](_0x55280b,'isEnabled'),_0x14361['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x466052),this['listenTo'](_0x14361,'execute',(_0x5130dc,_0x13248c)=>{_0x25fa52['execute']('forward'===_0x13248c?'showNextChange':'showPreviousChange');}),_0x14361;}),_0x2bc156['show'](),_0x466052['on']('change:isReady',(_0x2d617e,_0x56a8cd,_0x1745d0)=>{_0x1745d0?_0x2bc156['hide']():_0x2bc156['show']();});}}class hi extends et{['_resizeObserver']=null;constructor(_0x3c2a4e,_0x2b29e8){super(_0x3c2a4e,_0x2b29e8);const _0x19e3f7=this['bindTemplate'];this['set']({'label':R(_0x3c2a4e,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=R(_0x3c2a4e,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x19e3f7['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new ot(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x4459a8=this['fieldView']['element'];this['_tooltipString']=_0x4459a8['scrollWidth']>_0x4459a8['clientWidth']&&_0x4459a8['value']||'';}}class ni extends _0x4755b5{constructor(_0x2e09f3,_0x349e68,_0x9a316e){super(_0x2e09f3);const _0x1062b3=new _0x2876f2();_0x1062b3['set']({'content':_0x33aea7,'viewBox':'0\x200\x2011\x2010'});const _0x310223=['ck','ck-revision-history-sidebar__revision-author'];_0x9a316e&&_0x310223['push']('ck-revision-history-sidebar__revision-author_creator');const _0x3c893f=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':R(_0x2e09f3,_0x9a316e?'Revision\x20creator':'Revision\x20author')},'children':[_0x1062b3,_0x349e68['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x310223},'children':_0x3c893f});}}function ci(_0x34d448,_0x16640c){const _0x2e07db=_0x34d448['bindTemplate'],_0x3641f4=_0x34d448['locale'],_0x126c8e=_0x365f78(_0x3641f4);_0x126c8e['panelPosition']='sw';const _0x712ebb=function(_0x4929fb,_0xe9922){const _0xd3b6f3=function(_0xb74d47,_0x49b883){const _0x4dda2e=_0xb74d47['locale'],_0x4ddd06={'Compare\x20against\x20selected':R(_0x4dda2e,'Compare\x20against\x20selected'),'Name\x20this\x20revision':R(_0x4dda2e,'Name\x20this\x20revision'),'Restore\x20this\x20revision':R(_0x4dda2e,'Restore\x20this\x20revision')};return _0x49b883['map'](_0x102a71=>{const _0x4141ed=_0x4ddd06[_0x102a71['name']];return _0x4141ed&&_0x4141ed!==_0x102a71['name']&&(_0x102a71['name']=_0x4141ed),_0x102a71;});}(_0x4929fb,_0xe9922),_0x11ab1d=new _0x1024f1();for(const _0x3510b7 of _0xd3b6f3){const _0x11163f={'type':'button','model':new to({'label':_0x3510b7['name'],'class':_0x3510b7['class'],'withText':!0x0,'role':'menuitem','_action':_0x3510b7['action']})};_0x11163f['model']['bind']('isEnabled')['to'](_0x4929fb,'isActionsDropdownOpen',_0x3c58bc=>'function'!=typeof _0x3510b7['isEnabled']||(!_0x3c58bc||_0x3510b7['isEnabled'](_0x4929fb))),_0x11ab1d['add'](_0x11163f);}return _0x11ab1d;}(_0x34d448,_0x16640c);return _0x34d448['bind']('isActionsDropdownOpen')['to'](_0x126c8e,'isOpen'),_0x126c8e['buttonView']['set']({'label':R(_0x3641f4,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x84bf8c}),_0x126c8e['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x2e07db['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x2e07db['to'](_0x141a83=>_0x141a83['stopPropagation']())}}),_0x126c8e['on']('execute',_0x52a292=>{_0x34d448['isReady']&&'function'==typeof _0x52a292['source']['_action']&&_0x52a292['source']['_action'](_0x34d448);}),_0x15b29e(_0x126c8e,_0x712ebb,{'role':'menu'}),_0x126c8e['listenTo'](_0x34d448,'change:isActionsDropdownOpen',(_0x539a3c,_0x2d758c,_0x48cd84)=>{if(_0x48cd84)for(const _0xc456c0 of _0x126c8e['listView']['items']){const _0x244ee4=_0xc456c0['children']['first'],_0x28dfe3=_0x16640c['find'](_0x5fb65a=>_0x5fb65a['action']===_0x244ee4['_action'])['isVisible'];_0xc456c0['isVisible']=void 0x0===_0x28dfe3||_0x28dfe3(_0x34d448);}}),_0x126c8e;}class _i extends/* #__PURE__ -- @preserve */
27
+ _0x4f8448(_0x4755b5){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x22cbbb,_0x25d934,_0x192353,_0x28c999){super(_0x22cbbb);const _0x4d4427=this['bindTemplate'],_0x586665=function(_0xb870ba,_0x16529f){const _0x13c4ee=Array['from'](_0x16529f['authors'])['filter'](_0x1a5362=>_0x1a5362!=_0x16529f['creator']);return _0x16529f['creator']&&_0x13c4ee['unshift'](_0x16529f['creator']),_0x13c4ee['map'](_0x38cf75=>new ni(_0xb870ba,_0x38cf75,_0x38cf75==_0x16529f['creator']));}(_0x22cbbb,_0x25d934);this['id']=_0x25d934['id'],this['_revision']=_0x25d934,this['_requireRevisionName']=_0x28c999,this['bind']('name','createdAt')['to'](_0x25d934),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x1e80a9=>{return _0x9021bd=_0x22cbbb['uiLanguage'],(_0x979912=_0x1e80a9)['toLocaleDateString'](_0x9021bd,{'month':'long','day':'numeric'})+',\x20'+_0x979912['toLocaleTimeString'](_0x9021bd,{'hour':'numeric','minute':'numeric'});var _0x9021bd,_0x979912;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new hi(_0x22cbbb,ti),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x5087de=>_0x5087de||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x15d0f1,_0x12ceb7)=>_0x15d0f1&&_0x12ceb7),this['revisionActionsView']=_0x192353&&_0x192353['length']?ci(this,_0x192353):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x4d4427['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x4d4427['if']('isEnabled','ck-disabled',_0x4450f3=>!_0x4450f3),_0x4d4427['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x4d4427['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x4d4427['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':_0x4d4427['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':_0x586665}]},this['revisionActionsView']],'on':{'click':_0x4d4427['to'](_0xdce81c=>{_0xdce81c['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x4dc3e6=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x4dc3e6,'change',()=>{this['_requireRevisionName']&&!_0x4dc3e6['value']||this['fire']('setName',{'id':this['id'],'name':_0x4dc3e6['value']}),_0x4dc3e6['value']||(_0x4dc3e6['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function li(_0xc218fc,_0xd6dfe7){const _0x4c1d84=_0x3fc25b['fromJSDate'](_0xc218fc)['setLocale'](_0xd6dfe7),_0x375fe5=_0x3fc25b['local'](),_0x1c6f5b=_0x375fe5['minus']({'days':0x1})['startOf']('day');let _0x5e9f33,_0xb57e12;return _0x4c1d84['hasSame'](_0x375fe5,'day')?(_0x5e9f33=_0x4c1d84['startOf']('day')['toJSDate'](),_0xb57e12=_0x4c1d84['toRelativeCalendar']()):_0x4c1d84['hasSame'](_0x1c6f5b,'day')?(_0x5e9f33=_0x1c6f5b['toJSDate'](),_0xb57e12=_0x4c1d84['toRelativeCalendar']()):_0x4c1d84['hasSame'](_0x375fe5,'week')?(_0x5e9f33=_0x4c1d84['startOf']('week')['toJSDate'](),_0xb57e12=_0x4c1d84['weekdayLong']||''):_0x4c1d84['hasSame'](_0x375fe5,'year')?(_0x5e9f33=_0x4c1d84['startOf']('month')['toJSDate'](),_0xb57e12=_0x4c1d84['monthLong']||''):(_0x5e9f33=_0x4c1d84['startOf']('year')['toJSDate'](),_0xb57e12=String(_0x4c1d84['year'])),{'startDate':_0x5e9f33,'localizedPeriodName':_0xb57e12};}class bi extends _0x4755b5{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x34dd28,_0x5a5bd7,_0x1b490f,_0x24dba8){super(_0x34dd28);const _0x1417c9=li(_0x5a5bd7,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x5a5bd7,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x1b490f,this['_requireRevisionName']=_0x24dba8,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':_0x1417c9}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x483dee){const _0x169e3f=new _i(this['locale'],_0x483dee,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x169e3f);}['removeRevision'](_0x111138){const _0x3aa2d2=this['revisionViews']['find'](_0x3efd41=>_0x3efd41['id']===_0x111138['id']);this['revisionViews']['remove'](_0x3aa2d2);}}class fi extends _0x4755b5{constructor(_0x5a9dbd){super(_0x5a9dbd);const _0x403468=new _0x2876f2();_0x403468['content']=_0x5df96c,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x403468,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[R(_0x5a9dbd,'Revision\x20history')]}]});}}class di extends _0x4755b5{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x102112,_0x44c0bb,_0x337ddc,_0x1698d6){super(_0x102112);const _0x511297=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x44c0bb,this['_revisionActions']=_0x337ddc,this['_requireRevisionName']=_0x1698d6,this['on']('select',(_0x12b823,_0x37c578)=>{this['fire']('revisionSelected',_0x37c578);}),this['on']('setName',(_0x4517fe,_0x214ff1)=>{this['fire']('revisionSetName',_0x214ff1);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new fi(_0x102112),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x511297['if']('isEnabled','ck-disabled',_0x37571c=>!_0x37571c)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x89be80 of this['_revisions'])this['_addRevision'](_0x89be80);this['_revisions']['on']('add',(_0xa4a18b,_0x440201)=>{this['_addRevision'](_0x440201);}),this['_revisions']['on']('remove',(_0x112de2,_0x266a9b)=>{this['_removeRevision'](_0x266a9b);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x53fe1a=>_0x53fe1a['revisionViews']['map'](_0xc4ba1c=>_0xc4ba1c))['flat']();}['selectRevision'](_0x3f4609){for(const _0x46c8d2 of this['revisionViews'])_0x3f4609&&_0x3f4609['id']===_0x46c8d2['id']?_0x46c8d2['select']():_0x46c8d2['deselect']();}['highlightRevisions'](_0x17343a){for(const _0x89e144 of this['revisionViews'])_0x17343a['some'](({id:_0x259aca})=>_0x259aca===_0x89e144['id'])?_0x89e144['highlight']():_0x89e144['unhighlight']();}['_addRevision'](_0x4e6775){const _0x514aeb=li(_0x4e6775['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x3b9cd8=this['timePeriodViews']['get'](0x0);_0x3b9cd8&&_0x3b9cd8['startDate']['getTime']()===_0x514aeb['getTime']()||(_0x3b9cd8=new bi(this['locale'],_0x514aeb,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x3b9cd8)),_0x3b9cd8['addRevision'](_0x4e6775);}['_removeRevision'](_0x19399f){const _0x3435a2=li(_0x19399f['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x3435a2)['removeRevision'](_0x19399f);}['_getTimePeriodViewByStartDate'](_0x28e636){return this['timePeriodViews']['find'](_0x253a31=>_0x253a31['startDate']['getTime']()===_0x28e636['getTime']());}}class f extends _0x279b1f{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
28
28
  ((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
29
- rt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l];}constructor(_0x3ec0a8){super(_0x3ec0a8),this['_revisionViewer']=_0x3ec0a8['plugins']['get'](l),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x2033cd=this['_revisionsRepository']['_revisions'],_0x5080d1=this['_createRevisionActions'](),_0x5f2951=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new ui(this['editor']['locale'],_0x2033cd,_0x5080d1,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',(_0x2e2b2d,_0x16f1cb)=>{_0x16f1cb['revisionViews']['on']('add',(_0x37a455,_0x1e3ce9)=>{_0x1e3ce9['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)),_0x5f2951['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x2975a9=this['_revisionsRepository']['getRevision'](0x0);if(_0x2975a9){const _0x5cadd2=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x2975a9['id']);this['_revisionViewer']['compare'](_0x2975a9,_0x5cadd2);}}['_handleRevisionSelected'](_0x46c70b,_0x44fe12){const _0x5bac97=this['_revisionsRepository']['getRevision'](_0x44fe12['id']),_0x1aba2d=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x5bac97['id']);this['_revisionViewer']['compare'](_0x5bac97,_0x1aba2d);}['_handleRevisionSetName'](_0x2cc4f7,_0x3c7537){this['_revisionsRepository']['getRevision'](_0x3c7537['id'])['setName'](_0x3c7537['name']);}['_handleDiffChange'](_0x4452a0,_0x5d6b2c,_0x5e30f2){const _0x30fcb2=this['_revisionsRepository']['getRevisionsInDiff'](_0x5e30f2);_0x30fcb2['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x30fcb2),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x30fcb2[0x0]));}['_createRevisionActions'](){const _0x1f0a11=this['editor'],_0x2e8836=f['availableRevisionActions'],_0x461564=_0x1f0a11['config']['get']('revisionHistory.revisionActions')||f['defaultRevisionActions'];if(_0x461564['length'])return _0x461564['map'](_0x1692d0=>{const _0x3ca87f='string'==typeof _0x1692d0?Object['assign']({},_0x2e8836[_0x1692d0]):_0x1692d0;return _0x3ca87f['action']=_0x3ca87f['action']['bind'](this,_0x1f0a11),_0x3ca87f['isVisible']&&(_0x3ca87f['isVisible']=_0x3ca87f['isVisible']['bind'](this,_0x1f0a11)),_0x3ca87f;});}}function rt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x25c26f},_0x4915cd)=>{const _0x54bd37=_0x25c26f['get'](l),_0x46401f=_0x54bd37['repository'];let _0x1e61fc=_0x54bd37['diff']['newRevisionId'],_0x29b42e=_0x4915cd['id'];_0x46401f['getIndex'](_0x1e61fc)>_0x46401f['getIndex'](_0x29b42e)&&([_0x1e61fc,_0x29b42e]=[_0x29b42e,_0x1e61fc]),_0x54bd37['compare'](_0x1e61fc,_0x29b42e);},'isVisible':({plugins:_0x526b6f},_0x5106c2)=>{const _0x50c1e5=_0x526b6f['get'](l);return!(_0x50c1e5['repository']['getRevisionsInDiff'](_0x50c1e5['diff'])['length']>0x2)&&!_0x5106c2['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x1b7ad2,{id:_0x3fc5d9})=>{_0x1b7ad2['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x3fc5d9);},'isVisible':({plugins:_0x2c493a},_0xbbe060)=>!!_0x2c493a['get'](l)['repository']['getLaterVisibleRevision'](_0xbbe060['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x5d8977},{id:_0x408b44,revisionNameView:_0xf8c41b})=>{const _0x3b67cd=_0x5d8977['get'](l),_0x3688d9=_0x3b67cd['repository']['getEarlierVisibleRevision'](_0x408b44);_0x3b67cd['compare'](_0x408b44,_0x3688d9),_0xf8c41b['focus'](),_0xf8c41b['fieldView']['select']();}}};}class Z extends tt{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x271e51,_0x5d73e3){super(_0x271e51),this['_view']=_0x5d73e3,this['_toolbarConfig']=st(_0x271e51['config']['get']('toolbar')),this['_elementReplacer']=new it();}get['element'](){return this['view']['element'];}['init'](_0x428769){const _0x53f535=this['editor'],_0x591adc=this['view'],_0x2e3bc7=_0x53f535['editing']['view'],_0x5f1c91=_0x591adc['editable'],_0x445c5b=_0x2e3bc7['document']['getRoot']();_0x5f1c91['name']=_0x445c5b['rootName'],_0x591adc['render']();const _0xdb2a77=_0x5f1c91['element'];this['setEditableElement'](_0x5f1c91['name'],_0xdb2a77),_0x591adc['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x2e3bc7['attachDomRoot'](_0xdb2a77),this['_elementReplacer']['replace'](_0x428769,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x4c0aa0=this['view'],_0x275d1c=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x275d1c['detachDomRoot'](_0x4c0aa0['editable']['name']),_0x4c0aa0['destroy']();}['_initToolbar'](){const _0x32d4c2=this['view'];_0x32d4c2['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x32d4c2['stickyPanel']['limiterElement']=_0x32d4c2['element'],_0x32d4c2['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x4a42be})=>_0x4a42be),_0x32d4c2['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x32d4c2['toolbar']);}}class ii extends _0x3ff921{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x2b2fd4,_0x9132b0,_0x208369={}){super(_0x2b2fd4),this['stickyPanel']=new _0x8b95bf(_0x2b2fd4),this['toolbar']=new _0x3cbc4f(_0x2b2fd4,{'shouldGroupWhenFull':_0x208369['shouldToolbarGroupWhenFull']}),this['_editable']=new te(_0x2b2fd4,_0x9132b0);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class m extends/* #__PURE__ -- @preserve */
30
- _0x1a4533(_0x2a51c5){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x4a1c6a,_0x159056){super(_0x159056),this['sourceElement']=_0x4a1c6a,this['model']['document']['createRoot']();const _0x1e21c2=new ii(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Z(this,_0x1e21c2);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x29d227,_0x2754d5){const _0x33dfbe=new this(_0x29d227,_0x2754d5);return await _0x33dfbe['initPlugins'](),await _0x33dfbe['ui']['init'](_0x29d227),await _0x33dfbe['data']['init'](_0x33dfbe['config']['get']('initialData')||''),_0x33dfbe['fire']('ready'),_0x33dfbe;}}const d=['RevisionHistoryUI','RestrictedEditingMode'];class at extends _0x54fe5b{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x11c4ae){function _0x412745(_0x1b45f9){return _0x1b45f9['map'](_0x1e5abf=>String['fromCharCode'](_0x1e5abf))['join']('');}super(_0x11c4ae),this['result']='end',_0x11c4ae[_0x412745([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x412745([0x76,0x69,0x65,0x77])][_0x412745([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x412745([0x61,0x75,0x74,0x6f]),_0x11c4ae[_0x412745([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x412745([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x412745([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x412745([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x412745([0x6f,0x6b])});}}class ht extends _0x54fe5b{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h,v];}constructor(_0x3963b2){if(super(_0x3963b2),!this['editor']['config']['get']('revisionHistory'))throw new _0x35e33c('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x230625=>this['_showRevisionViewer']({..._0x230625,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x4aaf77=>this['_closeRevisionViewer'](_0x4aaf77)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x5ca968=>this['_restoreRevision'](_0x5ca968)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x43bd5b){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x43bd5b;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x2742e1){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x2742e1);}['getRevision'](_0xe86a0c){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0xe86a0c);}['getRevisions'](_0x1616c4){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x1616c4||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x34f107=this['editor'],_0x1f8c2a=_0x4b66a4(_0x34f107,d),_0x542109=_0x34f107['plugins']['get']('RevisionTracker'),_0x209c8=_0x34f107['plugins']['get']('Users')['users'];return _0x1f8c2a['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x1f8c2a['lazyRoots'],(_0x1f8c2a['plugins']['push'](at,l,u,class extends _0x54fe5b{static get['requires'](){return[l,'Users'];}['init'](){const _0x3afd8b=this['editor']['plugins']['get']('Users');for(const _0x22bcc9 of _0x209c8)_0x22bcc9['isAnonymous']||_0x3afd8b['getUser'](_0x22bcc9['id'])||_0x3afd8b['addUser'](_0x22bcc9);const _0x114e5b=_0x542109['repository']['getRevisions']();let _0x3c42ca=null;const _0x509e2d=this['editor']['plugins']['get']('RevisionViewer');_0x509e2d['adapter']=_0x542109['adapter'],_0x509e2d['bind']('isEnabled')['to'](_0x542109),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x34f107,'isReadOnly',_0x598e31=>!_0x598e31);for(const _0x4255da of _0x114e5b){const _0xe0a160=null===_0x4255da['creator'];if(_0xe0a160&&_0x4255da['toVersion']===_0x4255da['fromVersion'])continue;const _0x585437=_0x4255da['toJSON']();_0x509e2d['addRevisionData'](_0x585437,(_0x28363f,_0x9018d8,_0x1a6dac)=>{if(_0xe0a160){if(_0x3c42ca)_0x3c42ca['_update'](_0x28363f,_0x9018d8);else{if(!_0x9018d8){const _0x2a3634=_0x1a6dac['toJSON']();_0x2a3634['id']=_0x272469(),_0x542109['saveRevision'](_0x2a3634,_0x1a6dac['toVersion'])['then'](_0x169076=>{_0x3c42ca=_0x169076;});}}}else _0x4255da['_update'](_0x28363f,_0x9018d8);});}}},f),_0x1f8c2a);}['_enhanceShowRevisionViewerCallback'](){const _0x1c4968=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x57df04=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x282dec=this['editor']['plugins']['get']('Autosave');await _0x282dec['save']();}else await _0x57df04['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x1cb060=this['editor']['plugins']['get']('Dialog');_0x1cb060['isOpen']&&_0x1cb060['hide']();}const _0x55d225=this['_getRevisionViewerEditorConfig']();return _0x1c4968(_0x55d225)['then'](_0x90e99=>{return(this['_viewerEditor']=_0x90e99,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),(this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']='none'),_0x90e99);})['catch'](_0x48351b=>(console['error'](_0x48351b),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x4ca630=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x4ca630(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x35f6f0=this['editor']['plugins']['get']('Annotations');_0x35f6f0['refreshVisibility'](),_0x35f6f0['refreshPositioning']();}})));}['_showRevisionViewer'](_0x418c0b){const _0x2d0243=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x54d967=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x157e97=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return m['create'](_0x157e97,_0x418c0b)['then'](_0x42f37f=>(_0x54d967['style']['display']='block',_0x2d0243['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x42f37f));}['_closeRevisionViewer'](_0x20dc04){const _0x2592c1=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x2592c1['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x20dc04['destroy']();}async['_restoreRevision'](_0x54a396){const _0x586026=this['editor'],_0x30f080=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x2128f3=_0x586026['plugins']['get']('RevisionTracker'),_0x2f876f=_0x586026['plugins']['get']('RevisionHistoryUtils'),_0xd9678f=_0x30f080['repository']['getRevision'](_0x54a396);let _0x2d2057,_0x1529d5,_0x510b96;try{await _0x2f876f['loadRevisionData'](_0xd9678f,this['adapter']),_0x2d2057=_0x2f876f['getRevisionDocumentData'](_0xd9678f),_0x1529d5=_0x2f876f['getRevisionRootsAttributes'](_0xd9678f);}catch(_0x5089dc){return void console['error'](_0x5089dc);}_0x586026['model']['change'](_0x596b54=>{for(const _0x5e846d of Array['from'](_0x586026['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x596b54['removeMarker'](_0x5e846d);}),_0x30f080['isReady']=!0x1,_0x586026['model']['enqueueChange'](_0xc802e5=>{_0xc802e5['setSelection'](null),_0xc802e5['removeSelectionAttribute'](_0x586026['model']['document']['selection']['getAttributeKeys']());const _0x736d7b=Object['keys'](_0x2d2057);for(const _0x18561b of _0x586026['model']['document']['roots'])'$graveyard'!=_0x18561b['rootName']&&_0x18561b['isAttached']()&&!_0x736d7b['includes'](_0x18561b['rootName'])&&_0xc802e5['detachRoot'](_0x18561b);for(const _0x21d076 of _0x736d7b){let _0x285f5a=_0x586026['model']['document']['getRoot'](_0x21d076);_0x285f5a&&_0x285f5a['isAttached']()||(_0x285f5a=_0xc802e5['addRoot'](_0x21d076));const _0xc3d62d=_0x1529d5[_0x21d076],_0x12168b=Object['keys'](_0xc3d62d),_0x42efbb=_0x2d2057[_0x21d076];for(const _0x2d7f71 of _0x285f5a['getAttributeKeys']())_0x12168b['includes'](_0x2d7f71)||_0xc802e5['removeAttribute'](_0x2d7f71,_0x285f5a);for(const _0x11d5d3 of _0x12168b)_0xc802e5['setAttribute'](_0x11d5d3,_0x1529d5[_0x21d076][_0x11d5d3],_0x285f5a);_0xc802e5['remove'](_0xc802e5['createRangeIn'](_0x285f5a)),_0xc802e5['insert'](_0x586026['data']['parse'](_0x42efbb,_0x285f5a),_0x285f5a,0x0);}});const _0x542ad0=R(_0x586026['locale'],'Restored');if(_0xd9678f['name'])_0x510b96=-0x1==_0xd9678f['name']['indexOf'](_0x542ad0)?_0x542ad0+':\x20'+_0xd9678f['name']:_0xd9678f['name'];else _0x510b96=_0x542ad0+':\x20'+(_0xd9678f['createdAt']['toLocaleDateString'](_0x586026['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0xd9678f['createdAt']['toLocaleTimeString'](_0x586026['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x2128f3['saveRevision']({'name':_0x510b96}),_0x30f080['isReady']=!0x0,_0x586026['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{nt as RestoreRevisionCommand,I as Revision,ht as RevisionHistory,v as RevisionHistoryUI,$ as RevisionHistoryUtils,h as RevisionTracker,l as RevisionViewer,m as RevisionViewerEditor,ji as RevisionViewerLoadingOverlay,u as RevisionViewerUI,S as RevisionsRepository,f as RevisionsSidebar,ot as ShowChangeCommand};
29
+ at();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l];}constructor(_0x3f3544){super(_0x3f3544),this['_revisionViewer']=_0x3f3544['plugins']['get'](l),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0xa263cc=this['_revisionsRepository']['_revisions'],_0x57aacd=this['_createRevisionActions'](),_0x2c7000=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new di(this['editor']['locale'],_0xa263cc,_0x57aacd,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',(_0x451e9d,_0x48d509)=>{_0x48d509['revisionViews']['on']('add',(_0x2f58ba,_0x3651da)=>{_0x3651da['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)),_0x2c7000['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x4d92bd=this['_revisionsRepository']['getRevision'](0x0);if(_0x4d92bd){const _0x438eca=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x4d92bd['id']);this['_revisionViewer']['compare'](_0x4d92bd,_0x438eca);}}['_handleRevisionSelected'](_0x2d67d7,_0x2e882c){const _0x59d4de=this['_revisionsRepository']['getRevision'](_0x2e882c['id']),_0x6259de=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x59d4de['id']);this['_revisionViewer']['compare'](_0x59d4de,_0x6259de);}['_handleRevisionSetName'](_0x50416b,_0x39a3f3){this['_revisionsRepository']['getRevision'](_0x39a3f3['id'])['setName'](_0x39a3f3['name']);}['_handleDiffChange'](_0x475b16,_0x1c632f,_0x1bb18e){const _0x875e38=this['_revisionsRepository']['getRevisionsInDiff'](_0x1bb18e);_0x875e38['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x875e38),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x875e38[0x0]));}['_createRevisionActions'](){const _0x278c8c=this['editor'],_0x25a927=f['availableRevisionActions'],_0x409ed9=_0x278c8c['config']['get']('revisionHistory.revisionActions')||f['defaultRevisionActions'];if(_0x409ed9['length'])return _0x409ed9['map'](_0x7f9e22=>{const _0x1a3482='string'==typeof _0x7f9e22?Object['assign']({},_0x25a927[_0x7f9e22]):_0x7f9e22;return _0x1a3482['action']=_0x1a3482['action']['bind'](this,_0x278c8c),_0x1a3482['isVisible']&&(_0x1a3482['isVisible']=_0x1a3482['isVisible']['bind'](this,_0x278c8c)),_0x1a3482;});}}function at(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x41e6d6},_0x52a00b)=>{const _0xa7f02f=_0x41e6d6['get'](l),_0x581cf4=_0xa7f02f['repository'];let _0x4ee36e=_0xa7f02f['diff']['newRevisionId'],_0x5a3acc=_0x52a00b['id'];_0x581cf4['getIndex'](_0x4ee36e)>_0x581cf4['getIndex'](_0x5a3acc)&&([_0x4ee36e,_0x5a3acc]=[_0x5a3acc,_0x4ee36e]),_0xa7f02f['compare'](_0x4ee36e,_0x5a3acc);},'isVisible':({plugins:_0x3de01a},_0x11107c)=>{const _0x3cbfad=_0x3de01a['get'](l);return!(_0x3cbfad['repository']['getRevisionsInDiff'](_0x3cbfad['diff'])['length']>0x2)&&!_0x11107c['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x4005fb,{id:_0x14652f})=>{_0x4005fb['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x14652f);},'isVisible':({plugins:_0x42ee17},_0x597904)=>!!_0x42ee17['get'](l)['repository']['getLaterVisibleRevision'](_0x597904['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x58f6bd},{id:_0x7143fb,revisionNameView:_0x3c58b0})=>{const _0x2cdc21=_0x58f6bd['get'](l),_0x1fbb22=_0x2cdc21['repository']['getEarlierVisibleRevision'](_0x7143fb);_0x2cdc21['compare'](_0x7143fb,_0x1fbb22),_0x3c58b0['focus'](),_0x3c58b0['fieldView']['select']();}}};}class Z extends tt{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x2afee4,_0x2820c3){super(_0x2afee4),this['_view']=_0x2820c3,this['_toolbarConfig']=st(_0x2afee4['config']['get']('toolbar')),this['_elementReplacer']=new it();}get['element'](){return this['view']['element'];}['init'](_0x8ff406){const _0x261578=this['editor'],_0x31b2f5=this['view'],_0x26a67d=_0x261578['editing']['view'],_0x526e23=_0x31b2f5['editable'],_0x330225=_0x26a67d['document']['getRoot']();_0x526e23['name']=_0x330225['rootName'],_0x31b2f5['render']();const _0x43247a=_0x526e23['element'];this['setEditableElement'](_0x526e23['name'],_0x43247a),_0x31b2f5['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x26a67d['attachDomRoot'](_0x43247a),this['_elementReplacer']['replace'](_0x8ff406,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x18c25d=this['view'],_0x2ef974=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x2ef974['detachDomRoot'](_0x18c25d['editable']['name']),_0x18c25d['destroy']();}['_initToolbar'](){const _0x509d88=this['view'];_0x509d88['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x509d88['stickyPanel']['limiterElement']=_0x509d88['element'],_0x509d88['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x4f2a03})=>_0x4f2a03),_0x509d88['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x509d88['toolbar']);}}class ii extends _0x59fb3d{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x7e4b0e,_0x567a06,_0x4cb0f0={}){super(_0x7e4b0e),this['stickyPanel']=new _0x3cd25a(_0x7e4b0e),this['toolbar']=new _0x43bb6a(_0x7e4b0e,{'shouldGroupWhenFull':_0x4cb0f0['shouldToolbarGroupWhenFull']}),this['_editable']=new te(_0x7e4b0e,_0x567a06);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class m extends/* #__PURE__ -- @preserve */
30
+ _0x58d9e3(_0x2bf74e){['_ui'];get['ui'](){return this['_ui'];}constructor(_0xe9b430,_0x443159){super(_0x443159),this['sourceElement']=_0xe9b430,this['model']['document']['createRoot']();const _0x159e79=new ii(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Z(this,_0x159e79);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x46cd29,_0x190f14){const _0x2ae2f5=new this(_0x46cd29,_0x190f14);return await _0x2ae2f5['initPlugins'](),await _0x2ae2f5['ui']['init'](_0x46cd29),await _0x2ae2f5['data']['init'](_0x2ae2f5['config']['get']('initialData')||''),_0x2ae2f5['fire']('ready'),_0x2ae2f5;}}const d=['RevisionHistoryUI','RestrictedEditingMode'];class ht extends _0x279b1f{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xe16769){function _0x2d7c96(_0x2f2c35){return _0x2f2c35['map'](_0x4f3ac6=>String['fromCharCode'](_0x4f3ac6))['join']('');}super(_0xe16769),this['result']='end',_0xe16769[_0x2d7c96([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2d7c96([0x76,0x69,0x65,0x77])][_0x2d7c96([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2d7c96([0x61,0x75,0x74,0x6f]),_0xe16769[_0x2d7c96([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x2d7c96([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2d7c96([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x2d7c96([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x2d7c96([0x6f,0x6b])});}}class ct extends _0x279b1f{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h,v];}constructor(_0xac1e37){if(super(_0xac1e37),!this['editor']['config']['get']('revisionHistory'))throw new _0x3a0f06('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x136ff1=>this['_showRevisionViewer']({..._0x136ff1,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0xcf6aef=>this['_closeRevisionViewer'](_0xcf6aef)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x1087ea=>this['_restoreRevision'](_0x1087ea)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x150bf3){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x150bf3;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x17e894){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x17e894);}['getRevision'](_0x1d99bb){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x1d99bb);}['getRevisions'](_0x1e9391){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x1e9391||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x454079=this['editor'],_0x47e98d=_0x5c74eb(_0x454079,d),_0x263459=_0x454079['plugins']['get']('RevisionTracker'),_0x371fd8=_0x454079['plugins']['get']('Users')['users'];return _0x47e98d['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x47e98d['lazyRoots'],(_0x47e98d['plugins']['push'](ht,l,u,class extends _0x279b1f{static get['requires'](){return[l,'Users'];}['init'](){const _0x2db4f7=this['editor']['plugins']['get']('Users');for(const _0x21200c of _0x371fd8)_0x21200c['isAnonymous']||_0x2db4f7['getUser'](_0x21200c['id'])||_0x2db4f7['addUser'](_0x21200c);const _0x1625b0=_0x263459['repository']['getRevisions']();let _0x1bcf1e=null;const _0xff0a54=this['editor']['plugins']['get']('RevisionViewer');_0xff0a54['adapter']=_0x263459['adapter'],_0xff0a54['bind']('isEnabled')['to'](_0x263459),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x454079,'isReadOnly',_0x465475=>!_0x465475);for(const _0x300c0a of _0x1625b0){const _0x44a110=null===_0x300c0a['creator'];if(_0x44a110&&_0x300c0a['toVersion']===_0x300c0a['fromVersion'])continue;const _0x6e3de0=_0x300c0a['toJSON']();_0xff0a54['addRevisionData'](_0x6e3de0,(_0x2732c8,_0xefd4a,_0x2560cd)=>{if(_0x44a110){if(_0x1bcf1e)_0x1bcf1e['_update'](_0x2732c8,_0xefd4a);else{if(!_0xefd4a){const _0x36563e=_0x2560cd['toJSON']();_0x36563e['id']=_0x36f224(),_0x263459['saveRevision'](_0x36563e,_0x2560cd['toVersion'])['then'](_0x640d35=>{_0x1bcf1e=_0x640d35;});}}}else _0x300c0a['_update'](_0x2732c8,_0xefd4a);});}}},f),_0x47e98d);}['_enhanceShowRevisionViewerCallback'](){const _0x2eb120=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x12e2e3=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x28e1ad=this['editor']['plugins']['get']('Autosave');await _0x28e1ad['save']();}else await _0x12e2e3['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x11b4f6=this['editor']['plugins']['get']('Dialog');_0x11b4f6['isOpen']&&_0x11b4f6['hide']();}const _0x4f6e9d=this['_getRevisionViewerEditorConfig']();return _0x2eb120(_0x4f6e9d)['then'](_0x7f0fa=>{return(this['_viewerEditor']=_0x7f0fa,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),(this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']='none'),_0x7f0fa);})['catch'](_0x34f910=>(console['error'](_0x34f910),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x19f4d6=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x19f4d6(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x5a1ebf=this['editor']['plugins']['get']('Annotations');_0x5a1ebf['refreshVisibility'](),_0x5a1ebf['refreshPositioning']();}})));}['_showRevisionViewer'](_0x58f5bf){const _0x5c8e2b=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x15e2a2=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x316a90=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return m['create'](_0x316a90,_0x58f5bf)['then'](_0x3bbf6c=>(_0x15e2a2['style']['display']='block',_0x5c8e2b['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x3bbf6c));}['_closeRevisionViewer'](_0x245bed){const _0x18ae86=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x18ae86['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x245bed['destroy']();}async['_restoreRevision'](_0x2ac157){const _0x2f66dc=this['editor'],_0x5359ee=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x547aff=_0x2f66dc['plugins']['get']('RevisionTracker'),_0x29e468=_0x2f66dc['plugins']['get']('RevisionHistoryUtils'),_0x1e96de=_0x5359ee['repository']['getRevision'](_0x2ac157);let _0xc35d7,_0x48426c,_0x31b953;try{await _0x29e468['loadRevisionData'](_0x1e96de,this['adapter']),_0xc35d7=_0x29e468['getRevisionDocumentData'](_0x1e96de),_0x48426c=_0x29e468['getRevisionRootsAttributes'](_0x1e96de);}catch(_0x25f8db){return void console['error'](_0x25f8db);}_0x2f66dc['model']['change'](_0x10c59a=>{for(const _0x43a005 of Array['from'](_0x2f66dc['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x10c59a['removeMarker'](_0x43a005);}),_0x5359ee['isReady']=!0x1,_0x2f66dc['model']['enqueueChange'](_0x16e225=>{_0x16e225['setSelection'](null),_0x16e225['removeSelectionAttribute'](_0x2f66dc['model']['document']['selection']['getAttributeKeys']());const _0x1bdf22=Object['keys'](_0xc35d7);for(const _0x1c567a of _0x2f66dc['model']['document']['roots'])'$graveyard'!=_0x1c567a['rootName']&&_0x1c567a['isAttached']()&&!_0x1bdf22['includes'](_0x1c567a['rootName'])&&_0x16e225['detachRoot'](_0x1c567a);for(const _0x28d1a0 of _0x1bdf22){let _0x3c26ca=_0x2f66dc['model']['document']['getRoot'](_0x28d1a0);_0x3c26ca&&_0x3c26ca['isAttached']()||(_0x3c26ca=_0x16e225['addRoot'](_0x28d1a0));const _0x3743c9=_0x48426c[_0x28d1a0],_0x350d94=Object['keys'](_0x3743c9),_0xd2967a=_0xc35d7[_0x28d1a0];for(const _0x24790c of _0x3c26ca['getAttributeKeys']())_0x350d94['includes'](_0x24790c)||_0x16e225['removeAttribute'](_0x24790c,_0x3c26ca);for(const _0x1d9bb8 of _0x350d94)_0x16e225['setAttribute'](_0x1d9bb8,_0x48426c[_0x28d1a0][_0x1d9bb8],_0x3c26ca);_0x16e225['remove'](_0x16e225['createRangeIn'](_0x3c26ca)),_0x16e225['insert'](_0x2f66dc['data']['parse'](_0xd2967a,_0x3c26ca),_0x3c26ca,0x0);}});const _0x518173=R(_0x2f66dc['locale'],'Restored');if(_0x1e96de['name'])_0x31b953=-0x1==_0x1e96de['name']['indexOf'](_0x518173)?_0x518173+':\x20'+_0x1e96de['name']:_0x1e96de['name'];else _0x31b953=_0x518173+':\x20'+(_0x1e96de['createdAt']['toLocaleDateString'](_0x2f66dc['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x1e96de['createdAt']['toLocaleTimeString'](_0x2f66dc['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x547aff['saveRevision']({'name':_0x31b953}),_0x5359ee['isReady']=!0x0,_0x2f66dc['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{nt as RestoreRevisionCommand,I as Revision,ct as RevisionHistory,v as RevisionHistoryUI,$ as RevisionHistoryUtils,h as RevisionTracker,l as RevisionViewer,m as RevisionViewerEditor,ji as RevisionViewerLoadingOverlay,u as RevisionViewerUI,S as RevisionsRepository,f as RevisionsSidebar,rt as ShowChangeCommand};