@ckeditor/ckeditor5-revision-history 48.1.1 → 48.2.0-alpha.1
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/dist/index.js +7 -7
- package/dist/revisionhistoryutils.d.ts +11 -0
- 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 +10 -10
package/dist/index.js
CHANGED
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{ObservableMixin as
|
|
24
|
-
_0x5ab6a2(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x49719d){super(),this['id']=_0x49719d['id']||_0x3a9e51(),this['creator']=_0x49719d['creator']||null,this['authors']=_0x49719d['authors']||[],this['diffData']=_0x49719d['diffData']||null,this['toVersion']=_0x49719d['toVersion']||0x0,this['fromVersion']=_0x49719d['fromVersion']||0x0,this['set']('name',_0x49719d['name']||''),this['set']('createdAt',_0x49719d['createdAt']||new Date()),this['set']('attributes',_0x49719d['attributes']||{});}['setName'](_0x322490){this['_update']({'name':_0x322490});}['setAttribute'](_0x24a581,_0x2b5c0f){const _0x21f8d5=_0x2bd58a(this['attributes']);_0x3a8c40(_0x21f8d5,_0x24a581,_0x2b5c0f),this['_update']({'attributes':_0x21f8d5});}['removeAttribute'](_0x48b01b){const _0x37649d=_0x2bd58a(this['attributes']);_0x1d4ffa(_0x37649d,_0x48b01b),this['_update']({'attributes':_0x37649d});}['_update'](_0x57d3a4,_0x7408d0=!0x1){let _0x4090c3=!0x1;const _0xcd21f0={'id':this['id']},_0x15fb62=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x4cf062 of _0x15fb62){const _0xe224e7=_0x57d3a4[_0x4cf062];void 0x0!==_0xe224e7&&_0xe224e7!==this[_0x4cf062]&&(this[_0x4cf062]=_0xe224e7,_0xcd21f0[_0x4cf062]=_0xe224e7,_0x4090c3=!0x0);}_0x4090c3&&(_0xcd21f0['authors']&&(_0xcd21f0['authorsIds']=_0xcd21f0['authors']['map'](_0x48862a=>_0x48862a['id']),delete _0xcd21f0['authors']),this['fire']('_update',_0xcd21f0,_0x7408d0));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x32c880=>_0x32c880['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class RevisionsRepository extends _0x176a35{['_revisions'];static get['requires'](){return[_0x12edcd];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0xf97c6c){super(_0xf97c6c),this['_revisions']=new _0x17f096();}['afterInit'](){!async function(_0x56a602){const _0x57a775=_0x4c039d([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]),_0x48fbc4=0xeb829,_0x471892=0x359e09b0,_0x2407d7=0x359983d8^_0x471892,_0x3daa6a=window[_0x4c039d([0x44,0x61,0x74,0x65])][_0x4c039d([0x6e,0x6f,0x77])](),_0xcda8bc=_0x56a602[_0x4c039d([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2c23f2=new window[(_0x4c039d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x555612=>{_0xcda8bc[_0x4c039d([0x6f,0x6e,0x63,0x65])](_0x4c039d([0x72,0x65,0x61,0x64,0x79]),_0x555612);}),_0x439175={[_0x4c039d([0x6b,0x74,0x79])]:_0x4c039d([0x45,0x43]),[_0x4c039d([0x75,0x73,0x65])]:_0x4c039d([0x73,0x69,0x67]),[_0x4c039d([0x63,0x72,0x76])]:_0x4c039d([0x50,0x2d,0x32,0x35,0x36]),[_0x4c039d([0x78])]:_0x4c039d([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]),[_0x4c039d([0x79])]:_0x4c039d([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]),[_0x4c039d([0x61,0x6c,0x67])]:_0x4c039d([0x45,0x53,0x32,0x35,0x36])},_0x1439b8=_0xcda8bc[_0x4c039d([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4c039d([0x67,0x65,0x74])](_0x4c039d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x28f074(){let _0x46334e,_0x1ac4f9=null,_0x5c1efb=null;try{if(_0x1439b8==_0x4c039d([0x47,0x50,0x4c]))return _0x4c039d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x46334e=_0xedbb07(),!_0x46334e)return _0x4c039d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x46334e[_0x4c039d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5c1efb=_0x2f46bc(_0x46334e[_0x4c039d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x46334e[_0x4c039d([0x6a,0x74,0x69])])),await _0x40f25a()?_0x310f30()?_0x4cfd7f()?_0x4c039d([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0xca5954()?(_0x46334e[_0x4c039d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4c039d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1ac4f9=_0x3d2773(_0x4c039d([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3fd522()):_0x4c039d([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4c039d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4c039d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4c039d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4cfd7f(){const _0x449e19=[_0x4c039d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4c039d([0x74,0x72,0x69,0x61,0x6c])][_0x4c039d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x46334e[_0x4c039d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x3daa6a/0x3e8:0xe10*_0x2407d7;return _0x46334e[_0x4c039d([0x65,0x78,0x70])]<_0x449e19;}function _0x310f30(){const _0x15afb5=_0x46334e[_0x4c039d([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x15afb5)return!0x1;if(_0x15afb5[_0x4c039d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c039d([0x2a])))return!0x0;if(_0x15afb5[_0x4c039d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c039d([0x52,0x48])))return!0x0;if(_0x15afb5[_0x4c039d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c039d([0x52,0x52,0x48]))){if(_0x27fca6())return!0x0;if(_0x677624()||_0x21d7ee())return!0x0;}return!0x1;}function _0xca5954(){const _0x2ca8b2=_0x46334e[_0x4c039d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2ca8b2||0x0==_0x2ca8b2[_0x4c039d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4a98cd}=new URL(window[_0x4c039d([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2ca8b2[_0x4c039d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4a98cd))return!0x0;const _0xde4303=_0x4a98cd[_0x4c039d([0x73,0x70,0x6c,0x69,0x74])](_0x4c039d([0x2e]));return _0x2ca8b2[_0x4c039d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x36d27c=>_0x36d27c[_0x4c039d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c039d([0x2a])))[_0x4c039d([0x6d,0x61,0x70])](_0x5e126e=>_0x5e126e[_0x4c039d([0x73,0x70,0x6c,0x69,0x74])](_0x4c039d([0x2e])))[_0x4c039d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x17ad37=>_0x17ad37[_0x4c039d([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0xde4303[_0x4c039d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4c039d([0x6d,0x61,0x70])](_0x53b5f5=>Array(_0xde4303[_0x4c039d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x53b5f5[_0x4c039d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4c039d([0x66,0x69,0x6c,0x6c])](_0x53b5f5[0x0]===_0x4c039d([0x2a])?_0x4c039d([0x2a]):'')[_0x4c039d([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x53b5f5))[_0x4c039d([0x73,0x6f,0x6d,0x65])](_0x357880=>_0xde4303[_0x4c039d([0x65,0x76,0x65,0x72,0x79])]((_0x173845,_0x18a1b8)=>_0x357880[_0x18a1b8]===_0x173845||_0x357880[_0x18a1b8]===_0x4c039d([0x2a])));}function _0x3fd522(){return _0x1ac4f9&&_0x5c1efb?new window[(_0x4c039d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x531f68,_0x2fd21e)=>{_0x1ac4f9[_0x4c039d([0x74,0x68,0x65,0x6e])](_0x531f68,_0x2fd21e),_0x5c1efb[_0x4c039d([0x74,0x68,0x65,0x6e])](_0x389cba=>{_0x389cba!=_0x4c039d([0x56,0x61,0x6c,0x69,0x64])&&_0x531f68(_0x389cba);},_0x2fd21e);}):_0x1ac4f9||_0x5c1efb||_0x4c039d([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2f46bc(_0x960445,_0x320210){return new window[(_0x4c039d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x505f6e=>{if(_0x20d01c())return _0x505f6e(_0x4c039d([0x56,0x61,0x6c,0x69,0x64]));_0x273441(),_0xcda8bc[_0x4c039d([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4c039d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2717f1=!0x1;const _0x4a701b=_0x3a9e51();function _0x49d15e(_0x46fe8e){return!!_0x46fe8e&&(typeof _0x46fe8e===_0x4c039d([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x46fe8e===_0x4c039d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x46fe8e[_0x4c039d([0x74,0x68,0x65,0x6e])]===_0x4c039d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x46fe8e[_0x4c039d([0x63,0x61,0x74,0x63,0x68])]===_0x4c039d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x380969(_0x1a6ad0){_0x14e1e8(_0x1a6ad0)[_0x4c039d([0x74,0x68,0x65,0x6e])](_0x370f64=>{if(!_0x370f64||_0x370f64[_0x4c039d([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4c039d([0x6f,0x6b]))return _0x4c039d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1a5072(_0x3d8a57(_0x4a701b+_0x320210))!=_0x370f64[_0x4c039d([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4c039d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4c039d([0x56,0x61,0x6c,0x69,0x64]);})[_0x4c039d([0x74,0x68,0x65,0x6e])](_0x389662=>(_0x1a4010(),_0x389662),()=>{const _0x168c2d=_0x11ee50();return null==_0x168c2d?(_0x1a4010(),_0x4c039d([0x56,0x61,0x6c,0x69,0x64])):_0x4c039d(_0x3daa6a-_0x168c2d>(0x11928db0^_0x471892)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4c039d([0x74,0x68,0x65,0x6e])](_0x505f6e)[_0x4c039d([0x63,0x61,0x74,0x63,0x68])](()=>{_0x505f6e(_0x4c039d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4e47df=0x35a8e730^_0x471892;function _0x1a4010(){const _0x478049=_0x4c039d([0x6c,0x6c,0x63,0x74,0x2d])+_0x1a5072(_0x3d8a57(_0x960445)),_0x48f350=_0x18e2c6(_0x1a5072(window[_0x4c039d([0x4d,0x61,0x74,0x68])][_0x4c039d([0x63,0x65,0x69,0x6c])](_0x3daa6a/_0x4e47df)));window[_0x4c039d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4c039d([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x478049,_0x48f350);}function _0x11ee50(){const _0x12293e=_0x4c039d([0x6c,0x6c,0x63,0x74,0x2d])+_0x1a5072(_0x3d8a57(_0x960445)),_0x5daec4=window[_0x4c039d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4c039d([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x12293e);return _0x5daec4?window[_0x4c039d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x18e2c6(_0x5daec4),0x10)*_0x4e47df:null;}function _0x14e1e8(_0x2148ac){return new window[(_0x4c039d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x169078,_0x2f756d)=>{_0x2148ac[_0x4c039d([0x74,0x68,0x65,0x6e])](_0x169078,_0x2f756d),window[_0x4c039d([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2f756d,0x359fdd70^_0x471892);});}}_0xcda8bc[_0x4c039d([0x6f,0x6e])](_0x4c039d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x4363bc,_0x285345)=>{if(_0x285345[0x0]!=_0x960445)return _0x505f6e(_0x4c039d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x285345[0x1]={..._0x285345[0x1],[_0x4c039d([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x4a701b};},{[_0x4c039d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4c039d([0x68,0x69,0x67,0x68])}),_0xcda8bc[_0x4c039d([0x6f,0x6e])](_0x4c039d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x101fb0=>{_0x49d15e(_0x101fb0[_0x4c039d([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2717f1=!0x0,_0x380969(_0x101fb0[_0x4c039d([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4c039d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4c039d([0x6c,0x6f,0x77])}),_0x2c23f2[_0x4c039d([0x74,0x68,0x65,0x6e])](()=>{_0x2717f1||_0x505f6e(_0x4c039d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x20d01c(){return _0xcda8bc[_0x4c039d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4c039d([0x76,0x69,0x65,0x77])][_0x4c039d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4c039d([0x61,0x75,0x74,0x6f]);}function _0x273441(){_0xcda8bc[_0x4c039d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4c039d([0x76,0x69,0x65,0x77])][_0x4c039d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4c039d([0x61,0x75,0x74,0x6f]);}}function _0x3d2773(_0x251acc){const _0x36f48a=[new window[(_0x4c039d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xeadda1=>setTimeout(_0xeadda1,0x3597377c^_0x471892)),_0x2c23f2[_0x4c039d([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4c039d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3aed6f=>{const _0x137706=0x359e09b7^_0x471892,_0x19ea3c=_0x56a602[_0x4c039d([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x1fb418(){_0x19ea3c[_0x4c039d([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x137706&&_0x3aed6f();}_0x1fb418(),_0x19ea3c[_0x4c039d([0x6f,0x6e])](_0x4c039d([0x61,0x64,0x64]),_0x1fb418);})),new window[(_0x4c039d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3272d0=>{function _0x49263d(){for(const _0x43a08a in window)if(window[_0x4c039d([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x4c039d([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x43a08a))&&window[_0x43a08a]==_0x48fbc4)return _0x3272d0();_0xcda8bc[_0x4c039d([0x73,0x74,0x61,0x74,0x65])]!=_0x4c039d([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x4c039d([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x49263d,0x359e1a38^_0x471892);}_0x4aa89(_0x4c039d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x49263d();})];return window[_0x4c039d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4c039d([0x72,0x61,0x63,0x65])](_0x36f48a)[_0x4c039d([0x74,0x68,0x65,0x6e])](()=>_0x251acc);}async function _0x309002(){if(await _0x2c23f2,_0x4aa89(_0x4c039d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x349a90=_0x56a602[_0x4c039d([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x2f438f=_0x56a602[_0x4c039d([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])](_0x349a90[_0x4c039d([0x69,0x64])]),_0x4af75a=_0x47039b(_0x4c039d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x4af75a[_0x4c039d([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x349a90['id'],_0x2f438f?_0x2f438f['id']:null,!0x0),_0x4af75a[_0x4c039d([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x4c039d([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x4af75a[_0x4c039d([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x4af75a[_0x4c039d([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x7a8ffa,void(_0x4af75a[_0x4c039d([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x7a8ffa);}if(_0x4aa89(_0x4c039d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0xa5e49d=_0x47039b(_0x4c039d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0xa5e49d[_0x4c039d([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x4c039d([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0xa5e49d[_0x4c039d([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0xa5e49d[_0x4c039d([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x7a8ffa,_0xa5e49d[_0x4c039d([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x7a8ffa;}_0xcda8bc[_0x4c039d([0x6d,0x6f,0x64,0x65,0x6c])][_0x4c039d([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x7a8ffa,_0xcda8bc[_0x4c039d([0x6d,0x6f,0x64,0x65,0x6c])][_0x4c039d([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x7a8ffa,_0xcda8bc[_0x4c039d([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4c039d([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x27fca6(){return _0x4aa89(_0x4c039d([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x47039b(_0x4c039d([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x4c039d([0x73,0x74,0x61,0x74,0x65])]==_0x4c039d([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x677624(){return _0x4aa89(_0x4c039d([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 _0x21d7ee(){return _0x4aa89(_0x4c039d([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x171b77(_0x4de303){const _0x570134=_0x56cdf7();_0xcda8bc[_0x570134]=_0x4c039d([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])+_0x4de303,_0x4de303[_0x4c039d([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x4c039d([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x56cdf7()]=_0x48fbc4),_0x4de303!=_0x4c039d([0x56,0x61,0x6c,0x69,0x64])&&_0x309002();}function _0x56cdf7(){const _0x23aee3=window[_0x4c039d([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4c039d([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4c039d([0x6e,0x6f,0x77])]())[_0x4c039d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4c039d([0x2e]),'');let _0x783c8d=_0x4c039d([0x76]);for(let _0x62330f=0x0;_0x62330f<_0x23aee3[_0x4c039d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x62330f+=0x2){let _0xe8dcf5=window[_0x4c039d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x23aee3[_0x4c039d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x62330f,_0x62330f+0x2));_0xe8dcf5>=_0x57a775[_0x4c039d([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0xe8dcf5-=_0x57a775[_0x4c039d([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x783c8d+=_0x57a775[_0xe8dcf5];}return _0x783c8d;}function _0xedbb07(){const _0x58a155=_0x1439b8[_0x4c039d([0x73,0x70,0x6c,0x69,0x74])](_0x4c039d([0x2e]));if(0x3!=_0x58a155[_0x4c039d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3f6fdb(_0x58a155[0x1]);function _0x3f6fdb(_0x437833){const _0xb7215b=_0x5d5c00(_0x437833);return _0xb7215b&&_0x3668bc()?_0xb7215b:null;function _0x3668bc(){const _0x5b71bd=_0xb7215b[_0x4c039d([0x6a,0x74,0x69])],_0x378ae2=window[_0x4c039d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5b71bd[_0x4c039d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5b71bd[_0x4c039d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1c65e0={..._0xb7215b,[_0x4c039d([0x6a,0x74,0x69])]:_0x5b71bd[_0x4c039d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x5b71bd[_0x4c039d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1c65e0[_0x4c039d([0x76,0x63])],_0x3d8a57(_0x1c65e0)==_0x378ae2;}}}async function _0x40f25a(){let _0x3d3189=!0x0;try{const _0x5d6b4c=_0x1439b8[_0x4c039d([0x73,0x70,0x6c,0x69,0x74])](_0x4c039d([0x2e])),[_0x582e1e,_0xae20a2,_0x5e5b7d]=_0x5d6b4c;return _0x2a448c(_0x582e1e),await _0x4315fe(_0x582e1e,_0xae20a2,_0x5e5b7d),_0x3d3189;}catch{return!0x1;}function _0x2a448c(_0x4f826c){const _0x1f9e97=_0x5d5c00(_0x4f826c);_0x1f9e97&&_0x1f9e97[_0x4c039d([0x61,0x6c,0x67])]==_0x4c039d([0x45,0x53,0x32,0x35,0x36])||(_0x3d3189=!0x1);}async function _0x4315fe(_0x46d1e6,_0x54b77b,_0x245a5d){const _0x3c9ba1=window[_0x4c039d([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4c039d([0x66,0x72,0x6f,0x6d])](_0x23e5ec(_0x245a5d),_0x266984=>_0x266984[_0x4c039d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1c8ce1=new window[(_0x4c039d([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4c039d([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x46d1e6+_0x4c039d([0x2e])+_0x54b77b),_0x234e76=window[_0x4c039d([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4c039d([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x234e76)return;const _0x27084e=await _0x234e76[_0x4c039d([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4c039d([0x6a,0x77,0x6b]),_0x439175,{[_0x4c039d([0x6e,0x61,0x6d,0x65])]:_0x4c039d([0x45,0x43,0x44,0x53,0x41]),[_0x4c039d([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4c039d([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4c039d([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x234e76[_0x4c039d([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4c039d([0x6e,0x61,0x6d,0x65])]:_0x4c039d([0x45,0x43,0x44,0x53,0x41]),[_0x4c039d([0x68,0x61,0x73,0x68])]:{[_0x4c039d([0x6e,0x61,0x6d,0x65])]:_0x4c039d([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x27084e,_0x3c9ba1,_0x1c8ce1)||(_0x3d3189=!0x1);}}function _0x5d5c00(_0x3d87fb){return _0x3d87fb[_0x4c039d([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4c039d([0x65,0x79]))?JSON[_0x4c039d([0x70,0x61,0x72,0x73,0x65])](_0x23e5ec(_0x3d87fb)):null;}function _0x23e5ec(_0x360ea3){return window[_0x4c039d([0x61,0x74,0x6f,0x62])](_0x360ea3[_0x4c039d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4c039d([0x2b]))[_0x4c039d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4c039d([0x2f])));}function _0x3d8a57(_0x2a6d71){let _0x3c04ff=0x1505;function _0x31c823(_0xa10f74){for(let _0x458516=0x0;_0x458516<_0xa10f74[_0x4c039d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x458516++){const _0x1d2621=_0xa10f74[_0x4c039d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x458516);_0x3c04ff=(_0x3c04ff<<0x5)+_0x3c04ff+_0x1d2621,_0x3c04ff&=_0x3c04ff;}}function _0x823610(_0x1118f7){Array[_0x4c039d([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1118f7)?_0x1118f7[_0x4c039d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x823610):_0x1118f7&&typeof _0x1118f7==_0x4c039d([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4c039d([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1118f7)[_0x4c039d([0x73,0x6f,0x72,0x74])]()[_0x4c039d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x522b96,_0x4744e2])=>{_0x31c823(_0x522b96),_0x823610(_0x4744e2);}):_0x31c823(window[_0x4c039d([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1118f7));}return _0x823610(_0x2a6d71),_0x3c04ff>>>0x0;}function _0x1a5072(_0x12f32d){return _0x12f32d[_0x4c039d([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4c039d([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4c039d([0x30]));}function _0x18e2c6(_0x1ef334){return _0x1ef334[_0x4c039d([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4c039d([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4c039d([0x6a,0x6f,0x69,0x6e])]('');}function _0x4aa89(_0x449c62){return _0xcda8bc[_0x4c039d([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4c039d([0x68,0x61,0x73])](_0x449c62);}function _0x47039b(_0x38d078){return _0xcda8bc[_0x4c039d([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4c039d([0x67,0x65,0x74])](_0x38d078);}function _0x7a8ffa(){}function _0x4c039d(_0x520b10){return _0x520b10['map'](_0x1bb057=>String['fromCharCode'](_0x1bb057))['join']('');}_0x171b77(await _0x28f074());}(this);}['createRevision'](_0x19e0e1){const _0x5efc77=this['editor']['plugins']['get']('Users');return new Revision({'id':_0x19e0e1['id'],'name':_0x19e0e1['name'],'creator':_0x19e0e1['creatorId']?_0x5efc77['getUser'](_0x19e0e1['creatorId']):null,'diffData':_0x19e0e1['diffData']||_0x19e0e1['data'],'authors':_0x19e0e1['authorsIds']['map'](_0x54a0f0=>_0x5efc77['getUser'](_0x54a0f0)),'createdAt':new Date(_0x19e0e1['createdAt']),'attributes':_0x19e0e1['attributes'],'fromVersion':_0x19e0e1['fromVersion'],'toVersion':_0x19e0e1['toVersion']});}['addRevision'](_0x1078e3,_0x4d7554=0x0){this['_revisions']['add'](_0x1078e3,_0x4d7554);}['getRevision'](_0x481ea4){return this['_revisions']['get'](_0x481ea4);}['getRevisions'](_0xa59a96={'toJSON':!0x1}){const _0xf8f10f=Array['from'](this['_revisions']);return _0xf8f10f['reverse'](),_0xa59a96['toJSON']?_0xf8f10f['map'](_0x8db10=>_0x8db10['toJSON']()):_0xf8f10f;}['getIndex'](_0x2e1bbe){return this['_revisions']['getIndex'](_0x2e1bbe);}['getEarlierVisibleRevision'](_0xd8ce8d){const [,_0x4993e4]=this['getRevisionsIterator'](_0xd8ce8d,{'direction':'earlier'});return _0x4993e4;}['getLaterVisibleRevision'](_0x2b837c){const [,_0x246b28]=this['getRevisionsIterator'](_0x2b837c,{'direction':'later'});return _0x246b28;}['getRevisionsInDiff'](_0x31e605){const _0x4cfbea=[];for(const _0x341def of this['getRevisionsIterator'](_0x31e605['newRevisionId']))if(_0x4cfbea['push'](_0x341def),_0x341def['id']===_0x31e605['oldRevisionId'])break;return _0x4cfbea;}*['getRevisionsIterator'](_0x141b02,{direction:_0x103652='earlier',filter:_0x189144=()=>!0x0}={}){const _0x5268cc='earlier'===_0x103652?0x1:-0x1;let _0x57ec1c=this['_revisions']['get'](_0x141b02),_0x149fb0=this['getIndex'](_0x57ec1c);for(yield _0x57ec1c;_0x57ec1c;){if(_0x149fb0+=_0x5268cc,_0x57ec1c=this['getRevision'](_0x149fb0),!_0x57ec1c)return;_0x189144(_0x57ec1c)&&(yield _0x57ec1c);}}}class RevisionHistoryUtils extends _0x176a35{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x56887a,'c'],[_0x37282f,'a'],[_0x6df7a,'e'],[_0x48b4cb,'r'],[_0x52e48c,'u']]);['_typeCharToViewClass']=new Map([['c',_0x56887a],['a',_0x37282f],['e',_0x6df7a],['r',_0x48b4cb],['u',_0x52e48c]]);async['loadRevisionData'](_0x2f852f,_0x2a627a){if(_0x2f852f['diffData']||!_0x2a627a)return;const _0x2bea51=this['editor']['config']['get']('collaboration.channelId'),_0x3f53a9=await _0x2a627a['getRevision']({'channelId':_0x2bea51,'revisionId':_0x2f852f['id']});_0x2f852f['diffData']=_0x3f53a9['diffData'];}['getRevisionDocumentData'](_0x449f07){const _0x3db8cc={};for(const _0x368772 in _0x449f07['diffData']){if(_0x449f07['diffData'][_0x368772]['attachChange']&&!_0x449f07['diffData'][_0x368772]['attachChange']['isAttached'])continue;const _0x35054d=this['_removeRevisionMarkers'](JSON['parse'](_0x449f07['diffData'][_0x368772]['insertions'])),_0x1fe51a=this['editor']['editing']['view']['document'],_0x1458bf=new _0x2967c2(_0x1fe51a,_0x35054d['map'](_0x3e09d5=>this['_getViewFromDiffObj'](_0x3e09d5,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x3db8cc[_0x368772]=this['editor']['data']['processor']['toData'](_0x1458bf),this['editor']['data']['processor']['useFillerType']('default');}return _0x3db8cc;}['getRevisionRootsAttributes'](_0x58b5a8){const _0x502222={};for(const _0x244d8d in _0x58b5a8['diffData'])_0x58b5a8['diffData'][_0x244d8d]['attachChange']&&!_0x58b5a8['diffData'][_0x244d8d]['attachChange']['isAttached']||(_0x502222[_0x244d8d]=_0x58b5a8['diffData'][_0x244d8d]['attributesAfter']||{});return _0x502222;}['_getTypeCharForViewElement'](_0x5d7682){return this['_viewClassToTypeChar']['get'](_0x5d7682['constructor']);}['_getViewFromDiffObj'](_0x1c0724,_0x1c6932){const _0x3156a1=this['editor']['editing']['view']['document'];if('string'==typeof _0x1c0724)return new _0x3c1158(_0x3156a1,_0x1c0724);{let _0x1999fa,_0x52e716;_0x52e716='u'==_0x1c0724['type']||'r'==_0x1c0724['type']?[]:_0x1c0724['children']['map'](_0xad4409=>this['_getViewFromDiffObj'](_0xad4409,_0x1c6932));const _0x36a046=this['_typeCharToViewClass']['get'](_0x1c0724['type'])||_0x404663,_0x7010d=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x1999fa=new _0x36a046(_0x3156a1,_0x1c0724['name'],_0x1c0724['attributes'],_0x52e716),'u'==_0x1c0724['type']&&_0x1c0724['children'][0x0]){const _0x26b8cc=_0x1c0724['children'][0x0];if(_0x1999fa['render']=function(_0x1a5648){const _0x54b729=_0x1a5648['createElement']('div');return _0x54b729['innerHTML']=_0x26b8cc,_0x54b729['childNodes'][0x0];},_0x1c6932){const _0xde9f8e=new _0x2967c2(_0x3156a1);_0xde9f8e['_appendChild'](_0x1999fa);const _0xa8e8ac=Array['from'](_0x7010d['viewChildrenToDom'](_0xde9f8e,{'bind':!0x1})),_0x48e97d=_0x7010d['domDocument']['createElement']('div');_0x48e97d['append'](..._0xa8e8ac),_0x1999fa=Array['from'](_0x7010d['domChildrenToView'](_0x48e97d))[0x0];}}else{if('r'==_0x1c0724['type']&&_0x1c0724['children'][0x0]){const _0x52bb17=_0x1c0724['children'][0x0];if(_0x1999fa['render']=function(_0x34de3a){_0x34de3a['innerHTML']=_0x52bb17;},_0x1c6932){const _0x2fe596=new _0x2967c2(_0x3156a1);_0x2fe596['_appendChild'](_0x1999fa);const _0x13bde7=Array['from'](_0x7010d['viewChildrenToDom'](_0x2fe596,{'bind':!0x1})),_0xd2ce2f=_0x7010d['domDocument']['createElement']('div');_0xd2ce2f['append'](..._0x13bde7);const _0x69b326=Array['from'](_0x7010d['domChildrenToView'](_0xd2ce2f));_0x69b326['length']>0x1?_0x1999fa['_appendChild'](_0x69b326):_0x1999fa=_0x69b326[0x0];}}}if(_0x1c0724['customProperties']){for(const [_0x5c3cfc,_0x4f9d52]of _0x1c0724['customProperties'])_0x1999fa['_setCustomProperty'](_0x5c3cfc,_0x4f9d52);}const _0x4d95e9=void 0x0===_0x1c0724['fillerOffset']?null:_0x1c0724['fillerOffset'];return null!==_0x4d95e9&&(_0x1999fa['getFillerOffset']=()=>_0x4d95e9),_0x1999fa;}}['_makeModelFromViewString'](_0x127a51){const _0x2b0802=JSON['parse'](_0x127a51),_0x2a91a3=this['editor']['editing']['view']['document'],_0x5f3281=new _0x2967c2(_0x2a91a3,_0x2b0802['map'](_0x1956bc=>this['_getViewFromDiffObj'](_0x1956bc,!0x0)));return this['editor']['data']['toModel'](_0x5f3281);}['_removeRevisionMarkers'](_0x47b3d1){return(_0x47b3d1=_0x47b3d1['filter'](_0x7e2bbf=>!_0x7e2bbf['name']||'revision-start'!==_0x7e2bbf['name']&&'revision-end'!==_0x7e2bbf['name']))['forEach'](_0x1db75e=>{'string'!=typeof _0x1db75e&&(_0x1db75e['children']=this['_removeRevisionMarkers'](_0x1db75e['children']),_0x1db75e['attributes']=_0x1db75e['attributes']['filter'](_0x1392c7=>!_0x1392c7[0x0]['startsWith']('data-revision-')));}),_0x47b3d1;}}function ft(_0xdb3c11,_0x4a1f20,_0x47e718){const t=_0xdb3c11['t'];switch(_0x4a1f20){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'},_0x47e718);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x47e718);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 RevisionTracker extends _0x176a35{['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[_0x12edcd,RevisionsRepository,RevisionHistoryUtils,_0x2ba888];}constructor(_0x2ef2bc){super(_0x2ef2bc),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 _0x40a33f=_0x3a9e51();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x40a33f},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 _0x1274e0=this['repository']['getRevision'](0x0),_0x306899=_0x1274e0&&null===_0x1274e0['creator']?_0x1274e0:null;if(this['_continueCurrentRevision']=!!_0x306899&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x4061b3=this['_source']['getCurrentRevisionId'](),_0x3292df=this['repository']['getRevision'](_0x4061b3);if(_0x3292df)this['_startingVersion']=_0x3292df['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x4afce0=this['_source']['history']['_operations']['find'](_0xbd23c2=>!_0xbd23c2['_isInit']),_0x19d6ce=_0x4afce0?_0x4afce0['baseVersion']:this['_source']['history']['version'];_0x1274e0?(_0x1274e0['toVersion']<_0x19d6ce&&_0x1274e0['_update']({'toVersion':_0x19d6ce}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x306899['id'],this['_startingVersion']=_0x306899['fromVersion']):(this['_startingVersion']=_0x1274e0['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x19d6ce,this['_continueCurrentRevision']=!0x1);}}else _0x306899&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x306899['toVersion'],this['editor']['model']['document']['history']['version']),_0x306899['fromVersion']===_0x306899['toVersion']?(0x0!==_0x306899['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x306899['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x306899['id'],this['_startingVersion']=_0x306899['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',_0x3db88d=>!_0x3db88d),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x1307b3=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x251c65;for(const _0x2553e8 in _0x1307b3){const _0x35f8c3=_0x2553e8,_0x3986f6=_0x1307b3[_0x35f8c3];if('revisionHistoryLicenseKeyValid'==_0x3986f6||'revisionHistoryLicenseKeyInvalid'==_0x3986f6||'revisionHistoryLicenseKeyExpired'==_0x3986f6||'revisionHistoryLicenseKeyDomainLimit'==_0x3986f6||'revisionHistoryLicenseKeyNotAllowed'==_0x3986f6||'revisionHistoryLicenseKeyEvaluationLimit'==_0x3986f6||'revisionHistoryLicenseKeyUsageLimit'==_0x3986f6){delete _0x1307b3[_0x35f8c3],_0x251c65=_0x3986f6,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x251c65&&_0x1307b3['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x251c65&&_0x1307b3['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x251c65&&_0x1307b3['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x251c65&&_0x1307b3['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x251c65&&_0x1307b3['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x251c65&&_0x1307b3['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x57071c=this['repository']['getRevision'](0x0),_0x28dc94=await this['getRevisionDocumentData'](_0x57071c),_0x562399=await this['getRevisionRootsAttributes'](_0x57071c);this['_replaceEditorDataWithRevisionData'](_0x28dc94,_0x562399);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x54868a){this['_source']=_0x54868a;}async['update'](){const _0x73783e=await this['_source']['getLatestVersion']();if(_0x73783e>this['currentRevision']['toVersion']){await this['_loadState']();const _0x1e7b78=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x73783e});_0x1e7b78['authors']=_0x1e7b78['authorsIds']['map'](_0x2079d0=>this['editor']['plugins']['get']('Users')['getUser'](_0x2079d0)),this['currentRevision']['_update'](_0x1e7b78);}}async['saveRevision'](_0x4d11e7={},_0x104a07=null){const _0xb167da=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x104a07>this['currentRevision']['toVersion']&&(_0x104a07=null),null===_0x104a07&&(_0x104a07=await this['_source']['getLatestVersion']());const _0x2c66e0=this['_getFromVersion'](_0x104a07),_0x50863a=this['buildRevisionData']({'from':_0x2c66e0,'to':_0x104a07});if(this['currentRevision']['toVersion']<_0x104a07){const _0x4c8d7c=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x104a07,'to':_0x104a07});_0x4c8d7c['authors']=[],_0x4c8d7c['authorsIds']=[],_0x4c8d7c['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x4c8d7c,!0x0),delete _0x4c8d7c['authors'],_0xb167da['push'](_0x4c8d7c);}_0x4d11e7['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x4d11e7['name']=_0x4d11e7['name']||null,_0x4d11e7['id']=_0x4d11e7['id']||_0x3a9e51(),_0x4d11e7={..._0x4d11e7,..._0x50863a};const _0x29165b=this['addRevisionData'](_0x4d11e7);_0xb167da['push'](_0x4d11e7);const _0x4d754f=this['repository']['getIndex'](_0x29165b);if(0x0!==_0x4d754f){const _0x30d499=this['repository']['getRevision'](_0x4d754f-0x1);if(_0x30d499['fromVersion']!==_0x104a07){const _0x5be94b=this['_revisionDataBuilder']['getData'](_0x104a07,_0x30d499['toVersion']),_0x31936b={'id':_0x30d499['id'],'diffData':_0x5be94b['diffData'],'authorsIds':_0x5be94b['authorsIds'],'authors':_0x5be94b['authorsIds']['map'](_0x81d45f=>this['editor']['plugins']['get']('Users')['getUser'](_0x81d45f)),'fromVersion':_0x104a07};_0x30d499===this['currentRevision']&&(_0x31936b['createdAt']=new Date(_0x4d11e7['createdAt']['getTime']()+0xa)),_0x30d499['_update'](_0x31936b,!0x0),delete _0x31936b['authors'],_0xb167da['push'](_0x31936b);}}if(this['adapter']){for(const _0x402f01 of _0xb167da)this['_bufferUpdate'](_0x402f01['id'],_0x402f01,!0x0);this['sendBufferedUpdates']();}return _0x29165b;}['addRevisionData'](_0x44d2f4){const _0x314d55=this['repository']['createRevision'](_0x44d2f4);return this['adapter']&&_0x314d55['on']('_update',(_0x4f292c,_0x467368,_0x498a77)=>{_0x498a77||(this['_bufferUpdate'](_0x467368['id'],_0x467368,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x314d55,this['_findInsertionIndex'](_0x314d55)),_0x314d55;}async['getRevisionDocumentData'](_0xad7725){return await this['_utils']['loadRevisionData'](_0xad7725,this['adapter']),this['_utils']['getRevisionDocumentData'](_0xad7725);}async['getRevisionRootsAttributes'](_0xeee811){return await this['_utils']['loadRevisionData'](_0xeee811,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0xeee811);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x3d6008=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x299866=0x0;_0x299866<_0x3d6008['length'];_0x299866++){const _0x4c4bb6=_0x3d6008[_0x299866];let _0x2a6dd3=!0x1;for(const _0x374ee6 of Object['keys'](_0x4c4bb6))void 0x0===_0x4c4bb6[_0x374ee6]?delete _0x4c4bb6[_0x374ee6]:'id'!==_0x374ee6&&(_0x2a6dd3=!0x0);_0x2a6dd3||(_0x3d6008[_0x299866]=null);}if(_0x3d6008=_0x3d6008['filter'](_0x4c7565=>null!==_0x4c7565),!_0x3d6008['length'])return;for(let _0x143ac8=0x0;_0x143ac8<_0x3d6008['length'];_0x143ac8++){const _0x374e0f=_0x3d6008[_0x143ac8];void 0x0!==_0x374e0f['fromVersion']&&void 0x0===_0x374e0f['toVersion']&&(_0x374e0f['toVersion']=this['repository']['getRevision'](_0x374e0f['id'])['toVersion']),void 0x0!==_0x374e0f['toVersion']&&void 0x0===_0x374e0f['fromVersion']&&(_0x374e0f['fromVersion']=this['repository']['getRevision'](_0x374e0f['id'])['fromVersion']);}const _0x1cea90=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x3d6008,_0x1cea90)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x248343=>{if(_0x248343){for(const _0x55ec6f of _0x248343)this['setRevisionData']({'id':_0x55ec6f['id'],'createdAt':_0x55ec6f['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0xc2cf7c=null,from:_0x5d43a1=null,to:_0x16f100=null}){_0x5d43a1=null!==_0x5d43a1?_0x5d43a1:_0xc2cf7c['fromVersion'],_0x16f100=null!==_0x16f100?_0x16f100:_0xc2cf7c['toVersion'];const _0x106bfc=this['_revisionDataBuilder']['getData'](_0x5d43a1,_0x16f100),_0x26d63e={'diffData':_0x106bfc['diffData'],'authorsIds':_0x106bfc['authorsIds'],'fromVersion':_0x5d43a1,'toVersion':_0x16f100};if(!_0xc2cf7c||_0x16f100!==_0xc2cf7c['toVersion']){const _0xe17f5c=_0x16f100-0x1,_0x43fce2=this['_source']['history']['getOperation'](_0xe17f5c);_0x26d63e['createdAt']=_0x43fce2&&_0x43fce2['createdAt']||new Date();}if(this['_loadedStateData']&&_0x5d43a1===this['_loadedStateData']['fromVersion']){for(const _0x5e1185 of this['_loadedStateData']['authors'])_0x26d63e['authorsIds']['includes'](_0x5e1185['id'])||_0x26d63e['authorsIds']['push'](_0x5e1185['id']);}return _0x26d63e;}['_bufferUpdate'](_0x528faf,_0x2a5b54,_0x29cbef){if(this['_bufferedUpdates']['has'](_0x528faf)){const _0x1ebf0d=this['_bufferedUpdates']['get'](_0x528faf);_0x2a5b54=_0x29cbef?{..._0x1ebf0d,..._0x2a5b54}:{..._0x2a5b54,..._0x1ebf0d};}this['_bufferedUpdates']['set'](_0x528faf,_0x2a5b54);}['setRevisionData'](_0x21c37d){const _0x48f580=this['repository']['getRevision'](_0x21c37d['id']);if(_0x21c37d['createdAt']&&(_0x21c37d['createdAt']=new Date(_0x21c37d['createdAt'])),_0x21c37d['authorsIds']){const _0x31133d=this['editor']['plugins']['get']('Users');_0x21c37d['authors']=_0x21c37d['authorsIds']['map'](_0x3c0ce1=>_0x31133d['getUser'](_0x3c0ce1));}_0x48f580['_update'](_0x21c37d,!0x0);}['_createInitialRevision'](_0x2e7431){const _0x5a7e35=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x5a7e35)this['_initialRevisionId']=_0x5a7e35['id'];else{const _0x39dc23=!this['editor']['model']['document']['roots']['find'](_0x5ca58b=>this['editor']['model']['hasContent'](_0x5ca58b)),_0x5eb3bd=this['editor']['plugins']['get']('Users')['me']['id'],_0x40a035=ft(this['editor']['locale'],_0x39dc23?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x2e7431,'to':_0x2e7431,'id':this['_initialRevisionId'],'name':_0x40a035,'creatorId':_0x5eb3bd});}}['_createCurrentRevision'](_0x1f08e0){const _0x361606=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x361606),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x1f08e0,'to':_0x1f08e0,'id':_0x361606,'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'](_0x1c0a8b,_0x5caccb){const _0x4b8090={},_0x165e92={},_0x2a5cc0=this['editor']['config']['get']('roots')||{};for(const [_0x212da4,_0x20d318]of Object['entries'](_0x2a5cc0))_0x20d318['lazyLoad']||(_0x4b8090[_0x212da4]=_0x20d318['initialData']??'',_0x165e92[_0x212da4]=_0x20d318['modelAttributes']||{});for(const _0x389660 of this['editor']['model']['document']['getRootNames']())_0x4b8090[_0x389660]??='',_0x165e92[_0x389660]??={};let _0x366cd3=!0x1;const _0x3760c1=Object['keys'](_0x4b8090),_0x3955ad=Object['keys'](_0x1c0a8b);for(const _0x688251 of _0x3760c1){if(_0x4b8090[_0x688251]!==_0x1c0a8b[_0x688251]&&''!==_0x4b8090[_0x688251]['trim']()){_0x366cd3=!0x0;break;}if(!_0x1b0b6b(_0x165e92[_0x688251],_0x5caccb[_0x688251])&&Object['keys'](_0x165e92[_0x688251])['length']>0x0){_0x366cd3=!0x0;break;}}_0x366cd3||(_0x366cd3=_0x3955ad['some'](_0x120570=>!this['editor']['model']['document']['getRoot'](_0x120570))),_0x366cd3&&_0xbee62d('editor-initial-data-replaced-with-revision-data',{'editorData':_0x4b8090,'editorRootsAttributes':_0x165e92,'revisionData':_0x1c0a8b,'revisionRootsAttributes':_0x5caccb});for(const [_0x74418b,_0x81c4e6]of Object['entries'](_0x1c0a8b))this['editor']['config']['set']('roots.'+_0x74418b+'.initialData',_0x81c4e6);for(const [_0x549ceb,_0x4ccbcd]of Object['entries'](_0x5caccb))this['editor']['config']['set']('roots.'+_0x549ceb+'.modelAttributes',_0x4ccbcd);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x57f1ff=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x57f1ff['add'](ft(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x5d7d4a){const _0x5cc19a=this['repository']['getRevisions']();_0x5cc19a['reverse']();let _0x5f17cc=0x0;for(;_0x5f17cc<_0x5cc19a['length'];){const _0x1708b2=_0x5cc19a[_0x5f17cc];if(_0x1708b2===this['currentRevision']){_0x5f17cc++;continue;}if(_0x1708b2['id']===this['_initialRevisionId'])break;const _0x690a7c=_0x5d7d4a['toVersion']-_0x1708b2['toVersion']||_0x5d7d4a['fromVersion']-_0x1708b2['fromVersion'];if(_0x690a7c>0x0)break;if(_0x690a7c<0x0)_0x5f17cc++;else{if(!_0x5d7d4a['creator']&&_0x1708b2['creator'])break;if(_0x1708b2['creator']||!_0x5d7d4a['creator']){if(_0x5d7d4a['createdAt']>_0x1708b2['createdAt'])break;_0x5f17cc++;}else _0x5f17cc++;}}return _0x5f17cc;}['_getFromVersion'](_0x5ee3a0){const _0x4272d1=this['repository']['getRevisions']();_0x4272d1['reverse'](),_0x4272d1['shift']();const _0x49caf5=_0x4272d1['find'](_0x4ec9a7=>_0x4ec9a7['toVersion']<=_0x5ee3a0)['toVersion'];return _0x49caf5<this['_startingVersion']?this['_startingVersion']:_0x49caf5;}['_makeRevision']({name:_0x51ad0d,from:_0x3f8254,to:_0xfc540a,creatorId:_0x55291e,id:_0x531f27}){const _0x8b5e76=this['buildRevisionData']({'from':_0x3f8254,'to':_0xfc540a});_0x8b5e76['name']=_0x51ad0d,_0x8b5e76['creatorId']=_0x55291e,_0x8b5e76['id']=_0x531f27;const _0x4c1383=this['addRevisionData'](_0x8b5e76);return this['adapter']&&this['_bufferUpdate'](_0x8b5e76['id'],_0x8b5e76,!0x0),_0x4c1383;}['_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(_0x109dba){this['editor']=_0x109dba,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'](_0x227ea3){this['source']=_0x227ea3;const _0x5eaeeb=new Map(),_0x5b7943=new Map(),_0x882b0f=this['editor']['model']['document']['roots']['map'](_0x955b54=>_0x955b54['rootName']);for(const _0x23d74f of _0x882b0f){const _0xc39c4f=this['editor']['model']['document']['getRoot'](_0x23d74f),_0x1238ad=gt(_0xc39c4f);_0x5eaeeb['set'](_0x23d74f,_0x1238ad),_0x5b7943['set'](_0x23d74f,Object['fromEntries'](_0xc39c4f['getAttributes']()));}const _0x38050e=Array['from'](this['editor']['model']['markers'])['map'](_0x2b1bcf=>[_0x2b1bcf['name'],_0x2b1bcf['getRange']()]),_0x5b4c76=this['source']['version'];this['_saveMetaData'](_0x5b4c76,_0x5eaeeb,_0x38050e,_0x5b7943),this['_startingRevisionId']=this['_revisionId'];const _0x24430a=new Map(),_0x280163=new Map();for(const _0xe6f39 of _0x882b0f){const _0x393bda=wt(_0xe6f39);_0x24430a['set'](_0xe6f39,_0x393bda),_0x280163['set'](_0xe6f39,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x24430a,[],_0x280163);}['getData'](_0x3eee0c,_0x4eeba0){if(this['_lastFrom']===_0x3eee0c&&this['_lastTo']<=_0x4eeba0)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x4eeba0,!0x0);else{if(!this['_savedMetaData']['has'](_0x3eee0c)){const _0x26f223=this['_getPreviousFrom'](_0x3eee0c);this['_calculateMetaData'](_0x26f223,_0x3eee0c,!0x1);}this['_calculateMetaData'](_0x3eee0c,_0x4eeba0,!0x0);}return this['_lastFrom']=_0x3eee0c,this['_lastTo']=_0x4eeba0,this['_getState']();}['loadState'](_0x37b235){if(!this['_savedMetaData']['has'](_0x37b235['fromVersion'])){const _0x48a449=this['_getPreviousFrom'](_0x37b235['fromVersion']);this['_calculateMetaData'](_0x48a449,_0x37b235['fromVersion'],!0x1);}this['_calculateMetaData'](_0x37b235['fromVersion'],_0x37b235['toVersion'],!0x1);const _0x5900e9=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x37b235['fromVersion'],this['_lastTo']=_0x37b235['toVersion'];for(const _0x4cc2b5 in _0x37b235['diffData']){const _0x4ea424=_0x37b235['diffData'][_0x4cc2b5]['attachChange'],_0x52503d=_0x2bd58a(_0x37b235['diffData'][_0x4cc2b5]['attributesBefore'])||{},_0xa71039=_0x5900e9['_makeModelFromViewString'](_0x37b235['diffData'][_0x4cc2b5]['deletions']);_0xa71039['rootName']=_0x4cc2b5,_0xa71039['_isAttached']=!_0x4ea424||!_0x4ea424['isAttached'],_0xa71039['isAttached']=()=>_0xa71039['_isAttached'],this['_baseRoots']['set'](_0x4cc2b5,_0xa71039),this['_baseRootsAttributes']['set'](_0x4cc2b5,_0x52503d),_0x4ea424&&this['_touchedRoots']['set'](_0x4cc2b5,_0x4ea424);const _0x239b5d=this['_makeIdsRoot'](_0xa71039);this['_baseIdsRoots']['set'](_0x4cc2b5,_0x239b5d);for(const [_0x1db296,_0x400602]of _0xa71039['markers']){if(!_0x1db296['startsWith']('revision:'))continue;const _0x169995=_0x1db296['split'](':')[0x2];for(const _0x22f4ce of _0x400602['getWalker']({'singleCharacters':!0x0})){const _0x44fcc9=this['_getVidAttributeName'](_0x22f4ce),_0x528ad1='elementEnd'==_0x22f4ce['type']?_0x22f4ce['previousPosition']['path']['slice'](0x0,-0x1):_0x22f4ce['previousPosition']['path'],_0xf8129a=_0x239b5d['getNodeByPath'](_0x528ad1)['getAttribute'](_0x44fcc9);this['_touched']['set'](_0xf8129a,{'userId':_0x169995});}_0xa71039['markers']['delete'](_0x1db296);}}this['_startingRevisionId']=this['_revisionId'];const _0x147a00=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x2f424e=>!this['_touched']['has'](_0x2f424e));let _0x51e127=0x0;const _0x2f860b=new Map();for(const _0xce3d9c in _0x37b235['diffData']){const _0x118c99=_0x37b235['diffData'][_0xce3d9c]['attachChange'],_0x3b1e04=_0x2bd58a(_0x37b235['diffData'][_0xce3d9c]['attributesAfter'])||{},_0x46cd7=_0x5900e9['_makeModelFromViewString'](_0x37b235['diffData'][_0xce3d9c]['insertions']);_0x46cd7['rootName']=_0xce3d9c,_0x46cd7['_isAttached']=!_0x118c99||_0x118c99['isAttached'],_0x46cd7['isAttached']=()=>_0x46cd7['_isAttached'],this['_diffRoots']['set'](_0xce3d9c,_0x46cd7),this['_diffRootsAttributes']['set'](_0xce3d9c,_0x3b1e04);const _0x5a6833=this['_makeIdsRoot'](_0x46cd7,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0xce3d9c,_0x5a6833),_0x2f860b['set'](_0xce3d9c,_0x46cd7['isAttached']()?_0x3b1e04:{});for(const [_0x295bb6,_0x4f8db2]of _0x46cd7['markers']){if(!_0x295bb6['startsWith']('revision:'))continue;const _0x1bfd59=_0x295bb6['split'](':')[0x2];for(const _0x7b65fb of _0x4f8db2['getWalker']({'singleCharacters':!0x0})){const _0x501c7c=this['_getVidAttributeName'](_0x7b65fb),_0x30d69d=this['_revisionId']++,_0x45b611='elementEnd'==_0x7b65fb['type']?_0x7b65fb['previousPosition']['path']['slice'](0x0,-0x1):_0x7b65fb['previousPosition']['path'];_0x5a6833['getNodeByPath'](_0x45b611)['_setAttribute'](_0x501c7c,_0x30d69d),this['_touched']['set'](_0x30d69d,{'userId':_0x1bfd59});}_0x46cd7['markers']['delete'](_0x295bb6);}for(const _0x4dc6b of this['editor']['model']['createRangeIn'](_0x46cd7)['getWalker']({'singleCharacters':!0x0})){const _0x335642=this['_getVidAttributeName'](_0x4dc6b),_0x1c40c2='elementEnd'==_0x4dc6b['type']?_0x4dc6b['previousPosition']['path']['slice'](0x0,-0x1):_0x4dc6b['previousPosition']['path'],_0xb72acb=_0x5a6833['getNodeByPath'](_0x1c40c2);_0xb72acb['getAttribute'](_0x335642)>0x0||_0xb72acb['_setAttribute'](_0x335642,_0x147a00[_0x51e127++]);}for(const [_0x5a3be3,_0x21e64f]of _0x46cd7['markers'])_0x5a3be3['startsWith']('revision:')||this['_markers']['set'](_0x5a3be3,_0x21e64f);}const {roots:_0x5e6542}=this['_savedMetaData']['get'](_0x37b235['fromVersion']),{roots:_0x1b3cc7}=this['_savedMetaData']['get'](_0x37b235['toVersion']),_0x330cd7=gt(_0x5e6542['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x330cd7),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x330cd7,Number['NEGATIVE_INFINITY']));const _0x46b4fc=gt(_0x1b3cc7['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x46b4fc),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x46b4fc));const _0x527232=Array['from'](this['_diffRoots'])['map'](([_0x5ef063,_0x453491])=>[_0x5ef063,gt(_0x453491)]);this['_saveMetaData'](this['_lastTo'],_0x527232,this['_markers'],_0x2f860b);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x356653,_0x5df876,_0x2422e0,_0x51dd6f){const _0x56a619=new Map(_0x5df876),_0x12228f=new Map(_0x2bd58a(_0x51dd6f)),_0x69686a=new Map();for(const [_0xdfdd23,_0x165949]of _0x2422e0)_0x69686a['set'](_0xdfdd23,{'start':_0x165949['start']['clone'](),'end':_0x165949['end']['clone'](),'rootName':_0x165949['root']['rootName']});this['_savedMetaData']['set'](_0x356653,{'roots':_0x56a619,'markers':_0x69686a,'rootsAttributes':_0x12228f});}['_removeMetaData'](_0x138159){this['_savedMetaData']['delete'](_0x138159);}['_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'](_0xc5c30d,_0x3b4276=null){let _0x5aa520=null;_0xc5c30d['is']('documentFragment')||(_0x5aa520=new _0x3b031c(_0xc5c30d['name'],{'vid_start':null===_0x3b4276?this['_revisionId']++:_0x3b4276++}));const _0x3d4db7=[];for(const _0x36279d of _0xc5c30d['getChildren']())if(_0x36279d['is']('element')){_0x3d4db7['push'](this['_makeIdsRoot'](_0x36279d,_0x3b4276));const _0x376c90=_0x3d4db7[_0x3d4db7['length']-0x1];null!==_0x3b4276&&(_0x3b4276=_0x376c90['is']('element','$text')?_0x376c90['getAttribute']('vid')+0x1:_0x376c90['getAttribute']('vid_end')+0x1);}else{for(let _0x223f6b=0x0;_0x223f6b<_0x36279d['offsetSize'];_0x223f6b++)_0x3d4db7['push'](new _0x3b031c('$text',{'vid':null===_0x3b4276?this['_revisionId']++:_0x3b4276++}));}if(_0xc5c30d['is']('documentFragment')){const _0x522a36=wt(_0xc5c30d['rootName']);return _0x522a36['_insertChild'](0x0,_0x3d4db7),_0x522a36;}return _0x5aa520['_setAttribute']('vid_end',null===_0x3b4276?this['_revisionId']++:_0x3b4276++),_0x5aa520['_insertChild'](0x0,_0x3d4db7),_0x5aa520;}['_calculateMetaData'](_0x59fbd4,_0x3ee878,_0x212865){this['_reset']();const {roots:_0x375c95,markers:_0x36558a,rootsAttributes:_0x26e101}=this['_savedMetaData']['get'](_0x59fbd4);this['_baseRoots']=new Map(_0x375c95),this['_baseRootsAttributes']=new Map(_0x2bd58a(_0x26e101));for(const [_0x1c8171,_0x8e4b7c]of this['_baseRoots'])if('$graveyard'!==_0x1c8171&&(this['_diffRoots']['set'](_0x1c8171,gt(_0x8e4b7c)),this['_diffRootsAttributes']=new Map(_0x2bd58a(_0x26e101)),_0x212865)){const _0x197d22=this['_revisionId'];this['_idsRoots']['set'](_0x1c8171,this['_makeIdsRoot'](_0x8e4b7c)),this['_baseIdsRoots']['set'](_0x1c8171,this['_makeIdsRoot'](_0x8e4b7c,_0x197d22));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',gt(this['_baseRoots']['get']('$graveyard'))),_0x212865&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x1bb84a,_0x148902]of _0x36558a){const _0x292c1e=this['_baseRoots']['get'](_0x148902['rootName']),_0x3592bf=this['_diffRoots']['get'](_0x148902['rootName']),_0x57913c=new _0x522e84(this['_fixPosition'](_0x148902['start'],_0x292c1e),this['_fixPosition'](_0x148902['end'],_0x292c1e)),_0x4a77b6=this['_fixRange'](_0x57913c,_0x3592bf);_0x292c1e['markers']['set'](_0x1bb84a,_0x57913c),this['_markers']['set'](_0x1bb84a,_0x4a77b6);}this['_applyOperations'](_0x59fbd4,_0x3ee878,_0x212865);}['_applyOperations'](_0x2c9dbe,_0x99ec85,_0x213f5c){for(const _0x3529df of this['source']['getOperations'](_0x2c9dbe,_0x99ec85))this['_handleOperation'](_0x3529df,_0x213f5c);for(const _0x34fce6 of this['_diffRoots']['values']())_0x34fce6['markers']['clear']();for(const [_0x12baa3,_0x64c037]of this['_markers']){this['_diffRoots']['get'](_0x64c037['root']['rootName'])['markers']['set'](_0x12baa3,_0x64c037['clone']());}const _0x4c833=new Map(),_0x4e9ce8=new Map();for(const [_0x3a562b,_0xa1692e]of this['_diffRoots'])_0x4c833['set'](_0x3a562b,gt(_0xa1692e)),_0x4e9ce8['set'](_0x3a562b,this['_diffRootsAttributes']['get'](_0x3a562b));this['_saveMetaData'](_0x99ec85,_0x4c833,this['_markers'],_0x4e9ce8);}['_getPreviousFrom'](_0x27ed5b){const _0x396dbb=Array['from'](this['_savedMetaData']['keys']());_0x396dbb['sort']((_0x7db676,_0x3b2673)=>_0x7db676-_0x3b2673),_0x396dbb['reverse']();for(const _0x58a297 of _0x396dbb)if(_0x58a297<_0x27ed5b)return _0x58a297;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x1e0716,_0x35c890){const _0x2b0a40=Array['from'](_0x35c890['markers'])['map'](([_0x1cbf93,_0x559dba])=>[_0x1cbf93,this['_fixRange'](_0x559dba,_0x1e0716)]);_0x1e0716['markers']=new Map(_0x2b0a40);}['_transformMarkers'](_0x766dc8){for(const _0x3c62e7 of this['_markers']['values']()){const _0x48d336=_0x3c62e7['getTransformedByOperation'](_0x766dc8),_0x5aab93=_0x522e84['_createFromRanges'](_0x48d336);_0x3c62e7['start']=_0x5aab93['start'],_0x3c62e7['end']=_0x5aab93['end'];}}['_handleOperation'](_0x198a3a,_0x2fd909){if('addRoot'!=_0x198a3a['type']&&'detachRoot'!=_0x198a3a['type']){if('insert'==_0x198a3a['type']){const _0x22342a=_0x198a3a['position']['root']['rootName'];this['_diffRoots']['has'](_0x22342a)||(this['_diffRoots']['set'](_0x22342a,wt(_0x22342a,!0x0)),this['_diffRootsAttributes']['set'](_0x22342a,{}),_0x2fd909&&this['_idsRoots']['set'](_0x22342a,wt(_0x22342a,!0x0)));}else{if('addRootAttribute'==_0x198a3a['type']||'removeRootAttribute'==_0x198a3a['type']||'changeRootAttribute'==_0x198a3a['type'])return void this['_handleRootAttributeOperation'](_0x198a3a);'marker'==_0x198a3a['type']&&this['_handleMarkerOperation'](_0x198a3a);}if('marker'!==_0x198a3a['type']){const _0x1a7b8f=this['_cloneOperation'](_0x198a3a,this['_diffRoots']);_0x1a7b8f['_execute'](),this['_transformMarkers'](_0x1a7b8f);}if(_0x2fd909)switch(_0x198a3a['type']){case'insert':this['_handleInsertOperation'](_0x198a3a);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x198a3a);break;case'merge':this['_handleMergeOperation'](_0x198a3a);break;case'split':this['_handleSplitOperation'](_0x198a3a);}}else this['_handleRootOperation'](_0x198a3a,_0x2fd909);}['_cloneOperation'](_0x4c022f,_0x2339a4){const _0x4e542b=_0x4c022f['clone']();return _0x4e542b['_authorId']=_0x4c022f['_authorId'],this['_fixOperation'](_0x4e542b,_0x2339a4),_0x4e542b;}['_getBaseVids'](_0x29988a){return _0x29988a['map'](_0x391932=>{const _0x2781a5=this['_getVidAttributeName'](_0x391932);return Number(_0x391932['item']['getAttribute'](_0x2781a5));});}['_generateTape'](_0x4a06b8,_0x4e80e3){if(_0x4a06b8['is']('element','$text'))_0x4e80e3['push']({'item':_0x4a06b8,'type':'text'});else{_0x4a06b8['is']('element')&&_0x4e80e3['push']({'item':_0x4a06b8,'type':'elementStart'});for(const _0x5ea8b9 of _0x4a06b8['getChildren']())this['_generateTape'](_0x5ea8b9,_0x4e80e3);_0x4a06b8['is']('element')&&_0x4e80e3['push']({'item':_0x4a06b8,'type':'elementEnd'});}return _0x4e80e3;}['_getState'](){const _0x4f1a62=new Map(this['_touched']),_0x1eb44c=new Map(_0x4f1a62),_0x11114=new Map(),_0x5c8292={'insertions':{},'deletions':{}},_0x2c6657={'insertions':{},'deletions':{}},_0xf22db0=new Map(),_0x421224=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x421224['delete']('$graveyard');for(const _0x148a48 of _0x421224){const _0x1a1f4f=this['_diffRoots']['get'](_0x148a48)||wt(_0x148a48,!0x1),_0x16e6d0=this['_baseRoots']['get'](_0x148a48)||wt(_0x148a48,!0x1);_0x1a1f4f['isAttached']()||_0x16e6d0['isAttached']()?(_0x5c8292['insertions'][_0x148a48]=gt(_0x1a1f4f),_0x5c8292['deletions'][_0x148a48]=gt(_0x16e6d0),this['_copyMarkers'](_0x5c8292['deletions'][_0x148a48],_0x16e6d0),this['_copyMarkers'](_0x5c8292['insertions'][_0x148a48],_0x1a1f4f),_0x2c6657['insertions'][_0x148a48]=this['_generateTape'](this['_idsRoots']['get'](_0x148a48),[]),_0x2c6657['deletions'][_0x148a48]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x148a48)||wt(_0x148a48,!0x1),[])):_0x421224['delete'](_0x148a48);}for(const _0x5fee56 of _0x421224){const _0x5c49a9=_0x2c6657['insertions'][_0x5fee56];for(const _0x5caf49 of _0x5c49a9){const _0x2b86b0=this['_getVidAttributeName'](_0x5caf49),_0x1bdf8f=_0x5caf49['item']['getAttribute'](_0x2b86b0);_0x1eb44c['delete'](_0x1bdf8f),_0x1bdf8f>=this['_startingRevisionId']&&_0x11114['set'](_0x1bdf8f,_0x4f1a62['get'](_0x1bdf8f));}}for(const _0xf4cbcb of _0x421224){const _0x2f6e9e=_0x2c6657['insertions'][_0xf4cbcb],_0x179742=this['_getBaseVids'](_0x2c6657['deletions'][_0xf4cbcb]);let _0xbd4dd1=0x0;for(const _0x317120 of _0x2f6e9e){const _0x48c5b0=this['_getVidAttributeName'](_0x317120),_0xaedc0e=_0x317120['item']['getAttribute'](_0x48c5b0);if(!_0x11114['has'](_0xaedc0e)&&!_0xf22db0['has'](_0xaedc0e)){if(_0x1eb44c['has'](_0xaedc0e))_0xbd4dd1++;else{if(_0xaedc0e!=_0x179742[_0xbd4dd1]){const _0xb74b93=_0x4f1a62['get'](_0xaedc0e)||_0x4f1a62['get'](_0x179742[_0xbd4dd1]);for(;_0xaedc0e!=_0x179742[_0xbd4dd1];)_0x1eb44c['has'](_0x179742[_0xbd4dd1])||(_0xf22db0['set'](_0x179742[_0xbd4dd1],_0xb74b93),_0x4f1a62['set'](_0x179742[_0xbd4dd1],_0xb74b93)),_0xbd4dd1++;}_0xbd4dd1++;}}}}for(const _0x2c258a of _0x421224){const _0x2f691d=_0x2c6657['insertions'][_0x2c258a];for(const _0x41d6af of _0x2f691d){const _0x21c6ec=this['_getVidAttributeName'](_0x41d6af),_0x5b3856=_0x41d6af['item']['getAttribute'](_0x21c6ec);if(_0xf22db0['has'](_0x5b3856)){const _0x30138e=_0xf22db0['get'](_0x5b3856);_0x1eb44c['has'](_0x5b3856)||_0x1eb44c['set'](_0x5b3856,{..._0x30138e}),_0x11114['set'](_0x5b3856,{..._0x30138e});}}}for(const _0x5e5d52 of _0x1eb44c['keys']())_0x5e5d52>=this['_startingRevisionId']&&_0x1eb44c['delete'](_0x5e5d52);const _0x22acf3=new Map();for(const _0x11d493 of _0x421224){let _0x22e83a=_0x2c6657['insertions'][_0x11d493];for(const _0x4b717b of _0x22e83a)if(_0x4b717b['item']['is']('element','tableCell')){const _0x40a344=this['_getVidAttributeName'](_0x4b717b),_0x5255f3=_0x4b717b['item']['getAttribute'](_0x40a344);if(_0x11114['has'](_0x5255f3)){const _0x173559=_0x4b717b['item']['parent']['parent']['getAttribute']('vid_start'),_0x2256b7=_0x22acf3['get'](_0x173559)||new Set();_0x2256b7['add'](_0x11114['get'](_0x5255f3)['userId']),_0x22acf3['set'](_0x173559,_0x2256b7);}}_0x22e83a=_0x2c6657['deletions'][_0x11d493];for(const _0x21d997 of _0x22e83a)if(_0x21d997['item']['is']('element','tableCell')){const _0x14023b=this['_getVidAttributeName'](_0x21d997),_0x294af1=_0x21d997['item']['getAttribute'](_0x14023b);if(_0x1eb44c['has'](_0x294af1)){const _0x5568b1=_0x21d997['item']['parent']['parent']['getAttribute']('vid_start'),_0x53c934=_0x22acf3['get'](_0x5568b1)||new Set();_0x53c934['add'](_0x1eb44c['get'](_0x294af1)['userId']),_0x22acf3['set'](_0x5568b1,_0x53c934);}}for(const _0x3a82c9 of _0x22acf3['keys']())(_0x11114['has'](_0x3a82c9)||_0x1eb44c['has'](_0x3a82c9))&&_0x22acf3['delete'](_0x3a82c9);}for(const _0xded6e3 of _0x421224){const _0x5472de=_0x2c6657['insertions'][_0xded6e3];let _0x56820b=null,_0x5b81a9=null;for(const _0x5e52ae of _0x5472de){const _0x194102=this['_getVidAttributeName'](_0x5e52ae),_0x5e2ff0=_0x5e52ae['item']['getAttribute'](_0x194102),_0x5350e5=_0x22acf3['get'](_0x5e2ff0);_0x5350e5&&'elementStart'==_0x5e52ae['type']&&(_0x56820b=Array['from'](_0x5350e5)[0x0],_0x5b81a9=_0x5e52ae['item']['getAttribute']('vid_end')),_0x56820b&&(_0x1eb44c['set'](_0x5e2ff0,{'userId':_0x56820b}),_0x11114['set'](_0x5e2ff0,{'userId':_0x56820b})),_0x5e2ff0==_0x5b81a9&&(_0x56820b=null,_0x5b81a9=null);}}const _0x111391={},_0x1dd352=new Set();for(const _0x3c35f9 of _0x421224){const _0x246f35=_0x5c8292['deletions'][_0x3c35f9],_0x5673c2=_0x5c8292['insertions'][_0x3c35f9];for(const {userId:_0xbc1aab}of this['_touchedMarkers']['values']())null!==_0xbc1aab&&_0x1dd352['add'](_0xbc1aab);for(const {userId:_0x36ff67}of this['_touchedRoots']['values']())null!==_0x36ff67&&_0x1dd352['add'](_0x36ff67);this['_markChanges'](_0x5673c2,_0x2c6657['insertions'][_0x3c35f9],_0x11114,'insertion',_0x1dd352),this['_markChanges'](_0x246f35,_0x2c6657['deletions'][_0x3c35f9],_0x1eb44c,'deletion',_0x1dd352),_0x111391[_0x3c35f9]={'insertions':this['_prepareViewToSave'](_0x5673c2),'deletions':this['_prepareViewToSave'](_0x246f35),'attachChange':this['_touchedRoots']['get'](_0x3c35f9)||null,'attributesBefore':_0x2bd58a(this['_baseRootsAttributes']['get'](_0x3c35f9))||{},'attributesAfter':_0x2bd58a(this['_diffRootsAttributes']['get'](_0x3c35f9))};}return{'diffData':_0x111391,'authorsIds':Array['from'](_0x1dd352)};}['_processRootBeforeSave'](_0xd34df){for(const [,_0x27234f]of _0xd34df['markers']){const _0x7e6142=_0x27234f['start']['getAncestors']()['filter'](_0x2446b2=>'tableCell'==_0x2446b2['name']);for(const _0x309b63 of _0x7e6142)0x1==_0x309b63['childCount']&&_0x309b63['getChild'](0x0)['is']('element','paragraph')&&_0x309b63['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x93b502){this['_processRootBeforeSave'](_0x93b502);const _0x4a70bc=this['editor']['data']['toView'](_0x93b502,{}),_0x331655=Array['from'](_0x4a70bc['getChildren']())['map'](_0xa3c325=>this['_getViewJson'](_0xa3c325));return JSON['stringify'](_0x331655);}['_getViewJson'](_0x4e3a75){if(_0x4e3a75['is']('$text'))return _0x4e3a75['data'];{const _0x1f5ba6=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x15b95b=_0x4e3a75,_0x12f406=this['editor']['data']['htmlProcessor']['domConverter'],_0x46fe7e={'type':_0x1f5ba6['_getTypeCharForViewElement'](_0x15b95b),'name':_0x15b95b['name'],'attributes':Array['from'](_0x15b95b['getAttributes']()),'children':Array['from'](_0x15b95b['getChildren']())['map'](_0x46dea7=>this['_getViewJson'](_0x46dea7))};if(_0x4e3a75['is']('uiElement')&&'$comment'!=_0x4e3a75['name']){const _0x109636=_0x4e3a75['render'](_0x12f406['domDocument'],_0x12f406);_0x46fe7e['children']['push'](_0x109636['outerHTML']);}else{if(_0x4e3a75['is']('rawElement')){const _0x5065a7=_0x12f406['domDocument']['createElement'](_0x15b95b['name']);_0x4e3a75['render'](_0x5065a7,_0x12f406),_0x46fe7e['children']['push'](_0x5065a7['innerHTML']);}}const _0x554e0a=Array['from'](_0x15b95b['getCustomProperties']());_0x554e0a['length']>0x0&&(_0x46fe7e['customProperties']=_0x554e0a);const _0x4f57e1=_0x15b95b['getFillerOffset']();return null!==_0x4f57e1&&(_0x46fe7e['fillerOffset']=_0x4f57e1),_0x46fe7e;}}['_markChanges'](_0x4b6813,_0x38d2e5,_0x5a0160,_0xef1c1b,_0x2d6cab){let _0x38319c=null,_0x5a7b3a=null,_0x4d33a6=0x0;const _0x106d14=this['editor']['model'];for(let _0x2cd07c=0x0;_0x2cd07c<_0x38d2e5['length'];_0x2cd07c++){const _0x12e625=this['_getVidAttributeName'](_0x38d2e5[_0x2cd07c]),_0xe85985=_0x38d2e5[_0x2cd07c]['item']['getAttribute'](_0x12e625),_0x4d8a7b=_0x5a0160['get'](_0xe85985),_0x589041=_0x2cd07c==_0x38d2e5['length']-0x1;(!_0x38319c&&_0x4d8a7b&&(_0x38319c=_0x4d8a7b,_0x5a7b3a=_0x38d2e5[_0x2cd07c]),_0x38319c&&(!_0x4d8a7b||_0x4d8a7b['userId']!=_0x38319c['userId']))&&(_0x282df4(_0x4d8a7b,mt(_0x5a7b3a,_0x4b6813,_0x106d14),mt(_0x38d2e5[_0x2cd07c],_0x4b6813,_0x106d14)),_0x38319c=_0x4d8a7b||null,_0x5a7b3a=_0x4d8a7b?_0x38d2e5[_0x2cd07c]:null),_0x38319c&&_0x589041&&_0x282df4(_0x4d8a7b,mt(_0x5a7b3a,_0x4b6813,_0x106d14),pt(_0x38d2e5[_0x2cd07c],_0x4b6813,_0x106d14));}function _0x282df4(_0x8318ad,_0xa0051f,_0x282ed9){const _0x26a7d7=_0x38319c['userId'],_0x5c6341='revision:'+_0xef1c1b+':'+_0x26a7d7+':'+_0x4d33a6++,_0x58c156=_0x106d14['createRange'](_0xa0051f,_0x282ed9);_0x4b6813['markers']['set'](_0x5c6341,_0x58c156),null!==_0x26a7d7&&_0x2d6cab['add'](_0x26a7d7);}}['_getVidAttributeName'](_0x136f15){switch(_0x136f15['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x104bc5,_0x565b38){_0x104bc5['baseVersion']=null;for(const _0x1cd65c in _0x104bc5){const _0x5eed7d=_0x104bc5[_0x1cd65c];if(_0x5eed7d instanceof _0x5821d2){const _0x31e2ff=_0x565b38['get'](_0x5eed7d['root']['rootName']);_0x104bc5[_0x1cd65c]=this['_fixPosition'](_0x5eed7d,_0x31e2ff);}if(_0x5eed7d instanceof _0x522e84){const _0x191d98=_0x565b38['get'](_0x5eed7d['root']['rootName']);_0x104bc5[_0x1cd65c]=this['_fixRange'](_0x5eed7d,_0x191d98);}'root'===_0x1cd65c&&(_0x104bc5['root']=_0x565b38['get'](_0x104bc5['root']['rootName']));}}['_fixRange'](_0x140a98,_0x11fd0b){return this['editor']['model']['createRange'](this['_fixPosition'](_0x140a98['start'],_0x11fd0b),this['_fixPosition'](_0x140a98['end'],_0x11fd0b));}['_fixPosition'](_0x567423,_0x3b7493){return this['editor']['model']['createPositionFromPath'](_0x3b7493,_0x567423['path'],_0x567423['stickiness']);}['_handleInsertOperation'](_0x2cb779){const _0x1cfeee=this['_idsRoots']['get'](_0x2cb779['position']['root']['rootName']),_0x5630ef=this['_fixPosition'](_0x2cb779['position'],_0x1cfeee),_0x4e892d=null===_0x2cb779['_authorId']?null:_0x2cb779['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3abfac=_0x5630ef['parent'],_0x47772b=this['_revisionId'],_0x4e1184=[];for(const _0xe9ccd3 of _0x2cb779['nodes'])if(_0xe9ccd3['is']('element'))_0x4e1184['push'](this['_makeIdsRoot'](_0xe9ccd3));else{for(let _0x269d3e=0x0;_0x269d3e<_0xe9ccd3['offsetSize'];_0x269d3e++)_0x4e1184['push'](new _0x3b031c('$text',{'vid':this['_revisionId']++}));}const _0x1ae466=this['_revisionId'];for(let _0x2bd8ee=_0x47772b;_0x2bd8ee<_0x1ae466;_0x2bd8ee++)this['_touched']['set'](_0x2bd8ee,{'userId':_0x4e892d});_0x3abfac['_insertChild'](_0x5630ef['offset'],_0x4e1184);}['_handleMoveOperation'](_0x4e6d97){(_0x4e6d97=this['_cloneOperation'](_0x4e6d97,this['_idsRoots']))['_execute']();const _0x5d0a4a=null===_0x4e6d97['_authorId']?null:_0x4e6d97['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1765ad=_0x4e6d97['getMovedRangeStart'](),_0x87c001=_0x1765ad['parent'],_0x1150cd=_0x1765ad['offset'];!function _0x29d55a(_0x36bf59,_0x200251,_0x334371,_0x13fc99){for(let _0x505801=_0x334371;_0x505801<_0x13fc99;_0x505801++){const _0x351c9c=_0x200251['getChild'](_0x505801);_0x351c9c['is']('element','$text')?_0x36bf59['set'](_0x351c9c['getAttribute']('vid'),{'userId':_0x5d0a4a}):(_0x36bf59['set'](_0x351c9c['getAttribute']('vid_start'),{'userId':_0x5d0a4a}),_0x29d55a(_0x36bf59,_0x351c9c,0x0,_0x351c9c['childCount']),_0x36bf59['set'](_0x351c9c['getAttribute']('vid_end'),{'userId':_0x5d0a4a}));}}(this['_touched'],_0x87c001,_0x1150cd,_0x1150cd+_0x4e6d97['howMany']);}['_handleMergeOperation'](_0x1d2996){const _0x572b00=null===(_0x1d2996=this['_cloneOperation'](_0x1d2996,this['_idsRoots']))['_authorId']?null:_0x1d2996['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x38973e=_0x1d2996['targetPosition']['parent'],_0x1628f7=_0x1d2996['sourcePosition']['parent'],_0x536650=_0x38973e['getAttribute']('vid_end'),_0x3aaa95=_0x1628f7['getAttribute']('vid_start');_0x38973e['_setAttribute']('vid_end',_0x1628f7['getAttribute']('vid_end')),_0x1628f7['_setAttribute']('vid_end',_0x536650),this['_touched']['set'](_0x3aaa95,{'userId':_0x572b00}),this['_touched']['set'](_0x536650,{'userId':_0x572b00}),_0x1d2996['_execute']();}['_handleSplitOperation'](_0x4c895d){const _0x323dae=null===(_0x4c895d=this['_cloneOperation'](_0x4c895d,this['_idsRoots']))['_authorId']?null:_0x4c895d['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x27cc25=_0x4c895d['graveyardPosition'],_0x295e1b=_0x4c895d['splitPosition']['parent'];_0x4c895d['_execute']();const _0x4a7e84=_0x295e1b['getAttribute']('vid_end'),_0x4c2d2f=_0x4c895d['insertionPosition']['nodeAfter'];if(_0x27cc25){const _0x4ae4bf=_0x4c2d2f['getAttribute']('vid_end'),_0x596c8f=_0x295e1b['getAttribute']('vid_end');_0x295e1b['_setAttribute']('vid_end',_0x4ae4bf),_0x4c2d2f['_setAttribute']('vid_end',_0x596c8f),this['_touched']['set'](_0x295e1b['getAttribute']('vid_end'),{'userId':_0x323dae}),this['_touched']['set'](_0x4c2d2f['getAttribute']('vid_start'),{'userId':_0x323dae});}else{const _0x4711c1=this['_revisionId']++,_0x504b89=this['_revisionId']++;_0x295e1b['_setAttribute']('vid_end',_0x4711c1),_0x4c2d2f['_setAttribute']('vid_start',_0x504b89),_0x4c2d2f['_setAttribute']('vid_end',_0x4a7e84),this['_touched']['set'](_0x4711c1,{'userId':_0x323dae}),this['_touched']['set'](_0x504b89,{'userId':_0x323dae});}}['_handleMarkerOperation'](_0x51459c){if(!_0x51459c['affectsData'])return;const _0x16c9a3=(_0x51459c=this['_cloneOperation'](_0x51459c,this['_diffRoots']))['oldRange']?_0x51459c['oldRange']['root']:null,_0x3928b2=_0x51459c['newRange']?_0x51459c['newRange']['root']:null;_0x16c9a3&&this['_markers']['delete'](_0x51459c['name']),_0x3928b2&&this['_markers']['set'](_0x51459c['name'],_0x51459c['newRange']['clone']());const _0x1cadd1=null===_0x51459c['_authorId']?null:_0x51459c['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xc9e577=_0x51459c['name'];if(!this['_touchedMarkers']['has'](_0xc9e577))return void this['_touchedMarkers']['set'](_0xc9e577,{'range':_0x51459c['oldRange'],'userId':_0x1cadd1});const _0x26b70c=this['_touchedMarkers']['get'](_0xc9e577),_0x67aa24=_0x26b70c['range'],_0x119d86=_0x51459c['newRange'];null==_0x67aa24&&null==_0x119d86||_0x67aa24&&_0x119d86&&_0x67aa24['isEqual'](_0x119d86)?this['_touchedMarkers']['delete'](_0x51459c['name']):_0x26b70c['userId']=_0x1cadd1;}['_handleRootOperation'](_0x22517f,_0x505bbe){this['_diffRoots']['has'](_0x22517f['rootName'])?this['_diffRoots']['get'](_0x22517f['rootName'])['_isAttached']=_0x22517f['isAdd']:(this['_diffRoots']['set'](_0x22517f['rootName'],wt(_0x22517f['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x22517f['rootName'],{}),_0x505bbe&&this['_idsRoots']['set'](_0x22517f['rootName'],wt(_0x22517f['rootName'],!0x0)));const _0x31d87d=null===_0x22517f['_authorId']?null:_0x22517f['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x472f32=this['_touchedRoots']['get'](_0x22517f['rootName']);_0x472f32&&_0x472f32['userId']===_0x31d87d?this['_touchedRoots']['delete'](_0x22517f['rootName']):this['_touchedRoots']['set'](_0x22517f['rootName'],{'userId':_0x31d87d,'isAttached':_0x22517f['isAdd']});}['_handleRootAttributeOperation'](_0x3177b7){const _0x36d271=this['_diffRootsAttributes']['get'](_0x3177b7['root']['rootName']);null===_0x3177b7['newValue']?delete _0x36d271[_0x3177b7['key']]:_0x36d271[_0x3177b7['key']]=_0x3177b7['newValue'];}}function gt(_0x20ad3e){const _0x87507a=wt(_0x20ad3e['rootName'],_0x20ad3e['isAttached']());for(const _0x678a9e of _0x20ad3e['getChildren']()){const _0x19798f=_0x678a9e['_clone'](!0x0);_0x87507a['_appendChild'](_0x19798f);}return _0x87507a;}function wt(_0x534a53,_0x82e64d=!0x0){const _0x4c2c68=new _0x5b6cbc();return _0x4c2c68['rootName']=_0x534a53,_0x4c2c68['_isAttached']=_0x82e64d,_0x4c2c68['isAttached']=()=>_0x4c2c68['_isAttached'],_0x4c2c68;}function mt(_0x16af69,_0x4c9e2a,_0x731e0c){const _0x28858f='elementEnd'==_0x16af69['type']?_0x731e0c['createPositionAt'](_0x16af69['item'],'end'):_0x731e0c['createPositionBefore'](_0x16af69['item']);return _0x731e0c['createPositionFromPath'](_0x4c9e2a,_0x28858f['path'],_0x28858f['stickiness']);}function pt(_0x263913,_0x5e05ff,_0x6d4749){const _0x541a44='elementStart'==_0x263913['type']?_0x6d4749['createPositionAt'](_0x263913['item'],0x0):_0x6d4749['createPositionAfter'](_0x263913['item']);return _0x6d4749['createPositionFromPath'](_0x5e05ff,_0x541a44['path'],_0x541a44['stickiness']);}class RevisionHistorySaveRevisionFormView extends/* #__PURE__ -- @preserve */
|
|
25
|
-
|
|
26
|
-
_0x5ab6a2(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x5d7bbd){super(),this['id']=_0x5d7bbd['id']||_0x3a9e51(),this['author']=_0x5d7bbd['author'],this['type']=_0x5d7bbd['type'],this['data']=_0x5d7bbd['data']||{},this['rootName']=_0x5d7bbd['rootName'],this['set']('createdAt',_0x5d7bbd['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class RevisionDiff{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x242a06,_0x20c563){this['newRevisionId']=_0x242a06,this['oldRevisionId']=_0x20c563,this['changes']=new _0x17f096();}['_setChanges'](_0x1f198c){for(const _0x3f65b9 of _0x1f198c)this['changes']['add'](_0x3f65b9);}}class RevisionViewer extends _0x176a35{['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[_0x12edcd,et,RevisionsRepository,RevisionHistoryUtils];}constructor(_0x274823){super(_0x274823),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',(_0x40980a,_0x329e01,_0x12dd98)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x3cfb0c=>{for(const _0x4d9d53 of this['editor']['editing']['view']['document']['roots'])_0x12dd98?_0x3cfb0c['removeClass']('ck-editor__editable__overlay',_0x4d9d53):_0x3cfb0c['addClass']('ck-editor__editable__overlay',_0x4d9d53);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x45548f=>null!==_0x45548f),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x4bf2b4,_0x2c1227,_0x536cd2)=>_0x4bf2b4&&_0x536cd2?_0x2c1227['changes']['getIndex'](_0x536cd2):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x4ef316,_0x270a4f)=>_0x4ef316?_0x270a4f['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](et);}['init'](){const _0x35a4cf=this['editor'],_0x1a4e52=new ShowChangeCommand(_0x35a4cf,{'direction':'backward'}),_0x46317f=new ShowChangeCommand(_0x35a4cf,{'direction':'forward'});(_0x35a4cf['commands']['add']('showPreviousChange',_0x1a4e52),_0x35a4cf['commands']['add']('showNextChange',_0x46317f),_0x35a4cf['commands']['add']('restoreRevision',new RestoreRevisionCommand(_0x35a4cf)),this['on']('change:numberOfChanges',()=>{_0x1a4e52['refresh'](),_0x46317f['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x35a4cf['enableReadOnlyMode']('revision-viewer'),_0x35a4cf['plugins']['has']('WidgetToolbarRepository'))&&_0x35a4cf['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x48b14c){return await this['_utils']['loadRevisionData'](_0x48b14c,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x48b14c);}async['getRevisionRootsAttributes'](_0x544d4b){return await this['_utils']['loadRevisionData'](_0x544d4b,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x544d4b);}async['compare'](_0x545212,_0x438a76,_0x5ef38a=!0x1){if(!this['isEnabled'])return;const _0x4fe620=this['diff'],_0x5d963a=this['repository'],_0x18d27f='string'==typeof _0x545212?_0x5d963a['getRevision'](_0x545212):_0x545212,_0x387295='string'==typeof _0x438a76?_0x5d963a['getRevision'](_0x438a76):_0x438a76,_0x3a44e2=_0x18d27f['id'],_0x1c7b63=_0x387295?_0x387295['id']:null;if(!_0x5ef38a&&this['diff']&&this['diff']['newRevisionId']===_0x3a44e2&&this['diff']['oldRevisionId']===_0x1c7b63)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new RevisionDiff(_0x3a44e2,_0x1c7b63);const _0x3f45a8=this['_getRevisionsRange'](_0x18d27f,_0x387295,!0x0)['map'](_0x91fe60=>this['_utils']['loadRevisionData'](_0x91fe60,this['adapter']));return _0x3f45a8['push'](new Promise(_0x197180=>{setTimeout(_0x197180,0x14);})),Promise['all'](_0x3f45a8)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x51fcc8=this['_getDiff'](_0x3a44e2,_0x1c7b63);for(const _0x3a6a80 of _0x51fcc8['changes'])this['_changeIdToChange']['set'](_0x3a6a80['id'],_0x3a6a80);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x2eba77=>{for(const _0x18a13f of this['editor']['model']['document']['getRootNames']())_0x2eba77['detachRoot'](_0x18a13f);for(const _0x5b00b0 of Object['keys'](_0x51fcc8['model'])){const _0x3a4c12=_0x2eba77['addRoot'](_0x5b00b0);for(const _0x263895 of Object['keys'](_0x51fcc8['attributes'][_0x5b00b0]))_0x2eba77['setAttribute'](_0x263895,_0x51fcc8['attributes'][_0x5b00b0][_0x263895],_0x3a4c12);_0x2eba77['insert'](_0x51fcc8['model'][_0x5b00b0],_0x3a4c12,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x51fcc8['changes'])),this['isReady']=!0x0;})['catch'](_0x41e957=>{console['error'](_0x41e957),this['_cleanUp'](),_0x4fe620&&(this['diff']=_0x4fe620),this['isReady']=!0x0;});}['addRevisionData'](_0x238ce0,_0x3497b3){const _0x394dde=this['repository']['createRevision'](_0x238ce0);return _0x394dde['on']('_update',(_0x3a5d40,_0x4f538e,_0x1666df)=>_0x3497b3(_0x4f538e,_0x1666df,_0x394dde)),this['repository']['addRevision'](_0x394dde),_0x394dde;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0xf5e450=>{for(const _0x349c66 of this['editor']['model']['document']['getRootNames']())_0xf5e450['detachRoot'](_0x349c66);});}['_sortAndFilterDiffChanges'](_0x8316f){const _0x3e9dee=[],_0x2e4256=new Map();for(const _0x52f824 of this['editor']['model']['document']['getRootNames']()){const _0x44d80c=this['editor']['editing']['view']['getDomRoot'](_0x52f824);if(!_0x44d80c)continue;const _0x3677a7=_0x44d80c['getClientRects']()['item'](0x0);_0x3677a7&&(_0x3e9dee['push'](_0x52f824),_0x2e4256['set'](_0x52f824,_0x3677a7));}return _0x3e9dee['sort']((_0x18dfd2,_0x551b51)=>{const _0x1e9e4b=_0x2e4256['get'](_0x18dfd2),_0x1cdcd9=_0x2e4256['get'](_0x551b51);return _0x1e9e4b['y']-_0x1cdcd9['y']||_0x1e9e4b['x']-_0x1cdcd9['x'];}),(_0x8316f=_0x8316f['filter'](_0x675830=>_0x3e9dee['includes'](_0x675830['rootName'])))['sort']((_0x2dfadf,_0x3a1d20)=>_0x3e9dee['indexOf'](_0x2dfadf['rootName'])-_0x3e9dee['indexOf'](_0x3a1d20['rootName'])),_0x8316f;}['_makeTape'](_0x2d572a){const _0x42004b=Array['from'](_0x2d572a['markers'])['filter'](([_0x1494a0,_0xde8e9f])=>_0x1494a0['startsWith']('revision:')&&!_0xde8e9f['isCollapsed']),_0x516f25=Array['from'](this['editor']['model']['createRangeIn'](_0x2d572a)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x42004b['length'])for(const _0x29d3b6 of _0x516f25){const [_0x545b7c,_0x3e5e7c]=_0x42004b[0x0],[,_0x4f9a11,_0x39274c]=_0x545b7c['split'](':');if(_0x3e5e7c['end']['isEqual'](_0x29d3b6['nextPosition'])&&_0x42004b['shift'](),(_0x29d3b6['previousPosition']['isEqual'](_0x3e5e7c['start'])||_0x29d3b6['previousPosition']['isAfter'](_0x3e5e7c['start']))&&('insertion'==_0x4f9a11?_0x29d3b6['isAdded']={'userId':_0x39274c}:'deletion'==_0x4f9a11&&(_0x29d3b6['isRemoved']={'userId':_0x39274c})),0x0==_0x42004b['length'])break;}return _0x516f25;}['_refreshStartEndIndex'](_0x34c13d){const _0x36e041=new Map();for(let _0x2be247=0x0;_0x2be247<_0x34c13d['length'];_0x2be247++)'text'===_0x34c13d[_0x2be247]['type']?(_0x34c13d[_0x2be247]['item']['startIndex']=_0x2be247,_0x34c13d[_0x2be247]['item']['endIndex']=_0x2be247):('elementStart'===_0x34c13d[_0x2be247]['type']?_0x34c13d[_0x2be247]['item']['startIndex']=_0x2be247:'elementEnd'===_0x34c13d[_0x2be247]['type']&&(_0x34c13d[_0x2be247]['item']['endIndex']=_0x2be247),_0x36e041['set'](_0x34c13d[_0x2be247]['id'],_0x2be247));for(const _0x3f71ed of _0x36e041['values']())'elementStart'===_0x34c13d[_0x3f71ed]['type']?_0x34c13d[_0x3f71ed]['item']['endIndex']=_0x36e041['get'](_0x34c13d[_0x3f71ed]['pairId']):'elementEnd'===_0x34c13d[_0x3f71ed]['type']&&(_0x34c13d[_0x3f71ed]['item']['startIndex']=_0x36e041['get'](_0x34c13d[_0x3f71ed]['pairId']));}['_processTape'](_0x5d2d87){for(let _0x2b7d6c=0x0;_0x2b7d6c<_0x5d2d87['length'];_0x2b7d6c++){if('elementStart'===_0x5d2d87[_0x2b7d6c]['type'])_0x5d2d87[_0x2b7d6c]['item']['startIndex']=_0x2b7d6c;else{if('elementEnd'===_0x5d2d87[_0x2b7d6c]['type']){_0x5d2d87[_0x2b7d6c]['item']['endIndex']=_0x2b7d6c;const _0x16fe11=_0x5d2d87[_0x2b7d6c]['item']['startIndex'];_0x5d2d87[_0x16fe11]['pairId']=_0x5d2d87[_0x2b7d6c]['id'],_0x5d2d87[_0x2b7d6c]['pairId']=_0x5d2d87[_0x16fe11]['id'];}else _0x5d2d87[_0x2b7d6c]['item']['startIndex']=_0x2b7d6c,_0x5d2d87[_0x2b7d6c]['item']['endIndex']=_0x2b7d6c,_0x5d2d87[_0x2b7d6c]['pairId']=null;}_0x5d2d87[_0x2b7d6c]['markersStart']||(_0x5d2d87[_0x2b7d6c]['markersStart']=[],_0x5d2d87[_0x2b7d6c]['markersEnd']=[]);}}['_markInsertions'](_0x3a55c6,_0x3ae666){const _0x3cb4d0=_0x3a55c6['filter'](_0x3a0d8f=>!_0x3a0d8f['isAdded']);for(let _0x4db0db=0x0;_0x4db0db<_0x3ae666['length'];_0x4db0db++)_0x3ae666[_0x4db0db]['isAdded']&&(_0x3cb4d0[_0x4db0db]['isAdded']=_0x3ae666[_0x4db0db]['isAdded']);}['_getDiff'](_0x518986,_0x2b5e86=null){const _0x26deab=this['repository']['getRevision'](_0x518986),_0x115326=_0x2b5e86?this['repository']['getRevision'](_0x2b5e86):null,_0x6c4254=this['_getRevisionsRange'](_0x26deab,_0x115326),_0x544c59=_0x6c4254[_0x6c4254['length']-0x1],_0x1a93cb=new Map(),_0x144bb6={'model':{},'attributes':{},'changes':[]},_0x4833cb=new Set(),_0x918cc2=new Map();for(let _0x52e86a=_0x6c4254['length']-0x1;_0x52e86a>=0x0;_0x52e86a--){const _0x557cf3=_0x6c4254[_0x52e86a];for(const _0x378f98 of Object['keys'](_0x557cf3['diffData']))if(_0x557cf3['diffData'][_0x378f98]['attachChange']){const _0x4e0333=_0x557cf3['diffData'][_0x378f98]['attachChange'];_0x4e0333['isAttached']?(_0x4833cb['add'](_0x378f98),_0x918cc2['has'](_0x378f98)&&_0x918cc2['get'](_0x378f98)['userId']==_0x4e0333['userId']?_0x918cc2['delete'](_0x378f98):_0x918cc2['set'](_0x378f98,_0x4e0333)):_0x918cc2['has'](_0x378f98)?(_0x4833cb['delete'](_0x378f98),_0x918cc2['delete'](_0x378f98)):(_0x4833cb['add'](_0x378f98),_0x918cc2['set'](_0x378f98,_0x4e0333));}else _0x4833cb['add'](_0x378f98);}for(const _0x5b6d21 of _0x4833cb){const _0x967732=_0x918cc2['has'](_0x5b6d21)&&!_0x918cc2['get'](_0x5b6d21)['isAttached'];let _0x2f2b45=_0x967732?_0x6c4254['length']-0x1:0x0;const _0x56c3e1=_0x967732?-0x1:0x1;for(;_0x6c4254[_0x2f2b45];){const _0x4c9567=_0x6c4254[_0x2f2b45];if(_0x4c9567['diffData'][_0x5b6d21]){const _0x4f847e=_0x967732?_0x4c9567['diffData'][_0x5b6d21]['attributesBefore']:_0x4c9567['diffData'][_0x5b6d21]['attributesAfter'];_0x144bb6['attributes'][_0x5b6d21]=_0x4f847e?_0x2bd58a(_0x4f847e):{};break;}_0x2f2b45+=_0x56c3e1;}}for(const _0x2714df of _0x6c4254){_0x2714df['model']={};for(const _0x298584 of _0x2714df['authors'])_0x1a93cb['set'](_0x298584['id'],_0x298584);for(const _0x2ca076 of _0x4833cb){const _0x317de3=_0x2714df['diffData'][_0x2ca076]?_0x2714df['diffData'][_0x2ca076]['insertions']:'[]',_0x56791e=_0x2714df['diffData'][_0x2ca076]?_0x2714df['diffData'][_0x2ca076]['deletions']:'[]';_0x2714df['model'][_0x2ca076]={'insertions':this['_utils']['_makeModelFromViewString'](_0x317de3),'deletions':this['_utils']['_makeModelFromViewString'](_0x56791e)};}}for(const _0x4220fb of _0x4833cb){let _0x1523d5=null,_0x41ae98=0x0;const _0x2975ac=new Map(Array['from'](_0x26deab['model'][_0x4220fb]['insertions']['markers'])['filter'](([_0x4eb1b2])=>!_0x4eb1b2['startsWith']('revision:')));let _0x3d32e3=0x0;for(const _0x1b16bc of _0x6c4254){const _0x54b680=this['_makeTape'](_0x1b16bc['model'][_0x4220fb]['insertions']);_0x1b16bc==_0x26deab?(_0x1523d5=_0x54b680,_0x41ae98=_0x1523d5['length'],_0x1523d5['forEach'](_0x26eb3c=>{_0x26eb3c['id']=_0x3d32e3++;}),this['_processTape'](_0x1523d5)):this['_markInsertions'](_0x1523d5,_0x54b680);const _0x4012a3=_0x1523d5['filter'](_0x2bda3d=>!_0x2bda3d['isAdded'])['map'](_0x4e6eab=>_0x4e6eab['id']);let _0x347d3b=0x0;const _0x268690=this['_makeTape'](_0x1b16bc['model'][_0x4220fb]['deletions']);_0x268690['forEach'](_0x15e7c5=>{_0x15e7c5['isRemoved']?_0x15e7c5['id']=_0x41ae98++:_0x15e7c5['id']=_0x4012a3[_0x347d3b++];}),this['_processTape'](_0x268690),this['_setDistance'](_0x1523d5,'isAdded'),this['_setDistance'](_0x268690,'isRemoved'),_0x1b16bc==_0x26deab&&this['_markMarkers'](_0x1523d5,_0x2975ac),_0x1523d5=this['_joinTapes'](_0x1523d5,_0x268690),this['_refreshStartEndIndex'](_0x1523d5),this['_setDistance'](_0x1523d5,'isRemoved');}_0x1523d5=_0x1523d5['filter'](_0x15e1ca=>!(_0x15e1ca['isAdded']&&_0x15e1ca['isRemoved']));const _0x10d2df=new Map(_0x544c59['model'][_0x4220fb]['deletions']['markers']),_0x262ee6=new Set(_0x2975ac['keys']());for(const _0x20663d of _0x10d2df['keys']())_0x262ee6['delete'](_0x20663d);this['_markSuggestions'](_0x1523d5,_0x262ee6),this['_fixObsoleteTags'](_0x1523d5),_0x1523d5=this['_removeMissingPairs'](_0x1523d5),_0x1523d5=this['_markMismatchedRemovedTags'](_0x1523d5),_0x1523d5=this['_removeUnsupportedChanges'](_0x1523d5);const {root:_0x4daede,changes:_0xc5a9b7}=this['_makeModelFromTape'](_0x1523d5,_0x1a93cb,_0x4220fb);_0x144bb6['model'][_0x4220fb]=_0x4daede;const _0x4ea7ae=_0x918cc2['get'](_0x4220fb);if(_0x4ea7ae){const _0x26a3a9=_0x1a93cb['get'](_0x4ea7ae['userId']),_0x51b65e=new ChangeItem({'author':_0x26a3a9,'type':_0x4ea7ae['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x4220fb});_0xc5a9b7['unshift'](_0x51b65e),_0x144bb6['attributes'][_0x4220fb]['revisionHistoryAttachChange']=_0x51b65e['id'];}_0x144bb6['changes']=_0x144bb6['changes']['concat'](_0xc5a9b7);}return _0x144bb6;}['_markMarkers'](_0x2b8213,_0x41c714){for(let _0xcc8d0b=0x0;_0xcc8d0b<_0x2b8213['length'];_0xcc8d0b++)for(const [_0x50b748,_0xa9d91]of _0x41c714)!_0xa9d91['isCollapsed']&&_0xa9d91['start']['isEqual'](_0x2b8213[_0xcc8d0b]['previousPosition'])&&_0x2b8213[_0xcc8d0b]['markersStart']['push'](_0x50b748),_0xa9d91['end']['isEqual'](_0x2b8213[_0xcc8d0b]['nextPosition'])&&_0x2b8213[_0xcc8d0b]['markersEnd']['push'](_0x50b748);}['_joinTapes'](_0x326b11,_0x208932){let _0x55a3b2=[],_0x5b60b1=0x0,_0x4bbe00=0x0;for(;_0x5b60b1<_0x326b11['length']||_0x4bbe00<_0x208932['length'];){const _0x52a26f=_0x326b11[_0x5b60b1]||{},_0x39b9dc=_0x208932[_0x4bbe00]||{};if(_0x52a26f['id']==_0x39b9dc['id'])_0x5b60b1++,_0x4bbe00++,_0x55a3b2['push'](_0x52a26f);else{if(_0x39b9dc['isRemoved']&&_0x52a26f['isAdded']){const {commonTape:_0x11dd56,iEnd:_0xc6e446,jEnd:_0x785adb}=this['_threeWayMerge'](_0x326b11,_0x5b60b1,_0x208932,_0x4bbe00);_0x55a3b2=_0x55a3b2['concat'](_0x11dd56),_0x5b60b1=_0xc6e446,_0x4bbe00=_0x785adb;}else _0x39b9dc['isRemoved']?(_0x4bbe00++,_0x55a3b2['push'](_0x39b9dc)):(_0x5b60b1++,_0x55a3b2['push'](_0x52a26f));}}return _0x55a3b2;}['_markSuggestions'](_0x8b0f98,_0xa6dc29){const _0x878ed3=[];for(let _0x40d8f7=0x0;_0x40d8f7<_0x8b0f98['length'];_0x40d8f7++){for(let _0x593e4f=0x0;_0x593e4f<_0x8b0f98[_0x40d8f7]['markersStart']['length'];_0x593e4f++){const _0x52f654=_0x8b0f98[_0x40d8f7]['markersStart'][_0x593e4f];if(!_0xa6dc29['has'](_0x52f654))continue;const {group:_0x312f61,type:_0x5eb85d,authorId:_0x5aacfd}=_0x179358(_0x52f654);'revision-suggestion'!=_0x312f61||'insertion'!=_0x5eb85d&&'deletion'!=_0x5eb85d||(_0x878ed3['unshift']({'type':_0x5eb85d,'name':_0x52f654,'userId':_0x5aacfd}),_0x8b0f98[_0x40d8f7]['markersStart']['splice'](_0x593e4f,0x1),_0x593e4f--);}_0x43b6fd(_0x8b0f98[_0x40d8f7]);for(let _0x189a71=0x0;_0x189a71<_0x8b0f98[_0x40d8f7]['markersEnd']['length'];_0x189a71++){const _0x49b1a1=_0x8b0f98[_0x40d8f7]['markersEnd'][_0x189a71];if(!_0xa6dc29['has'](_0x49b1a1))continue;const {group:_0xda6687,type:_0x7ecdb6}=_0x179358(_0x49b1a1);if('revision-suggestion'!=_0xda6687||'insertion'!=_0x7ecdb6&&'deletion'!=_0x7ecdb6)continue;_0x8b0f98[_0x40d8f7]['markersEnd']['splice'](_0x189a71,0x1),_0x189a71--;const _0x45bc3d=_0x878ed3['findIndex'](_0x3a5b47=>_0x3a5b47['name']==_0x49b1a1);_0x45bc3d>-0x1&&_0x878ed3['splice'](_0x45bc3d,0x1);}}function _0x179358(_0x1e62f9){const _0x456a34=_0x1e62f9['split'](':');return{'group':_0x456a34[0x0],'type':_0x456a34[0x1],'subType':_0x456a34['length']>=0x5?_0x456a34[0x2]:null,'id':_0x456a34['length']<0x5?_0x456a34[0x2]:_0x456a34[0x3],'authorId':_0x456a34['length']<0x5?_0x456a34[0x3]:_0x456a34[0x4],'markerCount':0x6==_0x456a34['length']?_0x456a34[0x5]:null};}function _0x43b6fd(_0x350bdc){for(let _0x599116=0x0;_0x599116<_0x878ed3['length'];_0x599116++){if(_0x350bdc['isAdded']&&'insertion'==_0x878ed3[_0x599116]['type']&&_0x350bdc['isAdded']['userId']==_0x878ed3[_0x599116]['userId'])return _0x350bdc['isAddSuggestion']=_0x878ed3[_0x599116],void delete _0x350bdc['isAdded'];if(!_0x350bdc['isAdded']&&!_0x350bdc['isRemoved']&&'deletion'==_0x878ed3[_0x599116]['type'])return void(_0x350bdc['isRemoveSuggestion']=_0x878ed3[_0x599116]);}}}['_setDistance'](_0x768a6d,_0x3dd234){let _0x4f1e4b=0x0,_0x5eeb10=!0x1;const _0x885240=new Map();for(const _0x151eba of _0x768a6d)_0x151eba[_0x3dd234]?_0x5eeb10&&(_0x4f1e4b++,_0x5eeb10=!0x1):(_0x4f1e4b++,_0x5eeb10=!0x0),_0x885240['set'](_0x151eba['id'],_0x4f1e4b);for(let _0x9869dc=0x0;_0x9869dc<_0x768a6d['length'];_0x9869dc++){if('isRemoved'==_0x3dd234&&_0x768a6d[_0x9869dc]['isAdded']||'isAdded'==_0x3dd234&&_0x768a6d[_0x9869dc]['isRemoved'])continue;if('text'==_0x768a6d[_0x9869dc]['type']){_0x768a6d[_0x9869dc]['distance']=0x0;continue;}const _0x4b92b7=_0x885240['get'](_0x768a6d[_0x9869dc]['pairId']),_0x35292d=_0x885240['get'](_0x768a6d[_0x9869dc]['id']);_0x768a6d[_0x9869dc]['distance']=_0x4b92b7-_0x35292d;}}['_getRevisionsRange'](_0x5a427d,_0x37dbf1,_0x788c27=!0x1){const _0x5bce0c=[];let _0x167e9b=this['repository']['getIndex'](_0x5a427d),_0x17c0aa=this['repository']['getIndex'](_0x37dbf1);for(-0x1==_0x17c0aa&&(_0x17c0aa=this['repository']['_revisions']['length'],_0x788c27=!0x1);_0x167e9b<_0x17c0aa;)_0x5bce0c['push'](this['repository']['getRevision'](_0x167e9b)),_0x167e9b++;return _0x788c27&&_0x5bce0c['push'](this['repository']['getRevision'](_0x167e9b)),_0x5bce0c;}['_threeWayMerge'](_0x136fa6,_0xe2c1fd,_0x1ba963,_0x4362d5){const _0x354256=this['editor']['model']['schema'];let _0x5dd876=_0xe2c1fd;for(;_0x136fa6[_0x5dd876]&&_0x136fa6[_0x5dd876]['isAdded'];)_0x5dd876++;let _0x3cd2e6=_0x4362d5;for(;_0x1ba963[_0x3cd2e6]&&_0x1ba963[_0x3cd2e6]['isRemoved'];)_0x3cd2e6++;_0x190316(_0x136fa6,_0xe2c1fd,_0x5dd876),_0x190316(_0x1ba963,_0x4362d5,_0x3cd2e6);const _0x439ad3=_0x1ba963['slice'](_0x4362d5,_0x3cd2e6)['concat'](_0x136fa6['slice'](_0xe2c1fd,_0x5dd876));return _0x439ad3['sort']((_0x597871,_0x5aabf1)=>_0x597871['side']!=_0x5aabf1['side']?_0x597871['side']-_0x5aabf1['side']:_0x597871['level']!=_0x5aabf1['level']?_0x597871['level']-_0x5aabf1['level']:_0x597871['distance']!=_0x5aabf1['distance']?_0x5aabf1['distance']-_0x597871['distance']:!!_0x597871['isAdded']!=!!_0x5aabf1['isAdded']?-0x1==_0x597871['side']||0x0==_0x597871['side']?_0x597871['isAdded']?-0x1:0x1:_0x597871['isAdded']?0x1:-0x1:_0x597871['index']-_0x5aabf1['index']),{'commonTape':_0x439ad3,'iEnd':_0x5dd876,'jEnd':_0x3cd2e6};function _0x190316(_0x37d925,_0x47a2f4,_0xac9f46){let _0x22bd73=-0x1,_0xcd944b=Number['POSITIVE_INFINITY'],_0x49b45f=!0x0;for(let _0x1f76c3=_0x47a2f4;_0x1f76c3<_0xac9f46;_0x1f76c3++)if(_0x354256['isInline'](_0x37d925[_0x1f76c3]['item'])||(_0x49b45f=!0x1),_0x37d925[_0x1f76c3]['item']['startIndex']<_0x47a2f4&&(_0x22bd73=_0x1f76c3),_0x37d925[_0x1f76c3]['item']['endIndex']>=_0xac9f46){_0xcd944b=_0x1f76c3;break;}_0x49b45f&&(_0x22bd73=_0xac9f46-0x1);for(let _0x453570=_0x47a2f4;_0x453570<_0xac9f46;_0x453570++)_0x37d925[_0x453570]['side']=_0x453570<=_0x22bd73?-0x1:_0x453570<_0xcd944b?0x0:0x1,_0x37d925[_0x453570]['index']=_0x453570;let _0x44b3ca=0x0;for(let _0x23cd0e=_0x47a2f4;_0x23cd0e<=_0x22bd73;_0x23cd0e++)0x0==_0x37d925[_0x23cd0e]['distance']?_0x37d925[_0x23cd0e]['level']=_0x44b3ca:(_0x44b3ca++,_0x37d925[_0x23cd0e]['level']=_0x44b3ca,_0x44b3ca++);for(let _0x230f11=_0x47a2f4;_0x230f11<_0xac9f46;_0x230f11++)0x0==_0x37d925[_0x230f11]['side']&&(_0x37d925[_0x230f11]['level']=_0x44b3ca);_0x44b3ca=0x0;for(let _0x57164e=_0xac9f46-0x1;_0x57164e>=_0xcd944b;_0x57164e--)0x0==_0x37d925[_0x57164e]['distance']?_0x37d925[_0x57164e]['level']=_0x44b3ca:(_0x44b3ca--,_0x37d925[_0x57164e]['level']=_0x44b3ca,_0x44b3ca--);}}['_fixObsoleteTags'](_0x1f4696){const _0x51fe2f=new Map(),_0x48d88d=this['editor']['model']['schema'];for(let _0x1de19c=0x1;_0x1de19c<_0x1f4696['length'];_0x1de19c++){let _0x4ca424,_0x3d7e0a,_0x445686;const _0x3665c8=_0x1f4696[_0x1de19c],_0x1be7c4=_0x1f4696[_0x1de19c-0x1];if('text'==_0x3665c8['type'])continue;if(_0x3665c8['type']!=_0x1be7c4['type'])continue;if(!_0x48d88d['isBlock'](_0x1be7c4['item'])||_0x48d88d['isLimit'](_0x1be7c4['item']))continue;if(!_0x48d88d['isBlock'](_0x3665c8['item'])||_0x48d88d['isLimit'](_0x3665c8['item']))continue;if((_0x1f4696[_0x1de19c]['isAdded']||_0x1f4696[_0x1de19c]['isAddSuggestion'])&&_0x1f4696[_0x1de19c-0x1]['isRemoved'])_0x4ca424=_0x1f4696[_0x1de19c],_0x3d7e0a=_0x1f4696[_0x1de19c-0x1],_0x445686=_0x1de19c-0x1;else{if(!_0x1f4696[_0x1de19c]['isRemoved']||!_0x1f4696[_0x1de19c-0x1]['isAdded']&&!_0x1f4696[_0x1de19c-0x1]['isAddSuggestion'])continue;_0x4ca424=_0x1f4696[_0x1de19c-0x1],_0x3d7e0a=_0x1f4696[_0x1de19c],_0x445686=_0x1de19c;}const _0x412e0d=_0x4ca424['level']==_0x3d7e0a['level'],_0xe76ba2=Math['abs'](_0x4ca424['level'])<Math['abs'](_0x3d7e0a['level'])&&0x0==_0x3d7e0a['distance'];(_0x412e0d||_0xe76ba2)&&(_0x51fe2f['set'](_0x3d7e0a['id'],_0x4ca424['id']),_0x1f4696['splice'](_0x445686,0x1),_0x1de19c--,_0x4ca424['isAdded']=!0x1);}for(let _0x32c359=0x0;_0x32c359<_0x1f4696['length'];_0x32c359++)_0x51fe2f['has'](_0x1f4696[_0x32c359]['pairId'])&&(_0x1f4696[_0x32c359]['pairId']=_0x51fe2f['get'](_0x1f4696[_0x32c359]['pairId']));}['_removeMissingPairs'](_0x59008d){const _0xd5e995=new Set(_0x59008d['map'](_0xad0341=>_0xad0341['id']));for(let _0x4de76a=0x0;_0x4de76a<_0x59008d['length'];_0x4de76a++)_0xd5e995['has'](_0x59008d[_0x4de76a]['pairId'])||0x0==_0x59008d[_0x4de76a]['distance']||(_0x59008d[_0x4de76a]['isIncorrect']=!0x0);return _0x59008d['filter'](_0x4b0a9c=>!_0x4b0a9c['isIncorrect']);}['_markMismatchedRemovedTags'](_0x258143){const _0x27f0c4=new Set();for(let _0x8014ec=0x0;_0x8014ec<_0x258143['length'];_0x8014ec++){if(_0x27f0c4['has'](_0x258143[_0x8014ec]['id'])&&_0x258143[_0x8014ec]['isRemoved']&&(_0x258143[_0x8014ec]['isIncorrect']=!0x0),_0x258143[_0x8014ec]['isIncorrect'])continue;if(0x0==_0x258143[_0x8014ec]['distance'])continue;if('elementStart'!=_0x258143[_0x8014ec]['type'])continue;if(null==_0x258143[_0x8014ec]['pairId'])continue;let _0x1ced9b=_0x8014ec+0x1,_0x355194=0x0;for(;_0x258143[_0x1ced9b]['id']!=_0x258143[_0x8014ec]['pairId'];)'elementStart'==_0x258143[_0x1ced9b]['type']?_0x355194++:'elementEnd'==_0x258143[_0x1ced9b]['type']&&_0x355194--,_0x1ced9b++;if(0x0!=_0x355194){if(_0x258143[_0x8014ec]['isRemoved'])_0x258143[_0x8014ec]['isIncorrect']=!0x0;else{for(;_0x1ced9b!=_0x8014ec;)_0x258143[_0x1ced9b]['isRemoved']&&0x0!=_0x258143[_0x1ced9b]['distance']&&(_0x258143[_0x1ced9b]['isIncorrect']=!0x0,_0x27f0c4['add'](_0x258143[_0x1ced9b]['pairId'])),_0x1ced9b--;}}}return _0x258143['filter'](_0x3be12d=>!_0x3be12d['isIncorrect']);}['_removeUnsupportedChanges'](_0x2dd0a3){const _0x33b5e9=this['editor']['model']['schema'];for(let _0x35e38e=0x0;_0x35e38e<_0x2dd0a3['length'];_0x35e38e++){if(!(_0x2dd0a3[_0x35e38e]['isAdded']||_0x2dd0a3[_0x35e38e]['isAddSuggestion']||_0x2dd0a3[_0x35e38e]['isRemoved']||_0x2dd0a3[_0x35e38e]['isRemoveSuggestion']))continue;if(0x0==_0x2dd0a3[_0x35e38e]['distance'])continue;const _0x51a9d4=_0x2dd0a3[_0x35e38e]['item'];_0x33b5e9['isBlock'](_0x51a9d4)||_0x33b5e9['isLimit'](_0x51a9d4)||(_0x2dd0a3[_0x35e38e]['isAdded']&&delete _0x2dd0a3[_0x35e38e]['isAdded'],_0x2dd0a3[_0x35e38e]['isAddSuggestion']&&delete _0x2dd0a3[_0x35e38e]['isAddSuggestion'],_0x2dd0a3[_0x35e38e]['isRemoveSuggestion']&&delete _0x2dd0a3[_0x35e38e]['isRemoveSuggestion'],_0x2dd0a3[_0x35e38e]['isRemoved']&&(_0x2dd0a3[_0x35e38e]['isIncorrect']=!0x0));}return _0x2dd0a3['filter'](_0x12daa3=>!_0x12daa3['isIncorrect']);}['_makeModelFromTape'](_0x5e41c7,_0x176a14,_0x18b21b){const _0x54207b=new _0x5b6cbc(),_0x594621=[],_0x347f08=new Map(),_0xfe2982=this['editor']['model'],_0x37ee79=_0xfe2982['schema'],_0x58ab68=[_0x54207b],_0x1b6e26={},_0x8ab383={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x33a703=null;const _0x377f43=[0x0];for(let _0x381fa3=0x0;_0x381fa3<_0x5e41c7['length'];_0x381fa3++)if('elementStart'===_0x5e41c7[_0x381fa3]['type']){_0x5e41c7[_0x381fa3]['previousPosition']=_0xfe2982['createPositionFromPath'](_0x54207b,_0x377f43);const _0xea24ca=new _0x3b031c(_0x5e41c7[_0x381fa3]['item']['name'],_0x5e41c7[_0x381fa3]['item']['getAttributes']());_0x58ab68[0x0]['_appendChild'](_0xea24ca),_0x377f43['push'](0x0),_0x58ab68['unshift'](_0xea24ca),_0x5e41c7[_0x381fa3]['nextPosition']=_0xfe2982['createPositionFromPath'](_0x54207b,_0x377f43);}else'elementEnd'===_0x5e41c7[_0x381fa3]['type']?(_0x58ab68['shift'](),_0x5e41c7[_0x381fa3]['previousPosition']=_0xfe2982['createPositionFromPath'](_0x54207b,_0x377f43),_0x377f43['pop'](),_0x377f43[_0x377f43['length']-0x1]++,_0x5e41c7[_0x381fa3]['nextPosition']=_0xfe2982['createPositionFromPath'](_0x54207b,_0x377f43)):(_0x5e41c7[_0x381fa3]['previousPosition']=_0xfe2982['createPositionFromPath'](_0x54207b,_0x377f43),_0x33a703?_0x33a703['_data']+=_0x5e41c7[_0x381fa3]['item']['data']:_0x33a703=new _0x21be22(_0x5e41c7[_0x381fa3]['item']['data'],_0x5e41c7[_0x381fa3]['item']['getAttributes']()),_0x5e41c7[_0x381fa3+0x1]&&'text'===_0x5e41c7[_0x381fa3+0x1]['type']&&_0x63b352(_0x33a703,_0x5e41c7[_0x381fa3+0x1]['item'])||(_0x58ab68[0x0]['_appendChild'](_0x33a703),_0x33a703=null),_0x377f43[_0x377f43['length']-0x1]+=_0x5e41c7[_0x381fa3]['item']['offsetSize'],_0x5e41c7[_0x381fa3]['nextPosition']=_0xfe2982['createPositionFromPath'](_0x54207b,_0x377f43));for(let _0x167304=0x0;_0x167304<_0x5e41c7['length'];_0x167304++){const _0x1b7191=_0x5e41c7[_0x167304]['previousPosition'],_0xed5f6d=_0x5e41c7[_0x167304]['nextPosition'];for(const _0x4e22b4 of _0x5e41c7[_0x167304]['markersStart'])_0x347f08['set'](_0x4e22b4,{'start':_0x1b7191,'end':null});_0x12a004('isRemoveSuggestion',_0x167304,_0x1b7191,_0xed5f6d),_0x12a004('isAddSuggestion',_0x167304,_0x1b7191,_0xed5f6d),_0x12a004('isRemoved',_0x167304,_0x1b7191,_0xed5f6d),_0x12a004('isAdded',_0x167304,_0x1b7191,_0xed5f6d);for(const _0x4139cf of _0x5e41c7[_0x167304]['markersEnd']){const _0x473e95=_0x347f08['get'](_0x4139cf);_0x473e95?_0x473e95['end']=_0xed5f6d:_0x347f08['set'](_0x4139cf,{'start':_0xed5f6d,'end':_0xed5f6d});}}for(const [_0x37e7d5,_0x4f20ac]of _0x347f08){const _0x3b5ee4=this['editor']['model']['createRange'](_0x4f20ac['start'],_0x4f20ac['end']);_0x54207b['markers']['set'](_0x37e7d5,_0x3b5ee4);}return _0x594621['sort']((_0x2058c9,_0x5048b6)=>{const _0x582fcd=_0x54207b['markers']['get']('revision:'+_0x2058c9['id']),_0x1ff28b=_0x54207b['markers']['get']('revision:'+_0x5048b6['id']);return _0x582fcd['start']['isBefore'](_0x1ff28b['start'])?-0x1:_0x582fcd['start']['isAfter'](_0x1ff28b['start'])?0x1:_0x582fcd['end']['isBefore'](_0x1ff28b['end'])?-0x1:_0x582fcd['end']['isAfter'](_0x1ff28b['end'])?0x1:'add'===_0x2058c9['type']?-0x1:0x1;}),{'root':_0x54207b,'changes':_0x594621};function _0x12a004(_0x2ec863,_0x2db52c,_0x267932,_0x5b5053){const _0x295477=!!_0x5e41c7[_0x2db52c][_0x2ec863],_0x573423=_0x295477?_0x5e41c7[_0x2db52c][_0x2ec863]['userId']:null,_0x530676=_0x2db52c===_0x5e41c7['length']-0x1,_0x11a1ec=_0x8ab383[_0x2ec863][0x0],_0x5df041=_0x37ee79['isObject'](_0x5e41c7[_0x2db52c]['item']);!_0x1b6e26[_0x2ec863]&&_0x295477?_0x1b6e26[_0x2ec863]={'start':_0x267932,'tapeItem':_0x5e41c7[_0x2db52c],'userId':_0x573423,'type':_0x2ec863}:_0x1b6e26[_0x2ec863]&&!_0x295477?(_0x1b6e26[_0x2ec863]['end']=_0x267932,_0x354882(_0x1b6e26[_0x2ec863]),_0x1b6e26[_0x2ec863]=null):_0x1b6e26[_0x2ec863]&&_0x295477&&_0x1b6e26[_0x2ec863]['userId']!==_0x573423&&(_0x1b6e26[_0x2ec863]['end']=_0x267932,_0x11a1ec&&_0x11a1ec['userId']===_0x1b6e26[_0x2ec863]['userId']||_0x354882(_0x1b6e26[_0x2ec863]),_0x1b6e26[_0x2ec863]={'start':_0x267932,'tapeItem':_0x5e41c7[_0x2db52c],'userId':_0x573423,'type':_0x2ec863}),_0x1b6e26[_0x2ec863]&&_0x5df041&&('elementStart'!==_0x5e41c7[_0x2db52c]['type']||_0x11a1ec&&_0x11a1ec['userId']===_0x573423||_0x8ab383[_0x2ec863]['unshift']({'userId':_0x573423,'object':_0x5e41c7[_0x2db52c]['item'],'change':_0x1b6e26[_0x2ec863]}),'elementEnd'===_0x5e41c7[_0x2db52c]['type']&&_0x11a1ec&&_0x11a1ec['object']===_0x5e41c7[_0x2db52c]['item']&&(_0x8ab383[_0x2ec863]['shift'](),_0x1b6e26[_0x2ec863]=_0x11a1ec['change'])),_0x1b6e26[_0x2ec863]&&_0x530676&&(_0x1b6e26[_0x2ec863]['end']=_0x5b5053,_0x354882(_0x1b6e26[_0x2ec863]),_0x1b6e26[_0x2ec863]=null);}function _0x354882({start:_0x2b2bf5,end:_0x5cd735,tapeItem:_0x363a19,userId:_0x175cab,type:_0x5c2e6c}){const _0x1806ce=_0x363a19['item'],_0x237ffc=_0xfe2982['schema']['isBlock'](_0x1806ce)&&!_0xfe2982['schema']['isLimit'](_0x1806ce),_0x4e5f59=_0x2b2bf5['nodeAfter']==_0x5cd735['parent']&&_0x5cd735['isAtStart'];if(_0x237ffc&&_0x4e5f59)return;const _0x12986c=_0xfe2982['createRange'](_0x2b2bf5,_0x5cd735),_0x58a08c=_0x176a14['get'](_0x175cab),_0x518512=new ChangeItem({'author':_0x58a08c,'type':'isAdded'==_0x5c2e6c||'isAddSuggestion'==_0x5c2e6c?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x5c2e6c||'isRemoveSuggestion'==_0x5c2e6c},'createdAt':new Date(),'rootName':_0x18b21b});_0x594621['push'](_0x518512),_0x54207b['markers']['set']('revision:'+_0x518512['id'],_0x12986c);}function _0x63b352(_0x32106b,_0x19f5b8){const _0x122c21=_0x32106b['getAttributes'](),_0x3438d1=_0x19f5b8['getAttributes']();for(const _0x217685 of _0x122c21){if(_0x217685[0x1]!==_0x19f5b8['getAttribute'](_0x217685[0x0]))return!0x1;_0x3438d1['next']();}return _0x3438d1['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0xfe826c=>{const _0x41c6d5=_0xfe826c['markerName']['split'](':')[0x1],_0xf40b89=this['_getChangeFromId'](_0x41c6d5);if(!_0xf40b89)return null;const _0x30893d='add'==_0xf40b89['type']?'insertion':'deletion',_0x474f7f=['ck-suggestion-marker','ck-suggestion-marker-'+_0x30893d];return _0xf40b89['data']['isSuggestion']&&_0x474f7f['push']('ck-suggestion-marker-'+_0x30893d+'-new'),this['activeChange']==_0xf40b89&&_0x474f7f['push']('ck-suggestion-marker--active'),{'classes':_0x474f7f,'attributes':{'data-change-id':_0x41c6d5}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x43b410=>{_0x43b410['on']('element:pre',(_0x2d0472,_0x2fb632,_0x645a1a)=>{const _0x5b64e8=_0x2fb632['viewItem']['getChild'](0x0);if(!_0x5b64e8||!_0x5b64e8['is']('element','code'))return;if(!_0x645a1a['consumable']['consume'](_0x5b64e8,{'attributes':['vid_start','vid_end']}))return;const _0x5c216a=_0x2fb632['modelRange']['start']['nodeAfter'];_0x645a1a['writer']['setAttribute']('vid_start',_0x5b64e8['getAttribute']('vid_start'),_0x5c216a),_0x645a1a['writer']['setAttribute']('vid_end',_0x5b64e8['getAttribute']('vid_end'),_0x5c216a);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x408446=>{_0x408446['on']('element',(_0x4a229a,_0x2aaa3b,_0x811042)=>{if(!_0x811042['consumable']['consume'](_0x2aaa3b['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x2aaa3b['modelRange']['isCollapsed'])return;const _0x4be171=_0x2aaa3b['modelRange']['start']['nodeAfter'];_0x4be171['hasAttribute']('vid_start')||_0x4be171['hasAttribute']('vid')||(_0x811042['writer']['setAttribute']('vid_start',_0x2aaa3b['viewItem']['getAttribute']('vid_start'),_0x4be171),_0x811042['writer']['setAttribute']('vid_end',_0x2aaa3b['viewItem']['getAttribute']('vid_end'),_0x4be171));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x3a7b32=>_0x3a7b32['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x5b39ae,[,_0x3a4068])=>{['vid_start','vid_end','vid']['includes'](_0x3a4068)&&(_0x5b39ae['return']=!0x0,_0x5b39ae['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x1dabc3=>{_0x1dabc3['on']('attribute:vid',(_0x4ea6f8,_0x4a3a87,_0x4badf2)=>{if('\x20'!=_0x4a3a87['item']['data']||_0x4a3a87['item']['parent']['maxOffset']>0x1)return;if(!_0x4badf2['consumable']['consume'](_0x4a3a87['item'],_0x4ea6f8['name']))return;const _0x18934b=_0x4badf2['writer'],_0xe1bfe2=_0x4badf2['mapper']['toViewRange'](_0x4a3a87['range']);_0x18934b['wrap'](_0xe1bfe2,_0x18934b['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x29ac07){const _0x670cbc=_0x29ac07['plugins']['get']('RevisionViewer');return(_0x115c4a,_0x190a2c,_0x306f50)=>{const _0x195680=_0x190a2c['markerName']['split'](':')[0x1],_0x592893=_0x670cbc['_getChangeFromId'](_0x195680);if(!_0x592893)return null;const _0xf20513='add'==_0x592893['type']?'split':'merge';if(!_0x306f50['consumable']['test'](_0x190a2c['markerRange'],_0x115c4a['name']))return;const _0x1a9e73=_0x190a2c['markerRange']['getWalker'](),_0x32fe66=_0x190a2c['markerRange']['start'],_0x41351f=_0x29ac07['model']['schema'];let _0x4d6e5c=null,_0x51a891=null,_0x197033=!0x1,_0x431665=!0x1;for(const _0x44add6 of _0x1a9e73){const _0x5f4692=_0x44add6['item'];_0x197033=_0x197033||_0x41351f['isContent'](_0x5f4692);const _0x176e3d=_0x306f50['mapper']['toViewElement'](_0x5f4692);if(_0x176e3d&&_0x176e3d['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x44add6['type']&&(_0x41351f['isBlock'](_0x5f4692)&&!_0x41351f['isLimit'](_0x5f4692)&&(_0x5f4692['nextSibling']||_0x32fe66['isAtEnd']?_0x4d6e5c&&_0x4d6e5c['parent']==_0x5f4692||(_0x4d6e5c=_0x5f4692,_0x1ee556(_0x44add6['previousPosition']),_0x431665=!0x0):_0x51a891=_0x51a891||_0x44add6['previousPosition']));}function _0x1ee556(_0x5e469a){const _0xad97f1=_0x306f50['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0xf20513}),_0x22c168=_0x306f50['mapper']['toViewPosition'](_0x5e469a);_0x592893['data']['isSuggestion']&&_0x306f50['writer']['addClass']('ck-suggestion-marker-'+_0xf20513+'-new',_0xad97f1),_0x670cbc['activeChange']==_0x592893&&_0x306f50['writer']['addClass']('ck-suggestion-marker--active',_0xad97f1),_0x306f50['writer']['insert'](_0x22c168,_0xad97f1),_0x306f50['mapper']['bindElementToMarker'](_0xad97f1,_0x190a2c['markerName']);}_0x197033||_0x431665||!_0x51a891||_0x1ee556(_0x51a891);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x123d68,_0x20f50,_0x2067b3)=>{const _0x42f152=_0x2067b3['mapper']['markerNameToElements'](_0x20f50['markerName']);if(_0x42f152){for(const _0x354412 of _0x42f152)(_0x354412['hasClass']('ck-suggestion-marker-split')||_0x354412['hasClass']('ck-suggestion-marker-merge'))&&(_0x2067b3['mapper']['unbindElementFromMarkerName'](_0x354412,_0x20f50['markerName']),_0x2067b3['writer']['remove'](_0x354412));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x3fa523,_0xd77ae3,_0x3a1aa4)=>{const _0x58db06=_0xd77ae3['markerName']['split'](':')[0x1],_0x1ead0d=this['_getChangeFromId'](_0x58db06);if(!_0x1ead0d)return null;const _0x361cf8='add'==_0x1ead0d['type']?'split':'merge';if(_0x3a1aa4['consumable']['test'](_0xd77ae3['markerRange'],_0x3fa523['name']))for(const _0x555f88 of _0xd77ae3['markerRange']['getItems']()){if(!_0x555f88['is']('element','softBreak'))continue;const _0xf50b32=_0x3a1aa4['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x361cf8}),_0x30b174=_0x3a1aa4['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x555f88));_0x1ead0d['data']['isSuggestion']&&_0x3a1aa4['writer']['addClass']('ck-suggestion-marker-'+_0x361cf8+'-new',_0xf50b32),this['activeChange']==_0x1ead0d&&_0x3a1aa4['writer']['addClass']('ck-suggestion-marker--active',_0xf50b32),_0x3a1aa4['writer']['insert'](_0x30b174,_0xf50b32),_0x3a1aa4['mapper']['bindElementToMarker'](_0xf50b32,_0xd77ae3['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x748afb=>{for(const _0x2313a0 of this['editor']['model']['document']['getRootNames']()){const _0x39a08f=this['editor']['model']['document']['getRoot'](_0x2313a0),_0x3b4e25=this['editor']['editing']['view']['document']['getRoot'](_0x2313a0);if(_0x3b4e25){const _0x5adf52=_0x39a08f['getAttribute']('revisionHistoryAttachChange');if(_0x748afb['removeAttribute']('data-change-id',_0x3b4e25),_0x748afb['removeClass']('ck-revision-history-root-add',_0x3b4e25),_0x748afb['removeClass']('ck-revision-history-root-remove',_0x3b4e25),_0x748afb['removeClass']('ck-revision-history-root--active',_0x3b4e25),_0x5adf52){const _0x5e94a8=this['_getChangeFromId'](_0x5adf52);if(!_0x5e94a8)return null;_0x748afb['setAttribute']('data-change-id',_0x5adf52,_0x3b4e25),_0x748afb['addClass']('ck-revision-history-root-'+_0x5e94a8['type'],_0x3b4e25),this['activeChange']==_0x5e94a8&&_0x748afb['addClass']('ck-revision-history-root--active',_0x3b4e25);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x207c6d=>'revision-comment:'+_0x207c6d,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x5ac3d7=>'revision-suggestion:'+_0x5ac3d7,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0xd5dd07=>({'name':'suggestion:'+_0xd5dd07,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x112865=>{const _0x25c473=_0x112865['markerName']['split'](':')[0x1];return'insertion'!=_0x25c473&&'deletion'!=_0x25c473?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x25c473]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',_t(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',_t(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x556204,_0x27434b,_0x415ae2)=>{const _0x5def79=_0x415ae2['mapper']['markerNameToElements'](_0x27434b['markerName']);if(_0x5def79){for(const _0x486ac9 of _0x5def79)_0x486ac9['is']('uiElement')&&(_0x415ae2['mapper']['unbindElementFromMarkerName'](_0x486ac9,_0x27434b['markerName']),_0x415ae2['writer']['remove'](_0x486ac9));}},{'priority':'high'});}['_getChangeFromId'](_0x3f72f1){return this['_changeIdToChange']['get'](_0x3f72f1);}['_getViewForChange'](_0x47e2ce){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new ChangeDetailsView(this['editor']['locale'],_0x47e2ce),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x17cc57,_0x3214f0,_0x91bb92,_0x570f64)=>{_0x570f64&&this['_balloon']['remove'](_0x570f64),_0x91bb92&&(this['_balloon']['add']({'view':_0x91bb92,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x1ea15f=this['editor']['editing'],_0x38377d=this['_getChangeFromId'](_0x91bb92['changeId']);let _0x195cc4;if(_0x38377d['data']['isOnRoot']){const _0x301ce7=_0x1ea15f['view']['getDomRoot'](_0x38377d['rootName']);_0x195cc4=Array['from'](_0x301ce7['getClientRects']());}else{const _0x4815fd=this['editor']['model']['markers']['get']('revision:'+_0x91bb92['changeId']);_0x195cc4=Array['from'](_0x1ea15f['mapper']['markerNameToElements'](_0x4815fd['name']))['map'](_0xf34a3f=>_0x1ea15f['view']['domConverter']['mapViewToDom'](_0xf34a3f))['map'](_0x3d1be3=>Array['from'](_0x3d1be3['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x195cc4[0x0];return _0x195cc4['find'](_0x5e27e4=>_0x5e27e4['top']-0x3<=this['_activeViewTarget']['y']&&_0x5e27e4['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x5e27e4['left']-0x3<=this['_activeViewTarget']['x']&&_0x5e27e4['right']+0x3>=this['_activeViewTarget']['x'])||_0x195cc4[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x2ae0a0,_0xb26cd,_0xdb47b6,_0x53b9ef)=>{this['activeView']=_0xdb47b6?this['_getViewForChange'](_0xdb47b6):null,this['editor']['model']['change'](()=>{const _0x4811c4=this['editor']['editing'];_0x53b9ef&&(_0x53b9ef['data']['isOnRoot']?_0x4811c4['view']['change'](_0x376744=>{_0x376744['removeClass']('ck-revision-history-root--active',_0x4811c4['view']['document']['getRoot'](_0x53b9ef['rootName']));}):_0x4811c4['reconvertMarker']('revision:'+_0x53b9ef['id'])),_0xdb47b6&&(_0xdb47b6['data']['isOnRoot']?_0x4811c4['view']['change'](_0x1b506c=>{_0x1b506c['addClass']('ck-revision-history-root--active',_0x4811c4['view']['document']['getRoot'](_0xdb47b6['rootName']));}):_0x4811c4['reconvertMarker']('revision:'+_0xdb47b6['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x24d0db,_0x25faa1)=>{if(this['activeChange'])return;const _0x4e9154=this['_findChangeIdFromDomTarget'](_0x25faa1['target']),_0x1d5055=this['_changeIdToChange']['get'](_0x4e9154);_0x1d5055?(this['_activeViewTarget']={'x':_0x25faa1['domEvent']['x'],'y':_0x25faa1['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x1d5055)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x34a74b,_0x22c6a2)=>{const _0x2b718b=this['_findChangeIdFromDomTarget'](_0x22c6a2['target']),_0x1c04e2=this['_changeIdToChange']['get'](_0x2b718b);_0x1c04e2?(this['_activeViewTarget']={'x':_0x22c6a2['domEvent']['x'],'y':_0x22c6a2['domEvent']['y']},_0x1c04e2===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x1c04e2):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x315a45){do{const _0x5de9ad=_0x315a45['getAttribute']('data-change-id');if(_0x5de9ad)return _0x5de9ad;_0x315a45=_0x315a45['parent'];}while(_0x315a45);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x3c0ae0=>{for(const _0x22df98 of this['editor']['model']['markers'])_0x3c0ae0['removeMarker'](_0x22df98);});}}function _t(_0x5a3d6a,_0x47d6ec){return(_0x379db6,_0x3f132b,_0x315a07)=>{if(!_0x315a07['consumable']['test'](_0x3f132b['markerRange'],_0x379db6['name']))return;const _0x255d11=_0x3f132b['markerRange']['getWalker'](),_0x2dc367=_0x3f132b['markerRange']['start'],_0x59c089=_0x5a3d6a['model']['schema'];let _0x2c83a3=null,_0xb9c98a=null,_0x2b4b3d=!0x1,_0x95bb04=!0x1;for(const _0x410a2e of _0x255d11){const _0x40ac21=_0x410a2e['item'];_0x2b4b3d=_0x2b4b3d||_0x59c089['isContent'](_0x40ac21);const _0x1ebda8=_0x315a07['mapper']['toViewElement'](_0x40ac21);if(_0x1ebda8&&_0x1ebda8['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x410a2e['type']&&(_0x59c089['isBlock'](_0x40ac21)&&!_0x59c089['isLimit'](_0x40ac21)&&(_0x40ac21['nextSibling']||_0x2dc367['isAtEnd']?_0x2c83a3&&_0x2c83a3['parent']==_0x40ac21||(_0x2c83a3=_0x40ac21,_0x13242c(_0x410a2e['previousPosition']),_0x95bb04=!0x0):_0xb9c98a=_0xb9c98a||_0x410a2e['previousPosition']));}function _0x13242c(_0x419f8e){const _0x200259=_0x315a07['mapper']['toViewPosition'](_0x419f8e),_0x4fea37=_0x315a07['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x47d6ec});_0x315a07['writer']['insert'](_0x200259,_0x4fea37),_0x315a07['mapper']['bindElementToMarker'](_0x4fea37,_0x3f132b['markerName']);}_0x2b4b3d||_0x95bb04||!_0xb9c98a||_0x13242c(_0xb9c98a);};}class RestoreRevisionCommand extends _0x59969e{constructor(_0x41b1b8){super(_0x41b1b8);const _0x192a04=_0x41b1b8['plugins']['get'](RevisionViewer);this['affectsData']=!0x1,this['listenTo'](_0x192a04,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x192a04,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x37c83e=this['editor'],_0x4bc929=_0x37c83e['plugins']['get'](RevisionViewer),_0x3e5c64=_0x4bc929['isReady']?_0x4bc929['diff']['newRevisionId']:null;_0x37c83e['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x3e5c64);}['refresh'](){const {isReady:_0x5cbfc5,isEnabled:_0x40dcc2,repository:_0x3bc0ab,diff:_0x1895b2}=this['editor']['plugins']['get'](RevisionViewer),_0x1aba17=_0x1895b2&&_0x3bc0ab['getLaterVisibleRevision'](_0x1895b2['newRevisionId']);this['isEnabled']=_0x5cbfc5&&_0x40dcc2&&Boolean(_0x1aba17);}}class ShowChangeCommand extends _0x59969e{['_step'];constructor(_0xdf8105,{direction:_0x392bed}){super(_0xdf8105);const _0x8c17f9=_0xdf8105['plugins']['get'](RevisionViewer);this['affectsData']=!0x1,this['_step']='forward'===_0x392bed?0x1:-0x1,this['listenTo'](_0x8c17f9,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x8c17f9,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x8c17f9,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x3ccbe1=this['editor'],_0x2da748=_0x3ccbe1['plugins']['get'](RevisionViewer),{isNavigationMode:_0x55b5e0,currentChangeNumber:_0x31a869}=_0x2da748;let _0x5d6b4e;if(_0x2da748['activeChange']=_0x55b5e0?_0x2da748['diff']['changes']['get'](_0x31a869+this['_step']):_0x2da748['diff']['changes']['first'],_0x2da748['activeChange']['data']['isOnRoot'])_0x5d6b4e=_0x3ccbe1['editing']['view']['getDomRoot'](_0x2da748['activeChange']['rootName']);else{const _0x15a105=_0x3ccbe1['model']['markers']['get']('revision:'+_0x2da748['activeChange']['id']);_0x5d6b4e=_0x173d85(_0x3ccbe1['editing'],_0x15a105);}_0x117344({'target':_0x5d6b4e,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x44e734,currentChangeNumber:_0x5510d9,numberOfChanges:_0x12afb2,isReady:_0x3bc71f,isEnabled:_0x126b07}=this['editor']['plugins']['get'](RevisionViewer);this['isEnabled']=!!(_0x126b07&&_0x3bc71f&&_0x12afb2)&&(!_0x44e734||(0x1===this['_step']?_0x5510d9<_0x12afb2-0x1:_0x5510d9>0x0));}}class ChangesNavigationView extends _0x55ecc0{constructor(_0x233aa8){super(_0x233aa8);const _0x539d71=this['bindTemplate'],_0x397471=new _0xb28a32(_0x233aa8),_0x234e71=new _0xb28a32(_0x233aa8);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',(_0x4abf21,_0x3f07e0)=>_0x4abf21&&_0x3f07e0>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x54114b,_0x12bee7,_0x1d9306,_0x29f007)=>{if(!_0x54114b)return ft(_0x233aa8,'Loading...');if(!_0x1d9306)return ft(_0x233aa8,'No\x20changes');const _0x520deb=ft(_0x233aa8,'NUMBER_OF_CHANGES',_0x1d9306);return _0x29f007?ft(_0x233aa8,'X_OF_Y_CHANGES',[_0x12bee7+0x1,_0x1d9306]):_0x520deb;}),_0x397471['set']({'label':ft(_0x233aa8,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x2522e5}),_0x234e71['set']({'label':ft(_0x233aa8,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x30e910}),_0x397471['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x234e71['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x397471['on']('execute',()=>this['fire']('execute','backward')),_0x234e71['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',_0x539d71['if']('_isStatusLabelVisible','ck-hidden',_0x910dd3=>!_0x910dd3)]},'children':[{'text':_0x539d71['to']('isNavigationMode',_0x1bfe43=>_0x1bfe43?ft(_0x233aa8,'EDIT_X_OF_Y_REVISIONS')+':\x20':ft(_0x233aa8,'Total')+':\x20')}]},{'text':_0x539d71['to']('_statusText')}]},new st(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x397471,_0x234e71]}]});}}const yt='ck-editor__editable__loading-overlay';class RevisionViewerLoadingOverlay extends _0x176a35{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x429ae8=this['editor']['editing']['view'];_0x429ae8['change'](_0x26a4b7=>{for(const _0xbad93b of _0x429ae8['document']['roots'])_0x26a4b7['addClass'](yt,_0xbad93b);});}['hide'](){const _0x2af3c6=this['editor']['editing']['view'];_0x2af3c6['change'](_0x14a1f5=>{for(const _0x48d7dc of _0x2af3c6['document']['roots'])_0x14a1f5['removeClass'](yt,_0x48d7dc);});}}class RevisionViewerUI extends _0x176a35{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionViewer,RevisionViewerLoadingOverlay];}['init'](){const _0xfd459d=this['editor'],_0x53593c=_0xfd459d['plugins']['get'](RevisionViewer),_0x2ee3c7=_0xfd459d['plugins']['get'](RevisionViewerLoadingOverlay);_0xfd459d['ui']['componentFactory']['add']('exitToEditing',_0x3ec0b0=>{const _0xc47254=new _0xb28a32(_0x3ec0b0);return _0xc47254['set']({'label':ft(_0x3ec0b0,'Back\x20to\x20editing'),'icon':_0x4005f5,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0xc47254,'execute',()=>{_0xfd459d['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0xc47254;}),_0xfd459d['ui']['componentFactory']['add']('restoreRevision',_0x4ccf0d=>{const _0x4c6fff=new _0xb28a32(_0x4ccf0d);return _0x4c6fff['set']({'label':ft(_0x4ccf0d,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x4c6fff['bind']('isEnabled')['to'](_0xfd459d['commands']['get']('restoreRevision')),this['listenTo'](_0x4c6fff,'execute',()=>_0xfd459d['execute']('restoreRevision')),_0x4c6fff;}),_0xfd459d['ui']['componentFactory']['add']('changesNavigation',_0x53fe54=>{const _0xf5c113=new ChangesNavigationView(_0x53fe54),_0x251cfe=_0xfd459d['commands']['get']('showPreviousChange'),_0x4b3c80=_0xfd459d['commands']['get']('showNextChange');return _0xf5c113['bind']('isBackwardNavigationEnabled')['to'](_0x251cfe,'isEnabled'),_0xf5c113['bind']('isForwardNavigationEnabled')['to'](_0x4b3c80,'isEnabled'),_0xf5c113['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x53593c),this['listenTo'](_0xf5c113,'execute',(_0x4e0705,_0x1c85fb)=>{_0xfd459d['execute']('forward'===_0x1c85fb?'showNextChange':'showPreviousChange');}),_0xf5c113;}),_0x2ee3c7['show'](),_0x53593c['on']('change:isReady',(_0x268393,_0x8bb963,_0x3a56ed)=>{_0x3a56ed?_0x2ee3c7['hide']():_0x2ee3c7['show']();});}}class RevisionNameView extends _0x49faef{['_resizeObserver']=null;constructor(_0x39f59e,_0x68d844){super(_0x39f59e,_0x68d844);const _0xb6aefe=this['bindTemplate'];this['set']({'label':ft(_0x39f59e,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=ft(_0x39f59e,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0xb6aefe['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0xd338d9(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0xf194e0=this['fieldView']['element'];this['_tooltipString']=_0xf194e0['scrollWidth']>_0xf194e0['clientWidth']&&_0xf194e0['value']||'';}}class RevisionAuthorView extends _0x55ecc0{constructor(_0x148261,_0x1ae7d6,_0x26b34a){super(_0x148261);const _0x2420e5=new nt();_0x2420e5['set']({'content':_0x317fde,'viewBox':'0\x200\x2011\x2010'});const _0x4e2d36=['ck','ck-revision-history-sidebar__revision-author'];_0x26b34a&&_0x4e2d36['push']('ck-revision-history-sidebar__revision-author_creator');const _0x40b893=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':ft(_0x148261,_0x26b34a?'Revision\x20creator':'Revision\x20author')},'children':[_0x2420e5,_0x1ae7d6['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x4e2d36},'children':_0x40b893});}}function Rt(_0x2d9c97,_0x4e83ec){const _0x5b66b7=_0x2d9c97['bindTemplate'],_0x272755=_0x2d9c97['locale'],_0x20d234=_0xbd5db9(_0x272755);_0x20d234['panelPosition']='sw';const _0x42f3ec=function(_0x4a86b3,_0x1e3680){const _0xb71c3=function(_0x47a597,_0x3a8a5b){const _0x32499c=_0x47a597['locale'],_0x485807={'Compare\x20against\x20selected':ft(_0x32499c,'Compare\x20against\x20selected'),'Name\x20this\x20revision':ft(_0x32499c,'Name\x20this\x20revision'),'Restore\x20this\x20revision':ft(_0x32499c,'Restore\x20this\x20revision')};return _0x3a8a5b['map'](_0x5bda9f=>{const _0x33d939=_0x485807[_0x5bda9f['name']];return _0x33d939&&_0x33d939!==_0x5bda9f['name']&&(_0x5bda9f['name']=_0x33d939),_0x5bda9f;});}(_0x4a86b3,_0x1e3680),_0x5b05f8=new _0x17f096();for(const _0x136d0e of _0xb71c3){const _0x3fe2d8={'type':'button','model':new rt({'label':_0x136d0e['name'],'class':_0x136d0e['class'],'withText':!0x0,'role':'menuitem','_action':_0x136d0e['action']})};_0x3fe2d8['model']['bind']('isEnabled')['to'](_0x4a86b3,'isActionsDropdownOpen',_0x76c1cf=>'function'!=typeof _0x136d0e['isEnabled']||(!_0x76c1cf||_0x136d0e['isEnabled'](_0x4a86b3))),_0x5b05f8['add'](_0x3fe2d8);}return _0x5b05f8;}(_0x2d9c97,_0x4e83ec);return _0x2d9c97['bind']('isActionsDropdownOpen')['to'](_0x20d234,'isOpen'),_0x20d234['buttonView']['set']({'label':ft(_0x272755,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x3856a7}),_0x20d234['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x5b66b7['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x5b66b7['to'](_0xf52209=>_0xf52209['stopPropagation']())}}),_0x20d234['on']('execute',_0x5bca46=>{_0x2d9c97['isReady']&&'function'==typeof _0x5bca46['source']['_action']&&_0x5bca46['source']['_action'](_0x2d9c97);}),ot(_0x20d234,_0x42f3ec,{'role':'menu'}),_0x20d234['listenTo'](_0x2d9c97,'change:isActionsDropdownOpen',(_0xe2cdcd,_0x4ce1b1,_0x59e51e)=>{if(_0x59e51e)for(const _0x167773 of _0x20d234['listView']['items']){const _0x5f164f=_0x167773['children']['first'],_0x295639=_0x4e83ec['find'](_0x4035b0=>_0x4035b0['action']===_0x5f164f['_action'])['isVisible'];_0x167773['isVisible']=void 0x0===_0x295639||_0x295639(_0x2d9c97);}}),_0x20d234;}class RevisionView extends/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
23
|
+
import{ObservableMixin as _0x29a21b,uid as _0x13fdf1,Collection as _0x166815,logWarning as _0x477743,FocusTracker as _0x5a526e,KeystrokeHandler as _0x261833,scrollViewportToShowTarget as _0x43cb0b,ResizeObserver as _0x176f79,ElementReplacer as _0x5c73b3,CKEditorError as _0xc946e0}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x5ba81d,set as _0x804c91,unset as _0x46e363,isEqual as _0x882995}from'es-toolkit/compat';import{Plugin as _0x1098b4,PendingActions as _0x475171,Command as _0x328611,ElementApiMixin as _0xe4c1e,Editor as _0x102d5}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x1b1234,getMarkerDomElement as _0x26734a,ConfirmMixin as _0x57fb49,sanitizeEditorConfig as _0x551f13}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{ViewContainerElement as _0x3759a2,ViewAttributeElement as _0x527822,ViewEmptyElement as _0x31214b,ViewRawElement as _0x22e94d,ViewUIElement as _0x17cd4f,ViewDocumentFragment as _0x328fdf,ViewText as _0x344231,ViewElement as _0x33b065,ModelElement as _0x309f06,ModelRange as _0x210c0a,ModelPosition as _0x4a0b9b,ModelDocumentFragment as _0x3bb092,ModelText as _0x4094b7}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0xd37549,IconChevronUp as _0x178c94,IconChevronDown as _0xf0bd91,IconUndo as _0x2432b7,IconUser as _0x4b0c7a,IconThreeVerticalDots as _0x34e82a}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x2bd5ec,View as _0x7802f2,submitHandler as _0x269f50,LabeledFieldView as _0x195b0e,createLabeledInputText as _0x5e9819,createDropdown as _0x4cec8d,ListView as _0x24cde3,ListItemView as _0x3918bd,ButtonView as _0x506250,MenuBarMenuView as _0x12988c,MenuBarMenuListView as _0x5c5220,MenuBarMenuListItemView as tt,MenuBarMenuListItemButtonView as it,ContextualBalloon as et,ToolbarSeparatorView as st,IconView as nt,addListToDropdown as ot,UIModel as rt,EditorUI as at,normalizeToolbarConfig as ht,BoxedEditorUIView as ct,StickyPanelView as lt,ToolbarView as ut,InlineEditableUIView as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as vt}from'luxon';class Revision extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x29a21b(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x2e889b){super(),this['id']=_0x2e889b['id']||_0x13fdf1(),this['creator']=_0x2e889b['creator']||null,this['authors']=_0x2e889b['authors']||[],this['diffData']=_0x2e889b['diffData']||null,this['toVersion']=_0x2e889b['toVersion']||0x0,this['fromVersion']=_0x2e889b['fromVersion']||0x0,this['set']('name',_0x2e889b['name']||''),this['set']('createdAt',_0x2e889b['createdAt']||new Date()),this['set']('attributes',_0x2e889b['attributes']||{});}['setName'](_0x804005){this['_update']({'name':_0x804005});}['setAttribute'](_0x4358db,_0x2ea2b7){const _0x48d84e=_0x5ba81d(this['attributes']);_0x804c91(_0x48d84e,_0x4358db,_0x2ea2b7),this['_update']({'attributes':_0x48d84e});}['removeAttribute'](_0x46365b){const _0x3ceae6=_0x5ba81d(this['attributes']);_0x46e363(_0x3ceae6,_0x46365b),this['_update']({'attributes':_0x3ceae6});}['_update'](_0x5538fa,_0x5ee1b5=!0x1){let _0x5a1f3a=!0x1;const _0x4862cc={'id':this['id']},_0x31a859=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x358c10 of _0x31a859){const _0x3cbd22=_0x5538fa[_0x358c10];void 0x0!==_0x3cbd22&&_0x3cbd22!==this[_0x358c10]&&(this[_0x358c10]=_0x3cbd22,_0x4862cc[_0x358c10]=_0x3cbd22,_0x5a1f3a=!0x0);}_0x5a1f3a&&(_0x4862cc['authors']&&(_0x4862cc['authorsIds']=_0x4862cc['authors']['map'](_0x1a6ca1=>_0x1a6ca1['id']),delete _0x4862cc['authors']),this['fire']('_update',_0x4862cc,_0x5ee1b5));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x3659f0=>_0x3659f0['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class RevisionsRepository extends _0x1098b4{['_revisions'];static get['requires'](){return[_0x1b1234];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x25f908){super(_0x25f908),this['_revisions']=new _0x166815();}['afterInit'](){!async function(_0x4b873f){const _0x2d1ecf=_0x5ea7c6([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]),_0x259d9b=0xeb829,_0x4c56ac=0x359e09b0,_0x3eb457=0x359982e8^_0x4c56ac,_0x1a13ab=window[_0x5ea7c6([0x44,0x61,0x74,0x65])][_0x5ea7c6([0x6e,0x6f,0x77])](),_0x2259e7=_0x4b873f[_0x5ea7c6([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x364171=new window[(_0x5ea7c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3aa537=>{_0x2259e7[_0x5ea7c6([0x6f,0x6e,0x63,0x65])](_0x5ea7c6([0x72,0x65,0x61,0x64,0x79]),_0x3aa537);}),_0x2143e2={[_0x5ea7c6([0x6b,0x74,0x79])]:_0x5ea7c6([0x45,0x43]),[_0x5ea7c6([0x75,0x73,0x65])]:_0x5ea7c6([0x73,0x69,0x67]),[_0x5ea7c6([0x63,0x72,0x76])]:_0x5ea7c6([0x50,0x2d,0x32,0x35,0x36]),[_0x5ea7c6([0x78])]:_0x5ea7c6([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]),[_0x5ea7c6([0x79])]:_0x5ea7c6([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]),[_0x5ea7c6([0x61,0x6c,0x67])]:_0x5ea7c6([0x45,0x53,0x32,0x35,0x36])},_0x222676=_0x2259e7[_0x5ea7c6([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5ea7c6([0x67,0x65,0x74])](_0x5ea7c6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x7aa152(){let _0x9e72f1,_0x47a63b=null,_0x5d135f=null;try{if(_0x222676==_0x5ea7c6([0x47,0x50,0x4c]))return _0x5ea7c6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x9e72f1=_0x91ba7f(),!_0x9e72f1)return _0x5ea7c6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x9e72f1[_0x5ea7c6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5d135f=_0x492404(_0x9e72f1[_0x5ea7c6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x9e72f1[_0x5ea7c6([0x6a,0x74,0x69])])),await _0x5c055b()?_0x2edf03()?_0x408039()?_0x5ea7c6([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x196d8e()?(_0x9e72f1[_0x5ea7c6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5ea7c6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x47a63b=_0x147f9f(_0x5ea7c6([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5bc057()):_0x5ea7c6([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5ea7c6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5ea7c6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x5ea7c6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x408039(){const _0x284399=[_0x5ea7c6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5ea7c6([0x74,0x72,0x69,0x61,0x6c])][_0x5ea7c6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x9e72f1[_0x5ea7c6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1a13ab/0x3e8:0xe10*_0x3eb457;return _0x9e72f1[_0x5ea7c6([0x65,0x78,0x70])]<_0x284399;}function _0x2edf03(){const _0x2a9d9c=_0x9e72f1[_0x5ea7c6([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x2a9d9c)return!0x1;if(_0x2a9d9c[_0x5ea7c6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5ea7c6([0x2a])))return!0x0;if(_0x2a9d9c[_0x5ea7c6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5ea7c6([0x52,0x48])))return!0x0;if(_0x2a9d9c[_0x5ea7c6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5ea7c6([0x52,0x52,0x48]))){if(_0x56f0a0())return!0x0;if(_0x2d882d()||_0x413a40())return!0x0;}return!0x1;}function _0x196d8e(){const _0x10a350=_0x9e72f1[_0x5ea7c6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x10a350||0x0==_0x10a350[_0x5ea7c6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x31bd25}=new URL(window[_0x5ea7c6([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x10a350[_0x5ea7c6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x31bd25))return!0x0;const _0x354a70=_0x31bd25[_0x5ea7c6([0x73,0x70,0x6c,0x69,0x74])](_0x5ea7c6([0x2e]));return _0x10a350[_0x5ea7c6([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x56225d=>_0x56225d[_0x5ea7c6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5ea7c6([0x2a])))[_0x5ea7c6([0x6d,0x61,0x70])](_0x4e50bc=>_0x4e50bc[_0x5ea7c6([0x73,0x70,0x6c,0x69,0x74])](_0x5ea7c6([0x2e])))[_0x5ea7c6([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4396dd=>_0x4396dd[_0x5ea7c6([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x354a70[_0x5ea7c6([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5ea7c6([0x6d,0x61,0x70])](_0x19d703=>Array(_0x354a70[_0x5ea7c6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x19d703[_0x5ea7c6([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5ea7c6([0x66,0x69,0x6c,0x6c])](_0x19d703[0x0]===_0x5ea7c6([0x2a])?_0x5ea7c6([0x2a]):'')[_0x5ea7c6([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x19d703))[_0x5ea7c6([0x73,0x6f,0x6d,0x65])](_0x1be971=>_0x354a70[_0x5ea7c6([0x65,0x76,0x65,0x72,0x79])]((_0x2b9f38,_0x273c9d)=>_0x1be971[_0x273c9d]===_0x2b9f38||_0x1be971[_0x273c9d]===_0x5ea7c6([0x2a])));}function _0x5bc057(){return _0x47a63b&&_0x5d135f?new window[(_0x5ea7c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4fed87,_0x473a57)=>{_0x47a63b[_0x5ea7c6([0x74,0x68,0x65,0x6e])](_0x4fed87,_0x473a57),_0x5d135f[_0x5ea7c6([0x74,0x68,0x65,0x6e])](_0x158b54=>{_0x158b54!=_0x5ea7c6([0x56,0x61,0x6c,0x69,0x64])&&_0x4fed87(_0x158b54);},_0x473a57);}):_0x47a63b||_0x5d135f||_0x5ea7c6([0x56,0x61,0x6c,0x69,0x64]);}}function _0x492404(_0x4a9120,_0x3534f6){return new window[(_0x5ea7c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xb7c06b=>{if(_0x586cfb())return _0xb7c06b(_0x5ea7c6([0x56,0x61,0x6c,0x69,0x64]));_0x29f2c7(),_0x2259e7[_0x5ea7c6([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5ea7c6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xbbc6c8=!0x1;const _0x413a0e=_0x13fdf1();function _0x510939(_0x2ffa8f){return!!_0x2ffa8f&&(typeof _0x2ffa8f===_0x5ea7c6([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x2ffa8f===_0x5ea7c6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x2ffa8f[_0x5ea7c6([0x74,0x68,0x65,0x6e])]===_0x5ea7c6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x2ffa8f[_0x5ea7c6([0x63,0x61,0x74,0x63,0x68])]===_0x5ea7c6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x404a22(_0x22af0b){_0x46e601(_0x22af0b)[_0x5ea7c6([0x74,0x68,0x65,0x6e])](_0x283686=>{if(!_0x283686||_0x283686[_0x5ea7c6([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5ea7c6([0x6f,0x6b]))return _0x5ea7c6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3347b7(_0x506f9c(_0x413a0e+_0x3534f6))!=_0x283686[_0x5ea7c6([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5ea7c6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5ea7c6([0x56,0x61,0x6c,0x69,0x64]);})[_0x5ea7c6([0x74,0x68,0x65,0x6e])](_0x135dc5=>(_0x1aad90(),_0x135dc5),()=>{const _0x5b317c=_0x102a34();return null==_0x5b317c?(_0x1aad90(),_0x5ea7c6([0x56,0x61,0x6c,0x69,0x64])):_0x5ea7c6(_0x1a13ab-_0x5b317c>(0x11928db0^_0x4c56ac)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5ea7c6([0x74,0x68,0x65,0x6e])](_0xb7c06b)[_0x5ea7c6([0x63,0x61,0x74,0x63,0x68])](()=>{_0xb7c06b(_0x5ea7c6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2f91a8=0x35a8e730^_0x4c56ac;function _0x1aad90(){const _0x22ff98=_0x5ea7c6([0x6c,0x6c,0x63,0x74,0x2d])+_0x3347b7(_0x506f9c(_0x4a9120)),_0x323113=_0x33d1d9(_0x3347b7(window[_0x5ea7c6([0x4d,0x61,0x74,0x68])][_0x5ea7c6([0x63,0x65,0x69,0x6c])](_0x1a13ab/_0x2f91a8)));window[_0x5ea7c6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5ea7c6([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x22ff98,_0x323113);}function _0x102a34(){const _0x1c9db5=_0x5ea7c6([0x6c,0x6c,0x63,0x74,0x2d])+_0x3347b7(_0x506f9c(_0x4a9120)),_0x1df56a=window[_0x5ea7c6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5ea7c6([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1c9db5);return _0x1df56a?window[_0x5ea7c6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x33d1d9(_0x1df56a),0x10)*_0x2f91a8:null;}function _0x46e601(_0x241aa8){return new window[(_0x5ea7c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x53b59f,_0x4efc25)=>{_0x241aa8[_0x5ea7c6([0x74,0x68,0x65,0x6e])](_0x53b59f,_0x4efc25),window[_0x5ea7c6([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4efc25,0x359fdd70^_0x4c56ac);});}}_0x2259e7[_0x5ea7c6([0x6f,0x6e])](_0x5ea7c6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x503201,_0x59f038)=>{if(_0x59f038[0x0]!=_0x4a9120)return _0xb7c06b(_0x5ea7c6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x59f038[0x1]={..._0x59f038[0x1],[_0x5ea7c6([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x413a0e};},{[_0x5ea7c6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5ea7c6([0x68,0x69,0x67,0x68])}),_0x2259e7[_0x5ea7c6([0x6f,0x6e])](_0x5ea7c6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xd6e185=>{_0x510939(_0xd6e185[_0x5ea7c6([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0xbbc6c8=!0x0,_0x404a22(_0xd6e185[_0x5ea7c6([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5ea7c6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5ea7c6([0x6c,0x6f,0x77])}),_0x364171[_0x5ea7c6([0x74,0x68,0x65,0x6e])](()=>{_0xbbc6c8||_0xb7c06b(_0x5ea7c6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x586cfb(){return _0x2259e7[_0x5ea7c6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5ea7c6([0x76,0x69,0x65,0x77])][_0x5ea7c6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5ea7c6([0x61,0x75,0x74,0x6f]);}function _0x29f2c7(){_0x2259e7[_0x5ea7c6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5ea7c6([0x76,0x69,0x65,0x77])][_0x5ea7c6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5ea7c6([0x61,0x75,0x74,0x6f]);}}function _0x147f9f(_0x785a28){const _0x497618=[new window[(_0x5ea7c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1f1d80=>setTimeout(_0x1f1d80,0x3597377c^_0x4c56ac)),_0x364171[_0x5ea7c6([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5ea7c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1d83df=>{const _0x256ed5=0x359e09b7^_0x4c56ac,_0x5e120c=_0x4b873f[_0x5ea7c6([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x4dcfaa(){_0x5e120c[_0x5ea7c6([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x256ed5&&_0x1d83df();}_0x4dcfaa(),_0x5e120c[_0x5ea7c6([0x6f,0x6e])](_0x5ea7c6([0x61,0x64,0x64]),_0x4dcfaa);})),new window[(_0x5ea7c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x377a5e=>{function _0x26980d(){for(const _0x1744d5 in window)if(window[_0x5ea7c6([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x5ea7c6([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x1744d5))&&window[_0x1744d5]==_0x259d9b)return _0x377a5e();_0x2259e7[_0x5ea7c6([0x73,0x74,0x61,0x74,0x65])]!=_0x5ea7c6([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x5ea7c6([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x26980d,0x359e1a38^_0x4c56ac);}_0x22238a(_0x5ea7c6([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x26980d();})];return window[_0x5ea7c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5ea7c6([0x72,0x61,0x63,0x65])](_0x497618)[_0x5ea7c6([0x74,0x68,0x65,0x6e])](()=>_0x785a28);}async function _0x177417(){if(await _0x364171,_0x22238a(_0x5ea7c6([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x2caea6=_0x4b873f[_0x5ea7c6([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x39cfe2=_0x4b873f[_0x5ea7c6([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])](_0x2caea6[_0x5ea7c6([0x69,0x64])]),_0x1cb09a=_0x2d5f4a(_0x5ea7c6([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x1cb09a[_0x5ea7c6([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x2caea6['id'],_0x39cfe2?_0x39cfe2['id']:null,!0x0),_0x1cb09a[_0x5ea7c6([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x5ea7c6([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x1cb09a[_0x5ea7c6([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x1cb09a[_0x5ea7c6([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x4d3df3,void(_0x1cb09a[_0x5ea7c6([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x4d3df3);}if(_0x22238a(_0x5ea7c6([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x534960=_0x2d5f4a(_0x5ea7c6([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x534960[_0x5ea7c6([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x5ea7c6([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x534960[_0x5ea7c6([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x534960[_0x5ea7c6([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x4d3df3,_0x534960[_0x5ea7c6([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x4d3df3;}_0x2259e7[_0x5ea7c6([0x6d,0x6f,0x64,0x65,0x6c])][_0x5ea7c6([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4d3df3,_0x2259e7[_0x5ea7c6([0x6d,0x6f,0x64,0x65,0x6c])][_0x5ea7c6([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4d3df3,_0x2259e7[_0x5ea7c6([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5ea7c6([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x56f0a0(){return _0x22238a(_0x5ea7c6([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x2d5f4a(_0x5ea7c6([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x5ea7c6([0x73,0x74,0x61,0x74,0x65])]==_0x5ea7c6([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x2d882d(){return _0x22238a(_0x5ea7c6([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 _0x413a40(){return _0x22238a(_0x5ea7c6([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x5295d7(_0x488b48){const _0x3ede9e=_0x85a402();_0x2259e7[_0x3ede9e]=_0x5ea7c6([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])+_0x488b48,_0x488b48[_0x5ea7c6([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x5ea7c6([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x85a402()]=_0x259d9b),_0x488b48!=_0x5ea7c6([0x56,0x61,0x6c,0x69,0x64])&&_0x177417();}function _0x85a402(){const _0x5e000f=window[_0x5ea7c6([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5ea7c6([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5ea7c6([0x6e,0x6f,0x77])]())[_0x5ea7c6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5ea7c6([0x2e]),'');let _0x263d6e=_0x5ea7c6([0x76]);for(let _0x43e57f=0x0;_0x43e57f<_0x5e000f[_0x5ea7c6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x43e57f+=0x2){let _0x4ea443=window[_0x5ea7c6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5e000f[_0x5ea7c6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x43e57f,_0x43e57f+0x2));_0x4ea443>=_0x2d1ecf[_0x5ea7c6([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4ea443-=_0x2d1ecf[_0x5ea7c6([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x263d6e+=_0x2d1ecf[_0x4ea443];}return _0x263d6e;}function _0x91ba7f(){const _0x3359f3=_0x222676[_0x5ea7c6([0x73,0x70,0x6c,0x69,0x74])](_0x5ea7c6([0x2e]));if(0x3!=_0x3359f3[_0x5ea7c6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x5786d7(_0x3359f3[0x1]);function _0x5786d7(_0x5be033){const _0x4e7279=_0x71da9c(_0x5be033);return _0x4e7279&&_0x1c2e65()?_0x4e7279:null;function _0x1c2e65(){const _0x3229e9=_0x4e7279[_0x5ea7c6([0x6a,0x74,0x69])],_0x254f1c=window[_0x5ea7c6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3229e9[_0x5ea7c6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3229e9[_0x5ea7c6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4dbcff={..._0x4e7279,[_0x5ea7c6([0x6a,0x74,0x69])]:_0x3229e9[_0x5ea7c6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x3229e9[_0x5ea7c6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4dbcff[_0x5ea7c6([0x76,0x63])],_0x506f9c(_0x4dbcff)==_0x254f1c;}}}async function _0x5c055b(){let _0x4cfc82=!0x0;try{const _0xdd370e=_0x222676[_0x5ea7c6([0x73,0x70,0x6c,0x69,0x74])](_0x5ea7c6([0x2e])),[_0x2e6a7b,_0x37c63d,_0x37c690]=_0xdd370e;return _0x527293(_0x2e6a7b),await _0x31655a(_0x2e6a7b,_0x37c63d,_0x37c690),_0x4cfc82;}catch{return!0x1;}function _0x527293(_0x54da87){const _0x1fb2fd=_0x71da9c(_0x54da87);_0x1fb2fd&&_0x1fb2fd[_0x5ea7c6([0x61,0x6c,0x67])]==_0x5ea7c6([0x45,0x53,0x32,0x35,0x36])||(_0x4cfc82=!0x1);}async function _0x31655a(_0x2b5a72,_0xd372a3,_0x547c16){const _0x197cf8=window[_0x5ea7c6([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5ea7c6([0x66,0x72,0x6f,0x6d])](_0x5627d8(_0x547c16),_0x1e196f=>_0x1e196f[_0x5ea7c6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x56409d=new window[(_0x5ea7c6([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5ea7c6([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2b5a72+_0x5ea7c6([0x2e])+_0xd372a3),_0x79650b=window[_0x5ea7c6([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5ea7c6([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x79650b)return;const _0x505ad2=await _0x79650b[_0x5ea7c6([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5ea7c6([0x6a,0x77,0x6b]),_0x2143e2,{[_0x5ea7c6([0x6e,0x61,0x6d,0x65])]:_0x5ea7c6([0x45,0x43,0x44,0x53,0x41]),[_0x5ea7c6([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5ea7c6([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5ea7c6([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x79650b[_0x5ea7c6([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5ea7c6([0x6e,0x61,0x6d,0x65])]:_0x5ea7c6([0x45,0x43,0x44,0x53,0x41]),[_0x5ea7c6([0x68,0x61,0x73,0x68])]:{[_0x5ea7c6([0x6e,0x61,0x6d,0x65])]:_0x5ea7c6([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x505ad2,_0x197cf8,_0x56409d)||(_0x4cfc82=!0x1);}}function _0x71da9c(_0xaaae9c){return _0xaaae9c[_0x5ea7c6([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5ea7c6([0x65,0x79]))?JSON[_0x5ea7c6([0x70,0x61,0x72,0x73,0x65])](_0x5627d8(_0xaaae9c)):null;}function _0x5627d8(_0x48b062){return window[_0x5ea7c6([0x61,0x74,0x6f,0x62])](_0x48b062[_0x5ea7c6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5ea7c6([0x2b]))[_0x5ea7c6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5ea7c6([0x2f])));}function _0x506f9c(_0x3b5b29){let _0x7f3042=0x1505;function _0x2d317e(_0x567609){for(let _0x7869b6=0x0;_0x7869b6<_0x567609[_0x5ea7c6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x7869b6++){const _0x3677cb=_0x567609[_0x5ea7c6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x7869b6);_0x7f3042=(_0x7f3042<<0x5)+_0x7f3042+_0x3677cb,_0x7f3042&=_0x7f3042;}}function _0x183854(_0x3069ba){Array[_0x5ea7c6([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x3069ba)?_0x3069ba[_0x5ea7c6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x183854):_0x3069ba&&typeof _0x3069ba==_0x5ea7c6([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5ea7c6([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x3069ba)[_0x5ea7c6([0x73,0x6f,0x72,0x74])]()[_0x5ea7c6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x233cba,_0x3fa9ea])=>{_0x2d317e(_0x233cba),_0x183854(_0x3fa9ea);}):_0x2d317e(window[_0x5ea7c6([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x3069ba));}return _0x183854(_0x3b5b29),_0x7f3042>>>0x0;}function _0x3347b7(_0x57b943){return _0x57b943[_0x5ea7c6([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5ea7c6([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5ea7c6([0x30]));}function _0x33d1d9(_0x15e4cc){return _0x15e4cc[_0x5ea7c6([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5ea7c6([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5ea7c6([0x6a,0x6f,0x69,0x6e])]('');}function _0x22238a(_0xeb3df0){return _0x2259e7[_0x5ea7c6([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5ea7c6([0x68,0x61,0x73])](_0xeb3df0);}function _0x2d5f4a(_0x2a5a17){return _0x2259e7[_0x5ea7c6([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5ea7c6([0x67,0x65,0x74])](_0x2a5a17);}function _0x4d3df3(){}function _0x5ea7c6(_0x2f9654){return _0x2f9654['map'](_0x17bf29=>String['fromCharCode'](_0x17bf29))['join']('');}_0x5295d7(await _0x7aa152());}(this);}['createRevision'](_0x48154f){const _0xa6ab24=this['editor']['plugins']['get']('Users');return new Revision({'id':_0x48154f['id'],'name':_0x48154f['name'],'creator':_0x48154f['creatorId']?_0xa6ab24['getUser'](_0x48154f['creatorId']):null,'diffData':_0x48154f['diffData']||_0x48154f['data'],'authors':_0x48154f['authorsIds']['map'](_0x1d75f7=>_0xa6ab24['getUser'](_0x1d75f7)),'createdAt':new Date(_0x48154f['createdAt']),'attributes':_0x48154f['attributes'],'fromVersion':_0x48154f['fromVersion'],'toVersion':_0x48154f['toVersion']});}['addRevision'](_0x13fce8,_0x6195b5=0x0){this['_revisions']['add'](_0x13fce8,_0x6195b5);}['getRevision'](_0x2ea1c2){return this['_revisions']['get'](_0x2ea1c2);}['getRevisions'](_0x1003ef={'toJSON':!0x1}){const _0x2ca00d=Array['from'](this['_revisions']);return _0x2ca00d['reverse'](),_0x1003ef['toJSON']?_0x2ca00d['map'](_0x2ec47e=>_0x2ec47e['toJSON']()):_0x2ca00d;}['getIndex'](_0x2e21cd){return this['_revisions']['getIndex'](_0x2e21cd);}['getEarlierVisibleRevision'](_0x463ef7){const [,_0x5db0d4]=this['getRevisionsIterator'](_0x463ef7,{'direction':'earlier'});return _0x5db0d4;}['getLaterVisibleRevision'](_0x39146d){const [,_0x587193]=this['getRevisionsIterator'](_0x39146d,{'direction':'later'});return _0x587193;}['getRevisionsInDiff'](_0x10794d){const _0x25d960=[];for(const _0x58a20d of this['getRevisionsIterator'](_0x10794d['newRevisionId']))if(_0x25d960['push'](_0x58a20d),_0x58a20d['id']===_0x10794d['oldRevisionId'])break;return _0x25d960;}*['getRevisionsIterator'](_0x529a9a,{direction:_0x13ae1b='earlier',filter:_0x59b5d8=()=>!0x0}={}){const _0x229cb6='earlier'===_0x13ae1b?0x1:-0x1;let _0x44ed3d=this['_revisions']['get'](_0x529a9a),_0x555865=this['getIndex'](_0x44ed3d);for(yield _0x44ed3d;_0x44ed3d;){if(_0x555865+=_0x229cb6,_0x44ed3d=this['getRevision'](_0x555865),!_0x44ed3d)return;_0x59b5d8(_0x44ed3d)&&(yield _0x44ed3d);}}}class RevisionHistoryUtils extends _0x1098b4{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x3759a2,'c'],[_0x527822,'a'],[_0x31214b,'e'],[_0x22e94d,'r'],[_0x17cd4f,'u']]);['_typeCharToViewClass']=new Map([['c',_0x3759a2],['a',_0x527822],['e',_0x31214b],['r',_0x22e94d],['u',_0x17cd4f]]);async['loadRevisionData'](_0x34ebc2,_0x11eb17){if(_0x34ebc2['diffData']||!_0x11eb17)return;const _0xa6ad1b=this['editor']['config']['get']('collaboration.channelId'),_0x31eddc=await _0x11eb17['getRevision']({'channelId':_0xa6ad1b,'revisionId':_0x34ebc2['id']});_0x34ebc2['diffData']=_0x31eddc['diffData'];}['getRevisionDocumentData'](_0x135bee){const _0x5292e8={};for(const _0x3488e9 in _0x135bee['diffData']){if(_0x135bee['diffData'][_0x3488e9]['attachChange']&&!_0x135bee['diffData'][_0x3488e9]['attachChange']['isAttached'])continue;const _0x13c361=this['_removeRevisionMarkers'](JSON['parse'](_0x135bee['diffData'][_0x3488e9]['insertions'])),_0x487f03=this['editor']['editing']['view']['document'],_0x1d2672=new _0x328fdf(_0x487f03,_0x13c361['map'](_0x35ad05=>this['_getViewFromDiffObj'](_0x35ad05,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x5292e8[_0x3488e9]=this['editor']['data']['processor']['toData'](_0x1d2672),this['editor']['data']['processor']['useFillerType']('default');}return _0x5292e8;}['getRevisionRootsAttributes'](_0x216d16){const _0x2ed048={};for(const _0x7289d8 in _0x216d16['diffData'])_0x216d16['diffData'][_0x7289d8]['attachChange']&&!_0x216d16['diffData'][_0x7289d8]['attachChange']['isAttached']||(_0x2ed048[_0x7289d8]=_0x216d16['diffData'][_0x7289d8]['attributesAfter']||{});return _0x2ed048;}['getRevisionRootsModelElements'](_0x363934){const _0x126df6={};for(const _0x117632 in _0x363934['diffData']){if(_0x363934['diffData'][_0x117632]['attachChange']&&!_0x363934['diffData'][_0x117632]['attachChange']['isAttached'])continue;const _0x4b21f2=_0x363934['diffData'][_0x117632]['rootElementName'];_0x4b21f2&&(_0x126df6[_0x117632]=_0x4b21f2);}return _0x126df6;}['_getTypeCharForViewElement'](_0x1a7ea0){return this['_viewClassToTypeChar']['get'](_0x1a7ea0['constructor']);}['_getViewFromDiffObj'](_0x5d67f9,_0x5966d1){const _0x43c232=this['editor']['editing']['view']['document'];if('string'==typeof _0x5d67f9)return new _0x344231(_0x43c232,_0x5d67f9);{let _0x2fa37d,_0x2d3e33;_0x2d3e33='u'==_0x5d67f9['type']||'r'==_0x5d67f9['type']?[]:_0x5d67f9['children']['map'](_0xd25310=>this['_getViewFromDiffObj'](_0xd25310,_0x5966d1));const _0x1fc5cf=this['_typeCharToViewClass']['get'](_0x5d67f9['type'])||_0x33b065,_0x5d8815=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x2fa37d=new _0x1fc5cf(_0x43c232,_0x5d67f9['name'],_0x5d67f9['attributes'],_0x2d3e33),'u'==_0x5d67f9['type']&&_0x5d67f9['children'][0x0]){const _0xea68ef=_0x5d67f9['children'][0x0];if(_0x2fa37d['render']=function(_0x4bc49c){const _0x1d4a39=_0x4bc49c['createElement']('div');return _0x1d4a39['innerHTML']=_0xea68ef,_0x1d4a39['childNodes'][0x0];},_0x5966d1){const _0x3949f2=new _0x328fdf(_0x43c232);_0x3949f2['_appendChild'](_0x2fa37d);const _0x3e5df7=Array['from'](_0x5d8815['viewChildrenToDom'](_0x3949f2,{'bind':!0x1})),_0x3be314=_0x5d8815['domDocument']['createElement']('div');_0x3be314['append'](..._0x3e5df7),_0x2fa37d=Array['from'](_0x5d8815['domChildrenToView'](_0x3be314))[0x0];}}else{if('r'==_0x5d67f9['type']&&_0x5d67f9['children'][0x0]){const _0x17ae99=_0x5d67f9['children'][0x0];if(_0x2fa37d['render']=function(_0x20b14d){_0x20b14d['innerHTML']=_0x17ae99;},_0x5966d1){const _0x1a9008=new _0x328fdf(_0x43c232);_0x1a9008['_appendChild'](_0x2fa37d);const _0x560cfa=Array['from'](_0x5d8815['viewChildrenToDom'](_0x1a9008,{'bind':!0x1})),_0x18b420=_0x5d8815['domDocument']['createElement']('div');_0x18b420['append'](..._0x560cfa);const _0x5834b9=Array['from'](_0x5d8815['domChildrenToView'](_0x18b420));_0x5834b9['length']>0x1?_0x2fa37d['_appendChild'](_0x5834b9):_0x2fa37d=_0x5834b9[0x0];}}}if(_0x5d67f9['customProperties']){for(const [_0x2dd08f,_0x394bc8]of _0x5d67f9['customProperties'])_0x2fa37d['_setCustomProperty'](_0x2dd08f,_0x394bc8);}const _0x91f2ec=void 0x0===_0x5d67f9['fillerOffset']?null:_0x5d67f9['fillerOffset'];return null!==_0x91f2ec&&(_0x2fa37d['getFillerOffset']=()=>_0x91f2ec),_0x2fa37d;}}['_makeModelFromViewString'](_0x2d4560,_0x49d52c){const _0xdd338f=JSON['parse'](_0x2d4560),_0x38bc8a=this['editor']['editing']['view']['document'],_0x238b31=new _0x328fdf(_0x38bc8a,_0xdd338f['map'](_0x1cb646=>this['_getViewFromDiffObj'](_0x1cb646,!0x0))),_0x24f9ec=this['editor']['data']['toModel'](_0x238b31,_0x49d52c);return _0x24f9ec['name']=_0x49d52c,_0x24f9ec;}['_removeRevisionMarkers'](_0x4438e1){return(_0x4438e1=_0x4438e1['filter'](_0x32e01e=>!_0x32e01e['name']||'revision-start'!==_0x32e01e['name']&&'revision-end'!==_0x32e01e['name']))['forEach'](_0x505326=>{'string'!=typeof _0x505326&&(_0x505326['children']=this['_removeRevisionMarkers'](_0x505326['children']),_0x505326['attributes']=_0x505326['attributes']['filter'](_0x1f2d7d=>!_0x1f2d7d[0x0]['startsWith']('data-revision-')));}),_0x4438e1;}}function ft(_0x3f2cd5,_0x2d69a6,_0x154b5c){const t=_0x3f2cd5['t'];switch(_0x2d69a6){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'},_0x154b5c);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x154b5c);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 RevisionTracker extends _0x1098b4{['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[_0x1b1234,RevisionsRepository,RevisionHistoryUtils,_0x475171];}constructor(_0x776425){super(_0x776425),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 _0xa447b4=_0x13fdf1();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0xa447b4},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 _0x54166c=this['repository']['getRevision'](0x0),_0x33f480=_0x54166c&&null===_0x54166c['creator']?_0x54166c:null;if(this['_continueCurrentRevision']=!!_0x33f480&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0xd0344b=this['_source']['getCurrentRevisionId'](),_0x507538=this['repository']['getRevision'](_0xd0344b);if(_0x507538)this['_startingVersion']=_0x507538['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0xe09c44=this['_source']['history']['_operations']['find'](_0x18fc02=>!_0x18fc02['_isInit']),_0x4bc832=_0xe09c44?_0xe09c44['baseVersion']:this['_source']['history']['version'];_0x54166c?(_0x54166c['toVersion']<_0x4bc832&&_0x54166c['_update']({'toVersion':_0x4bc832}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x33f480['id'],this['_startingVersion']=_0x33f480['fromVersion']):(this['_startingVersion']=_0x54166c['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x4bc832,this['_continueCurrentRevision']=!0x1);}}else _0x33f480&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x33f480['toVersion'],this['editor']['model']['document']['history']['version']),_0x33f480['fromVersion']===_0x33f480['toVersion']?(0x0!==_0x33f480['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x33f480['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x33f480['id'],this['_startingVersion']=_0x33f480['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',_0x52502f=>!_0x52502f),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x25bdc0=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x55e65e;for(const _0x4e1b6b in _0x25bdc0){const _0x19e55c=_0x4e1b6b,_0x5d7a10=_0x25bdc0[_0x19e55c];if('revisionHistoryLicenseKeyValid'==_0x5d7a10||'revisionHistoryLicenseKeyInvalid'==_0x5d7a10||'revisionHistoryLicenseKeyExpired'==_0x5d7a10||'revisionHistoryLicenseKeyDomainLimit'==_0x5d7a10||'revisionHistoryLicenseKeyNotAllowed'==_0x5d7a10||'revisionHistoryLicenseKeyEvaluationLimit'==_0x5d7a10||'revisionHistoryLicenseKeyUsageLimit'==_0x5d7a10){delete _0x25bdc0[_0x19e55c],_0x55e65e=_0x5d7a10,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x55e65e&&_0x25bdc0['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x55e65e&&_0x25bdc0['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x55e65e&&_0x25bdc0['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x55e65e&&_0x25bdc0['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x55e65e&&_0x25bdc0['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x55e65e&&_0x25bdc0['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x249119=this['repository']['getRevision'](0x0),_0x3c90df=await this['getRevisionDocumentData'](_0x249119),_0x2447ab=await this['getRevisionRootsAttributes'](_0x249119),_0x2ed872=this['_utils']['getRevisionRootsModelElements'](_0x249119);this['_replaceEditorDataWithRevisionData'](_0x3c90df,_0x2447ab,_0x2ed872);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x26c388){this['_source']=_0x26c388;}async['update'](){const _0x57a3f1=await this['_source']['getLatestVersion']();if(_0x57a3f1>this['currentRevision']['toVersion']){await this['_loadState']();const _0x181037=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x57a3f1});_0x181037['authors']=_0x181037['authorsIds']['map'](_0x1bf6aa=>this['editor']['plugins']['get']('Users')['getUser'](_0x1bf6aa)),this['currentRevision']['_update'](_0x181037);}}async['saveRevision'](_0x196fbb={},_0x3e1a97=null){const _0x42381d=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x3e1a97>this['currentRevision']['toVersion']&&(_0x3e1a97=null),null===_0x3e1a97&&(_0x3e1a97=await this['_source']['getLatestVersion']());const _0x55fa4a=this['_getFromVersion'](_0x3e1a97),_0x560ce1=this['buildRevisionData']({'from':_0x55fa4a,'to':_0x3e1a97});if(this['currentRevision']['toVersion']<_0x3e1a97){const _0x186dc5=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x3e1a97,'to':_0x3e1a97});_0x186dc5['authors']=[],_0x186dc5['authorsIds']=[],_0x186dc5['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x186dc5,!0x0),delete _0x186dc5['authors'],_0x42381d['push'](_0x186dc5);}_0x196fbb['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x196fbb['name']=_0x196fbb['name']||null,_0x196fbb['id']=_0x196fbb['id']||_0x13fdf1(),_0x196fbb={..._0x196fbb,..._0x560ce1};const _0x3bfc1e=this['addRevisionData'](_0x196fbb);_0x42381d['push'](_0x196fbb);const _0x57e187=this['repository']['getIndex'](_0x3bfc1e);if(0x0!==_0x57e187){const _0x49f5e3=this['repository']['getRevision'](_0x57e187-0x1);if(_0x49f5e3['fromVersion']!==_0x3e1a97){const _0x11f270=this['_revisionDataBuilder']['getData'](_0x3e1a97,_0x49f5e3['toVersion']),_0x482c30={'id':_0x49f5e3['id'],'diffData':_0x11f270['diffData'],'authorsIds':_0x11f270['authorsIds'],'authors':_0x11f270['authorsIds']['map'](_0x1f1f29=>this['editor']['plugins']['get']('Users')['getUser'](_0x1f1f29)),'fromVersion':_0x3e1a97};_0x49f5e3===this['currentRevision']&&(_0x482c30['createdAt']=new Date(_0x196fbb['createdAt']['getTime']()+0xa)),_0x49f5e3['_update'](_0x482c30,!0x0),delete _0x482c30['authors'],_0x42381d['push'](_0x482c30);}}if(this['adapter']){for(const _0x14bec6 of _0x42381d)this['_bufferUpdate'](_0x14bec6['id'],_0x14bec6,!0x0);this['sendBufferedUpdates']();}return _0x3bfc1e;}['addRevisionData'](_0x8d3b5e){const _0x218d93=this['repository']['createRevision'](_0x8d3b5e);return this['adapter']&&_0x218d93['on']('_update',(_0x36a923,_0x394f95,_0x36655d)=>{_0x36655d||(this['_bufferUpdate'](_0x394f95['id'],_0x394f95,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x218d93,this['_findInsertionIndex'](_0x218d93)),_0x218d93;}async['getRevisionDocumentData'](_0x1d0a6f){return await this['_utils']['loadRevisionData'](_0x1d0a6f,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x1d0a6f);}async['getRevisionRootsAttributes'](_0x259ff3){return await this['_utils']['loadRevisionData'](_0x259ff3,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x259ff3);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x2c135c=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x26a8ab=0x0;_0x26a8ab<_0x2c135c['length'];_0x26a8ab++){const _0x5a7bc2=_0x2c135c[_0x26a8ab];let _0x284b64=!0x1;for(const _0x442614 of Object['keys'](_0x5a7bc2))void 0x0===_0x5a7bc2[_0x442614]?delete _0x5a7bc2[_0x442614]:'id'!==_0x442614&&(_0x284b64=!0x0);_0x284b64||(_0x2c135c[_0x26a8ab]=null);}if(_0x2c135c=_0x2c135c['filter'](_0x4d753a=>null!==_0x4d753a),!_0x2c135c['length'])return;for(let _0x2ba421=0x0;_0x2ba421<_0x2c135c['length'];_0x2ba421++){const _0x4fe3c0=_0x2c135c[_0x2ba421];void 0x0!==_0x4fe3c0['fromVersion']&&void 0x0===_0x4fe3c0['toVersion']&&(_0x4fe3c0['toVersion']=this['repository']['getRevision'](_0x4fe3c0['id'])['toVersion']),void 0x0!==_0x4fe3c0['toVersion']&&void 0x0===_0x4fe3c0['fromVersion']&&(_0x4fe3c0['fromVersion']=this['repository']['getRevision'](_0x4fe3c0['id'])['fromVersion']);}const _0x455569=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x2c135c,_0x455569)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x344b49=>{if(_0x344b49){for(const _0x97cd32 of _0x344b49)this['setRevisionData']({'id':_0x97cd32['id'],'createdAt':_0x97cd32['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x214805=null,from:_0x31eb70=null,to:_0x5cd806=null}){_0x31eb70=null!==_0x31eb70?_0x31eb70:_0x214805['fromVersion'],_0x5cd806=null!==_0x5cd806?_0x5cd806:_0x214805['toVersion'];const _0x277c9d=this['_revisionDataBuilder']['getData'](_0x31eb70,_0x5cd806),_0x5a73fd={'diffData':_0x277c9d['diffData'],'authorsIds':_0x277c9d['authorsIds'],'fromVersion':_0x31eb70,'toVersion':_0x5cd806};if(!_0x214805||_0x5cd806!==_0x214805['toVersion']){const _0x102160=_0x5cd806-0x1,_0x37f3fc=this['_source']['history']['getOperation'](_0x102160);_0x5a73fd['createdAt']=_0x37f3fc&&_0x37f3fc['createdAt']||new Date();}if(this['_loadedStateData']&&_0x31eb70===this['_loadedStateData']['fromVersion']){for(const _0x537389 of this['_loadedStateData']['authors'])_0x5a73fd['authorsIds']['includes'](_0x537389['id'])||_0x5a73fd['authorsIds']['push'](_0x537389['id']);}return _0x5a73fd;}['_bufferUpdate'](_0x4dcc49,_0x2b97d5,_0x260cbc){if(this['_bufferedUpdates']['has'](_0x4dcc49)){const _0x4c2fba=this['_bufferedUpdates']['get'](_0x4dcc49);_0x2b97d5=_0x260cbc?{..._0x4c2fba,..._0x2b97d5}:{..._0x2b97d5,..._0x4c2fba};}this['_bufferedUpdates']['set'](_0x4dcc49,_0x2b97d5);}['setRevisionData'](_0x483ca6){const _0x4cfeb5=this['repository']['getRevision'](_0x483ca6['id']);if(_0x483ca6['createdAt']&&(_0x483ca6['createdAt']=new Date(_0x483ca6['createdAt'])),_0x483ca6['authorsIds']){const _0x2aca71=this['editor']['plugins']['get']('Users');_0x483ca6['authors']=_0x483ca6['authorsIds']['map'](_0x1db3bc=>_0x2aca71['getUser'](_0x1db3bc));}_0x4cfeb5['_update'](_0x483ca6,!0x0);}['_createInitialRevision'](_0x26b8c6){const _0x29782a=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x29782a)this['_initialRevisionId']=_0x29782a['id'];else{const _0x53b736=!this['editor']['model']['document']['roots']['find'](_0x47ae89=>this['editor']['model']['hasContent'](_0x47ae89)),_0x56479d=this['editor']['plugins']['get']('Users')['me']['id'],_0x2e13a0=ft(this['editor']['locale'],_0x53b736?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x26b8c6,'to':_0x26b8c6,'id':this['_initialRevisionId'],'name':_0x2e13a0,'creatorId':_0x56479d});}}['_createCurrentRevision'](_0x2cdf4e){const _0xfed8d0=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0xfed8d0),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x2cdf4e,'to':_0x2cdf4e,'id':_0xfed8d0,'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'](_0x364c00,_0x5caa34,_0x31e6e2){const _0xd00280={},_0x5050c5={},_0x7c24ae={},_0x43d069=this['editor']['config']['get']('roots')||{};for(const [_0x2ca21b,_0x1ced29]of Object['entries'](_0x43d069))_0x1ced29['lazyLoad']||(_0xd00280[_0x2ca21b]=_0x1ced29['initialData']??'',_0x5050c5[_0x2ca21b]=_0x1ced29['modelAttributes']||{},_0x1ced29['modelElement']&&(_0x7c24ae[_0x2ca21b]=_0x1ced29['modelElement']));for(const _0x314ff3 of this['editor']['model']['document']['getRootNames']())_0xd00280[_0x314ff3]??='',_0x5050c5[_0x314ff3]??={};let _0x3acc76=!0x1;const _0x441c16=Object['keys'](_0xd00280),_0x31dcf1=Object['keys'](_0x364c00);for(const _0x35bf05 of _0x441c16){if(_0xd00280[_0x35bf05]!==_0x364c00[_0x35bf05]&&''!==_0xd00280[_0x35bf05]['trim']()){_0x3acc76=!0x0;break;}if(!_0x882995(_0x5050c5[_0x35bf05],_0x5caa34[_0x35bf05])&&Object['keys'](_0x5050c5[_0x35bf05])['length']>0x0){_0x3acc76=!0x0;break;}const _0x382282=_0x7c24ae[_0x35bf05],_0x3c50bc=_0x31e6e2[_0x35bf05];if(_0x382282&&_0x3c50bc&&_0x382282!==_0x3c50bc){_0x3acc76=!0x0;break;}}_0x3acc76||(_0x3acc76=_0x31dcf1['some'](_0x21ef22=>!this['editor']['model']['document']['getRoot'](_0x21ef22))),_0x3acc76&&_0x477743('editor-initial-data-replaced-with-revision-data',{'editorData':_0xd00280,'editorRootsAttributes':_0x5050c5,'editorRootsModelElements':_0x7c24ae,'revisionData':_0x364c00,'revisionRootsAttributes':_0x5caa34,'revisionRootsModelElements':_0x31e6e2});for(const [_0x12bb42,_0x1b4c7c]of Object['entries'](_0x364c00))this['editor']['config']['set']('roots.'+_0x12bb42+'.initialData',_0x1b4c7c);for(const [_0x306163,_0x5164e0]of Object['entries'](_0x5caa34))this['editor']['config']['set']('roots.'+_0x306163+'.modelAttributes',_0x5164e0);const _0x11c998=this['editor']['model']['document'];for(const [_0x1cc225,_0x107de9]of Object['entries'](_0x31e6e2)){this['editor']['config']['set']('roots.'+_0x1cc225+'.modelElement',_0x107de9);const _0xe72d57=_0x11c998['getRoot'](_0x1cc225);_0xe72d57&&_0xe72d57['name']!==_0x107de9&&(_0x11c998['roots']['remove'](_0x1cc225),_0x11c998['createRoot'](_0x107de9,_0x1cc225));}}['_addPendingAction'](){if(!this['_pendingAction']){const _0x38e1b8=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x38e1b8['add'](ft(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x13f8a7){const _0x5a92e1=this['repository']['getRevisions']();_0x5a92e1['reverse']();let _0x2419e9=0x0;for(;_0x2419e9<_0x5a92e1['length'];){const _0x285734=_0x5a92e1[_0x2419e9];if(_0x285734===this['currentRevision']){_0x2419e9++;continue;}if(_0x285734['id']===this['_initialRevisionId'])break;const _0xd84d93=_0x13f8a7['toVersion']-_0x285734['toVersion']||_0x13f8a7['fromVersion']-_0x285734['fromVersion'];if(_0xd84d93>0x0)break;if(_0xd84d93<0x0)_0x2419e9++;else{if(!_0x13f8a7['creator']&&_0x285734['creator'])break;if(_0x285734['creator']||!_0x13f8a7['creator']){if(_0x13f8a7['createdAt']>_0x285734['createdAt'])break;_0x2419e9++;}else _0x2419e9++;}}return _0x2419e9;}['_getFromVersion'](_0x2a62e6){const _0x370ddd=this['repository']['getRevisions']();_0x370ddd['reverse'](),_0x370ddd['shift']();const _0x18eada=_0x370ddd['find'](_0x1be568=>_0x1be568['toVersion']<=_0x2a62e6)['toVersion'];return _0x18eada<this['_startingVersion']?this['_startingVersion']:_0x18eada;}['_makeRevision']({name:_0x382a5b,from:_0x123c99,to:_0x288312,creatorId:_0x135d63,id:_0x599273}){const _0xe4075d=this['buildRevisionData']({'from':_0x123c99,'to':_0x288312});_0xe4075d['name']=_0x382a5b,_0xe4075d['creatorId']=_0x135d63,_0xe4075d['id']=_0x599273;const _0x8cb06b=this['addRevisionData'](_0xe4075d);return this['adapter']&&this['_bufferUpdate'](_0xe4075d['id'],_0xe4075d,!0x0),_0x8cb06b;}['_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(_0x3ebbde){this['editor']=_0x3ebbde,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'](_0x1a9fc2){this['source']=_0x1a9fc2;const _0x408b98=new Map(),_0x33db96=new Map(),_0x4a2d8a=this['editor']['model']['document']['roots']['map'](_0x2a8b7c=>_0x2a8b7c['rootName']);for(const _0x3fe09f of _0x4a2d8a){const _0x1c3cc6=this['editor']['model']['document']['getRoot'](_0x3fe09f),_0x80c5d5=gt(_0x1c3cc6);_0x408b98['set'](_0x3fe09f,_0x80c5d5),_0x33db96['set'](_0x3fe09f,Object['fromEntries'](_0x1c3cc6['getAttributes']()));}const _0x1cd99f=Array['from'](this['editor']['model']['markers'])['map'](_0x56b69b=>[_0x56b69b['name'],_0x56b69b['getRange']()]),_0x259982=this['source']['version'];this['_saveMetaData'](_0x259982,_0x408b98,_0x1cd99f,_0x33db96),this['_startingRevisionId']=this['_revisionId'];const _0x2e93e4=new Map(),_0x3bd208=new Map();for(const _0xaa4f43 of _0x4a2d8a){const _0xa54e20=wt(_0xaa4f43,this['editor']['model']['document']['getRoot'](_0xaa4f43)['name']);_0x2e93e4['set'](_0xaa4f43,_0xa54e20),_0x3bd208['set'](_0xaa4f43,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x2e93e4,[],_0x3bd208);}['getData'](_0x128248,_0x473115){if(this['_lastFrom']===_0x128248&&this['_lastTo']<=_0x473115)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x473115,!0x0);else{if(!this['_savedMetaData']['has'](_0x128248)){const _0x209c96=this['_getPreviousFrom'](_0x128248);this['_calculateMetaData'](_0x209c96,_0x128248,!0x1);}this['_calculateMetaData'](_0x128248,_0x473115,!0x0);}return this['_lastFrom']=_0x128248,this['_lastTo']=_0x473115,this['_getState']();}['loadState'](_0x318fb2){if(!this['_savedMetaData']['has'](_0x318fb2['fromVersion'])){const _0x1bfd77=this['_getPreviousFrom'](_0x318fb2['fromVersion']);this['_calculateMetaData'](_0x1bfd77,_0x318fb2['fromVersion'],!0x1);}this['_calculateMetaData'](_0x318fb2['fromVersion'],_0x318fb2['toVersion'],!0x1);const _0x47af83=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x318fb2['fromVersion'],this['_lastTo']=_0x318fb2['toVersion'];for(const _0x265613 in _0x318fb2['diffData']){const _0x476bd4=_0x318fb2['diffData'][_0x265613]['attachChange'],_0x3c2dd4=_0x5ba81d(_0x318fb2['diffData'][_0x265613]['attributesBefore'])||{},_0x11a2e2=_0x318fb2['diffData'][_0x265613],_0x4c525b=_0x47af83['_makeModelFromViewString'](_0x11a2e2['deletions'],_0x11a2e2['rootElementName']||'$root');_0x4c525b['rootName']=_0x265613,_0x4c525b['_isAttached']=!_0x476bd4||!_0x476bd4['isAttached'],_0x4c525b['isAttached']=()=>_0x4c525b['_isAttached'],this['_baseRoots']['set'](_0x265613,_0x4c525b),this['_baseRootsAttributes']['set'](_0x265613,_0x3c2dd4),_0x476bd4&&this['_touchedRoots']['set'](_0x265613,_0x476bd4);const _0x50a755=this['_makeIdsRoot'](_0x4c525b);this['_baseIdsRoots']['set'](_0x265613,_0x50a755);for(const [_0x144362,_0x1ce868]of _0x4c525b['markers']){if(!_0x144362['startsWith']('revision:'))continue;const _0x4920f4=_0x144362['split'](':')[0x2];for(const _0x2c3abc of _0x1ce868['getWalker']({'singleCharacters':!0x0})){const _0x2b00aa=this['_getVidAttributeName'](_0x2c3abc),_0x1e4014='elementEnd'==_0x2c3abc['type']?_0x2c3abc['previousPosition']['path']['slice'](0x0,-0x1):_0x2c3abc['previousPosition']['path'],_0x187e7c=_0x50a755['getNodeByPath'](_0x1e4014)['getAttribute'](_0x2b00aa);this['_touched']['set'](_0x187e7c,{'userId':_0x4920f4});}_0x4c525b['markers']['delete'](_0x144362);}}this['_startingRevisionId']=this['_revisionId'];const _0x11f06b=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x4bab9a=>!this['_touched']['has'](_0x4bab9a));let _0x3f6c51=0x0;const _0x27b531=new Map();for(const _0x8df31 in _0x318fb2['diffData']){const _0x2eb715=_0x318fb2['diffData'][_0x8df31]['attachChange'],_0x4bc536=_0x5ba81d(_0x318fb2['diffData'][_0x8df31]['attributesAfter'])||{},_0x374ba7=_0x318fb2['diffData'][_0x8df31],_0x106412=_0x47af83['_makeModelFromViewString'](_0x374ba7['insertions'],_0x374ba7['rootElementName']||'$root');_0x106412['rootName']=_0x8df31,_0x106412['_isAttached']=!_0x2eb715||_0x2eb715['isAttached'],_0x106412['isAttached']=()=>_0x106412['_isAttached'],this['_diffRoots']['set'](_0x8df31,_0x106412),this['_diffRootsAttributes']['set'](_0x8df31,_0x4bc536);const _0x462efa=this['_makeIdsRoot'](_0x106412,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x8df31,_0x462efa),_0x27b531['set'](_0x8df31,_0x106412['isAttached']()?_0x4bc536:{});for(const [_0x66132a,_0x270f66]of _0x106412['markers']){if(!_0x66132a['startsWith']('revision:'))continue;const _0x221617=_0x66132a['split'](':')[0x2];for(const _0x22dbbd of _0x270f66['getWalker']({'singleCharacters':!0x0})){const _0x3bca9a=this['_getVidAttributeName'](_0x22dbbd),_0x2c4544=this['_revisionId']++,_0x5e0655='elementEnd'==_0x22dbbd['type']?_0x22dbbd['previousPosition']['path']['slice'](0x0,-0x1):_0x22dbbd['previousPosition']['path'];_0x462efa['getNodeByPath'](_0x5e0655)['_setAttribute'](_0x3bca9a,_0x2c4544),this['_touched']['set'](_0x2c4544,{'userId':_0x221617});}_0x106412['markers']['delete'](_0x66132a);}for(const _0x1e32f2 of this['editor']['model']['createRangeIn'](_0x106412)['getWalker']({'singleCharacters':!0x0})){const _0xe6cad1=this['_getVidAttributeName'](_0x1e32f2),_0x979ce4='elementEnd'==_0x1e32f2['type']?_0x1e32f2['previousPosition']['path']['slice'](0x0,-0x1):_0x1e32f2['previousPosition']['path'],_0x233eca=_0x462efa['getNodeByPath'](_0x979ce4);_0x233eca['getAttribute'](_0xe6cad1)>0x0||_0x233eca['_setAttribute'](_0xe6cad1,_0x11f06b[_0x3f6c51++]);}for(const [_0x58288d,_0x11dd69]of _0x106412['markers'])_0x58288d['startsWith']('revision:')||this['_markers']['set'](_0x58288d,_0x11dd69);}const {roots:_0x2ebd97}=this['_savedMetaData']['get'](_0x318fb2['fromVersion']),{roots:_0x227190}=this['_savedMetaData']['get'](_0x318fb2['toVersion']),_0x4e26af=gt(_0x2ebd97['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x4e26af),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x4e26af,Number['NEGATIVE_INFINITY']));const _0x27378f=gt(_0x227190['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x27378f),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x27378f));const _0x2bfcc1=Array['from'](this['_diffRoots'])['map'](([_0x347497,_0x3cdeda])=>[_0x347497,gt(_0x3cdeda)]);this['_saveMetaData'](this['_lastTo'],_0x2bfcc1,this['_markers'],_0x27b531);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x1f7249,_0x51a9c7,_0x51d59c,_0x112edd){const _0x11684b=new Map(_0x51a9c7),_0x301185=new Map(_0x5ba81d(_0x112edd)),_0x590527=new Map();for(const [_0x2aa901,_0x2c2406]of _0x51d59c)_0x590527['set'](_0x2aa901,{'start':_0x2c2406['start']['clone'](),'end':_0x2c2406['end']['clone'](),'rootName':_0x2c2406['root']['rootName']});this['_savedMetaData']['set'](_0x1f7249,{'roots':_0x11684b,'markers':_0x590527,'rootsAttributes':_0x301185});}['_removeMetaData'](_0x3c2ed3){this['_savedMetaData']['delete'](_0x3c2ed3);}['_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'](_0x535894,_0x20cbee=null){let _0x4ce034=null;_0x535894['is']('documentFragment')||(_0x4ce034=new _0x309f06(_0x535894['name'],{'vid_start':null===_0x20cbee?this['_revisionId']++:_0x20cbee++}));const _0x57194b=[];for(const _0x137395 of _0x535894['getChildren']())if(_0x137395['is']('element')){_0x57194b['push'](this['_makeIdsRoot'](_0x137395,_0x20cbee));const _0x5487f2=_0x57194b[_0x57194b['length']-0x1];null!==_0x20cbee&&(_0x20cbee=_0x5487f2['is']('element','$text')?_0x5487f2['getAttribute']('vid')+0x1:_0x5487f2['getAttribute']('vid_end')+0x1);}else{for(let _0x10f634=0x0;_0x10f634<_0x137395['offsetSize'];_0x10f634++)_0x57194b['push'](new _0x309f06('$text',{'vid':null===_0x20cbee?this['_revisionId']++:_0x20cbee++}));}if(_0x535894['is']('documentFragment')){const _0x445bf6=wt(_0x535894['rootName'],_0x535894['name']);return _0x445bf6['_insertChild'](0x0,_0x57194b),_0x445bf6;}return _0x4ce034['_setAttribute']('vid_end',null===_0x20cbee?this['_revisionId']++:_0x20cbee++),_0x4ce034['_insertChild'](0x0,_0x57194b),_0x4ce034;}['_calculateMetaData'](_0x37d5e2,_0xc7d0a3,_0x415a8d){this['_reset']();const {roots:_0x29911d,markers:_0x426366,rootsAttributes:_0x2045fc}=this['_savedMetaData']['get'](_0x37d5e2);this['_baseRoots']=new Map(_0x29911d),this['_baseRootsAttributes']=new Map(_0x5ba81d(_0x2045fc));for(const [_0x370ba5,_0x5bdb20]of this['_baseRoots'])if('$graveyard'!==_0x370ba5&&(this['_diffRoots']['set'](_0x370ba5,gt(_0x5bdb20)),this['_diffRootsAttributes']=new Map(_0x5ba81d(_0x2045fc)),_0x415a8d)){const _0x5a6bad=this['_revisionId'];this['_idsRoots']['set'](_0x370ba5,this['_makeIdsRoot'](_0x5bdb20)),this['_baseIdsRoots']['set'](_0x370ba5,this['_makeIdsRoot'](_0x5bdb20,_0x5a6bad));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',gt(this['_baseRoots']['get']('$graveyard'))),_0x415a8d&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x3ada23,_0x54e3e7]of _0x426366){const _0x25416a=this['_baseRoots']['get'](_0x54e3e7['rootName']),_0x584398=this['_diffRoots']['get'](_0x54e3e7['rootName']),_0x17ad95=new _0x210c0a(this['_fixPosition'](_0x54e3e7['start'],_0x25416a),this['_fixPosition'](_0x54e3e7['end'],_0x25416a)),_0x2f9331=this['_fixRange'](_0x17ad95,_0x584398);_0x25416a['markers']['set'](_0x3ada23,_0x17ad95),this['_markers']['set'](_0x3ada23,_0x2f9331);}this['_applyOperations'](_0x37d5e2,_0xc7d0a3,_0x415a8d);}['_applyOperations'](_0x4289d6,_0x11518b,_0x568513){for(const _0x62990e of this['source']['getOperations'](_0x4289d6,_0x11518b))this['_handleOperation'](_0x62990e,_0x568513);for(const _0x3c1489 of this['_diffRoots']['values']())_0x3c1489['markers']['clear']();for(const [_0x11570b,_0xe81185]of this['_markers']){this['_diffRoots']['get'](_0xe81185['root']['rootName'])['markers']['set'](_0x11570b,_0xe81185['clone']());}const _0x52cc1f=new Map(),_0x45e16a=new Map();for(const [_0x1f7202,_0x1e72b2]of this['_diffRoots'])_0x52cc1f['set'](_0x1f7202,gt(_0x1e72b2)),_0x45e16a['set'](_0x1f7202,this['_diffRootsAttributes']['get'](_0x1f7202));this['_saveMetaData'](_0x11518b,_0x52cc1f,this['_markers'],_0x45e16a);}['_getPreviousFrom'](_0x4c1c91){const _0x43bdfb=Array['from'](this['_savedMetaData']['keys']());_0x43bdfb['sort']((_0x4b58fe,_0x1afcba)=>_0x4b58fe-_0x1afcba),_0x43bdfb['reverse']();for(const _0x4f86bc of _0x43bdfb)if(_0x4f86bc<_0x4c1c91)return _0x4f86bc;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x2a30ea,_0x41cd00){const _0x578f7f=Array['from'](_0x41cd00['markers'])['map'](([_0xd73f3f,_0x375e7b])=>[_0xd73f3f,this['_fixRange'](_0x375e7b,_0x2a30ea)]);_0x2a30ea['markers']=new Map(_0x578f7f);}['_transformMarkers'](_0x34bee8){for(const _0x3fb64a of this['_markers']['values']()){const _0x493a07=_0x3fb64a['getTransformedByOperation'](_0x34bee8),_0x2bfc1d=_0x210c0a['_createFromRanges'](_0x493a07);_0x3fb64a['start']=_0x2bfc1d['start'],_0x3fb64a['end']=_0x2bfc1d['end'];}}['_handleOperation'](_0x4c8687,_0x41322a){if('addRoot'!=_0x4c8687['type']&&'detachRoot'!=_0x4c8687['type']){if('insert'==_0x4c8687['type']){const _0x113ff0=_0x4c8687['position']['root'],_0x32a68b=_0x113ff0['rootName'],_0x16ca52=_0x113ff0['name'];this['_diffRoots']['has'](_0x32a68b)||(this['_diffRoots']['set'](_0x32a68b,wt(_0x32a68b,_0x16ca52,!0x0)),this['_diffRootsAttributes']['set'](_0x32a68b,{}),_0x41322a&&this['_idsRoots']['set'](_0x32a68b,wt(_0x32a68b,_0x16ca52,!0x0)));}else{if('addRootAttribute'==_0x4c8687['type']||'removeRootAttribute'==_0x4c8687['type']||'changeRootAttribute'==_0x4c8687['type'])return void this['_handleRootAttributeOperation'](_0x4c8687);'marker'==_0x4c8687['type']&&this['_handleMarkerOperation'](_0x4c8687);}if('marker'!==_0x4c8687['type']){const _0x1bb2dd=this['_cloneOperation'](_0x4c8687,this['_diffRoots']);_0x1bb2dd['_execute'](),this['_transformMarkers'](_0x1bb2dd);}if(_0x41322a)switch(_0x4c8687['type']){case'insert':this['_handleInsertOperation'](_0x4c8687);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x4c8687);break;case'merge':this['_handleMergeOperation'](_0x4c8687);break;case'split':this['_handleSplitOperation'](_0x4c8687);}}else this['_handleRootOperation'](_0x4c8687,_0x41322a);}['_cloneOperation'](_0x146de7,_0x399bef){const _0x58b94c=_0x146de7['clone']();return _0x58b94c['_authorId']=_0x146de7['_authorId'],this['_fixOperation'](_0x58b94c,_0x399bef),_0x58b94c;}['_getBaseVids'](_0x15820c){return _0x15820c['map'](_0x35348e=>{const _0x34fcd9=this['_getVidAttributeName'](_0x35348e);return Number(_0x35348e['item']['getAttribute'](_0x34fcd9));});}['_generateTape'](_0x6556fe,_0x1c7b15){if(_0x6556fe['is']('element','$text'))_0x1c7b15['push']({'item':_0x6556fe,'type':'text'});else{_0x6556fe['is']('element')&&_0x1c7b15['push']({'item':_0x6556fe,'type':'elementStart'});for(const _0x23e2d7 of _0x6556fe['getChildren']())this['_generateTape'](_0x23e2d7,_0x1c7b15);_0x6556fe['is']('element')&&_0x1c7b15['push']({'item':_0x6556fe,'type':'elementEnd'});}return _0x1c7b15;}['_getState'](){const _0x4b1b6c=new Map(this['_touched']),_0x127eb2=new Map(_0x4b1b6c),_0x22f62a=new Map(),_0x480c1e={'insertions':{},'deletions':{}},_0x527f53={'insertions':{},'deletions':{}},_0x40b1a5=new Map(),_0x461fac=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x490437=new Map();_0x461fac['delete']('$graveyard');for(const _0x3b9ce4 of _0x461fac){const _0x1922d1=(this['_diffRoots']['get'](_0x3b9ce4)??this['_baseRoots']['get'](_0x3b9ce4))['name'],_0x5740cb=this['_diffRoots']['get'](_0x3b9ce4)||wt(_0x3b9ce4,_0x1922d1,!0x1),_0x395706=this['_baseRoots']['get'](_0x3b9ce4)||wt(_0x3b9ce4,_0x1922d1,!0x1);_0x5740cb['isAttached']()||_0x395706['isAttached']()?(_0x490437['set'](_0x3b9ce4,_0x1922d1),_0x480c1e['insertions'][_0x3b9ce4]=gt(_0x5740cb),_0x480c1e['deletions'][_0x3b9ce4]=gt(_0x395706),this['_copyMarkers'](_0x480c1e['deletions'][_0x3b9ce4],_0x395706),this['_copyMarkers'](_0x480c1e['insertions'][_0x3b9ce4],_0x5740cb),_0x527f53['insertions'][_0x3b9ce4]=this['_generateTape'](this['_idsRoots']['get'](_0x3b9ce4),[]),_0x527f53['deletions'][_0x3b9ce4]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x3b9ce4)||wt(_0x3b9ce4,_0x1922d1,!0x1),[])):_0x461fac['delete'](_0x3b9ce4);}for(const _0xce7b84 of _0x461fac){const _0x2be3d1=_0x527f53['insertions'][_0xce7b84];for(const _0x52a5a6 of _0x2be3d1){const _0x56936c=this['_getVidAttributeName'](_0x52a5a6),_0x2928f4=_0x52a5a6['item']['getAttribute'](_0x56936c);_0x127eb2['delete'](_0x2928f4),_0x2928f4>=this['_startingRevisionId']&&_0x22f62a['set'](_0x2928f4,_0x4b1b6c['get'](_0x2928f4));}}for(const _0x3efc3b of _0x461fac){const _0x5bb574=_0x527f53['insertions'][_0x3efc3b],_0x34203e=this['_getBaseVids'](_0x527f53['deletions'][_0x3efc3b]);let _0x50b090=0x0;for(const _0x5515dc of _0x5bb574){const _0x427d39=this['_getVidAttributeName'](_0x5515dc),_0x188d73=_0x5515dc['item']['getAttribute'](_0x427d39);if(!_0x22f62a['has'](_0x188d73)&&!_0x40b1a5['has'](_0x188d73)){if(_0x127eb2['has'](_0x188d73))_0x50b090++;else{if(_0x188d73!=_0x34203e[_0x50b090]){const _0x35da37=_0x4b1b6c['get'](_0x188d73)||_0x4b1b6c['get'](_0x34203e[_0x50b090]);for(;_0x188d73!=_0x34203e[_0x50b090];)_0x127eb2['has'](_0x34203e[_0x50b090])||(_0x40b1a5['set'](_0x34203e[_0x50b090],_0x35da37),_0x4b1b6c['set'](_0x34203e[_0x50b090],_0x35da37)),_0x50b090++;}_0x50b090++;}}}}for(const _0x4546c6 of _0x461fac){const _0x39259e=_0x527f53['insertions'][_0x4546c6];for(const _0x3addf8 of _0x39259e){const _0x2d74eb=this['_getVidAttributeName'](_0x3addf8),_0x467f56=_0x3addf8['item']['getAttribute'](_0x2d74eb);if(_0x40b1a5['has'](_0x467f56)){const _0x5c0345=_0x40b1a5['get'](_0x467f56);_0x127eb2['has'](_0x467f56)||_0x127eb2['set'](_0x467f56,{..._0x5c0345}),_0x22f62a['set'](_0x467f56,{..._0x5c0345});}}}for(const _0x38ed3b of _0x127eb2['keys']())_0x38ed3b>=this['_startingRevisionId']&&_0x127eb2['delete'](_0x38ed3b);const _0x3bbb19=new Map();for(const _0x1d426a of _0x461fac){let _0x392f92=_0x527f53['insertions'][_0x1d426a];for(const _0x2857c8 of _0x392f92)if(_0x2857c8['item']['is']('element','tableCell')){const _0x3e3b37=this['_getVidAttributeName'](_0x2857c8),_0x255004=_0x2857c8['item']['getAttribute'](_0x3e3b37);if(_0x22f62a['has'](_0x255004)){const _0x602a91=_0x2857c8['item']['parent']['parent']['getAttribute']('vid_start'),_0x1963b3=_0x3bbb19['get'](_0x602a91)||new Set();_0x1963b3['add'](_0x22f62a['get'](_0x255004)['userId']),_0x3bbb19['set'](_0x602a91,_0x1963b3);}}_0x392f92=_0x527f53['deletions'][_0x1d426a];for(const _0x289c1e of _0x392f92)if(_0x289c1e['item']['is']('element','tableCell')){const _0x4e6137=this['_getVidAttributeName'](_0x289c1e),_0x1f90c3=_0x289c1e['item']['getAttribute'](_0x4e6137);if(_0x127eb2['has'](_0x1f90c3)){const _0x46cab8=_0x289c1e['item']['parent']['parent']['getAttribute']('vid_start'),_0x58f0b8=_0x3bbb19['get'](_0x46cab8)||new Set();_0x58f0b8['add'](_0x127eb2['get'](_0x1f90c3)['userId']),_0x3bbb19['set'](_0x46cab8,_0x58f0b8);}}for(const _0x49b4dd of _0x3bbb19['keys']())(_0x22f62a['has'](_0x49b4dd)||_0x127eb2['has'](_0x49b4dd))&&_0x3bbb19['delete'](_0x49b4dd);}for(const _0x184268 of _0x461fac){const _0x4cb251=_0x527f53['insertions'][_0x184268];let _0x3f07e6=null,_0x4d702a=null;for(const _0x19a73d of _0x4cb251){const _0x1210a3=this['_getVidAttributeName'](_0x19a73d),_0x561b43=_0x19a73d['item']['getAttribute'](_0x1210a3),_0x3703a4=_0x3bbb19['get'](_0x561b43);_0x3703a4&&'elementStart'==_0x19a73d['type']&&(_0x3f07e6=Array['from'](_0x3703a4)[0x0],_0x4d702a=_0x19a73d['item']['getAttribute']('vid_end')),_0x3f07e6&&(_0x127eb2['set'](_0x561b43,{'userId':_0x3f07e6}),_0x22f62a['set'](_0x561b43,{'userId':_0x3f07e6})),_0x561b43==_0x4d702a&&(_0x3f07e6=null,_0x4d702a=null);}}const _0x2c8b8a={},_0x440165=new Set();for(const _0x379b0e of _0x461fac){const _0x4ae925=_0x480c1e['deletions'][_0x379b0e],_0x5a3665=_0x480c1e['insertions'][_0x379b0e];for(const {userId:_0x314cf3}of this['_touchedMarkers']['values']())null!==_0x314cf3&&_0x440165['add'](_0x314cf3);for(const {userId:_0x26e203}of this['_touchedRoots']['values']())null!==_0x26e203&&_0x440165['add'](_0x26e203);this['_markChanges'](_0x5a3665,_0x527f53['insertions'][_0x379b0e],_0x22f62a,'insertion',_0x440165),this['_markChanges'](_0x4ae925,_0x527f53['deletions'][_0x379b0e],_0x127eb2,'deletion',_0x440165),_0x2c8b8a[_0x379b0e]={'insertions':this['_prepareViewToSave'](_0x5a3665),'deletions':this['_prepareViewToSave'](_0x4ae925),'attachChange':this['_touchedRoots']['get'](_0x379b0e)||null,'attributesBefore':_0x5ba81d(this['_baseRootsAttributes']['get'](_0x379b0e))||{},'attributesAfter':_0x5ba81d(this['_diffRootsAttributes']['get'](_0x379b0e)),'rootElementName':_0x490437['get'](_0x379b0e)};}return{'diffData':_0x2c8b8a,'authorsIds':Array['from'](_0x440165)};}['_processRootBeforeSave'](_0x1d4586){for(const [,_0x361326]of _0x1d4586['markers']){const _0x3cba61=_0x361326['start']['getAncestors']()['filter'](_0x3c13a5=>'tableCell'==_0x3c13a5['name']);for(const _0x2180f1 of _0x3cba61)0x1==_0x2180f1['childCount']&&_0x2180f1['getChild'](0x0)['is']('element','paragraph')&&_0x2180f1['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0xb12085){this['_processRootBeforeSave'](_0xb12085);const _0x9636e6=this['editor']['data']['toView'](_0xb12085,{}),_0x28ce7b=Array['from'](_0x9636e6['getChildren']())['map'](_0x48481d=>this['_getViewJson'](_0x48481d));return JSON['stringify'](_0x28ce7b);}['_getViewJson'](_0x1a7d0c){if(_0x1a7d0c['is']('$text'))return _0x1a7d0c['data'];{const _0x593cb1=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x3f451f=_0x1a7d0c,_0x47a748=this['editor']['data']['htmlProcessor']['domConverter'],_0x46f954={'type':_0x593cb1['_getTypeCharForViewElement'](_0x3f451f),'name':_0x3f451f['name'],'attributes':Array['from'](_0x3f451f['getAttributes']()),'children':Array['from'](_0x3f451f['getChildren']())['map'](_0x2cd04d=>this['_getViewJson'](_0x2cd04d))};if(_0x1a7d0c['is']('uiElement')&&'$comment'!=_0x1a7d0c['name']){const _0x37161c=_0x1a7d0c['render'](_0x47a748['domDocument'],_0x47a748);_0x46f954['children']['push'](_0x37161c['outerHTML']);}else{if(_0x1a7d0c['is']('rawElement')){const _0x4dc72b=_0x47a748['domDocument']['createElement'](_0x3f451f['name']);_0x1a7d0c['render'](_0x4dc72b,_0x47a748),_0x46f954['children']['push'](_0x4dc72b['innerHTML']);}}const _0x57b89a=Array['from'](_0x3f451f['getCustomProperties']());_0x57b89a['length']>0x0&&(_0x46f954['customProperties']=_0x57b89a);const _0x39aa52=_0x3f451f['getFillerOffset']();return null!==_0x39aa52&&(_0x46f954['fillerOffset']=_0x39aa52),_0x46f954;}}['_markChanges'](_0x40c8f8,_0x1f789e,_0x258a80,_0x531a87,_0x146c17){let _0x3d23f9=null,_0x5b87bf=null,_0x55ea84=0x0;const _0x543364=this['editor']['model'];for(let _0x3b4575=0x0;_0x3b4575<_0x1f789e['length'];_0x3b4575++){const _0x398a47=this['_getVidAttributeName'](_0x1f789e[_0x3b4575]),_0x4ed625=_0x1f789e[_0x3b4575]['item']['getAttribute'](_0x398a47),_0x3fc05c=_0x258a80['get'](_0x4ed625),_0x514554=_0x3b4575==_0x1f789e['length']-0x1;(!_0x3d23f9&&_0x3fc05c&&(_0x3d23f9=_0x3fc05c,_0x5b87bf=_0x1f789e[_0x3b4575]),_0x3d23f9&&(!_0x3fc05c||_0x3fc05c['userId']!=_0x3d23f9['userId']))&&(_0x41ef3e(_0x3fc05c,mt(_0x5b87bf,_0x40c8f8,_0x543364),mt(_0x1f789e[_0x3b4575],_0x40c8f8,_0x543364)),_0x3d23f9=_0x3fc05c||null,_0x5b87bf=_0x3fc05c?_0x1f789e[_0x3b4575]:null),_0x3d23f9&&_0x514554&&_0x41ef3e(_0x3fc05c,mt(_0x5b87bf,_0x40c8f8,_0x543364),pt(_0x1f789e[_0x3b4575],_0x40c8f8,_0x543364));}function _0x41ef3e(_0x3d6323,_0x45e043,_0xc0df5f){const _0x55d74d=_0x3d23f9['userId'],_0x329952='revision:'+_0x531a87+':'+_0x55d74d+':'+_0x55ea84++,_0x26d9a2=_0x543364['createRange'](_0x45e043,_0xc0df5f);_0x40c8f8['markers']['set'](_0x329952,_0x26d9a2),null!==_0x55d74d&&_0x146c17['add'](_0x55d74d);}}['_getVidAttributeName'](_0x18d573){switch(_0x18d573['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x586a77,_0x527e3e){_0x586a77['baseVersion']=null;for(const _0xdeb717 in _0x586a77){const _0x419fcc=_0x586a77[_0xdeb717];if(_0x419fcc instanceof _0x4a0b9b){const _0x3f181b=_0x527e3e['get'](_0x419fcc['root']['rootName']);_0x586a77[_0xdeb717]=this['_fixPosition'](_0x419fcc,_0x3f181b);}if(_0x419fcc instanceof _0x210c0a){const _0x2faacb=_0x527e3e['get'](_0x419fcc['root']['rootName']);_0x586a77[_0xdeb717]=this['_fixRange'](_0x419fcc,_0x2faacb);}'root'===_0xdeb717&&(_0x586a77['root']=_0x527e3e['get'](_0x586a77['root']['rootName']));}}['_fixRange'](_0x4b6fde,_0x194100){return this['editor']['model']['createRange'](this['_fixPosition'](_0x4b6fde['start'],_0x194100),this['_fixPosition'](_0x4b6fde['end'],_0x194100));}['_fixPosition'](_0x111bb0,_0x477be4){return this['editor']['model']['createPositionFromPath'](_0x477be4,_0x111bb0['path'],_0x111bb0['stickiness']);}['_handleInsertOperation'](_0x31ae4c){const _0x93827f=this['_idsRoots']['get'](_0x31ae4c['position']['root']['rootName']),_0x53ccd8=this['_fixPosition'](_0x31ae4c['position'],_0x93827f),_0x30b305=null===_0x31ae4c['_authorId']?null:_0x31ae4c['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4b49a1=_0x53ccd8['parent'],_0x6197b1=this['_revisionId'],_0x50f5ea=[];for(const _0x542b3f of _0x31ae4c['nodes'])if(_0x542b3f['is']('element'))_0x50f5ea['push'](this['_makeIdsRoot'](_0x542b3f));else{for(let _0x37aa31=0x0;_0x37aa31<_0x542b3f['offsetSize'];_0x37aa31++)_0x50f5ea['push'](new _0x309f06('$text',{'vid':this['_revisionId']++}));}const _0x115593=this['_revisionId'];for(let _0x40ad0d=_0x6197b1;_0x40ad0d<_0x115593;_0x40ad0d++)this['_touched']['set'](_0x40ad0d,{'userId':_0x30b305});_0x4b49a1['_insertChild'](_0x53ccd8['offset'],_0x50f5ea);}['_handleMoveOperation'](_0x4f32df){(_0x4f32df=this['_cloneOperation'](_0x4f32df,this['_idsRoots']))['_execute']();const _0x3238ca=null===_0x4f32df['_authorId']?null:_0x4f32df['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1d0504=_0x4f32df['getMovedRangeStart'](),_0x4091f8=_0x1d0504['parent'],_0xf94806=_0x1d0504['offset'];!function _0x3d91c0(_0x1ef5ee,_0x703d03,_0x58d909,_0x5045c5){for(let _0x4098fd=_0x58d909;_0x4098fd<_0x5045c5;_0x4098fd++){const _0x5d9fe0=_0x703d03['getChild'](_0x4098fd);_0x5d9fe0['is']('element','$text')?_0x1ef5ee['set'](_0x5d9fe0['getAttribute']('vid'),{'userId':_0x3238ca}):(_0x1ef5ee['set'](_0x5d9fe0['getAttribute']('vid_start'),{'userId':_0x3238ca}),_0x3d91c0(_0x1ef5ee,_0x5d9fe0,0x0,_0x5d9fe0['childCount']),_0x1ef5ee['set'](_0x5d9fe0['getAttribute']('vid_end'),{'userId':_0x3238ca}));}}(this['_touched'],_0x4091f8,_0xf94806,_0xf94806+_0x4f32df['howMany']);}['_handleMergeOperation'](_0x15c3b1){const _0x4694cc=null===(_0x15c3b1=this['_cloneOperation'](_0x15c3b1,this['_idsRoots']))['_authorId']?null:_0x15c3b1['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x42f016=_0x15c3b1['targetPosition']['parent'],_0x57ab40=_0x15c3b1['sourcePosition']['parent'],_0x4af8a5=_0x42f016['getAttribute']('vid_end'),_0x4040c9=_0x57ab40['getAttribute']('vid_start');_0x42f016['_setAttribute']('vid_end',_0x57ab40['getAttribute']('vid_end')),_0x57ab40['_setAttribute']('vid_end',_0x4af8a5),this['_touched']['set'](_0x4040c9,{'userId':_0x4694cc}),this['_touched']['set'](_0x4af8a5,{'userId':_0x4694cc}),_0x15c3b1['_execute']();}['_handleSplitOperation'](_0x715f14){const _0x5b6485=null===(_0x715f14=this['_cloneOperation'](_0x715f14,this['_idsRoots']))['_authorId']?null:_0x715f14['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4735f6=_0x715f14['graveyardPosition'],_0xfc1b08=_0x715f14['splitPosition']['parent'];_0x715f14['_execute']();const _0x48d4ea=_0xfc1b08['getAttribute']('vid_end'),_0xaad7d7=_0x715f14['insertionPosition']['nodeAfter'];if(_0x4735f6){const _0x4f835f=_0xaad7d7['getAttribute']('vid_end'),_0x3b02b9=_0xfc1b08['getAttribute']('vid_end');_0xfc1b08['_setAttribute']('vid_end',_0x4f835f),_0xaad7d7['_setAttribute']('vid_end',_0x3b02b9),this['_touched']['set'](_0xfc1b08['getAttribute']('vid_end'),{'userId':_0x5b6485}),this['_touched']['set'](_0xaad7d7['getAttribute']('vid_start'),{'userId':_0x5b6485});}else{const _0x38123d=this['_revisionId']++,_0x34aee3=this['_revisionId']++;_0xfc1b08['_setAttribute']('vid_end',_0x38123d),_0xaad7d7['_setAttribute']('vid_start',_0x34aee3),_0xaad7d7['_setAttribute']('vid_end',_0x48d4ea),this['_touched']['set'](_0x38123d,{'userId':_0x5b6485}),this['_touched']['set'](_0x34aee3,{'userId':_0x5b6485});}}['_handleMarkerOperation'](_0x5f16b8){if(!_0x5f16b8['affectsData'])return;const _0x178506=(_0x5f16b8=this['_cloneOperation'](_0x5f16b8,this['_diffRoots']))['oldRange']?_0x5f16b8['oldRange']['root']:null,_0x570ff9=_0x5f16b8['newRange']?_0x5f16b8['newRange']['root']:null;_0x178506&&this['_markers']['delete'](_0x5f16b8['name']),_0x570ff9&&this['_markers']['set'](_0x5f16b8['name'],_0x5f16b8['newRange']['clone']());const _0x372673=null===_0x5f16b8['_authorId']?null:_0x5f16b8['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x46d39a=_0x5f16b8['name'];if(!this['_touchedMarkers']['has'](_0x46d39a))return void this['_touchedMarkers']['set'](_0x46d39a,{'range':_0x5f16b8['oldRange'],'userId':_0x372673});const _0x3d3a82=this['_touchedMarkers']['get'](_0x46d39a),_0xf7c78d=_0x3d3a82['range'],_0x476342=_0x5f16b8['newRange'];null==_0xf7c78d&&null==_0x476342||_0xf7c78d&&_0x476342&&_0xf7c78d['isEqual'](_0x476342)?this['_touchedMarkers']['delete'](_0x5f16b8['name']):_0x3d3a82['userId']=_0x372673;}['_handleRootOperation'](_0x5cc387,_0x546dd9){this['_diffRoots']['has'](_0x5cc387['rootName'])?this['_diffRoots']['get'](_0x5cc387['rootName'])['_isAttached']=_0x5cc387['isAdd']:(this['_diffRoots']['set'](_0x5cc387['rootName'],wt(_0x5cc387['rootName'],_0x5cc387['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x5cc387['rootName'],{}),_0x546dd9&&this['_idsRoots']['set'](_0x5cc387['rootName'],wt(_0x5cc387['rootName'],_0x5cc387['elementName'],!0x0)));const _0x53ca02=null===_0x5cc387['_authorId']?null:_0x5cc387['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5121e6=this['_touchedRoots']['get'](_0x5cc387['rootName']);_0x5121e6&&_0x5121e6['userId']===_0x53ca02?this['_touchedRoots']['delete'](_0x5cc387['rootName']):this['_touchedRoots']['set'](_0x5cc387['rootName'],{'userId':_0x53ca02,'isAttached':_0x5cc387['isAdd']});}['_handleRootAttributeOperation'](_0x49e87d){const _0x5586f5=this['_diffRootsAttributes']['get'](_0x49e87d['root']['rootName']);null===_0x49e87d['newValue']?delete _0x5586f5[_0x49e87d['key']]:_0x5586f5[_0x49e87d['key']]=_0x49e87d['newValue'];}}function gt(_0x1c1d21){const _0x247cdd=wt(_0x1c1d21['rootName'],_0x1c1d21['name'],_0x1c1d21['isAttached']());for(const _0x1f6054 of _0x1c1d21['getChildren']()){const _0x523ff3=_0x1f6054['_clone'](!0x0);_0x247cdd['_appendChild'](_0x523ff3);}return _0x247cdd;}function wt(_0x35614c,_0x13c132,_0x161b5e=!0x0){const _0x3be486=new _0x3bb092();return _0x3be486['rootName']=_0x35614c,_0x3be486['name']=_0x13c132,_0x3be486['_isAttached']=_0x161b5e,_0x3be486['isAttached']=()=>_0x3be486['_isAttached'],_0x3be486;}function mt(_0x4d335b,_0x41f8f6,_0x17e647){const _0x183e85='elementEnd'==_0x4d335b['type']?_0x17e647['createPositionAt'](_0x4d335b['item'],'end'):_0x17e647['createPositionBefore'](_0x4d335b['item']);return _0x17e647['createPositionFromPath'](_0x41f8f6,_0x183e85['path'],_0x183e85['stickiness']);}function pt(_0x562255,_0x500af3,_0x12592c){const _0x1546f5='elementStart'==_0x562255['type']?_0x12592c['createPositionAt'](_0x562255['item'],0x0):_0x12592c['createPositionAfter'](_0x562255['item']);return _0x12592c['createPositionFromPath'](_0x500af3,_0x1546f5['path'],_0x1546f5['stickiness']);}class RevisionHistorySaveRevisionFormView extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x2bd5ec(_0x7802f2){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x1050d2,_0x5808a6){super(_0x1050d2),this['focusTracker']=new _0x5a526e(),this['keystrokes']=new _0x261833(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x5808a6),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'](),_0x269f50({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0xa109b8=_0x53292c=>_0x53292c['stopPropagation']();this['keystrokes']['set']('arrowright',_0xa109b8),this['keystrokes']['set']('arrowleft',_0xa109b8),this['keystrokes']['set']('arrowup',_0xa109b8),this['keystrokes']['set']('arrowdown',_0xa109b8);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x209a7e){this['revisionNameInputView']['fieldView']['element']['value']=_0x209a7e['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x3f7511){const _0x280095=new _0x195b0e(this['locale'],_0x5e9819),_0x20ad91=_0x280095['fieldView'];_0x20ad91['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x29e3f0=ft(this['locale'],'Name\x20of\x20the\x20revision');return!_0x3f7511&&(_0x29e3f0+='\x20('+ft(this['locale'],'optional')+')'),(_0x280095['label']=_0x29e3f0,_0x20ad91['on']('input',()=>{this['revisionNameInputValue']=_0x20ad91['element']['value']['trim']();}),_0x280095);}}class RevisionHistoryUI extends _0x1098b4{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionTracker];}['_saveRevisionFormView'];['init'](){const _0x2dd6d9=this['editor'],_0xf87725=_0x2dd6d9['plugins']['get']('RevisionTracker');_0x2dd6d9['ui']['componentFactory']['add']('revisionHistory',_0x2ec283=>{const _0x21b923=_0x4cec8d(_0x2ec283),_0x9475d5=_0x21b923['panelView']['children'],_0x28c4c0=new _0x24cde3(_0x2ec283),_0x5ef2df=new _0x3918bd(_0x2ec283),_0x5bcf74=this['_createSaveRevisionButton'](_0x506250),_0x17e443=new _0x3918bd(_0x2ec283),_0xf3de3d=this['_createOpenRevisionButton'](_0x506250);return _0x21b923['bind']('isEnabled')['to'](_0xf87725,'isReady',_0xf87725,'isEnabled',_0x2dd6d9,'isReadOnly',(_0x5ec112,_0x24dd47,_0x5a8b12)=>_0x5ec112&&_0x24dd47&&!_0x5a8b12),_0x21b923['buttonView']['set']({'icon':_0xd37549,'label':ft(_0x2ec283,'Revision\x20history'),'tooltip':!0x0}),_0x5bcf74['set']({'withText':!0x0,'role':'menuitem'}),_0xf3de3d['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0xf3de3d,'execute',()=>{_0x21b923['isOpen']=!0x1,_0x2dd6d9['editing']['view']['focus']();},{'priority':'low'}),_0x5ef2df['children']['add'](_0x5bcf74),_0x17e443['children']['add'](_0xf3de3d),_0x28c4c0['role']='menu',_0x28c4c0['items']['addMany']([_0x5ef2df,_0x17e443]),_0x9475d5['add'](_0x28c4c0),_0x21b923;}),_0x2dd6d9['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x5d98e1=this['editor'],_0x4c3e46=_0x5d98e1['locale'],_0x27b841=_0x5d98e1['plugins']['get']('RevisionTracker'),_0x276544=new _0x12988c(_0x4c3e46),_0x21f7c4=new _0x5c5220(_0x4c3e46);_0x276544['bind']('isEnabled')['to'](_0x27b841,'isReady',_0x27b841,'isEnabled',_0x5d98e1,'isReadOnly',(_0x52a226,_0x2a954f,_0x100a95)=>_0x52a226&&_0x2a954f&&!_0x100a95),_0x276544['buttonView']['set']({'icon':_0xd37549,'label':ft(_0x4c3e46,'Revision\x20history')});const _0x21f709=new tt(_0x4c3e46,_0x276544),_0x3239c0=this['_createSaveRevisionButton'](it);_0x3239c0['delegate']('execute')['to'](_0x276544),_0x21f709['children']['add'](_0x3239c0),_0x21f7c4['items']['add'](_0x21f709);const _0x515a0e=new tt(_0x4c3e46,_0x276544),_0x2f072b=this['_createOpenRevisionButton'](it);return _0x2f072b['delegate']('execute')['to'](_0x276544),_0x515a0e['children']['add'](_0x2f072b),_0x21f7c4['items']['add'](_0x515a0e),_0x276544['panelView']['children']['add'](_0x21f7c4),_0x276544;}['_createSaveRevisionButton'](_0x2dc0bb){const _0x47d396=this['editor'],_0x125af8=_0x47d396['plugins']['get']('RevisionTracker'),_0x3797a2=new _0x2dc0bb(_0x47d396['locale']);return _0x3797a2['set']({'label':ft(_0x47d396['locale'],'Save\x20current\x20revision')}),_0x3797a2['bind']('isEnabled')['to'](_0x125af8,'isReady',_0x125af8,'isEnabled',_0x47d396,'isReadOnly',(_0x5ee834,_0xe07d5a,_0x15971f)=>_0x5ee834&&_0xe07d5a&&!_0x15971f),this['listenTo'](_0x3797a2,'execute',()=>{this['_showDialog']();}),_0x3797a2;}['_createOpenRevisionButton'](_0x5b8047){const _0x5b9536=this['editor'],_0x3b7cc7=_0x5b9536['plugins']['get']('RevisionTracker'),_0x504240=new _0x5b8047(_0x5b9536['locale']);return _0x504240['set']({'label':ft(_0x5b9536['locale'],'Open\x20revision\x20history')}),_0x504240['bind']('isEnabled')['to'](_0x3b7cc7,'isReady',_0x5b9536,'isReadOnly',(_0x467baf,_0x3d39fd)=>_0x467baf&&!_0x3d39fd),this['listenTo'](_0x504240,'execute',()=>{_0x5b9536['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x504240;}['_showDialog'](){const _0x24aafb=this['editor'],_0x8557ef=_0x24aafb['locale'],_0x44048c=_0x24aafb['plugins']['get']('Dialog'),_0xcc277e=_0x24aafb['plugins']['get']('RevisionTracker');function _0xba0f14(_0x387433){_0x24aafb['config']['get']('revisionHistory.requireRevisionName')&&''===_0x387433['revisionName']?_0x387433['revisionNameInputView']['errorText']=ft(_0x8557ef,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x24aafb['plugins']['get'](RevisionTracker)['saveRevision']({'name':_0x387433['revisionName']}),_0x44048c['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0xba0f14(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x44048c['show']({'id':'revisionSave','title':ft(_0x8557ef,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':ft(_0x24aafb['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x44048c['hide']()},{'label':ft(_0x24aafb['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0xc0f95f){_0xc0f95f['bind']('isEnabled')['to'](_0xcc277e,'isReady',_0xcc277e,'isEnabled',_0x24aafb,'isReadOnly',(_0x5b295c,_0x31249d,_0x4a76ab)=>_0x5b295c&&_0x31249d&&!_0x4a76ab);},'onExecute':()=>_0xba0f14(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x151586=this['editor'],_0x518d3=_0x151586['locale'];this['_saveRevisionFormView']=new RevisionHistorySaveRevisionFormView(_0x518d3,_0x151586['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class ChangeDetailsView extends _0x7802f2{['changeId'];['_model'];constructor(_0x2e676a,_0x2017b8){super(_0x2e676a),this['_model']=_0x2017b8,this['changeId']=_0x2017b8['id'];const _0x29bd06=this['bindTemplate'],_0x343397=ft(_0x2e676a,_0x2017b8['data']['isSuggestion']?'Suggested\x20by':'add'==_0x2017b8['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x2017b8['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x29bd06['to']('type',_0x955705=>'ck-revision-change__'+_0x955705)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x343397}]},{'text':'\x20'+_0x2017b8['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class ChangeItem extends/* #__PURE__ -- @preserve */
|
|
26
|
+
_0x29a21b(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x2867c5){super(),this['id']=_0x2867c5['id']||_0x13fdf1(),this['author']=_0x2867c5['author'],this['type']=_0x2867c5['type'],this['data']=_0x2867c5['data']||{},this['rootName']=_0x2867c5['rootName'],this['set']('createdAt',_0x2867c5['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class RevisionDiff{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x53a5a2,_0x20f4b4){this['newRevisionId']=_0x53a5a2,this['oldRevisionId']=_0x20f4b4,this['changes']=new _0x166815();}['_setChanges'](_0x490075){for(const _0x5b0320 of _0x490075)this['changes']['add'](_0x5b0320);}}class RevisionViewer extends _0x1098b4{['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[_0x1b1234,et,RevisionsRepository,RevisionHistoryUtils];}constructor(_0x51032e){super(_0x51032e),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',(_0x594099,_0x57ec3c,_0x269b15)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x2a81f1=>{for(const _0x5b49f5 of this['editor']['editing']['view']['document']['roots'])_0x269b15?_0x2a81f1['removeClass']('ck-editor__editable__overlay',_0x5b49f5):_0x2a81f1['addClass']('ck-editor__editable__overlay',_0x5b49f5);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0xd7ec3e=>null!==_0xd7ec3e),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x503dd7,_0x338c8f,_0xb6868b)=>_0x503dd7&&_0xb6868b?_0x338c8f['changes']['getIndex'](_0xb6868b):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x1a4c40,_0xa89f59)=>_0x1a4c40?_0xa89f59['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](et);}['init'](){const _0x5031b7=this['editor'],_0x410906=new ShowChangeCommand(_0x5031b7,{'direction':'backward'}),_0x4946d7=new ShowChangeCommand(_0x5031b7,{'direction':'forward'});(_0x5031b7['commands']['add']('showPreviousChange',_0x410906),_0x5031b7['commands']['add']('showNextChange',_0x4946d7),_0x5031b7['commands']['add']('restoreRevision',new RestoreRevisionCommand(_0x5031b7)),this['on']('change:numberOfChanges',()=>{_0x410906['refresh'](),_0x4946d7['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x5031b7['enableReadOnlyMode']('revision-viewer'),_0x5031b7['plugins']['has']('WidgetToolbarRepository'))&&_0x5031b7['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x2f6b8e){return await this['_utils']['loadRevisionData'](_0x2f6b8e,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x2f6b8e);}async['getRevisionRootsAttributes'](_0x3fbb86){return await this['_utils']['loadRevisionData'](_0x3fbb86,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x3fbb86);}async['compare'](_0x39fcfc,_0x102bf3,_0x56d957=!0x1){if(!this['isEnabled'])return;const _0x38a1d4=this['diff'],_0x317a59=this['repository'],_0x2f72f6='string'==typeof _0x39fcfc?_0x317a59['getRevision'](_0x39fcfc):_0x39fcfc,_0x161cf3='string'==typeof _0x102bf3?_0x317a59['getRevision'](_0x102bf3):_0x102bf3,_0x47653e=_0x2f72f6['id'],_0x14ff27=_0x161cf3?_0x161cf3['id']:null;if(!_0x56d957&&this['diff']&&this['diff']['newRevisionId']===_0x47653e&&this['diff']['oldRevisionId']===_0x14ff27)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new RevisionDiff(_0x47653e,_0x14ff27);const _0x33e19f=this['_getRevisionsRange'](_0x2f72f6,_0x161cf3,!0x0)['map'](_0x3f8356=>this['_utils']['loadRevisionData'](_0x3f8356,this['adapter']));return _0x33e19f['push'](new Promise(_0x290dee=>{setTimeout(_0x290dee,0x14);})),Promise['all'](_0x33e19f)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x24aba8=this['_getDiff'](_0x47653e,_0x14ff27);for(const _0x369ca4 of _0x24aba8['changes'])this['_changeIdToChange']['set'](_0x369ca4['id'],_0x369ca4);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x247d80=>{for(const _0x475557 of this['editor']['model']['document']['getRootNames']())_0x247d80['detachRoot'](_0x475557);for(const _0x56d1e8 of Object['keys'](_0x24aba8['model'])){const _0x59a057=_0x24aba8['model'][_0x56d1e8]['name'],_0x26f36d=_0x247d80['addRoot'](_0x56d1e8,_0x59a057);for(const _0x158414 of Object['keys'](_0x24aba8['attributes'][_0x56d1e8]))_0x247d80['setAttribute'](_0x158414,_0x24aba8['attributes'][_0x56d1e8][_0x158414],_0x26f36d);_0x247d80['insert'](_0x24aba8['model'][_0x56d1e8],_0x26f36d,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x24aba8['changes'])),this['isReady']=!0x0;})['catch'](_0x5dac7a=>{console['error'](_0x5dac7a),this['_cleanUp'](),_0x38a1d4&&(this['diff']=_0x38a1d4),this['isReady']=!0x0;});}['addRevisionData'](_0x5b8d8c,_0x9fda26){const _0x2a4a25=this['repository']['createRevision'](_0x5b8d8c);return _0x2a4a25['on']('_update',(_0x1377bf,_0x41704e,_0x34bd1b)=>_0x9fda26(_0x41704e,_0x34bd1b,_0x2a4a25)),this['repository']['addRevision'](_0x2a4a25),_0x2a4a25;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x1f546b=>{for(const _0xfbd0c5 of this['editor']['model']['document']['getRootNames']())_0x1f546b['detachRoot'](_0xfbd0c5);});}['_sortAndFilterDiffChanges'](_0x343d38){const _0x167002=[],_0x57c658=new Map();for(const _0x21fa5e of this['editor']['model']['document']['getRootNames']()){const _0x11038c=this['editor']['editing']['view']['getDomRoot'](_0x21fa5e);if(!_0x11038c)continue;const _0x49650d=_0x11038c['getClientRects']()['item'](0x0);_0x49650d&&(_0x167002['push'](_0x21fa5e),_0x57c658['set'](_0x21fa5e,_0x49650d));}return _0x167002['sort']((_0x4cb7a2,_0x4acdcc)=>{const _0x317f3a=_0x57c658['get'](_0x4cb7a2),_0x4b47af=_0x57c658['get'](_0x4acdcc);return _0x317f3a['y']-_0x4b47af['y']||_0x317f3a['x']-_0x4b47af['x'];}),(_0x343d38=_0x343d38['filter'](_0x28fb5d=>_0x167002['includes'](_0x28fb5d['rootName'])))['sort']((_0x5bde8d,_0x98a503)=>_0x167002['indexOf'](_0x5bde8d['rootName'])-_0x167002['indexOf'](_0x98a503['rootName'])),_0x343d38;}['_makeTape'](_0x90c52c){const _0x108455=Array['from'](_0x90c52c['markers'])['filter'](([_0x3e861d,_0x4a1107])=>_0x3e861d['startsWith']('revision:')&&!_0x4a1107['isCollapsed']),_0x36e1d7=Array['from'](this['editor']['model']['createRangeIn'](_0x90c52c)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x108455['length'])for(const _0x57d5e0 of _0x36e1d7){const [_0x27546b,_0x5e1357]=_0x108455[0x0],[,_0x3c5ab8,_0x15e99a]=_0x27546b['split'](':');if(_0x5e1357['end']['isEqual'](_0x57d5e0['nextPosition'])&&_0x108455['shift'](),(_0x57d5e0['previousPosition']['isEqual'](_0x5e1357['start'])||_0x57d5e0['previousPosition']['isAfter'](_0x5e1357['start']))&&('insertion'==_0x3c5ab8?_0x57d5e0['isAdded']={'userId':_0x15e99a}:'deletion'==_0x3c5ab8&&(_0x57d5e0['isRemoved']={'userId':_0x15e99a})),0x0==_0x108455['length'])break;}return _0x36e1d7;}['_refreshStartEndIndex'](_0x432ab9){const _0x599479=new Map();for(let _0x3dd428=0x0;_0x3dd428<_0x432ab9['length'];_0x3dd428++)'text'===_0x432ab9[_0x3dd428]['type']?(_0x432ab9[_0x3dd428]['item']['startIndex']=_0x3dd428,_0x432ab9[_0x3dd428]['item']['endIndex']=_0x3dd428):('elementStart'===_0x432ab9[_0x3dd428]['type']?_0x432ab9[_0x3dd428]['item']['startIndex']=_0x3dd428:'elementEnd'===_0x432ab9[_0x3dd428]['type']&&(_0x432ab9[_0x3dd428]['item']['endIndex']=_0x3dd428),_0x599479['set'](_0x432ab9[_0x3dd428]['id'],_0x3dd428));for(const _0x55f800 of _0x599479['values']())'elementStart'===_0x432ab9[_0x55f800]['type']?_0x432ab9[_0x55f800]['item']['endIndex']=_0x599479['get'](_0x432ab9[_0x55f800]['pairId']):'elementEnd'===_0x432ab9[_0x55f800]['type']&&(_0x432ab9[_0x55f800]['item']['startIndex']=_0x599479['get'](_0x432ab9[_0x55f800]['pairId']));}['_processTape'](_0x1ca959){for(let _0x1f8484=0x0;_0x1f8484<_0x1ca959['length'];_0x1f8484++){if('elementStart'===_0x1ca959[_0x1f8484]['type'])_0x1ca959[_0x1f8484]['item']['startIndex']=_0x1f8484;else{if('elementEnd'===_0x1ca959[_0x1f8484]['type']){_0x1ca959[_0x1f8484]['item']['endIndex']=_0x1f8484;const _0x280bb4=_0x1ca959[_0x1f8484]['item']['startIndex'];_0x1ca959[_0x280bb4]['pairId']=_0x1ca959[_0x1f8484]['id'],_0x1ca959[_0x1f8484]['pairId']=_0x1ca959[_0x280bb4]['id'];}else _0x1ca959[_0x1f8484]['item']['startIndex']=_0x1f8484,_0x1ca959[_0x1f8484]['item']['endIndex']=_0x1f8484,_0x1ca959[_0x1f8484]['pairId']=null;}_0x1ca959[_0x1f8484]['markersStart']||(_0x1ca959[_0x1f8484]['markersStart']=[],_0x1ca959[_0x1f8484]['markersEnd']=[]);}}['_markInsertions'](_0x546bdf,_0x22e14c){const _0x414360=_0x546bdf['filter'](_0x5b0030=>!_0x5b0030['isAdded']);for(let _0x46a4b5=0x0;_0x46a4b5<_0x22e14c['length'];_0x46a4b5++)_0x22e14c[_0x46a4b5]['isAdded']&&(_0x414360[_0x46a4b5]['isAdded']=_0x22e14c[_0x46a4b5]['isAdded']);}['_getDiff'](_0x3e1fe6,_0x4e49c5=null){const _0x252737=this['repository']['getRevision'](_0x3e1fe6),_0x482e2b=_0x4e49c5?this['repository']['getRevision'](_0x4e49c5):null,_0x83b8f8=this['_getRevisionsRange'](_0x252737,_0x482e2b),_0x1a8473=_0x83b8f8[_0x83b8f8['length']-0x1],_0x304ea5=new Map(),_0x3010c8={'model':{},'attributes':{},'changes':[]},_0x20a496=new Set(),_0x5becfc=new Map();for(let _0x9a315a=_0x83b8f8['length']-0x1;_0x9a315a>=0x0;_0x9a315a--){const _0x4fab7f=_0x83b8f8[_0x9a315a];for(const _0x50c567 of Object['keys'](_0x4fab7f['diffData']))if(_0x4fab7f['diffData'][_0x50c567]['attachChange']){const _0x5b3251=_0x4fab7f['diffData'][_0x50c567]['attachChange'];_0x5b3251['isAttached']?(_0x20a496['add'](_0x50c567),_0x5becfc['has'](_0x50c567)&&_0x5becfc['get'](_0x50c567)['userId']==_0x5b3251['userId']?_0x5becfc['delete'](_0x50c567):_0x5becfc['set'](_0x50c567,_0x5b3251)):_0x5becfc['has'](_0x50c567)?(_0x20a496['delete'](_0x50c567),_0x5becfc['delete'](_0x50c567)):(_0x20a496['add'](_0x50c567),_0x5becfc['set'](_0x50c567,_0x5b3251));}else _0x20a496['add'](_0x50c567);}for(const _0xee8b4e of _0x20a496){const _0x4f2c91=_0x5becfc['has'](_0xee8b4e)&&!_0x5becfc['get'](_0xee8b4e)['isAttached'];let _0x2d0746=_0x4f2c91?_0x83b8f8['length']-0x1:0x0;const _0x1f18ca=_0x4f2c91?-0x1:0x1;for(;_0x83b8f8[_0x2d0746];){const _0x222fcf=_0x83b8f8[_0x2d0746];if(_0x222fcf['diffData'][_0xee8b4e]){const _0x37f34e=_0x4f2c91?_0x222fcf['diffData'][_0xee8b4e]['attributesBefore']:_0x222fcf['diffData'][_0xee8b4e]['attributesAfter'];_0x3010c8['attributes'][_0xee8b4e]=_0x37f34e?_0x5ba81d(_0x37f34e):{};break;}_0x2d0746+=_0x1f18ca;}}for(const _0x143a22 of _0x83b8f8){_0x143a22['model']={};for(const _0x3d8c60 of _0x143a22['authors'])_0x304ea5['set'](_0x3d8c60['id'],_0x3d8c60);for(const _0x24b43d of _0x20a496){const _0x58df85=_0x143a22['diffData'][_0x24b43d]?_0x143a22['diffData'][_0x24b43d]['insertions']:'[]',_0x25fa45=_0x143a22['diffData'][_0x24b43d]?_0x143a22['diffData'][_0x24b43d]['deletions']:'[]',_0x6df5e=_0x143a22['diffData'][_0x24b43d]?.['rootElementName']||'$root';_0x143a22['model'][_0x24b43d]={'insertions':this['_utils']['_makeModelFromViewString'](_0x58df85,_0x6df5e),'deletions':this['_utils']['_makeModelFromViewString'](_0x25fa45,_0x6df5e)};}}for(const _0x2b8671 of _0x20a496){let _0x3d53ca=null,_0x1edb9f=0x0;const _0x500c77=_0x83b8f8['map'](_0x5d14db=>_0x5d14db['diffData'][_0x2b8671]?.['rootElementName'])['find'](_0x3e5fcc=>void 0x0!==_0x3e5fcc)||'$root',_0x30a08e=new Map(Array['from'](_0x252737['model'][_0x2b8671]['insertions']['markers'])['filter'](([_0x13509b])=>!_0x13509b['startsWith']('revision:')));let _0xadd70a=0x0;for(const _0x436e3e of _0x83b8f8){const _0x2f6078=this['_makeTape'](_0x436e3e['model'][_0x2b8671]['insertions']);_0x436e3e==_0x252737?(_0x3d53ca=_0x2f6078,_0x1edb9f=_0x3d53ca['length'],_0x3d53ca['forEach'](_0x1bfd30=>{_0x1bfd30['id']=_0xadd70a++;}),this['_processTape'](_0x3d53ca)):this['_markInsertions'](_0x3d53ca,_0x2f6078);const _0x427e28=_0x3d53ca['filter'](_0x14fb1a=>!_0x14fb1a['isAdded'])['map'](_0x3727ec=>_0x3727ec['id']);let _0x266784=0x0;const _0x5ba1de=this['_makeTape'](_0x436e3e['model'][_0x2b8671]['deletions']);_0x5ba1de['forEach'](_0x359259=>{_0x359259['isRemoved']?_0x359259['id']=_0x1edb9f++:_0x359259['id']=_0x427e28[_0x266784++];}),this['_processTape'](_0x5ba1de),this['_setDistance'](_0x3d53ca,'isAdded'),this['_setDistance'](_0x5ba1de,'isRemoved'),_0x436e3e==_0x252737&&this['_markMarkers'](_0x3d53ca,_0x30a08e),_0x3d53ca=this['_joinTapes'](_0x3d53ca,_0x5ba1de),this['_refreshStartEndIndex'](_0x3d53ca),this['_setDistance'](_0x3d53ca,'isRemoved');}_0x3d53ca=_0x3d53ca['filter'](_0x1178c9=>!(_0x1178c9['isAdded']&&_0x1178c9['isRemoved']));const _0x4d44da=new Map(_0x1a8473['model'][_0x2b8671]['deletions']['markers']),_0x4e0da5=new Set(_0x30a08e['keys']());for(const _0x17e6a9 of _0x4d44da['keys']())_0x4e0da5['delete'](_0x17e6a9);this['_markSuggestions'](_0x3d53ca,_0x4e0da5),this['_fixObsoleteTags'](_0x3d53ca),_0x3d53ca=this['_removeMissingPairs'](_0x3d53ca),_0x3d53ca=this['_markMismatchedRemovedTags'](_0x3d53ca),_0x3d53ca=this['_removeUnsupportedChanges'](_0x3d53ca);const {root:_0x53ec09,changes:_0x29f079}=this['_makeModelFromTape'](_0x3d53ca,_0x304ea5,_0x2b8671,_0x500c77);_0x3010c8['model'][_0x2b8671]=_0x53ec09;const _0xe970d8=_0x5becfc['get'](_0x2b8671);if(_0xe970d8){const _0x35345b=_0x304ea5['get'](_0xe970d8['userId']),_0x565db7=new ChangeItem({'author':_0x35345b,'type':_0xe970d8['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x2b8671});_0x29f079['unshift'](_0x565db7),_0x3010c8['attributes'][_0x2b8671]['revisionHistoryAttachChange']=_0x565db7['id'];}_0x3010c8['changes']=_0x3010c8['changes']['concat'](_0x29f079);}return _0x3010c8;}['_markMarkers'](_0x3bff83,_0x4212da){for(let _0xf108a8=0x0;_0xf108a8<_0x3bff83['length'];_0xf108a8++)for(const [_0x681a38,_0x5ee218]of _0x4212da)!_0x5ee218['isCollapsed']&&_0x5ee218['start']['isEqual'](_0x3bff83[_0xf108a8]['previousPosition'])&&_0x3bff83[_0xf108a8]['markersStart']['push'](_0x681a38),_0x5ee218['end']['isEqual'](_0x3bff83[_0xf108a8]['nextPosition'])&&_0x3bff83[_0xf108a8]['markersEnd']['push'](_0x681a38);}['_joinTapes'](_0x4227cc,_0x498b37){let _0x1ac3c9=[],_0x32855e=0x0,_0x40fa88=0x0;for(;_0x32855e<_0x4227cc['length']||_0x40fa88<_0x498b37['length'];){const _0x3b5a3a=_0x4227cc[_0x32855e]||{},_0x113b41=_0x498b37[_0x40fa88]||{};if(_0x3b5a3a['id']==_0x113b41['id'])_0x32855e++,_0x40fa88++,_0x1ac3c9['push'](_0x3b5a3a);else{if(_0x113b41['isRemoved']&&_0x3b5a3a['isAdded']){const {commonTape:_0x18bc6c,iEnd:_0x1e24a4,jEnd:_0x4fc38c}=this['_threeWayMerge'](_0x4227cc,_0x32855e,_0x498b37,_0x40fa88);_0x1ac3c9=_0x1ac3c9['concat'](_0x18bc6c),_0x32855e=_0x1e24a4,_0x40fa88=_0x4fc38c;}else _0x113b41['isRemoved']?(_0x40fa88++,_0x1ac3c9['push'](_0x113b41)):(_0x32855e++,_0x1ac3c9['push'](_0x3b5a3a));}}return _0x1ac3c9;}['_markSuggestions'](_0x5068fa,_0x820ade){const _0x5adbeb=[];for(let _0xb7f89e=0x0;_0xb7f89e<_0x5068fa['length'];_0xb7f89e++){for(let _0x23e710=0x0;_0x23e710<_0x5068fa[_0xb7f89e]['markersStart']['length'];_0x23e710++){const _0x3af712=_0x5068fa[_0xb7f89e]['markersStart'][_0x23e710];if(!_0x820ade['has'](_0x3af712))continue;const {group:_0x39f530,type:_0x3d0f90,authorId:_0x235646}=_0xd219a3(_0x3af712);'revision-suggestion'!=_0x39f530||'insertion'!=_0x3d0f90&&'deletion'!=_0x3d0f90||(_0x5adbeb['unshift']({'type':_0x3d0f90,'name':_0x3af712,'userId':_0x235646}),_0x5068fa[_0xb7f89e]['markersStart']['splice'](_0x23e710,0x1),_0x23e710--);}_0x56dcbe(_0x5068fa[_0xb7f89e]);for(let _0x1b7e60=0x0;_0x1b7e60<_0x5068fa[_0xb7f89e]['markersEnd']['length'];_0x1b7e60++){const _0x22eb45=_0x5068fa[_0xb7f89e]['markersEnd'][_0x1b7e60];if(!_0x820ade['has'](_0x22eb45))continue;const {group:_0x2b7ebc,type:_0x1ac984}=_0xd219a3(_0x22eb45);if('revision-suggestion'!=_0x2b7ebc||'insertion'!=_0x1ac984&&'deletion'!=_0x1ac984)continue;_0x5068fa[_0xb7f89e]['markersEnd']['splice'](_0x1b7e60,0x1),_0x1b7e60--;const _0xd7bd2a=_0x5adbeb['findIndex'](_0x200ab7=>_0x200ab7['name']==_0x22eb45);_0xd7bd2a>-0x1&&_0x5adbeb['splice'](_0xd7bd2a,0x1);}}function _0xd219a3(_0x1628bb){const _0x118a0e=_0x1628bb['split'](':');return{'group':_0x118a0e[0x0],'type':_0x118a0e[0x1],'subType':_0x118a0e['length']>=0x5?_0x118a0e[0x2]:null,'id':_0x118a0e['length']<0x5?_0x118a0e[0x2]:_0x118a0e[0x3],'authorId':_0x118a0e['length']<0x5?_0x118a0e[0x3]:_0x118a0e[0x4],'markerCount':0x6==_0x118a0e['length']?_0x118a0e[0x5]:null};}function _0x56dcbe(_0x315e8a){for(let _0x14a691=0x0;_0x14a691<_0x5adbeb['length'];_0x14a691++){if(_0x315e8a['isAdded']&&'insertion'==_0x5adbeb[_0x14a691]['type']&&_0x315e8a['isAdded']['userId']==_0x5adbeb[_0x14a691]['userId'])return _0x315e8a['isAddSuggestion']=_0x5adbeb[_0x14a691],void delete _0x315e8a['isAdded'];if(!_0x315e8a['isAdded']&&!_0x315e8a['isRemoved']&&'deletion'==_0x5adbeb[_0x14a691]['type'])return void(_0x315e8a['isRemoveSuggestion']=_0x5adbeb[_0x14a691]);}}}['_setDistance'](_0x418aed,_0x31e44d){let _0x53bbb6=0x0,_0x56fdc1=!0x1;const _0x3cbfb1=new Map();for(const _0x37eb1c of _0x418aed)_0x37eb1c[_0x31e44d]?_0x56fdc1&&(_0x53bbb6++,_0x56fdc1=!0x1):(_0x53bbb6++,_0x56fdc1=!0x0),_0x3cbfb1['set'](_0x37eb1c['id'],_0x53bbb6);for(let _0x35222e=0x0;_0x35222e<_0x418aed['length'];_0x35222e++){if('isRemoved'==_0x31e44d&&_0x418aed[_0x35222e]['isAdded']||'isAdded'==_0x31e44d&&_0x418aed[_0x35222e]['isRemoved'])continue;if('text'==_0x418aed[_0x35222e]['type']){_0x418aed[_0x35222e]['distance']=0x0;continue;}const _0x173c50=_0x3cbfb1['get'](_0x418aed[_0x35222e]['pairId']),_0xff9a0b=_0x3cbfb1['get'](_0x418aed[_0x35222e]['id']);_0x418aed[_0x35222e]['distance']=_0x173c50-_0xff9a0b;}}['_getRevisionsRange'](_0x56b09a,_0x40f728,_0x4f8949=!0x1){const _0x164d9c=[];let _0x115180=this['repository']['getIndex'](_0x56b09a),_0x5cdd3c=this['repository']['getIndex'](_0x40f728);for(-0x1==_0x5cdd3c&&(_0x5cdd3c=this['repository']['_revisions']['length'],_0x4f8949=!0x1);_0x115180<_0x5cdd3c;)_0x164d9c['push'](this['repository']['getRevision'](_0x115180)),_0x115180++;return _0x4f8949&&_0x164d9c['push'](this['repository']['getRevision'](_0x115180)),_0x164d9c;}['_threeWayMerge'](_0x4549c1,_0x5d9c3d,_0x9fb421,_0x3fade5){const _0xb0fbf5=this['editor']['model']['schema'];let _0x3b31ee=_0x5d9c3d;for(;_0x4549c1[_0x3b31ee]&&_0x4549c1[_0x3b31ee]['isAdded'];)_0x3b31ee++;let _0x196c9b=_0x3fade5;for(;_0x9fb421[_0x196c9b]&&_0x9fb421[_0x196c9b]['isRemoved'];)_0x196c9b++;_0x262b9c(_0x4549c1,_0x5d9c3d,_0x3b31ee),_0x262b9c(_0x9fb421,_0x3fade5,_0x196c9b);const _0x331918=_0x9fb421['slice'](_0x3fade5,_0x196c9b)['concat'](_0x4549c1['slice'](_0x5d9c3d,_0x3b31ee));return _0x331918['sort']((_0x13e722,_0x1785b4)=>_0x13e722['side']!=_0x1785b4['side']?_0x13e722['side']-_0x1785b4['side']:_0x13e722['level']!=_0x1785b4['level']?_0x13e722['level']-_0x1785b4['level']:_0x13e722['distance']!=_0x1785b4['distance']?_0x1785b4['distance']-_0x13e722['distance']:!!_0x13e722['isAdded']!=!!_0x1785b4['isAdded']?-0x1==_0x13e722['side']||0x0==_0x13e722['side']?_0x13e722['isAdded']?-0x1:0x1:_0x13e722['isAdded']?0x1:-0x1:_0x13e722['index']-_0x1785b4['index']),{'commonTape':_0x331918,'iEnd':_0x3b31ee,'jEnd':_0x196c9b};function _0x262b9c(_0x4190e4,_0x39da8b,_0x2c5a70){let _0x59c43b=-0x1,_0xf1b5d4=Number['POSITIVE_INFINITY'],_0x15e05b=!0x0;for(let _0xe9e3e3=_0x39da8b;_0xe9e3e3<_0x2c5a70;_0xe9e3e3++)if(_0xb0fbf5['isInline'](_0x4190e4[_0xe9e3e3]['item'])||(_0x15e05b=!0x1),_0x4190e4[_0xe9e3e3]['item']['startIndex']<_0x39da8b&&(_0x59c43b=_0xe9e3e3),_0x4190e4[_0xe9e3e3]['item']['endIndex']>=_0x2c5a70){_0xf1b5d4=_0xe9e3e3;break;}_0x15e05b&&(_0x59c43b=_0x2c5a70-0x1);for(let _0x382a69=_0x39da8b;_0x382a69<_0x2c5a70;_0x382a69++)_0x4190e4[_0x382a69]['side']=_0x382a69<=_0x59c43b?-0x1:_0x382a69<_0xf1b5d4?0x0:0x1,_0x4190e4[_0x382a69]['index']=_0x382a69;let _0x2b9895=0x0;for(let _0x3595a0=_0x39da8b;_0x3595a0<=_0x59c43b;_0x3595a0++)0x0==_0x4190e4[_0x3595a0]['distance']?_0x4190e4[_0x3595a0]['level']=_0x2b9895:(_0x2b9895++,_0x4190e4[_0x3595a0]['level']=_0x2b9895,_0x2b9895++);for(let _0x5a4fb7=_0x39da8b;_0x5a4fb7<_0x2c5a70;_0x5a4fb7++)0x0==_0x4190e4[_0x5a4fb7]['side']&&(_0x4190e4[_0x5a4fb7]['level']=_0x2b9895);_0x2b9895=0x0;for(let _0x436c3c=_0x2c5a70-0x1;_0x436c3c>=_0xf1b5d4;_0x436c3c--)0x0==_0x4190e4[_0x436c3c]['distance']?_0x4190e4[_0x436c3c]['level']=_0x2b9895:(_0x2b9895--,_0x4190e4[_0x436c3c]['level']=_0x2b9895,_0x2b9895--);}}['_fixObsoleteTags'](_0x2bfeca){const _0x169bd0=new Map(),_0x3f9598=this['editor']['model']['schema'];for(let _0x24072c=0x1;_0x24072c<_0x2bfeca['length'];_0x24072c++){let _0x5d89c4,_0x2b00dd,_0x3a85e7;const _0x312d3d=_0x2bfeca[_0x24072c],_0x53d03d=_0x2bfeca[_0x24072c-0x1];if('text'==_0x312d3d['type'])continue;if(_0x312d3d['type']!=_0x53d03d['type'])continue;if(!_0x3f9598['isBlock'](_0x53d03d['item'])||_0x3f9598['isLimit'](_0x53d03d['item']))continue;if(!_0x3f9598['isBlock'](_0x312d3d['item'])||_0x3f9598['isLimit'](_0x312d3d['item']))continue;if((_0x2bfeca[_0x24072c]['isAdded']||_0x2bfeca[_0x24072c]['isAddSuggestion'])&&_0x2bfeca[_0x24072c-0x1]['isRemoved'])_0x5d89c4=_0x2bfeca[_0x24072c],_0x2b00dd=_0x2bfeca[_0x24072c-0x1],_0x3a85e7=_0x24072c-0x1;else{if(!_0x2bfeca[_0x24072c]['isRemoved']||!_0x2bfeca[_0x24072c-0x1]['isAdded']&&!_0x2bfeca[_0x24072c-0x1]['isAddSuggestion'])continue;_0x5d89c4=_0x2bfeca[_0x24072c-0x1],_0x2b00dd=_0x2bfeca[_0x24072c],_0x3a85e7=_0x24072c;}const _0x536c74=_0x5d89c4['level']==_0x2b00dd['level'],_0x1fc016=Math['abs'](_0x5d89c4['level'])<Math['abs'](_0x2b00dd['level'])&&0x0==_0x2b00dd['distance'];(_0x536c74||_0x1fc016)&&(_0x169bd0['set'](_0x2b00dd['id'],_0x5d89c4['id']),_0x2bfeca['splice'](_0x3a85e7,0x1),_0x24072c--,_0x5d89c4['isAdded']=!0x1);}for(let _0x315dc5=0x0;_0x315dc5<_0x2bfeca['length'];_0x315dc5++)_0x169bd0['has'](_0x2bfeca[_0x315dc5]['pairId'])&&(_0x2bfeca[_0x315dc5]['pairId']=_0x169bd0['get'](_0x2bfeca[_0x315dc5]['pairId']));}['_removeMissingPairs'](_0x497a47){const _0x3602af=new Set(_0x497a47['map'](_0x39015f=>_0x39015f['id']));for(let _0x22fd70=0x0;_0x22fd70<_0x497a47['length'];_0x22fd70++)_0x3602af['has'](_0x497a47[_0x22fd70]['pairId'])||0x0==_0x497a47[_0x22fd70]['distance']||(_0x497a47[_0x22fd70]['isIncorrect']=!0x0);return _0x497a47['filter'](_0xd746bb=>!_0xd746bb['isIncorrect']);}['_markMismatchedRemovedTags'](_0x104a78){const _0x170efa=new Set();for(let _0x585e53=0x0;_0x585e53<_0x104a78['length'];_0x585e53++){if(_0x170efa['has'](_0x104a78[_0x585e53]['id'])&&_0x104a78[_0x585e53]['isRemoved']&&(_0x104a78[_0x585e53]['isIncorrect']=!0x0),_0x104a78[_0x585e53]['isIncorrect'])continue;if(0x0==_0x104a78[_0x585e53]['distance'])continue;if('elementStart'!=_0x104a78[_0x585e53]['type'])continue;if(null==_0x104a78[_0x585e53]['pairId'])continue;let _0x2d55bf=_0x585e53+0x1,_0x368f94=0x0;for(;_0x104a78[_0x2d55bf]['id']!=_0x104a78[_0x585e53]['pairId'];)'elementStart'==_0x104a78[_0x2d55bf]['type']?_0x368f94++:'elementEnd'==_0x104a78[_0x2d55bf]['type']&&_0x368f94--,_0x2d55bf++;if(0x0!=_0x368f94){if(_0x104a78[_0x585e53]['isRemoved'])_0x104a78[_0x585e53]['isIncorrect']=!0x0;else{for(;_0x2d55bf!=_0x585e53;)_0x104a78[_0x2d55bf]['isRemoved']&&0x0!=_0x104a78[_0x2d55bf]['distance']&&(_0x104a78[_0x2d55bf]['isIncorrect']=!0x0,_0x170efa['add'](_0x104a78[_0x2d55bf]['pairId'])),_0x2d55bf--;}}}return _0x104a78['filter'](_0x4f4037=>!_0x4f4037['isIncorrect']);}['_removeUnsupportedChanges'](_0x359531){const _0x43e224=this['editor']['model']['schema'];for(let _0x329feb=0x0;_0x329feb<_0x359531['length'];_0x329feb++){if(!(_0x359531[_0x329feb]['isAdded']||_0x359531[_0x329feb]['isAddSuggestion']||_0x359531[_0x329feb]['isRemoved']||_0x359531[_0x329feb]['isRemoveSuggestion']))continue;if(0x0==_0x359531[_0x329feb]['distance'])continue;const _0xfec9a3=_0x359531[_0x329feb]['item'];_0x43e224['isBlock'](_0xfec9a3)||_0x43e224['isLimit'](_0xfec9a3)||(_0x359531[_0x329feb]['isAdded']&&delete _0x359531[_0x329feb]['isAdded'],_0x359531[_0x329feb]['isAddSuggestion']&&delete _0x359531[_0x329feb]['isAddSuggestion'],_0x359531[_0x329feb]['isRemoveSuggestion']&&delete _0x359531[_0x329feb]['isRemoveSuggestion'],_0x359531[_0x329feb]['isRemoved']&&(_0x359531[_0x329feb]['isIncorrect']=!0x0));}return _0x359531['filter'](_0x42ec23=>!_0x42ec23['isIncorrect']);}['_makeModelFromTape'](_0x26b9b4,_0x190b59,_0xeaf733,_0x2b69a2){const _0x387244=new _0x3bb092(),_0x52cd69=[],_0x5c967b=new Map(),_0x472d3a=this['editor']['model'],_0x310dda=_0x472d3a['schema'],_0x1d323c=[_0x387244],_0x5ca913={},_0x39bb83={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x387244['name']=_0x2b69a2;let _0x4b6e34=null;const _0x3d8e79=[0x0];for(let _0x4d9f1f=0x0;_0x4d9f1f<_0x26b9b4['length'];_0x4d9f1f++)if('elementStart'===_0x26b9b4[_0x4d9f1f]['type']){_0x26b9b4[_0x4d9f1f]['previousPosition']=_0x472d3a['createPositionFromPath'](_0x387244,_0x3d8e79);const _0x3670d0=new _0x309f06(_0x26b9b4[_0x4d9f1f]['item']['name'],_0x26b9b4[_0x4d9f1f]['item']['getAttributes']());_0x1d323c[0x0]['_appendChild'](_0x3670d0),_0x3d8e79['push'](0x0),_0x1d323c['unshift'](_0x3670d0),_0x26b9b4[_0x4d9f1f]['nextPosition']=_0x472d3a['createPositionFromPath'](_0x387244,_0x3d8e79);}else'elementEnd'===_0x26b9b4[_0x4d9f1f]['type']?(_0x1d323c['shift'](),_0x26b9b4[_0x4d9f1f]['previousPosition']=_0x472d3a['createPositionFromPath'](_0x387244,_0x3d8e79),_0x3d8e79['pop'](),_0x3d8e79[_0x3d8e79['length']-0x1]++,_0x26b9b4[_0x4d9f1f]['nextPosition']=_0x472d3a['createPositionFromPath'](_0x387244,_0x3d8e79)):(_0x26b9b4[_0x4d9f1f]['previousPosition']=_0x472d3a['createPositionFromPath'](_0x387244,_0x3d8e79),_0x4b6e34?_0x4b6e34['_data']+=_0x26b9b4[_0x4d9f1f]['item']['data']:_0x4b6e34=new _0x4094b7(_0x26b9b4[_0x4d9f1f]['item']['data'],_0x26b9b4[_0x4d9f1f]['item']['getAttributes']()),_0x26b9b4[_0x4d9f1f+0x1]&&'text'===_0x26b9b4[_0x4d9f1f+0x1]['type']&&_0x18462b(_0x4b6e34,_0x26b9b4[_0x4d9f1f+0x1]['item'])||(_0x1d323c[0x0]['_appendChild'](_0x4b6e34),_0x4b6e34=null),_0x3d8e79[_0x3d8e79['length']-0x1]+=_0x26b9b4[_0x4d9f1f]['item']['offsetSize'],_0x26b9b4[_0x4d9f1f]['nextPosition']=_0x472d3a['createPositionFromPath'](_0x387244,_0x3d8e79));for(let _0x4986dc=0x0;_0x4986dc<_0x26b9b4['length'];_0x4986dc++){const _0x45b9cd=_0x26b9b4[_0x4986dc]['previousPosition'],_0x1c431c=_0x26b9b4[_0x4986dc]['nextPosition'];for(const _0x3e1703 of _0x26b9b4[_0x4986dc]['markersStart'])_0x5c967b['set'](_0x3e1703,{'start':_0x45b9cd,'end':null});_0x482caf('isRemoveSuggestion',_0x4986dc,_0x45b9cd,_0x1c431c),_0x482caf('isAddSuggestion',_0x4986dc,_0x45b9cd,_0x1c431c),_0x482caf('isRemoved',_0x4986dc,_0x45b9cd,_0x1c431c),_0x482caf('isAdded',_0x4986dc,_0x45b9cd,_0x1c431c);for(const _0x3edf8a of _0x26b9b4[_0x4986dc]['markersEnd']){const _0x1812f7=_0x5c967b['get'](_0x3edf8a);_0x1812f7?_0x1812f7['end']=_0x1c431c:_0x5c967b['set'](_0x3edf8a,{'start':_0x1c431c,'end':_0x1c431c});}}for(const [_0x2edc40,_0x8569f2]of _0x5c967b){const _0x31bbc4=this['editor']['model']['createRange'](_0x8569f2['start'],_0x8569f2['end']);_0x387244['markers']['set'](_0x2edc40,_0x31bbc4);}return _0x52cd69['sort']((_0x3136e9,_0x3ff52f)=>{const _0x49062e=_0x387244['markers']['get']('revision:'+_0x3136e9['id']),_0x14d9a9=_0x387244['markers']['get']('revision:'+_0x3ff52f['id']);return _0x49062e['start']['isBefore'](_0x14d9a9['start'])?-0x1:_0x49062e['start']['isAfter'](_0x14d9a9['start'])?0x1:_0x49062e['end']['isBefore'](_0x14d9a9['end'])?-0x1:_0x49062e['end']['isAfter'](_0x14d9a9['end'])?0x1:'add'===_0x3136e9['type']?-0x1:0x1;}),{'root':_0x387244,'changes':_0x52cd69};function _0x482caf(_0x50e2da,_0x37146a,_0x1cf51a,_0x2cc162){const _0x504910=!!_0x26b9b4[_0x37146a][_0x50e2da],_0x390fbb=_0x504910?_0x26b9b4[_0x37146a][_0x50e2da]['userId']:null,_0x444969=_0x37146a===_0x26b9b4['length']-0x1,_0x30e72e=_0x39bb83[_0x50e2da][0x0],_0xf5c90f=_0x310dda['isObject'](_0x26b9b4[_0x37146a]['item']);!_0x5ca913[_0x50e2da]&&_0x504910?_0x5ca913[_0x50e2da]={'start':_0x1cf51a,'tapeItem':_0x26b9b4[_0x37146a],'userId':_0x390fbb,'type':_0x50e2da}:_0x5ca913[_0x50e2da]&&!_0x504910?(_0x5ca913[_0x50e2da]['end']=_0x1cf51a,_0x3e6964(_0x5ca913[_0x50e2da]),_0x5ca913[_0x50e2da]=null):_0x5ca913[_0x50e2da]&&_0x504910&&_0x5ca913[_0x50e2da]['userId']!==_0x390fbb&&(_0x5ca913[_0x50e2da]['end']=_0x1cf51a,_0x30e72e&&_0x30e72e['userId']===_0x5ca913[_0x50e2da]['userId']||_0x3e6964(_0x5ca913[_0x50e2da]),_0x5ca913[_0x50e2da]={'start':_0x1cf51a,'tapeItem':_0x26b9b4[_0x37146a],'userId':_0x390fbb,'type':_0x50e2da}),_0x5ca913[_0x50e2da]&&_0xf5c90f&&('elementStart'!==_0x26b9b4[_0x37146a]['type']||_0x30e72e&&_0x30e72e['userId']===_0x390fbb||_0x39bb83[_0x50e2da]['unshift']({'userId':_0x390fbb,'object':_0x26b9b4[_0x37146a]['item'],'change':_0x5ca913[_0x50e2da]}),'elementEnd'===_0x26b9b4[_0x37146a]['type']&&_0x30e72e&&_0x30e72e['object']===_0x26b9b4[_0x37146a]['item']&&(_0x39bb83[_0x50e2da]['shift'](),_0x5ca913[_0x50e2da]=_0x30e72e['change'])),_0x5ca913[_0x50e2da]&&_0x444969&&(_0x5ca913[_0x50e2da]['end']=_0x2cc162,_0x3e6964(_0x5ca913[_0x50e2da]),_0x5ca913[_0x50e2da]=null);}function _0x3e6964({start:_0x2deeb4,end:_0x3916de,tapeItem:_0x59cc20,userId:_0x25a9f6,type:_0x354603}){const _0x3eb2d5=_0x59cc20['item'],_0x51dc7f=_0x472d3a['schema']['isBlock'](_0x3eb2d5)&&!_0x472d3a['schema']['isLimit'](_0x3eb2d5),_0x3e8446=_0x2deeb4['nodeAfter']==_0x3916de['parent']&&_0x3916de['isAtStart'];if(_0x51dc7f&&_0x3e8446)return;const _0x35e508=_0x472d3a['createRange'](_0x2deeb4,_0x3916de),_0x59bccf=_0x190b59['get'](_0x25a9f6),_0x2850ef=new ChangeItem({'author':_0x59bccf,'type':'isAdded'==_0x354603||'isAddSuggestion'==_0x354603?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x354603||'isRemoveSuggestion'==_0x354603},'createdAt':new Date(),'rootName':_0xeaf733});_0x52cd69['push'](_0x2850ef),_0x387244['markers']['set']('revision:'+_0x2850ef['id'],_0x35e508);}function _0x18462b(_0x4b8493,_0x14b1db){const _0x531d14=_0x4b8493['getAttributes'](),_0x308d65=_0x14b1db['getAttributes']();for(const _0x4e2b8f of _0x531d14){if(_0x4e2b8f[0x1]!==_0x14b1db['getAttribute'](_0x4e2b8f[0x0]))return!0x1;_0x308d65['next']();}return _0x308d65['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x3a2f82=>{const _0x51efb7=_0x3a2f82['markerName']['split'](':')[0x1],_0x260735=this['_getChangeFromId'](_0x51efb7);if(!_0x260735)return null;const _0x155b65='add'==_0x260735['type']?'insertion':'deletion',_0x10a466=['ck-suggestion-marker','ck-suggestion-marker-'+_0x155b65];return _0x260735['data']['isSuggestion']&&_0x10a466['push']('ck-suggestion-marker-'+_0x155b65+'-new'),this['activeChange']==_0x260735&&_0x10a466['push']('ck-suggestion-marker--active'),{'classes':_0x10a466,'attributes':{'data-change-id':_0x51efb7}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x289d75=>{_0x289d75['on']('element:pre',(_0x76b429,_0x5ddc61,_0x32883d)=>{const _0xdbe056=_0x5ddc61['viewItem']['getChild'](0x0);if(!_0xdbe056||!_0xdbe056['is']('element','code'))return;if(!_0x32883d['consumable']['consume'](_0xdbe056,{'attributes':['vid_start','vid_end']}))return;const _0xe6e2f3=_0x5ddc61['modelRange']['start']['nodeAfter'];_0x32883d['writer']['setAttribute']('vid_start',_0xdbe056['getAttribute']('vid_start'),_0xe6e2f3),_0x32883d['writer']['setAttribute']('vid_end',_0xdbe056['getAttribute']('vid_end'),_0xe6e2f3);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x304805=>{_0x304805['on']('element',(_0x107f4f,_0x1cb555,_0x51231f)=>{if(!_0x51231f['consumable']['consume'](_0x1cb555['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x1cb555['modelRange']['isCollapsed'])return;const _0x57ecf0=_0x1cb555['modelRange']['start']['nodeAfter'];_0x57ecf0['hasAttribute']('vid_start')||_0x57ecf0['hasAttribute']('vid')||(_0x51231f['writer']['setAttribute']('vid_start',_0x1cb555['viewItem']['getAttribute']('vid_start'),_0x57ecf0),_0x51231f['writer']['setAttribute']('vid_end',_0x1cb555['viewItem']['getAttribute']('vid_end'),_0x57ecf0));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x5ae48d=>_0x5ae48d['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x66c001,[,_0x4c1b19])=>{['vid_start','vid_end','vid']['includes'](_0x4c1b19)&&(_0x66c001['return']=!0x0,_0x66c001['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x212bfe=>{_0x212bfe['on']('attribute:vid',(_0x2b8884,_0x2127b6,_0x41c2ed)=>{if('\x20'!=_0x2127b6['item']['data']||_0x2127b6['item']['parent']['maxOffset']>0x1)return;if(!_0x41c2ed['consumable']['consume'](_0x2127b6['item'],_0x2b8884['name']))return;const _0x4f8cb1=_0x41c2ed['writer'],_0x2430da=_0x41c2ed['mapper']['toViewRange'](_0x2127b6['range']);_0x4f8cb1['wrap'](_0x2430da,_0x4f8cb1['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x510911){const _0x49742b=_0x510911['plugins']['get']('RevisionViewer');return(_0x17becf,_0x3be993,_0x1911e7)=>{const _0x3290c4=_0x3be993['markerName']['split'](':')[0x1],_0x190639=_0x49742b['_getChangeFromId'](_0x3290c4);if(!_0x190639)return null;const _0x1d9592='add'==_0x190639['type']?'split':'merge';if(!_0x1911e7['consumable']['test'](_0x3be993['markerRange'],_0x17becf['name']))return;const _0x28ed96=_0x3be993['markerRange']['getWalker'](),_0x35f0e5=_0x3be993['markerRange']['start'],_0xe77645=_0x510911['model']['schema'];let _0x2fa9d7=null,_0xab1622=null,_0x5d795f=!0x1,_0x226c9b=!0x1;for(const _0x1ec6af of _0x28ed96){const _0x3589d3=_0x1ec6af['item'];_0x5d795f=_0x5d795f||_0xe77645['isContent'](_0x3589d3);const _0x3aa976=_0x1911e7['mapper']['toViewElement'](_0x3589d3);if(_0x3aa976&&_0x3aa976['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x1ec6af['type']&&(_0xe77645['isBlock'](_0x3589d3)&&!_0xe77645['isLimit'](_0x3589d3)&&(_0x3589d3['nextSibling']||_0x35f0e5['isAtEnd']?_0x2fa9d7&&_0x2fa9d7['parent']==_0x3589d3||(_0x2fa9d7=_0x3589d3,_0x551737(_0x1ec6af['previousPosition']),_0x226c9b=!0x0):_0xab1622=_0xab1622||_0x1ec6af['previousPosition']));}function _0x551737(_0x3e0bc3){const _0x480a3e=_0x1911e7['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x1d9592}),_0x10dcc5=_0x1911e7['mapper']['toViewPosition'](_0x3e0bc3);_0x190639['data']['isSuggestion']&&_0x1911e7['writer']['addClass']('ck-suggestion-marker-'+_0x1d9592+'-new',_0x480a3e),_0x49742b['activeChange']==_0x190639&&_0x1911e7['writer']['addClass']('ck-suggestion-marker--active',_0x480a3e),_0x1911e7['writer']['insert'](_0x10dcc5,_0x480a3e),_0x1911e7['mapper']['bindElementToMarker'](_0x480a3e,_0x3be993['markerName']);}_0x5d795f||_0x226c9b||!_0xab1622||_0x551737(_0xab1622);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x3171f3,_0x5c5698,_0x277068)=>{const _0xb692f3=_0x277068['mapper']['markerNameToElements'](_0x5c5698['markerName']);if(_0xb692f3){for(const _0x3df3ee of _0xb692f3)(_0x3df3ee['hasClass']('ck-suggestion-marker-split')||_0x3df3ee['hasClass']('ck-suggestion-marker-merge'))&&(_0x277068['mapper']['unbindElementFromMarkerName'](_0x3df3ee,_0x5c5698['markerName']),_0x277068['writer']['remove'](_0x3df3ee));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x46d2a1,_0x5d5ed9,_0x4cecd9)=>{const _0x17c3bf=_0x5d5ed9['markerName']['split'](':')[0x1],_0x33145f=this['_getChangeFromId'](_0x17c3bf);if(!_0x33145f)return null;const _0x166a67='add'==_0x33145f['type']?'split':'merge';if(_0x4cecd9['consumable']['test'](_0x5d5ed9['markerRange'],_0x46d2a1['name']))for(const _0x3b8be9 of _0x5d5ed9['markerRange']['getItems']()){if(!_0x3b8be9['is']('element','softBreak'))continue;const _0xa0ec12=_0x4cecd9['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x166a67}),_0x32f072=_0x4cecd9['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x3b8be9));_0x33145f['data']['isSuggestion']&&_0x4cecd9['writer']['addClass']('ck-suggestion-marker-'+_0x166a67+'-new',_0xa0ec12),this['activeChange']==_0x33145f&&_0x4cecd9['writer']['addClass']('ck-suggestion-marker--active',_0xa0ec12),_0x4cecd9['writer']['insert'](_0x32f072,_0xa0ec12),_0x4cecd9['mapper']['bindElementToMarker'](_0xa0ec12,_0x5d5ed9['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x4db7b7=>{for(const _0xb65f27 of this['editor']['model']['document']['getRootNames']()){const _0x333470=this['editor']['model']['document']['getRoot'](_0xb65f27),_0xbaa9d3=this['editor']['editing']['view']['document']['getRoot'](_0xb65f27);if(_0xbaa9d3){const _0x23527d=_0x333470['getAttribute']('revisionHistoryAttachChange');if(_0x4db7b7['removeAttribute']('data-change-id',_0xbaa9d3),_0x4db7b7['removeClass']('ck-revision-history-root-add',_0xbaa9d3),_0x4db7b7['removeClass']('ck-revision-history-root-remove',_0xbaa9d3),_0x4db7b7['removeClass']('ck-revision-history-root--active',_0xbaa9d3),_0x23527d){const _0x1729bf=this['_getChangeFromId'](_0x23527d);if(!_0x1729bf)return null;_0x4db7b7['setAttribute']('data-change-id',_0x23527d,_0xbaa9d3),_0x4db7b7['addClass']('ck-revision-history-root-'+_0x1729bf['type'],_0xbaa9d3),this['activeChange']==_0x1729bf&&_0x4db7b7['addClass']('ck-revision-history-root--active',_0xbaa9d3);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x1b85a8=>'revision-comment:'+_0x1b85a8,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x1360f4=>'revision-suggestion:'+_0x1360f4,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x48e2c4=>({'name':'suggestion:'+_0x48e2c4,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x258faa=>{const _0x5e42d0=_0x258faa['markerName']['split'](':')[0x1];return'insertion'!=_0x5e42d0&&'deletion'!=_0x5e42d0?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x5e42d0]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',_t(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',_t(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x1a6544,_0x2e8420,_0x1b91f3)=>{const _0x28acf9=_0x1b91f3['mapper']['markerNameToElements'](_0x2e8420['markerName']);if(_0x28acf9){for(const _0x545eac of _0x28acf9)_0x545eac['is']('uiElement')&&(_0x1b91f3['mapper']['unbindElementFromMarkerName'](_0x545eac,_0x2e8420['markerName']),_0x1b91f3['writer']['remove'](_0x545eac));}},{'priority':'high'});}['_getChangeFromId'](_0x17be78){return this['_changeIdToChange']['get'](_0x17be78);}['_getViewForChange'](_0x21eb82){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new ChangeDetailsView(this['editor']['locale'],_0x21eb82),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x32b3a3,_0x5e281a,_0x178cf0,_0x36e6d1)=>{_0x36e6d1&&this['_balloon']['remove'](_0x36e6d1),_0x178cf0&&(this['_balloon']['add']({'view':_0x178cf0,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x5bbef9=this['editor']['editing'],_0x11f741=this['_getChangeFromId'](_0x178cf0['changeId']);let _0x445744;if(_0x11f741['data']['isOnRoot']){const _0x2a005a=_0x5bbef9['view']['getDomRoot'](_0x11f741['rootName']);_0x445744=Array['from'](_0x2a005a['getClientRects']());}else{const _0x596dbd=this['editor']['model']['markers']['get']('revision:'+_0x178cf0['changeId']);_0x445744=Array['from'](_0x5bbef9['mapper']['markerNameToElements'](_0x596dbd['name']))['map'](_0x3a4a4e=>_0x5bbef9['view']['domConverter']['mapViewToDom'](_0x3a4a4e))['map'](_0x1bf60a=>Array['from'](_0x1bf60a['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x445744[0x0];return _0x445744['find'](_0x1f8c1b=>_0x1f8c1b['top']-0x3<=this['_activeViewTarget']['y']&&_0x1f8c1b['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x1f8c1b['left']-0x3<=this['_activeViewTarget']['x']&&_0x1f8c1b['right']+0x3>=this['_activeViewTarget']['x'])||_0x445744[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x4860b7,_0x4c5431,_0x309f07,_0x1181eb)=>{this['activeView']=_0x309f07?this['_getViewForChange'](_0x309f07):null,this['editor']['model']['change'](()=>{const _0x1df4df=this['editor']['editing'];_0x1181eb&&(_0x1181eb['data']['isOnRoot']?_0x1df4df['view']['change'](_0xf3fab5=>{_0xf3fab5['removeClass']('ck-revision-history-root--active',_0x1df4df['view']['document']['getRoot'](_0x1181eb['rootName']));}):_0x1df4df['reconvertMarker']('revision:'+_0x1181eb['id'])),_0x309f07&&(_0x309f07['data']['isOnRoot']?_0x1df4df['view']['change'](_0x293002=>{_0x293002['addClass']('ck-revision-history-root--active',_0x1df4df['view']['document']['getRoot'](_0x309f07['rootName']));}):_0x1df4df['reconvertMarker']('revision:'+_0x309f07['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x11879b,_0x5a730f)=>{if(this['activeChange'])return;const _0x45b676=this['_findChangeIdFromDomTarget'](_0x5a730f['target']),_0x191558=this['_changeIdToChange']['get'](_0x45b676);_0x191558?(this['_activeViewTarget']={'x':_0x5a730f['domEvent']['x'],'y':_0x5a730f['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x191558)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x573de3,_0x57fe43)=>{const _0x1085ae=this['_findChangeIdFromDomTarget'](_0x57fe43['target']),_0x154609=this['_changeIdToChange']['get'](_0x1085ae);_0x154609?(this['_activeViewTarget']={'x':_0x57fe43['domEvent']['x'],'y':_0x57fe43['domEvent']['y']},_0x154609===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x154609):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x534333){do{const _0x1d227b=_0x534333['getAttribute']('data-change-id');if(_0x1d227b)return _0x1d227b;_0x534333=_0x534333['parent'];}while(_0x534333);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x14427a=>{for(const _0x3b7a3f of this['editor']['model']['markers'])_0x14427a['removeMarker'](_0x3b7a3f);});}}function _t(_0x1286a2,_0x1def0a){return(_0x19ea4f,_0x3c8389,_0x59c268)=>{if(!_0x59c268['consumable']['test'](_0x3c8389['markerRange'],_0x19ea4f['name']))return;const _0x172bf2=_0x3c8389['markerRange']['getWalker'](),_0x590cee=_0x3c8389['markerRange']['start'],_0x4207c2=_0x1286a2['model']['schema'];let _0x99b072=null,_0x17e219=null,_0x4d9f8a=!0x1,_0x5849b5=!0x1;for(const _0x404810 of _0x172bf2){const _0x3103c1=_0x404810['item'];_0x4d9f8a=_0x4d9f8a||_0x4207c2['isContent'](_0x3103c1);const _0x4f19fd=_0x59c268['mapper']['toViewElement'](_0x3103c1);if(_0x4f19fd&&_0x4f19fd['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x404810['type']&&(_0x4207c2['isBlock'](_0x3103c1)&&!_0x4207c2['isLimit'](_0x3103c1)&&(_0x3103c1['nextSibling']||_0x590cee['isAtEnd']?_0x99b072&&_0x99b072['parent']==_0x3103c1||(_0x99b072=_0x3103c1,_0x39eeef(_0x404810['previousPosition']),_0x5849b5=!0x0):_0x17e219=_0x17e219||_0x404810['previousPosition']));}function _0x39eeef(_0x7bced6){const _0x4d3f46=_0x59c268['mapper']['toViewPosition'](_0x7bced6),_0x1f3b85=_0x59c268['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x1def0a});_0x59c268['writer']['insert'](_0x4d3f46,_0x1f3b85),_0x59c268['mapper']['bindElementToMarker'](_0x1f3b85,_0x3c8389['markerName']);}_0x4d9f8a||_0x5849b5||!_0x17e219||_0x39eeef(_0x17e219);};}class RestoreRevisionCommand extends _0x328611{constructor(_0x27c40a){super(_0x27c40a);const _0x1d6f9a=_0x27c40a['plugins']['get'](RevisionViewer);this['affectsData']=!0x1,this['listenTo'](_0x1d6f9a,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x1d6f9a,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x5223cf=this['editor'],_0x5c00f2=_0x5223cf['plugins']['get'](RevisionViewer),_0x1e0130=_0x5c00f2['isReady']?_0x5c00f2['diff']['newRevisionId']:null;_0x5223cf['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x1e0130);}['refresh'](){const {isReady:_0x28a891,isEnabled:_0x2cc721,repository:_0x17a442,diff:_0x35d143}=this['editor']['plugins']['get'](RevisionViewer),_0x3e1fa0=_0x35d143&&_0x17a442['getLaterVisibleRevision'](_0x35d143['newRevisionId']);this['isEnabled']=_0x28a891&&_0x2cc721&&Boolean(_0x3e1fa0);}}class ShowChangeCommand extends _0x328611{['_step'];constructor(_0x54000f,{direction:_0xb6d9ec}){super(_0x54000f);const _0x44e4a9=_0x54000f['plugins']['get'](RevisionViewer);this['affectsData']=!0x1,this['_step']='forward'===_0xb6d9ec?0x1:-0x1,this['listenTo'](_0x44e4a9,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x44e4a9,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x44e4a9,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x417016=this['editor'],_0x143167=_0x417016['plugins']['get'](RevisionViewer),{isNavigationMode:_0x4224e0,currentChangeNumber:_0x3663d5}=_0x143167;let _0x28fb19;if(_0x143167['activeChange']=_0x4224e0?_0x143167['diff']['changes']['get'](_0x3663d5+this['_step']):_0x143167['diff']['changes']['first'],_0x143167['activeChange']['data']['isOnRoot'])_0x28fb19=_0x417016['editing']['view']['getDomRoot'](_0x143167['activeChange']['rootName']);else{const _0x2c9313=_0x417016['model']['markers']['get']('revision:'+_0x143167['activeChange']['id']);_0x28fb19=_0x26734a(_0x417016['editing'],_0x2c9313);}_0x43cb0b({'target':_0x28fb19,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x4f1d30,currentChangeNumber:_0xaee3a2,numberOfChanges:_0xccbb,isReady:_0x105ec1,isEnabled:_0x3af74d}=this['editor']['plugins']['get'](RevisionViewer);this['isEnabled']=!!(_0x3af74d&&_0x105ec1&&_0xccbb)&&(!_0x4f1d30||(0x1===this['_step']?_0xaee3a2<_0xccbb-0x1:_0xaee3a2>0x0));}}class ChangesNavigationView extends _0x7802f2{constructor(_0x59f9d7){super(_0x59f9d7);const _0x39de81=this['bindTemplate'],_0xa30625=new _0x506250(_0x59f9d7),_0x490372=new _0x506250(_0x59f9d7);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',(_0x19ccdc,_0x5e11f6)=>_0x19ccdc&&_0x5e11f6>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x29c877,_0x45a3e4,_0x25713d,_0x57b2a2)=>{if(!_0x29c877)return ft(_0x59f9d7,'Loading...');if(!_0x25713d)return ft(_0x59f9d7,'No\x20changes');const _0x5d2418=ft(_0x59f9d7,'NUMBER_OF_CHANGES',_0x25713d);return _0x57b2a2?ft(_0x59f9d7,'X_OF_Y_CHANGES',[_0x45a3e4+0x1,_0x25713d]):_0x5d2418;}),_0xa30625['set']({'label':ft(_0x59f9d7,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x178c94}),_0x490372['set']({'label':ft(_0x59f9d7,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0xf0bd91}),_0xa30625['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x490372['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0xa30625['on']('execute',()=>this['fire']('execute','backward')),_0x490372['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',_0x39de81['if']('_isStatusLabelVisible','ck-hidden',_0x3d357e=>!_0x3d357e)]},'children':[{'text':_0x39de81['to']('isNavigationMode',_0x3cb6da=>_0x3cb6da?ft(_0x59f9d7,'EDIT_X_OF_Y_REVISIONS')+':\x20':ft(_0x59f9d7,'Total')+':\x20')}]},{'text':_0x39de81['to']('_statusText')}]},new st(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0xa30625,_0x490372]}]});}}const yt='ck-editor__editable__loading-overlay';class RevisionViewerLoadingOverlay extends _0x1098b4{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x857da0=this['editor']['editing']['view'];_0x857da0['change'](_0x2b98c0=>{for(const _0x4cbc14 of _0x857da0['document']['roots'])_0x2b98c0['addClass'](yt,_0x4cbc14);});}['hide'](){const _0x34fed7=this['editor']['editing']['view'];_0x34fed7['change'](_0x43575c=>{for(const _0x55ddc7 of _0x34fed7['document']['roots'])_0x43575c['removeClass'](yt,_0x55ddc7);});}}class RevisionViewerUI extends _0x1098b4{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionViewer,RevisionViewerLoadingOverlay];}['init'](){const _0x1affe8=this['editor'],_0x2f75ec=_0x1affe8['plugins']['get'](RevisionViewer),_0x1f8ecb=_0x1affe8['plugins']['get'](RevisionViewerLoadingOverlay);_0x1affe8['ui']['componentFactory']['add']('exitToEditing',_0x107191=>{const _0x20122b=new _0x506250(_0x107191);return _0x20122b['set']({'label':ft(_0x107191,'Back\x20to\x20editing'),'icon':_0x2432b7,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x20122b,'execute',()=>{_0x1affe8['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x20122b;}),_0x1affe8['ui']['componentFactory']['add']('restoreRevision',_0x13fff8=>{const _0x14f774=new _0x506250(_0x13fff8);return _0x14f774['set']({'label':ft(_0x13fff8,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x14f774['bind']('isEnabled')['to'](_0x1affe8['commands']['get']('restoreRevision')),this['listenTo'](_0x14f774,'execute',()=>_0x1affe8['execute']('restoreRevision')),_0x14f774;}),_0x1affe8['ui']['componentFactory']['add']('changesNavigation',_0x8fcd20=>{const _0x3496b8=new ChangesNavigationView(_0x8fcd20),_0x1c27e4=_0x1affe8['commands']['get']('showPreviousChange'),_0x2289a0=_0x1affe8['commands']['get']('showNextChange');return _0x3496b8['bind']('isBackwardNavigationEnabled')['to'](_0x1c27e4,'isEnabled'),_0x3496b8['bind']('isForwardNavigationEnabled')['to'](_0x2289a0,'isEnabled'),_0x3496b8['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x2f75ec),this['listenTo'](_0x3496b8,'execute',(_0x394537,_0x26a885)=>{_0x1affe8['execute']('forward'===_0x26a885?'showNextChange':'showPreviousChange');}),_0x3496b8;}),_0x1f8ecb['show'](),_0x2f75ec['on']('change:isReady',(_0x1e5d34,_0x50517b,_0x205387)=>{_0x205387?_0x1f8ecb['hide']():_0x1f8ecb['show']();});}}class RevisionNameView extends _0x195b0e{['_resizeObserver']=null;constructor(_0x905add,_0x5abdb8){super(_0x905add,_0x5abdb8);const _0x578cd0=this['bindTemplate'];this['set']({'label':ft(_0x905add,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=ft(_0x905add,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x578cd0['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x176f79(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x492d6f=this['fieldView']['element'];this['_tooltipString']=_0x492d6f['scrollWidth']>_0x492d6f['clientWidth']&&_0x492d6f['value']||'';}}class RevisionAuthorView extends _0x7802f2{constructor(_0x3ab86f,_0x46f263,_0x179086){super(_0x3ab86f);const _0x575c01=new nt();_0x575c01['set']({'content':_0x4b0c7a,'viewBox':'0\x200\x2011\x2010'});const _0x128ef3=['ck','ck-revision-history-sidebar__revision-author'];_0x179086&&_0x128ef3['push']('ck-revision-history-sidebar__revision-author_creator');const _0x527e2b=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':ft(_0x3ab86f,_0x179086?'Revision\x20creator':'Revision\x20author')},'children':[_0x575c01,_0x46f263['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x128ef3},'children':_0x527e2b});}}function Rt(_0x3e02e6,_0x1a5ad8){const _0x608211=_0x3e02e6['bindTemplate'],_0x2b0bc5=_0x3e02e6['locale'],_0x421daf=_0x4cec8d(_0x2b0bc5);_0x421daf['panelPosition']='sw';const _0x555bbd=function(_0x41dad7,_0x270417){const _0x528905=function(_0x6c368,_0x36b974){const _0x14f786=_0x6c368['locale'],_0x49a6cf={'Compare\x20against\x20selected':ft(_0x14f786,'Compare\x20against\x20selected'),'Name\x20this\x20revision':ft(_0x14f786,'Name\x20this\x20revision'),'Restore\x20this\x20revision':ft(_0x14f786,'Restore\x20this\x20revision')};return _0x36b974['map'](_0x5e9850=>{const _0x3f5c79=_0x49a6cf[_0x5e9850['name']];return _0x3f5c79&&_0x3f5c79!==_0x5e9850['name']&&(_0x5e9850['name']=_0x3f5c79),_0x5e9850;});}(_0x41dad7,_0x270417),_0x97727e=new _0x166815();for(const _0x541e87 of _0x528905){const _0x4e99f3={'type':'button','model':new rt({'label':_0x541e87['name'],'class':_0x541e87['class'],'withText':!0x0,'role':'menuitem','_action':_0x541e87['action']})};_0x4e99f3['model']['bind']('isEnabled')['to'](_0x41dad7,'isActionsDropdownOpen',_0x351cfb=>'function'!=typeof _0x541e87['isEnabled']||(!_0x351cfb||_0x541e87['isEnabled'](_0x41dad7))),_0x97727e['add'](_0x4e99f3);}return _0x97727e;}(_0x3e02e6,_0x1a5ad8);return _0x3e02e6['bind']('isActionsDropdownOpen')['to'](_0x421daf,'isOpen'),_0x421daf['buttonView']['set']({'label':ft(_0x2b0bc5,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x34e82a}),_0x421daf['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x608211['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x608211['to'](_0x3237e7=>_0x3237e7['stopPropagation']())}}),_0x421daf['on']('execute',_0x2ed807=>{_0x3e02e6['isReady']&&'function'==typeof _0x2ed807['source']['_action']&&_0x2ed807['source']['_action'](_0x3e02e6);}),ot(_0x421daf,_0x555bbd,{'role':'menu'}),_0x421daf['listenTo'](_0x3e02e6,'change:isActionsDropdownOpen',(_0x4a1911,_0x579083,_0x2a451d)=>{if(_0x2a451d)for(const _0x167cb2 of _0x421daf['listView']['items']){const _0x1deb61=_0x167cb2['children']['first'],_0x1e9d00=_0x1a5ad8['find'](_0x55042c=>_0x55042c['action']===_0x1deb61['_action'])['isVisible'];_0x167cb2['isVisible']=void 0x0===_0x1e9d00||_0x1e9d00(_0x3e02e6);}}),_0x421daf;}class RevisionView extends/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x57fb49(_0x7802f2){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x28c9b3,_0x41326a,_0x2dabd0,_0x2dbd68){super(_0x28c9b3);const _0x13576e=this['bindTemplate'],_0x930c0b=function(_0x331be1,_0xfee70f){const _0x7d69ae=Array['from'](_0xfee70f['authors'])['filter'](_0x124495=>_0x124495!=_0xfee70f['creator']);return _0xfee70f['creator']&&_0x7d69ae['unshift'](_0xfee70f['creator']),_0x7d69ae['map'](_0x16b075=>new RevisionAuthorView(_0x331be1,_0x16b075,_0x16b075==_0xfee70f['creator']));}(_0x28c9b3,_0x41326a);this['id']=_0x41326a['id'],this['_revision']=_0x41326a,this['_requireRevisionName']=_0x2dbd68,this['bind']('name','createdAt')['to'](_0x41326a),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0xad7f88=>{return _0x40e0ac=_0x28c9b3['uiLanguage'],(_0x3ed6fb=_0xad7f88)['toLocaleDateString'](_0x40e0ac,{'month':'long','day':'numeric'})+',\x20'+_0x3ed6fb['toLocaleTimeString'](_0x40e0ac,{'hour':'numeric','minute':'numeric'});var _0x40e0ac,_0x3ed6fb;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new RevisionNameView(_0x28c9b3,_0x5e9819),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x201cb0=>_0x201cb0||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x366fea,_0x5036d5)=>_0x366fea&&_0x5036d5),this['revisionActionsView']=_0x2dabd0&&_0x2dabd0['length']?Rt(this,_0x2dabd0):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x13576e['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x13576e['if']('isEnabled','ck-disabled',_0x64e48=>!_0x64e48),_0x13576e['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x13576e['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x13576e['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':_0x13576e['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':_0x930c0b}]},this['revisionActionsView']],'on':{'click':_0x13576e['to'](_0xb087c8=>{_0xb087c8['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x1a1872=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x1a1872,'change',()=>{this['_requireRevisionName']&&!_0x1a1872['value']||this['fire']('setName',{'id':this['id'],'name':_0x1a1872['value']}),_0x1a1872['value']||(_0x1a1872['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function bt(_0x3cc55d,_0x4bfe3f){const _0x5eb201=vt['fromJSDate'](_0x3cc55d)['setLocale'](_0x4bfe3f),_0x21685a=vt['local'](),_0x39bfc4=_0x21685a['minus']({'days':0x1})['startOf']('day');let _0x3bc6aa,_0x636cff;return _0x5eb201['hasSame'](_0x21685a,'day')?(_0x3bc6aa=_0x5eb201['startOf']('day')['toJSDate'](),_0x636cff=_0x5eb201['toRelativeCalendar']()):_0x5eb201['hasSame'](_0x39bfc4,'day')?(_0x3bc6aa=_0x39bfc4['toJSDate'](),_0x636cff=_0x5eb201['toRelativeCalendar']()):_0x5eb201['hasSame'](_0x21685a,'week')?(_0x3bc6aa=_0x5eb201['startOf']('week')['toJSDate'](),_0x636cff=_0x5eb201['weekdayLong']||''):_0x5eb201['hasSame'](_0x21685a,'year')?(_0x3bc6aa=_0x5eb201['startOf']('month')['toJSDate'](),_0x636cff=_0x5eb201['monthLong']||''):(_0x3bc6aa=_0x5eb201['startOf']('year')['toJSDate'](),_0x636cff=String(_0x5eb201['year'])),{'startDate':_0x3bc6aa,'localizedPeriodName':_0x636cff};}class RevisionsSidebarTimePeriodView extends _0x7802f2{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x2f1a17,_0x5de6a8,_0x2aec59,_0x3312fc){super(_0x2f1a17);const _0x42dfa9=bt(_0x5de6a8,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x5de6a8,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x2aec59,this['_requireRevisionName']=_0x3312fc,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':_0x42dfa9}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x21c2c9){const _0x5b45ee=new RevisionView(this['locale'],_0x21c2c9,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x5b45ee);}['removeRevision'](_0x41dbb7){const _0x51ca7b=this['revisionViews']['find'](_0x46c083=>_0x46c083['id']===_0x41dbb7['id']);this['revisionViews']['remove'](_0x51ca7b);}}class RevisionsSidebarHeaderView extends _0x7802f2{constructor(_0x419bc3){super(_0x419bc3);const _0x2e3155=new nt();_0x2e3155['content']=_0xd37549,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x2e3155,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[ft(_0x419bc3,'Revision\x20history')]}]});}}class RevisionsSidebarView extends _0x7802f2{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x4be92c,_0x3acce2,_0x14f4d5,_0x982df1){super(_0x4be92c);const _0x4462bb=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x3acce2,this['_revisionActions']=_0x14f4d5,this['_requireRevisionName']=_0x982df1,this['on']('select',(_0x213c41,_0x1ff540)=>{this['fire']('revisionSelected',_0x1ff540);}),this['on']('setName',(_0x2f7bfa,_0x1fbd8b)=>{this['fire']('revisionSetName',_0x1fbd8b);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new RevisionsSidebarHeaderView(_0x4be92c),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x4462bb['if']('isEnabled','ck-disabled',_0x514c5e=>!_0x514c5e)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0xe205a3 of this['_revisions'])this['_addRevision'](_0xe205a3);this['_revisions']['on']('add',(_0x37fa81,_0x82d2dd)=>{this['_addRevision'](_0x82d2dd);}),this['_revisions']['on']('remove',(_0x111081,_0x587587)=>{this['_removeRevision'](_0x587587);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x522355=>_0x522355['revisionViews']['map'](_0x4fed25=>_0x4fed25))['flat']();}['selectRevision'](_0x3a7b64){for(const _0x18d8c8 of this['revisionViews'])_0x3a7b64&&_0x3a7b64['id']===_0x18d8c8['id']?_0x18d8c8['select']():_0x18d8c8['deselect']();}['highlightRevisions'](_0x281153){for(const _0x2051f0 of this['revisionViews'])_0x281153['some'](({id:_0x2fa240})=>_0x2fa240===_0x2051f0['id'])?_0x2051f0['highlight']():_0x2051f0['unhighlight']();}['_addRevision'](_0x1855c3){const _0x297b2e=bt(_0x1855c3['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x5b3521=this['_getTimePeriodViewByStartDate'](_0x297b2e);_0x5b3521||(_0x5b3521=new RevisionsSidebarTimePeriodView(this['locale'],_0x297b2e,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x5b3521)),_0x5b3521['addRevision'](_0x1855c3);}['_removeRevision'](_0x2d7b27){const _0x2acb54=bt(_0x2d7b27['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x2acb54)['removeRevision'](_0x2d7b27);}['_getTimePeriodViewByStartDate'](_0x1e06e8){return this['timePeriodViews']['find'](_0xb48032=>_0xb48032['startDate']['getTime']()===_0x1e06e8['getTime']());}}class RevisionsSidebar extends _0x1098b4{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
|
|
28
28
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
|
|
29
|
-
kt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionViewer];}constructor(
|
|
30
|
-
_0x2e7a9f(_0x18ee47){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x2efe2b,_0x2c84a6){super(_0x2c84a6),this['sourceElement']=_0x2efe2b,this['model']['document']['createRoot']();const _0x41bdc4=new RevisionViewerEditorUIView(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new RevisionViewerEditorUI(this,_0x41bdc4);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x1ee8d7,_0x3431b8){const _0x13b93f=new this(_0x1ee8d7,_0x3431b8);return await _0x13b93f['initPlugins'](),await _0x13b93f['ui']['init'](_0x1ee8d7),await _0x13b93f['data']['init'](_0x13b93f['config']['get']('initialData')||''),_0x13b93f['fire']('ready'),_0x13b93f;}}const It=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];class RevisionViewerIntegration extends _0x176a35{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x676c79){function _0x5a21dc(_0x53a8fc){return _0x53a8fc['map'](_0x142018=>String['fromCharCode'](_0x142018))['join']('');}super(_0x676c79),this['result']='end',_0x676c79[_0x5a21dc([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5a21dc([0x76,0x69,0x65,0x77])][_0x5a21dc([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5a21dc([0x61,0x75,0x74,0x6f]),_0x676c79[_0x5a21dc([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x5a21dc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5a21dc([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x5a21dc([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x5a21dc([0x6f,0x6b])});}}class RevisionHistory extends _0x176a35{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionTracker,RevisionHistoryUI];}constructor(_0x50e9e0){if(super(_0x50e9e0),!this['editor']['config']['get']('revisionHistory'))throw new _0x4e0fab('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x133b60=>this['_showRevisionViewer']({..._0x133b60,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x16065d=>this['_closeRevisionViewer'](_0x16065d)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x5d31c1=>this['_restoreRevision'](_0x5d31c1)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x398623){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x398623;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x4b13e7){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x4b13e7);}['getRevision'](_0x3d0164){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x3d0164);}['getRevisions'](_0x1ae6a4){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x1ae6a4||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x112536=this['editor'],_0x175d95=_0x106aa0(_0x112536,It),_0x50f487=_0x112536['plugins']['get']('RevisionTracker'),_0x5b69e8=_0x112536['plugins']['get'](_0x12edcd)['users'];return _0x175d95['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x175d95['lazyRoots'],(_0x175d95['plugins']['push'](RevisionViewerIntegration,RevisionViewer,RevisionViewerUI,class RevisionViewerInit extends _0x176a35{static get['requires'](){return[RevisionViewer,_0x12edcd];}['init'](){const _0x3a17c1=this['editor']['plugins']['get'](_0x12edcd);for(const _0x4a85db of _0x5b69e8)_0x4a85db['isAnonymous']||_0x3a17c1['getUser'](_0x4a85db['id'])||_0x3a17c1['addUser'](_0x4a85db);const _0xa1ed7a=_0x50f487['repository']['getRevisions']();let _0x4ee283=null;const _0x3dffc9=this['editor']['plugins']['get']('RevisionViewer');_0x3dffc9['adapter']=_0x50f487['adapter'],_0x3dffc9['bind']('isEnabled')['to'](_0x50f487),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x112536,'isReadOnly',_0x1cdede=>!_0x1cdede);for(const _0x8a7119 of _0xa1ed7a){const _0x486730=null===_0x8a7119['creator'];if(_0x486730&&_0x8a7119['toVersion']===_0x8a7119['fromVersion'])continue;const _0xa9ab36=_0x8a7119['toJSON']();_0x3dffc9['addRevisionData'](_0xa9ab36,(_0x34ad7b,_0x20dd1c,_0x1c184c)=>{if(_0x486730){if(_0x4ee283)_0x4ee283['_update'](_0x34ad7b,_0x20dd1c);else{if(!_0x20dd1c){const _0x24a87c=_0x1c184c['toJSON']();_0x24a87c['id']=_0x3a9e51(),_0x50f487['saveRevision'](_0x24a87c,_0x1c184c['toVersion'])['then'](_0x448bb5=>{_0x4ee283=_0x448bb5;});}}}else _0x8a7119['_update'](_0x34ad7b,_0x20dd1c);});}}},RevisionsSidebar),_0x175d95);}['_enhanceShowRevisionViewerCallback'](){const _0x1a8b39=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x3a86b0=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x797850=this['editor']['plugins']['get']('Autosave');await _0x797850['save']();}else await _0x3a86b0['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x48da93=this['editor']['plugins']['get']('Dialog');_0x48da93['isOpen']&&_0x48da93['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x57a79f=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x4963f8 of _0x57a79f)_0x4963f8['class']=_0x4963f8['class']?_0x4963f8['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x317e42=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x317e42&&_0x317e42['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x1a910a=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x1a910a&&_0x1a910a['setAttribute']('tabindex','-1');}}const _0x2ff966=this['_getRevisionViewerEditorConfig']();return _0x1a8b39(_0x2ff966)['then'](_0x376731=>{return(this['_viewerEditor']=_0x376731,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'),_0x376731);})['catch'](_0x2a29ac=>(console['error'](_0x2a29ac),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x38b7d4=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 _0xe4f8cf=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x4c565d of _0xe4f8cf)_0x4c565d['class']='ck-tab-panel_disabled'===_0x4c565d['class']?'':_0x4c565d['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x5da324=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x5da324&&_0x5da324['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x58ff9b=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x58ff9b&&_0x58ff9b['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x38b7d4(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x3e2d8d=this['editor']['plugins']['get']('Annotations');_0x3e2d8d['refreshVisibility'](),_0x3e2d8d['refreshPositioning']();}});});}['_showRevisionViewer'](_0x445ff3){const _0x20f2ca=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x914c0=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x4e2030=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return RevisionViewerEditor['create'](_0x4e2030,_0x445ff3)['then'](_0x465711=>(_0x914c0['style']['display']='block',_0x20f2ca['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x465711));}['_closeRevisionViewer'](_0x25d27d){const _0x5465ae=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x5465ae['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x25d27d['destroy']();}async['_restoreRevision'](_0x341320){const _0x495b41=this['editor'],_0x3c1011=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x3f62f6=_0x495b41['plugins']['get']('RevisionTracker'),_0x19f249=_0x495b41['plugins']['get']('RevisionHistoryUtils'),_0xc1bf38=_0x3c1011['repository']['getRevision'](_0x341320);let _0xf6923b,_0xf9253,_0xb310a7;try{await _0x19f249['loadRevisionData'](_0xc1bf38,this['adapter']),_0xf6923b=_0x19f249['getRevisionDocumentData'](_0xc1bf38),_0xf9253=_0x19f249['getRevisionRootsAttributes'](_0xc1bf38);}catch(_0x186ad4){return void console['error'](_0x186ad4);}_0x495b41['model']['change'](_0x3e5f43=>{for(const _0x2a18fd of Array['from'](_0x495b41['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x3e5f43['removeMarker'](_0x2a18fd);}),_0x3c1011['isReady']=!0x1,_0x495b41['model']['enqueueChange'](_0x33cb8f=>{_0x33cb8f['setSelection'](null),_0x33cb8f['removeSelectionAttribute'](_0x495b41['model']['document']['selection']['getAttributeKeys']());const _0x1b587d=Object['keys'](_0xf6923b);for(const _0xd31522 of _0x495b41['model']['document']['roots'])'$graveyard'!=_0xd31522['rootName']&&_0xd31522['isAttached']()&&!_0x1b587d['includes'](_0xd31522['rootName'])&&_0x33cb8f['detachRoot'](_0xd31522);for(const _0x46c545 of _0x1b587d){let _0x1d018b=_0x495b41['model']['document']['getRoot'](_0x46c545);_0x1d018b&&_0x1d018b['isAttached']()||(_0x1d018b=_0x33cb8f['addRoot'](_0x46c545));const _0xb5fe86=_0xf9253[_0x46c545],_0x151be4=Object['keys'](_0xb5fe86),_0x1ffd55=_0xf6923b[_0x46c545];for(const _0x302783 of _0x1d018b['getAttributeKeys']())_0x151be4['includes'](_0x302783)||_0x33cb8f['removeAttribute'](_0x302783,_0x1d018b);for(const _0x10a728 of _0x151be4)_0x33cb8f['setAttribute'](_0x10a728,_0xf9253[_0x46c545][_0x10a728],_0x1d018b);_0x33cb8f['remove'](_0x33cb8f['createRangeIn'](_0x1d018b)),_0x33cb8f['insert'](_0x495b41['data']['parse'](_0x1ffd55,_0x1d018b),_0x1d018b,0x0);}});const _0x27ca63=ft(_0x495b41['locale'],'Restored');if(_0xc1bf38['name'])_0xb310a7=-0x1==_0xc1bf38['name']['indexOf'](_0x27ca63)?_0x27ca63+':\x20'+_0xc1bf38['name']:_0xc1bf38['name'];else _0xb310a7=_0x27ca63+':\x20'+(_0xc1bf38['createdAt']['toLocaleDateString'](_0x495b41['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0xc1bf38['createdAt']['toLocaleTimeString'](_0x495b41['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x3f62f6['saveRevision']({'name':_0xb310a7}),_0x3c1011['isReady']=!0x0,_0x495b41['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{RestoreRevisionCommand,Revision,RevisionHistory,RevisionHistoryUI,RevisionHistoryUtils,RevisionTracker,RevisionViewer,RevisionViewerEditor,RevisionViewerIntegration,RevisionViewerLoadingOverlay,RevisionViewerUI,RevisionsRepository,RevisionsSidebar,ShowChangeCommand};
|
|
29
|
+
kt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionViewer];}constructor(_0x471540){super(_0x471540),this['_revisionViewer']=_0x471540['plugins']['get'](RevisionViewer),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x2791f3=this['_revisionsRepository']['_revisions'],_0x29f12d=this['_createRevisionActions'](),_0x2bc720=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new RevisionsSidebarView(this['editor']['locale'],_0x2791f3,_0x29f12d,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',(_0x5dcf87,_0x3db4c0)=>{_0x3db4c0['revisionViews']['on']('add',(_0x3f4c48,_0x490a90)=>{_0x490a90['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)),_0x2bc720['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x4cc83d=this['_revisionsRepository']['getRevision'](0x0);if(_0x4cc83d){const _0x3ba64d=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x4cc83d['id']);this['_revisionViewer']['compare'](_0x4cc83d,_0x3ba64d);}}['_handleRevisionSelected'](_0x2da43f,_0x5cbfb7){const _0x2e9d13=this['_revisionsRepository']['getRevision'](_0x5cbfb7['id']),_0x3d83c7=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x2e9d13['id']);this['_revisionViewer']['compare'](_0x2e9d13,_0x3d83c7);}['_handleRevisionSetName'](_0x325f92,_0x5d23a4){this['_revisionsRepository']['getRevision'](_0x5d23a4['id'])['setName'](_0x5d23a4['name']);}['_handleDiffChange'](_0x4f0ece,_0x3ec865,_0x39e353){const _0x2f8002=this['_revisionsRepository']['getRevisionsInDiff'](_0x39e353);_0x2f8002['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x2f8002),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x2f8002[0x0]));}['_createRevisionActions'](){const _0x13eccf=this['editor'],_0x3131c2=RevisionsSidebar['availableRevisionActions'],_0x50dc41=_0x13eccf['config']['get']('revisionHistory.revisionActions')||RevisionsSidebar['defaultRevisionActions'];if(_0x50dc41['length'])return _0x50dc41['map'](_0xa664aa=>{const _0xaf8268='string'==typeof _0xa664aa?Object['assign']({},_0x3131c2[_0xa664aa]):_0xa664aa;return _0xaf8268['action']=_0xaf8268['action']['bind'](this,_0x13eccf),_0xaf8268['isVisible']&&(_0xaf8268['isVisible']=_0xaf8268['isVisible']['bind'](this,_0x13eccf)),_0xaf8268;});}}function kt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x583316},_0x1e7c90)=>{const _0xffa2d3=_0x583316['get'](RevisionViewer),_0x418cfc=_0xffa2d3['repository'];let _0x137ffd=_0xffa2d3['diff']['newRevisionId'],_0x39f2a6=_0x1e7c90['id'];_0x418cfc['getIndex'](_0x137ffd)>_0x418cfc['getIndex'](_0x39f2a6)&&([_0x137ffd,_0x39f2a6]=[_0x39f2a6,_0x137ffd]),_0xffa2d3['compare'](_0x137ffd,_0x39f2a6);},'isVisible':({plugins:_0xeae51},_0x59d30f)=>{const _0x222e10=_0xeae51['get'](RevisionViewer);return!(_0x222e10['repository']['getRevisionsInDiff'](_0x222e10['diff'])['length']>0x2)&&!_0x59d30f['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x1984e9,{id:_0x20298c})=>{_0x1984e9['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x20298c);},'isVisible':({plugins:_0x2479e9},_0x4f1d89)=>!!_0x2479e9['get'](RevisionViewer)['repository']['getLaterVisibleRevision'](_0x4f1d89['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x2fb488},{id:_0x43ed47,revisionNameView:_0x41ffd5})=>{const _0x44ca93=_0x2fb488['get'](RevisionViewer),_0xa386cb=_0x44ca93['repository']['getEarlierVisibleRevision'](_0x43ed47);_0x44ca93['compare'](_0x43ed47,_0xa386cb),_0x41ffd5['focus'](),_0x41ffd5['fieldView']['select']();}}};}class RevisionViewerEditorUI extends at{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x5c5991,_0x135c75){super(_0x5c5991),this['_view']=_0x135c75,this['_toolbarConfig']=ht(_0x5c5991['config']['get']('toolbar')),this['_elementReplacer']=new _0x5c73b3();}get['element'](){return this['view']['element'];}['init'](_0x3c39e8){const _0x3aa65e=this['editor'],_0x1af560=this['view'],_0xba27a4=_0x3aa65e['editing']['view'],_0x3f2206=_0x1af560['editable'],_0x38b0a7=_0xba27a4['document']['getRoot']();_0x3f2206['name']=_0x38b0a7['rootName'],_0x1af560['render']();const _0x11058b=_0x3f2206['element'];this['setEditableElement'](_0x3f2206['name'],_0x11058b),_0x1af560['editable']['bind']('isFocused')['to'](this['focusTracker']),_0xba27a4['attachDomRoot'](_0x11058b),this['_elementReplacer']['replace'](_0x3c39e8,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x2f4657=this['view'],_0x51bf44=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x51bf44['detachDomRoot'](_0x2f4657['editable']['name']),_0x2f4657['destroy']();}['_initToolbar'](){const _0x189fc7=this['view'];_0x189fc7['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x189fc7['stickyPanel']['limiterElement']=_0x189fc7['element'],_0x189fc7['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x1d202d})=>_0x1d202d),_0x189fc7['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x189fc7['toolbar']);}}class RevisionViewerEditorUIView extends ct{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x384845,_0x337b5b,_0x491319={}){super(_0x384845),this['stickyPanel']=new lt(_0x384845),this['toolbar']=new ut(_0x384845,{'shouldGroupWhenFull':_0x491319['shouldToolbarGroupWhenFull']}),this['_editable']=new dt(_0x384845,_0x337b5b);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class RevisionViewerEditor extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0xe4c1e(_0x102d5){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x1bcf48,_0x18756b){super(_0x18756b),this['sourceElement']=_0x1bcf48,this['model']['document']['createRoot']();const _0x15202d=new RevisionViewerEditorUIView(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new RevisionViewerEditorUI(this,_0x15202d);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x342538,_0x309316){const _0x59dacc=new this(_0x342538,_0x309316);return await _0x59dacc['initPlugins'](),await _0x59dacc['ui']['init'](_0x342538),await _0x59dacc['data']['init'](_0x59dacc['config']['get']('initialData')||''),_0x59dacc['fire']('ready'),_0x59dacc;}}const It=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];class RevisionViewerIntegration extends _0x1098b4{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x43c7ab){function _0x440edf(_0x9681cc){return _0x9681cc['map'](_0x1020ba=>String['fromCharCode'](_0x1020ba))['join']('');}super(_0x43c7ab),this['result']='end',_0x43c7ab[_0x440edf([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x440edf([0x76,0x69,0x65,0x77])][_0x440edf([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x440edf([0x61,0x75,0x74,0x6f]),_0x43c7ab[_0x440edf([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x440edf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x440edf([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x440edf([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x440edf([0x6f,0x6b])});}}class RevisionHistory extends _0x1098b4{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionTracker,RevisionHistoryUI];}constructor(_0x4097fd){if(super(_0x4097fd),!this['editor']['config']['get']('revisionHistory'))throw new _0xc946e0('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x31d5cb=>this['_showRevisionViewer']({..._0x31d5cb,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x4565b4=>this['_closeRevisionViewer'](_0x4565b4)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0xaaa53e=>this['_restoreRevision'](_0xaaa53e)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x32a087){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x32a087;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x343a43){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x343a43);}['getRevision'](_0x12c82d){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x12c82d);}['getRevisions'](_0x41f981){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x41f981||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0xc5cf6b=this['editor'],_0x33f4ab=_0x551f13(_0xc5cf6b,It),_0x1cb376=_0xc5cf6b['plugins']['get']('RevisionTracker'),_0x199220=_0xc5cf6b['plugins']['get'](_0x1b1234)['users'];return _0x33f4ab['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x33f4ab['lazyRoots'],(_0x33f4ab['plugins']['push'](RevisionViewerIntegration,RevisionViewer,RevisionViewerUI,class RevisionViewerInit extends _0x1098b4{static get['requires'](){return[RevisionViewer,_0x1b1234];}['init'](){const _0x149163=this['editor']['plugins']['get'](_0x1b1234);for(const _0x455669 of _0x199220)_0x455669['isAnonymous']||_0x149163['getUser'](_0x455669['id'])||_0x149163['addUser'](_0x455669);const _0x3efcc8=_0x1cb376['repository']['getRevisions']();let _0x1f0739=null;const _0x2d5e43=this['editor']['plugins']['get']('RevisionViewer');_0x2d5e43['adapter']=_0x1cb376['adapter'],_0x2d5e43['bind']('isEnabled')['to'](_0x1cb376),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0xc5cf6b,'isReadOnly',_0x473e28=>!_0x473e28);for(const _0x1ecbc5 of _0x3efcc8){const _0x1564f0=null===_0x1ecbc5['creator'];if(_0x1564f0&&_0x1ecbc5['toVersion']===_0x1ecbc5['fromVersion'])continue;const _0x24ead4=_0x1ecbc5['toJSON']();_0x2d5e43['addRevisionData'](_0x24ead4,(_0x2f8345,_0x13b055,_0x5ef979)=>{if(_0x1564f0){if(_0x1f0739)_0x1f0739['_update'](_0x2f8345,_0x13b055);else{if(!_0x13b055){const _0x2082ee=_0x5ef979['toJSON']();_0x2082ee['id']=_0x13fdf1(),_0x1cb376['saveRevision'](_0x2082ee,_0x5ef979['toVersion'])['then'](_0x2bb886=>{_0x1f0739=_0x2bb886;});}}}else _0x1ecbc5['_update'](_0x2f8345,_0x13b055);});}}},RevisionsSidebar),_0x33f4ab);}['_enhanceShowRevisionViewerCallback'](){const _0x4773d8=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x203f19=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x14d3a8=this['editor']['plugins']['get']('Autosave');await _0x14d3a8['save']();}else await _0x203f19['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x295a9d=this['editor']['plugins']['get']('Dialog');_0x295a9d['isOpen']&&_0x295a9d['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x5d13f1=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x3c5225 of _0x5d13f1)_0x3c5225['class']=_0x3c5225['class']?_0x3c5225['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x34ea54=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x34ea54&&_0x34ea54['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x492e65=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x492e65&&_0x492e65['setAttribute']('tabindex','-1');}}const _0x5bb6a5=this['_getRevisionViewerEditorConfig']();return _0x4773d8(_0x5bb6a5)['then'](_0x15e9f2=>{return(this['_viewerEditor']=_0x15e9f2,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'),_0x15e9f2);})['catch'](_0x32fa8c=>(console['error'](_0x32fa8c),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x5f7a28=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 _0x33aa97=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x5a3954 of _0x33aa97)_0x5a3954['class']='ck-tab-panel_disabled'===_0x5a3954['class']?'':_0x5a3954['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x5a561e=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x5a561e&&_0x5a561e['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x4388f9=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x4388f9&&_0x4388f9['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x5f7a28(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0xff0edf=this['editor']['plugins']['get']('Annotations');_0xff0edf['refreshVisibility'](),_0xff0edf['refreshPositioning']();}});});}['_showRevisionViewer'](_0x2298a4){const _0x9dbbeb=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x1ac3cf=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x56c3c7=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return RevisionViewerEditor['create'](_0x56c3c7,_0x2298a4)['then'](_0x4b17b0=>(_0x1ac3cf['style']['display']='block',_0x9dbbeb['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x4b17b0));}['_closeRevisionViewer'](_0x240f6f){const _0x16bf81=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x16bf81['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x240f6f['destroy']();}async['_restoreRevision'](_0x5f5058){const _0x235970=this['editor'],_0x5c2b1a=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x343b07=_0x235970['plugins']['get']('RevisionTracker'),_0x1a5f4b=_0x235970['plugins']['get']('RevisionHistoryUtils'),_0x4f385b=_0x5c2b1a['repository']['getRevision'](_0x5f5058);let _0x5a2741,_0x41ec2c,_0x597c0;try{await _0x1a5f4b['loadRevisionData'](_0x4f385b,this['adapter']),_0x5a2741=_0x1a5f4b['getRevisionDocumentData'](_0x4f385b),_0x41ec2c=_0x1a5f4b['getRevisionRootsAttributes'](_0x4f385b);}catch(_0x1d039a){return void console['error'](_0x1d039a);}_0x235970['model']['change'](_0x396dcf=>{for(const _0xbc3a2a of Array['from'](_0x235970['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x396dcf['removeMarker'](_0xbc3a2a);}),_0x5c2b1a['isReady']=!0x1,_0x235970['model']['enqueueChange'](_0x49c646=>{_0x49c646['setSelection'](null),_0x49c646['removeSelectionAttribute'](_0x235970['model']['document']['selection']['getAttributeKeys']());const _0x5e16a5=Object['keys'](_0x5a2741);for(const _0x5135de of _0x235970['model']['document']['roots'])'$graveyard'!=_0x5135de['rootName']&&_0x5135de['isAttached']()&&!_0x5e16a5['includes'](_0x5135de['rootName'])&&_0x49c646['detachRoot'](_0x5135de);for(const _0x43551d of _0x5e16a5){let _0x15c24b=_0x235970['model']['document']['getRoot'](_0x43551d);if(!_0x15c24b||!_0x15c24b['isAttached']()){const _0x2a456a=_0x4f385b['diffData']?.[_0x43551d]?.['rootElementName']||'$root';_0x15c24b=_0x49c646['addRoot'](_0x43551d,_0x2a456a);}const _0x590ea9=_0x41ec2c[_0x43551d],_0x4bd1a2=Object['keys'](_0x590ea9),_0x411c32=_0x5a2741[_0x43551d];for(const _0x48f147 of _0x15c24b['getAttributeKeys']())_0x4bd1a2['includes'](_0x48f147)||_0x49c646['removeAttribute'](_0x48f147,_0x15c24b);for(const _0x7387c8 of _0x4bd1a2)_0x49c646['setAttribute'](_0x7387c8,_0x41ec2c[_0x43551d][_0x7387c8],_0x15c24b);_0x49c646['remove'](_0x49c646['createRangeIn'](_0x15c24b)),_0x49c646['insert'](_0x235970['data']['parse'](_0x411c32,_0x15c24b),_0x15c24b,0x0);}});const _0x388a52=ft(_0x235970['locale'],'Restored');if(_0x4f385b['name'])_0x597c0=-0x1==_0x4f385b['name']['indexOf'](_0x388a52)?_0x388a52+':\x20'+_0x4f385b['name']:_0x4f385b['name'];else _0x597c0=_0x388a52+':\x20'+(_0x4f385b['createdAt']['toLocaleDateString'](_0x235970['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x4f385b['createdAt']['toLocaleTimeString'](_0x235970['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x343b07['saveRevision']({'name':_0x597c0}),_0x5c2b1a['isReady']=!0x0,_0x235970['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{RestoreRevisionCommand,Revision,RevisionHistory,RevisionHistoryUI,RevisionHistoryUtils,RevisionTracker,RevisionViewer,RevisionViewerEditor,RevisionViewerIntegration,RevisionViewerLoadingOverlay,RevisionViewerUI,RevisionsRepository,RevisionsSidebar,ShowChangeCommand};
|