@ckeditor/ckeditor5-revision-history 48.3.0-alpha.7 → 48.3.0-alpha.8

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 (148) hide show
  1. package/dist/index.js +7 -7
  2. package/dist/translations/af.js +1 -1
  3. package/dist/translations/af.umd.js +1 -1
  4. package/dist/translations/ar.js +1 -1
  5. package/dist/translations/ar.umd.js +1 -1
  6. package/dist/translations/ast.js +1 -1
  7. package/dist/translations/ast.umd.js +1 -1
  8. package/dist/translations/az.js +1 -1
  9. package/dist/translations/az.umd.js +1 -1
  10. package/dist/translations/be.js +1 -1
  11. package/dist/translations/be.umd.js +1 -1
  12. package/dist/translations/bg.js +1 -1
  13. package/dist/translations/bg.umd.js +1 -1
  14. package/dist/translations/bn.js +1 -1
  15. package/dist/translations/bn.umd.js +1 -1
  16. package/dist/translations/bs.js +1 -1
  17. package/dist/translations/bs.umd.js +1 -1
  18. package/dist/translations/ca.js +1 -1
  19. package/dist/translations/ca.umd.js +1 -1
  20. package/dist/translations/cs.js +1 -1
  21. package/dist/translations/cs.umd.js +1 -1
  22. package/dist/translations/da.js +1 -1
  23. package/dist/translations/da.umd.js +1 -1
  24. package/dist/translations/de-ch.js +1 -1
  25. package/dist/translations/de-ch.umd.js +1 -1
  26. package/dist/translations/de.js +1 -1
  27. package/dist/translations/de.umd.js +1 -1
  28. package/dist/translations/el.js +1 -1
  29. package/dist/translations/el.umd.js +1 -1
  30. package/dist/translations/en-au.js +1 -1
  31. package/dist/translations/en-au.umd.js +1 -1
  32. package/dist/translations/en-gb.js +1 -1
  33. package/dist/translations/en-gb.umd.js +1 -1
  34. package/dist/translations/en.js +1 -1
  35. package/dist/translations/en.umd.js +1 -1
  36. package/dist/translations/eo.js +1 -1
  37. package/dist/translations/eo.umd.js +1 -1
  38. package/dist/translations/es-co.js +1 -1
  39. package/dist/translations/es-co.umd.js +1 -1
  40. package/dist/translations/es.js +1 -1
  41. package/dist/translations/es.umd.js +1 -1
  42. package/dist/translations/et.js +1 -1
  43. package/dist/translations/et.umd.js +1 -1
  44. package/dist/translations/eu.js +1 -1
  45. package/dist/translations/eu.umd.js +1 -1
  46. package/dist/translations/fa.js +1 -1
  47. package/dist/translations/fa.umd.js +1 -1
  48. package/dist/translations/fi.js +1 -1
  49. package/dist/translations/fi.umd.js +1 -1
  50. package/dist/translations/fr.js +1 -1
  51. package/dist/translations/fr.umd.js +1 -1
  52. package/dist/translations/gl.js +1 -1
  53. package/dist/translations/gl.umd.js +1 -1
  54. package/dist/translations/gu.js +1 -1
  55. package/dist/translations/gu.umd.js +1 -1
  56. package/dist/translations/he.js +1 -1
  57. package/dist/translations/he.umd.js +1 -1
  58. package/dist/translations/hi.js +1 -1
  59. package/dist/translations/hi.umd.js +1 -1
  60. package/dist/translations/hr.js +1 -1
  61. package/dist/translations/hr.umd.js +1 -1
  62. package/dist/translations/hu.js +1 -1
  63. package/dist/translations/hu.umd.js +1 -1
  64. package/dist/translations/hy.js +1 -1
  65. package/dist/translations/hy.umd.js +1 -1
  66. package/dist/translations/id.js +1 -1
  67. package/dist/translations/id.umd.js +1 -1
  68. package/dist/translations/it.js +1 -1
  69. package/dist/translations/it.umd.js +1 -1
  70. package/dist/translations/ja.js +1 -1
  71. package/dist/translations/ja.umd.js +1 -1
  72. package/dist/translations/jv.js +1 -1
  73. package/dist/translations/jv.umd.js +1 -1
  74. package/dist/translations/kk.js +1 -1
  75. package/dist/translations/kk.umd.js +1 -1
  76. package/dist/translations/km.js +1 -1
  77. package/dist/translations/km.umd.js +1 -1
  78. package/dist/translations/kn.js +1 -1
  79. package/dist/translations/kn.umd.js +1 -1
  80. package/dist/translations/ko.js +1 -1
  81. package/dist/translations/ko.umd.js +1 -1
  82. package/dist/translations/ku.js +1 -1
  83. package/dist/translations/ku.umd.js +1 -1
  84. package/dist/translations/lt.js +1 -1
  85. package/dist/translations/lt.umd.js +1 -1
  86. package/dist/translations/lv.js +1 -1
  87. package/dist/translations/lv.umd.js +1 -1
  88. package/dist/translations/ms.js +1 -1
  89. package/dist/translations/ms.umd.js +1 -1
  90. package/dist/translations/nb.js +1 -1
  91. package/dist/translations/nb.umd.js +1 -1
  92. package/dist/translations/ne.js +1 -1
  93. package/dist/translations/ne.umd.js +1 -1
  94. package/dist/translations/nl.js +1 -1
  95. package/dist/translations/nl.umd.js +1 -1
  96. package/dist/translations/no.js +1 -1
  97. package/dist/translations/no.umd.js +1 -1
  98. package/dist/translations/oc.js +1 -1
  99. package/dist/translations/oc.umd.js +1 -1
  100. package/dist/translations/pl.js +1 -1
  101. package/dist/translations/pl.umd.js +1 -1
  102. package/dist/translations/pt-br.js +1 -1
  103. package/dist/translations/pt-br.umd.js +1 -1
  104. package/dist/translations/pt.js +1 -1
  105. package/dist/translations/pt.umd.js +1 -1
  106. package/dist/translations/ro.js +1 -1
  107. package/dist/translations/ro.umd.js +1 -1
  108. package/dist/translations/ru.js +1 -1
  109. package/dist/translations/ru.umd.js +1 -1
  110. package/dist/translations/si.js +1 -1
  111. package/dist/translations/si.umd.js +1 -1
  112. package/dist/translations/sk.js +1 -1
  113. package/dist/translations/sk.umd.js +1 -1
  114. package/dist/translations/sl.js +1 -1
  115. package/dist/translations/sl.umd.js +1 -1
  116. package/dist/translations/sq.js +1 -1
  117. package/dist/translations/sq.umd.js +1 -1
  118. package/dist/translations/sr-latn.js +1 -1
  119. package/dist/translations/sr-latn.umd.js +1 -1
  120. package/dist/translations/sr.js +1 -1
  121. package/dist/translations/sr.umd.js +1 -1
  122. package/dist/translations/sv.js +1 -1
  123. package/dist/translations/sv.umd.js +1 -1
  124. package/dist/translations/th.js +1 -1
  125. package/dist/translations/th.umd.js +1 -1
  126. package/dist/translations/ti.js +1 -1
  127. package/dist/translations/ti.umd.js +1 -1
  128. package/dist/translations/tk.js +1 -1
  129. package/dist/translations/tk.umd.js +1 -1
  130. package/dist/translations/tr.js +1 -1
  131. package/dist/translations/tr.umd.js +1 -1
  132. package/dist/translations/tt.js +1 -1
  133. package/dist/translations/tt.umd.js +1 -1
  134. package/dist/translations/ug.js +1 -1
  135. package/dist/translations/ug.umd.js +1 -1
  136. package/dist/translations/uk.js +1 -1
  137. package/dist/translations/uk.umd.js +1 -1
  138. package/dist/translations/ur.js +1 -1
  139. package/dist/translations/ur.umd.js +1 -1
  140. package/dist/translations/uz.js +1 -1
  141. package/dist/translations/uz.umd.js +1 -1
  142. package/dist/translations/vi.js +1 -1
  143. package/dist/translations/vi.umd.js +1 -1
  144. package/dist/translations/zh-cn.js +1 -1
  145. package/dist/translations/zh-cn.umd.js +1 -1
  146. package/dist/translations/zh.js +1 -1
  147. package/dist/translations/zh.umd.js +1 -1
  148. package/package.json +10 -10
package/dist/index.js CHANGED
@@ -20,11 +20,11 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{CKEditorError as _0x8ca7e0,Collection as _0x112359,ElementReplacer as _0x5cbe36,FocusTracker as _0x48a924,KeystrokeHandler as _0x2db10e,ObservableMixin as _0x20efc5,ResizeObserver as _0x22d03b,logWarning as _0x907071,scrollViewportToShowTarget as _0x2f6654,uid as _0x32425d}from'@ckeditor/ckeditor5-utils';import{cloneDeep as _0x4eb401,isEqual as _0x774a24,set as _0x1014e0,unset as _0xbc5d0}from'es-toolkit/compat';import{Command as _0xb89394,Editor as _0x37dd64,ElementApiMixin as _0x2ece0b,PendingActions as _0x2155f3,Plugin as _0x27a866}from'@ckeditor/ckeditor5-core';import{ConfirmMixin as _0x3fd7db,Users as _0x230a98,getMarkerDomElement as _0x474d00,sanitizeEditorConfig as _0xcceb97}from'@ckeditor/ckeditor5-collaboration-core';import{ModelDocumentFragment as _0x1f4d7e,ModelElement as _0x4b38e5,ModelPosition as _0x2a5b6b,ModelRange as _0x2a7f46,ModelText as _0xb637ba,ViewAttributeElement as _0x146936,ViewContainerElement as _0x3989d3,ViewDocumentFragment as _0x37fa85,ViewElement as _0x124916,ViewEmptyElement as _0x29a8f9,ViewRawElement as _0x5df240,ViewText as _0x59c270,ViewUIElement as _0xe194ea}from'@ckeditor/ckeditor5-engine';import{IconChevronDown as _0x7fda58,IconChevronUp as _0x164853,IconHistory as _0x3db7bb,IconThreeVerticalDots as _0x5a2702,IconUndo as _0x5a08fb,IconUser as _0x1b6f85}from'@ckeditor/ckeditor5-icons';import{BoxedEditorUIView as _0x51176f,ButtonView as _0x35703b,ContextualBalloon as _0x3fe0bd,CssTransitionDisablerMixin as _0x2e97e6,EditorUI as _0x1e8d06,IconView as _0x35caf5,InlineEditableUIView as _0x178052,LabeledFieldView as _0x355d07,ListItemView as _0x2b79a9,ListView as _0x1e40a6,MenuBarMenuListItemButtonView as _0xdf7d2,MenuBarMenuListItemView as tt,MenuBarMenuListView as it,MenuBarMenuView as et,StickyPanelView as st,ToolbarSeparatorView as nt,ToolbarView as ot,UIModel as rt,View as at,addListToDropdown as ht,createDropdown as ct,createLabeledInputText as lt,normalizeToolbarConfig as ut,submitHandler as dt}from'@ckeditor/ckeditor5-ui';import{DateTime as ft}from'luxon';const vt=/* #__PURE__ -- @preserve */
24
- _0x20efc5();var gt=class extends vt{['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x33435a){super(),this['id']=_0x33435a['id']||_0x32425d(),this['creator']=_0x33435a['creator']||null,this['authors']=_0x33435a['authors']||[],this['diffData']=_0x33435a['diffData']||null,this['toVersion']=_0x33435a['toVersion']||0x0,this['fromVersion']=_0x33435a['fromVersion']||0x0,this['set']('name',_0x33435a['name']||''),this['set']('createdAt',_0x33435a['createdAt']||new Date()),this['set']('attributes',_0x33435a['attributes']||{});}['setName'](_0x4f47c9){this['_update']({'name':_0x4f47c9});}['setAttribute'](_0x51928e,_0x47c5e4){const _0x4494ec=_0x4eb401(this['attributes']);_0x1014e0(_0x4494ec,_0x51928e,_0x47c5e4),this['_update']({'attributes':_0x4494ec});}['removeAttribute'](_0x6510d3){const _0x266ff3=_0x4eb401(this['attributes']);_0xbc5d0(_0x266ff3,_0x6510d3),this['_update']({'attributes':_0x266ff3});}['_update'](_0xc744db,_0x39c368=!0x1){let _0x36460c=!0x1;const _0x532603={'id':this['id']};for(const _0x5700fe of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x29e993=_0xc744db[_0x5700fe];void 0x0!==_0x29e993&&_0x29e993!==this[_0x5700fe]&&(this[_0x5700fe]=_0x29e993,_0x532603[_0x5700fe]=_0x29e993,_0x36460c=!0x0);}_0x36460c&&(_0x532603['authors']&&(_0x532603['authorsIds']=_0x532603['authors']['map'](_0x135ef2=>_0x135ef2['id']),delete _0x532603['authors']),this['fire']('_update',_0x532603,_0x39c368));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x25cb5a=>_0x25cb5a['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},mt=class extends _0x27a866{['_revisions'];static get['requires'](){return[_0x230a98];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x1e71d9){super(_0x1e71d9),this['_revisions']=new _0x112359();}['afterInit'](){!async function(_0x1dd0e2){const _0x585360='vsmL4TPpuR53MlqSj2VXwH9oEAN8FxJtGUOdbDCZ01ihyfkBQY6acgz7rIeWKn',_0xaa2c61=0xeb829,_0x3027db=0x78e70,_0x5bc96b=window['Date']['now'](),_0xa07804=_0x1dd0e2['editor'],_0x1236b2=new window['Promise'](_0x38c045=>{_0xa07804['once']('ready',_0x38c045);}),_0x2d9230={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x23217d=_0xa07804['config']['get']('licenseKey');async function _0x19b183(){let _0xcec122,_0x361f2b=null,_0x23aabd=null;try{return'GPL'==_0x23217d?'NotAllowed':(_0xcec122=_0x16c88b(),_0xcec122?(_0xcec122['usageEndpoint']&&(_0x23aabd=_0x11e395(_0xcec122['usageEndpoint'],_0xcec122['jti'])),await _0x10249f()?_0x37be7c()?_0x5594fd()?'Expired':_0x12694a()?('evaluation'==_0xcec122['licenseType']&&(_0x361f2b=_0xae2a44('EvaluationLimit')),await _0x5ded73()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x5594fd(){const _0x1d0db8=['evaluation','trial']['includes'](_0xcec122['licenseType'])?_0x5bc96b/0x3e8:0xe10*_0x3027db;return _0xcec122['exp']<_0x1d0db8;}function _0x37be7c(){const _0x36af32=_0xcec122['features'];if(!_0x36af32)return!0x1;if(_0x36af32['includes']('*'))return!0x0;if(_0x36af32['includes']('RH'))return!0x0;if(_0x36af32['includes']('RRH')){if(_0x9a164b())return!0x0;if(_0xb5587c()||_0x62ff98())return!0x0;}return!0x1;}function _0x12694a(){const _0x2d7f86=_0xcec122['licensedHosts'];if(!_0x2d7f86||0x0==_0x2d7f86['length'])return!0x0;const {hostname:_0x40389f}=new URL(window['location']['href']);if(_0x2d7f86['includes'](_0x40389f))return!0x0;const _0x1f2ee6=_0x40389f['split']('.');return _0x2d7f86['filter'](_0x4bb2c1=>_0x4bb2c1['includes']('*'))['map'](_0x880a5e=>_0x880a5e['split']('.'))['filter'](_0x4cb11a=>_0x4cb11a['length']<=_0x1f2ee6['length'])['map'](_0x3a4e02=>Array(_0x1f2ee6['length']-_0x3a4e02['length'])['fill']('*'===_0x3a4e02[0x0]?'*':'')['concat'](_0x3a4e02))['some'](_0x34da6b=>_0x1f2ee6['every']((_0x1f8cff,_0x13b0b5)=>_0x34da6b[_0x13b0b5]===_0x1f8cff||'*'===_0x34da6b[_0x13b0b5]));}function _0x5ded73(){return _0x361f2b&&_0x23aabd?new window['Promise']((_0x54a6b7,_0x160fa1)=>{_0x361f2b['then'](_0x54a6b7,_0x160fa1),_0x23aabd['then'](_0x2bcd3a=>{'Valid'!=_0x2bcd3a&&_0x54a6b7(_0x2bcd3a);},_0x160fa1);}):_0x361f2b||_0x23aabd||'Valid';}}function _0x11e395(_0x4c83f6,_0x3a79e4){return new window['Promise'](_0x1bc72e=>{if(_0x407b65())return _0x1bc72e('Valid');_0x2a8b84(),_0xa07804['decorate']('_sendUsageRequest');let _0x1e2613=!0x1;const _0x50533e=_0x32425d();function _0x51dc8b(_0x3b0968){return!!_0x3b0968&&('object'==typeof _0x3b0968||'function'==typeof _0x3b0968)&&'function'==typeof _0x3b0968['then']&&'function'==typeof _0x3b0968['catch'];}function _0x414b26(_0x2167b8){_0x18c1a8(_0x2167b8)['then'](_0x187b66=>_0x187b66&&'ok'==_0x187b66['status']?_0x217bdc(_0x46e9be(_0x50533e+_0x3a79e4))!=_0x187b66['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x4de3b2=>(_0x573fe5(),_0x4de3b2),()=>{const _0x2fd0d5=_0x154565();return null==_0x2fd0d5?(_0x573fe5(),'Valid'):_0x5bc96b-_0x2fd0d5>0x240c8400?'UsageLimit':'Valid';})['then'](_0x1bc72e)['catch'](()=>{_0x1bc72e('UsageLimit');});const _0x1295c4=0x36ee80;function _0x573fe5(){const _0x28d622='llct-'+_0x217bdc(_0x46e9be(_0x4c83f6)),_0x40018b=_0x26e43e(_0x217bdc(window['Math']['ceil'](_0x5bc96b/_0x1295c4)));window['localStorage']['setItem'](_0x28d622,_0x40018b);}function _0x154565(){const _0x4ffc87='llct-'+_0x217bdc(_0x46e9be(_0x4c83f6)),_0x1f6135=window['localStorage']['getItem'](_0x4ffc87);return _0x1f6135?window['parseInt'](_0x26e43e(_0x1f6135),0x10)*_0x1295c4:null;}function _0x18c1a8(_0x44fee6){return new window['Promise']((_0x20de27,_0x54c13c)=>{_0x44fee6['then'](_0x20de27,_0x54c13c),window['setTimeout'](_0x54c13c,0x1d4c0);});}}_0xa07804['on']('_sendUsageRequest',(_0x555cdf,_0x44931d)=>{if(_0x44931d[0x0]!=_0x4c83f6)return _0x1bc72e('UsageLimit');_0x44931d[0x1]={..._0x44931d[0x1],'requestId':_0x50533e};},{'priority':'high'}),_0xa07804['on']('_sendUsageRequest',_0x51050e=>{_0x51dc8b(_0x51050e['return'])&&(_0x1e2613=!0x0,_0x414b26(_0x51050e['return']));},{'priority':'low'}),_0x1236b2['then'](()=>{_0x1e2613||_0x1bc72e('UsageLimit');});});function _0x407b65(){return'auto'==_0xa07804['editing']['view']['_overlayModeHint'];}function _0x2a8b84(){_0xa07804['editing']['view']['_overlayModeHint']='auto';}}function _0xae2a44(_0x437fcf){const _0x1d81fb=[new window['Promise'](_0x4fef74=>setTimeout(_0x4fef74,0x93ecc)),_0x1236b2['then'](()=>new window['Promise'](_0x3d6c92=>{const _0x294395=0x7,_0x5146cf=_0x1dd0e2['_revisions'];function _0x7eb72d(){_0x5146cf['length']>=_0x294395&&_0x3d6c92();}_0x7eb72d(),_0x5146cf['on']('add',_0x7eb72d);})),new window['Promise'](_0x16cb37=>{function _0x272dc4(){for(const _0x13a437 in window)if(window['Number']['isNaN'](window['Number'](_0x13a437))&&window[_0x13a437]==_0xaa2c61)return _0x16cb37();'destroyed'!=_0xa07804['state']&&window['setTimeout'](_0x272dc4,0x1388);}_0x1fa98b('RevisionViewer')&&_0x272dc4();})];return window['Promise']['race'](_0x1d81fb)['then'](()=>_0x437fcf);}async function _0x160c18(){if(await _0x1236b2,_0x1fa98b('RevisionViewer')){const _0x420a0c=_0x1dd0e2['getRevision'](0x0),_0x41118b=_0x1dd0e2['getEarlierVisibleRevision'](_0x420a0c['id']),_0x3efd65=_0x4a2098('RevisionViewer');return await _0x3efd65['compare'](_0x420a0c['id'],_0x41118b?_0x41118b['id']:null,!0x0),_0x3efd65['unbind']('isEnabled'),_0x3efd65['isEnabled']=!0x1,_0x3efd65['compare']=_0x5a7424,void(_0x3efd65['_getDiff']=_0x5a7424);}if(_0x1fa98b('RevisionTracker')){const _0x4d9101=_0x4a2098('RevisionTracker');_0x4d9101['unbind']('isEnabled'),_0x4d9101['isEnabled']=!0x1,_0x4d9101['update']=_0x5a7424,_0x4d9101['saveRevision']=_0x5a7424;}_0xa07804['model']['change']=_0x5a7424,_0xa07804['model']['enqueueChange']=_0x5a7424,_0xa07804['enableReadOnlyMode']('model');}function _0x9a164b(){return _0x1fa98b('WebSocketGateway')&&'connected'==_0x4a2098('WebSocketGateway')['state'];}function _0xb5587c(){return _0x1fa98b('RevisionViewerIntegration');}function _0x62ff98(){return _0x1fa98b('TrackChangesDataGetter');}function _0x2faa94(_0x12db4d){const _0x58f262=_0xa9e584();_0xa07804[_0x58f262]='revisionHistoryLicenseKey'+_0x12db4d,_0x12db4d['endsWith']('Limit')&&(window[_0xa9e584()]=_0xaa2c61),'Valid'!=_0x12db4d&&_0x160c18();}function _0xa9e584(){const _0x5c34de=window['String'](window['performance']['now']())['replace']('.','');let _0x4cb9cf='v';for(let _0x29fc2a=0x0;_0x29fc2a<_0x5c34de['length'];_0x29fc2a+=0x2){let _0x30ee43=window['parseInt'](_0x5c34de['substring'](_0x29fc2a,_0x29fc2a+0x2));_0x30ee43>=0x3e&&(_0x30ee43-=0x3e),_0x4cb9cf+=_0x585360[_0x30ee43];}return _0x4cb9cf;}function _0x16c88b(){const _0x5d2ed8=_0x23217d['split']('.');if(0x3!=_0x5d2ed8['length'])return null;return _0x1ffb80(_0x5d2ed8[0x1]);function _0x1ffb80(_0x15f655){const _0x31699d=_0x2512bd(_0x15f655);return _0x31699d&&_0x3c2076()?_0x31699d:null;function _0x3c2076(){const _0x3dbc3b=_0x31699d['jti'],_0x3042b8=window['parseInt'](_0x3dbc3b['substring'](_0x3dbc3b['length']-0x8),0x10),_0x562841={..._0x31699d,'jti':_0x3dbc3b['substring'](0x0,_0x3dbc3b['length']-0x8)};return delete _0x562841['vc'],_0x46e9be(_0x562841)==_0x3042b8;}}}async function _0x10249f(){let _0x2066d8=!0x0;try{const [_0x49bcaa,_0x1800b6,_0x413011]=_0x23217d['split']('.');return _0x577dc2(_0x49bcaa),await _0x22f73c(_0x49bcaa,_0x1800b6,_0x413011),_0x2066d8;}catch{return!0x1;}function _0x577dc2(_0x3240b1){const _0x85b605=_0x2512bd(_0x3240b1);_0x85b605&&'ES256'==_0x85b605['alg']||(_0x2066d8=!0x1);}async function _0x22f73c(_0x2b8c6b,_0x54c870,_0x1dd7ed){const _0x46e898=window['Uint8Array']['from'](_0x107201(_0x1dd7ed),_0x2d80a6=>_0x2d80a6['charCodeAt'](0x0)),_0x1daf74=new window['TextEncoder']()['encode'](_0x2b8c6b+'.'+_0x54c870),_0x31c77f=window['crypto']['subtle'];if(!_0x31c77f)return;const _0x13322b=await _0x31c77f['importKey']('jwk',_0x2d9230,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x31c77f['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x13322b,_0x46e898,_0x1daf74)||(_0x2066d8=!0x1);}}function _0x2512bd(_0x2ce3aa){return _0x2ce3aa['startsWith']('ey')?JSON['parse'](_0x107201(_0x2ce3aa)):null;}function _0x107201(_0xe33796){return window['atob'](_0xe33796['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x46e9be(_0x69f074){let _0x2ee99c=0x1505;function _0x42afbc(_0x469287){for(let _0x2b7954=0x0;_0x2b7954<_0x469287['length'];_0x2b7954++){const _0x21853a=_0x469287['charCodeAt'](_0x2b7954);_0x2ee99c=(_0x2ee99c<<0x5)+_0x2ee99c+_0x21853a,_0x2ee99c&=_0x2ee99c;}}function _0x4825eb(_0x50f890){Array['isArray'](_0x50f890)?_0x50f890['forEach'](_0x4825eb):_0x50f890&&'object'==typeof _0x50f890?Object['entries'](_0x50f890)['sort']()['forEach'](([_0x153fa3,_0x44f067])=>{_0x42afbc(_0x153fa3),_0x4825eb(_0x44f067);}):_0x42afbc(window['String'](_0x50f890));}return _0x4825eb(_0x69f074),_0x2ee99c>>>0x0;}function _0x217bdc(_0x264a22){return _0x264a22['toString'](0x10)['padStart'](0x8,'0');}function _0x26e43e(_0x38c149){return _0x38c149['split']('')['reverse']()['join']('');}function _0x1fa98b(_0x1f670b){return _0xa07804['plugins']['has'](_0x1f670b);}function _0x4a2098(_0x8b10fb){return _0xa07804['plugins']['get'](_0x8b10fb);}function _0x5a7424(){}_0x2faa94(await _0x19b183());}(this);}['createRevision'](_0x42a9b9){const _0xafc80f=this['editor']['plugins']['get']('Users');return new gt({'id':_0x42a9b9['id'],'name':_0x42a9b9['name'],'creator':_0x42a9b9['creatorId']?_0xafc80f['getUser'](_0x42a9b9['creatorId']):null,'diffData':_0x42a9b9['diffData']||_0x42a9b9['data'],'authors':_0x42a9b9['authorsIds']['map'](_0x9cf3b7=>_0xafc80f['getUser'](_0x9cf3b7)),'createdAt':new Date(_0x42a9b9['createdAt']),'attributes':_0x42a9b9['attributes'],'fromVersion':_0x42a9b9['fromVersion'],'toVersion':_0x42a9b9['toVersion']});}['addRevision'](_0x3f5a3c,_0x38efc5=0x0){this['_revisions']['add'](_0x3f5a3c,_0x38efc5);}['getRevision'](_0x3e8cbe){return this['_revisions']['get'](_0x3e8cbe);}['getRevisions'](_0x25d15d={'toJSON':!0x1}){const _0x4b443e=Array['from'](this['_revisions']);return _0x4b443e['reverse'](),_0x25d15d['toJSON']?_0x4b443e['map'](_0x1b481b=>_0x1b481b['toJSON']()):_0x4b443e;}['getIndex'](_0x16d60){return this['_revisions']['getIndex'](_0x16d60);}['getEarlierVisibleRevision'](_0x2cd9bc){const [,_0x228363]=this['getRevisionsIterator'](_0x2cd9bc,{'direction':'earlier'});return _0x228363;}['getLaterVisibleRevision'](_0x5acc0f){const [,_0x1c993e]=this['getRevisionsIterator'](_0x5acc0f,{'direction':'later'});return _0x1c993e;}['getRevisionsInDiff'](_0x4f483f){const _0x25a94b=[];for(const _0x5ee46d of this['getRevisionsIterator'](_0x4f483f['newRevisionId']))if(_0x25a94b['push'](_0x5ee46d),_0x5ee46d['id']===_0x4f483f['oldRevisionId'])break;return _0x25a94b;}*['getRevisionsIterator'](_0x1187fb,{direction:_0x405110='earlier',filter:_0x135790=()=>!0x0}={}){const _0x39d781='earlier'===_0x405110?0x1:-0x1;let _0x5bb43a=this['_revisions']['get'](_0x1187fb),_0x47e8af=this['getIndex'](_0x5bb43a);for(yield _0x5bb43a;_0x5bb43a;){if(_0x47e8af+=_0x39d781,_0x5bb43a=this['getRevision'](_0x47e8af),!_0x5bb43a)return;_0x135790(_0x5bb43a)&&(yield _0x5bb43a);}}},wt=class extends _0x27a866{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x3989d3,'c'],[_0x146936,'a'],[_0x29a8f9,'e'],[_0x5df240,'r'],[_0xe194ea,'u']]);['_typeCharToViewClass']=new Map([['c',_0x3989d3],['a',_0x146936],['e',_0x29a8f9],['r',_0x5df240],['u',_0xe194ea]]);async['loadRevisionData'](_0x2a33db,_0x433dab){if(_0x2a33db['diffData']||!_0x433dab)return;const _0x308670=this['editor']['config']['get']('collaboration.channelId');_0x2a33db['diffData']=(await _0x433dab['getRevision']({'channelId':_0x308670,'revisionId':_0x2a33db['id']}))['diffData'];}['getRevisionDocumentData'](_0x5f534e){const _0x244e71={};for(const _0x197eae in _0x5f534e['diffData']){if(_0x5f534e['diffData'][_0x197eae]['attachChange']&&!_0x5f534e['diffData'][_0x197eae]['attachChange']['isAttached'])continue;const _0x3ef37a=this['_removeRevisionMarkers'](JSON['parse'](_0x5f534e['diffData'][_0x197eae]['insertions'])),_0x4b04b4=this['editor']['editing']['view']['document'],_0x199ea0=new _0x37fa85(_0x4b04b4,_0x3ef37a['map'](_0xdea96c=>this['_getViewFromDiffObj'](_0xdea96c,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x244e71[_0x197eae]=this['editor']['data']['processor']['toData'](_0x199ea0),this['editor']['data']['processor']['useFillerType']('default');}return _0x244e71;}['getRevisionRootsAttributes'](_0x5034f1){const _0x22f8aa={};for(const _0x235c56 in _0x5034f1['diffData'])_0x5034f1['diffData'][_0x235c56]['attachChange']&&!_0x5034f1['diffData'][_0x235c56]['attachChange']['isAttached']||(_0x22f8aa[_0x235c56]=_0x5034f1['diffData'][_0x235c56]['attributesAfter']||{});return _0x22f8aa;}['getRevisionRootsModelElements'](_0x39ce31){const _0x75899c={};for(const _0xc91d98 in _0x39ce31['diffData']){if(_0x39ce31['diffData'][_0xc91d98]['attachChange']&&!_0x39ce31['diffData'][_0xc91d98]['attachChange']['isAttached'])continue;const _0x2fe3ba=_0x39ce31['diffData'][_0xc91d98]['rootElementName'];_0x2fe3ba&&(_0x75899c[_0xc91d98]=_0x2fe3ba);}return _0x75899c;}['_getTypeCharForViewElement'](_0x4b66cb){return this['_viewClassToTypeChar']['get'](_0x4b66cb['constructor']);}['_getViewFromDiffObj'](_0xd72261,_0x12500a){const _0x392ee5=this['editor']['editing']['view']['document'];if('string'==typeof _0xd72261)return new _0x59c270(_0x392ee5,_0xd72261);{let _0x192005,_0x2734dc;_0x2734dc='u'==_0xd72261['type']||'r'==_0xd72261['type']?[]:_0xd72261['children']['map'](_0x4e0de2=>this['_getViewFromDiffObj'](_0x4e0de2,_0x12500a));const _0x275801=this['_typeCharToViewClass']['get'](_0xd72261['type'])||_0x124916,_0x1db06a=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x192005=new _0x275801(_0x392ee5,_0xd72261['name'],_0xd72261['attributes'],_0x2734dc),'u'==_0xd72261['type']&&_0xd72261['children'][0x0]){const _0x13ab30=_0xd72261['children'][0x0];if(_0x192005['render']=function(_0x20620a){const _0xa523fe=_0x20620a['createElement']('div');return _0xa523fe['innerHTML']=_0x13ab30,_0xa523fe['childNodes'][0x0];},_0x12500a){const _0x3a6ed1=new _0x37fa85(_0x392ee5);_0x3a6ed1['_appendChild'](_0x192005);const _0x1aa1bc=Array['from'](_0x1db06a['viewChildrenToDom'](_0x3a6ed1,{'bind':!0x1})),_0x58f728=_0x1db06a['domDocument']['createElement']('div');_0x58f728['append'](..._0x1aa1bc),_0x192005=Array['from'](_0x1db06a['domChildrenToView'](_0x58f728))[0x0];}}else{if('r'==_0xd72261['type']&&_0xd72261['children'][0x0]){const _0x29d8cb=_0xd72261['children'][0x0];if(_0x192005['render']=function(_0x10ce39){_0x10ce39['innerHTML']=_0x29d8cb;},_0x12500a){const _0x27c0cb=new _0x37fa85(_0x392ee5);_0x27c0cb['_appendChild'](_0x192005);const _0x579e8a=Array['from'](_0x1db06a['viewChildrenToDom'](_0x27c0cb,{'bind':!0x1})),_0x4f0bed=_0x1db06a['domDocument']['createElement']('div');_0x4f0bed['append'](..._0x579e8a);const _0x57cbd8=Array['from'](_0x1db06a['domChildrenToView'](_0x4f0bed));_0x57cbd8['length']>0x1?_0x192005['_appendChild'](_0x57cbd8):_0x192005=_0x57cbd8[0x0];}}}if(_0xd72261['customProperties']){for(const [_0x2489a4,_0x62473]of _0xd72261['customProperties'])_0x192005['_setCustomProperty'](_0x2489a4,_0x62473);}const _0x27af6c=void 0x0===_0xd72261['fillerOffset']?null:_0xd72261['fillerOffset'];return null!==_0x27af6c&&(_0x192005['getFillerOffset']=()=>_0x27af6c),_0x192005;}}['_makeModelFromViewString'](_0x5d3693,_0x37a20f){const _0x17c580=JSON['parse'](_0x5d3693),_0x1d5810=this['editor']['editing']['view']['document'],_0x958510=new _0x37fa85(_0x1d5810,_0x17c580['map'](_0x4d7338=>this['_getViewFromDiffObj'](_0x4d7338,!0x0))),_0x58b8b8=this['editor']['data']['toModel'](_0x958510,_0x37a20f);return _0x58b8b8['name']=_0x37a20f,_0x58b8b8;}['_removeRevisionMarkers'](_0x24200a){return(_0x24200a=_0x24200a['filter'](_0x4f4d58=>!_0x4f4d58['name']||'revision-start'!==_0x4f4d58['name']&&'revision-end'!==_0x4f4d58['name']))['forEach'](_0xe6eb0f=>{'string'!=typeof _0xe6eb0f&&(_0xe6eb0f['children']=this['_removeRevisionMarkers'](_0xe6eb0f['children']),_0xe6eb0f['attributes']=_0xe6eb0f['attributes']['filter'](_0x261199=>!_0x261199[0x0]['startsWith']('data-revision-')));}),_0x24200a;}};function pt(_0x127511,_0x562add,_0x3ed658){const t=_0x127511['t'];switch(_0x562add){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'},_0x3ed658);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x3ed658);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'';}}var _t=class extends _0x27a866{['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[_0x230a98,mt,wt,_0x2155f3];}constructor(_0x33c7cf){super(_0x33c7cf),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new yt(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x4c90ec=_0x32425d();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x4c90ec},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 _0x184260=this['repository']['getRevision'](0x0),_0x5d5ac1=_0x184260&&null===_0x184260['creator']?_0x184260:null;if(this['_continueCurrentRevision']=!!_0x5d5ac1&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x2e9017=this['_source']['getCurrentRevisionId'](),_0x54aeff=this['repository']['getRevision'](_0x2e9017);if(_0x54aeff)this['_startingVersion']=_0x54aeff['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x41100e=this['_source']['history']['_operations']['find'](_0x576c82=>!_0x576c82['_isInit']),_0x444cb2=_0x41100e?_0x41100e['baseVersion']:this['_source']['history']['version'];_0x184260?(_0x184260['toVersion']<_0x444cb2&&_0x184260['_update']({'toVersion':_0x444cb2}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x5d5ac1['id'],this['_startingVersion']=_0x5d5ac1['fromVersion']):(this['_startingVersion']=_0x184260['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x444cb2,this['_continueCurrentRevision']=!0x1);}}else _0x5d5ac1&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x5d5ac1['toVersion'],this['editor']['model']['document']['history']['version']),_0x5d5ac1['fromVersion']===_0x5d5ac1['toVersion']?(0x0!==_0x5d5ac1['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x5d5ac1['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x5d5ac1['id'],this['_startingVersion']=_0x5d5ac1['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',_0x4c89ae=>!_0x4c89ae),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x56b225=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x403058;for(const _0x30af45 in _0x56b225){const _0x1b5895=_0x30af45,_0x2ac439=_0x56b225[_0x1b5895];if('revisionHistoryLicenseKeyValid'==_0x2ac439||'revisionHistoryLicenseKeyInvalid'==_0x2ac439||'revisionHistoryLicenseKeyExpired'==_0x2ac439||'revisionHistoryLicenseKeyDomainLimit'==_0x2ac439||'revisionHistoryLicenseKeyNotAllowed'==_0x2ac439||'revisionHistoryLicenseKeyEvaluationLimit'==_0x2ac439||'revisionHistoryLicenseKeyUsageLimit'==_0x2ac439){delete _0x56b225[_0x1b5895],_0x403058=_0x2ac439,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x403058&&_0x56b225['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x403058&&_0x56b225['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x403058&&_0x56b225['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x403058&&_0x56b225['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x403058&&_0x56b225['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x403058&&_0x56b225['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x12eb67=this['repository']['getRevision'](0x0),_0x1b3afe=await this['getRevisionDocumentData'](_0x12eb67),_0x902e08=await this['getRevisionRootsAttributes'](_0x12eb67),_0x3d5736=this['_utils']['getRevisionRootsModelElements'](_0x12eb67);this['_replaceEditorDataWithRevisionData'](_0x1b3afe,_0x902e08,_0x3d5736);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x2a0d19){this['_source']=_0x2a0d19;}async['update'](){const _0x1a9b49=await this['_source']['getLatestVersion']();if(_0x1a9b49>this['currentRevision']['toVersion']){await this['_loadState']();const _0x5cea16=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x1a9b49});_0x5cea16['authors']=_0x5cea16['authorsIds']['map'](_0x4d016d=>this['editor']['plugins']['get']('Users')['getUser'](_0x4d016d)),this['currentRevision']['_update'](_0x5cea16);}}async['saveRevision'](_0x1ed062={},_0x32ecf5=null){const _0x22cf4f=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x32ecf5>this['currentRevision']['toVersion']&&(_0x32ecf5=null),null===_0x32ecf5&&(_0x32ecf5=await this['_source']['getLatestVersion']());const _0x5b6823=this['_getFromVersion'](_0x32ecf5),_0x3fba8f=this['buildRevisionData']({'from':_0x5b6823,'to':_0x32ecf5});if(this['currentRevision']['toVersion']<_0x32ecf5){const _0x2318c0=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x32ecf5,'to':_0x32ecf5});_0x2318c0['authors']=[],_0x2318c0['authorsIds']=[],_0x2318c0['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x2318c0,!0x0),delete _0x2318c0['authors'],_0x22cf4f['push'](_0x2318c0);}_0x1ed062['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x1ed062['name']=_0x1ed062['name']||null,_0x1ed062['id']=_0x1ed062['id']||_0x32425d(),_0x1ed062={..._0x1ed062,..._0x3fba8f};const _0x1d6567=this['addRevisionData'](_0x1ed062);_0x22cf4f['push'](_0x1ed062);const _0x577438=this['repository']['getIndex'](_0x1d6567);if(0x0!==_0x577438){const _0x909c0f=this['repository']['getRevision'](_0x577438-0x1);if(_0x909c0f['fromVersion']!==_0x32ecf5){const _0x574d1a=this['_revisionDataBuilder']['getData'](_0x32ecf5,_0x909c0f['toVersion']),_0x38864f={'id':_0x909c0f['id'],'diffData':_0x574d1a['diffData'],'authorsIds':_0x574d1a['authorsIds'],'authors':_0x574d1a['authorsIds']['map'](_0x4fe5bd=>this['editor']['plugins']['get']('Users')['getUser'](_0x4fe5bd)),'fromVersion':_0x32ecf5};_0x909c0f===this['currentRevision']&&(_0x38864f['createdAt']=new Date(_0x1ed062['createdAt']['getTime']()+0xa)),_0x909c0f['_update'](_0x38864f,!0x0),delete _0x38864f['authors'],_0x22cf4f['push'](_0x38864f);}}if(this['adapter']){for(const _0x27e173 of _0x22cf4f)this['_bufferUpdate'](_0x27e173['id'],_0x27e173,!0x0);this['sendBufferedUpdates']();}return _0x1d6567;}['addRevisionData'](_0x16ae2b){const _0x492df2=this['repository']['createRevision'](_0x16ae2b);return this['adapter']&&_0x492df2['on']('_update',(_0x5b64db,_0xd57156,_0x371238)=>{_0x371238||(this['_bufferUpdate'](_0xd57156['id'],_0xd57156,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x492df2,this['_findInsertionIndex'](_0x492df2)),_0x492df2;}async['getRevisionDocumentData'](_0x3fa9f1){return await this['_utils']['loadRevisionData'](_0x3fa9f1,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x3fa9f1);}async['getRevisionRootsAttributes'](_0x330832){return await this['_utils']['loadRevisionData'](_0x330832,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x330832);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x4b5a5c=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x2de813=0x0;_0x2de813<_0x4b5a5c['length'];_0x2de813++){const _0x2ae964=_0x4b5a5c[_0x2de813];let _0x3f82ab=!0x1;for(const _0x37ff9d of Object['keys'](_0x2ae964))void 0x0===_0x2ae964[_0x37ff9d]?delete _0x2ae964[_0x37ff9d]:'id'!==_0x37ff9d&&(_0x3f82ab=!0x0);_0x3f82ab||(_0x4b5a5c[_0x2de813]=null);}if(_0x4b5a5c=_0x4b5a5c['filter'](_0x36d7b5=>null!==_0x36d7b5),!_0x4b5a5c['length'])return;for(let _0x1ead9b=0x0;_0x1ead9b<_0x4b5a5c['length'];_0x1ead9b++){const _0x348240=_0x4b5a5c[_0x1ead9b];void 0x0!==_0x348240['fromVersion']&&void 0x0===_0x348240['toVersion']&&(_0x348240['toVersion']=this['repository']['getRevision'](_0x348240['id'])['toVersion']),void 0x0!==_0x348240['toVersion']&&void 0x0===_0x348240['fromVersion']&&(_0x348240['fromVersion']=this['repository']['getRevision'](_0x348240['id'])['fromVersion']);}const _0x223cad=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x4b5a5c,_0x223cad)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0xfb9361=>{if(_0xfb9361){for(const _0x250f31 of _0xfb9361)this['setRevisionData']({'id':_0x250f31['id'],'createdAt':_0x250f31['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x43ea09=null,from:_0x2732d8=null,to:_0x15df06=null}){_0x2732d8=null!==_0x2732d8?_0x2732d8:_0x43ea09['fromVersion'],_0x15df06=null!==_0x15df06?_0x15df06:_0x43ea09['toVersion'];const _0x4540fa=this['_revisionDataBuilder']['getData'](_0x2732d8,_0x15df06),_0x2db489={'diffData':_0x4540fa['diffData'],'authorsIds':_0x4540fa['authorsIds'],'fromVersion':_0x2732d8,'toVersion':_0x15df06};if(!_0x43ea09||_0x15df06!==_0x43ea09['toVersion']){const _0x471aad=_0x15df06-0x1,_0x3720d4=this['_source']['history']['getOperation'](_0x471aad);_0x2db489['createdAt']=_0x3720d4&&_0x3720d4['createdAt']||new Date();}if(this['_loadedStateData']&&_0x2732d8===this['_loadedStateData']['fromVersion']){for(const _0x2f454b of this['_loadedStateData']['authors'])_0x2db489['authorsIds']['includes'](_0x2f454b['id'])||_0x2db489['authorsIds']['push'](_0x2f454b['id']);}return _0x2db489;}['_bufferUpdate'](_0x29d586,_0x1acbf7,_0x17835a){if(this['_bufferedUpdates']['has'](_0x29d586)){const _0x4a4fee=this['_bufferedUpdates']['get'](_0x29d586);_0x1acbf7=_0x17835a?{..._0x4a4fee,..._0x1acbf7}:{..._0x1acbf7,..._0x4a4fee};}this['_bufferedUpdates']['set'](_0x29d586,_0x1acbf7);}['setRevisionData'](_0x2ffafd){const _0x7a46e7=this['repository']['getRevision'](_0x2ffafd['id']);if(_0x2ffafd['createdAt']&&(_0x2ffafd['createdAt']=new Date(_0x2ffafd['createdAt'])),_0x2ffafd['authorsIds']){const _0x59fcc7=this['editor']['plugins']['get']('Users');_0x2ffafd['authors']=_0x2ffafd['authorsIds']['map'](_0x497340=>_0x59fcc7['getUser'](_0x497340));}_0x7a46e7['_update'](_0x2ffafd,!0x0);}['_createInitialRevision'](_0xd586db){const _0x4b4fdb=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x4b4fdb)this['_initialRevisionId']=_0x4b4fdb['id'];else{const _0x5c000f=!this['editor']['model']['document']['roots']['find'](_0x3d57ab=>this['editor']['model']['hasContent'](_0x3d57ab)),_0x3f5a2e=this['editor']['plugins']['get']('Users')['me']['id'],_0x531120=pt(this['editor']['locale'],_0x5c000f?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0xd586db,'to':_0xd586db,'id':this['_initialRevisionId'],'name':_0x531120,'creatorId':_0x3f5a2e});}}['_createCurrentRevision'](_0xfa907f){const _0x52ebee=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x52ebee),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0xfa907f,'to':_0xfa907f,'id':_0x52ebee,'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'](_0x3233e2,_0x50312b,_0x25e45f){const _0x29b574={},_0x2c990a={},_0x3caf7f={},_0x430036=this['editor']['config']['get']('roots')||{};for(const [_0x1e5f4d,_0x687f3a]of Object['entries'](_0x430036))_0x687f3a['lazyLoad']||(_0x29b574[_0x1e5f4d]=_0x687f3a['initialData']??'',_0x2c990a[_0x1e5f4d]=_0x687f3a['modelAttributes']||{},_0x687f3a['modelElement']&&(_0x3caf7f[_0x1e5f4d]=_0x687f3a['modelElement']));for(const _0x155d60 of this['editor']['model']['document']['getRootNames']())_0x29b574[_0x155d60]??='',_0x2c990a[_0x155d60]??={};let _0x1e74de=!0x1;const _0x2d963f=Object['keys'](_0x29b574),_0x49d176=Object['keys'](_0x3233e2);for(const _0x48f60c of _0x2d963f){if(_0x29b574[_0x48f60c]!==_0x3233e2[_0x48f60c]&&''!==_0x29b574[_0x48f60c]['trim']()){_0x1e74de=!0x0;break;}if(!_0x774a24(_0x2c990a[_0x48f60c],_0x50312b[_0x48f60c])&&Object['keys'](_0x2c990a[_0x48f60c])['length']>0x0){_0x1e74de=!0x0;break;}const _0x5e8e92=_0x3caf7f[_0x48f60c],_0x14e2ff=_0x25e45f[_0x48f60c];if(_0x5e8e92&&_0x14e2ff&&_0x5e8e92!==_0x14e2ff){_0x1e74de=!0x0;break;}}_0x1e74de||(_0x1e74de=_0x49d176['some'](_0x7aaf68=>!this['editor']['model']['document']['getRoot'](_0x7aaf68))),_0x1e74de&&_0x907071('editor-initial-data-replaced-with-revision-data',{'editorData':_0x29b574,'editorRootsAttributes':_0x2c990a,'editorRootsModelElements':_0x3caf7f,'revisionData':_0x3233e2,'revisionRootsAttributes':_0x50312b,'revisionRootsModelElements':_0x25e45f});for(const [_0xef5af8,_0x3ba822]of Object['entries'](_0x3233e2))this['editor']['config']['set']('roots.'+_0xef5af8+'.initialData',_0x3ba822);for(const [_0x3b4834,_0x4fab19]of Object['entries'](_0x50312b))this['editor']['config']['set']('roots.'+_0x3b4834+'.modelAttributes',_0x4fab19);const _0x531323=this['editor']['model']['document'];for(const [_0x18ae14,_0x53c835]of Object['entries'](_0x25e45f)){this['editor']['config']['set']('roots.'+_0x18ae14+'.modelElement',_0x53c835);const _0x57cbee=_0x531323['getRoot'](_0x18ae14);_0x57cbee&&_0x57cbee['name']!==_0x53c835&&(_0x531323['roots']['remove'](_0x18ae14),_0x531323['createRoot'](_0x53c835,_0x18ae14));}}['_addPendingAction'](){if(!this['_pendingAction']){const _0x415087=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x415087['add'](pt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x207bb7){const _0x24c8f3=this['repository']['getRevisions']();_0x24c8f3['reverse']();let _0x1e9e00=0x0;for(;_0x1e9e00<_0x24c8f3['length'];){const _0x387fe3=_0x24c8f3[_0x1e9e00];if(_0x387fe3===this['currentRevision']){_0x1e9e00++;continue;}if(_0x387fe3['id']===this['_initialRevisionId'])break;const _0x565d5f=_0x207bb7['toVersion']-_0x387fe3['toVersion']||_0x207bb7['fromVersion']-_0x387fe3['fromVersion'];if(_0x565d5f>0x0)break;if(_0x565d5f<0x0)_0x1e9e00++;else{if(!_0x207bb7['creator']&&_0x387fe3['creator'])break;if(_0x387fe3['creator']||!_0x207bb7['creator']){if(_0x207bb7['createdAt']>_0x387fe3['createdAt'])break;_0x1e9e00++;}else _0x1e9e00++;}}return _0x1e9e00;}['_getFromVersion'](_0x39cdb0){const _0x1520df=this['repository']['getRevisions']();_0x1520df['reverse'](),_0x1520df['shift']();const _0x473110=_0x1520df['find'](_0x2b10cb=>_0x2b10cb['toVersion']<=_0x39cdb0)['toVersion'];return _0x473110<this['_startingVersion']?this['_startingVersion']:_0x473110;}['_makeRevision']({name:_0x2cf860,from:_0xf2bfe4,to:_0x5b808a,creatorId:_0x1e86ed,id:_0x4cfac7}){const _0x5e18c7=this['buildRevisionData']({'from':_0xf2bfe4,'to':_0x5b808a});_0x5e18c7['name']=_0x2cf860,_0x5e18c7['creatorId']=_0x1e86ed,_0x5e18c7['id']=_0x4cfac7;const _0x4bf0c4=this['addRevisionData'](_0x5e18c7);return this['adapter']&&this['_bufferUpdate'](_0x5e18c7['id'],_0x5e18c7,!0x0),_0x4bf0c4;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}},yt=class{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x12c982){this['editor']=_0x12c982,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'](_0x229048){this['source']=_0x229048;const _0xa6c4=new Map(),_0x20b538=new Map(),_0x5362f7=this['editor']['model']['document']['roots']['map'](_0x327b93=>_0x327b93['rootName']);for(const _0x1a96f8 of _0x5362f7){const _0x16f29d=this['editor']['model']['document']['getRoot'](_0x1a96f8),_0x42049c=bt(_0x16f29d);_0xa6c4['set'](_0x1a96f8,_0x42049c),_0x20b538['set'](_0x1a96f8,Object['fromEntries'](_0x16f29d['getAttributes']()));}const _0x28e9eb=Array['from'](this['editor']['model']['markers'])['map'](_0x4bbb15=>[_0x4bbb15['name'],_0x4bbb15['getRange']()]),_0x239f04=this['source']['version'];this['_saveMetaData'](_0x239f04,_0xa6c4,_0x28e9eb,_0x20b538),this['_startingRevisionId']=this['_revisionId'];const _0x2b8990=new Map(),_0x139168=new Map();for(const _0xb05b52 of _0x5362f7){const _0x2a353b=Rt(_0xb05b52,this['editor']['model']['document']['getRoot'](_0xb05b52)['name']);_0x2b8990['set'](_0xb05b52,_0x2a353b),_0x139168['set'](_0xb05b52,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x2b8990,[],_0x139168);}['getData'](_0x241e34,_0x2cdaf9){if(this['_lastFrom']===_0x241e34&&this['_lastTo']<=_0x2cdaf9)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x2cdaf9,!0x0);else{if(!this['_savedMetaData']['has'](_0x241e34)){const _0x388461=this['_getPreviousFrom'](_0x241e34);this['_calculateMetaData'](_0x388461,_0x241e34,!0x1);}this['_calculateMetaData'](_0x241e34,_0x2cdaf9,!0x0);}return this['_lastFrom']=_0x241e34,this['_lastTo']=_0x2cdaf9,this['_getState']();}['loadState'](_0x4dfbe3){if(!this['_savedMetaData']['has'](_0x4dfbe3['fromVersion'])){const _0x421313=this['_getPreviousFrom'](_0x4dfbe3['fromVersion']);this['_calculateMetaData'](_0x421313,_0x4dfbe3['fromVersion'],!0x1);}this['_calculateMetaData'](_0x4dfbe3['fromVersion'],_0x4dfbe3['toVersion'],!0x1);const _0x4655b0=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x4dfbe3['fromVersion'],this['_lastTo']=_0x4dfbe3['toVersion'];for(const _0x4b9696 in _0x4dfbe3['diffData']){const _0x468d77=_0x4dfbe3['diffData'][_0x4b9696]['attachChange'],_0x3e6002=_0x4eb401(_0x4dfbe3['diffData'][_0x4b9696]['attributesBefore'])||{},_0xf07849=_0x4dfbe3['diffData'][_0x4b9696],_0x1e17c6=_0x4655b0['_makeModelFromViewString'](_0xf07849['deletions'],_0xf07849['rootElementName']||'$root');_0x1e17c6['rootName']=_0x4b9696,_0x1e17c6['_isAttached']=!_0x468d77||!_0x468d77['isAttached'],_0x1e17c6['isAttached']=()=>_0x1e17c6['_isAttached'],this['_baseRoots']['set'](_0x4b9696,_0x1e17c6),this['_baseRootsAttributes']['set'](_0x4b9696,_0x3e6002),_0x468d77&&this['_touchedRoots']['set'](_0x4b9696,_0x468d77);const _0x3beab1=this['_makeIdsRoot'](_0x1e17c6);this['_baseIdsRoots']['set'](_0x4b9696,_0x3beab1);for(const [_0x4c8f8f,_0x5d2fc5]of _0x1e17c6['markers']){if(!_0x4c8f8f['startsWith']('revision:'))continue;const _0x217302=_0x4c8f8f['split'](':')[0x2];for(const _0x31e2fc of _0x5d2fc5['getWalker']({'singleCharacters':!0x0})){const _0x48506e=this['_getVidAttributeName'](_0x31e2fc),_0x460287='elementEnd'==_0x31e2fc['type']?_0x31e2fc['previousPosition']['path']['slice'](0x0,-0x1):_0x31e2fc['previousPosition']['path'],_0x165b97=_0x3beab1['getNodeByPath'](_0x460287)['getAttribute'](_0x48506e);this['_touched']['set'](_0x165b97,{'userId':_0x217302});}_0x1e17c6['markers']['delete'](_0x4c8f8f);}}this['_startingRevisionId']=this['_revisionId'];const _0x2ee495=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x9f69e8=>!this['_touched']['has'](_0x9f69e8));let _0x13923a=0x0;const _0x4a166d=new Map();for(const _0x104bf5 in _0x4dfbe3['diffData']){const _0x1e1e66=_0x4dfbe3['diffData'][_0x104bf5]['attachChange'],_0x4dc196=_0x4eb401(_0x4dfbe3['diffData'][_0x104bf5]['attributesAfter'])||{},_0x32b00b=_0x4dfbe3['diffData'][_0x104bf5],_0xf57b74=_0x4655b0['_makeModelFromViewString'](_0x32b00b['insertions'],_0x32b00b['rootElementName']||'$root');_0xf57b74['rootName']=_0x104bf5,_0xf57b74['_isAttached']=!_0x1e1e66||_0x1e1e66['isAttached'],_0xf57b74['isAttached']=()=>_0xf57b74['_isAttached'],this['_diffRoots']['set'](_0x104bf5,_0xf57b74),this['_diffRootsAttributes']['set'](_0x104bf5,_0x4dc196);const _0x54c3c4=this['_makeIdsRoot'](_0xf57b74,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x104bf5,_0x54c3c4),_0x4a166d['set'](_0x104bf5,_0xf57b74['isAttached']()?_0x4dc196:{});for(const [_0xf57bd3,_0x45bde7]of _0xf57b74['markers']){if(!_0xf57bd3['startsWith']('revision:'))continue;const _0xf155ac=_0xf57bd3['split'](':')[0x2];for(const _0x46198f of _0x45bde7['getWalker']({'singleCharacters':!0x0})){const _0xec129f=this['_getVidAttributeName'](_0x46198f),_0x2d6e8d=this['_revisionId']++,_0x14d9b5='elementEnd'==_0x46198f['type']?_0x46198f['previousPosition']['path']['slice'](0x0,-0x1):_0x46198f['previousPosition']['path'];_0x54c3c4['getNodeByPath'](_0x14d9b5)['_setAttribute'](_0xec129f,_0x2d6e8d),this['_touched']['set'](_0x2d6e8d,{'userId':_0xf155ac});}_0xf57b74['markers']['delete'](_0xf57bd3);}for(const _0x3aeb83 of this['editor']['model']['createRangeIn'](_0xf57b74)['getWalker']({'singleCharacters':!0x0})){const _0x488371=this['_getVidAttributeName'](_0x3aeb83),_0x55d4cf='elementEnd'==_0x3aeb83['type']?_0x3aeb83['previousPosition']['path']['slice'](0x0,-0x1):_0x3aeb83['previousPosition']['path'],_0x3eca07=_0x54c3c4['getNodeByPath'](_0x55d4cf);_0x3eca07['getAttribute'](_0x488371)>0x0||_0x3eca07['_setAttribute'](_0x488371,_0x2ee495[_0x13923a++]);}for(const [_0x30fe28,_0x59a622]of _0xf57b74['markers'])_0x30fe28['startsWith']('revision:')||this['_markers']['set'](_0x30fe28,_0x59a622);}const {roots:_0x5ba49e}=this['_savedMetaData']['get'](_0x4dfbe3['fromVersion']),{roots:_0x405bbc}=this['_savedMetaData']['get'](_0x4dfbe3['toVersion']),_0x42add8=bt(_0x5ba49e['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x42add8),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x42add8,Number['NEGATIVE_INFINITY']));const _0x4c7667=bt(_0x405bbc['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x4c7667),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x4c7667));const _0x5d377e=Array['from'](this['_diffRoots'])['map'](([_0x2583f3,_0x143092])=>[_0x2583f3,bt(_0x143092)]);this['_saveMetaData'](this['_lastTo'],_0x5d377e,this['_markers'],_0x4a166d);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x2234d8,_0x425e5d,_0x5d5804,_0xae428f){const _0x161c26=new Map(_0x425e5d),_0x1f3f26=new Map(_0x4eb401(_0xae428f)),_0x2d4131=new Map();for(const [_0x2f3fcb,_0x29d977]of _0x5d5804)_0x2d4131['set'](_0x2f3fcb,{'start':_0x29d977['start']['clone'](),'end':_0x29d977['end']['clone'](),'rootName':_0x29d977['root']['rootName']});this['_savedMetaData']['set'](_0x2234d8,{'roots':_0x161c26,'markers':_0x2d4131,'rootsAttributes':_0x1f3f26});}['_removeMetaData'](_0x5b46d0){this['_savedMetaData']['delete'](_0x5b46d0);}['_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'](_0x29c439,_0x5592fc=null){let _0x5b9c90=null;_0x29c439['is']('documentFragment')||(_0x5b9c90=new _0x4b38e5(_0x29c439['name'],{'vid_start':null===_0x5592fc?this['_revisionId']++:_0x5592fc++}));const _0x47b5f5=[];for(const _0xce93c3 of _0x29c439['getChildren']())if(_0xce93c3['is']('element')){_0x47b5f5['push'](this['_makeIdsRoot'](_0xce93c3,_0x5592fc));const _0x462f46=_0x47b5f5[_0x47b5f5['length']-0x1];null!==_0x5592fc&&(_0x5592fc=_0x462f46['is']('element','$text')?_0x462f46['getAttribute']('vid')+0x1:_0x462f46['getAttribute']('vid_end')+0x1);}else{for(let _0x30b6d1=0x0;_0x30b6d1<_0xce93c3['offsetSize'];_0x30b6d1++)_0x47b5f5['push'](new _0x4b38e5('$text',{'vid':null===_0x5592fc?this['_revisionId']++:_0x5592fc++}));}if(_0x29c439['is']('documentFragment')){const _0x5ce976=Rt(_0x29c439['rootName'],_0x29c439['name']);return _0x5ce976['_insertChild'](0x0,_0x47b5f5),_0x5ce976;}return _0x5b9c90['_setAttribute']('vid_end',null===_0x5592fc?this['_revisionId']++:_0x5592fc++),_0x5b9c90['_insertChild'](0x0,_0x47b5f5),_0x5b9c90;}['_calculateMetaData'](_0x51f1d4,_0x24df9a,_0x532735){this['_reset']();const {roots:_0x593413,markers:_0x4e0b1b,rootsAttributes:_0x311d69}=this['_savedMetaData']['get'](_0x51f1d4);this['_baseRoots']=new Map(_0x593413),this['_baseRootsAttributes']=new Map(_0x4eb401(_0x311d69));for(const [_0x1bf98c,_0xbea0c5]of this['_baseRoots'])if('$graveyard'!==_0x1bf98c&&(this['_diffRoots']['set'](_0x1bf98c,bt(_0xbea0c5)),this['_diffRootsAttributes']=new Map(_0x4eb401(_0x311d69)),_0x532735)){const _0x141931=this['_revisionId'];this['_idsRoots']['set'](_0x1bf98c,this['_makeIdsRoot'](_0xbea0c5)),this['_baseIdsRoots']['set'](_0x1bf98c,this['_makeIdsRoot'](_0xbea0c5,_0x141931));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',bt(this['_baseRoots']['get']('$graveyard'))),_0x532735&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x22fb43,_0xe46801]of _0x4e0b1b){const _0xfbf5be=this['_baseRoots']['get'](_0xe46801['rootName']),_0x23c69a=this['_diffRoots']['get'](_0xe46801['rootName']),_0x103faf=new _0x2a7f46(this['_fixPosition'](_0xe46801['start'],_0xfbf5be),this['_fixPosition'](_0xe46801['end'],_0xfbf5be)),_0x894a16=this['_fixRange'](_0x103faf,_0x23c69a);_0xfbf5be['markers']['set'](_0x22fb43,_0x103faf),this['_markers']['set'](_0x22fb43,_0x894a16);}this['_applyOperations'](_0x51f1d4,_0x24df9a,_0x532735);}['_applyOperations'](_0x540355,_0x3b3b4e,_0x200ddc){for(const _0x134c64 of this['source']['getOperations'](_0x540355,_0x3b3b4e))this['_handleOperation'](_0x134c64,_0x200ddc);for(const _0x337284 of this['_diffRoots']['values']())_0x337284['markers']['clear']();for(const [_0x1811d3,_0x181c1e]of this['_markers'])this['_diffRoots']['get'](_0x181c1e['root']['rootName'])['markers']['set'](_0x1811d3,_0x181c1e['clone']());const _0x850d5c=new Map(),_0xb758d9=new Map();for(const [_0xae8f75,_0x3c92ab]of this['_diffRoots'])_0x850d5c['set'](_0xae8f75,bt(_0x3c92ab)),_0xb758d9['set'](_0xae8f75,this['_diffRootsAttributes']['get'](_0xae8f75));this['_saveMetaData'](_0x3b3b4e,_0x850d5c,this['_markers'],_0xb758d9);}['_getPreviousFrom'](_0x1049b7){const _0x33bb80=Array['from'](this['_savedMetaData']['keys']());_0x33bb80['sort']((_0x6a0e8f,_0x8637e9)=>_0x6a0e8f-_0x8637e9),_0x33bb80['reverse']();for(const _0x3792de of _0x33bb80)if(_0x3792de<_0x1049b7)return _0x3792de;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x1326ad,_0x355cf1){const _0x223b17=Array['from'](_0x355cf1['markers'])['map'](([_0x3e1196,_0x4dd593])=>[_0x3e1196,this['_fixRange'](_0x4dd593,_0x1326ad)]);_0x1326ad['markers']=new Map(_0x223b17);}['_transformMarkers'](_0x58f9cc){for(const _0x172f0 of this['_markers']['values']()){const _0x3531af=_0x172f0['getTransformedByOperation'](_0x58f9cc),_0x53a015=_0x2a7f46['_createFromRanges'](_0x3531af);_0x172f0['start']=_0x53a015['start'],_0x172f0['end']=_0x53a015['end'];}}['_handleOperation'](_0x4eed2c,_0x20f4bb){if('addRoot'!=_0x4eed2c['type']&&'detachRoot'!=_0x4eed2c['type']){if('insert'==_0x4eed2c['type']){const _0x34c624=_0x4eed2c['position']['root'],_0x5b1b19=_0x34c624['rootName'],_0x2aa300=_0x34c624['name'];this['_diffRoots']['has'](_0x5b1b19)||(this['_diffRoots']['set'](_0x5b1b19,Rt(_0x5b1b19,_0x2aa300,!0x0)),this['_diffRootsAttributes']['set'](_0x5b1b19,{}),_0x20f4bb&&this['_idsRoots']['set'](_0x5b1b19,Rt(_0x5b1b19,_0x2aa300,!0x0)));}else{if('addRootAttribute'==_0x4eed2c['type']||'removeRootAttribute'==_0x4eed2c['type']||'changeRootAttribute'==_0x4eed2c['type'])return void this['_handleRootAttributeOperation'](_0x4eed2c);'marker'==_0x4eed2c['type']&&this['_handleMarkerOperation'](_0x4eed2c);}if('marker'!==_0x4eed2c['type']){const _0x1b3614=this['_cloneOperation'](_0x4eed2c,this['_diffRoots']);_0x1b3614['_execute'](),this['_transformMarkers'](_0x1b3614);}if(_0x20f4bb)switch(_0x4eed2c['type']){case'insert':this['_handleInsertOperation'](_0x4eed2c);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x4eed2c);break;case'merge':this['_handleMergeOperation'](_0x4eed2c);break;case'split':this['_handleSplitOperation'](_0x4eed2c);}}else this['_handleRootOperation'](_0x4eed2c,_0x20f4bb);}['_cloneOperation'](_0x165548,_0x25381f){const _0x1a2049=_0x165548['clone']();return _0x1a2049['_authorId']=_0x165548['_authorId'],this['_fixOperation'](_0x1a2049,_0x25381f),_0x1a2049;}['_getBaseVids'](_0x950f83){return _0x950f83['map'](_0x466b3d=>{const _0x2087b8=this['_getVidAttributeName'](_0x466b3d);return Number(_0x466b3d['item']['getAttribute'](_0x2087b8));});}['_generateTape'](_0x1cebae,_0x1dcf6a){if(_0x1cebae['is']('element','$text'))_0x1dcf6a['push']({'item':_0x1cebae,'type':'text'});else{_0x1cebae['is']('element')&&_0x1dcf6a['push']({'item':_0x1cebae,'type':'elementStart'});for(const _0x474933 of _0x1cebae['getChildren']())this['_generateTape'](_0x474933,_0x1dcf6a);_0x1cebae['is']('element')&&_0x1dcf6a['push']({'item':_0x1cebae,'type':'elementEnd'});}return _0x1dcf6a;}['_getState'](){const _0x199b54=new Map(this['_touched']),_0x1005a8=new Map(_0x199b54),_0x32f49d=new Map(),_0x22b5a5={'insertions':{},'deletions':{}},_0x27ea5c={'insertions':{},'deletions':{}},_0x578c23=new Map(),_0x478487=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x1ec965=new Map();_0x478487['delete']('$graveyard');for(const _0x784740 of _0x478487){const _0x456bb4=(this['_diffRoots']['get'](_0x784740)??this['_baseRoots']['get'](_0x784740))['name'],_0x2ed614=this['_diffRoots']['get'](_0x784740)||Rt(_0x784740,_0x456bb4,!0x1),_0x10cb61=this['_baseRoots']['get'](_0x784740)||Rt(_0x784740,_0x456bb4,!0x1);_0x2ed614['isAttached']()||_0x10cb61['isAttached']()?(_0x1ec965['set'](_0x784740,_0x456bb4),_0x22b5a5['insertions'][_0x784740]=bt(_0x2ed614),_0x22b5a5['deletions'][_0x784740]=bt(_0x10cb61),this['_copyMarkers'](_0x22b5a5['deletions'][_0x784740],_0x10cb61),this['_copyMarkers'](_0x22b5a5['insertions'][_0x784740],_0x2ed614),_0x27ea5c['insertions'][_0x784740]=this['_generateTape'](this['_idsRoots']['get'](_0x784740),[]),_0x27ea5c['deletions'][_0x784740]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x784740)||Rt(_0x784740,_0x456bb4,!0x1),[])):_0x478487['delete'](_0x784740);}for(const _0x13dc6d of _0x478487){const _0xa5ff47=_0x27ea5c['insertions'][_0x13dc6d];for(const _0x2aa16d of _0xa5ff47){const _0x5b06ee=this['_getVidAttributeName'](_0x2aa16d),_0x2c9350=_0x2aa16d['item']['getAttribute'](_0x5b06ee);_0x1005a8['delete'](_0x2c9350),_0x2c9350>=this['_startingRevisionId']&&_0x32f49d['set'](_0x2c9350,_0x199b54['get'](_0x2c9350));}}for(const _0x547c34 of _0x478487){const _0x23b857=_0x27ea5c['insertions'][_0x547c34],_0x7f7438=this['_getBaseVids'](_0x27ea5c['deletions'][_0x547c34]);let _0xd139ab=0x0;for(const _0x578cbd of _0x23b857){const _0x58a4ce=this['_getVidAttributeName'](_0x578cbd),_0x2b4fc2=_0x578cbd['item']['getAttribute'](_0x58a4ce);if(!_0x32f49d['has'](_0x2b4fc2)&&!_0x578c23['has'](_0x2b4fc2)){if(_0x1005a8['has'](_0x2b4fc2))_0xd139ab++;else{if(_0x2b4fc2!=_0x7f7438[_0xd139ab]){const _0x3ef945=_0x199b54['get'](_0x2b4fc2)||_0x199b54['get'](_0x7f7438[_0xd139ab]);for(;_0x2b4fc2!=_0x7f7438[_0xd139ab];)_0x1005a8['has'](_0x7f7438[_0xd139ab])||(_0x578c23['set'](_0x7f7438[_0xd139ab],_0x3ef945),_0x199b54['set'](_0x7f7438[_0xd139ab],_0x3ef945)),_0xd139ab++;}_0xd139ab++;}}}}for(const _0xc3aa5e of _0x478487){const _0x40db0e=_0x27ea5c['insertions'][_0xc3aa5e];for(const _0x3b08fe of _0x40db0e){const _0x2042bc=this['_getVidAttributeName'](_0x3b08fe),_0x139c80=_0x3b08fe['item']['getAttribute'](_0x2042bc);if(_0x578c23['has'](_0x139c80)){const _0x2f1d1e=_0x578c23['get'](_0x139c80);_0x1005a8['has'](_0x139c80)||_0x1005a8['set'](_0x139c80,{..._0x2f1d1e}),_0x32f49d['set'](_0x139c80,{..._0x2f1d1e});}}}for(const _0xd35e34 of _0x1005a8['keys']())_0xd35e34>=this['_startingRevisionId']&&_0x1005a8['delete'](_0xd35e34);const _0xe07111=new Map();for(const _0x432944 of _0x478487){let _0x2dcf5b=_0x27ea5c['insertions'][_0x432944];for(const _0x37a442 of _0x2dcf5b)if(_0x37a442['item']['is']('element','tableCell')){const _0xb2e6e3=this['_getVidAttributeName'](_0x37a442),_0x38d6d2=_0x37a442['item']['getAttribute'](_0xb2e6e3);if(_0x32f49d['has'](_0x38d6d2)){const _0x27d284=_0x37a442['item']['parent']['parent']['getAttribute']('vid_start'),_0x3d1b06=_0xe07111['get'](_0x27d284)||new Set();_0x3d1b06['add'](_0x32f49d['get'](_0x38d6d2)['userId']),_0xe07111['set'](_0x27d284,_0x3d1b06);}}_0x2dcf5b=_0x27ea5c['deletions'][_0x432944];for(const _0x5f2a70 of _0x2dcf5b)if(_0x5f2a70['item']['is']('element','tableCell')){const _0x48848b=this['_getVidAttributeName'](_0x5f2a70),_0x2328a4=_0x5f2a70['item']['getAttribute'](_0x48848b);if(_0x1005a8['has'](_0x2328a4)){const _0x258fea=_0x5f2a70['item']['parent']['parent']['getAttribute']('vid_start'),_0x481f21=_0xe07111['get'](_0x258fea)||new Set();_0x481f21['add'](_0x1005a8['get'](_0x2328a4)['userId']),_0xe07111['set'](_0x258fea,_0x481f21);}}for(const _0x2e5167 of _0xe07111['keys']())(_0x32f49d['has'](_0x2e5167)||_0x1005a8['has'](_0x2e5167))&&_0xe07111['delete'](_0x2e5167);}for(const _0x53da0b of _0x478487){const _0x3a2f8d=_0x27ea5c['insertions'][_0x53da0b];let _0x13a446=null,_0x2b4e9e=null;for(const _0x29b489 of _0x3a2f8d){const _0x19f737=this['_getVidAttributeName'](_0x29b489),_0x5a018b=_0x29b489['item']['getAttribute'](_0x19f737),_0x3acbe4=_0xe07111['get'](_0x5a018b);_0x3acbe4&&'elementStart'==_0x29b489['type']&&(_0x13a446=Array['from'](_0x3acbe4)[0x0],_0x2b4e9e=_0x29b489['item']['getAttribute']('vid_end')),_0x13a446&&(_0x1005a8['set'](_0x5a018b,{'userId':_0x13a446}),_0x32f49d['set'](_0x5a018b,{'userId':_0x13a446})),_0x5a018b==_0x2b4e9e&&(_0x13a446=null,_0x2b4e9e=null);}}const _0x1fc90c={},_0x4db4c5=new Set();for(const _0x1e4b32 of _0x478487){const _0x5e32a7=_0x22b5a5['deletions'][_0x1e4b32],_0x3d6102=_0x22b5a5['insertions'][_0x1e4b32];for(const {userId:_0x1a11d1}of this['_touchedMarkers']['values']())null!==_0x1a11d1&&_0x4db4c5['add'](_0x1a11d1);for(const {userId:_0x43270d}of this['_touchedRoots']['values']())null!==_0x43270d&&_0x4db4c5['add'](_0x43270d);this['_markChanges'](_0x3d6102,_0x27ea5c['insertions'][_0x1e4b32],_0x32f49d,'insertion',_0x4db4c5),this['_markChanges'](_0x5e32a7,_0x27ea5c['deletions'][_0x1e4b32],_0x1005a8,'deletion',_0x4db4c5),_0x1fc90c[_0x1e4b32]={'insertions':this['_prepareViewToSave'](_0x3d6102),'deletions':this['_prepareViewToSave'](_0x5e32a7),'attachChange':this['_touchedRoots']['get'](_0x1e4b32)||null,'attributesBefore':_0x4eb401(this['_baseRootsAttributes']['get'](_0x1e4b32))||{},'attributesAfter':_0x4eb401(this['_diffRootsAttributes']['get'](_0x1e4b32)),'rootElementName':_0x1ec965['get'](_0x1e4b32)};}return{'diffData':_0x1fc90c,'authorsIds':Array['from'](_0x4db4c5)};}['_processRootBeforeSave'](_0x2ecbc0){for(const [,_0x215b9f]of _0x2ecbc0['markers']){const _0x477935=_0x215b9f['start']['getAncestors']()['filter'](_0xeac2ed=>'tableCell'==_0xeac2ed['name']);for(const _0x364cd4 of _0x477935)0x1==_0x364cd4['childCount']&&_0x364cd4['getChild'](0x0)['is']('element','paragraph')&&_0x364cd4['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x253e94){this['_processRootBeforeSave'](_0x253e94);const _0x3f47a6=this['editor']['data']['toView'](_0x253e94,{}),_0x12bbec=Array['from'](_0x3f47a6['getChildren']())['map'](_0x535356=>this['_getViewJson'](_0x535356));return JSON['stringify'](_0x12bbec);}['_getViewJson'](_0x63434e){if(_0x63434e['is']('$text'))return _0x63434e['data'];{const _0x3f513a=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x38d163=_0x63434e,_0x337215=this['editor']['data']['htmlProcessor']['domConverter'],_0x472bec={'type':_0x3f513a['_getTypeCharForViewElement'](_0x38d163),'name':_0x38d163['name'],'attributes':Array['from'](_0x38d163['getAttributes']()),'children':Array['from'](_0x38d163['getChildren']())['map'](_0x115418=>this['_getViewJson'](_0x115418))};if(_0x63434e['is']('uiElement')&&'$comment'!=_0x63434e['name']){const _0x5ca85f=_0x63434e['render'](_0x337215['domDocument'],_0x337215);_0x472bec['children']['push'](_0x5ca85f['outerHTML']);}else{if(_0x63434e['is']('rawElement')){const _0x3dad4a=_0x337215['domDocument']['createElement'](_0x38d163['name']);_0x63434e['render'](_0x3dad4a,_0x337215),_0x472bec['children']['push'](_0x3dad4a['innerHTML']);}}const _0x3f730a=Array['from'](_0x38d163['getCustomProperties']());_0x3f730a['length']>0x0&&(_0x472bec['customProperties']=_0x3f730a);const _0x4fcbdf=_0x38d163['getFillerOffset']();return null!==_0x4fcbdf&&(_0x472bec['fillerOffset']=_0x4fcbdf),_0x472bec;}}['_markChanges'](_0x2ee76d,_0x11a211,_0xafad17,_0x575a02,_0x1f6ebf){let _0x4090a6=null,_0x3f295f=null,_0x28ac1c=0x0;const _0x264647=this['editor']['model'];for(let _0x1b98ae=0x0;_0x1b98ae<_0x11a211['length'];_0x1b98ae++){const _0x34530a=this['_getVidAttributeName'](_0x11a211[_0x1b98ae]),_0x845a06=_0x11a211[_0x1b98ae]['item']['getAttribute'](_0x34530a),_0xa89284=_0xafad17['get'](_0x845a06),_0x18d6ad=_0x1b98ae==_0x11a211['length']-0x1;!_0x4090a6&&_0xa89284&&(_0x4090a6=_0xa89284,_0x3f295f=_0x11a211[_0x1b98ae]),!_0x4090a6||_0xa89284&&_0xa89284['userId']==_0x4090a6['userId']||(_0x1fd217(_0xa89284,kt(_0x3f295f,_0x2ee76d,_0x264647),kt(_0x11a211[_0x1b98ae],_0x2ee76d,_0x264647)),_0x4090a6=_0xa89284||null,_0x3f295f=_0xa89284?_0x11a211[_0x1b98ae]:null),_0x4090a6&&_0x18d6ad&&_0x1fd217(_0xa89284,kt(_0x3f295f,_0x2ee76d,_0x264647),At(_0x11a211[_0x1b98ae],_0x2ee76d,_0x264647));}function _0x1fd217(_0x108cdd,_0x2d60f5,_0x4663ee){const _0x4a3e8a=_0x4090a6['userId'],_0x2b8637='revision:'+_0x575a02+':'+_0x4a3e8a+':'+_0x28ac1c++,_0x56b528=_0x264647['createRange'](_0x2d60f5,_0x4663ee);_0x2ee76d['markers']['set'](_0x2b8637,_0x56b528),null!==_0x4a3e8a&&_0x1f6ebf['add'](_0x4a3e8a);}}['_getVidAttributeName'](_0x256f13){switch(_0x256f13['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x5ece27,_0x4f7e3e){_0x5ece27['baseVersion']=null;for(const _0x3d7994 in _0x5ece27){const _0x32731b=_0x5ece27[_0x3d7994];if(_0x32731b instanceof _0x2a5b6b){const _0x165dbc=_0x4f7e3e['get'](_0x32731b['root']['rootName']);_0x5ece27[_0x3d7994]=this['_fixPosition'](_0x32731b,_0x165dbc);}if(_0x32731b instanceof _0x2a7f46){const _0x330cec=_0x4f7e3e['get'](_0x32731b['root']['rootName']);_0x5ece27[_0x3d7994]=this['_fixRange'](_0x32731b,_0x330cec);}'root'===_0x3d7994&&(_0x5ece27['root']=_0x4f7e3e['get'](_0x5ece27['root']['rootName']));}}['_fixRange'](_0x203634,_0x487e85){return this['editor']['model']['createRange'](this['_fixPosition'](_0x203634['start'],_0x487e85),this['_fixPosition'](_0x203634['end'],_0x487e85));}['_fixPosition'](_0x41d7b6,_0x11cacd){return this['editor']['model']['createPositionFromPath'](_0x11cacd,_0x41d7b6['path'],_0x41d7b6['stickiness']);}['_handleInsertOperation'](_0x38f11b){const _0x2de36b=this['_idsRoots']['get'](_0x38f11b['position']['root']['rootName']),_0x3ed769=this['_fixPosition'](_0x38f11b['position'],_0x2de36b),_0x2d0197=null===_0x38f11b['_authorId']?null:_0x38f11b['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5ee5cc=_0x3ed769['parent'],_0x5c015f=this['_revisionId'],_0x3efc7f=[];for(const _0x69675a of _0x38f11b['nodes'])if(_0x69675a['is']('element'))_0x3efc7f['push'](this['_makeIdsRoot'](_0x69675a));else{for(let _0x2cd33b=0x0;_0x2cd33b<_0x69675a['offsetSize'];_0x2cd33b++)_0x3efc7f['push'](new _0x4b38e5('$text',{'vid':this['_revisionId']++}));}const _0x183417=this['_revisionId'];for(let _0xe3d91c=_0x5c015f;_0xe3d91c<_0x183417;_0xe3d91c++)this['_touched']['set'](_0xe3d91c,{'userId':_0x2d0197});_0x5ee5cc['_insertChild'](_0x3ed769['offset'],_0x3efc7f);}['_handleMoveOperation'](_0x2caef6){(_0x2caef6=this['_cloneOperation'](_0x2caef6,this['_idsRoots']))['_execute']();const _0x3a1359=null===_0x2caef6['_authorId']?null:_0x2caef6['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x286bd0=_0x2caef6['getMovedRangeStart'](),_0xa635ff=_0x286bd0['parent'],_0x233006=_0x286bd0['offset'];!function _0x4f37d4(_0x5ed3dc,_0x1f65bc,_0x3c13ad,_0x110e8e){for(let _0x444829=_0x3c13ad;_0x444829<_0x110e8e;_0x444829++){const _0x1b9f4a=_0x1f65bc['getChild'](_0x444829);_0x1b9f4a['is']('element','$text')?_0x5ed3dc['set'](_0x1b9f4a['getAttribute']('vid'),{'userId':_0x3a1359}):(_0x5ed3dc['set'](_0x1b9f4a['getAttribute']('vid_start'),{'userId':_0x3a1359}),_0x4f37d4(_0x5ed3dc,_0x1b9f4a,0x0,_0x1b9f4a['childCount']),_0x5ed3dc['set'](_0x1b9f4a['getAttribute']('vid_end'),{'userId':_0x3a1359}));}}(this['_touched'],_0xa635ff,_0x233006,_0x233006+_0x2caef6['howMany']);}['_handleMergeOperation'](_0x55873d){const _0x5441a5=null===(_0x55873d=this['_cloneOperation'](_0x55873d,this['_idsRoots']))['_authorId']?null:_0x55873d['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3b5e0a=_0x55873d['targetPosition']['parent'],_0x519d9a=_0x55873d['sourcePosition']['parent'],_0x379f8b=_0x3b5e0a['getAttribute']('vid_end'),_0xaf1382=_0x519d9a['getAttribute']('vid_start');_0x3b5e0a['_setAttribute']('vid_end',_0x519d9a['getAttribute']('vid_end')),_0x519d9a['_setAttribute']('vid_end',_0x379f8b),this['_touched']['set'](_0xaf1382,{'userId':_0x5441a5}),this['_touched']['set'](_0x379f8b,{'userId':_0x5441a5}),_0x55873d['_execute']();}['_handleSplitOperation'](_0x2ed88d){const _0x56bdb5=null===(_0x2ed88d=this['_cloneOperation'](_0x2ed88d,this['_idsRoots']))['_authorId']?null:_0x2ed88d['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x29c1ee=_0x2ed88d['graveyardPosition'],_0x3b3b58=_0x2ed88d['splitPosition']['parent'];_0x2ed88d['_execute']();const _0x57af95=_0x3b3b58['getAttribute']('vid_end'),_0xe909e2=_0x2ed88d['insertionPosition']['nodeAfter'];if(_0x29c1ee){const _0x451856=_0xe909e2['getAttribute']('vid_end'),_0x41f494=_0x3b3b58['getAttribute']('vid_end');_0x3b3b58['_setAttribute']('vid_end',_0x451856),_0xe909e2['_setAttribute']('vid_end',_0x41f494),this['_touched']['set'](_0x3b3b58['getAttribute']('vid_end'),{'userId':_0x56bdb5}),this['_touched']['set'](_0xe909e2['getAttribute']('vid_start'),{'userId':_0x56bdb5});}else{const _0x5e7119=this['_revisionId']++,_0x161023=this['_revisionId']++;_0x3b3b58['_setAttribute']('vid_end',_0x5e7119),_0xe909e2['_setAttribute']('vid_start',_0x161023),_0xe909e2['_setAttribute']('vid_end',_0x57af95),this['_touched']['set'](_0x5e7119,{'userId':_0x56bdb5}),this['_touched']['set'](_0x161023,{'userId':_0x56bdb5});}}['_handleMarkerOperation'](_0x326649){if(!_0x326649['affectsData'])return;const _0x7ad9ed=(_0x326649=this['_cloneOperation'](_0x326649,this['_diffRoots']))['oldRange']?_0x326649['oldRange']['root']:null,_0x4d6941=_0x326649['newRange']?_0x326649['newRange']['root']:null;_0x7ad9ed&&this['_markers']['delete'](_0x326649['name']),_0x4d6941&&this['_markers']['set'](_0x326649['name'],_0x326649['newRange']['clone']());const _0x48a840=null===_0x326649['_authorId']?null:_0x326649['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x131f91=_0x326649['name'];if(!this['_touchedMarkers']['has'](_0x131f91))return void this['_touchedMarkers']['set'](_0x131f91,{'range':_0x326649['oldRange'],'userId':_0x48a840});const _0x7d03ca=this['_touchedMarkers']['get'](_0x131f91),_0xd51c78=_0x7d03ca['range'],_0x53c942=_0x326649['newRange'];null==_0xd51c78&&null==_0x53c942||_0xd51c78&&_0x53c942&&_0xd51c78['isEqual'](_0x53c942)?this['_touchedMarkers']['delete'](_0x326649['name']):_0x7d03ca['userId']=_0x48a840;}['_handleRootOperation'](_0x113344,_0xb88f27){this['_diffRoots']['has'](_0x113344['rootName'])?this['_diffRoots']['get'](_0x113344['rootName'])['_isAttached']=_0x113344['isAdd']:(this['_diffRoots']['set'](_0x113344['rootName'],Rt(_0x113344['rootName'],_0x113344['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x113344['rootName'],{}),_0xb88f27&&this['_idsRoots']['set'](_0x113344['rootName'],Rt(_0x113344['rootName'],_0x113344['elementName'],!0x0)));const _0x2c38dd=null===_0x113344['_authorId']?null:_0x113344['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x182cca=this['_touchedRoots']['get'](_0x113344['rootName']);_0x182cca&&_0x182cca['userId']===_0x2c38dd?this['_touchedRoots']['delete'](_0x113344['rootName']):this['_touchedRoots']['set'](_0x113344['rootName'],{'userId':_0x2c38dd,'isAttached':_0x113344['isAdd']});}['_handleRootAttributeOperation'](_0x2985bc){const _0x49fa91=this['_diffRootsAttributes']['get'](_0x2985bc['root']['rootName']);null===_0x2985bc['newValue']?delete _0x49fa91[_0x2985bc['key']]:_0x49fa91[_0x2985bc['key']]=_0x2985bc['newValue'];}};function bt(_0x1677c2){const _0x44ed19=Rt(_0x1677c2['rootName'],_0x1677c2['name'],_0x1677c2['isAttached']());for(const _0x33aea8 of _0x1677c2['getChildren']()){const _0x11ea4a=_0x33aea8['_clone'](!0x0);_0x44ed19['_appendChild'](_0x11ea4a);}return _0x44ed19;}function Rt(_0x390503,_0x2b5a6b,_0x37d833=!0x0){const _0x210135=new _0x1f4d7e();return _0x210135['rootName']=_0x390503,_0x210135['name']=_0x2b5a6b,_0x210135['_isAttached']=_0x37d833,_0x210135['isAttached']=()=>_0x210135['_isAttached'],_0x210135;}function kt(_0x556a49,_0x1dc67d,_0xb49001){const _0x310420='elementEnd'==_0x556a49['type']?_0xb49001['createPositionAt'](_0x556a49['item'],'end'):_0xb49001['createPositionBefore'](_0x556a49['item']);return _0xb49001['createPositionFromPath'](_0x1dc67d,_0x310420['path'],_0x310420['stickiness']);}function At(_0x1fd85b,_0x1d87c6,_0x3dee36){const _0x2be7e3='elementStart'==_0x1fd85b['type']?_0x3dee36['createPositionAt'](_0x1fd85b['item'],0x0):_0x3dee36['createPositionAfter'](_0x1fd85b['item']);return _0x3dee36['createPositionFromPath'](_0x1d87c6,_0x2be7e3['path'],_0x2be7e3['stickiness']);}const It=/* #__PURE__ -- @preserve */
25
- _0x2e97e6(at);var Et=class extends It{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x35c35b,_0x5b04b1){super(_0x35c35b),this['focusTracker']=new _0x48a924(),this['keystrokes']=new _0x2db10e(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x5b04b1),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),this['initializeCssTransitionDisablerMixin']();}['render'](){super['render'](),dt({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x310107=_0x16b253=>_0x16b253['stopPropagation']();this['keystrokes']['set']('arrowright',_0x310107),this['keystrokes']['set']('arrowleft',_0x310107),this['keystrokes']['set']('arrowup',_0x310107),this['keystrokes']['set']('arrowdown',_0x310107);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x146a70){this['revisionNameInputView']['fieldView']['element']['value']=_0x146a70['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x396ca0){const _0x1a519e=new _0x355d07(this['locale'],lt),_0x506e41=_0x1a519e['fieldView'];_0x506e41['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x231e14=pt(this['locale'],'Name\x20of\x20the\x20revision');return!_0x396ca0&&(_0x231e14+='\x20('+pt(this['locale'],'optional')+')'),(_0x1a519e['label']=_0x231e14,_0x506e41['on']('input',()=>{this['revisionNameInputValue']=_0x506e41['element']['value']['trim']();}),_0x1a519e);}},St=class extends _0x27a866{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_t];}['_saveRevisionFormView'];['init'](){const _0x173d88=this['editor'],_0x3e8cec=_0x173d88['plugins']['get']('RevisionTracker');_0x173d88['ui']['componentFactory']['add']('revisionHistory',_0x1d0ed9=>{const _0x22d01e=ct(_0x1d0ed9),_0x19683d=_0x22d01e['panelView']['children'],_0xe05182=new _0x1e40a6(_0x1d0ed9),_0x18f7f3=new _0x2b79a9(_0x1d0ed9),_0x57aa7f=this['_createSaveRevisionButton'](_0x35703b),_0x6b475a=new _0x2b79a9(_0x1d0ed9),_0x28f384=this['_createOpenRevisionButton'](_0x35703b);return _0x22d01e['bind']('isEnabled')['to'](_0x3e8cec,'isReady',_0x3e8cec,'isEnabled',_0x173d88,'isReadOnly',(_0x45bf3c,_0x2f4799,_0x16787e)=>_0x45bf3c&&_0x2f4799&&!_0x16787e),_0x22d01e['buttonView']['set']({'icon':_0x3db7bb,'label':pt(_0x1d0ed9,'Revision\x20history'),'tooltip':!0x0}),_0x57aa7f['set']({'withText':!0x0,'role':'menuitem'}),_0x28f384['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x28f384,'execute',()=>{_0x22d01e['isOpen']=!0x1,_0x173d88['editing']['view']['focus']();},{'priority':'low'}),_0x18f7f3['children']['add'](_0x57aa7f),_0x6b475a['children']['add'](_0x28f384),_0xe05182['role']='menu',_0xe05182['items']['addMany']([_0x18f7f3,_0x6b475a]),_0x19683d['add'](_0xe05182),_0x22d01e;}),_0x173d88['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x53a2e0=this['editor'],_0x30cbaf=_0x53a2e0['locale'],_0x5b92aa=_0x53a2e0['plugins']['get']('RevisionTracker'),_0xee99ff=new et(_0x30cbaf),_0x2f0197=new it(_0x30cbaf);_0xee99ff['bind']('isEnabled')['to'](_0x5b92aa,'isReady',_0x5b92aa,'isEnabled',_0x53a2e0,'isReadOnly',(_0x17d1fd,_0x57dd3b,_0x15e84b)=>_0x17d1fd&&_0x57dd3b&&!_0x15e84b),_0xee99ff['buttonView']['set']({'icon':_0x3db7bb,'label':pt(_0x30cbaf,'Revision\x20history')});const _0x3f9266=new tt(_0x30cbaf,_0xee99ff),_0x4110e4=this['_createSaveRevisionButton'](_0xdf7d2);_0x4110e4['delegate']('execute')['to'](_0xee99ff),_0x3f9266['children']['add'](_0x4110e4),_0x2f0197['items']['add'](_0x3f9266);const _0x2cbd46=new tt(_0x30cbaf,_0xee99ff),_0x371974=this['_createOpenRevisionButton'](_0xdf7d2);return _0x371974['delegate']('execute')['to'](_0xee99ff),_0x2cbd46['children']['add'](_0x371974),_0x2f0197['items']['add'](_0x2cbd46),_0xee99ff['panelView']['children']['add'](_0x2f0197),_0xee99ff;}['_createSaveRevisionButton'](_0x524e06){const _0xe34e49=this['editor'],_0x32ccc8=_0xe34e49['plugins']['get']('RevisionTracker'),_0x339735=new _0x524e06(_0xe34e49['locale']);return _0x339735['set']({'label':pt(_0xe34e49['locale'],'Save\x20current\x20revision')}),_0x339735['bind']('isEnabled')['to'](_0x32ccc8,'isReady',_0x32ccc8,'isEnabled',_0xe34e49,'isReadOnly',(_0x528c93,_0xd4b5ec,_0x4c413b)=>_0x528c93&&_0xd4b5ec&&!_0x4c413b),this['listenTo'](_0x339735,'execute',()=>{this['_showDialog']();}),_0x339735;}['_createOpenRevisionButton'](_0x5640aa){const _0x103e98=this['editor'],_0xf579f3=_0x103e98['plugins']['get']('RevisionTracker'),_0x3e1d02=new _0x5640aa(_0x103e98['locale']);return _0x3e1d02['set']({'label':pt(_0x103e98['locale'],'Open\x20revision\x20history')}),_0x3e1d02['bind']('isEnabled')['to'](_0xf579f3,'isReady',_0x103e98,'isReadOnly',(_0x400ec6,_0x564360)=>_0x400ec6&&!_0x564360),this['listenTo'](_0x3e1d02,'execute',()=>{_0x103e98['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x3e1d02;}['_showDialog'](){const _0x396662=this['editor'],_0x175395=_0x396662['locale'],_0x556a43=_0x396662['plugins']['get']('Dialog'),_0x43729b=_0x396662['plugins']['get']('RevisionTracker');function _0x3a9865(_0x527957){_0x396662['config']['get']('revisionHistory.requireRevisionName')&&''===_0x527957['revisionName']?_0x527957['revisionNameInputView']['errorText']=pt(_0x175395,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x396662['plugins']['get'](_t)['saveRevision']({'name':_0x527957['revisionName']}),_0x556a43['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x3a9865(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x556a43['show']({'id':'revisionSave','title':pt(_0x175395,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':pt(_0x396662['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x556a43['hide']()},{'label':pt(_0x396662['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x5e700d){_0x5e700d['bind']('isEnabled')['to'](_0x43729b,'isReady',_0x43729b,'isEnabled',_0x396662,'isReadOnly',(_0x53b697,_0x557b69,_0x5037d7)=>_0x53b697&&_0x557b69&&!_0x5037d7);},'onExecute':()=>_0x3a9865(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x1c5b91=this['editor'],_0x401981=_0x1c5b91['locale'];this['_saveRevisionFormView']=new Et(_0x401981,_0x1c5b91['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}},Nt=class extends at{['changeId'];['_model'];constructor(_0x4e252d,_0x24506e){super(_0x4e252d),this['_model']=_0x24506e,this['changeId']=_0x24506e['id'];const _0x3aadd6=this['bindTemplate'],_0x3b1546=pt(_0x4e252d,_0x24506e['data']['isSuggestion']?'Suggested\x20by':'add'==_0x24506e['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x24506e['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x3aadd6['to']('type',_0x34ff91=>'ck-revision-change__'+_0x34ff91)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x3b1546}]},{'text':'\x20'+_0x24506e['author']['name']}]}]});}['focus'](){this['element']['focus']();}};const xt=/* #__PURE__ -- @preserve */
26
- _0x20efc5();var Ot=class extends xt{['id'];['author'];['type'];['data'];['rootName'];constructor(_0x108659){super(),this['id']=_0x108659['id']||_0x32425d(),this['author']=_0x108659['author'],this['type']=_0x108659['type'],this['data']=_0x108659['data']||{},this['rootName']=_0x108659['rootName'],this['set']('createdAt',_0x108659['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Ct=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x5cb811,_0x2b0a68){this['newRevisionId']=_0x5cb811,this['oldRevisionId']=_0x2b0a68,this['changes']=new _0x112359();}['_setChanges'](_0x1ee46a){for(const _0x400b0c of _0x1ee46a)this['changes']['add'](_0x400b0c);}},Mt=class extends _0x27a866{['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[_0x230a98,_0x3fe0bd,mt,wt];}constructor(_0xf5049e){super(_0xf5049e),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',(_0x14978d,_0xfc58e3,_0x513d12)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x5d4520=>{for(const _0x1239ee of this['editor']['editing']['view']['document']['roots'])_0x513d12?_0x5d4520['removeClass']('ck-editor__editable__overlay',_0x1239ee):_0x5d4520['addClass']('ck-editor__editable__overlay',_0x1239ee);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x4d3be9=>null!==_0x4d3be9),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x5ef860,_0x3c143d,_0x4b17e5)=>_0x5ef860&&_0x4b17e5?_0x3c143d['changes']['getIndex'](_0x4b17e5):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x5beb1f,_0x148516)=>_0x5beb1f?_0x148516['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x3fe0bd);}['init'](){const _0xc596ed=this['editor'],_0x3a04fc=new Tt(_0xc596ed,{'direction':'backward'}),_0x5bb870=new Tt(_0xc596ed,{'direction':'forward'});_0xc596ed['commands']['add']('showPreviousChange',_0x3a04fc),_0xc596ed['commands']['add']('showNextChange',_0x5bb870),_0xc596ed['commands']['add']('restoreRevision',new Dt(_0xc596ed)),this['on']('change:numberOfChanges',()=>{_0x3a04fc['refresh'](),_0x5bb870['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0xc596ed['enableReadOnlyMode']('revision-viewer'),_0xc596ed['plugins']['has']('WidgetToolbarRepository')&&_0xc596ed['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0xa1e401){return await this['_utils']['loadRevisionData'](_0xa1e401,this['adapter']),this['_utils']['getRevisionDocumentData'](_0xa1e401);}async['getRevisionRootsAttributes'](_0x1460f8){return await this['_utils']['loadRevisionData'](_0x1460f8,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x1460f8);}async['compare'](_0x46fbef,_0x1dca67,_0x5a7fad=!0x1){if(!this['isEnabled'])return;const _0x38b3d6=this['diff'],_0x3df894=this['repository'],_0x29dbe9='string'==typeof _0x46fbef?_0x3df894['getRevision'](_0x46fbef):_0x46fbef,_0x1c0524='string'==typeof _0x1dca67?_0x3df894['getRevision'](_0x1dca67):_0x1dca67,_0x1a407f=_0x29dbe9['id'],_0x10b8d5=_0x1c0524?_0x1c0524['id']:null;if(!_0x5a7fad&&this['diff']&&this['diff']['newRevisionId']===_0x1a407f&&this['diff']['oldRevisionId']===_0x10b8d5)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Ct(_0x1a407f,_0x10b8d5);const _0x405931=this['_getRevisionsRange'](_0x29dbe9,_0x1c0524,!0x0)['map'](_0x158191=>this['_utils']['loadRevisionData'](_0x158191,this['adapter']));return _0x405931['push'](new Promise(_0x9975bc=>{setTimeout(_0x9975bc,0x14);})),Promise['all'](_0x405931)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x46f0c7=this['_getDiff'](_0x1a407f,_0x10b8d5);for(const _0x3edfea of _0x46f0c7['changes'])this['_changeIdToChange']['set'](_0x3edfea['id'],_0x3edfea);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x14b9cf=>{for(const _0x48ea7a of this['editor']['model']['document']['getRootNames']())_0x14b9cf['detachRoot'](_0x48ea7a);for(const _0x405c26 of Object['keys'](_0x46f0c7['model'])){const _0xa8e92d=_0x46f0c7['model'][_0x405c26]['name'],_0x17913d=_0x14b9cf['addRoot'](_0x405c26,_0xa8e92d);for(const _0x5bb8df of Object['keys'](_0x46f0c7['attributes'][_0x405c26]))_0x14b9cf['setAttribute'](_0x5bb8df,_0x46f0c7['attributes'][_0x405c26][_0x5bb8df],_0x17913d);_0x14b9cf['insert'](_0x46f0c7['model'][_0x405c26],_0x17913d,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x46f0c7['changes'])),this['isReady']=!0x0;})['catch'](_0x2bf4fa=>{console['error'](_0x2bf4fa),this['_cleanUp'](),_0x38b3d6&&(this['diff']=_0x38b3d6),this['isReady']=!0x0;});}['addRevisionData'](_0x4536ac,_0x5718ea){const _0x5107b1=this['repository']['createRevision'](_0x4536ac);return _0x5107b1['on']('_update',(_0x419b30,_0x8e980,_0x5646bb)=>_0x5718ea(_0x8e980,_0x5646bb,_0x5107b1)),this['repository']['addRevision'](_0x5107b1),_0x5107b1;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x5bcf55=>{for(const _0x55de29 of this['editor']['model']['document']['getRootNames']())_0x5bcf55['detachRoot'](_0x55de29);});}['_sortAndFilterDiffChanges'](_0xb3dd66){const _0x24aed1=[],_0x51bd65=new Map();for(const _0xd1b220 of this['editor']['model']['document']['getRootNames']()){const _0x3653df=this['editor']['editing']['view']['getDomRoot'](_0xd1b220);if(!_0x3653df)continue;const _0x2c5839=_0x3653df['getClientRects']()['item'](0x0);_0x2c5839&&(_0x24aed1['push'](_0xd1b220),_0x51bd65['set'](_0xd1b220,_0x2c5839));}return _0x24aed1['sort']((_0x5d71a6,_0xe6698a)=>{const _0x50b484=_0x51bd65['get'](_0x5d71a6),_0x154328=_0x51bd65['get'](_0xe6698a);return _0x50b484['y']-_0x154328['y']||_0x50b484['x']-_0x154328['x'];}),(_0xb3dd66=_0xb3dd66['filter'](_0x395e1e=>_0x24aed1['includes'](_0x395e1e['rootName'])))['sort']((_0x32d8a4,_0xf93d9f)=>_0x24aed1['indexOf'](_0x32d8a4['rootName'])-_0x24aed1['indexOf'](_0xf93d9f['rootName'])),_0xb3dd66;}['_makeTape'](_0x59394c){const _0x18d454=Array['from'](_0x59394c['markers'])['filter'](([_0x5625c9,_0xa05233])=>_0x5625c9['startsWith']('revision:')&&!_0xa05233['isCollapsed']),_0x17eb41=Array['from'](this['editor']['model']['createRangeIn'](_0x59394c)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x18d454['length'])for(const _0x46b851 of _0x17eb41){const [_0x456bbf,_0x2ab402]=_0x18d454[0x0],[,_0x151217,_0x46cf46]=_0x456bbf['split'](':');if(_0x2ab402['end']['isEqual'](_0x46b851['nextPosition'])&&_0x18d454['shift'](),(_0x46b851['previousPosition']['isEqual'](_0x2ab402['start'])||_0x46b851['previousPosition']['isAfter'](_0x2ab402['start']))&&('insertion'==_0x151217?_0x46b851['isAdded']={'userId':_0x46cf46}:'deletion'==_0x151217&&(_0x46b851['isRemoved']={'userId':_0x46cf46})),0x0==_0x18d454['length'])break;}return _0x17eb41;}['_refreshStartEndIndex'](_0x54b616){const _0x1c78b7=new Map();for(let _0x9dbd88=0x0;_0x9dbd88<_0x54b616['length'];_0x9dbd88++)'text'===_0x54b616[_0x9dbd88]['type']?(_0x54b616[_0x9dbd88]['item']['startIndex']=_0x9dbd88,_0x54b616[_0x9dbd88]['item']['endIndex']=_0x9dbd88):('elementStart'===_0x54b616[_0x9dbd88]['type']?_0x54b616[_0x9dbd88]['item']['startIndex']=_0x9dbd88:'elementEnd'===_0x54b616[_0x9dbd88]['type']&&(_0x54b616[_0x9dbd88]['item']['endIndex']=_0x9dbd88),_0x1c78b7['set'](_0x54b616[_0x9dbd88]['id'],_0x9dbd88));for(const _0x2db68b of _0x1c78b7['values']())'elementStart'===_0x54b616[_0x2db68b]['type']?_0x54b616[_0x2db68b]['item']['endIndex']=_0x1c78b7['get'](_0x54b616[_0x2db68b]['pairId']):'elementEnd'===_0x54b616[_0x2db68b]['type']&&(_0x54b616[_0x2db68b]['item']['startIndex']=_0x1c78b7['get'](_0x54b616[_0x2db68b]['pairId']));}['_processTape'](_0x19a5be){for(let _0x501916=0x0;_0x501916<_0x19a5be['length'];_0x501916++){if('elementStart'===_0x19a5be[_0x501916]['type'])_0x19a5be[_0x501916]['item']['startIndex']=_0x501916;else{if('elementEnd'===_0x19a5be[_0x501916]['type']){_0x19a5be[_0x501916]['item']['endIndex']=_0x501916;const _0x3109d1=_0x19a5be[_0x501916]['item']['startIndex'];_0x19a5be[_0x3109d1]['pairId']=_0x19a5be[_0x501916]['id'],_0x19a5be[_0x501916]['pairId']=_0x19a5be[_0x3109d1]['id'];}else _0x19a5be[_0x501916]['item']['startIndex']=_0x501916,_0x19a5be[_0x501916]['item']['endIndex']=_0x501916,_0x19a5be[_0x501916]['pairId']=null;}_0x19a5be[_0x501916]['markersStart']||(_0x19a5be[_0x501916]['markersStart']=[],_0x19a5be[_0x501916]['markersEnd']=[]);}}['_markInsertions'](_0x9ab608,_0x4f90b9){const _0x1fbf70=_0x9ab608['filter'](_0x1a41f7=>!_0x1a41f7['isAdded']);for(let _0x4d4066=0x0;_0x4d4066<_0x4f90b9['length'];_0x4d4066++)_0x4f90b9[_0x4d4066]['isAdded']&&(_0x1fbf70[_0x4d4066]['isAdded']=_0x4f90b9[_0x4d4066]['isAdded']);}['_getDiff'](_0x5ebb84,_0x21058e=null){const _0x41f7a0=this['repository']['getRevision'](_0x5ebb84),_0x33aec7=_0x21058e?this['repository']['getRevision'](_0x21058e):null,_0x43d3ff=this['_getRevisionsRange'](_0x41f7a0,_0x33aec7),_0xd91ea4=_0x43d3ff[_0x43d3ff['length']-0x1],_0x2a21b5=new Map(),_0x3832ed={'model':{},'attributes':{},'changes':[]},_0x369149=new Set(),_0xe69839=new Map();for(let _0x13f309=_0x43d3ff['length']-0x1;_0x13f309>=0x0;_0x13f309--){const _0x1a6810=_0x43d3ff[_0x13f309];for(const _0x2caf62 of Object['keys'](_0x1a6810['diffData']))if(_0x1a6810['diffData'][_0x2caf62]['attachChange']){const _0x42edad=_0x1a6810['diffData'][_0x2caf62]['attachChange'];_0x42edad['isAttached']?(_0x369149['add'](_0x2caf62),_0xe69839['has'](_0x2caf62)&&_0xe69839['get'](_0x2caf62)['userId']==_0x42edad['userId']?_0xe69839['delete'](_0x2caf62):_0xe69839['set'](_0x2caf62,_0x42edad)):_0xe69839['has'](_0x2caf62)?(_0x369149['delete'](_0x2caf62),_0xe69839['delete'](_0x2caf62)):(_0x369149['add'](_0x2caf62),_0xe69839['set'](_0x2caf62,_0x42edad));}else _0x369149['add'](_0x2caf62);}for(const _0x376a07 of _0x369149){const _0x1a4c84=_0xe69839['has'](_0x376a07)&&!_0xe69839['get'](_0x376a07)['isAttached'];let _0x41b3cf=_0x1a4c84?_0x43d3ff['length']-0x1:0x0;const _0x1608b6=_0x1a4c84?-0x1:0x1;for(;_0x43d3ff[_0x41b3cf];){const _0x13a4aa=_0x43d3ff[_0x41b3cf];if(_0x13a4aa['diffData'][_0x376a07]){const _0x4d4636=_0x1a4c84?_0x13a4aa['diffData'][_0x376a07]['attributesBefore']:_0x13a4aa['diffData'][_0x376a07]['attributesAfter'];_0x3832ed['attributes'][_0x376a07]=_0x4d4636?_0x4eb401(_0x4d4636):{};break;}_0x41b3cf+=_0x1608b6;}}for(const _0x148cfa of _0x43d3ff){_0x148cfa['model']={};for(const _0x119df0 of _0x148cfa['authors'])_0x2a21b5['set'](_0x119df0['id'],_0x119df0);for(const _0x2e7f29 of _0x369149){const _0x25c60e=_0x148cfa['diffData'][_0x2e7f29]?_0x148cfa['diffData'][_0x2e7f29]['insertions']:'[]',_0x448515=_0x148cfa['diffData'][_0x2e7f29]?_0x148cfa['diffData'][_0x2e7f29]['deletions']:'[]',_0x4949c0=_0x148cfa['diffData'][_0x2e7f29]?.['rootElementName']||'$root';_0x148cfa['model'][_0x2e7f29]={'insertions':this['_utils']['_makeModelFromViewString'](_0x25c60e,_0x4949c0),'deletions':this['_utils']['_makeModelFromViewString'](_0x448515,_0x4949c0)};}}for(const _0x5a0956 of _0x369149){let _0x7d7aed=null,_0xccefec=0x0;const _0x77a33b=_0x43d3ff['map'](_0x195d93=>_0x195d93['diffData'][_0x5a0956]?.['rootElementName'])['find'](_0x33f7f0=>void 0x0!==_0x33f7f0)||'$root',_0x11e599=new Map(Array['from'](_0x41f7a0['model'][_0x5a0956]['insertions']['markers'])['filter'](([_0x2aa721])=>!_0x2aa721['startsWith']('revision:')));let _0x5939b4=0x0;for(const _0x1d2490 of _0x43d3ff){const _0x13a623=this['_makeTape'](_0x1d2490['model'][_0x5a0956]['insertions']);_0x1d2490==_0x41f7a0?(_0x7d7aed=_0x13a623,_0xccefec=_0x7d7aed['length'],_0x7d7aed['forEach'](_0x35c4f0=>{_0x35c4f0['id']=_0x5939b4++;}),this['_processTape'](_0x7d7aed)):this['_markInsertions'](_0x7d7aed,_0x13a623);const _0x218a9a=_0x7d7aed['filter'](_0x4c850a=>!_0x4c850a['isAdded'])['map'](_0x576129=>_0x576129['id']);let _0x3dd023=0x0;const _0x51faf3=this['_makeTape'](_0x1d2490['model'][_0x5a0956]['deletions']);_0x51faf3['forEach'](_0x451585=>{_0x451585['isRemoved']?_0x451585['id']=_0xccefec++:_0x451585['id']=_0x218a9a[_0x3dd023++];}),this['_processTape'](_0x51faf3),this['_setDistance'](_0x7d7aed,'isAdded'),this['_setDistance'](_0x51faf3,'isRemoved'),_0x1d2490==_0x41f7a0&&this['_markMarkers'](_0x7d7aed,_0x11e599),_0x7d7aed=this['_joinTapes'](_0x7d7aed,_0x51faf3),this['_refreshStartEndIndex'](_0x7d7aed),this['_setDistance'](_0x7d7aed,'isRemoved');}_0x7d7aed=_0x7d7aed['filter'](_0xafa9c8=>!(_0xafa9c8['isAdded']&&_0xafa9c8['isRemoved']));const _0x42e5b9=new Map(_0xd91ea4['model'][_0x5a0956]['deletions']['markers']),_0x3c812e=new Set(_0x11e599['keys']());for(const _0x67428 of _0x42e5b9['keys']())_0x3c812e['delete'](_0x67428);this['_markSuggestions'](_0x7d7aed,_0x3c812e),this['_fixObsoleteTags'](_0x7d7aed),_0x7d7aed=this['_removeMissingPairs'](_0x7d7aed),_0x7d7aed=this['_markMismatchedRemovedTags'](_0x7d7aed),_0x7d7aed=this['_removeUnsupportedChanges'](_0x7d7aed);const {root:_0x5f037b,changes:_0xcb2941}=this['_makeModelFromTape'](_0x7d7aed,_0x2a21b5,_0x5a0956,_0x77a33b);_0x3832ed['model'][_0x5a0956]=_0x5f037b;const _0xeb2de=_0xe69839['get'](_0x5a0956);if(_0xeb2de){const _0x50218c=new Ot({'author':_0x2a21b5['get'](_0xeb2de['userId']),'type':_0xeb2de['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x5a0956});_0xcb2941['unshift'](_0x50218c),_0x3832ed['attributes'][_0x5a0956]['revisionHistoryAttachChange']=_0x50218c['id'];}_0x3832ed['changes']=_0x3832ed['changes']['concat'](_0xcb2941);}return _0x3832ed;}['_markMarkers'](_0x52230a,_0x56ac68){for(let _0x26ca00=0x0;_0x26ca00<_0x52230a['length'];_0x26ca00++)for(const [_0x4fe47d,_0x46ef45]of _0x56ac68)!_0x46ef45['isCollapsed']&&_0x46ef45['start']['isEqual'](_0x52230a[_0x26ca00]['previousPosition'])&&_0x52230a[_0x26ca00]['markersStart']['push'](_0x4fe47d),_0x46ef45['end']['isEqual'](_0x52230a[_0x26ca00]['nextPosition'])&&_0x52230a[_0x26ca00]['markersEnd']['push'](_0x4fe47d);}['_joinTapes'](_0x3e75dc,_0x32692a){let _0x590a09=[],_0x4b9f01=0x0,_0x4090d8=0x0;for(;_0x4b9f01<_0x3e75dc['length']||_0x4090d8<_0x32692a['length'];){const _0x28bdd4=_0x3e75dc[_0x4b9f01]||{},_0x3c72f3=_0x32692a[_0x4090d8]||{};if(_0x28bdd4['id']==_0x3c72f3['id'])_0x4b9f01++,_0x4090d8++,_0x590a09['push'](_0x28bdd4);else{if(_0x3c72f3['isRemoved']&&_0x28bdd4['isAdded']){const {commonTape:_0x5d12ea,iEnd:_0x458d27,jEnd:_0x2e9b70}=this['_threeWayMerge'](_0x3e75dc,_0x4b9f01,_0x32692a,_0x4090d8);_0x590a09=_0x590a09['concat'](_0x5d12ea),_0x4b9f01=_0x458d27,_0x4090d8=_0x2e9b70;}else _0x3c72f3['isRemoved']?(_0x4090d8++,_0x590a09['push'](_0x3c72f3)):(_0x4b9f01++,_0x590a09['push'](_0x28bdd4));}}return _0x590a09;}['_markSuggestions'](_0x2dc011,_0x3e1b13){const _0x254b69=[];for(let _0x2a1b5e=0x0;_0x2a1b5e<_0x2dc011['length'];_0x2a1b5e++){for(let _0xaaf468=0x0;_0xaaf468<_0x2dc011[_0x2a1b5e]['markersStart']['length'];_0xaaf468++){const _0x218693=_0x2dc011[_0x2a1b5e]['markersStart'][_0xaaf468];if(!_0x3e1b13['has'](_0x218693))continue;const {group:_0x5e3094,type:_0x273aac,authorId:_0x4c8e66}=_0x419cb4(_0x218693);'revision-suggestion'!=_0x5e3094||'insertion'!=_0x273aac&&'deletion'!=_0x273aac||(_0x254b69['unshift']({'type':_0x273aac,'name':_0x218693,'userId':_0x4c8e66}),_0x2dc011[_0x2a1b5e]['markersStart']['splice'](_0xaaf468,0x1),_0xaaf468--);}_0x4a83ee(_0x2dc011[_0x2a1b5e]);for(let _0x31d2d4=0x0;_0x31d2d4<_0x2dc011[_0x2a1b5e]['markersEnd']['length'];_0x31d2d4++){const _0x2bda9f=_0x2dc011[_0x2a1b5e]['markersEnd'][_0x31d2d4];if(!_0x3e1b13['has'](_0x2bda9f))continue;const {group:_0x519a17,type:_0x3690d6}=_0x419cb4(_0x2bda9f);if('revision-suggestion'!=_0x519a17||'insertion'!=_0x3690d6&&'deletion'!=_0x3690d6)continue;_0x2dc011[_0x2a1b5e]['markersEnd']['splice'](_0x31d2d4,0x1),_0x31d2d4--;const _0x492ce2=_0x254b69['findIndex'](_0x54febc=>_0x54febc['name']==_0x2bda9f);_0x492ce2>-0x1&&_0x254b69['splice'](_0x492ce2,0x1);}}function _0x419cb4(_0x273eec){const _0x134747=_0x273eec['split'](':');return{'group':_0x134747[0x0],'type':_0x134747[0x1],'subType':_0x134747['length']>=0x5?_0x134747[0x2]:null,'id':_0x134747['length']<0x5?_0x134747[0x2]:_0x134747[0x3],'authorId':_0x134747['length']<0x5?_0x134747[0x3]:_0x134747[0x4],'markerCount':0x6==_0x134747['length']?_0x134747[0x5]:null};}function _0x4a83ee(_0x219521){for(let _0x531ab1=0x0;_0x531ab1<_0x254b69['length'];_0x531ab1++){if(_0x219521['isAdded']&&'insertion'==_0x254b69[_0x531ab1]['type']&&_0x219521['isAdded']['userId']==_0x254b69[_0x531ab1]['userId'])return _0x219521['isAddSuggestion']=_0x254b69[_0x531ab1],void delete _0x219521['isAdded'];if(!_0x219521['isAdded']&&!_0x219521['isRemoved']&&'deletion'==_0x254b69[_0x531ab1]['type'])return void(_0x219521['isRemoveSuggestion']=_0x254b69[_0x531ab1]);}}}['_setDistance'](_0x3d3454,_0x14b564){let _0x197348=0x0,_0x42b2a9=!0x1;const _0x42eccb=new Map();for(const _0x13ddee of _0x3d3454)_0x13ddee[_0x14b564]?_0x42b2a9&&(_0x197348++,_0x42b2a9=!0x1):(_0x197348++,_0x42b2a9=!0x0),_0x42eccb['set'](_0x13ddee['id'],_0x197348);for(let _0x514a2d=0x0;_0x514a2d<_0x3d3454['length'];_0x514a2d++){if('isRemoved'==_0x14b564&&_0x3d3454[_0x514a2d]['isAdded']||'isAdded'==_0x14b564&&_0x3d3454[_0x514a2d]['isRemoved'])continue;if('text'==_0x3d3454[_0x514a2d]['type']){_0x3d3454[_0x514a2d]['distance']=0x0;continue;}const _0x53e62a=_0x42eccb['get'](_0x3d3454[_0x514a2d]['pairId']),_0x542da7=_0x42eccb['get'](_0x3d3454[_0x514a2d]['id']);_0x3d3454[_0x514a2d]['distance']=_0x53e62a-_0x542da7;}}['_getRevisionsRange'](_0x3b0f16,_0x2c60b4,_0x53b60e=!0x1){const _0x5521e4=[];let _0x2cd29a=this['repository']['getIndex'](_0x3b0f16),_0x5e0e32=this['repository']['getIndex'](_0x2c60b4);for(-0x1==_0x5e0e32&&(_0x5e0e32=this['repository']['_revisions']['length'],_0x53b60e=!0x1);_0x2cd29a<_0x5e0e32;)_0x5521e4['push'](this['repository']['getRevision'](_0x2cd29a)),_0x2cd29a++;return _0x53b60e&&_0x5521e4['push'](this['repository']['getRevision'](_0x2cd29a)),_0x5521e4;}['_threeWayMerge'](_0x37a9a6,_0x5de854,_0x8ea5ea,_0x211372){const _0x211aac=this['editor']['model']['schema'];let _0x4d9776=_0x5de854;for(;_0x37a9a6[_0x4d9776]&&_0x37a9a6[_0x4d9776]['isAdded'];)_0x4d9776++;let _0xc737ae=_0x211372;for(;_0x8ea5ea[_0xc737ae]&&_0x8ea5ea[_0xc737ae]['isRemoved'];)_0xc737ae++;_0x1a8bdb(_0x37a9a6,_0x5de854,_0x4d9776),_0x1a8bdb(_0x8ea5ea,_0x211372,_0xc737ae);const _0x37e533=_0x8ea5ea['slice'](_0x211372,_0xc737ae)['concat'](_0x37a9a6['slice'](_0x5de854,_0x4d9776));return _0x37e533['sort']((_0x4aeff8,_0x4905ec)=>_0x4aeff8['side']!=_0x4905ec['side']?_0x4aeff8['side']-_0x4905ec['side']:_0x4aeff8['level']!=_0x4905ec['level']?_0x4aeff8['level']-_0x4905ec['level']:_0x4aeff8['distance']!=_0x4905ec['distance']?_0x4905ec['distance']-_0x4aeff8['distance']:!!_0x4aeff8['isAdded']!=!!_0x4905ec['isAdded']?-0x1==_0x4aeff8['side']||0x0==_0x4aeff8['side']?_0x4aeff8['isAdded']?-0x1:0x1:_0x4aeff8['isAdded']?0x1:-0x1:_0x4aeff8['index']-_0x4905ec['index']),{'commonTape':_0x37e533,'iEnd':_0x4d9776,'jEnd':_0xc737ae};function _0x1a8bdb(_0x1ff169,_0x44bbef,_0x43b2f4){let _0x1361de=-0x1,_0x3639f5=Number['POSITIVE_INFINITY'],_0x534064=!0x0;for(let _0x1c9e12=_0x44bbef;_0x1c9e12<_0x43b2f4;_0x1c9e12++)if(_0x211aac['isInline'](_0x1ff169[_0x1c9e12]['item'])||(_0x534064=!0x1),_0x1ff169[_0x1c9e12]['item']['startIndex']<_0x44bbef&&(_0x1361de=_0x1c9e12),_0x1ff169[_0x1c9e12]['item']['endIndex']>=_0x43b2f4){_0x3639f5=_0x1c9e12;break;}_0x534064&&(_0x1361de=_0x43b2f4-0x1);for(let _0x303384=_0x44bbef;_0x303384<_0x43b2f4;_0x303384++)_0x1ff169[_0x303384]['side']=_0x303384<=_0x1361de?-0x1:_0x303384<_0x3639f5?0x0:0x1,_0x1ff169[_0x303384]['index']=_0x303384;let _0x2acb98=0x0;for(let _0x3ebae8=_0x44bbef;_0x3ebae8<=_0x1361de;_0x3ebae8++)0x0==_0x1ff169[_0x3ebae8]['distance']?_0x1ff169[_0x3ebae8]['level']=_0x2acb98:(_0x2acb98++,_0x1ff169[_0x3ebae8]['level']=_0x2acb98,_0x2acb98++);for(let _0x2a39fa=_0x44bbef;_0x2a39fa<_0x43b2f4;_0x2a39fa++)0x0==_0x1ff169[_0x2a39fa]['side']&&(_0x1ff169[_0x2a39fa]['level']=_0x2acb98);_0x2acb98=0x0;for(let _0xdb3472=_0x43b2f4-0x1;_0xdb3472>=_0x3639f5;_0xdb3472--)0x0==_0x1ff169[_0xdb3472]['distance']?_0x1ff169[_0xdb3472]['level']=_0x2acb98:(_0x2acb98--,_0x1ff169[_0xdb3472]['level']=_0x2acb98,_0x2acb98--);}}['_fixObsoleteTags'](_0xc76ca9){const _0x5995bf=new Map(),_0x3a4431=this['editor']['model']['schema'];for(let _0x58ce69=0x1;_0x58ce69<_0xc76ca9['length'];_0x58ce69++){let _0x1d3540,_0x4cfb10,_0xf6db95;const _0x110757=_0xc76ca9[_0x58ce69],_0x4061f0=_0xc76ca9[_0x58ce69-0x1];if('text'==_0x110757['type'])continue;if(_0x110757['type']!=_0x4061f0['type'])continue;if(!_0x3a4431['isBlock'](_0x4061f0['item'])||_0x3a4431['isLimit'](_0x4061f0['item']))continue;if(!_0x3a4431['isBlock'](_0x110757['item'])||_0x3a4431['isLimit'](_0x110757['item']))continue;if((_0xc76ca9[_0x58ce69]['isAdded']||_0xc76ca9[_0x58ce69]['isAddSuggestion'])&&_0xc76ca9[_0x58ce69-0x1]['isRemoved'])_0x1d3540=_0xc76ca9[_0x58ce69],_0x4cfb10=_0xc76ca9[_0x58ce69-0x1],_0xf6db95=_0x58ce69-0x1;else{if(!_0xc76ca9[_0x58ce69]['isRemoved']||!_0xc76ca9[_0x58ce69-0x1]['isAdded']&&!_0xc76ca9[_0x58ce69-0x1]['isAddSuggestion'])continue;_0x1d3540=_0xc76ca9[_0x58ce69-0x1],_0x4cfb10=_0xc76ca9[_0x58ce69],_0xf6db95=_0x58ce69;}const _0x305e7a=_0x1d3540['level']==_0x4cfb10['level'],_0x5eb000=Math['abs'](_0x1d3540['level'])<Math['abs'](_0x4cfb10['level'])&&0x0==_0x4cfb10['distance'];(_0x305e7a||_0x5eb000)&&(_0x5995bf['set'](_0x4cfb10['id'],_0x1d3540['id']),_0xc76ca9['splice'](_0xf6db95,0x1),_0x58ce69--,_0x1d3540['isAdded']=!0x1);}for(let _0x52ccd2=0x0;_0x52ccd2<_0xc76ca9['length'];_0x52ccd2++)_0x5995bf['has'](_0xc76ca9[_0x52ccd2]['pairId'])&&(_0xc76ca9[_0x52ccd2]['pairId']=_0x5995bf['get'](_0xc76ca9[_0x52ccd2]['pairId']));}['_removeMissingPairs'](_0x31883f){const _0x245d69=new Set(_0x31883f['map'](_0xa63cb5=>_0xa63cb5['id']));for(let _0x549fd4=0x0;_0x549fd4<_0x31883f['length'];_0x549fd4++)_0x245d69['has'](_0x31883f[_0x549fd4]['pairId'])||0x0==_0x31883f[_0x549fd4]['distance']||(_0x31883f[_0x549fd4]['isIncorrect']=!0x0);return _0x31883f['filter'](_0x424c2d=>!_0x424c2d['isIncorrect']);}['_markMismatchedRemovedTags'](_0x197ee1){const _0x270fe5=new Set();for(let _0x50b7d5=0x0;_0x50b7d5<_0x197ee1['length'];_0x50b7d5++){if(_0x270fe5['has'](_0x197ee1[_0x50b7d5]['id'])&&_0x197ee1[_0x50b7d5]['isRemoved']&&(_0x197ee1[_0x50b7d5]['isIncorrect']=!0x0),_0x197ee1[_0x50b7d5]['isIncorrect'])continue;if(0x0==_0x197ee1[_0x50b7d5]['distance'])continue;if('elementStart'!=_0x197ee1[_0x50b7d5]['type'])continue;if(null==_0x197ee1[_0x50b7d5]['pairId'])continue;let _0x2a571f=_0x50b7d5+0x1,_0x3bd69d=0x0;for(;_0x197ee1[_0x2a571f]['id']!=_0x197ee1[_0x50b7d5]['pairId'];)'elementStart'==_0x197ee1[_0x2a571f]['type']?_0x3bd69d++:'elementEnd'==_0x197ee1[_0x2a571f]['type']&&_0x3bd69d--,_0x2a571f++;if(0x0!=_0x3bd69d){if(_0x197ee1[_0x50b7d5]['isRemoved'])_0x197ee1[_0x50b7d5]['isIncorrect']=!0x0;else{for(;_0x2a571f!=_0x50b7d5;)_0x197ee1[_0x2a571f]['isRemoved']&&0x0!=_0x197ee1[_0x2a571f]['distance']&&(_0x197ee1[_0x2a571f]['isIncorrect']=!0x0,_0x270fe5['add'](_0x197ee1[_0x2a571f]['pairId'])),_0x2a571f--;}}}return _0x197ee1['filter'](_0x26697b=>!_0x26697b['isIncorrect']);}['_removeUnsupportedChanges'](_0x220046){const _0x19a932=this['editor']['model']['schema'];for(let _0x29bc37=0x0;_0x29bc37<_0x220046['length'];_0x29bc37++){if(!(_0x220046[_0x29bc37]['isAdded']||_0x220046[_0x29bc37]['isAddSuggestion']||_0x220046[_0x29bc37]['isRemoved']||_0x220046[_0x29bc37]['isRemoveSuggestion']))continue;if(0x0==_0x220046[_0x29bc37]['distance'])continue;const _0x2d9380=_0x220046[_0x29bc37]['item'];_0x19a932['isBlock'](_0x2d9380)||_0x19a932['isLimit'](_0x2d9380)||(_0x220046[_0x29bc37]['isAdded']&&delete _0x220046[_0x29bc37]['isAdded'],_0x220046[_0x29bc37]['isAddSuggestion']&&delete _0x220046[_0x29bc37]['isAddSuggestion'],_0x220046[_0x29bc37]['isRemoveSuggestion']&&delete _0x220046[_0x29bc37]['isRemoveSuggestion'],_0x220046[_0x29bc37]['isRemoved']&&(_0x220046[_0x29bc37]['isIncorrect']=!0x0));}return _0x220046['filter'](_0x3cab75=>!_0x3cab75['isIncorrect']);}['_makeModelFromTape'](_0x2566c7,_0xbdc25b,_0x1a12ff,_0x56a642){const _0x5935a7=new _0x1f4d7e(),_0xd0a6ed=[],_0x47fd89=new Map(),_0x52a0c4=this['editor']['model'],_0x55b567=_0x52a0c4['schema'],_0x20b964=[_0x5935a7],_0x20c8c7={},_0x2ee3c3={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x5935a7['name']=_0x56a642;let _0xd88d8e=null;const _0x51c016=[0x0];for(let _0x3eb1db=0x0;_0x3eb1db<_0x2566c7['length'];_0x3eb1db++)if('elementStart'===_0x2566c7[_0x3eb1db]['type']){_0x2566c7[_0x3eb1db]['previousPosition']=_0x52a0c4['createPositionFromPath'](_0x5935a7,_0x51c016);const _0x5f5944=new _0x4b38e5(_0x2566c7[_0x3eb1db]['item']['name'],_0x2566c7[_0x3eb1db]['item']['getAttributes']());_0x20b964[0x0]['_appendChild'](_0x5f5944),_0x51c016['push'](0x0),_0x20b964['unshift'](_0x5f5944),_0x2566c7[_0x3eb1db]['nextPosition']=_0x52a0c4['createPositionFromPath'](_0x5935a7,_0x51c016);}else'elementEnd'===_0x2566c7[_0x3eb1db]['type']?(_0x20b964['shift'](),_0x2566c7[_0x3eb1db]['previousPosition']=_0x52a0c4['createPositionFromPath'](_0x5935a7,_0x51c016),_0x51c016['pop'](),_0x51c016[_0x51c016['length']-0x1]++,_0x2566c7[_0x3eb1db]['nextPosition']=_0x52a0c4['createPositionFromPath'](_0x5935a7,_0x51c016)):(_0x2566c7[_0x3eb1db]['previousPosition']=_0x52a0c4['createPositionFromPath'](_0x5935a7,_0x51c016),_0xd88d8e?_0xd88d8e['_data']+=_0x2566c7[_0x3eb1db]['item']['data']:_0xd88d8e=new _0xb637ba(_0x2566c7[_0x3eb1db]['item']['data'],_0x2566c7[_0x3eb1db]['item']['getAttributes']()),_0x2566c7[_0x3eb1db+0x1]&&'text'===_0x2566c7[_0x3eb1db+0x1]['type']&&_0x3cf6d7(_0xd88d8e,_0x2566c7[_0x3eb1db+0x1]['item'])||(_0x20b964[0x0]['_appendChild'](_0xd88d8e),_0xd88d8e=null),_0x51c016[_0x51c016['length']-0x1]+=_0x2566c7[_0x3eb1db]['item']['offsetSize'],_0x2566c7[_0x3eb1db]['nextPosition']=_0x52a0c4['createPositionFromPath'](_0x5935a7,_0x51c016));for(let _0x5d4e3b=0x0;_0x5d4e3b<_0x2566c7['length'];_0x5d4e3b++){const _0x94dabd=_0x2566c7[_0x5d4e3b]['previousPosition'],_0x1dd4bd=_0x2566c7[_0x5d4e3b]['nextPosition'];for(const _0x1c9d1c of _0x2566c7[_0x5d4e3b]['markersStart'])_0x47fd89['set'](_0x1c9d1c,{'start':_0x94dabd,'end':null});_0x4935a5('isRemoveSuggestion',_0x5d4e3b,_0x94dabd,_0x1dd4bd),_0x4935a5('isAddSuggestion',_0x5d4e3b,_0x94dabd,_0x1dd4bd),_0x4935a5('isRemoved',_0x5d4e3b,_0x94dabd,_0x1dd4bd),_0x4935a5('isAdded',_0x5d4e3b,_0x94dabd,_0x1dd4bd);for(const _0x50ea9 of _0x2566c7[_0x5d4e3b]['markersEnd']){const _0x215e11=_0x47fd89['get'](_0x50ea9);_0x215e11?_0x215e11['end']=_0x1dd4bd:_0x47fd89['set'](_0x50ea9,{'start':_0x1dd4bd,'end':_0x1dd4bd});}}for(const [_0x2e6fd4,_0x3d2330]of _0x47fd89){const _0x5b9f46=this['editor']['model']['createRange'](_0x3d2330['start'],_0x3d2330['end']);_0x5935a7['markers']['set'](_0x2e6fd4,_0x5b9f46);}return _0xd0a6ed['sort']((_0x1e2a42,_0x159f27)=>{const _0x1b8b6d=_0x5935a7['markers']['get']('revision:'+_0x1e2a42['id']),_0x59df2b=_0x5935a7['markers']['get']('revision:'+_0x159f27['id']);return _0x1b8b6d['start']['isBefore'](_0x59df2b['start'])?-0x1:_0x1b8b6d['start']['isAfter'](_0x59df2b['start'])?0x1:_0x1b8b6d['end']['isBefore'](_0x59df2b['end'])?-0x1:_0x1b8b6d['end']['isAfter'](_0x59df2b['end'])?0x1:'add'===_0x1e2a42['type']?-0x1:0x1;}),{'root':_0x5935a7,'changes':_0xd0a6ed};function _0x4935a5(_0x2629ba,_0x55f54f,_0x482aed,_0x4ad727){const _0x4c1d0e=!!_0x2566c7[_0x55f54f][_0x2629ba],_0x190348=_0x4c1d0e?_0x2566c7[_0x55f54f][_0x2629ba]['userId']:null,_0x501c36=_0x55f54f===_0x2566c7['length']-0x1,_0x3e9700=_0x2ee3c3[_0x2629ba][0x0],_0xd1ba2f=_0x55b567['isObject'](_0x2566c7[_0x55f54f]['item']);!_0x20c8c7[_0x2629ba]&&_0x4c1d0e?_0x20c8c7[_0x2629ba]={'start':_0x482aed,'tapeItem':_0x2566c7[_0x55f54f],'userId':_0x190348,'type':_0x2629ba}:_0x20c8c7[_0x2629ba]&&!_0x4c1d0e?(_0x20c8c7[_0x2629ba]['end']=_0x482aed,_0x4456da(_0x20c8c7[_0x2629ba]),_0x20c8c7[_0x2629ba]=null):_0x20c8c7[_0x2629ba]&&_0x4c1d0e&&_0x20c8c7[_0x2629ba]['userId']!==_0x190348&&(_0x20c8c7[_0x2629ba]['end']=_0x482aed,_0x3e9700&&_0x3e9700['userId']===_0x20c8c7[_0x2629ba]['userId']||_0x4456da(_0x20c8c7[_0x2629ba]),_0x20c8c7[_0x2629ba]={'start':_0x482aed,'tapeItem':_0x2566c7[_0x55f54f],'userId':_0x190348,'type':_0x2629ba}),_0x20c8c7[_0x2629ba]&&_0xd1ba2f&&('elementStart'!==_0x2566c7[_0x55f54f]['type']||_0x3e9700&&_0x3e9700['userId']===_0x190348||_0x2ee3c3[_0x2629ba]['unshift']({'userId':_0x190348,'object':_0x2566c7[_0x55f54f]['item'],'change':_0x20c8c7[_0x2629ba]}),'elementEnd'===_0x2566c7[_0x55f54f]['type']&&_0x3e9700&&_0x3e9700['object']===_0x2566c7[_0x55f54f]['item']&&(_0x2ee3c3[_0x2629ba]['shift'](),_0x20c8c7[_0x2629ba]=_0x3e9700['change'])),_0x20c8c7[_0x2629ba]&&_0x501c36&&(_0x20c8c7[_0x2629ba]['end']=_0x4ad727,_0x4456da(_0x20c8c7[_0x2629ba]),_0x20c8c7[_0x2629ba]=null);}function _0x4456da({start:_0x1cfebc,end:_0x39d899,tapeItem:_0x480f78,userId:_0x1909e7,type:_0x17ae5c}){const _0x26d4da=_0x480f78['item'],_0x4e1f5b=_0x52a0c4['schema']['isBlock'](_0x26d4da)&&!_0x52a0c4['schema']['isLimit'](_0x26d4da),_0x33b4a3=_0x1cfebc['nodeAfter']==_0x39d899['parent']&&_0x39d899['isAtStart'];if(_0x4e1f5b&&_0x33b4a3)return;const _0x7cadac=_0x52a0c4['createRange'](_0x1cfebc,_0x39d899),_0x4066bc=new Ot({'author':_0xbdc25b['get'](_0x1909e7),'type':'isAdded'==_0x17ae5c||'isAddSuggestion'==_0x17ae5c?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x17ae5c||'isRemoveSuggestion'==_0x17ae5c},'createdAt':new Date(),'rootName':_0x1a12ff});_0xd0a6ed['push'](_0x4066bc),_0x5935a7['markers']['set']('revision:'+_0x4066bc['id'],_0x7cadac);}function _0x3cf6d7(_0x22200b,_0x4ebaaf){const _0xe0d70a=_0x22200b['getAttributes'](),_0x562819=_0x4ebaaf['getAttributes']();for(const _0x516fb5 of _0xe0d70a){if(_0x516fb5[0x1]!==_0x4ebaaf['getAttribute'](_0x516fb5[0x0]))return!0x1;_0x562819['next']();}return _0x562819['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x3a28ab=>{const _0x49617f=_0x3a28ab['markerName']['split'](':')[0x1],_0x27db1b=this['_getChangeFromId'](_0x49617f);if(!_0x27db1b)return null;const _0x3635da='add'==_0x27db1b['type']?'insertion':'deletion',_0x47656f=['ck-suggestion-marker','ck-suggestion-marker-'+_0x3635da];return _0x27db1b['data']['isSuggestion']&&_0x47656f['push']('ck-suggestion-marker-'+_0x3635da+'-new'),this['activeChange']==_0x27db1b&&_0x47656f['push']('ck-suggestion-marker--active'),{'classes':_0x47656f,'attributes':{'data-change-id':_0x49617f}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x34abf3=>{_0x34abf3['on']('element:pre',(_0x2c2b72,_0x30d940,_0x489995)=>{const _0x334f95=_0x30d940['viewItem']['getChild'](0x0);if(!_0x334f95||!_0x334f95['is']('element','code'))return;if(!_0x489995['consumable']['consume'](_0x334f95,{'attributes':['vid_start','vid_end']}))return;const _0x5ffbf7=_0x30d940['modelRange']['start']['nodeAfter'];_0x489995['writer']['setAttribute']('vid_start',_0x334f95['getAttribute']('vid_start'),_0x5ffbf7),_0x489995['writer']['setAttribute']('vid_end',_0x334f95['getAttribute']('vid_end'),_0x5ffbf7);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x3cc16f=>{_0x3cc16f['on']('element',(_0xffdd6c,_0x335fce,_0xf7aaa6)=>{if(!_0xf7aaa6['consumable']['consume'](_0x335fce['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x335fce['modelRange']['isCollapsed'])return;const _0x569a22=_0x335fce['modelRange']['start']['nodeAfter'];_0x569a22['hasAttribute']('vid_start')||_0x569a22['hasAttribute']('vid')||(_0xf7aaa6['writer']['setAttribute']('vid_start',_0x335fce['viewItem']['getAttribute']('vid_start'),_0x569a22),_0xf7aaa6['writer']['setAttribute']('vid_end',_0x335fce['viewItem']['getAttribute']('vid_end'),_0x569a22));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x4f2fbe=>_0x4f2fbe['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x42c866,[,_0x4274d2])=>{['vid_start','vid_end','vid']['includes'](_0x4274d2)&&(_0x42c866['return']=!0x0,_0x42c866['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x3d09e2=>{_0x3d09e2['on']('attribute:vid',(_0x55981c,_0x141dbb,_0xb1cd57)=>{if('\x20'!=_0x141dbb['item']['data']||_0x141dbb['item']['parent']['maxOffset']>0x1)return;if(!_0xb1cd57['consumable']['consume'](_0x141dbb['item'],_0x55981c['name']))return;const _0x4e1a83=_0xb1cd57['writer'],_0x206dfc=_0xb1cd57['mapper']['toViewRange'](_0x141dbb['range']);_0x4e1a83['wrap'](_0x206dfc,_0x4e1a83['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x471946){const _0x10d4d6=_0x471946['plugins']['get']('RevisionViewer');return(_0x54121b,_0x4c6dd8,_0x175f1d)=>{const _0xf5f933=_0x4c6dd8['markerName']['split'](':')[0x1],_0x32448f=_0x10d4d6['_getChangeFromId'](_0xf5f933);if(!_0x32448f)return null;const _0x4ea180='add'==_0x32448f['type']?'split':'merge';if(!_0x175f1d['consumable']['test'](_0x4c6dd8['markerRange'],_0x54121b['name']))return;const _0x365873=_0x4c6dd8['markerRange']['getWalker'](),_0x3424c0=_0x4c6dd8['markerRange']['start'],_0x3100fb=_0x471946['model']['schema'];let _0x503821=null,_0xc7973=null,_0x476f0c=!0x1,_0x34979a=!0x1;for(const _0x46f005 of _0x365873){const _0x487be4=_0x46f005['item'];_0x476f0c=_0x476f0c||_0x3100fb['isContent'](_0x487be4);const _0x228b83=_0x175f1d['mapper']['toViewElement'](_0x487be4);if(_0x228b83&&_0x228b83['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x46f005['type']&&(_0x3100fb['isBlock'](_0x487be4)&&!_0x3100fb['isLimit'](_0x487be4)&&(_0x487be4['nextSibling']||_0x3424c0['isAtEnd']?_0x503821&&_0x503821['parent']==_0x487be4||(_0x503821=_0x487be4,_0x16d1b0(_0x46f005['previousPosition']),_0x34979a=!0x0):_0xc7973=_0xc7973||_0x46f005['previousPosition']));}function _0x16d1b0(_0x5d524d){const _0x54dbce=_0x175f1d['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x4ea180}),_0x13677c=_0x175f1d['mapper']['toViewPosition'](_0x5d524d);_0x32448f['data']['isSuggestion']&&_0x175f1d['writer']['addClass']('ck-suggestion-marker-'+_0x4ea180+'-new',_0x54dbce),_0x10d4d6['activeChange']==_0x32448f&&_0x175f1d['writer']['addClass']('ck-suggestion-marker--active',_0x54dbce),_0x175f1d['writer']['insert'](_0x13677c,_0x54dbce),_0x175f1d['mapper']['bindElementToMarker'](_0x54dbce,_0x4c6dd8['markerName']);}_0x476f0c||_0x34979a||!_0xc7973||_0x16d1b0(_0xc7973);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x3a4c11,_0x32711d,_0x48336a)=>{const _0xaed533=_0x48336a['mapper']['markerNameToElements'](_0x32711d['markerName']);if(_0xaed533){for(const _0x2f07e6 of _0xaed533)(_0x2f07e6['hasClass']('ck-suggestion-marker-split')||_0x2f07e6['hasClass']('ck-suggestion-marker-merge'))&&(_0x48336a['mapper']['unbindElementFromMarkerName'](_0x2f07e6,_0x32711d['markerName']),_0x48336a['writer']['remove'](_0x2f07e6));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x5c6fee,_0x33f6a4,_0xa9a98b)=>{const _0x591086=_0x33f6a4['markerName']['split'](':')[0x1],_0x2d9b87=this['_getChangeFromId'](_0x591086);if(!_0x2d9b87)return null;const _0x1806c3='add'==_0x2d9b87['type']?'split':'merge';if(_0xa9a98b['consumable']['test'](_0x33f6a4['markerRange'],_0x5c6fee['name']))for(const _0x96ce15 of _0x33f6a4['markerRange']['getItems']()){if(!_0x96ce15['is']('element','softBreak'))continue;const _0x24f61b=_0xa9a98b['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x1806c3}),_0xb530d2=_0xa9a98b['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x96ce15));_0x2d9b87['data']['isSuggestion']&&_0xa9a98b['writer']['addClass']('ck-suggestion-marker-'+_0x1806c3+'-new',_0x24f61b),this['activeChange']==_0x2d9b87&&_0xa9a98b['writer']['addClass']('ck-suggestion-marker--active',_0x24f61b),_0xa9a98b['writer']['insert'](_0xb530d2,_0x24f61b),_0xa9a98b['mapper']['bindElementToMarker'](_0x24f61b,_0x33f6a4['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x2f505b=>{for(const _0x28d8d8 of this['editor']['model']['document']['getRootNames']()){const _0x5a2f86=this['editor']['model']['document']['getRoot'](_0x28d8d8),_0x3f2620=this['editor']['editing']['view']['document']['getRoot'](_0x28d8d8);if(_0x3f2620){const _0x1ac011=_0x5a2f86['getAttribute']('revisionHistoryAttachChange');if(_0x2f505b['removeAttribute']('data-change-id',_0x3f2620),_0x2f505b['removeClass']('ck-revision-history-root-add',_0x3f2620),_0x2f505b['removeClass']('ck-revision-history-root-remove',_0x3f2620),_0x2f505b['removeClass']('ck-revision-history-root--active',_0x3f2620),_0x1ac011){const _0x8661e6=this['_getChangeFromId'](_0x1ac011);if(!_0x8661e6)return null;_0x2f505b['setAttribute']('data-change-id',_0x1ac011,_0x3f2620),_0x2f505b['addClass']('ck-revision-history-root-'+_0x8661e6['type'],_0x3f2620),this['activeChange']==_0x8661e6&&_0x2f505b['addClass']('ck-revision-history-root--active',_0x3f2620);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x1c54a6=>'revision-comment:'+_0x1c54a6,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x3bfe52=>'revision-suggestion:'+_0x3bfe52,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x469e1e=>({'name':'suggestion:'+_0x469e1e,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x3fd1c8=>{const _0x26307e=_0x3fd1c8['markerName']['split'](':')[0x1];return'insertion'!=_0x26307e&&'deletion'!=_0x26307e?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x26307e]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Vt(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Vt(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x407fee,_0x517913,_0x39d626)=>{const _0x1e04cf=_0x39d626['mapper']['markerNameToElements'](_0x517913['markerName']);if(_0x1e04cf){for(const _0x408ee8 of _0x1e04cf)_0x408ee8['is']('uiElement')&&(_0x39d626['mapper']['unbindElementFromMarkerName'](_0x408ee8,_0x517913['markerName']),_0x39d626['writer']['remove'](_0x408ee8));}},{'priority':'high'});}['_getChangeFromId'](_0x26feaa){return this['_changeIdToChange']['get'](_0x26feaa);}['_getViewForChange'](_0x37cbfb){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Nt(this['editor']['locale'],_0x37cbfb),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0xb5738b,_0x509e4f,_0x2dc832,_0x71c405)=>{_0x71c405&&this['_balloon']['remove'](_0x71c405),_0x2dc832&&(this['_balloon']['add']({'view':_0x2dc832,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x1b4e54=this['editor']['editing'],_0x410402=this['_getChangeFromId'](_0x2dc832['changeId']);let _0x46d3a6;if(_0x410402['data']['isOnRoot']){const _0x1a0a79=_0x1b4e54['view']['getDomRoot'](_0x410402['rootName']);_0x46d3a6=Array['from'](_0x1a0a79['getClientRects']());}else{const _0x1d8a37=this['editor']['model']['markers']['get']('revision:'+_0x2dc832['changeId']);_0x46d3a6=Array['from'](_0x1b4e54['mapper']['markerNameToElements'](_0x1d8a37['name']))['map'](_0x451df3=>_0x1b4e54['view']['domConverter']['mapViewToDom'](_0x451df3))['map'](_0x3c48ff=>Array['from'](_0x3c48ff['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x46d3a6['find'](_0x5d398d=>_0x5d398d['top']-0x3<=this['_activeViewTarget']['y']&&_0x5d398d['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x5d398d['left']-0x3<=this['_activeViewTarget']['x']&&_0x5d398d['right']+0x3>=this['_activeViewTarget']['x'])||_0x46d3a6[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x1ec013,_0x5d168b,_0x137ba8,_0x29908f)=>{this['activeView']=_0x137ba8?this['_getViewForChange'](_0x137ba8):null,this['editor']['model']['change'](()=>{const _0x4d9324=this['editor']['editing'];_0x29908f&&(_0x29908f['data']['isOnRoot']?_0x4d9324['view']['change'](_0x18114b=>{_0x18114b['removeClass']('ck-revision-history-root--active',_0x4d9324['view']['document']['getRoot'](_0x29908f['rootName']));}):_0x4d9324['reconvertMarker']('revision:'+_0x29908f['id'])),_0x137ba8&&(_0x137ba8['data']['isOnRoot']?_0x4d9324['view']['change'](_0xbf6b32=>{_0xbf6b32['addClass']('ck-revision-history-root--active',_0x4d9324['view']['document']['getRoot'](_0x137ba8['rootName']));}):_0x4d9324['reconvertMarker']('revision:'+_0x137ba8['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x5ea8ae,_0x4b715c)=>{if(this['activeChange'])return;const _0xb66ca9=this['_findChangeIdFromDomTarget'](_0x4b715c['target']),_0x18add1=this['_changeIdToChange']['get'](_0xb66ca9);_0x18add1?(this['_activeViewTarget']={'x':_0x4b715c['domEvent']['x'],'y':_0x4b715c['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x18add1)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x26a1e6,_0x1b35b7)=>{const _0x3cc13a=this['_findChangeIdFromDomTarget'](_0x1b35b7['target']),_0x38a7c5=this['_changeIdToChange']['get'](_0x3cc13a);_0x38a7c5?(this['_activeViewTarget']={'x':_0x1b35b7['domEvent']['x'],'y':_0x1b35b7['domEvent']['y']},_0x38a7c5===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x38a7c5):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x42a4db){do{const _0xb56193=_0x42a4db['getAttribute']('data-change-id');if(_0xb56193)return _0xb56193;_0x42a4db=_0x42a4db['parent'];}while(_0x42a4db);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x56e28d=>{for(const _0x3047de of this['editor']['model']['markers'])_0x56e28d['removeMarker'](_0x3047de);});}};function Vt(_0x5b8ba6,_0x3943fc){return(_0x516e16,_0x15acae,_0x3475ac)=>{if(!_0x3475ac['consumable']['test'](_0x15acae['markerRange'],_0x516e16['name']))return;const _0x4afeb8=_0x15acae['markerRange']['getWalker'](),_0x2cd822=_0x15acae['markerRange']['start'],_0xf9b3fa=_0x5b8ba6['model']['schema'];let _0x233cad=null,_0x1908b9=null,_0x1a99bc=!0x1,_0x410a52=!0x1;for(const _0x5f3c10 of _0x4afeb8){const _0x44ccc0=_0x5f3c10['item'];_0x1a99bc=_0x1a99bc||_0xf9b3fa['isContent'](_0x44ccc0);const _0xe4eec=_0x3475ac['mapper']['toViewElement'](_0x44ccc0);if(_0xe4eec&&_0xe4eec['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x5f3c10['type']&&(_0xf9b3fa['isBlock'](_0x44ccc0)&&!_0xf9b3fa['isLimit'](_0x44ccc0)&&(_0x44ccc0['nextSibling']||_0x2cd822['isAtEnd']?_0x233cad&&_0x233cad['parent']==_0x44ccc0||(_0x233cad=_0x44ccc0,_0x3b0d79(_0x5f3c10['previousPosition']),_0x410a52=!0x0):_0x1908b9=_0x1908b9||_0x5f3c10['previousPosition']));}function _0x3b0d79(_0x274664){const _0x255721=_0x3475ac['mapper']['toViewPosition'](_0x274664),_0x589a90=_0x3475ac['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x3943fc});_0x3475ac['writer']['insert'](_0x255721,_0x589a90),_0x3475ac['mapper']['bindElementToMarker'](_0x589a90,_0x15acae['markerName']);}_0x1a99bc||_0x410a52||!_0x1908b9||_0x3b0d79(_0x1908b9);};}var Dt=class extends _0xb89394{constructor(_0xbae7f4){super(_0xbae7f4);const _0x20a81d=_0xbae7f4['plugins']['get'](Mt);this['affectsData']=!0x1,this['listenTo'](_0x20a81d,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x20a81d,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x3662de=this['editor'],_0x3b6647=_0x3662de['plugins']['get'](Mt),_0x16ccc7=_0x3b6647['isReady']?_0x3b6647['diff']['newRevisionId']:null;_0x3662de['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x16ccc7);}['refresh'](){const {isReady:_0x423f1a,isEnabled:_0x2c5b37,repository:_0x207b55,diff:_0x346cdf}=this['editor']['plugins']['get'](Mt),_0x2cff2a=_0x346cdf&&_0x207b55['getLaterVisibleRevision'](_0x346cdf['newRevisionId']);this['isEnabled']=_0x423f1a&&_0x2c5b37&&Boolean(_0x2cff2a);}},Tt=class extends _0xb89394{['_step'];constructor(_0x27190d,{direction:_0x3c6440}){super(_0x27190d);const _0x18e804=_0x27190d['plugins']['get'](Mt);this['affectsData']=!0x1,this['_step']='forward'===_0x3c6440?0x1:-0x1,this['listenTo'](_0x18e804,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x18e804,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x18e804,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x6ca86f=this['editor'],_0x218b95=_0x6ca86f['plugins']['get'](Mt),{isNavigationMode:_0x4e4b02,currentChangeNumber:_0x4023cd}=_0x218b95;let _0x53b6f3;if(_0x218b95['activeChange']=_0x4e4b02?_0x218b95['diff']['changes']['get'](_0x4023cd+this['_step']):_0x218b95['diff']['changes']['first'],_0x218b95['activeChange']['data']['isOnRoot'])_0x53b6f3=_0x6ca86f['editing']['view']['getDomRoot'](_0x218b95['activeChange']['rootName']);else{const _0xbecebd=_0x6ca86f['model']['markers']['get']('revision:'+_0x218b95['activeChange']['id']);_0x53b6f3=_0x474d00(_0x6ca86f['editing'],_0xbecebd);}_0x2f6654({'target':_0x53b6f3,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x41ebc1,currentChangeNumber:_0x186c2,numberOfChanges:_0x4d62a1,isReady:_0x80d0bf,isEnabled:_0x1e1231}=this['editor']['plugins']['get'](Mt);this['isEnabled']=!!(_0x1e1231&&_0x80d0bf&&_0x4d62a1)&&(!_0x41ebc1||(0x1===this['_step']?_0x186c2<_0x4d62a1-0x1:_0x186c2>0x0));}},Ht=class extends at{constructor(_0x47e047){super(_0x47e047);const _0x190b41=this['bindTemplate'],_0x1f0ccd=new _0x35703b(_0x47e047),_0x295bcd=new _0x35703b(_0x47e047);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',(_0x4732e9,_0x41eced)=>_0x4732e9&&_0x41eced>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x4b81e9,_0xf1ce6e,_0x2898bd,_0x5d43f1)=>{if(!_0x4b81e9)return pt(_0x47e047,'Loading...');if(!_0x2898bd)return pt(_0x47e047,'No\x20changes');const _0x2ef749=pt(_0x47e047,'NUMBER_OF_CHANGES',_0x2898bd);return _0x5d43f1?pt(_0x47e047,'X_OF_Y_CHANGES',[_0xf1ce6e+0x1,_0x2898bd]):_0x2ef749;}),_0x1f0ccd['set']({'label':pt(_0x47e047,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x164853}),_0x295bcd['set']({'label':pt(_0x47e047,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x7fda58}),_0x1f0ccd['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x295bcd['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x1f0ccd['on']('execute',()=>this['fire']('execute','backward')),_0x295bcd['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',_0x190b41['if']('_isStatusLabelVisible','ck-hidden',_0x1071bf=>!_0x1071bf)]},'children':[{'text':_0x190b41['to']('isNavigationMode',_0x516dd9=>_0x516dd9?pt(_0x47e047,'EDIT_X_OF_Y_REVISIONS')+':\x20':pt(_0x47e047,'Total')+':\x20')}]},{'text':_0x190b41['to']('_statusText')}]},new nt(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x1f0ccd,_0x295bcd]}]});}};const Pt='ck-editor__editable__loading-overlay';var Ut=class extends _0x27a866{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x5303dd=this['editor']['editing']['view'];_0x5303dd['change'](_0x58d463=>{for(const _0x4f1fe5 of _0x5303dd['document']['roots'])_0x58d463['addClass'](Pt,_0x4f1fe5);});}['hide'](){const _0x47f536=this['editor']['editing']['view'];_0x47f536['change'](_0xdf74ad=>{for(const _0x120c4f of _0x47f536['document']['roots'])_0xdf74ad['removeClass'](Pt,_0x120c4f);});}},Lt=class extends _0x27a866{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Mt,Ut];}['init'](){const _0x3d9459=this['editor'],_0x44f37b=_0x3d9459['plugins']['get'](Mt),_0x5dfa1a=_0x3d9459['plugins']['get'](Ut);_0x3d9459['ui']['componentFactory']['add']('exitToEditing',_0x30dc91=>{const _0x1bfd9b=new _0x35703b(_0x30dc91);return _0x1bfd9b['set']({'label':pt(_0x30dc91,'Back\x20to\x20editing'),'icon':_0x5a08fb,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x1bfd9b,'execute',()=>{_0x3d9459['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x1bfd9b;}),_0x3d9459['ui']['componentFactory']['add']('restoreRevision',_0x4b4d86=>{const _0x18ade7=new _0x35703b(_0x4b4d86);return _0x18ade7['set']({'label':pt(_0x4b4d86,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x18ade7['bind']('isEnabled')['to'](_0x3d9459['commands']['get']('restoreRevision')),this['listenTo'](_0x18ade7,'execute',()=>_0x3d9459['execute']('restoreRevision')),_0x18ade7;}),_0x3d9459['ui']['componentFactory']['add']('changesNavigation',_0x41bc63=>{const _0x4dae2f=new Ht(_0x41bc63),_0x4fba28=_0x3d9459['commands']['get']('showPreviousChange'),_0x3b0e32=_0x3d9459['commands']['get']('showNextChange');return _0x4dae2f['bind']('isBackwardNavigationEnabled')['to'](_0x4fba28,'isEnabled'),_0x4dae2f['bind']('isForwardNavigationEnabled')['to'](_0x3b0e32,'isEnabled'),_0x4dae2f['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x44f37b),this['listenTo'](_0x4dae2f,'execute',(_0x5d6be9,_0x428933)=>{_0x3d9459['execute']('forward'===_0x428933?'showNextChange':'showPreviousChange');}),_0x4dae2f;}),_0x5dfa1a['show'](),_0x44f37b['on']('change:isReady',(_0x2d6e0c,_0x4cee97,_0x1e9c7a)=>{_0x1e9c7a?_0x5dfa1a['hide']():_0x5dfa1a['show']();});}},Ft=class extends _0x355d07{['_resizeObserver']=null;constructor(_0x4e9025,_0x12d01c){super(_0x4e9025,_0x12d01c);const _0x41da1f=this['bindTemplate'];this['set']({'label':pt(_0x4e9025,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=pt(_0x4e9025,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x41da1f['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x22d03b(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x581960=this['fieldView']['element'];this['_tooltipString']=_0x581960['scrollWidth']>_0x581960['clientWidth']&&_0x581960['value']||'';}},$t=class extends at{constructor(_0x427824,_0x4d1ac5,_0x1eee46){super(_0x427824);const _0x207036=new _0x35caf5();_0x207036['set']({'content':_0x1b6f85,'viewBox':'0\x200\x2011\x2010'});const _0x180a8d=['ck','ck-revision-history-sidebar__revision-author'];_0x1eee46&&_0x180a8d['push']('ck-revision-history-sidebar__revision-author_creator');const _0x162bcf=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':pt(_0x427824,_0x1eee46?'Revision\x20creator':'Revision\x20author')},'children':[_0x207036,_0x4d1ac5['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x180a8d},'children':_0x162bcf});}};function jt(_0x47a55a,_0x210a60){const _0xf68e73=_0x47a55a['bindTemplate'],_0xbb85b1=_0x47a55a['locale'],_0x274580=ct(_0xbb85b1);_0x274580['panelPosition']='sw';const _0x4e161d=function(_0x4a802c,_0x43d411){const _0x56520f=function(_0x175751,_0x38b2d6){const _0x3692c0=_0x175751['locale'],_0x2dc6fd={'Compare\x20against\x20selected':pt(_0x3692c0,'Compare\x20against\x20selected'),'Name\x20this\x20revision':pt(_0x3692c0,'Name\x20this\x20revision'),'Restore\x20this\x20revision':pt(_0x3692c0,'Restore\x20this\x20revision')};return _0x38b2d6['map'](_0x1c2b19=>{const _0x2938f5=_0x2dc6fd[_0x1c2b19['name']];return _0x2938f5&&_0x2938f5!==_0x1c2b19['name']&&(_0x1c2b19['name']=_0x2938f5),_0x1c2b19;});}(_0x4a802c,_0x43d411),_0x421add=new _0x112359();for(const _0x3d1072 of _0x56520f){const _0x198051={'type':'button','model':new rt({'label':_0x3d1072['name'],'class':_0x3d1072['class'],'withText':!0x0,'role':'menuitem','_action':_0x3d1072['action']})};_0x198051['model']['bind']('isEnabled')['to'](_0x4a802c,'isActionsDropdownOpen',_0x2238dd=>'function'!=typeof _0x3d1072['isEnabled']||(!_0x2238dd||_0x3d1072['isEnabled'](_0x4a802c))),_0x421add['add'](_0x198051);}return _0x421add;}(_0x47a55a,_0x210a60);return _0x47a55a['bind']('isActionsDropdownOpen')['to'](_0x274580,'isOpen'),_0x274580['buttonView']['set']({'label':pt(_0xbb85b1,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x5a2702}),_0x274580['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0xf68e73['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0xf68e73['to'](_0x275404=>_0x275404['stopPropagation']())}}),_0x274580['on']('execute',_0x161867=>{_0x47a55a['isReady']&&'function'==typeof _0x161867['source']['_action']&&_0x161867['source']['_action'](_0x47a55a);}),ht(_0x274580,_0x4e161d,{'role':'menu'}),_0x274580['listenTo'](_0x47a55a,'change:isActionsDropdownOpen',(_0x36ae61,_0x523685,_0x591cf1)=>{if(_0x591cf1)for(const _0x2469ed of _0x274580['listView']['items']){const _0xd7d2c9=_0x2469ed['children']['first'],_0x8f86f9=_0x210a60['find'](_0x253916=>_0x253916['action']===_0xd7d2c9['_action'])['isVisible'];_0x2469ed['isVisible']=void 0x0===_0x8f86f9||_0x8f86f9(_0x47a55a);}}),_0x274580;}const Bt=/* #__PURE__ -- @preserve */
27
- _0x3fd7db(at);var Kt=class extends Bt{['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x141059,_0x85e27b,_0x38e8e8,_0xcc274c){super(_0x141059);const _0x1b4195=this['bindTemplate'],_0x55f09a=function(_0x4e10a8,_0x1bd033){const _0x3b2a45=Array['from'](_0x1bd033['authors'])['filter'](_0x1c0651=>_0x1c0651!=_0x1bd033['creator']);return _0x1bd033['creator']&&_0x3b2a45['unshift'](_0x1bd033['creator']),_0x3b2a45['map'](_0x1cbfd6=>new $t(_0x4e10a8,_0x1cbfd6,_0x1cbfd6==_0x1bd033['creator']));}(_0x141059,_0x85e27b);this['id']=_0x85e27b['id'],this['_revision']=_0x85e27b,this['_requireRevisionName']=_0xcc274c,this['bind']('name','createdAt')['to'](_0x85e27b),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x1e15fb=>{return _0x34a42f=_0x141059['uiLanguage'],(_0x3a8a2e=_0x1e15fb)['toLocaleDateString'](_0x34a42f,{'month':'long','day':'numeric'})+',\x20'+_0x3a8a2e['toLocaleTimeString'](_0x34a42f,{'hour':'numeric','minute':'numeric'});var _0x34a42f,_0x3a8a2e;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new Ft(_0x141059,lt),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x880b1f=>_0x880b1f||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x5d69e9,_0x472421)=>_0x5d69e9&&_0x472421),this['revisionActionsView']=_0x38e8e8&&_0x38e8e8['length']?jt(this,_0x38e8e8):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x1b4195['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x1b4195['if']('isEnabled','ck-disabled',_0x471503=>!_0x471503),_0x1b4195['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x1b4195['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x1b4195['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':_0x1b4195['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':_0x55f09a}]},this['revisionActionsView']],'on':{'click':_0x1b4195['to'](_0x2d536a=>{_0x2d536a['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x3051db=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x3051db,'change',()=>{this['_requireRevisionName']&&!_0x3051db['value']||this['fire']('setName',{'id':this['id'],'name':_0x3051db['value']}),_0x3051db['value']||(_0x3051db['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}};function qt(_0x2e0074,_0x16d998){const _0x5e55ea=ft['fromJSDate'](_0x2e0074)['setLocale'](_0x16d998),_0x2d027e=ft['local'](),_0x528fb0=_0x2d027e['minus']({'days':0x1})['startOf']('day');let _0x5b30ac,_0x5db0d2;return _0x5e55ea['hasSame'](_0x2d027e,'day')?(_0x5b30ac=_0x5e55ea['startOf']('day')['toJSDate'](),_0x5db0d2=_0x5e55ea['toRelativeCalendar']()):_0x5e55ea['hasSame'](_0x528fb0,'day')?(_0x5b30ac=_0x528fb0['toJSDate'](),_0x5db0d2=_0x5e55ea['toRelativeCalendar']()):_0x5e55ea['hasSame'](_0x2d027e,'week')?(_0x5b30ac=_0x5e55ea['startOf']('week')['toJSDate'](),_0x5db0d2=_0x5e55ea['weekdayLong']||''):_0x5e55ea['hasSame'](_0x2d027e,'year')?(_0x5b30ac=_0x5e55ea['startOf']('month')['toJSDate'](),_0x5db0d2=_0x5e55ea['monthLong']||''):(_0x5b30ac=_0x5e55ea['startOf']('year')['toJSDate'](),_0x5db0d2=String(_0x5e55ea['year'])),{'startDate':_0x5b30ac,'localizedPeriodName':_0x5db0d2};}var Gt=class extends at{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x5a295b,_0x56f8c2,_0x4f9ea3,_0x53b14f){super(_0x5a295b);const _0x184037=qt(_0x56f8c2,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x56f8c2,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x4f9ea3,this['_requireRevisionName']=_0x53b14f,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':_0x184037}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x4ec6c3){const _0x2dcf26=new Kt(this['locale'],_0x4ec6c3,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x2dcf26);}['removeRevision'](_0x1743c8){const _0x3fe70e=this['revisionViews']['find'](_0xca0da4=>_0xca0da4['id']===_0x1743c8['id']);this['revisionViews']['remove'](_0x3fe70e);}},Jt=class extends at{constructor(_0x505068){super(_0x505068);const _0x18df66=new _0x35caf5();_0x18df66['content']=_0x3db7bb,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x18df66,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[pt(_0x505068,'Revision\x20history')]}]});}},Wt=class extends at{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x35f1cf,_0x55fce2,_0x3cdfcc,_0x257a74){super(_0x35f1cf);const _0x261c24=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x55fce2,this['_revisionActions']=_0x3cdfcc,this['_requireRevisionName']=_0x257a74,this['on']('select',(_0x438256,_0x1ba6cc)=>{this['fire']('revisionSelected',_0x1ba6cc);}),this['on']('setName',(_0x513ac2,_0xa9dfc1)=>{this['fire']('revisionSetName',_0xa9dfc1);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new Jt(_0x35f1cf),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x261c24['if']('isEnabled','ck-disabled',_0x556b09=>!_0x556b09)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0xe1892d of this['_revisions'])this['_addRevision'](_0xe1892d);this['_revisions']['on']('add',(_0x2b7ca4,_0x1a4cbf)=>{this['_addRevision'](_0x1a4cbf);}),this['_revisions']['on']('remove',(_0x3d9e8f,_0x46074a)=>{this['_removeRevision'](_0x46074a);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x45b42f=>_0x45b42f['revisionViews']['map'](_0x3ce4c2=>_0x3ce4c2))['flat']();}['selectRevision'](_0x3637e6){for(const _0x4ec0ef of this['revisionViews'])_0x3637e6&&_0x3637e6['id']===_0x4ec0ef['id']?_0x4ec0ef['select']():_0x4ec0ef['deselect']();}['highlightRevisions'](_0x1559ba){for(const _0x47fd77 of this['revisionViews'])_0x1559ba['some'](({id:_0x48d10b})=>_0x48d10b===_0x47fd77['id'])?_0x47fd77['highlight']():_0x47fd77['unhighlight']();}['_addRevision'](_0x229548){const _0x5b7098=qt(_0x229548['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x385003=this['_getTimePeriodViewByStartDate'](_0x5b7098);_0x385003||(_0x385003=new Gt(this['locale'],_0x5b7098,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x385003)),_0x385003['addRevision'](_0x229548);}['_removeRevision'](_0x121dbb){const _0xb3489e=qt(_0x121dbb['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0xb3489e)['removeRevision'](_0x121dbb);}['_getTimePeriodViewByStartDate'](_0x166b22){return this['timePeriodViews']['find'](_0x401e31=>_0x401e31['startDate']['getTime']()===_0x166b22['getTime']());}},Yt=class RevisionsSidebar extends _0x27a866{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
23
+ import{CKEditorError as _0x16b9f2,Collection as _0xe1aaa7,ElementReplacer as _0x3c5642,FocusTracker as _0x8acf98,KeystrokeHandler as _0x142511,ObservableMixin as _0x3c8f7b,ResizeObserver as _0x33c34e,logWarning as _0x5bea80,scrollViewportToShowTarget as _0x5b653f,uid as _0x551659}from'@ckeditor/ckeditor5-utils';import{cloneDeep as _0x28481c,isEqual as _0x5a02ed,set as _0x4ce8c3,unset as _0x4bb046}from'es-toolkit/compat';import{Command as _0xe8c052,Editor as _0x354082,ElementApiMixin as _0xbf5d60,PendingActions as _0x5ec6e7,Plugin as _0x592ef7}from'@ckeditor/ckeditor5-core';import{ConfirmMixin as _0x54da09,Users as _0x20176c,getMarkerDomElement as _0x358092,sanitizeEditorConfig as _0x1292c3}from'@ckeditor/ckeditor5-collaboration-core';import{ModelDocumentFragment as _0x2136fb,ModelElement as _0x5ebea3,ModelPosition as _0x2779d2,ModelRange as _0x830771,ModelText as _0x26fa72,ViewAttributeElement as _0x4a7a04,ViewContainerElement as _0x510376,ViewDocumentFragment as _0xf18515,ViewElement as _0x474ff1,ViewEmptyElement as _0xdb2f8d,ViewRawElement as _0xbeeaa5,ViewText as _0xb883c0,ViewUIElement as _0x796ee2}from'@ckeditor/ckeditor5-engine';import{IconChevronDown as _0x445035,IconChevronUp as _0x20110a,IconHistory as _0x5fc2b3,IconThreeVerticalDots as _0xff9c52,IconUndo as _0x53d4c9,IconUser as _0x320df2}from'@ckeditor/ckeditor5-icons';import{BoxedEditorUIView as _0x21ca49,ButtonView as _0x5ab628,ContextualBalloon as _0x3e4519,CssTransitionDisablerMixin as _0x735ba7,EditorUI as _0x3a737f,IconView as _0x52ff68,InlineEditableUIView as _0x27b5d1,LabeledFieldView as _0x1a4e29,ListItemView as _0x3ab91f,ListView as _0x37c124,MenuBarMenuListItemButtonView as _0x5b83fc,MenuBarMenuListItemView as tt,MenuBarMenuListView as it,MenuBarMenuView as et,StickyPanelView as st,ToolbarSeparatorView as nt,ToolbarView as ot,UIModel as rt,View as at,addListToDropdown as ht,createDropdown as ct,createLabeledInputText as lt,normalizeToolbarConfig as ut,submitHandler as dt}from'@ckeditor/ckeditor5-ui';import{DateTime as ft}from'luxon';const vt=/* #__PURE__ -- @preserve */
24
+ _0x3c8f7b();var gt=class extends vt{['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x480cd2){super(),this['id']=_0x480cd2['id']||_0x551659(),this['creator']=_0x480cd2['creator']||null,this['authors']=_0x480cd2['authors']||[],this['diffData']=_0x480cd2['diffData']||null,this['toVersion']=_0x480cd2['toVersion']||0x0,this['fromVersion']=_0x480cd2['fromVersion']||0x0,this['set']('name',_0x480cd2['name']||''),this['set']('createdAt',_0x480cd2['createdAt']||new Date()),this['set']('attributes',_0x480cd2['attributes']||{});}['setName'](_0x1ece2d){this['_update']({'name':_0x1ece2d});}['setAttribute'](_0x41ea21,_0x3c16a8){const _0x17661c=_0x28481c(this['attributes']);_0x4ce8c3(_0x17661c,_0x41ea21,_0x3c16a8),this['_update']({'attributes':_0x17661c});}['removeAttribute'](_0x5db762){const _0x247f1c=_0x28481c(this['attributes']);_0x4bb046(_0x247f1c,_0x5db762),this['_update']({'attributes':_0x247f1c});}['_update'](_0xbdcd2f,_0x43d92f=!0x1){let _0x160a52=!0x1;const _0x1d268a={'id':this['id']};for(const _0x1a16f2 of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x1c0ad4=_0xbdcd2f[_0x1a16f2];void 0x0!==_0x1c0ad4&&_0x1c0ad4!==this[_0x1a16f2]&&(this[_0x1a16f2]=_0x1c0ad4,_0x1d268a[_0x1a16f2]=_0x1c0ad4,_0x160a52=!0x0);}_0x160a52&&(_0x1d268a['authors']&&(_0x1d268a['authorsIds']=_0x1d268a['authors']['map'](_0x2b3147=>_0x2b3147['id']),delete _0x1d268a['authors']),this['fire']('_update',_0x1d268a,_0x43d92f));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x19706f=>_0x19706f['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},mt=class extends _0x592ef7{['_revisions'];static get['requires'](){return[_0x20176c];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x48782e){super(_0x48782e),this['_revisions']=new _0xe1aaa7();}['afterInit'](){!async function(_0x5138de){const _0x5ab9d8='vsmL4TPpuR53MlqSj2VXwH9oEAN8FxJtGUOdbDCZ01ihyfkBQY6acgz7rIeWKn',_0x27c358=0xeb829,_0x2606b5=0x78e88,_0x4aac75=window['Date']['now'](),_0xafa962=_0x5138de['editor'],_0x1c4e99=new window['Promise'](_0x4075b1=>{_0xafa962['once']('ready',_0x4075b1);}),_0x2012dd={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x4979da=_0xafa962['config']['get']('licenseKey');async function _0x239eb3(){let _0x4dd921,_0x5b0df8=null,_0xed885c=null;try{return'GPL'==_0x4979da?'NotAllowed':(_0x4dd921=_0x4f95c9(),_0x4dd921?(_0x4dd921['usageEndpoint']&&(_0xed885c=_0xe25b44(_0x4dd921['usageEndpoint'],_0x4dd921['jti'])),await _0xafd3ac()?_0x435b6e()?_0x50f64d()?'Expired':_0x4722e2()?('evaluation'==_0x4dd921['licenseType']&&(_0x5b0df8=_0x1e0821('EvaluationLimit')),await _0x5e39c7()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x50f64d(){const _0x47e046=['evaluation','trial']['includes'](_0x4dd921['licenseType'])?_0x4aac75/0x3e8:0xe10*_0x2606b5;return _0x4dd921['exp']<_0x47e046;}function _0x435b6e(){const _0x157c3f=_0x4dd921['features'];if(!_0x157c3f)return!0x1;if(_0x157c3f['includes']('*'))return!0x0;if(_0x157c3f['includes']('RH'))return!0x0;if(_0x157c3f['includes']('RRH')){if(_0x5337d1())return!0x0;if(_0x360213()||_0x5b55ff())return!0x0;}return!0x1;}function _0x4722e2(){const _0x2d0955=_0x4dd921['licensedHosts'];if(!_0x2d0955||0x0==_0x2d0955['length'])return!0x0;const {hostname:_0xf92e75}=new URL(window['location']['href']);if(_0x2d0955['includes'](_0xf92e75))return!0x0;const _0x10a163=_0xf92e75['split']('.');return _0x2d0955['filter'](_0x2b7f15=>_0x2b7f15['includes']('*'))['map'](_0x4091dd=>_0x4091dd['split']('.'))['filter'](_0x5df8aa=>_0x5df8aa['length']<=_0x10a163['length'])['map'](_0x1a3de9=>Array(_0x10a163['length']-_0x1a3de9['length'])['fill']('*'===_0x1a3de9[0x0]?'*':'')['concat'](_0x1a3de9))['some'](_0x13072c=>_0x10a163['every']((_0xdba86d,_0x21bdd6)=>_0x13072c[_0x21bdd6]===_0xdba86d||'*'===_0x13072c[_0x21bdd6]));}function _0x5e39c7(){return _0x5b0df8&&_0xed885c?new window['Promise']((_0x149547,_0x1ca553)=>{_0x5b0df8['then'](_0x149547,_0x1ca553),_0xed885c['then'](_0x284025=>{'Valid'!=_0x284025&&_0x149547(_0x284025);},_0x1ca553);}):_0x5b0df8||_0xed885c||'Valid';}}function _0xe25b44(_0x2207b9,_0x364b48){return new window['Promise'](_0x154d6b=>{if(_0x599dc9())return _0x154d6b('Valid');_0xe1317e(),_0xafa962['decorate']('_sendUsageRequest');let _0x3a29bd=!0x1;const _0x4d9b7d=_0x551659();function _0x377c85(_0x227d38){return!!_0x227d38&&('object'==typeof _0x227d38||'function'==typeof _0x227d38)&&'function'==typeof _0x227d38['then']&&'function'==typeof _0x227d38['catch'];}function _0x365b21(_0x44c551){_0x31ec17(_0x44c551)['then'](_0x1bf375=>_0x1bf375&&'ok'==_0x1bf375['status']?_0x5630fd(_0x207ab0(_0x4d9b7d+_0x364b48))!=_0x1bf375['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x758a2=>(_0x42bf65(),_0x758a2),()=>{const _0x29ebe8=_0x25ed2a();return null==_0x29ebe8?(_0x42bf65(),'Valid'):_0x4aac75-_0x29ebe8>0x240c8400?'UsageLimit':'Valid';})['then'](_0x154d6b)['catch'](()=>{_0x154d6b('UsageLimit');});const _0x1cab2b=0x36ee80;function _0x42bf65(){const _0x4671ab='llct-'+_0x5630fd(_0x207ab0(_0x2207b9)),_0x51c907=_0x21269c(_0x5630fd(window['Math']['ceil'](_0x4aac75/_0x1cab2b)));window['localStorage']['setItem'](_0x4671ab,_0x51c907);}function _0x25ed2a(){const _0x312b7e='llct-'+_0x5630fd(_0x207ab0(_0x2207b9)),_0x152fdc=window['localStorage']['getItem'](_0x312b7e);return _0x152fdc?window['parseInt'](_0x21269c(_0x152fdc),0x10)*_0x1cab2b:null;}function _0x31ec17(_0x5204c){return new window['Promise']((_0x42f8df,_0x12e805)=>{_0x5204c['then'](_0x42f8df,_0x12e805),window['setTimeout'](_0x12e805,0x1d4c0);});}}_0xafa962['on']('_sendUsageRequest',(_0x49bba5,_0x58bdf5)=>{if(_0x58bdf5[0x0]!=_0x2207b9)return _0x154d6b('UsageLimit');_0x58bdf5[0x1]={..._0x58bdf5[0x1],'requestId':_0x4d9b7d};},{'priority':'high'}),_0xafa962['on']('_sendUsageRequest',_0x512eec=>{_0x377c85(_0x512eec['return'])&&(_0x3a29bd=!0x0,_0x365b21(_0x512eec['return']));},{'priority':'low'}),_0x1c4e99['then'](()=>{_0x3a29bd||_0x154d6b('UsageLimit');});});function _0x599dc9(){return'auto'==_0xafa962['editing']['view']['_overlayModeHint'];}function _0xe1317e(){_0xafa962['editing']['view']['_overlayModeHint']='auto';}}function _0x1e0821(_0x192a2b){const _0xf127c=[new window['Promise'](_0x30b434=>setTimeout(_0x30b434,0x93ecc)),_0x1c4e99['then'](()=>new window['Promise'](_0x5078d2=>{const _0xfe9de=0x7,_0x2fada0=_0x5138de['_revisions'];function _0x266096(){_0x2fada0['length']>=_0xfe9de&&_0x5078d2();}_0x266096(),_0x2fada0['on']('add',_0x266096);})),new window['Promise'](_0x510807=>{function _0x193f89(){for(const _0xbd76a1 in window)if(window['Number']['isNaN'](window['Number'](_0xbd76a1))&&window[_0xbd76a1]==_0x27c358)return _0x510807();'destroyed'!=_0xafa962['state']&&window['setTimeout'](_0x193f89,0x1388);}_0x18d230('RevisionViewer')&&_0x193f89();})];return window['Promise']['race'](_0xf127c)['then'](()=>_0x192a2b);}async function _0xd3d94a(){if(await _0x1c4e99,_0x18d230('RevisionViewer')){const _0x48049d=_0x5138de['getRevision'](0x0),_0x26f9ea=_0x5138de['getEarlierVisibleRevision'](_0x48049d['id']),_0x1e69a1=_0x5a91cb('RevisionViewer');return await _0x1e69a1['compare'](_0x48049d['id'],_0x26f9ea?_0x26f9ea['id']:null,!0x0),_0x1e69a1['unbind']('isEnabled'),_0x1e69a1['isEnabled']=!0x1,_0x1e69a1['compare']=_0x270320,void(_0x1e69a1['_getDiff']=_0x270320);}if(_0x18d230('RevisionTracker')){const _0xadd4e7=_0x5a91cb('RevisionTracker');_0xadd4e7['unbind']('isEnabled'),_0xadd4e7['isEnabled']=!0x1,_0xadd4e7['update']=_0x270320,_0xadd4e7['saveRevision']=_0x270320;}_0xafa962['model']['change']=_0x270320,_0xafa962['model']['enqueueChange']=_0x270320,_0xafa962['enableReadOnlyMode']('model');}function _0x5337d1(){return _0x18d230('WebSocketGateway')&&'connected'==_0x5a91cb('WebSocketGateway')['state'];}function _0x360213(){return _0x18d230('RevisionViewerIntegration');}function _0x5b55ff(){return _0x18d230('TrackChangesDataGetter');}function _0x37c008(_0xb6b714){const _0x44d200=_0x116920();_0xafa962[_0x44d200]='revisionHistoryLicenseKey'+_0xb6b714,_0xb6b714['endsWith']('Limit')&&(window[_0x116920()]=_0x27c358),'Valid'!=_0xb6b714&&_0xd3d94a();}function _0x116920(){const _0x4ae3e3=window['String'](window['performance']['now']())['replace']('.','');let _0x4b33f9='v';for(let _0x50a8c4=0x0;_0x50a8c4<_0x4ae3e3['length'];_0x50a8c4+=0x2){let _0x254ba1=window['parseInt'](_0x4ae3e3['substring'](_0x50a8c4,_0x50a8c4+0x2));_0x254ba1>=0x3e&&(_0x254ba1-=0x3e),_0x4b33f9+=_0x5ab9d8[_0x254ba1];}return _0x4b33f9;}function _0x4f95c9(){const _0x4e045f=_0x4979da['split']('.');if(0x3!=_0x4e045f['length'])return null;return _0x517ee7(_0x4e045f[0x1]);function _0x517ee7(_0x2b4329){const _0x4cc1b1=_0x3127bf(_0x2b4329);return _0x4cc1b1&&_0x15b4b8()?_0x4cc1b1:null;function _0x15b4b8(){const _0x1bb1fb=_0x4cc1b1['jti'],_0x1fc126=window['parseInt'](_0x1bb1fb['substring'](_0x1bb1fb['length']-0x8),0x10),_0x4b682a={..._0x4cc1b1,'jti':_0x1bb1fb['substring'](0x0,_0x1bb1fb['length']-0x8)};return delete _0x4b682a['vc'],_0x207ab0(_0x4b682a)==_0x1fc126;}}}async function _0xafd3ac(){let _0x5c9378=!0x0;try{const [_0x48badf,_0x4b77f9,_0xab3393]=_0x4979da['split']('.');return _0x437989(_0x48badf),await _0x574003(_0x48badf,_0x4b77f9,_0xab3393),_0x5c9378;}catch{return!0x1;}function _0x437989(_0x54c66d){const _0x4f7249=_0x3127bf(_0x54c66d);_0x4f7249&&'ES256'==_0x4f7249['alg']||(_0x5c9378=!0x1);}async function _0x574003(_0x135f4c,_0x4893b5,_0x41add3){const _0x30462b=window['Uint8Array']['from'](_0x1badaf(_0x41add3),_0x1e9ffa=>_0x1e9ffa['charCodeAt'](0x0)),_0x1044aa=new window['TextEncoder']()['encode'](_0x135f4c+'.'+_0x4893b5),_0x2391fa=window['crypto']['subtle'];if(!_0x2391fa)return;const _0x35f299=await _0x2391fa['importKey']('jwk',_0x2012dd,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x2391fa['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x35f299,_0x30462b,_0x1044aa)||(_0x5c9378=!0x1);}}function _0x3127bf(_0x1fd9f1){return _0x1fd9f1['startsWith']('ey')?JSON['parse'](_0x1badaf(_0x1fd9f1)):null;}function _0x1badaf(_0x24b490){return window['atob'](_0x24b490['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x207ab0(_0xba12cb){let _0x2b5541=0x1505;function _0x5e731b(_0x2561e5){for(let _0x3bddbc=0x0;_0x3bddbc<_0x2561e5['length'];_0x3bddbc++){const _0x23188b=_0x2561e5['charCodeAt'](_0x3bddbc);_0x2b5541=(_0x2b5541<<0x5)+_0x2b5541+_0x23188b,_0x2b5541&=_0x2b5541;}}function _0x125a00(_0xc9fbb2){Array['isArray'](_0xc9fbb2)?_0xc9fbb2['forEach'](_0x125a00):_0xc9fbb2&&'object'==typeof _0xc9fbb2?Object['entries'](_0xc9fbb2)['sort']()['forEach'](([_0x3c6b4d,_0x1c8c4b])=>{_0x5e731b(_0x3c6b4d),_0x125a00(_0x1c8c4b);}):_0x5e731b(window['String'](_0xc9fbb2));}return _0x125a00(_0xba12cb),_0x2b5541>>>0x0;}function _0x5630fd(_0x147aa5){return _0x147aa5['toString'](0x10)['padStart'](0x8,'0');}function _0x21269c(_0x1fd517){return _0x1fd517['split']('')['reverse']()['join']('');}function _0x18d230(_0x26b1db){return _0xafa962['plugins']['has'](_0x26b1db);}function _0x5a91cb(_0x23f5a8){return _0xafa962['plugins']['get'](_0x23f5a8);}function _0x270320(){}_0x37c008(await _0x239eb3());}(this);}['createRevision'](_0xd1e31b){const _0x13b4b7=this['editor']['plugins']['get']('Users');return new gt({'id':_0xd1e31b['id'],'name':_0xd1e31b['name'],'creator':_0xd1e31b['creatorId']?_0x13b4b7['getUser'](_0xd1e31b['creatorId']):null,'diffData':_0xd1e31b['diffData']||_0xd1e31b['data'],'authors':_0xd1e31b['authorsIds']['map'](_0x1550fa=>_0x13b4b7['getUser'](_0x1550fa)),'createdAt':new Date(_0xd1e31b['createdAt']),'attributes':_0xd1e31b['attributes'],'fromVersion':_0xd1e31b['fromVersion'],'toVersion':_0xd1e31b['toVersion']});}['addRevision'](_0x490c91,_0x1fcab7=0x0){this['_revisions']['add'](_0x490c91,_0x1fcab7);}['getRevision'](_0x3b65d1){return this['_revisions']['get'](_0x3b65d1);}['getRevisions'](_0x3f189f={'toJSON':!0x1}){const _0x512f1b=Array['from'](this['_revisions']);return _0x512f1b['reverse'](),_0x3f189f['toJSON']?_0x512f1b['map'](_0x4840cd=>_0x4840cd['toJSON']()):_0x512f1b;}['getIndex'](_0x116b5c){return this['_revisions']['getIndex'](_0x116b5c);}['getEarlierVisibleRevision'](_0x30de49){const [,_0x478cd6]=this['getRevisionsIterator'](_0x30de49,{'direction':'earlier'});return _0x478cd6;}['getLaterVisibleRevision'](_0x167198){const [,_0x1a5040]=this['getRevisionsIterator'](_0x167198,{'direction':'later'});return _0x1a5040;}['getRevisionsInDiff'](_0x10cfe9){const _0xe861ae=[];for(const _0x57f215 of this['getRevisionsIterator'](_0x10cfe9['newRevisionId']))if(_0xe861ae['push'](_0x57f215),_0x57f215['id']===_0x10cfe9['oldRevisionId'])break;return _0xe861ae;}*['getRevisionsIterator'](_0x4ef927,{direction:_0x37359c='earlier',filter:_0x4b3e9a=()=>!0x0}={}){const _0x5a42c1='earlier'===_0x37359c?0x1:-0x1;let _0x188587=this['_revisions']['get'](_0x4ef927),_0xb1898=this['getIndex'](_0x188587);for(yield _0x188587;_0x188587;){if(_0xb1898+=_0x5a42c1,_0x188587=this['getRevision'](_0xb1898),!_0x188587)return;_0x4b3e9a(_0x188587)&&(yield _0x188587);}}},wt=class extends _0x592ef7{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x510376,'c'],[_0x4a7a04,'a'],[_0xdb2f8d,'e'],[_0xbeeaa5,'r'],[_0x796ee2,'u']]);['_typeCharToViewClass']=new Map([['c',_0x510376],['a',_0x4a7a04],['e',_0xdb2f8d],['r',_0xbeeaa5],['u',_0x796ee2]]);async['loadRevisionData'](_0x1a3e55,_0x30f6a9){if(_0x1a3e55['diffData']||!_0x30f6a9)return;const _0x2d457f=this['editor']['config']['get']('collaboration.channelId');_0x1a3e55['diffData']=(await _0x30f6a9['getRevision']({'channelId':_0x2d457f,'revisionId':_0x1a3e55['id']}))['diffData'];}['getRevisionDocumentData'](_0x14a4db){const _0x34ceed={};for(const _0x80ab59 in _0x14a4db['diffData']){if(_0x14a4db['diffData'][_0x80ab59]['attachChange']&&!_0x14a4db['diffData'][_0x80ab59]['attachChange']['isAttached'])continue;const _0x11796d=this['_removeRevisionMarkers'](JSON['parse'](_0x14a4db['diffData'][_0x80ab59]['insertions'])),_0x166332=this['editor']['editing']['view']['document'],_0x252d8b=new _0xf18515(_0x166332,_0x11796d['map'](_0x747c5b=>this['_getViewFromDiffObj'](_0x747c5b,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x34ceed[_0x80ab59]=this['editor']['data']['processor']['toData'](_0x252d8b),this['editor']['data']['processor']['useFillerType']('default');}return _0x34ceed;}['getRevisionRootsAttributes'](_0x5b97dc){const _0xbc53c7={};for(const _0x571a62 in _0x5b97dc['diffData'])_0x5b97dc['diffData'][_0x571a62]['attachChange']&&!_0x5b97dc['diffData'][_0x571a62]['attachChange']['isAttached']||(_0xbc53c7[_0x571a62]=_0x5b97dc['diffData'][_0x571a62]['attributesAfter']||{});return _0xbc53c7;}['getRevisionRootsModelElements'](_0x4feaec){const _0x5a2692={};for(const _0x156579 in _0x4feaec['diffData']){if(_0x4feaec['diffData'][_0x156579]['attachChange']&&!_0x4feaec['diffData'][_0x156579]['attachChange']['isAttached'])continue;const _0x21de39=_0x4feaec['diffData'][_0x156579]['rootElementName'];_0x21de39&&(_0x5a2692[_0x156579]=_0x21de39);}return _0x5a2692;}['_getTypeCharForViewElement'](_0x1b316d){return this['_viewClassToTypeChar']['get'](_0x1b316d['constructor']);}['_getViewFromDiffObj'](_0x2bf8c2,_0x240d1d){const _0x38fab9=this['editor']['editing']['view']['document'];if('string'==typeof _0x2bf8c2)return new _0xb883c0(_0x38fab9,_0x2bf8c2);{let _0x56248b,_0x51609a;_0x51609a='u'==_0x2bf8c2['type']||'r'==_0x2bf8c2['type']?[]:_0x2bf8c2['children']['map'](_0xa4e087=>this['_getViewFromDiffObj'](_0xa4e087,_0x240d1d));const _0x428362=this['_typeCharToViewClass']['get'](_0x2bf8c2['type'])||_0x474ff1,_0x220435=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x56248b=new _0x428362(_0x38fab9,_0x2bf8c2['name'],_0x2bf8c2['attributes'],_0x51609a),'u'==_0x2bf8c2['type']&&_0x2bf8c2['children'][0x0]){const _0x12b39c=_0x2bf8c2['children'][0x0];if(_0x56248b['render']=function(_0x205900){const _0x4dc9fb=_0x205900['createElement']('div');return _0x4dc9fb['innerHTML']=_0x12b39c,_0x4dc9fb['childNodes'][0x0];},_0x240d1d){const _0x9aa0db=new _0xf18515(_0x38fab9);_0x9aa0db['_appendChild'](_0x56248b);const _0x45af94=Array['from'](_0x220435['viewChildrenToDom'](_0x9aa0db,{'bind':!0x1})),_0x545136=_0x220435['domDocument']['createElement']('div');_0x545136['append'](..._0x45af94),_0x56248b=Array['from'](_0x220435['domChildrenToView'](_0x545136))[0x0];}}else{if('r'==_0x2bf8c2['type']&&_0x2bf8c2['children'][0x0]){const _0x1785bf=_0x2bf8c2['children'][0x0];if(_0x56248b['render']=function(_0x3b9865){_0x3b9865['innerHTML']=_0x1785bf;},_0x240d1d){const _0x13c4ad=new _0xf18515(_0x38fab9);_0x13c4ad['_appendChild'](_0x56248b);const _0xac7cc7=Array['from'](_0x220435['viewChildrenToDom'](_0x13c4ad,{'bind':!0x1})),_0x3be223=_0x220435['domDocument']['createElement']('div');_0x3be223['append'](..._0xac7cc7);const _0x274600=Array['from'](_0x220435['domChildrenToView'](_0x3be223));_0x274600['length']>0x1?_0x56248b['_appendChild'](_0x274600):_0x56248b=_0x274600[0x0];}}}if(_0x2bf8c2['customProperties']){for(const [_0xd7a26f,_0x3deaae]of _0x2bf8c2['customProperties'])_0x56248b['_setCustomProperty'](_0xd7a26f,_0x3deaae);}const _0xa01d57=void 0x0===_0x2bf8c2['fillerOffset']?null:_0x2bf8c2['fillerOffset'];return null!==_0xa01d57&&(_0x56248b['getFillerOffset']=()=>_0xa01d57),_0x56248b;}}['_makeModelFromViewString'](_0x533ff0,_0x519e78){const _0x427a55=JSON['parse'](_0x533ff0),_0x26079d=this['editor']['editing']['view']['document'],_0x30c0d0=new _0xf18515(_0x26079d,_0x427a55['map'](_0x35f8cf=>this['_getViewFromDiffObj'](_0x35f8cf,!0x0))),_0x4fa88d=this['editor']['data']['toModel'](_0x30c0d0,_0x519e78);return _0x4fa88d['name']=_0x519e78,_0x4fa88d;}['_removeRevisionMarkers'](_0x2fd75a){return(_0x2fd75a=_0x2fd75a['filter'](_0x180a50=>!_0x180a50['name']||'revision-start'!==_0x180a50['name']&&'revision-end'!==_0x180a50['name']))['forEach'](_0x3f278d=>{'string'!=typeof _0x3f278d&&(_0x3f278d['children']=this['_removeRevisionMarkers'](_0x3f278d['children']),_0x3f278d['attributes']=_0x3f278d['attributes']['filter'](_0xb5b406=>!_0xb5b406[0x0]['startsWith']('data-revision-')));}),_0x2fd75a;}};function pt(_0x792c52,_0x16dad9,_0x2072d4){const t=_0x792c52['t'];switch(_0x16dad9){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'},_0x2072d4);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x2072d4);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'';}}var _t=class extends _0x592ef7{['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[_0x20176c,mt,wt,_0x5ec6e7];}constructor(_0x512618){super(_0x512618),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new yt(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x208512=_0x551659();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x208512},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 _0x266481=this['repository']['getRevision'](0x0),_0x5d67b5=_0x266481&&null===_0x266481['creator']?_0x266481:null;if(this['_continueCurrentRevision']=!!_0x5d67b5&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x521601=this['_source']['getCurrentRevisionId'](),_0x3b3ff7=this['repository']['getRevision'](_0x521601);if(_0x3b3ff7)this['_startingVersion']=_0x3b3ff7['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x22a864=this['_source']['history']['_operations']['find'](_0x215f6e=>!_0x215f6e['_isInit']),_0x52d6b9=_0x22a864?_0x22a864['baseVersion']:this['_source']['history']['version'];_0x266481?(_0x266481['toVersion']<_0x52d6b9&&_0x266481['_update']({'toVersion':_0x52d6b9}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x5d67b5['id'],this['_startingVersion']=_0x5d67b5['fromVersion']):(this['_startingVersion']=_0x266481['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x52d6b9,this['_continueCurrentRevision']=!0x1);}}else _0x5d67b5&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x5d67b5['toVersion'],this['editor']['model']['document']['history']['version']),_0x5d67b5['fromVersion']===_0x5d67b5['toVersion']?(0x0!==_0x5d67b5['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x5d67b5['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x5d67b5['id'],this['_startingVersion']=_0x5d67b5['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',_0xed9968=>!_0xed9968),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x115a85=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4b58a5;for(const _0x3b29cb in _0x115a85){const _0x29300e=_0x3b29cb,_0x2e7f2b=_0x115a85[_0x29300e];if('revisionHistoryLicenseKeyValid'==_0x2e7f2b||'revisionHistoryLicenseKeyInvalid'==_0x2e7f2b||'revisionHistoryLicenseKeyExpired'==_0x2e7f2b||'revisionHistoryLicenseKeyDomainLimit'==_0x2e7f2b||'revisionHistoryLicenseKeyNotAllowed'==_0x2e7f2b||'revisionHistoryLicenseKeyEvaluationLimit'==_0x2e7f2b||'revisionHistoryLicenseKeyUsageLimit'==_0x2e7f2b){delete _0x115a85[_0x29300e],_0x4b58a5=_0x2e7f2b,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x4b58a5&&_0x115a85['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x4b58a5&&_0x115a85['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x4b58a5&&_0x115a85['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x4b58a5&&_0x115a85['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x4b58a5&&_0x115a85['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x4b58a5&&_0x115a85['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x41c297=this['repository']['getRevision'](0x0),_0x237cee=await this['getRevisionDocumentData'](_0x41c297),_0x593cf4=await this['getRevisionRootsAttributes'](_0x41c297),_0x1c2a13=this['_utils']['getRevisionRootsModelElements'](_0x41c297);this['_replaceEditorDataWithRevisionData'](_0x237cee,_0x593cf4,_0x1c2a13);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x17ee4b){this['_source']=_0x17ee4b;}async['update'](){const _0x1ed0c9=await this['_source']['getLatestVersion']();if(_0x1ed0c9>this['currentRevision']['toVersion']){await this['_loadState']();const _0x7bd263=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x1ed0c9});_0x7bd263['authors']=_0x7bd263['authorsIds']['map'](_0xefe28a=>this['editor']['plugins']['get']('Users')['getUser'](_0xefe28a)),this['currentRevision']['_update'](_0x7bd263);}}async['saveRevision'](_0x5d0606={},_0x2be6a7=null){const _0x11b74b=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x2be6a7>this['currentRevision']['toVersion']&&(_0x2be6a7=null),null===_0x2be6a7&&(_0x2be6a7=await this['_source']['getLatestVersion']());const _0x698a1c=this['_getFromVersion'](_0x2be6a7),_0x4aa778=this['buildRevisionData']({'from':_0x698a1c,'to':_0x2be6a7});if(this['currentRevision']['toVersion']<_0x2be6a7){const _0x4431b1=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x2be6a7,'to':_0x2be6a7});_0x4431b1['authors']=[],_0x4431b1['authorsIds']=[],_0x4431b1['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x4431b1,!0x0),delete _0x4431b1['authors'],_0x11b74b['push'](_0x4431b1);}_0x5d0606['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x5d0606['name']=_0x5d0606['name']||null,_0x5d0606['id']=_0x5d0606['id']||_0x551659(),_0x5d0606={..._0x5d0606,..._0x4aa778};const _0x440277=this['addRevisionData'](_0x5d0606);_0x11b74b['push'](_0x5d0606);const _0x2eddfa=this['repository']['getIndex'](_0x440277);if(0x0!==_0x2eddfa){const _0x164956=this['repository']['getRevision'](_0x2eddfa-0x1);if(_0x164956['fromVersion']!==_0x2be6a7){const _0x3cdd29=this['_revisionDataBuilder']['getData'](_0x2be6a7,_0x164956['toVersion']),_0x3c7304={'id':_0x164956['id'],'diffData':_0x3cdd29['diffData'],'authorsIds':_0x3cdd29['authorsIds'],'authors':_0x3cdd29['authorsIds']['map'](_0x3c134a=>this['editor']['plugins']['get']('Users')['getUser'](_0x3c134a)),'fromVersion':_0x2be6a7};_0x164956===this['currentRevision']&&(_0x3c7304['createdAt']=new Date(_0x5d0606['createdAt']['getTime']()+0xa)),_0x164956['_update'](_0x3c7304,!0x0),delete _0x3c7304['authors'],_0x11b74b['push'](_0x3c7304);}}if(this['adapter']){for(const _0x4ae784 of _0x11b74b)this['_bufferUpdate'](_0x4ae784['id'],_0x4ae784,!0x0);this['sendBufferedUpdates']();}return _0x440277;}['addRevisionData'](_0x2ca9c6){const _0x6026d6=this['repository']['createRevision'](_0x2ca9c6);return this['adapter']&&_0x6026d6['on']('_update',(_0x4ca9f6,_0x55afec,_0x165df7)=>{_0x165df7||(this['_bufferUpdate'](_0x55afec['id'],_0x55afec,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x6026d6,this['_findInsertionIndex'](_0x6026d6)),_0x6026d6;}async['getRevisionDocumentData'](_0x500c21){return await this['_utils']['loadRevisionData'](_0x500c21,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x500c21);}async['getRevisionRootsAttributes'](_0x42555f){return await this['_utils']['loadRevisionData'](_0x42555f,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x42555f);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x49fb78=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x1edd29=0x0;_0x1edd29<_0x49fb78['length'];_0x1edd29++){const _0x3c8877=_0x49fb78[_0x1edd29];let _0x13eadc=!0x1;for(const _0x36232f of Object['keys'](_0x3c8877))void 0x0===_0x3c8877[_0x36232f]?delete _0x3c8877[_0x36232f]:'id'!==_0x36232f&&(_0x13eadc=!0x0);_0x13eadc||(_0x49fb78[_0x1edd29]=null);}if(_0x49fb78=_0x49fb78['filter'](_0x2bd582=>null!==_0x2bd582),!_0x49fb78['length'])return;for(let _0x1a14a4=0x0;_0x1a14a4<_0x49fb78['length'];_0x1a14a4++){const _0xc490be=_0x49fb78[_0x1a14a4];void 0x0!==_0xc490be['fromVersion']&&void 0x0===_0xc490be['toVersion']&&(_0xc490be['toVersion']=this['repository']['getRevision'](_0xc490be['id'])['toVersion']),void 0x0!==_0xc490be['toVersion']&&void 0x0===_0xc490be['fromVersion']&&(_0xc490be['fromVersion']=this['repository']['getRevision'](_0xc490be['id'])['fromVersion']);}const _0x38778e=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x49fb78,_0x38778e)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x1893d5=>{if(_0x1893d5){for(const _0x181fca of _0x1893d5)this['setRevisionData']({'id':_0x181fca['id'],'createdAt':_0x181fca['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x4fd60c=null,from:_0x4ea67d=null,to:_0x5f3db2=null}){_0x4ea67d=null!==_0x4ea67d?_0x4ea67d:_0x4fd60c['fromVersion'],_0x5f3db2=null!==_0x5f3db2?_0x5f3db2:_0x4fd60c['toVersion'];const _0x5bd6b6=this['_revisionDataBuilder']['getData'](_0x4ea67d,_0x5f3db2),_0x266fbe={'diffData':_0x5bd6b6['diffData'],'authorsIds':_0x5bd6b6['authorsIds'],'fromVersion':_0x4ea67d,'toVersion':_0x5f3db2};if(!_0x4fd60c||_0x5f3db2!==_0x4fd60c['toVersion']){const _0x1e375c=_0x5f3db2-0x1,_0x7609e1=this['_source']['history']['getOperation'](_0x1e375c);_0x266fbe['createdAt']=_0x7609e1&&_0x7609e1['createdAt']||new Date();}if(this['_loadedStateData']&&_0x4ea67d===this['_loadedStateData']['fromVersion']){for(const _0x22c88d of this['_loadedStateData']['authors'])_0x266fbe['authorsIds']['includes'](_0x22c88d['id'])||_0x266fbe['authorsIds']['push'](_0x22c88d['id']);}return _0x266fbe;}['_bufferUpdate'](_0x5ef383,_0x516eb9,_0x1157ef){if(this['_bufferedUpdates']['has'](_0x5ef383)){const _0x1763ce=this['_bufferedUpdates']['get'](_0x5ef383);_0x516eb9=_0x1157ef?{..._0x1763ce,..._0x516eb9}:{..._0x516eb9,..._0x1763ce};}this['_bufferedUpdates']['set'](_0x5ef383,_0x516eb9);}['setRevisionData'](_0x551468){const _0x49373f=this['repository']['getRevision'](_0x551468['id']);if(_0x551468['createdAt']&&(_0x551468['createdAt']=new Date(_0x551468['createdAt'])),_0x551468['authorsIds']){const _0x3af043=this['editor']['plugins']['get']('Users');_0x551468['authors']=_0x551468['authorsIds']['map'](_0x2dd865=>_0x3af043['getUser'](_0x2dd865));}_0x49373f['_update'](_0x551468,!0x0);}['_createInitialRevision'](_0x710b20){const _0x58d647=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x58d647)this['_initialRevisionId']=_0x58d647['id'];else{const _0x181edb=!this['editor']['model']['document']['roots']['find'](_0x5c5541=>this['editor']['model']['hasContent'](_0x5c5541)),_0x5a1e4f=this['editor']['plugins']['get']('Users')['me']['id'],_0x474f64=pt(this['editor']['locale'],_0x181edb?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x710b20,'to':_0x710b20,'id':this['_initialRevisionId'],'name':_0x474f64,'creatorId':_0x5a1e4f});}}['_createCurrentRevision'](_0x1e90a0){const _0x278a7c=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x278a7c),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x1e90a0,'to':_0x1e90a0,'id':_0x278a7c,'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'](_0x45cc4c,_0x4c1f57,_0x41654e){const _0x4bf325={},_0x1d3edc={},_0x4d1c38={},_0x5846bc=this['editor']['config']['get']('roots')||{};for(const [_0x327645,_0xfebdf1]of Object['entries'](_0x5846bc))_0xfebdf1['lazyLoad']||(_0x4bf325[_0x327645]=_0xfebdf1['initialData']??'',_0x1d3edc[_0x327645]=_0xfebdf1['modelAttributes']||{},_0xfebdf1['modelElement']&&(_0x4d1c38[_0x327645]=_0xfebdf1['modelElement']));for(const _0x43e55c of this['editor']['model']['document']['getRootNames']())_0x4bf325[_0x43e55c]??='',_0x1d3edc[_0x43e55c]??={};let _0xfd847e=!0x1;const _0x43dcec=Object['keys'](_0x4bf325),_0x3a7041=Object['keys'](_0x45cc4c);for(const _0xd97a95 of _0x43dcec){if(_0x4bf325[_0xd97a95]!==_0x45cc4c[_0xd97a95]&&''!==_0x4bf325[_0xd97a95]['trim']()){_0xfd847e=!0x0;break;}if(!_0x5a02ed(_0x1d3edc[_0xd97a95],_0x4c1f57[_0xd97a95])&&Object['keys'](_0x1d3edc[_0xd97a95])['length']>0x0){_0xfd847e=!0x0;break;}const _0x12707f=_0x4d1c38[_0xd97a95],_0x49ddf1=_0x41654e[_0xd97a95];if(_0x12707f&&_0x49ddf1&&_0x12707f!==_0x49ddf1){_0xfd847e=!0x0;break;}}_0xfd847e||(_0xfd847e=_0x3a7041['some'](_0x3c9e5a=>!this['editor']['model']['document']['getRoot'](_0x3c9e5a))),_0xfd847e&&_0x5bea80('editor-initial-data-replaced-with-revision-data',{'editorData':_0x4bf325,'editorRootsAttributes':_0x1d3edc,'editorRootsModelElements':_0x4d1c38,'revisionData':_0x45cc4c,'revisionRootsAttributes':_0x4c1f57,'revisionRootsModelElements':_0x41654e});for(const [_0x2c4c02,_0x2dc4f9]of Object['entries'](_0x45cc4c))this['editor']['config']['set']('roots.'+_0x2c4c02+'.initialData',_0x2dc4f9);for(const [_0x2ee9ba,_0x44bcc7]of Object['entries'](_0x4c1f57))this['editor']['config']['set']('roots.'+_0x2ee9ba+'.modelAttributes',_0x44bcc7);const _0x277eba=this['editor']['model']['document'];for(const [_0x292058,_0x4baf7d]of Object['entries'](_0x41654e)){this['editor']['config']['set']('roots.'+_0x292058+'.modelElement',_0x4baf7d);const _0x328306=_0x277eba['getRoot'](_0x292058);_0x328306&&_0x328306['name']!==_0x4baf7d&&(_0x277eba['roots']['remove'](_0x292058),_0x277eba['createRoot'](_0x4baf7d,_0x292058));}}['_addPendingAction'](){if(!this['_pendingAction']){const _0x22a411=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x22a411['add'](pt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x297d33){const _0x1288d4=this['repository']['getRevisions']();_0x1288d4['reverse']();let _0xd8325=0x0;for(;_0xd8325<_0x1288d4['length'];){const _0x17ae40=_0x1288d4[_0xd8325];if(_0x17ae40===this['currentRevision']){_0xd8325++;continue;}if(_0x17ae40['id']===this['_initialRevisionId'])break;const _0x1047fa=_0x297d33['toVersion']-_0x17ae40['toVersion']||_0x297d33['fromVersion']-_0x17ae40['fromVersion'];if(_0x1047fa>0x0)break;if(_0x1047fa<0x0)_0xd8325++;else{if(!_0x297d33['creator']&&_0x17ae40['creator'])break;if(_0x17ae40['creator']||!_0x297d33['creator']){if(_0x297d33['createdAt']>_0x17ae40['createdAt'])break;_0xd8325++;}else _0xd8325++;}}return _0xd8325;}['_getFromVersion'](_0x56894f){const _0x572b15=this['repository']['getRevisions']();_0x572b15['reverse'](),_0x572b15['shift']();const _0x31fbb3=_0x572b15['find'](_0x1eb229=>_0x1eb229['toVersion']<=_0x56894f)['toVersion'];return _0x31fbb3<this['_startingVersion']?this['_startingVersion']:_0x31fbb3;}['_makeRevision']({name:_0x2e452b,from:_0x561642,to:_0x5f0f51,creatorId:_0xb6ffc4,id:_0x2867bf}){const _0x5d79c7=this['buildRevisionData']({'from':_0x561642,'to':_0x5f0f51});_0x5d79c7['name']=_0x2e452b,_0x5d79c7['creatorId']=_0xb6ffc4,_0x5d79c7['id']=_0x2867bf;const _0x439e92=this['addRevisionData'](_0x5d79c7);return this['adapter']&&this['_bufferUpdate'](_0x5d79c7['id'],_0x5d79c7,!0x0),_0x439e92;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}},yt=class{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x5184fb){this['editor']=_0x5184fb,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'](_0x3faf84){this['source']=_0x3faf84;const _0x1f08d3=new Map(),_0x59ae01=new Map(),_0x4240da=this['editor']['model']['document']['roots']['map'](_0x4975ff=>_0x4975ff['rootName']);for(const _0x480970 of _0x4240da){const _0x280895=this['editor']['model']['document']['getRoot'](_0x480970),_0x1fa3a3=bt(_0x280895);_0x1f08d3['set'](_0x480970,_0x1fa3a3),_0x59ae01['set'](_0x480970,Object['fromEntries'](_0x280895['getAttributes']()));}const _0x2c9308=Array['from'](this['editor']['model']['markers'])['map'](_0x3a3294=>[_0x3a3294['name'],_0x3a3294['getRange']()]),_0x4cec5f=this['source']['version'];this['_saveMetaData'](_0x4cec5f,_0x1f08d3,_0x2c9308,_0x59ae01),this['_startingRevisionId']=this['_revisionId'];const _0x58fa16=new Map(),_0x3c9ff8=new Map();for(const _0x26c751 of _0x4240da){const _0x1fea7e=Rt(_0x26c751,this['editor']['model']['document']['getRoot'](_0x26c751)['name']);_0x58fa16['set'](_0x26c751,_0x1fea7e),_0x3c9ff8['set'](_0x26c751,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x58fa16,[],_0x3c9ff8);}['getData'](_0x593c09,_0x22edbd){if(this['_lastFrom']===_0x593c09&&this['_lastTo']<=_0x22edbd)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x22edbd,!0x0);else{if(!this['_savedMetaData']['has'](_0x593c09)){const _0x3006c5=this['_getPreviousFrom'](_0x593c09);this['_calculateMetaData'](_0x3006c5,_0x593c09,!0x1);}this['_calculateMetaData'](_0x593c09,_0x22edbd,!0x0);}return this['_lastFrom']=_0x593c09,this['_lastTo']=_0x22edbd,this['_getState']();}['loadState'](_0x4dc660){if(!this['_savedMetaData']['has'](_0x4dc660['fromVersion'])){const _0x5b9c14=this['_getPreviousFrom'](_0x4dc660['fromVersion']);this['_calculateMetaData'](_0x5b9c14,_0x4dc660['fromVersion'],!0x1);}this['_calculateMetaData'](_0x4dc660['fromVersion'],_0x4dc660['toVersion'],!0x1);const _0x14bd90=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x4dc660['fromVersion'],this['_lastTo']=_0x4dc660['toVersion'];for(const _0x1f8ae2 in _0x4dc660['diffData']){const _0x2d088a=_0x4dc660['diffData'][_0x1f8ae2]['attachChange'],_0x457588=_0x28481c(_0x4dc660['diffData'][_0x1f8ae2]['attributesBefore'])||{},_0x37ea14=_0x4dc660['diffData'][_0x1f8ae2],_0x33089b=_0x14bd90['_makeModelFromViewString'](_0x37ea14['deletions'],_0x37ea14['rootElementName']||'$root');_0x33089b['rootName']=_0x1f8ae2,_0x33089b['_isAttached']=!_0x2d088a||!_0x2d088a['isAttached'],_0x33089b['isAttached']=()=>_0x33089b['_isAttached'],this['_baseRoots']['set'](_0x1f8ae2,_0x33089b),this['_baseRootsAttributes']['set'](_0x1f8ae2,_0x457588),_0x2d088a&&this['_touchedRoots']['set'](_0x1f8ae2,_0x2d088a);const _0x3e8dd1=this['_makeIdsRoot'](_0x33089b);this['_baseIdsRoots']['set'](_0x1f8ae2,_0x3e8dd1);for(const [_0xa5c1ec,_0xb4ce97]of _0x33089b['markers']){if(!_0xa5c1ec['startsWith']('revision:'))continue;const _0x5148a0=_0xa5c1ec['split'](':')[0x2];for(const _0x3a0a28 of _0xb4ce97['getWalker']({'singleCharacters':!0x0})){const _0x36cb7b=this['_getVidAttributeName'](_0x3a0a28),_0x4f1cbd='elementEnd'==_0x3a0a28['type']?_0x3a0a28['previousPosition']['path']['slice'](0x0,-0x1):_0x3a0a28['previousPosition']['path'],_0x3fc410=_0x3e8dd1['getNodeByPath'](_0x4f1cbd)['getAttribute'](_0x36cb7b);this['_touched']['set'](_0x3fc410,{'userId':_0x5148a0});}_0x33089b['markers']['delete'](_0xa5c1ec);}}this['_startingRevisionId']=this['_revisionId'];const _0x88caf9=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0xde9064=>!this['_touched']['has'](_0xde9064));let _0x58a725=0x0;const _0x17ad1f=new Map();for(const _0x5c9eb0 in _0x4dc660['diffData']){const _0x173814=_0x4dc660['diffData'][_0x5c9eb0]['attachChange'],_0x5137ee=_0x28481c(_0x4dc660['diffData'][_0x5c9eb0]['attributesAfter'])||{},_0x3d08ae=_0x4dc660['diffData'][_0x5c9eb0],_0x4fcb37=_0x14bd90['_makeModelFromViewString'](_0x3d08ae['insertions'],_0x3d08ae['rootElementName']||'$root');_0x4fcb37['rootName']=_0x5c9eb0,_0x4fcb37['_isAttached']=!_0x173814||_0x173814['isAttached'],_0x4fcb37['isAttached']=()=>_0x4fcb37['_isAttached'],this['_diffRoots']['set'](_0x5c9eb0,_0x4fcb37),this['_diffRootsAttributes']['set'](_0x5c9eb0,_0x5137ee);const _0x4a1919=this['_makeIdsRoot'](_0x4fcb37,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x5c9eb0,_0x4a1919),_0x17ad1f['set'](_0x5c9eb0,_0x4fcb37['isAttached']()?_0x5137ee:{});for(const [_0x43357b,_0x2e8389]of _0x4fcb37['markers']){if(!_0x43357b['startsWith']('revision:'))continue;const _0x2ff519=_0x43357b['split'](':')[0x2];for(const _0xe576c0 of _0x2e8389['getWalker']({'singleCharacters':!0x0})){const _0x38288e=this['_getVidAttributeName'](_0xe576c0),_0x522013=this['_revisionId']++,_0x2c35ec='elementEnd'==_0xe576c0['type']?_0xe576c0['previousPosition']['path']['slice'](0x0,-0x1):_0xe576c0['previousPosition']['path'];_0x4a1919['getNodeByPath'](_0x2c35ec)['_setAttribute'](_0x38288e,_0x522013),this['_touched']['set'](_0x522013,{'userId':_0x2ff519});}_0x4fcb37['markers']['delete'](_0x43357b);}for(const _0x19d456 of this['editor']['model']['createRangeIn'](_0x4fcb37)['getWalker']({'singleCharacters':!0x0})){const _0x21f6ef=this['_getVidAttributeName'](_0x19d456),_0x245345='elementEnd'==_0x19d456['type']?_0x19d456['previousPosition']['path']['slice'](0x0,-0x1):_0x19d456['previousPosition']['path'],_0x4f7ef0=_0x4a1919['getNodeByPath'](_0x245345);_0x4f7ef0['getAttribute'](_0x21f6ef)>0x0||_0x4f7ef0['_setAttribute'](_0x21f6ef,_0x88caf9[_0x58a725++]);}for(const [_0x1f0927,_0x3a2856]of _0x4fcb37['markers'])_0x1f0927['startsWith']('revision:')||this['_markers']['set'](_0x1f0927,_0x3a2856);}const {roots:_0x350e72}=this['_savedMetaData']['get'](_0x4dc660['fromVersion']),{roots:_0x5021ba}=this['_savedMetaData']['get'](_0x4dc660['toVersion']),_0x480a11=bt(_0x350e72['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x480a11),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x480a11,Number['NEGATIVE_INFINITY']));const _0x163583=bt(_0x5021ba['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x163583),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x163583));const _0x5bada7=Array['from'](this['_diffRoots'])['map'](([_0x3b280f,_0x462d41])=>[_0x3b280f,bt(_0x462d41)]);this['_saveMetaData'](this['_lastTo'],_0x5bada7,this['_markers'],_0x17ad1f);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x45315a,_0x515374,_0x582283,_0x377bd8){const _0x590519=new Map(_0x515374),_0x3d2f68=new Map(_0x28481c(_0x377bd8)),_0x314dbc=new Map();for(const [_0x265276,_0x4ea9cd]of _0x582283)_0x314dbc['set'](_0x265276,{'start':_0x4ea9cd['start']['clone'](),'end':_0x4ea9cd['end']['clone'](),'rootName':_0x4ea9cd['root']['rootName']});this['_savedMetaData']['set'](_0x45315a,{'roots':_0x590519,'markers':_0x314dbc,'rootsAttributes':_0x3d2f68});}['_removeMetaData'](_0x20311b){this['_savedMetaData']['delete'](_0x20311b);}['_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'](_0x46d3d7,_0x5403ea=null){let _0x362ceb=null;_0x46d3d7['is']('documentFragment')||(_0x362ceb=new _0x5ebea3(_0x46d3d7['name'],{'vid_start':null===_0x5403ea?this['_revisionId']++:_0x5403ea++}));const _0x2907c0=[];for(const _0xfc5efc of _0x46d3d7['getChildren']())if(_0xfc5efc['is']('element')){_0x2907c0['push'](this['_makeIdsRoot'](_0xfc5efc,_0x5403ea));const _0x10f22b=_0x2907c0[_0x2907c0['length']-0x1];null!==_0x5403ea&&(_0x5403ea=_0x10f22b['is']('element','$text')?_0x10f22b['getAttribute']('vid')+0x1:_0x10f22b['getAttribute']('vid_end')+0x1);}else{for(let _0x4ef7fa=0x0;_0x4ef7fa<_0xfc5efc['offsetSize'];_0x4ef7fa++)_0x2907c0['push'](new _0x5ebea3('$text',{'vid':null===_0x5403ea?this['_revisionId']++:_0x5403ea++}));}if(_0x46d3d7['is']('documentFragment')){const _0x2a1b6b=Rt(_0x46d3d7['rootName'],_0x46d3d7['name']);return _0x2a1b6b['_insertChild'](0x0,_0x2907c0),_0x2a1b6b;}return _0x362ceb['_setAttribute']('vid_end',null===_0x5403ea?this['_revisionId']++:_0x5403ea++),_0x362ceb['_insertChild'](0x0,_0x2907c0),_0x362ceb;}['_calculateMetaData'](_0x499b8c,_0x2dcd5a,_0x103337){this['_reset']();const {roots:_0x25ee2e,markers:_0x1325e7,rootsAttributes:_0x3e48a3}=this['_savedMetaData']['get'](_0x499b8c);this['_baseRoots']=new Map(_0x25ee2e),this['_baseRootsAttributes']=new Map(_0x28481c(_0x3e48a3));for(const [_0xa5810f,_0x19fcc6]of this['_baseRoots'])if('$graveyard'!==_0xa5810f&&(this['_diffRoots']['set'](_0xa5810f,bt(_0x19fcc6)),this['_diffRootsAttributes']=new Map(_0x28481c(_0x3e48a3)),_0x103337)){const _0x3faef4=this['_revisionId'];this['_idsRoots']['set'](_0xa5810f,this['_makeIdsRoot'](_0x19fcc6)),this['_baseIdsRoots']['set'](_0xa5810f,this['_makeIdsRoot'](_0x19fcc6,_0x3faef4));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',bt(this['_baseRoots']['get']('$graveyard'))),_0x103337&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x82e6b0,_0x5509ee]of _0x1325e7){const _0x532a0e=this['_baseRoots']['get'](_0x5509ee['rootName']),_0x238a4d=this['_diffRoots']['get'](_0x5509ee['rootName']),_0x3efb20=new _0x830771(this['_fixPosition'](_0x5509ee['start'],_0x532a0e),this['_fixPosition'](_0x5509ee['end'],_0x532a0e)),_0xa93dea=this['_fixRange'](_0x3efb20,_0x238a4d);_0x532a0e['markers']['set'](_0x82e6b0,_0x3efb20),this['_markers']['set'](_0x82e6b0,_0xa93dea);}this['_applyOperations'](_0x499b8c,_0x2dcd5a,_0x103337);}['_applyOperations'](_0x98010d,_0x503610,_0x1ff853){for(const _0xcbeec3 of this['source']['getOperations'](_0x98010d,_0x503610))this['_handleOperation'](_0xcbeec3,_0x1ff853);for(const _0x480018 of this['_diffRoots']['values']())_0x480018['markers']['clear']();for(const [_0x3a0e1f,_0xc6d11]of this['_markers'])this['_diffRoots']['get'](_0xc6d11['root']['rootName'])['markers']['set'](_0x3a0e1f,_0xc6d11['clone']());const _0x1b5958=new Map(),_0x39beab=new Map();for(const [_0x65914b,_0x457726]of this['_diffRoots'])_0x1b5958['set'](_0x65914b,bt(_0x457726)),_0x39beab['set'](_0x65914b,this['_diffRootsAttributes']['get'](_0x65914b));this['_saveMetaData'](_0x503610,_0x1b5958,this['_markers'],_0x39beab);}['_getPreviousFrom'](_0x4e1d78){const _0x4894c8=Array['from'](this['_savedMetaData']['keys']());_0x4894c8['sort']((_0x30f183,_0x79860d)=>_0x30f183-_0x79860d),_0x4894c8['reverse']();for(const _0x457472 of _0x4894c8)if(_0x457472<_0x4e1d78)return _0x457472;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x4d41cd,_0x23682d){const _0x5aa15b=Array['from'](_0x23682d['markers'])['map'](([_0x2e305e,_0x1e734b])=>[_0x2e305e,this['_fixRange'](_0x1e734b,_0x4d41cd)]);_0x4d41cd['markers']=new Map(_0x5aa15b);}['_transformMarkers'](_0x236a1c){for(const _0x417cbd of this['_markers']['values']()){const _0x11d21c=_0x417cbd['getTransformedByOperation'](_0x236a1c),_0x40bde8=_0x830771['_createFromRanges'](_0x11d21c);_0x417cbd['start']=_0x40bde8['start'],_0x417cbd['end']=_0x40bde8['end'];}}['_handleOperation'](_0x1441c1,_0x24030a){if('addRoot'!=_0x1441c1['type']&&'detachRoot'!=_0x1441c1['type']){if('insert'==_0x1441c1['type']){const _0x941dbe=_0x1441c1['position']['root'],_0xf33c60=_0x941dbe['rootName'],_0x3d6607=_0x941dbe['name'];this['_diffRoots']['has'](_0xf33c60)||(this['_diffRoots']['set'](_0xf33c60,Rt(_0xf33c60,_0x3d6607,!0x0)),this['_diffRootsAttributes']['set'](_0xf33c60,{}),_0x24030a&&this['_idsRoots']['set'](_0xf33c60,Rt(_0xf33c60,_0x3d6607,!0x0)));}else{if('addRootAttribute'==_0x1441c1['type']||'removeRootAttribute'==_0x1441c1['type']||'changeRootAttribute'==_0x1441c1['type'])return void this['_handleRootAttributeOperation'](_0x1441c1);'marker'==_0x1441c1['type']&&this['_handleMarkerOperation'](_0x1441c1);}if('marker'!==_0x1441c1['type']){const _0x550a4e=this['_cloneOperation'](_0x1441c1,this['_diffRoots']);_0x550a4e['_execute'](),this['_transformMarkers'](_0x550a4e);}if(_0x24030a)switch(_0x1441c1['type']){case'insert':this['_handleInsertOperation'](_0x1441c1);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x1441c1);break;case'merge':this['_handleMergeOperation'](_0x1441c1);break;case'split':this['_handleSplitOperation'](_0x1441c1);}}else this['_handleRootOperation'](_0x1441c1,_0x24030a);}['_cloneOperation'](_0x34b1a7,_0x3e68e5){const _0x54893a=_0x34b1a7['clone']();return _0x54893a['_authorId']=_0x34b1a7['_authorId'],this['_fixOperation'](_0x54893a,_0x3e68e5),_0x54893a;}['_getBaseVids'](_0x17ff97){return _0x17ff97['map'](_0x11d056=>{const _0x15a2cd=this['_getVidAttributeName'](_0x11d056);return Number(_0x11d056['item']['getAttribute'](_0x15a2cd));});}['_generateTape'](_0x14709c,_0xecd980){if(_0x14709c['is']('element','$text'))_0xecd980['push']({'item':_0x14709c,'type':'text'});else{_0x14709c['is']('element')&&_0xecd980['push']({'item':_0x14709c,'type':'elementStart'});for(const _0x100a56 of _0x14709c['getChildren']())this['_generateTape'](_0x100a56,_0xecd980);_0x14709c['is']('element')&&_0xecd980['push']({'item':_0x14709c,'type':'elementEnd'});}return _0xecd980;}['_getState'](){const _0xa268df=new Map(this['_touched']),_0x19e1b3=new Map(_0xa268df),_0x1de117=new Map(),_0x227b97={'insertions':{},'deletions':{}},_0x469477={'insertions':{},'deletions':{}},_0x1244d8=new Map(),_0x367803=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x535f30=new Map();_0x367803['delete']('$graveyard');for(const _0x311bc0 of _0x367803){const _0x182c0d=(this['_diffRoots']['get'](_0x311bc0)??this['_baseRoots']['get'](_0x311bc0))['name'],_0x3b14ef=this['_diffRoots']['get'](_0x311bc0)||Rt(_0x311bc0,_0x182c0d,!0x1),_0x33f5c7=this['_baseRoots']['get'](_0x311bc0)||Rt(_0x311bc0,_0x182c0d,!0x1);_0x3b14ef['isAttached']()||_0x33f5c7['isAttached']()?(_0x535f30['set'](_0x311bc0,_0x182c0d),_0x227b97['insertions'][_0x311bc0]=bt(_0x3b14ef),_0x227b97['deletions'][_0x311bc0]=bt(_0x33f5c7),this['_copyMarkers'](_0x227b97['deletions'][_0x311bc0],_0x33f5c7),this['_copyMarkers'](_0x227b97['insertions'][_0x311bc0],_0x3b14ef),_0x469477['insertions'][_0x311bc0]=this['_generateTape'](this['_idsRoots']['get'](_0x311bc0),[]),_0x469477['deletions'][_0x311bc0]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x311bc0)||Rt(_0x311bc0,_0x182c0d,!0x1),[])):_0x367803['delete'](_0x311bc0);}for(const _0x17690b of _0x367803){const _0x3445e6=_0x469477['insertions'][_0x17690b];for(const _0x3e19bc of _0x3445e6){const _0x57b067=this['_getVidAttributeName'](_0x3e19bc),_0x4b3c1b=_0x3e19bc['item']['getAttribute'](_0x57b067);_0x19e1b3['delete'](_0x4b3c1b),_0x4b3c1b>=this['_startingRevisionId']&&_0x1de117['set'](_0x4b3c1b,_0xa268df['get'](_0x4b3c1b));}}for(const _0x40755f of _0x367803){const _0x35ae02=_0x469477['insertions'][_0x40755f],_0x295f05=this['_getBaseVids'](_0x469477['deletions'][_0x40755f]);let _0x124733=0x0;for(const _0x2b6294 of _0x35ae02){const _0x1c595f=this['_getVidAttributeName'](_0x2b6294),_0x380310=_0x2b6294['item']['getAttribute'](_0x1c595f);if(!_0x1de117['has'](_0x380310)&&!_0x1244d8['has'](_0x380310)){if(_0x19e1b3['has'](_0x380310))_0x124733++;else{if(_0x380310!=_0x295f05[_0x124733]){const _0x1e1ae5=_0xa268df['get'](_0x380310)||_0xa268df['get'](_0x295f05[_0x124733]);for(;_0x380310!=_0x295f05[_0x124733];)_0x19e1b3['has'](_0x295f05[_0x124733])||(_0x1244d8['set'](_0x295f05[_0x124733],_0x1e1ae5),_0xa268df['set'](_0x295f05[_0x124733],_0x1e1ae5)),_0x124733++;}_0x124733++;}}}}for(const _0x18fea6 of _0x367803){const _0x4eca45=_0x469477['insertions'][_0x18fea6];for(const _0x2e2349 of _0x4eca45){const _0x38111d=this['_getVidAttributeName'](_0x2e2349),_0x58be9b=_0x2e2349['item']['getAttribute'](_0x38111d);if(_0x1244d8['has'](_0x58be9b)){const _0x2967f6=_0x1244d8['get'](_0x58be9b);_0x19e1b3['has'](_0x58be9b)||_0x19e1b3['set'](_0x58be9b,{..._0x2967f6}),_0x1de117['set'](_0x58be9b,{..._0x2967f6});}}}for(const _0x4d0068 of _0x19e1b3['keys']())_0x4d0068>=this['_startingRevisionId']&&_0x19e1b3['delete'](_0x4d0068);const _0x36d957=new Map();for(const _0x3b1e2e of _0x367803){let _0x2212c6=_0x469477['insertions'][_0x3b1e2e];for(const _0x38e8a8 of _0x2212c6)if(_0x38e8a8['item']['is']('element','tableCell')){const _0x681506=this['_getVidAttributeName'](_0x38e8a8),_0x3d3220=_0x38e8a8['item']['getAttribute'](_0x681506);if(_0x1de117['has'](_0x3d3220)){const _0x8fc366=_0x38e8a8['item']['parent']['parent']['getAttribute']('vid_start'),_0x347b65=_0x36d957['get'](_0x8fc366)||new Set();_0x347b65['add'](_0x1de117['get'](_0x3d3220)['userId']),_0x36d957['set'](_0x8fc366,_0x347b65);}}_0x2212c6=_0x469477['deletions'][_0x3b1e2e];for(const _0x413e8e of _0x2212c6)if(_0x413e8e['item']['is']('element','tableCell')){const _0xf9c3e0=this['_getVidAttributeName'](_0x413e8e),_0x397e24=_0x413e8e['item']['getAttribute'](_0xf9c3e0);if(_0x19e1b3['has'](_0x397e24)){const _0x383058=_0x413e8e['item']['parent']['parent']['getAttribute']('vid_start'),_0x14303d=_0x36d957['get'](_0x383058)||new Set();_0x14303d['add'](_0x19e1b3['get'](_0x397e24)['userId']),_0x36d957['set'](_0x383058,_0x14303d);}}for(const _0x4a21a3 of _0x36d957['keys']())(_0x1de117['has'](_0x4a21a3)||_0x19e1b3['has'](_0x4a21a3))&&_0x36d957['delete'](_0x4a21a3);}for(const _0x2a436c of _0x367803){const _0x336346=_0x469477['insertions'][_0x2a436c];let _0x45be89=null,_0xfa9b6=null;for(const _0x58fa40 of _0x336346){const _0x2c8b2f=this['_getVidAttributeName'](_0x58fa40),_0x3fda6e=_0x58fa40['item']['getAttribute'](_0x2c8b2f),_0x2bdcc8=_0x36d957['get'](_0x3fda6e);_0x2bdcc8&&'elementStart'==_0x58fa40['type']&&(_0x45be89=Array['from'](_0x2bdcc8)[0x0],_0xfa9b6=_0x58fa40['item']['getAttribute']('vid_end')),_0x45be89&&(_0x19e1b3['set'](_0x3fda6e,{'userId':_0x45be89}),_0x1de117['set'](_0x3fda6e,{'userId':_0x45be89})),_0x3fda6e==_0xfa9b6&&(_0x45be89=null,_0xfa9b6=null);}}const _0x496982={},_0xff459c=new Set();for(const _0x4860cd of _0x367803){const _0x184588=_0x227b97['deletions'][_0x4860cd],_0x4a1e8f=_0x227b97['insertions'][_0x4860cd];for(const {userId:_0x3c00e6}of this['_touchedMarkers']['values']())null!==_0x3c00e6&&_0xff459c['add'](_0x3c00e6);for(const {userId:_0x28e08b}of this['_touchedRoots']['values']())null!==_0x28e08b&&_0xff459c['add'](_0x28e08b);this['_markChanges'](_0x4a1e8f,_0x469477['insertions'][_0x4860cd],_0x1de117,'insertion',_0xff459c),this['_markChanges'](_0x184588,_0x469477['deletions'][_0x4860cd],_0x19e1b3,'deletion',_0xff459c),_0x496982[_0x4860cd]={'insertions':this['_prepareViewToSave'](_0x4a1e8f),'deletions':this['_prepareViewToSave'](_0x184588),'attachChange':this['_touchedRoots']['get'](_0x4860cd)||null,'attributesBefore':_0x28481c(this['_baseRootsAttributes']['get'](_0x4860cd))||{},'attributesAfter':_0x28481c(this['_diffRootsAttributes']['get'](_0x4860cd)),'rootElementName':_0x535f30['get'](_0x4860cd)};}return{'diffData':_0x496982,'authorsIds':Array['from'](_0xff459c)};}['_processRootBeforeSave'](_0x16d092){for(const [,_0x481cdc]of _0x16d092['markers']){const _0x549854=_0x481cdc['start']['getAncestors']()['filter'](_0x3125a1=>'tableCell'==_0x3125a1['name']);for(const _0x33d5df of _0x549854)0x1==_0x33d5df['childCount']&&_0x33d5df['getChild'](0x0)['is']('element','paragraph')&&_0x33d5df['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x450890){this['_processRootBeforeSave'](_0x450890);const _0x2cca59=this['editor']['data']['toView'](_0x450890,{}),_0x28a18a=Array['from'](_0x2cca59['getChildren']())['map'](_0x19baa3=>this['_getViewJson'](_0x19baa3));return JSON['stringify'](_0x28a18a);}['_getViewJson'](_0x2df296){if(_0x2df296['is']('$text'))return _0x2df296['data'];{const _0x132407=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x2ccff1=_0x2df296,_0x56471e=this['editor']['data']['htmlProcessor']['domConverter'],_0x14f518={'type':_0x132407['_getTypeCharForViewElement'](_0x2ccff1),'name':_0x2ccff1['name'],'attributes':Array['from'](_0x2ccff1['getAttributes']()),'children':Array['from'](_0x2ccff1['getChildren']())['map'](_0x5db0d8=>this['_getViewJson'](_0x5db0d8))};if(_0x2df296['is']('uiElement')&&'$comment'!=_0x2df296['name']){const _0xbd84dd=_0x2df296['render'](_0x56471e['domDocument'],_0x56471e);_0x14f518['children']['push'](_0xbd84dd['outerHTML']);}else{if(_0x2df296['is']('rawElement')){const _0x17edf4=_0x56471e['domDocument']['createElement'](_0x2ccff1['name']);_0x2df296['render'](_0x17edf4,_0x56471e),_0x14f518['children']['push'](_0x17edf4['innerHTML']);}}const _0x213cc0=Array['from'](_0x2ccff1['getCustomProperties']());_0x213cc0['length']>0x0&&(_0x14f518['customProperties']=_0x213cc0);const _0x2a4901=_0x2ccff1['getFillerOffset']();return null!==_0x2a4901&&(_0x14f518['fillerOffset']=_0x2a4901),_0x14f518;}}['_markChanges'](_0x2cd574,_0x22f18a,_0x3e3038,_0x46baf0,_0x5e42ab){let _0x30a376=null,_0x3f2045=null,_0x2ee2e4=0x0;const _0x5b840=this['editor']['model'];for(let _0x8f6666=0x0;_0x8f6666<_0x22f18a['length'];_0x8f6666++){const _0x46a7cc=this['_getVidAttributeName'](_0x22f18a[_0x8f6666]),_0x59501f=_0x22f18a[_0x8f6666]['item']['getAttribute'](_0x46a7cc),_0x4b0f6b=_0x3e3038['get'](_0x59501f),_0x5b4435=_0x8f6666==_0x22f18a['length']-0x1;!_0x30a376&&_0x4b0f6b&&(_0x30a376=_0x4b0f6b,_0x3f2045=_0x22f18a[_0x8f6666]),!_0x30a376||_0x4b0f6b&&_0x4b0f6b['userId']==_0x30a376['userId']||(_0x37f033(_0x4b0f6b,kt(_0x3f2045,_0x2cd574,_0x5b840),kt(_0x22f18a[_0x8f6666],_0x2cd574,_0x5b840)),_0x30a376=_0x4b0f6b||null,_0x3f2045=_0x4b0f6b?_0x22f18a[_0x8f6666]:null),_0x30a376&&_0x5b4435&&_0x37f033(_0x4b0f6b,kt(_0x3f2045,_0x2cd574,_0x5b840),At(_0x22f18a[_0x8f6666],_0x2cd574,_0x5b840));}function _0x37f033(_0x5e3f66,_0x24eaf9,_0x33e30a){const _0xf73f45=_0x30a376['userId'],_0x5c8d89='revision:'+_0x46baf0+':'+_0xf73f45+':'+_0x2ee2e4++,_0x3e7bd9=_0x5b840['createRange'](_0x24eaf9,_0x33e30a);_0x2cd574['markers']['set'](_0x5c8d89,_0x3e7bd9),null!==_0xf73f45&&_0x5e42ab['add'](_0xf73f45);}}['_getVidAttributeName'](_0x604f18){switch(_0x604f18['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x50b2d5,_0x2dce6a){_0x50b2d5['baseVersion']=null;for(const _0x2e2e in _0x50b2d5){const _0x1e5156=_0x50b2d5[_0x2e2e];if(_0x1e5156 instanceof _0x2779d2){const _0x3a9321=_0x2dce6a['get'](_0x1e5156['root']['rootName']);_0x50b2d5[_0x2e2e]=this['_fixPosition'](_0x1e5156,_0x3a9321);}if(_0x1e5156 instanceof _0x830771){const _0xb0ee83=_0x2dce6a['get'](_0x1e5156['root']['rootName']);_0x50b2d5[_0x2e2e]=this['_fixRange'](_0x1e5156,_0xb0ee83);}'root'===_0x2e2e&&(_0x50b2d5['root']=_0x2dce6a['get'](_0x50b2d5['root']['rootName']));}}['_fixRange'](_0x5bda1d,_0x376c4f){return this['editor']['model']['createRange'](this['_fixPosition'](_0x5bda1d['start'],_0x376c4f),this['_fixPosition'](_0x5bda1d['end'],_0x376c4f));}['_fixPosition'](_0x59d717,_0x55d0fd){return this['editor']['model']['createPositionFromPath'](_0x55d0fd,_0x59d717['path'],_0x59d717['stickiness']);}['_handleInsertOperation'](_0x28a6b1){const _0x2db31d=this['_idsRoots']['get'](_0x28a6b1['position']['root']['rootName']),_0x380862=this['_fixPosition'](_0x28a6b1['position'],_0x2db31d),_0x14acb0=null===_0x28a6b1['_authorId']?null:_0x28a6b1['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x21accb=_0x380862['parent'],_0x5999b0=this['_revisionId'],_0x5da899=[];for(const _0x2d4edc of _0x28a6b1['nodes'])if(_0x2d4edc['is']('element'))_0x5da899['push'](this['_makeIdsRoot'](_0x2d4edc));else{for(let _0x4d3b02=0x0;_0x4d3b02<_0x2d4edc['offsetSize'];_0x4d3b02++)_0x5da899['push'](new _0x5ebea3('$text',{'vid':this['_revisionId']++}));}const _0x4fb42a=this['_revisionId'];for(let _0x17b971=_0x5999b0;_0x17b971<_0x4fb42a;_0x17b971++)this['_touched']['set'](_0x17b971,{'userId':_0x14acb0});_0x21accb['_insertChild'](_0x380862['offset'],_0x5da899);}['_handleMoveOperation'](_0x3380ac){(_0x3380ac=this['_cloneOperation'](_0x3380ac,this['_idsRoots']))['_execute']();const _0x38b88e=null===_0x3380ac['_authorId']?null:_0x3380ac['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4bdc20=_0x3380ac['getMovedRangeStart'](),_0x356e32=_0x4bdc20['parent'],_0x149f06=_0x4bdc20['offset'];!function _0x1413a0(_0x19dad1,_0x463467,_0x2e7a10,_0x1f91b){for(let _0x314a79=_0x2e7a10;_0x314a79<_0x1f91b;_0x314a79++){const _0x561c82=_0x463467['getChild'](_0x314a79);_0x561c82['is']('element','$text')?_0x19dad1['set'](_0x561c82['getAttribute']('vid'),{'userId':_0x38b88e}):(_0x19dad1['set'](_0x561c82['getAttribute']('vid_start'),{'userId':_0x38b88e}),_0x1413a0(_0x19dad1,_0x561c82,0x0,_0x561c82['childCount']),_0x19dad1['set'](_0x561c82['getAttribute']('vid_end'),{'userId':_0x38b88e}));}}(this['_touched'],_0x356e32,_0x149f06,_0x149f06+_0x3380ac['howMany']);}['_handleMergeOperation'](_0xe7eaf9){const _0x203a26=null===(_0xe7eaf9=this['_cloneOperation'](_0xe7eaf9,this['_idsRoots']))['_authorId']?null:_0xe7eaf9['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2461be=_0xe7eaf9['targetPosition']['parent'],_0x275eae=_0xe7eaf9['sourcePosition']['parent'],_0x271748=_0x2461be['getAttribute']('vid_end'),_0x5eca30=_0x275eae['getAttribute']('vid_start');_0x2461be['_setAttribute']('vid_end',_0x275eae['getAttribute']('vid_end')),_0x275eae['_setAttribute']('vid_end',_0x271748),this['_touched']['set'](_0x5eca30,{'userId':_0x203a26}),this['_touched']['set'](_0x271748,{'userId':_0x203a26}),_0xe7eaf9['_execute']();}['_handleSplitOperation'](_0x9255a6){const _0x296dbd=null===(_0x9255a6=this['_cloneOperation'](_0x9255a6,this['_idsRoots']))['_authorId']?null:_0x9255a6['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xeec052=_0x9255a6['graveyardPosition'],_0x35e8e7=_0x9255a6['splitPosition']['parent'];_0x9255a6['_execute']();const _0x38d9d4=_0x35e8e7['getAttribute']('vid_end'),_0x3a53b5=_0x9255a6['insertionPosition']['nodeAfter'];if(_0xeec052){const _0x2a39ee=_0x3a53b5['getAttribute']('vid_end'),_0x2c243=_0x35e8e7['getAttribute']('vid_end');_0x35e8e7['_setAttribute']('vid_end',_0x2a39ee),_0x3a53b5['_setAttribute']('vid_end',_0x2c243),this['_touched']['set'](_0x35e8e7['getAttribute']('vid_end'),{'userId':_0x296dbd}),this['_touched']['set'](_0x3a53b5['getAttribute']('vid_start'),{'userId':_0x296dbd});}else{const _0x43cb2b=this['_revisionId']++,_0x35b6b4=this['_revisionId']++;_0x35e8e7['_setAttribute']('vid_end',_0x43cb2b),_0x3a53b5['_setAttribute']('vid_start',_0x35b6b4),_0x3a53b5['_setAttribute']('vid_end',_0x38d9d4),this['_touched']['set'](_0x43cb2b,{'userId':_0x296dbd}),this['_touched']['set'](_0x35b6b4,{'userId':_0x296dbd});}}['_handleMarkerOperation'](_0x29b3a9){if(!_0x29b3a9['affectsData'])return;const _0xc651ed=(_0x29b3a9=this['_cloneOperation'](_0x29b3a9,this['_diffRoots']))['oldRange']?_0x29b3a9['oldRange']['root']:null,_0x3782ba=_0x29b3a9['newRange']?_0x29b3a9['newRange']['root']:null;_0xc651ed&&this['_markers']['delete'](_0x29b3a9['name']),_0x3782ba&&this['_markers']['set'](_0x29b3a9['name'],_0x29b3a9['newRange']['clone']());const _0x343741=null===_0x29b3a9['_authorId']?null:_0x29b3a9['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x300552=_0x29b3a9['name'];if(!this['_touchedMarkers']['has'](_0x300552))return void this['_touchedMarkers']['set'](_0x300552,{'range':_0x29b3a9['oldRange'],'userId':_0x343741});const _0xa198f0=this['_touchedMarkers']['get'](_0x300552),_0x340253=_0xa198f0['range'],_0x3518f3=_0x29b3a9['newRange'];null==_0x340253&&null==_0x3518f3||_0x340253&&_0x3518f3&&_0x340253['isEqual'](_0x3518f3)?this['_touchedMarkers']['delete'](_0x29b3a9['name']):_0xa198f0['userId']=_0x343741;}['_handleRootOperation'](_0xd17ead,_0xbb3ddd){this['_diffRoots']['has'](_0xd17ead['rootName'])?this['_diffRoots']['get'](_0xd17ead['rootName'])['_isAttached']=_0xd17ead['isAdd']:(this['_diffRoots']['set'](_0xd17ead['rootName'],Rt(_0xd17ead['rootName'],_0xd17ead['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0xd17ead['rootName'],{}),_0xbb3ddd&&this['_idsRoots']['set'](_0xd17ead['rootName'],Rt(_0xd17ead['rootName'],_0xd17ead['elementName'],!0x0)));const _0x21450a=null===_0xd17ead['_authorId']?null:_0xd17ead['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x40dca4=this['_touchedRoots']['get'](_0xd17ead['rootName']);_0x40dca4&&_0x40dca4['userId']===_0x21450a?this['_touchedRoots']['delete'](_0xd17ead['rootName']):this['_touchedRoots']['set'](_0xd17ead['rootName'],{'userId':_0x21450a,'isAttached':_0xd17ead['isAdd']});}['_handleRootAttributeOperation'](_0x3ceda4){const _0x2cd03b=this['_diffRootsAttributes']['get'](_0x3ceda4['root']['rootName']);null===_0x3ceda4['newValue']?delete _0x2cd03b[_0x3ceda4['key']]:_0x2cd03b[_0x3ceda4['key']]=_0x3ceda4['newValue'];}};function bt(_0x5dd636){const _0x44b500=Rt(_0x5dd636['rootName'],_0x5dd636['name'],_0x5dd636['isAttached']());for(const _0x2de45c of _0x5dd636['getChildren']()){const _0x2347e7=_0x2de45c['_clone'](!0x0);_0x44b500['_appendChild'](_0x2347e7);}return _0x44b500;}function Rt(_0x170937,_0x1aac0a,_0x23a09f=!0x0){const _0x43185f=new _0x2136fb();return _0x43185f['rootName']=_0x170937,_0x43185f['name']=_0x1aac0a,_0x43185f['_isAttached']=_0x23a09f,_0x43185f['isAttached']=()=>_0x43185f['_isAttached'],_0x43185f;}function kt(_0x558aea,_0x1b0443,_0x3f790b){const _0x19936c='elementEnd'==_0x558aea['type']?_0x3f790b['createPositionAt'](_0x558aea['item'],'end'):_0x3f790b['createPositionBefore'](_0x558aea['item']);return _0x3f790b['createPositionFromPath'](_0x1b0443,_0x19936c['path'],_0x19936c['stickiness']);}function At(_0x47aed5,_0x4704ba,_0x1b0b62){const _0x2d63c0='elementStart'==_0x47aed5['type']?_0x1b0b62['createPositionAt'](_0x47aed5['item'],0x0):_0x1b0b62['createPositionAfter'](_0x47aed5['item']);return _0x1b0b62['createPositionFromPath'](_0x4704ba,_0x2d63c0['path'],_0x2d63c0['stickiness']);}const It=/* #__PURE__ -- @preserve */
25
+ _0x735ba7(at);var Et=class extends It{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x2078bb,_0x21b37d){super(_0x2078bb),this['focusTracker']=new _0x8acf98(),this['keystrokes']=new _0x142511(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x21b37d),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),this['initializeCssTransitionDisablerMixin']();}['render'](){super['render'](),dt({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x3def62=_0x164d2b=>_0x164d2b['stopPropagation']();this['keystrokes']['set']('arrowright',_0x3def62),this['keystrokes']['set']('arrowleft',_0x3def62),this['keystrokes']['set']('arrowup',_0x3def62),this['keystrokes']['set']('arrowdown',_0x3def62);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x248f14){this['revisionNameInputView']['fieldView']['element']['value']=_0x248f14['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x29c054){const _0x1f59ae=new _0x1a4e29(this['locale'],lt),_0x214b4f=_0x1f59ae['fieldView'];_0x214b4f['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x271d0a=pt(this['locale'],'Name\x20of\x20the\x20revision');return!_0x29c054&&(_0x271d0a+='\x20('+pt(this['locale'],'optional')+')'),(_0x1f59ae['label']=_0x271d0a,_0x214b4f['on']('input',()=>{this['revisionNameInputValue']=_0x214b4f['element']['value']['trim']();}),_0x1f59ae);}},St=class extends _0x592ef7{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_t];}['_saveRevisionFormView'];['init'](){const _0x35adce=this['editor'],_0x5083a6=_0x35adce['plugins']['get']('RevisionTracker');_0x35adce['ui']['componentFactory']['add']('revisionHistory',_0x2ccabc=>{const _0x3c1c69=ct(_0x2ccabc),_0x33114b=_0x3c1c69['panelView']['children'],_0x1c6d57=new _0x37c124(_0x2ccabc),_0x1b7bea=new _0x3ab91f(_0x2ccabc),_0x31d581=this['_createSaveRevisionButton'](_0x5ab628),_0x302ed2=new _0x3ab91f(_0x2ccabc),_0x5b1978=this['_createOpenRevisionButton'](_0x5ab628);return _0x3c1c69['bind']('isEnabled')['to'](_0x5083a6,'isReady',_0x5083a6,'isEnabled',_0x35adce,'isReadOnly',(_0x5547f8,_0x21f7c3,_0x3b67af)=>_0x5547f8&&_0x21f7c3&&!_0x3b67af),_0x3c1c69['buttonView']['set']({'icon':_0x5fc2b3,'label':pt(_0x2ccabc,'Revision\x20history'),'tooltip':!0x0}),_0x31d581['set']({'withText':!0x0,'role':'menuitem'}),_0x5b1978['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x5b1978,'execute',()=>{_0x3c1c69['isOpen']=!0x1,_0x35adce['editing']['view']['focus']();},{'priority':'low'}),_0x1b7bea['children']['add'](_0x31d581),_0x302ed2['children']['add'](_0x5b1978),_0x1c6d57['role']='menu',_0x1c6d57['items']['addMany']([_0x1b7bea,_0x302ed2]),_0x33114b['add'](_0x1c6d57),_0x3c1c69;}),_0x35adce['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x51b820=this['editor'],_0x4d35f0=_0x51b820['locale'],_0x48020c=_0x51b820['plugins']['get']('RevisionTracker'),_0x4a1ae8=new et(_0x4d35f0),_0x534762=new it(_0x4d35f0);_0x4a1ae8['bind']('isEnabled')['to'](_0x48020c,'isReady',_0x48020c,'isEnabled',_0x51b820,'isReadOnly',(_0x1d0588,_0x10c508,_0x570a4e)=>_0x1d0588&&_0x10c508&&!_0x570a4e),_0x4a1ae8['buttonView']['set']({'icon':_0x5fc2b3,'label':pt(_0x4d35f0,'Revision\x20history')});const _0xb3d26c=new tt(_0x4d35f0,_0x4a1ae8),_0x341b97=this['_createSaveRevisionButton'](_0x5b83fc);_0x341b97['delegate']('execute')['to'](_0x4a1ae8),_0xb3d26c['children']['add'](_0x341b97),_0x534762['items']['add'](_0xb3d26c);const _0x429efb=new tt(_0x4d35f0,_0x4a1ae8),_0x14ff42=this['_createOpenRevisionButton'](_0x5b83fc);return _0x14ff42['delegate']('execute')['to'](_0x4a1ae8),_0x429efb['children']['add'](_0x14ff42),_0x534762['items']['add'](_0x429efb),_0x4a1ae8['panelView']['children']['add'](_0x534762),_0x4a1ae8;}['_createSaveRevisionButton'](_0x3b170f){const _0xa30996=this['editor'],_0x251859=_0xa30996['plugins']['get']('RevisionTracker'),_0x4aaee4=new _0x3b170f(_0xa30996['locale']);return _0x4aaee4['set']({'label':pt(_0xa30996['locale'],'Save\x20current\x20revision')}),_0x4aaee4['bind']('isEnabled')['to'](_0x251859,'isReady',_0x251859,'isEnabled',_0xa30996,'isReadOnly',(_0x196d62,_0x506ed0,_0x1b5477)=>_0x196d62&&_0x506ed0&&!_0x1b5477),this['listenTo'](_0x4aaee4,'execute',()=>{this['_showDialog']();}),_0x4aaee4;}['_createOpenRevisionButton'](_0x4a758c){const _0x674af7=this['editor'],_0x30a5ee=_0x674af7['plugins']['get']('RevisionTracker'),_0x41f43a=new _0x4a758c(_0x674af7['locale']);return _0x41f43a['set']({'label':pt(_0x674af7['locale'],'Open\x20revision\x20history')}),_0x41f43a['bind']('isEnabled')['to'](_0x30a5ee,'isReady',_0x674af7,'isReadOnly',(_0xdd573a,_0x349497)=>_0xdd573a&&!_0x349497),this['listenTo'](_0x41f43a,'execute',()=>{_0x674af7['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x41f43a;}['_showDialog'](){const _0x115317=this['editor'],_0x55935f=_0x115317['locale'],_0x4dbf6b=_0x115317['plugins']['get']('Dialog'),_0x4ee802=_0x115317['plugins']['get']('RevisionTracker');function _0x1713fc(_0x407d19){_0x115317['config']['get']('revisionHistory.requireRevisionName')&&''===_0x407d19['revisionName']?_0x407d19['revisionNameInputView']['errorText']=pt(_0x55935f,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x115317['plugins']['get'](_t)['saveRevision']({'name':_0x407d19['revisionName']}),_0x4dbf6b['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x1713fc(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x4dbf6b['show']({'id':'revisionSave','title':pt(_0x55935f,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':pt(_0x115317['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x4dbf6b['hide']()},{'label':pt(_0x115317['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x470e43){_0x470e43['bind']('isEnabled')['to'](_0x4ee802,'isReady',_0x4ee802,'isEnabled',_0x115317,'isReadOnly',(_0xf91018,_0x456d0a,_0x34875a)=>_0xf91018&&_0x456d0a&&!_0x34875a);},'onExecute':()=>_0x1713fc(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x43cb14=this['editor'],_0x2066e2=_0x43cb14['locale'];this['_saveRevisionFormView']=new Et(_0x2066e2,_0x43cb14['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}},Nt=class extends at{['changeId'];['_model'];constructor(_0x5513f1,_0x1ba1f3){super(_0x5513f1),this['_model']=_0x1ba1f3,this['changeId']=_0x1ba1f3['id'];const _0x5ad022=this['bindTemplate'],_0x3f8fc8=pt(_0x5513f1,_0x1ba1f3['data']['isSuggestion']?'Suggested\x20by':'add'==_0x1ba1f3['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x1ba1f3['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x5ad022['to']('type',_0x67c39=>'ck-revision-change__'+_0x67c39)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x3f8fc8}]},{'text':'\x20'+_0x1ba1f3['author']['name']}]}]});}['focus'](){this['element']['focus']();}};const xt=/* #__PURE__ -- @preserve */
26
+ _0x3c8f7b();var Ot=class extends xt{['id'];['author'];['type'];['data'];['rootName'];constructor(_0x3ad335){super(),this['id']=_0x3ad335['id']||_0x551659(),this['author']=_0x3ad335['author'],this['type']=_0x3ad335['type'],this['data']=_0x3ad335['data']||{},this['rootName']=_0x3ad335['rootName'],this['set']('createdAt',_0x3ad335['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Ct=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x2bfd36,_0x31c312){this['newRevisionId']=_0x2bfd36,this['oldRevisionId']=_0x31c312,this['changes']=new _0xe1aaa7();}['_setChanges'](_0x44d9b8){for(const _0xc0e30d of _0x44d9b8)this['changes']['add'](_0xc0e30d);}},Mt=class extends _0x592ef7{['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[_0x20176c,_0x3e4519,mt,wt];}constructor(_0x121e22){super(_0x121e22),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',(_0x422bf8,_0x5e1964,_0xdbb0d)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x50c127=>{for(const _0x3111e5 of this['editor']['editing']['view']['document']['roots'])_0xdbb0d?_0x50c127['removeClass']('ck-editor__editable__overlay',_0x3111e5):_0x50c127['addClass']('ck-editor__editable__overlay',_0x3111e5);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x5c776d=>null!==_0x5c776d),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x2c7091,_0x54f7e3,_0x8ced9a)=>_0x2c7091&&_0x8ced9a?_0x54f7e3['changes']['getIndex'](_0x8ced9a):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x31e526,_0x1ee3e7)=>_0x31e526?_0x1ee3e7['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x3e4519);}['init'](){const _0x3c6321=this['editor'],_0x605525=new Tt(_0x3c6321,{'direction':'backward'}),_0x3df084=new Tt(_0x3c6321,{'direction':'forward'});_0x3c6321['commands']['add']('showPreviousChange',_0x605525),_0x3c6321['commands']['add']('showNextChange',_0x3df084),_0x3c6321['commands']['add']('restoreRevision',new Dt(_0x3c6321)),this['on']('change:numberOfChanges',()=>{_0x605525['refresh'](),_0x3df084['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x3c6321['enableReadOnlyMode']('revision-viewer'),_0x3c6321['plugins']['has']('WidgetToolbarRepository')&&_0x3c6321['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x71bdf4){return await this['_utils']['loadRevisionData'](_0x71bdf4,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x71bdf4);}async['getRevisionRootsAttributes'](_0x4606f2){return await this['_utils']['loadRevisionData'](_0x4606f2,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x4606f2);}async['compare'](_0x297e20,_0x3b724a,_0x222141=!0x1){if(!this['isEnabled'])return;const _0x1763fa=this['diff'],_0x16292b=this['repository'],_0x5a81c2='string'==typeof _0x297e20?_0x16292b['getRevision'](_0x297e20):_0x297e20,_0x1be9ad='string'==typeof _0x3b724a?_0x16292b['getRevision'](_0x3b724a):_0x3b724a,_0x614383=_0x5a81c2['id'],_0x4fc825=_0x1be9ad?_0x1be9ad['id']:null;if(!_0x222141&&this['diff']&&this['diff']['newRevisionId']===_0x614383&&this['diff']['oldRevisionId']===_0x4fc825)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Ct(_0x614383,_0x4fc825);const _0x3e1b72=this['_getRevisionsRange'](_0x5a81c2,_0x1be9ad,!0x0)['map'](_0x36c4f4=>this['_utils']['loadRevisionData'](_0x36c4f4,this['adapter']));return _0x3e1b72['push'](new Promise(_0x897ce8=>{setTimeout(_0x897ce8,0x14);})),Promise['all'](_0x3e1b72)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x9447e1=this['_getDiff'](_0x614383,_0x4fc825);for(const _0x30a433 of _0x9447e1['changes'])this['_changeIdToChange']['set'](_0x30a433['id'],_0x30a433);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x5d80a1=>{for(const _0x10c6be of this['editor']['model']['document']['getRootNames']())_0x5d80a1['detachRoot'](_0x10c6be);for(const _0xa86ff of Object['keys'](_0x9447e1['model'])){const _0x1120a5=_0x9447e1['model'][_0xa86ff]['name'],_0xbe316e=_0x5d80a1['addRoot'](_0xa86ff,_0x1120a5);for(const _0x2c1dc7 of Object['keys'](_0x9447e1['attributes'][_0xa86ff]))_0x5d80a1['setAttribute'](_0x2c1dc7,_0x9447e1['attributes'][_0xa86ff][_0x2c1dc7],_0xbe316e);_0x5d80a1['insert'](_0x9447e1['model'][_0xa86ff],_0xbe316e,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x9447e1['changes'])),this['isReady']=!0x0;})['catch'](_0x2534c0=>{console['error'](_0x2534c0),this['_cleanUp'](),_0x1763fa&&(this['diff']=_0x1763fa),this['isReady']=!0x0;});}['addRevisionData'](_0x18ff49,_0x1cc6e4){const _0x89d125=this['repository']['createRevision'](_0x18ff49);return _0x89d125['on']('_update',(_0x1646b3,_0x3f509b,_0x5c0cb9)=>_0x1cc6e4(_0x3f509b,_0x5c0cb9,_0x89d125)),this['repository']['addRevision'](_0x89d125),_0x89d125;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x355022=>{for(const _0x18660d of this['editor']['model']['document']['getRootNames']())_0x355022['detachRoot'](_0x18660d);});}['_sortAndFilterDiffChanges'](_0x50f27d){const _0x25ecff=[],_0x121573=new Map();for(const _0x2fa8fa of this['editor']['model']['document']['getRootNames']()){const _0x5828a1=this['editor']['editing']['view']['getDomRoot'](_0x2fa8fa);if(!_0x5828a1)continue;const _0x180445=_0x5828a1['getClientRects']()['item'](0x0);_0x180445&&(_0x25ecff['push'](_0x2fa8fa),_0x121573['set'](_0x2fa8fa,_0x180445));}return _0x25ecff['sort']((_0xdafd02,_0x3a5fe4)=>{const _0x3458f6=_0x121573['get'](_0xdafd02),_0x622f53=_0x121573['get'](_0x3a5fe4);return _0x3458f6['y']-_0x622f53['y']||_0x3458f6['x']-_0x622f53['x'];}),(_0x50f27d=_0x50f27d['filter'](_0x18df98=>_0x25ecff['includes'](_0x18df98['rootName'])))['sort']((_0x356621,_0xb78c43)=>_0x25ecff['indexOf'](_0x356621['rootName'])-_0x25ecff['indexOf'](_0xb78c43['rootName'])),_0x50f27d;}['_makeTape'](_0x3af291){const _0x57c636=Array['from'](_0x3af291['markers'])['filter'](([_0x502648,_0x20557b])=>_0x502648['startsWith']('revision:')&&!_0x20557b['isCollapsed']),_0x5d3b84=Array['from'](this['editor']['model']['createRangeIn'](_0x3af291)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x57c636['length'])for(const _0x51f3f4 of _0x5d3b84){const [_0x44770d,_0x37f7cb]=_0x57c636[0x0],[,_0x4a2686,_0x28393f]=_0x44770d['split'](':');if(_0x37f7cb['end']['isEqual'](_0x51f3f4['nextPosition'])&&_0x57c636['shift'](),(_0x51f3f4['previousPosition']['isEqual'](_0x37f7cb['start'])||_0x51f3f4['previousPosition']['isAfter'](_0x37f7cb['start']))&&('insertion'==_0x4a2686?_0x51f3f4['isAdded']={'userId':_0x28393f}:'deletion'==_0x4a2686&&(_0x51f3f4['isRemoved']={'userId':_0x28393f})),0x0==_0x57c636['length'])break;}return _0x5d3b84;}['_refreshStartEndIndex'](_0x2c5d52){const _0x2e58a2=new Map();for(let _0x454976=0x0;_0x454976<_0x2c5d52['length'];_0x454976++)'text'===_0x2c5d52[_0x454976]['type']?(_0x2c5d52[_0x454976]['item']['startIndex']=_0x454976,_0x2c5d52[_0x454976]['item']['endIndex']=_0x454976):('elementStart'===_0x2c5d52[_0x454976]['type']?_0x2c5d52[_0x454976]['item']['startIndex']=_0x454976:'elementEnd'===_0x2c5d52[_0x454976]['type']&&(_0x2c5d52[_0x454976]['item']['endIndex']=_0x454976),_0x2e58a2['set'](_0x2c5d52[_0x454976]['id'],_0x454976));for(const _0xb8a0bf of _0x2e58a2['values']())'elementStart'===_0x2c5d52[_0xb8a0bf]['type']?_0x2c5d52[_0xb8a0bf]['item']['endIndex']=_0x2e58a2['get'](_0x2c5d52[_0xb8a0bf]['pairId']):'elementEnd'===_0x2c5d52[_0xb8a0bf]['type']&&(_0x2c5d52[_0xb8a0bf]['item']['startIndex']=_0x2e58a2['get'](_0x2c5d52[_0xb8a0bf]['pairId']));}['_processTape'](_0x509a45){for(let _0x72837c=0x0;_0x72837c<_0x509a45['length'];_0x72837c++){if('elementStart'===_0x509a45[_0x72837c]['type'])_0x509a45[_0x72837c]['item']['startIndex']=_0x72837c;else{if('elementEnd'===_0x509a45[_0x72837c]['type']){_0x509a45[_0x72837c]['item']['endIndex']=_0x72837c;const _0x5299a2=_0x509a45[_0x72837c]['item']['startIndex'];_0x509a45[_0x5299a2]['pairId']=_0x509a45[_0x72837c]['id'],_0x509a45[_0x72837c]['pairId']=_0x509a45[_0x5299a2]['id'];}else _0x509a45[_0x72837c]['item']['startIndex']=_0x72837c,_0x509a45[_0x72837c]['item']['endIndex']=_0x72837c,_0x509a45[_0x72837c]['pairId']=null;}_0x509a45[_0x72837c]['markersStart']||(_0x509a45[_0x72837c]['markersStart']=[],_0x509a45[_0x72837c]['markersEnd']=[]);}}['_markInsertions'](_0x25af01,_0x362dab){const _0x4e85d2=_0x25af01['filter'](_0x106f59=>!_0x106f59['isAdded']);for(let _0x3ef52b=0x0;_0x3ef52b<_0x362dab['length'];_0x3ef52b++)_0x362dab[_0x3ef52b]['isAdded']&&(_0x4e85d2[_0x3ef52b]['isAdded']=_0x362dab[_0x3ef52b]['isAdded']);}['_getDiff'](_0x9bf1da,_0x1be4dc=null){const _0x3c784d=this['repository']['getRevision'](_0x9bf1da),_0x1cb7d6=_0x1be4dc?this['repository']['getRevision'](_0x1be4dc):null,_0x24f665=this['_getRevisionsRange'](_0x3c784d,_0x1cb7d6),_0x5d29ef=_0x24f665[_0x24f665['length']-0x1],_0x2e78ed=new Map(),_0xbdc1a6={'model':{},'attributes':{},'changes':[]},_0x10ee20=new Set(),_0x3e8c06=new Map();for(let _0x3d5f8b=_0x24f665['length']-0x1;_0x3d5f8b>=0x0;_0x3d5f8b--){const _0x3bdcaf=_0x24f665[_0x3d5f8b];for(const _0x3197c6 of Object['keys'](_0x3bdcaf['diffData']))if(_0x3bdcaf['diffData'][_0x3197c6]['attachChange']){const _0x41e41a=_0x3bdcaf['diffData'][_0x3197c6]['attachChange'];_0x41e41a['isAttached']?(_0x10ee20['add'](_0x3197c6),_0x3e8c06['has'](_0x3197c6)&&_0x3e8c06['get'](_0x3197c6)['userId']==_0x41e41a['userId']?_0x3e8c06['delete'](_0x3197c6):_0x3e8c06['set'](_0x3197c6,_0x41e41a)):_0x3e8c06['has'](_0x3197c6)?(_0x10ee20['delete'](_0x3197c6),_0x3e8c06['delete'](_0x3197c6)):(_0x10ee20['add'](_0x3197c6),_0x3e8c06['set'](_0x3197c6,_0x41e41a));}else _0x10ee20['add'](_0x3197c6);}for(const _0x8e055c of _0x10ee20){const _0x35f98c=_0x3e8c06['has'](_0x8e055c)&&!_0x3e8c06['get'](_0x8e055c)['isAttached'];let _0xb9a357=_0x35f98c?_0x24f665['length']-0x1:0x0;const _0x566fd1=_0x35f98c?-0x1:0x1;for(;_0x24f665[_0xb9a357];){const _0xcbaa46=_0x24f665[_0xb9a357];if(_0xcbaa46['diffData'][_0x8e055c]){const _0x56895f=_0x35f98c?_0xcbaa46['diffData'][_0x8e055c]['attributesBefore']:_0xcbaa46['diffData'][_0x8e055c]['attributesAfter'];_0xbdc1a6['attributes'][_0x8e055c]=_0x56895f?_0x28481c(_0x56895f):{};break;}_0xb9a357+=_0x566fd1;}}for(const _0x255f0c of _0x24f665){_0x255f0c['model']={};for(const _0x10cdbf of _0x255f0c['authors'])_0x2e78ed['set'](_0x10cdbf['id'],_0x10cdbf);for(const _0x5c0716 of _0x10ee20){const _0x4790f6=_0x255f0c['diffData'][_0x5c0716]?_0x255f0c['diffData'][_0x5c0716]['insertions']:'[]',_0x283960=_0x255f0c['diffData'][_0x5c0716]?_0x255f0c['diffData'][_0x5c0716]['deletions']:'[]',_0x3d23ef=_0x255f0c['diffData'][_0x5c0716]?.['rootElementName']||'$root';_0x255f0c['model'][_0x5c0716]={'insertions':this['_utils']['_makeModelFromViewString'](_0x4790f6,_0x3d23ef),'deletions':this['_utils']['_makeModelFromViewString'](_0x283960,_0x3d23ef)};}}for(const _0x52e065 of _0x10ee20){let _0x2eb14d=null,_0x23567e=0x0;const _0x3fcfe9=_0x24f665['map'](_0x217477=>_0x217477['diffData'][_0x52e065]?.['rootElementName'])['find'](_0x590662=>void 0x0!==_0x590662)||'$root',_0x22e8f0=new Map(Array['from'](_0x3c784d['model'][_0x52e065]['insertions']['markers'])['filter'](([_0x494a0b])=>!_0x494a0b['startsWith']('revision:')));let _0x14535e=0x0;for(const _0x180e88 of _0x24f665){const _0x66e1b2=this['_makeTape'](_0x180e88['model'][_0x52e065]['insertions']);_0x180e88==_0x3c784d?(_0x2eb14d=_0x66e1b2,_0x23567e=_0x2eb14d['length'],_0x2eb14d['forEach'](_0x33b1a0=>{_0x33b1a0['id']=_0x14535e++;}),this['_processTape'](_0x2eb14d)):this['_markInsertions'](_0x2eb14d,_0x66e1b2);const _0x418497=_0x2eb14d['filter'](_0x5be9f5=>!_0x5be9f5['isAdded'])['map'](_0x4bb00b=>_0x4bb00b['id']);let _0x5dbe4a=0x0;const _0x394829=this['_makeTape'](_0x180e88['model'][_0x52e065]['deletions']);_0x394829['forEach'](_0x256726=>{_0x256726['isRemoved']?_0x256726['id']=_0x23567e++:_0x256726['id']=_0x418497[_0x5dbe4a++];}),this['_processTape'](_0x394829),this['_setDistance'](_0x2eb14d,'isAdded'),this['_setDistance'](_0x394829,'isRemoved'),_0x180e88==_0x3c784d&&this['_markMarkers'](_0x2eb14d,_0x22e8f0),_0x2eb14d=this['_joinTapes'](_0x2eb14d,_0x394829),this['_refreshStartEndIndex'](_0x2eb14d),this['_setDistance'](_0x2eb14d,'isRemoved');}_0x2eb14d=_0x2eb14d['filter'](_0x3b33b7=>!(_0x3b33b7['isAdded']&&_0x3b33b7['isRemoved']));const _0xd87701=new Map(_0x5d29ef['model'][_0x52e065]['deletions']['markers']),_0x2d8347=new Set(_0x22e8f0['keys']());for(const _0x250b12 of _0xd87701['keys']())_0x2d8347['delete'](_0x250b12);this['_markSuggestions'](_0x2eb14d,_0x2d8347),this['_fixObsoleteTags'](_0x2eb14d),_0x2eb14d=this['_removeMissingPairs'](_0x2eb14d),_0x2eb14d=this['_markMismatchedRemovedTags'](_0x2eb14d),_0x2eb14d=this['_removeUnsupportedChanges'](_0x2eb14d);const {root:_0x12df78,changes:_0x542bb7}=this['_makeModelFromTape'](_0x2eb14d,_0x2e78ed,_0x52e065,_0x3fcfe9);_0xbdc1a6['model'][_0x52e065]=_0x12df78;const _0x1acfa0=_0x3e8c06['get'](_0x52e065);if(_0x1acfa0){const _0x523d66=new Ot({'author':_0x2e78ed['get'](_0x1acfa0['userId']),'type':_0x1acfa0['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x52e065});_0x542bb7['unshift'](_0x523d66),_0xbdc1a6['attributes'][_0x52e065]['revisionHistoryAttachChange']=_0x523d66['id'];}_0xbdc1a6['changes']=_0xbdc1a6['changes']['concat'](_0x542bb7);}return _0xbdc1a6;}['_markMarkers'](_0x29cc03,_0x2712e8){for(let _0x12adea=0x0;_0x12adea<_0x29cc03['length'];_0x12adea++)for(const [_0x56e097,_0x23189]of _0x2712e8)!_0x23189['isCollapsed']&&_0x23189['start']['isEqual'](_0x29cc03[_0x12adea]['previousPosition'])&&_0x29cc03[_0x12adea]['markersStart']['push'](_0x56e097),_0x23189['end']['isEqual'](_0x29cc03[_0x12adea]['nextPosition'])&&_0x29cc03[_0x12adea]['markersEnd']['push'](_0x56e097);}['_joinTapes'](_0xc5cac8,_0x2f0615){let _0x9495d1=[],_0x45eff8=0x0,_0x40de27=0x0;for(;_0x45eff8<_0xc5cac8['length']||_0x40de27<_0x2f0615['length'];){const _0x2e548c=_0xc5cac8[_0x45eff8]||{},_0x4dc443=_0x2f0615[_0x40de27]||{};if(_0x2e548c['id']==_0x4dc443['id'])_0x45eff8++,_0x40de27++,_0x9495d1['push'](_0x2e548c);else{if(_0x4dc443['isRemoved']&&_0x2e548c['isAdded']){const {commonTape:_0x3b99a6,iEnd:_0x543f77,jEnd:_0x39ce19}=this['_threeWayMerge'](_0xc5cac8,_0x45eff8,_0x2f0615,_0x40de27);_0x9495d1=_0x9495d1['concat'](_0x3b99a6),_0x45eff8=_0x543f77,_0x40de27=_0x39ce19;}else _0x4dc443['isRemoved']?(_0x40de27++,_0x9495d1['push'](_0x4dc443)):(_0x45eff8++,_0x9495d1['push'](_0x2e548c));}}return _0x9495d1;}['_markSuggestions'](_0x193b55,_0x2f6e2e){const _0x1c685a=[];for(let _0x3be3d1=0x0;_0x3be3d1<_0x193b55['length'];_0x3be3d1++){for(let _0x4cedcc=0x0;_0x4cedcc<_0x193b55[_0x3be3d1]['markersStart']['length'];_0x4cedcc++){const _0x36702c=_0x193b55[_0x3be3d1]['markersStart'][_0x4cedcc];if(!_0x2f6e2e['has'](_0x36702c))continue;const {group:_0x58f8cc,type:_0xd86917,authorId:_0x14bdf2}=_0x497270(_0x36702c);'revision-suggestion'!=_0x58f8cc||'insertion'!=_0xd86917&&'deletion'!=_0xd86917||(_0x1c685a['unshift']({'type':_0xd86917,'name':_0x36702c,'userId':_0x14bdf2}),_0x193b55[_0x3be3d1]['markersStart']['splice'](_0x4cedcc,0x1),_0x4cedcc--);}_0x2d35af(_0x193b55[_0x3be3d1]);for(let _0x24f2fc=0x0;_0x24f2fc<_0x193b55[_0x3be3d1]['markersEnd']['length'];_0x24f2fc++){const _0x13a779=_0x193b55[_0x3be3d1]['markersEnd'][_0x24f2fc];if(!_0x2f6e2e['has'](_0x13a779))continue;const {group:_0x589a63,type:_0x27ffbf}=_0x497270(_0x13a779);if('revision-suggestion'!=_0x589a63||'insertion'!=_0x27ffbf&&'deletion'!=_0x27ffbf)continue;_0x193b55[_0x3be3d1]['markersEnd']['splice'](_0x24f2fc,0x1),_0x24f2fc--;const _0xfc6c6b=_0x1c685a['findIndex'](_0x4f5a39=>_0x4f5a39['name']==_0x13a779);_0xfc6c6b>-0x1&&_0x1c685a['splice'](_0xfc6c6b,0x1);}}function _0x497270(_0x437560){const _0x4e8713=_0x437560['split'](':');return{'group':_0x4e8713[0x0],'type':_0x4e8713[0x1],'subType':_0x4e8713['length']>=0x5?_0x4e8713[0x2]:null,'id':_0x4e8713['length']<0x5?_0x4e8713[0x2]:_0x4e8713[0x3],'authorId':_0x4e8713['length']<0x5?_0x4e8713[0x3]:_0x4e8713[0x4],'markerCount':0x6==_0x4e8713['length']?_0x4e8713[0x5]:null};}function _0x2d35af(_0x55c3ee){for(let _0x8da4ca=0x0;_0x8da4ca<_0x1c685a['length'];_0x8da4ca++){if(_0x55c3ee['isAdded']&&'insertion'==_0x1c685a[_0x8da4ca]['type']&&_0x55c3ee['isAdded']['userId']==_0x1c685a[_0x8da4ca]['userId'])return _0x55c3ee['isAddSuggestion']=_0x1c685a[_0x8da4ca],void delete _0x55c3ee['isAdded'];if(!_0x55c3ee['isAdded']&&!_0x55c3ee['isRemoved']&&'deletion'==_0x1c685a[_0x8da4ca]['type'])return void(_0x55c3ee['isRemoveSuggestion']=_0x1c685a[_0x8da4ca]);}}}['_setDistance'](_0x1a3197,_0x124ef1){let _0xfe48a0=0x0,_0xa1dc41=!0x1;const _0x332dbb=new Map();for(const _0x5be2ca of _0x1a3197)_0x5be2ca[_0x124ef1]?_0xa1dc41&&(_0xfe48a0++,_0xa1dc41=!0x1):(_0xfe48a0++,_0xa1dc41=!0x0),_0x332dbb['set'](_0x5be2ca['id'],_0xfe48a0);for(let _0x3539d6=0x0;_0x3539d6<_0x1a3197['length'];_0x3539d6++){if('isRemoved'==_0x124ef1&&_0x1a3197[_0x3539d6]['isAdded']||'isAdded'==_0x124ef1&&_0x1a3197[_0x3539d6]['isRemoved'])continue;if('text'==_0x1a3197[_0x3539d6]['type']){_0x1a3197[_0x3539d6]['distance']=0x0;continue;}const _0x23383f=_0x332dbb['get'](_0x1a3197[_0x3539d6]['pairId']),_0x33b4f1=_0x332dbb['get'](_0x1a3197[_0x3539d6]['id']);_0x1a3197[_0x3539d6]['distance']=_0x23383f-_0x33b4f1;}}['_getRevisionsRange'](_0x3721c7,_0x2d6e1b,_0x492ce6=!0x1){const _0x166be0=[];let _0x220218=this['repository']['getIndex'](_0x3721c7),_0x1fd4d1=this['repository']['getIndex'](_0x2d6e1b);for(-0x1==_0x1fd4d1&&(_0x1fd4d1=this['repository']['_revisions']['length'],_0x492ce6=!0x1);_0x220218<_0x1fd4d1;)_0x166be0['push'](this['repository']['getRevision'](_0x220218)),_0x220218++;return _0x492ce6&&_0x166be0['push'](this['repository']['getRevision'](_0x220218)),_0x166be0;}['_threeWayMerge'](_0x20b7f6,_0x55aaf7,_0x41c760,_0x267e5c){const _0x324a27=this['editor']['model']['schema'];let _0x4e2b27=_0x55aaf7;for(;_0x20b7f6[_0x4e2b27]&&_0x20b7f6[_0x4e2b27]['isAdded'];)_0x4e2b27++;let _0x118dff=_0x267e5c;for(;_0x41c760[_0x118dff]&&_0x41c760[_0x118dff]['isRemoved'];)_0x118dff++;_0x297e95(_0x20b7f6,_0x55aaf7,_0x4e2b27),_0x297e95(_0x41c760,_0x267e5c,_0x118dff);const _0x2505b5=_0x41c760['slice'](_0x267e5c,_0x118dff)['concat'](_0x20b7f6['slice'](_0x55aaf7,_0x4e2b27));return _0x2505b5['sort']((_0x1adb4e,_0x41c3c4)=>_0x1adb4e['side']!=_0x41c3c4['side']?_0x1adb4e['side']-_0x41c3c4['side']:_0x1adb4e['level']!=_0x41c3c4['level']?_0x1adb4e['level']-_0x41c3c4['level']:_0x1adb4e['distance']!=_0x41c3c4['distance']?_0x41c3c4['distance']-_0x1adb4e['distance']:!!_0x1adb4e['isAdded']!=!!_0x41c3c4['isAdded']?-0x1==_0x1adb4e['side']||0x0==_0x1adb4e['side']?_0x1adb4e['isAdded']?-0x1:0x1:_0x1adb4e['isAdded']?0x1:-0x1:_0x1adb4e['index']-_0x41c3c4['index']),{'commonTape':_0x2505b5,'iEnd':_0x4e2b27,'jEnd':_0x118dff};function _0x297e95(_0x2602ed,_0x1985fa,_0x1173a6){let _0xd37594=-0x1,_0x55acc1=Number['POSITIVE_INFINITY'],_0xf21a6f=!0x0;for(let _0x1d3497=_0x1985fa;_0x1d3497<_0x1173a6;_0x1d3497++)if(_0x324a27['isInline'](_0x2602ed[_0x1d3497]['item'])||(_0xf21a6f=!0x1),_0x2602ed[_0x1d3497]['item']['startIndex']<_0x1985fa&&(_0xd37594=_0x1d3497),_0x2602ed[_0x1d3497]['item']['endIndex']>=_0x1173a6){_0x55acc1=_0x1d3497;break;}_0xf21a6f&&(_0xd37594=_0x1173a6-0x1);for(let _0x3c0c2a=_0x1985fa;_0x3c0c2a<_0x1173a6;_0x3c0c2a++)_0x2602ed[_0x3c0c2a]['side']=_0x3c0c2a<=_0xd37594?-0x1:_0x3c0c2a<_0x55acc1?0x0:0x1,_0x2602ed[_0x3c0c2a]['index']=_0x3c0c2a;let _0x411648=0x0;for(let _0x4191d2=_0x1985fa;_0x4191d2<=_0xd37594;_0x4191d2++)0x0==_0x2602ed[_0x4191d2]['distance']?_0x2602ed[_0x4191d2]['level']=_0x411648:(_0x411648++,_0x2602ed[_0x4191d2]['level']=_0x411648,_0x411648++);for(let _0x5508e4=_0x1985fa;_0x5508e4<_0x1173a6;_0x5508e4++)0x0==_0x2602ed[_0x5508e4]['side']&&(_0x2602ed[_0x5508e4]['level']=_0x411648);_0x411648=0x0;for(let _0x56ef51=_0x1173a6-0x1;_0x56ef51>=_0x55acc1;_0x56ef51--)0x0==_0x2602ed[_0x56ef51]['distance']?_0x2602ed[_0x56ef51]['level']=_0x411648:(_0x411648--,_0x2602ed[_0x56ef51]['level']=_0x411648,_0x411648--);}}['_fixObsoleteTags'](_0x45c4f3){const _0x384050=new Map(),_0x333485=this['editor']['model']['schema'];for(let _0x373d6a=0x1;_0x373d6a<_0x45c4f3['length'];_0x373d6a++){let _0x3c5987,_0x3e79a8,_0x496f75;const _0x541592=_0x45c4f3[_0x373d6a],_0x1bb914=_0x45c4f3[_0x373d6a-0x1];if('text'==_0x541592['type'])continue;if(_0x541592['type']!=_0x1bb914['type'])continue;if(!_0x333485['isBlock'](_0x1bb914['item'])||_0x333485['isLimit'](_0x1bb914['item']))continue;if(!_0x333485['isBlock'](_0x541592['item'])||_0x333485['isLimit'](_0x541592['item']))continue;if((_0x45c4f3[_0x373d6a]['isAdded']||_0x45c4f3[_0x373d6a]['isAddSuggestion'])&&_0x45c4f3[_0x373d6a-0x1]['isRemoved'])_0x3c5987=_0x45c4f3[_0x373d6a],_0x3e79a8=_0x45c4f3[_0x373d6a-0x1],_0x496f75=_0x373d6a-0x1;else{if(!_0x45c4f3[_0x373d6a]['isRemoved']||!_0x45c4f3[_0x373d6a-0x1]['isAdded']&&!_0x45c4f3[_0x373d6a-0x1]['isAddSuggestion'])continue;_0x3c5987=_0x45c4f3[_0x373d6a-0x1],_0x3e79a8=_0x45c4f3[_0x373d6a],_0x496f75=_0x373d6a;}const _0x57e9e3=_0x3c5987['level']==_0x3e79a8['level'],_0x5e9810=Math['abs'](_0x3c5987['level'])<Math['abs'](_0x3e79a8['level'])&&0x0==_0x3e79a8['distance'];(_0x57e9e3||_0x5e9810)&&(_0x384050['set'](_0x3e79a8['id'],_0x3c5987['id']),_0x45c4f3['splice'](_0x496f75,0x1),_0x373d6a--,_0x3c5987['isAdded']=!0x1);}for(let _0x53bac6=0x0;_0x53bac6<_0x45c4f3['length'];_0x53bac6++)_0x384050['has'](_0x45c4f3[_0x53bac6]['pairId'])&&(_0x45c4f3[_0x53bac6]['pairId']=_0x384050['get'](_0x45c4f3[_0x53bac6]['pairId']));}['_removeMissingPairs'](_0x41c2de){const _0x1f0b07=new Set(_0x41c2de['map'](_0x5d56d2=>_0x5d56d2['id']));for(let _0x515f85=0x0;_0x515f85<_0x41c2de['length'];_0x515f85++)_0x1f0b07['has'](_0x41c2de[_0x515f85]['pairId'])||0x0==_0x41c2de[_0x515f85]['distance']||(_0x41c2de[_0x515f85]['isIncorrect']=!0x0);return _0x41c2de['filter'](_0x1b8b2f=>!_0x1b8b2f['isIncorrect']);}['_markMismatchedRemovedTags'](_0x2cc5e2){const _0x52b8c0=new Set();for(let _0x14eb32=0x0;_0x14eb32<_0x2cc5e2['length'];_0x14eb32++){if(_0x52b8c0['has'](_0x2cc5e2[_0x14eb32]['id'])&&_0x2cc5e2[_0x14eb32]['isRemoved']&&(_0x2cc5e2[_0x14eb32]['isIncorrect']=!0x0),_0x2cc5e2[_0x14eb32]['isIncorrect'])continue;if(0x0==_0x2cc5e2[_0x14eb32]['distance'])continue;if('elementStart'!=_0x2cc5e2[_0x14eb32]['type'])continue;if(null==_0x2cc5e2[_0x14eb32]['pairId'])continue;let _0x36e31f=_0x14eb32+0x1,_0x3ba005=0x0;for(;_0x2cc5e2[_0x36e31f]['id']!=_0x2cc5e2[_0x14eb32]['pairId'];)'elementStart'==_0x2cc5e2[_0x36e31f]['type']?_0x3ba005++:'elementEnd'==_0x2cc5e2[_0x36e31f]['type']&&_0x3ba005--,_0x36e31f++;if(0x0!=_0x3ba005){if(_0x2cc5e2[_0x14eb32]['isRemoved'])_0x2cc5e2[_0x14eb32]['isIncorrect']=!0x0;else{for(;_0x36e31f!=_0x14eb32;)_0x2cc5e2[_0x36e31f]['isRemoved']&&0x0!=_0x2cc5e2[_0x36e31f]['distance']&&(_0x2cc5e2[_0x36e31f]['isIncorrect']=!0x0,_0x52b8c0['add'](_0x2cc5e2[_0x36e31f]['pairId'])),_0x36e31f--;}}}return _0x2cc5e2['filter'](_0x340659=>!_0x340659['isIncorrect']);}['_removeUnsupportedChanges'](_0x55655d){const _0x29cd31=this['editor']['model']['schema'];for(let _0x1861cc=0x0;_0x1861cc<_0x55655d['length'];_0x1861cc++){if(!(_0x55655d[_0x1861cc]['isAdded']||_0x55655d[_0x1861cc]['isAddSuggestion']||_0x55655d[_0x1861cc]['isRemoved']||_0x55655d[_0x1861cc]['isRemoveSuggestion']))continue;if(0x0==_0x55655d[_0x1861cc]['distance'])continue;const _0x8015c9=_0x55655d[_0x1861cc]['item'];_0x29cd31['isBlock'](_0x8015c9)||_0x29cd31['isLimit'](_0x8015c9)||(_0x55655d[_0x1861cc]['isAdded']&&delete _0x55655d[_0x1861cc]['isAdded'],_0x55655d[_0x1861cc]['isAddSuggestion']&&delete _0x55655d[_0x1861cc]['isAddSuggestion'],_0x55655d[_0x1861cc]['isRemoveSuggestion']&&delete _0x55655d[_0x1861cc]['isRemoveSuggestion'],_0x55655d[_0x1861cc]['isRemoved']&&(_0x55655d[_0x1861cc]['isIncorrect']=!0x0));}return _0x55655d['filter'](_0x4a741b=>!_0x4a741b['isIncorrect']);}['_makeModelFromTape'](_0x9f18ee,_0x4949a8,_0x2bed6,_0x34bf93){const _0x4efe27=new _0x2136fb(),_0x16c2f3=[],_0x59f5ab=new Map(),_0x50c1d1=this['editor']['model'],_0x4c809c=_0x50c1d1['schema'],_0x1d56bf=[_0x4efe27],_0x2a1484={},_0x18d24b={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x4efe27['name']=_0x34bf93;let _0x1684e2=null;const _0x201b6a=[0x0];for(let _0x1464cb=0x0;_0x1464cb<_0x9f18ee['length'];_0x1464cb++)if('elementStart'===_0x9f18ee[_0x1464cb]['type']){_0x9f18ee[_0x1464cb]['previousPosition']=_0x50c1d1['createPositionFromPath'](_0x4efe27,_0x201b6a);const _0x14bb39=new _0x5ebea3(_0x9f18ee[_0x1464cb]['item']['name'],_0x9f18ee[_0x1464cb]['item']['getAttributes']());_0x1d56bf[0x0]['_appendChild'](_0x14bb39),_0x201b6a['push'](0x0),_0x1d56bf['unshift'](_0x14bb39),_0x9f18ee[_0x1464cb]['nextPosition']=_0x50c1d1['createPositionFromPath'](_0x4efe27,_0x201b6a);}else'elementEnd'===_0x9f18ee[_0x1464cb]['type']?(_0x1d56bf['shift'](),_0x9f18ee[_0x1464cb]['previousPosition']=_0x50c1d1['createPositionFromPath'](_0x4efe27,_0x201b6a),_0x201b6a['pop'](),_0x201b6a[_0x201b6a['length']-0x1]++,_0x9f18ee[_0x1464cb]['nextPosition']=_0x50c1d1['createPositionFromPath'](_0x4efe27,_0x201b6a)):(_0x9f18ee[_0x1464cb]['previousPosition']=_0x50c1d1['createPositionFromPath'](_0x4efe27,_0x201b6a),_0x1684e2?_0x1684e2['_data']+=_0x9f18ee[_0x1464cb]['item']['data']:_0x1684e2=new _0x26fa72(_0x9f18ee[_0x1464cb]['item']['data'],_0x9f18ee[_0x1464cb]['item']['getAttributes']()),_0x9f18ee[_0x1464cb+0x1]&&'text'===_0x9f18ee[_0x1464cb+0x1]['type']&&_0x2f4b44(_0x1684e2,_0x9f18ee[_0x1464cb+0x1]['item'])||(_0x1d56bf[0x0]['_appendChild'](_0x1684e2),_0x1684e2=null),_0x201b6a[_0x201b6a['length']-0x1]+=_0x9f18ee[_0x1464cb]['item']['offsetSize'],_0x9f18ee[_0x1464cb]['nextPosition']=_0x50c1d1['createPositionFromPath'](_0x4efe27,_0x201b6a));for(let _0x26ba2c=0x0;_0x26ba2c<_0x9f18ee['length'];_0x26ba2c++){const _0x48b7d6=_0x9f18ee[_0x26ba2c]['previousPosition'],_0x45f5b7=_0x9f18ee[_0x26ba2c]['nextPosition'];for(const _0x19c1b9 of _0x9f18ee[_0x26ba2c]['markersStart'])_0x59f5ab['set'](_0x19c1b9,{'start':_0x48b7d6,'end':null});_0x48d450('isRemoveSuggestion',_0x26ba2c,_0x48b7d6,_0x45f5b7),_0x48d450('isAddSuggestion',_0x26ba2c,_0x48b7d6,_0x45f5b7),_0x48d450('isRemoved',_0x26ba2c,_0x48b7d6,_0x45f5b7),_0x48d450('isAdded',_0x26ba2c,_0x48b7d6,_0x45f5b7);for(const _0xd16c24 of _0x9f18ee[_0x26ba2c]['markersEnd']){const _0x529306=_0x59f5ab['get'](_0xd16c24);_0x529306?_0x529306['end']=_0x45f5b7:_0x59f5ab['set'](_0xd16c24,{'start':_0x45f5b7,'end':_0x45f5b7});}}for(const [_0x259401,_0x3f2e57]of _0x59f5ab){const _0x218740=this['editor']['model']['createRange'](_0x3f2e57['start'],_0x3f2e57['end']);_0x4efe27['markers']['set'](_0x259401,_0x218740);}return _0x16c2f3['sort']((_0xe14b95,_0x5e745e)=>{const _0x35ee38=_0x4efe27['markers']['get']('revision:'+_0xe14b95['id']),_0x529539=_0x4efe27['markers']['get']('revision:'+_0x5e745e['id']);return _0x35ee38['start']['isBefore'](_0x529539['start'])?-0x1:_0x35ee38['start']['isAfter'](_0x529539['start'])?0x1:_0x35ee38['end']['isBefore'](_0x529539['end'])?-0x1:_0x35ee38['end']['isAfter'](_0x529539['end'])?0x1:'add'===_0xe14b95['type']?-0x1:0x1;}),{'root':_0x4efe27,'changes':_0x16c2f3};function _0x48d450(_0x46c71f,_0x4910a5,_0x5dfe70,_0x2be3f1){const _0x3a4f99=!!_0x9f18ee[_0x4910a5][_0x46c71f],_0x5148b6=_0x3a4f99?_0x9f18ee[_0x4910a5][_0x46c71f]['userId']:null,_0x2516ca=_0x4910a5===_0x9f18ee['length']-0x1,_0x1eff3c=_0x18d24b[_0x46c71f][0x0],_0x518412=_0x4c809c['isObject'](_0x9f18ee[_0x4910a5]['item']);!_0x2a1484[_0x46c71f]&&_0x3a4f99?_0x2a1484[_0x46c71f]={'start':_0x5dfe70,'tapeItem':_0x9f18ee[_0x4910a5],'userId':_0x5148b6,'type':_0x46c71f}:_0x2a1484[_0x46c71f]&&!_0x3a4f99?(_0x2a1484[_0x46c71f]['end']=_0x5dfe70,_0x3e04da(_0x2a1484[_0x46c71f]),_0x2a1484[_0x46c71f]=null):_0x2a1484[_0x46c71f]&&_0x3a4f99&&_0x2a1484[_0x46c71f]['userId']!==_0x5148b6&&(_0x2a1484[_0x46c71f]['end']=_0x5dfe70,_0x1eff3c&&_0x1eff3c['userId']===_0x2a1484[_0x46c71f]['userId']||_0x3e04da(_0x2a1484[_0x46c71f]),_0x2a1484[_0x46c71f]={'start':_0x5dfe70,'tapeItem':_0x9f18ee[_0x4910a5],'userId':_0x5148b6,'type':_0x46c71f}),_0x2a1484[_0x46c71f]&&_0x518412&&('elementStart'!==_0x9f18ee[_0x4910a5]['type']||_0x1eff3c&&_0x1eff3c['userId']===_0x5148b6||_0x18d24b[_0x46c71f]['unshift']({'userId':_0x5148b6,'object':_0x9f18ee[_0x4910a5]['item'],'change':_0x2a1484[_0x46c71f]}),'elementEnd'===_0x9f18ee[_0x4910a5]['type']&&_0x1eff3c&&_0x1eff3c['object']===_0x9f18ee[_0x4910a5]['item']&&(_0x18d24b[_0x46c71f]['shift'](),_0x2a1484[_0x46c71f]=_0x1eff3c['change'])),_0x2a1484[_0x46c71f]&&_0x2516ca&&(_0x2a1484[_0x46c71f]['end']=_0x2be3f1,_0x3e04da(_0x2a1484[_0x46c71f]),_0x2a1484[_0x46c71f]=null);}function _0x3e04da({start:_0x47ede8,end:_0x5c9e79,tapeItem:_0x5f3390,userId:_0x218cce,type:_0x770d14}){const _0x36b3a5=_0x5f3390['item'],_0x519642=_0x50c1d1['schema']['isBlock'](_0x36b3a5)&&!_0x50c1d1['schema']['isLimit'](_0x36b3a5),_0x5f3aca=_0x47ede8['nodeAfter']==_0x5c9e79['parent']&&_0x5c9e79['isAtStart'];if(_0x519642&&_0x5f3aca)return;const _0x35f004=_0x50c1d1['createRange'](_0x47ede8,_0x5c9e79),_0x22e777=new Ot({'author':_0x4949a8['get'](_0x218cce),'type':'isAdded'==_0x770d14||'isAddSuggestion'==_0x770d14?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x770d14||'isRemoveSuggestion'==_0x770d14},'createdAt':new Date(),'rootName':_0x2bed6});_0x16c2f3['push'](_0x22e777),_0x4efe27['markers']['set']('revision:'+_0x22e777['id'],_0x35f004);}function _0x2f4b44(_0x5b959d,_0x3bb014){const _0xf4155d=_0x5b959d['getAttributes'](),_0xe83718=_0x3bb014['getAttributes']();for(const _0x4fc116 of _0xf4155d){if(_0x4fc116[0x1]!==_0x3bb014['getAttribute'](_0x4fc116[0x0]))return!0x1;_0xe83718['next']();}return _0xe83718['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x322fd6=>{const _0xedb613=_0x322fd6['markerName']['split'](':')[0x1],_0x145049=this['_getChangeFromId'](_0xedb613);if(!_0x145049)return null;const _0x2036df='add'==_0x145049['type']?'insertion':'deletion',_0x228719=['ck-suggestion-marker','ck-suggestion-marker-'+_0x2036df];return _0x145049['data']['isSuggestion']&&_0x228719['push']('ck-suggestion-marker-'+_0x2036df+'-new'),this['activeChange']==_0x145049&&_0x228719['push']('ck-suggestion-marker--active'),{'classes':_0x228719,'attributes':{'data-change-id':_0xedb613}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x35768c=>{_0x35768c['on']('element:pre',(_0x2d2f76,_0x16ea6a,_0x3b4b05)=>{const _0x22efa0=_0x16ea6a['viewItem']['getChild'](0x0);if(!_0x22efa0||!_0x22efa0['is']('element','code'))return;if(!_0x3b4b05['consumable']['consume'](_0x22efa0,{'attributes':['vid_start','vid_end']}))return;const _0x499f20=_0x16ea6a['modelRange']['start']['nodeAfter'];_0x3b4b05['writer']['setAttribute']('vid_start',_0x22efa0['getAttribute']('vid_start'),_0x499f20),_0x3b4b05['writer']['setAttribute']('vid_end',_0x22efa0['getAttribute']('vid_end'),_0x499f20);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x18a752=>{_0x18a752['on']('element',(_0x2b0c0b,_0x205b71,_0x4737c8)=>{if(!_0x4737c8['consumable']['consume'](_0x205b71['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x205b71['modelRange']['isCollapsed'])return;const _0x3216f9=_0x205b71['modelRange']['start']['nodeAfter'];_0x3216f9['hasAttribute']('vid_start')||_0x3216f9['hasAttribute']('vid')||(_0x4737c8['writer']['setAttribute']('vid_start',_0x205b71['viewItem']['getAttribute']('vid_start'),_0x3216f9),_0x4737c8['writer']['setAttribute']('vid_end',_0x205b71['viewItem']['getAttribute']('vid_end'),_0x3216f9));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x23aff2=>_0x23aff2['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x31f334,[,_0x516198])=>{['vid_start','vid_end','vid']['includes'](_0x516198)&&(_0x31f334['return']=!0x0,_0x31f334['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x39345=>{_0x39345['on']('attribute:vid',(_0x3ec42e,_0x48237d,_0x56e6d5)=>{if('\x20'!=_0x48237d['item']['data']||_0x48237d['item']['parent']['maxOffset']>0x1)return;if(!_0x56e6d5['consumable']['consume'](_0x48237d['item'],_0x3ec42e['name']))return;const _0x3ef1bd=_0x56e6d5['writer'],_0x31b44f=_0x56e6d5['mapper']['toViewRange'](_0x48237d['range']);_0x3ef1bd['wrap'](_0x31b44f,_0x3ef1bd['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x4ab63a){const _0x3322f0=_0x4ab63a['plugins']['get']('RevisionViewer');return(_0x5eadd4,_0x2e7120,_0x9aa393)=>{const _0xc3c28=_0x2e7120['markerName']['split'](':')[0x1],_0x42c592=_0x3322f0['_getChangeFromId'](_0xc3c28);if(!_0x42c592)return null;const _0x29e01b='add'==_0x42c592['type']?'split':'merge';if(!_0x9aa393['consumable']['test'](_0x2e7120['markerRange'],_0x5eadd4['name']))return;const _0xa42271=_0x2e7120['markerRange']['getWalker'](),_0x544125=_0x2e7120['markerRange']['start'],_0x8d48b3=_0x4ab63a['model']['schema'];let _0x14c0fe=null,_0x32afdb=null,_0x18ab78=!0x1,_0x215c90=!0x1;for(const _0x36886e of _0xa42271){const _0x19a523=_0x36886e['item'];_0x18ab78=_0x18ab78||_0x8d48b3['isContent'](_0x19a523);const _0x3b2382=_0x9aa393['mapper']['toViewElement'](_0x19a523);if(_0x3b2382&&_0x3b2382['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x36886e['type']&&(_0x8d48b3['isBlock'](_0x19a523)&&!_0x8d48b3['isLimit'](_0x19a523)&&(_0x19a523['nextSibling']||_0x544125['isAtEnd']?_0x14c0fe&&_0x14c0fe['parent']==_0x19a523||(_0x14c0fe=_0x19a523,_0x1637c6(_0x36886e['previousPosition']),_0x215c90=!0x0):_0x32afdb=_0x32afdb||_0x36886e['previousPosition']));}function _0x1637c6(_0x11383e){const _0x44050e=_0x9aa393['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x29e01b}),_0x240c23=_0x9aa393['mapper']['toViewPosition'](_0x11383e);_0x42c592['data']['isSuggestion']&&_0x9aa393['writer']['addClass']('ck-suggestion-marker-'+_0x29e01b+'-new',_0x44050e),_0x3322f0['activeChange']==_0x42c592&&_0x9aa393['writer']['addClass']('ck-suggestion-marker--active',_0x44050e),_0x9aa393['writer']['insert'](_0x240c23,_0x44050e),_0x9aa393['mapper']['bindElementToMarker'](_0x44050e,_0x2e7120['markerName']);}_0x18ab78||_0x215c90||!_0x32afdb||_0x1637c6(_0x32afdb);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x3ff52a,_0x566e79,_0x26231a)=>{const _0x40f9b4=_0x26231a['mapper']['markerNameToElements'](_0x566e79['markerName']);if(_0x40f9b4){for(const _0x3c1c3a of _0x40f9b4)(_0x3c1c3a['hasClass']('ck-suggestion-marker-split')||_0x3c1c3a['hasClass']('ck-suggestion-marker-merge'))&&(_0x26231a['mapper']['unbindElementFromMarkerName'](_0x3c1c3a,_0x566e79['markerName']),_0x26231a['writer']['remove'](_0x3c1c3a));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x41cd86,_0x40f52d,_0x36a9ee)=>{const _0x243641=_0x40f52d['markerName']['split'](':')[0x1],_0x38a0fe=this['_getChangeFromId'](_0x243641);if(!_0x38a0fe)return null;const _0x169717='add'==_0x38a0fe['type']?'split':'merge';if(_0x36a9ee['consumable']['test'](_0x40f52d['markerRange'],_0x41cd86['name']))for(const _0x1237cf of _0x40f52d['markerRange']['getItems']()){if(!_0x1237cf['is']('element','softBreak'))continue;const _0xe25bb2=_0x36a9ee['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x169717}),_0x1851a3=_0x36a9ee['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x1237cf));_0x38a0fe['data']['isSuggestion']&&_0x36a9ee['writer']['addClass']('ck-suggestion-marker-'+_0x169717+'-new',_0xe25bb2),this['activeChange']==_0x38a0fe&&_0x36a9ee['writer']['addClass']('ck-suggestion-marker--active',_0xe25bb2),_0x36a9ee['writer']['insert'](_0x1851a3,_0xe25bb2),_0x36a9ee['mapper']['bindElementToMarker'](_0xe25bb2,_0x40f52d['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x59b56e=>{for(const _0x34f2ac of this['editor']['model']['document']['getRootNames']()){const _0x28ab2f=this['editor']['model']['document']['getRoot'](_0x34f2ac),_0x11137f=this['editor']['editing']['view']['document']['getRoot'](_0x34f2ac);if(_0x11137f){const _0x28119f=_0x28ab2f['getAttribute']('revisionHistoryAttachChange');if(_0x59b56e['removeAttribute']('data-change-id',_0x11137f),_0x59b56e['removeClass']('ck-revision-history-root-add',_0x11137f),_0x59b56e['removeClass']('ck-revision-history-root-remove',_0x11137f),_0x59b56e['removeClass']('ck-revision-history-root--active',_0x11137f),_0x28119f){const _0x3fff37=this['_getChangeFromId'](_0x28119f);if(!_0x3fff37)return null;_0x59b56e['setAttribute']('data-change-id',_0x28119f,_0x11137f),_0x59b56e['addClass']('ck-revision-history-root-'+_0x3fff37['type'],_0x11137f),this['activeChange']==_0x3fff37&&_0x59b56e['addClass']('ck-revision-history-root--active',_0x11137f);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x55e5af=>'revision-comment:'+_0x55e5af,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x63b8d=>'revision-suggestion:'+_0x63b8d,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x38ea55=>({'name':'suggestion:'+_0x38ea55,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x428df7=>{const _0x5331d=_0x428df7['markerName']['split'](':')[0x1];return'insertion'!=_0x5331d&&'deletion'!=_0x5331d?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x5331d]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Vt(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Vt(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x234055,_0x147a34,_0x41ff75)=>{const _0x45d12e=_0x41ff75['mapper']['markerNameToElements'](_0x147a34['markerName']);if(_0x45d12e){for(const _0x29ad31 of _0x45d12e)_0x29ad31['is']('uiElement')&&(_0x41ff75['mapper']['unbindElementFromMarkerName'](_0x29ad31,_0x147a34['markerName']),_0x41ff75['writer']['remove'](_0x29ad31));}},{'priority':'high'});}['_getChangeFromId'](_0x2dc8ce){return this['_changeIdToChange']['get'](_0x2dc8ce);}['_getViewForChange'](_0x5e1657){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Nt(this['editor']['locale'],_0x5e1657),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x1a8d94,_0x58949f,_0x549205,_0x5c2296)=>{_0x5c2296&&this['_balloon']['remove'](_0x5c2296),_0x549205&&(this['_balloon']['add']({'view':_0x549205,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x4dd930=this['editor']['editing'],_0x59a772=this['_getChangeFromId'](_0x549205['changeId']);let _0x4aef03;if(_0x59a772['data']['isOnRoot']){const _0x3b486e=_0x4dd930['view']['getDomRoot'](_0x59a772['rootName']);_0x4aef03=Array['from'](_0x3b486e['getClientRects']());}else{const _0x4c75e0=this['editor']['model']['markers']['get']('revision:'+_0x549205['changeId']);_0x4aef03=Array['from'](_0x4dd930['mapper']['markerNameToElements'](_0x4c75e0['name']))['map'](_0x34ea67=>_0x4dd930['view']['domConverter']['mapViewToDom'](_0x34ea67))['map'](_0x2ae1d0=>Array['from'](_0x2ae1d0['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x4aef03['find'](_0x33d56f=>_0x33d56f['top']-0x3<=this['_activeViewTarget']['y']&&_0x33d56f['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x33d56f['left']-0x3<=this['_activeViewTarget']['x']&&_0x33d56f['right']+0x3>=this['_activeViewTarget']['x'])||_0x4aef03[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x40b19e,_0x162e86,_0x61bc07,_0x504946)=>{this['activeView']=_0x61bc07?this['_getViewForChange'](_0x61bc07):null,this['editor']['model']['change'](()=>{const _0x10c704=this['editor']['editing'];_0x504946&&(_0x504946['data']['isOnRoot']?_0x10c704['view']['change'](_0x342e98=>{_0x342e98['removeClass']('ck-revision-history-root--active',_0x10c704['view']['document']['getRoot'](_0x504946['rootName']));}):_0x10c704['reconvertMarker']('revision:'+_0x504946['id'])),_0x61bc07&&(_0x61bc07['data']['isOnRoot']?_0x10c704['view']['change'](_0x4fe5c4=>{_0x4fe5c4['addClass']('ck-revision-history-root--active',_0x10c704['view']['document']['getRoot'](_0x61bc07['rootName']));}):_0x10c704['reconvertMarker']('revision:'+_0x61bc07['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x4ffa8c,_0x46834f)=>{if(this['activeChange'])return;const _0x41e2ab=this['_findChangeIdFromDomTarget'](_0x46834f['target']),_0x5e1ad2=this['_changeIdToChange']['get'](_0x41e2ab);_0x5e1ad2?(this['_activeViewTarget']={'x':_0x46834f['domEvent']['x'],'y':_0x46834f['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x5e1ad2)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x247616,_0x528f5e)=>{const _0xddcd6f=this['_findChangeIdFromDomTarget'](_0x528f5e['target']),_0x28df17=this['_changeIdToChange']['get'](_0xddcd6f);_0x28df17?(this['_activeViewTarget']={'x':_0x528f5e['domEvent']['x'],'y':_0x528f5e['domEvent']['y']},_0x28df17===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x28df17):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x3aff13){do{const _0x342754=_0x3aff13['getAttribute']('data-change-id');if(_0x342754)return _0x342754;_0x3aff13=_0x3aff13['parent'];}while(_0x3aff13);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x1c42e8=>{for(const _0xb5ebf3 of this['editor']['model']['markers'])_0x1c42e8['removeMarker'](_0xb5ebf3);});}};function Vt(_0x400b42,_0x49f1dc){return(_0x423885,_0x32648b,_0x27a21f)=>{if(!_0x27a21f['consumable']['test'](_0x32648b['markerRange'],_0x423885['name']))return;const _0x4dbe6c=_0x32648b['markerRange']['getWalker'](),_0x149aa8=_0x32648b['markerRange']['start'],_0x1e8bb0=_0x400b42['model']['schema'];let _0x51ba87=null,_0x59961c=null,_0x47bf16=!0x1,_0x548c92=!0x1;for(const _0x1e3b47 of _0x4dbe6c){const _0x2a245e=_0x1e3b47['item'];_0x47bf16=_0x47bf16||_0x1e8bb0['isContent'](_0x2a245e);const _0x30c77f=_0x27a21f['mapper']['toViewElement'](_0x2a245e);if(_0x30c77f&&_0x30c77f['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x1e3b47['type']&&(_0x1e8bb0['isBlock'](_0x2a245e)&&!_0x1e8bb0['isLimit'](_0x2a245e)&&(_0x2a245e['nextSibling']||_0x149aa8['isAtEnd']?_0x51ba87&&_0x51ba87['parent']==_0x2a245e||(_0x51ba87=_0x2a245e,_0x2f948d(_0x1e3b47['previousPosition']),_0x548c92=!0x0):_0x59961c=_0x59961c||_0x1e3b47['previousPosition']));}function _0x2f948d(_0x323cf9){const _0x263fd5=_0x27a21f['mapper']['toViewPosition'](_0x323cf9),_0x507159=_0x27a21f['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x49f1dc});_0x27a21f['writer']['insert'](_0x263fd5,_0x507159),_0x27a21f['mapper']['bindElementToMarker'](_0x507159,_0x32648b['markerName']);}_0x47bf16||_0x548c92||!_0x59961c||_0x2f948d(_0x59961c);};}var Dt=class extends _0xe8c052{constructor(_0x1a5f6b){super(_0x1a5f6b);const _0x13d261=_0x1a5f6b['plugins']['get'](Mt);this['affectsData']=!0x1,this['listenTo'](_0x13d261,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x13d261,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x45abf5=this['editor'],_0x308d53=_0x45abf5['plugins']['get'](Mt),_0x4fc6de=_0x308d53['isReady']?_0x308d53['diff']['newRevisionId']:null;_0x45abf5['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x4fc6de);}['refresh'](){const {isReady:_0x27ad05,isEnabled:_0x4461fd,repository:_0x5df293,diff:_0x1f9ba5}=this['editor']['plugins']['get'](Mt),_0x45163b=_0x1f9ba5&&_0x5df293['getLaterVisibleRevision'](_0x1f9ba5['newRevisionId']);this['isEnabled']=_0x27ad05&&_0x4461fd&&Boolean(_0x45163b);}},Tt=class extends _0xe8c052{['_step'];constructor(_0x204461,{direction:_0x15f61d}){super(_0x204461);const _0x12d675=_0x204461['plugins']['get'](Mt);this['affectsData']=!0x1,this['_step']='forward'===_0x15f61d?0x1:-0x1,this['listenTo'](_0x12d675,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x12d675,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x12d675,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x3d8ca7=this['editor'],_0x47be1c=_0x3d8ca7['plugins']['get'](Mt),{isNavigationMode:_0x5b6ad1,currentChangeNumber:_0xfe3b03}=_0x47be1c;let _0x42653a;if(_0x47be1c['activeChange']=_0x5b6ad1?_0x47be1c['diff']['changes']['get'](_0xfe3b03+this['_step']):_0x47be1c['diff']['changes']['first'],_0x47be1c['activeChange']['data']['isOnRoot'])_0x42653a=_0x3d8ca7['editing']['view']['getDomRoot'](_0x47be1c['activeChange']['rootName']);else{const _0x137302=_0x3d8ca7['model']['markers']['get']('revision:'+_0x47be1c['activeChange']['id']);_0x42653a=_0x358092(_0x3d8ca7['editing'],_0x137302);}_0x5b653f({'target':_0x42653a,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x456786,currentChangeNumber:_0x50c2fe,numberOfChanges:_0x44a86d,isReady:_0x724f6c,isEnabled:_0x5c1217}=this['editor']['plugins']['get'](Mt);this['isEnabled']=!!(_0x5c1217&&_0x724f6c&&_0x44a86d)&&(!_0x456786||(0x1===this['_step']?_0x50c2fe<_0x44a86d-0x1:_0x50c2fe>0x0));}},Ht=class extends at{constructor(_0x47fc84){super(_0x47fc84);const _0x10e016=this['bindTemplate'],_0xdc1592=new _0x5ab628(_0x47fc84),_0x4fc100=new _0x5ab628(_0x47fc84);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',(_0x57fb1b,_0x54afc7)=>_0x57fb1b&&_0x54afc7>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x311131,_0x51bd04,_0x2e9d18,_0x3bb5c0)=>{if(!_0x311131)return pt(_0x47fc84,'Loading...');if(!_0x2e9d18)return pt(_0x47fc84,'No\x20changes');const _0xc2b70b=pt(_0x47fc84,'NUMBER_OF_CHANGES',_0x2e9d18);return _0x3bb5c0?pt(_0x47fc84,'X_OF_Y_CHANGES',[_0x51bd04+0x1,_0x2e9d18]):_0xc2b70b;}),_0xdc1592['set']({'label':pt(_0x47fc84,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x20110a}),_0x4fc100['set']({'label':pt(_0x47fc84,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x445035}),_0xdc1592['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x4fc100['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0xdc1592['on']('execute',()=>this['fire']('execute','backward')),_0x4fc100['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',_0x10e016['if']('_isStatusLabelVisible','ck-hidden',_0x1596bb=>!_0x1596bb)]},'children':[{'text':_0x10e016['to']('isNavigationMode',_0x360d54=>_0x360d54?pt(_0x47fc84,'EDIT_X_OF_Y_REVISIONS')+':\x20':pt(_0x47fc84,'Total')+':\x20')}]},{'text':_0x10e016['to']('_statusText')}]},new nt(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0xdc1592,_0x4fc100]}]});}};const Pt='ck-editor__editable__loading-overlay';var Ut=class extends _0x592ef7{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0xade1ee=this['editor']['editing']['view'];_0xade1ee['change'](_0x199898=>{for(const _0x5b90ab of _0xade1ee['document']['roots'])_0x199898['addClass'](Pt,_0x5b90ab);});}['hide'](){const _0x217e81=this['editor']['editing']['view'];_0x217e81['change'](_0x37d5b8=>{for(const _0x4b344e of _0x217e81['document']['roots'])_0x37d5b8['removeClass'](Pt,_0x4b344e);});}},Lt=class extends _0x592ef7{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Mt,Ut];}['init'](){const _0x2edd=this['editor'],_0x3cb19a=_0x2edd['plugins']['get'](Mt),_0x1d6da3=_0x2edd['plugins']['get'](Ut);_0x2edd['ui']['componentFactory']['add']('exitToEditing',_0x4641a8=>{const _0x4bb453=new _0x5ab628(_0x4641a8);return _0x4bb453['set']({'label':pt(_0x4641a8,'Back\x20to\x20editing'),'icon':_0x53d4c9,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x4bb453,'execute',()=>{_0x2edd['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x4bb453;}),_0x2edd['ui']['componentFactory']['add']('restoreRevision',_0x1b1f31=>{const _0x30606e=new _0x5ab628(_0x1b1f31);return _0x30606e['set']({'label':pt(_0x1b1f31,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x30606e['bind']('isEnabled')['to'](_0x2edd['commands']['get']('restoreRevision')),this['listenTo'](_0x30606e,'execute',()=>_0x2edd['execute']('restoreRevision')),_0x30606e;}),_0x2edd['ui']['componentFactory']['add']('changesNavigation',_0x414a9f=>{const _0x40fb6b=new Ht(_0x414a9f),_0x2f57d4=_0x2edd['commands']['get']('showPreviousChange'),_0x325181=_0x2edd['commands']['get']('showNextChange');return _0x40fb6b['bind']('isBackwardNavigationEnabled')['to'](_0x2f57d4,'isEnabled'),_0x40fb6b['bind']('isForwardNavigationEnabled')['to'](_0x325181,'isEnabled'),_0x40fb6b['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x3cb19a),this['listenTo'](_0x40fb6b,'execute',(_0x590711,_0x1332f1)=>{_0x2edd['execute']('forward'===_0x1332f1?'showNextChange':'showPreviousChange');}),_0x40fb6b;}),_0x1d6da3['show'](),_0x3cb19a['on']('change:isReady',(_0x4658d1,_0xf3c1c8,_0x63701f)=>{_0x63701f?_0x1d6da3['hide']():_0x1d6da3['show']();});}},Ft=class extends _0x1a4e29{['_resizeObserver']=null;constructor(_0x3e2a39,_0x4dbe77){super(_0x3e2a39,_0x4dbe77);const _0x176f17=this['bindTemplate'];this['set']({'label':pt(_0x3e2a39,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=pt(_0x3e2a39,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x176f17['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x33c34e(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x3fe4cc=this['fieldView']['element'];this['_tooltipString']=_0x3fe4cc['scrollWidth']>_0x3fe4cc['clientWidth']&&_0x3fe4cc['value']||'';}},$t=class extends at{constructor(_0x3810c3,_0x1ab75f,_0x271479){super(_0x3810c3);const _0x2dfbaf=new _0x52ff68();_0x2dfbaf['set']({'content':_0x320df2,'viewBox':'0\x200\x2011\x2010'});const _0x4d9b48=['ck','ck-revision-history-sidebar__revision-author'];_0x271479&&_0x4d9b48['push']('ck-revision-history-sidebar__revision-author_creator');const _0x5480c4=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':pt(_0x3810c3,_0x271479?'Revision\x20creator':'Revision\x20author')},'children':[_0x2dfbaf,_0x1ab75f['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x4d9b48},'children':_0x5480c4});}};function jt(_0x21e820,_0x3ae735){const _0x32d8b1=_0x21e820['bindTemplate'],_0x1071d2=_0x21e820['locale'],_0x4f76af=ct(_0x1071d2);_0x4f76af['panelPosition']='sw';const _0x1985e0=function(_0x3bbf8b,_0x19d974){const _0x449a3a=function(_0x567e81,_0x552d95){const _0x46204b=_0x567e81['locale'],_0xc420a={'Compare\x20against\x20selected':pt(_0x46204b,'Compare\x20against\x20selected'),'Name\x20this\x20revision':pt(_0x46204b,'Name\x20this\x20revision'),'Restore\x20this\x20revision':pt(_0x46204b,'Restore\x20this\x20revision')};return _0x552d95['map'](_0x50a629=>{const _0x1d0f1b=_0xc420a[_0x50a629['name']];return _0x1d0f1b&&_0x1d0f1b!==_0x50a629['name']&&(_0x50a629['name']=_0x1d0f1b),_0x50a629;});}(_0x3bbf8b,_0x19d974),_0x3ffcac=new _0xe1aaa7();for(const _0x4ef947 of _0x449a3a){const _0x50510c={'type':'button','model':new rt({'label':_0x4ef947['name'],'class':_0x4ef947['class'],'withText':!0x0,'role':'menuitem','_action':_0x4ef947['action']})};_0x50510c['model']['bind']('isEnabled')['to'](_0x3bbf8b,'isActionsDropdownOpen',_0x565e5e=>'function'!=typeof _0x4ef947['isEnabled']||(!_0x565e5e||_0x4ef947['isEnabled'](_0x3bbf8b))),_0x3ffcac['add'](_0x50510c);}return _0x3ffcac;}(_0x21e820,_0x3ae735);return _0x21e820['bind']('isActionsDropdownOpen')['to'](_0x4f76af,'isOpen'),_0x4f76af['buttonView']['set']({'label':pt(_0x1071d2,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0xff9c52}),_0x4f76af['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x32d8b1['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x32d8b1['to'](_0x1d0f31=>_0x1d0f31['stopPropagation']())}}),_0x4f76af['on']('execute',_0x6af1b2=>{_0x21e820['isReady']&&'function'==typeof _0x6af1b2['source']['_action']&&_0x6af1b2['source']['_action'](_0x21e820);}),ht(_0x4f76af,_0x1985e0,{'role':'menu'}),_0x4f76af['listenTo'](_0x21e820,'change:isActionsDropdownOpen',(_0x55c74a,_0xfb3da9,_0x2db417)=>{if(_0x2db417)for(const _0xab97d1 of _0x4f76af['listView']['items']){const _0x2f2383=_0xab97d1['children']['first'],_0x5686ed=_0x3ae735['find'](_0x3f47ad=>_0x3f47ad['action']===_0x2f2383['_action'])['isVisible'];_0xab97d1['isVisible']=void 0x0===_0x5686ed||_0x5686ed(_0x21e820);}}),_0x4f76af;}const Bt=/* #__PURE__ -- @preserve */
27
+ _0x54da09(at);var Kt=class extends Bt{['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x4ab881,_0x23e44a,_0x3d2601,_0x42059b){super(_0x4ab881);const _0x19ff20=this['bindTemplate'],_0xf63f37=function(_0x2685f6,_0x56eb45){const _0x3439f8=Array['from'](_0x56eb45['authors'])['filter'](_0x299295=>_0x299295!=_0x56eb45['creator']);return _0x56eb45['creator']&&_0x3439f8['unshift'](_0x56eb45['creator']),_0x3439f8['map'](_0x27e79a=>new $t(_0x2685f6,_0x27e79a,_0x27e79a==_0x56eb45['creator']));}(_0x4ab881,_0x23e44a);this['id']=_0x23e44a['id'],this['_revision']=_0x23e44a,this['_requireRevisionName']=_0x42059b,this['bind']('name','createdAt')['to'](_0x23e44a),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x2948fd=>{return _0x564d39=_0x4ab881['uiLanguage'],(_0x291f0f=_0x2948fd)['toLocaleDateString'](_0x564d39,{'month':'long','day':'numeric'})+',\x20'+_0x291f0f['toLocaleTimeString'](_0x564d39,{'hour':'numeric','minute':'numeric'});var _0x564d39,_0x291f0f;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new Ft(_0x4ab881,lt),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x44cb18=>_0x44cb18||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x558e42,_0x205d47)=>_0x558e42&&_0x205d47),this['revisionActionsView']=_0x3d2601&&_0x3d2601['length']?jt(this,_0x3d2601):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x19ff20['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x19ff20['if']('isEnabled','ck-disabled',_0x1c0772=>!_0x1c0772),_0x19ff20['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x19ff20['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x19ff20['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':_0x19ff20['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':_0xf63f37}]},this['revisionActionsView']],'on':{'click':_0x19ff20['to'](_0x3dc731=>{_0x3dc731['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x243bb3=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x243bb3,'change',()=>{this['_requireRevisionName']&&!_0x243bb3['value']||this['fire']('setName',{'id':this['id'],'name':_0x243bb3['value']}),_0x243bb3['value']||(_0x243bb3['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}};function qt(_0x3e1cd7,_0x4e43c9){const _0x5a9950=ft['fromJSDate'](_0x3e1cd7)['setLocale'](_0x4e43c9),_0x2c92c2=ft['local'](),_0x5be3bf=_0x2c92c2['minus']({'days':0x1})['startOf']('day');let _0x1085da,_0x2b633e;return _0x5a9950['hasSame'](_0x2c92c2,'day')?(_0x1085da=_0x5a9950['startOf']('day')['toJSDate'](),_0x2b633e=_0x5a9950['toRelativeCalendar']()):_0x5a9950['hasSame'](_0x5be3bf,'day')?(_0x1085da=_0x5be3bf['toJSDate'](),_0x2b633e=_0x5a9950['toRelativeCalendar']()):_0x5a9950['hasSame'](_0x2c92c2,'week')?(_0x1085da=_0x5a9950['startOf']('week')['toJSDate'](),_0x2b633e=_0x5a9950['weekdayLong']||''):_0x5a9950['hasSame'](_0x2c92c2,'year')?(_0x1085da=_0x5a9950['startOf']('month')['toJSDate'](),_0x2b633e=_0x5a9950['monthLong']||''):(_0x1085da=_0x5a9950['startOf']('year')['toJSDate'](),_0x2b633e=String(_0x5a9950['year'])),{'startDate':_0x1085da,'localizedPeriodName':_0x2b633e};}var Gt=class extends at{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x19c18b,_0x4ff13b,_0x3c381b,_0x483112){super(_0x19c18b);const _0x400762=qt(_0x4ff13b,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x4ff13b,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x3c381b,this['_requireRevisionName']=_0x483112,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':_0x400762}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x21225a){const _0x233411=new Kt(this['locale'],_0x21225a,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x233411);}['removeRevision'](_0x114dc5){const _0x2af8b5=this['revisionViews']['find'](_0xf76ae2=>_0xf76ae2['id']===_0x114dc5['id']);this['revisionViews']['remove'](_0x2af8b5);}},Jt=class extends at{constructor(_0x2d60b0){super(_0x2d60b0);const _0xf33b16=new _0x52ff68();_0xf33b16['content']=_0x5fc2b3,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0xf33b16,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[pt(_0x2d60b0,'Revision\x20history')]}]});}},Wt=class extends at{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x40a600,_0x175377,_0x152cee,_0x39e666){super(_0x40a600);const _0x37460f=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x175377,this['_revisionActions']=_0x152cee,this['_requireRevisionName']=_0x39e666,this['on']('select',(_0x1e8101,_0x4e4ddc)=>{this['fire']('revisionSelected',_0x4e4ddc);}),this['on']('setName',(_0x42c509,_0x25678d)=>{this['fire']('revisionSetName',_0x25678d);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new Jt(_0x40a600),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x37460f['if']('isEnabled','ck-disabled',_0x316b5f=>!_0x316b5f)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x2c3dfe of this['_revisions'])this['_addRevision'](_0x2c3dfe);this['_revisions']['on']('add',(_0x1300f8,_0x2c0137)=>{this['_addRevision'](_0x2c0137);}),this['_revisions']['on']('remove',(_0x506afa,_0x5e8a26)=>{this['_removeRevision'](_0x5e8a26);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x7c1da1=>_0x7c1da1['revisionViews']['map'](_0x52aac2=>_0x52aac2))['flat']();}['selectRevision'](_0x2f07cc){for(const _0x465bff of this['revisionViews'])_0x2f07cc&&_0x2f07cc['id']===_0x465bff['id']?_0x465bff['select']():_0x465bff['deselect']();}['highlightRevisions'](_0x1b653a){for(const _0x3c2d45 of this['revisionViews'])_0x1b653a['some'](({id:_0xabe570})=>_0xabe570===_0x3c2d45['id'])?_0x3c2d45['highlight']():_0x3c2d45['unhighlight']();}['_addRevision'](_0x3e66ba){const _0x216dcb=qt(_0x3e66ba['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x56c31f=this['_getTimePeriodViewByStartDate'](_0x216dcb);_0x56c31f||(_0x56c31f=new Gt(this['locale'],_0x216dcb,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x56c31f)),_0x56c31f['addRevision'](_0x3e66ba);}['_removeRevision'](_0x132ee3){const _0x4c52b0=qt(_0x132ee3['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x4c52b0)['removeRevision'](_0x132ee3);}['_getTimePeriodViewByStartDate'](_0x7e5a75){return this['timePeriodViews']['find'](_0x3d3f7c=>_0x3d3f7c['startDate']['getTime']()===_0x7e5a75['getTime']());}},Yt=class RevisionsSidebar extends _0x592ef7{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
28
28
  ((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
29
- Xt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Mt];}constructor(_0x17cd9a){super(_0x17cd9a),this['_revisionViewer']=_0x17cd9a['plugins']['get'](Mt),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x1165ee=this['_revisionsRepository']['_revisions'],_0x28e3d6=this['_createRevisionActions'](),_0x52052f=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new Wt(this['editor']['locale'],_0x1165ee,_0x28e3d6,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',(_0x2c7c0a,_0xd92550)=>{_0xd92550['revisionViews']['on']('add',(_0x492bf4,_0x6f7e5d)=>{_0x6f7e5d['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)),_0x52052f['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x303589=this['_revisionsRepository']['getRevision'](0x0);if(_0x303589){const _0x4ec44b=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x303589['id']);this['_revisionViewer']['compare'](_0x303589,_0x4ec44b);}}['_handleRevisionSelected'](_0x1d30e7,_0x11b27e){const _0x38a663=this['_revisionsRepository']['getRevision'](_0x11b27e['id']),_0x1ea0f7=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x38a663['id']);this['_revisionViewer']['compare'](_0x38a663,_0x1ea0f7);}['_handleRevisionSetName'](_0x3ae7f6,_0x4bf3bb){this['_revisionsRepository']['getRevision'](_0x4bf3bb['id'])['setName'](_0x4bf3bb['name']);}['_handleDiffChange'](_0x1627ce,_0x32eae8,_0x142315){const _0x1e2f34=this['_revisionsRepository']['getRevisionsInDiff'](_0x142315);_0x1e2f34['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x1e2f34),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x1e2f34[0x0]));}['_createRevisionActions'](){const _0x4d91b4=this['editor'],_0x5cb984=RevisionsSidebar['availableRevisionActions'],_0x1f32b6=_0x4d91b4['config']['get']('revisionHistory.revisionActions')||RevisionsSidebar['defaultRevisionActions'];if(_0x1f32b6['length'])return _0x1f32b6['map'](_0x4a5327=>{const _0x39b792='string'==typeof _0x4a5327?Object['assign']({},_0x5cb984[_0x4a5327]):_0x4a5327;return _0x39b792['action']=_0x39b792['action']['bind'](this,_0x4d91b4),_0x39b792['isVisible']&&(_0x39b792['isVisible']=_0x39b792['isVisible']['bind'](this,_0x4d91b4)),_0x39b792;});}};function Xt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x2e6ea7},_0x55bfe4)=>{const _0x54ed86=_0x2e6ea7['get'](Mt),_0x29f897=_0x54ed86['repository'];let _0x3d3687=_0x54ed86['diff']['newRevisionId'],_0x3ddf32=_0x55bfe4['id'];_0x29f897['getIndex'](_0x3d3687)>_0x29f897['getIndex'](_0x3ddf32)&&([_0x3d3687,_0x3ddf32]=[_0x3ddf32,_0x3d3687]),_0x54ed86['compare'](_0x3d3687,_0x3ddf32);},'isVisible':({plugins:_0x6e8589},_0x29fa55)=>{const _0x51ec38=_0x6e8589['get'](Mt);return!(_0x51ec38['repository']['getRevisionsInDiff'](_0x51ec38['diff'])['length']>0x2)&&!_0x29fa55['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x5e3c22,{id:_0x115f11})=>{_0x5e3c22['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x115f11);},'isVisible':({plugins:_0x5bf50f},_0x229ad2)=>!!_0x5bf50f['get'](Mt)['repository']['getLaterVisibleRevision'](_0x229ad2['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x1cc38b},{id:_0x4e2973,revisionNameView:_0x5aed48})=>{const _0x2bbfd2=_0x1cc38b['get'](Mt),_0xc6f545=_0x2bbfd2['repository']['getEarlierVisibleRevision'](_0x4e2973);_0x2bbfd2['compare'](_0x4e2973,_0xc6f545),_0x5aed48['focus'](),_0x5aed48['fieldView']['select']();}}};}var Qt=class extends _0x1e8d06{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x2018f5,_0x15b580){super(_0x2018f5),this['_view']=_0x15b580,this['_toolbarConfig']=ut(_0x2018f5['config']['get']('toolbar')),this['_elementReplacer']=new _0x5cbe36();}get['element'](){return this['view']['element'];}['init'](_0x39f445){const _0x17a43d=this['editor'],_0x56c0f4=this['view'],_0x73b41f=_0x17a43d['editing']['view'],_0x1ce4dc=_0x56c0f4['editable'];_0x1ce4dc['name']=_0x73b41f['document']['getRoot']()['rootName'],_0x56c0f4['render']();const _0x4ba7a1=_0x1ce4dc['element'];this['setEditableElement'](_0x1ce4dc['name'],_0x4ba7a1),_0x56c0f4['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x73b41f['attachDomRoot'](_0x4ba7a1),this['_elementReplacer']['replace'](_0x39f445,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x5e9986=this['view'],_0x4c6d51=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x4c6d51['detachDomRoot'](_0x5e9986['editable']['name']),_0x5e9986['destroy']();}['_initToolbar'](){const _0x5903df=this['view'];_0x5903df['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x5903df['stickyPanel']['limiterElement']=_0x5903df['element'],_0x5903df['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0xac3ece})=>_0xac3ece),_0x5903df['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x5903df['toolbar']);}},zt=class extends _0x51176f{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x20b6d6,_0x3690df,_0x1de601={}){super(_0x20b6d6),this['stickyPanel']=new st(_0x20b6d6),this['toolbar']=new ot(_0x20b6d6,{'shouldGroupWhenFull':_0x1de601['shouldToolbarGroupWhenFull']}),this['_editable']=new _0x178052(_0x20b6d6,_0x3690df);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}};const Zt=/* #__PURE__ -- @preserve */
30
- _0x2ece0b(_0x37dd64);var ti=class extends Zt{['_ui'];get['ui'](){return this['_ui'];}constructor(_0x204170,_0x3a5a9f){super(_0x3a5a9f),this['sourceElement']=_0x204170,this['model']['document']['createRoot']();const _0x12ff29=new zt(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Qt(this,_0x12ff29);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x1e442d,_0x5c06c0){const _0xfc0d4f=new this(_0x1e442d,_0x5c06c0);return await _0xfc0d4f['initPlugins'](),await _0xfc0d4f['ui']['init'](_0x1e442d),await _0xfc0d4f['data']['init'](_0xfc0d4f['config']['get']('initialData')||''),_0xfc0d4f['fire']('ready'),_0xfc0d4f;}};const ii=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];var ei=class extends _0x27a866{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x22180d){super(_0x22180d),this['result']='end',_0x22180d['editing']['view']['_overlayModeHint']='auto',_0x22180d['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},si=class extends _0x27a866{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_t,St];}constructor(_0x4a9fce){if(super(_0x4a9fce),!this['editor']['config']['get']('revisionHistory'))throw new _0x8ca7e0('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x47adb4=>this['_showRevisionViewer']({..._0x47adb4,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x1452d0=>this['_closeRevisionViewer'](_0x1452d0)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x118145=>this['_restoreRevision'](_0x118145)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x4647a9){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x4647a9;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x2eb27a){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x2eb27a);}['getRevision'](_0x79a307){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x79a307);}['getRevisions'](_0x5b0e12){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x5b0e12||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x42c505=this['editor'],_0x34c92b=_0xcceb97(_0x42c505,ii),_0x322e42=_0x42c505['plugins']['get']('RevisionTracker'),_0x16ae53=_0x42c505['plugins']['get'](_0x230a98)['users'];return _0x34c92b['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x34c92b['lazyRoots'],(_0x34c92b['plugins']['push'](ei,Mt,Lt,class RevisionViewerInit extends _0x27a866{static get['requires'](){return[Mt,_0x230a98];}['init'](){const _0x370a80=this['editor']['plugins']['get'](_0x230a98);for(const _0x7e67d2 of _0x16ae53)_0x7e67d2['isAnonymous']||_0x370a80['getUser'](_0x7e67d2['id'])||_0x370a80['addUser'](_0x7e67d2);const _0x1ec6b9=_0x322e42['repository']['getRevisions']();let _0xf89981=null;const _0x23431e=this['editor']['plugins']['get']('RevisionViewer');_0x23431e['adapter']=_0x322e42['adapter'],_0x23431e['bind']('isEnabled')['to'](_0x322e42),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x42c505,'isReadOnly',_0x2c546b=>!_0x2c546b);for(const _0x5dc5a4 of _0x1ec6b9){const _0x203fa1=null===_0x5dc5a4['creator'];if(_0x203fa1&&_0x5dc5a4['toVersion']===_0x5dc5a4['fromVersion'])continue;const _0xf007f3=_0x5dc5a4['toJSON']();_0x23431e['addRevisionData'](_0xf007f3,(_0x381150,_0x4be3e9,_0x38f795)=>{if(_0x203fa1){if(_0xf89981)_0xf89981['_update'](_0x381150,_0x4be3e9);else{if(!_0x4be3e9){const _0x5885dd=_0x38f795['toJSON']();_0x5885dd['id']=_0x32425d(),_0x322e42['saveRevision'](_0x5885dd,_0x38f795['toVersion'])['then'](_0x345c4b=>{_0xf89981=_0x345c4b;});}}}else _0x5dc5a4['_update'](_0x381150,_0x4be3e9);});}}},Yt),_0x34c92b);}['_enhanceShowRevisionViewerCallback'](){const _0x19fb17=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x286c81=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0x286c81['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x34f4b8=this['editor']['plugins']['get']('Dialog');_0x34f4b8['isOpen']&&_0x34f4b8['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x5e7389=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x5dcdc2 of _0x5e7389)_0x5dcdc2['class']=_0x5dcdc2['class']?_0x5dcdc2['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x311c93=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x311c93&&_0x311c93['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x1acbe8=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x1acbe8&&_0x1acbe8['setAttribute']('tabindex','-1');}}return _0x19fb17(this['_getRevisionViewerEditorConfig']())['then'](_0x4519a1=>(this['_viewerEditor']=_0x4519a1,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'),_0x4519a1))['catch'](_0x3db875=>(console['error'](_0x3db875),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0xa4e023=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>{if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['editor']['plugins']['has']('AITabs')){const _0xa1987e=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x5d8432 of _0xa1987e)_0x5d8432['class']='ck-tab-panel_disabled'===_0x5d8432['class']?'':_0x5d8432['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x4d4e73=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x4d4e73&&_0x4d4e73['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x57c0dd=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x57c0dd&&_0x57c0dd['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0xa4e023(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0xed547a=this['editor']['plugins']['get']('Annotations');_0xed547a['refreshVisibility'](),_0xed547a['refreshPositioning']();}});});}['_showRevisionViewer'](_0x1babd8){const _0x30328d=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x357fcf=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x23e565=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return ti['create'](_0x23e565,_0x1babd8)['then'](_0x826d3a=>(_0x357fcf['style']['display']='block',_0x30328d['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x826d3a));}['_closeRevisionViewer'](_0xbd7ed7){const _0x274d90=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x274d90['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0xbd7ed7['destroy']();}async['_restoreRevision'](_0x551574){const _0x35c8b8=this['editor'],_0x47e6ef=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x1be85a=_0x35c8b8['plugins']['get']('RevisionTracker'),_0x5262f0=_0x35c8b8['plugins']['get']('RevisionHistoryUtils'),_0x21cdcb=_0x47e6ef['repository']['getRevision'](_0x551574);let _0x38c7c6,_0x5e115f,_0x507fc1;try{await _0x5262f0['loadRevisionData'](_0x21cdcb,this['adapter']),_0x38c7c6=_0x5262f0['getRevisionDocumentData'](_0x21cdcb),_0x5e115f=_0x5262f0['getRevisionRootsAttributes'](_0x21cdcb);}catch(_0x3e1c9f){return void console['error'](_0x3e1c9f);}_0x35c8b8['model']['change'](_0x57ea36=>{for(const _0x41791b of Array['from'](_0x35c8b8['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x57ea36['removeMarker'](_0x41791b);}),_0x47e6ef['isReady']=!0x1,_0x35c8b8['model']['enqueueChange'](_0x5f313a=>{_0x5f313a['setSelection'](null),_0x5f313a['removeSelectionAttribute'](_0x35c8b8['model']['document']['selection']['getAttributeKeys']());const _0x4c6efa=Object['keys'](_0x38c7c6);for(const _0x564fc8 of _0x35c8b8['model']['document']['roots'])'$graveyard'!=_0x564fc8['rootName']&&_0x564fc8['isAttached']()&&!_0x4c6efa['includes'](_0x564fc8['rootName'])&&_0x5f313a['detachRoot'](_0x564fc8);for(const _0x55b4c8 of _0x4c6efa){let _0x3f226e=_0x35c8b8['model']['document']['getRoot'](_0x55b4c8);if(!_0x3f226e||!_0x3f226e['isAttached']()){const _0x413927=_0x21cdcb['diffData']?.[_0x55b4c8]?.['rootElementName']||'$root';_0x3f226e=_0x5f313a['addRoot'](_0x55b4c8,_0x413927);}const _0x51f1dc=_0x5e115f[_0x55b4c8],_0x55c853=Object['keys'](_0x51f1dc),_0x25b308=_0x38c7c6[_0x55b4c8];for(const _0x4a8fdf of _0x3f226e['getAttributeKeys']())_0x55c853['includes'](_0x4a8fdf)||_0x5f313a['removeAttribute'](_0x4a8fdf,_0x3f226e);for(const _0x1a89b8 of _0x55c853)_0x5f313a['setAttribute'](_0x1a89b8,_0x5e115f[_0x55b4c8][_0x1a89b8],_0x3f226e);_0x5f313a['remove'](_0x5f313a['createRangeIn'](_0x3f226e)),_0x5f313a['insert'](_0x35c8b8['data']['parse'](_0x25b308,_0x3f226e),_0x3f226e,0x0);}});const _0x229632=pt(_0x35c8b8['locale'],'Restored');if(_0x21cdcb['name'])_0x507fc1=-0x1==_0x21cdcb['name']['indexOf'](_0x229632)?_0x229632+':\x20'+_0x21cdcb['name']:_0x21cdcb['name'];else _0x507fc1=_0x229632+':\x20'+(_0x21cdcb['createdAt']['toLocaleDateString'](_0x35c8b8['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x21cdcb['createdAt']['toLocaleTimeString'](_0x35c8b8['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x1be85a['saveRevision']({'name':_0x507fc1}),_0x47e6ef['isReady']=!0x0,_0x35c8b8['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Dt as RestoreRevisionCommand,gt as Revision,si as RevisionHistory,St as RevisionHistoryUI,wt as RevisionHistoryUtils,_t as RevisionTracker,Mt as RevisionViewer,ti as RevisionViewerEditor,ei as RevisionViewerIntegration,Ut as RevisionViewerLoadingOverlay,Lt as RevisionViewerUI,mt as RevisionsRepository,Yt as RevisionsSidebar,Tt as ShowChangeCommand};
29
+ Xt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Mt];}constructor(_0x57d457){super(_0x57d457),this['_revisionViewer']=_0x57d457['plugins']['get'](Mt),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x5774e2=this['_revisionsRepository']['_revisions'],_0x1d92fc=this['_createRevisionActions'](),_0xf2ba81=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new Wt(this['editor']['locale'],_0x5774e2,_0x1d92fc,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',(_0x3ac16e,_0x336f2c)=>{_0x336f2c['revisionViews']['on']('add',(_0xae0bf1,_0x15e454)=>{_0x15e454['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)),_0xf2ba81['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x171355=this['_revisionsRepository']['getRevision'](0x0);if(_0x171355){const _0x31ba28=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x171355['id']);this['_revisionViewer']['compare'](_0x171355,_0x31ba28);}}['_handleRevisionSelected'](_0x48435b,_0x1c1a0e){const _0x1518e4=this['_revisionsRepository']['getRevision'](_0x1c1a0e['id']),_0x423111=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x1518e4['id']);this['_revisionViewer']['compare'](_0x1518e4,_0x423111);}['_handleRevisionSetName'](_0x3fd3af,_0x30649c){this['_revisionsRepository']['getRevision'](_0x30649c['id'])['setName'](_0x30649c['name']);}['_handleDiffChange'](_0x3a76ca,_0x4b1549,_0xac53cc){const _0x4c0525=this['_revisionsRepository']['getRevisionsInDiff'](_0xac53cc);_0x4c0525['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x4c0525),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x4c0525[0x0]));}['_createRevisionActions'](){const _0x443fc8=this['editor'],_0x3beccd=RevisionsSidebar['availableRevisionActions'],_0x35db60=_0x443fc8['config']['get']('revisionHistory.revisionActions')||RevisionsSidebar['defaultRevisionActions'];if(_0x35db60['length'])return _0x35db60['map'](_0x23ac70=>{const _0x84b56d='string'==typeof _0x23ac70?Object['assign']({},_0x3beccd[_0x23ac70]):_0x23ac70;return _0x84b56d['action']=_0x84b56d['action']['bind'](this,_0x443fc8),_0x84b56d['isVisible']&&(_0x84b56d['isVisible']=_0x84b56d['isVisible']['bind'](this,_0x443fc8)),_0x84b56d;});}};function Xt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x31ec7b},_0x3a2c42)=>{const _0x4dd2e2=_0x31ec7b['get'](Mt),_0x32656a=_0x4dd2e2['repository'];let _0x3d445d=_0x4dd2e2['diff']['newRevisionId'],_0x568d4c=_0x3a2c42['id'];_0x32656a['getIndex'](_0x3d445d)>_0x32656a['getIndex'](_0x568d4c)&&([_0x3d445d,_0x568d4c]=[_0x568d4c,_0x3d445d]),_0x4dd2e2['compare'](_0x3d445d,_0x568d4c);},'isVisible':({plugins:_0x4fa300},_0x3bffdb)=>{const _0x154592=_0x4fa300['get'](Mt);return!(_0x154592['repository']['getRevisionsInDiff'](_0x154592['diff'])['length']>0x2)&&!_0x3bffdb['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x1cf458,{id:_0x1f5b6d})=>{_0x1cf458['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x1f5b6d);},'isVisible':({plugins:_0x5b11d6},_0x52c997)=>!!_0x5b11d6['get'](Mt)['repository']['getLaterVisibleRevision'](_0x52c997['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x1b7edb},{id:_0x4a68a7,revisionNameView:_0x47ecf1})=>{const _0x1436c1=_0x1b7edb['get'](Mt),_0x5ad3b8=_0x1436c1['repository']['getEarlierVisibleRevision'](_0x4a68a7);_0x1436c1['compare'](_0x4a68a7,_0x5ad3b8),_0x47ecf1['focus'](),_0x47ecf1['fieldView']['select']();}}};}var Qt=class extends _0x3a737f{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x584b15,_0x4338bf){super(_0x584b15),this['_view']=_0x4338bf,this['_toolbarConfig']=ut(_0x584b15['config']['get']('toolbar')),this['_elementReplacer']=new _0x3c5642();}get['element'](){return this['view']['element'];}['init'](_0x5c84a5){const _0x362704=this['editor'],_0x4d9f92=this['view'],_0x194970=_0x362704['editing']['view'],_0x438476=_0x4d9f92['editable'];_0x438476['name']=_0x194970['document']['getRoot']()['rootName'],_0x4d9f92['render']();const _0x29cdbb=_0x438476['element'];this['setEditableElement'](_0x438476['name'],_0x29cdbb),_0x4d9f92['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x194970['attachDomRoot'](_0x29cdbb),this['_elementReplacer']['replace'](_0x5c84a5,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x1729dd=this['view'],_0xc69aee=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0xc69aee['detachDomRoot'](_0x1729dd['editable']['name']),_0x1729dd['destroy']();}['_initToolbar'](){const _0xf78e36=this['view'];_0xf78e36['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0xf78e36['stickyPanel']['limiterElement']=_0xf78e36['element'],_0xf78e36['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x59e730})=>_0x59e730),_0xf78e36['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0xf78e36['toolbar']);}},zt=class extends _0x21ca49{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x1780c3,_0x31c85b,_0x2eaee9={}){super(_0x1780c3),this['stickyPanel']=new st(_0x1780c3),this['toolbar']=new ot(_0x1780c3,{'shouldGroupWhenFull':_0x2eaee9['shouldToolbarGroupWhenFull']}),this['_editable']=new _0x27b5d1(_0x1780c3,_0x31c85b);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}};const Zt=/* #__PURE__ -- @preserve */
30
+ _0xbf5d60(_0x354082);var ti=class extends Zt{['_ui'];get['ui'](){return this['_ui'];}constructor(_0xaae990,_0x582d32){super(_0x582d32),this['sourceElement']=_0xaae990,this['model']['document']['createRoot']();const _0x29ac59=new zt(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Qt(this,_0x29ac59);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x5afa6c,_0x37c88c){const _0x298c2b=new this(_0x5afa6c,_0x37c88c);return await _0x298c2b['initPlugins'](),await _0x298c2b['ui']['init'](_0x5afa6c),await _0x298c2b['data']['init'](_0x298c2b['config']['get']('initialData')||''),_0x298c2b['fire']('ready'),_0x298c2b;}};const ii=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];var ei=class extends _0x592ef7{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4834c9){super(_0x4834c9),this['result']='end',_0x4834c9['editing']['view']['_overlayModeHint']='auto',_0x4834c9['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},si=class extends _0x592ef7{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_t,St];}constructor(_0x107925){if(super(_0x107925),!this['editor']['config']['get']('revisionHistory'))throw new _0x16b9f2('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x3134f7=>this['_showRevisionViewer']({..._0x3134f7,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x4b88b0=>this['_closeRevisionViewer'](_0x4b88b0)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x1d80f2=>this['_restoreRevision'](_0x1d80f2)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x36621e){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x36621e;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x323979){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x323979);}['getRevision'](_0x240108){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x240108);}['getRevisions'](_0x2626be){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x2626be||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x34d425=this['editor'],_0x3c0e98=_0x1292c3(_0x34d425,ii),_0x455c01=_0x34d425['plugins']['get']('RevisionTracker'),_0x48be56=_0x34d425['plugins']['get'](_0x20176c)['users'];return _0x3c0e98['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x3c0e98['lazyRoots'],(_0x3c0e98['plugins']['push'](ei,Mt,Lt,class RevisionViewerInit extends _0x592ef7{static get['requires'](){return[Mt,_0x20176c];}['init'](){const _0x18b1e9=this['editor']['plugins']['get'](_0x20176c);for(const _0x22566d of _0x48be56)_0x22566d['isAnonymous']||_0x18b1e9['getUser'](_0x22566d['id'])||_0x18b1e9['addUser'](_0x22566d);const _0x473191=_0x455c01['repository']['getRevisions']();let _0x1ea6dd=null;const _0x54ea79=this['editor']['plugins']['get']('RevisionViewer');_0x54ea79['adapter']=_0x455c01['adapter'],_0x54ea79['bind']('isEnabled')['to'](_0x455c01),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x34d425,'isReadOnly',_0xe90ce2=>!_0xe90ce2);for(const _0x27cad8 of _0x473191){const _0x57123e=null===_0x27cad8['creator'];if(_0x57123e&&_0x27cad8['toVersion']===_0x27cad8['fromVersion'])continue;const _0x5c8e7b=_0x27cad8['toJSON']();_0x54ea79['addRevisionData'](_0x5c8e7b,(_0xe6ba22,_0x3bd45f,_0x384f1e)=>{if(_0x57123e){if(_0x1ea6dd)_0x1ea6dd['_update'](_0xe6ba22,_0x3bd45f);else{if(!_0x3bd45f){const _0x36ad3c=_0x384f1e['toJSON']();_0x36ad3c['id']=_0x551659(),_0x455c01['saveRevision'](_0x36ad3c,_0x384f1e['toVersion'])['then'](_0x37d686=>{_0x1ea6dd=_0x37d686;});}}}else _0x27cad8['_update'](_0xe6ba22,_0x3bd45f);});}}},Yt),_0x3c0e98);}['_enhanceShowRevisionViewerCallback'](){const _0x38f248=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0xc55a35=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0xc55a35['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0xd7e942=this['editor']['plugins']['get']('Dialog');_0xd7e942['isOpen']&&_0xd7e942['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x1a4e77=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x299db5 of _0x1a4e77)_0x299db5['class']=_0x299db5['class']?_0x299db5['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x5e5c15=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x5e5c15&&_0x5e5c15['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x28eeee=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x28eeee&&_0x28eeee['setAttribute']('tabindex','-1');}}return _0x38f248(this['_getRevisionViewerEditorConfig']())['then'](_0x4b7544=>(this['_viewerEditor']=_0x4b7544,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'),_0x4b7544))['catch'](_0x35b9dd=>(console['error'](_0x35b9dd),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x6091a2=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>{if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['editor']['plugins']['has']('AITabs')){const _0x1258a0=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x195e06 of _0x1258a0)_0x195e06['class']='ck-tab-panel_disabled'===_0x195e06['class']?'':_0x195e06['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x1a66a3=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x1a66a3&&_0x1a66a3['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x3eb97d=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x3eb97d&&_0x3eb97d['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x6091a2(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x19fe4a=this['editor']['plugins']['get']('Annotations');_0x19fe4a['refreshVisibility'](),_0x19fe4a['refreshPositioning']();}});});}['_showRevisionViewer'](_0xf0d1ba){const _0x4fcaa5=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x238e30=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x67c44b=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return ti['create'](_0x67c44b,_0xf0d1ba)['then'](_0x3eb92a=>(_0x238e30['style']['display']='block',_0x4fcaa5['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x3eb92a));}['_closeRevisionViewer'](_0x3232c5){const _0x5e882b=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x5e882b['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x3232c5['destroy']();}async['_restoreRevision'](_0x33f6b9){const _0x558910=this['editor'],_0x1669e6=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x352e66=_0x558910['plugins']['get']('RevisionTracker'),_0x53d9b7=_0x558910['plugins']['get']('RevisionHistoryUtils'),_0x6f8bd0=_0x1669e6['repository']['getRevision'](_0x33f6b9);let _0x5734c6,_0x1e523e,_0x5b8e2d;try{await _0x53d9b7['loadRevisionData'](_0x6f8bd0,this['adapter']),_0x5734c6=_0x53d9b7['getRevisionDocumentData'](_0x6f8bd0),_0x1e523e=_0x53d9b7['getRevisionRootsAttributes'](_0x6f8bd0);}catch(_0x23a62e){return void console['error'](_0x23a62e);}_0x558910['model']['change'](_0x4c4cc2=>{for(const _0x292a0d of Array['from'](_0x558910['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x4c4cc2['removeMarker'](_0x292a0d);}),_0x1669e6['isReady']=!0x1,_0x558910['model']['enqueueChange'](_0x2b959c=>{_0x2b959c['setSelection'](null),_0x2b959c['removeSelectionAttribute'](_0x558910['model']['document']['selection']['getAttributeKeys']());const _0x4c7929=Object['keys'](_0x5734c6);for(const _0x4da712 of _0x558910['model']['document']['roots'])'$graveyard'!=_0x4da712['rootName']&&_0x4da712['isAttached']()&&!_0x4c7929['includes'](_0x4da712['rootName'])&&_0x2b959c['detachRoot'](_0x4da712);for(const _0x2ee419 of _0x4c7929){let _0x53b02a=_0x558910['model']['document']['getRoot'](_0x2ee419);if(!_0x53b02a||!_0x53b02a['isAttached']()){const _0x3ec1d8=_0x6f8bd0['diffData']?.[_0x2ee419]?.['rootElementName']||'$root';_0x53b02a=_0x2b959c['addRoot'](_0x2ee419,_0x3ec1d8);}const _0x17f75f=_0x1e523e[_0x2ee419],_0x2b82f7=Object['keys'](_0x17f75f),_0xcc9190=_0x5734c6[_0x2ee419];for(const _0x143452 of _0x53b02a['getAttributeKeys']())_0x2b82f7['includes'](_0x143452)||_0x2b959c['removeAttribute'](_0x143452,_0x53b02a);for(const _0xe8bd62 of _0x2b82f7)_0x2b959c['setAttribute'](_0xe8bd62,_0x1e523e[_0x2ee419][_0xe8bd62],_0x53b02a);_0x2b959c['remove'](_0x2b959c['createRangeIn'](_0x53b02a)),_0x2b959c['insert'](_0x558910['data']['parse'](_0xcc9190,_0x53b02a),_0x53b02a,0x0);}});const _0x3fe7cc=pt(_0x558910['locale'],'Restored');if(_0x6f8bd0['name'])_0x5b8e2d=-0x1==_0x6f8bd0['name']['indexOf'](_0x3fe7cc)?_0x3fe7cc+':\x20'+_0x6f8bd0['name']:_0x6f8bd0['name'];else _0x5b8e2d=_0x3fe7cc+':\x20'+(_0x6f8bd0['createdAt']['toLocaleDateString'](_0x558910['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x6f8bd0['createdAt']['toLocaleTimeString'](_0x558910['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x352e66['saveRevision']({'name':_0x5b8e2d}),_0x1669e6['isReady']=!0x0,_0x558910['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Dt as RestoreRevisionCommand,gt as Revision,si as RevisionHistory,St as RevisionHistoryUI,wt as RevisionHistoryUtils,_t as RevisionTracker,Mt as RevisionViewer,ti as RevisionViewerEditor,ei as RevisionViewerIntegration,Ut as RevisionViewerLoadingOverlay,Lt as RevisionViewerUI,mt as RevisionsRepository,Yt as RevisionsSidebar,Tt as ShowChangeCommand};