@ckeditor/ckeditor5-revision-history 45.0.0-alpha.5 → 45.0.0-alpha.6

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 +6 -6
  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 +1 -1
  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,10 +20,10 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{ObservableMixin as _0x3660f6,uid as _0x1fadd2,Collection as _0x1d0d98,logWarning as _0x29b35b,FocusTracker as _0xbc196c,KeystrokeHandler as _0x4c2f01,scrollViewportToShowTarget as _0x2015be,ResizeObserver as at,ElementReplacer as ot,CKEditorError as _0x3e2bd8}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x344f71,set as _0x17dcb5,unset as _0x2c6ad4,isEqual as _0x18b03f}from'es-toolkit/compat';import{Plugin as _0x365de9,PendingActions as _0xb7f2c2,Command as _0x4ef64c,ElementApiMixin as _0x294adf,Editor as _0x57ae8d}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x5b69eb,getMarkerDomElement as _0x5aa4e2,ConfirmMixin as _0x36e815,sanitizeEditorConfig as _0x4b6ff5}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0x403b02,ViewAttributeElement as _0x4383c7,ViewEmptyElement as _0x53b123,ViewRawElement as _0x155b85,ViewUIElement as _0x322b8c,ViewDocumentFragment as _0xd22d4b,ViewText as _0x10e066,ViewElement as _0x6132e9,Element as ut,Range as ft,Position as vt,DocumentFragment as gt,Text as mt}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x4ad913,IconChevronUp as _0x1df1ea,IconChevronDown as _0x3a90be,IconUndo as _0x2dd350,IconUser as _0x401b4b,IconThreeVerticalDots as _0x1036e6}from'@ckeditor/ckeditor5-icons/dist/index.js';import{View as _0x17ef9f,injectCssTransitionDisabler as ts,submitHandler as _0x5ae7d3,LabeledFieldView as nt,createLabeledInputText as ti,createDropdown as _0x5b51c1,ListView as _0x4e5243,ListItemView as te,ButtonView as _0x3e98f4,MenuBarMenuView as _0x19d5ae,MenuBarMenuListView as _0x347b6d,MenuBarMenuListItemView as _0x3aa705,MenuBarMenuListItemButtonView as _0x529e63,ContextualBalloon as _0x5923f4,ToolbarSeparatorView as _0x32038c,IconView as _0x340d0a,addListToDropdown as _0xd77a24,ViewModel as to,EditorUI as st,normalizeToolbarConfig as et,BoxedEditorUIView as rt,StickyPanelView as ht,ToolbarView as dt,InlineEditableUIView as ct}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x4ceb2e}from'luxon';class h extends/* #__PURE__ -- @preserve */
24
- _0x3660f6(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x2769fd){super(),this['id']=_0x2769fd['id']||_0x1fadd2(),this['creator']=_0x2769fd['creator']||null,this['authors']=_0x2769fd['authors']||[],this['diffData']=_0x2769fd['diffData']||null,this['toVersion']=_0x2769fd['toVersion']||0x0,this['fromVersion']=_0x2769fd['fromVersion']||0x0,this['set']('name',_0x2769fd['name']||''),this['set']('createdAt',_0x2769fd['createdAt']||new Date()),this['set']('attributes',_0x2769fd['attributes']||{});}['setName'](_0x500076){this['_update']({'name':_0x500076});}['setAttribute'](_0x316210,_0x363575){const _0x2dd6c3=_0x344f71(this['attributes']);_0x17dcb5(_0x2dd6c3,_0x316210,_0x363575),this['_update']({'attributes':_0x2dd6c3});}['removeAttribute'](_0x5d1c0d){const _0x32c718=_0x344f71(this['attributes']);_0x2c6ad4(_0x32c718,_0x5d1c0d),this['_update']({'attributes':_0x32c718});}['_update'](_0x2c0c30,_0x2b40b9=!0x1){let _0xf48ba=!0x1;const _0xf364bd={'id':this['id']},_0xb6bec5=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x374b98 of _0xb6bec5){const _0x411d10=_0x2c0c30[_0x374b98];void 0x0!==_0x411d10&&_0x411d10!==this[_0x374b98]&&(this[_0x374b98]=_0x411d10,_0xf364bd[_0x374b98]=_0x411d10,_0xf48ba=!0x0);}_0xf48ba&&(_0xf364bd['authors']&&(_0xf364bd['authorsIds']=_0xf364bd['authors']['map'](_0x5891b4=>_0x5891b4['id']),delete _0xf364bd['authors']),this['fire']('_update',_0xf364bd,_0x2b40b9));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x21a154=>_0x21a154['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class I extends _0x365de9{['_revisions'];static get['requires'](){return[_0x5b69eb];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x2319b7){super(_0x2319b7),this['_revisions']=new _0x1d0d98();}['afterInit'](){!async function(_0x3d5cc3){const _0xf4d799=_0x367ba0([0x68,0x30,0x4a,0x72,0x53,0x6a,0x6d,0x45,0x35,0x56,0x57,0x4f,0x6f,0x70,0x79,0x52,0x48,0x37,0x39,0x6e,0x47,0x6c,0x71,0x4e,0x63,0x77,0x69,0x62,0x43,0x46,0x5a,0x51,0x34,0x66,0x4d,0x61,0x49,0x38,0x78,0x31,0x7a,0x76,0x64,0x55,0x4c,0x41,0x73,0x59,0x33,0x36,0x75,0x44,0x58,0x65,0x67,0x6b,0x54,0x32,0x50,0x42,0x4b,0x74]),_0x4f0dea=0xeb829,_0x3b6b52=0x3f58798f,_0x3c94c1=0x3f5f1a3f^_0x3b6b52,_0x14d0ac=window[_0x367ba0([0x44,0x61,0x74,0x65])][_0x367ba0([0x6e,0x6f,0x77])](),_0x5432a3=_0x3d5cc3[_0x367ba0([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x307170=new window[(_0x367ba0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x56b7a9=>{_0x5432a3[_0x367ba0([0x6f,0x6e,0x63,0x65])](_0x367ba0([0x72,0x65,0x61,0x64,0x79]),_0x56b7a9);}),_0x32aa0a={[_0x367ba0([0x6b,0x74,0x79])]:_0x367ba0([0x45,0x43]),[_0x367ba0([0x75,0x73,0x65])]:_0x367ba0([0x73,0x69,0x67]),[_0x367ba0([0x63,0x72,0x76])]:_0x367ba0([0x50,0x2d,0x32,0x35,0x36]),[_0x367ba0([0x78])]:_0x367ba0([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]),[_0x367ba0([0x79])]:_0x367ba0([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]),[_0x367ba0([0x61,0x6c,0x67])]:_0x367ba0([0x45,0x53,0x32,0x35,0x36])},_0x110b58=_0x5432a3[_0x367ba0([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x367ba0([0x67,0x65,0x74])](_0x367ba0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3339d9(){let _0x2c7746,_0x58ecaa=null,_0x4d0743=null;try{if(_0x110b58==_0x367ba0([0x47,0x50,0x4c]))return _0x367ba0([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2c7746=_0x2de8c3(),!_0x2c7746)return _0x367ba0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2c7746[_0x367ba0([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x4d0743=_0x4d9408(_0x2c7746[_0x367ba0([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2c7746[_0x367ba0([0x6a,0x74,0x69])])),await _0x3b37e2()?_0x44425e()?_0x354d4e()?_0x367ba0([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0xa0ee43()?(_0x2c7746[_0x367ba0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x367ba0([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x58ecaa=_0x2fbde8(_0x367ba0([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2c7746[_0x367ba0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x367ba0([0x74,0x72,0x69,0x61,0x6c])&&(_0x58ecaa=_0x2fbde8(_0x367ba0([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x122b58()):_0x367ba0([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x367ba0([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x367ba0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x5483a6){return _0x367ba0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x354d4e(){const _0x28c844=[_0x367ba0([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x367ba0([0x74,0x72,0x69,0x61,0x6c])][_0x367ba0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2c7746[_0x367ba0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x14d0ac/0x3e8:0xe10*_0x3c94c1;return _0x2c7746[_0x367ba0([0x65,0x78,0x70])]<_0x28c844;}function _0x44425e(){const _0x25d0a8=_0x2c7746[_0x367ba0([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x25d0a8)return!0x1;if(_0x25d0a8[_0x367ba0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x367ba0([0x2a])))return!0x0;if(_0x25d0a8[_0x367ba0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x367ba0([0x52,0x48])))return!0x0;if(_0x25d0a8[_0x367ba0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x367ba0([0x52,0x52,0x48]))){if(_0x1d9d68())return!0x0;if(_0x56777d()||_0x4dbe18())return!0x0;}return!0x1;}function _0xa0ee43(){const _0x5de64b=_0x2c7746[_0x367ba0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x5de64b||0x0==_0x5de64b[_0x367ba0([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2b078c}=new URL(window[_0x367ba0([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x5de64b[_0x367ba0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2b078c))return!0x0;const _0x17326e=_0x2b078c[_0x367ba0([0x73,0x70,0x6c,0x69,0x74])](_0x367ba0([0x2e]));return _0x5de64b[_0x367ba0([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4f9492=>_0x4f9492[_0x367ba0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x367ba0([0x2a])))[_0x367ba0([0x6d,0x61,0x70])](_0x1da743=>_0x1da743[_0x367ba0([0x73,0x70,0x6c,0x69,0x74])](_0x367ba0([0x2e])))[_0x367ba0([0x73,0x6f,0x6d,0x65])](_0x1ff259=>_0x17326e[_0x367ba0([0x65,0x76,0x65,0x72,0x79])]((_0x138947,_0x47d8a3)=>_0x1ff259[_0x47d8a3]===_0x138947||_0x1ff259[_0x47d8a3]===_0x367ba0([0x2a])));}function _0x122b58(){return _0x58ecaa&&_0x4d0743?new window[(_0x367ba0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x345a1d,_0x2623c5)=>{_0x58ecaa[_0x367ba0([0x74,0x68,0x65,0x6e])](_0x345a1d,_0x2623c5),_0x4d0743[_0x367ba0([0x74,0x68,0x65,0x6e])](_0x2f6531=>{_0x2f6531!=_0x367ba0([0x56,0x61,0x6c,0x69,0x64])&&_0x345a1d(_0x2f6531);},_0x2623c5);}):_0x58ecaa||_0x4d0743||_0x367ba0([0x56,0x61,0x6c,0x69,0x64]);}}function _0x4d9408(_0x6b1a89,_0x3ece1a){return new window[(_0x367ba0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1ee1c1=>{if(_0x26f1f3())return _0x1ee1c1(_0x367ba0([0x56,0x61,0x6c,0x69,0x64]));_0x467108(),_0x5432a3[_0x367ba0([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x367ba0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x39d6c7=!0x1;const _0x237417=_0x1fadd2();function _0x48a07b(_0x54005b){return!!_0x54005b&&(typeof _0x54005b===_0x367ba0([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x54005b===_0x367ba0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x54005b[_0x367ba0([0x74,0x68,0x65,0x6e])]===_0x367ba0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x54005b[_0x367ba0([0x63,0x61,0x74,0x63,0x68])]===_0x367ba0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x217065(_0xb10ab9){_0x532ee9(_0xb10ab9)[_0x367ba0([0x74,0x68,0x65,0x6e])](_0x25b8b3=>{if(!_0x25b8b3||_0x25b8b3[_0x367ba0([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x367ba0([0x6f,0x6b]))return _0x367ba0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x8a25b0(_0x40d879(_0x237417+_0x3ece1a))!=_0x25b8b3[_0x367ba0([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x367ba0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x367ba0([0x56,0x61,0x6c,0x69,0x64]);})[_0x367ba0([0x74,0x68,0x65,0x6e])](_0x5719e0=>(_0xbd76cf(),_0x5719e0),()=>{const _0x13cb97=_0x3fab3e();return null==_0x13cb97?(_0xbd76cf(),_0x367ba0([0x56,0x61,0x6c,0x69,0x64])):_0x367ba0(_0x14d0ac-_0x13cb97>(0x1b54fd8f^_0x3b6b52)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x367ba0([0x74,0x68,0x65,0x6e])](_0x1ee1c1)[_0x367ba0([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1ee1c1(_0x367ba0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x34c10f=0x3f6e970f^_0x3b6b52;function _0xbd76cf(){const _0x53c4e4=_0x367ba0([0x6c,0x6c,0x63,0x74,0x2d])+_0x8a25b0(_0x40d879(_0x6b1a89)),_0x18cd9f=_0x517654(_0x8a25b0(window[_0x367ba0([0x4d,0x61,0x74,0x68])][_0x367ba0([0x63,0x65,0x69,0x6c])](_0x14d0ac/_0x34c10f)));window[_0x367ba0([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x367ba0([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x53c4e4,_0x18cd9f);}function _0x3fab3e(){const _0x378524=_0x367ba0([0x6c,0x6c,0x63,0x74,0x2d])+_0x8a25b0(_0x40d879(_0x6b1a89)),_0x13f511=window[_0x367ba0([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x367ba0([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x378524);return _0x13f511?window[_0x367ba0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x517654(_0x13f511),0x10)*_0x34c10f:null;}function _0x532ee9(_0x50d28f){return new window[(_0x367ba0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x46356e,_0x4610e4)=>{_0x50d28f[_0x367ba0([0x74,0x68,0x65,0x6e])](_0x46356e,_0x4610e4),window[_0x367ba0([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4610e4,0x3f59ad4f^_0x3b6b52);});}}_0x5432a3[_0x367ba0([0x6f,0x6e])](_0x367ba0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1a4bed,_0x4a14b0)=>{if(_0x4a14b0[0x0]!=_0x6b1a89)return _0x1ee1c1(_0x367ba0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4a14b0[0x1]={..._0x4a14b0[0x1],[_0x367ba0([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x237417};},{[_0x367ba0([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x367ba0([0x68,0x69,0x67,0x68])}),_0x5432a3[_0x367ba0([0x6f,0x6e])](_0x367ba0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xea474c=>{_0x48a07b(_0xea474c[_0x367ba0([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x39d6c7=!0x0,_0x217065(_0xea474c[_0x367ba0([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x367ba0([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x367ba0([0x6c,0x6f,0x77])}),_0x307170[_0x367ba0([0x74,0x68,0x65,0x6e])](()=>{_0x39d6c7||_0x1ee1c1(_0x367ba0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x26f1f3(){return _0x5432a3[_0x367ba0([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x367ba0([0x76,0x69,0x65,0x77])][_0x367ba0([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x367ba0([0x61,0x75,0x74,0x6f]);}function _0x467108(){_0x5432a3[_0x367ba0([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x367ba0([0x76,0x69,0x65,0x77])][_0x367ba0([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x367ba0([0x61,0x75,0x74,0x6f]);}}function _0x2fbde8(_0x4631c9){const _0x1386f4=[new window[(_0x367ba0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3e25b2=>setTimeout(_0x3e25b2,0x3f514743^_0x3b6b52)),_0x307170[_0x367ba0([0x74,0x68,0x65,0x6e])](()=>new window[(_0x367ba0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3c1438=>{const _0x5496b1=0x3f587988^_0x3b6b52,_0x5a2fcf=_0x3d5cc3[_0x367ba0([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x588b72(){_0x5a2fcf[_0x367ba0([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x5496b1&&_0x3c1438();}_0x588b72(),_0x5a2fcf[_0x367ba0([0x6f,0x6e])](_0x367ba0([0x61,0x64,0x64]),_0x588b72);})),new window[(_0x367ba0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x245ac5=>{function _0x3726fd(){for(const _0x40b4f7 in window)if(window[_0x367ba0([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x367ba0([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x40b4f7))&&window[_0x40b4f7]==_0x4f0dea)return _0x245ac5();_0x5432a3[_0x367ba0([0x73,0x74,0x61,0x74,0x65])]!=_0x367ba0([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x367ba0([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3726fd,0x3f586a07^_0x3b6b52);}_0x53a660(_0x367ba0([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x3726fd();})];return window[_0x367ba0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x367ba0([0x72,0x61,0x63,0x65])](_0x1386f4)[_0x367ba0([0x74,0x68,0x65,0x6e])](()=>_0x4631c9);}async function _0x21bd4c(){if(await _0x307170,_0x53a660(_0x367ba0([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x137c07=_0x3d5cc3[_0x367ba0([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x390d41=_0x3d5cc3[_0x367ba0([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])](_0x137c07[_0x367ba0([0x69,0x64])]),_0x38a7d0=_0x4a81cd(_0x367ba0([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x38a7d0[_0x367ba0([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x137c07['id'],_0x390d41?_0x390d41['id']:null,!0x0),_0x38a7d0[_0x367ba0([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x367ba0([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x38a7d0[_0x367ba0([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x38a7d0[_0x367ba0([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x34a188,void(_0x38a7d0[_0x367ba0([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x34a188);}if(_0x53a660(_0x367ba0([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x375944=_0x4a81cd(_0x367ba0([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x375944[_0x367ba0([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x367ba0([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x375944[_0x367ba0([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x375944[_0x367ba0([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x34a188,_0x375944[_0x367ba0([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x34a188;}_0x5432a3[_0x367ba0([0x6d,0x6f,0x64,0x65,0x6c])][_0x367ba0([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x34a188,_0x5432a3[_0x367ba0([0x6d,0x6f,0x64,0x65,0x6c])][_0x367ba0([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x34a188,_0x5432a3[_0x367ba0([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x367ba0([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1d9d68(){return _0x53a660(_0x367ba0([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x4a81cd(_0x367ba0([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x367ba0([0x73,0x74,0x61,0x74,0x65])]==_0x367ba0([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x56777d(){return _0x53a660(_0x367ba0([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 _0x4dbe18(){return _0x53a660(_0x367ba0([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x20d975(_0x3d080a){const _0x35013f=_0x390d94();_0x5432a3[_0x35013f]=_0x367ba0([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])+_0x3d080a,_0x3d080a[_0x367ba0([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x367ba0([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x390d94()]=_0x4f0dea),_0x3d080a!=_0x367ba0([0x56,0x61,0x6c,0x69,0x64])&&_0x21bd4c();}function _0x390d94(){const _0x531c03=window[_0x367ba0([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x367ba0([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x367ba0([0x6e,0x6f,0x77])]())[_0x367ba0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x367ba0([0x2e]),'');let _0xaab533=_0x367ba0([0x68]);for(let _0x395d45=0x0;_0x395d45<_0x531c03[_0x367ba0([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x395d45+=0x2){let _0x192aff=window[_0x367ba0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x531c03[_0x367ba0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x395d45,_0x395d45+0x2));_0x192aff>=_0xf4d799[_0x367ba0([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x192aff-=_0xf4d799[_0x367ba0([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0xaab533+=_0xf4d799[_0x192aff];}return _0xaab533;}function _0x2de8c3(){const _0x12f95e=_0x110b58[_0x367ba0([0x73,0x70,0x6c,0x69,0x74])](_0x367ba0([0x2e]));if(0x3!=_0x12f95e[_0x367ba0([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x50f927(_0x12f95e[0x1]);function _0x50f927(_0x884e){const _0x188ce3=_0x117bdc(_0x884e);return _0x188ce3&&_0x5d0dfe()?_0x188ce3:null;function _0x5d0dfe(){const _0x3a1982=_0x188ce3[_0x367ba0([0x6a,0x74,0x69])],_0x7e1203=window[_0x367ba0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3a1982[_0x367ba0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3a1982[_0x367ba0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0xb45455={..._0x188ce3,[_0x367ba0([0x6a,0x74,0x69])]:_0x3a1982[_0x367ba0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x3a1982[_0x367ba0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0xb45455[_0x367ba0([0x76,0x63])],_0x40d879(_0xb45455)==_0x7e1203;}}}async function _0x3b37e2(){let _0x2c2bb7=!0x0;try{const _0x237b7b=_0x110b58[_0x367ba0([0x73,0x70,0x6c,0x69,0x74])](_0x367ba0([0x2e])),[_0xcff72f,_0x553583,_0x3d459d]=_0x237b7b;return _0x50871a(_0xcff72f),await _0x2dc5c6(_0xcff72f,_0x553583,_0x3d459d),_0x2c2bb7;}catch(_0x3aa4c7){return!0x1;}function _0x50871a(_0x4885e3){const _0x26aec4=_0x117bdc(_0x4885e3);_0x26aec4&&_0x26aec4[_0x367ba0([0x61,0x6c,0x67])]==_0x367ba0([0x45,0x53,0x32,0x35,0x36])||(_0x2c2bb7=!0x1);}async function _0x2dc5c6(_0x32db5f,_0x44e013,_0x1de624){const _0x3d206d=window[_0x367ba0([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x367ba0([0x66,0x72,0x6f,0x6d])](_0x3c1ccf(_0x1de624),_0x3dab8e=>_0x3dab8e[_0x367ba0([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x5d1f53=new window[(_0x367ba0([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x367ba0([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x32db5f+_0x367ba0([0x2e])+_0x44e013),_0x399ebd=window[_0x367ba0([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x367ba0([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x399ebd)return;const _0x497182=await _0x399ebd[_0x367ba0([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x367ba0([0x6a,0x77,0x6b]),_0x32aa0a,{[_0x367ba0([0x6e,0x61,0x6d,0x65])]:_0x367ba0([0x45,0x43,0x44,0x53,0x41]),[_0x367ba0([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x367ba0([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x367ba0([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x399ebd[_0x367ba0([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x367ba0([0x6e,0x61,0x6d,0x65])]:_0x367ba0([0x45,0x43,0x44,0x53,0x41]),[_0x367ba0([0x68,0x61,0x73,0x68])]:{[_0x367ba0([0x6e,0x61,0x6d,0x65])]:_0x367ba0([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x497182,_0x3d206d,_0x5d1f53)||(_0x2c2bb7=!0x1);}}function _0x117bdc(_0x311d85){return _0x311d85[_0x367ba0([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x367ba0([0x65,0x79]))?JSON[_0x367ba0([0x70,0x61,0x72,0x73,0x65])](_0x3c1ccf(_0x311d85)):null;}function _0x3c1ccf(_0x35cf25){return window[_0x367ba0([0x61,0x74,0x6f,0x62])](_0x35cf25[_0x367ba0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x367ba0([0x2b]))[_0x367ba0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x367ba0([0x2f])));}function _0x40d879(_0x1ea152){let _0x29eece=0x1505;function _0x58b5c0(_0xb3f793){for(let _0x4ff746=0x0;_0x4ff746<_0xb3f793[_0x367ba0([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4ff746++){const _0x26bc5b=_0xb3f793[_0x367ba0([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4ff746);_0x29eece=(_0x29eece<<0x5)+_0x29eece+_0x26bc5b,_0x29eece&=_0x29eece;}}function _0x52a91a(_0x4dd408){Array[_0x367ba0([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4dd408)?_0x4dd408[_0x367ba0([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x52a91a):_0x4dd408&&typeof _0x4dd408==_0x367ba0([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x367ba0([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4dd408)[_0x367ba0([0x73,0x6f,0x72,0x74])]()[_0x367ba0([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x3dde7a,_0x144ed3])=>{_0x58b5c0(_0x3dde7a),_0x52a91a(_0x144ed3);}):_0x58b5c0(window[_0x367ba0([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4dd408));}return _0x52a91a(_0x1ea152),_0x29eece>>>0x0;}function _0x8a25b0(_0x40e6df){return _0x40e6df[_0x367ba0([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x367ba0([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x367ba0([0x30]));}function _0x517654(_0xc839b3){return _0xc839b3[_0x367ba0([0x73,0x70,0x6c,0x69,0x74])]('')[_0x367ba0([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x367ba0([0x6a,0x6f,0x69,0x6e])]('');}function _0x53a660(_0x21c4e7){return _0x5432a3[_0x367ba0([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x367ba0([0x68,0x61,0x73])](_0x21c4e7);}function _0x4a81cd(_0x1da40c){return _0x5432a3[_0x367ba0([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x367ba0([0x67,0x65,0x74])](_0x1da40c);}function _0x34a188(){}function _0x367ba0(_0x4991e6){return _0x4991e6['map'](_0x81b65b=>String['fromCharCode'](_0x81b65b))['join']('');}_0x20d975(await _0x3339d9());}(this);}['createRevision'](_0x543e02){const _0x8ad09b=this['editor']['plugins']['get']('Users');return new h({'id':_0x543e02['id'],'name':_0x543e02['name'],'creator':_0x543e02['creatorId']?_0x8ad09b['getUser'](_0x543e02['creatorId']):null,'diffData':_0x543e02['diffData']||_0x543e02['data'],'authors':_0x543e02['authorsIds']['map'](_0x247a4a=>_0x8ad09b['getUser'](_0x247a4a)),'createdAt':new Date(_0x543e02['createdAt']),'attributes':_0x543e02['attributes'],'fromVersion':_0x543e02['fromVersion'],'toVersion':_0x543e02['toVersion']});}['addRevision'](_0x4ca36b,_0x22c465=0x0){this['_revisions']['add'](_0x4ca36b,_0x22c465);}['getRevision'](_0x5f1970){return this['_revisions']['get'](_0x5f1970);}['getRevisions'](_0x224d9c={'toJSON':!0x1}){const _0x599958=Array['from'](this['_revisions']);return _0x599958['reverse'](),_0x224d9c['toJSON']?_0x599958['map'](_0x2688fc=>_0x2688fc['toJSON']()):_0x599958;}['getIndex'](_0x505ef2){return this['_revisions']['getIndex'](_0x505ef2);}['getEarlierVisibleRevision'](_0x1a0240){const [,_0x2db6bc]=this['getRevisionsIterator'](_0x1a0240,{'direction':'earlier'});return _0x2db6bc;}['getLaterVisibleRevision'](_0x2fa1f1){const [,_0x17c9fd]=this['getRevisionsIterator'](_0x2fa1f1,{'direction':'later'});return _0x17c9fd;}['getRevisionsInDiff'](_0x56705e){const _0x4006de=[];for(const _0xe2e4d3 of this['getRevisionsIterator'](_0x56705e['newRevisionId']))if(_0x4006de['push'](_0xe2e4d3),_0xe2e4d3['id']===_0x56705e['oldRevisionId'])break;return _0x4006de;}*['getRevisionsIterator'](_0x2ad099,{direction:_0x5b137c='earlier',filter:_0x5ab93b=()=>!0x0}={}){const _0x2b163d='earlier'===_0x5b137c?0x1:-0x1;let _0x4e8c79=this['_revisions']['get'](_0x2ad099),_0x5de512=this['getIndex'](_0x4e8c79);for(yield _0x4e8c79;_0x4e8c79;){if(_0x5de512+=_0x2b163d,_0x4e8c79=this['getRevision'](_0x5de512),!_0x4e8c79)return;_0x5ab93b(_0x4e8c79)&&(yield _0x4e8c79);}}}class V extends _0x365de9{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x403b02,'c'],[_0x4383c7,'a'],[_0x53b123,'e'],[_0x155b85,'r'],[_0x322b8c,'u']]);['_typeCharToViewClass']=new Map([['c',_0x403b02],['a',_0x4383c7],['e',_0x53b123],['r',_0x155b85],['u',_0x322b8c]]);async['loadRevisionData'](_0x2fdee0,_0xa4f0b3){if(_0x2fdee0['diffData']||!_0xa4f0b3)return;const _0x1af947=this['editor']['config']['get']('collaboration.channelId'),_0xa2bdb7=await _0xa4f0b3['getRevision']({'channelId':_0x1af947,'revisionId':_0x2fdee0['id']});_0x2fdee0['diffData']=_0xa2bdb7['diffData'];}['getRevisionDocumentData'](_0x4e00cb){const _0x511612={};for(const _0x316c15 in _0x4e00cb['diffData']){if(_0x4e00cb['diffData'][_0x316c15]['attachChange']&&!_0x4e00cb['diffData'][_0x316c15]['attachChange']['isAttached'])continue;const _0x34e79a=this['_removeRevisionMarkers'](JSON['parse'](_0x4e00cb['diffData'][_0x316c15]['insertions'])),_0x5a2bc9=this['editor']['editing']['view']['document'],_0x51dd26=new _0xd22d4b(_0x5a2bc9,_0x34e79a['map'](_0x17ac78=>this['_getViewFromDiffObj'](_0x17ac78,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x511612[_0x316c15]=this['editor']['data']['processor']['toData'](_0x51dd26),this['editor']['data']['processor']['useFillerType']('default');}return _0x511612;}['getRevisionRootsAttributes'](_0x315b9b){const _0x3fd8cb={};for(const _0x3b25d3 in _0x315b9b['diffData'])_0x315b9b['diffData'][_0x3b25d3]['attachChange']&&!_0x315b9b['diffData'][_0x3b25d3]['attachChange']['isAttached']||(_0x3fd8cb[_0x3b25d3]=_0x315b9b['diffData'][_0x3b25d3]['attributesAfter']||{});return _0x3fd8cb;}['_getTypeCharForViewElement'](_0x1c8a2a){return this['_viewClassToTypeChar']['get'](_0x1c8a2a['constructor']);}['_getViewFromDiffObj'](_0x57fc2a,_0x1914c0){const _0x2ad6d2=this['editor']['editing']['view']['document'];if('string'==typeof _0x57fc2a)return new _0x10e066(_0x2ad6d2,_0x57fc2a);{let _0x2ce483,_0x131f25;_0x131f25='u'==_0x57fc2a['type']||'r'==_0x57fc2a['type']?[]:_0x57fc2a['children']['map'](_0x559c75=>this['_getViewFromDiffObj'](_0x559c75,_0x1914c0));const _0x7d6eb5=this['_typeCharToViewClass']['get'](_0x57fc2a['type'])||_0x6132e9,_0xae2d38=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x2ce483=new _0x7d6eb5(_0x2ad6d2,_0x57fc2a['name'],_0x57fc2a['attributes'],_0x131f25),'u'==_0x57fc2a['type']){const _0x6207a4=_0x57fc2a['children'][0x0];if(_0x2ce483['render']=function(_0x3ef134){const _0x3eb289=_0x3ef134['createElement']('div');return _0x3eb289['innerHTML']=_0x6207a4,_0x3eb289['childNodes'][0x0];},_0x1914c0){const _0x464df5=new _0xd22d4b(_0x2ad6d2);_0x464df5['_appendChild'](_0x2ce483);const _0x372e2f=Array['from'](_0xae2d38['viewChildrenToDom'](_0x464df5,{'bind':!0x1})),_0xe5912b=_0xae2d38['domDocument']['createElement']('div');_0xe5912b['append'](..._0x372e2f),_0x2ce483=Array['from'](_0xae2d38['domChildrenToView'](_0xe5912b))[0x0];}}else{if('r'==_0x57fc2a['type']){const _0x1a03f9=_0x57fc2a['children'][0x0];if(_0x2ce483['render']=function(_0x5a05c6){_0x5a05c6['innerHTML']=_0x1a03f9;},_0x1914c0){const _0x254ca8=new _0xd22d4b(_0x2ad6d2);_0x254ca8['_appendChild'](_0x2ce483);const _0x1d0bbb=Array['from'](_0xae2d38['viewChildrenToDom'](_0x254ca8,{'bind':!0x1})),_0x589db0=_0xae2d38['domDocument']['createElement']('div');_0x589db0['append'](..._0x1d0bbb);const _0x14fb62=Array['from'](_0xae2d38['domChildrenToView'](_0x589db0));_0x14fb62['length']>0x1?_0x2ce483['_appendChild'](_0x14fb62):_0x2ce483=_0x14fb62[0x0];}}}if(_0x57fc2a['customProperties']){for(const [_0x230ed4,_0x4afd63]of _0x57fc2a['customProperties'])_0x2ce483['_setCustomProperty'](_0x230ed4,_0x4afd63);}const _0x3abc58=_0x57fc2a['fillerOffset']||null;return _0x2ce483['getFillerOffset']=()=>_0x3abc58,_0x2ce483;}}['_makeModelFromViewString'](_0x73889b){const _0x216232=JSON['parse'](_0x73889b),_0x411340=this['editor']['editing']['view']['document'],_0x47f181=new _0xd22d4b(_0x411340,_0x216232['map'](_0xe31847=>this['_getViewFromDiffObj'](_0xe31847,!0x0)));return this['editor']['data']['toModel'](_0x47f181);}['_removeRevisionMarkers'](_0x24003d){return(_0x24003d=_0x24003d['filter'](_0x512509=>!_0x512509['name']||'revision-start'!==_0x512509['name']&&'revision-end'!==_0x512509['name']))['forEach'](_0x528bbd=>{'string'!=typeof _0x528bbd&&(_0x528bbd['children']=this['_removeRevisionMarkers'](_0x528bbd['children']),_0x528bbd['attributes']=_0x528bbd['attributes']['filter'](_0x28b956=>!_0x28b956[0x0]['startsWith']('data-revision-')));}),_0x24003d;}}function g(_0x58ef28,_0x4fe93d,_0xd1bffd){const t=_0x58ef28['t'];switch(_0x4fe93d){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'},_0xd1bffd);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0xd1bffd);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 u extends _0x365de9{['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[_0x5b69eb,I,V,_0xb7f2c2];}constructor(_0x490546){super(_0x490546),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new x(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x1ce8d4=_0x1fadd2();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x1ce8d4},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 _0x39c2c6=this['repository']['getRevision'](0x0),_0x1e79e2=_0x39c2c6&&null===_0x39c2c6['creator']?_0x39c2c6:null;if(this['_continueCurrentRevision']=!!_0x1e79e2&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0xd80478=this['_source']['getCurrentRevisionId'](),_0x42434f=this['repository']['getRevision'](_0xd80478);if(_0x42434f)this['_startingVersion']=_0x42434f['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x176e8c=this['_source']['history']['_operations']['find'](_0x202f3d=>!_0x202f3d['_isInit']),_0x276f0c=_0x176e8c?_0x176e8c['baseVersion']:this['_source']['history']['version'];_0x39c2c6?(_0x39c2c6['toVersion']<_0x276f0c&&_0x39c2c6['_update']({'toVersion':_0x276f0c}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x1e79e2['id'],this['_startingVersion']=_0x1e79e2['fromVersion']):(this['_startingVersion']=_0x39c2c6['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x276f0c,this['_continueCurrentRevision']=!0x1);}}else _0x1e79e2&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x1e79e2['toVersion'],this['editor']['model']['document']['history']['version']),_0x1e79e2['fromVersion']===_0x1e79e2['toVersion']?(0x0!==_0x1e79e2['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x1e79e2['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x1e79e2['id'],this['_startingVersion']=_0x1e79e2['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',_0x4cddde=>!_0x4cddde),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x2ae215=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x5bcce7;for(const _0x1898d8 in _0x2ae215){const _0x42e5fe=_0x1898d8,_0x524e13=_0x2ae215[_0x42e5fe];if('revisionHistoryLicenseKeyValid'==_0x524e13||'revisionHistoryLicenseKeyInvalid'==_0x524e13||'revisionHistoryLicenseKeyExpired'==_0x524e13||'revisionHistoryLicenseKeyDomainLimit'==_0x524e13||'revisionHistoryLicenseKeyNotAllowed'==_0x524e13||'revisionHistoryLicenseKeyEvaluationLimit'==_0x524e13||'revisionHistoryLicenseKeyTrialLimit'==_0x524e13||'revisionHistoryLicenseKeyUsageLimit'==_0x524e13){delete _0x2ae215[_0x42e5fe],_0x5bcce7=_0x524e13,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x5bcce7&&_0x2ae215['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x5bcce7&&_0x2ae215['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x5bcce7&&_0x2ae215['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x5bcce7&&_0x2ae215['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x5bcce7&&_0x2ae215['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x5bcce7&&_0x2ae215['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x5bcce7&&_0x2ae215['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x94f087=this['repository']['getRevision'](0x0),_0x1b4d61=await this['getRevisionDocumentData'](_0x94f087),_0x1f554b=await this['getRevisionRootsAttributes'](_0x94f087);this['_replaceEditorDataWithRevisionData'](_0x1b4d61,_0x1f554b);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x4c0d24){this['_source']=_0x4c0d24;}async['update'](){const _0x7eec8c=await this['_source']['getLatestVersion']();if(_0x7eec8c>this['currentRevision']['toVersion']){await this['_loadState']();const _0xa8e929=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x7eec8c});_0xa8e929['authors']=_0xa8e929['authorsIds']['map'](_0x1bfd58=>this['editor']['plugins']['get']('Users')['getUser'](_0x1bfd58)),this['currentRevision']['_update'](_0xa8e929);}}async['saveRevision'](_0x4cb4c3={},_0x449a62=null){const _0x4176c1=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x449a62>this['currentRevision']['toVersion']&&(_0x449a62=null),null===_0x449a62&&(_0x449a62=await this['_source']['getLatestVersion']());const _0x4bb22a=this['_getFromVersion'](_0x449a62),_0x5586f8=this['buildRevisionData']({'from':_0x4bb22a,'to':_0x449a62});if(this['currentRevision']['toVersion']<_0x449a62){const _0x21c678=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x449a62,'to':_0x449a62});_0x21c678['authors']=[],_0x21c678['authorsIds']=[],_0x21c678['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x21c678,!0x0),delete _0x21c678['authors'],_0x4176c1['push'](_0x21c678);}_0x4cb4c3['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x4cb4c3['name']=_0x4cb4c3['name']||null,_0x4cb4c3['id']=_0x4cb4c3['id']||_0x1fadd2(),_0x4cb4c3={..._0x4cb4c3,..._0x5586f8};const _0x4df6ad=this['addRevisionData'](_0x4cb4c3);_0x4176c1['push'](_0x4cb4c3);const _0x9a0ddc=this['repository']['getIndex'](_0x4df6ad);if(0x0!==_0x9a0ddc){const _0x2ea19c=this['repository']['getRevision'](_0x9a0ddc-0x1);if(_0x2ea19c['fromVersion']!==_0x449a62){const _0x38e2a8=this['_revisionDataBuilder']['getData'](_0x449a62,_0x2ea19c['toVersion']),_0x27fac7={'id':_0x2ea19c['id'],'diffData':_0x38e2a8['diffData'],'authorsIds':_0x38e2a8['authorsIds'],'authors':_0x38e2a8['authorsIds']['map'](_0x482c38=>this['editor']['plugins']['get']('Users')['getUser'](_0x482c38)),'fromVersion':_0x449a62};_0x2ea19c===this['currentRevision']&&(_0x27fac7['createdAt']=new Date(_0x4cb4c3['createdAt']['getTime']()+0xa)),_0x2ea19c['_update'](_0x27fac7,!0x0),delete _0x27fac7['authors'],_0x4176c1['push'](_0x27fac7);}}if(this['adapter']){for(const _0x3faa38 of _0x4176c1)this['_bufferUpdate'](_0x3faa38['id'],_0x3faa38,!0x0);this['sendBufferedUpdates']();}return _0x4df6ad;}['addRevisionData'](_0x45413d){const _0x2ea1d1=this['repository']['createRevision'](_0x45413d);return this['adapter']&&_0x2ea1d1['on']('_update',(_0xb56dfe,_0x3a2afa,_0x5c263e)=>{_0x5c263e||(this['_bufferUpdate'](_0x3a2afa['id'],_0x3a2afa,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x2ea1d1,this['_findInsertionIndex'](_0x2ea1d1)),_0x2ea1d1;}async['getRevisionDocumentData'](_0xd2ba56){return await this['_utils']['loadRevisionData'](_0xd2ba56,this['adapter']),this['_utils']['getRevisionDocumentData'](_0xd2ba56);}async['getRevisionRootsAttributes'](_0x54aeed){return await this['_utils']['loadRevisionData'](_0x54aeed,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x54aeed);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x32e808=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x41a22b=0x0;_0x41a22b<_0x32e808['length'];_0x41a22b++){const _0x4380ba=_0x32e808[_0x41a22b];let _0x755782=!0x1;for(const _0x4d736f of Object['keys'](_0x4380ba))void 0x0===_0x4380ba[_0x4d736f]?delete _0x4380ba[_0x4d736f]:'id'!==_0x4d736f&&(_0x755782=!0x0);_0x755782||(_0x32e808[_0x41a22b]=null);}if(_0x32e808=_0x32e808['filter'](_0xd9da25=>null!==_0xd9da25),!_0x32e808['length'])return;for(let _0x1f1829=0x0;_0x1f1829<_0x32e808['length'];_0x1f1829++){const _0x9f4b11=_0x32e808[_0x1f1829];void 0x0!==_0x9f4b11['fromVersion']&&void 0x0===_0x9f4b11['toVersion']&&(_0x9f4b11['toVersion']=this['repository']['getRevision'](_0x9f4b11['id'])['toVersion']),void 0x0!==_0x9f4b11['toVersion']&&void 0x0===_0x9f4b11['fromVersion']&&(_0x9f4b11['fromVersion']=this['repository']['getRevision'](_0x9f4b11['id'])['fromVersion']);}const _0x54d5fc=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x32e808,_0x54d5fc)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x4cb4fa=>{if(_0x4cb4fa){for(const _0x351fa5 of _0x4cb4fa)this['setRevisionData']({'id':_0x351fa5['id'],'createdAt':_0x351fa5['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x31dc2a=null,from:_0x4109c8=null,to:_0x5cee30=null}){_0x4109c8=null!==_0x4109c8?_0x4109c8:_0x31dc2a['fromVersion'],_0x5cee30=null!==_0x5cee30?_0x5cee30:_0x31dc2a['toVersion'];const _0x3d13c9=this['_revisionDataBuilder']['getData'](_0x4109c8,_0x5cee30),_0x4763a3={'diffData':_0x3d13c9['diffData'],'authorsIds':_0x3d13c9['authorsIds'],'fromVersion':_0x4109c8,'toVersion':_0x5cee30};if(!_0x31dc2a||_0x5cee30!==_0x31dc2a['toVersion']){const _0x56362d=_0x5cee30-0x1,_0x531422=this['_source']['history']['getOperation'](_0x56362d);_0x4763a3['createdAt']=_0x531422&&_0x531422['createdAt']||new Date();}if(this['_loadedStateData']&&_0x4109c8===this['_loadedStateData']['fromVersion']){for(const _0x536fe8 of this['_loadedStateData']['authors'])_0x4763a3['authorsIds']['includes'](_0x536fe8['id'])||_0x4763a3['authorsIds']['push'](_0x536fe8['id']);}return _0x4763a3;}['_bufferUpdate'](_0x2c9f45,_0x419278,_0x497c64){if(this['_bufferedUpdates']['has'](_0x2c9f45)){const _0x4a9050=this['_bufferedUpdates']['get'](_0x2c9f45);_0x419278=_0x497c64?{..._0x4a9050,..._0x419278}:{..._0x419278,..._0x4a9050};}this['_bufferedUpdates']['set'](_0x2c9f45,_0x419278);}['setRevisionData'](_0x4051d5){const _0x32d630=this['repository']['getRevision'](_0x4051d5['id']);if(_0x4051d5['createdAt']&&(_0x4051d5['createdAt']=new Date(_0x4051d5['createdAt'])),_0x4051d5['authorsIds']){const _0x9df6a2=this['editor']['plugins']['get']('Users');_0x4051d5['authors']=_0x4051d5['authorsIds']['map'](_0x4e21d2=>_0x9df6a2['getUser'](_0x4e21d2));}_0x32d630['_update'](_0x4051d5,!0x0);}['_createInitialRevision'](_0x5866f2){const _0x325f33=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x325f33)this['_initialRevisionId']=_0x325f33['id'];else{const _0x766106=!this['editor']['model']['document']['roots']['find'](_0x564d72=>this['editor']['model']['hasContent'](_0x564d72)),_0x34df5d=this['editor']['plugins']['get']('Users')['me']['id'],_0x596df1=g(this['editor']['locale'],_0x766106?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x5866f2,'to':_0x5866f2,'id':this['_initialRevisionId'],'name':_0x596df1,'creatorId':_0x34df5d});}}['_createCurrentRevision'](_0x4bb640){const _0x594cfe=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x594cfe),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x4bb640,'to':_0x4bb640,'id':_0x594cfe,'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'](_0x219dd6,_0x337436){let _0x2dee6a=this['editor']['config']['get']('initialData'),_0x53acbe=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x2dee6a){_0x2dee6a={};for(const _0x23147e of this['editor']['model']['document']['getRootNames']())_0x2dee6a[_0x23147e]='';}if('string'==typeof _0x2dee6a&&(_0x2dee6a={'main':_0x2dee6a}),void 0x0===_0x53acbe){_0x53acbe={};for(const _0x1438c6 of this['editor']['model']['document']['getRootNames']())_0x53acbe[_0x1438c6]={};}let _0x5b03a9=!0x1;const _0x401f6e=Object['keys'](_0x2dee6a),_0x1bf145=Object['keys'](_0x219dd6);for(const _0x35e52b of _0x401f6e){if(_0x2dee6a[_0x35e52b]!==_0x219dd6[_0x35e52b]&&''!==_0x2dee6a[_0x35e52b]['trim']()){_0x5b03a9=!0x0;break;}if(!_0x18b03f(_0x53acbe[_0x35e52b],_0x337436[_0x35e52b])&&Object['keys'](_0x53acbe[_0x35e52b])['length']>0x0){_0x5b03a9=!0x0;break;}}_0x5b03a9||(_0x5b03a9=_0x1bf145['some'](_0x4a06c9=>!this['editor']['model']['document']['getRoot'](_0x4a06c9))),_0x5b03a9&&_0x29b35b('editor-initial-data-replaced-with-revision-data',{'editorData':_0x2dee6a,'editorRootsAttributes':_0x53acbe,'revisionData':_0x219dd6,'revisionRootsAttributes':_0x337436}),this['editor']['config']['set']('initialData',_0x219dd6),this['editor']['config']['set']('rootsAttributes',_0x337436);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x1ac69e=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x1ac69e['add'](g(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x2c0b68){const _0x5e0862=this['repository']['getRevisions']();_0x5e0862['reverse']();let _0x5a246a=0x0;for(;_0x5a246a<_0x5e0862['length'];){const _0x5647d9=_0x5e0862[_0x5a246a];if(_0x5647d9===this['currentRevision']){_0x5a246a++;continue;}if(_0x5647d9['id']===this['_initialRevisionId'])break;const _0x47b748=_0x2c0b68['toVersion']-_0x5647d9['toVersion']||_0x2c0b68['fromVersion']-_0x5647d9['fromVersion'];if(_0x47b748>0x0)break;if(_0x47b748<0x0)_0x5a246a++;else{if(!_0x2c0b68['creator']&&_0x5647d9['creator'])break;if(_0x5647d9['creator']||!_0x2c0b68['creator']){if(_0x2c0b68['createdAt']>_0x5647d9['createdAt'])break;_0x5a246a++;}else _0x5a246a++;}}return _0x5a246a;}['_getFromVersion'](_0x2383d7){const _0x502257=this['repository']['getRevisions']();_0x502257['reverse'](),_0x502257['shift']();const _0x2cd34a=_0x502257['find'](_0x2dfe72=>_0x2dfe72['toVersion']<=_0x2383d7)['toVersion'];return _0x2cd34a<this['_startingVersion']?this['_startingVersion']:_0x2cd34a;}['_makeRevision']({name:_0x5409c8,from:_0x15df94,to:_0x488a28,creatorId:_0x3c81a8,id:_0x285241}){const _0x3c2b84=this['buildRevisionData']({'from':_0x15df94,'to':_0x488a28});_0x3c2b84['name']=_0x5409c8,_0x3c2b84['creatorId']=_0x3c81a8,_0x3c2b84['id']=_0x285241;const _0x1e7ff1=this['addRevisionData'](_0x3c2b84);return this['adapter']&&this['_bufferUpdate'](_0x3c2b84['id'],_0x3c2b84,!0x0),_0x1e7ff1;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class x{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x379881){this['editor']=_0x379881,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'](_0x4768c1){this['source']=_0x4768c1;const _0x2fcd7c=new Map(),_0x3c1766=new Map(),_0x4419b4=this['editor']['model']['document']['roots']['map'](_0x54b53f=>_0x54b53f['rootName']);for(const _0x5b9dc1 of _0x4419b4){const _0x3eb9f2=this['editor']['model']['document']['getRoot'](_0x5b9dc1),_0x1942e3=N(_0x3eb9f2);_0x2fcd7c['set'](_0x5b9dc1,_0x1942e3),_0x3c1766['set'](_0x5b9dc1,Object['fromEntries'](_0x3eb9f2['getAttributes']()));}const _0x1af1d0=Array['from'](this['editor']['model']['markers'])['map'](_0x3d172d=>[_0x3d172d['name'],_0x3d172d['getRange']()]),_0x3179fb=this['source']['version'];this['_saveMetaData'](_0x3179fb,_0x2fcd7c,_0x1af1d0,_0x3c1766),this['_startingRevisionId']=this['_revisionId'];const _0x1dcddd=new Map(),_0x252814=new Map();for(const _0x5a51eb of _0x4419b4){const _0xec6e5a=P(_0x5a51eb);_0x1dcddd['set'](_0x5a51eb,_0xec6e5a),_0x252814['set'](_0x5a51eb,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x1dcddd,[],_0x252814);}['getData'](_0x445297,_0x35fe19){if(this['_lastFrom']===_0x445297&&this['_lastTo']<=_0x35fe19)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x35fe19,!0x0);else{if(!this['_savedMetaData']['has'](_0x445297)){const _0x43bd1f=this['_getPreviousFrom'](_0x445297);this['_calculateMetaData'](_0x43bd1f,_0x445297,!0x1);}this['_calculateMetaData'](_0x445297,_0x35fe19,!0x0);}return this['_lastFrom']=_0x445297,this['_lastTo']=_0x35fe19,this['_getState']();}['loadState'](_0x3cf77f){const _0x24fd27=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x3cf77f['fromVersion'],this['_lastTo']=_0x3cf77f['toVersion'];for(const _0x4b1d5f in _0x3cf77f['diffData']){const _0x30ffcf=_0x3cf77f['diffData'][_0x4b1d5f]['attachChange'],_0xe3e917=_0x344f71(_0x3cf77f['diffData'][_0x4b1d5f]['attributesBefore'])||{},_0x3f46fc=_0x24fd27['_makeModelFromViewString'](_0x3cf77f['diffData'][_0x4b1d5f]['deletions']);_0x3f46fc['rootName']=_0x4b1d5f,_0x3f46fc['_isAttached']=!_0x30ffcf||!_0x30ffcf['isAttached'],_0x3f46fc['isAttached']=()=>_0x3f46fc['_isAttached'],this['_baseRoots']['set'](_0x4b1d5f,_0x3f46fc),this['_baseRootsAttributes']['set'](_0x4b1d5f,_0xe3e917),_0x30ffcf&&this['_touchedRoots']['set'](_0x4b1d5f,_0x30ffcf);const _0x4fd316=this['_makeIdsRoot'](_0x3f46fc);this['_baseIdsRoots']['set'](_0x4b1d5f,_0x4fd316);for(const [_0x1a95ef,_0x3feabc]of _0x3f46fc['markers']){if(!_0x1a95ef['startsWith']('revision:'))continue;const _0xc438f3=_0x1a95ef['split'](':')[0x2];for(const _0x5e473f of _0x3feabc['getWalker']({'singleCharacters':!0x0})){const _0x458c4e=this['_getVidAttributeName'](_0x5e473f),_0x47473b='elementEnd'==_0x5e473f['type']?_0x5e473f['previousPosition']['path']['slice'](0x0,-0x1):_0x5e473f['previousPosition']['path'],_0x919f90=_0x4fd316['getNodeByPath'](_0x47473b)['getAttribute'](_0x458c4e);this['_touched']['set'](_0x919f90,{'userId':_0xc438f3});}}}this['_startingRevisionId']=this['_revisionId'];const _0x6fbd01=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x5522a1=>!this['_touched']['has'](_0x5522a1));let _0x655431=0x0;const _0x7edec6=new Map();for(const _0x51cc15 in _0x3cf77f['diffData']){const _0x2dac46=_0x3cf77f['diffData'][_0x51cc15]['attachChange'],_0x21c421=_0x344f71(_0x3cf77f['diffData'][_0x51cc15]['attributesAfter'])||{},_0x35fe57=_0x24fd27['_makeModelFromViewString'](_0x3cf77f['diffData'][_0x51cc15]['insertions']);_0x35fe57['rootName']=_0x51cc15,_0x35fe57['_isAttached']=!_0x2dac46||_0x2dac46['isAttached'],_0x35fe57['isAttached']=()=>_0x35fe57['_isAttached'],this['_diffRoots']['set'](_0x51cc15,_0x35fe57),this['_diffRootsAttributes']['set'](_0x51cc15,_0x21c421);const _0x47b740=this['_makeIdsRoot'](_0x35fe57,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x51cc15,_0x47b740),_0x7edec6['set'](_0x51cc15,_0x35fe57['isAttached']()?_0x21c421:{});for(const [_0x1d5f2a,_0x186030]of _0x35fe57['markers']){if(!_0x1d5f2a['startsWith']('revision:'))continue;const _0x1ae549=_0x1d5f2a['split'](':')[0x2];for(const _0x500963 of _0x186030['getWalker']({'singleCharacters':!0x0})){const _0x3fde9a=this['_getVidAttributeName'](_0x500963),_0x1510ee=this['_revisionId']++,_0x7f0968='elementEnd'==_0x500963['type']?_0x500963['previousPosition']['path']['slice'](0x0,-0x1):_0x500963['previousPosition']['path'];_0x47b740['getNodeByPath'](_0x7f0968)['_setAttribute'](_0x3fde9a,_0x1510ee),this['_touched']['set'](_0x1510ee,{'userId':_0x1ae549});}}for(const _0x52689d of this['editor']['model']['createRangeIn'](_0x35fe57)['getWalker']({'singleCharacters':!0x0})){const _0x5e0800=this['_getVidAttributeName'](_0x52689d),_0x306af8='elementEnd'==_0x52689d['type']?_0x52689d['previousPosition']['path']['slice'](0x0,-0x1):_0x52689d['previousPosition']['path'],_0x18fded=_0x47b740['getNodeByPath'](_0x306af8);_0x18fded['getAttribute'](_0x5e0800)>0x0||_0x18fded['_setAttribute'](_0x5e0800,_0x6fbd01[_0x655431++]);}for(const [_0xa64252,_0x4905cd]of _0x35fe57['markers'])_0xa64252['startsWith']('revision:')||this['_markers']['set'](_0xa64252,_0x4905cd);}const _0x4a9b46=P('$graveyard');this['_baseRoots']['set']('$graveyard',_0x4a9b46),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x4a9b46,0x1));const _0xf7f520=P('$graveyard');this['_diffRoots']['set']('$graveyard',_0xf7f520),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0xf7f520,0x1));const _0x491c65=Array['from'](this['_diffRoots'])['map'](([_0x5f51ed,_0x413cbd])=>[_0x5f51ed,N(_0x413cbd)]);this['_saveMetaData'](this['_lastTo'],_0x491c65,this['_markers'],_0x7edec6);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x53a8d8,_0x27750b,_0x1adc30,_0x522b9d){const _0xa1e04a=new Map(_0x27750b),_0x220221=new Map(_0x344f71(_0x522b9d)),_0x128979=new Map();for(const [_0x173c06,_0x387849]of _0x1adc30)_0x128979['set'](_0x173c06,{'start':_0x387849['start']['clone'](),'end':_0x387849['end']['clone'](),'rootName':_0x387849['root']['rootName']});this['_savedMetaData']['set'](_0x53a8d8,{'roots':_0xa1e04a,'markers':_0x128979,'rootsAttributes':_0x220221});}['_removeMetaData'](_0x4150d5){this['_savedMetaData']['delete'](_0x4150d5);}['_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'](_0x1ac02b,_0x1fc4fb=null){let _0x4cb292=null;_0x1ac02b['is']('documentFragment')||(_0x4cb292=new ut(_0x1ac02b['name'],{'vid_start':null===_0x1fc4fb?this['_revisionId']++:_0x1fc4fb++}));const _0x2eef64=[];for(const _0x47c2ef of _0x1ac02b['getChildren']())if(_0x47c2ef['is']('element')){_0x2eef64['push'](this['_makeIdsRoot'](_0x47c2ef,_0x1fc4fb));const _0x3e13a3=_0x2eef64[_0x2eef64['length']-0x1];null!==_0x1fc4fb&&(_0x1fc4fb=_0x3e13a3['is']('element','$text')?_0x3e13a3['getAttribute']('vid')+0x1:_0x3e13a3['getAttribute']('vid_end')+0x1);}else{for(let _0x4c3505=0x0;_0x4c3505<_0x47c2ef['offsetSize'];_0x4c3505++)_0x2eef64['push'](new ut('$text',{'vid':null===_0x1fc4fb?this['_revisionId']++:_0x1fc4fb++}));}if(_0x1ac02b['is']('documentFragment')){const _0x29afad=P(_0x1ac02b['rootName']);return _0x29afad['_insertChild'](0x0,_0x2eef64),_0x29afad;}return _0x4cb292['_setAttribute']('vid_end',null===_0x1fc4fb?this['_revisionId']++:_0x1fc4fb++),_0x4cb292['_insertChild'](0x0,_0x2eef64),_0x4cb292;}['_calculateMetaData'](_0xb7f379,_0x54a1cd,_0x632830){this['_reset']();const {roots:_0x571a53,markers:_0x4af947,rootsAttributes:_0x59f61e}=this['_savedMetaData']['get'](_0xb7f379);this['_baseRoots']=new Map(_0x571a53),this['_baseRootsAttributes']=new Map(_0x344f71(_0x59f61e));for(const [_0xf51f40,_0x1f277f]of this['_baseRoots'])if('$graveyard'!==_0xf51f40&&(this['_diffRoots']['set'](_0xf51f40,N(_0x1f277f)),this['_diffRootsAttributes']=new Map(_0x344f71(_0x59f61e)),_0x632830)){const _0x10537b=this['_revisionId'];this['_idsRoots']['set'](_0xf51f40,this['_makeIdsRoot'](_0x1f277f)),this['_baseIdsRoots']['set'](_0xf51f40,this['_makeIdsRoot'](_0x1f277f,_0x10537b));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',N(this['_baseRoots']['get']('$graveyard'))),_0x632830&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x5baea4,_0x3f2c41]of _0x4af947){const _0x3fe374=this['_baseRoots']['get'](_0x3f2c41['rootName']),_0x35324e=this['_diffRoots']['get'](_0x3f2c41['rootName']),_0x4e6bff=new ft(this['_fixPosition'](_0x3f2c41['start'],_0x3fe374),this['_fixPosition'](_0x3f2c41['end'],_0x3fe374)),_0x37441a=this['_fixRange'](_0x4e6bff,_0x35324e);_0x3fe374['markers']['set'](_0x5baea4,_0x4e6bff),this['_markers']['set'](_0x5baea4,_0x37441a);}this['_applyOperations'](_0xb7f379,_0x54a1cd,_0x632830);}['_applyOperations'](_0x5e3699,_0x5207f8,_0x3b4128){for(const _0xf17ae1 of this['source']['getOperations'](_0x5e3699,_0x5207f8))this['_handleOperation'](_0xf17ae1,_0x3b4128);for(const _0x4f0744 of this['_diffRoots']['values']())_0x4f0744['markers']['clear']();for(const [_0x5a2410,_0x2761d4]of this['_markers']){this['_diffRoots']['get'](_0x2761d4['root']['rootName'])['markers']['set'](_0x5a2410,_0x2761d4['clone']());}const _0x5df46e=new Map(),_0x5084f9=new Map();for(const [_0x3c4fe,_0x4b70b8]of this['_diffRoots'])_0x5df46e['set'](_0x3c4fe,N(_0x4b70b8)),_0x5084f9['set'](_0x3c4fe,this['_diffRootsAttributes']['get'](_0x3c4fe));this['_saveMetaData'](_0x5207f8,_0x5df46e,this['_markers'],_0x5084f9);}['_getPreviousFrom'](_0x36964b){const _0x4d59dd=Array['from'](this['_savedMetaData']['keys']());_0x4d59dd['sort']((_0x1d090b,_0x18b56e)=>_0x1d090b-_0x18b56e),_0x4d59dd['reverse']();for(const _0x123e48 of _0x4d59dd)if(_0x123e48<_0x36964b)return _0x123e48;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0xbf99d6,_0x27d4c0){const _0x4f4ca3=Array['from'](_0x27d4c0['markers'])['map'](([_0x18d460,_0x1038b9])=>[_0x18d460,this['_fixRange'](_0x1038b9,_0xbf99d6)]);_0xbf99d6['markers']=new Map(_0x4f4ca3);}['_transformMarkers'](_0x3d6e0f){for(const _0x155b2d of this['_markers']['values']()){const _0x520151=_0x155b2d['getTransformedByOperation'](_0x3d6e0f),_0xf902e4=ft['_createFromRanges'](_0x520151);_0x155b2d['start']=_0xf902e4['start'],_0x155b2d['end']=_0xf902e4['end'];}}['_handleOperation'](_0x3a1274,_0x5c51a3){if('addRoot'!=_0x3a1274['type']&&'detachRoot'!=_0x3a1274['type']){if('insert'==_0x3a1274['type']){const _0x753e68=_0x3a1274['position']['root']['rootName'];this['_diffRoots']['has'](_0x753e68)||(this['_diffRoots']['set'](_0x753e68,P(_0x753e68,!0x0)),this['_diffRootsAttributes']['set'](_0x753e68,{}),_0x5c51a3&&this['_idsRoots']['set'](_0x753e68,P(_0x753e68,!0x0)));}else{if('addRootAttribute'==_0x3a1274['type']||'removeRootAttribute'==_0x3a1274['type']||'changeRootAttribute'==_0x3a1274['type'])return void this['_handleRootAttributeOperation'](_0x3a1274);'marker'==_0x3a1274['type']&&this['_handleMarkerOperation'](_0x3a1274);}if('marker'!==_0x3a1274['type']){const _0x633bdd=this['_cloneOperation'](_0x3a1274,this['_diffRoots']);_0x633bdd['_execute'](),this['_transformMarkers'](_0x633bdd);}if(_0x5c51a3)switch(_0x3a1274['type']){case'insert':this['_handleInsertOperation'](_0x3a1274);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x3a1274);break;case'merge':this['_handleMergeOperation'](_0x3a1274);break;case'split':this['_handleSplitOperation'](_0x3a1274);}}else this['_handleRootOperation'](_0x3a1274,_0x5c51a3);}['_cloneOperation'](_0x4813d3,_0x440593){const _0x39b4bc=_0x4813d3['clone']();return _0x39b4bc['_authorId']=_0x4813d3['_authorId'],this['_fixOperation'](_0x39b4bc,_0x440593),_0x39b4bc;}['_getBaseVids'](_0x3086b9){return _0x3086b9['map'](_0x3923ee=>{const _0x23f54f=this['_getVidAttributeName'](_0x3923ee);return Number(_0x3923ee['item']['getAttribute'](_0x23f54f));});}['_generateTape'](_0xe6598c,_0x6f517){if(_0xe6598c['is']('element','$text'))_0x6f517['push']({'item':_0xe6598c,'type':'text'});else{_0xe6598c['is']('element')&&_0x6f517['push']({'item':_0xe6598c,'type':'elementStart'});for(const _0x2b92fb of _0xe6598c['getChildren']())this['_generateTape'](_0x2b92fb,_0x6f517);_0xe6598c['is']('element')&&_0x6f517['push']({'item':_0xe6598c,'type':'elementEnd'});}return _0x6f517;}['_getState'](){const _0x103d93=new Map(this['_touched']),_0x3fff08=new Map(_0x103d93),_0x5a9f0c=new Map(),_0x52d7e5={'insertions':{},'deletions':{}},_0xf83720={'insertions':{},'deletions':{}},_0x19625a=new Map(),_0x3d43d7=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x3d43d7['delete']('$graveyard');for(const _0x866bd of _0x3d43d7){const _0x29d813=this['_diffRoots']['get'](_0x866bd)||P(_0x866bd,!0x1),_0x22f1c0=this['_baseRoots']['get'](_0x866bd)||P(_0x866bd,!0x1);_0x29d813['isAttached']()||_0x22f1c0['isAttached']()?(_0x52d7e5['insertions'][_0x866bd]=N(_0x29d813),_0x52d7e5['deletions'][_0x866bd]=N(_0x22f1c0),this['_copyMarkers'](_0x52d7e5['deletions'][_0x866bd],_0x22f1c0),this['_copyMarkers'](_0x52d7e5['insertions'][_0x866bd],_0x29d813),_0xf83720['insertions'][_0x866bd]=this['_generateTape'](this['_idsRoots']['get'](_0x866bd),[]),_0xf83720['deletions'][_0x866bd]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x866bd)||P(_0x866bd,!0x1),[])):_0x3d43d7['delete'](_0x866bd);}for(const _0xd4b215 of _0x3d43d7){const _0x5242de=_0xf83720['insertions'][_0xd4b215];for(const _0x3298a1 of _0x5242de){const _0x25b341=this['_getVidAttributeName'](_0x3298a1),_0x2be22d=_0x3298a1['item']['getAttribute'](_0x25b341);_0x3fff08['delete'](_0x2be22d),_0x2be22d>=this['_startingRevisionId']&&_0x5a9f0c['set'](_0x2be22d,_0x103d93['get'](_0x2be22d));}}for(const _0x3f4fbb of _0x3d43d7){const _0x3ba87b=_0xf83720['insertions'][_0x3f4fbb],_0x3869b4=this['_getBaseVids'](_0xf83720['deletions'][_0x3f4fbb]);let _0x204726=0x0;for(const _0x58289e of _0x3ba87b){const _0x1534b8=this['_getVidAttributeName'](_0x58289e),_0x19e77a=_0x58289e['item']['getAttribute'](_0x1534b8);if(!_0x5a9f0c['has'](_0x19e77a)&&!_0x19625a['has'](_0x19e77a)){if(_0x3fff08['has'](_0x19e77a))_0x204726++;else{if(_0x19e77a!=_0x3869b4[_0x204726]){const _0x2ffb07=_0x103d93['get'](_0x19e77a)||_0x103d93['get'](_0x3869b4[_0x204726]);for(;_0x19e77a!=_0x3869b4[_0x204726];)_0x3fff08['has'](_0x3869b4[_0x204726])||(_0x19625a['set'](_0x3869b4[_0x204726],_0x2ffb07),_0x103d93['set'](_0x3869b4[_0x204726],_0x2ffb07)),_0x204726++;}_0x204726++;}}}}for(const _0x2b12ba of _0x3d43d7){const _0xfd69f4=_0xf83720['insertions'][_0x2b12ba];for(const _0x1d0e06 of _0xfd69f4){const _0x13be9d=this['_getVidAttributeName'](_0x1d0e06),_0x14c70d=_0x1d0e06['item']['getAttribute'](_0x13be9d);if(_0x19625a['has'](_0x14c70d)){const _0x580fe9=_0x19625a['get'](_0x14c70d);_0x3fff08['has'](_0x14c70d)||_0x3fff08['set'](_0x14c70d,{..._0x580fe9}),_0x5a9f0c['set'](_0x14c70d,{..._0x580fe9});}}}for(const _0x47c009 of _0x3fff08['keys']())_0x47c009>=this['_startingRevisionId']&&_0x3fff08['delete'](_0x47c009);const _0x18b521=new Map();for(const _0x528242 of _0x3d43d7){let _0x160b43=_0xf83720['insertions'][_0x528242];for(const _0x1be4f2 of _0x160b43)if(_0x1be4f2['item']['is']('element','tableCell')){const _0x44af19=this['_getVidAttributeName'](_0x1be4f2),_0x1fc172=_0x1be4f2['item']['getAttribute'](_0x44af19);if(_0x5a9f0c['has'](_0x1fc172)){const _0x5b94a9=_0x1be4f2['item']['parent']['parent']['getAttribute']('vid_start'),_0x5987e4=_0x18b521['get'](_0x5b94a9)||new Set();_0x5987e4['add'](_0x5a9f0c['get'](_0x1fc172)['userId']),_0x18b521['set'](_0x5b94a9,_0x5987e4);}}_0x160b43=_0xf83720['deletions'][_0x528242];for(const _0x5a9ae3 of _0x160b43)if(_0x5a9ae3['item']['is']('element','tableCell')){const _0x16a9da=this['_getVidAttributeName'](_0x5a9ae3),_0x5d87ee=_0x5a9ae3['item']['getAttribute'](_0x16a9da);if(_0x3fff08['has'](_0x5d87ee)){const _0x522633=_0x5a9ae3['item']['parent']['parent']['getAttribute']('vid_start'),_0x2b9ac3=_0x18b521['get'](_0x522633)||new Set();_0x2b9ac3['add'](_0x3fff08['get'](_0x5d87ee)['userId']),_0x18b521['set'](_0x522633,_0x2b9ac3);}}for(const _0x411172 of _0x18b521['keys']())(_0x5a9f0c['has'](_0x411172)||_0x3fff08['has'](_0x411172))&&_0x18b521['delete'](_0x411172);}for(const _0xb5d41f of _0x3d43d7){const _0x4ce010=_0xf83720['insertions'][_0xb5d41f];let _0x54fc51=null,_0x51b485=null;for(const _0x10b5cf of _0x4ce010){const _0x4fb6ff=this['_getVidAttributeName'](_0x10b5cf),_0x5960ca=_0x10b5cf['item']['getAttribute'](_0x4fb6ff),_0x3eb33c=_0x18b521['get'](_0x5960ca);_0x3eb33c&&'elementStart'==_0x10b5cf['type']&&(_0x54fc51=Array['from'](_0x3eb33c)[0x0],_0x51b485=_0x10b5cf['item']['getAttribute']('vid_end')),_0x54fc51&&(_0x3fff08['set'](_0x5960ca,{'userId':_0x54fc51}),_0x5a9f0c['set'](_0x5960ca,{'userId':_0x54fc51})),_0x5960ca==_0x51b485&&(_0x54fc51=null,_0x51b485=null);}}const _0xfb630f={},_0x1b6948=new Set();for(const _0x238545 of _0x3d43d7){const _0x245559=_0x52d7e5['deletions'][_0x238545],_0x47c876=_0x52d7e5['insertions'][_0x238545];for(const {userId:_0x1b3000}of this['_touchedMarkers']['values']())null!==_0x1b3000&&_0x1b6948['add'](_0x1b3000);for(const {userId:_0x314dea}of this['_touchedRoots']['values']())null!==_0x314dea&&_0x1b6948['add'](_0x314dea);this['_markChanges'](_0x47c876,_0xf83720['insertions'][_0x238545],_0x5a9f0c,'insertion',_0x1b6948),this['_markChanges'](_0x245559,_0xf83720['deletions'][_0x238545],_0x3fff08,'deletion',_0x1b6948),_0xfb630f[_0x238545]={'insertions':this['_prepareViewToSave'](_0x47c876),'deletions':this['_prepareViewToSave'](_0x245559),'attachChange':this['_touchedRoots']['get'](_0x238545)||null,'attributesBefore':_0x344f71(this['_baseRootsAttributes']['get'](_0x238545))||{},'attributesAfter':_0x344f71(this['_diffRootsAttributes']['get'](_0x238545))};}return{'diffData':_0xfb630f,'authorsIds':Array['from'](_0x1b6948)};}['_processRootBeforeSave'](_0x1e03c6){for(const [,_0x55cd0c]of _0x1e03c6['markers']){const _0x25868d=_0x55cd0c['start']['getAncestors']()['filter'](_0x1cbf09=>'tableCell'==_0x1cbf09['name']);for(const _0x308f1f of _0x25868d)0x1==_0x308f1f['childCount']&&_0x308f1f['getChild'](0x0)['is']('element','paragraph')&&_0x308f1f['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x34e99a){this['_processRootBeforeSave'](_0x34e99a);const _0x1fb745=this['editor']['data']['toView'](_0x34e99a,{}),_0xa6c1a=Array['from'](_0x1fb745['getChildren']())['map'](_0x58497c=>this['_getViewJson'](_0x58497c));return JSON['stringify'](_0xa6c1a);}['_getViewJson'](_0x26756f){if(_0x26756f['is']('$text'))return _0x26756f['data'];{const _0x34e661=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x1ced82=_0x26756f,_0x4931e2=this['editor']['data']['htmlProcessor']['domConverter'],_0x567eec={'type':_0x34e661['_getTypeCharForViewElement'](_0x1ced82),'name':_0x1ced82['name'],'attributes':Array['from'](_0x1ced82['getAttributes']()),'children':Array['from'](_0x1ced82['getChildren']())['map'](_0x3a33d9=>this['_getViewJson'](_0x3a33d9))};if(_0x26756f['is']('uiElement')&&'$comment'!=_0x26756f['name']){const _0x36e5e4=_0x26756f['render'](_0x4931e2['domDocument'],_0x4931e2);_0x567eec['children']['push'](_0x36e5e4['outerHTML']);}else{if(_0x26756f['is']('rawElement')){const _0x2f4af9=_0x4931e2['domDocument']['createElement'](_0x1ced82['name']);_0x26756f['render'](_0x2f4af9,_0x4931e2),_0x567eec['children']['push'](_0x2f4af9['innerHTML']);}}const _0xc5ec07=Array['from'](_0x1ced82['getCustomProperties']());_0xc5ec07['length']>0x0&&(_0x567eec['customProperties']=_0xc5ec07);const _0x609187=_0x1ced82['getFillerOffset']();return null!==_0x609187&&(_0x567eec['fillerOffset']=_0x609187),_0x567eec;}}['_markChanges'](_0x5c8a01,_0x514892,_0x3b945a,_0x53cdf0,_0xe564a8){let _0x1fea51=null,_0x1f884f=null,_0x3674c2=0x0;const _0x2a601a=this['editor']['model'];for(let _0xe6c736=0x0;_0xe6c736<_0x514892['length'];_0xe6c736++){const _0x40b519=this['_getVidAttributeName'](_0x514892[_0xe6c736]),_0x1ffd32=_0x514892[_0xe6c736]['item']['getAttribute'](_0x40b519),_0x5c74a0=_0x3b945a['get'](_0x1ffd32),_0x57d26f=_0xe6c736==_0x514892['length']-0x1;(!_0x1fea51&&_0x5c74a0&&(_0x1fea51=_0x5c74a0,_0x1f884f=_0x514892[_0xe6c736]),_0x1fea51&&(!_0x5c74a0||_0x5c74a0['userId']!=_0x1fea51['userId']))&&(_0x4ee080(_0x5c74a0,F(_0x1f884f,_0x5c8a01,_0x2a601a),F(_0x514892[_0xe6c736],_0x5c8a01,_0x2a601a)),_0x1fea51=_0x5c74a0||null,_0x1f884f=_0x5c74a0?_0x514892[_0xe6c736]:null),_0x1fea51&&_0x57d26f&&_0x4ee080(_0x5c74a0,F(_0x1f884f,_0x5c8a01,_0x2a601a),B(_0x514892[_0xe6c736],_0x5c8a01,_0x2a601a));}function _0x4ee080(_0x3cc582,_0x2f747a,_0x265c53){const _0x3974dc=_0x1fea51['userId'],_0x3dbb57='revision:'+_0x53cdf0+':'+_0x3974dc+':'+_0x3674c2++,_0x5a3afb=_0x2a601a['createRange'](_0x2f747a,_0x265c53);_0x5c8a01['markers']['set'](_0x3dbb57,_0x5a3afb),null!==_0x3974dc&&_0xe564a8['add'](_0x3974dc);}}['_getVidAttributeName'](_0xb5fd42){switch(_0xb5fd42['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x1cad4e,_0x212bf5){_0x1cad4e['baseVersion']=null;for(const _0x393261 in _0x1cad4e){const _0x5b854e=_0x1cad4e[_0x393261];if(_0x5b854e instanceof vt){const _0x1a6585=_0x212bf5['get'](_0x5b854e['root']['rootName']);_0x1cad4e[_0x393261]=this['_fixPosition'](_0x5b854e,_0x1a6585);}if(_0x5b854e instanceof ft){const _0x1464a3=_0x212bf5['get'](_0x5b854e['root']['rootName']);_0x1cad4e[_0x393261]=this['_fixRange'](_0x5b854e,_0x1464a3);}'root'===_0x393261&&(_0x1cad4e['root']=_0x212bf5['get'](_0x1cad4e['root']['rootName']));}}['_fixRange'](_0x570061,_0x24a2ef){return this['editor']['model']['createRange'](this['_fixPosition'](_0x570061['start'],_0x24a2ef),this['_fixPosition'](_0x570061['end'],_0x24a2ef));}['_fixPosition'](_0x26caa6,_0xdd3b3){return this['editor']['model']['createPositionFromPath'](_0xdd3b3,_0x26caa6['path'],_0x26caa6['stickiness']);}['_handleInsertOperation'](_0x2a19fb){const _0x29e9e6=this['_idsRoots']['get'](_0x2a19fb['position']['root']['rootName']),_0x5580c6=this['_fixPosition'](_0x2a19fb['position'],_0x29e9e6),_0x5235bf=null===_0x2a19fb['_authorId']?null:_0x2a19fb['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4a6df1=_0x5580c6['parent'],_0x39afef=this['_revisionId'],_0x4e31f3=[];for(const _0x375e19 of _0x2a19fb['nodes'])if(_0x375e19['is']('element'))_0x4e31f3['push'](this['_makeIdsRoot'](_0x375e19));else{for(let _0x86e3d1=0x0;_0x86e3d1<_0x375e19['offsetSize'];_0x86e3d1++)_0x4e31f3['push'](new ut('$text',{'vid':this['_revisionId']++}));}const _0x2a5023=this['_revisionId'];for(let _0x2cdd70=_0x39afef;_0x2cdd70<_0x2a5023;_0x2cdd70++)this['_touched']['set'](_0x2cdd70,{'userId':_0x5235bf});_0x4a6df1['_insertChild'](_0x5580c6['offset'],_0x4e31f3);}['_handleMoveOperation'](_0x477aea){(_0x477aea=this['_cloneOperation'](_0x477aea,this['_idsRoots']))['_execute']();const _0x94b5df=null===_0x477aea['_authorId']?null:_0x477aea['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5cfcf0=_0x477aea['getMovedRangeStart'](),_0xfc81f3=_0x5cfcf0['parent'],_0x236191=_0x5cfcf0['offset'];!function _0x1591ef(_0x3a1634,_0x5b7703,_0x2775bc,_0x280c16){for(let _0x54fcab=_0x2775bc;_0x54fcab<_0x280c16;_0x54fcab++){const _0xd73026=_0x5b7703['getChild'](_0x54fcab);_0xd73026['is']('element','$text')?_0x3a1634['set'](_0xd73026['getAttribute']('vid'),{'userId':_0x94b5df}):(_0x3a1634['set'](_0xd73026['getAttribute']('vid_start'),{'userId':_0x94b5df}),_0x1591ef(_0x3a1634,_0xd73026,0x0,_0xd73026['childCount']),_0x3a1634['set'](_0xd73026['getAttribute']('vid_end'),{'userId':_0x94b5df}));}}(this['_touched'],_0xfc81f3,_0x236191,_0x236191+_0x477aea['howMany']);}['_handleMergeOperation'](_0x46438){const _0x191b95=null===(_0x46438=this['_cloneOperation'](_0x46438,this['_idsRoots']))['_authorId']?null:_0x46438['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1fc330=_0x46438['targetPosition']['parent'],_0x40acb2=_0x46438['sourcePosition']['parent'],_0x2cb8ca=_0x1fc330['getAttribute']('vid_end'),_0x53b605=_0x40acb2['getAttribute']('vid_start');_0x1fc330['_setAttribute']('vid_end',_0x40acb2['getAttribute']('vid_end')),_0x40acb2['_setAttribute']('vid_end',_0x2cb8ca),this['_touched']['set'](_0x53b605,{'userId':_0x191b95}),this['_touched']['set'](_0x2cb8ca,{'userId':_0x191b95}),_0x46438['_execute']();}['_handleSplitOperation'](_0x433ca8){const _0x574249=null===(_0x433ca8=this['_cloneOperation'](_0x433ca8,this['_idsRoots']))['_authorId']?null:_0x433ca8['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4e95a6=_0x433ca8['graveyardPosition'],_0x30a6aa=_0x433ca8['splitPosition']['parent'];_0x433ca8['_execute']();const _0x45df23=_0x30a6aa['getAttribute']('vid_end'),_0x3aa85b=_0x433ca8['insertionPosition']['nodeAfter'];if(_0x4e95a6){const _0x33d6a5=_0x3aa85b['getAttribute']('vid_end'),_0x19d751=_0x30a6aa['getAttribute']('vid_end');_0x30a6aa['_setAttribute']('vid_end',_0x33d6a5),_0x3aa85b['_setAttribute']('vid_end',_0x19d751),this['_touched']['set'](_0x30a6aa['getAttribute']('vid_end'),{'userId':_0x574249}),this['_touched']['set'](_0x3aa85b['getAttribute']('vid_start'),{'userId':_0x574249});}else{const _0x584d47=this['_revisionId']++,_0x15bee4=this['_revisionId']++;_0x30a6aa['_setAttribute']('vid_end',_0x584d47),_0x3aa85b['_setAttribute']('vid_start',_0x15bee4),_0x3aa85b['_setAttribute']('vid_end',_0x45df23),this['_touched']['set'](_0x584d47,{'userId':_0x574249}),this['_touched']['set'](_0x15bee4,{'userId':_0x574249});}}['_handleMarkerOperation'](_0x491b6c){if(!_0x491b6c['affectsData'])return;const _0x2391d5=(_0x491b6c=this['_cloneOperation'](_0x491b6c,this['_diffRoots']))['oldRange']?_0x491b6c['oldRange']['root']:null,_0x20106c=_0x491b6c['newRange']?_0x491b6c['newRange']['root']:null;_0x2391d5&&this['_markers']['delete'](_0x491b6c['name']),_0x20106c&&this['_markers']['set'](_0x491b6c['name'],_0x491b6c['newRange']['clone']());const _0x5c8db4=null===_0x491b6c['_authorId']?null:_0x491b6c['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xe59294=_0x491b6c['name'];if(!this['_touchedMarkers']['has'](_0xe59294))return void this['_touchedMarkers']['set'](_0xe59294,{'range':_0x491b6c['oldRange'],'userId':_0x5c8db4});const _0x32760f=this['_touchedMarkers']['get'](_0xe59294),_0x4a487a=_0x32760f['range'],_0x3c38bc=_0x491b6c['newRange'];null==_0x4a487a&&null==_0x3c38bc||_0x4a487a&&_0x3c38bc&&_0x4a487a['isEqual'](_0x3c38bc)?this['_touchedMarkers']['delete'](_0x491b6c['name']):_0x32760f['userId']=_0x5c8db4;}['_handleRootOperation'](_0x3f194c,_0x41f76f){this['_diffRoots']['has'](_0x3f194c['rootName'])?this['_diffRoots']['get'](_0x3f194c['rootName'])['_isAttached']=_0x3f194c['isAdd']:(this['_diffRoots']['set'](_0x3f194c['rootName'],P(_0x3f194c['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x3f194c['rootName'],{}),_0x41f76f&&this['_idsRoots']['set'](_0x3f194c['rootName'],P(_0x3f194c['rootName'],!0x0)));const _0x236346=null===_0x3f194c['_authorId']?null:_0x3f194c['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x159a2b=this['_touchedRoots']['get'](_0x3f194c['rootName']);_0x159a2b&&_0x159a2b['userId']===_0x236346?this['_touchedRoots']['delete'](_0x3f194c['rootName']):this['_touchedRoots']['set'](_0x3f194c['rootName'],{'userId':_0x236346,'isAttached':_0x3f194c['isAdd']});}['_handleRootAttributeOperation'](_0x3e9775){const _0x1e6f3e=this['_diffRootsAttributes']['get'](_0x3e9775['root']['rootName']);null===_0x3e9775['newValue']?delete _0x1e6f3e[_0x3e9775['key']]:_0x1e6f3e[_0x3e9775['key']]=_0x3e9775['newValue'];}}function N(_0x1391ef){const _0x3e080e=P(_0x1391ef['rootName'],_0x1391ef['isAttached']());for(const _0x1fecb9 of _0x1391ef['getChildren']()){const _0x2b0762=_0x1fecb9['_clone'](!0x0);_0x3e080e['_appendChild'](_0x2b0762);}return _0x3e080e;}function P(_0x47c69c,_0x25d45d=!0x0){const _0x53ca2d=new gt();return _0x53ca2d['rootName']=_0x47c69c,_0x53ca2d['_isAttached']=_0x25d45d,_0x53ca2d['isAttached']=()=>_0x53ca2d['_isAttached'],_0x53ca2d;}function F(_0x5891be,_0x370d56,_0x4cd800){const _0x590773='elementEnd'==_0x5891be['type']?_0x4cd800['createPositionAt'](_0x5891be['item'],'end'):_0x4cd800['createPositionBefore'](_0x5891be['item']);return _0x4cd800['createPositionFromPath'](_0x370d56,_0x590773['path'],_0x590773['stickiness']);}function B(_0x41bd7e,_0x2e0455,_0x51b054){const _0x4d4861='elementStart'==_0x41bd7e['type']?_0x51b054['createPositionAt'](_0x41bd7e['item'],0x0):_0x51b054['createPositionAfter'](_0x41bd7e['item']);return _0x51b054['createPositionFromPath'](_0x2e0455,_0x4d4861['path'],_0x4d4861['stickiness']);}class hs extends _0x17ef9f{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x1def90,_0xa3794d){super(_0x1def90),this['focusTracker']=new _0xbc196c(),this['keystrokes']=new _0x4c2f01(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0xa3794d),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),ts(this);}['render'](){super['render'](),_0x5ae7d3({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x787600=_0x4425eb=>_0x4425eb['stopPropagation']();this['keystrokes']['set']('arrowright',_0x787600),this['keystrokes']['set']('arrowleft',_0x787600),this['keystrokes']['set']('arrowup',_0x787600),this['keystrokes']['set']('arrowdown',_0x787600);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x510896){this['revisionNameInputView']['fieldView']['element']['value']=_0x510896['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x4825f6){const _0x288088=new nt(this['locale'],ti),_0xc3b233=_0x288088['fieldView'];_0xc3b233['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x54b10d=g(this['locale'],'Name\x20of\x20the\x20revision');return!_0x4825f6&&(_0x54b10d+='\x20('+g(this['locale'],'optional')+')'),(_0x288088['label']=_0x54b10d,_0xc3b233['on']('input',()=>{this['revisionNameInputValue']=_0xc3b233['element']['value']['trim']();}),_0x288088);}}class f extends _0x365de9{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}['_saveRevisionFormView'];['init'](){const _0x26cf23=this['editor'],_0x20d77e=_0x26cf23['plugins']['get']('RevisionTracker');_0x26cf23['ui']['componentFactory']['add']('revisionHistory',_0x57c1d3=>{const _0x358e22=_0x5b51c1(_0x57c1d3),_0x471889=_0x358e22['panelView']['children'],_0x20fa8e=new _0x4e5243(_0x57c1d3),_0x212128=new te(_0x57c1d3),_0x20f29f=new _0x3e98f4(_0x57c1d3),_0x287c87=new te(_0x57c1d3),_0x2367ed=new _0x3e98f4(_0x57c1d3);return _0x358e22['bind']('isEnabled')['to'](_0x20d77e,'isReady',_0x20d77e,'isEnabled',_0x26cf23,'isReadOnly',(_0x4fbf82,_0x1ccca2,_0x3b2b3d)=>_0x4fbf82&&_0x1ccca2&&!_0x3b2b3d),_0x358e22['buttonView']['set']({'icon':_0x4ad913,'label':g(_0x57c1d3,'Revision\x20history'),'tooltip':!0x0}),_0x20f29f['set']({'label':g(_0x57c1d3,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x20f29f['bind']('isEnabled')['to'](_0x20d77e,'isReady',_0x20d77e,'isEnabled',_0x26cf23,'isReadOnly',(_0x32efd4,_0x2aeb09,_0x478c4a)=>_0x32efd4&&_0x2aeb09&&!_0x478c4a),_0x20f29f['on']('execute',()=>this['_showDialog']()),_0x2367ed['set']({'label':g(_0x57c1d3,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x2367ed['bind']('isEnabled')['to'](_0x20d77e,'isReady',_0x26cf23,'isReadOnly',(_0x39f1fd,_0x2cde8d)=>_0x39f1fd&&!_0x2cde8d),_0x2367ed['on']('execute',()=>{_0x26cf23['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x358e22['isOpen']=!0x1,_0x26cf23['editing']['view']['focus']();}),_0x212128['children']['add'](_0x20f29f),_0x287c87['children']['add'](_0x2367ed),_0x20fa8e['role']='menu',_0x20fa8e['items']['addMany']([_0x212128,_0x287c87]),_0x471889['add'](_0x20fa8e),_0x358e22;}),_0x26cf23['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x2c947f=this['editor'],_0x135a43=_0x2c947f['locale'],_0x41c484=new _0x19d5ae(_0x135a43),_0x235e0f=new _0x347b6d(_0x135a43);_0x41c484['buttonView']['set']({'icon':_0x4ad913,'label':g(_0x135a43,'Revision\x20history')});const _0x4119db=new _0x3aa705(_0x135a43,_0x41c484),_0x1fe6a0=new _0x529e63(_0x135a43);_0x1fe6a0['set']({'label':g(_0x135a43,'Save\x20current\x20revision')}),_0x1fe6a0['delegate']('execute')['to'](_0x41c484),_0x1fe6a0['on']('execute',()=>{this['_showDialog']();}),_0x4119db['children']['add'](_0x1fe6a0),_0x235e0f['items']['add'](_0x4119db);const _0x1b5f10=new _0x3aa705(_0x135a43,_0x41c484),_0x5ba878=new _0x529e63(_0x135a43);return _0x5ba878['set']({'label':g(_0x135a43,'Open\x20revision\x20history')}),_0x5ba878['delegate']('execute')['to'](_0x41c484),_0x5ba878['on']('execute',()=>{_0x2c947f['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x1b5f10['children']['add'](_0x5ba878),_0x235e0f['items']['add'](_0x1b5f10),_0x41c484['panelView']['children']['add'](_0x235e0f),_0x41c484;}['_showDialog'](){const _0x335c33=this['editor'],_0x58df66=_0x335c33['locale'],_0x42f32c=_0x335c33['plugins']['get']('Dialog'),_0x34e8da=_0x335c33['plugins']['get']('RevisionTracker');function _0x2a9fd5(_0x7884c0){_0x335c33['config']['get']('revisionHistory.requireRevisionName')&&''===_0x7884c0['revisionName']?_0x7884c0['revisionNameInputView']['errorText']=g(_0x58df66,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x335c33['plugins']['get'](u)['saveRevision']({'name':_0x7884c0['revisionName']}),_0x42f32c['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x2a9fd5(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x42f32c['show']({'id':'revisionSave','title':g(_0x58df66,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':g(_0x335c33['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x42f32c['hide']()},{'label':g(_0x335c33['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x5d970b){_0x5d970b['bind']('isEnabled')['to'](_0x34e8da,'isReady',_0x34e8da,'isEnabled',_0x335c33,'isReadOnly',(_0x2ef22c,_0x23802b,_0x3569e6)=>_0x2ef22c&&_0x23802b&&!_0x3569e6);},'onExecute':()=>_0x2a9fd5(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x7c7769=this['editor'],_0x2b14d9=_0x7c7769['locale'];this['_saveRevisionFormView']=new hs(_0x2b14d9,_0x7c7769['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class Q extends _0x17ef9f{['changeId'];['_model'];constructor(_0x4d71af,_0x599576){super(_0x4d71af),this['_model']=_0x599576,this['changeId']=_0x599576['id'];const _0x548d1a=this['bindTemplate'],_0x232627=g(_0x4d71af,_0x599576['data']['isSuggestion']?'Suggested\x20by':'add'==_0x599576['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x599576['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x548d1a['to']('type',_0x6d4c52=>'ck-revision-change__'+_0x6d4c52)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x232627}]},{'text':'\x20'+_0x599576['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
25
- _0x3660f6(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x16c9c2){super(),this['id']=_0x16c9c2['id']||_0x1fadd2(),this['author']=_0x16c9c2['author'],this['type']=_0x16c9c2['type'],this['data']=_0x16c9c2['data']||{},this['rootName']=_0x16c9c2['rootName'],this['set']('createdAt',_0x16c9c2['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class c{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x4584b4,_0x181c9a){this['newRevisionId']=_0x4584b4,this['oldRevisionId']=_0x181c9a,this['changes']=new _0x1d0d98();}['_setChanges'](_0x35bd28){for(const _0xf70eeb of _0x35bd28)this['changes']['add'](_0xf70eeb);}}class m extends _0x365de9{['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[_0x5b69eb,_0x5923f4,I,V];}constructor(_0x2944ce){super(_0x2944ce),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',(_0x2760a2,_0x49d8b,_0x193935)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x45a770=>{for(const _0x4a96b0 of this['editor']['editing']['view']['document']['roots'])_0x193935?_0x45a770['removeClass']('ck-editor__editable__overlay',_0x4a96b0):_0x45a770['addClass']('ck-editor__editable__overlay',_0x4a96b0);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x2b1b2e=>null!==_0x2b1b2e),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x1adb3c,_0x566ad9,_0x53df83)=>_0x1adb3c&&_0x53df83?_0x566ad9['changes']['getIndex'](_0x53df83):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x2b859f,_0x47cfa0)=>_0x2b859f?_0x47cfa0['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x5923f4);}['init'](){const _0x2cf3ea=this['editor'],_0x4ab199=new pt(_0x2cf3ea,{'direction':'backward'}),_0x340d4=new pt(_0x2cf3ea,{'direction':'forward'});(_0x2cf3ea['commands']['add']('showPreviousChange',_0x4ab199),_0x2cf3ea['commands']['add']('showNextChange',_0x340d4),_0x2cf3ea['commands']['add']('restoreRevision',new wt(_0x2cf3ea)),this['on']('change:numberOfChanges',()=>{_0x4ab199['refresh'](),_0x340d4['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x2cf3ea['enableReadOnlyMode']('revision-viewer'),_0x2cf3ea['plugins']['has']('WidgetToolbarRepository'))&&_0x2cf3ea['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x40d399){return await this['_utils']['loadRevisionData'](_0x40d399,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x40d399);}async['getRevisionRootsAttributes'](_0x26eab7){return await this['_utils']['loadRevisionData'](_0x26eab7,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x26eab7);}async['compare'](_0x2c1e93,_0x414e27,_0x135a4d=!0x1){if(!this['isEnabled'])return;const _0x52cd48=this['diff'],_0x940a34=this['repository'],_0x53c974='string'==typeof _0x2c1e93?_0x940a34['getRevision'](_0x2c1e93):_0x2c1e93,_0x522116='string'==typeof _0x414e27?_0x940a34['getRevision'](_0x414e27):_0x414e27,_0x1f6eac=_0x53c974['id'],_0x1db4b1=_0x522116?_0x522116['id']:null;if(!_0x135a4d&&this['diff']&&this['diff']['newRevisionId']===_0x1f6eac&&this['diff']['oldRevisionId']===_0x1db4b1)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new c(_0x1f6eac,_0x1db4b1);const _0x33a04d=this['_getRevisionsRange'](_0x53c974,_0x522116,!0x0)['map'](_0x549eed=>this['_utils']['loadRevisionData'](_0x549eed,this['adapter']));return _0x33a04d['push'](new Promise(_0x91cdf3=>{setTimeout(_0x91cdf3,0x14);})),Promise['all'](_0x33a04d)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x1bc67d=this['_getDiff'](_0x1f6eac,_0x1db4b1);for(const _0x5b20bc of _0x1bc67d['changes'])this['_changeIdToChange']['set'](_0x5b20bc['id'],_0x5b20bc);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x405a99=>{for(const _0x23c0ee of this['editor']['model']['document']['getRootNames']())_0x405a99['detachRoot'](_0x23c0ee);for(const _0x1a5008 of Object['keys'](_0x1bc67d['model'])){const _0x32e96a=_0x405a99['addRoot'](_0x1a5008);for(const _0x560832 of Object['keys'](_0x1bc67d['attributes'][_0x1a5008]))_0x405a99['setAttribute'](_0x560832,_0x1bc67d['attributes'][_0x1a5008][_0x560832],_0x32e96a);_0x405a99['insert'](_0x1bc67d['model'][_0x1a5008],_0x32e96a,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x1bc67d['changes'])),this['isReady']=!0x0;})['catch'](_0x3de09b=>{console['error'](_0x3de09b),this['_cleanUp'](),_0x52cd48&&(this['diff']=_0x52cd48),this['isReady']=!0x0;});}['addRevisionData'](_0x24b020,_0x5a0310){const _0x10cd27=this['repository']['createRevision'](_0x24b020);return _0x10cd27['on']('_update',(_0x48362d,_0x404e97,_0x40fac0)=>_0x5a0310(_0x404e97,_0x40fac0,_0x10cd27)),this['repository']['addRevision'](_0x10cd27),_0x10cd27;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x15b491=>{for(const _0x1ddf50 of this['editor']['model']['document']['getRootNames']())_0x15b491['detachRoot'](_0x1ddf50);});}['_sortAndFilterDiffChanges'](_0x1e8a97){const _0x41b4c9=[],_0x21d8ae=new Map();for(const _0x307e66 of this['editor']['model']['document']['getRootNames']()){const _0x56e7b6=this['editor']['editing']['view']['getDomRoot'](_0x307e66);if(!_0x56e7b6)continue;const _0x123bb1=_0x56e7b6['getClientRects']()['item'](0x0);_0x123bb1&&(_0x41b4c9['push'](_0x307e66),_0x21d8ae['set'](_0x307e66,_0x123bb1));}return _0x41b4c9['sort']((_0x2e9df7,_0x4fd08a)=>{const _0x5a8994=_0x21d8ae['get'](_0x2e9df7),_0x4ac94f=_0x21d8ae['get'](_0x4fd08a);return _0x5a8994['y']-_0x4ac94f['y']||_0x5a8994['x']-_0x4ac94f['x'];}),(_0x1e8a97=_0x1e8a97['filter'](_0xfe4f87=>_0x41b4c9['includes'](_0xfe4f87['rootName'])))['sort']((_0x5d8024,_0x2066fd)=>_0x41b4c9['indexOf'](_0x5d8024['rootName'])-_0x41b4c9['indexOf'](_0x2066fd['rootName'])),_0x1e8a97;}['_makeTape'](_0x24d4fe){const _0x50c07c=Array['from'](_0x24d4fe['markers'])['filter'](([_0x24a47e,_0x52a1d9])=>_0x24a47e['startsWith']('revision:')&&!_0x52a1d9['isCollapsed']),_0x55bddd=Array['from'](this['editor']['model']['createRangeIn'](_0x24d4fe)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x50c07c['length'])for(const _0x35603e of _0x55bddd){const [_0x44600a,_0x2cb90f]=_0x50c07c[0x0],[,_0x1f147c,_0x3a3300]=_0x44600a['split'](':');if(_0x2cb90f['end']['isEqual'](_0x35603e['nextPosition'])&&_0x50c07c['shift'](),(_0x35603e['previousPosition']['isEqual'](_0x2cb90f['start'])||_0x35603e['previousPosition']['isAfter'](_0x2cb90f['start']))&&('insertion'==_0x1f147c?_0x35603e['isAdded']={'userId':_0x3a3300}:'deletion'==_0x1f147c&&(_0x35603e['isRemoved']={'userId':_0x3a3300})),0x0==_0x50c07c['length'])break;}return _0x55bddd;}['_refreshStartEndIndex'](_0x4e092b){const _0x136b77=new Map();for(let _0x1d0d2e=0x0;_0x1d0d2e<_0x4e092b['length'];_0x1d0d2e++)'text'===_0x4e092b[_0x1d0d2e]['type']?(_0x4e092b[_0x1d0d2e]['item']['startIndex']=_0x1d0d2e,_0x4e092b[_0x1d0d2e]['item']['endIndex']=_0x1d0d2e):('elementStart'===_0x4e092b[_0x1d0d2e]['type']?_0x4e092b[_0x1d0d2e]['item']['startIndex']=_0x1d0d2e:'elementEnd'===_0x4e092b[_0x1d0d2e]['type']&&(_0x4e092b[_0x1d0d2e]['item']['endIndex']=_0x1d0d2e),_0x136b77['set'](_0x4e092b[_0x1d0d2e]['id'],_0x1d0d2e));for(const _0x1cc719 of _0x136b77['values']())'elementStart'===_0x4e092b[_0x1cc719]['type']?_0x4e092b[_0x1cc719]['item']['endIndex']=_0x136b77['get'](_0x4e092b[_0x1cc719]['pairId']):'elementEnd'===_0x4e092b[_0x1cc719]['type']&&(_0x4e092b[_0x1cc719]['item']['startIndex']=_0x136b77['get'](_0x4e092b[_0x1cc719]['pairId']));}['_processTape'](_0x4e826d){for(let _0x4abfc2=0x0;_0x4abfc2<_0x4e826d['length'];_0x4abfc2++){if('elementStart'===_0x4e826d[_0x4abfc2]['type'])_0x4e826d[_0x4abfc2]['item']['startIndex']=_0x4abfc2;else{if('elementEnd'===_0x4e826d[_0x4abfc2]['type']){_0x4e826d[_0x4abfc2]['item']['endIndex']=_0x4abfc2;const _0x579993=_0x4e826d[_0x4abfc2]['item']['startIndex'];_0x4e826d[_0x579993]['pairId']=_0x4e826d[_0x4abfc2]['id'],_0x4e826d[_0x4abfc2]['pairId']=_0x4e826d[_0x579993]['id'];}else _0x4e826d[_0x4abfc2]['item']['startIndex']=_0x4abfc2,_0x4e826d[_0x4abfc2]['item']['endIndex']=_0x4abfc2,_0x4e826d[_0x4abfc2]['pairId']=null;}_0x4e826d[_0x4abfc2]['markersStart']||(_0x4e826d[_0x4abfc2]['markersStart']=[],_0x4e826d[_0x4abfc2]['markersEnd']=[]);}}['_markInsertions'](_0x2cf6ac,_0x5210ba){const _0x260eff=_0x2cf6ac['filter'](_0x1c1516=>!_0x1c1516['isAdded']);for(let _0x39faa3=0x0;_0x39faa3<_0x5210ba['length'];_0x39faa3++)_0x5210ba[_0x39faa3]['isAdded']&&(_0x260eff[_0x39faa3]['isAdded']=_0x5210ba[_0x39faa3]['isAdded']);}['_getDiff'](_0x5c7beb,_0x49d6d6=null){const _0x486b3f=this['repository']['getRevision'](_0x5c7beb),_0x17597f=_0x49d6d6?this['repository']['getRevision'](_0x49d6d6):null,_0x4c3357=this['_getRevisionsRange'](_0x486b3f,_0x17597f),_0x5f2eba=_0x4c3357[_0x4c3357['length']-0x1],_0x352614=new Map(),_0x101f42={'model':{},'attributes':{},'changes':[]},_0x39332f=new Set(),_0x512721=new Map();for(let _0x1a56ab=_0x4c3357['length']-0x1;_0x1a56ab>=0x0;_0x1a56ab--){const _0xfcbb82=_0x4c3357[_0x1a56ab];for(const _0x4431a8 of Object['keys'](_0xfcbb82['diffData']))if(_0xfcbb82['diffData'][_0x4431a8]['attachChange']){const _0xeba2a3=_0xfcbb82['diffData'][_0x4431a8]['attachChange'];_0xeba2a3['isAttached']?(_0x39332f['add'](_0x4431a8),_0x512721['has'](_0x4431a8)&&_0x512721['get'](_0x4431a8)['userId']==_0xeba2a3['userId']?_0x512721['delete'](_0x4431a8):_0x512721['set'](_0x4431a8,_0xeba2a3)):_0x512721['has'](_0x4431a8)?(_0x39332f['delete'](_0x4431a8),_0x512721['delete'](_0x4431a8)):(_0x39332f['add'](_0x4431a8),_0x512721['set'](_0x4431a8,_0xeba2a3));}else _0x39332f['add'](_0x4431a8);}for(const _0x2cc06f of _0x39332f){const _0x5afc72=_0x512721['has'](_0x2cc06f)&&!_0x512721['get'](_0x2cc06f)['isAttached'];let _0x24e66d=_0x5afc72?_0x4c3357['length']-0x1:0x0;const _0x3ef12f=_0x5afc72?-0x1:0x1;for(;_0x4c3357[_0x24e66d];){const _0x211935=_0x4c3357[_0x24e66d];if(_0x211935['diffData'][_0x2cc06f]){const _0x29718e=_0x5afc72?_0x211935['diffData'][_0x2cc06f]['attributesBefore']:_0x211935['diffData'][_0x2cc06f]['attributesAfter'];_0x101f42['attributes'][_0x2cc06f]=_0x29718e?_0x344f71(_0x29718e):{};break;}_0x24e66d+=_0x3ef12f;}}for(const _0x43fd12 of _0x4c3357){_0x43fd12['model']={};for(const _0x106f86 of _0x43fd12['authors'])_0x352614['set'](_0x106f86['id'],_0x106f86);for(const _0x1138ed of _0x39332f){const _0xc1453c=_0x43fd12['diffData'][_0x1138ed]?_0x43fd12['diffData'][_0x1138ed]['insertions']:'[]',_0x466c1e=_0x43fd12['diffData'][_0x1138ed]?_0x43fd12['diffData'][_0x1138ed]['deletions']:'[]';_0x43fd12['model'][_0x1138ed]={'insertions':this['_utils']['_makeModelFromViewString'](_0xc1453c),'deletions':this['_utils']['_makeModelFromViewString'](_0x466c1e)};}}for(const _0x1c276c of _0x39332f){let _0x405e05=null,_0x5da40e=0x0;const _0x119964=new Map(Array['from'](_0x486b3f['model'][_0x1c276c]['insertions']['markers'])['filter'](([_0x3accd3])=>!_0x3accd3['startsWith']('revision:')));let _0x3b5024=0x0;for(const _0x1d2a09 of _0x4c3357){const _0x1c7ff5=this['_makeTape'](_0x1d2a09['model'][_0x1c276c]['insertions']);_0x1d2a09==_0x486b3f?(_0x405e05=_0x1c7ff5,_0x5da40e=_0x405e05['length'],_0x405e05['forEach'](_0x42c8c3=>{_0x42c8c3['id']=_0x3b5024++;}),this['_processTape'](_0x405e05)):this['_markInsertions'](_0x405e05,_0x1c7ff5);const _0x510a08=_0x405e05['filter'](_0x8ec85a=>!_0x8ec85a['isAdded'])['map'](_0x2dd30f=>_0x2dd30f['id']);let _0x2c30be=0x0;const _0x4d48fb=this['_makeTape'](_0x1d2a09['model'][_0x1c276c]['deletions']);_0x4d48fb['forEach'](_0x45f62f=>{_0x45f62f['isRemoved']?_0x45f62f['id']=_0x5da40e++:_0x45f62f['id']=_0x510a08[_0x2c30be++];}),this['_processTape'](_0x4d48fb),this['_setDistance'](_0x405e05,'isAdded'),this['_setDistance'](_0x4d48fb,'isRemoved'),_0x1d2a09==_0x486b3f&&this['_markMarkers'](_0x405e05,_0x119964),_0x405e05=this['_joinTapes'](_0x405e05,_0x4d48fb),this['_refreshStartEndIndex'](_0x405e05),this['_setDistance'](_0x405e05,'isRemoved');}_0x405e05=_0x405e05['filter'](_0x9a8205=>!(_0x9a8205['isAdded']&&_0x9a8205['isRemoved']));const _0x57efa=new Map(_0x5f2eba['model'][_0x1c276c]['deletions']['markers']),_0x4c9882=new Set(_0x119964['keys']());for(const _0xb6fd14 of _0x57efa['keys']())_0x4c9882['delete'](_0xb6fd14);this['_markSuggestions'](_0x405e05,_0x4c9882),this['_fixObsoleteTags'](_0x405e05),_0x405e05=this['_removeMissingPairs'](_0x405e05),_0x405e05=this['_markMismatchedRemovedTags'](_0x405e05),_0x405e05=this['_removeUnsupportedChanges'](_0x405e05);const {root:_0x4ac437,changes:_0x2e24b0}=this['_makeModelFromTape'](_0x405e05,_0x352614,_0x1c276c);_0x101f42['model'][_0x1c276c]=_0x4ac437;const _0x108c1a=_0x512721['get'](_0x1c276c);if(_0x108c1a){const _0x4bce27=_0x352614['get'](_0x108c1a['userId']),_0xa6e19d=new r({'author':_0x4bce27,'type':_0x108c1a['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x1c276c});_0x2e24b0['unshift'](_0xa6e19d),_0x101f42['attributes'][_0x1c276c]['revisionHistoryAttachChange']=_0xa6e19d['id'];}_0x101f42['changes']=_0x101f42['changes']['concat'](_0x2e24b0);}return _0x101f42;}['_markMarkers'](_0x33db3a,_0x2aed26){for(let _0x43ca89=0x0;_0x43ca89<_0x33db3a['length'];_0x43ca89++)for(const [_0x67c4c7,_0x3dc419]of _0x2aed26)!_0x3dc419['isCollapsed']&&_0x3dc419['start']['isEqual'](_0x33db3a[_0x43ca89]['previousPosition'])&&_0x33db3a[_0x43ca89]['markersStart']['push'](_0x67c4c7),_0x3dc419['end']['isEqual'](_0x33db3a[_0x43ca89]['nextPosition'])&&_0x33db3a[_0x43ca89]['markersEnd']['push'](_0x67c4c7);}['_joinTapes'](_0x3b78e7,_0x49f314){let _0x12e9cf=[],_0x103c2e=0x0,_0x5422da=0x0;for(;_0x103c2e<_0x3b78e7['length']||_0x5422da<_0x49f314['length'];){const _0x3bbb58=_0x3b78e7[_0x103c2e]||{},_0x5425ef=_0x49f314[_0x5422da]||{};if(_0x3bbb58['id']==_0x5425ef['id'])_0x103c2e++,_0x5422da++,_0x12e9cf['push'](_0x3bbb58);else{if(_0x5425ef['isRemoved']&&_0x3bbb58['isAdded']){const {commonTape:_0xf8420f,iEnd:_0xec9aaa,jEnd:_0x3b412a}=this['_threeWayMerge'](_0x3b78e7,_0x103c2e,_0x49f314,_0x5422da);_0x12e9cf=_0x12e9cf['concat'](_0xf8420f),_0x103c2e=_0xec9aaa,_0x5422da=_0x3b412a;}else _0x5425ef['isRemoved']?(_0x5422da++,_0x12e9cf['push'](_0x5425ef)):(_0x103c2e++,_0x12e9cf['push'](_0x3bbb58));}}return _0x12e9cf;}['_markSuggestions'](_0xa2e448,_0x2c6278){const _0x3b710b=[];for(let _0x4e7b2e=0x0;_0x4e7b2e<_0xa2e448['length'];_0x4e7b2e++){for(let _0x4d40a7=0x0;_0x4d40a7<_0xa2e448[_0x4e7b2e]['markersStart']['length'];_0x4d40a7++){const _0x28371a=_0xa2e448[_0x4e7b2e]['markersStart'][_0x4d40a7];if(!_0x2c6278['has'](_0x28371a))continue;const {group:_0x42357c,type:_0x35eabb,authorId:_0x46b587}=_0x2de3db(_0x28371a);'revision-suggestion'!=_0x42357c||'insertion'!=_0x35eabb&&'deletion'!=_0x35eabb||(_0x3b710b['unshift']({'type':_0x35eabb,'name':_0x28371a,'userId':_0x46b587}),_0xa2e448[_0x4e7b2e]['markersStart']['splice'](_0x4d40a7,0x1),_0x4d40a7--);}_0x546729(_0xa2e448[_0x4e7b2e]);for(let _0xad657a=0x0;_0xad657a<_0xa2e448[_0x4e7b2e]['markersEnd']['length'];_0xad657a++){const _0xa9ff67=_0xa2e448[_0x4e7b2e]['markersEnd'][_0xad657a];if(!_0x2c6278['has'](_0xa9ff67))continue;const {group:_0x36855c,type:_0xb86676}=_0x2de3db(_0xa9ff67);if('revision-suggestion'!=_0x36855c||'insertion'!=_0xb86676&&'deletion'!=_0xb86676)continue;_0xa2e448[_0x4e7b2e]['markersEnd']['splice'](_0xad657a,0x1),_0xad657a--;const _0x11ca27=_0x3b710b['findIndex'](_0x2b69ff=>_0x2b69ff['name']==_0xa9ff67);_0x11ca27>-0x1&&_0x3b710b['splice'](_0x11ca27,0x1);}}function _0x2de3db(_0x56b92e){const _0x23b5a4=_0x56b92e['split'](':');return{'group':_0x23b5a4[0x0],'type':_0x23b5a4[0x1],'subType':_0x23b5a4['length']>=0x5?_0x23b5a4[0x2]:null,'id':_0x23b5a4['length']<0x5?_0x23b5a4[0x2]:_0x23b5a4[0x3],'authorId':_0x23b5a4['length']<0x5?_0x23b5a4[0x3]:_0x23b5a4[0x4],'markerCount':0x6==_0x23b5a4['length']?_0x23b5a4[0x5]:null};}function _0x546729(_0x574cad){for(let _0x4fbf2e=0x0;_0x4fbf2e<_0x3b710b['length'];_0x4fbf2e++){if(_0x574cad['isAdded']&&'insertion'==_0x3b710b[_0x4fbf2e]['type'])return _0x574cad['isAddSuggestion']=_0x3b710b[_0x4fbf2e],void delete _0x574cad['isAdded'];if(!_0x574cad['isAdded']&&!_0x574cad['isRemoved']&&'deletion'==_0x3b710b[_0x4fbf2e]['type'])return void(_0x574cad['isRemoveSuggestion']=_0x3b710b[_0x4fbf2e]);}}}['_setDistance'](_0x5eb691,_0x9d5b63){let _0x32bad5=0x0,_0xda54b8=!0x1;const _0x1abdad=new Map();for(const _0x3c3637 of _0x5eb691)_0x3c3637[_0x9d5b63]?_0xda54b8&&(_0x32bad5++,_0xda54b8=!0x1):(_0x32bad5++,_0xda54b8=!0x0),_0x1abdad['set'](_0x3c3637['id'],_0x32bad5);for(let _0x30eb7b=0x0;_0x30eb7b<_0x5eb691['length'];_0x30eb7b++){if('isRemoved'==_0x9d5b63&&_0x5eb691[_0x30eb7b]['isAdded']||'isAdded'==_0x9d5b63&&_0x5eb691[_0x30eb7b]['isRemoved'])continue;if('text'==_0x5eb691[_0x30eb7b]['type']){_0x5eb691[_0x30eb7b]['distance']=0x0;continue;}const _0x1ad727=_0x1abdad['get'](_0x5eb691[_0x30eb7b]['pairId']),_0xa7b7bc=_0x1abdad['get'](_0x5eb691[_0x30eb7b]['id']);_0x5eb691[_0x30eb7b]['distance']=_0x1ad727-_0xa7b7bc;}}['_getRevisionsRange'](_0x54d32e,_0x73415d,_0x494fc4=!0x1){const _0x21f21a=[];let _0x34b290=this['repository']['getIndex'](_0x54d32e),_0x3c0f04=this['repository']['getIndex'](_0x73415d);for(-0x1==_0x3c0f04&&(_0x3c0f04=this['repository']['_revisions']['length'],_0x494fc4=!0x1);_0x34b290<_0x3c0f04;)_0x21f21a['push'](this['repository']['getRevision'](_0x34b290)),_0x34b290++;return _0x494fc4&&_0x21f21a['push'](this['repository']['getRevision'](_0x34b290)),_0x21f21a;}['_threeWayMerge'](_0x3c4648,_0x38a72b,_0x22511f,_0x23a234){const _0x29b18c=this['editor']['model']['schema'];let _0x2fc71f=_0x38a72b;for(;_0x3c4648[_0x2fc71f]&&_0x3c4648[_0x2fc71f]['isAdded'];)_0x2fc71f++;let _0x3ae6ec=_0x23a234;for(;_0x22511f[_0x3ae6ec]&&_0x22511f[_0x3ae6ec]['isRemoved'];)_0x3ae6ec++;_0x5bf930(_0x3c4648,_0x38a72b,_0x2fc71f),_0x5bf930(_0x22511f,_0x23a234,_0x3ae6ec);const _0x51454b=_0x22511f['slice'](_0x23a234,_0x3ae6ec)['concat'](_0x3c4648['slice'](_0x38a72b,_0x2fc71f));return _0x51454b['sort']((_0x44ab92,_0x1c9b07)=>_0x44ab92['side']!=_0x1c9b07['side']?_0x44ab92['side']-_0x1c9b07['side']:_0x44ab92['level']!=_0x1c9b07['level']?_0x44ab92['level']-_0x1c9b07['level']:_0x44ab92['distance']!=_0x1c9b07['distance']?_0x1c9b07['distance']-_0x44ab92['distance']:!!_0x44ab92['isAdded']!=!!_0x1c9b07['isAdded']?-0x1==_0x44ab92['side']||0x0==_0x44ab92['side']?_0x44ab92['isAdded']?-0x1:0x1:_0x44ab92['isAdded']?0x1:-0x1:_0x44ab92['index']-_0x1c9b07['index']),{'commonTape':_0x51454b,'iEnd':_0x2fc71f,'jEnd':_0x3ae6ec};function _0x5bf930(_0x59c2bb,_0x2d9bd7,_0x15c6f4){let _0x10083e=-0x1,_0xbad662=Number['POSITIVE_INFINITY'],_0x486bae=!0x0;for(let _0x1f90cb=_0x2d9bd7;_0x1f90cb<_0x15c6f4;_0x1f90cb++)if(_0x29b18c['isInline'](_0x59c2bb[_0x1f90cb]['item'])||(_0x486bae=!0x1),_0x59c2bb[_0x1f90cb]['item']['startIndex']<_0x2d9bd7&&(_0x10083e=_0x1f90cb),_0x59c2bb[_0x1f90cb]['item']['endIndex']>=_0x15c6f4){_0xbad662=_0x1f90cb;break;}_0x486bae&&(_0x10083e=_0x15c6f4-0x1);for(let _0x2b388f=_0x2d9bd7;_0x2b388f<_0x15c6f4;_0x2b388f++)_0x59c2bb[_0x2b388f]['side']=_0x2b388f<=_0x10083e?-0x1:_0x2b388f<_0xbad662?0x0:0x1,_0x59c2bb[_0x2b388f]['index']=_0x2b388f;let _0x3b0f76=0x0;for(let _0x1cda9c=_0x2d9bd7;_0x1cda9c<=_0x10083e;_0x1cda9c++)0x0==_0x59c2bb[_0x1cda9c]['distance']?_0x59c2bb[_0x1cda9c]['level']=_0x3b0f76:(_0x3b0f76++,_0x59c2bb[_0x1cda9c]['level']=_0x3b0f76,_0x3b0f76++);for(let _0x2f13a5=_0x2d9bd7;_0x2f13a5<_0x15c6f4;_0x2f13a5++)0x0==_0x59c2bb[_0x2f13a5]['side']&&(_0x59c2bb[_0x2f13a5]['level']=_0x3b0f76);_0x3b0f76=0x0;for(let _0x50a534=_0x15c6f4-0x1;_0x50a534>=_0xbad662;_0x50a534--)0x0==_0x59c2bb[_0x50a534]['distance']?_0x59c2bb[_0x50a534]['level']=_0x3b0f76:(_0x3b0f76--,_0x59c2bb[_0x50a534]['level']=_0x3b0f76,_0x3b0f76--);}}['_fixObsoleteTags'](_0x1eb5b0){const _0x77ac52=new Map(),_0x4b07e0=this['editor']['model']['schema'];for(let _0x4b0f2b=0x1;_0x4b0f2b<_0x1eb5b0['length'];_0x4b0f2b++){let _0x35e288,_0xf7ed8b,_0x2427d3;const _0x21be5e=_0x1eb5b0[_0x4b0f2b],_0x1cdf4a=_0x1eb5b0[_0x4b0f2b-0x1];if('text'==_0x21be5e['type'])continue;if(_0x21be5e['type']!=_0x1cdf4a['type'])continue;if(!_0x4b07e0['isBlock'](_0x1cdf4a['item'])||_0x4b07e0['isLimit'](_0x1cdf4a['item']))continue;if(!_0x4b07e0['isBlock'](_0x21be5e['item'])||_0x4b07e0['isLimit'](_0x21be5e['item']))continue;if((_0x1eb5b0[_0x4b0f2b]['isAdded']||_0x1eb5b0[_0x4b0f2b]['isAddSuggestion'])&&_0x1eb5b0[_0x4b0f2b-0x1]['isRemoved'])_0x35e288=_0x1eb5b0[_0x4b0f2b],_0xf7ed8b=_0x1eb5b0[_0x4b0f2b-0x1],_0x2427d3=_0x4b0f2b-0x1;else{if(!_0x1eb5b0[_0x4b0f2b]['isRemoved']||!_0x1eb5b0[_0x4b0f2b-0x1]['isAdded']&&!_0x1eb5b0[_0x4b0f2b-0x1]['isAddSuggestion'])continue;_0x35e288=_0x1eb5b0[_0x4b0f2b-0x1],_0xf7ed8b=_0x1eb5b0[_0x4b0f2b],_0x2427d3=_0x4b0f2b;}const _0x29d85a=_0x35e288['level']==_0xf7ed8b['level'],_0x4bf79c=Math['abs'](_0x35e288['level'])<Math['abs'](_0xf7ed8b['level'])&&0x0==_0xf7ed8b['distance'];(_0x29d85a||_0x4bf79c)&&(_0x77ac52['set'](_0xf7ed8b['id'],_0x35e288['id']),_0x1eb5b0['splice'](_0x2427d3,0x1),_0x4b0f2b--,_0x35e288['isAdded']=!0x1);}for(let _0x457bff=0x0;_0x457bff<_0x1eb5b0['length'];_0x457bff++)_0x77ac52['has'](_0x1eb5b0[_0x457bff]['pairId'])&&(_0x1eb5b0[_0x457bff]['pairId']=_0x77ac52['get'](_0x1eb5b0[_0x457bff]['pairId']));}['_removeMissingPairs'](_0x1fba8e){const _0x28ce27=new Set(_0x1fba8e['map'](_0x1ecf05=>_0x1ecf05['id']));for(let _0x1cb998=0x0;_0x1cb998<_0x1fba8e['length'];_0x1cb998++)_0x28ce27['has'](_0x1fba8e[_0x1cb998]['pairId'])||0x0==_0x1fba8e[_0x1cb998]['distance']||(_0x1fba8e[_0x1cb998]['isIncorrect']=!0x0);return _0x1fba8e['filter'](_0xf8518d=>!_0xf8518d['isIncorrect']);}['_markMismatchedRemovedTags'](_0x2f8f6e){const _0x5c22d3=new Set();for(let _0xe7b3c4=0x0;_0xe7b3c4<_0x2f8f6e['length'];_0xe7b3c4++){if(_0x5c22d3['has'](_0x2f8f6e[_0xe7b3c4]['id'])&&_0x2f8f6e[_0xe7b3c4]['isRemoved']&&(_0x2f8f6e[_0xe7b3c4]['isIncorrect']=!0x0),_0x2f8f6e[_0xe7b3c4]['isIncorrect'])continue;if(0x0==_0x2f8f6e[_0xe7b3c4]['distance'])continue;if('elementStart'!=_0x2f8f6e[_0xe7b3c4]['type'])continue;if(null==_0x2f8f6e[_0xe7b3c4]['pairId'])continue;let _0x2cb5df=_0xe7b3c4+0x1,_0x16cd88=0x0;for(;_0x2f8f6e[_0x2cb5df]['id']!=_0x2f8f6e[_0xe7b3c4]['pairId'];)'elementStart'==_0x2f8f6e[_0x2cb5df]['type']?_0x16cd88++:'elementEnd'==_0x2f8f6e[_0x2cb5df]['type']&&_0x16cd88--,_0x2cb5df++;if(0x0!=_0x16cd88){if(_0x2f8f6e[_0xe7b3c4]['isRemoved'])_0x2f8f6e[_0xe7b3c4]['isIncorrect']=!0x0;else{for(;_0x2cb5df!=_0xe7b3c4;)_0x2f8f6e[_0x2cb5df]['isRemoved']&&0x0!=_0x2f8f6e[_0x2cb5df]['distance']&&(_0x2f8f6e[_0x2cb5df]['isIncorrect']=!0x0,_0x5c22d3['add'](_0x2f8f6e[_0x2cb5df]['pairId'])),_0x2cb5df--;}}}return _0x2f8f6e['filter'](_0x484cb7=>!_0x484cb7['isIncorrect']);}['_removeUnsupportedChanges'](_0x1a31af){const _0x34e2e5=this['editor']['model']['schema'];for(let _0x2f76b8=0x0;_0x2f76b8<_0x1a31af['length'];_0x2f76b8++){if(!(_0x1a31af[_0x2f76b8]['isAdded']||_0x1a31af[_0x2f76b8]['isAddSuggestion']||_0x1a31af[_0x2f76b8]['isRemoved']||_0x1a31af[_0x2f76b8]['isRemoveSuggestion']))continue;if(0x0==_0x1a31af[_0x2f76b8]['distance'])continue;const _0x12cb6a=_0x1a31af[_0x2f76b8]['item'];_0x34e2e5['isBlock'](_0x12cb6a)||_0x34e2e5['isLimit'](_0x12cb6a)||(_0x1a31af[_0x2f76b8]['isAdded']&&delete _0x1a31af[_0x2f76b8]['isAdded'],_0x1a31af[_0x2f76b8]['isAddSuggestion']&&delete _0x1a31af[_0x2f76b8]['isAddSuggestion'],_0x1a31af[_0x2f76b8]['isRemoveSuggestion']&&delete _0x1a31af[_0x2f76b8]['isRemoveSuggestion'],_0x1a31af[_0x2f76b8]['isRemoved']&&(_0x1a31af[_0x2f76b8]['isIncorrect']=!0x0));}return _0x1a31af['filter'](_0x1aa70e=>!_0x1aa70e['isIncorrect']);}['_makeModelFromTape'](_0x3c6086,_0x63d8,_0x460c0b){const _0x44484b=new gt(),_0x18c74d=[],_0x2d3229=new Map(),_0x2cc982=this['editor']['model'],_0x30cab6=_0x2cc982['schema'],_0x46006c=[_0x44484b],_0x20d889={},_0x1c4f0f={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x4b698d=null;const _0x13578e=[0x0];for(let _0x1f9c0b=0x0;_0x1f9c0b<_0x3c6086['length'];_0x1f9c0b++)if('elementStart'===_0x3c6086[_0x1f9c0b]['type']){_0x3c6086[_0x1f9c0b]['previousPosition']=_0x2cc982['createPositionFromPath'](_0x44484b,_0x13578e);const _0x3b3e27=new ut(_0x3c6086[_0x1f9c0b]['item']['name'],_0x3c6086[_0x1f9c0b]['item']['getAttributes']());_0x46006c[0x0]['_appendChild'](_0x3b3e27),_0x13578e['push'](0x0),_0x46006c['unshift'](_0x3b3e27),_0x3c6086[_0x1f9c0b]['nextPosition']=_0x2cc982['createPositionFromPath'](_0x44484b,_0x13578e);}else'elementEnd'===_0x3c6086[_0x1f9c0b]['type']?(_0x46006c['shift'](),_0x3c6086[_0x1f9c0b]['previousPosition']=_0x2cc982['createPositionFromPath'](_0x44484b,_0x13578e),_0x13578e['pop'](),_0x13578e[_0x13578e['length']-0x1]++,_0x3c6086[_0x1f9c0b]['nextPosition']=_0x2cc982['createPositionFromPath'](_0x44484b,_0x13578e)):(_0x3c6086[_0x1f9c0b]['previousPosition']=_0x2cc982['createPositionFromPath'](_0x44484b,_0x13578e),_0x4b698d?_0x4b698d['_data']+=_0x3c6086[_0x1f9c0b]['item']['data']:_0x4b698d=new mt(_0x3c6086[_0x1f9c0b]['item']['data'],_0x3c6086[_0x1f9c0b]['item']['getAttributes']()),_0x3c6086[_0x1f9c0b+0x1]&&'text'===_0x3c6086[_0x1f9c0b+0x1]['type']&&_0x37fb1e(_0x4b698d,_0x3c6086[_0x1f9c0b+0x1]['item'])||(_0x46006c[0x0]['_appendChild'](_0x4b698d),_0x4b698d=null),_0x13578e[_0x13578e['length']-0x1]+=_0x3c6086[_0x1f9c0b]['item']['offsetSize'],_0x3c6086[_0x1f9c0b]['nextPosition']=_0x2cc982['createPositionFromPath'](_0x44484b,_0x13578e));for(let _0x12eb51=0x0;_0x12eb51<_0x3c6086['length'];_0x12eb51++){const _0x4feed5=_0x3c6086[_0x12eb51]['previousPosition'],_0x1e9965=_0x3c6086[_0x12eb51]['nextPosition'];for(const _0x20dd6f of _0x3c6086[_0x12eb51]['markersStart'])_0x2d3229['set'](_0x20dd6f,{'start':_0x4feed5,'end':null});_0x43cad1('isRemoveSuggestion',_0x12eb51,_0x4feed5,_0x1e9965),_0x43cad1('isAddSuggestion',_0x12eb51,_0x4feed5,_0x1e9965),_0x43cad1('isRemoved',_0x12eb51,_0x4feed5,_0x1e9965),_0x43cad1('isAdded',_0x12eb51,_0x4feed5,_0x1e9965);for(const _0x2d7e43 of _0x3c6086[_0x12eb51]['markersEnd']){const _0x583ef5=_0x2d3229['get'](_0x2d7e43);_0x583ef5?_0x583ef5['end']=_0x1e9965:_0x2d3229['set'](_0x2d7e43,{'start':_0x1e9965,'end':_0x1e9965});}}for(const [_0x356fb8,_0x130368]of _0x2d3229){const _0x172b95=this['editor']['model']['createRange'](_0x130368['start'],_0x130368['end']);_0x44484b['markers']['set'](_0x356fb8,_0x172b95);}return _0x18c74d['sort']((_0x121507,_0x9b4f64)=>{const _0x411cac=_0x44484b['markers']['get']('revision:'+_0x121507['id']),_0x55ab79=_0x44484b['markers']['get']('revision:'+_0x9b4f64['id']);return _0x411cac['start']['isBefore'](_0x55ab79['start'])?-0x1:_0x411cac['start']['isAfter'](_0x55ab79['start'])?0x1:_0x411cac['end']['isBefore'](_0x55ab79['end'])?-0x1:_0x411cac['end']['isAfter'](_0x55ab79['end'])?0x1:'add'===_0x121507['type']?-0x1:0x1;}),{'root':_0x44484b,'changes':_0x18c74d};function _0x43cad1(_0x1649d6,_0x1bfa58,_0x979ec3,_0x2d0825){const _0x55fd2e=!!_0x3c6086[_0x1bfa58][_0x1649d6],_0x430b48=_0x55fd2e?_0x3c6086[_0x1bfa58][_0x1649d6]['userId']:null,_0x5876a0=_0x1bfa58===_0x3c6086['length']-0x1,_0x5f0c42=_0x1c4f0f[_0x1649d6][0x0],_0x5cfd22=_0x30cab6['isObject'](_0x3c6086[_0x1bfa58]['item']);!_0x20d889[_0x1649d6]&&_0x55fd2e?_0x20d889[_0x1649d6]={'start':_0x979ec3,'tapeItem':_0x3c6086[_0x1bfa58],'userId':_0x430b48,'type':_0x1649d6}:_0x20d889[_0x1649d6]&&!_0x55fd2e?(_0x20d889[_0x1649d6]['end']=_0x979ec3,_0x23523d(_0x20d889[_0x1649d6]),_0x20d889[_0x1649d6]=null):_0x20d889[_0x1649d6]&&_0x55fd2e&&_0x20d889[_0x1649d6]['userId']!==_0x430b48&&(_0x20d889[_0x1649d6]['end']=_0x979ec3,_0x5f0c42&&_0x5f0c42['userId']===_0x20d889[_0x1649d6]['userId']||_0x23523d(_0x20d889[_0x1649d6]),_0x20d889[_0x1649d6]={'start':_0x979ec3,'tapeItem':_0x3c6086[_0x1bfa58],'userId':_0x430b48,'type':_0x1649d6}),_0x20d889[_0x1649d6]&&_0x5cfd22&&('elementStart'!==_0x3c6086[_0x1bfa58]['type']||_0x5f0c42&&_0x5f0c42['userId']===_0x430b48||_0x1c4f0f[_0x1649d6]['unshift']({'userId':_0x430b48,'object':_0x3c6086[_0x1bfa58]['item'],'change':_0x20d889[_0x1649d6]}),'elementEnd'===_0x3c6086[_0x1bfa58]['type']&&_0x5f0c42&&_0x5f0c42['object']===_0x3c6086[_0x1bfa58]['item']&&(_0x1c4f0f[_0x1649d6]['shift'](),_0x20d889[_0x1649d6]=_0x5f0c42['change'])),_0x20d889[_0x1649d6]&&_0x5876a0&&(_0x20d889[_0x1649d6]['end']=_0x2d0825,_0x23523d(_0x20d889[_0x1649d6]),_0x20d889[_0x1649d6]=null);}function _0x23523d({start:_0x4d01c5,end:_0x38bad3,tapeItem:_0xc7cdea,userId:_0xe64da7,type:_0x5609ca}){const _0x284304=_0xc7cdea['item'],_0x4d47d7=_0x2cc982['schema']['isBlock'](_0x284304)&&!_0x2cc982['schema']['isLimit'](_0x284304),_0x35214c=_0x4d01c5['nodeAfter']==_0x38bad3['parent']&&_0x38bad3['isAtStart'];if(_0x4d47d7&&_0x35214c)return;const _0x542f78=_0x2cc982['createRange'](_0x4d01c5,_0x38bad3),_0x29d94c=_0x63d8['get'](_0xe64da7),_0x2b3898=new r({'author':_0x29d94c,'type':'isAdded'==_0x5609ca||'isAddSuggestion'==_0x5609ca?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x5609ca||'isRemoveSuggestion'==_0x5609ca},'createdAt':new Date(),'rootName':_0x460c0b});_0x18c74d['push'](_0x2b3898),_0x44484b['markers']['set']('revision:'+_0x2b3898['id'],_0x542f78);}function _0x37fb1e(_0x284499,_0x1217c1){const _0x3269bf=_0x284499['getAttributes'](),_0x5170a1=_0x1217c1['getAttributes']();for(const _0x37f5c9 of _0x3269bf){if(_0x37f5c9[0x1]!==_0x1217c1['getAttribute'](_0x37f5c9[0x0]))return!0x1;_0x5170a1['next']();}return _0x5170a1['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x261d72=>{const _0x5db1b3=_0x261d72['markerName']['split'](':')[0x1],_0x4ac4f7=this['_getChangeFromId'](_0x5db1b3);if(!_0x4ac4f7)return null;const _0xeecad8='add'==_0x4ac4f7['type']?'insertion':'deletion',_0xd49a0=['ck-suggestion-marker','ck-suggestion-marker-'+_0xeecad8];return _0x4ac4f7['data']['isSuggestion']&&_0xd49a0['push']('ck-suggestion-marker-'+_0xeecad8+'-new'),this['activeChange']==_0x4ac4f7&&_0xd49a0['push']('ck-suggestion-marker--active'),{'classes':_0xd49a0,'attributes':{'data-change-id':_0x5db1b3}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x4ffd30=>{_0x4ffd30['on']('element:pre',(_0xb25ee7,_0x5e59d5,_0xeae2c6)=>{const _0xd1bf74=_0x5e59d5['viewItem']['getChild'](0x0);if(!_0xd1bf74||!_0xd1bf74['is']('element','code'))return;if(!_0xeae2c6['consumable']['consume'](_0xd1bf74,{'attributes':['vid_start','vid_end']}))return;const _0xbbf240=_0x5e59d5['modelRange']['start']['nodeAfter'];_0xeae2c6['writer']['setAttribute']('vid_start',_0xd1bf74['getAttribute']('vid_start'),_0xbbf240),_0xeae2c6['writer']['setAttribute']('vid_end',_0xd1bf74['getAttribute']('vid_end'),_0xbbf240);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x1e0cb7=>{_0x1e0cb7['on']('element',(_0x31fb1d,_0x6db003,_0x3e25a8)=>{if(!_0x3e25a8['consumable']['consume'](_0x6db003['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x6db003['modelRange']['isCollapsed'])return;const _0x4dd6bd=_0x6db003['modelRange']['start']['nodeAfter'];_0x4dd6bd['hasAttribute']('vid_start')||_0x4dd6bd['hasAttribute']('vid')||(_0x3e25a8['writer']['setAttribute']('vid_start',_0x6db003['viewItem']['getAttribute']('vid_start'),_0x4dd6bd),_0x3e25a8['writer']['setAttribute']('vid_end',_0x6db003['viewItem']['getAttribute']('vid_end'),_0x4dd6bd));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x27a6f8=>_0x27a6f8['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x5ddba6,[,_0x44644b])=>{['vid_start','vid_end','vid']['includes'](_0x44644b)&&(_0x5ddba6['return']=!0x0,_0x5ddba6['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x30eb13=>{_0x30eb13['on']('attribute:vid',(_0x2d6111,_0x2bf44c,_0x37a6a9)=>{if('\x20'!=_0x2bf44c['item']['data']||_0x2bf44c['item']['parent']['maxOffset']>0x1)return;if(!_0x37a6a9['consumable']['consume'](_0x2bf44c['item'],_0x2d6111['name']))return;const _0x52378c=_0x37a6a9['writer'],_0x389c0e=_0x37a6a9['mapper']['toViewRange'](_0x2bf44c['range']);_0x52378c['wrap'](_0x389c0e,_0x52378c['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x13ec0d){const _0x3b6786=_0x13ec0d['plugins']['get']('RevisionViewer');return(_0x2778f0,_0x2e9fec,_0x45090c)=>{const _0x41a0ef=_0x2e9fec['markerName']['split'](':')[0x1],_0x4fc7ef=_0x3b6786['_getChangeFromId'](_0x41a0ef);if(!_0x4fc7ef)return null;const _0x1e79f0='add'==_0x4fc7ef['type']?'split':'merge';if(!_0x45090c['consumable']['test'](_0x2e9fec['markerRange'],_0x2778f0['name']))return;const _0x3cae4d=_0x2e9fec['markerRange']['getWalker'](),_0x185c4c=_0x2e9fec['markerRange']['start'],_0x247afc=_0x13ec0d['model']['schema'];let _0x170157=null,_0x20e003=null,_0x36ad10=!0x1,_0x57bb06=!0x1;for(const _0x2d720d of _0x3cae4d){const _0x2c0ba3=_0x2d720d['item'];_0x36ad10=_0x36ad10||_0x247afc['isContent'](_0x2c0ba3);const _0x4259d7=_0x45090c['mapper']['toViewElement'](_0x2c0ba3);if(_0x4259d7&&_0x4259d7['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x2d720d['type']&&(_0x247afc['isBlock'](_0x2c0ba3)&&!_0x247afc['isLimit'](_0x2c0ba3)&&(_0x2c0ba3['nextSibling']||_0x185c4c['isAtEnd']?_0x170157&&_0x170157['parent']==_0x2c0ba3||(_0x170157=_0x2c0ba3,_0x3cbdd6(_0x2d720d['previousPosition']),_0x57bb06=!0x0):_0x20e003=_0x20e003||_0x2d720d['previousPosition']));}function _0x3cbdd6(_0x2683ca){const _0xed4759=_0x45090c['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x1e79f0}),_0x278133=_0x45090c['mapper']['toViewPosition'](_0x2683ca);_0x4fc7ef['data']['isSuggestion']&&_0x45090c['writer']['addClass']('ck-suggestion-marker-'+_0x1e79f0+'-new',_0xed4759),_0x3b6786['activeChange']==_0x4fc7ef&&_0x45090c['writer']['addClass']('ck-suggestion-marker--active',_0xed4759),_0x45090c['writer']['insert'](_0x278133,_0xed4759),_0x45090c['mapper']['bindElementToMarker'](_0xed4759,_0x2e9fec['markerName']);}_0x36ad10||_0x57bb06||!_0x20e003||_0x3cbdd6(_0x20e003);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x1bca4,_0xf3fd99,_0x208f24)=>{const _0x2ecebb=_0x208f24['mapper']['markerNameToElements'](_0xf3fd99['markerName']);if(_0x2ecebb){for(const _0x14fbe5 of _0x2ecebb)(_0x14fbe5['hasClass']('ck-suggestion-marker-split')||_0x14fbe5['hasClass']('ck-suggestion-marker-merge'))&&(_0x208f24['mapper']['unbindElementFromMarkerName'](_0x14fbe5,_0xf3fd99['markerName']),_0x208f24['writer']['remove'](_0x14fbe5));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0xf5af03,_0x1c8680,_0x5d7db6)=>{const _0x30da17=_0x1c8680['markerName']['split'](':')[0x1],_0x38b702=this['_getChangeFromId'](_0x30da17);if(!_0x38b702)return null;const _0xfea783='add'==_0x38b702['type']?'split':'merge';if(_0x5d7db6['consumable']['test'](_0x1c8680['markerRange'],_0xf5af03['name']))for(const _0x453a1c of _0x1c8680['markerRange']['getItems']()){if(!_0x453a1c['is']('element','softBreak'))continue;const _0x1127b6=_0x5d7db6['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0xfea783}),_0x4b49bd=_0x5d7db6['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x453a1c));_0x38b702['data']['isSuggestion']&&_0x5d7db6['writer']['addClass']('ck-suggestion-marker-'+_0xfea783+'-new',_0x1127b6),this['activeChange']==_0x38b702&&_0x5d7db6['writer']['addClass']('ck-suggestion-marker--active',_0x1127b6),_0x5d7db6['writer']['insert'](_0x4b49bd,_0x1127b6),_0x5d7db6['mapper']['bindElementToMarker'](_0x1127b6,_0x1c8680['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x5cb50d=>{for(const _0xdc1455 of this['editor']['model']['document']['getRootNames']()){const _0x1e82a0=this['editor']['model']['document']['getRoot'](_0xdc1455),_0x273960=this['editor']['editing']['view']['document']['getRoot'](_0xdc1455);if(_0x273960){const _0x4e02bb=_0x1e82a0['getAttribute']('revisionHistoryAttachChange');if(_0x5cb50d['removeAttribute']('data-change-id',_0x273960),_0x5cb50d['removeClass']('ck-revision-history-root-add',_0x273960),_0x5cb50d['removeClass']('ck-revision-history-root-remove',_0x273960),_0x5cb50d['removeClass']('ck-revision-history-root--active',_0x273960),_0x4e02bb){const _0x317202=this['_getChangeFromId'](_0x4e02bb);if(!_0x317202)return null;_0x5cb50d['setAttribute']('data-change-id',_0x4e02bb,_0x273960),_0x5cb50d['addClass']('ck-revision-history-root-'+_0x317202['type'],_0x273960),this['activeChange']==_0x317202&&_0x5cb50d['addClass']('ck-revision-history-root--active',_0x273960);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x28e9af=>'revision-comment:'+_0x28e9af,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x1c49fe=>'revision-suggestion:'+_0x1c49fe,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x2d8bc3=>({'name':'suggestion:'+_0x2d8bc3,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x50b49a=>{const _0x338445=_0x50b49a['markerName']['split'](':')[0x1];return'insertion'!=_0x338445&&'deletion'!=_0x338445?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x338445]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',X(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',X(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x398b2c,_0x42adf3,_0x49eeb8)=>{const _0x31cec4=_0x49eeb8['mapper']['markerNameToElements'](_0x42adf3['markerName']);if(_0x31cec4){for(const _0x531da7 of _0x31cec4)_0x531da7['is']('uiElement')&&(_0x49eeb8['mapper']['unbindElementFromMarkerName'](_0x531da7,_0x42adf3['markerName']),_0x49eeb8['writer']['remove'](_0x531da7));}},{'priority':'high'});}['_getChangeFromId'](_0x28601b){return this['_changeIdToChange']['get'](_0x28601b);}['_getViewForChange'](_0x44e8ed){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Q(this['editor']['locale'],_0x44e8ed),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x449526,_0x174214,_0x14f1f6,_0x27dbe0)=>{_0x27dbe0&&this['_balloon']['remove'](_0x27dbe0),_0x14f1f6&&(this['_balloon']['add']({'view':_0x14f1f6,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x20e2c1=this['editor']['editing'],_0x1f0e5e=this['_getChangeFromId'](_0x14f1f6['changeId']);let _0x1daae6;if(_0x1f0e5e['data']['isOnRoot']){const _0x263022=_0x20e2c1['view']['getDomRoot'](_0x1f0e5e['rootName']);_0x1daae6=Array['from'](_0x263022['getClientRects']());}else{const _0x3783ff=this['editor']['model']['markers']['get']('revision:'+_0x14f1f6['changeId']);_0x1daae6=Array['from'](_0x20e2c1['mapper']['markerNameToElements'](_0x3783ff['name']))['map'](_0x36bed9=>_0x20e2c1['view']['domConverter']['mapViewToDom'](_0x36bed9))['map'](_0x6b7da0=>Array['from'](_0x6b7da0['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x1daae6[0x0];return _0x1daae6['find'](_0xb2019d=>_0xb2019d['top']-0x3<=this['_activeViewTarget']['y']&&_0xb2019d['bottom']+0x3>=this['_activeViewTarget']['y']&&_0xb2019d['left']-0x3<=this['_activeViewTarget']['x']&&_0xb2019d['right']+0x3>=this['_activeViewTarget']['x'])||_0x1daae6[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x23d35f,_0xbe9171,_0x44b9ac,_0x458e34)=>{this['activeView']=_0x44b9ac?this['_getViewForChange'](_0x44b9ac):null,this['editor']['model']['change'](()=>{const _0x363887=this['editor']['editing'];_0x458e34&&(_0x458e34['data']['isOnRoot']?_0x363887['view']['change'](_0x39d681=>{_0x39d681['removeClass']('ck-revision-history-root--active',_0x363887['view']['document']['getRoot'](_0x458e34['rootName']));}):_0x363887['reconvertMarker']('revision:'+_0x458e34['id'])),_0x44b9ac&&(_0x44b9ac['data']['isOnRoot']?_0x363887['view']['change'](_0x331c72=>{_0x331c72['addClass']('ck-revision-history-root--active',_0x363887['view']['document']['getRoot'](_0x44b9ac['rootName']));}):_0x363887['reconvertMarker']('revision:'+_0x44b9ac['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x579b6c,_0x2937cf)=>{if(this['activeChange'])return;const _0x5224cd=this['_findChangeIdFromDomTarget'](_0x2937cf['target']),_0xbdead6=this['_changeIdToChange']['get'](_0x5224cd);_0xbdead6?(this['_activeViewTarget']={'x':_0x2937cf['domEvent']['x'],'y':_0x2937cf['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0xbdead6)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x4e0617,_0x1a4c83)=>{const _0x723873=this['_findChangeIdFromDomTarget'](_0x1a4c83['target']),_0x18b9d5=this['_changeIdToChange']['get'](_0x723873);_0x18b9d5?(this['_activeViewTarget']={'x':_0x1a4c83['domEvent']['x'],'y':_0x1a4c83['domEvent']['y']},_0x18b9d5===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x18b9d5):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x3c698c){do{const _0x39b90b=_0x3c698c['getAttribute']('data-change-id');if(_0x39b90b)return _0x39b90b;_0x3c698c=_0x3c698c['parent'];}while(_0x3c698c);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x3ff83c=>{for(const _0x40eeac of this['editor']['model']['markers'])_0x3ff83c['removeMarker'](_0x40eeac);});}}function X(_0x2b4b38,_0x282bc7){return(_0x2c5448,_0x84c796,_0x303e41)=>{if(!_0x303e41['consumable']['test'](_0x84c796['markerRange'],_0x2c5448['name']))return;const _0x183c24=_0x84c796['markerRange']['getWalker'](),_0x385208=_0x84c796['markerRange']['start'],_0x5c62e5=_0x2b4b38['model']['schema'];let _0x2d58e0=null,_0x4ab9b2=null,_0x1f63d=!0x1,_0x559d37=!0x1;for(const _0x2415a0 of _0x183c24){const _0x366ede=_0x2415a0['item'];_0x1f63d=_0x1f63d||_0x5c62e5['isContent'](_0x366ede);const _0x2b2032=_0x303e41['mapper']['toViewElement'](_0x366ede);if(_0x2b2032&&_0x2b2032['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x2415a0['type']&&(_0x5c62e5['isBlock'](_0x366ede)&&!_0x5c62e5['isLimit'](_0x366ede)&&(_0x366ede['nextSibling']||_0x385208['isAtEnd']?_0x2d58e0&&_0x2d58e0['parent']==_0x366ede||(_0x2d58e0=_0x366ede,_0x130881(_0x2415a0['previousPosition']),_0x559d37=!0x0):_0x4ab9b2=_0x4ab9b2||_0x2415a0['previousPosition']));}function _0x130881(_0x45eb60){const _0x1a19a2=_0x303e41['mapper']['toViewPosition'](_0x45eb60),_0x3a94e0=_0x303e41['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x282bc7});_0x303e41['writer']['insert'](_0x1a19a2,_0x3a94e0),_0x303e41['mapper']['bindElementToMarker'](_0x3a94e0,_0x84c796['markerName']);}_0x1f63d||_0x559d37||!_0x4ab9b2||_0x130881(_0x4ab9b2);};}class wt extends _0x4ef64c{constructor(_0x498d21){super(_0x498d21);const _0x56ba60=_0x498d21['plugins']['get'](m);this['affectsData']=!0x1,this['listenTo'](_0x56ba60,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x56ba60,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x1418e3=this['editor'],_0x14daea=_0x1418e3['plugins']['get'](m),_0x4ef159=_0x14daea['isReady']?_0x14daea['diff']['newRevisionId']:null;_0x1418e3['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x4ef159);}['refresh'](){const {isReady:_0x3abaa9,isEnabled:_0x400675,repository:_0x8f2141,diff:_0x19d06f}=this['editor']['plugins']['get'](m),_0x4f31f8=_0x19d06f&&_0x8f2141['getLaterVisibleRevision'](_0x19d06f['newRevisionId']);this['isEnabled']=_0x3abaa9&&_0x400675&&Boolean(_0x4f31f8);}}class pt extends _0x4ef64c{['_step'];constructor(_0x4f681d,{direction:_0x4de1ac}){super(_0x4f681d);const _0x1d6c75=_0x4f681d['plugins']['get'](m);this['affectsData']=!0x1,this['_step']='forward'===_0x4de1ac?0x1:-0x1,this['listenTo'](_0x1d6c75,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x1d6c75,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x1d6c75,'change:activeChange',()=>this['refresh']());}['execute'](){const _0xdfaeb5=this['editor'],_0x6a8fdd=_0xdfaeb5['plugins']['get'](m),{isNavigationMode:_0x281721,currentChangeNumber:_0x4fa5e0}=_0x6a8fdd;let _0x35ffe5;if(_0x6a8fdd['activeChange']=_0x281721?_0x6a8fdd['diff']['changes']['get'](_0x4fa5e0+this['_step']):_0x6a8fdd['diff']['changes']['first'],_0x6a8fdd['activeChange']['data']['isOnRoot'])_0x35ffe5=_0xdfaeb5['editing']['view']['getDomRoot'](_0x6a8fdd['activeChange']['rootName']);else{const _0xd94527=_0xdfaeb5['model']['markers']['get']('revision:'+_0x6a8fdd['activeChange']['id']);_0x35ffe5=_0x5aa4e2(_0xdfaeb5['editing'],_0xd94527);}_0x2015be({'target':_0x35ffe5,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x267ac1,currentChangeNumber:_0x113f68,numberOfChanges:_0x4c913d,isReady:_0xca304b,isEnabled:_0x3fcec7}=this['editor']['plugins']['get'](m);this['isEnabled']=!!(_0x3fcec7&&_0xca304b&&_0x4c913d)&&(!_0x267ac1||(0x1===this['_step']?_0x113f68<_0x4c913d-0x1:_0x113f68>0x0));}}class _i extends _0x17ef9f{constructor(_0x40739b){super(_0x40739b);const _0x2cd3be=this['bindTemplate'],_0x1d2c55=new _0x3e98f4(_0x40739b),_0x45c7d2=new _0x3e98f4(_0x40739b);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',(_0x34f387,_0x1552e3)=>_0x34f387&&_0x1552e3>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x5afcd9,_0x4f1e6b,_0x14003c,_0x422b1b)=>{if(!_0x5afcd9)return g(_0x40739b,'Loading...');if(!_0x14003c)return g(_0x40739b,'No\x20changes');const _0x1c1f67=g(_0x40739b,'NUMBER_OF_CHANGES',_0x14003c);return _0x422b1b?g(_0x40739b,'X_OF_Y_CHANGES',[_0x4f1e6b+0x1,_0x14003c]):_0x1c1f67;}),_0x1d2c55['set']({'label':g(_0x40739b,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x1df1ea}),_0x45c7d2['set']({'label':g(_0x40739b,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x3a90be}),_0x1d2c55['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x45c7d2['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x1d2c55['on']('execute',()=>this['fire']('execute','backward')),_0x45c7d2['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',_0x2cd3be['if']('_isStatusLabelVisible','ck-hidden',_0x59dd1e=>!_0x59dd1e)]},'children':[{'text':_0x2cd3be['to']('isNavigationMode',_0x2f1e70=>_0x2f1e70?g(_0x40739b,'EDIT_X_OF_Y_REVISIONS')+':\x20':g(_0x40739b,'Total')+':\x20')}]},{'text':_0x2cd3be['to']('_statusText')}]},new _0x32038c(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x1d2c55,_0x45c7d2]}]});}}const ce='ck-editor__editable__loading-overlay';class le extends _0x365de9{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x18c0f0=this['editor']['editing']['view'];_0x18c0f0['change'](_0x2fe7e0=>{for(const _0x1e371e of _0x18c0f0['document']['roots'])_0x2fe7e0['addClass'](ce,_0x1e371e);});}['hide'](){const _0x551a14=this['editor']['editing']['view'];_0x551a14['change'](_0x30bffc=>{for(const _0x2f574b of _0x551a14['document']['roots'])_0x30bffc['removeClass'](ce,_0x2f574b);});}}class R extends _0x365de9{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[m,le];}['init'](){const _0x5b05b9=this['editor'],_0x5d76d9=_0x5b05b9['plugins']['get'](m),_0x73f61f=_0x5b05b9['plugins']['get'](le);_0x5b05b9['ui']['componentFactory']['add']('exitToEditing',_0x57f0e6=>{const _0x41001f=new _0x3e98f4(_0x57f0e6);return _0x41001f['set']({'label':g(_0x57f0e6,'Back\x20to\x20editing'),'icon':_0x2dd350,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x41001f,'execute',()=>{_0x5b05b9['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x41001f;}),_0x5b05b9['ui']['componentFactory']['add']('restoreRevision',_0x199350=>{const _0xa540e0=new _0x3e98f4(_0x199350);return _0xa540e0['set']({'label':g(_0x199350,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0xa540e0['bind']('isEnabled')['to'](_0x5b05b9['commands']['get']('restoreRevision')),this['listenTo'](_0xa540e0,'execute',()=>_0x5b05b9['execute']('restoreRevision')),_0xa540e0;}),_0x5b05b9['ui']['componentFactory']['add']('changesNavigation',_0x56c6a3=>{const _0x573b9f=new _i(_0x56c6a3),_0x431bfa=_0x5b05b9['commands']['get']('showPreviousChange'),_0x59de6c=_0x5b05b9['commands']['get']('showNextChange');return _0x573b9f['bind']('isBackwardNavigationEnabled')['to'](_0x431bfa,'isEnabled'),_0x573b9f['bind']('isForwardNavigationEnabled')['to'](_0x59de6c,'isEnabled'),_0x573b9f['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x5d76d9),this['listenTo'](_0x573b9f,'execute',(_0x1811af,_0x5b71ab)=>{_0x5b05b9['execute']('forward'===_0x5b71ab?'showNextChange':'showPreviousChange');}),_0x573b9f;}),_0x73f61f['show'](),_0x5d76d9['on']('change:isReady',(_0x41e60b,_0x1abbe4,_0x15a67e)=>{_0x15a67e?_0x73f61f['hide']():_0x73f61f['show']();});}}class lt extends nt{['_resizeObserver']=null;constructor(_0x28d4da,_0xf77f84){super(_0x28d4da,_0xf77f84);const _0x14c31f=this['bindTemplate'];this['set']({'label':g(_0x28d4da,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=g(_0x28d4da,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x14c31f['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new at(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x5c88b5=this['fieldView']['element'];this['_tooltipString']=_0x5c88b5['scrollWidth']>_0x5c88b5['clientWidth']&&_0x5c88b5['value']||'';}}class oi extends _0x17ef9f{constructor(_0x4abd53,_0x507dce,_0x30789c){super(_0x4abd53);const _0x43e6c4=new _0x340d0a();_0x43e6c4['set']({'content':_0x401b4b,'viewBox':'0\x200\x2011\x2010'});const _0x30f519=['ck','ck-revision-history-sidebar__revision-author'];_0x30789c&&_0x30f519['push']('ck-revision-history-sidebar__revision-author_creator');const _0x16cd8d=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':g(_0x4abd53,_0x30789c?'Revision\x20creator':'Revision\x20author')},'children':[_0x43e6c4,_0x507dce['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x30f519},'children':_0x16cd8d});}}function ni(_0x1109cd,_0x292129){const _0xa702e1=_0x1109cd['bindTemplate'],_0x34d961=_0x1109cd['locale'],_0x342973=_0x5b51c1(_0x34d961);_0x342973['panelPosition']='sw';const _0x1c0000=function(_0xc3569f,_0x440c5a){const _0x7031c2=function(_0x317f29,_0x2b261e){const _0xd8434f=_0x317f29['locale'],_0x173e25={'Compare\x20against\x20selected':g(_0xd8434f,'Compare\x20against\x20selected'),'Name\x20this\x20revision':g(_0xd8434f,'Name\x20this\x20revision'),'Restore\x20this\x20revision':g(_0xd8434f,'Restore\x20this\x20revision')};return _0x2b261e['map'](_0x3dff43=>{const _0x29f36f=_0x173e25[_0x3dff43['name']];return _0x29f36f&&_0x29f36f!==_0x3dff43['name']&&(_0x3dff43['name']=_0x29f36f),_0x3dff43;});}(_0xc3569f,_0x440c5a),_0x61b34a=new _0x1d0d98();for(const _0x534ccc of _0x7031c2){const _0x19bdee={'type':'button','model':new to({'label':_0x534ccc['name'],'class':_0x534ccc['class'],'withText':!0x0,'role':'menuitem','_action':_0x534ccc['action']})};_0x19bdee['model']['bind']('isEnabled')['to'](_0xc3569f,'isActionsDropdownOpen',_0x1f57a2=>'function'!=typeof _0x534ccc['isEnabled']||(!_0x1f57a2||_0x534ccc['isEnabled'](_0xc3569f))),_0x61b34a['add'](_0x19bdee);}return _0x61b34a;}(_0x1109cd,_0x292129);return _0x1109cd['bind']('isActionsDropdownOpen')['to'](_0x342973,'isOpen'),_0x342973['buttonView']['set']({'label':g(_0x34d961,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x1036e6}),_0x342973['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0xa702e1['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0xa702e1['to'](_0x30402e=>_0x30402e['stopPropagation']())}}),_0x342973['on']('execute',_0x3ddcc3=>{_0x1109cd['isReady']&&'function'==typeof _0x3ddcc3['source']['_action']&&_0x3ddcc3['source']['_action'](_0x1109cd);}),_0xd77a24(_0x342973,_0x1c0000,{'role':'menu'}),_0x342973['listenTo'](_0x1109cd,'change:isActionsDropdownOpen',(_0x48f766,_0x3d302d,_0x1e802b)=>{if(_0x1e802b)for(const _0xb96b38 of _0x342973['listView']['items']){const _0x4f08b0=_0xb96b38['children']['first'],_0x26aedf=_0x292129['find'](_0x7de8f9=>_0x7de8f9['action']===_0x4f08b0['_action'])['isVisible'];_0xb96b38['isVisible']=void 0x0===_0x26aedf||_0x26aedf(_0x1109cd);}}),_0x342973;}class ai extends/* #__PURE__ -- @preserve */
26
- _0x36e815(_0x17ef9f){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x7cef33,_0x4e8db0,_0x27f309,_0x359724){super(_0x7cef33);const _0x4e1472=this['bindTemplate'],_0x322f9d=function(_0x13ad0c,_0x48ecfa){const _0x5d93d0=Array['from'](_0x48ecfa['authors'])['filter'](_0x4b7f07=>_0x4b7f07!=_0x48ecfa['creator']);return _0x48ecfa['creator']&&_0x5d93d0['unshift'](_0x48ecfa['creator']),_0x5d93d0['map'](_0x5e7023=>new oi(_0x13ad0c,_0x5e7023,_0x5e7023==_0x48ecfa['creator']));}(_0x7cef33,_0x4e8db0);this['id']=_0x4e8db0['id'],this['_revision']=_0x4e8db0,this['_requireRevisionName']=_0x359724,this['bind']('name','createdAt')['to'](_0x4e8db0),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x4e6652=>{return _0x13e681=_0x7cef33['uiLanguage'],(_0x71c0=_0x4e6652)['toLocaleDateString'](_0x13e681,{'month':'long','day':'numeric'})+',\x20'+_0x71c0['toLocaleTimeString'](_0x13e681,{'hour':'numeric','minute':'numeric'});var _0x13e681,_0x71c0;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new lt(_0x7cef33,ti),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x44d4ed=>_0x44d4ed||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x1ebf4e,_0x421927)=>_0x1ebf4e&&_0x421927),this['revisionActionsView']=_0x27f309&&_0x27f309['length']?ni(this,_0x27f309):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x4e1472['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x4e1472['if']('isEnabled','ck-disabled',_0x2199f4=>!_0x2199f4),_0x4e1472['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x4e1472['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x4e1472['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':_0x4e1472['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':_0x322f9d}]},this['revisionActionsView']],'on':{'click':_0x4e1472['to'](_0x41cb1d=>{_0x41cb1d['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x171977=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x171977,'change',()=>{this['_requireRevisionName']&&!_0x171977['value']||this['fire']('setName',{'id':this['id'],'name':_0x171977['value']}),_0x171977['value']||(_0x171977['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function vi(_0x877008,_0x5683e3){const _0x306264=_0x4ceb2e['fromJSDate'](_0x877008)['setLocale'](_0x5683e3),_0x3c2557=_0x4ceb2e['local'](),_0x215cfc=_0x3c2557['minus']({'days':0x1})['startOf']('day');let _0xe9b65e,_0x502a3b;return _0x306264['hasSame'](_0x3c2557,'day')?(_0xe9b65e=_0x306264['startOf']('day')['toJSDate'](),_0x502a3b=_0x306264['toRelativeCalendar']()):_0x306264['hasSame'](_0x215cfc,'day')?(_0xe9b65e=_0x215cfc['toJSDate'](),_0x502a3b=_0x306264['toRelativeCalendar']()):_0x306264['hasSame'](_0x3c2557,'week')?(_0xe9b65e=_0x306264['startOf']('week')['toJSDate'](),_0x502a3b=_0x306264['weekdayLong']||''):_0x306264['hasSame'](_0x3c2557,'year')?(_0xe9b65e=_0x306264['startOf']('month')['toJSDate'](),_0x502a3b=_0x306264['monthLong']||''):(_0xe9b65e=_0x306264['startOf']('year')['toJSDate'](),_0x502a3b=String(_0x306264['year'])),{'startDate':_0xe9b65e,'localizedPeriodName':_0x502a3b};}class mi extends _0x17ef9f{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x254032,_0x1943ff,_0x290024,_0x1eeff1){super(_0x254032);const _0x43c69b=vi(_0x1943ff,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x1943ff,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x290024,this['_requireRevisionName']=_0x1eeff1,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':_0x43c69b}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x3580a3){const _0x1dfa02=new ai(this['locale'],_0x3580a3,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x1dfa02);}['removeRevision'](_0x2e798f){const _0x1c1afc=this['revisionViews']['find'](_0x3e0938=>_0x3e0938['id']===_0x2e798f['id']);this['revisionViews']['remove'](_0x1c1afc);}}class is extends _0x17ef9f{constructor(_0x552cc4){super(_0x552cc4);const _0x314b9d=new _0x340d0a();_0x314b9d['content']=_0x4ad913,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x314b9d,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[g(_0x552cc4,'Revision\x20history')]}]});}}class di extends _0x17ef9f{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x4010e7,_0x29fa7e,_0x1425ac,_0x54586f){super(_0x4010e7);const _0x176168=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x29fa7e,this['_revisionActions']=_0x1425ac,this['_requireRevisionName']=_0x54586f,this['on']('select',(_0x5575ef,_0x828779)=>{this['fire']('revisionSelected',_0x828779);}),this['on']('setName',(_0x312643,_0x303d75)=>{this['fire']('revisionSetName',_0x303d75);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new is(_0x4010e7),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x176168['if']('isEnabled','ck-disabled',_0x7e1eb=>!_0x7e1eb)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x183e6 of this['_revisions'])this['_addRevision'](_0x183e6);this['_revisions']['on']('add',(_0x53c439,_0x58ba4c)=>{this['_addRevision'](_0x58ba4c);}),this['_revisions']['on']('remove',(_0x34b697,_0x358d78)=>{this['_removeRevision'](_0x358d78);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x111c59=>_0x111c59['revisionViews']['map'](_0x2b9460=>_0x2b9460))['flat']();}['selectRevision'](_0x3463fc){for(const _0x46460f of this['revisionViews'])_0x3463fc&&_0x3463fc['id']===_0x46460f['id']?_0x46460f['select']():_0x46460f['deselect']();}['highlightRevisions'](_0x28b2d2){for(const _0x472c2d of this['revisionViews'])_0x28b2d2['some'](({id:_0x385dbd})=>_0x385dbd===_0x472c2d['id'])?_0x472c2d['highlight']():_0x472c2d['unhighlight']();}['_addRevision'](_0x5a0761){const _0x236398=vi(_0x5a0761['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x1a5eba=this['timePeriodViews']['get'](0x0);_0x1a5eba&&_0x1a5eba['startDate']['getTime']()===_0x236398['getTime']()||(_0x1a5eba=new mi(this['locale'],_0x236398,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x1a5eba)),_0x1a5eba['addRevision'](_0x5a0761);}['_removeRevision'](_0x1d6739){const _0x482d39=vi(_0x1d6739['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x482d39)['removeRevision'](_0x1d6739);}['_getTimePeriodViewByStartDate'](_0x33bdb6){return this['timePeriodViews']['find'](_0x3d1aa7=>_0x3d1aa7['startDate']['getTime']()===_0x33bdb6['getTime']());}}class d extends _0x365de9{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
23
+ import{ObservableMixin as _0x2a5be9,uid as _0xbd2e10,Collection as _0x84a14f,logWarning as _0x2a099f,FocusTracker as _0x5d78c4,KeystrokeHandler as _0x498ff9,scrollViewportToShowTarget as _0x2945f9,ResizeObserver as nt,ElementReplacer as ot,CKEditorError as _0x4c1689}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x5bb63f,set as _0x34096c,unset as _0x599304,isEqual as _0xf29574}from'es-toolkit/compat';import{Plugin as _0x3d5130,PendingActions as _0xa4c28f,Command as _0x4a8198,ElementApiMixin as _0x5b30b3,Editor as _0x3f8402}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x21cb4b,getMarkerDomElement as _0x176b60,ConfirmMixin as ti,sanitizeEditorConfig as _0x4493e4}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0x480465,ViewAttributeElement as _0x4eff57,ViewEmptyElement as _0x36b7a8,ViewRawElement as _0x1108d1,ViewUIElement as _0xf6ff,ViewDocumentFragment as _0x4a3ef3,ViewText as _0x1536f9,ViewElement as _0x4e8c77,Element as ut,Range as lt,Position as ft,DocumentFragment as vt,Text as gt}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x791eb9,IconChevronUp as _0x456c84,IconChevronDown as _0x1d5559,IconUndo as _0x6acf7e,IconUser as _0x383042,IconThreeVerticalDots as _0x16da7f}from'@ckeditor/ckeditor5-icons/dist/index.js';import{View as ts,injectCssTransitionDisabler as _0x3bbbfc,submitHandler as _0x32d34b,LabeledFieldView as _0xdbd9e1,createLabeledInputText as _0x530dc7,createDropdown as _0x2c73ee,ListView as _0x48ec40,ListItemView as _0xf49bba,ButtonView as te,MenuBarMenuView as _0x311452,MenuBarMenuListView as _0x30fe8f,MenuBarMenuListItemView as _0x131447,MenuBarMenuListItemButtonView as _0x1780ab,ContextualBalloon as _0x4618b4,ToolbarSeparatorView as _0x333091,IconView as _0x2933eb,addListToDropdown as _0x3b20d3,ViewModel as to,EditorUI as st,normalizeToolbarConfig as et,BoxedEditorUIView as rt,StickyPanelView as ht,ToolbarView as dt,InlineEditableUIView as ct}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x4f3e00}from'luxon';class h extends/* #__PURE__ -- @preserve */
24
+ _0x2a5be9(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x53cf36){super(),this['id']=_0x53cf36['id']||_0xbd2e10(),this['creator']=_0x53cf36['creator']||null,this['authors']=_0x53cf36['authors']||[],this['diffData']=_0x53cf36['diffData']||null,this['toVersion']=_0x53cf36['toVersion']||0x0,this['fromVersion']=_0x53cf36['fromVersion']||0x0,this['set']('name',_0x53cf36['name']||''),this['set']('createdAt',_0x53cf36['createdAt']||new Date()),this['set']('attributes',_0x53cf36['attributes']||{});}['setName'](_0x5dd0c9){this['_update']({'name':_0x5dd0c9});}['setAttribute'](_0x56c5f2,_0x20c359){const _0x292486=_0x5bb63f(this['attributes']);_0x34096c(_0x292486,_0x56c5f2,_0x20c359),this['_update']({'attributes':_0x292486});}['removeAttribute'](_0x1693a3){const _0xa94aa3=_0x5bb63f(this['attributes']);_0x599304(_0xa94aa3,_0x1693a3),this['_update']({'attributes':_0xa94aa3});}['_update'](_0x324f6b,_0x3b2bb9=!0x1){let _0x460c72=!0x1;const _0xab6c25={'id':this['id']},_0x2968aa=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x580b58 of _0x2968aa){const _0xb76660=_0x324f6b[_0x580b58];void 0x0!==_0xb76660&&_0xb76660!==this[_0x580b58]&&(this[_0x580b58]=_0xb76660,_0xab6c25[_0x580b58]=_0xb76660,_0x460c72=!0x0);}_0x460c72&&(_0xab6c25['authors']&&(_0xab6c25['authorsIds']=_0xab6c25['authors']['map'](_0x3c6547=>_0x3c6547['id']),delete _0xab6c25['authors']),this['fire']('_update',_0xab6c25,_0x3b2bb9));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x3fc8e6=>_0x3fc8e6['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class I extends _0x3d5130{['_revisions'];static get['requires'](){return[_0x21cb4b];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x54d1b2){super(_0x54d1b2),this['_revisions']=new _0x84a14f();}['afterInit'](){!async function(_0x5ae47c){const _0x477184=_0x37378a([0x4e,0x49,0x31,0x56,0x78,0x63,0x34,0x41,0x30,0x74,0x6f,0x6c,0x59,0x68,0x46,0x4d,0x77,0x38,0x65,0x6b,0x44,0x45,0x37,0x48,0x64,0x79,0x52,0x5a,0x69,0x43,0x51,0x4c,0x35,0x4f,0x67,0x53,0x55,0x62,0x33,0x42,0x4a,0x7a,0x75,0x36,0x32,0x50,0x39,0x6a,0x4b,0x54,0x57,0x6d,0x76,0x58,0x72,0x73,0x70,0x47,0x6e,0x71,0x61,0x66]),_0x26a0bb=0xeb829,_0xd55e96=0x458729cc,_0x33616e=0x45804a04^_0xd55e96,_0x51e6d8=window[_0x37378a([0x44,0x61,0x74,0x65])][_0x37378a([0x6e,0x6f,0x77])](),_0x42943e=_0x5ae47c[_0x37378a([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x29b32e=new window[(_0x37378a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x17f4bf=>{_0x42943e[_0x37378a([0x6f,0x6e,0x63,0x65])](_0x37378a([0x72,0x65,0x61,0x64,0x79]),_0x17f4bf);}),_0x111f43={[_0x37378a([0x6b,0x74,0x79])]:_0x37378a([0x45,0x43]),[_0x37378a([0x75,0x73,0x65])]:_0x37378a([0x73,0x69,0x67]),[_0x37378a([0x63,0x72,0x76])]:_0x37378a([0x50,0x2d,0x32,0x35,0x36]),[_0x37378a([0x78])]:_0x37378a([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]),[_0x37378a([0x79])]:_0x37378a([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]),[_0x37378a([0x61,0x6c,0x67])]:_0x37378a([0x45,0x53,0x32,0x35,0x36])},_0x4aeccf=_0x42943e[_0x37378a([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x37378a([0x67,0x65,0x74])](_0x37378a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x41daa3(){let _0x243a5c,_0x148521=null,_0x5ca9b2=null;try{if(_0x4aeccf==_0x37378a([0x47,0x50,0x4c]))return _0x37378a([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x243a5c=_0x226308(),!_0x243a5c)return _0x37378a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x243a5c[_0x37378a([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5ca9b2=_0x72d7d8(_0x243a5c[_0x37378a([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x243a5c[_0x37378a([0x6a,0x74,0x69])])),await _0x5e0859()?_0x1d4c7f()?_0x2b8fa5()?_0x37378a([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x2aad39()?(_0x243a5c[_0x37378a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x37378a([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x148521=_0x17550f(_0x37378a([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x243a5c[_0x37378a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x37378a([0x74,0x72,0x69,0x61,0x6c])&&(_0x148521=_0x17550f(_0x37378a([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x11b713()):_0x37378a([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x37378a([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x37378a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x12db81){return _0x37378a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2b8fa5(){const _0x3cb00c=[_0x37378a([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x37378a([0x74,0x72,0x69,0x61,0x6c])][_0x37378a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x243a5c[_0x37378a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x51e6d8/0x3e8:0xe10*_0x33616e;return _0x243a5c[_0x37378a([0x65,0x78,0x70])]<_0x3cb00c;}function _0x1d4c7f(){const _0x4028e2=_0x243a5c[_0x37378a([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x4028e2)return!0x1;if(_0x4028e2[_0x37378a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x37378a([0x2a])))return!0x0;if(_0x4028e2[_0x37378a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x37378a([0x52,0x48])))return!0x0;if(_0x4028e2[_0x37378a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x37378a([0x52,0x52,0x48]))){if(_0x492c12())return!0x0;if(_0x966cbb()||_0x599e72())return!0x0;}return!0x1;}function _0x2aad39(){const _0x4741fc=_0x243a5c[_0x37378a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4741fc||0x0==_0x4741fc[_0x37378a([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x418799}=new URL(window[_0x37378a([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4741fc[_0x37378a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x418799))return!0x0;const _0x2ab340=_0x418799[_0x37378a([0x73,0x70,0x6c,0x69,0x74])](_0x37378a([0x2e]));return _0x4741fc[_0x37378a([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x29cace=>_0x29cace[_0x37378a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x37378a([0x2a])))[_0x37378a([0x6d,0x61,0x70])](_0x46f12d=>_0x46f12d[_0x37378a([0x73,0x70,0x6c,0x69,0x74])](_0x37378a([0x2e])))[_0x37378a([0x73,0x6f,0x6d,0x65])](_0x39f476=>_0x2ab340[_0x37378a([0x65,0x76,0x65,0x72,0x79])]((_0x17c24e,_0x3c9fd9)=>_0x39f476[_0x3c9fd9]===_0x17c24e||_0x39f476[_0x3c9fd9]===_0x37378a([0x2a])));}function _0x11b713(){return _0x148521&&_0x5ca9b2?new window[(_0x37378a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1bf97c,_0x1d312d)=>{_0x148521[_0x37378a([0x74,0x68,0x65,0x6e])](_0x1bf97c,_0x1d312d),_0x5ca9b2[_0x37378a([0x74,0x68,0x65,0x6e])](_0x23de74=>{_0x23de74!=_0x37378a([0x56,0x61,0x6c,0x69,0x64])&&_0x1bf97c(_0x23de74);},_0x1d312d);}):_0x148521||_0x5ca9b2||_0x37378a([0x56,0x61,0x6c,0x69,0x64]);}}function _0x72d7d8(_0x2d9a64,_0x448ba4){return new window[(_0x37378a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4ff14b=>{if(_0x9af806())return _0x4ff14b(_0x37378a([0x56,0x61,0x6c,0x69,0x64]));_0x2b82e1(),_0x42943e[_0x37378a([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x37378a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3bcd1b=!0x1;const _0xd23819=_0xbd2e10();function _0x666a0b(_0x51cd8a){return!!_0x51cd8a&&(typeof _0x51cd8a===_0x37378a([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x51cd8a===_0x37378a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x51cd8a[_0x37378a([0x74,0x68,0x65,0x6e])]===_0x37378a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x51cd8a[_0x37378a([0x63,0x61,0x74,0x63,0x68])]===_0x37378a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x5f5b4d(_0x194530){_0x2b522f(_0x194530)[_0x37378a([0x74,0x68,0x65,0x6e])](_0xcf0088=>{if(!_0xcf0088||_0xcf0088[_0x37378a([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x37378a([0x6f,0x6b]))return _0x37378a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x473dc2(_0x2a83ac(_0xd23819+_0x448ba4))!=_0xcf0088[_0x37378a([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x37378a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x37378a([0x56,0x61,0x6c,0x69,0x64]);})[_0x37378a([0x74,0x68,0x65,0x6e])](_0x567fdc=>(_0x196365(),_0x567fdc),()=>{const _0x176904=_0xeca1c9();return null==_0x176904?(_0x196365(),_0x37378a([0x56,0x61,0x6c,0x69,0x64])):_0x37378a(_0x51e6d8-_0x176904>(0x618badcc^_0xd55e96)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x37378a([0x74,0x68,0x65,0x6e])](_0x4ff14b)[_0x37378a([0x63,0x61,0x74,0x63,0x68])](()=>{_0x4ff14b(_0x37378a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5ad260=0x45b1c74c^_0xd55e96;function _0x196365(){const _0x3785ec=_0x37378a([0x6c,0x6c,0x63,0x74,0x2d])+_0x473dc2(_0x2a83ac(_0x2d9a64)),_0x4ac6a9=_0x2f7b8c(_0x473dc2(window[_0x37378a([0x4d,0x61,0x74,0x68])][_0x37378a([0x63,0x65,0x69,0x6c])](_0x51e6d8/_0x5ad260)));window[_0x37378a([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x37378a([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3785ec,_0x4ac6a9);}function _0xeca1c9(){const _0x34b1d9=_0x37378a([0x6c,0x6c,0x63,0x74,0x2d])+_0x473dc2(_0x2a83ac(_0x2d9a64)),_0x205142=window[_0x37378a([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x37378a([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x34b1d9);return _0x205142?window[_0x37378a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2f7b8c(_0x205142),0x10)*_0x5ad260:null;}function _0x2b522f(_0x59523b){return new window[(_0x37378a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2cb4bb,_0x546936)=>{_0x59523b[_0x37378a([0x74,0x68,0x65,0x6e])](_0x2cb4bb,_0x546936),window[_0x37378a([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x546936,0x4586fd0c^_0xd55e96);});}}_0x42943e[_0x37378a([0x6f,0x6e])](_0x37378a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x3c3bcc,_0x3eae0f)=>{if(_0x3eae0f[0x0]!=_0x2d9a64)return _0x4ff14b(_0x37378a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3eae0f[0x1]={..._0x3eae0f[0x1],[_0x37378a([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0xd23819};},{[_0x37378a([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x37378a([0x68,0x69,0x67,0x68])}),_0x42943e[_0x37378a([0x6f,0x6e])](_0x37378a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x40f841=>{_0x666a0b(_0x40f841[_0x37378a([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3bcd1b=!0x0,_0x5f5b4d(_0x40f841[_0x37378a([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x37378a([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x37378a([0x6c,0x6f,0x77])}),_0x29b32e[_0x37378a([0x74,0x68,0x65,0x6e])](()=>{_0x3bcd1b||_0x4ff14b(_0x37378a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x9af806(){return _0x42943e[_0x37378a([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x37378a([0x76,0x69,0x65,0x77])][_0x37378a([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x37378a([0x61,0x75,0x74,0x6f]);}function _0x2b82e1(){_0x42943e[_0x37378a([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x37378a([0x76,0x69,0x65,0x77])][_0x37378a([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x37378a([0x61,0x75,0x74,0x6f]);}}function _0x17550f(_0x1f41ce){const _0x221990=[new window[(_0x37378a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x42f161=>setTimeout(_0x42f161,0x458e1700^_0xd55e96)),_0x29b32e[_0x37378a([0x74,0x68,0x65,0x6e])](()=>new window[(_0x37378a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xad905d=>{const _0x126fc1=0x458729cb^_0xd55e96,_0x5b3401=_0x5ae47c[_0x37378a([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x597203(){_0x5b3401[_0x37378a([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x126fc1&&_0xad905d();}_0x597203(),_0x5b3401[_0x37378a([0x6f,0x6e])](_0x37378a([0x61,0x64,0x64]),_0x597203);})),new window[(_0x37378a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x40249b=>{function _0x588d92(){for(const _0x881876 in window)if(window[_0x37378a([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x37378a([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x881876))&&window[_0x881876]==_0x26a0bb)return _0x40249b();_0x42943e[_0x37378a([0x73,0x74,0x61,0x74,0x65])]!=_0x37378a([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x37378a([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x588d92,0x45873a44^_0xd55e96);}_0x47be87(_0x37378a([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x588d92();})];return window[_0x37378a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x37378a([0x72,0x61,0x63,0x65])](_0x221990)[_0x37378a([0x74,0x68,0x65,0x6e])](()=>_0x1f41ce);}async function _0x48351a(){if(await _0x29b32e,_0x47be87(_0x37378a([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x14acdf=_0x5ae47c[_0x37378a([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x933170=_0x5ae47c[_0x37378a([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])](_0x14acdf[_0x37378a([0x69,0x64])]),_0x2b7c52=_0x2417f3(_0x37378a([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x2b7c52[_0x37378a([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x14acdf['id'],_0x933170?_0x933170['id']:null,!0x0),_0x2b7c52[_0x37378a([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x37378a([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x2b7c52[_0x37378a([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x2b7c52[_0x37378a([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x23c3e6,void(_0x2b7c52[_0x37378a([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x23c3e6);}if(_0x47be87(_0x37378a([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x2e5e4a=_0x2417f3(_0x37378a([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x2e5e4a[_0x37378a([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x37378a([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x2e5e4a[_0x37378a([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x2e5e4a[_0x37378a([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x23c3e6,_0x2e5e4a[_0x37378a([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x23c3e6;}_0x42943e[_0x37378a([0x6d,0x6f,0x64,0x65,0x6c])][_0x37378a([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x23c3e6,_0x42943e[_0x37378a([0x6d,0x6f,0x64,0x65,0x6c])][_0x37378a([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x23c3e6,_0x42943e[_0x37378a([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x37378a([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x492c12(){return _0x47be87(_0x37378a([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x2417f3(_0x37378a([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x37378a([0x73,0x74,0x61,0x74,0x65])]==_0x37378a([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x966cbb(){return _0x47be87(_0x37378a([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 _0x599e72(){return _0x47be87(_0x37378a([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0xef48ef(_0x5c7fef){const _0xbee874=_0x23379e();_0x42943e[_0xbee874]=_0x37378a([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])+_0x5c7fef,_0x5c7fef[_0x37378a([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x37378a([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x23379e()]=_0x26a0bb),_0x5c7fef!=_0x37378a([0x56,0x61,0x6c,0x69,0x64])&&_0x48351a();}function _0x23379e(){const _0x186a26=window[_0x37378a([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x37378a([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x37378a([0x6e,0x6f,0x77])]())[_0x37378a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x37378a([0x2e]),'');let _0x356d8d=_0x37378a([0x4e]);for(let _0x578f13=0x0;_0x578f13<_0x186a26[_0x37378a([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x578f13+=0x2){let _0x588e96=window[_0x37378a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x186a26[_0x37378a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x578f13,_0x578f13+0x2));_0x588e96>=_0x477184[_0x37378a([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x588e96-=_0x477184[_0x37378a([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x356d8d+=_0x477184[_0x588e96];}return _0x356d8d;}function _0x226308(){const _0x1e29dd=_0x4aeccf[_0x37378a([0x73,0x70,0x6c,0x69,0x74])](_0x37378a([0x2e]));if(0x3!=_0x1e29dd[_0x37378a([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3473d3(_0x1e29dd[0x1]);function _0x3473d3(_0x2427d1){const _0x24f4ab=_0x58785a(_0x2427d1);return _0x24f4ab&&_0x4f5a48()?_0x24f4ab:null;function _0x4f5a48(){const _0x4030c1=_0x24f4ab[_0x37378a([0x6a,0x74,0x69])],_0x3c30ba=window[_0x37378a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4030c1[_0x37378a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4030c1[_0x37378a([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x27a8c8={..._0x24f4ab,[_0x37378a([0x6a,0x74,0x69])]:_0x4030c1[_0x37378a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4030c1[_0x37378a([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x27a8c8[_0x37378a([0x76,0x63])],_0x2a83ac(_0x27a8c8)==_0x3c30ba;}}}async function _0x5e0859(){let _0x2a3c30=!0x0;try{const _0x538d14=_0x4aeccf[_0x37378a([0x73,0x70,0x6c,0x69,0x74])](_0x37378a([0x2e])),[_0x2cae42,_0x169034,_0x49bae6]=_0x538d14;return _0x469334(_0x2cae42),await _0x2b6418(_0x2cae42,_0x169034,_0x49bae6),_0x2a3c30;}catch(_0x231416){return!0x1;}function _0x469334(_0xfe4220){const _0x57e820=_0x58785a(_0xfe4220);_0x57e820&&_0x57e820[_0x37378a([0x61,0x6c,0x67])]==_0x37378a([0x45,0x53,0x32,0x35,0x36])||(_0x2a3c30=!0x1);}async function _0x2b6418(_0x1c3922,_0x19c858,_0x3c3e6c){const _0x32cd82=window[_0x37378a([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x37378a([0x66,0x72,0x6f,0x6d])](_0x51f94a(_0x3c3e6c),_0x262550=>_0x262550[_0x37378a([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x38b1fd=new window[(_0x37378a([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x37378a([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1c3922+_0x37378a([0x2e])+_0x19c858),_0x9f3264=window[_0x37378a([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x37378a([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x9f3264)return;const _0x3396f0=await _0x9f3264[_0x37378a([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x37378a([0x6a,0x77,0x6b]),_0x111f43,{[_0x37378a([0x6e,0x61,0x6d,0x65])]:_0x37378a([0x45,0x43,0x44,0x53,0x41]),[_0x37378a([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x37378a([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x37378a([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x9f3264[_0x37378a([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x37378a([0x6e,0x61,0x6d,0x65])]:_0x37378a([0x45,0x43,0x44,0x53,0x41]),[_0x37378a([0x68,0x61,0x73,0x68])]:{[_0x37378a([0x6e,0x61,0x6d,0x65])]:_0x37378a([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3396f0,_0x32cd82,_0x38b1fd)||(_0x2a3c30=!0x1);}}function _0x58785a(_0x18ec41){return _0x18ec41[_0x37378a([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x37378a([0x65,0x79]))?JSON[_0x37378a([0x70,0x61,0x72,0x73,0x65])](_0x51f94a(_0x18ec41)):null;}function _0x51f94a(_0xd9e314){return window[_0x37378a([0x61,0x74,0x6f,0x62])](_0xd9e314[_0x37378a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x37378a([0x2b]))[_0x37378a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x37378a([0x2f])));}function _0x2a83ac(_0x45f702){let _0x312474=0x1505;function _0x30c731(_0x39e47c){for(let _0x467d24=0x0;_0x467d24<_0x39e47c[_0x37378a([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x467d24++){const _0x5363a7=_0x39e47c[_0x37378a([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x467d24);_0x312474=(_0x312474<<0x5)+_0x312474+_0x5363a7,_0x312474&=_0x312474;}}function _0x3b320c(_0xac5405){Array[_0x37378a([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0xac5405)?_0xac5405[_0x37378a([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3b320c):_0xac5405&&typeof _0xac5405==_0x37378a([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x37378a([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0xac5405)[_0x37378a([0x73,0x6f,0x72,0x74])]()[_0x37378a([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x3900c9,_0x429f23])=>{_0x30c731(_0x3900c9),_0x3b320c(_0x429f23);}):_0x30c731(window[_0x37378a([0x53,0x74,0x72,0x69,0x6e,0x67])](_0xac5405));}return _0x3b320c(_0x45f702),_0x312474>>>0x0;}function _0x473dc2(_0x149751){return _0x149751[_0x37378a([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x37378a([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x37378a([0x30]));}function _0x2f7b8c(_0xcb09bc){return _0xcb09bc[_0x37378a([0x73,0x70,0x6c,0x69,0x74])]('')[_0x37378a([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x37378a([0x6a,0x6f,0x69,0x6e])]('');}function _0x47be87(_0x5aa5c6){return _0x42943e[_0x37378a([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x37378a([0x68,0x61,0x73])](_0x5aa5c6);}function _0x2417f3(_0x31ece7){return _0x42943e[_0x37378a([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x37378a([0x67,0x65,0x74])](_0x31ece7);}function _0x23c3e6(){}function _0x37378a(_0x19b99b){return _0x19b99b['map'](_0x20c392=>String['fromCharCode'](_0x20c392))['join']('');}_0xef48ef(await _0x41daa3());}(this);}['createRevision'](_0x25af66){const _0x5145d7=this['editor']['plugins']['get']('Users');return new h({'id':_0x25af66['id'],'name':_0x25af66['name'],'creator':_0x25af66['creatorId']?_0x5145d7['getUser'](_0x25af66['creatorId']):null,'diffData':_0x25af66['diffData']||_0x25af66['data'],'authors':_0x25af66['authorsIds']['map'](_0x4dbd85=>_0x5145d7['getUser'](_0x4dbd85)),'createdAt':new Date(_0x25af66['createdAt']),'attributes':_0x25af66['attributes'],'fromVersion':_0x25af66['fromVersion'],'toVersion':_0x25af66['toVersion']});}['addRevision'](_0x57f891,_0x348984=0x0){this['_revisions']['add'](_0x57f891,_0x348984);}['getRevision'](_0x2a1305){return this['_revisions']['get'](_0x2a1305);}['getRevisions'](_0x471c63={'toJSON':!0x1}){const _0x525dce=Array['from'](this['_revisions']);return _0x525dce['reverse'](),_0x471c63['toJSON']?_0x525dce['map'](_0x167d30=>_0x167d30['toJSON']()):_0x525dce;}['getIndex'](_0x4a320f){return this['_revisions']['getIndex'](_0x4a320f);}['getEarlierVisibleRevision'](_0x4c8ef1){const [,_0x374cca]=this['getRevisionsIterator'](_0x4c8ef1,{'direction':'earlier'});return _0x374cca;}['getLaterVisibleRevision'](_0x5f020d){const [,_0x40437a]=this['getRevisionsIterator'](_0x5f020d,{'direction':'later'});return _0x40437a;}['getRevisionsInDiff'](_0xe37bbf){const _0xe8b7b1=[];for(const _0x12d303 of this['getRevisionsIterator'](_0xe37bbf['newRevisionId']))if(_0xe8b7b1['push'](_0x12d303),_0x12d303['id']===_0xe37bbf['oldRevisionId'])break;return _0xe8b7b1;}*['getRevisionsIterator'](_0x301657,{direction:_0xf3f1d0='earlier',filter:_0x1d4b36=()=>!0x0}={}){const _0x303a9a='earlier'===_0xf3f1d0?0x1:-0x1;let _0x1c5cc6=this['_revisions']['get'](_0x301657),_0x2961f7=this['getIndex'](_0x1c5cc6);for(yield _0x1c5cc6;_0x1c5cc6;){if(_0x2961f7+=_0x303a9a,_0x1c5cc6=this['getRevision'](_0x2961f7),!_0x1c5cc6)return;_0x1d4b36(_0x1c5cc6)&&(yield _0x1c5cc6);}}}class V extends _0x3d5130{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x480465,'c'],[_0x4eff57,'a'],[_0x36b7a8,'e'],[_0x1108d1,'r'],[_0xf6ff,'u']]);['_typeCharToViewClass']=new Map([['c',_0x480465],['a',_0x4eff57],['e',_0x36b7a8],['r',_0x1108d1],['u',_0xf6ff]]);async['loadRevisionData'](_0x509325,_0x1e442a){if(_0x509325['diffData']||!_0x1e442a)return;const _0x1db49c=this['editor']['config']['get']('collaboration.channelId'),_0x3ffe79=await _0x1e442a['getRevision']({'channelId':_0x1db49c,'revisionId':_0x509325['id']});_0x509325['diffData']=_0x3ffe79['diffData'];}['getRevisionDocumentData'](_0x5a408f){const _0x5a55b0={};for(const _0x1f0a98 in _0x5a408f['diffData']){if(_0x5a408f['diffData'][_0x1f0a98]['attachChange']&&!_0x5a408f['diffData'][_0x1f0a98]['attachChange']['isAttached'])continue;const _0x259f58=this['_removeRevisionMarkers'](JSON['parse'](_0x5a408f['diffData'][_0x1f0a98]['insertions'])),_0x438589=this['editor']['editing']['view']['document'],_0x34e56e=new _0x4a3ef3(_0x438589,_0x259f58['map'](_0x4fcd43=>this['_getViewFromDiffObj'](_0x4fcd43,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x5a55b0[_0x1f0a98]=this['editor']['data']['processor']['toData'](_0x34e56e),this['editor']['data']['processor']['useFillerType']('default');}return _0x5a55b0;}['getRevisionRootsAttributes'](_0x529c3d){const _0x2b4663={};for(const _0x3a2f67 in _0x529c3d['diffData'])_0x529c3d['diffData'][_0x3a2f67]['attachChange']&&!_0x529c3d['diffData'][_0x3a2f67]['attachChange']['isAttached']||(_0x2b4663[_0x3a2f67]=_0x529c3d['diffData'][_0x3a2f67]['attributesAfter']||{});return _0x2b4663;}['_getTypeCharForViewElement'](_0x1f4d56){return this['_viewClassToTypeChar']['get'](_0x1f4d56['constructor']);}['_getViewFromDiffObj'](_0x5e16b1,_0x1fad73){const _0x3f47a4=this['editor']['editing']['view']['document'];if('string'==typeof _0x5e16b1)return new _0x1536f9(_0x3f47a4,_0x5e16b1);{let _0x150fda,_0xe2b516;_0xe2b516='u'==_0x5e16b1['type']||'r'==_0x5e16b1['type']?[]:_0x5e16b1['children']['map'](_0x3f7343=>this['_getViewFromDiffObj'](_0x3f7343,_0x1fad73));const _0x2d08d5=this['_typeCharToViewClass']['get'](_0x5e16b1['type'])||_0x4e8c77,_0x2f355d=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x150fda=new _0x2d08d5(_0x3f47a4,_0x5e16b1['name'],_0x5e16b1['attributes'],_0xe2b516),'u'==_0x5e16b1['type']){const _0x1e8636=_0x5e16b1['children'][0x0];if(_0x150fda['render']=function(_0xdcf991){const _0x4d97f4=_0xdcf991['createElement']('div');return _0x4d97f4['innerHTML']=_0x1e8636,_0x4d97f4['childNodes'][0x0];},_0x1fad73){const _0x223234=new _0x4a3ef3(_0x3f47a4);_0x223234['_appendChild'](_0x150fda);const _0x4fd99d=Array['from'](_0x2f355d['viewChildrenToDom'](_0x223234,{'bind':!0x1})),_0x41d825=_0x2f355d['domDocument']['createElement']('div');_0x41d825['append'](..._0x4fd99d),_0x150fda=Array['from'](_0x2f355d['domChildrenToView'](_0x41d825))[0x0];}}else{if('r'==_0x5e16b1['type']){const _0x5dc0f8=_0x5e16b1['children'][0x0];if(_0x150fda['render']=function(_0x38b3fb){_0x38b3fb['innerHTML']=_0x5dc0f8;},_0x1fad73){const _0x2bed65=new _0x4a3ef3(_0x3f47a4);_0x2bed65['_appendChild'](_0x150fda);const _0x25671f=Array['from'](_0x2f355d['viewChildrenToDom'](_0x2bed65,{'bind':!0x1})),_0x3c7186=_0x2f355d['domDocument']['createElement']('div');_0x3c7186['append'](..._0x25671f);const _0xe80b33=Array['from'](_0x2f355d['domChildrenToView'](_0x3c7186));_0xe80b33['length']>0x1?_0x150fda['_appendChild'](_0xe80b33):_0x150fda=_0xe80b33[0x0];}}}if(_0x5e16b1['customProperties']){for(const [_0x5d18ba,_0x1b4e4c]of _0x5e16b1['customProperties'])_0x150fda['_setCustomProperty'](_0x5d18ba,_0x1b4e4c);}const _0x35e2a4=_0x5e16b1['fillerOffset']||null;return _0x150fda['getFillerOffset']=()=>_0x35e2a4,_0x150fda;}}['_makeModelFromViewString'](_0x1ddb78){const _0x332b61=JSON['parse'](_0x1ddb78),_0x1bd8ff=this['editor']['editing']['view']['document'],_0x1eab18=new _0x4a3ef3(_0x1bd8ff,_0x332b61['map'](_0x50c766=>this['_getViewFromDiffObj'](_0x50c766,!0x0)));return this['editor']['data']['toModel'](_0x1eab18);}['_removeRevisionMarkers'](_0x1681f5){return(_0x1681f5=_0x1681f5['filter'](_0x53ecd2=>!_0x53ecd2['name']||'revision-start'!==_0x53ecd2['name']&&'revision-end'!==_0x53ecd2['name']))['forEach'](_0x2335e3=>{'string'!=typeof _0x2335e3&&(_0x2335e3['children']=this['_removeRevisionMarkers'](_0x2335e3['children']),_0x2335e3['attributes']=_0x2335e3['attributes']['filter'](_0x488c11=>!_0x488c11[0x0]['startsWith']('data-revision-')));}),_0x1681f5;}}function g(_0x2e0766,_0x122b35,_0x36342a){const t=_0x2e0766['t'];switch(_0x122b35){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'},_0x36342a);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x36342a);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 u extends _0x3d5130{['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[_0x21cb4b,I,V,_0xa4c28f];}constructor(_0x27264c){super(_0x27264c),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new x(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x1a0c5c=_0xbd2e10();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x1a0c5c},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 _0x55203d=this['repository']['getRevision'](0x0),_0x46d66b=_0x55203d&&null===_0x55203d['creator']?_0x55203d:null;if(this['_continueCurrentRevision']=!!_0x46d66b&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x32a2c8=this['_source']['getCurrentRevisionId'](),_0x14f275=this['repository']['getRevision'](_0x32a2c8);if(_0x14f275)this['_startingVersion']=_0x14f275['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x170f0a=this['_source']['history']['_operations']['find'](_0x74888c=>!_0x74888c['_isInit']),_0x318805=_0x170f0a?_0x170f0a['baseVersion']:this['_source']['history']['version'];_0x55203d?(_0x55203d['toVersion']<_0x318805&&_0x55203d['_update']({'toVersion':_0x318805}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x46d66b['id'],this['_startingVersion']=_0x46d66b['fromVersion']):(this['_startingVersion']=_0x55203d['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x318805,this['_continueCurrentRevision']=!0x1);}}else _0x46d66b&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x46d66b['toVersion'],this['editor']['model']['document']['history']['version']),_0x46d66b['fromVersion']===_0x46d66b['toVersion']?(0x0!==_0x46d66b['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x46d66b['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x46d66b['id'],this['_startingVersion']=_0x46d66b['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',_0x1a8568=>!_0x1a8568),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x52ff3d=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x551451;for(const _0x12fbcb in _0x52ff3d){const _0x3156ac=_0x12fbcb,_0x14f21a=_0x52ff3d[_0x3156ac];if('revisionHistoryLicenseKeyValid'==_0x14f21a||'revisionHistoryLicenseKeyInvalid'==_0x14f21a||'revisionHistoryLicenseKeyExpired'==_0x14f21a||'revisionHistoryLicenseKeyDomainLimit'==_0x14f21a||'revisionHistoryLicenseKeyNotAllowed'==_0x14f21a||'revisionHistoryLicenseKeyEvaluationLimit'==_0x14f21a||'revisionHistoryLicenseKeyTrialLimit'==_0x14f21a||'revisionHistoryLicenseKeyUsageLimit'==_0x14f21a){delete _0x52ff3d[_0x3156ac],_0x551451=_0x14f21a,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x551451&&_0x52ff3d['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x551451&&_0x52ff3d['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x551451&&_0x52ff3d['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x551451&&_0x52ff3d['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x551451&&_0x52ff3d['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x551451&&_0x52ff3d['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x551451&&_0x52ff3d['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x59ce36=this['repository']['getRevision'](0x0),_0xe2e808=await this['getRevisionDocumentData'](_0x59ce36),_0x3df310=await this['getRevisionRootsAttributes'](_0x59ce36);this['_replaceEditorDataWithRevisionData'](_0xe2e808,_0x3df310);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x2b3c81){this['_source']=_0x2b3c81;}async['update'](){const _0x4e62a1=await this['_source']['getLatestVersion']();if(_0x4e62a1>this['currentRevision']['toVersion']){await this['_loadState']();const _0x392a80=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x4e62a1});_0x392a80['authors']=_0x392a80['authorsIds']['map'](_0x38e866=>this['editor']['plugins']['get']('Users')['getUser'](_0x38e866)),this['currentRevision']['_update'](_0x392a80);}}async['saveRevision'](_0x179199={},_0x4bc4f6=null){const _0x33a0fb=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x4bc4f6>this['currentRevision']['toVersion']&&(_0x4bc4f6=null),null===_0x4bc4f6&&(_0x4bc4f6=await this['_source']['getLatestVersion']());const _0x38562e=this['_getFromVersion'](_0x4bc4f6),_0x3b52bf=this['buildRevisionData']({'from':_0x38562e,'to':_0x4bc4f6});if(this['currentRevision']['toVersion']<_0x4bc4f6){const _0x44de63=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x4bc4f6,'to':_0x4bc4f6});_0x44de63['authors']=[],_0x44de63['authorsIds']=[],_0x44de63['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x44de63,!0x0),delete _0x44de63['authors'],_0x33a0fb['push'](_0x44de63);}_0x179199['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x179199['name']=_0x179199['name']||null,_0x179199['id']=_0x179199['id']||_0xbd2e10(),_0x179199={..._0x179199,..._0x3b52bf};const _0x40d6ca=this['addRevisionData'](_0x179199);_0x33a0fb['push'](_0x179199);const _0x41dcbc=this['repository']['getIndex'](_0x40d6ca);if(0x0!==_0x41dcbc){const _0x30b9db=this['repository']['getRevision'](_0x41dcbc-0x1);if(_0x30b9db['fromVersion']!==_0x4bc4f6){const _0x44fce0=this['_revisionDataBuilder']['getData'](_0x4bc4f6,_0x30b9db['toVersion']),_0x268c79={'id':_0x30b9db['id'],'diffData':_0x44fce0['diffData'],'authorsIds':_0x44fce0['authorsIds'],'authors':_0x44fce0['authorsIds']['map'](_0x190386=>this['editor']['plugins']['get']('Users')['getUser'](_0x190386)),'fromVersion':_0x4bc4f6};_0x30b9db===this['currentRevision']&&(_0x268c79['createdAt']=new Date(_0x179199['createdAt']['getTime']()+0xa)),_0x30b9db['_update'](_0x268c79,!0x0),delete _0x268c79['authors'],_0x33a0fb['push'](_0x268c79);}}if(this['adapter']){for(const _0x23822a of _0x33a0fb)this['_bufferUpdate'](_0x23822a['id'],_0x23822a,!0x0);this['sendBufferedUpdates']();}return _0x40d6ca;}['addRevisionData'](_0x1a323a){const _0x31217c=this['repository']['createRevision'](_0x1a323a);return this['adapter']&&_0x31217c['on']('_update',(_0x5aed13,_0x43de0d,_0x10dd49)=>{_0x10dd49||(this['_bufferUpdate'](_0x43de0d['id'],_0x43de0d,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x31217c,this['_findInsertionIndex'](_0x31217c)),_0x31217c;}async['getRevisionDocumentData'](_0x5d151f){return await this['_utils']['loadRevisionData'](_0x5d151f,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x5d151f);}async['getRevisionRootsAttributes'](_0x3ea34f){return await this['_utils']['loadRevisionData'](_0x3ea34f,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x3ea34f);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x5d6836=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x2d16d2=0x0;_0x2d16d2<_0x5d6836['length'];_0x2d16d2++){const _0x56f677=_0x5d6836[_0x2d16d2];let _0x17951a=!0x1;for(const _0x39e7a5 of Object['keys'](_0x56f677))void 0x0===_0x56f677[_0x39e7a5]?delete _0x56f677[_0x39e7a5]:'id'!==_0x39e7a5&&(_0x17951a=!0x0);_0x17951a||(_0x5d6836[_0x2d16d2]=null);}if(_0x5d6836=_0x5d6836['filter'](_0xe8fdbd=>null!==_0xe8fdbd),!_0x5d6836['length'])return;for(let _0x53af88=0x0;_0x53af88<_0x5d6836['length'];_0x53af88++){const _0x924734=_0x5d6836[_0x53af88];void 0x0!==_0x924734['fromVersion']&&void 0x0===_0x924734['toVersion']&&(_0x924734['toVersion']=this['repository']['getRevision'](_0x924734['id'])['toVersion']),void 0x0!==_0x924734['toVersion']&&void 0x0===_0x924734['fromVersion']&&(_0x924734['fromVersion']=this['repository']['getRevision'](_0x924734['id'])['fromVersion']);}const _0x323095=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x5d6836,_0x323095)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x8917b1=>{if(_0x8917b1){for(const _0x3859df of _0x8917b1)this['setRevisionData']({'id':_0x3859df['id'],'createdAt':_0x3859df['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x212330=null,from:_0x9f506a=null,to:_0x553a80=null}){_0x9f506a=null!==_0x9f506a?_0x9f506a:_0x212330['fromVersion'],_0x553a80=null!==_0x553a80?_0x553a80:_0x212330['toVersion'];const _0x5e07a3=this['_revisionDataBuilder']['getData'](_0x9f506a,_0x553a80),_0x564a57={'diffData':_0x5e07a3['diffData'],'authorsIds':_0x5e07a3['authorsIds'],'fromVersion':_0x9f506a,'toVersion':_0x553a80};if(!_0x212330||_0x553a80!==_0x212330['toVersion']){const _0x10912d=_0x553a80-0x1,_0x52800b=this['_source']['history']['getOperation'](_0x10912d);_0x564a57['createdAt']=_0x52800b&&_0x52800b['createdAt']||new Date();}if(this['_loadedStateData']&&_0x9f506a===this['_loadedStateData']['fromVersion']){for(const _0x1f2718 of this['_loadedStateData']['authors'])_0x564a57['authorsIds']['includes'](_0x1f2718['id'])||_0x564a57['authorsIds']['push'](_0x1f2718['id']);}return _0x564a57;}['_bufferUpdate'](_0x48cbb1,_0x12d044,_0x84fb7e){if(this['_bufferedUpdates']['has'](_0x48cbb1)){const _0x18ba2d=this['_bufferedUpdates']['get'](_0x48cbb1);_0x12d044=_0x84fb7e?{..._0x18ba2d,..._0x12d044}:{..._0x12d044,..._0x18ba2d};}this['_bufferedUpdates']['set'](_0x48cbb1,_0x12d044);}['setRevisionData'](_0x1b442a){const _0x9111d1=this['repository']['getRevision'](_0x1b442a['id']);if(_0x1b442a['createdAt']&&(_0x1b442a['createdAt']=new Date(_0x1b442a['createdAt'])),_0x1b442a['authorsIds']){const _0x324654=this['editor']['plugins']['get']('Users');_0x1b442a['authors']=_0x1b442a['authorsIds']['map'](_0x57a644=>_0x324654['getUser'](_0x57a644));}_0x9111d1['_update'](_0x1b442a,!0x0);}['_createInitialRevision'](_0x452d5b){const _0x5df823=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x5df823)this['_initialRevisionId']=_0x5df823['id'];else{const _0x15b5ce=!this['editor']['model']['document']['roots']['find'](_0xfb644d=>this['editor']['model']['hasContent'](_0xfb644d)),_0x2c6a11=this['editor']['plugins']['get']('Users')['me']['id'],_0x2902f0=g(this['editor']['locale'],_0x15b5ce?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x452d5b,'to':_0x452d5b,'id':this['_initialRevisionId'],'name':_0x2902f0,'creatorId':_0x2c6a11});}}['_createCurrentRevision'](_0x1bea53){const _0x2a13ac=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x2a13ac),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x1bea53,'to':_0x1bea53,'id':_0x2a13ac,'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'](_0x1b2569,_0x1fe813){let _0x47a39c=this['editor']['config']['get']('initialData'),_0x1bc24b=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x47a39c){_0x47a39c={};for(const _0x2ca868 of this['editor']['model']['document']['getRootNames']())_0x47a39c[_0x2ca868]='';}if('string'==typeof _0x47a39c&&(_0x47a39c={'main':_0x47a39c}),void 0x0===_0x1bc24b){_0x1bc24b={};for(const _0x512b60 of this['editor']['model']['document']['getRootNames']())_0x1bc24b[_0x512b60]={};}let _0x1b7f75=!0x1;const _0x216acf=Object['keys'](_0x47a39c),_0x59920b=Object['keys'](_0x1b2569);for(const _0x50e64f of _0x216acf){if(_0x47a39c[_0x50e64f]!==_0x1b2569[_0x50e64f]&&''!==_0x47a39c[_0x50e64f]['trim']()){_0x1b7f75=!0x0;break;}if(!_0xf29574(_0x1bc24b[_0x50e64f],_0x1fe813[_0x50e64f])&&Object['keys'](_0x1bc24b[_0x50e64f])['length']>0x0){_0x1b7f75=!0x0;break;}}_0x1b7f75||(_0x1b7f75=_0x59920b['some'](_0x302903=>!this['editor']['model']['document']['getRoot'](_0x302903))),_0x1b7f75&&_0x2a099f('editor-initial-data-replaced-with-revision-data',{'editorData':_0x47a39c,'editorRootsAttributes':_0x1bc24b,'revisionData':_0x1b2569,'revisionRootsAttributes':_0x1fe813}),this['editor']['config']['set']('initialData',_0x1b2569),this['editor']['config']['set']('rootsAttributes',_0x1fe813);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x49d438=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x49d438['add'](g(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x4ae7d1){const _0x1e03f1=this['repository']['getRevisions']();_0x1e03f1['reverse']();let _0x4f8b33=0x0;for(;_0x4f8b33<_0x1e03f1['length'];){const _0x381811=_0x1e03f1[_0x4f8b33];if(_0x381811===this['currentRevision']){_0x4f8b33++;continue;}if(_0x381811['id']===this['_initialRevisionId'])break;const _0x496f80=_0x4ae7d1['toVersion']-_0x381811['toVersion']||_0x4ae7d1['fromVersion']-_0x381811['fromVersion'];if(_0x496f80>0x0)break;if(_0x496f80<0x0)_0x4f8b33++;else{if(!_0x4ae7d1['creator']&&_0x381811['creator'])break;if(_0x381811['creator']||!_0x4ae7d1['creator']){if(_0x4ae7d1['createdAt']>_0x381811['createdAt'])break;_0x4f8b33++;}else _0x4f8b33++;}}return _0x4f8b33;}['_getFromVersion'](_0x2c446c){const _0x1e4d3b=this['repository']['getRevisions']();_0x1e4d3b['reverse'](),_0x1e4d3b['shift']();const _0xa99121=_0x1e4d3b['find'](_0xe402c3=>_0xe402c3['toVersion']<=_0x2c446c)['toVersion'];return _0xa99121<this['_startingVersion']?this['_startingVersion']:_0xa99121;}['_makeRevision']({name:_0x34f8f8,from:_0xe54c74,to:_0x2982d4,creatorId:_0x17b029,id:_0x502cab}){const _0x4ea2e1=this['buildRevisionData']({'from':_0xe54c74,'to':_0x2982d4});_0x4ea2e1['name']=_0x34f8f8,_0x4ea2e1['creatorId']=_0x17b029,_0x4ea2e1['id']=_0x502cab;const _0x17bcf8=this['addRevisionData'](_0x4ea2e1);return this['adapter']&&this['_bufferUpdate'](_0x4ea2e1['id'],_0x4ea2e1,!0x0),_0x17bcf8;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class x{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x28a97d){this['editor']=_0x28a97d,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'](_0x27cc4e){this['source']=_0x27cc4e;const _0x2d7921=new Map(),_0x328f1a=new Map(),_0x164489=this['editor']['model']['document']['roots']['map'](_0xb0f777=>_0xb0f777['rootName']);for(const _0x578c5d of _0x164489){const _0x15e2cc=this['editor']['model']['document']['getRoot'](_0x578c5d),_0x3f8018=N(_0x15e2cc);_0x2d7921['set'](_0x578c5d,_0x3f8018),_0x328f1a['set'](_0x578c5d,Object['fromEntries'](_0x15e2cc['getAttributes']()));}const _0x283cab=Array['from'](this['editor']['model']['markers'])['map'](_0x3bddd5=>[_0x3bddd5['name'],_0x3bddd5['getRange']()]),_0x411eb3=this['source']['version'];this['_saveMetaData'](_0x411eb3,_0x2d7921,_0x283cab,_0x328f1a),this['_startingRevisionId']=this['_revisionId'];const _0x5dba0b=new Map(),_0x3b01e3=new Map();for(const _0x14fcbd of _0x164489){const _0x4d4890=P(_0x14fcbd);_0x5dba0b['set'](_0x14fcbd,_0x4d4890),_0x3b01e3['set'](_0x14fcbd,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x5dba0b,[],_0x3b01e3);}['getData'](_0x35e9dd,_0x598674){if(this['_lastFrom']===_0x35e9dd&&this['_lastTo']<=_0x598674)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x598674,!0x0);else{if(!this['_savedMetaData']['has'](_0x35e9dd)){const _0x38c02b=this['_getPreviousFrom'](_0x35e9dd);this['_calculateMetaData'](_0x38c02b,_0x35e9dd,!0x1);}this['_calculateMetaData'](_0x35e9dd,_0x598674,!0x0);}return this['_lastFrom']=_0x35e9dd,this['_lastTo']=_0x598674,this['_getState']();}['loadState'](_0xee1ef3){const _0x115622=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0xee1ef3['fromVersion'],this['_lastTo']=_0xee1ef3['toVersion'];for(const _0x9b5fdb in _0xee1ef3['diffData']){const _0x296fd1=_0xee1ef3['diffData'][_0x9b5fdb]['attachChange'],_0x13d753=_0x5bb63f(_0xee1ef3['diffData'][_0x9b5fdb]['attributesBefore'])||{},_0x2ac425=_0x115622['_makeModelFromViewString'](_0xee1ef3['diffData'][_0x9b5fdb]['deletions']);_0x2ac425['rootName']=_0x9b5fdb,_0x2ac425['_isAttached']=!_0x296fd1||!_0x296fd1['isAttached'],_0x2ac425['isAttached']=()=>_0x2ac425['_isAttached'],this['_baseRoots']['set'](_0x9b5fdb,_0x2ac425),this['_baseRootsAttributes']['set'](_0x9b5fdb,_0x13d753),_0x296fd1&&this['_touchedRoots']['set'](_0x9b5fdb,_0x296fd1);const _0x3848de=this['_makeIdsRoot'](_0x2ac425);this['_baseIdsRoots']['set'](_0x9b5fdb,_0x3848de);for(const [_0x2b4c38,_0x2ebf55]of _0x2ac425['markers']){if(!_0x2b4c38['startsWith']('revision:'))continue;const _0x911743=_0x2b4c38['split'](':')[0x2];for(const _0x233683 of _0x2ebf55['getWalker']({'singleCharacters':!0x0})){const _0x38a440=this['_getVidAttributeName'](_0x233683),_0x195b73='elementEnd'==_0x233683['type']?_0x233683['previousPosition']['path']['slice'](0x0,-0x1):_0x233683['previousPosition']['path'],_0x4bc740=_0x3848de['getNodeByPath'](_0x195b73)['getAttribute'](_0x38a440);this['_touched']['set'](_0x4bc740,{'userId':_0x911743});}}}this['_startingRevisionId']=this['_revisionId'];const _0x24c9eb=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x540bdb=>!this['_touched']['has'](_0x540bdb));let _0x432a1c=0x0;const _0x323b4e=new Map();for(const _0xf388ca in _0xee1ef3['diffData']){const _0x4e78a3=_0xee1ef3['diffData'][_0xf388ca]['attachChange'],_0x99172=_0x5bb63f(_0xee1ef3['diffData'][_0xf388ca]['attributesAfter'])||{},_0x21f0a5=_0x115622['_makeModelFromViewString'](_0xee1ef3['diffData'][_0xf388ca]['insertions']);_0x21f0a5['rootName']=_0xf388ca,_0x21f0a5['_isAttached']=!_0x4e78a3||_0x4e78a3['isAttached'],_0x21f0a5['isAttached']=()=>_0x21f0a5['_isAttached'],this['_diffRoots']['set'](_0xf388ca,_0x21f0a5),this['_diffRootsAttributes']['set'](_0xf388ca,_0x99172);const _0x7c8479=this['_makeIdsRoot'](_0x21f0a5,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0xf388ca,_0x7c8479),_0x323b4e['set'](_0xf388ca,_0x21f0a5['isAttached']()?_0x99172:{});for(const [_0x54e484,_0x5f142f]of _0x21f0a5['markers']){if(!_0x54e484['startsWith']('revision:'))continue;const _0x31d162=_0x54e484['split'](':')[0x2];for(const _0x391977 of _0x5f142f['getWalker']({'singleCharacters':!0x0})){const _0x5c3ec2=this['_getVidAttributeName'](_0x391977),_0x44d6f6=this['_revisionId']++,_0x58ffd9='elementEnd'==_0x391977['type']?_0x391977['previousPosition']['path']['slice'](0x0,-0x1):_0x391977['previousPosition']['path'];_0x7c8479['getNodeByPath'](_0x58ffd9)['_setAttribute'](_0x5c3ec2,_0x44d6f6),this['_touched']['set'](_0x44d6f6,{'userId':_0x31d162});}}for(const _0x34214f of this['editor']['model']['createRangeIn'](_0x21f0a5)['getWalker']({'singleCharacters':!0x0})){const _0x462c5=this['_getVidAttributeName'](_0x34214f),_0x4d5824='elementEnd'==_0x34214f['type']?_0x34214f['previousPosition']['path']['slice'](0x0,-0x1):_0x34214f['previousPosition']['path'],_0x2b9b7a=_0x7c8479['getNodeByPath'](_0x4d5824);_0x2b9b7a['getAttribute'](_0x462c5)>0x0||_0x2b9b7a['_setAttribute'](_0x462c5,_0x24c9eb[_0x432a1c++]);}for(const [_0x39bc83,_0x223802]of _0x21f0a5['markers'])_0x39bc83['startsWith']('revision:')||this['_markers']['set'](_0x39bc83,_0x223802);}const _0x5d25c2=P('$graveyard');this['_baseRoots']['set']('$graveyard',_0x5d25c2),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x5d25c2,0x1));const _0x283b3f=P('$graveyard');this['_diffRoots']['set']('$graveyard',_0x283b3f),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x283b3f,0x1));const _0x35d50b=Array['from'](this['_diffRoots'])['map'](([_0x1ae129,_0x41ada0])=>[_0x1ae129,N(_0x41ada0)]);this['_saveMetaData'](this['_lastTo'],_0x35d50b,this['_markers'],_0x323b4e);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x59f6f2,_0x3a064d,_0x21bdbe,_0x3d1ada){const _0x21253c=new Map(_0x3a064d),_0x5848dd=new Map(_0x5bb63f(_0x3d1ada)),_0x39974c=new Map();for(const [_0x1baed4,_0x26a139]of _0x21bdbe)_0x39974c['set'](_0x1baed4,{'start':_0x26a139['start']['clone'](),'end':_0x26a139['end']['clone'](),'rootName':_0x26a139['root']['rootName']});this['_savedMetaData']['set'](_0x59f6f2,{'roots':_0x21253c,'markers':_0x39974c,'rootsAttributes':_0x5848dd});}['_removeMetaData'](_0x41e101){this['_savedMetaData']['delete'](_0x41e101);}['_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'](_0x5a686d,_0x4a3072=null){let _0x5e9fea=null;_0x5a686d['is']('documentFragment')||(_0x5e9fea=new ut(_0x5a686d['name'],{'vid_start':null===_0x4a3072?this['_revisionId']++:_0x4a3072++}));const _0x4731f2=[];for(const _0x31180c of _0x5a686d['getChildren']())if(_0x31180c['is']('element')){_0x4731f2['push'](this['_makeIdsRoot'](_0x31180c,_0x4a3072));const _0x11fd23=_0x4731f2[_0x4731f2['length']-0x1];null!==_0x4a3072&&(_0x4a3072=_0x11fd23['is']('element','$text')?_0x11fd23['getAttribute']('vid')+0x1:_0x11fd23['getAttribute']('vid_end')+0x1);}else{for(let _0x528866=0x0;_0x528866<_0x31180c['offsetSize'];_0x528866++)_0x4731f2['push'](new ut('$text',{'vid':null===_0x4a3072?this['_revisionId']++:_0x4a3072++}));}if(_0x5a686d['is']('documentFragment')){const _0xea1aed=P(_0x5a686d['rootName']);return _0xea1aed['_insertChild'](0x0,_0x4731f2),_0xea1aed;}return _0x5e9fea['_setAttribute']('vid_end',null===_0x4a3072?this['_revisionId']++:_0x4a3072++),_0x5e9fea['_insertChild'](0x0,_0x4731f2),_0x5e9fea;}['_calculateMetaData'](_0x5c04be,_0x476292,_0x151274){this['_reset']();const {roots:_0x20c5f0,markers:_0x228575,rootsAttributes:_0xddbb0f}=this['_savedMetaData']['get'](_0x5c04be);this['_baseRoots']=new Map(_0x20c5f0),this['_baseRootsAttributes']=new Map(_0x5bb63f(_0xddbb0f));for(const [_0x23e7fb,_0x489d67]of this['_baseRoots'])if('$graveyard'!==_0x23e7fb&&(this['_diffRoots']['set'](_0x23e7fb,N(_0x489d67)),this['_diffRootsAttributes']=new Map(_0x5bb63f(_0xddbb0f)),_0x151274)){const _0x1bde9f=this['_revisionId'];this['_idsRoots']['set'](_0x23e7fb,this['_makeIdsRoot'](_0x489d67)),this['_baseIdsRoots']['set'](_0x23e7fb,this['_makeIdsRoot'](_0x489d67,_0x1bde9f));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',N(this['_baseRoots']['get']('$graveyard'))),_0x151274&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x575895,_0x1fc2cc]of _0x228575){const _0x3a22f9=this['_baseRoots']['get'](_0x1fc2cc['rootName']),_0x5c4f62=this['_diffRoots']['get'](_0x1fc2cc['rootName']),_0x504c65=new lt(this['_fixPosition'](_0x1fc2cc['start'],_0x3a22f9),this['_fixPosition'](_0x1fc2cc['end'],_0x3a22f9)),_0x2de5a5=this['_fixRange'](_0x504c65,_0x5c4f62);_0x3a22f9['markers']['set'](_0x575895,_0x504c65),this['_markers']['set'](_0x575895,_0x2de5a5);}this['_applyOperations'](_0x5c04be,_0x476292,_0x151274);}['_applyOperations'](_0xce8a57,_0x2bbc2a,_0x3a5bd9){for(const _0x122a90 of this['source']['getOperations'](_0xce8a57,_0x2bbc2a))this['_handleOperation'](_0x122a90,_0x3a5bd9);for(const _0x11a813 of this['_diffRoots']['values']())_0x11a813['markers']['clear']();for(const [_0x581243,_0x35dc54]of this['_markers']){this['_diffRoots']['get'](_0x35dc54['root']['rootName'])['markers']['set'](_0x581243,_0x35dc54['clone']());}const _0x39dd31=new Map(),_0x1f1fcf=new Map();for(const [_0x583541,_0x1cbdf5]of this['_diffRoots'])_0x39dd31['set'](_0x583541,N(_0x1cbdf5)),_0x1f1fcf['set'](_0x583541,this['_diffRootsAttributes']['get'](_0x583541));this['_saveMetaData'](_0x2bbc2a,_0x39dd31,this['_markers'],_0x1f1fcf);}['_getPreviousFrom'](_0x16c4fe){const _0x4b7f1b=Array['from'](this['_savedMetaData']['keys']());_0x4b7f1b['sort']((_0x46c3ca,_0x487a11)=>_0x46c3ca-_0x487a11),_0x4b7f1b['reverse']();for(const _0x33356b of _0x4b7f1b)if(_0x33356b<_0x16c4fe)return _0x33356b;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x36ca62,_0x331002){const _0x4aec50=Array['from'](_0x331002['markers'])['map'](([_0x1b567a,_0x1e54e6])=>[_0x1b567a,this['_fixRange'](_0x1e54e6,_0x36ca62)]);_0x36ca62['markers']=new Map(_0x4aec50);}['_transformMarkers'](_0x23b91d){for(const _0x41e010 of this['_markers']['values']()){const _0x4cfbdc=_0x41e010['getTransformedByOperation'](_0x23b91d),_0x13f22b=lt['_createFromRanges'](_0x4cfbdc);_0x41e010['start']=_0x13f22b['start'],_0x41e010['end']=_0x13f22b['end'];}}['_handleOperation'](_0xf4ec0e,_0x42e32d){if('addRoot'!=_0xf4ec0e['type']&&'detachRoot'!=_0xf4ec0e['type']){if('insert'==_0xf4ec0e['type']){const _0x2a6c8a=_0xf4ec0e['position']['root']['rootName'];this['_diffRoots']['has'](_0x2a6c8a)||(this['_diffRoots']['set'](_0x2a6c8a,P(_0x2a6c8a,!0x0)),this['_diffRootsAttributes']['set'](_0x2a6c8a,{}),_0x42e32d&&this['_idsRoots']['set'](_0x2a6c8a,P(_0x2a6c8a,!0x0)));}else{if('addRootAttribute'==_0xf4ec0e['type']||'removeRootAttribute'==_0xf4ec0e['type']||'changeRootAttribute'==_0xf4ec0e['type'])return void this['_handleRootAttributeOperation'](_0xf4ec0e);'marker'==_0xf4ec0e['type']&&this['_handleMarkerOperation'](_0xf4ec0e);}if('marker'!==_0xf4ec0e['type']){const _0x3808ad=this['_cloneOperation'](_0xf4ec0e,this['_diffRoots']);_0x3808ad['_execute'](),this['_transformMarkers'](_0x3808ad);}if(_0x42e32d)switch(_0xf4ec0e['type']){case'insert':this['_handleInsertOperation'](_0xf4ec0e);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0xf4ec0e);break;case'merge':this['_handleMergeOperation'](_0xf4ec0e);break;case'split':this['_handleSplitOperation'](_0xf4ec0e);}}else this['_handleRootOperation'](_0xf4ec0e,_0x42e32d);}['_cloneOperation'](_0x3ae67d,_0x318ce7){const _0x3e0390=_0x3ae67d['clone']();return _0x3e0390['_authorId']=_0x3ae67d['_authorId'],this['_fixOperation'](_0x3e0390,_0x318ce7),_0x3e0390;}['_getBaseVids'](_0x1ff0a9){return _0x1ff0a9['map'](_0x12489c=>{const _0x1603e5=this['_getVidAttributeName'](_0x12489c);return Number(_0x12489c['item']['getAttribute'](_0x1603e5));});}['_generateTape'](_0x2bad8a,_0xab0509){if(_0x2bad8a['is']('element','$text'))_0xab0509['push']({'item':_0x2bad8a,'type':'text'});else{_0x2bad8a['is']('element')&&_0xab0509['push']({'item':_0x2bad8a,'type':'elementStart'});for(const _0x474f0e of _0x2bad8a['getChildren']())this['_generateTape'](_0x474f0e,_0xab0509);_0x2bad8a['is']('element')&&_0xab0509['push']({'item':_0x2bad8a,'type':'elementEnd'});}return _0xab0509;}['_getState'](){const _0x1c9397=new Map(this['_touched']),_0x55fb43=new Map(_0x1c9397),_0x385679=new Map(),_0x4e01cf={'insertions':{},'deletions':{}},_0x20900a={'insertions':{},'deletions':{}},_0x2df9cb=new Map(),_0x1b6816=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x1b6816['delete']('$graveyard');for(const _0x195b25 of _0x1b6816){const _0x13dba3=this['_diffRoots']['get'](_0x195b25)||P(_0x195b25,!0x1),_0x3d6a39=this['_baseRoots']['get'](_0x195b25)||P(_0x195b25,!0x1);_0x13dba3['isAttached']()||_0x3d6a39['isAttached']()?(_0x4e01cf['insertions'][_0x195b25]=N(_0x13dba3),_0x4e01cf['deletions'][_0x195b25]=N(_0x3d6a39),this['_copyMarkers'](_0x4e01cf['deletions'][_0x195b25],_0x3d6a39),this['_copyMarkers'](_0x4e01cf['insertions'][_0x195b25],_0x13dba3),_0x20900a['insertions'][_0x195b25]=this['_generateTape'](this['_idsRoots']['get'](_0x195b25),[]),_0x20900a['deletions'][_0x195b25]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x195b25)||P(_0x195b25,!0x1),[])):_0x1b6816['delete'](_0x195b25);}for(const _0x3f3b69 of _0x1b6816){const _0x434f2a=_0x20900a['insertions'][_0x3f3b69];for(const _0x44e4e4 of _0x434f2a){const _0xf3c33a=this['_getVidAttributeName'](_0x44e4e4),_0x3b849f=_0x44e4e4['item']['getAttribute'](_0xf3c33a);_0x55fb43['delete'](_0x3b849f),_0x3b849f>=this['_startingRevisionId']&&_0x385679['set'](_0x3b849f,_0x1c9397['get'](_0x3b849f));}}for(const _0x34d812 of _0x1b6816){const _0x4989e2=_0x20900a['insertions'][_0x34d812],_0x5ede86=this['_getBaseVids'](_0x20900a['deletions'][_0x34d812]);let _0x53e554=0x0;for(const _0x23031a of _0x4989e2){const _0x441051=this['_getVidAttributeName'](_0x23031a),_0x51cfac=_0x23031a['item']['getAttribute'](_0x441051);if(!_0x385679['has'](_0x51cfac)&&!_0x2df9cb['has'](_0x51cfac)){if(_0x55fb43['has'](_0x51cfac))_0x53e554++;else{if(_0x51cfac!=_0x5ede86[_0x53e554]){const _0x53706d=_0x1c9397['get'](_0x51cfac)||_0x1c9397['get'](_0x5ede86[_0x53e554]);for(;_0x51cfac!=_0x5ede86[_0x53e554];)_0x55fb43['has'](_0x5ede86[_0x53e554])||(_0x2df9cb['set'](_0x5ede86[_0x53e554],_0x53706d),_0x1c9397['set'](_0x5ede86[_0x53e554],_0x53706d)),_0x53e554++;}_0x53e554++;}}}}for(const _0x300119 of _0x1b6816){const _0x4e0ecb=_0x20900a['insertions'][_0x300119];for(const _0x160584 of _0x4e0ecb){const _0x1b8dc0=this['_getVidAttributeName'](_0x160584),_0x2bc7f8=_0x160584['item']['getAttribute'](_0x1b8dc0);if(_0x2df9cb['has'](_0x2bc7f8)){const _0x49e3ef=_0x2df9cb['get'](_0x2bc7f8);_0x55fb43['has'](_0x2bc7f8)||_0x55fb43['set'](_0x2bc7f8,{..._0x49e3ef}),_0x385679['set'](_0x2bc7f8,{..._0x49e3ef});}}}for(const _0xc70ae3 of _0x55fb43['keys']())_0xc70ae3>=this['_startingRevisionId']&&_0x55fb43['delete'](_0xc70ae3);const _0xcb8b1f=new Map();for(const _0x1313ea of _0x1b6816){let _0x41cf6d=_0x20900a['insertions'][_0x1313ea];for(const _0x587dfc of _0x41cf6d)if(_0x587dfc['item']['is']('element','tableCell')){const _0x9d1b5a=this['_getVidAttributeName'](_0x587dfc),_0x12db9d=_0x587dfc['item']['getAttribute'](_0x9d1b5a);if(_0x385679['has'](_0x12db9d)){const _0x27a7ea=_0x587dfc['item']['parent']['parent']['getAttribute']('vid_start'),_0x439fc5=_0xcb8b1f['get'](_0x27a7ea)||new Set();_0x439fc5['add'](_0x385679['get'](_0x12db9d)['userId']),_0xcb8b1f['set'](_0x27a7ea,_0x439fc5);}}_0x41cf6d=_0x20900a['deletions'][_0x1313ea];for(const _0x276b5e of _0x41cf6d)if(_0x276b5e['item']['is']('element','tableCell')){const _0xa5a83=this['_getVidAttributeName'](_0x276b5e),_0x13e27a=_0x276b5e['item']['getAttribute'](_0xa5a83);if(_0x55fb43['has'](_0x13e27a)){const _0x1fedaa=_0x276b5e['item']['parent']['parent']['getAttribute']('vid_start'),_0xac10b6=_0xcb8b1f['get'](_0x1fedaa)||new Set();_0xac10b6['add'](_0x55fb43['get'](_0x13e27a)['userId']),_0xcb8b1f['set'](_0x1fedaa,_0xac10b6);}}for(const _0x246b48 of _0xcb8b1f['keys']())(_0x385679['has'](_0x246b48)||_0x55fb43['has'](_0x246b48))&&_0xcb8b1f['delete'](_0x246b48);}for(const _0x1a7ba1 of _0x1b6816){const _0xd2c98b=_0x20900a['insertions'][_0x1a7ba1];let _0x53a6b8=null,_0xff43ac=null;for(const _0x54b883 of _0xd2c98b){const _0x514585=this['_getVidAttributeName'](_0x54b883),_0x486472=_0x54b883['item']['getAttribute'](_0x514585),_0x2ca18a=_0xcb8b1f['get'](_0x486472);_0x2ca18a&&'elementStart'==_0x54b883['type']&&(_0x53a6b8=Array['from'](_0x2ca18a)[0x0],_0xff43ac=_0x54b883['item']['getAttribute']('vid_end')),_0x53a6b8&&(_0x55fb43['set'](_0x486472,{'userId':_0x53a6b8}),_0x385679['set'](_0x486472,{'userId':_0x53a6b8})),_0x486472==_0xff43ac&&(_0x53a6b8=null,_0xff43ac=null);}}const _0x481382={},_0x1af3b4=new Set();for(const _0xb3464f of _0x1b6816){const _0x357a20=_0x4e01cf['deletions'][_0xb3464f],_0x571042=_0x4e01cf['insertions'][_0xb3464f];for(const {userId:_0x4dd71c}of this['_touchedMarkers']['values']())null!==_0x4dd71c&&_0x1af3b4['add'](_0x4dd71c);for(const {userId:_0x50a6f3}of this['_touchedRoots']['values']())null!==_0x50a6f3&&_0x1af3b4['add'](_0x50a6f3);this['_markChanges'](_0x571042,_0x20900a['insertions'][_0xb3464f],_0x385679,'insertion',_0x1af3b4),this['_markChanges'](_0x357a20,_0x20900a['deletions'][_0xb3464f],_0x55fb43,'deletion',_0x1af3b4),_0x481382[_0xb3464f]={'insertions':this['_prepareViewToSave'](_0x571042),'deletions':this['_prepareViewToSave'](_0x357a20),'attachChange':this['_touchedRoots']['get'](_0xb3464f)||null,'attributesBefore':_0x5bb63f(this['_baseRootsAttributes']['get'](_0xb3464f))||{},'attributesAfter':_0x5bb63f(this['_diffRootsAttributes']['get'](_0xb3464f))};}return{'diffData':_0x481382,'authorsIds':Array['from'](_0x1af3b4)};}['_processRootBeforeSave'](_0x291aa8){for(const [,_0x6e76d0]of _0x291aa8['markers']){const _0x5cc4cb=_0x6e76d0['start']['getAncestors']()['filter'](_0x42f770=>'tableCell'==_0x42f770['name']);for(const _0x3af578 of _0x5cc4cb)0x1==_0x3af578['childCount']&&_0x3af578['getChild'](0x0)['is']('element','paragraph')&&_0x3af578['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x24f834){this['_processRootBeforeSave'](_0x24f834);const _0x2d0dfb=this['editor']['data']['toView'](_0x24f834,{}),_0x215435=Array['from'](_0x2d0dfb['getChildren']())['map'](_0x4934b7=>this['_getViewJson'](_0x4934b7));return JSON['stringify'](_0x215435);}['_getViewJson'](_0x46fa78){if(_0x46fa78['is']('$text'))return _0x46fa78['data'];{const _0x45086e=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x13582a=_0x46fa78,_0x1c1dc1=this['editor']['data']['htmlProcessor']['domConverter'],_0x3f512e={'type':_0x45086e['_getTypeCharForViewElement'](_0x13582a),'name':_0x13582a['name'],'attributes':Array['from'](_0x13582a['getAttributes']()),'children':Array['from'](_0x13582a['getChildren']())['map'](_0xb0c885=>this['_getViewJson'](_0xb0c885))};if(_0x46fa78['is']('uiElement')&&'$comment'!=_0x46fa78['name']){const _0x1ac8cb=_0x46fa78['render'](_0x1c1dc1['domDocument'],_0x1c1dc1);_0x3f512e['children']['push'](_0x1ac8cb['outerHTML']);}else{if(_0x46fa78['is']('rawElement')){const _0x2b645b=_0x1c1dc1['domDocument']['createElement'](_0x13582a['name']);_0x46fa78['render'](_0x2b645b,_0x1c1dc1),_0x3f512e['children']['push'](_0x2b645b['innerHTML']);}}const _0x13199a=Array['from'](_0x13582a['getCustomProperties']());_0x13199a['length']>0x0&&(_0x3f512e['customProperties']=_0x13199a);const _0x53ba3c=_0x13582a['getFillerOffset']();return null!==_0x53ba3c&&(_0x3f512e['fillerOffset']=_0x53ba3c),_0x3f512e;}}['_markChanges'](_0x4a1131,_0x3a5b7e,_0x1b396d,_0x3ffe7b,_0x11aadc){let _0x5cf014=null,_0x535941=null,_0x27f8a3=0x0;const _0x974041=this['editor']['model'];for(let _0x2d8581=0x0;_0x2d8581<_0x3a5b7e['length'];_0x2d8581++){const _0x11f103=this['_getVidAttributeName'](_0x3a5b7e[_0x2d8581]),_0x4138a5=_0x3a5b7e[_0x2d8581]['item']['getAttribute'](_0x11f103),_0x3af6f8=_0x1b396d['get'](_0x4138a5),_0x562455=_0x2d8581==_0x3a5b7e['length']-0x1;(!_0x5cf014&&_0x3af6f8&&(_0x5cf014=_0x3af6f8,_0x535941=_0x3a5b7e[_0x2d8581]),_0x5cf014&&(!_0x3af6f8||_0x3af6f8['userId']!=_0x5cf014['userId']))&&(_0x401602(_0x3af6f8,F(_0x535941,_0x4a1131,_0x974041),F(_0x3a5b7e[_0x2d8581],_0x4a1131,_0x974041)),_0x5cf014=_0x3af6f8||null,_0x535941=_0x3af6f8?_0x3a5b7e[_0x2d8581]:null),_0x5cf014&&_0x562455&&_0x401602(_0x3af6f8,F(_0x535941,_0x4a1131,_0x974041),B(_0x3a5b7e[_0x2d8581],_0x4a1131,_0x974041));}function _0x401602(_0xd9babe,_0x16bf34,_0x86dbd5){const _0x2150ed=_0x5cf014['userId'],_0x3230c5='revision:'+_0x3ffe7b+':'+_0x2150ed+':'+_0x27f8a3++,_0x4321c8=_0x974041['createRange'](_0x16bf34,_0x86dbd5);_0x4a1131['markers']['set'](_0x3230c5,_0x4321c8),null!==_0x2150ed&&_0x11aadc['add'](_0x2150ed);}}['_getVidAttributeName'](_0x52a327){switch(_0x52a327['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x5178ec,_0x551137){_0x5178ec['baseVersion']=null;for(const _0x419b76 in _0x5178ec){const _0x5b3e0f=_0x5178ec[_0x419b76];if(_0x5b3e0f instanceof ft){const _0xf056c=_0x551137['get'](_0x5b3e0f['root']['rootName']);_0x5178ec[_0x419b76]=this['_fixPosition'](_0x5b3e0f,_0xf056c);}if(_0x5b3e0f instanceof lt){const _0x66126c=_0x551137['get'](_0x5b3e0f['root']['rootName']);_0x5178ec[_0x419b76]=this['_fixRange'](_0x5b3e0f,_0x66126c);}'root'===_0x419b76&&(_0x5178ec['root']=_0x551137['get'](_0x5178ec['root']['rootName']));}}['_fixRange'](_0xf40484,_0x223d7c){return this['editor']['model']['createRange'](this['_fixPosition'](_0xf40484['start'],_0x223d7c),this['_fixPosition'](_0xf40484['end'],_0x223d7c));}['_fixPosition'](_0xb7974d,_0x38b210){return this['editor']['model']['createPositionFromPath'](_0x38b210,_0xb7974d['path'],_0xb7974d['stickiness']);}['_handleInsertOperation'](_0x5c070b){const _0x1de850=this['_idsRoots']['get'](_0x5c070b['position']['root']['rootName']),_0x2d1c5c=this['_fixPosition'](_0x5c070b['position'],_0x1de850),_0x1cb165=null===_0x5c070b['_authorId']?null:_0x5c070b['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x776364=_0x2d1c5c['parent'],_0xd37019=this['_revisionId'],_0x1ebb80=[];for(const _0x4aec08 of _0x5c070b['nodes'])if(_0x4aec08['is']('element'))_0x1ebb80['push'](this['_makeIdsRoot'](_0x4aec08));else{for(let _0x5ae514=0x0;_0x5ae514<_0x4aec08['offsetSize'];_0x5ae514++)_0x1ebb80['push'](new ut('$text',{'vid':this['_revisionId']++}));}const _0x2b7101=this['_revisionId'];for(let _0x375298=_0xd37019;_0x375298<_0x2b7101;_0x375298++)this['_touched']['set'](_0x375298,{'userId':_0x1cb165});_0x776364['_insertChild'](_0x2d1c5c['offset'],_0x1ebb80);}['_handleMoveOperation'](_0x390609){(_0x390609=this['_cloneOperation'](_0x390609,this['_idsRoots']))['_execute']();const _0x3dbec2=null===_0x390609['_authorId']?null:_0x390609['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x312d66=_0x390609['getMovedRangeStart'](),_0x469ece=_0x312d66['parent'],_0x18da33=_0x312d66['offset'];!function _0x27b4ba(_0x2e6984,_0x2c3140,_0x45dfd0,_0x43ec24){for(let _0x3b8d33=_0x45dfd0;_0x3b8d33<_0x43ec24;_0x3b8d33++){const _0x1901d6=_0x2c3140['getChild'](_0x3b8d33);_0x1901d6['is']('element','$text')?_0x2e6984['set'](_0x1901d6['getAttribute']('vid'),{'userId':_0x3dbec2}):(_0x2e6984['set'](_0x1901d6['getAttribute']('vid_start'),{'userId':_0x3dbec2}),_0x27b4ba(_0x2e6984,_0x1901d6,0x0,_0x1901d6['childCount']),_0x2e6984['set'](_0x1901d6['getAttribute']('vid_end'),{'userId':_0x3dbec2}));}}(this['_touched'],_0x469ece,_0x18da33,_0x18da33+_0x390609['howMany']);}['_handleMergeOperation'](_0x766510){const _0x1b6224=null===(_0x766510=this['_cloneOperation'](_0x766510,this['_idsRoots']))['_authorId']?null:_0x766510['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2653dc=_0x766510['targetPosition']['parent'],_0x1cb3ad=_0x766510['sourcePosition']['parent'],_0x352b76=_0x2653dc['getAttribute']('vid_end'),_0x253ccf=_0x1cb3ad['getAttribute']('vid_start');_0x2653dc['_setAttribute']('vid_end',_0x1cb3ad['getAttribute']('vid_end')),_0x1cb3ad['_setAttribute']('vid_end',_0x352b76),this['_touched']['set'](_0x253ccf,{'userId':_0x1b6224}),this['_touched']['set'](_0x352b76,{'userId':_0x1b6224}),_0x766510['_execute']();}['_handleSplitOperation'](_0x37bcd7){const _0x31bcba=null===(_0x37bcd7=this['_cloneOperation'](_0x37bcd7,this['_idsRoots']))['_authorId']?null:_0x37bcd7['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x339faa=_0x37bcd7['graveyardPosition'],_0x565c6d=_0x37bcd7['splitPosition']['parent'];_0x37bcd7['_execute']();const _0x33b79a=_0x565c6d['getAttribute']('vid_end'),_0x5669b1=_0x37bcd7['insertionPosition']['nodeAfter'];if(_0x339faa){const _0x54aeb9=_0x5669b1['getAttribute']('vid_end'),_0x21a010=_0x565c6d['getAttribute']('vid_end');_0x565c6d['_setAttribute']('vid_end',_0x54aeb9),_0x5669b1['_setAttribute']('vid_end',_0x21a010),this['_touched']['set'](_0x565c6d['getAttribute']('vid_end'),{'userId':_0x31bcba}),this['_touched']['set'](_0x5669b1['getAttribute']('vid_start'),{'userId':_0x31bcba});}else{const _0x374d2d=this['_revisionId']++,_0x317933=this['_revisionId']++;_0x565c6d['_setAttribute']('vid_end',_0x374d2d),_0x5669b1['_setAttribute']('vid_start',_0x317933),_0x5669b1['_setAttribute']('vid_end',_0x33b79a),this['_touched']['set'](_0x374d2d,{'userId':_0x31bcba}),this['_touched']['set'](_0x317933,{'userId':_0x31bcba});}}['_handleMarkerOperation'](_0x88bcad){if(!_0x88bcad['affectsData'])return;const _0x4e5f82=(_0x88bcad=this['_cloneOperation'](_0x88bcad,this['_diffRoots']))['oldRange']?_0x88bcad['oldRange']['root']:null,_0x7fb9d=_0x88bcad['newRange']?_0x88bcad['newRange']['root']:null;_0x4e5f82&&this['_markers']['delete'](_0x88bcad['name']),_0x7fb9d&&this['_markers']['set'](_0x88bcad['name'],_0x88bcad['newRange']['clone']());const _0x104654=null===_0x88bcad['_authorId']?null:_0x88bcad['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x23514=_0x88bcad['name'];if(!this['_touchedMarkers']['has'](_0x23514))return void this['_touchedMarkers']['set'](_0x23514,{'range':_0x88bcad['oldRange'],'userId':_0x104654});const _0x39e8e2=this['_touchedMarkers']['get'](_0x23514),_0x24b0fa=_0x39e8e2['range'],_0x55815c=_0x88bcad['newRange'];null==_0x24b0fa&&null==_0x55815c||_0x24b0fa&&_0x55815c&&_0x24b0fa['isEqual'](_0x55815c)?this['_touchedMarkers']['delete'](_0x88bcad['name']):_0x39e8e2['userId']=_0x104654;}['_handleRootOperation'](_0x4dc537,_0x5eb0b5){this['_diffRoots']['has'](_0x4dc537['rootName'])?this['_diffRoots']['get'](_0x4dc537['rootName'])['_isAttached']=_0x4dc537['isAdd']:(this['_diffRoots']['set'](_0x4dc537['rootName'],P(_0x4dc537['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x4dc537['rootName'],{}),_0x5eb0b5&&this['_idsRoots']['set'](_0x4dc537['rootName'],P(_0x4dc537['rootName'],!0x0)));const _0x139f26=null===_0x4dc537['_authorId']?null:_0x4dc537['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4d157f=this['_touchedRoots']['get'](_0x4dc537['rootName']);_0x4d157f&&_0x4d157f['userId']===_0x139f26?this['_touchedRoots']['delete'](_0x4dc537['rootName']):this['_touchedRoots']['set'](_0x4dc537['rootName'],{'userId':_0x139f26,'isAttached':_0x4dc537['isAdd']});}['_handleRootAttributeOperation'](_0x49a65e){const _0x13fdcd=this['_diffRootsAttributes']['get'](_0x49a65e['root']['rootName']);null===_0x49a65e['newValue']?delete _0x13fdcd[_0x49a65e['key']]:_0x13fdcd[_0x49a65e['key']]=_0x49a65e['newValue'];}}function N(_0x3c0b0f){const _0x3d9b38=P(_0x3c0b0f['rootName'],_0x3c0b0f['isAttached']());for(const _0x47922d of _0x3c0b0f['getChildren']()){const _0xaaba42=_0x47922d['_clone'](!0x0);_0x3d9b38['_appendChild'](_0xaaba42);}return _0x3d9b38;}function P(_0x50ee1a,_0x1e24bb=!0x0){const _0x4f59da=new vt();return _0x4f59da['rootName']=_0x50ee1a,_0x4f59da['_isAttached']=_0x1e24bb,_0x4f59da['isAttached']=()=>_0x4f59da['_isAttached'],_0x4f59da;}function F(_0x5e5158,_0x2beb99,_0x3b9482){const _0xaa5905='elementEnd'==_0x5e5158['type']?_0x3b9482['createPositionAt'](_0x5e5158['item'],'end'):_0x3b9482['createPositionBefore'](_0x5e5158['item']);return _0x3b9482['createPositionFromPath'](_0x2beb99,_0xaa5905['path'],_0xaa5905['stickiness']);}function B(_0x54ba83,_0x4d1d97,_0x514ad4){const _0x52dc79='elementStart'==_0x54ba83['type']?_0x514ad4['createPositionAt'](_0x54ba83['item'],0x0):_0x514ad4['createPositionAfter'](_0x54ba83['item']);return _0x514ad4['createPositionFromPath'](_0x4d1d97,_0x52dc79['path'],_0x52dc79['stickiness']);}class hs extends ts{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x2926e8,_0x15d046){super(_0x2926e8),this['focusTracker']=new _0x5d78c4(),this['keystrokes']=new _0x498ff9(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x15d046),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),_0x3bbbfc(this);}['render'](){super['render'](),_0x32d34b({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x353bbf=_0x11ed05=>_0x11ed05['stopPropagation']();this['keystrokes']['set']('arrowright',_0x353bbf),this['keystrokes']['set']('arrowleft',_0x353bbf),this['keystrokes']['set']('arrowup',_0x353bbf),this['keystrokes']['set']('arrowdown',_0x353bbf);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x131969){this['revisionNameInputView']['fieldView']['element']['value']=_0x131969['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0xc51bc7){const _0x2cc82a=new _0xdbd9e1(this['locale'],_0x530dc7),_0x35c771=_0x2cc82a['fieldView'];_0x35c771['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x12ab46=g(this['locale'],'Name\x20of\x20the\x20revision');return!_0xc51bc7&&(_0x12ab46+='\x20('+g(this['locale'],'optional')+')'),(_0x2cc82a['label']=_0x12ab46,_0x35c771['on']('input',()=>{this['revisionNameInputValue']=_0x35c771['element']['value']['trim']();}),_0x2cc82a);}}class f extends _0x3d5130{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}['_saveRevisionFormView'];['init'](){const _0xa7282a=this['editor'],_0xdd26ec=_0xa7282a['plugins']['get']('RevisionTracker');_0xa7282a['ui']['componentFactory']['add']('revisionHistory',_0x158276=>{const _0x134572=_0x2c73ee(_0x158276),_0x22c2d7=_0x134572['panelView']['children'],_0x14cb08=new _0x48ec40(_0x158276),_0x230e94=new _0xf49bba(_0x158276),_0x5649c2=new te(_0x158276),_0x46afc1=new _0xf49bba(_0x158276),_0x683cf3=new te(_0x158276);return _0x134572['bind']('isEnabled')['to'](_0xdd26ec,'isReady',_0xdd26ec,'isEnabled',_0xa7282a,'isReadOnly',(_0xe0690c,_0x4b1692,_0x3549c2)=>_0xe0690c&&_0x4b1692&&!_0x3549c2),_0x134572['buttonView']['set']({'icon':_0x791eb9,'label':g(_0x158276,'Revision\x20history'),'tooltip':!0x0}),_0x5649c2['set']({'label':g(_0x158276,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x5649c2['bind']('isEnabled')['to'](_0xdd26ec,'isReady',_0xdd26ec,'isEnabled',_0xa7282a,'isReadOnly',(_0x78594d,_0x1e7e70,_0x2cb155)=>_0x78594d&&_0x1e7e70&&!_0x2cb155),_0x5649c2['on']('execute',()=>this['_showDialog']()),_0x683cf3['set']({'label':g(_0x158276,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x683cf3['bind']('isEnabled')['to'](_0xdd26ec,'isReady',_0xa7282a,'isReadOnly',(_0x33ddcb,_0x239978)=>_0x33ddcb&&!_0x239978),_0x683cf3['on']('execute',()=>{_0xa7282a['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x134572['isOpen']=!0x1,_0xa7282a['editing']['view']['focus']();}),_0x230e94['children']['add'](_0x5649c2),_0x46afc1['children']['add'](_0x683cf3),_0x14cb08['role']='menu',_0x14cb08['items']['addMany']([_0x230e94,_0x46afc1]),_0x22c2d7['add'](_0x14cb08),_0x134572;}),_0xa7282a['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x231841=this['editor'],_0x34d0a3=_0x231841['locale'],_0x4cf0fe=new _0x311452(_0x34d0a3),_0x2f5ec9=new _0x30fe8f(_0x34d0a3);_0x4cf0fe['buttonView']['set']({'icon':_0x791eb9,'label':g(_0x34d0a3,'Revision\x20history')});const _0x378891=new _0x131447(_0x34d0a3,_0x4cf0fe),_0x119ff2=new _0x1780ab(_0x34d0a3);_0x119ff2['set']({'label':g(_0x34d0a3,'Save\x20current\x20revision')}),_0x119ff2['delegate']('execute')['to'](_0x4cf0fe),_0x119ff2['on']('execute',()=>{this['_showDialog']();}),_0x378891['children']['add'](_0x119ff2),_0x2f5ec9['items']['add'](_0x378891);const _0x3d5f2e=new _0x131447(_0x34d0a3,_0x4cf0fe),_0x3da17c=new _0x1780ab(_0x34d0a3);return _0x3da17c['set']({'label':g(_0x34d0a3,'Open\x20revision\x20history')}),_0x3da17c['delegate']('execute')['to'](_0x4cf0fe),_0x3da17c['on']('execute',()=>{_0x231841['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x3d5f2e['children']['add'](_0x3da17c),_0x2f5ec9['items']['add'](_0x3d5f2e),_0x4cf0fe['panelView']['children']['add'](_0x2f5ec9),_0x4cf0fe;}['_showDialog'](){const _0x21a213=this['editor'],_0x571e27=_0x21a213['locale'],_0xeeb553=_0x21a213['plugins']['get']('Dialog'),_0x2e43d5=_0x21a213['plugins']['get']('RevisionTracker');function _0xad754(_0x3733e0){_0x21a213['config']['get']('revisionHistory.requireRevisionName')&&''===_0x3733e0['revisionName']?_0x3733e0['revisionNameInputView']['errorText']=g(_0x571e27,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x21a213['plugins']['get'](u)['saveRevision']({'name':_0x3733e0['revisionName']}),_0xeeb553['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0xad754(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0xeeb553['show']({'id':'revisionSave','title':g(_0x571e27,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':g(_0x21a213['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0xeeb553['hide']()},{'label':g(_0x21a213['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x592f81){_0x592f81['bind']('isEnabled')['to'](_0x2e43d5,'isReady',_0x2e43d5,'isEnabled',_0x21a213,'isReadOnly',(_0x329b76,_0x205e8b,_0xafd0f)=>_0x329b76&&_0x205e8b&&!_0xafd0f);},'onExecute':()=>_0xad754(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x357f56=this['editor'],_0xbd4988=_0x357f56['locale'];this['_saveRevisionFormView']=new hs(_0xbd4988,_0x357f56['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class Q extends ts{['changeId'];['_model'];constructor(_0x4f420b,_0x28c14f){super(_0x4f420b),this['_model']=_0x28c14f,this['changeId']=_0x28c14f['id'];const _0x453bd3=this['bindTemplate'],_0x5f1002=g(_0x4f420b,_0x28c14f['data']['isSuggestion']?'Suggested\x20by':'add'==_0x28c14f['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x28c14f['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x453bd3['to']('type',_0x1234ee=>'ck-revision-change__'+_0x1234ee)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x5f1002}]},{'text':'\x20'+_0x28c14f['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
25
+ _0x2a5be9(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x57c6fd){super(),this['id']=_0x57c6fd['id']||_0xbd2e10(),this['author']=_0x57c6fd['author'],this['type']=_0x57c6fd['type'],this['data']=_0x57c6fd['data']||{},this['rootName']=_0x57c6fd['rootName'],this['set']('createdAt',_0x57c6fd['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class c{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x287ceb,_0x55ebbd){this['newRevisionId']=_0x287ceb,this['oldRevisionId']=_0x55ebbd,this['changes']=new _0x84a14f();}['_setChanges'](_0x5650dd){for(const _0x46df36 of _0x5650dd)this['changes']['add'](_0x46df36);}}class m extends _0x3d5130{['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[_0x21cb4b,_0x4618b4,I,V];}constructor(_0x596221){super(_0x596221),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',(_0x508cdc,_0x426db8,_0x292c5b)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x1c351d=>{for(const _0xc480ae of this['editor']['editing']['view']['document']['roots'])_0x292c5b?_0x1c351d['removeClass']('ck-editor__editable__overlay',_0xc480ae):_0x1c351d['addClass']('ck-editor__editable__overlay',_0xc480ae);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x433f35=>null!==_0x433f35),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x436bac,_0x5906e2,_0x1906b2)=>_0x436bac&&_0x1906b2?_0x5906e2['changes']['getIndex'](_0x1906b2):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x44c36e,_0x3f067b)=>_0x44c36e?_0x3f067b['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x4618b4);}['init'](){const _0x5199ff=this['editor'],_0x4ea191=new wt(_0x5199ff,{'direction':'backward'}),_0x25e2d0=new wt(_0x5199ff,{'direction':'forward'});(_0x5199ff['commands']['add']('showPreviousChange',_0x4ea191),_0x5199ff['commands']['add']('showNextChange',_0x25e2d0),_0x5199ff['commands']['add']('restoreRevision',new mt(_0x5199ff)),this['on']('change:numberOfChanges',()=>{_0x4ea191['refresh'](),_0x25e2d0['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x5199ff['enableReadOnlyMode']('revision-viewer'),_0x5199ff['plugins']['has']('WidgetToolbarRepository'))&&_0x5199ff['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x39f40e){return await this['_utils']['loadRevisionData'](_0x39f40e,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x39f40e);}async['getRevisionRootsAttributes'](_0xfcf46b){return await this['_utils']['loadRevisionData'](_0xfcf46b,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0xfcf46b);}async['compare'](_0x16b5df,_0x3109e7,_0x1c34ac=!0x1){if(!this['isEnabled'])return;const _0x535353=this['diff'],_0x53f18a=this['repository'],_0x5920f0='string'==typeof _0x16b5df?_0x53f18a['getRevision'](_0x16b5df):_0x16b5df,_0x4b1c7b='string'==typeof _0x3109e7?_0x53f18a['getRevision'](_0x3109e7):_0x3109e7,_0xd0dd9f=_0x5920f0['id'],_0x1c7f65=_0x4b1c7b?_0x4b1c7b['id']:null;if(!_0x1c34ac&&this['diff']&&this['diff']['newRevisionId']===_0xd0dd9f&&this['diff']['oldRevisionId']===_0x1c7f65)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new c(_0xd0dd9f,_0x1c7f65);const _0x3db9ea=this['_getRevisionsRange'](_0x5920f0,_0x4b1c7b,!0x0)['map'](_0x247956=>this['_utils']['loadRevisionData'](_0x247956,this['adapter']));return _0x3db9ea['push'](new Promise(_0x3c44d2=>{setTimeout(_0x3c44d2,0x14);})),Promise['all'](_0x3db9ea)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x51b924=this['_getDiff'](_0xd0dd9f,_0x1c7f65);for(const _0x2b5a67 of _0x51b924['changes'])this['_changeIdToChange']['set'](_0x2b5a67['id'],_0x2b5a67);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x32ca96=>{for(const _0x402501 of this['editor']['model']['document']['getRootNames']())_0x32ca96['detachRoot'](_0x402501);for(const _0x497276 of Object['keys'](_0x51b924['model'])){const _0xb2e963=_0x32ca96['addRoot'](_0x497276);for(const _0x3958bd of Object['keys'](_0x51b924['attributes'][_0x497276]))_0x32ca96['setAttribute'](_0x3958bd,_0x51b924['attributes'][_0x497276][_0x3958bd],_0xb2e963);_0x32ca96['insert'](_0x51b924['model'][_0x497276],_0xb2e963,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x51b924['changes'])),this['isReady']=!0x0;})['catch'](_0x303f11=>{console['error'](_0x303f11),this['_cleanUp'](),_0x535353&&(this['diff']=_0x535353),this['isReady']=!0x0;});}['addRevisionData'](_0x86cc15,_0x18e11c){const _0x3b45d9=this['repository']['createRevision'](_0x86cc15);return _0x3b45d9['on']('_update',(_0x52d9bc,_0x329db3,_0x121638)=>_0x18e11c(_0x329db3,_0x121638,_0x3b45d9)),this['repository']['addRevision'](_0x3b45d9),_0x3b45d9;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x176a80=>{for(const _0x3a74df of this['editor']['model']['document']['getRootNames']())_0x176a80['detachRoot'](_0x3a74df);});}['_sortAndFilterDiffChanges'](_0xffa448){const _0x5be46a=[],_0x557aa3=new Map();for(const _0x565427 of this['editor']['model']['document']['getRootNames']()){const _0x431860=this['editor']['editing']['view']['getDomRoot'](_0x565427);if(!_0x431860)continue;const _0x579fc1=_0x431860['getClientRects']()['item'](0x0);_0x579fc1&&(_0x5be46a['push'](_0x565427),_0x557aa3['set'](_0x565427,_0x579fc1));}return _0x5be46a['sort']((_0x1ec65d,_0x3c7ef6)=>{const _0x5a2ea3=_0x557aa3['get'](_0x1ec65d),_0xa605b8=_0x557aa3['get'](_0x3c7ef6);return _0x5a2ea3['y']-_0xa605b8['y']||_0x5a2ea3['x']-_0xa605b8['x'];}),(_0xffa448=_0xffa448['filter'](_0x3c94c8=>_0x5be46a['includes'](_0x3c94c8['rootName'])))['sort']((_0x270311,_0x5d3177)=>_0x5be46a['indexOf'](_0x270311['rootName'])-_0x5be46a['indexOf'](_0x5d3177['rootName'])),_0xffa448;}['_makeTape'](_0x51c925){const _0x3283dd=Array['from'](_0x51c925['markers'])['filter'](([_0x7f39b,_0x3bc08b])=>_0x7f39b['startsWith']('revision:')&&!_0x3bc08b['isCollapsed']),_0x4339de=Array['from'](this['editor']['model']['createRangeIn'](_0x51c925)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x3283dd['length'])for(const _0x19c327 of _0x4339de){const [_0xd4aa91,_0x2eea0b]=_0x3283dd[0x0],[,_0x26b440,_0x140cf4]=_0xd4aa91['split'](':');if(_0x2eea0b['end']['isEqual'](_0x19c327['nextPosition'])&&_0x3283dd['shift'](),(_0x19c327['previousPosition']['isEqual'](_0x2eea0b['start'])||_0x19c327['previousPosition']['isAfter'](_0x2eea0b['start']))&&('insertion'==_0x26b440?_0x19c327['isAdded']={'userId':_0x140cf4}:'deletion'==_0x26b440&&(_0x19c327['isRemoved']={'userId':_0x140cf4})),0x0==_0x3283dd['length'])break;}return _0x4339de;}['_refreshStartEndIndex'](_0x451bda){const _0x4c793b=new Map();for(let _0x9d323=0x0;_0x9d323<_0x451bda['length'];_0x9d323++)'text'===_0x451bda[_0x9d323]['type']?(_0x451bda[_0x9d323]['item']['startIndex']=_0x9d323,_0x451bda[_0x9d323]['item']['endIndex']=_0x9d323):('elementStart'===_0x451bda[_0x9d323]['type']?_0x451bda[_0x9d323]['item']['startIndex']=_0x9d323:'elementEnd'===_0x451bda[_0x9d323]['type']&&(_0x451bda[_0x9d323]['item']['endIndex']=_0x9d323),_0x4c793b['set'](_0x451bda[_0x9d323]['id'],_0x9d323));for(const _0x161934 of _0x4c793b['values']())'elementStart'===_0x451bda[_0x161934]['type']?_0x451bda[_0x161934]['item']['endIndex']=_0x4c793b['get'](_0x451bda[_0x161934]['pairId']):'elementEnd'===_0x451bda[_0x161934]['type']&&(_0x451bda[_0x161934]['item']['startIndex']=_0x4c793b['get'](_0x451bda[_0x161934]['pairId']));}['_processTape'](_0x24cd08){for(let _0x13dec0=0x0;_0x13dec0<_0x24cd08['length'];_0x13dec0++){if('elementStart'===_0x24cd08[_0x13dec0]['type'])_0x24cd08[_0x13dec0]['item']['startIndex']=_0x13dec0;else{if('elementEnd'===_0x24cd08[_0x13dec0]['type']){_0x24cd08[_0x13dec0]['item']['endIndex']=_0x13dec0;const _0x25dea0=_0x24cd08[_0x13dec0]['item']['startIndex'];_0x24cd08[_0x25dea0]['pairId']=_0x24cd08[_0x13dec0]['id'],_0x24cd08[_0x13dec0]['pairId']=_0x24cd08[_0x25dea0]['id'];}else _0x24cd08[_0x13dec0]['item']['startIndex']=_0x13dec0,_0x24cd08[_0x13dec0]['item']['endIndex']=_0x13dec0,_0x24cd08[_0x13dec0]['pairId']=null;}_0x24cd08[_0x13dec0]['markersStart']||(_0x24cd08[_0x13dec0]['markersStart']=[],_0x24cd08[_0x13dec0]['markersEnd']=[]);}}['_markInsertions'](_0x28e0b9,_0x4a2d08){const _0x6878eb=_0x28e0b9['filter'](_0x4aacf6=>!_0x4aacf6['isAdded']);for(let _0x214e4d=0x0;_0x214e4d<_0x4a2d08['length'];_0x214e4d++)_0x4a2d08[_0x214e4d]['isAdded']&&(_0x6878eb[_0x214e4d]['isAdded']=_0x4a2d08[_0x214e4d]['isAdded']);}['_getDiff'](_0x2ddb0f,_0x3c85b9=null){const _0x3eb0e3=this['repository']['getRevision'](_0x2ddb0f),_0x41243a=_0x3c85b9?this['repository']['getRevision'](_0x3c85b9):null,_0x3f6265=this['_getRevisionsRange'](_0x3eb0e3,_0x41243a),_0x45a964=_0x3f6265[_0x3f6265['length']-0x1],_0x4ff435=new Map(),_0x467759={'model':{},'attributes':{},'changes':[]},_0x4a278b=new Set(),_0x45af4d=new Map();for(let _0x54e30b=_0x3f6265['length']-0x1;_0x54e30b>=0x0;_0x54e30b--){const _0x421872=_0x3f6265[_0x54e30b];for(const _0x53065f of Object['keys'](_0x421872['diffData']))if(_0x421872['diffData'][_0x53065f]['attachChange']){const _0x196321=_0x421872['diffData'][_0x53065f]['attachChange'];_0x196321['isAttached']?(_0x4a278b['add'](_0x53065f),_0x45af4d['has'](_0x53065f)&&_0x45af4d['get'](_0x53065f)['userId']==_0x196321['userId']?_0x45af4d['delete'](_0x53065f):_0x45af4d['set'](_0x53065f,_0x196321)):_0x45af4d['has'](_0x53065f)?(_0x4a278b['delete'](_0x53065f),_0x45af4d['delete'](_0x53065f)):(_0x4a278b['add'](_0x53065f),_0x45af4d['set'](_0x53065f,_0x196321));}else _0x4a278b['add'](_0x53065f);}for(const _0x2b4771 of _0x4a278b){const _0x5caec7=_0x45af4d['has'](_0x2b4771)&&!_0x45af4d['get'](_0x2b4771)['isAttached'];let _0x5e820f=_0x5caec7?_0x3f6265['length']-0x1:0x0;const _0x1fcc1a=_0x5caec7?-0x1:0x1;for(;_0x3f6265[_0x5e820f];){const _0x1e831e=_0x3f6265[_0x5e820f];if(_0x1e831e['diffData'][_0x2b4771]){const _0x238302=_0x5caec7?_0x1e831e['diffData'][_0x2b4771]['attributesBefore']:_0x1e831e['diffData'][_0x2b4771]['attributesAfter'];_0x467759['attributes'][_0x2b4771]=_0x238302?_0x5bb63f(_0x238302):{};break;}_0x5e820f+=_0x1fcc1a;}}for(const _0x499cc6 of _0x3f6265){_0x499cc6['model']={};for(const _0xc5ec5e of _0x499cc6['authors'])_0x4ff435['set'](_0xc5ec5e['id'],_0xc5ec5e);for(const _0x18f0a3 of _0x4a278b){const _0x569d34=_0x499cc6['diffData'][_0x18f0a3]?_0x499cc6['diffData'][_0x18f0a3]['insertions']:'[]',_0x648a9b=_0x499cc6['diffData'][_0x18f0a3]?_0x499cc6['diffData'][_0x18f0a3]['deletions']:'[]';_0x499cc6['model'][_0x18f0a3]={'insertions':this['_utils']['_makeModelFromViewString'](_0x569d34),'deletions':this['_utils']['_makeModelFromViewString'](_0x648a9b)};}}for(const _0x3f441d of _0x4a278b){let _0x49f324=null,_0x7c1d90=0x0;const _0x14eee0=new Map(Array['from'](_0x3eb0e3['model'][_0x3f441d]['insertions']['markers'])['filter'](([_0x111cef])=>!_0x111cef['startsWith']('revision:')));let _0x2f6e59=0x0;for(const _0x42eed2 of _0x3f6265){const _0xef4e3e=this['_makeTape'](_0x42eed2['model'][_0x3f441d]['insertions']);_0x42eed2==_0x3eb0e3?(_0x49f324=_0xef4e3e,_0x7c1d90=_0x49f324['length'],_0x49f324['forEach'](_0x364753=>{_0x364753['id']=_0x2f6e59++;}),this['_processTape'](_0x49f324)):this['_markInsertions'](_0x49f324,_0xef4e3e);const _0x5bbecc=_0x49f324['filter'](_0x162254=>!_0x162254['isAdded'])['map'](_0x57df9a=>_0x57df9a['id']);let _0x1a2e44=0x0;const _0x8e37e1=this['_makeTape'](_0x42eed2['model'][_0x3f441d]['deletions']);_0x8e37e1['forEach'](_0x32d2a8=>{_0x32d2a8['isRemoved']?_0x32d2a8['id']=_0x7c1d90++:_0x32d2a8['id']=_0x5bbecc[_0x1a2e44++];}),this['_processTape'](_0x8e37e1),this['_setDistance'](_0x49f324,'isAdded'),this['_setDistance'](_0x8e37e1,'isRemoved'),_0x42eed2==_0x3eb0e3&&this['_markMarkers'](_0x49f324,_0x14eee0),_0x49f324=this['_joinTapes'](_0x49f324,_0x8e37e1),this['_refreshStartEndIndex'](_0x49f324),this['_setDistance'](_0x49f324,'isRemoved');}_0x49f324=_0x49f324['filter'](_0x57d28a=>!(_0x57d28a['isAdded']&&_0x57d28a['isRemoved']));const _0x2de35c=new Map(_0x45a964['model'][_0x3f441d]['deletions']['markers']),_0x575ad7=new Set(_0x14eee0['keys']());for(const _0x266155 of _0x2de35c['keys']())_0x575ad7['delete'](_0x266155);this['_markSuggestions'](_0x49f324,_0x575ad7),this['_fixObsoleteTags'](_0x49f324),_0x49f324=this['_removeMissingPairs'](_0x49f324),_0x49f324=this['_markMismatchedRemovedTags'](_0x49f324),_0x49f324=this['_removeUnsupportedChanges'](_0x49f324);const {root:_0x5392b5,changes:_0x103156}=this['_makeModelFromTape'](_0x49f324,_0x4ff435,_0x3f441d);_0x467759['model'][_0x3f441d]=_0x5392b5;const _0x18cb3e=_0x45af4d['get'](_0x3f441d);if(_0x18cb3e){const _0x244bba=_0x4ff435['get'](_0x18cb3e['userId']),_0x3177ac=new r({'author':_0x244bba,'type':_0x18cb3e['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x3f441d});_0x103156['unshift'](_0x3177ac),_0x467759['attributes'][_0x3f441d]['revisionHistoryAttachChange']=_0x3177ac['id'];}_0x467759['changes']=_0x467759['changes']['concat'](_0x103156);}return _0x467759;}['_markMarkers'](_0x9d7e1e,_0x578bd2){for(let _0x1202da=0x0;_0x1202da<_0x9d7e1e['length'];_0x1202da++)for(const [_0x105e8f,_0x83bc91]of _0x578bd2)!_0x83bc91['isCollapsed']&&_0x83bc91['start']['isEqual'](_0x9d7e1e[_0x1202da]['previousPosition'])&&_0x9d7e1e[_0x1202da]['markersStart']['push'](_0x105e8f),_0x83bc91['end']['isEqual'](_0x9d7e1e[_0x1202da]['nextPosition'])&&_0x9d7e1e[_0x1202da]['markersEnd']['push'](_0x105e8f);}['_joinTapes'](_0x50434a,_0x1bc188){let _0x4b2d00=[],_0x1be84e=0x0,_0x112ec6=0x0;for(;_0x1be84e<_0x50434a['length']||_0x112ec6<_0x1bc188['length'];){const _0x36d2bd=_0x50434a[_0x1be84e]||{},_0x41a064=_0x1bc188[_0x112ec6]||{};if(_0x36d2bd['id']==_0x41a064['id'])_0x1be84e++,_0x112ec6++,_0x4b2d00['push'](_0x36d2bd);else{if(_0x41a064['isRemoved']&&_0x36d2bd['isAdded']){const {commonTape:_0x1c20d7,iEnd:_0x24db57,jEnd:_0x5006b0}=this['_threeWayMerge'](_0x50434a,_0x1be84e,_0x1bc188,_0x112ec6);_0x4b2d00=_0x4b2d00['concat'](_0x1c20d7),_0x1be84e=_0x24db57,_0x112ec6=_0x5006b0;}else _0x41a064['isRemoved']?(_0x112ec6++,_0x4b2d00['push'](_0x41a064)):(_0x1be84e++,_0x4b2d00['push'](_0x36d2bd));}}return _0x4b2d00;}['_markSuggestions'](_0x1dcd6e,_0x31236e){const _0x329342=[];for(let _0x4aa4d8=0x0;_0x4aa4d8<_0x1dcd6e['length'];_0x4aa4d8++){for(let _0x2eabbf=0x0;_0x2eabbf<_0x1dcd6e[_0x4aa4d8]['markersStart']['length'];_0x2eabbf++){const _0x108542=_0x1dcd6e[_0x4aa4d8]['markersStart'][_0x2eabbf];if(!_0x31236e['has'](_0x108542))continue;const {group:_0x1ff7c6,type:_0x4b0f91,authorId:_0x276ab8}=_0x5f27cb(_0x108542);'revision-suggestion'!=_0x1ff7c6||'insertion'!=_0x4b0f91&&'deletion'!=_0x4b0f91||(_0x329342['unshift']({'type':_0x4b0f91,'name':_0x108542,'userId':_0x276ab8}),_0x1dcd6e[_0x4aa4d8]['markersStart']['splice'](_0x2eabbf,0x1),_0x2eabbf--);}_0x2338d5(_0x1dcd6e[_0x4aa4d8]);for(let _0x596c80=0x0;_0x596c80<_0x1dcd6e[_0x4aa4d8]['markersEnd']['length'];_0x596c80++){const _0x124392=_0x1dcd6e[_0x4aa4d8]['markersEnd'][_0x596c80];if(!_0x31236e['has'](_0x124392))continue;const {group:_0x422b75,type:_0x5720d3}=_0x5f27cb(_0x124392);if('revision-suggestion'!=_0x422b75||'insertion'!=_0x5720d3&&'deletion'!=_0x5720d3)continue;_0x1dcd6e[_0x4aa4d8]['markersEnd']['splice'](_0x596c80,0x1),_0x596c80--;const _0x2b8b4b=_0x329342['findIndex'](_0x252b4e=>_0x252b4e['name']==_0x124392);_0x2b8b4b>-0x1&&_0x329342['splice'](_0x2b8b4b,0x1);}}function _0x5f27cb(_0x127ea6){const _0x2840ff=_0x127ea6['split'](':');return{'group':_0x2840ff[0x0],'type':_0x2840ff[0x1],'subType':_0x2840ff['length']>=0x5?_0x2840ff[0x2]:null,'id':_0x2840ff['length']<0x5?_0x2840ff[0x2]:_0x2840ff[0x3],'authorId':_0x2840ff['length']<0x5?_0x2840ff[0x3]:_0x2840ff[0x4],'markerCount':0x6==_0x2840ff['length']?_0x2840ff[0x5]:null};}function _0x2338d5(_0x47061b){for(let _0x5c6ed9=0x0;_0x5c6ed9<_0x329342['length'];_0x5c6ed9++){if(_0x47061b['isAdded']&&'insertion'==_0x329342[_0x5c6ed9]['type'])return _0x47061b['isAddSuggestion']=_0x329342[_0x5c6ed9],void delete _0x47061b['isAdded'];if(!_0x47061b['isAdded']&&!_0x47061b['isRemoved']&&'deletion'==_0x329342[_0x5c6ed9]['type'])return void(_0x47061b['isRemoveSuggestion']=_0x329342[_0x5c6ed9]);}}}['_setDistance'](_0x593f20,_0x3ca230){let _0x587783=0x0,_0x118479=!0x1;const _0xd39c55=new Map();for(const _0x158766 of _0x593f20)_0x158766[_0x3ca230]?_0x118479&&(_0x587783++,_0x118479=!0x1):(_0x587783++,_0x118479=!0x0),_0xd39c55['set'](_0x158766['id'],_0x587783);for(let _0x205401=0x0;_0x205401<_0x593f20['length'];_0x205401++){if('isRemoved'==_0x3ca230&&_0x593f20[_0x205401]['isAdded']||'isAdded'==_0x3ca230&&_0x593f20[_0x205401]['isRemoved'])continue;if('text'==_0x593f20[_0x205401]['type']){_0x593f20[_0x205401]['distance']=0x0;continue;}const _0x2c9f68=_0xd39c55['get'](_0x593f20[_0x205401]['pairId']),_0x298a89=_0xd39c55['get'](_0x593f20[_0x205401]['id']);_0x593f20[_0x205401]['distance']=_0x2c9f68-_0x298a89;}}['_getRevisionsRange'](_0x43d088,_0x4172ca,_0x1704a2=!0x1){const _0x2f192e=[];let _0x2aa09a=this['repository']['getIndex'](_0x43d088),_0x5b2717=this['repository']['getIndex'](_0x4172ca);for(-0x1==_0x5b2717&&(_0x5b2717=this['repository']['_revisions']['length'],_0x1704a2=!0x1);_0x2aa09a<_0x5b2717;)_0x2f192e['push'](this['repository']['getRevision'](_0x2aa09a)),_0x2aa09a++;return _0x1704a2&&_0x2f192e['push'](this['repository']['getRevision'](_0x2aa09a)),_0x2f192e;}['_threeWayMerge'](_0x598ff6,_0x31b535,_0x26d5b5,_0x590ef4){const _0x54904f=this['editor']['model']['schema'];let _0x469ffa=_0x31b535;for(;_0x598ff6[_0x469ffa]&&_0x598ff6[_0x469ffa]['isAdded'];)_0x469ffa++;let _0x57b2f7=_0x590ef4;for(;_0x26d5b5[_0x57b2f7]&&_0x26d5b5[_0x57b2f7]['isRemoved'];)_0x57b2f7++;_0x58609f(_0x598ff6,_0x31b535,_0x469ffa),_0x58609f(_0x26d5b5,_0x590ef4,_0x57b2f7);const _0x468149=_0x26d5b5['slice'](_0x590ef4,_0x57b2f7)['concat'](_0x598ff6['slice'](_0x31b535,_0x469ffa));return _0x468149['sort']((_0x409a9f,_0x3af142)=>_0x409a9f['side']!=_0x3af142['side']?_0x409a9f['side']-_0x3af142['side']:_0x409a9f['level']!=_0x3af142['level']?_0x409a9f['level']-_0x3af142['level']:_0x409a9f['distance']!=_0x3af142['distance']?_0x3af142['distance']-_0x409a9f['distance']:!!_0x409a9f['isAdded']!=!!_0x3af142['isAdded']?-0x1==_0x409a9f['side']||0x0==_0x409a9f['side']?_0x409a9f['isAdded']?-0x1:0x1:_0x409a9f['isAdded']?0x1:-0x1:_0x409a9f['index']-_0x3af142['index']),{'commonTape':_0x468149,'iEnd':_0x469ffa,'jEnd':_0x57b2f7};function _0x58609f(_0xc70f64,_0x49d63a,_0x458f84){let _0x3a7713=-0x1,_0x33b0f8=Number['POSITIVE_INFINITY'],_0x15198=!0x0;for(let _0x860930=_0x49d63a;_0x860930<_0x458f84;_0x860930++)if(_0x54904f['isInline'](_0xc70f64[_0x860930]['item'])||(_0x15198=!0x1),_0xc70f64[_0x860930]['item']['startIndex']<_0x49d63a&&(_0x3a7713=_0x860930),_0xc70f64[_0x860930]['item']['endIndex']>=_0x458f84){_0x33b0f8=_0x860930;break;}_0x15198&&(_0x3a7713=_0x458f84-0x1);for(let _0x11ad20=_0x49d63a;_0x11ad20<_0x458f84;_0x11ad20++)_0xc70f64[_0x11ad20]['side']=_0x11ad20<=_0x3a7713?-0x1:_0x11ad20<_0x33b0f8?0x0:0x1,_0xc70f64[_0x11ad20]['index']=_0x11ad20;let _0x5b4f96=0x0;for(let _0x56b611=_0x49d63a;_0x56b611<=_0x3a7713;_0x56b611++)0x0==_0xc70f64[_0x56b611]['distance']?_0xc70f64[_0x56b611]['level']=_0x5b4f96:(_0x5b4f96++,_0xc70f64[_0x56b611]['level']=_0x5b4f96,_0x5b4f96++);for(let _0x150d56=_0x49d63a;_0x150d56<_0x458f84;_0x150d56++)0x0==_0xc70f64[_0x150d56]['side']&&(_0xc70f64[_0x150d56]['level']=_0x5b4f96);_0x5b4f96=0x0;for(let _0x16dc12=_0x458f84-0x1;_0x16dc12>=_0x33b0f8;_0x16dc12--)0x0==_0xc70f64[_0x16dc12]['distance']?_0xc70f64[_0x16dc12]['level']=_0x5b4f96:(_0x5b4f96--,_0xc70f64[_0x16dc12]['level']=_0x5b4f96,_0x5b4f96--);}}['_fixObsoleteTags'](_0x23bc2d){const _0x196b6c=new Map(),_0x556385=this['editor']['model']['schema'];for(let _0x3a9033=0x1;_0x3a9033<_0x23bc2d['length'];_0x3a9033++){let _0x1ec904,_0x51c9bc,_0x2cf00a;const _0x932984=_0x23bc2d[_0x3a9033],_0x3050d2=_0x23bc2d[_0x3a9033-0x1];if('text'==_0x932984['type'])continue;if(_0x932984['type']!=_0x3050d2['type'])continue;if(!_0x556385['isBlock'](_0x3050d2['item'])||_0x556385['isLimit'](_0x3050d2['item']))continue;if(!_0x556385['isBlock'](_0x932984['item'])||_0x556385['isLimit'](_0x932984['item']))continue;if((_0x23bc2d[_0x3a9033]['isAdded']||_0x23bc2d[_0x3a9033]['isAddSuggestion'])&&_0x23bc2d[_0x3a9033-0x1]['isRemoved'])_0x1ec904=_0x23bc2d[_0x3a9033],_0x51c9bc=_0x23bc2d[_0x3a9033-0x1],_0x2cf00a=_0x3a9033-0x1;else{if(!_0x23bc2d[_0x3a9033]['isRemoved']||!_0x23bc2d[_0x3a9033-0x1]['isAdded']&&!_0x23bc2d[_0x3a9033-0x1]['isAddSuggestion'])continue;_0x1ec904=_0x23bc2d[_0x3a9033-0x1],_0x51c9bc=_0x23bc2d[_0x3a9033],_0x2cf00a=_0x3a9033;}const _0x150ab5=_0x1ec904['level']==_0x51c9bc['level'],_0x49f8b2=Math['abs'](_0x1ec904['level'])<Math['abs'](_0x51c9bc['level'])&&0x0==_0x51c9bc['distance'];(_0x150ab5||_0x49f8b2)&&(_0x196b6c['set'](_0x51c9bc['id'],_0x1ec904['id']),_0x23bc2d['splice'](_0x2cf00a,0x1),_0x3a9033--,_0x1ec904['isAdded']=!0x1);}for(let _0x1ceef0=0x0;_0x1ceef0<_0x23bc2d['length'];_0x1ceef0++)_0x196b6c['has'](_0x23bc2d[_0x1ceef0]['pairId'])&&(_0x23bc2d[_0x1ceef0]['pairId']=_0x196b6c['get'](_0x23bc2d[_0x1ceef0]['pairId']));}['_removeMissingPairs'](_0x4bdbf1){const _0x270c80=new Set(_0x4bdbf1['map'](_0x348681=>_0x348681['id']));for(let _0x474215=0x0;_0x474215<_0x4bdbf1['length'];_0x474215++)_0x270c80['has'](_0x4bdbf1[_0x474215]['pairId'])||0x0==_0x4bdbf1[_0x474215]['distance']||(_0x4bdbf1[_0x474215]['isIncorrect']=!0x0);return _0x4bdbf1['filter'](_0x51efe4=>!_0x51efe4['isIncorrect']);}['_markMismatchedRemovedTags'](_0x4aa185){const _0x25eee8=new Set();for(let _0x1ecc36=0x0;_0x1ecc36<_0x4aa185['length'];_0x1ecc36++){if(_0x25eee8['has'](_0x4aa185[_0x1ecc36]['id'])&&_0x4aa185[_0x1ecc36]['isRemoved']&&(_0x4aa185[_0x1ecc36]['isIncorrect']=!0x0),_0x4aa185[_0x1ecc36]['isIncorrect'])continue;if(0x0==_0x4aa185[_0x1ecc36]['distance'])continue;if('elementStart'!=_0x4aa185[_0x1ecc36]['type'])continue;if(null==_0x4aa185[_0x1ecc36]['pairId'])continue;let _0x3f56f3=_0x1ecc36+0x1,_0x42688b=0x0;for(;_0x4aa185[_0x3f56f3]['id']!=_0x4aa185[_0x1ecc36]['pairId'];)'elementStart'==_0x4aa185[_0x3f56f3]['type']?_0x42688b++:'elementEnd'==_0x4aa185[_0x3f56f3]['type']&&_0x42688b--,_0x3f56f3++;if(0x0!=_0x42688b){if(_0x4aa185[_0x1ecc36]['isRemoved'])_0x4aa185[_0x1ecc36]['isIncorrect']=!0x0;else{for(;_0x3f56f3!=_0x1ecc36;)_0x4aa185[_0x3f56f3]['isRemoved']&&0x0!=_0x4aa185[_0x3f56f3]['distance']&&(_0x4aa185[_0x3f56f3]['isIncorrect']=!0x0,_0x25eee8['add'](_0x4aa185[_0x3f56f3]['pairId'])),_0x3f56f3--;}}}return _0x4aa185['filter'](_0x28b4a0=>!_0x28b4a0['isIncorrect']);}['_removeUnsupportedChanges'](_0x532f9a){const _0x5aaf8a=this['editor']['model']['schema'];for(let _0x139bd3=0x0;_0x139bd3<_0x532f9a['length'];_0x139bd3++){if(!(_0x532f9a[_0x139bd3]['isAdded']||_0x532f9a[_0x139bd3]['isAddSuggestion']||_0x532f9a[_0x139bd3]['isRemoved']||_0x532f9a[_0x139bd3]['isRemoveSuggestion']))continue;if(0x0==_0x532f9a[_0x139bd3]['distance'])continue;const _0x1a136f=_0x532f9a[_0x139bd3]['item'];_0x5aaf8a['isBlock'](_0x1a136f)||_0x5aaf8a['isLimit'](_0x1a136f)||(_0x532f9a[_0x139bd3]['isAdded']&&delete _0x532f9a[_0x139bd3]['isAdded'],_0x532f9a[_0x139bd3]['isAddSuggestion']&&delete _0x532f9a[_0x139bd3]['isAddSuggestion'],_0x532f9a[_0x139bd3]['isRemoveSuggestion']&&delete _0x532f9a[_0x139bd3]['isRemoveSuggestion'],_0x532f9a[_0x139bd3]['isRemoved']&&(_0x532f9a[_0x139bd3]['isIncorrect']=!0x0));}return _0x532f9a['filter'](_0x9b8a94=>!_0x9b8a94['isIncorrect']);}['_makeModelFromTape'](_0xc9fb6f,_0x4ccf8e,_0x55d758){const _0x371e84=new vt(),_0x2e3f0f=[],_0x4adb58=new Map(),_0x24ffe0=this['editor']['model'],_0x37f26b=_0x24ffe0['schema'],_0x542d56=[_0x371e84],_0x36b03a={},_0x4dab05={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x33025d=null;const _0x32495f=[0x0];for(let _0x5c797f=0x0;_0x5c797f<_0xc9fb6f['length'];_0x5c797f++)if('elementStart'===_0xc9fb6f[_0x5c797f]['type']){_0xc9fb6f[_0x5c797f]['previousPosition']=_0x24ffe0['createPositionFromPath'](_0x371e84,_0x32495f);const _0x42fec1=new ut(_0xc9fb6f[_0x5c797f]['item']['name'],_0xc9fb6f[_0x5c797f]['item']['getAttributes']());_0x542d56[0x0]['_appendChild'](_0x42fec1),_0x32495f['push'](0x0),_0x542d56['unshift'](_0x42fec1),_0xc9fb6f[_0x5c797f]['nextPosition']=_0x24ffe0['createPositionFromPath'](_0x371e84,_0x32495f);}else'elementEnd'===_0xc9fb6f[_0x5c797f]['type']?(_0x542d56['shift'](),_0xc9fb6f[_0x5c797f]['previousPosition']=_0x24ffe0['createPositionFromPath'](_0x371e84,_0x32495f),_0x32495f['pop'](),_0x32495f[_0x32495f['length']-0x1]++,_0xc9fb6f[_0x5c797f]['nextPosition']=_0x24ffe0['createPositionFromPath'](_0x371e84,_0x32495f)):(_0xc9fb6f[_0x5c797f]['previousPosition']=_0x24ffe0['createPositionFromPath'](_0x371e84,_0x32495f),_0x33025d?_0x33025d['_data']+=_0xc9fb6f[_0x5c797f]['item']['data']:_0x33025d=new gt(_0xc9fb6f[_0x5c797f]['item']['data'],_0xc9fb6f[_0x5c797f]['item']['getAttributes']()),_0xc9fb6f[_0x5c797f+0x1]&&'text'===_0xc9fb6f[_0x5c797f+0x1]['type']&&_0x281d2a(_0x33025d,_0xc9fb6f[_0x5c797f+0x1]['item'])||(_0x542d56[0x0]['_appendChild'](_0x33025d),_0x33025d=null),_0x32495f[_0x32495f['length']-0x1]+=_0xc9fb6f[_0x5c797f]['item']['offsetSize'],_0xc9fb6f[_0x5c797f]['nextPosition']=_0x24ffe0['createPositionFromPath'](_0x371e84,_0x32495f));for(let _0x1fec1e=0x0;_0x1fec1e<_0xc9fb6f['length'];_0x1fec1e++){const _0x39c61d=_0xc9fb6f[_0x1fec1e]['previousPosition'],_0x4f72e8=_0xc9fb6f[_0x1fec1e]['nextPosition'];for(const _0x5e0e61 of _0xc9fb6f[_0x1fec1e]['markersStart'])_0x4adb58['set'](_0x5e0e61,{'start':_0x39c61d,'end':null});_0x5cdfc3('isRemoveSuggestion',_0x1fec1e,_0x39c61d,_0x4f72e8),_0x5cdfc3('isAddSuggestion',_0x1fec1e,_0x39c61d,_0x4f72e8),_0x5cdfc3('isRemoved',_0x1fec1e,_0x39c61d,_0x4f72e8),_0x5cdfc3('isAdded',_0x1fec1e,_0x39c61d,_0x4f72e8);for(const _0x4a9498 of _0xc9fb6f[_0x1fec1e]['markersEnd']){const _0x30a6c7=_0x4adb58['get'](_0x4a9498);_0x30a6c7?_0x30a6c7['end']=_0x4f72e8:_0x4adb58['set'](_0x4a9498,{'start':_0x4f72e8,'end':_0x4f72e8});}}for(const [_0xfd8dc0,_0x49a38c]of _0x4adb58){const _0x11c764=this['editor']['model']['createRange'](_0x49a38c['start'],_0x49a38c['end']);_0x371e84['markers']['set'](_0xfd8dc0,_0x11c764);}return _0x2e3f0f['sort']((_0x58a5ed,_0x12c164)=>{const _0x3b8e2f=_0x371e84['markers']['get']('revision:'+_0x58a5ed['id']),_0x5b4920=_0x371e84['markers']['get']('revision:'+_0x12c164['id']);return _0x3b8e2f['start']['isBefore'](_0x5b4920['start'])?-0x1:_0x3b8e2f['start']['isAfter'](_0x5b4920['start'])?0x1:_0x3b8e2f['end']['isBefore'](_0x5b4920['end'])?-0x1:_0x3b8e2f['end']['isAfter'](_0x5b4920['end'])?0x1:'add'===_0x58a5ed['type']?-0x1:0x1;}),{'root':_0x371e84,'changes':_0x2e3f0f};function _0x5cdfc3(_0x68449a,_0x43f054,_0x34f8af,_0x1befc4){const _0x58f310=!!_0xc9fb6f[_0x43f054][_0x68449a],_0x39c770=_0x58f310?_0xc9fb6f[_0x43f054][_0x68449a]['userId']:null,_0x374676=_0x43f054===_0xc9fb6f['length']-0x1,_0xb010b7=_0x4dab05[_0x68449a][0x0],_0x1de6f8=_0x37f26b['isObject'](_0xc9fb6f[_0x43f054]['item']);!_0x36b03a[_0x68449a]&&_0x58f310?_0x36b03a[_0x68449a]={'start':_0x34f8af,'tapeItem':_0xc9fb6f[_0x43f054],'userId':_0x39c770,'type':_0x68449a}:_0x36b03a[_0x68449a]&&!_0x58f310?(_0x36b03a[_0x68449a]['end']=_0x34f8af,_0x215475(_0x36b03a[_0x68449a]),_0x36b03a[_0x68449a]=null):_0x36b03a[_0x68449a]&&_0x58f310&&_0x36b03a[_0x68449a]['userId']!==_0x39c770&&(_0x36b03a[_0x68449a]['end']=_0x34f8af,_0xb010b7&&_0xb010b7['userId']===_0x36b03a[_0x68449a]['userId']||_0x215475(_0x36b03a[_0x68449a]),_0x36b03a[_0x68449a]={'start':_0x34f8af,'tapeItem':_0xc9fb6f[_0x43f054],'userId':_0x39c770,'type':_0x68449a}),_0x36b03a[_0x68449a]&&_0x1de6f8&&('elementStart'!==_0xc9fb6f[_0x43f054]['type']||_0xb010b7&&_0xb010b7['userId']===_0x39c770||_0x4dab05[_0x68449a]['unshift']({'userId':_0x39c770,'object':_0xc9fb6f[_0x43f054]['item'],'change':_0x36b03a[_0x68449a]}),'elementEnd'===_0xc9fb6f[_0x43f054]['type']&&_0xb010b7&&_0xb010b7['object']===_0xc9fb6f[_0x43f054]['item']&&(_0x4dab05[_0x68449a]['shift'](),_0x36b03a[_0x68449a]=_0xb010b7['change'])),_0x36b03a[_0x68449a]&&_0x374676&&(_0x36b03a[_0x68449a]['end']=_0x1befc4,_0x215475(_0x36b03a[_0x68449a]),_0x36b03a[_0x68449a]=null);}function _0x215475({start:_0x2fa31a,end:_0x1609bc,tapeItem:_0x330ee0,userId:_0x453bf8,type:_0x233bde}){const _0x51acbe=_0x330ee0['item'],_0x50ec57=_0x24ffe0['schema']['isBlock'](_0x51acbe)&&!_0x24ffe0['schema']['isLimit'](_0x51acbe),_0xd43faf=_0x2fa31a['nodeAfter']==_0x1609bc['parent']&&_0x1609bc['isAtStart'];if(_0x50ec57&&_0xd43faf)return;const _0x1ca64b=_0x24ffe0['createRange'](_0x2fa31a,_0x1609bc),_0x205de8=_0x4ccf8e['get'](_0x453bf8),_0x4999fc=new r({'author':_0x205de8,'type':'isAdded'==_0x233bde||'isAddSuggestion'==_0x233bde?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x233bde||'isRemoveSuggestion'==_0x233bde},'createdAt':new Date(),'rootName':_0x55d758});_0x2e3f0f['push'](_0x4999fc),_0x371e84['markers']['set']('revision:'+_0x4999fc['id'],_0x1ca64b);}function _0x281d2a(_0x475ded,_0x41a81b){const _0x52e00f=_0x475ded['getAttributes'](),_0x2a4803=_0x41a81b['getAttributes']();for(const _0x15ee3b of _0x52e00f){if(_0x15ee3b[0x1]!==_0x41a81b['getAttribute'](_0x15ee3b[0x0]))return!0x1;_0x2a4803['next']();}return _0x2a4803['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x151e97=>{const _0x1e202e=_0x151e97['markerName']['split'](':')[0x1],_0x15af81=this['_getChangeFromId'](_0x1e202e);if(!_0x15af81)return null;const _0xdf2276='add'==_0x15af81['type']?'insertion':'deletion',_0x9528c3=['ck-suggestion-marker','ck-suggestion-marker-'+_0xdf2276];return _0x15af81['data']['isSuggestion']&&_0x9528c3['push']('ck-suggestion-marker-'+_0xdf2276+'-new'),this['activeChange']==_0x15af81&&_0x9528c3['push']('ck-suggestion-marker--active'),{'classes':_0x9528c3,'attributes':{'data-change-id':_0x1e202e}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x2539a9=>{_0x2539a9['on']('element:pre',(_0x320f1f,_0x370a28,_0xb8a37f)=>{const _0x28bd0a=_0x370a28['viewItem']['getChild'](0x0);if(!_0x28bd0a||!_0x28bd0a['is']('element','code'))return;if(!_0xb8a37f['consumable']['consume'](_0x28bd0a,{'attributes':['vid_start','vid_end']}))return;const _0x2fc7d6=_0x370a28['modelRange']['start']['nodeAfter'];_0xb8a37f['writer']['setAttribute']('vid_start',_0x28bd0a['getAttribute']('vid_start'),_0x2fc7d6),_0xb8a37f['writer']['setAttribute']('vid_end',_0x28bd0a['getAttribute']('vid_end'),_0x2fc7d6);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x4a6502=>{_0x4a6502['on']('element',(_0x15d9e5,_0x532d4c,_0xe1e85b)=>{if(!_0xe1e85b['consumable']['consume'](_0x532d4c['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x532d4c['modelRange']['isCollapsed'])return;const _0x1c8f9f=_0x532d4c['modelRange']['start']['nodeAfter'];_0x1c8f9f['hasAttribute']('vid_start')||_0x1c8f9f['hasAttribute']('vid')||(_0xe1e85b['writer']['setAttribute']('vid_start',_0x532d4c['viewItem']['getAttribute']('vid_start'),_0x1c8f9f),_0xe1e85b['writer']['setAttribute']('vid_end',_0x532d4c['viewItem']['getAttribute']('vid_end'),_0x1c8f9f));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0xe9587d=>_0xe9587d['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x175dba,[,_0x7946c4])=>{['vid_start','vid_end','vid']['includes'](_0x7946c4)&&(_0x175dba['return']=!0x0,_0x175dba['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x4f9937=>{_0x4f9937['on']('attribute:vid',(_0xaebc5d,_0x241e15,_0x3b4aee)=>{if('\x20'!=_0x241e15['item']['data']||_0x241e15['item']['parent']['maxOffset']>0x1)return;if(!_0x3b4aee['consumable']['consume'](_0x241e15['item'],_0xaebc5d['name']))return;const _0x1426b5=_0x3b4aee['writer'],_0x5f5694=_0x3b4aee['mapper']['toViewRange'](_0x241e15['range']);_0x1426b5['wrap'](_0x5f5694,_0x1426b5['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x4cc6d4){const _0x1438ab=_0x4cc6d4['plugins']['get']('RevisionViewer');return(_0x449a36,_0x3ca391,_0x529e90)=>{const _0x1baf7b=_0x3ca391['markerName']['split'](':')[0x1],_0x167482=_0x1438ab['_getChangeFromId'](_0x1baf7b);if(!_0x167482)return null;const _0x1fd2c1='add'==_0x167482['type']?'split':'merge';if(!_0x529e90['consumable']['test'](_0x3ca391['markerRange'],_0x449a36['name']))return;const _0x24ab0c=_0x3ca391['markerRange']['getWalker'](),_0x2a53f4=_0x3ca391['markerRange']['start'],_0x4efb99=_0x4cc6d4['model']['schema'];let _0x14f0c8=null,_0x590059=null,_0x5c4469=!0x1,_0x4ea718=!0x1;for(const _0x30d866 of _0x24ab0c){const _0x477f9e=_0x30d866['item'];_0x5c4469=_0x5c4469||_0x4efb99['isContent'](_0x477f9e);const _0x26fb7e=_0x529e90['mapper']['toViewElement'](_0x477f9e);if(_0x26fb7e&&_0x26fb7e['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x30d866['type']&&(_0x4efb99['isBlock'](_0x477f9e)&&!_0x4efb99['isLimit'](_0x477f9e)&&(_0x477f9e['nextSibling']||_0x2a53f4['isAtEnd']?_0x14f0c8&&_0x14f0c8['parent']==_0x477f9e||(_0x14f0c8=_0x477f9e,_0x232469(_0x30d866['previousPosition']),_0x4ea718=!0x0):_0x590059=_0x590059||_0x30d866['previousPosition']));}function _0x232469(_0x30b8e6){const _0x5a215c=_0x529e90['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x1fd2c1}),_0x3ea415=_0x529e90['mapper']['toViewPosition'](_0x30b8e6);_0x167482['data']['isSuggestion']&&_0x529e90['writer']['addClass']('ck-suggestion-marker-'+_0x1fd2c1+'-new',_0x5a215c),_0x1438ab['activeChange']==_0x167482&&_0x529e90['writer']['addClass']('ck-suggestion-marker--active',_0x5a215c),_0x529e90['writer']['insert'](_0x3ea415,_0x5a215c),_0x529e90['mapper']['bindElementToMarker'](_0x5a215c,_0x3ca391['markerName']);}_0x5c4469||_0x4ea718||!_0x590059||_0x232469(_0x590059);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x1349e4,_0x461eb5,_0xfe0d20)=>{const _0x399a5=_0xfe0d20['mapper']['markerNameToElements'](_0x461eb5['markerName']);if(_0x399a5){for(const _0x35558c of _0x399a5)(_0x35558c['hasClass']('ck-suggestion-marker-split')||_0x35558c['hasClass']('ck-suggestion-marker-merge'))&&(_0xfe0d20['mapper']['unbindElementFromMarkerName'](_0x35558c,_0x461eb5['markerName']),_0xfe0d20['writer']['remove'](_0x35558c));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x40ed63,_0x1d3801,_0x39f57c)=>{const _0x23d5d3=_0x1d3801['markerName']['split'](':')[0x1],_0x5230c2=this['_getChangeFromId'](_0x23d5d3);if(!_0x5230c2)return null;const _0x2a5961='add'==_0x5230c2['type']?'split':'merge';if(_0x39f57c['consumable']['test'](_0x1d3801['markerRange'],_0x40ed63['name']))for(const _0x4b5523 of _0x1d3801['markerRange']['getItems']()){if(!_0x4b5523['is']('element','softBreak'))continue;const _0xb528bf=_0x39f57c['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x2a5961}),_0x483464=_0x39f57c['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x4b5523));_0x5230c2['data']['isSuggestion']&&_0x39f57c['writer']['addClass']('ck-suggestion-marker-'+_0x2a5961+'-new',_0xb528bf),this['activeChange']==_0x5230c2&&_0x39f57c['writer']['addClass']('ck-suggestion-marker--active',_0xb528bf),_0x39f57c['writer']['insert'](_0x483464,_0xb528bf),_0x39f57c['mapper']['bindElementToMarker'](_0xb528bf,_0x1d3801['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0xdcb30c=>{for(const _0x4bfd38 of this['editor']['model']['document']['getRootNames']()){const _0x20e7f4=this['editor']['model']['document']['getRoot'](_0x4bfd38),_0x5341f0=this['editor']['editing']['view']['document']['getRoot'](_0x4bfd38);if(_0x5341f0){const _0xcd5692=_0x20e7f4['getAttribute']('revisionHistoryAttachChange');if(_0xdcb30c['removeAttribute']('data-change-id',_0x5341f0),_0xdcb30c['removeClass']('ck-revision-history-root-add',_0x5341f0),_0xdcb30c['removeClass']('ck-revision-history-root-remove',_0x5341f0),_0xdcb30c['removeClass']('ck-revision-history-root--active',_0x5341f0),_0xcd5692){const _0x55b62f=this['_getChangeFromId'](_0xcd5692);if(!_0x55b62f)return null;_0xdcb30c['setAttribute']('data-change-id',_0xcd5692,_0x5341f0),_0xdcb30c['addClass']('ck-revision-history-root-'+_0x55b62f['type'],_0x5341f0),this['activeChange']==_0x55b62f&&_0xdcb30c['addClass']('ck-revision-history-root--active',_0x5341f0);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0xde2d87=>'revision-comment:'+_0xde2d87,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x4b47b4=>'revision-suggestion:'+_0x4b47b4,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x2d0472=>({'name':'suggestion:'+_0x2d0472,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0xa674cb=>{const _0x1a688c=_0xa674cb['markerName']['split'](':')[0x1];return'insertion'!=_0x1a688c&&'deletion'!=_0x1a688c?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x1a688c]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',X(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',X(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x1d0163,_0x1cc1dd,_0x2192b7)=>{const _0x24378b=_0x2192b7['mapper']['markerNameToElements'](_0x1cc1dd['markerName']);if(_0x24378b){for(const _0x42b947 of _0x24378b)_0x42b947['is']('uiElement')&&(_0x2192b7['mapper']['unbindElementFromMarkerName'](_0x42b947,_0x1cc1dd['markerName']),_0x2192b7['writer']['remove'](_0x42b947));}},{'priority':'high'});}['_getChangeFromId'](_0x3dcd13){return this['_changeIdToChange']['get'](_0x3dcd13);}['_getViewForChange'](_0x3bc5c0){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Q(this['editor']['locale'],_0x3bc5c0),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x54c4b6,_0x248288,_0x4c9c1f,_0x982ac8)=>{_0x982ac8&&this['_balloon']['remove'](_0x982ac8),_0x4c9c1f&&(this['_balloon']['add']({'view':_0x4c9c1f,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x5de3bd=this['editor']['editing'],_0x307a55=this['_getChangeFromId'](_0x4c9c1f['changeId']);let _0x11c69b;if(_0x307a55['data']['isOnRoot']){const _0x186a58=_0x5de3bd['view']['getDomRoot'](_0x307a55['rootName']);_0x11c69b=Array['from'](_0x186a58['getClientRects']());}else{const _0x1f1a87=this['editor']['model']['markers']['get']('revision:'+_0x4c9c1f['changeId']);_0x11c69b=Array['from'](_0x5de3bd['mapper']['markerNameToElements'](_0x1f1a87['name']))['map'](_0xbb361a=>_0x5de3bd['view']['domConverter']['mapViewToDom'](_0xbb361a))['map'](_0x633466=>Array['from'](_0x633466['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x11c69b[0x0];return _0x11c69b['find'](_0x29bb1a=>_0x29bb1a['top']-0x3<=this['_activeViewTarget']['y']&&_0x29bb1a['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x29bb1a['left']-0x3<=this['_activeViewTarget']['x']&&_0x29bb1a['right']+0x3>=this['_activeViewTarget']['x'])||_0x11c69b[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x172db7,_0x2d6968,_0x3a626e,_0x59d34d)=>{this['activeView']=_0x3a626e?this['_getViewForChange'](_0x3a626e):null,this['editor']['model']['change'](()=>{const _0x2524d1=this['editor']['editing'];_0x59d34d&&(_0x59d34d['data']['isOnRoot']?_0x2524d1['view']['change'](_0x14f36c=>{_0x14f36c['removeClass']('ck-revision-history-root--active',_0x2524d1['view']['document']['getRoot'](_0x59d34d['rootName']));}):_0x2524d1['reconvertMarker']('revision:'+_0x59d34d['id'])),_0x3a626e&&(_0x3a626e['data']['isOnRoot']?_0x2524d1['view']['change'](_0x2e9e76=>{_0x2e9e76['addClass']('ck-revision-history-root--active',_0x2524d1['view']['document']['getRoot'](_0x3a626e['rootName']));}):_0x2524d1['reconvertMarker']('revision:'+_0x3a626e['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x5f2cac,_0x1f3a28)=>{if(this['activeChange'])return;const _0x24fb03=this['_findChangeIdFromDomTarget'](_0x1f3a28['target']),_0x4ce373=this['_changeIdToChange']['get'](_0x24fb03);_0x4ce373?(this['_activeViewTarget']={'x':_0x1f3a28['domEvent']['x'],'y':_0x1f3a28['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x4ce373)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x553616,_0x3a897e)=>{const _0x15762e=this['_findChangeIdFromDomTarget'](_0x3a897e['target']),_0x218769=this['_changeIdToChange']['get'](_0x15762e);_0x218769?(this['_activeViewTarget']={'x':_0x3a897e['domEvent']['x'],'y':_0x3a897e['domEvent']['y']},_0x218769===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x218769):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x2f1eb0){do{const _0x5360d1=_0x2f1eb0['getAttribute']('data-change-id');if(_0x5360d1)return _0x5360d1;_0x2f1eb0=_0x2f1eb0['parent'];}while(_0x2f1eb0);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x29f39a=>{for(const _0x4cc549 of this['editor']['model']['markers'])_0x29f39a['removeMarker'](_0x4cc549);});}}function X(_0x11335c,_0x166fd8){return(_0x5736ca,_0x30fcb6,_0x530b3)=>{if(!_0x530b3['consumable']['test'](_0x30fcb6['markerRange'],_0x5736ca['name']))return;const _0x1fbbe6=_0x30fcb6['markerRange']['getWalker'](),_0xd971ee=_0x30fcb6['markerRange']['start'],_0x4d0e20=_0x11335c['model']['schema'];let _0x1df748=null,_0x2f949c=null,_0xd077e=!0x1,_0x306243=!0x1;for(const _0x3c9393 of _0x1fbbe6){const _0x50e5b4=_0x3c9393['item'];_0xd077e=_0xd077e||_0x4d0e20['isContent'](_0x50e5b4);const _0x17b685=_0x530b3['mapper']['toViewElement'](_0x50e5b4);if(_0x17b685&&_0x17b685['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x3c9393['type']&&(_0x4d0e20['isBlock'](_0x50e5b4)&&!_0x4d0e20['isLimit'](_0x50e5b4)&&(_0x50e5b4['nextSibling']||_0xd971ee['isAtEnd']?_0x1df748&&_0x1df748['parent']==_0x50e5b4||(_0x1df748=_0x50e5b4,_0x3d1f30(_0x3c9393['previousPosition']),_0x306243=!0x0):_0x2f949c=_0x2f949c||_0x3c9393['previousPosition']));}function _0x3d1f30(_0x396345){const _0x2143c3=_0x530b3['mapper']['toViewPosition'](_0x396345),_0x55a576=_0x530b3['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x166fd8});_0x530b3['writer']['insert'](_0x2143c3,_0x55a576),_0x530b3['mapper']['bindElementToMarker'](_0x55a576,_0x30fcb6['markerName']);}_0xd077e||_0x306243||!_0x2f949c||_0x3d1f30(_0x2f949c);};}class mt extends _0x4a8198{constructor(_0x47cec1){super(_0x47cec1);const _0x5d9233=_0x47cec1['plugins']['get'](m);this['affectsData']=!0x1,this['listenTo'](_0x5d9233,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x5d9233,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x2dfc09=this['editor'],_0x50f5a6=_0x2dfc09['plugins']['get'](m),_0x3988c5=_0x50f5a6['isReady']?_0x50f5a6['diff']['newRevisionId']:null;_0x2dfc09['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x3988c5);}['refresh'](){const {isReady:_0x379fd5,isEnabled:_0x2003ea,repository:_0x287ae1,diff:_0x2c6fa7}=this['editor']['plugins']['get'](m),_0x1872b3=_0x2c6fa7&&_0x287ae1['getLaterVisibleRevision'](_0x2c6fa7['newRevisionId']);this['isEnabled']=_0x379fd5&&_0x2003ea&&Boolean(_0x1872b3);}}class wt extends _0x4a8198{['_step'];constructor(_0x5c77ee,{direction:_0x18d2bd}){super(_0x5c77ee);const _0x51e72c=_0x5c77ee['plugins']['get'](m);this['affectsData']=!0x1,this['_step']='forward'===_0x18d2bd?0x1:-0x1,this['listenTo'](_0x51e72c,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x51e72c,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x51e72c,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x43eb67=this['editor'],_0x4e9ab9=_0x43eb67['plugins']['get'](m),{isNavigationMode:_0x3ac139,currentChangeNumber:_0x407d12}=_0x4e9ab9;let _0x3daad6;if(_0x4e9ab9['activeChange']=_0x3ac139?_0x4e9ab9['diff']['changes']['get'](_0x407d12+this['_step']):_0x4e9ab9['diff']['changes']['first'],_0x4e9ab9['activeChange']['data']['isOnRoot'])_0x3daad6=_0x43eb67['editing']['view']['getDomRoot'](_0x4e9ab9['activeChange']['rootName']);else{const _0x21b2ba=_0x43eb67['model']['markers']['get']('revision:'+_0x4e9ab9['activeChange']['id']);_0x3daad6=_0x176b60(_0x43eb67['editing'],_0x21b2ba);}_0x2945f9({'target':_0x3daad6,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x35f832,currentChangeNumber:_0x4cc6f2,numberOfChanges:_0x42cf88,isReady:_0x54847e,isEnabled:_0xe72cf8}=this['editor']['plugins']['get'](m);this['isEnabled']=!!(_0xe72cf8&&_0x54847e&&_0x42cf88)&&(!_0x35f832||(0x1===this['_step']?_0x4cc6f2<_0x42cf88-0x1:_0x4cc6f2>0x0));}}class di extends ts{constructor(_0x4b2739){super(_0x4b2739);const _0x1c8f38=this['bindTemplate'],_0x4ed98a=new te(_0x4b2739),_0x2f8a68=new te(_0x4b2739);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',(_0x473bc4,_0x3c9fa7)=>_0x473bc4&&_0x3c9fa7>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x1afbac,_0x3983b6,_0x1355b5,_0x2ee0ac)=>{if(!_0x1afbac)return g(_0x4b2739,'Loading...');if(!_0x1355b5)return g(_0x4b2739,'No\x20changes');const _0x4d4c8f=g(_0x4b2739,'NUMBER_OF_CHANGES',_0x1355b5);return _0x2ee0ac?g(_0x4b2739,'X_OF_Y_CHANGES',[_0x3983b6+0x1,_0x1355b5]):_0x4d4c8f;}),_0x4ed98a['set']({'label':g(_0x4b2739,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x456c84}),_0x2f8a68['set']({'label':g(_0x4b2739,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x1d5559}),_0x4ed98a['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x2f8a68['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x4ed98a['on']('execute',()=>this['fire']('execute','backward')),_0x2f8a68['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',_0x1c8f38['if']('_isStatusLabelVisible','ck-hidden',_0x220fc9=>!_0x220fc9)]},'children':[{'text':_0x1c8f38['to']('isNavigationMode',_0x420f32=>_0x420f32?g(_0x4b2739,'EDIT_X_OF_Y_REVISIONS')+':\x20':g(_0x4b2739,'Total')+':\x20')}]},{'text':_0x1c8f38['to']('_statusText')}]},new _0x333091(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x4ed98a,_0x2f8a68]}]});}}const le='ck-editor__editable__loading-overlay';class de extends _0x3d5130{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x3d8ef3=this['editor']['editing']['view'];_0x3d8ef3['change'](_0x3fcef1=>{for(const _0x133a51 of _0x3d8ef3['document']['roots'])_0x3fcef1['addClass'](le,_0x133a51);});}['hide'](){const _0x55e3db=this['editor']['editing']['view'];_0x55e3db['change'](_0x5166e9=>{for(const _0x244bcc of _0x55e3db['document']['roots'])_0x5166e9['removeClass'](le,_0x244bcc);});}}class R extends _0x3d5130{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[m,de];}['init'](){const _0x102ed1=this['editor'],_0x303e47=_0x102ed1['plugins']['get'](m),_0x2cb657=_0x102ed1['plugins']['get'](de);_0x102ed1['ui']['componentFactory']['add']('exitToEditing',_0x6ea769=>{const _0x262dcc=new te(_0x6ea769);return _0x262dcc['set']({'label':g(_0x6ea769,'Back\x20to\x20editing'),'icon':_0x6acf7e,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x262dcc,'execute',()=>{_0x102ed1['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x262dcc;}),_0x102ed1['ui']['componentFactory']['add']('restoreRevision',_0x5b3f0e=>{const _0x532864=new te(_0x5b3f0e);return _0x532864['set']({'label':g(_0x5b3f0e,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x532864['bind']('isEnabled')['to'](_0x102ed1['commands']['get']('restoreRevision')),this['listenTo'](_0x532864,'execute',()=>_0x102ed1['execute']('restoreRevision')),_0x532864;}),_0x102ed1['ui']['componentFactory']['add']('changesNavigation',_0x3af082=>{const _0x186f6c=new di(_0x3af082),_0x4f5635=_0x102ed1['commands']['get']('showPreviousChange'),_0x40a97d=_0x102ed1['commands']['get']('showNextChange');return _0x186f6c['bind']('isBackwardNavigationEnabled')['to'](_0x4f5635,'isEnabled'),_0x186f6c['bind']('isForwardNavigationEnabled')['to'](_0x40a97d,'isEnabled'),_0x186f6c['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x303e47),this['listenTo'](_0x186f6c,'execute',(_0x54fb0d,_0x4b3d54)=>{_0x102ed1['execute']('forward'===_0x4b3d54?'showNextChange':'showPreviousChange');}),_0x186f6c;}),_0x2cb657['show'](),_0x303e47['on']('change:isReady',(_0x30439e,_0x398bf5,_0x25b495)=>{_0x25b495?_0x2cb657['hide']():_0x2cb657['show']();});}}class at extends _0xdbd9e1{['_resizeObserver']=null;constructor(_0x1d566f,_0x2718cc){super(_0x1d566f,_0x2718cc);const _0x57d3c2=this['bindTemplate'];this['set']({'label':g(_0x1d566f,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=g(_0x1d566f,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x57d3c2['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new nt(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x342ffc=this['fieldView']['element'];this['_tooltipString']=_0x342ffc['scrollWidth']>_0x342ffc['clientWidth']&&_0x342ffc['value']||'';}}class si extends ts{constructor(_0x52fa9f,_0x370e20,_0x4ec187){super(_0x52fa9f);const _0x67329f=new _0x2933eb();_0x67329f['set']({'content':_0x383042,'viewBox':'0\x200\x2011\x2010'});const _0x4bce7f=['ck','ck-revision-history-sidebar__revision-author'];_0x4ec187&&_0x4bce7f['push']('ck-revision-history-sidebar__revision-author_creator');const _0x2553a7=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':g(_0x52fa9f,_0x4ec187?'Revision\x20creator':'Revision\x20author')},'children':[_0x67329f,_0x370e20['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x4bce7f},'children':_0x2553a7});}}function oi(_0x890794,_0x30f8ba){const _0x3c595f=_0x890794['bindTemplate'],_0x51b761=_0x890794['locale'],_0x2eaf0c=_0x2c73ee(_0x51b761);_0x2eaf0c['panelPosition']='sw';const _0x32e96c=function(_0x4deb98,_0x5beedc){const _0x33e790=function(_0x5e3f7b,_0x4579ee){const _0x2b3e90=_0x5e3f7b['locale'],_0x5503ff={'Compare\x20against\x20selected':g(_0x2b3e90,'Compare\x20against\x20selected'),'Name\x20this\x20revision':g(_0x2b3e90,'Name\x20this\x20revision'),'Restore\x20this\x20revision':g(_0x2b3e90,'Restore\x20this\x20revision')};return _0x4579ee['map'](_0x2367f3=>{const _0x30f22c=_0x5503ff[_0x2367f3['name']];return _0x30f22c&&_0x30f22c!==_0x2367f3['name']&&(_0x2367f3['name']=_0x30f22c),_0x2367f3;});}(_0x4deb98,_0x5beedc),_0x3dfbbc=new _0x84a14f();for(const _0x4af770 of _0x33e790){const _0x23035d={'type':'button','model':new to({'label':_0x4af770['name'],'class':_0x4af770['class'],'withText':!0x0,'role':'menuitem','_action':_0x4af770['action']})};_0x23035d['model']['bind']('isEnabled')['to'](_0x4deb98,'isActionsDropdownOpen',_0x116ad5=>'function'!=typeof _0x4af770['isEnabled']||(!_0x116ad5||_0x4af770['isEnabled'](_0x4deb98))),_0x3dfbbc['add'](_0x23035d);}return _0x3dfbbc;}(_0x890794,_0x30f8ba);return _0x890794['bind']('isActionsDropdownOpen')['to'](_0x2eaf0c,'isOpen'),_0x2eaf0c['buttonView']['set']({'label':g(_0x51b761,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x16da7f}),_0x2eaf0c['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x3c595f['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x3c595f['to'](_0x3629ba=>_0x3629ba['stopPropagation']())}}),_0x2eaf0c['on']('execute',_0x423f3f=>{_0x890794['isReady']&&'function'==typeof _0x423f3f['source']['_action']&&_0x423f3f['source']['_action'](_0x890794);}),_0x3b20d3(_0x2eaf0c,_0x32e96c,{'role':'menu'}),_0x2eaf0c['listenTo'](_0x890794,'change:isActionsDropdownOpen',(_0x42036e,_0x10beb1,_0x197f86)=>{if(_0x197f86)for(const _0x13c317 of _0x2eaf0c['listView']['items']){const _0x3bd604=_0x13c317['children']['first'],_0x27f6dc=_0x30f8ba['find'](_0xe4c7de=>_0xe4c7de['action']===_0x3bd604['_action'])['isVisible'];_0x13c317['isVisible']=void 0x0===_0x27f6dc||_0x27f6dc(_0x890794);}}),_0x2eaf0c;}class hi extends/* #__PURE__ -- @preserve */
26
+ ti(ts){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0xd45ca8,_0x1e3d90,_0x3a1946,_0xb5988e){super(_0xd45ca8);const _0x2436e6=this['bindTemplate'],_0x5d7b5d=function(_0x991272,_0x4944de){const _0x3658df=Array['from'](_0x4944de['authors'])['filter'](_0x2e7b35=>_0x2e7b35!=_0x4944de['creator']);return _0x4944de['creator']&&_0x3658df['unshift'](_0x4944de['creator']),_0x3658df['map'](_0x54ca24=>new si(_0x991272,_0x54ca24,_0x54ca24==_0x4944de['creator']));}(_0xd45ca8,_0x1e3d90);this['id']=_0x1e3d90['id'],this['_revision']=_0x1e3d90,this['_requireRevisionName']=_0xb5988e,this['bind']('name','createdAt')['to'](_0x1e3d90),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x3f5672=>{return _0x3ca450=_0xd45ca8['uiLanguage'],(_0x4dad9d=_0x3f5672)['toLocaleDateString'](_0x3ca450,{'month':'long','day':'numeric'})+',\x20'+_0x4dad9d['toLocaleTimeString'](_0x3ca450,{'hour':'numeric','minute':'numeric'});var _0x3ca450,_0x4dad9d;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new at(_0xd45ca8,_0x530dc7),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x44eb9b=>_0x44eb9b||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x59e171,_0xfb531b)=>_0x59e171&&_0xfb531b),this['revisionActionsView']=_0x3a1946&&_0x3a1946['length']?oi(this,_0x3a1946):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x2436e6['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x2436e6['if']('isEnabled','ck-disabled',_0x59a238=>!_0x59a238),_0x2436e6['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x2436e6['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x2436e6['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':_0x2436e6['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':_0x5d7b5d}]},this['revisionActionsView']],'on':{'click':_0x2436e6['to'](_0x20cd8e=>{_0x20cd8e['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x4e1a53=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x4e1a53,'change',()=>{this['_requireRevisionName']&&!_0x4e1a53['value']||this['fire']('setName',{'id':this['id'],'name':_0x4e1a53['value']}),_0x4e1a53['value']||(_0x4e1a53['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function vi(_0x56ab73,_0x1e222b){const _0x1bbe54=_0x4f3e00['fromJSDate'](_0x56ab73)['setLocale'](_0x1e222b),_0x5a1242=_0x4f3e00['local'](),_0x14c821=_0x5a1242['minus']({'days':0x1})['startOf']('day');let _0x5602c4,_0x4c1f15;return _0x1bbe54['hasSame'](_0x5a1242,'day')?(_0x5602c4=_0x1bbe54['startOf']('day')['toJSDate'](),_0x4c1f15=_0x1bbe54['toRelativeCalendar']()):_0x1bbe54['hasSame'](_0x14c821,'day')?(_0x5602c4=_0x14c821['toJSDate'](),_0x4c1f15=_0x1bbe54['toRelativeCalendar']()):_0x1bbe54['hasSame'](_0x5a1242,'week')?(_0x5602c4=_0x1bbe54['startOf']('week')['toJSDate'](),_0x4c1f15=_0x1bbe54['weekdayLong']||''):_0x1bbe54['hasSame'](_0x5a1242,'year')?(_0x5602c4=_0x1bbe54['startOf']('month')['toJSDate'](),_0x4c1f15=_0x1bbe54['monthLong']||''):(_0x5602c4=_0x1bbe54['startOf']('year')['toJSDate'](),_0x4c1f15=String(_0x1bbe54['year'])),{'startDate':_0x5602c4,'localizedPeriodName':_0x4c1f15};}class mi extends ts{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x1cfbe8,_0x4f9b1e,_0x4e37c8,_0x120d39){super(_0x1cfbe8);const _0x22a4a3=vi(_0x4f9b1e,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x4f9b1e,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x4e37c8,this['_requireRevisionName']=_0x120d39,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':_0x22a4a3}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x43e446){const _0x2b374c=new hi(this['locale'],_0x43e446,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x2b374c);}['removeRevision'](_0x133ede){const _0x1a78ed=this['revisionViews']['find'](_0x3eec3a=>_0x3eec3a['id']===_0x133ede['id']);this['revisionViews']['remove'](_0x1a78ed);}}class as extends ts{constructor(_0x3d77e4){super(_0x3d77e4);const _0xb0c05=new _0x2933eb();_0xb0c05['content']=_0x791eb9,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0xb0c05,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[g(_0x3d77e4,'Revision\x20history')]}]});}}class li extends ts{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x856075,_0x2380ba,_0x4cffc2,_0x41c88c){super(_0x856075);const _0x54a408=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x2380ba,this['_revisionActions']=_0x4cffc2,this['_requireRevisionName']=_0x41c88c,this['on']('select',(_0x54cf64,_0x57b812)=>{this['fire']('revisionSelected',_0x57b812);}),this['on']('setName',(_0xec084d,_0x257b4d)=>{this['fire']('revisionSetName',_0x257b4d);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new as(_0x856075),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x54a408['if']('isEnabled','ck-disabled',_0x129194=>!_0x129194)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x3333ce of this['_revisions'])this['_addRevision'](_0x3333ce);this['_revisions']['on']('add',(_0x1704bd,_0x5efb50)=>{this['_addRevision'](_0x5efb50);}),this['_revisions']['on']('remove',(_0x8dac3,_0x40a0a5)=>{this['_removeRevision'](_0x40a0a5);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x1faeb8=>_0x1faeb8['revisionViews']['map'](_0x1e350c=>_0x1e350c))['flat']();}['selectRevision'](_0x22934a){for(const _0x21970e of this['revisionViews'])_0x22934a&&_0x22934a['id']===_0x21970e['id']?_0x21970e['select']():_0x21970e['deselect']();}['highlightRevisions'](_0x57d781){for(const _0x5d93a6 of this['revisionViews'])_0x57d781['some'](({id:_0x161fbb})=>_0x161fbb===_0x5d93a6['id'])?_0x5d93a6['highlight']():_0x5d93a6['unhighlight']();}['_addRevision'](_0x376c1f){const _0x31bef6=vi(_0x376c1f['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x976465=this['timePeriodViews']['get'](0x0);_0x976465&&_0x976465['startDate']['getTime']()===_0x31bef6['getTime']()||(_0x976465=new mi(this['locale'],_0x31bef6,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x976465)),_0x976465['addRevision'](_0x376c1f);}['_removeRevision'](_0x3a989a){const _0xc4f2f6=vi(_0x3a989a['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0xc4f2f6)['removeRevision'](_0x3a989a);}['_getTimePeriodViewByStartDate'](_0x489f82){return this['timePeriodViews']['find'](_0x4d33ad=>_0x4d33ad['startDate']['getTime']()===_0x489f82['getTime']());}}class d extends _0x3d5130{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
27
27
  ((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
28
- _t();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[m];}constructor(_0x25a912){super(_0x25a912),this['_revisionViewer']=_0x25a912['plugins']['get'](m),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0xfeba37=this['_revisionsRepository']['_revisions'],_0x402ae5=this['_createRevisionActions'](),_0xfc5d84=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new di(this['editor']['locale'],_0xfeba37,_0x402ae5,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',(_0x4171b8,_0x1005bb)=>{_0x1005bb['revisionViews']['on']('add',(_0x241867,_0x308946)=>{_0x308946['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)),_0xfc5d84['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x1a4278=this['_revisionsRepository']['getRevision'](0x0);if(_0x1a4278){const _0x3dc27b=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x1a4278['id']);this['_revisionViewer']['compare'](_0x1a4278,_0x3dc27b);}}['_handleRevisionSelected'](_0x4b2dae,_0x6c7986){const _0x39a450=this['_revisionsRepository']['getRevision'](_0x6c7986['id']),_0x5d9874=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x39a450['id']);this['_revisionViewer']['compare'](_0x39a450,_0x5d9874);}['_handleRevisionSetName'](_0x18a4fb,_0x326f0a){this['_revisionsRepository']['getRevision'](_0x326f0a['id'])['setName'](_0x326f0a['name']);}['_handleDiffChange'](_0x1e8eb4,_0x12d784,_0x118666){const _0x429cbe=this['_revisionsRepository']['getRevisionsInDiff'](_0x118666);_0x429cbe['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x429cbe),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x429cbe[0x0]));}['_createRevisionActions'](){const _0x282195=this['editor'],_0x4a45a7=d['availableRevisionActions'],_0x1754c7=_0x282195['config']['get']('revisionHistory.revisionActions')||d['defaultRevisionActions'];if(_0x1754c7['length'])return _0x1754c7['map'](_0x2a7103=>{const _0x537eba='string'==typeof _0x2a7103?Object['assign']({},_0x4a45a7[_0x2a7103]):_0x2a7103;return _0x537eba['action']=_0x537eba['action']['bind'](this,_0x282195),_0x537eba['isVisible']&&(_0x537eba['isVisible']=_0x537eba['isVisible']['bind'](this,_0x282195)),_0x537eba;});}}function _t(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x40fb2a},_0x2d8109)=>{const _0x17e54b=_0x40fb2a['get'](m),_0x1e7703=_0x17e54b['repository'];let _0x22a51b=_0x17e54b['diff']['newRevisionId'],_0x9c9415=_0x2d8109['id'];_0x1e7703['getIndex'](_0x22a51b)>_0x1e7703['getIndex'](_0x9c9415)&&([_0x22a51b,_0x9c9415]=[_0x9c9415,_0x22a51b]),_0x17e54b['compare'](_0x22a51b,_0x9c9415);},'isVisible':({plugins:_0xb22b01},_0x3cf094)=>{const _0x1417df=_0xb22b01['get'](m);return!(_0x1417df['repository']['getRevisionsInDiff'](_0x1417df['diff'])['length']>0x2)&&!_0x3cf094['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x89bfc9,{id:_0x5d2a7a})=>{_0x89bfc9['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x5d2a7a);},'isVisible':({plugins:_0x14fd21},_0x2b915c)=>!!_0x14fd21['get'](m)['repository']['getLaterVisibleRevision'](_0x2b915c['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x49cc0b},{id:_0x1d287f,revisionNameView:_0x31d17b})=>{const _0x5857ec=_0x49cc0b['get'](m),_0x56c656=_0x5857ec['repository']['getEarlierVisibleRevision'](_0x1d287f);_0x5857ec['compare'](_0x1d287f,_0x56c656),_0x31d17b['focus'](),_0x31d17b['fieldView']['select']();}}};}class tt extends st{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x19d7bf,_0x50cce1){super(_0x19d7bf),this['_view']=_0x50cce1,this['_toolbarConfig']=et(_0x19d7bf['config']['get']('toolbar')),this['_elementReplacer']=new ot();}get['element'](){return this['view']['element'];}['init'](_0x3a6549){const _0x4d903b=this['editor'],_0x481686=this['view'],_0x2c18b9=_0x4d903b['editing']['view'],_0x372414=_0x481686['editable'],_0x546855=_0x2c18b9['document']['getRoot']();_0x372414['name']=_0x546855['rootName'],_0x481686['render']();const _0x2703e5=_0x372414['element'];this['setEditableElement'](_0x372414['name'],_0x2703e5),_0x481686['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x2c18b9['attachDomRoot'](_0x2703e5),this['_elementReplacer']['replace'](_0x3a6549,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x173c0f=this['view'],_0x279acf=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x279acf['detachDomRoot'](_0x173c0f['editable']['name']),_0x173c0f['destroy']();}['_initToolbar'](){const _0x3b204c=this['view'];_0x3b204c['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x3b204c['stickyPanel']['limiterElement']=_0x3b204c['element'],_0x3b204c['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x2a3660})=>_0x2a3660),_0x3b204c['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x3b204c['toolbar']);}}class it extends rt{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x1940d6,_0x4dadd2,_0x1cdc2c={}){super(_0x1940d6),this['stickyPanel']=new ht(_0x1940d6),this['toolbar']=new dt(_0x1940d6,{'shouldGroupWhenFull':_0x1cdc2c['shouldToolbarGroupWhenFull']}),this['_editable']=new ct(_0x1940d6,_0x4dadd2);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class w extends/* #__PURE__ -- @preserve */
29
- _0x294adf(_0x57ae8d){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x168eec,_0x51cf3c){super(_0x51cf3c),this['sourceElement']=_0x168eec,this['model']['document']['createRoot']();const _0x3df8c5=new it(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new tt(this,_0x3df8c5);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x466b81,_0x271c33){const _0x5d3477=new this(_0x466b81,_0x271c33);return await _0x5d3477['initPlugins'](),await _0x5d3477['ui']['init'](_0x466b81),await _0x5d3477['data']['init'](_0x5d3477['config']['get']('initialData')||''),_0x5d3477['fire']('ready'),_0x5d3477;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class yt extends _0x365de9{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x501f74){function _0x48f841(_0x1ddd63){return _0x1ddd63['map'](_0x12901c=>String['fromCharCode'](_0x12901c))['join']('');}super(_0x501f74),this['result']='end',_0x501f74[_0x48f841([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x48f841([0x76,0x69,0x65,0x77])][_0x48f841([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x48f841([0x61,0x75,0x74,0x6f]),_0x501f74[_0x48f841([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x48f841([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x48f841([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x48f841([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x48f841([0x6f,0x6b])});}}class k extends _0x365de9{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,f];}constructor(_0x49dce0){if(super(_0x49dce0),!this['editor']['config']['get']('revisionHistory'))throw new _0x3e2bd8('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x426f0a=>this['_showRevisionViewer']({..._0x426f0a,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x4c0699=>this['_closeRevisionViewer'](_0x4c0699)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x1d9d97=>this['_restoreRevision'](_0x1d9d97)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x5a85ef){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x5a85ef;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x3803){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x3803);}['getRevision'](_0x29bae7){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x29bae7);}['getRevisions'](_0xfad87b){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0xfad87b||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x504733=this['editor'],_0x370707=_0x4b6ff5(_0x504733,p),_0x39a6df=_0x504733['plugins']['get']('RevisionTracker'),_0x286844=_0x504733['plugins']['get']('Users')['users'];return _0x370707['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x370707['lazyRoots'],(_0x370707['plugins']['push'](yt,m,R,class extends _0x365de9{static get['requires'](){return[m,'Users'];}['init'](){const _0xddf046=this['editor']['plugins']['get']('Users');for(const _0x2d6e40 of _0x286844)_0x2d6e40['isAnonymous']||_0xddf046['getUser'](_0x2d6e40['id'])||_0xddf046['addUser'](_0x2d6e40);const _0x12ebb9=_0x39a6df['repository']['getRevisions']();let _0x32bf69=null;const _0xb4df09=this['editor']['plugins']['get']('RevisionViewer');_0xb4df09['adapter']=_0x39a6df['adapter'],_0xb4df09['bind']('isEnabled')['to'](_0x39a6df),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x504733,'isReadOnly',_0x28569d=>!_0x28569d);for(const _0x3a109e of _0x12ebb9){const _0x3d7e45=null===_0x3a109e['creator'];if(_0x3d7e45&&_0x3a109e['toVersion']===_0x3a109e['fromVersion'])continue;const _0x401c05=_0x3a109e['toJSON']();_0xb4df09['addRevisionData'](_0x401c05,(_0x66f21c,_0x3be25e,_0x2c81f5)=>{if(_0x3d7e45){if(_0x32bf69)_0x32bf69['_update'](_0x66f21c,_0x3be25e);else{if(!_0x3be25e){const _0x18df84=_0x2c81f5['toJSON']();_0x18df84['id']=_0x1fadd2(),_0x39a6df['saveRevision'](_0x18df84,_0x2c81f5['toVersion'])['then'](_0x443ba8=>{_0x32bf69=_0x443ba8;});}}}else _0x3a109e['_update'](_0x66f21c,_0x3be25e);});}}},d),_0x370707);}['_enhanceShowRevisionViewerCallback'](){const _0x14c3e3=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0xfbb492=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x501cd0=this['editor']['plugins']['get']('Autosave');await _0x501cd0['save']();}else await _0xfbb492['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x369e04=this['editor']['plugins']['get']('Dialog');_0x369e04['isOpen']&&_0x369e04['hide']();}const _0x1f659f=this['_getRevisionViewerEditorConfig']();return _0x14c3e3(_0x1f659f)['then'](_0x3b9f22=>{return(this['_viewerEditor']=_0x3b9f22,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'),_0x3b9f22);})['catch'](_0x505f69=>(console['error'](_0x505f69),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x3d2c76=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'](),_0x3d2c76(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x274705=this['editor']['plugins']['get']('Annotations');_0x274705['refreshVisibility'](),_0x274705['refreshPositioning']();}})));}['_showRevisionViewer'](_0x24a4e7){const _0x1e57f0=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x3e0f04=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x1f3359=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return w['create'](_0x1f3359,_0x24a4e7)['then'](_0x1124ed=>(_0x3e0f04['style']['display']='block',_0x1e57f0['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x1124ed));}['_closeRevisionViewer'](_0x46bf38){const _0x413bbc=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x413bbc['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x46bf38['destroy']();}async['_restoreRevision'](_0x593438){const _0x1cbd06=this['editor'],_0x11dd54=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x36026b=_0x1cbd06['plugins']['get']('RevisionTracker'),_0x2ee2b8=_0x1cbd06['plugins']['get']('RevisionHistoryUtils'),_0x5f261a=_0x11dd54['repository']['getRevision'](_0x593438);let _0x4d448a,_0x232114,_0xa24c5;try{await _0x2ee2b8['loadRevisionData'](_0x5f261a,this['adapter']),_0x4d448a=_0x2ee2b8['getRevisionDocumentData'](_0x5f261a),_0x232114=_0x2ee2b8['getRevisionRootsAttributes'](_0x5f261a);}catch(_0x57db31){return void console['error'](_0x57db31);}_0x1cbd06['model']['change'](_0x249328=>{for(const _0x57ad3b of Array['from'](_0x1cbd06['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x249328['removeMarker'](_0x57ad3b);}),_0x11dd54['isReady']=!0x1,_0x1cbd06['model']['enqueueChange'](_0x2fe8e5=>{_0x2fe8e5['setSelection'](null),_0x2fe8e5['removeSelectionAttribute'](_0x1cbd06['model']['document']['selection']['getAttributeKeys']());const _0x576957=Object['keys'](_0x4d448a);for(const _0x377f6b of _0x1cbd06['model']['document']['roots'])'$graveyard'!=_0x377f6b['rootName']&&_0x377f6b['isAttached']()&&!_0x576957['includes'](_0x377f6b['rootName'])&&_0x2fe8e5['detachRoot'](_0x377f6b);for(const _0x2337f9 of _0x576957){let _0x588ca4=_0x1cbd06['model']['document']['getRoot'](_0x2337f9);_0x588ca4&&_0x588ca4['isAttached']()||(_0x588ca4=_0x2fe8e5['addRoot'](_0x2337f9));const _0x1aef88=_0x232114[_0x2337f9],_0x171d25=Object['keys'](_0x1aef88),_0x148b50=_0x4d448a[_0x2337f9];for(const _0x5963e1 of _0x588ca4['getAttributeKeys']())_0x171d25['includes'](_0x5963e1)||_0x2fe8e5['removeAttribute'](_0x5963e1,_0x588ca4);for(const _0x2a9195 of _0x171d25)_0x2fe8e5['setAttribute'](_0x2a9195,_0x232114[_0x2337f9][_0x2a9195],_0x588ca4);_0x2fe8e5['remove'](_0x2fe8e5['createRangeIn'](_0x588ca4)),_0x2fe8e5['insert'](_0x1cbd06['data']['parse'](_0x148b50,_0x588ca4),_0x588ca4,0x0);}});const _0x39b688=g(_0x1cbd06['locale'],'Restored');if(_0x5f261a['name'])_0xa24c5=-0x1==_0x5f261a['name']['indexOf'](_0x39b688)?_0x39b688+':\x20'+_0x5f261a['name']:_0x5f261a['name'];else _0xa24c5=_0x39b688+':\x20'+(_0x5f261a['createdAt']['toLocaleDateString'](_0x1cbd06['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x5f261a['createdAt']['toLocaleTimeString'](_0x1cbd06['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x36026b['saveRevision']({'name':_0xa24c5}),_0x11dd54['isReady']=!0x0,_0x1cbd06['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{h as Revision,k as RevisionHistory,f as RevisionHistoryUI,V as RevisionHistoryUtils,u as RevisionTracker,m as RevisionViewer,w as RevisionViewerEditor,le as RevisionViewerLoadingOverlay,R as RevisionViewerUI,I as RevisionsRepository,d as RevisionsSidebar};
28
+ pt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[m];}constructor(_0x2f6e77){super(_0x2f6e77),this['_revisionViewer']=_0x2f6e77['plugins']['get'](m),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x41d624=this['_revisionsRepository']['_revisions'],_0xc3a5bd=this['_createRevisionActions'](),_0x487ee8=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new li(this['editor']['locale'],_0x41d624,_0xc3a5bd,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',(_0x310228,_0x14d625)=>{_0x14d625['revisionViews']['on']('add',(_0x56fd06,_0x36b607)=>{_0x36b607['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)),_0x487ee8['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x1d957c=this['_revisionsRepository']['getRevision'](0x0);if(_0x1d957c){const _0xf82950=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x1d957c['id']);this['_revisionViewer']['compare'](_0x1d957c,_0xf82950);}}['_handleRevisionSelected'](_0x41f191,_0x219862){const _0x583bfb=this['_revisionsRepository']['getRevision'](_0x219862['id']),_0x11eef0=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x583bfb['id']);this['_revisionViewer']['compare'](_0x583bfb,_0x11eef0);}['_handleRevisionSetName'](_0x279c12,_0x1795f7){this['_revisionsRepository']['getRevision'](_0x1795f7['id'])['setName'](_0x1795f7['name']);}['_handleDiffChange'](_0xc09b12,_0x18f1c7,_0xbe3953){const _0x1e0184=this['_revisionsRepository']['getRevisionsInDiff'](_0xbe3953);_0x1e0184['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x1e0184),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x1e0184[0x0]));}['_createRevisionActions'](){const _0x346d5a=this['editor'],_0x11a3d9=d['availableRevisionActions'],_0x564c5c=_0x346d5a['config']['get']('revisionHistory.revisionActions')||d['defaultRevisionActions'];if(_0x564c5c['length'])return _0x564c5c['map'](_0x35acd6=>{const _0x373a69='string'==typeof _0x35acd6?Object['assign']({},_0x11a3d9[_0x35acd6]):_0x35acd6;return _0x373a69['action']=_0x373a69['action']['bind'](this,_0x346d5a),_0x373a69['isVisible']&&(_0x373a69['isVisible']=_0x373a69['isVisible']['bind'](this,_0x346d5a)),_0x373a69;});}}function pt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x2b1da0},_0x5aa24b)=>{const _0x17c5ee=_0x2b1da0['get'](m),_0x28c07b=_0x17c5ee['repository'];let _0x145a1c=_0x17c5ee['diff']['newRevisionId'],_0x57943c=_0x5aa24b['id'];_0x28c07b['getIndex'](_0x145a1c)>_0x28c07b['getIndex'](_0x57943c)&&([_0x145a1c,_0x57943c]=[_0x57943c,_0x145a1c]),_0x17c5ee['compare'](_0x145a1c,_0x57943c);},'isVisible':({plugins:_0x104e7e},_0x517d87)=>{const _0x2bb1d=_0x104e7e['get'](m);return!(_0x2bb1d['repository']['getRevisionsInDiff'](_0x2bb1d['diff'])['length']>0x2)&&!_0x517d87['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x4e4ff8,{id:_0x19f1d0})=>{_0x4e4ff8['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x19f1d0);},'isVisible':({plugins:_0xc6cf5b},_0x2eff73)=>!!_0xc6cf5b['get'](m)['repository']['getLaterVisibleRevision'](_0x2eff73['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x26c59f},{id:_0xf2c6a6,revisionNameView:_0x2bf334})=>{const _0x23f2ab=_0x26c59f['get'](m),_0x12edff=_0x23f2ab['repository']['getEarlierVisibleRevision'](_0xf2c6a6);_0x23f2ab['compare'](_0xf2c6a6,_0x12edff),_0x2bf334['focus'](),_0x2bf334['fieldView']['select']();}}};}class tt extends st{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x1ae772,_0x15915e){super(_0x1ae772),this['_view']=_0x15915e,this['_toolbarConfig']=et(_0x1ae772['config']['get']('toolbar')),this['_elementReplacer']=new ot();}get['element'](){return this['view']['element'];}['init'](_0x1fb581){const _0x15c1cb=this['editor'],_0x4a0e8c=this['view'],_0x4489bd=_0x15c1cb['editing']['view'],_0x422ac3=_0x4a0e8c['editable'],_0x1ebc56=_0x4489bd['document']['getRoot']();_0x422ac3['name']=_0x1ebc56['rootName'],_0x4a0e8c['render']();const _0x416893=_0x422ac3['element'];this['setEditableElement'](_0x422ac3['name'],_0x416893),_0x4a0e8c['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x4489bd['attachDomRoot'](_0x416893),this['_elementReplacer']['replace'](_0x1fb581,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x174b03=this['view'],_0x29f51a=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x29f51a['detachDomRoot'](_0x174b03['editable']['name']),_0x174b03['destroy']();}['_initToolbar'](){const _0xfbac9=this['view'];_0xfbac9['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0xfbac9['stickyPanel']['limiterElement']=_0xfbac9['element'],_0xfbac9['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x176692})=>_0x176692),_0xfbac9['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0xfbac9['toolbar']);}}class it extends rt{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x589f15,_0x5a2339,_0x40a91a={}){super(_0x589f15),this['stickyPanel']=new ht(_0x589f15),this['toolbar']=new dt(_0x589f15,{'shouldGroupWhenFull':_0x40a91a['shouldToolbarGroupWhenFull']}),this['_editable']=new ct(_0x589f15,_0x5a2339);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class w extends/* #__PURE__ -- @preserve */
29
+ _0x5b30b3(_0x3f8402){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x33367c,_0x1dd85e){super(_0x1dd85e),this['sourceElement']=_0x33367c,this['model']['document']['createRoot']();const _0x21f849=new it(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new tt(this,_0x21f849);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x27fe2d,_0x1cbc63){const _0x50f6dc=new this(_0x27fe2d,_0x1cbc63);return await _0x50f6dc['initPlugins'](),await _0x50f6dc['ui']['init'](_0x27fe2d),await _0x50f6dc['data']['init'](_0x50f6dc['config']['get']('initialData')||''),_0x50f6dc['fire']('ready'),_0x50f6dc;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class _t extends _0x3d5130{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1935bd){function _0x47c44e(_0x234100){return _0x234100['map'](_0x563f06=>String['fromCharCode'](_0x563f06))['join']('');}super(_0x1935bd),this['result']='end',_0x1935bd[_0x47c44e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x47c44e([0x76,0x69,0x65,0x77])][_0x47c44e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x47c44e([0x61,0x75,0x74,0x6f]),_0x1935bd[_0x47c44e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x47c44e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x47c44e([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x47c44e([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x47c44e([0x6f,0x6b])});}}class k extends _0x3d5130{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,f];}constructor(_0x8a542e){if(super(_0x8a542e),!this['editor']['config']['get']('revisionHistory'))throw new _0x4c1689('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x3d32d1=>this['_showRevisionViewer']({..._0x3d32d1,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x46150b=>this['_closeRevisionViewer'](_0x46150b)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x56d329=>this['_restoreRevision'](_0x56d329)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x1be81d){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x1be81d;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x4d18d2){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x4d18d2);}['getRevision'](_0x4ab745){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x4ab745);}['getRevisions'](_0x5f4e9b){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x5f4e9b||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0xe18a6f=this['editor'],_0x52cf5f=_0x4493e4(_0xe18a6f,p),_0x454cd9=_0xe18a6f['plugins']['get']('RevisionTracker'),_0x568eef=_0xe18a6f['plugins']['get']('Users')['users'];return _0x52cf5f['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x52cf5f['lazyRoots'],(_0x52cf5f['plugins']['push'](_t,m,R,class extends _0x3d5130{static get['requires'](){return[m,'Users'];}['init'](){const _0xc0bb30=this['editor']['plugins']['get']('Users');for(const _0x1bd3fb of _0x568eef)_0x1bd3fb['isAnonymous']||_0xc0bb30['getUser'](_0x1bd3fb['id'])||_0xc0bb30['addUser'](_0x1bd3fb);const _0x187135=_0x454cd9['repository']['getRevisions']();let _0x12d5a8=null;const _0x344fa6=this['editor']['plugins']['get']('RevisionViewer');_0x344fa6['adapter']=_0x454cd9['adapter'],_0x344fa6['bind']('isEnabled')['to'](_0x454cd9),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0xe18a6f,'isReadOnly',_0x2bff01=>!_0x2bff01);for(const _0x396b2d of _0x187135){const _0x19c010=null===_0x396b2d['creator'];if(_0x19c010&&_0x396b2d['toVersion']===_0x396b2d['fromVersion'])continue;const _0x2ba5e9=_0x396b2d['toJSON']();_0x344fa6['addRevisionData'](_0x2ba5e9,(_0x20440c,_0x5068fc,_0x40d3e7)=>{if(_0x19c010){if(_0x12d5a8)_0x12d5a8['_update'](_0x20440c,_0x5068fc);else{if(!_0x5068fc){const _0x19efb6=_0x40d3e7['toJSON']();_0x19efb6['id']=_0xbd2e10(),_0x454cd9['saveRevision'](_0x19efb6,_0x40d3e7['toVersion'])['then'](_0x320043=>{_0x12d5a8=_0x320043;});}}}else _0x396b2d['_update'](_0x20440c,_0x5068fc);});}}},d),_0x52cf5f);}['_enhanceShowRevisionViewerCallback'](){const _0x1acbde=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0xd510b2=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x451c1b=this['editor']['plugins']['get']('Autosave');await _0x451c1b['save']();}else await _0xd510b2['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x1ac5eb=this['editor']['plugins']['get']('Dialog');_0x1ac5eb['isOpen']&&_0x1ac5eb['hide']();}const _0x1647f8=this['_getRevisionViewerEditorConfig']();return _0x1acbde(_0x1647f8)['then'](_0x2b8bd4=>{return(this['_viewerEditor']=_0x2b8bd4,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'),_0x2b8bd4);})['catch'](_0x1e29a1=>(console['error'](_0x1e29a1),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x20787f=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'](),_0x20787f(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x11808a=this['editor']['plugins']['get']('Annotations');_0x11808a['refreshVisibility'](),_0x11808a['refreshPositioning']();}})));}['_showRevisionViewer'](_0x1fffc6){const _0x1a3a74=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x1cf5a2=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x38d4f7=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return w['create'](_0x38d4f7,_0x1fffc6)['then'](_0x2531f0=>(_0x1cf5a2['style']['display']='block',_0x1a3a74['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x2531f0));}['_closeRevisionViewer'](_0x3c3e09){const _0x171ddd=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x171ddd['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x3c3e09['destroy']();}async['_restoreRevision'](_0x526771){const _0x51ee43=this['editor'],_0xfddf92=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x275509=_0x51ee43['plugins']['get']('RevisionTracker'),_0x24d898=_0x51ee43['plugins']['get']('RevisionHistoryUtils'),_0x286a34=_0xfddf92['repository']['getRevision'](_0x526771);let _0x4ade7d,_0x26149f,_0x28499c;try{await _0x24d898['loadRevisionData'](_0x286a34,this['adapter']),_0x4ade7d=_0x24d898['getRevisionDocumentData'](_0x286a34),_0x26149f=_0x24d898['getRevisionRootsAttributes'](_0x286a34);}catch(_0x28b1c4){return void console['error'](_0x28b1c4);}_0x51ee43['model']['change'](_0x4914c4=>{for(const _0x1f45a0 of Array['from'](_0x51ee43['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x4914c4['removeMarker'](_0x1f45a0);}),_0xfddf92['isReady']=!0x1,_0x51ee43['model']['enqueueChange'](_0x5117c0=>{_0x5117c0['setSelection'](null),_0x5117c0['removeSelectionAttribute'](_0x51ee43['model']['document']['selection']['getAttributeKeys']());const _0x4f17f4=Object['keys'](_0x4ade7d);for(const _0x36ce4a of _0x51ee43['model']['document']['roots'])'$graveyard'!=_0x36ce4a['rootName']&&_0x36ce4a['isAttached']()&&!_0x4f17f4['includes'](_0x36ce4a['rootName'])&&_0x5117c0['detachRoot'](_0x36ce4a);for(const _0x12169b of _0x4f17f4){let _0x5d0ae9=_0x51ee43['model']['document']['getRoot'](_0x12169b);_0x5d0ae9&&_0x5d0ae9['isAttached']()||(_0x5d0ae9=_0x5117c0['addRoot'](_0x12169b));const _0x479e82=_0x26149f[_0x12169b],_0x2703ea=Object['keys'](_0x479e82),_0x3b4478=_0x4ade7d[_0x12169b];for(const _0x1ef715 of _0x5d0ae9['getAttributeKeys']())_0x2703ea['includes'](_0x1ef715)||_0x5117c0['removeAttribute'](_0x1ef715,_0x5d0ae9);for(const _0x1c0d10 of _0x2703ea)_0x5117c0['setAttribute'](_0x1c0d10,_0x26149f[_0x12169b][_0x1c0d10],_0x5d0ae9);_0x5117c0['remove'](_0x5117c0['createRangeIn'](_0x5d0ae9)),_0x5117c0['insert'](_0x51ee43['data']['parse'](_0x3b4478,_0x5d0ae9),_0x5d0ae9,0x0);}});const _0x5e2714=g(_0x51ee43['locale'],'Restored');if(_0x286a34['name'])_0x28499c=-0x1==_0x286a34['name']['indexOf'](_0x5e2714)?_0x5e2714+':\x20'+_0x286a34['name']:_0x286a34['name'];else _0x28499c=_0x5e2714+':\x20'+(_0x286a34['createdAt']['toLocaleDateString'](_0x51ee43['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x286a34['createdAt']['toLocaleTimeString'](_0x51ee43['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x275509['saveRevision']({'name':_0x28499c}),_0xfddf92['isReady']=!0x0,_0x51ee43['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{h as Revision,k as RevisionHistory,f as RevisionHistoryUI,V as RevisionHistoryUtils,u as RevisionTracker,m as RevisionViewer,w as RevisionViewerEditor,de as RevisionViewerLoadingOverlay,R as RevisionViewerUI,I as RevisionsRepository,d as RevisionsSidebar};