@ckeditor/ckeditor5-revision-history 47.7.3 → 47.7.4
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.
- package/build/revision-history.js +1 -1
- package/dist/index.js +7 -7
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +13 -13
- package/src/changeitem.js +2 -2
- package/src/editor/revisionviewereditor.js +2 -2
- package/src/editor/revisionviewereditorui.js +1 -1
- package/src/editor/revisionviewereditoruiview.js +1 -1
- package/src/index.js +1 -1
- package/src/revision.js +2 -2
- package/src/revisiondiff.js +1 -1
- package/src/revisionhistory.js +1 -1
- package/src/revisionhistoryutils.js +1 -1
- package/src/revisionsrepository.js +1 -1
- package/src/revisiontracker.js +1 -1
- package/src/revisionviewer.js +1 -1
- package/src/ui/revision/createrevisionactionsdropdown.js +1 -1
- package/src/ui/revision/revisionauthorview.js +1 -1
- package/src/ui/revision/revisionnameview.js +1 -1
- package/src/ui/revision/revisionview.js +2 -2
- package/src/ui/revision/subrevisioncollapserview.js +1 -1
- package/src/ui/revision/subrevisionview.js +1 -1
- package/src/ui/revision/utils.js +1 -1
- package/src/ui/revisionhistory/revisionhistorysaverevisionformview.js +2 -2
- package/src/ui/revisionhistory/revisionhistoryui.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebar.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebarheaderview.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebartimeperiodview.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebarview.js +1 -1
- package/src/ui/revisionssidebar/utils.js +1 -1
- package/src/ui/revisionviewer/changedetailsview.js +1 -1
- package/src/ui/revisionviewer/changesnavigationview.js +1 -1
- package/src/ui/revisionviewer/revisionviewerloadingoverlay.js +1 -1
- package/src/ui/revisionviewer/revisionviewerui.js +1 -1
- package/src/utils/common-translations.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{ObservableMixin as
|
|
24
|
-
_0x31e13c(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x1b4298){super(),this['id']=_0x1b4298['id']||_0x8d6220(),this['creator']=_0x1b4298['creator']||null,this['authors']=_0x1b4298['authors']||[],this['diffData']=_0x1b4298['diffData']||null,this['toVersion']=_0x1b4298['toVersion']||0x0,this['fromVersion']=_0x1b4298['fromVersion']||0x0,this['set']('name',_0x1b4298['name']||''),this['set']('createdAt',_0x1b4298['createdAt']||new Date()),this['set']('attributes',_0x1b4298['attributes']||{});}['setName'](_0x5a7c42){this['_update']({'name':_0x5a7c42});}['setAttribute'](_0x780424,_0x5c90d2){const _0x583bef=_0xc930c3(this['attributes']);_0x5c8f0c(_0x583bef,_0x780424,_0x5c90d2),this['_update']({'attributes':_0x583bef});}['removeAttribute'](_0x66de74){const _0x2195ec=_0xc930c3(this['attributes']);_0x1aed36(_0x2195ec,_0x66de74),this['_update']({'attributes':_0x2195ec});}['_update'](_0x59f0b4,_0x410720=!0x1){let _0x81d53e=!0x1;const _0x2be502={'id':this['id']},_0x1e1d11=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x2dedee of _0x1e1d11){const _0x4870ff=_0x59f0b4[_0x2dedee];void 0x0!==_0x4870ff&&_0x4870ff!==this[_0x2dedee]&&(this[_0x2dedee]=_0x4870ff,_0x2be502[_0x2dedee]=_0x4870ff,_0x81d53e=!0x0);}_0x81d53e&&(_0x2be502['authors']&&(_0x2be502['authorsIds']=_0x2be502['authors']['map'](_0x49ba66=>_0x49ba66['id']),delete _0x2be502['authors']),this['fire']('_update',_0x2be502,_0x410720));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x58da6a=>_0x58da6a['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class S extends _0x5ac587{['_revisions'];static get['requires'](){return[_0x280554];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x1e8042){super(_0x1e8042),this['_revisions']=new _0x4cfa07();}['afterInit'](){!async function(_0x70a1ae){const _0x55fb2c=_0xe4d228([0x76,0x73,0x6d,0x4c,0x34,0x54,0x50,0x70,0x75,0x52,0x35,0x33,0x4d,0x6c,0x71,0x53,0x6a,0x32,0x56,0x58,0x77,0x48,0x39,0x6f,0x45,0x41,0x4e,0x38,0x46,0x78,0x4a,0x74,0x47,0x55,0x4f,0x64,0x62,0x44,0x43,0x5a,0x30,0x31,0x69,0x68,0x79,0x66,0x6b,0x42,0x51,0x59,0x36,0x61,0x63,0x67,0x7a,0x37,0x72,0x49,0x65,0x57,0x4b,0x6e]),_0x19d5e9=0xeb829,_0x47043d=0x359e09b0,_0x557056=0x35998670^_0x47043d,_0x3605fc=window[_0xe4d228([0x44,0x61,0x74,0x65])][_0xe4d228([0x6e,0x6f,0x77])](),_0x5f140a=_0x70a1ae[_0xe4d228([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x20f4cf=new window[(_0xe4d228([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1de109=>{_0x5f140a[_0xe4d228([0x6f,0x6e,0x63,0x65])](_0xe4d228([0x72,0x65,0x61,0x64,0x79]),_0x1de109);}),_0x2339f5={[_0xe4d228([0x6b,0x74,0x79])]:_0xe4d228([0x45,0x43]),[_0xe4d228([0x75,0x73,0x65])]:_0xe4d228([0x73,0x69,0x67]),[_0xe4d228([0x63,0x72,0x76])]:_0xe4d228([0x50,0x2d,0x32,0x35,0x36]),[_0xe4d228([0x78])]:_0xe4d228([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0xe4d228([0x79])]:_0xe4d228([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0xe4d228([0x61,0x6c,0x67])]:_0xe4d228([0x45,0x53,0x32,0x35,0x36])},_0x49d941=_0x5f140a[_0xe4d228([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0xe4d228([0x67,0x65,0x74])](_0xe4d228([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x52195d(){let _0x403da0,_0x4f1c1d=null,_0x2ec3d6=null;try{if(_0x49d941==_0xe4d228([0x47,0x50,0x4c]))return _0xe4d228([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x403da0=_0x111605(),!_0x403da0)return _0xe4d228([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x403da0[_0xe4d228([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2ec3d6=_0x551cd0(_0x403da0[_0xe4d228([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x403da0[_0xe4d228([0x6a,0x74,0x69])])),await _0x433434()?_0x25fbff()?_0x2c6243()?_0xe4d228([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x404dcd()?(_0x403da0[_0xe4d228([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xe4d228([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4f1c1d=_0x58343a(_0xe4d228([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3f7a98()):_0xe4d228([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0xe4d228([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0xe4d228([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0xe4d228([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2c6243(){const _0x527111=[_0xe4d228([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0xe4d228([0x74,0x72,0x69,0x61,0x6c])][_0xe4d228([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x403da0[_0xe4d228([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x3605fc/0x3e8:0xe10*_0x557056;return _0x403da0[_0xe4d228([0x65,0x78,0x70])]<_0x527111;}function _0x25fbff(){const _0x180b31=_0x403da0[_0xe4d228([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x180b31)return!0x1;if(_0x180b31[_0xe4d228([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xe4d228([0x2a])))return!0x0;if(_0x180b31[_0xe4d228([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xe4d228([0x52,0x48])))return!0x0;if(_0x180b31[_0xe4d228([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xe4d228([0x52,0x52,0x48]))){if(_0x1202d9())return!0x0;if(_0x1bc499()||_0x15c4da())return!0x0;}return!0x1;}function _0x404dcd(){const _0x511a43=_0x403da0[_0xe4d228([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x511a43||0x0==_0x511a43[_0xe4d228([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0xc0d5b6}=new URL(window[_0xe4d228([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x511a43[_0xe4d228([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xc0d5b6))return!0x0;const _0x222d36=_0xc0d5b6[_0xe4d228([0x73,0x70,0x6c,0x69,0x74])](_0xe4d228([0x2e]));return _0x511a43[_0xe4d228([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4e84f4=>_0x4e84f4[_0xe4d228([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xe4d228([0x2a])))[_0xe4d228([0x6d,0x61,0x70])](_0x3d8330=>_0x3d8330[_0xe4d228([0x73,0x70,0x6c,0x69,0x74])](_0xe4d228([0x2e])))[_0xe4d228([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3cf6b8=>_0x3cf6b8[_0xe4d228([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x222d36[_0xe4d228([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0xe4d228([0x6d,0x61,0x70])](_0x25cfee=>Array(_0x222d36[_0xe4d228([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x25cfee[_0xe4d228([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0xe4d228([0x66,0x69,0x6c,0x6c])](_0x25cfee[0x0]===_0xe4d228([0x2a])?_0xe4d228([0x2a]):'')[_0xe4d228([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x25cfee))[_0xe4d228([0x73,0x6f,0x6d,0x65])](_0x162c78=>_0x222d36[_0xe4d228([0x65,0x76,0x65,0x72,0x79])]((_0x5a643e,_0x1f1435)=>_0x162c78[_0x1f1435]===_0x5a643e||_0x162c78[_0x1f1435]===_0xe4d228([0x2a])));}function _0x3f7a98(){return _0x4f1c1d&&_0x2ec3d6?new window[(_0xe4d228([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4f7430,_0xbeff6a)=>{_0x4f1c1d[_0xe4d228([0x74,0x68,0x65,0x6e])](_0x4f7430,_0xbeff6a),_0x2ec3d6[_0xe4d228([0x74,0x68,0x65,0x6e])](_0x42f516=>{_0x42f516!=_0xe4d228([0x56,0x61,0x6c,0x69,0x64])&&_0x4f7430(_0x42f516);},_0xbeff6a);}):_0x4f1c1d||_0x2ec3d6||_0xe4d228([0x56,0x61,0x6c,0x69,0x64]);}}function _0x551cd0(_0x48dc0d,_0x1a25c4){return new window[(_0xe4d228([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2de4f1=>{if(_0x308708())return _0x2de4f1(_0xe4d228([0x56,0x61,0x6c,0x69,0x64]));_0x2cf589(),_0x5f140a[_0xe4d228([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0xe4d228([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x20c004=!0x1;const _0x30582e=_0x8d6220();function _0x561c2d(_0x15694a){return!!_0x15694a&&(typeof _0x15694a===_0xe4d228([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x15694a===_0xe4d228([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x15694a[_0xe4d228([0x74,0x68,0x65,0x6e])]===_0xe4d228([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x15694a[_0xe4d228([0x63,0x61,0x74,0x63,0x68])]===_0xe4d228([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4f908c(_0xc3ee1a){_0xfe746d(_0xc3ee1a)[_0xe4d228([0x74,0x68,0x65,0x6e])](_0x434249=>{if(!_0x434249||_0x434249[_0xe4d228([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0xe4d228([0x6f,0x6b]))return _0xe4d228([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x218aad(_0x247f5e(_0x30582e+_0x1a25c4))!=_0x434249[_0xe4d228([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0xe4d228([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0xe4d228([0x56,0x61,0x6c,0x69,0x64]);})[_0xe4d228([0x74,0x68,0x65,0x6e])](_0x17b855=>(_0x4110b9(),_0x17b855),()=>{const _0x32fbb8=_0x5a7395();return null==_0x32fbb8?(_0x4110b9(),_0xe4d228([0x56,0x61,0x6c,0x69,0x64])):_0xe4d228(_0x3605fc-_0x32fbb8>(0x11928db0^_0x47043d)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0xe4d228([0x74,0x68,0x65,0x6e])](_0x2de4f1)[_0xe4d228([0x63,0x61,0x74,0x63,0x68])](()=>{_0x2de4f1(_0xe4d228([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xf2b023=0x35a8e730^_0x47043d;function _0x4110b9(){const _0x1f3d95=_0xe4d228([0x6c,0x6c,0x63,0x74,0x2d])+_0x218aad(_0x247f5e(_0x48dc0d)),_0x2d5c25=_0x13fb57(_0x218aad(window[_0xe4d228([0x4d,0x61,0x74,0x68])][_0xe4d228([0x63,0x65,0x69,0x6c])](_0x3605fc/_0xf2b023)));window[_0xe4d228([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xe4d228([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1f3d95,_0x2d5c25);}function _0x5a7395(){const _0x3408cc=_0xe4d228([0x6c,0x6c,0x63,0x74,0x2d])+_0x218aad(_0x247f5e(_0x48dc0d)),_0x1df657=window[_0xe4d228([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xe4d228([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3408cc);return _0x1df657?window[_0xe4d228([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x13fb57(_0x1df657),0x10)*_0xf2b023:null;}function _0xfe746d(_0x5bc49d){return new window[(_0xe4d228([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1a9785,_0x29ba09)=>{_0x5bc49d[_0xe4d228([0x74,0x68,0x65,0x6e])](_0x1a9785,_0x29ba09),window[_0xe4d228([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x29ba09,0x359fdd70^_0x47043d);});}}_0x5f140a[_0xe4d228([0x6f,0x6e])](_0xe4d228([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x571cc9,_0x4452e0)=>{if(_0x4452e0[0x0]!=_0x48dc0d)return _0x2de4f1(_0xe4d228([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4452e0[0x1]={..._0x4452e0[0x1],[_0xe4d228([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x30582e};},{[_0xe4d228([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xe4d228([0x68,0x69,0x67,0x68])}),_0x5f140a[_0xe4d228([0x6f,0x6e])](_0xe4d228([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x3d7445=>{_0x561c2d(_0x3d7445[_0xe4d228([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x20c004=!0x0,_0x4f908c(_0x3d7445[_0xe4d228([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0xe4d228([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xe4d228([0x6c,0x6f,0x77])}),_0x20f4cf[_0xe4d228([0x74,0x68,0x65,0x6e])](()=>{_0x20c004||_0x2de4f1(_0xe4d228([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x308708(){return _0x5f140a[_0xe4d228([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xe4d228([0x76,0x69,0x65,0x77])][_0xe4d228([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0xe4d228([0x61,0x75,0x74,0x6f]);}function _0x2cf589(){_0x5f140a[_0xe4d228([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xe4d228([0x76,0x69,0x65,0x77])][_0xe4d228([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xe4d228([0x61,0x75,0x74,0x6f]);}}function _0x58343a(_0x1dc50b){const _0x39107a=[new window[(_0xe4d228([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x74fe5a=>setTimeout(_0x74fe5a,0x3597377c^_0x47043d)),_0x20f4cf[_0xe4d228([0x74,0x68,0x65,0x6e])](()=>new window[(_0xe4d228([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x54038f=>{const _0x4edabf=0x359e09b7^_0x47043d,_0x4e8e6a=_0x70a1ae[_0xe4d228([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x145456(){_0x4e8e6a[_0xe4d228([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x4edabf&&_0x54038f();}_0x145456(),_0x4e8e6a[_0xe4d228([0x6f,0x6e])](_0xe4d228([0x61,0x64,0x64]),_0x145456);})),new window[(_0xe4d228([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4347dc=>{function _0x32a5d9(){for(const _0x4f9ebd in window)if(window[_0xe4d228([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0xe4d228([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x4f9ebd))&&window[_0x4f9ebd]==_0x19d5e9)return _0x4347dc();_0x5f140a[_0xe4d228([0x73,0x74,0x61,0x74,0x65])]!=_0xe4d228([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0xe4d228([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x32a5d9,0x359e1a38^_0x47043d);}_0x3a42b0(_0xe4d228([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x32a5d9();})];return window[_0xe4d228([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xe4d228([0x72,0x61,0x63,0x65])](_0x39107a)[_0xe4d228([0x74,0x68,0x65,0x6e])](()=>_0x1dc50b);}async function _0x225c48(){if(await _0x20f4cf,_0x3a42b0(_0xe4d228([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x51f8e7=_0x70a1ae[_0xe4d228([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x1e7772=_0x70a1ae[_0xe4d228([0x67,0x65,0x74,0x45,0x61,0x72,0x6c,0x69,0x65,0x72,0x56,0x69,0x73,0x69,0x62,0x6c,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](_0x51f8e7[_0xe4d228([0x69,0x64])]),_0x52ab4b=_0x479ae7(_0xe4d228([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x52ab4b[_0xe4d228([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x51f8e7['id'],_0x1e7772?_0x1e7772['id']:null,!0x0),_0x52ab4b[_0xe4d228([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0xe4d228([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x52ab4b[_0xe4d228([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x52ab4b[_0xe4d228([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x1f5f31,void(_0x52ab4b[_0xe4d228([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x1f5f31);}if(_0x3a42b0(_0xe4d228([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x102e7f=_0x479ae7(_0xe4d228([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x102e7f[_0xe4d228([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0xe4d228([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x102e7f[_0xe4d228([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x102e7f[_0xe4d228([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x1f5f31,_0x102e7f[_0xe4d228([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x1f5f31;}_0x5f140a[_0xe4d228([0x6d,0x6f,0x64,0x65,0x6c])][_0xe4d228([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x1f5f31,_0x5f140a[_0xe4d228([0x6d,0x6f,0x64,0x65,0x6c])][_0xe4d228([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x1f5f31,_0x5f140a[_0xe4d228([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0xe4d228([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1202d9(){return _0x3a42b0(_0xe4d228([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x479ae7(_0xe4d228([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0xe4d228([0x73,0x74,0x61,0x74,0x65])]==_0xe4d228([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x1bc499(){return _0x3a42b0(_0xe4d228([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x15c4da(){return _0x3a42b0(_0xe4d228([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x4b7743(_0x2364e9){const _0x524053=_0x4ba275();_0x5f140a[_0x524053]=_0xe4d228([0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x48,0x69,0x73,0x74,0x6f,0x72,0x79,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2364e9,_0x2364e9[_0xe4d228([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0xe4d228([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x4ba275()]=_0x19d5e9),_0x2364e9!=_0xe4d228([0x56,0x61,0x6c,0x69,0x64])&&_0x225c48();}function _0x4ba275(){const _0x38be9d=window[_0xe4d228([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0xe4d228([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0xe4d228([0x6e,0x6f,0x77])]())[_0xe4d228([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0xe4d228([0x2e]),'');let _0x56180c=_0xe4d228([0x76]);for(let _0x33d121=0x0;_0x33d121<_0x38be9d[_0xe4d228([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x33d121+=0x2){let _0x5b0d61=window[_0xe4d228([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x38be9d[_0xe4d228([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x33d121,_0x33d121+0x2));_0x5b0d61>=_0x55fb2c[_0xe4d228([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5b0d61-=_0x55fb2c[_0xe4d228([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x56180c+=_0x55fb2c[_0x5b0d61];}return _0x56180c;}function _0x111605(){const _0x217fa2=_0x49d941[_0xe4d228([0x73,0x70,0x6c,0x69,0x74])](_0xe4d228([0x2e]));if(0x3!=_0x217fa2[_0xe4d228([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xf5ac26(_0x217fa2[0x1]);function _0xf5ac26(_0x3fcb0d){const _0x158569=_0x289829(_0x3fcb0d);return _0x158569&&_0xb34f62()?_0x158569:null;function _0xb34f62(){const _0x2ac830=_0x158569[_0xe4d228([0x6a,0x74,0x69])],_0x94a66a=window[_0xe4d228([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2ac830[_0xe4d228([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2ac830[_0xe4d228([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5b315b={..._0x158569,[_0xe4d228([0x6a,0x74,0x69])]:_0x2ac830[_0xe4d228([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2ac830[_0xe4d228([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5b315b[_0xe4d228([0x76,0x63])],_0x247f5e(_0x5b315b)==_0x94a66a;}}}async function _0x433434(){let _0x246458=!0x0;try{const _0x330ec8=_0x49d941[_0xe4d228([0x73,0x70,0x6c,0x69,0x74])](_0xe4d228([0x2e])),[_0x4b77fe,_0x40af3e,_0x2f37d9]=_0x330ec8;return _0x25a7f2(_0x4b77fe),await _0x20d782(_0x4b77fe,_0x40af3e,_0x2f37d9),_0x246458;}catch{return!0x1;}function _0x25a7f2(_0xdaeee3){const _0x5e4cee=_0x289829(_0xdaeee3);_0x5e4cee&&_0x5e4cee[_0xe4d228([0x61,0x6c,0x67])]==_0xe4d228([0x45,0x53,0x32,0x35,0x36])||(_0x246458=!0x1);}async function _0x20d782(_0x2af54b,_0x25e25b,_0x24c66e){const _0x476c07=window[_0xe4d228([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0xe4d228([0x66,0x72,0x6f,0x6d])](_0x588d75(_0x24c66e),_0x23c16d=>_0x23c16d[_0xe4d228([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x50bace=new window[(_0xe4d228([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0xe4d228([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2af54b+_0xe4d228([0x2e])+_0x25e25b),_0x5dc7d1=window[_0xe4d228([0x63,0x72,0x79,0x70,0x74,0x6f])][_0xe4d228([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5dc7d1)return;const _0x3e0aae=await _0x5dc7d1[_0xe4d228([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0xe4d228([0x6a,0x77,0x6b]),_0x2339f5,{[_0xe4d228([0x6e,0x61,0x6d,0x65])]:_0xe4d228([0x45,0x43,0x44,0x53,0x41]),[_0xe4d228([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0xe4d228([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0xe4d228([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5dc7d1[_0xe4d228([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0xe4d228([0x6e,0x61,0x6d,0x65])]:_0xe4d228([0x45,0x43,0x44,0x53,0x41]),[_0xe4d228([0x68,0x61,0x73,0x68])]:{[_0xe4d228([0x6e,0x61,0x6d,0x65])]:_0xe4d228([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3e0aae,_0x476c07,_0x50bace)||(_0x246458=!0x1);}}function _0x289829(_0x2eb837){return _0x2eb837[_0xe4d228([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0xe4d228([0x65,0x79]))?JSON[_0xe4d228([0x70,0x61,0x72,0x73,0x65])](_0x588d75(_0x2eb837)):null;}function _0x588d75(_0x3ceb26){return window[_0xe4d228([0x61,0x74,0x6f,0x62])](_0x3ceb26[_0xe4d228([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0xe4d228([0x2b]))[_0xe4d228([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0xe4d228([0x2f])));}function _0x247f5e(_0x7506d5){let _0x3556a8=0x1505;function _0x2d209f(_0x118129){for(let _0x550142=0x0;_0x550142<_0x118129[_0xe4d228([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x550142++){const _0x27180c=_0x118129[_0xe4d228([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x550142);_0x3556a8=(_0x3556a8<<0x5)+_0x3556a8+_0x27180c,_0x3556a8&=_0x3556a8;}}function _0x8b254c(_0x4b5668){Array[_0xe4d228([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4b5668)?_0x4b5668[_0xe4d228([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x8b254c):_0x4b5668&&typeof _0x4b5668==_0xe4d228([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0xe4d228([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4b5668)[_0xe4d228([0x73,0x6f,0x72,0x74])]()[_0xe4d228([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x10c803,_0x2c598b])=>{_0x2d209f(_0x10c803),_0x8b254c(_0x2c598b);}):_0x2d209f(window[_0xe4d228([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4b5668));}return _0x8b254c(_0x7506d5),_0x3556a8>>>0x0;}function _0x218aad(_0x474a24){return _0x474a24[_0xe4d228([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0xe4d228([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0xe4d228([0x30]));}function _0x13fb57(_0x2ae56b){return _0x2ae56b[_0xe4d228([0x73,0x70,0x6c,0x69,0x74])]('')[_0xe4d228([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0xe4d228([0x6a,0x6f,0x69,0x6e])]('');}function _0x3a42b0(_0x3b73ee){return _0x5f140a[_0xe4d228([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0xe4d228([0x68,0x61,0x73])](_0x3b73ee);}function _0x479ae7(_0x23dd46){return _0x5f140a[_0xe4d228([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0xe4d228([0x67,0x65,0x74])](_0x23dd46);}function _0x1f5f31(){}function _0xe4d228(_0x1f4e2e){return _0x1f4e2e['map'](_0x4aa5f1=>String['fromCharCode'](_0x4aa5f1))['join']('');}_0x4b7743(await _0x52195d());}(this);}['createRevision'](_0x463026){const _0x9bd8c2=this['editor']['plugins']['get']('Users');return new I({'id':_0x463026['id'],'name':_0x463026['name'],'creator':_0x463026['creatorId']?_0x9bd8c2['getUser'](_0x463026['creatorId']):null,'diffData':_0x463026['diffData']||_0x463026['data'],'authors':_0x463026['authorsIds']['map'](_0x3d70cf=>_0x9bd8c2['getUser'](_0x3d70cf)),'createdAt':new Date(_0x463026['createdAt']),'attributes':_0x463026['attributes'],'fromVersion':_0x463026['fromVersion'],'toVersion':_0x463026['toVersion']});}['addRevision'](_0x560ad2,_0xb7d956=0x0){this['_revisions']['add'](_0x560ad2,_0xb7d956);}['getRevision'](_0x20c0a1){return this['_revisions']['get'](_0x20c0a1);}['getRevisions'](_0x5e091b={'toJSON':!0x1}){const _0x152591=Array['from'](this['_revisions']);return _0x152591['reverse'](),_0x5e091b['toJSON']?_0x152591['map'](_0x40922a=>_0x40922a['toJSON']()):_0x152591;}['getIndex'](_0x19b21e){return this['_revisions']['getIndex'](_0x19b21e);}['getEarlierVisibleRevision'](_0xc1585f){const [,_0x33e82b]=this['getRevisionsIterator'](_0xc1585f,{'direction':'earlier'});return _0x33e82b;}['getLaterVisibleRevision'](_0x114a48){const [,_0x5af305]=this['getRevisionsIterator'](_0x114a48,{'direction':'later'});return _0x5af305;}['getRevisionsInDiff'](_0x259123){const _0xb70c69=[];for(const _0x24cb14 of this['getRevisionsIterator'](_0x259123['newRevisionId']))if(_0xb70c69['push'](_0x24cb14),_0x24cb14['id']===_0x259123['oldRevisionId'])break;return _0xb70c69;}*['getRevisionsIterator'](_0xc3f09a,{direction:_0x106547='earlier',filter:_0x415dfa=()=>!0x0}={}){const _0x2d4375='earlier'===_0x106547?0x1:-0x1;let _0x29006c=this['_revisions']['get'](_0xc3f09a),_0x27f626=this['getIndex'](_0x29006c);for(yield _0x29006c;_0x29006c;){if(_0x27f626+=_0x2d4375,_0x29006c=this['getRevision'](_0x27f626),!_0x29006c)return;_0x415dfa(_0x29006c)&&(yield _0x29006c);}}}class $ extends _0x5ac587{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x28f766,'c'],[_0x32b442,'a'],[_0x304e10,'e'],[_0x483df8,'r'],[_0x27969c,'u']]);['_typeCharToViewClass']=new Map([['c',_0x28f766],['a',_0x32b442],['e',_0x304e10],['r',_0x483df8],['u',_0x27969c]]);async['loadRevisionData'](_0x515d69,_0x2ea901){if(_0x515d69['diffData']||!_0x2ea901)return;const _0x23c602=this['editor']['config']['get']('collaboration.channelId'),_0x1949a5=await _0x2ea901['getRevision']({'channelId':_0x23c602,'revisionId':_0x515d69['id']});_0x515d69['diffData']=_0x1949a5['diffData'];}['getRevisionDocumentData'](_0x5ccdfd){const _0x500fdb={};for(const _0x29af07 in _0x5ccdfd['diffData']){if(_0x5ccdfd['diffData'][_0x29af07]['attachChange']&&!_0x5ccdfd['diffData'][_0x29af07]['attachChange']['isAttached'])continue;const _0x3fca47=this['_removeRevisionMarkers'](JSON['parse'](_0x5ccdfd['diffData'][_0x29af07]['insertions'])),_0xf97bb1=this['editor']['editing']['view']['document'],_0x6cae4b=new _0x2bc6e7(_0xf97bb1,_0x3fca47['map'](_0x4084b0=>this['_getViewFromDiffObj'](_0x4084b0,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x500fdb[_0x29af07]=this['editor']['data']['processor']['toData'](_0x6cae4b),this['editor']['data']['processor']['useFillerType']('default');}return _0x500fdb;}['getRevisionRootsAttributes'](_0x1defe1){const _0x29c1b4={};for(const _0x2c873a in _0x1defe1['diffData'])_0x1defe1['diffData'][_0x2c873a]['attachChange']&&!_0x1defe1['diffData'][_0x2c873a]['attachChange']['isAttached']||(_0x29c1b4[_0x2c873a]=_0x1defe1['diffData'][_0x2c873a]['attributesAfter']||{});return _0x29c1b4;}['_getTypeCharForViewElement'](_0x385e88){return this['_viewClassToTypeChar']['get'](_0x385e88['constructor']);}['_getViewFromDiffObj'](_0x4e834f,_0x1db870){const _0xda8d44=this['editor']['editing']['view']['document'];if('string'==typeof _0x4e834f)return new _0x3879cc(_0xda8d44,_0x4e834f);{let _0x4556fb,_0x1c09b0;_0x1c09b0='u'==_0x4e834f['type']||'r'==_0x4e834f['type']?[]:_0x4e834f['children']['map'](_0x3a8f06=>this['_getViewFromDiffObj'](_0x3a8f06,_0x1db870));const _0x2d829b=this['_typeCharToViewClass']['get'](_0x4e834f['type'])||_0x49516b,_0x517921=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x4556fb=new _0x2d829b(_0xda8d44,_0x4e834f['name'],_0x4e834f['attributes'],_0x1c09b0),'u'==_0x4e834f['type']&&_0x4e834f['children'][0x0]){const _0x24827c=_0x4e834f['children'][0x0];if(_0x4556fb['render']=function(_0x48b203){const _0x5c0204=_0x48b203['createElement']('div');return _0x5c0204['innerHTML']=_0x24827c,_0x5c0204['childNodes'][0x0];},_0x1db870){const _0x78cbdf=new _0x2bc6e7(_0xda8d44);_0x78cbdf['_appendChild'](_0x4556fb);const _0x32453e=Array['from'](_0x517921['viewChildrenToDom'](_0x78cbdf,{'bind':!0x1})),_0x1f9af4=_0x517921['domDocument']['createElement']('div');_0x1f9af4['append'](..._0x32453e),_0x4556fb=Array['from'](_0x517921['domChildrenToView'](_0x1f9af4))[0x0];}}else{if('r'==_0x4e834f['type']&&_0x4e834f['children'][0x0]){const _0x528c85=_0x4e834f['children'][0x0];if(_0x4556fb['render']=function(_0x4c0cb1){_0x4c0cb1['innerHTML']=_0x528c85;},_0x1db870){const _0x119cd2=new _0x2bc6e7(_0xda8d44);_0x119cd2['_appendChild'](_0x4556fb);const _0x1584ed=Array['from'](_0x517921['viewChildrenToDom'](_0x119cd2,{'bind':!0x1})),_0x376ef9=_0x517921['domDocument']['createElement']('div');_0x376ef9['append'](..._0x1584ed);const _0x1da21d=Array['from'](_0x517921['domChildrenToView'](_0x376ef9));_0x1da21d['length']>0x1?_0x4556fb['_appendChild'](_0x1da21d):_0x4556fb=_0x1da21d[0x0];}}}if(_0x4e834f['customProperties']){for(const [_0x2ea926,_0x250380]of _0x4e834f['customProperties'])_0x4556fb['_setCustomProperty'](_0x2ea926,_0x250380);}const _0x3cbaeb=void 0x0===_0x4e834f['fillerOffset']?null:_0x4e834f['fillerOffset'];return null!==_0x3cbaeb&&(_0x4556fb['getFillerOffset']=()=>_0x3cbaeb),_0x4556fb;}}['_makeModelFromViewString'](_0x48b9cd){const _0x24c21e=JSON['parse'](_0x48b9cd),_0x2fd077=this['editor']['editing']['view']['document'],_0x2277ec=new _0x2bc6e7(_0x2fd077,_0x24c21e['map'](_0x51be80=>this['_getViewFromDiffObj'](_0x51be80,!0x0)));return this['editor']['data']['toModel'](_0x2277ec);}['_removeRevisionMarkers'](_0x10fb33){return(_0x10fb33=_0x10fb33['filter'](_0x1f7b77=>!_0x1f7b77['name']||'revision-start'!==_0x1f7b77['name']&&'revision-end'!==_0x1f7b77['name']))['forEach'](_0x5752f4=>{'string'!=typeof _0x5752f4&&(_0x5752f4['children']=this['_removeRevisionMarkers'](_0x5752f4['children']),_0x5752f4['attributes']=_0x5752f4['attributes']['filter'](_0x2a0690=>!_0x2a0690[0x0]['startsWith']('data-revision-')));}),_0x10fb33;}}function m(_0x296eba,_0x675470,_0x528f2b){const t=_0x296eba['t'];switch(_0x675470){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'},_0x528f2b);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x528f2b);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}class h extends _0x5ac587{['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[_0x280554,S,$,_0x3dfd76];}constructor(_0x52c055){super(_0x52c055),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new RevisionDataBuilder(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x3ba58a=_0x8d6220();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x3ba58a},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 _0x4e65b9=this['repository']['getRevision'](0x0),_0x46764b=_0x4e65b9&&null===_0x4e65b9['creator']?_0x4e65b9:null;if(this['_continueCurrentRevision']=!!_0x46764b&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x3cf894=this['_source']['getCurrentRevisionId'](),_0x7033c8=this['repository']['getRevision'](_0x3cf894);if(_0x7033c8)this['_startingVersion']=_0x7033c8['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x110cef=this['_source']['history']['_operations']['find'](_0x1477cb=>!_0x1477cb['_isInit']),_0x112b02=_0x110cef?_0x110cef['baseVersion']:this['_source']['history']['version'];_0x4e65b9?(_0x4e65b9['toVersion']<_0x112b02&&_0x4e65b9['_update']({'toVersion':_0x112b02}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x46764b['id'],this['_startingVersion']=_0x46764b['fromVersion']):(this['_startingVersion']=_0x4e65b9['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x112b02,this['_continueCurrentRevision']=!0x1);}}else _0x46764b&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x46764b['toVersion'],this['editor']['model']['document']['history']['version']),_0x46764b['fromVersion']===_0x46764b['toVersion']?(0x0!==_0x46764b['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x46764b['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x46764b['id'],this['_startingVersion']=_0x46764b['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',_0x4a356a=>!_0x4a356a),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x48c82f=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x32cc5c;for(const _0x1e33bb in _0x48c82f){const _0xa5da74=_0x1e33bb,_0x15a8fb=_0x48c82f[_0xa5da74];if('revisionHistoryLicenseKeyValid'==_0x15a8fb||'revisionHistoryLicenseKeyInvalid'==_0x15a8fb||'revisionHistoryLicenseKeyExpired'==_0x15a8fb||'revisionHistoryLicenseKeyDomainLimit'==_0x15a8fb||'revisionHistoryLicenseKeyNotAllowed'==_0x15a8fb||'revisionHistoryLicenseKeyEvaluationLimit'==_0x15a8fb||'revisionHistoryLicenseKeyUsageLimit'==_0x15a8fb){delete _0x48c82f[_0xa5da74],_0x32cc5c=_0x15a8fb,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x32cc5c&&_0x48c82f['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x32cc5c&&_0x48c82f['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x32cc5c&&_0x48c82f['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x32cc5c&&_0x48c82f['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x32cc5c&&_0x48c82f['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x32cc5c&&_0x48c82f['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x14768c=this['repository']['getRevision'](0x0),_0x20f4d1=await this['getRevisionDocumentData'](_0x14768c),_0x4f0265=await this['getRevisionRootsAttributes'](_0x14768c);this['_replaceEditorDataWithRevisionData'](_0x20f4d1,_0x4f0265);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x381bdd){this['_source']=_0x381bdd;}async['update'](){const _0x2d43e5=await this['_source']['getLatestVersion']();if(_0x2d43e5>this['currentRevision']['toVersion']){await this['_loadState']();const _0x3ba9e3=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x2d43e5});_0x3ba9e3['authors']=_0x3ba9e3['authorsIds']['map'](_0x35b5b3=>this['editor']['plugins']['get']('Users')['getUser'](_0x35b5b3)),this['currentRevision']['_update'](_0x3ba9e3);}}async['saveRevision'](_0x3686a3={},_0x11a03e=null){const _0x3fab5f=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x11a03e>this['currentRevision']['toVersion']&&(_0x11a03e=null),null===_0x11a03e&&(_0x11a03e=await this['_source']['getLatestVersion']());const _0x416096=this['_getFromVersion'](_0x11a03e),_0x52e4e9=this['buildRevisionData']({'from':_0x416096,'to':_0x11a03e});if(this['currentRevision']['toVersion']<_0x11a03e){const _0x306e6d=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x11a03e,'to':_0x11a03e});_0x306e6d['authors']=[],_0x306e6d['authorsIds']=[],_0x306e6d['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x306e6d,!0x0),delete _0x306e6d['authors'],_0x3fab5f['push'](_0x306e6d);}_0x3686a3['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x3686a3['name']=_0x3686a3['name']||null,_0x3686a3['id']=_0x3686a3['id']||_0x8d6220(),_0x3686a3={..._0x3686a3,..._0x52e4e9};const _0x99d7d8=this['addRevisionData'](_0x3686a3);_0x3fab5f['push'](_0x3686a3);const _0x11d4b4=this['repository']['getIndex'](_0x99d7d8);if(0x0!==_0x11d4b4){const _0x16e271=this['repository']['getRevision'](_0x11d4b4-0x1);if(_0x16e271['fromVersion']!==_0x11a03e){const _0x48edd4=this['_revisionDataBuilder']['getData'](_0x11a03e,_0x16e271['toVersion']),_0x43362b={'id':_0x16e271['id'],'diffData':_0x48edd4['diffData'],'authorsIds':_0x48edd4['authorsIds'],'authors':_0x48edd4['authorsIds']['map'](_0x556fe5=>this['editor']['plugins']['get']('Users')['getUser'](_0x556fe5)),'fromVersion':_0x11a03e};_0x16e271===this['currentRevision']&&(_0x43362b['createdAt']=new Date(_0x3686a3['createdAt']['getTime']()+0xa)),_0x16e271['_update'](_0x43362b,!0x0),delete _0x43362b['authors'],_0x3fab5f['push'](_0x43362b);}}if(this['adapter']){for(const _0x50498b of _0x3fab5f)this['_bufferUpdate'](_0x50498b['id'],_0x50498b,!0x0);this['sendBufferedUpdates']();}return _0x99d7d8;}['addRevisionData'](_0x27cb1d){const _0x408bff=this['repository']['createRevision'](_0x27cb1d);return this['adapter']&&_0x408bff['on']('_update',(_0x252eef,_0x3f71bc,_0x201098)=>{_0x201098||(this['_bufferUpdate'](_0x3f71bc['id'],_0x3f71bc,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x408bff,this['_findInsertionIndex'](_0x408bff)),_0x408bff;}async['getRevisionDocumentData'](_0x3d1b3c){return await this['_utils']['loadRevisionData'](_0x3d1b3c,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x3d1b3c);}async['getRevisionRootsAttributes'](_0x2b9e06){return await this['_utils']['loadRevisionData'](_0x2b9e06,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x2b9e06);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x252d01=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x40382c=0x0;_0x40382c<_0x252d01['length'];_0x40382c++){const _0x294063=_0x252d01[_0x40382c];let _0xf5944c=!0x1;for(const _0x1100dd of Object['keys'](_0x294063))void 0x0===_0x294063[_0x1100dd]?delete _0x294063[_0x1100dd]:'id'!==_0x1100dd&&(_0xf5944c=!0x0);_0xf5944c||(_0x252d01[_0x40382c]=null);}if(_0x252d01=_0x252d01['filter'](_0x336af0=>null!==_0x336af0),!_0x252d01['length'])return;for(let _0x4ef9c1=0x0;_0x4ef9c1<_0x252d01['length'];_0x4ef9c1++){const _0x595d7b=_0x252d01[_0x4ef9c1];void 0x0!==_0x595d7b['fromVersion']&&void 0x0===_0x595d7b['toVersion']&&(_0x595d7b['toVersion']=this['repository']['getRevision'](_0x595d7b['id'])['toVersion']),void 0x0!==_0x595d7b['toVersion']&&void 0x0===_0x595d7b['fromVersion']&&(_0x595d7b['fromVersion']=this['repository']['getRevision'](_0x595d7b['id'])['fromVersion']);}const _0x516c8d=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x252d01,_0x516c8d)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x51e624=>{if(_0x51e624){for(const _0x1ea385 of _0x51e624)this['setRevisionData']({'id':_0x1ea385['id'],'createdAt':_0x1ea385['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x1f0c27=null,from:_0x6a26f6=null,to:_0x429caa=null}){_0x6a26f6=null!==_0x6a26f6?_0x6a26f6:_0x1f0c27['fromVersion'],_0x429caa=null!==_0x429caa?_0x429caa:_0x1f0c27['toVersion'];const _0x13bf40=this['_revisionDataBuilder']['getData'](_0x6a26f6,_0x429caa),_0x4d0f61={'diffData':_0x13bf40['diffData'],'authorsIds':_0x13bf40['authorsIds'],'fromVersion':_0x6a26f6,'toVersion':_0x429caa};if(!_0x1f0c27||_0x429caa!==_0x1f0c27['toVersion']){const _0x59c9bf=_0x429caa-0x1,_0x5c2f16=this['_source']['history']['getOperation'](_0x59c9bf);_0x4d0f61['createdAt']=_0x5c2f16&&_0x5c2f16['createdAt']||new Date();}if(this['_loadedStateData']&&_0x6a26f6===this['_loadedStateData']['fromVersion']){for(const _0x3063f6 of this['_loadedStateData']['authors'])_0x4d0f61['authorsIds']['includes'](_0x3063f6['id'])||_0x4d0f61['authorsIds']['push'](_0x3063f6['id']);}return _0x4d0f61;}['_bufferUpdate'](_0x503fd8,_0x2db9bc,_0x19ccd4){if(this['_bufferedUpdates']['has'](_0x503fd8)){const _0x1d6c0c=this['_bufferedUpdates']['get'](_0x503fd8);_0x2db9bc=_0x19ccd4?{..._0x1d6c0c,..._0x2db9bc}:{..._0x2db9bc,..._0x1d6c0c};}this['_bufferedUpdates']['set'](_0x503fd8,_0x2db9bc);}['setRevisionData'](_0x3361d3){const _0x4e9992=this['repository']['getRevision'](_0x3361d3['id']);if(_0x3361d3['createdAt']&&(_0x3361d3['createdAt']=new Date(_0x3361d3['createdAt'])),_0x3361d3['authorsIds']){const _0xaf87e6=this['editor']['plugins']['get']('Users');_0x3361d3['authors']=_0x3361d3['authorsIds']['map'](_0x345804=>_0xaf87e6['getUser'](_0x345804));}_0x4e9992['_update'](_0x3361d3,!0x0);}['_createInitialRevision'](_0x4f6df3){const _0x4f1eec=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x4f1eec)this['_initialRevisionId']=_0x4f1eec['id'];else{const _0x4f7934=!this['editor']['model']['document']['roots']['find'](_0x487fcc=>this['editor']['model']['hasContent'](_0x487fcc)),_0x21659a=this['editor']['plugins']['get']('Users')['me']['id'],_0x2e1bde=m(this['editor']['locale'],_0x4f7934?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x4f6df3,'to':_0x4f6df3,'id':this['_initialRevisionId'],'name':_0x2e1bde,'creatorId':_0x21659a});}}['_createCurrentRevision'](_0x2d2335){const _0x115344=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x115344),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x2d2335,'to':_0x2d2335,'id':_0x115344,'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'](_0x228aef,_0x1de01a){let _0xded6a2=this['editor']['config']['get']('initialData'),_0x4d683e=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0xded6a2){_0xded6a2={};for(const _0x227a21 of this['editor']['model']['document']['getRootNames']())_0xded6a2[_0x227a21]='';}if('string'==typeof _0xded6a2&&(_0xded6a2={'main':_0xded6a2}),void 0x0===_0x4d683e){_0x4d683e={};for(const _0x5377b of this['editor']['model']['document']['getRootNames']())_0x4d683e[_0x5377b]={};}let _0x9d97a8=!0x1;const _0x4457ef=Object['keys'](_0xded6a2),_0x261e5a=Object['keys'](_0x228aef);for(const _0x31b775 of _0x4457ef){if(_0xded6a2[_0x31b775]!==_0x228aef[_0x31b775]&&''!==_0xded6a2[_0x31b775]['trim']()){_0x9d97a8=!0x0;break;}if(!_0xba9853(_0x4d683e[_0x31b775],_0x1de01a[_0x31b775])&&Object['keys'](_0x4d683e[_0x31b775])['length']>0x0){_0x9d97a8=!0x0;break;}}_0x9d97a8||(_0x9d97a8=_0x261e5a['some'](_0x489739=>!this['editor']['model']['document']['getRoot'](_0x489739))),_0x9d97a8&&_0x9fdb5c('editor-initial-data-replaced-with-revision-data',{'editorData':_0xded6a2,'editorRootsAttributes':_0x4d683e,'revisionData':_0x228aef,'revisionRootsAttributes':_0x1de01a}),this['editor']['config']['set']('initialData',_0x228aef),this['editor']['config']['set']('rootsAttributes',_0x1de01a);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x2c0899=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x2c0899['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x4b3402){const _0x5db21d=this['repository']['getRevisions']();_0x5db21d['reverse']();let _0x10f661=0x0;for(;_0x10f661<_0x5db21d['length'];){const _0x2678ea=_0x5db21d[_0x10f661];if(_0x2678ea===this['currentRevision']){_0x10f661++;continue;}if(_0x2678ea['id']===this['_initialRevisionId'])break;const _0x2e900b=_0x4b3402['toVersion']-_0x2678ea['toVersion']||_0x4b3402['fromVersion']-_0x2678ea['fromVersion'];if(_0x2e900b>0x0)break;if(_0x2e900b<0x0)_0x10f661++;else{if(!_0x4b3402['creator']&&_0x2678ea['creator'])break;if(_0x2678ea['creator']||!_0x4b3402['creator']){if(_0x4b3402['createdAt']>_0x2678ea['createdAt'])break;_0x10f661++;}else _0x10f661++;}}return _0x10f661;}['_getFromVersion'](_0x4addea){const _0x3b7462=this['repository']['getRevisions']();_0x3b7462['reverse'](),_0x3b7462['shift']();const _0x3a3fe2=_0x3b7462['find'](_0x386532=>_0x386532['toVersion']<=_0x4addea)['toVersion'];return _0x3a3fe2<this['_startingVersion']?this['_startingVersion']:_0x3a3fe2;}['_makeRevision']({name:_0x1ec3e3,from:_0x290f7d,to:_0xfbc591,creatorId:_0x471319,id:_0x4205da}){const _0x320542=this['buildRevisionData']({'from':_0x290f7d,'to':_0xfbc591});_0x320542['name']=_0x1ec3e3,_0x320542['creatorId']=_0x471319,_0x320542['id']=_0x4205da;const _0x475d7f=this['addRevisionData'](_0x320542);return this['adapter']&&this['_bufferUpdate'](_0x320542['id'],_0x320542,!0x0),_0x475d7f;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class RevisionDataBuilder{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x49b250){this['editor']=_0x49b250,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'](_0x59635b){this['source']=_0x59635b;const _0x1ea777=new Map(),_0x20ead8=new Map(),_0x54ab82=this['editor']['model']['document']['roots']['map'](_0x138099=>_0x138099['rootName']);for(const _0x1e4d80 of _0x54ab82){const _0x7c6221=this['editor']['model']['document']['getRoot'](_0x1e4d80),_0x228ce6=x(_0x7c6221);_0x1ea777['set'](_0x1e4d80,_0x228ce6),_0x20ead8['set'](_0x1e4d80,Object['fromEntries'](_0x7c6221['getAttributes']()));}const _0x4f7f6f=Array['from'](this['editor']['model']['markers'])['map'](_0x4a65d1=>[_0x4a65d1['name'],_0x4a65d1['getRange']()]),_0x3fe714=this['source']['version'];this['_saveMetaData'](_0x3fe714,_0x1ea777,_0x4f7f6f,_0x20ead8),this['_startingRevisionId']=this['_revisionId'];const _0x3e5eb6=new Map(),_0x32fde6=new Map();for(const _0x5d1319 of _0x54ab82){const _0x37560e=K(_0x5d1319);_0x3e5eb6['set'](_0x5d1319,_0x37560e),_0x32fde6['set'](_0x5d1319,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x3e5eb6,[],_0x32fde6);}['getData'](_0x577ad9,_0x5a2055){if(this['_lastFrom']===_0x577ad9&&this['_lastTo']<=_0x5a2055)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x5a2055,!0x0);else{if(!this['_savedMetaData']['has'](_0x577ad9)){const _0x18a1d6=this['_getPreviousFrom'](_0x577ad9);this['_calculateMetaData'](_0x18a1d6,_0x577ad9,!0x1);}this['_calculateMetaData'](_0x577ad9,_0x5a2055,!0x0);}return this['_lastFrom']=_0x577ad9,this['_lastTo']=_0x5a2055,this['_getState']();}['loadState'](_0x2d1745){if(!this['_savedMetaData']['has'](_0x2d1745['fromVersion'])){const _0x442be=this['_getPreviousFrom'](_0x2d1745['fromVersion']);this['_calculateMetaData'](_0x442be,_0x2d1745['fromVersion'],!0x1);}this['_calculateMetaData'](_0x2d1745['fromVersion'],_0x2d1745['toVersion'],!0x1);const _0x68448a=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x2d1745['fromVersion'],this['_lastTo']=_0x2d1745['toVersion'];for(const _0xfbc9bc in _0x2d1745['diffData']){const _0x8afae8=_0x2d1745['diffData'][_0xfbc9bc]['attachChange'],_0x1e34e1=_0xc930c3(_0x2d1745['diffData'][_0xfbc9bc]['attributesBefore'])||{},_0x25b8af=_0x68448a['_makeModelFromViewString'](_0x2d1745['diffData'][_0xfbc9bc]['deletions']);_0x25b8af['rootName']=_0xfbc9bc,_0x25b8af['_isAttached']=!_0x8afae8||!_0x8afae8['isAttached'],_0x25b8af['isAttached']=()=>_0x25b8af['_isAttached'],this['_baseRoots']['set'](_0xfbc9bc,_0x25b8af),this['_baseRootsAttributes']['set'](_0xfbc9bc,_0x1e34e1),_0x8afae8&&this['_touchedRoots']['set'](_0xfbc9bc,_0x8afae8);const _0x5f2934=this['_makeIdsRoot'](_0x25b8af);this['_baseIdsRoots']['set'](_0xfbc9bc,_0x5f2934);for(const [_0x46c90d,_0x1674c0]of _0x25b8af['markers']){if(!_0x46c90d['startsWith']('revision:'))continue;const _0x253150=_0x46c90d['split'](':')[0x2];for(const _0x361ed9 of _0x1674c0['getWalker']({'singleCharacters':!0x0})){const _0x57408e=this['_getVidAttributeName'](_0x361ed9),_0x27a543='elementEnd'==_0x361ed9['type']?_0x361ed9['previousPosition']['path']['slice'](0x0,-0x1):_0x361ed9['previousPosition']['path'],_0x227ec5=_0x5f2934['getNodeByPath'](_0x27a543)['getAttribute'](_0x57408e);this['_touched']['set'](_0x227ec5,{'userId':_0x253150});}_0x25b8af['markers']['delete'](_0x46c90d);}}this['_startingRevisionId']=this['_revisionId'];const _0x117395=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x151dc8=>!this['_touched']['has'](_0x151dc8));let _0x293e22=0x0;const _0x19366d=new Map();for(const _0x20abfe in _0x2d1745['diffData']){const _0x3fe7f0=_0x2d1745['diffData'][_0x20abfe]['attachChange'],_0x47a309=_0xc930c3(_0x2d1745['diffData'][_0x20abfe]['attributesAfter'])||{},_0x2cc620=_0x68448a['_makeModelFromViewString'](_0x2d1745['diffData'][_0x20abfe]['insertions']);_0x2cc620['rootName']=_0x20abfe,_0x2cc620['_isAttached']=!_0x3fe7f0||_0x3fe7f0['isAttached'],_0x2cc620['isAttached']=()=>_0x2cc620['_isAttached'],this['_diffRoots']['set'](_0x20abfe,_0x2cc620),this['_diffRootsAttributes']['set'](_0x20abfe,_0x47a309);const _0x488e2b=this['_makeIdsRoot'](_0x2cc620,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x20abfe,_0x488e2b),_0x19366d['set'](_0x20abfe,_0x2cc620['isAttached']()?_0x47a309:{});for(const [_0x10cf82,_0x58db15]of _0x2cc620['markers']){if(!_0x10cf82['startsWith']('revision:'))continue;const _0x5c5169=_0x10cf82['split'](':')[0x2];for(const _0x33c621 of _0x58db15['getWalker']({'singleCharacters':!0x0})){const _0x1caa1d=this['_getVidAttributeName'](_0x33c621),_0x1ded96=this['_revisionId']++,_0x55e04b='elementEnd'==_0x33c621['type']?_0x33c621['previousPosition']['path']['slice'](0x0,-0x1):_0x33c621['previousPosition']['path'];_0x488e2b['getNodeByPath'](_0x55e04b)['_setAttribute'](_0x1caa1d,_0x1ded96),this['_touched']['set'](_0x1ded96,{'userId':_0x5c5169});}_0x2cc620['markers']['delete'](_0x10cf82);}for(const _0x156cad of this['editor']['model']['createRangeIn'](_0x2cc620)['getWalker']({'singleCharacters':!0x0})){const _0x1e6509=this['_getVidAttributeName'](_0x156cad),_0x3368f6='elementEnd'==_0x156cad['type']?_0x156cad['previousPosition']['path']['slice'](0x0,-0x1):_0x156cad['previousPosition']['path'],_0x14c0fd=_0x488e2b['getNodeByPath'](_0x3368f6);_0x14c0fd['getAttribute'](_0x1e6509)>0x0||_0x14c0fd['_setAttribute'](_0x1e6509,_0x117395[_0x293e22++]);}for(const [_0x22367d,_0x270c02]of _0x2cc620['markers'])_0x22367d['startsWith']('revision:')||this['_markers']['set'](_0x22367d,_0x270c02);}const {roots:_0xd77193}=this['_savedMetaData']['get'](_0x2d1745['fromVersion']),{roots:_0x32de1}=this['_savedMetaData']['get'](_0x2d1745['toVersion']),_0x3fb246=x(_0xd77193['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x3fb246),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x3fb246,Number['NEGATIVE_INFINITY']));const _0x24dc78=x(_0x32de1['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x24dc78),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x24dc78));const _0x49d8d9=Array['from'](this['_diffRoots'])['map'](([_0xa10316,_0x12cb6c])=>[_0xa10316,x(_0x12cb6c)]);this['_saveMetaData'](this['_lastTo'],_0x49d8d9,this['_markers'],_0x19366d);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x52d892,_0x499a03,_0x4132cb,_0x566062){const _0x2c32c2=new Map(_0x499a03),_0x23107c=new Map(_0xc930c3(_0x566062)),_0x49637d=new Map();for(const [_0x57aab9,_0x20ca1e]of _0x4132cb)_0x49637d['set'](_0x57aab9,{'start':_0x20ca1e['start']['clone'](),'end':_0x20ca1e['end']['clone'](),'rootName':_0x20ca1e['root']['rootName']});this['_savedMetaData']['set'](_0x52d892,{'roots':_0x2c32c2,'markers':_0x49637d,'rootsAttributes':_0x23107c});}['_removeMetaData'](_0x5bcca3){this['_savedMetaData']['delete'](_0x5bcca3);}['_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'](_0x4e3453,_0x27475c=null){let _0x58e25a=null;_0x4e3453['is']('documentFragment')||(_0x58e25a=new _0xe30740(_0x4e3453['name'],{'vid_start':null===_0x27475c?this['_revisionId']++:_0x27475c++}));const _0x227d03=[];for(const _0x446231 of _0x4e3453['getChildren']())if(_0x446231['is']('element')){_0x227d03['push'](this['_makeIdsRoot'](_0x446231,_0x27475c));const _0x2232b0=_0x227d03[_0x227d03['length']-0x1];null!==_0x27475c&&(_0x27475c=_0x2232b0['is']('element','$text')?_0x2232b0['getAttribute']('vid')+0x1:_0x2232b0['getAttribute']('vid_end')+0x1);}else{for(let _0x454519=0x0;_0x454519<_0x446231['offsetSize'];_0x454519++)_0x227d03['push'](new _0xe30740('$text',{'vid':null===_0x27475c?this['_revisionId']++:_0x27475c++}));}if(_0x4e3453['is']('documentFragment')){const _0x3e6693=K(_0x4e3453['rootName']);return _0x3e6693['_insertChild'](0x0,_0x227d03),_0x3e6693;}return _0x58e25a['_setAttribute']('vid_end',null===_0x27475c?this['_revisionId']++:_0x27475c++),_0x58e25a['_insertChild'](0x0,_0x227d03),_0x58e25a;}['_calculateMetaData'](_0x132cae,_0x5a556f,_0x10a594){this['_reset']();const {roots:_0x39077a,markers:_0x134ae2,rootsAttributes:_0x3b9c02}=this['_savedMetaData']['get'](_0x132cae);this['_baseRoots']=new Map(_0x39077a),this['_baseRootsAttributes']=new Map(_0xc930c3(_0x3b9c02));for(const [_0x2f60fa,_0x34b069]of this['_baseRoots'])if('$graveyard'!==_0x2f60fa&&(this['_diffRoots']['set'](_0x2f60fa,x(_0x34b069)),this['_diffRootsAttributes']=new Map(_0xc930c3(_0x3b9c02)),_0x10a594)){const _0x4adf61=this['_revisionId'];this['_idsRoots']['set'](_0x2f60fa,this['_makeIdsRoot'](_0x34b069)),this['_baseIdsRoots']['set'](_0x2f60fa,this['_makeIdsRoot'](_0x34b069,_0x4adf61));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',x(this['_baseRoots']['get']('$graveyard'))),_0x10a594&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x4fcd69,_0x582cbf]of _0x134ae2){const _0x1f0a64=this['_baseRoots']['get'](_0x582cbf['rootName']),_0x2cfa93=this['_diffRoots']['get'](_0x582cbf['rootName']),_0x905684=new _0x4577a5(this['_fixPosition'](_0x582cbf['start'],_0x1f0a64),this['_fixPosition'](_0x582cbf['end'],_0x1f0a64)),_0x262341=this['_fixRange'](_0x905684,_0x2cfa93);_0x1f0a64['markers']['set'](_0x4fcd69,_0x905684),this['_markers']['set'](_0x4fcd69,_0x262341);}this['_applyOperations'](_0x132cae,_0x5a556f,_0x10a594);}['_applyOperations'](_0x207c8c,_0x14eed8,_0x1ea17a){for(const _0x328adc of this['source']['getOperations'](_0x207c8c,_0x14eed8))this['_handleOperation'](_0x328adc,_0x1ea17a);for(const _0x2ee460 of this['_diffRoots']['values']())_0x2ee460['markers']['clear']();for(const [_0x131bbb,_0x536640]of this['_markers']){this['_diffRoots']['get'](_0x536640['root']['rootName'])['markers']['set'](_0x131bbb,_0x536640['clone']());}const _0x5752ba=new Map(),_0x392bbf=new Map();for(const [_0x237e86,_0x1cb41d]of this['_diffRoots'])_0x5752ba['set'](_0x237e86,x(_0x1cb41d)),_0x392bbf['set'](_0x237e86,this['_diffRootsAttributes']['get'](_0x237e86));this['_saveMetaData'](_0x14eed8,_0x5752ba,this['_markers'],_0x392bbf);}['_getPreviousFrom'](_0x45acd0){const _0x4011b9=Array['from'](this['_savedMetaData']['keys']());_0x4011b9['sort']((_0x2961a3,_0x1c04cf)=>_0x2961a3-_0x1c04cf),_0x4011b9['reverse']();for(const _0x12576c of _0x4011b9)if(_0x12576c<_0x45acd0)return _0x12576c;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x37bda9,_0x20ba83){const _0x493246=Array['from'](_0x20ba83['markers'])['map'](([_0x15e221,_0xb9b7b6])=>[_0x15e221,this['_fixRange'](_0xb9b7b6,_0x37bda9)]);_0x37bda9['markers']=new Map(_0x493246);}['_transformMarkers'](_0x2bf28e){for(const _0x509986 of this['_markers']['values']()){const _0x4582d7=_0x509986['getTransformedByOperation'](_0x2bf28e),_0x4a66b1=_0x4577a5['_createFromRanges'](_0x4582d7);_0x509986['start']=_0x4a66b1['start'],_0x509986['end']=_0x4a66b1['end'];}}['_handleOperation'](_0x13ec01,_0x39d500){if('addRoot'!=_0x13ec01['type']&&'detachRoot'!=_0x13ec01['type']){if('insert'==_0x13ec01['type']){const _0x17a7f0=_0x13ec01['position']['root']['rootName'];this['_diffRoots']['has'](_0x17a7f0)||(this['_diffRoots']['set'](_0x17a7f0,K(_0x17a7f0,!0x0)),this['_diffRootsAttributes']['set'](_0x17a7f0,{}),_0x39d500&&this['_idsRoots']['set'](_0x17a7f0,K(_0x17a7f0,!0x0)));}else{if('addRootAttribute'==_0x13ec01['type']||'removeRootAttribute'==_0x13ec01['type']||'changeRootAttribute'==_0x13ec01['type'])return void this['_handleRootAttributeOperation'](_0x13ec01);'marker'==_0x13ec01['type']&&this['_handleMarkerOperation'](_0x13ec01);}if('marker'!==_0x13ec01['type']){const _0x522356=this['_cloneOperation'](_0x13ec01,this['_diffRoots']);_0x522356['_execute'](),this['_transformMarkers'](_0x522356);}if(_0x39d500)switch(_0x13ec01['type']){case'insert':this['_handleInsertOperation'](_0x13ec01);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x13ec01);break;case'merge':this['_handleMergeOperation'](_0x13ec01);break;case'split':this['_handleSplitOperation'](_0x13ec01);}}else this['_handleRootOperation'](_0x13ec01,_0x39d500);}['_cloneOperation'](_0x635c71,_0x39ba5f){const _0x4feb8c=_0x635c71['clone']();return _0x4feb8c['_authorId']=_0x635c71['_authorId'],this['_fixOperation'](_0x4feb8c,_0x39ba5f),_0x4feb8c;}['_getBaseVids'](_0x1c1eb7){return _0x1c1eb7['map'](_0x12075c=>{const _0x3d2bcc=this['_getVidAttributeName'](_0x12075c);return Number(_0x12075c['item']['getAttribute'](_0x3d2bcc));});}['_generateTape'](_0x15ebcb,_0x5403fc){if(_0x15ebcb['is']('element','$text'))_0x5403fc['push']({'item':_0x15ebcb,'type':'text'});else{_0x15ebcb['is']('element')&&_0x5403fc['push']({'item':_0x15ebcb,'type':'elementStart'});for(const _0x54e41b of _0x15ebcb['getChildren']())this['_generateTape'](_0x54e41b,_0x5403fc);_0x15ebcb['is']('element')&&_0x5403fc['push']({'item':_0x15ebcb,'type':'elementEnd'});}return _0x5403fc;}['_getState'](){const _0x2d1a4e=new Map(this['_touched']),_0x182ad5=new Map(_0x2d1a4e),_0x5980dd=new Map(),_0x34edc6={'insertions':{},'deletions':{}},_0x126fdc={'insertions':{},'deletions':{}},_0x5c1395=new Map(),_0x6b46b=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x6b46b['delete']('$graveyard');for(const _0x3b8cac of _0x6b46b){const _0x14ed00=this['_diffRoots']['get'](_0x3b8cac)||K(_0x3b8cac,!0x1),_0x2f19ac=this['_baseRoots']['get'](_0x3b8cac)||K(_0x3b8cac,!0x1);_0x14ed00['isAttached']()||_0x2f19ac['isAttached']()?(_0x34edc6['insertions'][_0x3b8cac]=x(_0x14ed00),_0x34edc6['deletions'][_0x3b8cac]=x(_0x2f19ac),this['_copyMarkers'](_0x34edc6['deletions'][_0x3b8cac],_0x2f19ac),this['_copyMarkers'](_0x34edc6['insertions'][_0x3b8cac],_0x14ed00),_0x126fdc['insertions'][_0x3b8cac]=this['_generateTape'](this['_idsRoots']['get'](_0x3b8cac),[]),_0x126fdc['deletions'][_0x3b8cac]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x3b8cac)||K(_0x3b8cac,!0x1),[])):_0x6b46b['delete'](_0x3b8cac);}for(const _0x35a79d of _0x6b46b){const _0x519ba8=_0x126fdc['insertions'][_0x35a79d];for(const _0x29f0cc of _0x519ba8){const _0x738a90=this['_getVidAttributeName'](_0x29f0cc),_0x370d78=_0x29f0cc['item']['getAttribute'](_0x738a90);_0x182ad5['delete'](_0x370d78),_0x370d78>=this['_startingRevisionId']&&_0x5980dd['set'](_0x370d78,_0x2d1a4e['get'](_0x370d78));}}for(const _0x2e0109 of _0x6b46b){const _0x1d4f8f=_0x126fdc['insertions'][_0x2e0109],_0x2bf76e=this['_getBaseVids'](_0x126fdc['deletions'][_0x2e0109]);let _0x1dcf7e=0x0;for(const _0x429779 of _0x1d4f8f){const _0x26565b=this['_getVidAttributeName'](_0x429779),_0xd7c0b9=_0x429779['item']['getAttribute'](_0x26565b);if(!_0x5980dd['has'](_0xd7c0b9)&&!_0x5c1395['has'](_0xd7c0b9)){if(_0x182ad5['has'](_0xd7c0b9))_0x1dcf7e++;else{if(_0xd7c0b9!=_0x2bf76e[_0x1dcf7e]){const _0x4ec39d=_0x2d1a4e['get'](_0xd7c0b9)||_0x2d1a4e['get'](_0x2bf76e[_0x1dcf7e]);for(;_0xd7c0b9!=_0x2bf76e[_0x1dcf7e];)_0x182ad5['has'](_0x2bf76e[_0x1dcf7e])||(_0x5c1395['set'](_0x2bf76e[_0x1dcf7e],_0x4ec39d),_0x2d1a4e['set'](_0x2bf76e[_0x1dcf7e],_0x4ec39d)),_0x1dcf7e++;}_0x1dcf7e++;}}}}for(const _0x58cb67 of _0x6b46b){const _0x447268=_0x126fdc['insertions'][_0x58cb67];for(const _0x35f2c1 of _0x447268){const _0x25db03=this['_getVidAttributeName'](_0x35f2c1),_0x4c03ee=_0x35f2c1['item']['getAttribute'](_0x25db03);if(_0x5c1395['has'](_0x4c03ee)){const _0x138610=_0x5c1395['get'](_0x4c03ee);_0x182ad5['has'](_0x4c03ee)||_0x182ad5['set'](_0x4c03ee,{..._0x138610}),_0x5980dd['set'](_0x4c03ee,{..._0x138610});}}}for(const _0x276ee5 of _0x182ad5['keys']())_0x276ee5>=this['_startingRevisionId']&&_0x182ad5['delete'](_0x276ee5);const _0x37ac9c=new Map();for(const _0xf0e0dc of _0x6b46b){let _0x430307=_0x126fdc['insertions'][_0xf0e0dc];for(const _0xd10711 of _0x430307)if(_0xd10711['item']['is']('element','tableCell')){const _0x45d52f=this['_getVidAttributeName'](_0xd10711),_0x393fae=_0xd10711['item']['getAttribute'](_0x45d52f);if(_0x5980dd['has'](_0x393fae)){const _0x178ed9=_0xd10711['item']['parent']['parent']['getAttribute']('vid_start'),_0x22079c=_0x37ac9c['get'](_0x178ed9)||new Set();_0x22079c['add'](_0x5980dd['get'](_0x393fae)['userId']),_0x37ac9c['set'](_0x178ed9,_0x22079c);}}_0x430307=_0x126fdc['deletions'][_0xf0e0dc];for(const _0xb733d0 of _0x430307)if(_0xb733d0['item']['is']('element','tableCell')){const _0x3fb61f=this['_getVidAttributeName'](_0xb733d0),_0x54f581=_0xb733d0['item']['getAttribute'](_0x3fb61f);if(_0x182ad5['has'](_0x54f581)){const _0x454db0=_0xb733d0['item']['parent']['parent']['getAttribute']('vid_start'),_0x576c76=_0x37ac9c['get'](_0x454db0)||new Set();_0x576c76['add'](_0x182ad5['get'](_0x54f581)['userId']),_0x37ac9c['set'](_0x454db0,_0x576c76);}}for(const _0x104932 of _0x37ac9c['keys']())(_0x5980dd['has'](_0x104932)||_0x182ad5['has'](_0x104932))&&_0x37ac9c['delete'](_0x104932);}for(const _0x3a8287 of _0x6b46b){const _0x18c8b3=_0x126fdc['insertions'][_0x3a8287];let _0x21d9ea=null,_0x63137e=null;for(const _0x41da9e of _0x18c8b3){const _0x173a6d=this['_getVidAttributeName'](_0x41da9e),_0x231147=_0x41da9e['item']['getAttribute'](_0x173a6d),_0x2941b3=_0x37ac9c['get'](_0x231147);_0x2941b3&&'elementStart'==_0x41da9e['type']&&(_0x21d9ea=Array['from'](_0x2941b3)[0x0],_0x63137e=_0x41da9e['item']['getAttribute']('vid_end')),_0x21d9ea&&(_0x182ad5['set'](_0x231147,{'userId':_0x21d9ea}),_0x5980dd['set'](_0x231147,{'userId':_0x21d9ea})),_0x231147==_0x63137e&&(_0x21d9ea=null,_0x63137e=null);}}const _0x4ddb15={},_0x1df29e=new Set();for(const _0x1308a2 of _0x6b46b){const _0x577525=_0x34edc6['deletions'][_0x1308a2],_0x46a408=_0x34edc6['insertions'][_0x1308a2];for(const {userId:_0x280607}of this['_touchedMarkers']['values']())null!==_0x280607&&_0x1df29e['add'](_0x280607);for(const {userId:_0x23ce63}of this['_touchedRoots']['values']())null!==_0x23ce63&&_0x1df29e['add'](_0x23ce63);this['_markChanges'](_0x46a408,_0x126fdc['insertions'][_0x1308a2],_0x5980dd,'insertion',_0x1df29e),this['_markChanges'](_0x577525,_0x126fdc['deletions'][_0x1308a2],_0x182ad5,'deletion',_0x1df29e),_0x4ddb15[_0x1308a2]={'insertions':this['_prepareViewToSave'](_0x46a408),'deletions':this['_prepareViewToSave'](_0x577525),'attachChange':this['_touchedRoots']['get'](_0x1308a2)||null,'attributesBefore':_0xc930c3(this['_baseRootsAttributes']['get'](_0x1308a2))||{},'attributesAfter':_0xc930c3(this['_diffRootsAttributes']['get'](_0x1308a2))};}return{'diffData':_0x4ddb15,'authorsIds':Array['from'](_0x1df29e)};}['_processRootBeforeSave'](_0x394818){for(const [,_0xb7e67e]of _0x394818['markers']){const _0x49f15d=_0xb7e67e['start']['getAncestors']()['filter'](_0x2cbdfb=>'tableCell'==_0x2cbdfb['name']);for(const _0x58f527 of _0x49f15d)0x1==_0x58f527['childCount']&&_0x58f527['getChild'](0x0)['is']('element','paragraph')&&_0x58f527['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x4b47ae){this['_processRootBeforeSave'](_0x4b47ae);const _0x3fd13b=this['editor']['data']['toView'](_0x4b47ae,{}),_0x868f34=Array['from'](_0x3fd13b['getChildren']())['map'](_0xd71a07=>this['_getViewJson'](_0xd71a07));return JSON['stringify'](_0x868f34);}['_getViewJson'](_0x1425b4){if(_0x1425b4['is']('$text'))return _0x1425b4['data'];{const _0x29aaa8=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x49c88e=_0x1425b4,_0x9b1597=this['editor']['data']['htmlProcessor']['domConverter'],_0x3610b4={'type':_0x29aaa8['_getTypeCharForViewElement'](_0x49c88e),'name':_0x49c88e['name'],'attributes':Array['from'](_0x49c88e['getAttributes']()),'children':Array['from'](_0x49c88e['getChildren']())['map'](_0x1b44b8=>this['_getViewJson'](_0x1b44b8))};if(_0x1425b4['is']('uiElement')&&'$comment'!=_0x1425b4['name']){const _0x3fcc00=_0x1425b4['render'](_0x9b1597['domDocument'],_0x9b1597);_0x3610b4['children']['push'](_0x3fcc00['outerHTML']);}else{if(_0x1425b4['is']('rawElement')){const _0x138f0b=_0x9b1597['domDocument']['createElement'](_0x49c88e['name']);_0x1425b4['render'](_0x138f0b,_0x9b1597),_0x3610b4['children']['push'](_0x138f0b['innerHTML']);}}const _0x562661=Array['from'](_0x49c88e['getCustomProperties']());_0x562661['length']>0x0&&(_0x3610b4['customProperties']=_0x562661);const _0x27a117=_0x49c88e['getFillerOffset']();return null!==_0x27a117&&(_0x3610b4['fillerOffset']=_0x27a117),_0x3610b4;}}['_markChanges'](_0x3a0138,_0x21410d,_0x433b42,_0x45026a,_0x3c43dc){let _0x257a98=null,_0x3b1c30=null,_0x25f726=0x0;const _0x510df6=this['editor']['model'];for(let _0x1492dc=0x0;_0x1492dc<_0x21410d['length'];_0x1492dc++){const _0x4566ae=this['_getVidAttributeName'](_0x21410d[_0x1492dc]),_0xe3cd47=_0x21410d[_0x1492dc]['item']['getAttribute'](_0x4566ae),_0xfc76ce=_0x433b42['get'](_0xe3cd47),_0x5dc223=_0x1492dc==_0x21410d['length']-0x1;(!_0x257a98&&_0xfc76ce&&(_0x257a98=_0xfc76ce,_0x3b1c30=_0x21410d[_0x1492dc]),_0x257a98&&(!_0xfc76ce||_0xfc76ce['userId']!=_0x257a98['userId']))&&(_0x2016ed(_0xfc76ce,N(_0x3b1c30,_0x3a0138,_0x510df6),N(_0x21410d[_0x1492dc],_0x3a0138,_0x510df6)),_0x257a98=_0xfc76ce||null,_0x3b1c30=_0xfc76ce?_0x21410d[_0x1492dc]:null),_0x257a98&&_0x5dc223&&_0x2016ed(_0xfc76ce,N(_0x3b1c30,_0x3a0138,_0x510df6),P(_0x21410d[_0x1492dc],_0x3a0138,_0x510df6));}function _0x2016ed(_0x512106,_0xdf01b0,_0x393215){const _0x39b1bb=_0x257a98['userId'],_0x12e1ae='revision:'+_0x45026a+':'+_0x39b1bb+':'+_0x25f726++,_0x5afbfe=_0x510df6['createRange'](_0xdf01b0,_0x393215);_0x3a0138['markers']['set'](_0x12e1ae,_0x5afbfe),null!==_0x39b1bb&&_0x3c43dc['add'](_0x39b1bb);}}['_getVidAttributeName'](_0x287608){switch(_0x287608['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x59bce5,_0x40dace){_0x59bce5['baseVersion']=null;for(const _0x202b64 in _0x59bce5){const _0x64683=_0x59bce5[_0x202b64];if(_0x64683 instanceof _0x391495){const _0x2fbe03=_0x40dace['get'](_0x64683['root']['rootName']);_0x59bce5[_0x202b64]=this['_fixPosition'](_0x64683,_0x2fbe03);}if(_0x64683 instanceof _0x4577a5){const _0x3bd29d=_0x40dace['get'](_0x64683['root']['rootName']);_0x59bce5[_0x202b64]=this['_fixRange'](_0x64683,_0x3bd29d);}'root'===_0x202b64&&(_0x59bce5['root']=_0x40dace['get'](_0x59bce5['root']['rootName']));}}['_fixRange'](_0x34f456,_0xf9ef13){return this['editor']['model']['createRange'](this['_fixPosition'](_0x34f456['start'],_0xf9ef13),this['_fixPosition'](_0x34f456['end'],_0xf9ef13));}['_fixPosition'](_0x435f4e,_0x51d091){return this['editor']['model']['createPositionFromPath'](_0x51d091,_0x435f4e['path'],_0x435f4e['stickiness']);}['_handleInsertOperation'](_0x26a1a2){const _0x3664bd=this['_idsRoots']['get'](_0x26a1a2['position']['root']['rootName']),_0x5ca3d8=this['_fixPosition'](_0x26a1a2['position'],_0x3664bd),_0x948513=null===_0x26a1a2['_authorId']?null:_0x26a1a2['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3cd7b1=_0x5ca3d8['parent'],_0x40f4e3=this['_revisionId'],_0x3959f0=[];for(const _0x500002 of _0x26a1a2['nodes'])if(_0x500002['is']('element'))_0x3959f0['push'](this['_makeIdsRoot'](_0x500002));else{for(let _0x5245ad=0x0;_0x5245ad<_0x500002['offsetSize'];_0x5245ad++)_0x3959f0['push'](new _0xe30740('$text',{'vid':this['_revisionId']++}));}const _0x2474d8=this['_revisionId'];for(let _0xe59467=_0x40f4e3;_0xe59467<_0x2474d8;_0xe59467++)this['_touched']['set'](_0xe59467,{'userId':_0x948513});_0x3cd7b1['_insertChild'](_0x5ca3d8['offset'],_0x3959f0);}['_handleMoveOperation'](_0x2dd276){(_0x2dd276=this['_cloneOperation'](_0x2dd276,this['_idsRoots']))['_execute']();const _0x79851=null===_0x2dd276['_authorId']?null:_0x2dd276['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5042be=_0x2dd276['getMovedRangeStart'](),_0x5ce462=_0x5042be['parent'],_0x3bdeb3=_0x5042be['offset'];!function _0x273303(_0x5c2419,_0x25c01d,_0x1137e2,_0x3e6c98){for(let _0x30eba6=_0x1137e2;_0x30eba6<_0x3e6c98;_0x30eba6++){const _0x5ba05f=_0x25c01d['getChild'](_0x30eba6);_0x5ba05f['is']('element','$text')?_0x5c2419['set'](_0x5ba05f['getAttribute']('vid'),{'userId':_0x79851}):(_0x5c2419['set'](_0x5ba05f['getAttribute']('vid_start'),{'userId':_0x79851}),_0x273303(_0x5c2419,_0x5ba05f,0x0,_0x5ba05f['childCount']),_0x5c2419['set'](_0x5ba05f['getAttribute']('vid_end'),{'userId':_0x79851}));}}(this['_touched'],_0x5ce462,_0x3bdeb3,_0x3bdeb3+_0x2dd276['howMany']);}['_handleMergeOperation'](_0x4deb15){const _0x3aba63=null===(_0x4deb15=this['_cloneOperation'](_0x4deb15,this['_idsRoots']))['_authorId']?null:_0x4deb15['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1d1451=_0x4deb15['targetPosition']['parent'],_0x1fbfeb=_0x4deb15['sourcePosition']['parent'],_0x4b7d50=_0x1d1451['getAttribute']('vid_end'),_0x4cd1c0=_0x1fbfeb['getAttribute']('vid_start');_0x1d1451['_setAttribute']('vid_end',_0x1fbfeb['getAttribute']('vid_end')),_0x1fbfeb['_setAttribute']('vid_end',_0x4b7d50),this['_touched']['set'](_0x4cd1c0,{'userId':_0x3aba63}),this['_touched']['set'](_0x4b7d50,{'userId':_0x3aba63}),_0x4deb15['_execute']();}['_handleSplitOperation'](_0x21fdc1){const _0x5b3b7b=null===(_0x21fdc1=this['_cloneOperation'](_0x21fdc1,this['_idsRoots']))['_authorId']?null:_0x21fdc1['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x37f4ba=_0x21fdc1['graveyardPosition'],_0x2d6d11=_0x21fdc1['splitPosition']['parent'];_0x21fdc1['_execute']();const _0x21ea3a=_0x2d6d11['getAttribute']('vid_end'),_0x3caa9b=_0x21fdc1['insertionPosition']['nodeAfter'];if(_0x37f4ba){const _0x400634=_0x3caa9b['getAttribute']('vid_end'),_0x267fbb=_0x2d6d11['getAttribute']('vid_end');_0x2d6d11['_setAttribute']('vid_end',_0x400634),_0x3caa9b['_setAttribute']('vid_end',_0x267fbb),this['_touched']['set'](_0x2d6d11['getAttribute']('vid_end'),{'userId':_0x5b3b7b}),this['_touched']['set'](_0x3caa9b['getAttribute']('vid_start'),{'userId':_0x5b3b7b});}else{const _0xaaafd5=this['_revisionId']++,_0x33cdc0=this['_revisionId']++;_0x2d6d11['_setAttribute']('vid_end',_0xaaafd5),_0x3caa9b['_setAttribute']('vid_start',_0x33cdc0),_0x3caa9b['_setAttribute']('vid_end',_0x21ea3a),this['_touched']['set'](_0xaaafd5,{'userId':_0x5b3b7b}),this['_touched']['set'](_0x33cdc0,{'userId':_0x5b3b7b});}}['_handleMarkerOperation'](_0x59172e){if(!_0x59172e['affectsData'])return;const _0x19c149=(_0x59172e=this['_cloneOperation'](_0x59172e,this['_diffRoots']))['oldRange']?_0x59172e['oldRange']['root']:null,_0xfc6223=_0x59172e['newRange']?_0x59172e['newRange']['root']:null;_0x19c149&&this['_markers']['delete'](_0x59172e['name']),_0xfc6223&&this['_markers']['set'](_0x59172e['name'],_0x59172e['newRange']['clone']());const _0x280396=null===_0x59172e['_authorId']?null:_0x59172e['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1bed8d=_0x59172e['name'];if(!this['_touchedMarkers']['has'](_0x1bed8d))return void this['_touchedMarkers']['set'](_0x1bed8d,{'range':_0x59172e['oldRange'],'userId':_0x280396});const _0x3b34e5=this['_touchedMarkers']['get'](_0x1bed8d),_0x51dbeb=_0x3b34e5['range'],_0x25aafd=_0x59172e['newRange'];null==_0x51dbeb&&null==_0x25aafd||_0x51dbeb&&_0x25aafd&&_0x51dbeb['isEqual'](_0x25aafd)?this['_touchedMarkers']['delete'](_0x59172e['name']):_0x3b34e5['userId']=_0x280396;}['_handleRootOperation'](_0x5654ee,_0x26ba7c){this['_diffRoots']['has'](_0x5654ee['rootName'])?this['_diffRoots']['get'](_0x5654ee['rootName'])['_isAttached']=_0x5654ee['isAdd']:(this['_diffRoots']['set'](_0x5654ee['rootName'],K(_0x5654ee['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x5654ee['rootName'],{}),_0x26ba7c&&this['_idsRoots']['set'](_0x5654ee['rootName'],K(_0x5654ee['rootName'],!0x0)));const _0x5bd89a=null===_0x5654ee['_authorId']?null:_0x5654ee['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4d3aac=this['_touchedRoots']['get'](_0x5654ee['rootName']);_0x4d3aac&&_0x4d3aac['userId']===_0x5bd89a?this['_touchedRoots']['delete'](_0x5654ee['rootName']):this['_touchedRoots']['set'](_0x5654ee['rootName'],{'userId':_0x5bd89a,'isAttached':_0x5654ee['isAdd']});}['_handleRootAttributeOperation'](_0x29587d){const _0x45f123=this['_diffRootsAttributes']['get'](_0x29587d['root']['rootName']);null===_0x29587d['newValue']?delete _0x45f123[_0x29587d['key']]:_0x45f123[_0x29587d['key']]=_0x29587d['newValue'];}}function x(_0x49e935){const _0x36f2df=K(_0x49e935['rootName'],_0x49e935['isAttached']());for(const _0x57115a of _0x49e935['getChildren']()){const _0x5f325f=_0x57115a['_clone'](!0x0);_0x36f2df['_appendChild'](_0x5f325f);}return _0x36f2df;}function K(_0x3c6d9a,_0x2a8f3f=!0x0){const _0x21d5df=new _0x308cc0();return _0x21d5df['rootName']=_0x3c6d9a,_0x21d5df['_isAttached']=_0x2a8f3f,_0x21d5df['isAttached']=()=>_0x21d5df['_isAttached'],_0x21d5df;}function N(_0x1e2594,_0x3d4ce5,_0x1da441){const _0x3328b4='elementEnd'==_0x1e2594['type']?_0x1da441['createPositionAt'](_0x1e2594['item'],'end'):_0x1da441['createPositionBefore'](_0x1e2594['item']);return _0x1da441['createPositionFromPath'](_0x3d4ce5,_0x3328b4['path'],_0x3328b4['stickiness']);}function P(_0x931f41,_0x312efd,_0x39c9d4){const _0x18e761='elementStart'==_0x931f41['type']?_0x39c9d4['createPositionAt'](_0x931f41['item'],0x0):_0x39c9d4['createPositionAfter'](_0x931f41['item']);return _0x39c9d4['createPositionFromPath'](_0x312efd,_0x18e761['path'],_0x18e761['stickiness']);}class he extends/* #__PURE__ -- @preserve */
|
|
25
|
-
|
|
26
|
-
_0x31e13c(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x2692bf){super(),this['id']=_0x2692bf['id']||_0x8d6220(),this['author']=_0x2692bf['author'],this['type']=_0x2692bf['type'],this['data']=_0x2692bf['data']||{},this['rootName']=_0x2692bf['rootName'],this['set']('createdAt',_0x2692bf['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class G{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x568a45,_0x5c184c){this['newRevisionId']=_0x568a45,this['oldRevisionId']=_0x5c184c,this['changes']=new _0x4cfa07();}['_setChanges'](_0x42a0ed){for(const _0x5b7119 of _0x42a0ed)this['changes']['add'](_0x5b7119);}}class u extends _0x5ac587{['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[_0x280554,_0xcf2f43,S,$];}constructor(_0x5a6895){super(_0x5a6895),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',(_0x35cbb9,_0x16a8dc,_0x4d38a3)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x2d3b22=>{for(const _0x44edba of this['editor']['editing']['view']['document']['roots'])_0x4d38a3?_0x2d3b22['removeClass']('ck-editor__editable__overlay',_0x44edba):_0x2d3b22['addClass']('ck-editor__editable__overlay',_0x44edba);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x57ea21=>null!==_0x57ea21),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x4a02c7,_0x311c0b,_0x4fa7e9)=>_0x4a02c7&&_0x4fa7e9?_0x311c0b['changes']['getIndex'](_0x4fa7e9):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x1492e7,_0x38a5fe)=>_0x1492e7?_0x38a5fe['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0xcf2f43);}['init'](){const _0x4a612a=this['editor'],_0x4f2adb=new ShowChangeCommand(_0x4a612a,{'direction':'backward'}),_0x50170f=new ShowChangeCommand(_0x4a612a,{'direction':'forward'});(_0x4a612a['commands']['add']('showPreviousChange',_0x4f2adb),_0x4a612a['commands']['add']('showNextChange',_0x50170f),_0x4a612a['commands']['add']('restoreRevision',new RestoreRevisionCommand(_0x4a612a)),this['on']('change:numberOfChanges',()=>{_0x4f2adb['refresh'](),_0x50170f['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x4a612a['enableReadOnlyMode']('revision-viewer'),_0x4a612a['plugins']['has']('WidgetToolbarRepository'))&&_0x4a612a['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x5c6cff){return await this['_utils']['loadRevisionData'](_0x5c6cff,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x5c6cff);}async['getRevisionRootsAttributes'](_0x41b25f){return await this['_utils']['loadRevisionData'](_0x41b25f,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x41b25f);}async['compare'](_0x402764,_0x13d431,_0x353417=!0x1){if(!this['isEnabled'])return;const _0x5cefe3=this['diff'],_0x384fae=this['repository'],_0x2b7b11='string'==typeof _0x402764?_0x384fae['getRevision'](_0x402764):_0x402764,_0x2cc18c='string'==typeof _0x13d431?_0x384fae['getRevision'](_0x13d431):_0x13d431,_0xda7b4=_0x2b7b11['id'],_0x2f403a=_0x2cc18c?_0x2cc18c['id']:null;if(!_0x353417&&this['diff']&&this['diff']['newRevisionId']===_0xda7b4&&this['diff']['oldRevisionId']===_0x2f403a)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new G(_0xda7b4,_0x2f403a);const _0x450cf9=this['_getRevisionsRange'](_0x2b7b11,_0x2cc18c,!0x0)['map'](_0x577f48=>this['_utils']['loadRevisionData'](_0x577f48,this['adapter']));return _0x450cf9['push'](new Promise(_0x29620c=>{setTimeout(_0x29620c,0x14);})),Promise['all'](_0x450cf9)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x4e538e=this['_getDiff'](_0xda7b4,_0x2f403a);for(const _0x2c551d of _0x4e538e['changes'])this['_changeIdToChange']['set'](_0x2c551d['id'],_0x2c551d);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x3309c2=>{for(const _0x5f6dbb of this['editor']['model']['document']['getRootNames']())_0x3309c2['detachRoot'](_0x5f6dbb);for(const _0x30f87b of Object['keys'](_0x4e538e['model'])){const _0x344d22=_0x3309c2['addRoot'](_0x30f87b);for(const _0x72b7dc of Object['keys'](_0x4e538e['attributes'][_0x30f87b]))_0x3309c2['setAttribute'](_0x72b7dc,_0x4e538e['attributes'][_0x30f87b][_0x72b7dc],_0x344d22);_0x3309c2['insert'](_0x4e538e['model'][_0x30f87b],_0x344d22,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x4e538e['changes'])),this['isReady']=!0x0;})['catch'](_0x52a2aa=>{console['error'](_0x52a2aa),this['_cleanUp'](),_0x5cefe3&&(this['diff']=_0x5cefe3),this['isReady']=!0x0;});}['addRevisionData'](_0x2653d5,_0x233b60){const _0x12b90a=this['repository']['createRevision'](_0x2653d5);return _0x12b90a['on']('_update',(_0x1b24e8,_0x271727,_0xd77ba0)=>_0x233b60(_0x271727,_0xd77ba0,_0x12b90a)),this['repository']['addRevision'](_0x12b90a),_0x12b90a;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x22bc7f=>{for(const _0x586869 of this['editor']['model']['document']['getRootNames']())_0x22bc7f['detachRoot'](_0x586869);});}['_sortAndFilterDiffChanges'](_0x3150e6){const _0x1478fa=[],_0x15faf5=new Map();for(const _0x4a9f7f of this['editor']['model']['document']['getRootNames']()){const _0x1ba9b5=this['editor']['editing']['view']['getDomRoot'](_0x4a9f7f);if(!_0x1ba9b5)continue;const _0x4d07a1=_0x1ba9b5['getClientRects']()['item'](0x0);_0x4d07a1&&(_0x1478fa['push'](_0x4a9f7f),_0x15faf5['set'](_0x4a9f7f,_0x4d07a1));}return _0x1478fa['sort']((_0x96296e,_0x259d84)=>{const _0x9ec9e5=_0x15faf5['get'](_0x96296e),_0x488480=_0x15faf5['get'](_0x259d84);return _0x9ec9e5['y']-_0x488480['y']||_0x9ec9e5['x']-_0x488480['x'];}),(_0x3150e6=_0x3150e6['filter'](_0x5b37ca=>_0x1478fa['includes'](_0x5b37ca['rootName'])))['sort']((_0x459249,_0x24f05d)=>_0x1478fa['indexOf'](_0x459249['rootName'])-_0x1478fa['indexOf'](_0x24f05d['rootName'])),_0x3150e6;}['_makeTape'](_0x56f8e2){const _0x532616=Array['from'](_0x56f8e2['markers'])['filter'](([_0x368f71,_0x3ddbe6])=>_0x368f71['startsWith']('revision:')&&!_0x3ddbe6['isCollapsed']),_0x38bab2=Array['from'](this['editor']['model']['createRangeIn'](_0x56f8e2)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x532616['length'])for(const _0x58e8ff of _0x38bab2){const [_0x32a8cb,_0x187fb9]=_0x532616[0x0],[,_0x592f29,_0x3e278f]=_0x32a8cb['split'](':');if(_0x187fb9['end']['isEqual'](_0x58e8ff['nextPosition'])&&_0x532616['shift'](),(_0x58e8ff['previousPosition']['isEqual'](_0x187fb9['start'])||_0x58e8ff['previousPosition']['isAfter'](_0x187fb9['start']))&&('insertion'==_0x592f29?_0x58e8ff['isAdded']={'userId':_0x3e278f}:'deletion'==_0x592f29&&(_0x58e8ff['isRemoved']={'userId':_0x3e278f})),0x0==_0x532616['length'])break;}return _0x38bab2;}['_refreshStartEndIndex'](_0x51b994){const _0x139d74=new Map();for(let _0x1affcb=0x0;_0x1affcb<_0x51b994['length'];_0x1affcb++)'text'===_0x51b994[_0x1affcb]['type']?(_0x51b994[_0x1affcb]['item']['startIndex']=_0x1affcb,_0x51b994[_0x1affcb]['item']['endIndex']=_0x1affcb):('elementStart'===_0x51b994[_0x1affcb]['type']?_0x51b994[_0x1affcb]['item']['startIndex']=_0x1affcb:'elementEnd'===_0x51b994[_0x1affcb]['type']&&(_0x51b994[_0x1affcb]['item']['endIndex']=_0x1affcb),_0x139d74['set'](_0x51b994[_0x1affcb]['id'],_0x1affcb));for(const _0x6692c2 of _0x139d74['values']())'elementStart'===_0x51b994[_0x6692c2]['type']?_0x51b994[_0x6692c2]['item']['endIndex']=_0x139d74['get'](_0x51b994[_0x6692c2]['pairId']):'elementEnd'===_0x51b994[_0x6692c2]['type']&&(_0x51b994[_0x6692c2]['item']['startIndex']=_0x139d74['get'](_0x51b994[_0x6692c2]['pairId']));}['_processTape'](_0x359014){for(let _0x317659=0x0;_0x317659<_0x359014['length'];_0x317659++){if('elementStart'===_0x359014[_0x317659]['type'])_0x359014[_0x317659]['item']['startIndex']=_0x317659;else{if('elementEnd'===_0x359014[_0x317659]['type']){_0x359014[_0x317659]['item']['endIndex']=_0x317659;const _0x1a0ecf=_0x359014[_0x317659]['item']['startIndex'];_0x359014[_0x1a0ecf]['pairId']=_0x359014[_0x317659]['id'],_0x359014[_0x317659]['pairId']=_0x359014[_0x1a0ecf]['id'];}else _0x359014[_0x317659]['item']['startIndex']=_0x317659,_0x359014[_0x317659]['item']['endIndex']=_0x317659,_0x359014[_0x317659]['pairId']=null;}_0x359014[_0x317659]['markersStart']||(_0x359014[_0x317659]['markersStart']=[],_0x359014[_0x317659]['markersEnd']=[]);}}['_markInsertions'](_0x93e60f,_0x2da65c){const _0x14b2ed=_0x93e60f['filter'](_0x259913=>!_0x259913['isAdded']);for(let _0x194768=0x0;_0x194768<_0x2da65c['length'];_0x194768++)_0x2da65c[_0x194768]['isAdded']&&(_0x14b2ed[_0x194768]['isAdded']=_0x2da65c[_0x194768]['isAdded']);}['_getDiff'](_0xeeba9c,_0x96ced1=null){const _0x47aa9f=this['repository']['getRevision'](_0xeeba9c),_0x56c71f=_0x96ced1?this['repository']['getRevision'](_0x96ced1):null,_0x156306=this['_getRevisionsRange'](_0x47aa9f,_0x56c71f),_0x98a9d=_0x156306[_0x156306['length']-0x1],_0x3f3898=new Map(),_0x494c34={'model':{},'attributes':{},'changes':[]},_0x44aa20=new Set(),_0x2d7d79=new Map();for(let _0x4a617a=_0x156306['length']-0x1;_0x4a617a>=0x0;_0x4a617a--){const _0x1aa196=_0x156306[_0x4a617a];for(const _0x1c4211 of Object['keys'](_0x1aa196['diffData']))if(_0x1aa196['diffData'][_0x1c4211]['attachChange']){const _0x150090=_0x1aa196['diffData'][_0x1c4211]['attachChange'];_0x150090['isAttached']?(_0x44aa20['add'](_0x1c4211),_0x2d7d79['has'](_0x1c4211)&&_0x2d7d79['get'](_0x1c4211)['userId']==_0x150090['userId']?_0x2d7d79['delete'](_0x1c4211):_0x2d7d79['set'](_0x1c4211,_0x150090)):_0x2d7d79['has'](_0x1c4211)?(_0x44aa20['delete'](_0x1c4211),_0x2d7d79['delete'](_0x1c4211)):(_0x44aa20['add'](_0x1c4211),_0x2d7d79['set'](_0x1c4211,_0x150090));}else _0x44aa20['add'](_0x1c4211);}for(const _0x3c48d4 of _0x44aa20){const _0x43a9ea=_0x2d7d79['has'](_0x3c48d4)&&!_0x2d7d79['get'](_0x3c48d4)['isAttached'];let _0x433b28=_0x43a9ea?_0x156306['length']-0x1:0x0;const _0x52fae7=_0x43a9ea?-0x1:0x1;for(;_0x156306[_0x433b28];){const _0x1ed291=_0x156306[_0x433b28];if(_0x1ed291['diffData'][_0x3c48d4]){const _0x57c5b4=_0x43a9ea?_0x1ed291['diffData'][_0x3c48d4]['attributesBefore']:_0x1ed291['diffData'][_0x3c48d4]['attributesAfter'];_0x494c34['attributes'][_0x3c48d4]=_0x57c5b4?_0xc930c3(_0x57c5b4):{};break;}_0x433b28+=_0x52fae7;}}for(const _0x529608 of _0x156306){_0x529608['model']={};for(const _0x45ad49 of _0x529608['authors'])_0x3f3898['set'](_0x45ad49['id'],_0x45ad49);for(const _0x484859 of _0x44aa20){const _0x39f6b9=_0x529608['diffData'][_0x484859]?_0x529608['diffData'][_0x484859]['insertions']:'[]',_0x209faa=_0x529608['diffData'][_0x484859]?_0x529608['diffData'][_0x484859]['deletions']:'[]';_0x529608['model'][_0x484859]={'insertions':this['_utils']['_makeModelFromViewString'](_0x39f6b9),'deletions':this['_utils']['_makeModelFromViewString'](_0x209faa)};}}for(const _0x30c186 of _0x44aa20){let _0x27cdc4=null,_0x2bf3e6=0x0;const _0x2049ad=new Map(Array['from'](_0x47aa9f['model'][_0x30c186]['insertions']['markers'])['filter'](([_0x25232a])=>!_0x25232a['startsWith']('revision:')));let _0x5c14c5=0x0;for(const _0x4f83df of _0x156306){const _0x65aabd=this['_makeTape'](_0x4f83df['model'][_0x30c186]['insertions']);_0x4f83df==_0x47aa9f?(_0x27cdc4=_0x65aabd,_0x2bf3e6=_0x27cdc4['length'],_0x27cdc4['forEach'](_0x38385d=>{_0x38385d['id']=_0x5c14c5++;}),this['_processTape'](_0x27cdc4)):this['_markInsertions'](_0x27cdc4,_0x65aabd);const _0xa78864=_0x27cdc4['filter'](_0x1ed5e1=>!_0x1ed5e1['isAdded'])['map'](_0x514c05=>_0x514c05['id']);let _0x2baace=0x0;const _0x35bc96=this['_makeTape'](_0x4f83df['model'][_0x30c186]['deletions']);_0x35bc96['forEach'](_0x333d67=>{_0x333d67['isRemoved']?_0x333d67['id']=_0x2bf3e6++:_0x333d67['id']=_0xa78864[_0x2baace++];}),this['_processTape'](_0x35bc96),this['_setDistance'](_0x27cdc4,'isAdded'),this['_setDistance'](_0x35bc96,'isRemoved'),_0x4f83df==_0x47aa9f&&this['_markMarkers'](_0x27cdc4,_0x2049ad),_0x27cdc4=this['_joinTapes'](_0x27cdc4,_0x35bc96),this['_refreshStartEndIndex'](_0x27cdc4),this['_setDistance'](_0x27cdc4,'isRemoved');}_0x27cdc4=_0x27cdc4['filter'](_0x153bb2=>!(_0x153bb2['isAdded']&&_0x153bb2['isRemoved']));const _0x3f719a=new Map(_0x98a9d['model'][_0x30c186]['deletions']['markers']),_0x6eef8e=new Set(_0x2049ad['keys']());for(const _0x19c94d of _0x3f719a['keys']())_0x6eef8e['delete'](_0x19c94d);this['_markSuggestions'](_0x27cdc4,_0x6eef8e),this['_fixObsoleteTags'](_0x27cdc4),_0x27cdc4=this['_removeMissingPairs'](_0x27cdc4),_0x27cdc4=this['_markMismatchedRemovedTags'](_0x27cdc4),_0x27cdc4=this['_removeUnsupportedChanges'](_0x27cdc4);const {root:_0x3290f8,changes:_0x29384a}=this['_makeModelFromTape'](_0x27cdc4,_0x3f3898,_0x30c186);_0x494c34['model'][_0x30c186]=_0x3290f8;const _0x22d3df=_0x2d7d79['get'](_0x30c186);if(_0x22d3df){const _0x37ab62=_0x3f3898['get'](_0x22d3df['userId']),_0x55a88f=new z({'author':_0x37ab62,'type':_0x22d3df['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x30c186});_0x29384a['unshift'](_0x55a88f),_0x494c34['attributes'][_0x30c186]['revisionHistoryAttachChange']=_0x55a88f['id'];}_0x494c34['changes']=_0x494c34['changes']['concat'](_0x29384a);}return _0x494c34;}['_markMarkers'](_0x51e0e8,_0x22f93){for(let _0x41ecbc=0x0;_0x41ecbc<_0x51e0e8['length'];_0x41ecbc++)for(const [_0x48a41f,_0x323c8e]of _0x22f93)!_0x323c8e['isCollapsed']&&_0x323c8e['start']['isEqual'](_0x51e0e8[_0x41ecbc]['previousPosition'])&&_0x51e0e8[_0x41ecbc]['markersStart']['push'](_0x48a41f),_0x323c8e['end']['isEqual'](_0x51e0e8[_0x41ecbc]['nextPosition'])&&_0x51e0e8[_0x41ecbc]['markersEnd']['push'](_0x48a41f);}['_joinTapes'](_0x1ab2ef,_0x1c5ec5){let _0x19528e=[],_0x4bd71b=0x0,_0x45ffef=0x0;for(;_0x4bd71b<_0x1ab2ef['length']||_0x45ffef<_0x1c5ec5['length'];){const _0x569347=_0x1ab2ef[_0x4bd71b]||{},_0x4d13a1=_0x1c5ec5[_0x45ffef]||{};if(_0x569347['id']==_0x4d13a1['id'])_0x4bd71b++,_0x45ffef++,_0x19528e['push'](_0x569347);else{if(_0x4d13a1['isRemoved']&&_0x569347['isAdded']){const {commonTape:_0x59f8a8,iEnd:_0x1bd148,jEnd:_0x47278f}=this['_threeWayMerge'](_0x1ab2ef,_0x4bd71b,_0x1c5ec5,_0x45ffef);_0x19528e=_0x19528e['concat'](_0x59f8a8),_0x4bd71b=_0x1bd148,_0x45ffef=_0x47278f;}else _0x4d13a1['isRemoved']?(_0x45ffef++,_0x19528e['push'](_0x4d13a1)):(_0x4bd71b++,_0x19528e['push'](_0x569347));}}return _0x19528e;}['_markSuggestions'](_0x146e97,_0x29e521){const _0x6ffdb1=[];for(let _0x48146b=0x0;_0x48146b<_0x146e97['length'];_0x48146b++){for(let _0x456d27=0x0;_0x456d27<_0x146e97[_0x48146b]['markersStart']['length'];_0x456d27++){const _0x2a47c5=_0x146e97[_0x48146b]['markersStart'][_0x456d27];if(!_0x29e521['has'](_0x2a47c5))continue;const {group:_0x1a220d,type:_0x503a15,authorId:_0x425f49}=_0x1938f1(_0x2a47c5);'revision-suggestion'!=_0x1a220d||'insertion'!=_0x503a15&&'deletion'!=_0x503a15||(_0x6ffdb1['unshift']({'type':_0x503a15,'name':_0x2a47c5,'userId':_0x425f49}),_0x146e97[_0x48146b]['markersStart']['splice'](_0x456d27,0x1),_0x456d27--);}_0x115afc(_0x146e97[_0x48146b]);for(let _0xc3acd5=0x0;_0xc3acd5<_0x146e97[_0x48146b]['markersEnd']['length'];_0xc3acd5++){const _0x5b3d30=_0x146e97[_0x48146b]['markersEnd'][_0xc3acd5];if(!_0x29e521['has'](_0x5b3d30))continue;const {group:_0x2d71f0,type:_0x73f5f2}=_0x1938f1(_0x5b3d30);if('revision-suggestion'!=_0x2d71f0||'insertion'!=_0x73f5f2&&'deletion'!=_0x73f5f2)continue;_0x146e97[_0x48146b]['markersEnd']['splice'](_0xc3acd5,0x1),_0xc3acd5--;const _0x74f3b6=_0x6ffdb1['findIndex'](_0x364db8=>_0x364db8['name']==_0x5b3d30);_0x74f3b6>-0x1&&_0x6ffdb1['splice'](_0x74f3b6,0x1);}}function _0x1938f1(_0x1d043d){const _0x34b094=_0x1d043d['split'](':');return{'group':_0x34b094[0x0],'type':_0x34b094[0x1],'subType':_0x34b094['length']>=0x5?_0x34b094[0x2]:null,'id':_0x34b094['length']<0x5?_0x34b094[0x2]:_0x34b094[0x3],'authorId':_0x34b094['length']<0x5?_0x34b094[0x3]:_0x34b094[0x4],'markerCount':0x6==_0x34b094['length']?_0x34b094[0x5]:null};}function _0x115afc(_0x319e99){for(let _0x31461d=0x0;_0x31461d<_0x6ffdb1['length'];_0x31461d++){if(_0x319e99['isAdded']&&'insertion'==_0x6ffdb1[_0x31461d]['type']&&_0x319e99['isAdded']['userId']==_0x6ffdb1[_0x31461d]['userId'])return _0x319e99['isAddSuggestion']=_0x6ffdb1[_0x31461d],void delete _0x319e99['isAdded'];if(!_0x319e99['isAdded']&&!_0x319e99['isRemoved']&&'deletion'==_0x6ffdb1[_0x31461d]['type'])return void(_0x319e99['isRemoveSuggestion']=_0x6ffdb1[_0x31461d]);}}}['_setDistance'](_0xad9f25,_0x45c70d){let _0x51fd1d=0x0,_0x254379=!0x1;const _0x10dc5e=new Map();for(const _0x24e36e of _0xad9f25)_0x24e36e[_0x45c70d]?_0x254379&&(_0x51fd1d++,_0x254379=!0x1):(_0x51fd1d++,_0x254379=!0x0),_0x10dc5e['set'](_0x24e36e['id'],_0x51fd1d);for(let _0x4d8559=0x0;_0x4d8559<_0xad9f25['length'];_0x4d8559++){if('isRemoved'==_0x45c70d&&_0xad9f25[_0x4d8559]['isAdded']||'isAdded'==_0x45c70d&&_0xad9f25[_0x4d8559]['isRemoved'])continue;if('text'==_0xad9f25[_0x4d8559]['type']){_0xad9f25[_0x4d8559]['distance']=0x0;continue;}const _0x750231=_0x10dc5e['get'](_0xad9f25[_0x4d8559]['pairId']),_0xe74e03=_0x10dc5e['get'](_0xad9f25[_0x4d8559]['id']);_0xad9f25[_0x4d8559]['distance']=_0x750231-_0xe74e03;}}['_getRevisionsRange'](_0x191b1e,_0x49f487,_0xf6d9d1=!0x1){const _0x2228df=[];let _0x309274=this['repository']['getIndex'](_0x191b1e),_0x3b9428=this['repository']['getIndex'](_0x49f487);for(-0x1==_0x3b9428&&(_0x3b9428=this['repository']['_revisions']['length'],_0xf6d9d1=!0x1);_0x309274<_0x3b9428;)_0x2228df['push'](this['repository']['getRevision'](_0x309274)),_0x309274++;return _0xf6d9d1&&_0x2228df['push'](this['repository']['getRevision'](_0x309274)),_0x2228df;}['_threeWayMerge'](_0x4b4ac5,_0x3f1dea,_0x54be32,_0x56e981){const _0x3ef521=this['editor']['model']['schema'];let _0x4b8fd0=_0x3f1dea;for(;_0x4b4ac5[_0x4b8fd0]&&_0x4b4ac5[_0x4b8fd0]['isAdded'];)_0x4b8fd0++;let _0x2e116b=_0x56e981;for(;_0x54be32[_0x2e116b]&&_0x54be32[_0x2e116b]['isRemoved'];)_0x2e116b++;_0x143331(_0x4b4ac5,_0x3f1dea,_0x4b8fd0),_0x143331(_0x54be32,_0x56e981,_0x2e116b);const _0x391a64=_0x54be32['slice'](_0x56e981,_0x2e116b)['concat'](_0x4b4ac5['slice'](_0x3f1dea,_0x4b8fd0));return _0x391a64['sort']((_0x4b6bfd,_0x128253)=>_0x4b6bfd['side']!=_0x128253['side']?_0x4b6bfd['side']-_0x128253['side']:_0x4b6bfd['level']!=_0x128253['level']?_0x4b6bfd['level']-_0x128253['level']:_0x4b6bfd['distance']!=_0x128253['distance']?_0x128253['distance']-_0x4b6bfd['distance']:!!_0x4b6bfd['isAdded']!=!!_0x128253['isAdded']?-0x1==_0x4b6bfd['side']||0x0==_0x4b6bfd['side']?_0x4b6bfd['isAdded']?-0x1:0x1:_0x4b6bfd['isAdded']?0x1:-0x1:_0x4b6bfd['index']-_0x128253['index']),{'commonTape':_0x391a64,'iEnd':_0x4b8fd0,'jEnd':_0x2e116b};function _0x143331(_0x57bf2f,_0x45de6b,_0x151204){let _0x94137e=-0x1,_0x42e239=Number['POSITIVE_INFINITY'],_0x34da8a=!0x0;for(let _0x3e1481=_0x45de6b;_0x3e1481<_0x151204;_0x3e1481++)if(_0x3ef521['isInline'](_0x57bf2f[_0x3e1481]['item'])||(_0x34da8a=!0x1),_0x57bf2f[_0x3e1481]['item']['startIndex']<_0x45de6b&&(_0x94137e=_0x3e1481),_0x57bf2f[_0x3e1481]['item']['endIndex']>=_0x151204){_0x42e239=_0x3e1481;break;}_0x34da8a&&(_0x94137e=_0x151204-0x1);for(let _0x233de0=_0x45de6b;_0x233de0<_0x151204;_0x233de0++)_0x57bf2f[_0x233de0]['side']=_0x233de0<=_0x94137e?-0x1:_0x233de0<_0x42e239?0x0:0x1,_0x57bf2f[_0x233de0]['index']=_0x233de0;let _0x4fc3d6=0x0;for(let _0x3cebe6=_0x45de6b;_0x3cebe6<=_0x94137e;_0x3cebe6++)0x0==_0x57bf2f[_0x3cebe6]['distance']?_0x57bf2f[_0x3cebe6]['level']=_0x4fc3d6:(_0x4fc3d6++,_0x57bf2f[_0x3cebe6]['level']=_0x4fc3d6,_0x4fc3d6++);for(let _0x2c2e58=_0x45de6b;_0x2c2e58<_0x151204;_0x2c2e58++)0x0==_0x57bf2f[_0x2c2e58]['side']&&(_0x57bf2f[_0x2c2e58]['level']=_0x4fc3d6);_0x4fc3d6=0x0;for(let _0x996405=_0x151204-0x1;_0x996405>=_0x42e239;_0x996405--)0x0==_0x57bf2f[_0x996405]['distance']?_0x57bf2f[_0x996405]['level']=_0x4fc3d6:(_0x4fc3d6--,_0x57bf2f[_0x996405]['level']=_0x4fc3d6,_0x4fc3d6--);}}['_fixObsoleteTags'](_0x8b739d){const _0x526a85=new Map(),_0x23101c=this['editor']['model']['schema'];for(let _0x1b5222=0x1;_0x1b5222<_0x8b739d['length'];_0x1b5222++){let _0x344cda,_0x28f625,_0x3d4b8b;const _0x43dde6=_0x8b739d[_0x1b5222],_0x1f46a7=_0x8b739d[_0x1b5222-0x1];if('text'==_0x43dde6['type'])continue;if(_0x43dde6['type']!=_0x1f46a7['type'])continue;if(!_0x23101c['isBlock'](_0x1f46a7['item'])||_0x23101c['isLimit'](_0x1f46a7['item']))continue;if(!_0x23101c['isBlock'](_0x43dde6['item'])||_0x23101c['isLimit'](_0x43dde6['item']))continue;if((_0x8b739d[_0x1b5222]['isAdded']||_0x8b739d[_0x1b5222]['isAddSuggestion'])&&_0x8b739d[_0x1b5222-0x1]['isRemoved'])_0x344cda=_0x8b739d[_0x1b5222],_0x28f625=_0x8b739d[_0x1b5222-0x1],_0x3d4b8b=_0x1b5222-0x1;else{if(!_0x8b739d[_0x1b5222]['isRemoved']||!_0x8b739d[_0x1b5222-0x1]['isAdded']&&!_0x8b739d[_0x1b5222-0x1]['isAddSuggestion'])continue;_0x344cda=_0x8b739d[_0x1b5222-0x1],_0x28f625=_0x8b739d[_0x1b5222],_0x3d4b8b=_0x1b5222;}const _0x50a2c9=_0x344cda['level']==_0x28f625['level'],_0x521c7e=Math['abs'](_0x344cda['level'])<Math['abs'](_0x28f625['level'])&&0x0==_0x28f625['distance'];(_0x50a2c9||_0x521c7e)&&(_0x526a85['set'](_0x28f625['id'],_0x344cda['id']),_0x8b739d['splice'](_0x3d4b8b,0x1),_0x1b5222--,_0x344cda['isAdded']=!0x1);}for(let _0x3ad0b9=0x0;_0x3ad0b9<_0x8b739d['length'];_0x3ad0b9++)_0x526a85['has'](_0x8b739d[_0x3ad0b9]['pairId'])&&(_0x8b739d[_0x3ad0b9]['pairId']=_0x526a85['get'](_0x8b739d[_0x3ad0b9]['pairId']));}['_removeMissingPairs'](_0x1f1706){const _0x2577e9=new Set(_0x1f1706['map'](_0x379a72=>_0x379a72['id']));for(let _0x470237=0x0;_0x470237<_0x1f1706['length'];_0x470237++)_0x2577e9['has'](_0x1f1706[_0x470237]['pairId'])||0x0==_0x1f1706[_0x470237]['distance']||(_0x1f1706[_0x470237]['isIncorrect']=!0x0);return _0x1f1706['filter'](_0x33ce4e=>!_0x33ce4e['isIncorrect']);}['_markMismatchedRemovedTags'](_0x45d10a){const _0x675b4b=new Set();for(let _0x5d7245=0x0;_0x5d7245<_0x45d10a['length'];_0x5d7245++){if(_0x675b4b['has'](_0x45d10a[_0x5d7245]['id'])&&_0x45d10a[_0x5d7245]['isRemoved']&&(_0x45d10a[_0x5d7245]['isIncorrect']=!0x0),_0x45d10a[_0x5d7245]['isIncorrect'])continue;if(0x0==_0x45d10a[_0x5d7245]['distance'])continue;if('elementStart'!=_0x45d10a[_0x5d7245]['type'])continue;if(null==_0x45d10a[_0x5d7245]['pairId'])continue;let _0x1a2371=_0x5d7245+0x1,_0x5cf0c7=0x0;for(;_0x45d10a[_0x1a2371]['id']!=_0x45d10a[_0x5d7245]['pairId'];)'elementStart'==_0x45d10a[_0x1a2371]['type']?_0x5cf0c7++:'elementEnd'==_0x45d10a[_0x1a2371]['type']&&_0x5cf0c7--,_0x1a2371++;if(0x0!=_0x5cf0c7){if(_0x45d10a[_0x5d7245]['isRemoved'])_0x45d10a[_0x5d7245]['isIncorrect']=!0x0;else{for(;_0x1a2371!=_0x5d7245;)_0x45d10a[_0x1a2371]['isRemoved']&&0x0!=_0x45d10a[_0x1a2371]['distance']&&(_0x45d10a[_0x1a2371]['isIncorrect']=!0x0,_0x675b4b['add'](_0x45d10a[_0x1a2371]['pairId'])),_0x1a2371--;}}}return _0x45d10a['filter'](_0x1ecb3a=>!_0x1ecb3a['isIncorrect']);}['_removeUnsupportedChanges'](_0x24bddd){const _0x5263b8=this['editor']['model']['schema'];for(let _0x9b510e=0x0;_0x9b510e<_0x24bddd['length'];_0x9b510e++){if(!(_0x24bddd[_0x9b510e]['isAdded']||_0x24bddd[_0x9b510e]['isAddSuggestion']||_0x24bddd[_0x9b510e]['isRemoved']||_0x24bddd[_0x9b510e]['isRemoveSuggestion']))continue;if(0x0==_0x24bddd[_0x9b510e]['distance'])continue;const _0x10f768=_0x24bddd[_0x9b510e]['item'];_0x5263b8['isBlock'](_0x10f768)||_0x5263b8['isLimit'](_0x10f768)||(_0x24bddd[_0x9b510e]['isAdded']&&delete _0x24bddd[_0x9b510e]['isAdded'],_0x24bddd[_0x9b510e]['isAddSuggestion']&&delete _0x24bddd[_0x9b510e]['isAddSuggestion'],_0x24bddd[_0x9b510e]['isRemoveSuggestion']&&delete _0x24bddd[_0x9b510e]['isRemoveSuggestion'],_0x24bddd[_0x9b510e]['isRemoved']&&(_0x24bddd[_0x9b510e]['isIncorrect']=!0x0));}return _0x24bddd['filter'](_0x4f7483=>!_0x4f7483['isIncorrect']);}['_makeModelFromTape'](_0x11af2c,_0x5161a8,_0x2d409f){const _0x311135=new _0x308cc0(),_0x29bf90=[],_0x3844bc=new Map(),_0xe377cc=this['editor']['model'],_0x212a05=_0xe377cc['schema'],_0xff6901=[_0x311135],_0x451dde={},_0x1cbdcd={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x49ce9d=null;const _0x1e4884=[0x0];for(let _0x840db2=0x0;_0x840db2<_0x11af2c['length'];_0x840db2++)if('elementStart'===_0x11af2c[_0x840db2]['type']){_0x11af2c[_0x840db2]['previousPosition']=_0xe377cc['createPositionFromPath'](_0x311135,_0x1e4884);const _0x5853ef=new _0xe30740(_0x11af2c[_0x840db2]['item']['name'],_0x11af2c[_0x840db2]['item']['getAttributes']());_0xff6901[0x0]['_appendChild'](_0x5853ef),_0x1e4884['push'](0x0),_0xff6901['unshift'](_0x5853ef),_0x11af2c[_0x840db2]['nextPosition']=_0xe377cc['createPositionFromPath'](_0x311135,_0x1e4884);}else'elementEnd'===_0x11af2c[_0x840db2]['type']?(_0xff6901['shift'](),_0x11af2c[_0x840db2]['previousPosition']=_0xe377cc['createPositionFromPath'](_0x311135,_0x1e4884),_0x1e4884['pop'](),_0x1e4884[_0x1e4884['length']-0x1]++,_0x11af2c[_0x840db2]['nextPosition']=_0xe377cc['createPositionFromPath'](_0x311135,_0x1e4884)):(_0x11af2c[_0x840db2]['previousPosition']=_0xe377cc['createPositionFromPath'](_0x311135,_0x1e4884),_0x49ce9d?_0x49ce9d['_data']+=_0x11af2c[_0x840db2]['item']['data']:_0x49ce9d=new _0xf9337(_0x11af2c[_0x840db2]['item']['data'],_0x11af2c[_0x840db2]['item']['getAttributes']()),_0x11af2c[_0x840db2+0x1]&&'text'===_0x11af2c[_0x840db2+0x1]['type']&&_0x2b39f8(_0x49ce9d,_0x11af2c[_0x840db2+0x1]['item'])||(_0xff6901[0x0]['_appendChild'](_0x49ce9d),_0x49ce9d=null),_0x1e4884[_0x1e4884['length']-0x1]+=_0x11af2c[_0x840db2]['item']['offsetSize'],_0x11af2c[_0x840db2]['nextPosition']=_0xe377cc['createPositionFromPath'](_0x311135,_0x1e4884));for(let _0x54506f=0x0;_0x54506f<_0x11af2c['length'];_0x54506f++){const _0x4584f8=_0x11af2c[_0x54506f]['previousPosition'],_0x2c052e=_0x11af2c[_0x54506f]['nextPosition'];for(const _0x34508b of _0x11af2c[_0x54506f]['markersStart'])_0x3844bc['set'](_0x34508b,{'start':_0x4584f8,'end':null});_0x6835d0('isRemoveSuggestion',_0x54506f,_0x4584f8,_0x2c052e),_0x6835d0('isAddSuggestion',_0x54506f,_0x4584f8,_0x2c052e),_0x6835d0('isRemoved',_0x54506f,_0x4584f8,_0x2c052e),_0x6835d0('isAdded',_0x54506f,_0x4584f8,_0x2c052e);for(const _0x13619a of _0x11af2c[_0x54506f]['markersEnd']){const _0x177ffa=_0x3844bc['get'](_0x13619a);_0x177ffa?_0x177ffa['end']=_0x2c052e:_0x3844bc['set'](_0x13619a,{'start':_0x2c052e,'end':_0x2c052e});}}for(const [_0x18d7eb,_0xd41bd6]of _0x3844bc){const _0x67c7d=this['editor']['model']['createRange'](_0xd41bd6['start'],_0xd41bd6['end']);_0x311135['markers']['set'](_0x18d7eb,_0x67c7d);}return _0x29bf90['sort']((_0x8bbd0f,_0x359155)=>{const _0x73bc7e=_0x311135['markers']['get']('revision:'+_0x8bbd0f['id']),_0x4d8c96=_0x311135['markers']['get']('revision:'+_0x359155['id']);return _0x73bc7e['start']['isBefore'](_0x4d8c96['start'])?-0x1:_0x73bc7e['start']['isAfter'](_0x4d8c96['start'])?0x1:_0x73bc7e['end']['isBefore'](_0x4d8c96['end'])?-0x1:_0x73bc7e['end']['isAfter'](_0x4d8c96['end'])?0x1:'add'===_0x8bbd0f['type']?-0x1:0x1;}),{'root':_0x311135,'changes':_0x29bf90};function _0x6835d0(_0xbe730b,_0x1c33b0,_0x5aa241,_0x4d0ec2){const _0x508168=!!_0x11af2c[_0x1c33b0][_0xbe730b],_0x5c773a=_0x508168?_0x11af2c[_0x1c33b0][_0xbe730b]['userId']:null,_0x72aa63=_0x1c33b0===_0x11af2c['length']-0x1,_0x3c0870=_0x1cbdcd[_0xbe730b][0x0],_0x164b92=_0x212a05['isObject'](_0x11af2c[_0x1c33b0]['item']);!_0x451dde[_0xbe730b]&&_0x508168?_0x451dde[_0xbe730b]={'start':_0x5aa241,'tapeItem':_0x11af2c[_0x1c33b0],'userId':_0x5c773a,'type':_0xbe730b}:_0x451dde[_0xbe730b]&&!_0x508168?(_0x451dde[_0xbe730b]['end']=_0x5aa241,_0x49ecb1(_0x451dde[_0xbe730b]),_0x451dde[_0xbe730b]=null):_0x451dde[_0xbe730b]&&_0x508168&&_0x451dde[_0xbe730b]['userId']!==_0x5c773a&&(_0x451dde[_0xbe730b]['end']=_0x5aa241,_0x3c0870&&_0x3c0870['userId']===_0x451dde[_0xbe730b]['userId']||_0x49ecb1(_0x451dde[_0xbe730b]),_0x451dde[_0xbe730b]={'start':_0x5aa241,'tapeItem':_0x11af2c[_0x1c33b0],'userId':_0x5c773a,'type':_0xbe730b}),_0x451dde[_0xbe730b]&&_0x164b92&&('elementStart'!==_0x11af2c[_0x1c33b0]['type']||_0x3c0870&&_0x3c0870['userId']===_0x5c773a||_0x1cbdcd[_0xbe730b]['unshift']({'userId':_0x5c773a,'object':_0x11af2c[_0x1c33b0]['item'],'change':_0x451dde[_0xbe730b]}),'elementEnd'===_0x11af2c[_0x1c33b0]['type']&&_0x3c0870&&_0x3c0870['object']===_0x11af2c[_0x1c33b0]['item']&&(_0x1cbdcd[_0xbe730b]['shift'](),_0x451dde[_0xbe730b]=_0x3c0870['change'])),_0x451dde[_0xbe730b]&&_0x72aa63&&(_0x451dde[_0xbe730b]['end']=_0x4d0ec2,_0x49ecb1(_0x451dde[_0xbe730b]),_0x451dde[_0xbe730b]=null);}function _0x49ecb1({start:_0x13a7ed,end:_0x328781,tapeItem:_0x351102,userId:_0xb24ff6,type:_0x4efb8c}){const _0x33058b=_0x351102['item'],_0x57c69a=_0xe377cc['schema']['isBlock'](_0x33058b)&&!_0xe377cc['schema']['isLimit'](_0x33058b),_0x128a3d=_0x13a7ed['nodeAfter']==_0x328781['parent']&&_0x328781['isAtStart'];if(_0x57c69a&&_0x128a3d)return;const _0x285e7e=_0xe377cc['createRange'](_0x13a7ed,_0x328781),_0x37b786=_0x5161a8['get'](_0xb24ff6),_0x5beaca=new z({'author':_0x37b786,'type':'isAdded'==_0x4efb8c||'isAddSuggestion'==_0x4efb8c?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x4efb8c||'isRemoveSuggestion'==_0x4efb8c},'createdAt':new Date(),'rootName':_0x2d409f});_0x29bf90['push'](_0x5beaca),_0x311135['markers']['set']('revision:'+_0x5beaca['id'],_0x285e7e);}function _0x2b39f8(_0x179e65,_0x17a2ec){const _0x1bc4ec=_0x179e65['getAttributes'](),_0x229965=_0x17a2ec['getAttributes']();for(const _0x5dd648 of _0x1bc4ec){if(_0x5dd648[0x1]!==_0x17a2ec['getAttribute'](_0x5dd648[0x0]))return!0x1;_0x229965['next']();}return _0x229965['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x5246e1=>{const _0x55c0e3=_0x5246e1['markerName']['split'](':')[0x1],_0x7bb92d=this['_getChangeFromId'](_0x55c0e3);if(!_0x7bb92d)return null;const _0xc8e2d5='add'==_0x7bb92d['type']?'insertion':'deletion',_0x51b74f=['ck-suggestion-marker','ck-suggestion-marker-'+_0xc8e2d5];return _0x7bb92d['data']['isSuggestion']&&_0x51b74f['push']('ck-suggestion-marker-'+_0xc8e2d5+'-new'),this['activeChange']==_0x7bb92d&&_0x51b74f['push']('ck-suggestion-marker--active'),{'classes':_0x51b74f,'attributes':{'data-change-id':_0x55c0e3}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x2a3ef9=>{_0x2a3ef9['on']('element:pre',(_0x30aeb6,_0x28baee,_0x1c1e39)=>{const _0x2be7cd=_0x28baee['viewItem']['getChild'](0x0);if(!_0x2be7cd||!_0x2be7cd['is']('element','code'))return;if(!_0x1c1e39['consumable']['consume'](_0x2be7cd,{'attributes':['vid_start','vid_end']}))return;const _0x170e95=_0x28baee['modelRange']['start']['nodeAfter'];_0x1c1e39['writer']['setAttribute']('vid_start',_0x2be7cd['getAttribute']('vid_start'),_0x170e95),_0x1c1e39['writer']['setAttribute']('vid_end',_0x2be7cd['getAttribute']('vid_end'),_0x170e95);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x3b83ca=>{_0x3b83ca['on']('element',(_0x4bca86,_0x1e094d,_0x3f756b)=>{if(!_0x3f756b['consumable']['consume'](_0x1e094d['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x1e094d['modelRange']['isCollapsed'])return;const _0x430e6b=_0x1e094d['modelRange']['start']['nodeAfter'];_0x430e6b['hasAttribute']('vid_start')||_0x430e6b['hasAttribute']('vid')||(_0x3f756b['writer']['setAttribute']('vid_start',_0x1e094d['viewItem']['getAttribute']('vid_start'),_0x430e6b),_0x3f756b['writer']['setAttribute']('vid_end',_0x1e094d['viewItem']['getAttribute']('vid_end'),_0x430e6b));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x2511a2=>_0x2511a2['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x853b30,[,_0xfaa37f])=>{['vid_start','vid_end','vid']['includes'](_0xfaa37f)&&(_0x853b30['return']=!0x0,_0x853b30['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x4cbb83=>{_0x4cbb83['on']('attribute:vid',(_0x4344ee,_0x44cc7e,_0xf41754)=>{if('\x20'!=_0x44cc7e['item']['data']||_0x44cc7e['item']['parent']['maxOffset']>0x1)return;if(!_0xf41754['consumable']['consume'](_0x44cc7e['item'],_0x4344ee['name']))return;const _0x5a9203=_0xf41754['writer'],_0x2c035e=_0xf41754['mapper']['toViewRange'](_0x44cc7e['range']);_0x5a9203['wrap'](_0x2c035e,_0x5a9203['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x5c45ab){const _0x5e3d47=_0x5c45ab['plugins']['get']('RevisionViewer');return(_0x6b4c26,_0x344035,_0x2f81d5)=>{const _0xe26339=_0x344035['markerName']['split'](':')[0x1],_0xf7ebc8=_0x5e3d47['_getChangeFromId'](_0xe26339);if(!_0xf7ebc8)return null;const _0x167b16='add'==_0xf7ebc8['type']?'split':'merge';if(!_0x2f81d5['consumable']['test'](_0x344035['markerRange'],_0x6b4c26['name']))return;const _0x4b1493=_0x344035['markerRange']['getWalker'](),_0x2e6e8a=_0x344035['markerRange']['start'],_0x2dd78d=_0x5c45ab['model']['schema'];let _0x396f42=null,_0x30f578=null,_0x21f1fc=!0x1,_0xb01f89=!0x1;for(const _0x206d14 of _0x4b1493){const _0x5e3f14=_0x206d14['item'];_0x21f1fc=_0x21f1fc||_0x2dd78d['isContent'](_0x5e3f14);const _0x19f5df=_0x2f81d5['mapper']['toViewElement'](_0x5e3f14);if(_0x19f5df&&_0x19f5df['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x206d14['type']&&(_0x2dd78d['isBlock'](_0x5e3f14)&&!_0x2dd78d['isLimit'](_0x5e3f14)&&(_0x5e3f14['nextSibling']||_0x2e6e8a['isAtEnd']?_0x396f42&&_0x396f42['parent']==_0x5e3f14||(_0x396f42=_0x5e3f14,_0xa996c9(_0x206d14['previousPosition']),_0xb01f89=!0x0):_0x30f578=_0x30f578||_0x206d14['previousPosition']));}function _0xa996c9(_0x20b691){const _0x1f43fc=_0x2f81d5['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x167b16}),_0x353889=_0x2f81d5['mapper']['toViewPosition'](_0x20b691);_0xf7ebc8['data']['isSuggestion']&&_0x2f81d5['writer']['addClass']('ck-suggestion-marker-'+_0x167b16+'-new',_0x1f43fc),_0x5e3d47['activeChange']==_0xf7ebc8&&_0x2f81d5['writer']['addClass']('ck-suggestion-marker--active',_0x1f43fc),_0x2f81d5['writer']['insert'](_0x353889,_0x1f43fc),_0x2f81d5['mapper']['bindElementToMarker'](_0x1f43fc,_0x344035['markerName']);}_0x21f1fc||_0xb01f89||!_0x30f578||_0xa996c9(_0x30f578);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x1baddb,_0x591b06,_0x39023f)=>{const _0x3b44f8=_0x39023f['mapper']['markerNameToElements'](_0x591b06['markerName']);if(_0x3b44f8){for(const _0x566e11 of _0x3b44f8)(_0x566e11['hasClass']('ck-suggestion-marker-split')||_0x566e11['hasClass']('ck-suggestion-marker-merge'))&&(_0x39023f['mapper']['unbindElementFromMarkerName'](_0x566e11,_0x591b06['markerName']),_0x39023f['writer']['remove'](_0x566e11));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x44b985,_0x5a0199,_0x18c487)=>{const _0x4c3175=_0x5a0199['markerName']['split'](':')[0x1],_0x2e7eb4=this['_getChangeFromId'](_0x4c3175);if(!_0x2e7eb4)return null;const _0x29e600='add'==_0x2e7eb4['type']?'split':'merge';if(_0x18c487['consumable']['test'](_0x5a0199['markerRange'],_0x44b985['name']))for(const _0x573ae8 of _0x5a0199['markerRange']['getItems']()){if(!_0x573ae8['is']('element','softBreak'))continue;const _0x539628=_0x18c487['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x29e600}),_0x3cab6d=_0x18c487['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x573ae8));_0x2e7eb4['data']['isSuggestion']&&_0x18c487['writer']['addClass']('ck-suggestion-marker-'+_0x29e600+'-new',_0x539628),this['activeChange']==_0x2e7eb4&&_0x18c487['writer']['addClass']('ck-suggestion-marker--active',_0x539628),_0x18c487['writer']['insert'](_0x3cab6d,_0x539628),_0x18c487['mapper']['bindElementToMarker'](_0x539628,_0x5a0199['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x2caaa0=>{for(const _0x4e16aa of this['editor']['model']['document']['getRootNames']()){const _0x2c818c=this['editor']['model']['document']['getRoot'](_0x4e16aa),_0x5100ec=this['editor']['editing']['view']['document']['getRoot'](_0x4e16aa);if(_0x5100ec){const _0x1aeada=_0x2c818c['getAttribute']('revisionHistoryAttachChange');if(_0x2caaa0['removeAttribute']('data-change-id',_0x5100ec),_0x2caaa0['removeClass']('ck-revision-history-root-add',_0x5100ec),_0x2caaa0['removeClass']('ck-revision-history-root-remove',_0x5100ec),_0x2caaa0['removeClass']('ck-revision-history-root--active',_0x5100ec),_0x1aeada){const _0x463cb9=this['_getChangeFromId'](_0x1aeada);if(!_0x463cb9)return null;_0x2caaa0['setAttribute']('data-change-id',_0x1aeada,_0x5100ec),_0x2caaa0['addClass']('ck-revision-history-root-'+_0x463cb9['type'],_0x5100ec),this['activeChange']==_0x463cb9&&_0x2caaa0['addClass']('ck-revision-history-root--active',_0x5100ec);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x2a46af=>'revision-comment:'+_0x2a46af,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x26845a=>'revision-suggestion:'+_0x26845a,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x179c20=>({'name':'suggestion:'+_0x179c20,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x3c6c29=>{const _0x195b79=_0x3c6c29['markerName']['split'](':')[0x1];return'insertion'!=_0x195b79&&'deletion'!=_0x195b79?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x195b79]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',J(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',J(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x2446ee,_0x46dc9a,_0x3cdf45)=>{const _0x4072d7=_0x3cdf45['mapper']['markerNameToElements'](_0x46dc9a['markerName']);if(_0x4072d7){for(const _0x4d789a of _0x4072d7)_0x4d789a['is']('uiElement')&&(_0x3cdf45['mapper']['unbindElementFromMarkerName'](_0x4d789a,_0x46dc9a['markerName']),_0x3cdf45['writer']['remove'](_0x4d789a));}},{'priority':'high'});}['_getChangeFromId'](_0x4d7163){return this['_changeIdToChange']['get'](_0x4d7163);}['_getViewForChange'](_0x3c4900){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new q(this['editor']['locale'],_0x3c4900),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x1fd126,_0x1ee548,_0x256b16,_0x289692)=>{_0x289692&&this['_balloon']['remove'](_0x289692),_0x256b16&&(this['_balloon']['add']({'view':_0x256b16,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x10a916=this['editor']['editing'],_0x11870b=this['_getChangeFromId'](_0x256b16['changeId']);let _0x44c1aa;if(_0x11870b['data']['isOnRoot']){const _0x229066=_0x10a916['view']['getDomRoot'](_0x11870b['rootName']);_0x44c1aa=Array['from'](_0x229066['getClientRects']());}else{const _0x123898=this['editor']['model']['markers']['get']('revision:'+_0x256b16['changeId']);_0x44c1aa=Array['from'](_0x10a916['mapper']['markerNameToElements'](_0x123898['name']))['map'](_0x1e57f4=>_0x10a916['view']['domConverter']['mapViewToDom'](_0x1e57f4))['map'](_0xaac7ac=>Array['from'](_0xaac7ac['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x44c1aa[0x0];return _0x44c1aa['find'](_0x549707=>_0x549707['top']-0x3<=this['_activeViewTarget']['y']&&_0x549707['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x549707['left']-0x3<=this['_activeViewTarget']['x']&&_0x549707['right']+0x3>=this['_activeViewTarget']['x'])||_0x44c1aa[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x3b43b5,_0x341c3a,_0x3ff408,_0x2da3b7)=>{this['activeView']=_0x3ff408?this['_getViewForChange'](_0x3ff408):null,this['editor']['model']['change'](()=>{const _0x10b551=this['editor']['editing'];_0x2da3b7&&(_0x2da3b7['data']['isOnRoot']?_0x10b551['view']['change'](_0x5be78c=>{_0x5be78c['removeClass']('ck-revision-history-root--active',_0x10b551['view']['document']['getRoot'](_0x2da3b7['rootName']));}):_0x10b551['reconvertMarker']('revision:'+_0x2da3b7['id'])),_0x3ff408&&(_0x3ff408['data']['isOnRoot']?_0x10b551['view']['change'](_0x50061d=>{_0x50061d['addClass']('ck-revision-history-root--active',_0x10b551['view']['document']['getRoot'](_0x3ff408['rootName']));}):_0x10b551['reconvertMarker']('revision:'+_0x3ff408['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x18a620,_0x20aa4e)=>{if(this['activeChange'])return;const _0x1c5620=this['_findChangeIdFromDomTarget'](_0x20aa4e['target']),_0x40a9c6=this['_changeIdToChange']['get'](_0x1c5620);_0x40a9c6?(this['_activeViewTarget']={'x':_0x20aa4e['domEvent']['x'],'y':_0x20aa4e['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x40a9c6)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x553548,_0x5c3fc)=>{const _0x57d0c2=this['_findChangeIdFromDomTarget'](_0x5c3fc['target']),_0x3ada6b=this['_changeIdToChange']['get'](_0x57d0c2);_0x3ada6b?(this['_activeViewTarget']={'x':_0x5c3fc['domEvent']['x'],'y':_0x5c3fc['domEvent']['y']},_0x3ada6b===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x3ada6b):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x1b41c6){do{const _0x4e9e54=_0x1b41c6['getAttribute']('data-change-id');if(_0x4e9e54)return _0x4e9e54;_0x1b41c6=_0x1b41c6['parent'];}while(_0x1b41c6);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x48d737=>{for(const _0x493edd of this['editor']['model']['markers'])_0x48d737['removeMarker'](_0x493edd);});}}function J(_0x4b8b1d,_0x1b76b3){return(_0x100c8b,_0x5795ab,_0xb96ec9)=>{if(!_0xb96ec9['consumable']['test'](_0x5795ab['markerRange'],_0x100c8b['name']))return;const _0x4f0a66=_0x5795ab['markerRange']['getWalker'](),_0xd79c3b=_0x5795ab['markerRange']['start'],_0x1d89de=_0x4b8b1d['model']['schema'];let _0x5a21d0=null,_0x8b141f=null,_0x123ca6=!0x1,_0x19435a=!0x1;for(const _0x494d69 of _0x4f0a66){const _0x30c327=_0x494d69['item'];_0x123ca6=_0x123ca6||_0x1d89de['isContent'](_0x30c327);const _0xcb64a1=_0xb96ec9['mapper']['toViewElement'](_0x30c327);if(_0xcb64a1&&_0xcb64a1['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x494d69['type']&&(_0x1d89de['isBlock'](_0x30c327)&&!_0x1d89de['isLimit'](_0x30c327)&&(_0x30c327['nextSibling']||_0xd79c3b['isAtEnd']?_0x5a21d0&&_0x5a21d0['parent']==_0x30c327||(_0x5a21d0=_0x30c327,_0x2d9a7f(_0x494d69['previousPosition']),_0x19435a=!0x0):_0x8b141f=_0x8b141f||_0x494d69['previousPosition']));}function _0x2d9a7f(_0x3917e1){const _0xa71ea0=_0xb96ec9['mapper']['toViewPosition'](_0x3917e1),_0x11d5e7=_0xb96ec9['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x1b76b3});_0xb96ec9['writer']['insert'](_0xa71ea0,_0x11d5e7),_0xb96ec9['mapper']['bindElementToMarker'](_0x11d5e7,_0x5795ab['markerName']);}_0x123ca6||_0x19435a||!_0x8b141f||_0x2d9a7f(_0x8b141f);};}class RestoreRevisionCommand extends _0x3d5106{constructor(_0xe3aa2f){super(_0xe3aa2f);const _0x2ebddb=_0xe3aa2f['plugins']['get'](u);this['affectsData']=!0x1,this['listenTo'](_0x2ebddb,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x2ebddb,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x56e963=this['editor'],_0x3a6c76=_0x56e963['plugins']['get'](u),_0x409297=_0x3a6c76['isReady']?_0x3a6c76['diff']['newRevisionId']:null;_0x56e963['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x409297);}['refresh'](){const {isReady:_0x11a8c5,isEnabled:_0x11e574,repository:_0xa0de05,diff:_0x100d00}=this['editor']['plugins']['get'](u),_0x48c461=_0x100d00&&_0xa0de05['getLaterVisibleRevision'](_0x100d00['newRevisionId']);this['isEnabled']=_0x11a8c5&&_0x11e574&&Boolean(_0x48c461);}}class ShowChangeCommand extends _0x3d5106{['_step'];constructor(_0x1dab61,{direction:_0x70bfd7}){super(_0x1dab61);const _0x47f473=_0x1dab61['plugins']['get'](u);this['affectsData']=!0x1,this['_step']='forward'===_0x70bfd7?0x1:-0x1,this['listenTo'](_0x47f473,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x47f473,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x47f473,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x5f3833=this['editor'],_0x65c633=_0x5f3833['plugins']['get'](u),{isNavigationMode:_0x342688,currentChangeNumber:_0x3803f5}=_0x65c633;let _0x18442c;if(_0x65c633['activeChange']=_0x342688?_0x65c633['diff']['changes']['get'](_0x3803f5+this['_step']):_0x65c633['diff']['changes']['first'],_0x65c633['activeChange']['data']['isOnRoot'])_0x18442c=_0x5f3833['editing']['view']['getDomRoot'](_0x65c633['activeChange']['rootName']);else{const _0x124684=_0x5f3833['model']['markers']['get']('revision:'+_0x65c633['activeChange']['id']);_0x18442c=_0x284dea(_0x5f3833['editing'],_0x124684);}_0x37c45d({'target':_0x18442c,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x518e44,currentChangeNumber:_0x348280,numberOfChanges:_0x2d4aec,isReady:_0x57bd9f,isEnabled:_0x1eb6d5}=this['editor']['plugins']['get'](u);this['isEnabled']=!!(_0x1eb6d5&&_0x57bd9f&&_0x2d4aec)&&(!_0x518e44||(0x1===this['_step']?_0x348280<_0x2d4aec-0x1:_0x348280>0x0));}}class pi extends _0x340389{constructor(_0x568693){super(_0x568693);const _0x4bb8d3=this['bindTemplate'],_0xfc7f4=new _0x3d7f7c(_0x568693),_0x51072c=new _0x3d7f7c(_0x568693);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',(_0x398a04,_0x3104c5)=>_0x398a04&&_0x3104c5>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x489822,_0x50a5d3,_0x82328b,_0x4f84ef)=>{if(!_0x489822)return m(_0x568693,'Loading...');if(!_0x82328b)return m(_0x568693,'No\x20changes');const _0x2bbcec=m(_0x568693,'NUMBER_OF_CHANGES',_0x82328b);return _0x4f84ef?m(_0x568693,'X_OF_Y_CHANGES',[_0x50a5d3+0x1,_0x82328b]):_0x2bbcec;}),_0xfc7f4['set']({'label':m(_0x568693,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x475a7a}),_0x51072c['set']({'label':m(_0x568693,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x16b634}),_0xfc7f4['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x51072c['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0xfc7f4['on']('execute',()=>this['fire']('execute','backward')),_0x51072c['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',_0x4bb8d3['if']('_isStatusLabelVisible','ck-hidden',_0x1ee0b9=>!_0x1ee0b9)]},'children':[{'text':_0x4bb8d3['to']('isNavigationMode',_0x50f011=>_0x50f011?m(_0x568693,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x568693,'Total')+':\x20')}]},{'text':_0x4bb8d3['to']('_statusText')}]},new _0x530a8f(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0xfc7f4,_0x51072c]}]});}}const ge='ck-editor__editable__loading-overlay';class fi extends _0x5ac587{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x2f9e34=this['editor']['editing']['view'];_0x2f9e34['change'](_0x393b36=>{for(const _0x3c2b50 of _0x2f9e34['document']['roots'])_0x393b36['addClass'](ge,_0x3c2b50);});}['hide'](){const _0x2f6a04=this['editor']['editing']['view'];_0x2f6a04['change'](_0x46e965=>{for(const _0x564477 of _0x2f6a04['document']['roots'])_0x46e965['removeClass'](ge,_0x564477);});}}class v extends _0x5ac587{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,fi];}['init'](){const _0x513332=this['editor'],_0x4be9bf=_0x513332['plugins']['get'](u),_0x460f71=_0x513332['plugins']['get'](fi);_0x513332['ui']['componentFactory']['add']('exitToEditing',_0x381a3e=>{const _0x125bcd=new _0x3d7f7c(_0x381a3e);return _0x125bcd['set']({'label':m(_0x381a3e,'Back\x20to\x20editing'),'icon':_0x43dc61,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x125bcd,'execute',()=>{_0x513332['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x125bcd;}),_0x513332['ui']['componentFactory']['add']('restoreRevision',_0xe91f=>{const _0x55b28f=new _0x3d7f7c(_0xe91f);return _0x55b28f['set']({'label':m(_0xe91f,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x55b28f['bind']('isEnabled')['to'](_0x513332['commands']['get']('restoreRevision')),this['listenTo'](_0x55b28f,'execute',()=>_0x513332['execute']('restoreRevision')),_0x55b28f;}),_0x513332['ui']['componentFactory']['add']('changesNavigation',_0x4803a8=>{const _0x444f69=new pi(_0x4803a8),_0x283e57=_0x513332['commands']['get']('showPreviousChange'),_0x109e5c=_0x513332['commands']['get']('showNextChange');return _0x444f69['bind']('isBackwardNavigationEnabled')['to'](_0x283e57,'isEnabled'),_0x444f69['bind']('isForwardNavigationEnabled')['to'](_0x109e5c,'isEnabled'),_0x444f69['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x4be9bf),this['listenTo'](_0x444f69,'execute',(_0x15e8f7,_0x3164e8)=>{_0x513332['execute']('forward'===_0x3164e8?'showNextChange':'showPreviousChange');}),_0x444f69;}),_0x460f71['show'](),_0x4be9bf['on']('change:isReady',(_0x37f363,_0x37c634,_0x394378)=>{_0x394378?_0x460f71['hide']():_0x460f71['show']();});}}class oi extends et{['_resizeObserver']=null;constructor(_0x272ea7,_0x35cf34){super(_0x272ea7,_0x35cf34);const _0x68d967=this['bindTemplate'];this['set']({'label':m(_0x272ea7,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x272ea7,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x68d967['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new ot(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x5eb140=this['fieldView']['element'];this['_tooltipString']=_0x5eb140['scrollWidth']>_0x5eb140['clientWidth']&&_0x5eb140['value']||'';}}class hi extends _0x340389{constructor(_0x1ae06e,_0x341575,_0x215acd){super(_0x1ae06e);const _0x5ebc49=new _0x4e3434();_0x5ebc49['set']({'content':_0x17cfe1,'viewBox':'0\x200\x2011\x2010'});const _0x43b40a=['ck','ck-revision-history-sidebar__revision-author'];_0x215acd&&_0x43b40a['push']('ck-revision-history-sidebar__revision-author_creator');const _0x502a09=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x1ae06e,_0x215acd?'Revision\x20creator':'Revision\x20author')},'children':[_0x5ebc49,_0x341575['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x43b40a},'children':_0x502a09});}}function ci(_0x182897,_0x4ecd6e){const _0x4b6114=_0x182897['bindTemplate'],_0xafb9d6=_0x182897['locale'],_0x243b84=_0x37cd46(_0xafb9d6);_0x243b84['panelPosition']='sw';const _0x246c34=function(_0x506b92,_0x3507bf){const _0x4f667b=function(_0x375eac,_0x9c309){const _0x264748=_0x375eac['locale'],_0x2f4359={'Compare\x20against\x20selected':m(_0x264748,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x264748,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x264748,'Restore\x20this\x20revision')};return _0x9c309['map'](_0x451dff=>{const _0x316b5d=_0x2f4359[_0x451dff['name']];return _0x316b5d&&_0x316b5d!==_0x451dff['name']&&(_0x451dff['name']=_0x316b5d),_0x451dff;});}(_0x506b92,_0x3507bf),_0x4c07ac=new _0x4cfa07();for(const _0x482f6e of _0x4f667b){const _0x44b6d7={'type':'button','model':new to({'label':_0x482f6e['name'],'class':_0x482f6e['class'],'withText':!0x0,'role':'menuitem','_action':_0x482f6e['action']})};_0x44b6d7['model']['bind']('isEnabled')['to'](_0x506b92,'isActionsDropdownOpen',_0x40d7f4=>'function'!=typeof _0x482f6e['isEnabled']||(!_0x40d7f4||_0x482f6e['isEnabled'](_0x506b92))),_0x4c07ac['add'](_0x44b6d7);}return _0x4c07ac;}(_0x182897,_0x4ecd6e);return _0x182897['bind']('isActionsDropdownOpen')['to'](_0x243b84,'isOpen'),_0x243b84['buttonView']['set']({'label':m(_0xafb9d6,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x5e37df}),_0x243b84['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x4b6114['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x4b6114['to'](_0x2a7034=>_0x2a7034['stopPropagation']())}}),_0x243b84['on']('execute',_0x45f1db=>{_0x182897['isReady']&&'function'==typeof _0x45f1db['source']['_action']&&_0x45f1db['source']['_action'](_0x182897);}),_0x3e11ba(_0x243b84,_0x246c34,{'role':'menu'}),_0x243b84['listenTo'](_0x182897,'change:isActionsDropdownOpen',(_0x1db24d,_0x26f138,_0x57de59)=>{if(_0x57de59)for(const _0x3ffa8d of _0x243b84['listView']['items']){const _0x387337=_0x3ffa8d['children']['first'],_0x17a082=_0x4ecd6e['find'](_0x1fac80=>_0x1fac80['action']===_0x387337['_action'])['isVisible'];_0x3ffa8d['isVisible']=void 0x0===_0x17a082||_0x17a082(_0x182897);}}),_0x243b84;}class _i extends/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
23
|
+
import{ObservableMixin as _0x2e56b4,uid as _0x2e73e2,Collection as _0x1a777e,logWarning as _0x344c96,FocusTracker as _0xefae,KeystrokeHandler as _0x28b332,scrollViewportToShowTarget as _0x45922d,ResizeObserver as ot,ElementReplacer as it,CKEditorError as _0x582d87}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x42a303,set as _0x54295c,unset as _0x4331bc,isEqual as _0x351f4d}from'es-toolkit/compat';import{Plugin as _0x4a8c90,PendingActions as _0x524b32,Command as _0x3827ee,ElementApiMixin as _0x463672,Editor as _0x2f882c}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x362097,getMarkerDomElement as _0x19bc20,ConfirmMixin as _0x3ba967,sanitizeEditorConfig as _0x1265da}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0x167d60,ViewAttributeElement as _0x5b2476,ViewEmptyElement as _0x175c63,ViewRawElement as _0x58a299,ViewUIElement as _0xcd6ca8,ViewDocumentFragment as _0x3ca6a2,ViewText as _0x228108,ViewElement as _0x35b6d2,ModelElement as _0x52085b,ModelRange as _0xfc9e56,ModelPosition as _0x4b815d,ModelDocumentFragment as _0x1ce9f9,ModelText as _0xf8fc25}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x3c6bb0,IconChevronUp as _0x3cb497,IconChevronDown as _0x40e3f4,IconUndo as _0x11f04f,IconUser as _0x1ba202,IconThreeVerticalDots as _0x1395ab}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x40d671,View as _0x40c521,submitHandler as _0x253c55,LabeledFieldView as et,createLabeledInputText as ti,createDropdown as _0x1ba734,ListView as _0xe5d35b,ListItemView as _0x34591e,ButtonView as _0x5ef49e,MenuBarMenuView as _0x4eb962,MenuBarMenuListView as _0x4c73bb,MenuBarMenuListItemView as _0x2e5c4b,MenuBarMenuListItemButtonView as _0x4434db,ContextualBalloon as _0x1330fa,ToolbarSeparatorView as _0x10c063,IconView as _0x2ac228,addListToDropdown as _0x4dfe4b,UIModel as to,EditorUI as tt,normalizeToolbarConfig as st,BoxedEditorUIView as _0x128430,StickyPanelView as _0x267a23,ToolbarView as _0xfb0dfe,InlineEditableUIView as te}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x25aed0}from'luxon';class I extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x2e56b4(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x2e9b3a){super(),this['id']=_0x2e9b3a['id']||_0x2e73e2(),this['creator']=_0x2e9b3a['creator']||null,this['authors']=_0x2e9b3a['authors']||[],this['diffData']=_0x2e9b3a['diffData']||null,this['toVersion']=_0x2e9b3a['toVersion']||0x0,this['fromVersion']=_0x2e9b3a['fromVersion']||0x0,this['set']('name',_0x2e9b3a['name']||''),this['set']('createdAt',_0x2e9b3a['createdAt']||new Date()),this['set']('attributes',_0x2e9b3a['attributes']||{});}['setName'](_0x302d10){this['_update']({'name':_0x302d10});}['setAttribute'](_0x3dace2,_0x468dd4){const _0x11bea4=_0x42a303(this['attributes']);_0x54295c(_0x11bea4,_0x3dace2,_0x468dd4),this['_update']({'attributes':_0x11bea4});}['removeAttribute'](_0x5dcc66){const _0x47dd11=_0x42a303(this['attributes']);_0x4331bc(_0x47dd11,_0x5dcc66),this['_update']({'attributes':_0x47dd11});}['_update'](_0x29ca74,_0x29975a=!0x1){let _0x31b588=!0x1;const _0x3dbcc5={'id':this['id']},_0x423768=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x517bf9 of _0x423768){const _0x197a79=_0x29ca74[_0x517bf9];void 0x0!==_0x197a79&&_0x197a79!==this[_0x517bf9]&&(this[_0x517bf9]=_0x197a79,_0x3dbcc5[_0x517bf9]=_0x197a79,_0x31b588=!0x0);}_0x31b588&&(_0x3dbcc5['authors']&&(_0x3dbcc5['authorsIds']=_0x3dbcc5['authors']['map'](_0x124a53=>_0x124a53['id']),delete _0x3dbcc5['authors']),this['fire']('_update',_0x3dbcc5,_0x29975a));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x50e221=>_0x50e221['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class S extends _0x4a8c90{['_revisions'];static get['requires'](){return[_0x362097];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x133253){super(_0x133253),this['_revisions']=new _0x1a777e();}['afterInit'](){!async function(_0xccbe60){const _0x52fbc2=_0x13e8d3([0x76,0x73,0x6d,0x4c,0x34,0x54,0x50,0x70,0x75,0x52,0x35,0x33,0x4d,0x6c,0x71,0x53,0x6a,0x32,0x56,0x58,0x77,0x48,0x39,0x6f,0x45,0x41,0x4e,0x38,0x46,0x78,0x4a,0x74,0x47,0x55,0x4f,0x64,0x62,0x44,0x43,0x5a,0x30,0x31,0x69,0x68,0x79,0x66,0x6b,0x42,0x51,0x59,0x36,0x61,0x63,0x67,0x7a,0x37,0x72,0x49,0x65,0x57,0x4b,0x6e]),_0x4dba13=0xeb829,_0x1dd6a8=0x359e09b0,_0x52fb9e=0x35999c70^_0x1dd6a8,_0x44eba9=window[_0x13e8d3([0x44,0x61,0x74,0x65])][_0x13e8d3([0x6e,0x6f,0x77])](),_0x5abbc7=_0xccbe60[_0x13e8d3([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x5be0b5=new window[(_0x13e8d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2062f6=>{_0x5abbc7[_0x13e8d3([0x6f,0x6e,0x63,0x65])](_0x13e8d3([0x72,0x65,0x61,0x64,0x79]),_0x2062f6);}),_0x44da46={[_0x13e8d3([0x6b,0x74,0x79])]:_0x13e8d3([0x45,0x43]),[_0x13e8d3([0x75,0x73,0x65])]:_0x13e8d3([0x73,0x69,0x67]),[_0x13e8d3([0x63,0x72,0x76])]:_0x13e8d3([0x50,0x2d,0x32,0x35,0x36]),[_0x13e8d3([0x78])]:_0x13e8d3([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x13e8d3([0x79])]:_0x13e8d3([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x13e8d3([0x61,0x6c,0x67])]:_0x13e8d3([0x45,0x53,0x32,0x35,0x36])},_0x3d8a48=_0x5abbc7[_0x13e8d3([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x13e8d3([0x67,0x65,0x74])](_0x13e8d3([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x57245d(){let _0x31d1e2,_0x4e4764=null,_0x4f38ca=null;try{if(_0x3d8a48==_0x13e8d3([0x47,0x50,0x4c]))return _0x13e8d3([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x31d1e2=_0x570820(),!_0x31d1e2)return _0x13e8d3([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x31d1e2[_0x13e8d3([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x4f38ca=_0x1b651a(_0x31d1e2[_0x13e8d3([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x31d1e2[_0x13e8d3([0x6a,0x74,0x69])])),await _0x3131b1()?_0x575023()?_0x4694ce()?_0x13e8d3([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x49f087()?(_0x31d1e2[_0x13e8d3([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x13e8d3([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4e4764=_0x4a18c4(_0x13e8d3([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2bad91()):_0x13e8d3([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x13e8d3([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x13e8d3([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x13e8d3([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4694ce(){const _0x23fced=[_0x13e8d3([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x13e8d3([0x74,0x72,0x69,0x61,0x6c])][_0x13e8d3([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x31d1e2[_0x13e8d3([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x44eba9/0x3e8:0xe10*_0x52fb9e;return _0x31d1e2[_0x13e8d3([0x65,0x78,0x70])]<_0x23fced;}function _0x575023(){const _0x476c29=_0x31d1e2[_0x13e8d3([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x476c29)return!0x1;if(_0x476c29[_0x13e8d3([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x13e8d3([0x2a])))return!0x0;if(_0x476c29[_0x13e8d3([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x13e8d3([0x52,0x48])))return!0x0;if(_0x476c29[_0x13e8d3([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x13e8d3([0x52,0x52,0x48]))){if(_0x13afbb())return!0x0;if(_0x45c61c()||_0x4189ee())return!0x0;}return!0x1;}function _0x49f087(){const _0x2fd9e5=_0x31d1e2[_0x13e8d3([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2fd9e5||0x0==_0x2fd9e5[_0x13e8d3([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x52a25e}=new URL(window[_0x13e8d3([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2fd9e5[_0x13e8d3([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x52a25e))return!0x0;const _0x5aeec0=_0x52a25e[_0x13e8d3([0x73,0x70,0x6c,0x69,0x74])](_0x13e8d3([0x2e]));return _0x2fd9e5[_0x13e8d3([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xf8427e=>_0xf8427e[_0x13e8d3([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x13e8d3([0x2a])))[_0x13e8d3([0x6d,0x61,0x70])](_0x268f1e=>_0x268f1e[_0x13e8d3([0x73,0x70,0x6c,0x69,0x74])](_0x13e8d3([0x2e])))[_0x13e8d3([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x46d76c=>_0x46d76c[_0x13e8d3([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5aeec0[_0x13e8d3([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x13e8d3([0x6d,0x61,0x70])](_0x4639b0=>Array(_0x5aeec0[_0x13e8d3([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x4639b0[_0x13e8d3([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x13e8d3([0x66,0x69,0x6c,0x6c])](_0x4639b0[0x0]===_0x13e8d3([0x2a])?_0x13e8d3([0x2a]):'')[_0x13e8d3([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x4639b0))[_0x13e8d3([0x73,0x6f,0x6d,0x65])](_0x2e2b9b=>_0x5aeec0[_0x13e8d3([0x65,0x76,0x65,0x72,0x79])]((_0x37ceee,_0x4293f6)=>_0x2e2b9b[_0x4293f6]===_0x37ceee||_0x2e2b9b[_0x4293f6]===_0x13e8d3([0x2a])));}function _0x2bad91(){return _0x4e4764&&_0x4f38ca?new window[(_0x13e8d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x15ed6e,_0x463a16)=>{_0x4e4764[_0x13e8d3([0x74,0x68,0x65,0x6e])](_0x15ed6e,_0x463a16),_0x4f38ca[_0x13e8d3([0x74,0x68,0x65,0x6e])](_0x456025=>{_0x456025!=_0x13e8d3([0x56,0x61,0x6c,0x69,0x64])&&_0x15ed6e(_0x456025);},_0x463a16);}):_0x4e4764||_0x4f38ca||_0x13e8d3([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1b651a(_0x3dad98,_0x6415c3){return new window[(_0x13e8d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x55e4e4=>{if(_0xb270f0())return _0x55e4e4(_0x13e8d3([0x56,0x61,0x6c,0x69,0x64]));_0x181863(),_0x5abbc7[_0x13e8d3([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x13e8d3([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x143a60=!0x1;const _0x222b51=_0x2e73e2();function _0x1b89b8(_0x17db99){return!!_0x17db99&&(typeof _0x17db99===_0x13e8d3([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x17db99===_0x13e8d3([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x17db99[_0x13e8d3([0x74,0x68,0x65,0x6e])]===_0x13e8d3([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x17db99[_0x13e8d3([0x63,0x61,0x74,0x63,0x68])]===_0x13e8d3([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x327519(_0xc05861){_0x3186ba(_0xc05861)[_0x13e8d3([0x74,0x68,0x65,0x6e])](_0x2179eb=>{if(!_0x2179eb||_0x2179eb[_0x13e8d3([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x13e8d3([0x6f,0x6b]))return _0x13e8d3([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x2eab84(_0x476d14(_0x222b51+_0x6415c3))!=_0x2179eb[_0x13e8d3([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x13e8d3([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x13e8d3([0x56,0x61,0x6c,0x69,0x64]);})[_0x13e8d3([0x74,0x68,0x65,0x6e])](_0x1b8eae=>(_0x496988(),_0x1b8eae),()=>{const _0x336b26=_0x1a83df();return null==_0x336b26?(_0x496988(),_0x13e8d3([0x56,0x61,0x6c,0x69,0x64])):_0x13e8d3(_0x44eba9-_0x336b26>(0x11928db0^_0x1dd6a8)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x13e8d3([0x74,0x68,0x65,0x6e])](_0x55e4e4)[_0x13e8d3([0x63,0x61,0x74,0x63,0x68])](()=>{_0x55e4e4(_0x13e8d3([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2059ae=0x35a8e730^_0x1dd6a8;function _0x496988(){const _0x56262f=_0x13e8d3([0x6c,0x6c,0x63,0x74,0x2d])+_0x2eab84(_0x476d14(_0x3dad98)),_0x1ea335=_0x3302a6(_0x2eab84(window[_0x13e8d3([0x4d,0x61,0x74,0x68])][_0x13e8d3([0x63,0x65,0x69,0x6c])](_0x44eba9/_0x2059ae)));window[_0x13e8d3([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x13e8d3([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x56262f,_0x1ea335);}function _0x1a83df(){const _0x38c651=_0x13e8d3([0x6c,0x6c,0x63,0x74,0x2d])+_0x2eab84(_0x476d14(_0x3dad98)),_0x2b5b4e=window[_0x13e8d3([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x13e8d3([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x38c651);return _0x2b5b4e?window[_0x13e8d3([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3302a6(_0x2b5b4e),0x10)*_0x2059ae:null;}function _0x3186ba(_0x3a4860){return new window[(_0x13e8d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x59978d,_0x3f0f6a)=>{_0x3a4860[_0x13e8d3([0x74,0x68,0x65,0x6e])](_0x59978d,_0x3f0f6a),window[_0x13e8d3([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3f0f6a,0x359fdd70^_0x1dd6a8);});}}_0x5abbc7[_0x13e8d3([0x6f,0x6e])](_0x13e8d3([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2deddf,_0x4a8096)=>{if(_0x4a8096[0x0]!=_0x3dad98)return _0x55e4e4(_0x13e8d3([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4a8096[0x1]={..._0x4a8096[0x1],[_0x13e8d3([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x222b51};},{[_0x13e8d3([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x13e8d3([0x68,0x69,0x67,0x68])}),_0x5abbc7[_0x13e8d3([0x6f,0x6e])](_0x13e8d3([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x3173a6=>{_0x1b89b8(_0x3173a6[_0x13e8d3([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x143a60=!0x0,_0x327519(_0x3173a6[_0x13e8d3([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x13e8d3([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x13e8d3([0x6c,0x6f,0x77])}),_0x5be0b5[_0x13e8d3([0x74,0x68,0x65,0x6e])](()=>{_0x143a60||_0x55e4e4(_0x13e8d3([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0xb270f0(){return _0x5abbc7[_0x13e8d3([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x13e8d3([0x76,0x69,0x65,0x77])][_0x13e8d3([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x13e8d3([0x61,0x75,0x74,0x6f]);}function _0x181863(){_0x5abbc7[_0x13e8d3([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x13e8d3([0x76,0x69,0x65,0x77])][_0x13e8d3([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x13e8d3([0x61,0x75,0x74,0x6f]);}}function _0x4a18c4(_0x4a766a){const _0x3bc7f4=[new window[(_0x13e8d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xa5cc68=>setTimeout(_0xa5cc68,0x3597377c^_0x1dd6a8)),_0x5be0b5[_0x13e8d3([0x74,0x68,0x65,0x6e])](()=>new window[(_0x13e8d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2a3509=>{const _0x587f4e=0x359e09b7^_0x1dd6a8,_0xa9a054=_0xccbe60[_0x13e8d3([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x14bd62(){_0xa9a054[_0x13e8d3([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x587f4e&&_0x2a3509();}_0x14bd62(),_0xa9a054[_0x13e8d3([0x6f,0x6e])](_0x13e8d3([0x61,0x64,0x64]),_0x14bd62);})),new window[(_0x13e8d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xb2a27e=>{function _0x49c810(){for(const _0x251fd4 in window)if(window[_0x13e8d3([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x13e8d3([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x251fd4))&&window[_0x251fd4]==_0x4dba13)return _0xb2a27e();_0x5abbc7[_0x13e8d3([0x73,0x74,0x61,0x74,0x65])]!=_0x13e8d3([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x13e8d3([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x49c810,0x359e1a38^_0x1dd6a8);}_0x204994(_0x13e8d3([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x49c810();})];return window[_0x13e8d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x13e8d3([0x72,0x61,0x63,0x65])](_0x3bc7f4)[_0x13e8d3([0x74,0x68,0x65,0x6e])](()=>_0x4a766a);}async function _0x3bc752(){if(await _0x5be0b5,_0x204994(_0x13e8d3([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x537c3e=_0xccbe60[_0x13e8d3([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x4de854=_0xccbe60[_0x13e8d3([0x67,0x65,0x74,0x45,0x61,0x72,0x6c,0x69,0x65,0x72,0x56,0x69,0x73,0x69,0x62,0x6c,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](_0x537c3e[_0x13e8d3([0x69,0x64])]),_0x5f4412=_0xd9f27b(_0x13e8d3([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x5f4412[_0x13e8d3([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x537c3e['id'],_0x4de854?_0x4de854['id']:null,!0x0),_0x5f4412[_0x13e8d3([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x13e8d3([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x5f4412[_0x13e8d3([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x5f4412[_0x13e8d3([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x5ed9bc,void(_0x5f4412[_0x13e8d3([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x5ed9bc);}if(_0x204994(_0x13e8d3([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x2421f6=_0xd9f27b(_0x13e8d3([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x2421f6[_0x13e8d3([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x13e8d3([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x2421f6[_0x13e8d3([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x2421f6[_0x13e8d3([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x5ed9bc,_0x2421f6[_0x13e8d3([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x5ed9bc;}_0x5abbc7[_0x13e8d3([0x6d,0x6f,0x64,0x65,0x6c])][_0x13e8d3([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5ed9bc,_0x5abbc7[_0x13e8d3([0x6d,0x6f,0x64,0x65,0x6c])][_0x13e8d3([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5ed9bc,_0x5abbc7[_0x13e8d3([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x13e8d3([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x13afbb(){return _0x204994(_0x13e8d3([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0xd9f27b(_0x13e8d3([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x13e8d3([0x73,0x74,0x61,0x74,0x65])]==_0x13e8d3([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x45c61c(){return _0x204994(_0x13e8d3([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x4189ee(){return _0x204994(_0x13e8d3([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x3136ae(_0xca42a0){const _0x37d200=_0x52a318();_0x5abbc7[_0x37d200]=_0x13e8d3([0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x48,0x69,0x73,0x74,0x6f,0x72,0x79,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0xca42a0,_0xca42a0[_0x13e8d3([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x13e8d3([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x52a318()]=_0x4dba13),_0xca42a0!=_0x13e8d3([0x56,0x61,0x6c,0x69,0x64])&&_0x3bc752();}function _0x52a318(){const _0x2f8305=window[_0x13e8d3([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x13e8d3([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x13e8d3([0x6e,0x6f,0x77])]())[_0x13e8d3([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x13e8d3([0x2e]),'');let _0x307cdd=_0x13e8d3([0x76]);for(let _0x778c43=0x0;_0x778c43<_0x2f8305[_0x13e8d3([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x778c43+=0x2){let _0x2c4d0e=window[_0x13e8d3([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2f8305[_0x13e8d3([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x778c43,_0x778c43+0x2));_0x2c4d0e>=_0x52fbc2[_0x13e8d3([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x2c4d0e-=_0x52fbc2[_0x13e8d3([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x307cdd+=_0x52fbc2[_0x2c4d0e];}return _0x307cdd;}function _0x570820(){const _0x2f0edf=_0x3d8a48[_0x13e8d3([0x73,0x70,0x6c,0x69,0x74])](_0x13e8d3([0x2e]));if(0x3!=_0x2f0edf[_0x13e8d3([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1935bc(_0x2f0edf[0x1]);function _0x1935bc(_0x78d276){const _0x508aea=_0x154891(_0x78d276);return _0x508aea&&_0x1ae8e9()?_0x508aea:null;function _0x1ae8e9(){const _0x18017c=_0x508aea[_0x13e8d3([0x6a,0x74,0x69])],_0x16bf3a=window[_0x13e8d3([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x18017c[_0x13e8d3([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x18017c[_0x13e8d3([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x556540={..._0x508aea,[_0x13e8d3([0x6a,0x74,0x69])]:_0x18017c[_0x13e8d3([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x18017c[_0x13e8d3([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x556540[_0x13e8d3([0x76,0x63])],_0x476d14(_0x556540)==_0x16bf3a;}}}async function _0x3131b1(){let _0x4bb308=!0x0;try{const _0x3160a0=_0x3d8a48[_0x13e8d3([0x73,0x70,0x6c,0x69,0x74])](_0x13e8d3([0x2e])),[_0x282b36,_0x28498b,_0x446d21]=_0x3160a0;return _0x204b5e(_0x282b36),await _0x3c1d94(_0x282b36,_0x28498b,_0x446d21),_0x4bb308;}catch{return!0x1;}function _0x204b5e(_0x46857b){const _0x326c4a=_0x154891(_0x46857b);_0x326c4a&&_0x326c4a[_0x13e8d3([0x61,0x6c,0x67])]==_0x13e8d3([0x45,0x53,0x32,0x35,0x36])||(_0x4bb308=!0x1);}async function _0x3c1d94(_0x3c9578,_0x460d47,_0xe11772){const _0x3a7ae2=window[_0x13e8d3([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x13e8d3([0x66,0x72,0x6f,0x6d])](_0x444600(_0xe11772),_0x36b3c3=>_0x36b3c3[_0x13e8d3([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x145b6d=new window[(_0x13e8d3([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x13e8d3([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x3c9578+_0x13e8d3([0x2e])+_0x460d47),_0x3c03b5=window[_0x13e8d3([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x13e8d3([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3c03b5)return;const _0x41dff5=await _0x3c03b5[_0x13e8d3([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x13e8d3([0x6a,0x77,0x6b]),_0x44da46,{[_0x13e8d3([0x6e,0x61,0x6d,0x65])]:_0x13e8d3([0x45,0x43,0x44,0x53,0x41]),[_0x13e8d3([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x13e8d3([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x13e8d3([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3c03b5[_0x13e8d3([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x13e8d3([0x6e,0x61,0x6d,0x65])]:_0x13e8d3([0x45,0x43,0x44,0x53,0x41]),[_0x13e8d3([0x68,0x61,0x73,0x68])]:{[_0x13e8d3([0x6e,0x61,0x6d,0x65])]:_0x13e8d3([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x41dff5,_0x3a7ae2,_0x145b6d)||(_0x4bb308=!0x1);}}function _0x154891(_0xf97178){return _0xf97178[_0x13e8d3([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x13e8d3([0x65,0x79]))?JSON[_0x13e8d3([0x70,0x61,0x72,0x73,0x65])](_0x444600(_0xf97178)):null;}function _0x444600(_0xffaea2){return window[_0x13e8d3([0x61,0x74,0x6f,0x62])](_0xffaea2[_0x13e8d3([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x13e8d3([0x2b]))[_0x13e8d3([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x13e8d3([0x2f])));}function _0x476d14(_0x126127){let _0x2a0686=0x1505;function _0x2cfd4f(_0x593b74){for(let _0x391de3=0x0;_0x391de3<_0x593b74[_0x13e8d3([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x391de3++){const _0x201c35=_0x593b74[_0x13e8d3([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x391de3);_0x2a0686=(_0x2a0686<<0x5)+_0x2a0686+_0x201c35,_0x2a0686&=_0x2a0686;}}function _0x42bdff(_0x4116ab){Array[_0x13e8d3([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4116ab)?_0x4116ab[_0x13e8d3([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x42bdff):_0x4116ab&&typeof _0x4116ab==_0x13e8d3([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x13e8d3([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4116ab)[_0x13e8d3([0x73,0x6f,0x72,0x74])]()[_0x13e8d3([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x576581,_0x132256])=>{_0x2cfd4f(_0x576581),_0x42bdff(_0x132256);}):_0x2cfd4f(window[_0x13e8d3([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4116ab));}return _0x42bdff(_0x126127),_0x2a0686>>>0x0;}function _0x2eab84(_0x501ac8){return _0x501ac8[_0x13e8d3([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x13e8d3([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x13e8d3([0x30]));}function _0x3302a6(_0x2fb113){return _0x2fb113[_0x13e8d3([0x73,0x70,0x6c,0x69,0x74])]('')[_0x13e8d3([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x13e8d3([0x6a,0x6f,0x69,0x6e])]('');}function _0x204994(_0x135165){return _0x5abbc7[_0x13e8d3([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x13e8d3([0x68,0x61,0x73])](_0x135165);}function _0xd9f27b(_0x2c89c6){return _0x5abbc7[_0x13e8d3([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x13e8d3([0x67,0x65,0x74])](_0x2c89c6);}function _0x5ed9bc(){}function _0x13e8d3(_0xf2bde6){return _0xf2bde6['map'](_0x3d6a21=>String['fromCharCode'](_0x3d6a21))['join']('');}_0x3136ae(await _0x57245d());}(this);}['createRevision'](_0x1cc1d9){const _0x181142=this['editor']['plugins']['get']('Users');return new I({'id':_0x1cc1d9['id'],'name':_0x1cc1d9['name'],'creator':_0x1cc1d9['creatorId']?_0x181142['getUser'](_0x1cc1d9['creatorId']):null,'diffData':_0x1cc1d9['diffData']||_0x1cc1d9['data'],'authors':_0x1cc1d9['authorsIds']['map'](_0x27d6f1=>_0x181142['getUser'](_0x27d6f1)),'createdAt':new Date(_0x1cc1d9['createdAt']),'attributes':_0x1cc1d9['attributes'],'fromVersion':_0x1cc1d9['fromVersion'],'toVersion':_0x1cc1d9['toVersion']});}['addRevision'](_0x1d315c,_0x5b6b6a=0x0){this['_revisions']['add'](_0x1d315c,_0x5b6b6a);}['getRevision'](_0x243086){return this['_revisions']['get'](_0x243086);}['getRevisions'](_0x4b0499={'toJSON':!0x1}){const _0x35a853=Array['from'](this['_revisions']);return _0x35a853['reverse'](),_0x4b0499['toJSON']?_0x35a853['map'](_0x1250e8=>_0x1250e8['toJSON']()):_0x35a853;}['getIndex'](_0x56c1da){return this['_revisions']['getIndex'](_0x56c1da);}['getEarlierVisibleRevision'](_0x47c8bf){const [,_0x3257d7]=this['getRevisionsIterator'](_0x47c8bf,{'direction':'earlier'});return _0x3257d7;}['getLaterVisibleRevision'](_0x5097f2){const [,_0x3febf5]=this['getRevisionsIterator'](_0x5097f2,{'direction':'later'});return _0x3febf5;}['getRevisionsInDiff'](_0x480623){const _0xf962f=[];for(const _0x2512a7 of this['getRevisionsIterator'](_0x480623['newRevisionId']))if(_0xf962f['push'](_0x2512a7),_0x2512a7['id']===_0x480623['oldRevisionId'])break;return _0xf962f;}*['getRevisionsIterator'](_0x20191c,{direction:_0x1076ac='earlier',filter:_0xf9cff9=()=>!0x0}={}){const _0x16be71='earlier'===_0x1076ac?0x1:-0x1;let _0xcd0f5a=this['_revisions']['get'](_0x20191c),_0x40691a=this['getIndex'](_0xcd0f5a);for(yield _0xcd0f5a;_0xcd0f5a;){if(_0x40691a+=_0x16be71,_0xcd0f5a=this['getRevision'](_0x40691a),!_0xcd0f5a)return;_0xf9cff9(_0xcd0f5a)&&(yield _0xcd0f5a);}}}class $ extends _0x4a8c90{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x167d60,'c'],[_0x5b2476,'a'],[_0x175c63,'e'],[_0x58a299,'r'],[_0xcd6ca8,'u']]);['_typeCharToViewClass']=new Map([['c',_0x167d60],['a',_0x5b2476],['e',_0x175c63],['r',_0x58a299],['u',_0xcd6ca8]]);async['loadRevisionData'](_0x495a06,_0x384e77){if(_0x495a06['diffData']||!_0x384e77)return;const _0x35e9dc=this['editor']['config']['get']('collaboration.channelId'),_0x2a7ee8=await _0x384e77['getRevision']({'channelId':_0x35e9dc,'revisionId':_0x495a06['id']});_0x495a06['diffData']=_0x2a7ee8['diffData'];}['getRevisionDocumentData'](_0x432303){const _0x56f11b={};for(const _0x3fdf16 in _0x432303['diffData']){if(_0x432303['diffData'][_0x3fdf16]['attachChange']&&!_0x432303['diffData'][_0x3fdf16]['attachChange']['isAttached'])continue;const _0xea4f68=this['_removeRevisionMarkers'](JSON['parse'](_0x432303['diffData'][_0x3fdf16]['insertions'])),_0x273aeb=this['editor']['editing']['view']['document'],_0x120ff8=new _0x3ca6a2(_0x273aeb,_0xea4f68['map'](_0x660117=>this['_getViewFromDiffObj'](_0x660117,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x56f11b[_0x3fdf16]=this['editor']['data']['processor']['toData'](_0x120ff8),this['editor']['data']['processor']['useFillerType']('default');}return _0x56f11b;}['getRevisionRootsAttributes'](_0x51bef8){const _0x3162dd={};for(const _0x763bcb in _0x51bef8['diffData'])_0x51bef8['diffData'][_0x763bcb]['attachChange']&&!_0x51bef8['diffData'][_0x763bcb]['attachChange']['isAttached']||(_0x3162dd[_0x763bcb]=_0x51bef8['diffData'][_0x763bcb]['attributesAfter']||{});return _0x3162dd;}['_getTypeCharForViewElement'](_0x49073a){return this['_viewClassToTypeChar']['get'](_0x49073a['constructor']);}['_getViewFromDiffObj'](_0x21f649,_0x5ac81b){const _0x4a0501=this['editor']['editing']['view']['document'];if('string'==typeof _0x21f649)return new _0x228108(_0x4a0501,_0x21f649);{let _0x1bb6f6,_0x32bf6e;_0x32bf6e='u'==_0x21f649['type']||'r'==_0x21f649['type']?[]:_0x21f649['children']['map'](_0x1bde16=>this['_getViewFromDiffObj'](_0x1bde16,_0x5ac81b));const _0x5b4f62=this['_typeCharToViewClass']['get'](_0x21f649['type'])||_0x35b6d2,_0x39c472=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x1bb6f6=new _0x5b4f62(_0x4a0501,_0x21f649['name'],_0x21f649['attributes'],_0x32bf6e),'u'==_0x21f649['type']&&_0x21f649['children'][0x0]){const _0x222c99=_0x21f649['children'][0x0];if(_0x1bb6f6['render']=function(_0x4ab705){const _0x3d2f68=_0x4ab705['createElement']('div');return _0x3d2f68['innerHTML']=_0x222c99,_0x3d2f68['childNodes'][0x0];},_0x5ac81b){const _0x52566d=new _0x3ca6a2(_0x4a0501);_0x52566d['_appendChild'](_0x1bb6f6);const _0x175f2e=Array['from'](_0x39c472['viewChildrenToDom'](_0x52566d,{'bind':!0x1})),_0x5c8a11=_0x39c472['domDocument']['createElement']('div');_0x5c8a11['append'](..._0x175f2e),_0x1bb6f6=Array['from'](_0x39c472['domChildrenToView'](_0x5c8a11))[0x0];}}else{if('r'==_0x21f649['type']&&_0x21f649['children'][0x0]){const _0x8a0866=_0x21f649['children'][0x0];if(_0x1bb6f6['render']=function(_0x2bd71d){_0x2bd71d['innerHTML']=_0x8a0866;},_0x5ac81b){const _0x531a03=new _0x3ca6a2(_0x4a0501);_0x531a03['_appendChild'](_0x1bb6f6);const _0x15728f=Array['from'](_0x39c472['viewChildrenToDom'](_0x531a03,{'bind':!0x1})),_0x4375be=_0x39c472['domDocument']['createElement']('div');_0x4375be['append'](..._0x15728f);const _0x4a1c97=Array['from'](_0x39c472['domChildrenToView'](_0x4375be));_0x4a1c97['length']>0x1?_0x1bb6f6['_appendChild'](_0x4a1c97):_0x1bb6f6=_0x4a1c97[0x0];}}}if(_0x21f649['customProperties']){for(const [_0x4a6e29,_0x5683cc]of _0x21f649['customProperties'])_0x1bb6f6['_setCustomProperty'](_0x4a6e29,_0x5683cc);}const _0x4be93c=void 0x0===_0x21f649['fillerOffset']?null:_0x21f649['fillerOffset'];return null!==_0x4be93c&&(_0x1bb6f6['getFillerOffset']=()=>_0x4be93c),_0x1bb6f6;}}['_makeModelFromViewString'](_0x44e458){const _0x2ac871=JSON['parse'](_0x44e458),_0x203abd=this['editor']['editing']['view']['document'],_0x435576=new _0x3ca6a2(_0x203abd,_0x2ac871['map'](_0x312bf1=>this['_getViewFromDiffObj'](_0x312bf1,!0x0)));return this['editor']['data']['toModel'](_0x435576);}['_removeRevisionMarkers'](_0x5b195d){return(_0x5b195d=_0x5b195d['filter'](_0x4e4a86=>!_0x4e4a86['name']||'revision-start'!==_0x4e4a86['name']&&'revision-end'!==_0x4e4a86['name']))['forEach'](_0xe57838=>{'string'!=typeof _0xe57838&&(_0xe57838['children']=this['_removeRevisionMarkers'](_0xe57838['children']),_0xe57838['attributes']=_0xe57838['attributes']['filter'](_0x442c9d=>!_0x442c9d[0x0]['startsWith']('data-revision-')));}),_0x5b195d;}}function m(_0x407ed0,_0x376f87,_0x371970){const t=_0x407ed0['t'];switch(_0x376f87){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'},_0x371970);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x371970);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}class h extends _0x4a8c90{['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[_0x362097,S,$,_0x524b32];}constructor(_0x365090){super(_0x365090),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new RevisionDataBuilder(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x478d7f=_0x2e73e2();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x478d7f},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 _0x5a81a9=this['repository']['getRevision'](0x0),_0x37bf8e=_0x5a81a9&&null===_0x5a81a9['creator']?_0x5a81a9:null;if(this['_continueCurrentRevision']=!!_0x37bf8e&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x19bd9c=this['_source']['getCurrentRevisionId'](),_0x4bd5c5=this['repository']['getRevision'](_0x19bd9c);if(_0x4bd5c5)this['_startingVersion']=_0x4bd5c5['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x5750b8=this['_source']['history']['_operations']['find'](_0x17cbc1=>!_0x17cbc1['_isInit']),_0x17317e=_0x5750b8?_0x5750b8['baseVersion']:this['_source']['history']['version'];_0x5a81a9?(_0x5a81a9['toVersion']<_0x17317e&&_0x5a81a9['_update']({'toVersion':_0x17317e}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x37bf8e['id'],this['_startingVersion']=_0x37bf8e['fromVersion']):(this['_startingVersion']=_0x5a81a9['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x17317e,this['_continueCurrentRevision']=!0x1);}}else _0x37bf8e&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x37bf8e['toVersion'],this['editor']['model']['document']['history']['version']),_0x37bf8e['fromVersion']===_0x37bf8e['toVersion']?(0x0!==_0x37bf8e['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x37bf8e['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x37bf8e['id'],this['_startingVersion']=_0x37bf8e['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',_0xada866=>!_0xada866),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x59cedd=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x51710f;for(const _0x44de13 in _0x59cedd){const _0x3b7c0e=_0x44de13,_0x4f6c5d=_0x59cedd[_0x3b7c0e];if('revisionHistoryLicenseKeyValid'==_0x4f6c5d||'revisionHistoryLicenseKeyInvalid'==_0x4f6c5d||'revisionHistoryLicenseKeyExpired'==_0x4f6c5d||'revisionHistoryLicenseKeyDomainLimit'==_0x4f6c5d||'revisionHistoryLicenseKeyNotAllowed'==_0x4f6c5d||'revisionHistoryLicenseKeyEvaluationLimit'==_0x4f6c5d||'revisionHistoryLicenseKeyUsageLimit'==_0x4f6c5d){delete _0x59cedd[_0x3b7c0e],_0x51710f=_0x4f6c5d,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x51710f&&_0x59cedd['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x51710f&&_0x59cedd['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x51710f&&_0x59cedd['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x51710f&&_0x59cedd['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x51710f&&_0x59cedd['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x51710f&&_0x59cedd['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x5284d7=this['repository']['getRevision'](0x0),_0x2974c6=await this['getRevisionDocumentData'](_0x5284d7),_0x1fafe5=await this['getRevisionRootsAttributes'](_0x5284d7);this['_replaceEditorDataWithRevisionData'](_0x2974c6,_0x1fafe5);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x33f24f){this['_source']=_0x33f24f;}async['update'](){const _0x16a604=await this['_source']['getLatestVersion']();if(_0x16a604>this['currentRevision']['toVersion']){await this['_loadState']();const _0x493cf1=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x16a604});_0x493cf1['authors']=_0x493cf1['authorsIds']['map'](_0x3dba22=>this['editor']['plugins']['get']('Users')['getUser'](_0x3dba22)),this['currentRevision']['_update'](_0x493cf1);}}async['saveRevision'](_0xac8ea={},_0x31ec46=null){const _0x304b48=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x31ec46>this['currentRevision']['toVersion']&&(_0x31ec46=null),null===_0x31ec46&&(_0x31ec46=await this['_source']['getLatestVersion']());const _0x6accec=this['_getFromVersion'](_0x31ec46),_0x2aaf25=this['buildRevisionData']({'from':_0x6accec,'to':_0x31ec46});if(this['currentRevision']['toVersion']<_0x31ec46){const _0x13b945=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x31ec46,'to':_0x31ec46});_0x13b945['authors']=[],_0x13b945['authorsIds']=[],_0x13b945['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x13b945,!0x0),delete _0x13b945['authors'],_0x304b48['push'](_0x13b945);}_0xac8ea['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0xac8ea['name']=_0xac8ea['name']||null,_0xac8ea['id']=_0xac8ea['id']||_0x2e73e2(),_0xac8ea={..._0xac8ea,..._0x2aaf25};const _0x43b350=this['addRevisionData'](_0xac8ea);_0x304b48['push'](_0xac8ea);const _0x3058a8=this['repository']['getIndex'](_0x43b350);if(0x0!==_0x3058a8){const _0x56221f=this['repository']['getRevision'](_0x3058a8-0x1);if(_0x56221f['fromVersion']!==_0x31ec46){const _0x5c9efb=this['_revisionDataBuilder']['getData'](_0x31ec46,_0x56221f['toVersion']),_0x26e482={'id':_0x56221f['id'],'diffData':_0x5c9efb['diffData'],'authorsIds':_0x5c9efb['authorsIds'],'authors':_0x5c9efb['authorsIds']['map'](_0x502ea2=>this['editor']['plugins']['get']('Users')['getUser'](_0x502ea2)),'fromVersion':_0x31ec46};_0x56221f===this['currentRevision']&&(_0x26e482['createdAt']=new Date(_0xac8ea['createdAt']['getTime']()+0xa)),_0x56221f['_update'](_0x26e482,!0x0),delete _0x26e482['authors'],_0x304b48['push'](_0x26e482);}}if(this['adapter']){for(const _0x4ff70f of _0x304b48)this['_bufferUpdate'](_0x4ff70f['id'],_0x4ff70f,!0x0);this['sendBufferedUpdates']();}return _0x43b350;}['addRevisionData'](_0x32092f){const _0x18ea82=this['repository']['createRevision'](_0x32092f);return this['adapter']&&_0x18ea82['on']('_update',(_0x154c48,_0xed9a94,_0x5e7c96)=>{_0x5e7c96||(this['_bufferUpdate'](_0xed9a94['id'],_0xed9a94,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x18ea82,this['_findInsertionIndex'](_0x18ea82)),_0x18ea82;}async['getRevisionDocumentData'](_0x57513a){return await this['_utils']['loadRevisionData'](_0x57513a,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x57513a);}async['getRevisionRootsAttributes'](_0x4bffec){return await this['_utils']['loadRevisionData'](_0x4bffec,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x4bffec);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x58239b=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x236a53=0x0;_0x236a53<_0x58239b['length'];_0x236a53++){const _0x54387a=_0x58239b[_0x236a53];let _0x422efe=!0x1;for(const _0x1c6f03 of Object['keys'](_0x54387a))void 0x0===_0x54387a[_0x1c6f03]?delete _0x54387a[_0x1c6f03]:'id'!==_0x1c6f03&&(_0x422efe=!0x0);_0x422efe||(_0x58239b[_0x236a53]=null);}if(_0x58239b=_0x58239b['filter'](_0x316d9c=>null!==_0x316d9c),!_0x58239b['length'])return;for(let _0x219b4b=0x0;_0x219b4b<_0x58239b['length'];_0x219b4b++){const _0x3ced18=_0x58239b[_0x219b4b];void 0x0!==_0x3ced18['fromVersion']&&void 0x0===_0x3ced18['toVersion']&&(_0x3ced18['toVersion']=this['repository']['getRevision'](_0x3ced18['id'])['toVersion']),void 0x0!==_0x3ced18['toVersion']&&void 0x0===_0x3ced18['fromVersion']&&(_0x3ced18['fromVersion']=this['repository']['getRevision'](_0x3ced18['id'])['fromVersion']);}const _0x59abd0=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x58239b,_0x59abd0)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x4731f0=>{if(_0x4731f0){for(const _0x26dcd5 of _0x4731f0)this['setRevisionData']({'id':_0x26dcd5['id'],'createdAt':_0x26dcd5['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x87cedf=null,from:_0x1c2ccc=null,to:_0x56ed49=null}){_0x1c2ccc=null!==_0x1c2ccc?_0x1c2ccc:_0x87cedf['fromVersion'],_0x56ed49=null!==_0x56ed49?_0x56ed49:_0x87cedf['toVersion'];const _0x131c28=this['_revisionDataBuilder']['getData'](_0x1c2ccc,_0x56ed49),_0x5e7fcb={'diffData':_0x131c28['diffData'],'authorsIds':_0x131c28['authorsIds'],'fromVersion':_0x1c2ccc,'toVersion':_0x56ed49};if(!_0x87cedf||_0x56ed49!==_0x87cedf['toVersion']){const _0x5f2616=_0x56ed49-0x1,_0x95c670=this['_source']['history']['getOperation'](_0x5f2616);_0x5e7fcb['createdAt']=_0x95c670&&_0x95c670['createdAt']||new Date();}if(this['_loadedStateData']&&_0x1c2ccc===this['_loadedStateData']['fromVersion']){for(const _0x3f7e62 of this['_loadedStateData']['authors'])_0x5e7fcb['authorsIds']['includes'](_0x3f7e62['id'])||_0x5e7fcb['authorsIds']['push'](_0x3f7e62['id']);}return _0x5e7fcb;}['_bufferUpdate'](_0x5c01e6,_0x5ac5b3,_0x44c0ef){if(this['_bufferedUpdates']['has'](_0x5c01e6)){const _0x5a69bf=this['_bufferedUpdates']['get'](_0x5c01e6);_0x5ac5b3=_0x44c0ef?{..._0x5a69bf,..._0x5ac5b3}:{..._0x5ac5b3,..._0x5a69bf};}this['_bufferedUpdates']['set'](_0x5c01e6,_0x5ac5b3);}['setRevisionData'](_0x3150c8){const _0x4889f4=this['repository']['getRevision'](_0x3150c8['id']);if(_0x3150c8['createdAt']&&(_0x3150c8['createdAt']=new Date(_0x3150c8['createdAt'])),_0x3150c8['authorsIds']){const _0x5b49b5=this['editor']['plugins']['get']('Users');_0x3150c8['authors']=_0x3150c8['authorsIds']['map'](_0x5d2850=>_0x5b49b5['getUser'](_0x5d2850));}_0x4889f4['_update'](_0x3150c8,!0x0);}['_createInitialRevision'](_0x20f7d6){const _0x7085f6=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x7085f6)this['_initialRevisionId']=_0x7085f6['id'];else{const _0x278506=!this['editor']['model']['document']['roots']['find'](_0x507a8b=>this['editor']['model']['hasContent'](_0x507a8b)),_0x43254d=this['editor']['plugins']['get']('Users')['me']['id'],_0x4cf60d=m(this['editor']['locale'],_0x278506?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x20f7d6,'to':_0x20f7d6,'id':this['_initialRevisionId'],'name':_0x4cf60d,'creatorId':_0x43254d});}}['_createCurrentRevision'](_0x48d440){const _0xb6cda2=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0xb6cda2),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x48d440,'to':_0x48d440,'id':_0xb6cda2,'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'](_0x491f5d,_0x4ee390){let _0x1db6ac=this['editor']['config']['get']('initialData'),_0xa3a68b=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x1db6ac){_0x1db6ac={};for(const _0x28f7cc of this['editor']['model']['document']['getRootNames']())_0x1db6ac[_0x28f7cc]='';}if('string'==typeof _0x1db6ac&&(_0x1db6ac={'main':_0x1db6ac}),void 0x0===_0xa3a68b){_0xa3a68b={};for(const _0x188ec3 of this['editor']['model']['document']['getRootNames']())_0xa3a68b[_0x188ec3]={};}let _0x547a83=!0x1;const _0x3e926a=Object['keys'](_0x1db6ac),_0x27bcc9=Object['keys'](_0x491f5d);for(const _0x7f7c95 of _0x3e926a){if(_0x1db6ac[_0x7f7c95]!==_0x491f5d[_0x7f7c95]&&''!==_0x1db6ac[_0x7f7c95]['trim']()){_0x547a83=!0x0;break;}if(!_0x351f4d(_0xa3a68b[_0x7f7c95],_0x4ee390[_0x7f7c95])&&Object['keys'](_0xa3a68b[_0x7f7c95])['length']>0x0){_0x547a83=!0x0;break;}}_0x547a83||(_0x547a83=_0x27bcc9['some'](_0x29084f=>!this['editor']['model']['document']['getRoot'](_0x29084f))),_0x547a83&&_0x344c96('editor-initial-data-replaced-with-revision-data',{'editorData':_0x1db6ac,'editorRootsAttributes':_0xa3a68b,'revisionData':_0x491f5d,'revisionRootsAttributes':_0x4ee390}),this['editor']['config']['set']('initialData',_0x491f5d),this['editor']['config']['set']('rootsAttributes',_0x4ee390);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x18b0ed=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x18b0ed['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x2a12e3){const _0xad0f53=this['repository']['getRevisions']();_0xad0f53['reverse']();let _0x530613=0x0;for(;_0x530613<_0xad0f53['length'];){const _0xed7557=_0xad0f53[_0x530613];if(_0xed7557===this['currentRevision']){_0x530613++;continue;}if(_0xed7557['id']===this['_initialRevisionId'])break;const _0x59f0b5=_0x2a12e3['toVersion']-_0xed7557['toVersion']||_0x2a12e3['fromVersion']-_0xed7557['fromVersion'];if(_0x59f0b5>0x0)break;if(_0x59f0b5<0x0)_0x530613++;else{if(!_0x2a12e3['creator']&&_0xed7557['creator'])break;if(_0xed7557['creator']||!_0x2a12e3['creator']){if(_0x2a12e3['createdAt']>_0xed7557['createdAt'])break;_0x530613++;}else _0x530613++;}}return _0x530613;}['_getFromVersion'](_0xe6009d){const _0x212cc9=this['repository']['getRevisions']();_0x212cc9['reverse'](),_0x212cc9['shift']();const _0x147ded=_0x212cc9['find'](_0x26bf40=>_0x26bf40['toVersion']<=_0xe6009d)['toVersion'];return _0x147ded<this['_startingVersion']?this['_startingVersion']:_0x147ded;}['_makeRevision']({name:_0x16530d,from:_0xb4d943,to:_0x4e9006,creatorId:_0x44cc52,id:_0x283945}){const _0x41cb84=this['buildRevisionData']({'from':_0xb4d943,'to':_0x4e9006});_0x41cb84['name']=_0x16530d,_0x41cb84['creatorId']=_0x44cc52,_0x41cb84['id']=_0x283945;const _0x197421=this['addRevisionData'](_0x41cb84);return this['adapter']&&this['_bufferUpdate'](_0x41cb84['id'],_0x41cb84,!0x0),_0x197421;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class RevisionDataBuilder{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x4f1f3e){this['editor']=_0x4f1f3e,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'](_0x322195){this['source']=_0x322195;const _0xa1face=new Map(),_0x33b2ac=new Map(),_0x5c0085=this['editor']['model']['document']['roots']['map'](_0x89e38c=>_0x89e38c['rootName']);for(const _0x26a228 of _0x5c0085){const _0x5e530f=this['editor']['model']['document']['getRoot'](_0x26a228),_0x486a1f=x(_0x5e530f);_0xa1face['set'](_0x26a228,_0x486a1f),_0x33b2ac['set'](_0x26a228,Object['fromEntries'](_0x5e530f['getAttributes']()));}const _0x14e9e1=Array['from'](this['editor']['model']['markers'])['map'](_0x187846=>[_0x187846['name'],_0x187846['getRange']()]),_0x599f36=this['source']['version'];this['_saveMetaData'](_0x599f36,_0xa1face,_0x14e9e1,_0x33b2ac),this['_startingRevisionId']=this['_revisionId'];const _0x308147=new Map(),_0x2622fc=new Map();for(const _0x1c4f38 of _0x5c0085){const _0xa40bca=K(_0x1c4f38);_0x308147['set'](_0x1c4f38,_0xa40bca),_0x2622fc['set'](_0x1c4f38,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x308147,[],_0x2622fc);}['getData'](_0x8c15e8,_0x561587){if(this['_lastFrom']===_0x8c15e8&&this['_lastTo']<=_0x561587)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x561587,!0x0);else{if(!this['_savedMetaData']['has'](_0x8c15e8)){const _0x410fa0=this['_getPreviousFrom'](_0x8c15e8);this['_calculateMetaData'](_0x410fa0,_0x8c15e8,!0x1);}this['_calculateMetaData'](_0x8c15e8,_0x561587,!0x0);}return this['_lastFrom']=_0x8c15e8,this['_lastTo']=_0x561587,this['_getState']();}['loadState'](_0x28fbee){if(!this['_savedMetaData']['has'](_0x28fbee['fromVersion'])){const _0x387b0f=this['_getPreviousFrom'](_0x28fbee['fromVersion']);this['_calculateMetaData'](_0x387b0f,_0x28fbee['fromVersion'],!0x1);}this['_calculateMetaData'](_0x28fbee['fromVersion'],_0x28fbee['toVersion'],!0x1);const _0x56ceac=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x28fbee['fromVersion'],this['_lastTo']=_0x28fbee['toVersion'];for(const _0x568aa2 in _0x28fbee['diffData']){const _0x5c09c1=_0x28fbee['diffData'][_0x568aa2]['attachChange'],_0x386b79=_0x42a303(_0x28fbee['diffData'][_0x568aa2]['attributesBefore'])||{},_0x2f1454=_0x56ceac['_makeModelFromViewString'](_0x28fbee['diffData'][_0x568aa2]['deletions']);_0x2f1454['rootName']=_0x568aa2,_0x2f1454['_isAttached']=!_0x5c09c1||!_0x5c09c1['isAttached'],_0x2f1454['isAttached']=()=>_0x2f1454['_isAttached'],this['_baseRoots']['set'](_0x568aa2,_0x2f1454),this['_baseRootsAttributes']['set'](_0x568aa2,_0x386b79),_0x5c09c1&&this['_touchedRoots']['set'](_0x568aa2,_0x5c09c1);const _0x1ede1=this['_makeIdsRoot'](_0x2f1454);this['_baseIdsRoots']['set'](_0x568aa2,_0x1ede1);for(const [_0x57a20f,_0x12463a]of _0x2f1454['markers']){if(!_0x57a20f['startsWith']('revision:'))continue;const _0x43cb99=_0x57a20f['split'](':')[0x2];for(const _0x573f15 of _0x12463a['getWalker']({'singleCharacters':!0x0})){const _0x1f890c=this['_getVidAttributeName'](_0x573f15),_0x55cd17='elementEnd'==_0x573f15['type']?_0x573f15['previousPosition']['path']['slice'](0x0,-0x1):_0x573f15['previousPosition']['path'],_0x29b051=_0x1ede1['getNodeByPath'](_0x55cd17)['getAttribute'](_0x1f890c);this['_touched']['set'](_0x29b051,{'userId':_0x43cb99});}_0x2f1454['markers']['delete'](_0x57a20f);}}this['_startingRevisionId']=this['_revisionId'];const _0x37c7e6=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x18c68a=>!this['_touched']['has'](_0x18c68a));let _0x55a826=0x0;const _0x367206=new Map();for(const _0x2ea6c3 in _0x28fbee['diffData']){const _0x180071=_0x28fbee['diffData'][_0x2ea6c3]['attachChange'],_0x17f83b=_0x42a303(_0x28fbee['diffData'][_0x2ea6c3]['attributesAfter'])||{},_0x37f6c2=_0x56ceac['_makeModelFromViewString'](_0x28fbee['diffData'][_0x2ea6c3]['insertions']);_0x37f6c2['rootName']=_0x2ea6c3,_0x37f6c2['_isAttached']=!_0x180071||_0x180071['isAttached'],_0x37f6c2['isAttached']=()=>_0x37f6c2['_isAttached'],this['_diffRoots']['set'](_0x2ea6c3,_0x37f6c2),this['_diffRootsAttributes']['set'](_0x2ea6c3,_0x17f83b);const _0x3f643e=this['_makeIdsRoot'](_0x37f6c2,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x2ea6c3,_0x3f643e),_0x367206['set'](_0x2ea6c3,_0x37f6c2['isAttached']()?_0x17f83b:{});for(const [_0x2ba4c1,_0x38155f]of _0x37f6c2['markers']){if(!_0x2ba4c1['startsWith']('revision:'))continue;const _0x47d37a=_0x2ba4c1['split'](':')[0x2];for(const _0x2edfc7 of _0x38155f['getWalker']({'singleCharacters':!0x0})){const _0x166b8e=this['_getVidAttributeName'](_0x2edfc7),_0x22c656=this['_revisionId']++,_0x57192e='elementEnd'==_0x2edfc7['type']?_0x2edfc7['previousPosition']['path']['slice'](0x0,-0x1):_0x2edfc7['previousPosition']['path'];_0x3f643e['getNodeByPath'](_0x57192e)['_setAttribute'](_0x166b8e,_0x22c656),this['_touched']['set'](_0x22c656,{'userId':_0x47d37a});}_0x37f6c2['markers']['delete'](_0x2ba4c1);}for(const _0x2bf644 of this['editor']['model']['createRangeIn'](_0x37f6c2)['getWalker']({'singleCharacters':!0x0})){const _0x35e652=this['_getVidAttributeName'](_0x2bf644),_0x4d6cc8='elementEnd'==_0x2bf644['type']?_0x2bf644['previousPosition']['path']['slice'](0x0,-0x1):_0x2bf644['previousPosition']['path'],_0x314c1f=_0x3f643e['getNodeByPath'](_0x4d6cc8);_0x314c1f['getAttribute'](_0x35e652)>0x0||_0x314c1f['_setAttribute'](_0x35e652,_0x37c7e6[_0x55a826++]);}for(const [_0x37c6a2,_0x5cd5e3]of _0x37f6c2['markers'])_0x37c6a2['startsWith']('revision:')||this['_markers']['set'](_0x37c6a2,_0x5cd5e3);}const {roots:_0x31fd7b}=this['_savedMetaData']['get'](_0x28fbee['fromVersion']),{roots:_0x222d42}=this['_savedMetaData']['get'](_0x28fbee['toVersion']),_0xc53d73=x(_0x31fd7b['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0xc53d73),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0xc53d73,Number['NEGATIVE_INFINITY']));const _0x4e9df5=x(_0x222d42['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x4e9df5),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x4e9df5));const _0x390ba1=Array['from'](this['_diffRoots'])['map'](([_0x2f140c,_0x556919])=>[_0x2f140c,x(_0x556919)]);this['_saveMetaData'](this['_lastTo'],_0x390ba1,this['_markers'],_0x367206);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x237449,_0x462f9c,_0x271065,_0x264085){const _0x318ad6=new Map(_0x462f9c),_0x467f9f=new Map(_0x42a303(_0x264085)),_0xd0e0a2=new Map();for(const [_0x4bc211,_0x368f42]of _0x271065)_0xd0e0a2['set'](_0x4bc211,{'start':_0x368f42['start']['clone'](),'end':_0x368f42['end']['clone'](),'rootName':_0x368f42['root']['rootName']});this['_savedMetaData']['set'](_0x237449,{'roots':_0x318ad6,'markers':_0xd0e0a2,'rootsAttributes':_0x467f9f});}['_removeMetaData'](_0x5575ff){this['_savedMetaData']['delete'](_0x5575ff);}['_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'](_0x19e38a,_0x3b2f7f=null){let _0x5b7506=null;_0x19e38a['is']('documentFragment')||(_0x5b7506=new _0x52085b(_0x19e38a['name'],{'vid_start':null===_0x3b2f7f?this['_revisionId']++:_0x3b2f7f++}));const _0x1f8f4c=[];for(const _0x2148b5 of _0x19e38a['getChildren']())if(_0x2148b5['is']('element')){_0x1f8f4c['push'](this['_makeIdsRoot'](_0x2148b5,_0x3b2f7f));const _0x1e9af1=_0x1f8f4c[_0x1f8f4c['length']-0x1];null!==_0x3b2f7f&&(_0x3b2f7f=_0x1e9af1['is']('element','$text')?_0x1e9af1['getAttribute']('vid')+0x1:_0x1e9af1['getAttribute']('vid_end')+0x1);}else{for(let _0xf56074=0x0;_0xf56074<_0x2148b5['offsetSize'];_0xf56074++)_0x1f8f4c['push'](new _0x52085b('$text',{'vid':null===_0x3b2f7f?this['_revisionId']++:_0x3b2f7f++}));}if(_0x19e38a['is']('documentFragment')){const _0x4fe95a=K(_0x19e38a['rootName']);return _0x4fe95a['_insertChild'](0x0,_0x1f8f4c),_0x4fe95a;}return _0x5b7506['_setAttribute']('vid_end',null===_0x3b2f7f?this['_revisionId']++:_0x3b2f7f++),_0x5b7506['_insertChild'](0x0,_0x1f8f4c),_0x5b7506;}['_calculateMetaData'](_0x119908,_0x468d9e,_0x6e860f){this['_reset']();const {roots:_0x4be5b0,markers:_0x10c5f8,rootsAttributes:_0x429dc0}=this['_savedMetaData']['get'](_0x119908);this['_baseRoots']=new Map(_0x4be5b0),this['_baseRootsAttributes']=new Map(_0x42a303(_0x429dc0));for(const [_0x27d0c5,_0x45c37b]of this['_baseRoots'])if('$graveyard'!==_0x27d0c5&&(this['_diffRoots']['set'](_0x27d0c5,x(_0x45c37b)),this['_diffRootsAttributes']=new Map(_0x42a303(_0x429dc0)),_0x6e860f)){const _0x155656=this['_revisionId'];this['_idsRoots']['set'](_0x27d0c5,this['_makeIdsRoot'](_0x45c37b)),this['_baseIdsRoots']['set'](_0x27d0c5,this['_makeIdsRoot'](_0x45c37b,_0x155656));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',x(this['_baseRoots']['get']('$graveyard'))),_0x6e860f&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x4903c3,_0x2ea999]of _0x10c5f8){const _0x51ca08=this['_baseRoots']['get'](_0x2ea999['rootName']),_0x3321d9=this['_diffRoots']['get'](_0x2ea999['rootName']),_0x4579c2=new _0xfc9e56(this['_fixPosition'](_0x2ea999['start'],_0x51ca08),this['_fixPosition'](_0x2ea999['end'],_0x51ca08)),_0x4188c5=this['_fixRange'](_0x4579c2,_0x3321d9);_0x51ca08['markers']['set'](_0x4903c3,_0x4579c2),this['_markers']['set'](_0x4903c3,_0x4188c5);}this['_applyOperations'](_0x119908,_0x468d9e,_0x6e860f);}['_applyOperations'](_0xfb3f99,_0x18da92,_0x277db8){for(const _0xf83298 of this['source']['getOperations'](_0xfb3f99,_0x18da92))this['_handleOperation'](_0xf83298,_0x277db8);for(const _0x54424f of this['_diffRoots']['values']())_0x54424f['markers']['clear']();for(const [_0xd53631,_0x596169]of this['_markers']){this['_diffRoots']['get'](_0x596169['root']['rootName'])['markers']['set'](_0xd53631,_0x596169['clone']());}const _0x2b1cc0=new Map(),_0x4d3ebd=new Map();for(const [_0x4e4bbe,_0x208c01]of this['_diffRoots'])_0x2b1cc0['set'](_0x4e4bbe,x(_0x208c01)),_0x4d3ebd['set'](_0x4e4bbe,this['_diffRootsAttributes']['get'](_0x4e4bbe));this['_saveMetaData'](_0x18da92,_0x2b1cc0,this['_markers'],_0x4d3ebd);}['_getPreviousFrom'](_0x495626){const _0x7cb248=Array['from'](this['_savedMetaData']['keys']());_0x7cb248['sort']((_0x324265,_0x2412fc)=>_0x324265-_0x2412fc),_0x7cb248['reverse']();for(const _0x104234 of _0x7cb248)if(_0x104234<_0x495626)return _0x104234;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0xc314d2,_0x519f95){const _0x2bed29=Array['from'](_0x519f95['markers'])['map'](([_0x8d5f29,_0x4af219])=>[_0x8d5f29,this['_fixRange'](_0x4af219,_0xc314d2)]);_0xc314d2['markers']=new Map(_0x2bed29);}['_transformMarkers'](_0x2b8f5a){for(const _0x285e6d of this['_markers']['values']()){const _0x2bd324=_0x285e6d['getTransformedByOperation'](_0x2b8f5a),_0x1e6192=_0xfc9e56['_createFromRanges'](_0x2bd324);_0x285e6d['start']=_0x1e6192['start'],_0x285e6d['end']=_0x1e6192['end'];}}['_handleOperation'](_0x2fb02a,_0x12f82c){if('addRoot'!=_0x2fb02a['type']&&'detachRoot'!=_0x2fb02a['type']){if('insert'==_0x2fb02a['type']){const _0x281d5f=_0x2fb02a['position']['root']['rootName'];this['_diffRoots']['has'](_0x281d5f)||(this['_diffRoots']['set'](_0x281d5f,K(_0x281d5f,!0x0)),this['_diffRootsAttributes']['set'](_0x281d5f,{}),_0x12f82c&&this['_idsRoots']['set'](_0x281d5f,K(_0x281d5f,!0x0)));}else{if('addRootAttribute'==_0x2fb02a['type']||'removeRootAttribute'==_0x2fb02a['type']||'changeRootAttribute'==_0x2fb02a['type'])return void this['_handleRootAttributeOperation'](_0x2fb02a);'marker'==_0x2fb02a['type']&&this['_handleMarkerOperation'](_0x2fb02a);}if('marker'!==_0x2fb02a['type']){const _0x389ef6=this['_cloneOperation'](_0x2fb02a,this['_diffRoots']);_0x389ef6['_execute'](),this['_transformMarkers'](_0x389ef6);}if(_0x12f82c)switch(_0x2fb02a['type']){case'insert':this['_handleInsertOperation'](_0x2fb02a);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x2fb02a);break;case'merge':this['_handleMergeOperation'](_0x2fb02a);break;case'split':this['_handleSplitOperation'](_0x2fb02a);}}else this['_handleRootOperation'](_0x2fb02a,_0x12f82c);}['_cloneOperation'](_0x56926d,_0x547eca){const _0x5f5a18=_0x56926d['clone']();return _0x5f5a18['_authorId']=_0x56926d['_authorId'],this['_fixOperation'](_0x5f5a18,_0x547eca),_0x5f5a18;}['_getBaseVids'](_0x246b3f){return _0x246b3f['map'](_0x10e998=>{const _0x1615ed=this['_getVidAttributeName'](_0x10e998);return Number(_0x10e998['item']['getAttribute'](_0x1615ed));});}['_generateTape'](_0x2fa664,_0x186469){if(_0x2fa664['is']('element','$text'))_0x186469['push']({'item':_0x2fa664,'type':'text'});else{_0x2fa664['is']('element')&&_0x186469['push']({'item':_0x2fa664,'type':'elementStart'});for(const _0x48e960 of _0x2fa664['getChildren']())this['_generateTape'](_0x48e960,_0x186469);_0x2fa664['is']('element')&&_0x186469['push']({'item':_0x2fa664,'type':'elementEnd'});}return _0x186469;}['_getState'](){const _0xa2169c=new Map(this['_touched']),_0x39b427=new Map(_0xa2169c),_0x20807d=new Map(),_0x6bc39={'insertions':{},'deletions':{}},_0x381176={'insertions':{},'deletions':{}},_0x1ad915=new Map(),_0x3cb186=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x3cb186['delete']('$graveyard');for(const _0x49dd6c of _0x3cb186){const _0x28912a=this['_diffRoots']['get'](_0x49dd6c)||K(_0x49dd6c,!0x1),_0x356150=this['_baseRoots']['get'](_0x49dd6c)||K(_0x49dd6c,!0x1);_0x28912a['isAttached']()||_0x356150['isAttached']()?(_0x6bc39['insertions'][_0x49dd6c]=x(_0x28912a),_0x6bc39['deletions'][_0x49dd6c]=x(_0x356150),this['_copyMarkers'](_0x6bc39['deletions'][_0x49dd6c],_0x356150),this['_copyMarkers'](_0x6bc39['insertions'][_0x49dd6c],_0x28912a),_0x381176['insertions'][_0x49dd6c]=this['_generateTape'](this['_idsRoots']['get'](_0x49dd6c),[]),_0x381176['deletions'][_0x49dd6c]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x49dd6c)||K(_0x49dd6c,!0x1),[])):_0x3cb186['delete'](_0x49dd6c);}for(const _0x1af9ad of _0x3cb186){const _0x1eaedc=_0x381176['insertions'][_0x1af9ad];for(const _0xa0cc15 of _0x1eaedc){const _0x1925b5=this['_getVidAttributeName'](_0xa0cc15),_0x4c01bd=_0xa0cc15['item']['getAttribute'](_0x1925b5);_0x39b427['delete'](_0x4c01bd),_0x4c01bd>=this['_startingRevisionId']&&_0x20807d['set'](_0x4c01bd,_0xa2169c['get'](_0x4c01bd));}}for(const _0x56ab69 of _0x3cb186){const _0x93ab72=_0x381176['insertions'][_0x56ab69],_0x5d7ff3=this['_getBaseVids'](_0x381176['deletions'][_0x56ab69]);let _0x2945bb=0x0;for(const _0x134579 of _0x93ab72){const _0x3d91dc=this['_getVidAttributeName'](_0x134579),_0x1d3a9c=_0x134579['item']['getAttribute'](_0x3d91dc);if(!_0x20807d['has'](_0x1d3a9c)&&!_0x1ad915['has'](_0x1d3a9c)){if(_0x39b427['has'](_0x1d3a9c))_0x2945bb++;else{if(_0x1d3a9c!=_0x5d7ff3[_0x2945bb]){const _0x57fae5=_0xa2169c['get'](_0x1d3a9c)||_0xa2169c['get'](_0x5d7ff3[_0x2945bb]);for(;_0x1d3a9c!=_0x5d7ff3[_0x2945bb];)_0x39b427['has'](_0x5d7ff3[_0x2945bb])||(_0x1ad915['set'](_0x5d7ff3[_0x2945bb],_0x57fae5),_0xa2169c['set'](_0x5d7ff3[_0x2945bb],_0x57fae5)),_0x2945bb++;}_0x2945bb++;}}}}for(const _0x3bfc4c of _0x3cb186){const _0x273b24=_0x381176['insertions'][_0x3bfc4c];for(const _0x3f05d7 of _0x273b24){const _0x244f59=this['_getVidAttributeName'](_0x3f05d7),_0x472301=_0x3f05d7['item']['getAttribute'](_0x244f59);if(_0x1ad915['has'](_0x472301)){const _0x14eea0=_0x1ad915['get'](_0x472301);_0x39b427['has'](_0x472301)||_0x39b427['set'](_0x472301,{..._0x14eea0}),_0x20807d['set'](_0x472301,{..._0x14eea0});}}}for(const _0x41f7a6 of _0x39b427['keys']())_0x41f7a6>=this['_startingRevisionId']&&_0x39b427['delete'](_0x41f7a6);const _0x3f790d=new Map();for(const _0x144d02 of _0x3cb186){let _0x1dbf34=_0x381176['insertions'][_0x144d02];for(const _0x2b211e of _0x1dbf34)if(_0x2b211e['item']['is']('element','tableCell')){const _0x5e7f8e=this['_getVidAttributeName'](_0x2b211e),_0x292c99=_0x2b211e['item']['getAttribute'](_0x5e7f8e);if(_0x20807d['has'](_0x292c99)){const _0x37d86b=_0x2b211e['item']['parent']['parent']['getAttribute']('vid_start'),_0xccf39b=_0x3f790d['get'](_0x37d86b)||new Set();_0xccf39b['add'](_0x20807d['get'](_0x292c99)['userId']),_0x3f790d['set'](_0x37d86b,_0xccf39b);}}_0x1dbf34=_0x381176['deletions'][_0x144d02];for(const _0x4a7958 of _0x1dbf34)if(_0x4a7958['item']['is']('element','tableCell')){const _0x296a15=this['_getVidAttributeName'](_0x4a7958),_0x3af11d=_0x4a7958['item']['getAttribute'](_0x296a15);if(_0x39b427['has'](_0x3af11d)){const _0x5d32d5=_0x4a7958['item']['parent']['parent']['getAttribute']('vid_start'),_0x158c49=_0x3f790d['get'](_0x5d32d5)||new Set();_0x158c49['add'](_0x39b427['get'](_0x3af11d)['userId']),_0x3f790d['set'](_0x5d32d5,_0x158c49);}}for(const _0x2b727f of _0x3f790d['keys']())(_0x20807d['has'](_0x2b727f)||_0x39b427['has'](_0x2b727f))&&_0x3f790d['delete'](_0x2b727f);}for(const _0x3875f5 of _0x3cb186){const _0x50796d=_0x381176['insertions'][_0x3875f5];let _0x36aca3=null,_0x7c6002=null;for(const _0x4b3be6 of _0x50796d){const _0x4691a9=this['_getVidAttributeName'](_0x4b3be6),_0x261174=_0x4b3be6['item']['getAttribute'](_0x4691a9),_0x202552=_0x3f790d['get'](_0x261174);_0x202552&&'elementStart'==_0x4b3be6['type']&&(_0x36aca3=Array['from'](_0x202552)[0x0],_0x7c6002=_0x4b3be6['item']['getAttribute']('vid_end')),_0x36aca3&&(_0x39b427['set'](_0x261174,{'userId':_0x36aca3}),_0x20807d['set'](_0x261174,{'userId':_0x36aca3})),_0x261174==_0x7c6002&&(_0x36aca3=null,_0x7c6002=null);}}const _0x451f6e={},_0x1b722c=new Set();for(const _0x28e639 of _0x3cb186){const _0x591cea=_0x6bc39['deletions'][_0x28e639],_0x1f73c1=_0x6bc39['insertions'][_0x28e639];for(const {userId:_0x2a125b}of this['_touchedMarkers']['values']())null!==_0x2a125b&&_0x1b722c['add'](_0x2a125b);for(const {userId:_0x3b71f5}of this['_touchedRoots']['values']())null!==_0x3b71f5&&_0x1b722c['add'](_0x3b71f5);this['_markChanges'](_0x1f73c1,_0x381176['insertions'][_0x28e639],_0x20807d,'insertion',_0x1b722c),this['_markChanges'](_0x591cea,_0x381176['deletions'][_0x28e639],_0x39b427,'deletion',_0x1b722c),_0x451f6e[_0x28e639]={'insertions':this['_prepareViewToSave'](_0x1f73c1),'deletions':this['_prepareViewToSave'](_0x591cea),'attachChange':this['_touchedRoots']['get'](_0x28e639)||null,'attributesBefore':_0x42a303(this['_baseRootsAttributes']['get'](_0x28e639))||{},'attributesAfter':_0x42a303(this['_diffRootsAttributes']['get'](_0x28e639))};}return{'diffData':_0x451f6e,'authorsIds':Array['from'](_0x1b722c)};}['_processRootBeforeSave'](_0x19f098){for(const [,_0x47221c]of _0x19f098['markers']){const _0x444f68=_0x47221c['start']['getAncestors']()['filter'](_0x18796e=>'tableCell'==_0x18796e['name']);for(const _0x786cf5 of _0x444f68)0x1==_0x786cf5['childCount']&&_0x786cf5['getChild'](0x0)['is']('element','paragraph')&&_0x786cf5['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x24eeb7){this['_processRootBeforeSave'](_0x24eeb7);const _0x144e65=this['editor']['data']['toView'](_0x24eeb7,{}),_0x3334a4=Array['from'](_0x144e65['getChildren']())['map'](_0x1e5b4d=>this['_getViewJson'](_0x1e5b4d));return JSON['stringify'](_0x3334a4);}['_getViewJson'](_0x1b35c6){if(_0x1b35c6['is']('$text'))return _0x1b35c6['data'];{const _0x163af9=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x1c2f25=_0x1b35c6,_0x3dec12=this['editor']['data']['htmlProcessor']['domConverter'],_0x394d52={'type':_0x163af9['_getTypeCharForViewElement'](_0x1c2f25),'name':_0x1c2f25['name'],'attributes':Array['from'](_0x1c2f25['getAttributes']()),'children':Array['from'](_0x1c2f25['getChildren']())['map'](_0x5cbe9f=>this['_getViewJson'](_0x5cbe9f))};if(_0x1b35c6['is']('uiElement')&&'$comment'!=_0x1b35c6['name']){const _0x38f8b3=_0x1b35c6['render'](_0x3dec12['domDocument'],_0x3dec12);_0x394d52['children']['push'](_0x38f8b3['outerHTML']);}else{if(_0x1b35c6['is']('rawElement')){const _0x286c8d=_0x3dec12['domDocument']['createElement'](_0x1c2f25['name']);_0x1b35c6['render'](_0x286c8d,_0x3dec12),_0x394d52['children']['push'](_0x286c8d['innerHTML']);}}const _0x1bbbcf=Array['from'](_0x1c2f25['getCustomProperties']());_0x1bbbcf['length']>0x0&&(_0x394d52['customProperties']=_0x1bbbcf);const _0x448aa8=_0x1c2f25['getFillerOffset']();return null!==_0x448aa8&&(_0x394d52['fillerOffset']=_0x448aa8),_0x394d52;}}['_markChanges'](_0x17540d,_0x1b85d4,_0x423975,_0x414ba4,_0x4a124d){let _0x50c921=null,_0x5ac076=null,_0x2b5b4b=0x0;const _0x214f72=this['editor']['model'];for(let _0x2929d9=0x0;_0x2929d9<_0x1b85d4['length'];_0x2929d9++){const _0x527562=this['_getVidAttributeName'](_0x1b85d4[_0x2929d9]),_0x40131d=_0x1b85d4[_0x2929d9]['item']['getAttribute'](_0x527562),_0x30fc3d=_0x423975['get'](_0x40131d),_0x7c3940=_0x2929d9==_0x1b85d4['length']-0x1;(!_0x50c921&&_0x30fc3d&&(_0x50c921=_0x30fc3d,_0x5ac076=_0x1b85d4[_0x2929d9]),_0x50c921&&(!_0x30fc3d||_0x30fc3d['userId']!=_0x50c921['userId']))&&(_0x2899d5(_0x30fc3d,N(_0x5ac076,_0x17540d,_0x214f72),N(_0x1b85d4[_0x2929d9],_0x17540d,_0x214f72)),_0x50c921=_0x30fc3d||null,_0x5ac076=_0x30fc3d?_0x1b85d4[_0x2929d9]:null),_0x50c921&&_0x7c3940&&_0x2899d5(_0x30fc3d,N(_0x5ac076,_0x17540d,_0x214f72),P(_0x1b85d4[_0x2929d9],_0x17540d,_0x214f72));}function _0x2899d5(_0x33f5fb,_0x31bf19,_0x505b07){const _0x385991=_0x50c921['userId'],_0x559f54='revision:'+_0x414ba4+':'+_0x385991+':'+_0x2b5b4b++,_0x3404a9=_0x214f72['createRange'](_0x31bf19,_0x505b07);_0x17540d['markers']['set'](_0x559f54,_0x3404a9),null!==_0x385991&&_0x4a124d['add'](_0x385991);}}['_getVidAttributeName'](_0x1344ee){switch(_0x1344ee['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x86541b,_0x5c64f6){_0x86541b['baseVersion']=null;for(const _0x5823c8 in _0x86541b){const _0x230f52=_0x86541b[_0x5823c8];if(_0x230f52 instanceof _0x4b815d){const _0x6954f3=_0x5c64f6['get'](_0x230f52['root']['rootName']);_0x86541b[_0x5823c8]=this['_fixPosition'](_0x230f52,_0x6954f3);}if(_0x230f52 instanceof _0xfc9e56){const _0x157d7b=_0x5c64f6['get'](_0x230f52['root']['rootName']);_0x86541b[_0x5823c8]=this['_fixRange'](_0x230f52,_0x157d7b);}'root'===_0x5823c8&&(_0x86541b['root']=_0x5c64f6['get'](_0x86541b['root']['rootName']));}}['_fixRange'](_0x504193,_0xa1b1cc){return this['editor']['model']['createRange'](this['_fixPosition'](_0x504193['start'],_0xa1b1cc),this['_fixPosition'](_0x504193['end'],_0xa1b1cc));}['_fixPosition'](_0x26770f,_0x2510c8){return this['editor']['model']['createPositionFromPath'](_0x2510c8,_0x26770f['path'],_0x26770f['stickiness']);}['_handleInsertOperation'](_0x2b3abc){const _0x4ef901=this['_idsRoots']['get'](_0x2b3abc['position']['root']['rootName']),_0x6a99ff=this['_fixPosition'](_0x2b3abc['position'],_0x4ef901),_0x45a384=null===_0x2b3abc['_authorId']?null:_0x2b3abc['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x48c5ee=_0x6a99ff['parent'],_0x5c68d7=this['_revisionId'],_0x44129e=[];for(const _0x3a8ee4 of _0x2b3abc['nodes'])if(_0x3a8ee4['is']('element'))_0x44129e['push'](this['_makeIdsRoot'](_0x3a8ee4));else{for(let _0x3b99c5=0x0;_0x3b99c5<_0x3a8ee4['offsetSize'];_0x3b99c5++)_0x44129e['push'](new _0x52085b('$text',{'vid':this['_revisionId']++}));}const _0x4c80a8=this['_revisionId'];for(let _0x36645b=_0x5c68d7;_0x36645b<_0x4c80a8;_0x36645b++)this['_touched']['set'](_0x36645b,{'userId':_0x45a384});_0x48c5ee['_insertChild'](_0x6a99ff['offset'],_0x44129e);}['_handleMoveOperation'](_0x2a35bc){(_0x2a35bc=this['_cloneOperation'](_0x2a35bc,this['_idsRoots']))['_execute']();const _0x462c4c=null===_0x2a35bc['_authorId']?null:_0x2a35bc['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3aa820=_0x2a35bc['getMovedRangeStart'](),_0x56021f=_0x3aa820['parent'],_0x3c44e8=_0x3aa820['offset'];!function _0x569cfd(_0x39bd16,_0x27e4cd,_0x7b92ef,_0x39fe1b){for(let _0xbea4fd=_0x7b92ef;_0xbea4fd<_0x39fe1b;_0xbea4fd++){const _0x425b8e=_0x27e4cd['getChild'](_0xbea4fd);_0x425b8e['is']('element','$text')?_0x39bd16['set'](_0x425b8e['getAttribute']('vid'),{'userId':_0x462c4c}):(_0x39bd16['set'](_0x425b8e['getAttribute']('vid_start'),{'userId':_0x462c4c}),_0x569cfd(_0x39bd16,_0x425b8e,0x0,_0x425b8e['childCount']),_0x39bd16['set'](_0x425b8e['getAttribute']('vid_end'),{'userId':_0x462c4c}));}}(this['_touched'],_0x56021f,_0x3c44e8,_0x3c44e8+_0x2a35bc['howMany']);}['_handleMergeOperation'](_0x496e9f){const _0x131e15=null===(_0x496e9f=this['_cloneOperation'](_0x496e9f,this['_idsRoots']))['_authorId']?null:_0x496e9f['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x588893=_0x496e9f['targetPosition']['parent'],_0x225c36=_0x496e9f['sourcePosition']['parent'],_0x4a610c=_0x588893['getAttribute']('vid_end'),_0x410bd7=_0x225c36['getAttribute']('vid_start');_0x588893['_setAttribute']('vid_end',_0x225c36['getAttribute']('vid_end')),_0x225c36['_setAttribute']('vid_end',_0x4a610c),this['_touched']['set'](_0x410bd7,{'userId':_0x131e15}),this['_touched']['set'](_0x4a610c,{'userId':_0x131e15}),_0x496e9f['_execute']();}['_handleSplitOperation'](_0x3d5657){const _0x55e19c=null===(_0x3d5657=this['_cloneOperation'](_0x3d5657,this['_idsRoots']))['_authorId']?null:_0x3d5657['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x259117=_0x3d5657['graveyardPosition'],_0x57b826=_0x3d5657['splitPosition']['parent'];_0x3d5657['_execute']();const _0xe68ba7=_0x57b826['getAttribute']('vid_end'),_0x57552a=_0x3d5657['insertionPosition']['nodeAfter'];if(_0x259117){const _0xfb25c0=_0x57552a['getAttribute']('vid_end'),_0x26646b=_0x57b826['getAttribute']('vid_end');_0x57b826['_setAttribute']('vid_end',_0xfb25c0),_0x57552a['_setAttribute']('vid_end',_0x26646b),this['_touched']['set'](_0x57b826['getAttribute']('vid_end'),{'userId':_0x55e19c}),this['_touched']['set'](_0x57552a['getAttribute']('vid_start'),{'userId':_0x55e19c});}else{const _0x10e69c=this['_revisionId']++,_0x58d0b9=this['_revisionId']++;_0x57b826['_setAttribute']('vid_end',_0x10e69c),_0x57552a['_setAttribute']('vid_start',_0x58d0b9),_0x57552a['_setAttribute']('vid_end',_0xe68ba7),this['_touched']['set'](_0x10e69c,{'userId':_0x55e19c}),this['_touched']['set'](_0x58d0b9,{'userId':_0x55e19c});}}['_handleMarkerOperation'](_0x52a030){if(!_0x52a030['affectsData'])return;const _0x38500d=(_0x52a030=this['_cloneOperation'](_0x52a030,this['_diffRoots']))['oldRange']?_0x52a030['oldRange']['root']:null,_0x2dbd56=_0x52a030['newRange']?_0x52a030['newRange']['root']:null;_0x38500d&&this['_markers']['delete'](_0x52a030['name']),_0x2dbd56&&this['_markers']['set'](_0x52a030['name'],_0x52a030['newRange']['clone']());const _0x273b8a=null===_0x52a030['_authorId']?null:_0x52a030['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5eb30=_0x52a030['name'];if(!this['_touchedMarkers']['has'](_0x5eb30))return void this['_touchedMarkers']['set'](_0x5eb30,{'range':_0x52a030['oldRange'],'userId':_0x273b8a});const _0x53fa7f=this['_touchedMarkers']['get'](_0x5eb30),_0x58c545=_0x53fa7f['range'],_0x459978=_0x52a030['newRange'];null==_0x58c545&&null==_0x459978||_0x58c545&&_0x459978&&_0x58c545['isEqual'](_0x459978)?this['_touchedMarkers']['delete'](_0x52a030['name']):_0x53fa7f['userId']=_0x273b8a;}['_handleRootOperation'](_0x5301af,_0x449a07){this['_diffRoots']['has'](_0x5301af['rootName'])?this['_diffRoots']['get'](_0x5301af['rootName'])['_isAttached']=_0x5301af['isAdd']:(this['_diffRoots']['set'](_0x5301af['rootName'],K(_0x5301af['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x5301af['rootName'],{}),_0x449a07&&this['_idsRoots']['set'](_0x5301af['rootName'],K(_0x5301af['rootName'],!0x0)));const _0x19d202=null===_0x5301af['_authorId']?null:_0x5301af['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4953a5=this['_touchedRoots']['get'](_0x5301af['rootName']);_0x4953a5&&_0x4953a5['userId']===_0x19d202?this['_touchedRoots']['delete'](_0x5301af['rootName']):this['_touchedRoots']['set'](_0x5301af['rootName'],{'userId':_0x19d202,'isAttached':_0x5301af['isAdd']});}['_handleRootAttributeOperation'](_0x402f45){const _0x232690=this['_diffRootsAttributes']['get'](_0x402f45['root']['rootName']);null===_0x402f45['newValue']?delete _0x232690[_0x402f45['key']]:_0x232690[_0x402f45['key']]=_0x402f45['newValue'];}}function x(_0x1ae20f){const _0x3048f9=K(_0x1ae20f['rootName'],_0x1ae20f['isAttached']());for(const _0x2cc027 of _0x1ae20f['getChildren']()){const _0x39aff9=_0x2cc027['_clone'](!0x0);_0x3048f9['_appendChild'](_0x39aff9);}return _0x3048f9;}function K(_0x248e02,_0x5302e4=!0x0){const _0x172ca5=new _0x1ce9f9();return _0x172ca5['rootName']=_0x248e02,_0x172ca5['_isAttached']=_0x5302e4,_0x172ca5['isAttached']=()=>_0x172ca5['_isAttached'],_0x172ca5;}function N(_0x4b0e7,_0x3c2521,_0x445cb0){const _0x2cae4d='elementEnd'==_0x4b0e7['type']?_0x445cb0['createPositionAt'](_0x4b0e7['item'],'end'):_0x445cb0['createPositionBefore'](_0x4b0e7['item']);return _0x445cb0['createPositionFromPath'](_0x3c2521,_0x2cae4d['path'],_0x2cae4d['stickiness']);}function P(_0x24e3de,_0x179bd6,_0x1f07cc){const _0x3b1c08='elementStart'==_0x24e3de['type']?_0x1f07cc['createPositionAt'](_0x24e3de['item'],0x0):_0x1f07cc['createPositionAfter'](_0x24e3de['item']);return _0x1f07cc['createPositionFromPath'](_0x179bd6,_0x3b1c08['path'],_0x3b1c08['stickiness']);}class he extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x40d671(_0x40c521){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x1cbbdf,_0x1ab7d0){super(_0x1cbbdf),this['focusTracker']=new _0xefae(),this['keystrokes']=new _0x28b332(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x1ab7d0),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'](),_0x253c55({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x5d1ffb=_0x93c3e=>_0x93c3e['stopPropagation']();this['keystrokes']['set']('arrowright',_0x5d1ffb),this['keystrokes']['set']('arrowleft',_0x5d1ffb),this['keystrokes']['set']('arrowup',_0x5d1ffb),this['keystrokes']['set']('arrowdown',_0x5d1ffb);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x47b8b7){this['revisionNameInputView']['fieldView']['element']['value']=_0x47b8b7['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x5cac03){const _0x29e435=new et(this['locale'],ti),_0x4f8f51=_0x29e435['fieldView'];_0x4f8f51['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x4c6edc=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0x5cac03&&(_0x4c6edc+='\x20('+m(this['locale'],'optional')+')'),(_0x29e435['label']=_0x4c6edc,_0x4f8f51['on']('input',()=>{this['revisionNameInputValue']=_0x4f8f51['element']['value']['trim']();}),_0x29e435);}}class l extends _0x4a8c90{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h];}['_saveRevisionFormView'];['init'](){const _0x242cf0=this['editor'],_0x293158=_0x242cf0['plugins']['get']('RevisionTracker');_0x242cf0['ui']['componentFactory']['add']('revisionHistory',_0x139a5d=>{const _0x58b3c6=_0x1ba734(_0x139a5d),_0x7c8d02=_0x58b3c6['panelView']['children'],_0x4e2479=new _0xe5d35b(_0x139a5d),_0x3257cb=new _0x34591e(_0x139a5d),_0x431e59=this['_createSaveRevisionButton'](_0x5ef49e),_0x4de20c=new _0x34591e(_0x139a5d),_0x12d885=this['_createOpenRevisionButton'](_0x5ef49e);return _0x58b3c6['bind']('isEnabled')['to'](_0x293158,'isReady',_0x293158,'isEnabled',_0x242cf0,'isReadOnly',(_0x2d5132,_0x511447,_0x499dd1)=>_0x2d5132&&_0x511447&&!_0x499dd1),_0x58b3c6['buttonView']['set']({'icon':_0x3c6bb0,'label':m(_0x139a5d,'Revision\x20history'),'tooltip':!0x0}),_0x431e59['set']({'withText':!0x0,'role':'menuitem'}),_0x12d885['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x12d885,'execute',()=>{_0x58b3c6['isOpen']=!0x1,_0x242cf0['editing']['view']['focus']();},{'priority':'low'}),_0x3257cb['children']['add'](_0x431e59),_0x4de20c['children']['add'](_0x12d885),_0x4e2479['role']='menu',_0x4e2479['items']['addMany']([_0x3257cb,_0x4de20c]),_0x7c8d02['add'](_0x4e2479),_0x58b3c6;}),_0x242cf0['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x50a8c3=this['editor'],_0x51c0d3=_0x50a8c3['locale'],_0x324e40=_0x50a8c3['plugins']['get']('RevisionTracker'),_0x22874b=new _0x4eb962(_0x51c0d3),_0x32c26a=new _0x4c73bb(_0x51c0d3);_0x22874b['bind']('isEnabled')['to'](_0x324e40,'isReady',_0x324e40,'isEnabled',_0x50a8c3,'isReadOnly',(_0x508313,_0x3d6937,_0x5086d4)=>_0x508313&&_0x3d6937&&!_0x5086d4),_0x22874b['buttonView']['set']({'icon':_0x3c6bb0,'label':m(_0x51c0d3,'Revision\x20history')});const _0x3591fe=new _0x2e5c4b(_0x51c0d3,_0x22874b),_0x451fd5=this['_createSaveRevisionButton'](_0x4434db);_0x451fd5['delegate']('execute')['to'](_0x22874b),_0x3591fe['children']['add'](_0x451fd5),_0x32c26a['items']['add'](_0x3591fe);const _0x2c835a=new _0x2e5c4b(_0x51c0d3,_0x22874b),_0x536003=this['_createOpenRevisionButton'](_0x4434db);return _0x536003['delegate']('execute')['to'](_0x22874b),_0x2c835a['children']['add'](_0x536003),_0x32c26a['items']['add'](_0x2c835a),_0x22874b['panelView']['children']['add'](_0x32c26a),_0x22874b;}['_createSaveRevisionButton'](_0x3092ee){const _0x5d8e4d=this['editor'],_0x550f3a=_0x5d8e4d['plugins']['get']('RevisionTracker'),_0x4d75de=new _0x3092ee(_0x5d8e4d['locale']);return _0x4d75de['set']({'label':m(_0x5d8e4d['locale'],'Save\x20current\x20revision')}),_0x4d75de['bind']('isEnabled')['to'](_0x550f3a,'isReady',_0x550f3a,'isEnabled',_0x5d8e4d,'isReadOnly',(_0x12082c,_0x552ce4,_0x395aaf)=>_0x12082c&&_0x552ce4&&!_0x395aaf),this['listenTo'](_0x4d75de,'execute',()=>{this['_showDialog']();}),_0x4d75de;}['_createOpenRevisionButton'](_0xb74fa1){const _0x1c79e6=this['editor'],_0x2106ab=_0x1c79e6['plugins']['get']('RevisionTracker'),_0x518b72=new _0xb74fa1(_0x1c79e6['locale']);return _0x518b72['set']({'label':m(_0x1c79e6['locale'],'Open\x20revision\x20history')}),_0x518b72['bind']('isEnabled')['to'](_0x2106ab,'isReady',_0x1c79e6,'isReadOnly',(_0x2687c8,_0x29414e)=>_0x2687c8&&!_0x29414e),this['listenTo'](_0x518b72,'execute',()=>{_0x1c79e6['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x518b72;}['_showDialog'](){const _0xfac837=this['editor'],_0x357986=_0xfac837['locale'],_0x55d793=_0xfac837['plugins']['get']('Dialog'),_0x3b19eb=_0xfac837['plugins']['get']('RevisionTracker');function _0x55138b(_0x5c8a99){_0xfac837['config']['get']('revisionHistory.requireRevisionName')&&''===_0x5c8a99['revisionName']?_0x5c8a99['revisionNameInputView']['errorText']=m(_0x357986,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0xfac837['plugins']['get'](h)['saveRevision']({'name':_0x5c8a99['revisionName']}),_0x55d793['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x55138b(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x55d793['show']({'id':'revisionSave','title':m(_0x357986,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0xfac837['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x55d793['hide']()},{'label':m(_0xfac837['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x328d28){_0x328d28['bind']('isEnabled')['to'](_0x3b19eb,'isReady',_0x3b19eb,'isEnabled',_0xfac837,'isReadOnly',(_0x36e82b,_0x381b6c,_0x533823)=>_0x36e82b&&_0x381b6c&&!_0x533823);},'onExecute':()=>_0x55138b(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x2fd907=this['editor'],_0xfe942e=_0x2fd907['locale'];this['_saveRevisionFormView']=new he(_0xfe942e,_0x2fd907['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class q extends _0x40c521{['changeId'];['_model'];constructor(_0x2065e3,_0x430c8d){super(_0x2065e3),this['_model']=_0x430c8d,this['changeId']=_0x430c8d['id'];const _0x3ca192=this['bindTemplate'],_0x28cf59=m(_0x2065e3,_0x430c8d['data']['isSuggestion']?'Suggested\x20by':'add'==_0x430c8d['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x430c8d['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x3ca192['to']('type',_0x5c0118=>'ck-revision-change__'+_0x5c0118)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x28cf59}]},{'text':'\x20'+_0x430c8d['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class z extends/* #__PURE__ -- @preserve */
|
|
26
|
+
_0x2e56b4(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x2b5b8f){super(),this['id']=_0x2b5b8f['id']||_0x2e73e2(),this['author']=_0x2b5b8f['author'],this['type']=_0x2b5b8f['type'],this['data']=_0x2b5b8f['data']||{},this['rootName']=_0x2b5b8f['rootName'],this['set']('createdAt',_0x2b5b8f['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class G{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x39b372,_0x42f3d6){this['newRevisionId']=_0x39b372,this['oldRevisionId']=_0x42f3d6,this['changes']=new _0x1a777e();}['_setChanges'](_0x392104){for(const _0xbf71c5 of _0x392104)this['changes']['add'](_0xbf71c5);}}class u extends _0x4a8c90{['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[_0x362097,_0x1330fa,S,$];}constructor(_0x26ffcf){super(_0x26ffcf),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',(_0x2fdf7c,_0x19897a,_0x1c7029)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x2e12c3=>{for(const _0x459ed7 of this['editor']['editing']['view']['document']['roots'])_0x1c7029?_0x2e12c3['removeClass']('ck-editor__editable__overlay',_0x459ed7):_0x2e12c3['addClass']('ck-editor__editable__overlay',_0x459ed7);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x16d5a8=>null!==_0x16d5a8),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x1e2fad,_0x1ce7de,_0x4bdb26)=>_0x1e2fad&&_0x4bdb26?_0x1ce7de['changes']['getIndex'](_0x4bdb26):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x85b8ff,_0x4d74cf)=>_0x85b8ff?_0x4d74cf['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x1330fa);}['init'](){const _0x146c65=this['editor'],_0x5ef2f5=new ShowChangeCommand(_0x146c65,{'direction':'backward'}),_0x50b078=new ShowChangeCommand(_0x146c65,{'direction':'forward'});(_0x146c65['commands']['add']('showPreviousChange',_0x5ef2f5),_0x146c65['commands']['add']('showNextChange',_0x50b078),_0x146c65['commands']['add']('restoreRevision',new RestoreRevisionCommand(_0x146c65)),this['on']('change:numberOfChanges',()=>{_0x5ef2f5['refresh'](),_0x50b078['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x146c65['enableReadOnlyMode']('revision-viewer'),_0x146c65['plugins']['has']('WidgetToolbarRepository'))&&_0x146c65['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0xa9d5d7){return await this['_utils']['loadRevisionData'](_0xa9d5d7,this['adapter']),this['_utils']['getRevisionDocumentData'](_0xa9d5d7);}async['getRevisionRootsAttributes'](_0x32f9a0){return await this['_utils']['loadRevisionData'](_0x32f9a0,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x32f9a0);}async['compare'](_0x3ce577,_0x293b0c,_0x3d24a1=!0x1){if(!this['isEnabled'])return;const _0x5c3d59=this['diff'],_0xd0bbe6=this['repository'],_0x4cd488='string'==typeof _0x3ce577?_0xd0bbe6['getRevision'](_0x3ce577):_0x3ce577,_0x1c0c79='string'==typeof _0x293b0c?_0xd0bbe6['getRevision'](_0x293b0c):_0x293b0c,_0x2e409c=_0x4cd488['id'],_0x3898d0=_0x1c0c79?_0x1c0c79['id']:null;if(!_0x3d24a1&&this['diff']&&this['diff']['newRevisionId']===_0x2e409c&&this['diff']['oldRevisionId']===_0x3898d0)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new G(_0x2e409c,_0x3898d0);const _0x6c6ebf=this['_getRevisionsRange'](_0x4cd488,_0x1c0c79,!0x0)['map'](_0x4ad1cc=>this['_utils']['loadRevisionData'](_0x4ad1cc,this['adapter']));return _0x6c6ebf['push'](new Promise(_0x116524=>{setTimeout(_0x116524,0x14);})),Promise['all'](_0x6c6ebf)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x209a77=this['_getDiff'](_0x2e409c,_0x3898d0);for(const _0x5c1f1a of _0x209a77['changes'])this['_changeIdToChange']['set'](_0x5c1f1a['id'],_0x5c1f1a);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x438053=>{for(const _0x4a7802 of this['editor']['model']['document']['getRootNames']())_0x438053['detachRoot'](_0x4a7802);for(const _0x2fd808 of Object['keys'](_0x209a77['model'])){const _0x16f302=_0x438053['addRoot'](_0x2fd808);for(const _0x48cdee of Object['keys'](_0x209a77['attributes'][_0x2fd808]))_0x438053['setAttribute'](_0x48cdee,_0x209a77['attributes'][_0x2fd808][_0x48cdee],_0x16f302);_0x438053['insert'](_0x209a77['model'][_0x2fd808],_0x16f302,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x209a77['changes'])),this['isReady']=!0x0;})['catch'](_0x54b45e=>{console['error'](_0x54b45e),this['_cleanUp'](),_0x5c3d59&&(this['diff']=_0x5c3d59),this['isReady']=!0x0;});}['addRevisionData'](_0xfa1e86,_0x3fa9a1){const _0x5ece4d=this['repository']['createRevision'](_0xfa1e86);return _0x5ece4d['on']('_update',(_0x3542b7,_0x15d592,_0x144185)=>_0x3fa9a1(_0x15d592,_0x144185,_0x5ece4d)),this['repository']['addRevision'](_0x5ece4d),_0x5ece4d;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x706552=>{for(const _0x33e02d of this['editor']['model']['document']['getRootNames']())_0x706552['detachRoot'](_0x33e02d);});}['_sortAndFilterDiffChanges'](_0x16ea6b){const _0x576994=[],_0x4f702e=new Map();for(const _0x1da86c of this['editor']['model']['document']['getRootNames']()){const _0x25f496=this['editor']['editing']['view']['getDomRoot'](_0x1da86c);if(!_0x25f496)continue;const _0x593242=_0x25f496['getClientRects']()['item'](0x0);_0x593242&&(_0x576994['push'](_0x1da86c),_0x4f702e['set'](_0x1da86c,_0x593242));}return _0x576994['sort']((_0x226023,_0x278fa6)=>{const _0x7ab2d5=_0x4f702e['get'](_0x226023),_0x22bbe4=_0x4f702e['get'](_0x278fa6);return _0x7ab2d5['y']-_0x22bbe4['y']||_0x7ab2d5['x']-_0x22bbe4['x'];}),(_0x16ea6b=_0x16ea6b['filter'](_0x480281=>_0x576994['includes'](_0x480281['rootName'])))['sort']((_0x3839b0,_0x3ba44e)=>_0x576994['indexOf'](_0x3839b0['rootName'])-_0x576994['indexOf'](_0x3ba44e['rootName'])),_0x16ea6b;}['_makeTape'](_0x46eb77){const _0x2eed67=Array['from'](_0x46eb77['markers'])['filter'](([_0x230d78,_0x3b3f5c])=>_0x230d78['startsWith']('revision:')&&!_0x3b3f5c['isCollapsed']),_0x59c5ea=Array['from'](this['editor']['model']['createRangeIn'](_0x46eb77)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x2eed67['length'])for(const _0x54a6f3 of _0x59c5ea){const [_0x3ff5ad,_0x2f27d7]=_0x2eed67[0x0],[,_0x1c3fae,_0x5516f2]=_0x3ff5ad['split'](':');if(_0x2f27d7['end']['isEqual'](_0x54a6f3['nextPosition'])&&_0x2eed67['shift'](),(_0x54a6f3['previousPosition']['isEqual'](_0x2f27d7['start'])||_0x54a6f3['previousPosition']['isAfter'](_0x2f27d7['start']))&&('insertion'==_0x1c3fae?_0x54a6f3['isAdded']={'userId':_0x5516f2}:'deletion'==_0x1c3fae&&(_0x54a6f3['isRemoved']={'userId':_0x5516f2})),0x0==_0x2eed67['length'])break;}return _0x59c5ea;}['_refreshStartEndIndex'](_0x1760ce){const _0x66deb0=new Map();for(let _0x402e3d=0x0;_0x402e3d<_0x1760ce['length'];_0x402e3d++)'text'===_0x1760ce[_0x402e3d]['type']?(_0x1760ce[_0x402e3d]['item']['startIndex']=_0x402e3d,_0x1760ce[_0x402e3d]['item']['endIndex']=_0x402e3d):('elementStart'===_0x1760ce[_0x402e3d]['type']?_0x1760ce[_0x402e3d]['item']['startIndex']=_0x402e3d:'elementEnd'===_0x1760ce[_0x402e3d]['type']&&(_0x1760ce[_0x402e3d]['item']['endIndex']=_0x402e3d),_0x66deb0['set'](_0x1760ce[_0x402e3d]['id'],_0x402e3d));for(const _0x28dd89 of _0x66deb0['values']())'elementStart'===_0x1760ce[_0x28dd89]['type']?_0x1760ce[_0x28dd89]['item']['endIndex']=_0x66deb0['get'](_0x1760ce[_0x28dd89]['pairId']):'elementEnd'===_0x1760ce[_0x28dd89]['type']&&(_0x1760ce[_0x28dd89]['item']['startIndex']=_0x66deb0['get'](_0x1760ce[_0x28dd89]['pairId']));}['_processTape'](_0x2b9990){for(let _0x442d5c=0x0;_0x442d5c<_0x2b9990['length'];_0x442d5c++){if('elementStart'===_0x2b9990[_0x442d5c]['type'])_0x2b9990[_0x442d5c]['item']['startIndex']=_0x442d5c;else{if('elementEnd'===_0x2b9990[_0x442d5c]['type']){_0x2b9990[_0x442d5c]['item']['endIndex']=_0x442d5c;const _0x70a9ef=_0x2b9990[_0x442d5c]['item']['startIndex'];_0x2b9990[_0x70a9ef]['pairId']=_0x2b9990[_0x442d5c]['id'],_0x2b9990[_0x442d5c]['pairId']=_0x2b9990[_0x70a9ef]['id'];}else _0x2b9990[_0x442d5c]['item']['startIndex']=_0x442d5c,_0x2b9990[_0x442d5c]['item']['endIndex']=_0x442d5c,_0x2b9990[_0x442d5c]['pairId']=null;}_0x2b9990[_0x442d5c]['markersStart']||(_0x2b9990[_0x442d5c]['markersStart']=[],_0x2b9990[_0x442d5c]['markersEnd']=[]);}}['_markInsertions'](_0x25196e,_0x5e6c73){const _0x413d1a=_0x25196e['filter'](_0x4c78d1=>!_0x4c78d1['isAdded']);for(let _0x691690=0x0;_0x691690<_0x5e6c73['length'];_0x691690++)_0x5e6c73[_0x691690]['isAdded']&&(_0x413d1a[_0x691690]['isAdded']=_0x5e6c73[_0x691690]['isAdded']);}['_getDiff'](_0x44e6bc,_0x5ab877=null){const _0xa61423=this['repository']['getRevision'](_0x44e6bc),_0x95eb30=_0x5ab877?this['repository']['getRevision'](_0x5ab877):null,_0x190e62=this['_getRevisionsRange'](_0xa61423,_0x95eb30),_0x513f78=_0x190e62[_0x190e62['length']-0x1],_0x27667d=new Map(),_0x29215c={'model':{},'attributes':{},'changes':[]},_0x4715ee=new Set(),_0x180ba0=new Map();for(let _0x11d65a=_0x190e62['length']-0x1;_0x11d65a>=0x0;_0x11d65a--){const _0x1f9b80=_0x190e62[_0x11d65a];for(const _0x2a6788 of Object['keys'](_0x1f9b80['diffData']))if(_0x1f9b80['diffData'][_0x2a6788]['attachChange']){const _0x3f7b08=_0x1f9b80['diffData'][_0x2a6788]['attachChange'];_0x3f7b08['isAttached']?(_0x4715ee['add'](_0x2a6788),_0x180ba0['has'](_0x2a6788)&&_0x180ba0['get'](_0x2a6788)['userId']==_0x3f7b08['userId']?_0x180ba0['delete'](_0x2a6788):_0x180ba0['set'](_0x2a6788,_0x3f7b08)):_0x180ba0['has'](_0x2a6788)?(_0x4715ee['delete'](_0x2a6788),_0x180ba0['delete'](_0x2a6788)):(_0x4715ee['add'](_0x2a6788),_0x180ba0['set'](_0x2a6788,_0x3f7b08));}else _0x4715ee['add'](_0x2a6788);}for(const _0x564303 of _0x4715ee){const _0x4f3fef=_0x180ba0['has'](_0x564303)&&!_0x180ba0['get'](_0x564303)['isAttached'];let _0x5aee9b=_0x4f3fef?_0x190e62['length']-0x1:0x0;const _0x48dde1=_0x4f3fef?-0x1:0x1;for(;_0x190e62[_0x5aee9b];){const _0xde0a0e=_0x190e62[_0x5aee9b];if(_0xde0a0e['diffData'][_0x564303]){const _0xd2d63c=_0x4f3fef?_0xde0a0e['diffData'][_0x564303]['attributesBefore']:_0xde0a0e['diffData'][_0x564303]['attributesAfter'];_0x29215c['attributes'][_0x564303]=_0xd2d63c?_0x42a303(_0xd2d63c):{};break;}_0x5aee9b+=_0x48dde1;}}for(const _0x258965 of _0x190e62){_0x258965['model']={};for(const _0x4ec202 of _0x258965['authors'])_0x27667d['set'](_0x4ec202['id'],_0x4ec202);for(const _0x59dab6 of _0x4715ee){const _0x39426b=_0x258965['diffData'][_0x59dab6]?_0x258965['diffData'][_0x59dab6]['insertions']:'[]',_0x403191=_0x258965['diffData'][_0x59dab6]?_0x258965['diffData'][_0x59dab6]['deletions']:'[]';_0x258965['model'][_0x59dab6]={'insertions':this['_utils']['_makeModelFromViewString'](_0x39426b),'deletions':this['_utils']['_makeModelFromViewString'](_0x403191)};}}for(const _0x10f5de of _0x4715ee){let _0x598b63=null,_0x2b1af8=0x0;const _0x104839=new Map(Array['from'](_0xa61423['model'][_0x10f5de]['insertions']['markers'])['filter'](([_0x3774c0])=>!_0x3774c0['startsWith']('revision:')));let _0x1a83e4=0x0;for(const _0x1558a6 of _0x190e62){const _0x5dcf7b=this['_makeTape'](_0x1558a6['model'][_0x10f5de]['insertions']);_0x1558a6==_0xa61423?(_0x598b63=_0x5dcf7b,_0x2b1af8=_0x598b63['length'],_0x598b63['forEach'](_0x462692=>{_0x462692['id']=_0x1a83e4++;}),this['_processTape'](_0x598b63)):this['_markInsertions'](_0x598b63,_0x5dcf7b);const _0x1ed031=_0x598b63['filter'](_0x199455=>!_0x199455['isAdded'])['map'](_0x3752f4=>_0x3752f4['id']);let _0x593f5f=0x0;const _0x1a04dc=this['_makeTape'](_0x1558a6['model'][_0x10f5de]['deletions']);_0x1a04dc['forEach'](_0x531905=>{_0x531905['isRemoved']?_0x531905['id']=_0x2b1af8++:_0x531905['id']=_0x1ed031[_0x593f5f++];}),this['_processTape'](_0x1a04dc),this['_setDistance'](_0x598b63,'isAdded'),this['_setDistance'](_0x1a04dc,'isRemoved'),_0x1558a6==_0xa61423&&this['_markMarkers'](_0x598b63,_0x104839),_0x598b63=this['_joinTapes'](_0x598b63,_0x1a04dc),this['_refreshStartEndIndex'](_0x598b63),this['_setDistance'](_0x598b63,'isRemoved');}_0x598b63=_0x598b63['filter'](_0x4f2aa6=>!(_0x4f2aa6['isAdded']&&_0x4f2aa6['isRemoved']));const _0x173132=new Map(_0x513f78['model'][_0x10f5de]['deletions']['markers']),_0x4c520c=new Set(_0x104839['keys']());for(const _0x4f08a6 of _0x173132['keys']())_0x4c520c['delete'](_0x4f08a6);this['_markSuggestions'](_0x598b63,_0x4c520c),this['_fixObsoleteTags'](_0x598b63),_0x598b63=this['_removeMissingPairs'](_0x598b63),_0x598b63=this['_markMismatchedRemovedTags'](_0x598b63),_0x598b63=this['_removeUnsupportedChanges'](_0x598b63);const {root:_0x21619f,changes:_0xc38d27}=this['_makeModelFromTape'](_0x598b63,_0x27667d,_0x10f5de);_0x29215c['model'][_0x10f5de]=_0x21619f;const _0x7e9f68=_0x180ba0['get'](_0x10f5de);if(_0x7e9f68){const _0x23c76f=_0x27667d['get'](_0x7e9f68['userId']),_0x5558db=new z({'author':_0x23c76f,'type':_0x7e9f68['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x10f5de});_0xc38d27['unshift'](_0x5558db),_0x29215c['attributes'][_0x10f5de]['revisionHistoryAttachChange']=_0x5558db['id'];}_0x29215c['changes']=_0x29215c['changes']['concat'](_0xc38d27);}return _0x29215c;}['_markMarkers'](_0x161ef7,_0x46f7c6){for(let _0x5ecb8e=0x0;_0x5ecb8e<_0x161ef7['length'];_0x5ecb8e++)for(const [_0x4a8114,_0x472449]of _0x46f7c6)!_0x472449['isCollapsed']&&_0x472449['start']['isEqual'](_0x161ef7[_0x5ecb8e]['previousPosition'])&&_0x161ef7[_0x5ecb8e]['markersStart']['push'](_0x4a8114),_0x472449['end']['isEqual'](_0x161ef7[_0x5ecb8e]['nextPosition'])&&_0x161ef7[_0x5ecb8e]['markersEnd']['push'](_0x4a8114);}['_joinTapes'](_0x3830be,_0x464fa4){let _0x579fd2=[],_0x51c3e6=0x0,_0xade1cb=0x0;for(;_0x51c3e6<_0x3830be['length']||_0xade1cb<_0x464fa4['length'];){const _0x1b64d3=_0x3830be[_0x51c3e6]||{},_0x1e4a10=_0x464fa4[_0xade1cb]||{};if(_0x1b64d3['id']==_0x1e4a10['id'])_0x51c3e6++,_0xade1cb++,_0x579fd2['push'](_0x1b64d3);else{if(_0x1e4a10['isRemoved']&&_0x1b64d3['isAdded']){const {commonTape:_0x223f30,iEnd:_0x5dcabe,jEnd:_0x402977}=this['_threeWayMerge'](_0x3830be,_0x51c3e6,_0x464fa4,_0xade1cb);_0x579fd2=_0x579fd2['concat'](_0x223f30),_0x51c3e6=_0x5dcabe,_0xade1cb=_0x402977;}else _0x1e4a10['isRemoved']?(_0xade1cb++,_0x579fd2['push'](_0x1e4a10)):(_0x51c3e6++,_0x579fd2['push'](_0x1b64d3));}}return _0x579fd2;}['_markSuggestions'](_0x177eec,_0x263b9d){const _0x6e98ca=[];for(let _0x2fd0e3=0x0;_0x2fd0e3<_0x177eec['length'];_0x2fd0e3++){for(let _0x42a8c2=0x0;_0x42a8c2<_0x177eec[_0x2fd0e3]['markersStart']['length'];_0x42a8c2++){const _0x41a99c=_0x177eec[_0x2fd0e3]['markersStart'][_0x42a8c2];if(!_0x263b9d['has'](_0x41a99c))continue;const {group:_0xcdbfcc,type:_0x303a7d,authorId:_0x1b6b8f}=_0x1c9db3(_0x41a99c);'revision-suggestion'!=_0xcdbfcc||'insertion'!=_0x303a7d&&'deletion'!=_0x303a7d||(_0x6e98ca['unshift']({'type':_0x303a7d,'name':_0x41a99c,'userId':_0x1b6b8f}),_0x177eec[_0x2fd0e3]['markersStart']['splice'](_0x42a8c2,0x1),_0x42a8c2--);}_0x454959(_0x177eec[_0x2fd0e3]);for(let _0x13c24e=0x0;_0x13c24e<_0x177eec[_0x2fd0e3]['markersEnd']['length'];_0x13c24e++){const _0x3ea42c=_0x177eec[_0x2fd0e3]['markersEnd'][_0x13c24e];if(!_0x263b9d['has'](_0x3ea42c))continue;const {group:_0x598afd,type:_0x10825c}=_0x1c9db3(_0x3ea42c);if('revision-suggestion'!=_0x598afd||'insertion'!=_0x10825c&&'deletion'!=_0x10825c)continue;_0x177eec[_0x2fd0e3]['markersEnd']['splice'](_0x13c24e,0x1),_0x13c24e--;const _0x217de0=_0x6e98ca['findIndex'](_0x447794=>_0x447794['name']==_0x3ea42c);_0x217de0>-0x1&&_0x6e98ca['splice'](_0x217de0,0x1);}}function _0x1c9db3(_0x1f8688){const _0x37a3bb=_0x1f8688['split'](':');return{'group':_0x37a3bb[0x0],'type':_0x37a3bb[0x1],'subType':_0x37a3bb['length']>=0x5?_0x37a3bb[0x2]:null,'id':_0x37a3bb['length']<0x5?_0x37a3bb[0x2]:_0x37a3bb[0x3],'authorId':_0x37a3bb['length']<0x5?_0x37a3bb[0x3]:_0x37a3bb[0x4],'markerCount':0x6==_0x37a3bb['length']?_0x37a3bb[0x5]:null};}function _0x454959(_0x5d3fa0){for(let _0x339d6f=0x0;_0x339d6f<_0x6e98ca['length'];_0x339d6f++){if(_0x5d3fa0['isAdded']&&'insertion'==_0x6e98ca[_0x339d6f]['type']&&_0x5d3fa0['isAdded']['userId']==_0x6e98ca[_0x339d6f]['userId'])return _0x5d3fa0['isAddSuggestion']=_0x6e98ca[_0x339d6f],void delete _0x5d3fa0['isAdded'];if(!_0x5d3fa0['isAdded']&&!_0x5d3fa0['isRemoved']&&'deletion'==_0x6e98ca[_0x339d6f]['type'])return void(_0x5d3fa0['isRemoveSuggestion']=_0x6e98ca[_0x339d6f]);}}}['_setDistance'](_0x265051,_0x37b550){let _0x53f544=0x0,_0x2d56b6=!0x1;const _0xc3ca23=new Map();for(const _0x1d6c13 of _0x265051)_0x1d6c13[_0x37b550]?_0x2d56b6&&(_0x53f544++,_0x2d56b6=!0x1):(_0x53f544++,_0x2d56b6=!0x0),_0xc3ca23['set'](_0x1d6c13['id'],_0x53f544);for(let _0x224694=0x0;_0x224694<_0x265051['length'];_0x224694++){if('isRemoved'==_0x37b550&&_0x265051[_0x224694]['isAdded']||'isAdded'==_0x37b550&&_0x265051[_0x224694]['isRemoved'])continue;if('text'==_0x265051[_0x224694]['type']){_0x265051[_0x224694]['distance']=0x0;continue;}const _0x30ddcf=_0xc3ca23['get'](_0x265051[_0x224694]['pairId']),_0x3f54e7=_0xc3ca23['get'](_0x265051[_0x224694]['id']);_0x265051[_0x224694]['distance']=_0x30ddcf-_0x3f54e7;}}['_getRevisionsRange'](_0x4b6fe6,_0x3908f9,_0x597420=!0x1){const _0x168a25=[];let _0x2d3cdc=this['repository']['getIndex'](_0x4b6fe6),_0x10cba6=this['repository']['getIndex'](_0x3908f9);for(-0x1==_0x10cba6&&(_0x10cba6=this['repository']['_revisions']['length'],_0x597420=!0x1);_0x2d3cdc<_0x10cba6;)_0x168a25['push'](this['repository']['getRevision'](_0x2d3cdc)),_0x2d3cdc++;return _0x597420&&_0x168a25['push'](this['repository']['getRevision'](_0x2d3cdc)),_0x168a25;}['_threeWayMerge'](_0x5dea5f,_0x3d1082,_0x3cc8e0,_0x332dbe){const _0x53a21f=this['editor']['model']['schema'];let _0x413297=_0x3d1082;for(;_0x5dea5f[_0x413297]&&_0x5dea5f[_0x413297]['isAdded'];)_0x413297++;let _0x4fc8e6=_0x332dbe;for(;_0x3cc8e0[_0x4fc8e6]&&_0x3cc8e0[_0x4fc8e6]['isRemoved'];)_0x4fc8e6++;_0x3d4824(_0x5dea5f,_0x3d1082,_0x413297),_0x3d4824(_0x3cc8e0,_0x332dbe,_0x4fc8e6);const _0x135de8=_0x3cc8e0['slice'](_0x332dbe,_0x4fc8e6)['concat'](_0x5dea5f['slice'](_0x3d1082,_0x413297));return _0x135de8['sort']((_0x2ebf9b,_0x3482fd)=>_0x2ebf9b['side']!=_0x3482fd['side']?_0x2ebf9b['side']-_0x3482fd['side']:_0x2ebf9b['level']!=_0x3482fd['level']?_0x2ebf9b['level']-_0x3482fd['level']:_0x2ebf9b['distance']!=_0x3482fd['distance']?_0x3482fd['distance']-_0x2ebf9b['distance']:!!_0x2ebf9b['isAdded']!=!!_0x3482fd['isAdded']?-0x1==_0x2ebf9b['side']||0x0==_0x2ebf9b['side']?_0x2ebf9b['isAdded']?-0x1:0x1:_0x2ebf9b['isAdded']?0x1:-0x1:_0x2ebf9b['index']-_0x3482fd['index']),{'commonTape':_0x135de8,'iEnd':_0x413297,'jEnd':_0x4fc8e6};function _0x3d4824(_0x33b694,_0x1a1e10,_0x229227){let _0xccf5fa=-0x1,_0x20a23c=Number['POSITIVE_INFINITY'],_0x380ca6=!0x0;for(let _0x511e79=_0x1a1e10;_0x511e79<_0x229227;_0x511e79++)if(_0x53a21f['isInline'](_0x33b694[_0x511e79]['item'])||(_0x380ca6=!0x1),_0x33b694[_0x511e79]['item']['startIndex']<_0x1a1e10&&(_0xccf5fa=_0x511e79),_0x33b694[_0x511e79]['item']['endIndex']>=_0x229227){_0x20a23c=_0x511e79;break;}_0x380ca6&&(_0xccf5fa=_0x229227-0x1);for(let _0x71c4c3=_0x1a1e10;_0x71c4c3<_0x229227;_0x71c4c3++)_0x33b694[_0x71c4c3]['side']=_0x71c4c3<=_0xccf5fa?-0x1:_0x71c4c3<_0x20a23c?0x0:0x1,_0x33b694[_0x71c4c3]['index']=_0x71c4c3;let _0x4806ec=0x0;for(let _0x472691=_0x1a1e10;_0x472691<=_0xccf5fa;_0x472691++)0x0==_0x33b694[_0x472691]['distance']?_0x33b694[_0x472691]['level']=_0x4806ec:(_0x4806ec++,_0x33b694[_0x472691]['level']=_0x4806ec,_0x4806ec++);for(let _0x4537f3=_0x1a1e10;_0x4537f3<_0x229227;_0x4537f3++)0x0==_0x33b694[_0x4537f3]['side']&&(_0x33b694[_0x4537f3]['level']=_0x4806ec);_0x4806ec=0x0;for(let _0x35f238=_0x229227-0x1;_0x35f238>=_0x20a23c;_0x35f238--)0x0==_0x33b694[_0x35f238]['distance']?_0x33b694[_0x35f238]['level']=_0x4806ec:(_0x4806ec--,_0x33b694[_0x35f238]['level']=_0x4806ec,_0x4806ec--);}}['_fixObsoleteTags'](_0x14d269){const _0xc841d2=new Map(),_0x390840=this['editor']['model']['schema'];for(let _0xce902c=0x1;_0xce902c<_0x14d269['length'];_0xce902c++){let _0xc91ab3,_0x25ffc9,_0x27c50f;const _0x3b027b=_0x14d269[_0xce902c],_0x16e85d=_0x14d269[_0xce902c-0x1];if('text'==_0x3b027b['type'])continue;if(_0x3b027b['type']!=_0x16e85d['type'])continue;if(!_0x390840['isBlock'](_0x16e85d['item'])||_0x390840['isLimit'](_0x16e85d['item']))continue;if(!_0x390840['isBlock'](_0x3b027b['item'])||_0x390840['isLimit'](_0x3b027b['item']))continue;if((_0x14d269[_0xce902c]['isAdded']||_0x14d269[_0xce902c]['isAddSuggestion'])&&_0x14d269[_0xce902c-0x1]['isRemoved'])_0xc91ab3=_0x14d269[_0xce902c],_0x25ffc9=_0x14d269[_0xce902c-0x1],_0x27c50f=_0xce902c-0x1;else{if(!_0x14d269[_0xce902c]['isRemoved']||!_0x14d269[_0xce902c-0x1]['isAdded']&&!_0x14d269[_0xce902c-0x1]['isAddSuggestion'])continue;_0xc91ab3=_0x14d269[_0xce902c-0x1],_0x25ffc9=_0x14d269[_0xce902c],_0x27c50f=_0xce902c;}const _0x371da7=_0xc91ab3['level']==_0x25ffc9['level'],_0x3bee49=Math['abs'](_0xc91ab3['level'])<Math['abs'](_0x25ffc9['level'])&&0x0==_0x25ffc9['distance'];(_0x371da7||_0x3bee49)&&(_0xc841d2['set'](_0x25ffc9['id'],_0xc91ab3['id']),_0x14d269['splice'](_0x27c50f,0x1),_0xce902c--,_0xc91ab3['isAdded']=!0x1);}for(let _0x25bfdc=0x0;_0x25bfdc<_0x14d269['length'];_0x25bfdc++)_0xc841d2['has'](_0x14d269[_0x25bfdc]['pairId'])&&(_0x14d269[_0x25bfdc]['pairId']=_0xc841d2['get'](_0x14d269[_0x25bfdc]['pairId']));}['_removeMissingPairs'](_0x21616e){const _0x1f996c=new Set(_0x21616e['map'](_0x1c812b=>_0x1c812b['id']));for(let _0xa8b460=0x0;_0xa8b460<_0x21616e['length'];_0xa8b460++)_0x1f996c['has'](_0x21616e[_0xa8b460]['pairId'])||0x0==_0x21616e[_0xa8b460]['distance']||(_0x21616e[_0xa8b460]['isIncorrect']=!0x0);return _0x21616e['filter'](_0x36071d=>!_0x36071d['isIncorrect']);}['_markMismatchedRemovedTags'](_0x2acd08){const _0x1ce7ca=new Set();for(let _0x24a9ca=0x0;_0x24a9ca<_0x2acd08['length'];_0x24a9ca++){if(_0x1ce7ca['has'](_0x2acd08[_0x24a9ca]['id'])&&_0x2acd08[_0x24a9ca]['isRemoved']&&(_0x2acd08[_0x24a9ca]['isIncorrect']=!0x0),_0x2acd08[_0x24a9ca]['isIncorrect'])continue;if(0x0==_0x2acd08[_0x24a9ca]['distance'])continue;if('elementStart'!=_0x2acd08[_0x24a9ca]['type'])continue;if(null==_0x2acd08[_0x24a9ca]['pairId'])continue;let _0x3eb07d=_0x24a9ca+0x1,_0xbed670=0x0;for(;_0x2acd08[_0x3eb07d]['id']!=_0x2acd08[_0x24a9ca]['pairId'];)'elementStart'==_0x2acd08[_0x3eb07d]['type']?_0xbed670++:'elementEnd'==_0x2acd08[_0x3eb07d]['type']&&_0xbed670--,_0x3eb07d++;if(0x0!=_0xbed670){if(_0x2acd08[_0x24a9ca]['isRemoved'])_0x2acd08[_0x24a9ca]['isIncorrect']=!0x0;else{for(;_0x3eb07d!=_0x24a9ca;)_0x2acd08[_0x3eb07d]['isRemoved']&&0x0!=_0x2acd08[_0x3eb07d]['distance']&&(_0x2acd08[_0x3eb07d]['isIncorrect']=!0x0,_0x1ce7ca['add'](_0x2acd08[_0x3eb07d]['pairId'])),_0x3eb07d--;}}}return _0x2acd08['filter'](_0x240963=>!_0x240963['isIncorrect']);}['_removeUnsupportedChanges'](_0x2c7c0d){const _0x334168=this['editor']['model']['schema'];for(let _0xf32f5=0x0;_0xf32f5<_0x2c7c0d['length'];_0xf32f5++){if(!(_0x2c7c0d[_0xf32f5]['isAdded']||_0x2c7c0d[_0xf32f5]['isAddSuggestion']||_0x2c7c0d[_0xf32f5]['isRemoved']||_0x2c7c0d[_0xf32f5]['isRemoveSuggestion']))continue;if(0x0==_0x2c7c0d[_0xf32f5]['distance'])continue;const _0x43f19b=_0x2c7c0d[_0xf32f5]['item'];_0x334168['isBlock'](_0x43f19b)||_0x334168['isLimit'](_0x43f19b)||(_0x2c7c0d[_0xf32f5]['isAdded']&&delete _0x2c7c0d[_0xf32f5]['isAdded'],_0x2c7c0d[_0xf32f5]['isAddSuggestion']&&delete _0x2c7c0d[_0xf32f5]['isAddSuggestion'],_0x2c7c0d[_0xf32f5]['isRemoveSuggestion']&&delete _0x2c7c0d[_0xf32f5]['isRemoveSuggestion'],_0x2c7c0d[_0xf32f5]['isRemoved']&&(_0x2c7c0d[_0xf32f5]['isIncorrect']=!0x0));}return _0x2c7c0d['filter'](_0x34613c=>!_0x34613c['isIncorrect']);}['_makeModelFromTape'](_0x5c2396,_0x7e8888,_0x3b93dc){const _0x13237d=new _0x1ce9f9(),_0x59f2a5=[],_0x2c5336=new Map(),_0x3fb149=this['editor']['model'],_0x50cf0b=_0x3fb149['schema'],_0x4f08df=[_0x13237d],_0x176c7d={},_0x58bd59={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x503885=null;const _0x51dba2=[0x0];for(let _0x362673=0x0;_0x362673<_0x5c2396['length'];_0x362673++)if('elementStart'===_0x5c2396[_0x362673]['type']){_0x5c2396[_0x362673]['previousPosition']=_0x3fb149['createPositionFromPath'](_0x13237d,_0x51dba2);const _0x4096df=new _0x52085b(_0x5c2396[_0x362673]['item']['name'],_0x5c2396[_0x362673]['item']['getAttributes']());_0x4f08df[0x0]['_appendChild'](_0x4096df),_0x51dba2['push'](0x0),_0x4f08df['unshift'](_0x4096df),_0x5c2396[_0x362673]['nextPosition']=_0x3fb149['createPositionFromPath'](_0x13237d,_0x51dba2);}else'elementEnd'===_0x5c2396[_0x362673]['type']?(_0x4f08df['shift'](),_0x5c2396[_0x362673]['previousPosition']=_0x3fb149['createPositionFromPath'](_0x13237d,_0x51dba2),_0x51dba2['pop'](),_0x51dba2[_0x51dba2['length']-0x1]++,_0x5c2396[_0x362673]['nextPosition']=_0x3fb149['createPositionFromPath'](_0x13237d,_0x51dba2)):(_0x5c2396[_0x362673]['previousPosition']=_0x3fb149['createPositionFromPath'](_0x13237d,_0x51dba2),_0x503885?_0x503885['_data']+=_0x5c2396[_0x362673]['item']['data']:_0x503885=new _0xf8fc25(_0x5c2396[_0x362673]['item']['data'],_0x5c2396[_0x362673]['item']['getAttributes']()),_0x5c2396[_0x362673+0x1]&&'text'===_0x5c2396[_0x362673+0x1]['type']&&_0x273327(_0x503885,_0x5c2396[_0x362673+0x1]['item'])||(_0x4f08df[0x0]['_appendChild'](_0x503885),_0x503885=null),_0x51dba2[_0x51dba2['length']-0x1]+=_0x5c2396[_0x362673]['item']['offsetSize'],_0x5c2396[_0x362673]['nextPosition']=_0x3fb149['createPositionFromPath'](_0x13237d,_0x51dba2));for(let _0x4a6432=0x0;_0x4a6432<_0x5c2396['length'];_0x4a6432++){const _0x580d09=_0x5c2396[_0x4a6432]['previousPosition'],_0x1aed18=_0x5c2396[_0x4a6432]['nextPosition'];for(const _0x2893da of _0x5c2396[_0x4a6432]['markersStart'])_0x2c5336['set'](_0x2893da,{'start':_0x580d09,'end':null});_0x1ef33e('isRemoveSuggestion',_0x4a6432,_0x580d09,_0x1aed18),_0x1ef33e('isAddSuggestion',_0x4a6432,_0x580d09,_0x1aed18),_0x1ef33e('isRemoved',_0x4a6432,_0x580d09,_0x1aed18),_0x1ef33e('isAdded',_0x4a6432,_0x580d09,_0x1aed18);for(const _0x3cef63 of _0x5c2396[_0x4a6432]['markersEnd']){const _0x579416=_0x2c5336['get'](_0x3cef63);_0x579416?_0x579416['end']=_0x1aed18:_0x2c5336['set'](_0x3cef63,{'start':_0x1aed18,'end':_0x1aed18});}}for(const [_0x3c9859,_0x5de301]of _0x2c5336){const _0x443fbc=this['editor']['model']['createRange'](_0x5de301['start'],_0x5de301['end']);_0x13237d['markers']['set'](_0x3c9859,_0x443fbc);}return _0x59f2a5['sort']((_0x26735e,_0x10f9c4)=>{const _0x128444=_0x13237d['markers']['get']('revision:'+_0x26735e['id']),_0x340ea1=_0x13237d['markers']['get']('revision:'+_0x10f9c4['id']);return _0x128444['start']['isBefore'](_0x340ea1['start'])?-0x1:_0x128444['start']['isAfter'](_0x340ea1['start'])?0x1:_0x128444['end']['isBefore'](_0x340ea1['end'])?-0x1:_0x128444['end']['isAfter'](_0x340ea1['end'])?0x1:'add'===_0x26735e['type']?-0x1:0x1;}),{'root':_0x13237d,'changes':_0x59f2a5};function _0x1ef33e(_0x4662bf,_0x466a24,_0x492dd7,_0x12d0f1){const _0x5d9e6a=!!_0x5c2396[_0x466a24][_0x4662bf],_0x3ca701=_0x5d9e6a?_0x5c2396[_0x466a24][_0x4662bf]['userId']:null,_0x466618=_0x466a24===_0x5c2396['length']-0x1,_0x2ffce6=_0x58bd59[_0x4662bf][0x0],_0x35942a=_0x50cf0b['isObject'](_0x5c2396[_0x466a24]['item']);!_0x176c7d[_0x4662bf]&&_0x5d9e6a?_0x176c7d[_0x4662bf]={'start':_0x492dd7,'tapeItem':_0x5c2396[_0x466a24],'userId':_0x3ca701,'type':_0x4662bf}:_0x176c7d[_0x4662bf]&&!_0x5d9e6a?(_0x176c7d[_0x4662bf]['end']=_0x492dd7,_0x4d637c(_0x176c7d[_0x4662bf]),_0x176c7d[_0x4662bf]=null):_0x176c7d[_0x4662bf]&&_0x5d9e6a&&_0x176c7d[_0x4662bf]['userId']!==_0x3ca701&&(_0x176c7d[_0x4662bf]['end']=_0x492dd7,_0x2ffce6&&_0x2ffce6['userId']===_0x176c7d[_0x4662bf]['userId']||_0x4d637c(_0x176c7d[_0x4662bf]),_0x176c7d[_0x4662bf]={'start':_0x492dd7,'tapeItem':_0x5c2396[_0x466a24],'userId':_0x3ca701,'type':_0x4662bf}),_0x176c7d[_0x4662bf]&&_0x35942a&&('elementStart'!==_0x5c2396[_0x466a24]['type']||_0x2ffce6&&_0x2ffce6['userId']===_0x3ca701||_0x58bd59[_0x4662bf]['unshift']({'userId':_0x3ca701,'object':_0x5c2396[_0x466a24]['item'],'change':_0x176c7d[_0x4662bf]}),'elementEnd'===_0x5c2396[_0x466a24]['type']&&_0x2ffce6&&_0x2ffce6['object']===_0x5c2396[_0x466a24]['item']&&(_0x58bd59[_0x4662bf]['shift'](),_0x176c7d[_0x4662bf]=_0x2ffce6['change'])),_0x176c7d[_0x4662bf]&&_0x466618&&(_0x176c7d[_0x4662bf]['end']=_0x12d0f1,_0x4d637c(_0x176c7d[_0x4662bf]),_0x176c7d[_0x4662bf]=null);}function _0x4d637c({start:_0x2f6454,end:_0x513695,tapeItem:_0x5bb8cb,userId:_0x358b2f,type:_0x5f2aa6}){const _0x5d96b4=_0x5bb8cb['item'],_0x117dd2=_0x3fb149['schema']['isBlock'](_0x5d96b4)&&!_0x3fb149['schema']['isLimit'](_0x5d96b4),_0x501f16=_0x2f6454['nodeAfter']==_0x513695['parent']&&_0x513695['isAtStart'];if(_0x117dd2&&_0x501f16)return;const _0xcfad98=_0x3fb149['createRange'](_0x2f6454,_0x513695),_0x4c001b=_0x7e8888['get'](_0x358b2f),_0x118d4f=new z({'author':_0x4c001b,'type':'isAdded'==_0x5f2aa6||'isAddSuggestion'==_0x5f2aa6?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x5f2aa6||'isRemoveSuggestion'==_0x5f2aa6},'createdAt':new Date(),'rootName':_0x3b93dc});_0x59f2a5['push'](_0x118d4f),_0x13237d['markers']['set']('revision:'+_0x118d4f['id'],_0xcfad98);}function _0x273327(_0x46353c,_0xace61d){const _0x4218ee=_0x46353c['getAttributes'](),_0x202573=_0xace61d['getAttributes']();for(const _0x221ab7 of _0x4218ee){if(_0x221ab7[0x1]!==_0xace61d['getAttribute'](_0x221ab7[0x0]))return!0x1;_0x202573['next']();}return _0x202573['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x7f37d6=>{const _0x574f77=_0x7f37d6['markerName']['split'](':')[0x1],_0x305bc5=this['_getChangeFromId'](_0x574f77);if(!_0x305bc5)return null;const _0x58a567='add'==_0x305bc5['type']?'insertion':'deletion',_0x19bbdc=['ck-suggestion-marker','ck-suggestion-marker-'+_0x58a567];return _0x305bc5['data']['isSuggestion']&&_0x19bbdc['push']('ck-suggestion-marker-'+_0x58a567+'-new'),this['activeChange']==_0x305bc5&&_0x19bbdc['push']('ck-suggestion-marker--active'),{'classes':_0x19bbdc,'attributes':{'data-change-id':_0x574f77}};}}),this['editor']['conversion']['for']('upcast')['add'](_0xdfbe1f=>{_0xdfbe1f['on']('element:pre',(_0x275d65,_0x17caf5,_0x16d394)=>{const _0x109b13=_0x17caf5['viewItem']['getChild'](0x0);if(!_0x109b13||!_0x109b13['is']('element','code'))return;if(!_0x16d394['consumable']['consume'](_0x109b13,{'attributes':['vid_start','vid_end']}))return;const _0x14e63e=_0x17caf5['modelRange']['start']['nodeAfter'];_0x16d394['writer']['setAttribute']('vid_start',_0x109b13['getAttribute']('vid_start'),_0x14e63e),_0x16d394['writer']['setAttribute']('vid_end',_0x109b13['getAttribute']('vid_end'),_0x14e63e);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x191cff=>{_0x191cff['on']('element',(_0x1c0a5a,_0x13847b,_0x23b842)=>{if(!_0x23b842['consumable']['consume'](_0x13847b['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x13847b['modelRange']['isCollapsed'])return;const _0x130856=_0x13847b['modelRange']['start']['nodeAfter'];_0x130856['hasAttribute']('vid_start')||_0x130856['hasAttribute']('vid')||(_0x23b842['writer']['setAttribute']('vid_start',_0x13847b['viewItem']['getAttribute']('vid_start'),_0x130856),_0x23b842['writer']['setAttribute']('vid_end',_0x13847b['viewItem']['getAttribute']('vid_end'),_0x130856));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x12b724=>_0x12b724['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x28fbe7,[,_0x2ea8ac])=>{['vid_start','vid_end','vid']['includes'](_0x2ea8ac)&&(_0x28fbe7['return']=!0x0,_0x28fbe7['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0xc899db=>{_0xc899db['on']('attribute:vid',(_0x1a9108,_0x2a5d45,_0x20cc6e)=>{if('\x20'!=_0x2a5d45['item']['data']||_0x2a5d45['item']['parent']['maxOffset']>0x1)return;if(!_0x20cc6e['consumable']['consume'](_0x2a5d45['item'],_0x1a9108['name']))return;const _0x758276=_0x20cc6e['writer'],_0xd9dde8=_0x20cc6e['mapper']['toViewRange'](_0x2a5d45['range']);_0x758276['wrap'](_0xd9dde8,_0x758276['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x508451){const _0x5e5dec=_0x508451['plugins']['get']('RevisionViewer');return(_0x11fb70,_0x5be5a8,_0x29f0f5)=>{const _0x29dd62=_0x5be5a8['markerName']['split'](':')[0x1],_0x5cfa47=_0x5e5dec['_getChangeFromId'](_0x29dd62);if(!_0x5cfa47)return null;const _0x25253d='add'==_0x5cfa47['type']?'split':'merge';if(!_0x29f0f5['consumable']['test'](_0x5be5a8['markerRange'],_0x11fb70['name']))return;const _0x9185a6=_0x5be5a8['markerRange']['getWalker'](),_0x279eda=_0x5be5a8['markerRange']['start'],_0x299b00=_0x508451['model']['schema'];let _0x4280f8=null,_0x2b3b8c=null,_0x51dabf=!0x1,_0x2596cd=!0x1;for(const _0x4d44a3 of _0x9185a6){const _0x381c61=_0x4d44a3['item'];_0x51dabf=_0x51dabf||_0x299b00['isContent'](_0x381c61);const _0xc969f5=_0x29f0f5['mapper']['toViewElement'](_0x381c61);if(_0xc969f5&&_0xc969f5['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x4d44a3['type']&&(_0x299b00['isBlock'](_0x381c61)&&!_0x299b00['isLimit'](_0x381c61)&&(_0x381c61['nextSibling']||_0x279eda['isAtEnd']?_0x4280f8&&_0x4280f8['parent']==_0x381c61||(_0x4280f8=_0x381c61,_0x33d37a(_0x4d44a3['previousPosition']),_0x2596cd=!0x0):_0x2b3b8c=_0x2b3b8c||_0x4d44a3['previousPosition']));}function _0x33d37a(_0x534fd1){const _0x52fc82=_0x29f0f5['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x25253d}),_0x91a064=_0x29f0f5['mapper']['toViewPosition'](_0x534fd1);_0x5cfa47['data']['isSuggestion']&&_0x29f0f5['writer']['addClass']('ck-suggestion-marker-'+_0x25253d+'-new',_0x52fc82),_0x5e5dec['activeChange']==_0x5cfa47&&_0x29f0f5['writer']['addClass']('ck-suggestion-marker--active',_0x52fc82),_0x29f0f5['writer']['insert'](_0x91a064,_0x52fc82),_0x29f0f5['mapper']['bindElementToMarker'](_0x52fc82,_0x5be5a8['markerName']);}_0x51dabf||_0x2596cd||!_0x2b3b8c||_0x33d37a(_0x2b3b8c);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x31a4b9,_0x21569a,_0x12f9ff)=>{const _0x5e55b1=_0x12f9ff['mapper']['markerNameToElements'](_0x21569a['markerName']);if(_0x5e55b1){for(const _0x58756b of _0x5e55b1)(_0x58756b['hasClass']('ck-suggestion-marker-split')||_0x58756b['hasClass']('ck-suggestion-marker-merge'))&&(_0x12f9ff['mapper']['unbindElementFromMarkerName'](_0x58756b,_0x21569a['markerName']),_0x12f9ff['writer']['remove'](_0x58756b));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x8fb927,_0x3a58d8,_0x47da11)=>{const _0x3eb20a=_0x3a58d8['markerName']['split'](':')[0x1],_0x42f283=this['_getChangeFromId'](_0x3eb20a);if(!_0x42f283)return null;const _0x194d8f='add'==_0x42f283['type']?'split':'merge';if(_0x47da11['consumable']['test'](_0x3a58d8['markerRange'],_0x8fb927['name']))for(const _0x17f963 of _0x3a58d8['markerRange']['getItems']()){if(!_0x17f963['is']('element','softBreak'))continue;const _0x3f84ef=_0x47da11['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x194d8f}),_0x309c66=_0x47da11['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x17f963));_0x42f283['data']['isSuggestion']&&_0x47da11['writer']['addClass']('ck-suggestion-marker-'+_0x194d8f+'-new',_0x3f84ef),this['activeChange']==_0x42f283&&_0x47da11['writer']['addClass']('ck-suggestion-marker--active',_0x3f84ef),_0x47da11['writer']['insert'](_0x309c66,_0x3f84ef),_0x47da11['mapper']['bindElementToMarker'](_0x3f84ef,_0x3a58d8['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x4f4cce=>{for(const _0x2708a5 of this['editor']['model']['document']['getRootNames']()){const _0x2e3d42=this['editor']['model']['document']['getRoot'](_0x2708a5),_0x22d130=this['editor']['editing']['view']['document']['getRoot'](_0x2708a5);if(_0x22d130){const _0x3a693d=_0x2e3d42['getAttribute']('revisionHistoryAttachChange');if(_0x4f4cce['removeAttribute']('data-change-id',_0x22d130),_0x4f4cce['removeClass']('ck-revision-history-root-add',_0x22d130),_0x4f4cce['removeClass']('ck-revision-history-root-remove',_0x22d130),_0x4f4cce['removeClass']('ck-revision-history-root--active',_0x22d130),_0x3a693d){const _0x5c4cba=this['_getChangeFromId'](_0x3a693d);if(!_0x5c4cba)return null;_0x4f4cce['setAttribute']('data-change-id',_0x3a693d,_0x22d130),_0x4f4cce['addClass']('ck-revision-history-root-'+_0x5c4cba['type'],_0x22d130),this['activeChange']==_0x5c4cba&&_0x4f4cce['addClass']('ck-revision-history-root--active',_0x22d130);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x558ea6=>'revision-comment:'+_0x558ea6,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x59a0d6=>'revision-suggestion:'+_0x59a0d6,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x68d185=>({'name':'suggestion:'+_0x68d185,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x1c8abf=>{const _0xa0f9a7=_0x1c8abf['markerName']['split'](':')[0x1];return'insertion'!=_0xa0f9a7&&'deletion'!=_0xa0f9a7?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0xa0f9a7]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',J(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',J(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x2c8289,_0x435aec,_0x268152)=>{const _0x381d1a=_0x268152['mapper']['markerNameToElements'](_0x435aec['markerName']);if(_0x381d1a){for(const _0x276654 of _0x381d1a)_0x276654['is']('uiElement')&&(_0x268152['mapper']['unbindElementFromMarkerName'](_0x276654,_0x435aec['markerName']),_0x268152['writer']['remove'](_0x276654));}},{'priority':'high'});}['_getChangeFromId'](_0x57b655){return this['_changeIdToChange']['get'](_0x57b655);}['_getViewForChange'](_0x1cd46b){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new q(this['editor']['locale'],_0x1cd46b),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x5ebe1a,_0x4d6f5c,_0x1b39d9,_0x102dc2)=>{_0x102dc2&&this['_balloon']['remove'](_0x102dc2),_0x1b39d9&&(this['_balloon']['add']({'view':_0x1b39d9,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x580fe9=this['editor']['editing'],_0x126290=this['_getChangeFromId'](_0x1b39d9['changeId']);let _0x3c659c;if(_0x126290['data']['isOnRoot']){const _0x40b7eb=_0x580fe9['view']['getDomRoot'](_0x126290['rootName']);_0x3c659c=Array['from'](_0x40b7eb['getClientRects']());}else{const _0x3a162b=this['editor']['model']['markers']['get']('revision:'+_0x1b39d9['changeId']);_0x3c659c=Array['from'](_0x580fe9['mapper']['markerNameToElements'](_0x3a162b['name']))['map'](_0x2b8e8d=>_0x580fe9['view']['domConverter']['mapViewToDom'](_0x2b8e8d))['map'](_0x535354=>Array['from'](_0x535354['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x3c659c[0x0];return _0x3c659c['find'](_0x2ef267=>_0x2ef267['top']-0x3<=this['_activeViewTarget']['y']&&_0x2ef267['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x2ef267['left']-0x3<=this['_activeViewTarget']['x']&&_0x2ef267['right']+0x3>=this['_activeViewTarget']['x'])||_0x3c659c[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0xd9a207,_0x30ee76,_0x327749,_0x51cc0a)=>{this['activeView']=_0x327749?this['_getViewForChange'](_0x327749):null,this['editor']['model']['change'](()=>{const _0x36d9d6=this['editor']['editing'];_0x51cc0a&&(_0x51cc0a['data']['isOnRoot']?_0x36d9d6['view']['change'](_0x20374b=>{_0x20374b['removeClass']('ck-revision-history-root--active',_0x36d9d6['view']['document']['getRoot'](_0x51cc0a['rootName']));}):_0x36d9d6['reconvertMarker']('revision:'+_0x51cc0a['id'])),_0x327749&&(_0x327749['data']['isOnRoot']?_0x36d9d6['view']['change'](_0x1ea33b=>{_0x1ea33b['addClass']('ck-revision-history-root--active',_0x36d9d6['view']['document']['getRoot'](_0x327749['rootName']));}):_0x36d9d6['reconvertMarker']('revision:'+_0x327749['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x1d1fac,_0x505c0e)=>{if(this['activeChange'])return;const _0x5e34ad=this['_findChangeIdFromDomTarget'](_0x505c0e['target']),_0x1cdb8c=this['_changeIdToChange']['get'](_0x5e34ad);_0x1cdb8c?(this['_activeViewTarget']={'x':_0x505c0e['domEvent']['x'],'y':_0x505c0e['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x1cdb8c)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x1cfd71,_0x46f748)=>{const _0x101ad2=this['_findChangeIdFromDomTarget'](_0x46f748['target']),_0x17b17a=this['_changeIdToChange']['get'](_0x101ad2);_0x17b17a?(this['_activeViewTarget']={'x':_0x46f748['domEvent']['x'],'y':_0x46f748['domEvent']['y']},_0x17b17a===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x17b17a):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x41f45c){do{const _0x256d0f=_0x41f45c['getAttribute']('data-change-id');if(_0x256d0f)return _0x256d0f;_0x41f45c=_0x41f45c['parent'];}while(_0x41f45c);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x661caa=>{for(const _0x2b235b of this['editor']['model']['markers'])_0x661caa['removeMarker'](_0x2b235b);});}}function J(_0x211f21,_0xe3a9c1){return(_0x3885e8,_0x2e2aa1,_0x4ee3bd)=>{if(!_0x4ee3bd['consumable']['test'](_0x2e2aa1['markerRange'],_0x3885e8['name']))return;const _0x48d3cc=_0x2e2aa1['markerRange']['getWalker'](),_0x179902=_0x2e2aa1['markerRange']['start'],_0xcb12ed=_0x211f21['model']['schema'];let _0x5f3ba5=null,_0x4deb96=null,_0x350173=!0x1,_0x528200=!0x1;for(const _0x1834bc of _0x48d3cc){const _0x438c94=_0x1834bc['item'];_0x350173=_0x350173||_0xcb12ed['isContent'](_0x438c94);const _0x25ba58=_0x4ee3bd['mapper']['toViewElement'](_0x438c94);if(_0x25ba58&&_0x25ba58['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x1834bc['type']&&(_0xcb12ed['isBlock'](_0x438c94)&&!_0xcb12ed['isLimit'](_0x438c94)&&(_0x438c94['nextSibling']||_0x179902['isAtEnd']?_0x5f3ba5&&_0x5f3ba5['parent']==_0x438c94||(_0x5f3ba5=_0x438c94,_0x1926a8(_0x1834bc['previousPosition']),_0x528200=!0x0):_0x4deb96=_0x4deb96||_0x1834bc['previousPosition']));}function _0x1926a8(_0xcfd692){const _0x336d3d=_0x4ee3bd['mapper']['toViewPosition'](_0xcfd692),_0x3fd295=_0x4ee3bd['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0xe3a9c1});_0x4ee3bd['writer']['insert'](_0x336d3d,_0x3fd295),_0x4ee3bd['mapper']['bindElementToMarker'](_0x3fd295,_0x2e2aa1['markerName']);}_0x350173||_0x528200||!_0x4deb96||_0x1926a8(_0x4deb96);};}class RestoreRevisionCommand extends _0x3827ee{constructor(_0x3b81fb){super(_0x3b81fb);const _0x1e395f=_0x3b81fb['plugins']['get'](u);this['affectsData']=!0x1,this['listenTo'](_0x1e395f,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x1e395f,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x24a5f5=this['editor'],_0x2aa7b3=_0x24a5f5['plugins']['get'](u),_0x4ff059=_0x2aa7b3['isReady']?_0x2aa7b3['diff']['newRevisionId']:null;_0x24a5f5['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x4ff059);}['refresh'](){const {isReady:_0x5c2600,isEnabled:_0x4ce846,repository:_0x56d125,diff:_0x32eb36}=this['editor']['plugins']['get'](u),_0x5f2477=_0x32eb36&&_0x56d125['getLaterVisibleRevision'](_0x32eb36['newRevisionId']);this['isEnabled']=_0x5c2600&&_0x4ce846&&Boolean(_0x5f2477);}}class ShowChangeCommand extends _0x3827ee{['_step'];constructor(_0x288e65,{direction:_0x21c92b}){super(_0x288e65);const _0x279e6a=_0x288e65['plugins']['get'](u);this['affectsData']=!0x1,this['_step']='forward'===_0x21c92b?0x1:-0x1,this['listenTo'](_0x279e6a,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x279e6a,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x279e6a,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x38fedb=this['editor'],_0x3de988=_0x38fedb['plugins']['get'](u),{isNavigationMode:_0x33e7f3,currentChangeNumber:_0x53038e}=_0x3de988;let _0x1a5a82;if(_0x3de988['activeChange']=_0x33e7f3?_0x3de988['diff']['changes']['get'](_0x53038e+this['_step']):_0x3de988['diff']['changes']['first'],_0x3de988['activeChange']['data']['isOnRoot'])_0x1a5a82=_0x38fedb['editing']['view']['getDomRoot'](_0x3de988['activeChange']['rootName']);else{const _0x554f20=_0x38fedb['model']['markers']['get']('revision:'+_0x3de988['activeChange']['id']);_0x1a5a82=_0x19bc20(_0x38fedb['editing'],_0x554f20);}_0x45922d({'target':_0x1a5a82,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x42b3f9,currentChangeNumber:_0x1c5bd2,numberOfChanges:_0x353a43,isReady:_0x4b0fbf,isEnabled:_0x5d649a}=this['editor']['plugins']['get'](u);this['isEnabled']=!!(_0x5d649a&&_0x4b0fbf&&_0x353a43)&&(!_0x42b3f9||(0x1===this['_step']?_0x1c5bd2<_0x353a43-0x1:_0x1c5bd2>0x0));}}class vi extends _0x40c521{constructor(_0x3f5a61){super(_0x3f5a61);const _0x11bd00=this['bindTemplate'],_0x58e290=new _0x5ef49e(_0x3f5a61),_0x3dbd69=new _0x5ef49e(_0x3f5a61);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',(_0xd67bc4,_0x3702fa)=>_0xd67bc4&&_0x3702fa>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x5279d7,_0x1cabcc,_0x14422d,_0x3cad6c)=>{if(!_0x5279d7)return m(_0x3f5a61,'Loading...');if(!_0x14422d)return m(_0x3f5a61,'No\x20changes');const _0x3049d7=m(_0x3f5a61,'NUMBER_OF_CHANGES',_0x14422d);return _0x3cad6c?m(_0x3f5a61,'X_OF_Y_CHANGES',[_0x1cabcc+0x1,_0x14422d]):_0x3049d7;}),_0x58e290['set']({'label':m(_0x3f5a61,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x3cb497}),_0x3dbd69['set']({'label':m(_0x3f5a61,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x40e3f4}),_0x58e290['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x3dbd69['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x58e290['on']('execute',()=>this['fire']('execute','backward')),_0x3dbd69['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',_0x11bd00['if']('_isStatusLabelVisible','ck-hidden',_0x282dd4=>!_0x282dd4)]},'children':[{'text':_0x11bd00['to']('isNavigationMode',_0x59abe3=>_0x59abe3?m(_0x3f5a61,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x3f5a61,'Total')+':\x20')}]},{'text':_0x11bd00['to']('_statusText')}]},new _0x10c063(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x58e290,_0x3dbd69]}]});}}const oe='ck-editor__editable__loading-overlay';class li extends _0x4a8c90{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x389ff7=this['editor']['editing']['view'];_0x389ff7['change'](_0x5b6594=>{for(const _0x2b5d9e of _0x389ff7['document']['roots'])_0x5b6594['addClass'](oe,_0x2b5d9e);});}['hide'](){const _0x4bc7b8=this['editor']['editing']['view'];_0x4bc7b8['change'](_0x490428=>{for(const _0x154df5 of _0x4bc7b8['document']['roots'])_0x490428['removeClass'](oe,_0x154df5);});}}class v extends _0x4a8c90{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,li];}['init'](){const _0x41339f=this['editor'],_0x4950a6=_0x41339f['plugins']['get'](u),_0x4de677=_0x41339f['plugins']['get'](li);_0x41339f['ui']['componentFactory']['add']('exitToEditing',_0x1dbd89=>{const _0x56c2e4=new _0x5ef49e(_0x1dbd89);return _0x56c2e4['set']({'label':m(_0x1dbd89,'Back\x20to\x20editing'),'icon':_0x11f04f,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x56c2e4,'execute',()=>{_0x41339f['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x56c2e4;}),_0x41339f['ui']['componentFactory']['add']('restoreRevision',_0x558743=>{const _0x532650=new _0x5ef49e(_0x558743);return _0x532650['set']({'label':m(_0x558743,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x532650['bind']('isEnabled')['to'](_0x41339f['commands']['get']('restoreRevision')),this['listenTo'](_0x532650,'execute',()=>_0x41339f['execute']('restoreRevision')),_0x532650;}),_0x41339f['ui']['componentFactory']['add']('changesNavigation',_0x4ce4a5=>{const _0xdd9f29=new vi(_0x4ce4a5),_0x1f95e3=_0x41339f['commands']['get']('showPreviousChange'),_0xc463f6=_0x41339f['commands']['get']('showNextChange');return _0xdd9f29['bind']('isBackwardNavigationEnabled')['to'](_0x1f95e3,'isEnabled'),_0xdd9f29['bind']('isForwardNavigationEnabled')['to'](_0xc463f6,'isEnabled'),_0xdd9f29['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x4950a6),this['listenTo'](_0xdd9f29,'execute',(_0x4fc60d,_0x4b0b3a)=>{_0x41339f['execute']('forward'===_0x4b0b3a?'showNextChange':'showPreviousChange');}),_0xdd9f29;}),_0x4de677['show'](),_0x4950a6['on']('change:isReady',(_0x15482b,_0x5f0575,_0x8c8c20)=>{_0x8c8c20?_0x4de677['hide']():_0x4de677['show']();});}}class oi extends et{['_resizeObserver']=null;constructor(_0x544127,_0xcf2d9d){super(_0x544127,_0xcf2d9d);const _0x5393a0=this['bindTemplate'];this['set']({'label':m(_0x544127,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x544127,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x5393a0['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new ot(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x13f9c9=this['fieldView']['element'];this['_tooltipString']=_0x13f9c9['scrollWidth']>_0x13f9c9['clientWidth']&&_0x13f9c9['value']||'';}}class hi extends _0x40c521{constructor(_0x59990b,_0x54134b,_0x2a16ea){super(_0x59990b);const _0x37270e=new _0x2ac228();_0x37270e['set']({'content':_0x1ba202,'viewBox':'0\x200\x2011\x2010'});const _0x45ed7a=['ck','ck-revision-history-sidebar__revision-author'];_0x2a16ea&&_0x45ed7a['push']('ck-revision-history-sidebar__revision-author_creator');const _0x5b890a=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x59990b,_0x2a16ea?'Revision\x20creator':'Revision\x20author')},'children':[_0x37270e,_0x54134b['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x45ed7a},'children':_0x5b890a});}}function ci(_0x10f75a,_0x452113){const _0xb2685d=_0x10f75a['bindTemplate'],_0x482aa1=_0x10f75a['locale'],_0x1cda49=_0x1ba734(_0x482aa1);_0x1cda49['panelPosition']='sw';const _0x57ff8b=function(_0x23f38e,_0x412cdd){const _0x2f3410=function(_0x1e0ead,_0xb0a7cf){const _0x21737c=_0x1e0ead['locale'],_0x5adae3={'Compare\x20against\x20selected':m(_0x21737c,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x21737c,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x21737c,'Restore\x20this\x20revision')};return _0xb0a7cf['map'](_0xfcd229=>{const _0x5d6f6d=_0x5adae3[_0xfcd229['name']];return _0x5d6f6d&&_0x5d6f6d!==_0xfcd229['name']&&(_0xfcd229['name']=_0x5d6f6d),_0xfcd229;});}(_0x23f38e,_0x412cdd),_0x4e4aff=new _0x1a777e();for(const _0x1ff547 of _0x2f3410){const _0xf6e726={'type':'button','model':new to({'label':_0x1ff547['name'],'class':_0x1ff547['class'],'withText':!0x0,'role':'menuitem','_action':_0x1ff547['action']})};_0xf6e726['model']['bind']('isEnabled')['to'](_0x23f38e,'isActionsDropdownOpen',_0xcbbb84=>'function'!=typeof _0x1ff547['isEnabled']||(!_0xcbbb84||_0x1ff547['isEnabled'](_0x23f38e))),_0x4e4aff['add'](_0xf6e726);}return _0x4e4aff;}(_0x10f75a,_0x452113);return _0x10f75a['bind']('isActionsDropdownOpen')['to'](_0x1cda49,'isOpen'),_0x1cda49['buttonView']['set']({'label':m(_0x482aa1,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x1395ab}),_0x1cda49['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0xb2685d['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0xb2685d['to'](_0x56b70e=>_0x56b70e['stopPropagation']())}}),_0x1cda49['on']('execute',_0x3e3df4=>{_0x10f75a['isReady']&&'function'==typeof _0x3e3df4['source']['_action']&&_0x3e3df4['source']['_action'](_0x10f75a);}),_0x4dfe4b(_0x1cda49,_0x57ff8b,{'role':'menu'}),_0x1cda49['listenTo'](_0x10f75a,'change:isActionsDropdownOpen',(_0x2b9a39,_0x2bb61a,_0x17050b)=>{if(_0x17050b)for(const _0x5082e9 of _0x1cda49['listView']['items']){const _0x855856=_0x5082e9['children']['first'],_0x1cef2b=_0x452113['find'](_0x5c94f9=>_0x5c94f9['action']===_0x855856['_action'])['isVisible'];_0x5082e9['isVisible']=void 0x0===_0x1cef2b||_0x1cef2b(_0x10f75a);}}),_0x1cda49;}class _i extends/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x3ba967(_0x40c521){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x3e81a1,_0x272b59,_0x508940,_0x11d2bd){super(_0x3e81a1);const _0x5d455e=this['bindTemplate'],_0x35cb84=function(_0xaac96b,_0x4f26c0){const _0x2c73ef=Array['from'](_0x4f26c0['authors'])['filter'](_0xf29a03=>_0xf29a03!=_0x4f26c0['creator']);return _0x4f26c0['creator']&&_0x2c73ef['unshift'](_0x4f26c0['creator']),_0x2c73ef['map'](_0x5d8b92=>new hi(_0xaac96b,_0x5d8b92,_0x5d8b92==_0x4f26c0['creator']));}(_0x3e81a1,_0x272b59);this['id']=_0x272b59['id'],this['_revision']=_0x272b59,this['_requireRevisionName']=_0x11d2bd,this['bind']('name','createdAt')['to'](_0x272b59),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x235340=>{return _0x1f4db5=_0x3e81a1['uiLanguage'],(_0x48fe29=_0x235340)['toLocaleDateString'](_0x1f4db5,{'month':'long','day':'numeric'})+',\x20'+_0x48fe29['toLocaleTimeString'](_0x1f4db5,{'hour':'numeric','minute':'numeric'});var _0x1f4db5,_0x48fe29;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new oi(_0x3e81a1,ti),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x179248=>_0x179248||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x5bfe71,_0x1869fb)=>_0x5bfe71&&_0x1869fb),this['revisionActionsView']=_0x508940&&_0x508940['length']?ci(this,_0x508940):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x5d455e['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x5d455e['if']('isEnabled','ck-disabled',_0x168d5d=>!_0x168d5d),_0x5d455e['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x5d455e['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x5d455e['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':_0x5d455e['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':_0x35cb84}]},this['revisionActionsView']],'on':{'click':_0x5d455e['to'](_0x418c91=>{_0x418c91['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x42f078=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x42f078,'change',()=>{this['_requireRevisionName']&&!_0x42f078['value']||this['fire']('setName',{'id':this['id'],'name':_0x42f078['value']}),_0x42f078['value']||(_0x42f078['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function bi(_0x701260,_0x45ec64){const _0x5a3263=_0x25aed0['fromJSDate'](_0x701260)['setLocale'](_0x45ec64),_0x3bb2f5=_0x25aed0['local'](),_0x3c41dc=_0x3bb2f5['minus']({'days':0x1})['startOf']('day');let _0x4e4f0f,_0x1315f8;return _0x5a3263['hasSame'](_0x3bb2f5,'day')?(_0x4e4f0f=_0x5a3263['startOf']('day')['toJSDate'](),_0x1315f8=_0x5a3263['toRelativeCalendar']()):_0x5a3263['hasSame'](_0x3c41dc,'day')?(_0x4e4f0f=_0x3c41dc['toJSDate'](),_0x1315f8=_0x5a3263['toRelativeCalendar']()):_0x5a3263['hasSame'](_0x3bb2f5,'week')?(_0x4e4f0f=_0x5a3263['startOf']('week')['toJSDate'](),_0x1315f8=_0x5a3263['weekdayLong']||''):_0x5a3263['hasSame'](_0x3bb2f5,'year')?(_0x4e4f0f=_0x5a3263['startOf']('month')['toJSDate'](),_0x1315f8=_0x5a3263['monthLong']||''):(_0x4e4f0f=_0x5a3263['startOf']('year')['toJSDate'](),_0x1315f8=String(_0x5a3263['year'])),{'startDate':_0x4e4f0f,'localizedPeriodName':_0x1315f8};}class ji extends _0x40c521{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x33372d,_0x38c3f7,_0x44b01e,_0x9bc007){super(_0x33372d);const _0x12a66c=bi(_0x38c3f7,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x38c3f7,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x44b01e,this['_requireRevisionName']=_0x9bc007,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':_0x12a66c}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x37d095){const _0xce40d1=new _i(this['locale'],_0x37d095,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0xce40d1);}['removeRevision'](_0x7fc096){const _0x572d29=this['revisionViews']['find'](_0x2f9fd2=>_0x2f9fd2['id']===_0x7fc096['id']);this['revisionViews']['remove'](_0x572d29);}}class Ni extends _0x40c521{constructor(_0x79a2){super(_0x79a2);const _0x2c408f=new _0x2ac228();_0x2c408f['content']=_0x3c6bb0,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x2c408f,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[m(_0x79a2,'Revision\x20history')]}]});}}class Ri extends _0x40c521{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x5cfb80,_0x119213,_0x48f4b6,_0x15f18e){super(_0x5cfb80);const _0xcd1c06=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x119213,this['_revisionActions']=_0x48f4b6,this['_requireRevisionName']=_0x15f18e,this['on']('select',(_0x393d1e,_0x14e7ad)=>{this['fire']('revisionSelected',_0x14e7ad);}),this['on']('setName',(_0xf30a20,_0x359c03)=>{this['fire']('revisionSetName',_0x359c03);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new Ni(_0x5cfb80),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0xcd1c06['if']('isEnabled','ck-disabled',_0x38585b=>!_0x38585b)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x26c431 of this['_revisions'])this['_addRevision'](_0x26c431);this['_revisions']['on']('add',(_0x74151,_0x3532c7)=>{this['_addRevision'](_0x3532c7);}),this['_revisions']['on']('remove',(_0x4f225b,_0x31d1ff)=>{this['_removeRevision'](_0x31d1ff);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x16f0f2=>_0x16f0f2['revisionViews']['map'](_0xb64530=>_0xb64530))['flat']();}['selectRevision'](_0x421868){for(const _0x38c134 of this['revisionViews'])_0x421868&&_0x421868['id']===_0x38c134['id']?_0x38c134['select']():_0x38c134['deselect']();}['highlightRevisions'](_0x3f0717){for(const _0x62da0d of this['revisionViews'])_0x3f0717['some'](({id:_0x3febdc})=>_0x3febdc===_0x62da0d['id'])?_0x62da0d['highlight']():_0x62da0d['unhighlight']();}['_addRevision'](_0x36f9e2){const _0x4d6af5=bi(_0x36f9e2['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x1bdb0b=this['timePeriodViews']['get'](0x0);_0x1bdb0b&&_0x1bdb0b['startDate']['getTime']()===_0x4d6af5['getTime']()||(_0x1bdb0b=new ji(this['locale'],_0x4d6af5,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x1bdb0b)),_0x1bdb0b['addRevision'](_0x36f9e2);}['_removeRevision'](_0x8c8a54){const _0x17102c=bi(_0x8c8a54['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x17102c)['removeRevision'](_0x8c8a54);}['_getTimePeriodViewByStartDate'](_0x25fc21){return this['timePeriodViews']['find'](_0x487dde=>_0x487dde['startDate']['getTime']()===_0x25fc21['getTime']());}}class d extends _0x4a8c90{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
|
|
28
28
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
|
|
29
|
-
nt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}constructor(
|
|
30
|
-
_0x14531e(_0x2daf9f){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x140fb9,_0x4100cd){super(_0x4100cd),this['sourceElement']=_0x140fb9,this['model']['document']['createRoot']();const _0x6d6569=new Z(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Y(this,_0x6d6569);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x72d515,_0x38b497){const _0x2df430=new this(_0x72d515,_0x38b497);return await _0x2df430['initPlugins'](),await _0x2df430['ui']['init'](_0x72d515),await _0x2df430['data']['init'](_0x2df430['config']['get']('initialData')||''),_0x2df430['fire']('ready'),_0x2df430;}}const p=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];class RevisionViewerIntegration extends _0x5ac587{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3067fb){function _0x540395(_0x2f05c0){return _0x2f05c0['map'](_0x31ab71=>String['fromCharCode'](_0x31ab71))['join']('');}super(_0x3067fb),this['result']='end',_0x3067fb[_0x540395([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x540395([0x76,0x69,0x65,0x77])][_0x540395([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x540395([0x61,0x75,0x74,0x6f]),_0x3067fb[_0x540395([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x540395([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x540395([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x540395([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x540395([0x6f,0x6b])});}}class RevisionHistory extends _0x5ac587{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h,l];}constructor(_0x16c2ab){if(super(_0x16c2ab),!this['editor']['config']['get']('revisionHistory'))throw new _0x49908e('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x3e1459=>this['_showRevisionViewer']({..._0x3e1459,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x302764=>this['_closeRevisionViewer'](_0x302764)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x541085=>this['_restoreRevision'](_0x541085)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x1ab2a6){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x1ab2a6;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x5bf19b){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x5bf19b);}['getRevision'](_0x4431b6){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x4431b6);}['getRevisions'](_0x2e6e28){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x2e6e28||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x7df6d5=this['editor'],_0x5b422e=_0x5d6dc8(_0x7df6d5,p),_0x261758=_0x7df6d5['plugins']['get']('RevisionTracker'),_0x5b1ace=_0x7df6d5['plugins']['get']('Users')['users'];return _0x5b422e['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x5b422e['lazyRoots'],(_0x5b422e['plugins']['push'](RevisionViewerIntegration,u,v,class RevisionViewerInit extends _0x5ac587{static get['requires'](){return[u,'Users'];}['init'](){const _0x35d4a6=this['editor']['plugins']['get']('Users');for(const _0x2ed163 of _0x5b1ace)_0x2ed163['isAnonymous']||_0x35d4a6['getUser'](_0x2ed163['id'])||_0x35d4a6['addUser'](_0x2ed163);const _0x4c6ecb=_0x261758['repository']['getRevisions']();let _0x4e168b=null;const _0x40f6a7=this['editor']['plugins']['get']('RevisionViewer');_0x40f6a7['adapter']=_0x261758['adapter'],_0x40f6a7['bind']('isEnabled')['to'](_0x261758),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x7df6d5,'isReadOnly',_0x2b60e9=>!_0x2b60e9);for(const _0x1be185 of _0x4c6ecb){const _0x1997bf=null===_0x1be185['creator'];if(_0x1997bf&&_0x1be185['toVersion']===_0x1be185['fromVersion'])continue;const _0xefbff7=_0x1be185['toJSON']();_0x40f6a7['addRevisionData'](_0xefbff7,(_0x212125,_0x3fa893,_0x115c32)=>{if(_0x1997bf){if(_0x4e168b)_0x4e168b['_update'](_0x212125,_0x3fa893);else{if(!_0x3fa893){const _0x4a3380=_0x115c32['toJSON']();_0x4a3380['id']=_0x8d6220(),_0x261758['saveRevision'](_0x4a3380,_0x115c32['toVersion'])['then'](_0x5be1aa=>{_0x4e168b=_0x5be1aa;});}}}else _0x1be185['_update'](_0x212125,_0x3fa893);});}}},d),_0x5b422e);}['_enhanceShowRevisionViewerCallback'](){const _0x5e45ec=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x3751e4=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x59454e=this['editor']['plugins']['get']('Autosave');await _0x59454e['save']();}else await _0x3751e4['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x3bfd95=this['editor']['plugins']['get']('Dialog');_0x3bfd95['isOpen']&&_0x3bfd95['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x518633=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x1108d9 of _0x518633)_0x1108d9['class']=_0x1108d9['class']?_0x1108d9['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x35d28d=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x35d28d&&_0x35d28d['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0xfe3176=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0xfe3176&&_0xfe3176['setAttribute']('tabindex','-1');}}const _0x476a7f=this['_getRevisionViewerEditorConfig']();return _0x5e45ec(_0x476a7f)['then'](_0x4876ee=>{return(this['_viewerEditor']=_0x4876ee,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'),_0x4876ee);})['catch'](_0x103d6b=>(console['error'](_0x103d6b),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x49490e=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 _0x3b066b=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x11dbbd of _0x3b066b)_0x11dbbd['class']='ck-tab-panel_disabled'===_0x11dbbd['class']?'':_0x11dbbd['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0xaa2f94=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0xaa2f94&&_0xaa2f94['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x841191=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x841191&&_0x841191['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x49490e(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x41bbbc=this['editor']['plugins']['get']('Annotations');_0x41bbbc['refreshVisibility'](),_0x41bbbc['refreshPositioning']();}});});}['_showRevisionViewer'](_0x330c49){const _0x5737d2=this['editor']['config']['get']('revisionHistory.editorContainer'),_0xb393f1=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x482817=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return f['create'](_0x482817,_0x330c49)['then'](_0x4fe4f2=>(_0xb393f1['style']['display']='block',_0x5737d2['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x4fe4f2));}['_closeRevisionViewer'](_0x29da3f){const _0x30ef07=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x30ef07['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x29da3f['destroy']();}async['_restoreRevision'](_0x3ac97f){const _0x11873f=this['editor'],_0x3871fd=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x158ce2=_0x11873f['plugins']['get']('RevisionTracker'),_0x131650=_0x11873f['plugins']['get']('RevisionHistoryUtils'),_0x5d02a0=_0x3871fd['repository']['getRevision'](_0x3ac97f);let _0x1a8d7e,_0x5204a5,_0x45af7c;try{await _0x131650['loadRevisionData'](_0x5d02a0,this['adapter']),_0x1a8d7e=_0x131650['getRevisionDocumentData'](_0x5d02a0),_0x5204a5=_0x131650['getRevisionRootsAttributes'](_0x5d02a0);}catch(_0x47a9b7){return void console['error'](_0x47a9b7);}_0x11873f['model']['change'](_0x42538d=>{for(const _0x2d6067 of Array['from'](_0x11873f['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x42538d['removeMarker'](_0x2d6067);}),_0x3871fd['isReady']=!0x1,_0x11873f['model']['enqueueChange'](_0x94261e=>{_0x94261e['setSelection'](null),_0x94261e['removeSelectionAttribute'](_0x11873f['model']['document']['selection']['getAttributeKeys']());const _0x575f89=Object['keys'](_0x1a8d7e);for(const _0x4a1747 of _0x11873f['model']['document']['roots'])'$graveyard'!=_0x4a1747['rootName']&&_0x4a1747['isAttached']()&&!_0x575f89['includes'](_0x4a1747['rootName'])&&_0x94261e['detachRoot'](_0x4a1747);for(const _0x5cee67 of _0x575f89){let _0x327df3=_0x11873f['model']['document']['getRoot'](_0x5cee67);_0x327df3&&_0x327df3['isAttached']()||(_0x327df3=_0x94261e['addRoot'](_0x5cee67));const _0x2aa642=_0x5204a5[_0x5cee67],_0x1ff3de=Object['keys'](_0x2aa642),_0x540e27=_0x1a8d7e[_0x5cee67];for(const _0x415296 of _0x327df3['getAttributeKeys']())_0x1ff3de['includes'](_0x415296)||_0x94261e['removeAttribute'](_0x415296,_0x327df3);for(const _0xe2fac0 of _0x1ff3de)_0x94261e['setAttribute'](_0xe2fac0,_0x5204a5[_0x5cee67][_0xe2fac0],_0x327df3);_0x94261e['remove'](_0x94261e['createRangeIn'](_0x327df3)),_0x94261e['insert'](_0x11873f['data']['parse'](_0x540e27,_0x327df3),_0x327df3,0x0);}});const _0x233b03=m(_0x11873f['locale'],'Restored');if(_0x5d02a0['name'])_0x45af7c=-0x1==_0x5d02a0['name']['indexOf'](_0x233b03)?_0x233b03+':\x20'+_0x5d02a0['name']:_0x5d02a0['name'];else _0x45af7c=_0x233b03+':\x20'+(_0x5d02a0['createdAt']['toLocaleDateString'](_0x11873f['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x5d02a0['createdAt']['toLocaleTimeString'](_0x11873f['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x158ce2['saveRevision']({'name':_0x45af7c}),_0x3871fd['isReady']=!0x0,_0x11873f['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{RestoreRevisionCommand,I as Revision,RevisionHistory,l as RevisionHistoryUI,$ as RevisionHistoryUtils,h as RevisionTracker,u as RevisionViewer,f as RevisionViewerEditor,RevisionViewerIntegration,fi as RevisionViewerLoadingOverlay,v as RevisionViewerUI,S as RevisionsRepository,d as RevisionsSidebar,ShowChangeCommand};
|
|
29
|
+
nt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}constructor(_0x1e4fa4){super(_0x1e4fa4),this['_revisionViewer']=_0x1e4fa4['plugins']['get'](u),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x5146cd=this['_revisionsRepository']['_revisions'],_0x2491c1=this['_createRevisionActions'](),_0x4c789d=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new Ri(this['editor']['locale'],_0x5146cd,_0x2491c1,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',(_0x48dcc8,_0x590368)=>{_0x590368['revisionViews']['on']('add',(_0x12051e,_0x20a92b)=>{_0x20a92b['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)),_0x4c789d['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x2557bd=this['_revisionsRepository']['getRevision'](0x0);if(_0x2557bd){const _0x2a5832=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x2557bd['id']);this['_revisionViewer']['compare'](_0x2557bd,_0x2a5832);}}['_handleRevisionSelected'](_0x2eff2c,_0x1e629d){const _0x21c0f1=this['_revisionsRepository']['getRevision'](_0x1e629d['id']),_0x2b585c=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x21c0f1['id']);this['_revisionViewer']['compare'](_0x21c0f1,_0x2b585c);}['_handleRevisionSetName'](_0x58f00b,_0x1c3a34){this['_revisionsRepository']['getRevision'](_0x1c3a34['id'])['setName'](_0x1c3a34['name']);}['_handleDiffChange'](_0x55305e,_0x1a5017,_0x4e492f){const _0x4d9d78=this['_revisionsRepository']['getRevisionsInDiff'](_0x4e492f);_0x4d9d78['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x4d9d78),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x4d9d78[0x0]));}['_createRevisionActions'](){const _0xac4358=this['editor'],_0x52850f=d['availableRevisionActions'],_0x3ccc90=_0xac4358['config']['get']('revisionHistory.revisionActions')||d['defaultRevisionActions'];if(_0x3ccc90['length'])return _0x3ccc90['map'](_0x1b0b41=>{const _0x1a5acf='string'==typeof _0x1b0b41?Object['assign']({},_0x52850f[_0x1b0b41]):_0x1b0b41;return _0x1a5acf['action']=_0x1a5acf['action']['bind'](this,_0xac4358),_0x1a5acf['isVisible']&&(_0x1a5acf['isVisible']=_0x1a5acf['isVisible']['bind'](this,_0xac4358)),_0x1a5acf;});}}function nt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x426e36},_0x39f34e)=>{const _0xd3cc98=_0x426e36['get'](u),_0x32a23b=_0xd3cc98['repository'];let _0x3c1b6c=_0xd3cc98['diff']['newRevisionId'],_0x616a98=_0x39f34e['id'];_0x32a23b['getIndex'](_0x3c1b6c)>_0x32a23b['getIndex'](_0x616a98)&&([_0x3c1b6c,_0x616a98]=[_0x616a98,_0x3c1b6c]),_0xd3cc98['compare'](_0x3c1b6c,_0x616a98);},'isVisible':({plugins:_0x2bb87b},_0x57fdeb)=>{const _0xa6ed82=_0x2bb87b['get'](u);return!(_0xa6ed82['repository']['getRevisionsInDiff'](_0xa6ed82['diff'])['length']>0x2)&&!_0x57fdeb['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x7d3761,{id:_0x4f8a8f})=>{_0x7d3761['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x4f8a8f);},'isVisible':({plugins:_0x3f915b},_0x57af2a)=>!!_0x3f915b['get'](u)['repository']['getLaterVisibleRevision'](_0x57af2a['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x3b8cde},{id:_0x5621e1,revisionNameView:_0x5abc55})=>{const _0x5ee446=_0x3b8cde['get'](u),_0x223f00=_0x5ee446['repository']['getEarlierVisibleRevision'](_0x5621e1);_0x5ee446['compare'](_0x5621e1,_0x223f00),_0x5abc55['focus'](),_0x5abc55['fieldView']['select']();}}};}class Y extends tt{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x5ad02d,_0x105608){super(_0x5ad02d),this['_view']=_0x105608,this['_toolbarConfig']=st(_0x5ad02d['config']['get']('toolbar')),this['_elementReplacer']=new it();}get['element'](){return this['view']['element'];}['init'](_0x4084d4){const _0x2c5c2e=this['editor'],_0x56b76e=this['view'],_0x3b706d=_0x2c5c2e['editing']['view'],_0x7649cb=_0x56b76e['editable'],_0x146046=_0x3b706d['document']['getRoot']();_0x7649cb['name']=_0x146046['rootName'],_0x56b76e['render']();const _0x5985dc=_0x7649cb['element'];this['setEditableElement'](_0x7649cb['name'],_0x5985dc),_0x56b76e['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x3b706d['attachDomRoot'](_0x5985dc),this['_elementReplacer']['replace'](_0x4084d4,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x2f3219=this['view'],_0x5825bd=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x5825bd['detachDomRoot'](_0x2f3219['editable']['name']),_0x2f3219['destroy']();}['_initToolbar'](){const _0x120fd4=this['view'];_0x120fd4['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x120fd4['stickyPanel']['limiterElement']=_0x120fd4['element'],_0x120fd4['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x405ef9})=>_0x405ef9),_0x120fd4['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x120fd4['toolbar']);}}class Z extends _0x128430{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x17933c,_0x1ced00,_0x64ce01={}){super(_0x17933c),this['stickyPanel']=new _0x267a23(_0x17933c),this['toolbar']=new _0xfb0dfe(_0x17933c,{'shouldGroupWhenFull':_0x64ce01['shouldToolbarGroupWhenFull']}),this['_editable']=new te(_0x17933c,_0x1ced00);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class f extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x463672(_0x2f882c){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x73cab5,_0x3d6a1a){super(_0x3d6a1a),this['sourceElement']=_0x73cab5,this['model']['document']['createRoot']();const _0x43b682=new Z(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Y(this,_0x43b682);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x2f8c0c,_0x5c1d77){const _0x3cb938=new this(_0x2f8c0c,_0x5c1d77);return await _0x3cb938['initPlugins'](),await _0x3cb938['ui']['init'](_0x2f8c0c),await _0x3cb938['data']['init'](_0x3cb938['config']['get']('initialData')||''),_0x3cb938['fire']('ready'),_0x3cb938;}}const p=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];class RevisionViewerIntegration extends _0x4a8c90{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x41ec76){function _0x4436d2(_0x10a356){return _0x10a356['map'](_0x228152=>String['fromCharCode'](_0x228152))['join']('');}super(_0x41ec76),this['result']='end',_0x41ec76[_0x4436d2([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4436d2([0x76,0x69,0x65,0x77])][_0x4436d2([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4436d2([0x61,0x75,0x74,0x6f]),_0x41ec76[_0x4436d2([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x4436d2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4436d2([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x4436d2([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x4436d2([0x6f,0x6b])});}}class RevisionHistory extends _0x4a8c90{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h,l];}constructor(_0x41f274){if(super(_0x41f274),!this['editor']['config']['get']('revisionHistory'))throw new _0x582d87('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x47a776=>this['_showRevisionViewer']({..._0x47a776,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0xde6a4=>this['_closeRevisionViewer'](_0xde6a4)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x94d51a=>this['_restoreRevision'](_0x94d51a)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x28bf27){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x28bf27;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x4f622){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x4f622);}['getRevision'](_0x4e8c4a){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x4e8c4a);}['getRevisions'](_0x239120){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x239120||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x439652=this['editor'],_0x2e31b1=_0x1265da(_0x439652,p),_0x37bb31=_0x439652['plugins']['get']('RevisionTracker'),_0x351407=_0x439652['plugins']['get']('Users')['users'];return _0x2e31b1['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x2e31b1['lazyRoots'],(_0x2e31b1['plugins']['push'](RevisionViewerIntegration,u,v,class RevisionViewerInit extends _0x4a8c90{static get['requires'](){return[u,'Users'];}['init'](){const _0x5055ca=this['editor']['plugins']['get']('Users');for(const _0x46746f of _0x351407)_0x46746f['isAnonymous']||_0x5055ca['getUser'](_0x46746f['id'])||_0x5055ca['addUser'](_0x46746f);const _0x34b4d0=_0x37bb31['repository']['getRevisions']();let _0x1d55c1=null;const _0x4571bb=this['editor']['plugins']['get']('RevisionViewer');_0x4571bb['adapter']=_0x37bb31['adapter'],_0x4571bb['bind']('isEnabled')['to'](_0x37bb31),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x439652,'isReadOnly',_0x5b3780=>!_0x5b3780);for(const _0x4eee8b of _0x34b4d0){const _0x1a3537=null===_0x4eee8b['creator'];if(_0x1a3537&&_0x4eee8b['toVersion']===_0x4eee8b['fromVersion'])continue;const _0x358397=_0x4eee8b['toJSON']();_0x4571bb['addRevisionData'](_0x358397,(_0x399c9b,_0x2f4417,_0x458b0f)=>{if(_0x1a3537){if(_0x1d55c1)_0x1d55c1['_update'](_0x399c9b,_0x2f4417);else{if(!_0x2f4417){const _0xf28000=_0x458b0f['toJSON']();_0xf28000['id']=_0x2e73e2(),_0x37bb31['saveRevision'](_0xf28000,_0x458b0f['toVersion'])['then'](_0x428bee=>{_0x1d55c1=_0x428bee;});}}}else _0x4eee8b['_update'](_0x399c9b,_0x2f4417);});}}},d),_0x2e31b1);}['_enhanceShowRevisionViewerCallback'](){const _0x5607a1=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0xed0cc8=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x1af23a=this['editor']['plugins']['get']('Autosave');await _0x1af23a['save']();}else await _0xed0cc8['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x315fd9=this['editor']['plugins']['get']('Dialog');_0x315fd9['isOpen']&&_0x315fd9['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x33431c=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x5bcec4 of _0x33431c)_0x5bcec4['class']=_0x5bcec4['class']?_0x5bcec4['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x2db546=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x2db546&&_0x2db546['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x179294=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x179294&&_0x179294['setAttribute']('tabindex','-1');}}const _0x28c34b=this['_getRevisionViewerEditorConfig']();return _0x5607a1(_0x28c34b)['then'](_0x3c729e=>{return(this['_viewerEditor']=_0x3c729e,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'),_0x3c729e);})['catch'](_0x59cea5=>(console['error'](_0x59cea5),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0xcc3d6=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 _0x187469=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x33fc07 of _0x187469)_0x33fc07['class']='ck-tab-panel_disabled'===_0x33fc07['class']?'':_0x33fc07['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x42e35d=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x42e35d&&_0x42e35d['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x22fc42=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x22fc42&&_0x22fc42['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0xcc3d6(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x366fc2=this['editor']['plugins']['get']('Annotations');_0x366fc2['refreshVisibility'](),_0x366fc2['refreshPositioning']();}});});}['_showRevisionViewer'](_0x137bc0){const _0x3d0acb=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x96f38a=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x26a6c8=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return f['create'](_0x26a6c8,_0x137bc0)['then'](_0x194b9c=>(_0x96f38a['style']['display']='block',_0x3d0acb['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x194b9c));}['_closeRevisionViewer'](_0x45ade0){const _0x4e35ce=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x4e35ce['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x45ade0['destroy']();}async['_restoreRevision'](_0x3684a5){const _0x3b9598=this['editor'],_0x18a25b=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x550a1c=_0x3b9598['plugins']['get']('RevisionTracker'),_0xfa44d0=_0x3b9598['plugins']['get']('RevisionHistoryUtils'),_0x2213c2=_0x18a25b['repository']['getRevision'](_0x3684a5);let _0x3c82ca,_0x35dcc4,_0x5fbb57;try{await _0xfa44d0['loadRevisionData'](_0x2213c2,this['adapter']),_0x3c82ca=_0xfa44d0['getRevisionDocumentData'](_0x2213c2),_0x35dcc4=_0xfa44d0['getRevisionRootsAttributes'](_0x2213c2);}catch(_0x282e57){return void console['error'](_0x282e57);}_0x3b9598['model']['change'](_0x270cf8=>{for(const _0x56eb7f of Array['from'](_0x3b9598['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x270cf8['removeMarker'](_0x56eb7f);}),_0x18a25b['isReady']=!0x1,_0x3b9598['model']['enqueueChange'](_0x44aaf4=>{_0x44aaf4['setSelection'](null),_0x44aaf4['removeSelectionAttribute'](_0x3b9598['model']['document']['selection']['getAttributeKeys']());const _0x14a9d9=Object['keys'](_0x3c82ca);for(const _0x530c94 of _0x3b9598['model']['document']['roots'])'$graveyard'!=_0x530c94['rootName']&&_0x530c94['isAttached']()&&!_0x14a9d9['includes'](_0x530c94['rootName'])&&_0x44aaf4['detachRoot'](_0x530c94);for(const _0x12a4a6 of _0x14a9d9){let _0x3754ec=_0x3b9598['model']['document']['getRoot'](_0x12a4a6);_0x3754ec&&_0x3754ec['isAttached']()||(_0x3754ec=_0x44aaf4['addRoot'](_0x12a4a6));const _0x502faa=_0x35dcc4[_0x12a4a6],_0x69cea1=Object['keys'](_0x502faa),_0x5bbc48=_0x3c82ca[_0x12a4a6];for(const _0x438696 of _0x3754ec['getAttributeKeys']())_0x69cea1['includes'](_0x438696)||_0x44aaf4['removeAttribute'](_0x438696,_0x3754ec);for(const _0x1b312c of _0x69cea1)_0x44aaf4['setAttribute'](_0x1b312c,_0x35dcc4[_0x12a4a6][_0x1b312c],_0x3754ec);_0x44aaf4['remove'](_0x44aaf4['createRangeIn'](_0x3754ec)),_0x44aaf4['insert'](_0x3b9598['data']['parse'](_0x5bbc48,_0x3754ec),_0x3754ec,0x0);}});const _0x58468b=m(_0x3b9598['locale'],'Restored');if(_0x2213c2['name'])_0x5fbb57=-0x1==_0x2213c2['name']['indexOf'](_0x58468b)?_0x58468b+':\x20'+_0x2213c2['name']:_0x2213c2['name'];else _0x5fbb57=_0x58468b+':\x20'+(_0x2213c2['createdAt']['toLocaleDateString'](_0x3b9598['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x2213c2['createdAt']['toLocaleTimeString'](_0x3b9598['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x550a1c['saveRevision']({'name':_0x5fbb57}),_0x18a25b['isReady']=!0x0,_0x3b9598['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{RestoreRevisionCommand,I as Revision,RevisionHistory,l as RevisionHistoryUI,$ as RevisionHistoryUtils,h as RevisionTracker,u as RevisionViewer,f as RevisionViewerEditor,RevisionViewerIntegration,li as RevisionViewerLoadingOverlay,v as RevisionViewerUI,S as RevisionsRepository,d as RevisionsSidebar,ShowChangeCommand};
|