@ckeditor/ckeditor5-revision-history 0.0.0-nightly-20250409.0 → 0.0.0-nightly-20250410.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. package/build/revision-history.js +1 -1
  2. package/dist/index.js +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 _0x27e923,uid as _0x402ab0,Collection as _0x1301ad,logWarning as _0x4c8407,FocusTracker as _0xc3e64e,KeystrokeHandler as _0x1082ff,scrollViewportToShowTarget as _0x55b855,ResizeObserver as at,ElementReplacer as ot,CKEditorError as _0x51ece8}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x2611c8,set as _0x32cded,unset as _0x21f1a6,isEqual as _0x40d4f8}from'es-toolkit/compat';import{Plugin as _0x4489ae,PendingActions as _0x46ffbc,Command as _0x180cbd,ElementApiMixin as _0x3249be,Editor as _0x2b34f8}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x5cb796,getMarkerDomElement as _0x91cb6f,ConfirmMixin as _0x180a86,sanitizeEditorConfig as _0x4493fa}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0x58ed23,ViewAttributeElement as _0xb91259,ViewEmptyElement as _0x2e854e,ViewRawElement as _0x47d335,ViewUIElement as _0x242f84,ViewDocumentFragment as _0x130a2d,ViewText as _0x2b4261,ViewElement as _0x820fb5,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 _0x25d66f,IconChevronUp as _0x3f13b7,IconChevronDown as _0x5ad88d,IconUndo as _0x1b0aa9,IconUser as _0x636f70,IconThreeVerticalDots as _0x47c6f0}from'@ckeditor/ckeditor5-icons/dist/index.js';import{View as _0x3c4eb7,injectCssTransitionDisabler as ts,submitHandler as _0xa709b3,LabeledFieldView as nt,createLabeledInputText as ti,createDropdown as _0x387160,ListView as _0x4eb355,ListItemView as te,ButtonView as _0x2e6643,MenuBarMenuView as _0x18dac9,MenuBarMenuListView as _0x970e28,MenuBarMenuListItemView as _0x1006d3,MenuBarMenuListItemButtonView as _0x15a5e5,ContextualBalloon as _0x472b27,ToolbarSeparatorView as _0x31076d,IconView as _0x3266ad,addListToDropdown as _0x12319e,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 _0x2f423f}from'luxon';class h extends/* #__PURE__ -- @preserve */
24
- _0x27e923(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x1f1a95){super(),this['id']=_0x1f1a95['id']||_0x402ab0(),this['creator']=_0x1f1a95['creator']||null,this['authors']=_0x1f1a95['authors']||[],this['diffData']=_0x1f1a95['diffData']||null,this['toVersion']=_0x1f1a95['toVersion']||0x0,this['fromVersion']=_0x1f1a95['fromVersion']||0x0,this['set']('name',_0x1f1a95['name']||''),this['set']('createdAt',_0x1f1a95['createdAt']||new Date()),this['set']('attributes',_0x1f1a95['attributes']||{});}['setName'](_0x2435bc){this['_update']({'name':_0x2435bc});}['setAttribute'](_0x5cbfb5,_0x5bc14d){const _0x27082b=_0x2611c8(this['attributes']);_0x32cded(_0x27082b,_0x5cbfb5,_0x5bc14d),this['_update']({'attributes':_0x27082b});}['removeAttribute'](_0x10426e){const _0x5809d4=_0x2611c8(this['attributes']);_0x21f1a6(_0x5809d4,_0x10426e),this['_update']({'attributes':_0x5809d4});}['_update'](_0x566094,_0x262558=!0x1){let _0x86897f=!0x1;const _0x1a450d={'id':this['id']},_0xde9d1e=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x3318d3 of _0xde9d1e){const _0x5a69c0=_0x566094[_0x3318d3];void 0x0!==_0x5a69c0&&_0x5a69c0!==this[_0x3318d3]&&(this[_0x3318d3]=_0x5a69c0,_0x1a450d[_0x3318d3]=_0x5a69c0,_0x86897f=!0x0);}_0x86897f&&(_0x1a450d['authors']&&(_0x1a450d['authorsIds']=_0x1a450d['authors']['map'](_0x54ab6f=>_0x54ab6f['id']),delete _0x1a450d['authors']),this['fire']('_update',_0x1a450d,_0x262558));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x28d818=>_0x28d818['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class I extends _0x4489ae{['_revisions'];static get['requires'](){return[_0x5cb796];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x5794c2){super(_0x5794c2),this['_revisions']=new _0x1301ad();}['afterInit'](){!async function(_0x46abc8){const _0x2c0758=_0x58761a([0x70,0x73,0x58,0x47,0x37,0x6b,0x4d,0x52,0x79,0x4e,0x76,0x53,0x51,0x35,0x55,0x64,0x74,0x50,0x34,0x4a,0x49,0x32,0x57,0x48,0x41,0x6e,0x5a,0x39,0x43,0x44,0x68,0x6d,0x59,0x30,0x78,0x65,0x67,0x75,0x45,0x31,0x4b,0x69,0x46,0x71,0x4f,0x54,0x33,0x63,0x72,0x61,0x66,0x56,0x4c,0x36,0x6f,0x7a,0x6c,0x62,0x6a,0x38,0x77,0x42]),_0x504970=0xeb829,_0x26835e=0x79692806,_0x43845e=0x796e4c8e^_0x26835e,_0x3bb223=window[_0x58761a([0x44,0x61,0x74,0x65])][_0x58761a([0x6e,0x6f,0x77])](),_0x48548d=_0x46abc8[_0x58761a([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1ad87d=new window[(_0x58761a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x403154=>{_0x48548d[_0x58761a([0x6f,0x6e,0x63,0x65])](_0x58761a([0x72,0x65,0x61,0x64,0x79]),_0x403154);}),_0x4c2b3e={[_0x58761a([0x6b,0x74,0x79])]:_0x58761a([0x45,0x43]),[_0x58761a([0x75,0x73,0x65])]:_0x58761a([0x73,0x69,0x67]),[_0x58761a([0x63,0x72,0x76])]:_0x58761a([0x50,0x2d,0x32,0x35,0x36]),[_0x58761a([0x78])]:_0x58761a([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]),[_0x58761a([0x79])]:_0x58761a([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]),[_0x58761a([0x61,0x6c,0x67])]:_0x58761a([0x45,0x53,0x32,0x35,0x36])},_0x214fec=_0x48548d[_0x58761a([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x58761a([0x67,0x65,0x74])](_0x58761a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x472114(){let _0x21a073,_0x29a8ef=null,_0x2f62d7=null;try{if(_0x214fec==_0x58761a([0x47,0x50,0x4c]))return _0x58761a([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x21a073=_0x36c363(),!_0x21a073)return _0x58761a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x21a073[_0x58761a([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2f62d7=_0x471b39(_0x21a073[_0x58761a([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x21a073[_0x58761a([0x6a,0x74,0x69])])),await _0x251f3c()?_0x4b743c()?_0x4b1f4f()?_0x58761a([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x322944()?(_0x21a073[_0x58761a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x58761a([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x29a8ef=_0x2dc2e3(_0x58761a([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x21a073[_0x58761a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x58761a([0x74,0x72,0x69,0x61,0x6c])&&(_0x29a8ef=_0x2dc2e3(_0x58761a([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x1ada66()):_0x58761a([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x58761a([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x58761a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x236556){return _0x58761a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4b1f4f(){const _0xc7d920=[_0x58761a([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x58761a([0x74,0x72,0x69,0x61,0x6c])][_0x58761a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x21a073[_0x58761a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x3bb223/0x3e8:0xe10*_0x43845e;return _0x21a073[_0x58761a([0x65,0x78,0x70])]<_0xc7d920;}function _0x4b743c(){const _0x133b71=_0x21a073[_0x58761a([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x133b71)return!0x1;if(_0x133b71[_0x58761a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x58761a([0x2a])))return!0x0;if(_0x133b71[_0x58761a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x58761a([0x52,0x48])))return!0x0;if(_0x133b71[_0x58761a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x58761a([0x52,0x52,0x48]))){if(_0x2b263b())return!0x0;if(_0x19e9fe()||_0x459a51())return!0x0;}return!0x1;}function _0x322944(){const _0x37d7bf=_0x21a073[_0x58761a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x37d7bf||0x0==_0x37d7bf[_0x58761a([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0xea35d6}=new URL(window[_0x58761a([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x37d7bf[_0x58761a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xea35d6))return!0x0;const _0x2018c9=_0xea35d6[_0x58761a([0x73,0x70,0x6c,0x69,0x74])](_0x58761a([0x2e]));return _0x37d7bf[_0x58761a([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x41ea9d=>_0x41ea9d[_0x58761a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x58761a([0x2a])))[_0x58761a([0x6d,0x61,0x70])](_0x1c6ee4=>_0x1c6ee4[_0x58761a([0x73,0x70,0x6c,0x69,0x74])](_0x58761a([0x2e])))[_0x58761a([0x73,0x6f,0x6d,0x65])](_0x2092f2=>_0x2018c9[_0x58761a([0x65,0x76,0x65,0x72,0x79])]((_0x965a64,_0x437b6d)=>_0x2092f2[_0x437b6d]===_0x965a64||_0x2092f2[_0x437b6d]===_0x58761a([0x2a])));}function _0x1ada66(){return _0x29a8ef&&_0x2f62d7?new window[(_0x58761a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x61cfe2,_0xa61653)=>{_0x29a8ef[_0x58761a([0x74,0x68,0x65,0x6e])](_0x61cfe2,_0xa61653),_0x2f62d7[_0x58761a([0x74,0x68,0x65,0x6e])](_0x398b39=>{_0x398b39!=_0x58761a([0x56,0x61,0x6c,0x69,0x64])&&_0x61cfe2(_0x398b39);},_0xa61653);}):_0x29a8ef||_0x2f62d7||_0x58761a([0x56,0x61,0x6c,0x69,0x64]);}}function _0x471b39(_0x677873,_0x5317dd){return new window[(_0x58761a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x40544e=>{if(_0x5df5fd())return _0x40544e(_0x58761a([0x56,0x61,0x6c,0x69,0x64]));_0x1e54d8(),_0x48548d[_0x58761a([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x58761a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x111139=!0x1;const _0x182bc8=_0x402ab0();function _0x2807d7(_0xdf4307){return!!_0xdf4307&&(typeof _0xdf4307===_0x58761a([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xdf4307===_0x58761a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xdf4307[_0x58761a([0x74,0x68,0x65,0x6e])]===_0x58761a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xdf4307[_0x58761a([0x63,0x61,0x74,0x63,0x68])]===_0x58761a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x57f9be(_0x9e011c){_0x38e8bc(_0x9e011c)[_0x58761a([0x74,0x68,0x65,0x6e])](_0x198ca8=>{if(!_0x198ca8||_0x198ca8[_0x58761a([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x58761a([0x6f,0x6b]))return _0x58761a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x51eb52(_0x15b27f(_0x182bc8+_0x5317dd))!=_0x198ca8[_0x58761a([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x58761a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x58761a([0x56,0x61,0x6c,0x69,0x64]);})[_0x58761a([0x74,0x68,0x65,0x6e])](_0x58e7ed=>(_0x4e45f7(),_0x58e7ed),()=>{const _0x5d9092=_0x23bd1f();return null==_0x5d9092?(_0x4e45f7(),_0x58761a([0x56,0x61,0x6c,0x69,0x64])):_0x58761a(_0x3bb223-_0x5d9092>(0x5d65ac06^_0x26835e)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x58761a([0x74,0x68,0x65,0x6e])](_0x40544e)[_0x58761a([0x63,0x61,0x74,0x63,0x68])](()=>{_0x40544e(_0x58761a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1caf3d=0x795fc686^_0x26835e;function _0x4e45f7(){const _0x1a6345=_0x58761a([0x6c,0x6c,0x63,0x74,0x2d])+_0x51eb52(_0x15b27f(_0x677873)),_0x32e487=_0x3cc8e0(_0x51eb52(window[_0x58761a([0x4d,0x61,0x74,0x68])][_0x58761a([0x63,0x65,0x69,0x6c])](_0x3bb223/_0x1caf3d)));window[_0x58761a([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x58761a([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1a6345,_0x32e487);}function _0x23bd1f(){const _0x1b54b8=_0x58761a([0x6c,0x6c,0x63,0x74,0x2d])+_0x51eb52(_0x15b27f(_0x677873)),_0xa34552=window[_0x58761a([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x58761a([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1b54b8);return _0xa34552?window[_0x58761a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3cc8e0(_0xa34552),0x10)*_0x1caf3d:null;}function _0x38e8bc(_0x284422){return new window[(_0x58761a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x14c829,_0x4a730)=>{_0x284422[_0x58761a([0x74,0x68,0x65,0x6e])](_0x14c829,_0x4a730),window[_0x58761a([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4a730,0x7968fcc6^_0x26835e);});}}_0x48548d[_0x58761a([0x6f,0x6e])](_0x58761a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2f727c,_0x225af3)=>{if(_0x225af3[0x0]!=_0x677873)return _0x40544e(_0x58761a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x225af3[0x1]={..._0x225af3[0x1],[_0x58761a([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x182bc8};},{[_0x58761a([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x58761a([0x68,0x69,0x67,0x68])}),_0x48548d[_0x58761a([0x6f,0x6e])](_0x58761a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x236edf=>{_0x2807d7(_0x236edf[_0x58761a([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x111139=!0x0,_0x57f9be(_0x236edf[_0x58761a([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x58761a([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x58761a([0x6c,0x6f,0x77])}),_0x1ad87d[_0x58761a([0x74,0x68,0x65,0x6e])](()=>{_0x111139||_0x40544e(_0x58761a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x5df5fd(){return _0x48548d[_0x58761a([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x58761a([0x76,0x69,0x65,0x77])][_0x58761a([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x58761a([0x61,0x75,0x74,0x6f]);}function _0x1e54d8(){_0x48548d[_0x58761a([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x58761a([0x76,0x69,0x65,0x77])][_0x58761a([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x58761a([0x61,0x75,0x74,0x6f]);}}function _0x2dc2e3(_0x4f129f){const _0xf768ad=[new window[(_0x58761a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x187a63=>setTimeout(_0x187a63,0x796016ca^_0x26835e)),_0x1ad87d[_0x58761a([0x74,0x68,0x65,0x6e])](()=>new window[(_0x58761a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4554ef=>{const _0x53fb9b=0x79692801^_0x26835e,_0x26b79b=_0x46abc8[_0x58761a([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x3144f6(){_0x26b79b[_0x58761a([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x53fb9b&&_0x4554ef();}_0x3144f6(),_0x26b79b[_0x58761a([0x6f,0x6e])](_0x58761a([0x61,0x64,0x64]),_0x3144f6);})),new window[(_0x58761a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x113522=>{function _0x53d03f(){for(const _0x4e2f94 in window)if(window[_0x58761a([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x58761a([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x4e2f94))&&window[_0x4e2f94]==_0x504970)return _0x113522();_0x48548d[_0x58761a([0x73,0x74,0x61,0x74,0x65])]!=_0x58761a([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x58761a([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x53d03f,0x79693b8e^_0x26835e);}_0x28e9b0(_0x58761a([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x53d03f();})];return window[_0x58761a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x58761a([0x72,0x61,0x63,0x65])](_0xf768ad)[_0x58761a([0x74,0x68,0x65,0x6e])](()=>_0x4f129f);}async function _0x2db44a(){if(await _0x1ad87d,_0x28e9b0(_0x58761a([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x589fe0=_0x46abc8[_0x58761a([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x4426a2=_0x46abc8[_0x58761a([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])](_0x589fe0[_0x58761a([0x69,0x64])]),_0x200375=_0x41f606(_0x58761a([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x200375[_0x58761a([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x589fe0['id'],_0x4426a2?_0x4426a2['id']:null,!0x0),_0x200375[_0x58761a([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x58761a([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x200375[_0x58761a([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x200375[_0x58761a([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x3cb891,void(_0x200375[_0x58761a([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x3cb891);}if(_0x28e9b0(_0x58761a([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x47e324=_0x41f606(_0x58761a([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x47e324[_0x58761a([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x58761a([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x47e324[_0x58761a([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x47e324[_0x58761a([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x3cb891,_0x47e324[_0x58761a([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x3cb891;}_0x48548d[_0x58761a([0x6d,0x6f,0x64,0x65,0x6c])][_0x58761a([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3cb891,_0x48548d[_0x58761a([0x6d,0x6f,0x64,0x65,0x6c])][_0x58761a([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3cb891,_0x48548d[_0x58761a([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x58761a([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2b263b(){return _0x28e9b0(_0x58761a([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x41f606(_0x58761a([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x58761a([0x73,0x74,0x61,0x74,0x65])]==_0x58761a([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x19e9fe(){return _0x28e9b0(_0x58761a([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 _0x459a51(){return _0x28e9b0(_0x58761a([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x11bd69(_0x817e28){const _0xfe0538=_0x326309();_0x48548d[_0xfe0538]=_0x58761a([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])+_0x817e28,_0x817e28[_0x58761a([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x58761a([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x326309()]=_0x504970),_0x817e28!=_0x58761a([0x56,0x61,0x6c,0x69,0x64])&&_0x2db44a();}function _0x326309(){const _0x28d8dc=window[_0x58761a([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x58761a([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x58761a([0x6e,0x6f,0x77])]())[_0x58761a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x58761a([0x2e]),'');let _0x28f14b=_0x58761a([0x70]);for(let _0x4b5b93=0x0;_0x4b5b93<_0x28d8dc[_0x58761a([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4b5b93+=0x2){let _0x5ec40f=window[_0x58761a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x28d8dc[_0x58761a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4b5b93,_0x4b5b93+0x2));_0x5ec40f>=_0x2c0758[_0x58761a([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5ec40f-=_0x2c0758[_0x58761a([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x28f14b+=_0x2c0758[_0x5ec40f];}return _0x28f14b;}function _0x36c363(){const _0xa26e0d=_0x214fec[_0x58761a([0x73,0x70,0x6c,0x69,0x74])](_0x58761a([0x2e]));if(0x3!=_0xa26e0d[_0x58761a([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x5498f6(_0xa26e0d[0x1]);function _0x5498f6(_0x40c42d){const _0x1670a3=_0x2ba6b8(_0x40c42d);return _0x1670a3&&_0x52417a()?_0x1670a3:null;function _0x52417a(){const _0x237f3b=_0x1670a3[_0x58761a([0x6a,0x74,0x69])],_0x26166c=window[_0x58761a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x237f3b[_0x58761a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x237f3b[_0x58761a([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x30c703={..._0x1670a3,[_0x58761a([0x6a,0x74,0x69])]:_0x237f3b[_0x58761a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x237f3b[_0x58761a([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x30c703[_0x58761a([0x76,0x63])],_0x15b27f(_0x30c703)==_0x26166c;}}}async function _0x251f3c(){let _0x51c456=!0x0;try{const _0x4c97ff=_0x214fec[_0x58761a([0x73,0x70,0x6c,0x69,0x74])](_0x58761a([0x2e])),[_0x2952d6,_0x5e7b0c,_0xa5f0df]=_0x4c97ff;return _0x3477e4(_0x2952d6),await _0x4e3fec(_0x2952d6,_0x5e7b0c,_0xa5f0df),_0x51c456;}catch(_0x290de2){return!0x1;}function _0x3477e4(_0x389496){const _0x399765=_0x2ba6b8(_0x389496);_0x399765&&_0x399765[_0x58761a([0x61,0x6c,0x67])]==_0x58761a([0x45,0x53,0x32,0x35,0x36])||(_0x51c456=!0x1);}async function _0x4e3fec(_0x1521b0,_0xae335c,_0x214a98){const _0x11d9aa=window[_0x58761a([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x58761a([0x66,0x72,0x6f,0x6d])](_0x39d242(_0x214a98),_0x11ccff=>_0x11ccff[_0x58761a([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3b8da9=new window[(_0x58761a([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x58761a([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1521b0+_0x58761a([0x2e])+_0xae335c),_0x2288e1=window[_0x58761a([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x58761a([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x2288e1)return;const _0x4e9bd4=await _0x2288e1[_0x58761a([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x58761a([0x6a,0x77,0x6b]),_0x4c2b3e,{[_0x58761a([0x6e,0x61,0x6d,0x65])]:_0x58761a([0x45,0x43,0x44,0x53,0x41]),[_0x58761a([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x58761a([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x58761a([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x2288e1[_0x58761a([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x58761a([0x6e,0x61,0x6d,0x65])]:_0x58761a([0x45,0x43,0x44,0x53,0x41]),[_0x58761a([0x68,0x61,0x73,0x68])]:{[_0x58761a([0x6e,0x61,0x6d,0x65])]:_0x58761a([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4e9bd4,_0x11d9aa,_0x3b8da9)||(_0x51c456=!0x1);}}function _0x2ba6b8(_0x447d9f){return _0x447d9f[_0x58761a([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x58761a([0x65,0x79]))?JSON[_0x58761a([0x70,0x61,0x72,0x73,0x65])](_0x39d242(_0x447d9f)):null;}function _0x39d242(_0x1586d0){return window[_0x58761a([0x61,0x74,0x6f,0x62])](_0x1586d0[_0x58761a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x58761a([0x2b]))[_0x58761a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x58761a([0x2f])));}function _0x15b27f(_0x198da3){let _0x152fdd=0x1505;function _0x4b8463(_0x99fe68){for(let _0x424a14=0x0;_0x424a14<_0x99fe68[_0x58761a([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x424a14++){const _0x3c3055=_0x99fe68[_0x58761a([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x424a14);_0x152fdd=(_0x152fdd<<0x5)+_0x152fdd+_0x3c3055,_0x152fdd&=_0x152fdd;}}function _0x3f0322(_0x32a5b7){Array[_0x58761a([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x32a5b7)?_0x32a5b7[_0x58761a([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3f0322):_0x32a5b7&&typeof _0x32a5b7==_0x58761a([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x58761a([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x32a5b7)[_0x58761a([0x73,0x6f,0x72,0x74])]()[_0x58761a([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x23f2b5,_0x4d73ee])=>{_0x4b8463(_0x23f2b5),_0x3f0322(_0x4d73ee);}):_0x4b8463(window[_0x58761a([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x32a5b7));}return _0x3f0322(_0x198da3),_0x152fdd>>>0x0;}function _0x51eb52(_0x4e69f2){return _0x4e69f2[_0x58761a([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x58761a([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x58761a([0x30]));}function _0x3cc8e0(_0x57fd06){return _0x57fd06[_0x58761a([0x73,0x70,0x6c,0x69,0x74])]('')[_0x58761a([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x58761a([0x6a,0x6f,0x69,0x6e])]('');}function _0x28e9b0(_0x4280a4){return _0x48548d[_0x58761a([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x58761a([0x68,0x61,0x73])](_0x4280a4);}function _0x41f606(_0x449823){return _0x48548d[_0x58761a([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x58761a([0x67,0x65,0x74])](_0x449823);}function _0x3cb891(){}function _0x58761a(_0x1d9af5){return _0x1d9af5['map'](_0x272359=>String['fromCharCode'](_0x272359))['join']('');}_0x11bd69(await _0x472114());}(this);}['createRevision'](_0x4180d7){const _0x1fa7b5=this['editor']['plugins']['get']('Users');return new h({'id':_0x4180d7['id'],'name':_0x4180d7['name'],'creator':_0x4180d7['creatorId']?_0x1fa7b5['getUser'](_0x4180d7['creatorId']):null,'diffData':_0x4180d7['diffData']||_0x4180d7['data'],'authors':_0x4180d7['authorsIds']['map'](_0x1528df=>_0x1fa7b5['getUser'](_0x1528df)),'createdAt':new Date(_0x4180d7['createdAt']),'attributes':_0x4180d7['attributes'],'fromVersion':_0x4180d7['fromVersion'],'toVersion':_0x4180d7['toVersion']});}['addRevision'](_0x25fd87,_0x305270=0x0){this['_revisions']['add'](_0x25fd87,_0x305270);}['getRevision'](_0x3f357e){return this['_revisions']['get'](_0x3f357e);}['getRevisions'](_0x284256={'toJSON':!0x1}){const _0x186309=Array['from'](this['_revisions']);return _0x186309['reverse'](),_0x284256['toJSON']?_0x186309['map'](_0x3051e6=>_0x3051e6['toJSON']()):_0x186309;}['getIndex'](_0x270d6e){return this['_revisions']['getIndex'](_0x270d6e);}['getEarlierVisibleRevision'](_0x5d9e67){const [,_0x1d18c2]=this['getRevisionsIterator'](_0x5d9e67,{'direction':'earlier'});return _0x1d18c2;}['getLaterVisibleRevision'](_0x1acb9e){const [,_0x55ed2e]=this['getRevisionsIterator'](_0x1acb9e,{'direction':'later'});return _0x55ed2e;}['getRevisionsInDiff'](_0xac39eb){const _0x21c936=[];for(const _0x238ce9 of this['getRevisionsIterator'](_0xac39eb['newRevisionId']))if(_0x21c936['push'](_0x238ce9),_0x238ce9['id']===_0xac39eb['oldRevisionId'])break;return _0x21c936;}*['getRevisionsIterator'](_0x2423fc,{direction:_0x591cf1='earlier',filter:_0x1e9e99=()=>!0x0}={}){const _0x91f239='earlier'===_0x591cf1?0x1:-0x1;let _0x46d1fd=this['_revisions']['get'](_0x2423fc),_0x3b3935=this['getIndex'](_0x46d1fd);for(yield _0x46d1fd;_0x46d1fd;){if(_0x3b3935+=_0x91f239,_0x46d1fd=this['getRevision'](_0x3b3935),!_0x46d1fd)return;_0x1e9e99(_0x46d1fd)&&(yield _0x46d1fd);}}}class V extends _0x4489ae{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x58ed23,'c'],[_0xb91259,'a'],[_0x2e854e,'e'],[_0x47d335,'r'],[_0x242f84,'u']]);['_typeCharToViewClass']=new Map([['c',_0x58ed23],['a',_0xb91259],['e',_0x2e854e],['r',_0x47d335],['u',_0x242f84]]);async['loadRevisionData'](_0x2bb1ac,_0x410724){if(_0x2bb1ac['diffData']||!_0x410724)return;const _0x5ec004=this['editor']['config']['get']('collaboration.channelId'),_0x4100d5=await _0x410724['getRevision']({'channelId':_0x5ec004,'revisionId':_0x2bb1ac['id']});_0x2bb1ac['diffData']=_0x4100d5['diffData'];}['getRevisionDocumentData'](_0xc8e7e9){const _0x47a44a={};for(const _0x26f7c8 in _0xc8e7e9['diffData']){if(_0xc8e7e9['diffData'][_0x26f7c8]['attachChange']&&!_0xc8e7e9['diffData'][_0x26f7c8]['attachChange']['isAttached'])continue;const _0x234dfe=this['_removeRevisionMarkers'](JSON['parse'](_0xc8e7e9['diffData'][_0x26f7c8]['insertions'])),_0x4ed498=this['editor']['editing']['view']['document'],_0x37862e=new _0x130a2d(_0x4ed498,_0x234dfe['map'](_0x2b69e7=>this['_getViewFromDiffObj'](_0x2b69e7,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x47a44a[_0x26f7c8]=this['editor']['data']['processor']['toData'](_0x37862e),this['editor']['data']['processor']['useFillerType']('default');}return _0x47a44a;}['getRevisionRootsAttributes'](_0x77d5ff){const _0x358192={};for(const _0x2d4d25 in _0x77d5ff['diffData'])_0x77d5ff['diffData'][_0x2d4d25]['attachChange']&&!_0x77d5ff['diffData'][_0x2d4d25]['attachChange']['isAttached']||(_0x358192[_0x2d4d25]=_0x77d5ff['diffData'][_0x2d4d25]['attributesAfter']||{});return _0x358192;}['_getTypeCharForViewElement'](_0x46403d){return this['_viewClassToTypeChar']['get'](_0x46403d['constructor']);}['_getViewFromDiffObj'](_0x40c347,_0x5e4f7c){const _0x35d1fb=this['editor']['editing']['view']['document'];if('string'==typeof _0x40c347)return new _0x2b4261(_0x35d1fb,_0x40c347);{let _0x390c77,_0x6723e7;_0x6723e7='u'==_0x40c347['type']||'r'==_0x40c347['type']?[]:_0x40c347['children']['map'](_0x2d3f4a=>this['_getViewFromDiffObj'](_0x2d3f4a,_0x5e4f7c));const _0xe31234=this['_typeCharToViewClass']['get'](_0x40c347['type'])||_0x820fb5,_0x3b673a=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x390c77=new _0xe31234(_0x35d1fb,_0x40c347['name'],_0x40c347['attributes'],_0x6723e7),'u'==_0x40c347['type']&&_0x40c347['children'][0x0]){const _0x3abfc3=_0x40c347['children'][0x0];if(_0x390c77['render']=function(_0x3566ab){const _0x3a9712=_0x3566ab['createElement']('div');return _0x3a9712['innerHTML']=_0x3abfc3,_0x3a9712['childNodes'][0x0];},_0x5e4f7c){const _0x134f9d=new _0x130a2d(_0x35d1fb);_0x134f9d['_appendChild'](_0x390c77);const _0x2d0ade=Array['from'](_0x3b673a['viewChildrenToDom'](_0x134f9d,{'bind':!0x1})),_0x3ebdc0=_0x3b673a['domDocument']['createElement']('div');_0x3ebdc0['append'](..._0x2d0ade),_0x390c77=Array['from'](_0x3b673a['domChildrenToView'](_0x3ebdc0))[0x0];}}else{if('r'==_0x40c347['type']&&_0x40c347['children'][0x0]){const _0x165dd4=_0x40c347['children'][0x0];if(_0x390c77['render']=function(_0x512e24){_0x512e24['innerHTML']=_0x165dd4;},_0x5e4f7c){const _0x3ba80d=new _0x130a2d(_0x35d1fb);_0x3ba80d['_appendChild'](_0x390c77);const _0xd1bf5f=Array['from'](_0x3b673a['viewChildrenToDom'](_0x3ba80d,{'bind':!0x1})),_0x4bc62a=_0x3b673a['domDocument']['createElement']('div');_0x4bc62a['append'](..._0xd1bf5f);const _0x258ce3=Array['from'](_0x3b673a['domChildrenToView'](_0x4bc62a));_0x258ce3['length']>0x1?_0x390c77['_appendChild'](_0x258ce3):_0x390c77=_0x258ce3[0x0];}}}if(_0x40c347['customProperties']){for(const [_0x364aa9,_0x504114]of _0x40c347['customProperties'])_0x390c77['_setCustomProperty'](_0x364aa9,_0x504114);}const _0x21e797=void 0x0===_0x40c347['fillerOffset']?null:_0x40c347['fillerOffset'];return null!==_0x21e797&&(_0x390c77['getFillerOffset']=()=>_0x21e797),_0x390c77;}}['_makeModelFromViewString'](_0x1c90d0){const _0x5dd9bc=JSON['parse'](_0x1c90d0),_0x1f941c=this['editor']['editing']['view']['document'],_0x56f9c5=new _0x130a2d(_0x1f941c,_0x5dd9bc['map'](_0x56e6da=>this['_getViewFromDiffObj'](_0x56e6da,!0x0)));return this['editor']['data']['toModel'](_0x56f9c5);}['_removeRevisionMarkers'](_0x4bc6ad){return(_0x4bc6ad=_0x4bc6ad['filter'](_0x5e1cb0=>!_0x5e1cb0['name']||'revision-start'!==_0x5e1cb0['name']&&'revision-end'!==_0x5e1cb0['name']))['forEach'](_0x393c9b=>{'string'!=typeof _0x393c9b&&(_0x393c9b['children']=this['_removeRevisionMarkers'](_0x393c9b['children']),_0x393c9b['attributes']=_0x393c9b['attributes']['filter'](_0x403848=>!_0x403848[0x0]['startsWith']('data-revision-')));}),_0x4bc6ad;}}function g(_0x3060e0,_0x3f1760,_0x1f9ed2){const t=_0x3060e0['t'];switch(_0x3f1760){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'},_0x1f9ed2);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x1f9ed2);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 _0x4489ae{['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[_0x5cb796,I,V,_0x46ffbc];}constructor(_0x2721da){super(_0x2721da),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 _0x4f4e5d=_0x402ab0();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x4f4e5d},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 _0x2c2803=this['repository']['getRevision'](0x0),_0x267392=_0x2c2803&&null===_0x2c2803['creator']?_0x2c2803:null;if(this['_continueCurrentRevision']=!!_0x267392&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x490a98=this['_source']['getCurrentRevisionId'](),_0x19e10b=this['repository']['getRevision'](_0x490a98);if(_0x19e10b)this['_startingVersion']=_0x19e10b['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x3a3fcc=this['_source']['history']['_operations']['find'](_0x5d2c79=>!_0x5d2c79['_isInit']),_0x2cfa14=_0x3a3fcc?_0x3a3fcc['baseVersion']:this['_source']['history']['version'];_0x2c2803?(_0x2c2803['toVersion']<_0x2cfa14&&_0x2c2803['_update']({'toVersion':_0x2cfa14}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x267392['id'],this['_startingVersion']=_0x267392['fromVersion']):(this['_startingVersion']=_0x2c2803['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x2cfa14,this['_continueCurrentRevision']=!0x1);}}else _0x267392&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x267392['toVersion'],this['editor']['model']['document']['history']['version']),_0x267392['fromVersion']===_0x267392['toVersion']?(0x0!==_0x267392['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x267392['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x267392['id'],this['_startingVersion']=_0x267392['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',_0x181550=>!_0x181550),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x324e61=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0xe14db7;for(const _0x94f3f2 in _0x324e61){const _0x402fd6=_0x94f3f2,_0x2d8355=_0x324e61[_0x402fd6];if('revisionHistoryLicenseKeyValid'==_0x2d8355||'revisionHistoryLicenseKeyInvalid'==_0x2d8355||'revisionHistoryLicenseKeyExpired'==_0x2d8355||'revisionHistoryLicenseKeyDomainLimit'==_0x2d8355||'revisionHistoryLicenseKeyNotAllowed'==_0x2d8355||'revisionHistoryLicenseKeyEvaluationLimit'==_0x2d8355||'revisionHistoryLicenseKeyTrialLimit'==_0x2d8355||'revisionHistoryLicenseKeyUsageLimit'==_0x2d8355){delete _0x324e61[_0x402fd6],_0xe14db7=_0x2d8355,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0xe14db7&&_0x324e61['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0xe14db7&&_0x324e61['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0xe14db7&&_0x324e61['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0xe14db7&&_0x324e61['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0xe14db7&&_0x324e61['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0xe14db7&&_0x324e61['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0xe14db7&&_0x324e61['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x56d599=this['repository']['getRevision'](0x0),_0x5e2700=await this['getRevisionDocumentData'](_0x56d599),_0x22d644=await this['getRevisionRootsAttributes'](_0x56d599);this['_replaceEditorDataWithRevisionData'](_0x5e2700,_0x22d644);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x403fbd){this['_source']=_0x403fbd;}async['update'](){const _0x22f7c8=await this['_source']['getLatestVersion']();if(_0x22f7c8>this['currentRevision']['toVersion']){await this['_loadState']();const _0xfa3e21=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x22f7c8});_0xfa3e21['authors']=_0xfa3e21['authorsIds']['map'](_0x4f8e66=>this['editor']['plugins']['get']('Users')['getUser'](_0x4f8e66)),this['currentRevision']['_update'](_0xfa3e21);}}async['saveRevision'](_0x333f15={},_0x1c0ea3=null){const _0x265efb=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x1c0ea3>this['currentRevision']['toVersion']&&(_0x1c0ea3=null),null===_0x1c0ea3&&(_0x1c0ea3=await this['_source']['getLatestVersion']());const _0x450182=this['_getFromVersion'](_0x1c0ea3),_0x281743=this['buildRevisionData']({'from':_0x450182,'to':_0x1c0ea3});if(this['currentRevision']['toVersion']<_0x1c0ea3){const _0x3c927e=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x1c0ea3,'to':_0x1c0ea3});_0x3c927e['authors']=[],_0x3c927e['authorsIds']=[],_0x3c927e['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x3c927e,!0x0),delete _0x3c927e['authors'],_0x265efb['push'](_0x3c927e);}_0x333f15['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x333f15['name']=_0x333f15['name']||null,_0x333f15['id']=_0x333f15['id']||_0x402ab0(),_0x333f15={..._0x333f15,..._0x281743};const _0x494705=this['addRevisionData'](_0x333f15);_0x265efb['push'](_0x333f15);const _0x34023c=this['repository']['getIndex'](_0x494705);if(0x0!==_0x34023c){const _0x452549=this['repository']['getRevision'](_0x34023c-0x1);if(_0x452549['fromVersion']!==_0x1c0ea3){const _0x5ab35c=this['_revisionDataBuilder']['getData'](_0x1c0ea3,_0x452549['toVersion']),_0x4ef481={'id':_0x452549['id'],'diffData':_0x5ab35c['diffData'],'authorsIds':_0x5ab35c['authorsIds'],'authors':_0x5ab35c['authorsIds']['map'](_0x159ba2=>this['editor']['plugins']['get']('Users')['getUser'](_0x159ba2)),'fromVersion':_0x1c0ea3};_0x452549===this['currentRevision']&&(_0x4ef481['createdAt']=new Date(_0x333f15['createdAt']['getTime']()+0xa)),_0x452549['_update'](_0x4ef481,!0x0),delete _0x4ef481['authors'],_0x265efb['push'](_0x4ef481);}}if(this['adapter']){for(const _0x20122f of _0x265efb)this['_bufferUpdate'](_0x20122f['id'],_0x20122f,!0x0);this['sendBufferedUpdates']();}return _0x494705;}['addRevisionData'](_0x55a0e2){const _0x2695f4=this['repository']['createRevision'](_0x55a0e2);return this['adapter']&&_0x2695f4['on']('_update',(_0x34bb00,_0x160ff5,_0x3ef9b7)=>{_0x3ef9b7||(this['_bufferUpdate'](_0x160ff5['id'],_0x160ff5,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x2695f4,this['_findInsertionIndex'](_0x2695f4)),_0x2695f4;}async['getRevisionDocumentData'](_0xde2496){return await this['_utils']['loadRevisionData'](_0xde2496,this['adapter']),this['_utils']['getRevisionDocumentData'](_0xde2496);}async['getRevisionRootsAttributes'](_0x51f6be){return await this['_utils']['loadRevisionData'](_0x51f6be,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x51f6be);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x2090ee=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x57953a=0x0;_0x57953a<_0x2090ee['length'];_0x57953a++){const _0x525dbe=_0x2090ee[_0x57953a];let _0x5046a4=!0x1;for(const _0x578666 of Object['keys'](_0x525dbe))void 0x0===_0x525dbe[_0x578666]?delete _0x525dbe[_0x578666]:'id'!==_0x578666&&(_0x5046a4=!0x0);_0x5046a4||(_0x2090ee[_0x57953a]=null);}if(_0x2090ee=_0x2090ee['filter'](_0x4d8e4d=>null!==_0x4d8e4d),!_0x2090ee['length'])return;for(let _0x3e72f0=0x0;_0x3e72f0<_0x2090ee['length'];_0x3e72f0++){const _0x3cd727=_0x2090ee[_0x3e72f0];void 0x0!==_0x3cd727['fromVersion']&&void 0x0===_0x3cd727['toVersion']&&(_0x3cd727['toVersion']=this['repository']['getRevision'](_0x3cd727['id'])['toVersion']),void 0x0!==_0x3cd727['toVersion']&&void 0x0===_0x3cd727['fromVersion']&&(_0x3cd727['fromVersion']=this['repository']['getRevision'](_0x3cd727['id'])['fromVersion']);}const _0x539a84=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x2090ee,_0x539a84)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x441020=>{if(_0x441020){for(const _0x36d284 of _0x441020)this['setRevisionData']({'id':_0x36d284['id'],'createdAt':_0x36d284['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x326c98=null,from:_0x1bc445=null,to:_0x5b5fe7=null}){_0x1bc445=null!==_0x1bc445?_0x1bc445:_0x326c98['fromVersion'],_0x5b5fe7=null!==_0x5b5fe7?_0x5b5fe7:_0x326c98['toVersion'];const _0x116f5f=this['_revisionDataBuilder']['getData'](_0x1bc445,_0x5b5fe7),_0x16ea48={'diffData':_0x116f5f['diffData'],'authorsIds':_0x116f5f['authorsIds'],'fromVersion':_0x1bc445,'toVersion':_0x5b5fe7};if(!_0x326c98||_0x5b5fe7!==_0x326c98['toVersion']){const _0x174f34=_0x5b5fe7-0x1,_0x3ba127=this['_source']['history']['getOperation'](_0x174f34);_0x16ea48['createdAt']=_0x3ba127&&_0x3ba127['createdAt']||new Date();}if(this['_loadedStateData']&&_0x1bc445===this['_loadedStateData']['fromVersion']){for(const _0x500c21 of this['_loadedStateData']['authors'])_0x16ea48['authorsIds']['includes'](_0x500c21['id'])||_0x16ea48['authorsIds']['push'](_0x500c21['id']);}return _0x16ea48;}['_bufferUpdate'](_0x4dae34,_0x49f140,_0x795b69){if(this['_bufferedUpdates']['has'](_0x4dae34)){const _0x293e15=this['_bufferedUpdates']['get'](_0x4dae34);_0x49f140=_0x795b69?{..._0x293e15,..._0x49f140}:{..._0x49f140,..._0x293e15};}this['_bufferedUpdates']['set'](_0x4dae34,_0x49f140);}['setRevisionData'](_0x8603d3){const _0x180998=this['repository']['getRevision'](_0x8603d3['id']);if(_0x8603d3['createdAt']&&(_0x8603d3['createdAt']=new Date(_0x8603d3['createdAt'])),_0x8603d3['authorsIds']){const _0x298c61=this['editor']['plugins']['get']('Users');_0x8603d3['authors']=_0x8603d3['authorsIds']['map'](_0x20dbf6=>_0x298c61['getUser'](_0x20dbf6));}_0x180998['_update'](_0x8603d3,!0x0);}['_createInitialRevision'](_0x2d6553){const _0x146097=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x146097)this['_initialRevisionId']=_0x146097['id'];else{const _0x351d80=!this['editor']['model']['document']['roots']['find'](_0x5ad131=>this['editor']['model']['hasContent'](_0x5ad131)),_0x390d52=this['editor']['plugins']['get']('Users')['me']['id'],_0x16af33=g(this['editor']['locale'],_0x351d80?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x2d6553,'to':_0x2d6553,'id':this['_initialRevisionId'],'name':_0x16af33,'creatorId':_0x390d52});}}['_createCurrentRevision'](_0x4d342b){const _0x50f327=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x50f327),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x4d342b,'to':_0x4d342b,'id':_0x50f327,'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'](_0x31ca65,_0x111544){let _0x123244=this['editor']['config']['get']('initialData'),_0x529dc3=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x123244){_0x123244={};for(const _0x5a528f of this['editor']['model']['document']['getRootNames']())_0x123244[_0x5a528f]='';}if('string'==typeof _0x123244&&(_0x123244={'main':_0x123244}),void 0x0===_0x529dc3){_0x529dc3={};for(const _0x33874e of this['editor']['model']['document']['getRootNames']())_0x529dc3[_0x33874e]={};}let _0x517de0=!0x1;const _0x54a2d0=Object['keys'](_0x123244),_0xc78007=Object['keys'](_0x31ca65);for(const _0xf42996 of _0x54a2d0){if(_0x123244[_0xf42996]!==_0x31ca65[_0xf42996]&&''!==_0x123244[_0xf42996]['trim']()){_0x517de0=!0x0;break;}if(!_0x40d4f8(_0x529dc3[_0xf42996],_0x111544[_0xf42996])&&Object['keys'](_0x529dc3[_0xf42996])['length']>0x0){_0x517de0=!0x0;break;}}_0x517de0||(_0x517de0=_0xc78007['some'](_0x110f2f=>!this['editor']['model']['document']['getRoot'](_0x110f2f))),_0x517de0&&_0x4c8407('editor-initial-data-replaced-with-revision-data',{'editorData':_0x123244,'editorRootsAttributes':_0x529dc3,'revisionData':_0x31ca65,'revisionRootsAttributes':_0x111544}),this['editor']['config']['set']('initialData',_0x31ca65),this['editor']['config']['set']('rootsAttributes',_0x111544);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x2cb9ce=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x2cb9ce['add'](g(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x24a0da){const _0x2b2260=this['repository']['getRevisions']();_0x2b2260['reverse']();let _0x39ccfe=0x0;for(;_0x39ccfe<_0x2b2260['length'];){const _0xdc059b=_0x2b2260[_0x39ccfe];if(_0xdc059b===this['currentRevision']){_0x39ccfe++;continue;}if(_0xdc059b['id']===this['_initialRevisionId'])break;const _0x1d2938=_0x24a0da['toVersion']-_0xdc059b['toVersion']||_0x24a0da['fromVersion']-_0xdc059b['fromVersion'];if(_0x1d2938>0x0)break;if(_0x1d2938<0x0)_0x39ccfe++;else{if(!_0x24a0da['creator']&&_0xdc059b['creator'])break;if(_0xdc059b['creator']||!_0x24a0da['creator']){if(_0x24a0da['createdAt']>_0xdc059b['createdAt'])break;_0x39ccfe++;}else _0x39ccfe++;}}return _0x39ccfe;}['_getFromVersion'](_0x595df5){const _0x49967f=this['repository']['getRevisions']();_0x49967f['reverse'](),_0x49967f['shift']();const _0x3d26fd=_0x49967f['find'](_0x51dd38=>_0x51dd38['toVersion']<=_0x595df5)['toVersion'];return _0x3d26fd<this['_startingVersion']?this['_startingVersion']:_0x3d26fd;}['_makeRevision']({name:_0x173f74,from:_0x2e7ecc,to:_0x2325fc,creatorId:_0x421480,id:_0x1838d2}){const _0x18e3e9=this['buildRevisionData']({'from':_0x2e7ecc,'to':_0x2325fc});_0x18e3e9['name']=_0x173f74,_0x18e3e9['creatorId']=_0x421480,_0x18e3e9['id']=_0x1838d2;const _0xf51899=this['addRevisionData'](_0x18e3e9);return this['adapter']&&this['_bufferUpdate'](_0x18e3e9['id'],_0x18e3e9,!0x0),_0xf51899;}['_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(_0x2f6746){this['editor']=_0x2f6746,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'](_0x51007b){this['source']=_0x51007b;const _0x2c0e57=new Map(),_0x5eafb5=new Map(),_0x42a640=this['editor']['model']['document']['roots']['map'](_0x253b10=>_0x253b10['rootName']);for(const _0x31434d of _0x42a640){const _0xec6adb=this['editor']['model']['document']['getRoot'](_0x31434d),_0x542640=N(_0xec6adb);_0x2c0e57['set'](_0x31434d,_0x542640),_0x5eafb5['set'](_0x31434d,Object['fromEntries'](_0xec6adb['getAttributes']()));}const _0x4ffe5e=Array['from'](this['editor']['model']['markers'])['map'](_0x5bb06a=>[_0x5bb06a['name'],_0x5bb06a['getRange']()]),_0x53a375=this['source']['version'];this['_saveMetaData'](_0x53a375,_0x2c0e57,_0x4ffe5e,_0x5eafb5),this['_startingRevisionId']=this['_revisionId'];const _0x3220e8=new Map(),_0x33772c=new Map();for(const _0x339fdf of _0x42a640){const _0x40a77f=P(_0x339fdf);_0x3220e8['set'](_0x339fdf,_0x40a77f),_0x33772c['set'](_0x339fdf,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x3220e8,[],_0x33772c);}['getData'](_0x4d2bbc,_0x3821b6){if(this['_lastFrom']===_0x4d2bbc&&this['_lastTo']<=_0x3821b6)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x3821b6,!0x0);else{if(!this['_savedMetaData']['has'](_0x4d2bbc)){const _0x2bd826=this['_getPreviousFrom'](_0x4d2bbc);this['_calculateMetaData'](_0x2bd826,_0x4d2bbc,!0x1);}this['_calculateMetaData'](_0x4d2bbc,_0x3821b6,!0x0);}return this['_lastFrom']=_0x4d2bbc,this['_lastTo']=_0x3821b6,this['_getState']();}['loadState'](_0x16105c){const _0x12a196=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x16105c['fromVersion'],this['_lastTo']=_0x16105c['toVersion'];for(const _0x38bd5a in _0x16105c['diffData']){const _0x4789f6=_0x16105c['diffData'][_0x38bd5a]['attachChange'],_0x76ce77=_0x2611c8(_0x16105c['diffData'][_0x38bd5a]['attributesBefore'])||{},_0x2e4895=_0x12a196['_makeModelFromViewString'](_0x16105c['diffData'][_0x38bd5a]['deletions']);_0x2e4895['rootName']=_0x38bd5a,_0x2e4895['_isAttached']=!_0x4789f6||!_0x4789f6['isAttached'],_0x2e4895['isAttached']=()=>_0x2e4895['_isAttached'],this['_baseRoots']['set'](_0x38bd5a,_0x2e4895),this['_baseRootsAttributes']['set'](_0x38bd5a,_0x76ce77),_0x4789f6&&this['_touchedRoots']['set'](_0x38bd5a,_0x4789f6);const _0x504e93=this['_makeIdsRoot'](_0x2e4895);this['_baseIdsRoots']['set'](_0x38bd5a,_0x504e93);for(const [_0x413d3f,_0x5a2809]of _0x2e4895['markers']){if(!_0x413d3f['startsWith']('revision:'))continue;const _0x44f319=_0x413d3f['split'](':')[0x2];for(const _0x74313a of _0x5a2809['getWalker']({'singleCharacters':!0x0})){const _0x374b50=this['_getVidAttributeName'](_0x74313a),_0x91f6df='elementEnd'==_0x74313a['type']?_0x74313a['previousPosition']['path']['slice'](0x0,-0x1):_0x74313a['previousPosition']['path'],_0x2a13fd=_0x504e93['getNodeByPath'](_0x91f6df)['getAttribute'](_0x374b50);this['_touched']['set'](_0x2a13fd,{'userId':_0x44f319});}}}this['_startingRevisionId']=this['_revisionId'];const _0x24fb1b=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x4875dc=>!this['_touched']['has'](_0x4875dc));let _0x13c4f4=0x0;const _0x5a3ad8=new Map();for(const _0x599065 in _0x16105c['diffData']){const _0x13e0aa=_0x16105c['diffData'][_0x599065]['attachChange'],_0x30723a=_0x2611c8(_0x16105c['diffData'][_0x599065]['attributesAfter'])||{},_0x13960b=_0x12a196['_makeModelFromViewString'](_0x16105c['diffData'][_0x599065]['insertions']);_0x13960b['rootName']=_0x599065,_0x13960b['_isAttached']=!_0x13e0aa||_0x13e0aa['isAttached'],_0x13960b['isAttached']=()=>_0x13960b['_isAttached'],this['_diffRoots']['set'](_0x599065,_0x13960b),this['_diffRootsAttributes']['set'](_0x599065,_0x30723a);const _0x1fd6cb=this['_makeIdsRoot'](_0x13960b,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x599065,_0x1fd6cb),_0x5a3ad8['set'](_0x599065,_0x13960b['isAttached']()?_0x30723a:{});for(const [_0x48c2bb,_0x4c2a4e]of _0x13960b['markers']){if(!_0x48c2bb['startsWith']('revision:'))continue;const _0xf91e80=_0x48c2bb['split'](':')[0x2];for(const _0x3b3a3b of _0x4c2a4e['getWalker']({'singleCharacters':!0x0})){const _0x14ae25=this['_getVidAttributeName'](_0x3b3a3b),_0x3ecc09=this['_revisionId']++,_0x17a211='elementEnd'==_0x3b3a3b['type']?_0x3b3a3b['previousPosition']['path']['slice'](0x0,-0x1):_0x3b3a3b['previousPosition']['path'];_0x1fd6cb['getNodeByPath'](_0x17a211)['_setAttribute'](_0x14ae25,_0x3ecc09),this['_touched']['set'](_0x3ecc09,{'userId':_0xf91e80});}}for(const _0x572cc3 of this['editor']['model']['createRangeIn'](_0x13960b)['getWalker']({'singleCharacters':!0x0})){const _0x31e7d4=this['_getVidAttributeName'](_0x572cc3),_0x28edff='elementEnd'==_0x572cc3['type']?_0x572cc3['previousPosition']['path']['slice'](0x0,-0x1):_0x572cc3['previousPosition']['path'],_0x1cbe2f=_0x1fd6cb['getNodeByPath'](_0x28edff);_0x1cbe2f['getAttribute'](_0x31e7d4)>0x0||_0x1cbe2f['_setAttribute'](_0x31e7d4,_0x24fb1b[_0x13c4f4++]);}for(const [_0x27123f,_0x51cd59]of _0x13960b['markers'])_0x27123f['startsWith']('revision:')||this['_markers']['set'](_0x27123f,_0x51cd59);}const _0x278b42=P('$graveyard');this['_baseRoots']['set']('$graveyard',_0x278b42),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x278b42,0x1));const _0x485d10=P('$graveyard');this['_diffRoots']['set']('$graveyard',_0x485d10),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x485d10,0x1));const _0x37baf3=Array['from'](this['_diffRoots'])['map'](([_0x2e0a3d,_0x299e15])=>[_0x2e0a3d,N(_0x299e15)]);this['_saveMetaData'](this['_lastTo'],_0x37baf3,this['_markers'],_0x5a3ad8);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x246a10,_0x4bdd37,_0x9744b0,_0x3bae57){const _0x128746=new Map(_0x4bdd37),_0x351754=new Map(_0x2611c8(_0x3bae57)),_0x594eb3=new Map();for(const [_0x3d056b,_0x57c05c]of _0x9744b0)_0x594eb3['set'](_0x3d056b,{'start':_0x57c05c['start']['clone'](),'end':_0x57c05c['end']['clone'](),'rootName':_0x57c05c['root']['rootName']});this['_savedMetaData']['set'](_0x246a10,{'roots':_0x128746,'markers':_0x594eb3,'rootsAttributes':_0x351754});}['_removeMetaData'](_0x17dd4a){this['_savedMetaData']['delete'](_0x17dd4a);}['_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'](_0x8984dd,_0x17bc10=null){let _0x3137c0=null;_0x8984dd['is']('documentFragment')||(_0x3137c0=new ut(_0x8984dd['name'],{'vid_start':null===_0x17bc10?this['_revisionId']++:_0x17bc10++}));const _0x10343f=[];for(const _0x34e95a of _0x8984dd['getChildren']())if(_0x34e95a['is']('element')){_0x10343f['push'](this['_makeIdsRoot'](_0x34e95a,_0x17bc10));const _0x48d323=_0x10343f[_0x10343f['length']-0x1];null!==_0x17bc10&&(_0x17bc10=_0x48d323['is']('element','$text')?_0x48d323['getAttribute']('vid')+0x1:_0x48d323['getAttribute']('vid_end')+0x1);}else{for(let _0xf07e7f=0x0;_0xf07e7f<_0x34e95a['offsetSize'];_0xf07e7f++)_0x10343f['push'](new ut('$text',{'vid':null===_0x17bc10?this['_revisionId']++:_0x17bc10++}));}if(_0x8984dd['is']('documentFragment')){const _0x456ddc=P(_0x8984dd['rootName']);return _0x456ddc['_insertChild'](0x0,_0x10343f),_0x456ddc;}return _0x3137c0['_setAttribute']('vid_end',null===_0x17bc10?this['_revisionId']++:_0x17bc10++),_0x3137c0['_insertChild'](0x0,_0x10343f),_0x3137c0;}['_calculateMetaData'](_0xe75bba,_0x20b3a2,_0x4a284b){this['_reset']();const {roots:_0x35925e,markers:_0x4472b,rootsAttributes:_0x4976c4}=this['_savedMetaData']['get'](_0xe75bba);this['_baseRoots']=new Map(_0x35925e),this['_baseRootsAttributes']=new Map(_0x2611c8(_0x4976c4));for(const [_0x1cfa8d,_0x664cf5]of this['_baseRoots'])if('$graveyard'!==_0x1cfa8d&&(this['_diffRoots']['set'](_0x1cfa8d,N(_0x664cf5)),this['_diffRootsAttributes']=new Map(_0x2611c8(_0x4976c4)),_0x4a284b)){const _0x175144=this['_revisionId'];this['_idsRoots']['set'](_0x1cfa8d,this['_makeIdsRoot'](_0x664cf5)),this['_baseIdsRoots']['set'](_0x1cfa8d,this['_makeIdsRoot'](_0x664cf5,_0x175144));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',N(this['_baseRoots']['get']('$graveyard'))),_0x4a284b&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x2a4c97,_0xf4feed]of _0x4472b){const _0x1e0ceb=this['_baseRoots']['get'](_0xf4feed['rootName']),_0x1f6116=this['_diffRoots']['get'](_0xf4feed['rootName']),_0x423907=new ft(this['_fixPosition'](_0xf4feed['start'],_0x1e0ceb),this['_fixPosition'](_0xf4feed['end'],_0x1e0ceb)),_0x11a904=this['_fixRange'](_0x423907,_0x1f6116);_0x1e0ceb['markers']['set'](_0x2a4c97,_0x423907),this['_markers']['set'](_0x2a4c97,_0x11a904);}this['_applyOperations'](_0xe75bba,_0x20b3a2,_0x4a284b);}['_applyOperations'](_0x8b98e9,_0x36eede,_0x1f92b5){for(const _0x3a48cb of this['source']['getOperations'](_0x8b98e9,_0x36eede))this['_handleOperation'](_0x3a48cb,_0x1f92b5);for(const _0x330114 of this['_diffRoots']['values']())_0x330114['markers']['clear']();for(const [_0x403344,_0x11e326]of this['_markers']){this['_diffRoots']['get'](_0x11e326['root']['rootName'])['markers']['set'](_0x403344,_0x11e326['clone']());}const _0x3718f2=new Map(),_0x2cf0df=new Map();for(const [_0x5dc996,_0x33b7b9]of this['_diffRoots'])_0x3718f2['set'](_0x5dc996,N(_0x33b7b9)),_0x2cf0df['set'](_0x5dc996,this['_diffRootsAttributes']['get'](_0x5dc996));this['_saveMetaData'](_0x36eede,_0x3718f2,this['_markers'],_0x2cf0df);}['_getPreviousFrom'](_0x491795){const _0x3f1fbb=Array['from'](this['_savedMetaData']['keys']());_0x3f1fbb['sort']((_0x56fb37,_0x3ad9f5)=>_0x56fb37-_0x3ad9f5),_0x3f1fbb['reverse']();for(const _0x3366cc of _0x3f1fbb)if(_0x3366cc<_0x491795)return _0x3366cc;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x4f66df,_0x5130d0){const _0x150538=Array['from'](_0x5130d0['markers'])['map'](([_0x43aa93,_0x512b82])=>[_0x43aa93,this['_fixRange'](_0x512b82,_0x4f66df)]);_0x4f66df['markers']=new Map(_0x150538);}['_transformMarkers'](_0x4d05db){for(const _0x6c4b65 of this['_markers']['values']()){const _0x102fa0=_0x6c4b65['getTransformedByOperation'](_0x4d05db),_0xdf86f7=ft['_createFromRanges'](_0x102fa0);_0x6c4b65['start']=_0xdf86f7['start'],_0x6c4b65['end']=_0xdf86f7['end'];}}['_handleOperation'](_0x362bfd,_0x455388){if('addRoot'!=_0x362bfd['type']&&'detachRoot'!=_0x362bfd['type']){if('insert'==_0x362bfd['type']){const _0x4f7abf=_0x362bfd['position']['root']['rootName'];this['_diffRoots']['has'](_0x4f7abf)||(this['_diffRoots']['set'](_0x4f7abf,P(_0x4f7abf,!0x0)),this['_diffRootsAttributes']['set'](_0x4f7abf,{}),_0x455388&&this['_idsRoots']['set'](_0x4f7abf,P(_0x4f7abf,!0x0)));}else{if('addRootAttribute'==_0x362bfd['type']||'removeRootAttribute'==_0x362bfd['type']||'changeRootAttribute'==_0x362bfd['type'])return void this['_handleRootAttributeOperation'](_0x362bfd);'marker'==_0x362bfd['type']&&this['_handleMarkerOperation'](_0x362bfd);}if('marker'!==_0x362bfd['type']){const _0x4ac56b=this['_cloneOperation'](_0x362bfd,this['_diffRoots']);_0x4ac56b['_execute'](),this['_transformMarkers'](_0x4ac56b);}if(_0x455388)switch(_0x362bfd['type']){case'insert':this['_handleInsertOperation'](_0x362bfd);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x362bfd);break;case'merge':this['_handleMergeOperation'](_0x362bfd);break;case'split':this['_handleSplitOperation'](_0x362bfd);}}else this['_handleRootOperation'](_0x362bfd,_0x455388);}['_cloneOperation'](_0x5e078b,_0x248728){const _0x2a2d20=_0x5e078b['clone']();return _0x2a2d20['_authorId']=_0x5e078b['_authorId'],this['_fixOperation'](_0x2a2d20,_0x248728),_0x2a2d20;}['_getBaseVids'](_0x2fdf26){return _0x2fdf26['map'](_0x3909c3=>{const _0x24be35=this['_getVidAttributeName'](_0x3909c3);return Number(_0x3909c3['item']['getAttribute'](_0x24be35));});}['_generateTape'](_0x17dc40,_0x37b0df){if(_0x17dc40['is']('element','$text'))_0x37b0df['push']({'item':_0x17dc40,'type':'text'});else{_0x17dc40['is']('element')&&_0x37b0df['push']({'item':_0x17dc40,'type':'elementStart'});for(const _0x213844 of _0x17dc40['getChildren']())this['_generateTape'](_0x213844,_0x37b0df);_0x17dc40['is']('element')&&_0x37b0df['push']({'item':_0x17dc40,'type':'elementEnd'});}return _0x37b0df;}['_getState'](){const _0x4d842c=new Map(this['_touched']),_0x558734=new Map(_0x4d842c),_0x3f0507=new Map(),_0x23f7f3={'insertions':{},'deletions':{}},_0x252a87={'insertions':{},'deletions':{}},_0x1286cb=new Map(),_0x1cfa66=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x1cfa66['delete']('$graveyard');for(const _0x703ee7 of _0x1cfa66){const _0x2d555d=this['_diffRoots']['get'](_0x703ee7)||P(_0x703ee7,!0x1),_0x363b57=this['_baseRoots']['get'](_0x703ee7)||P(_0x703ee7,!0x1);_0x2d555d['isAttached']()||_0x363b57['isAttached']()?(_0x23f7f3['insertions'][_0x703ee7]=N(_0x2d555d),_0x23f7f3['deletions'][_0x703ee7]=N(_0x363b57),this['_copyMarkers'](_0x23f7f3['deletions'][_0x703ee7],_0x363b57),this['_copyMarkers'](_0x23f7f3['insertions'][_0x703ee7],_0x2d555d),_0x252a87['insertions'][_0x703ee7]=this['_generateTape'](this['_idsRoots']['get'](_0x703ee7),[]),_0x252a87['deletions'][_0x703ee7]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x703ee7)||P(_0x703ee7,!0x1),[])):_0x1cfa66['delete'](_0x703ee7);}for(const _0xb6ee45 of _0x1cfa66){const _0x46eac5=_0x252a87['insertions'][_0xb6ee45];for(const _0x2b9f2d of _0x46eac5){const _0x44f357=this['_getVidAttributeName'](_0x2b9f2d),_0x50d934=_0x2b9f2d['item']['getAttribute'](_0x44f357);_0x558734['delete'](_0x50d934),_0x50d934>=this['_startingRevisionId']&&_0x3f0507['set'](_0x50d934,_0x4d842c['get'](_0x50d934));}}for(const _0x16ea4b of _0x1cfa66){const _0x52b7e3=_0x252a87['insertions'][_0x16ea4b],_0xd5951c=this['_getBaseVids'](_0x252a87['deletions'][_0x16ea4b]);let _0x39883b=0x0;for(const _0x4d7ac3 of _0x52b7e3){const _0x4867d7=this['_getVidAttributeName'](_0x4d7ac3),_0x117c88=_0x4d7ac3['item']['getAttribute'](_0x4867d7);if(!_0x3f0507['has'](_0x117c88)&&!_0x1286cb['has'](_0x117c88)){if(_0x558734['has'](_0x117c88))_0x39883b++;else{if(_0x117c88!=_0xd5951c[_0x39883b]){const _0x24921a=_0x4d842c['get'](_0x117c88)||_0x4d842c['get'](_0xd5951c[_0x39883b]);for(;_0x117c88!=_0xd5951c[_0x39883b];)_0x558734['has'](_0xd5951c[_0x39883b])||(_0x1286cb['set'](_0xd5951c[_0x39883b],_0x24921a),_0x4d842c['set'](_0xd5951c[_0x39883b],_0x24921a)),_0x39883b++;}_0x39883b++;}}}}for(const _0x249803 of _0x1cfa66){const _0x1dfd95=_0x252a87['insertions'][_0x249803];for(const _0x19e5ae of _0x1dfd95){const _0x34e887=this['_getVidAttributeName'](_0x19e5ae),_0x58ebb3=_0x19e5ae['item']['getAttribute'](_0x34e887);if(_0x1286cb['has'](_0x58ebb3)){const _0x547a53=_0x1286cb['get'](_0x58ebb3);_0x558734['has'](_0x58ebb3)||_0x558734['set'](_0x58ebb3,{..._0x547a53}),_0x3f0507['set'](_0x58ebb3,{..._0x547a53});}}}for(const _0x2fb004 of _0x558734['keys']())_0x2fb004>=this['_startingRevisionId']&&_0x558734['delete'](_0x2fb004);const _0x5ea8cc=new Map();for(const _0x28f1f8 of _0x1cfa66){let _0x319ac2=_0x252a87['insertions'][_0x28f1f8];for(const _0xb576cc of _0x319ac2)if(_0xb576cc['item']['is']('element','tableCell')){const _0x7819b2=this['_getVidAttributeName'](_0xb576cc),_0x1b2765=_0xb576cc['item']['getAttribute'](_0x7819b2);if(_0x3f0507['has'](_0x1b2765)){const _0xdc112e=_0xb576cc['item']['parent']['parent']['getAttribute']('vid_start'),_0x274e69=_0x5ea8cc['get'](_0xdc112e)||new Set();_0x274e69['add'](_0x3f0507['get'](_0x1b2765)['userId']),_0x5ea8cc['set'](_0xdc112e,_0x274e69);}}_0x319ac2=_0x252a87['deletions'][_0x28f1f8];for(const _0x47f1ca of _0x319ac2)if(_0x47f1ca['item']['is']('element','tableCell')){const _0x12b147=this['_getVidAttributeName'](_0x47f1ca),_0x5e0a88=_0x47f1ca['item']['getAttribute'](_0x12b147);if(_0x558734['has'](_0x5e0a88)){const _0x546d70=_0x47f1ca['item']['parent']['parent']['getAttribute']('vid_start'),_0x328375=_0x5ea8cc['get'](_0x546d70)||new Set();_0x328375['add'](_0x558734['get'](_0x5e0a88)['userId']),_0x5ea8cc['set'](_0x546d70,_0x328375);}}for(const _0x33d7ab of _0x5ea8cc['keys']())(_0x3f0507['has'](_0x33d7ab)||_0x558734['has'](_0x33d7ab))&&_0x5ea8cc['delete'](_0x33d7ab);}for(const _0x30963a of _0x1cfa66){const _0x107bd8=_0x252a87['insertions'][_0x30963a];let _0x4db486=null,_0x5014ce=null;for(const _0x141423 of _0x107bd8){const _0x189042=this['_getVidAttributeName'](_0x141423),_0x41e6f6=_0x141423['item']['getAttribute'](_0x189042),_0x4e0113=_0x5ea8cc['get'](_0x41e6f6);_0x4e0113&&'elementStart'==_0x141423['type']&&(_0x4db486=Array['from'](_0x4e0113)[0x0],_0x5014ce=_0x141423['item']['getAttribute']('vid_end')),_0x4db486&&(_0x558734['set'](_0x41e6f6,{'userId':_0x4db486}),_0x3f0507['set'](_0x41e6f6,{'userId':_0x4db486})),_0x41e6f6==_0x5014ce&&(_0x4db486=null,_0x5014ce=null);}}const _0xbee828={},_0x36ef8d=new Set();for(const _0x460f28 of _0x1cfa66){const _0x48f85a=_0x23f7f3['deletions'][_0x460f28],_0x53b889=_0x23f7f3['insertions'][_0x460f28];for(const {userId:_0x51a996}of this['_touchedMarkers']['values']())null!==_0x51a996&&_0x36ef8d['add'](_0x51a996);for(const {userId:_0x1ae4e2}of this['_touchedRoots']['values']())null!==_0x1ae4e2&&_0x36ef8d['add'](_0x1ae4e2);this['_markChanges'](_0x53b889,_0x252a87['insertions'][_0x460f28],_0x3f0507,'insertion',_0x36ef8d),this['_markChanges'](_0x48f85a,_0x252a87['deletions'][_0x460f28],_0x558734,'deletion',_0x36ef8d),_0xbee828[_0x460f28]={'insertions':this['_prepareViewToSave'](_0x53b889),'deletions':this['_prepareViewToSave'](_0x48f85a),'attachChange':this['_touchedRoots']['get'](_0x460f28)||null,'attributesBefore':_0x2611c8(this['_baseRootsAttributes']['get'](_0x460f28))||{},'attributesAfter':_0x2611c8(this['_diffRootsAttributes']['get'](_0x460f28))};}return{'diffData':_0xbee828,'authorsIds':Array['from'](_0x36ef8d)};}['_processRootBeforeSave'](_0x84a926){for(const [,_0x561f2f]of _0x84a926['markers']){const _0x3f0f3c=_0x561f2f['start']['getAncestors']()['filter'](_0x54f5e5=>'tableCell'==_0x54f5e5['name']);for(const _0xb2e149 of _0x3f0f3c)0x1==_0xb2e149['childCount']&&_0xb2e149['getChild'](0x0)['is']('element','paragraph')&&_0xb2e149['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x203dcf){this['_processRootBeforeSave'](_0x203dcf);const _0x3dd060=this['editor']['data']['toView'](_0x203dcf,{}),_0x2abb65=Array['from'](_0x3dd060['getChildren']())['map'](_0x2e1c72=>this['_getViewJson'](_0x2e1c72));return JSON['stringify'](_0x2abb65);}['_getViewJson'](_0x115777){if(_0x115777['is']('$text'))return _0x115777['data'];{const _0x5650c7=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x5223d6=_0x115777,_0x41be79=this['editor']['data']['htmlProcessor']['domConverter'],_0x76c484={'type':_0x5650c7['_getTypeCharForViewElement'](_0x5223d6),'name':_0x5223d6['name'],'attributes':Array['from'](_0x5223d6['getAttributes']()),'children':Array['from'](_0x5223d6['getChildren']())['map'](_0x21a27a=>this['_getViewJson'](_0x21a27a))};if(_0x115777['is']('uiElement')&&'$comment'!=_0x115777['name']){const _0x29d409=_0x115777['render'](_0x41be79['domDocument'],_0x41be79);_0x76c484['children']['push'](_0x29d409['outerHTML']);}else{if(_0x115777['is']('rawElement')){const _0x38b3ed=_0x41be79['domDocument']['createElement'](_0x5223d6['name']);_0x115777['render'](_0x38b3ed,_0x41be79),_0x76c484['children']['push'](_0x38b3ed['innerHTML']);}}const _0x5b7bb5=Array['from'](_0x5223d6['getCustomProperties']());_0x5b7bb5['length']>0x0&&(_0x76c484['customProperties']=_0x5b7bb5);const _0x20904a=_0x5223d6['getFillerOffset']();return null!==_0x20904a&&(_0x76c484['fillerOffset']=_0x20904a),_0x76c484;}}['_markChanges'](_0x1b2cd2,_0x5df137,_0x11228c,_0x1d48c5,_0x1cbfc2){let _0x857ca=null,_0x1656a8=null,_0x553e66=0x0;const _0xf1cd30=this['editor']['model'];for(let _0x505407=0x0;_0x505407<_0x5df137['length'];_0x505407++){const _0x1f236d=this['_getVidAttributeName'](_0x5df137[_0x505407]),_0x5ad25e=_0x5df137[_0x505407]['item']['getAttribute'](_0x1f236d),_0x1b0f3b=_0x11228c['get'](_0x5ad25e),_0x516987=_0x505407==_0x5df137['length']-0x1;(!_0x857ca&&_0x1b0f3b&&(_0x857ca=_0x1b0f3b,_0x1656a8=_0x5df137[_0x505407]),_0x857ca&&(!_0x1b0f3b||_0x1b0f3b['userId']!=_0x857ca['userId']))&&(_0x3f3653(_0x1b0f3b,F(_0x1656a8,_0x1b2cd2,_0xf1cd30),F(_0x5df137[_0x505407],_0x1b2cd2,_0xf1cd30)),_0x857ca=_0x1b0f3b||null,_0x1656a8=_0x1b0f3b?_0x5df137[_0x505407]:null),_0x857ca&&_0x516987&&_0x3f3653(_0x1b0f3b,F(_0x1656a8,_0x1b2cd2,_0xf1cd30),B(_0x5df137[_0x505407],_0x1b2cd2,_0xf1cd30));}function _0x3f3653(_0x2ddf70,_0xa89c73,_0x237faa){const _0x1c5294=_0x857ca['userId'],_0xa457b1='revision:'+_0x1d48c5+':'+_0x1c5294+':'+_0x553e66++,_0x452a39=_0xf1cd30['createRange'](_0xa89c73,_0x237faa);_0x1b2cd2['markers']['set'](_0xa457b1,_0x452a39),null!==_0x1c5294&&_0x1cbfc2['add'](_0x1c5294);}}['_getVidAttributeName'](_0x3a4849){switch(_0x3a4849['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x466038,_0x731b1d){_0x466038['baseVersion']=null;for(const _0x1c4a0b in _0x466038){const _0x13a198=_0x466038[_0x1c4a0b];if(_0x13a198 instanceof vt){const _0x84dfdc=_0x731b1d['get'](_0x13a198['root']['rootName']);_0x466038[_0x1c4a0b]=this['_fixPosition'](_0x13a198,_0x84dfdc);}if(_0x13a198 instanceof ft){const _0x40bf2c=_0x731b1d['get'](_0x13a198['root']['rootName']);_0x466038[_0x1c4a0b]=this['_fixRange'](_0x13a198,_0x40bf2c);}'root'===_0x1c4a0b&&(_0x466038['root']=_0x731b1d['get'](_0x466038['root']['rootName']));}}['_fixRange'](_0xee054,_0x5f2f81){return this['editor']['model']['createRange'](this['_fixPosition'](_0xee054['start'],_0x5f2f81),this['_fixPosition'](_0xee054['end'],_0x5f2f81));}['_fixPosition'](_0x8d456,_0x8e689b){return this['editor']['model']['createPositionFromPath'](_0x8e689b,_0x8d456['path'],_0x8d456['stickiness']);}['_handleInsertOperation'](_0x186ad7){const _0x5bd9b7=this['_idsRoots']['get'](_0x186ad7['position']['root']['rootName']),_0x474e61=this['_fixPosition'](_0x186ad7['position'],_0x5bd9b7),_0x32a41f=null===_0x186ad7['_authorId']?null:_0x186ad7['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xd07b0d=_0x474e61['parent'],_0x266b4d=this['_revisionId'],_0x186940=[];for(const _0x2d535d of _0x186ad7['nodes'])if(_0x2d535d['is']('element'))_0x186940['push'](this['_makeIdsRoot'](_0x2d535d));else{for(let _0x5c346a=0x0;_0x5c346a<_0x2d535d['offsetSize'];_0x5c346a++)_0x186940['push'](new ut('$text',{'vid':this['_revisionId']++}));}const _0x5dec9e=this['_revisionId'];for(let _0x2c8cae=_0x266b4d;_0x2c8cae<_0x5dec9e;_0x2c8cae++)this['_touched']['set'](_0x2c8cae,{'userId':_0x32a41f});_0xd07b0d['_insertChild'](_0x474e61['offset'],_0x186940);}['_handleMoveOperation'](_0x5967a7){(_0x5967a7=this['_cloneOperation'](_0x5967a7,this['_idsRoots']))['_execute']();const _0x20aa7d=null===_0x5967a7['_authorId']?null:_0x5967a7['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x13b602=_0x5967a7['getMovedRangeStart'](),_0xabffa0=_0x13b602['parent'],_0x2eb2c9=_0x13b602['offset'];!function _0x544224(_0x382e58,_0x5c4e1e,_0x1403da,_0x580e2d){for(let _0x3ed3e1=_0x1403da;_0x3ed3e1<_0x580e2d;_0x3ed3e1++){const _0x49d0e9=_0x5c4e1e['getChild'](_0x3ed3e1);_0x49d0e9['is']('element','$text')?_0x382e58['set'](_0x49d0e9['getAttribute']('vid'),{'userId':_0x20aa7d}):(_0x382e58['set'](_0x49d0e9['getAttribute']('vid_start'),{'userId':_0x20aa7d}),_0x544224(_0x382e58,_0x49d0e9,0x0,_0x49d0e9['childCount']),_0x382e58['set'](_0x49d0e9['getAttribute']('vid_end'),{'userId':_0x20aa7d}));}}(this['_touched'],_0xabffa0,_0x2eb2c9,_0x2eb2c9+_0x5967a7['howMany']);}['_handleMergeOperation'](_0x1d7200){const _0x16d1b9=null===(_0x1d7200=this['_cloneOperation'](_0x1d7200,this['_idsRoots']))['_authorId']?null:_0x1d7200['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x58c683=_0x1d7200['targetPosition']['parent'],_0x3826f0=_0x1d7200['sourcePosition']['parent'],_0x2fec3a=_0x58c683['getAttribute']('vid_end'),_0x5577f2=_0x3826f0['getAttribute']('vid_start');_0x58c683['_setAttribute']('vid_end',_0x3826f0['getAttribute']('vid_end')),_0x3826f0['_setAttribute']('vid_end',_0x2fec3a),this['_touched']['set'](_0x5577f2,{'userId':_0x16d1b9}),this['_touched']['set'](_0x2fec3a,{'userId':_0x16d1b9}),_0x1d7200['_execute']();}['_handleSplitOperation'](_0x19809f){const _0x19fdf9=null===(_0x19809f=this['_cloneOperation'](_0x19809f,this['_idsRoots']))['_authorId']?null:_0x19809f['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x7e5b3e=_0x19809f['graveyardPosition'],_0x41fbad=_0x19809f['splitPosition']['parent'];_0x19809f['_execute']();const _0x40e106=_0x41fbad['getAttribute']('vid_end'),_0xb50238=_0x19809f['insertionPosition']['nodeAfter'];if(_0x7e5b3e){const _0x583797=_0xb50238['getAttribute']('vid_end'),_0x31feae=_0x41fbad['getAttribute']('vid_end');_0x41fbad['_setAttribute']('vid_end',_0x583797),_0xb50238['_setAttribute']('vid_end',_0x31feae),this['_touched']['set'](_0x41fbad['getAttribute']('vid_end'),{'userId':_0x19fdf9}),this['_touched']['set'](_0xb50238['getAttribute']('vid_start'),{'userId':_0x19fdf9});}else{const _0x32603c=this['_revisionId']++,_0x556dc6=this['_revisionId']++;_0x41fbad['_setAttribute']('vid_end',_0x32603c),_0xb50238['_setAttribute']('vid_start',_0x556dc6),_0xb50238['_setAttribute']('vid_end',_0x40e106),this['_touched']['set'](_0x32603c,{'userId':_0x19fdf9}),this['_touched']['set'](_0x556dc6,{'userId':_0x19fdf9});}}['_handleMarkerOperation'](_0xc6e869){if(!_0xc6e869['affectsData'])return;const _0x1bbf20=(_0xc6e869=this['_cloneOperation'](_0xc6e869,this['_diffRoots']))['oldRange']?_0xc6e869['oldRange']['root']:null,_0x4e98d6=_0xc6e869['newRange']?_0xc6e869['newRange']['root']:null;_0x1bbf20&&this['_markers']['delete'](_0xc6e869['name']),_0x4e98d6&&this['_markers']['set'](_0xc6e869['name'],_0xc6e869['newRange']['clone']());const _0x2864a1=null===_0xc6e869['_authorId']?null:_0xc6e869['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x63ba63=_0xc6e869['name'];if(!this['_touchedMarkers']['has'](_0x63ba63))return void this['_touchedMarkers']['set'](_0x63ba63,{'range':_0xc6e869['oldRange'],'userId':_0x2864a1});const _0x4c50db=this['_touchedMarkers']['get'](_0x63ba63),_0x1cca60=_0x4c50db['range'],_0x1e79ec=_0xc6e869['newRange'];null==_0x1cca60&&null==_0x1e79ec||_0x1cca60&&_0x1e79ec&&_0x1cca60['isEqual'](_0x1e79ec)?this['_touchedMarkers']['delete'](_0xc6e869['name']):_0x4c50db['userId']=_0x2864a1;}['_handleRootOperation'](_0x1922b7,_0x28c285){this['_diffRoots']['has'](_0x1922b7['rootName'])?this['_diffRoots']['get'](_0x1922b7['rootName'])['_isAttached']=_0x1922b7['isAdd']:(this['_diffRoots']['set'](_0x1922b7['rootName'],P(_0x1922b7['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x1922b7['rootName'],{}),_0x28c285&&this['_idsRoots']['set'](_0x1922b7['rootName'],P(_0x1922b7['rootName'],!0x0)));const _0x14dbd6=null===_0x1922b7['_authorId']?null:_0x1922b7['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x286d22=this['_touchedRoots']['get'](_0x1922b7['rootName']);_0x286d22&&_0x286d22['userId']===_0x14dbd6?this['_touchedRoots']['delete'](_0x1922b7['rootName']):this['_touchedRoots']['set'](_0x1922b7['rootName'],{'userId':_0x14dbd6,'isAttached':_0x1922b7['isAdd']});}['_handleRootAttributeOperation'](_0x28a9a8){const _0x552b51=this['_diffRootsAttributes']['get'](_0x28a9a8['root']['rootName']);null===_0x28a9a8['newValue']?delete _0x552b51[_0x28a9a8['key']]:_0x552b51[_0x28a9a8['key']]=_0x28a9a8['newValue'];}}function N(_0x3cacd1){const _0x563520=P(_0x3cacd1['rootName'],_0x3cacd1['isAttached']());for(const _0x10ea52 of _0x3cacd1['getChildren']()){const _0x3abd94=_0x10ea52['_clone'](!0x0);_0x563520['_appendChild'](_0x3abd94);}return _0x563520;}function P(_0x2e42a6,_0xcc5038=!0x0){const _0x39f69e=new gt();return _0x39f69e['rootName']=_0x2e42a6,_0x39f69e['_isAttached']=_0xcc5038,_0x39f69e['isAttached']=()=>_0x39f69e['_isAttached'],_0x39f69e;}function F(_0x1dd695,_0x29c749,_0x52919f){const _0x4ce649='elementEnd'==_0x1dd695['type']?_0x52919f['createPositionAt'](_0x1dd695['item'],'end'):_0x52919f['createPositionBefore'](_0x1dd695['item']);return _0x52919f['createPositionFromPath'](_0x29c749,_0x4ce649['path'],_0x4ce649['stickiness']);}function B(_0x41f90c,_0x230556,_0x52e23d){const _0x5754b7='elementStart'==_0x41f90c['type']?_0x52e23d['createPositionAt'](_0x41f90c['item'],0x0):_0x52e23d['createPositionAfter'](_0x41f90c['item']);return _0x52e23d['createPositionFromPath'](_0x230556,_0x5754b7['path'],_0x5754b7['stickiness']);}class os extends _0x3c4eb7{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x5aebd4,_0x5a556c){super(_0x5aebd4),this['focusTracker']=new _0xc3e64e(),this['keystrokes']=new _0x1082ff(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x5a556c),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'](),_0xa709b3({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x3fb8dc=_0x2a2e23=>_0x2a2e23['stopPropagation']();this['keystrokes']['set']('arrowright',_0x3fb8dc),this['keystrokes']['set']('arrowleft',_0x3fb8dc),this['keystrokes']['set']('arrowup',_0x3fb8dc),this['keystrokes']['set']('arrowdown',_0x3fb8dc);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x2417b8){this['revisionNameInputView']['fieldView']['element']['value']=_0x2417b8['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x39e4ff){const _0x5b4c41=new nt(this['locale'],ti),_0x1d1cd2=_0x5b4c41['fieldView'];_0x1d1cd2['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x595a7a=g(this['locale'],'Name\x20of\x20the\x20revision');return!_0x39e4ff&&(_0x595a7a+='\x20('+g(this['locale'],'optional')+')'),(_0x5b4c41['label']=_0x595a7a,_0x1d1cd2['on']('input',()=>{this['revisionNameInputValue']=_0x1d1cd2['element']['value']['trim']();}),_0x5b4c41);}}class f extends _0x4489ae{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}['_saveRevisionFormView'];['init'](){const _0x23c148=this['editor'],_0x2e4a2e=_0x23c148['plugins']['get']('RevisionTracker');_0x23c148['ui']['componentFactory']['add']('revisionHistory',_0x2cf503=>{const _0x4df512=_0x387160(_0x2cf503),_0x33661b=_0x4df512['panelView']['children'],_0x267a76=new _0x4eb355(_0x2cf503),_0x46467b=new te(_0x2cf503),_0x422605=new _0x2e6643(_0x2cf503),_0x5c7fde=new te(_0x2cf503),_0x259e1f=new _0x2e6643(_0x2cf503);return _0x4df512['bind']('isEnabled')['to'](_0x2e4a2e,'isReady',_0x2e4a2e,'isEnabled',_0x23c148,'isReadOnly',(_0x4bf2ba,_0x3060b0,_0x212b96)=>_0x4bf2ba&&_0x3060b0&&!_0x212b96),_0x4df512['buttonView']['set']({'icon':_0x25d66f,'label':g(_0x2cf503,'Revision\x20history'),'tooltip':!0x0}),_0x422605['set']({'label':g(_0x2cf503,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x422605['bind']('isEnabled')['to'](_0x2e4a2e,'isReady',_0x2e4a2e,'isEnabled',_0x23c148,'isReadOnly',(_0x261ffe,_0x5ef2a2,_0x5f01b2)=>_0x261ffe&&_0x5ef2a2&&!_0x5f01b2),_0x422605['on']('execute',()=>this['_showDialog']()),_0x259e1f['set']({'label':g(_0x2cf503,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x259e1f['bind']('isEnabled')['to'](_0x2e4a2e,'isReady',_0x23c148,'isReadOnly',(_0x51ec4f,_0x288dda)=>_0x51ec4f&&!_0x288dda),_0x259e1f['on']('execute',()=>{_0x23c148['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x4df512['isOpen']=!0x1,_0x23c148['editing']['view']['focus']();}),_0x46467b['children']['add'](_0x422605),_0x5c7fde['children']['add'](_0x259e1f),_0x267a76['role']='menu',_0x267a76['items']['addMany']([_0x46467b,_0x5c7fde]),_0x33661b['add'](_0x267a76),_0x4df512;}),_0x23c148['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x3545e8=this['editor'],_0x45efdb=_0x3545e8['locale'],_0x1fa9b8=new _0x18dac9(_0x45efdb),_0x220bc3=new _0x970e28(_0x45efdb);_0x1fa9b8['buttonView']['set']({'icon':_0x25d66f,'label':g(_0x45efdb,'Revision\x20history')});const _0x437c96=new _0x1006d3(_0x45efdb,_0x1fa9b8),_0x26b7ce=new _0x15a5e5(_0x45efdb);_0x26b7ce['set']({'label':g(_0x45efdb,'Save\x20current\x20revision')}),_0x26b7ce['delegate']('execute')['to'](_0x1fa9b8),_0x26b7ce['on']('execute',()=>{this['_showDialog']();}),_0x437c96['children']['add'](_0x26b7ce),_0x220bc3['items']['add'](_0x437c96);const _0x57d3fd=new _0x1006d3(_0x45efdb,_0x1fa9b8),_0x18f8ca=new _0x15a5e5(_0x45efdb);return _0x18f8ca['set']({'label':g(_0x45efdb,'Open\x20revision\x20history')}),_0x18f8ca['delegate']('execute')['to'](_0x1fa9b8),_0x18f8ca['on']('execute',()=>{_0x3545e8['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x57d3fd['children']['add'](_0x18f8ca),_0x220bc3['items']['add'](_0x57d3fd),_0x1fa9b8['panelView']['children']['add'](_0x220bc3),_0x1fa9b8;}['_showDialog'](){const _0x56045a=this['editor'],_0x2bddc6=_0x56045a['locale'],_0x39227b=_0x56045a['plugins']['get']('Dialog'),_0x3b89dc=_0x56045a['plugins']['get']('RevisionTracker');function _0x3dc4a2(_0x5cca6f){_0x56045a['config']['get']('revisionHistory.requireRevisionName')&&''===_0x5cca6f['revisionName']?_0x5cca6f['revisionNameInputView']['errorText']=g(_0x2bddc6,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x56045a['plugins']['get'](u)['saveRevision']({'name':_0x5cca6f['revisionName']}),_0x39227b['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x3dc4a2(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x39227b['show']({'id':'revisionSave','title':g(_0x2bddc6,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':g(_0x56045a['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x39227b['hide']()},{'label':g(_0x56045a['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x45a3e1){_0x45a3e1['bind']('isEnabled')['to'](_0x3b89dc,'isReady',_0x3b89dc,'isEnabled',_0x56045a,'isReadOnly',(_0x377d6c,_0x2ccec3,_0x402e58)=>_0x377d6c&&_0x2ccec3&&!_0x402e58);},'onExecute':()=>_0x3dc4a2(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x21801d=this['editor'],_0x207a4e=_0x21801d['locale'];this['_saveRevisionFormView']=new os(_0x207a4e,_0x21801d['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class Q extends _0x3c4eb7{['changeId'];['_model'];constructor(_0x4e722f,_0x318d99){super(_0x4e722f),this['_model']=_0x318d99,this['changeId']=_0x318d99['id'];const _0x20b6d6=this['bindTemplate'],_0x347da7=g(_0x4e722f,_0x318d99['data']['isSuggestion']?'Suggested\x20by':'add'==_0x318d99['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x318d99['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x20b6d6['to']('type',_0x5b62d5=>'ck-revision-change__'+_0x5b62d5)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x347da7}]},{'text':'\x20'+_0x318d99['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
25
- _0x27e923(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x281444){super(),this['id']=_0x281444['id']||_0x402ab0(),this['author']=_0x281444['author'],this['type']=_0x281444['type'],this['data']=_0x281444['data']||{},this['rootName']=_0x281444['rootName'],this['set']('createdAt',_0x281444['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(_0x47b0e6,_0x3fbb3b){this['newRevisionId']=_0x47b0e6,this['oldRevisionId']=_0x3fbb3b,this['changes']=new _0x1301ad();}['_setChanges'](_0x3b5ade){for(const _0x58ea15 of _0x3b5ade)this['changes']['add'](_0x58ea15);}}class m extends _0x4489ae{['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[_0x5cb796,_0x472b27,I,V];}constructor(_0x32d953){super(_0x32d953),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',(_0x5bd6f5,_0x2e34c1,_0x33b0bf)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x30b53e=>{for(const _0x388ad of this['editor']['editing']['view']['document']['roots'])_0x33b0bf?_0x30b53e['removeClass']('ck-editor__editable__overlay',_0x388ad):_0x30b53e['addClass']('ck-editor__editable__overlay',_0x388ad);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x533f84=>null!==_0x533f84),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x37cef3,_0x5288bf,_0x481bae)=>_0x37cef3&&_0x481bae?_0x5288bf['changes']['getIndex'](_0x481bae):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x4b9fd9,_0x4a9f29)=>_0x4b9fd9?_0x4a9f29['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x472b27);}['init'](){const _0x1c364f=this['editor'],_0x4edcb6=new pt(_0x1c364f,{'direction':'backward'}),_0x26b743=new pt(_0x1c364f,{'direction':'forward'});(_0x1c364f['commands']['add']('showPreviousChange',_0x4edcb6),_0x1c364f['commands']['add']('showNextChange',_0x26b743),_0x1c364f['commands']['add']('restoreRevision',new wt(_0x1c364f)),this['on']('change:numberOfChanges',()=>{_0x4edcb6['refresh'](),_0x26b743['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x1c364f['enableReadOnlyMode']('revision-viewer'),_0x1c364f['plugins']['has']('WidgetToolbarRepository'))&&_0x1c364f['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x54bb62){return await this['_utils']['loadRevisionData'](_0x54bb62,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x54bb62);}async['getRevisionRootsAttributes'](_0x51b605){return await this['_utils']['loadRevisionData'](_0x51b605,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x51b605);}async['compare'](_0x5c5a0b,_0xee1755,_0x3530f5=!0x1){if(!this['isEnabled'])return;const _0x409b0b=this['diff'],_0x84ce3=this['repository'],_0x38fee1='string'==typeof _0x5c5a0b?_0x84ce3['getRevision'](_0x5c5a0b):_0x5c5a0b,_0x120a69='string'==typeof _0xee1755?_0x84ce3['getRevision'](_0xee1755):_0xee1755,_0x41b389=_0x38fee1['id'],_0x381346=_0x120a69?_0x120a69['id']:null;if(!_0x3530f5&&this['diff']&&this['diff']['newRevisionId']===_0x41b389&&this['diff']['oldRevisionId']===_0x381346)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new c(_0x41b389,_0x381346);const _0x136971=this['_getRevisionsRange'](_0x38fee1,_0x120a69,!0x0)['map'](_0x407ecb=>this['_utils']['loadRevisionData'](_0x407ecb,this['adapter']));return _0x136971['push'](new Promise(_0x249a26=>{setTimeout(_0x249a26,0x14);})),Promise['all'](_0x136971)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x49e664=this['_getDiff'](_0x41b389,_0x381346);for(const _0x2aeee7 of _0x49e664['changes'])this['_changeIdToChange']['set'](_0x2aeee7['id'],_0x2aeee7);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x4cb75b=>{for(const _0x56495b of this['editor']['model']['document']['getRootNames']())_0x4cb75b['detachRoot'](_0x56495b);for(const _0x46f075 of Object['keys'](_0x49e664['model'])){const _0x336020=_0x4cb75b['addRoot'](_0x46f075);for(const _0x1faeb3 of Object['keys'](_0x49e664['attributes'][_0x46f075]))_0x4cb75b['setAttribute'](_0x1faeb3,_0x49e664['attributes'][_0x46f075][_0x1faeb3],_0x336020);_0x4cb75b['insert'](_0x49e664['model'][_0x46f075],_0x336020,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x49e664['changes'])),this['isReady']=!0x0;})['catch'](_0x24c971=>{console['error'](_0x24c971),this['_cleanUp'](),_0x409b0b&&(this['diff']=_0x409b0b),this['isReady']=!0x0;});}['addRevisionData'](_0x5a045f,_0x18d743){const _0x3c0ed0=this['repository']['createRevision'](_0x5a045f);return _0x3c0ed0['on']('_update',(_0x301eb0,_0x4c7498,_0x1c2e22)=>_0x18d743(_0x4c7498,_0x1c2e22,_0x3c0ed0)),this['repository']['addRevision'](_0x3c0ed0),_0x3c0ed0;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x497765=>{for(const _0x511b15 of this['editor']['model']['document']['getRootNames']())_0x497765['detachRoot'](_0x511b15);});}['_sortAndFilterDiffChanges'](_0x5e6e0d){const _0x57d72c=[],_0x59857f=new Map();for(const _0x49103b of this['editor']['model']['document']['getRootNames']()){const _0x13d385=this['editor']['editing']['view']['getDomRoot'](_0x49103b);if(!_0x13d385)continue;const _0x4c6f1d=_0x13d385['getClientRects']()['item'](0x0);_0x4c6f1d&&(_0x57d72c['push'](_0x49103b),_0x59857f['set'](_0x49103b,_0x4c6f1d));}return _0x57d72c['sort']((_0x84a6cf,_0x18a71a)=>{const _0x390f4d=_0x59857f['get'](_0x84a6cf),_0x16f958=_0x59857f['get'](_0x18a71a);return _0x390f4d['y']-_0x16f958['y']||_0x390f4d['x']-_0x16f958['x'];}),(_0x5e6e0d=_0x5e6e0d['filter'](_0x450cb5=>_0x57d72c['includes'](_0x450cb5['rootName'])))['sort']((_0x5b5dbd,_0x3a88dc)=>_0x57d72c['indexOf'](_0x5b5dbd['rootName'])-_0x57d72c['indexOf'](_0x3a88dc['rootName'])),_0x5e6e0d;}['_makeTape'](_0x1166a6){const _0x10d297=Array['from'](_0x1166a6['markers'])['filter'](([_0x2e26f1,_0x561e7a])=>_0x2e26f1['startsWith']('revision:')&&!_0x561e7a['isCollapsed']),_0x5a2f77=Array['from'](this['editor']['model']['createRangeIn'](_0x1166a6)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x10d297['length'])for(const _0x14ee58 of _0x5a2f77){const [_0x354393,_0x5b6795]=_0x10d297[0x0],[,_0x35889f,_0x579579]=_0x354393['split'](':');if(_0x5b6795['end']['isEqual'](_0x14ee58['nextPosition'])&&_0x10d297['shift'](),(_0x14ee58['previousPosition']['isEqual'](_0x5b6795['start'])||_0x14ee58['previousPosition']['isAfter'](_0x5b6795['start']))&&('insertion'==_0x35889f?_0x14ee58['isAdded']={'userId':_0x579579}:'deletion'==_0x35889f&&(_0x14ee58['isRemoved']={'userId':_0x579579})),0x0==_0x10d297['length'])break;}return _0x5a2f77;}['_refreshStartEndIndex'](_0x1ef66a){const _0x17db75=new Map();for(let _0x30cec2=0x0;_0x30cec2<_0x1ef66a['length'];_0x30cec2++)'text'===_0x1ef66a[_0x30cec2]['type']?(_0x1ef66a[_0x30cec2]['item']['startIndex']=_0x30cec2,_0x1ef66a[_0x30cec2]['item']['endIndex']=_0x30cec2):('elementStart'===_0x1ef66a[_0x30cec2]['type']?_0x1ef66a[_0x30cec2]['item']['startIndex']=_0x30cec2:'elementEnd'===_0x1ef66a[_0x30cec2]['type']&&(_0x1ef66a[_0x30cec2]['item']['endIndex']=_0x30cec2),_0x17db75['set'](_0x1ef66a[_0x30cec2]['id'],_0x30cec2));for(const _0x257df3 of _0x17db75['values']())'elementStart'===_0x1ef66a[_0x257df3]['type']?_0x1ef66a[_0x257df3]['item']['endIndex']=_0x17db75['get'](_0x1ef66a[_0x257df3]['pairId']):'elementEnd'===_0x1ef66a[_0x257df3]['type']&&(_0x1ef66a[_0x257df3]['item']['startIndex']=_0x17db75['get'](_0x1ef66a[_0x257df3]['pairId']));}['_processTape'](_0x3a3191){for(let _0x4d3be7=0x0;_0x4d3be7<_0x3a3191['length'];_0x4d3be7++){if('elementStart'===_0x3a3191[_0x4d3be7]['type'])_0x3a3191[_0x4d3be7]['item']['startIndex']=_0x4d3be7;else{if('elementEnd'===_0x3a3191[_0x4d3be7]['type']){_0x3a3191[_0x4d3be7]['item']['endIndex']=_0x4d3be7;const _0x3aba67=_0x3a3191[_0x4d3be7]['item']['startIndex'];_0x3a3191[_0x3aba67]['pairId']=_0x3a3191[_0x4d3be7]['id'],_0x3a3191[_0x4d3be7]['pairId']=_0x3a3191[_0x3aba67]['id'];}else _0x3a3191[_0x4d3be7]['item']['startIndex']=_0x4d3be7,_0x3a3191[_0x4d3be7]['item']['endIndex']=_0x4d3be7,_0x3a3191[_0x4d3be7]['pairId']=null;}_0x3a3191[_0x4d3be7]['markersStart']||(_0x3a3191[_0x4d3be7]['markersStart']=[],_0x3a3191[_0x4d3be7]['markersEnd']=[]);}}['_markInsertions'](_0x4f421d,_0x4d2a58){const _0x55afe9=_0x4f421d['filter'](_0x2d8c50=>!_0x2d8c50['isAdded']);for(let _0x572b93=0x0;_0x572b93<_0x4d2a58['length'];_0x572b93++)_0x4d2a58[_0x572b93]['isAdded']&&(_0x55afe9[_0x572b93]['isAdded']=_0x4d2a58[_0x572b93]['isAdded']);}['_getDiff'](_0x16f879,_0x5d68f5=null){const _0x293111=this['repository']['getRevision'](_0x16f879),_0x26b578=_0x5d68f5?this['repository']['getRevision'](_0x5d68f5):null,_0x429cf8=this['_getRevisionsRange'](_0x293111,_0x26b578),_0x3cfb7e=_0x429cf8[_0x429cf8['length']-0x1],_0x51b2c8=new Map(),_0x2cc64e={'model':{},'attributes':{},'changes':[]},_0x2adb27=new Set(),_0x4e1d03=new Map();for(let _0x3f8cf5=_0x429cf8['length']-0x1;_0x3f8cf5>=0x0;_0x3f8cf5--){const _0x2eadc7=_0x429cf8[_0x3f8cf5];for(const _0x53ee7c of Object['keys'](_0x2eadc7['diffData']))if(_0x2eadc7['diffData'][_0x53ee7c]['attachChange']){const _0x30648e=_0x2eadc7['diffData'][_0x53ee7c]['attachChange'];_0x30648e['isAttached']?(_0x2adb27['add'](_0x53ee7c),_0x4e1d03['has'](_0x53ee7c)&&_0x4e1d03['get'](_0x53ee7c)['userId']==_0x30648e['userId']?_0x4e1d03['delete'](_0x53ee7c):_0x4e1d03['set'](_0x53ee7c,_0x30648e)):_0x4e1d03['has'](_0x53ee7c)?(_0x2adb27['delete'](_0x53ee7c),_0x4e1d03['delete'](_0x53ee7c)):(_0x2adb27['add'](_0x53ee7c),_0x4e1d03['set'](_0x53ee7c,_0x30648e));}else _0x2adb27['add'](_0x53ee7c);}for(const _0x1d8180 of _0x2adb27){const _0x17abad=_0x4e1d03['has'](_0x1d8180)&&!_0x4e1d03['get'](_0x1d8180)['isAttached'];let _0x43da14=_0x17abad?_0x429cf8['length']-0x1:0x0;const _0x31adf4=_0x17abad?-0x1:0x1;for(;_0x429cf8[_0x43da14];){const _0x16bf59=_0x429cf8[_0x43da14];if(_0x16bf59['diffData'][_0x1d8180]){const _0x17f562=_0x17abad?_0x16bf59['diffData'][_0x1d8180]['attributesBefore']:_0x16bf59['diffData'][_0x1d8180]['attributesAfter'];_0x2cc64e['attributes'][_0x1d8180]=_0x17f562?_0x2611c8(_0x17f562):{};break;}_0x43da14+=_0x31adf4;}}for(const _0x445a23 of _0x429cf8){_0x445a23['model']={};for(const _0x296468 of _0x445a23['authors'])_0x51b2c8['set'](_0x296468['id'],_0x296468);for(const _0x40f521 of _0x2adb27){const _0x93cb2b=_0x445a23['diffData'][_0x40f521]?_0x445a23['diffData'][_0x40f521]['insertions']:'[]',_0x3fc0cd=_0x445a23['diffData'][_0x40f521]?_0x445a23['diffData'][_0x40f521]['deletions']:'[]';_0x445a23['model'][_0x40f521]={'insertions':this['_utils']['_makeModelFromViewString'](_0x93cb2b),'deletions':this['_utils']['_makeModelFromViewString'](_0x3fc0cd)};}}for(const _0x801f7b of _0x2adb27){let _0x4e4428=null,_0x1aa583=0x0;const _0x2dc115=new Map(Array['from'](_0x293111['model'][_0x801f7b]['insertions']['markers'])['filter'](([_0x10654f])=>!_0x10654f['startsWith']('revision:')));let _0x287d57=0x0;for(const _0x2cd9f2 of _0x429cf8){const _0x20048d=this['_makeTape'](_0x2cd9f2['model'][_0x801f7b]['insertions']);_0x2cd9f2==_0x293111?(_0x4e4428=_0x20048d,_0x1aa583=_0x4e4428['length'],_0x4e4428['forEach'](_0x17afee=>{_0x17afee['id']=_0x287d57++;}),this['_processTape'](_0x4e4428)):this['_markInsertions'](_0x4e4428,_0x20048d);const _0x1195b6=_0x4e4428['filter'](_0x1f1a8c=>!_0x1f1a8c['isAdded'])['map'](_0x422c0b=>_0x422c0b['id']);let _0x1ba443=0x0;const _0x38876e=this['_makeTape'](_0x2cd9f2['model'][_0x801f7b]['deletions']);_0x38876e['forEach'](_0x4f94bd=>{_0x4f94bd['isRemoved']?_0x4f94bd['id']=_0x1aa583++:_0x4f94bd['id']=_0x1195b6[_0x1ba443++];}),this['_processTape'](_0x38876e),this['_setDistance'](_0x4e4428,'isAdded'),this['_setDistance'](_0x38876e,'isRemoved'),_0x2cd9f2==_0x293111&&this['_markMarkers'](_0x4e4428,_0x2dc115),_0x4e4428=this['_joinTapes'](_0x4e4428,_0x38876e),this['_refreshStartEndIndex'](_0x4e4428),this['_setDistance'](_0x4e4428,'isRemoved');}_0x4e4428=_0x4e4428['filter'](_0x529792=>!(_0x529792['isAdded']&&_0x529792['isRemoved']));const _0x5f7f6b=new Map(_0x3cfb7e['model'][_0x801f7b]['deletions']['markers']),_0x222bd1=new Set(_0x2dc115['keys']());for(const _0xc4ba03 of _0x5f7f6b['keys']())_0x222bd1['delete'](_0xc4ba03);this['_markSuggestions'](_0x4e4428,_0x222bd1),this['_fixObsoleteTags'](_0x4e4428),_0x4e4428=this['_removeMissingPairs'](_0x4e4428),_0x4e4428=this['_markMismatchedRemovedTags'](_0x4e4428),_0x4e4428=this['_removeUnsupportedChanges'](_0x4e4428);const {root:_0x226c18,changes:_0x589138}=this['_makeModelFromTape'](_0x4e4428,_0x51b2c8,_0x801f7b);_0x2cc64e['model'][_0x801f7b]=_0x226c18;const _0x7aff57=_0x4e1d03['get'](_0x801f7b);if(_0x7aff57){const _0x2f9c8b=_0x51b2c8['get'](_0x7aff57['userId']),_0x1a2686=new r({'author':_0x2f9c8b,'type':_0x7aff57['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x801f7b});_0x589138['unshift'](_0x1a2686),_0x2cc64e['attributes'][_0x801f7b]['revisionHistoryAttachChange']=_0x1a2686['id'];}_0x2cc64e['changes']=_0x2cc64e['changes']['concat'](_0x589138);}return _0x2cc64e;}['_markMarkers'](_0xaa745b,_0x7f8822){for(let _0x3e8f81=0x0;_0x3e8f81<_0xaa745b['length'];_0x3e8f81++)for(const [_0x2c0b5d,_0x5f2d22]of _0x7f8822)!_0x5f2d22['isCollapsed']&&_0x5f2d22['start']['isEqual'](_0xaa745b[_0x3e8f81]['previousPosition'])&&_0xaa745b[_0x3e8f81]['markersStart']['push'](_0x2c0b5d),_0x5f2d22['end']['isEqual'](_0xaa745b[_0x3e8f81]['nextPosition'])&&_0xaa745b[_0x3e8f81]['markersEnd']['push'](_0x2c0b5d);}['_joinTapes'](_0x3c62d3,_0x841879){let _0x2d7c68=[],_0x3c6718=0x0,_0x25918f=0x0;for(;_0x3c6718<_0x3c62d3['length']||_0x25918f<_0x841879['length'];){const _0x1c319f=_0x3c62d3[_0x3c6718]||{},_0x1537b7=_0x841879[_0x25918f]||{};if(_0x1c319f['id']==_0x1537b7['id'])_0x3c6718++,_0x25918f++,_0x2d7c68['push'](_0x1c319f);else{if(_0x1537b7['isRemoved']&&_0x1c319f['isAdded']){const {commonTape:_0x235a8c,iEnd:_0x77d6a6,jEnd:_0x5df16c}=this['_threeWayMerge'](_0x3c62d3,_0x3c6718,_0x841879,_0x25918f);_0x2d7c68=_0x2d7c68['concat'](_0x235a8c),_0x3c6718=_0x77d6a6,_0x25918f=_0x5df16c;}else _0x1537b7['isRemoved']?(_0x25918f++,_0x2d7c68['push'](_0x1537b7)):(_0x3c6718++,_0x2d7c68['push'](_0x1c319f));}}return _0x2d7c68;}['_markSuggestions'](_0x4612b3,_0x30d747){const _0x185255=[];for(let _0x374563=0x0;_0x374563<_0x4612b3['length'];_0x374563++){for(let _0x563987=0x0;_0x563987<_0x4612b3[_0x374563]['markersStart']['length'];_0x563987++){const _0x4a3135=_0x4612b3[_0x374563]['markersStart'][_0x563987];if(!_0x30d747['has'](_0x4a3135))continue;const {group:_0x3bab55,type:_0x1acd35,authorId:_0x3f06c1}=_0x3fb9fc(_0x4a3135);'revision-suggestion'!=_0x3bab55||'insertion'!=_0x1acd35&&'deletion'!=_0x1acd35||(_0x185255['unshift']({'type':_0x1acd35,'name':_0x4a3135,'userId':_0x3f06c1}),_0x4612b3[_0x374563]['markersStart']['splice'](_0x563987,0x1),_0x563987--);}_0x484d59(_0x4612b3[_0x374563]);for(let _0x376503=0x0;_0x376503<_0x4612b3[_0x374563]['markersEnd']['length'];_0x376503++){const _0x3ae380=_0x4612b3[_0x374563]['markersEnd'][_0x376503];if(!_0x30d747['has'](_0x3ae380))continue;const {group:_0x1238a7,type:_0xc5ddc0}=_0x3fb9fc(_0x3ae380);if('revision-suggestion'!=_0x1238a7||'insertion'!=_0xc5ddc0&&'deletion'!=_0xc5ddc0)continue;_0x4612b3[_0x374563]['markersEnd']['splice'](_0x376503,0x1),_0x376503--;const _0x50d66a=_0x185255['findIndex'](_0x27bdd4=>_0x27bdd4['name']==_0x3ae380);_0x50d66a>-0x1&&_0x185255['splice'](_0x50d66a,0x1);}}function _0x3fb9fc(_0x2c28ce){const _0x2ee64e=_0x2c28ce['split'](':');return{'group':_0x2ee64e[0x0],'type':_0x2ee64e[0x1],'subType':_0x2ee64e['length']>=0x5?_0x2ee64e[0x2]:null,'id':_0x2ee64e['length']<0x5?_0x2ee64e[0x2]:_0x2ee64e[0x3],'authorId':_0x2ee64e['length']<0x5?_0x2ee64e[0x3]:_0x2ee64e[0x4],'markerCount':0x6==_0x2ee64e['length']?_0x2ee64e[0x5]:null};}function _0x484d59(_0x30ea51){for(let _0x36055b=0x0;_0x36055b<_0x185255['length'];_0x36055b++){if(_0x30ea51['isAdded']&&'insertion'==_0x185255[_0x36055b]['type'])return _0x30ea51['isAddSuggestion']=_0x185255[_0x36055b],void delete _0x30ea51['isAdded'];if(!_0x30ea51['isAdded']&&!_0x30ea51['isRemoved']&&'deletion'==_0x185255[_0x36055b]['type'])return void(_0x30ea51['isRemoveSuggestion']=_0x185255[_0x36055b]);}}}['_setDistance'](_0x387d03,_0x43214c){let _0x557d56=0x0,_0x527513=!0x1;const _0xc0699f=new Map();for(const _0x5969c0 of _0x387d03)_0x5969c0[_0x43214c]?_0x527513&&(_0x557d56++,_0x527513=!0x1):(_0x557d56++,_0x527513=!0x0),_0xc0699f['set'](_0x5969c0['id'],_0x557d56);for(let _0x1c1502=0x0;_0x1c1502<_0x387d03['length'];_0x1c1502++){if('isRemoved'==_0x43214c&&_0x387d03[_0x1c1502]['isAdded']||'isAdded'==_0x43214c&&_0x387d03[_0x1c1502]['isRemoved'])continue;if('text'==_0x387d03[_0x1c1502]['type']){_0x387d03[_0x1c1502]['distance']=0x0;continue;}const _0x291d1a=_0xc0699f['get'](_0x387d03[_0x1c1502]['pairId']),_0x3f4f52=_0xc0699f['get'](_0x387d03[_0x1c1502]['id']);_0x387d03[_0x1c1502]['distance']=_0x291d1a-_0x3f4f52;}}['_getRevisionsRange'](_0x54cc8e,_0xcfe050,_0x3ac365=!0x1){const _0x3c609=[];let _0x5ba09b=this['repository']['getIndex'](_0x54cc8e),_0x4318bf=this['repository']['getIndex'](_0xcfe050);for(-0x1==_0x4318bf&&(_0x4318bf=this['repository']['_revisions']['length'],_0x3ac365=!0x1);_0x5ba09b<_0x4318bf;)_0x3c609['push'](this['repository']['getRevision'](_0x5ba09b)),_0x5ba09b++;return _0x3ac365&&_0x3c609['push'](this['repository']['getRevision'](_0x5ba09b)),_0x3c609;}['_threeWayMerge'](_0x5216b0,_0x45bb07,_0x22e3f4,_0x4b79ea){const _0x6e2aed=this['editor']['model']['schema'];let _0x57ab04=_0x45bb07;for(;_0x5216b0[_0x57ab04]&&_0x5216b0[_0x57ab04]['isAdded'];)_0x57ab04++;let _0x978f45=_0x4b79ea;for(;_0x22e3f4[_0x978f45]&&_0x22e3f4[_0x978f45]['isRemoved'];)_0x978f45++;_0x127915(_0x5216b0,_0x45bb07,_0x57ab04),_0x127915(_0x22e3f4,_0x4b79ea,_0x978f45);const _0x3430ee=_0x22e3f4['slice'](_0x4b79ea,_0x978f45)['concat'](_0x5216b0['slice'](_0x45bb07,_0x57ab04));return _0x3430ee['sort']((_0x56283f,_0x3021b8)=>_0x56283f['side']!=_0x3021b8['side']?_0x56283f['side']-_0x3021b8['side']:_0x56283f['level']!=_0x3021b8['level']?_0x56283f['level']-_0x3021b8['level']:_0x56283f['distance']!=_0x3021b8['distance']?_0x3021b8['distance']-_0x56283f['distance']:!!_0x56283f['isAdded']!=!!_0x3021b8['isAdded']?-0x1==_0x56283f['side']||0x0==_0x56283f['side']?_0x56283f['isAdded']?-0x1:0x1:_0x56283f['isAdded']?0x1:-0x1:_0x56283f['index']-_0x3021b8['index']),{'commonTape':_0x3430ee,'iEnd':_0x57ab04,'jEnd':_0x978f45};function _0x127915(_0x3c965c,_0x46f5d1,_0x1952f4){let _0x3cccce=-0x1,_0x1a2a47=Number['POSITIVE_INFINITY'],_0x4ca7ad=!0x0;for(let _0xf4ab4c=_0x46f5d1;_0xf4ab4c<_0x1952f4;_0xf4ab4c++)if(_0x6e2aed['isInline'](_0x3c965c[_0xf4ab4c]['item'])||(_0x4ca7ad=!0x1),_0x3c965c[_0xf4ab4c]['item']['startIndex']<_0x46f5d1&&(_0x3cccce=_0xf4ab4c),_0x3c965c[_0xf4ab4c]['item']['endIndex']>=_0x1952f4){_0x1a2a47=_0xf4ab4c;break;}_0x4ca7ad&&(_0x3cccce=_0x1952f4-0x1);for(let _0x5aecec=_0x46f5d1;_0x5aecec<_0x1952f4;_0x5aecec++)_0x3c965c[_0x5aecec]['side']=_0x5aecec<=_0x3cccce?-0x1:_0x5aecec<_0x1a2a47?0x0:0x1,_0x3c965c[_0x5aecec]['index']=_0x5aecec;let _0x19f9be=0x0;for(let _0x128dea=_0x46f5d1;_0x128dea<=_0x3cccce;_0x128dea++)0x0==_0x3c965c[_0x128dea]['distance']?_0x3c965c[_0x128dea]['level']=_0x19f9be:(_0x19f9be++,_0x3c965c[_0x128dea]['level']=_0x19f9be,_0x19f9be++);for(let _0x55bf86=_0x46f5d1;_0x55bf86<_0x1952f4;_0x55bf86++)0x0==_0x3c965c[_0x55bf86]['side']&&(_0x3c965c[_0x55bf86]['level']=_0x19f9be);_0x19f9be=0x0;for(let _0x506f76=_0x1952f4-0x1;_0x506f76>=_0x1a2a47;_0x506f76--)0x0==_0x3c965c[_0x506f76]['distance']?_0x3c965c[_0x506f76]['level']=_0x19f9be:(_0x19f9be--,_0x3c965c[_0x506f76]['level']=_0x19f9be,_0x19f9be--);}}['_fixObsoleteTags'](_0xdd1c68){const _0xe6670d=new Map(),_0x308053=this['editor']['model']['schema'];for(let _0x5106ad=0x1;_0x5106ad<_0xdd1c68['length'];_0x5106ad++){let _0x509c20,_0x17c640,_0x33ecc3;const _0x6c50b3=_0xdd1c68[_0x5106ad],_0x265ae6=_0xdd1c68[_0x5106ad-0x1];if('text'==_0x6c50b3['type'])continue;if(_0x6c50b3['type']!=_0x265ae6['type'])continue;if(!_0x308053['isBlock'](_0x265ae6['item'])||_0x308053['isLimit'](_0x265ae6['item']))continue;if(!_0x308053['isBlock'](_0x6c50b3['item'])||_0x308053['isLimit'](_0x6c50b3['item']))continue;if((_0xdd1c68[_0x5106ad]['isAdded']||_0xdd1c68[_0x5106ad]['isAddSuggestion'])&&_0xdd1c68[_0x5106ad-0x1]['isRemoved'])_0x509c20=_0xdd1c68[_0x5106ad],_0x17c640=_0xdd1c68[_0x5106ad-0x1],_0x33ecc3=_0x5106ad-0x1;else{if(!_0xdd1c68[_0x5106ad]['isRemoved']||!_0xdd1c68[_0x5106ad-0x1]['isAdded']&&!_0xdd1c68[_0x5106ad-0x1]['isAddSuggestion'])continue;_0x509c20=_0xdd1c68[_0x5106ad-0x1],_0x17c640=_0xdd1c68[_0x5106ad],_0x33ecc3=_0x5106ad;}const _0x1d3ff5=_0x509c20['level']==_0x17c640['level'],_0x38d2f7=Math['abs'](_0x509c20['level'])<Math['abs'](_0x17c640['level'])&&0x0==_0x17c640['distance'];(_0x1d3ff5||_0x38d2f7)&&(_0xe6670d['set'](_0x17c640['id'],_0x509c20['id']),_0xdd1c68['splice'](_0x33ecc3,0x1),_0x5106ad--,_0x509c20['isAdded']=!0x1);}for(let _0x4571bf=0x0;_0x4571bf<_0xdd1c68['length'];_0x4571bf++)_0xe6670d['has'](_0xdd1c68[_0x4571bf]['pairId'])&&(_0xdd1c68[_0x4571bf]['pairId']=_0xe6670d['get'](_0xdd1c68[_0x4571bf]['pairId']));}['_removeMissingPairs'](_0x2c232a){const _0x3e80af=new Set(_0x2c232a['map'](_0x35c682=>_0x35c682['id']));for(let _0x28cd53=0x0;_0x28cd53<_0x2c232a['length'];_0x28cd53++)_0x3e80af['has'](_0x2c232a[_0x28cd53]['pairId'])||0x0==_0x2c232a[_0x28cd53]['distance']||(_0x2c232a[_0x28cd53]['isIncorrect']=!0x0);return _0x2c232a['filter'](_0x590075=>!_0x590075['isIncorrect']);}['_markMismatchedRemovedTags'](_0x1f0f63){const _0x363e75=new Set();for(let _0x5216ca=0x0;_0x5216ca<_0x1f0f63['length'];_0x5216ca++){if(_0x363e75['has'](_0x1f0f63[_0x5216ca]['id'])&&_0x1f0f63[_0x5216ca]['isRemoved']&&(_0x1f0f63[_0x5216ca]['isIncorrect']=!0x0),_0x1f0f63[_0x5216ca]['isIncorrect'])continue;if(0x0==_0x1f0f63[_0x5216ca]['distance'])continue;if('elementStart'!=_0x1f0f63[_0x5216ca]['type'])continue;if(null==_0x1f0f63[_0x5216ca]['pairId'])continue;let _0x44794d=_0x5216ca+0x1,_0x2a2feb=0x0;for(;_0x1f0f63[_0x44794d]['id']!=_0x1f0f63[_0x5216ca]['pairId'];)'elementStart'==_0x1f0f63[_0x44794d]['type']?_0x2a2feb++:'elementEnd'==_0x1f0f63[_0x44794d]['type']&&_0x2a2feb--,_0x44794d++;if(0x0!=_0x2a2feb){if(_0x1f0f63[_0x5216ca]['isRemoved'])_0x1f0f63[_0x5216ca]['isIncorrect']=!0x0;else{for(;_0x44794d!=_0x5216ca;)_0x1f0f63[_0x44794d]['isRemoved']&&0x0!=_0x1f0f63[_0x44794d]['distance']&&(_0x1f0f63[_0x44794d]['isIncorrect']=!0x0,_0x363e75['add'](_0x1f0f63[_0x44794d]['pairId'])),_0x44794d--;}}}return _0x1f0f63['filter'](_0xe66ebd=>!_0xe66ebd['isIncorrect']);}['_removeUnsupportedChanges'](_0x3bdf52){const _0x19ba0f=this['editor']['model']['schema'];for(let _0x17164a=0x0;_0x17164a<_0x3bdf52['length'];_0x17164a++){if(!(_0x3bdf52[_0x17164a]['isAdded']||_0x3bdf52[_0x17164a]['isAddSuggestion']||_0x3bdf52[_0x17164a]['isRemoved']||_0x3bdf52[_0x17164a]['isRemoveSuggestion']))continue;if(0x0==_0x3bdf52[_0x17164a]['distance'])continue;const _0x7baf8c=_0x3bdf52[_0x17164a]['item'];_0x19ba0f['isBlock'](_0x7baf8c)||_0x19ba0f['isLimit'](_0x7baf8c)||(_0x3bdf52[_0x17164a]['isAdded']&&delete _0x3bdf52[_0x17164a]['isAdded'],_0x3bdf52[_0x17164a]['isAddSuggestion']&&delete _0x3bdf52[_0x17164a]['isAddSuggestion'],_0x3bdf52[_0x17164a]['isRemoveSuggestion']&&delete _0x3bdf52[_0x17164a]['isRemoveSuggestion'],_0x3bdf52[_0x17164a]['isRemoved']&&(_0x3bdf52[_0x17164a]['isIncorrect']=!0x0));}return _0x3bdf52['filter'](_0x29db8c=>!_0x29db8c['isIncorrect']);}['_makeModelFromTape'](_0x337512,_0x4aa98f,_0x5d74ad){const _0x2325ff=new gt(),_0x5ae669=[],_0x5280e7=new Map(),_0x107429=this['editor']['model'],_0xa53d9a=_0x107429['schema'],_0x210ed3=[_0x2325ff],_0x1f41f6={},_0x1adf06={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x4b0325=null;const _0x168450=[0x0];for(let _0x1733f6=0x0;_0x1733f6<_0x337512['length'];_0x1733f6++)if('elementStart'===_0x337512[_0x1733f6]['type']){_0x337512[_0x1733f6]['previousPosition']=_0x107429['createPositionFromPath'](_0x2325ff,_0x168450);const _0xa19087=new ut(_0x337512[_0x1733f6]['item']['name'],_0x337512[_0x1733f6]['item']['getAttributes']());_0x210ed3[0x0]['_appendChild'](_0xa19087),_0x168450['push'](0x0),_0x210ed3['unshift'](_0xa19087),_0x337512[_0x1733f6]['nextPosition']=_0x107429['createPositionFromPath'](_0x2325ff,_0x168450);}else'elementEnd'===_0x337512[_0x1733f6]['type']?(_0x210ed3['shift'](),_0x337512[_0x1733f6]['previousPosition']=_0x107429['createPositionFromPath'](_0x2325ff,_0x168450),_0x168450['pop'](),_0x168450[_0x168450['length']-0x1]++,_0x337512[_0x1733f6]['nextPosition']=_0x107429['createPositionFromPath'](_0x2325ff,_0x168450)):(_0x337512[_0x1733f6]['previousPosition']=_0x107429['createPositionFromPath'](_0x2325ff,_0x168450),_0x4b0325?_0x4b0325['_data']+=_0x337512[_0x1733f6]['item']['data']:_0x4b0325=new mt(_0x337512[_0x1733f6]['item']['data'],_0x337512[_0x1733f6]['item']['getAttributes']()),_0x337512[_0x1733f6+0x1]&&'text'===_0x337512[_0x1733f6+0x1]['type']&&_0x349cfe(_0x4b0325,_0x337512[_0x1733f6+0x1]['item'])||(_0x210ed3[0x0]['_appendChild'](_0x4b0325),_0x4b0325=null),_0x168450[_0x168450['length']-0x1]+=_0x337512[_0x1733f6]['item']['offsetSize'],_0x337512[_0x1733f6]['nextPosition']=_0x107429['createPositionFromPath'](_0x2325ff,_0x168450));for(let _0x23556c=0x0;_0x23556c<_0x337512['length'];_0x23556c++){const _0x551363=_0x337512[_0x23556c]['previousPosition'],_0x508f48=_0x337512[_0x23556c]['nextPosition'];for(const _0x378164 of _0x337512[_0x23556c]['markersStart'])_0x5280e7['set'](_0x378164,{'start':_0x551363,'end':null});_0x573d4f('isRemoveSuggestion',_0x23556c,_0x551363,_0x508f48),_0x573d4f('isAddSuggestion',_0x23556c,_0x551363,_0x508f48),_0x573d4f('isRemoved',_0x23556c,_0x551363,_0x508f48),_0x573d4f('isAdded',_0x23556c,_0x551363,_0x508f48);for(const _0x4e6a35 of _0x337512[_0x23556c]['markersEnd']){const _0x3b00d5=_0x5280e7['get'](_0x4e6a35);_0x3b00d5?_0x3b00d5['end']=_0x508f48:_0x5280e7['set'](_0x4e6a35,{'start':_0x508f48,'end':_0x508f48});}}for(const [_0x32f5a0,_0x5ca44a]of _0x5280e7){const _0x3f74f8=this['editor']['model']['createRange'](_0x5ca44a['start'],_0x5ca44a['end']);_0x2325ff['markers']['set'](_0x32f5a0,_0x3f74f8);}return _0x5ae669['sort']((_0x99dcd3,_0x15d0a5)=>{const _0x594a16=_0x2325ff['markers']['get']('revision:'+_0x99dcd3['id']),_0x581617=_0x2325ff['markers']['get']('revision:'+_0x15d0a5['id']);return _0x594a16['start']['isBefore'](_0x581617['start'])?-0x1:_0x594a16['start']['isAfter'](_0x581617['start'])?0x1:_0x594a16['end']['isBefore'](_0x581617['end'])?-0x1:_0x594a16['end']['isAfter'](_0x581617['end'])?0x1:'add'===_0x99dcd3['type']?-0x1:0x1;}),{'root':_0x2325ff,'changes':_0x5ae669};function _0x573d4f(_0x5e5540,_0x422659,_0x4fd936,_0x4a3217){const _0x122592=!!_0x337512[_0x422659][_0x5e5540],_0x4d26c0=_0x122592?_0x337512[_0x422659][_0x5e5540]['userId']:null,_0x5d12c4=_0x422659===_0x337512['length']-0x1,_0x428549=_0x1adf06[_0x5e5540][0x0],_0x3a2ed1=_0xa53d9a['isObject'](_0x337512[_0x422659]['item']);!_0x1f41f6[_0x5e5540]&&_0x122592?_0x1f41f6[_0x5e5540]={'start':_0x4fd936,'tapeItem':_0x337512[_0x422659],'userId':_0x4d26c0,'type':_0x5e5540}:_0x1f41f6[_0x5e5540]&&!_0x122592?(_0x1f41f6[_0x5e5540]['end']=_0x4fd936,_0x4d123b(_0x1f41f6[_0x5e5540]),_0x1f41f6[_0x5e5540]=null):_0x1f41f6[_0x5e5540]&&_0x122592&&_0x1f41f6[_0x5e5540]['userId']!==_0x4d26c0&&(_0x1f41f6[_0x5e5540]['end']=_0x4fd936,_0x428549&&_0x428549['userId']===_0x1f41f6[_0x5e5540]['userId']||_0x4d123b(_0x1f41f6[_0x5e5540]),_0x1f41f6[_0x5e5540]={'start':_0x4fd936,'tapeItem':_0x337512[_0x422659],'userId':_0x4d26c0,'type':_0x5e5540}),_0x1f41f6[_0x5e5540]&&_0x3a2ed1&&('elementStart'!==_0x337512[_0x422659]['type']||_0x428549&&_0x428549['userId']===_0x4d26c0||_0x1adf06[_0x5e5540]['unshift']({'userId':_0x4d26c0,'object':_0x337512[_0x422659]['item'],'change':_0x1f41f6[_0x5e5540]}),'elementEnd'===_0x337512[_0x422659]['type']&&_0x428549&&_0x428549['object']===_0x337512[_0x422659]['item']&&(_0x1adf06[_0x5e5540]['shift'](),_0x1f41f6[_0x5e5540]=_0x428549['change'])),_0x1f41f6[_0x5e5540]&&_0x5d12c4&&(_0x1f41f6[_0x5e5540]['end']=_0x4a3217,_0x4d123b(_0x1f41f6[_0x5e5540]),_0x1f41f6[_0x5e5540]=null);}function _0x4d123b({start:_0x4d55bf,end:_0x45e82d,tapeItem:_0x2bf0e5,userId:_0x46c51e,type:_0x4d8826}){const _0x1be872=_0x2bf0e5['item'],_0x9a7d6=_0x107429['schema']['isBlock'](_0x1be872)&&!_0x107429['schema']['isLimit'](_0x1be872),_0x2938e2=_0x4d55bf['nodeAfter']==_0x45e82d['parent']&&_0x45e82d['isAtStart'];if(_0x9a7d6&&_0x2938e2)return;const _0x1dda9b=_0x107429['createRange'](_0x4d55bf,_0x45e82d),_0x272cd1=_0x4aa98f['get'](_0x46c51e),_0x402c17=new r({'author':_0x272cd1,'type':'isAdded'==_0x4d8826||'isAddSuggestion'==_0x4d8826?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x4d8826||'isRemoveSuggestion'==_0x4d8826},'createdAt':new Date(),'rootName':_0x5d74ad});_0x5ae669['push'](_0x402c17),_0x2325ff['markers']['set']('revision:'+_0x402c17['id'],_0x1dda9b);}function _0x349cfe(_0x4ea160,_0x5d1d04){const _0x7ae8f0=_0x4ea160['getAttributes'](),_0x57f32e=_0x5d1d04['getAttributes']();for(const _0xa1870e of _0x7ae8f0){if(_0xa1870e[0x1]!==_0x5d1d04['getAttribute'](_0xa1870e[0x0]))return!0x1;_0x57f32e['next']();}return _0x57f32e['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x301a15=>{const _0x2628bd=_0x301a15['markerName']['split'](':')[0x1],_0x3e9f0c=this['_getChangeFromId'](_0x2628bd);if(!_0x3e9f0c)return null;const _0x236e24='add'==_0x3e9f0c['type']?'insertion':'deletion',_0xa0d412=['ck-suggestion-marker','ck-suggestion-marker-'+_0x236e24];return _0x3e9f0c['data']['isSuggestion']&&_0xa0d412['push']('ck-suggestion-marker-'+_0x236e24+'-new'),this['activeChange']==_0x3e9f0c&&_0xa0d412['push']('ck-suggestion-marker--active'),{'classes':_0xa0d412,'attributes':{'data-change-id':_0x2628bd}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x69b9d7=>{_0x69b9d7['on']('element:pre',(_0x419ab0,_0x5c25f9,_0x3ca030)=>{const _0xa4c60c=_0x5c25f9['viewItem']['getChild'](0x0);if(!_0xa4c60c||!_0xa4c60c['is']('element','code'))return;if(!_0x3ca030['consumable']['consume'](_0xa4c60c,{'attributes':['vid_start','vid_end']}))return;const _0x216708=_0x5c25f9['modelRange']['start']['nodeAfter'];_0x3ca030['writer']['setAttribute']('vid_start',_0xa4c60c['getAttribute']('vid_start'),_0x216708),_0x3ca030['writer']['setAttribute']('vid_end',_0xa4c60c['getAttribute']('vid_end'),_0x216708);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x19742d=>{_0x19742d['on']('element',(_0x10a24e,_0x3262ef,_0x157949)=>{if(!_0x157949['consumable']['consume'](_0x3262ef['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x3262ef['modelRange']['isCollapsed'])return;const _0x1cb04c=_0x3262ef['modelRange']['start']['nodeAfter'];_0x1cb04c['hasAttribute']('vid_start')||_0x1cb04c['hasAttribute']('vid')||(_0x157949['writer']['setAttribute']('vid_start',_0x3262ef['viewItem']['getAttribute']('vid_start'),_0x1cb04c),_0x157949['writer']['setAttribute']('vid_end',_0x3262ef['viewItem']['getAttribute']('vid_end'),_0x1cb04c));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0xf2dfb5=>_0xf2dfb5['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x415c3f,[,_0x50289])=>{['vid_start','vid_end','vid']['includes'](_0x50289)&&(_0x415c3f['return']=!0x0,_0x415c3f['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x13bdea=>{_0x13bdea['on']('attribute:vid',(_0x50c0df,_0x359959,_0x1a39d5)=>{if('\x20'!=_0x359959['item']['data']||_0x359959['item']['parent']['maxOffset']>0x1)return;if(!_0x1a39d5['consumable']['consume'](_0x359959['item'],_0x50c0df['name']))return;const _0x208a0f=_0x1a39d5['writer'],_0x3cc5eb=_0x1a39d5['mapper']['toViewRange'](_0x359959['range']);_0x208a0f['wrap'](_0x3cc5eb,_0x208a0f['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x192d6c){const _0x3c2d37=_0x192d6c['plugins']['get']('RevisionViewer');return(_0x417d84,_0x53c641,_0x16be74)=>{const _0x36ffe6=_0x53c641['markerName']['split'](':')[0x1],_0x34c5c1=_0x3c2d37['_getChangeFromId'](_0x36ffe6);if(!_0x34c5c1)return null;const _0x1f79ac='add'==_0x34c5c1['type']?'split':'merge';if(!_0x16be74['consumable']['test'](_0x53c641['markerRange'],_0x417d84['name']))return;const _0x51075a=_0x53c641['markerRange']['getWalker'](),_0x28c71f=_0x53c641['markerRange']['start'],_0x12b406=_0x192d6c['model']['schema'];let _0x3a1e2a=null,_0x4c15be=null,_0x395b10=!0x1,_0x524275=!0x1;for(const _0x38979a of _0x51075a){const _0x260d56=_0x38979a['item'];_0x395b10=_0x395b10||_0x12b406['isContent'](_0x260d56);const _0x233035=_0x16be74['mapper']['toViewElement'](_0x260d56);if(_0x233035&&_0x233035['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x38979a['type']&&(_0x12b406['isBlock'](_0x260d56)&&!_0x12b406['isLimit'](_0x260d56)&&(_0x260d56['nextSibling']||_0x28c71f['isAtEnd']?_0x3a1e2a&&_0x3a1e2a['parent']==_0x260d56||(_0x3a1e2a=_0x260d56,_0x5d95bb(_0x38979a['previousPosition']),_0x524275=!0x0):_0x4c15be=_0x4c15be||_0x38979a['previousPosition']));}function _0x5d95bb(_0x34cd6e){const _0x1fd4da=_0x16be74['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x1f79ac}),_0x2e2057=_0x16be74['mapper']['toViewPosition'](_0x34cd6e);_0x34c5c1['data']['isSuggestion']&&_0x16be74['writer']['addClass']('ck-suggestion-marker-'+_0x1f79ac+'-new',_0x1fd4da),_0x3c2d37['activeChange']==_0x34c5c1&&_0x16be74['writer']['addClass']('ck-suggestion-marker--active',_0x1fd4da),_0x16be74['writer']['insert'](_0x2e2057,_0x1fd4da),_0x16be74['mapper']['bindElementToMarker'](_0x1fd4da,_0x53c641['markerName']);}_0x395b10||_0x524275||!_0x4c15be||_0x5d95bb(_0x4c15be);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x25901b,_0x463ac9,_0xb342fc)=>{const _0x213721=_0xb342fc['mapper']['markerNameToElements'](_0x463ac9['markerName']);if(_0x213721){for(const _0x287ae4 of _0x213721)(_0x287ae4['hasClass']('ck-suggestion-marker-split')||_0x287ae4['hasClass']('ck-suggestion-marker-merge'))&&(_0xb342fc['mapper']['unbindElementFromMarkerName'](_0x287ae4,_0x463ac9['markerName']),_0xb342fc['writer']['remove'](_0x287ae4));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x3ea244,_0x371d27,_0x144aaa)=>{const _0x55daa4=_0x371d27['markerName']['split'](':')[0x1],_0x6ac274=this['_getChangeFromId'](_0x55daa4);if(!_0x6ac274)return null;const _0x101922='add'==_0x6ac274['type']?'split':'merge';if(_0x144aaa['consumable']['test'](_0x371d27['markerRange'],_0x3ea244['name']))for(const _0x5050e8 of _0x371d27['markerRange']['getItems']()){if(!_0x5050e8['is']('element','softBreak'))continue;const _0x3a8e29=_0x144aaa['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x101922}),_0x19e1b8=_0x144aaa['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x5050e8));_0x6ac274['data']['isSuggestion']&&_0x144aaa['writer']['addClass']('ck-suggestion-marker-'+_0x101922+'-new',_0x3a8e29),this['activeChange']==_0x6ac274&&_0x144aaa['writer']['addClass']('ck-suggestion-marker--active',_0x3a8e29),_0x144aaa['writer']['insert'](_0x19e1b8,_0x3a8e29),_0x144aaa['mapper']['bindElementToMarker'](_0x3a8e29,_0x371d27['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x4d4055=>{for(const _0x44b7d6 of this['editor']['model']['document']['getRootNames']()){const _0x56b45b=this['editor']['model']['document']['getRoot'](_0x44b7d6),_0x4fecb8=this['editor']['editing']['view']['document']['getRoot'](_0x44b7d6);if(_0x4fecb8){const _0x353bb4=_0x56b45b['getAttribute']('revisionHistoryAttachChange');if(_0x4d4055['removeAttribute']('data-change-id',_0x4fecb8),_0x4d4055['removeClass']('ck-revision-history-root-add',_0x4fecb8),_0x4d4055['removeClass']('ck-revision-history-root-remove',_0x4fecb8),_0x4d4055['removeClass']('ck-revision-history-root--active',_0x4fecb8),_0x353bb4){const _0x5e0e61=this['_getChangeFromId'](_0x353bb4);if(!_0x5e0e61)return null;_0x4d4055['setAttribute']('data-change-id',_0x353bb4,_0x4fecb8),_0x4d4055['addClass']('ck-revision-history-root-'+_0x5e0e61['type'],_0x4fecb8),this['activeChange']==_0x5e0e61&&_0x4d4055['addClass']('ck-revision-history-root--active',_0x4fecb8);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x4bce34=>'revision-comment:'+_0x4bce34,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x9e8618=>'revision-suggestion:'+_0x9e8618,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x186524=>({'name':'suggestion:'+_0x186524,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x102d5a=>{const _0x4de864=_0x102d5a['markerName']['split'](':')[0x1];return'insertion'!=_0x4de864&&'deletion'!=_0x4de864?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x4de864]};}}),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',(_0x2e8900,_0x586bd6,_0x31fb19)=>{const _0x496796=_0x31fb19['mapper']['markerNameToElements'](_0x586bd6['markerName']);if(_0x496796){for(const _0xb550e7 of _0x496796)_0xb550e7['is']('uiElement')&&(_0x31fb19['mapper']['unbindElementFromMarkerName'](_0xb550e7,_0x586bd6['markerName']),_0x31fb19['writer']['remove'](_0xb550e7));}},{'priority':'high'});}['_getChangeFromId'](_0x28acca){return this['_changeIdToChange']['get'](_0x28acca);}['_getViewForChange'](_0xfbed57){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Q(this['editor']['locale'],_0xfbed57),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x37bf6d,_0x1fbf2d,_0x4ab901,_0x3526c0)=>{_0x3526c0&&this['_balloon']['remove'](_0x3526c0),_0x4ab901&&(this['_balloon']['add']({'view':_0x4ab901,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x399cc1=this['editor']['editing'],_0x1e8d72=this['_getChangeFromId'](_0x4ab901['changeId']);let _0x570d12;if(_0x1e8d72['data']['isOnRoot']){const _0x598906=_0x399cc1['view']['getDomRoot'](_0x1e8d72['rootName']);_0x570d12=Array['from'](_0x598906['getClientRects']());}else{const _0xe52a5d=this['editor']['model']['markers']['get']('revision:'+_0x4ab901['changeId']);_0x570d12=Array['from'](_0x399cc1['mapper']['markerNameToElements'](_0xe52a5d['name']))['map'](_0x1585be=>_0x399cc1['view']['domConverter']['mapViewToDom'](_0x1585be))['map'](_0xa0efe6=>Array['from'](_0xa0efe6['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x570d12[0x0];return _0x570d12['find'](_0x4798a3=>_0x4798a3['top']-0x3<=this['_activeViewTarget']['y']&&_0x4798a3['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x4798a3['left']-0x3<=this['_activeViewTarget']['x']&&_0x4798a3['right']+0x3>=this['_activeViewTarget']['x'])||_0x570d12[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x4acae1,_0x23eb4e,_0x4f7b98,_0x1def0a)=>{this['activeView']=_0x4f7b98?this['_getViewForChange'](_0x4f7b98):null,this['editor']['model']['change'](()=>{const _0x40468c=this['editor']['editing'];_0x1def0a&&(_0x1def0a['data']['isOnRoot']?_0x40468c['view']['change'](_0x124618=>{_0x124618['removeClass']('ck-revision-history-root--active',_0x40468c['view']['document']['getRoot'](_0x1def0a['rootName']));}):_0x40468c['reconvertMarker']('revision:'+_0x1def0a['id'])),_0x4f7b98&&(_0x4f7b98['data']['isOnRoot']?_0x40468c['view']['change'](_0x2b7d39=>{_0x2b7d39['addClass']('ck-revision-history-root--active',_0x40468c['view']['document']['getRoot'](_0x4f7b98['rootName']));}):_0x40468c['reconvertMarker']('revision:'+_0x4f7b98['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x5db80d,_0x1698d6)=>{if(this['activeChange'])return;const _0x1a66b0=this['_findChangeIdFromDomTarget'](_0x1698d6['target']),_0x25816b=this['_changeIdToChange']['get'](_0x1a66b0);_0x25816b?(this['_activeViewTarget']={'x':_0x1698d6['domEvent']['x'],'y':_0x1698d6['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x25816b)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x5a880a,_0x553472)=>{const _0x1074fd=this['_findChangeIdFromDomTarget'](_0x553472['target']),_0x14c24d=this['_changeIdToChange']['get'](_0x1074fd);_0x14c24d?(this['_activeViewTarget']={'x':_0x553472['domEvent']['x'],'y':_0x553472['domEvent']['y']},_0x14c24d===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x14c24d):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x5f4cf5){do{const _0x23e303=_0x5f4cf5['getAttribute']('data-change-id');if(_0x23e303)return _0x23e303;_0x5f4cf5=_0x5f4cf5['parent'];}while(_0x5f4cf5);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x41defa=>{for(const _0x374d73 of this['editor']['model']['markers'])_0x41defa['removeMarker'](_0x374d73);});}}function X(_0x2cea79,_0x5693aa){return(_0x44d232,_0x3ffcec,_0xe13e75)=>{if(!_0xe13e75['consumable']['test'](_0x3ffcec['markerRange'],_0x44d232['name']))return;const _0x14a3a8=_0x3ffcec['markerRange']['getWalker'](),_0x3d9007=_0x3ffcec['markerRange']['start'],_0x22cbf7=_0x2cea79['model']['schema'];let _0x135fc6=null,_0x2ab30b=null,_0x4acaf3=!0x1,_0x2a5152=!0x1;for(const _0x3829f0 of _0x14a3a8){const _0x149c66=_0x3829f0['item'];_0x4acaf3=_0x4acaf3||_0x22cbf7['isContent'](_0x149c66);const _0x10b63f=_0xe13e75['mapper']['toViewElement'](_0x149c66);if(_0x10b63f&&_0x10b63f['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x3829f0['type']&&(_0x22cbf7['isBlock'](_0x149c66)&&!_0x22cbf7['isLimit'](_0x149c66)&&(_0x149c66['nextSibling']||_0x3d9007['isAtEnd']?_0x135fc6&&_0x135fc6['parent']==_0x149c66||(_0x135fc6=_0x149c66,_0x47b84c(_0x3829f0['previousPosition']),_0x2a5152=!0x0):_0x2ab30b=_0x2ab30b||_0x3829f0['previousPosition']));}function _0x47b84c(_0x5595db){const _0x473b5b=_0xe13e75['mapper']['toViewPosition'](_0x5595db),_0x3c19f7=_0xe13e75['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x5693aa});_0xe13e75['writer']['insert'](_0x473b5b,_0x3c19f7),_0xe13e75['mapper']['bindElementToMarker'](_0x3c19f7,_0x3ffcec['markerName']);}_0x4acaf3||_0x2a5152||!_0x2ab30b||_0x47b84c(_0x2ab30b);};}class wt extends _0x180cbd{constructor(_0x58da1f){super(_0x58da1f);const _0x1615d8=_0x58da1f['plugins']['get'](m);this['affectsData']=!0x1,this['listenTo'](_0x1615d8,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x1615d8,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x57ea39=this['editor'],_0x599f97=_0x57ea39['plugins']['get'](m),_0x56642c=_0x599f97['isReady']?_0x599f97['diff']['newRevisionId']:null;_0x57ea39['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x56642c);}['refresh'](){const {isReady:_0x42d4d3,isEnabled:_0x5052b1,repository:_0x547fe4,diff:_0x239f0e}=this['editor']['plugins']['get'](m),_0x1254ad=_0x239f0e&&_0x547fe4['getLaterVisibleRevision'](_0x239f0e['newRevisionId']);this['isEnabled']=_0x42d4d3&&_0x5052b1&&Boolean(_0x1254ad);}}class pt extends _0x180cbd{['_step'];constructor(_0x2930b8,{direction:_0x376795}){super(_0x2930b8);const _0x365781=_0x2930b8['plugins']['get'](m);this['affectsData']=!0x1,this['_step']='forward'===_0x376795?0x1:-0x1,this['listenTo'](_0x365781,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x365781,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x365781,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x21777d=this['editor'],_0x2441b3=_0x21777d['plugins']['get'](m),{isNavigationMode:_0xbdfa40,currentChangeNumber:_0xefddc9}=_0x2441b3;let _0x20f5e0;if(_0x2441b3['activeChange']=_0xbdfa40?_0x2441b3['diff']['changes']['get'](_0xefddc9+this['_step']):_0x2441b3['diff']['changes']['first'],_0x2441b3['activeChange']['data']['isOnRoot'])_0x20f5e0=_0x21777d['editing']['view']['getDomRoot'](_0x2441b3['activeChange']['rootName']);else{const _0x5b6673=_0x21777d['model']['markers']['get']('revision:'+_0x2441b3['activeChange']['id']);_0x20f5e0=_0x91cb6f(_0x21777d['editing'],_0x5b6673);}_0x55b855({'target':_0x20f5e0,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x3c7b89,currentChangeNumber:_0x1d0c19,numberOfChanges:_0x505187,isReady:_0x30119a,isEnabled:_0x59e194}=this['editor']['plugins']['get'](m);this['isEnabled']=!!(_0x59e194&&_0x30119a&&_0x505187)&&(!_0x3c7b89||(0x1===this['_step']?_0x1d0c19<_0x505187-0x1:_0x1d0c19>0x0));}}class _i extends _0x3c4eb7{constructor(_0x188f9a){super(_0x188f9a);const _0x18db88=this['bindTemplate'],_0x1a5fb9=new _0x2e6643(_0x188f9a),_0xe639b9=new _0x2e6643(_0x188f9a);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',(_0x28868a,_0x4d3b84)=>_0x28868a&&_0x4d3b84>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x24e4f5,_0x3a4561,_0x1a767b,_0x1f9540)=>{if(!_0x24e4f5)return g(_0x188f9a,'Loading...');if(!_0x1a767b)return g(_0x188f9a,'No\x20changes');const _0x32130d=g(_0x188f9a,'NUMBER_OF_CHANGES',_0x1a767b);return _0x1f9540?g(_0x188f9a,'X_OF_Y_CHANGES',[_0x3a4561+0x1,_0x1a767b]):_0x32130d;}),_0x1a5fb9['set']({'label':g(_0x188f9a,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x3f13b7}),_0xe639b9['set']({'label':g(_0x188f9a,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x5ad88d}),_0x1a5fb9['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0xe639b9['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x1a5fb9['on']('execute',()=>this['fire']('execute','backward')),_0xe639b9['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',_0x18db88['if']('_isStatusLabelVisible','ck-hidden',_0x1d1e3f=>!_0x1d1e3f)]},'children':[{'text':_0x18db88['to']('isNavigationMode',_0x5e5e1e=>_0x5e5e1e?g(_0x188f9a,'EDIT_X_OF_Y_REVISIONS')+':\x20':g(_0x188f9a,'Total')+':\x20')}]},{'text':_0x18db88['to']('_statusText')}]},new _0x31076d(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x1a5fb9,_0xe639b9]}]});}}const ce='ck-editor__editable__loading-overlay';class le extends _0x4489ae{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x26acd9=this['editor']['editing']['view'];_0x26acd9['change'](_0x447b16=>{for(const _0x17f853 of _0x26acd9['document']['roots'])_0x447b16['addClass'](ce,_0x17f853);});}['hide'](){const _0x2ebf26=this['editor']['editing']['view'];_0x2ebf26['change'](_0x178865=>{for(const _0x96a884 of _0x2ebf26['document']['roots'])_0x178865['removeClass'](ce,_0x96a884);});}}class R extends _0x4489ae{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[m,le];}['init'](){const _0x2c2184=this['editor'],_0x89ce=_0x2c2184['plugins']['get'](m),_0x479b19=_0x2c2184['plugins']['get'](le);_0x2c2184['ui']['componentFactory']['add']('exitToEditing',_0x33c346=>{const _0x55dbaa=new _0x2e6643(_0x33c346);return _0x55dbaa['set']({'label':g(_0x33c346,'Back\x20to\x20editing'),'icon':_0x1b0aa9,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x55dbaa,'execute',()=>{_0x2c2184['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x55dbaa;}),_0x2c2184['ui']['componentFactory']['add']('restoreRevision',_0xe522f1=>{const _0x52dbfa=new _0x2e6643(_0xe522f1);return _0x52dbfa['set']({'label':g(_0xe522f1,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x52dbfa['bind']('isEnabled')['to'](_0x2c2184['commands']['get']('restoreRevision')),this['listenTo'](_0x52dbfa,'execute',()=>_0x2c2184['execute']('restoreRevision')),_0x52dbfa;}),_0x2c2184['ui']['componentFactory']['add']('changesNavigation',_0xcf84cc=>{const _0x5f0a6e=new _i(_0xcf84cc),_0x402711=_0x2c2184['commands']['get']('showPreviousChange'),_0x17ab3c=_0x2c2184['commands']['get']('showNextChange');return _0x5f0a6e['bind']('isBackwardNavigationEnabled')['to'](_0x402711,'isEnabled'),_0x5f0a6e['bind']('isForwardNavigationEnabled')['to'](_0x17ab3c,'isEnabled'),_0x5f0a6e['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x89ce),this['listenTo'](_0x5f0a6e,'execute',(_0xba9f2e,_0x3342ad)=>{_0x2c2184['execute']('forward'===_0x3342ad?'showNextChange':'showPreviousChange');}),_0x5f0a6e;}),_0x479b19['show'](),_0x89ce['on']('change:isReady',(_0x133492,_0x110761,_0x5d85dd)=>{_0x5d85dd?_0x479b19['hide']():_0x479b19['show']();});}}class lt extends nt{['_resizeObserver']=null;constructor(_0x1b5cce,_0xd3b92d){super(_0x1b5cce,_0xd3b92d);const _0x494038=this['bindTemplate'];this['set']({'label':g(_0x1b5cce,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=g(_0x1b5cce,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x494038['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 _0x1a67e6=this['fieldView']['element'];this['_tooltipString']=_0x1a67e6['scrollWidth']>_0x1a67e6['clientWidth']&&_0x1a67e6['value']||'';}}class oi extends _0x3c4eb7{constructor(_0x4acb3b,_0x42e297,_0x8dd978){super(_0x4acb3b);const _0x1a5257=new _0x3266ad();_0x1a5257['set']({'content':_0x636f70,'viewBox':'0\x200\x2011\x2010'});const _0x3cff55=['ck','ck-revision-history-sidebar__revision-author'];_0x8dd978&&_0x3cff55['push']('ck-revision-history-sidebar__revision-author_creator');const _0x22d4d3=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':g(_0x4acb3b,_0x8dd978?'Revision\x20creator':'Revision\x20author')},'children':[_0x1a5257,_0x42e297['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x3cff55},'children':_0x22d4d3});}}function ni(_0x49828a,_0x28cfd5){const _0x419f9e=_0x49828a['bindTemplate'],_0x483c9b=_0x49828a['locale'],_0x1a55c9=_0x387160(_0x483c9b);_0x1a55c9['panelPosition']='sw';const _0x587ffe=function(_0x18c03a,_0x3967f){const _0x32156f=function(_0x1ef66e,_0x59d44f){const _0xcbdbeb=_0x1ef66e['locale'],_0x4d15a5={'Compare\x20against\x20selected':g(_0xcbdbeb,'Compare\x20against\x20selected'),'Name\x20this\x20revision':g(_0xcbdbeb,'Name\x20this\x20revision'),'Restore\x20this\x20revision':g(_0xcbdbeb,'Restore\x20this\x20revision')};return _0x59d44f['map'](_0x5ce1cb=>{const _0x1f2d90=_0x4d15a5[_0x5ce1cb['name']];return _0x1f2d90&&_0x1f2d90!==_0x5ce1cb['name']&&(_0x5ce1cb['name']=_0x1f2d90),_0x5ce1cb;});}(_0x18c03a,_0x3967f),_0x12e4b7=new _0x1301ad();for(const _0x11f561 of _0x32156f){const _0x116d0e={'type':'button','model':new to({'label':_0x11f561['name'],'class':_0x11f561['class'],'withText':!0x0,'role':'menuitem','_action':_0x11f561['action']})};_0x116d0e['model']['bind']('isEnabled')['to'](_0x18c03a,'isActionsDropdownOpen',_0x52393a=>'function'!=typeof _0x11f561['isEnabled']||(!_0x52393a||_0x11f561['isEnabled'](_0x18c03a))),_0x12e4b7['add'](_0x116d0e);}return _0x12e4b7;}(_0x49828a,_0x28cfd5);return _0x49828a['bind']('isActionsDropdownOpen')['to'](_0x1a55c9,'isOpen'),_0x1a55c9['buttonView']['set']({'label':g(_0x483c9b,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x47c6f0}),_0x1a55c9['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x419f9e['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x419f9e['to'](_0x4a0268=>_0x4a0268['stopPropagation']())}}),_0x1a55c9['on']('execute',_0x5ce068=>{_0x49828a['isReady']&&'function'==typeof _0x5ce068['source']['_action']&&_0x5ce068['source']['_action'](_0x49828a);}),_0x12319e(_0x1a55c9,_0x587ffe,{'role':'menu'}),_0x1a55c9['listenTo'](_0x49828a,'change:isActionsDropdownOpen',(_0x2bfba1,_0x9cece4,_0x2179de)=>{if(_0x2179de)for(const _0x421e3e of _0x1a55c9['listView']['items']){const _0x38527e=_0x421e3e['children']['first'],_0x2432b1=_0x28cfd5['find'](_0x35ecd8=>_0x35ecd8['action']===_0x38527e['_action'])['isVisible'];_0x421e3e['isVisible']=void 0x0===_0x2432b1||_0x2432b1(_0x49828a);}}),_0x1a55c9;}class ai extends/* #__PURE__ -- @preserve */
26
- _0x180a86(_0x3c4eb7){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x191b33,_0xf349c8,_0xc414e,_0x168a90){super(_0x191b33);const _0x404df5=this['bindTemplate'],_0xa3b725=function(_0x5bfd20,_0x1b9a9b){const _0x505ab2=Array['from'](_0x1b9a9b['authors'])['filter'](_0x82a1d0=>_0x82a1d0!=_0x1b9a9b['creator']);return _0x1b9a9b['creator']&&_0x505ab2['unshift'](_0x1b9a9b['creator']),_0x505ab2['map'](_0x2c0ba5=>new oi(_0x5bfd20,_0x2c0ba5,_0x2c0ba5==_0x1b9a9b['creator']));}(_0x191b33,_0xf349c8);this['id']=_0xf349c8['id'],this['_revision']=_0xf349c8,this['_requireRevisionName']=_0x168a90,this['bind']('name','createdAt')['to'](_0xf349c8),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x5662f2=>{return _0x52e352=_0x191b33['uiLanguage'],(_0x172ee6=_0x5662f2)['toLocaleDateString'](_0x52e352,{'month':'long','day':'numeric'})+',\x20'+_0x172ee6['toLocaleTimeString'](_0x52e352,{'hour':'numeric','minute':'numeric'});var _0x52e352,_0x172ee6;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new lt(_0x191b33,ti),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x26c073=>_0x26c073||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x38f594,_0x3b9a31)=>_0x38f594&&_0x3b9a31),this['revisionActionsView']=_0xc414e&&_0xc414e['length']?ni(this,_0xc414e):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x404df5['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x404df5['if']('isEnabled','ck-disabled',_0x3df9ed=>!_0x3df9ed),_0x404df5['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x404df5['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x404df5['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':_0x404df5['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':_0xa3b725}]},this['revisionActionsView']],'on':{'click':_0x404df5['to'](_0x7af1d1=>{_0x7af1d1['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x3aa462=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x3aa462,'change',()=>{this['_requireRevisionName']&&!_0x3aa462['value']||this['fire']('setName',{'id':this['id'],'name':_0x3aa462['value']}),_0x3aa462['value']||(_0x3aa462['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(_0x326464,_0x534c31){const _0x56f5ac=_0x2f423f['fromJSDate'](_0x326464)['setLocale'](_0x534c31),_0x590328=_0x2f423f['local'](),_0x2aae4a=_0x590328['minus']({'days':0x1})['startOf']('day');let _0x119b5c,_0x4b0c1a;return _0x56f5ac['hasSame'](_0x590328,'day')?(_0x119b5c=_0x56f5ac['startOf']('day')['toJSDate'](),_0x4b0c1a=_0x56f5ac['toRelativeCalendar']()):_0x56f5ac['hasSame'](_0x2aae4a,'day')?(_0x119b5c=_0x2aae4a['toJSDate'](),_0x4b0c1a=_0x56f5ac['toRelativeCalendar']()):_0x56f5ac['hasSame'](_0x590328,'week')?(_0x119b5c=_0x56f5ac['startOf']('week')['toJSDate'](),_0x4b0c1a=_0x56f5ac['weekdayLong']||''):_0x56f5ac['hasSame'](_0x590328,'year')?(_0x119b5c=_0x56f5ac['startOf']('month')['toJSDate'](),_0x4b0c1a=_0x56f5ac['monthLong']||''):(_0x119b5c=_0x56f5ac['startOf']('year')['toJSDate'](),_0x4b0c1a=String(_0x56f5ac['year'])),{'startDate':_0x119b5c,'localizedPeriodName':_0x4b0c1a};}class mi extends _0x3c4eb7{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x14e63f,_0xbe5d23,_0x27bbde,_0x23ad8b){super(_0x14e63f);const _0x359e81=vi(_0xbe5d23,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0xbe5d23,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x27bbde,this['_requireRevisionName']=_0x23ad8b,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':_0x359e81}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x346c){const _0x1a1041=new ai(this['locale'],_0x346c,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x1a1041);}['removeRevision'](_0x10bb8e){const _0x514ba8=this['revisionViews']['find'](_0x176c3a=>_0x176c3a['id']===_0x10bb8e['id']);this['revisionViews']['remove'](_0x514ba8);}}class as extends _0x3c4eb7{constructor(_0x65ce33){super(_0x65ce33);const _0x1f9a48=new _0x3266ad();_0x1f9a48['content']=_0x25d66f,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x1f9a48,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[g(_0x65ce33,'Revision\x20history')]}]});}}class di extends _0x3c4eb7{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x28df0d,_0xced98a,_0x9b9ba5,_0x33cd68){super(_0x28df0d);const _0x5aa395=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0xced98a,this['_revisionActions']=_0x9b9ba5,this['_requireRevisionName']=_0x33cd68,this['on']('select',(_0x4f2ec6,_0x1e9cce)=>{this['fire']('revisionSelected',_0x1e9cce);}),this['on']('setName',(_0x5ada68,_0x5c537a)=>{this['fire']('revisionSetName',_0x5c537a);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new as(_0x28df0d),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x5aa395['if']('isEnabled','ck-disabled',_0x26f66f=>!_0x26f66f)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x186057 of this['_revisions'])this['_addRevision'](_0x186057);this['_revisions']['on']('add',(_0x5b85de,_0x20a743)=>{this['_addRevision'](_0x20a743);}),this['_revisions']['on']('remove',(_0x474a40,_0x20a450)=>{this['_removeRevision'](_0x20a450);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x52187d=>_0x52187d['revisionViews']['map'](_0x588e7c=>_0x588e7c))['flat']();}['selectRevision'](_0x57f88a){for(const _0x332b4d of this['revisionViews'])_0x57f88a&&_0x57f88a['id']===_0x332b4d['id']?_0x332b4d['select']():_0x332b4d['deselect']();}['highlightRevisions'](_0x441f3a){for(const _0x494574 of this['revisionViews'])_0x441f3a['some'](({id:_0x280ea7})=>_0x280ea7===_0x494574['id'])?_0x494574['highlight']():_0x494574['unhighlight']();}['_addRevision'](_0x1745f2){const _0x34f7d5=vi(_0x1745f2['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x13a7cc=this['timePeriodViews']['get'](0x0);_0x13a7cc&&_0x13a7cc['startDate']['getTime']()===_0x34f7d5['getTime']()||(_0x13a7cc=new mi(this['locale'],_0x34f7d5,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x13a7cc)),_0x13a7cc['addRevision'](_0x1745f2);}['_removeRevision'](_0x2ca5b5){const _0x49ada2=vi(_0x2ca5b5['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x49ada2)['removeRevision'](_0x2ca5b5);}['_getTimePeriodViewByStartDate'](_0x4750f0){return this['timePeriodViews']['find'](_0x3532fe=>_0x3532fe['startDate']['getTime']()===_0x4750f0['getTime']());}}class d extends _0x4489ae{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
23
+ import{ObservableMixin as _0x3fd0d6,uid as _0x423624,Collection as _0x5c68d2,logWarning as _0x970719,FocusTracker as _0x5c6e07,KeystrokeHandler as _0x1c65d2,scrollViewportToShowTarget as _0x389bf5,ResizeObserver as at,ElementReplacer as ot,CKEditorError as _0x164733}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0xf4506f,set as _0x2fdf23,unset as _0x9cf60a,isEqual as _0x3b0ba1}from'es-toolkit/compat';import{Plugin as _0x4eb38d,PendingActions as _0x38da1f,Command as _0x1baf86,ElementApiMixin as _0x155746,Editor as _0x1e2b0c}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x266938,getMarkerDomElement as _0x4b86d3,ConfirmMixin as _0x1c922f,sanitizeEditorConfig as _0x475b27}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0x409962,ViewAttributeElement as _0x503f33,ViewEmptyElement as _0x2d2880,ViewRawElement as _0x4eedab,ViewUIElement as _0xcc1b16,ViewDocumentFragment as _0x5e4606,ViewText as _0x517936,ViewElement as _0x33b42d,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 _0x2f0552,IconChevronUp as _0x422ec8,IconChevronDown as _0x233b7f,IconUndo as _0x566aea,IconUser as _0x40b491,IconThreeVerticalDots as _0xfbc26d}from'@ckeditor/ckeditor5-icons/dist/index.js';import{View as _0x745a8d,injectCssTransitionDisabler as ts,submitHandler as _0x1f975a,LabeledFieldView as nt,createLabeledInputText as ti,createDropdown as _0x2fa9d9,ListView as _0x226ede,ListItemView as te,ButtonView as _0x537db8,MenuBarMenuView as _0x356cb3,MenuBarMenuListView as _0x28cf76,MenuBarMenuListItemView as _0x3e7b64,MenuBarMenuListItemButtonView as _0x514805,ContextualBalloon as _0x1b49dd,ToolbarSeparatorView as _0x4ec420,IconView as _0x22f298,addListToDropdown as _0x49e3dc,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 _0x9c31d5}from'luxon';class h extends/* #__PURE__ -- @preserve */
24
+ _0x3fd0d6(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x37f2a6){super(),this['id']=_0x37f2a6['id']||_0x423624(),this['creator']=_0x37f2a6['creator']||null,this['authors']=_0x37f2a6['authors']||[],this['diffData']=_0x37f2a6['diffData']||null,this['toVersion']=_0x37f2a6['toVersion']||0x0,this['fromVersion']=_0x37f2a6['fromVersion']||0x0,this['set']('name',_0x37f2a6['name']||''),this['set']('createdAt',_0x37f2a6['createdAt']||new Date()),this['set']('attributes',_0x37f2a6['attributes']||{});}['setName'](_0x1d6dd7){this['_update']({'name':_0x1d6dd7});}['setAttribute'](_0x4e82c4,_0x2f3e39){const _0x732ff1=_0xf4506f(this['attributes']);_0x2fdf23(_0x732ff1,_0x4e82c4,_0x2f3e39),this['_update']({'attributes':_0x732ff1});}['removeAttribute'](_0x4e5a77){const _0x3eff36=_0xf4506f(this['attributes']);_0x9cf60a(_0x3eff36,_0x4e5a77),this['_update']({'attributes':_0x3eff36});}['_update'](_0x3da51d,_0x5a6ca8=!0x1){let _0x5000ff=!0x1;const _0xf80b65={'id':this['id']},_0x40145e=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x304d08 of _0x40145e){const _0x3e1885=_0x3da51d[_0x304d08];void 0x0!==_0x3e1885&&_0x3e1885!==this[_0x304d08]&&(this[_0x304d08]=_0x3e1885,_0xf80b65[_0x304d08]=_0x3e1885,_0x5000ff=!0x0);}_0x5000ff&&(_0xf80b65['authors']&&(_0xf80b65['authorsIds']=_0xf80b65['authors']['map'](_0x1406a1=>_0x1406a1['id']),delete _0xf80b65['authors']),this['fire']('_update',_0xf80b65,_0x5a6ca8));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x41262c=>_0x41262c['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class I extends _0x4eb38d{['_revisions'];static get['requires'](){return[_0x266938];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x32d066){super(_0x32d066),this['_revisions']=new _0x5c68d2();}['afterInit'](){!async function(_0x13b144){const _0x118e7a=_0x3d175a([0x67,0x50,0x73,0x6c,0x5a,0x63,0x55,0x71,0x61,0x6f,0x6d,0x4c,0x4f,0x38,0x72,0x4b,0x4a,0x65,0x68,0x45,0x47,0x54,0x7a,0x70,0x59,0x6b,0x44,0x74,0x43,0x39,0x78,0x32,0x75,0x30,0x6a,0x56,0x4d,0x49,0x66,0x53,0x69,0x52,0x57,0x36,0x62,0x31,0x37,0x35,0x41,0x77,0x58,0x4e,0x76,0x51,0x48,0x6e,0x46,0x42,0x34,0x79,0x33,0x64]),_0x383717=0xeb829,_0x1b58bd=0x3eb6c35d,_0x349a0d=0x3eb1a7fd^_0x1b58bd,_0x41467c=window[_0x3d175a([0x44,0x61,0x74,0x65])][_0x3d175a([0x6e,0x6f,0x77])](),_0x104d21=_0x13b144[_0x3d175a([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x58c798=new window[(_0x3d175a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x206471=>{_0x104d21[_0x3d175a([0x6f,0x6e,0x63,0x65])](_0x3d175a([0x72,0x65,0x61,0x64,0x79]),_0x206471);}),_0x20d53f={[_0x3d175a([0x6b,0x74,0x79])]:_0x3d175a([0x45,0x43]),[_0x3d175a([0x75,0x73,0x65])]:_0x3d175a([0x73,0x69,0x67]),[_0x3d175a([0x63,0x72,0x76])]:_0x3d175a([0x50,0x2d,0x32,0x35,0x36]),[_0x3d175a([0x78])]:_0x3d175a([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]),[_0x3d175a([0x79])]:_0x3d175a([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]),[_0x3d175a([0x61,0x6c,0x67])]:_0x3d175a([0x45,0x53,0x32,0x35,0x36])},_0x17b0c5=_0x104d21[_0x3d175a([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x3d175a([0x67,0x65,0x74])](_0x3d175a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x4cacac(){let _0x1f25e1,_0x36c18f=null,_0x263fc8=null;try{if(_0x17b0c5==_0x3d175a([0x47,0x50,0x4c]))return _0x3d175a([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1f25e1=_0x4408d3(),!_0x1f25e1)return _0x3d175a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1f25e1[_0x3d175a([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x263fc8=_0x503be2(_0x1f25e1[_0x3d175a([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1f25e1[_0x3d175a([0x6a,0x74,0x69])])),await _0x36f165()?_0x33301a()?_0x4be595()?_0x3d175a([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0xd1c869()?(_0x1f25e1[_0x3d175a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3d175a([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x36c18f=_0x1668ae(_0x3d175a([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1f25e1[_0x3d175a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3d175a([0x74,0x72,0x69,0x61,0x6c])&&(_0x36c18f=_0x1668ae(_0x3d175a([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x31e6f9()):_0x3d175a([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x3d175a([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x3d175a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0xeff243){return _0x3d175a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4be595(){const _0x4e958e=[_0x3d175a([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x3d175a([0x74,0x72,0x69,0x61,0x6c])][_0x3d175a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1f25e1[_0x3d175a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x41467c/0x3e8:0xe10*_0x349a0d;return _0x1f25e1[_0x3d175a([0x65,0x78,0x70])]<_0x4e958e;}function _0x33301a(){const _0x5dda07=_0x1f25e1[_0x3d175a([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x5dda07)return!0x1;if(_0x5dda07[_0x3d175a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3d175a([0x2a])))return!0x0;if(_0x5dda07[_0x3d175a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3d175a([0x52,0x48])))return!0x0;if(_0x5dda07[_0x3d175a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3d175a([0x52,0x52,0x48]))){if(_0x2c6bde())return!0x0;if(_0x1acb3c()||_0x8a6820())return!0x0;}return!0x1;}function _0xd1c869(){const _0x471f8b=_0x1f25e1[_0x3d175a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x471f8b||0x0==_0x471f8b[_0x3d175a([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5dd65c}=new URL(window[_0x3d175a([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x471f8b[_0x3d175a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5dd65c))return!0x0;const _0x230e4a=_0x5dd65c[_0x3d175a([0x73,0x70,0x6c,0x69,0x74])](_0x3d175a([0x2e]));return _0x471f8b[_0x3d175a([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x93023e=>_0x93023e[_0x3d175a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3d175a([0x2a])))[_0x3d175a([0x6d,0x61,0x70])](_0x5d43b0=>_0x5d43b0[_0x3d175a([0x73,0x70,0x6c,0x69,0x74])](_0x3d175a([0x2e])))[_0x3d175a([0x73,0x6f,0x6d,0x65])](_0x33f8d7=>_0x230e4a[_0x3d175a([0x65,0x76,0x65,0x72,0x79])]((_0xcff66c,_0x189e23)=>_0x33f8d7[_0x189e23]===_0xcff66c||_0x33f8d7[_0x189e23]===_0x3d175a([0x2a])));}function _0x31e6f9(){return _0x36c18f&&_0x263fc8?new window[(_0x3d175a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xecbc7b,_0x498738)=>{_0x36c18f[_0x3d175a([0x74,0x68,0x65,0x6e])](_0xecbc7b,_0x498738),_0x263fc8[_0x3d175a([0x74,0x68,0x65,0x6e])](_0x598de0=>{_0x598de0!=_0x3d175a([0x56,0x61,0x6c,0x69,0x64])&&_0xecbc7b(_0x598de0);},_0x498738);}):_0x36c18f||_0x263fc8||_0x3d175a([0x56,0x61,0x6c,0x69,0x64]);}}function _0x503be2(_0x3bd9f4,_0x426448){return new window[(_0x3d175a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x242474=>{if(_0x2d2ce1())return _0x242474(_0x3d175a([0x56,0x61,0x6c,0x69,0x64]));_0x58f7ba(),_0x104d21[_0x3d175a([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x3d175a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x5ef6bf=!0x1;const _0x3e40b4=_0x423624();function _0x4b79d5(_0x70203){return!!_0x70203&&(typeof _0x70203===_0x3d175a([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x70203===_0x3d175a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x70203[_0x3d175a([0x74,0x68,0x65,0x6e])]===_0x3d175a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x70203[_0x3d175a([0x63,0x61,0x74,0x63,0x68])]===_0x3d175a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x18a0c6(_0x216479){_0x447f06(_0x216479)[_0x3d175a([0x74,0x68,0x65,0x6e])](_0x16bd3d=>{if(!_0x16bd3d||_0x16bd3d[_0x3d175a([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x3d175a([0x6f,0x6b]))return _0x3d175a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3a493e(_0x5f4e47(_0x3e40b4+_0x426448))!=_0x16bd3d[_0x3d175a([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x3d175a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x3d175a([0x56,0x61,0x6c,0x69,0x64]);})[_0x3d175a([0x74,0x68,0x65,0x6e])](_0x42ac07=>(_0x2930ce(),_0x42ac07),()=>{const _0x319b7b=_0x3be691();return null==_0x319b7b?(_0x2930ce(),_0x3d175a([0x56,0x61,0x6c,0x69,0x64])):_0x3d175a(_0x41467c-_0x319b7b>(0x1aba475d^_0x1b58bd)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x3d175a([0x74,0x68,0x65,0x6e])](_0x242474)[_0x3d175a([0x63,0x61,0x74,0x63,0x68])](()=>{_0x242474(_0x3d175a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x481356=0x3e802ddd^_0x1b58bd;function _0x2930ce(){const _0x187e42=_0x3d175a([0x6c,0x6c,0x63,0x74,0x2d])+_0x3a493e(_0x5f4e47(_0x3bd9f4)),_0x24fc13=_0x2c5767(_0x3a493e(window[_0x3d175a([0x4d,0x61,0x74,0x68])][_0x3d175a([0x63,0x65,0x69,0x6c])](_0x41467c/_0x481356)));window[_0x3d175a([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3d175a([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x187e42,_0x24fc13);}function _0x3be691(){const _0x54c463=_0x3d175a([0x6c,0x6c,0x63,0x74,0x2d])+_0x3a493e(_0x5f4e47(_0x3bd9f4)),_0x369a42=window[_0x3d175a([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3d175a([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x54c463);return _0x369a42?window[_0x3d175a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2c5767(_0x369a42),0x10)*_0x481356:null;}function _0x447f06(_0x174a5c){return new window[(_0x3d175a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2dec95,_0x29dc0a)=>{_0x174a5c[_0x3d175a([0x74,0x68,0x65,0x6e])](_0x2dec95,_0x29dc0a),window[_0x3d175a([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x29dc0a,0x3eb7179d^_0x1b58bd);});}}_0x104d21[_0x3d175a([0x6f,0x6e])](_0x3d175a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x370db6,_0x2ea669)=>{if(_0x2ea669[0x0]!=_0x3bd9f4)return _0x242474(_0x3d175a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2ea669[0x1]={..._0x2ea669[0x1],[_0x3d175a([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x3e40b4};},{[_0x3d175a([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3d175a([0x68,0x69,0x67,0x68])}),_0x104d21[_0x3d175a([0x6f,0x6e])](_0x3d175a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xf30d37=>{_0x4b79d5(_0xf30d37[_0x3d175a([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x5ef6bf=!0x0,_0x18a0c6(_0xf30d37[_0x3d175a([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x3d175a([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3d175a([0x6c,0x6f,0x77])}),_0x58c798[_0x3d175a([0x74,0x68,0x65,0x6e])](()=>{_0x5ef6bf||_0x242474(_0x3d175a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2d2ce1(){return _0x104d21[_0x3d175a([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3d175a([0x76,0x69,0x65,0x77])][_0x3d175a([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x3d175a([0x61,0x75,0x74,0x6f]);}function _0x58f7ba(){_0x104d21[_0x3d175a([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3d175a([0x76,0x69,0x65,0x77])][_0x3d175a([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3d175a([0x61,0x75,0x74,0x6f]);}}function _0x1668ae(_0x1a1111){const _0x7a2452=[new window[(_0x3d175a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3a236f=>setTimeout(_0x3a236f,0x3ebffd91^_0x1b58bd)),_0x58c798[_0x3d175a([0x74,0x68,0x65,0x6e])](()=>new window[(_0x3d175a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4efed8=>{const _0x230627=0x3eb6c35a^_0x1b58bd,_0x39748f=_0x13b144[_0x3d175a([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x2fba65(){_0x39748f[_0x3d175a([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x230627&&_0x4efed8();}_0x2fba65(),_0x39748f[_0x3d175a([0x6f,0x6e])](_0x3d175a([0x61,0x64,0x64]),_0x2fba65);})),new window[(_0x3d175a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x13d670=>{function _0x22bbe0(){for(const _0x2d8945 in window)if(window[_0x3d175a([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x3d175a([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x2d8945))&&window[_0x2d8945]==_0x383717)return _0x13d670();_0x104d21[_0x3d175a([0x73,0x74,0x61,0x74,0x65])]!=_0x3d175a([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x3d175a([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x22bbe0,0x3eb6d0d5^_0x1b58bd);}_0x2944f0(_0x3d175a([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x22bbe0();})];return window[_0x3d175a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3d175a([0x72,0x61,0x63,0x65])](_0x7a2452)[_0x3d175a([0x74,0x68,0x65,0x6e])](()=>_0x1a1111);}async function _0x2debe8(){if(await _0x58c798,_0x2944f0(_0x3d175a([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x226d6b=_0x13b144[_0x3d175a([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x549e91=_0x13b144[_0x3d175a([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])](_0x226d6b[_0x3d175a([0x69,0x64])]),_0x1efd87=_0x2c236e(_0x3d175a([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x1efd87[_0x3d175a([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x226d6b['id'],_0x549e91?_0x549e91['id']:null,!0x0),_0x1efd87[_0x3d175a([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x3d175a([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x1efd87[_0x3d175a([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x1efd87[_0x3d175a([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x880db0,void(_0x1efd87[_0x3d175a([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x880db0);}if(_0x2944f0(_0x3d175a([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x285bed=_0x2c236e(_0x3d175a([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x285bed[_0x3d175a([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x3d175a([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x285bed[_0x3d175a([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x285bed[_0x3d175a([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x880db0,_0x285bed[_0x3d175a([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x880db0;}_0x104d21[_0x3d175a([0x6d,0x6f,0x64,0x65,0x6c])][_0x3d175a([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x880db0,_0x104d21[_0x3d175a([0x6d,0x6f,0x64,0x65,0x6c])][_0x3d175a([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x880db0,_0x104d21[_0x3d175a([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x3d175a([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2c6bde(){return _0x2944f0(_0x3d175a([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x2c236e(_0x3d175a([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x3d175a([0x73,0x74,0x61,0x74,0x65])]==_0x3d175a([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x1acb3c(){return _0x2944f0(_0x3d175a([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 _0x8a6820(){return _0x2944f0(_0x3d175a([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x2d57d5(_0x4bb5c9){const _0x290bd8=_0x328a39();_0x104d21[_0x290bd8]=_0x3d175a([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])+_0x4bb5c9,_0x4bb5c9[_0x3d175a([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x3d175a([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x328a39()]=_0x383717),_0x4bb5c9!=_0x3d175a([0x56,0x61,0x6c,0x69,0x64])&&_0x2debe8();}function _0x328a39(){const _0x44465e=window[_0x3d175a([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x3d175a([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x3d175a([0x6e,0x6f,0x77])]())[_0x3d175a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x3d175a([0x2e]),'');let _0x706bfe=_0x3d175a([0x67]);for(let _0x28a4a9=0x0;_0x28a4a9<_0x44465e[_0x3d175a([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x28a4a9+=0x2){let _0x2d1678=window[_0x3d175a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x44465e[_0x3d175a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x28a4a9,_0x28a4a9+0x2));_0x2d1678>=_0x118e7a[_0x3d175a([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x2d1678-=_0x118e7a[_0x3d175a([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x706bfe+=_0x118e7a[_0x2d1678];}return _0x706bfe;}function _0x4408d3(){const _0x18adc6=_0x17b0c5[_0x3d175a([0x73,0x70,0x6c,0x69,0x74])](_0x3d175a([0x2e]));if(0x3!=_0x18adc6[_0x3d175a([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2a34c5(_0x18adc6[0x1]);function _0x2a34c5(_0x3689a9){const _0x40c028=_0x5224c0(_0x3689a9);return _0x40c028&&_0x4c6fd7()?_0x40c028:null;function _0x4c6fd7(){const _0x416c6b=_0x40c028[_0x3d175a([0x6a,0x74,0x69])],_0x2182bd=window[_0x3d175a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x416c6b[_0x3d175a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x416c6b[_0x3d175a([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2ac647={..._0x40c028,[_0x3d175a([0x6a,0x74,0x69])]:_0x416c6b[_0x3d175a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x416c6b[_0x3d175a([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2ac647[_0x3d175a([0x76,0x63])],_0x5f4e47(_0x2ac647)==_0x2182bd;}}}async function _0x36f165(){let _0x34d881=!0x0;try{const _0x21b02b=_0x17b0c5[_0x3d175a([0x73,0x70,0x6c,0x69,0x74])](_0x3d175a([0x2e])),[_0xf81715,_0x252043,_0x4e9417]=_0x21b02b;return _0x3a5df4(_0xf81715),await _0x230687(_0xf81715,_0x252043,_0x4e9417),_0x34d881;}catch(_0xc45708){return!0x1;}function _0x3a5df4(_0x450304){const _0x29baf9=_0x5224c0(_0x450304);_0x29baf9&&_0x29baf9[_0x3d175a([0x61,0x6c,0x67])]==_0x3d175a([0x45,0x53,0x32,0x35,0x36])||(_0x34d881=!0x1);}async function _0x230687(_0x3fcdc5,_0x50cb07,_0x45b64f){const _0x9e9887=window[_0x3d175a([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x3d175a([0x66,0x72,0x6f,0x6d])](_0x21393b(_0x45b64f),_0x2d624b=>_0x2d624b[_0x3d175a([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x50f1c0=new window[(_0x3d175a([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x3d175a([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x3fcdc5+_0x3d175a([0x2e])+_0x50cb07),_0x54ba3e=window[_0x3d175a([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x3d175a([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x54ba3e)return;const _0x25d3e2=await _0x54ba3e[_0x3d175a([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x3d175a([0x6a,0x77,0x6b]),_0x20d53f,{[_0x3d175a([0x6e,0x61,0x6d,0x65])]:_0x3d175a([0x45,0x43,0x44,0x53,0x41]),[_0x3d175a([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x3d175a([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x3d175a([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x54ba3e[_0x3d175a([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x3d175a([0x6e,0x61,0x6d,0x65])]:_0x3d175a([0x45,0x43,0x44,0x53,0x41]),[_0x3d175a([0x68,0x61,0x73,0x68])]:{[_0x3d175a([0x6e,0x61,0x6d,0x65])]:_0x3d175a([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x25d3e2,_0x9e9887,_0x50f1c0)||(_0x34d881=!0x1);}}function _0x5224c0(_0x5c2395){return _0x5c2395[_0x3d175a([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x3d175a([0x65,0x79]))?JSON[_0x3d175a([0x70,0x61,0x72,0x73,0x65])](_0x21393b(_0x5c2395)):null;}function _0x21393b(_0x4c038b){return window[_0x3d175a([0x61,0x74,0x6f,0x62])](_0x4c038b[_0x3d175a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x3d175a([0x2b]))[_0x3d175a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x3d175a([0x2f])));}function _0x5f4e47(_0x28331f){let _0x5656c8=0x1505;function _0x4cd73f(_0x1ba0f8){for(let _0x18470b=0x0;_0x18470b<_0x1ba0f8[_0x3d175a([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x18470b++){const _0x271b73=_0x1ba0f8[_0x3d175a([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x18470b);_0x5656c8=(_0x5656c8<<0x5)+_0x5656c8+_0x271b73,_0x5656c8&=_0x5656c8;}}function _0x5cd97d(_0x591c8f){Array[_0x3d175a([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x591c8f)?_0x591c8f[_0x3d175a([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5cd97d):_0x591c8f&&typeof _0x591c8f==_0x3d175a([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x3d175a([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x591c8f)[_0x3d175a([0x73,0x6f,0x72,0x74])]()[_0x3d175a([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x2afbe6,_0x2460f7])=>{_0x4cd73f(_0x2afbe6),_0x5cd97d(_0x2460f7);}):_0x4cd73f(window[_0x3d175a([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x591c8f));}return _0x5cd97d(_0x28331f),_0x5656c8>>>0x0;}function _0x3a493e(_0x251cbf){return _0x251cbf[_0x3d175a([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x3d175a([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x3d175a([0x30]));}function _0x2c5767(_0x434c1e){return _0x434c1e[_0x3d175a([0x73,0x70,0x6c,0x69,0x74])]('')[_0x3d175a([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x3d175a([0x6a,0x6f,0x69,0x6e])]('');}function _0x2944f0(_0x3c0555){return _0x104d21[_0x3d175a([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x3d175a([0x68,0x61,0x73])](_0x3c0555);}function _0x2c236e(_0x422b0a){return _0x104d21[_0x3d175a([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x3d175a([0x67,0x65,0x74])](_0x422b0a);}function _0x880db0(){}function _0x3d175a(_0x4f214d){return _0x4f214d['map'](_0x5bf133=>String['fromCharCode'](_0x5bf133))['join']('');}_0x2d57d5(await _0x4cacac());}(this);}['createRevision'](_0x349d0e){const _0x196e59=this['editor']['plugins']['get']('Users');return new h({'id':_0x349d0e['id'],'name':_0x349d0e['name'],'creator':_0x349d0e['creatorId']?_0x196e59['getUser'](_0x349d0e['creatorId']):null,'diffData':_0x349d0e['diffData']||_0x349d0e['data'],'authors':_0x349d0e['authorsIds']['map'](_0x3070a3=>_0x196e59['getUser'](_0x3070a3)),'createdAt':new Date(_0x349d0e['createdAt']),'attributes':_0x349d0e['attributes'],'fromVersion':_0x349d0e['fromVersion'],'toVersion':_0x349d0e['toVersion']});}['addRevision'](_0x389e70,_0x1917b6=0x0){this['_revisions']['add'](_0x389e70,_0x1917b6);}['getRevision'](_0x15ad21){return this['_revisions']['get'](_0x15ad21);}['getRevisions'](_0x5b8077={'toJSON':!0x1}){const _0x5f0316=Array['from'](this['_revisions']);return _0x5f0316['reverse'](),_0x5b8077['toJSON']?_0x5f0316['map'](_0x2f4028=>_0x2f4028['toJSON']()):_0x5f0316;}['getIndex'](_0x737c7d){return this['_revisions']['getIndex'](_0x737c7d);}['getEarlierVisibleRevision'](_0x3d8d8f){const [,_0x1f8176]=this['getRevisionsIterator'](_0x3d8d8f,{'direction':'earlier'});return _0x1f8176;}['getLaterVisibleRevision'](_0x3197ce){const [,_0x3cae04]=this['getRevisionsIterator'](_0x3197ce,{'direction':'later'});return _0x3cae04;}['getRevisionsInDiff'](_0x526a18){const _0x31af89=[];for(const _0x52b4c4 of this['getRevisionsIterator'](_0x526a18['newRevisionId']))if(_0x31af89['push'](_0x52b4c4),_0x52b4c4['id']===_0x526a18['oldRevisionId'])break;return _0x31af89;}*['getRevisionsIterator'](_0x399d4c,{direction:_0x32ba7e='earlier',filter:_0x434733=()=>!0x0}={}){const _0x2f8659='earlier'===_0x32ba7e?0x1:-0x1;let _0x2c07a7=this['_revisions']['get'](_0x399d4c),_0xc9733e=this['getIndex'](_0x2c07a7);for(yield _0x2c07a7;_0x2c07a7;){if(_0xc9733e+=_0x2f8659,_0x2c07a7=this['getRevision'](_0xc9733e),!_0x2c07a7)return;_0x434733(_0x2c07a7)&&(yield _0x2c07a7);}}}class V extends _0x4eb38d{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x409962,'c'],[_0x503f33,'a'],[_0x2d2880,'e'],[_0x4eedab,'r'],[_0xcc1b16,'u']]);['_typeCharToViewClass']=new Map([['c',_0x409962],['a',_0x503f33],['e',_0x2d2880],['r',_0x4eedab],['u',_0xcc1b16]]);async['loadRevisionData'](_0x23e6f9,_0x3543be){if(_0x23e6f9['diffData']||!_0x3543be)return;const _0x2931ad=this['editor']['config']['get']('collaboration.channelId'),_0x497ba9=await _0x3543be['getRevision']({'channelId':_0x2931ad,'revisionId':_0x23e6f9['id']});_0x23e6f9['diffData']=_0x497ba9['diffData'];}['getRevisionDocumentData'](_0x1424d8){const _0x2e6eb8={};for(const _0x44be52 in _0x1424d8['diffData']){if(_0x1424d8['diffData'][_0x44be52]['attachChange']&&!_0x1424d8['diffData'][_0x44be52]['attachChange']['isAttached'])continue;const _0xd6442a=this['_removeRevisionMarkers'](JSON['parse'](_0x1424d8['diffData'][_0x44be52]['insertions'])),_0x579880=this['editor']['editing']['view']['document'],_0xed6f82=new _0x5e4606(_0x579880,_0xd6442a['map'](_0x32dd78=>this['_getViewFromDiffObj'](_0x32dd78,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x2e6eb8[_0x44be52]=this['editor']['data']['processor']['toData'](_0xed6f82),this['editor']['data']['processor']['useFillerType']('default');}return _0x2e6eb8;}['getRevisionRootsAttributes'](_0x104026){const _0x5bc8e6={};for(const _0x1f4f3b in _0x104026['diffData'])_0x104026['diffData'][_0x1f4f3b]['attachChange']&&!_0x104026['diffData'][_0x1f4f3b]['attachChange']['isAttached']||(_0x5bc8e6[_0x1f4f3b]=_0x104026['diffData'][_0x1f4f3b]['attributesAfter']||{});return _0x5bc8e6;}['_getTypeCharForViewElement'](_0x2e5ac7){return this['_viewClassToTypeChar']['get'](_0x2e5ac7['constructor']);}['_getViewFromDiffObj'](_0x3d5a0f,_0x1283dc){const _0x23d038=this['editor']['editing']['view']['document'];if('string'==typeof _0x3d5a0f)return new _0x517936(_0x23d038,_0x3d5a0f);{let _0x25d1ee,_0x1820cf;_0x1820cf='u'==_0x3d5a0f['type']||'r'==_0x3d5a0f['type']?[]:_0x3d5a0f['children']['map'](_0x493650=>this['_getViewFromDiffObj'](_0x493650,_0x1283dc));const _0x534d5b=this['_typeCharToViewClass']['get'](_0x3d5a0f['type'])||_0x33b42d,_0x2a958d=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x25d1ee=new _0x534d5b(_0x23d038,_0x3d5a0f['name'],_0x3d5a0f['attributes'],_0x1820cf),'u'==_0x3d5a0f['type']&&_0x3d5a0f['children'][0x0]){const _0xe5738b=_0x3d5a0f['children'][0x0];if(_0x25d1ee['render']=function(_0x1dc7d2){const _0x16d0ce=_0x1dc7d2['createElement']('div');return _0x16d0ce['innerHTML']=_0xe5738b,_0x16d0ce['childNodes'][0x0];},_0x1283dc){const _0x9eaab1=new _0x5e4606(_0x23d038);_0x9eaab1['_appendChild'](_0x25d1ee);const _0x7b74b4=Array['from'](_0x2a958d['viewChildrenToDom'](_0x9eaab1,{'bind':!0x1})),_0x5a2f92=_0x2a958d['domDocument']['createElement']('div');_0x5a2f92['append'](..._0x7b74b4),_0x25d1ee=Array['from'](_0x2a958d['domChildrenToView'](_0x5a2f92))[0x0];}}else{if('r'==_0x3d5a0f['type']&&_0x3d5a0f['children'][0x0]){const _0x25c1ae=_0x3d5a0f['children'][0x0];if(_0x25d1ee['render']=function(_0x26c004){_0x26c004['innerHTML']=_0x25c1ae;},_0x1283dc){const _0x404807=new _0x5e4606(_0x23d038);_0x404807['_appendChild'](_0x25d1ee);const _0x655ab7=Array['from'](_0x2a958d['viewChildrenToDom'](_0x404807,{'bind':!0x1})),_0x2e549d=_0x2a958d['domDocument']['createElement']('div');_0x2e549d['append'](..._0x655ab7);const _0x8e9dad=Array['from'](_0x2a958d['domChildrenToView'](_0x2e549d));_0x8e9dad['length']>0x1?_0x25d1ee['_appendChild'](_0x8e9dad):_0x25d1ee=_0x8e9dad[0x0];}}}if(_0x3d5a0f['customProperties']){for(const [_0x59cc7a,_0x3ae9a5]of _0x3d5a0f['customProperties'])_0x25d1ee['_setCustomProperty'](_0x59cc7a,_0x3ae9a5);}const _0x22b58e=void 0x0===_0x3d5a0f['fillerOffset']?null:_0x3d5a0f['fillerOffset'];return null!==_0x22b58e&&(_0x25d1ee['getFillerOffset']=()=>_0x22b58e),_0x25d1ee;}}['_makeModelFromViewString'](_0x386ae1){const _0x3b4ab4=JSON['parse'](_0x386ae1),_0x11b5ae=this['editor']['editing']['view']['document'],_0x5d6433=new _0x5e4606(_0x11b5ae,_0x3b4ab4['map'](_0x4c4b61=>this['_getViewFromDiffObj'](_0x4c4b61,!0x0)));return this['editor']['data']['toModel'](_0x5d6433);}['_removeRevisionMarkers'](_0x3bcd81){return(_0x3bcd81=_0x3bcd81['filter'](_0x52f53d=>!_0x52f53d['name']||'revision-start'!==_0x52f53d['name']&&'revision-end'!==_0x52f53d['name']))['forEach'](_0x213966=>{'string'!=typeof _0x213966&&(_0x213966['children']=this['_removeRevisionMarkers'](_0x213966['children']),_0x213966['attributes']=_0x213966['attributes']['filter'](_0x2e06f4=>!_0x2e06f4[0x0]['startsWith']('data-revision-')));}),_0x3bcd81;}}function g(_0x3ba82f,_0x5a4b1c,_0x3ae338){const t=_0x3ba82f['t'];switch(_0x5a4b1c){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'},_0x3ae338);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x3ae338);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 _0x4eb38d{['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[_0x266938,I,V,_0x38da1f];}constructor(_0x20cc1e){super(_0x20cc1e),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 _0x54feb8=_0x423624();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x54feb8},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 _0x5395ae=this['repository']['getRevision'](0x0),_0x3db3b1=_0x5395ae&&null===_0x5395ae['creator']?_0x5395ae:null;if(this['_continueCurrentRevision']=!!_0x3db3b1&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x1da84c=this['_source']['getCurrentRevisionId'](),_0x3b1346=this['repository']['getRevision'](_0x1da84c);if(_0x3b1346)this['_startingVersion']=_0x3b1346['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x4c01cf=this['_source']['history']['_operations']['find'](_0x57d859=>!_0x57d859['_isInit']),_0x18dcc8=_0x4c01cf?_0x4c01cf['baseVersion']:this['_source']['history']['version'];_0x5395ae?(_0x5395ae['toVersion']<_0x18dcc8&&_0x5395ae['_update']({'toVersion':_0x18dcc8}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x3db3b1['id'],this['_startingVersion']=_0x3db3b1['fromVersion']):(this['_startingVersion']=_0x5395ae['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x18dcc8,this['_continueCurrentRevision']=!0x1);}}else _0x3db3b1&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x3db3b1['toVersion'],this['editor']['model']['document']['history']['version']),_0x3db3b1['fromVersion']===_0x3db3b1['toVersion']?(0x0!==_0x3db3b1['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x3db3b1['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x3db3b1['id'],this['_startingVersion']=_0x3db3b1['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',_0x5a46c7=>!_0x5a46c7),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x404840=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0xc1363b;for(const _0x3c20f6 in _0x404840){const _0x191b67=_0x3c20f6,_0xa8b075=_0x404840[_0x191b67];if('revisionHistoryLicenseKeyValid'==_0xa8b075||'revisionHistoryLicenseKeyInvalid'==_0xa8b075||'revisionHistoryLicenseKeyExpired'==_0xa8b075||'revisionHistoryLicenseKeyDomainLimit'==_0xa8b075||'revisionHistoryLicenseKeyNotAllowed'==_0xa8b075||'revisionHistoryLicenseKeyEvaluationLimit'==_0xa8b075||'revisionHistoryLicenseKeyTrialLimit'==_0xa8b075||'revisionHistoryLicenseKeyUsageLimit'==_0xa8b075){delete _0x404840[_0x191b67],_0xc1363b=_0xa8b075,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0xc1363b&&_0x404840['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0xc1363b&&_0x404840['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0xc1363b&&_0x404840['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0xc1363b&&_0x404840['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0xc1363b&&_0x404840['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0xc1363b&&_0x404840['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0xc1363b&&_0x404840['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x58c924=this['repository']['getRevision'](0x0),_0x139355=await this['getRevisionDocumentData'](_0x58c924),_0x1857ef=await this['getRevisionRootsAttributes'](_0x58c924);this['_replaceEditorDataWithRevisionData'](_0x139355,_0x1857ef);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x290be3){this['_source']=_0x290be3;}async['update'](){const _0x2f7270=await this['_source']['getLatestVersion']();if(_0x2f7270>this['currentRevision']['toVersion']){await this['_loadState']();const _0x25ee37=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x2f7270});_0x25ee37['authors']=_0x25ee37['authorsIds']['map'](_0x3a7f97=>this['editor']['plugins']['get']('Users')['getUser'](_0x3a7f97)),this['currentRevision']['_update'](_0x25ee37);}}async['saveRevision'](_0x16cbb2={},_0x328ced=null){const _0x307951=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x328ced>this['currentRevision']['toVersion']&&(_0x328ced=null),null===_0x328ced&&(_0x328ced=await this['_source']['getLatestVersion']());const _0xbf484d=this['_getFromVersion'](_0x328ced),_0x2a1d29=this['buildRevisionData']({'from':_0xbf484d,'to':_0x328ced});if(this['currentRevision']['toVersion']<_0x328ced){const _0x52dff3=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x328ced,'to':_0x328ced});_0x52dff3['authors']=[],_0x52dff3['authorsIds']=[],_0x52dff3['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x52dff3,!0x0),delete _0x52dff3['authors'],_0x307951['push'](_0x52dff3);}_0x16cbb2['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x16cbb2['name']=_0x16cbb2['name']||null,_0x16cbb2['id']=_0x16cbb2['id']||_0x423624(),_0x16cbb2={..._0x16cbb2,..._0x2a1d29};const _0x5e36fa=this['addRevisionData'](_0x16cbb2);_0x307951['push'](_0x16cbb2);const _0x3370c7=this['repository']['getIndex'](_0x5e36fa);if(0x0!==_0x3370c7){const _0x25120b=this['repository']['getRevision'](_0x3370c7-0x1);if(_0x25120b['fromVersion']!==_0x328ced){const _0x440c9b=this['_revisionDataBuilder']['getData'](_0x328ced,_0x25120b['toVersion']),_0x584a3d={'id':_0x25120b['id'],'diffData':_0x440c9b['diffData'],'authorsIds':_0x440c9b['authorsIds'],'authors':_0x440c9b['authorsIds']['map'](_0x3919e3=>this['editor']['plugins']['get']('Users')['getUser'](_0x3919e3)),'fromVersion':_0x328ced};_0x25120b===this['currentRevision']&&(_0x584a3d['createdAt']=new Date(_0x16cbb2['createdAt']['getTime']()+0xa)),_0x25120b['_update'](_0x584a3d,!0x0),delete _0x584a3d['authors'],_0x307951['push'](_0x584a3d);}}if(this['adapter']){for(const _0x51027f of _0x307951)this['_bufferUpdate'](_0x51027f['id'],_0x51027f,!0x0);this['sendBufferedUpdates']();}return _0x5e36fa;}['addRevisionData'](_0x233c7c){const _0x4be550=this['repository']['createRevision'](_0x233c7c);return this['adapter']&&_0x4be550['on']('_update',(_0x136904,_0x750133,_0x26b4e8)=>{_0x26b4e8||(this['_bufferUpdate'](_0x750133['id'],_0x750133,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x4be550,this['_findInsertionIndex'](_0x4be550)),_0x4be550;}async['getRevisionDocumentData'](_0x4c67be){return await this['_utils']['loadRevisionData'](_0x4c67be,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x4c67be);}async['getRevisionRootsAttributes'](_0x3f4f7){return await this['_utils']['loadRevisionData'](_0x3f4f7,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x3f4f7);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x530b94=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x5601d2=0x0;_0x5601d2<_0x530b94['length'];_0x5601d2++){const _0x2a43e5=_0x530b94[_0x5601d2];let _0x493f70=!0x1;for(const _0x33425c of Object['keys'](_0x2a43e5))void 0x0===_0x2a43e5[_0x33425c]?delete _0x2a43e5[_0x33425c]:'id'!==_0x33425c&&(_0x493f70=!0x0);_0x493f70||(_0x530b94[_0x5601d2]=null);}if(_0x530b94=_0x530b94['filter'](_0x2379c8=>null!==_0x2379c8),!_0x530b94['length'])return;for(let _0x441e47=0x0;_0x441e47<_0x530b94['length'];_0x441e47++){const _0x478a22=_0x530b94[_0x441e47];void 0x0!==_0x478a22['fromVersion']&&void 0x0===_0x478a22['toVersion']&&(_0x478a22['toVersion']=this['repository']['getRevision'](_0x478a22['id'])['toVersion']),void 0x0!==_0x478a22['toVersion']&&void 0x0===_0x478a22['fromVersion']&&(_0x478a22['fromVersion']=this['repository']['getRevision'](_0x478a22['id'])['fromVersion']);}const _0x40d3fa=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x530b94,_0x40d3fa)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x36a17d=>{if(_0x36a17d){for(const _0x58e9df of _0x36a17d)this['setRevisionData']({'id':_0x58e9df['id'],'createdAt':_0x58e9df['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x2850ef=null,from:_0x324285=null,to:_0x2fbb89=null}){_0x324285=null!==_0x324285?_0x324285:_0x2850ef['fromVersion'],_0x2fbb89=null!==_0x2fbb89?_0x2fbb89:_0x2850ef['toVersion'];const _0x3f7656=this['_revisionDataBuilder']['getData'](_0x324285,_0x2fbb89),_0x12929f={'diffData':_0x3f7656['diffData'],'authorsIds':_0x3f7656['authorsIds'],'fromVersion':_0x324285,'toVersion':_0x2fbb89};if(!_0x2850ef||_0x2fbb89!==_0x2850ef['toVersion']){const _0x1fed77=_0x2fbb89-0x1,_0x4e9488=this['_source']['history']['getOperation'](_0x1fed77);_0x12929f['createdAt']=_0x4e9488&&_0x4e9488['createdAt']||new Date();}if(this['_loadedStateData']&&_0x324285===this['_loadedStateData']['fromVersion']){for(const _0x12a9f5 of this['_loadedStateData']['authors'])_0x12929f['authorsIds']['includes'](_0x12a9f5['id'])||_0x12929f['authorsIds']['push'](_0x12a9f5['id']);}return _0x12929f;}['_bufferUpdate'](_0x38ac19,_0xa02a4b,_0x17f241){if(this['_bufferedUpdates']['has'](_0x38ac19)){const _0x4ed969=this['_bufferedUpdates']['get'](_0x38ac19);_0xa02a4b=_0x17f241?{..._0x4ed969,..._0xa02a4b}:{..._0xa02a4b,..._0x4ed969};}this['_bufferedUpdates']['set'](_0x38ac19,_0xa02a4b);}['setRevisionData'](_0x31ff24){const _0x351f0a=this['repository']['getRevision'](_0x31ff24['id']);if(_0x31ff24['createdAt']&&(_0x31ff24['createdAt']=new Date(_0x31ff24['createdAt'])),_0x31ff24['authorsIds']){const _0x22c654=this['editor']['plugins']['get']('Users');_0x31ff24['authors']=_0x31ff24['authorsIds']['map'](_0x3d2fb5=>_0x22c654['getUser'](_0x3d2fb5));}_0x351f0a['_update'](_0x31ff24,!0x0);}['_createInitialRevision'](_0x100e12){const _0x17981e=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x17981e)this['_initialRevisionId']=_0x17981e['id'];else{const _0x2ee02f=!this['editor']['model']['document']['roots']['find'](_0x1bb0fd=>this['editor']['model']['hasContent'](_0x1bb0fd)),_0x1c67ee=this['editor']['plugins']['get']('Users')['me']['id'],_0x45cac1=g(this['editor']['locale'],_0x2ee02f?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x100e12,'to':_0x100e12,'id':this['_initialRevisionId'],'name':_0x45cac1,'creatorId':_0x1c67ee});}}['_createCurrentRevision'](_0x3b5b3f){const _0x2e6777=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x2e6777),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x3b5b3f,'to':_0x3b5b3f,'id':_0x2e6777,'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'](_0xbaa2d8,_0x148a33){let _0x47fdd6=this['editor']['config']['get']('initialData'),_0x31c562=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x47fdd6){_0x47fdd6={};for(const _0x1b1466 of this['editor']['model']['document']['getRootNames']())_0x47fdd6[_0x1b1466]='';}if('string'==typeof _0x47fdd6&&(_0x47fdd6={'main':_0x47fdd6}),void 0x0===_0x31c562){_0x31c562={};for(const _0x5a9419 of this['editor']['model']['document']['getRootNames']())_0x31c562[_0x5a9419]={};}let _0x52e2fa=!0x1;const _0xe5f943=Object['keys'](_0x47fdd6),_0x2fc0bf=Object['keys'](_0xbaa2d8);for(const _0x594672 of _0xe5f943){if(_0x47fdd6[_0x594672]!==_0xbaa2d8[_0x594672]&&''!==_0x47fdd6[_0x594672]['trim']()){_0x52e2fa=!0x0;break;}if(!_0x3b0ba1(_0x31c562[_0x594672],_0x148a33[_0x594672])&&Object['keys'](_0x31c562[_0x594672])['length']>0x0){_0x52e2fa=!0x0;break;}}_0x52e2fa||(_0x52e2fa=_0x2fc0bf['some'](_0x12ad57=>!this['editor']['model']['document']['getRoot'](_0x12ad57))),_0x52e2fa&&_0x970719('editor-initial-data-replaced-with-revision-data',{'editorData':_0x47fdd6,'editorRootsAttributes':_0x31c562,'revisionData':_0xbaa2d8,'revisionRootsAttributes':_0x148a33}),this['editor']['config']['set']('initialData',_0xbaa2d8),this['editor']['config']['set']('rootsAttributes',_0x148a33);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x280701=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x280701['add'](g(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x4627fb){const _0x536e8c=this['repository']['getRevisions']();_0x536e8c['reverse']();let _0x1c22b3=0x0;for(;_0x1c22b3<_0x536e8c['length'];){const _0x3cc433=_0x536e8c[_0x1c22b3];if(_0x3cc433===this['currentRevision']){_0x1c22b3++;continue;}if(_0x3cc433['id']===this['_initialRevisionId'])break;const _0x51140d=_0x4627fb['toVersion']-_0x3cc433['toVersion']||_0x4627fb['fromVersion']-_0x3cc433['fromVersion'];if(_0x51140d>0x0)break;if(_0x51140d<0x0)_0x1c22b3++;else{if(!_0x4627fb['creator']&&_0x3cc433['creator'])break;if(_0x3cc433['creator']||!_0x4627fb['creator']){if(_0x4627fb['createdAt']>_0x3cc433['createdAt'])break;_0x1c22b3++;}else _0x1c22b3++;}}return _0x1c22b3;}['_getFromVersion'](_0x2e8a9d){const _0x521e44=this['repository']['getRevisions']();_0x521e44['reverse'](),_0x521e44['shift']();const _0x322afd=_0x521e44['find'](_0x47d3dc=>_0x47d3dc['toVersion']<=_0x2e8a9d)['toVersion'];return _0x322afd<this['_startingVersion']?this['_startingVersion']:_0x322afd;}['_makeRevision']({name:_0x30a231,from:_0x245615,to:_0x1af53e,creatorId:_0x581f13,id:_0x22c85f}){const _0x9b0d60=this['buildRevisionData']({'from':_0x245615,'to':_0x1af53e});_0x9b0d60['name']=_0x30a231,_0x9b0d60['creatorId']=_0x581f13,_0x9b0d60['id']=_0x22c85f;const _0x5c4215=this['addRevisionData'](_0x9b0d60);return this['adapter']&&this['_bufferUpdate'](_0x9b0d60['id'],_0x9b0d60,!0x0),_0x5c4215;}['_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(_0x1e5b09){this['editor']=_0x1e5b09,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'](_0x3d62a9){this['source']=_0x3d62a9;const _0x48ea27=new Map(),_0x32df0e=new Map(),_0x5ab65e=this['editor']['model']['document']['roots']['map'](_0x4de44b=>_0x4de44b['rootName']);for(const _0x4027b7 of _0x5ab65e){const _0x243b53=this['editor']['model']['document']['getRoot'](_0x4027b7),_0x2b91e6=N(_0x243b53);_0x48ea27['set'](_0x4027b7,_0x2b91e6),_0x32df0e['set'](_0x4027b7,Object['fromEntries'](_0x243b53['getAttributes']()));}const _0x6fc51e=Array['from'](this['editor']['model']['markers'])['map'](_0x2f2d68=>[_0x2f2d68['name'],_0x2f2d68['getRange']()]),_0x5db6c2=this['source']['version'];this['_saveMetaData'](_0x5db6c2,_0x48ea27,_0x6fc51e,_0x32df0e),this['_startingRevisionId']=this['_revisionId'];const _0x1844d1=new Map(),_0x1c1f48=new Map();for(const _0x5f172b of _0x5ab65e){const _0x669a2b=P(_0x5f172b);_0x1844d1['set'](_0x5f172b,_0x669a2b),_0x1c1f48['set'](_0x5f172b,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x1844d1,[],_0x1c1f48);}['getData'](_0x2f577d,_0x26e04b){if(this['_lastFrom']===_0x2f577d&&this['_lastTo']<=_0x26e04b)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x26e04b,!0x0);else{if(!this['_savedMetaData']['has'](_0x2f577d)){const _0x2c6da7=this['_getPreviousFrom'](_0x2f577d);this['_calculateMetaData'](_0x2c6da7,_0x2f577d,!0x1);}this['_calculateMetaData'](_0x2f577d,_0x26e04b,!0x0);}return this['_lastFrom']=_0x2f577d,this['_lastTo']=_0x26e04b,this['_getState']();}['loadState'](_0x7ce66e){const _0x3c7de6=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x7ce66e['fromVersion'],this['_lastTo']=_0x7ce66e['toVersion'];for(const _0xb09ddb in _0x7ce66e['diffData']){const _0x201798=_0x7ce66e['diffData'][_0xb09ddb]['attachChange'],_0xf220a2=_0xf4506f(_0x7ce66e['diffData'][_0xb09ddb]['attributesBefore'])||{},_0x4c9009=_0x3c7de6['_makeModelFromViewString'](_0x7ce66e['diffData'][_0xb09ddb]['deletions']);_0x4c9009['rootName']=_0xb09ddb,_0x4c9009['_isAttached']=!_0x201798||!_0x201798['isAttached'],_0x4c9009['isAttached']=()=>_0x4c9009['_isAttached'],this['_baseRoots']['set'](_0xb09ddb,_0x4c9009),this['_baseRootsAttributes']['set'](_0xb09ddb,_0xf220a2),_0x201798&&this['_touchedRoots']['set'](_0xb09ddb,_0x201798);const _0x748320=this['_makeIdsRoot'](_0x4c9009);this['_baseIdsRoots']['set'](_0xb09ddb,_0x748320);for(const [_0x629435,_0x2bf00c]of _0x4c9009['markers']){if(!_0x629435['startsWith']('revision:'))continue;const _0x470592=_0x629435['split'](':')[0x2];for(const _0x5a0b44 of _0x2bf00c['getWalker']({'singleCharacters':!0x0})){const _0x328e74=this['_getVidAttributeName'](_0x5a0b44),_0x1d7fe0='elementEnd'==_0x5a0b44['type']?_0x5a0b44['previousPosition']['path']['slice'](0x0,-0x1):_0x5a0b44['previousPosition']['path'],_0x36a220=_0x748320['getNodeByPath'](_0x1d7fe0)['getAttribute'](_0x328e74);this['_touched']['set'](_0x36a220,{'userId':_0x470592});}}}this['_startingRevisionId']=this['_revisionId'];const _0x1b07af=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x27f3a7=>!this['_touched']['has'](_0x27f3a7));let _0x28ff27=0x0;const _0x2cd200=new Map();for(const _0x462f8c in _0x7ce66e['diffData']){const _0x3a46f4=_0x7ce66e['diffData'][_0x462f8c]['attachChange'],_0x274ca6=_0xf4506f(_0x7ce66e['diffData'][_0x462f8c]['attributesAfter'])||{},_0x37f200=_0x3c7de6['_makeModelFromViewString'](_0x7ce66e['diffData'][_0x462f8c]['insertions']);_0x37f200['rootName']=_0x462f8c,_0x37f200['_isAttached']=!_0x3a46f4||_0x3a46f4['isAttached'],_0x37f200['isAttached']=()=>_0x37f200['_isAttached'],this['_diffRoots']['set'](_0x462f8c,_0x37f200),this['_diffRootsAttributes']['set'](_0x462f8c,_0x274ca6);const _0x25495f=this['_makeIdsRoot'](_0x37f200,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x462f8c,_0x25495f),_0x2cd200['set'](_0x462f8c,_0x37f200['isAttached']()?_0x274ca6:{});for(const [_0xe2620a,_0x466db1]of _0x37f200['markers']){if(!_0xe2620a['startsWith']('revision:'))continue;const _0x29714f=_0xe2620a['split'](':')[0x2];for(const _0x364672 of _0x466db1['getWalker']({'singleCharacters':!0x0})){const _0x1c16e1=this['_getVidAttributeName'](_0x364672),_0x5eca2d=this['_revisionId']++,_0x10ca97='elementEnd'==_0x364672['type']?_0x364672['previousPosition']['path']['slice'](0x0,-0x1):_0x364672['previousPosition']['path'];_0x25495f['getNodeByPath'](_0x10ca97)['_setAttribute'](_0x1c16e1,_0x5eca2d),this['_touched']['set'](_0x5eca2d,{'userId':_0x29714f});}}for(const _0x2c7b89 of this['editor']['model']['createRangeIn'](_0x37f200)['getWalker']({'singleCharacters':!0x0})){const _0x14a29a=this['_getVidAttributeName'](_0x2c7b89),_0x498e50='elementEnd'==_0x2c7b89['type']?_0x2c7b89['previousPosition']['path']['slice'](0x0,-0x1):_0x2c7b89['previousPosition']['path'],_0x437670=_0x25495f['getNodeByPath'](_0x498e50);_0x437670['getAttribute'](_0x14a29a)>0x0||_0x437670['_setAttribute'](_0x14a29a,_0x1b07af[_0x28ff27++]);}for(const [_0x46ebe9,_0x19d563]of _0x37f200['markers'])_0x46ebe9['startsWith']('revision:')||this['_markers']['set'](_0x46ebe9,_0x19d563);}const _0x17c4b9=P('$graveyard');this['_baseRoots']['set']('$graveyard',_0x17c4b9),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x17c4b9,0x1));const _0x37662b=P('$graveyard');this['_diffRoots']['set']('$graveyard',_0x37662b),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x37662b,0x1));const _0x10913c=Array['from'](this['_diffRoots'])['map'](([_0xca4a5e,_0x40185c])=>[_0xca4a5e,N(_0x40185c)]);this['_saveMetaData'](this['_lastTo'],_0x10913c,this['_markers'],_0x2cd200);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x3f5573,_0xac61f5,_0x3c8d19,_0x4603a9){const _0x4b3df6=new Map(_0xac61f5),_0x431be1=new Map(_0xf4506f(_0x4603a9)),_0x52a91f=new Map();for(const [_0x35d28e,_0x30af4e]of _0x3c8d19)_0x52a91f['set'](_0x35d28e,{'start':_0x30af4e['start']['clone'](),'end':_0x30af4e['end']['clone'](),'rootName':_0x30af4e['root']['rootName']});this['_savedMetaData']['set'](_0x3f5573,{'roots':_0x4b3df6,'markers':_0x52a91f,'rootsAttributes':_0x431be1});}['_removeMetaData'](_0x449a9f){this['_savedMetaData']['delete'](_0x449a9f);}['_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'](_0x313966,_0x310cbf=null){let _0x56d613=null;_0x313966['is']('documentFragment')||(_0x56d613=new ut(_0x313966['name'],{'vid_start':null===_0x310cbf?this['_revisionId']++:_0x310cbf++}));const _0x584058=[];for(const _0x665f52 of _0x313966['getChildren']())if(_0x665f52['is']('element')){_0x584058['push'](this['_makeIdsRoot'](_0x665f52,_0x310cbf));const _0xce2e7=_0x584058[_0x584058['length']-0x1];null!==_0x310cbf&&(_0x310cbf=_0xce2e7['is']('element','$text')?_0xce2e7['getAttribute']('vid')+0x1:_0xce2e7['getAttribute']('vid_end')+0x1);}else{for(let _0x2a6e6c=0x0;_0x2a6e6c<_0x665f52['offsetSize'];_0x2a6e6c++)_0x584058['push'](new ut('$text',{'vid':null===_0x310cbf?this['_revisionId']++:_0x310cbf++}));}if(_0x313966['is']('documentFragment')){const _0x146df8=P(_0x313966['rootName']);return _0x146df8['_insertChild'](0x0,_0x584058),_0x146df8;}return _0x56d613['_setAttribute']('vid_end',null===_0x310cbf?this['_revisionId']++:_0x310cbf++),_0x56d613['_insertChild'](0x0,_0x584058),_0x56d613;}['_calculateMetaData'](_0x16831e,_0x37264b,_0x3c5424){this['_reset']();const {roots:_0x2cd6d9,markers:_0x5bd229,rootsAttributes:_0x16bbab}=this['_savedMetaData']['get'](_0x16831e);this['_baseRoots']=new Map(_0x2cd6d9),this['_baseRootsAttributes']=new Map(_0xf4506f(_0x16bbab));for(const [_0x4d492a,_0x1464da]of this['_baseRoots'])if('$graveyard'!==_0x4d492a&&(this['_diffRoots']['set'](_0x4d492a,N(_0x1464da)),this['_diffRootsAttributes']=new Map(_0xf4506f(_0x16bbab)),_0x3c5424)){const _0x3f4f8e=this['_revisionId'];this['_idsRoots']['set'](_0x4d492a,this['_makeIdsRoot'](_0x1464da)),this['_baseIdsRoots']['set'](_0x4d492a,this['_makeIdsRoot'](_0x1464da,_0x3f4f8e));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',N(this['_baseRoots']['get']('$graveyard'))),_0x3c5424&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x8ce38,_0xb5dac5]of _0x5bd229){const _0x2e24df=this['_baseRoots']['get'](_0xb5dac5['rootName']),_0x41be12=this['_diffRoots']['get'](_0xb5dac5['rootName']),_0x336ac3=new ft(this['_fixPosition'](_0xb5dac5['start'],_0x2e24df),this['_fixPosition'](_0xb5dac5['end'],_0x2e24df)),_0x58272d=this['_fixRange'](_0x336ac3,_0x41be12);_0x2e24df['markers']['set'](_0x8ce38,_0x336ac3),this['_markers']['set'](_0x8ce38,_0x58272d);}this['_applyOperations'](_0x16831e,_0x37264b,_0x3c5424);}['_applyOperations'](_0x3b9ae8,_0xc2c52d,_0x3e41b5){for(const _0x585284 of this['source']['getOperations'](_0x3b9ae8,_0xc2c52d))this['_handleOperation'](_0x585284,_0x3e41b5);for(const _0x4daf40 of this['_diffRoots']['values']())_0x4daf40['markers']['clear']();for(const [_0x4d8ebe,_0x525f52]of this['_markers']){this['_diffRoots']['get'](_0x525f52['root']['rootName'])['markers']['set'](_0x4d8ebe,_0x525f52['clone']());}const _0x96a970=new Map(),_0x239e2c=new Map();for(const [_0x238456,_0x2d0ddd]of this['_diffRoots'])_0x96a970['set'](_0x238456,N(_0x2d0ddd)),_0x239e2c['set'](_0x238456,this['_diffRootsAttributes']['get'](_0x238456));this['_saveMetaData'](_0xc2c52d,_0x96a970,this['_markers'],_0x239e2c);}['_getPreviousFrom'](_0x2d970b){const _0x4be1c5=Array['from'](this['_savedMetaData']['keys']());_0x4be1c5['sort']((_0x202722,_0x61a83)=>_0x202722-_0x61a83),_0x4be1c5['reverse']();for(const _0x274262 of _0x4be1c5)if(_0x274262<_0x2d970b)return _0x274262;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x17b145,_0x1594d4){const _0x18604c=Array['from'](_0x1594d4['markers'])['map'](([_0x1d2e8b,_0x492fa5])=>[_0x1d2e8b,this['_fixRange'](_0x492fa5,_0x17b145)]);_0x17b145['markers']=new Map(_0x18604c);}['_transformMarkers'](_0xe24fd8){for(const _0x5b4c86 of this['_markers']['values']()){const _0x3f49ee=_0x5b4c86['getTransformedByOperation'](_0xe24fd8),_0x59ac65=ft['_createFromRanges'](_0x3f49ee);_0x5b4c86['start']=_0x59ac65['start'],_0x5b4c86['end']=_0x59ac65['end'];}}['_handleOperation'](_0x2035e9,_0x115e27){if('addRoot'!=_0x2035e9['type']&&'detachRoot'!=_0x2035e9['type']){if('insert'==_0x2035e9['type']){const _0x5bdaff=_0x2035e9['position']['root']['rootName'];this['_diffRoots']['has'](_0x5bdaff)||(this['_diffRoots']['set'](_0x5bdaff,P(_0x5bdaff,!0x0)),this['_diffRootsAttributes']['set'](_0x5bdaff,{}),_0x115e27&&this['_idsRoots']['set'](_0x5bdaff,P(_0x5bdaff,!0x0)));}else{if('addRootAttribute'==_0x2035e9['type']||'removeRootAttribute'==_0x2035e9['type']||'changeRootAttribute'==_0x2035e9['type'])return void this['_handleRootAttributeOperation'](_0x2035e9);'marker'==_0x2035e9['type']&&this['_handleMarkerOperation'](_0x2035e9);}if('marker'!==_0x2035e9['type']){const _0x3e1f18=this['_cloneOperation'](_0x2035e9,this['_diffRoots']);_0x3e1f18['_execute'](),this['_transformMarkers'](_0x3e1f18);}if(_0x115e27)switch(_0x2035e9['type']){case'insert':this['_handleInsertOperation'](_0x2035e9);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x2035e9);break;case'merge':this['_handleMergeOperation'](_0x2035e9);break;case'split':this['_handleSplitOperation'](_0x2035e9);}}else this['_handleRootOperation'](_0x2035e9,_0x115e27);}['_cloneOperation'](_0x3c02ad,_0x167ff5){const _0x21792=_0x3c02ad['clone']();return _0x21792['_authorId']=_0x3c02ad['_authorId'],this['_fixOperation'](_0x21792,_0x167ff5),_0x21792;}['_getBaseVids'](_0x6fed8d){return _0x6fed8d['map'](_0x59f3bf=>{const _0x45a8d6=this['_getVidAttributeName'](_0x59f3bf);return Number(_0x59f3bf['item']['getAttribute'](_0x45a8d6));});}['_generateTape'](_0x264753,_0x39f317){if(_0x264753['is']('element','$text'))_0x39f317['push']({'item':_0x264753,'type':'text'});else{_0x264753['is']('element')&&_0x39f317['push']({'item':_0x264753,'type':'elementStart'});for(const _0x4d25af of _0x264753['getChildren']())this['_generateTape'](_0x4d25af,_0x39f317);_0x264753['is']('element')&&_0x39f317['push']({'item':_0x264753,'type':'elementEnd'});}return _0x39f317;}['_getState'](){const _0x53dfb3=new Map(this['_touched']),_0x5de64a=new Map(_0x53dfb3),_0x2cae88=new Map(),_0x24a6d9={'insertions':{},'deletions':{}},_0xa08cd0={'insertions':{},'deletions':{}},_0x492df9=new Map(),_0xc6c42e=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0xc6c42e['delete']('$graveyard');for(const _0x53f949 of _0xc6c42e){const _0x11f9a4=this['_diffRoots']['get'](_0x53f949)||P(_0x53f949,!0x1),_0x53577d=this['_baseRoots']['get'](_0x53f949)||P(_0x53f949,!0x1);_0x11f9a4['isAttached']()||_0x53577d['isAttached']()?(_0x24a6d9['insertions'][_0x53f949]=N(_0x11f9a4),_0x24a6d9['deletions'][_0x53f949]=N(_0x53577d),this['_copyMarkers'](_0x24a6d9['deletions'][_0x53f949],_0x53577d),this['_copyMarkers'](_0x24a6d9['insertions'][_0x53f949],_0x11f9a4),_0xa08cd0['insertions'][_0x53f949]=this['_generateTape'](this['_idsRoots']['get'](_0x53f949),[]),_0xa08cd0['deletions'][_0x53f949]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x53f949)||P(_0x53f949,!0x1),[])):_0xc6c42e['delete'](_0x53f949);}for(const _0x1afdfd of _0xc6c42e){const _0x26d5eb=_0xa08cd0['insertions'][_0x1afdfd];for(const _0x1f9e70 of _0x26d5eb){const _0x2e0002=this['_getVidAttributeName'](_0x1f9e70),_0x92d505=_0x1f9e70['item']['getAttribute'](_0x2e0002);_0x5de64a['delete'](_0x92d505),_0x92d505>=this['_startingRevisionId']&&_0x2cae88['set'](_0x92d505,_0x53dfb3['get'](_0x92d505));}}for(const _0xea9dbc of _0xc6c42e){const _0x1c2145=_0xa08cd0['insertions'][_0xea9dbc],_0x39c26e=this['_getBaseVids'](_0xa08cd0['deletions'][_0xea9dbc]);let _0x41b536=0x0;for(const _0x145ae1 of _0x1c2145){const _0x4fc5f5=this['_getVidAttributeName'](_0x145ae1),_0x4300f3=_0x145ae1['item']['getAttribute'](_0x4fc5f5);if(!_0x2cae88['has'](_0x4300f3)&&!_0x492df9['has'](_0x4300f3)){if(_0x5de64a['has'](_0x4300f3))_0x41b536++;else{if(_0x4300f3!=_0x39c26e[_0x41b536]){const _0x203c8e=_0x53dfb3['get'](_0x4300f3)||_0x53dfb3['get'](_0x39c26e[_0x41b536]);for(;_0x4300f3!=_0x39c26e[_0x41b536];)_0x5de64a['has'](_0x39c26e[_0x41b536])||(_0x492df9['set'](_0x39c26e[_0x41b536],_0x203c8e),_0x53dfb3['set'](_0x39c26e[_0x41b536],_0x203c8e)),_0x41b536++;}_0x41b536++;}}}}for(const _0x280080 of _0xc6c42e){const _0x472eec=_0xa08cd0['insertions'][_0x280080];for(const _0x9606c0 of _0x472eec){const _0x55a2e5=this['_getVidAttributeName'](_0x9606c0),_0xdee1bb=_0x9606c0['item']['getAttribute'](_0x55a2e5);if(_0x492df9['has'](_0xdee1bb)){const _0x96b808=_0x492df9['get'](_0xdee1bb);_0x5de64a['has'](_0xdee1bb)||_0x5de64a['set'](_0xdee1bb,{..._0x96b808}),_0x2cae88['set'](_0xdee1bb,{..._0x96b808});}}}for(const _0x3e37ad of _0x5de64a['keys']())_0x3e37ad>=this['_startingRevisionId']&&_0x5de64a['delete'](_0x3e37ad);const _0xa503c5=new Map();for(const _0xc57dbc of _0xc6c42e){let _0x288e05=_0xa08cd0['insertions'][_0xc57dbc];for(const _0x3229f5 of _0x288e05)if(_0x3229f5['item']['is']('element','tableCell')){const _0x34528f=this['_getVidAttributeName'](_0x3229f5),_0x4daa6f=_0x3229f5['item']['getAttribute'](_0x34528f);if(_0x2cae88['has'](_0x4daa6f)){const _0x43cfb6=_0x3229f5['item']['parent']['parent']['getAttribute']('vid_start'),_0x167214=_0xa503c5['get'](_0x43cfb6)||new Set();_0x167214['add'](_0x2cae88['get'](_0x4daa6f)['userId']),_0xa503c5['set'](_0x43cfb6,_0x167214);}}_0x288e05=_0xa08cd0['deletions'][_0xc57dbc];for(const _0xe51940 of _0x288e05)if(_0xe51940['item']['is']('element','tableCell')){const _0x557b06=this['_getVidAttributeName'](_0xe51940),_0x51d16f=_0xe51940['item']['getAttribute'](_0x557b06);if(_0x5de64a['has'](_0x51d16f)){const _0x540e23=_0xe51940['item']['parent']['parent']['getAttribute']('vid_start'),_0x568902=_0xa503c5['get'](_0x540e23)||new Set();_0x568902['add'](_0x5de64a['get'](_0x51d16f)['userId']),_0xa503c5['set'](_0x540e23,_0x568902);}}for(const _0x5edf38 of _0xa503c5['keys']())(_0x2cae88['has'](_0x5edf38)||_0x5de64a['has'](_0x5edf38))&&_0xa503c5['delete'](_0x5edf38);}for(const _0xf45ccb of _0xc6c42e){const _0x4c0881=_0xa08cd0['insertions'][_0xf45ccb];let _0x1ef206=null,_0x5730d2=null;for(const _0x242732 of _0x4c0881){const _0x50a126=this['_getVidAttributeName'](_0x242732),_0x1e59a4=_0x242732['item']['getAttribute'](_0x50a126),_0x1bf986=_0xa503c5['get'](_0x1e59a4);_0x1bf986&&'elementStart'==_0x242732['type']&&(_0x1ef206=Array['from'](_0x1bf986)[0x0],_0x5730d2=_0x242732['item']['getAttribute']('vid_end')),_0x1ef206&&(_0x5de64a['set'](_0x1e59a4,{'userId':_0x1ef206}),_0x2cae88['set'](_0x1e59a4,{'userId':_0x1ef206})),_0x1e59a4==_0x5730d2&&(_0x1ef206=null,_0x5730d2=null);}}const _0x49562d={},_0x3d8d9d=new Set();for(const _0x1358f6 of _0xc6c42e){const _0x1a0a92=_0x24a6d9['deletions'][_0x1358f6],_0x217be5=_0x24a6d9['insertions'][_0x1358f6];for(const {userId:_0xd95917}of this['_touchedMarkers']['values']())null!==_0xd95917&&_0x3d8d9d['add'](_0xd95917);for(const {userId:_0x47e7bd}of this['_touchedRoots']['values']())null!==_0x47e7bd&&_0x3d8d9d['add'](_0x47e7bd);this['_markChanges'](_0x217be5,_0xa08cd0['insertions'][_0x1358f6],_0x2cae88,'insertion',_0x3d8d9d),this['_markChanges'](_0x1a0a92,_0xa08cd0['deletions'][_0x1358f6],_0x5de64a,'deletion',_0x3d8d9d),_0x49562d[_0x1358f6]={'insertions':this['_prepareViewToSave'](_0x217be5),'deletions':this['_prepareViewToSave'](_0x1a0a92),'attachChange':this['_touchedRoots']['get'](_0x1358f6)||null,'attributesBefore':_0xf4506f(this['_baseRootsAttributes']['get'](_0x1358f6))||{},'attributesAfter':_0xf4506f(this['_diffRootsAttributes']['get'](_0x1358f6))};}return{'diffData':_0x49562d,'authorsIds':Array['from'](_0x3d8d9d)};}['_processRootBeforeSave'](_0x1ed312){for(const [,_0x3580f4]of _0x1ed312['markers']){const _0x22b35f=_0x3580f4['start']['getAncestors']()['filter'](_0x5348b2=>'tableCell'==_0x5348b2['name']);for(const _0x4d1a22 of _0x22b35f)0x1==_0x4d1a22['childCount']&&_0x4d1a22['getChild'](0x0)['is']('element','paragraph')&&_0x4d1a22['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x5958dc){this['_processRootBeforeSave'](_0x5958dc);const _0x2e65c8=this['editor']['data']['toView'](_0x5958dc,{}),_0x3e6224=Array['from'](_0x2e65c8['getChildren']())['map'](_0x5a4cb6=>this['_getViewJson'](_0x5a4cb6));return JSON['stringify'](_0x3e6224);}['_getViewJson'](_0x4900c9){if(_0x4900c9['is']('$text'))return _0x4900c9['data'];{const _0xe1c713=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0xe5940=_0x4900c9,_0x2ebd01=this['editor']['data']['htmlProcessor']['domConverter'],_0x188555={'type':_0xe1c713['_getTypeCharForViewElement'](_0xe5940),'name':_0xe5940['name'],'attributes':Array['from'](_0xe5940['getAttributes']()),'children':Array['from'](_0xe5940['getChildren']())['map'](_0x4542d4=>this['_getViewJson'](_0x4542d4))};if(_0x4900c9['is']('uiElement')&&'$comment'!=_0x4900c9['name']){const _0x249999=_0x4900c9['render'](_0x2ebd01['domDocument'],_0x2ebd01);_0x188555['children']['push'](_0x249999['outerHTML']);}else{if(_0x4900c9['is']('rawElement')){const _0x26f845=_0x2ebd01['domDocument']['createElement'](_0xe5940['name']);_0x4900c9['render'](_0x26f845,_0x2ebd01),_0x188555['children']['push'](_0x26f845['innerHTML']);}}const _0x19002b=Array['from'](_0xe5940['getCustomProperties']());_0x19002b['length']>0x0&&(_0x188555['customProperties']=_0x19002b);const _0x3d113c=_0xe5940['getFillerOffset']();return null!==_0x3d113c&&(_0x188555['fillerOffset']=_0x3d113c),_0x188555;}}['_markChanges'](_0x5c5c8d,_0xa50c28,_0xfc7f1d,_0x4af3a1,_0x374144){let _0xfbc03e=null,_0x4d115c=null,_0x5e4d70=0x0;const _0x3e8f51=this['editor']['model'];for(let _0x8b649d=0x0;_0x8b649d<_0xa50c28['length'];_0x8b649d++){const _0x5bbbac=this['_getVidAttributeName'](_0xa50c28[_0x8b649d]),_0x13c3b3=_0xa50c28[_0x8b649d]['item']['getAttribute'](_0x5bbbac),_0x5e3680=_0xfc7f1d['get'](_0x13c3b3),_0x223204=_0x8b649d==_0xa50c28['length']-0x1;(!_0xfbc03e&&_0x5e3680&&(_0xfbc03e=_0x5e3680,_0x4d115c=_0xa50c28[_0x8b649d]),_0xfbc03e&&(!_0x5e3680||_0x5e3680['userId']!=_0xfbc03e['userId']))&&(_0x20f5dc(_0x5e3680,F(_0x4d115c,_0x5c5c8d,_0x3e8f51),F(_0xa50c28[_0x8b649d],_0x5c5c8d,_0x3e8f51)),_0xfbc03e=_0x5e3680||null,_0x4d115c=_0x5e3680?_0xa50c28[_0x8b649d]:null),_0xfbc03e&&_0x223204&&_0x20f5dc(_0x5e3680,F(_0x4d115c,_0x5c5c8d,_0x3e8f51),B(_0xa50c28[_0x8b649d],_0x5c5c8d,_0x3e8f51));}function _0x20f5dc(_0x1ce2b2,_0x4a7de2,_0x5dd6cf){const _0x20504e=_0xfbc03e['userId'],_0x3b85ba='revision:'+_0x4af3a1+':'+_0x20504e+':'+_0x5e4d70++,_0x5d74db=_0x3e8f51['createRange'](_0x4a7de2,_0x5dd6cf);_0x5c5c8d['markers']['set'](_0x3b85ba,_0x5d74db),null!==_0x20504e&&_0x374144['add'](_0x20504e);}}['_getVidAttributeName'](_0x4b375b){switch(_0x4b375b['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x53a6c3,_0x1d11c3){_0x53a6c3['baseVersion']=null;for(const _0x301361 in _0x53a6c3){const _0x92c86a=_0x53a6c3[_0x301361];if(_0x92c86a instanceof vt){const _0x1f4ba7=_0x1d11c3['get'](_0x92c86a['root']['rootName']);_0x53a6c3[_0x301361]=this['_fixPosition'](_0x92c86a,_0x1f4ba7);}if(_0x92c86a instanceof ft){const _0x25ad6a=_0x1d11c3['get'](_0x92c86a['root']['rootName']);_0x53a6c3[_0x301361]=this['_fixRange'](_0x92c86a,_0x25ad6a);}'root'===_0x301361&&(_0x53a6c3['root']=_0x1d11c3['get'](_0x53a6c3['root']['rootName']));}}['_fixRange'](_0x30e5b6,_0x132388){return this['editor']['model']['createRange'](this['_fixPosition'](_0x30e5b6['start'],_0x132388),this['_fixPosition'](_0x30e5b6['end'],_0x132388));}['_fixPosition'](_0x35d830,_0x2663f1){return this['editor']['model']['createPositionFromPath'](_0x2663f1,_0x35d830['path'],_0x35d830['stickiness']);}['_handleInsertOperation'](_0x7361e0){const _0x4869b4=this['_idsRoots']['get'](_0x7361e0['position']['root']['rootName']),_0x4b39b2=this['_fixPosition'](_0x7361e0['position'],_0x4869b4),_0x4d158b=null===_0x7361e0['_authorId']?null:_0x7361e0['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4aa057=_0x4b39b2['parent'],_0x3fe90a=this['_revisionId'],_0x596842=[];for(const _0x27e34d of _0x7361e0['nodes'])if(_0x27e34d['is']('element'))_0x596842['push'](this['_makeIdsRoot'](_0x27e34d));else{for(let _0x14ae2c=0x0;_0x14ae2c<_0x27e34d['offsetSize'];_0x14ae2c++)_0x596842['push'](new ut('$text',{'vid':this['_revisionId']++}));}const _0x47b444=this['_revisionId'];for(let _0x2bd3be=_0x3fe90a;_0x2bd3be<_0x47b444;_0x2bd3be++)this['_touched']['set'](_0x2bd3be,{'userId':_0x4d158b});_0x4aa057['_insertChild'](_0x4b39b2['offset'],_0x596842);}['_handleMoveOperation'](_0x55b480){(_0x55b480=this['_cloneOperation'](_0x55b480,this['_idsRoots']))['_execute']();const _0x4689ce=null===_0x55b480['_authorId']?null:_0x55b480['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2388a9=_0x55b480['getMovedRangeStart'](),_0x325475=_0x2388a9['parent'],_0x53ef80=_0x2388a9['offset'];!function _0x4f45e3(_0x418a6d,_0x5e673a,_0x35670d,_0x36cc56){for(let _0x2841c4=_0x35670d;_0x2841c4<_0x36cc56;_0x2841c4++){const _0x3d90f4=_0x5e673a['getChild'](_0x2841c4);_0x3d90f4['is']('element','$text')?_0x418a6d['set'](_0x3d90f4['getAttribute']('vid'),{'userId':_0x4689ce}):(_0x418a6d['set'](_0x3d90f4['getAttribute']('vid_start'),{'userId':_0x4689ce}),_0x4f45e3(_0x418a6d,_0x3d90f4,0x0,_0x3d90f4['childCount']),_0x418a6d['set'](_0x3d90f4['getAttribute']('vid_end'),{'userId':_0x4689ce}));}}(this['_touched'],_0x325475,_0x53ef80,_0x53ef80+_0x55b480['howMany']);}['_handleMergeOperation'](_0x1259b0){const _0x307b0e=null===(_0x1259b0=this['_cloneOperation'](_0x1259b0,this['_idsRoots']))['_authorId']?null:_0x1259b0['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x549c68=_0x1259b0['targetPosition']['parent'],_0x3f5e8c=_0x1259b0['sourcePosition']['parent'],_0xdfcb16=_0x549c68['getAttribute']('vid_end'),_0x5733af=_0x3f5e8c['getAttribute']('vid_start');_0x549c68['_setAttribute']('vid_end',_0x3f5e8c['getAttribute']('vid_end')),_0x3f5e8c['_setAttribute']('vid_end',_0xdfcb16),this['_touched']['set'](_0x5733af,{'userId':_0x307b0e}),this['_touched']['set'](_0xdfcb16,{'userId':_0x307b0e}),_0x1259b0['_execute']();}['_handleSplitOperation'](_0xf1bc73){const _0x920a85=null===(_0xf1bc73=this['_cloneOperation'](_0xf1bc73,this['_idsRoots']))['_authorId']?null:_0xf1bc73['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x43128e=_0xf1bc73['graveyardPosition'],_0x2b2a34=_0xf1bc73['splitPosition']['parent'];_0xf1bc73['_execute']();const _0x12bfc2=_0x2b2a34['getAttribute']('vid_end'),_0x531e35=_0xf1bc73['insertionPosition']['nodeAfter'];if(_0x43128e){const _0x34b192=_0x531e35['getAttribute']('vid_end'),_0x56fdf4=_0x2b2a34['getAttribute']('vid_end');_0x2b2a34['_setAttribute']('vid_end',_0x34b192),_0x531e35['_setAttribute']('vid_end',_0x56fdf4),this['_touched']['set'](_0x2b2a34['getAttribute']('vid_end'),{'userId':_0x920a85}),this['_touched']['set'](_0x531e35['getAttribute']('vid_start'),{'userId':_0x920a85});}else{const _0x1f33f7=this['_revisionId']++,_0x30ecf7=this['_revisionId']++;_0x2b2a34['_setAttribute']('vid_end',_0x1f33f7),_0x531e35['_setAttribute']('vid_start',_0x30ecf7),_0x531e35['_setAttribute']('vid_end',_0x12bfc2),this['_touched']['set'](_0x1f33f7,{'userId':_0x920a85}),this['_touched']['set'](_0x30ecf7,{'userId':_0x920a85});}}['_handleMarkerOperation'](_0x3d0fe5){if(!_0x3d0fe5['affectsData'])return;const _0x29e813=(_0x3d0fe5=this['_cloneOperation'](_0x3d0fe5,this['_diffRoots']))['oldRange']?_0x3d0fe5['oldRange']['root']:null,_0x593397=_0x3d0fe5['newRange']?_0x3d0fe5['newRange']['root']:null;_0x29e813&&this['_markers']['delete'](_0x3d0fe5['name']),_0x593397&&this['_markers']['set'](_0x3d0fe5['name'],_0x3d0fe5['newRange']['clone']());const _0x3e2463=null===_0x3d0fe5['_authorId']?null:_0x3d0fe5['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2e8abf=_0x3d0fe5['name'];if(!this['_touchedMarkers']['has'](_0x2e8abf))return void this['_touchedMarkers']['set'](_0x2e8abf,{'range':_0x3d0fe5['oldRange'],'userId':_0x3e2463});const _0x2d1ebb=this['_touchedMarkers']['get'](_0x2e8abf),_0x103c3d=_0x2d1ebb['range'],_0x5ba265=_0x3d0fe5['newRange'];null==_0x103c3d&&null==_0x5ba265||_0x103c3d&&_0x5ba265&&_0x103c3d['isEqual'](_0x5ba265)?this['_touchedMarkers']['delete'](_0x3d0fe5['name']):_0x2d1ebb['userId']=_0x3e2463;}['_handleRootOperation'](_0x54eebf,_0x336785){this['_diffRoots']['has'](_0x54eebf['rootName'])?this['_diffRoots']['get'](_0x54eebf['rootName'])['_isAttached']=_0x54eebf['isAdd']:(this['_diffRoots']['set'](_0x54eebf['rootName'],P(_0x54eebf['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x54eebf['rootName'],{}),_0x336785&&this['_idsRoots']['set'](_0x54eebf['rootName'],P(_0x54eebf['rootName'],!0x0)));const _0x3475b1=null===_0x54eebf['_authorId']?null:_0x54eebf['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1e508c=this['_touchedRoots']['get'](_0x54eebf['rootName']);_0x1e508c&&_0x1e508c['userId']===_0x3475b1?this['_touchedRoots']['delete'](_0x54eebf['rootName']):this['_touchedRoots']['set'](_0x54eebf['rootName'],{'userId':_0x3475b1,'isAttached':_0x54eebf['isAdd']});}['_handleRootAttributeOperation'](_0x5804de){const _0x5ae24d=this['_diffRootsAttributes']['get'](_0x5804de['root']['rootName']);null===_0x5804de['newValue']?delete _0x5ae24d[_0x5804de['key']]:_0x5ae24d[_0x5804de['key']]=_0x5804de['newValue'];}}function N(_0x1b6989){const _0x2b9494=P(_0x1b6989['rootName'],_0x1b6989['isAttached']());for(const _0x2b73a4 of _0x1b6989['getChildren']()){const _0x595f27=_0x2b73a4['_clone'](!0x0);_0x2b9494['_appendChild'](_0x595f27);}return _0x2b9494;}function P(_0x422de4,_0x1f0cff=!0x0){const _0x505161=new gt();return _0x505161['rootName']=_0x422de4,_0x505161['_isAttached']=_0x1f0cff,_0x505161['isAttached']=()=>_0x505161['_isAttached'],_0x505161;}function F(_0x24b6ba,_0x192674,_0xd47300){const _0x12dc32='elementEnd'==_0x24b6ba['type']?_0xd47300['createPositionAt'](_0x24b6ba['item'],'end'):_0xd47300['createPositionBefore'](_0x24b6ba['item']);return _0xd47300['createPositionFromPath'](_0x192674,_0x12dc32['path'],_0x12dc32['stickiness']);}function B(_0x94049e,_0x5f0b38,_0x418395){const _0x20c7dd='elementStart'==_0x94049e['type']?_0x418395['createPositionAt'](_0x94049e['item'],0x0):_0x418395['createPositionAfter'](_0x94049e['item']);return _0x418395['createPositionFromPath'](_0x5f0b38,_0x20c7dd['path'],_0x20c7dd['stickiness']);}class os extends _0x745a8d{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x4db681,_0x4032be){super(_0x4db681),this['focusTracker']=new _0x5c6e07(),this['keystrokes']=new _0x1c65d2(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x4032be),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'](),_0x1f975a({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x31d18e=_0x2bcc0f=>_0x2bcc0f['stopPropagation']();this['keystrokes']['set']('arrowright',_0x31d18e),this['keystrokes']['set']('arrowleft',_0x31d18e),this['keystrokes']['set']('arrowup',_0x31d18e),this['keystrokes']['set']('arrowdown',_0x31d18e);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x1aa811){this['revisionNameInputView']['fieldView']['element']['value']=_0x1aa811['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x42280c){const _0x1e7c95=new nt(this['locale'],ti),_0x98146b=_0x1e7c95['fieldView'];_0x98146b['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x27c5eb=g(this['locale'],'Name\x20of\x20the\x20revision');return!_0x42280c&&(_0x27c5eb+='\x20('+g(this['locale'],'optional')+')'),(_0x1e7c95['label']=_0x27c5eb,_0x98146b['on']('input',()=>{this['revisionNameInputValue']=_0x98146b['element']['value']['trim']();}),_0x1e7c95);}}class f extends _0x4eb38d{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}['_saveRevisionFormView'];['init'](){const _0x4e2be2=this['editor'],_0xf210ef=_0x4e2be2['plugins']['get']('RevisionTracker');_0x4e2be2['ui']['componentFactory']['add']('revisionHistory',_0x129cfa=>{const _0x5cb1b4=_0x2fa9d9(_0x129cfa),_0x2b6b26=_0x5cb1b4['panelView']['children'],_0x293356=new _0x226ede(_0x129cfa),_0x31a41d=new te(_0x129cfa),_0x58da40=new _0x537db8(_0x129cfa),_0x1a1441=new te(_0x129cfa),_0x294073=new _0x537db8(_0x129cfa);return _0x5cb1b4['bind']('isEnabled')['to'](_0xf210ef,'isReady',_0xf210ef,'isEnabled',_0x4e2be2,'isReadOnly',(_0x3f0c82,_0x4a3ec8,_0x26a77c)=>_0x3f0c82&&_0x4a3ec8&&!_0x26a77c),_0x5cb1b4['buttonView']['set']({'icon':_0x2f0552,'label':g(_0x129cfa,'Revision\x20history'),'tooltip':!0x0}),_0x58da40['set']({'label':g(_0x129cfa,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x58da40['bind']('isEnabled')['to'](_0xf210ef,'isReady',_0xf210ef,'isEnabled',_0x4e2be2,'isReadOnly',(_0x16ed05,_0x12ba33,_0x5ad901)=>_0x16ed05&&_0x12ba33&&!_0x5ad901),_0x58da40['on']('execute',()=>this['_showDialog']()),_0x294073['set']({'label':g(_0x129cfa,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x294073['bind']('isEnabled')['to'](_0xf210ef,'isReady',_0x4e2be2,'isReadOnly',(_0xb1f05e,_0x8f0e0a)=>_0xb1f05e&&!_0x8f0e0a),_0x294073['on']('execute',()=>{_0x4e2be2['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x5cb1b4['isOpen']=!0x1,_0x4e2be2['editing']['view']['focus']();}),_0x31a41d['children']['add'](_0x58da40),_0x1a1441['children']['add'](_0x294073),_0x293356['role']='menu',_0x293356['items']['addMany']([_0x31a41d,_0x1a1441]),_0x2b6b26['add'](_0x293356),_0x5cb1b4;}),_0x4e2be2['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x4a3883=this['editor'],_0x24c75d=_0x4a3883['locale'],_0x1d9b17=new _0x356cb3(_0x24c75d),_0x24f4eb=new _0x28cf76(_0x24c75d);_0x1d9b17['buttonView']['set']({'icon':_0x2f0552,'label':g(_0x24c75d,'Revision\x20history')});const _0x484ffb=new _0x3e7b64(_0x24c75d,_0x1d9b17),_0x12960e=new _0x514805(_0x24c75d);_0x12960e['set']({'label':g(_0x24c75d,'Save\x20current\x20revision')}),_0x12960e['delegate']('execute')['to'](_0x1d9b17),_0x12960e['on']('execute',()=>{this['_showDialog']();}),_0x484ffb['children']['add'](_0x12960e),_0x24f4eb['items']['add'](_0x484ffb);const _0x413994=new _0x3e7b64(_0x24c75d,_0x1d9b17),_0x4b6ce3=new _0x514805(_0x24c75d);return _0x4b6ce3['set']({'label':g(_0x24c75d,'Open\x20revision\x20history')}),_0x4b6ce3['delegate']('execute')['to'](_0x1d9b17),_0x4b6ce3['on']('execute',()=>{_0x4a3883['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x413994['children']['add'](_0x4b6ce3),_0x24f4eb['items']['add'](_0x413994),_0x1d9b17['panelView']['children']['add'](_0x24f4eb),_0x1d9b17;}['_showDialog'](){const _0x57d917=this['editor'],_0x374e77=_0x57d917['locale'],_0x1b94b8=_0x57d917['plugins']['get']('Dialog'),_0x143500=_0x57d917['plugins']['get']('RevisionTracker');function _0x1f6580(_0x2447fb){_0x57d917['config']['get']('revisionHistory.requireRevisionName')&&''===_0x2447fb['revisionName']?_0x2447fb['revisionNameInputView']['errorText']=g(_0x374e77,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x57d917['plugins']['get'](u)['saveRevision']({'name':_0x2447fb['revisionName']}),_0x1b94b8['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x1f6580(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x1b94b8['show']({'id':'revisionSave','title':g(_0x374e77,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':g(_0x57d917['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x1b94b8['hide']()},{'label':g(_0x57d917['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x4890ce){_0x4890ce['bind']('isEnabled')['to'](_0x143500,'isReady',_0x143500,'isEnabled',_0x57d917,'isReadOnly',(_0x5516d1,_0x2b7a6d,_0x248758)=>_0x5516d1&&_0x2b7a6d&&!_0x248758);},'onExecute':()=>_0x1f6580(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x493987=this['editor'],_0x4f0de1=_0x493987['locale'];this['_saveRevisionFormView']=new os(_0x4f0de1,_0x493987['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class Q extends _0x745a8d{['changeId'];['_model'];constructor(_0x43c082,_0xb55a9e){super(_0x43c082),this['_model']=_0xb55a9e,this['changeId']=_0xb55a9e['id'];const _0x41a4f7=this['bindTemplate'],_0x121a43=g(_0x43c082,_0xb55a9e['data']['isSuggestion']?'Suggested\x20by':'add'==_0xb55a9e['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0xb55a9e['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x41a4f7['to']('type',_0x3e8be8=>'ck-revision-change__'+_0x3e8be8)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x121a43}]},{'text':'\x20'+_0xb55a9e['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
25
+ _0x3fd0d6(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x5b8e28){super(),this['id']=_0x5b8e28['id']||_0x423624(),this['author']=_0x5b8e28['author'],this['type']=_0x5b8e28['type'],this['data']=_0x5b8e28['data']||{},this['rootName']=_0x5b8e28['rootName'],this['set']('createdAt',_0x5b8e28['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(_0x2ba367,_0xed8587){this['newRevisionId']=_0x2ba367,this['oldRevisionId']=_0xed8587,this['changes']=new _0x5c68d2();}['_setChanges'](_0xa39862){for(const _0x120ae0 of _0xa39862)this['changes']['add'](_0x120ae0);}}class m extends _0x4eb38d{['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[_0x266938,_0x1b49dd,I,V];}constructor(_0x23f960){super(_0x23f960),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',(_0x11f3a7,_0x55b4f2,_0x13090e)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x26eed2=>{for(const _0x2160a9 of this['editor']['editing']['view']['document']['roots'])_0x13090e?_0x26eed2['removeClass']('ck-editor__editable__overlay',_0x2160a9):_0x26eed2['addClass']('ck-editor__editable__overlay',_0x2160a9);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x196387=>null!==_0x196387),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x2ffd53,_0x1f6d8d,_0x10aed6)=>_0x2ffd53&&_0x10aed6?_0x1f6d8d['changes']['getIndex'](_0x10aed6):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x2c80d6,_0x237bb1)=>_0x2c80d6?_0x237bb1['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x1b49dd);}['init'](){const _0x220402=this['editor'],_0xee8514=new pt(_0x220402,{'direction':'backward'}),_0x3bf939=new pt(_0x220402,{'direction':'forward'});(_0x220402['commands']['add']('showPreviousChange',_0xee8514),_0x220402['commands']['add']('showNextChange',_0x3bf939),_0x220402['commands']['add']('restoreRevision',new wt(_0x220402)),this['on']('change:numberOfChanges',()=>{_0xee8514['refresh'](),_0x3bf939['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x220402['enableReadOnlyMode']('revision-viewer'),_0x220402['plugins']['has']('WidgetToolbarRepository'))&&_0x220402['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x552a0e){return await this['_utils']['loadRevisionData'](_0x552a0e,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x552a0e);}async['getRevisionRootsAttributes'](_0x47b31d){return await this['_utils']['loadRevisionData'](_0x47b31d,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x47b31d);}async['compare'](_0x435789,_0x4d3754,_0x479d38=!0x1){if(!this['isEnabled'])return;const _0x42a769=this['diff'],_0x2f063e=this['repository'],_0x3bb29d='string'==typeof _0x435789?_0x2f063e['getRevision'](_0x435789):_0x435789,_0x21638f='string'==typeof _0x4d3754?_0x2f063e['getRevision'](_0x4d3754):_0x4d3754,_0x135b67=_0x3bb29d['id'],_0x3e1323=_0x21638f?_0x21638f['id']:null;if(!_0x479d38&&this['diff']&&this['diff']['newRevisionId']===_0x135b67&&this['diff']['oldRevisionId']===_0x3e1323)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new c(_0x135b67,_0x3e1323);const _0x17d6e8=this['_getRevisionsRange'](_0x3bb29d,_0x21638f,!0x0)['map'](_0x4dcbc4=>this['_utils']['loadRevisionData'](_0x4dcbc4,this['adapter']));return _0x17d6e8['push'](new Promise(_0x2e8739=>{setTimeout(_0x2e8739,0x14);})),Promise['all'](_0x17d6e8)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x118437=this['_getDiff'](_0x135b67,_0x3e1323);for(const _0x59d030 of _0x118437['changes'])this['_changeIdToChange']['set'](_0x59d030['id'],_0x59d030);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x2ab8d5=>{for(const _0x1f544c of this['editor']['model']['document']['getRootNames']())_0x2ab8d5['detachRoot'](_0x1f544c);for(const _0x3c1e8d of Object['keys'](_0x118437['model'])){const _0x2a3f2c=_0x2ab8d5['addRoot'](_0x3c1e8d);for(const _0x8ccb51 of Object['keys'](_0x118437['attributes'][_0x3c1e8d]))_0x2ab8d5['setAttribute'](_0x8ccb51,_0x118437['attributes'][_0x3c1e8d][_0x8ccb51],_0x2a3f2c);_0x2ab8d5['insert'](_0x118437['model'][_0x3c1e8d],_0x2a3f2c,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x118437['changes'])),this['isReady']=!0x0;})['catch'](_0x48fb3b=>{console['error'](_0x48fb3b),this['_cleanUp'](),_0x42a769&&(this['diff']=_0x42a769),this['isReady']=!0x0;});}['addRevisionData'](_0x4b252e,_0x192c8f){const _0x1086da=this['repository']['createRevision'](_0x4b252e);return _0x1086da['on']('_update',(_0x4b2368,_0x4a1077,_0x31e6f3)=>_0x192c8f(_0x4a1077,_0x31e6f3,_0x1086da)),this['repository']['addRevision'](_0x1086da),_0x1086da;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x3ef69d=>{for(const _0x3eab50 of this['editor']['model']['document']['getRootNames']())_0x3ef69d['detachRoot'](_0x3eab50);});}['_sortAndFilterDiffChanges'](_0x5db70f){const _0x3edde9=[],_0x36ad4f=new Map();for(const _0x4455c7 of this['editor']['model']['document']['getRootNames']()){const _0x2f2934=this['editor']['editing']['view']['getDomRoot'](_0x4455c7);if(!_0x2f2934)continue;const _0x3a6f08=_0x2f2934['getClientRects']()['item'](0x0);_0x3a6f08&&(_0x3edde9['push'](_0x4455c7),_0x36ad4f['set'](_0x4455c7,_0x3a6f08));}return _0x3edde9['sort']((_0x3be640,_0x34a183)=>{const _0x1f3cd1=_0x36ad4f['get'](_0x3be640),_0x4e17a3=_0x36ad4f['get'](_0x34a183);return _0x1f3cd1['y']-_0x4e17a3['y']||_0x1f3cd1['x']-_0x4e17a3['x'];}),(_0x5db70f=_0x5db70f['filter'](_0x233500=>_0x3edde9['includes'](_0x233500['rootName'])))['sort']((_0x9a98aa,_0x5457a1)=>_0x3edde9['indexOf'](_0x9a98aa['rootName'])-_0x3edde9['indexOf'](_0x5457a1['rootName'])),_0x5db70f;}['_makeTape'](_0x249565){const _0x245e10=Array['from'](_0x249565['markers'])['filter'](([_0x483063,_0x37a821])=>_0x483063['startsWith']('revision:')&&!_0x37a821['isCollapsed']),_0x1bd65d=Array['from'](this['editor']['model']['createRangeIn'](_0x249565)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x245e10['length'])for(const _0x5242d2 of _0x1bd65d){const [_0x43b979,_0x24cb08]=_0x245e10[0x0],[,_0x1f43ce,_0x41ca46]=_0x43b979['split'](':');if(_0x24cb08['end']['isEqual'](_0x5242d2['nextPosition'])&&_0x245e10['shift'](),(_0x5242d2['previousPosition']['isEqual'](_0x24cb08['start'])||_0x5242d2['previousPosition']['isAfter'](_0x24cb08['start']))&&('insertion'==_0x1f43ce?_0x5242d2['isAdded']={'userId':_0x41ca46}:'deletion'==_0x1f43ce&&(_0x5242d2['isRemoved']={'userId':_0x41ca46})),0x0==_0x245e10['length'])break;}return _0x1bd65d;}['_refreshStartEndIndex'](_0x458cf1){const _0x1e9a08=new Map();for(let _0x3d71ae=0x0;_0x3d71ae<_0x458cf1['length'];_0x3d71ae++)'text'===_0x458cf1[_0x3d71ae]['type']?(_0x458cf1[_0x3d71ae]['item']['startIndex']=_0x3d71ae,_0x458cf1[_0x3d71ae]['item']['endIndex']=_0x3d71ae):('elementStart'===_0x458cf1[_0x3d71ae]['type']?_0x458cf1[_0x3d71ae]['item']['startIndex']=_0x3d71ae:'elementEnd'===_0x458cf1[_0x3d71ae]['type']&&(_0x458cf1[_0x3d71ae]['item']['endIndex']=_0x3d71ae),_0x1e9a08['set'](_0x458cf1[_0x3d71ae]['id'],_0x3d71ae));for(const _0x27893b of _0x1e9a08['values']())'elementStart'===_0x458cf1[_0x27893b]['type']?_0x458cf1[_0x27893b]['item']['endIndex']=_0x1e9a08['get'](_0x458cf1[_0x27893b]['pairId']):'elementEnd'===_0x458cf1[_0x27893b]['type']&&(_0x458cf1[_0x27893b]['item']['startIndex']=_0x1e9a08['get'](_0x458cf1[_0x27893b]['pairId']));}['_processTape'](_0x241978){for(let _0x10b185=0x0;_0x10b185<_0x241978['length'];_0x10b185++){if('elementStart'===_0x241978[_0x10b185]['type'])_0x241978[_0x10b185]['item']['startIndex']=_0x10b185;else{if('elementEnd'===_0x241978[_0x10b185]['type']){_0x241978[_0x10b185]['item']['endIndex']=_0x10b185;const _0x2f5460=_0x241978[_0x10b185]['item']['startIndex'];_0x241978[_0x2f5460]['pairId']=_0x241978[_0x10b185]['id'],_0x241978[_0x10b185]['pairId']=_0x241978[_0x2f5460]['id'];}else _0x241978[_0x10b185]['item']['startIndex']=_0x10b185,_0x241978[_0x10b185]['item']['endIndex']=_0x10b185,_0x241978[_0x10b185]['pairId']=null;}_0x241978[_0x10b185]['markersStart']||(_0x241978[_0x10b185]['markersStart']=[],_0x241978[_0x10b185]['markersEnd']=[]);}}['_markInsertions'](_0x5cde1b,_0x307a3e){const _0x367512=_0x5cde1b['filter'](_0x270eaa=>!_0x270eaa['isAdded']);for(let _0x286aae=0x0;_0x286aae<_0x307a3e['length'];_0x286aae++)_0x307a3e[_0x286aae]['isAdded']&&(_0x367512[_0x286aae]['isAdded']=_0x307a3e[_0x286aae]['isAdded']);}['_getDiff'](_0x31b9ed,_0x9833a=null){const _0x450dd4=this['repository']['getRevision'](_0x31b9ed),_0x2e6ba3=_0x9833a?this['repository']['getRevision'](_0x9833a):null,_0x112e79=this['_getRevisionsRange'](_0x450dd4,_0x2e6ba3),_0x98c70=_0x112e79[_0x112e79['length']-0x1],_0x111848=new Map(),_0x1a61b8={'model':{},'attributes':{},'changes':[]},_0x5135da=new Set(),_0x4bcb6f=new Map();for(let _0x32bcd0=_0x112e79['length']-0x1;_0x32bcd0>=0x0;_0x32bcd0--){const _0x2a3974=_0x112e79[_0x32bcd0];for(const _0x3ca0ef of Object['keys'](_0x2a3974['diffData']))if(_0x2a3974['diffData'][_0x3ca0ef]['attachChange']){const _0x2f5417=_0x2a3974['diffData'][_0x3ca0ef]['attachChange'];_0x2f5417['isAttached']?(_0x5135da['add'](_0x3ca0ef),_0x4bcb6f['has'](_0x3ca0ef)&&_0x4bcb6f['get'](_0x3ca0ef)['userId']==_0x2f5417['userId']?_0x4bcb6f['delete'](_0x3ca0ef):_0x4bcb6f['set'](_0x3ca0ef,_0x2f5417)):_0x4bcb6f['has'](_0x3ca0ef)?(_0x5135da['delete'](_0x3ca0ef),_0x4bcb6f['delete'](_0x3ca0ef)):(_0x5135da['add'](_0x3ca0ef),_0x4bcb6f['set'](_0x3ca0ef,_0x2f5417));}else _0x5135da['add'](_0x3ca0ef);}for(const _0x59258e of _0x5135da){const _0x2f8a9d=_0x4bcb6f['has'](_0x59258e)&&!_0x4bcb6f['get'](_0x59258e)['isAttached'];let _0x5b33b0=_0x2f8a9d?_0x112e79['length']-0x1:0x0;const _0x2acfa1=_0x2f8a9d?-0x1:0x1;for(;_0x112e79[_0x5b33b0];){const _0x2ca8c9=_0x112e79[_0x5b33b0];if(_0x2ca8c9['diffData'][_0x59258e]){const _0x2ffcda=_0x2f8a9d?_0x2ca8c9['diffData'][_0x59258e]['attributesBefore']:_0x2ca8c9['diffData'][_0x59258e]['attributesAfter'];_0x1a61b8['attributes'][_0x59258e]=_0x2ffcda?_0xf4506f(_0x2ffcda):{};break;}_0x5b33b0+=_0x2acfa1;}}for(const _0x348d08 of _0x112e79){_0x348d08['model']={};for(const _0x396c31 of _0x348d08['authors'])_0x111848['set'](_0x396c31['id'],_0x396c31);for(const _0x5ecf84 of _0x5135da){const _0x20ddb3=_0x348d08['diffData'][_0x5ecf84]?_0x348d08['diffData'][_0x5ecf84]['insertions']:'[]',_0x21d03d=_0x348d08['diffData'][_0x5ecf84]?_0x348d08['diffData'][_0x5ecf84]['deletions']:'[]';_0x348d08['model'][_0x5ecf84]={'insertions':this['_utils']['_makeModelFromViewString'](_0x20ddb3),'deletions':this['_utils']['_makeModelFromViewString'](_0x21d03d)};}}for(const _0x4768c4 of _0x5135da){let _0x116457=null,_0x3e3980=0x0;const _0x5c0907=new Map(Array['from'](_0x450dd4['model'][_0x4768c4]['insertions']['markers'])['filter'](([_0x2622d2])=>!_0x2622d2['startsWith']('revision:')));let _0xf5f033=0x0;for(const _0x5da4c4 of _0x112e79){const _0xd90915=this['_makeTape'](_0x5da4c4['model'][_0x4768c4]['insertions']);_0x5da4c4==_0x450dd4?(_0x116457=_0xd90915,_0x3e3980=_0x116457['length'],_0x116457['forEach'](_0x5e3b8b=>{_0x5e3b8b['id']=_0xf5f033++;}),this['_processTape'](_0x116457)):this['_markInsertions'](_0x116457,_0xd90915);const _0xef6317=_0x116457['filter'](_0x1b81d8=>!_0x1b81d8['isAdded'])['map'](_0x11ce2a=>_0x11ce2a['id']);let _0x2b2841=0x0;const _0x7c0007=this['_makeTape'](_0x5da4c4['model'][_0x4768c4]['deletions']);_0x7c0007['forEach'](_0xa7da6e=>{_0xa7da6e['isRemoved']?_0xa7da6e['id']=_0x3e3980++:_0xa7da6e['id']=_0xef6317[_0x2b2841++];}),this['_processTape'](_0x7c0007),this['_setDistance'](_0x116457,'isAdded'),this['_setDistance'](_0x7c0007,'isRemoved'),_0x5da4c4==_0x450dd4&&this['_markMarkers'](_0x116457,_0x5c0907),_0x116457=this['_joinTapes'](_0x116457,_0x7c0007),this['_refreshStartEndIndex'](_0x116457),this['_setDistance'](_0x116457,'isRemoved');}_0x116457=_0x116457['filter'](_0x55e563=>!(_0x55e563['isAdded']&&_0x55e563['isRemoved']));const _0x360659=new Map(_0x98c70['model'][_0x4768c4]['deletions']['markers']),_0xb9da61=new Set(_0x5c0907['keys']());for(const _0x2bffce of _0x360659['keys']())_0xb9da61['delete'](_0x2bffce);this['_markSuggestions'](_0x116457,_0xb9da61),this['_fixObsoleteTags'](_0x116457),_0x116457=this['_removeMissingPairs'](_0x116457),_0x116457=this['_markMismatchedRemovedTags'](_0x116457),_0x116457=this['_removeUnsupportedChanges'](_0x116457);const {root:_0x46573f,changes:_0x13165c}=this['_makeModelFromTape'](_0x116457,_0x111848,_0x4768c4);_0x1a61b8['model'][_0x4768c4]=_0x46573f;const _0x1c73f2=_0x4bcb6f['get'](_0x4768c4);if(_0x1c73f2){const _0x23f195=_0x111848['get'](_0x1c73f2['userId']),_0x35bd68=new r({'author':_0x23f195,'type':_0x1c73f2['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x4768c4});_0x13165c['unshift'](_0x35bd68),_0x1a61b8['attributes'][_0x4768c4]['revisionHistoryAttachChange']=_0x35bd68['id'];}_0x1a61b8['changes']=_0x1a61b8['changes']['concat'](_0x13165c);}return _0x1a61b8;}['_markMarkers'](_0x3744ec,_0xe51f68){for(let _0x22a6fc=0x0;_0x22a6fc<_0x3744ec['length'];_0x22a6fc++)for(const [_0x4bc449,_0x468f6e]of _0xe51f68)!_0x468f6e['isCollapsed']&&_0x468f6e['start']['isEqual'](_0x3744ec[_0x22a6fc]['previousPosition'])&&_0x3744ec[_0x22a6fc]['markersStart']['push'](_0x4bc449),_0x468f6e['end']['isEqual'](_0x3744ec[_0x22a6fc]['nextPosition'])&&_0x3744ec[_0x22a6fc]['markersEnd']['push'](_0x4bc449);}['_joinTapes'](_0x34b5fe,_0xd93e2){let _0x4cb2a0=[],_0x13aab5=0x0,_0x131a9b=0x0;for(;_0x13aab5<_0x34b5fe['length']||_0x131a9b<_0xd93e2['length'];){const _0x31d843=_0x34b5fe[_0x13aab5]||{},_0x1eb9a8=_0xd93e2[_0x131a9b]||{};if(_0x31d843['id']==_0x1eb9a8['id'])_0x13aab5++,_0x131a9b++,_0x4cb2a0['push'](_0x31d843);else{if(_0x1eb9a8['isRemoved']&&_0x31d843['isAdded']){const {commonTape:_0x2b5378,iEnd:_0x474866,jEnd:_0x57e038}=this['_threeWayMerge'](_0x34b5fe,_0x13aab5,_0xd93e2,_0x131a9b);_0x4cb2a0=_0x4cb2a0['concat'](_0x2b5378),_0x13aab5=_0x474866,_0x131a9b=_0x57e038;}else _0x1eb9a8['isRemoved']?(_0x131a9b++,_0x4cb2a0['push'](_0x1eb9a8)):(_0x13aab5++,_0x4cb2a0['push'](_0x31d843));}}return _0x4cb2a0;}['_markSuggestions'](_0x1e7722,_0x462d49){const _0x1f5dcd=[];for(let _0x455d2e=0x0;_0x455d2e<_0x1e7722['length'];_0x455d2e++){for(let _0x500fc2=0x0;_0x500fc2<_0x1e7722[_0x455d2e]['markersStart']['length'];_0x500fc2++){const _0x3f52bb=_0x1e7722[_0x455d2e]['markersStart'][_0x500fc2];if(!_0x462d49['has'](_0x3f52bb))continue;const {group:_0x3c90bf,type:_0x10f917,authorId:_0x232393}=_0x3c4c1f(_0x3f52bb);'revision-suggestion'!=_0x3c90bf||'insertion'!=_0x10f917&&'deletion'!=_0x10f917||(_0x1f5dcd['unshift']({'type':_0x10f917,'name':_0x3f52bb,'userId':_0x232393}),_0x1e7722[_0x455d2e]['markersStart']['splice'](_0x500fc2,0x1),_0x500fc2--);}_0x334d54(_0x1e7722[_0x455d2e]);for(let _0x3e01da=0x0;_0x3e01da<_0x1e7722[_0x455d2e]['markersEnd']['length'];_0x3e01da++){const _0x14ede6=_0x1e7722[_0x455d2e]['markersEnd'][_0x3e01da];if(!_0x462d49['has'](_0x14ede6))continue;const {group:_0x2828da,type:_0x2a794f}=_0x3c4c1f(_0x14ede6);if('revision-suggestion'!=_0x2828da||'insertion'!=_0x2a794f&&'deletion'!=_0x2a794f)continue;_0x1e7722[_0x455d2e]['markersEnd']['splice'](_0x3e01da,0x1),_0x3e01da--;const _0x49b67e=_0x1f5dcd['findIndex'](_0x5da78a=>_0x5da78a['name']==_0x14ede6);_0x49b67e>-0x1&&_0x1f5dcd['splice'](_0x49b67e,0x1);}}function _0x3c4c1f(_0x3094e9){const _0x6250b4=_0x3094e9['split'](':');return{'group':_0x6250b4[0x0],'type':_0x6250b4[0x1],'subType':_0x6250b4['length']>=0x5?_0x6250b4[0x2]:null,'id':_0x6250b4['length']<0x5?_0x6250b4[0x2]:_0x6250b4[0x3],'authorId':_0x6250b4['length']<0x5?_0x6250b4[0x3]:_0x6250b4[0x4],'markerCount':0x6==_0x6250b4['length']?_0x6250b4[0x5]:null};}function _0x334d54(_0xa108d0){for(let _0x302d94=0x0;_0x302d94<_0x1f5dcd['length'];_0x302d94++){if(_0xa108d0['isAdded']&&'insertion'==_0x1f5dcd[_0x302d94]['type'])return _0xa108d0['isAddSuggestion']=_0x1f5dcd[_0x302d94],void delete _0xa108d0['isAdded'];if(!_0xa108d0['isAdded']&&!_0xa108d0['isRemoved']&&'deletion'==_0x1f5dcd[_0x302d94]['type'])return void(_0xa108d0['isRemoveSuggestion']=_0x1f5dcd[_0x302d94]);}}}['_setDistance'](_0x558c6a,_0x1b8c52){let _0x1a0f46=0x0,_0x50f3c4=!0x1;const _0x399ed8=new Map();for(const _0x17f38b of _0x558c6a)_0x17f38b[_0x1b8c52]?_0x50f3c4&&(_0x1a0f46++,_0x50f3c4=!0x1):(_0x1a0f46++,_0x50f3c4=!0x0),_0x399ed8['set'](_0x17f38b['id'],_0x1a0f46);for(let _0x49d395=0x0;_0x49d395<_0x558c6a['length'];_0x49d395++){if('isRemoved'==_0x1b8c52&&_0x558c6a[_0x49d395]['isAdded']||'isAdded'==_0x1b8c52&&_0x558c6a[_0x49d395]['isRemoved'])continue;if('text'==_0x558c6a[_0x49d395]['type']){_0x558c6a[_0x49d395]['distance']=0x0;continue;}const _0x12c440=_0x399ed8['get'](_0x558c6a[_0x49d395]['pairId']),_0x532662=_0x399ed8['get'](_0x558c6a[_0x49d395]['id']);_0x558c6a[_0x49d395]['distance']=_0x12c440-_0x532662;}}['_getRevisionsRange'](_0x182899,_0x55588b,_0x2d97cb=!0x1){const _0x49108a=[];let _0x527451=this['repository']['getIndex'](_0x182899),_0x3c600c=this['repository']['getIndex'](_0x55588b);for(-0x1==_0x3c600c&&(_0x3c600c=this['repository']['_revisions']['length'],_0x2d97cb=!0x1);_0x527451<_0x3c600c;)_0x49108a['push'](this['repository']['getRevision'](_0x527451)),_0x527451++;return _0x2d97cb&&_0x49108a['push'](this['repository']['getRevision'](_0x527451)),_0x49108a;}['_threeWayMerge'](_0x794983,_0x3c430c,_0x332a15,_0x52cc14){const _0x4a6a8b=this['editor']['model']['schema'];let _0x13e6e2=_0x3c430c;for(;_0x794983[_0x13e6e2]&&_0x794983[_0x13e6e2]['isAdded'];)_0x13e6e2++;let _0x5199ce=_0x52cc14;for(;_0x332a15[_0x5199ce]&&_0x332a15[_0x5199ce]['isRemoved'];)_0x5199ce++;_0x2289ad(_0x794983,_0x3c430c,_0x13e6e2),_0x2289ad(_0x332a15,_0x52cc14,_0x5199ce);const _0x44dfc2=_0x332a15['slice'](_0x52cc14,_0x5199ce)['concat'](_0x794983['slice'](_0x3c430c,_0x13e6e2));return _0x44dfc2['sort']((_0x2e7858,_0x3d6b88)=>_0x2e7858['side']!=_0x3d6b88['side']?_0x2e7858['side']-_0x3d6b88['side']:_0x2e7858['level']!=_0x3d6b88['level']?_0x2e7858['level']-_0x3d6b88['level']:_0x2e7858['distance']!=_0x3d6b88['distance']?_0x3d6b88['distance']-_0x2e7858['distance']:!!_0x2e7858['isAdded']!=!!_0x3d6b88['isAdded']?-0x1==_0x2e7858['side']||0x0==_0x2e7858['side']?_0x2e7858['isAdded']?-0x1:0x1:_0x2e7858['isAdded']?0x1:-0x1:_0x2e7858['index']-_0x3d6b88['index']),{'commonTape':_0x44dfc2,'iEnd':_0x13e6e2,'jEnd':_0x5199ce};function _0x2289ad(_0x30b717,_0x3d8a8d,_0x33a268){let _0x59fb62=-0x1,_0x35eb25=Number['POSITIVE_INFINITY'],_0x20d2f7=!0x0;for(let _0x4f33f8=_0x3d8a8d;_0x4f33f8<_0x33a268;_0x4f33f8++)if(_0x4a6a8b['isInline'](_0x30b717[_0x4f33f8]['item'])||(_0x20d2f7=!0x1),_0x30b717[_0x4f33f8]['item']['startIndex']<_0x3d8a8d&&(_0x59fb62=_0x4f33f8),_0x30b717[_0x4f33f8]['item']['endIndex']>=_0x33a268){_0x35eb25=_0x4f33f8;break;}_0x20d2f7&&(_0x59fb62=_0x33a268-0x1);for(let _0x9cb2c5=_0x3d8a8d;_0x9cb2c5<_0x33a268;_0x9cb2c5++)_0x30b717[_0x9cb2c5]['side']=_0x9cb2c5<=_0x59fb62?-0x1:_0x9cb2c5<_0x35eb25?0x0:0x1,_0x30b717[_0x9cb2c5]['index']=_0x9cb2c5;let _0x3cc926=0x0;for(let _0x5478c0=_0x3d8a8d;_0x5478c0<=_0x59fb62;_0x5478c0++)0x0==_0x30b717[_0x5478c0]['distance']?_0x30b717[_0x5478c0]['level']=_0x3cc926:(_0x3cc926++,_0x30b717[_0x5478c0]['level']=_0x3cc926,_0x3cc926++);for(let _0x25326=_0x3d8a8d;_0x25326<_0x33a268;_0x25326++)0x0==_0x30b717[_0x25326]['side']&&(_0x30b717[_0x25326]['level']=_0x3cc926);_0x3cc926=0x0;for(let _0x27f209=_0x33a268-0x1;_0x27f209>=_0x35eb25;_0x27f209--)0x0==_0x30b717[_0x27f209]['distance']?_0x30b717[_0x27f209]['level']=_0x3cc926:(_0x3cc926--,_0x30b717[_0x27f209]['level']=_0x3cc926,_0x3cc926--);}}['_fixObsoleteTags'](_0x1e932e){const _0x1d8242=new Map(),_0x315df8=this['editor']['model']['schema'];for(let _0x22d1ea=0x1;_0x22d1ea<_0x1e932e['length'];_0x22d1ea++){let _0x5c13dd,_0x24035f,_0xf38b95;const _0xe7e544=_0x1e932e[_0x22d1ea],_0x47aaa0=_0x1e932e[_0x22d1ea-0x1];if('text'==_0xe7e544['type'])continue;if(_0xe7e544['type']!=_0x47aaa0['type'])continue;if(!_0x315df8['isBlock'](_0x47aaa0['item'])||_0x315df8['isLimit'](_0x47aaa0['item']))continue;if(!_0x315df8['isBlock'](_0xe7e544['item'])||_0x315df8['isLimit'](_0xe7e544['item']))continue;if((_0x1e932e[_0x22d1ea]['isAdded']||_0x1e932e[_0x22d1ea]['isAddSuggestion'])&&_0x1e932e[_0x22d1ea-0x1]['isRemoved'])_0x5c13dd=_0x1e932e[_0x22d1ea],_0x24035f=_0x1e932e[_0x22d1ea-0x1],_0xf38b95=_0x22d1ea-0x1;else{if(!_0x1e932e[_0x22d1ea]['isRemoved']||!_0x1e932e[_0x22d1ea-0x1]['isAdded']&&!_0x1e932e[_0x22d1ea-0x1]['isAddSuggestion'])continue;_0x5c13dd=_0x1e932e[_0x22d1ea-0x1],_0x24035f=_0x1e932e[_0x22d1ea],_0xf38b95=_0x22d1ea;}const _0x2ad084=_0x5c13dd['level']==_0x24035f['level'],_0x425ff7=Math['abs'](_0x5c13dd['level'])<Math['abs'](_0x24035f['level'])&&0x0==_0x24035f['distance'];(_0x2ad084||_0x425ff7)&&(_0x1d8242['set'](_0x24035f['id'],_0x5c13dd['id']),_0x1e932e['splice'](_0xf38b95,0x1),_0x22d1ea--,_0x5c13dd['isAdded']=!0x1);}for(let _0x41c66d=0x0;_0x41c66d<_0x1e932e['length'];_0x41c66d++)_0x1d8242['has'](_0x1e932e[_0x41c66d]['pairId'])&&(_0x1e932e[_0x41c66d]['pairId']=_0x1d8242['get'](_0x1e932e[_0x41c66d]['pairId']));}['_removeMissingPairs'](_0x4f4398){const _0xa56a67=new Set(_0x4f4398['map'](_0x380f67=>_0x380f67['id']));for(let _0x1baaa4=0x0;_0x1baaa4<_0x4f4398['length'];_0x1baaa4++)_0xa56a67['has'](_0x4f4398[_0x1baaa4]['pairId'])||0x0==_0x4f4398[_0x1baaa4]['distance']||(_0x4f4398[_0x1baaa4]['isIncorrect']=!0x0);return _0x4f4398['filter'](_0x1c16fb=>!_0x1c16fb['isIncorrect']);}['_markMismatchedRemovedTags'](_0x1cee5c){const _0x406ac9=new Set();for(let _0x1507d0=0x0;_0x1507d0<_0x1cee5c['length'];_0x1507d0++){if(_0x406ac9['has'](_0x1cee5c[_0x1507d0]['id'])&&_0x1cee5c[_0x1507d0]['isRemoved']&&(_0x1cee5c[_0x1507d0]['isIncorrect']=!0x0),_0x1cee5c[_0x1507d0]['isIncorrect'])continue;if(0x0==_0x1cee5c[_0x1507d0]['distance'])continue;if('elementStart'!=_0x1cee5c[_0x1507d0]['type'])continue;if(null==_0x1cee5c[_0x1507d0]['pairId'])continue;let _0x650d05=_0x1507d0+0x1,_0x385789=0x0;for(;_0x1cee5c[_0x650d05]['id']!=_0x1cee5c[_0x1507d0]['pairId'];)'elementStart'==_0x1cee5c[_0x650d05]['type']?_0x385789++:'elementEnd'==_0x1cee5c[_0x650d05]['type']&&_0x385789--,_0x650d05++;if(0x0!=_0x385789){if(_0x1cee5c[_0x1507d0]['isRemoved'])_0x1cee5c[_0x1507d0]['isIncorrect']=!0x0;else{for(;_0x650d05!=_0x1507d0;)_0x1cee5c[_0x650d05]['isRemoved']&&0x0!=_0x1cee5c[_0x650d05]['distance']&&(_0x1cee5c[_0x650d05]['isIncorrect']=!0x0,_0x406ac9['add'](_0x1cee5c[_0x650d05]['pairId'])),_0x650d05--;}}}return _0x1cee5c['filter'](_0x4fd785=>!_0x4fd785['isIncorrect']);}['_removeUnsupportedChanges'](_0xb739f1){const _0x3b5710=this['editor']['model']['schema'];for(let _0x20929f=0x0;_0x20929f<_0xb739f1['length'];_0x20929f++){if(!(_0xb739f1[_0x20929f]['isAdded']||_0xb739f1[_0x20929f]['isAddSuggestion']||_0xb739f1[_0x20929f]['isRemoved']||_0xb739f1[_0x20929f]['isRemoveSuggestion']))continue;if(0x0==_0xb739f1[_0x20929f]['distance'])continue;const _0x2723b5=_0xb739f1[_0x20929f]['item'];_0x3b5710['isBlock'](_0x2723b5)||_0x3b5710['isLimit'](_0x2723b5)||(_0xb739f1[_0x20929f]['isAdded']&&delete _0xb739f1[_0x20929f]['isAdded'],_0xb739f1[_0x20929f]['isAddSuggestion']&&delete _0xb739f1[_0x20929f]['isAddSuggestion'],_0xb739f1[_0x20929f]['isRemoveSuggestion']&&delete _0xb739f1[_0x20929f]['isRemoveSuggestion'],_0xb739f1[_0x20929f]['isRemoved']&&(_0xb739f1[_0x20929f]['isIncorrect']=!0x0));}return _0xb739f1['filter'](_0x4b9aad=>!_0x4b9aad['isIncorrect']);}['_makeModelFromTape'](_0x4e7f0a,_0x203396,_0x24f201){const _0xd2860f=new gt(),_0x1c3a25=[],_0x33a8cc=new Map(),_0x3ac978=this['editor']['model'],_0x20fa8=_0x3ac978['schema'],_0x2297e7=[_0xd2860f],_0x217d55={},_0x1dba20={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x5f308d=null;const _0x4ff237=[0x0];for(let _0x59e760=0x0;_0x59e760<_0x4e7f0a['length'];_0x59e760++)if('elementStart'===_0x4e7f0a[_0x59e760]['type']){_0x4e7f0a[_0x59e760]['previousPosition']=_0x3ac978['createPositionFromPath'](_0xd2860f,_0x4ff237);const _0x16751b=new ut(_0x4e7f0a[_0x59e760]['item']['name'],_0x4e7f0a[_0x59e760]['item']['getAttributes']());_0x2297e7[0x0]['_appendChild'](_0x16751b),_0x4ff237['push'](0x0),_0x2297e7['unshift'](_0x16751b),_0x4e7f0a[_0x59e760]['nextPosition']=_0x3ac978['createPositionFromPath'](_0xd2860f,_0x4ff237);}else'elementEnd'===_0x4e7f0a[_0x59e760]['type']?(_0x2297e7['shift'](),_0x4e7f0a[_0x59e760]['previousPosition']=_0x3ac978['createPositionFromPath'](_0xd2860f,_0x4ff237),_0x4ff237['pop'](),_0x4ff237[_0x4ff237['length']-0x1]++,_0x4e7f0a[_0x59e760]['nextPosition']=_0x3ac978['createPositionFromPath'](_0xd2860f,_0x4ff237)):(_0x4e7f0a[_0x59e760]['previousPosition']=_0x3ac978['createPositionFromPath'](_0xd2860f,_0x4ff237),_0x5f308d?_0x5f308d['_data']+=_0x4e7f0a[_0x59e760]['item']['data']:_0x5f308d=new mt(_0x4e7f0a[_0x59e760]['item']['data'],_0x4e7f0a[_0x59e760]['item']['getAttributes']()),_0x4e7f0a[_0x59e760+0x1]&&'text'===_0x4e7f0a[_0x59e760+0x1]['type']&&_0xda346(_0x5f308d,_0x4e7f0a[_0x59e760+0x1]['item'])||(_0x2297e7[0x0]['_appendChild'](_0x5f308d),_0x5f308d=null),_0x4ff237[_0x4ff237['length']-0x1]+=_0x4e7f0a[_0x59e760]['item']['offsetSize'],_0x4e7f0a[_0x59e760]['nextPosition']=_0x3ac978['createPositionFromPath'](_0xd2860f,_0x4ff237));for(let _0xe4f4d9=0x0;_0xe4f4d9<_0x4e7f0a['length'];_0xe4f4d9++){const _0x296de3=_0x4e7f0a[_0xe4f4d9]['previousPosition'],_0x3dbced=_0x4e7f0a[_0xe4f4d9]['nextPosition'];for(const _0x1c118b of _0x4e7f0a[_0xe4f4d9]['markersStart'])_0x33a8cc['set'](_0x1c118b,{'start':_0x296de3,'end':null});_0x331d65('isRemoveSuggestion',_0xe4f4d9,_0x296de3,_0x3dbced),_0x331d65('isAddSuggestion',_0xe4f4d9,_0x296de3,_0x3dbced),_0x331d65('isRemoved',_0xe4f4d9,_0x296de3,_0x3dbced),_0x331d65('isAdded',_0xe4f4d9,_0x296de3,_0x3dbced);for(const _0x5c9b77 of _0x4e7f0a[_0xe4f4d9]['markersEnd']){const _0x37dd7c=_0x33a8cc['get'](_0x5c9b77);_0x37dd7c?_0x37dd7c['end']=_0x3dbced:_0x33a8cc['set'](_0x5c9b77,{'start':_0x3dbced,'end':_0x3dbced});}}for(const [_0x5076d9,_0x5d5f06]of _0x33a8cc){const _0x449c10=this['editor']['model']['createRange'](_0x5d5f06['start'],_0x5d5f06['end']);_0xd2860f['markers']['set'](_0x5076d9,_0x449c10);}return _0x1c3a25['sort']((_0x4b7745,_0xb783e3)=>{const _0x167fd9=_0xd2860f['markers']['get']('revision:'+_0x4b7745['id']),_0x11ec85=_0xd2860f['markers']['get']('revision:'+_0xb783e3['id']);return _0x167fd9['start']['isBefore'](_0x11ec85['start'])?-0x1:_0x167fd9['start']['isAfter'](_0x11ec85['start'])?0x1:_0x167fd9['end']['isBefore'](_0x11ec85['end'])?-0x1:_0x167fd9['end']['isAfter'](_0x11ec85['end'])?0x1:'add'===_0x4b7745['type']?-0x1:0x1;}),{'root':_0xd2860f,'changes':_0x1c3a25};function _0x331d65(_0x599001,_0x8a7547,_0x5bb1a8,_0x45db45){const _0x1ca7d3=!!_0x4e7f0a[_0x8a7547][_0x599001],_0x3a3780=_0x1ca7d3?_0x4e7f0a[_0x8a7547][_0x599001]['userId']:null,_0x478877=_0x8a7547===_0x4e7f0a['length']-0x1,_0x3d1616=_0x1dba20[_0x599001][0x0],_0x597bff=_0x20fa8['isObject'](_0x4e7f0a[_0x8a7547]['item']);!_0x217d55[_0x599001]&&_0x1ca7d3?_0x217d55[_0x599001]={'start':_0x5bb1a8,'tapeItem':_0x4e7f0a[_0x8a7547],'userId':_0x3a3780,'type':_0x599001}:_0x217d55[_0x599001]&&!_0x1ca7d3?(_0x217d55[_0x599001]['end']=_0x5bb1a8,_0x3fd9c2(_0x217d55[_0x599001]),_0x217d55[_0x599001]=null):_0x217d55[_0x599001]&&_0x1ca7d3&&_0x217d55[_0x599001]['userId']!==_0x3a3780&&(_0x217d55[_0x599001]['end']=_0x5bb1a8,_0x3d1616&&_0x3d1616['userId']===_0x217d55[_0x599001]['userId']||_0x3fd9c2(_0x217d55[_0x599001]),_0x217d55[_0x599001]={'start':_0x5bb1a8,'tapeItem':_0x4e7f0a[_0x8a7547],'userId':_0x3a3780,'type':_0x599001}),_0x217d55[_0x599001]&&_0x597bff&&('elementStart'!==_0x4e7f0a[_0x8a7547]['type']||_0x3d1616&&_0x3d1616['userId']===_0x3a3780||_0x1dba20[_0x599001]['unshift']({'userId':_0x3a3780,'object':_0x4e7f0a[_0x8a7547]['item'],'change':_0x217d55[_0x599001]}),'elementEnd'===_0x4e7f0a[_0x8a7547]['type']&&_0x3d1616&&_0x3d1616['object']===_0x4e7f0a[_0x8a7547]['item']&&(_0x1dba20[_0x599001]['shift'](),_0x217d55[_0x599001]=_0x3d1616['change'])),_0x217d55[_0x599001]&&_0x478877&&(_0x217d55[_0x599001]['end']=_0x45db45,_0x3fd9c2(_0x217d55[_0x599001]),_0x217d55[_0x599001]=null);}function _0x3fd9c2({start:_0x402c15,end:_0x3483c6,tapeItem:_0x29f8fd,userId:_0x4a9581,type:_0x166a95}){const _0x19cf2b=_0x29f8fd['item'],_0x8bd28b=_0x3ac978['schema']['isBlock'](_0x19cf2b)&&!_0x3ac978['schema']['isLimit'](_0x19cf2b),_0x96f94b=_0x402c15['nodeAfter']==_0x3483c6['parent']&&_0x3483c6['isAtStart'];if(_0x8bd28b&&_0x96f94b)return;const _0x3adb39=_0x3ac978['createRange'](_0x402c15,_0x3483c6),_0x509549=_0x203396['get'](_0x4a9581),_0x27a898=new r({'author':_0x509549,'type':'isAdded'==_0x166a95||'isAddSuggestion'==_0x166a95?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x166a95||'isRemoveSuggestion'==_0x166a95},'createdAt':new Date(),'rootName':_0x24f201});_0x1c3a25['push'](_0x27a898),_0xd2860f['markers']['set']('revision:'+_0x27a898['id'],_0x3adb39);}function _0xda346(_0x28688d,_0x5b14d2){const _0x1523a5=_0x28688d['getAttributes'](),_0x1e483c=_0x5b14d2['getAttributes']();for(const _0x26b810 of _0x1523a5){if(_0x26b810[0x1]!==_0x5b14d2['getAttribute'](_0x26b810[0x0]))return!0x1;_0x1e483c['next']();}return _0x1e483c['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0xaf9be=>{const _0x3b5d6a=_0xaf9be['markerName']['split'](':')[0x1],_0x3daab8=this['_getChangeFromId'](_0x3b5d6a);if(!_0x3daab8)return null;const _0x43857f='add'==_0x3daab8['type']?'insertion':'deletion',_0x1ef8f9=['ck-suggestion-marker','ck-suggestion-marker-'+_0x43857f];return _0x3daab8['data']['isSuggestion']&&_0x1ef8f9['push']('ck-suggestion-marker-'+_0x43857f+'-new'),this['activeChange']==_0x3daab8&&_0x1ef8f9['push']('ck-suggestion-marker--active'),{'classes':_0x1ef8f9,'attributes':{'data-change-id':_0x3b5d6a}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x448c24=>{_0x448c24['on']('element:pre',(_0x32dd75,_0x15e3b2,_0x31e99e)=>{const _0x1b21d2=_0x15e3b2['viewItem']['getChild'](0x0);if(!_0x1b21d2||!_0x1b21d2['is']('element','code'))return;if(!_0x31e99e['consumable']['consume'](_0x1b21d2,{'attributes':['vid_start','vid_end']}))return;const _0x4f2885=_0x15e3b2['modelRange']['start']['nodeAfter'];_0x31e99e['writer']['setAttribute']('vid_start',_0x1b21d2['getAttribute']('vid_start'),_0x4f2885),_0x31e99e['writer']['setAttribute']('vid_end',_0x1b21d2['getAttribute']('vid_end'),_0x4f2885);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x31f377=>{_0x31f377['on']('element',(_0x465863,_0x4fd3e5,_0x25afca)=>{if(!_0x25afca['consumable']['consume'](_0x4fd3e5['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x4fd3e5['modelRange']['isCollapsed'])return;const _0x439b3e=_0x4fd3e5['modelRange']['start']['nodeAfter'];_0x439b3e['hasAttribute']('vid_start')||_0x439b3e['hasAttribute']('vid')||(_0x25afca['writer']['setAttribute']('vid_start',_0x4fd3e5['viewItem']['getAttribute']('vid_start'),_0x439b3e),_0x25afca['writer']['setAttribute']('vid_end',_0x4fd3e5['viewItem']['getAttribute']('vid_end'),_0x439b3e));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0xcde1e9=>_0xcde1e9['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x43ea01,[,_0xcdde09])=>{['vid_start','vid_end','vid']['includes'](_0xcdde09)&&(_0x43ea01['return']=!0x0,_0x43ea01['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0xd64716=>{_0xd64716['on']('attribute:vid',(_0x1638df,_0x5dea4a,_0x50aa3b)=>{if('\x20'!=_0x5dea4a['item']['data']||_0x5dea4a['item']['parent']['maxOffset']>0x1)return;if(!_0x50aa3b['consumable']['consume'](_0x5dea4a['item'],_0x1638df['name']))return;const _0x13f449=_0x50aa3b['writer'],_0x4c40bc=_0x50aa3b['mapper']['toViewRange'](_0x5dea4a['range']);_0x13f449['wrap'](_0x4c40bc,_0x13f449['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x1ab87d){const _0x1c3daa=_0x1ab87d['plugins']['get']('RevisionViewer');return(_0x43048e,_0x24f1b2,_0x5d0d09)=>{const _0x3fe9ad=_0x24f1b2['markerName']['split'](':')[0x1],_0x4af00e=_0x1c3daa['_getChangeFromId'](_0x3fe9ad);if(!_0x4af00e)return null;const _0x587055='add'==_0x4af00e['type']?'split':'merge';if(!_0x5d0d09['consumable']['test'](_0x24f1b2['markerRange'],_0x43048e['name']))return;const _0x1e0ae1=_0x24f1b2['markerRange']['getWalker'](),_0x1a9448=_0x24f1b2['markerRange']['start'],_0x28fde8=_0x1ab87d['model']['schema'];let _0x56505d=null,_0x113af4=null,_0x166592=!0x1,_0x4cbdd2=!0x1;for(const _0x8dcc0 of _0x1e0ae1){const _0x4ea802=_0x8dcc0['item'];_0x166592=_0x166592||_0x28fde8['isContent'](_0x4ea802);const _0x120850=_0x5d0d09['mapper']['toViewElement'](_0x4ea802);if(_0x120850&&_0x120850['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x8dcc0['type']&&(_0x28fde8['isBlock'](_0x4ea802)&&!_0x28fde8['isLimit'](_0x4ea802)&&(_0x4ea802['nextSibling']||_0x1a9448['isAtEnd']?_0x56505d&&_0x56505d['parent']==_0x4ea802||(_0x56505d=_0x4ea802,_0x306f41(_0x8dcc0['previousPosition']),_0x4cbdd2=!0x0):_0x113af4=_0x113af4||_0x8dcc0['previousPosition']));}function _0x306f41(_0x168216){const _0x85960c=_0x5d0d09['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x587055}),_0x135846=_0x5d0d09['mapper']['toViewPosition'](_0x168216);_0x4af00e['data']['isSuggestion']&&_0x5d0d09['writer']['addClass']('ck-suggestion-marker-'+_0x587055+'-new',_0x85960c),_0x1c3daa['activeChange']==_0x4af00e&&_0x5d0d09['writer']['addClass']('ck-suggestion-marker--active',_0x85960c),_0x5d0d09['writer']['insert'](_0x135846,_0x85960c),_0x5d0d09['mapper']['bindElementToMarker'](_0x85960c,_0x24f1b2['markerName']);}_0x166592||_0x4cbdd2||!_0x113af4||_0x306f41(_0x113af4);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x35af21,_0x303422,_0xaafb34)=>{const _0x24678b=_0xaafb34['mapper']['markerNameToElements'](_0x303422['markerName']);if(_0x24678b){for(const _0x4ef7f1 of _0x24678b)(_0x4ef7f1['hasClass']('ck-suggestion-marker-split')||_0x4ef7f1['hasClass']('ck-suggestion-marker-merge'))&&(_0xaafb34['mapper']['unbindElementFromMarkerName'](_0x4ef7f1,_0x303422['markerName']),_0xaafb34['writer']['remove'](_0x4ef7f1));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x1484c9,_0x474ccf,_0x3b1a6b)=>{const _0x15639e=_0x474ccf['markerName']['split'](':')[0x1],_0x255c84=this['_getChangeFromId'](_0x15639e);if(!_0x255c84)return null;const _0x2c4992='add'==_0x255c84['type']?'split':'merge';if(_0x3b1a6b['consumable']['test'](_0x474ccf['markerRange'],_0x1484c9['name']))for(const _0x25d910 of _0x474ccf['markerRange']['getItems']()){if(!_0x25d910['is']('element','softBreak'))continue;const _0x207bb8=_0x3b1a6b['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x2c4992}),_0x4abde6=_0x3b1a6b['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x25d910));_0x255c84['data']['isSuggestion']&&_0x3b1a6b['writer']['addClass']('ck-suggestion-marker-'+_0x2c4992+'-new',_0x207bb8),this['activeChange']==_0x255c84&&_0x3b1a6b['writer']['addClass']('ck-suggestion-marker--active',_0x207bb8),_0x3b1a6b['writer']['insert'](_0x4abde6,_0x207bb8),_0x3b1a6b['mapper']['bindElementToMarker'](_0x207bb8,_0x474ccf['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x3980ba=>{for(const _0x148be6 of this['editor']['model']['document']['getRootNames']()){const _0x116275=this['editor']['model']['document']['getRoot'](_0x148be6),_0x26af4a=this['editor']['editing']['view']['document']['getRoot'](_0x148be6);if(_0x26af4a){const _0x29c586=_0x116275['getAttribute']('revisionHistoryAttachChange');if(_0x3980ba['removeAttribute']('data-change-id',_0x26af4a),_0x3980ba['removeClass']('ck-revision-history-root-add',_0x26af4a),_0x3980ba['removeClass']('ck-revision-history-root-remove',_0x26af4a),_0x3980ba['removeClass']('ck-revision-history-root--active',_0x26af4a),_0x29c586){const _0x56aa1d=this['_getChangeFromId'](_0x29c586);if(!_0x56aa1d)return null;_0x3980ba['setAttribute']('data-change-id',_0x29c586,_0x26af4a),_0x3980ba['addClass']('ck-revision-history-root-'+_0x56aa1d['type'],_0x26af4a),this['activeChange']==_0x56aa1d&&_0x3980ba['addClass']('ck-revision-history-root--active',_0x26af4a);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x10d996=>'revision-comment:'+_0x10d996,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x56bd47=>'revision-suggestion:'+_0x56bd47,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x46f5d2=>({'name':'suggestion:'+_0x46f5d2,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x4b1f32=>{const _0x15d741=_0x4b1f32['markerName']['split'](':')[0x1];return'insertion'!=_0x15d741&&'deletion'!=_0x15d741?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x15d741]};}}),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',(_0x5a7ee2,_0x883ea2,_0x27fc09)=>{const _0x504002=_0x27fc09['mapper']['markerNameToElements'](_0x883ea2['markerName']);if(_0x504002){for(const _0x3f8161 of _0x504002)_0x3f8161['is']('uiElement')&&(_0x27fc09['mapper']['unbindElementFromMarkerName'](_0x3f8161,_0x883ea2['markerName']),_0x27fc09['writer']['remove'](_0x3f8161));}},{'priority':'high'});}['_getChangeFromId'](_0x24421a){return this['_changeIdToChange']['get'](_0x24421a);}['_getViewForChange'](_0x238ae6){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Q(this['editor']['locale'],_0x238ae6),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x3a70c2,_0x5e9453,_0x32c75b,_0xf7556d)=>{_0xf7556d&&this['_balloon']['remove'](_0xf7556d),_0x32c75b&&(this['_balloon']['add']({'view':_0x32c75b,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x273d2d=this['editor']['editing'],_0x42fa2b=this['_getChangeFromId'](_0x32c75b['changeId']);let _0x4da1f4;if(_0x42fa2b['data']['isOnRoot']){const _0x38bf78=_0x273d2d['view']['getDomRoot'](_0x42fa2b['rootName']);_0x4da1f4=Array['from'](_0x38bf78['getClientRects']());}else{const _0x4f0fe8=this['editor']['model']['markers']['get']('revision:'+_0x32c75b['changeId']);_0x4da1f4=Array['from'](_0x273d2d['mapper']['markerNameToElements'](_0x4f0fe8['name']))['map'](_0x489f2f=>_0x273d2d['view']['domConverter']['mapViewToDom'](_0x489f2f))['map'](_0x3b8603=>Array['from'](_0x3b8603['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x4da1f4[0x0];return _0x4da1f4['find'](_0xc323b9=>_0xc323b9['top']-0x3<=this['_activeViewTarget']['y']&&_0xc323b9['bottom']+0x3>=this['_activeViewTarget']['y']&&_0xc323b9['left']-0x3<=this['_activeViewTarget']['x']&&_0xc323b9['right']+0x3>=this['_activeViewTarget']['x'])||_0x4da1f4[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x39d894,_0x48a1f0,_0x18911d,_0x3c812b)=>{this['activeView']=_0x18911d?this['_getViewForChange'](_0x18911d):null,this['editor']['model']['change'](()=>{const _0x236a4f=this['editor']['editing'];_0x3c812b&&(_0x3c812b['data']['isOnRoot']?_0x236a4f['view']['change'](_0x461739=>{_0x461739['removeClass']('ck-revision-history-root--active',_0x236a4f['view']['document']['getRoot'](_0x3c812b['rootName']));}):_0x236a4f['reconvertMarker']('revision:'+_0x3c812b['id'])),_0x18911d&&(_0x18911d['data']['isOnRoot']?_0x236a4f['view']['change'](_0x1ef0e1=>{_0x1ef0e1['addClass']('ck-revision-history-root--active',_0x236a4f['view']['document']['getRoot'](_0x18911d['rootName']));}):_0x236a4f['reconvertMarker']('revision:'+_0x18911d['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x5e1d60,_0x4fa600)=>{if(this['activeChange'])return;const _0x3d8b60=this['_findChangeIdFromDomTarget'](_0x4fa600['target']),_0x45eb6a=this['_changeIdToChange']['get'](_0x3d8b60);_0x45eb6a?(this['_activeViewTarget']={'x':_0x4fa600['domEvent']['x'],'y':_0x4fa600['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x45eb6a)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x4e87da,_0x14cf20)=>{const _0x2e6e12=this['_findChangeIdFromDomTarget'](_0x14cf20['target']),_0x19e88f=this['_changeIdToChange']['get'](_0x2e6e12);_0x19e88f?(this['_activeViewTarget']={'x':_0x14cf20['domEvent']['x'],'y':_0x14cf20['domEvent']['y']},_0x19e88f===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x19e88f):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x288aba){do{const _0x446fd5=_0x288aba['getAttribute']('data-change-id');if(_0x446fd5)return _0x446fd5;_0x288aba=_0x288aba['parent'];}while(_0x288aba);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x372b25=>{for(const _0x55f92c of this['editor']['model']['markers'])_0x372b25['removeMarker'](_0x55f92c);});}}function X(_0x3783c1,_0x1ebeaa){return(_0xed6b71,_0x841f84,_0x286285)=>{if(!_0x286285['consumable']['test'](_0x841f84['markerRange'],_0xed6b71['name']))return;const _0x5900d1=_0x841f84['markerRange']['getWalker'](),_0x54fac6=_0x841f84['markerRange']['start'],_0x3a9bff=_0x3783c1['model']['schema'];let _0x4b1f1f=null,_0x37e38d=null,_0x3fcb0d=!0x1,_0x3a9adf=!0x1;for(const _0x46de34 of _0x5900d1){const _0x1ce57a=_0x46de34['item'];_0x3fcb0d=_0x3fcb0d||_0x3a9bff['isContent'](_0x1ce57a);const _0x542b33=_0x286285['mapper']['toViewElement'](_0x1ce57a);if(_0x542b33&&_0x542b33['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x46de34['type']&&(_0x3a9bff['isBlock'](_0x1ce57a)&&!_0x3a9bff['isLimit'](_0x1ce57a)&&(_0x1ce57a['nextSibling']||_0x54fac6['isAtEnd']?_0x4b1f1f&&_0x4b1f1f['parent']==_0x1ce57a||(_0x4b1f1f=_0x1ce57a,_0x31ba19(_0x46de34['previousPosition']),_0x3a9adf=!0x0):_0x37e38d=_0x37e38d||_0x46de34['previousPosition']));}function _0x31ba19(_0x4c2083){const _0x143250=_0x286285['mapper']['toViewPosition'](_0x4c2083),_0x13f36b=_0x286285['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x1ebeaa});_0x286285['writer']['insert'](_0x143250,_0x13f36b),_0x286285['mapper']['bindElementToMarker'](_0x13f36b,_0x841f84['markerName']);}_0x3fcb0d||_0x3a9adf||!_0x37e38d||_0x31ba19(_0x37e38d);};}class wt extends _0x1baf86{constructor(_0x461274){super(_0x461274);const _0x53c188=_0x461274['plugins']['get'](m);this['affectsData']=!0x1,this['listenTo'](_0x53c188,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x53c188,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x20977f=this['editor'],_0x5e2a26=_0x20977f['plugins']['get'](m),_0x168068=_0x5e2a26['isReady']?_0x5e2a26['diff']['newRevisionId']:null;_0x20977f['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x168068);}['refresh'](){const {isReady:_0x186774,isEnabled:_0x30dfa2,repository:_0x296528,diff:_0xfb728c}=this['editor']['plugins']['get'](m),_0x3ed95f=_0xfb728c&&_0x296528['getLaterVisibleRevision'](_0xfb728c['newRevisionId']);this['isEnabled']=_0x186774&&_0x30dfa2&&Boolean(_0x3ed95f);}}class pt extends _0x1baf86{['_step'];constructor(_0x529086,{direction:_0x3cf4d5}){super(_0x529086);const _0x16ed98=_0x529086['plugins']['get'](m);this['affectsData']=!0x1,this['_step']='forward'===_0x3cf4d5?0x1:-0x1,this['listenTo'](_0x16ed98,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x16ed98,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x16ed98,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x10417d=this['editor'],_0x2195f3=_0x10417d['plugins']['get'](m),{isNavigationMode:_0x5649c9,currentChangeNumber:_0x6dd7e8}=_0x2195f3;let _0x5c1770;if(_0x2195f3['activeChange']=_0x5649c9?_0x2195f3['diff']['changes']['get'](_0x6dd7e8+this['_step']):_0x2195f3['diff']['changes']['first'],_0x2195f3['activeChange']['data']['isOnRoot'])_0x5c1770=_0x10417d['editing']['view']['getDomRoot'](_0x2195f3['activeChange']['rootName']);else{const _0x49fdd7=_0x10417d['model']['markers']['get']('revision:'+_0x2195f3['activeChange']['id']);_0x5c1770=_0x4b86d3(_0x10417d['editing'],_0x49fdd7);}_0x389bf5({'target':_0x5c1770,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x36fc88,currentChangeNumber:_0x5749c3,numberOfChanges:_0x55b492,isReady:_0x31affb,isEnabled:_0xa5998e}=this['editor']['plugins']['get'](m);this['isEnabled']=!!(_0xa5998e&&_0x31affb&&_0x55b492)&&(!_0x36fc88||(0x1===this['_step']?_0x5749c3<_0x55b492-0x1:_0x5749c3>0x0));}}class _i extends _0x745a8d{constructor(_0x3e6748){super(_0x3e6748);const _0x331cd9=this['bindTemplate'],_0x334c46=new _0x537db8(_0x3e6748),_0xcc729b=new _0x537db8(_0x3e6748);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',(_0x2439b0,_0x3270c5)=>_0x2439b0&&_0x3270c5>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x297974,_0x38050d,_0x11e345,_0x45ebb2)=>{if(!_0x297974)return g(_0x3e6748,'Loading...');if(!_0x11e345)return g(_0x3e6748,'No\x20changes');const _0x4ad9f0=g(_0x3e6748,'NUMBER_OF_CHANGES',_0x11e345);return _0x45ebb2?g(_0x3e6748,'X_OF_Y_CHANGES',[_0x38050d+0x1,_0x11e345]):_0x4ad9f0;}),_0x334c46['set']({'label':g(_0x3e6748,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x422ec8}),_0xcc729b['set']({'label':g(_0x3e6748,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x233b7f}),_0x334c46['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0xcc729b['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x334c46['on']('execute',()=>this['fire']('execute','backward')),_0xcc729b['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',_0x331cd9['if']('_isStatusLabelVisible','ck-hidden',_0x2625c8=>!_0x2625c8)]},'children':[{'text':_0x331cd9['to']('isNavigationMode',_0x37d9f4=>_0x37d9f4?g(_0x3e6748,'EDIT_X_OF_Y_REVISIONS')+':\x20':g(_0x3e6748,'Total')+':\x20')}]},{'text':_0x331cd9['to']('_statusText')}]},new _0x4ec420(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x334c46,_0xcc729b]}]});}}const ce='ck-editor__editable__loading-overlay';class le extends _0x4eb38d{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x5f3ee5=this['editor']['editing']['view'];_0x5f3ee5['change'](_0x567df5=>{for(const _0x335494 of _0x5f3ee5['document']['roots'])_0x567df5['addClass'](ce,_0x335494);});}['hide'](){const _0x2cacdf=this['editor']['editing']['view'];_0x2cacdf['change'](_0x1550e7=>{for(const _0x5f5be6 of _0x2cacdf['document']['roots'])_0x1550e7['removeClass'](ce,_0x5f5be6);});}}class R extends _0x4eb38d{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[m,le];}['init'](){const _0x2f2ce1=this['editor'],_0x432b13=_0x2f2ce1['plugins']['get'](m),_0xbcb0b8=_0x2f2ce1['plugins']['get'](le);_0x2f2ce1['ui']['componentFactory']['add']('exitToEditing',_0x330935=>{const _0x1a4a0b=new _0x537db8(_0x330935);return _0x1a4a0b['set']({'label':g(_0x330935,'Back\x20to\x20editing'),'icon':_0x566aea,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x1a4a0b,'execute',()=>{_0x2f2ce1['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x1a4a0b;}),_0x2f2ce1['ui']['componentFactory']['add']('restoreRevision',_0x1b4bb4=>{const _0x2f15f1=new _0x537db8(_0x1b4bb4);return _0x2f15f1['set']({'label':g(_0x1b4bb4,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x2f15f1['bind']('isEnabled')['to'](_0x2f2ce1['commands']['get']('restoreRevision')),this['listenTo'](_0x2f15f1,'execute',()=>_0x2f2ce1['execute']('restoreRevision')),_0x2f15f1;}),_0x2f2ce1['ui']['componentFactory']['add']('changesNavigation',_0x59b71b=>{const _0x4ea05b=new _i(_0x59b71b),_0x158238=_0x2f2ce1['commands']['get']('showPreviousChange'),_0x17c0f3=_0x2f2ce1['commands']['get']('showNextChange');return _0x4ea05b['bind']('isBackwardNavigationEnabled')['to'](_0x158238,'isEnabled'),_0x4ea05b['bind']('isForwardNavigationEnabled')['to'](_0x17c0f3,'isEnabled'),_0x4ea05b['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x432b13),this['listenTo'](_0x4ea05b,'execute',(_0x375518,_0x2ed95c)=>{_0x2f2ce1['execute']('forward'===_0x2ed95c?'showNextChange':'showPreviousChange');}),_0x4ea05b;}),_0xbcb0b8['show'](),_0x432b13['on']('change:isReady',(_0x5c1d19,_0x3019a4,_0x57356e)=>{_0x57356e?_0xbcb0b8['hide']():_0xbcb0b8['show']();});}}class lt extends nt{['_resizeObserver']=null;constructor(_0x4cf29d,_0x562ffc){super(_0x4cf29d,_0x562ffc);const _0x29355f=this['bindTemplate'];this['set']({'label':g(_0x4cf29d,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=g(_0x4cf29d,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x29355f['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 _0x8c2107=this['fieldView']['element'];this['_tooltipString']=_0x8c2107['scrollWidth']>_0x8c2107['clientWidth']&&_0x8c2107['value']||'';}}class oi extends _0x745a8d{constructor(_0x52d060,_0x278cca,_0x6fbb8c){super(_0x52d060);const _0x52c41a=new _0x22f298();_0x52c41a['set']({'content':_0x40b491,'viewBox':'0\x200\x2011\x2010'});const _0x5df436=['ck','ck-revision-history-sidebar__revision-author'];_0x6fbb8c&&_0x5df436['push']('ck-revision-history-sidebar__revision-author_creator');const _0x36e527=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':g(_0x52d060,_0x6fbb8c?'Revision\x20creator':'Revision\x20author')},'children':[_0x52c41a,_0x278cca['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x5df436},'children':_0x36e527});}}function ni(_0x566db3,_0x3b0072){const _0x11f7e2=_0x566db3['bindTemplate'],_0xa167ff=_0x566db3['locale'],_0x5ec049=_0x2fa9d9(_0xa167ff);_0x5ec049['panelPosition']='sw';const _0x22f037=function(_0xd00997,_0x2374e8){const _0x44eba9=function(_0x4edd65,_0x315871){const _0x554ec1=_0x4edd65['locale'],_0x1b31c5={'Compare\x20against\x20selected':g(_0x554ec1,'Compare\x20against\x20selected'),'Name\x20this\x20revision':g(_0x554ec1,'Name\x20this\x20revision'),'Restore\x20this\x20revision':g(_0x554ec1,'Restore\x20this\x20revision')};return _0x315871['map'](_0x5994cf=>{const _0x2a54ab=_0x1b31c5[_0x5994cf['name']];return _0x2a54ab&&_0x2a54ab!==_0x5994cf['name']&&(_0x5994cf['name']=_0x2a54ab),_0x5994cf;});}(_0xd00997,_0x2374e8),_0x474998=new _0x5c68d2();for(const _0xb39350 of _0x44eba9){const _0x25c656={'type':'button','model':new to({'label':_0xb39350['name'],'class':_0xb39350['class'],'withText':!0x0,'role':'menuitem','_action':_0xb39350['action']})};_0x25c656['model']['bind']('isEnabled')['to'](_0xd00997,'isActionsDropdownOpen',_0xe5a24f=>'function'!=typeof _0xb39350['isEnabled']||(!_0xe5a24f||_0xb39350['isEnabled'](_0xd00997))),_0x474998['add'](_0x25c656);}return _0x474998;}(_0x566db3,_0x3b0072);return _0x566db3['bind']('isActionsDropdownOpen')['to'](_0x5ec049,'isOpen'),_0x5ec049['buttonView']['set']({'label':g(_0xa167ff,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0xfbc26d}),_0x5ec049['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x11f7e2['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x11f7e2['to'](_0x2db976=>_0x2db976['stopPropagation']())}}),_0x5ec049['on']('execute',_0x1c28bc=>{_0x566db3['isReady']&&'function'==typeof _0x1c28bc['source']['_action']&&_0x1c28bc['source']['_action'](_0x566db3);}),_0x49e3dc(_0x5ec049,_0x22f037,{'role':'menu'}),_0x5ec049['listenTo'](_0x566db3,'change:isActionsDropdownOpen',(_0x4ec97a,_0x39c678,_0x5cf806)=>{if(_0x5cf806)for(const _0x51686e of _0x5ec049['listView']['items']){const _0x49914f=_0x51686e['children']['first'],_0x239e63=_0x3b0072['find'](_0x3aa1b9=>_0x3aa1b9['action']===_0x49914f['_action'])['isVisible'];_0x51686e['isVisible']=void 0x0===_0x239e63||_0x239e63(_0x566db3);}}),_0x5ec049;}class ai extends/* #__PURE__ -- @preserve */
26
+ _0x1c922f(_0x745a8d){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x497fbd,_0x45f8a7,_0xbe222e,_0x434276){super(_0x497fbd);const _0x5a5f95=this['bindTemplate'],_0x159e34=function(_0x47d668,_0x3a1106){const _0x42a488=Array['from'](_0x3a1106['authors'])['filter'](_0x509ac3=>_0x509ac3!=_0x3a1106['creator']);return _0x3a1106['creator']&&_0x42a488['unshift'](_0x3a1106['creator']),_0x42a488['map'](_0x45797d=>new oi(_0x47d668,_0x45797d,_0x45797d==_0x3a1106['creator']));}(_0x497fbd,_0x45f8a7);this['id']=_0x45f8a7['id'],this['_revision']=_0x45f8a7,this['_requireRevisionName']=_0x434276,this['bind']('name','createdAt')['to'](_0x45f8a7),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x22c410=>{return _0x3e1de7=_0x497fbd['uiLanguage'],(_0x5aa59d=_0x22c410)['toLocaleDateString'](_0x3e1de7,{'month':'long','day':'numeric'})+',\x20'+_0x5aa59d['toLocaleTimeString'](_0x3e1de7,{'hour':'numeric','minute':'numeric'});var _0x3e1de7,_0x5aa59d;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new lt(_0x497fbd,ti),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x4a2d34=>_0x4a2d34||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x57b09f,_0x1a4646)=>_0x57b09f&&_0x1a4646),this['revisionActionsView']=_0xbe222e&&_0xbe222e['length']?ni(this,_0xbe222e):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x5a5f95['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x5a5f95['if']('isEnabled','ck-disabled',_0x52ff44=>!_0x52ff44),_0x5a5f95['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x5a5f95['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x5a5f95['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':_0x5a5f95['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':_0x159e34}]},this['revisionActionsView']],'on':{'click':_0x5a5f95['to'](_0xf9075b=>{_0xf9075b['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x2082b5=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x2082b5,'change',()=>{this['_requireRevisionName']&&!_0x2082b5['value']||this['fire']('setName',{'id':this['id'],'name':_0x2082b5['value']}),_0x2082b5['value']||(_0x2082b5['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(_0x533861,_0x20f921){const _0x259df7=_0x9c31d5['fromJSDate'](_0x533861)['setLocale'](_0x20f921),_0x561a32=_0x9c31d5['local'](),_0x49abad=_0x561a32['minus']({'days':0x1})['startOf']('day');let _0x1d4694,_0x496b90;return _0x259df7['hasSame'](_0x561a32,'day')?(_0x1d4694=_0x259df7['startOf']('day')['toJSDate'](),_0x496b90=_0x259df7['toRelativeCalendar']()):_0x259df7['hasSame'](_0x49abad,'day')?(_0x1d4694=_0x49abad['toJSDate'](),_0x496b90=_0x259df7['toRelativeCalendar']()):_0x259df7['hasSame'](_0x561a32,'week')?(_0x1d4694=_0x259df7['startOf']('week')['toJSDate'](),_0x496b90=_0x259df7['weekdayLong']||''):_0x259df7['hasSame'](_0x561a32,'year')?(_0x1d4694=_0x259df7['startOf']('month')['toJSDate'](),_0x496b90=_0x259df7['monthLong']||''):(_0x1d4694=_0x259df7['startOf']('year')['toJSDate'](),_0x496b90=String(_0x259df7['year'])),{'startDate':_0x1d4694,'localizedPeriodName':_0x496b90};}class mi extends _0x745a8d{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x2a96b7,_0x4de878,_0x536de9,_0x24fceb){super(_0x2a96b7);const _0x366a3f=vi(_0x4de878,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x4de878,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x536de9,this['_requireRevisionName']=_0x24fceb,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':_0x366a3f}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x4f4c13){const _0x138bb7=new ai(this['locale'],_0x4f4c13,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x138bb7);}['removeRevision'](_0x30c358){const _0x4edcb1=this['revisionViews']['find'](_0x3e78a6=>_0x3e78a6['id']===_0x30c358['id']);this['revisionViews']['remove'](_0x4edcb1);}}class as extends _0x745a8d{constructor(_0x3f598a){super(_0x3f598a);const _0x11da5a=new _0x22f298();_0x11da5a['content']=_0x2f0552,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x11da5a,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[g(_0x3f598a,'Revision\x20history')]}]});}}class di extends _0x745a8d{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x59336b,_0x5c41b8,_0xc8aa7c,_0x260fd7){super(_0x59336b);const _0x3f75d1=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x5c41b8,this['_revisionActions']=_0xc8aa7c,this['_requireRevisionName']=_0x260fd7,this['on']('select',(_0x26954f,_0x464d78)=>{this['fire']('revisionSelected',_0x464d78);}),this['on']('setName',(_0x289077,_0x86cad5)=>{this['fire']('revisionSetName',_0x86cad5);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new as(_0x59336b),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x3f75d1['if']('isEnabled','ck-disabled',_0xb229a9=>!_0xb229a9)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0xf737ab of this['_revisions'])this['_addRevision'](_0xf737ab);this['_revisions']['on']('add',(_0x1fd826,_0x28acea)=>{this['_addRevision'](_0x28acea);}),this['_revisions']['on']('remove',(_0x9dbf88,_0x25ee67)=>{this['_removeRevision'](_0x25ee67);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x4cd231=>_0x4cd231['revisionViews']['map'](_0x216ddb=>_0x216ddb))['flat']();}['selectRevision'](_0x1ce4a5){for(const _0x1668ee of this['revisionViews'])_0x1ce4a5&&_0x1ce4a5['id']===_0x1668ee['id']?_0x1668ee['select']():_0x1668ee['deselect']();}['highlightRevisions'](_0x3ffff6){for(const _0x36811e of this['revisionViews'])_0x3ffff6['some'](({id:_0x276a84})=>_0x276a84===_0x36811e['id'])?_0x36811e['highlight']():_0x36811e['unhighlight']();}['_addRevision'](_0x4acfbc){const _0x25fdf3=vi(_0x4acfbc['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x2729ed=this['timePeriodViews']['get'](0x0);_0x2729ed&&_0x2729ed['startDate']['getTime']()===_0x25fdf3['getTime']()||(_0x2729ed=new mi(this['locale'],_0x25fdf3,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x2729ed)),_0x2729ed['addRevision'](_0x4acfbc);}['_removeRevision'](_0x37791e){const _0x46c9ee=vi(_0x37791e['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x46c9ee)['removeRevision'](_0x37791e);}['_getTimePeriodViewByStartDate'](_0x187b2b){return this['timePeriodViews']['find'](_0x366e4b=>_0x366e4b['startDate']['getTime']()===_0x187b2b['getTime']());}}class d extends _0x4eb38d{['_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(_0xc7319d){super(_0xc7319d),this['_revisionViewer']=_0xc7319d['plugins']['get'](m),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x1ffffa=this['_revisionsRepository']['_revisions'],_0x29b226=this['_createRevisionActions'](),_0xf4665d=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new di(this['editor']['locale'],_0x1ffffa,_0x29b226,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',(_0x4c47bc,_0x274084)=>{_0x274084['revisionViews']['on']('add',(_0x161360,_0x2173a1)=>{_0x2173a1['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)),_0xf4665d['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x2e8e78=this['_revisionsRepository']['getRevision'](0x0);if(_0x2e8e78){const _0xab8b22=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x2e8e78['id']);this['_revisionViewer']['compare'](_0x2e8e78,_0xab8b22);}}['_handleRevisionSelected'](_0x46fa93,_0x421cf0){const _0x3aa4b4=this['_revisionsRepository']['getRevision'](_0x421cf0['id']),_0x3323ad=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x3aa4b4['id']);this['_revisionViewer']['compare'](_0x3aa4b4,_0x3323ad);}['_handleRevisionSetName'](_0x16cbed,_0x302f70){this['_revisionsRepository']['getRevision'](_0x302f70['id'])['setName'](_0x302f70['name']);}['_handleDiffChange'](_0x483174,_0x2c7a25,_0x4d1ef6){const _0x2ec472=this['_revisionsRepository']['getRevisionsInDiff'](_0x4d1ef6);_0x2ec472['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x2ec472),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x2ec472[0x0]));}['_createRevisionActions'](){const _0x20410a=this['editor'],_0x299fdd=d['availableRevisionActions'],_0x59ba7b=_0x20410a['config']['get']('revisionHistory.revisionActions')||d['defaultRevisionActions'];if(_0x59ba7b['length'])return _0x59ba7b['map'](_0x4893da=>{const _0x26b910='string'==typeof _0x4893da?Object['assign']({},_0x299fdd[_0x4893da]):_0x4893da;return _0x26b910['action']=_0x26b910['action']['bind'](this,_0x20410a),_0x26b910['isVisible']&&(_0x26b910['isVisible']=_0x26b910['isVisible']['bind'](this,_0x20410a)),_0x26b910;});}}function _t(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x12e6b3},_0x2c07a3)=>{const _0x31af5b=_0x12e6b3['get'](m),_0x1eb9bf=_0x31af5b['repository'];let _0x16347a=_0x31af5b['diff']['newRevisionId'],_0x2dea38=_0x2c07a3['id'];_0x1eb9bf['getIndex'](_0x16347a)>_0x1eb9bf['getIndex'](_0x2dea38)&&([_0x16347a,_0x2dea38]=[_0x2dea38,_0x16347a]),_0x31af5b['compare'](_0x16347a,_0x2dea38);},'isVisible':({plugins:_0xd52178},_0x45aa15)=>{const _0x398314=_0xd52178['get'](m);return!(_0x398314['repository']['getRevisionsInDiff'](_0x398314['diff'])['length']>0x2)&&!_0x45aa15['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x451da4,{id:_0x10a62f})=>{_0x451da4['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x10a62f);},'isVisible':({plugins:_0xe95e54},_0x2885d5)=>!!_0xe95e54['get'](m)['repository']['getLaterVisibleRevision'](_0x2885d5['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x3ad43c},{id:_0x135906,revisionNameView:_0x1205af})=>{const _0x1d9a39=_0x3ad43c['get'](m),_0x1e7847=_0x1d9a39['repository']['getEarlierVisibleRevision'](_0x135906);_0x1d9a39['compare'](_0x135906,_0x1e7847),_0x1205af['focus'](),_0x1205af['fieldView']['select']();}}};}class tt extends st{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x3f8022,_0x3af00e){super(_0x3f8022),this['_view']=_0x3af00e,this['_toolbarConfig']=et(_0x3f8022['config']['get']('toolbar')),this['_elementReplacer']=new ot();}get['element'](){return this['view']['element'];}['init'](_0x4f6465){const _0x3050de=this['editor'],_0x517d5a=this['view'],_0x19d76b=_0x3050de['editing']['view'],_0x18bfc1=_0x517d5a['editable'],_0x25113d=_0x19d76b['document']['getRoot']();_0x18bfc1['name']=_0x25113d['rootName'],_0x517d5a['render']();const _0x254654=_0x18bfc1['element'];this['setEditableElement'](_0x18bfc1['name'],_0x254654),_0x517d5a['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x19d76b['attachDomRoot'](_0x254654),this['_elementReplacer']['replace'](_0x4f6465,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0xe8d1e8=this['view'],_0x134c4e=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x134c4e['detachDomRoot'](_0xe8d1e8['editable']['name']),_0xe8d1e8['destroy']();}['_initToolbar'](){const _0x4bb621=this['view'];_0x4bb621['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x4bb621['stickyPanel']['limiterElement']=_0x4bb621['element'],_0x4bb621['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x362732})=>_0x362732),_0x4bb621['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x4bb621['toolbar']);}}class it extends rt{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x434abd,_0x1e3987,_0x3e95a4={}){super(_0x434abd),this['stickyPanel']=new ht(_0x434abd),this['toolbar']=new dt(_0x434abd,{'shouldGroupWhenFull':_0x3e95a4['shouldToolbarGroupWhenFull']}),this['_editable']=new ct(_0x434abd,_0x1e3987);}['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
- _0x3249be(_0x2b34f8){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x340a46,_0xed8f81){super(_0xed8f81),this['sourceElement']=_0x340a46,this['model']['document']['createRoot']();const _0x52305b=new it(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new tt(this,_0x52305b);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x27a44f,_0x367b5a){const _0x1c1786=new this(_0x27a44f,_0x367b5a);return await _0x1c1786['initPlugins'](),await _0x1c1786['ui']['init'](_0x27a44f),await _0x1c1786['data']['init'](_0x1c1786['config']['get']('initialData')||''),_0x1c1786['fire']('ready'),_0x1c1786;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class yt extends _0x4489ae{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xf7d861){function _0x5202dc(_0x509719){return _0x509719['map'](_0x4251df=>String['fromCharCode'](_0x4251df))['join']('');}super(_0xf7d861),this['result']='end',_0xf7d861[_0x5202dc([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5202dc([0x76,0x69,0x65,0x77])][_0x5202dc([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5202dc([0x61,0x75,0x74,0x6f]),_0xf7d861[_0x5202dc([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x5202dc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5202dc([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x5202dc([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x5202dc([0x6f,0x6b])});}}class k extends _0x4489ae{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,f];}constructor(_0x2365f2){if(super(_0x2365f2),!this['editor']['config']['get']('revisionHistory'))throw new _0x51ece8('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x4cf1c5=>this['_showRevisionViewer']({..._0x4cf1c5,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x43d649=>this['_closeRevisionViewer'](_0x43d649)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x4578d3=>this['_restoreRevision'](_0x4578d3)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x26357f){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x26357f;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x243938){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x243938);}['getRevision'](_0x1f4e28){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x1f4e28);}['getRevisions'](_0x40dd3f){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x40dd3f||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x4d98a6=this['editor'],_0x341d1d=_0x4493fa(_0x4d98a6,p),_0x26d16c=_0x4d98a6['plugins']['get']('RevisionTracker'),_0x2742c0=_0x4d98a6['plugins']['get']('Users')['users'];return _0x341d1d['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x341d1d['lazyRoots'],(_0x341d1d['plugins']['push'](yt,m,R,class extends _0x4489ae{static get['requires'](){return[m,'Users'];}['init'](){const _0x848a31=this['editor']['plugins']['get']('Users');for(const _0x285cfe of _0x2742c0)_0x285cfe['isAnonymous']||_0x848a31['getUser'](_0x285cfe['id'])||_0x848a31['addUser'](_0x285cfe);const _0x2a070b=_0x26d16c['repository']['getRevisions']();let _0x5a676a=null;const _0x50fd0b=this['editor']['plugins']['get']('RevisionViewer');_0x50fd0b['adapter']=_0x26d16c['adapter'],_0x50fd0b['bind']('isEnabled')['to'](_0x26d16c),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x4d98a6,'isReadOnly',_0x30fa7b=>!_0x30fa7b);for(const _0x5497e3 of _0x2a070b){const _0x3030d7=null===_0x5497e3['creator'];if(_0x3030d7&&_0x5497e3['toVersion']===_0x5497e3['fromVersion'])continue;const _0x47efb4=_0x5497e3['toJSON']();_0x50fd0b['addRevisionData'](_0x47efb4,(_0x55852d,_0x48a4ad,_0xd6e5ac)=>{if(_0x3030d7){if(_0x5a676a)_0x5a676a['_update'](_0x55852d,_0x48a4ad);else{if(!_0x48a4ad){const _0x1b912f=_0xd6e5ac['toJSON']();_0x1b912f['id']=_0x402ab0(),_0x26d16c['saveRevision'](_0x1b912f,_0xd6e5ac['toVersion'])['then'](_0x1fa2c4=>{_0x5a676a=_0x1fa2c4;});}}}else _0x5497e3['_update'](_0x55852d,_0x48a4ad);});}}},d),_0x341d1d);}['_enhanceShowRevisionViewerCallback'](){const _0x463c01=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0xdb3636=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x12db06=this['editor']['plugins']['get']('Autosave');await _0x12db06['save']();}else await _0xdb3636['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x216793=this['editor']['plugins']['get']('Dialog');_0x216793['isOpen']&&_0x216793['hide']();}const _0x5c3e0b=this['_getRevisionViewerEditorConfig']();return _0x463c01(_0x5c3e0b)['then'](_0x22153b=>{return(this['_viewerEditor']=_0x22153b,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'),_0x22153b);})['catch'](_0x3b4764=>(console['error'](_0x3b4764),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x25aeb7=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'](),_0x25aeb7(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x3e1487=this['editor']['plugins']['get']('Annotations');_0x3e1487['refreshVisibility'](),_0x3e1487['refreshPositioning']();}})));}['_showRevisionViewer'](_0x5e65a0){const _0x43918f=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x2c3a03=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x5ced2a=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return w['create'](_0x5ced2a,_0x5e65a0)['then'](_0x43f567=>(_0x2c3a03['style']['display']='block',_0x43918f['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x43f567));}['_closeRevisionViewer'](_0x36bcb2){const _0x5e30a6=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x5e30a6['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x36bcb2['destroy']();}async['_restoreRevision'](_0x1e2914){const _0x2f1b77=this['editor'],_0x22fe9f=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x19118a=_0x2f1b77['plugins']['get']('RevisionTracker'),_0x25f987=_0x2f1b77['plugins']['get']('RevisionHistoryUtils'),_0x28aca7=_0x22fe9f['repository']['getRevision'](_0x1e2914);let _0x11157a,_0x5ab1d7,_0x1c580a;try{await _0x25f987['loadRevisionData'](_0x28aca7,this['adapter']),_0x11157a=_0x25f987['getRevisionDocumentData'](_0x28aca7),_0x5ab1d7=_0x25f987['getRevisionRootsAttributes'](_0x28aca7);}catch(_0x1a684a){return void console['error'](_0x1a684a);}_0x2f1b77['model']['change'](_0xb5e803=>{for(const _0x355c3d of Array['from'](_0x2f1b77['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0xb5e803['removeMarker'](_0x355c3d);}),_0x22fe9f['isReady']=!0x1,_0x2f1b77['model']['enqueueChange'](_0x2f31f1=>{_0x2f31f1['setSelection'](null),_0x2f31f1['removeSelectionAttribute'](_0x2f1b77['model']['document']['selection']['getAttributeKeys']());const _0x478d58=Object['keys'](_0x11157a);for(const _0x52dff9 of _0x2f1b77['model']['document']['roots'])'$graveyard'!=_0x52dff9['rootName']&&_0x52dff9['isAttached']()&&!_0x478d58['includes'](_0x52dff9['rootName'])&&_0x2f31f1['detachRoot'](_0x52dff9);for(const _0x432901 of _0x478d58){let _0x2d16d4=_0x2f1b77['model']['document']['getRoot'](_0x432901);_0x2d16d4&&_0x2d16d4['isAttached']()||(_0x2d16d4=_0x2f31f1['addRoot'](_0x432901));const _0x2fbc0a=_0x5ab1d7[_0x432901],_0x23bcbc=Object['keys'](_0x2fbc0a),_0x2f501f=_0x11157a[_0x432901];for(const _0x19cb3e of _0x2d16d4['getAttributeKeys']())_0x23bcbc['includes'](_0x19cb3e)||_0x2f31f1['removeAttribute'](_0x19cb3e,_0x2d16d4);for(const _0x2a3b89 of _0x23bcbc)_0x2f31f1['setAttribute'](_0x2a3b89,_0x5ab1d7[_0x432901][_0x2a3b89],_0x2d16d4);_0x2f31f1['remove'](_0x2f31f1['createRangeIn'](_0x2d16d4)),_0x2f31f1['insert'](_0x2f1b77['data']['parse'](_0x2f501f,_0x2d16d4),_0x2d16d4,0x0);}});const _0xd23f57=g(_0x2f1b77['locale'],'Restored');if(_0x28aca7['name'])_0x1c580a=-0x1==_0x28aca7['name']['indexOf'](_0xd23f57)?_0xd23f57+':\x20'+_0x28aca7['name']:_0x28aca7['name'];else _0x1c580a=_0xd23f57+':\x20'+(_0x28aca7['createdAt']['toLocaleDateString'](_0x2f1b77['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x28aca7['createdAt']['toLocaleTimeString'](_0x2f1b77['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x19118a['saveRevision']({'name':_0x1c580a}),_0x22fe9f['isReady']=!0x0,_0x2f1b77['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
+ _t();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[m];}constructor(_0x1af2b1){super(_0x1af2b1),this['_revisionViewer']=_0x1af2b1['plugins']['get'](m),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0xd69048=this['_revisionsRepository']['_revisions'],_0x42fbc6=this['_createRevisionActions'](),_0xca2e0=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new di(this['editor']['locale'],_0xd69048,_0x42fbc6,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',(_0x41b02b,_0x3c400f)=>{_0x3c400f['revisionViews']['on']('add',(_0xe3aa47,_0x4d8932)=>{_0x4d8932['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)),_0xca2e0['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x206f91=this['_revisionsRepository']['getRevision'](0x0);if(_0x206f91){const _0x2e037c=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x206f91['id']);this['_revisionViewer']['compare'](_0x206f91,_0x2e037c);}}['_handleRevisionSelected'](_0x168e3b,_0x8a44b4){const _0x230fb1=this['_revisionsRepository']['getRevision'](_0x8a44b4['id']),_0x1e262d=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x230fb1['id']);this['_revisionViewer']['compare'](_0x230fb1,_0x1e262d);}['_handleRevisionSetName'](_0x1c5bb7,_0x3f885b){this['_revisionsRepository']['getRevision'](_0x3f885b['id'])['setName'](_0x3f885b['name']);}['_handleDiffChange'](_0x8b5e0e,_0xd5f016,_0x3015fb){const _0xa115e8=this['_revisionsRepository']['getRevisionsInDiff'](_0x3015fb);_0xa115e8['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0xa115e8),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0xa115e8[0x0]));}['_createRevisionActions'](){const _0x174da6=this['editor'],_0xc68e97=d['availableRevisionActions'],_0x300ac1=_0x174da6['config']['get']('revisionHistory.revisionActions')||d['defaultRevisionActions'];if(_0x300ac1['length'])return _0x300ac1['map'](_0x1df544=>{const _0x1dc568='string'==typeof _0x1df544?Object['assign']({},_0xc68e97[_0x1df544]):_0x1df544;return _0x1dc568['action']=_0x1dc568['action']['bind'](this,_0x174da6),_0x1dc568['isVisible']&&(_0x1dc568['isVisible']=_0x1dc568['isVisible']['bind'](this,_0x174da6)),_0x1dc568;});}}function _t(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x2c6916},_0x3d1b17)=>{const _0x22ef9d=_0x2c6916['get'](m),_0x29411c=_0x22ef9d['repository'];let _0x48b2dc=_0x22ef9d['diff']['newRevisionId'],_0x2882d5=_0x3d1b17['id'];_0x29411c['getIndex'](_0x48b2dc)>_0x29411c['getIndex'](_0x2882d5)&&([_0x48b2dc,_0x2882d5]=[_0x2882d5,_0x48b2dc]),_0x22ef9d['compare'](_0x48b2dc,_0x2882d5);},'isVisible':({plugins:_0x164a1b},_0xfcae47)=>{const _0x4e9c06=_0x164a1b['get'](m);return!(_0x4e9c06['repository']['getRevisionsInDiff'](_0x4e9c06['diff'])['length']>0x2)&&!_0xfcae47['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x1e2b04,{id:_0x3b5b90})=>{_0x1e2b04['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x3b5b90);},'isVisible':({plugins:_0x55b922},_0x2bdfe2)=>!!_0x55b922['get'](m)['repository']['getLaterVisibleRevision'](_0x2bdfe2['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x534cd3},{id:_0x4074e2,revisionNameView:_0x298827})=>{const _0x4b0dde=_0x534cd3['get'](m),_0x39d410=_0x4b0dde['repository']['getEarlierVisibleRevision'](_0x4074e2);_0x4b0dde['compare'](_0x4074e2,_0x39d410),_0x298827['focus'](),_0x298827['fieldView']['select']();}}};}class tt extends st{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x7d4413,_0x3fb4fe){super(_0x7d4413),this['_view']=_0x3fb4fe,this['_toolbarConfig']=et(_0x7d4413['config']['get']('toolbar')),this['_elementReplacer']=new ot();}get['element'](){return this['view']['element'];}['init'](_0x380bac){const _0x26338a=this['editor'],_0x286f88=this['view'],_0x25adf9=_0x26338a['editing']['view'],_0x46e589=_0x286f88['editable'],_0x5d6f8d=_0x25adf9['document']['getRoot']();_0x46e589['name']=_0x5d6f8d['rootName'],_0x286f88['render']();const _0x1f26df=_0x46e589['element'];this['setEditableElement'](_0x46e589['name'],_0x1f26df),_0x286f88['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x25adf9['attachDomRoot'](_0x1f26df),this['_elementReplacer']['replace'](_0x380bac,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x47f202=this['view'],_0x44c201=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x44c201['detachDomRoot'](_0x47f202['editable']['name']),_0x47f202['destroy']();}['_initToolbar'](){const _0x48d601=this['view'];_0x48d601['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x48d601['stickyPanel']['limiterElement']=_0x48d601['element'],_0x48d601['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x1e420a})=>_0x1e420a),_0x48d601['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x48d601['toolbar']);}}class it extends rt{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x7497e4,_0x267b92,_0x14d7f2={}){super(_0x7497e4),this['stickyPanel']=new ht(_0x7497e4),this['toolbar']=new dt(_0x7497e4,{'shouldGroupWhenFull':_0x14d7f2['shouldToolbarGroupWhenFull']}),this['_editable']=new ct(_0x7497e4,_0x267b92);}['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
+ _0x155746(_0x1e2b0c){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x4df168,_0x861b97){super(_0x861b97),this['sourceElement']=_0x4df168,this['model']['document']['createRoot']();const _0x4a30f9=new it(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new tt(this,_0x4a30f9);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x942739,_0x4f00b2){const _0x199ae2=new this(_0x942739,_0x4f00b2);return await _0x199ae2['initPlugins'](),await _0x199ae2['ui']['init'](_0x942739),await _0x199ae2['data']['init'](_0x199ae2['config']['get']('initialData')||''),_0x199ae2['fire']('ready'),_0x199ae2;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class yt extends _0x4eb38d{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x20fdb2){function _0x566d39(_0x32a3d7){return _0x32a3d7['map'](_0x172723=>String['fromCharCode'](_0x172723))['join']('');}super(_0x20fdb2),this['result']='end',_0x20fdb2[_0x566d39([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x566d39([0x76,0x69,0x65,0x77])][_0x566d39([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x566d39([0x61,0x75,0x74,0x6f]),_0x20fdb2[_0x566d39([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x566d39([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x566d39([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x566d39([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x566d39([0x6f,0x6b])});}}class k extends _0x4eb38d{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,f];}constructor(_0x56bc39){if(super(_0x56bc39),!this['editor']['config']['get']('revisionHistory'))throw new _0x164733('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x5205f0=>this['_showRevisionViewer']({..._0x5205f0,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x375929=>this['_closeRevisionViewer'](_0x375929)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x21c090=>this['_restoreRevision'](_0x21c090)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x1db3ac){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x1db3ac;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x3a0aae){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x3a0aae);}['getRevision'](_0x116fb6){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x116fb6);}['getRevisions'](_0x147e53){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x147e53||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x9f6632=this['editor'],_0x121e94=_0x475b27(_0x9f6632,p),_0x3b1196=_0x9f6632['plugins']['get']('RevisionTracker'),_0x116104=_0x9f6632['plugins']['get']('Users')['users'];return _0x121e94['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x121e94['lazyRoots'],(_0x121e94['plugins']['push'](yt,m,R,class extends _0x4eb38d{static get['requires'](){return[m,'Users'];}['init'](){const _0x16de54=this['editor']['plugins']['get']('Users');for(const _0xb5e46c of _0x116104)_0xb5e46c['isAnonymous']||_0x16de54['getUser'](_0xb5e46c['id'])||_0x16de54['addUser'](_0xb5e46c);const _0x237176=_0x3b1196['repository']['getRevisions']();let _0x172590=null;const _0x3e74ad=this['editor']['plugins']['get']('RevisionViewer');_0x3e74ad['adapter']=_0x3b1196['adapter'],_0x3e74ad['bind']('isEnabled')['to'](_0x3b1196),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x9f6632,'isReadOnly',_0x4a1c5f=>!_0x4a1c5f);for(const _0x277b32 of _0x237176){const _0x260f7d=null===_0x277b32['creator'];if(_0x260f7d&&_0x277b32['toVersion']===_0x277b32['fromVersion'])continue;const _0xac51cd=_0x277b32['toJSON']();_0x3e74ad['addRevisionData'](_0xac51cd,(_0x375698,_0x513ea8,_0xf2a9b9)=>{if(_0x260f7d){if(_0x172590)_0x172590['_update'](_0x375698,_0x513ea8);else{if(!_0x513ea8){const _0x471958=_0xf2a9b9['toJSON']();_0x471958['id']=_0x423624(),_0x3b1196['saveRevision'](_0x471958,_0xf2a9b9['toVersion'])['then'](_0x4b6ef9=>{_0x172590=_0x4b6ef9;});}}}else _0x277b32['_update'](_0x375698,_0x513ea8);});}}},d),_0x121e94);}['_enhanceShowRevisionViewerCallback'](){const _0x12756a=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x4cad67=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x5e4c8c=this['editor']['plugins']['get']('Autosave');await _0x5e4c8c['save']();}else await _0x4cad67['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x16e6c4=this['editor']['plugins']['get']('Dialog');_0x16e6c4['isOpen']&&_0x16e6c4['hide']();}const _0x3945c2=this['_getRevisionViewerEditorConfig']();return _0x12756a(_0x3945c2)['then'](_0x360558=>{return(this['_viewerEditor']=_0x360558,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'),_0x360558);})['catch'](_0x38f5cd=>(console['error'](_0x38f5cd),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x31d653=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'](),_0x31d653(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x182c9f=this['editor']['plugins']['get']('Annotations');_0x182c9f['refreshVisibility'](),_0x182c9f['refreshPositioning']();}})));}['_showRevisionViewer'](_0x112457){const _0x1a8718=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x4171cf=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x486d56=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return w['create'](_0x486d56,_0x112457)['then'](_0x514bf6=>(_0x4171cf['style']['display']='block',_0x1a8718['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x514bf6));}['_closeRevisionViewer'](_0x5ca23b){const _0xe49a91=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0xe49a91['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x5ca23b['destroy']();}async['_restoreRevision'](_0xc8b865){const _0x1741d2=this['editor'],_0x3aad27=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x5af476=_0x1741d2['plugins']['get']('RevisionTracker'),_0x83a42e=_0x1741d2['plugins']['get']('RevisionHistoryUtils'),_0x238663=_0x3aad27['repository']['getRevision'](_0xc8b865);let _0x5716a7,_0xff6b93,_0x256771;try{await _0x83a42e['loadRevisionData'](_0x238663,this['adapter']),_0x5716a7=_0x83a42e['getRevisionDocumentData'](_0x238663),_0xff6b93=_0x83a42e['getRevisionRootsAttributes'](_0x238663);}catch(_0x17a227){return void console['error'](_0x17a227);}_0x1741d2['model']['change'](_0x2d405b=>{for(const _0x1a950a of Array['from'](_0x1741d2['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x2d405b['removeMarker'](_0x1a950a);}),_0x3aad27['isReady']=!0x1,_0x1741d2['model']['enqueueChange'](_0x27b024=>{_0x27b024['setSelection'](null),_0x27b024['removeSelectionAttribute'](_0x1741d2['model']['document']['selection']['getAttributeKeys']());const _0x49d43b=Object['keys'](_0x5716a7);for(const _0x47b3e9 of _0x1741d2['model']['document']['roots'])'$graveyard'!=_0x47b3e9['rootName']&&_0x47b3e9['isAttached']()&&!_0x49d43b['includes'](_0x47b3e9['rootName'])&&_0x27b024['detachRoot'](_0x47b3e9);for(const _0x1dff92 of _0x49d43b){let _0x5e4abf=_0x1741d2['model']['document']['getRoot'](_0x1dff92);_0x5e4abf&&_0x5e4abf['isAttached']()||(_0x5e4abf=_0x27b024['addRoot'](_0x1dff92));const _0x2a6d5f=_0xff6b93[_0x1dff92],_0x258691=Object['keys'](_0x2a6d5f),_0x573067=_0x5716a7[_0x1dff92];for(const _0xef75c2 of _0x5e4abf['getAttributeKeys']())_0x258691['includes'](_0xef75c2)||_0x27b024['removeAttribute'](_0xef75c2,_0x5e4abf);for(const _0x3b0ef3 of _0x258691)_0x27b024['setAttribute'](_0x3b0ef3,_0xff6b93[_0x1dff92][_0x3b0ef3],_0x5e4abf);_0x27b024['remove'](_0x27b024['createRangeIn'](_0x5e4abf)),_0x27b024['insert'](_0x1741d2['data']['parse'](_0x573067,_0x5e4abf),_0x5e4abf,0x0);}});const _0x4a4bf8=g(_0x1741d2['locale'],'Restored');if(_0x238663['name'])_0x256771=-0x1==_0x238663['name']['indexOf'](_0x4a4bf8)?_0x4a4bf8+':\x20'+_0x238663['name']:_0x238663['name'];else _0x256771=_0x4a4bf8+':\x20'+(_0x238663['createdAt']['toLocaleDateString'](_0x1741d2['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x238663['createdAt']['toLocaleTimeString'](_0x1741d2['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x5af476['saveRevision']({'name':_0x256771}),_0x3aad27['isReady']=!0x0,_0x1741d2['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};